@blokkli/editor 2.0.0-alpha.16 → 2.0.0-alpha.18
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/dist/module.json +1 -1
- package/dist/module.mjs +640 -137
- package/dist/modules/drupal/graphql/base/fragment.blokkliProps.graphql +1 -1
- package/dist/modules/drupal/graphql/base/fragment.paragraphsFieldItem.graphql +3 -1
- package/dist/modules/drupal/graphql/base/query.pbConfig.graphql +1 -10
- package/dist/modules/drupal/graphql/features/comments.graphql +11 -8
- package/dist/modules/drupal/graphql/mutations/set_paragraph_schedule.graphql +15 -0
- package/dist/modules/drupal/index.mjs +33 -0
- package/dist/modules/drupal/runtime/adapter/index.js +12 -4
- package/dist/runtime/adapter/index.d.ts +21 -0
- package/dist/runtime/blokkliPlugins/ContextMenu/Menu/index.vue +3 -0
- package/dist/runtime/blokkliPlugins/ItemAction/index.vue +23 -15
- package/dist/runtime/blokkliPlugins/ItemAction/index.vue.d.ts +20 -44
- package/dist/runtime/blokkliPlugins/TourItem/index.vue +10 -5
- package/dist/runtime/components/Blocks/FromLibrary/index.vue +4 -2
- package/dist/runtime/components/BlokkliEditable.vue +32 -14
- package/dist/runtime/components/BlokkliField.vue +3 -0
- package/dist/runtime/components/BlokkliField.vue.d.ts +3 -3
- package/dist/runtime/components/BlokkliItem.vue +1 -1
- package/dist/runtime/components/BlokkliItem.vue.d.ts +4 -2
- package/dist/runtime/components/BlokkliProvider.vue +41 -28
- package/dist/runtime/components/BlokkliProvider.vue.d.ts +2 -1
- package/dist/runtime/components/Edit/Actions/index.vue +36 -20
- package/dist/runtime/components/Edit/AnimationCanvas/index.vue +436 -25
- package/dist/runtime/components/Edit/ArtboardTooltip/index.vue +83 -0
- package/dist/runtime/components/Edit/ArtboardTooltip/index.vue.d.ts +32 -0
- package/dist/runtime/components/Edit/Banner/index.vue +51 -0
- package/dist/runtime/components/Edit/Banner/index.vue.d.ts +18 -0
- package/dist/runtime/components/Edit/Dialog/index.vue +6 -4
- package/dist/runtime/components/Edit/DraggableList.vue +15 -7
- package/dist/runtime/components/Edit/DraggableList.vue.d.ts +5 -5
- package/dist/runtime/components/Edit/EditIndicator.vue +118 -44
- package/dist/runtime/components/Edit/EditIndicator.vue.d.ts +3 -0
- package/dist/runtime/components/Edit/EditProvider.vue +101 -31
- package/dist/runtime/components/Edit/EditProvider.vue.d.ts +3 -0
- package/dist/runtime/components/Edit/Features/AddList/index.vue +9 -11
- package/dist/runtime/components/Edit/Features/Analyze/Overlay/index.vue +28 -26
- package/dist/runtime/components/Edit/Features/Analyze/Renderer.vue +1 -1
- package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodesTarget.vue +15 -11
- package/dist/runtime/components/Edit/Features/Anchors/Renderer.vue +19 -102
- package/dist/runtime/components/Edit/Features/Artboard/Renderer.vue +3 -0
- package/dist/runtime/components/Edit/Features/BlockAddList/index.vue +29 -53
- package/dist/runtime/components/Edit/Features/BlockScheduler/Dialog/ScheduleSection.vue +154 -0
- package/dist/runtime/components/Edit/Features/BlockScheduler/Dialog/ScheduleSection.vue.d.ts +27 -0
- package/dist/runtime/components/Edit/Features/BlockScheduler/Dialog/index.vue +222 -0
- package/dist/runtime/components/Edit/Features/{Selection/AddButtons/AddButtonsField.vue.d.ts → BlockScheduler/Dialog/index.vue.d.ts} +6 -9
- package/dist/runtime/components/Edit/Features/BlockScheduler/index.vue +96 -0
- package/dist/runtime/components/Edit/Features/Clipboard/index.vue +15 -16
- package/dist/runtime/components/Edit/Features/CommandPalette/Palette/Item/index.vue +51 -0
- package/dist/runtime/components/Edit/Features/CommandPalette/Palette/{Group → Item}/index.vue.d.ts +9 -13
- package/dist/runtime/components/Edit/Features/CommandPalette/Palette/index.vue +46 -66
- package/dist/runtime/components/Edit/Features/CommandPalette/index.vue +2 -0
- package/dist/runtime/components/Edit/Features/Comments/AddForm/index.vue +35 -20
- package/dist/runtime/components/Edit/Features/Comments/AddForm/index.vue.d.ts +5 -3
- package/dist/runtime/components/Edit/Features/Comments/CommentInput/index.vue +29 -0
- package/dist/runtime/components/Edit/Features/{Publish/Dialog/ScheduleDate.vue.d.ts → Comments/CommentInput/index.vue.d.ts} +2 -2
- package/dist/runtime/components/Edit/Features/Comments/Overlay/Item/index.vue +22 -16
- package/dist/runtime/components/Edit/Features/Comments/Overlay/Item/index.vue.d.ts +1 -0
- package/dist/runtime/components/Edit/Features/Comments/Overlay/index.vue +15 -6
- package/dist/runtime/components/Edit/Features/Comments/index.vue +21 -9
- package/dist/runtime/components/Edit/Features/Conversions/index.vue +4 -7
- package/dist/runtime/components/Edit/Features/Debug/Rects/index.vue +26 -35
- package/dist/runtime/components/Edit/Features/Debug/Renderer.vue +240 -0
- package/dist/runtime/components/Edit/Features/Debug/Renderer.vue.d.ts +6 -0
- package/dist/runtime/components/Edit/Features/Debug/index.vue +7 -165
- package/dist/runtime/components/Edit/Features/Delete/index.vue +1 -1
- package/dist/runtime/components/Edit/Features/DraggingOverlay/DragItems/index.vue +14 -6
- package/dist/runtime/components/Edit/Features/DraggingOverlay/DropTargets/index.vue +55 -48
- package/dist/runtime/components/Edit/Features/DraggingOverlay/index.vue +30 -18
- package/dist/runtime/components/Edit/Features/Duplicate/index.vue +6 -8
- package/dist/runtime/components/Edit/Features/Edit/index.vue +16 -22
- package/dist/runtime/components/Edit/Features/EditForm/index.vue +7 -6
- package/dist/runtime/components/Edit/Features/EditableField/Overlay/Frame/index.vue +69 -4
- package/dist/runtime/components/Edit/Features/EditableField/Overlay/Frame/index.vue.d.ts +2 -2
- package/dist/runtime/components/Edit/Features/EditableField/Overlay/Plaintext/index.vue +13 -9
- package/dist/runtime/components/Edit/Features/EditableField/Overlay/index.vue +45 -87
- package/dist/runtime/components/Edit/Features/EditableField/Overlay/index.vue.d.ts +2 -2
- package/dist/runtime/components/Edit/Features/EditableField/index.vue +41 -43
- package/dist/runtime/components/Edit/Features/Fragments/Dialog/index.vue +11 -9
- package/dist/runtime/components/Edit/Features/Fragments/index.vue +3 -3
- package/dist/runtime/components/Edit/Features/History/index.vue +5 -2
- package/dist/runtime/components/Edit/Features/Hover/Overlay/fragment.glsl +139 -0
- package/dist/runtime/components/Edit/Features/Hover/Overlay/index.vue +261 -0
- package/dist/runtime/components/Edit/Features/Hover/Overlay/index.vue.d.ts +6 -0
- package/dist/runtime/components/Edit/Features/Hover/Overlay/vertex.glsl +117 -0
- package/dist/runtime/components/Edit/Features/Hover/index.vue +25 -0
- package/dist/runtime/components/Edit/Features/Hover/index.vue.d.ts +2 -0
- package/dist/runtime/components/Edit/Features/Library/EditReusable/index.vue +5 -7
- package/dist/runtime/components/Edit/Features/Library/LibraryDialog/index.vue +19 -27
- package/dist/runtime/components/Edit/Features/Library/ReusableDialog/index.vue +32 -28
- package/dist/runtime/components/Edit/Features/Library/index.vue +28 -23
- package/dist/runtime/components/Edit/Features/MediaLibrary/Library/index.vue +6 -3
- package/dist/runtime/components/Edit/Features/MediaLibrary/index.vue +15 -12
- package/dist/runtime/components/Edit/Features/MultiSelect/Overlay/index.vue +36 -29
- package/dist/runtime/components/Edit/Features/MultiSelect/index.vue +2 -4
- package/dist/runtime/components/Edit/Features/Options/Form/Item.vue +6 -1
- package/dist/runtime/components/Edit/Features/Options/Form/index.vue +8 -6
- package/dist/runtime/components/Edit/Features/Options/index.vue +6 -6
- package/dist/runtime/components/Edit/Features/Ownership/Renderer.vue +35 -0
- package/dist/runtime/components/Edit/Features/Ownership/Renderer.vue.d.ts +6 -0
- package/dist/runtime/components/Edit/Features/Ownership/index.vue +7 -25
- package/dist/runtime/components/Edit/Features/ProxyView/index.vue +5 -1
- package/dist/runtime/components/Edit/Features/Publish/Dialog/index.vue +68 -15
- package/dist/runtime/components/Edit/Features/Search/Overlay/Results/Page/index.vue +15 -15
- package/dist/runtime/components/Edit/Features/Search/index.vue +4 -1
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Overlay/index.vue +39 -74
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Overlay/index.vue.d.ts +7 -5
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Renderer/fragment.glsl +106 -0
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Renderer/index.vue +440 -0
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Renderer/index.vue.d.ts +32 -0
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Renderer/vertex.glsl +102 -0
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/index.vue +53 -125
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/index.vue.d.ts +2 -2
- package/dist/runtime/components/Edit/Features/Selection/Overlay/index.vue +88 -29
- package/dist/runtime/components/Edit/Features/Selection/Overlay/index.vue.d.ts +5 -3
- package/dist/runtime/components/Edit/Features/Selection/Overlay/vertex.glsl +11 -2
- package/dist/runtime/components/Edit/Features/Selection/OverlayFallback/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Selection/index.vue +66 -39
- package/dist/runtime/components/Edit/Features/Structure/List/Field/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/Structure/List/Item/index.vue +13 -6
- package/dist/runtime/components/Edit/Features/Tour/Overlay/index.vue +3 -0
- package/dist/runtime/components/Edit/Features/Transform/index.vue +2 -27
- package/dist/runtime/components/Edit/Features/Translations/Banner/index.vue +17 -11
- package/dist/runtime/components/Edit/Features/Translations/index.vue +20 -23
- package/dist/runtime/components/Edit/Features/Validations/SidebarItem/index.vue +5 -5
- package/dist/runtime/components/Edit/Features/index.vue +17 -7
- package/dist/runtime/components/Edit/Form/Text/index.vue +2 -1
- package/dist/runtime/components/Edit/Form/Text/index.vue.d.ts +1 -0
- package/dist/runtime/components/Edit/Form/Toggle/index.vue +4 -3
- package/dist/runtime/components/Edit/Form/Toggle/index.vue.d.ts +12 -2
- package/dist/runtime/components/Edit/Indicators/index.vue +1 -1
- package/dist/runtime/components/Edit/InfoBox/index.vue +6 -2
- package/dist/runtime/components/Edit/InfoBox/index.vue.d.ts +12 -2
- package/dist/runtime/components/Edit/Konami/Game/index.vue +5 -5
- package/dist/runtime/components/Edit/{Features/Publish/Dialog/ScheduleDate.vue → ScheduleDate/index.vue} +6 -58
- package/dist/runtime/components/Edit/ScheduleDate/index.vue.d.ts +23 -0
- package/dist/runtime/components/Edit/ShortcutIndicator/index.vue +3 -0
- package/dist/runtime/components/Edit/Transition/Height.vue +95 -0
- package/dist/runtime/components/Edit/Transition/Height.vue.d.ts +36 -0
- package/dist/runtime/components/Edit/index.d.ts +7 -3
- package/dist/runtime/components/Edit/index.js +12 -4
- package/dist/runtime/composables/defineBlokkli.js +4 -2
- package/dist/runtime/css/output.css +1 -1
- package/dist/runtime/helpers/animationProvider.d.ts +35 -1
- package/dist/runtime/helpers/animationProvider.js +179 -48
- package/dist/runtime/helpers/composables/defineRenderer.d.ts +8 -0
- package/dist/runtime/helpers/composables/defineRenderer.js +8 -0
- package/dist/runtime/helpers/composables/useStateBasedCache.d.ts +4 -0
- package/dist/runtime/helpers/composables/useStateBasedCache.js +13 -0
- package/dist/runtime/helpers/composables/useStickyToolbar.d.ts +4 -1
- package/dist/runtime/helpers/composables/useStickyToolbar.js +53 -35
- package/dist/runtime/helpers/definitionProvider.d.ts +1 -1
- package/dist/runtime/helpers/dom/index.d.ts +1 -0
- package/dist/runtime/helpers/domProvider.d.ts +54 -14
- package/dist/runtime/helpers/domProvider.js +168 -134
- package/dist/runtime/helpers/index.d.ts +1 -8
- package/dist/runtime/helpers/index.js +1 -84
- package/dist/runtime/helpers/providers/blocks.d.ts +10 -0
- package/dist/runtime/helpers/providers/blocks.js +91 -0
- package/dist/runtime/helpers/providers/directive.d.ts +24 -0
- package/dist/runtime/helpers/providers/directive.js +205 -0
- package/dist/runtime/helpers/providers/element.d.ts +6 -0
- package/dist/runtime/helpers/providers/element.js +35 -0
- package/dist/runtime/helpers/providers/fields.d.ts +8 -0
- package/dist/runtime/helpers/providers/fields.js +47 -0
- package/dist/runtime/helpers/selectionProvider.d.ts +11 -11
- package/dist/runtime/helpers/selectionProvider.js +38 -45
- package/dist/runtime/helpers/stateProvider.d.ts +7 -2
- package/dist/runtime/helpers/stateProvider.js +83 -14
- package/dist/runtime/helpers/storageProvider.d.ts +3 -2
- package/dist/runtime/helpers/storageProvider.js +6 -2
- package/dist/runtime/helpers/symbols.d.ts +1 -0
- package/dist/runtime/helpers/symbols.js +1 -0
- package/dist/runtime/helpers/themeProvider.d.ts +2 -1
- package/dist/runtime/helpers/themeProvider.js +24 -14
- package/dist/runtime/helpers/typesProvider.js +10 -26
- package/dist/runtime/helpers/uiProvider.d.ts +11 -3
- package/dist/runtime/helpers/uiProvider.js +45 -17
- package/dist/runtime/icons/calendar.svg +1 -0
- package/dist/runtime/icons/clock.svg +1 -0
- package/dist/runtime/icons/comment_add.svg +1 -5
- package/dist/runtime/icons/delete.svg +1 -8
- package/dist/runtime/icons/duplicate.svg +1 -12
- package/dist/runtime/icons/edit.svg +1 -8
- package/dist/runtime/icons/reusable.svg +1 -5
- package/dist/runtime/plugins/blokkliDirectives.js +96 -0
- package/dist/runtime/types/index.d.ts +66 -35
- package/package.json +1 -1
- package/dist/runtime/components/Edit/DragInteractions/index.vue +0 -401
- package/dist/runtime/components/Edit/Features/CommandPalette/Palette/Group/index.vue +0 -63
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/AddButtonsField.vue +0 -54
- package/dist/runtime/plugins/blokkliEditable.js +0 -31
- /package/dist/runtime/components/Edit/{DragInteractions → Features/BlockScheduler}/index.vue.d.ts +0 -0
- /package/dist/runtime/plugins/{blokkliEditable.d.ts → blokkliDirectives.d.ts} +0 -0
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<Overlay
|
|
3
3
|
v-if="isVisible && gl && animation.webglEnabled.value"
|
|
4
|
-
:blocks="selection.
|
|
4
|
+
:blocks="selection.items.value"
|
|
5
5
|
:uuids="selection.uuids.value"
|
|
6
6
|
:gl="gl"
|
|
7
|
+
:has-host-selected="selection.hasHostSelected.value"
|
|
7
8
|
/>
|
|
8
9
|
<OverlayFallback v-if="isVisible && !gl" :uuids="selection.uuids.value" />
|
|
9
|
-
<Teleport :to="artboardElement">
|
|
10
|
-
<div
|
|
11
|
-
class="bk bk-host-selection-overlay"
|
|
12
|
-
:style="{
|
|
13
|
-
visibility: selection.hasHostSelected.value ? 'visible' : 'hidden'
|
|
14
|
-
}"
|
|
15
|
-
/>
|
|
16
|
-
</Teleport>
|
|
17
|
-
|
|
18
10
|
<PluginItemDropdown
|
|
19
11
|
v-if="itemDropdownItems.length"
|
|
20
12
|
id="selection"
|
|
@@ -28,7 +20,7 @@
|
|
|
28
20
|
|
|
29
21
|
<SelectionAddButtons
|
|
30
22
|
v-if="state.editMode.value === 'editing'"
|
|
31
|
-
:
|
|
23
|
+
:items="selection.items.value"
|
|
32
24
|
/>
|
|
33
25
|
</template>
|
|
34
26
|
|
|
@@ -40,9 +32,11 @@ import {
|
|
|
40
32
|
calculateIntersection,
|
|
41
33
|
getBounds,
|
|
42
34
|
intersects,
|
|
35
|
+
modulo,
|
|
43
36
|
originatesFromTextInput
|
|
44
37
|
} from "#blokkli/helpers";
|
|
45
38
|
import onBlokkliEvent from "#blokkli/helpers/composables/onBlokkliEvent";
|
|
39
|
+
import useStateBasedCache from "#blokkli/helpers/composables/useStateBasedCache";
|
|
46
40
|
import { PluginItemDropdown } from "#blokkli/plugins";
|
|
47
41
|
import {
|
|
48
42
|
computed,
|
|
@@ -51,26 +45,39 @@ import {
|
|
|
51
45
|
ref,
|
|
52
46
|
watch
|
|
53
47
|
} from "#imports";
|
|
48
|
+
import { itemEntityType } from "#blokkli-build/config";
|
|
54
49
|
defineBlokkliFeature({
|
|
55
50
|
id: "selection",
|
|
56
51
|
icon: "selection",
|
|
57
52
|
label: "Selection",
|
|
58
53
|
description: "Renders an overlay that highlights the selected blocks."
|
|
59
54
|
});
|
|
60
|
-
const {
|
|
55
|
+
const {
|
|
56
|
+
selection,
|
|
57
|
+
ui,
|
|
58
|
+
eventBus,
|
|
59
|
+
animation,
|
|
60
|
+
dom,
|
|
61
|
+
tour,
|
|
62
|
+
$t,
|
|
63
|
+
types,
|
|
64
|
+
state,
|
|
65
|
+
blocks,
|
|
66
|
+
element
|
|
67
|
+
} = useBlokkli();
|
|
68
|
+
const getSelectionOrder = useStateBasedCache(() => {
|
|
69
|
+
return element.queryAll(
|
|
70
|
+
ui.artboardElement(),
|
|
71
|
+
"[data-uuid]",
|
|
72
|
+
"getSelectionOrder",
|
|
73
|
+
(el) => el.dataset.uuid
|
|
74
|
+
);
|
|
75
|
+
});
|
|
61
76
|
const selectedBundle = computed(() => {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
const block = selection.blocks.value[i];
|
|
65
|
-
if (!block) {
|
|
66
|
-
return null;
|
|
67
|
-
}
|
|
68
|
-
if (bundle && bundle !== block.itemBundle) {
|
|
69
|
-
return null;
|
|
70
|
-
}
|
|
71
|
-
bundle = block.itemBundle;
|
|
77
|
+
if (selection.bundles.value.length === 1) {
|
|
78
|
+
return selection.bundles.value[0] ?? null;
|
|
72
79
|
}
|
|
73
|
-
return
|
|
80
|
+
return null;
|
|
74
81
|
});
|
|
75
82
|
const itemDropdownEnabled = computed(() => true);
|
|
76
83
|
const itemDropdownItems = computed(() => {
|
|
@@ -105,7 +112,6 @@ function onSelectDropdownItem(item) {
|
|
|
105
112
|
selectAllBlocks();
|
|
106
113
|
}
|
|
107
114
|
}
|
|
108
|
-
const artboardElement = ui.artboardElement();
|
|
109
115
|
const gl = animation.gl();
|
|
110
116
|
const hasSelectedOnce = ref(false);
|
|
111
117
|
const stop = watch(
|
|
@@ -144,10 +150,10 @@ const findMostVisibleBlock = () => {
|
|
|
144
150
|
};
|
|
145
151
|
const getSelectAllUuids = (allBlocks, currentlySelected) => {
|
|
146
152
|
if (currentlySelected.length >= 1) {
|
|
147
|
-
const selectedHostUuids = currentlySelected.map((block) => block.
|
|
148
|
-
const selectedHostTypes = currentlySelected.map((block) => block.
|
|
153
|
+
const selectedHostUuids = currentlySelected.map((block) => block.host.uuid);
|
|
154
|
+
const selectedHostTypes = currentlySelected.map((block) => block.host.type);
|
|
149
155
|
const selectedHostFieldNames = currentlySelected.map(
|
|
150
|
-
(block) => block.
|
|
156
|
+
(block) => block.host.fieldName
|
|
151
157
|
);
|
|
152
158
|
const selectedUuids = currentlySelected.map((v) => v.uuid);
|
|
153
159
|
const commonHostUuids = selectedHostUuids.filter(
|
|
@@ -160,14 +166,14 @@ const getSelectAllUuids = (allBlocks, currentlySelected) => {
|
|
|
160
166
|
(fieldName, index, self) => self.indexOf(fieldName) === index
|
|
161
167
|
);
|
|
162
168
|
const newUuids = allBlocks.filter(
|
|
163
|
-
(block) => commonHostUuids.includes(block.
|
|
169
|
+
(block) => commonHostUuids.includes(block.host.uuid) && commonHostTypes.includes(block.host.type) && commonHostFieldNames.includes(block.host.fieldName)
|
|
164
170
|
).map((block) => block.uuid);
|
|
165
171
|
const isSame = newUuids.every((uuid) => selectedUuids.includes(uuid));
|
|
166
172
|
if (!isSame) {
|
|
167
173
|
return newUuids;
|
|
168
174
|
}
|
|
169
175
|
}
|
|
170
|
-
return allBlocks.filter((block) => block.
|
|
176
|
+
return allBlocks.filter((block) => block.host.type !== itemEntityType).map((block) => block.uuid);
|
|
171
177
|
};
|
|
172
178
|
const visuallySelectBlocks = (toggleUuid) => {
|
|
173
179
|
const rects = dom.getBlockRects();
|
|
@@ -176,12 +182,12 @@ const visuallySelectBlocks = (toggleUuid) => {
|
|
|
176
182
|
if (selected.length === 0) {
|
|
177
183
|
return [toggleUuid];
|
|
178
184
|
}
|
|
179
|
-
const singleSelectedBlock = selected.length === 1 ?
|
|
185
|
+
const singleSelectedBlock = selected.length === 1 ? blocks.getBlock(selected[0]) : null;
|
|
180
186
|
const toggleRect = rects[toggleUuid];
|
|
181
187
|
if (!toggleRect) {
|
|
182
188
|
return;
|
|
183
189
|
}
|
|
184
|
-
const toggleBlock =
|
|
190
|
+
const toggleBlock = blocks.getBlock(toggleUuid);
|
|
185
191
|
if (!toggleBlock) {
|
|
186
192
|
return;
|
|
187
193
|
}
|
|
@@ -196,7 +202,7 @@ const visuallySelectBlocks = (toggleUuid) => {
|
|
|
196
202
|
if (!intersects(rect, encompassingRect2)) {
|
|
197
203
|
continue;
|
|
198
204
|
}
|
|
199
|
-
const block =
|
|
205
|
+
const block = blocks.getBlock(uuid);
|
|
200
206
|
if (!block) {
|
|
201
207
|
continue;
|
|
202
208
|
}
|
|
@@ -240,7 +246,7 @@ const visuallySelectBlocks = (toggleUuid) => {
|
|
|
240
246
|
function selectAllBlocks() {
|
|
241
247
|
eventBus.emit(
|
|
242
248
|
"select:end",
|
|
243
|
-
getSelectAllUuids(
|
|
249
|
+
getSelectAllUuids(blocks.getAllBlocks(), selection.items.value)
|
|
244
250
|
);
|
|
245
251
|
}
|
|
246
252
|
onBlokkliEvent("select:shiftToggle", (uuid) => {
|
|
@@ -249,19 +255,40 @@ onBlokkliEvent("select:shiftToggle", (uuid) => {
|
|
|
249
255
|
eventBus.emit("select", uuids);
|
|
250
256
|
}
|
|
251
257
|
});
|
|
258
|
+
function selectBlock(uuid) {
|
|
259
|
+
eventBus.emit("select", uuid);
|
|
260
|
+
dom.refreshBlockRect(uuid);
|
|
261
|
+
eventBus.emit("scrollIntoView", { uuid });
|
|
262
|
+
}
|
|
263
|
+
function selectInList(prev) {
|
|
264
|
+
const currentUuid = selection.uuids.value[selection.uuids.value.length - 1];
|
|
265
|
+
if (!currentUuid) {
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
const selectionOrder = getSelectionOrder();
|
|
269
|
+
const currentIndex = selectionOrder.indexOf(currentUuid);
|
|
270
|
+
const delta = prev ? -1 : 1;
|
|
271
|
+
const newIndex = modulo(currentIndex + delta, selectionOrder.length);
|
|
272
|
+
const newUuid = selectionOrder[newIndex];
|
|
273
|
+
if (newUuid) {
|
|
274
|
+
selectBlock(newUuid);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
252
277
|
onBlokkliEvent("keyPressed", (e) => {
|
|
253
|
-
if (selection.isDragging.value || selection.isMultiSelecting.value) {
|
|
278
|
+
if (selection.isDragging.value || selection.isMultiSelecting.value || ui.hasDialogOpen.value || ui.hasTooltipOpen.value) {
|
|
254
279
|
return;
|
|
255
280
|
}
|
|
256
281
|
if (e.code === "Escape") {
|
|
257
|
-
|
|
258
|
-
|
|
282
|
+
if (!ui.openTooltip.value) {
|
|
283
|
+
eventBus.emit("select:end", []);
|
|
284
|
+
eventBus.emit("select:host:unselect");
|
|
285
|
+
}
|
|
259
286
|
} else if (e.code === "Tab") {
|
|
260
287
|
if (tour.isTouring.value || ui.hasDialogOpen.value) {
|
|
261
288
|
return;
|
|
262
289
|
}
|
|
263
290
|
e.originalEvent.preventDefault();
|
|
264
|
-
if (selection.
|
|
291
|
+
if (!selection.items.value.length) {
|
|
265
292
|
const uuid = findMostVisibleBlock();
|
|
266
293
|
if (uuid) {
|
|
267
294
|
eventBus.emit("select", uuid);
|
|
@@ -270,9 +297,9 @@ onBlokkliEvent("keyPressed", (e) => {
|
|
|
270
297
|
return;
|
|
271
298
|
}
|
|
272
299
|
if (e.shift) {
|
|
273
|
-
|
|
300
|
+
selectInList(true);
|
|
274
301
|
} else {
|
|
275
|
-
|
|
302
|
+
selectInList();
|
|
276
303
|
}
|
|
277
304
|
animation.requestDraw();
|
|
278
305
|
} else if (e.code === "a" && e.meta) {
|
|
@@ -75,14 +75,14 @@ const targetStyle = computed(() => {
|
|
|
75
75
|
zIndex: 50 + props.level
|
|
76
76
|
};
|
|
77
77
|
});
|
|
78
|
-
const { types, state, selection,
|
|
78
|
+
const { types, state, selection, eventBus, fields } = useBlokkli();
|
|
79
79
|
const mutatedField = computed(
|
|
80
80
|
() => state.getMutatedField(props.entityUuid, props.name)
|
|
81
81
|
);
|
|
82
82
|
const list = computed(() => mutatedField.value?.list || []);
|
|
83
83
|
const key = computed(() => props.entityUuid + ":" + props.name);
|
|
84
84
|
function onMouseUp(preceedingUuid) {
|
|
85
|
-
const field =
|
|
85
|
+
const field = fields.find(props.entityUuid, props.name);
|
|
86
86
|
if (!field) {
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
@@ -33,14 +33,18 @@ const props = defineProps({
|
|
|
33
33
|
isVisible: { type: Boolean, required: true },
|
|
34
34
|
isSelectedFromParent: { type: Boolean, required: false }
|
|
35
35
|
});
|
|
36
|
+
const { runtimeConfig, types, selection, eventBus, state, element } = useBlokkli();
|
|
36
37
|
function getRootEl() {
|
|
37
|
-
const rootEl =
|
|
38
|
+
const rootEl = element.query(
|
|
39
|
+
document.documentElement,
|
|
40
|
+
"#bk-structure",
|
|
41
|
+
"Get root structure element."
|
|
42
|
+
);
|
|
38
43
|
if (!(rootEl instanceof HTMLElement)) {
|
|
39
44
|
throw new TypeError("Failed to locate root structure element.");
|
|
40
45
|
}
|
|
41
46
|
return rootEl;
|
|
42
47
|
}
|
|
43
|
-
const { runtimeConfig, types, selection, eventBus, state } = useBlokkli();
|
|
44
48
|
const canMove = computed(() => state.editMode.value === "editing");
|
|
45
49
|
const isSelected = computed(() => selection.uuids.value.includes(props.uuid));
|
|
46
50
|
const type = computed(() => types.getBlockBundleDefinition(props.bundle));
|
|
@@ -66,15 +70,18 @@ function onMouseUp(e) {
|
|
|
66
70
|
}
|
|
67
71
|
}
|
|
68
72
|
function buildDraggableItems() {
|
|
69
|
-
return selection.
|
|
70
|
-
const el =
|
|
73
|
+
return selection.items.value.map((block) => {
|
|
74
|
+
const el = element.query(
|
|
75
|
+
document.documentElement,
|
|
76
|
+
`[bk-structure-uuid="${block.uuid}"]`,
|
|
77
|
+
"Get structure item for draggable item."
|
|
78
|
+
);
|
|
71
79
|
if (!(el instanceof HTMLElement)) {
|
|
72
80
|
return null;
|
|
73
81
|
}
|
|
74
82
|
return {
|
|
75
83
|
itemType: "existing_structure",
|
|
76
|
-
|
|
77
|
-
itemBundle: block.itemBundle,
|
|
84
|
+
block,
|
|
78
85
|
element: function() {
|
|
79
86
|
return el;
|
|
80
87
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<PluginItemDropdown
|
|
3
3
|
id="transform"
|
|
4
4
|
:title="$t('transformTo', 'Actions')"
|
|
5
|
-
:enabled="!!
|
|
5
|
+
:enabled="!!possibleTransforms.length"
|
|
6
6
|
:items="possibleTransforms"
|
|
7
7
|
icon="script"
|
|
8
8
|
weight="100"
|
|
@@ -43,7 +43,6 @@ import {
|
|
|
43
43
|
useLazyAsyncData
|
|
44
44
|
} from "#imports";
|
|
45
45
|
import { PluginItemDropdown } from "#blokkli/plugins";
|
|
46
|
-
import { onlyUnique } from "#blokkli/helpers";
|
|
47
46
|
import { BlokkliTransition } from "#blokkli/components";
|
|
48
47
|
import { filterTransforms } from "#blokkli/helpers/transform";
|
|
49
48
|
import defineCommands from "#blokkli/helpers/composables/defineCommands";
|
|
@@ -200,14 +199,11 @@ async function onTransformHost(plugin, values) {
|
|
|
200
199
|
);
|
|
201
200
|
ui.setTransform();
|
|
202
201
|
}
|
|
203
|
-
const itemBundleIds = computed(
|
|
204
|
-
() => selection.blocks.value.map((v) => v.itemBundle).filter(onlyUnique)
|
|
205
|
-
);
|
|
206
202
|
const possibleTransforms = computed(
|
|
207
203
|
() => filterTransforms(
|
|
208
204
|
plugins.value || [],
|
|
209
205
|
selection.uuids.value,
|
|
210
|
-
|
|
206
|
+
selection.bundles.value,
|
|
211
207
|
types.allowedTypesInList.value
|
|
212
208
|
)
|
|
213
209
|
);
|
|
@@ -222,27 +218,6 @@ defineCommands(
|
|
|
222
218
|
}
|
|
223
219
|
}))
|
|
224
220
|
);
|
|
225
|
-
const getPossibleDropTransforms = (plugins2, allBlocks, dragItems) => {
|
|
226
|
-
const notDraggedBlocks = allBlocks.filter(
|
|
227
|
-
(block) => !dragItems.find((dragItem) => dragItem.uuid === block.uuid)
|
|
228
|
-
);
|
|
229
|
-
const validPlugins = plugins2.filter((plugin) => {
|
|
230
|
-
const draggedBundles = dragItems.map((item) => item.itemBundle);
|
|
231
|
-
return draggedBundles.every((bundle) => plugin.bundles.includes(bundle)) && dragItems.length + 1 >= plugin.min && (plugin.max === -1 || dragItems.length + 1 <= plugin.max);
|
|
232
|
-
});
|
|
233
|
-
const possibleTransforms2 = [];
|
|
234
|
-
validPlugins.forEach((plugin) => {
|
|
235
|
-
notDraggedBlocks.forEach((block) => {
|
|
236
|
-
if (!plugin.targetBundles || plugin.targetBundles.includes(block.itemBundle)) {
|
|
237
|
-
possibleTransforms2.push({
|
|
238
|
-
plugin,
|
|
239
|
-
block
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
});
|
|
243
|
-
});
|
|
244
|
-
return possibleTransforms2;
|
|
245
|
-
};
|
|
246
221
|
</script>
|
|
247
222
|
|
|
248
223
|
<script>
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
<Banner
|
|
3
|
+
id="translate"
|
|
4
|
+
icon="translate"
|
|
5
|
+
:text
|
|
6
|
+
:button="$t('translationsBannerButton', 'Edit source language instead')"
|
|
7
|
+
scheme="yellow"
|
|
8
|
+
@click="onClick"
|
|
9
|
+
/>
|
|
10
10
|
</template>
|
|
11
11
|
|
|
12
12
|
<script setup>
|
|
13
|
-
import { computed, useBlokkli } from "#imports";
|
|
14
|
-
import {
|
|
13
|
+
import { computed, useBlokkli, onMounted, onBeforeUnmount } from "#imports";
|
|
14
|
+
import { Banner } from "#blokkli/components";
|
|
15
15
|
const props = defineProps({
|
|
16
16
|
activeLanguage: { type: Object, required: true }
|
|
17
17
|
});
|
|
18
|
-
const { $t, adapter, state } = useBlokkli();
|
|
18
|
+
const { $t, adapter, state, ui } = useBlokkli();
|
|
19
19
|
const onClick = () => {
|
|
20
20
|
const sourceLanguage = state.translation.value.sourceLanguage;
|
|
21
21
|
if (!sourceLanguage) {
|
|
@@ -39,4 +39,10 @@ const text = computed(() => {
|
|
|
39
39
|
"You are currently editing the <strong>@language</strong> translation. Some features like adding, moving or deleting blocks are not available."
|
|
40
40
|
).replace("@language", props.activeLanguage.name);
|
|
41
41
|
});
|
|
42
|
+
onMounted(() => {
|
|
43
|
+
ui.setSelectionColor("translating", "mono");
|
|
44
|
+
});
|
|
45
|
+
onBeforeUnmount(() => {
|
|
46
|
+
ui.removeSelectionColor("translating");
|
|
47
|
+
});
|
|
42
48
|
</script>
|
|
@@ -48,11 +48,8 @@
|
|
|
48
48
|
</PluginTourItem>
|
|
49
49
|
</Teleport>
|
|
50
50
|
|
|
51
|
-
<Teleport to="#bk-banner-
|
|
52
|
-
<Banner
|
|
53
|
-
v-if="state.editMode.value === 'translating'"
|
|
54
|
-
:active-language="activeLanguage"
|
|
55
|
-
/>
|
|
51
|
+
<Teleport to="#bk-banner-list">
|
|
52
|
+
<Banner v-if="isTranslating" :active-language />
|
|
56
53
|
</Teleport>
|
|
57
54
|
|
|
58
55
|
<PluginMenuButton
|
|
@@ -61,14 +58,14 @@
|
|
|
61
58
|
:description="
|
|
62
59
|
$t('translationsBatchTranslateMenuDescription', 'Translate all blocks')
|
|
63
60
|
"
|
|
64
|
-
:disabled="
|
|
61
|
+
:disabled="!isTranslating"
|
|
65
62
|
:weight="60"
|
|
66
63
|
icon="translate"
|
|
67
64
|
@click="eventBus.emit('batchTranslate')"
|
|
68
65
|
/>
|
|
69
66
|
|
|
70
67
|
<PluginItemAction
|
|
71
|
-
v-if="
|
|
68
|
+
v-if="isTranslating"
|
|
72
69
|
id="translate"
|
|
73
70
|
:disabled="!canTranslateBlock"
|
|
74
71
|
:title="$t('translationsItemAction', 'Translate')"
|
|
@@ -102,7 +99,7 @@ const { adapter } = defineBlokkliFeature({
|
|
|
102
99
|
description: "Adds support for block translations."
|
|
103
100
|
});
|
|
104
101
|
const { eventBus, state, context, $t, ui, selection, types, definitions } = useBlokkli();
|
|
105
|
-
const
|
|
102
|
+
const isTranslating = computed(() => state.editMode.value === "translating");
|
|
106
103
|
const isOpen = ref(false);
|
|
107
104
|
const isDropdown = computed(() => {
|
|
108
105
|
if (ui.isMobile.value) {
|
|
@@ -113,7 +110,7 @@ const isDropdown = computed(() => {
|
|
|
113
110
|
});
|
|
114
111
|
const activeLangcode = computed(() => context.value.language);
|
|
115
112
|
const activeLanguage = computed(() => {
|
|
116
|
-
return translation.value.availableLanguages?.find(
|
|
113
|
+
return state.translation.value.availableLanguages?.find(
|
|
117
114
|
(v) => v.id === activeLangcode.value
|
|
118
115
|
) || {
|
|
119
116
|
id: activeLangcode.value,
|
|
@@ -121,14 +118,14 @@ const activeLanguage = computed(() => {
|
|
|
121
118
|
};
|
|
122
119
|
});
|
|
123
120
|
const items = computed(() => {
|
|
124
|
-
return (translation.value.availableLanguages || []).map((language) => {
|
|
121
|
+
return (state.translation.value.availableLanguages || []).map((language) => {
|
|
125
122
|
if (language && language.id) {
|
|
126
123
|
return {
|
|
127
124
|
id: language.id,
|
|
128
125
|
code: language.id.toUpperCase(),
|
|
129
126
|
label: language.name,
|
|
130
127
|
checked: context.value.language === language.id,
|
|
131
|
-
translation: (translation.value.translations || []).find(
|
|
128
|
+
translation: (state.translation.value.translations || []).find(
|
|
132
129
|
(v) => v.id === language.id
|
|
133
130
|
)
|
|
134
131
|
};
|
|
@@ -137,22 +134,22 @@ const items = computed(() => {
|
|
|
137
134
|
}).filter(falsy);
|
|
138
135
|
});
|
|
139
136
|
const canTranslateBlock = computed(() => {
|
|
140
|
-
|
|
137
|
+
const block = selection.item.value;
|
|
138
|
+
if (!block) {
|
|
141
139
|
return false;
|
|
142
140
|
}
|
|
143
|
-
|
|
144
|
-
if (block.libraryItemUuid) {
|
|
141
|
+
if (block.library?.libraryItemUuid) {
|
|
145
142
|
return false;
|
|
146
143
|
}
|
|
147
144
|
const definition = definitions.getBlockDefinition(
|
|
148
|
-
block.
|
|
149
|
-
block.
|
|
145
|
+
block.bundle,
|
|
146
|
+
block.fieldListType,
|
|
150
147
|
block.parentBlockBundle
|
|
151
148
|
);
|
|
152
149
|
if (definition?.editor?.disableEdit) {
|
|
153
150
|
return false;
|
|
154
151
|
}
|
|
155
|
-
const type = types.getBlockBundleDefinition(block.
|
|
152
|
+
const type = types.getBlockBundleDefinition(block.bundle);
|
|
156
153
|
if (!type) {
|
|
157
154
|
return false;
|
|
158
155
|
}
|
|
@@ -175,17 +172,17 @@ function onTranslate(items2) {
|
|
|
175
172
|
if (item) {
|
|
176
173
|
eventBus.emit("item:edit", {
|
|
177
174
|
uuid: item.uuid,
|
|
178
|
-
bundle: item.
|
|
175
|
+
bundle: item.bundle
|
|
179
176
|
});
|
|
180
177
|
}
|
|
181
178
|
}
|
|
182
179
|
onBlokkliEvent("item:doubleClick", function(block) {
|
|
183
|
-
if (
|
|
180
|
+
if (isTranslating.value && canTranslateBlock.value) {
|
|
184
181
|
onTranslate([block]);
|
|
185
182
|
}
|
|
186
183
|
});
|
|
187
184
|
onBlokkliEvent("entity:translated", (langcode) => {
|
|
188
|
-
const targetTranslation = translation.value.translations?.find(
|
|
185
|
+
const targetTranslation = state.translation.value.translations?.find(
|
|
189
186
|
(v) => v.id === langcode
|
|
190
187
|
);
|
|
191
188
|
if (targetTranslation) {
|
|
@@ -193,12 +190,12 @@ onBlokkliEvent("entity:translated", (langcode) => {
|
|
|
193
190
|
}
|
|
194
191
|
});
|
|
195
192
|
onMounted(() => {
|
|
196
|
-
const translationExists = !!translation.value.translations?.find(
|
|
193
|
+
const translationExists = !!state.translation.value.translations?.find(
|
|
197
194
|
(v) => v.id === context.value.language
|
|
198
195
|
);
|
|
199
196
|
if (!translationExists) {
|
|
200
|
-
const sourceTranslation = translation.value.translations?.find(
|
|
201
|
-
(v) => v.id === translation.value.sourceLanguage
|
|
197
|
+
const sourceTranslation = state.translation.value.translations?.find(
|
|
198
|
+
(v) => v.id === state.translation.value.sourceLanguage
|
|
202
199
|
);
|
|
203
200
|
if (sourceTranslation) {
|
|
204
201
|
return adapter.changeLanguage(sourceTranslation);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<button class="bk-validation-item" @click.prevent="onClick">
|
|
3
3
|
<div v-if="block" class="bk-validation-item-header">
|
|
4
|
-
<ItemIcon :bundle="block.
|
|
4
|
+
<ItemIcon :bundle="block.bundle" />
|
|
5
5
|
<div>{{ itemBundle?.label }}</div>
|
|
6
6
|
</div>
|
|
7
7
|
<div v-html="message" />
|
|
@@ -18,19 +18,19 @@ const props = defineProps({
|
|
|
18
18
|
entityType: { type: String, required: false },
|
|
19
19
|
entityUuid: { type: String, required: false }
|
|
20
20
|
});
|
|
21
|
-
const { runtimeConfig, eventBus,
|
|
21
|
+
const { runtimeConfig, eventBus, types, blocks } = useBlokkli();
|
|
22
22
|
const isBlock = computed(
|
|
23
23
|
() => props.entityType === runtimeConfig.itemEntityType
|
|
24
24
|
);
|
|
25
25
|
const block = computed(() => {
|
|
26
26
|
if (isBlock.value && props.entityUuid) {
|
|
27
|
-
return
|
|
27
|
+
return blocks.getBlock(props.entityUuid);
|
|
28
28
|
}
|
|
29
29
|
return null;
|
|
30
30
|
});
|
|
31
31
|
const itemBundle = computed(() => {
|
|
32
|
-
if (block.value?.
|
|
33
|
-
return types.getBlockBundleDefinition(block.value.
|
|
32
|
+
if (block.value?.bundle) {
|
|
33
|
+
return types.getBlockBundleDefinition(block.value.bundle);
|
|
34
34
|
}
|
|
35
35
|
return null;
|
|
36
36
|
});
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import {
|
|
11
11
|
featureComponents
|
|
12
12
|
} from "#blokkli-build/features";
|
|
13
|
-
import { useBlokkli,
|
|
13
|
+
import { useBlokkli, computed, watch } from "#imports";
|
|
14
14
|
const emit = defineEmits(["loaded"]);
|
|
15
15
|
const { adapter, features, ui, debug } = useBlokkli();
|
|
16
16
|
const logger = debug.createLogger("Features");
|
|
@@ -37,12 +37,22 @@ const availableFeatures = computed(() => {
|
|
|
37
37
|
return v.id;
|
|
38
38
|
});
|
|
39
39
|
});
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
const hasLoadedFeatures = computed(
|
|
41
|
+
() => renderedFeatures.value.length === availableFeatures.value.length
|
|
42
|
+
);
|
|
43
|
+
const unwatchInit = watch(
|
|
44
|
+
hasLoadedFeatures,
|
|
45
|
+
(hasLoaded) => {
|
|
46
|
+
if (hasLoaded) {
|
|
47
|
+
emit("loaded");
|
|
48
|
+
logger.log("Features loaded", renderedFeatures.value);
|
|
49
|
+
unwatchInit();
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
immediate: true
|
|
54
|
+
}
|
|
55
|
+
);
|
|
46
56
|
</script>
|
|
47
57
|
|
|
48
58
|
<script>
|
|
@@ -27,7 +27,8 @@ defineProps({
|
|
|
27
27
|
required: { type: Boolean, required: false },
|
|
28
28
|
disabled: { type: Boolean, required: false },
|
|
29
29
|
minlength: { type: [String, Number], required: false },
|
|
30
|
-
maxlength: { type: [String, Number], required: false }
|
|
30
|
+
maxlength: { type: [String, Number], required: false },
|
|
31
|
+
type: { type: String, required: false }
|
|
31
32
|
});
|
|
32
33
|
const value = defineModel({ type: String });
|
|
33
34
|
</script>
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<label class="bk-checkbox-toggle">
|
|
3
|
+
<slot />
|
|
3
4
|
<input v-model="value" type="checkbox" class="peer" :disabled />
|
|
4
5
|
<div class="bk-checkbox-toggle-toggle" />
|
|
5
|
-
<div class="bk-checkbox-toggle-label">
|
|
6
|
-
<div>{{ label }}</div>
|
|
6
|
+
<div v-if="label || description" class="bk-checkbox-toggle-label">
|
|
7
|
+
<div v-if="label">{{ label }}</div>
|
|
7
8
|
<div v-if="description">
|
|
8
9
|
{{ description }}
|
|
9
10
|
</div>
|
|
@@ -13,7 +14,7 @@
|
|
|
13
14
|
|
|
14
15
|
<script setup>
|
|
15
16
|
defineProps({
|
|
16
|
-
label: { type: String, required:
|
|
17
|
+
label: { type: String, required: false },
|
|
17
18
|
description: { type: String, required: false },
|
|
18
19
|
disabled: { type: Boolean, required: false }
|
|
19
20
|
});
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
|
-
label
|
|
2
|
+
label?: string;
|
|
3
3
|
description?: string;
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
};
|
|
6
6
|
type __VLS_PublicProps = __VLS_Props & {
|
|
7
7
|
modelValue?: boolean;
|
|
8
8
|
};
|
|
9
|
-
declare
|
|
9
|
+
declare var __VLS_1: {};
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
default?: (props: typeof __VLS_1) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
14
|
"update:modelValue": (value: boolean | undefined) => any;
|
|
11
15
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
12
16
|
"onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
|
|
13
17
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
14
19
|
export default _default;
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|