@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.
Files changed (217) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +28 -11
  3. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.d.vue.ts +29 -0
  4. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.vue +172 -0
  5. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.vue.d.ts +29 -0
  6. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/index.d.ts +19 -0
  7. package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/index.js +80 -0
  8. package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/Component.vue +16 -0
  9. package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.js +1 -1
  10. package/dist/modules/agent/runtime/app/tools/get_content_fields/index.js +12 -9
  11. package/dist/modules/agent/runtime/app/tools/get_page_text/index.d.ts +2 -0
  12. package/dist/modules/agent/runtime/app/tools/get_page_text/index.js +65 -0
  13. package/dist/modules/agent/runtime/app/tools/get_referenced_entities/index.d.ts +2 -0
  14. package/dist/modules/agent/runtime/app/tools/get_referenced_entities/index.js +62 -0
  15. package/dist/modules/agent/runtime/app/tools/helpers.d.ts +8 -2
  16. package/dist/modules/agent/runtime/app/tools/helpers.js +9 -9
  17. package/dist/modules/agent/runtime/app/tools/schemas.d.ts +12 -0
  18. package/dist/modules/agent/runtime/app/tools/schemas.js +20 -0
  19. package/dist/modules/agent/runtime/app/tools/search_media/index.js +1 -1
  20. package/dist/modules/agent/runtime/app/tools/select_media/Component.vue +1 -1
  21. package/dist/modules/agent/runtime/server/agent.js +0 -1
  22. package/dist/modules/agent/runtime/server/classes/Session/index.js +4 -0
  23. package/dist/modules/agent/runtime/shared/toolResult.d.ts +4 -0
  24. package/dist/modules/agent/runtime/shared/toolResult.js +5 -0
  25. package/dist/modules/drupal/graphql/features/notifications.graphql +39 -0
  26. package/dist/modules/drupal/index.mjs +6 -1
  27. package/dist/modules/drupal/runtime/adapter/index.js +38 -0
  28. package/dist/runtime/editor/components/Actions/ItemDropdown/Item.vue +0 -1
  29. package/dist/runtime/editor/components/Actions/ScrollArrow/index.d.vue.ts +13 -0
  30. package/dist/runtime/editor/components/Actions/ScrollArrow/index.vue +52 -0
  31. package/dist/runtime/editor/components/Actions/ScrollArrow/index.vue.d.ts +13 -0
  32. package/dist/runtime/editor/components/Actions/Title/index.vue +2 -2
  33. package/dist/runtime/editor/components/Actions/index.vue +47 -7
  34. package/dist/runtime/editor/components/Actions/useToolbarScroll.d.ts +25 -0
  35. package/dist/runtime/editor/components/Actions/useToolbarScroll.js +125 -0
  36. package/dist/runtime/editor/components/AddListItem/index.vue +0 -2
  37. package/dist/runtime/editor/components/AppMenu/MenuButton.vue +1 -3
  38. package/dist/runtime/editor/components/ArtboardTooltip/index.vue +4 -1
  39. package/dist/runtime/editor/components/Avatar/index.vue +0 -1
  40. package/dist/runtime/editor/components/BlockPreviewRenderer/index.d.vue.ts +1 -1
  41. package/dist/runtime/editor/components/BlockPreviewRenderer/index.vue.d.ts +1 -1
  42. package/dist/runtime/editor/components/BundleSelector/index.vue +0 -4
  43. package/dist/runtime/editor/components/Dialog/index.d.vue.ts +2 -2
  44. package/dist/runtime/editor/components/Dialog/index.vue +1 -3
  45. package/dist/runtime/editor/components/Dialog/index.vue.d.ts +2 -2
  46. package/dist/runtime/editor/components/DiffApproval/Highlight/Item.d.vue.ts +8 -0
  47. package/dist/runtime/editor/components/DiffApproval/Highlight/Item.vue +12 -2
  48. package/dist/runtime/editor/components/DiffApproval/Highlight/Item.vue.d.ts +8 -0
  49. package/dist/runtime/editor/components/DiffApproval/Highlight/index.d.vue.ts +8 -0
  50. package/dist/runtime/editor/components/DiffApproval/Highlight/index.vue +14 -2
  51. package/dist/runtime/editor/components/DiffApproval/Highlight/index.vue.d.ts +8 -0
  52. package/dist/runtime/editor/components/DiffApproval/Toolbar/index.d.vue.ts +2 -2
  53. package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue +0 -2
  54. package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue.d.ts +2 -2
  55. package/dist/runtime/editor/components/DiffApproval/index.vue +1 -0
  56. package/dist/runtime/editor/components/Form/Datepicker/index.vue +0 -1
  57. package/dist/runtime/editor/components/Form/TextDark/index.vue +0 -1
  58. package/dist/runtime/editor/components/Form/Textarea/index.vue +0 -1
  59. package/dist/runtime/editor/components/Form/Toggle/index.d.vue.ts +1 -0
  60. package/dist/runtime/editor/components/Form/Toggle/index.vue +9 -2
  61. package/dist/runtime/editor/components/Form/Toggle/index.vue.d.ts +1 -0
  62. package/dist/runtime/editor/components/FormOverlay/index.vue +0 -1
  63. package/dist/runtime/editor/components/Icon/index.vue +0 -2
  64. package/dist/runtime/editor/components/Messages/Item/index.vue +4 -1
  65. package/dist/runtime/editor/components/Messages/index.vue +3 -0
  66. package/dist/runtime/editor/components/Panel/Sheet/index.vue +1 -1
  67. package/dist/runtime/editor/components/Popup/index.vue +0 -2
  68. package/dist/runtime/editor/components/RichText/Editor/index.d.vue.ts +1 -1
  69. package/dist/runtime/editor/components/RichText/Editor/index.vue.d.ts +1 -1
  70. package/dist/runtime/editor/components/ScheduleDate/index.vue +1 -3
  71. package/dist/runtime/editor/components/SearchOverlay/index.d.vue.ts +1 -1
  72. package/dist/runtime/editor/components/SearchOverlay/index.vue.d.ts +1 -1
  73. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.d.vue.ts +3 -0
  74. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.vue +74 -0
  75. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.vue.d.ts +3 -0
  76. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/index.d.vue.ts +7 -0
  77. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/index.vue +16 -0
  78. package/dist/runtime/editor/components/Toolbar/ViewOptions/List/index.vue.d.ts +7 -0
  79. package/dist/runtime/editor/components/Toolbar/ViewOptions/index.d.vue.ts +3 -0
  80. package/dist/runtime/editor/components/Toolbar/ViewOptions/index.vue +57 -0
  81. package/dist/runtime/editor/components/Toolbar/ViewOptions/index.vue.d.ts +3 -0
  82. package/dist/runtime/editor/components/Toolbar/index.vue +3 -56
  83. package/dist/runtime/editor/components/ToolbarDropdown/index.d.vue.ts +21 -0
  84. package/dist/runtime/editor/components/ToolbarDropdown/index.vue +36 -0
  85. package/dist/runtime/editor/components/ToolbarDropdown/index.vue.d.ts +21 -0
  86. package/dist/runtime/editor/components/Tooltip/Context.vue +3 -1
  87. package/dist/runtime/editor/components/Tooltip/index.d.vue.ts +1 -1
  88. package/dist/runtime/editor/components/Tooltip/index.vue +4 -1
  89. package/dist/runtime/editor/components/Tooltip/index.vue.d.ts +1 -1
  90. package/dist/runtime/editor/components/index.d.ts +1 -0
  91. package/dist/runtime/editor/components/index.js +1 -0
  92. package/dist/runtime/editor/composables/defineViewOption.d.ts +5 -0
  93. package/dist/runtime/editor/composables/defineViewOption.js +10 -0
  94. package/dist/runtime/editor/composables/index.d.ts +3 -0
  95. package/dist/runtime/editor/composables/index.js +2 -0
  96. package/dist/runtime/editor/composables/useDismiss.d.ts +30 -0
  97. package/dist/runtime/editor/composables/useDismiss.js +43 -0
  98. package/dist/runtime/editor/composables/useGlobalBlokkliObject.d.ts +3 -3
  99. package/dist/runtime/editor/css/output.css +1 -1
  100. package/dist/runtime/editor/events/index.d.ts +23 -0
  101. package/dist/runtime/editor/features/add-list/Actions/index.vue +0 -1
  102. package/dist/runtime/editor/features/add-list/Blocks/index.vue +0 -1
  103. package/dist/runtime/editor/features/add-list/Help/Item.vue +2 -7
  104. package/dist/runtime/editor/features/add-list/Help/index.vue +1 -1
  105. package/dist/runtime/editor/features/add-list/index.vue +0 -2
  106. package/dist/runtime/editor/features/anchors/index.vue +11 -11
  107. package/dist/runtime/editor/features/anchors/types.d.ts +1 -0
  108. package/dist/runtime/editor/features/anchors/types.js +1 -0
  109. package/dist/runtime/editor/features/artboard/Renderer.vue +30 -28
  110. package/dist/runtime/editor/features/block-scheduler/Dialog/ScheduleSection.vue +0 -3
  111. package/dist/runtime/editor/features/block-scheduler/index.vue +0 -1
  112. package/dist/runtime/editor/features/block-transfer/SummaryDialog/index.vue +0 -4
  113. package/dist/runtime/editor/features/breadcrumbs/Crumb/index.vue +0 -5
  114. package/dist/runtime/editor/features/changelog/changelog.json +8 -0
  115. package/dist/runtime/editor/features/command-palette/Palette/Item/index.vue +0 -3
  116. package/dist/runtime/editor/features/command-palette/Palette/index.vue +0 -1
  117. package/dist/runtime/editor/features/comments/AddForm/index.vue +0 -1
  118. package/dist/runtime/editor/features/comments/Comment/Actions/index.vue +0 -4
  119. package/dist/runtime/editor/features/comments/Comment/index.d.vue.ts +14 -0
  120. package/dist/runtime/editor/features/comments/Comment/index.vue +29 -8
  121. package/dist/runtime/editor/features/comments/Comment/index.vue.d.ts +14 -0
  122. package/dist/runtime/editor/features/comments/CommentInput/index.d.vue.ts +1 -1
  123. package/dist/runtime/editor/features/comments/CommentInput/index.vue +0 -3
  124. package/dist/runtime/editor/features/comments/CommentInput/index.vue.d.ts +1 -1
  125. package/dist/runtime/editor/features/comments/Sidebar/AddForm/index.vue +0 -1
  126. package/dist/runtime/editor/features/comments/Sidebar/index.d.vue.ts +16 -0
  127. package/dist/runtime/editor/features/comments/Sidebar/index.vue +13 -8
  128. package/dist/runtime/editor/features/comments/Sidebar/index.vue.d.ts +16 -0
  129. package/dist/runtime/editor/features/comments/Thread/ReplyForm/index.vue +0 -1
  130. package/dist/runtime/editor/features/comments/Thread/index.d.vue.ts +16 -0
  131. package/dist/runtime/editor/features/comments/Thread/index.vue +26 -6
  132. package/dist/runtime/editor/features/comments/Thread/index.vue.d.ts +16 -0
  133. package/dist/runtime/editor/features/comments/index.vue +28 -3
  134. package/dist/runtime/editor/features/delete/types.d.ts +1 -0
  135. package/dist/runtime/editor/features/delete/types.js +1 -0
  136. package/dist/runtime/editor/features/dev-mode/index.vue +17 -15
  137. package/dist/runtime/editor/features/dragging-overlay/DragItems/index.vue +1 -0
  138. package/dist/runtime/editor/features/duplicate/types.d.ts +1 -0
  139. package/dist/runtime/editor/features/duplicate/types.js +1 -0
  140. package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.vue +0 -2
  141. package/dist/runtime/editor/features/editable-field/Overlay/Plaintext/index.vue +0 -1
  142. package/dist/runtime/editor/features/editable-field/Overlay/ReadabilityIndicator/index.vue +0 -5
  143. package/dist/runtime/editor/features/editable-field/Overlay/index.vue +0 -5
  144. package/dist/runtime/editor/features/editable-mask/index.vue +21 -20
  145. package/dist/runtime/editor/features/entity-title/index.vue +0 -4
  146. package/dist/runtime/editor/features/fragments/Dialog/index.vue +0 -4
  147. package/dist/runtime/editor/features/grid/index.vue +16 -15
  148. package/dist/runtime/editor/features/grid/types.d.ts +1 -0
  149. package/dist/runtime/editor/features/grid/types.js +1 -0
  150. package/dist/runtime/editor/features/help/Dialog/index.d.vue.ts +7 -0
  151. package/dist/runtime/editor/features/help/Dialog/index.vue +57 -0
  152. package/dist/runtime/editor/features/help/Dialog/index.vue.d.ts +7 -0
  153. package/dist/runtime/editor/features/help/index.vue +52 -47
  154. package/dist/runtime/editor/features/history/List/index.vue +2 -9
  155. package/dist/runtime/editor/features/history/types.d.ts +1 -0
  156. package/dist/runtime/editor/features/history/types.js +1 -0
  157. package/dist/runtime/editor/features/notifications/Item/index.d.vue.ts +4 -0
  158. package/dist/runtime/editor/features/notifications/Item/index.vue +96 -0
  159. package/dist/runtime/editor/features/notifications/Item/index.vue.d.ts +4 -0
  160. package/dist/runtime/editor/features/notifications/List/index.d.vue.ts +11 -0
  161. package/dist/runtime/editor/features/notifications/List/index.vue +126 -0
  162. package/dist/runtime/editor/features/notifications/List/index.vue.d.ts +11 -0
  163. package/dist/runtime/editor/features/notifications/docs.md +12 -0
  164. package/dist/runtime/editor/features/notifications/index.d.vue.ts +3 -0
  165. package/dist/runtime/editor/features/notifications/index.vue +123 -0
  166. package/dist/runtime/editor/features/notifications/index.vue.d.ts +3 -0
  167. package/dist/runtime/editor/features/notifications/types.d.ts +132 -0
  168. package/dist/runtime/editor/features/notifications/types.js +20 -0
  169. package/dist/runtime/editor/features/options/Form/Checkbox/index.vue +6 -2
  170. package/dist/runtime/editor/features/options/Form/Checkboxes/index.vue +14 -4
  171. package/dist/runtime/editor/features/options/Form/Color/index.vue +1 -1
  172. package/dist/runtime/editor/features/options/Form/ComplexType/index.vue +0 -1
  173. package/dist/runtime/editor/features/options/Form/DateTimeLocal/index.vue +0 -1
  174. package/dist/runtime/editor/features/options/Form/Group.vue +3 -1
  175. package/dist/runtime/editor/features/options/Form/Item.vue +1 -2
  176. package/dist/runtime/editor/features/options/Form/Number/index.vue +9 -3
  177. package/dist/runtime/editor/features/options/Form/Radios/index.vue +3 -2
  178. package/dist/runtime/editor/features/options/Form/Range/index.vue +8 -2
  179. package/dist/runtime/editor/features/options/Form/Text/index.vue +6 -2
  180. package/dist/runtime/editor/features/options/index.vue +7 -1
  181. package/dist/runtime/editor/features/ownership/Banner/index.vue +3 -1
  182. package/dist/runtime/editor/features/ownership/types.d.ts +1 -0
  183. package/dist/runtime/editor/features/ownership/types.js +1 -0
  184. package/dist/runtime/editor/features/preview-grant/types.d.ts +1 -0
  185. package/dist/runtime/editor/features/preview-grant/types.js +1 -0
  186. package/dist/runtime/editor/features/proxy-view/index.vue +24 -21
  187. package/dist/runtime/editor/features/publish/Dialog/PublishOption.vue +0 -2
  188. package/dist/runtime/editor/features/publish/Dialog/index.vue +1 -2
  189. package/dist/runtime/editor/features/responsive-preview/Frame/index.vue +0 -1
  190. package/dist/runtime/editor/features/revert/types.d.ts +1 -0
  191. package/dist/runtime/editor/features/revert/types.js +1 -0
  192. package/dist/runtime/editor/features/settings/Dialog/FeatureSetting/index.vue +18 -8
  193. package/dist/runtime/editor/features/swap/types.d.ts +1 -0
  194. package/dist/runtime/editor/features/swap/types.js +1 -0
  195. package/dist/runtime/editor/features/translations/Banner/index.vue +4 -1
  196. package/dist/runtime/editor/features/translations/CsvDialog/Import/index.vue +4 -1
  197. package/dist/runtime/editor/features/translations/TranslateDialog/index.vue +7 -2
  198. package/dist/runtime/editor/plugins/BlockIndicator/index.vue +0 -2
  199. package/dist/runtime/editor/plugins/ContextMenu/Menu/index.vue +4 -36
  200. package/dist/runtime/editor/plugins/ItemAction/index.vue +0 -1
  201. package/dist/runtime/editor/plugins/Sidebar/index.vue +7 -50
  202. package/dist/runtime/editor/plugins/ToolbarButton/index.d.vue.ts +8 -2
  203. package/dist/runtime/editor/plugins/ToolbarButton/index.vue +122 -28
  204. package/dist/runtime/editor/plugins/ToolbarButton/index.vue.d.ts +8 -2
  205. package/dist/runtime/editor/plugins/index.d.ts +1 -2
  206. package/dist/runtime/editor/plugins/index.js +1 -3
  207. package/dist/runtime/editor/providers/fieldValue.js +11 -13
  208. package/dist/runtime/editor/providers/plugin.d.ts +12 -0
  209. package/dist/runtime/editor/providers/plugin.js +9 -0
  210. package/dist/runtime/editor/translations/de.json +51 -19
  211. package/dist/runtime/editor/translations/fr.json +16 -4
  212. package/dist/runtime/editor/translations/gsw_CH.json +44 -19
  213. package/dist/runtime/editor/translations/it.json +16 -4
  214. package/package.json +4 -5
  215. package/dist/runtime/editor/plugins/ViewOption/index.d.vue.ts +0 -139
  216. package/dist/runtime/editor/plugins/ViewOption/index.vue +0 -99
  217. 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-normal _bk_border-scheme-normal/50 _bk_group-hover:border-scheme-normal _bk_group-hover:text-scheme-dark _bk_rounded"
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 :disabled="closeDisabled" @click="$emit('close')">
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 data-test="dialog-cancel" @click="$emit('cancel')">
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
- onBeforeUnmount(() => override.restore());
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
- defineExpose({ updateRects });
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;
@@ -103,6 +103,7 @@ function onUpdateReasons(id, value) {
103
103
  reasons[id] = value;
104
104
  }
