@blokkli/editor 2.0.0-alpha.1 → 2.0.0-alpha.11

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.
Files changed (92) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +25 -9
  3. package/dist/modules/drupal/graphql/base/fragment.blokkliProps.graphql +8 -0
  4. package/dist/modules/drupal/graphql/base/fragment.paragraphsFieldItem.graphql +6 -0
  5. package/dist/modules/drupal/index.mjs +33 -7
  6. package/dist/modules/drupal/runtime/adapter/index.d.ts +3 -0
  7. package/dist/modules/drupal/{adapter/index.mjs → runtime/adapter/index.js} +13 -10
  8. package/dist/runtime/blokkliPlugins/ContextMenu/index.vue.d.ts +2 -19
  9. package/dist/runtime/blokkliPlugins/DebugOverlay/index.vue.d.ts +2 -7
  10. package/dist/runtime/blokkliPlugins/DroppableEdit/index.vue +1 -1
  11. package/dist/runtime/blokkliPlugins/DroppableEdit/index.vue.d.ts +2 -19
  12. package/dist/runtime/blokkliPlugins/ItemAction/index.vue.d.ts +4 -3
  13. package/dist/runtime/blokkliPlugins/ItemDropdown/index.vue.d.ts +1 -1
  14. package/dist/runtime/blokkliPlugins/MenuButton/index.vue.d.ts +1 -1
  15. package/dist/runtime/blokkliPlugins/Sidebar/Detached/index.vue.d.ts +2 -51
  16. package/dist/runtime/blokkliPlugins/Sidebar/index.vue.d.ts +11 -5
  17. package/dist/runtime/blokkliPlugins/ToolbarButton/index.vue.d.ts +1 -1
  18. package/dist/runtime/blokkliPlugins/TourItem/index.vue.d.ts +2 -4
  19. package/dist/runtime/blokkliPlugins/ViewOption/index.vue.d.ts +4 -3
  20. package/dist/runtime/components/BlokkliEditable.vue +1 -0
  21. package/dist/runtime/components/BlokkliEditable.vue.d.ts +4 -18
  22. package/dist/runtime/components/BlokkliField.vue +4 -2
  23. package/dist/runtime/components/BlokkliField.vue.d.ts +8 -92
  24. package/dist/runtime/components/BlokkliItem.vue +1 -1
  25. package/dist/runtime/components/BlokkliProvider.vue +2 -1
  26. package/dist/runtime/components/BlokkliProvider.vue.d.ts +5 -22
  27. package/dist/runtime/components/Edit/Actions/index.vue +4 -1
  28. package/dist/runtime/components/Edit/BlockProxy/index.vue +3 -1
  29. package/dist/runtime/components/Edit/BlokkliErrorBoundary.vue +4 -4
  30. package/dist/runtime/components/Edit/BlokkliErrorBoundary.vue.d.ts +2 -13
  31. package/dist/runtime/components/Edit/Dialog/index.vue.d.ts +1 -1
  32. package/dist/runtime/components/Edit/DragInteractions/index.vue +1 -1
  33. package/dist/runtime/components/Edit/EditProvider.vue +7 -4
  34. package/dist/runtime/components/Edit/EditProvider.vue.d.ts +3 -3
  35. package/dist/runtime/components/Edit/Features/Artboard/index.vue +29 -1
  36. package/dist/runtime/components/Edit/Features/Assistant/Overlay/index.vue +4 -4
  37. package/dist/runtime/components/Edit/Features/Assistant/index.vue +2 -1
  38. package/dist/runtime/components/Edit/Features/Clipboard/index.vue +1 -1
  39. package/dist/runtime/components/Edit/Features/Comments/AddForm/index.vue +2 -2
  40. package/dist/runtime/components/Edit/Features/Comments/Comment/index.vue +1 -1
  41. package/dist/runtime/components/Edit/Features/Comments/Overlay/Item/index.vue +2 -2
  42. package/dist/runtime/components/Edit/Features/Diff/DiffView/index.vue +7 -7
  43. package/dist/runtime/components/Edit/Features/DraggingOverlay/DropTargets/index.vue.d.ts +3 -132
  44. package/dist/runtime/components/Edit/Features/EditableField/Overlay/index.vue +2 -2
  45. package/dist/runtime/components/Edit/Features/Fragments/Dialog/index.vue +4 -4
  46. package/dist/runtime/components/Edit/Features/Fragments/index.vue +2 -1
  47. package/dist/runtime/components/Edit/Features/Help/index.vue +2 -2
  48. package/dist/runtime/components/Edit/Features/History/List/index.vue +4 -4
  49. package/dist/runtime/components/Edit/Features/ImportExisting/Dialog/index.vue +5 -5
  50. package/dist/runtime/components/Edit/Features/Library/EditReusable/index.vue +2 -2
  51. package/dist/runtime/components/Edit/Features/Library/LibraryDialog/index.vue +5 -5
  52. package/dist/runtime/components/Edit/Features/Library/ReusableDialog/index.vue +2 -2
  53. package/dist/runtime/components/Edit/Features/Library/index.vue +2 -1
  54. package/dist/runtime/components/Edit/Features/MediaLibrary/Library/index.vue +1 -1
  55. package/dist/runtime/components/Edit/Features/Options/Form/Group.vue.d.ts +2 -11
  56. package/dist/runtime/components/Edit/Features/Options/Form/Radios/index.vue +1 -1
  57. package/dist/runtime/components/Edit/Features/Ownership/index.vue +1 -1
  58. package/dist/runtime/components/Edit/Features/PreviewGrant/QrCode/index.vue +1 -1
  59. package/dist/runtime/components/Edit/Features/Publish/index.vue +20 -2
  60. package/dist/runtime/components/Edit/Features/ResponsivePreview/Frame/index.vue.d.ts +2 -13
  61. package/dist/runtime/components/Edit/Features/Search/Overlay/Results/Content/index.vue +1 -1
  62. package/dist/runtime/components/Edit/Features/Search/index.vue +1 -1
  63. package/dist/runtime/components/Edit/Features/Tour/Overlay/index.vue +2 -2
  64. package/dist/runtime/components/Edit/Features/Tour/Popup/index.vue +4 -4
  65. package/dist/runtime/components/Edit/Features/Translations/Banner/index.vue +1 -1
  66. package/dist/runtime/components/Edit/Features/Validations/index.vue +1 -1
  67. package/dist/runtime/components/Edit/Form/Group/index.vue.d.ts +2 -4
  68. package/dist/runtime/components/Edit/Form/Item/index.vue.d.ts +2 -4
  69. package/dist/runtime/components/Edit/FormOverlay/index.vue.d.ts +3 -2
  70. package/dist/runtime/components/Edit/PreviewProvider.vue +1 -0
  71. package/dist/runtime/components/Edit/PreviewProvider.vue.d.ts +3 -3
  72. package/dist/runtime/components/Edit/RelativeTime/index.vue.d.ts +2 -2
  73. package/dist/runtime/components/Edit/Resizable/index.vue.d.ts +1 -1
  74. package/dist/runtime/components/Edit/ScaleToFit/index.vue.d.ts +1 -1
  75. package/dist/runtime/components/Edit/ScrollBoundary/index.vue.d.ts +2 -7
  76. package/dist/runtime/components/Edit/Sortli/index.vue.d.ts +1 -1
  77. package/dist/runtime/components/Edit/SystemRequirements/index.vue +2 -2
  78. package/dist/runtime/components/Edit/ViewportBlockingRect/index.vue.d.ts +2 -7
  79. package/dist/runtime/composables/defineBlokkli.js +8 -1
  80. package/dist/runtime/composables/defineBlokkliFragment.js +8 -1
  81. package/dist/runtime/composables/useBlokkliHelper.d.ts +19 -0
  82. package/dist/runtime/composables/useBlokkliHelper.js +95 -0
  83. package/dist/runtime/css/output.css +1 -1
  84. package/dist/runtime/helpers/animationProvider.js +1 -1
  85. package/dist/runtime/helpers/composables/useBlockRegistration.d.ts +5 -0
  86. package/dist/runtime/helpers/composables/useBlockRegistration.js +23 -0
  87. package/dist/runtime/helpers/domProvider.d.ts +2 -0
  88. package/dist/runtime/helpers/domProvider.js +50 -65
  89. package/dist/runtime/helpers/runtimeHelpers/index.js +1 -1
  90. package/dist/runtime/types/index.d.ts +38 -1
  91. package/package.json +8 -11
  92. package/dist/modules/drupal/adapter/index.d.mts +0 -6
