@orangelogic/design-system 2.56.0 → 2.57.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 (131) hide show
  1. package/library/chunks/{button.CiWlWCNb.js → button.2-Io1Wm4.js} +80 -66
  2. package/library/chunks/{color-swatch-group.Bsa_Z57a.js → color-swatch-group.VXPK-2tU.js} +167 -157
  3. package/library/chunks/{color-swatch.CsKJgvVf.js → color-swatch.8OhqVqb6.js} +2 -2
  4. package/library/chunks/{confirm-popover.Bfuw361W.js → confirm-popover.DGvyB12c.js} +3 -3
  5. package/library/chunks/{content-builder.UlVFSATk.js → content-builder.WranV3P4.js} +6 -5
  6. package/library/chunks/{dialog.C28qzMSQ.js → dialog.CIeu0rVD.js} +2 -2
  7. package/library/chunks/{dot-pagination.D3RYAiHL.js → dot-pagination.CyCA3kSP.js} +1 -1
  8. package/library/chunks/{file-on-demand.Cr7E_KqH.js → file-on-demand.aux9gsvH.js} +10 -10
  9. package/library/chunks/{folder-select.ELghy6Qk.js → folder-select.B7u40ijN.js} +5 -5
  10. package/library/chunks/{format-time.HdcgoabZ.js → format-time.C56HetWv.js} +1 -1
  11. package/library/chunks/{header.oyZxakKM.js → header.RvymymCe.js} +1 -1
  12. package/library/chunks/{i18n.C3Z8Xe8q.js → i18n.dCiJrmqj.js} +74 -83
  13. package/library/chunks/{iframe.C6CLUrTT.js → iframe.Cwqniwf2.js} +1 -1
  14. package/library/chunks/{image.BJfasRY_.js → image.gpleN29o.js} +3 -3
  15. package/library/chunks/list-editor.BToq5cqp.js +1641 -0
  16. package/library/chunks/{option.BOHZB9Sv.js → option.CJ1p2V0m.js} +1 -1
  17. package/library/chunks/{popup.Ba501Rgg.js → popup.BE5MfEQJ.js} +1 -1
  18. package/library/chunks/purify.es.BGaRrCfO.js +553 -0
  19. package/library/chunks/{select.oVg7uA-M.js → select.xBh4yerC.js} +3 -3
  20. package/library/chunks/string.DPf4puTr.js +136 -0
  21. package/library/chunks/{tab-group.BWYMMhrE.js → tab-group.CjvHb3OJ.js} +3 -3
  22. package/library/chunks/{table.-ecyjIUr.js → table.CrX_NJiY.js} +2019 -1744
  23. package/library/chunks/{timecode.PY1bymeS.js → timecode.XXmVg6tU.js} +1 -1
  24. package/library/chunks/{tree.82OigIgE.js → tree.CDaFhGjU.js} +1 -1
  25. package/library/components/alert.js +1 -1
  26. package/library/components/asset-link-format.js +4 -4
  27. package/library/components/atoms.js +14 -14
  28. package/library/components/border-input-group.js +1 -1
  29. package/library/components/breadcrumb.js +1 -1
  30. package/library/components/button.js +2 -2
  31. package/library/components/color-picker.js +3 -3
  32. package/library/components/color-swatch-group.js +6 -6
  33. package/library/components/color-swatch.js +3 -3
  34. package/library/components/confirm-popover.js +4 -4
  35. package/library/components/copy-button.js +1 -1
  36. package/library/components/corner-position-input-group.js +3 -3
  37. package/library/components/details.js +1 -1
  38. package/library/components/dialog.js +3 -3
  39. package/library/components/dot-pagination.js +2 -2
  40. package/library/components/drawer.js +1 -1
  41. package/library/components/dropdown.js +2 -2
  42. package/library/components/dynamic-select.js +5 -5
  43. package/library/components/element-clamp.js +2 -2
  44. package/library/components/file-on-demand.js +11 -11
  45. package/library/components/folder-select.js +4 -4
  46. package/library/components/format-bytes.js +1 -1
  47. package/library/components/format-date.js +1 -1
  48. package/library/components/format-number.js +1 -1
  49. package/library/components/format-time.js +2 -2
  50. package/library/components/header.js +2 -2
  51. package/library/components/icon-button.js +1 -1
  52. package/library/components/iframe.js +2 -2
  53. package/library/components/image-comparer.js +1 -1
  54. package/library/components/image.js +3 -3
  55. package/library/components/input.js +1 -1
  56. package/library/components/line-clamp.js +31 -23
  57. package/library/components/list-editor.js +9 -8
  58. package/library/components/masonry.js +1 -1
  59. package/library/components/menu-item.js +2 -2
  60. package/library/components/menu.js +1 -1
  61. package/library/components/molecules.js +4 -4
  62. package/library/components/option.js +2 -2
  63. package/library/components/organisms.js +2 -2
  64. package/library/components/pagination.js +4 -4
  65. package/library/components/popup.js +2 -2
  66. package/library/components/position-picker.js +1 -1
  67. package/library/components/progress-bar.js +1 -1
  68. package/library/components/progress-ring.js +1 -1
  69. package/library/components/range.js +2 -2
  70. package/library/components/rating.js +1 -1
  71. package/library/components/relative-time.js +1 -1
  72. package/library/components/select.js +4 -4
  73. package/library/components/share-option-list.js +1 -1
  74. package/library/components/size-input-group.js +2 -2
  75. package/library/components/spinner.js +1 -1
  76. package/library/components/split-panel.js +1 -1
  77. package/library/components/tab-group.js +3 -3
  78. package/library/components/tab.js +1 -1
  79. package/library/components/table.js +2 -2
  80. package/library/components/tag.js +1 -1
  81. package/library/components/timecode.js +2 -2
  82. package/library/components/tooltip.js +2 -2
  83. package/library/components/tree-item.js +2 -2
  84. package/library/components/tree.js +2 -2
  85. package/library/components/typeface.js +1 -1
  86. package/library/components/types.js +30808 -30016
  87. package/library/components/video.js +2 -2
  88. package/library/package.json +1 -1
  89. package/library/packages/atoms/src/components/button/button.d.ts +4 -0
  90. package/library/packages/atoms/src/components/line-clamp/line-clamp.d.ts +3 -1
  91. package/library/packages/atoms/src/components/table/components/table-toolbar/table-saved-search-dropdown.d.ts +60 -0
  92. package/library/packages/atoms/src/components/table/components/table-toolbar/table-toolbar.d.ts +38 -5
  93. package/library/packages/atoms/src/components/table/table.d.ts +28 -5
  94. package/library/packages/atoms/src/components/table/tabulator-tables/core/row/Row.d.ts +2 -2
  95. package/library/packages/events/src/cx-content-builder-translatable-value-change.d.ts +13 -0
  96. package/library/packages/events/src/cx-table-export.d.ts +1 -1
  97. package/library/packages/events/src/cx-table-save-search-select.d.ts +8 -0
  98. package/library/packages/events/src/events.d.ts +2 -0
  99. package/library/packages/molecules/src/data-tab-group/data-tab-group.d.ts +1 -0
  100. package/library/packages/molecules/src/details-group/details-group.d.ts +1 -0
  101. package/library/packages/molecules/src/list-editor/list-editor.d.ts +14 -0
  102. package/library/packages/molecules/src/timeline/timeline.d.ts +4 -0
  103. package/library/packages/organisms/src/color-swatch-group/color-swatch-group.d.ts +1 -0
  104. package/library/packages/organisms/src/comment/comment.d.ts +13 -0
  105. package/library/packages/organisms/src/comment/components/comment-menu/comment-menu.d.ts +14 -0
  106. package/library/packages/organisms/src/content-builder/components/color-swatch-picker/color-swatch-picker.d.ts +21 -0
  107. package/library/packages/organisms/src/content-builder/components/config-form/config-form-controller.d.ts +19 -0
  108. package/library/packages/organisms/src/content-builder/components/config-form/config-form.d.ts +28 -8
  109. package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +28 -1
  110. package/library/packages/organisms/src/content-builder/components/gallery-config/gallery-config.d.ts +1 -0
  111. package/library/packages/organisms/src/content-builder/configs/accordion.d.ts +1 -0
  112. package/library/packages/organisms/src/content-builder/configs/color-swatches.d.ts +1 -0
  113. package/library/packages/organisms/src/content-builder/configs/gallery.d.ts +2 -0
  114. package/library/packages/organisms/src/content-builder/configs/tab-group.d.ts +1 -0
  115. package/library/packages/organisms/src/content-builder/configs/timeline.d.ts +1 -0
  116. package/library/packages/organisms/src/content-builder/configs-controller.d.ts +10 -0
  117. package/library/packages/organisms/src/content-builder/content-builder-constants.d.ts +2 -0
  118. package/library/packages/organisms/src/content-builder/content-builder.d.ts +19 -2
  119. package/library/packages/organisms/src/content-builder/content-builder.utils.d.ts +0 -7
  120. package/library/packages/organisms/src/content-builder/plugins/plugin-factory.d.ts +1 -0
  121. package/library/packages/organisms/src/content-builder/styleController.d.ts +3 -1
  122. package/library/packages/types/src/color-swatch.d.ts +1 -0
  123. package/library/packages/types/src/content-builder.d.ts +7 -0
  124. package/library/packages/types/src/table.d.ts +13 -1
  125. package/library/packages/utils/src/custom-element/i18n-utils.d.ts +2 -0
  126. package/library/packages/utils/src/custom-element/i18n.d.ts +32 -9
  127. package/library/packages/utils/src/string/string.d.ts +2 -0
  128. package/library/react-web-component.d.ts +115 -58
  129. package/package.json +1 -1
  130. package/library/chunks/list-editor.Ct803qvF.js +0 -737
  131. package/library/chunks/string.D6poLUEC.js +0 -678
