From f1e02a958ebc719a89a69919ddcce2d7313a691e Mon Sep 17 00:00:00 2001 From: Yuhuai Liu Date: Mon, 4 Oct 2021 17:35:23 -0400 Subject: [PATCH 1/3] Add bulk upload widget (#1307) * Add `settings` route, nest `notifications` + bulk upload widget under `settings` * Add bulk upload component * Add tests * Bump ember-template-lint --- .../-components/upload-csv/component.ts | 92 +++++++ .../-components/upload-csv/styles.scss | 9 + .../-components/upload-csv/template.hbs | 70 ++++++ .../moderation/notifications/template.hbs | 17 -- .../{notifications => settings}/controller.ts | 7 +- .../{notifications => settings}/route.ts | 2 +- .../branded/moderation/settings/template.hbs | 27 +++ .../addon/branded/moderation/template.hbs | 8 +- lib/registries/addon/routes.ts | 2 +- .../branded/moderation/notifications-test.ts | 63 ----- .../branded/moderation/settings-test.ts | 227 ++++++++++++++++++ translations/en-us.yml | 67 +++++- yarn.lock | 215 +++++++++++------ 13 files changed, 637 insertions(+), 169 deletions(-) create mode 100644 lib/registries/addon/branded/moderation/-components/upload-csv/component.ts create mode 100644 lib/registries/addon/branded/moderation/-components/upload-csv/styles.scss create mode 100644 lib/registries/addon/branded/moderation/-components/upload-csv/template.hbs delete mode 100644 lib/registries/addon/branded/moderation/notifications/template.hbs rename lib/registries/addon/branded/moderation/{notifications => settings}/controller.ts (69%) rename lib/registries/addon/branded/moderation/{notifications => settings}/route.ts (80%) create mode 100644 lib/registries/addon/branded/moderation/settings/template.hbs delete mode 100644 tests/engines/registries/acceptance/branded/moderation/notifications-test.ts create mode 100644 tests/engines/registries/acceptance/branded/moderation/settings-test.ts diff --git a/lib/registries/addon/branded/moderation/-components/upload-csv/component.ts b/lib/registries/addon/branded/moderation/-components/upload-csv/component.ts new file mode 100644 index 00000000000..1901172cb7e --- /dev/null +++ b/lib/registries/addon/branded/moderation/-components/upload-csv/component.ts @@ -0,0 +1,92 @@ +import config from 'ember-get-config'; +import { action } from '@ember/object'; +import Component from '@glimmer/component'; +import { tracked } from '@glimmer/tracking'; +import { inject as service } from '@ember/service'; +import Intl from 'ember-intl/services/intl'; +import { SafeString } from '@ember/template/-private/handlebars'; +import Toast from 'ember-toastr/services/toast'; + +const { OSF: { apiUrl } } = config; + +interface Args { + providerId: string; +} + +interface ErrorMessage { + cell: string; + title: string; + detail: string | SafeString; +} +interface ApiErrorDetail { + header: string; + column_index: string; + row_index: string; + type: string; + invalidHeaders?: string[]; + missingHeaders?: string[]; +} +export default class UploadCsvComponent extends Component { + dropzoneOptions = { + createImageThumbnails: false, + method: 'PUT', + withCredentials: true, + preventMultipleFiles: true, + acceptDirectories: false, + }; + + @service intl!: Intl; + @service toast!: Toast; + + @tracked errorMessages: ErrorMessage[] = []; + @tracked shouldShowErrorModal = false; + @tracked uploading: any[] = []; + + @action + buildUrl(files: any) { + return `${apiUrl}/_/registries/${this.args.providerId}/bulk_create/${files[0].name}/`; + } + + @action + addedFile(_: any, __: any, file: any) { + this.uploading.push(file); + } + + @action + error(_: any, __: any, file: any, { errors }: { errors: ApiErrorDetail[]}) { + this.uploading.removeObject(file); + this.shouldShowErrorModal = true; + for (const error of errors) { + this.errorMessages.push( + { + cell: error.column_index + error.row_index, + title: this.intl.t(`registries.moderation.settings.${error.type}.title`), + detail: this.intl.t(`registries.moderation.settings.${error.type}.detail`, { + htmlSafe: true, + invalidIds: error.invalidHeaders ? error.invalidHeaders.join(', ') : null, + missingIds: error.missingHeaders ? error.missingHeaders.join(', ') : null, + }), + }, + ); + } + } + + @action + success(_: any, __: any, file: any, ___: any) { + this.uploading.removeObject(file); + this.toast.success(this.intl.t('registries.moderation.settings.uploadSuccess')); + } + + @action + closeErrorModal() { + this.shouldShowErrorModal = false; + this.errorMessages = []; + } + + @action + async copyToClipboard(elementId: string) { + const mainElement = document.getElementById(elementId); + await navigator.clipboard.writeText(mainElement!.textContent!); + this.toast.success(this.intl.t('registries.moderation.settings.copyToClipboardSuccess')); + } +} diff --git a/lib/registries/addon/branded/moderation/-components/upload-csv/styles.scss b/lib/registries/addon/branded/moderation/-components/upload-csv/styles.scss new file mode 100644 index 00000000000..fa6727092d2 --- /dev/null +++ b/lib/registries/addon/branded/moderation/-components/upload-csv/styles.scss @@ -0,0 +1,9 @@ +.upload-zone-content { + text-align: center; +} + +.upload-zone { + padding: 50px; + background: #f5f5f5; + border: 5px dashed #c7c7c7; +} diff --git a/lib/registries/addon/branded/moderation/-components/upload-csv/template.hbs b/lib/registries/addon/branded/moderation/-components/upload-csv/template.hbs new file mode 100644 index 00000000000..661b78d67e7 --- /dev/null +++ b/lib/registries/addon/branded/moderation/-components/upload-csv/template.hbs @@ -0,0 +1,70 @@ +{{#let (unique-id 'upload-csv-dropzone') as |id|}} + +
+
+ +
+ {{t 'registries.moderation.settings.dropCsvHere'}} +
+
+
+
+{{/let}} + +{{#let (unique-id 'main-content') as |id|}} + + + {{t 'registries.moderation.settings.uploadError'}} + + +
+

{{t 'registries.moderation.settings.generalErrorMessage' htmlSafe=true}}

+
+ +
+ {{#each this.errorMessages as |msg|}} +

+ {{#if msg.cell}} +

{{t 'registries.moderation.settings.cell'}} {{msg.cell}}
+ {{/if}} +
{{msg.title}}
+
{{msg.detail}}
+

+ {{/each}} +
+
+ + + {{t 'registries.moderation.settings.copyToClipboard'}} + + +
+{{/let}} \ No newline at end of file diff --git a/lib/registries/addon/branded/moderation/notifications/template.hbs b/lib/registries/addon/branded/moderation/notifications/template.hbs deleted file mode 100644 index bdf257d2bba..00000000000 --- a/lib/registries/addon/branded/moderation/notifications/template.hbs +++ /dev/null @@ -1,17 +0,0 @@ -{{page-title (t 'registries.moderation.notifications.title') prepend=false}} - -

- {{t 'registries.moderation.notifications.heading'}} -

-

- {{t 'registries.moderation.notifications.paragraph' link=this.userSettingsLink htmlSafe=true}} -

- - - - diff --git a/lib/registries/addon/branded/moderation/notifications/controller.ts b/lib/registries/addon/branded/moderation/settings/controller.ts similarity index 69% rename from lib/registries/addon/branded/moderation/notifications/controller.ts rename to lib/registries/addon/branded/moderation/settings/controller.ts index 3f49449b413..de05ff74cd2 100644 --- a/lib/registries/addon/branded/moderation/notifications/controller.ts +++ b/lib/registries/addon/branded/moderation/settings/controller.ts @@ -3,11 +3,16 @@ import { computed } from '@ember/object'; import { alias } from '@ember/object/computed'; import config from 'ember-get-config'; import pathJoin from 'ember-osf-web/utils/path-join'; +import { ReviewPermissions } from 'ember-osf-web/models/provider'; -export default class BrandedModerationNotificationsController extends Controller { +export default class BrandedModerationSettingsController extends Controller { userSettingsLink = pathJoin(config.OSF.url, 'settings', 'notifications'); @alias('model.id') providerId?: string; + get shouldShowBulkUploadWidget() { + return this.model.permissions.includes(ReviewPermissions.AddModerator); + } + @computed('providerId') get subscriptionIds() { return this.providerId diff --git a/lib/registries/addon/branded/moderation/notifications/route.ts b/lib/registries/addon/branded/moderation/settings/route.ts similarity index 80% rename from lib/registries/addon/branded/moderation/notifications/route.ts rename to lib/registries/addon/branded/moderation/settings/route.ts index d2c2b4f0e85..d659ae64a56 100644 --- a/lib/registries/addon/branded/moderation/notifications/route.ts +++ b/lib/registries/addon/branded/moderation/settings/route.ts @@ -4,7 +4,7 @@ import { inject as service } from '@ember/service'; import Analytics from 'ember-osf-web/services/analytics'; -export default class BrandedModerationNotificationsRoute extends Route { +export default class BrandedModerationSettingsRoute extends Route { @service analytics!: Analytics; @action diff --git a/lib/registries/addon/branded/moderation/settings/template.hbs b/lib/registries/addon/branded/moderation/settings/template.hbs new file mode 100644 index 00000000000..91e47e7ba53 --- /dev/null +++ b/lib/registries/addon/branded/moderation/settings/template.hbs @@ -0,0 +1,27 @@ +{{page-title (t 'registries.moderation.settings.title') prepend=false}} + +

+ {{t 'registries.moderation.settings.heading'}} +

+

+ {{t 'registries.moderation.settings.paragraph' link=this.userSettingsLink htmlSafe=true}} +

+ + + + + +{{#if this.shouldShowBulkUploadWidget}} +

+ {{t 'registries.moderation.settings.bulkUpload'}} +

+

+ {{t 'registries.moderation.settings.bulkUploadHelpText'}} +

+ +{{/if}} \ No newline at end of file diff --git a/lib/registries/addon/branded/moderation/template.hbs b/lib/registries/addon/branded/moderation/template.hbs index ba43fe5121d..c3c25efb35b 100644 --- a/lib/registries/addon/branded/moderation/template.hbs +++ b/lib/registries/addon/branded/moderation/template.hbs @@ -36,13 +36,13 @@ {{/let}} - {{#let 'registries.branded.moderation.notifications' as |notificationsRoute|}} - + {{#let 'registries.branded.moderation.settings' as |settingsRoute|}} + - {{t 'registries.moderation.notifications.title'}} + {{t 'registries.moderation.settings.title'}} {{/let}} diff --git a/lib/registries/addon/routes.ts b/lib/registries/addon/routes.ts index 4f0c0a7d6ff..134766b6ea5 100644 --- a/lib/registries/addon/routes.ts +++ b/lib/registries/addon/routes.ts @@ -9,7 +9,7 @@ export default buildRoutes(function() { this.route('moderation', function() { this.route('submissions'); this.route('moderators'); - this.route('notifications'); + this.route('settings'); }); }); diff --git a/tests/engines/registries/acceptance/branded/moderation/notifications-test.ts b/tests/engines/registries/acceptance/branded/moderation/notifications-test.ts deleted file mode 100644 index 8b4ea85375e..00000000000 --- a/tests/engines/registries/acceptance/branded/moderation/notifications-test.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { currentRouteName } from '@ember/test-helpers'; -import { setupMirage } from 'ember-cli-mirage/test-support'; -import { percySnapshot } from 'ember-percy'; -import { module, test } from 'qunit'; - -import { SubscriptionFrequency } from 'ember-osf-web/models/subscription'; -import { visit } from 'ember-osf-web/tests/helpers'; -import { setupEngineApplicationTest } from 'ember-osf-web/tests/helpers/engines'; - -module('Registries | Acceptance | branded.moderation | notifications', hooks => { - setupEngineApplicationTest(hooks, 'registries'); - setupMirage(hooks); - - hooks.beforeEach(() => { - server.create('registration-provider', { id: 'mdr8n' }); - server.create('subscription', { - id: 'mdr8n_new_pending_submissions', - eventName: 'new_pending_submissions', - frequency: SubscriptionFrequency.Instant, - }); - server.create('subscription', { - id: 'mdr8n_new_pending_withdraw_requests', - eventName: 'new_pending_withdraw_requests', - frequency: SubscriptionFrequency.Instant, - }); - server.create('subscription', { - id: 'cat_photo_repository_subscription', - eventName: 'cat_photo_repository_subscription', - frequency: SubscriptionFrequency.Daily, - }); - }); - - test('logged out users are rerouted', async assert => { - await visit('/registries/mdr8n/moderation/notifications'); - assert.equal(currentRouteName(), 'registries.page-not-found', 'Non-moderators are rerouted'); - }); - - test('logged in, non-moderators are rerouted', async assert => { - server.create('user', 'loggedIn'); - await visit('/registries/mdr8n/moderation/notifications'); - assert.equal(currentRouteName(), 'registries.page-not-found', 'Non-moderators are rerouted'); - }); - - test('notifications list for moderators', async assert => { - const regProvider = server.schema.registrationProviders.find('mdr8n'); - const currentUser = server.create('user', 'loggedIn'); - server.create('moderator', { id: currentUser.id, user: currentUser, provider: regProvider }, 'asModerator'); - regProvider.update({ permissions: ['view_submissions'] }); - await visit('/registries/mdr8n/moderation/notifications'); - await percySnapshot('moderation notifications page'); - assert.equal(currentRouteName(), 'registries.branded.moderation.notifications', - 'On the notifications page of registries reviews'); - assert.dom('[data-test-subscription-list]').exists('Subscription list shown'); - assert.dom('[data-test-subscription-list-row="mdr8n_new_pending_submissions"]') - .exists('Pending submissions notification shown'); - assert.dom('[data-test-subscription-list-row="mdr8n_new_pending_withdraw_requests"]') - .exists('Pending withdraw requests notification shown'); - assert.dom('[data-test-subscription-list-row="cat_photo_repository_subscription"]') - .doesNotExist('Other subscriptions are not shown'); - assert.dom('[data-test-subscription-list-row="mdr8n_new_pending_withdraw_requests"] [data-test-power-select]') - .hasText('Instant', 'Subscription frequency is shown correctly'); - }); -}); diff --git a/tests/engines/registries/acceptance/branded/moderation/settings-test.ts b/tests/engines/registries/acceptance/branded/moderation/settings-test.ts new file mode 100644 index 00000000000..e0ba15699cd --- /dev/null +++ b/tests/engines/registries/acceptance/branded/moderation/settings-test.ts @@ -0,0 +1,227 @@ +import { currentRouteName } from '@ember/test-helpers'; +import { setupMirage } from 'ember-cli-mirage/test-support'; +import { percySnapshot } from 'ember-percy'; +import { module, test } from 'qunit'; + +import { SubscriptionFrequency } from 'ember-osf-web/models/subscription'; +import { click, visit } from 'ember-osf-web/tests/helpers'; +import { setupEngineApplicationTest } from 'ember-osf-web/tests/helpers/engines'; +import { triggerEvent, settled } from '@ember/test-helpers'; +import { t } from 'ember-intl/test-support'; +import stripHtmlTags from 'ember-osf-web/utils/strip-html-tags'; + +module('Registries | Acceptance | branded.moderation | settings', hooks => { + setupEngineApplicationTest(hooks, 'registries'); + setupMirage(hooks); + + hooks.beforeEach(() => { + server.create('registration-provider', { id: 'mdr8n' }); + server.create('subscription', { + id: 'mdr8n_new_pending_submissions', + eventName: 'new_pending_submissions', + frequency: SubscriptionFrequency.Instant, + }); + server.create('subscription', { + id: 'mdr8n_new_pending_withdraw_requests', + eventName: 'new_pending_withdraw_requests', + frequency: SubscriptionFrequency.Instant, + }); + server.create('subscription', { + id: 'cat_photo_repository_subscription', + eventName: 'cat_photo_repository_subscription', + frequency: SubscriptionFrequency.Daily, + }); + }); + + test('logged out users are rerouted', async assert => { + await visit('/registries/mdr8n/moderation/settings'); + assert.equal(currentRouteName(), 'registries.page-not-found', 'Non-moderators are rerouted'); + }); + + test('logged in, non-moderators are rerouted', async assert => { + server.create('user', 'loggedIn'); + await visit('/registries/mdr8n/moderation/settings'); + assert.equal(currentRouteName(), 'registries.page-not-found', 'Non-moderators are rerouted'); + }); + + test('notifications list shows for moderators, but not bulk upload widget', async assert => { + const regProvider = server.schema.registrationProviders.find('mdr8n'); + const currentUser = server.create('user', 'loggedIn'); + server.create('moderator', { id: currentUser.id, user: currentUser, provider: regProvider }, 'asModerator'); + regProvider.update({ permissions: ['view_submissions'] }); + await visit('/registries/mdr8n/moderation/settings'); + await percySnapshot('moderation settings page for moderators'); + assert.equal(currentRouteName(), 'registries.branded.moderation.settings', + 'On the settings page of registries reviews'); + assert.dom('[data-test-subscription-list]').exists('Subscription list shown'); + assert.dom('[data-test-subscription-list-row="mdr8n_new_pending_submissions"]') + .exists('Pending submissions notification shown'); + assert.dom('[data-test-subscription-list-row="mdr8n_new_pending_withdraw_requests"]') + .exists('Pending withdraw requests notification shown'); + assert.dom('[data-test-subscription-list-row="cat_photo_repository_subscription"]') + .doesNotExist('Other subscriptions are not shown'); + assert.dom('[data-test-subscription-list-row="mdr8n_new_pending_withdraw_requests"] [data-test-power-select]') + .hasText('Instant', 'Subscription frequency is shown correctly'); + assert.dom('[data-test-bulk-upload-widget]').doesNotExist(); + }); + + test('notifications list and bulk upload widget shows for admins', async assert => { + const regProvider = server.schema.registrationProviders.find('mdr8n'); + const currentUser = server.create('user', 'loggedIn'); + server.create('moderator', { id: currentUser.id, user: currentUser, provider: regProvider }, 'asModerator'); + regProvider.update({ permissions: ['view_submissions', 'add_moderator'] }); + await visit('/registries/mdr8n/moderation/settings'); + await percySnapshot('moderation settings page for admins'); + assert.equal(currentRouteName(), 'registries.branded.moderation.settings', + 'On the settings page of registries reviews'); + assert.dom('[data-test-subscription-list]').exists('Subscription list shown'); + assert.dom('[data-test-subscription-list-row="mdr8n_new_pending_submissions"]') + .exists('Pending submissions notification shown'); + assert.dom('[data-test-subscription-list-row="mdr8n_new_pending_withdraw_requests"]') + .exists('Pending withdraw requests notification shown'); + assert.dom('[data-test-subscription-list-row="cat_photo_repository_subscription"]') + .doesNotExist('Other subscriptions are not shown'); + assert.dom('[data-test-subscription-list-row="mdr8n_new_pending_withdraw_requests"] [data-test-power-select]') + .hasText('Instant', 'Subscription frequency is shown correctly'); + assert.dom('[data-test-bulk-upload-widget]').exists(); + }); + + test('test bulk upload widget', async assert => { + const filename = 'itzy.csv'; + const triggerFileUpload = () => triggerEvent( + '[data-test-bulk-upload-widget]', + 'drop', + { + dataTransfer: { + files: [new File(['Loco!'], filename)], + }, + }, + ); + const regProvider = server.schema.registrationProviders.find('mdr8n'); + const currentUser = server.create('user', 'loggedIn'); + server.create('moderator', { id: currentUser.id, user: currentUser, provider: regProvider }, 'asModerator'); + regProvider.update({ permissions: ['view_submissions', 'add_moderator'] }); + await visit('/registries/mdr8n/moderation/settings'); + assert.dom('[data-test-bulk-upload-widget]').exists(); + server.namespace = '/_'; + + // upload successful + server.put(`/registries/mdr8n/bulk_create/${filename}`, () => ({}), 204); + await triggerFileUpload(); + await settled(); + assert.dom('#toast-container', document as unknown as Element).hasTextContaining( + t('registries.moderation.settings.uploadSuccess'), + 'Toast message shows and contains success msg', + ); + + // invalid schema id + server.put(`/registries/mdr8n/bulk_create/${filename}`, () => ({ + errors: [{ type: 'invalidSchemaId'}], + }), 400); + await triggerFileUpload(); + await settled(); + assert.dom('[data-test-error-modal-heading]').hasText(t('registries.moderation.settings.uploadError')); + assert.dom('[data-test-error-modal-general-message]'). + hasText(stripHtmlTags(t('registries.moderation.settings.generalErrorMessage'))); + assert.dom('[data-test-error-modal-message-title]').exists({ count: 1 }); + assert.dom('[data-test-error-modal-message-title]') + .hasText(t('registries.moderation.settings.invalidSchemaId.title')); + assert.dom('[data-test-error-modal-message-detail]').exists({ count: 1 }); + assert.dom('[data-test-error-modal-message-detail]') + .hasText(stripHtmlTags(t('registries.moderation.settings.invalidSchemaId.detail'))); + await click('[data-test-close-dialog]'); + + // invalid column id + const invalidHeaders = ['q1', 'q2']; + const missingHeaders = ['q3', 'q4']; + server.put(`/registries/mdr8n/bulk_create/${filename}`, () => ({ + errors: [{ type: 'invalidColumnId', invalidHeaders, missingHeaders }], + }), 400); + await triggerFileUpload(); + await settled(); + assert.dom('[data-test-error-modal-message-title]').exists({ count: 1 }); + assert.dom('[data-test-error-modal-message-title]') + .hasText(t('registries.moderation.settings.invalidColumnId.title')); + assert.dom('[data-test-error-modal-message-detail]').exists({ count: 1 }); + assert.dom('[data-test-error-modal-message-detail]') + .hasText(stripHtmlTags(t( + 'registries.moderation.settings.invalidColumnId.detail', + { + invalidIds: invalidHeaders.join(', '), + missingIds: missingHeaders.join(', '), + }, + ))); + await click('[data-test-close-dialog]'); + + // size exceeds limit + server.put(`/registries/mdr8n/bulk_create/${filename}`, () => ({ + errors: [{ type: 'sizeExceedsLimit'}], + }), 400); + await triggerFileUpload(); + await settled(); + assert.dom('[data-test-error-modal-message-title]').exists({ count: 1 }); + assert.dom('[data-test-error-modal-message-title]') + .hasText(t('registries.moderation.settings.sizeExceedsLimit.title')); + assert.dom('[data-test-error-modal-message-detail]').exists({ count: 1 }); + assert.dom('[data-test-error-modal-message-detail]') + .hasText(stripHtmlTags(t('registries.moderation.settings.sizeExceedsLimit.detail'))); + await click('[data-test-close-dialog]'); + + // bulk upload job exists + server.put(`/registries/mdr8n/bulk_create/${filename}`, () => ({ + errors: [{ type: 'bulkUploadJobExists'}], + }), 400); + await triggerFileUpload(); + await settled(); + assert.dom('[data-test-error-modal-message-title]').exists({ count: 1 }); + assert.dom('[data-test-error-modal-message-title]') + .hasText(t('registries.moderation.settings.bulkUploadJobExists.title')); + assert.dom('[data-test-error-modal-message-detail]').exists({ count: 1 }); + assert.dom('[data-test-error-modal-message-detail]') + .hasText(t('registries.moderation.settings.bulkUploadJobExists.detail')); + await click('[data-test-close-dialog]'); + + // invalid file type + server.put(`/registries/mdr8n/bulk_create/${filename}`, () => ({ + errors: [{ type: 'invalidFileType'}], + }), 400); + await triggerFileUpload(); + await settled(); + assert.dom('[data-test-error-modal-message-title]').exists({ count: 1 }); + assert.dom('[data-test-error-modal-message-title]') + .hasText(t('registries.moderation.settings.invalidFileType.title')); + assert.dom('[data-test-error-modal-message-detail]').exists({ count: 1 }); + assert.dom('[data-test-error-modal-message-detail]') + .hasText(stripHtmlTags(t('registries.moderation.settings.invalidFileType.detail'))); + await click('[data-test-close-dialog]'); + + // invalid cells + const errors = [ + { type: 'invalidProjectId', row_index: 52, column_index: 'B' }, + { type: 'invalidInstitutionName', row_index: 52, column_index: 'B' }, + { type: 'invalidLicenseName', row_index: 52, column_index: 'B' }, + { type: 'invalidSubjectName', row_index: 52, column_index: 'B' }, + { type: 'invalidCategoryName', row_index: 52, column_index: 'B' }, + { type: 'invalidResponse', row_index: 52, column_index: 'B' }, + { type: 'invalidContributors', row_index: 52, column_index: 'B' }, + ]; + server.put(`/registries/mdr8n/bulk_create/${filename}`, () => ({ + errors, + }), 400); + await triggerFileUpload(); + await settled(); + assert.dom('[data-test-error-modal-cell-identifier]').exists({ count: 7 }); + const cellIdElements = document.querySelectorAll('[data-test-error-modal-cell-identifier]'); + cellIdElements.forEach(element => assert.equal(element.textContent, 'Cell B52')); + assert.dom('[data-test-error-modal-message-title]').exists({ count: 7 }); + const msgTitleElements = document.querySelectorAll('[data-test-error-modal-message-title]'); + msgTitleElements.forEach((element, index) => assert.equal( + element.textContent, t(`registries.moderation.settings.${errors[index].type}.title`), + )); + assert.dom('[data-test-error-modal-message-detail]').exists({ count: 7 }); + const msgDetailElements = document.querySelectorAll('[data-test-error-modal-message-detail]'); + msgDetailElements.forEach((element, index) => assert.equal( + element.textContent, stripHtmlTags(t(`registries.moderation.settings.${errors[index].type}.detail`)), + )); + }); +}); diff --git a/translations/en-us.yml b/translations/en-us.yml index 7a73229f526..abbcc683548 100644 --- a/translations/en-us.yml +++ b/translations/en-us.yml @@ -1022,10 +1022,73 @@ registries: removedModeratorError: 'Error removing {permission}' updatedModeratorPermissionSuccess: 'Successfully updated {userName} to {permission}' updatedModeratorPermissionError: 'Error updating permission to {permission}' - notifications: - title: 'Notifications' + settings: + title: 'Settings' heading: 'Configure reviews notification preferences' paragraph: 'To configure other notification preferences visit your user settings.' + bulkUpload: 'Bulk upload' + bulkUploadHelpText: 'Drag and drop the csv file that has the registration information to upload.' + dropCsvHere: 'Drop csv file here to upload' + uploadError: 'Upload error' + copyToClipboard: 'Copy to clipboard' + cell: 'Cell' + copyToClipboardSuccess: 'Successfully copied to clipboard.' + generalErrorMessage: 'Your file was not uploaded due to the errors listed below. Please correct the errors and try again. If you have any questions, please contact the help desk at support@osf.io.' + invalidSchemaId: + title: 'Invalid schema ID' + detail: 'The schema ID in this cell does not match with a registration template in our system. It’s likely this ID was manually edited after it was downloaded or the registration template is outdated. Contact the help desk at support@osf.io for the current ID or a new csv file.' + invalidColumnId: + title: 'Invalid column ID' + detail: 'This Column ID does not match with the ones used by this registration template. It’s likely it was manually edited after it was downloaded or the registration template is outdated. Contact the help desk at support@osf.io for the current ID or a new csv file.
Invalid IDs: {invalidIds}.
Missing IDs: {missingIds}.' + invalidProjectId: + title: 'Invalid project ID' + detail: 'This Project GUID does not exist. Check that each project’s GUID is accurate. Registrations that do not have a project should have a blank cell.' + invalidInstitutionName: + title: 'Invalid institution name' + detail: 'This affiliated institution name does not match our system. Check that the institution’s name is spelled correctly. Click here to view a list of currently active affiliated institutions.' + invalidLicenseName: + title: 'Invalid license name' + detail: 'This license does not match our system. It’s likely that the license is either spelled incorrectly, is not an option in our system, or formatted incorrectly. Click here to view a list of available licenses. See section “CSV Templates” in our Moderator’s Guide for more information on formatting specific licenses.' + invalidSubjectName: + title: 'Invalid subject name' + detail: 'This subject does not match our system. It’s likely it is spelled incorrectly. OSF uses the bepress taxonomy. Only the word or phase after the last colon needs to be entered.' + invalidCategoryName: + title: 'Invalid category name' + detail: 'This category does not exist. Check that the category is spelled currently. See section “Field Formatting” in the Moderator Guide for a list of categories. Categories can be edited after the registration is submitted.' + invalidResponse: + title: 'Invalid response' + detail: 'This response is not acceptable by the system. It’s likely that this is due to misspelling or having multiple answers for a single response question. See section “Field Formatting” in the Moderator Guide for more information.' + invalidContributors: + title: 'Invalid format for contributors' + detail: 'This contributors list does not match the system’s formatting requirements. Review the required formatting in the Moderator’s Manual. Contact the help desk at support@osf.io if this is not the issue.' + missingTitle: + title: 'Missing title' + detail: 'This title is missing. Check that each registration has a title.' + missingDescription: + title: 'Missing description' + detail: 'This description is missing. Enter a high level summary of the registration. This summary can be edited after the registration is submitted.' + missingAdminContributor: + title: 'Missing admin contributor' + detail: 'This registration doesn’t include an admin contributor. A registration requires at least one admin contributor to be submitted. See section “Field Formatting” in the Moderator Guide for more information on formatting contributors.' + missingBibliographicContributor: + title: 'Missing bibliographic contributor' + detail: 'This registration doesn’t have any bibliographic contributors. Registration must have at least one bibliographic contributors. See section “Field Formatting” in the Moderator Guide for information on formatting contributors.' + missingLicenseName: + title: 'Missing license name' + detail: 'This license is missing. Check that each registration has a license.' + missingSubjectName: + title: 'Missing subject name' + detail: 'This subject is missing. Check that each registration has a subject.' + sizeExceedsLimit: + title: 'File size exceeds limit' + detail: 'The csv file exceeds the 1MB limit. Break the file into multiple files and reupload them. Contact the Help Desk at support@osf.io if you have any questions.' + bulkUploadJobExists: + title: 'Bulk upload job already exists' + detail: 'This csv file was already uploaded into the system and cannot be re-uploaded.' + invalidFileType: + title: 'Invalid file type' + detail: 'Only csv files can be uploaded in the system. Convert the file into the csv format and reupload the document. Contact the Help Desk at support@osf.io if you have any questions.' + uploadSuccess: 'Successfully uploaded csv file.' overview: title: 'Moderated Overview' new: diff --git a/yarn.lock b/yarn.lock index 40e36824257..0407830de5a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2033,15 +2033,15 @@ ember-cli-typescript "^3.1.4" ember-intl "^5.3.1" -"@ember-template-lint/todo-utils@^8.1.0": - version "8.1.0" - resolved "https://registry.yarnpkg.com/@ember-template-lint/todo-utils/-/todo-utils-8.1.0.tgz#0fe8ef9ebd1948dea34d27d89a2e245687bb57d9" - integrity sha512-fnxDli4RfYGVBXc64D0fg7ifkSrNE8J/ee4eqQLzTrsUJbisWMlmU2NTHm990XcZkulYkCnkiLKERU/k1tx5IQ== +"@ember-template-lint/todo-utils@^10.0.0": + version "10.0.0" + resolved "https://registry.yarnpkg.com/@ember-template-lint/todo-utils/-/todo-utils-10.0.0.tgz#085aafcf31ca04ba4d3a9460f088aed752b90ea8" + integrity sha512-US8VKnetBOl8KfKz+rXGsosz6rIETNwSz2F2frM8hIoJfF/d6ME1Iz1K7tPYZEE6SoKqZFlBs5XZPSmzRnabjA== dependencies: - "@types/eslint" "^7.2.10" + "@types/eslint" "^7.2.13" fs-extra "^9.1.0" slash "^3.0.0" - tslib "^2.1.0" + tslib "^2.2.0" "@ember/edition-utils@^1.2.0": version "1.2.0" @@ -2657,18 +2657,18 @@ call-me-maybe "^1.0.1" glob-to-regexp "^0.3.0" -"@nodelib/fs.scandir@2.1.4": - version "2.1.4" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz#d4b3549a5db5de2683e0c1071ab4f140904bbf69" - integrity sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA== +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== dependencies: - "@nodelib/fs.stat" "2.0.4" + "@nodelib/fs.stat" "2.0.5" run-parallel "^1.1.9" -"@nodelib/fs.stat@2.0.4", "@nodelib/fs.stat@^2.0.2": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz#a3f2dd61bab43b8db8fa108a121cfffe4c676655" - integrity sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q== +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== "@nodelib/fs.stat@^1.1.2": version "1.1.3" @@ -2676,11 +2676,11 @@ integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== "@nodelib/fs.walk@^1.2.3": - version "1.2.6" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz#cce9396b30aa5afe9e3756608f5831adcb53d063" - integrity sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow== + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== dependencies: - "@nodelib/fs.scandir" "2.1.4" + "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" "@samverschueren/stream-to-observable@^0.3.0": @@ -3003,18 +3003,18 @@ resolved "https://registry.yarnpkg.com/@types/ember__utils/-/ember__utils-3.16.2.tgz#3fa9a0666a3e8204262e2a2960289aaf01f29467" integrity sha512-tBbqewgegiKSpGZvGh3pbcoXwLCMvKVdLRE97vys75nAEz/vBzkGJm+PDz1HVaTkRukWbRhlDiTm2qFH8qRnSw== -"@types/eslint@^7.2.10": - version "7.2.10" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.2.10.tgz#4b7a9368d46c0f8cd5408c23288a59aa2394d917" - integrity sha512-kUEPnMKrqbtpCq/KTaGFFKAcz6Ethm2EjCoKIDaCmfRBWLbFuTcOJfTlorwbnboXBzahqWLgUp1BQeKHiJzPUQ== +"@types/eslint@^7.2.13": + version "7.28.0" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.28.0.tgz#7e41f2481d301c68e14f483fe10b017753ce8d5a" + integrity sha512-07XlgzX0YJUn4iG1ocY4IX9DzKSmMGUs6ESKlxWhZRaa0fatIWaHWUVapcuGa8r5HFnTqzj+4OCjd5f7EZ/i/A== dependencies: "@types/estree" "*" "@types/json-schema" "*" "@types/estree@*": - version "0.0.47" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.47.tgz#d7a51db20f0650efec24cd04994f523d93172ed4" - integrity sha512-c5ciR06jK8u9BstrmJyO97m+klJrrhCf9u3rLu3DEAJBirxRqSCvDQoYKmxuYwQI5SZChAWu+tq9oVlGRuzPAg== + version "0.0.50" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.50.tgz#1e0caa9364d3fccd2931c3ed96fdbeaa5d4cca83" + integrity sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw== "@types/express-serve-static-core@^4.17.18": version "4.17.19" @@ -3079,7 +3079,12 @@ resolved "https://registry.yarnpkg.com/@types/js-md5/-/js-md5-0.4.2.tgz#95b39911e2081bf2915436e61cc345e12459e5bb" integrity sha512-FUPoQkpQTzA5wz9ebrdVRjsjQsFehr+cW1CVhLcI2UwD/SO/4NHPO1esrXPPbx7ux762U0POmWFSrUjQq2ophw== -"@types/json-schema@*", "@types/json-schema@^7.0.3", "@types/json-schema@^7.0.5": +"@types/json-schema@*": + version "7.0.9" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" + integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== + +"@types/json-schema@^7.0.3", "@types/json-schema@^7.0.5": version "7.0.7" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad" integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA== @@ -3627,9 +3632,9 @@ ansi-regex@^4.1.0: integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== ansi-regex@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" - integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== ansi-styles@^2.2.1: version "2.2.1" @@ -6324,7 +6329,7 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.4 escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1: +chalk@^4.0.0: version "4.1.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.1.tgz#c80b3fab28bf6371e6863325eee67e618b77e6ad" integrity sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg== @@ -6332,6 +6337,14 @@ chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1: ansi-styles "^4.1.0" supports-color "^7.1.0" +chalk@^4.1.0, chalk@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + character-entities-html4@^1.0.0: version "1.1.4" resolved "https://registry.yarnpkg.com/character-entities-html4/-/character-entities-html4-1.1.4.tgz#0e64b0a3753ddbf1fdc044c5fd01d0199a02e125" @@ -6716,7 +6729,7 @@ commander@^4.1.1: resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== -commander@^6.2.0: +commander@^6.2.1: version "6.2.1" resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== @@ -7414,10 +7427,10 @@ date-fns@^1.27.2: resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c" integrity sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw== -date-fns@^2.21.3: - version "2.21.3" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.21.3.tgz#8f5f6889d7a96bbcc1f0ea50239b397a83357f9b" - integrity sha512-HeYdzCaFflc1i4tGbj7JKMjM4cKGYoyxwcIIkHzNgCkX8xXDNJDZXgDDVchIWpN4eQc3lH37WarduXFZJOtxfw== +date-fns@^2.23.0: + version "2.24.0" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.24.0.tgz#7d86dc0d93c87b76b63d213b4413337cfd1c105d" + integrity sha512-6ujwvwgPID6zbI0o7UbURi2vlLDR9uP26+tW6Lg+Ji3w7dd0i3DOcjcClLjLPranT60SSEFBwdSyYwn/ZkPIuw== date-time@^2.1.0: version "2.1.0" @@ -9882,40 +9895,41 @@ ember-template-compiler@^1.9.0-alpha: integrity sha1-GT38/PDYwbNZWpYJ60bZDQXTTy8= ember-template-lint@^3.2.0: - version "3.4.2" - resolved "https://registry.yarnpkg.com/ember-template-lint/-/ember-template-lint-3.4.2.tgz#d9480957b576b2b7ed02b4bf6bdb7c4b80243581" - integrity sha512-YorsJ5cVmrt0hm2gTVwsKsX/NpYp6X7oa+z7a2iAtwBEz4GyEImUpH3YF7ilXHMFB6d5k96LLKzF73cyBJliuQ== - dependencies: - "@ember-template-lint/todo-utils" "^8.1.0" - chalk "^4.1.1" - date-fns "^2.21.3" - ember-template-recast "^5.0.1" + version "3.7.0" + resolved "https://registry.yarnpkg.com/ember-template-lint/-/ember-template-lint-3.7.0.tgz#e0565102b291974afeb65de6933f0d154be508d3" + integrity sha512-C3oFFdB+g14CvFKZrnAS8Yt0IojTpOhdU5KZoLUs6hOgQjkEF4l/OCBNPtBmL8Nm/dxmc5iTsd5TL98CCcnK+w== + dependencies: + "@ember-template-lint/todo-utils" "^10.0.0" + chalk "^4.1.2" + date-fns "^2.23.0" + ember-template-recast "^5.0.3" find-up "^5.0.0" fuse.js "^6.4.6" get-stdin "^8.0.0" - globby "^11.0.3" + globby "^11.0.4" is-glob "^4.0.1" micromatch "^4.0.4" + requireindex "^1.2.0" resolve "^1.20.0" v8-compile-cache "^2.3.0" yargs "^16.2.0" -ember-template-recast@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/ember-template-recast/-/ember-template-recast-5.0.1.tgz#c5d9e7208bf629ee368a3792328f245f3c651003" - integrity sha512-MtjyYtr5jnE72i/jVkI3m2QOdozglLwXS3HN74Ge9cm7dz5GoDszVvUksyj/9xqpIP31LMXjs2bZetRGvinU1Q== +ember-template-recast@^5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/ember-template-recast/-/ember-template-recast-5.0.3.tgz#79df27a70bdce7be17f14db13886afde1e9d02d6" + integrity sha512-qsJYQhf29Dk6QMfviXhUPE+byMOs6iRQxUDHgkj8yqjeppvjHaFG96hZi/NAXJTm/M7o3PpfF5YlmeaKtI9UeQ== dependencies: "@glimmer/reference" "^0.65.0" "@glimmer/syntax" "^0.65.0" "@glimmer/validator" "^0.65.0" async-promise-queue "^1.0.5" colors "^1.4.0" - commander "^6.2.0" - globby "^11.0.1" - ora "^5.1.0" + commander "^6.2.1" + globby "^11.0.3" + ora "^5.4.0" slash "^3.0.0" tmp "^0.2.1" - workerpool "^6.0.3" + workerpool "^6.1.4" ember-test-selectors@^5.0.0: version "5.1.0" @@ -10806,7 +10820,7 @@ fast-glob@^2.2.6: merge2 "^1.2.3" micromatch "^3.1.10" -fast-glob@^3.0.3, fast-glob@^3.1.1: +fast-glob@^3.0.3: version "3.2.5" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.5.tgz#7939af2a656de79a4f1901903ee8adcaa7cb9661" integrity sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg== @@ -10818,6 +10832,17 @@ fast-glob@^3.0.3, fast-glob@^3.1.1: micromatch "^4.0.2" picomatch "^2.2.1" +fast-glob@^3.1.1: + version "3.2.7" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.7.tgz#fd6cb7a2d7e9aa7a7846111e85a196d6b2f766a1" + integrity sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + fast-json-stable-stringify@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" @@ -10889,9 +10914,9 @@ fastparse@^1.1.2: integrity sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ== fastq@^1.6.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.11.0.tgz#bb9fb955a07130a918eb63c1f5161cc32a5d0858" - integrity sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g== + version "1.13.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" + integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== dependencies: reusify "^1.0.4" @@ -11730,7 +11755,7 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" -glob-parent@^5.0.0, glob-parent@^5.1.0, glob-parent@~5.1.0: +glob-parent@^5.0.0, glob-parent@^5.1.0, glob-parent@^5.1.2, glob-parent@~5.1.0: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== @@ -11877,10 +11902,10 @@ globby@10.0.0: merge2 "^1.2.3" slash "^3.0.0" -globby@^11.0.1, globby@^11.0.3: - version "11.0.3" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.3.tgz#9b1f0cb523e171dd1ad8c7b2a9fb4b644b9593cb" - integrity sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg== +globby@^11.0.1, globby@^11.0.3, globby@^11.0.4: + version "11.0.4" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.4.tgz#2cbaff77c2f2a62e71e9b2813a67b97a3a3001a5" + integrity sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg== dependencies: array-union "^2.1.0" dir-glob "^3.0.1" @@ -11959,11 +11984,16 @@ good-listener@^1.2.2: dependencies: delegate "^3.1.2" -graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0: +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.9: version "4.2.6" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ== +graceful-fs@^4.1.6, graceful-fs@^4.2.0: + version "4.2.8" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a" + integrity sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg== + graceful-fs@~4.1.2: version "4.1.15" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" @@ -12737,9 +12767,9 @@ is-ci@^2.0.0: ci-info "^2.0.0" is-core-module@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" - integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== + version "2.6.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.6.0.tgz#d7553b2526fe59b92ba3e40c8df757ec8a709e19" + integrity sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ== dependencies: has "^1.0.3" @@ -15738,10 +15768,10 @@ ora@^3.4.0: strip-ansi "^5.2.0" wcwidth "^1.0.1" -ora@^5.1.0: - version "5.4.0" - resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.0.tgz#42eda4855835b9cd14d33864c97a3c95a3f56bf4" - integrity sha512-1StwyXQGoU6gdjYkyVcqOLnVlbKj+6yPNNOxJVgpt9t4eksKjiriiHuxktLYkgllwk+D6MbC4ihH84L1udRXPg== +ora@^5.4.0: + version "5.4.1" + resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18" + integrity sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ== dependencies: bl "^4.1.0" chalk "^4.1.0" @@ -16070,9 +16100,9 @@ path-key@^3.0.0, path-key@^3.1.0: integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== path-parse@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== path-posix@^1.0.0: version "1.0.0" @@ -16167,11 +16197,16 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3: +picomatch@^2.0.4: version "2.2.3" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.3.tgz#465547f359ccc206d3c48e46a1bcb89bf7ee619d" integrity sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg== +picomatch@^2.2.1, picomatch@^2.2.3: + version "2.3.0" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" + integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw== + pidtree@^0.3.0: version "0.3.1" resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.3.1.tgz#ef09ac2cc0533df1f3250ccf2c4d366b0d12114a" @@ -17421,6 +17456,11 @@ require-relative@^0.8.7: resolved "https://registry.yarnpkg.com/require-relative/-/require-relative-0.8.7.tgz#7999539fc9e047a37928fa196f8e1563dabd36de" integrity sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4= +requireindex@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/requireindex/-/requireindex-1.2.0.tgz#3463cdb22ee151902635aa6c9535d4de9c2ef1ef" + integrity sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww== + requires-port@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" @@ -17996,11 +18036,16 @@ sigmund@~1.0.0: resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" integrity sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA= -signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: +signal-exit@^3.0.0, signal-exit@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== +signal-exit@^3.0.2: + version "3.0.4" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.4.tgz#366a4684d175b9cab2081e3681fda3747b6c51d7" + integrity sha512-rqYhcAnZ6d/vTPGghdrw7iumdcbXpsk1b8IG/rz+VWV51DM0p7XCtMoJ3qhPLIbp3tvyt3pKRbaaEMZYpHto8Q== + silent-error@^1.0.0, silent-error@^1.0.1, silent-error@^1.1.0, silent-error@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/silent-error/-/silent-error-1.1.1.tgz#f72af5b0d73682a2ba1778b7e32cd8aa7c2d8662" @@ -19389,11 +19434,16 @@ tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.3, tslib@^2.1.0: +tslib@^2.0.3: version "2.2.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.2.0.tgz#fb2c475977e35e241311ede2693cee1ec6698f5c" integrity sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w== +tslib@^2.1.0, tslib@^2.2.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" + integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== + tsutils@^3.17.1: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" @@ -20199,11 +20249,16 @@ workerpool@^3.1.1: object-assign "4.1.1" rsvp "^4.8.4" -workerpool@^6.0.0, workerpool@^6.0.3: +workerpool@^6.0.0: version "6.1.4" resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.1.4.tgz#6a972b6df82e38d50248ee2820aa98e2d0ad3090" integrity sha512-jGWPzsUqzkow8HoAvqaPWTUPCrlPJaJ5tY8Iz7n1uCz3tTp6s3CDG0FF1NsX42WNlkRSW6Mr+CDZGnNoSsKa7g== +workerpool@^6.0.3, workerpool@^6.1.4: + version "6.1.5" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.1.5.tgz#0f7cf076b6215fd7e1da903ff6f22ddd1886b581" + integrity sha512-XdKkCK0Zqc6w3iTxLckiuJ81tiD/o5rBE/m+nXpRCB+/Sq4DqkfXZ/x0jW02DG1tGsfUGXbTJyZDP+eu67haSw== + wrap-ansi@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" @@ -20388,9 +20443,9 @@ yargs-parser@^15.0.1: decamelize "^1.2.0" yargs-parser@^20.2.2: - version "20.2.7" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.7.tgz#61df85c113edfb5a7a4e36eb8aa60ef423cbc90a" - integrity sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw== + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== yargs-parser@^5.0.1: version "5.0.1" From c0f104c250ad814913f53972cec1f30a913fd064 Mon Sep 17 00:00:00 2001 From: Fabrice Mizero Date: Mon, 4 Oct 2021 17:41:52 -0400 Subject: [PATCH 2/3] Bump app version to v21.8.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c10633df6b7..fca7fde25e2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-osf-web", - "version": "21.7.0", + "version": "21.8.0", "description": "Ember front-end for the Open Science Framework", "license": "Apache-2.0", "author": "Center for Open Science ", From ab12b7ce61f635d64da738fc9ac9da3c24fce973 Mon Sep 17 00:00:00 2001 From: Fabrice Mizero Date: Mon, 4 Oct 2021 18:51:40 -0400 Subject: [PATCH 3/3] Update Changelog v21.8.0 --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d1dc0cc170..5c825bba6ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [21.8.0] - 2021-10-04 +### Added +- bulk upload component `Branded::Moderation::-Components::UploadCsv` +- `registries.branded.moderation.settings` route + +### Changed +- bump ember-template-lint + +### Remove +- `registries.branded.moderation.notifications` route (now under `registries.branded.moderation.settings`) + ## [21.7.0] - 2021-09-14 ### Fixed - A11y: Draft Registration Metadata Page - Critical WCAG 2A Rule Violations - Third Party Libraries