@limetech/lime-crm-building-blocks 1.116.0 → 1.116.2

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 (480) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/{_Map-60aae0ed.js → _Map-BlpAtLvq.js} +12 -24
  3. package/dist/cjs/{_MapCache-8b125fbb.js → _MapCache-De1Fwe0H.js} +5 -7
  4. package/dist/cjs/{_Uint8Array-95263550.js → _Uint8Array-C_lvn5HO.js} +6 -14
  5. package/dist/cjs/{_baseIsEqual-f2d60d3e.js → _baseIsEqual-BtwicGmu.js} +4 -4
  6. package/dist/cjs/{_defineProperty-40a6ad5d.js → _defineProperty-eImBwVFM.js} +2 -4
  7. package/dist/cjs/{_getTag-8809c5c6.js → _getTag-CdUodI28.js} +18 -39
  8. package/dist/cjs/{get-932b213e.js → get-BRGtX379.js} +6 -14
  9. package/dist/cjs/{index-519b904a.js → index-C_OnxXhP.js} +541 -322
  10. package/dist/cjs/index.esm-DhBVH875.js +838 -0
  11. package/dist/cjs/{isSymbol-5b36aeee.js → isSymbol-D8S28StA.js} +1 -1
  12. package/dist/cjs/lime-crm-building-blocks.cjs.js +7 -7
  13. package/dist/cjs/{lime-query-validation-c118b96d.js → lime-query-validation-CWlZPm8m.js} +8 -8
  14. package/dist/cjs/limebb-alert-dialog.cjs.entry.js +5 -8
  15. package/dist/cjs/limebb-browser.cjs.entry.js +11 -14
  16. package/dist/cjs/limebb-chat-icon-list_3.cjs.entry.js +15 -20
  17. package/dist/cjs/limebb-chat-list.cjs.entry.js +11 -12
  18. package/dist/cjs/limebb-component-config.cjs.entry.js +17 -16
  19. package/dist/cjs/limebb-component-picker.cjs.entry.js +9 -12
  20. package/dist/cjs/limebb-composer-toolbar.cjs.entry.js +9 -12
  21. package/dist/cjs/limebb-currency-picker.cjs.entry.js +1907 -1790
  22. package/dist/cjs/limebb-dashboard-widget.cjs.entry.js +4 -7
  23. package/dist/cjs/limebb-data-cells.cjs.entry.js +5 -8
  24. package/dist/cjs/limebb-date-picker.cjs.entry.js +7 -9
  25. package/dist/cjs/limebb-date-range.cjs.entry.js +6 -9
  26. package/dist/cjs/limebb-document-chips.cjs.entry.js +10 -11
  27. package/dist/cjs/limebb-document-item.cjs.entry.js +6 -9
  28. package/dist/cjs/limebb-document-picker.cjs.entry.js +6 -9
  29. package/dist/cjs/limebb-empty-state.cjs.entry.js +3 -6
  30. package/dist/cjs/limebb-feed-item-thumbnail-file-info.cjs.entry.js +4 -7
  31. package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +8 -11
  32. package/dist/cjs/limebb-feed.cjs.entry.js +430 -168
  33. package/dist/cjs/limebb-icon-picker.cjs.entry.js +4 -6
  34. package/dist/cjs/limebb-info-tile-currency-format.cjs.entry.js +2 -4
  35. package/dist/cjs/limebb-info-tile-date-format.cjs.entry.js +4 -7
  36. package/dist/cjs/limebb-info-tile-decimal-format.cjs.entry.js +2 -4
  37. package/dist/cjs/limebb-info-tile-format.cjs.entry.js +5 -8
  38. package/dist/cjs/limebb-info-tile-relative-date-format.cjs.entry.js +2 -4
  39. package/dist/cjs/limebb-info-tile-unit-format.cjs.entry.js +2 -4
  40. package/dist/cjs/limebb-info-tile.cjs.entry.js +27 -24
  41. package/dist/cjs/limebb-kanban-group.cjs.entry.js +8 -11
  42. package/dist/cjs/limebb-kanban-item.cjs.entry.js +8 -11
  43. package/dist/cjs/limebb-kanban.cjs.entry.js +5 -8
  44. package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +9 -12
  45. package/dist/cjs/limebb-lime-query-filter-builder_3.cjs.entry.js +27 -29
  46. package/dist/cjs/limebb-lime-query-filter-comparison_2.cjs.entry.js +26 -30
  47. package/dist/cjs/limebb-lime-query-filter-group_3.cjs.entry.js +25 -30
  48. package/dist/cjs/limebb-lime-query-order-by-item.cjs.entry.js +6 -9
  49. package/dist/cjs/limebb-lime-query-response-format-builder.cjs.entry.js +9 -12
  50. package/dist/cjs/limebb-lime-query-response-format-editor_2.cjs.entry.js +8 -12
  51. package/dist/cjs/limebb-limeobject-file-viewer.cjs.entry.js +9 -12
  52. package/dist/cjs/limebb-live-docs-info.cjs.entry.js +5 -8
  53. package/dist/cjs/limebb-loader.cjs.entry.js +12 -10
  54. package/dist/cjs/limebb-locale-picker.cjs.entry.js +29 -49
  55. package/dist/cjs/limebb-mention-group-counter.cjs.entry.js +5 -8
  56. package/dist/cjs/limebb-mention.cjs.entry.js +6 -9
  57. package/dist/cjs/limebb-navigation-button_2.cjs.entry.js +10 -14
  58. package/dist/cjs/limebb-notification-item.cjs.entry.js +9 -12
  59. package/dist/cjs/limebb-notification-list.cjs.entry.js +10 -11
  60. package/dist/cjs/limebb-object-chip.cjs.entry.js +16 -15
  61. package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +9 -10
  62. package/dist/cjs/limebb-property-selector.cjs.entry.js +9 -12
  63. package/dist/cjs/limebb-text-editor-picker.cjs.entry.js +9 -10
  64. package/dist/cjs/limebb-text-editor.cjs.entry.js +53 -307
  65. package/dist/cjs/limebb-trend-indicator.cjs.entry.js +8 -9
  66. package/dist/cjs/{limetype-3c1c53b6.js → limetype-6tkuY6nm.js} +2 -2
  67. package/dist/cjs/loader.cjs.js +3 -5
  68. package/dist/collection/collection-manifest.json +3 -2
  69. package/dist/collection/components/alert-dialog/alert-dialog.css +133 -1
  70. package/dist/collection/components/alert-dialog/alert-dialog.js +11 -10
  71. package/dist/collection/components/browser/browser.js +14 -9
  72. package/dist/collection/components/chat-list/chat-icon-list/chat-icon-list.css +9 -11
  73. package/dist/collection/components/chat-list/chat-icon-list/chat-icon-list.js +3 -2
  74. package/dist/collection/components/chat-list/chat-item/chat-item.css +9 -0
  75. package/dist/collection/components/chat-list/chat-item/chat-item.js +11 -8
  76. package/dist/collection/components/chat-list/chat-list.css +9 -0
  77. package/dist/collection/components/chat-list/chat-list.js +15 -12
  78. package/dist/collection/components/chat-list/typing-indicator/typing-indicator.js +1 -1
  79. package/dist/collection/components/component-command-picker/component-config/component-config.js +23 -19
  80. package/dist/collection/components/component-command-picker/component-picker/component-picker.js +21 -18
  81. package/dist/collection/components/composer-toolbar/composer-toolbar.js +14 -10
  82. package/dist/collection/components/currency-picker/currency-picker.js +15 -13
  83. package/dist/collection/components/dashboard-widget/dashboard-widget.js +11 -10
  84. package/dist/collection/components/data-cells/data-cells.css +9 -0
  85. package/dist/collection/components/data-cells/data-cells.js +8 -5
  86. package/dist/collection/components/date-picker/date-picker.js +20 -17
  87. package/dist/collection/components/date-range/date-range.js +19 -15
  88. package/dist/collection/components/document-chips/document-chips.js +5 -4
  89. package/dist/collection/components/document-picker/document-item/document-item.js +13 -8
  90. package/dist/collection/components/document-picker/document-picker.css +9 -0
  91. package/dist/collection/components/document-picker/document-picker.js +18 -13
  92. package/dist/collection/components/empty-state/empty-state.js +6 -5
  93. package/dist/collection/components/feed/feed-item/feed-timeline-item.css +41 -11
  94. package/dist/collection/components/feed/feed-item/feed-timeline-item.js +12 -9
  95. package/dist/collection/components/feed/feed-item-thumbnail-file-info/feed-item-thumbnail-file-info.css +9 -0
  96. package/dist/collection/components/feed/feed-item-thumbnail-file-info/feed-item-thumbnail-file-info.js +3 -3
  97. package/dist/collection/components/feed/feed.js +21 -18
  98. package/dist/collection/components/icon-picker/icon-picker.js +15 -15
  99. package/dist/collection/components/info-tile/format/config/info-tile-currency-format.js +8 -4
  100. package/dist/collection/components/info-tile/format/config/info-tile-date-format.js +4 -2
  101. package/dist/collection/components/info-tile/format/config/info-tile-decimal-format.js +4 -2
  102. package/dist/collection/components/info-tile/format/config/info-tile-format.js +11 -7
  103. package/dist/collection/components/info-tile/format/config/info-tile-relative-date-format.js +4 -2
  104. package/dist/collection/components/info-tile/format/config/info-tile-unit-format.js +4 -2
  105. package/dist/collection/components/info-tile/info-tile.js +29 -23
  106. package/dist/collection/components/kanban/kanban-group/kanban-group.css +25 -9
  107. package/dist/collection/components/kanban/kanban-group/kanban-group.js +19 -16
  108. package/dist/collection/components/kanban/kanban-item/kanban-item.css +9 -0
  109. package/dist/collection/components/kanban/kanban-item/kanban-item.js +9 -5
  110. package/dist/collection/components/kanban/kanban.js +10 -5
  111. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-builder.js +12 -8
  112. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison.js +11 -9
  113. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-expression.css +9 -0
  114. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-expression.js +14 -10
  115. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-group.css +9 -0
  116. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-group.js +14 -10
  117. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-not.css +9 -0
  118. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-not.js +15 -11
  119. package/dist/collection/components/lime-query-builder/expressions/lime-query-value-input.js +17 -14
  120. package/dist/collection/components/lime-query-builder/lime-query-builder.js +13 -9
  121. package/dist/collection/components/lime-query-builder/lime-query-response-format-builder.js +13 -9
  122. package/dist/collection/components/lime-query-builder/limetype-field/limetype-field.js +22 -19
  123. package/dist/collection/components/lime-query-builder/order-by/order-by-editor.js +12 -8
  124. package/dist/collection/components/lime-query-builder/order-by/order-by-item.js +12 -8
  125. package/dist/collection/components/lime-query-builder/property-selector/property-selector.js +12 -10
  126. package/dist/collection/components/lime-query-builder/response-format/response-format-editor.js +11 -7
  127. package/dist/collection/components/lime-query-builder/response-format/response-format-item.css +17 -1
  128. package/dist/collection/components/lime-query-builder/response-format/response-format-item.js +11 -7
  129. package/dist/collection/components/limeobject/file-viewer/file-viewer.js +8 -5
  130. package/dist/collection/components/limeobject/file-viewer/live-docs-info.js +2 -2
  131. package/dist/collection/components/loader/loader.js +4 -2
  132. package/dist/collection/components/locale-picker/locale-picker.js +23 -19
  133. package/dist/collection/components/mention/mention.js +4 -4
  134. package/dist/collection/components/navigation-button/navigation-button.css +24 -1
  135. package/dist/collection/components/navigation-button/navigation-button.js +10 -9
  136. package/dist/collection/components/notification-list/notification-item/notification-item.css +9 -0
  137. package/dist/collection/components/notification-list/notification-item/notification-item.js +9 -5
  138. package/dist/collection/components/notification-list/notification-list.css +9 -0
  139. package/dist/collection/components/notification-list/notification-list.js +12 -8
  140. package/dist/collection/components/object-chip/object-chip.js +7 -6
  141. package/dist/collection/components/percentage-visualizer/percentage-visualizer.css +9 -0
  142. package/dist/collection/components/percentage-visualizer/percentage-visualizer.js +21 -19
  143. package/dist/collection/components/summary-popover/summary-popover.js +28 -21
  144. package/dist/collection/components/text-editor/mention-group-counter.js +8 -7
  145. package/dist/collection/components/text-editor/text-editor-picker.js +10 -7
  146. package/dist/collection/components/text-editor/text-editor.js +37 -29
  147. package/dist/collection/components/trend-indicator/trend-indicator.css +9 -0
  148. package/dist/collection/components/trend-indicator/trend-indicator.js +19 -17
  149. package/dist/components/_Map.js +1 -342
  150. package/dist/components/_MapCache.js +1 -433
  151. package/dist/components/_Uint8Array.js +1 -349
  152. package/dist/components/_baseIsEqual.js +1 -494
  153. package/dist/components/_defineProperty.js +1 -13
  154. package/dist/components/_getTag.js +1 -421
  155. package/dist/components/chat-icon-list.js +1 -55
  156. package/dist/components/chat-item.js +1 -184
  157. package/dist/components/currency-picker.js +1 -1917
  158. package/dist/components/date-picker.js +1 -151
  159. package/dist/components/document-item.js +1 -212
  160. package/dist/components/dom.js +1 -26
  161. package/dist/components/empty-state.js +1 -61
  162. package/dist/components/extension-mapping.js +1 -55
  163. package/dist/components/feed-item-thumbnail-file-info.js +1 -33
  164. package/dist/components/feed-timeline-item.js +1 -453
  165. package/dist/components/get.js +1 -308
  166. package/dist/components/highlight-item.handler.js +1 -36
  167. package/dist/components/index.d.ts +2 -0
  168. package/dist/components/index.esm.js +1 -963
  169. package/dist/components/index.js +1 -1
  170. package/dist/components/isSymbol.js +1 -28
  171. package/dist/components/kanban-group.js +1 -148
  172. package/dist/components/kanban-item.js +1 -182
  173. package/dist/components/keycodes.js +1 -7
  174. package/dist/components/lime-query-filter-builder.js +1 -132
  175. package/dist/components/lime-query-filter-comparison.js +1 -180
  176. package/dist/components/lime-query-filter-expression.js +1 -420
  177. package/dist/components/lime-query-validation.js +1 -617
  178. package/dist/components/lime-query-value-input.js +1 -387
  179. package/dist/components/limebb-alert-dialog.js +1 -71
  180. package/dist/components/limebb-browser.js +1 -116
  181. package/dist/components/limebb-chat-icon-list.js +1 -6
  182. package/dist/components/limebb-chat-item.js +1 -6
  183. package/dist/components/limebb-chat-list.js +1 -302
  184. package/dist/components/limebb-component-config.js +1 -176
  185. package/dist/components/limebb-component-picker.js +1 -180
  186. package/dist/components/limebb-composer-toolbar.js +1 -136
  187. package/dist/components/limebb-currency-picker.js +1 -6
  188. package/dist/components/limebb-dashboard-widget.js +1 -48
  189. package/dist/components/limebb-data-cells.js +1 -169
  190. package/dist/components/limebb-date-picker.js +1 -6
  191. package/dist/components/limebb-date-range.js +1 -83
  192. package/dist/components/limebb-document-chips.js +1 -437
  193. package/dist/components/limebb-document-item.js +1 -6
  194. package/dist/components/limebb-document-picker.js +1 -111
  195. package/dist/components/limebb-empty-state.js +1 -6
  196. package/dist/components/limebb-feed-item-thumbnail-file-info.js +1 -6
  197. package/dist/components/limebb-feed-timeline-item.js +1 -6
  198. package/dist/components/limebb-feed.js +1 -398
  199. package/dist/components/limebb-icon-picker.js +1 -53026
  200. package/dist/components/limebb-info-tile-currency-format.js +1 -116
  201. package/dist/components/limebb-info-tile-date-format.js +1 -272
  202. package/dist/components/limebb-info-tile-decimal-format.js +1 -95
  203. package/dist/components/limebb-info-tile-format.js +1 -144
  204. package/dist/components/limebb-info-tile-relative-date-format.js +1 -72
  205. package/dist/components/limebb-info-tile-unit-format.js +1 -183
  206. package/dist/components/limebb-info-tile.js +1 -626
  207. package/dist/components/limebb-kanban-group.js +1 -6
  208. package/dist/components/limebb-kanban-item.js +1 -6
  209. package/dist/components/limebb-kanban.js +1 -79
  210. package/dist/components/limebb-lime-query-builder.js +1 -424
  211. package/dist/components/limebb-lime-query-filter-builder.js +1 -6
  212. package/dist/components/limebb-lime-query-filter-comparison.js +1 -6
  213. package/dist/components/limebb-lime-query-filter-expression.js +1 -6
  214. package/dist/components/limebb-lime-query-filter-group.js +1 -6
  215. package/dist/components/limebb-lime-query-filter-not.js +1 -6
  216. package/dist/components/limebb-lime-query-order-by-editor.js +1 -6
  217. package/dist/components/limebb-lime-query-order-by-item.js +1 -6
  218. package/dist/components/limebb-lime-query-response-format-builder.js +1 -310
  219. package/dist/components/limebb-lime-query-response-format-editor.js +1 -6
  220. package/dist/components/limebb-lime-query-response-format-item.js +1 -6
  221. package/dist/components/limebb-lime-query-value-input.js +1 -6
  222. package/dist/components/limebb-limeobject-file-viewer.js +1 -175
  223. package/dist/components/limebb-limetype-field.js +1 -6
  224. package/dist/components/limebb-live-docs-info.js +1 -6
  225. package/dist/components/limebb-loader.js +1 -78
  226. package/dist/components/limebb-locale-picker.js +1 -1165
  227. package/dist/components/limebb-mention-group-counter.js +1 -48
  228. package/dist/components/limebb-mention.js +1 -79
  229. package/dist/components/limebb-navigation-button.js +1 -6
  230. package/dist/components/limebb-notification-item.js +1 -6
  231. package/dist/components/limebb-notification-list.js +1 -253
  232. package/dist/components/limebb-object-chip.js +1 -253
  233. package/dist/components/limebb-percentage-visualizer.js +1 -6
  234. package/dist/components/limebb-property-selector.js +1 -6
  235. package/dist/components/limebb-summary-popover.js +1 -6
  236. package/dist/components/limebb-text-editor-picker.js +1 -6
  237. package/dist/components/limebb-text-editor.js +1 -1902
  238. package/dist/components/limebb-trend-indicator.js +1 -175
  239. package/dist/components/limebb-typing-indicator.js +1 -6
  240. package/dist/components/limetype-field.js +1 -216
  241. package/dist/components/limetype.js +1 -85
  242. package/dist/components/live-docs-info.js +1 -34
  243. package/dist/components/navigation-button.js +1 -74
  244. package/dist/components/negate.js +1 -40
  245. package/dist/components/non-null.js +1 -10
  246. package/dist/components/notification-item.js +1 -168
  247. package/dist/components/order-by-editor.js +1 -139
  248. package/dist/components/order-by-item.js +1 -73
  249. package/dist/components/percentage-class.js +1 -64
  250. package/dist/components/percentage-visualizer.js +1 -219
  251. package/dist/components/property-selector.js +1 -372
  252. package/dist/components/random-string.js +1 -22
  253. package/dist/components/response-format-editor.js +1 -331
  254. package/dist/components/response-format-item.js +1 -126
  255. package/dist/components/summary-popover.js +1 -159
  256. package/dist/components/text-editor-picker.js +1 -128
  257. package/dist/components/typing-indicator.js +1 -31
  258. package/dist/esm/{_Map-aede53b6.js → _Map-ByjZfyP_.js} +8 -20
  259. package/dist/esm/{_MapCache-af496e9d.js → _MapCache-C_kVhYUl.js} +5 -7
  260. package/dist/esm/{_Uint8Array-d6ebd526.js → _Uint8Array-DVXPnoWk.js} +6 -10
  261. package/dist/esm/{_baseIsEqual-077b6bb3.js → _baseIsEqual-DB13O4pD.js} +4 -4
  262. package/dist/esm/{_defineProperty-e6a185c3.js → _defineProperty-DSmG08hO.js} +2 -4
  263. package/dist/esm/{_getTag-d02a95fa.js → _getTag-DZlkp9mJ.js} +12 -32
  264. package/dist/esm/{get-3e42932b.js → get-Bo260bSC.js} +6 -14
  265. package/dist/esm/{index-d86e55c0.js → index-BIwHMk6j.js} +539 -300
  266. package/dist/esm/index.esm-BjlE4usG.js +823 -0
  267. package/dist/esm/{isSymbol-1c5f65cc.js → isSymbol-Ci8cASb6.js} +1 -1
  268. package/dist/esm/lime-crm-building-blocks.js +6 -5
  269. package/dist/esm/{lime-query-validation-01797a51.js → lime-query-validation-S9h8L6bg.js} +8 -8
  270. package/dist/esm/limebb-alert-dialog.entry.js +5 -6
  271. package/dist/esm/limebb-browser.entry.js +11 -12
  272. package/dist/esm/limebb-chat-icon-list_3.entry.js +15 -18
  273. package/dist/esm/limebb-chat-list.entry.js +11 -10
  274. package/dist/esm/limebb-component-config.entry.js +17 -14
  275. package/dist/esm/limebb-component-picker.entry.js +9 -10
  276. package/dist/esm/limebb-composer-toolbar.entry.js +9 -10
  277. package/dist/esm/limebb-currency-picker.entry.js +1908 -1789
  278. package/dist/esm/limebb-dashboard-widget.entry.js +4 -5
  279. package/dist/esm/limebb-data-cells.entry.js +5 -6
  280. package/dist/esm/limebb-date-picker.entry.js +7 -7
  281. package/dist/esm/limebb-date-range.entry.js +6 -7
  282. package/dist/esm/limebb-document-chips.entry.js +10 -9
  283. package/dist/esm/limebb-document-item.entry.js +6 -7
  284. package/dist/esm/limebb-document-picker.entry.js +6 -7
  285. package/dist/esm/limebb-empty-state.entry.js +3 -4
  286. package/dist/esm/limebb-feed-item-thumbnail-file-info.entry.js +4 -5
  287. package/dist/esm/limebb-feed-timeline-item.entry.js +8 -9
  288. package/dist/esm/limebb-feed.entry.js +430 -166
  289. package/dist/esm/limebb-icon-picker.entry.js +4 -4
  290. package/dist/esm/limebb-info-tile-currency-format.entry.js +2 -2
  291. package/dist/esm/limebb-info-tile-date-format.entry.js +4 -5
  292. package/dist/esm/limebb-info-tile-decimal-format.entry.js +2 -2
  293. package/dist/esm/limebb-info-tile-format.entry.js +5 -6
  294. package/dist/esm/limebb-info-tile-relative-date-format.entry.js +2 -2
  295. package/dist/esm/limebb-info-tile-unit-format.entry.js +2 -2
  296. package/dist/esm/limebb-info-tile.entry.js +27 -22
  297. package/dist/esm/limebb-kanban-group.entry.js +8 -9
  298. package/dist/esm/limebb-kanban-item.entry.js +8 -9
  299. package/dist/esm/limebb-kanban.entry.js +5 -6
  300. package/dist/esm/limebb-lime-query-builder.entry.js +9 -10
  301. package/dist/esm/limebb-lime-query-filter-builder_3.entry.js +27 -27
  302. package/dist/esm/limebb-lime-query-filter-comparison_2.entry.js +26 -28
  303. package/dist/esm/limebb-lime-query-filter-group_3.entry.js +25 -28
  304. package/dist/esm/limebb-lime-query-order-by-item.entry.js +6 -7
  305. package/dist/esm/limebb-lime-query-response-format-builder.entry.js +9 -10
  306. package/dist/esm/limebb-lime-query-response-format-editor_2.entry.js +8 -10
  307. package/dist/esm/limebb-limeobject-file-viewer.entry.js +9 -10
  308. package/dist/esm/limebb-live-docs-info.entry.js +5 -6
  309. package/dist/esm/limebb-loader.entry.js +12 -8
  310. package/dist/esm/limebb-locale-picker.entry.js +29 -47
  311. package/dist/esm/limebb-mention-group-counter.entry.js +5 -6
  312. package/dist/esm/limebb-mention.entry.js +6 -7
  313. package/dist/esm/limebb-navigation-button_2.entry.js +10 -12
  314. package/dist/esm/limebb-notification-item.entry.js +9 -10
  315. package/dist/esm/limebb-notification-list.entry.js +10 -9
  316. package/dist/esm/limebb-object-chip.entry.js +16 -13
  317. package/dist/esm/limebb-percentage-visualizer.entry.js +9 -8
  318. package/dist/esm/limebb-property-selector.entry.js +9 -10
  319. package/dist/esm/limebb-text-editor-picker.entry.js +9 -8
  320. package/dist/esm/limebb-text-editor.entry.js +53 -305
  321. package/dist/esm/limebb-trend-indicator.entry.js +8 -7
  322. package/dist/esm/{limetype-12fbba0f.js → limetype-B3nph1qc.js} +3 -3
  323. package/dist/esm/loader.js +4 -4
  324. package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
  325. package/dist/lime-crm-building-blocks/{p-eb4aa158.entry.js → p-0afc0db2.entry.js} +1 -1
  326. package/dist/lime-crm-building-blocks/p-12aadae6.entry.js +1 -0
  327. package/dist/lime-crm-building-blocks/p-1428aa13.entry.js +1 -0
  328. package/dist/lime-crm-building-blocks/p-152edb10.entry.js +1 -0
  329. package/dist/lime-crm-building-blocks/p-1a61674f.entry.js +1 -0
  330. package/dist/lime-crm-building-blocks/p-1f02a411.entry.js +1 -0
  331. package/dist/lime-crm-building-blocks/p-21ec697f.entry.js +1 -0
  332. package/dist/lime-crm-building-blocks/p-3252e153.entry.js +1 -0
  333. package/dist/lime-crm-building-blocks/p-3263f8d5.entry.js +1 -0
  334. package/dist/lime-crm-building-blocks/p-32f8477f.entry.js +1 -0
  335. package/dist/lime-crm-building-blocks/p-35a51259.entry.js +1 -0
  336. package/dist/lime-crm-building-blocks/p-38201f65.entry.js +1 -0
  337. package/dist/lime-crm-building-blocks/p-3ef87b11.entry.js +1 -0
  338. package/dist/lime-crm-building-blocks/p-43e22f6d.entry.js +1 -0
  339. package/dist/lime-crm-building-blocks/{p-e79f16ca.entry.js → p-4446f170.entry.js} +1 -1
  340. package/dist/lime-crm-building-blocks/p-4625a9c5.entry.js +1 -0
  341. package/dist/lime-crm-building-blocks/{p-77e7d7da.entry.js → p-49afe71b.entry.js} +1 -1
  342. package/dist/lime-crm-building-blocks/p-4ddd75bc.entry.js +1 -0
  343. package/dist/lime-crm-building-blocks/p-528f3635.entry.js +1 -0
  344. package/dist/lime-crm-building-blocks/p-52fb2a66.entry.js +1 -0
  345. package/dist/lime-crm-building-blocks/p-60e22f51.entry.js +1 -0
  346. package/dist/lime-crm-building-blocks/p-62437a1d.entry.js +1 -0
  347. package/dist/lime-crm-building-blocks/p-626421bf.entry.js +1 -0
  348. package/dist/lime-crm-building-blocks/p-685dd8a1.entry.js +1 -0
  349. package/dist/lime-crm-building-blocks/{p-5277ceca.entry.js → p-6cb2d9dd.entry.js} +1 -1
  350. package/dist/lime-crm-building-blocks/p-6fdee70a.entry.js +1 -0
  351. package/dist/lime-crm-building-blocks/p-71191041.entry.js +1 -0
  352. package/dist/lime-crm-building-blocks/{p-f7122d8e.entry.js → p-740ae712.entry.js} +1 -1
  353. package/dist/lime-crm-building-blocks/p-8477cb5d.entry.js +1 -0
  354. package/dist/lime-crm-building-blocks/{p-50aad872.entry.js → p-8e2cc2e8.entry.js} +1 -1
  355. package/dist/lime-crm-building-blocks/p-9ae55a96.entry.js +1 -0
  356. package/dist/lime-crm-building-blocks/p-B8RiYkLS.js +1 -0
  357. package/dist/lime-crm-building-blocks/p-BIwHMk6j.js +2 -0
  358. package/dist/lime-crm-building-blocks/p-BJ8HvfgI.js +1 -0
  359. package/dist/lime-crm-building-blocks/p-ByjZfyP_.js +1 -0
  360. package/dist/lime-crm-building-blocks/{p-0a266c26.js → p-CMfAKLlA.js} +1 -1
  361. package/dist/lime-crm-building-blocks/p-CQ-z_HTt.js +1 -0
  362. package/dist/lime-crm-building-blocks/p-CcGMZOP-.js +1 -0
  363. package/dist/lime-crm-building-blocks/p-Dm_AIMQj.js +1 -0
  364. package/dist/lime-crm-building-blocks/p-V3xfp9dg.js +1 -0
  365. package/dist/lime-crm-building-blocks/p-aaeecca6.entry.js +1 -0
  366. package/dist/lime-crm-building-blocks/p-ac59093c.entry.js +1 -0
  367. package/dist/lime-crm-building-blocks/p-acbc40f5.entry.js +1 -0
  368. package/dist/lime-crm-building-blocks/p-b2383e7f.entry.js +1 -0
  369. package/dist/lime-crm-building-blocks/p-b36ad4e8.entry.js +1 -0
  370. package/dist/lime-crm-building-blocks/{p-6fb504cb.entry.js → p-b3ee6683.entry.js} +1 -1
  371. package/dist/lime-crm-building-blocks/p-ba42e434.entry.js +1 -0
  372. package/dist/lime-crm-building-blocks/p-bac3d599.entry.js +1 -0
  373. package/dist/lime-crm-building-blocks/p-be8dc8ae.entry.js +1 -0
  374. package/dist/lime-crm-building-blocks/{p-0707d5b0.entry.js → p-c3b13800.entry.js} +1 -1
  375. package/dist/lime-crm-building-blocks/{p-b3ad9f5e.entry.js → p-c6bbcbee.entry.js} +1 -1
  376. package/dist/lime-crm-building-blocks/p-cff9bccd.entry.js +1 -0
  377. package/dist/lime-crm-building-blocks/p-d2a01f51.entry.js +1 -0
  378. package/dist/lime-crm-building-blocks/p-dabb227b.entry.js +1 -0
  379. package/dist/lime-crm-building-blocks/p-e2e9adff.entry.js +1 -0
  380. package/dist/lime-crm-building-blocks/p-ebe6040f.entry.js +1 -0
  381. package/dist/lime-crm-building-blocks/p-eec0a0c8.entry.js +1 -0
  382. package/dist/lime-crm-building-blocks/p-f23ea0e7.entry.js +1 -0
  383. package/dist/lime-crm-building-blocks/{p-0190354e.entry.js → p-fa41a9e6.entry.js} +1 -1
  384. package/dist/lime-crm-building-blocks/p-fcedbc77.entry.js +1 -0
  385. package/dist/lime-crm-building-blocks/p-fdf269f7.entry.js +1 -0
  386. package/dist/lime-crm-building-blocks/p-mljVfXwO.js +1 -0
  387. package/dist/lime-crm-building-blocks/p-wbuFLk-j.js +1 -0
  388. package/dist/lime-crm-building-blocks/p-yc--7_7T.js +1 -0
  389. package/dist/types/components.d.ts +608 -114
  390. package/dist/types/stencil-public-runtime.d.ts +192 -12
  391. package/package.json +10 -10
  392. package/dist/cjs/index.esm-e01e9bd4.js +0 -977
  393. package/dist/esm/index.esm-11a8b9e2.js +0 -963
  394. package/dist/lime-crm-building-blocks/p-121877f3.entry.js +0 -1
  395. package/dist/lime-crm-building-blocks/p-123190c3.js +0 -1
  396. package/dist/lime-crm-building-blocks/p-1317cdfa.entry.js +0 -1
  397. package/dist/lime-crm-building-blocks/p-199799ff.js +0 -1
  398. package/dist/lime-crm-building-blocks/p-1a89328d.entry.js +0 -1
  399. package/dist/lime-crm-building-blocks/p-1b361f60.entry.js +0 -1
  400. package/dist/lime-crm-building-blocks/p-2612f2f6.entry.js +0 -1
  401. package/dist/lime-crm-building-blocks/p-2babfa69.entry.js +0 -1
  402. package/dist/lime-crm-building-blocks/p-2d5e5ab5.entry.js +0 -1
  403. package/dist/lime-crm-building-blocks/p-331fced5.entry.js +0 -1
  404. package/dist/lime-crm-building-blocks/p-35897ec3.js +0 -1
  405. package/dist/lime-crm-building-blocks/p-3a16d7cf.entry.js +0 -1
  406. package/dist/lime-crm-building-blocks/p-3da67f32.entry.js +0 -1
  407. package/dist/lime-crm-building-blocks/p-3dd32e10.entry.js +0 -1
  408. package/dist/lime-crm-building-blocks/p-4894ca5d.entry.js +0 -1
  409. package/dist/lime-crm-building-blocks/p-4b494de7.entry.js +0 -1
  410. package/dist/lime-crm-building-blocks/p-4ca1caf4.entry.js +0 -1
  411. package/dist/lime-crm-building-blocks/p-4eb7a47c.entry.js +0 -1
  412. package/dist/lime-crm-building-blocks/p-50abea43.entry.js +0 -1
  413. package/dist/lime-crm-building-blocks/p-520df198.entry.js +0 -1
  414. package/dist/lime-crm-building-blocks/p-52cf8641.js +0 -2
  415. package/dist/lime-crm-building-blocks/p-5322fd19.js +0 -1
  416. package/dist/lime-crm-building-blocks/p-548e0f2a.entry.js +0 -1
  417. package/dist/lime-crm-building-blocks/p-579be797.entry.js +0 -1
  418. package/dist/lime-crm-building-blocks/p-6a87a407.entry.js +0 -1
  419. package/dist/lime-crm-building-blocks/p-6ad6a88d.entry.js +0 -1
  420. package/dist/lime-crm-building-blocks/p-7365ec1c.entry.js +0 -1
  421. package/dist/lime-crm-building-blocks/p-7e6fb4af.js +0 -1
  422. package/dist/lime-crm-building-blocks/p-81583fc8.entry.js +0 -1
  423. package/dist/lime-crm-building-blocks/p-85709273.entry.js +0 -1
  424. package/dist/lime-crm-building-blocks/p-87d3f42c.entry.js +0 -1
  425. package/dist/lime-crm-building-blocks/p-8dca4e46.entry.js +0 -1
  426. package/dist/lime-crm-building-blocks/p-95b6eaf5.entry.js +0 -1
  427. package/dist/lime-crm-building-blocks/p-973146f7.entry.js +0 -1
  428. package/dist/lime-crm-building-blocks/p-9c25aa2b.entry.js +0 -1
  429. package/dist/lime-crm-building-blocks/p-a959dd49.entry.js +0 -1
  430. package/dist/lime-crm-building-blocks/p-b2763851.entry.js +0 -1
  431. package/dist/lime-crm-building-blocks/p-b31772c8.js +0 -1
  432. package/dist/lime-crm-building-blocks/p-b675d5f0.entry.js +0 -1
  433. package/dist/lime-crm-building-blocks/p-b7959ddb.entry.js +0 -1
  434. package/dist/lime-crm-building-blocks/p-d298b34e.js +0 -1
  435. package/dist/lime-crm-building-blocks/p-d47b6c3c.js +0 -1
  436. package/dist/lime-crm-building-blocks/p-d9045aaa.entry.js +0 -1
  437. package/dist/lime-crm-building-blocks/p-d994067b.entry.js +0 -1
  438. package/dist/lime-crm-building-blocks/p-da42650a.entry.js +0 -1
  439. package/dist/lime-crm-building-blocks/p-dae67f66.entry.js +0 -1
  440. package/dist/lime-crm-building-blocks/p-dce9c951.entry.js +0 -1
  441. package/dist/lime-crm-building-blocks/p-dd5af257.entry.js +0 -1
  442. package/dist/lime-crm-building-blocks/p-ea4daa32.entry.js +0 -1
  443. package/dist/lime-crm-building-blocks/p-eb56d4eb.entry.js +0 -1
  444. package/dist/lime-crm-building-blocks/p-f788a48d.js +0 -1
  445. package/dist/lime-crm-building-blocks/p-fb292b3f.entry.js +0 -1
  446. package/dist/lime-crm-building-blocks/p-fe2b91d9.js +0 -1
  447. package/loader/package.json +0 -11
  448. /package/dist/cjs/{app-globals-3a1e7e63.js → app-globals-V2Kpy_OQ.js} +0 -0
  449. /package/dist/cjs/{dom-2ea30350.js → dom--t_vVnyU.js} +0 -0
  450. /package/dist/cjs/{extension-mapping-63bdafd3.js → extension-mapping-CvK-Mz3f.js} +0 -0
  451. /package/dist/cjs/{file-extension-7c2eae39.js → file-extension-DolkaRwB.js} +0 -0
  452. /package/dist/cjs/{highlight-item.handler-584ab58a.js → highlight-item.handler-BVqvzXiD.js} +0 -0
  453. /package/dist/cjs/{keycodes-88522d7f.js → keycodes-BCQoLEdB.js} +0 -0
  454. /package/dist/cjs/{negate-e0a2bf77.js → negate-Bg3SqQh6.js} +0 -0
  455. /package/dist/cjs/{non-null-3bf14aa1.js → non-null-BMnREsqJ.js} +0 -0
  456. /package/dist/cjs/{percentage-class-012e94d9.js → percentage-class-DVoYzFLR.js} +0 -0
  457. /package/dist/cjs/{property-resolution-5f798b03.js → property-resolution-Bz1zPcfq.js} +0 -0
  458. /package/dist/cjs/{random-string-aac0a74b.js → random-string-BdZGIsGg.js} +0 -0
  459. /package/dist/esm/{app-globals-0f993ce5.js → app-globals-DQuL1Twl.js} +0 -0
  460. /package/dist/esm/{dom-9cc051d7.js → dom-B95D7tDb.js} +0 -0
  461. /package/dist/esm/{extension-mapping-fcade195.js → extension-mapping-Bcm94u_z.js} +0 -0
  462. /package/dist/esm/{file-extension-568475d1.js → file-extension-DtnPTzDv.js} +0 -0
  463. /package/dist/esm/{highlight-item.handler-dfbf11c0.js → highlight-item.handler-BWMpG2bS.js} +0 -0
  464. /package/dist/esm/{keycodes-58a1fcc9.js → keycodes-CwMJvF_Z.js} +0 -0
  465. /package/dist/esm/{negate-55744008.js → negate-ooVD-6_a.js} +0 -0
  466. /package/dist/esm/{non-null-5a66a269.js → non-null-CkTg5UPD.js} +0 -0
  467. /package/dist/esm/{percentage-class-2766f8ef.js → percentage-class-BaQl_Elp.js} +0 -0
  468. /package/dist/esm/{property-resolution-e4e8dcf7.js → property-resolution-CQUZjrU4.js} +0 -0
  469. /package/dist/esm/{random-string-f6ef6fbf.js → random-string-C2JP2nLw.js} +0 -0
  470. /package/dist/lime-crm-building-blocks/{p-4a85590d.js → p-B95D7tDb.js} +0 -0
  471. /package/dist/lime-crm-building-blocks/{p-66352a1e.js → p-BWMpG2bS.js} +0 -0
  472. /package/dist/lime-crm-building-blocks/{p-a99197b1.js → p-BaQl_Elp.js} +0 -0
  473. /package/dist/lime-crm-building-blocks/{p-ab2a95a6.js → p-Bcm94u_z.js} +0 -0
  474. /package/dist/lime-crm-building-blocks/{p-fbda77a7.js → p-C2JP2nLw.js} +0 -0
  475. /package/dist/lime-crm-building-blocks/{p-b02c99d5.js → p-CQUZjrU4.js} +0 -0
  476. /package/dist/lime-crm-building-blocks/{p-1484e300.js → p-CkTg5UPD.js} +0 -0
  477. /package/dist/lime-crm-building-blocks/{p-463d3174.js → p-CwMJvF_Z.js} +0 -0
  478. /package/dist/lime-crm-building-blocks/{p-e1255160.js → p-DQuL1Twl.js} +0 -0
  479. /package/dist/lime-crm-building-blocks/{p-b42e9740.js → p-DtnPTzDv.js} +0 -0
  480. /package/dist/lime-crm-building-blocks/{p-7c9484b1.js → p-ooVD-6_a.js} +0 -0
