@limetech/lime-crm-building-blocks 2.4.2 → 2.5.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 (256) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/{condition-tree-translate-BQwKtiNZ.js → condition-tree-translate-CXZ3rdCG.js} +1 -1
  3. package/dist/cjs/{filter-group-logic-CeGmYgsu.js → filter-group-logic-5yhZgTgb.js} +1 -1
  4. package/dist/cjs/{filter-operators-C3T2czC_.js → filter-operators-CTjk7LWD.js} +1 -1
  5. package/dist/cjs/{index-Du4GyM0Y.js → index-Cnyo8RUg.js} +20 -2
  6. package/dist/cjs/index.cjs.js +3 -3
  7. package/dist/cjs/{index.esm-C2zw0QJK.js → index.esm-C9-4qA1N.js} +23 -19
  8. package/dist/cjs/lime-crm-building-blocks.cjs.js +3 -3
  9. package/dist/cjs/{lime-query-validation-CzYkphmi.js → lime-query-validation-C1zLolkD.js} +1 -1
  10. package/dist/cjs/limebb-alert-dialog.cjs.entry.js +1 -1
  11. package/dist/cjs/limebb-browser.cjs.entry.js +2 -2
  12. package/dist/cjs/limebb-chat-icon-list_3.cjs.entry.js +2 -2
  13. package/dist/cjs/limebb-chat-list.cjs.entry.js +2 -2
  14. package/dist/cjs/limebb-color-palette-picker.cjs.entry.js +1 -1
  15. package/dist/cjs/limebb-color-palette-swatches.cjs.entry.js +1 -1
  16. package/dist/cjs/limebb-component-config.cjs.entry.js +3 -3
  17. package/dist/cjs/limebb-component-picker.cjs.entry.js +2 -2
  18. package/dist/cjs/limebb-composer-toolbar.cjs.entry.js +2 -2
  19. package/dist/cjs/limebb-condition-tree-editor.cjs.entry.js +4 -4
  20. package/dist/cjs/limebb-condition-tree.cjs.entry.js +3 -3
  21. package/dist/cjs/limebb-currency-picker.cjs.entry.js +2 -2
  22. package/dist/cjs/limebb-dashboard-widget.cjs.entry.js +1 -1
  23. package/dist/cjs/limebb-data-cells.cjs.entry.js +2 -2
  24. package/dist/cjs/limebb-date-picker.cjs.entry.js +2 -2
  25. package/dist/cjs/limebb-date-range.cjs.entry.js +1 -1
  26. package/dist/cjs/limebb-document-chips.cjs.entry.js +1 -1
  27. package/dist/cjs/limebb-document-item.cjs.entry.js +1 -1
  28. package/dist/cjs/limebb-document-picker.cjs.entry.js +1 -1
  29. package/dist/cjs/limebb-empty-state.cjs.entry.js +1 -1
  30. package/dist/cjs/limebb-feed-item-thumbnail-file-info.cjs.entry.js +1 -1
  31. package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +2 -2
  32. package/dist/cjs/limebb-feed.cjs.entry.js +2 -2
  33. package/dist/cjs/limebb-filter-chip_6.cjs.entry.js +4 -4
  34. package/dist/cjs/limebb-icon-picker.cjs.entry.js +41 -1
  35. package/dist/cjs/limebb-info-tile-currency-format.cjs.entry.js +1 -1
  36. package/dist/cjs/limebb-info-tile-date-format.cjs.entry.js +1 -1
  37. package/dist/cjs/limebb-info-tile-decimal-format.cjs.entry.js +1 -1
  38. package/dist/cjs/limebb-info-tile-format.cjs.entry.js +1 -1
  39. package/dist/cjs/limebb-info-tile-relative-date-format.cjs.entry.js +1 -1
  40. package/dist/cjs/limebb-info-tile-unit-format.cjs.entry.js +1 -1
  41. package/dist/cjs/limebb-info-tile.cjs.entry.js +3 -3
  42. package/dist/cjs/limebb-inline-image.cjs.entry.js +16 -3
  43. package/dist/cjs/limebb-kanban-group.cjs.entry.js +2 -2
  44. package/dist/cjs/limebb-kanban-item.cjs.entry.js +2 -2
  45. package/dist/cjs/limebb-kanban.cjs.entry.js +1 -1
  46. package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +3 -3
  47. package/dist/cjs/limebb-lime-query-filter-builder.cjs.entry.js +3 -3
  48. package/dist/cjs/limebb-lime-query-filter-comparison_2.cjs.entry.js +4 -4
  49. package/dist/cjs/limebb-lime-query-order-by-editor_2.cjs.entry.js +3 -3
  50. package/dist/cjs/limebb-lime-query-order-by-item.cjs.entry.js +1 -1
  51. package/dist/cjs/limebb-lime-query-response-format-builder.cjs.entry.js +3 -3
  52. package/dist/cjs/limebb-lime-query-response-format-editor_2.cjs.entry.js +1 -1
  53. package/dist/cjs/limebb-limeobject-file-viewer.cjs.entry.js +2 -2
  54. package/dist/cjs/limebb-live-docs-info.cjs.entry.js +1 -1
  55. package/dist/cjs/limebb-loader.cjs.entry.js +2 -2
  56. package/dist/cjs/limebb-locale-picker.cjs.entry.js +2 -2
  57. package/dist/cjs/limebb-mention-group-counter.cjs.entry.js +1 -1
  58. package/dist/cjs/limebb-mention.cjs.entry.js +2 -2
  59. package/dist/cjs/limebb-navigation-button_2.cjs.entry.js +1 -1
  60. package/dist/cjs/limebb-notification-item.cjs.entry.js +2 -2
  61. package/dist/cjs/limebb-notification-list.cjs.entry.js +2 -2
  62. package/dist/cjs/limebb-object-chip.cjs.entry.js +81 -7
  63. package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +2 -2
  64. package/dist/cjs/limebb-property-selector.cjs.entry.js +3 -3
  65. package/dist/cjs/limebb-rule-arg-filter-editor.cjs.entry.js +2 -2
  66. package/dist/cjs/limebb-rule-condition-chip.cjs.entry.js +3 -3
  67. package/dist/cjs/{limebb-rule-condition-editor-CHWTMOmi.js → limebb-rule-condition-editor-ngOQoza9.js} +2 -2
  68. package/dist/cjs/limebb-rule-condition-editor.cjs.entry.js +3 -3
  69. package/dist/cjs/limebb-rule-editor.cjs.entry.js +5 -5
  70. package/dist/cjs/limebb-rule-gate.cjs.entry.js +2 -2
  71. package/dist/cjs/limebb-text-editor-picker.cjs.entry.js +1 -1
  72. package/dist/cjs/limebb-text-editor.cjs.entry.js +3 -3
  73. package/dist/cjs/limebb-trend-indicator.cjs.entry.js +2 -2
  74. package/dist/cjs/limebb-value-comparison-editor.cjs.entry.js +3 -3
  75. package/dist/cjs/{limetype-BzVDjAKS.js → limetype-VOBLbMGk.js} +1 -1
  76. package/dist/cjs/loader.cjs.js +2 -2
  77. package/dist/cjs/{web-component-template-C-AkY5as.js → web-component-template-D8hPsfRp.js} +1 -1
  78. package/dist/collection/collection-manifest.json +1 -1
  79. package/dist/collection/components/condition-tree/condition-tree-editor/condition-tree-editor.js +1 -1
  80. package/dist/collection/components/dashboard-widget/dashboard-widget.js +1 -1
  81. package/dist/collection/components/filter-chip/filter-chip.js +1 -1
  82. package/dist/collection/components/info-tile/info-tile.js +1 -1
  83. package/dist/collection/components/inline-image/inline-image.js +15 -2
  84. package/dist/collection/components/object-chip/object-chip.js +68 -1
  85. package/dist/collection/components/rule-editor/rule-condition-chip/rule-condition-chip.js +1 -1
  86. package/dist/collection/components/summary-popover/summary-popover.js +1 -1
  87. package/dist/collection/util/object-markdown.js +33 -0
  88. package/dist/collection/util/object-resolver.js +3 -4
  89. package/dist/components/limebb-icon-picker.js +1 -1
  90. package/dist/components/limebb-inline-image.js +1 -1
  91. package/dist/components/limebb-object-chip.js +1 -1
  92. package/dist/esm/{condition-tree-translate-ZQptbaXF.js → condition-tree-translate-BgdN95CB.js} +1 -1
  93. package/dist/esm/{filter-group-logic-nqCMmV0e.js → filter-group-logic-DWCOjNyY.js} +1 -1
  94. package/dist/esm/{filter-operators-QbKK26m2.js → filter-operators-Djz0egoX.js} +1 -1
  95. package/dist/esm/{index-BK566_jX.js → index-f_mBf1UZ.js} +20 -2
  96. package/dist/esm/{index.esm-C__n3hug.js → index.esm-DkIgMHMo.js} +22 -18
  97. package/dist/esm/index.js +3 -3
  98. package/dist/esm/lime-crm-building-blocks.js +4 -4
  99. package/dist/esm/{lime-query-validation-BvB2v-yP.js → lime-query-validation-CFuF8oLz.js} +1 -1
  100. package/dist/esm/limebb-alert-dialog.entry.js +1 -1
  101. package/dist/esm/limebb-browser.entry.js +2 -2
  102. package/dist/esm/limebb-chat-icon-list_3.entry.js +2 -2
  103. package/dist/esm/limebb-chat-list.entry.js +2 -2
  104. package/dist/esm/limebb-color-palette-picker.entry.js +1 -1
  105. package/dist/esm/limebb-color-palette-swatches.entry.js +1 -1
  106. package/dist/esm/limebb-component-config.entry.js +3 -3
  107. package/dist/esm/limebb-component-picker.entry.js +2 -2
  108. package/dist/esm/limebb-composer-toolbar.entry.js +2 -2
  109. package/dist/esm/limebb-condition-tree-editor.entry.js +4 -4
  110. package/dist/esm/limebb-condition-tree.entry.js +3 -3
  111. package/dist/esm/limebb-currency-picker.entry.js +2 -2
  112. package/dist/esm/limebb-dashboard-widget.entry.js +1 -1
  113. package/dist/esm/limebb-data-cells.entry.js +2 -2
  114. package/dist/esm/limebb-date-picker.entry.js +2 -2
  115. package/dist/esm/limebb-date-range.entry.js +1 -1
  116. package/dist/esm/limebb-document-chips.entry.js +1 -1
  117. package/dist/esm/limebb-document-item.entry.js +1 -1
  118. package/dist/esm/limebb-document-picker.entry.js +1 -1
  119. package/dist/esm/limebb-empty-state.entry.js +1 -1
  120. package/dist/esm/limebb-feed-item-thumbnail-file-info.entry.js +1 -1
  121. package/dist/esm/limebb-feed-timeline-item.entry.js +2 -2
  122. package/dist/esm/limebb-feed.entry.js +2 -2
  123. package/dist/esm/limebb-filter-chip_6.entry.js +4 -4
  124. package/dist/esm/limebb-icon-picker.entry.js +41 -1
  125. package/dist/esm/limebb-info-tile-currency-format.entry.js +1 -1
  126. package/dist/esm/limebb-info-tile-date-format.entry.js +1 -1
  127. package/dist/esm/limebb-info-tile-decimal-format.entry.js +1 -1
  128. package/dist/esm/limebb-info-tile-format.entry.js +1 -1
  129. package/dist/esm/limebb-info-tile-relative-date-format.entry.js +1 -1
  130. package/dist/esm/limebb-info-tile-unit-format.entry.js +1 -1
  131. package/dist/esm/limebb-info-tile.entry.js +3 -3
  132. package/dist/esm/limebb-inline-image.entry.js +16 -3
  133. package/dist/esm/limebb-kanban-group.entry.js +2 -2
  134. package/dist/esm/limebb-kanban-item.entry.js +2 -2
  135. package/dist/esm/limebb-kanban.entry.js +1 -1
  136. package/dist/esm/limebb-lime-query-builder.entry.js +3 -3
  137. package/dist/esm/limebb-lime-query-filter-builder.entry.js +3 -3
  138. package/dist/esm/limebb-lime-query-filter-comparison_2.entry.js +4 -4
  139. package/dist/esm/limebb-lime-query-order-by-editor_2.entry.js +3 -3
  140. package/dist/esm/limebb-lime-query-order-by-item.entry.js +1 -1
  141. package/dist/esm/limebb-lime-query-response-format-builder.entry.js +3 -3
  142. package/dist/esm/limebb-lime-query-response-format-editor_2.entry.js +1 -1
  143. package/dist/esm/limebb-limeobject-file-viewer.entry.js +2 -2
  144. package/dist/esm/limebb-live-docs-info.entry.js +1 -1
  145. package/dist/esm/limebb-loader.entry.js +2 -2
  146. package/dist/esm/limebb-locale-picker.entry.js +2 -2
  147. package/dist/esm/limebb-mention-group-counter.entry.js +1 -1
  148. package/dist/esm/limebb-mention.entry.js +2 -2
  149. package/dist/esm/limebb-navigation-button_2.entry.js +1 -1
  150. package/dist/esm/limebb-notification-item.entry.js +2 -2
  151. package/dist/esm/limebb-notification-list.entry.js +2 -2
  152. package/dist/esm/limebb-object-chip.entry.js +81 -7
  153. package/dist/esm/limebb-percentage-visualizer.entry.js +2 -2
  154. package/dist/esm/limebb-property-selector.entry.js +3 -3
  155. package/dist/esm/limebb-rule-arg-filter-editor.entry.js +2 -2
  156. package/dist/esm/limebb-rule-condition-chip.entry.js +3 -3
  157. package/dist/esm/{limebb-rule-condition-editor-DeY758N-.js → limebb-rule-condition-editor-SUdySXLc.js} +2 -2
  158. package/dist/esm/limebb-rule-condition-editor.entry.js +3 -3
  159. package/dist/esm/limebb-rule-editor.entry.js +5 -5
  160. package/dist/esm/limebb-rule-gate.entry.js +2 -2
  161. package/dist/esm/limebb-text-editor-picker.entry.js +1 -1
  162. package/dist/esm/limebb-text-editor.entry.js +3 -3
  163. package/dist/esm/limebb-trend-indicator.entry.js +2 -2
  164. package/dist/esm/limebb-value-comparison-editor.entry.js +3 -3
  165. package/dist/esm/{limetype-Muf9VutX.js → limetype-CTws6FIV.js} +1 -1
  166. package/dist/esm/loader.js +3 -3
  167. package/dist/esm/{web-component-template-D1JpeNy_.js → web-component-template-CYI_EVCh.js} +1 -1
  168. package/dist/lime-crm-building-blocks/index.esm.js +1 -1
  169. package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
  170. package/dist/lime-crm-building-blocks/{p-b4571d32.entry.js → p-0219b335.entry.js} +1 -1
  171. package/dist/lime-crm-building-blocks/{p-1ae4962d.entry.js → p-02aad930.entry.js} +1 -1
  172. package/dist/lime-crm-building-blocks/{p-23d2632b.entry.js → p-04a13584.entry.js} +1 -1
  173. package/dist/lime-crm-building-blocks/{p-3446290c.entry.js → p-054af74c.entry.js} +1 -1
  174. package/dist/lime-crm-building-blocks/{p-895c8966.entry.js → p-09ded02e.entry.js} +1 -1
  175. package/dist/lime-crm-building-blocks/{p-6d2dba20.entry.js → p-12b3242e.entry.js} +1 -1
  176. package/dist/lime-crm-building-blocks/{p-d4635a39.entry.js → p-143fa937.entry.js} +1 -1
  177. package/dist/lime-crm-building-blocks/p-166d626b.entry.js +1 -0
  178. package/dist/lime-crm-building-blocks/{p-bf693702.entry.js → p-20852807.entry.js} +1 -1
  179. package/dist/lime-crm-building-blocks/{p-573f9e95.entry.js → p-21b7fc80.entry.js} +1 -1
  180. package/dist/lime-crm-building-blocks/{p-47b56a75.entry.js → p-24c2812c.entry.js} +1 -1
  181. package/dist/lime-crm-building-blocks/{p-f49250f3.entry.js → p-26139212.entry.js} +1 -1
  182. package/dist/lime-crm-building-blocks/{p-d6099dc7.entry.js → p-2edda571.entry.js} +1 -1
  183. package/dist/lime-crm-building-blocks/{p-b72c748b.entry.js → p-346d85fe.entry.js} +1 -1
  184. package/dist/lime-crm-building-blocks/{p-4bdaf436.entry.js → p-3ef055d0.entry.js} +1 -1
  185. package/dist/lime-crm-building-blocks/{p-949ed056.entry.js → p-433289f1.entry.js} +1 -1
  186. package/dist/lime-crm-building-blocks/{p-5855abdc.entry.js → p-4ac488ff.entry.js} +1 -1
  187. package/dist/lime-crm-building-blocks/{p-a2e291b4.entry.js → p-4b1fa4d3.entry.js} +1 -1
  188. package/dist/lime-crm-building-blocks/p-58eed0a6.entry.js +1 -0
  189. package/dist/lime-crm-building-blocks/{p-a598f92f.entry.js → p-68a60eb1.entry.js} +1 -1
  190. package/dist/lime-crm-building-blocks/{p-1917956c.entry.js → p-6a5c26f0.entry.js} +1 -1
  191. package/dist/lime-crm-building-blocks/{p-4fd9d615.entry.js → p-6b1e220e.entry.js} +1 -1
  192. package/dist/lime-crm-building-blocks/{p-394b521a.entry.js → p-6c872445.entry.js} +1 -1
  193. package/dist/lime-crm-building-blocks/p-6cd6f81b.entry.js +1 -0
  194. package/dist/lime-crm-building-blocks/p-7039bf37.entry.js +1 -0
  195. package/dist/lime-crm-building-blocks/{p-ec9b5e30.entry.js → p-713f58e0.entry.js} +1 -1
  196. package/dist/lime-crm-building-blocks/{p-32339f09.entry.js → p-7558e5fd.entry.js} +1 -1
  197. package/dist/lime-crm-building-blocks/{p-4f60b7bc.entry.js → p-76461e56.entry.js} +1 -1
  198. package/dist/lime-crm-building-blocks/{p-c7bfa2e4.entry.js → p-78f12738.entry.js} +1 -1
  199. package/dist/lime-crm-building-blocks/{p-a4556649.entry.js → p-7911a1d9.entry.js} +1 -1
  200. package/dist/lime-crm-building-blocks/{p-da79c5fc.entry.js → p-7c58eff9.entry.js} +1 -1
  201. package/dist/lime-crm-building-blocks/{p-6bd61290.entry.js → p-7e2ca2a3.entry.js} +1 -1
  202. package/dist/lime-crm-building-blocks/{p-251784bf.entry.js → p-7f1ae431.entry.js} +1 -1
  203. package/dist/lime-crm-building-blocks/{p-8c0455e4.entry.js → p-80ddcd53.entry.js} +1 -1
  204. package/dist/lime-crm-building-blocks/{p-4af3ea2c.entry.js → p-80fd47ab.entry.js} +1 -1
  205. package/dist/lime-crm-building-blocks/{p-b272730c.entry.js → p-84d51dec.entry.js} +1 -1
  206. package/dist/lime-crm-building-blocks/{p-39a36450.entry.js → p-86980dab.entry.js} +1 -1
  207. package/dist/lime-crm-building-blocks/{p-9959019d.entry.js → p-8a875344.entry.js} +1 -1
  208. package/dist/lime-crm-building-blocks/{p-7d53756b.entry.js → p-8e8046db.entry.js} +1 -1
  209. package/dist/lime-crm-building-blocks/{p-3b672249.entry.js → p-95a2ba98.entry.js} +1 -1
  210. package/dist/lime-crm-building-blocks/{p-35d9b3ad.entry.js → p-9a3564ff.entry.js} +1 -1
  211. package/dist/lime-crm-building-blocks/{p-087d5651.entry.js → p-9d1be8cc.entry.js} +1 -1
  212. package/dist/lime-crm-building-blocks/{p-a1052482.entry.js → p-9f5065fb.entry.js} +1 -1
  213. package/dist/lime-crm-building-blocks/{p-DhGRAeCH.js → p-B6a_-5iN.js} +1 -1
  214. package/dist/lime-crm-building-blocks/{p-B7whyaAL.js → p-BnPKxFWU.js} +1 -1
  215. package/dist/lime-crm-building-blocks/p-Bub25YTw.js +1 -0
  216. package/dist/lime-crm-building-blocks/{p-Cve-3L4y.js → p-CCeLGIvD.js} +1 -1
  217. package/dist/lime-crm-building-blocks/p-CNQXwbmC.js +1 -0
  218. package/dist/lime-crm-building-blocks/{p-ClYOFrOo.js → p-CsrJNPra.js} +1 -1
  219. package/dist/lime-crm-building-blocks/{p-7DQ7qvMa.js → p-DcORJz0y.js} +1 -1
  220. package/dist/lime-crm-building-blocks/p-Dl3vxV2X.js +1 -0
  221. package/dist/lime-crm-building-blocks/{p-5c541d0c.entry.js → p-a4be0e6b.entry.js} +1 -1
  222. package/dist/lime-crm-building-blocks/{p-53b44865.entry.js → p-aae20057.entry.js} +1 -1
  223. package/dist/lime-crm-building-blocks/{p-c58067ec.entry.js → p-ab3625c4.entry.js} +1 -1
  224. package/dist/lime-crm-building-blocks/p-ac4c7e2d.entry.js +1 -0
  225. package/dist/lime-crm-building-blocks/{p-985ae787.entry.js → p-af747fd5.entry.js} +1 -1
  226. package/dist/lime-crm-building-blocks/{p-27240bb0.entry.js → p-b0eab411.entry.js} +1 -1
  227. package/dist/lime-crm-building-blocks/{p-a938384f.entry.js → p-b9317449.entry.js} +1 -1
  228. package/dist/lime-crm-building-blocks/{p-621ab65a.entry.js → p-ba0ff3a3.entry.js} +1 -1
  229. package/dist/lime-crm-building-blocks/{p-d6c7cf0f.entry.js → p-bbf8b2c8.entry.js} +1 -1
  230. package/dist/lime-crm-building-blocks/{p-bd6c12bc.entry.js → p-c12e421e.entry.js} +1 -1
  231. package/dist/lime-crm-building-blocks/{p-550606f6.entry.js → p-d0bc3dd9.entry.js} +1 -1
  232. package/dist/lime-crm-building-blocks/p-d1baf62e.entry.js +1 -0
  233. package/dist/lime-crm-building-blocks/{p-ab0210b2.entry.js → p-d71d5131.entry.js} +1 -1
  234. package/dist/lime-crm-building-blocks/{p-612c6b28.entry.js → p-e245eb5b.entry.js} +1 -1
  235. package/dist/lime-crm-building-blocks/{p-6e2553b4.entry.js → p-e5ba48fc.entry.js} +1 -1
  236. package/dist/lime-crm-building-blocks/{p-a14bed52.entry.js → p-ec2d8a50.entry.js} +1 -1
  237. package/dist/lime-crm-building-blocks/{p-e19f4b3b.entry.js → p-ee4343b3.entry.js} +1 -1
  238. package/dist/lime-crm-building-blocks/{p-eb95767a.entry.js → p-f831aa55.entry.js} +1 -1
  239. package/dist/lime-crm-building-blocks/{p-BK566_jX.js → p-f_mBf1UZ.js} +2 -2
  240. package/dist/lime-crm-building-blocks/{p-6303201b.entry.js → p-fa1e6d6f.entry.js} +1 -1
  241. package/dist/lime-crm-building-blocks/{p-3865eec4.entry.js → p-fba754d6.entry.js} +1 -1
  242. package/dist/lime-crm-building-blocks/{p-627b0c79.entry.js → p-fcf0009b.entry.js} +1 -1
  243. package/dist/types/components/inline-image/inline-image.d.ts +6 -1
  244. package/dist/types/components/object-chip/object-chip.d.ts +14 -1
  245. package/dist/types/components.d.ts +7 -2
  246. package/dist/types/util/object-markdown.d.ts +14 -0
  247. package/package.json +9 -9
  248. package/dist/lime-crm-building-blocks/p-0621e884.entry.js +0 -1
  249. package/dist/lime-crm-building-blocks/p-2adeac66.entry.js +0 -1
  250. package/dist/lime-crm-building-blocks/p-7c3d3e06.entry.js +0 -1
  251. package/dist/lime-crm-building-blocks/p-8f80d024.entry.js +0 -1
  252. package/dist/lime-crm-building-blocks/p-DOULPRTn.js +0 -1
  253. package/dist/lime-crm-building-blocks/p-DjoMDjMo.js +0 -1
  254. package/dist/lime-crm-building-blocks/p-DuWEcQ7n.js +0 -1
  255. package/dist/lime-crm-building-blocks/p-a2ebd5a4.entry.js +0 -1
  256. package/dist/lime-crm-building-blocks/p-bac9d3a9.entry.js +0 -1
