@blokkli/editor 2.0.0-alpha.35 → 2.0.0-alpha.36
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/global/types/blockOptions.d.ts +9 -2
- package/dist/global/types/definitions.d.ts +12 -5
- package/dist/module.d.mts +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +56 -4
- package/dist/modules/agent/index.d.mts +1 -1
- package/dist/modules/agent/index.mjs +38 -20
- package/dist/modules/agent/runtime/app/composables/agentProvider.d.ts +2 -2
- package/dist/modules/agent/runtime/app/composables/agentProvider.js +3 -3
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.vue +34 -60
- package/dist/modules/agent/runtime/app/features/agent/Transcript/index.d.vue.ts +8 -0
- package/dist/modules/agent/runtime/app/features/agent/Transcript/index.vue +138 -0
- package/dist/modules/agent/runtime/app/features/agent/Transcript/index.vue.d.ts +8 -0
- package/dist/modules/agent/runtime/app/features/agent/index.vue +5 -1
- package/dist/modules/agent/runtime/app/tools/get_bundle_info/index.js +175 -0
- package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.js +5 -0
- package/dist/modules/agent/runtime/app/tools/schemas.d.ts +10 -1
- package/dist/modules/agent/runtime/app/tools/schemas.js +36 -23
- package/dist/modules/agent/runtime/server/Session.d.ts +4 -2
- package/dist/modules/agent/runtime/server/Session.js +61 -57
- package/dist/modules/agent/runtime/server/agentPrompt.d.ts +9 -1
- package/dist/modules/agent/runtime/server/agentPrompt.js +26 -0
- package/dist/modules/agent/runtime/shared/types.d.ts +35 -1
- package/dist/modules/charts/index.d.mts +35 -0
- package/dist/modules/charts/index.mjs +43 -0
- package/dist/modules/charts/runtime/blokkli/skills/charts.d.ts +2 -0
- package/dist/modules/charts/runtime/blokkli/skills/charts.js +42 -0
- package/dist/modules/charts/runtime/blokkli/tools/chart_schemas.d.ts +63 -0
- package/dist/modules/charts/runtime/blokkli/tools/chart_schemas.js +98 -0
- package/dist/modules/charts/runtime/blokkli/tools/create_chart/index.d.ts +2 -0
- package/dist/modules/charts/runtime/blokkli/tools/create_chart/index.js +86 -0
- package/dist/modules/charts/runtime/blokkli/tools/get_chart_data/index.d.ts +2 -0
- package/dist/modules/charts/runtime/blokkli/tools/get_chart_data/index.js +74 -0
- package/dist/modules/charts/runtime/blokkli/tools/get_chart_type_options/index.d.ts +2 -0
- package/dist/modules/charts/runtime/blokkli/tools/get_chart_type_options/index.js +42 -0
- package/dist/modules/charts/runtime/blokkli/tools/update_chart/index.d.ts +2 -0
- package/dist/modules/charts/runtime/blokkli/tools/update_chart/index.js +101 -0
- package/dist/modules/charts/runtime/chartTypes/area.d.ts +2 -0
- package/dist/modules/charts/runtime/chartTypes/area.js +68 -0
- package/dist/modules/charts/runtime/chartTypes/bar.d.ts +2 -0
- package/dist/modules/charts/runtime/chartTypes/bar.js +76 -0
- package/dist/modules/charts/runtime/chartTypes/define.d.ts +2 -0
- package/dist/modules/charts/runtime/chartTypes/define.js +3 -0
- package/dist/modules/charts/runtime/chartTypes/donut.d.ts +2 -0
- package/dist/modules/charts/runtime/chartTypes/donut.js +45 -0
- package/dist/modules/charts/runtime/chartTypes/heatmap.d.ts +2 -0
- package/dist/modules/charts/runtime/chartTypes/heatmap.js +54 -0
- package/dist/modules/charts/runtime/chartTypes/index.d.ts +21 -0
- package/dist/modules/charts/runtime/chartTypes/index.js +47 -0
- package/dist/modules/charts/runtime/chartTypes/line.d.ts +2 -0
- package/dist/modules/charts/runtime/chartTypes/line.js +68 -0
- package/dist/modules/charts/runtime/chartTypes/pie.d.ts +2 -0
- package/dist/modules/charts/runtime/chartTypes/pie.js +28 -0
- package/dist/modules/charts/runtime/chartTypes/radar.d.ts +2 -0
- package/dist/modules/charts/runtime/chartTypes/radar.js +52 -0
- package/dist/modules/charts/runtime/chartTypes/radialBar.d.ts +2 -0
- package/dist/modules/charts/runtime/chartTypes/radialBar.js +44 -0
- package/dist/modules/charts/runtime/chartTypes/shared.d.ts +52 -0
- package/dist/modules/charts/runtime/chartTypes/shared.js +103 -0
- package/dist/modules/charts/runtime/chartTypes/types.d.ts +29 -0
- package/dist/modules/charts/runtime/chartTypes/types.js +0 -0
- package/dist/modules/charts/runtime/components/ChartRenderer/index.d.vue.ts +4 -0
- package/dist/modules/charts/runtime/components/ChartRenderer/index.vue +120 -0
- package/dist/modules/charts/runtime/components/ChartRenderer/index.vue.d.ts +4 -0
- package/dist/modules/charts/runtime/components/Fragment/BlokkliChart.d.vue.ts +3 -0
- package/dist/modules/charts/runtime/components/Fragment/BlokkliChart.vue +29 -0
- package/dist/modules/charts/runtime/components/Fragment/BlokkliChart.vue.d.ts +3 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/index.d.vue.ts +15 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/index.vue +97 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/index.vue.d.ts +15 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/index.d.vue.ts +11 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/index.vue +34 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/index.vue.d.ts +11 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.d.vue.ts +12 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.vue +49 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.vue.d.ts +12 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/index.d.vue.ts +19 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/index.vue +90 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/index.vue.d.ts +19 -0
- package/dist/modules/charts/runtime/features/charts/Editor/DataTable/index.d.vue.ts +23 -0
- package/dist/modules/charts/runtime/features/charts/Editor/DataTable/index.vue +224 -0
- package/dist/modules/charts/runtime/features/charts/Editor/DataTable/index.vue.d.ts +23 -0
- package/dist/modules/charts/runtime/features/charts/Editor/FootnoteEditor/index.d.vue.ts +10 -0
- package/dist/modules/charts/runtime/features/charts/Editor/FootnoteEditor/index.vue +61 -0
- package/dist/modules/charts/runtime/features/charts/Editor/FootnoteEditor/index.vue.d.ts +10 -0
- package/dist/modules/charts/runtime/features/charts/Editor/Preview/index.d.vue.ts +8 -0
- package/dist/modules/charts/runtime/features/charts/Editor/Preview/index.vue +23 -0
- package/dist/modules/charts/runtime/features/charts/Editor/Preview/index.vue.d.ts +8 -0
- package/dist/modules/charts/runtime/features/charts/Editor/index.d.vue.ts +10 -0
- package/dist/modules/charts/runtime/features/charts/Editor/index.vue +243 -0
- package/dist/modules/charts/runtime/features/charts/Editor/index.vue.d.ts +10 -0
- package/dist/modules/charts/runtime/features/charts/Editor/useChartEditorState.d.ts +17 -0
- package/dist/modules/charts/runtime/features/charts/Editor/useChartEditorState.js +90 -0
- package/dist/modules/charts/runtime/features/charts/index.d.vue.ts +3 -0
- package/dist/modules/charts/runtime/features/charts/index.vue +72 -0
- package/dist/modules/charts/runtime/features/charts/index.vue.d.ts +3 -0
- package/dist/modules/charts/runtime/helpers/index.d.ts +1 -0
- package/dist/modules/charts/runtime/helpers/index.js +17 -0
- package/dist/modules/charts/runtime/types.d.ts +51 -0
- package/dist/modules/charts/runtime/types.js +64 -0
- package/dist/modules/drupal/graphql/features/fragments.graphql +2 -0
- package/dist/modules/drupal/index.d.mts +1 -1
- package/dist/modules/drupal/runtime/adapter/index.js +12 -8
- package/dist/modules/table-of-contents/index.d.mts +11 -0
- package/dist/modules/table-of-contents/index.mjs +24 -0
- package/dist/modules/table-of-contents/runtime/components/BlokkliTableOfContents/index.d.vue.ts +44 -0
- package/dist/modules/table-of-contents/runtime/components/BlokkliTableOfContents/index.vue +43 -0
- package/dist/modules/table-of-contents/runtime/components/BlokkliTableOfContents/index.vue.d.ts +44 -0
- package/dist/modules/table-of-contents/runtime/types/index.d.ts +4 -0
- package/dist/modules/table-of-contents/runtime/types/index.js +0 -0
- package/dist/runtime/components/Blocks/Fragment/index.vue +6 -2
- package/dist/runtime/components/BlokkliItem.vue +8 -3
- package/dist/runtime/components/BlokkliProvider.d.vue.ts +7 -0
- package/dist/runtime/components/BlokkliProvider.vue +7 -1
- package/dist/runtime/components/BlokkliProvider.vue.d.ts +7 -0
- package/dist/runtime/composables/useBlokkliHelper.js +4 -2
- package/dist/runtime/editor/components/AnimationCanvas/index.vue +4 -20
- package/dist/runtime/editor/components/Banner/index.d.vue.ts +12 -2
- package/dist/runtime/editor/components/Banner/index.vue +4 -2
- package/dist/runtime/editor/components/Banner/index.vue.d.ts +12 -2
- package/dist/runtime/editor/components/Dropdown/index.d.vue.ts +27 -0
- package/dist/runtime/editor/components/Dropdown/index.vue +107 -0
- package/dist/runtime/editor/components/Dropdown/index.vue.d.ts +27 -0
- package/dist/{modules/agent/runtime/app/features/agent/Panel/Input/Actions → runtime/editor/components}/DropdownItem/index.vue +1 -1
- package/dist/runtime/editor/components/EditProvider.d.vue.ts +2 -0
- package/dist/runtime/editor/components/EditProvider.vue +4 -3
- package/dist/runtime/editor/components/EditProvider.vue.d.ts +2 -0
- package/dist/runtime/editor/components/Form/Radio/index.d.vue.ts +1 -0
- package/dist/runtime/editor/components/Form/Radio/index.vue +3 -2
- package/dist/runtime/editor/components/Form/Radio/index.vue.d.ts +1 -0
- package/dist/runtime/editor/components/ItemIcon/index.vue +10 -2
- package/dist/runtime/editor/components/NestedEditorOverlay/index.d.vue.ts +13 -3
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue +15 -7
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue.d.ts +13 -3
- package/dist/runtime/editor/components/PreviewProvider.d.vue.ts +2 -0
- package/dist/runtime/editor/components/PreviewProvider.vue +3 -2
- package/dist/runtime/editor/components/PreviewProvider.vue.d.ts +2 -0
- package/dist/runtime/editor/components/ShortcutIndicator/index.vue +1 -1
- package/dist/runtime/editor/components/index.d.ts +3 -1
- package/dist/runtime/editor/components/index.js +4 -0
- package/dist/runtime/editor/composables/onElementResize.js +0 -1
- package/dist/runtime/editor/composables/useEditableFieldOverride.js +4 -5
- package/dist/runtime/editor/css/output.css +1 -1
- package/dist/runtime/editor/events/index.d.ts +7 -0
- package/dist/runtime/editor/features/add-list/Help/Item.vue +5 -2
- package/dist/runtime/editor/features/artboard/Renderer.vue +1 -1
- package/dist/runtime/editor/features/clipboard/index.vue +1 -1
- package/dist/runtime/editor/features/debug/index.vue +1 -1
- package/dist/runtime/editor/features/dev-mode/index.vue +86 -2
- package/dist/runtime/editor/features/edit/index.vue +20 -0
- package/dist/runtime/editor/features/fragments/types.d.ts +1 -0
- package/dist/runtime/editor/features/hover/Renderer/index.vue +30 -3
- package/dist/runtime/editor/features/hover/index.vue +1 -1
- package/dist/runtime/editor/features/options/Form/Checkbox/index.d.vue.ts +2 -2
- package/dist/runtime/editor/features/options/Form/Checkbox/index.vue +3 -3
- package/dist/runtime/editor/features/options/Form/Checkbox/index.vue.d.ts +2 -2
- package/dist/runtime/editor/features/options/Form/Checkboxes/index.d.vue.ts +2 -2
- package/dist/runtime/editor/features/options/Form/Checkboxes/index.vue +5 -5
- package/dist/runtime/editor/features/options/Form/Checkboxes/index.vue.d.ts +2 -2
- package/dist/runtime/editor/features/options/Form/Item.d.vue.ts +2 -2
- package/dist/runtime/editor/features/options/Form/Item.vue +14 -48
- package/dist/runtime/editor/features/options/Form/Item.vue.d.ts +2 -2
- package/dist/runtime/editor/features/options/Form/Number/index.d.vue.ts +3 -3
- package/dist/runtime/editor/features/options/Form/Number/index.vue +7 -17
- package/dist/runtime/editor/features/options/Form/Number/index.vue.d.ts +3 -3
- package/dist/runtime/editor/features/options/Form/Range/index.d.vue.ts +2 -2
- package/dist/runtime/editor/features/options/Form/Range/index.vue +4 -4
- package/dist/runtime/editor/features/options/Form/Range/index.vue.d.ts +2 -2
- package/dist/runtime/editor/features/options/Form/index.vue +10 -5
- package/dist/runtime/editor/features/selection/index.vue +2 -2
- package/dist/runtime/editor/features/transform/index.vue +1 -3
- package/dist/runtime/editor/plugins/Sidebar/index.d.vue.ts +1 -1
- package/dist/runtime/editor/plugins/Sidebar/index.vue.d.ts +1 -1
- package/dist/runtime/editor/providers/definition.d.ts +2 -2
- package/dist/runtime/editor/providers/definition.js +7 -1
- package/dist/runtime/editor/providers/dom.d.ts +5 -0
- package/dist/runtime/editor/providers/dom.js +11 -2
- package/dist/runtime/editor/providers/fields.d.ts +19 -1
- package/dist/runtime/editor/providers/fields.js +54 -2
- package/dist/runtime/editor/translations/de.json +269 -1
- package/dist/runtime/editor/translations/fr.json +269 -1
- package/dist/runtime/editor/translations/gsw_CH.json +269 -1
- package/dist/runtime/editor/translations/it.json +269 -1
- package/dist/runtime/helpers/imports/index.d.ts +8 -1
- package/dist/runtime/helpers/imports/index.js +15 -6
- package/dist/runtime/helpers/injections.d.ts +5 -1
- package/dist/runtime/helpers/injections.js +3 -0
- package/dist/runtime/helpers/runtimeHelpers/index.js +14 -0
- package/dist/runtime/types/definitions.d.ts +8 -5
- package/dist/runtime/types/provider.d.ts +2 -0
- package/dist/shared/editor.6D5vApr0.mjs +30 -0
- package/dist/shared/{editor.DMFfaLVE.mjs → editor.BFIzNSQM.mjs} +1 -30
- package/dist/shared/{editor.Iax3GCvt.d.mts → editor.CWQIFIEQ.d.mts} +22 -0
- package/dist/types.d.mts +1 -1
- package/package.json +17 -1
- package/dist/modules/agent/runtime/app/tools/get_available_bundles/index.js +0 -104
- /package/dist/modules/agent/runtime/app/tools/{get_available_bundles → get_bundle_info}/index.d.ts +0 -0
- /package/dist/{modules/agent/runtime/app/features/agent/Panel/Input/Actions → runtime/editor/components}/DropdownItem/index.d.vue.ts +0 -0
- /package/dist/{modules/agent/runtime/app/features/agent/Panel/Input/Actions → runtime/editor/components}/DropdownItem/index.vue.d.ts +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<div class="bk-form-label">
|
|
4
4
|
{{ label }}<span v-if="required" class="bk-required-indicator">*</span>
|
|
5
5
|
</div>
|
|
6
|
-
<div>
|
|
6
|
+
<div :class="{ 'bk-radio-inline': inline }">
|
|
7
7
|
<label v-for="option in options" :key="option.value" class="bk-radio">
|
|
8
8
|
<input
|
|
9
9
|
v-model="value"
|
|
@@ -27,7 +27,8 @@ defineProps({
|
|
|
27
27
|
options: { type: Array, required: true },
|
|
28
28
|
required: { type: Boolean, required: false },
|
|
29
29
|
disabled: { type: Boolean, required: false },
|
|
30
|
-
description: { type: String, required: false }
|
|
30
|
+
description: { type: String, required: false },
|
|
31
|
+
inline: { type: Boolean, required: false }
|
|
31
32
|
});
|
|
32
33
|
const value = defineModel({ type: String });
|
|
33
34
|
</script>
|
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
<script setup>
|
|
9
9
|
import { computed, useBlokkli } from "#imports";
|
|
10
10
|
import { Icon } from "#blokkli/editor/components";
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
fragmentBlockBundle,
|
|
13
|
+
fromLibraryBlockBundle
|
|
14
|
+
} from "#blokkli-build/config";
|
|
12
15
|
const props = defineProps({
|
|
13
16
|
bundle: { type: String, required: false },
|
|
14
17
|
icon: { type: null, required: false }
|
|
@@ -26,7 +29,12 @@ const iconName = computed(() => {
|
|
|
26
29
|
return name;
|
|
27
30
|
}
|
|
28
31
|
}
|
|
29
|
-
|
|
32
|
+
if (props.icon) {
|
|
33
|
+
return props.icon;
|
|
34
|
+
} else if (props.bundle === fragmentBlockBundle) {
|
|
35
|
+
return "bk_mdi_newspaper";
|
|
36
|
+
}
|
|
37
|
+
return "bk_mdi_question_mark";
|
|
30
38
|
});
|
|
31
39
|
</script>
|
|
32
40
|
|
|
@@ -1,19 +1,29 @@
|
|
|
1
1
|
import type { BlokkliIcon } from '#blokkli-build/icons';
|
|
2
2
|
export type NestedEditorOverlayProps = {
|
|
3
|
-
url
|
|
3
|
+
url?: string;
|
|
4
4
|
uuid: string;
|
|
5
5
|
title: string;
|
|
6
|
-
theme: 'lime' | 'red';
|
|
6
|
+
theme: 'lime' | 'red' | 'accent';
|
|
7
7
|
icon: BlokkliIcon;
|
|
8
8
|
blockUuid?: string;
|
|
9
9
|
element?: HTMLElement | null;
|
|
10
10
|
};
|
|
11
|
-
declare
|
|
11
|
+
declare var __VLS_38: {};
|
|
12
|
+
type __VLS_Slots = {} & {
|
|
13
|
+
default?: (props: typeof __VLS_38) => any;
|
|
14
|
+
};
|
|
15
|
+
declare const __VLS_base: import("vue").DefineComponent<NestedEditorOverlayProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
16
|
close: (...args: any[]) => void;
|
|
13
17
|
submit: (...args: any[]) => void;
|
|
14
18
|
}, string, import("vue").PublicProps, Readonly<NestedEditorOverlayProps> & Readonly<{
|
|
15
19
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
16
20
|
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
17
21
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
23
|
declare const _default: typeof __VLS_export;
|
|
19
24
|
export default _default;
|
|
25
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -34,12 +34,17 @@
|
|
|
34
34
|
class="bk bk-library-edit-overlay"
|
|
35
35
|
:class="'bk-is-' + theme"
|
|
36
36
|
>
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
<div class="bk-library-edit-overlay-frame">
|
|
38
|
+
<slot>
|
|
39
|
+
<iframe
|
|
40
|
+
v-if="url"
|
|
41
|
+
ref="iframe"
|
|
42
|
+
:src="url"
|
|
43
|
+
style="width: 100%; height: 100%"
|
|
44
|
+
@load="onLoad"
|
|
45
|
+
/>
|
|
46
|
+
</slot>
|
|
47
|
+
</div>
|
|
43
48
|
</div>
|
|
44
49
|
</Transition>
|
|
45
50
|
</Teleport>
|
|
@@ -57,7 +62,7 @@ import {
|
|
|
57
62
|
import { Icon } from "#blokkli/editor/components";
|
|
58
63
|
import { onBroadcastEvent } from "#blokkli/editor/composables";
|
|
59
64
|
const props = defineProps({
|
|
60
|
-
url: { type: String, required:
|
|
65
|
+
url: { type: String, required: false },
|
|
61
66
|
uuid: { type: String, required: true },
|
|
62
67
|
title: { type: String, required: true },
|
|
63
68
|
theme: { type: String, required: true },
|
|
@@ -241,6 +246,9 @@ function onEditorLoaded({ uuid }) {
|
|
|
241
246
|
onMounted(() => {
|
|
242
247
|
isLoaded.value = true;
|
|
243
248
|
ui.setNestedEditor(props.uuid);
|
|
249
|
+
if (!props.url) {
|
|
250
|
+
isLoaded.value = true;
|
|
251
|
+
}
|
|
244
252
|
});
|
|
245
253
|
onBeforeUnmount(() => {
|
|
246
254
|
ui.setNestedEditor(null);
|
|
@@ -1,19 +1,29 @@
|
|
|
1
1
|
import type { BlokkliIcon } from '#blokkli-build/icons';
|
|
2
2
|
export type NestedEditorOverlayProps = {
|
|
3
|
-
url
|
|
3
|
+
url?: string;
|
|
4
4
|
uuid: string;
|
|
5
5
|
title: string;
|
|
6
|
-
theme: 'lime' | 'red';
|
|
6
|
+
theme: 'lime' | 'red' | 'accent';
|
|
7
7
|
icon: BlokkliIcon;
|
|
8
8
|
blockUuid?: string;
|
|
9
9
|
element?: HTMLElement | null;
|
|
10
10
|
};
|
|
11
|
-
declare
|
|
11
|
+
declare var __VLS_38: {};
|
|
12
|
+
type __VLS_Slots = {} & {
|
|
13
|
+
default?: (props: typeof __VLS_38) => any;
|
|
14
|
+
};
|
|
15
|
+
declare const __VLS_base: import("vue").DefineComponent<NestedEditorOverlayProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
16
|
close: (...args: any[]) => void;
|
|
13
17
|
submit: (...args: any[]) => void;
|
|
14
18
|
}, string, import("vue").PublicProps, Readonly<NestedEditorOverlayProps> & Readonly<{
|
|
15
19
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
16
20
|
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
17
21
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
23
|
declare const _default: typeof __VLS_export;
|
|
19
24
|
export default _default;
|
|
25
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import '#blokkli-build/styles.css';
|
|
2
|
+
import type { ValidProviderTypes } from '#blokkli-build/generated-types';
|
|
2
3
|
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
4
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
4
5
|
entity?: T;
|
|
@@ -6,6 +7,7 @@ declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_se
|
|
|
6
7
|
entityUuid: string;
|
|
7
8
|
entityBundle: string;
|
|
8
9
|
language: string;
|
|
10
|
+
providerType: ValidProviderTypes;
|
|
9
11
|
}> & (typeof globalThis extends {
|
|
10
12
|
__VLS_PROPS_FALLBACK: infer P;
|
|
11
13
|
} ? P : {});
|
|
@@ -31,7 +31,8 @@ const props = defineProps({
|
|
|
31
31
|
entityType: { type: String, required: true },
|
|
32
32
|
entityUuid: { type: String, required: true },
|
|
33
33
|
entityBundle: { type: String, required: true },
|
|
34
|
-
language: { type: String, required: true }
|
|
34
|
+
language: { type: String, required: true },
|
|
35
|
+
providerType: { type: null, required: true }
|
|
35
36
|
});
|
|
36
37
|
defineSlots();
|
|
37
38
|
const context = computed(() => {
|
|
@@ -45,7 +46,7 @@ const context = computed(() => {
|
|
|
45
46
|
const adapter = await getAdapter(context);
|
|
46
47
|
const router = useRouter();
|
|
47
48
|
const broadcast = broadcastProvider();
|
|
48
|
-
const definitions = definitionProvider();
|
|
49
|
+
const definitions = definitionProvider(props.providerType);
|
|
49
50
|
let timeout = null;
|
|
50
51
|
let lastChanged = 0;
|
|
51
52
|
const mutatedFieldsMap = reactive({});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import '#blokkli-build/styles.css';
|
|
2
|
+
import type { ValidProviderTypes } from '#blokkli-build/generated-types';
|
|
2
3
|
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
4
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
4
5
|
entity?: T;
|
|
@@ -6,6 +7,7 @@ declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_se
|
|
|
6
7
|
entityUuid: string;
|
|
7
8
|
entityBundle: string;
|
|
8
9
|
language: string;
|
|
10
|
+
providerType: ValidProviderTypes;
|
|
9
11
|
}> & (typeof globalThis extends {
|
|
10
12
|
__VLS_PROPS_FALLBACK: infer P;
|
|
11
13
|
} ? P : {});
|
|
@@ -53,7 +53,7 @@ if (!props.viewOnly) {
|
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
onBlokkliEvent("keyPressed", (e) => {
|
|
56
|
-
if (ui.hasDialogOpen.value) {
|
|
56
|
+
if (ui.hasDialogOpen.value || ui.hasNestedEditorOpen.value) {
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
59
59
|
const checkKey = [e.meta, e.shift, e.code.toLowerCase()].join("-");
|
|
@@ -7,6 +7,8 @@ import BlockPreviewRenderer from './BlockPreviewRenderer/index.vue.js';
|
|
|
7
7
|
import BlokkliTransition from './Transition/index.vue.js';
|
|
8
8
|
import BundleSelector from './BundleSelector/index.vue.js';
|
|
9
9
|
import ConfigForm from './PluginConfigForm/index.vue.js';
|
|
10
|
+
import Dropdown from './Dropdown/index.vue.js';
|
|
11
|
+
import DropdownItem from './DropdownItem/index.vue.js';
|
|
10
12
|
import DialogModal from './Dialog/index.vue.js';
|
|
11
13
|
import DiffValue from './DiffViewer/DiffValue.vue.js';
|
|
12
14
|
import DiffViewerState from './DiffViewer/State.vue.js';
|
|
@@ -41,4 +43,4 @@ import Sortli from './Sortli/index.vue.js';
|
|
|
41
43
|
import StatusIcon from './StatusIcon/index.vue.js';
|
|
42
44
|
import TransitionHeight from './Transition/Height.vue.js';
|
|
43
45
|
import ViewportBlockingRect from './ViewportBlockingRect/index.vue.js';
|
|
44
|
-
export { AddListItem, ArtboardTooltip, AutoHeight, Banner, BlockPreviewItem, BlockPreviewRenderer, BlokkliTransition, BundleSelector, ConfigForm, DialogModal, DiffValue, DiffViewerState, ErrorBoundary, FlexTextarea, FormCheckboxes, FormDatepicker, FormGroup, FormItem, FormOverlay, FormRadio, FormRadioTabs, FormSelect, FormText, FormTextarea, FormToggle, Highlight, Icon, InfoBox, ItemIcon, ItemIconBox, Loading, NestedEditorOverlay, Pagination, RelativeTime, Resizable, ScaleToFit, ScheduleDate, ScrollBoundary, ShortcutIndicator, Sortli, StatusIcon, TransitionHeight, ViewportBlockingRect, };
|
|
46
|
+
export { AddListItem, ArtboardTooltip, AutoHeight, Banner, BlockPreviewItem, BlockPreviewRenderer, BlokkliTransition, BundleSelector, ConfigForm, Dropdown, DropdownItem, DialogModal, DiffValue, DiffViewerState, ErrorBoundary, FlexTextarea, FormCheckboxes, FormDatepicker, FormGroup, FormItem, FormOverlay, FormRadio, FormRadioTabs, FormSelect, FormText, FormTextarea, FormToggle, Highlight, Icon, InfoBox, ItemIcon, ItemIconBox, Loading, NestedEditorOverlay, Pagination, RelativeTime, Resizable, ScaleToFit, ScheduleDate, ScrollBoundary, ShortcutIndicator, Sortli, StatusIcon, TransitionHeight, ViewportBlockingRect, };
|
|
@@ -7,6 +7,8 @@ import BlockPreviewRenderer from "./BlockPreviewRenderer/index.vue";
|
|
|
7
7
|
import BlokkliTransition from "./Transition/index.vue";
|
|
8
8
|
import BundleSelector from "./BundleSelector/index.vue";
|
|
9
9
|
import ConfigForm from "./PluginConfigForm/index.vue";
|
|
10
|
+
import Dropdown from "./Dropdown/index.vue";
|
|
11
|
+
import DropdownItem from "./DropdownItem/index.vue";
|
|
10
12
|
import DialogModal from "./Dialog/index.vue";
|
|
11
13
|
import DiffValue from "./DiffViewer/DiffValue.vue";
|
|
12
14
|
import DiffViewerState from "./DiffViewer/State.vue";
|
|
@@ -51,6 +53,8 @@ export {
|
|
|
51
53
|
BlokkliTransition,
|
|
52
54
|
BundleSelector,
|
|
53
55
|
ConfigForm,
|
|
56
|
+
Dropdown,
|
|
57
|
+
DropdownItem,
|
|
54
58
|
DialogModal,
|
|
55
59
|
DiffValue,
|
|
56
60
|
DiffViewerState,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { useBlokkli } from "#imports";
|
|
2
|
-
import { FIELD_MAPPING } from "#blokkli-build/runtime-options";
|
|
3
2
|
import { itemEntityType } from "#blokkli-build/config";
|
|
4
3
|
const NOOP_OVERRIDE = {
|
|
5
4
|
element: null,
|
|
@@ -32,7 +31,7 @@ export function useEditableFieldOverride(fieldName, host) {
|
|
|
32
31
|
const isComponent = !!editableData?.isComponent;
|
|
33
32
|
function findMatchingProp(mapping) {
|
|
34
33
|
return Object.entries(mapping).find(
|
|
35
|
-
([_prop,
|
|
34
|
+
([_prop, propMapping]) => propMapping?.name === fieldName && propMapping.type === "editable"
|
|
36
35
|
)?.[0] ?? null;
|
|
37
36
|
}
|
|
38
37
|
const providerDefinition = definitions.getProviderDefinition(
|
|
@@ -41,9 +40,9 @@ export function useEditableFieldOverride(fieldName, host) {
|
|
|
41
40
|
);
|
|
42
41
|
let matchingProp = null;
|
|
43
42
|
if (host.type === itemEntityType) {
|
|
44
|
-
const
|
|
45
|
-
if (
|
|
46
|
-
matchingProp = findMatchingProp(
|
|
43
|
+
const defintion = definitions.getBlockDefinition(host.bundle, "default");
|
|
44
|
+
if (defintion?.propsFieldMapping) {
|
|
45
|
+
matchingProp = findMatchingProp(defintion.propsFieldMapping);
|
|
47
46
|
}
|
|
48
47
|
} else if (providerDefinition) {
|
|
49
48
|
const mapping = providerDefinition.propsFieldMapping;
|