@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
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
<FormToggle
|
|
10
10
|
v-model="showResolved"
|
|
11
11
|
:label="$t('commentsShowResolved', 'Show resolved')"
|
|
12
|
-
data-test="comments-show-resolved"
|
|
13
12
|
/>
|
|
14
13
|
</div>
|
|
15
14
|
|
|
@@ -22,6 +21,7 @@
|
|
|
22
21
|
:key="root.uuid"
|
|
23
22
|
:root="root"
|
|
24
23
|
:replies="repliesByRoot.get(root.uuid) || []"
|
|
24
|
+
:highlight-uuid="highlightUuid"
|
|
25
25
|
boxed
|
|
26
26
|
@reply="$emit('reply', $event)"
|
|
27
27
|
@edit="$emit('edit', $event)"
|
|
@@ -29,18 +29,22 @@
|
|
|
29
29
|
@resolve="$emit('resolve', root.uuid)"
|
|
30
30
|
@unresolve="$emit('unresolve', root.uuid)"
|
|
31
31
|
@toggle-task="$emit('toggleTask', $event)"
|
|
32
|
+
@dismiss-highlight="$emit('dismissHighlight')"
|
|
32
33
|
/>
|
|
33
34
|
</div>
|
|
34
35
|
<div
|
|
35
36
|
v-else
|
|
36
|
-
class="_bk_flex-1 _bk_flex _bk_items-center _bk_justify-center _bk_p-30 _bk_text-center _bk_text-
|
|
37
|
+
class="_bk_flex-1 _bk_flex _bk_flex-col _bk_items-center _bk_justify-center _bk_p-30 _bk_text-center _bk_text-base _bk_text-mono-500"
|
|
37
38
|
>
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
<Icon name="bk_mdi_mark_chat_read" class="_bk_size-70 _bk_mb-20" />
|
|
40
|
+
<div class="_bk_text-balance">
|
|
41
|
+
{{
|
|
42
|
+
roots.length ? $t(
|
|
40
43
|
"commentsAllResolved",
|
|
41
44
|
'All comments are resolved. Toggle "Show resolved" to view them.'
|
|
42
45
|
) : $t("commentsEmpty", "No comments yet.")
|
|
43
|
-
|
|
46
|
+
}}
|
|
47
|
+
</div>
|
|
44
48
|
</div>
|
|
45
49
|
|
|
46
50
|
<SidebarAddForm @submit="$emit('add', $event)" @start="onStartNewComment" />
|
|
@@ -49,15 +53,16 @@
|
|
|
49
53
|
|
|
50
54
|
<script setup>
|
|
51
55
|
import { computed, useBlokkli, useTemplateRef } from "#imports";
|
|
52
|
-
import { FormToggle } from "#blokkli/editor/components";
|
|
56
|
+
import { FormToggle, Icon } from "#blokkli/editor/components";
|
|
53
57
|
import CommentThread from "../Thread/index.vue";
|
|
54
58
|
import SidebarAddForm from "./AddForm/index.vue";
|
|
55
59
|
const { $t } = useBlokkli();
|
|
56
60
|
const props = defineProps({
|
|
57
61
|
comments: { type: Array, required: true },
|
|
58
|
-
recentlyResolved: { type: Array, required: true }
|
|
62
|
+
recentlyResolved: { type: Array, required: true },
|
|
63
|
+
highlightUuid: { type: [String, null], required: false }
|
|
59
64
|
});
|
|
60
|
-
defineEmits(["reply", "edit", "toggleTask", "add", "delete", "resolve", "unresolve"]);
|
|
65
|
+
defineEmits(["reply", "edit", "toggleTask", "add", "delete", "resolve", "unresolve", "dismissHighlight"]);
|
|
61
66
|
const rootEl = useTemplateRef("rootEl");
|
|
62
67
|
const showResolved = defineModel("showResolved", { type: Boolean, ...{
|
|
63
68
|
default: false
|
|
@@ -4,6 +4,13 @@ export default _default;
|
|
|
4
4
|
declare const __VLS_export: import("vue").DefineComponent<{
|
|
5
5
|
comments: CommentItem[];
|
|
6
6
|
recentlyResolved: string[];
|
|
7
|
+
/**
|
|
8
|
+
* UUID of the deep-link target comment (root or reply). Passed through
|
|
9
|
+
* to each `<Comment>` via the thread; the matching comment self-scrolls
|
|
10
|
+
* and shows a persistent highlight ring. Cleared by the parent on the
|
|
11
|
+
* `dismissHighlight` event.
|
|
12
|
+
*/
|
|
13
|
+
highlightUuid?: string | null;
|
|
7
14
|
} & {
|
|
8
15
|
showResolved?: boolean;
|
|
9
16
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -23,10 +30,18 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
23
30
|
delete: (value: string) => void;
|
|
24
31
|
resolve: (value: string) => void;
|
|
25
32
|
unresolve: (value: string) => void;
|
|
33
|
+
dismissHighlight: () => void;
|
|
26
34
|
"update:showResolved": (value: boolean) => void;
|
|
27
35
|
}, string, import("vue").PublicProps, Readonly<{
|
|
28
36
|
comments: CommentItem[];
|
|
29
37
|
recentlyResolved: string[];
|
|
38
|
+
/**
|
|
39
|
+
* UUID of the deep-link target comment (root or reply). Passed through
|
|
40
|
+
* to each `<Comment>` via the thread; the matching comment self-scrolls
|
|
41
|
+
* and shows a persistent highlight ring. Cleared by the parent on the
|
|
42
|
+
* `dismissHighlight` event.
|
|
43
|
+
*/
|
|
44
|
+
highlightUuid?: string | null;
|
|
30
45
|
} & {
|
|
31
46
|
showResolved?: boolean;
|
|
32
47
|
}> & Readonly<{
|
|
@@ -42,6 +57,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
42
57
|
uuid: string;
|
|
43
58
|
taskIndex: number;
|
|
44
59
|
}) => any) | undefined;
|
|
60
|
+
onDismissHighlight?: (() => any) | undefined;
|
|
45
61
|
onReply?: ((value: {
|
|
46
62
|
parentUuid: string;
|
|
47
63
|
body: string;
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
<button
|
|
5
5
|
type="button"
|
|
6
6
|
class="_bk_flex _bk_items-center _bk_text-xs _bk_font-medium _bk_gap-5 _bk_py-8 _bk_px-8 _bk_w-full _bk_hover:bg-mono-100 _bk_text-mono-500 _bk_border _bk_border-mono-200 _bk_rounded _bk_hover:border-mono-400 _bk_cursor-text!"
|
|
7
|
-
data-test="comment-reply-button"
|
|
8
7
|
@click="open"
|
|
9
8
|
>
|
|
10
9
|
<Icon name="bk_mdi_reply" class="_bk_size-15" />
|
|
@@ -5,6 +5,13 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
5
5
|
root: CommentItem;
|
|
6
6
|
replies: CommentItem[];
|
|
7
7
|
boxed?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* UUID of the deep-link target inside this thread (root or reply).
|
|
10
|
+
* The matching `<Comment>` renders with a persistent highlight ring
|
|
11
|
+
* and emits `dismissHighlight` on the first `pointerleave` after
|
|
12
|
+
* engagement, which the thread forwards up.
|
|
13
|
+
*/
|
|
14
|
+
highlightUuid?: string | null;
|
|
8
15
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
16
|
reply: (value: {
|
|
10
17
|
parentUuid: string;
|
|
@@ -21,10 +28,18 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
21
28
|
delete: (uuid: string) => void;
|
|
22
29
|
resolve: () => void;
|
|
23
30
|
unresolve: () => void;
|
|
31
|
+
dismissHighlight: () => void;
|
|
24
32
|
}, string, import("vue").PublicProps, Readonly<{
|
|
25
33
|
root: CommentItem;
|
|
26
34
|
replies: CommentItem[];
|
|
27
35
|
boxed?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* UUID of the deep-link target inside this thread (root or reply).
|
|
38
|
+
* The matching `<Comment>` renders with a persistent highlight ring
|
|
39
|
+
* and emits `dismissHighlight` on the first `pointerleave` after
|
|
40
|
+
* engagement, which the thread forwards up.
|
|
41
|
+
*/
|
|
42
|
+
highlightUuid?: string | null;
|
|
28
43
|
}> & Readonly<{
|
|
29
44
|
onDelete?: ((uuid: string) => any) | undefined;
|
|
30
45
|
onEdit?: ((value: {
|
|
@@ -37,6 +52,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
37
52
|
uuid: string;
|
|
38
53
|
taskIndex: number;
|
|
39
54
|
}) => any) | undefined;
|
|
55
|
+
onDismissHighlight?: (() => any) | undefined;
|
|
40
56
|
onReply?: ((value: {
|
|
41
57
|
parentUuid: string;
|
|
42
58
|
body: string;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<article
|
|
3
3
|
class="bk-comment-thread _bk_relative _bk_font-sans"
|
|
4
|
-
data-test="comment-thread"
|
|
5
|
-
:data-test-uuid="root.uuid"
|
|
6
|
-
:data-test-resolved="root.resolved"
|
|
7
4
|
:class="{
|
|
8
5
|
'_bk_rounded _bk_border _bk_hover:border-mono-400': boxed,
|
|
9
6
|
'_bk_bg-white': !boxed,
|
|
@@ -13,12 +10,13 @@
|
|
|
13
10
|
>
|
|
14
11
|
<div
|
|
15
12
|
:class="{
|
|
16
|
-
'_bk_opacity-60 _bk_hover:opacity-100': root.resolved
|
|
13
|
+
'_bk_opacity-60 _bk_hover:opacity-100': root.resolved && !hasHighlightedComment
|
|
17
14
|
}"
|
|
18
15
|
>
|
|
19
16
|
<Comment
|
|
20
17
|
:comment="root"
|
|
21
18
|
:is-reply="false"
|
|
19
|
+
:highlighted="root.uuid === highlightUuid"
|
|
22
20
|
class="_bk_pb-10!"
|
|
23
21
|
@select-blocks="onSelectBlocks"
|
|
24
22
|
@edit="$emit('edit', { uuid: root.uuid, body: $event })"
|
|
@@ -28,6 +26,7 @@
|
|
|
28
26
|
@toggle-task="
|
|
29
27
|
$emit('toggleTask', { uuid: root.uuid, taskIndex: $event })
|
|
30
28
|
"
|
|
29
|
+
@dismiss-highlight="$emit('dismissHighlight')"
|
|
31
30
|
/>
|
|
32
31
|
<div
|
|
33
32
|
v-if="replies.length"
|
|
@@ -41,12 +40,14 @@
|
|
|
41
40
|
v-for="reply in replies"
|
|
42
41
|
:key="reply.uuid"
|
|
43
42
|
:comment="reply"
|
|
43
|
+
:highlighted="reply.uuid === highlightUuid"
|
|
44
44
|
is-reply
|
|
45
45
|
@edit="$emit('edit', { uuid: reply.uuid, body: $event })"
|
|
46
46
|
@delete="$emit('delete', reply.uuid)"
|
|
47
47
|
@toggle-task="
|
|
48
48
|
$emit('toggleTask', { uuid: reply.uuid, taskIndex: $event })
|
|
49
49
|
"
|
|
50
|
+
@dismiss-highlight="$emit('dismissHighlight')"
|
|
50
51
|
/>
|
|
51
52
|
<div
|
|
52
53
|
v-if="canReply"
|
|
@@ -70,10 +71,29 @@ const { adapter, eventBus } = useBlokkli();
|
|
|
70
71
|
const props = defineProps({
|
|
71
72
|
root: { type: Object, required: true },
|
|
72
73
|
replies: { type: Array, required: true },
|
|
73
|
-
boxed: { type: Boolean, required: false }
|
|
74
|
+
boxed: { type: Boolean, required: false },
|
|
75
|
+
highlightUuid: { type: [String, null], required: false }
|
|
74
76
|
});
|
|
75
|
-
defineEmits(["reply", "edit", "toggleTask", "delete", "resolve", "unresolve"]);
|
|
77
|
+
defineEmits(["reply", "edit", "toggleTask", "delete", "resolve", "unresolve", "dismissHighlight"]);
|
|
76
78
|
const canReply = computed(() => !!adapter.replyToComment);
|
|
79
|
+
const hasHighlightedComment = computed(() => {
|
|
80
|
+
if (!props.highlightUuid) {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
if (props.root.uuid === props.highlightUuid) {
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
for (let i = 0; i < props.replies.length; i++) {
|
|
87
|
+
const reply = props.replies[i];
|
|
88
|
+
if (!reply) {
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
if (reply.uuid === props.highlightUuid) {
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return false;
|
|
96
|
+
});
|
|
77
97
|
function onSelectBlocks() {
|
|
78
98
|
if (props.root.blockUuids?.length) {
|
|
79
99
|
const uuid = props.root.blockUuids[0];
|
|
@@ -5,6 +5,13 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
5
5
|
root: CommentItem;
|
|
6
6
|
replies: CommentItem[];
|
|
7
7
|
boxed?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* UUID of the deep-link target inside this thread (root or reply).
|
|
10
|
+
* The matching `<Comment>` renders with a persistent highlight ring
|
|
11
|
+
* and emits `dismissHighlight` on the first `pointerleave` after
|
|
12
|
+
* engagement, which the thread forwards up.
|
|
13
|
+
*/
|
|
14
|
+
highlightUuid?: string | null;
|
|
8
15
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
16
|
reply: (value: {
|
|
10
17
|
parentUuid: string;
|
|
@@ -21,10 +28,18 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
21
28
|
delete: (uuid: string) => void;
|
|
22
29
|
resolve: () => void;
|
|
23
30
|
unresolve: () => void;
|
|
31
|
+
dismissHighlight: () => void;
|
|
24
32
|
}, string, import("vue").PublicProps, Readonly<{
|
|
25
33
|
root: CommentItem;
|
|
26
34
|
replies: CommentItem[];
|
|
27
35
|
boxed?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* UUID of the deep-link target inside this thread (root or reply).
|
|
38
|
+
* The matching `<Comment>` renders with a persistent highlight ring
|
|
39
|
+
* and emits `dismissHighlight` on the first `pointerleave` after
|
|
40
|
+
* engagement, which the thread forwards up.
|
|
41
|
+
*/
|
|
42
|
+
highlightUuid?: string | null;
|
|
28
43
|
}> & Readonly<{
|
|
29
44
|
onDelete?: ((uuid: string) => any) | undefined;
|
|
30
45
|
onEdit?: ((value: {
|
|
@@ -37,6 +52,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
37
52
|
uuid: string;
|
|
38
53
|
taskIndex: number;
|
|
39
54
|
}) => any) | undefined;
|
|
55
|
+
onDismissHighlight?: (() => any) | undefined;
|
|
40
56
|
onReply?: ((value: {
|
|
41
57
|
parentUuid: string;
|
|
42
58
|
body: string;
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
v-model:show-resolved="showResolved"
|
|
13
13
|
:comments
|
|
14
14
|
:recently-resolved
|
|
15
|
+
:highlight-uuid="deepLinkUuid"
|
|
15
16
|
@add="onAddComment($event, [])"
|
|
16
17
|
@reply="onReply($event.parentUuid, $event.body)"
|
|
17
18
|
@edit="onEditComment($event.uuid, $event.body)"
|
|
@@ -19,12 +20,12 @@
|
|
|
19
20
|
@resolve="onResolveComment($event)"
|
|
20
21
|
@unresolve="onUnresolveComment($event)"
|
|
21
22
|
@toggle-task="onToggleTask($event.uuid, $event.taskIndex)"
|
|
23
|
+
@dismiss-highlight="deepLinkUuid = null"
|
|
22
24
|
/>
|
|
23
25
|
|
|
24
26
|
<template v-if="unresolvedCount" #badge>
|
|
25
27
|
<div
|
|
26
28
|
class="bk-sidebar-badge bk-is-yellow"
|
|
27
|
-
data-test="comments-unresolved-badge"
|
|
28
29
|
>
|
|
29
30
|
{{ unresolvedCount }}
|
|
30
31
|
</div>
|
|
@@ -80,7 +81,9 @@ import {
|
|
|
80
81
|
defineBlokkliFeature,
|
|
81
82
|
computed,
|
|
82
83
|
useTemplateRef,
|
|
83
|
-
defineAsyncComponent
|
|
84
|
+
defineAsyncComponent,
|
|
85
|
+
onMounted,
|
|
86
|
+
useRoute
|
|
84
87
|
} from "#imports";
|
|
85
88
|
import { PluginSidebar, PluginItemAction } from "#blokkli/editor/plugins";
|
|
86
89
|
import { BlokkliTransition } from "#blokkli/editor/components";
|
|
@@ -98,7 +101,8 @@ const { adapter } = defineBlokkliFeature({
|
|
|
98
101
|
description: "Provides comment functionality for blocks.",
|
|
99
102
|
screenshot: "feature-comments.jpg"
|
|
100
103
|
});
|
|
101
|
-
const { $t, selection, ui, storage } = useBlokkli();
|
|
104
|
+
const { $t, selection, ui, storage, eventBus } = useBlokkli();
|
|
105
|
+
const route = useRoute();
|
|
102
106
|
const showResolved = storage.useWithContextPrefix("commentsShowResolved", false);
|
|
103
107
|
const recentlyResolved = ref([]);
|
|
104
108
|
const commentForm = useTemplateRef("commentForm");
|
|
@@ -113,6 +117,27 @@ comments.value = await adapter.loadComments();
|
|
|
113
117
|
const unresolvedCount = computed(
|
|
114
118
|
() => comments.value.filter((c) => !c.parentUuid && !c.resolved).length
|
|
115
119
|
);
|
|
120
|
+
const deepLinkUuid = ref(null);
|
|
121
|
+
onMounted(() => {
|
|
122
|
+
const requested = route.query.blokkliComment;
|
|
123
|
+
if (typeof requested !== "string" || !requested) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
const target = comments.value.find((c) => c.uuid === requested);
|
|
127
|
+
if (!target) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
const rootUuid = target.parentUuid ?? target.uuid;
|
|
131
|
+
const root = comments.value.find((c) => c.uuid === rootUuid);
|
|
132
|
+
if (!root) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
if (root.resolved) {
|
|
136
|
+
showResolved.value = true;
|
|
137
|
+
}
|
|
138
|
+
eventBus.emit("sidebar:open", "comments");
|
|
139
|
+
deepLinkUuid.value = target.uuid;
|
|
140
|
+
});
|
|
116
141
|
const onAddComment = async (body, providedUuids) => {
|
|
117
142
|
if (!adapter.addComment) {
|
|
118
143
|
return;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<PluginViewOption
|
|
3
|
-
id="dev_mode"
|
|
4
|
-
v-model="isEnabled"
|
|
5
|
-
:label="$t('toggleInteractionLayers', 'Toggle interaction layers')"
|
|
6
|
-
:title-on="$t('interactionLayersOn', 'Hide interaction layers')"
|
|
7
|
-
:title-off="$t('interactionLayerOff', 'Show interaction layers')"
|
|
8
|
-
icon="bk_mdi_logo_dev"
|
|
9
|
-
key-code="I"
|
|
10
|
-
weight="-99999"
|
|
11
|
-
/>
|
|
12
2
|
<Teleport :to="ui.mainLayoutElement.value">
|
|
13
3
|
<div v-if="fieldMappingValidations.length" class="bk bk-dev-mode">
|
|
14
4
|
<div class="bk-dev-mode-inner">
|
|
@@ -43,10 +33,12 @@
|
|
|
43
33
|
</template>
|
|
44
34
|
|
|
45
35
|
<script setup>
|
|
46
|
-
import { useBlokkli, defineBlokkliFeature,
|
|
47
|
-
import { PluginViewOption } from "#blokkli/editor/plugins";
|
|
36
|
+
import { useBlokkli, defineBlokkliFeature, computed } from "#imports";
|
|
48
37
|
import { Banner, BannerInner } from "#blokkli/editor/components";
|
|
49
|
-
import {
|
|
38
|
+
import {
|
|
39
|
+
addElementClasses,
|
|
40
|
+
defineViewOption
|
|
41
|
+
} from "#blokkli/editor/composables";
|
|
50
42
|
import { falsy } from "#blokkli/helpers";
|
|
51
43
|
import { itemEntityType } from "#blokkli-build/config";
|
|
52
44
|
defineBlokkliFeature({
|
|
@@ -58,7 +50,17 @@ defineBlokkliFeature({
|
|
|
58
50
|
devOnly: true
|
|
59
51
|
});
|
|
60
52
|
const { $t, types, definitions, ui } = useBlokkli();
|
|
61
|
-
const
|
|
53
|
+
const { isVisible } = defineViewOption({
|
|
54
|
+
id: "dev_mode",
|
|
55
|
+
label: $t("viewOptionInteractionLayers", "Interaction layers"),
|
|
56
|
+
description: $t(
|
|
57
|
+
"viewOptionInteractionLayersDescription",
|
|
58
|
+
"Hides the editor overlays to preview the page as it will render."
|
|
59
|
+
),
|
|
60
|
+
icon: "bk_mdi_logo_dev",
|
|
61
|
+
keyCode: "I",
|
|
62
|
+
weight: -99999
|
|
63
|
+
});
|
|
62
64
|
const fieldMappingValidations = computed(() => {
|
|
63
65
|
return definitions.blockDefinitions.value.flatMap((definition) => {
|
|
64
66
|
if (definition.renderFor) {
|
|
@@ -100,7 +102,7 @@ const fieldMappingValidations = computed(() => {
|
|
|
100
102
|
addElementClasses(
|
|
101
103
|
document.documentElement,
|
|
102
104
|
"bk-hide-interaction-layers",
|
|
103
|
-
|
|
105
|
+
isVisible
|
|
104
106
|
);
|
|
105
107
|
</script>
|
|
106
108
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,9 +3,6 @@
|
|
|
3
3
|
v-if="readabilityScore != null && readabilityBand"
|
|
4
4
|
class="bk-editable-field-readability _bk_group/tooltip"
|
|
5
5
|
:class="{ 'bk-is-stale': stale }"
|
|
6
|
-
data-test="editable-readability"
|
|
7
|
-
:data-test-band="readabilityBand"
|
|
8
|
-
:data-test-too-short="false"
|
|
9
6
|
>
|
|
10
7
|
<span
|
|
11
8
|
class="bk-editable-field-readability-dot"
|
|
@@ -79,8 +76,6 @@
|
|
|
79
76
|
<div
|
|
80
77
|
v-else-if="tooShort"
|
|
81
78
|
class="bk-editable-field-readability"
|
|
82
|
-
data-test="editable-readability"
|
|
83
|
-
:data-test-too-short="true"
|
|
84
79
|
>
|
|
85
80
|
<span class="bk-editable-field-readability-dot" />
|
|
86
81
|
<span>{{ $t("readabilityTooShort", "Too short") }}</span>
|
|
@@ -30,8 +30,6 @@
|
|
|
30
30
|
<form
|
|
31
31
|
ref="form"
|
|
32
32
|
class="bk-editable-field-input"
|
|
33
|
-
data-test="editable-overlay"
|
|
34
|
-
:data-test-type="config.type"
|
|
35
33
|
@submit.prevent="save"
|
|
36
34
|
>
|
|
37
35
|
<div ref="input">
|
|
@@ -69,7 +67,6 @@
|
|
|
69
67
|
<button
|
|
70
68
|
:disabled="!hasChanged"
|
|
71
69
|
class="bk-artboard-tooltip-info-button bk-scheme-red"
|
|
72
|
-
data-test="editable-discard"
|
|
73
70
|
@click.prevent="discard"
|
|
74
71
|
>
|
|
75
72
|
{{ $t("editableFieldDiscard", "Discard") }}
|
|
@@ -108,8 +105,6 @@
|
|
|
108
105
|
<div
|
|
109
106
|
v-if="!isMarkup"
|
|
110
107
|
class="bk-editable-field-info-count _bk_relative _bk_group/tooltip"
|
|
111
|
-
data-test="editable-char-count"
|
|
112
|
-
:data-test-count="count"
|
|
113
108
|
>
|
|
114
109
|
<span>{{ count }}</span>
|
|
115
110
|
<span v-if="maxlength >= 1"> / {{ maxlength }}</span>
|
|
@@ -1,25 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
id="mask"
|
|
4
|
-
v-model="isActive"
|
|
5
|
-
:label="$t('maskToggle', 'Toggle non-editable areas')"
|
|
6
|
-
:title-on="$t('maskHide', 'Hide non-editable areas')"
|
|
7
|
-
:title-off="$t('maskShow', 'Show non-editable areas')"
|
|
8
|
-
:tour-text="
|
|
9
|
-
$t(
|
|
10
|
-
'maskTourText',
|
|
11
|
-
'Toggle between showing or hiding non-editable parts of the page.'
|
|
12
|
-
)
|
|
13
|
-
"
|
|
14
|
-
icon="bk_mdi_texture"
|
|
15
|
-
key-code="M"
|
|
16
|
-
/>
|
|
2
|
+
<div />
|
|
17
3
|
</template>
|
|
18
4
|
|
|
19
5
|
<script setup>
|
|
20
|
-
import { useBlokkli, defineBlokkliFeature
|
|
21
|
-
import {
|
|
22
|
-
|
|
6
|
+
import { useBlokkli, defineBlokkliFeature } from "#imports";
|
|
7
|
+
import {
|
|
8
|
+
addElementClasses,
|
|
9
|
+
defineViewOption
|
|
10
|
+
} from "#blokkli/editor/composables";
|
|
23
11
|
defineBlokkliFeature({
|
|
24
12
|
id: "editable-mask",
|
|
25
13
|
icon: "bk_mdi_texture",
|
|
@@ -28,8 +16,21 @@ defineBlokkliFeature({
|
|
|
28
16
|
viewports: ["desktop"]
|
|
29
17
|
});
|
|
30
18
|
const { $t } = useBlokkli();
|
|
31
|
-
const
|
|
32
|
-
|
|
19
|
+
const { isVisible } = defineViewOption({
|
|
20
|
+
id: "mask",
|
|
21
|
+
label: $t("viewOptionNonEditableAreas", "Only editable areas"),
|
|
22
|
+
description: $t(
|
|
23
|
+
"viewOptionNonEditableAreasDescription",
|
|
24
|
+
"Hides parts of the page that cannot be edited."
|
|
25
|
+
),
|
|
26
|
+
tourText: $t(
|
|
27
|
+
"maskTourText",
|
|
28
|
+
"Toggle between showing or hiding non-editable parts of the page."
|
|
29
|
+
),
|
|
30
|
+
icon: "bk_mdi_texture",
|
|
31
|
+
keyCode: "M"
|
|
32
|
+
});
|
|
33
|
+
addElementClasses(document.documentElement, "bk-hide-non-editable", isVisible);
|
|
33
34
|
</script>
|
|
34
35
|
|
|
35
36
|
<script>
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
<button
|
|
4
4
|
v-if="scheduledDate"
|
|
5
5
|
class="bk-toolbar-title-scheduled _bk_group/tooltip"
|
|
6
|
-
data-test="toolbar-scheduled-date"
|
|
7
|
-
:data-test-scheduled-date="scheduledDate"
|
|
8
6
|
@click.prevent="onShowPublishDialog"
|
|
9
7
|
>
|
|
10
8
|
<Icon name="bk_mdi_calendar_clock" />
|
|
@@ -20,8 +18,6 @@
|
|
|
20
18
|
<button
|
|
21
19
|
ref="buttonEl"
|
|
22
20
|
class="bk-toolbar-button _bk_group/tooltip _bk_w-full _bk_justify-start _bk_relative"
|
|
23
|
-
data-test="entity-title"
|
|
24
|
-
:data-test-entity-status="statusIndicatorStatus"
|
|
25
21
|
:disabled="!state.canEdit.value"
|
|
26
22
|
@click="onEditEntity"
|
|
27
23
|
>
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
v-model="searchText"
|
|
26
26
|
type="text"
|
|
27
27
|
class="bk-form-input"
|
|
28
|
-
data-test="fragments-search"
|
|
29
28
|
:placeholder="
|
|
30
29
|
$t('fragmentsPlaceDialogSearchPlaceholder', 'Search fragments')
|
|
31
30
|
"
|
|
@@ -45,8 +44,6 @@
|
|
|
45
44
|
'bk-is-selected': selectedItem === item.name
|
|
46
45
|
}"
|
|
47
46
|
:data-bk-fragment-name="item.name"
|
|
48
|
-
data-test="fragment-option"
|
|
49
|
-
:data-test-fragment-name="item.name"
|
|
50
47
|
@click="selectedItem = item.name"
|
|
51
48
|
>
|
|
52
49
|
<FragmentItem
|
|
@@ -62,7 +59,6 @@
|
|
|
62
59
|
<template #footer>
|
|
63
60
|
<button
|
|
64
61
|
class="bk-button bk-scheme-accent"
|
|
65
|
-
data-test="fragments-submit"
|
|
66
62
|
@click="onSubmit"
|
|
67
63
|
>
|
|
68
64
|
{{ $t("fragmentsPlaceDialogSubmitButton", "Add selected fragment") }}
|
|
@@ -1,23 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
id="grid"
|
|
4
|
-
v-slot="{ isActive }"
|
|
5
|
-
:label="$t('gridToggle', 'Toggle grid')"
|
|
6
|
-
:title-on="$t('gridShow', 'Show grid')"
|
|
7
|
-
:title-off="$t('gridHide', 'Hide grid')"
|
|
8
|
-
:tour-text="
|
|
9
|
-
$t('gridTourText', 'Display a layout grid overlay on top of the page.')
|
|
10
|
-
"
|
|
11
|
-
key-code="G"
|
|
12
|
-
icon="bk_mdi_grid_view"
|
|
13
|
-
>
|
|
14
|
-
<div v-if="isActive" class="bk-grid-overlay" v-html="gridMarkup" />
|
|
15
|
-
</PluginViewOption>
|
|
2
|
+
<div v-if="isVisible" class="bk-grid-overlay" v-html="gridMarkup" />
|
|
16
3
|
</template>
|
|
17
4
|
|
|
18
5
|
<script setup>
|
|
19
6
|
import { useBlokkli, defineBlokkliFeature } from "#imports";
|
|
20
|
-
import {
|
|
7
|
+
import { defineViewOption } from "#blokkli/editor/composables";
|
|
21
8
|
const { adapter } = defineBlokkliFeature({
|
|
22
9
|
id: "grid",
|
|
23
10
|
label: "Grid",
|
|
@@ -28,6 +15,20 @@ const { adapter } = defineBlokkliFeature({
|
|
|
28
15
|
});
|
|
29
16
|
const gridMarkup = await Promise.resolve(adapter.getGridMarkup());
|
|
30
17
|
const { $t } = useBlokkli();
|
|
18
|
+
const { isVisible } = defineViewOption({
|
|
19
|
+
id: "grid",
|
|
20
|
+
label: $t("viewOptionGrid", "Grid"),
|
|
21
|
+
description: $t(
|
|
22
|
+
"viewOptionGridDescription",
|
|
23
|
+
"Shows a layout grid overlay on top of the page."
|
|
24
|
+
),
|
|
25
|
+
tourText: $t(
|
|
26
|
+
"gridTourText",
|
|
27
|
+
"Display a layout grid overlay on top of the page."
|
|
28
|
+
),
|
|
29
|
+
keyCode: "G",
|
|
30
|
+
icon: "bk_mdi_grid_view"
|
|
31
|
+
});
|
|
31
32
|
</script>
|
|
32
33
|
|
|
33
34
|
<script>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
2
|
+
cancel: () => any;
|
|
3
|
+
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
4
|
+
onCancel?: (() => any) | undefined;
|
|
5
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|