105
105
  function onApply() {
106
+ highlight.value?.commitSelected();
106
107
  emit("apply", {
107
108
  selected: { ...selected },
108
109
  reasons: { ...reasons }
@@ -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="{
@@ -6,7 +6,6 @@
6
6
  <textarea
7
7
  :id
8
8
  :value
9
- data-test="textarea"
10
9
  class="bk-form-input"
11
10
  :placeholder
12
11
  :required
@@ -6,6 +6,7 @@ type __VLS_Props = {
6
6
  disabledReason?: string | null;
7
7
  colorScheme?: 'light' | 'dark';
8
8
  stretch?: boolean;
9
+ hideInput?: boolean;
9
10
  };
10
11
  type __VLS_ModelProps = {
11
12
  modelValue?: boolean;
@@ -7,7 +7,13 @@
7
7
  }"
8
8
  >
9
9
  <slot />
10
- <input v-model="value" type="checkbox" class="_bk_sr-only" :disabled />
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 });
@@ -6,6 +6,7 @@ type __VLS_Props = {
6
6
  disabledReason?: string | null;
7
7
  colorScheme?: 'light' | 'dark';
8
8
  stretch?: boolean;
9
+ hideInput?: boolean;
9
10
  };
10
11
  type __VLS_ModelProps = {
11
12
  modelValue?: boolean;
@@ -1,7 +1,6 @@
1
1
  <template>
2
2
  <div
3
3
  class="bk-form-overlay bk-vars"
4
- :data-test="'form-overlay-' + id"
5
4
  @click.stop
6
5
  @mousedown.stop
7
6
  @keyup.stop
@@ -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 class="bk-message-content" @click="$emit('close')">
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 }}
@@ -32,6 +32,9 @@ onBlokkliEvent("message", (message) => {
32
32
  messages.value.push(message);
33
33
  }
34
34
  });
35
+ onBlokkliEvent("message:clear", () => {
36
+ messages.value = [];
37
+ });
35
38
  </script>
36
39
 
37
40
  <script>
@@ -18,7 +18,7 @@
18
18
  <Icon name="bk_mdi_close" class="_bk_size-15" />
19
19
  </button>
20
20
  </div>
21
- <div class="_bk_overflow-auto bk-scrollbar-light _bk_h-[500px]">
21
+ <div class="_bk_overflow-auto bk-scrollbar-light _bk_h-[500px] _bk_bg-white">
22
22
  <slot />
23
23
  </div>
24
24
  </div>
@@ -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" data-test="schedule-date">
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;