@@ -1,4 +1,4 @@
1
- import type { DropTargetEvent, BlokkliFieldElement, DraggableItem, Rectangle } from '#blokkli/types';
1
+ import type { DropTargetEvent, DraggableItem, Rectangle } from '#blokkli/types';
2
2
  type __VLS_Props = {
3
3
  items: DraggableItem[];
4
4
  box: Rectangle;
@@ -6,142 +6,13 @@ type __VLS_Props = {
6
6
  mouseY: number;
7
7
  isTouch: boolean;
8
8
  };
9
- type Orientation = 'horizontal' | 'vertical';
10
- type FieldRectChild = Rectangle & {
11
- id: string;
12
- label: string;
13
- };
14
- type FieldRect = Rectangle & {
15
- key: string;
16
- field: BlokkliFieldElement;
17
- label: string;
18
- canAddChildren: boolean;
19
- emptyChild?: FieldRectChild;
20
- orientation: Orientation;
21
- gap: number;
22
- childrenElements: HTMLElement[];
23
- };
24
- type DrawnRect = Rectangle & {
25
- id: string;
26
- type: 'field' | 'drop-area' | 'active-area';
27
- label: string;
28
- color: string;
29
- colorAlpha: string;
30
- field?: FieldRect;
31
- index: number;
32
- };
33
- declare const active: import("vue").Ref<{
34
- width: number;
35
- height: number;
36
- x: number;
37
- y: number;
38
- id: string;
39
- type: "field" | "drop-area" | "active-area";
40
- label: string;
41
- color: string;
42
- colorAlpha: string;
43
- field?: {
44
- width: number;
45
- height: number;
46
- x: number;
47
- y: number;
48
- key: string;
49
- field: {
50
- key: string;
51
- name: string;
52
- label: string;
53
- isNested: boolean;
54
- nestingLevel: number;
55
- fieldListType: import("#blokkli-build/generated-types").ValidFieldListTypes;
56
- hostEntityType: string;
57
- hostEntityBundle: string;
58
- hostEntityUuid: string;
59
- allowedBundles: string[];
60
- allowedFragments: string[];
61
- cardinality: number;
62
- element: HTMLElement;
63
- dropAlignment?: "vertical" | "horizontal" | undefined;
64
- };
65
- label: string;
66
- canAddChildren: boolean;
67
- emptyChild?: {
68
- width: number;
69
- height: number;
70
- x: number;
71
- y: number;
72
- id: string;
73
- label: string;
74
- } | undefined;
75
- orientation: Orientation;
76
- gap: number;
77
- childrenElements: HTMLElement[];
78
- } | undefined;
79
- index: number;
80
- } | null, DrawnRect | {
81
- width: number;
82
- height: number;
83
- x: number;
84
- y: number;
85
- id: string;
86
- type: "field" | "drop-area" | "active-area";
87
- label: string;
88
- color: string;
89
- colorAlpha: string;
90
- field?: {
91
- width: number;
92
- height: number;
93
- x: number;
94
- y: number;
95
- key: string;
96
- field: {
97
- key: string;
98
- name: string;
99
- label: string;
100
- isNested: boolean;
101
- nestingLevel: number;
102
- fieldListType: import("#blokkli-build/generated-types").ValidFieldListTypes;
103
- hostEntityType: string;
104
- hostEntityBundle: string;
105
- hostEntityUuid: string;
106
- allowedBundles: string[];
107
- allowedFragments: string[];
108
- cardinality: number;
109
- element: HTMLElement;
110
- dropAlignment?: "vertical" | "horizontal" | undefined;
111
- };
112
- label: string;
113
- canAddChildren: boolean;
114
- emptyChild?: {
115
- width: number;
116
- height: number;
117
- x: number;
118
- y: number;
119
- id: string;
120
- label: string;
121
- } | undefined;
122
- orientation: Orientation;
123
- gap: number;
124
- childrenElements: HTMLElement[];
125
- } | undefined;
126
- index: number;
127
- } | null>;
128
- declare const activeColorHex: import("vue").ComputedRef<string>;
129
- declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
130
9
  declare var __VLS_5: {
131
10
  color: string;
132
11
  label: string | undefined;
133
12
  };
134
- type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
13
+ type __VLS_Slots = {} & {
135
14
  default?: (props: typeof __VLS_5) => any;
136
- }>;
137
- declare const __VLS_self: import("vue").DefineComponent<__VLS_Props, {
138
- active: typeof active;
139
- activeColorHex: typeof activeColorHex;
140
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
141
- drop: (data: DropTargetEvent) => any;
142
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
143
- onDrop?: ((data: DropTargetEvent) => any) | undefined;
144
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ };
145
16
  declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
146
17
  drop: (data: DropTargetEvent) => any;
147
18
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
@@ -13,11 +13,11 @@
13
13
  </h3>
14
14
  <button @click.prevent="cancel">
15
15
  <Icon name="close" />
16
- <span>{{ $t('cancel', 'Cancel') }}</span>
16
+ <span>{{ $t("cancel", "Cancel") }}</span>
17
17
  </button>
18
18
  <button :disabled="!hasChanged" type="submit" @click.prevent="save">
19
19
  <Icon name="save" />
20
- <span>{{ $t('save', 'Save') }}</span>
20
+ <span>{{ $t("save", "Save") }}</span>
21
21
  </button>
22
22
  </div>
23
23
 
@@ -9,8 +9,8 @@
9
9
  <p class="bk-lead">
10
10
  {{
11
11
  $t(
12
- 'fragmentsPlaceDialogLead',
13
- 'Select a block fragment to add to the page.'
12
+ "fragmentsPlaceDialogLead",
13
+ "Select a block fragment to add to the page."
14
14
  )
15
15
  }}
16
16
  </p>
@@ -18,7 +18,7 @@
18
18
  <div class="bk-form-group">
19
19
  <div>
20
20
  <label class="bk-form-label" for="library_search">
21
- {{ $t('fragmentsPlaceDialogSearchLabel', 'Filter fragments') }}
21
+ {{ $t("fragmentsPlaceDialogSearchLabel", "Filter fragments") }}
22
22
  </label>
23
23
  <input
24
24
  id="fragments_search"
@@ -56,7 +56,7 @@
56
56
  </div>
57
57
  <template #footer>
58
58
  <button class="bk-button bk-is-primary" @click="onSubmit">
59
- {{ $t('fragmentsPlaceDialogSubmitButton', 'Add selected fragment') }}
59
+ {{ $t("fragmentsPlaceDialogSubmitButton", "Add selected fragment") }}
60
60
  </button>
61
61
  </template>
62
62
  </FormOverlay>
@@ -39,7 +39,8 @@ const { adapter } = defineBlokkliFeature({
39
39
  icon: "fragment",
40
40
  label: "Fragments",
41
41
  description: "Provides way to add content fragments defined by the frontend.",
42
- requiredAdapterMethods: ["fragmentsAddBlock"]
42
+ requiredAdapterMethods: ["fragmentsAddBlock"],
43
+ dependencies: ["add-list"]
43
44
  });
44
45
  const { state, $t, types, selection, dom } = useBlokkli();
45
46
  const isEnabled = computed(() => {
@@ -14,11 +14,11 @@
14
14
  :disabled="tour.isTouring.value"
15
15
  @click="tour.isTouring.value = true"
16
16
  >
17
- {{ $t('tourLabel', 'Take a tour') }}
17
+ {{ $t("tourLabel", "Take a tour") }}
18
18
  </button>
19
19
  </div>
20
20
  <div class="bk-help-section">
21
- <h3>{{ $t('featureHelpShortcuts', 'Shortcuts') }}</h3>
21
+ <h3>{{ $t("featureHelpShortcuts", "Shortcuts") }}</h3>
22
22
  <Shortcuts />
23
23
  </div>
24
24
  </div>
@@ -41,8 +41,8 @@
41
41
  <button class="bk-history-item-button" @click="showAmount += 100">
42
42
  <strong
43
43
  >{{
44
- $t('historyShowMore', 'Show @count more').replace(
45
- '@count',
44
+ $t("historyShowMore", "Show @count more").replace(
45
+ "@count",
46
46
  Math.min(totalMutations - showAmount, 100).toString()
47
47
  )
48
48
  }}
@@ -59,7 +59,7 @@
59
59
  <button class="bk-history-item-button" @click="setHistoryIndex(-1)">
60
60
  <div>
61
61
  <strong>{{
62
- $t('historyCurrentRevision', 'Current revision')
62
+ $t("historyCurrentRevision", "Current revision")
63
63
  }}</strong>
64
64
  </div>
65
65
  <!-- @TODO: Pass in the timestamp of the entity's latest revision. -->
@@ -74,7 +74,7 @@
74
74
  </li>
75
75
  </ul>
76
76
  <div v-else class="bk-history-empty-message">
77
- {{ $t('historyEmpty', 'There are now changes yet.') }}
77
+ {{ $t("historyEmpty", "There are now changes yet.") }}
78
78
  </div>
79
79
  </div>
80
80
  </template>
@@ -19,8 +19,8 @@
19
19
  <h3 class="bk-form-label">
20
20
  {{
21
21
  $t(
22
- 'importExistingFieldsLabel',
23
- 'Which content would you like to import?'
22
+ "importExistingFieldsLabel",
23
+ "Which content would you like to import?"
24
24
  )
25
25
  }}
26
26
  </h3>
@@ -32,8 +32,8 @@
32
32
  <div class="bk-form-section">
33
33
  <label for="pb_search_term" class="bk-form-label">{{
34
34
  $t(
35
- 'importExistingPagesLabel',
36
- 'From which page would you like to import?'
35
+ "importExistingPagesLabel",
36
+ "From which page would you like to import?"
37
37
  )
38
38
  }}</label>
39
39
  <input
@@ -47,7 +47,7 @@
47
47
  </div>
48
48
  <div>
49
49
  {{
50
- $t('importExistingResultsTitle', '@count of @total pages').replace('@count', entities.length.toString()).replace('@total', total.toString())
50
+ $t("importExistingResultsTitle", "@count of @total pages").replace("@count", entities.length.toString()).replace("@total", total.toString())
51
51
  }}
52
52
  </div>
53
53
  <div
@@ -5,13 +5,13 @@
5
5
  <header v-show="isLoaded" class="bk bk-library-edit-overlay-header">
6
6
  <h2>
7
7
  <span>{{
8
- $t('libraryItemEditOverlayTitle', 'Edit reusable block')
8
+ $t("libraryItemEditOverlayTitle", "Edit reusable block")
9
9
  }}</span>
10
10
  <span v-if="label">&nbsp;{{ label }}</span>
11
11
  </h2>
12
12
  <button @click.prevent="closeOverlay">
13
13
  <Icon name="arrow-left" />
14
- <span>{{ $t('libraryItemEditOverlayBack', 'Back to page') }}</span>
14
+ <span>{{ $t("libraryItemEditOverlayBack", "Back to page") }}</span>
15
15
  </button>
16
16
  </header>
17
17
  </Transition>
@@ -10,8 +10,8 @@
10
10
  <p class="bk-lead">
11
11
  {{
12
12
  $t(
13
- 'libraryPlaceDialogLead',
14
- 'Select a reusable block from the library to add it to your layout. You can detach the block later.'
13
+ "libraryPlaceDialogLead",
14
+ "Select a reusable block from the library to add it to your layout. You can detach the block later."
15
15
  )
16
16
  }}
17
17
  </p>
@@ -19,7 +19,7 @@
19
19
  <div class="bk-form-group">
20
20
  <div>
21
21
  <label class="bk-form-label" for="library_search">
22
- {{ $t('libraryPlaceSearchLabel', 'Filter library items') }}
22
+ {{ $t("libraryPlaceSearchLabel", "Filter library items") }}
23
23
  </label>
24
24
  <input
25
25
  id="library_search"
@@ -37,7 +37,7 @@
37
37
  </div>
38
38
  <div>
39
39
  <label class="bk-form-label" for="library_bundle">
40
- {{ $t('libraryPlaceBundleSelectLabel', 'Bundle') }}
40
+ {{ $t("libraryPlaceBundleSelectLabel", "Bundle") }}
41
41
  </label>
42
42
  <select
43
43
  id="library_bundle"
@@ -78,7 +78,7 @@
78
78
 
79
79
  <template #footer>
80
80
  <button class="bk-button bk-is-primary" @click="onSubmit">
81
- {{ $t('libraryPlaceDialogSubmit', 'Add reusable block') }}
81
+ {{ $t("libraryPlaceDialogSubmit", "Add reusable block") }}
82
82
  </button>
83
83
  </template>
84
84
  </FormOverlay>
@@ -24,7 +24,7 @@
24
24
  "
25
25
  />
26
26
  <label for="reusable_label" class="bk-form-label">{{
27
- $t('libraryDialogDescriptionLabel', 'Description')
27
+ $t("libraryDialogDescriptionLabel", "Description")
28
28
  }}</label>
29
29
  <input
30
30
  id="reusable_label"
@@ -38,7 +38,7 @@
38
38
  />
39
39
  </div>
40
40
  <div class="bk-form-label">
41
- {{ $t('libraryPreviewLabel', 'Preview') }}
41
+ {{ $t("libraryPreviewLabel", "Preview") }}
42
42
  </div>
43
43
  <div
44
44
  class="bk-dialog-content-element"
@@ -79,7 +79,8 @@ const { adapter } = defineBlokkliFeature({
79
79
  icon: "reusable",
80
80
  label: "Library",
81
81
  description: "Implements support for a block library to manage reusable blocks.",
82
- requiredAdapterMethods: ["makeBlockReusable", "detachReusableBlock"]
82
+ requiredAdapterMethods: ["makeBlockReusable", "detachReusableBlock"],
83
+ dependencies: ["add-list"]
83
84
  });
84
85
  const { selection, state, types, $t, eventBus, definitions } = useBlokkli();
85
86
  const showReusableDialog = ref(false);
@@ -66,7 +66,7 @@
66
66
 
67
67
  <div v-if="selected.length" class="bk-media-library-cancel">
68
68
  <button class="bk-button bk-is-primary" @click.prevent="selected = []">
69
- {{ $t('cancelSelection', 'Cancel selection') }}
69
+ {{ $t("cancelSelection", "Cancel selection") }}
70
70
  </button>
71
71
  </div>
72
72
 
@@ -1,20 +1,11 @@
1
- import { Icon } from '#blokkli/components';
2
1
  type __VLS_Props = {
3
2
  label: string;
4
3
  isActive: boolean;
5
4
  };
6
- declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
7
5
  declare var __VLS_5: {};
8
- type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
6
+ type __VLS_Slots = {} & {
9
7
  default?: (props: typeof __VLS_5) => any;
10
- }>;
11
- declare const __VLS_self: import("vue").DefineComponent<__VLS_Props, {
12
- Icon: typeof Icon;
13
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
- toggle: (...args: any[]) => void;
15
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
16
- onToggle?: ((...args: any[]) => any) | undefined;
17
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ };
18
9
  declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
10
  toggle: (...args: any[]) => void;
20
11
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
@@ -42,7 +42,7 @@
42
42
  "
43
43
  >
44
44
  {{
45
- typeof option.value === 'string' ? option.value : option.value.label
45
+ typeof option.value === "string" ? option.value : option.value.label
46
46
  }}
47
47
  </span>
48
48
  </div>
@@ -13,7 +13,7 @@
13
13
  "
14
14
  />
15
15
  <button class="bk-button bk-is-danger" @click="takeOwnership">
16
- {{ $t('ownershipTakeOwnership', 'Assign to me') }}
16
+ {{ $t("ownershipTakeOwnership", "Assign to me") }}
17
17
  </button>
18
18
  </div>
19
19
  </Teleport>
@@ -2,7 +2,7 @@
2
2
  <div class="bk-qr-code">
3
3
  <QrCodeVue :value="fullUrl" :size="430" level="H" />
4
4
  <p>
5
- {{ $t('previewQrCodeText', 'You can also copy the link and share it.') }}
5
+ {{ $t("previewQrCodeText", "You can also copy the link and share it.") }}
6
6
  </p>
7
7
  <input :value="fullUrl" class="bk-form-input" readonly @focus="onFocus" />
8
8
  </div>
@@ -50,8 +50,8 @@ const { adapter, settings } = defineBlokkliFeature({
50
50
  }
51
51
  });
52
52
  const route = useRoute();
53
- const { state, $t, broadcast, context } = useBlokkli();
54
- const { mutations, canEdit } = state;
53
+ const { state, $t, broadcast, context, eventBus } = useBlokkli();
54
+ const { mutations, canEdit, mutateWithLoadingState } = state;
55
55
  const hasPublishOptions = !!adapter.getPublishOptions;
56
56
  const isPublished = computed(() => !!state.entity.value.status);
57
57
  const showDialog = ref(false);
@@ -82,6 +82,24 @@ const onMenuClick = async () => {
82
82
  await publishCurrent();
83
83
  };
84
84
  async function publishCurrent() {
85
+ const success = await mutateWithLoadingState(
86
+ () => adapter.publish({
87
+ hostEntityType: context.value.entityType,
88
+ hostEntityUuid: context.value.entityUuid,
89
+ closeAfterPublish: settings.value.closeAfterPublish
90
+ }),
91
+ $t("publishError", "Changes could not be published."),
92
+ $t("publishSuccess", "Changes published successfully.")
93
+ );
94
+ if (!success) {
95
+ const validations = state.violations.value;
96
+ if (validations.length) {
97
+ eventBus.emit("publish:failed");
98
+ eventBus.emit("sidebar:open", "violations");
99
+ }
100
+ return;
101
+ }
102
+ onSubmit();
85
103
  }
86
104
  function onSubmit() {
87
105
  broadcast.emit("published", { uuid: context.value.entityUuid });
@@ -1,22 +1,11 @@
1
- import { Icon } from '#blokkli/components';
2
1
  type __VLS_Props = {
3
2
  detached?: boolean;
4
3
  isResizing?: boolean;
5
4
  };
6
- declare const isLoading: import("vue").Ref<boolean, boolean>;
7
- declare const iframe: import("vue").Ref<HTMLIFrameElement | null, HTMLIFrameElement | null>;
8
- declare const src: import("vue").ComputedRef<string>;
9
- declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
10
5
  declare var __VLS_5: {};
11
- type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
6
+ type __VLS_Slots = {} & {
12
7
  default?: (props: typeof __VLS_5) => any;
13
- }>;
14
- declare const __VLS_self: import("vue").DefineComponent<__VLS_Props, {
15
- Icon: typeof Icon;
16
- isLoading: typeof isLoading;
17
- iframe: typeof iframe;
18
- src: typeof src;
19
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ };
20
9
  declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
10
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
22
11
  export default _default;
@@ -48,7 +48,7 @@
48
48
  class="bk-search-no-results"
49
49
  >
50
50
  <Icon name="sad" />
51
- <span>{{ $t('searchBoxNoResultsFound', 'No results found') }}</span>
51
+ <span>{{ $t("searchBoxNoResultsFound", "No results found") }}</span>
52
52
  </div>
53
53
  </div>
54
54
  </template>
@@ -67,6 +67,6 @@ onBlokkliEvent("keyPressed", (e) => {
67
67
 
68
68
  <script>
69
69
  export default {
70
- name: "Search"
70
+ name: "ContentSearch"
71
71
  };
72
72
  </script>
@@ -25,7 +25,7 @@
25
25
  <div class="bk-tour-buttons">
26
26
  <button @click.stop.prevent="prev">
27
27
  <Icon name="chevron-left" />
28
- <span>{{ $t('tourPrev', 'Previous') }}</span>
28
+ <span>{{ $t("tourPrev", "Previous") }}</span>
29
29
  <div class="bk-tooltip">
30
30
  <span>Arrow Right</span>
31
31
  <ShortcutIndicator label="Prev Tour Item" key-code="ArrowLeft" />
@@ -37,7 +37,7 @@
37
37
  <span>{{ items.length }}</span>
38
38
  </div>
39
39
  <button @click.stop.prevent="next">
40
- <span>{{ $t('tourNext', 'Next') }}</span>
40
+ <span>{{ $t("tourNext", "Next") }}</span>
41
41
  <Icon name="chevron-right" />
42
42
  <div class="bk-tooltip">
43
43
  <span>Arrow Left</span>
@@ -2,7 +2,7 @@
2
2
  <Teleport to="body">
3
3
  <ViewportBlockingRect id="tour-popup" class="bk bk-tour-popup">
4
4
  <div class="bk-tour-popup-title">
5
- <h2>{{ $t('tourLabel', 'Take a tour') }}</h2>
5
+ <h2>{{ $t("tourLabel", "Take a tour") }}</h2>
6
6
  <button class="bk-tour-popup-close" @click="$emit('close')">
7
7
  <Icon name="close" />
8
8
  </button>
@@ -12,14 +12,14 @@
12
12
  <p>
13
13
  {{
14
14
  $t(
15
- 'tourIntro',
16
- 'Explore the most important features of the editor and learn how to get started using bl\xF6kkli.'
15
+ "tourIntro",
16
+ "Explore the most important features of the editor and learn how to get started using bl\xF6kkli."
17
17
  )
18
18
  }}
19
19
  </p>
20
20
 
21
21
  <button class="bk-button" @click="$emit('start')">
22
- {{ $t('tourStartButton', 'Start the tour') }}
22
+ {{ $t("tourStartButton", "Start the tour") }}
23
23
  </button>
24
24
  </div>
25
25
  </ViewportBlockingRect>
@@ -3,7 +3,7 @@
3
3
  <Icon name="translate" />
4
4
  <p v-html="text" />
5
5
  <button class="bk-translations-banner-close" @click="onClick">
6
- {{ $t('translationsBannerButton', 'Edit source language instead') }}
6
+ {{ $t("translationsBannerButton", "Edit source language instead") }}
7
7
  <Icon name="close" />
8
8
  </button>
9
9
  </div>
@@ -22,7 +22,7 @@
22
22
  <figure>
23
23
  <Icon name="check" />
24
24
  </figure>
25
- <h3>{{ $t('validationsNoneFound', 'No validation errors found.') }}</h3>
25
+ <h3>{{ $t("validationsNoneFound", "No validation errors found.") }}</h3>
26
26
  </div>
27
27
  </div>
28
28
 
@@ -2,14 +2,12 @@ type __VLS_Props = {
2
2
  title?: string;
3
3
  horizontal?: boolean;
4
4
  };
5
- declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
6
5
  declare var __VLS_1: {}, __VLS_3: {};
7
- type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
6
+ type __VLS_Slots = {} & {
8
7
  addon?: (props: typeof __VLS_1) => any;
9
8
  } & {
10
9
  default?: (props: typeof __VLS_3) => any;
11
- }>;
12
- declare const __VLS_self: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ };
13
11
  declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
12
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
15
13
  export default _default;
@@ -1,9 +1,7 @@
1
- declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
2
1
  declare var __VLS_1: {};
3
- type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
2
+ type __VLS_Slots = {} & {
4
3
  default?: (props: typeof __VLS_1) => any;
5
- }>;
6
- declare const __VLS_self: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
4
+ };
7
5
  declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
6
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
9
7
  export default _default;
@@ -14,8 +14,9 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
14
14
  }> & Readonly<{
15
15
  onClose?: (() => any) | undefined;
16
16
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
17
- default?: ((props: {}) => any) | undefined;
18
- footer?: ((props: {}) => any) | undefined;
17
+ default?: (props: {}) => any;
18
+ } & {
19
+ footer?: (props: {}) => any;
19
20
  }>;
20
21
  export default _default;
21
22
  type __VLS_WithSlots<T, S> = T & {
@@ -32,6 +32,7 @@ const props = defineProps({
32
32
  entityBundle: { type: String, required: true },
33
33
  language: { type: String, required: true }
34
34
  });
35
+ defineSlots();
35
36
  const context = computed(() => {
36
37
  return {
37
38
  entityType: props.entityType,
@@ -10,9 +10,9 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
10
10
  expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
11
11
  attrs: any;
12
12
  slots: {
13
- default?: ((props: {
14
- mutatedEntity: any;
15
- }) => any) | undefined;
13
+ default(props: {
14
+ mutatedEntity: T;
15
+ }): any;
16
16
  };
17
17
  emit: {};
18
18
  }>) => import("vue").VNode & {