@orangelogic/design-system 4.2.0 → 4.4.0

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 (243) hide show
  1. package/library/chunks/{_baseXor.DixEm6JQ.js → _baseXor.BCxbgizO.js} +2 -2
  2. package/library/chunks/{asset-link-format.CVwjA_yf.js → asset-link-format.DTLA2CFh.js} +435 -415
  3. package/library/chunks/{button.D1YIxtv-.js → button.cbDkxJHn.js} +3 -3
  4. package/library/chunks/button.styles.D3GdfF7I.js +5 -0
  5. package/library/chunks/{color-swatch-group.BPXiMxjh.js → color-swatch-group.CZSeCrot.js} +3279 -2903
  6. package/library/chunks/color.CIHdfM_a.js +187 -0
  7. package/library/chunks/{confirm-popover.CJXyEa5A.js → confirm-popover.Dvgoz-oA.js} +4 -4
  8. package/library/chunks/content-builder.CBBdfVOl.js +55 -0
  9. package/library/chunks/{dialog.BbQ4Du0M.js → dialog.BvSMV36r.js} +2 -2
  10. package/library/chunks/{document-viewer.DtBW-p7z.js → document-viewer.BLdEjbza.js} +11 -10
  11. package/library/chunks/{dom.DL-cNKsj.js → dom.D0lSUoEI.js} +1 -1
  12. package/library/chunks/{dot-pagination.CJRAtM51.js → dot-pagination.CukHxNBk.js} +1 -1
  13. package/library/chunks/{folder-select.BAPsI-gg.js → folder-select.DAZQRdLq.js} +5 -5
  14. package/library/chunks/form-control.styles.CHC7Q08Q.js +5 -0
  15. package/library/chunks/{form.DN2v7-DH.js → form.LpappO1d.js} +1 -1
  16. package/library/chunks/{header.BioJzPlg.js → header.2RH_nPmz.js} +132 -90
  17. package/library/chunks/{i18n.rtxrs1c1.js → i18n.BSPmBQ73.js} +94 -12
  18. package/library/chunks/{icon-button.CbUddcgI.js → icon-button.DV5Fks8j.js} +1 -1
  19. package/library/chunks/{iframe.y7iCAVZP.js → iframe.ddX2kGu3.js} +1 -1
  20. package/library/chunks/{image.A2hE1WoV.js → image.BM7bPTub.js} +407 -276
  21. package/library/chunks/index.DKKvxBAi.js +1130 -0
  22. package/library/chunks/{input.D1FFprPl.js → input.7pumTpdu.js} +3 -3
  23. package/library/chunks/{markdown.Dd_GFJK8.js → markdown.LHSzm035.js} +3 -3
  24. package/library/chunks/{menu-item.CbqZ66to.js → menu-item.CqPvDGeN.js} +1 -1
  25. package/library/chunks/{option.CkhHTlpl.js → option.dBUWN4sF.js} +1 -1
  26. package/library/chunks/{pagination.BlQRt932.js → pagination.C2f8lUVb.js} +6 -6
  27. package/library/chunks/{position-picker.DjnhxIKF.js → position-picker.qkbJlboF.js} +12 -0
  28. package/library/chunks/{resizable-component.styles.CAfXABBc.js → resizable-component.styles.kMFDlGgv.js} +2 -2
  29. package/library/chunks/responsive.BmBJSzC4.js +17 -0
  30. package/library/chunks/{string.Demn8Xmk.js → string.CfI2ejyR.js} +3 -3
  31. package/library/chunks/{tab-group.CQfcMVEw.js → tab-group.DOnaT12G.js} +312 -310
  32. package/library/chunks/toast.D3AW3RWv.js +94 -0
  33. package/library/chunks/transformation.Dm-pK2ft.js +352 -0
  34. package/library/chunks/{tree.B7IKBX3n.js → tree.CHQ1WjZV.js} +1 -1
  35. package/library/chunks/{types.MwUT4xFk.js → types.PdpKNndx.js} +77402 -54714
  36. package/library/chunks/typography.BLYdTF0n.js +102 -0
  37. package/library/components/alert.js +2 -2
  38. package/library/components/asset-link-format.js +6 -6
  39. package/library/components/atoms.js +161 -159
  40. package/library/components/audio.js +4 -4
  41. package/library/components/bicolor-picker.js +2 -2
  42. package/library/components/border-input-group.js +2 -2
  43. package/library/components/box.d.ts +3 -0
  44. package/library/components/box.js +22 -0
  45. package/library/components/breadcrumb.js +1 -1
  46. package/library/components/button.js +4 -4
  47. package/library/components/card.js +7 -7
  48. package/library/components/checkbox.js +2 -2
  49. package/library/components/color-picker.js +36 -32
  50. package/library/components/color-swatch-group.js +8 -7
  51. package/library/components/color-swatch.js +246 -22
  52. package/library/components/confirm-popover.js +5 -5
  53. package/library/components/copy-button.js +2 -2
  54. package/library/components/corner-position-input-group.js +3 -3
  55. package/library/components/date-calendar.js +1 -1
  56. package/library/components/details.js +19 -19
  57. package/library/components/dialog.js +3 -3
  58. package/library/components/diff.js +1 -1
  59. package/library/components/document-viewer.js +5 -5
  60. package/library/components/dot-pagination.js +2 -2
  61. package/library/components/drawer.js +2 -2
  62. package/library/components/dropdown.js +2 -2
  63. package/library/components/dynamic-select.js +95 -92
  64. package/library/components/e-chart.js +1 -1
  65. package/library/components/element-clamp.js +2 -2
  66. package/library/components/file-on-demand.js +12 -12
  67. package/library/components/folder-select.js +5 -5
  68. package/library/components/format-bytes.js +1 -1
  69. package/library/components/format-date.js +1 -1
  70. package/library/components/format-number.js +1 -1
  71. package/library/components/format-time.js +1 -1
  72. package/library/components/header.js +6 -3
  73. package/library/components/icon-button.js +2 -2
  74. package/library/components/iframe.js +2 -2
  75. package/library/components/image-comparer.js +1 -1
  76. package/library/components/image.js +5 -4
  77. package/library/components/input-group.js +1 -1
  78. package/library/components/input.js +4 -4
  79. package/library/components/line-clamp.js +1 -1
  80. package/library/components/markdown.js +4 -4
  81. package/library/components/masonry.js +70 -56
  82. package/library/components/menu-item.js +2 -2
  83. package/library/components/menu.js +2 -2
  84. package/library/components/molecules.js +4 -4
  85. package/library/components/mutation-observer.js +25 -23
  86. package/library/components/option.js +2 -2
  87. package/library/components/organisms.js +2 -2
  88. package/library/components/padding-input-group.js +1 -1
  89. package/library/components/pagination.js +7 -7
  90. package/library/components/popup.js +1 -1
  91. package/library/components/position-picker.js +2 -2
  92. package/library/components/progress-bar.js +1 -1
  93. package/library/components/progress-ring.js +1 -1
  94. package/library/components/radio-button.js +1 -1
  95. package/library/components/radio-card.js +1 -1
  96. package/library/components/radio-group.js +2 -2
  97. package/library/components/range.js +3 -3
  98. package/library/components/rating.js +1 -1
  99. package/library/components/relative-time.js +1 -1
  100. package/library/components/select.js +5 -5
  101. package/library/components/shadow-input-group.js +1 -1
  102. package/library/components/share-option-list.js +3 -3
  103. package/library/components/sidebar.js +1 -1
  104. package/library/components/size-input-group.js +3 -3
  105. package/library/components/spinner.js +1 -1
  106. package/library/components/split-panel.js +1 -1
  107. package/library/components/switch.js +2 -2
  108. package/library/components/tab-group.js +6 -6
  109. package/library/components/tab-panel.js +1 -1
  110. package/library/components/tab.js +16 -16
  111. package/library/components/tag.js +2 -2
  112. package/library/components/textarea.js +2 -2
  113. package/library/components/timecode.js +2 -2
  114. package/library/components/tooltip.js +1 -1
  115. package/library/components/tree-item.js +2 -2
  116. package/library/components/tree.js +2 -2
  117. package/library/components/typeface.js +3 -3
  118. package/library/components/types.js +496 -487
  119. package/library/components/typography.js +3 -2
  120. package/library/components/video.js +5277 -5209
  121. package/library/css/ol-base.css +1 -0
  122. package/library/package.json +1 -1
  123. package/library/packages/atoms/src/components/box/box.d.ts +26 -0
  124. package/library/packages/atoms/src/components/box/box.styles.d.ts +7 -0
  125. package/library/packages/atoms/src/components/button/button.d.ts +4 -0
  126. package/library/packages/atoms/src/components/card/card.d.ts +1 -0
  127. package/library/packages/atoms/src/components/color-picker/color-picker.d.ts +11 -0
  128. package/library/packages/atoms/src/components/copy-button/copy-button.d.ts +1 -0
  129. package/library/packages/atoms/src/components/details/details.d.ts +6 -1
  130. package/library/packages/atoms/src/components/header/header.d.ts +38 -2
  131. package/library/packages/atoms/src/components/image/image.d.ts +30 -0
  132. package/library/packages/atoms/src/components/mutation-observer/mutation-observer.d.ts +1 -1
  133. package/library/packages/atoms/src/components/radio-card/radio-card.d.ts +1 -0
  134. package/library/packages/atoms/src/components/tab/tab.d.ts +17 -0
  135. package/library/packages/atoms/src/components/typography/typography.d.ts +31 -0
  136. package/library/packages/atoms/src/components/video/video.d.ts +24 -0
  137. package/library/packages/atoms/src/index.d.ts +1 -0
  138. package/library/packages/events/src/cx-asset-transformation-dialog-confirm.d.ts +2 -0
  139. package/library/packages/events/src/cx-color-swatch-picker-columns-change.d.ts +15 -0
  140. package/library/packages/events/src/events.d.ts +1 -0
  141. package/library/packages/hybrid/table-core/src/table/table.d.ts +10 -1
  142. package/library/packages/molecules/src/color-swatch/color-swatch.d.ts +35 -1
  143. package/library/packages/molecules/src/data-tab-group/data-tab-group.d.ts +30 -1
  144. package/library/packages/molecules/src/details-group/details-group.d.ts +105 -3
  145. package/library/packages/molecules/src/dynamic-select/dynamic-select.d.ts +5 -0
  146. package/library/packages/molecules/src/font-picker/font-picker.d.ts +3 -0
  147. package/library/packages/molecules/src/gallery-item/gallery-item.d.ts +10 -0
  148. package/library/packages/molecules/src/icon-picker/icon-picker.d.ts +5 -6
  149. package/library/packages/molecules/src/index.d.ts +0 -1
  150. package/library/packages/molecules/src/masonry/masonry.d.ts +5 -0
  151. package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +6 -0
  152. package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.d.ts +5 -1
  153. package/library/packages/organisms/src/color-swatch-group/color-swatch-group.constants.d.ts +37 -45
  154. package/library/packages/organisms/src/color-swatch-group/color-swatch-group.d.ts +210 -10
  155. package/library/packages/organisms/src/content-builder/blocks/font-kit-advanced/font-kit-advanced.utils.d.ts +85 -0
  156. package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +32 -9
  157. package/library/packages/organisms/src/content-builder/components/block-picker/block-picker.d.ts +24 -8
  158. package/library/packages/organisms/src/content-builder/components/color-swatch-picker/color-swatch-picker.d.ts +70 -1
  159. package/library/packages/organisms/src/content-builder/components/config-form/config-form-controller.d.ts +1 -22
  160. package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +7 -0
  161. package/library/packages/organisms/src/content-builder/components/gallery-config/gallery-config.d.ts +6 -0
  162. package/library/packages/organisms/src/content-builder/components/gallery-picker/gallery-picker.d.ts +1 -0
  163. package/library/packages/organisms/src/content-builder/configs/accordion.d.ts +7 -0
  164. package/library/packages/organisms/src/content-builder/configs/audio.d.ts +1 -0
  165. package/library/packages/organisms/src/content-builder/configs/button.d.ts +2 -1
  166. package/library/packages/organisms/src/content-builder/configs/carousel.d.ts +11 -1
  167. package/library/packages/organisms/src/content-builder/configs/color-swatches.d.ts +19 -1
  168. package/library/packages/organisms/src/content-builder/configs/column-group.d.ts +11 -2
  169. package/library/packages/organisms/src/content-builder/configs/column.d.ts +13 -3
  170. package/library/packages/organisms/src/content-builder/configs/dam-view.d.ts +1 -0
  171. package/library/packages/organisms/src/content-builder/configs/divider.d.ts +1 -0
  172. package/library/packages/organisms/src/content-builder/configs/document-viewer.d.ts +1 -0
  173. package/library/packages/organisms/src/content-builder/configs/font-kit-advanced.d.ts +19 -0
  174. package/library/packages/organisms/src/content-builder/configs/font-kit.d.ts +2 -0
  175. package/library/packages/organisms/src/content-builder/configs/gallery.d.ts +15 -1
  176. package/library/packages/organisms/src/content-builder/configs/header.d.ts +3 -1
  177. package/library/packages/organisms/src/content-builder/configs/image.d.ts +4 -0
  178. package/library/packages/organisms/src/content-builder/configs/index.d.ts +1 -0
  179. package/library/packages/organisms/src/content-builder/configs/search-box.d.ts +5 -1
  180. package/library/packages/organisms/src/content-builder/configs/tab-group.d.ts +7 -4
  181. package/library/packages/organisms/src/content-builder/configs/timeline.d.ts +1 -0
  182. package/library/packages/organisms/src/content-builder/configs/video.d.ts +3 -0
  183. package/library/packages/organisms/src/content-builder/configs-controller.d.ts +168 -13
  184. package/library/packages/organisms/src/content-builder/content-builder-config.d.ts +60 -0
  185. package/library/packages/organisms/src/content-builder/content-builder-constants.d.ts +27 -0
  186. package/library/packages/organisms/src/content-builder/content-builder.d.ts +122 -2
  187. package/library/packages/organisms/src/content-builder/content-builder.sections.utils.d.ts +78 -0
  188. package/library/packages/organisms/src/content-builder/content-builder.utils.d.ts +33 -2
  189. package/library/packages/organisms/src/content-builder/plugins/font-kit-advanced.d.ts +5 -0
  190. package/library/packages/organisms/src/content-builder/plugins/gallery.d.ts +6 -0
  191. package/library/packages/organisms/src/content-builder/plugins/header.d.ts +7 -1
  192. package/library/packages/organisms/src/content-builder/plugins/index.d.ts +2 -1
  193. package/library/packages/organisms/src/content-builder/plugins/rich-text-editor/components/rte-bubble-menu/rte-bubble-menu.d.ts +21 -1
  194. package/library/packages/organisms/src/content-builder/plugins/rich-text-editor/extensions/index.d.ts +2 -0
  195. package/library/packages/organisms/src/content-builder/plugins/rich-text-editor/rte-configs.d.ts +14 -0
  196. package/library/packages/organisms/src/content-builder/plugins/sections/section-fragment-component.d.ts +22 -0
  197. package/library/packages/organisms/src/content-builder/plugins/sections/section-host-mounting.d.ts +15 -0
  198. package/library/packages/organisms/src/content-builder/plugins/sections/sections-canvas-patches.d.ts +20 -0
  199. package/library/packages/organisms/src/content-builder/plugins/sections/sections-plugin.d.ts +7 -0
  200. package/library/packages/organisms/src/content-builder/plugins/toolbar.d.ts +10 -1
  201. package/library/packages/organisms/src/content-builder/plugins/utils/block-width.d.ts +20 -0
  202. package/library/packages/organisms/src/content-builder/styleController.d.ts +11 -5
  203. package/library/packages/organisms/src/content-builder-viewer/content-builder-viewer.d.ts +1 -0
  204. package/library/packages/organisms/src/form/control-renderer/control-renderer.d.ts +176 -0
  205. package/library/packages/organisms/src/form/control-renderer/control-renderer.styles.d.ts +9 -0
  206. package/library/packages/organisms/src/list-editor/list-editor.d.ts +181 -6
  207. package/library/packages/tools/src/tiptap/extensions/metafield/index.d.ts +12 -0
  208. package/library/packages/tools/src/tiptap/utils/md/schema.d.ts +1 -1
  209. package/library/packages/types/src/asset-link-format.d.ts +0 -1
  210. package/library/packages/types/src/button.d.ts +1 -1
  211. package/library/packages/types/src/color-swatch-group.d.ts +56 -0
  212. package/library/packages/types/src/color-swatch.d.ts +22 -0
  213. package/library/packages/types/src/column.d.ts +13 -0
  214. package/library/packages/types/src/content-builder.d.ts +73 -4
  215. package/library/packages/types/src/details-group.d.ts +80 -0
  216. package/library/packages/types/src/font-kit-advanced.d.ts +28 -0
  217. package/library/packages/types/src/font-kit.d.ts +19 -0
  218. package/library/packages/types/src/font-picker.d.ts +2 -0
  219. package/library/packages/types/src/gallery-item.d.ts +3 -1
  220. package/library/packages/types/src/gallery.d.ts +2 -1
  221. package/library/packages/types/src/index.d.ts +1 -0
  222. package/library/packages/types/src/masonry.d.ts +1 -0
  223. package/library/packages/types/src/position-picker.d.ts +6 -0
  224. package/library/packages/types/src/sb-button.d.ts +7 -0
  225. package/library/packages/types/src/search-box.d.ts +4 -0
  226. package/library/packages/utils/src/color/color.d.ts +27 -3
  227. package/library/packages/utils/src/custom-element/i18n.d.ts +86 -0
  228. package/library/packages/utils/src/font/font.d.ts +12 -0
  229. package/library/packages/utils/src/transformation/transformation.d.ts +11 -3
  230. package/library/react-web-component.d.ts +514 -156
  231. package/library/utils.js +415 -395
  232. package/package.json +1 -1
  233. package/library/chunks/button.styles.BWgHrfLD.js +0 -5
  234. package/library/chunks/color-swatch.DdsUysbF.js +0 -223
  235. package/library/chunks/color.LzSGBy7o.js +0 -164
  236. package/library/chunks/form-control.styles.CaGWmeAS.js +0 -5
  237. package/library/chunks/index.BO_sT6SH.js +0 -20123
  238. package/library/chunks/toast.BOkYwUIj.js +0 -109
  239. package/library/chunks/transformation.B8m0Nbao.js +0 -384
  240. package/library/chunks/typography.T72DuoCa.js +0 -52
  241. package/library/packages/molecules/src/search-box/search-box.d.ts +0 -114
  242. package/library/packages/organisms/src/content-builder/plugins/wrapper-container.d.ts +0 -15
  243. /package/library/packages/{molecules/src/search-box/search-box.styles.d.ts → organisms/src/content-builder-viewer/content-builder-viewer.styles.d.ts} +0 -0
