From a8a76198b146d06ce6793d0e0514a8ca93bc993c Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 23 Oct 2019 12:30:52 -0400 Subject: [PATCH] REFACTOR: Remove `Ember.Component` global variable Use imports instead. --- app/assets/javascripts/admin/components/ace-editor.js.es6 | 3 ++- .../javascripts/admin/components/admin-backups-logs.js.es6 | 3 ++- .../javascripts/admin/components/admin-directory-toggle.js.es6 | 3 ++- .../javascripts/admin/components/admin-editable-field.js.es6 | 3 ++- app/assets/javascripts/admin/components/admin-form-row.js.es6 | 3 ++- app/assets/javascripts/admin/components/admin-graph.js.es6 | 3 ++- app/assets/javascripts/admin/components/admin-nav.js.es6 | 3 ++- .../javascripts/admin/components/admin-report-chart.js.es6 | 3 ++- .../javascripts/admin/components/admin-report-counters.js.es6 | 3 ++- .../javascripts/admin/components/admin-report-counts.js.es6 | 3 ++- .../admin/components/admin-report-inline-table.js.es6 | 3 ++- .../admin/components/admin-report-per-day-counts.js.es6 | 3 ++- .../admin/components/admin-report-stacked-chart.js.es6 | 3 ++- .../admin/components/admin-report-storage-stats.js.es6 | 3 ++- .../admin/components/admin-report-table-cell.js.es6 | 3 ++- .../admin/components/admin-report-table-header.js.es6 | 3 ++- .../javascripts/admin/components/admin-report-table-row.js.es6 | 3 ++- .../javascripts/admin/components/admin-report-table.js.es6 | 3 ++- .../admin/components/admin-report-trust-level-counts.js.es6 | 3 ++- app/assets/javascripts/admin/components/admin-report.js.es6 | 3 ++- .../javascripts/admin/components/admin-theme-editor.js.es6 | 3 ++- .../javascripts/admin/components/admin-user-field-item.js.es6 | 3 ++- .../javascripts/admin/components/admin-watched-word.js.es6 | 3 ++- .../admin/components/admin-web-hook-event-chooser.js.es6 | 3 ++- .../javascripts/admin/components/admin-web-hook-event.js.es6 | 3 ++- .../javascripts/admin/components/admin-web-hook-status.js.es6 | 3 ++- app/assets/javascripts/admin/components/admin-wrapper.js.es6 | 3 ++- app/assets/javascripts/admin/components/cancel-link.js.es6 | 3 ++- app/assets/javascripts/admin/components/color-input.js.es6 | 3 ++- .../javascripts/admin/components/email-styles-editor.js.es6 | 3 ++- app/assets/javascripts/admin/components/embeddable-host.js.es6 | 3 ++- .../javascripts/admin/components/embedding-setting.js.es6 | 3 ++- app/assets/javascripts/admin/components/flag-user-lists.js.es6 | 3 ++- .../javascripts/admin/components/highlighted-code.js.es6 | 3 ++- .../javascripts/admin/components/inline-edit-checkbox.js.es6 | 3 ++- .../javascripts/admin/components/install-theme-item.js.es6 | 3 ++- app/assets/javascripts/admin/components/ip-lookup.js.es6 | 3 ++- .../admin/components/moderation-history-item.js.es6 | 3 ++- .../javascripts/admin/components/penalty-post-action.js.es6 | 3 ++- app/assets/javascripts/admin/components/permalink-form.js.es6 | 3 ++- .../javascripts/admin/components/report-filters/filter.js.es6 | 3 ++- .../javascripts/admin/components/resumable-upload.js.es6 | 3 ++- app/assets/javascripts/admin/components/save-controls.js.es6 | 3 ++- .../admin/components/screened-ip-address-form.js.es6 | 3 ++- .../javascripts/admin/components/secret-value-list.js.es6 | 3 ++- app/assets/javascripts/admin/components/silence-details.js.es6 | 3 ++- app/assets/javascripts/admin/components/site-setting.js.es6 | 3 ++- .../javascripts/admin/components/site-settings/bool.js.es6 | 3 ++- .../admin/components/site-settings/category-list.js.es6 | 3 ++- .../admin/components/site-settings/group-list.js.es6 | 3 ++- .../admin/components/site-settings/uploaded-image-list.js.es6 | 3 ++- .../javascripts/admin/components/site-text-summary.js.es6 | 3 ++- app/assets/javascripts/admin/components/staff-actions.js.es6 | 3 ++- .../javascripts/admin/components/suspension-details.js.es6 | 3 ++- app/assets/javascripts/admin/components/tags-uploader.js.es6 | 3 ++- .../javascripts/admin/components/theme-setting-editor.js.es6 | 3 ++- .../javascripts/admin/components/theme-translation.js.es6 | 3 ++- .../javascripts/admin/components/themes-list-item.js.es6 | 3 ++- app/assets/javascripts/admin/components/themes-list.js.es6 | 3 ++- app/assets/javascripts/admin/components/value-list.js.es6 | 3 ++- .../javascripts/admin/components/watched-word-form.js.es6 | 3 ++- .../javascripts/admin/components/watched-word-uploader.js.es6 | 3 ++- .../javascripts/discourse/components/about-page-users.js.es6 | 3 ++- .../discourse/components/activation-controls.js.es6 | 3 ++- .../discourse/components/add-category-tag-classes.js.es6 | 3 ++- .../javascripts/discourse/components/avatar-uploader.js.es6 | 3 ++- .../javascripts/discourse/components/backup-codes.js.es6 | 3 ++- .../javascripts/discourse/components/backup-uploader.js.es6 | 3 ++- .../javascripts/discourse/components/badge-button.js.es6 | 3 ++- app/assets/javascripts/discourse/components/badge-card.js.es6 | 3 ++- .../javascripts/discourse/components/badge-selector.js.es6 | 3 ++- app/assets/javascripts/discourse/components/badge-title.js.es6 | 3 ++- .../javascripts/discourse/components/basic-topic-list.js.es6 | 3 ++- .../javascripts/discourse/components/bread-crumbs.js.es6 | 3 ++- .../javascripts/discourse/components/bulk-select-button.js.es6 | 3 ++- .../discourse/components/categories-and-latest-topics.js.es6 | 3 ++- .../discourse/components/categories-and-top-topics.js.es6 | 3 ++- .../discourse/components/categories-boxes-topic.js.es6 | 3 ++- .../discourse/components/categories-boxes-with-topics.js.es6 | 3 ++- .../javascripts/discourse/components/categories-boxes.js.es6 | 3 ++- .../javascripts/discourse/components/categories-only.js.es6 | 3 ++- .../discourse/components/categories-topic-list.js.es6 | 3 ++- .../discourse/components/category-title-before.js.es6 | 3 ++- .../discourse/components/category-title-link.js.es6 | 3 ++- .../javascripts/discourse/components/category-unread.js.es6 | 3 ++- app/assets/javascripts/discourse/components/cdn-img.js.es6 | 3 ++- .../javascripts/discourse/components/choose-message.js.es6 | 3 ++- .../javascripts/discourse/components/choose-topic.js.es6 | 3 ++- .../discourse/components/color-picker-choice.js.es6 | 3 ++- .../javascripts/discourse/components/color-picker.js.es6 | 3 ++- .../discourse/components/composer-action-title.js.es6 | 3 ++- .../javascripts/discourse/components/composer-body.js.es6 | 3 ++- .../javascripts/discourse/components/composer-editor.js.es6 | 3 ++- .../javascripts/discourse/components/composer-message.js.es6 | 3 ++- .../javascripts/discourse/components/composer-messages.js.es6 | 3 ++- .../javascripts/discourse/components/composer-title.js.es6 | 3 ++- .../javascripts/discourse/components/composer-toggles.js.es6 | 3 ++- .../discourse/components/composer-user-selector.js.es6 | 3 ++- .../discourse/components/conditional-loading-section.js.es6 | 3 ++- .../discourse/components/conditional-loading-spinner.js.es6 | 3 ++- .../discourse/components/connector-container.js.es6 | 3 ++- app/assets/javascripts/discourse/components/cook-text.js.es6 | 3 ++- app/assets/javascripts/discourse/components/count-i18n.js.es6 | 3 ++- .../javascripts/discourse/components/create-account.js.es6 | 3 ++- .../discourse/components/create-topic-button.js.es6 | 3 ++- .../discourse/components/create-topics-notice.js.es6 | 3 ++- .../javascripts/discourse/components/csv-uploader.js.es6 | 3 ++- app/assets/javascripts/discourse/components/custom-html.js.es6 | 3 ++- app/assets/javascripts/discourse/components/d-button.js.es6 | 3 ++- app/assets/javascripts/discourse/components/d-editor.js.es6 | 3 ++- .../javascripts/discourse/components/d-modal-body.js.es6 | 3 ++- .../javascripts/discourse/components/d-modal-cancel.js.es6 | 3 ++- .../javascripts/discourse/components/d-navigation.js.es6 | 3 ++- app/assets/javascripts/discourse/components/d-section.js.es6 | 3 ++- app/assets/javascripts/discourse/components/date-input.js.es6 | 3 ++- app/assets/javascripts/discourse/components/date-picker.js.es6 | 3 ++- .../discourse/components/date-time-input-range.js.es6 | 3 ++- .../javascripts/discourse/components/date-time-input.js.es6 | 3 ++- .../discourse/components/desktop-notification-config.js.es6 | 3 ++- .../javascripts/discourse/components/directory-item.js.es6 | 3 ++- .../javascripts/discourse/components/directory-toggle.js.es6 | 3 ++- .../javascripts/discourse/components/disabled-icon.js.es6 | 3 ++- .../javascripts/discourse/components/discourse-banner.js.es6 | 3 ++- .../discourse/components/discourse-linked-text.js.es6 | 3 ++- .../discourse/components/discourse-tag-bound.js.es6 | 3 ++- .../javascripts/discourse/components/discourse-topic.js.es6 | 3 ++- .../discourse/components/discovery-categories.js.es6 | 3 ++- .../discourse/components/discovery-topics-list.js.es6 | 3 ++- .../discourse/components/edit-category-panel.js.es6 | 3 ++- .../javascripts/discourse/components/edit-category-tab.js.es6 | 3 ++- .../discourse/components/edit-topic-timer-form.js.es6 | 3 ++- .../javascripts/discourse/components/emoji-picker.js.es6 | 3 ++- .../javascripts/discourse/components/emoji-uploader.js.es6 | 3 ++- app/assets/javascripts/discourse/components/expand-post.js.es6 | 3 ++- .../javascripts/discourse/components/featured-topic.js.es6 | 3 ++- .../javascripts/discourse/components/flag-action-type.js.es6 | 3 ++- .../javascripts/discourse/components/flag-selection.js.es6 | 3 ++- app/assets/javascripts/discourse/components/flat-button.js.es6 | 3 ++- .../javascripts/discourse/components/footer-message.js.es6 | 3 ++- .../javascripts/discourse/components/future-date-input.js.es6 | 3 ++- .../discourse/components/generated-invite-link.js.es6 | 3 ++- .../javascripts/discourse/components/global-notice.js.es6 | 3 ++- .../javascripts/discourse/components/google-search.js.es6 | 3 ++- .../discourse/components/group-activity-filter.js.es6 | 3 ++- .../discourse/components/group-card-contents.js.es6 | 3 ++- .../javascripts/discourse/components/group-flair-inputs.js.es6 | 3 ++- .../javascripts/discourse/components/group-index-toggle.js.es6 | 3 ++- .../discourse/components/group-manage-logs-filter.js.es6 | 3 ++- .../discourse/components/group-manage-logs-row.js.es6 | 3 ++- .../discourse/components/group-manage-save-button.js.es6 | 3 ++- .../javascripts/discourse/components/group-member.js.es6 | 3 ++- .../discourse/components/group-members-input.js.es6 | 3 ++- .../discourse/components/group-membership-button.js.es6 | 3 ++- .../javascripts/discourse/components/group-navigation.js.es6 | 3 ++- app/assets/javascripts/discourse/components/group-post.js.es6 | 3 ++- .../javascripts/discourse/components/group-selector.js.es6 | 3 ++- .../discourse/components/groups-form-interaction-fields.js.es6 | 3 ++- .../discourse/components/groups-form-membership-fields.js.es6 | 3 ++- .../discourse/components/groups-form-profile-fields.js.es6 | 3 ++- app/assets/javascripts/discourse/components/groups-info.js.es6 | 3 ++- .../javascripts/discourse/components/hide-modal-trigger.js.es6 | 3 ++- .../javascripts/discourse/components/highlight-text.js.es6 | 3 ++- .../discourse/components/ignored-user-list-item.js.es6 | 3 ++- .../javascripts/discourse/components/ignored-user-list.js.es6 | 3 ++- .../javascripts/discourse/components/image-uploader.js.es6 | 3 ++- .../javascripts/discourse/components/images-uploader.js.es6 | 3 ++- app/assets/javascripts/discourse/components/input-tip.js.es6 | 3 ++- .../javascripts/discourse/components/invite-panel.js.es6 | 3 ++- .../discourse/components/latest-topic-list-item.js.es6 | 3 ++- .../javascripts/discourse/components/link-to-input.js.es6 | 3 ++- .../javascripts/discourse/components/links-redirect.js.es6 | 3 ++- app/assets/javascripts/discourse/components/load-more.js.es6 | 3 ++- .../javascripts/discourse/components/login-buttons.js.es6 | 3 ++- app/assets/javascripts/discourse/components/login-modal.js.es6 | 3 ++- .../discourse/components/mobile-category-topic.js.es6 | 3 ++- app/assets/javascripts/discourse/components/mobile-nav.js.es6 | 3 ++- app/assets/javascripts/discourse/components/modal-panel.js.es6 | 3 ++- app/assets/javascripts/discourse/components/modal-tab.js.es6 | 3 ++- .../javascripts/discourse/components/mount-widget.js.es6 | 3 ++- app/assets/javascripts/discourse/components/nav-item.js.es6 | 3 ++- .../javascripts/discourse/components/navigation-bar.js.es6 | 3 ++- .../javascripts/discourse/components/navigation-item.js.es6 | 3 ++- .../javascripts/discourse/components/plugin-connector.js.es6 | 3 ++- .../javascripts/discourse/components/plugin-outlet.js.es6 | 3 ++- .../javascripts/discourse/components/popup-input-tip.js.es6 | 3 ++- .../discourse/components/preference-checkbox.js.es6 | 3 ++- .../javascripts/discourse/components/pwa-install-banner.js.es6 | 3 ++- .../javascripts/discourse/components/quote-button.js.es6 | 3 ++- .../javascripts/discourse/components/radio-button.js.es6 | 3 ++- .../javascripts/discourse/components/related-messages.js.es6 | 3 ++- .../discourse/components/reviewable-bundled-action.js.es6 | 3 ++- .../discourse/components/reviewable-claimed-topic.js.es6 | 3 ++- .../discourse/components/reviewable-conversation-post.js.es6 | 3 ++- .../discourse/components/reviewable-flagged-post.js.es6 | 3 ++- .../discourse/components/reviewable-histories.js.es6 | 3 ++- .../javascripts/discourse/components/reviewable-item.js.es6 | 3 ++- .../discourse/components/reviewable-queued-post.js.es6 | 3 ++- .../javascripts/discourse/components/reviewable-user.js.es6 | 3 ++- .../javascripts/discourse/components/scroll-tracker.js.es6 | 3 ++- .../discourse/components/search-advanced-options.js.es6 | 3 ++- .../javascripts/discourse/components/second-factor-form.js.es6 | 3 ++- .../discourse/components/second-factor-input.js.es6 | 3 ++- .../javascripts/discourse/components/security-key-form.js.es6 | 3 ++- app/assets/javascripts/discourse/components/share-panel.js.es6 | 3 ++- app/assets/javascripts/discourse/components/share-popup.js.es6 | 3 ++- .../javascripts/discourse/components/share-source.js.es6 | 3 ++- .../discourse/components/shared-draft-controls.js.es6 | 3 ++- app/assets/javascripts/discourse/components/signup-cta.js.es6 | 3 ++- .../javascripts/discourse/components/suggested-topics.js.es6 | 3 ++- .../javascripts/discourse/components/tag-drop-link.js.es6 | 3 ++- app/assets/javascripts/discourse/components/tag-list.js.es6 | 3 ++- .../javascripts/discourse/components/text-overflow.js.es6 | 3 ++- app/assets/javascripts/discourse/components/time-input.js.es6 | 3 ++- .../javascripts/discourse/components/top-period-buttons.js.es6 | 3 ++- .../javascripts/discourse/components/topic-category.js.es6 | 3 ++- .../javascripts/discourse/components/topic-entrance.js.es6 | 3 ++- .../discourse/components/topic-footer-buttons.js.es6 | 3 ++- .../discourse/components/topic-join-group-notice.js.es6 | 3 ++- .../javascripts/discourse/components/topic-list-item.js.es6 | 3 ++- app/assets/javascripts/discourse/components/topic-list.js.es6 | 3 ++- .../javascripts/discourse/components/topic-navigation.js.es6 | 3 ++- .../javascripts/discourse/components/topic-post-badges.js.es6 | 3 ++- .../javascripts/discourse/components/topic-progress.js.es6 | 3 ++- .../javascripts/discourse/components/topic-status.js.es6 | 3 ++- .../javascripts/discourse/components/topic-timer-info.js.es6 | 3 ++- app/assets/javascripts/discourse/components/topic-title.js.es6 | 3 ++- .../javascripts/discourse/components/track-selected.js.es6 | 3 ++- app/assets/javascripts/discourse/components/user-badge.js.es6 | 3 ++- .../javascripts/discourse/components/user-card-contents.js.es6 | 3 ++- app/assets/javascripts/discourse/components/user-field.js.es6 | 3 ++- .../discourse/components/user-flag-percentage.js.es6 | 3 ++- app/assets/javascripts/discourse/components/user-info.js.es6 | 3 ++- app/assets/javascripts/discourse/components/user-link.js.es6 | 3 ++- app/assets/javascripts/discourse/components/user-stat.js.es6 | 3 ++- .../javascripts/discourse/components/user-stream-item.js.es6 | 3 ++- app/assets/javascripts/discourse/components/user-stream.js.es6 | 3 ++- .../discourse/components/user-summary-category-search.js.es6 | 3 ++- .../discourse/components/user-summary-section.js.es6 | 3 ++- .../javascripts/discourse/components/user-summary-topic.js.es6 | 3 ++- .../discourse/components/user-summary-topics-list.js.es6 | 3 ++- .../javascripts/discourse/components/user-summary-user.js.es6 | 3 ++- app/assets/javascripts/discourse/components/watch-read.js.es6 | 3 ++- .../discourse/templates/components/reviewable-score.js.es6 | 3 ++- .../select-kit/components/multi-select/selected-name.js.es6 | 3 ++- .../javascripts/select-kit/components/pinned-button.js.es6 | 3 ++- app/assets/javascripts/select-kit/components/select-kit.js.es6 | 3 ++- .../components/select-kit/select-kit-collection.js.es6 | 3 ++- .../select-kit/components/select-kit/select-kit-filter.js.es6 | 3 ++- .../select-kit/components/select-kit/select-kit-header.js.es6 | 3 ++- .../select-kit/components/select-kit/select-kit-row.js.es6 | 3 ++- .../select-kit/components/topic-notifications-button.js.es6 | 3 ++- .../javascripts/wizard/components/invite-list-user.js.es6 | 3 ++- app/assets/javascripts/wizard/components/invite-list.js.es6 | 3 ++- app/assets/javascripts/wizard/components/popular-themes.js.es6 | 3 ++- app/assets/javascripts/wizard/components/radio-button.js.es6 | 3 ++- app/assets/javascripts/wizard/components/staff-count.js.es6 | 3 ++- app/assets/javascripts/wizard/components/theme-previews.js.es6 | 3 ++- app/assets/javascripts/wizard/components/wizard-canvas.js.es6 | 3 ++- .../javascripts/wizard/components/wizard-field-dropdown.js.es6 | 3 ++- .../javascripts/wizard/components/wizard-field-image.js.es6 | 3 ++- .../javascripts/wizard/components/wizard-field-radio.js.es6 | 3 ++- .../javascripts/wizard/components/wizard-field-textarea.js.es6 | 3 ++- app/assets/javascripts/wizard/components/wizard-field.js.es6 | 3 ++- .../javascripts/wizard/components/wizard-image-preview.js.es6 | 3 ++- .../javascripts/wizard/components/wizard-step-form.js.es6 | 3 ++- app/assets/javascripts/wizard/components/wizard-step.js.es6 | 3 ++- app/assets/javascripts/wizard/lib/preview.js.es6 | 3 ++- .../components/discourse-local-dates-create-form.js.es6 | 3 ++- .../discourse/components/composer-presence-display.js.es6 | 3 ++- .../discourse/components/topic-presence-display.js.es6 | 3 ++- 270 files changed, 540 insertions(+), 270 deletions(-) diff --git a/app/assets/javascripts/admin/components/ace-editor.js.es6 b/app/assets/javascripts/admin/components/ace-editor.js.es6 index 887b99d3688..f7aca533e3c 100644 --- a/app/assets/javascripts/admin/components/ace-editor.js.es6 +++ b/app/assets/javascripts/admin/components/ace-editor.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import loadScript from "discourse/lib/load-script"; import { observes } from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ mode: "css", classNames: ["ace-wrapper"], _editor: null, diff --git a/app/assets/javascripts/admin/components/admin-backups-logs.js.es6 b/app/assets/javascripts/admin/components/admin-backups-logs.js.es6 index 5112564eecb..67bc308948a 100644 --- a/app/assets/javascripts/admin/components/admin-backups-logs.js.es6 +++ b/app/assets/javascripts/admin/components/admin-backups-logs.js.es6 @@ -1,10 +1,11 @@ +import Component from "@ember/component"; import debounce from "discourse/lib/debounce"; import { renderSpinner } from "discourse/helpers/loading-spinner"; import { escapeExpression } from "discourse/lib/utilities"; import { bufferedRender } from "discourse-common/lib/buffered-render"; import { observes, on } from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend( +export default Component.extend( bufferedRender({ classNames: ["admin-backups-logs"], diff --git a/app/assets/javascripts/admin/components/admin-directory-toggle.js.es6 b/app/assets/javascripts/admin/components/admin-directory-toggle.js.es6 index f2480802b86..f110293a745 100644 --- a/app/assets/javascripts/admin/components/admin-directory-toggle.js.es6 +++ b/app/assets/javascripts/admin/components/admin-directory-toggle.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import { iconHTML } from "discourse-common/lib/icon-library"; import { bufferedRender } from "discourse-common/lib/buffered-render"; -export default Ember.Component.extend( +export default Component.extend( bufferedRender({ tagName: "th", classNames: ["sortable"], diff --git a/app/assets/javascripts/admin/components/admin-editable-field.js.es6 b/app/assets/javascripts/admin/components/admin-editable-field.js.es6 index 9d91e2a27f1..f2785cffd4e 100644 --- a/app/assets/javascripts/admin/components/admin-editable-field.js.es6 +++ b/app/assets/javascripts/admin/components/admin-editable-field.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ tagName: "", buffer: "", diff --git a/app/assets/javascripts/admin/components/admin-form-row.js.es6 b/app/assets/javascripts/admin/components/admin-form-row.js.es6 index 5159168c303..b5f78c2a219 100644 --- a/app/assets/javascripts/admin/components/admin-form-row.js.es6 +++ b/app/assets/javascripts/admin/components/admin-form-row.js.es6 @@ -1,3 +1,4 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ classNames: ["row"] }); diff --git a/app/assets/javascripts/admin/components/admin-graph.js.es6 b/app/assets/javascripts/admin/components/admin-graph.js.es6 index 5949d51e24f..be2e0f4e1af 100644 --- a/app/assets/javascripts/admin/components/admin-graph.js.es6 +++ b/app/assets/javascripts/admin/components/admin-graph.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import loadScript from "discourse/lib/load-script"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "canvas", type: "line", diff --git a/app/assets/javascripts/admin/components/admin-nav.js.es6 b/app/assets/javascripts/admin/components/admin-nav.js.es6 index 91ad923ffcc..89720fbbe80 100644 --- a/app/assets/javascripts/admin/components/admin-nav.js.es6 +++ b/app/assets/javascripts/admin/components/admin-nav.js.es6 @@ -1,3 +1,4 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ tagName: "" }); diff --git a/app/assets/javascripts/admin/components/admin-report-chart.js.es6 b/app/assets/javascripts/admin/components/admin-report-chart.js.es6 index 80d35c4693b..6ad48208b4a 100644 --- a/app/assets/javascripts/admin/components/admin-report-chart.js.es6 +++ b/app/assets/javascripts/admin/components/admin-report-chart.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import { number } from "discourse/lib/formatter"; import loadScript from "discourse/lib/load-script"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["admin-report-chart"], limit: 8, total: 0, diff --git a/app/assets/javascripts/admin/components/admin-report-counters.js.es6 b/app/assets/javascripts/admin/components/admin-report-counters.js.es6 index d64bbe20fc5..a66a3804c26 100644 --- a/app/assets/javascripts/admin/components/admin-report-counters.js.es6 +++ b/app/assets/javascripts/admin/components/admin-report-counters.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ classNames: ["admin-report-counters"], attributeBindings: ["model.description:title"] diff --git a/app/assets/javascripts/admin/components/admin-report-counts.js.es6 b/app/assets/javascripts/admin/components/admin-report-counts.js.es6 index 849d81460a2..fc0127ec886 100644 --- a/app/assets/javascripts/admin/components/admin-report-counts.js.es6 +++ b/app/assets/javascripts/admin/components/admin-report-counts.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ allTime: true, tagName: "tr", reverseColors: Ember.computed.match( diff --git a/app/assets/javascripts/admin/components/admin-report-inline-table.js.es6 b/app/assets/javascripts/admin/components/admin-report-inline-table.js.es6 index 7e4933381ce..38b3d4595e5 100644 --- a/app/assets/javascripts/admin/components/admin-report-inline-table.js.es6 +++ b/app/assets/javascripts/admin/components/admin-report-inline-table.js.es6 @@ -1,3 +1,4 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ classNames: ["admin-report-inline-table"] }); diff --git a/app/assets/javascripts/admin/components/admin-report-per-day-counts.js.es6 b/app/assets/javascripts/admin/components/admin-report-per-day-counts.js.es6 index b7620b66cd3..b644dbab9f9 100644 --- a/app/assets/javascripts/admin/components/admin-report-per-day-counts.js.es6 +++ b/app/assets/javascripts/admin/components/admin-report-per-day-counts.js.es6 @@ -1,3 +1,4 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ tagName: "tr" }); diff --git a/app/assets/javascripts/admin/components/admin-report-stacked-chart.js.es6 b/app/assets/javascripts/admin/components/admin-report-stacked-chart.js.es6 index 852bc92b3db..1d70da8fed7 100644 --- a/app/assets/javascripts/admin/components/admin-report-stacked-chart.js.es6 +++ b/app/assets/javascripts/admin/components/admin-report-stacked-chart.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import { number } from "discourse/lib/formatter"; import loadScript from "discourse/lib/load-script"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["admin-report-chart", "admin-report-stacked-chart"], init() { diff --git a/app/assets/javascripts/admin/components/admin-report-storage-stats.js.es6 b/app/assets/javascripts/admin/components/admin-report-storage-stats.js.es6 index c4bf831f56c..51142a6d19c 100644 --- a/app/assets/javascripts/admin/components/admin-report-storage-stats.js.es6 +++ b/app/assets/javascripts/admin/components/admin-report-storage-stats.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import { setting } from "discourse/lib/computed"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["admin-report-storage-stats"], backupLocation: setting("backup_location"), diff --git a/app/assets/javascripts/admin/components/admin-report-table-cell.js.es6 b/app/assets/javascripts/admin/components/admin-report-table-cell.js.es6 index 7140b69668e..c2354de73af 100644 --- a/app/assets/javascripts/admin/components/admin-report-table-cell.js.es6 +++ b/app/assets/javascripts/admin/components/admin-report-table-cell.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "td", classNames: ["admin-report-table-cell"], classNameBindings: ["type", "property"], diff --git a/app/assets/javascripts/admin/components/admin-report-table-header.js.es6 b/app/assets/javascripts/admin/components/admin-report-table-header.js.es6 index ab986f29460..9317ef1f662 100644 --- a/app/assets/javascripts/admin/components/admin-report-table-header.js.es6 +++ b/app/assets/javascripts/admin/components/admin-report-table-header.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "th", classNames: ["admin-report-table-header"], classNameBindings: ["label.mainProperty", "label.type", "isCurrentSort"], diff --git a/app/assets/javascripts/admin/components/admin-report-table-row.js.es6 b/app/assets/javascripts/admin/components/admin-report-table-row.js.es6 index 3be140c308e..c86f586a082 100644 --- a/app/assets/javascripts/admin/components/admin-report-table-row.js.es6 +++ b/app/assets/javascripts/admin/components/admin-report-table-row.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ tagName: "tr", classNames: ["admin-report-table-row"], options: null diff --git a/app/assets/javascripts/admin/components/admin-report-table.js.es6 b/app/assets/javascripts/admin/components/admin-report-table.js.es6 index 6e1e22c172b..8df3a96f38c 100644 --- a/app/assets/javascripts/admin/components/admin-report-table.js.es6 +++ b/app/assets/javascripts/admin/components/admin-report-table.js.es6 @@ -1,8 +1,9 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; const PAGES_LIMIT = 8; -export default Ember.Component.extend({ +export default Component.extend({ classNameBindings: ["sortable", "twoColumns"], classNames: ["admin-report-table"], sortable: false, diff --git a/app/assets/javascripts/admin/components/admin-report-trust-level-counts.js.es6 b/app/assets/javascripts/admin/components/admin-report-trust-level-counts.js.es6 index b7620b66cd3..b644dbab9f9 100644 --- a/app/assets/javascripts/admin/components/admin-report-trust-level-counts.js.es6 +++ b/app/assets/javascripts/admin/components/admin-report-trust-level-counts.js.es6 @@ -1,3 +1,4 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ tagName: "tr" }); diff --git a/app/assets/javascripts/admin/components/admin-report.js.es6 b/app/assets/javascripts/admin/components/admin-report.js.es6 index 37a8f2acc8f..28e30b8a24a 100644 --- a/app/assets/javascripts/admin/components/admin-report.js.es6 +++ b/app/assets/javascripts/admin/components/admin-report.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import ReportLoader from "discourse/lib/reports-loader"; import { exportEntity } from "discourse/lib/export-csv"; import { outputExportResult } from "discourse/lib/export-result"; @@ -34,7 +35,7 @@ function collapseWeekly(data, average) { return aggregate; } -export default Ember.Component.extend({ +export default Component.extend({ classNameBindings: ["isEnabled", "isLoading", "dasherizedDataSourceName"], classNames: ["admin-report"], isEnabled: true, diff --git a/app/assets/javascripts/admin/components/admin-theme-editor.js.es6 b/app/assets/javascripts/admin/components/admin-theme-editor.js.es6 index e54cb32c609..81204568218 100644 --- a/app/assets/javascripts/admin/components/admin-theme-editor.js.es6 +++ b/app/assets/javascripts/admin/components/admin-theme-editor.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import { default as computed } from "ember-addons/ember-computed-decorators"; import { fmt } from "discourse/lib/computed"; -export default Ember.Component.extend({ +export default Component.extend({ @computed("theme.targets", "onlyOverridden", "showAdvanced") visibleTargets(targets, onlyOverridden, showAdvanced) { return targets.filter(target => { diff --git a/app/assets/javascripts/admin/components/admin-user-field-item.js.es6 b/app/assets/javascripts/admin/components/admin-user-field-item.js.es6 index 1bf6128f1ce..7b6cef45273 100644 --- a/app/assets/javascripts/admin/components/admin-user-field-item.js.es6 +++ b/app/assets/javascripts/admin/components/admin-user-field-item.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import UserField from "admin/models/user-field"; import { bufferedProperty } from "discourse/mixins/buffered-content"; import { popupAjaxError } from "discourse/lib/ajax-error"; @@ -9,7 +10,7 @@ import { on } from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend(bufferedProperty("userField"), { +export default Component.extend(bufferedProperty("userField"), { editing: Ember.computed.empty("userField.id"), classNameBindings: [":user-field"], diff --git a/app/assets/javascripts/admin/components/admin-watched-word.js.es6 b/app/assets/javascripts/admin/components/admin-watched-word.js.es6 index 4da18280218..8a408cf1661 100644 --- a/app/assets/javascripts/admin/components/admin-watched-word.js.es6 +++ b/app/assets/javascripts/admin/components/admin-watched-word.js.es6 @@ -1,8 +1,9 @@ +import Component from "@ember/component"; import { iconHTML } from "discourse-common/lib/icon-library"; import { bufferedRender } from "discourse-common/lib/buffered-render"; import { escapeExpression } from "discourse/lib/utilities"; -export default Ember.Component.extend( +export default Component.extend( bufferedRender({ classNames: ["watched-word"], diff --git a/app/assets/javascripts/admin/components/admin-web-hook-event-chooser.js.es6 b/app/assets/javascripts/admin/components/admin-web-hook-event-chooser.js.es6 index 7a6b5c13f15..32ca7e4fad4 100644 --- a/app/assets/javascripts/admin/components/admin-web-hook-event-chooser.js.es6 +++ b/app/assets/javascripts/admin/components/admin-web-hook-event-chooser.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["hook-event"], typeName: Ember.computed.alias("type.name"), diff --git a/app/assets/javascripts/admin/components/admin-web-hook-event.js.es6 b/app/assets/javascripts/admin/components/admin-web-hook-event.js.es6 index b558baa0b49..693e6502ff6 100644 --- a/app/assets/javascripts/admin/components/admin-web-hook-event.js.es6 +++ b/app/assets/javascripts/admin/components/admin-web-hook-event.js.es6 @@ -1,9 +1,10 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; import { ajax } from "discourse/lib/ajax"; import { popupAjaxError } from "discourse/lib/ajax-error"; import { ensureJSON, plainJSON, prettyJSON } from "discourse/lib/formatter"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "li", expandDetails: null, expandDetailsRequestKey: "request", diff --git a/app/assets/javascripts/admin/components/admin-web-hook-status.js.es6 b/app/assets/javascripts/admin/components/admin-web-hook-status.js.es6 index 6e325b2fe9e..0d8e80cc81c 100644 --- a/app/assets/javascripts/admin/components/admin-web-hook-status.js.es6 +++ b/app/assets/javascripts/admin/components/admin-web-hook-status.js.es6 @@ -1,8 +1,9 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; import { iconHTML } from "discourse-common/lib/icon-library"; import { bufferedRender } from "discourse-common/lib/buffered-render"; -export default Ember.Component.extend( +export default Component.extend( bufferedRender({ classes: ["text-muted", "text-danger", "text-successful", "text-muted"], icons: ["far-circle", "times-circle", "circle", "circle"], diff --git a/app/assets/javascripts/admin/components/admin-wrapper.js.es6 b/app/assets/javascripts/admin/components/admin-wrapper.js.es6 index 45daf32977e..b60ac12855a 100644 --- a/app/assets/javascripts/admin/components/admin-wrapper.js.es6 +++ b/app/assets/javascripts/admin/components/admin-wrapper.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ didInsertElement() { this._super(...arguments); $("body").addClass("admin-interface"); diff --git a/app/assets/javascripts/admin/components/cancel-link.js.es6 b/app/assets/javascripts/admin/components/cancel-link.js.es6 index 91ad923ffcc..89720fbbe80 100644 --- a/app/assets/javascripts/admin/components/cancel-link.js.es6 +++ b/app/assets/javascripts/admin/components/cancel-link.js.es6 @@ -1,3 +1,4 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ tagName: "" }); diff --git a/app/assets/javascripts/admin/components/color-input.js.es6 b/app/assets/javascripts/admin/components/color-input.js.es6 index 17783cd36a3..f6f0025354d 100644 --- a/app/assets/javascripts/admin/components/color-input.js.es6 +++ b/app/assets/javascripts/admin/components/color-input.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import { default as loadScript, loadCSS } from "discourse/lib/load-script"; /** @@ -7,7 +8,7 @@ import { default as loadScript, loadCSS } from "discourse/lib/load-script"; @param brightnessValue is a number from 0 to 255 representing the brightness of the color. See ColorSchemeColor. @params valid is a boolean indicating if the input field is a valid color. **/ -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["color-picker"], hexValueChanged: function() { var hex = this.hexValue; diff --git a/app/assets/javascripts/admin/components/email-styles-editor.js.es6 b/app/assets/javascripts/admin/components/email-styles-editor.js.es6 index d0e569421f6..75811ec41c1 100644 --- a/app/assets/javascripts/admin/components/email-styles-editor.js.es6 +++ b/app/assets/javascripts/admin/components/email-styles-editor.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ editorId: Ember.computed.reads("fieldName"), @computed("fieldName", "styles.html", "styles.css") diff --git a/app/assets/javascripts/admin/components/embeddable-host.js.es6 b/app/assets/javascripts/admin/components/embeddable-host.js.es6 index 7639312cebd..746bfeede30 100644 --- a/app/assets/javascripts/admin/components/embeddable-host.js.es6 +++ b/app/assets/javascripts/admin/components/embeddable-host.js.es6 @@ -1,9 +1,10 @@ +import Component from "@ember/component"; import { bufferedProperty } from "discourse/mixins/buffered-content"; import computed from "ember-addons/ember-computed-decorators"; import { on, observes } from "ember-addons/ember-computed-decorators"; import { popupAjaxError } from "discourse/lib/ajax-error"; -export default Ember.Component.extend(bufferedProperty("host"), { +export default Component.extend(bufferedProperty("host"), { editToggled: false, tagName: "tr", categoryId: null, diff --git a/app/assets/javascripts/admin/components/embedding-setting.js.es6 b/app/assets/javascripts/admin/components/embedding-setting.js.es6 index 4791e84e357..da7f9abb7ff 100644 --- a/app/assets/javascripts/admin/components/embedding-setting.js.es6 +++ b/app/assets/javascripts/admin/components/embedding-setting.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["embed-setting"], @computed("field") diff --git a/app/assets/javascripts/admin/components/flag-user-lists.js.es6 b/app/assets/javascripts/admin/components/flag-user-lists.js.es6 index ae6094c6a75..a6156a93ad4 100644 --- a/app/assets/javascripts/admin/components/flag-user-lists.js.es6 +++ b/app/assets/javascripts/admin/components/flag-user-lists.js.es6 @@ -1,3 +1,4 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ classNames: ["flag-user-lists"] }); diff --git a/app/assets/javascripts/admin/components/highlighted-code.js.es6 b/app/assets/javascripts/admin/components/highlighted-code.js.es6 index 9f99c0929b8..d182d7e2a1a 100644 --- a/app/assets/javascripts/admin/components/highlighted-code.js.es6 +++ b/app/assets/javascripts/admin/components/highlighted-code.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import { on, observes } from "ember-addons/ember-computed-decorators"; import highlightSyntax from "discourse/lib/highlight-syntax"; -export default Ember.Component.extend({ +export default Component.extend({ @on("didInsertElement") @observes("code") _refresh: function() { diff --git a/app/assets/javascripts/admin/components/inline-edit-checkbox.js.es6 b/app/assets/javascripts/admin/components/inline-edit-checkbox.js.es6 index a31b4361679..e88c2bc3b71 100644 --- a/app/assets/javascripts/admin/components/inline-edit-checkbox.js.es6 +++ b/app/assets/javascripts/admin/components/inline-edit-checkbox.js.es6 @@ -1,9 +1,10 @@ +import Component from "@ember/component"; import { default as computed, observes } from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["inline-edit"], checked: null, diff --git a/app/assets/javascripts/admin/components/install-theme-item.js.es6 b/app/assets/javascripts/admin/components/install-theme-item.js.es6 index c1f3f57a8ce..040760db01c 100644 --- a/app/assets/javascripts/admin/components/install-theme-item.js.es6 +++ b/app/assets/javascripts/admin/components/install-theme-item.js.es6 @@ -1,3 +1,4 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ classNames: ["install-theme-item"] }); diff --git a/app/assets/javascripts/admin/components/ip-lookup.js.es6 b/app/assets/javascripts/admin/components/ip-lookup.js.es6 index d4bf91ec6a1..c1938dc2d9d 100644 --- a/app/assets/javascripts/admin/components/ip-lookup.js.es6 +++ b/app/assets/javascripts/admin/components/ip-lookup.js.es6 @@ -1,9 +1,10 @@ +import Component from "@ember/component"; import { default as computed } from "ember-addons/ember-computed-decorators"; import { ajax } from "discourse/lib/ajax"; import AdminUser from "admin/models/admin-user"; import copyText from "discourse/lib/copy-text"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["ip-lookup"], @computed("other_accounts.length", "totalOthersWithSameIP") diff --git a/app/assets/javascripts/admin/components/moderation-history-item.js.es6 b/app/assets/javascripts/admin/components/moderation-history-item.js.es6 index b7620b66cd3..b644dbab9f9 100644 --- a/app/assets/javascripts/admin/components/moderation-history-item.js.es6 +++ b/app/assets/javascripts/admin/components/moderation-history-item.js.es6 @@ -1,3 +1,4 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ tagName: "tr" }); diff --git a/app/assets/javascripts/admin/components/penalty-post-action.js.es6 b/app/assets/javascripts/admin/components/penalty-post-action.js.es6 index e60393b3ba1..dcb3bd3ba59 100644 --- a/app/assets/javascripts/admin/components/penalty-post-action.js.es6 +++ b/app/assets/javascripts/admin/components/penalty-post-action.js.es6 @@ -1,8 +1,9 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; const ACTIONS = ["delete", "delete_replies", "edit", "none"]; -export default Ember.Component.extend({ +export default Component.extend({ postId: null, postAction: null, postEdit: null, diff --git a/app/assets/javascripts/admin/components/permalink-form.js.es6 b/app/assets/javascripts/admin/components/permalink-form.js.es6 index 40ae69d090e..74efe085d96 100644 --- a/app/assets/javascripts/admin/components/permalink-form.js.es6 +++ b/app/assets/javascripts/admin/components/permalink-form.js.es6 @@ -1,8 +1,9 @@ +import Component from "@ember/component"; import { default as computed } from "ember-addons/ember-computed-decorators"; import { fmt } from "discourse/lib/computed"; import Permalink from "admin/models/permalink"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["permalink-form"], formSubmitted: false, permalinkType: "topic_id", diff --git a/app/assets/javascripts/admin/components/report-filters/filter.js.es6 b/app/assets/javascripts/admin/components/report-filters/filter.js.es6 index 25f2464f951..f61b2d496ae 100644 --- a/app/assets/javascripts/admin/components/report-filters/filter.js.es6 +++ b/app/assets/javascripts/admin/components/report-filters/filter.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ actions: { onChange(value) { this.applyFilter(this.get("filter.id"), value); diff --git a/app/assets/javascripts/admin/components/resumable-upload.js.es6 b/app/assets/javascripts/admin/components/resumable-upload.js.es6 index b9cab230405..8f6a2913253 100644 --- a/app/assets/javascripts/admin/components/resumable-upload.js.es6 +++ b/app/assets/javascripts/admin/components/resumable-upload.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import { iconHTML } from "discourse-common/lib/icon-library"; import { bufferedRender } from "discourse-common/lib/buffered-render"; import { @@ -17,7 +18,7 @@ import { uploadText="UPLOAD" }} **/ -export default Ember.Component.extend( +export default Component.extend( bufferedRender({ tagName: "button", classNames: ["btn", "ru"], diff --git a/app/assets/javascripts/admin/components/save-controls.js.es6 b/app/assets/javascripts/admin/components/save-controls.js.es6 index cade010e5b7..cc858b15308 100644 --- a/app/assets/javascripts/admin/components/save-controls.js.es6 +++ b/app/assets/javascripts/admin/components/save-controls.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["controls"], buttonDisabled: Ember.computed.or("model.isSaving", "saveDisabled"), diff --git a/app/assets/javascripts/admin/components/screened-ip-address-form.js.es6 b/app/assets/javascripts/admin/components/screened-ip-address-form.js.es6 index 7fb246bf7ad..1b20d7f39c0 100644 --- a/app/assets/javascripts/admin/components/screened-ip-address-form.js.es6 +++ b/app/assets/javascripts/admin/components/screened-ip-address-form.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; /** A form to create an IP address that will be blocked or whitelisted. Example usage: @@ -13,7 +14,7 @@ import ScreenedIpAddress from "admin/models/screened-ip-address"; import computed from "ember-addons/ember-computed-decorators"; import { on } from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["screened-ip-address-form"], formSubmitted: false, actionName: "block", diff --git a/app/assets/javascripts/admin/components/secret-value-list.js.es6 b/app/assets/javascripts/admin/components/secret-value-list.js.es6 index 58539cb9160..db384bd5c6c 100644 --- a/app/assets/javascripts/admin/components/secret-value-list.js.es6 +++ b/app/assets/javascripts/admin/components/secret-value-list.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import { on } from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ classNameBindings: [":value-list", ":secret-value-list"], inputDelimiter: null, collection: null, diff --git a/app/assets/javascripts/admin/components/silence-details.js.es6 b/app/assets/javascripts/admin/components/silence-details.js.es6 index 91ad923ffcc..89720fbbe80 100644 --- a/app/assets/javascripts/admin/components/silence-details.js.es6 +++ b/app/assets/javascripts/admin/components/silence-details.js.es6 @@ -1,3 +1,4 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ tagName: "" }); diff --git a/app/assets/javascripts/admin/components/site-setting.js.es6 b/app/assets/javascripts/admin/components/site-setting.js.es6 index e94713f476b..227d7e99084 100644 --- a/app/assets/javascripts/admin/components/site-setting.js.es6 +++ b/app/assets/javascripts/admin/components/site-setting.js.es6 @@ -1,10 +1,11 @@ +import Component from "@ember/component"; import BufferedContent from "discourse/mixins/buffered-content"; import SiteSetting from "admin/models/site-setting"; import SettingComponent from "admin/mixins/setting-component"; import showModal from "discourse/lib/show-modal"; import AboutRoute from "discourse/routes/about"; -export default Ember.Component.extend(BufferedContent, SettingComponent, { +export default Component.extend(BufferedContent, SettingComponent, { _save(callback) { const defaultCategoriesSettings = [ "default_categories_watching", diff --git a/app/assets/javascripts/admin/components/site-settings/bool.js.es6 b/app/assets/javascripts/admin/components/site-settings/bool.js.es6 index f46e9658327..5bfc0612afd 100644 --- a/app/assets/javascripts/admin/components/site-settings/bool.js.es6 +++ b/app/assets/javascripts/admin/components/site-settings/bool.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ @computed("value") enabled: { get(value) { diff --git a/app/assets/javascripts/admin/components/site-settings/category-list.js.es6 b/app/assets/javascripts/admin/components/site-settings/category-list.js.es6 index 36c712fa8df..d4476ddf130 100644 --- a/app/assets/javascripts/admin/components/site-settings/category-list.js.es6 +++ b/app/assets/javascripts/admin/components/site-settings/category-list.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ @computed("value") selectedCategories: { get(value) { diff --git a/app/assets/javascripts/admin/components/site-settings/group-list.js.es6 b/app/assets/javascripts/admin/components/site-settings/group-list.js.es6 index 0ab60a34361..21af030269b 100644 --- a/app/assets/javascripts/admin/components/site-settings/group-list.js.es6 +++ b/app/assets/javascripts/admin/components/site-settings/group-list.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ @computed() groupChoices() { return this.site.get("groups").map(g => { diff --git a/app/assets/javascripts/admin/components/site-settings/uploaded-image-list.js.es6 b/app/assets/javascripts/admin/components/site-settings/uploaded-image-list.js.es6 index 57bd7fa49ba..7e705321d04 100644 --- a/app/assets/javascripts/admin/components/site-settings/uploaded-image-list.js.es6 +++ b/app/assets/javascripts/admin/components/site-settings/uploaded-image-list.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import showModal from "discourse/lib/show-modal"; -export default Ember.Component.extend({ +export default Component.extend({ actions: { showUploadModal({ value, setting }) { showModal("admin-uploaded-image-list", { diff --git a/app/assets/javascripts/admin/components/site-text-summary.js.es6 b/app/assets/javascripts/admin/components/site-text-summary.js.es6 index da6dda43f84..4467a092d13 100644 --- a/app/assets/javascripts/admin/components/site-text-summary.js.es6 +++ b/app/assets/javascripts/admin/components/site-text-summary.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import { on } from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["site-text"], classNameBindings: ["siteText.overridden"], diff --git a/app/assets/javascripts/admin/components/staff-actions.js.es6 b/app/assets/javascripts/admin/components/staff-actions.js.es6 index 5c7da1dc9d2..1c295799dd1 100644 --- a/app/assets/javascripts/admin/components/staff-actions.js.es6 +++ b/app/assets/javascripts/admin/components/staff-actions.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import DiscourseURL from "discourse/lib/url"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["table", "staff-actions"], willDestroyElement() { diff --git a/app/assets/javascripts/admin/components/suspension-details.js.es6 b/app/assets/javascripts/admin/components/suspension-details.js.es6 index 91ad923ffcc..89720fbbe80 100644 --- a/app/assets/javascripts/admin/components/suspension-details.js.es6 +++ b/app/assets/javascripts/admin/components/suspension-details.js.es6 @@ -1,3 +1,4 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ tagName: "" }); diff --git a/app/assets/javascripts/admin/components/tags-uploader.js.es6 b/app/assets/javascripts/admin/components/tags-uploader.js.es6 index 1373792f24b..1682fd955e9 100644 --- a/app/assets/javascripts/admin/components/tags-uploader.js.es6 +++ b/app/assets/javascripts/admin/components/tags-uploader.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import UploadMixin from "discourse/mixins/upload"; -export default Ember.Component.extend(UploadMixin, { +export default Component.extend(UploadMixin, { type: "csv", uploadUrl: "/tags/upload", addDisabled: Ember.computed.alias("uploading"), diff --git a/app/assets/javascripts/admin/components/theme-setting-editor.js.es6 b/app/assets/javascripts/admin/components/theme-setting-editor.js.es6 index 5a764e55eb4..292356d55ae 100644 --- a/app/assets/javascripts/admin/components/theme-setting-editor.js.es6 +++ b/app/assets/javascripts/admin/components/theme-setting-editor.js.es6 @@ -1,9 +1,10 @@ +import Component from "@ember/component"; import BufferedContent from "discourse/mixins/buffered-content"; import SettingComponent from "admin/mixins/setting-component"; import { ajax } from "discourse/lib/ajax"; import { popupAjaxError } from "discourse/lib/ajax-error"; -export default Ember.Component.extend(BufferedContent, SettingComponent, { +export default Component.extend(BufferedContent, SettingComponent, { layoutName: "admin/templates/components/site-setting", _save() { return ajax(`/admin/themes/${this.model.id}/setting`, { diff --git a/app/assets/javascripts/admin/components/theme-translation.js.es6 b/app/assets/javascripts/admin/components/theme-translation.js.es6 index ab29ac23129..dcdc4a5fd26 100644 --- a/app/assets/javascripts/admin/components/theme-translation.js.es6 +++ b/app/assets/javascripts/admin/components/theme-translation.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import BufferedContent from "discourse/mixins/buffered-content"; import SettingComponent from "admin/mixins/setting-component"; -export default Ember.Component.extend(BufferedContent, SettingComponent, { +export default Component.extend(BufferedContent, SettingComponent, { layoutName: "admin/templates/components/site-setting", setting: Ember.computed.alias("translation"), type: "string", diff --git a/app/assets/javascripts/admin/components/themes-list-item.js.es6 b/app/assets/javascripts/admin/components/themes-list-item.js.es6 index 7bafa95c210..62e5dff8844 100644 --- a/app/assets/javascripts/admin/components/themes-list-item.js.es6 +++ b/app/assets/javascripts/admin/components/themes-list-item.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import { default as computed, observes @@ -7,7 +8,7 @@ import { escape } from "pretty-text/sanitizer"; const MAX_COMPONENTS = 4; -export default Ember.Component.extend({ +export default Component.extend({ childrenExpanded: false, classNames: ["themes-list-item"], classNameBindings: ["theme.selected:selected"], diff --git a/app/assets/javascripts/admin/components/themes-list.js.es6 b/app/assets/javascripts/admin/components/themes-list.js.es6 index d306bab11cc..ec66ce5c4ff 100644 --- a/app/assets/javascripts/admin/components/themes-list.js.es6 +++ b/app/assets/javascripts/admin/components/themes-list.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import { THEMES, COMPONENTS } from "admin/models/theme"; import { default as computed } from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ THEMES: THEMES, COMPONENTS: COMPONENTS, diff --git a/app/assets/javascripts/admin/components/value-list.js.es6 b/app/assets/javascripts/admin/components/value-list.js.es6 index ff93375260c..8a1fa5baa10 100644 --- a/app/assets/javascripts/admin/components/value-list.js.es6 +++ b/app/assets/javascripts/admin/components/value-list.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import { on } from "ember-addons/ember-computed-decorators"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ classNameBindings: [":value-list"], inputInvalid: Ember.computed.empty("newValue"), diff --git a/app/assets/javascripts/admin/components/watched-word-form.js.es6 b/app/assets/javascripts/admin/components/watched-word-form.js.es6 index b56f2c423cc..919f6de9ef1 100644 --- a/app/assets/javascripts/admin/components/watched-word-form.js.es6 +++ b/app/assets/javascripts/admin/components/watched-word-form.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import WatchedWord from "admin/models/watched-word"; import { default as computed, @@ -5,7 +6,7 @@ import { observes } from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["watched-word-form"], formSubmitted: false, actionKey: null, diff --git a/app/assets/javascripts/admin/components/watched-word-uploader.js.es6 b/app/assets/javascripts/admin/components/watched-word-uploader.js.es6 index b1706337f28..b38d8c26068 100644 --- a/app/assets/javascripts/admin/components/watched-word-uploader.js.es6 +++ b/app/assets/javascripts/admin/components/watched-word-uploader.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; import UploadMixin from "discourse/mixins/upload"; -export default Ember.Component.extend(UploadMixin, { +export default Component.extend(UploadMixin, { type: "txt", classNames: "watched-words-uploader", uploadUrl: "/admin/logs/watched_words/upload", diff --git a/app/assets/javascripts/discourse/components/about-page-users.js.es6 b/app/assets/javascripts/discourse/components/about-page-users.js.es6 index e2d65135dbf..7d4ff773ba2 100644 --- a/app/assets/javascripts/discourse/components/about-page-users.js.es6 +++ b/app/assets/javascripts/discourse/components/about-page-users.js.es6 @@ -1,9 +1,10 @@ +import Component from "@ember/component"; import { userPath } from "discourse/lib/url"; import { formatUsername, escapeExpression } from "discourse/lib/utilities"; import { normalize } from "discourse/components/user-info"; import { renderAvatar } from "discourse/helpers/user-avatar"; -export default Ember.Component.extend({ +export default Component.extend({ usersTemplates: Ember.computed("users.[]", function() { return (this.users || []).map(user => { let name = ""; diff --git a/app/assets/javascripts/discourse/components/activation-controls.js.es6 b/app/assets/javascripts/discourse/components/activation-controls.js.es6 index d7d7fe800ff..9b49ce72114 100644 --- a/app/assets/javascripts/discourse/components/activation-controls.js.es6 +++ b/app/assets/javascripts/discourse/components/activation-controls.js.es6 @@ -1,3 +1,4 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ classNames: "activation-controls" }); diff --git a/app/assets/javascripts/discourse/components/add-category-tag-classes.js.es6 b/app/assets/javascripts/discourse/components/add-category-tag-classes.js.es6 index d5399dcfe76..209367e8298 100644 --- a/app/assets/javascripts/discourse/components/add-category-tag-classes.js.es6 +++ b/app/assets/javascripts/discourse/components/add-category-tag-classes.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import { observes } from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ _slug: null, didInsertElement() { diff --git a/app/assets/javascripts/discourse/components/avatar-uploader.js.es6 b/app/assets/javascripts/discourse/components/avatar-uploader.js.es6 index 7349ce5a6b0..3350ddff312 100644 --- a/app/assets/javascripts/discourse/components/avatar-uploader.js.es6 +++ b/app/assets/javascripts/discourse/components/avatar-uploader.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; import UploadMixin from "discourse/mixins/upload"; -export default Ember.Component.extend(UploadMixin, { +export default Component.extend(UploadMixin, { type: "avatar", tagName: "span", imageIsNotASquare: false, diff --git a/app/assets/javascripts/discourse/components/backup-codes.js.es6 b/app/assets/javascripts/discourse/components/backup-codes.js.es6 index 51be5edccdc..5e80cc3e3bb 100644 --- a/app/assets/javascripts/discourse/components/backup-codes.js.es6 +++ b/app/assets/javascripts/discourse/components/backup-codes.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; // https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding @@ -12,7 +13,7 @@ function b64EncodeUnicode(str) { ); } -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["backup-codes"], backupCodes: null, diff --git a/app/assets/javascripts/discourse/components/backup-uploader.js.es6 b/app/assets/javascripts/discourse/components/backup-uploader.js.es6 index 1fe3565aa3a..1e8a7059d6a 100644 --- a/app/assets/javascripts/discourse/components/backup-uploader.js.es6 +++ b/app/assets/javascripts/discourse/components/backup-uploader.js.es6 @@ -1,9 +1,10 @@ +import Component from "@ember/component"; import { ajax } from "discourse/lib/ajax"; import { popupAjaxError } from "discourse/lib/ajax-error"; import computed from "ember-addons/ember-computed-decorators"; import UploadMixin from "discourse/mixins/upload"; -export default Ember.Component.extend(UploadMixin, { +export default Component.extend(UploadMixin, { tagName: "span", @computed("uploading", "uploadProgress") diff --git a/app/assets/javascripts/discourse/components/badge-button.js.es6 b/app/assets/javascripts/discourse/components/badge-button.js.es6 index d0c2708b662..1861788a02d 100644 --- a/app/assets/javascripts/discourse/components/badge-button.js.es6 +++ b/app/assets/javascripts/discourse/components/badge-button.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "span", classNameBindings: [ ":user-badge", diff --git a/app/assets/javascripts/discourse/components/badge-card.js.es6 b/app/assets/javascripts/discourse/components/badge-card.js.es6 index c4312447e93..f9380b11eb7 100644 --- a/app/assets/javascripts/discourse/components/badge-card.js.es6 +++ b/app/assets/javascripts/discourse/components/badge-card.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; import { sanitize, emojiUnescape } from "discourse/lib/text"; -export default Ember.Component.extend({ +export default Component.extend({ size: "medium", classNameBindings: [":badge-card", "size", "badge.slug"], diff --git a/app/assets/javascripts/discourse/components/badge-selector.js.es6 b/app/assets/javascripts/discourse/components/badge-selector.js.es6 index 53ed8e385aa..94c08c95cad 100644 --- a/app/assets/javascripts/discourse/components/badge-selector.js.es6 +++ b/app/assets/javascripts/discourse/components/badge-selector.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import { on, observes, @@ -6,7 +7,7 @@ import { import { findRawTemplate } from "discourse/lib/raw-templates"; const { makeArray } = Ember; -export default Ember.Component.extend({ +export default Component.extend({ @computed("placeholderKey") placeholder(placeholderKey) { return placeholderKey ? I18n.t(placeholderKey) : ""; diff --git a/app/assets/javascripts/discourse/components/badge-title.js.es6 b/app/assets/javascripts/discourse/components/badge-title.js.es6 index 10a7088bd11..41b82f73e77 100644 --- a/app/assets/javascripts/discourse/components/badge-title.js.es6 +++ b/app/assets/javascripts/discourse/components/badge-title.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import { ajax } from "discourse/lib/ajax"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["badge-title"], saved: false, diff --git a/app/assets/javascripts/discourse/components/basic-topic-list.js.es6 b/app/assets/javascripts/discourse/components/basic-topic-list.js.es6 index e8af6acc94f..f4bc6eb49c9 100644 --- a/app/assets/javascripts/discourse/components/basic-topic-list.js.es6 +++ b/app/assets/javascripts/discourse/components/basic-topic-list.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ loadingMore: Ember.computed.alias("topicList.loadingMore"), loading: Ember.computed.not("loaded"), diff --git a/app/assets/javascripts/discourse/components/bread-crumbs.js.es6 b/app/assets/javascripts/discourse/components/bread-crumbs.js.es6 index cd8157c8286..21992f108bd 100644 --- a/app/assets/javascripts/discourse/components/bread-crumbs.js.es6 +++ b/app/assets/javascripts/discourse/components/bread-crumbs.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import { default as computed } from "ember-addons/ember-computed-decorators"; // A breadcrumb including category drop downs -export default Ember.Component.extend({ +export default Component.extend({ classNameBindings: ["hidden:hidden", ":category-breadcrumb"], tagName: "ol", diff --git a/app/assets/javascripts/discourse/components/bulk-select-button.js.es6 b/app/assets/javascripts/discourse/components/bulk-select-button.js.es6 index 04d125b8035..1070402ca02 100644 --- a/app/assets/javascripts/discourse/components/bulk-select-button.js.es6 +++ b/app/assets/javascripts/discourse/components/bulk-select-button.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import showModal from "discourse/lib/show-modal"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["bulk-select-container"], actions: { diff --git a/app/assets/javascripts/discourse/components/categories-and-latest-topics.js.es6 b/app/assets/javascripts/discourse/components/categories-and-latest-topics.js.es6 index 8da2cf8495d..4f2b2c2497f 100644 --- a/app/assets/javascripts/discourse/components/categories-and-latest-topics.js.es6 +++ b/app/assets/javascripts/discourse/components/categories-and-latest-topics.js.es6 @@ -1,3 +1,4 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ classNames: ["categories-and-latest"] }); diff --git a/app/assets/javascripts/discourse/components/categories-and-top-topics.js.es6 b/app/assets/javascripts/discourse/components/categories-and-top-topics.js.es6 index 4f1c8886929..7d9caf45c22 100644 --- a/app/assets/javascripts/discourse/components/categories-and-top-topics.js.es6 +++ b/app/assets/javascripts/discourse/components/categories-and-top-topics.js.es6 @@ -1,3 +1,4 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ classNames: ["categories-and-top"] }); diff --git a/app/assets/javascripts/discourse/components/categories-boxes-topic.js.es6 b/app/assets/javascripts/discourse/components/categories-boxes-topic.js.es6 index c061cb55e95..b5536923ecc 100644 --- a/app/assets/javascripts/discourse/components/categories-boxes-topic.js.es6 +++ b/app/assets/javascripts/discourse/components/categories-boxes-topic.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "li", @computed("topic.pinned", "topic.closed", "topic.archived") diff --git a/app/assets/javascripts/discourse/components/categories-boxes-with-topics.js.es6 b/app/assets/javascripts/discourse/components/categories-boxes-with-topics.js.es6 index ed9e4a87a79..b3144aeba07 100644 --- a/app/assets/javascripts/discourse/components/categories-boxes-with-topics.js.es6 +++ b/app/assets/javascripts/discourse/components/categories-boxes-with-topics.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "section", classNameBindings: [ ":category-boxes-with-topics", diff --git a/app/assets/javascripts/discourse/components/categories-boxes.js.es6 b/app/assets/javascripts/discourse/components/categories-boxes.js.es6 index f78bfbfcd78..aa7992b4442 100644 --- a/app/assets/javascripts/discourse/components/categories-boxes.js.es6 +++ b/app/assets/javascripts/discourse/components/categories-boxes.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; import DiscourseURL from "discourse/lib/url"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "section", classNameBindings: [ ":category-boxes", diff --git a/app/assets/javascripts/discourse/components/categories-only.js.es6 b/app/assets/javascripts/discourse/components/categories-only.js.es6 index 91ad923ffcc..89720fbbe80 100644 --- a/app/assets/javascripts/discourse/components/categories-only.js.es6 +++ b/app/assets/javascripts/discourse/components/categories-only.js.es6 @@ -1,3 +1,4 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ tagName: "" }); diff --git a/app/assets/javascripts/discourse/components/categories-topic-list.js.es6 b/app/assets/javascripts/discourse/components/categories-topic-list.js.es6 index 9b102dc46c7..ccc903e96e8 100644 --- a/app/assets/javascripts/discourse/components/categories-topic-list.js.es6 +++ b/app/assets/javascripts/discourse/components/categories-topic-list.js.es6 @@ -1,2 +1,3 @@ +import Component from "@ember/component"; // Exists so plugins can use it -export default Ember.Component.extend(); +export default Component.extend(); diff --git a/app/assets/javascripts/discourse/components/category-title-before.js.es6 b/app/assets/javascripts/discourse/components/category-title-before.js.es6 index 91ad923ffcc..89720fbbe80 100644 --- a/app/assets/javascripts/discourse/components/category-title-before.js.es6 +++ b/app/assets/javascripts/discourse/components/category-title-before.js.es6 @@ -1,3 +1,4 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ tagName: "" }); diff --git a/app/assets/javascripts/discourse/components/category-title-link.js.es6 b/app/assets/javascripts/discourse/components/category-title-link.js.es6 index 4a6fa5d604f..c6dacce317d 100644 --- a/app/assets/javascripts/discourse/components/category-title-link.js.es6 +++ b/app/assets/javascripts/discourse/components/category-title-link.js.es6 @@ -1,3 +1,4 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ tagName: "h3" }); diff --git a/app/assets/javascripts/discourse/components/category-unread.js.es6 b/app/assets/javascripts/discourse/components/category-unread.js.es6 index 1d3bdc0353e..5bf9ae8df8c 100644 --- a/app/assets/javascripts/discourse/components/category-unread.js.es6 +++ b/app/assets/javascripts/discourse/components/category-unread.js.es6 @@ -1,3 +1,4 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ tagName: "span" }); diff --git a/app/assets/javascripts/discourse/components/cdn-img.js.es6 b/app/assets/javascripts/discourse/components/cdn-img.js.es6 index f10b1d9e1eb..5b261e5640a 100644 --- a/app/assets/javascripts/discourse/components/cdn-img.js.es6 +++ b/app/assets/javascripts/discourse/components/cdn-img.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "", @computed("src") diff --git a/app/assets/javascripts/discourse/components/choose-message.js.es6 b/app/assets/javascripts/discourse/components/choose-message.js.es6 index 581cc361d58..b4518c2c4f6 100644 --- a/app/assets/javascripts/discourse/components/choose-message.js.es6 +++ b/app/assets/javascripts/discourse/components/choose-message.js.es6 @@ -1,8 +1,9 @@ +import Component from "@ember/component"; import debounce from "discourse/lib/debounce"; import { searchForTerm } from "discourse/lib/search"; import { observes } from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ loading: null, noResults: null, messages: null, diff --git a/app/assets/javascripts/discourse/components/choose-topic.js.es6 b/app/assets/javascripts/discourse/components/choose-topic.js.es6 index 4ee45b5eee4..df0d3b1c476 100644 --- a/app/assets/javascripts/discourse/components/choose-topic.js.es6 +++ b/app/assets/javascripts/discourse/components/choose-topic.js.es6 @@ -1,8 +1,9 @@ +import Component from "@ember/component"; import debounce from "discourse/lib/debounce"; import { searchForTerm } from "discourse/lib/search"; import { observes } from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ loading: null, noResults: null, topics: null, diff --git a/app/assets/javascripts/discourse/components/color-picker-choice.js.es6 b/app/assets/javascripts/discourse/components/color-picker-choice.js.es6 index 8ea284b8f3b..a1933193d2f 100644 --- a/app/assets/javascripts/discourse/components/color-picker-choice.js.es6 +++ b/app/assets/javascripts/discourse/components/color-picker-choice.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "button", attributeBindings: ["style", "title"], classNameBindings: [":colorpicker", "isUsed:used-color:unused-color"], diff --git a/app/assets/javascripts/discourse/components/color-picker.js.es6 b/app/assets/javascripts/discourse/components/color-picker.js.es6 index 8fc84886c7f..c50fe34d6c3 100644 --- a/app/assets/javascripts/discourse/components/color-picker.js.es6 +++ b/app/assets/javascripts/discourse/components/color-picker.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ classNames: "colors-container", actions: { diff --git a/app/assets/javascripts/discourse/components/composer-action-title.js.es6 b/app/assets/javascripts/discourse/components/composer-action-title.js.es6 index c4e014c5f71..6b86bb39c6c 100644 --- a/app/assets/javascripts/discourse/components/composer-action-title.js.es6 +++ b/app/assets/javascripts/discourse/components/composer-action-title.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import { default as computed } from "ember-addons/ember-computed-decorators"; import { PRIVATE_MESSAGE, @@ -16,7 +17,7 @@ const TITLES = { [EDIT_SHARED_DRAFT]: "composer.edit_shared_draft" }; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["composer-action-title"], options: Ember.computed.alias("model.replyOptions"), action: Ember.computed.alias("model.action"), diff --git a/app/assets/javascripts/discourse/components/composer-body.js.es6 b/app/assets/javascripts/discourse/components/composer-body.js.es6 index 301e22452ff..7fea43389d2 100644 --- a/app/assets/javascripts/discourse/components/composer-body.js.es6 +++ b/app/assets/javascripts/discourse/components/composer-body.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import { default as computed, observes @@ -20,7 +21,7 @@ function mouseYPos(e) { return e.clientY || (e.touches && e.touches[0] && e.touches[0].clientY); } -export default Ember.Component.extend(KeyEnterEscape, { +export default Component.extend(KeyEnterEscape, { elementId: "reply-control", classNameBindings: [ diff --git a/app/assets/javascripts/discourse/components/composer-editor.js.es6 b/app/assets/javascripts/discourse/components/composer-editor.js.es6 index c48098bce92..0709dc9c5f0 100644 --- a/app/assets/javascripts/discourse/components/composer-editor.js.es6 +++ b/app/assets/javascripts/discourse/components/composer-editor.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import userSearch from "discourse/lib/user-search"; import { default as computed, @@ -53,7 +54,7 @@ export function addComposerUploadHandler(extensions, method) { }); } -export default Ember.Component.extend({ +export default Component.extend({ classNameBindings: ["showToolbar:toolbar-visible", ":wmd-controls"], uploadProgress: 0, diff --git a/app/assets/javascripts/discourse/components/composer-message.js.es6 b/app/assets/javascripts/discourse/components/composer-message.js.es6 index 4cdda3fc493..6cb98b80180 100644 --- a/app/assets/javascripts/discourse/components/composer-message.js.es6 +++ b/app/assets/javascripts/discourse/components/composer-message.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; import { getOwner } from "discourse-common/lib/get-owner"; -export default Ember.Component.extend({ +export default Component.extend({ classNameBindings: [":composer-popup", ":hidden", "message.extraClass"], @computed("message.templateName") diff --git a/app/assets/javascripts/discourse/components/composer-messages.js.es6 b/app/assets/javascripts/discourse/components/composer-messages.js.es6 index 6a01d339502..659839bf65a 100644 --- a/app/assets/javascripts/discourse/components/composer-messages.js.es6 +++ b/app/assets/javascripts/discourse/components/composer-messages.js.es6 @@ -1,8 +1,9 @@ +import Component from "@ember/component"; import LinkLookup from "discourse/lib/link-lookup"; let _messagesCache = {}; -export default Ember.Component.extend({ +export default Component.extend({ classNameBindings: [":composer-popup-container", "hidden"], checkedMessages: false, messages: null, diff --git a/app/assets/javascripts/discourse/components/composer-title.js.es6 b/app/assets/javascripts/discourse/components/composer-title.js.es6 index 5302ab85f45..afc9a8ca652 100644 --- a/app/assets/javascripts/discourse/components/composer-title.js.es6 +++ b/app/assets/javascripts/discourse/components/composer-title.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import { default as computed, observes @@ -7,7 +8,7 @@ import { load, lookupCache } from "pretty-text/oneboxer"; import { ajax } from "discourse/lib/ajax"; import afterTransition from "discourse/lib/after-transition"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["title-input"], watchForLink: Ember.computed.alias("composer.canEditTopicFeaturedLink"), diff --git a/app/assets/javascripts/discourse/components/composer-toggles.js.es6 b/app/assets/javascripts/discourse/components/composer-toggles.js.es6 index f618e1ca61d..9f0547d6415 100644 --- a/app/assets/javascripts/discourse/components/composer-toggles.js.es6 +++ b/app/assets/javascripts/discourse/components/composer-toggles.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "", @computed("composeState") diff --git a/app/assets/javascripts/discourse/components/composer-user-selector.js.es6 b/app/assets/javascripts/discourse/components/composer-user-selector.js.es6 index 04a1ba7dc56..694db1cfd37 100644 --- a/app/assets/javascripts/discourse/components/composer-user-selector.js.es6 +++ b/app/assets/javascripts/discourse/components/composer-user-selector.js.es6 @@ -1,9 +1,10 @@ +import Component from "@ember/component"; import { default as computed, observes } from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ showSelector: true, shouldHide: false, defaultUsernameCount: 0, diff --git a/app/assets/javascripts/discourse/components/conditional-loading-section.js.es6 b/app/assets/javascripts/discourse/components/conditional-loading-section.js.es6 index dd8f321635c..fb6f3105187 100644 --- a/app/assets/javascripts/discourse/components/conditional-loading-section.js.es6 +++ b/app/assets/javascripts/discourse/components/conditional-loading-section.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ classNames: ["conditional-loading-section"], classNameBindings: ["isLoading"], diff --git a/app/assets/javascripts/discourse/components/conditional-loading-spinner.js.es6 b/app/assets/javascripts/discourse/components/conditional-loading-spinner.js.es6 index e0353315fe4..1c6e37ec030 100644 --- a/app/assets/javascripts/discourse/components/conditional-loading-spinner.js.es6 +++ b/app/assets/javascripts/discourse/components/conditional-loading-spinner.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ classNameBindings: [ ":loading-container", "containerClass", diff --git a/app/assets/javascripts/discourse/components/connector-container.js.es6 b/app/assets/javascripts/discourse/components/connector-container.js.es6 index 905ec1058ee..6c296745780 100644 --- a/app/assets/javascripts/discourse/components/connector-container.js.es6 +++ b/app/assets/javascripts/discourse/components/connector-container.js.es6 @@ -1 +1,2 @@ -export default Ember.Component.extend(); +import Component from "@ember/component"; +export default Component.extend(); diff --git a/app/assets/javascripts/discourse/components/cook-text.js.es6 b/app/assets/javascripts/discourse/components/cook-text.js.es6 index 3e345df0540..e9e19b338fc 100644 --- a/app/assets/javascripts/discourse/components/cook-text.js.es6 +++ b/app/assets/javascripts/discourse/components/cook-text.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import { cookAsync } from "discourse/lib/text"; import { ajax } from "discourse/lib/ajax"; -const CookText = Ember.Component.extend({ +const CookText = Component.extend({ tagName: "", cooked: null, diff --git a/app/assets/javascripts/discourse/components/count-i18n.js.es6 b/app/assets/javascripts/discourse/components/count-i18n.js.es6 index 5ee48fb5ab1..9bdb715dc5d 100644 --- a/app/assets/javascripts/discourse/components/count-i18n.js.es6 +++ b/app/assets/javascripts/discourse/components/count-i18n.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import { bufferedRender } from "discourse-common/lib/buffered-render"; -export default Ember.Component.extend( +export default Component.extend( bufferedRender({ tagName: "span", rerenderTriggers: ["count", "suffix"], diff --git a/app/assets/javascripts/discourse/components/create-account.js.es6 b/app/assets/javascripts/discourse/components/create-account.js.es6 index 9d91b58b353..e382244dc9e 100644 --- a/app/assets/javascripts/discourse/components/create-account.js.es6 +++ b/app/assets/javascripts/discourse/components/create-account.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ classNames: ["create-account"], didInsertElement() { diff --git a/app/assets/javascripts/discourse/components/create-topic-button.js.es6 b/app/assets/javascripts/discourse/components/create-topic-button.js.es6 index a03702e98e7..b2ab306a121 100644 --- a/app/assets/javascripts/discourse/components/create-topic-button.js.es6 +++ b/app/assets/javascripts/discourse/components/create-topic-button.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ tagName: "", label: "topic.create" }); diff --git a/app/assets/javascripts/discourse/components/create-topics-notice.js.es6 b/app/assets/javascripts/discourse/components/create-topics-notice.js.es6 index 1e7658cfd59..a5a20ac69a3 100644 --- a/app/assets/javascripts/discourse/components/create-topics-notice.js.es6 +++ b/app/assets/javascripts/discourse/components/create-topics-notice.js.es6 @@ -1,8 +1,9 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; import { observes } from "ember-addons/ember-computed-decorators"; import LivePostCounts from "discourse/models/live-post-counts"; -export default Ember.Component.extend({ +export default Component.extend({ classNameBindings: ["hidden:hidden", ":create-topics-notice"], enabled: false, diff --git a/app/assets/javascripts/discourse/components/csv-uploader.js.es6 b/app/assets/javascripts/discourse/components/csv-uploader.js.es6 index 8178fdc09e2..7bd621d8ed8 100644 --- a/app/assets/javascripts/discourse/components/csv-uploader.js.es6 +++ b/app/assets/javascripts/discourse/components/csv-uploader.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; import UploadMixin from "discourse/mixins/upload"; -export default Ember.Component.extend(UploadMixin, { +export default Component.extend(UploadMixin, { type: "csv", tagName: "span", uploadUrl: "/invites/upload_csv", diff --git a/app/assets/javascripts/discourse/components/custom-html.js.es6 b/app/assets/javascripts/discourse/components/custom-html.js.es6 index b30649deb58..8dd3414e237 100644 --- a/app/assets/javascripts/discourse/components/custom-html.js.es6 +++ b/app/assets/javascripts/discourse/components/custom-html.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import { getCustomHTML } from "discourse/helpers/custom-html"; import { getOwner } from "discourse-common/lib/get-owner"; -export default Ember.Component.extend({ +export default Component.extend({ triggerAppEvent: null, init() { diff --git a/app/assets/javascripts/discourse/components/d-button.js.es6 b/app/assets/javascripts/discourse/components/d-button.js.es6 index 950ddcff304..b8ca7343cd5 100644 --- a/app/assets/javascripts/discourse/components/d-button.js.es6 +++ b/app/assets/javascripts/discourse/components/d-button.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import { default as computed } from "ember-addons/ember-computed-decorators"; import DiscourseURL from "discourse/lib/url"; -export default Ember.Component.extend({ +export default Component.extend({ // subclasses need this layoutName: "components/d-button", diff --git a/app/assets/javascripts/discourse/components/d-editor.js.es6 b/app/assets/javascripts/discourse/components/d-editor.js.es6 index dc2e9fe00ab..1657552555a 100644 --- a/app/assets/javascripts/discourse/components/d-editor.js.es6 +++ b/app/assets/javascripts/discourse/components/d-editor.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; /*global Mousetrap:true */ import { default as computed, @@ -211,7 +212,7 @@ export function onToolbarCreate(func) { addToolbarCallback(func); } -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["d-editor"], ready: false, lastSel: null, diff --git a/app/assets/javascripts/discourse/components/d-modal-body.js.es6 b/app/assets/javascripts/discourse/components/d-modal-body.js.es6 index 8e8f01b0bc8..33b444d05b3 100644 --- a/app/assets/javascripts/discourse/components/d-modal-body.js.es6 +++ b/app/assets/javascripts/discourse/components/d-modal-body.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ classNames: ["modal-body"], fixed: false, dismissable: true, diff --git a/app/assets/javascripts/discourse/components/d-modal-cancel.js.es6 b/app/assets/javascripts/discourse/components/d-modal-cancel.js.es6 index 91ad923ffcc..89720fbbe80 100644 --- a/app/assets/javascripts/discourse/components/d-modal-cancel.js.es6 +++ b/app/assets/javascripts/discourse/components/d-modal-cancel.js.es6 @@ -1,3 +1,4 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ tagName: "" }); diff --git a/app/assets/javascripts/discourse/components/d-navigation.js.es6 b/app/assets/javascripts/discourse/components/d-navigation.js.es6 index 26870bcd028..f7358ec15b1 100644 --- a/app/assets/javascripts/discourse/components/d-navigation.js.es6 +++ b/app/assets/javascripts/discourse/components/d-navigation.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ router: Ember.inject.service(), persistedQueryParams: null, diff --git a/app/assets/javascripts/discourse/components/d-section.js.es6 b/app/assets/javascripts/discourse/components/d-section.js.es6 index 1f1d07a676a..ef1da4b0a01 100644 --- a/app/assets/javascripts/discourse/components/d-section.js.es6 +++ b/app/assets/javascripts/discourse/components/d-section.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import { scrollTop } from "discourse/mixins/scroll-top"; // Can add a body class from within a component, also will scroll to the top automatically. -export default Ember.Component.extend({ +export default Component.extend({ tagName: "section", didInsertElement() { diff --git a/app/assets/javascripts/discourse/components/date-input.js.es6 b/app/assets/javascripts/discourse/components/date-input.js.es6 index d29962c02c4..0161fb8aa21 100644 --- a/app/assets/javascripts/discourse/components/date-input.js.es6 +++ b/app/assets/javascripts/discourse/components/date-input.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; /* global Pikaday:true */ import loadScript from "discourse/lib/load-script"; import { @@ -5,7 +6,7 @@ import { on } from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["d-date-input"], date: null, _picker: null, diff --git a/app/assets/javascripts/discourse/components/date-picker.js.es6 b/app/assets/javascripts/discourse/components/date-picker.js.es6 index 2c7d0731697..7fc28a50ef2 100644 --- a/app/assets/javascripts/discourse/components/date-picker.js.es6 +++ b/app/assets/javascripts/discourse/components/date-picker.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; /* global Pikaday:true */ import loadScript from "discourse/lib/load-script"; import { @@ -7,7 +8,7 @@ import { const DATE_FORMAT = "YYYY-MM-DD"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["date-picker-wrapper"], _picker: null, value: null, diff --git a/app/assets/javascripts/discourse/components/date-time-input-range.js.es6 b/app/assets/javascripts/discourse/components/date-time-input-range.js.es6 index 3754be93cd2..b86b2a3a12c 100644 --- a/app/assets/javascripts/discourse/components/date-time-input-range.js.es6 +++ b/app/assets/javascripts/discourse/components/date-time-input-range.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ classNames: ["d-date-time-input-range"], from: null, diff --git a/app/assets/javascripts/discourse/components/date-time-input.js.es6 b/app/assets/javascripts/discourse/components/date-time-input.js.es6 index ce173e3d422..41b41a8d328 100644 --- a/app/assets/javascripts/discourse/components/date-time-input.js.es6 +++ b/app/assets/javascripts/discourse/components/date-time-input.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ classNames: ["d-date-time-input"], date: null, showTime: true, diff --git a/app/assets/javascripts/discourse/components/desktop-notification-config.js.es6 b/app/assets/javascripts/discourse/components/desktop-notification-config.js.es6 index 612d9d9f89c..0df39dce255 100644 --- a/app/assets/javascripts/discourse/components/desktop-notification-config.js.es6 +++ b/app/assets/javascripts/discourse/components/desktop-notification-config.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; import KeyValueStore from "discourse/lib/key-value-store"; import { @@ -14,7 +15,7 @@ import { const keyValueStore = new KeyValueStore(context); -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["controls"], @computed("isNotSupported") diff --git a/app/assets/javascripts/discourse/components/directory-item.js.es6 b/app/assets/javascripts/discourse/components/directory-item.js.es6 index 79902869c86..05c085c2e98 100644 --- a/app/assets/javascripts/discourse/components/directory-item.js.es6 +++ b/app/assets/javascripts/discourse/components/directory-item.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import { propertyEqual } from "discourse/lib/computed"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "tr", classNameBindings: ["me"], me: propertyEqual("item.user.id", "currentUser.id") diff --git a/app/assets/javascripts/discourse/components/directory-toggle.js.es6 b/app/assets/javascripts/discourse/components/directory-toggle.js.es6 index 6765568078f..d45e9ce9e7d 100644 --- a/app/assets/javascripts/discourse/components/directory-toggle.js.es6 +++ b/app/assets/javascripts/discourse/components/directory-toggle.js.es6 @@ -1,8 +1,9 @@ +import Component from "@ember/component"; import { iconHTML } from "discourse-common/lib/icon-library"; import { bufferedRender } from "discourse-common/lib/buffered-render"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend( +export default Component.extend( bufferedRender({ tagName: "th", classNames: ["sortable"], diff --git a/app/assets/javascripts/discourse/components/disabled-icon.js.es6 b/app/assets/javascripts/discourse/components/disabled-icon.js.es6 index e54647c1550..433c5f4d72e 100644 --- a/app/assets/javascripts/discourse/components/disabled-icon.js.es6 +++ b/app/assets/javascripts/discourse/components/disabled-icon.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ tagName: "span", classNameBindings: [":fa-stack"] }); diff --git a/app/assets/javascripts/discourse/components/discourse-banner.js.es6 b/app/assets/javascripts/discourse/components/discourse-banner.js.es6 index 6a84f538ca1..6c8b18ea1e1 100644 --- a/app/assets/javascripts/discourse/components/discourse-banner.js.es6 +++ b/app/assets/javascripts/discourse/components/discourse-banner.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ @computed("user.dismissed_banner_key", "banner.key", "hide") visible(dismissedBannerKey, bannerKey, hide) { dismissedBannerKey = diff --git a/app/assets/javascripts/discourse/components/discourse-linked-text.js.es6 b/app/assets/javascripts/discourse/components/discourse-linked-text.js.es6 index 17398e4a21d..fe4e7fd9c8b 100644 --- a/app/assets/javascripts/discourse/components/discourse-linked-text.js.es6 +++ b/app/assets/javascripts/discourse/components/discourse-linked-text.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import { default as computed } from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "span", @computed("text") diff --git a/app/assets/javascripts/discourse/components/discourse-tag-bound.js.es6 b/app/assets/javascripts/discourse/components/discourse-tag-bound.js.es6 index 9f151dc1fe3..ea07e0d5fe8 100644 --- a/app/assets/javascripts/discourse/components/discourse-tag-bound.js.es6 +++ b/app/assets/javascripts/discourse/components/discourse-tag-bound.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "a", classNameBindings: [":discourse-tag", "style", "tagClass"], attributeBindings: ["href"], diff --git a/app/assets/javascripts/discourse/components/discourse-topic.js.es6 b/app/assets/javascripts/discourse/components/discourse-topic.js.es6 index 7e3011fb6ef..53ab8edbbe3 100644 --- a/app/assets/javascripts/discourse/components/discourse-topic.js.es6 +++ b/app/assets/javascripts/discourse/components/discourse-topic.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import DiscourseURL from "discourse/lib/url"; import AddArchetypeClass from "discourse/mixins/add-archetype-class"; import ClickTrack from "discourse/lib/click-track"; @@ -14,7 +15,7 @@ function highlight(postNumber) { $contents.on("animationend", () => $contents.removeClass("highlighted")); } -export default Ember.Component.extend( +export default Component.extend( AddArchetypeClass, Scrolling, MobileScrollDirection, diff --git a/app/assets/javascripts/discourse/components/discovery-categories.js.es6 b/app/assets/javascripts/discourse/components/discovery-categories.js.es6 index 97bbc330096..d5c70bbf9af 100644 --- a/app/assets/javascripts/discourse/components/discovery-categories.js.es6 +++ b/app/assets/javascripts/discourse/components/discovery-categories.js.es6 @@ -1,9 +1,10 @@ +import Component from "@ember/component"; import UrlRefresh from "discourse/mixins/url-refresh"; import { on } from "ember-addons/ember-computed-decorators"; const CATEGORIES_LIST_BODY_CLASS = "categories-list"; -export default Ember.Component.extend(UrlRefresh, { +export default Component.extend(UrlRefresh, { classNames: ["contents"], @on("didInsertElement") diff --git a/app/assets/javascripts/discourse/components/discovery-topics-list.js.es6 b/app/assets/javascripts/discourse/components/discovery-topics-list.js.es6 index 3a5f30e4f59..5f92bc7fb8b 100644 --- a/app/assets/javascripts/discourse/components/discovery-topics-list.js.es6 +++ b/app/assets/javascripts/discourse/components/discovery-topics-list.js.es6 @@ -1,8 +1,9 @@ +import Component from "@ember/component"; import { on, observes } from "ember-addons/ember-computed-decorators"; import LoadMore from "discourse/mixins/load-more"; import UrlRefresh from "discourse/mixins/url-refresh"; -const DiscoveryTopicsListComponent = Ember.Component.extend( +const DiscoveryTopicsListComponent = Component.extend( UrlRefresh, LoadMore, { diff --git a/app/assets/javascripts/discourse/components/edit-category-panel.js.es6 b/app/assets/javascripts/discourse/components/edit-category-panel.js.es6 index 6a45839cf74..bd2fe0661f9 100644 --- a/app/assets/javascripts/discourse/components/edit-category-panel.js.es6 +++ b/app/assets/javascripts/discourse/components/edit-category-panel.js.es6 @@ -1,4 +1,5 @@ -const EditCategoryPanel = Ember.Component.extend({}); +import Component from "@ember/component"; +const EditCategoryPanel = Component.extend({}); export default EditCategoryPanel; diff --git a/app/assets/javascripts/discourse/components/edit-category-tab.js.es6 b/app/assets/javascripts/discourse/components/edit-category-tab.js.es6 index 5f2f6b49129..15aae0ed284 100644 --- a/app/assets/javascripts/discourse/components/edit-category-tab.js.es6 +++ b/app/assets/javascripts/discourse/components/edit-category-tab.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import { propertyEqual } from "discourse/lib/computed"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "li", classNameBindings: ["active", "tabClassName"], diff --git a/app/assets/javascripts/discourse/components/edit-topic-timer-form.js.es6 b/app/assets/javascripts/discourse/components/edit-topic-timer-form.js.es6 index 1f65b8797d3..5d01c739e7e 100644 --- a/app/assets/javascripts/discourse/components/edit-topic-timer-form.js.es6 +++ b/app/assets/javascripts/discourse/components/edit-topic-timer-form.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import { default as computed, observes, @@ -13,7 +14,7 @@ import { BUMP_TYPE } from "discourse/controllers/edit-topic-timer"; -export default Ember.Component.extend({ +export default Component.extend({ selection: Ember.computed.alias("topicTimer.status_type"), autoOpen: Ember.computed.equal("selection", OPEN_STATUS_TYPE), autoClose: Ember.computed.equal("selection", CLOSE_STATUS_TYPE), diff --git a/app/assets/javascripts/discourse/components/emoji-picker.js.es6 b/app/assets/javascripts/discourse/components/emoji-picker.js.es6 index dfe6287c670..614db00529d 100644 --- a/app/assets/javascripts/discourse/components/emoji-picker.js.es6 +++ b/app/assets/javascripts/discourse/components/emoji-picker.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import { on, observes } from "ember-addons/ember-computed-decorators"; import { findRawTemplate } from "discourse/lib/raw-templates"; import { emojiUrlFor } from "discourse/lib/text"; @@ -15,7 +16,7 @@ const customEmojis = _.keys(extendedEmojiList()).map(code => { return { code, src: emojiUrlFor(code) }; }); -export default Ember.Component.extend({ +export default Component.extend({ automaticPositioning: true, emojiStore: Ember.inject.service("emoji-store"), diff --git a/app/assets/javascripts/discourse/components/emoji-uploader.js.es6 b/app/assets/javascripts/discourse/components/emoji-uploader.js.es6 index f3273d83226..d118b904c53 100644 --- a/app/assets/javascripts/discourse/components/emoji-uploader.js.es6 +++ b/app/assets/javascripts/discourse/components/emoji-uploader.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import { default as computed } from "ember-addons/ember-computed-decorators"; import UploadMixin from "discourse/mixins/upload"; -export default Ember.Component.extend(UploadMixin, { +export default Component.extend(UploadMixin, { type: "emoji", uploadUrl: "/admin/customize/emojis", hasName: Ember.computed.notEmpty("name"), diff --git a/app/assets/javascripts/discourse/components/expand-post.js.es6 b/app/assets/javascripts/discourse/components/expand-post.js.es6 index 4bd2b8d4a57..1302e76795e 100644 --- a/app/assets/javascripts/discourse/components/expand-post.js.es6 +++ b/app/assets/javascripts/discourse/components/expand-post.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import { ajax } from "discourse/lib/ajax"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "", expanded: null, _loading: false, diff --git a/app/assets/javascripts/discourse/components/featured-topic.js.es6 b/app/assets/javascripts/discourse/components/featured-topic.js.es6 index eb0bde08ad7..a975b893e9e 100644 --- a/app/assets/javascripts/discourse/components/featured-topic.js.es6 +++ b/app/assets/javascripts/discourse/components/featured-topic.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ classNameBindings: [":featured-topic"], click(e) { diff --git a/app/assets/javascripts/discourse/components/flag-action-type.js.es6 b/app/assets/javascripts/discourse/components/flag-action-type.js.es6 index 6a7a713d4e0..3434ec29547 100644 --- a/app/assets/javascripts/discourse/components/flag-action-type.js.es6 +++ b/app/assets/javascripts/discourse/components/flag-action-type.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import { MAX_MESSAGE_LENGTH } from "discourse/models/post-action-type"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["flag-action-type"], @computed("flag.name_key") diff --git a/app/assets/javascripts/discourse/components/flag-selection.js.es6 b/app/assets/javascripts/discourse/components/flag-selection.js.es6 index 8499713ce21..f039b306600 100644 --- a/app/assets/javascripts/discourse/components/flag-selection.js.es6 +++ b/app/assets/javascripts/discourse/components/flag-selection.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import { observes } from "ember-addons/ember-computed-decorators"; // Mostly hacks because `flag.hbs` didn't use `radio-button` -export default Ember.Component.extend({ +export default Component.extend({ _selectRadio() { this.element.querySelector("input[type='radio']").checked = false; diff --git a/app/assets/javascripts/discourse/components/flat-button.js.es6 b/app/assets/javascripts/discourse/components/flat-button.js.es6 index bcac9cc01fe..1348836907a 100644 --- a/app/assets/javascripts/discourse/components/flat-button.js.es6 +++ b/app/assets/javascripts/discourse/components/flat-button.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import { default as computed } from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "button", classNames: ["btn-flat"], attributeBindings: ["disabled", "translatedTitle:title"], diff --git a/app/assets/javascripts/discourse/components/footer-message.js.es6 b/app/assets/javascripts/discourse/components/footer-message.js.es6 index 22263eca316..e829a884c5a 100644 --- a/app/assets/javascripts/discourse/components/footer-message.js.es6 +++ b/app/assets/javascripts/discourse/components/footer-message.js.es6 @@ -1,3 +1,4 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ classNames: ["footer-message"] }); diff --git a/app/assets/javascripts/discourse/components/future-date-input.js.es6 b/app/assets/javascripts/discourse/components/future-date-input.js.es6 index 9386c1b3f7e..903f0886f08 100644 --- a/app/assets/javascripts/discourse/components/future-date-input.js.es6 +++ b/app/assets/javascripts/discourse/components/future-date-input.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import { default as computed, observes @@ -5,7 +6,7 @@ import { import { FORMAT } from "select-kit/components/future-date-input-selector"; import { PUBLISH_TO_CATEGORY_STATUS_TYPE } from "discourse/controllers/edit-topic-timer"; -export default Ember.Component.extend({ +export default Component.extend({ selection: null, date: null, time: null, diff --git a/app/assets/javascripts/discourse/components/generated-invite-link.js.es6 b/app/assets/javascripts/discourse/components/generated-invite-link.js.es6 index 74426a45b6b..8b475cbbdb4 100644 --- a/app/assets/javascripts/discourse/components/generated-invite-link.js.es6 +++ b/app/assets/javascripts/discourse/components/generated-invite-link.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ didInsertElement() { this._super(...arguments); $(this.element.querySelector("input")) diff --git a/app/assets/javascripts/discourse/components/global-notice.js.es6 b/app/assets/javascripts/discourse/components/global-notice.js.es6 index 3d8c46679b7..5bacd98013e 100644 --- a/app/assets/javascripts/discourse/components/global-notice.js.es6 +++ b/app/assets/javascripts/discourse/components/global-notice.js.es6 @@ -1,9 +1,10 @@ +import Component from "@ember/component"; import { on } from "ember-addons/ember-computed-decorators"; import { iconHTML } from "discourse-common/lib/icon-library"; import LogsNotice from "discourse/services/logs-notice"; import { bufferedRender } from "discourse-common/lib/buffered-render"; -export default Ember.Component.extend( +export default Component.extend( bufferedRender({ rerenderTriggers: ["site.isReadOnly", "siteSettings.disable_emails"], diff --git a/app/assets/javascripts/discourse/components/google-search.js.es6 b/app/assets/javascripts/discourse/components/google-search.js.es6 index e99e862f8ed..8ab1969b624 100644 --- a/app/assets/javascripts/discourse/components/google-search.js.es6 +++ b/app/assets/javascripts/discourse/components/google-search.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["google-search-form"], classNameBindings: ["hidden:hidden"], diff --git a/app/assets/javascripts/discourse/components/group-activity-filter.js.es6 b/app/assets/javascripts/discourse/components/group-activity-filter.js.es6 index 145b770e515..790c675e499 100644 --- a/app/assets/javascripts/discourse/components/group-activity-filter.js.es6 +++ b/app/assets/javascripts/discourse/components/group-activity-filter.js.es6 @@ -1,3 +1,4 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ tagName: "li" }); diff --git a/app/assets/javascripts/discourse/components/group-card-contents.js.es6 b/app/assets/javascripts/discourse/components/group-card-contents.js.es6 index 2c3df56b1ff..37e25cfb1c4 100644 --- a/app/assets/javascripts/discourse/components/group-card-contents.js.es6 +++ b/app/assets/javascripts/discourse/components/group-card-contents.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import { setting } from "discourse/lib/computed"; import { default as computed } from "ember-addons/ember-computed-decorators"; import CardContentsBase from "discourse/mixins/card-contents-base"; @@ -6,7 +7,7 @@ import { groupPath } from "discourse/lib/url"; const maxMembersToDisplay = 10; -export default Ember.Component.extend(CardContentsBase, CleansUp, { +export default Component.extend(CardContentsBase, CleansUp, { elementId: "group-card", triggeringLinkClass: "mention-group", classNames: ["no-bg"], diff --git a/app/assets/javascripts/discourse/components/group-flair-inputs.js.es6 b/app/assets/javascripts/discourse/components/group-flair-inputs.js.es6 index f16d48827e1..a80512b93d7 100644 --- a/app/assets/javascripts/discourse/components/group-flair-inputs.js.es6 +++ b/app/assets/javascripts/discourse/components/group-flair-inputs.js.es6 @@ -1,10 +1,11 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; import { observes } from "ember-addons/ember-computed-decorators"; import { escapeExpression } from "discourse/lib/utilities"; import { convertIconClass } from "discourse-common/lib/icon-library"; import { ajax } from "discourse/lib/ajax"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["group-flair-inputs"], @computed diff --git a/app/assets/javascripts/discourse/components/group-index-toggle.js.es6 b/app/assets/javascripts/discourse/components/group-index-toggle.js.es6 index 8a35118a891..247b7e1829f 100644 --- a/app/assets/javascripts/discourse/components/group-index-toggle.js.es6 +++ b/app/assets/javascripts/discourse/components/group-index-toggle.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import { iconHTML } from "discourse-common/lib/icon-library"; import { bufferedRender } from "discourse-common/lib/buffered-render"; -export default Ember.Component.extend( +export default Component.extend( bufferedRender({ tagName: "th", classNames: ["sortable"], diff --git a/app/assets/javascripts/discourse/components/group-manage-logs-filter.js.es6 b/app/assets/javascripts/discourse/components/group-manage-logs-filter.js.es6 index 0944c3ddf18..a6712bf4987 100644 --- a/app/assets/javascripts/discourse/components/group-manage-logs-filter.js.es6 +++ b/app/assets/javascripts/discourse/components/group-manage-logs-filter.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "", @computed("type") diff --git a/app/assets/javascripts/discourse/components/group-manage-logs-row.js.es6 b/app/assets/javascripts/discourse/components/group-manage-logs-row.js.es6 index b7765f96209..acba43f2b74 100644 --- a/app/assets/javascripts/discourse/components/group-manage-logs-row.js.es6 +++ b/app/assets/javascripts/discourse/components/group-manage-logs-row.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ tagName: "", expandDetails: false, diff --git a/app/assets/javascripts/discourse/components/group-manage-save-button.js.es6 b/app/assets/javascripts/discourse/components/group-manage-save-button.js.es6 index 1487151fde7..726bfede36b 100644 --- a/app/assets/javascripts/discourse/components/group-manage-save-button.js.es6 +++ b/app/assets/javascripts/discourse/components/group-manage-save-button.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import { popupAjaxError } from "discourse/lib/ajax-error"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ saving: null, @computed("saving") diff --git a/app/assets/javascripts/discourse/components/group-member.js.es6 b/app/assets/javascripts/discourse/components/group-member.js.es6 index be68373fa7d..1c511cab158 100644 --- a/app/assets/javascripts/discourse/components/group-member.js.es6 +++ b/app/assets/javascripts/discourse/components/group-member.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ classNames: ["item"], actions: { diff --git a/app/assets/javascripts/discourse/components/group-members-input.js.es6 b/app/assets/javascripts/discourse/components/group-members-input.js.es6 index 8ef63b5a505..00c0bb62015 100644 --- a/app/assets/javascripts/discourse/components/group-members-input.js.es6 +++ b/app/assets/javascripts/discourse/components/group-members-input.js.es6 @@ -1,8 +1,9 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; import { popupAjaxError } from "discourse/lib/ajax-error"; import { propertyEqual } from "discourse/lib/computed"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["group-members-input"], addButton: true, diff --git a/app/assets/javascripts/discourse/components/group-membership-button.js.es6 b/app/assets/javascripts/discourse/components/group-membership-button.js.es6 index 31ac1717345..6b58c5370d2 100644 --- a/app/assets/javascripts/discourse/components/group-membership-button.js.es6 +++ b/app/assets/javascripts/discourse/components/group-membership-button.js.es6 @@ -1,8 +1,9 @@ +import Component from "@ember/component"; import { default as computed } from "ember-addons/ember-computed-decorators"; import { popupAjaxError } from "discourse/lib/ajax-error"; import showModal from "discourse/lib/show-modal"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["group-membership-button"], @computed("model.public_admission", "userIsGroupUser") diff --git a/app/assets/javascripts/discourse/components/group-navigation.js.es6 b/app/assets/javascripts/discourse/components/group-navigation.js.es6 index 91ad923ffcc..89720fbbe80 100644 --- a/app/assets/javascripts/discourse/components/group-navigation.js.es6 +++ b/app/assets/javascripts/discourse/components/group-navigation.js.es6 @@ -1,3 +1,4 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ tagName: "" }); diff --git a/app/assets/javascripts/discourse/components/group-post.js.es6 b/app/assets/javascripts/discourse/components/group-post.js.es6 index f94f36dc8db..5a3a096f49d 100644 --- a/app/assets/javascripts/discourse/components/group-post.js.es6 +++ b/app/assets/javascripts/discourse/components/group-post.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ @computed("post.url") postUrl: Discourse.getURL }); diff --git a/app/assets/javascripts/discourse/components/group-selector.js.es6 b/app/assets/javascripts/discourse/components/group-selector.js.es6 index c70c51fbc72..3083207ff3a 100644 --- a/app/assets/javascripts/discourse/components/group-selector.js.es6 +++ b/app/assets/javascripts/discourse/components/group-selector.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import { on, observes, @@ -5,7 +6,7 @@ import { } from "ember-addons/ember-computed-decorators"; import { findRawTemplate } from "discourse/lib/raw-templates"; -export default Ember.Component.extend({ +export default Component.extend({ @computed("placeholderKey") placeholder(placeholderKey) { return placeholderKey ? I18n.t(placeholderKey) : ""; diff --git a/app/assets/javascripts/discourse/components/groups-form-interaction-fields.js.es6 b/app/assets/javascripts/discourse/components/groups-form-interaction-fields.js.es6 index f4756978a65..e4d1e6bb79a 100644 --- a/app/assets/javascripts/discourse/components/groups-form-interaction-fields.js.es6 +++ b/app/assets/javascripts/discourse/components/groups-form-interaction-fields.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import { default as computed } from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ init() { this._super(...arguments); diff --git a/app/assets/javascripts/discourse/components/groups-form-membership-fields.js.es6 b/app/assets/javascripts/discourse/components/groups-form-membership-fields.js.es6 index 7a9849463a1..1115786b08e 100644 --- a/app/assets/javascripts/discourse/components/groups-form-membership-fields.js.es6 +++ b/app/assets/javascripts/discourse/components/groups-form-membership-fields.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ init() { this._super(...arguments); diff --git a/app/assets/javascripts/discourse/components/groups-form-profile-fields.js.es6 b/app/assets/javascripts/discourse/components/groups-form-profile-fields.js.es6 index 15c2efbd96a..bca0af8297f 100644 --- a/app/assets/javascripts/discourse/components/groups-form-profile-fields.js.es6 +++ b/app/assets/javascripts/discourse/components/groups-form-profile-fields.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import { default as computed, observes @@ -6,7 +7,7 @@ import Group from "discourse/models/group"; import InputValidation from "discourse/models/input-validation"; import debounce from "discourse/lib/debounce"; -export default Ember.Component.extend({ +export default Component.extend({ disableSave: null, nameInput: null, diff --git a/app/assets/javascripts/discourse/components/groups-info.js.es6 b/app/assets/javascripts/discourse/components/groups-info.js.es6 index a95c9da3379..cf439ef7d0a 100644 --- a/app/assets/javascripts/discourse/components/groups-info.js.es6 +++ b/app/assets/javascripts/discourse/components/groups-info.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "span", classNames: ["group-info-details"], diff --git a/app/assets/javascripts/discourse/components/hide-modal-trigger.js.es6 b/app/assets/javascripts/discourse/components/hide-modal-trigger.js.es6 index e3951d52772..df632e2557b 100644 --- a/app/assets/javascripts/discourse/components/hide-modal-trigger.js.es6 +++ b/app/assets/javascripts/discourse/components/hide-modal-trigger.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ didInsertElement() { this._super(...arguments); $(".d-modal.fixed-modal") diff --git a/app/assets/javascripts/discourse/components/highlight-text.js.es6 b/app/assets/javascripts/discourse/components/highlight-text.js.es6 index 6e8be431dcc..a98ffdb653b 100644 --- a/app/assets/javascripts/discourse/components/highlight-text.js.es6 +++ b/app/assets/javascripts/discourse/components/highlight-text.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import highlightText from "discourse/lib/highlight-text"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "span", _highlightOnInsert: function() { diff --git a/app/assets/javascripts/discourse/components/ignored-user-list-item.js.es6 b/app/assets/javascripts/discourse/components/ignored-user-list-item.js.es6 index 5bf27c13a16..6f26b5700bb 100644 --- a/app/assets/javascripts/discourse/components/ignored-user-list-item.js.es6 +++ b/app/assets/javascripts/discourse/components/ignored-user-list-item.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ tagName: "div", items: null, actions: { diff --git a/app/assets/javascripts/discourse/components/ignored-user-list.js.es6 b/app/assets/javascripts/discourse/components/ignored-user-list.js.es6 index ac81cc505de..f73ac290e4d 100644 --- a/app/assets/javascripts/discourse/components/ignored-user-list.js.es6 +++ b/app/assets/javascripts/discourse/components/ignored-user-list.js.es6 @@ -1,8 +1,9 @@ +import Component from "@ember/component"; import { popupAjaxError } from "discourse/lib/ajax-error"; import showModal from "discourse/lib/show-modal"; import User from "discourse/models/user"; -export default Ember.Component.extend({ +export default Component.extend({ item: null, actions: { removeIgnoredUser(item) { diff --git a/app/assets/javascripts/discourse/components/image-uploader.js.es6 b/app/assets/javascripts/discourse/components/image-uploader.js.es6 index df9ce3e2b27..9142c17e60e 100644 --- a/app/assets/javascripts/discourse/components/image-uploader.js.es6 +++ b/app/assets/javascripts/discourse/components/image-uploader.js.es6 @@ -1,10 +1,11 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; import UploadMixin from "discourse/mixins/upload"; import lightbox from "discourse/lib/lightbox"; import { ajax } from "discourse/lib/ajax"; import { popupAjaxError } from "discourse/lib/ajax-error"; -export default Ember.Component.extend(UploadMixin, { +export default Component.extend(UploadMixin, { classNames: ["image-uploader"], loadingLightbox: false, diff --git a/app/assets/javascripts/discourse/components/images-uploader.js.es6 b/app/assets/javascripts/discourse/components/images-uploader.js.es6 index 23b8fbe6881..d3a9d6c3b70 100644 --- a/app/assets/javascripts/discourse/components/images-uploader.js.es6 +++ b/app/assets/javascripts/discourse/components/images-uploader.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; import UploadMixin from "discourse/mixins/upload"; -export default Ember.Component.extend(UploadMixin, { +export default Component.extend(UploadMixin, { type: "avatar", tagName: "span", diff --git a/app/assets/javascripts/discourse/components/input-tip.js.es6 b/app/assets/javascripts/discourse/components/input-tip.js.es6 index aceafa74580..1d775464030 100644 --- a/app/assets/javascripts/discourse/components/input-tip.js.es6 +++ b/app/assets/javascripts/discourse/components/input-tip.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import { bufferedRender } from "discourse-common/lib/buffered-render"; import { iconHTML } from "discourse-common/lib/icon-library"; -export default Ember.Component.extend( +export default Component.extend( bufferedRender({ classNameBindings: [":tip", "good", "bad"], rerenderTriggers: ["validation"], diff --git a/app/assets/javascripts/discourse/components/invite-panel.js.es6 b/app/assets/javascripts/discourse/components/invite-panel.js.es6 index 432a0b7325d..3f1dd39a0a9 100644 --- a/app/assets/javascripts/discourse/components/invite-panel.js.es6 +++ b/app/assets/javascripts/discourse/components/invite-panel.js.es6 @@ -1,10 +1,11 @@ +import Component from "@ember/component"; import { emailValid } from "discourse/lib/utilities"; import computed from "ember-addons/ember-computed-decorators"; import Group from "discourse/models/group"; import Invite from "discourse/models/invite"; import { i18n } from "discourse/lib/computed"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: null, inviteModel: Ember.computed.alias("panel.model.inviteModel"), diff --git a/app/assets/javascripts/discourse/components/latest-topic-list-item.js.es6 b/app/assets/javascripts/discourse/components/latest-topic-list-item.js.es6 index 487ae8aa46d..f0e3ee875c5 100644 --- a/app/assets/javascripts/discourse/components/latest-topic-list-item.js.es6 +++ b/app/assets/javascripts/discourse/components/latest-topic-list-item.js.es6 @@ -1,9 +1,10 @@ +import Component from "@ember/component"; import { showEntrance, navigateToTopic } from "discourse/components/topic-list-item"; -export default Ember.Component.extend({ +export default Component.extend({ attributeBindings: ["topic.id:data-topic-id"], classNameBindings: [ ":latest-topic-list-item", diff --git a/app/assets/javascripts/discourse/components/link-to-input.js.es6 b/app/assets/javascripts/discourse/components/link-to-input.js.es6 index 0afdbd304bd..653761018eb 100644 --- a/app/assets/javascripts/discourse/components/link-to-input.js.es6 +++ b/app/assets/javascripts/discourse/components/link-to-input.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ showInput: false, click() { diff --git a/app/assets/javascripts/discourse/components/links-redirect.js.es6 b/app/assets/javascripts/discourse/components/links-redirect.js.es6 index 84d5f890f0c..0ddd92b21bc 100644 --- a/app/assets/javascripts/discourse/components/links-redirect.js.es6 +++ b/app/assets/javascripts/discourse/components/links-redirect.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import ClickTrack from "discourse/lib/click-track"; -export default Ember.Component.extend({ +export default Component.extend({ didInsertElement() { this._super(...arguments); diff --git a/app/assets/javascripts/discourse/components/load-more.js.es6 b/app/assets/javascripts/discourse/components/load-more.js.es6 index f81b33b7642..8668fa57427 100644 --- a/app/assets/javascripts/discourse/components/load-more.js.es6 +++ b/app/assets/javascripts/discourse/components/load-more.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import LoadMore from "discourse/mixins/load-more"; -export default Ember.Component.extend(LoadMore, { +export default Component.extend(LoadMore, { init() { this._super(...arguments); diff --git a/app/assets/javascripts/discourse/components/login-buttons.js.es6 b/app/assets/javascripts/discourse/components/login-buttons.js.es6 index 3279bda5cce..a5a09674117 100644 --- a/app/assets/javascripts/discourse/components/login-buttons.js.es6 +++ b/app/assets/javascripts/discourse/components/login-buttons.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import { findAll } from "discourse/models/login-method"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ elementId: "login-buttons", classNameBindings: ["hidden"], diff --git a/app/assets/javascripts/discourse/components/login-modal.js.es6 b/app/assets/javascripts/discourse/components/login-modal.js.es6 index 59939542cb9..e8bbe98c876 100644 --- a/app/assets/javascripts/discourse/components/login-modal.js.es6 +++ b/app/assets/javascripts/discourse/components/login-modal.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ didInsertElement() { this._super(...arguments); diff --git a/app/assets/javascripts/discourse/components/mobile-category-topic.js.es6 b/app/assets/javascripts/discourse/components/mobile-category-topic.js.es6 index 4c47f0e126f..fcd85640e68 100644 --- a/app/assets/javascripts/discourse/components/mobile-category-topic.js.es6 +++ b/app/assets/javascripts/discourse/components/mobile-category-topic.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import { showEntrance } from "discourse/components/topic-list-item"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "tr", classNameBindings: [ ":category-topic-link", diff --git a/app/assets/javascripts/discourse/components/mobile-nav.js.es6 b/app/assets/javascripts/discourse/components/mobile-nav.js.es6 index 49392fc336a..a60a1070794 100644 --- a/app/assets/javascripts/discourse/components/mobile-nav.js.es6 +++ b/app/assets/javascripts/discourse/components/mobile-nav.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import { on, observes } from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ @on("init") _init() { if (!this.get("site.mobileView")) { diff --git a/app/assets/javascripts/discourse/components/modal-panel.js.es6 b/app/assets/javascripts/discourse/components/modal-panel.js.es6 index b441457a7dd..254dd32b738 100644 --- a/app/assets/javascripts/discourse/components/modal-panel.js.es6 +++ b/app/assets/javascripts/discourse/components/modal-panel.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import { fmt } from "discourse/lib/computed"; -export default Ember.Component.extend({ +export default Component.extend({ panel: null, panelComponent: fmt("panel.id", "%@-panel"), diff --git a/app/assets/javascripts/discourse/components/modal-tab.js.es6 b/app/assets/javascripts/discourse/components/modal-tab.js.es6 index c7a392507cd..8508b37a879 100644 --- a/app/assets/javascripts/discourse/components/modal-tab.js.es6 +++ b/app/assets/javascripts/discourse/components/modal-tab.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import { propertyEqual } from "discourse/lib/computed"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "li", classNames: ["modal-tab"], panel: null, diff --git a/app/assets/javascripts/discourse/components/mount-widget.js.es6 b/app/assets/javascripts/discourse/components/mount-widget.js.es6 index d8431f28205..5f0e584977b 100644 --- a/app/assets/javascripts/discourse/components/mount-widget.js.es6 +++ b/app/assets/javascripts/discourse/components/mount-widget.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import { diff, patch } from "virtual-dom"; import { WidgetClickHook } from "discourse/widgets/hooks"; import { queryRegistry } from "discourse/widgets/widget"; @@ -14,7 +15,7 @@ export function resetWidgetCleanCallbacks() { _cleanCallbacks = {}; } -export default Ember.Component.extend({ +export default Component.extend({ _tree: null, _rootNode: null, _timeout: null, diff --git a/app/assets/javascripts/discourse/components/nav-item.js.es6 b/app/assets/javascripts/discourse/components/nav-item.js.es6 index 2cff2954038..556c8085851 100644 --- a/app/assets/javascripts/discourse/components/nav-item.js.es6 +++ b/app/assets/javascripts/discourse/components/nav-item.js.es6 @@ -1,8 +1,9 @@ +import Component from "@ember/component"; /* You might be looking for navigation-item. */ import { iconHTML } from "discourse-common/lib/icon-library"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "li", classNameBindings: ["active"], router: Ember.inject.service(), diff --git a/app/assets/javascripts/discourse/components/navigation-bar.js.es6 b/app/assets/javascripts/discourse/components/navigation-bar.js.es6 index 4be9c2c055a..01dacde789d 100644 --- a/app/assets/javascripts/discourse/components/navigation-bar.js.es6 +++ b/app/assets/javascripts/discourse/components/navigation-bar.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import { default as computed, observes @@ -5,7 +6,7 @@ import { import DiscourseURL from "discourse/lib/url"; import { renderedConnectorsFor } from "discourse/lib/plugin-connectors"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "ul", classNameBindings: [":nav", ":nav-pills"], elementId: "navigation-bar", diff --git a/app/assets/javascripts/discourse/components/navigation-item.js.es6 b/app/assets/javascripts/discourse/components/navigation-item.js.es6 index 10290334a7c..a3403573fdf 100644 --- a/app/assets/javascripts/discourse/components/navigation-item.js.es6 +++ b/app/assets/javascripts/discourse/components/navigation-item.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; import { bufferedRender } from "discourse-common/lib/buffered-render"; -export default Ember.Component.extend( +export default Component.extend( bufferedRender({ tagName: "li", classNameBindings: [ diff --git a/app/assets/javascripts/discourse/components/plugin-connector.js.es6 b/app/assets/javascripts/discourse/components/plugin-connector.js.es6 index 76590147ce8..715cb629652 100644 --- a/app/assets/javascripts/discourse/components/plugin-connector.js.es6 +++ b/app/assets/javascripts/discourse/components/plugin-connector.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import { observes } from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ init() { this._super(...arguments); diff --git a/app/assets/javascripts/discourse/components/plugin-outlet.js.es6 b/app/assets/javascripts/discourse/components/plugin-outlet.js.es6 index 36b89291575..14e3805964d 100644 --- a/app/assets/javascripts/discourse/components/plugin-outlet.js.es6 +++ b/app/assets/javascripts/discourse/components/plugin-outlet.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; /** A plugin outlet is an extension point for templates where other templates can be inserted by plugins. @@ -31,7 +32,7 @@ **/ import { renderedConnectorsFor } from "discourse/lib/plugin-connectors"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "span", connectors: null, diff --git a/app/assets/javascripts/discourse/components/popup-input-tip.js.es6 b/app/assets/javascripts/discourse/components/popup-input-tip.js.es6 index 5f4fda605ca..38e8fb15036 100644 --- a/app/assets/javascripts/discourse/components/popup-input-tip.js.es6 +++ b/app/assets/javascripts/discourse/components/popup-input-tip.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import { iconHTML } from "discourse-common/lib/icon-library"; import { default as computed, @@ -5,7 +6,7 @@ import { } from "ember-addons/ember-computed-decorators"; import { bufferedRender } from "discourse-common/lib/buffered-render"; -export default Ember.Component.extend( +export default Component.extend( bufferedRender({ classNameBindings: [":popup-tip", "good", "bad", "lastShownAt::hide"], animateAttribute: null, diff --git a/app/assets/javascripts/discourse/components/preference-checkbox.js.es6 b/app/assets/javascripts/discourse/components/preference-checkbox.js.es6 index b0e84c117d2..7ae299f5ded 100644 --- a/app/assets/javascripts/discourse/components/preference-checkbox.js.es6 +++ b/app/assets/javascripts/discourse/components/preference-checkbox.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["controls"], @computed("labelKey") diff --git a/app/assets/javascripts/discourse/components/pwa-install-banner.js.es6 b/app/assets/javascripts/discourse/components/pwa-install-banner.js.es6 index 458fa3cebd2..b6c9df818bb 100644 --- a/app/assets/javascripts/discourse/components/pwa-install-banner.js.es6 +++ b/app/assets/javascripts/discourse/components/pwa-install-banner.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import { default as computed, on @@ -5,7 +6,7 @@ import { const USER_DISMISSED_PROMPT_KEY = "dismissed-pwa-install-banner"; -export default Ember.Component.extend({ +export default Component.extend({ deferredInstallPromptEvent: null, _handleInstallPromptEvent(event) { diff --git a/app/assets/javascripts/discourse/components/quote-button.js.es6 b/app/assets/javascripts/discourse/components/quote-button.js.es6 index 9ac01abef4c..f16bf6690d7 100644 --- a/app/assets/javascripts/discourse/components/quote-button.js.es6 +++ b/app/assets/javascripts/discourse/components/quote-button.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import debounce from "discourse/lib/debounce"; import { selectedText } from "discourse/lib/utilities"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["quote-button"], classNameBindings: ["visible"], visible: false, diff --git a/app/assets/javascripts/discourse/components/radio-button.js.es6 b/app/assets/javascripts/discourse/components/radio-button.js.es6 index 4a7929d058c..3f6d5a61090 100644 --- a/app/assets/javascripts/discourse/components/radio-button.js.es6 +++ b/app/assets/javascripts/discourse/components/radio-button.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "input", type: "radio", attributeBindings: [ diff --git a/app/assets/javascripts/discourse/components/related-messages.js.es6 b/app/assets/javascripts/discourse/components/related-messages.js.es6 index e7d65a4591d..bf95279941b 100644 --- a/app/assets/javascripts/discourse/components/related-messages.js.es6 +++ b/app/assets/javascripts/discourse/components/related-messages.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; import { iconHTML } from "discourse-common/lib/icon-library"; -export default Ember.Component.extend({ +export default Component.extend({ elementId: "related-messages", classNames: ["suggested-topics"], diff --git a/app/assets/javascripts/discourse/components/reviewable-bundled-action.js.es6 b/app/assets/javascripts/discourse/components/reviewable-bundled-action.js.es6 index d42a2dd290b..1a119130671 100644 --- a/app/assets/javascripts/discourse/components/reviewable-bundled-action.js.es6 +++ b/app/assets/javascripts/discourse/components/reviewable-bundled-action.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ tagName: "", multiple: Ember.computed.gt("bundle.actions.length", 1), diff --git a/app/assets/javascripts/discourse/components/reviewable-claimed-topic.js.es6 b/app/assets/javascripts/discourse/components/reviewable-claimed-topic.js.es6 index d73a32d304d..0583a4605fb 100644 --- a/app/assets/javascripts/discourse/components/reviewable-claimed-topic.js.es6 +++ b/app/assets/javascripts/discourse/components/reviewable-claimed-topic.js.es6 @@ -1,8 +1,9 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; import { popupAjaxError } from "discourse/lib/ajax-error"; import { ajax } from "discourse/lib/ajax"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "", @computed diff --git a/app/assets/javascripts/discourse/components/reviewable-conversation-post.js.es6 b/app/assets/javascripts/discourse/components/reviewable-conversation-post.js.es6 index b57e6aa5de4..2a6c31051c8 100644 --- a/app/assets/javascripts/discourse/components/reviewable-conversation-post.js.es6 +++ b/app/assets/javascripts/discourse/components/reviewable-conversation-post.js.es6 @@ -1,3 +1,4 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ showUsername: Ember.computed.gte("index", 1) }); diff --git a/app/assets/javascripts/discourse/components/reviewable-flagged-post.js.es6 b/app/assets/javascripts/discourse/components/reviewable-flagged-post.js.es6 index 1916a961253..607d70dbda2 100644 --- a/app/assets/javascripts/discourse/components/reviewable-flagged-post.js.es6 +++ b/app/assets/javascripts/discourse/components/reviewable-flagged-post.js.es6 @@ -1,9 +1,10 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; import { longDate } from "discourse/lib/formatter"; import { historyHeat } from "discourse/widgets/post-edits-indicator"; import showModal from "discourse/lib/show-modal"; -export default Ember.Component.extend({ +export default Component.extend({ hasEdits: Ember.computed.gt("reviewable.post_version", 1), @computed("reviewable.post_updated_at") diff --git a/app/assets/javascripts/discourse/components/reviewable-histories.js.es6 b/app/assets/javascripts/discourse/components/reviewable-histories.js.es6 index a5f1a7932ef..3bcf50b5e14 100644 --- a/app/assets/javascripts/discourse/components/reviewable-histories.js.es6 +++ b/app/assets/javascripts/discourse/components/reviewable-histories.js.es6 @@ -1,3 +1,4 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ filteredHistories: Ember.computed.filterBy("histories", "created", false) }); diff --git a/app/assets/javascripts/discourse/components/reviewable-item.js.es6 b/app/assets/javascripts/discourse/components/reviewable-item.js.es6 index 4507704d95b..23f3b534799 100644 --- a/app/assets/javascripts/discourse/components/reviewable-item.js.es6 +++ b/app/assets/javascripts/discourse/components/reviewable-item.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import { ajax } from "discourse/lib/ajax"; import { popupAjaxError } from "discourse/lib/ajax-error"; import computed from "ember-addons/ember-computed-decorators"; @@ -7,7 +8,7 @@ import showModal from "discourse/lib/show-modal"; let _components = {}; -export default Ember.Component.extend({ +export default Component.extend({ adminTools: optionalService(), tagName: "", updating: null, diff --git a/app/assets/javascripts/discourse/components/reviewable-queued-post.js.es6 b/app/assets/javascripts/discourse/components/reviewable-queued-post.js.es6 index 1255c5bddc6..2e17ce9423b 100644 --- a/app/assets/javascripts/discourse/components/reviewable-queued-post.js.es6 +++ b/app/assets/javascripts/discourse/components/reviewable-queued-post.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import showModal from "discourse/lib/show-modal"; -export default Ember.Component.extend({ +export default Component.extend({ actions: { showRawEmail() { showModal("raw-email").set("rawEmail", this.reviewable.payload.raw_email); diff --git a/app/assets/javascripts/discourse/components/reviewable-user.js.es6 b/app/assets/javascripts/discourse/components/reviewable-user.js.es6 index f071ba7b336..ec065a0bdef 100644 --- a/app/assets/javascripts/discourse/components/reviewable-user.js.es6 +++ b/app/assets/javascripts/discourse/components/reviewable-user.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import { default as computed } from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ @computed("reviewable.user_fields") userFields(fields) { return this.site.collectUserFields(fields); diff --git a/app/assets/javascripts/discourse/components/scroll-tracker.js.es6 b/app/assets/javascripts/discourse/components/scroll-tracker.js.es6 index caad7dc87a2..dad7447f0c2 100644 --- a/app/assets/javascripts/discourse/components/scroll-tracker.js.es6 +++ b/app/assets/javascripts/discourse/components/scroll-tracker.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import Scrolling from "discourse/mixins/scrolling"; -export default Ember.Component.extend(Scrolling, { +export default Component.extend(Scrolling, { didReceiveAttrs() { this._super(...arguments); diff --git a/app/assets/javascripts/discourse/components/search-advanced-options.js.es6 b/app/assets/javascripts/discourse/components/search-advanced-options.js.es6 index 50da93e6c23..333b6d65492 100644 --- a/app/assets/javascripts/discourse/components/search-advanced-options.js.es6 +++ b/app/assets/javascripts/discourse/components/search-advanced-options.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import { observes } from "ember-addons/ember-computed-decorators"; import { escapeExpression } from "discourse/lib/utilities"; import Group from "discourse/models/group"; @@ -28,7 +29,7 @@ const REGEXP_POST_TIME_WHEN = /^(before|after)/gi; const IN_OPTIONS_MAPPING = { images: "with" }; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["search-advanced-options"], init() { diff --git a/app/assets/javascripts/discourse/components/second-factor-form.js.es6 b/app/assets/javascripts/discourse/components/second-factor-form.js.es6 index 572fd509f7f..ce332c23b12 100644 --- a/app/assets/javascripts/discourse/components/second-factor-form.js.es6 +++ b/app/assets/javascripts/discourse/components/second-factor-form.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; import { SECOND_FACTOR_METHODS } from "discourse/models/user"; -export default Ember.Component.extend({ +export default Component.extend({ @computed("secondFactorMethod") secondFactorTitle(secondFactorMethod) { switch (secondFactorMethod) { diff --git a/app/assets/javascripts/discourse/components/second-factor-input.js.es6 b/app/assets/javascripts/discourse/components/second-factor-input.js.es6 index 00e27039a41..97ce1a4fa7d 100644 --- a/app/assets/javascripts/discourse/components/second-factor-input.js.es6 +++ b/app/assets/javascripts/discourse/components/second-factor-input.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; import { SECOND_FACTOR_METHODS } from "discourse/models/user"; -export default Ember.Component.extend({ +export default Component.extend({ @computed("secondFactorMethod") type(secondFactorMethod) { if (secondFactorMethod === SECOND_FACTOR_METHODS.TOTP) return "tel"; diff --git a/app/assets/javascripts/discourse/components/security-key-form.js.es6 b/app/assets/javascripts/discourse/components/security-key-form.js.es6 index 3161831869c..d315bf68890 100644 --- a/app/assets/javascripts/discourse/components/security-key-form.js.es6 +++ b/app/assets/javascripts/discourse/components/security-key-form.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import { SECOND_FACTOR_METHODS } from "discourse/models/user"; -export default Ember.Component.extend({ +export default Component.extend({ actions: { useAnotherMethod() { this.set("showSecurityKey", false); diff --git a/app/assets/javascripts/discourse/components/share-panel.js.es6 b/app/assets/javascripts/discourse/components/share-panel.js.es6 index 136e6a9ccc0..65f5cfd9641 100644 --- a/app/assets/javascripts/discourse/components/share-panel.js.es6 +++ b/app/assets/javascripts/discourse/components/share-panel.js.es6 @@ -1,8 +1,9 @@ +import Component from "@ember/component"; import { escapeExpression } from "discourse/lib/utilities"; import { default as computed } from "ember-addons/ember-computed-decorators"; import Sharing from "discourse/lib/sharing"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: null, type: Ember.computed.alias("panel.model.type"), diff --git a/app/assets/javascripts/discourse/components/share-popup.js.es6 b/app/assets/javascripts/discourse/components/share-popup.js.es6 index 10e723a196a..17e05c47c97 100644 --- a/app/assets/javascripts/discourse/components/share-popup.js.es6 +++ b/app/assets/javascripts/discourse/components/share-popup.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import { wantsNewWindow } from "discourse/lib/intercept-click"; import { longDateNoYear } from "discourse/lib/formatter"; import { @@ -7,7 +8,7 @@ import { import Sharing from "discourse/lib/sharing"; import { nativeShare } from "discourse/lib/pwa-utils"; -export default Ember.Component.extend({ +export default Component.extend({ elementId: "share-link", classNameBindings: ["visible"], link: null, diff --git a/app/assets/javascripts/discourse/components/share-source.js.es6 b/app/assets/javascripts/discourse/components/share-source.js.es6 index 0eb70208865..1ce8f6e5da5 100644 --- a/app/assets/javascripts/discourse/components/share-source.js.es6 +++ b/app/assets/javascripts/discourse/components/share-source.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ classNameBindings: [":social-link"], actions: { diff --git a/app/assets/javascripts/discourse/components/shared-draft-controls.js.es6 b/app/assets/javascripts/discourse/components/shared-draft-controls.js.es6 index 002a13e7da9..b408ee87a13 100644 --- a/app/assets/javascripts/discourse/components/shared-draft-controls.js.es6 +++ b/app/assets/javascripts/discourse/components/shared-draft-controls.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "", publishing: false, diff --git a/app/assets/javascripts/discourse/components/signup-cta.js.es6 b/app/assets/javascripts/discourse/components/signup-cta.js.es6 index 287e30c651d..d7630e26817 100644 --- a/app/assets/javascripts/discourse/components/signup-cta.js.es6 +++ b/app/assets/javascripts/discourse/components/signup-cta.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ action: "showCreateAccount", actions: { diff --git a/app/assets/javascripts/discourse/components/suggested-topics.js.es6 b/app/assets/javascripts/discourse/components/suggested-topics.js.es6 index b5756b859c9..e8415f34980 100644 --- a/app/assets/javascripts/discourse/components/suggested-topics.js.es6 +++ b/app/assets/javascripts/discourse/components/suggested-topics.js.es6 @@ -1,8 +1,9 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; import { categoryBadgeHTML } from "discourse/helpers/category-link"; import { iconHTML } from "discourse-common/lib/icon-library"; -export default Ember.Component.extend({ +export default Component.extend({ elementId: "suggested-topics", classNames: ["suggested-topics"], diff --git a/app/assets/javascripts/discourse/components/tag-drop-link.js.es6 b/app/assets/javascripts/discourse/components/tag-drop-link.js.es6 index ab415614298..73d20d7922b 100644 --- a/app/assets/javascripts/discourse/components/tag-drop-link.js.es6 +++ b/app/assets/javascripts/discourse/components/tag-drop-link.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import DiscourseURL from "discourse/lib/url"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "a", classNameBindings: [ ":tag-badge-wrapper", diff --git a/app/assets/javascripts/discourse/components/tag-list.js.es6 b/app/assets/javascripts/discourse/components/tag-list.js.es6 index e703a1801df..bc5dbe6531b 100644 --- a/app/assets/javascripts/discourse/components/tag-list.js.es6 +++ b/app/assets/javascripts/discourse/components/tag-list.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ classNameBindings: [":tag-list", "categoryClass", "tagGroupNameClass"], isPrivateMessage: false, diff --git a/app/assets/javascripts/discourse/components/text-overflow.js.es6 b/app/assets/javascripts/discourse/components/text-overflow.js.es6 index a63b6fed5d2..37a4cb29598 100644 --- a/app/assets/javascripts/discourse/components/text-overflow.js.es6 +++ b/app/assets/javascripts/discourse/components/text-overflow.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ didInsertElement() { this._super(...arguments); Ember.run.next(null, () => { diff --git a/app/assets/javascripts/discourse/components/time-input.js.es6 b/app/assets/javascripts/discourse/components/time-input.js.es6 index bdeb1b3a722..c9c65e1034a 100644 --- a/app/assets/javascripts/discourse/components/time-input.js.es6 +++ b/app/assets/javascripts/discourse/components/time-input.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import { isNumeric } from "discourse/lib/utilities"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["d-time-input"], hours: null, minutes: null, diff --git a/app/assets/javascripts/discourse/components/top-period-buttons.js.es6 b/app/assets/javascripts/discourse/components/top-period-buttons.js.es6 index 059b1a1468c..9c01cf1a1da 100644 --- a/app/assets/javascripts/discourse/components/top-period-buttons.js.es6 +++ b/app/assets/javascripts/discourse/components/top-period-buttons.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["top-title-buttons"], @computed("period") diff --git a/app/assets/javascripts/discourse/components/topic-category.js.es6 b/app/assets/javascripts/discourse/components/topic-category.js.es6 index 97fcde13cda..3f003c8d77e 100644 --- a/app/assets/javascripts/discourse/components/topic-category.js.es6 +++ b/app/assets/javascripts/discourse/components/topic-category.js.es6 @@ -1,2 +1,3 @@ +import Component from "@ember/component"; // Injections don't occur without a class -export default Ember.Component.extend(); +export default Component.extend(); diff --git a/app/assets/javascripts/discourse/components/topic-entrance.js.es6 b/app/assets/javascripts/discourse/components/topic-entrance.js.es6 index e90ccd58576..f55197d8044 100644 --- a/app/assets/javascripts/discourse/components/topic-entrance.js.es6 +++ b/app/assets/javascripts/discourse/components/topic-entrance.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import DiscourseURL from "discourse/lib/url"; import CleansUp from "discourse/mixins/cleans-up"; import computed from "ember-addons/ember-computed-decorators"; @@ -25,7 +26,7 @@ function entranceDate(dt, showTime) { ); } -export default Ember.Component.extend(CleansUp, { +export default Component.extend(CleansUp, { elementId: "topic-entrance", classNameBindings: ["visible::hidden"], _position: null, diff --git a/app/assets/javascripts/discourse/components/topic-footer-buttons.js.es6 b/app/assets/javascripts/discourse/components/topic-footer-buttons.js.es6 index 0c487e73530..6845dc6f12d 100644 --- a/app/assets/javascripts/discourse/components/topic-footer-buttons.js.es6 +++ b/app/assets/javascripts/discourse/components/topic-footer-buttons.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; import { getTopicFooterButtons } from "discourse/lib/register-topic-footer-button"; -export default Ember.Component.extend({ +export default Component.extend({ elementId: "topic-footer-buttons", // Allow us to extend it diff --git a/app/assets/javascripts/discourse/components/topic-join-group-notice.js.es6 b/app/assets/javascripts/discourse/components/topic-join-group-notice.js.es6 index 1fd4f9264d7..114e02aa04f 100644 --- a/app/assets/javascripts/discourse/components/topic-join-group-notice.js.es6 +++ b/app/assets/javascripts/discourse/components/topic-join-group-notice.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import { default as computed } from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["topic-notice"], @computed("model.group.{full_name,name,allow_membership_requests}") diff --git a/app/assets/javascripts/discourse/components/topic-list-item.js.es6 b/app/assets/javascripts/discourse/components/topic-list-item.js.es6 index ad822dfb42a..771d5dfb35e 100644 --- a/app/assets/javascripts/discourse/components/topic-list-item.js.es6 +++ b/app/assets/javascripts/discourse/components/topic-list-item.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import DiscourseURL from "discourse/lib/url"; import computed from "ember-addons/ember-computed-decorators"; import { bufferedRender } from "discourse-common/lib/buffered-render"; @@ -215,7 +216,7 @@ export const ListItemDefaults = { }) }; -export default Ember.Component.extend( +export default Component.extend( ListItemDefaults, bufferedRender({ rerenderTriggers: ["bulkSelectEnabled", "topic.pinned"], diff --git a/app/assets/javascripts/discourse/components/topic-list.js.es6 b/app/assets/javascripts/discourse/components/topic-list.js.es6 index 8eaa73dd266..c099c8b7906 100644 --- a/app/assets/javascripts/discourse/components/topic-list.js.es6 +++ b/app/assets/javascripts/discourse/components/topic-list.js.es6 @@ -1,10 +1,11 @@ +import Component from "@ember/component"; import { default as computed, observes } from "ember-addons/ember-computed-decorators"; import LoadMore from "discourse/mixins/load-more"; -export default Ember.Component.extend(LoadMore, { +export default Component.extend(LoadMore, { tagName: "table", classNames: ["topic-list"], showTopicPostBadges: true, diff --git a/app/assets/javascripts/discourse/components/topic-navigation.js.es6 b/app/assets/javascripts/discourse/components/topic-navigation.js.es6 index 28cf8b4ae77..96db2ab095b 100644 --- a/app/assets/javascripts/discourse/components/topic-navigation.js.es6 +++ b/app/assets/javascripts/discourse/components/topic-navigation.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import { observes } from "ember-addons/ember-computed-decorators"; import showModal from "discourse/lib/show-modal"; import PanEvents, { @@ -6,7 +7,7 @@ import PanEvents, { SWIPE_VELOCITY_THRESHOLD } from "discourse/mixins/pan-events"; -export default Ember.Component.extend(PanEvents, { +export default Component.extend(PanEvents, { composerOpen: null, info: null, isPanning: false, diff --git a/app/assets/javascripts/discourse/components/topic-post-badges.js.es6 b/app/assets/javascripts/discourse/components/topic-post-badges.js.es6 index 69235be0caf..e6b70ab2126 100644 --- a/app/assets/javascripts/discourse/components/topic-post-badges.js.es6 +++ b/app/assets/javascripts/discourse/components/topic-post-badges.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import { bufferedRender } from "discourse-common/lib/buffered-render"; // Creates a link @@ -12,7 +13,7 @@ function link(buffer, prop, url, cssClass, i18nKey, text) { ); } -export default Ember.Component.extend( +export default Component.extend( bufferedRender({ tagName: "span", classNameBindings: [":topic-post-badges"], diff --git a/app/assets/javascripts/discourse/components/topic-progress.js.es6 b/app/assets/javascripts/discourse/components/topic-progress.js.es6 index e37d5821c23..61db49b425c 100644 --- a/app/assets/javascripts/discourse/components/topic-progress.js.es6 +++ b/app/assets/javascripts/discourse/components/topic-progress.js.es6 @@ -1,9 +1,10 @@ +import Component from "@ember/component"; import { default as computed, observes } from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ elementId: "topic-progress-wrapper", classNameBindings: ["docked"], docked: false, diff --git a/app/assets/javascripts/discourse/components/topic-status.js.es6 b/app/assets/javascripts/discourse/components/topic-status.js.es6 index d063847e83f..dc3e0d14f69 100644 --- a/app/assets/javascripts/discourse/components/topic-status.js.es6 +++ b/app/assets/javascripts/discourse/components/topic-status.js.es6 @@ -1,10 +1,11 @@ +import Component from "@ember/component"; import { iconHTML } from "discourse-common/lib/icon-library"; import { bufferedRender } from "discourse-common/lib/buffered-render"; import { escapeExpression } from "discourse/lib/utilities"; import TopicStatusIcons from "discourse/helpers/topic-status-icons"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend( +export default Component.extend( bufferedRender({ classNames: ["topic-statuses"], diff --git a/app/assets/javascripts/discourse/components/topic-timer-info.js.es6 b/app/assets/javascripts/discourse/components/topic-timer-info.js.es6 index 288e61b3bb6..c7e2ed244a1 100644 --- a/app/assets/javascripts/discourse/components/topic-timer-info.js.es6 +++ b/app/assets/javascripts/discourse/components/topic-timer-info.js.es6 @@ -1,10 +1,11 @@ +import Component from "@ember/component"; import { iconHTML } from "discourse-common/lib/icon-library"; import { bufferedRender } from "discourse-common/lib/buffered-render"; import Category from "discourse/models/category"; import computed from "ember-addons/ember-computed-decorators"; import { REMINDER_TYPE } from "discourse/controllers/edit-topic-timer"; -export default Ember.Component.extend( +export default Component.extend( bufferedRender({ classNames: ["topic-status-info"], _delayedRerender: null, diff --git a/app/assets/javascripts/discourse/components/topic-title.js.es6 b/app/assets/javascripts/discourse/components/topic-title.js.es6 index 17f99b48ee0..7bbc478cb33 100644 --- a/app/assets/javascripts/discourse/components/topic-title.js.es6 +++ b/app/assets/javascripts/discourse/components/topic-title.js.es6 @@ -1,5 +1,6 @@ +import Component from "@ember/component"; import KeyEnterEscape from "discourse/mixins/key-enter-escape"; -export default Ember.Component.extend(KeyEnterEscape, { +export default Component.extend(KeyEnterEscape, { elementId: "topic-title" }); diff --git a/app/assets/javascripts/discourse/components/track-selected.js.es6 b/app/assets/javascripts/discourse/components/track-selected.js.es6 index bf720378b78..241cb64c7c8 100644 --- a/app/assets/javascripts/discourse/components/track-selected.js.es6 +++ b/app/assets/javascripts/discourse/components/track-selected.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ tagName: "span", selectionChanged: function() { const selected = this.selected; diff --git a/app/assets/javascripts/discourse/components/user-badge.js.es6 b/app/assets/javascripts/discourse/components/user-badge.js.es6 index bca90d4435a..85de291634d 100644 --- a/app/assets/javascripts/discourse/components/user-badge.js.es6 +++ b/app/assets/javascripts/discourse/components/user-badge.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "span", @computed("count") diff --git a/app/assets/javascripts/discourse/components/user-card-contents.js.es6 b/app/assets/javascripts/discourse/components/user-card-contents.js.es6 index 981cbb125d5..6a21948d333 100644 --- a/app/assets/javascripts/discourse/components/user-card-contents.js.es6 +++ b/app/assets/javascripts/discourse/components/user-card-contents.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import { default as computed, observes @@ -10,7 +11,7 @@ import CardContentsBase from "discourse/mixins/card-contents-base"; import CleansUp from "discourse/mixins/cleans-up"; import { prioritizeNameInUx } from "discourse/lib/settings"; -export default Ember.Component.extend( +export default Component.extend( CardContentsBase, CanCheckEmails, CleansUp, diff --git a/app/assets/javascripts/discourse/components/user-field.js.es6 b/app/assets/javascripts/discourse/components/user-field.js.es6 index 9851b457628..b54cbafd0ad 100644 --- a/app/assets/javascripts/discourse/components/user-field.js.es6 +++ b/app/assets/javascripts/discourse/components/user-field.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import { fmt } from "discourse/lib/computed"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ classNameBindings: [":user-field", "field.field_type", "customFieldClass"], layoutName: fmt("field.field_type", "components/user-fields/%@"), diff --git a/app/assets/javascripts/discourse/components/user-flag-percentage.js.es6 b/app/assets/javascripts/discourse/components/user-flag-percentage.js.es6 index 874f19c7bbb..5c24fb70afd 100644 --- a/app/assets/javascripts/discourse/components/user-flag-percentage.js.es6 +++ b/app/assets/javascripts/discourse/components/user-flag-percentage.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "", @computed("percentage") diff --git a/app/assets/javascripts/discourse/components/user-info.js.es6 b/app/assets/javascripts/discourse/components/user-info.js.es6 index 21a13477750..2353dbd5538 100644 --- a/app/assets/javascripts/discourse/components/user-info.js.es6 +++ b/app/assets/javascripts/discourse/components/user-info.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; import { userPath } from "discourse/lib/url"; @@ -5,7 +6,7 @@ export function normalize(name) { return name.replace(/[\-\_ \.]/g, "").toLowerCase(); } -export default Ember.Component.extend({ +export default Component.extend({ classNameBindings: [":user-info", "size"], attributeBindings: ["data-username"], size: "small", diff --git a/app/assets/javascripts/discourse/components/user-link.js.es6 b/app/assets/javascripts/discourse/components/user-link.js.es6 index 7b86bed4fd5..cdc7640bb21 100644 --- a/app/assets/javascripts/discourse/components/user-link.js.es6 +++ b/app/assets/javascripts/discourse/components/user-link.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ tagName: "a", attributeBindings: ["href", "data-user-card"], href: Ember.computed.alias("user.path"), diff --git a/app/assets/javascripts/discourse/components/user-stat.js.es6 b/app/assets/javascripts/discourse/components/user-stat.js.es6 index 879198734c6..90add324689 100644 --- a/app/assets/javascripts/discourse/components/user-stat.js.es6 +++ b/app/assets/javascripts/discourse/components/user-stat.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ classNames: ["user-stat"], type: "number", isNumber: Ember.computed.equal("type", "number"), diff --git a/app/assets/javascripts/discourse/components/user-stream-item.js.es6 b/app/assets/javascripts/discourse/components/user-stream-item.js.es6 index 332e16520d0..f0c5ca36e53 100644 --- a/app/assets/javascripts/discourse/components/user-stream-item.js.es6 +++ b/app/assets/javascripts/discourse/components/user-stream-item.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import { propertyEqual } from "discourse/lib/computed"; import { actionDescription } from "discourse/widgets/post-small-action"; -export default Ember.Component.extend({ +export default Component.extend({ classNameBindings: [ ":user-stream-item", ":item", // DEPRECATED: 'item' class diff --git a/app/assets/javascripts/discourse/components/user-stream.js.es6 b/app/assets/javascripts/discourse/components/user-stream.js.es6 index ffb5c686031..cbb9b779bc5 100644 --- a/app/assets/javascripts/discourse/components/user-stream.js.es6 +++ b/app/assets/javascripts/discourse/components/user-stream.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import LoadMore from "discourse/mixins/load-more"; import ClickTrack from "discourse/lib/click-track"; import Post from "discourse/models/post"; @@ -6,7 +7,7 @@ import Draft from "discourse/models/draft"; import { popupAjaxError } from "discourse/lib/ajax-error"; import { getOwner } from "discourse-common/lib/get-owner"; -export default Ember.Component.extend(LoadMore, { +export default Component.extend(LoadMore, { _initialize: Ember.on("init", function() { const filter = this.get("stream.filter"); if (filter) { diff --git a/app/assets/javascripts/discourse/components/user-summary-category-search.js.es6 b/app/assets/javascripts/discourse/components/user-summary-category-search.js.es6 index 86def06ee1a..5206a83988c 100644 --- a/app/assets/javascripts/discourse/components/user-summary-category-search.js.es6 +++ b/app/assets/javascripts/discourse/components/user-summary-category-search.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "", @computed("user", "category") diff --git a/app/assets/javascripts/discourse/components/user-summary-section.js.es6 b/app/assets/javascripts/discourse/components/user-summary-section.js.es6 index b5deb64dc4e..d566ee18ab3 100644 --- a/app/assets/javascripts/discourse/components/user-summary-section.js.es6 +++ b/app/assets/javascripts/discourse/components/user-summary-section.js.es6 @@ -1,3 +1,4 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ classNames: ["top-sub-section"] }); diff --git a/app/assets/javascripts/discourse/components/user-summary-topic.js.es6 b/app/assets/javascripts/discourse/components/user-summary-topic.js.es6 index 145b770e515..790c675e499 100644 --- a/app/assets/javascripts/discourse/components/user-summary-topic.js.es6 +++ b/app/assets/javascripts/discourse/components/user-summary-topic.js.es6 @@ -1,3 +1,4 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ tagName: "li" }); diff --git a/app/assets/javascripts/discourse/components/user-summary-topics-list.js.es6 b/app/assets/javascripts/discourse/components/user-summary-topics-list.js.es6 index 5035daa2a78..39970994da6 100644 --- a/app/assets/javascripts/discourse/components/user-summary-topics-list.js.es6 +++ b/app/assets/javascripts/discourse/components/user-summary-topics-list.js.es6 @@ -1,9 +1,10 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; // should be kept in sync with 'UserSummary::MAX_SUMMARY_RESULTS' const MAX_SUMMARY_RESULTS = 6; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "", @computed("items.length") diff --git a/app/assets/javascripts/discourse/components/user-summary-user.js.es6 b/app/assets/javascripts/discourse/components/user-summary-user.js.es6 index 145b770e515..790c675e499 100644 --- a/app/assets/javascripts/discourse/components/user-summary-user.js.es6 +++ b/app/assets/javascripts/discourse/components/user-summary-user.js.es6 @@ -1,3 +1,4 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ tagName: "li" }); diff --git a/app/assets/javascripts/discourse/components/watch-read.js.es6 b/app/assets/javascripts/discourse/components/watch-read.js.es6 index 68b1d1f480f..16cc583f4f9 100644 --- a/app/assets/javascripts/discourse/components/watch-read.js.es6 +++ b/app/assets/javascripts/discourse/components/watch-read.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import isElementInViewport from "discourse/lib/is-element-in-viewport"; -export default Ember.Component.extend({ +export default Component.extend({ didInsertElement() { this._super(...arguments); const currentUser = this.currentUser; diff --git a/app/assets/javascripts/discourse/templates/components/reviewable-score.js.es6 b/app/assets/javascripts/discourse/templates/components/reviewable-score.js.es6 index abceda03cac..46f239534d4 100644 --- a/app/assets/javascripts/discourse/templates/components/reviewable-score.js.es6 +++ b/app/assets/javascripts/discourse/templates/components/reviewable-score.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "", showStatus: Ember.computed.gt("rs.status", 0), diff --git a/app/assets/javascripts/select-kit/components/multi-select/selected-name.js.es6 b/app/assets/javascripts/select-kit/components/multi-select/selected-name.js.es6 index 1b81ae1eb27..0c542410fbb 100644 --- a/app/assets/javascripts/select-kit/components/multi-select/selected-name.js.es6 +++ b/app/assets/javascripts/select-kit/components/multi-select/selected-name.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ attributeBindings: [ "tabindex", "ariaLabel:aria-label", diff --git a/app/assets/javascripts/select-kit/components/pinned-button.js.es6 b/app/assets/javascripts/select-kit/components/pinned-button.js.es6 index 079274a2a8a..9002d913b37 100644 --- a/app/assets/javascripts/select-kit/components/pinned-button.js.es6 +++ b/app/assets/javascripts/select-kit/components/pinned-button.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ pluginApiIdentifiers: ["pinned-button"], descriptionKey: "help", classNames: "pinned-button", diff --git a/app/assets/javascripts/select-kit/components/select-kit.js.es6 b/app/assets/javascripts/select-kit/components/select-kit.js.es6 index d71651b8d55..51e16b0bd21 100644 --- a/app/assets/javascripts/select-kit/components/select-kit.js.es6 +++ b/app/assets/javascripts/select-kit/components/select-kit.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; const { get, isNone, run, isEmpty, makeArray } = Ember; import computed from "ember-addons/ember-computed-decorators"; import UtilsMixin from "select-kit/mixins/utils"; @@ -10,7 +11,7 @@ import { applyCollectionHeaderCallbacks } from "select-kit/mixins/plugin-api"; -export default Ember.Component.extend( +export default Component.extend( UtilsMixin, PluginApiMixin, DomHelpersMixin, diff --git a/app/assets/javascripts/select-kit/components/select-kit/select-kit-collection.js.es6 b/app/assets/javascripts/select-kit/components/select-kit/select-kit-collection.js.es6 index fb1d041af57..cc2ff90a15d 100644 --- a/app/assets/javascripts/select-kit/components/select-kit/select-kit-collection.js.es6 +++ b/app/assets/javascripts/select-kit/components/select-kit/select-kit-collection.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ layoutName: "select-kit/templates/components/select-kit/select-kit-collection", classNames: ["select-kit-collection"], diff --git a/app/assets/javascripts/select-kit/components/select-kit/select-kit-filter.js.es6 b/app/assets/javascripts/select-kit/components/select-kit/select-kit-filter.js.es6 index 426261f4bfb..9576816708d 100644 --- a/app/assets/javascripts/select-kit/components/select-kit/select-kit-filter.js.es6 +++ b/app/assets/javascripts/select-kit/components/select-kit/select-kit-filter.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; const { isEmpty } = Ember; -export default Ember.Component.extend({ +export default Component.extend({ layoutName: "select-kit/templates/components/select-kit/select-kit-filter", classNames: ["select-kit-filter"], classNameBindings: ["isFocused", "isHidden"], diff --git a/app/assets/javascripts/select-kit/components/select-kit/select-kit-header.js.es6 b/app/assets/javascripts/select-kit/components/select-kit/select-kit-header.js.es6 index 00ffa0be873..807326c990d 100644 --- a/app/assets/javascripts/select-kit/components/select-kit/select-kit-header.js.es6 +++ b/app/assets/javascripts/select-kit/components/select-kit/select-kit-header.js.es6 @@ -1,7 +1,8 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; const { isEmpty, makeArray } = Ember; -export default Ember.Component.extend({ +export default Component.extend({ layoutName: "select-kit/templates/components/select-kit/select-kit-header", classNames: ["select-kit-header"], classNameBindings: ["isFocused", "isNone"], diff --git a/app/assets/javascripts/select-kit/components/select-kit/select-kit-row.js.es6 b/app/assets/javascripts/select-kit/components/select-kit/select-kit-row.js.es6 index 330baedff79..5b016fe9050 100644 --- a/app/assets/javascripts/select-kit/components/select-kit/select-kit-row.js.es6 +++ b/app/assets/javascripts/select-kit/components/select-kit/select-kit-row.js.es6 @@ -1,9 +1,10 @@ +import Component from "@ember/component"; import { on } from "ember-addons/ember-computed-decorators"; import computed from "ember-addons/ember-computed-decorators"; const { run, isPresent, makeArray, isEmpty } = Ember; import UtilsMixin from "select-kit/mixins/utils"; -export default Ember.Component.extend(UtilsMixin, { +export default Component.extend(UtilsMixin, { layoutName: "select-kit/templates/components/select-kit/select-kit-row", classNames: ["select-kit-row"], tagName: "li", diff --git a/app/assets/javascripts/select-kit/components/topic-notifications-button.js.es6 b/app/assets/javascripts/select-kit/components/topic-notifications-button.js.es6 index 741b89106f2..399e9b0e2f4 100644 --- a/app/assets/javascripts/select-kit/components/topic-notifications-button.js.es6 +++ b/app/assets/javascripts/select-kit/components/topic-notifications-button.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ layoutName: "select-kit/templates/components/topic-notifications-button", classNames: "topic-notifications-button", showFullTitle: true, diff --git a/app/assets/javascripts/wizard/components/invite-list-user.js.es6 b/app/assets/javascripts/wizard/components/invite-list-user.js.es6 index 30ef3d178ac..cc07ab1a2db 100644 --- a/app/assets/javascripts/wizard/components/invite-list-user.js.es6 +++ b/app/assets/javascripts/wizard/components/invite-list-user.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["invite-list-user"], @computed("user.role") diff --git a/app/assets/javascripts/wizard/components/invite-list.js.es6 b/app/assets/javascripts/wizard/components/invite-list.js.es6 index 13902ca2d63..bbf0af5a1ca 100644 --- a/app/assets/javascripts/wizard/components/invite-list.js.es6 +++ b/app/assets/javascripts/wizard/components/invite-list.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ classNames: ["invite-list"], users: null, inviteEmail: "", diff --git a/app/assets/javascripts/wizard/components/popular-themes.js.es6 b/app/assets/javascripts/wizard/components/popular-themes.js.es6 index e9b68dc80ba..794d8925e1b 100644 --- a/app/assets/javascripts/wizard/components/popular-themes.js.es6 +++ b/app/assets/javascripts/wizard/components/popular-themes.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import { POPULAR_THEMES } from "discourse-common/helpers/popular-themes"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["popular-themes"], init() { diff --git a/app/assets/javascripts/wizard/components/radio-button.js.es6 b/app/assets/javascripts/wizard/components/radio-button.js.es6 index 1dc2803cdd9..b40d9839f12 100644 --- a/app/assets/javascripts/wizard/components/radio-button.js.es6 +++ b/app/assets/javascripts/wizard/components/radio-button.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import { observes, on } from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ tagName: "label", click(e) { diff --git a/app/assets/javascripts/wizard/components/staff-count.js.es6 b/app/assets/javascripts/wizard/components/staff-count.js.es6 index 7677d999dea..2e7db93b3cb 100644 --- a/app/assets/javascripts/wizard/components/staff-count.js.es6 +++ b/app/assets/javascripts/wizard/components/staff-count.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ @computed("field.value") showStaffCount: staffCount => staffCount > 1 }); diff --git a/app/assets/javascripts/wizard/components/theme-previews.js.es6 b/app/assets/javascripts/wizard/components/theme-previews.js.es6 index 57c74ccab27..6afd85cbff3 100644 --- a/app/assets/javascripts/wizard/components/theme-previews.js.es6 +++ b/app/assets/javascripts/wizard/components/theme-previews.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ actions: { changed(value) { this.set("field.value", value); diff --git a/app/assets/javascripts/wizard/components/wizard-canvas.js.es6 b/app/assets/javascripts/wizard/components/wizard-canvas.js.es6 index bed1a2f9a9b..81dbc2c3afc 100644 --- a/app/assets/javascripts/wizard/components/wizard-canvas.js.es6 +++ b/app/assets/javascripts/wizard/components/wizard-canvas.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; const MAX_PARTICLES = 150; const SIZE = 144; @@ -52,7 +53,7 @@ class Particle { } } -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["wizard-canvas"], tagName: "canvas", ctx: null, diff --git a/app/assets/javascripts/wizard/components/wizard-field-dropdown.js.es6 b/app/assets/javascripts/wizard/components/wizard-field-dropdown.js.es6 index 3747a92bca6..85ab4032d4b 100644 --- a/app/assets/javascripts/wizard/components/wizard-field-dropdown.js.es6 +++ b/app/assets/javascripts/wizard/components/wizard-field-dropdown.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ keyPress(e) { e.stopPropagation(); } diff --git a/app/assets/javascripts/wizard/components/wizard-field-image.js.es6 b/app/assets/javascripts/wizard/components/wizard-field-image.js.es6 index 86de715b708..f2022c3ec7a 100644 --- a/app/assets/javascripts/wizard/components/wizard-field-image.js.es6 +++ b/app/assets/javascripts/wizard/components/wizard-field-image.js.es6 @@ -1,9 +1,10 @@ +import Component from "@ember/component"; import getUrl from "discourse-common/lib/get-url"; import computed from "ember-addons/ember-computed-decorators"; import { getToken } from "wizard/lib/ajax"; import { getOwner } from "discourse-common/lib/get-owner"; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["wizard-image-row"], uploading: false, diff --git a/app/assets/javascripts/wizard/components/wizard-field-radio.js.es6 b/app/assets/javascripts/wizard/components/wizard-field-radio.js.es6 index 57c74ccab27..6afd85cbff3 100644 --- a/app/assets/javascripts/wizard/components/wizard-field-radio.js.es6 +++ b/app/assets/javascripts/wizard/components/wizard-field-radio.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ actions: { changed(value) { this.set("field.value", value); diff --git a/app/assets/javascripts/wizard/components/wizard-field-textarea.js.es6 b/app/assets/javascripts/wizard/components/wizard-field-textarea.js.es6 index 3747a92bca6..85ab4032d4b 100644 --- a/app/assets/javascripts/wizard/components/wizard-field-textarea.js.es6 +++ b/app/assets/javascripts/wizard/components/wizard-field-textarea.js.es6 @@ -1,4 +1,5 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ keyPress(e) { e.stopPropagation(); } diff --git a/app/assets/javascripts/wizard/components/wizard-field.js.es6 b/app/assets/javascripts/wizard/components/wizard-field.js.es6 index 7eff48c1b07..f3f7e805234 100644 --- a/app/assets/javascripts/wizard/components/wizard-field.js.es6 +++ b/app/assets/javascripts/wizard/components/wizard-field.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ classNameBindings: [":wizard-field", "typeClass", "field.invalid"], @computed("field.type") diff --git a/app/assets/javascripts/wizard/components/wizard-image-preview.js.es6 b/app/assets/javascripts/wizard/components/wizard-image-preview.js.es6 index c616083ad60..f3c31f1346c 100644 --- a/app/assets/javascripts/wizard/components/wizard-image-preview.js.es6 +++ b/app/assets/javascripts/wizard/components/wizard-image-preview.js.es6 @@ -1,3 +1,4 @@ -export default Ember.Component.extend({ +import Component from "@ember/component"; +export default Component.extend({ classNameBindings: [":wizard-image-preview", "fieldClass"] }); diff --git a/app/assets/javascripts/wizard/components/wizard-step-form.js.es6 b/app/assets/javascripts/wizard/components/wizard-step-form.js.es6 index a60d5b39cb4..7bc7a8446ec 100644 --- a/app/assets/javascripts/wizard/components/wizard-step-form.js.es6 +++ b/app/assets/javascripts/wizard/components/wizard-step-form.js.es6 @@ -1,6 +1,7 @@ +import Component from "@ember/component"; import computed from "ember-addons/ember-computed-decorators"; -export default Ember.Component.extend({ +export default Component.extend({ classNameBindings: [":wizard-step-form", "customStepClass"], @computed("step.id") diff --git a/app/assets/javascripts/wizard/components/wizard-step.js.es6 b/app/assets/javascripts/wizard/components/wizard-step.js.es6 index 38c47b2d909..c938d1e1672 100644 --- a/app/assets/javascripts/wizard/components/wizard-step.js.es6 +++ b/app/assets/javascripts/wizard/components/wizard-step.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import getUrl from "discourse-common/lib/get-url"; import { default as computed, @@ -22,7 +23,7 @@ jQuery.fn.wiggle = function(times, duration) { const alreadyWarned = {}; -export default Ember.Component.extend({ +export default Component.extend({ classNames: ["wizard-step"], saving: null, diff --git a/app/assets/javascripts/wizard/lib/preview.js.es6 b/app/assets/javascripts/wizard/lib/preview.js.es6 index 307fc0126a3..0ee5a35b276 100644 --- a/app/assets/javascripts/wizard/lib/preview.js.es6 +++ b/app/assets/javascripts/wizard/lib/preview.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; /*eslint no-bitwise:0 */ import getUrl from "discourse-common/lib/get-url"; @@ -31,7 +32,7 @@ function canvasFor(image, w, h) { export function createPreviewComponent(width, height, obj) { const scale = window.devicePixelRatio; - return Ember.Component.extend( + return Component.extend( { layoutName: "components/theme-preview", width, diff --git a/plugins/discourse-local-dates/assets/javascripts/discourse/components/discourse-local-dates-create-form.js.es6 b/plugins/discourse-local-dates/assets/javascripts/discourse/components/discourse-local-dates-create-form.js.es6 index 918f8fdc084..6b2f7776f09 100644 --- a/plugins/discourse-local-dates/assets/javascripts/discourse/components/discourse-local-dates-create-form.js.es6 +++ b/plugins/discourse-local-dates/assets/javascripts/discourse/components/discourse-local-dates-create-form.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; /* global Pikaday:true */ import { propertyNotEqual } from "discourse/lib/computed"; import loadScript from "discourse/lib/load-script"; @@ -5,7 +6,7 @@ import { default as computed } from "ember-addons/ember-computed-decorators"; import { cookAsync } from "discourse/lib/text"; import debounce from "discourse/lib/debounce"; -export default Ember.Component.extend({ +export default Component.extend({ timeFormat: "HH:mm:ss", dateFormat: "YYYY-MM-DD", dateTimeFormat: "YYYY-MM-DD HH:mm:ss", diff --git a/plugins/discourse-presence/assets/javascripts/discourse/components/composer-presence-display.js.es6 b/plugins/discourse-presence/assets/javascripts/discourse/components/composer-presence-display.js.es6 index 18cfd47d92e..c6818bb2ce8 100644 --- a/plugins/discourse-presence/assets/javascripts/discourse/components/composer-presence-display.js.es6 +++ b/plugins/discourse-presence/assets/javascripts/discourse/components/composer-presence-display.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import { ajax } from "discourse/lib/ajax"; import { default as computed, @@ -8,7 +9,7 @@ import { export const keepAliveDuration = 10000; export const bufferTime = 3000; -export default Ember.Component.extend({ +export default Component.extend({ // Passed in variables action: null, post: null, diff --git a/plugins/discourse-presence/assets/javascripts/discourse/components/topic-presence-display.js.es6 b/plugins/discourse-presence/assets/javascripts/discourse/components/topic-presence-display.js.es6 index 7cab2563cb8..e6861cdf6ba 100644 --- a/plugins/discourse-presence/assets/javascripts/discourse/components/topic-presence-display.js.es6 +++ b/plugins/discourse-presence/assets/javascripts/discourse/components/topic-presence-display.js.es6 @@ -1,3 +1,4 @@ +import Component from "@ember/component"; import { default as computed, on @@ -9,7 +10,7 @@ import { const MB_GET_LAST_MESSAGE = -2; -export default Ember.Component.extend({ +export default Component.extend({ topicId: null, presenceUsers: null,