apostrophe 4.6.1 → 4.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/main.yml +1 -1
- package/CHANGELOG.md +39 -1
- package/lib/big-upload-client.js +100 -0
- package/modules/@apostrophecms/admin-bar/ui/apos/components/TheAposAdminBar.vue +5 -3
- package/modules/@apostrophecms/admin-bar/ui/apos/components/TheAposAdminBarLocale.vue +6 -3
- package/modules/@apostrophecms/admin-bar/ui/apos/components/TheAposAdminBarUser.vue +4 -1
- package/modules/@apostrophecms/admin-bar/ui/apos/components/TheAposContextBar.vue +24 -16
- package/modules/@apostrophecms/admin-bar/ui/apos/components/TheAposContextTitle.vue +1 -0
- package/modules/@apostrophecms/admin-bar/ui/apos/components/TheAposSavingIndicator.vue +7 -5
- package/modules/@apostrophecms/area/index.js +5 -2
- package/modules/@apostrophecms/area/ui/apos/components/AposAreaContextualMenu.vue +20 -12
- package/modules/@apostrophecms/area/ui/apos/components/AposAreaExpandedMenu.vue +11 -7
- package/modules/@apostrophecms/area/ui/apos/components/AposAreaMenu.vue +20 -12
- package/modules/@apostrophecms/area/ui/apos/components/AposAreaMenuItem.vue +3 -1
- package/modules/@apostrophecms/area/ui/apos/components/AposAreaWidget.vue +15 -11
- package/modules/@apostrophecms/attachment/index.js +4 -2
- package/modules/@apostrophecms/command-menu/ui/apos/components/AposCommandMenuKey.vue +28 -24
- package/modules/@apostrophecms/command-menu/ui/apos/components/AposCommandMenuShortcut.vue +17 -11
- package/modules/@apostrophecms/doc/index.js +22 -19
- package/modules/@apostrophecms/doc-type/index.js +6 -2
- package/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue +9 -5
- package/modules/@apostrophecms/doc-type/ui/apos/components/AposDocLocalePicker.vue +10 -5
- package/modules/@apostrophecms/doc-type/ui/apos/logic/AposDocContextMenu.js +12 -0
- package/modules/@apostrophecms/http/index.js +19 -3
- package/modules/@apostrophecms/http/lib/big-upload-middleware.js +251 -0
- package/modules/@apostrophecms/i18n/i18n/de.json +1 -1
- package/modules/@apostrophecms/i18n/i18n/en.json +9 -1
- package/modules/@apostrophecms/i18n/i18n/es.json +1 -1
- package/modules/@apostrophecms/i18n/i18n/fr.json +1 -1
- package/modules/@apostrophecms/i18n/i18n/it.json +1 -1
- package/modules/@apostrophecms/i18n/i18n/pt-BR.json +1 -1
- package/modules/@apostrophecms/i18n/i18n/sk.json +1 -1
- package/modules/@apostrophecms/i18n/index.js +3 -0
- package/modules/@apostrophecms/i18n/ui/apos/components/AposI18nLocalize.vue +30 -16
- package/modules/@apostrophecms/i18n/ui/apos/components/AposI18nLocalizeErrors.vue +7 -5
- package/modules/@apostrophecms/image/ui/apos/components/AposImageCropper.vue +5 -1
- package/modules/@apostrophecms/image/ui/apos/components/AposImageRelationshipEditor.vue +10 -6
- package/modules/@apostrophecms/image/ui/apos/components/AposMediaManager.vue +40 -18
- package/modules/@apostrophecms/image/ui/apos/components/AposMediaManagerDisplay.vue +35 -25
- package/modules/@apostrophecms/image/ui/apos/components/AposMediaManagerEditor.vue +11 -5
- package/modules/@apostrophecms/image/ui/apos/components/AposMediaManagerSelections.vue +15 -9
- package/modules/@apostrophecms/image/ui/apos/components/AposMediaUploader.vue +39 -31
- package/modules/@apostrophecms/job/index.js +1 -1
- package/modules/@apostrophecms/login/ui/apos/components/AposLoginForm.vue +9 -7
- package/modules/@apostrophecms/login/ui/apos/components/TheAposLogin.vue +17 -13
- package/modules/@apostrophecms/login/ui/apos/components/TheAposLoginHeader.vue +30 -20
- package/modules/@apostrophecms/modal/ui/apos/components/AposDocsManagerToolbar.vue +5 -0
- package/modules/@apostrophecms/modal/ui/apos/components/AposModal.vue +4 -1
- package/modules/@apostrophecms/modal/ui/apos/components/AposModalBreadcrumbs.vue +8 -4
- package/modules/@apostrophecms/modal/ui/apos/components/AposModalConfirm.vue +14 -8
- package/modules/@apostrophecms/modal/ui/apos/components/AposModalShareDraft.vue +32 -22
- package/modules/@apostrophecms/modal/ui/apos/components/AposModalTabs.vue +16 -14
- package/modules/@apostrophecms/modal/ui/apos/components/AposWidgetModalTabs.vue +16 -14
- package/modules/@apostrophecms/notification/ui/apos/components/AposNotification.vue +93 -91
- package/modules/@apostrophecms/page/index.js +482 -13
- package/modules/@apostrophecms/page/ui/apos/components/AposPagesManager.vue +43 -23
- package/modules/@apostrophecms/page/ui/apos/logic/AposPagesManager.js +248 -156
- package/modules/@apostrophecms/permission/ui/apos/components/AposPermissionGrid.vue +9 -5
- package/modules/@apostrophecms/piece-type/index.js +7 -7
- package/modules/@apostrophecms/piece-type/ui/apos/components/AposDocsManager.vue +92 -36
- package/modules/@apostrophecms/rich-text-widget/ui/apos/components/AposRichTextWidgetEditor.vue +30 -24
- package/modules/@apostrophecms/rich-text-widget/ui/apos/components/AposTiptapDivider.vue +4 -2
- package/modules/@apostrophecms/rich-text-widget/ui/apos/components/AposTiptapLink.vue +2 -1
- package/modules/@apostrophecms/rich-text-widget/ui/apos/components/AposTiptapMarks.vue +5 -3
- package/modules/@apostrophecms/rich-text-widget/ui/apos/components/AposTiptapStyles.vue +5 -3
- package/modules/@apostrophecms/rich-text-widget/ui/apos/components/AposTiptapTable.vue +5 -2
- package/modules/@apostrophecms/schema/index.js +26 -5
- package/modules/@apostrophecms/schema/lib/addFieldTypes.js +42 -9
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputColor.vue +4 -2
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputRange.vue +8 -4
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputRelationship.vue +6 -4
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputSlug.vue +5 -3
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputWrapper.vue +19 -13
- package/modules/@apostrophecms/schema/ui/apos/components/AposSearchList.vue +6 -2
- package/modules/@apostrophecms/schema/ui/apos/components/AposSubform.vue +6 -4
- package/modules/@apostrophecms/schema/ui/apos/logic/AposInputSlug.js +28 -25
- package/modules/@apostrophecms/schema/ui/apos/scss/AposInputArray.scss +13 -7
- package/modules/@apostrophecms/settings/ui/apos/components/AposSettingsManager.vue +11 -6
- package/modules/@apostrophecms/translation/ui/apos/components/AposTranslationIndicator.vue +5 -3
- package/modules/@apostrophecms/ui/ui/apos/components/AposAvatar.vue +14 -12
- package/modules/@apostrophecms/ui/ui/apos/components/AposButton.vue +14 -11
- package/modules/@apostrophecms/ui/ui/apos/components/AposButtonSplit.vue +7 -3
- package/modules/@apostrophecms/ui/ui/apos/components/AposCellContextMenu.vue +4 -2
- package/modules/@apostrophecms/ui/ui/apos/components/AposCombo.vue +23 -17
- package/modules/@apostrophecms/ui/ui/apos/components/AposContextMenu.vue +25 -10
- package/modules/@apostrophecms/ui/ui/apos/components/AposContextMenuDialog.vue +7 -5
- package/modules/@apostrophecms/ui/ui/apos/components/AposContextMenuItem.vue +10 -8
- package/modules/@apostrophecms/ui/ui/apos/components/AposEmptyState.vue +9 -5
- package/modules/@apostrophecms/ui/ui/apos/components/AposFile.vue +9 -6
- package/modules/@apostrophecms/ui/ui/apos/components/AposIndicator.vue +5 -0
- package/modules/@apostrophecms/ui/ui/apos/components/AposLoadingBlock.vue +3 -1
- package/modules/@apostrophecms/ui/ui/apos/components/AposLocale.vue +3 -1
- package/modules/@apostrophecms/ui/ui/apos/components/AposLocalePicker.vue +11 -9
- package/modules/@apostrophecms/ui/ui/apos/components/AposMinMaxCount.vue +5 -3
- package/modules/@apostrophecms/ui/ui/apos/components/AposPager.vue +4 -2
- package/modules/@apostrophecms/ui/ui/apos/components/AposPagerDots.vue +8 -6
- package/modules/@apostrophecms/ui/ui/apos/components/AposSlat.vue +25 -17
- package/modules/@apostrophecms/ui/ui/apos/components/AposSlatList.vue +5 -9
- package/modules/@apostrophecms/ui/ui/apos/components/AposSubformPreview.vue +10 -6
- package/modules/@apostrophecms/ui/ui/apos/components/AposTag.vue +9 -7
- package/modules/@apostrophecms/ui/ui/apos/components/AposTagApply.vue +8 -4
- package/modules/@apostrophecms/ui/ui/apos/components/AposTagList.vue +4 -2
- package/modules/@apostrophecms/ui/ui/apos/components/AposTagListItem.vue +7 -5
- package/modules/@apostrophecms/ui/ui/apos/components/AposToggle.vue +16 -0
- package/modules/@apostrophecms/ui/ui/apos/components/AposTree.vue +3 -1
- package/modules/@apostrophecms/ui/ui/apos/components/AposTreeRows.vue +11 -9
- package/modules/@apostrophecms/ui/ui/apos/mixins/AposArchiveMixin.js +2 -2
- package/modules/@apostrophecms/ui/ui/apos/mixins/AposPublishMixin.js +6 -6
- package/modules/@apostrophecms/ui/ui/apos/scss/global/_inputs.scss +30 -22
- package/modules/@apostrophecms/ui/ui/apos/scss/global/_theme.scss +22 -18
- package/modules/@apostrophecms/ui/ui/apos/scss/global/_tooltips.scss +18 -15
- package/modules/@apostrophecms/ui/ui/apos/scss/mixins/_input_mixins.scss +8 -6
- package/modules/@apostrophecms/ui/ui/apos/scss/mixins/_mixins.scss +3 -1
- package/modules/@apostrophecms/ui/ui/apos/scss/mixins/_theme_mixins.scss +34 -19
- package/modules/@apostrophecms/ui/ui/apos/scss/mixins/_type_mixins.scss +3 -1
- package/modules/@apostrophecms/ui/ui/apos/utils/index.js +140 -51
- package/modules/@apostrophecms/widget-type/index.js +3 -2
- package/modules/@apostrophecms/widget-type/ui/apos/mixins/AposWidgetMixin.js +5 -1
- package/package.json +5 -6
- package/test/big-upload.js +111 -0
- package/test/change-doc-ids.js +60 -1
- package/test/pages.js +488 -0
- package/test/schemas.js +327 -0
- package/test/utils.js +266 -5
|
@@ -1012,13 +1012,17 @@ export default {
|
|
|
1012
1012
|
.apos-wizard__navigation__items {
|
|
1013
1013
|
@include apos-list-reset();
|
|
1014
1014
|
|
|
1015
|
-
|
|
1015
|
+
& {
|
|
1016
|
+
padding: $spacing-base;
|
|
1017
|
+
}
|
|
1016
1018
|
}
|
|
1017
1019
|
|
|
1018
1020
|
.apos-wizard__navigation__item {
|
|
1019
1021
|
@include type-small;
|
|
1020
1022
|
|
|
1021
|
-
|
|
1023
|
+
& {
|
|
1024
|
+
margin-bottom: $spacing-base + $spacing-half;
|
|
1025
|
+
}
|
|
1022
1026
|
|
|
1023
1027
|
&.apos-is-active {
|
|
1024
1028
|
color: var(--a-primary);
|
|
@@ -1028,7 +1032,9 @@ export default {
|
|
|
1028
1032
|
.apos-modal__heading {
|
|
1029
1033
|
@include type-title;
|
|
1030
1034
|
|
|
1031
|
-
|
|
1035
|
+
& {
|
|
1036
|
+
margin: 0 0 $spacing-double;
|
|
1037
|
+
}
|
|
1032
1038
|
}
|
|
1033
1039
|
|
|
1034
1040
|
.apos-wizard__step {
|
|
@@ -1100,10 +1106,12 @@ export default {
|
|
|
1100
1106
|
.apos-locale-item {
|
|
1101
1107
|
@include apos-transition();
|
|
1102
1108
|
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1109
|
+
& {
|
|
1110
|
+
position: relative;
|
|
1111
|
+
padding: 12px 35px;
|
|
1112
|
+
line-height: 1;
|
|
1113
|
+
border-radius: var(--a-border-radius);
|
|
1114
|
+
}
|
|
1107
1115
|
|
|
1108
1116
|
&:not(.apos-current-locale),
|
|
1109
1117
|
&:not(.apos-disabled-locale) {
|
|
@@ -1174,10 +1182,12 @@ export default {
|
|
|
1174
1182
|
.apos-wizard__field-group-heading {
|
|
1175
1183
|
@include type-base;
|
|
1176
1184
|
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1185
|
+
& {
|
|
1186
|
+
margin-bottom: $spacing-base;
|
|
1187
|
+
padding-bottom: $spacing-base;
|
|
1188
|
+
border-bottom: 1px solid var(--a-base-8);
|
|
1189
|
+
color: var(--a-base-3);
|
|
1190
|
+
}
|
|
1181
1191
|
}
|
|
1182
1192
|
|
|
1183
1193
|
.apos-wizard__field-group-heading__info {
|
|
@@ -1220,10 +1230,12 @@ export default {
|
|
|
1220
1230
|
.apos-wizard__translation-title {
|
|
1221
1231
|
@include type-label;
|
|
1222
1232
|
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1233
|
+
& {
|
|
1234
|
+
display: flex;
|
|
1235
|
+
align-items: center;
|
|
1236
|
+
padding-bottom: 8px;
|
|
1237
|
+
border-bottom: 1px solid var(--a-base-8);
|
|
1238
|
+
}
|
|
1227
1239
|
}
|
|
1228
1240
|
|
|
1229
1241
|
.apos-wizard__translation-title-text {
|
|
@@ -1233,7 +1245,9 @@ export default {
|
|
|
1233
1245
|
.apos-wizard__translation-error {
|
|
1234
1246
|
@include type-label;
|
|
1235
1247
|
|
|
1236
|
-
|
|
1248
|
+
& {
|
|
1249
|
+
color: var(--a-danger);
|
|
1250
|
+
}
|
|
1237
1251
|
}
|
|
1238
1252
|
|
|
1239
1253
|
.apos-wizard__translation-spinner {
|
|
@@ -76,11 +76,13 @@ export default {
|
|
|
76
76
|
.apos-confirm__notifications {
|
|
77
77
|
@include type-base;
|
|
78
78
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
& {
|
|
80
|
+
margin-left: 0;
|
|
81
|
+
padding-top: 0;
|
|
82
|
+
padding-bottom: 0;
|
|
83
|
+
text-align: left;
|
|
84
|
+
list-style-type: none;
|
|
85
|
+
}
|
|
84
86
|
}
|
|
85
87
|
|
|
86
88
|
.apos-confirm__notification:not(:last-of-type) {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
</template>
|
|
31
31
|
|
|
32
32
|
<script>
|
|
33
|
-
import
|
|
33
|
+
import debounce from 'lodash/debounce';
|
|
34
34
|
import { Cropper } from 'vue-advanced-cropper';
|
|
35
35
|
import 'vue-advanced-cropper/dist/style.css';
|
|
36
36
|
|
|
@@ -129,6 +129,10 @@ export default {
|
|
|
129
129
|
};
|
|
130
130
|
},
|
|
131
131
|
beforeUnmount() {
|
|
132
|
+
this.onScreenResizeDebounced.cancel();
|
|
133
|
+
this.handleCropperChangeDebounced.cancel();
|
|
134
|
+
this.setCropperCoordinatesDebounced.cancel();
|
|
135
|
+
this.updateFocalPointCoordinatesDebounced.cancel();
|
|
132
136
|
this.$refs.focalPoint.removeEventListener('mousedown', this.onFocalPointMouseDown);
|
|
133
137
|
window.removeEventListener('resize', this.onScreenResizeDebounced);
|
|
134
138
|
},
|
|
@@ -479,8 +479,10 @@ export default {
|
|
|
479
479
|
.apos-field__min-size {
|
|
480
480
|
@include type-small;
|
|
481
481
|
|
|
482
|
-
|
|
483
|
-
|
|
482
|
+
& {
|
|
483
|
+
margin-bottom: 10px;
|
|
484
|
+
color: var(--a-base-1);
|
|
485
|
+
}
|
|
484
486
|
|
|
485
487
|
&--correcting {
|
|
486
488
|
color: var(--a-primary);
|
|
@@ -490,10 +492,12 @@ export default {
|
|
|
490
492
|
.apos-field__label {
|
|
491
493
|
@include type-label;
|
|
492
494
|
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
495
|
+
& {
|
|
496
|
+
display: block;
|
|
497
|
+
margin: 0 0 $spacing-base;
|
|
498
|
+
padding: 0;
|
|
499
|
+
color: var(--a-text-primary);
|
|
500
|
+
}
|
|
497
501
|
}
|
|
498
502
|
|
|
499
503
|
.apos-field__label--aligned {
|
|
@@ -125,10 +125,10 @@
|
|
|
125
125
|
</template>
|
|
126
126
|
|
|
127
127
|
<script>
|
|
128
|
-
import {
|
|
128
|
+
import { createId } from '@paralleldrive/cuid2';
|
|
129
|
+
import { debounceAsync } from 'Modules/@apostrophecms/ui/utils';
|
|
129
130
|
import AposModifiedMixin from 'Modules/@apostrophecms/ui/mixins/AposModifiedMixin';
|
|
130
131
|
import AposDocsManagerMixin from 'Modules/@apostrophecms/modal/mixins/AposDocsManagerMixin';
|
|
131
|
-
import { createId } from '@paralleldrive/cuid2';
|
|
132
132
|
|
|
133
133
|
const DEBOUNCE_TIMEOUT = 500;
|
|
134
134
|
|
|
@@ -166,7 +166,9 @@ export default {
|
|
|
166
166
|
emoji: '🖼'
|
|
167
167
|
},
|
|
168
168
|
cancelDescription: 'apostrophe:discardImageChangesPrompt',
|
|
169
|
-
debouncedGetMedia:
|
|
169
|
+
debouncedGetMedia: debounceAsync(this.getMedia, DEBOUNCE_TIMEOUT, {
|
|
170
|
+
onSuccess: this.appendMedia
|
|
171
|
+
}),
|
|
170
172
|
loadObserver: new IntersectionObserver(
|
|
171
173
|
this.handleIntersect,
|
|
172
174
|
{
|
|
@@ -243,6 +245,7 @@ export default {
|
|
|
243
245
|
return this.totalPages > 1 && this.currentPage === this.totalPages;
|
|
244
246
|
}
|
|
245
247
|
},
|
|
248
|
+
|
|
246
249
|
watch: {
|
|
247
250
|
async checked (newVal, oldVal) {
|
|
248
251
|
this.lastSelected = newVal.at(-1);
|
|
@@ -270,21 +273,26 @@ export default {
|
|
|
270
273
|
}
|
|
271
274
|
}
|
|
272
275
|
},
|
|
276
|
+
|
|
273
277
|
created() {
|
|
274
278
|
this.setDefaultFilters();
|
|
275
279
|
},
|
|
280
|
+
|
|
276
281
|
async mounted() {
|
|
277
282
|
this.modal.active = true;
|
|
278
|
-
|
|
279
|
-
this.isFirstLoading = false;
|
|
280
|
-
|
|
283
|
+
// Do these before any async work or they might get added after they are "removed"
|
|
281
284
|
apos.bus.$on('content-changed', this.onContentChanged);
|
|
282
285
|
apos.bus.$on('command-menu-manager-close', this.confirmAndCancel);
|
|
286
|
+
await this.debouncedGetMedia.skipDelay({ tags: true });
|
|
287
|
+
this.isFirstLoading = false;
|
|
283
288
|
},
|
|
284
|
-
|
|
289
|
+
|
|
290
|
+
beforeUnmount() {
|
|
291
|
+
this.debouncedGetMedia.cancel();
|
|
285
292
|
apos.bus.$off('content-changed', this.onContentChanged);
|
|
286
293
|
apos.bus.$off('command-menu-manager-close', this.confirmAndCancel);
|
|
287
294
|
},
|
|
295
|
+
|
|
288
296
|
methods: {
|
|
289
297
|
setDefaultFilters() {
|
|
290
298
|
this.moduleOptions.filters.forEach(filter => {
|
|
@@ -296,7 +304,8 @@ export default {
|
|
|
296
304
|
editorModified (val) {
|
|
297
305
|
this.modified = val;
|
|
298
306
|
},
|
|
299
|
-
async getMedia
|
|
307
|
+
async getMedia(options = {}) {
|
|
308
|
+
const result = {};
|
|
300
309
|
const qs = {
|
|
301
310
|
...this.filterValues,
|
|
302
311
|
page: this.currentPage,
|
|
@@ -344,23 +353,37 @@ export default {
|
|
|
344
353
|
draft: true
|
|
345
354
|
}
|
|
346
355
|
));
|
|
347
|
-
|
|
356
|
+
result.tagList = apiResponse.choices._tags;
|
|
348
357
|
} else {
|
|
349
|
-
|
|
358
|
+
result.tagList = apiResponse.choices ? apiResponse.choices._tags : [];
|
|
350
359
|
}
|
|
351
360
|
}
|
|
352
361
|
|
|
353
|
-
|
|
354
|
-
|
|
362
|
+
result.currentPage = apiResponse.currentPage;
|
|
363
|
+
result.totalPages = apiResponse.pages;
|
|
364
|
+
result.items = [];
|
|
355
365
|
for (const image of apiResponse.results) {
|
|
356
|
-
|
|
366
|
+
result.items.push(image);
|
|
367
|
+
}
|
|
368
|
+
return result;
|
|
369
|
+
},
|
|
370
|
+
async appendMedia({
|
|
371
|
+
tagList, currentPage, totalPages, items
|
|
372
|
+
}) {
|
|
373
|
+
if (Array.isArray(tagList)) {
|
|
374
|
+
this.tagList = tagList;
|
|
375
|
+
}
|
|
376
|
+
this.currentPage = currentPage;
|
|
377
|
+
this.totalPages = totalPages;
|
|
378
|
+
for (const item of items) {
|
|
379
|
+
this.items.push(item);
|
|
357
380
|
}
|
|
358
381
|
},
|
|
359
382
|
async refetchMedia(opts) {
|
|
360
383
|
this.isLoading = true;
|
|
361
384
|
this.currentPage = 1;
|
|
362
385
|
this.items = [];
|
|
363
|
-
await this.
|
|
386
|
+
await this.debouncedGetMedia.skipDelay(opts);
|
|
364
387
|
this.isLoading = false;
|
|
365
388
|
this.modified = false;
|
|
366
389
|
this.updateEditing(null);
|
|
@@ -376,11 +399,10 @@ export default {
|
|
|
376
399
|
dimensions
|
|
377
400
|
});
|
|
378
401
|
},
|
|
379
|
-
async completeUploading
|
|
402
|
+
async completeUploading(imgIds) {
|
|
380
403
|
this.currentPage = 1;
|
|
381
404
|
this.items = [];
|
|
382
|
-
await this.
|
|
383
|
-
|
|
405
|
+
await this.debouncedGetMedia.skipDelay();
|
|
384
406
|
if (Array.isArray(imgIds) && imgIds.length && this.items.length === 0) {
|
|
385
407
|
const [ widgetOptions = {} ] = apos.area.widgetOptions;
|
|
386
408
|
const [ width, height ] = widgetOptions.minSize || [];
|
|
@@ -551,7 +573,7 @@ export default {
|
|
|
551
573
|
this.loadRef.scrollIntoView({
|
|
552
574
|
behavior: 'smooth'
|
|
553
575
|
});
|
|
554
|
-
await this.
|
|
576
|
+
await this.debouncedGetMedia.skipDelay();
|
|
555
577
|
this.isScrollLoading = false;
|
|
556
578
|
}
|
|
557
579
|
}
|
|
@@ -246,12 +246,14 @@ export default {
|
|
|
246
246
|
.apos-media-manager-display__cell {
|
|
247
247
|
@include apos-transition();
|
|
248
248
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
249
|
+
& {
|
|
250
|
+
position: relative;
|
|
251
|
+
display: flex;
|
|
252
|
+
align-items: center;
|
|
253
|
+
justify-content: center;
|
|
254
|
+
width: 100%;
|
|
255
|
+
height: 100%;
|
|
256
|
+
}
|
|
255
257
|
|
|
256
258
|
&.apos-is-hidden { visibility: hidden; }
|
|
257
259
|
|
|
@@ -267,11 +269,13 @@ export default {
|
|
|
267
269
|
.apos-media-manager-display__checkbox {
|
|
268
270
|
@include apos-transition();
|
|
269
271
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
272
|
+
& {
|
|
273
|
+
z-index: $z-index-manager-display;
|
|
274
|
+
position: absolute;
|
|
275
|
+
top: -6px;
|
|
276
|
+
left: -6px;
|
|
277
|
+
opacity: 0;
|
|
278
|
+
}
|
|
275
279
|
}
|
|
276
280
|
|
|
277
281
|
.apos-media-manager-display__cell:hover .apos-media-manager-display__checkbox,
|
|
@@ -283,9 +287,11 @@ export default {
|
|
|
283
287
|
.apos-media-manager-display__placeholder {
|
|
284
288
|
@include apos-transition();
|
|
285
289
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
290
|
+
& {
|
|
291
|
+
max-width: 100%;
|
|
292
|
+
max-height: 100%;
|
|
293
|
+
opacity: 0.85;
|
|
294
|
+
}
|
|
289
295
|
}
|
|
290
296
|
|
|
291
297
|
.apos-media-manager-display__placeholder {
|
|
@@ -296,13 +302,15 @@ export default {
|
|
|
296
302
|
@include apos-button-reset();
|
|
297
303
|
@include apos-transition();
|
|
298
304
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
305
|
+
& {
|
|
306
|
+
display: flex;
|
|
307
|
+
box-sizing: border-box;
|
|
308
|
+
align-items: center;
|
|
309
|
+
justify-content: center;
|
|
310
|
+
width: 100%;
|
|
311
|
+
height: 100%;
|
|
312
|
+
border: 1px solid var(--a-base-7);
|
|
313
|
+
}
|
|
306
314
|
|
|
307
315
|
&:active + .apos-media-manager-display__checkbox {
|
|
308
316
|
opacity: 1;
|
|
@@ -353,9 +361,11 @@ export default {
|
|
|
353
361
|
.apos-media-manager-display__end-reached {
|
|
354
362
|
@include type-label;
|
|
355
363
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
364
|
+
& {
|
|
365
|
+
display: flex;
|
|
366
|
+
align-items: center;
|
|
367
|
+
justify-content: center;
|
|
368
|
+
height: 40px;
|
|
369
|
+
}
|
|
360
370
|
}
|
|
361
371
|
</style>
|
|
@@ -417,21 +417,27 @@ export default {
|
|
|
417
417
|
.apos-media-editor__details {
|
|
418
418
|
@include apos-list-reset();
|
|
419
419
|
|
|
420
|
-
|
|
420
|
+
& {
|
|
421
|
+
margin-bottom: $spacing-double;
|
|
422
|
+
}
|
|
421
423
|
}
|
|
422
424
|
|
|
423
425
|
.apos-media-editor__detail {
|
|
424
426
|
@include type-base;
|
|
425
427
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
+
& {
|
|
429
|
+
line-height: var(--a-line-tallest);
|
|
430
|
+
color: var(--a-base-4);
|
|
431
|
+
}
|
|
428
432
|
}
|
|
429
433
|
|
|
430
434
|
.apos-media-editor__links {
|
|
431
435
|
@include apos-list-reset();
|
|
432
436
|
|
|
433
|
-
|
|
434
|
-
|
|
437
|
+
& {
|
|
438
|
+
display: flex;
|
|
439
|
+
margin-bottom: $spacing-triple;
|
|
440
|
+
}
|
|
435
441
|
|
|
436
442
|
:deep(.apos-button--quiet) {
|
|
437
443
|
display: inline;
|
|
@@ -84,15 +84,19 @@ export default {
|
|
|
84
84
|
.apos-media-manager-selections {
|
|
85
85
|
@include type-base;
|
|
86
86
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
& {
|
|
88
|
+
box-sizing: border-box;
|
|
89
|
+
height: 100%;
|
|
90
|
+
padding: 20px;
|
|
91
|
+
}
|
|
90
92
|
}
|
|
91
93
|
|
|
92
94
|
.apos-media-manager-selections__heading {
|
|
93
95
|
@include type-base;
|
|
94
96
|
|
|
95
|
-
|
|
97
|
+
& {
|
|
98
|
+
margin-bottom: $spacing-double;
|
|
99
|
+
}
|
|
96
100
|
}
|
|
97
101
|
|
|
98
102
|
.apos-media-manager-selections__heading :deep(.apos-button) {
|
|
@@ -132,11 +136,13 @@ export default {
|
|
|
132
136
|
.apos-media-manager-selections__item-title {
|
|
133
137
|
@include type-base;
|
|
134
138
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
139
|
+
& {
|
|
140
|
+
max-width: 150px;
|
|
141
|
+
white-space: nowrap;
|
|
142
|
+
overflow: hidden;
|
|
143
|
+
text-overflow: ellipsis;
|
|
144
|
+
margin-bottom: 5px;
|
|
145
|
+
}
|
|
140
146
|
}
|
|
141
147
|
|
|
142
148
|
.apos-media-manager-selection__empty {
|
|
@@ -250,36 +250,40 @@ export default {
|
|
|
250
250
|
@include apos-button-reset();
|
|
251
251
|
@include apos-transition();
|
|
252
252
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
253
|
+
& {
|
|
254
|
+
display: flex;
|
|
255
|
+
box-sizing: border-box;
|
|
256
|
+
align-items: center;
|
|
257
|
+
justify-content: center;
|
|
258
|
+
border: 2px dashed var(--a-base-3);
|
|
259
|
+
color: inherit;
|
|
260
|
+
grid-column: 1 / 3;
|
|
261
|
+
grid-row: 1 / 3;
|
|
262
|
+
}
|
|
261
263
|
}
|
|
262
264
|
|
|
263
265
|
.apos-media-uploader--enabled {
|
|
264
266
|
&::after {
|
|
265
267
|
@include apos-transition($duration: 0.3s);
|
|
266
268
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
269
|
+
& {
|
|
270
|
+
z-index: $z-index-under;
|
|
271
|
+
position: absolute;
|
|
272
|
+
content: '';
|
|
273
|
+
width: 90%;
|
|
274
|
+
height: 90%;
|
|
275
|
+
background-image:
|
|
276
|
+
linear-gradient(to right, rgba($brand-magenta, 0.3), rgba($brand-blue, 0.3)),
|
|
277
|
+
linear-gradient(to right, rgba($brand-gold, 0.3), rgba($brand-magenta, 0.3));
|
|
278
|
+
background-size:
|
|
279
|
+
100% 60%,
|
|
280
|
+
100% 60%;
|
|
281
|
+
background-position:
|
|
282
|
+
5% -5%,
|
|
283
|
+
5% 100%;
|
|
284
|
+
background-repeat: no-repeat;
|
|
285
|
+
filter: blur(10px);
|
|
286
|
+
}
|
|
283
287
|
}
|
|
284
288
|
|
|
285
289
|
&:hover,
|
|
@@ -318,11 +322,13 @@ export default {
|
|
|
318
322
|
.apos-media-uploader__icon {
|
|
319
323
|
@include apos-transition($duration: 0.2s);
|
|
320
324
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
325
|
+
& {
|
|
326
|
+
width: 57px;
|
|
327
|
+
max-width: 50%;
|
|
328
|
+
height: auto;
|
|
329
|
+
margin-bottom: 5px;
|
|
330
|
+
fill: var(--a-text-primary);
|
|
331
|
+
}
|
|
326
332
|
}
|
|
327
333
|
|
|
328
334
|
.apos-media-uploader__instructions {
|
|
@@ -343,7 +349,9 @@ export default {
|
|
|
343
349
|
.apos-media-uploader__primary {
|
|
344
350
|
@include type-large;
|
|
345
351
|
|
|
346
|
-
|
|
347
|
-
|
|
352
|
+
& {
|
|
353
|
+
max-width: 100px;
|
|
354
|
+
margin: 5px auto 10px;
|
|
355
|
+
}
|
|
348
356
|
}
|
|
349
357
|
</style>
|
|
@@ -276,7 +276,7 @@ module.exports = {
|
|
|
276
276
|
return self.apos.notification.trigger(req, req.body.messages[stage], {
|
|
277
277
|
interpolate: {
|
|
278
278
|
count: options.count || (req.body._ids && req.body._ids.length),
|
|
279
|
-
type: req.body.type || req.t('apostrophe:document')
|
|
279
|
+
type: req.t(req.body.type) || req.t('apostrophe:document')
|
|
280
280
|
},
|
|
281
281
|
dismiss: options.dismiss,
|
|
282
282
|
job: {
|
|
@@ -100,13 +100,15 @@ export default {
|
|
|
100
100
|
&__link {
|
|
101
101
|
@include type-large;
|
|
102
102
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
103
|
+
& {
|
|
104
|
+
position: relative;
|
|
105
|
+
// AposSchema adds $spacing-quadruple margin bottom
|
|
106
|
+
top: -$spacing-triple;
|
|
107
|
+
display: block;
|
|
108
|
+
text-align: right;
|
|
109
|
+
text-decoration: underline;
|
|
110
|
+
text-underline-offset: 2px;
|
|
111
|
+
}
|
|
110
112
|
|
|
111
113
|
&:hover,
|
|
112
114
|
&:focus,
|
|
@@ -142,9 +142,11 @@ export default {
|
|
|
142
142
|
&__link {
|
|
143
143
|
@include type-large;
|
|
144
144
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
145
|
+
& {
|
|
146
|
+
display: inline-block;
|
|
147
|
+
text-decoration: underline;
|
|
148
|
+
text-underline-offset: 2px;
|
|
149
|
+
}
|
|
148
150
|
|
|
149
151
|
&:hover,
|
|
150
152
|
&:focus,
|
|
@@ -202,16 +204,18 @@ export default {
|
|
|
202
204
|
&__footer {
|
|
203
205
|
@include type-base;
|
|
204
206
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
207
|
+
& {
|
|
208
|
+
position: absolute;
|
|
209
|
+
right: 0;
|
|
210
|
+
bottom: 32px;
|
|
211
|
+
left: 0;
|
|
212
|
+
display: flex;
|
|
213
|
+
align-items: center;
|
|
214
|
+
justify-content: flex-start;
|
|
215
|
+
width: 100%;
|
|
216
|
+
margin: auto;
|
|
217
|
+
max-width: $login-container;
|
|
218
|
+
}
|
|
215
219
|
}
|
|
216
220
|
|
|
217
221
|
&__project-version {
|