@@ -0,0 +1,1130 @@
1
+ import { C as N } from "./typography.BLYdTF0n.js";
2
+ import { n, C as O } from "./lib-cortex-element.CVMmyPMC.js";
3
+ import { c as M } from "./component.styles.CAS3c9pM.js";
4
+ import { s as V } from "./folder-select.DAZQRdLq.js";
5
+ import { E as F, B as H } from "./content-builder.CBBdfVOl.js";
6
+ import { c as j } from "./custom-element.L4WJXn1j.js";
7
+ import { L as R } from "./i18n.BSPmBQ73.js";
8
+ import { w as k } from "./watch.DJF5K-8U.js";
9
+ import { B as U, E as P, i as G, x as h } from "./lit-element.jLBm65_O.js";
10
+ import { r as g } from "./state.CSDxrqLd.js";
11
+ import { e as $ } from "./query.BBf1UFkC.js";
12
+ import { b as W } from "./_baseIteratee.sC2wLi2m.js";
13
+ import { a as J } from "./toString.B1zKIiZc.js";
14
+ import { b as X } from "./cloneDeep.tKGbEwzn.js";
15
+ import { c as Y } from "./_baseClone.ipmFlCAx.js";
16
+ import { F as _, a as Q, C as Z, I as tt, t as et, c as ot, b as st, d as rt, e as it, f as at, g as nt, h as lt, i as ct, j as pt, k as ht, l as dt, m as ut, n as mt, o as ft, p as gt, q as bt, r as yt, s as xt, O as Ct } from "./types.PdpKNndx.js";
17
+ import { C as wt } from "./button.cbDkxJHn.js";
18
+ import vt from "../components/button-group.js";
19
+ import kt from "../components/card.js";
20
+ import $t from "../components/checkbox.js";
21
+ import { C as Tt, D } from "./dialog.BvSMV36r.js";
22
+ import St from "../components/divider.js";
23
+ import At from "../components/dropdown.js";
24
+ import Ft from "../components/grid.js";
25
+ import Pt from "../components/grid-item.js";
26
+ import { C as _t } from "./icon.BLXWp6CU.js";
27
+ import { C as Rt } from "./input.7pumTpdu.js";
28
+ import Dt from "../components/line-clamp.js";
29
+ import It from "../components/menu.js";
30
+ import { C as qt } from "./menu-item.CqPvDGeN.js";
31
+ import { C as Lt } from "./option.dBUWN4sF.js";
32
+ import Bt from "../components/radio.js";
33
+ import Et from "../components/radio-card.js";
34
+ import zt from "../components/radio-group.js";
35
+ import Nt from "../components/select.js";
36
+ import Ot from "../components/space.js";
37
+ import Mt from "../components/switch.js";
38
+ import Vt from "../components/tab.js";
39
+ import { C as jt } from "./tab-group.DOnaT12G.js";
40
+ import Gt from "../components/tab-panel.js";
41
+ import Wt from "../components/textarea.js";
42
+ import Kt from "../components/tooltip.js";
43
+ import Ht from "../components/visually-hidden.js";
44
+ import Ut from "../components/bicolor-picker.js";
45
+ import Jt from "../components/border-input-group.js";
46
+ import { C as Xt, a as Yt } from "./confirm-popover.Dvgoz-oA.js";
47
+ import Qt from "../components/corner-position-input-group.js";
48
+ import Zt from "../components/dynamic-select.js";
49
+ import te from "../components/padding-input-group.js";
50
+ import ee from "../components/position-picker.js";
51
+ import oe from "../components/shadow-input-group.js";
52
+ import se from "../components/size-input-group.js";
53
+ import { isFormInteracted as re } from "../utils.js";
54
+ import { e as ie, i as ae } from "./directive.oAbCiebi.js";
55
+ import { e as I, p as q, m as L, s as B, h as ne, l as le } from "./directive-helpers.DEDMV45_.js";
56
+ import { i as ce } from "./keyed.DdOUTIg-.js";
57
+ import { c as A } from "./repeat.CFjcER6_.js";
58
+ import { n as y } from "./when.Dr1es41R.js";
59
+ import { b as pe } from "./_baseXor.BCxbgizO.js";
60
+ import { a as he, i as E, b as de } from "./isArrayLikeObject.D7afXo-f.js";
61
+ import { i as ue } from "./isEmpty.DtTJTUcf.js";
62
+ import { u as K } from "./asset-link-format.DTLA2CFh.js";
63
+ import { r as me } from "./choose.BTbF6BAn.js";
64
+ import { o as S } from "./if-defined.BRoBj_Rp.js";
65
+ import { o as fe } from "./map.D8heArFD.js";
66
+ import { e as ge, n as be } from "./ref.DktKp7fP.js";
67
+ import { o as ye } from "./style-map.llVFPd__.js";
68
+ var xe = "Expected a function";
69
+ function Ce(t) {
70
+ if (typeof t != "function")
71
+ throw new TypeError(xe);
72
+ return function() {
73
+ var e = arguments;
74
+ switch (e.length) {
75
+ case 0:
76
+ return !t.call(this);
77
+ case 1:
78
+ return !t.call(this, e[0]);
79
+ case 2:
80
+ return !t.call(this, e[0], e[1]);
81
+ case 3:
82
+ return !t.call(this, e[0], e[1], e[2]);
83
+ }
84
+ return !t.apply(this, e);
85
+ };
86
+ }
87
+ function we(t, e) {
88
+ if (t == null)
89
+ return {};
90
+ var o = J(Y(t), function(a) {
91
+ return [a];
92
+ });
93
+ return e = W(e), X(t, o, function(a, i) {
94
+ return e(a, i[0]);
95
+ });
96
+ }
97
+ function ve(t, e) {
98
+ return we(t, Ce(W(e)));
99
+ }
100
+ const ke = /* @__PURE__ */ new Map([
101
+ ["100", "Thin"],
102
+ ["200", "Extra Light"],
103
+ ["300", "Light"],
104
+ ["400", "Regular"],
105
+ ["500", "Medium"],
106
+ ["600", "Semi Bold"],
107
+ ["700", "Bold"],
108
+ ["800", "Extra Bold"],
109
+ ["900", "Black"]
110
+ ]);
111
+ _.Cff, _.TrueType;
112
+ new Set(Object.values(_));
113
+ new RegExp(
114
+ `\\$\\{(${Object.values(Q).join("|")})\\}`,
115
+ "g"
116
+ );
117
+ function $e(t) {
118
+ return /italic/i.test(t) ? "italic" : "normal";
119
+ }
120
+ function Te(t) {
121
+ return ke.get(t.trim()) ?? t;
122
+ }
123
+ function Se(t) {
124
+ const e = /* @__PURE__ */ new Map();
125
+ for (const o of t) {
126
+ const a = $e(o.fontStyle), i = Number(o.fontWeight) || 400, r = `${i}:${a}`;
127
+ e.has(r) || e.set(r, {
128
+ fontStyle: a,
129
+ fontWeight: i,
130
+ name: `${Te(String(i))}${a === "italic" ? " Italic" : ""}`
131
+ });
132
+ }
133
+ return [...e.values()].sort(
134
+ (o, a) => (o.fontWeight ?? 400) - (a.fontWeight ?? 400) || (o.fontStyle ?? "").localeCompare(a.fontStyle ?? "")
135
+ );
136
+ }
137
+ /**
138
+ * @license
139
+ * Copyright 2017 Google LLC
140
+ * SPDX-License-Identifier: BSD-3-Clause
141
+ */
142
+ const z = (t) => le(t) ? t._$litType$.h : t.strings, Ae = ie(class extends ae {
143
+ constructor(t) {
144
+ super(t), this.et = /* @__PURE__ */ new WeakMap();
145
+ }
146
+ render(t) {
147
+ return [t];
148
+ }
149
+ update(t, [e]) {
150
+ const o = I(this.it) ? z(this.it) : null, a = I(e) ? z(e) : null;
151
+ if (o !== null && (a === null || o !== a)) {
152
+ const i = q(t).pop();
153
+ let r = this.et.get(o);
154
+ if (r === void 0) {
155
+ const s = document.createDocumentFragment();
156
+ r = U(P, s), r.setConnected(!1), this.et.set(o, r);
157
+ }
158
+ L(r, [i]), B(r, void 0, i);
159
+ }
160
+ if (a !== null) {
161
+ if (o === null || o !== a) {
162
+ const i = this.et.get(a);
163
+ if (i !== void 0) {
164
+ const r = q(i).pop();
165
+ ne(t), B(t, void 0, r), L(t, [r]);
166
+ }
167
+ }
168
+ this.it = e;
169
+ } else this.it = void 0;
170
+ return this.render(e);
171
+ }
172
+ });
173
+ var Fe = he(function(t, e) {
174
+ return E(t) ? pe(t, de(e, 1, E, !0)) : [];
175
+ });
176
+ const Pe = G`:host{display:block}.config-form{--body-spacing:0;--header-spacing:var(--cx-spacing-small) var(--cx-spacing-large) 0;--width:680px;--cx-input-required-content-display:none;color:var(--cx-color-neutral)}.config-form__dropdown{text-align:left}.config-form__checkbox-group-item{--item-padding:0;--selected-background-color:transparent}.config-form__radio-card{--radio-card-overflow:clip}.config-form__dropdown-menu{--checked-icon-display:none}.config-form__confirm-popover{--confirm-popover-dialog-width:fit-content;--confirm-button-background-color:var(--cx-color-danger-500);--cancel-button-background-color:var(--cx-color-neutral-100);--cancel-button-color:var(--cx-color-neutral-700)}.config-form__tab-group{--padding:0;--tab-group-nav-padding:0 var(--cx-spacing-large);--tab-group-top-gap:0}.config-form__tab-group::part(nav){background-color:var(--cx-color-neutral-0);z-index:1;position:sticky;top:0}`;
177
+ class _e {
178
+ constructor(e) {
179
+ this.host = e, this.localize = new R(this.host), this.controlRenderer = new Z(this.host, {
180
+ commit: async ({ callback: o, immediate: a, key: i, type: r, value: s }) => {
181
+ if (a && r === "attribute") {
182
+ this.handleAttributeChange(i, s, o);
183
+ return;
184
+ }
185
+ await this.handleConfigChange(i, s, r, o);
186
+ },
187
+ getContext: () => ({
188
+ allowedFolders: this.host.allowedFolders,
189
+ baseUrl: this.host.baseUrl,
190
+ blockAttributes: this.host.blockAttributes,
191
+ blockStyles: this.host.blockStyles,
192
+ boundary: this.host.boundary,
193
+ defaultLanguage: this.host.defaultLanguage,
194
+ isAfterShow: this.host.isAfterShow,
195
+ onConfigureWorkflow: this.host.onConfigureWorkflow,
196
+ onRequestAsset: this.host.onRequestAsset,
197
+ onRequestAssetFormat: this.host.onRequestAssetFormat,
198
+ onRequestDownloadFormat: this.host.onRequestDownloadFormat,
199
+ sortedLanguages: this.host.sortedLanguages,
200
+ token: this.host.token,
201
+ traits: this.host.traits
202
+ }),
203
+ renderChildren: (o, a) => this.renderBasicControls(o, a)
204
+ });
205
+ }
206
+ hostConnected() {
207
+ this.host.addController(this);
208
+ }
209
+ handleStyleChange(e, o, a) {
210
+ let i = { ...this.host.blockStyles };
211
+ a && (i = a({
212
+ record: i,
213
+ value: o
214
+ })), i = {
215
+ ...i,
216
+ [e]: o
217
+ }, this.host.emit("cx-content-builder-form-change", {
218
+ detail: {
219
+ type: "style",
220
+ value: i
221
+ }
222
+ });
223
+ }
224
+ handleAttributeChange(e, o, a) {
225
+ let i = { ...this.host.blockAttributes };
226
+ a && (i = a({
227
+ record: i,
228
+ value: o
229
+ })), i = {
230
+ ...i,
231
+ [e]: o
232
+ }, this.host.emit("cx-content-builder-form-change", {
233
+ detail: {
234
+ type: "attribute",
235
+ value: i
236
+ }
237
+ });
238
+ }
239
+ handlePropertyChange(e, o, a) {
240
+ let i = { ...this.host.blockProperties };
241
+ a && (i = a({
242
+ record: i,
243
+ value: o
244
+ })), i = {
245
+ ...i,
246
+ [e]: o
247
+ }, this.host.emit("cx-content-builder-form-change", {
248
+ detail: {
249
+ type: "property",
250
+ value: i
251
+ }
252
+ });
253
+ }
254
+ async handleConfigChange(e, o, a, i) {
255
+ if (await this.host.updateComplete, a === "attribute") {
256
+ let r;
257
+ typeof o == "boolean" ? r = o : typeof o == "object" || Array.isArray(o) ? r = JSON.stringify(o) : r = String(o), this.handleAttributeChange(e, r, i);
258
+ } else a === "style" ? this.handleStyleChange(e, String(o), i) : a === "property" && this.handlePropertyChange(e, o, i);
259
+ }
260
+ renderInfoText(e) {
261
+ let o = "";
262
+ typeof e.helpText == "function" ? o = e.helpText(this.host.blockAttributes) : e.helpText && (o = e.helpText);
263
+ const a = e.infoTextConfigs?.color, i = ye(a ? { "--color": a } : {});
264
+ return h`<cx-space class="config-form__info-text" direction="vertical" spacing="x-small" wrap="nowrap">${y(
265
+ e.label,
266
+ () => h`<cx-typography variant="body3" style=${i}>${e.label}</cx-typography>`
267
+ )}
268
+ ${y(
269
+ o,
270
+ () => h`<cx-typography variant="body3" class="config-form__help-text" style=${i}>${o}</cx-typography>`
271
+ )}</cx-space>`;
272
+ }
273
+ renderBasicControl({
274
+ container: e = void 0,
275
+ currentValue: o,
276
+ disabled: a,
277
+ key: i,
278
+ trait: r,
279
+ type: s
280
+ }) {
281
+ const u = r.label;
282
+ let m = "";
283
+ typeof r.helpText == "function" ? m = r.helpText(this.host.blockAttributes) : r.helpText && (m = r.helpText);
284
+ const x = this.controlRenderer.createChangeHandler({ key: i, trait: r, type: s });
285
+ return h`<cx-space direction="vertical" spacing="x-small" wrap="nowrap">${this.controlRenderer.renderControl({
286
+ blockAttributes: this.host.blockAttributes,
287
+ container: e,
288
+ currentValue: o,
289
+ disabled: a,
290
+ handleChange: x,
291
+ key: i,
292
+ label: u,
293
+ trait: {
294
+ ...r,
295
+ controlType: r.controlType ? r.controlType : "input"
296
+ }
297
+ })}
298
+ ${y(m, () => h`<cx-typography variant="body3" class="config-form__help-text">${m}</cx-typography>`)}</cx-space>`;
299
+ }
300
+ renderBasicControls(e, o, a) {
301
+ const i = ge(), r = h`
302
+ ${A(
303
+ e.filter((s) => {
304
+ const u = !a || s.name && this.host.tabMap[s.name] === a || o?.name && this.host.tabMap[o.name] === a;
305
+ let m = !1;
306
+ return s.controlType === "placeholder" ? m = !0 : (!this.host.skipShowCheck || !s.skipShowCheck) && (typeof s.show == "boolean" ? m = !s.show : typeof s.show == "function" ? m = !s.show(this.host.blockAttributes) : o && typeof o.show == "boolean" ? m = !o.show : o && typeof o.show == "function" && (m = !o.show(this.host.blockAttributes))), s.id && u && s.show !== !1 && !m;
307
+ }),
308
+ (s) => s.id,
309
+ (s) => {
310
+ const u = s.id;
311
+ let m = s.label;
312
+ const x = s.type ?? "attribute";
313
+ let f = !1;
314
+ typeof s.disabled == "boolean" ? f = s.disabled : typeof s.disabled == "function" && (f = s.disabled(this.host.blockAttributes)), s.controlType === "checkbox" && (m = "");
315
+ let b = "";
316
+ switch (x) {
317
+ case "style":
318
+ this.host.blockStyles[u] !== void 0 && (typeof this.host.blockStyles[u] == "string" && this.host.blockStyles[u].includes("url(") ? b = this.host.blockStyles[u].replace(
319
+ /url\(["']?(.*?)["']?\)/,
320
+ "$1"
321
+ ) : this.host.blockStyles[u] === "none" ? b = "" : b = this.host.blockStyles[u]);
322
+ break;
323
+ case "attribute":
324
+ this.host.blockAttributes[u] !== void 0 ? b = this.host.blockAttributes[u] : s.controlType === "size-input-group" && (b = `${this.host.blockAttributes.width} ${this.host.blockAttributes.height}`);
325
+ break;
326
+ case "property":
327
+ this.host.blockProperties[u] !== void 0 && (b = this.host.blockProperties[u]);
328
+ break;
329
+ }
330
+ if (x === "decorative")
331
+ return me(
332
+ s.controlType,
333
+ [
334
+ [
335
+ "group-heading",
336
+ () => h`<cx-typography variant="h5">${m}</cx-typography>`
337
+ ],
338
+ [
339
+ "info-text",
340
+ () => this.renderInfoText(s)
341
+ ]
342
+ ],
343
+ () => h`<cx-typography variant="h5">${m}</cx-typography>`
344
+ );
345
+ if (o) {
346
+ const w = this.renderBasicControl({
347
+ container: i,
348
+ currentValue: b,
349
+ disabled: f,
350
+ key: u,
351
+ trait: s,
352
+ type: x
353
+ });
354
+ if (o.controlType === "group" && o.groupConfigs?.direction === "horizontal") {
355
+ let C = s.width;
356
+ if (typeof s.width == "function" && (C = s.width(this.host.blockAttributes)), typeof C == "string" && (C = Number.parseInt(C)), C)
357
+ return h`<cx-grid-item xs=${C}>${w}</cx-grid-item>`;
358
+ }
359
+ return w;
360
+ }
361
+ const v = s.direction === "vertical" || s.groupConfigs?.direction === "horizontal" && m === void 0;
362
+ return h`<cx-grid columns="4" spacing="var(--cx-spacing-small)" column-spacing="0" use-flex-gap row-spacing=${s.direction === "vertical" ? "var(--cx-spacing-small)" : "0"} wrap="wrap">${y(
363
+ s.direction === "horizontal" || m !== void 0,
364
+ () => h`<cx-grid-item xs="4" sm=${s.direction === "vertical" ? "4" : "1"}><cx-typography variant="body2">${m}</cx-typography></cx-grid-item>`
365
+ )}<cx-grid-item xs="4" sm=${v ? "4" : "3"}><cx-space direction="vertical" spacing="x-small" wrap="nowrap">${this.renderBasicControl({
366
+ currentValue: b,
367
+ disabled: f,
368
+ key: u,
369
+ trait: s,
370
+ type: x
371
+ })}</cx-space></cx-grid-item></cx-grid>`;
372
+ }
373
+ )}
374
+ `;
375
+ if (o) {
376
+ const { controlType: s, groupConfigs: u } = o;
377
+ if (s === "group" && u?.direction === "horizontal") {
378
+ const { columnGap: m, gap: x, rowGap: f, wrap: b } = u;
379
+ return h`<cx-grid columns="100" use-flex-gap spacing=${S(x)} column-spacing=${S(m)} row-spacing=${S(f)} wrap=${S(b)} ${be(i)}>${r}</cx-grid>`;
380
+ }
381
+ }
382
+ return h`<cx-space direction="vertical" wrap="nowrap">${r}</cx-space>`;
383
+ }
384
+ renderTranslationControls() {
385
+ const e = K(
386
+ this.host.translatableControls.map((a) => a.translateGroup)
387
+ ), o = h`${A(e, (a) => {
388
+ const i = this.host.translatableControls.filter((r) => {
389
+ let s = !1;
390
+ return (!this.host.skipShowCheck || !r.skipShowCheck) && (typeof r.show == "boolean" ? s = !r.show : typeof r.show == "function" && (s = !r.show(this.host.blockAttributes))), r.translateGroup === a && !s;
391
+ });
392
+ return i.length === 0 ? P : h`<cx-typography variant="h5">${a}</cx-typography>${A(
393
+ i,
394
+ (r) => r.id,
395
+ (r) => r.controlType === "info-text" ? this.renderInfoText(r) : h`<cx-grid columns="4" spacing="var(--cx-spacing-small)" column-spacing="0" use-flex-gap row-spacing="0" wrap="wrap"><cx-grid-item xs="4" sm="1"><cx-typography variant="body2">${r.label}</cx-typography></cx-grid-item><cx-grid-item xs="4" sm="3"><cx-space direction="vertical" spacing="x-small" wrap="nowrap">${fe(this.host.sortedLanguages, (s) => {
396
+ const u = this.localize.languageName(s) || tt.getName(s) || s;
397
+ let m = "";
398
+ r.id && (s === this.host.defaultLanguage ? m = this.host.blockAttributes[r.id] ?? "" : m = this.host.translatableControlValues[s]?.[r.id] ?? this.host.translatableControlValues[this.host.defaultLanguage]?.[r.id] ?? this.host.blockAttributes[r.id]);
399
+ let x;
400
+ switch (r.controlType) {
401
+ case "image-picker": {
402
+ x = async (f) => {
403
+ if (typeof f == "object" && f !== null) {
404
+ const { id: b, src: v } = f, w = r.pickerConfigs?.recordIdKey ?? "record-id", C = r.pickerConfigs?.aspectRatioKey, T = b ? await this.controlRenderer.resolveAssetFormat(b, r.pickerConfigs?.defaultFormat ?? "") : { aspectRatio: 0, src: "" };
405
+ this.host.emit("cx-content-builder-translatable-value-change", {
406
+ detail: {
407
+ language: s,
408
+ values: [{
409
+ attribute: r.id,
410
+ type: "attribute",
411
+ value: T.src || v
412
+ }, {
413
+ attribute: w,
414
+ type: "attribute",
415
+ value: b
416
+ }, ...C ? [{
417
+ attribute: C,
418
+ type: "attribute",
419
+ value: String(T.aspectRatio)
420
+ }] : []]
421
+ }
422
+ });
423
+ }
424
+ };
425
+ break;
426
+ }
427
+ case "audio-picker":
428
+ case "video-picker": {
429
+ x = async (f) => {
430
+ if (typeof f == "object" && f !== null) {
431
+ const { id: b, name: v, src: w } = f, C = r.pickerConfigs?.recordIdKey ?? "record-id", T = r.pickerConfigs?.nameKey ?? "name";
432
+ this.host.emit("cx-content-builder-translatable-value-change", {
433
+ detail: {
434
+ language: s,
435
+ values: [{
436
+ attribute: r.id,
437
+ type: "attribute",
438
+ value: w
439
+ }, {
440
+ attribute: C,
441
+ type: "attribute",
442
+ value: b
443
+ }, {
444
+ attribute: T,
445
+ type: "attribute",
446
+ value: v
447
+ }]
448
+ }
449
+ });
450
+ }
451
+ };
452
+ break;
453
+ }
454
+ default:
455
+ x = async (f) => {
456
+ typeof f == "string" && this.host.emit("cx-content-builder-translatable-value-change", {
457
+ detail: {
458
+ language: s,
459
+ values: [{
460
+ attribute: r.id,
461
+ type: "attribute",
462
+ value: f
463
+ }]
464
+ }
465
+ });
466
+ };
467
+ }
468
+ return h`
469
+ ${y(
470
+ r.controlType && r.controlType !== "input",
471
+ () => h`<cx-typography variant="body3">${u}</cx-typography>`,
472
+ () => P
473
+ )}
474
+ ${this.controlRenderer.renderControl({
475
+ blockAttributes: {
476
+ ...this.host.blockAttributes,
477
+ ...this.host.translatableControlValues[s]
478
+ },
479
+ container: void 0,
480
+ currentValue: m,
481
+ disabled: s.toLowerCase() === this.host.defaultLanguage.toLowerCase(),
482
+ handleChange: x,
483
+ key: r.id,
484
+ label: u,
485
+ trait: {
486
+ ...r,
487
+ inputConfigs: {
488
+ ...r.inputConfigs,
489
+ label: u
490
+ }
491
+ }
492
+ })}
493
+ `;
494
+ })}</cx-space></cx-grid-item></cx-grid>`
495
+ )}`;
496
+ })}`;
497
+ return h`<cx-space direction="vertical" wrap="nowrap">${o}</cx-space>`;
498
+ }
499
+ }
500
+ var Re = Object.defineProperty, De = Object.getOwnPropertyDescriptor, c = (t, e, o, a) => {
501
+ for (var i = a > 1 ? void 0 : a ? De(e, o) : e, r = t.length - 1, s; r >= 0; r--)
502
+ (s = t[r]) && (i = (a ? s(e, o, i) : s(i)) || i);
503
+ return a && i && Re(e, o, i), i;
504
+ };
505
+ let l = class extends O {
506
+ constructor() {
507
+ super(...arguments), this.localize = new R(this), this.configFormController = new _e(this), this.loading = !1, this.mode = F.Template, this.adhocProperties = [], this.templateName = "", this.templateId = "", this.supportedLanguages = ["en"], this.translatableControlValues = {}, this.defaultLanguage = "en", this.boundary = document.body, this.baseUrl = "", this.token = "", this.onRequestAsset = void 0, this.onRequestDownloadFormat = void 0, this.onRequestAssetFormat = void 0, this.onConfigureWorkflow = void 0, this.blockAttributes = {}, this.blockProperties = {}, this.blockStyles = {}, this.traits = [], this.translatableControls = [], this.blockName = "", this.name = "", this.description = "", this.showTemplateTab = !1, this.dialogTitle = "", this.skipShowCheck = !1, this.enableAssetFormatControls = !1, this.allowedFolders = [], this.isEditingTemplateSettings = !1, this.disableCloseConfigDialog = !1, this.isAfterShow = !1, this.sortedLanguages = [], this.formKey = 0;
508
+ }
509
+ /**
510
+ * Whether the template is editable.
511
+ * This is used to determine if the user can save the settings as a template.
512
+ * If the mode is EditorMode.Template, the template is editable.
513
+ * If the mode is EditorMode.Content, the template is not editable.
514
+ * @default true
515
+ */
516
+ get isTemplateEditable() {
517
+ return this.mode === F.Template;
518
+ }
519
+ /**
520
+ * Returns the list of tabs available in the configuration manager.
521
+ * This is derived from the tabMap property, which maps trait IDs to their corresponding tab names.
522
+ * It returns a unique list of trait tabs.
523
+ * @returns {string[]} An array of unique trait tabs.
524
+ */
525
+ get tabs() {
526
+ const t = [
527
+ "content",
528
+ "sidePanels",
529
+ "appearance",
530
+ "styling",
531
+ "effects"
532
+ /* Effects */
533
+ ], e = K(Object.values(this.tabMap)).sort(
534
+ (o, a) => t.indexOf(o) - t.indexOf(a)
535
+ );
536
+ return this.isTemplateEditable ? e : e.filter(
537
+ (o) => o !== "styling"
538
+ /* Styling */
539
+ );
540
+ }
541
+ /**
542
+ * A map of trait IDs to their corresponding tab names.
543
+ * This is used to determine which tab a trait belongs to.
544
+ * It is derived from the traits of the component and adhoc properties and is used to render the tabs in the configuration manager.
545
+ * @return {Record<string, string>} A record mapping trait IDs to tab names.
546
+ */
547
+ get tabMap() {
548
+ const t = this.traits.map((s) => s.name).filter(Boolean), e = Fe(t, this.adhocProperties), o = this.traits.filter(
549
+ (s) => s.tab === "sidePanels"
550
+ /* SidePanels */
551
+ ).map((s) => s.name).filter(Boolean), a = this.traits.filter(
552
+ (s) => s.tab === "appearance"
553
+ /* Appearance */
554
+ ).map((s) => s.name).filter(Boolean), i = this.traits.filter(
555
+ (s) => s.tab === "effects"
556
+ /* Effects */
557
+ ).map((s) => s.name).filter(Boolean), r = {};
558
+ for (const s of t)
559
+ r[s] = "content";
560
+ for (const s of e)
561
+ r[s] = "styling";
562
+ for (const s of o)
563
+ r[s] = "sidePanels";
564
+ for (const s of a)
565
+ r[s] = "appearance";
566
+ for (const s of i)
567
+ r[s] = "effects";
568
+ return r;
569
+ }
570
+ async handleSupportedLanguagesChange() {
571
+ await this.updateComplete, this.sortedLanguages = this.supportedLanguages.toSorted((t, e) => t === this.defaultLanguage ? -1 : e === this.defaultLanguage ? 1 : 0);
572
+ }
573
+ handleClose() {
574
+ this.isEditingTemplateSettings = !1;
575
+ }
576
+ handleAfterShow() {
577
+ this.isAfterShow = !0;
578
+ }
579
+ handleAfterHide(t) {
580
+ t?.target !== this.dialog || t.detail.source === "overlay" || (this.handleClose(), this.isAfterShow = !1, this.disableCloseConfigDialog = !1);
581
+ }
582
+ handleRequestClose(t) {
583
+ t?.target === this.dialog && (this.disableCloseConfigDialog ? t.preventDefault() : re(this.form) ? (t.preventDefault(), this.confirmPopover.show()) : this.hide());
584
+ }
585
+ handleNameInputChange(t) {
586
+ this.emit("cx-content-builder-form-field-change", {
587
+ detail: {
588
+ field: "name",
589
+ value: t.target.value
590
+ }
591
+ });
592
+ }
593
+ handleDescriptionInputChange(t) {
594
+ this.emit("cx-content-builder-form-field-change", {
595
+ detail: {
596
+ field: "description",
597
+ value: t.target.value
598
+ }
599
+ });
600
+ }
601
+ handleCancelClick() {
602
+ this.isEditingTemplateSettings ? this.isEditingTemplateSettings = !1 : this.hide();
603
+ }
604
+ handleSaveClick() {
605
+ this.form.requestSubmit();
606
+ }
607
+ handleDropdownSelect(t) {
608
+ const e = t.detail.item;
609
+ e.value === "save-as-new-template" ? this.isEditingTemplateSettings = !0 : e.value === "detach-template" && (this.emit("cx-content-builder-form-save", {
610
+ detail: {
611
+ isDetachTemplate: !0,
612
+ isNewTemplate: !1
613
+ }
614
+ }), this.hide());
615
+ }
616
+ handleAssetRequestStatus(t) {
617
+ this.disableCloseConfigDialog = t.detail.busy;
618
+ }
619
+ handleFormSubmit(t) {
620
+ if (!this.form.reportValidity()) {
621
+ t.preventDefault();
622
+ return;
623
+ }
624
+ t.preventDefault(), !this.loading && this.emit("cx-content-builder-form-save", {
625
+ detail: {
626
+ isDetachTemplate: !this.templateId && !this.isEditingTemplateSettings || !1,
627
+ isNewTemplate: this.isEditingTemplateSettings
628
+ }
629
+ });
630
+ }
631
+ show() {
632
+ this.formKey += 1, this.dialog.show();
633
+ }
634
+ async hide() {
635
+ this.dialog.hide(), this.confirmPopover.hide(), this.handleClose(), await this.updateComplete, this.tabGroup?.show(this.tabs[0] || "");
636
+ }
637
+ renderTemplateForm() {
638
+ return h`<cx-space direction="vertical" spacing="medium" wrap="nowrap"><cx-typography variant="body2">${this.localize.term("contentBuilderBlockSettingsHelpText")}</cx-typography><cx-grid columns="3" use-flex-gap spacing="var(--cx-spacing-small)" column-spacing="0" wrap="nowrap"><cx-grid-item xs="3" sm="1"><cx-typography variant="body2">${this.localize.term("templateName")}</cx-typography></cx-grid-item><cx-grid-item xs="3" sm="2"><cx-input name="name" value=${this.name ?? ""} can-show-length maxlength="200" required @cx-change=${this.handleNameInputChange} type="text"></cx-input></cx-grid-item></cx-grid><cx-grid columns="3" use-flex-gap spacing="var(--cx-spacing-small)" column-spacing="0" wrap="nowrap"><cx-grid-item xs="3" sm="1"><cx-typography variant="body2">${this.localize.term("description")}</cx-typography></cx-grid-item><cx-grid-item xs="3" sm="2"><cx-textarea name="description" value=${this.description ?? ""} can-show-length maxlength="200" resize="none" @cx-change=${this.handleDescriptionInputChange} type="text"></cx-textarea></cx-grid-item></cx-grid></cx-space>`;
639
+ }
640
+ render() {
641
+ return h`<cx-dialog class="config-form" use-overlay-scrollbar divider-position=${D.Footer} .boundary=${this.boundary} @cx-after-show=${this.handleAfterShow} @cx-after-hide=${this.handleAfterHide} @cx-request-close=${this.handleRequestClose} @cx-asset-request-status=${this.handleAssetRequestStatus}><cx-space slot="label" direction="vertical" spacing="2x-small"><cx-typography variant="h4">${y(
642
+ this.dialogTitle,
643
+ () => h`<cx-line-clamp lines="1">${this.dialogTitle}</cx-line-clamp>`,
644
+ () => h`${this.localize.term(
645
+ "settingsTitle",
646
+ this.blockName
647
+ )}`
648
+ )}</cx-typography>${y(
649
+ this.templateName,
650
+ () => h`<cx-typography variant="body3"><cx-line-clamp lines="1">${this.templateName}</cx-line-clamp></cx-typography>`
651
+ )}</cx-space>${ce(
652
+ this.formKey,
653
+ h`<form id="config-form" @submit=${this.handleFormSubmit}>${Ae(y(
654
+ this.isEditingTemplateSettings,
655
+ () => y(
656
+ this.isTemplateEditable,
657
+ () => h`<cx-tab-group class="config-form__tab-group" placement="top"><cx-tab slot="nav" panel="template" active>${this.localize.term("template")}</cx-tab><cx-tab-panel name="template" active><cx-space direction="vertical" spacing="x-small" wrap="nowrap">${this.renderTemplateForm()}</cx-space></cx-tab-panel></cx-tab-group>`
658
+ ),
659
+ () => y(
660
+ !ue(this.traits) && this.tabs.length >= 1,
661
+ () => h`<cx-tab-group class="config-form__tab-group" placement="top">${y(
662
+ this.showTemplateTab,
663
+ () => h`<cx-tab slot="nav" panel="template" active>${this.localize.term("template")}</cx-tab><cx-tab-panel name="template" active><cx-space direction="vertical" spacing="x-small" wrap="nowrap">${this.renderTemplateForm()}</cx-space></cx-tab-panel>`
664
+ )}
665
+ ${A(
666
+ this.tabs.filter(
667
+ (t) => !this.showTemplateTab || t === "appearance" || t === "effects" || t === "sidePanels" || t === "styling"
668
+ /* Styling */
669
+ ),
670
+ (t) => t,
671
+ (t, e) => h`<cx-tab slot="nav" panel=${t} ?active=${!this.showTemplateTab && e === 0}>${this.localize.term(t)}</cx-tab><cx-tab-panel name=${t} ?active=${!this.showTemplateTab && e === 0}><cx-space direction="vertical" spacing="x-small" wrap="nowrap">${this.configFormController.renderBasicControls(this.traits, void 0, t)}</cx-space></cx-tab-panel>`
672
+ )}
673
+ ${y(
674
+ this.translatableControls.length > 0,
675
+ () => h`<cx-tab slot="nav" panel="Translation">${this.localize.term("translation")}</cx-tab><cx-tab-panel name="Translation"><cx-space direction="vertical" spacing="x-small" wrap="nowrap">${this.configFormController.renderTranslationControls()}</cx-space></cx-tab-panel>`
676
+ )}</cx-tab-group>`,
677
+ () => h`<cx-space direction="vertical" spacing="x-small" wrap="nowrap">${this.configFormController.renderBasicControls(this.traits, void 0, this.tabs[0])}</cx-space>`
678
+ )
679
+ ))}</form>`
680
+ )}<cx-space slot="footer" spacing="x-small" wrap="nowrap" justify-content="end"><cx-button variant="default" size="medium" @click=${this.handleCancelClick}>${this.localize.term("cancel")}</cx-button><cx-button-group><cx-button type="submit" variant="primary" size="medium" ?loading=${this.loading} @click=${this.handleSaveClick}>${this.localize.term("save")}</cx-button>${y(
681
+ this.isTemplateEditable && !this.isEditingTemplateSettings && !this.showTemplateTab,
682
+ () => h`<cx-dropdown class="config-form__dropdown" placement="bottom-end" hoist @cx-select=${this.handleDropdownSelect}><cx-button slot="trigger" type="submit" variant="primary" caret><cx-visually-hidden>${this.localize.term("moreOptions")}</cx-visually-hidden></cx-button><cx-menu class="config-form__dropdown-menu"><cx-menu-item value="save-as-new-template"><cx-button type="submit" variant="text">${this.localize.term("saveAsNewTemplate")}</cx-button></cx-menu-item>${y(
683
+ this.templateId,
684
+ () => h`<cx-menu-item value="detach-template"><cx-button type="submit" variant="text">${this.localize.term("detachTemplate")}</cx-button></cx-menu-item>`
685
+ )}</cx-menu></cx-dropdown>`
686
+ )}</cx-button-group></cx-space></cx-dialog><cx-confirm-popover class="config-form__confirm-popover" divider-position=${D.Both} buttons-direction=${Yt.HorizontalReverse} dialog-label=${this.localize.term("dismissChanges")} confirm-text=${this.localize.term("dismissChanges")} .boundary=${this.boundary} variant="dialog" @cx-confirm=${this.hide}><cx-typography variant="body2" slot="footer" class="confirm-popover__footer">${this.localize.term(
687
+ "doYouWantToCloseThisDialogChangesWillBeDismissed"
688
+ )}</cx-typography></cx-confirm-popover>`;
689
+ }
690
+ };
691
+ l.styles = [M, Pe, et, ot];
692
+ l.dependencies = {
693
+ "cx-asset-format-picker": ft,
694
+ "cx-asset-picker": mt,
695
+ "cx-asset-transformation-dialog": ut,
696
+ "cx-bicolor-picker": Ut,
697
+ "cx-border-input-group": Jt,
698
+ "cx-button": wt,
699
+ "cx-button-group": vt,
700
+ "cx-card": kt,
701
+ "cx-checkbox": $t,
702
+ "cx-color-swatch-picker": dt,
703
+ "cx-confirm-popover": Xt,
704
+ "cx-corner-position-input-group": Qt,
705
+ "cx-dam-custom-toolbar-buttons-editor": ht,
706
+ "cx-dialog": Tt,
707
+ "cx-divider": St,
708
+ "cx-download-format-picker": pt,
709
+ "cx-dropdown": At,
710
+ "cx-dynamic-select": Zt,
711
+ "cx-folder-picker": ct,
712
+ "cx-font-picker": lt,
713
+ "cx-gallery-picker": nt,
714
+ "cx-grid": Ft,
715
+ "cx-grid-item": Pt,
716
+ "cx-icon": _t,
717
+ "cx-icon-picker": at,
718
+ "cx-input": Rt,
719
+ "cx-line-clamp": Dt,
720
+ "cx-list-editor": it,
721
+ "cx-menu": It,
722
+ "cx-menu-item": qt,
723
+ "cx-option": Lt,
724
+ "cx-padding-input-group": te,
725
+ "cx-page-picker": rt,
726
+ "cx-position-picker": ee,
727
+ "cx-radio": Bt,
728
+ "cx-radio-card": Et,
729
+ "cx-radio-group": zt,
730
+ "cx-select": Nt,
731
+ "cx-shadow-input-group": oe,
732
+ "cx-size-input-group": se,
733
+ "cx-space": Ot,
734
+ "cx-switch": Mt,
735
+ "cx-tab": Vt,
736
+ "cx-tab-group": jt,
737
+ "cx-tab-panel": Gt,
738
+ "cx-textarea": Wt,
739
+ "cx-tooltip": Kt,
740
+ "cx-type-subtype-select": st,
741
+ "cx-typography": N,
742
+ "cx-visually-hidden": Ht
743
+ };
744
+ c([
745
+ $(".config-form")
746
+ ], l.prototype, "dialog", 2);
747
+ c([
748
+ $("#config-form")
749
+ ], l.prototype, "form", 2);
750
+ c([
751
+ $("cx-confirm-popover")
752
+ ], l.prototype, "confirmPopover", 2);
753
+ c([
754
+ $(".config-form__tab-group")
755
+ ], l.prototype, "tabGroup", 2);
756
+ c([
757
+ n({ reflect: !0, type: Boolean })
758
+ ], l.prototype, "loading", 2);
759
+ c([
760
+ n({ reflect: !0, type: String })
761
+ ], l.prototype, "mode", 2);
762
+ c([
763
+ n({ attribute: "adhoc-properties", type: Array })
764
+ ], l.prototype, "adhocProperties", 2);
765
+ c([
766
+ n({ attribute: "template-name", reflect: !1, type: String })
767
+ ], l.prototype, "templateName", 2);
768
+ c([
769
+ n({ attribute: "template-id", reflect: !1, type: String })
770
+ ], l.prototype, "templateId", 2);
771
+ c([
772
+ n({
773
+ attribute: "supported-languages",
774
+ converter: {
775
+ fromAttribute: (t) => t.split(" "),
776
+ toAttribute: (t) => Array.isArray(t) ? t.join(" ") : t
777
+ },
778
+ reflect: !0,
779
+ type: Array
780
+ })
781
+ ], l.prototype, "supportedLanguages", 2);
782
+ c([
783
+ n({ attribute: "translatable-control-values", type: Object })
784
+ ], l.prototype, "translatableControlValues", 2);
785
+ c([
786
+ n({ attribute: "default-language", reflect: !0, type: String })
787
+ ], l.prototype, "defaultLanguage", 2);
788
+ c([
789
+ n({ type: Object })
790
+ ], l.prototype, "boundary", 2);
791
+ c([
792
+ n({ attribute: "base-url", type: String })
793
+ ], l.prototype, "baseUrl", 2);
794
+ c([
795
+ n({ attribute: "token", type: String })
796
+ ], l.prototype, "token", 2);
797
+ c([
798
+ n({ attribute: "on-request-asset", type: Function })
799
+ ], l.prototype, "onRequestAsset", 2);
800
+ c([
801
+ n({ attribute: "on-request-download-format", type: Function })
802
+ ], l.prototype, "onRequestDownloadFormat", 2);
803
+ c([
804
+ n({ attribute: "on-request-asset-format", type: Function })
805
+ ], l.prototype, "onRequestAssetFormat", 2);
806
+ c([
807
+ n({ attribute: "on-configure-workflow", type: Function })
808
+ ], l.prototype, "onConfigureWorkflow", 2);
809
+ c([
810
+ n({ attribute: "block-attributes", reflect: !1, type: Object })
811
+ ], l.prototype, "blockAttributes", 2);
812
+ c([
813
+ n({ attribute: "block-properties", reflect: !1, type: Object })
814
+ ], l.prototype, "blockProperties", 2);
815
+ c([
816
+ n({ attribute: "block-styles", reflect: !1, type: Object })
817
+ ], l.prototype, "blockStyles", 2);
818
+ c([
819
+ n({ attribute: "traits", reflect: !1, type: Object })
820
+ ], l.prototype, "traits", 2);
821
+ c([
822
+ n({ attribute: "translatable-controls", reflect: !1, type: Array })
823
+ ], l.prototype, "translatableControls", 2);
824
+ c([
825
+ n({ attribute: "block-name", reflect: !0, type: String })
826
+ ], l.prototype, "blockName", 2);
827
+ c([
828
+ n({ reflect: !1, type: String })
829
+ ], l.prototype, "name", 2);
830
+ c([
831
+ n({ reflect: !1, type: String })
832
+ ], l.prototype, "description", 2);
833
+ c([
834
+ n({ attribute: "show-template-tab", reflect: !0, type: Boolean })
835
+ ], l.prototype, "showTemplateTab", 2);
836
+ c([
837
+ n({ attribute: "dialog-title", reflect: !0, type: String })
838
+ ], l.prototype, "dialogTitle", 2);
839
+ c([
840
+ n({ attribute: "skip-show-check", reflect: !0, type: Boolean })
841
+ ], l.prototype, "skipShowCheck", 2);
842
+ c([
843
+ n({ attribute: "enable-asset-format-controls", reflect: !0, type: Boolean })
844
+ ], l.prototype, "enableAssetFormatControls", 2);
845
+ c([
846
+ n({
847
+ attribute: "allowed-folders",
848
+ converter: V,
849
+ type: Array
850
+ })
851
+ ], l.prototype, "allowedFolders", 2);
852
+ c([
853
+ g()
854
+ ], l.prototype, "isEditingTemplateSettings", 2);
855
+ c([
856
+ g()
857
+ ], l.prototype, "disableCloseConfigDialog", 2);
858
+ c([
859
+ g()
860
+ ], l.prototype, "isAfterShow", 2);
861
+ c([
862
+ g()
863
+ ], l.prototype, "sortedLanguages", 2);
864
+ c([
865
+ g()
866
+ ], l.prototype, "formKey", 2);
867
+ c([
868
+ k("supportedLanguages")
869
+ ], l.prototype, "handleSupportedLanguagesChange", 1);
870
+ l = c([
871
+ j("cx-config-form")
872
+ ], l);
873
+ const Ie = G`:host{display:block}.confirm-popover__footer{--color:var(--cx-color-danger)}.confirm-popover__footer::part(base){margin-top:var(--cx-spacing-small);display:block}`;
874
+ var qe = Object.defineProperty, Le = Object.getOwnPropertyDescriptor, d = (t, e, o, a) => {
875
+ for (var i = a > 1 ? void 0 : a ? Le(e, o) : e, r = t.length - 1, s; r >= 0; r--)
876
+ (s = t[r]) && (i = (a ? s(e, o, i) : s(i)) || i);
877
+ return a && i && qe(e, o, i), i;
878
+ };
879
+ let p = class extends O {
880
+ constructor() {
881
+ super(), this.localize = new R(this), this.configsController = new gt(this.localize), this.component = null, this.loading = !1, this.mode = F.Template, this.enableAssetFormatControls = !1, this.enableFontFamilyControls = !1, this.allowedFolders = [], this.adhocProperties = [], this.templateName = "", this.templateId = "", this.supportedLanguages = ["en-us"], this.defaultLanguage = "en-us", this.translatableControlValues = [], this.boundary = document.body, this.onRequestAsset = void 0, this.onRequestDownloadFormat = void 0, this.onRequestAssetFormat = void 0, this.onConfigureWorkflow = void 0, this.blockAttributes = {}, this.blockProperties = {}, this.blockStyles = {}, this.traits = [], this.blockType = "", this.blockName = "", this.name = "", this.description = "", this.tab = "", this.isEditingTemplateSettings = !1, this.translatableControlValuesMap = {}, this.translatableControls = [], this.handleSave = this.handleSave.bind(this);
882
+ }
883
+ /**
884
+ * Whether the template is editable.
885
+ * This is used to determine if the user can save the settings as a template.
886
+ * If the mode is EditorMode.Template, the template is editable.
887
+ * If the mode is EditorMode.Content, the template is not editable.
888
+ * @default true
889
+ */
890
+ get isTemplateEditable() {
891
+ return this.mode === F.Template;
892
+ }
893
+ getFlattenTraits(t, e, o = !1) {
894
+ return t.reduce(
895
+ (a, i) => (i.children && a.push(
896
+ ...this.getFlattenTraits(i.children, i, o)
897
+ ), o ? i && (i.show === !1 || typeof i.show == "function" && !i.show(this.blockAttributes) || e && e.show === !1 || e && typeof e.show == "function" && !e.show(this.blockAttributes)) || a.push({
898
+ ...i,
899
+ parent: e
900
+ }) : a.push({
901
+ ...i,
902
+ parent: e
903
+ }), a),
904
+ []
905
+ );
906
+ }
907
+ async handleTraitsChange() {
908
+ await this.updateComplete, this.supportedLanguages.length > 1 ? this.translatableControls = this.traits.filter(
909
+ (t) => t.type === "attribute" && t.translatable || t.controlType === "info-text" && !!t.translateGroup
910
+ ) : this.translatableControls = [];
911
+ for (const t of this.translatableControls)
912
+ for (const e of this.supportedLanguages) {
913
+ const o = this.translatableControlValues.find((a) => {
914
+ const [i, r = ""] = String(a.id).split("_", 2);
915
+ return i === this.component?.getId() && r === e;
916
+ })?.get("content") ?? {};
917
+ o && t.id && o[t.id] !== void 0 && (this.translatableControlValuesMap[e] || (this.translatableControlValuesMap[e] = {}), this.translatableControlValuesMap[e][t.id] = o[t.id]);
918
+ }
919
+ }
920
+ async handleComponentChange() {
921
+ if (!this.component)
922
+ return;
923
+ this.translatableControlValuesMap = {}, await this.updateComplete;
924
+ const t = this.component.get("type"), e = this.configsController.getConfigs(t, {
925
+ containerFontVariants: this.getContainerFontVariants(),
926
+ enableAssetFormatControls: this.enableAssetFormatControls,
927
+ enableFontFamilyControls: this.enableFontFamilyControls
928
+ });
929
+ this.blockType = t, this.blockName = this.component.getName(), this.blockAttributes = {
930
+ ...bt(this.component),
931
+ ...ve(this.translatableControlValuesMap[this.defaultLanguage], (o) => o === void 0)
932
+ }, this.blockProperties = yt(this.component), this.blockStyles = xt(this.component), this.traits = Array.isArray(e) ? e : [];
933
+ }
934
+ /**
935
+ * The variants of the font kit the block sits in, if any — the config
936
+ * manager is the only layer holding the GrapesJS component, so it is the
937
+ * only place that can reach the kit's resolved typefaces. Absent means the
938
+ * block has no container resolving a font for it.
939
+ */
940
+ getContainerFontVariants() {
941
+ for (let t = this.component?.parent(); t; t = t.parent())
942
+ if (t.get("type") === H.FontKitAdvanced) {
943
+ const e = t.view?.el;
944
+ return Se(e?.typefacesArray ?? []);
945
+ }
946
+ }
947
+ handleSave(t) {
948
+ const o = this.getFlattenTraits(this.traits).reduce(
949
+ (i, r) => (i[r.id] = r, i),
950
+ {}
951
+ ), a = Object.entries(this.blockAttributes).reduce(
952
+ (i, [r, s]) => {
953
+ const u = o[r];
954
+ return Ct.includes(r) || (u ? i[r] = s : typeof s == "boolean" && (i[r] = !1)), i;
955
+ },
956
+ {}
957
+ );
958
+ this.emit("cx-content-builder-configure", {
959
+ detail: {
960
+ description: this.description,
961
+ isDetachTemplate: t.detail.isDetachTemplate ?? !1,
962
+ name: this.name,
963
+ settings: {
964
+ attributes: a,
965
+ properties: this.blockProperties,
966
+ styleProps: this.blockStyles,
967
+ translations: this.translatableControlValuesMap
968
+ },
969
+ templateId: t.detail.isNewTemplate ? "" : this.templateId
970
+ }
971
+ });
972
+ }
973
+ handleClose() {
974
+ this.adhocProperties = [], this.blockAttributes = {}, this.blockName = "", this.blockProperties = {}, this.blockStyles = {}, this.blockType = "", this.description = "", this.isEditingTemplateSettings = !1, this.name = "", this.templateId = "", this.templateName = "", this.traits = [], this.translatableControlValuesMap = {};
975
+ }
976
+ async show() {
977
+ await this.handleComponentChange(), this.dialog.show();
978
+ }
979
+ hide() {
980
+ this.dialog.hide(), this.handleClose();
981
+ }
982
+ handleTranslatableValueChange(t) {
983
+ const { language: e, values: o } = t.detail;
984
+ for (const a of o)
985
+ this.translatableControlValuesMap[e] || (this.translatableControlValuesMap[e] = {}), this.translatableControlValuesMap[e][a.attribute] = a.value;
986
+ this.translatableControlValuesMap = {
987
+ ...this.translatableControlValuesMap
988
+ };
989
+ }
990
+ handleChange(t) {
991
+ const { type: e, value: o } = t.detail;
992
+ e === "attribute" ? this.blockAttributes = o : e === "style" ? this.blockStyles = o : e === "property" && (this.blockProperties = o);
993
+ }
994
+ handleFieldChange(t) {
995
+ const { field: e, value: o } = t.detail;
996
+ e === "name" ? this.name = o : e === "description" && (this.description = o);
997
+ }
998
+ render() {
999
+ return h`<cx-config-form block-name=${this.blockName} default-language=${this.defaultLanguage} description=${this.description} name=${this.name} mode=${this.mode} template-name=${this.templateName} template-id=${this.templateId} ?enable-asset-format-controls=${this.enableAssetFormatControls} ?enable-font-family-controls=${this.enableFontFamilyControls} ?loading=${this.loading} .allowedFolders=${this.allowedFolders} .adhocProperties=${this.adhocProperties} .blockAttributes=${this.blockAttributes} .blockProperties=${this.blockProperties} .blockStyles=${this.blockStyles} .boundary=${this.boundary} .supportedLanguages=${this.supportedLanguages} .translatableControls=${this.translatableControls} .translatableControlValues=${this.translatableControlValuesMap} .traits=${this.traits} .onRequestAsset=${this.onRequestAsset} .onRequestDownloadFormat=${this.onRequestDownloadFormat} .onConfigureWorkflow=${this.onConfigureWorkflow} .onRequestAssetFormat=${this.onRequestAssetFormat} @cx-content-builder-translatable-value-change=${this.handleTranslatableValueChange} @cx-content-builder-form-change=${this.handleChange} @cx-content-builder-form-field-change=${this.handleFieldChange} @cx-content-builder-form-save=${this.handleSave}></cx-config-form>`;
1000
+ }
1001
+ };
1002
+ p.styles = [M, Ie];
1003
+ p.dependencies = {
1004
+ "cx-config-form": l,
1005
+ "cx-typography": N
1006
+ };
1007
+ d([
1008
+ $("cx-config-form")
1009
+ ], p.prototype, "dialog", 2);
1010
+ d([
1011
+ n({ reflect: !1, type: Object })
1012
+ ], p.prototype, "component", 2);
1013
+ d([
1014
+ n({ reflect: !0, type: Boolean })
1015
+ ], p.prototype, "loading", 2);
1016
+ d([
1017
+ n({ reflect: !0, type: String })
1018
+ ], p.prototype, "mode", 2);
1019
+ d([
1020
+ n({
1021
+ attribute: "enable-asset-format-controls",
1022
+ reflect: !0,
1023
+ type: Boolean
1024
+ })
1025
+ ], p.prototype, "enableAssetFormatControls", 2);
1026
+ d([
1027
+ n({
1028
+ attribute: "enable-font-family-controls",
1029
+ reflect: !0,
1030
+ type: Boolean
1031
+ })
1032
+ ], p.prototype, "enableFontFamilyControls", 2);
1033
+ d([
1034
+ n({
1035
+ attribute: "allowed-folders",
1036
+ converter: V,
1037
+ type: Array
1038
+ })
1039
+ ], p.prototype, "allowedFolders", 2);
1040
+ d([
1041
+ n({ attribute: "adhoc-properties", type: Array })
1042
+ ], p.prototype, "adhocProperties", 2);
1043
+ d([
1044
+ n({ attribute: "template-name", reflect: !1, type: String })
1045
+ ], p.prototype, "templateName", 2);
1046
+ d([
1047
+ n({ attribute: "template-id", reflect: !1, type: String })
1048
+ ], p.prototype, "templateId", 2);
1049
+ d([
1050
+ n({
1051
+ attribute: "supported-languages",
1052
+ converter: {
1053
+ fromAttribute: (t) => t.split(" "),
1054
+ toAttribute: (t) => Array.isArray(t) ? t.join(" ") : t
1055
+ },
1056
+ reflect: !0,
1057
+ type: Array
1058
+ })
1059
+ ], p.prototype, "supportedLanguages", 2);
1060
+ d([
1061
+ n({ attribute: "default-language", reflect: !0, type: String })
1062
+ ], p.prototype, "defaultLanguage", 2);
1063
+ d([
1064
+ n({ attribute: "translatable-control-values", type: Array })
1065
+ ], p.prototype, "translatableControlValues", 2);
1066
+ d([
1067
+ n({ type: Object })
1068
+ ], p.prototype, "boundary", 2);
1069
+ d([
1070
+ n({ attribute: "on-request-asset", type: Function })
1071
+ ], p.prototype, "onRequestAsset", 2);
1072
+ d([
1073
+ n({ attribute: "on-request-download-format", type: Function })
1074
+ ], p.prototype, "onRequestDownloadFormat", 2);
1075
+ d([
1076
+ n({ attribute: "on-request-asset-format", type: Function })
1077
+ ], p.prototype, "onRequestAssetFormat", 2);
1078
+ d([
1079
+ n({ attribute: "on-configure-workflow", type: Function })
1080
+ ], p.prototype, "onConfigureWorkflow", 2);
1081
+ d([
1082
+ g()
1083
+ ], p.prototype, "blockAttributes", 2);
1084
+ d([
1085
+ g()
1086
+ ], p.prototype, "blockProperties", 2);
1087
+ d([
1088
+ g()
1089
+ ], p.prototype, "blockStyles", 2);
1090
+ d([
1091
+ g()
1092
+ ], p.prototype, "traits", 2);
1093
+ d([
1094
+ g()
1095
+ ], p.prototype, "blockType", 2);
1096
+ d([
1097
+ g()
1098
+ ], p.prototype, "blockName", 2);
1099
+ d([
1100
+ g()
1101
+ ], p.prototype, "name", 2);
1102
+ d([
1103
+ g()
1104
+ ], p.prototype, "description", 2);
1105
+ d([
1106
+ g()
1107
+ ], p.prototype, "tab", 2);
1108
+ d([
1109
+ g()
1110
+ ], p.prototype, "isEditingTemplateSettings", 2);
1111
+ d([
1112
+ g()
1113
+ ], p.prototype, "translatableControlValuesMap", 2);
1114
+ d([
1115
+ g()
1116
+ ], p.prototype, "translatableControls", 2);
1117
+ d([
1118
+ k("traits"),
1119
+ k("supportedLanguages", { waitUntilFirstUpdate: !0 }),
1120
+ k("blockAttributes", { waitUntilFirstUpdate: !0 })
1121
+ ], p.prototype, "handleTraitsChange", 1);
1122
+ d([
1123
+ k("component")
1124
+ ], p.prototype, "handleComponentChange", 1);
1125
+ p = d([
1126
+ j("cx-config-manager")
1127
+ ], p);
1128
+ export {
1129
+ p as CxConfigManager
1130
+ };