@@ -1,302 +1 @@
1
- import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
- import { c } from './index.esm.js';
3
- import { d as defineCustomElement$4 } from './chat-icon-list.js';
4
- import { d as defineCustomElement$3 } from './chat-item.js';
5
- import { d as defineCustomElement$2 } from './typing-indicator.js';
6
-
7
- function isIconList(item) {
8
- return 'type' in item && item.type === 'iconList';
9
- }
10
- function getProcessedItemTimestamp(item) {
11
- if (item.type === 'chat' || item.type === 'iconList') {
12
- return item.item.timestamp;
13
- }
14
- return undefined;
15
- }
16
- /**
17
- * Processes a list of chat list inputs by adding date headers and a "new items" indicator.
18
- *
19
- * @param items - The list of items to process. Pre-sorted by `timestamp` in descending order.
20
- * @param dateTimeFormatter - A service used to format dates for the date headers.
21
- * @param lastVisitedTimestamp - The timestamp of the user's last visit. Used to position the
22
- * "new items" indicator.
23
- *
24
- * @returns An array of processed items, including chat items, icon lists, date headers,
25
- * and a "new items" indicator if applicable.
26
- */
27
- function processChatItems(items, dateTimeFormatter, lastVisitedTimestamp) {
28
- const initialContext = {
29
- items: items,
30
- processedItems: [],
31
- lastVisitedTimestamp: lastVisitedTimestamp,
32
- dateTimeFormatter: dateTimeFormatter,
33
- newItemIndicatorInserted: false,
34
- lastProcessedDate: null,
35
- hasUnseenNotifications: items.some((item) => lastVisitedTimestamp &&
36
- new Date(item.timestamp) > lastVisitedTimestamp),
37
- };
38
- // Add processors here, in the order they should be executed
39
- const processors = [
40
- insertNotifications,
41
- insertNewItemIndicator,
42
- insertDateGroups,
43
- ];
44
- const finalContext = createPipeline(initialContext, processors);
45
- return finalContext.processedItems;
46
- }
47
- function createPipeline(initialContext, processors) {
48
- // eslint-disable-next-line unicorn/no-array-reduce
49
- return processors.reduce((context, processor) => processor(context), initialContext);
50
- }
51
- /**
52
- *
53
- * @param context
54
- */
55
- function insertNotifications(context) {
56
- for (const item of context.items) {
57
- if (isIconList(item)) {
58
- context.processedItems.push({ type: 'iconList', item: item });
59
- }
60
- else {
61
- context.processedItems.push({ type: 'chat', item: item });
62
- }
63
- }
64
- return context;
65
- }
66
- /**
67
- *
68
- * @param context
69
- */
70
- function insertNewItemIndicator(context) {
71
- const processedWithIndicator = [];
72
- let newItemIndicatorInserted = context.newItemIndicatorInserted;
73
- for (const item of context.processedItems) {
74
- const timestamp = getProcessedItemTimestamp(item);
75
- if (timestamp !== undefined &&
76
- context.lastVisitedTimestamp &&
77
- !newItemIndicatorInserted &&
78
- new Date(timestamp) <= context.lastVisitedTimestamp &&
79
- context.hasUnseenNotifications) {
80
- processedWithIndicator.push({ type: 'newItemIndicator' });
81
- newItemIndicatorInserted = true;
82
- }
83
- processedWithIndicator.push(item);
84
- }
85
- context.processedItems = processedWithIndicator;
86
- context.newItemIndicatorInserted = newItemIndicatorInserted;
87
- return context;
88
- }
89
- /**
90
- *
91
- * @param context
92
- */
93
- // eslint-disable-next-line sonarjs/cognitive-complexity
94
- function insertDateGroups(context) {
95
- const newProcessedItems = [];
96
- let currentGroup = null;
97
- let lastProcessedDate = null;
98
- for (const item of context.processedItems) {
99
- if (item.type === 'chat' || item.type === 'iconList') {
100
- const currentTimestamp = new Date(item.item.timestamp);
101
- const currentDate = context.dateTimeFormatter.format(currentTimestamp, 'date');
102
- if (currentDate !== lastProcessedDate) {
103
- if (currentGroup) {
104
- newProcessedItems.push(currentGroup);
105
- }
106
- currentGroup = {
107
- type: 'group',
108
- groupType: 'dateGroup',
109
- heading: currentDate,
110
- items: [],
111
- };
112
- lastProcessedDate = currentDate;
113
- }
114
- if (currentGroup) {
115
- currentGroup.items.push(item);
116
- }
117
- }
118
- else if (item.type === 'newItemIndicator') {
119
- if (currentGroup) {
120
- currentGroup.items.push(item);
121
- }
122
- else {
123
- newProcessedItems.push(item);
124
- }
125
- }
126
- }
127
- if (currentGroup) {
128
- newProcessedItems.push(currentGroup);
129
- }
130
- return Object.assign(Object.assign({}, context), { processedItems: newProcessedItems });
131
- }
132
-
133
- const chatListCss = "@charset \"UTF-8\";:host(limebb-chat-list){--limel-top-edge-fade-height:0.75rem;isolation:isolate;--limel-overflow-mask-vertical:linear-gradient(\n to bottom,\n transparent 0%,\n black calc(0% + var(--limel-top-edge-fade-height, 1rem)),\n black calc(100% - var(--limel-bottom-edge-fade-height, 1rem)),\n transparent 100%\n );-webkit-mask-image:var(--limel-overflow-mask-vertical);mask-image:var(--limel-overflow-mask-vertical);padding-top:var(--limel-top-edge-fade-height, 1rem);padding-bottom:var(--limel-bottom-edge-fade-height, 1rem);box-sizing:border-box;display:flex;gap:0.5rem;height:100%;width:100%;min-width:0;min-height:0;padding:var(--limel-top-edge-fade-height) 0.5rem;overflow:hidden auto}:host(limebb-chat-list.is-empty){padding:0}:host(limebb-chat-list[order=oldest-on-top]){flex-direction:column-reverse}:host(limebb-chat-list[order=newest-on-top]){flex-direction:column}*{box-sizing:border-box}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-group{isolation:isolate;display:flex;flex-direction:inherit;gap:0.5rem}.date-heading{position:sticky;z-index:1;top:0.25rem;display:flex;border-radius:9rem;padding:0.25rem 0.5rem;margin:0 auto;width:fit-content;font-size:0.75rem;line-height:1;color:rgb(var(--contrast-900));backdrop-filter:blur(0.5rem);-webkit-backdrop-filter:blur(0.5rem);transition:color 0.2s ease, border-color 0.4s ease}.date-heading:hover{color:rgb(var(--contrast-1000));border-color:rgb(var(--contrast-500))}.date-heading:hover:before{opacity:1}.date-heading:before{transition:opacity 0.2s ease;content:\"\";position:absolute;z-index:-1;inset:0;opacity:0.6;border-radius:inherit;background-color:rgb(var(--contrast-100))}.new-items-indicator{position:relative;isolation:isolate;display:flex;align-items:center;justify-content:flex-end;margin:0.25rem 0}.new-items-indicator hr{border:none;position:absolute;width:100%;height:1px;background-color:rgb(var(--color-red-lighter))}.new-items-indicator h3{z-index:1;padding:0 0.5rem;border-radius:1rem;margin:0 1rem;font-size:small;line-height:0.75rem;text-transform:lowercase;color:rgb(var(--color-red-default));background-color:rgb(var(--contrast-100))}.typing-indicator-height-animation{--limebb-chat-typing-opacity-transition-speed:0.1s;--limebb-chat-typing-opacity-transition-delay:0s;--limebb-chat-typing-grid-template-rows-transition-speed:0.3s;position:sticky;top:0;z-index:1;transition:grid-template-rows var(--limebb-chat-typing-grid-template-rows-transition-speed) ease;display:grid;grid-template-rows:0}.typing-indicator-height-animation div{transition:opacity var(--limebb-chat-typing-opacity-transition-speed) ease var(--limebb-chat-typing-opacity-transition-delay);overflow:hidden;opacity:0}:host(limebb-chat-list[is-typing-indicator-visible]) .typing-indicator-height-animation{--limebb-chat-typing-opacity-transition-speed:0.4s;--limebb-chat-typing-opacity-transition-delay:0.3s;--limebb-chat-typing-grid-template-rows-transition-speed:0.46s;grid-template-rows:1.5rem}:host(limebb-chat-list[is-typing-indicator-visible]) .typing-indicator-height-animation div{opacity:1}.date-group limebb-chat-item{--limebb-promoted-action-bar-grid-template-rows:0fr}:host(limebb-chat-list[order=oldest-on-top]) .date-group:first-of-type limebb-chat-item:first-of-type{--limebb-promoted-action-bar-grid-template-rows:1fr}:host(limebb-chat-list[order=newest-on-top]) .date-group:first-of-type limebb-chat-item:first-of-type{--limebb-promoted-action-bar-grid-template-rows:1fr}";
134
- const LimebbChatListStyle0 = chatListCss;
135
-
136
- const ChatList = /*@__PURE__*/ proxyCustomElement(class ChatList extends HTMLElement {
137
- constructor() {
138
- super();
139
- this.__registerHost();
140
- this.__attachShadow();
141
- /**
142
- * List of items to display in the feed.
143
- * These items must be sorted by their `timestamp` in descending order.
144
- *
145
- * See the [ChatListItem](#/type/ChatListItem/) type for the kinds of
146
- * items that can appear in the list.
147
- */
148
- this.items = [];
149
- /**
150
- * - `newest-on-top` displays new messages at the top of the list;
151
- * used if the chat input is located on top of the chat interface.
152
- * - `oldest-on-top` displays new messages at the bottom of the list (default);
153
- * used if the chat input is located at the bottom of the chat interface.
154
- *
155
- * :::important
156
- * Using this prop will _not_ automatically sort the chat items for you!
157
- * You still need to pass the items in the correct order (descending order by timestamp).
158
- * This prop will only affect the direction of the elements in the user interface,
159
- * such as the location of the typing indicator or the scrollbars.
160
- * :::
161
- */
162
- this.order = 'oldest-on-top';
163
- this.processedItems = [];
164
- }
165
- handleItemsChange() {
166
- let lastVisited = null;
167
- if (this.lastVisitedTimestamp) {
168
- lastVisited = parseToUTCDate(this.lastVisitedTimestamp);
169
- }
170
- this.processedItems = processChatItems(this.items, this.dateTimeFormatter, lastVisited);
171
- }
172
- componentWillLoad() {
173
- this.handleItemsChange();
174
- }
175
- render() {
176
- return (h(Host, { key: '5eb5b8dde1fbec07b3c125752f561180ecbf2d71', class: {
177
- 'is-empty': this.items.length === 0 &&
178
- !this.isTypingIndicatorVisible,
179
- }, "aria-busy": this.isBusy(), role: "log" }, this.renderSpinner(), h("div", { key: '706e0fe4eeb8f8afa40849b0422db06823614697', class: "typing-indicator-height-animation" }, h("div", { key: '6232ce470ae6ef21a87565ceb50f7cb9e3e251e5' }, this.renderTypingIndicator())), this.renderChatItems()));
180
- }
181
- renderSpinner() {
182
- if (!this.loading) {
183
- return;
184
- }
185
- return h("limel-spinner", null);
186
- }
187
- renderTypingIndicator() {
188
- if (!this.isTypingIndicatorVisible) {
189
- return;
190
- }
191
- return h("limebb-typing-indicator", null);
192
- }
193
- renderChatItems() {
194
- return this.processedItems.map((item) => {
195
- switch (item.type) {
196
- case 'group': {
197
- return this.renderGroup(item);
198
- }
199
- case 'newItemIndicator': {
200
- return this.renderIndicator();
201
- }
202
- default: {
203
- return null;
204
- }
205
- }
206
- });
207
- }
208
- renderGroup(group) {
209
- const chatItems = group.items.map((item) => {
210
- if (item.type === 'chat') {
211
- return this.renderChatItem(item.item);
212
- }
213
- else if (item.type === 'iconList') {
214
- return this.renderIconList(item.item);
215
- }
216
- else if (item.type === 'newItemIndicator') {
217
- return this.renderIndicator();
218
- }
219
- });
220
- const groupChatItems = group.items.filter((i) => i.type === 'chat');
221
- const lastChatItem = groupChatItems.at(-1);
222
- const stableId = (lastChatItem === null || lastChatItem === void 0 ? void 0 : lastChatItem.type) === 'chat' ? lastChatItem.item.id : '';
223
- const sectionKey = 'date-group-' + group.heading + '-' + stableId;
224
- const headingId = `heading-${sectionKey}`.replaceAll(/[^a-zA-Z0-9_-]/g, '_');
225
- const dateHeading = (h("a", { id: headingId, class: "date-heading", role: "heading", "aria-level": 2 }, group.heading));
226
- if (this.order === 'oldest-on-top') {
227
- return (h("section", { class: "date-group", key: sectionKey, "aria-labelledby": headingId }, chatItems, dateHeading));
228
- }
229
- return (h("section", { class: "date-group", key: sectionKey, "aria-labelledby": headingId }, dateHeading, chatItems));
230
- }
231
- renderChatItem(item) {
232
- return (h("limebb-chat-item", { platform: this.platform, context: this.context, item: item, helperText: item.helperText, hasError: item.hasError, key: item.id }));
233
- }
234
- renderIconList(item) {
235
- return h("limebb-chat-icon-list", { item: item, key: item.id });
236
- }
237
- renderIndicator() {
238
- return (h("div", { class: "new-items-indicator", role: "separator" }, h("hr", null), h("h3", null, this.translator.get('webclient.new'))));
239
- }
240
- isBusy() {
241
- return this.loading || this.isTypingIndicatorVisible ? 'true' : 'false';
242
- }
243
- get dateTimeFormatter() {
244
- return this.platform.get(c.DateTimeFormatter);
245
- }
246
- get translator() {
247
- return this.platform.get(c.Translate);
248
- }
249
- static get watchers() { return {
250
- "items": ["handleItemsChange"]
251
- }; }
252
- static get style() { return LimebbChatListStyle0; }
253
- }, [1, "limebb-chat-list", {
254
- "platform": [16],
255
- "context": [16],
256
- "items": [16],
257
- "loading": [516],
258
- "isTypingIndicatorVisible": [516, "is-typing-indicator-visible"],
259
- "lastVisitedTimestamp": [513, "last-visited-timestamp"],
260
- "order": [513]
261
- }, undefined, {
262
- "items": ["handleItemsChange"]
263
- }]);
264
- function parseToUTCDate(date) {
265
- if (typeof date === 'string') {
266
- return new Date(Date.parse(date));
267
- }
268
- return new Date(date); // This will automatically be UTC
269
- }
270
- function defineCustomElement$1() {
271
- if (typeof customElements === "undefined") {
272
- return;
273
- }
274
- const components = ["limebb-chat-list", "limebb-chat-icon-list", "limebb-chat-item", "limebb-typing-indicator"];
275
- components.forEach(tagName => { switch (tagName) {
276
- case "limebb-chat-list":
277
- if (!customElements.get(tagName)) {
278
- customElements.define(tagName, ChatList);
279
- }
280
- break;
281
- case "limebb-chat-icon-list":
282
- if (!customElements.get(tagName)) {
283
- defineCustomElement$4();
284
- }
285
- break;
286
- case "limebb-chat-item":
287
- if (!customElements.get(tagName)) {
288
- defineCustomElement$3();
289
- }
290
- break;
291
- case "limebb-typing-indicator":
292
- if (!customElements.get(tagName)) {
293
- defineCustomElement$2();
294
- }
295
- break;
296
- } });
297
- }
298
-
299
- const LimebbChatList = ChatList;
300
- const defineCustomElement = defineCustomElement$1;
301
-
302
- export { LimebbChatList, defineCustomElement };
1
+ import{proxyCustomElement as t,HTMLElement as e,h as i,Host as r,transformTag as a}from"@stencil/core/internal/client";import{n as o}from"./index.esm.js";import{d as n}from"./chat-icon-list.js";import{d as s}from"./chat-item.js";import{d as l}from"./typing-indicator.js";function c(t){return"type"in t&&"iconList"===t.type}function d(t){if("chat"===t.type||"iconList"===t.type)return t.item.timestamp}function m(t){for(const e of t.items)c(e)?t.processedItems.push({type:"iconList",item:e}):t.processedItems.push({type:"chat",item:e});return t}function h(t){const e=[];let i=t.newItemIndicatorInserted;for(const r of t.processedItems){const a=d(r);void 0!==a&&t.lastVisitedTimestamp&&!i&&new Date(a)<=t.lastVisitedTimestamp&&t.hasUnseenNotifications&&(e.push({type:"newItemIndicator"}),i=!0),e.push(r)}return t.processedItems=e,t.newItemIndicatorInserted=i,t}function p(t){const e=[];let i=null,r=null;for(const a of t.processedItems)if("chat"===a.type||"iconList"===a.type){const o=t.dateTimeFormatter.format(new Date(a.item.timestamp),"date");o!==r&&(i&&e.push(i),i={type:"group",groupType:"dateGroup",heading:o,items:[]},r=o),i&&i.items.push(a)}else"newItemIndicator"===a.type&&(i?i.items.push(a):e.push(a));return i&&e.push(i),Object.assign(Object.assign({},t),{processedItems:e})}const b=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.items=[],this.order="oldest-on-top",this.processedItems=[]}handleItemsChange(){let t=null;this.lastVisitedTimestamp&&(t=function(t){return new Date("string"==typeof t?Date.parse(t):t)}(this.lastVisitedTimestamp)),this.processedItems=function(t,e,i){return function(t){return[m,h,p].reduce(((t,e)=>e(t)),t)}({items:t,processedItems:[],lastVisitedTimestamp:i,dateTimeFormatter:e,newItemIndicatorInserted:!1,lastProcessedDate:null,hasUnseenNotifications:t.some((t=>i&&new Date(t.timestamp)>i))}).processedItems}(this.items,this.dateTimeFormatter,t)}componentWillLoad(){this.handleItemsChange()}render(){return i(r,{key:"83ddfe2912d25cf344f63b56f4fe4a65c20b575e",class:{"is-empty":0===this.items.length&&!this.isTypingIndicatorVisible},"aria-busy":this.isBusy(),role:"log"},this.renderSpinner(),i("div",{key:"a4eec0bad09789e93c695680cf6fc0e0eab24465",class:"typing-indicator-height-animation"},i("div",{key:"0895e2f0afce0465513a8c89191128732304b008"},this.renderTypingIndicator())),this.renderChatItems())}renderSpinner(){if(this.loading)return i("limel-spinner",null)}renderTypingIndicator(){if(this.isTypingIndicatorVisible)return i("limebb-typing-indicator",null)}renderChatItems(){return this.processedItems.map((t=>{switch(t.type){case"group":return this.renderGroup(t);case"newItemIndicator":return this.renderIndicator();default:return null}}))}renderGroup(t){const e=t.items.map((t=>"chat"===t.type?this.renderChatItem(t.item):"iconList"===t.type?this.renderIconList(t.item):"newItemIndicator"===t.type?this.renderIndicator():void 0)),r=t.items.filter((t=>"chat"===t.type)).at(-1),a="date-group-"+t.heading+"-"+("chat"===(null==r?void 0:r.type)?r.item.id:""),o=("heading-"+a).replaceAll(/[^a-zA-Z0-9_-]/g,"_"),n=i("a",{id:o,class:"date-heading",role:"heading","aria-level":2},t.heading);return"oldest-on-top"===this.order?i("section",{class:"date-group",key:a,"aria-labelledby":o},e,n):i("section",{class:"date-group",key:a,"aria-labelledby":o},n,e)}renderChatItem(t){return i("limebb-chat-item",{platform:this.platform,context:this.context,item:t,helperText:t.helperText,hasError:t.hasError,key:t.id})}renderIconList(t){return i("limebb-chat-icon-list",{item:t,key:t.id})}renderIndicator(){return i("div",{class:"new-items-indicator",role:"separator"},i("hr",null),i("h3",null,this.translator.get("webclient.new")))}isBusy(){return this.loading||this.isTypingIndicatorVisible?"true":"false"}get dateTimeFormatter(){return this.platform.get(o.DateTimeFormatter)}get translator(){return this.platform.get(o.Translate)}static get watchers(){return{items:[{handleItemsChange:0}]}}static get style(){return'@charset "UTF-8";:host(limebb-chat-list){--limel-top-edge-fade-height:0.75rem;isolation:isolate;--limel-overflow-mask-vertical:linear-gradient( to bottom, transparent 0%, black calc(0% + var(--limel-top-edge-fade-height, 1rem)), black calc(100% - var(--limel-bottom-edge-fade-height, 1rem)), transparent 100% );-webkit-mask-image:var(--limel-overflow-mask-vertical);mask-image:var(--limel-overflow-mask-vertical);padding-top:var(--limel-top-edge-fade-height, 1rem);padding-bottom:var(--limel-bottom-edge-fade-height, 1rem);box-sizing:border-box;display:flex;gap:0.5rem;height:100%;width:100%;min-width:0;min-height:0;padding:var(--limel-top-edge-fade-height) 0.5rem;overflow:hidden auto}:host(limebb-chat-list.is-empty){padding:0}:host(limebb-chat-list[order=oldest-on-top]){flex-direction:column-reverse}:host(limebb-chat-list[order=newest-on-top]){flex-direction:column}*{box-sizing:border-box}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-group{isolation:isolate;display:flex;flex-direction:inherit;gap:0.5rem}.date-heading{position:sticky;z-index:1;top:0.25rem;display:flex;border-radius:9rem;padding:0.25rem 0.5rem;margin:0 auto;width:fit-content;font-size:0.75rem;line-height:1;color:rgb(var(--contrast-900));backdrop-filter:blur(0.5rem);-webkit-backdrop-filter:blur(0.5rem);transition:color 0.2s ease, border-color 0.4s ease}.date-heading:hover{color:rgb(var(--contrast-1000));border-color:rgb(var(--contrast-500))}.date-heading:hover:before{opacity:1}.date-heading:before{transition:opacity 0.2s ease;content:"";position:absolute;z-index:-1;inset:0;opacity:0.6;border-radius:inherit;background-color:rgb(var(--contrast-100))}.new-items-indicator{position:relative;isolation:isolate;display:flex;align-items:center;justify-content:flex-end;margin:0.25rem 0}.new-items-indicator hr{border:none;position:absolute;width:100%;height:1px;background-color:rgb(var(--color-red-lighter))}.new-items-indicator h3{z-index:1;padding:0 0.5rem;border-radius:1rem;margin:0 1rem;font-size:small;line-height:0.75rem;text-transform:lowercase;color:rgb(var(--color-red-default));background-color:rgb(var(--contrast-100))}.typing-indicator-height-animation{--limebb-chat-typing-opacity-transition-speed:0.1s;--limebb-chat-typing-opacity-transition-delay:0s;--limebb-chat-typing-grid-template-rows-transition-speed:0.3s;position:sticky;top:0;z-index:1;transition:grid-template-rows var(--limebb-chat-typing-grid-template-rows-transition-speed) ease;display:grid;grid-template-rows:0}.typing-indicator-height-animation div{transition:opacity var(--limebb-chat-typing-opacity-transition-speed) ease var(--limebb-chat-typing-opacity-transition-delay);overflow:hidden;opacity:0}:host(limebb-chat-list[is-typing-indicator-visible]) .typing-indicator-height-animation{--limebb-chat-typing-opacity-transition-speed:0.4s;--limebb-chat-typing-opacity-transition-delay:0.3s;--limebb-chat-typing-grid-template-rows-transition-speed:0.46s;grid-template-rows:1.5rem}:host(limebb-chat-list[is-typing-indicator-visible]) .typing-indicator-height-animation div{opacity:1}.date-group limebb-chat-item{--limebb-promoted-action-bar-grid-template-rows:0fr}:host(limebb-chat-list[order=oldest-on-top]) .date-group:first-of-type limebb-chat-item:first-of-type{--limebb-promoted-action-bar-grid-template-rows:1fr}:host(limebb-chat-list[order=newest-on-top]) .date-group:first-of-type limebb-chat-item:first-of-type{--limebb-promoted-action-bar-grid-template-rows:1fr}'}},[1,"limebb-chat-list",{platform:[16],context:[16],items:[16],loading:[516],isTypingIndicatorVisible:[516,"is-typing-indicator-visible"],lastVisitedTimestamp:[513,"last-visited-timestamp"],order:[513]},void 0,{items:[{handleItemsChange:0}]}]),g=b,u=function(){"undefined"!=typeof customElements&&["limebb-chat-list","limebb-chat-icon-list","limebb-chat-item","limebb-typing-indicator"].forEach((t=>{switch(t){case"limebb-chat-list":customElements.get(a(t))||customElements.define(a(t),b);break;case"limebb-chat-icon-list":customElements.get(a(t))||n();break;case"limebb-chat-item":customElements.get(a(t))||s();break;case"limebb-typing-indicator":customElements.get(a(t))||l()}}))};export{g as LimebbChatList,u as defineCustomElement}
@@ -1,176 +1 @@
1
- import { h, proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/internal/client';
2
- import { c } from './index.esm.js';
3
- import { g as get } from './get.js';
4
-
5
- const LimeWebComponentTemplate = (props, children) => {
6
- const Name = props.name;
7
- const classList = props.class;
8
- return (h(Name, Object.assign({ class: classList }, getComponentProps(props), { key: props.key }), children));
9
- };
10
- function getComponentProps(props) {
11
- let componentProps = {};
12
- if (props.props) {
13
- componentProps = Object.assign({}, props.props);
14
- }
15
- return Object.assign({ context: props.context, platform: props.platform }, componentProps);
16
- }
17
-
18
- const componentConfigCss = ":host(*){--header-background-color:rgb(var(--contrast-600));display:flex;flex-direction:column;border:1px dashed rgb(var(--contrast-700));overflow:clip;border-radius:0.75rem;background-color:rgb(var(--contrast-500))}*{box-sizing:border-box}.label{margin-top:1rem;margin-bottom:1rem}.config-component{display:grid;column-gap:1rem;row-gap:1rem;margin:1rem;grid-template-columns:repeat(3, minmax(0, 1fr))}";
19
- const LimebbComponentConfigStyle0 = componentConfigCss;
20
-
21
- const ComponentConfig = /*@__PURE__*/ proxyCustomElement(class ComponentConfig extends HTMLElement {
22
- constructor() {
23
- super();
24
- this.__registerHost();
25
- this.__attachShadow();
26
- this.change = createEvent(this, "change", 7);
27
- this.value = {};
28
- /**
29
- * If the value should be fetched from the commandbus or the web component registry
30
- */
31
- this.type = 'component';
32
- this.configViewType = 'code';
33
- this.findConfigComponent = (name) => {
34
- var _a, _b;
35
- if (this.type === 'component') {
36
- return (_a = this.registry.getAll().find((config) => config.name === name)) === null || _a === void 0 ? void 0 : _a.configComponent;
37
- }
38
- if (this.type === 'command') {
39
- return (_b = this.commandbus.getAll().find((config) => config.id === name)) === null || _b === void 0 ? void 0 : _b.configComponent;
40
- }
41
- };
42
- this.handleChangeMode = (event) => {
43
- event.stopPropagation();
44
- this.configViewType = event.detail.id;
45
- };
46
- this.handleCodeEditorChange = (event) => {
47
- event.stopPropagation();
48
- try {
49
- const value = JSON.parse(event.detail);
50
- this.change.emit(value);
51
- }
52
- catch (_a) {
53
- // Ignore invalid JSON
54
- }
55
- };
56
- }
57
- componentWillLoad() {
58
- this.configComponent = this.getComponentName();
59
- }
60
- componentShouldUpdate(_newValue, _oldValue, property) {
61
- return property !== 'formInfo';
62
- }
63
- watchFormInfo() {
64
- this.configComponent = this.getComponentName();
65
- }
66
- watchconfigComponent(newValue, oldValue) {
67
- if (newValue && !oldValue) {
68
- this.configViewType = 'config';
69
- }
70
- if (!newValue) {
71
- this.configViewType = 'code';
72
- }
73
- }
74
- getComponentName() {
75
- var _a, _b, _c;
76
- const section = (_b = (_a = this.formInfo) === null || _a === void 0 ? void 0 : _a.schemaPath.slice(0, -1)) !== null && _b !== void 0 ? _b : [];
77
- const path = [...section, this.getNameField()];
78
- const name = get((_c = this.formInfo) === null || _c === void 0 ? void 0 : _c.rootValue, path);
79
- const configComponent = this.findConfigComponent(name);
80
- if (configComponent && customElements.get(configComponent.name)) {
81
- return configComponent;
82
- }
83
- }
84
- render() {
85
- return [this.renderHeader(), this.renderContent()];
86
- }
87
- renderHeader() {
88
- let buttons = [];
89
- if (this.configComponent) {
90
- buttons = [
91
- {
92
- id: 'config',
93
- title: 'Config',
94
- selected: this.configViewType === 'config',
95
- },
96
- {
97
- id: 'code',
98
- title: 'Code',
99
- selected: this.configViewType === 'code',
100
- },
101
- ];
102
- }
103
- return (h("limel-header", { icon: "edit_property", heading: this.label, subheading: this.helperText }, h("limel-button-group", { slot: "actions", value: buttons, onChange: this.handleChangeMode })));
104
- }
105
- renderContent() {
106
- if (this.configViewType === 'config') {
107
- return this.renderConfigComponent();
108
- }
109
- return this.renderCodeEditor();
110
- }
111
- renderCodeEditor() {
112
- return (h("limel-code-editor", { value: JSON.stringify(this.value, null, '\t'), language: "json", readonly: this.readonly, lineNumbers: true, fold: true, lint: true, onChange: this.handleCodeEditorChange }));
113
- }
114
- renderConfigComponent() {
115
- var _a, _b;
116
- return (h(LimeWebComponentTemplate, { class: "config-component", platform: this.platform, context: this.context,
117
- // eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain
118
- name: (_a = this.configComponent) === null || _a === void 0 ? void 0 : _a.name, props: Object.assign(Object.assign({}, (_b = this.configComponent) === null || _b === void 0 ? void 0 : _b.props), { value: this.value, required: this.required, readonly: this.readonly, disabled: this.disabled, label: this.label, helperText: this.helperText, formInfo: this.formInfo }) }));
119
- }
120
- getNameField() {
121
- if (this.nameField) {
122
- return this.nameField;
123
- }
124
- const fields = {
125
- component: 'name',
126
- command: 'id',
127
- };
128
- return fields[this.type];
129
- }
130
- get registry() {
131
- return this.platform.get(c.WebComponentRegistry);
132
- }
133
- get commandbus() {
134
- return this.platform.get(c.CommandBus);
135
- }
136
- static get watchers() { return {
137
- "formInfo": ["watchFormInfo"],
138
- "configComponent": ["watchconfigComponent"]
139
- }; }
140
- static get style() { return LimebbComponentConfigStyle0; }
141
- }, [1, "limebb-component-config", {
142
- "platform": [16],
143
- "context": [16],
144
- "value": [16],
145
- "required": [4],
146
- "readonly": [4],
147
- "disabled": [4],
148
- "label": [1],
149
- "helperText": [1, "helper-text"],
150
- "formInfo": [16],
151
- "type": [1],
152
- "nameField": [1, "name-field"],
153
- "configComponent": [32],
154
- "configViewType": [32]
155
- }, undefined, {
156
- "formInfo": ["watchFormInfo"],
157
- "configComponent": ["watchconfigComponent"]
158
- }]);
159
- function defineCustomElement$1() {
160
- if (typeof customElements === "undefined") {
161
- return;
162
- }
163
- const components = ["limebb-component-config"];
164
- components.forEach(tagName => { switch (tagName) {
165
- case "limebb-component-config":
166
- if (!customElements.get(tagName)) {
167
- customElements.define(tagName, ComponentConfig);
168
- }
169
- break;
170
- } });
171
- }
172
-
173
- const LimebbComponentConfig = ComponentConfig;
174
- const defineCustomElement = defineCustomElement$1;
175
-
176
- export { LimebbComponentConfig, defineCustomElement };
1
+ import{h as t,proxyCustomElement as e,HTMLElement as o,createEvent as n,transformTag as i}from"@stencil/core/internal/client";import{n as r}from"./index.esm.js";import{g as s}from"./get.js";const c=(e,o)=>t(e.name,Object.assign({class:e.class},function(t){let e={};return t.props&&(e=Object.assign({},t.props)),Object.assign({context:t.context,platform:t.platform},e)}(e),{key:e.key}),o),l=e(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.change=n(this,"change",7),this.value={},this.type="component",this.configViewType="code",this.findConfigComponent=t=>{var e,o;return"component"===this.type?null===(e=this.registry.getAll().find((e=>e.name===t)))||void 0===e?void 0:e.configComponent:"command"===this.type?null===(o=this.commandbus.getAll().find((e=>e.id===t)))||void 0===o?void 0:o.configComponent:void 0},this.handleChangeMode=t=>{t.stopPropagation(),this.configViewType=t.detail.id},this.handleCodeEditorChange=t=>{t.stopPropagation();try{const e=JSON.parse(t.detail);this.change.emit(e)}catch(t){}}}componentWillLoad(){this.configComponent=this.getComponentName()}componentShouldUpdate(t,e,o){return"formInfo"!==o}watchFormInfo(){this.configComponent=this.getComponentName()}watchconfigComponent(t,e){t&&!e&&(this.configViewType="config"),t||(this.configViewType="code")}getComponentName(){var t,e,o;const n=[...null!==(e=null===(t=this.formInfo)||void 0===t?void 0:t.schemaPath.slice(0,-1))&&void 0!==e?e:[],this.getNameField()],i=s(null===(o=this.formInfo)||void 0===o?void 0:o.rootValue,n),r=this.findConfigComponent(i);if(r&&customElements.get(r.name))return r}render(){return[this.renderHeader(),this.renderContent()]}renderHeader(){let e=[];return this.configComponent&&(e=[{id:"config",title:"Config",selected:"config"===this.configViewType},{id:"code",title:"Code",selected:"code"===this.configViewType}]),t("limel-header",{icon:"edit_property",heading:this.label,subheading:this.helperText},t("limel-button-group",{slot:"actions",value:e,onChange:this.handleChangeMode}))}renderContent(){return"config"===this.configViewType?this.renderConfigComponent():this.renderCodeEditor()}renderCodeEditor(){return t("limel-code-editor",{value:JSON.stringify(this.value,null,"\t"),language:"json",readonly:this.readonly,lineNumbers:!0,fold:!0,lint:!0,onChange:this.handleCodeEditorChange})}renderConfigComponent(){var e,o;return t(c,{class:"config-component",platform:this.platform,context:this.context,name:null===(e=this.configComponent)||void 0===e?void 0:e.name,props:Object.assign(Object.assign({},null===(o=this.configComponent)||void 0===o?void 0:o.props),{value:this.value,required:this.required,readonly:this.readonly,disabled:this.disabled,label:this.label,helperText:this.helperText,formInfo:this.formInfo})})}getNameField(){return this.nameField?this.nameField:{component:"name",command:"id"}[this.type]}get registry(){return this.platform.get(r.WebComponentRegistry)}get commandbus(){return this.platform.get(r.CommandBus)}static get watchers(){return{formInfo:[{watchFormInfo:0}],configComponent:[{watchconfigComponent:0}]}}static get style(){return":host(*){--header-background-color:rgb(var(--contrast-600));display:flex;flex-direction:column;border:1px dashed rgb(var(--contrast-700));overflow:clip;border-radius:0.75rem;background-color:rgb(var(--contrast-500))}*{box-sizing:border-box}.label{margin-top:1rem;margin-bottom:1rem}.config-component{display:grid;column-gap:1rem;row-gap:1rem;margin:1rem;grid-template-columns:repeat(3, minmax(0, 1fr))}"}},[1,"limebb-component-config",{platform:[16],context:[16],value:[16],required:[4],readonly:[4],disabled:[4],label:[1],helperText:[1,"helper-text"],formInfo:[16],type:[1],nameField:[1,"name-field"],configComponent:[32],configViewType:[32]},void 0,{formInfo:[{watchFormInfo:0}],configComponent:[{watchconfigComponent:0}]}]),m=l,h=function(){"undefined"!=typeof customElements&&["limebb-component-config"].forEach((t=>{"limebb-component-config"===t&&(customElements.get(i(t))||customElements.define(i(t),l))}))};export{m as LimebbComponentConfig,h as defineCustomElement}