apostrophe 3.63.1 → 4.0.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/.eslintrc +13 -4
- package/CHANGELOG.md +35 -0
- package/defaults.js +1 -0
- package/modules/@apostrophecms/admin-bar/ui/apos/apps/AposAdminBar.js +7 -17
- package/modules/@apostrophecms/admin-bar/ui/apos/components/TheAposAdminBar.vue +14 -16
- package/modules/@apostrophecms/admin-bar/ui/apos/components/TheAposAdminBarLocale.vue +1 -1
- package/modules/@apostrophecms/admin-bar/ui/apos/components/TheAposAdminBarMenu.vue +22 -15
- package/modules/@apostrophecms/admin-bar/ui/apos/components/TheAposAdminBarUser.vue +2 -2
- package/modules/@apostrophecms/admin-bar/ui/apos/components/TheAposContextBar.vue +13 -8
- package/modules/@apostrophecms/admin-bar/ui/apos/components/TheAposContextModeAndSettings.vue +18 -10
- package/modules/@apostrophecms/admin-bar/ui/apos/components/TheAposContextTitle.vue +4 -4
- package/modules/@apostrophecms/admin-bar/ui/apos/components/TheAposContextUndoRedo.vue +14 -8
- package/modules/@apostrophecms/admin-bar/ui/apos/components/TheAposSavingIndicator.vue +2 -1
- package/modules/@apostrophecms/area/ui/apos/apps/AposAreas.js +36 -54
- package/modules/@apostrophecms/area/ui/apos/components/AposAreaContextualMenu.vue +20 -25
- package/modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue +5 -12
- package/modules/@apostrophecms/area/ui/apos/components/AposAreaExpandedMenu.vue +11 -3
- package/modules/@apostrophecms/area/ui/apos/components/AposAreaMenu.vue +6 -6
- package/modules/@apostrophecms/area/ui/apos/components/AposAreaMenuItem.vue +3 -2
- package/modules/@apostrophecms/area/ui/apos/components/AposAreaWidget.vue +31 -44
- package/modules/@apostrophecms/area/ui/apos/components/AposWidgetControls.vue +6 -6
- package/modules/@apostrophecms/asset/index.js +25 -12
- package/modules/@apostrophecms/asset/lib/webpack/apos/webpack.config.js +3 -3
- package/modules/@apostrophecms/asset/lib/webpack/apos/webpack.vue.js +7 -1
- package/modules/@apostrophecms/busy/ui/apos/apps/AposBusy.js +8 -7
- package/modules/@apostrophecms/busy/ui/apos/components/TheAposBusy.vue +1 -1
- package/modules/@apostrophecms/command-menu/ui/apos/apps/AposCommandMenu.js +11 -29
- package/modules/@apostrophecms/command-menu/ui/apos/components/AposCommandMenuShortcut.vue +6 -6
- package/modules/@apostrophecms/command-menu/ui/apos/components/TheAposCommandMenu.vue +10 -7
- package/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue +20 -15
- package/modules/@apostrophecms/doc-type/ui/apos/logic/AposDocContextMenu.js +1 -1
- package/modules/@apostrophecms/i18n/ui/apos/components/AposI18nLocalize.vue +36 -27
- package/modules/@apostrophecms/i18n/ui/apos/components/AposI18nLocalizeErrors.vue +3 -3
- package/modules/@apostrophecms/image/ui/apos/components/AposImageCropper.vue +5 -5
- package/modules/@apostrophecms/image/ui/apos/components/AposImageRelationshipEditor.vue +6 -6
- package/modules/@apostrophecms/image/ui/apos/components/AposMediaManager.vue +23 -16
- package/modules/@apostrophecms/image/ui/apos/components/AposMediaManagerDisplay.vue +11 -11
- package/modules/@apostrophecms/image/ui/apos/components/AposMediaManagerEditor.vue +28 -21
- package/modules/@apostrophecms/image/ui/apos/components/AposMediaManagerSelections.vue +1 -1
- package/modules/@apostrophecms/image/ui/apos/components/AposMediaUploader.vue +5 -4
- package/modules/@apostrophecms/login/ui/apos/apps/AposLogin.js +6 -7
- package/modules/@apostrophecms/login/ui/apos/components/AposForgotPasswordForm.vue +3 -3
- package/modules/@apostrophecms/login/ui/apos/components/AposLoginForm.vue +10 -10
- package/modules/@apostrophecms/login/ui/apos/components/AposResetPasswordForm.vue +1 -1
- package/modules/@apostrophecms/login/ui/apos/components/TheAposLogin.vue +2 -2
- package/modules/@apostrophecms/modal/ui/apos/apps/AposModals.js +60 -87
- package/modules/@apostrophecms/modal/ui/apos/components/AposDocsManagerToolbar.vue +15 -11
- package/modules/@apostrophecms/modal/ui/apos/components/AposModal.vue +8 -2
- package/modules/@apostrophecms/modal/ui/apos/components/AposModalBreadcrumbs.vue +7 -4
- package/modules/@apostrophecms/modal/ui/apos/components/AposModalConfirm.vue +5 -5
- package/modules/@apostrophecms/modal/ui/apos/components/AposModalShareDraft.vue +8 -8
- package/modules/@apostrophecms/modal/ui/apos/components/AposModalToolbar.vue +7 -7
- package/modules/@apostrophecms/modal/ui/apos/components/TheAposModals.vue +22 -4
- package/modules/@apostrophecms/modal/ui/apos/composables/AposFocus.js +95 -0
- package/modules/@apostrophecms/modal/ui/apos/mixins/AposDocsManagerMixin.js +2 -3
- package/modules/@apostrophecms/modal/ui/apos/mixins/AposEditorMixin.js +6 -0
- package/modules/@apostrophecms/multisite-i18n/i18n/aposMultisite/en.json +48 -0
- package/modules/@apostrophecms/multisite-i18n/index.js +7 -0
- package/modules/@apostrophecms/notification/index.js +4 -4
- package/modules/@apostrophecms/notification/ui/apos/apps/AposNotification.js +6 -9
- package/modules/@apostrophecms/notification/ui/apos/components/AposNotification.vue +12 -8
- package/modules/@apostrophecms/oembed/index.js +10 -3
- package/modules/@apostrophecms/oembed-field/ui/apos/components/AposInputOembed.vue +4 -4
- package/modules/@apostrophecms/page/ui/apos/components/AposPagesManager.vue +15 -11
- package/modules/@apostrophecms/page/ui/apos/logic/AposPagesManager.js +1 -1
- package/modules/@apostrophecms/permission/ui/apos/components/AposInputRole.vue +3 -3
- package/modules/@apostrophecms/piece-type/ui/apos/components/AposDocsManager.vue +25 -17
- package/modules/@apostrophecms/piece-type/ui/apos/components/AposDocsManagerDisplay.vue +24 -20
- package/modules/@apostrophecms/piece-type/ui/apos/components/AposRelationshipEditor.vue +15 -11
- package/modules/@apostrophecms/polymorphic-type/index.js +0 -19
- package/modules/@apostrophecms/rich-text-widget/index.js +1 -0
- package/modules/@apostrophecms/rich-text-widget/ui/apos/components/AposImageControlDialog.vue +7 -6
- package/modules/@apostrophecms/rich-text-widget/ui/apos/components/AposRichTextWidgetEditor.vue +31 -30
- package/modules/@apostrophecms/rich-text-widget/ui/apos/components/AposTiptapAnchor.vue +12 -10
- package/modules/@apostrophecms/rich-text-widget/ui/apos/components/AposTiptapLink.vue +9 -8
- package/modules/@apostrophecms/rich-text-widget/ui/apos/components/AposTiptapStyles.vue +3 -3
- package/modules/@apostrophecms/rich-text-widget/ui/apos/components/AposTiptapTable.vue +3 -3
- package/modules/@apostrophecms/schema/index.js +30 -1
- package/modules/@apostrophecms/schema/ui/apos/components/AposArrayEditor.vue +10 -8
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputArea.vue +5 -3
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputArray.vue +81 -277
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputAttachment.vue +4 -2
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputBoolean.vue +24 -14
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputCheckboxes.vue +7 -6
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputColor.vue +10 -7
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputObject.vue +3 -3
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputRadio.vue +5 -4
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputRelationship.vue +15 -12
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputSelect.vue +1 -1
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputSlug.vue +16 -12
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputString.vue +19 -11
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputWrapper.vue +1 -1
- package/modules/@apostrophecms/schema/ui/apos/components/AposSchema.vue +65 -21
- package/modules/@apostrophecms/schema/ui/apos/components/AposSubform.vue +2 -2
- package/modules/@apostrophecms/schema/ui/apos/logic/AposArrayEditor.js +0 -4
- package/modules/@apostrophecms/schema/ui/apos/logic/AposInputArea.js +3 -3
- package/modules/@apostrophecms/schema/ui/apos/logic/AposInputArray.js +15 -4
- package/modules/@apostrophecms/schema/ui/apos/logic/AposInputAttachment.js +3 -3
- package/modules/@apostrophecms/schema/ui/apos/logic/AposInputCheckboxes.js +7 -7
- package/modules/@apostrophecms/schema/ui/apos/logic/AposInputColor.js +5 -8
- package/modules/@apostrophecms/schema/ui/apos/logic/AposInputDateAndTime.js +1 -1
- package/modules/@apostrophecms/schema/ui/apos/logic/AposInputObject.js +1 -1
- package/modules/@apostrophecms/schema/ui/apos/logic/AposInputRadio.js +1 -1
- package/modules/@apostrophecms/schema/ui/apos/logic/AposInputRelationship.js +12 -9
- package/modules/@apostrophecms/schema/ui/apos/logic/AposInputSelect.js +2 -2
- package/modules/@apostrophecms/schema/ui/apos/logic/AposInputString.js +6 -8
- package/modules/@apostrophecms/schema/ui/apos/logic/AposSchema.js +39 -13
- package/modules/@apostrophecms/schema/ui/apos/logic/AposSubform.js +1 -1
- package/modules/@apostrophecms/schema/ui/apos/mixins/AposInputMixin.js +9 -9
- package/modules/@apostrophecms/schema/ui/apos/scss/AposInputArray.scss +205 -0
- package/modules/@apostrophecms/settings/ui/apos/components/AposSettingsManager.vue +4 -4
- package/modules/@apostrophecms/settings/ui/apos/logic/AposSettingsManager.js +4 -4
- package/modules/@apostrophecms/submitted-draft/ui/apos/components/AposSubmittedDraftIcon.vue +5 -4
- package/modules/@apostrophecms/ui/ui/apos/components/AposButton.vue +4 -4
- package/modules/@apostrophecms/ui/ui/apos/components/AposButtonGroup.vue +6 -6
- package/modules/@apostrophecms/ui/ui/apos/components/AposButtonSplit.vue +120 -113
- package/modules/@apostrophecms/ui/ui/apos/components/AposCheckbox.vue +19 -19
- package/modules/@apostrophecms/ui/ui/apos/components/AposCombo.vue +15 -15
- package/modules/@apostrophecms/ui/ui/apos/components/AposContextMenu.vue +216 -191
- package/modules/@apostrophecms/ui/ui/apos/components/AposContextMenuDialog.vue +77 -65
- package/modules/@apostrophecms/ui/ui/apos/components/AposContextMenuItem.vue +1 -1
- package/modules/@apostrophecms/ui/ui/apos/components/AposContextMenuTip.vue +28 -50
- package/modules/@apostrophecms/ui/ui/apos/components/AposFile.vue +5 -5
- package/modules/@apostrophecms/ui/ui/apos/components/AposFilterMenu.vue +4 -4
- package/modules/@apostrophecms/ui/ui/apos/components/AposMinMaxCount.vue +5 -5
- package/modules/@apostrophecms/ui/ui/apos/components/AposPager.vue +14 -8
- package/modules/@apostrophecms/ui/ui/apos/components/AposSlat.vue +2 -2
- package/modules/@apostrophecms/ui/ui/apos/components/AposSlatList.vue +53 -59
- package/modules/@apostrophecms/ui/ui/apos/components/AposSubformPreview.vue +2 -2
- package/modules/@apostrophecms/ui/ui/apos/components/AposTagApply.vue +40 -35
- package/modules/@apostrophecms/ui/ui/apos/components/AposToggle.vue +2 -2
- package/modules/@apostrophecms/ui/ui/apos/components/AposTree.vue +9 -11
- package/modules/@apostrophecms/ui/ui/apos/components/AposTreeHeader.vue +5 -3
- package/modules/@apostrophecms/ui/ui/apos/components/AposTreeRows.vue +129 -129
- package/modules/@apostrophecms/ui/ui/apos/composables/AposTheme.js +11 -0
- package/modules/@apostrophecms/ui/ui/apos/lib/click-outside-element.js +4 -4
- package/modules/@apostrophecms/ui/ui/apos/lib/i18next.js +56 -50
- package/modules/@apostrophecms/ui/ui/apos/lib/tooltip.js +191 -0
- package/modules/@apostrophecms/ui/ui/apos/lib/vue.js +19 -10
- package/modules/@apostrophecms/ui/ui/apos/mixins/AposAdvisoryLockMixin.js +1 -1
- package/modules/@apostrophecms/ui/ui/apos/scss/global/_tables.scss +1 -1
- package/modules/@apostrophecms/ui/ui/apos/scss/global/_tooltips.scss +6 -22
- package/modules/@apostrophecms/ui/ui/apos/scss/shared/_table-rows.scss +1 -1
- package/modules/@apostrophecms/widget-type/index.js +8 -2
- package/modules/@apostrophecms/widget-type/ui/apos/components/AposWidgetEditor.vue +26 -22
- package/modules/@apostrophecms/widget-type/ui/apos/mixins/AposWidgetMixin.js +4 -4
- package/package.json +31 -44
- package/test/schemas.js +10 -4
- package/modules/@apostrophecms/ui/ui/apos/lib/localized-v-tooltip.js +0 -63
- package/modules/@apostrophecms/ui/ui/apos/lib/tooltip-options.js +0 -13
|
@@ -1,64 +1,42 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<!-- Disabling since the SVG is mostly not active vue template code. -->
|
|
3
|
-
<!-- eslint-disable vue/max-attributes-per-line -->
|
|
4
2
|
<svg
|
|
5
|
-
:
|
|
6
|
-
class="apos-context-menu__tip"
|
|
3
|
+
:ref="(el) => emit('set-arrow', el)"
|
|
4
|
+
class="apos-context-menu__tip"
|
|
5
|
+
width="27px"
|
|
6
|
+
height="11px"
|
|
7
|
+
viewBox="0 0 27 11"
|
|
8
|
+
version="1.1"
|
|
9
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
10
|
>
|
|
8
|
-
<g
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
<g
|
|
12
|
+
width="27px"
|
|
13
|
+
height="11px"
|
|
14
|
+
stroke="none"
|
|
15
|
+
stroke-width="1"
|
|
16
|
+
fill="none"
|
|
17
|
+
fill-rule="evenodd"
|
|
18
|
+
>
|
|
19
|
+
<path
|
|
20
|
+
class="apos-context-menu__tip-outline"
|
|
21
|
+
d="M17.2842712,1.46446609 L25.748,9.928 L1.749,9.928 L10.2132034,1.46446609 C12.1658249,-0.488155365 15.3316498,-0.488155365 17.2842712,1.46446609 Z"
|
|
22
|
+
stroke="var(--a-base-8)"
|
|
23
|
+
/>
|
|
24
|
+
<path
|
|
25
|
+
class="apos-context-menu__tip-background"
|
|
26
|
+
d="M17.0029602,1.84623992 C15.3903198,0.179595947 12.5749711,0.0148310371 10.7918701,1.61499023 C9.60313614,2.68176303 9.52086075,2.75884626 10.5450439,1.84623992 L0.815307617,11.4361572 L26.6676025,11.4361572 L17.0029602,1.84623992 Z"
|
|
27
|
+
fill="var(--a-background-primary)"
|
|
28
|
+
fill-rule="nonzero"
|
|
29
|
+
/>
|
|
11
30
|
</g>
|
|
12
31
|
</svg>
|
|
13
|
-
<!-- eslint-enable vue/max-attributes-per-line -->
|
|
14
32
|
</template>
|
|
15
33
|
|
|
16
|
-
<script>
|
|
17
|
-
|
|
18
|
-
name: 'AposContextMenuTip',
|
|
19
|
-
props: {
|
|
20
|
-
align: {
|
|
21
|
-
type: String,
|
|
22
|
-
required: true
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
computed: {
|
|
26
|
-
alignmentModifier () {
|
|
27
|
-
return `apos-context-menu__tip--alignment-${this.align}`;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
};
|
|
34
|
+
<script setup>
|
|
35
|
+
const emit = defineEmits([ 'set-arrow' ]);
|
|
31
36
|
</script>
|
|
32
37
|
|
|
33
38
|
<style lang="scss">
|
|
34
39
|
.apos-context-menu__tip {
|
|
35
40
|
position: absolute;
|
|
36
41
|
}
|
|
37
|
-
|
|
38
|
-
.apos-context-menu__tip--alignment-start {
|
|
39
|
-
left: 20px;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.apos-context-menu__tip--alignment-center {
|
|
43
|
-
right: 0;
|
|
44
|
-
left: 0;
|
|
45
|
-
margin-left: auto;
|
|
46
|
-
margin-right: auto;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.apos-context-menu__tip--alignment-end {
|
|
50
|
-
right: 20px;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.apos-popover[x-placement^='bottom'] .apos-context-menu__tip {
|
|
54
|
-
top: -10px;
|
|
55
|
-
bottom: auto;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.apos-popover[x-placement^='top'] .apos-context-menu__tip {
|
|
59
|
-
top: auto;
|
|
60
|
-
bottom: -10px;
|
|
61
|
-
transform: rotate(180deg);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
42
|
</style>
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<template v-else>
|
|
19
19
|
<paperclip-icon :size="14" class="apos-file-icon" />
|
|
20
20
|
{{ messages.primary }}
|
|
21
|
-
<span class="apos-file-highlight"
|
|
21
|
+
<span v-if="messages.highlighted" class="apos-file-highlight">
|
|
22
22
|
{{ messages.highlighted }}
|
|
23
23
|
</span>
|
|
24
24
|
</template>
|
|
@@ -28,15 +28,15 @@
|
|
|
28
28
|
type="file"
|
|
29
29
|
class="apos-sr-only"
|
|
30
30
|
:disabled="disabled || fileOrAttachment"
|
|
31
|
-
@input="uploadFile"
|
|
32
31
|
:accept="allowedExtensions"
|
|
32
|
+
@input="uploadFile"
|
|
33
33
|
>
|
|
34
34
|
</label>
|
|
35
35
|
<div v-if="fileOrAttachment" class="apos-file-files">
|
|
36
36
|
<AposSlatList
|
|
37
|
-
:value="[fileOrAttachment]"
|
|
38
|
-
@input="update"
|
|
37
|
+
:model-value="[fileOrAttachment]"
|
|
39
38
|
:disabled="attachmentDisabled"
|
|
39
|
+
@update:model-value="update"
|
|
40
40
|
/>
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
@@ -200,7 +200,7 @@ export default {
|
|
|
200
200
|
justify-content: center;
|
|
201
201
|
pointer-events: none;
|
|
202
202
|
// v-html goofiness
|
|
203
|
-
|
|
203
|
+
&:deep(.apos-file-highlight) {
|
|
204
204
|
color: var(--a-primary);
|
|
205
205
|
font-weight: var(--a-weight-bold);
|
|
206
206
|
}
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
<component
|
|
10
10
|
:is="map[set.field.type]"
|
|
11
11
|
:field="set.field"
|
|
12
|
-
:value="set.value"
|
|
12
|
+
:model-value="set.value"
|
|
13
13
|
:status="set.status"
|
|
14
14
|
:icon="
|
|
15
15
|
set.field.type === 'select' ? 'unfold-more-horizontal-icon' : ''
|
|
16
16
|
"
|
|
17
|
-
@
|
|
17
|
+
@update:model-value="input($event, set.name)"
|
|
18
18
|
/>
|
|
19
19
|
</div>
|
|
20
20
|
</div>
|
|
@@ -133,7 +133,7 @@ export default {
|
|
|
133
133
|
.apos-filters-menu {
|
|
134
134
|
min-width: 140px;
|
|
135
135
|
|
|
136
|
-
|
|
136
|
+
:deep(.apos-input--select) {
|
|
137
137
|
padding-top: 10px;
|
|
138
138
|
padding-bottom: 10px;
|
|
139
139
|
background-color: var(--a-base-10);
|
|
@@ -141,7 +141,7 @@ export default {
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
.apos-filters-menu
|
|
144
|
+
.apos-filters-menu :deep(.apos-field__label) {
|
|
145
145
|
display: block;
|
|
146
146
|
width: 100%;
|
|
147
147
|
padding-bottom: 10px;
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
export default {
|
|
29
29
|
name: 'AposMinMaxCount',
|
|
30
30
|
props: {
|
|
31
|
-
|
|
31
|
+
modelValue: {
|
|
32
32
|
required: true,
|
|
33
33
|
type: Array
|
|
34
34
|
},
|
|
@@ -39,12 +39,12 @@ export default {
|
|
|
39
39
|
},
|
|
40
40
|
computed: {
|
|
41
41
|
maxed() {
|
|
42
|
-
return (this.field.max !== undefined) && (this.
|
|
42
|
+
return (this.field.max !== undefined) && (this.modelValue.length >= this.field.max);
|
|
43
43
|
},
|
|
44
44
|
minError() {
|
|
45
45
|
let minError = false;
|
|
46
46
|
if (this.effectiveMin) {
|
|
47
|
-
if (this.
|
|
47
|
+
if (this.modelValue.length < this.effectiveMin) {
|
|
48
48
|
minError = true;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
@@ -54,7 +54,7 @@ export default {
|
|
|
54
54
|
maxError() {
|
|
55
55
|
let maxError = false;
|
|
56
56
|
if (this.field.max !== undefined) {
|
|
57
|
-
if (this.
|
|
57
|
+
if (this.modelValue.length > this.field.max) {
|
|
58
58
|
maxError = true;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
@@ -62,7 +62,7 @@ export default {
|
|
|
62
62
|
},
|
|
63
63
|
countLabel() {
|
|
64
64
|
return this.$t('apostrophe:numberAdded', {
|
|
65
|
-
count: this.
|
|
65
|
+
count: this.modelValue.length
|
|
66
66
|
});
|
|
67
67
|
},
|
|
68
68
|
// Here in the array editor we use effectiveMin to factor in the
|
|
@@ -3,19 +3,23 @@
|
|
|
3
3
|
<AposButton
|
|
4
4
|
:disabled="currentPage == 1"
|
|
5
5
|
class="apos-pager__btn"
|
|
6
|
+
type="outline"
|
|
7
|
+
icon="chevron-left-icon"
|
|
6
8
|
:modifiers="['small']"
|
|
7
|
-
|
|
8
|
-
:icon-only="true" icon="chevron-left-icon"
|
|
9
|
+
:icon-only="true"
|
|
9
10
|
:label="prevButtonLabel"
|
|
11
|
+
@click="incrementPage(-1)"
|
|
10
12
|
/>
|
|
11
13
|
<div class="apos-input-wrapper">
|
|
12
14
|
<select
|
|
13
|
-
|
|
15
|
+
v-model="selectedPage"
|
|
14
16
|
class="apos-pager__page-select apos-input apos-input--select"
|
|
15
|
-
|
|
17
|
+
:disabled="totalPages <= 1"
|
|
18
|
+
:aria-label="$t('apostrophe:selectPage')"
|
|
16
19
|
>
|
|
17
20
|
<option
|
|
18
|
-
v-for="num in totalPages"
|
|
21
|
+
v-for="num in totalPages"
|
|
22
|
+
:key="num"
|
|
19
23
|
:value="num"
|
|
20
24
|
>
|
|
21
25
|
{{ $t('apostrophe:pageNumber', { number: num }) }}
|
|
@@ -25,17 +29,19 @@
|
|
|
25
29
|
</div>
|
|
26
30
|
<AposButton
|
|
27
31
|
:disabled="currentPage >= totalPages"
|
|
32
|
+
type="outline"
|
|
28
33
|
class="apos-pager__btn"
|
|
34
|
+
icon="chevron-right-icon"
|
|
29
35
|
:modifiers="['small']"
|
|
30
|
-
|
|
31
|
-
:icon-only="true" icon="chevron-right-icon"
|
|
36
|
+
:icon-only="true"
|
|
32
37
|
:label="nextButtonLabel"
|
|
38
|
+
@click="incrementPage(1)"
|
|
33
39
|
/>
|
|
34
40
|
</nav>
|
|
35
41
|
</template>
|
|
36
42
|
|
|
37
43
|
<script>
|
|
38
|
-
import MenuSwap from 'vue-material-design-icons/MenuSwap.vue';
|
|
44
|
+
import MenuSwap from '@apostrophecms/vue-material-design-icons/MenuSwap.vue';
|
|
39
45
|
|
|
40
46
|
export default {
|
|
41
47
|
name: 'AposPager',
|
|
@@ -270,7 +270,7 @@ export default {
|
|
|
270
270
|
.apos-slat.apos-is-selected:focus {
|
|
271
271
|
background-color: var(--a-primary);
|
|
272
272
|
&,
|
|
273
|
-
|
|
273
|
+
:deep(.apos-button) {
|
|
274
274
|
color: var(--a-white);
|
|
275
275
|
}
|
|
276
276
|
&:hover {
|
|
@@ -292,7 +292,7 @@ export default {
|
|
|
292
292
|
display: flex;
|
|
293
293
|
align-items: center;
|
|
294
294
|
max-width: 75%;
|
|
295
|
-
|
|
295
|
+
&:deep(.trigger) {
|
|
296
296
|
/* This gets inline positioned and has doesn't provide an extra class to beef up, sorry */
|
|
297
297
|
/* stylelint-disable-next-line declaration-no-important */
|
|
298
298
|
display: flex !important;
|
|
@@ -2,55 +2,55 @@
|
|
|
2
2
|
<template>
|
|
3
3
|
<div ref="root">
|
|
4
4
|
<draggable
|
|
5
|
+
:id="listId"
|
|
6
|
+
item-key="_id"
|
|
5
7
|
class="apos-slat-list"
|
|
6
8
|
tag="ol"
|
|
7
9
|
role="list"
|
|
10
|
+
:options="dragOptions"
|
|
8
11
|
:list="next"
|
|
9
|
-
|
|
10
|
-
v-bind="dragOptions"
|
|
11
|
-
@start="isDragging=true"
|
|
12
|
-
@end="isDragging=false"
|
|
13
|
-
:id="listId"
|
|
12
|
+
@update="update"
|
|
14
13
|
>
|
|
15
|
-
<
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
14
|
+
<template #item="{element: item}">
|
|
15
|
+
<transition-group type="transition" name="apos-flip-list">
|
|
16
|
+
<AposSlat
|
|
17
|
+
:key="item._id"
|
|
18
|
+
class="apos-slat-list__item"
|
|
19
|
+
:item="item"
|
|
20
|
+
:selected="selected === item._id"
|
|
21
|
+
:class="{'apos-slat-list__item--disabled' : disabled, 'apos-input--error': duplicate}"
|
|
22
|
+
:disabled="disabled"
|
|
23
|
+
:engaged="engaged === item._id"
|
|
24
|
+
:parent="listId"
|
|
25
|
+
:slat-count="next.length"
|
|
26
|
+
:removable="removable"
|
|
27
|
+
:relationship-schema="relationshipSchema"
|
|
28
|
+
:editor-label="editorLabel"
|
|
29
|
+
:editor-icon="editorIcon"
|
|
30
|
+
@remove="remove"
|
|
31
|
+
@engage="engage"
|
|
32
|
+
@disengage="disengage"
|
|
33
|
+
@select="select"
|
|
34
|
+
@move="move"
|
|
35
|
+
@item-clicked="$emit('item-clicked', item)"
|
|
36
|
+
/>
|
|
37
|
+
</transition-group>
|
|
38
|
+
</template>
|
|
39
39
|
</draggable>
|
|
40
40
|
</div>
|
|
41
41
|
</template>
|
|
42
42
|
|
|
43
43
|
<script>
|
|
44
|
-
import
|
|
44
|
+
import { Sortable } from 'sortablejs-vue3';
|
|
45
45
|
import cuid from 'cuid';
|
|
46
46
|
|
|
47
47
|
export default {
|
|
48
48
|
name: 'AposSlatList',
|
|
49
49
|
components: {
|
|
50
|
-
draggable
|
|
50
|
+
draggable: Sortable
|
|
51
51
|
},
|
|
52
52
|
props: {
|
|
53
|
-
|
|
53
|
+
modelValue: {
|
|
54
54
|
type: Array,
|
|
55
55
|
required: true
|
|
56
56
|
},
|
|
@@ -83,13 +83,12 @@ export default {
|
|
|
83
83
|
default: null
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
|
-
emits: [ '
|
|
86
|
+
emits: [ 'item-clicked', 'select', 'update:modelValue' ],
|
|
87
87
|
data() {
|
|
88
88
|
return {
|
|
89
89
|
isDragging: false,
|
|
90
|
-
delayedDragging: false,
|
|
91
90
|
engaged: null,
|
|
92
|
-
next: this.
|
|
91
|
+
next: this.modelValue.slice()
|
|
93
92
|
};
|
|
94
93
|
},
|
|
95
94
|
computed: {
|
|
@@ -104,24 +103,16 @@ export default {
|
|
|
104
103
|
};
|
|
105
104
|
}
|
|
106
105
|
},
|
|
106
|
+
|
|
107
107
|
watch: {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
this.delayedDragging = true;
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
this.$nextTick(() => {
|
|
114
|
-
this.delayedDragging = false;
|
|
115
|
-
});
|
|
116
|
-
},
|
|
117
|
-
value() {
|
|
118
|
-
this.next = this.value.slice();
|
|
108
|
+
modelValue() {
|
|
109
|
+
this.next = this.modelValue.slice();
|
|
119
110
|
},
|
|
120
111
|
next(newValue, oldValue) {
|
|
121
112
|
let equal = true;
|
|
122
|
-
if (newValue.length === this.
|
|
113
|
+
if (newValue.length === this.modelValue.length) {
|
|
123
114
|
for (let i = 0; (i < newValue.length); i++) {
|
|
124
|
-
if ((newValue[i]._id !== this.
|
|
115
|
+
if ((newValue[i]._id !== this.modelValue[i]._id) || (newValue[i].title !== this.modelValue[i].title)) {
|
|
125
116
|
equal = false;
|
|
126
117
|
break;
|
|
127
118
|
}
|
|
@@ -130,11 +121,22 @@ export default {
|
|
|
130
121
|
equal = false;
|
|
131
122
|
}
|
|
132
123
|
if (!equal) {
|
|
133
|
-
this.$emit('
|
|
124
|
+
this.$emit('update:modelValue', this.next);
|
|
134
125
|
}
|
|
135
126
|
}
|
|
136
127
|
},
|
|
137
128
|
methods: {
|
|
129
|
+
update({
|
|
130
|
+
oldIndex, newIndex
|
|
131
|
+
}) {
|
|
132
|
+
if (oldIndex !== newIndex) {
|
|
133
|
+
this.next = this.next.map((elem, index) => {
|
|
134
|
+
return index === oldIndex
|
|
135
|
+
? this.next[newIndex]
|
|
136
|
+
: (index === newIndex && this.next[oldIndex]) || elem;
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
},
|
|
138
140
|
engage(id) {
|
|
139
141
|
this.engaged = id;
|
|
140
142
|
},
|
|
@@ -152,15 +154,14 @@ export default {
|
|
|
152
154
|
} else if (focusNext && this.next[itemIndex - 1]) {
|
|
153
155
|
this.focusElement(this.next[itemIndex - 1]._id);
|
|
154
156
|
}
|
|
155
|
-
this.$emit('update', this.next);
|
|
156
157
|
},
|
|
158
|
+
|
|
157
159
|
move(id, dir) {
|
|
158
160
|
const index = this.getIndex(id);
|
|
159
161
|
const target = dir > 0 ? index + 1 : index - 1;
|
|
160
162
|
if (this.next[target]) {
|
|
161
163
|
this.next.splice(target, 0, this.next.splice(index, 1)[0]);
|
|
162
164
|
this.focusElement(id);
|
|
163
|
-
return this.$emit('update', this.next);
|
|
164
165
|
}
|
|
165
166
|
},
|
|
166
167
|
getIndex(id) {
|
|
@@ -178,20 +179,13 @@ export default {
|
|
|
178
179
|
this.$refs.root.querySelector(`[data-id="${id}"]`).focus();
|
|
179
180
|
});
|
|
180
181
|
}
|
|
181
|
-
},
|
|
182
|
-
onMove({ relatedContext, draggedContext }) {
|
|
183
|
-
const relatedElement = relatedContext.element;
|
|
184
|
-
const draggedElement = draggedContext.element;
|
|
185
|
-
return (
|
|
186
|
-
(!relatedElement || !relatedElement.fixed) && !draggedElement.fixed
|
|
187
|
-
);
|
|
188
182
|
}
|
|
189
183
|
}
|
|
190
184
|
};
|
|
191
185
|
</script>
|
|
192
186
|
|
|
193
187
|
<style lang="scss" scoped>
|
|
194
|
-
.apos-slat-list
|
|
188
|
+
.apos-slat-list :deep(.apos-slat) {
|
|
195
189
|
margin-bottom: 5px;
|
|
196
190
|
transition: all 0.4s;
|
|
197
191
|
max-width: $input-max-width * 0.65;
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
</div>
|
|
6
6
|
<div class="apos-subform-preview__value" :class="{ 'is-help': !!subform.help }">
|
|
7
7
|
<component
|
|
8
|
+
:is="subform.previewComponent"
|
|
8
9
|
v-if="subform.previewComponent"
|
|
9
10
|
class="apos-subform-preview__value-block"
|
|
10
|
-
:is="subform.previewComponent"
|
|
11
11
|
:subform="subform"
|
|
12
12
|
:values="values"
|
|
13
13
|
/>
|
|
14
|
-
<span class="apos-subform-preview__value-block"
|
|
14
|
+
<span v-else class="apos-subform-preview__value-block">
|
|
15
15
|
{{ previewValue }}
|
|
16
16
|
</span>
|
|
17
17
|
</div>
|
|
@@ -1,55 +1,60 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<AposContextMenu
|
|
3
|
-
@open="open = $event"
|
|
4
3
|
menu-placement="bottom-end"
|
|
4
|
+
@open="open = $event"
|
|
5
5
|
>
|
|
6
6
|
<div class="apos-apply-tag-menu__inner">
|
|
7
7
|
<AposInputString
|
|
8
|
-
|
|
8
|
+
ref="textInput"
|
|
9
|
+
:field="searchField"
|
|
10
|
+
:model-value="searchValue"
|
|
11
|
+
:status="searchStatus"
|
|
12
|
+
@update:model-value="updateSearchInput"
|
|
9
13
|
@return="create"
|
|
10
|
-
:field="searchField" :value="searchValue"
|
|
11
|
-
:status="searchStatus" ref="textInput"
|
|
12
14
|
/>
|
|
13
15
|
<div class="apos-apply-tag__create">
|
|
14
16
|
<AposButton
|
|
15
|
-
@click="create"
|
|
16
17
|
:label="createLabel"
|
|
17
18
|
type="quiet"
|
|
18
19
|
:disabled="disabledCreate"
|
|
19
20
|
:disable-focus="!open"
|
|
21
|
+
@click="create"
|
|
20
22
|
/>
|
|
21
23
|
</div>
|
|
22
24
|
<transition name="fade">
|
|
23
|
-
<
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
25
|
+
<div>
|
|
26
|
+
<ol v-if="searchTags.length && !creating" class="apos-apply-tag-menu__tags">
|
|
27
|
+
<li
|
|
28
|
+
v-for="tag in searchTags"
|
|
29
|
+
:key="`${keyPrefix}-${tag.slug}`"
|
|
30
|
+
class="apos-apply-tag-menu__tag"
|
|
31
|
+
>
|
|
32
|
+
<AposCheckbox
|
|
33
|
+
v-if="checkboxes[tag.slug]"
|
|
34
|
+
v-model="checked"
|
|
35
|
+
:field="checkboxes[tag.slug].field"
|
|
36
|
+
:status="checkboxes[tag.slug].status"
|
|
37
|
+
:choice="checkboxes[tag.slug].choice"
|
|
38
|
+
:disable-focus="!open"
|
|
39
|
+
@updated="updateTag"
|
|
40
|
+
/>
|
|
41
|
+
</li>
|
|
42
|
+
</ol>
|
|
43
|
+
<div v-if="(!searchTags.length && myTags.length) && !creating" class="apos-apply-tag-menu__empty">
|
|
44
|
+
<p class="apos-apply-tag-menu__empty-message">
|
|
45
|
+
We couldn't find any matching tags. Perhaps
|
|
46
|
+
<AposButton
|
|
47
|
+
:label="`create ${searchInputValue} ?`"
|
|
48
|
+
type="quiet"
|
|
49
|
+
:disabled="disabledCreate"
|
|
50
|
+
:disable-focus="!open"
|
|
51
|
+
@click="create"
|
|
52
|
+
/>
|
|
53
|
+
</p>
|
|
54
|
+
<span class="apos-apply-tag-menu__empty-icon">
|
|
55
|
+
🌾
|
|
56
|
+
</span>
|
|
57
|
+
</div>
|
|
53
58
|
</div>
|
|
54
59
|
</transition>
|
|
55
60
|
</div>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="apos-toggle__container">
|
|
3
3
|
<div
|
|
4
4
|
class="apos-toggle__slider"
|
|
5
|
-
:class="{'apos-toggle__slider--activated': !
|
|
5
|
+
:class="{'apos-toggle__slider--activated': !modelValue}"
|
|
6
6
|
@click="$emit('toggle')"
|
|
7
7
|
/>
|
|
8
8
|
</div>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
export default {
|
|
14
14
|
props: {
|
|
15
|
-
|
|
15
|
+
modelValue: {
|
|
16
16
|
type: Boolean,
|
|
17
17
|
required: true
|
|
18
18
|
}
|
|
@@ -7,22 +7,24 @@
|
|
|
7
7
|
@calculated="setWidths"
|
|
8
8
|
/>
|
|
9
9
|
<AposTreeHeader
|
|
10
|
-
:headers="headers"
|
|
11
|
-
:
|
|
10
|
+
:headers="headers"
|
|
11
|
+
:icons="icons"
|
|
12
|
+
:col-widths="colWidths"
|
|
13
|
+
:hidden="options.hideHeader"
|
|
12
14
|
/>
|
|
13
15
|
<AposTreeRows
|
|
14
|
-
v-model="checkedProxy"
|
|
16
|
+
v-model:checked="checkedProxy"
|
|
17
|
+
list-id="root"
|
|
15
18
|
:rows="myItems"
|
|
16
19
|
:headers="headers"
|
|
17
20
|
:icons="icons"
|
|
18
21
|
:col-widths="colWidths"
|
|
19
22
|
:level="1"
|
|
20
23
|
:nested="nested"
|
|
21
|
-
@update="update"
|
|
22
|
-
list-id="root"
|
|
23
24
|
:options="options"
|
|
24
25
|
:tree-id="treeId"
|
|
25
26
|
:module-options="moduleOptions"
|
|
27
|
+
@update="update"
|
|
26
28
|
/>
|
|
27
29
|
</div>
|
|
28
30
|
</template>
|
|
@@ -33,10 +35,6 @@ import cuid from 'cuid';
|
|
|
33
35
|
|
|
34
36
|
export default {
|
|
35
37
|
name: 'AposTree',
|
|
36
|
-
model: {
|
|
37
|
-
prop: 'checked',
|
|
38
|
-
event: 'change'
|
|
39
|
-
},
|
|
40
38
|
props: {
|
|
41
39
|
headers: {
|
|
42
40
|
type: Array,
|
|
@@ -79,7 +77,7 @@ export default {
|
|
|
79
77
|
}
|
|
80
78
|
}
|
|
81
79
|
},
|
|
82
|
-
emits: [ 'update', '
|
|
80
|
+
emits: [ 'update', 'update:checked' ],
|
|
83
81
|
data() {
|
|
84
82
|
return {
|
|
85
83
|
// Copy the `items` property to mutate with VueDraggable.
|
|
@@ -96,7 +94,7 @@ export default {
|
|
|
96
94
|
return this.checked;
|
|
97
95
|
},
|
|
98
96
|
set(val) {
|
|
99
|
-
this.$emit('
|
|
97
|
+
this.$emit('update:checked', val);
|
|
100
98
|
}
|
|
101
99
|
},
|
|
102
100
|
spacingRow() {
|