@@ -0,0 +1 @@
1
+ import{o as n}from"./p-B6a_-5iN.js";function e(e){return e.op===n.NOT?e.exp.op===n.AND?"NOT_AND":"NOT_OR":e.op===n.AND?"AND":"OR"}function t(e){return e.op===n.NOT?e.exp:e}function o(e,o){const r=t(e),p={op:"AND"===o||"NOT_AND"===o?n.AND:n.OR,exp:[...r.exp]};return"NOT_AND"===o||"NOT_OR"===o?{op:n.NOT,exp:p}:p}function r(e){if(e.op===n.AND||e.op===n.OR)return!0;if(e.op===n.NOT){const t=e.exp;return t.op===n.AND||t.op===n.OR}return!1}function p(n){return r(n)?n:void 0}function u(){return{key:"",op:n.EQUALS,exp:""}}function s(e){return{op:e===n.AND?n.OR:n.AND,exp:[u()]}}function i(n,e){return{op:n.op,exp:[...n.exp,e]}}function a(n,e,t){const o=[...n.exp];return t?(o[e]=t,{type:"updated",expression:{op:n.op,exp:o}}):(o.splice(e,1),0===o.length?{type:"removed",expression:void 0}:{type:"updated",expression:{op:n.op,exp:o}})}export{p as a,i as b,t as c,s as d,u as e,e as g,r as i,o as s,a as u}
@@ -1 +1 @@
1
- import{r as n,c as t,h as e}from"./p-BK566_jX.js";import{L as o}from"./p-Cve-3L4y.js";const i={all:{type:"all",negated:!1},any:{type:"any",negated:!1},"not-all":{type:"all",negated:!0},none:{type:"any",negated:!0}},r={all:"not-all",any:"none","not-all":"all",none:"any"};function s(n){return{describe:(t,e)=>function(n,t,e){const o=e.issues().get(n),i=l(n);if(i)return{kind:"group",combinator:i.combinator,children:i.rules,issues:o};const r=a(n);return r?function(n,t,e,o){const{ref:i,negated:r}=n,s=e.metadata.get(i.id),l=e.created().has(i),a=null==s?void 0:s.configComponent;return{kind:"leaf",chip:{label:c(i,e),icon:f(s),invalid:!s||!!(null==o?void 0:o.length),component:{name:"limebb-rule-condition-chip",props:{negated:r,iconColor:p(s)}}},negated:r,issues:o,autoOpen:l&&!!a,editor:a&&{name:"limebb-rule-condition-editor",props:{configComponent:a,focusOnOpen:l&&!t.visited}}}}(r,t,e,o):function(n,t,e){var o;return{kind:"leaf",chip:{label:null!==(o=d(n))&&void 0!==o?o:"…",icon:"question",invalid:!0,component:{name:"limebb-rule-condition-chip"}},issues:(null==e?void 0:e.length)?e:[t.translate("webclient.rule-editor.unreadable-condition","This condition cannot be read, and so cannot be edited here.")]}}(n,e,o)}(t,e,n),group:h,negate:b,createLeaf:t=>{var e;const o={type:"ref",id:String(null!==(e=null==t?void 0:t.value)&&void 0!==e?e:"")};return n.created().add(o),o}}}function l(n){if(!u(n))return;if("all"===n.type||"any"===n.type)return Array.isArray(n.rules)?{combinator:n.type,rules:n.rules}:void 0;if("not"!==n.type)return;const t=l(n.rule);return t?{combinator:r[t.combinator],rules:t.rules}:void 0}function a(n){if(u(n))return"ref"===n.type?{ref:n,negated:!1}:"not"===n.type&&u(n.rule)&&"ref"===n.rule.type?{ref:n.rule,negated:!0}:void 0}function u(n){return"object"==typeof n&&null!==n}function c(n,t){return t.titles.get(n.id)||n.id||"…"}function d(n){if(!u(n))return;const t=n.type;return"string"==typeof t&&t?t:void 0}function f(n){return n?n.icon?"string"==typeof n.icon?n.icon:n.icon.name:void 0:"question"}function p(n){return"object"==typeof(null==n?void 0:n.icon)?n.icon.color:void 0}function h(n,t){const e={type:i[n].type,rules:[...t]};return i[n].negated?{type:"not",rule:e}:e}function b(n,t){return t?"not"===n.type?n:{type:"not",rule:n}:"not"===n.type?n.rule:n}const y=class{constructor(e){n(this,e),this.conditionChange=t(this,"conditionChange"),this.focusOnOpen=!1,this.readonly=!1,this.disabled=!1,this.handleChange=n=>{n.stopPropagation();const t=this.reference;if(!t)return;const e=Object.assign(Object.assign({},t.ref),{args:n.detail});this.conditionChange.emit(t.negated?{type:"not",rule:e}:e)}}render(){return this.configComponent&&this.reference?e(o,{class:"editor",platform:this.platform,context:this.context,name:this.configComponent.name,props:Object.assign(Object.assign({},this.configComponent.props),{value:this.reference.ref.args,readonly:this.readonly,disabled:this.disabled,focusOnOpen:this.focusOnOpen,onChange:this.handleChange})}):null}get reference(){return this.value?a(this.value):void 0}};y.style=":host{display:block;padding:1rem;min-width:24rem}";export{y as R,s as c,l as g}
1
+ import{r as n,c as t,h as e}from"./p-f_mBf1UZ.js";import{L as o}from"./p-CCeLGIvD.js";const i={all:{type:"all",negated:!1},any:{type:"any",negated:!1},"not-all":{type:"all",negated:!0},none:{type:"any",negated:!0}},r={all:"not-all",any:"none","not-all":"all",none:"any"};function s(n){return{describe:(t,e)=>function(n,t,e){const o=e.issues().get(n),i=l(n);if(i)return{kind:"group",combinator:i.combinator,children:i.rules,issues:o};const r=a(n);return r?function(n,t,e,o){const{ref:i,negated:r}=n,s=e.metadata.get(i.id),l=e.created().has(i),a=null==s?void 0:s.configComponent;return{kind:"leaf",chip:{label:c(i,e),icon:f(s),invalid:!s||!!(null==o?void 0:o.length),component:{name:"limebb-rule-condition-chip",props:{negated:r,iconColor:p(s)}}},negated:r,issues:o,autoOpen:l&&!!a,editor:a&&{name:"limebb-rule-condition-editor",props:{configComponent:a,focusOnOpen:l&&!t.visited}}}}(r,t,e,o):function(n,t,e){var o;return{kind:"leaf",chip:{label:null!==(o=d(n))&&void 0!==o?o:"…",icon:"question",invalid:!0,component:{name:"limebb-rule-condition-chip"}},issues:(null==e?void 0:e.length)?e:[t.translate("webclient.rule-editor.unreadable-condition","This condition cannot be read, and so cannot be edited here.")]}}(n,e,o)}(t,e,n),group:h,negate:b,createLeaf:t=>{var e;const o={type:"ref",id:String(null!==(e=null==t?void 0:t.value)&&void 0!==e?e:"")};return n.created().add(o),o}}}function l(n){if(!u(n))return;if("all"===n.type||"any"===n.type)return Array.isArray(n.rules)?{combinator:n.type,rules:n.rules}:void 0;if("not"!==n.type)return;const t=l(n.rule);return t?{combinator:r[t.combinator],rules:t.rules}:void 0}function a(n){if(u(n))return"ref"===n.type?{ref:n,negated:!1}:"not"===n.type&&u(n.rule)&&"ref"===n.rule.type?{ref:n.rule,negated:!0}:void 0}function u(n){return"object"==typeof n&&null!==n}function c(n,t){return t.titles.get(n.id)||n.id||"…"}function d(n){if(!u(n))return;const t=n.type;return"string"==typeof t&&t?t:void 0}function f(n){return n?n.icon?"string"==typeof n.icon?n.icon:n.icon.name:void 0:"question"}function p(n){return"object"==typeof(null==n?void 0:n.icon)?n.icon.color:void 0}function h(n,t){const e={type:i[n].type,rules:[...t]};return i[n].negated?{type:"not",rule:e}:e}function b(n,t){return t?"not"===n.type?n:{type:"not",rule:n}:"not"===n.type?n.rule:n}const g=class{constructor(e){n(this,e),this.conditionChange=t(this,"conditionChange"),this.focusOnOpen=!1,this.readonly=!1,this.disabled=!1,this.handleChange=n=>{n.stopPropagation();const t=this.reference;if(!t)return;const e=Object.assign(Object.assign({},t.ref),{args:n.detail});this.conditionChange.emit(t.negated?{type:"not",rule:e}:e)}}render(){return this.configComponent&&this.reference?e(o,{class:"editor",platform:this.platform,context:this.context,name:this.configComponent.name,props:Object.assign(Object.assign({},this.configComponent.props),{value:this.reference.ref.args,readonly:this.readonly,disabled:this.disabled,focusOnOpen:this.focusOnOpen,onChange:this.handleChange})}):null}get reference(){return this.value?a(this.value):void 0}};g.style=":host{display:block;padding:1rem;min-width:24rem}";export{g as R,s as c,l as g}
@@ -1 +1 @@
1
- import{i as n,a as r}from"./p-DhGRAeCH.js";function o(n){var r;return(o=(null===(r=null==n?void 0:n.ui)||void 0===r?void 0:r.color)||"rgb(var(--color-gray-default))").startsWith("lime-")?`var(--${o})`:o;var o}function t(n){var r;return{name:(null===(r=null==n?void 0:n.ui)||void 0===r?void 0:r.icon)||"decision",color:o(n)}}function i(n,r){return n.label===r}function e(o){return n(o)&&!r(o)}function u(n,r){return Object.values(n.properties).find((n=>n&&n.relation&&i(n.relation.getLimetype(),r)))}function l(n,r){const o=u(n,r);return!!o&&e(o)}function v(n){var r,o,t;const{targetLimetype:i,currentLimetype:e,contextLimetypeName:u,contextId:l,propertyName:v}=n;if(i&&u&&l){if(v){const n=null===(o=null===(r=null==e?void 0:e.getProperty(v))||void 0===r?void 0:r.relation)||void 0===o?void 0:o.getBackreference();if(n)return n.name}return null===(t=Object.values(i.properties).find((n=>{var r;return(null===(r=n.relation)||void 0===r?void 0:r.getLimetype().name)===u})))||void 0===t?void 0:t.name}}export{v as a,i as b,u as c,t as g,l as h,e as i}
1
+ import{i as n,a as r}from"./p-B6a_-5iN.js";function o(n){var r;return(o=(null===(r=null==n?void 0:n.ui)||void 0===r?void 0:r.color)||"rgb(var(--color-gray-default))").startsWith("lime-")?`var(--${o})`:o;var o}function t(n){var r;return{name:(null===(r=null==n?void 0:n.ui)||void 0===r?void 0:r.icon)||"decision",color:o(n)}}function i(n,r){return n.label===r}function e(o){return n(o)&&!r(o)}function u(n,r){return Object.values(n.properties).find((n=>n&&n.relation&&i(n.relation.getLimetype(),r)))}function l(n,r){const o=u(n,r);return!!o&&e(o)}function v(n){var r,o,t;const{targetLimetype:i,currentLimetype:e,contextLimetypeName:u,contextId:l,propertyName:v}=n;if(i&&u&&l){if(v){const n=null===(o=null===(r=null==e?void 0:e.getProperty(v))||void 0===r?void 0:r.relation)||void 0===o?void 0:o.getBackreference();if(n)return n.name}return null===(t=Object.values(i.properties).find((n=>{var r;return(null===(r=n.relation)||void 0===r?void 0:r.getLimetype().name)===u})))||void 0===t?void 0:t.name}}export{v as a,i as b,u as c,t as g,l as h,e as i}
@@ -0,0 +1 @@
1
+ import{o as n}from"./p-B6a_-5iN.js";const t=[[n.EQUALS,"equals"],[n.NOT_EQUALS,"not-equals"],[n.GREATER,"greater-than"],[n.GREATER_OR_EQUAL,"greater-than-or-equal"],[n.LESS,"less-than"],[n.LESS_OR_EQUAL,"less-than-or-equal"],[n.IN,"in-filter-set"],[n.LIKE,"contains"],[n.BEGINS,"begins-with"],[n.ENDS,"ends-with"]];function r(n){var r;return null===(r=t.find((([,t])=>t===n)))||void 0===r?void 0:r[0]}function a(n){return n.map((n=>{var r;return null===(r=t.find((([t])=>t===n)))||void 0===r?void 0:r[1]})).filter((n=>void 0!==n))}function e(n){if(n)return a([n])[0]}export{e as a,r as c,a as o}
@@ -1 +1 @@
1
- import{r as t,c as o,h as i}from"./p-BK566_jX.js";import{L as e}from"./p-Cve-3L4y.js";import{n}from"./p-DhGRAeCH.js";import{g as r}from"./p-BsH0YW6Z.js";import"./p-BgAfMcRA.js";import"./p-6PYziigk.js";const s=class{constructor(i){t(this,i),this.change=o(this,"change"),this.value={},this.type="component",this.configViewType="code",this.findConfigComponent=t=>{var o,i;return"component"===this.type?null===(o=this.registry.getAll().find((o=>o.name===t)))||void 0===o?void 0:o.configComponent:"command"===this.type?null===(i=this.commandbus.getAll().find((o=>o.id===t)))||void 0===i?void 0:i.configComponent:void 0},this.handleChangeMode=t=>{t.stopPropagation(),this.configViewType=t.detail.id},this.handleCodeEditorChange=t=>{t.stopPropagation();try{const o=JSON.parse(t.detail);this.change.emit(o)}catch(t){}}}componentWillLoad(){this.configComponent=this.getComponentName()}componentShouldUpdate(t,o,i){return"formInfo"!==i}watchFormInfo(){this.configComponent=this.getComponentName()}watchconfigComponent(t,o){t&&!o&&(this.configViewType="config"),t||(this.configViewType="code")}getComponentName(){var t,o,i;const e=[...null!==(o=null===(t=this.formInfo)||void 0===t?void 0:t.schemaPath.slice(0,-1))&&void 0!==o?o:[],this.getNameField()],n=r(null===(i=this.formInfo)||void 0===i?void 0:i.rootValue,e),s=this.findConfigComponent(n);if(s&&customElements.get(s.name))return s}getSiblingPickerTags(){var t,o,i,e,n;const s=null===(t=this.formInfo)||void 0===t?void 0:t.rootSchema,l=null===(o=this.formInfo)||void 0===o?void 0:o.schemaPath;if(!s||!l)return;const d=l.slice(0,-1).flatMap((t=>["properties",t])),h=r(s,[...d,"properties"]);if(h&&"object"==typeof h)for(const t of Object.keys(h)){const o=null===(e=null===(i=h[t])||void 0===i?void 0:i.lime)||void 0===e?void 0:e.component;if("limebb-component-picker"===(null==o?void 0:o.name)&&Array.isArray(null===(n=null==o?void 0:o.props)||void 0===n?void 0:n.tags))return o.props.tags}}render(){return[this.renderHeader(),this.renderContent()]}renderHeader(){let t=[];return this.configComponent&&(t=[{id:"config",title:"Config",selected:"config"===this.configViewType},{id:"code",title:"Code",selected:"code"===this.configViewType}]),i("limel-header",{icon:"edit_property",heading:this.label,subheading:this.helperText},i("limel-button-group",{slot:"actions",value:t,onChange:this.handleChangeMode}))}renderContent(){return"config"===this.configViewType?this.renderConfigComponent():this.renderCodeEditor()}renderCodeEditor(){return i("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 t,o;const n=this.getSiblingPickerTags();return i(e,{class:"config-component",platform:this.platform,context:this.context,name:null===(t=this.configComponent)||void 0===t?void 0:t.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,tags:n})})}getNameField(){return this.nameField?this.nameField:{component:"name",command:"id"}[this.type]}get registry(){return this.platform.get(n.WebComponentRegistry)}get commandbus(){return this.platform.get(n.CommandBus)}static get watchers(){return{formInfo:[{watchFormInfo:0}],configComponent:[{watchconfigComponent:0}]}}};s.style=":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))}";export{s as limebb_component_config}
1
+ import{r as t,c as o,h as i}from"./p-f_mBf1UZ.js";import{L as e}from"./p-CCeLGIvD.js";import{n}from"./p-B6a_-5iN.js";import{g as r}from"./p-BsH0YW6Z.js";import"./p-BgAfMcRA.js";import"./p-6PYziigk.js";const s=class{constructor(i){t(this,i),this.change=o(this,"change"),this.value={},this.type="component",this.configViewType="code",this.findConfigComponent=t=>{var o,i;return"component"===this.type?null===(o=this.registry.getAll().find((o=>o.name===t)))||void 0===o?void 0:o.configComponent:"command"===this.type?null===(i=this.commandbus.getAll().find((o=>o.id===t)))||void 0===i?void 0:i.configComponent:void 0},this.handleChangeMode=t=>{t.stopPropagation(),this.configViewType=t.detail.id},this.handleCodeEditorChange=t=>{t.stopPropagation();try{const o=JSON.parse(t.detail);this.change.emit(o)}catch(t){}}}componentWillLoad(){this.configComponent=this.getComponentName()}componentShouldUpdate(t,o,i){return"formInfo"!==i}watchFormInfo(){this.configComponent=this.getComponentName()}watchconfigComponent(t,o){t&&!o&&(this.configViewType="config"),t||(this.configViewType="code")}getComponentName(){var t,o,i;const e=[...null!==(o=null===(t=this.formInfo)||void 0===t?void 0:t.schemaPath.slice(0,-1))&&void 0!==o?o:[],this.getNameField()],n=r(null===(i=this.formInfo)||void 0===i?void 0:i.rootValue,e),s=this.findConfigComponent(n);if(s&&customElements.get(s.name))return s}getSiblingPickerTags(){var t,o,i,e,n;const s=null===(t=this.formInfo)||void 0===t?void 0:t.rootSchema,l=null===(o=this.formInfo)||void 0===o?void 0:o.schemaPath;if(!s||!l)return;const d=l.slice(0,-1).flatMap((t=>["properties",t])),h=r(s,[...d,"properties"]);if(h&&"object"==typeof h)for(const t of Object.keys(h)){const o=null===(e=null===(i=h[t])||void 0===i?void 0:i.lime)||void 0===e?void 0:e.component;if("limebb-component-picker"===(null==o?void 0:o.name)&&Array.isArray(null===(n=null==o?void 0:o.props)||void 0===n?void 0:n.tags))return o.props.tags}}render(){return[this.renderHeader(),this.renderContent()]}renderHeader(){let t=[];return this.configComponent&&(t=[{id:"config",title:"Config",selected:"config"===this.configViewType},{id:"code",title:"Code",selected:"code"===this.configViewType}]),i("limel-header",{icon:"edit_property",heading:this.label,subheading:this.helperText},i("limel-button-group",{slot:"actions",value:t,onChange:this.handleChangeMode}))}renderContent(){return"config"===this.configViewType?this.renderConfigComponent():this.renderCodeEditor()}renderCodeEditor(){return i("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 t,o;const n=this.getSiblingPickerTags();return i(e,{class:"config-component",platform:this.platform,context:this.context,name:null===(t=this.configComponent)||void 0===t?void 0:t.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,tags:n})})}getNameField(){return this.nameField?this.nameField:{component:"name",command:"id"}[this.type]}get registry(){return this.platform.get(n.WebComponentRegistry)}get commandbus(){return this.platform.get(n.CommandBus)}static get watchers(){return{formInfo:[{watchFormInfo:0}],configComponent:[{watchconfigComponent:0}]}}};s.style=":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))}";export{s as limebb_component_config}
@@ -1 +1 @@
1
- import{r as t,h as e,g as i}from"./p-BK566_jX.js";import{n as r,o as s,p as o,h as n,I as a,s as l}from"./p-DhGRAeCH.js";import{a as h}from"./p-7DQ7qvMa.js";class u{constructor(t){this.getState=t,this.contextType="info-tile"}getContext(){const{limetype:t,filterId:e,filterName:i,aggregateOperator:r,propertyName:s,value:o,label:n}=this.getState();if(!t||!e)return console.debug("InfoTileContextProvider: No limetype or filterId available"),null;const a={widgetType:"info-tile",limetype:t,filterId:e};return i&&(a.filterName=i),a.aggregateOperator=r,s&&(a.propertyName=s),void 0!==o&&(a.value=o),n&&(a.label=n),{data:a,purpose:"Shows an aggregated value from a filter. Clicking navigates to the explorer with that filter applied."}}}class c{constructor(t,e=[]){this.platform=t,this.filters=e}async load(t,e){let i;return i=this.isObjectIdentifier(e)?await this.loadLimeObjectInfoTile(t,e):await this.loadBasicInfoTile(t),i}async loadBasicInfoTile(t){var e;const i=this.getFilter(t.filter);if(!i)throw new Error(`Filter "${t.filter}" not found`);return null!==(e=(await this.query.execute({limetype:i.limetype,responseFormat:{aggregates:{infotiles:{value:{op:t.operator,key:t.name}}}},filter:i.filter})).aggregates.infotiles[0].value)&&void 0!==e?e:0}async loadLimeObjectInfoTile(t,e){await this.objectRepository.loadObject(e.limetype,e.id,{properties:[t]});const i=this.objectRepository.getObject(e.limetype,e.id);return null==i?void 0:i.getValue([t.name,t.key].join("."))}isObjectIdentifier(t){return Boolean((null==t?void 0:t.limetype)&&(null==t?void 0:t.id))}getFilter(t){return this.filters.find((e=>e.id===t))}get query(){return this.platform.get(r.Query)}get objectRepository(){return this.platform.get(r.LimeObjectRepository)}}function f(t,e){return t&&(t[e]||t.en||t.en_us)||""}function d(t,e=[]){const{path:i,query:r}=function(t,e=[]){if(!t)return{path:"#"};const i=["explorer",t.limetype,t.id].join("/"),r=function(t,e){const i=[...e,t].filter((t=>void 0!==t));if(0!==i.length)return 1===i.length?i[0]:{op:s.AND,exp:i}}(t.filter,e);return r?{path:i,query:{filter:r}}:{path:i}}(t,e);return r?`${i}?${Object.entries(r).map((([t,e])=>`${t}=${encodeURIComponent(JSON.stringify(e))}`)).join("&")}`:i}class p{constructor(t){this.locale=t}format(t){let e=String(t);return"number"==typeof t?e=new Intl.NumberFormat(this.locale).format(t):new Date(t).getTime()&&(e=new Intl.DateTimeFormat(this.locale).format(new Date(t))),{value:e}}}class v{constructor(t){this.locale=t}format(t,e){const i=new Date(t);return{prefix:this.formatAffix("prefix",i,e),value:this.formatValue(i,e),suffix:this.formatAffix("suffix",i,e)}}formatValue(t,e){const i=Object.assign({},e.options);if(e.prefix)for(const t of e.prefix)delete i[t];if(e.suffix)for(const t of e.suffix)delete i[t];return new Intl.DateTimeFormat(this.locale,i).format(t)}formatAffix(t,e,i){const r=Object.assign({},i.options);for(const e of Object.keys(r))"hour12"!==e&&((i[t]||[]).includes(e)||delete r[e]);if(0!==Object.values(r).filter(Boolean).length)return new Intl.DateTimeFormat(this.locale,r).format(e)}}class g{constructor(t){this.locale=t}format(t,e){var i,r;const s=new Intl.NumberFormat(this.locale,e.options),o=s.formatToParts(t);let n="",a="",l="";for(const t of o)(null===(i=e.prefix)||void 0===i?void 0:i.includes(t.type))?n+=t.value:(null===(r=e.suffix)||void 0===r?void 0:r.includes(t.type))?l+=t.value:a+=t.value;return a||(a=s.format(t),n="",l=""),{prefix:n,value:a,suffix:l}}}class m{constructor(t){this.locale=t}format(t,e){const i=new Intl.RelativeTimeFormat(this.locale,e.options),{value:r,unit:s}=this.getRelativeTime(t),o=i.formatToParts(r,s);let n="",a="",l="";for(const t of o)"literal"!==t.type||a?"literal"===t.type&&a?l+=t.value:a+=t.value:n+=t.value;return a||(a=n||l,n="",l=""),{prefix:n,value:a,suffix:l}}getRelativeTime(t){const e=new Date(t),i=new Date,r=e.getTime()-i.getTime(),s=[{unit:"year",value:31536e6},{unit:"month",value:2592e6},{unit:"week",value:6048e5},{unit:"day",value:864e5},{unit:"hour",value:36e5},{unit:"minute",value:6e4},{unit:"second",value:1e3}];for(const t of s){const e=r/t.value;if(Math.abs(e)>=1)return{value:Math.round(e),unit:t.unit}}return{value:0,unit:"second"}}}class b{constructor(t){this.locale=t}createFormatter(t,e){return"number"===(null==t?void 0:t.type)&&"number"==typeof e?new g(this.locale):"date"===(null==t?void 0:t.type)&&"string"==typeof e?new v(this.locale):"relative-date"===(null==t?void 0:t.type)&&"string"==typeof e?new m(this.locale):new p(this.locale)}}var y=function(t,e,i,r){var s,o=arguments.length,n=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(o<3?s(n):o>3?s(e,i,n):s(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};const w=class{constructor(e){t(this,e),this.aggregateOperator=l.Count,this.loading=!1,this.error=!1}get hostElement(){return this.host}connectedCallback(){this.registerContextProvider()}disconnectedCallback(){var t;null===(t=this.unregisterContextProvider)||void 0===t||t.call(this)}componentWillLoad(){this.loadInfoTileValue()}watchFilterId(){this.loadInfoTileValue()}watchPropertyName(){this.loadInfoTileValue()}watchAggregateOperator(){this.loadInfoTileValue()}async loadInfoTileValue(){if(this.loading=!0,this.error=!1,this.getFilter()){try{const t={key:this.getKey(),name:this.propertyName,operator:this.aggregateOperator,filter:this.filterId};this.value=await this.loader.load(t,this.context)}catch(t){console.error(t),this.error=!0}this.loading=!1}else this.error=!0}getKey(){return Math.random().toString(36).slice(2)}render(){var t,i;const r=this.getFilter(),s=this.getFormattedValue(),o={disabled:this.disabled,icon:this.icon,prefix:(null===(t=null==s?void 0:s.prefix)||void 0===t?void 0:t.trim())||this.prefix,suffix:(null===(i=null==s?void 0:s.suffix)||void 0===i?void 0:i.trim())||this.suffix,reducedPresence:this.shouldReducePresence()},n=Object.assign(Object.assign({},o),{icon:"error",prefix:"ERROR",loading:!0,label:this.getLabel(r)}),a=Object.assign(Object.assign({},o),{label:this.getLabel(r),link:this.getLink(r),loading:this.loading,value:null==s?void 0:s.value.trim()});return e("limel-info-tile",Object.assign({key:"50e9fba6bf058bc41f8596f42fba5b2a20762adc",class:{error:!r||this.error}},!r||this.error?n:a))}shouldReducePresence(){if(this.reducedPresence)return!0;if(!this.reducedPresenceRule||this.loading)return!1;try{return this.ruleRegistry.compile(this.reducedPresenceRule).evaluate(this.ruleRegistry.scope({host:this.hostElement,with:{scalarValue:this.value}}))}catch(t){return!1}}getFormattedValue(){if(!this.value&&0!==this.value)return{value:""};try{return this.getFormatter(this.value).format(this.value,this.format)}catch(t){return new p(this.language).format(this.value)}}getLabel(t){return t?"string"==typeof this.label?this.translator.get(this.label):f(this.label&&"object"==typeof this.label?this.label:t.name,this.language):"No filter set is selected"}getLink(t){const e=h({targetLimetype:t?this.limetypes[t.limetype]:void 0,currentLimetype:this.context.limetype?this.limetypes[this.context.limetype]:void 0,contextLimetypeName:this.context.limetype,contextId:this.context.id,propertyName:this.propertyName});return{href:d(t,e&&this.context.id?[{key:e,op:s.EQUALS,exp:this.context.id}]:[])}}getFilter(){return function(t,e){if(t&&e)return t.find((t=>t.id===e))}(this.filters,this.filterId)}getFormatter(t){return new b(this.language).createFormatter(this.format,t)}get translator(){return this.platform.get(r.Translate)}get ruleRegistry(){return this.platform.get(r.RuleRegistry)}get language(){return this.platform.get(r.Application).getLanguage()}get loader(){return new c(this.platform,this.filters)}registerContextProvider(){const t=this.platform.get(r.AIContextRegistry);if(!(null==t?void 0:t.register))return;const e=new u((()=>{const t=this.getFilter();return{limetype:null==t?void 0:t.limetype,filterId:this.filterId,filterName:t?f(t.name,this.language):void 0,aggregateOperator:this.aggregateOperator,propertyName:this.propertyName,value:this.value,label:this.getLabel(t)}}));this.unregisterContextProvider=t.register(e,this.hostElement)}get host(){return i(this)}static get watchers(){return{filterId:[{watchFilterId:0}],propertyName:[{watchPropertyName:0}],aggregateOperator:[{watchAggregateOperator:0}]}}};y([o({})],w.prototype,"config",void 0),y([n()],w.prototype,"filters",void 0),y([a()],w.prototype,"limetypes",void 0),w.style=":host(limebb-info-tile){display:block;overflow:visible !important;background-color:transparent !important}limel-info-tile.error{--info-tile-icon-color:rgb(var(--color-red-dark));border:1px dashed rgb(var(--contrast-500));border-radius:var(--info-tile-border-radius, 1rem)}";export{w as limebb_info_tile}
1
+ import{r as t,h as e,g as i}from"./p-f_mBf1UZ.js";import{n as r,o as s,p as o,h as n,I as a,s as l}from"./p-B6a_-5iN.js";import{a as h}from"./p-DcORJz0y.js";class u{constructor(t){this.getState=t,this.contextType="info-tile"}getContext(){const{limetype:t,filterId:e,filterName:i,aggregateOperator:r,propertyName:s,value:o,label:n}=this.getState();if(!t||!e)return console.debug("InfoTileContextProvider: No limetype or filterId available"),null;const a={widgetType:"info-tile",limetype:t,filterId:e};return i&&(a.filterName=i),a.aggregateOperator=r,s&&(a.propertyName=s),void 0!==o&&(a.value=o),n&&(a.label=n),{data:a,purpose:"Shows an aggregated value from a filter. Clicking navigates to the explorer with that filter applied."}}}class c{constructor(t,e=[]){this.platform=t,this.filters=e}async load(t,e){let i;return i=this.isObjectIdentifier(e)?await this.loadLimeObjectInfoTile(t,e):await this.loadBasicInfoTile(t),i}async loadBasicInfoTile(t){var e;const i=this.getFilter(t.filter);if(!i)throw new Error(`Filter "${t.filter}" not found`);return null!==(e=(await this.query.execute({limetype:i.limetype,responseFormat:{aggregates:{infotiles:{value:{op:t.operator,key:t.name}}}},filter:i.filter})).aggregates.infotiles[0].value)&&void 0!==e?e:0}async loadLimeObjectInfoTile(t,e){await this.objectRepository.loadObject(e.limetype,e.id,{properties:[t]});const i=this.objectRepository.getObject(e.limetype,e.id);return null==i?void 0:i.getValue([t.name,t.key].join("."))}isObjectIdentifier(t){return Boolean((null==t?void 0:t.limetype)&&(null==t?void 0:t.id))}getFilter(t){return this.filters.find((e=>e.id===t))}get query(){return this.platform.get(r.Query)}get objectRepository(){return this.platform.get(r.LimeObjectRepository)}}function f(t,e){return t&&(t[e]||t.en||t.en_us)||""}function d(t,e=[]){const{path:i,query:r}=function(t,e=[]){if(!t)return{path:"#"};const i=["explorer",t.limetype,t.id].join("/"),r=function(t,e){const i=[...e,t].filter((t=>void 0!==t));if(0!==i.length)return 1===i.length?i[0]:{op:s.AND,exp:i}}(t.filter,e);return r?{path:i,query:{filter:r}}:{path:i}}(t,e);return r?`${i}?${Object.entries(r).map((([t,e])=>`${t}=${encodeURIComponent(JSON.stringify(e))}`)).join("&")}`:i}class p{constructor(t){this.locale=t}format(t){let e=String(t);return"number"==typeof t?e=new Intl.NumberFormat(this.locale).format(t):new Date(t).getTime()&&(e=new Intl.DateTimeFormat(this.locale).format(new Date(t))),{value:e}}}class v{constructor(t){this.locale=t}format(t,e){const i=new Date(t);return{prefix:this.formatAffix("prefix",i,e),value:this.formatValue(i,e),suffix:this.formatAffix("suffix",i,e)}}formatValue(t,e){const i=Object.assign({},e.options);if(e.prefix)for(const t of e.prefix)delete i[t];if(e.suffix)for(const t of e.suffix)delete i[t];return new Intl.DateTimeFormat(this.locale,i).format(t)}formatAffix(t,e,i){const r=Object.assign({},i.options);for(const e of Object.keys(r))"hour12"!==e&&((i[t]||[]).includes(e)||delete r[e]);if(0!==Object.values(r).filter(Boolean).length)return new Intl.DateTimeFormat(this.locale,r).format(e)}}class g{constructor(t){this.locale=t}format(t,e){var i,r;const s=new Intl.NumberFormat(this.locale,e.options),o=s.formatToParts(t);let n="",a="",l="";for(const t of o)(null===(i=e.prefix)||void 0===i?void 0:i.includes(t.type))?n+=t.value:(null===(r=e.suffix)||void 0===r?void 0:r.includes(t.type))?l+=t.value:a+=t.value;return a||(a=s.format(t),n="",l=""),{prefix:n,value:a,suffix:l}}}class m{constructor(t){this.locale=t}format(t,e){const i=new Intl.RelativeTimeFormat(this.locale,e.options),{value:r,unit:s}=this.getRelativeTime(t),o=i.formatToParts(r,s);let n="",a="",l="";for(const t of o)"literal"!==t.type||a?"literal"===t.type&&a?l+=t.value:a+=t.value:n+=t.value;return a||(a=n||l,n="",l=""),{prefix:n,value:a,suffix:l}}getRelativeTime(t){const e=new Date(t),i=new Date,r=e.getTime()-i.getTime(),s=[{unit:"year",value:31536e6},{unit:"month",value:2592e6},{unit:"week",value:6048e5},{unit:"day",value:864e5},{unit:"hour",value:36e5},{unit:"minute",value:6e4},{unit:"second",value:1e3}];for(const t of s){const e=r/t.value;if(Math.abs(e)>=1)return{value:Math.round(e),unit:t.unit}}return{value:0,unit:"second"}}}class b{constructor(t){this.locale=t}createFormatter(t,e){return"number"===(null==t?void 0:t.type)&&"number"==typeof e?new g(this.locale):"date"===(null==t?void 0:t.type)&&"string"==typeof e?new v(this.locale):"relative-date"===(null==t?void 0:t.type)&&"string"==typeof e?new m(this.locale):new p(this.locale)}}var y=function(t,e,i,r){var s,o=arguments.length,n=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(o<3?s(n):o>3?s(e,i,n):s(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};const w=class{constructor(e){t(this,e),this.aggregateOperator=l.Count,this.loading=!1,this.error=!1}get hostElement(){return this.host}connectedCallback(){this.registerContextProvider()}disconnectedCallback(){var t;null===(t=this.unregisterContextProvider)||void 0===t||t.call(this)}componentWillLoad(){this.loadInfoTileValue()}watchFilterId(){this.loadInfoTileValue()}watchPropertyName(){this.loadInfoTileValue()}watchAggregateOperator(){this.loadInfoTileValue()}async loadInfoTileValue(){if(this.loading=!0,this.error=!1,this.getFilter()){try{const t={key:this.getKey(),name:this.propertyName,operator:this.aggregateOperator,filter:this.filterId};this.value=await this.loader.load(t,this.context)}catch(t){console.error(t),this.error=!0}this.loading=!1}else this.error=!0}getKey(){return Math.random().toString(36).slice(2)}render(){var t,i;const r=this.getFilter(),s=this.getFormattedValue(),o={disabled:this.disabled,icon:this.icon,prefix:(null===(t=null==s?void 0:s.prefix)||void 0===t?void 0:t.trim())||this.prefix,suffix:(null===(i=null==s?void 0:s.suffix)||void 0===i?void 0:i.trim())||this.suffix,reducedPresence:this.shouldReducePresence()},n=Object.assign(Object.assign({},o),{icon:"error",prefix:"ERROR",loading:!0,label:this.getLabel(r)}),a=Object.assign(Object.assign({},o),{label:this.getLabel(r),link:this.getLink(r),loading:this.loading,value:null==s?void 0:s.value.trim()});return e("limel-info-tile",Object.assign({key:"50e9fba6bf058bc41f8596f42fba5b2a20762adc",class:{error:!r||this.error}},!r||this.error?n:a))}shouldReducePresence(){if(this.reducedPresence)return!0;if(!this.reducedPresenceRule||this.loading)return!1;try{return this.ruleRegistry.compile(this.reducedPresenceRule).evaluate(this.ruleRegistry.scope({host:this.hostElement,with:{scalarValue:this.value}}))}catch(t){return!1}}getFormattedValue(){if(!this.value&&0!==this.value)return{value:""};try{return this.getFormatter(this.value).format(this.value,this.format)}catch(t){return new p(this.language).format(this.value)}}getLabel(t){return t?"string"==typeof this.label?this.translator.get(this.label):f(this.label&&"object"==typeof this.label?this.label:t.name,this.language):"No filter set is selected"}getLink(t){const e=h({targetLimetype:t?this.limetypes[t.limetype]:void 0,currentLimetype:this.context.limetype?this.limetypes[this.context.limetype]:void 0,contextLimetypeName:this.context.limetype,contextId:this.context.id,propertyName:this.propertyName});return{href:d(t,e&&this.context.id?[{key:e,op:s.EQUALS,exp:this.context.id}]:[])}}getFilter(){return function(t,e){if(t&&e)return t.find((t=>t.id===e))}(this.filters,this.filterId)}getFormatter(t){return new b(this.language).createFormatter(this.format,t)}get translator(){return this.platform.get(r.Translate)}get ruleRegistry(){return this.platform.get(r.RuleRegistry)}get language(){return this.platform.get(r.Application).getLanguage()}get loader(){return new c(this.platform,this.filters)}registerContextProvider(){const t=this.platform.get(r.AIContextRegistry);if(!(null==t?void 0:t.register))return;const e=new u((()=>{const t=this.getFilter();return{limetype:null==t?void 0:t.limetype,filterId:this.filterId,filterName:t?f(t.name,this.language):void 0,aggregateOperator:this.aggregateOperator,propertyName:this.propertyName,value:this.value,label:this.getLabel(t)}}));this.unregisterContextProvider=t.register(e,this.hostElement)}get host(){return i(this)}static get watchers(){return{filterId:[{watchFilterId:0}],propertyName:[{watchPropertyName:0}],aggregateOperator:[{watchAggregateOperator:0}]}}};y([o({})],w.prototype,"config",void 0),y([n()],w.prototype,"filters",void 0),y([a()],w.prototype,"limetypes",void 0),w.style=":host(limebb-info-tile){display:block;overflow:visible !important;background-color:transparent !important}limel-info-tile.error{--info-tile-icon-color:rgb(var(--color-red-dark));border:1px dashed rgb(var(--contrast-500));border-radius:var(--info-tile-border-radius, 1rem)}";export{w as limebb_info_tile}
@@ -1 +1 @@
1
- import{r as t,c as i,h as e}from"./p-BK566_jX.js";import{n as s}from"./p-DhGRAeCH.js";const h=class{constructor(e){t(this,e),this.change=i(this,"change"),this.disabled=!1,this.readonly=!1,this.invalid=!1,this.required=!1,this.type="datetime",this.shouldEmitValueAsString=!0,this.handleChange=t=>{if(!t.detail)return;t.stopPropagation();const i=(e=t.detail,"datetime"===(s=this.type)||"time"===s?e:new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())));var e,s;this.change.emit(this.shouldEmitValueAsString?i.toISOString():i)},this.formatter=t=>this.dateTimeFormatter.format(t,r[this.type]||this.type)}render(){return this.language||(this.language=this.getAppLanguage()),this.value&&(this.shouldEmitValueAsString="string"==typeof this.value),e("limel-date-picker",{key:"5b73d026cdc90f74cab3889f75a1049152db9281",disabled:this.disabled,readonly:this.readonly,invalid:this.invalid,label:this.label,placeholder:this.placeholder,helperText:this.helperText,required:this.required,value:this.parseDateValue(),type:this.type,language:this.language,formatter:this.formatter,onChange:this.handleChange})}parseDateValue(){const t=this.value;if(t)return this.dateTimeFormatter.parse(t,r[this.type]||this.type)}get dateTimeFormatter(){return this.platform.get(s.DateTimeFormatter)}getAppLanguage(){const t=this.platform.get(s.Translate),i=this.platform.get(s.Application);let e;var h;return e="function"==typeof(null==(h=t)?void 0:h.getLanguage)?t.getLanguage():i.getLanguage(),n(e)?e:"en"}},r={datetime:"time",time:"timeofday"},a=new Set(["da","de","en","fi","fr","nb","no","nl","sv"]),n=t=>a.has(t);export{h as limebb_date_picker}
1
+ import{r as t,c as i,h as e}from"./p-f_mBf1UZ.js";import{n as s}from"./p-B6a_-5iN.js";const h=class{constructor(e){t(this,e),this.change=i(this,"change"),this.disabled=!1,this.readonly=!1,this.invalid=!1,this.required=!1,this.type="datetime",this.shouldEmitValueAsString=!0,this.handleChange=t=>{if(!t.detail)return;t.stopPropagation();const i=(e=t.detail,"datetime"===(s=this.type)||"time"===s?e:new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())));var e,s;this.change.emit(this.shouldEmitValueAsString?i.toISOString():i)},this.formatter=t=>this.dateTimeFormatter.format(t,a[this.type]||this.type)}render(){return this.language||(this.language=this.getAppLanguage()),this.value&&(this.shouldEmitValueAsString="string"==typeof this.value),e("limel-date-picker",{key:"5b73d026cdc90f74cab3889f75a1049152db9281",disabled:this.disabled,readonly:this.readonly,invalid:this.invalid,label:this.label,placeholder:this.placeholder,helperText:this.helperText,required:this.required,value:this.parseDateValue(),type:this.type,language:this.language,formatter:this.formatter,onChange:this.handleChange})}parseDateValue(){const t=this.value;if(t)return this.dateTimeFormatter.parse(t,a[this.type]||this.type)}get dateTimeFormatter(){return this.platform.get(s.DateTimeFormatter)}getAppLanguage(){const t=this.platform.get(s.Translate),i=this.platform.get(s.Application);let e;var h;return e="function"==typeof(null==(h=t)?void 0:h.getLanguage)?t.getLanguage():i.getLanguage(),n(e)?e:"en"}},a={datetime:"time",time:"timeofday"},r=new Set(["da","de","en","fi","fr","nb","no","nl","sv"]),n=t=>r.has(t);export{h as limebb_date_picker}
@@ -0,0 +1 @@
1
+ import{r as e,c as t,h as i}from"./p-f_mBf1UZ.js";import{M as o}from"./p-B6a_-5iN.js";const s=class{constructor(i){e(this,i),this.change=t(this,"change"),this.value={},this.handleExpressionChange=e=>{e.stopPropagation(),this.change.emit({expression:e.detail})}}render(){var e,t;const o=null===(e=this.resolvedContext)||void 0===e?void 0:e.limetype;return o?i("limebb-lime-query-filter-builder",{platform:this.platform,context:this.context,limetype:o,expression:null===(t=this.value)||void 0===t?void 0:t.expression,onExpressionChange:this.handleExpressionChange}):i("limel-callout",{type:"note"},"Select a limetype on the surface to author a filter.")}};(function(e,t,i,o){var s,r=arguments.length,l=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(l=(r<3?s(l):r>3?s(t,i,l):s(t,i))||l);r>3&&l&&Object.defineProperty(t,i,l)})([o("context")],s.prototype,"resolvedContext",void 0),s.style=":host{display:block}";export{s as limebb_rule_arg_filter_editor}
@@ -1 +1 @@
1
- import{r as i,c as e,h as t,H as r}from"./p-BK566_jX.js";import{I as s}from"./p-DhGRAeCH.js";import{i as o}from"./p-B7whyaAL.js";import"./p-CQUZjrU4.js";const l=class{constructor(t){i(this,t),this.change=e(this,"change"),this.mode="visual",this.codeValue="",this.limetype="",this.handleLimetypeChange=i=>{i.stopPropagation(),this.limetype=i.detail,this.filter=void 0,this.internalResponseFormat={object:{}},this.emitChange()},this.handleFilterChange=i=>{var e;i.stopPropagation(),this.filter=null!==(e=i.detail)&&void 0!==e?e:void 0,this.emitChange()},this.handleResponseFormatChange=i=>{i.stopPropagation(),this.internalResponseFormat=i.detail,this.emitChange()},this.handleLimitChange=i=>{i.stopPropagation();const e=i.detail;this.limit=e?Number.parseInt(e,10):void 0,this.emitChange()},this.handleOrderByChange=i=>{i.stopPropagation(),this.orderBy=i.detail,this.emitChange()},this.handleDescriptionChange=i=>{i.stopPropagation(),this.description=i.detail||void 0,this.emitChange()},this.handleDescriptionBlur=()=>{if(this.description){const i=this.description.trim();i!==this.description&&(this.description=i||void 0,this.emitChange())}},this.handleChange=i=>{i.stopPropagation();const e=i.detail.id;if("visual"===e)try{const i=JSON.parse(this.codeValue);if(!this.checkVisualModeSupport().visualModeSupported)return;this.limetype=i.limetype||"",this.filter=i.filter,this.internalResponseFormat=i.responseFormat,this.limit=i.limit,this.orderBy=i.orderBy,this.description=i["#description"],this.mode="visual",this.change.emit(i)}catch(i){}else"code"===e&&(this.updateCodeValue(),this.mode="code")},this.handleCodeChange=i=>{i.stopPropagation(),this.codeValue=i.detail;try{const i=JSON.parse(this.codeValue);this.change.emit(i)}catch(i){}}}getButtons(){return[{id:"visual",title:"Visual"},{id:"code",title:"Code"}]}get visualModeEnabled(){var i,e,t;return null!==(t=null===(e=null===(i=this.platform)||void 0===i?void 0:i.isFeatureEnabled)||void 0===e?void 0:e.call(i,"useLimeQueryBuilderGuiMode"))&&void 0!==t&&t}componentWillLoad(){if(!this.visualModeEnabled)return this.mode="code",void this.updateCodeValue();this.value&&(this.limetype=this.value.limetype||"",this.filter=this.value.filter,this.internalResponseFormat=this.value.responseFormat,this.limit=this.value.limit,this.orderBy=this.value.orderBy,this.description=this.value["#description"]),this.updateCodeValue(),this.checkVisualModeSupport().visualModeSupported||(this.mode="code")}render(){return t(r,{key:"798c1d0486dae6e06663e9a64913cc5d614a6351"},this.renderHeader(),this.renderContent())}renderContent(){const i=this.checkVisualModeSupport();return this.visualModeEnabled&&"code"!==this.mode?this.renderVisualMode():this.renderCodeMode(i)}emitChange(){"code"!==this.mode&&this.limetype&&this.change.emit(this.buildLimeQuery())}updateCodeValue(){this.codeValue=this.limetype?JSON.stringify(this.buildLimeQuery(),null,2):JSON.stringify(this.value||{},null,2)}buildLimeQuery(){const i={limetype:this.limetype,responseFormat:this.internalResponseFormat||{object:{_id:null}},filter:this.filter};return this.description&&(i["#description"]=this.description),void 0!==this.limit&&this.limit>0&&(i.limit=this.limit),this.orderBy&&this.orderBy.length>0&&(i.orderBy=this.orderBy),i}checkVisualModeSupport(){if(!this.limetypes)return{valid:!0,visualModeSupported:!0,validationErrors:[],visualModeLimitations:[]};let i;if("code"===this.mode&&this.codeValue)try{i=JSON.parse(this.codeValue)}catch(i){return{valid:!1,visualModeSupported:!1,validationErrors:["Invalid JSON"],visualModeLimitations:[]}}else{if(!this.limetype)return{valid:!0,visualModeSupported:!0,validationErrors:[],visualModeLimitations:[]};i={limetype:this.limetype,responseFormat:this.internalResponseFormat||{object:{_id:null}},filter:this.filter},void 0!==this.limit&&this.limit>0&&(i.limit=this.limit)}return o(i,this.limetypes,this.activeLimetype,this.visualModeEnabled)}renderModeSwitch(i){const e=!i.visualModeSupported,r=this.getButtons().map((i=>Object.assign(Object.assign({},i),{selected:i.id===this.mode})));return t("limel-button-group",{slot:"actions",onChange:this.handleChange,value:r,disabled:e})}renderCodeEditor(i){return[t("limel-code-editor",{value:this.codeValue,language:"json",lineNumbers:!0,fold:!0,lint:!0,onChange:this.handleCodeChange}),!i.valid&&i.validationErrors.length>0&&t("div",{class:"validation-errors"},t("strong",null,"Invalid Lime Query:"),t("ul",null,i.validationErrors.map((i=>t("li",null,i))))),this.visualModeEnabled&&i.valid&&!i.visualModeSupported&&i.visualModeLimitations.length>0&&t("div",{class:"visual-mode-limitations"},t("strong",null,"Cannot switch to visual mode:"),t("ul",null,i.visualModeLimitations.map((i=>t("li",null,i)))))]}renderLimetypeSection(){return t("limebb-limetype-field",{platform:this.platform,context:this.context,label:"Limetype",value:this.limetype,required:!0,fieldName:"limetype",onChange:this.handleLimetypeChange})}renderDescriptionSection(){if(this.limetype)return t("section",{class:"description"},t("limel-input-field",{label:"Description",type:"textarea",value:this.description||"",placeholder:"Describe what data this query retrieves...",helperText:"Optional: Help AI agents and humans understand the query purpose",onChange:this.handleDescriptionChange,onBlur:this.handleDescriptionBlur}))}renderResponseFormatSection(){if(this.limetype)return t("section",{class:"response-format"},t("limebb-lime-query-response-format-editor",{platform:this.platform,context:this.context,limetype:this.limetype,value:this.internalResponseFormat,onChange:this.handleResponseFormatChange}))}renderFilterSection(){if(this.limetype)return t("section",{class:"filter"},t("limel-header",{class:"is-narrow",heading:"Filter Conditions",icon:"-lime-filter"}),t("limebb-lime-query-filter-builder",{platform:this.platform,context:this.context,limetype:this.limetype,activeLimetype:this.activeLimetype,expression:this.filter,onExpressionChange:this.handleFilterChange}))}renderQueryOptionsSection(){var i;if(this.limetype)return t("section",{class:"query-options"},t("limel-header",{class:"is-narrow",heading:"Query Options",icon:"ask_question"}),t("div",{class:"query-options-controls"},t("limel-input-field",{label:"Limit",type:"number",value:(null===(i=this.limit)||void 0===i?void 0:i.toString())||"",placeholder:"Enter a number",helperText:"Maximum number of results. When empty, a default limit is applied.",onChange:this.handleLimitChange}),t("limebb-lime-query-order-by-editor",{platform:this.platform,context:this.context,limetype:this.limetype,value:this.orderBy,onChange:this.handleOrderByChange})))}renderVisualMode(){return t("div",{class:"visual-mode"},this.renderLimetypeSection(),this.renderDescriptionSection(),this.renderResponseFormatSection(),this.renderFilterSection(),this.renderQueryOptionsSection())}renderHeader(){const i=this.checkVisualModeSupport();return t("limel-header",{heading:this.label},this.renderModeControls(i))}renderModeControls(i){if(this.visualModeEnabled)return this.renderModeSwitch(i)}renderCodeMode(i){return t("div",{class:"code-mode"},this.renderCodeEditor(i))}};(function(i,e,t,r){var s,o=arguments.length,l=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(i,e,t,r);else for(var d=i.length-1;d>=0;d--)(s=i[d])&&(l=(o<3?s(l):o>3?s(e,t,l):s(e,t))||l);o>3&&l&&Object.defineProperty(e,t,l)})([s()],l.prototype,"limetypes",void 0),l.style="*,*:before,*:after{box-sizing:border-box}:host(limebb-lime-query-builder){--header-background-color:rgb(var(--contrast-500));--limebb-lime-query-builder-background-color:rgb(var(--contrast-100));--limebb-lime-query-builder-border-radius:0.75rem;--limebb-lime-query-builder-visual-mode-padding:1rem;--limebb-lime-query-builder-group-color:rgb(var(--color-sky-lighter));box-sizing:border-box;width:calc(100% - 1.5rem);margin:0.75rem auto;display:flex;flex-direction:column;border-radius:var(--limebb-lime-query-builder-border-radius);background-color:var(--limebb-lime-query-builder-background-color);box-shadow:var(--shadow-inflated-16)}.visual-mode{display:flex;flex-direction:column;gap:1rem;padding:var(--limebb-lime-query-builder-visual-mode-padding);border:1px solid var(--header-background-color);border-radius:0 0 var(--limebb-lime-query-builder-border-radius) var(--limebb-lime-query-builder-border-radius)}.code-mode{--code-editor-max-height:70vh;display:flex;flex-direction:column;gap:1rem}.code-mode .validation-errors{padding:0.75rem 1rem;color:rgb(var(--color-red-default));background-color:rgb(var(--color-red-lighter));border-left:0.25rem solid rgb(var(--color-red-default));border-radius:0.25rem;font-size:0.875rem}.code-mode .validation-errors strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-mode .validation-errors ul{margin:0;padding-left:1.5rem}.code-mode .validation-errors li{margin:0.25rem 0}.code-mode .visual-mode-limitations{padding:0.75rem 1rem;color:rgb(var(--color-blue-dark));background-color:rgb(var(--color-blue-lighter));border-left:0.25rem solid rgb(var(--color-blue-default));border-radius:0.25rem;font-size:0.875rem}.code-mode .visual-mode-limitations strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-mode .visual-mode-limitations ul{margin:0;padding-left:1.5rem}.code-mode .visual-mode-limitations li{margin:0.25rem 0}section.description,section.filter,section.query-options{display:flex;flex-direction:column;gap:1rem}section h4{margin:0;font-size:1.125rem;font-weight:600;color:rgb(var(--contrast-1000))}limel-header.is-narrow{--header-top-right-left-border-radius:0;width:calc(100% + var(--limebb-lime-query-builder-visual-mode-padding) * 2);margin-left:calc(var(--limebb-lime-query-builder-visual-mode-padding) * -1)}.query-options-controls{display:flex;flex-direction:column;gap:1rem}";export{l as limebb_lime_query_builder}
1
+ import{r as i,c as e,h as t,H as r}from"./p-f_mBf1UZ.js";import{I as s}from"./p-B6a_-5iN.js";import{i as o}from"./p-BnPKxFWU.js";import"./p-CQUZjrU4.js";const l=class{constructor(t){i(this,t),this.change=e(this,"change"),this.mode="visual",this.codeValue="",this.limetype="",this.handleLimetypeChange=i=>{i.stopPropagation(),this.limetype=i.detail,this.filter=void 0,this.internalResponseFormat={object:{}},this.emitChange()},this.handleFilterChange=i=>{var e;i.stopPropagation(),this.filter=null!==(e=i.detail)&&void 0!==e?e:void 0,this.emitChange()},this.handleResponseFormatChange=i=>{i.stopPropagation(),this.internalResponseFormat=i.detail,this.emitChange()},this.handleLimitChange=i=>{i.stopPropagation();const e=i.detail;this.limit=e?Number.parseInt(e,10):void 0,this.emitChange()},this.handleOrderByChange=i=>{i.stopPropagation(),this.orderBy=i.detail,this.emitChange()},this.handleDescriptionChange=i=>{i.stopPropagation(),this.description=i.detail||void 0,this.emitChange()},this.handleDescriptionBlur=()=>{if(this.description){const i=this.description.trim();i!==this.description&&(this.description=i||void 0,this.emitChange())}},this.handleChange=i=>{i.stopPropagation();const e=i.detail.id;if("visual"===e)try{const i=JSON.parse(this.codeValue);if(!this.checkVisualModeSupport().visualModeSupported)return;this.limetype=i.limetype||"",this.filter=i.filter,this.internalResponseFormat=i.responseFormat,this.limit=i.limit,this.orderBy=i.orderBy,this.description=i["#description"],this.mode="visual",this.change.emit(i)}catch(i){}else"code"===e&&(this.updateCodeValue(),this.mode="code")},this.handleCodeChange=i=>{i.stopPropagation(),this.codeValue=i.detail;try{const i=JSON.parse(this.codeValue);this.change.emit(i)}catch(i){}}}getButtons(){return[{id:"visual",title:"Visual"},{id:"code",title:"Code"}]}get visualModeEnabled(){var i,e,t;return null!==(t=null===(e=null===(i=this.platform)||void 0===i?void 0:i.isFeatureEnabled)||void 0===e?void 0:e.call(i,"useLimeQueryBuilderGuiMode"))&&void 0!==t&&t}componentWillLoad(){if(!this.visualModeEnabled)return this.mode="code",void this.updateCodeValue();this.value&&(this.limetype=this.value.limetype||"",this.filter=this.value.filter,this.internalResponseFormat=this.value.responseFormat,this.limit=this.value.limit,this.orderBy=this.value.orderBy,this.description=this.value["#description"]),this.updateCodeValue(),this.checkVisualModeSupport().visualModeSupported||(this.mode="code")}render(){return t(r,{key:"798c1d0486dae6e06663e9a64913cc5d614a6351"},this.renderHeader(),this.renderContent())}renderContent(){const i=this.checkVisualModeSupport();return this.visualModeEnabled&&"code"!==this.mode?this.renderVisualMode():this.renderCodeMode(i)}emitChange(){"code"!==this.mode&&this.limetype&&this.change.emit(this.buildLimeQuery())}updateCodeValue(){this.codeValue=this.limetype?JSON.stringify(this.buildLimeQuery(),null,2):JSON.stringify(this.value||{},null,2)}buildLimeQuery(){const i={limetype:this.limetype,responseFormat:this.internalResponseFormat||{object:{_id:null}},filter:this.filter};return this.description&&(i["#description"]=this.description),void 0!==this.limit&&this.limit>0&&(i.limit=this.limit),this.orderBy&&this.orderBy.length>0&&(i.orderBy=this.orderBy),i}checkVisualModeSupport(){if(!this.limetypes)return{valid:!0,visualModeSupported:!0,validationErrors:[],visualModeLimitations:[]};let i;if("code"===this.mode&&this.codeValue)try{i=JSON.parse(this.codeValue)}catch(i){return{valid:!1,visualModeSupported:!1,validationErrors:["Invalid JSON"],visualModeLimitations:[]}}else{if(!this.limetype)return{valid:!0,visualModeSupported:!0,validationErrors:[],visualModeLimitations:[]};i={limetype:this.limetype,responseFormat:this.internalResponseFormat||{object:{_id:null}},filter:this.filter},void 0!==this.limit&&this.limit>0&&(i.limit=this.limit)}return o(i,this.limetypes,this.activeLimetype,this.visualModeEnabled)}renderModeSwitch(i){const e=!i.visualModeSupported,r=this.getButtons().map((i=>Object.assign(Object.assign({},i),{selected:i.id===this.mode})));return t("limel-button-group",{slot:"actions",onChange:this.handleChange,value:r,disabled:e})}renderCodeEditor(i){return[t("limel-code-editor",{value:this.codeValue,language:"json",lineNumbers:!0,fold:!0,lint:!0,onChange:this.handleCodeChange}),!i.valid&&i.validationErrors.length>0&&t("div",{class:"validation-errors"},t("strong",null,"Invalid Lime Query:"),t("ul",null,i.validationErrors.map((i=>t("li",null,i))))),this.visualModeEnabled&&i.valid&&!i.visualModeSupported&&i.visualModeLimitations.length>0&&t("div",{class:"visual-mode-limitations"},t("strong",null,"Cannot switch to visual mode:"),t("ul",null,i.visualModeLimitations.map((i=>t("li",null,i)))))]}renderLimetypeSection(){return t("limebb-limetype-field",{platform:this.platform,context:this.context,label:"Limetype",value:this.limetype,required:!0,fieldName:"limetype",onChange:this.handleLimetypeChange})}renderDescriptionSection(){if(this.limetype)return t("section",{class:"description"},t("limel-input-field",{label:"Description",type:"textarea",value:this.description||"",placeholder:"Describe what data this query retrieves...",helperText:"Optional: Help AI agents and humans understand the query purpose",onChange:this.handleDescriptionChange,onBlur:this.handleDescriptionBlur}))}renderResponseFormatSection(){if(this.limetype)return t("section",{class:"response-format"},t("limebb-lime-query-response-format-editor",{platform:this.platform,context:this.context,limetype:this.limetype,value:this.internalResponseFormat,onChange:this.handleResponseFormatChange}))}renderFilterSection(){if(this.limetype)return t("section",{class:"filter"},t("limel-header",{class:"is-narrow",heading:"Filter Conditions",icon:"-lime-filter"}),t("limebb-lime-query-filter-builder",{platform:this.platform,context:this.context,limetype:this.limetype,activeLimetype:this.activeLimetype,expression:this.filter,onExpressionChange:this.handleFilterChange}))}renderQueryOptionsSection(){var i;if(this.limetype)return t("section",{class:"query-options"},t("limel-header",{class:"is-narrow",heading:"Query Options",icon:"ask_question"}),t("div",{class:"query-options-controls"},t("limel-input-field",{label:"Limit",type:"number",value:(null===(i=this.limit)||void 0===i?void 0:i.toString())||"",placeholder:"Enter a number",helperText:"Maximum number of results. When empty, a default limit is applied.",onChange:this.handleLimitChange}),t("limebb-lime-query-order-by-editor",{platform:this.platform,context:this.context,limetype:this.limetype,value:this.orderBy,onChange:this.handleOrderByChange})))}renderVisualMode(){return t("div",{class:"visual-mode"},this.renderLimetypeSection(),this.renderDescriptionSection(),this.renderResponseFormatSection(),this.renderFilterSection(),this.renderQueryOptionsSection())}renderHeader(){const i=this.checkVisualModeSupport();return t("limel-header",{heading:this.label},this.renderModeControls(i))}renderModeControls(i){if(this.visualModeEnabled)return this.renderModeSwitch(i)}renderCodeMode(i){return t("div",{class:"code-mode"},this.renderCodeEditor(i))}};(function(i,e,t,r){var s,o=arguments.length,l=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(i,e,t,r);else for(var d=i.length-1;d>=0;d--)(s=i[d])&&(l=(o<3?s(l):o>3?s(e,t,l):s(e,t))||l);o>3&&l&&Object.defineProperty(e,t,l)})([s()],l.prototype,"limetypes",void 0),l.style="*,*:before,*:after{box-sizing:border-box}:host(limebb-lime-query-builder){--header-background-color:rgb(var(--contrast-500));--limebb-lime-query-builder-background-color:rgb(var(--contrast-100));--limebb-lime-query-builder-border-radius:0.75rem;--limebb-lime-query-builder-visual-mode-padding:1rem;--limebb-lime-query-builder-group-color:rgb(var(--color-sky-lighter));box-sizing:border-box;width:calc(100% - 1.5rem);margin:0.75rem auto;display:flex;flex-direction:column;border-radius:var(--limebb-lime-query-builder-border-radius);background-color:var(--limebb-lime-query-builder-background-color);box-shadow:var(--shadow-inflated-16)}.visual-mode{display:flex;flex-direction:column;gap:1rem;padding:var(--limebb-lime-query-builder-visual-mode-padding);border:1px solid var(--header-background-color);border-radius:0 0 var(--limebb-lime-query-builder-border-radius) var(--limebb-lime-query-builder-border-radius)}.code-mode{--code-editor-max-height:70vh;display:flex;flex-direction:column;gap:1rem}.code-mode .validation-errors{padding:0.75rem 1rem;color:rgb(var(--color-red-default));background-color:rgb(var(--color-red-lighter));border-left:0.25rem solid rgb(var(--color-red-default));border-radius:0.25rem;font-size:0.875rem}.code-mode .validation-errors strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-mode .validation-errors ul{margin:0;padding-left:1.5rem}.code-mode .validation-errors li{margin:0.25rem 0}.code-mode .visual-mode-limitations{padding:0.75rem 1rem;color:rgb(var(--color-blue-dark));background-color:rgb(var(--color-blue-lighter));border-left:0.25rem solid rgb(var(--color-blue-default));border-radius:0.25rem;font-size:0.875rem}.code-mode .visual-mode-limitations strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-mode .visual-mode-limitations ul{margin:0;padding-left:1.5rem}.code-mode .visual-mode-limitations li{margin:0.25rem 0}section.description,section.filter,section.query-options{display:flex;flex-direction:column;gap:1rem}section h4{margin:0;font-size:1.125rem;font-weight:600;color:rgb(var(--contrast-1000))}limel-header.is-narrow{--header-top-right-left-border-radius:0;width:calc(100% + var(--limebb-lime-query-builder-visual-mode-padding) * 2);margin-left:calc(var(--limebb-lime-query-builder-visual-mode-padding) * -1)}.query-options-controls{display:flex;flex-direction:column;gap:1rem}";export{l as limebb_lime_query_builder}
@@ -1 +1 @@
1
- import{r as e,h as r,H as a}from"./p-BK566_jX.js";import{n as l}from"./p-DhGRAeCH.js";import{g as t,n as o}from"./p-Cg1DC15C.js";const i=1e-4,s=class{constructor(a){e(this,a),this.rangeMax=100,this.rangeMin=0,this.multiplier=1,this.reducePresence=!0,this.displayPercentageColors=!1,this.locale="en",this.labelId="label-"+crypto.randomUUID(),this.helperTextId="helper-text-"+crypto.randomUUID(),this.zeroPointId="zero-point-"+crypto.randomUUID(),this.renderHelperLine=()=>{if(this.hasHelperText())return r("limel-helper-line",{helperTextId:this.helperTextId,helperText:this.helperText,invalid:this.invalid})},this.hasHelperText=()=>null!=this.helperText}valueChanged(e){this.numValue=this.parseValue(e)}componentWillLoad(){try{this.locale=this.platform.get(l.UserPreferencesRepository).get("locale"),this.numberFormat=new Intl.NumberFormat(this.locale)}catch(e){console.warn(`Could not get user's locale (${this.locale}), falling back to 'en'.`),this.locale="en",this.numberFormat=new Intl.NumberFormat("en")}this.numValue=this.parseValue(this.value)}componentDidLoad(){this.triggerRangeWarning()}componentWillUpdate(){this.triggerRangeWarning()}triggerRangeWarning(){this.rangeMin>=this.rangeMax&&console.warn(`[limebb-percentage-visualizer] Invalid range: rangeMin (${this.rangeMin}) must be less than rangeMax (${this.rangeMax}). Visualization may not appear as expected.`)}render(){const e=this.getNormalizedValue(),l=this.getZeroPointPosition();return r(a,{key:"ceedd31aea09adde6d2d0af69af4282e90d55015",class:this.getContainerClassList(),style:{"--limebb-percentage-visualizer-zero-point-position":`${l}%`,"--limebb-percentage-visualizer-width":`${Math.abs(e)}%`,"--limebb-percentage-visualizer-rotate":e>=0?"0deg":"180deg"}},r("limel-notched-outline",{key:"bb81c8e2bf99bdf9cf4a1c92df091729526135bd",tabIndex:0,role:"meter","aria-valuemin":this.rangeMin,"aria-valuemax":this.rangeMax,"aria-valuenow":this.numValue,"aria-labelledby":this.labelId,"aria-describedby":this.helperTextId,label:this.label,labelId:this.labelId,invalid:this.invalid,required:this.required,hasValue:!0,hasFloatingLabel:!0,"aria-controls":this.helperTextId},r("div",{key:"22d87e753014bc6663d7be90ba498bcf3b86e981",slot:"content"},this.renderVisualization())),this.renderHelperLine())}renderVisualization(){if(!this.reducePresence||0!==this.numValue&&this.hasValue())return this.hasValue()?[r("div",{class:"percentage-bar"},r("div",{class:"percentage-fill"}),this.renderZeroPoint()),r("span",{class:"percentage-text"},this.formatValue(this.numValue),r("span",{class:"percent-sign"},"%"))]:r("span",{class:"no-value"},"–")}renderZeroPoint(){if(!(this.rangeMin>=0||this.rangeMax<=0))return[r("div",{id:this.zeroPointId,class:"zero-point"}),r("limel-tooltip",{elementId:this.zeroPointId,openDirection:"top",label:"0"})]}hasValue(){return null!=this.value&&""!==this.value}getContainerClassList(){if(!this.hasValue())return;const e=this.roundValue(this.multiplyByMultiplier(this.numValue)),r=t(e);return Object.assign({},r&&{[r]:!0})}getZeroPointPosition(){const e=this.rangeMax-this.rangeMin;return e<=0?0:(0-this.rangeMin)/e*100}getNormalizedValue(){const e=this.roundValue(this.multiplyByMultiplier(this.numValue)),r=this.rangeMax-this.rangeMin;if(r<=0)return 0;const a=(0-this.rangeMin)/r*100;return e>=0?e/Math.max(this.rangeMax,i)*(100-a):e/Math.max(Math.abs(this.rangeMin),i)*a}multiplyByMultiplier(e){return e*this.multiplier}roundValue(e){return Math.round(10*e)/10}unifyMinusSign(e){return e.replaceAll("−","-")}convertToUnicodeMinus(e){return e.replaceAll("-","−")}parseValue(e){return"string"==typeof e?Number.parseFloat(o(this.unifyMinusSign(e),this.locale)):e}formatValue(e){const r=this.roundValue(this.multiplyByMultiplier(e)),a=this.numberFormat.format(r);return r<0?this.convertToUnicodeMinus(a):a}static get watchers(){return{value:[{valueChanged:0}]}}};s.style='@charset "UTF-8";*,::before,::after{box-sizing:border-box}:host(limebb-percentage-visualizer){width:100%}limel-notched-outline:not([invalid]:not([invalid=false])) .limel-notched-outline--outlines{--limel-notched-outline-border-color:transparent}div[slot=content]:focus{outline:none}div[slot=content]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}div[slot=content]{display:flex;align-items:center;gap:0.5rem;border-radius:inherit;background-color:transparent !important}:host(limebb-percentage-visualizer[invalid]:not([invalid=false])) div[slot=content]{border-color:rgb(var(--color-red-default))}:host(limebb-percentage-visualizer):has(label) div[slot=content]{min-height:2.5rem;padding:0 0.375rem 0 1rem}.percentage-text{flex-shrink:0;min-width:2.5rem}:host([range-min^="-"]) .percentage-text{min-width:3.75rem}.percent-sign{opacity:0.4}.zero-point{content:"";position:absolute;transform:translateX(-50%);left:var(--limebb-percentage-visualizer-zero-point-position);height:0.25rem;width:0.25rem;border-radius:50%;box-shadow:0 0 0 0.125rem var(--limebb-percentage-visualizer-zero-point-color, rgb(var(--contrast-1200), 0.3));background-color:var(--limebb-percentage-visualizer-zero-point-color, rgb(var(--contrast-200), 0.9))}.percentage-bar{overflow:hidden;flex-grow:1;position:relative;display:flex;align-items:center;height:0.5rem;min-width:2rem;border-radius:0.5rem;background-color:rgb(var(--contrast-800), 0.6)}.percentage-fill{transition:width 0.2s ease;position:absolute;margin:auto;left:var(--limebb-percentage-visualizer-zero-point-position, 0);rotate:var(--limebb-percentage-visualizer-rotate, 0deg);transform-origin:left center;width:var(--limebb-percentage-visualizer-width);height:100%;border-radius:0.5rem}:host(limebb-percentage-visualizer:focus),:host(limebb-percentage-visualizer:focus-visible),:host(limebb-percentage-visualizer:focus-within){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limebb-percentage-visualizer){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limebb-percentage-visualizer:focus) limel-helper-line,:host(limebb-percentage-visualizer:focus-visible) limel-helper-line,:host(limebb-percentage-visualizer:focus-within) limel-helper-line,:host(limebb-percentage-visualizer:hover) limel-helper-line{will-change:grid-template-rows}.percentage-fill{background-color:var(--percentage-visualizer-color, var(--limebb-percentage-visualizer-color, var(--mdc-theme-primary)))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-darker))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200to100-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to90-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to80-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to70-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to60-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to50-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-coral-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to40-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-coral-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to30-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-orange-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to20-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-orange-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to10-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-amber-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to0-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-amber-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-0) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--contrast-800))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-0to10-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-yellow-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to20-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-yellow-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to30-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-grass-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to40-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-grass-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to50-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-lime-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to60-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-lime-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to70-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to80-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to90-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to100-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to200-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-darker))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-0) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--contrast-800))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-0to10-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--0to10)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to20-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--10to20)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to30-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--20to30)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to40-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--30to40)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to50-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--40to50)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to60-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--50to60)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to70-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--60to70)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to80-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--70to80)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to90-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--80to90)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to100-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--90to100)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to200-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-darker))}';export{s as limebb_percentage_visualizer}
1
+ import{r as e,h as r,H as a}from"./p-f_mBf1UZ.js";import{n as l}from"./p-B6a_-5iN.js";import{g as t,n as o}from"./p-Cg1DC15C.js";const i=1e-4,s=class{constructor(a){e(this,a),this.rangeMax=100,this.rangeMin=0,this.multiplier=1,this.reducePresence=!0,this.displayPercentageColors=!1,this.locale="en",this.labelId="label-"+crypto.randomUUID(),this.helperTextId="helper-text-"+crypto.randomUUID(),this.zeroPointId="zero-point-"+crypto.randomUUID(),this.renderHelperLine=()=>{if(this.hasHelperText())return r("limel-helper-line",{helperTextId:this.helperTextId,helperText:this.helperText,invalid:this.invalid})},this.hasHelperText=()=>null!=this.helperText}valueChanged(e){this.numValue=this.parseValue(e)}componentWillLoad(){try{this.locale=this.platform.get(l.UserPreferencesRepository).get("locale"),this.numberFormat=new Intl.NumberFormat(this.locale)}catch(e){console.warn(`Could not get user's locale (${this.locale}), falling back to 'en'.`),this.locale="en",this.numberFormat=new Intl.NumberFormat("en")}this.numValue=this.parseValue(this.value)}componentDidLoad(){this.triggerRangeWarning()}componentWillUpdate(){this.triggerRangeWarning()}triggerRangeWarning(){this.rangeMin>=this.rangeMax&&console.warn(`[limebb-percentage-visualizer] Invalid range: rangeMin (${this.rangeMin}) must be less than rangeMax (${this.rangeMax}). Visualization may not appear as expected.`)}render(){const e=this.getNormalizedValue(),l=this.getZeroPointPosition();return r(a,{key:"ceedd31aea09adde6d2d0af69af4282e90d55015",class:this.getContainerClassList(),style:{"--limebb-percentage-visualizer-zero-point-position":`${l}%`,"--limebb-percentage-visualizer-width":`${Math.abs(e)}%`,"--limebb-percentage-visualizer-rotate":e>=0?"0deg":"180deg"}},r("limel-notched-outline",{key:"bb81c8e2bf99bdf9cf4a1c92df091729526135bd",tabIndex:0,role:"meter","aria-valuemin":this.rangeMin,"aria-valuemax":this.rangeMax,"aria-valuenow":this.numValue,"aria-labelledby":this.labelId,"aria-describedby":this.helperTextId,label:this.label,labelId:this.labelId,invalid:this.invalid,required:this.required,hasValue:!0,hasFloatingLabel:!0,"aria-controls":this.helperTextId},r("div",{key:"22d87e753014bc6663d7be90ba498bcf3b86e981",slot:"content"},this.renderVisualization())),this.renderHelperLine())}renderVisualization(){if(!this.reducePresence||0!==this.numValue&&this.hasValue())return this.hasValue()?[r("div",{class:"percentage-bar"},r("div",{class:"percentage-fill"}),this.renderZeroPoint()),r("span",{class:"percentage-text"},this.formatValue(this.numValue),r("span",{class:"percent-sign"},"%"))]:r("span",{class:"no-value"},"–")}renderZeroPoint(){if(!(this.rangeMin>=0||this.rangeMax<=0))return[r("div",{id:this.zeroPointId,class:"zero-point"}),r("limel-tooltip",{elementId:this.zeroPointId,openDirection:"top",label:"0"})]}hasValue(){return null!=this.value&&""!==this.value}getContainerClassList(){if(!this.hasValue())return;const e=this.roundValue(this.multiplyByMultiplier(this.numValue)),r=t(e);return Object.assign({},r&&{[r]:!0})}getZeroPointPosition(){const e=this.rangeMax-this.rangeMin;return e<=0?0:(0-this.rangeMin)/e*100}getNormalizedValue(){const e=this.roundValue(this.multiplyByMultiplier(this.numValue)),r=this.rangeMax-this.rangeMin;if(r<=0)return 0;const a=(0-this.rangeMin)/r*100;return e>=0?e/Math.max(this.rangeMax,i)*(100-a):e/Math.max(Math.abs(this.rangeMin),i)*a}multiplyByMultiplier(e){return e*this.multiplier}roundValue(e){return Math.round(10*e)/10}unifyMinusSign(e){return e.replaceAll("−","-")}convertToUnicodeMinus(e){return e.replaceAll("-","−")}parseValue(e){return"string"==typeof e?Number.parseFloat(o(this.unifyMinusSign(e),this.locale)):e}formatValue(e){const r=this.roundValue(this.multiplyByMultiplier(e)),a=this.numberFormat.format(r);return r<0?this.convertToUnicodeMinus(a):a}static get watchers(){return{value:[{valueChanged:0}]}}};s.style='@charset "UTF-8";*,::before,::after{box-sizing:border-box}:host(limebb-percentage-visualizer){width:100%}limel-notched-outline:not([invalid]:not([invalid=false])) .limel-notched-outline--outlines{--limel-notched-outline-border-color:transparent}div[slot=content]:focus{outline:none}div[slot=content]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}div[slot=content]{display:flex;align-items:center;gap:0.5rem;border-radius:inherit;background-color:transparent !important}:host(limebb-percentage-visualizer[invalid]:not([invalid=false])) div[slot=content]{border-color:rgb(var(--color-red-default))}:host(limebb-percentage-visualizer):has(label) div[slot=content]{min-height:2.5rem;padding:0 0.375rem 0 1rem}.percentage-text{flex-shrink:0;min-width:2.5rem}:host([range-min^="-"]) .percentage-text{min-width:3.75rem}.percent-sign{opacity:0.4}.zero-point{content:"";position:absolute;transform:translateX(-50%);left:var(--limebb-percentage-visualizer-zero-point-position);height:0.25rem;width:0.25rem;border-radius:50%;box-shadow:0 0 0 0.125rem var(--limebb-percentage-visualizer-zero-point-color, rgb(var(--contrast-1200), 0.3));background-color:var(--limebb-percentage-visualizer-zero-point-color, rgb(var(--contrast-200), 0.9))}.percentage-bar{overflow:hidden;flex-grow:1;position:relative;display:flex;align-items:center;height:0.5rem;min-width:2rem;border-radius:0.5rem;background-color:rgb(var(--contrast-800), 0.6)}.percentage-fill{transition:width 0.2s ease;position:absolute;margin:auto;left:var(--limebb-percentage-visualizer-zero-point-position, 0);rotate:var(--limebb-percentage-visualizer-rotate, 0deg);transform-origin:left center;width:var(--limebb-percentage-visualizer-width);height:100%;border-radius:0.5rem}:host(limebb-percentage-visualizer:focus),:host(limebb-percentage-visualizer:focus-visible),:host(limebb-percentage-visualizer:focus-within){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limebb-percentage-visualizer){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limebb-percentage-visualizer:focus) limel-helper-line,:host(limebb-percentage-visualizer:focus-visible) limel-helper-line,:host(limebb-percentage-visualizer:focus-within) limel-helper-line,:host(limebb-percentage-visualizer:hover) limel-helper-line{will-change:grid-template-rows}.percentage-fill{background-color:var(--percentage-visualizer-color, var(--limebb-percentage-visualizer-color, var(--mdc-theme-primary)))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-darker))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200to100-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to90-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to80-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to70-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to60-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to50-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-coral-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to40-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-coral-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to30-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-orange-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to20-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-orange-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to10-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-amber-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to0-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-amber-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-0) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--contrast-800))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-0to10-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-yellow-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to20-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-yellow-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to30-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-grass-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to40-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-grass-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to50-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-lime-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to60-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-lime-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to70-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to80-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to90-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to100-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to200-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-darker))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-0) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--contrast-800))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-0to10-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--0to10)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to20-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--10to20)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to30-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--20to30)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to40-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--30to40)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to50-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--40to50)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to60-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--50to60)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to70-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--60to70)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to80-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--70to80)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to90-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--80to90)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to100-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--90to100)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to200-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-darker))}';export{s as limebb_percentage_visualizer}
@@ -1 +1 @@
1
- import{r as t,c as e,h as r}from"./p-BK566_jX.js";const o=class{constructor(r){t(this,r),this.dismiss=e(this,"dismiss"),this.type="note",this.open=!1,this.handleClose=()=>{this.dismiss.emit()}}render(){return r("limel-dialog",{key:"ffc45c6abc8055f1e083f49ef5fe2e315113923c",open:this.open,onClose:this.handleClose},r("div",{key:"ad271227126574b7ddebdcf19a9e586873a98814",class:"dialog-content"},r("div",{key:"b0bff80493fd6a52a104b8cc242925aa0ced6e17",class:"icon-slot"},r("limel-icon",{key:"991088c3d4609a4f25e0e36a9ff4b3e72825a6f3",name:this.getIconName(),"aria-hidden":"true"})),r("h1",{key:"1eaa7b7f1c332d293bcc5b94a69d1acbeb735ff5",id:"alert-dialog-title"},this.heading),this.renderSubheading()),r("div",{key:"8fbfb2a24dea2f8129fc1147078ee1ba86251cba",slot:"button"},r("slot",{key:"634f36f06a6c3eff06dbd36ac86f904639be462c",name:"button"})))}renderSubheading(){return this.subheading?r("h2",{id:"alert-dialog-content"},this.subheading):null}getIconName(){return this.icon?this.icon:{note:"information",success:"check_mark",caution:"error_(14)",warning:"multiply"}[this.type]}};o.style='@charset "UTF-8";:host(limebb-alert-dialog){--dialog-width:20rem;overflow:hidden}:host([type=note]){--alert-type-background:var(--color-sky-lighter);--alert-type-color:var(--color-sky-dark)}:host([type=success]){--alert-type-background:var(--color-lime-lighter);--alert-type-color:var(--color-lime-dark)}:host([type=caution]){--alert-type-background:var(--color-orange-lighter);--alert-type-color:var(--color-orange-dark)}:host([type=warning]){--alert-type-background:var(--color-coral-lighter);--alert-type-color:var(--color-coral-dark)}.dialog-content{display:flex;flex-direction:column;align-items:center}.icon-slot{display:flex;justify-content:center;align-items:center;height:7rem;width:7rem;border-radius:50%;margin:1.5rem 0;background:rgb(var(--alert-type-background))}limel-icon{height:3.5rem;width:3.5rem;color:rgb(var(--alert-type-color))}h1{color:rgb(var(--contrast-1500));font-size:1.5rem}h2{text-align:center;color:rgb(var(--contrast-1200));margin:0 0 0.25rem 0;font-size:0.9rem;font-weight:500;line-height:1.2rem}div[slot=button]{display:flex;flex-direction:column;align-items:center;gap:0.5rem;width:100%}::slotted(limel-button){display:block;width:100%}::slotted(limel-button[primary]){color:rgb(var(--contrast-100));--lime-primary-color:rgb(var(--alert-type-color))}::slotted(limel-button:not([primary])){--lime-primary-color:rgb(var(--contrast-1000))}::slotted(button){appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit}::slotted(a){all:unset}::slotted(button),::slotted(a){color:rgb(var(--contrast-1000));border-bottom:1px solid rgb(var(--contrast-800));text-align:center;width:fit-content;cursor:pointer}::slotted(button:focus-visible),::slotted(a:focus-visible){outline:none;box-shadow:var(--shadow-depth-8-focused)}';export{o as limebb_alert_dialog}
1
+ import{r as t,c as e,h as r}from"./p-f_mBf1UZ.js";const o=class{constructor(r){t(this,r),this.dismiss=e(this,"dismiss"),this.type="note",this.open=!1,this.handleClose=()=>{this.dismiss.emit()}}render(){return r("limel-dialog",{key:"ffc45c6abc8055f1e083f49ef5fe2e315113923c",open:this.open,onClose:this.handleClose},r("div",{key:"ad271227126574b7ddebdcf19a9e586873a98814",class:"dialog-content"},r("div",{key:"b0bff80493fd6a52a104b8cc242925aa0ced6e17",class:"icon-slot"},r("limel-icon",{key:"991088c3d4609a4f25e0e36a9ff4b3e72825a6f3",name:this.getIconName(),"aria-hidden":"true"})),r("h1",{key:"1eaa7b7f1c332d293bcc5b94a69d1acbeb735ff5",id:"alert-dialog-title"},this.heading),this.renderSubheading()),r("div",{key:"8fbfb2a24dea2f8129fc1147078ee1ba86251cba",slot:"button"},r("slot",{key:"634f36f06a6c3eff06dbd36ac86f904639be462c",name:"button"})))}renderSubheading(){return this.subheading?r("h2",{id:"alert-dialog-content"},this.subheading):null}getIconName(){return this.icon?this.icon:{note:"information",success:"check_mark",caution:"error_(14)",warning:"multiply"}[this.type]}};o.style='@charset "UTF-8";:host(limebb-alert-dialog){--dialog-width:20rem;overflow:hidden}:host([type=note]){--alert-type-background:var(--color-sky-lighter);--alert-type-color:var(--color-sky-dark)}:host([type=success]){--alert-type-background:var(--color-lime-lighter);--alert-type-color:var(--color-lime-dark)}:host([type=caution]){--alert-type-background:var(--color-orange-lighter);--alert-type-color:var(--color-orange-dark)}:host([type=warning]){--alert-type-background:var(--color-coral-lighter);--alert-type-color:var(--color-coral-dark)}.dialog-content{display:flex;flex-direction:column;align-items:center}.icon-slot{display:flex;justify-content:center;align-items:center;height:7rem;width:7rem;border-radius:50%;margin:1.5rem 0;background:rgb(var(--alert-type-background))}limel-icon{height:3.5rem;width:3.5rem;color:rgb(var(--alert-type-color))}h1{color:rgb(var(--contrast-1500));font-size:1.5rem}h2{text-align:center;color:rgb(var(--contrast-1200));margin:0 0 0.25rem 0;font-size:0.9rem;font-weight:500;line-height:1.2rem}div[slot=button]{display:flex;flex-direction:column;align-items:center;gap:0.5rem;width:100%}::slotted(limel-button){display:block;width:100%}::slotted(limel-button[primary]){color:rgb(var(--contrast-100));--lime-primary-color:rgb(var(--alert-type-color))}::slotted(limel-button:not([primary])){--lime-primary-color:rgb(var(--contrast-1000))}::slotted(button){appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit}::slotted(a){all:unset}::slotted(button),::slotted(a){color:rgb(var(--contrast-1000));border-bottom:1px solid rgb(var(--contrast-800));text-align:center;width:fit-content;cursor:pointer}::slotted(button:focus-visible),::slotted(a:focus-visible){outline:none;box-shadow:var(--shadow-depth-8-focused)}';export{o as limebb_alert_dialog}
@@ -1 +1 @@
1
- import{r as t,h as e,H as s,g as i}from"./p-BK566_jX.js";import{n as h}from"./p-DhGRAeCH.js";const o=class{constructor(e){t(this,e),this.shouldRender=!1}componentWillLoad(){this.evaluate()}disconnectedCallback(){var t;null===(t=this.stopSubscription)||void 0===t||t.call(this)}onRuleChange(){this.evaluate()}onScopeChange(){this.evaluate()}render(){return e(s,{key:"36ac8be5125b3a169160a699388f69641d8b4c1c",hidden:!this.shouldRender},e("slot",{key:"3b14a3726279f295e5983adab2b2f5f7b5c103ed"}))}get ruleRegistry(){return this.platform.get(h.RuleRegistry)}evaluate(){var t;if(null===(t=this.stopSubscription)||void 0===t||t.call(this),this.stopSubscription=void 0,this.rule)try{const t=this.ruleRegistry.compile(this.rule);if(this.scope)return void(this.shouldRender=t.evaluate(this.scope));this.stopSubscription=this.ruleRegistry.subscribe(t,{host:this.host},(t=>{this.shouldRender=t}))}catch(t){console.warn("rule-gate failed to compile rule; hiding slot",{rule:this.rule,error:t}),this.shouldRender=!1}else this.shouldRender=!0}get host(){return i(this)}static get watchers(){return{rule:[{onRuleChange:0}],scope:[{onScopeChange:0}]}}};o.style=":host(limebb-rule-gate){display:contents}:host(limebb-rule-gate[hidden]){display:none}";export{o as limebb_rule_gate}
1
+ import{r as t,h as e,H as s,g as i}from"./p-f_mBf1UZ.js";import{n as h}from"./p-B6a_-5iN.js";const o=class{constructor(e){t(this,e),this.shouldRender=!1}componentWillLoad(){this.evaluate()}disconnectedCallback(){var t;null===(t=this.stopSubscription)||void 0===t||t.call(this)}onRuleChange(){this.evaluate()}onScopeChange(){this.evaluate()}render(){return e(s,{key:"36ac8be5125b3a169160a699388f69641d8b4c1c",hidden:!this.shouldRender},e("slot",{key:"3b14a3726279f295e5983adab2b2f5f7b5c103ed"}))}get ruleRegistry(){return this.platform.get(h.RuleRegistry)}evaluate(){var t;if(null===(t=this.stopSubscription)||void 0===t||t.call(this),this.stopSubscription=void 0,this.rule)try{const t=this.ruleRegistry.compile(this.rule);if(this.scope)return void(this.shouldRender=t.evaluate(this.scope));this.stopSubscription=this.ruleRegistry.subscribe(t,{host:this.host},(t=>{this.shouldRender=t}))}catch(t){console.warn("rule-gate failed to compile rule; hiding slot",{rule:this.rule,error:t}),this.shouldRender=!1}else this.shouldRender=!0}get host(){return i(this)}static get watchers(){return{rule:[{onRuleChange:0}],scope:[{onScopeChange:0}]}}};o.style=":host(limebb-rule-gate){display:contents}:host(limebb-rule-gate[hidden]){display:none}";export{o as limebb_rule_gate}
@@ -1 +1 @@
1
- import{r as t,c as i,h as e,H as r}from"./p-BK566_jX.js";import{n as o}from"./p-DhGRAeCH.js";const a=class{constructor(r){t(this,r),this.interact=i(this,"interact"),this.handleClick=()=>{this.isItemClickable()&&this.handleNotificationListItemClick()},this.handleKeyDown=t=>{this.isItemClickable()&&"Enter"===t.key&&this.handleNotificationListItemClick()},this.renderHeading=()=>{if(!this.item.heading)return;if(!this.item.author)return e("limel-markdown",{value:this.translator.get(this.item.heading)});const t=this.getAuthorLink(),i=this.translator.get(this.item.heading,{author:t});return e("limel-markdown",{class:"heading",value:i})},this.createMenuItem=t=>{var i,e;return"separator"in t?t:{value:t,text:null!==(i=t.label)&&void 0!==i?i:"",secondaryText:t.description,disabled:t.disabled,icon:null!==(e=t.icon)&&void 0!==e?e:""}},this.handleMenuItemSelect=t=>{var i;t.stopPropagation();const e=null===(i=t.detail.value)||void 0===i?void 0:i.command;e&&this.commandbus.handle(e)},this.handleNotificationListItemClick=()=>{this.interact.emit(this.item)}}render(){var t,i;return e(r,{key:"821047fce457dc9646aa5c6c6f6afa1d8a53bd49",id:this.item.id,class:{"is-clickable":this.isItemClickable(),"is-read":!!(null===(t=this.item)||void 0===t?void 0:t.read),"is-selected":!!(null===(i=this.item)||void 0===i?void 0:i.selected)},onClick:this.handleClick,onKeyDown:this.handleKeyDown,tabindex:0},this.renderSource(),this.renderContent())}isItemClickable(){var t;return!!(null===(t=this.item)||void 0===t?void 0:t.clickable)}renderSource(){return e("div",{class:"header"},this.renderIcon(),this.renderCaption(),this.renderTimestamp(),this.renderUnpromotedActionsMenu())}renderIcon(){var t,i,r,o;if(this.item.icon)return e("limel-icon",{class:"icon",badge:!0,name:null!==(i=null===(t=this.item.icon)||void 0===t?void 0:t.name)&&void 0!==i?i:"dot_circle",style:{color:`${null===(r=this.item.icon)||void 0===r?void 0:r.color}`,"background-color":`${null===(o=this.item.icon)||void 0===o?void 0:o.backgroundColor}`}})}renderContent(){return e("div",{class:"content"},e("div",{class:"body"},this.renderHeadline(),this.renderValue()),this.renderAuthorPicture())}renderHeadline(){if(this.item.heading)return e("div",{class:"headline"},this.renderHeading())}getAuthorLink(){if(!this.item.author)return;if("string"==typeof this.item.author.name)return this.item.author.name;const{href:t,text:i}=this.item.author.name;return`[${i}](${t})`}renderAuthorPicture(){var t;if(null===(t=this.item.author)||void 0===t?void 0:t.picture)return e("img",{class:"author-avatar",loading:"lazy",src:this.item.author.picture})}renderCaption(){if(this.item.caption)return e("h2",{class:"caption"},this.item.caption)}renderValue(){if(this.item.value)return e("limel-markdown",{class:"body-text",value:this.item.value})}renderUnpromotedActionsMenu(){var t,i;if(!(null===(t=this.item.unpromotedActions)||void 0===t?void 0:t.length))return;const r=this.item.unpromotedActions.map(this.createMenuItem);return e("limel-menu",{class:"unpromoted-actions-menu",items:r,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},e("limel-icon-button",{icon:"menu_2",slot:"trigger",label:null===(i=this.translator)||void 0===i?void 0:i.get("webclient.more-actions")}))}renderTimestamp(){const t=this.item.timestamp;if(t)return e("span",{class:"timestamp"},this.dateTimeFormatter.format(t,"timeofday"))}get dateTimeFormatter(){return this.platform.get(o.DateTimeFormatter)}get translator(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(o.Translate)}get commandbus(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(o.CommandBus)}};a.style='@charset "UTF-8";*{box-sizing:border-box}:host(limebb-notification-item){isolation:isolate;position:relative;box-sizing:border-box;display:flex;flex-direction:column;gap:0.25rem;margin-left:0.5rem;border-radius:0.75rem;border:1px solid rgb(var(--contrast-500))}:host(limebb-notification-item):before{content:"";display:block;position:absolute;left:-1rem;top:0.85rem;border-radius:50%;height:0.5rem;width:0.5rem;transition:background-color 0.2s ease, scale 0.2s cubic-bezier(0.82, 0.3, 0.14, 1.36);scale:var(--limebb-notification-item-unread-badge-scale, 0.6);background-color:var(--limebb-notification-item-unread-badge-color, transparent)}:host(limebb-notification-item:hover) .timestamp{color:rgb(var(--contrast-1100))}:host(limebb-notification-item:hover) .body-text{opacity:1}.header{display:flex;align-items:center;gap:0.25rem;min-height:2rem;padding:0 0 0 0.25rem;margin-bottom:0.25rem}.header:not(:has(.icon)){padding-left:0.75rem}.header:not(:has(.unpromoted-actions-menu)){padding-right:0.5rem}.caption,.timestamp{font-size:0.75rem}.caption{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0;flex-grow:1;font-weight:600;color:rgb(var(--contrast-900))}.timestamp{flex-shrink:0;margin-left:auto;transition:color 0.4s ease, opacity 0.2s ease;color:rgb(var(--contrast-900))}.headline{display:flex;gap:0.25rem;align-items:center}.content{display:flex;min-width:0;gap:0.5rem;padding:0 0.75rem 0.5rem 0.75rem}.heading{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-height:2.5rem;font-size:0.875rem;--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.body{display:flex;flex-direction:column;gap:0.5rem}.body-text{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:3;max-height:4.25rem;transition:opacity 0.2s ease;opacity:0.7}.icon{--icon-background-color:var(--limebb-feed-background-color);flex-shrink:0;width:1.5rem;padding:0.125rem}.author-avatar{border-radius:50%;width:2rem;height:2rem;object-fit:cover;margin-top:auto;margin-right:-0.25rem;margin-left:auto;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none;white-space:nowrap}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:"";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{--button-shadow-normal:none;margin-left:-1rem;margin-bottom:-0.5rem}';export{a as limebb_notification_item}
1
+ import{r as i,c as t,h as e,H as r}from"./p-f_mBf1UZ.js";import{n as o}from"./p-B6a_-5iN.js";const a=class{constructor(r){i(this,r),this.interact=t(this,"interact"),this.handleClick=()=>{this.isItemClickable()&&this.handleNotificationListItemClick()},this.handleKeyDown=i=>{this.isItemClickable()&&"Enter"===i.key&&this.handleNotificationListItemClick()},this.renderHeading=()=>{if(!this.item.heading)return;if(!this.item.author)return e("limel-markdown",{value:this.translator.get(this.item.heading)});const i=this.getAuthorLink(),t=this.translator.get(this.item.heading,{author:i});return e("limel-markdown",{class:"heading",value:t})},this.createMenuItem=i=>{var t,e;return"separator"in i?i:{value:i,text:null!==(t=i.label)&&void 0!==t?t:"",secondaryText:i.description,disabled:i.disabled,icon:null!==(e=i.icon)&&void 0!==e?e:""}},this.handleMenuItemSelect=i=>{var t;i.stopPropagation();const e=null===(t=i.detail.value)||void 0===t?void 0:t.command;e&&this.commandbus.handle(e)},this.handleNotificationListItemClick=()=>{this.interact.emit(this.item)}}render(){var i,t;return e(r,{key:"821047fce457dc9646aa5c6c6f6afa1d8a53bd49",id:this.item.id,class:{"is-clickable":this.isItemClickable(),"is-read":!!(null===(i=this.item)||void 0===i?void 0:i.read),"is-selected":!!(null===(t=this.item)||void 0===t?void 0:t.selected)},onClick:this.handleClick,onKeyDown:this.handleKeyDown,tabindex:0},this.renderSource(),this.renderContent())}isItemClickable(){var i;return!!(null===(i=this.item)||void 0===i?void 0:i.clickable)}renderSource(){return e("div",{class:"header"},this.renderIcon(),this.renderCaption(),this.renderTimestamp(),this.renderUnpromotedActionsMenu())}renderIcon(){var i,t,r,o;if(this.item.icon)return e("limel-icon",{class:"icon",badge:!0,name:null!==(t=null===(i=this.item.icon)||void 0===i?void 0:i.name)&&void 0!==t?t:"dot_circle",style:{color:`${null===(r=this.item.icon)||void 0===r?void 0:r.color}`,"background-color":`${null===(o=this.item.icon)||void 0===o?void 0:o.backgroundColor}`}})}renderContent(){return e("div",{class:"content"},e("div",{class:"body"},this.renderHeadline(),this.renderValue()),this.renderAuthorPicture())}renderHeadline(){if(this.item.heading)return e("div",{class:"headline"},this.renderHeading())}getAuthorLink(){if(!this.item.author)return;if("string"==typeof this.item.author.name)return this.item.author.name;const{href:i,text:t}=this.item.author.name;return`[${t}](${i})`}renderAuthorPicture(){var i;if(null===(i=this.item.author)||void 0===i?void 0:i.picture)return e("img",{class:"author-avatar",loading:"lazy",src:this.item.author.picture})}renderCaption(){if(this.item.caption)return e("h2",{class:"caption"},this.item.caption)}renderValue(){if(this.item.value)return e("limel-markdown",{class:"body-text",value:this.item.value})}renderUnpromotedActionsMenu(){var i,t;if(!(null===(i=this.item.unpromotedActions)||void 0===i?void 0:i.length))return;const r=this.item.unpromotedActions.map(this.createMenuItem);return e("limel-menu",{class:"unpromoted-actions-menu",items:r,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},e("limel-icon-button",{icon:"menu_2",slot:"trigger",label:null===(t=this.translator)||void 0===t?void 0:t.get("webclient.more-actions")}))}renderTimestamp(){const i=this.item.timestamp;if(i)return e("span",{class:"timestamp"},this.dateTimeFormatter.format(i,"timeofday"))}get dateTimeFormatter(){return this.platform.get(o.DateTimeFormatter)}get translator(){var i;return null===(i=this.platform)||void 0===i?void 0:i.get(o.Translate)}get commandbus(){var i;return null===(i=this.platform)||void 0===i?void 0:i.get(o.CommandBus)}};a.style='@charset "UTF-8";*{box-sizing:border-box}:host(limebb-notification-item){isolation:isolate;position:relative;box-sizing:border-box;display:flex;flex-direction:column;gap:0.25rem;margin-left:0.5rem;border-radius:0.75rem;border:1px solid rgb(var(--contrast-500))}:host(limebb-notification-item):before{content:"";display:block;position:absolute;left:-1rem;top:0.85rem;border-radius:50%;height:0.5rem;width:0.5rem;transition:background-color 0.2s ease, scale 0.2s cubic-bezier(0.82, 0.3, 0.14, 1.36);scale:var(--limebb-notification-item-unread-badge-scale, 0.6);background-color:var(--limebb-notification-item-unread-badge-color, transparent)}:host(limebb-notification-item:hover) .timestamp{color:rgb(var(--contrast-1100))}:host(limebb-notification-item:hover) .body-text{opacity:1}.header{display:flex;align-items:center;gap:0.25rem;min-height:2rem;padding:0 0 0 0.25rem;margin-bottom:0.25rem}.header:not(:has(.icon)){padding-left:0.75rem}.header:not(:has(.unpromoted-actions-menu)){padding-right:0.5rem}.caption,.timestamp{font-size:0.75rem}.caption{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0;flex-grow:1;font-weight:600;color:rgb(var(--contrast-900))}.timestamp{flex-shrink:0;margin-left:auto;transition:color 0.4s ease, opacity 0.2s ease;color:rgb(var(--contrast-900))}.headline{display:flex;gap:0.25rem;align-items:center}.content{display:flex;min-width:0;gap:0.5rem;padding:0 0.75rem 0.5rem 0.75rem}.heading{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-height:2.5rem;font-size:0.875rem;--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.body{display:flex;flex-direction:column;gap:0.5rem}.body-text{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:3;max-height:4.25rem;transition:opacity 0.2s ease;opacity:0.7}.icon{--icon-background-color:var(--limebb-feed-background-color);flex-shrink:0;width:1.5rem;padding:0.125rem}.author-avatar{border-radius:50%;width:2rem;height:2rem;object-fit:cover;margin-top:auto;margin-right:-0.25rem;margin-left:auto;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none;white-space:nowrap}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:"";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{--button-shadow-normal:none;margin-left:-1rem;margin-bottom:-0.5rem}';export{a as limebb_notification_item}
@@ -1 +1 @@
1
- import{h as t,r as e,c as i,H as o}from"./p-BK566_jX.js";import{c as n}from"./p-DOULPRTn.js";import"./p-DhGRAeCH.js";const r=["all","any","not-all","none"],l={all:"any",any:"all","not-all":"any",none:"all"},s={all:{color:"rgb(var(--contrast-900))",iconName:"dot_circle",labelKey:"webclient.combinator.all",label:"All of the following",descriptionKey:"webclient.combinator.all.description",description:"Every condition must be met.",negated:!1,delimiterKey:"webclient.delimiter.and",delimiter:"&"},any:{color:"rgb(var(--color-sky-default))",iconName:"centre_point",labelKey:"webclient.combinator.any",label:"Any of the following",descriptionKey:"webclient.combinator.any.description",description:"At least one condition must be met.",negated:!1,delimiterKey:"webclient.delimiter.or",delimiter:"or"},"not-all":{color:"rgb(var(--color-orange-default))",iconName:"dot_circle",labelKey:"webclient.combinator.not-all",label:"Not all of the following",descriptionKey:"webclient.combinator.not-all.description",description:"At least one condition must not be met.",negated:!0,delimiterKey:"webclient.delimiter.and",delimiter:"&"},none:{color:"rgb(var(--color-red-default))",iconName:"centre_point",labelKey:"webclient.combinator.none",label:"None of the following",descriptionKey:"webclient.combinator.none.description",description:"No conditions may be met.",negated:!0,delimiterKey:"webclient.delimiter.or",delimiter:"or"}};function a(t){return 0===t.length?"root":t.join(".")}class c{constructor(t,e=()=>!1){this.adapter=t,this.isVisited=e}describe(t){return this.adapter.describe(t,{visited:this.isVisited(t)})}groupOf(t){const e=this.describe(t);return"group"===e.kind?e:void 0}childrenOf(t){var e;return null===(e=this.groupOf(t))||void 0===e?void 0:e.children}nodeAt(t,e){let i=t;for(const t of e){if(void 0===i)return;const e=this.childrenOf(i);if(!e)return;i=e[t]}return i}groupAt(t,e){const i=this.nodeAt(t,e);return void 0===i?void 0:this.groupOf(i)}contains(t,e){if(void 0===t)return!1;if(t===e)return!0;const i=this.childrenOf(t);return!!(null==i?void 0:i.some((t=>this.contains(t,e))))}autoOpenNodes(t){if(void 0===t)return[];const e=this.describe(t);return"leaf"===e.kind?e.autoOpen?[t]:[]:e.children.flatMap((t=>this.autoOpenNodes(t)))}replaceAt(t,e,i){if(0===e.length)return i;const o=this.groupOf(t);if(!o)return t;const[n,...r]=e,l=o.children;if(!(n in l))return t;const s=this.replaceAt(l[n],r,i);return this.rebuild(o.combinator,function(t,e,i){return[...t.slice(0,e),...void 0===i?[]:[i],...t.slice(e+1)]}(l,n,s))}appendAt(t,e,i){const o=this.groupAt(t,e);return o?this.replaceAt(t,e,this.adapter.group(o.combinator,[...o.children,i])):t}rejoinAt(t,e,i){const o=this.groupAt(t,e);return o?this.replaceAt(t,e,this.adapter.group(i,o.children)):t}negated(t,e,i){const o=this.nodeAt(t,e);if(void 0!==o&&this.adapter.negate)return this.adapter.negate(o,i)}rebuild(t,e){if(0!==e.length)return this.adapter.group(t,e)}}class d{constructor(t){this.fields=t}static empty(){return new d({open:null,pending:null,seen:new Set,autoOpened:new Set})}get openNode(){return this.fields.open}hasSeen(t){return this.fields.seen.has(t)}moveTo(t){const e=this.fields.open,i=this.with({open:t,pending:null});return null===e||e===t?i:i.with({seen:new Set(this.fields.seen).add(e)})}expect(t){return this.with({pending:t})}sync(t,e){return this.followPending(t,e).openWhatAsks(t,e).dropIfGone(t,e)}with(t){return new d(Object.assign(Object.assign({},this.fields),t))}followPending(t,e){return null===this.fields.pending?this:e.contains(t,this.fields.pending)?this.with({open:this.fields.pending,pending:null}):this}openWhatAsks(t,e){const i=e.autoOpenNodes(t),o=i.find((t=>!this.fields.autoOpened.has(t))),n=this.with({autoOpened:new Set(i)});return void 0===o?n:n.moveTo(o)}dropIfGone(t,e){return null===this.fields.open||e.contains(t,this.fields.open)?this:this.with({open:null})}}const u=e=>{var i;return(null===(i=e.issues)||void 0===i?void 0:i.length)?e.issues.map((e=>t("div",{class:"issue"},e))):null},h=(t,e)=>i=>{i.stopPropagation(),e.onDelete(t)},p=e=>{const{node:i,description:o,path:n,ctx:r}=e,l=r.openNode===i;return[t("limel-popover",{class:"leaf",key:a(n),open:l,openDirection:"bottom-start",onClose:f(r)},t(m,{node:i,description:o,path:n,ctx:r}),t("limebb-condition-tree-editor",{platform:r.platform,context:r.context,open:l,editor:o.editor,value:i,heading:o.chip.label,icon:o.chip.icon,negated:r.negatable?o.negated:void 0,readonly:r.readonly,disabled:r.disabled,onNegateChange:w(n,r),onConditionChange:v(n,r)})),t(u,{issues:o.issues})]},m=e=>{const{component:i}=e.description.chip;return i?t(i.name,Object.assign({},i.props,b(e))):t("limebb-filter-chip",Object.assign({},b(e)))};function b(t){const{node:e,description:i,path:o,ctx:n}=t,{chip:r}=i;return{slot:"trigger",platform:n.platform,label:r.label,value:r.value,icon:r.icon,invalid:r.invalid,selected:n.openNode===e,readonly:n.readonly,disabled:n.disabled,removable:!n.readonly,onClick:g(e,i,n),onRemove:h(o,n)}}const g=(t,e,i)=>()=>{(function(t,e){return!!t.editor||e.negatable&&void 0!==t.negated})(e,i)&&!i.disabled&&i.onOpen(t)},f=t=>e=>{e.stopPropagation(),t.onOpen(null)},w=(t,e)=>i=>{i.stopPropagation(),e.onNegate(t,i.detail)},v=(t,e)=>i=>{i.stopPropagation(),e.onConditionChange(t,i.detail)},y=e=>{const{description:i}=e;return"group"===i.kind?t(x,{description:i,path:e.path,ctx:e.ctx}):t(p,{node:e.node,description:i,path:e.path,ctx:e.ctx})},x=e=>{const{description:i,path:o,ctx:n,placeholder:r}=e,l=s[i.combinator],c=n.translate(l.delimiterKey,l.delimiter),d=l.negated?`${n.translate("webclient.delimiter.not","not")} ${c}`:c;return t("div",{class:"group",key:a(o),"data-combinator":i.combinator,style:{"--group-rail-color":l.color}},t("div",{class:"group-header"},function(e,i,o){if(!(e.children.length>1)&&!s[e.combinator].negated)return null;const n=function(t,e){const i=[...t.combinators];return e&&!i.includes(e)&&i.push(e),i.map((e=>{const i=s[e];return{value:e,text:t.translate(i.labelKey,i.label),secondaryText:t.translate(i.descriptionKey,i.description),icon:{name:i.iconName,color:i.color}}}))}(o,e.combinator);return t("limel-select",{class:"combinator",value:n.find((t=>t.value===e.combinator)),options:n,disabled:o.disabled,readonly:o.readonly,onChange:K(i,o)})}(i,o,n),function(e,i,o){return i.readonly?null:t("limel-icon-button",{class:"delete-group",icon:"trash",label:i.translate("webclient.delete-group","Delete this group"),disabled:i.disabled||!!o,onClick:h(e,i)})}(o,n,r)),t(u,{issues:i.issues}),t("ul",{class:"rows"},i.children.map(((e,i)=>{const r=n.walker.describe(e);return t("li",{class:{row:!0,"row--group":"group"===r.kind},"data-marker":d,key:a([...o,i])},t(y,{node:e,description:r,path:[...o,i],ctx:n}))})),function(e,i,o){if(o.readonly)return null;const n=t("limel-chip",{slot:C(o)?"trigger":void 0,class:"add-condition",text:o.translate("webclient.condition","Condition"),disabled:o.disabled||A(o),icon:k(o),onClick:C(o)?void 0:N(e,o)});return t("li",{class:"row","data-marker":i,key:`${a(e)}.add`},O(n,"add-condition-menu",S(e,o),o))}(o,d,n)),function(e,i){if(i.readonly)return null;return O(t("limel-chip",{slot:C(i)?"trigger":void 0,class:"add-group",size:"small",text:i.translate("webclient.group","Group"),disabled:i.disabled||A(i),icon:k(i,"var(--group-rail-color)"),onClick:C(i)?void 0:j(e,i)}),"add-group-menu",_(e,i),i)}(o,n))};function k(t,e){return{name:"plus_math",title:t.translate("webclient.add","Add"),color:e}}function C(t){return!!t.addOptions}function A(t){var e;return 0===(null===(e=t.addOptions)||void 0===e?void 0:e.length)}function O(e,i,o,n){return C(n)?t("limel-menu",{class:i,items:n.addOptions,searcher:n.addSearcher,openDirection:"bottom-start",onSelect:o},e):e}const K=(t,e)=>i=>{var o;i.stopPropagation();const n=null===(o=i.detail)||void 0===o?void 0:o.value;n&&e.onCombinator(t,n)},N=(t,e)=>()=>e.onAddLeaf(t),S=(t,e)=>i=>{i.stopPropagation(),e.onAddLeaf(t,i.detail)},j=(t,e)=>()=>e.onAddGroup(t),_=(t,e)=>i=>{i.stopPropagation(),e.onAddGroup(t,i.detail)},D={kind:"group",combinator:"all",children:[]},G=class{constructor(t){e(this,t),this.change=i(this,"change"),this.combinators=[...r],this.readonly=!1,this.disabled=!1,this.openState=d.empty()}componentWillLoad(){this.buildWalker()}buildWalker(){this.walker=new c(this.adapter,(t=>this.openState.hasSeen(t))),this.syncOpenState()}syncOpenState(){this.adapter&&(this.openState=this.openState.sync(this.value,this.walker))}render(){return this.adapter?t(o,null,this.isEmpty?this.renderEmptyState():t(y,{node:this.value,description:this.walker.describe(this.value),path:[],ctx:this.renderContext()})):t(o,null)}renderEmptyState(){return this.readonly?null:t(x,{description:D,path:[],ctx:this.renderContext(),placeholder:!0})}renderContext(){return{platform:this.platform,context:this.context,walker:this.walker,translate:n(this.platform),combinators:this.combinators,readonly:this.readonly,disabled:this.disabled,negatable:!!this.adapter.negate,openNode:this.openState.openNode,addOptions:this.addOptions,addSearcher:this.addSearcher,onAddLeaf:(t,e)=>this.addLeaf(t,e),onAddGroup:(t,e)=>this.addGroup(t,e),onDelete:t=>this.applyEdit((e=>this.walker.replaceAt(e,t,void 0))),onCombinator:(t,e)=>this.applyEdit((i=>this.walker.rejoinAt(i,t,e))),onNegate:(t,e)=>this.negate(t,e),onConditionChange:(t,e)=>{this.openState=this.openState.expect(e),this.applyEdit((i=>this.walker.replaceAt(i,t,e)))},onOpen:t=>{this.openState=this.openState.moveTo(t)}}}negate(t,e){const i=this.walker.negated(this.value,t,e);void 0!==i&&(this.openState=this.openState.expect(i),this.applyEdit((e=>this.walker.replaceAt(e,t,i))))}addLeaf(t,e){this.grow(t,this.adapter.createLeaf(e))}addGroup(t,e){var i,o;const n=null!==(o=null===(i=this.walker.groupAt(this.value,t))||void 0===i?void 0:i.combinator)&&void 0!==o?o:this.rootCombinator();this.grow(t,this.adapter.group(function(t){return l[t]}(n),[this.adapter.createLeaf(e)]))}grow(t,e){this.emitChange(this.isEmpty?this.adapter.group(this.rootCombinator(),[e]):this.walker.appendAt(this.value,t,e))}applyEdit(t){this.isEmpty||this.emitChange(t(this.value))}emitChange(t){this.readonly||this.disabled||this.change.emit(t)}get isEmpty(){return null==this.value}rootCombinator(){var t;return null!==(t=this.combinators[0])&&void 0!==t?t:"all"}static get watchers(){return{adapter:[{buildWalker:0}],value:[{syncOpenState:0}]}}};G.style='*,*:before,*::after{box-sizing:border-box}:host{display:flex;flex-direction:column;gap:1.5rem}.group{position:relative;display:flex;flex-direction:column;gap:1rem;padding:0.5rem;border-radius:0.75rem;background-color:rgb(var(--contrast-800), 0.15);transition:box-shadow 120ms ease}.group:before{content:"";position:absolute;top:1rem;bottom:calc(1rem + 1.75rem);left:0;width:0.125rem;transform:translateX(-50%);border-radius:1rem;background-color:var(--group-rail-color)}.group:has(>.group-header>limel-icon-button.delete-group:not([disabled]):hover),.group:has(>.group-header>limel-icon-button.delete-group:not([disabled]):focus-within){box-shadow:var(--shadow-error-state)}.group-header{display:flex;align-items:center;gap:0.5rem;min-height:2.5rem}limel-select.combinator{min-width:12rem}limel-icon-button.delete-group{margin-left:auto;opacity:0;transition:opacity 120ms ease}.group:hover>.group-header>limel-icon-button.delete-group,.group:focus-within>.group-header>limel-icon-button.delete-group{opacity:1}limel-chip.add-group{--lime-elevated-surface-background-color:transparent;--button-shadow-normal:none;isolation:isolate;position:relative;margin-right:auto}limel-chip.add-group:after{content:"";position:absolute;width:0.5rem;height:1.75rem;top:0;left:calc(0.5rem * -1 - 0.125rem / 2);border-width:0 0 0.125rem 0.125rem;border-color:var(--group-rail-color);border-style:solid;border-radius:0 0 0 0.5rem;transform:translateY(calc(-50% - 0.125rem / 2))}ul.rows{list-style:none;margin:0;display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;column-gap:0.5rem;row-gap:0.5rem;padding:0 0.5rem 0.5rem 0.5rem}li.row{list-style:none;position:relative}li.row.row--group{flex-basis:100%;align-self:stretch}li.row+li.row:before{content:attr(data-marker);color:var(--group-rail-color);font-size:0.75rem;font-weight:600;line-height:normal}li.row+li.row.row--group:before{position:absolute;left:0;top:0;transform:translate(-50%, -50%)}li.row+li.row:not(.row--group){display:inline-flex;align-items:center;flex-wrap:wrap}li.row+li.row:not(.row--group):before{margin-right:0.5rem}limel-popover.leaf{display:inline-block;max-width:25rem}.issue{color:rgb(var(--color-red-default));font-size:0.875rem;flex-basis:100%}';export{G as limebb_condition_tree}
1
+ import{h as t,r as e,c as i,H as o}from"./p-f_mBf1UZ.js";import{c as r}from"./p-Bub25YTw.js";import"./p-B6a_-5iN.js";const n=["all","any","not-all","none"],l={all:"any",any:"all","not-all":"any",none:"all"},s={all:{color:"rgb(var(--contrast-900))",iconName:"dot_circle",labelKey:"webclient.combinator.all",label:"All of the following",descriptionKey:"webclient.combinator.all.description",description:"Every condition must be met.",negated:!1,delimiterKey:"webclient.delimiter.and",delimiter:"&"},any:{color:"rgb(var(--color-sky-default))",iconName:"centre_point",labelKey:"webclient.combinator.any",label:"Any of the following",descriptionKey:"webclient.combinator.any.description",description:"At least one condition must be met.",negated:!1,delimiterKey:"webclient.delimiter.or",delimiter:"or"},"not-all":{color:"rgb(var(--color-orange-default))",iconName:"dot_circle",labelKey:"webclient.combinator.not-all",label:"Not all of the following",descriptionKey:"webclient.combinator.not-all.description",description:"At least one condition must not be met.",negated:!0,delimiterKey:"webclient.delimiter.and",delimiter:"&"},none:{color:"rgb(var(--color-red-default))",iconName:"centre_point",labelKey:"webclient.combinator.none",label:"None of the following",descriptionKey:"webclient.combinator.none.description",description:"No conditions may be met.",negated:!0,delimiterKey:"webclient.delimiter.or",delimiter:"or"}};function a(t){return 0===t.length?"root":t.join(".")}class c{constructor(t,e=()=>!1){this.adapter=t,this.isVisited=e}describe(t){return this.adapter.describe(t,{visited:this.isVisited(t)})}groupOf(t){const e=this.describe(t);return"group"===e.kind?e:void 0}childrenOf(t){var e;return null===(e=this.groupOf(t))||void 0===e?void 0:e.children}nodeAt(t,e){let i=t;for(const t of e){if(void 0===i)return;const e=this.childrenOf(i);if(!e)return;i=e[t]}return i}groupAt(t,e){const i=this.nodeAt(t,e);return void 0===i?void 0:this.groupOf(i)}contains(t,e){if(void 0===t)return!1;if(t===e)return!0;const i=this.childrenOf(t);return!!(null==i?void 0:i.some((t=>this.contains(t,e))))}autoOpenNodes(t){if(void 0===t)return[];const e=this.describe(t);return"leaf"===e.kind?e.autoOpen?[t]:[]:e.children.flatMap((t=>this.autoOpenNodes(t)))}replaceAt(t,e,i){if(0===e.length)return i;const o=this.groupOf(t);if(!o)return t;const[r,...n]=e,l=o.children;if(!(r in l))return t;const s=this.replaceAt(l[r],n,i);return this.rebuild(o.combinator,function(t,e,i){return[...t.slice(0,e),...void 0===i?[]:[i],...t.slice(e+1)]}(l,r,s))}appendAt(t,e,i){const o=this.groupAt(t,e);return o?this.replaceAt(t,e,this.adapter.group(o.combinator,[...o.children,i])):t}rejoinAt(t,e,i){const o=this.groupAt(t,e);return o?this.replaceAt(t,e,this.adapter.group(i,o.children)):t}negated(t,e,i){const o=this.nodeAt(t,e);if(void 0!==o&&this.adapter.negate)return this.adapter.negate(o,i)}rebuild(t,e){if(0!==e.length)return this.adapter.group(t,e)}}class d{constructor(t){this.fields=t}static empty(){return new d({open:null,pending:null,seen:new Set,autoOpened:new Set})}get openNode(){return this.fields.open}hasSeen(t){return this.fields.seen.has(t)}moveTo(t){const e=this.fields.open,i=this.with({open:t,pending:null});return null===e||e===t?i:i.with({seen:new Set(this.fields.seen).add(e)})}expect(t){return this.with({pending:t})}sync(t,e){return this.followPending(t,e).openWhatAsks(t,e).dropIfGone(t,e)}with(t){return new d(Object.assign(Object.assign({},this.fields),t))}followPending(t,e){return null===this.fields.pending?this:e.contains(t,this.fields.pending)?this.with({open:this.fields.pending,pending:null}):this}openWhatAsks(t,e){const i=e.autoOpenNodes(t),o=i.find((t=>!this.fields.autoOpened.has(t))),r=this.with({autoOpened:new Set(i)});return void 0===o?r:r.moveTo(o)}dropIfGone(t,e){return null===this.fields.open||e.contains(t,this.fields.open)?this:this.with({open:null})}}const u=e=>{var i;return(null===(i=e.issues)||void 0===i?void 0:i.length)?e.issues.map((e=>t("div",{class:"issue"},e))):null},h=(t,e)=>i=>{i.stopPropagation(),e.onDelete(t)},p=e=>{const{node:i,description:o,path:r,ctx:n}=e,l=n.openNode===i;return[t("limel-popover",{class:"leaf",key:a(r),open:l,openDirection:"bottom-start",onClose:f(n)},t(m,{node:i,description:o,path:r,ctx:n}),t("limebb-condition-tree-editor",{platform:n.platform,context:n.context,open:l,editor:o.editor,value:i,heading:o.chip.label,icon:o.chip.icon,negated:n.negatable?o.negated:void 0,readonly:n.readonly,disabled:n.disabled,onNegateChange:w(r,n),onConditionChange:v(r,n)})),t(u,{issues:o.issues})]},m=e=>{const{component:i}=e.description.chip;return i?t(i.name,Object.assign({},i.props,b(e))):t("limebb-filter-chip",Object.assign({},b(e)))};function b(t){const{node:e,description:i,path:o,ctx:r}=t,{chip:n}=i;return{slot:"trigger",platform:r.platform,label:n.label,value:n.value,icon:n.icon,invalid:n.invalid,selected:r.openNode===e,readonly:r.readonly,disabled:r.disabled,removable:!r.readonly,onClick:g(e,i,r),onRemove:h(o,r)}}const g=(t,e,i)=>()=>{(function(t,e){return!!t.editor||e.negatable&&void 0!==t.negated})(e,i)&&!i.disabled&&i.onOpen(t)},f=t=>e=>{e.stopPropagation(),t.onOpen(null)},w=(t,e)=>i=>{i.stopPropagation(),e.onNegate(t,i.detail)},v=(t,e)=>i=>{i.stopPropagation(),e.onConditionChange(t,i.detail)},y=e=>{const{description:i}=e;return"group"===i.kind?t(x,{description:i,path:e.path,ctx:e.ctx}):t(p,{node:e.node,description:i,path:e.path,ctx:e.ctx})},x=e=>{const{description:i,path:o,ctx:r,placeholder:n}=e,l=s[i.combinator],c=r.translate(l.delimiterKey,l.delimiter),d=l.negated?`${r.translate("webclient.delimiter.not","not")} ${c}`:c;return t("div",{class:"group",key:a(o),"data-combinator":i.combinator,style:{"--group-rail-color":l.color}},t("div",{class:"group-header"},function(e,i,o){if(!(e.children.length>1)&&!s[e.combinator].negated)return null;const r=function(t,e){const i=[...t.combinators];return e&&!i.includes(e)&&i.push(e),i.map((e=>{const i=s[e];return{value:e,text:t.translate(i.labelKey,i.label),secondaryText:t.translate(i.descriptionKey,i.description),icon:{name:i.iconName,color:i.color}}}))}(o,e.combinator);return t("limel-select",{class:"combinator",value:r.find((t=>t.value===e.combinator)),options:r,disabled:o.disabled,readonly:o.readonly,onChange:O(i,o)})}(i,o,r),function(e,i,o){return i.readonly?null:t("limel-icon-button",{class:"delete-group",icon:"trash",label:i.translate("webclient.delete-group","Delete this group"),disabled:i.disabled||!!o,onClick:h(e,i)})}(o,r,n)),t(u,{issues:i.issues}),t("ul",{class:"rows"},i.children.map(((e,i)=>{const n=r.walker.describe(e);return t("li",{class:{row:!0,"row--group":"group"===n.kind},"data-marker":d,key:a([...o,i])},t(y,{node:e,description:n,path:[...o,i],ctx:r}))})),function(e,i,o){if(o.readonly)return null;const r=t("limel-chip",{slot:C(o)?"trigger":void 0,class:"add-condition",text:o.translate("webclient.condition","Condition"),disabled:o.disabled||A(o),icon:k(o),onClick:C(o)?void 0:K(e,o)});return t("li",{class:"row","data-marker":i,key:`${a(e)}.add`},N(r,"add-condition-menu",S(e,o),o))}(o,d,r)),function(e,i){if(i.readonly)return null;return N(t("limel-chip",{slot:C(i)?"trigger":void 0,class:"add-group",size:"small",text:i.translate("webclient.group","Group"),disabled:i.disabled||A(i),icon:k(i,"var(--group-rail-color)"),onClick:C(i)?void 0:_(e,i)}),"add-group-menu",j(e,i),i)}(o,r))};function k(t,e){return{name:"plus_math",title:t.translate("webclient.add","Add"),color:e}}function C(t){return!!t.addOptions}function A(t){var e;return 0===(null===(e=t.addOptions)||void 0===e?void 0:e.length)}function N(e,i,o,r){return C(r)?t("limel-menu",{class:i,items:r.addOptions,searcher:r.addSearcher,openDirection:"bottom-start",onSelect:o},e):e}const O=(t,e)=>i=>{var o;i.stopPropagation();const r=null===(o=i.detail)||void 0===o?void 0:o.value;r&&e.onCombinator(t,r)},K=(t,e)=>()=>e.onAddLeaf(t),S=(t,e)=>i=>{i.stopPropagation(),e.onAddLeaf(t,i.detail)},_=(t,e)=>()=>e.onAddGroup(t),j=(t,e)=>i=>{i.stopPropagation(),e.onAddGroup(t,i.detail)},z={kind:"group",combinator:"all",children:[]},D=class{constructor(t){e(this,t),this.change=i(this,"change"),this.combinators=[...n],this.readonly=!1,this.disabled=!1,this.openState=d.empty()}componentWillLoad(){this.buildWalker()}buildWalker(){this.walker=new c(this.adapter,(t=>this.openState.hasSeen(t))),this.syncOpenState()}syncOpenState(){this.adapter&&(this.openState=this.openState.sync(this.value,this.walker))}render(){return this.adapter?t(o,null,this.isEmpty?this.renderEmptyState():t(y,{node:this.value,description:this.walker.describe(this.value),path:[],ctx:this.renderContext()})):t(o,null)}renderEmptyState(){return this.readonly?null:t(x,{description:z,path:[],ctx:this.renderContext(),placeholder:!0})}renderContext(){return{platform:this.platform,context:this.context,walker:this.walker,translate:r(this.platform),combinators:this.combinators,readonly:this.readonly,disabled:this.disabled,negatable:!!this.adapter.negate,openNode:this.openState.openNode,addOptions:this.addOptions,addSearcher:this.addSearcher,onAddLeaf:(t,e)=>this.addLeaf(t,e),onAddGroup:(t,e)=>this.addGroup(t,e),onDelete:t=>this.applyEdit((e=>this.walker.replaceAt(e,t,void 0))),onCombinator:(t,e)=>this.applyEdit((i=>this.walker.rejoinAt(i,t,e))),onNegate:(t,e)=>this.negate(t,e),onConditionChange:(t,e)=>{this.openState=this.openState.expect(e),this.applyEdit((i=>this.walker.replaceAt(i,t,e)))},onOpen:t=>{this.openState=this.openState.moveTo(t)}}}negate(t,e){const i=this.walker.negated(this.value,t,e);void 0!==i&&(this.openState=this.openState.expect(i),this.applyEdit((e=>this.walker.replaceAt(e,t,i))))}addLeaf(t,e){this.grow(t,this.adapter.createLeaf(e))}addGroup(t,e){var i,o;const r=null!==(o=null===(i=this.walker.groupAt(this.value,t))||void 0===i?void 0:i.combinator)&&void 0!==o?o:this.rootCombinator();this.grow(t,this.adapter.group(function(t){return l[t]}(r),[this.adapter.createLeaf(e)]))}grow(t,e){this.emitChange(this.isEmpty?this.adapter.group(this.rootCombinator(),[e]):this.walker.appendAt(this.value,t,e))}applyEdit(t){this.isEmpty||this.emitChange(t(this.value))}emitChange(t){this.readonly||this.disabled||this.change.emit(t)}get isEmpty(){return null==this.value}rootCombinator(){var t;return null!==(t=this.combinators[0])&&void 0!==t?t:"all"}static get watchers(){return{adapter:[{buildWalker:0}],value:[{syncOpenState:0}]}}};D.style='*,*:before,*::after{box-sizing:border-box}:host{display:flex;flex-direction:column;gap:1.5rem}.group{position:relative;display:flex;flex-direction:column;gap:1rem;padding:0.5rem;border-radius:0.75rem;background-color:rgb(var(--contrast-800), 0.15);transition:box-shadow 120ms ease}.group:before{content:"";position:absolute;top:1rem;bottom:calc(1rem + 1.75rem);left:0;width:0.125rem;transform:translateX(-50%);border-radius:1rem;background-color:var(--group-rail-color)}.group:has(>.group-header>limel-icon-button.delete-group:not([disabled]):hover),.group:has(>.group-header>limel-icon-button.delete-group:not([disabled]):focus-within){box-shadow:var(--shadow-error-state)}.group-header{display:flex;align-items:center;gap:0.5rem;min-height:2.5rem}limel-select.combinator{min-width:12rem}limel-icon-button.delete-group{margin-left:auto;opacity:0;transition:opacity 120ms ease}.group:hover>.group-header>limel-icon-button.delete-group,.group:focus-within>.group-header>limel-icon-button.delete-group{opacity:1}limel-chip.add-group{--lime-elevated-surface-background-color:transparent;--button-shadow-normal:none;isolation:isolate;position:relative;margin-right:auto}limel-chip.add-group:after{content:"";position:absolute;width:0.5rem;height:1.75rem;top:0;left:calc(0.5rem * -1 - 0.125rem / 2);border-width:0 0 0.125rem 0.125rem;border-color:var(--group-rail-color);border-style:solid;border-radius:0 0 0 0.5rem;transform:translateY(calc(-50% - 0.125rem / 2))}ul.rows{list-style:none;margin:0;display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;column-gap:0.5rem;row-gap:0.5rem;padding:0 0.5rem 0.5rem 0.5rem}li.row{list-style:none;position:relative}li.row.row--group{flex-basis:100%;align-self:stretch}li.row+li.row:before{content:attr(data-marker);color:var(--group-rail-color);font-size:0.75rem;font-weight:600;line-height:normal}li.row+li.row.row--group:before{position:absolute;left:0;top:0;transform:translate(-50%, -50%)}li.row+li.row:not(.row--group){display:inline-flex;align-items:center;flex-wrap:wrap}li.row+li.row:not(.row--group):before{margin-right:0.5rem}limel-popover.leaf{display:inline-block;max-width:25rem}.issue{color:rgb(var(--color-red-default));font-size:0.875rem;flex-basis:100%}';export{D as limebb_condition_tree}
@@ -1 +1 @@
1
- import{r as e,h as r}from"./p-BK566_jX.js";const o=class{constructor(r){e(this,r)}render(){return[r("div",{key:"02407fa43e06e6e634b542a4f37e2c0fad7658e8",class:"header"},r("limel-icon",{key:"718c73e93bc8898e28ae94f3576a33b87ce7038d",name:"not_showing_video_frames"}),r("h2",{key:"2b9c6d298551499c92d29da9e7ffbcfb9c358885"},"Viewing this file type requires ",r("em",{key:"5802a6ae90b7b94cc06dad829b4e69186551b52a"},"Live Docs"))),r("p",{key:"22bda139aa0c3f8d7127639d22c51dbe22628722"},r("em",{key:"d35dfbee9a70cb7c86458d3de2c6e01f7ea8d18f"},"Live Docs")," not only enables you to view many file formats such as Microsoft Office documents, but it also empowers you to edit them right in the CRM. No need to download anything on your device!",r("a",{key:"f9d0d15458c623435108c41c83bf5d29e710cfab",target:"_blank",href:"https://www.lime-technologies.com/en/lime-crm/live-docs/"},"Learn more"))]}};o.style=":host(limebb-live-docs-info){padding:1rem 2rem;display:flex;flex-direction:column;gap:0.5rem;border-style:dashed;border-color:rgb(var(--contrast-700));border-radius:0 0 0.5rem 0.5rem;border-width:0 1px 1px 1px}.header{display:flex;align-items:center;gap:0.5rem}h2,p{margin:0;color:rgb(var(--contrast-1100))}h2{font-size:large;font-weight:300}limel-icon{color:rgb(var(--color-orange-default));width:2rem}a{all:unset;cursor:pointer;transition:color 0.2s ease;color:rgb(var(--color-sky-default));margin-left:0.5rem}a:hover{color:rgb(var(--color-sky-dark));text-decoration:underline}";export{o as limebb_live_docs_info}
1
+ import{r as e,h as r}from"./p-f_mBf1UZ.js";const o=class{constructor(r){e(this,r)}render(){return[r("div",{key:"02407fa43e06e6e634b542a4f37e2c0fad7658e8",class:"header"},r("limel-icon",{key:"718c73e93bc8898e28ae94f3576a33b87ce7038d",name:"not_showing_video_frames"}),r("h2",{key:"2b9c6d298551499c92d29da9e7ffbcfb9c358885"},"Viewing this file type requires ",r("em",{key:"5802a6ae90b7b94cc06dad829b4e69186551b52a"},"Live Docs"))),r("p",{key:"22bda139aa0c3f8d7127639d22c51dbe22628722"},r("em",{key:"d35dfbee9a70cb7c86458d3de2c6e01f7ea8d18f"},"Live Docs")," not only enables you to view many file formats such as Microsoft Office documents, but it also empowers you to edit them right in the CRM. No need to download anything on your device!",r("a",{key:"f9d0d15458c623435108c41c83bf5d29e710cfab",target:"_blank",href:"https://www.lime-technologies.com/en/lime-crm/live-docs/"},"Learn more"))]}};o.style=":host(limebb-live-docs-info){padding:1rem 2rem;display:flex;flex-direction:column;gap:0.5rem;border-style:dashed;border-color:rgb(var(--contrast-700));border-radius:0 0 0.5rem 0.5rem;border-width:0 1px 1px 1px}.header{display:flex;align-items:center;gap:0.5rem}h2,p{margin:0;color:rgb(var(--contrast-1100))}h2{font-size:large;font-weight:300}limel-icon{color:rgb(var(--color-orange-default));width:2rem}a{all:unset;cursor:pointer;transition:color 0.2s ease;color:rgb(var(--color-sky-default));margin-left:0.5rem}a:hover{color:rgb(var(--color-sky-dark));text-decoration:underline}";export{o as limebb_live_docs_info}
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as i}from"./p-f_mBf1UZ.js";import{k as s}from"./p-B6a_-5iN.js";import{L as r}from"./p-CCeLGIvD.js";import{c as a}from"./p-Bub25YTw.js";const n=class{constructor(i){t(this,i),this.negateChange=e(this,"negateChange"),this.conditionChange=e(this,"conditionChange"),this.open=!1,this.readonly=!1,this.disabled=!1,this.handleNegate=t=>{t.stopPropagation(),this.negateChange.emit(t.detail)},this.handleConditionChange=t=>{t.stopPropagation(),this.conditionChange.emit(t.detail)}}render(){return this.open?[this.renderHeader(),this.renderBody()]:null}renderHeader(){return void 0===this.negated?null:i("limel-header",{class:"header is-narrow",heading:this.heading,icon:this.icon},this.renderNegate())}renderNegate(){return this.readonly?null:i("div",{slot:"actions",class:"header-actions"},i("limel-switch",{class:"negate",label:this.negateLabel,value:this.negated,disabled:this.disabled,onChange:this.handleNegate}))}renderBody(){return this.editor?i(r,{class:"editor",platform:this.platform,context:this.context,name:this.editor.name,props:Object.assign(Object.assign({},this.editor.props),{value:this.value,readonly:this.readonly,disabled:this.disabled,onConditionChange:this.handleConditionChange})}):null}get negateLabel(){return a(this.platform)("webclient.negate","Negate")}};(function(t,e,i,s){var r,a=arguments.length,n=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(n=(a<3?r(n):a>3?r(e,i,n):r(e,i))||n);a>3&&n&&Object.defineProperty(e,i,n)})([s("context")],n.prototype,"context",void 0),n.style=":host{display:contents}limel-header.header{--header-background-color:rgba(var(--contrast-300));padding-right:0.5rem;gap:1rem}.header-actions{display:grid;grid-auto-flow:column;grid-gap:0.75rem;padding:0.25rem;align-items:center}";export{n as limebb_condition_tree_editor}
@@ -1 +1 @@
1
- import{r,c as n,h as t}from"./p-BK566_jX.js";import{n as u}from"./p-DhGRAeCH.js";import{t as e,c as i,a as f,i as o,g as a,b as c,d as s}from"./p-BsH0YW6Z.js";import{e as l,f as v,h as d,j as h,S as p,k as m,l as b,d as g}from"./p-CtcTT7BK.js";import{c as j,e as y,a as A,S as w}from"./p-BgAfMcRA.js";import{b as x}from"./p-CKEnwX6j.js";import{i as k}from"./p-6PYziigk.js";import{d as O}from"./p-Ceen0vzd.js";function C(r){return r}var S,_,B,R=Date.now,E=O?function(r,n){return O(r,"toString",{configurable:!0,enumerable:!1,value:(t=n,function(){return t}),writable:!0});var t}:C,K=(S=E,_=0,B=0,function(){var r=R(),n=16-(r-B);if(B=r,n>0){if(++_>=800)return arguments[0]}else _=0;return S.apply(void 0,arguments)}),T=Math.max;function z(r,n,t){if(!j(t))return!1;var u=typeof n;return!!("number"==u?l(t)&&v(n,t.length):"string"==u&&n in t)&&y(t[n],r)}var D=w?w.isConcatSpreadable:void 0;function H(r){return A(r)||d(r)||!!(D&&r&&r[D])}var M=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function U(r){return M.test(r)}var W="\\ud800-\\udfff",X="["+W+"]",Y="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",q="\\ud83c[\\udffb-\\udfff]",G="[^"+W+"]",I="(?:\\ud83c[\\udde6-\\uddff]){2}",L="[\\ud800-\\udbff][\\udc00-\\udfff]",P="(?:"+Y+"|"+q+")?",Z="[\\ufe0e\\ufe0f]?",F=Z+P+"(?:\\u200d(?:"+[G,I,L].join("|")+")"+Z+P+")*",J="(?:"+[G+Y+"?",Y,I,L,X].join("|")+")",N=RegExp(q+"(?="+q+")|"+J+F,"g");var Q=function(r){var n,t,u,i,f=U(r=e(r))?function(r){return U(r)?function(r){return r.match(N)||[]}(r):function(r){return r.split("")}(r)}(r):void 0,o=f?f[0]:r.charAt(0),a=f?(n=f,t=1,i=n.length,u=void 0===u?i:u,!t&&u>=i?n:function(r,n,t){var u=-1,e=r.length;n<0&&(n=-n>e?0:e+n),(t=t>e?e:t)<0&&(t+=e),e=n>t?0:t-n>>>0,n>>>=0;for(var i=Array(e);++u<e;)i[u]=r[u+n];return i}(n,t,u)).join(""):r.slice(1);return o.toUpperCase()+a};function V(r){return r==r&&!j(r)}function $(r,n){return function(t){return null!=t&&t[r]===n&&(void 0!==n||r in Object(t))}}function rr(r,n){return null!=r&&n in Object(r)}function nr(r){return"function"==typeof r?r:null==r?C:"object"==typeof r?A(r)?(e=r[1],o(u=r[0])&&V(e)?$(f(u),e):function(r){var n=a(r,u);return void 0===n&&n===e?function(r,n){return null!=r&&function(r,n,t){for(var u=-1,e=(n=i(n,r)).length,o=!1;++u<e;){var a=f(n[u]);if(!(o=null!=r&&t(r,a)))break;r=r[a]}return o||++u!=e?o:!!(e=null==r?0:r.length)&&b(e)&&v(a,e)&&(A(r)||d(r))}(r,n,rr)}(r,u):x(e,n,3)}):(t=function(r){for(var n=m(r),t=n.length;t--;){var u=n[t],e=r[u];n[t]=[u,e,V(e)]}return n}(n=r),1==t.length&&t[0][2]?$(t[0][0],t[0][1]):function(r){return r===n||function(r,n,t){var u=t.length,e=u;if(null==r)return!e;for(r=Object(r);u--;){var i=t[u];if(i[2]?i[1]!==r[i[0]]:!(i[0]in r))return!1}for(;++u<e;){var f=(i=t[u])[0],o=r[f],a=i[1];if(i[2]){if(void 0===o&&!(f in r))return!1}else{var c=new p;if(!x(a,o,3,void 0,c))return!1}}return!0}(r,0,t)}):function(r){return o(r)?(n=f(r),function(r){return null==r?void 0:r[n]}):function(r){return function(n){return c(n,r)}}(r);var n}(r);var n,t,u,e}var tr,ur=(tr=function(r,n){return r&&function(r,n,t){for(var u=-1,e=Object(r),i=t(r),f=i.length;f--;){var o=i[++u];if(!1===n(e[o],o,e))break}return r}(r,n,m)},function(r,n){if(null==r)return r;if(!l(r))return tr(r,n);for(var t=r.length,u=-1,e=Object(r);++u<t&&!1!==n(e[u],u,e););return r});function er(r,n){if(r!==n){var t=void 0!==r,u=null===r,e=r==r,i=k(r),f=void 0!==n,o=null===n,a=n==n,c=k(n);if(!o&&!c&&!i&&r>n||i&&f&&a&&!o&&!c||u&&f&&a||!t&&a||!e)return 1;if(!u&&!i&&!c&&r<n||c&&t&&e&&!u&&!i||o&&t&&e||!f&&e||!a)return-1}return 0}function ir(r,n,t){n=n.length?s(n,(function(r){return A(r)?function(n){return c(n,1===r.length?r[0]:r)}:r})):[C];var u=-1;n=s(n,g(nr));var e=function(r,n){var t=-1,u=l(r)?Array(r.length):[];return ur(r,(function(r){u[++t]=n(r)})),u}(r,(function(r){return{criteria:s(n,(function(n){return n(r)})),index:++u,value:r}}));return function(r){var n=r.length;for(r.sort((function(r,n){return function(r,n,t){for(var u=-1,e=r.criteria,i=n.criteria,f=e.length,o=t.length;++u<f;){var a=er(e[u],i[u]);if(a)return u>=o?a:a*("desc"==t[u]?-1:1)}return r.index-n.index}(r,n,t)}));n--;)r[n]=r[n].value;return r}(e)}var fr=function(r){return K(function(r,n,t){return n=T(void 0===n?r.length-1:n,0),function(){for(var u=arguments,e=-1,i=T(u.length-n,0),f=Array(i);++e<i;)f[e]=u[n+e];e=-1;for(var o=Array(n+1);++e<n;)o[e]=u[e];return o[n]=t(f),function(r,n,t){switch(t.length){case 0:return r.call(n);case 1:return r.call(n,t[0]);case 2:return r.call(n,t[0],t[1]);case 3:return r.call(n,t[0],t[1],t[2])}return r.apply(n,t)}(r,this,o)}}(r,void 0,C),r+"")}((function(r,n){if(null==r)return[];var t=n.length;return t>1&&z(r,n[0],n[1])?n=[]:t>2&&z(n[0],n[1],n[2])&&(n=[n[0]]),ir(r,function(r,n,t,u,e){var i=-1,f=r.length;for(t||(t=H),e||(e=[]);++i<f;){var o=r[i];t(o)?h(e,o):e[e.length]=o}return e}(n),[])}));function or(r,n){if(0===r.length||0===n.length)return"";r="en_us"===r?"en-US":r,n="en_us"===n?"en-US":n;const t=(new Intl.DisplayNames(n,{type:"language"}).of(r)||"").split(" ");return t[0]=Q(e(t[0]).toLowerCase()),t.join(" ")}const ar=class{constructor(t){r(this,t),this.change=n(this,"change"),this.context={limetype:null,id:null},this.handleChange=r=>{r.stopPropagation(),this.change.emit(this.multipleChoice?r.detail.map((r=>r.value)):r.detail.value)}}async componentWillLoad(){try{this.http=this.platform.get(u.Http),this.allLanguages=await async function(r){const n=await r.get("api/v1/admin/settings/languages"),t=[];return(null==n?void 0:n.active)&&t.push(...n.active),(null==n?void 0:n.inactive)&&t.push(...n.inactive),t}(this.http)}catch(r){console.error(r)}}getOptions(){return this.allLanguages.map((r=>({value:r,text:or(r,r)})))}render(){const r=this.getOptions();let n;if(Array.isArray(this.value)){const t=this.value;n=r.filter((r=>t.includes(r.value)))}else{const t=this.value;n=r.find((r=>r.value===t))}return t("limel-select",{key:"54aa5665273199c08b9f638c5cc485ee2ebf93a8",value:n,options:fr(r,"text"),helperText:this.helperText,label:this.label,required:this.required,disabled:this.disabled,readonly:this.readonly,onChange:this.handleChange,multiple:this.multipleChoice})}};export{ar as limebb_locale_picker}
1
+ import{r,c as n,h as t}from"./p-f_mBf1UZ.js";import{n as u}from"./p-B6a_-5iN.js";import{t as e,c as i,a as f,i as o,g as a,b as c,d as s}from"./p-BsH0YW6Z.js";import{e as l,f as v,h as d,j as h,S as p,k as m,l as b,d as g}from"./p-CtcTT7BK.js";import{c as j,e as y,a as w,S as x}from"./p-BgAfMcRA.js";import{b as A}from"./p-CKEnwX6j.js";import{i as k}from"./p-6PYziigk.js";import{d as O}from"./p-Ceen0vzd.js";function _(r){return r}var B,S,C,E=Date.now,R=O?function(r,n){return O(r,"toString",{configurable:!0,enumerable:!1,value:(t=n,function(){return t}),writable:!0});var t}:_,T=(B=R,S=0,C=0,function(){var r=E(),n=16-(r-C);if(C=r,n>0){if(++S>=800)return arguments[0]}else S=0;return B.apply(void 0,arguments)}),U=Math.max;function z(r,n,t){if(!j(t))return!1;var u=typeof n;return!!("number"==u?l(t)&&v(n,t.length):"string"==u&&n in t)&&y(t[n],r)}var K=x?x.isConcatSpreadable:void 0;function M(r){return w(r)||d(r)||!!(K&&r&&r[K])}var W=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Y(r){return W.test(r)}var Z="\\ud800-\\udfff",q="["+Z+"]",D="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",H="\\ud83c[\\udffb-\\udfff]",I="[^"+Z+"]",L="(?:\\ud83c[\\udde6-\\uddff]){2}",N="[\\ud800-\\udbff][\\udc00-\\udfff]",P="(?:"+D+"|"+H+")?",X="[\\ufe0e\\ufe0f]?",F=X+P+"(?:\\u200d(?:"+[I,L,N].join("|")+")"+X+P+")*",G="(?:"+[I+D+"?",D,L,N,q].join("|")+")",J=RegExp(H+"(?="+H+")|"+G+F,"g");var Q=function(r){var n,t,u,i,f=Y(r=e(r))?function(r){return Y(r)?function(r){return r.match(J)||[]}(r):function(r){return r.split("")}(r)}(r):void 0,o=f?f[0]:r.charAt(0),a=f?(n=f,t=1,i=n.length,u=void 0===u?i:u,!t&&u>=i?n:function(r,n,t){var u=-1,e=r.length;n<0&&(n=-n>e?0:e+n),(t=t>e?e:t)<0&&(t+=e),e=n>t?0:t-n>>>0,n>>>=0;for(var i=Array(e);++u<e;)i[u]=r[u+n];return i}(n,t,u)).join(""):r.slice(1);return o.toUpperCase()+a};function V(r){return r==r&&!j(r)}function $(r,n){return function(t){return null!=t&&t[r]===n&&(void 0!==n||r in Object(t))}}function rr(r,n){return null!=r&&n in Object(r)}function nr(r){return"function"==typeof r?r:null==r?_:"object"==typeof r?w(r)?(e=r[1],o(u=r[0])&&V(e)?$(f(u),e):function(r){var n=a(r,u);return void 0===n&&n===e?function(r,n){return null!=r&&function(r,n,t){for(var u=-1,e=(n=i(n,r)).length,o=!1;++u<e;){var a=f(n[u]);if(!(o=null!=r&&t(r,a)))break;r=r[a]}return o||++u!=e?o:!!(e=null==r?0:r.length)&&b(e)&&v(a,e)&&(w(r)||d(r))}(r,n,rr)}(r,u):A(e,n,3)}):(t=function(r){for(var n=m(r),t=n.length;t--;){var u=n[t],e=r[u];n[t]=[u,e,V(e)]}return n}(n=r),1==t.length&&t[0][2]?$(t[0][0],t[0][1]):function(r){return r===n||function(r,n,t){var u=t.length,e=u;if(null==r)return!e;for(r=Object(r);u--;){var i=t[u];if(i[2]?i[1]!==r[i[0]]:!(i[0]in r))return!1}for(;++u<e;){var f=(i=t[u])[0],o=r[f],a=i[1];if(i[2]){if(void 0===o&&!(f in r))return!1}else{var c=new p;if(!A(a,o,3,void 0,c))return!1}}return!0}(r,0,t)}):function(r){return o(r)?(n=f(r),function(r){return null==r?void 0:r[n]}):function(r){return function(n){return c(n,r)}}(r);var n}(r);var n,t,u,e}var tr,ur=(tr=function(r,n){return r&&function(r,n,t){for(var u=-1,e=Object(r),i=t(r),f=i.length;f--;){var o=i[++u];if(!1===n(e[o],o,e))break}return r}(r,n,m)},function(r,n){if(null==r)return r;if(!l(r))return tr(r,n);for(var t=r.length,u=-1,e=Object(r);++u<t&&!1!==n(e[u],u,e););return r});function er(r,n){if(r!==n){var t=void 0!==r,u=null===r,e=r==r,i=k(r),f=void 0!==n,o=null===n,a=n==n,c=k(n);if(!o&&!c&&!i&&r>n||i&&f&&a&&!o&&!c||u&&f&&a||!t&&a||!e)return 1;if(!u&&!i&&!c&&r<n||c&&t&&e&&!u&&!i||o&&t&&e||!f&&e||!a)return-1}return 0}function ir(r,n,t){n=n.length?s(n,(function(r){return w(r)?function(n){return c(n,1===r.length?r[0]:r)}:r})):[_];var u=-1;n=s(n,g(nr));var e=function(r,n){var t=-1,u=l(r)?Array(r.length):[];return ur(r,(function(r){u[++t]=n(r)})),u}(r,(function(r){return{criteria:s(n,(function(n){return n(r)})),index:++u,value:r}}));return function(r){var n=r.length;for(r.sort((function(r,n){return function(r,n,t){for(var u=-1,e=r.criteria,i=n.criteria,f=e.length,o=t.length;++u<f;){var a=er(e[u],i[u]);if(a)return u>=o?a:a*("desc"==t[u]?-1:1)}return r.index-n.index}(r,n,t)}));n--;)r[n]=r[n].value;return r}(e)}var fr=function(r){return T(function(r,n,t){return n=U(void 0===n?r.length-1:n,0),function(){for(var u=arguments,e=-1,i=U(u.length-n,0),f=Array(i);++e<i;)f[e]=u[n+e];e=-1;for(var o=Array(n+1);++e<n;)o[e]=u[e];return o[n]=t(f),function(r,n,t){switch(t.length){case 0:return r.call(n);case 1:return r.call(n,t[0]);case 2:return r.call(n,t[0],t[1]);case 3:return r.call(n,t[0],t[1],t[2])}return r.apply(n,t)}(r,this,o)}}(r,void 0,_),r+"")}((function(r,n){if(null==r)return[];var t=n.length;return t>1&&z(r,n[0],n[1])?n=[]:t>2&&z(n[0],n[1],n[2])&&(n=[n[0]]),ir(r,function(r,n,t,u,e){var i=-1,f=r.length;for(t||(t=M),e||(e=[]);++i<f;){var o=r[i];t(o)?h(e,o):e[e.length]=o}return e}(n),[])}));function or(r,n){if(0===r.length||0===n.length)return"";r="en_us"===r?"en-US":r,n="en_us"===n?"en-US":n;const t=(new Intl.DisplayNames(n,{type:"language"}).of(r)||"").split(" ");return t[0]=Q(e(t[0]).toLowerCase()),t.join(" ")}const ar=class{constructor(t){r(this,t),this.change=n(this,"change"),this.context={limetype:null,id:null},this.handleChange=r=>{r.stopPropagation(),this.change.emit(this.multipleChoice?r.detail.map((r=>r.value)):r.detail.value)}}async componentWillLoad(){try{this.http=this.platform.get(u.Http),this.allLanguages=await async function(r){const n=await r.get("api/v1/admin/settings/languages"),t=[];return(null==n?void 0:n.active)&&t.push(...n.active),(null==n?void 0:n.inactive)&&t.push(...n.inactive),t}(this.http)}catch(r){console.error(r)}}getOptions(){return this.allLanguages.map((r=>({value:r,text:or(r,r)})))}render(){const r=this.getOptions();let n;if(Array.isArray(this.value)){const t=this.value;n=r.filter((r=>t.includes(r.value)))}else{const t=this.value;n=r.find((r=>r.value===t))}return t("limel-select",{key:"54aa5665273199c08b9f638c5cc485ee2ebf93a8",value:n,options:fr(r,"text"),helperText:this.helperText,label:this.label,required:this.required,disabled:this.disabled,readonly:this.readonly,onChange:this.handleChange,multiple:this.multipleChoice})}};export{ar as limebb_locale_picker}
@@ -1 +1 @@
1
- import{r as i,c as t,h as s,g as e}from"./p-BK566_jX.js";import{n as o}from"./p-DhGRAeCH.js";const h=class{constructor(e){i(this,e),this.change=t(this,"change"),this.copy=t(this,"copy"),this.type="component",this.copyLabel="Copy value",this.hideCopyButton=!1,this.allItems=[],this.getConfigs=()=>({component:()=>this.webComponentRegistry.getAll(),command:()=>this.commandbus.getAll()}[this.type]()),this.getConfigValue=i=>"name"in i&&"string"==typeof i.name?i.name:"id"in i&&"string"==typeof i.id?i.id:"",this.hasTag=i=>!this.tags||this.tags.some((t=>{var s;return null===(s=i.tags)||void 0===s?void 0:s.includes(t)})),this.handleBlur=()=>{this.emitIfValidValue(this.currentInput)},this.handleChange=i=>{var t;i.stopPropagation(),this.change.emit(null===(t=i.detail)||void 0===t?void 0:t.value)},this.handleCopyButton=()=>{navigator.clipboard.writeText(this.value),this.copy.emit(this.value)},this.handleKeyUp=i=>{"Enter"===i.key&&this.emitIfValidValue(this.currentInput)},this.emitIfValidValue=i=>{this.isValidIdentifier(i)&&this.change.emit(i)},this.isValidIdentifier=i=>!!i&&("component"===this.type?Boolean(customElements.get(i)):this.commandbus.isSupported(i)),this.renderPicker=()=>{let i=this.allItems.find((i=>this.value===i.value));return!i&&this.value&&(i={text:this.value,value:this.value,icon:{name:"question",color:"rgb(var(--color-glaucous-light))"}}),s("limel-picker",{disabled:this.disabled,helperText:this.helperText,label:this.label,readonly:this.readonly,required:this.required,searcher:this.search,value:i,title:null==i?void 0:i.text,onBlur:this.handleBlur,onChange:this.handleChange,onKeyUp:this.handleKeyUp})},this.renderCopyButton=()=>{if(!this.hideCopyButton)return s("limel-icon-button",{icon:"copy",disabled:!this.value,label:this.copyLabel,onClick:this.handleCopyButton})},this.search=async i=>i?this.allItems.filter(this.isItemMatching(i.toLocaleLowerCase())):this.allItems,this.isItemMatching=i=>t=>i.split(/\s+/).every((i=>{var s,e;return t.text.toLocaleLowerCase().includes(i)||(null===(s=t.secondaryText)||void 0===s?void 0:s.toLocaleLowerCase().includes(i))||(null===(e=t.value)||void 0===e?void 0:e.toLocaleLowerCase().includes(i))}))}componentWillLoad(){this.allItems=this.getConfigs().filter(this.hasTag).map((i=>{var t,s;return{value:this.getConfigValue(i),text:this.translator.get(null!==(t=i.title)&&void 0!==t?t:this.getConfigValue(i)),secondaryText:this.translator.get(null!==(s=i.description)&&void 0!==s?s:""),icon:i.icon}})).sort(((i,t)=>i.text.localeCompare(t.text)))}render(){return[this.renderPicker(),this.renderCopyButton()]}get currentInput(){var i,t,s,e,o,h,n;return null!==(n=null===(h=null===(o=null===(e=null===(s=null===(t=null===(i=this.host.shadowRoot)||void 0===i?void 0:i.querySelector("limel-picker"))||void 0===t?void 0:t.shadowRoot)||void 0===s?void 0:s.querySelector("limel-chip-set"))||void 0===e?void 0:e.shadowRoot)||void 0===o?void 0:o.querySelector("input"))||void 0===h?void 0:h.value)&&void 0!==n?n:""}get webComponentRegistry(){return this.platform.get(o.WebComponentRegistry)}get commandbus(){return this.platform.get(o.CommandBus)}get translator(){return this.platform.get(o.Translate)}get host(){return e(this)}};h.style=":host(limebb-component-picker){position:relative;display:flex;align-items:center}:host(limebb-component-picker) limel-picker{flex-grow:1;min-width:0}:host(limebb-component-picker) limel-icon-button{position:absolute;right:0.25rem}";export{h as limebb_component_picker}
1
+ import{r as i,c as t,h as s,g as e}from"./p-f_mBf1UZ.js";import{n as o}from"./p-B6a_-5iN.js";const h=class{constructor(e){i(this,e),this.change=t(this,"change"),this.copy=t(this,"copy"),this.type="component",this.copyLabel="Copy value",this.hideCopyButton=!1,this.allItems=[],this.getConfigs=()=>({component:()=>this.webComponentRegistry.getAll(),command:()=>this.commandbus.getAll()}[this.type]()),this.getConfigValue=i=>"name"in i&&"string"==typeof i.name?i.name:"id"in i&&"string"==typeof i.id?i.id:"",this.hasTag=i=>!this.tags||this.tags.some((t=>{var s;return null===(s=i.tags)||void 0===s?void 0:s.includes(t)})),this.handleBlur=()=>{this.emitIfValidValue(this.currentInput)},this.handleChange=i=>{var t;i.stopPropagation(),this.change.emit(null===(t=i.detail)||void 0===t?void 0:t.value)},this.handleCopyButton=()=>{navigator.clipboard.writeText(this.value),this.copy.emit(this.value)},this.handleKeyUp=i=>{"Enter"===i.key&&this.emitIfValidValue(this.currentInput)},this.emitIfValidValue=i=>{this.isValidIdentifier(i)&&this.change.emit(i)},this.isValidIdentifier=i=>!!i&&("component"===this.type?Boolean(customElements.get(i)):this.commandbus.isSupported(i)),this.renderPicker=()=>{let i=this.allItems.find((i=>this.value===i.value));return!i&&this.value&&(i={text:this.value,value:this.value,icon:{name:"question",color:"rgb(var(--color-glaucous-light))"}}),s("limel-picker",{disabled:this.disabled,helperText:this.helperText,label:this.label,readonly:this.readonly,required:this.required,searcher:this.search,value:i,title:null==i?void 0:i.text,onBlur:this.handleBlur,onChange:this.handleChange,onKeyUp:this.handleKeyUp})},this.renderCopyButton=()=>{if(!this.hideCopyButton)return s("limel-icon-button",{icon:"copy",disabled:!this.value,label:this.copyLabel,onClick:this.handleCopyButton})},this.search=async i=>i?this.allItems.filter(this.isItemMatching(i.toLocaleLowerCase())):this.allItems,this.isItemMatching=i=>t=>i.split(/\s+/).every((i=>{var s,e;return t.text.toLocaleLowerCase().includes(i)||(null===(s=t.secondaryText)||void 0===s?void 0:s.toLocaleLowerCase().includes(i))||(null===(e=t.value)||void 0===e?void 0:e.toLocaleLowerCase().includes(i))}))}componentWillLoad(){this.allItems=this.getConfigs().filter(this.hasTag).map((i=>{var t,s;return{value:this.getConfigValue(i),text:this.translator.get(null!==(t=i.title)&&void 0!==t?t:this.getConfigValue(i)),secondaryText:this.translator.get(null!==(s=i.description)&&void 0!==s?s:""),icon:i.icon}})).sort(((i,t)=>i.text.localeCompare(t.text)))}render(){return[this.renderPicker(),this.renderCopyButton()]}get currentInput(){var i,t,s,e,o,h,n;return null!==(n=null===(h=null===(o=null===(e=null===(s=null===(t=null===(i=this.host.shadowRoot)||void 0===i?void 0:i.querySelector("limel-picker"))||void 0===t?void 0:t.shadowRoot)||void 0===s?void 0:s.querySelector("limel-chip-set"))||void 0===e?void 0:e.shadowRoot)||void 0===o?void 0:o.querySelector("input"))||void 0===h?void 0:h.value)&&void 0!==n?n:""}get webComponentRegistry(){return this.platform.get(o.WebComponentRegistry)}get commandbus(){return this.platform.get(o.CommandBus)}get translator(){return this.platform.get(o.Translate)}get host(){return e(this)}};h.style=":host(limebb-component-picker){position:relative;display:flex;align-items:center}:host(limebb-component-picker) limel-picker{flex-grow:1;min-width:0}:host(limebb-component-picker) limel-icon-button{position:absolute;right:0.25rem}";export{h as limebb_component_picker}
@@ -1 +1 @@
1
- import{r as t,c as e,h as r}from"./p-BK566_jX.js";const i=class{constructor(r){t(this,r),this.change=e(this,"change"),this.getOptionValue=t=>t.value,this.getAffixValue=t=>{if(t.value)return[t.value]},this.handleChangeOptions=(t,e=t=>t)=>r=>{r.stopPropagation(),this.change.emit(Object.assign(Object.assign({},this.value),{options:Object.assign(Object.assign({maximumFractionDigits:0},this.value.options),{[t]:e(r.detail)||void 0})}))},this.handleChangeAffix=t=>e=>{e.stopPropagation(),this.change.emit(Object.assign(Object.assign({},this.value),{[t]:this.getAffixValue(e.detail)}))}}render(){return[this.renderNotation(),this.renderCurrency(),this.renderCurrencyDisplay(),this.renderAffix("prefix"),this.renderAffix("suffix")]}renderCurrency(){var t;return r("limebb-currency-picker",{platform:this.platform,context:this.context,label:"Currency",value:null===(t=this.value.options)||void 0===t?void 0:t.currency,onChange:this.handleChangeOptions("currency")})}renderCurrencyDisplay(){const t=[{text:"ISO currency code",value:"code"},{text:"Localized currency symbol",value:"symbol"},{text:"Localized currency name",value:"name"}],e=t.find((t=>{var e;return t.value===(null===(e=this.value.options)||void 0===e?void 0:e.currencyDisplay)}));return r("limel-select",{label:"Currency display",options:t,value:e,onChange:this.handleChangeOptions("currencyDisplay",this.getOptionValue)})}renderNotation(){const t=[{text:"Standard",value:"standard"},{text:"Compact",value:"compact"}],e=t.find((t=>{var e;return t.value===(null===(e=this.value.options)||void 0===e?void 0:e.notation)}));return r("limel-select",{label:"Notation",helperText:"The formatting that should be displayed for the number",options:t,value:e,onChange:this.handleChangeOptions("notation",this.getOptionValue)})}renderAffix(t){const e=[{text:"",value:""},{text:"Compact notation",value:"compact"},{text:"Currency",value:"currency"}],i=e.find((e=>{var r;return e.value&&(null===(r=this.value[t])||void 0===r?void 0:r.includes(e.value))}));return r("limel-select",{label:t.charAt(0).toUpperCase()+t.slice(1),options:e,value:i,onChange:this.handleChangeAffix(t)})}};export{i as limebb_info_tile_currency_format}
1
+ import{r as t,c as e,h as r}from"./p-f_mBf1UZ.js";const i=class{constructor(r){t(this,r),this.change=e(this,"change"),this.getOptionValue=t=>t.value,this.getAffixValue=t=>{if(t.value)return[t.value]},this.handleChangeOptions=(t,e=t=>t)=>r=>{r.stopPropagation(),this.change.emit(Object.assign(Object.assign({},this.value),{options:Object.assign(Object.assign({maximumFractionDigits:0},this.value.options),{[t]:e(r.detail)||void 0})}))},this.handleChangeAffix=t=>e=>{e.stopPropagation(),this.change.emit(Object.assign(Object.assign({},this.value),{[t]:this.getAffixValue(e.detail)}))}}render(){return[this.renderNotation(),this.renderCurrency(),this.renderCurrencyDisplay(),this.renderAffix("prefix"),this.renderAffix("suffix")]}renderCurrency(){var t;return r("limebb-currency-picker",{platform:this.platform,context:this.context,label:"Currency",value:null===(t=this.value.options)||void 0===t?void 0:t.currency,onChange:this.handleChangeOptions("currency")})}renderCurrencyDisplay(){const t=[{text:"ISO currency code",value:"code"},{text:"Localized currency symbol",value:"symbol"},{text:"Localized currency name",value:"name"}],e=t.find((t=>{var e;return t.value===(null===(e=this.value.options)||void 0===e?void 0:e.currencyDisplay)}));return r("limel-select",{label:"Currency display",options:t,value:e,onChange:this.handleChangeOptions("currencyDisplay",this.getOptionValue)})}renderNotation(){const t=[{text:"Standard",value:"standard"},{text:"Compact",value:"compact"}],e=t.find((t=>{var e;return t.value===(null===(e=this.value.options)||void 0===e?void 0:e.notation)}));return r("limel-select",{label:"Notation",helperText:"The formatting that should be displayed for the number",options:t,value:e,onChange:this.handleChangeOptions("notation",this.getOptionValue)})}renderAffix(t){const e=[{text:"",value:""},{text:"Compact notation",value:"compact"},{text:"Currency",value:"currency"}],i=e.find((e=>{var r;return e.value&&(null===(r=this.value[t])||void 0===r?void 0:r.includes(e.value))}));return r("limel-select",{label:t.charAt(0).toUpperCase()+t.slice(1),options:e,value:i,onChange:this.handleChangeAffix(t)})}};export{i as limebb_info_tile_currency_format}
@@ -1 +1 @@
1
- import{r as e,c as t,h as i}from"./p-BK566_jX.js";import{n as l}from"./p-DhGRAeCH.js";const n=[{trigger:"rich-text",icon:"font_style_formatting",translationKey:"webclient.composer-toolbar.rich-text"},{trigger:"mention",icon:"email_sign_92447",translationKey:"webclient.composer-toolbar.mention",helperLabel:"@"},{trigger:"text-snippet",icon:"add_text",translationKey:"webclient.composer-toolbar.text-snippet",helperLabel:"!"},{trigger:"internal-link",icon:"hashtag_large",translationKey:"webclient.composer-toolbar.internal-link",helperLabel:"#"}],o=class{constructor(i){e(this,i),this.triggerInsert=t(this,"triggerInsert"),this.filesSelected=t(this,"filesSelected"),this.mentions=!1,this.textSnippets=!1,this.internalLinks=!1,this.richText=!1,this.handleTriggerSelected=e=>{e.stopPropagation(),this.triggerInsert.emit(e.detail.value)},this.handleFilesSelected=e=>{e.stopPropagation(),this.filesSelected.emit(e.detail)}}render(){return[i("div",{key:"838a9bb908a59ea4d7667ce54578277ef2733426",class:"actions"},i("slot",{key:"09f4969bdf3c01b86e54708e105e93812c8e5e69",name:"leading"}),this.renderFileInput(),this.renderTriggerActions(),i("slot",{key:"f0f58aeb42a17784c1343e94f9ee51c0f85b7a8a",name:"trailing"})),i("slot",{key:"76a69ca163d0c92a1fd27f9aaf5ce1644d9ed4b4",name:"primary-action"})]}get translator(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(l.Translate)}get triggerActions(){const e={mention:this.mentions,"text-snippet":this.textSnippets,"internal-link":this.internalLinks,"rich-text":this.richText};return n.filter((t=>e[t.trigger])).map((e=>{var t,i;return{text:null!==(i=null===(t=this.translator)||void 0===t?void 0:t.get(e.translationKey))&&void 0!==i?i:e.trigger,commandText:e.helperLabel,icon:e.icon,iconOnly:!0,value:e.trigger}}))}renderTriggerActions(){const e=this.triggerActions;if(0!==e.length)return i("limel-action-bar",{actions:e,onItemSelected:this.handleTriggerSelected})}renderFileInput(){var e,t,l,n,o,r;if(this.fileInput)return i("limel-file-input",{accept:null!==(e=this.fileInput.accept)&&void 0!==e?e:"*",multiple:null!==(t=this.fileInput.multiple)&&void 0!==t&&t,disabled:null!==(l=this.fileInput.disabled)&&void 0!==l&&l,onFilesSelected:this.handleFilesSelected},i("limel-icon-button",{icon:"attach",disabled:null!==(n=this.fileInput.disabled)&&void 0!==n&&n,label:null===(o=this.translator)||void 0===o?void 0:o.get("webclient.attach-files"),helperLabel:null===(r=this.translator)||void 0===r?void 0:r.get("webclient.attach-files-helper")}))}};o.style="*{box-sizing:border-box;min-width:0}:host(limebb-composer-toolbar){box-sizing:border-box;display:flex;align-items:center;width:100%;max-width:100%;gap:0.5rem}.actions{display:flex;align-items:center;flex-wrap:nowrap;flex-grow:1}limel-icon-button,::slotted(limel-icon-button){display:inline-block;scale:0.86}limel-file-input{flex-shrink:0}";export{o as limebb_composer_toolbar}
1
+ import{r as e,c as t,h as i}from"./p-f_mBf1UZ.js";import{n as l}from"./p-B6a_-5iN.js";const n=[{trigger:"rich-text",icon:"font_style_formatting",translationKey:"webclient.composer-toolbar.rich-text"},{trigger:"mention",icon:"email_sign_92447",translationKey:"webclient.composer-toolbar.mention",helperLabel:"@"},{trigger:"text-snippet",icon:"add_text",translationKey:"webclient.composer-toolbar.text-snippet",helperLabel:"!"},{trigger:"internal-link",icon:"hashtag_large",translationKey:"webclient.composer-toolbar.internal-link",helperLabel:"#"}],o=class{constructor(i){e(this,i),this.triggerInsert=t(this,"triggerInsert"),this.filesSelected=t(this,"filesSelected"),this.mentions=!1,this.textSnippets=!1,this.internalLinks=!1,this.richText=!1,this.handleTriggerSelected=e=>{e.stopPropagation(),this.triggerInsert.emit(e.detail.value)},this.handleFilesSelected=e=>{e.stopPropagation(),this.filesSelected.emit(e.detail)}}render(){return[i("div",{key:"838a9bb908a59ea4d7667ce54578277ef2733426",class:"actions"},i("slot",{key:"09f4969bdf3c01b86e54708e105e93812c8e5e69",name:"leading"}),this.renderFileInput(),this.renderTriggerActions(),i("slot",{key:"f0f58aeb42a17784c1343e94f9ee51c0f85b7a8a",name:"trailing"})),i("slot",{key:"76a69ca163d0c92a1fd27f9aaf5ce1644d9ed4b4",name:"primary-action"})]}get translator(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(l.Translate)}get triggerActions(){const e={mention:this.mentions,"text-snippet":this.textSnippets,"internal-link":this.internalLinks,"rich-text":this.richText};return n.filter((t=>e[t.trigger])).map((e=>{var t,i;return{text:null!==(i=null===(t=this.translator)||void 0===t?void 0:t.get(e.translationKey))&&void 0!==i?i:e.trigger,commandText:e.helperLabel,icon:e.icon,iconOnly:!0,value:e.trigger}}))}renderTriggerActions(){const e=this.triggerActions;if(0!==e.length)return i("limel-action-bar",{actions:e,onItemSelected:this.handleTriggerSelected})}renderFileInput(){var e,t,l,n,o,r;if(this.fileInput)return i("limel-file-input",{accept:null!==(e=this.fileInput.accept)&&void 0!==e?e:"*",multiple:null!==(t=this.fileInput.multiple)&&void 0!==t&&t,disabled:null!==(l=this.fileInput.disabled)&&void 0!==l&&l,onFilesSelected:this.handleFilesSelected},i("limel-icon-button",{icon:"attach",disabled:null!==(n=this.fileInput.disabled)&&void 0!==n&&n,label:null===(o=this.translator)||void 0===o?void 0:o.get("webclient.attach-files"),helperLabel:null===(r=this.translator)||void 0===r?void 0:r.get("webclient.attach-files-helper")}))}};o.style="*{box-sizing:border-box;min-width:0}:host(limebb-composer-toolbar){box-sizing:border-box;display:flex;align-items:center;width:100%;max-width:100%;gap:0.5rem}.actions{display:flex;align-items:center;flex-wrap:nowrap;flex-grow:1}limel-icon-button,::slotted(limel-icon-button){display:inline-block;scale:0.86}limel-file-input{flex-shrink:0}";export{o as limebb_composer_toolbar}
@@ -1 +1 @@
1
- import{r as e,c as t,h as s,H as i}from"./p-BK566_jX.js";import{C as r}from"./p-1N3bZuHj.js";const o={display:"block",order:3,width:"6rem",flexShrink:0,marginRight:"-0.5rem"},l=class{constructor(s){e(this,s),this.change=t(this,"change"),this.options=[],this.optionsById=new Map,this.handleChange=e=>{var t;e.stopPropagation();const s=e.detail,i=Array.isArray(s)?s[0]:s;this.change.emit(null!==(t=null==i?void 0:i.value)&&void 0!==t?t:"")}}componentWillLoad(){this.options=[{text:"",value:""},...r.map((e=>({text:e.title,secondaryText:e.description,value:e.id,primaryComponent:{name:"limebb-color-palette-swatches",props:{colors:e.colors,style:o}}})))],this.optionsById=new Map(this.options.map((e=>[e.value,e])))}render(){return s(i,{key:"5144d7eed8495f7880a5b9b84f6d21e057823f6f"},s("limel-select",{key:"592ba7009714d5585c3ec4051ff87780bfaf7ce0",label:this.label,helperText:this.helperText,disabled:this.disabled,readonly:this.readonly,invalid:this.invalid,required:this.required,options:this.options,value:this.getSelectedOption(),onChange:this.handleChange}))}getSelectedOption(){if(!this.value)return;return this.optionsById.get(this.value)||(this.lastWarnedValue!==this.value&&(console.warn(`limebb-color-palette-picker: palette "${this.value}" was not found in the registry. Rendering as (none).`),this.lastWarnedValue=this.value),this.optionsById.get(""))}};l.style=":host(limebb-color-palette-picker){box-sizing:border-box;display:block;--color-palette-swatches-transform:scale(0.9) translateX(0.5rem)}";export{l as limebb_color_palette_picker}
1
+ import{r as e,c as t,h as s,H as i}from"./p-f_mBf1UZ.js";import{C as r}from"./p-1N3bZuHj.js";const o={display:"block",order:3,width:"6rem",flexShrink:0,marginRight:"-0.5rem"},l=class{constructor(s){e(this,s),this.change=t(this,"change"),this.options=[],this.optionsById=new Map,this.handleChange=e=>{var t;e.stopPropagation();const s=e.detail,i=Array.isArray(s)?s[0]:s;this.change.emit(null!==(t=null==i?void 0:i.value)&&void 0!==t?t:"")}}componentWillLoad(){this.options=[{text:"",value:""},...r.map((e=>({text:e.title,secondaryText:e.description,value:e.id,primaryComponent:{name:"limebb-color-palette-swatches",props:{colors:e.colors,style:o}}})))],this.optionsById=new Map(this.options.map((e=>[e.value,e])))}render(){return s(i,{key:"5144d7eed8495f7880a5b9b84f6d21e057823f6f"},s("limel-select",{key:"592ba7009714d5585c3ec4051ff87780bfaf7ce0",label:this.label,helperText:this.helperText,disabled:this.disabled,readonly:this.readonly,invalid:this.invalid,required:this.required,options:this.options,value:this.getSelectedOption(),onChange:this.handleChange}))}getSelectedOption(){if(!this.value)return;return this.optionsById.get(this.value)||(this.lastWarnedValue!==this.value&&(console.warn(`limebb-color-palette-picker: palette "${this.value}" was not found in the registry. Rendering as (none).`),this.lastWarnedValue=this.value),this.optionsById.get(""))}};l.style=":host(limebb-color-palette-picker){box-sizing:border-box;display:block;--color-palette-swatches-transform:scale(0.9) translateX(0.5rem)}";export{l as limebb_color_palette_picker}
@@ -1 +1 @@
1
- import{r as e,h as i}from"./p-BK566_jX.js";const r=class{constructor(i){e(this,i)}render(){return i("span",{key:"a19af68f2f240a1bb36645509e42b337cec8be01"},this.description)}};r.style='@charset "UTF-8";:host(limebb-feed-item-thumbnail-file-info){display:flex;align-items:center;gap:0.5rem;padding:0 0.25rem 0.125rem 0.25rem}span{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:normal;color:rgb(var(--contrast-1000));flex-grow:1;font-size:0.75rem}';export{r as limebb_feed_item_thumbnail_file_info}
1
+ import{r as e,h as i}from"./p-f_mBf1UZ.js";const r=class{constructor(i){e(this,i)}render(){return i("span",{key:"a19af68f2f240a1bb36645509e42b337cec8be01"},this.description)}};r.style='@charset "UTF-8";:host(limebb-feed-item-thumbnail-file-info){display:flex;align-items:center;gap:0.5rem;padding:0 0.25rem 0.125rem 0.25rem}span{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:normal;color:rgb(var(--contrast-1000));flex-grow:1;font-size:0.75rem}';export{r as limebb_feed_item_thumbnail_file_info}