@@ -0,0 +1,1641 @@
1
+ import { C as _ } from "./button.2-Io1Wm4.js";
2
+ import { C as q, D as j } from "./dialog.CIeu0rVD.js";
3
+ import G from "../components/grid.js";
4
+ import R from "../components/grid-item.js";
5
+ import S from "../components/input.js";
6
+ import P from "../components/line-clamp.js";
7
+ import F from "../components/radio.js";
8
+ import B from "../components/radio-group.js";
9
+ import E from "../components/space.js";
10
+ import { C as K, H as U } from "./table.CrX_NJiY.js";
11
+ import { C as T } from "./typography.BFpl0WMA.js";
12
+ import { i as L, n as o, C as z, x as l, c as D } from "./custom-element.vnXBMQxc.js";
13
+ import { c as M } from "./component.styles.CI-v8BZa.js";
14
+ import { d as H } from "./popup.BE5MfEQJ.js";
15
+ import { L as O } from "./i18n.dCiJrmqj.js";
16
+ import { w as N } from "./watch.BCJD77bD.js";
17
+ import { g as V } from "./_commonjsHelpers.ByX85dGu.js";
18
+ import { r as b } from "./state.Cw55xXlb.js";
19
+ import { e as f } from "./query.BBf1UFkC.js";
20
+ import { r as W } from "./choose.BTbF6BAn.js";
21
+ import { e as J } from "./class-map.CoZTSvbM.js";
22
+ import { o as X } from "./map.D8heArFD.js";
23
+ import { c as x } from "./repeat.CauKaXyy.js";
24
+ import { n as g } from "./when.Dr1es41R.js";
25
+ import { t as Y } from "./toString.CL_lYXbK.js";
26
+ import Z from "../components/icon-button.js";
27
+ import { C as Q } from "./image.gpleN29o.js";
28
+ import { t as ee, a as ae, D as I } from "./asset.Ba-CxnNM.js";
29
+ import { a as te } from "./index.Cpamj0jB.js";
30
+ import { A as v } from "./content-builder.WranV3P4.js";
31
+ import { e as ie, t as A } from "./string.DPf4puTr.js";
32
+ var C, k;
33
+ function ne() {
34
+ return k || (k = 1, C = {
35
+ aa: {
36
+ name: "Afar",
37
+ nativeName: "Afaraf"
38
+ },
39
+ ab: {
40
+ name: "Abkhaz",
41
+ nativeName: "аҧсуа бызшәа"
42
+ },
43
+ ae: {
44
+ name: "Avestan",
45
+ nativeName: "avesta"
46
+ },
47
+ af: {
48
+ name: "Afrikaans",
49
+ nativeName: "Afrikaans"
50
+ },
51
+ ak: {
52
+ name: "Akan",
53
+ nativeName: "Akan"
54
+ },
55
+ am: {
56
+ name: "Amharic",
57
+ nativeName: "አማርኛ"
58
+ },
59
+ an: {
60
+ name: "Aragonese",
61
+ nativeName: "aragonés"
62
+ },
63
+ ar: {
64
+ name: "Arabic",
65
+ nativeName: "العربية"
66
+ },
67
+ as: {
68
+ name: "Assamese",
69
+ nativeName: "অসমীয়া"
70
+ },
71
+ av: {
72
+ name: "Avaric",
73
+ nativeName: "авар мацӀ"
74
+ },
75
+ ay: {
76
+ name: "Aymara",
77
+ nativeName: "aymar aru"
78
+ },
79
+ az: {
80
+ name: "Azerbaijani",
81
+ nativeName: "azərbaycan dili"
82
+ },
83
+ ba: {
84
+ name: "Bashkir",
85
+ nativeName: "башҡорт теле"
86
+ },
87
+ be: {
88
+ name: "Belarusian",
89
+ nativeName: "беларуская мова"
90
+ },
91
+ bg: {
92
+ name: "Bulgarian",
93
+ nativeName: "български език"
94
+ },
95
+ bi: {
96
+ name: "Bislama",
97
+ nativeName: "Bislama"
98
+ },
99
+ bm: {
100
+ name: "Bambara",
101
+ nativeName: "bamanankan"
102
+ },
103
+ bn: {
104
+ name: "Bengali",
105
+ nativeName: "বাংলা"
106
+ },
107
+ bo: {
108
+ name: "Tibetan",
109
+ nativeName: "བོད་ཡིག"
110
+ },
111
+ br: {
112
+ name: "Breton",
113
+ nativeName: "brezhoneg"
114
+ },
115
+ bs: {
116
+ name: "Bosnian",
117
+ nativeName: "bosanski jezik"
118
+ },
119
+ ca: {
120
+ name: "Catalan",
121
+ nativeName: "Català"
122
+ },
123
+ ce: {
124
+ name: "Chechen",
125
+ nativeName: "нохчийн мотт"
126
+ },
127
+ ch: {
128
+ name: "Chamorro",
129
+ nativeName: "Chamoru"
130
+ },
131
+ co: {
132
+ name: "Corsican",
133
+ nativeName: "corsu"
134
+ },
135
+ cr: {
136
+ name: "Cree",
137
+ nativeName: "ᓀᐦᐃᔭᐍᐏᐣ"
138
+ },
139
+ cs: {
140
+ name: "Czech",
141
+ nativeName: "Čeština"
142
+ },
143
+ cu: {
144
+ name: "Old Church Slavonic",
145
+ nativeName: "ѩзыкъ словѣньскъ"
146
+ },
147
+ cv: {
148
+ name: "Chuvash",
149
+ nativeName: "чӑваш чӗлхи"
150
+ },
151
+ cy: {
152
+ name: "Welsh",
153
+ nativeName: "Cymraeg"
154
+ },
155
+ da: {
156
+ name: "Danish",
157
+ nativeName: "Dansk"
158
+ },
159
+ de: {
160
+ name: "German",
161
+ nativeName: "Deutsch"
162
+ },
163
+ dv: {
164
+ name: "Divehi",
165
+ nativeName: "ދިވެހި"
166
+ },
167
+ dz: {
168
+ name: "Dzongkha",
169
+ nativeName: "རྫོང་ཁ"
170
+ },
171
+ ee: {
172
+ name: "Ewe",
173
+ nativeName: "Eʋegbe"
174
+ },
175
+ el: {
176
+ name: "Greek",
177
+ nativeName: "Ελληνικά"
178
+ },
179
+ en: {
180
+ name: "English",
181
+ nativeName: "English"
182
+ },
183
+ eo: {
184
+ name: "Esperanto",
185
+ nativeName: "Esperanto"
186
+ },
187
+ es: {
188
+ name: "Spanish",
189
+ nativeName: "Español"
190
+ },
191
+ et: {
192
+ name: "Estonian",
193
+ nativeName: "eesti"
194
+ },
195
+ eu: {
196
+ name: "Basque",
197
+ nativeName: "euskara"
198
+ },
199
+ fa: {
200
+ name: "Persian",
201
+ nativeName: "فارسی"
202
+ },
203
+ ff: {
204
+ name: "Fula",
205
+ nativeName: "Fulfulde"
206
+ },
207
+ fi: {
208
+ name: "Finnish",
209
+ nativeName: "suomi"
210
+ },
211
+ fj: {
212
+ name: "Fijian",
213
+ nativeName: "vosa Vakaviti"
214
+ },
215
+ fo: {
216
+ name: "Faroese",
217
+ nativeName: "Føroyskt"
218
+ },
219
+ fr: {
220
+ name: "French",
221
+ nativeName: "Français"
222
+ },
223
+ fy: {
224
+ name: "Western Frisian",
225
+ nativeName: "Frysk"
226
+ },
227
+ ga: {
228
+ name: "Irish",
229
+ nativeName: "Gaeilge"
230
+ },
231
+ gd: {
232
+ name: "Scottish Gaelic",
233
+ nativeName: "Gàidhlig"
234
+ },
235
+ gl: {
236
+ name: "Galician",
237
+ nativeName: "galego"
238
+ },
239
+ gn: {
240
+ name: "Guaraní",
241
+ nativeName: "Avañe'ẽ"
242
+ },
243
+ gu: {
244
+ name: "Gujarati",
245
+ nativeName: "ગુજરાતી"
246
+ },
247
+ gv: {
248
+ name: "Manx",
249
+ nativeName: "Gaelg"
250
+ },
251
+ ha: {
252
+ name: "Hausa",
253
+ nativeName: "هَوُسَ"
254
+ },
255
+ he: {
256
+ name: "Hebrew",
257
+ nativeName: "עברית"
258
+ },
259
+ hi: {
260
+ name: "Hindi",
261
+ nativeName: "हिन्दी"
262
+ },
263
+ ho: {
264
+ name: "Hiri Motu",
265
+ nativeName: "Hiri Motu"
266
+ },
267
+ hr: {
268
+ name: "Croatian",
269
+ nativeName: "Hrvatski"
270
+ },
271
+ ht: {
272
+ name: "Haitian",
273
+ nativeName: "Kreyòl ayisyen"
274
+ },
275
+ hu: {
276
+ name: "Hungarian",
277
+ nativeName: "magyar"
278
+ },
279
+ hy: {
280
+ name: "Armenian",
281
+ nativeName: "Հայերեն"
282
+ },
283
+ hz: {
284
+ name: "Herero",
285
+ nativeName: "Otjiherero"
286
+ },
287
+ ia: {
288
+ name: "Interlingua",
289
+ nativeName: "Interlingua"
290
+ },
291
+ id: {
292
+ name: "Indonesian",
293
+ nativeName: "Bahasa Indonesia"
294
+ },
295
+ ie: {
296
+ name: "Interlingue",
297
+ nativeName: "Interlingue"
298
+ },
299
+ ig: {
300
+ name: "Igbo",
301
+ nativeName: "Asụsụ Igbo"
302
+ },
303
+ ii: {
304
+ name: "Nuosu",
305
+ nativeName: "ꆈꌠ꒿ Nuosuhxop"
306
+ },
307
+ ik: {
308
+ name: "Inupiaq",
309
+ nativeName: "Iñupiaq"
310
+ },
311
+ io: {
312
+ name: "Ido",
313
+ nativeName: "Ido"
314
+ },
315
+ is: {
316
+ name: "Icelandic",
317
+ nativeName: "Íslenska"
318
+ },
319
+ it: {
320
+ name: "Italian",
321
+ nativeName: "Italiano"
322
+ },
323
+ iu: {
324
+ name: "Inuktitut",
325
+ nativeName: "ᐃᓄᒃᑎᑐᑦ"
326
+ },
327
+ ja: {
328
+ name: "Japanese",
329
+ nativeName: "日本語"
330
+ },
331
+ jv: {
332
+ name: "Javanese",
333
+ nativeName: "basa Jawa"
334
+ },
335
+ ka: {
336
+ name: "Georgian",
337
+ nativeName: "ქართული"
338
+ },
339
+ kg: {
340
+ name: "Kongo",
341
+ nativeName: "Kikongo"
342
+ },
343
+ ki: {
344
+ name: "Kikuyu",
345
+ nativeName: "Gĩkũyũ"
346
+ },
347
+ kj: {
348
+ name: "Kwanyama",
349
+ nativeName: "Kuanyama"
350
+ },
351
+ kk: {
352
+ name: "Kazakh",
353
+ nativeName: "қазақ тілі"
354
+ },
355
+ kl: {
356
+ name: "Kalaallisut",
357
+ nativeName: "kalaallisut"
358
+ },
359
+ km: {
360
+ name: "Khmer",
361
+ nativeName: "ខេមរភាសា"
362
+ },
363
+ kn: {
364
+ name: "Kannada",
365
+ nativeName: "ಕನ್ನಡ"
366
+ },
367
+ ko: {
368
+ name: "Korean",
369
+ nativeName: "한국어"
370
+ },
371
+ kr: {
372
+ name: "Kanuri",
373
+ nativeName: "Kanuri"
374
+ },
375
+ ks: {
376
+ name: "Kashmiri",
377
+ nativeName: "कश्मीरी"
378
+ },
379
+ ku: {
380
+ name: "Kurdish",
381
+ nativeName: "Kurdî"
382
+ },
383
+ kv: {
384
+ name: "Komi",
385
+ nativeName: "коми кыв"
386
+ },
387
+ kw: {
388
+ name: "Cornish",
389
+ nativeName: "Kernewek"
390
+ },
391
+ ky: {
392
+ name: "Kyrgyz",
393
+ nativeName: "Кыргызча"
394
+ },
395
+ la: {
396
+ name: "Latin",
397
+ nativeName: "latine"
398
+ },
399
+ lb: {
400
+ name: "Luxembourgish",
401
+ nativeName: "Lëtzebuergesch"
402
+ },
403
+ lg: {
404
+ name: "Ganda",
405
+ nativeName: "Luganda"
406
+ },
407
+ li: {
408
+ name: "Limburgish",
409
+ nativeName: "Limburgs"
410
+ },
411
+ ln: {
412
+ name: "Lingala",
413
+ nativeName: "Lingála"
414
+ },
415
+ lo: {
416
+ name: "Lao",
417
+ nativeName: "ພາສາລາວ"
418
+ },
419
+ lt: {
420
+ name: "Lithuanian",
421
+ nativeName: "lietuvių kalba"
422
+ },
423
+ lu: {
424
+ name: "Luba-Katanga",
425
+ nativeName: "Kiluba"
426
+ },
427
+ lv: {
428
+ name: "Latvian",
429
+ nativeName: "latviešu valoda"
430
+ },
431
+ mg: {
432
+ name: "Malagasy",
433
+ nativeName: "fiteny malagasy"
434
+ },
435
+ mh: {
436
+ name: "Marshallese",
437
+ nativeName: "Kajin M̧ajeļ"
438
+ },
439
+ mi: {
440
+ name: "Māori",
441
+ nativeName: "te reo Māori"
442
+ },
443
+ mk: {
444
+ name: "Macedonian",
445
+ nativeName: "македонски јазик"
446
+ },
447
+ ml: {
448
+ name: "Malayalam",
449
+ nativeName: "മലയാളം"
450
+ },
451
+ mn: {
452
+ name: "Mongolian",
453
+ nativeName: "Монгол хэл"
454
+ },
455
+ mr: {
456
+ name: "Marathi",
457
+ nativeName: "मराठी"
458
+ },
459
+ ms: {
460
+ name: "Malay",
461
+ nativeName: "Bahasa Melayu"
462
+ },
463
+ mt: {
464
+ name: "Maltese",
465
+ nativeName: "Malti"
466
+ },
467
+ my: {
468
+ name: "Burmese",
469
+ nativeName: "ဗမာစာ"
470
+ },
471
+ na: {
472
+ name: "Nauru",
473
+ nativeName: "Dorerin Naoero"
474
+ },
475
+ nb: {
476
+ name: "Norwegian Bokmål",
477
+ nativeName: "Norsk bokmål"
478
+ },
479
+ nd: {
480
+ name: "Northern Ndebele",
481
+ nativeName: "isiNdebele"
482
+ },
483
+ ne: {
484
+ name: "Nepali",
485
+ nativeName: "नेपाली"
486
+ },
487
+ ng: {
488
+ name: "Ndonga",
489
+ nativeName: "Owambo"
490
+ },
491
+ nl: {
492
+ name: "Dutch",
493
+ nativeName: "Nederlands"
494
+ },
495
+ nn: {
496
+ name: "Norwegian Nynorsk",
497
+ nativeName: "Norsk nynorsk"
498
+ },
499
+ no: {
500
+ name: "Norwegian",
501
+ nativeName: "Norsk"
502
+ },
503
+ nr: {
504
+ name: "Southern Ndebele",
505
+ nativeName: "isiNdebele"
506
+ },
507
+ nv: {
508
+ name: "Navajo",
509
+ nativeName: "Diné bizaad"
510
+ },
511
+ ny: {
512
+ name: "Chichewa",
513
+ nativeName: "chiCheŵa"
514
+ },
515
+ oc: {
516
+ name: "Occitan",
517
+ nativeName: "occitan"
518
+ },
519
+ oj: {
520
+ name: "Ojibwe",
521
+ nativeName: "ᐊᓂᔑᓈᐯᒧᐎᓐ"
522
+ },
523
+ om: {
524
+ name: "Oromo",
525
+ nativeName: "Afaan Oromoo"
526
+ },
527
+ or: {
528
+ name: "Oriya",
529
+ nativeName: "ଓଡ଼ିଆ"
530
+ },
531
+ os: {
532
+ name: "Ossetian",
533
+ nativeName: "ирон æвзаг"
534
+ },
535
+ pa: {
536
+ name: "Panjabi",
537
+ nativeName: "ਪੰਜਾਬੀ"
538
+ },
539
+ pi: {
540
+ name: "Pāli",
541
+ nativeName: "पाऴि"
542
+ },
543
+ pl: {
544
+ name: "Polish",
545
+ nativeName: "Polski"
546
+ },
547
+ ps: {
548
+ name: "Pashto",
549
+ nativeName: "پښتو"
550
+ },
551
+ pt: {
552
+ name: "Portuguese",
553
+ nativeName: "Português"
554
+ },
555
+ qu: {
556
+ name: "Quechua",
557
+ nativeName: "Runa Simi"
558
+ },
559
+ rm: {
560
+ name: "Romansh",
561
+ nativeName: "rumantsch grischun"
562
+ },
563
+ rn: {
564
+ name: "Kirundi",
565
+ nativeName: "Ikirundi"
566
+ },
567
+ ro: {
568
+ name: "Romanian",
569
+ nativeName: "Română"
570
+ },
571
+ ru: {
572
+ name: "Russian",
573
+ nativeName: "Русский"
574
+ },
575
+ rw: {
576
+ name: "Kinyarwanda",
577
+ nativeName: "Ikinyarwanda"
578
+ },
579
+ sa: {
580
+ name: "Sanskrit",
581
+ nativeName: "संस्कृतम्"
582
+ },
583
+ sc: {
584
+ name: "Sardinian",
585
+ nativeName: "sardu"
586
+ },
587
+ sd: {
588
+ name: "Sindhi",
589
+ nativeName: "सिन्धी"
590
+ },
591
+ se: {
592
+ name: "Northern Sami",
593
+ nativeName: "Davvisámegiella"
594
+ },
595
+ sg: {
596
+ name: "Sango",
597
+ nativeName: "yângâ tî sängö"
598
+ },
599
+ si: {
600
+ name: "Sinhala",
601
+ nativeName: "සිංහල"
602
+ },
603
+ sk: {
604
+ name: "Slovak",
605
+ nativeName: "Slovenčina"
606
+ },
607
+ sl: {
608
+ name: "Slovenian",
609
+ nativeName: "slovenščina"
610
+ },
611
+ sm: {
612
+ name: "Samoan",
613
+ nativeName: "gagana fa'a Samoa"
614
+ },
615
+ sn: {
616
+ name: "Shona",
617
+ nativeName: "chiShona"
618
+ },
619
+ so: {
620
+ name: "Somali",
621
+ nativeName: "Soomaaliga"
622
+ },
623
+ sq: {
624
+ name: "Albanian",
625
+ nativeName: "Shqip"
626
+ },
627
+ sr: {
628
+ name: "Serbian",
629
+ nativeName: "српски језик"
630
+ },
631
+ ss: {
632
+ name: "Swati",
633
+ nativeName: "SiSwati"
634
+ },
635
+ st: {
636
+ name: "Southern Sotho",
637
+ nativeName: "Sesotho"
638
+ },
639
+ su: {
640
+ name: "Sundanese",
641
+ nativeName: "Basa Sunda"
642
+ },
643
+ sv: {
644
+ name: "Swedish",
645
+ nativeName: "Svenska"
646
+ },
647
+ sw: {
648
+ name: "Swahili",
649
+ nativeName: "Kiswahili"
650
+ },
651
+ ta: {
652
+ name: "Tamil",
653
+ nativeName: "தமிழ்"
654
+ },
655
+ te: {
656
+ name: "Telugu",
657
+ nativeName: "తెలుగు"
658
+ },
659
+ tg: {
660
+ name: "Tajik",
661
+ nativeName: "тоҷикӣ"
662
+ },
663
+ th: {
664
+ name: "Thai",
665
+ nativeName: "ไทย"
666
+ },
667
+ ti: {
668
+ name: "Tigrinya",
669
+ nativeName: "ትግርኛ"
670
+ },
671
+ tk: {
672
+ name: "Turkmen",
673
+ nativeName: "Türkmençe"
674
+ },
675
+ tl: {
676
+ name: "Tagalog",
677
+ nativeName: "Wikang Tagalog"
678
+ },
679
+ tn: {
680
+ name: "Tswana",
681
+ nativeName: "Setswana"
682
+ },
683
+ to: {
684
+ name: "Tonga",
685
+ nativeName: "faka Tonga"
686
+ },
687
+ tr: {
688
+ name: "Turkish",
689
+ nativeName: "Türkçe"
690
+ },
691
+ ts: {
692
+ name: "Tsonga",
693
+ nativeName: "Xitsonga"
694
+ },
695
+ tt: {
696
+ name: "Tatar",
697
+ nativeName: "татар теле"
698
+ },
699
+ tw: {
700
+ name: "Twi",
701
+ nativeName: "Twi"
702
+ },
703
+ ty: {
704
+ name: "Tahitian",
705
+ nativeName: "Reo Tahiti"
706
+ },
707
+ ug: {
708
+ name: "Uyghur",
709
+ nativeName: "ئۇيغۇرچە‎"
710
+ },
711
+ uk: {
712
+ name: "Ukrainian",
713
+ nativeName: "Українська"
714
+ },
715
+ ur: {
716
+ name: "Urdu",
717
+ nativeName: "اردو"
718
+ },
719
+ uz: {
720
+ name: "Uzbek",
721
+ nativeName: "Ўзбек"
722
+ },
723
+ ve: {
724
+ name: "Venda",
725
+ nativeName: "Tshivenḓa"
726
+ },
727
+ vi: {
728
+ name: "Vietnamese",
729
+ nativeName: "Tiếng Việt"
730
+ },
731
+ vo: {
732
+ name: "Volapük",
733
+ nativeName: "Volapük"
734
+ },
735
+ wa: {
736
+ name: "Walloon",
737
+ nativeName: "walon"
738
+ },
739
+ wo: {
740
+ name: "Wolof",
741
+ nativeName: "Wollof"
742
+ },
743
+ xh: {
744
+ name: "Xhosa",
745
+ nativeName: "isiXhosa"
746
+ },
747
+ yi: {
748
+ name: "Yiddish",
749
+ nativeName: "ייִדיש"
750
+ },
751
+ yo: {
752
+ name: "Yoruba",
753
+ nativeName: "Yorùbá"
754
+ },
755
+ za: {
756
+ name: "Zhuang",
757
+ nativeName: "Saɯ cueŋƅ"
758
+ },
759
+ zh: {
760
+ name: "Chinese",
761
+ nativeName: "中文"
762
+ },
763
+ zu: {
764
+ name: "Zulu",
765
+ nativeName: "isiZulu"
766
+ }
767
+ }), C;
768
+ }
769
+ var w, $;
770
+ function se() {
771
+ if ($) return w;
772
+ $ = 1;
773
+ const e = ne(), a = {}, t = {}, n = [], i = [], m = [];
774
+ for (const d in e) {
775
+ const { name: c, nativeName: h } = e[d];
776
+ a[d] = t[c.toLowerCase()] = t[h.toLowerCase()] = { code: d, name: c, nativeName: h }, n.push(d), i.push(c), m.push(h);
777
+ }
778
+ return w = class y {
779
+ static getLanguages(c = []) {
780
+ return c.map(
781
+ (h) => y.validate(h) ? Object.assign({}, a[h]) : { code: h, name: "", nativeName: "" }
782
+ );
783
+ }
784
+ static getName(c) {
785
+ return y.validate(c) ? e[c].name : "";
786
+ }
787
+ static getAllNames() {
788
+ return i.slice();
789
+ }
790
+ static getNativeName(c) {
791
+ return y.validate(c) ? e[c].nativeName : "";
792
+ }
793
+ static getAllNativeNames() {
794
+ return m.slice();
795
+ }
796
+ static getCode(c) {
797
+ return c = c.toLowerCase(), t.hasOwnProperty(c) ? t[c].code : "";
798
+ }
799
+ static getAllCodes() {
800
+ return n.slice();
801
+ }
802
+ static validate(c) {
803
+ return e.hasOwnProperty(c);
804
+ }
805
+ }, w;
806
+ }
807
+ var re = se();
808
+ const oe = /* @__PURE__ */ V(re);
809
+ var le = 0;
810
+ function me(e) {
811
+ var a = ++le;
812
+ return Y(e) + a;
813
+ }
814
+ const ce = L`
815
+ :host {
816
+ isolation: isolate;
817
+ }
818
+
819
+ .asset-picker__input[data-user-invalid] ~ .asset-picker__button::part(base) {
820
+ border-color: var(--cx-input-invalid-border-color);
821
+ }
822
+
823
+ .asset-picker__input[data-user-invalid]:focus-within
824
+ ~ .asset-picker__button::part(base) {
825
+ border-color: var(--cx-input-invalid-border-color);
826
+ box-shadow: var(--cx-input-invalid-shadow);
827
+ }
828
+
829
+ .asset-picker__button-container {
830
+ position: relative;
831
+ }
832
+
833
+ .asset-picker__button {
834
+ position: relative;
835
+ z-index: 1;
836
+ }
837
+
838
+ .asset-picker__image {
839
+ --height: 150px;
840
+ --width: 200px;
841
+ border-radius: var(--cx-border-radius-medium);
842
+ }
843
+
844
+ .asset-picker__input {
845
+ position: absolute;
846
+ top: 0;
847
+ left: 0;
848
+ width: 100%;
849
+ height: 100%;
850
+ opacity: 0;
851
+ }
852
+ `;
853
+ var de = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, p = (e, a, t, n) => {
854
+ for (var i = n > 1 ? void 0 : n ? ue(a, t) : a, m = e.length - 1, d; m >= 0; m--)
855
+ (d = e[m]) && (i = (n ? d(a, t, i) : d(i)) || i);
856
+ return n && i && de(a, t, i), i;
857
+ };
858
+ let u = class extends z {
859
+ constructor() {
860
+ super(...arguments), this.localize = new O(this), this.value = "", this.name = "", this.type = [v.Image], this.multiple = !1, this.accepts = [], this.required = !1, this.disabled = !1, this.onRequestAsset = void 0;
861
+ }
862
+ async handleRequestAssetClick() {
863
+ if (this.onRequestAsset)
864
+ try {
865
+ this.emit("cx-asset-request-status", {
866
+ detail: {
867
+ busy: !0
868
+ }
869
+ });
870
+ const e = await this.onRequestAsset(
871
+ this.type.join(" "),
872
+ this.multiple,
873
+ this.accepts
874
+ );
875
+ if (this.accepts.length > 0 && Object.values(e).some(
876
+ (t) => !this.accepts.includes(ie(t.src) ?? "")
877
+ ))
878
+ ee(this.localize.term("nonAcceptedExtension", this.accepts), {
879
+ notificationType: "warning"
880
+ });
881
+ else if (this.multiple) {
882
+ const t = Object.values(e);
883
+ this.emit("cx-content-builder-asset-select", {
884
+ detail: t
885
+ });
886
+ } else {
887
+ const { id: t, name: n, src: i, type: m } = e;
888
+ let d = i;
889
+ m === v.Audio && (d = (await ae({
890
+ extraFields: [I],
891
+ recordIds: [t]
892
+ })).items[0]?.[I]), d && this.emit("cx-content-builder-asset-select", {
893
+ detail: {
894
+ id: t,
895
+ name: n,
896
+ src: d,
897
+ type: m
898
+ }
899
+ });
900
+ }
901
+ } catch {
902
+ } finally {
903
+ this.emit("cx-asset-request-status", {
904
+ detail: {
905
+ busy: !1
906
+ }
907
+ });
908
+ }
909
+ }
910
+ async handleValueChange() {
911
+ await this.updateComplete, this.inputEl?.setCustomValidity(
912
+ !this.required || this.value ? "" : this.localize.term("pleaseSelectAnAsset")
913
+ );
914
+ }
915
+ handleDeleteClick() {
916
+ this.emit("cx-content-builder-asset-delete");
917
+ }
918
+ /** True when the picker accepts this asset type. */
919
+ acceptsType(e) {
920
+ return this.type.includes(e);
921
+ }
922
+ renderAssetPreview() {
923
+ if (this.value && this.acceptsType(v.Image))
924
+ return l`<cx-image
925
+ part="image"
926
+ class="asset-picker__image"
927
+ src=${this.value}
928
+ alt=${this.name}
929
+ width="200px"
930
+ object-fit=${te.Cover}
931
+ ></cx-image>`;
932
+ if (this.name && this.acceptsType(v.Video))
933
+ return l`
934
+ <cx-typography variant="body-2">
935
+ ${A(this.name, 30, 11, 11)}
936
+ </cx-typography>`;
937
+ if (this.name && this.acceptsType(v.Other)) {
938
+ const e = this.name.split(",");
939
+ return l`<cx-typography variant="body-2">
940
+ ${A(e[0], 30, 11, 11)}
941
+
942
+ ${g(
943
+ e.length > 1,
944
+ () => l` ${this.localize.term("andOthers", e.length - 1)}`
945
+ )}
946
+ </cx-typography>`;
947
+ }
948
+ if (this.name && this.acceptsType(v.All)) {
949
+ const e = this.name.split(",");
950
+ return l`<cx-typography variant="body-2">
951
+ ${A(e[0], 30, 11, 11)}
952
+ ${g(e.length > 1, () => l` ${this.localize.term("andOthers", e.length - 1)}`)}
953
+ </cx-typography>`;
954
+ }
955
+ return null;
956
+ }
957
+ render() {
958
+ return l`
959
+ <cx-space
960
+ part="base"
961
+ class="asset-picker"
962
+ spacing="2x-small"
963
+ direction="horizontal"
964
+ align-items=${this.acceptsType(v.Image) ? "flex-start" : "center"}
965
+ >
966
+ ${this.renderAssetPreview()}
967
+ ${g(
968
+ !this.disabled,
969
+ () => l`
970
+ <div class="asset-picker__button-container">
971
+ <cx-input
972
+ class="asset-picker__input"
973
+ aria-label=${this.localize.term("choose")}
974
+ name=${this.name}
975
+ value=${this.value}
976
+ ?required=${this.required}
977
+ .form=${this.closest("form")}
978
+ ></cx-input>
979
+ <cx-button
980
+ part="button"
981
+ class="asset-picker__button"
982
+ @click=${this.handleRequestAssetClick}
983
+ >
984
+ ${this.localize.term("choose")}
985
+ </cx-button>
986
+ </div>
987
+ ${g(
988
+ this.value,
989
+ () => l`<cx-icon-button
990
+ label=${this.localize.term("delete")}
991
+ name="delete"
992
+ @click=${this.handleDeleteClick}
993
+ >
994
+ </cx-icon-button>`
995
+ )}
996
+ `
997
+ )}
998
+ </cx-space>
999
+ `;
1000
+ }
1001
+ };
1002
+ u.styles = [M, ce];
1003
+ u.dependencies = {
1004
+ "cx-button": _,
1005
+ "cx-icon-button": Z,
1006
+ "cx-image": Q,
1007
+ "cx-input": S,
1008
+ "cx-space": E,
1009
+ "cx-typography": T
1010
+ };
1011
+ p([
1012
+ f(".asset-picker__button")
1013
+ ], u.prototype, "buttonEl", 2);
1014
+ p([
1015
+ f(".asset-picker__input")
1016
+ ], u.prototype, "inputEl", 2);
1017
+ p([
1018
+ o({ reflect: !0, type: String })
1019
+ ], u.prototype, "value", 2);
1020
+ p([
1021
+ o({ reflect: !0, type: String })
1022
+ ], u.prototype, "name", 2);
1023
+ p([
1024
+ o({
1025
+ converter: {
1026
+ fromAttribute: (e) => (e ?? "").split(" ").filter((a) => a !== ""),
1027
+ toAttribute: (e) => e.join(" ")
1028
+ },
1029
+ reflect: !0
1030
+ })
1031
+ ], u.prototype, "type", 2);
1032
+ p([
1033
+ o({ reflect: !0, type: Boolean })
1034
+ ], u.prototype, "multiple", 2);
1035
+ p([
1036
+ o({
1037
+ converter: {
1038
+ fromAttribute: (e) => (e ?? "").split(" ").filter((a) => a !== ""),
1039
+ toAttribute: (e) => e.join(" ")
1040
+ },
1041
+ reflect: !0
1042
+ })
1043
+ ], u.prototype, "accepts", 2);
1044
+ p([
1045
+ o({ reflect: !0, type: Boolean })
1046
+ ], u.prototype, "required", 2);
1047
+ p([
1048
+ o({ attribute: "disabled", reflect: !0, type: Boolean })
1049
+ ], u.prototype, "disabled", 2);
1050
+ p([
1051
+ o({ attribute: "on-request-asset", type: Function })
1052
+ ], u.prototype, "onRequestAsset", 2);
1053
+ p([
1054
+ N("value")
1055
+ ], u.prototype, "handleValueChange", 1);
1056
+ u = p([
1057
+ D("cx-asset-picker")
1058
+ ], u);
1059
+ const pe = L`
1060
+ :host {
1061
+ --overridden-min-height: var(--min-height, 160px);
1062
+ --overridden-max-height: var(--max-height, 260px);
1063
+ display: block;
1064
+ width: 100%;
1065
+ }
1066
+
1067
+ .list-editor {
1068
+ width: 100%;
1069
+ }
1070
+
1071
+ .list-editor__table {
1072
+ --cell-border-color: transparent;
1073
+ --header-font-size: var(--cx-font-size-small);
1074
+ --row-header-border-color: transparent;
1075
+ --cell-horizontal-padding: var(--cx-spacing-2x-small);
1076
+ --min-height: var(--overridden-min-height);
1077
+ --max-height: var(--overridden-max-height);
1078
+ }
1079
+
1080
+ .list-editor__table--no-header {
1081
+ --cell-hover-background-color: transparent;
1082
+ }
1083
+
1084
+ .list-editor__item::part(expand-button) {
1085
+ display: none;
1086
+ }
1087
+
1088
+ .list-editor__item__text {
1089
+ --line-height: 1;
1090
+ }
1091
+
1092
+ .list-editor__item__text__description {
1093
+ color: var(--cx-color-neutral-600);
1094
+ }
1095
+
1096
+ .list-editor__dialog {
1097
+ --body-spacing: 0;
1098
+ --header-spacing: var(--cx-spacing-small) var(--cx-spacing-large) 0;
1099
+ --width: 540px;
1100
+ }
1101
+
1102
+ .list-editor__tab-group {
1103
+ --padding: 0;
1104
+ --tab-group-nav-padding: 0 var(--cx-spacing-large);
1105
+ }
1106
+ `;
1107
+ var he = Object.defineProperty, ve = Object.getOwnPropertyDescriptor, r = (e, a, t, n) => {
1108
+ for (var i = n > 1 ? void 0 : n ? ve(a, t) : a, m = e.length - 1, d; m >= 0; m--)
1109
+ (d = e[m]) && (i = (n ? d(a, t, i) : d(i)) || i);
1110
+ return n && i && he(a, t, i), i;
1111
+ };
1112
+ const ge = {
1113
+ resizable: !1
1114
+ };
1115
+ let s = class extends z {
1116
+ constructor() {
1117
+ super(...arguments), this.localize = new O(this), this.data = [], this.canAdd = !1, this.addDialogLabel = "", this.editDialogLabel = "", this.displayField = "", this.descriptionField = "", this.addItemText = "", this.sampleItem = {}, this.useEvents = !1, this.sortable = !1, this.loadingEvent = "", this.loadingItemIndex = void 0, this.columns = [], this.noHeader = !1, this.rowHeight = 40, this.defaultLanguage = "", this.supportedLanguages = ["en"], this.boundary = document.body, this.onRequestAsset = void 0, this.editedItem = null, this.isAdding = !1, this.columnsMap = {}, this.sortedEntries = [], this.translatableControls = [], this.disableCloseConfigDialog = !1, this.hoverMenu = {
1118
+ data: [
1119
+ {
1120
+ icon: "create",
1121
+ name: "edit",
1122
+ options: {
1123
+ buttonProps: {
1124
+ variant: "default"
1125
+ }
1126
+ },
1127
+ tooltip: this.localize.term("edit")
1128
+ },
1129
+ {
1130
+ icon: "delete",
1131
+ name: "delete",
1132
+ options: {
1133
+ buttonProps: {
1134
+ variant: "default"
1135
+ },
1136
+ iconStyle: {
1137
+ color: "var(--cx-color-danger)"
1138
+ }
1139
+ },
1140
+ tooltip: this.localize.term("delete")
1141
+ }
1142
+ ],
1143
+ options: {
1144
+ placement: U.Right
1145
+ }
1146
+ }, this.OMITTED_FIELDS = ["id"];
1147
+ }
1148
+ get tabs() {
1149
+ return this.translatableControls.length > 0 ? [
1150
+ "general",
1151
+ "translation"
1152
+ /* Translation */
1153
+ ] : [
1154
+ "general"
1155
+ /* General */
1156
+ ];
1157
+ }
1158
+ handleColumnsChange() {
1159
+ this.columnsMap = {}, this.columns.forEach((e) => {
1160
+ this.columnsMap[e.field] = e;
1161
+ }), this.supportedLanguages.length > 1 ? this.translatableControls = this.columns.filter((e) => e.translatable) : this.translatableControls = [];
1162
+ }
1163
+ handleEditedItemChange() {
1164
+ const e = {};
1165
+ for (const a of this.columns)
1166
+ e[a.field] = a.configOrder;
1167
+ this.sortedEntries = Object.entries(this.editedItem || {}).filter(([a]) => this.OMITTED_FIELDS.indexOf(a) === -1 && this.columnsMap[a]).sort(([a], [t]) => (e[a] ?? Number.MAX_SAFE_INTEGER) - (e[t] ?? Number.MAX_SAFE_INTEGER));
1168
+ }
1169
+ handleTableActions(e) {
1170
+ const { name: a, row: t } = e.detail, n = "component" in t ? t.component : t;
1171
+ if (n) {
1172
+ if (this.useEvents) {
1173
+ this.emit(`cx-list-editor-${a}`, {
1174
+ detail: {
1175
+ index: n.getIndex(),
1176
+ item: n.getData()
1177
+ }
1178
+ });
1179
+ return;
1180
+ }
1181
+ a === "edit" ? this.editedItem = n.getData() : a === "delete" && this.emit("cx-list-editor-change", {
1182
+ detail: {
1183
+ data: this.data.filter((i) => i.id !== n.getData().id)
1184
+ }
1185
+ });
1186
+ }
1187
+ }
1188
+ handleCancelClick() {
1189
+ this.disableCloseConfigDialog || (this.isAdding = !1, this.editedItem = null);
1190
+ }
1191
+ handleRequestClose(e) {
1192
+ if (this.disableCloseConfigDialog) {
1193
+ e.preventDefault();
1194
+ return;
1195
+ }
1196
+ e.stopPropagation(), this.isAdding = !1, this.editedItem = null;
1197
+ }
1198
+ handleAddClick() {
1199
+ this.isAdding = !0, this.editedItem = {
1200
+ ...this.sampleItem,
1201
+ id: me(`${Date.now()}-`)
1202
+ };
1203
+ }
1204
+ handleSaveClick() {
1205
+ if (this.editedItem) {
1206
+ const e = this.data.findIndex(
1207
+ (t) => t.id === this.editedItem.id
1208
+ );
1209
+ if (!this.isAdding && e === -1) {
1210
+ this.editedItem = null;
1211
+ return;
1212
+ }
1213
+ let a = this.data;
1214
+ this.isAdding ? a = [...a, this.editedItem] : a = this.data.map((t) => t.id === this.editedItem.id ? this.editedItem : t), this.emit("cx-list-editor-change", {
1215
+ detail: {
1216
+ data: a
1217
+ }
1218
+ }), this.editedItem = null, this.isAdding = !1;
1219
+ }
1220
+ }
1221
+ handleTableRowMoved() {
1222
+ this.emit("cx-list-editor-change", {
1223
+ detail: {
1224
+ data: this.table?.tabulatorInstance?.getData() ?? this.data ?? []
1225
+ }
1226
+ });
1227
+ }
1228
+ handleAssetRequestStatus(e) {
1229
+ this.disableCloseConfigDialog = e.detail.busy;
1230
+ }
1231
+ async handleLoadingEventChange() {
1232
+ if (await this.updateComplete, !this.table)
1233
+ return;
1234
+ if (!this.loadingItemIndex) {
1235
+ this.table.tabulatorInstance?.getRows().forEach((t) => {
1236
+ const n = t._row.hoverMenuElement;
1237
+ t._row.hoverMenuElement.actions = n.actions.map((i) => (i.options?.buttonProps && (i.options.buttonProps.loading = !1), i));
1238
+ });
1239
+ return;
1240
+ }
1241
+ const e = this.table.tabulatorInstance?.getRow(this.loadingItemIndex);
1242
+ if (!e || !e?._row?.hoverMenuElement)
1243
+ return;
1244
+ const a = e._row.hoverMenuElement;
1245
+ a.actions = a.actions.map((t) => (t.options?.buttonProps && (t.options.buttonProps.loading = t.name === this.loadingEvent && this.loadingItemIndex === e.getIndex()), t));
1246
+ }
1247
+ renderControls(e) {
1248
+ if (e === "translation") {
1249
+ const a = l`
1250
+ ${x(
1251
+ this.translatableControls,
1252
+ (t) => t.field,
1253
+ (t) => l`
1254
+ <cx-grid
1255
+ columns="4"
1256
+ spacing="var(--cx-spacing-small)"
1257
+ column-spacing="0"
1258
+ use-flex-gap
1259
+ row-spacing="0"
1260
+ wrap="wrap"
1261
+ >
1262
+ <cx-grid-item xs="4" sm="1">
1263
+ <cx-typography variant="body2">${t.title}</cx-typography>
1264
+ </cx-grid-item>
1265
+ <cx-grid-item xs="4" sm="3">
1266
+ <cx-space direction="vertical" spacing="x-small" wrap="nowrap">
1267
+ ${X(this.supportedLanguages, (n) => {
1268
+ const i = this.localize.languageName(n) || oe.getName(n) || n, m = (d) => {
1269
+ const c = d.target.value;
1270
+ this.editedItem = {
1271
+ ...this.editedItem,
1272
+ [`${t.field}-${n}`]: c
1273
+ };
1274
+ };
1275
+ return l`
1276
+ <cx-input
1277
+ ?disabled=${n.toLowerCase() === this.defaultLanguage?.toLowerCase()}
1278
+ label=${i}
1279
+ value=${this.editedItem?.[`${t.field}-${n}`] ?? this.editedItem?.[`${t.field}`] ?? ""}
1280
+ @cx-change=${m}
1281
+ ></cx-input>
1282
+ `;
1283
+ })}
1284
+ </cx-space>
1285
+ </cx-grid-item>
1286
+ </cx-grid>`
1287
+ )}
1288
+ `;
1289
+ return l`<cx-space direction="vertical" wrap="nowrap">${a}</cx-space>`;
1290
+ }
1291
+ return l`
1292
+ <cx-grid columns="3" spacing="var(--cx-spacing-small)" wrap="wrap">
1293
+ ${x(
1294
+ this.sortedEntries,
1295
+ ([a]) => a,
1296
+ ([a, t]) => l`<cx-grid-item xs="3" sm="1">
1297
+ <cx-typography variant="body2">
1298
+ ${this.columnsMap[a].title}
1299
+ </cx-typography>
1300
+ </cx-grid-item>
1301
+ <cx-grid-item xs="3" sm="2">
1302
+ ${W(
1303
+ this.columnsMap[a].controlType,
1304
+ [
1305
+ [
1306
+ "image-picker",
1307
+ () => l`<cx-asset-picker
1308
+ value=${t}
1309
+ type="image"
1310
+ id=${a}
1311
+ @cx-content-builder-asset-select=${async (m) => {
1312
+ if (Array.isArray(m.detail))
1313
+ return;
1314
+ const { src: d } = m.detail;
1315
+ this.editedItem = {
1316
+ ...this.editedItem,
1317
+ [a]: d
1318
+ };
1319
+ }}
1320
+ @cx-content-builder-asset-delete=${async () => {
1321
+ this.editedItem = {
1322
+ ...this.editedItem,
1323
+ [a]: ""
1324
+ };
1325
+ }}
1326
+ @cx-asset-request-status=${this.handleAssetRequestStatus}
1327
+ .onRequestAsset=${this.onRequestAsset}
1328
+ >
1329
+ </cx-asset-picker>`
1330
+ ],
1331
+ [
1332
+ "radio-group",
1333
+ () => {
1334
+ const n = (i) => {
1335
+ const m = i.target.value;
1336
+ this.editedItem = {
1337
+ ...this.editedItem,
1338
+ [a]: m
1339
+ };
1340
+ };
1341
+ return l`<cx-radio-group
1342
+ data-testid="radio-group-control"
1343
+ horizontal
1344
+ value=${(t || this.columnsMap[a].defaultValue) ?? ""}
1345
+ size="medium"
1346
+ @cx-change=${n}
1347
+ >
1348
+ ${x(
1349
+ this.columnsMap[a].options ?? [],
1350
+ (i) => i.value,
1351
+ (i) => l`<cx-radio value=${i.value}>
1352
+ ${i.name}
1353
+ </cx-radio>`
1354
+ )}
1355
+ </cx-radio-group>`;
1356
+ }
1357
+ ]
1358
+ ],
1359
+ () => l`
1360
+ <cx-input
1361
+ value=${t}
1362
+ @cx-change=${(i) => {
1363
+ const m = i.target.value;
1364
+ this.editedItem = {
1365
+ ...this.editedItem,
1366
+ [a]: m
1367
+ };
1368
+ }}
1369
+ ></cx-input>`
1370
+ )}
1371
+ </cx-grid-item>`
1372
+ )}
1373
+ </cx-grid>
1374
+ `;
1375
+ }
1376
+ render() {
1377
+ return l`
1378
+ <cx-space direction="vertical" align-items="flex-start">
1379
+ <div class="list-editor">
1380
+ <cx-table
1381
+ part="table"
1382
+ class=${J({
1383
+ "list-editor__table": !0,
1384
+ "list-editor__table--no-header": this.noHeader
1385
+ })}
1386
+ ?movable-rows=${this.sortable}
1387
+ ?no-header=${this.noHeader}
1388
+ layout="fitColumns"
1389
+ row-height=${this.rowHeight}
1390
+ .columns=${this.columns}
1391
+ .columnDefaults=${ge}
1392
+ .hoverMenu=${this.hoverMenu}
1393
+ .data=${this.data ?? []}
1394
+ no-selectable
1395
+ @cx-table.rowMoved=${this.handleTableRowMoved}
1396
+ @cx-table-row-action-click=${this.handleTableActions}
1397
+ ></cx-table>
1398
+ <cx-dialog
1399
+ part="dialog"
1400
+ class="list-editor__dialog"
1401
+ divider-position=${j.Footer}
1402
+ use-overlay-scrollbar
1403
+ strategy="fixed"
1404
+ ?open=${!!this.editedItem}
1405
+ .boundary=${this.boundary}
1406
+ @cx-request-close=${this.handleRequestClose}
1407
+ >
1408
+ <cx-space slot="label" direction="vertical" spacing="2x-small">
1409
+ <cx-typography variant="h4">
1410
+ ${this.isAdding ? this.addDialogLabel : this.editDialogLabel}
1411
+ </cx-typography>
1412
+ ${g(
1413
+ !this.isAdding && this.editedItem?.[this.displayField],
1414
+ () => l`<cx-typography variant="body3">
1415
+ <cx-line-clamp lines="1">
1416
+ ${this.editedItem?.[this.displayField]}
1417
+ </cx-line-clamp>
1418
+ </cx-typography>`
1419
+ )}
1420
+ </cx-space>
1421
+ ${g(
1422
+ this.tabs.length > 1,
1423
+ () => l`
1424
+ <cx-tab-group
1425
+ class="list-editor__tab-group"
1426
+ placement="top"
1427
+ >
1428
+ ${x(
1429
+ this.tabs,
1430
+ (e) => e,
1431
+ (e) => l`
1432
+ <cx-tab
1433
+ slot="nav"
1434
+ panel=${e}
1435
+ >
1436
+ ${this.localize.term(e)}
1437
+ </cx-tab>
1438
+ <cx-tab-panel
1439
+ name=${e}
1440
+ >
1441
+ <cx-space
1442
+ direction="vertical"
1443
+ spacing="x-small"
1444
+ wrap="nowrap"
1445
+ >
1446
+ ${this.renderControls(e)}
1447
+ </cx-space>
1448
+ </cx-tab-panel>
1449
+ `
1450
+ )}
1451
+ </cx-tab-group>`,
1452
+ () => l`
1453
+ <cx-space
1454
+ direction="vertical"
1455
+ spacing="x-small"
1456
+ wrap="nowrap"
1457
+ >
1458
+ ${this.renderControls(this.tabs[0])}
1459
+ </cx-space>
1460
+ `
1461
+ )}
1462
+ <cx-space
1463
+ slot="footer"
1464
+ spacing="x-small"
1465
+ wrap="nowrap"
1466
+ justify-content="end"
1467
+ >
1468
+ <cx-button
1469
+ data-testid="cancel-button"
1470
+ variant="default"
1471
+ size="medium"
1472
+ @click=${this.handleCancelClick}
1473
+ >
1474
+ ${this.localize.term("cancel")}
1475
+ </cx-button>
1476
+ <cx-button
1477
+ data-testid="save-button"
1478
+ variant="primary"
1479
+ size="medium"
1480
+ @click=${this.handleSaveClick}
1481
+ >
1482
+ ${this.localize.term("save")}
1483
+ </cx-button>
1484
+ </cx-space>
1485
+ </cx-dialog>
1486
+ </div>
1487
+ ${g(
1488
+ this.canAdd,
1489
+ () => l`
1490
+ <cx-button
1491
+ data-testid="add-button"
1492
+ variant="default"
1493
+ size="medium"
1494
+ @click=${this.handleAddClick}
1495
+ >
1496
+ ${this.addItemText || this.localize.term("add")}
1497
+ </cx-button>
1498
+ `
1499
+ )}
1500
+ </cx-space>
1501
+ `;
1502
+ }
1503
+ };
1504
+ s.styles = [M, pe];
1505
+ s.dependencies = {
1506
+ "cx-asset-picker": u,
1507
+ "cx-button": _,
1508
+ "cx-dialog": q,
1509
+ "cx-grid": G,
1510
+ "cx-grid-item": R,
1511
+ "cx-input": S,
1512
+ "cx-line-clamp": P,
1513
+ "cx-radio": F,
1514
+ "cx-radio-group": B,
1515
+ "cx-space": E,
1516
+ "cx-table": K,
1517
+ "cx-typography": T
1518
+ };
1519
+ r([
1520
+ f("cx-dialog")
1521
+ ], s.prototype, "dialog", 2);
1522
+ r([
1523
+ f("cx-table")
1524
+ ], s.prototype, "table", 2);
1525
+ r([
1526
+ o({
1527
+ converter: {
1528
+ fromAttribute: (e) => {
1529
+ try {
1530
+ const a = JSON.parse(e);
1531
+ return Array.isArray(a) ? a : [];
1532
+ } catch {
1533
+ return [];
1534
+ }
1535
+ },
1536
+ toAttribute: (e) => JSON.stringify(e)
1537
+ },
1538
+ reflect: !1,
1539
+ type: String
1540
+ })
1541
+ ], s.prototype, "data", 2);
1542
+ r([
1543
+ o({ attribute: "can-add", reflect: !0, type: Boolean })
1544
+ ], s.prototype, "canAdd", 2);
1545
+ r([
1546
+ o({ attribute: "add-dialog-label", reflect: !0, type: String })
1547
+ ], s.prototype, "addDialogLabel", 2);
1548
+ r([
1549
+ o({ attribute: "edit-dialog-label", reflect: !0, type: String })
1550
+ ], s.prototype, "editDialogLabel", 2);
1551
+ r([
1552
+ o({ attribute: "display-field", reflect: !0, type: String })
1553
+ ], s.prototype, "displayField", 2);
1554
+ r([
1555
+ o({ attribute: "description-field", reflect: !0, type: String })
1556
+ ], s.prototype, "descriptionField", 2);
1557
+ r([
1558
+ o({ attribute: "add-item-text", reflect: !0, type: String })
1559
+ ], s.prototype, "addItemText", 2);
1560
+ r([
1561
+ o({ attribute: "sample-item", type: Object })
1562
+ ], s.prototype, "sampleItem", 2);
1563
+ r([
1564
+ o({ attribute: "use-events", reflect: !0, type: Boolean })
1565
+ ], s.prototype, "useEvents", 2);
1566
+ r([
1567
+ o({ reflect: !0, type: Boolean })
1568
+ ], s.prototype, "sortable", 2);
1569
+ r([
1570
+ o({ attribute: "loading-event", reflect: !0, type: String })
1571
+ ], s.prototype, "loadingEvent", 2);
1572
+ r([
1573
+ o({ attribute: "loading-item-index", reflect: !0, type: String })
1574
+ ], s.prototype, "loadingItemIndex", 2);
1575
+ r([
1576
+ o({ attribute: "columns", reflect: !1, type: Array })
1577
+ ], s.prototype, "columns", 2);
1578
+ r([
1579
+ o({ attribute: "no-header", reflect: !0, type: Boolean })
1580
+ ], s.prototype, "noHeader", 2);
1581
+ r([
1582
+ o({ attribute: "row-height", reflect: !0, type: Number })
1583
+ ], s.prototype, "rowHeight", 2);
1584
+ r([
1585
+ o({ attribute: "default-language", reflect: !0, type: String })
1586
+ ], s.prototype, "defaultLanguage", 2);
1587
+ r([
1588
+ o({
1589
+ attribute: "supported-languages",
1590
+ converter: {
1591
+ fromAttribute: (e) => e.split(" "),
1592
+ toAttribute: (e) => Array.isArray(e) ? e.join(" ") : e
1593
+ },
1594
+ reflect: !0,
1595
+ type: Array
1596
+ })
1597
+ ], s.prototype, "supportedLanguages", 2);
1598
+ r([
1599
+ o({ type: Object })
1600
+ ], s.prototype, "boundary", 2);
1601
+ r([
1602
+ o({ attribute: "on-request-asset", type: Function })
1603
+ ], s.prototype, "onRequestAsset", 2);
1604
+ r([
1605
+ b()
1606
+ ], s.prototype, "editedItem", 2);
1607
+ r([
1608
+ b()
1609
+ ], s.prototype, "isAdding", 2);
1610
+ r([
1611
+ b()
1612
+ ], s.prototype, "columnsMap", 2);
1613
+ r([
1614
+ b()
1615
+ ], s.prototype, "sortedEntries", 2);
1616
+ r([
1617
+ b()
1618
+ ], s.prototype, "translatableControls", 2);
1619
+ r([
1620
+ N("columns"),
1621
+ N("supportedLanguages", { waitUntilFirstUpdate: !0 })
1622
+ ], s.prototype, "handleColumnsChange", 1);
1623
+ r([
1624
+ N("editedItem"),
1625
+ N("columns", { waitUntilFirstUpdate: !0 })
1626
+ ], s.prototype, "handleEditedItemChange", 1);
1627
+ r([
1628
+ N("loadingEvent", { waitUntilFirstUpdate: !0 }),
1629
+ N("loadingItemIndex", { waitUntilFirstUpdate: !0 }),
1630
+ H(10)
1631
+ ], s.prototype, "handleLoadingEventChange", 1);
1632
+ s = r([
1633
+ D("cx-list-editor")
1634
+ ], s);
1635
+ export {
1636
+ s as C,
1637
+ oe as I,
1638
+ u as a,
1639
+ ge as c,
1640
+ me as u
1641
+ };