@blokkli/editor 2.0.0-alpha.59 → 2.0.0-alpha.60
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 +28 -11
- package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.d.vue.ts +29 -0
- package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.vue +172 -0
- package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.vue.d.ts +29 -0
- package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/index.d.ts +19 -0
- package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/index.js +80 -0
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/Component.vue +16 -0
- package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.js +1 -1
- package/dist/modules/agent/runtime/app/tools/get_content_fields/index.js +12 -9
- package/dist/modules/agent/runtime/app/tools/get_page_text/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/get_page_text/index.js +65 -0
- package/dist/modules/agent/runtime/app/tools/get_referenced_entities/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/get_referenced_entities/index.js +62 -0
- package/dist/modules/agent/runtime/app/tools/helpers.d.ts +8 -2
- package/dist/modules/agent/runtime/app/tools/helpers.js +9 -9
- package/dist/modules/agent/runtime/app/tools/schemas.d.ts +12 -0
- package/dist/modules/agent/runtime/app/tools/schemas.js +20 -0
- package/dist/modules/agent/runtime/app/tools/search_media/index.js +1 -1
- package/dist/modules/agent/runtime/app/tools/select_media/Component.vue +1 -1
- package/dist/modules/agent/runtime/server/agent.js +0 -1
- package/dist/modules/agent/runtime/server/classes/Session/index.js +4 -0
- package/dist/modules/agent/runtime/shared/toolResult.d.ts +4 -0
- package/dist/modules/agent/runtime/shared/toolResult.js +5 -0
- package/dist/modules/drupal/graphql/features/notifications.graphql +39 -0
- package/dist/modules/drupal/index.mjs +6 -1
- package/dist/modules/drupal/runtime/adapter/index.js +38 -0
- package/dist/runtime/editor/components/Actions/ItemDropdown/Item.vue +0 -1
- package/dist/runtime/editor/components/Actions/ScrollArrow/index.d.vue.ts +13 -0
- package/dist/runtime/editor/components/Actions/ScrollArrow/index.vue +52 -0
- package/dist/runtime/editor/components/Actions/ScrollArrow/index.vue.d.ts +13 -0
- package/dist/runtime/editor/components/Actions/Title/index.vue +2 -2
- package/dist/runtime/editor/components/Actions/index.vue +47 -7
- package/dist/runtime/editor/components/Actions/useToolbarScroll.d.ts +25 -0
- package/dist/runtime/editor/components/Actions/useToolbarScroll.js +125 -0
- package/dist/runtime/editor/components/AddListItem/index.vue +0 -2
- package/dist/runtime/editor/components/AppMenu/MenuButton.vue +1 -3
- package/dist/runtime/editor/components/ArtboardTooltip/index.vue +4 -1
- package/dist/runtime/editor/components/Avatar/index.vue +0 -1
- package/dist/runtime/editor/components/BlockPreviewRenderer/index.d.vue.ts +1 -1
- package/dist/runtime/editor/components/BlockPreviewRenderer/index.vue.d.ts +1 -1
- package/dist/runtime/editor/components/BundleSelector/index.vue +0 -4
- package/dist/runtime/editor/components/Dialog/index.d.vue.ts +2 -2
- package/dist/runtime/editor/components/Dialog/index.vue +1 -3
- package/dist/runtime/editor/components/Dialog/index.vue.d.ts +2 -2
- package/dist/runtime/editor/components/DiffApproval/Highlight/Item.d.vue.ts +8 -0
- package/dist/runtime/editor/components/DiffApproval/Highlight/Item.vue +12 -2
- package/dist/runtime/editor/components/DiffApproval/Highlight/Item.vue.d.ts +8 -0
- package/dist/runtime/editor/components/DiffApproval/Highlight/index.d.vue.ts +8 -0
- package/dist/runtime/editor/components/DiffApproval/Highlight/index.vue +14 -2
- package/dist/runtime/editor/components/DiffApproval/Highlight/index.vue.d.ts +8 -0
- package/dist/runtime/editor/components/DiffApproval/Toolbar/index.d.vue.ts +2 -2
- package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue +0 -2
- package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue.d.ts +2 -2
- package/dist/runtime/editor/components/DiffApproval/index.vue +1 -0
- package/dist/runtime/editor/components/Form/Datepicker/index.vue +0 -1
- package/dist/runtime/editor/components/Form/TextDark/index.vue +0 -1
- package/dist/runtime/editor/components/Form/Textarea/index.vue +0 -1
- package/dist/runtime/editor/components/Form/Toggle/index.d.vue.ts +1 -0
- package/dist/runtime/editor/components/Form/Toggle/index.vue +9 -2
- package/dist/runtime/editor/components/Form/Toggle/index.vue.d.ts +1 -0
- package/dist/runtime/editor/components/FormOverlay/index.vue +0 -1
- package/dist/runtime/editor/components/Icon/index.vue +0 -2
- package/dist/runtime/editor/components/Messages/Item/index.vue +4 -1
- package/dist/runtime/editor/components/Messages/index.vue +3 -0
- package/dist/runtime/editor/components/Panel/Sheet/index.vue +1 -1
- package/dist/runtime/editor/components/Popup/index.vue +0 -2
- package/dist/runtime/editor/components/RichText/Editor/index.d.vue.ts +1 -1
- package/dist/runtime/editor/components/RichText/Editor/index.vue.d.ts +1 -1
- package/dist/runtime/editor/components/ScheduleDate/index.vue +1 -3
- package/dist/runtime/editor/components/SearchOverlay/index.d.vue.ts +1 -1
- package/dist/runtime/editor/components/SearchOverlay/index.vue.d.ts +1 -1
- package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.d.vue.ts +3 -0
- package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.vue +74 -0
- package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.vue.d.ts +3 -0
- package/dist/runtime/editor/components/Toolbar/ViewOptions/List/index.d.vue.ts +7 -0
- package/dist/runtime/editor/components/Toolbar/ViewOptions/List/index.vue +16 -0
- package/dist/runtime/editor/components/Toolbar/ViewOptions/List/index.vue.d.ts +7 -0
- package/dist/runtime/editor/components/Toolbar/ViewOptions/index.d.vue.ts +3 -0
- package/dist/runtime/editor/components/Toolbar/ViewOptions/index.vue +57 -0
- package/dist/runtime/editor/components/Toolbar/ViewOptions/index.vue.d.ts +3 -0
- package/dist/runtime/editor/components/Toolbar/index.vue +3 -56
- package/dist/runtime/editor/components/ToolbarDropdown/index.d.vue.ts +21 -0
- package/dist/runtime/editor/components/ToolbarDropdown/index.vue +36 -0
- package/dist/runtime/editor/components/ToolbarDropdown/index.vue.d.ts +21 -0
- package/dist/runtime/editor/components/Tooltip/Context.vue +3 -1
- package/dist/runtime/editor/components/Tooltip/index.d.vue.ts +1 -1
- package/dist/runtime/editor/components/Tooltip/index.vue +4 -1
- package/dist/runtime/editor/components/Tooltip/index.vue.d.ts +1 -1
- package/dist/runtime/editor/components/index.d.ts +1 -0
- package/dist/runtime/editor/components/index.js +1 -0
- package/dist/runtime/editor/composables/defineViewOption.d.ts +5 -0
- package/dist/runtime/editor/composables/defineViewOption.js +10 -0
- package/dist/runtime/editor/composables/index.d.ts +3 -0
- package/dist/runtime/editor/composables/index.js +2 -0
- package/dist/runtime/editor/composables/useDismiss.d.ts +30 -0
- package/dist/runtime/editor/composables/useDismiss.js +43 -0
- package/dist/runtime/editor/composables/useGlobalBlokkliObject.d.ts +3 -3
- package/dist/runtime/editor/css/output.css +1 -1
- package/dist/runtime/editor/events/index.d.ts +23 -0
- package/dist/runtime/editor/features/add-list/Actions/index.vue +0 -1
- package/dist/runtime/editor/features/add-list/Blocks/index.vue +0 -1
- package/dist/runtime/editor/features/add-list/Help/Item.vue +2 -7
- package/dist/runtime/editor/features/add-list/Help/index.vue +1 -1
- package/dist/runtime/editor/features/add-list/index.vue +0 -2
- package/dist/runtime/editor/features/anchors/index.vue +11 -11
- package/dist/runtime/editor/features/anchors/types.d.ts +1 -0
- package/dist/runtime/editor/features/anchors/types.js +1 -0
- package/dist/runtime/editor/features/artboard/Renderer.vue +30 -28
- package/dist/runtime/editor/features/block-scheduler/Dialog/ScheduleSection.vue +0 -3
- package/dist/runtime/editor/features/block-scheduler/index.vue +0 -1
- package/dist/runtime/editor/features/block-transfer/SummaryDialog/index.vue +0 -4
- package/dist/runtime/editor/features/breadcrumbs/Crumb/index.vue +0 -5
- package/dist/runtime/editor/features/changelog/changelog.json +8 -0
- package/dist/runtime/editor/features/command-palette/Palette/Item/index.vue +0 -3
- package/dist/runtime/editor/features/command-palette/Palette/index.vue +0 -1
- package/dist/runtime/editor/features/comments/AddForm/index.vue +0 -1
- package/dist/runtime/editor/features/comments/Comment/Actions/index.vue +0 -4
- package/dist/runtime/editor/features/comments/Comment/index.d.vue.ts +14 -0
- package/dist/runtime/editor/features/comments/Comment/index.vue +29 -8
- package/dist/runtime/editor/features/comments/Comment/index.vue.d.ts +14 -0
- package/dist/runtime/editor/features/comments/CommentInput/index.d.vue.ts +1 -1
- package/dist/runtime/editor/features/comments/CommentInput/index.vue +0 -3
- package/dist/runtime/editor/features/comments/CommentInput/index.vue.d.ts +1 -1
- package/dist/runtime/editor/features/comments/Sidebar/AddForm/index.vue +0 -1
- package/dist/runtime/editor/features/comments/Sidebar/index.d.vue.ts +16 -0
- package/dist/runtime/editor/features/comments/Sidebar/index.vue +13 -8
- package/dist/runtime/editor/features/comments/Sidebar/index.vue.d.ts +16 -0
- package/dist/runtime/editor/features/comments/Thread/ReplyForm/index.vue +0 -1
- package/dist/runtime/editor/features/comments/Thread/index.d.vue.ts +16 -0
- package/dist/runtime/editor/features/comments/Thread/index.vue +26 -6
- package/dist/runtime/editor/features/comments/Thread/index.vue.d.ts +16 -0
- package/dist/runtime/editor/features/comments/index.vue +28 -3
- package/dist/runtime/editor/features/delete/types.d.ts +1 -0
- package/dist/runtime/editor/features/delete/types.js +1 -0
- package/dist/runtime/editor/features/dev-mode/index.vue +17 -15
- package/dist/runtime/editor/features/dragging-overlay/DragItems/index.vue +1 -0
- package/dist/runtime/editor/features/duplicate/types.d.ts +1 -0
- package/dist/runtime/editor/features/duplicate/types.js +1 -0
- package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.vue +0 -2
- package/dist/runtime/editor/features/editable-field/Overlay/Plaintext/index.vue +0 -1
- package/dist/runtime/editor/features/editable-field/Overlay/ReadabilityIndicator/index.vue +0 -5
- package/dist/runtime/editor/features/editable-field/Overlay/index.vue +0 -5
- package/dist/runtime/editor/features/editable-mask/index.vue +21 -20
- package/dist/runtime/editor/features/entity-title/index.vue +0 -4
- package/dist/runtime/editor/features/fragments/Dialog/index.vue +0 -4
- package/dist/runtime/editor/features/grid/index.vue +16 -15
- package/dist/runtime/editor/features/grid/types.d.ts +1 -0
- package/dist/runtime/editor/features/grid/types.js +1 -0
- package/dist/runtime/editor/features/help/Dialog/index.d.vue.ts +7 -0
- package/dist/runtime/editor/features/help/Dialog/index.vue +57 -0
- package/dist/runtime/editor/features/help/Dialog/index.vue.d.ts +7 -0
- package/dist/runtime/editor/features/help/index.vue +52 -47
- package/dist/runtime/editor/features/history/List/index.vue +2 -9
- package/dist/runtime/editor/features/history/types.d.ts +1 -0
- package/dist/runtime/editor/features/history/types.js +1 -0
- package/dist/runtime/editor/features/notifications/Item/index.d.vue.ts +4 -0
- package/dist/runtime/editor/features/notifications/Item/index.vue +96 -0
- package/dist/runtime/editor/features/notifications/Item/index.vue.d.ts +4 -0
- package/dist/runtime/editor/features/notifications/List/index.d.vue.ts +11 -0
- package/dist/runtime/editor/features/notifications/List/index.vue +126 -0
- package/dist/runtime/editor/features/notifications/List/index.vue.d.ts +11 -0
- package/dist/runtime/editor/features/notifications/docs.md +12 -0
- package/dist/runtime/editor/features/notifications/index.d.vue.ts +3 -0
- package/dist/runtime/editor/features/notifications/index.vue +123 -0
- package/dist/runtime/editor/features/notifications/index.vue.d.ts +3 -0
- package/dist/runtime/editor/features/notifications/types.d.ts +132 -0
- package/dist/runtime/editor/features/notifications/types.js +20 -0
- package/dist/runtime/editor/features/options/Form/Checkbox/index.vue +6 -2
- package/dist/runtime/editor/features/options/Form/Checkboxes/index.vue +14 -4
- package/dist/runtime/editor/features/options/Form/Color/index.vue +1 -1
- package/dist/runtime/editor/features/options/Form/ComplexType/index.vue +0 -1
- package/dist/runtime/editor/features/options/Form/DateTimeLocal/index.vue +0 -1
- package/dist/runtime/editor/features/options/Form/Group.vue +3 -1
- package/dist/runtime/editor/features/options/Form/Item.vue +1 -2
- package/dist/runtime/editor/features/options/Form/Number/index.vue +9 -3
- package/dist/runtime/editor/features/options/Form/Radios/index.vue +3 -2
- package/dist/runtime/editor/features/options/Form/Range/index.vue +8 -2
- package/dist/runtime/editor/features/options/Form/Text/index.vue +6 -2
- package/dist/runtime/editor/features/options/index.vue +7 -1
- package/dist/runtime/editor/features/ownership/Banner/index.vue +3 -1
- package/dist/runtime/editor/features/ownership/types.d.ts +1 -0
- package/dist/runtime/editor/features/ownership/types.js +1 -0
- package/dist/runtime/editor/features/preview-grant/types.d.ts +1 -0
- package/dist/runtime/editor/features/preview-grant/types.js +1 -0
- package/dist/runtime/editor/features/proxy-view/index.vue +24 -21
- package/dist/runtime/editor/features/publish/Dialog/PublishOption.vue +0 -2
- package/dist/runtime/editor/features/publish/Dialog/index.vue +1 -2
- package/dist/runtime/editor/features/responsive-preview/Frame/index.vue +0 -1
- package/dist/runtime/editor/features/revert/types.d.ts +1 -0
- package/dist/runtime/editor/features/revert/types.js +1 -0
- package/dist/runtime/editor/features/settings/Dialog/FeatureSetting/index.vue +18 -8
- package/dist/runtime/editor/features/swap/types.d.ts +1 -0
- package/dist/runtime/editor/features/swap/types.js +1 -0
- package/dist/runtime/editor/features/translations/Banner/index.vue +4 -1
- package/dist/runtime/editor/features/translations/CsvDialog/Import/index.vue +4 -1
- package/dist/runtime/editor/features/translations/TranslateDialog/index.vue +7 -2
- package/dist/runtime/editor/plugins/BlockIndicator/index.vue +0 -2
- package/dist/runtime/editor/plugins/ContextMenu/Menu/index.vue +4 -36
- package/dist/runtime/editor/plugins/ItemAction/index.vue +0 -1
- package/dist/runtime/editor/plugins/Sidebar/index.vue +7 -50
- package/dist/runtime/editor/plugins/ToolbarButton/index.d.vue.ts +8 -2
- package/dist/runtime/editor/plugins/ToolbarButton/index.vue +122 -28
- package/dist/runtime/editor/plugins/ToolbarButton/index.vue.d.ts +8 -2
- package/dist/runtime/editor/plugins/index.d.ts +1 -2
- package/dist/runtime/editor/plugins/index.js +1 -3
- package/dist/runtime/editor/providers/fieldValue.js +11 -13
- package/dist/runtime/editor/providers/plugin.d.ts +12 -0
- package/dist/runtime/editor/providers/plugin.js +9 -0
- package/dist/runtime/editor/translations/de.json +51 -19
- package/dist/runtime/editor/translations/fr.json +16 -4
- package/dist/runtime/editor/translations/gsw_CH.json +44 -19
- package/dist/runtime/editor/translations/it.json +16 -4
- package/package.json +4 -5
- package/dist/runtime/editor/plugins/ViewOption/index.d.vue.ts +0 -139
- package/dist/runtime/editor/plugins/ViewOption/index.vue +0 -99
- package/dist/runtime/editor/plugins/ViewOption/index.vue.d.ts +0 -139
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
<button
|
|
3
3
|
:id="'bk-menu-list-button-' + id"
|
|
4
4
|
class="_bk_w-full _bk_text-left _bk_whitespace-nowrap _bk_text-mono-950 _bk_group"
|
|
5
|
-
:data-test="'app-menu-button-' + id"
|
|
6
|
-
:data-test-type="type"
|
|
7
5
|
:disabled
|
|
8
6
|
:class="[
|
|
9
7
|
{
|
|
@@ -26,7 +24,7 @@
|
|
|
26
24
|
}"
|
|
27
25
|
>
|
|
28
26
|
<div
|
|
29
|
-
class="_bk_flex _bk_items-center _bk_justify-center _bk_border _bk_bg-scheme-light _bk_text-scheme-
|
|
27
|
+
class="_bk_flex _bk_items-center _bk_justify-center _bk_border _bk_bg-scheme-light _bk_text-scheme-dark _bk_border-scheme-normal/50 _bk_group-hover:border-scheme-normal _bk_group-hover:text-scheme-dark _bk_rounded"
|
|
30
28
|
:class="{
|
|
31
29
|
'_bk_size-25': small,
|
|
32
30
|
'_bk_size-50': !small
|
|
@@ -16,7 +16,10 @@
|
|
|
16
16
|
<div class="bk-artboard-tooltip-header">
|
|
17
17
|
<div class="_bk_mr-auto" v-html="title" />
|
|
18
18
|
<slot name="header" />
|
|
19
|
-
<button
|
|
19
|
+
<button
|
|
20
|
+
:disabled="closeDisabled"
|
|
21
|
+
@click="$emit('close')"
|
|
22
|
+
>
|
|
20
23
|
<Icon :name="closeIcon" />
|
|
21
24
|
<span v-if="buttonLabel">{{ buttonLabel }}</span>
|
|
22
25
|
</button>
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
<div
|
|
3
3
|
v-if="deleted"
|
|
4
4
|
class="bk-avatar-deleted _bk_shrink-0 _bk_rounded _bk_flex _bk_items-center _bk_justify-center _bk_size-(--bk-avatar-size) _bk_border _bk_border-mono-300 _bk_bg-mono-100 _bk_text-mono-400 _bk_relative"
|
|
5
|
-
data-test="avatar-deleted"
|
|
6
5
|
:title="name"
|
|
7
6
|
>
|
|
8
7
|
<Icon name="ghost" />
|
|
@@ -4,8 +4,8 @@ type __VLS_Props = {
|
|
|
4
4
|
maxHeight?: number;
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
7
|
-
backgroundClass: string;
|
|
8
7
|
maxHeight: number;
|
|
8
|
+
backgroundClass: string;
|
|
9
9
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
declare const _default: typeof __VLS_export;
|
|
11
11
|
export default _default;
|
|
@@ -4,8 +4,8 @@ type __VLS_Props = {
|
|
|
4
4
|
maxHeight?: number;
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
7
|
-
backgroundClass: string;
|
|
8
7
|
maxHeight: number;
|
|
8
|
+
backgroundClass: string;
|
|
9
9
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
declare const _default: typeof __VLS_export;
|
|
11
11
|
export default _default;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
:anchor-el
|
|
6
6
|
:anchor-coordinates
|
|
7
7
|
class="bk-bundle-selector"
|
|
8
|
-
data-test="bundle-selector"
|
|
9
8
|
@close="$emit('close')"
|
|
10
9
|
>
|
|
11
10
|
<div
|
|
@@ -38,19 +37,16 @@
|
|
|
38
37
|
>
|
|
39
38
|
<ItemGroup
|
|
40
39
|
:items="filteredBlocks"
|
|
41
|
-
data-test="bundle-selector-blocks"
|
|
42
40
|
@select="onClick"
|
|
43
41
|
/>
|
|
44
42
|
<ItemGroup
|
|
45
43
|
:label="$t('actions', 'Actions')"
|
|
46
44
|
:items="filteredActions"
|
|
47
|
-
data-test="bundle-selector-actions"
|
|
48
45
|
@select="onClick"
|
|
49
46
|
/>
|
|
50
47
|
<ItemGroup
|
|
51
48
|
:label="$t('bundleSelectorFragmentsLabel', 'Fragments')"
|
|
52
49
|
:items="filteredFragments"
|
|
53
|
-
data-test="bundle-selector-fragments"
|
|
54
50
|
@select="onClick"
|
|
55
51
|
/>
|
|
56
52
|
</div>
|
|
@@ -41,9 +41,9 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
41
41
|
zIndex: "default" | "high";
|
|
42
42
|
icon: BlokkliIcon;
|
|
43
43
|
width: number | string;
|
|
44
|
-
canSubmit: boolean;
|
|
45
|
-
submitLabel: string;
|
|
46
44
|
lead: string;
|
|
45
|
+
submitLabel: string;
|
|
46
|
+
canSubmit: boolean;
|
|
47
47
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
48
48
|
tabs?: (props: {}) => any;
|
|
49
49
|
} & {
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
<div
|
|
3
3
|
ref="rootEl"
|
|
4
4
|
class="bk bk-dialog bk-control"
|
|
5
|
-
:data-test="'dialog-' + id"
|
|
6
5
|
:class="zIndex === 'high' ? '_bk_z-dialog-high' : '_bk_z-dialog'"
|
|
7
6
|
@wheel.passive.stop
|
|
8
7
|
@keydown.stop="handleKeyDown"
|
|
@@ -15,7 +14,7 @@
|
|
|
15
14
|
<div class="bk bk-overlay-header">
|
|
16
15
|
<Icon v-if="icon" :name="icon" />
|
|
17
16
|
<h3>{{ title }}</h3>
|
|
18
|
-
<button
|
|
17
|
+
<button @click="$emit('cancel')">
|
|
19
18
|
<Icon name="bk_mdi_close" />
|
|
20
19
|
</button>
|
|
21
20
|
</div>
|
|
@@ -52,7 +51,6 @@
|
|
|
52
51
|
<slot name="footer">
|
|
53
52
|
<button
|
|
54
53
|
class="bk-button"
|
|
55
|
-
data-test="dialog-submit"
|
|
56
54
|
:disabled="!canSubmit"
|
|
57
55
|
:class="[
|
|
58
56
|
{ 'bk-is-loading': isLoading },
|
|
@@ -41,9 +41,9 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
41
41
|
zIndex: "default" | "high";
|
|
42
42
|
icon: BlokkliIcon;
|
|
43
43
|
width: number | string;
|
|
44
|
-
canSubmit: boolean;
|
|
45
|
-
submitLabel: string;
|
|
46
44
|
lead: string;
|
|
45
|
+
submitLabel: string;
|
|
46
|
+
canSubmit: boolean;
|
|
47
47
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
48
48
|
tabs?: (props: {}) => any;
|
|
49
49
|
} & {
|
|
@@ -11,9 +11,17 @@ type __VLS_Props = {
|
|
|
11
11
|
*/
|
|
12
12
|
insertionsOnly?: boolean;
|
|
13
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* Restore the original Vue-managed nodes immediately, in preparation for the
|
|
16
|
+
* consumer's mutation. After this runs, Vue's reactive patch can write the
|
|
17
|
+
* new value into the live tracked nodes — and the post-mutation
|
|
18
|
+
* `onBeforeUnmount` restore is skipped so it doesn't clobber that value.
|
|
19
|
+
*/
|
|
20
|
+
declare function commitForApply(): void;
|
|
14
21
|
declare function updateRect(): void;
|
|
15
22
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
16
23
|
updateRect: typeof updateRect;
|
|
24
|
+
commitForApply: typeof commitForApply;
|
|
17
25
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
26
|
toggle: () => void;
|
|
19
27
|
activate: () => void;
|
|
@@ -83,7 +83,18 @@ watch(
|
|
|
83
83
|
() => props.selected,
|
|
84
84
|
() => applyOverride()
|
|
85
85
|
);
|
|
86
|
-
|
|
86
|
+
let committed = false;
|
|
87
|
+
function commitForApply() {
|
|
88
|
+
override.restore();
|
|
89
|
+
committed = true;
|
|
90
|
+
}
|
|
91
|
+
onBeforeUnmount(() => {
|
|
92
|
+
if (committed) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
override.restore();
|
|
96
|
+
});
|
|
97
|
+
defineExpose({ updateRect, commitForApply });
|
|
87
98
|
const rect = ref({ width: "0", height: "0", transform: "" });
|
|
88
99
|
function updateRect() {
|
|
89
100
|
const el = override.element;
|
|
@@ -111,5 +122,4 @@ onBlokkliEvent("animationFrame", (ctx) => {
|
|
|
111
122
|
lastFullUpdate = ctx.time;
|
|
112
123
|
updateRect();
|
|
113
124
|
});
|
|
114
|
-
defineExpose({ updateRect });
|
|
115
125
|
</script>
|
|
@@ -11,9 +11,17 @@ type __VLS_Props = {
|
|
|
11
11
|
*/
|
|
12
12
|
insertionsOnly?: boolean;
|
|
13
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* Restore the original Vue-managed nodes immediately, in preparation for the
|
|
16
|
+
* consumer's mutation. After this runs, Vue's reactive patch can write the
|
|
17
|
+
* new value into the live tracked nodes — and the post-mutation
|
|
18
|
+
* `onBeforeUnmount` restore is skipped so it doesn't clobber that value.
|
|
19
|
+
*/
|
|
20
|
+
declare function commitForApply(): void;
|
|
14
21
|
declare function updateRect(): void;
|
|
15
22
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
16
23
|
updateRect: typeof updateRect;
|
|
24
|
+
commitForApply: typeof commitForApply;
|
|
17
25
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
26
|
toggle: () => void;
|
|
19
27
|
activate: () => void;
|
|
@@ -5,12 +5,20 @@ type __VLS_Props = {
|
|
|
5
5
|
insertionsOnly?: boolean;
|
|
6
6
|
};
|
|
7
7
|
declare function updateRects(): void;
|
|
8
|
+
/**
|
|
9
|
+
* Reset each accepted item's editable to its original Vue-tracked DOM, then
|
|
10
|
+
* mark them committed so the post-mutation unmount-restore is a no-op. Called
|
|
11
|
+
* by DiffApproval BEFORE emitting `apply`, so the consumer's mutation patches
|
|
12
|
+
* onto the freshly-restored nodes instead of the throwaway diff markup.
|
|
13
|
+
*/
|
|
14
|
+
declare function commitSelected(): void;
|
|
8
15
|
type __VLS_ModelProps = {
|
|
9
16
|
modelValue?: number;
|
|
10
17
|
};
|
|
11
18
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
12
19
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
13
20
|
updateRects: typeof updateRects;
|
|
21
|
+
commitSelected: typeof commitSelected;
|
|
14
22
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
23
|
"update:modelValue": (value: number) => any;
|
|
16
24
|
} & {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<script setup>
|
|
25
25
|
import { computed, useTemplateRef, useBlokkli } from "#imports";
|
|
26
26
|
import Item from "./Item.vue";
|
|
27
|
-
defineProps({
|
|
27
|
+
const props = defineProps({
|
|
28
28
|
items: { type: Array, required: true },
|
|
29
29
|
selected: { type: Object, required: true },
|
|
30
30
|
insertionsOnly: { type: Boolean, required: false }
|
|
@@ -51,5 +51,17 @@ function updateRects() {
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
|
|
54
|
+
function commitSelected() {
|
|
55
|
+
if (!itemRefs.value) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
for (let i = 0; i < itemRefs.value.length; i++) {
|
|
59
|
+
const ref = itemRefs.value[i];
|
|
60
|
+
const item = props.items[i];
|
|
61
|
+
if (ref && item && props.selected[item.id]) {
|
|
62
|
+
ref.commitForApply();
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
defineExpose({ updateRects, commitSelected });
|
|
55
67
|
</script>
|
|
@@ -5,12 +5,20 @@ type __VLS_Props = {
|
|
|
5
5
|
insertionsOnly?: boolean;
|
|
6
6
|
};
|
|
7
7
|
declare function updateRects(): void;
|
|
8
|
+
/**
|
|
9
|
+
* Reset each accepted item's editable to its original Vue-tracked DOM, then
|
|
10
|
+
* mark them committed so the post-mutation unmount-restore is a no-op. Called
|
|
11
|
+
* by DiffApproval BEFORE emitting `apply`, so the consumer's mutation patches
|
|
12
|
+
* onto the freshly-restored nodes instead of the throwaway diff markup.
|
|
13
|
+
*/
|
|
14
|
+
declare function commitSelected(): void;
|
|
8
15
|
type __VLS_ModelProps = {
|
|
9
16
|
modelValue?: number;
|
|
10
17
|
};
|
|
11
18
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
12
19
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
13
20
|
updateRects: typeof updateRects;
|
|
21
|
+
commitSelected: typeof commitSelected;
|
|
14
22
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
23
|
"update:modelValue": (value: number) => any;
|
|
16
24
|
} & {
|
|
@@ -24,10 +24,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
24
24
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
25
25
|
onCancel?: (() => any) | undefined;
|
|
26
26
|
onApply?: (() => any) | undefined;
|
|
27
|
-
onPrev?: (() => any) | undefined;
|
|
28
|
-
onNext?: (() => any) | undefined;
|
|
29
27
|
"onUpdate:selected"?: ((id: number, value: boolean) => any) | undefined;
|
|
30
28
|
"onUpdate:reasons"?: ((id: number, value: string) => any) | undefined;
|
|
29
|
+
onPrev?: (() => any) | undefined;
|
|
30
|
+
onNext?: (() => any) | undefined;
|
|
31
31
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
32
32
|
declare const _default: typeof __VLS_export;
|
|
33
33
|
export default _default;
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
}}</span>
|
|
18
18
|
<button
|
|
19
19
|
class="_bk_hover:bg-mono-800 _bk_h-40 _bk_px-8 _bk_flex _bk_items-center _bk_gap-5 _bk_font-semibold"
|
|
20
|
-
data-test="diff-approval-cancel"
|
|
21
20
|
@click="$emit('cancel')"
|
|
22
21
|
>
|
|
23
22
|
<span>{{ $t("cancel", "Cancel") }}</span>
|
|
@@ -119,7 +118,6 @@
|
|
|
119
118
|
|
|
120
119
|
<button
|
|
121
120
|
class="bk-button bk-scheme-lime _bk_rounded-l-none! _bk_rounded-tr-none!"
|
|
122
|
-
data-test="diff-approval-apply"
|
|
123
121
|
@click="$emit('apply')"
|
|
124
122
|
>
|
|
125
123
|
<span>{{ applyLabel }}</span>
|
|
@@ -24,10 +24,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
24
24
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
25
25
|
onCancel?: (() => any) | undefined;
|
|
26
26
|
onApply?: (() => any) | undefined;
|
|
27
|
-
onPrev?: (() => any) | undefined;
|
|
28
|
-
onNext?: (() => any) | undefined;
|
|
29
27
|
"onUpdate:selected"?: ((id: number, value: boolean) => any) | undefined;
|
|
30
28
|
"onUpdate:reasons"?: ((id: number, value: string) => any) | undefined;
|
|
29
|
+
onPrev?: (() => any) | undefined;
|
|
30
|
+
onNext?: (() => any) | undefined;
|
|
31
31
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
32
32
|
declare const _default: typeof __VLS_export;
|
|
33
33
|
export default _default;
|
|
@@ -37,7 +37,6 @@
|
|
|
37
37
|
:key="day.key"
|
|
38
38
|
type="button"
|
|
39
39
|
class="_bk_flex _bk_items-center _bk_justify-center _bk_py-3 _bk_disabled:cursor-not-allowed _bk_group"
|
|
40
|
-
:data-test="'datepicker-day-' + day.dateString"
|
|
41
40
|
:disabled="disabled || day.isDisabled"
|
|
42
41
|
@click="selectDate(day)"
|
|
43
42
|
>
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
ref="inputEl"
|
|
12
12
|
v-model="value"
|
|
13
13
|
type="text"
|
|
14
|
-
data-test="text-input"
|
|
15
14
|
class="_bk_h-60 _bk_appearance-none _bk_w-full _bk_bg-transparent _bk_!outline-none _bk_!ring-0 _bk_pl-50 _bk_!border-none _bk_text-lg _bk_font-bold _bk_placeholder:font-normal _bk_placeholder:text-mono-500 _bk_text-mono-100 _bk_group-focus-within:outline! _bk_group-focus-within:outline-white _bk_-outline-offset-2"
|
|
16
15
|
:placeholder
|
|
17
16
|
:class="{
|
|
@@ -7,7 +7,13 @@
|
|
|
7
7
|
}"
|
|
8
8
|
>
|
|
9
9
|
<slot />
|
|
10
|
-
<input
|
|
10
|
+
<input
|
|
11
|
+
v-if="!hideInput"
|
|
12
|
+
v-model="value"
|
|
13
|
+
type="checkbox"
|
|
14
|
+
class="_bk_sr-only"
|
|
15
|
+
:disabled
|
|
16
|
+
/>
|
|
11
17
|
<div
|
|
12
18
|
class="bk-checkbox-toggle-toggle _bk_group-focus-within/toggle:outline _bk_outline-accent-950/80 _bk_outline-offset-2 _bk_relative _bk_w-[36px] _bk_h-20 _bk_rounded-full _bk_shrink-0 _bk_mr-5 _bk_last:mr-0"
|
|
13
19
|
:class="{
|
|
@@ -73,7 +79,8 @@ const props = defineProps({
|
|
|
73
79
|
disabled: { type: Boolean, required: false, default: false },
|
|
74
80
|
disabledReason: { type: [String, null], required: false, default: null },
|
|
75
81
|
colorScheme: { type: String, required: false, default: "light" },
|
|
76
|
-
stretch: { type: Boolean, required: false, default: false }
|
|
82
|
+
stretch: { type: Boolean, required: false, default: false },
|
|
83
|
+
hideInput: { type: Boolean, required: false }
|
|
77
84
|
});
|
|
78
85
|
const isDark = computed(() => props.colorScheme === "dark");
|
|
79
86
|
const value = defineModel({ type: Boolean });
|
|
@@ -3,14 +3,12 @@
|
|
|
3
3
|
v-if="markup"
|
|
4
4
|
class="bk-icon"
|
|
5
5
|
:class="'bk-icon-' + name"
|
|
6
|
-
:data-test="'icon-' + name"
|
|
7
6
|
v-html="markup"
|
|
8
7
|
/>
|
|
9
8
|
<div
|
|
10
9
|
v-else
|
|
11
10
|
class="bk-icon"
|
|
12
11
|
:class="'bk-icon-missing'"
|
|
13
|
-
:data-test="'icon-' + name"
|
|
14
12
|
>
|
|
15
13
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
16
14
|
<path
|
|
@@ -5,7 +5,10 @@
|
|
|
5
5
|
@mouseenter="stopTimer"
|
|
6
6
|
@mouseleave="startTimer"
|
|
7
7
|
>
|
|
8
|
-
<button
|
|
8
|
+
<button
|
|
9
|
+
class="bk-message-content"
|
|
10
|
+
@click="$emit('close')"
|
|
11
|
+
>
|
|
9
12
|
<p>{{ message }}</p>
|
|
10
13
|
<p v-if="additionalText" class="bk-message-additional">
|
|
11
14
|
{{ additionalText }}
|
|
@@ -6,13 +6,11 @@
|
|
|
6
6
|
:id="'popup-' + id"
|
|
7
7
|
class="bk bk-popup"
|
|
8
8
|
:class="['bk-is-' + position, 'bk-is-' + id]"
|
|
9
|
-
:data-test-popup="id"
|
|
10
9
|
>
|
|
11
10
|
<div class="bk-popup-title">
|
|
12
11
|
<h2>{{ title }}</h2>
|
|
13
12
|
<button
|
|
14
13
|
class="_bk_p-20 _bk_hover:bg-mono-50 _bk_text-mono-500"
|
|
15
|
-
:data-test-popup-close="id"
|
|
16
14
|
@click="onClose"
|
|
17
15
|
>
|
|
18
16
|
<Icon name="bk_mdi_close" class="_bk_size-20" />
|
|
@@ -25,7 +25,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
25
25
|
isEmpty: boolean;
|
|
26
26
|
}) => any) | undefined;
|
|
27
27
|
}>, {
|
|
28
|
-
initialValue: string;
|
|
29
28
|
autofocus: boolean;
|
|
29
|
+
initialValue: string;
|
|
30
30
|
getUsers: () => Promise<MentionItem[]>;
|
|
31
31
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -25,7 +25,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
25
25
|
isEmpty: boolean;
|
|
26
26
|
}) => any) | undefined;
|
|
27
27
|
}>, {
|
|
28
|
-
initialValue: string;
|
|
29
28
|
autofocus: boolean;
|
|
29
|
+
initialValue: string;
|
|
30
30
|
getUsers: () => Promise<MentionItem[]>;
|
|
31
31
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="_bk_flex-1 _bk_flex _bk_gap-20"
|
|
2
|
+
<div class="_bk_flex-1 _bk_flex _bk_gap-20">
|
|
3
3
|
<div class="_bk_w-[300px] _bk_shrink-0">
|
|
4
4
|
<FormDatepicker
|
|
5
5
|
v-model="selectedDate"
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
id="schedule-time"
|
|
21
21
|
v-model="selectedTime"
|
|
22
22
|
type="time"
|
|
23
|
-
data-test="schedule-time"
|
|
24
23
|
class="bk-form-input _bk_flex-1 _bk_w-full _bk_tabular-nums"
|
|
25
24
|
:disabled="disabled"
|
|
26
25
|
:class="{
|
|
@@ -51,7 +50,6 @@
|
|
|
51
50
|
class="_bk_mt-20"
|
|
52
51
|
color="red"
|
|
53
52
|
small
|
|
54
|
-
data-test="schedule-error"
|
|
55
53
|
/>
|
|
56
54
|
<slot />
|
|
57
55
|
</div>
|
|
@@ -30,8 +30,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
30
30
|
"onUpdate:text"?: ((value: string) => any) | undefined;
|
|
31
31
|
}>, {
|
|
32
32
|
placeholder: string;
|
|
33
|
-
visibleItems: number;
|
|
34
33
|
itemHeight: number;
|
|
34
|
+
visibleItems: number;
|
|
35
35
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
36
36
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
37
37
|
declare const _default: typeof __VLS_export;
|
|
@@ -30,8 +30,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
30
30
|
"onUpdate:text"?: ((value: string) => any) | undefined;
|
|
31
31
|
}>, {
|
|
32
32
|
placeholder: string;
|
|
33
|
-
visibleItems: number;
|
|
34
33
|
itemHeight: number;
|
|
34
|
+
visibleItems: number;
|
|
35
35
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
36
36
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
37
37
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<any, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, any, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<button
|
|
3
|
+
ref="buttonEl"
|
|
4
|
+
class="_bk_flex _bk_gap-8 _bk_whitespace-nowrap _bk_w-full _bk_px-10 _bk_text-mono-800 _bk_items-center _bk_hover:bg-mono-100 _bk_min-h-50 _bk_group/tooltip _bk_relative _bk_border-b _bk_border-b-mono-200 _bk_last:border-b-0 _bk_group/toggle"
|
|
5
|
+
:class="{ 'bk-is-inactive': !isActive }"
|
|
6
|
+
@click.prevent.stop="toggle"
|
|
7
|
+
>
|
|
8
|
+
<Icon v-if="icon" :name="icon" class="_bk_size-20" />
|
|
9
|
+
<div class="_bk_font-medium _bk_text-base">
|
|
10
|
+
{{ label }}
|
|
11
|
+
</div>
|
|
12
|
+
<div class="_bk_ml-auto">
|
|
13
|
+
<FormToggle :model-value="isActive" />
|
|
14
|
+
</div>
|
|
15
|
+
<Tooltip :label="description" placement="center-before">
|
|
16
|
+
<template v-if="keyCode" #shortcut>
|
|
17
|
+
<ShortcutIndicator meta :key-code :label group="ui" @pressed="toggle" />
|
|
18
|
+
</template>
|
|
19
|
+
</Tooltip>
|
|
20
|
+
</button>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script setup>
|
|
24
|
+
import { useBlokkli, useTemplateRef, watch } from "#imports";
|
|
25
|
+
import {
|
|
26
|
+
Icon,
|
|
27
|
+
ShortcutIndicator,
|
|
28
|
+
Tooltip,
|
|
29
|
+
FormToggle
|
|
30
|
+
} from "#blokkli/editor/components";
|
|
31
|
+
import { defineCommands, defineTourItem } from "#blokkli/editor/composables";
|
|
32
|
+
const props = defineProps({
|
|
33
|
+
id: { type: String, required: true },
|
|
34
|
+
label: { type: String, required: true },
|
|
35
|
+
description: { type: String, required: true },
|
|
36
|
+
icon: { type: null, required: true },
|
|
37
|
+
keyCode: { type: String, required: false },
|
|
38
|
+
tourText: { type: String, required: false },
|
|
39
|
+
weight: { type: Number, required: false }
|
|
40
|
+
});
|
|
41
|
+
const { storage, eventBus, $t } = useBlokkli();
|
|
42
|
+
const buttonEl = useTemplateRef("buttonEl");
|
|
43
|
+
const isActive = storage.use("view_option_" + props.id, false, true);
|
|
44
|
+
function toggle() {
|
|
45
|
+
isActive.value = !isActive.value;
|
|
46
|
+
}
|
|
47
|
+
watch(isActive, () => {
|
|
48
|
+
eventBus.emit("view-option:toggle", { id: props.id });
|
|
49
|
+
});
|
|
50
|
+
defineCommands(() => ({
|
|
51
|
+
id: "plugin:view_option:" + props.id,
|
|
52
|
+
label: (isActive.value ? $t("viewOptionDisable", 'Disable "@option"') : $t("viewOptionEnable", 'Enable "@option"')).replace("@option", props.label),
|
|
53
|
+
icon: props.icon,
|
|
54
|
+
group: "ui",
|
|
55
|
+
callback: toggle
|
|
56
|
+
}));
|
|
57
|
+
defineTourItem(() => {
|
|
58
|
+
if (!props.tourText) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
id: "plugin:view_option:" + props.id,
|
|
63
|
+
title: props.label,
|
|
64
|
+
text: props.tourText,
|
|
65
|
+
element: () => buttonEl.value
|
|
66
|
+
};
|
|
67
|
+
});
|
|
68
|
+
</script>
|
|
69
|
+
|
|
70
|
+
<script>
|
|
71
|
+
export default {
|
|
72
|
+
name: "ToolbarViewOptionsButton"
|
|
73
|
+
};
|
|
74
|
+
</script>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<any, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, any, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ViewOption } from '#blokkli/editor/providers/plugin';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
options: ViewOption[];
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: 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>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|