apostrophe 4.3.3 → 4.4.1
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/.stylelintrc +1 -93
- package/CHANGELOG.md +57 -1
- package/modules/@apostrophecms/admin-bar/ui/apos/components/TheAposAdminBar.vue +7 -1
- package/modules/@apostrophecms/admin-bar/ui/apos/components/TheAposAdminBarLocale.vue +6 -3
- package/modules/@apostrophecms/admin-bar/ui/apos/components/TheAposAdminBarUser.vue +2 -1
- package/modules/@apostrophecms/admin-bar/ui/apos/components/TheAposContextModeAndSettings.vue +1 -0
- package/modules/@apostrophecms/admin-bar/ui/apos/components/TheAposContextTitle.vue +3 -2
- package/modules/@apostrophecms/admin-bar/ui/apos/components/TheAposSavingIndicator.vue +6 -2
- package/modules/@apostrophecms/any-page-type/index.js +2 -2
- package/modules/@apostrophecms/area/ui/apos/components/AposAreaContextualMenu.vue +13 -7
- package/modules/@apostrophecms/area/ui/apos/components/AposAreaEditor.vue +4 -4
- package/modules/@apostrophecms/area/ui/apos/components/AposAreaExpandedMenu.vue +17 -11
- package/modules/@apostrophecms/area/ui/apos/components/AposAreaMenu.vue +13 -7
- package/modules/@apostrophecms/area/ui/apos/components/AposAreaMenuItem.vue +3 -0
- package/modules/@apostrophecms/area/ui/apos/components/AposAreaWidget.vue +36 -20
- package/modules/@apostrophecms/area/ui/apos/components/AposWidgetControls.vue +18 -11
- package/modules/@apostrophecms/busy/ui/apos/components/TheAposBusy.vue +6 -8
- package/modules/@apostrophecms/command-menu/index.js +12 -7
- package/modules/@apostrophecms/command-menu/ui/apos/components/AposCommandMenuKey.vue +9 -7
- package/modules/@apostrophecms/command-menu/ui/apos/components/AposCommandMenuShortcut.vue +28 -15
- package/modules/@apostrophecms/command-menu/ui/apos/components/TheAposCommandMenu.vue +44 -42
- package/modules/@apostrophecms/doc-type/index.js +2 -1
- package/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue +4 -3
- package/modules/@apostrophecms/file-tag/index.js +1 -1
- package/modules/@apostrophecms/global/index.js +29 -0
- package/modules/@apostrophecms/i18n/i18n/de.json +20 -0
- package/modules/@apostrophecms/i18n/i18n/en.json +1 -0
- package/modules/@apostrophecms/i18n/i18n/es.json +1 -0
- package/modules/@apostrophecms/i18n/i18n/fr.json +1 -0
- package/modules/@apostrophecms/i18n/i18n/it.json +1 -0
- package/modules/@apostrophecms/i18n/i18n/pt-BR.json +1 -0
- package/modules/@apostrophecms/i18n/i18n/sk.json +1 -0
- package/modules/@apostrophecms/i18n/ui/apos/components/AposI18nLocalize.vue +25 -17
- package/modules/@apostrophecms/i18n/ui/apos/components/AposI18nLocalizeErrors.vue +5 -4
- package/modules/@apostrophecms/image/index.js +2 -1
- package/modules/@apostrophecms/image/ui/apos/components/AposImageCropper.vue +1 -1
- package/modules/@apostrophecms/image/ui/apos/components/AposImageRelationshipEditor.vue +9 -8
- package/modules/@apostrophecms/image/ui/apos/components/AposMediaManager.vue +13 -10
- package/modules/@apostrophecms/image/ui/apos/components/AposMediaManagerDisplay.vue +11 -7
- package/modules/@apostrophecms/image/ui/apos/components/AposMediaManagerEditor.vue +12 -2
- package/modules/@apostrophecms/image/ui/apos/components/AposMediaManagerSelections.vue +8 -5
- package/modules/@apostrophecms/image/ui/apos/components/AposMediaUploader.vue +17 -8
- package/modules/@apostrophecms/image-tag/index.js +1 -1
- package/modules/@apostrophecms/login/ui/apos/components/AposLoginForm.vue +1 -0
- package/modules/@apostrophecms/login/ui/apos/components/AposResetPasswordForm.vue +1 -0
- package/modules/@apostrophecms/login/ui/apos/components/TheAposLogin.vue +16 -14
- package/modules/@apostrophecms/login/ui/apos/components/TheAposLoginHeader.vue +9 -4
- package/modules/@apostrophecms/modal/ui/apos/apps/AposModals.js +11 -59
- package/modules/@apostrophecms/modal/ui/apos/components/AposDocsManagerToolbar.vue +1 -0
- package/modules/@apostrophecms/modal/ui/apos/components/AposModal.vue +59 -55
- package/modules/@apostrophecms/modal/ui/apos/components/AposModalBody.vue +1 -0
- package/modules/@apostrophecms/modal/ui/apos/components/AposModalBreadcrumbs.vue +5 -0
- package/modules/@apostrophecms/modal/ui/apos/components/AposModalConfirm.vue +6 -10
- package/modules/@apostrophecms/modal/ui/apos/components/AposModalShareDraft.vue +14 -16
- package/modules/@apostrophecms/modal/ui/apos/components/AposModalTabs.vue +68 -5
- package/modules/@apostrophecms/modal/ui/apos/components/AposWidgetModalTabs.vue +15 -9
- package/modules/@apostrophecms/modal/ui/apos/components/TheAposModals.vue +48 -122
- package/modules/@apostrophecms/modal/ui/apos/composables/AposFocus.js +9 -6
- package/modules/@apostrophecms/modal/ui/apos/mixins/AposDocsManagerMixin.js +38 -36
- package/modules/@apostrophecms/notification/ui/apos/components/AposNotification.vue +15 -9
- package/modules/@apostrophecms/notification/ui/apos/components/TheAposNotifications.vue +2 -2
- package/modules/@apostrophecms/page/index.js +9 -6
- package/modules/@apostrophecms/page/ui/apos/components/AposPagesManager.vue +3 -4
- package/modules/@apostrophecms/page/ui/apos/logic/AposPagesManager.js +5 -10
- package/modules/@apostrophecms/page/views/notFound.html +5 -5
- package/modules/@apostrophecms/permission/ui/apos/components/AposPermissionGrid.vue +6 -2
- package/modules/@apostrophecms/piece-page-type/index.js +1 -0
- package/modules/@apostrophecms/piece-type/ui/apos/components/AposDocsManager.vue +8 -12
- package/modules/@apostrophecms/piece-type/ui/apos/components/AposDocsManagerSelectBox.vue +2 -2
- package/modules/@apostrophecms/piece-type/ui/apos/components/AposRelationshipEditor.vue +1 -2
- package/modules/@apostrophecms/rich-text-widget/ui/apos/components/AposRichTextWidgetEditor.vue +59 -41
- package/modules/@apostrophecms/rich-text-widget/ui/apos/components/AposTiptapDivider.vue +1 -0
- package/modules/@apostrophecms/rich-text-widget/ui/apos/components/AposTiptapMarks.vue +3 -1
- package/modules/@apostrophecms/rich-text-widget/ui/apos/components/AposTiptapStyles.vue +3 -1
- package/modules/@apostrophecms/rich-text-widget/ui/apos/components/AposTiptapTable.vue +2 -0
- package/modules/@apostrophecms/rich-text-widget/ui/apos/tiptap-extensions/Classes.js +1 -7
- package/modules/@apostrophecms/rich-text-widget/ui/apos/tiptap-extensions/Heading.js +10 -0
- package/modules/@apostrophecms/schema/lib/addFieldTypes.js +8 -3
- package/modules/@apostrophecms/schema/ui/apos/components/AposArrayEditor.vue +4 -6
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputArea.vue +1 -0
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputBoolean.vue +5 -2
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputColor.vue +1 -0
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputDateAndTime.vue +1 -1
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputObject.vue +2 -0
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputRadio.vue +1 -0
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputRange.vue +14 -8
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputRelationship.vue +4 -2
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputSlug.vue +7 -1
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputString.vue +3 -1
- package/modules/@apostrophecms/schema/ui/apos/components/AposInputWrapper.vue +35 -5
- package/modules/@apostrophecms/schema/ui/apos/components/AposSchema.vue +6 -3
- package/modules/@apostrophecms/schema/ui/apos/components/AposSearchList.vue +50 -15
- package/modules/@apostrophecms/schema/ui/apos/components/AposSubform.vue +5 -10
- package/modules/@apostrophecms/schema/ui/apos/logic/AposArrayEditor.js +17 -17
- package/modules/@apostrophecms/schema/ui/apos/logic/AposInputRelationship.js +3 -0
- package/modules/@apostrophecms/schema/ui/apos/logic/AposInputString.js +9 -0
- package/modules/@apostrophecms/schema/ui/apos/logic/AposInputWrapper.js +7 -0
- package/modules/@apostrophecms/schema/ui/apos/logic/AposSchema.js +8 -3
- package/modules/@apostrophecms/schema/ui/apos/logic/AposSearchList.js +3 -0
- package/modules/@apostrophecms/schema/ui/apos/mixins/AposInputMixin.js +5 -0
- package/modules/@apostrophecms/schema/ui/apos/scss/AposInputArray.scss +42 -9
- package/modules/@apostrophecms/search/index.js +1 -0
- package/modules/@apostrophecms/settings/index.js +33 -0
- package/modules/@apostrophecms/settings/ui/apos/components/AposSettingsManager.vue +6 -7
- package/modules/@apostrophecms/settings/ui/apos/logic/AposSettingsManager.js +0 -1
- package/modules/@apostrophecms/submitted-draft/index.js +26 -0
- package/modules/@apostrophecms/submitted-draft/ui/apos/components/AposSubmittedDraftIcon.vue +4 -4
- package/modules/@apostrophecms/template/views/templateError.html +4 -4
- package/modules/@apostrophecms/translation/ui/apos/components/AposTranslationIndicator.vue +2 -1
- package/modules/@apostrophecms/ui/ui/apos/components/AposAvatar.vue +3 -2
- package/modules/@apostrophecms/ui/ui/apos/components/AposButton.vue +62 -15
- package/modules/@apostrophecms/ui/ui/apos/components/AposButtonGroup.vue +8 -0
- package/modules/@apostrophecms/ui/ui/apos/components/AposButtonSplit.vue +9 -3
- package/modules/@apostrophecms/ui/ui/apos/components/AposCellContextMenu.vue +2 -0
- package/modules/@apostrophecms/ui/ui/apos/components/AposCellLabels.vue +1 -0
- package/modules/@apostrophecms/ui/ui/apos/components/AposCloudUploadIcon.vue +5 -5
- package/modules/@apostrophecms/ui/ui/apos/components/AposCombo.vue +7 -5
- package/modules/@apostrophecms/ui/ui/apos/components/AposContextMenu.vue +8 -5
- package/modules/@apostrophecms/ui/ui/apos/components/AposContextMenuDialog.vue +5 -3
- package/modules/@apostrophecms/ui/ui/apos/components/AposContextMenuItem.vue +22 -2
- package/modules/@apostrophecms/ui/ui/apos/components/AposEmptyState.vue +3 -1
- package/modules/@apostrophecms/ui/ui/apos/components/AposFile.vue +5 -1
- package/modules/@apostrophecms/ui/ui/apos/components/AposFilterMenu.vue +2 -1
- package/modules/@apostrophecms/ui/ui/apos/components/AposLabel.vue +1 -0
- package/modules/@apostrophecms/ui/ui/apos/components/AposMinMaxCount.vue +1 -0
- package/modules/@apostrophecms/ui/ui/apos/components/AposPager.vue +1 -0
- package/modules/@apostrophecms/ui/ui/apos/components/AposPagerDots.vue +3 -1
- package/modules/@apostrophecms/ui/ui/apos/components/AposSlat.vue +15 -2
- package/modules/@apostrophecms/ui/ui/apos/components/AposSlatList.vue +3 -1
- package/modules/@apostrophecms/ui/ui/apos/components/AposSpinner.vue +33 -7
- package/modules/@apostrophecms/ui/ui/apos/components/AposSubformPreview.vue +3 -2
- package/modules/@apostrophecms/ui/ui/apos/components/AposTag.vue +5 -3
- package/modules/@apostrophecms/ui/ui/apos/components/AposTagApply.vue +5 -2
- package/modules/@apostrophecms/ui/ui/apos/components/AposTagList.vue +5 -1
- package/modules/@apostrophecms/ui/ui/apos/components/AposTagListItem.vue +9 -1
- package/modules/@apostrophecms/ui/ui/apos/components/AposToggle.vue +13 -13
- package/modules/@apostrophecms/ui/ui/apos/components/AposTree.vue +1 -0
- package/modules/@apostrophecms/ui/ui/apos/components/AposTreeRows.vue +17 -7
- package/modules/@apostrophecms/ui/ui/apos/lib/vue.js +4 -0
- package/modules/@apostrophecms/ui/ui/apos/scss/global/_admin.scss +1 -1
- package/modules/@apostrophecms/ui/ui/apos/scss/global/_inputs.scss +28 -5
- package/modules/@apostrophecms/ui/ui/apos/scss/global/_scrollbars.scss +16 -0
- package/modules/@apostrophecms/ui/ui/apos/scss/global/_tables.scss +8 -3
- package/modules/@apostrophecms/ui/ui/apos/scss/global/_theme.scss +9 -8
- package/modules/@apostrophecms/ui/ui/apos/scss/global/_tooltips.scss +13 -7
- package/modules/@apostrophecms/ui/ui/apos/scss/global/import-all.scss +1 -1
- package/modules/@apostrophecms/ui/ui/apos/scss/mixins/_input_mixins.scss +5 -3
- package/modules/@apostrophecms/ui/ui/apos/scss/mixins/_mixins.scss +1 -0
- package/modules/@apostrophecms/ui/ui/apos/scss/mixins/_responsive.scss +4 -3
- package/modules/@apostrophecms/ui/ui/apos/scss/mixins/_theme_mixins.scss +6 -0
- package/modules/@apostrophecms/ui/ui/apos/scss/shared/_table-rows.scss +6 -3
- package/modules/@apostrophecms/ui/ui/apos/stores/modal.js +180 -0
- package/modules/@apostrophecms/widget-type/ui/apos/components/AposWidgetEditor.vue +2 -2
- package/package.json +4 -4
- package/test/modules/@apostrophecms/search/views/index.html +1 -0
- package/test/pages.js +227 -0
- package/test/schemas.js +184 -0
- package/test/search.js +49 -13
|
@@ -498,29 +498,35 @@ export default {
|
|
|
498
498
|
min-height: 50px;
|
|
499
499
|
border-radius: var(--a-border-radius);
|
|
500
500
|
outline: 1px solid transparent;
|
|
501
|
-
transition: outline
|
|
501
|
+
transition: outline 200ms ease;
|
|
502
|
+
|
|
502
503
|
&.apos-is-highlighted {
|
|
503
504
|
outline: 1px dashed var(--a-primary-transparent-50);
|
|
504
505
|
}
|
|
506
|
+
|
|
505
507
|
&.apos-is-focused {
|
|
506
508
|
outline: 1px dashed var(--a-primary);
|
|
509
|
+
|
|
507
510
|
&:deep(.apos-rich-text-editor__editor.apos-is-visually-empty) {
|
|
508
511
|
box-shadow: none;
|
|
509
512
|
}
|
|
510
513
|
}
|
|
514
|
+
|
|
511
515
|
&.apos-is-ui-adjusted {
|
|
512
516
|
.apos-area-widget-controls--modify {
|
|
513
517
|
transform: translate3d(-10px, 50px, 0);
|
|
514
518
|
}
|
|
519
|
+
|
|
515
520
|
.apos-area-widget__label {
|
|
516
521
|
transform: translate(-10px, 10px);
|
|
517
522
|
}
|
|
518
523
|
}
|
|
519
524
|
|
|
520
|
-
.apos-area-widget-inner
|
|
525
|
+
.apos-area-widget-inner &::after {
|
|
521
526
|
display: none;
|
|
522
527
|
}
|
|
523
|
-
|
|
528
|
+
|
|
529
|
+
.apos-area-widget-inner &::before {
|
|
524
530
|
z-index: $z-index-under;
|
|
525
531
|
top: 0;
|
|
526
532
|
left: 0;
|
|
@@ -531,17 +537,19 @@ export default {
|
|
|
531
537
|
background-color: var(--a-base-5);
|
|
532
538
|
pointer-events: none;
|
|
533
539
|
}
|
|
534
|
-
|
|
535
|
-
.apos-area-widget-inner &.apos-is-
|
|
540
|
+
|
|
541
|
+
.apos-area-widget-inner &.apos-is-focused::before,
|
|
542
|
+
.apos-area-widget-inner &.apos-is-highlighted::before {
|
|
536
543
|
z-index: $z-index-default;
|
|
537
544
|
}
|
|
538
545
|
}
|
|
539
546
|
|
|
540
547
|
.apos-area-widget-inner .apos-area-widget-inner {
|
|
541
|
-
&.apos-is-highlighted
|
|
548
|
+
&.apos-is-highlighted::before {
|
|
542
549
|
opacity: 0.1;
|
|
543
550
|
}
|
|
544
|
-
|
|
551
|
+
|
|
552
|
+
&.apos-is-focused::before {
|
|
545
553
|
opacity: 0.15;
|
|
546
554
|
}
|
|
547
555
|
}
|
|
@@ -551,11 +559,12 @@ export default {
|
|
|
551
559
|
position: absolute;
|
|
552
560
|
opacity: 0;
|
|
553
561
|
pointer-events: none;
|
|
554
|
-
transition: all
|
|
562
|
+
transition: all 300ms ease;
|
|
555
563
|
|
|
556
564
|
&.apos-area-widget__label {
|
|
557
565
|
z-index: $z-index-widget-label;
|
|
558
566
|
}
|
|
567
|
+
|
|
559
568
|
&.apos-is-focused {
|
|
560
569
|
z-index: $z-index-widget-focused-controls;
|
|
561
570
|
}
|
|
@@ -564,10 +573,12 @@ export default {
|
|
|
564
573
|
.apos-area-widget-controls--modify {
|
|
565
574
|
right: 0;
|
|
566
575
|
transform: translate3d(-10px, 30px, 0);
|
|
576
|
+
|
|
567
577
|
:deep(.apos-button-group__inner) {
|
|
568
578
|
border: 1px solid var(--a-primary-transparent-25);
|
|
569
579
|
box-shadow: var(--a-box-shadow);
|
|
570
580
|
}
|
|
581
|
+
|
|
571
582
|
:deep(.apos-button-group) .apos-button {
|
|
572
583
|
width: 32px;
|
|
573
584
|
height: 32px;
|
|
@@ -576,13 +587,16 @@ export default {
|
|
|
576
587
|
border-radius: var(--a-border-radius);
|
|
577
588
|
background-color: transparent;
|
|
578
589
|
color: var(--a-base-1);
|
|
590
|
+
|
|
579
591
|
&:hover[disabled] {
|
|
580
592
|
background-color: transparent;
|
|
581
593
|
}
|
|
594
|
+
|
|
582
595
|
&:hover:not([disabled]), &:active:not([disabled]), &:focus:not([disabled]) {
|
|
583
596
|
background-color: var(--a-primary-transparent-10);
|
|
584
597
|
color: var(--a-primary);
|
|
585
598
|
}
|
|
599
|
+
|
|
586
600
|
&[disabled] {
|
|
587
601
|
color: var(--a-base-6);
|
|
588
602
|
}
|
|
@@ -596,7 +610,6 @@ export default {
|
|
|
596
610
|
}
|
|
597
611
|
|
|
598
612
|
.apos-area-widget-controls--add {
|
|
599
|
-
|
|
600
613
|
:deep(.apos-button__wrapper) {
|
|
601
614
|
padding: 8px;
|
|
602
615
|
|
|
@@ -604,13 +617,13 @@ export default {
|
|
|
604
617
|
transform: scale(1.15);
|
|
605
618
|
background-size: 150% 100%;
|
|
606
619
|
border-radius: 10px;
|
|
607
|
-
transition-duration:
|
|
620
|
+
transition-duration: 500ms;
|
|
608
621
|
|
|
609
622
|
/* stylelint-disable-next-line max-nesting-depth */
|
|
610
623
|
.apos-button__label {
|
|
611
624
|
max-width: 100px;
|
|
612
625
|
max-height: 100px;
|
|
613
|
-
transition-duration:
|
|
626
|
+
transition-duration: 500ms;
|
|
614
627
|
padding: 0 5px 0 0;
|
|
615
628
|
}
|
|
616
629
|
|
|
@@ -628,21 +641,21 @@ export default {
|
|
|
628
641
|
:deep(.apos-button__label) {
|
|
629
642
|
display: inline-block;
|
|
630
643
|
overflow: hidden;
|
|
644
|
+
font-size: var(--a-type-small);
|
|
645
|
+
transition: max-width 200ms var(--a-transition-timing-bounce);
|
|
631
646
|
max-width: 0;
|
|
632
647
|
max-height: 0;
|
|
633
|
-
transition: max-width 0.2s var(--a-transition-timing-bounce);
|
|
634
648
|
white-space: nowrap;
|
|
635
|
-
font-size: var(--a-type-small);
|
|
636
649
|
}
|
|
637
650
|
|
|
638
651
|
:deep(.apos-button) {
|
|
639
652
|
display: flex;
|
|
640
653
|
align-items: center;
|
|
641
654
|
justify-content: center;
|
|
655
|
+
padding: 5px;
|
|
656
|
+
transition: all 200ms var(--a-transition-timing-bounce);
|
|
642
657
|
background-image: linear-gradient( 45deg, var(--a-primary), var(--a-primary-dark-15), var(--a-primary-light-40), var(--a-primary) );
|
|
643
658
|
background-size: 200% 100%;
|
|
644
|
-
transition: all 0.2s var(--a-transition-timing-bounce);
|
|
645
|
-
padding: 5px;
|
|
646
659
|
border-radius: 12px;
|
|
647
660
|
}
|
|
648
661
|
}
|
|
@@ -665,7 +678,7 @@ export default {
|
|
|
665
678
|
right: 0;
|
|
666
679
|
display: flex;
|
|
667
680
|
transform: translateY(-100%);
|
|
668
|
-
transition: opacity
|
|
681
|
+
transition: opacity 300ms ease;
|
|
669
682
|
}
|
|
670
683
|
|
|
671
684
|
.apos-area-widget-inner .apos-area-widget-inner .apos-area-widget__label {
|
|
@@ -675,6 +688,7 @@ export default {
|
|
|
675
688
|
|
|
676
689
|
.apos-area-widget__breadcrumbs {
|
|
677
690
|
@include apos-list-reset();
|
|
691
|
+
|
|
678
692
|
display: flex;
|
|
679
693
|
align-items: center;
|
|
680
694
|
margin: 0 0 8px;
|
|
@@ -687,10 +701,11 @@ export default {
|
|
|
687
701
|
.apos-area-widget__breadcrumb,
|
|
688
702
|
.apos-area-widget__breadcrumb :deep(.apos-button__content) {
|
|
689
703
|
@include type-help;
|
|
704
|
+
|
|
690
705
|
padding: 2px;
|
|
691
706
|
white-space: nowrap;
|
|
692
707
|
color: var(--a-base-1);
|
|
693
|
-
transition: background-color
|
|
708
|
+
transition: background-color 300ms var(--a-transition-timing-bounce);
|
|
694
709
|
}
|
|
695
710
|
|
|
696
711
|
.apos-area-widget__breadcrumbs:hover .apos-area-widget__breadcrumb,
|
|
@@ -699,12 +714,12 @@ export default {
|
|
|
699
714
|
}
|
|
700
715
|
|
|
701
716
|
.apos-area-widget__breadcrumb--widget-icon {
|
|
717
|
+
margin-right: 2px;
|
|
702
718
|
padding: 3px 2px 2px;
|
|
703
|
-
background-color: var(--a-primary-transparent-10);
|
|
704
719
|
color: var(--a-primary);
|
|
720
|
+
transition: background-color 300ms var(--a-transition-timing-bounce);
|
|
721
|
+
background-color: var(--a-primary-transparent-10);
|
|
705
722
|
border-radius: 4px;
|
|
706
|
-
margin-right: 2px;
|
|
707
|
-
transition: background-color 0.3s var(--a-transition-timing-bounce);
|
|
708
723
|
}
|
|
709
724
|
|
|
710
725
|
.apos-area-widget__breadcrumbs:hover .apos-area-widget__breadcrumb--widget-icon {
|
|
@@ -718,6 +733,7 @@ export default {
|
|
|
718
733
|
|
|
719
734
|
.apos-area-widget__breadcrumb :deep(.apos-button) {
|
|
720
735
|
color: var(--a-primary-dark-10);
|
|
736
|
+
|
|
721
737
|
&:hover, &:active, &:focus {
|
|
722
738
|
text-decoration: none;
|
|
723
739
|
}
|
|
@@ -189,32 +189,39 @@ $z-index-button-foreground: 2;
|
|
|
189
189
|
z-index: $z-index-button-foreground;
|
|
190
190
|
position: relative;
|
|
191
191
|
}
|
|
192
|
+
|
|
192
193
|
:deep(.apos-button__icon) {
|
|
193
|
-
transition: all
|
|
194
|
+
transition: all 300ms var(--a-transition-timing-bounce);
|
|
194
195
|
}
|
|
196
|
+
|
|
195
197
|
:deep(.apos-button) {
|
|
196
198
|
background-color: transparent;
|
|
197
199
|
|
|
198
|
-
&:not([disabled]):hover
|
|
200
|
+
&:not([disabled]):hover::after {
|
|
199
201
|
background-color: var(--a-base-9);
|
|
200
202
|
}
|
|
203
|
+
|
|
201
204
|
&:active {
|
|
202
205
|
background-color: transparent;
|
|
203
206
|
}
|
|
207
|
+
|
|
204
208
|
&:active .apos-button__icon {
|
|
205
209
|
transform: scale(0.8);
|
|
206
210
|
}
|
|
207
|
-
|
|
211
|
+
|
|
212
|
+
&:active::after, &:focus::after {
|
|
208
213
|
background-color: var(--a-primary-transparent-25);
|
|
209
214
|
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
&:not([disabled]):
|
|
213
|
-
&:not([disabled]):
|
|
215
|
+
|
|
216
|
+
&::after,
|
|
217
|
+
&:not([disabled]):hover::after,
|
|
218
|
+
&:not([disabled]):active::after,
|
|
219
|
+
&:not([disabled]):focus::after {
|
|
214
220
|
opacity: 1;
|
|
215
221
|
transform: scale(1.15) translateY(0);
|
|
216
222
|
}
|
|
217
|
-
|
|
223
|
+
|
|
224
|
+
&::after {
|
|
218
225
|
content: '';
|
|
219
226
|
z-index: $z-index-button-background;
|
|
220
227
|
position: absolute;
|
|
@@ -225,9 +232,9 @@ $z-index-button-foreground: 2;
|
|
|
225
232
|
height: 100%;
|
|
226
233
|
background-color: transparent;
|
|
227
234
|
transition:
|
|
228
|
-
opacity
|
|
229
|
-
transform
|
|
230
|
-
background-color
|
|
235
|
+
opacity 500ms var(--a-transition-timing-bounce),
|
|
236
|
+
transform 500ms var(--a-transition-timing-bounce),
|
|
237
|
+
background-color 500ms ease;
|
|
231
238
|
opacity: 0;
|
|
232
239
|
transform: scale(0.3) translateY(-4px);
|
|
233
240
|
}
|
|
@@ -51,18 +51,15 @@ export default {
|
|
|
51
51
|
.apos-busy {
|
|
52
52
|
z-index: $z-index-busy;
|
|
53
53
|
position: fixed;
|
|
54
|
-
|
|
55
|
-
right: 0;
|
|
56
|
-
bottom: 0;
|
|
57
|
-
left: 0;
|
|
54
|
+
inset: 0;
|
|
58
55
|
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
justify-content: center;
|
|
59
58
|
width: 100%;
|
|
60
59
|
height: 100%;
|
|
61
|
-
justify-content: center;
|
|
62
|
-
align-items: center;
|
|
63
60
|
background: var(--a-overlay);
|
|
64
|
-
transition: opacity
|
|
65
|
-
transition-delay:
|
|
61
|
+
transition: opacity 500ms ease;
|
|
62
|
+
transition-delay: 300ms;
|
|
66
63
|
opacity: 0;
|
|
67
64
|
pointer-events: none;
|
|
68
65
|
}
|
|
@@ -76,6 +73,7 @@ export default {
|
|
|
76
73
|
z-index: $z-index-default;
|
|
77
74
|
width: 60px;
|
|
78
75
|
height: 60px;
|
|
76
|
+
|
|
79
77
|
&:deep(svg) {
|
|
80
78
|
width: 100%;
|
|
81
79
|
height: 100%;
|
|
@@ -12,7 +12,7 @@ module.exports = {
|
|
|
12
12
|
type: 'item',
|
|
13
13
|
label: 'apostrophe:commandMenuShowShortcutList',
|
|
14
14
|
action: {
|
|
15
|
-
type: 'open-modal',
|
|
15
|
+
type: '@apostrophecms/command-menu:open-modal',
|
|
16
16
|
payload: {
|
|
17
17
|
name: 'AposCommandMenuShortcut',
|
|
18
18
|
props: { moduleName: '@apostrophecms/command-menu' }
|
|
@@ -382,12 +382,17 @@ module.exports = {
|
|
|
382
382
|
.forEach(([ modal, groups ]) => Object.values(groups)
|
|
383
383
|
.forEach(group => Object.entries(group.commands)
|
|
384
384
|
.forEach(([ name, field ]) => {
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
385
|
+
field.shortcut
|
|
386
|
+
.toUpperCase()
|
|
387
|
+
.split(' ')
|
|
388
|
+
.forEach(shortcut => {
|
|
389
|
+
self.detectShortcutConflict({
|
|
390
|
+
shortcuts,
|
|
391
|
+
shortcut,
|
|
392
|
+
modal: modal === 'default' ? 'admin-bar' : modal,
|
|
393
|
+
moduleName: name
|
|
394
|
+
});
|
|
395
|
+
});
|
|
391
396
|
})
|
|
392
397
|
)
|
|
393
398
|
);
|
|
@@ -57,20 +57,21 @@ export default {
|
|
|
57
57
|
|
|
58
58
|
.apos-command-menu-key {
|
|
59
59
|
@include type-small;
|
|
60
|
+
|
|
60
61
|
display: inline-flex;
|
|
62
|
+
box-sizing: border-box;
|
|
61
63
|
align-items: center;
|
|
62
64
|
justify-content: center;
|
|
63
|
-
box-sizing: border-box;
|
|
64
65
|
width: $spacing-double;
|
|
65
66
|
height: $spacing-double;
|
|
66
|
-
padding: 3px $spacing-half;
|
|
67
67
|
margin-left: $spacing-half;
|
|
68
|
+
padding: 3px $spacing-half;
|
|
68
69
|
border: 1px solid var(--a-base-7);
|
|
69
|
-
border-radius: 3px;
|
|
70
|
-
border-color: var(--a-base-7);
|
|
71
70
|
border-bottom: 2px solid var(--a-base-7);
|
|
72
71
|
color: var(--a-base-1);
|
|
73
72
|
background: linear-gradient(180deg, var(--a-base-10) 0%, var(--a-base-9) 100%);
|
|
73
|
+
border-radius: 3px;
|
|
74
|
+
border-color: var(--a-base-7);
|
|
74
75
|
font-weight: 600;
|
|
75
76
|
|
|
76
77
|
&.apos-command-menu-key-auto {
|
|
@@ -79,15 +80,16 @@ export default {
|
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
.apos-command-menu-text {
|
|
83
|
+
@include type-small;
|
|
84
|
+
|
|
82
85
|
display: inline-flex;
|
|
86
|
+
box-sizing: border-box;
|
|
83
87
|
align-items: center;
|
|
84
88
|
justify-content: center;
|
|
85
|
-
box-sizing: border-box;
|
|
86
89
|
width: auto;
|
|
87
90
|
height: $spacing-double;
|
|
88
|
-
padding: 3px 2px;
|
|
89
91
|
margin-left: $spacing-half;
|
|
90
|
-
|
|
92
|
+
padding: 3px 2px;
|
|
91
93
|
color: var(--a-base-1);
|
|
92
94
|
}
|
|
93
95
|
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
:modal="modal"
|
|
4
4
|
class="apos-command-menu-shortcut"
|
|
5
5
|
@esc="close"
|
|
6
|
-
@no-modal="$emit('safe-close')"
|
|
7
6
|
@inactive="modal.active = false"
|
|
8
7
|
@show-modal="modal.showModal = true"
|
|
9
8
|
>
|
|
@@ -130,8 +129,7 @@ export default {
|
|
|
130
129
|
}
|
|
131
130
|
|
|
132
131
|
:deep(.apos-modal__inner) {
|
|
133
|
-
|
|
134
|
-
left: auto;
|
|
132
|
+
inset: auto $spacing-quadruple $spacing-quadruple auto;
|
|
135
133
|
max-width: 700px;
|
|
136
134
|
height: auto;
|
|
137
135
|
border-radius: $spacing-base + $spacing-half;
|
|
@@ -141,12 +139,16 @@ export default {
|
|
|
141
139
|
display: none;
|
|
142
140
|
}
|
|
143
141
|
|
|
142
|
+
:deep(.apos-modal__body-main) {
|
|
143
|
+
padding-bottom: 15px;
|
|
144
|
+
}
|
|
145
|
+
|
|
144
146
|
.apos-modal__header {
|
|
145
147
|
display: flex;
|
|
146
148
|
justify-content: space-between;
|
|
147
149
|
width: 100%;
|
|
148
|
-
border-bottom: 1px solid var(--a-base-8);
|
|
149
150
|
padding: $spacing-base + $spacing-half 0;
|
|
151
|
+
border-bottom: 1px solid var(--a-base-8);
|
|
150
152
|
|
|
151
153
|
.apos-modal__header__main {
|
|
152
154
|
display: flex;
|
|
@@ -155,67 +157,78 @@ export default {
|
|
|
155
157
|
|
|
156
158
|
:deep(.apos-button) {
|
|
157
159
|
display: inline-flex;
|
|
158
|
-
align-items: center;
|
|
159
160
|
box-sizing: border-box;
|
|
161
|
+
align-items: center;
|
|
160
162
|
width: auto;
|
|
161
163
|
height: $spacing-double;
|
|
162
|
-
padding: 3px $spacing-half;
|
|
163
164
|
margin-right: $spacing-base;
|
|
165
|
+
padding: 3px $spacing-half;
|
|
166
|
+
border-bottom: 2px solid var(--a-base-7);
|
|
164
167
|
vertical-align: bottom;
|
|
165
168
|
border-radius: 3px;
|
|
166
169
|
border-color: var(--a-base-7);
|
|
167
|
-
border-bottom: 2px solid var(--a-base-7);
|
|
168
170
|
}
|
|
169
171
|
}
|
|
172
|
+
|
|
170
173
|
.apos-modal__heading {
|
|
174
|
+
@include type-base;
|
|
175
|
+
|
|
171
176
|
display: inline-block;
|
|
172
177
|
margin: 0;
|
|
173
|
-
@include type-base;
|
|
174
178
|
font-size: var(--a-type-large);
|
|
175
179
|
line-height: $spacing-double;
|
|
176
180
|
}
|
|
177
181
|
|
|
178
182
|
.apos-command-menu-key {
|
|
179
183
|
:deep(button) {
|
|
184
|
+
box-sizing: border-box;
|
|
180
185
|
width: $spacing-double;
|
|
181
186
|
height: $spacing-double;
|
|
182
|
-
padding: 3px $spacing-half;
|
|
183
187
|
margin-left: $spacing-half;
|
|
184
|
-
|
|
188
|
+
padding: 3px $spacing-half;
|
|
189
|
+
border-bottom: 2px solid var(--a-base-7);
|
|
185
190
|
border-radius: 3px;
|
|
186
191
|
border-color: var(--a-base-7);
|
|
187
|
-
border-bottom: 2px solid var(--a-base-7);
|
|
188
192
|
}
|
|
189
193
|
}
|
|
190
194
|
|
|
191
195
|
.apos-command-menu-shortcut-groups {
|
|
196
|
+
overflow: hidden auto;
|
|
192
197
|
padding: $spacing-base $spacing-double $spacing-base + $spacing-half;
|
|
198
|
+
max-height: 70vh;
|
|
193
199
|
}
|
|
200
|
+
|
|
194
201
|
.apos-command-menu-shortcut-group + .apos-command-menu-shortcut-group {
|
|
195
202
|
padding-top: $spacing-base + $spacing-half;
|
|
196
203
|
}
|
|
204
|
+
|
|
197
205
|
.apos-command-menu-shortcut-group {
|
|
198
206
|
@include type-base;
|
|
207
|
+
|
|
199
208
|
font-weight: 400;
|
|
200
209
|
}
|
|
210
|
+
|
|
201
211
|
.apos-command-menu-shortcut-group-title {
|
|
212
|
+
@include type-base;
|
|
213
|
+
|
|
214
|
+
box-sizing: border-box;
|
|
202
215
|
height: 24px;
|
|
203
216
|
margin: 0;
|
|
204
217
|
padding: $spacing-half 0;
|
|
205
|
-
box-sizing: border-box;
|
|
206
|
-
@include type-base;
|
|
207
218
|
color: var(--a-base-3);
|
|
208
219
|
text-align: left;
|
|
209
220
|
}
|
|
221
|
+
|
|
210
222
|
.apos-command-menu-shortcut-command {
|
|
211
223
|
display: flex;
|
|
212
|
-
justify-content: space-between;
|
|
213
|
-
align-items: center;
|
|
214
224
|
box-sizing: border-box;
|
|
225
|
+
align-items: center;
|
|
226
|
+
justify-content: space-between;
|
|
215
227
|
width: 100%;
|
|
216
228
|
height: 28px;
|
|
217
229
|
padding: $spacing-half 0;
|
|
218
230
|
}
|
|
231
|
+
|
|
219
232
|
.apos-command-menu-shortcut-command-title {
|
|
220
233
|
flex: 1 1 auto;
|
|
221
234
|
margin-right: $spacing-base;
|
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
</template>
|
|
9
9
|
|
|
10
10
|
<script>
|
|
11
|
+
import { mapActions, mapState } from 'pinia';
|
|
11
12
|
import AposThemeMixin from 'Modules/@apostrophecms/ui/mixins/AposThemeMixin';
|
|
13
|
+
import { useModalStore } from 'Modules/@apostrophecms/ui/stores/modal';
|
|
14
|
+
|
|
12
15
|
export default {
|
|
13
16
|
name: 'TheAposCommandMenu',
|
|
14
17
|
mixins: [ AposThemeMixin ],
|
|
@@ -23,11 +26,11 @@ export default {
|
|
|
23
26
|
data() {
|
|
24
27
|
return {
|
|
25
28
|
previousKey: '',
|
|
26
|
-
modal: 'default'
|
|
27
|
-
keyboardShortcutListener() {}
|
|
29
|
+
modal: 'default'
|
|
28
30
|
};
|
|
29
31
|
},
|
|
30
32
|
computed: {
|
|
33
|
+
...mapState(useModalStore, [ 'stack' ]),
|
|
31
34
|
shortcuts() {
|
|
32
35
|
const modals = Object.values(this.modals[this.modal] || {});
|
|
33
36
|
|
|
@@ -45,26 +48,60 @@ export default {
|
|
|
45
48
|
);
|
|
46
49
|
}
|
|
47
50
|
},
|
|
51
|
+
watch: {
|
|
52
|
+
stack(newStack) {
|
|
53
|
+
this.modal = this.getFirstNonShortcutModal();
|
|
54
|
+
}
|
|
55
|
+
},
|
|
48
56
|
mounted() {
|
|
49
|
-
apos.bus.$on('open-modal', async state => {
|
|
57
|
+
apos.bus.$on('@apostrophecms/command-menu:open-modal', async state => {
|
|
50
58
|
await apos.modal.execute(state.name, state.props);
|
|
51
59
|
});
|
|
52
60
|
|
|
53
|
-
this.keyboardShortcutListener
|
|
61
|
+
document.addEventListener('keydown', this.keyboardShortcutListener.bind(this));
|
|
62
|
+
},
|
|
63
|
+
beforeUnmount() {
|
|
64
|
+
document.removeEventListener('keydown', this.keyboardShortcutListener);
|
|
65
|
+
},
|
|
66
|
+
methods: {
|
|
67
|
+
...mapActions(useModalStore, [ 'getAt', 'getProperties' ]),
|
|
68
|
+
delay(resolve, ms) {
|
|
69
|
+
return new Promise(() => {
|
|
70
|
+
setTimeout(resolve, ms);
|
|
71
|
+
});
|
|
72
|
+
},
|
|
73
|
+
getModal() {
|
|
74
|
+
return this.modal;
|
|
75
|
+
},
|
|
76
|
+
getFirstNonShortcutModal(index = -1) {
|
|
77
|
+
const modal = this.getAt(index);
|
|
78
|
+
const properties = this.getProperties(modal.id);
|
|
79
|
+
|
|
80
|
+
return properties.itemName === '@apostrophecms/command-menu:shortcut'
|
|
81
|
+
? this.getFirstNonShortcutModal(index + -1)
|
|
82
|
+
: properties.itemName || 'default';
|
|
83
|
+
},
|
|
84
|
+
keyboardShortcutListener(event) {
|
|
54
85
|
if (event.target.nodeName !== 'INPUT' && event.target.nodeName !== 'TEXTAREA' && document.activeElement.contentEditable !== 'true') {
|
|
55
86
|
const key = [
|
|
56
87
|
[ 'ALT', event.altKey ],
|
|
57
88
|
[ 'CTRL', event.ctrlKey ],
|
|
58
89
|
[ 'META', event.metaKey ],
|
|
59
90
|
[ 'SHIFT', event.shiftKey ],
|
|
60
|
-
[ 'KEY', event.key.
|
|
61
|
-
value).join(',') : event.key.toUpperCase() ]
|
|
91
|
+
[ 'KEY', event.key.toUpperCase() ]
|
|
62
92
|
]
|
|
63
93
|
.filter(([ , value ]) => value)
|
|
64
94
|
.map(([ key, value ]) => key === 'KEY' ? value : key)
|
|
65
95
|
.join('+');
|
|
66
96
|
|
|
67
|
-
const
|
|
97
|
+
const keys = this.previousKey
|
|
98
|
+
? `${this.previousKey},${key}`
|
|
99
|
+
: key;
|
|
100
|
+
|
|
101
|
+
const action = this.shortcuts[keys] ||
|
|
102
|
+
this.shortcuts[keys.startsWith('SHIFT+')
|
|
103
|
+
? keys.slice('SHIFT+'.length)
|
|
104
|
+
: keys];
|
|
68
105
|
if (action) {
|
|
69
106
|
event.preventDefault();
|
|
70
107
|
apos.bus.$emit(action.type, action.payload);
|
|
@@ -78,42 +115,7 @@ export default {
|
|
|
78
115
|
}, 1000);
|
|
79
116
|
}
|
|
80
117
|
}
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
document.addEventListener('keydown', this.keyboardShortcutListener.bind(this));
|
|
84
|
-
|
|
85
|
-
apos.bus.$on('modal-launched', this.updateModal);
|
|
86
|
-
apos.bus.$on('modal-resolved', this.updateModal);
|
|
87
|
-
},
|
|
88
|
-
beforeUnmount() {
|
|
89
|
-
document.removeEventListener('keydown', this.keyboardShortcutListener);
|
|
90
|
-
|
|
91
|
-
apos.bus.$off('modal-launched', this.updateModal);
|
|
92
|
-
apos.bus.$off('modal-resolved', this.updateModal);
|
|
93
|
-
},
|
|
94
|
-
methods: {
|
|
95
|
-
delay(resolve, ms) {
|
|
96
|
-
return new Promise(() => {
|
|
97
|
-
setTimeout(resolve, ms);
|
|
98
|
-
});
|
|
99
|
-
},
|
|
100
|
-
getModal() {
|
|
101
|
-
return this.modal;
|
|
102
|
-
},
|
|
103
|
-
getFirstNonShortcutModal(index = -1) {
|
|
104
|
-
const modal = apos.modal.getAt(index);
|
|
105
|
-
const properties = apos.modal.getProperties(modal.id);
|
|
106
|
-
|
|
107
|
-
return properties.itemName === '@apostrophecms/command-menu:shortcut'
|
|
108
|
-
? this.getFirstNonShortcutModal(index + -1)
|
|
109
|
-
: properties.itemName || 'default';
|
|
110
|
-
},
|
|
111
|
-
updateModal() {
|
|
112
|
-
this.modal = this.getFirstNonShortcutModal();
|
|
113
118
|
}
|
|
114
119
|
}
|
|
115
120
|
};
|
|
116
121
|
</script>
|
|
117
|
-
|
|
118
|
-
<style lang="scss" scoped>
|
|
119
|
-
</style>
|
|
@@ -172,7 +172,7 @@ module.exports = {
|
|
|
172
172
|
},
|
|
173
173
|
[`${self.__meta.name}:manager`]: {
|
|
174
174
|
'@apostrophecms/command-menu:manager': {
|
|
175
|
-
label: '',
|
|
175
|
+
label: 'apostrophe:commandMenuManager',
|
|
176
176
|
commands: [
|
|
177
177
|
`${self.__meta.name}:create-new`,
|
|
178
178
|
`${self.__meta.name}:search`,
|
|
@@ -1598,6 +1598,7 @@ module.exports = {
|
|
|
1598
1598
|
browserOptions.previewDraft = self.isLocalized() &&
|
|
1599
1599
|
!browserOptions.autopublish &&
|
|
1600
1600
|
self.options.previewDraft;
|
|
1601
|
+
browserOptions.relationshipSuggestionFields = self.options.relationshipSuggestionFields;
|
|
1601
1602
|
|
|
1602
1603
|
return browserOptions;
|
|
1603
1604
|
}
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
@inactive="modal.active = false"
|
|
7
7
|
@show-modal="modal.showModal = true"
|
|
8
8
|
@esc="confirmAndCancel"
|
|
9
|
-
@no-modal="$emit('safe-close')"
|
|
10
9
|
>
|
|
11
10
|
<template #secondaryControls>
|
|
12
11
|
<AposButton
|
|
@@ -137,7 +136,8 @@ export default {
|
|
|
137
136
|
],
|
|
138
137
|
provide () {
|
|
139
138
|
return {
|
|
140
|
-
originalDoc: this.originalDoc
|
|
139
|
+
originalDoc: this.originalDoc,
|
|
140
|
+
liveOriginalDoc: this.docFields
|
|
141
141
|
};
|
|
142
142
|
},
|
|
143
143
|
props: {
|
|
@@ -158,7 +158,7 @@ export default {
|
|
|
158
158
|
default: null
|
|
159
159
|
}
|
|
160
160
|
},
|
|
161
|
-
emits: [ 'modal-result'
|
|
161
|
+
emits: [ 'modal-result' ],
|
|
162
162
|
data() {
|
|
163
163
|
return {
|
|
164
164
|
docType: this.moduleName,
|
|
@@ -835,6 +835,7 @@ export default {
|
|
|
835
835
|
|
|
836
836
|
.apos-doc-editor__utility {
|
|
837
837
|
padding: $spacing-quadruple $spacing-base;
|
|
838
|
+
|
|
838
839
|
@include media-up(lap) {
|
|
839
840
|
padding: $spacing-quadruple $spacing-double;
|
|
840
841
|
}
|