@limetech/lime-crm-building-blocks 1.139.0 → 1.139.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/cjs/{filter-group-logic-BoF3Z5_P.js → filter-group-logic-BPpM2NqX.js} +1 -1
  3. package/dist/cjs/{index-B9Bi9dpZ.js → index-BrWc7h0p.js} +1 -1
  4. package/dist/cjs/{index.esm-8LHVbTD0.js → index.esm-Se3EtD3m.js} +2 -2
  5. package/dist/cjs/lime-crm-building-blocks.cjs.js +2 -2
  6. package/dist/cjs/{lime-query-validation-q-sH7XSs.js → lime-query-validation-CJC3mtnT.js} +1 -1
  7. package/dist/cjs/limebb-alert-dialog.cjs.entry.js +1 -1
  8. package/dist/cjs/limebb-browser.cjs.entry.js +2 -2
  9. package/dist/cjs/limebb-chat-icon-list_3.cjs.entry.js +3 -3
  10. package/dist/cjs/limebb-chat-list.cjs.entry.js +2 -2
  11. package/dist/cjs/limebb-color-palette-picker.cjs.entry.js +1 -1
  12. package/dist/cjs/limebb-color-palette-swatches.cjs.entry.js +1 -1
  13. package/dist/cjs/limebb-component-config.cjs.entry.js +3 -3
  14. package/dist/cjs/limebb-component-picker.cjs.entry.js +2 -2
  15. package/dist/cjs/limebb-composer-toolbar.cjs.entry.js +2 -2
  16. package/dist/cjs/limebb-currency-picker.cjs.entry.js +2 -2
  17. package/dist/cjs/limebb-dashboard-widget.cjs.entry.js +1 -1
  18. package/dist/cjs/limebb-data-cells.cjs.entry.js +7 -4
  19. package/dist/cjs/limebb-date-picker.cjs.entry.js +2 -2
  20. package/dist/cjs/limebb-date-range.cjs.entry.js +1 -1
  21. package/dist/cjs/limebb-document-chips.cjs.entry.js +1 -1
  22. package/dist/cjs/limebb-document-item.cjs.entry.js +1 -1
  23. package/dist/cjs/limebb-document-picker.cjs.entry.js +1 -1
  24. package/dist/cjs/limebb-empty-state.cjs.entry.js +1 -1
  25. package/dist/cjs/limebb-feed-item-thumbnail-file-info.cjs.entry.js +1 -1
  26. package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +3 -3
  27. package/dist/cjs/limebb-feed.cjs.entry.js +90 -33
  28. package/dist/cjs/limebb-filter-chip_5.cjs.entry.js +5 -5
  29. package/dist/cjs/limebb-icon-picker.cjs.entry.js +1 -1
  30. package/dist/cjs/limebb-info-tile-currency-format.cjs.entry.js +1 -1
  31. package/dist/cjs/limebb-info-tile-date-format.cjs.entry.js +1 -1
  32. package/dist/cjs/limebb-info-tile-decimal-format.cjs.entry.js +1 -1
  33. package/dist/cjs/limebb-info-tile-format.cjs.entry.js +1 -1
  34. package/dist/cjs/limebb-info-tile-relative-date-format.cjs.entry.js +1 -1
  35. package/dist/cjs/limebb-info-tile-unit-format.cjs.entry.js +1 -1
  36. package/dist/cjs/limebb-info-tile.cjs.entry.js +3 -3
  37. package/dist/cjs/limebb-kanban-group.cjs.entry.js +3 -3
  38. package/dist/cjs/limebb-kanban-item.cjs.entry.js +3 -3
  39. package/dist/cjs/limebb-kanban.cjs.entry.js +1 -1
  40. package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +3 -3
  41. package/dist/cjs/limebb-lime-query-filter-builder.cjs.entry.js +3 -3
  42. package/dist/cjs/limebb-lime-query-filter-comparison_2.cjs.entry.js +3 -3
  43. package/dist/cjs/limebb-lime-query-order-by-editor_2.cjs.entry.js +3 -3
  44. package/dist/cjs/limebb-lime-query-order-by-item.cjs.entry.js +1 -1
  45. package/dist/cjs/limebb-lime-query-response-format-builder.cjs.entry.js +3 -3
  46. package/dist/cjs/limebb-lime-query-response-format-editor_2.cjs.entry.js +2 -2
  47. package/dist/cjs/limebb-limeobject-file-viewer.cjs.entry.js +2 -2
  48. package/dist/cjs/limebb-live-docs-info.cjs.entry.js +1 -1
  49. package/dist/cjs/limebb-loader.cjs.entry.js +2 -2
  50. package/dist/cjs/limebb-locale-picker.cjs.entry.js +2 -2
  51. package/dist/cjs/limebb-mention-group-counter.cjs.entry.js +1 -1
  52. package/dist/cjs/limebb-mention.cjs.entry.js +2 -2
  53. package/dist/cjs/limebb-navigation-button_2.cjs.entry.js +1 -1
  54. package/dist/cjs/limebb-notification-item.cjs.entry.js +2 -2
  55. package/dist/cjs/limebb-notification-list.cjs.entry.js +2 -2
  56. package/dist/cjs/limebb-object-chip.cjs.entry.js +3 -3
  57. package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +3 -3
  58. package/dist/cjs/limebb-property-selector.cjs.entry.js +3 -3
  59. package/dist/cjs/limebb-rule-arg-filter-editor.cjs.entry.js +2 -2
  60. package/dist/cjs/limebb-rule-chip-popover.cjs.entry.js +3 -3
  61. package/dist/cjs/limebb-rule-editor.cjs.entry.js +2 -2
  62. package/dist/cjs/limebb-rule-gate.cjs.entry.js +2 -2
  63. package/dist/cjs/limebb-text-editor-picker.cjs.entry.js +1 -1
  64. package/dist/cjs/limebb-text-editor.cjs.entry.js +3 -3
  65. package/dist/cjs/limebb-trend-indicator.cjs.entry.js +3 -3
  66. package/dist/cjs/limebb-value-comparison-editor.cjs.entry.js +3 -3
  67. package/dist/cjs/{limetype-CK5MVyW0.js → limetype-CmgP0nbZ.js} +1 -1
  68. package/dist/cjs/loader.cjs.js +1 -1
  69. package/dist/cjs/{web-component-template-7B9wK2bO.js → web-component-template-C9hvjrMm.js} +1 -1
  70. package/dist/collection/collection-manifest.json +1 -1
  71. package/dist/collection/components/chat-list/chat-icon-list/chat-icon-list.css +7 -5
  72. package/dist/collection/components/data-cells/data-cells.js +5 -2
  73. package/dist/collection/components/feed/feed-item/feed-timeline-item.css +32 -24
  74. package/dist/collection/components/feed/feed.js +1 -1
  75. package/dist/collection/components/filter-chip/filter-chip.css +19 -17
  76. package/dist/collection/components/filter-chip/filter-chip.js +1 -1
  77. package/dist/collection/components/kanban/kanban-group/kanban-group.css +14 -12
  78. package/dist/collection/components/kanban/kanban-item/kanban-item.css +11 -7
  79. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-group.css +4 -4
  80. package/dist/collection/components/lime-query-builder/response-format/response-format-item.css +8 -6
  81. package/dist/collection/components/percentage-visualizer/percentage-visualizer.css +7 -7
  82. package/dist/collection/components/percentage-visualizer/percentage-visualizer.js +3 -3
  83. package/dist/collection/components/rule-editor/value-comparison-editor/value-comparison-editor.js +1 -1
  84. package/dist/collection/components/trend-indicator/trend-indicator.css +7 -7
  85. package/dist/components/chat-icon-list.js +1 -1
  86. package/dist/components/feed-timeline-item.js +1 -1
  87. package/dist/components/filter-chip.js +1 -1
  88. package/dist/components/kanban-group.js +1 -1
  89. package/dist/components/kanban-item.js +1 -1
  90. package/dist/components/lime-query-filter-expression.js +1 -1
  91. package/dist/components/limebb-data-cells.js +1 -1
  92. package/dist/components/limebb-feed.js +1 -1
  93. package/dist/components/limebb-trend-indicator.js +1 -1
  94. package/dist/components/limebb-value-comparison-editor.js +1 -1
  95. package/dist/components/percentage-visualizer.js +1 -1
  96. package/dist/components/response-format-item.js +1 -1
  97. package/dist/esm/{filter-group-logic-CRznE2g-.js → filter-group-logic-BMY_GEsX.js} +1 -1
  98. package/dist/esm/{index-LEJjPpY0.js → index-DwHAn7LS.js} +1 -1
  99. package/dist/esm/{index.esm-B7wJLMmp.js → index.esm-C-L5fkQs.js} +1 -1
  100. package/dist/esm/lime-crm-building-blocks.js +3 -3
  101. package/dist/esm/{lime-query-validation-Dds_iPHd.js → lime-query-validation-BwvluehW.js} +1 -1
  102. package/dist/esm/limebb-alert-dialog.entry.js +1 -1
  103. package/dist/esm/limebb-browser.entry.js +2 -2
  104. package/dist/esm/limebb-chat-icon-list_3.entry.js +3 -3
  105. package/dist/esm/limebb-chat-list.entry.js +2 -2
  106. package/dist/esm/limebb-color-palette-picker.entry.js +1 -1
  107. package/dist/esm/limebb-color-palette-swatches.entry.js +1 -1
  108. package/dist/esm/limebb-component-config.entry.js +3 -3
  109. package/dist/esm/limebb-component-picker.entry.js +2 -2
  110. package/dist/esm/limebb-composer-toolbar.entry.js +2 -2
  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 +7 -4
  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 +3 -3
  122. package/dist/esm/limebb-feed.entry.js +90 -33
  123. package/dist/esm/limebb-filter-chip_5.entry.js +5 -5
  124. package/dist/esm/limebb-icon-picker.entry.js +1 -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-kanban-group.entry.js +3 -3
  133. package/dist/esm/limebb-kanban-item.entry.js +3 -3
  134. package/dist/esm/limebb-kanban.entry.js +1 -1
  135. package/dist/esm/limebb-lime-query-builder.entry.js +3 -3
  136. package/dist/esm/limebb-lime-query-filter-builder.entry.js +3 -3
  137. package/dist/esm/limebb-lime-query-filter-comparison_2.entry.js +3 -3
  138. package/dist/esm/limebb-lime-query-order-by-editor_2.entry.js +3 -3
  139. package/dist/esm/limebb-lime-query-order-by-item.entry.js +1 -1
  140. package/dist/esm/limebb-lime-query-response-format-builder.entry.js +3 -3
  141. package/dist/esm/limebb-lime-query-response-format-editor_2.entry.js +2 -2
  142. package/dist/esm/limebb-limeobject-file-viewer.entry.js +2 -2
  143. package/dist/esm/limebb-live-docs-info.entry.js +1 -1
  144. package/dist/esm/limebb-loader.entry.js +2 -2
  145. package/dist/esm/limebb-locale-picker.entry.js +2 -2
  146. package/dist/esm/limebb-mention-group-counter.entry.js +1 -1
  147. package/dist/esm/limebb-mention.entry.js +2 -2
  148. package/dist/esm/limebb-navigation-button_2.entry.js +1 -1
  149. package/dist/esm/limebb-notification-item.entry.js +2 -2
  150. package/dist/esm/limebb-notification-list.entry.js +2 -2
  151. package/dist/esm/limebb-object-chip.entry.js +3 -3
  152. package/dist/esm/limebb-percentage-visualizer.entry.js +3 -3
  153. package/dist/esm/limebb-property-selector.entry.js +3 -3
  154. package/dist/esm/limebb-rule-arg-filter-editor.entry.js +2 -2
  155. package/dist/esm/limebb-rule-chip-popover.entry.js +3 -3
  156. package/dist/esm/limebb-rule-editor.entry.js +2 -2
  157. package/dist/esm/limebb-rule-gate.entry.js +2 -2
  158. package/dist/esm/limebb-text-editor-picker.entry.js +1 -1
  159. package/dist/esm/limebb-text-editor.entry.js +3 -3
  160. package/dist/esm/limebb-trend-indicator.entry.js +3 -3
  161. package/dist/esm/limebb-value-comparison-editor.entry.js +3 -3
  162. package/dist/esm/{limetype-DH77rgZZ.js → limetype-D4ZaWZ-3.js} +1 -1
  163. package/dist/esm/loader.js +2 -2
  164. package/dist/esm/{web-component-template-CXFK-BYa.js → web-component-template-CAI6pXCH.js} +1 -1
  165. package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
  166. package/dist/lime-crm-building-blocks/{p-bb825e68.entry.js → p-00ca6522.entry.js} +1 -1
  167. package/dist/lime-crm-building-blocks/p-01f84b0c.entry.js +1 -0
  168. package/dist/lime-crm-building-blocks/{p-7597eb85.entry.js → p-0253fd45.entry.js} +1 -1
  169. package/dist/lime-crm-building-blocks/{p-ae9780ff.entry.js → p-0579d006.entry.js} +1 -1
  170. package/dist/lime-crm-building-blocks/{p-47912c60.entry.js → p-0843b50b.entry.js} +1 -1
  171. package/dist/lime-crm-building-blocks/{p-4f398108.entry.js → p-0c4f6220.entry.js} +1 -1
  172. package/dist/lime-crm-building-blocks/{p-0b13889c.entry.js → p-0f821315.entry.js} +1 -1
  173. package/dist/lime-crm-building-blocks/{p-6e298dd5.entry.js → p-0f9a680c.entry.js} +1 -1
  174. package/dist/lime-crm-building-blocks/{p-3c6fb9d1.entry.js → p-13a35953.entry.js} +1 -1
  175. package/dist/lime-crm-building-blocks/{p-1cd45d56.entry.js → p-1cd148e2.entry.js} +1 -1
  176. package/dist/lime-crm-building-blocks/{p-2caee700.entry.js → p-29758303.entry.js} +1 -1
  177. package/dist/lime-crm-building-blocks/{p-382ab76b.entry.js → p-2e48601d.entry.js} +1 -1
  178. package/dist/lime-crm-building-blocks/p-302e6e3e.entry.js +1 -0
  179. package/dist/lime-crm-building-blocks/{p-db9ed6ed.entry.js → p-354257f4.entry.js} +1 -1
  180. package/dist/lime-crm-building-blocks/{p-37c0a17f.entry.js → p-39009b47.entry.js} +1 -1
  181. package/dist/lime-crm-building-blocks/{p-5960143c.entry.js → p-3bf316f9.entry.js} +1 -1
  182. package/dist/lime-crm-building-blocks/{p-4bdf9821.entry.js → p-3fc9866a.entry.js} +1 -1
  183. package/dist/lime-crm-building-blocks/{p-e031c267.entry.js → p-41ddbdde.entry.js} +1 -1
  184. package/dist/lime-crm-building-blocks/{p-e4ccc690.entry.js → p-46dc34a6.entry.js} +1 -1
  185. package/dist/lime-crm-building-blocks/{p-46f2667e.entry.js → p-558915e4.entry.js} +1 -1
  186. package/dist/lime-crm-building-blocks/p-5b1ccfe1.entry.js +1 -0
  187. package/dist/lime-crm-building-blocks/p-5b819d10.entry.js +1 -0
  188. package/dist/lime-crm-building-blocks/{p-27f700c9.entry.js → p-5bc41701.entry.js} +1 -1
  189. package/dist/lime-crm-building-blocks/{p-94cee387.entry.js → p-69a3038b.entry.js} +1 -1
  190. package/dist/lime-crm-building-blocks/{p-fdd63bcc.entry.js → p-6cdefdc9.entry.js} +1 -1
  191. package/dist/lime-crm-building-blocks/{p-b6a8ad7a.entry.js → p-6f4e2590.entry.js} +1 -1
  192. package/dist/lime-crm-building-blocks/p-752742f8.entry.js +1 -0
  193. package/dist/lime-crm-building-blocks/{p-8f7c054d.entry.js → p-7a158104.entry.js} +1 -1
  194. package/dist/lime-crm-building-blocks/{p-6db41866.entry.js → p-80e04b27.entry.js} +1 -1
  195. package/dist/lime-crm-building-blocks/{p-9b411072.entry.js → p-817e2952.entry.js} +1 -1
  196. package/dist/lime-crm-building-blocks/{p-bec2bcef.entry.js → p-89f120f8.entry.js} +1 -1
  197. package/dist/lime-crm-building-blocks/p-8d592755.entry.js +1 -0
  198. package/dist/lime-crm-building-blocks/{p-2cac740d.entry.js → p-9033acb5.entry.js} +1 -1
  199. package/dist/lime-crm-building-blocks/{p-f93a749f.entry.js → p-92679e20.entry.js} +1 -1
  200. package/dist/lime-crm-building-blocks/{p-357c5a54.entry.js → p-927e446d.entry.js} +1 -1
  201. package/dist/lime-crm-building-blocks/{p-e4aeb4fe.entry.js → p-96ea4550.entry.js} +1 -1
  202. package/dist/lime-crm-building-blocks/{p-639032ba.entry.js → p-97839894.entry.js} +1 -1
  203. package/dist/lime-crm-building-blocks/{p-05f8b18e.entry.js → p-994296b0.entry.js} +1 -1
  204. package/dist/lime-crm-building-blocks/p-B-WBKAaa.js +1 -0
  205. package/dist/lime-crm-building-blocks/p-BjXRsiQr.js +1 -0
  206. package/dist/lime-crm-building-blocks/{p-Dtg8KAQt.js → p-Bkno2RtN.js} +1 -1
  207. package/dist/lime-crm-building-blocks/{p-DM0fyjo-.js → p-CI6VHE0w.js} +1 -1
  208. package/dist/lime-crm-building-blocks/{p-BxpMk4Zk.js → p-DI3GWqfD.js} +1 -1
  209. package/dist/lime-crm-building-blocks/{p-2091d4c8.entry.js → p-a6e9cefe.entry.js} +1 -1
  210. package/dist/lime-crm-building-blocks/{p-e2503bad.entry.js → p-b0b8ce73.entry.js} +1 -1
  211. package/dist/lime-crm-building-blocks/{p-d5ad0cd9.entry.js → p-b0ec4121.entry.js} +1 -1
  212. package/dist/lime-crm-building-blocks/p-b7e5a10e.entry.js +1 -0
  213. package/dist/lime-crm-building-blocks/{p-c90ef898.entry.js → p-bd0a30d7.entry.js} +1 -1
  214. package/dist/lime-crm-building-blocks/{p-7dc9923f.entry.js → p-bde3e779.entry.js} +1 -1
  215. package/dist/lime-crm-building-blocks/{p-be4829f3.entry.js → p-be5c43bb.entry.js} +1 -1
  216. package/dist/lime-crm-building-blocks/{p-3e9de50b.entry.js → p-bf4b2a91.entry.js} +1 -1
  217. package/dist/lime-crm-building-blocks/{p-73fab4a9.entry.js → p-c891125e.entry.js} +1 -1
  218. package/dist/lime-crm-building-blocks/{p-3c19f792.entry.js → p-d7d6d21b.entry.js} +1 -1
  219. package/dist/lime-crm-building-blocks/{p-655f028c.entry.js → p-d95f66c8.entry.js} +1 -1
  220. package/dist/lime-crm-building-blocks/{p-19b95901.entry.js → p-dacd1df3.entry.js} +1 -1
  221. package/dist/lime-crm-building-blocks/{p-b0ac4a5f.entry.js → p-de785fee.entry.js} +1 -1
  222. package/dist/lime-crm-building-blocks/{p-22af159d.entry.js → p-e2420cde.entry.js} +1 -1
  223. package/dist/lime-crm-building-blocks/{p-ae802651.entry.js → p-e4cef02f.entry.js} +1 -1
  224. package/dist/lime-crm-building-blocks/{p-bae91ba0.entry.js → p-e618ccd3.entry.js} +1 -1
  225. package/dist/lime-crm-building-blocks/{p-a201e304.entry.js → p-ec1e079e.entry.js} +1 -1
  226. package/dist/lime-crm-building-blocks/{p-37fbd50d.entry.js → p-f4d518ec.entry.js} +1 -1
  227. package/dist/lime-crm-building-blocks/{p-fe9cbbdd.entry.js → p-f73e3da0.entry.js} +1 -1
  228. package/dist/lime-crm-building-blocks/{p-f3d3ff7e.entry.js → p-fb8d854b.entry.js} +1 -1
  229. package/dist/lime-crm-building-blocks/{p-6a7eb5b2.entry.js → p-fce1a282.entry.js} +1 -1
  230. package/dist/lime-crm-building-blocks/{p-edf566e7.entry.js → p-fd38bf57.entry.js} +1 -1
  231. package/dist/types/components.d.ts +10 -10
  232. package/dist/types/stencil-public-runtime.d.ts +1 -0
  233. package/package.json +10 -10
  234. package/dist/lime-crm-building-blocks/p-15bb23c9.entry.js +0 -1
  235. package/dist/lime-crm-building-blocks/p-5f940ea8.entry.js +0 -1
  236. package/dist/lime-crm-building-blocks/p-80f2f76c.entry.js +0 -1
  237. package/dist/lime-crm-building-blocks/p-8eec03b7.entry.js +0 -1
  238. package/dist/lime-crm-building-blocks/p-Bb18Bgig.js +0 -1
  239. package/dist/lime-crm-building-blocks/p-b6b8dad7.entry.js +0 -1
  240. package/dist/lime-crm-building-blocks/p-cac27f2c.entry.js +0 -1
  241. package/dist/lime-crm-building-blocks/p-d99e57aa.entry.js +0 -1
  242. package/dist/lime-crm-building-blocks/p-xIXgZHrE.js +0 -1
  243. /package/dist/lime-crm-building-blocks/{p-LEJjPpY0.js → p-DwHAn7LS.js} +0 -0
@@ -0,0 +1 @@
1
+ import{r as e,c as o,h as t,H as r}from"./p-DwHAn7LS.js";import{R as i,b as a}from"./p-Bkno2RtN.js";const n=class{constructor(t){e(this,t),this.loadMore=o(this,"loadMore"),this.items=[],this.handleLoadMore=e=>{e.stopPropagation(),this.loadMore.emit(this.identifier)}}render(){return t(r,{key:"074640215f29d21e8d3f38b81850823e8a93ce3c"},this.renderHelp(),this.renderGroupHeading(),this.renderGroupSummary(),this.renderItems())}renderGroupSummary(){if(this.summary&&this.totalCount)return t("limel-markdown",{class:"group-summary",value:this.summary})}renderGroupHeading(){return t("limel-header",{heading:this.heading},this.renderCounterBadge())}renderHelp(){if(this.help)return t("limel-help",{value:this.help})}renderSpinner(){if(this.loading)return t("limel-spinner",{size:"small"})}renderCounterBadge(){if(this.totalCount)return[t("limel-badge",{slot:"actions",id:"badge-tooltip",label:this.totalCount}),this.renderTooltip()]}renderTooltip(){const e=this.translator.get("webclient.kanban.item-in-group",{count:this.totalCount}),o=this.limetype?this.labelWithLimetype():e;return t("limel-tooltip",{elementId:"badge-tooltip",label:o||"",openDirection:"top"})}labelWithLimetype(){return this.translator.get("webclient.kanban.limetype-item-in-group",{limetype:this.totalCount>1?this.limetype.localname.plural:this.limetype.localname.singular,count:this.totalCount})}renderItems(){if(this.loading||0!==this.items.length)return t("div",{class:"items"},this.renderKanbanItems(),this.renderSpinner(),this.renderLoadMore())}renderKanbanItems(){return this.items.map((e=>{var o,r;const i=null===(o=e.bodyComponent)||void 0===o?void 0:o.name;return t("limebb-kanban-item",{tabindex:0,platform:this.platform,context:this.context,item:e,key:e.id},i&&t(i,Object.assign({slot:"body",platform:this.platform,context:this.context},null===(r=e.bodyComponent)||void 0===r?void 0:r.props)))}))}renderLoadMore(){if(!(this.loading||this.items.length>=this.totalCount))return t("limel-icon-button",{class:"load-more-button",icon:"more",onClick:this.handleLoadMore,elevated:!0,label:this.translator.get("webclient.load-more")})}get translator(){return this.platform.get(a.Translate)}};(function(e,o,t,r){var i,a=arguments.length,n=a<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,o,t,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(n=(a<3?i(n):a>3?i(o,t,n):i(o,t))||n);a>3&&n&&Object.defineProperty(o,t,n)})([i()],n.prototype,"limetype",void 0),n.style='@charset "UTF-8";:host(limebb-feed-timeline-item.is-tall) .markdown-container{margin-bottom:0.5rem}:host(limebb-feed-timeline-item.is-tall) .body-text{--body-text-min-height-set-by-code:10rem;min-height:calc(var(--body-text-min-height-set-by-code) + 0.25rem)}:host(limebb-feed-timeline-item.is-tall) .body-text:after{transition:opacity 0.6s ease;content:"";opacity:0.26;pointer-events:none;position:absolute;bottom:-0.125rem;right:-0.125rem;left:-0.125rem;height:2.5rem;background:radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0)) 0 100%, linear-gradient(to bottom, rgb(var(--limebb-feed-item-background-color), 0) 0%, rgb(var(--limebb-feed-item-background-color), 90%) 100%);background-repeat:no-repeat;background-size:100% 0.5rem, 100% 100%}:host(limebb-feed-timeline-item.is-tall.shows-less) .markdown-container{grid-template-rows:0fr}:host(limebb-feed-timeline-item.is-tall.shows-less) .body-text:after{opacity:1}:host(limebb-feed-timeline-item.is-tall.shows-more) .markdown-container{grid-template-rows:1fr}:host(limebb-feed-timeline-item.is-tall.shows-more) #show-more-button limel-icon{rotate:180deg}.markdown-container{position:relative;display:grid}.markdown-container:not(.opened){transition:grid-template-rows min(var(--body-text-height) * 1.2ms, 500ms) cubic-bezier(1, 0.09, 0, 0.89)}.body-text{display:block;overflow:hidden}button#show-more-button{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal)}button#show-more-button:hover,button#show-more-button:focus,button#show-more-button:focus-visible{will-change:color, background-color, box-shadow, transform}button#show-more-button:hover,button#show-more-button:focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}button#show-more-button:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button#show-more-button:hover,button#show-more-button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button#show-more-button:focus{outline:none}button#show-more-button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button#show-more-button{z-index:1;position:absolute;right:0;bottom:-0.6rem;left:0;margin:0 auto;display:flex;align-items:center;justify-content:center;border-radius:3rem;width:2rem;height:1rem}button#show-more-button limel-icon{transition:rotate 0.2s ease 0.5s;color:var(--mdc-theme-primary);width:0.75rem}*{box-sizing:border-box}:host(limebb-kanban-group){position:relative;background-color:rgb(var(--limebb-kanban-group-primary-background));--header-top-right-left-border-radius:0.5rem;--limebb-kanban-group-secondary-background:var(--contrast-300);--limebb-kanban-group-primary-background:var(--contrast-600);scroll-snap-align:start;box-sizing:border-box;display:flex;flex-direction:column;border-radius:0.5rem;min-width:var(--limebb-kanban-group-width, 22rem);max-width:100%}:host(limebb-kanban-group[total-count="0"]){min-width:var(--limebb-kanban-group-width, 8rem)}:host(limebb-kanban-group.secondary){border:1px dashed rgb(var(--contrast-700));background-color:rgb(var(--limebb-kanban-group-secondary-background))}:host(limebb-kanban-group.secondary) limebb-kanban-item{border:1px dashed rgb(var(--contrast-700))}:host(limebb-kanban-group.secondary) limel-header{background-color:rgb(var(--limebb-kanban-group-secondary-background))}limel-header{padding-right:0.5rem;background-color:rgb(var(--limebb-kanban-group-primary-background));width:100%}limel-badge{--badge-background-color:rgb(var(--contrast-200))}limel-help{position:absolute;z-index:1;left:-0.25rem;top:-0.25rem}.group-summary{flex-shrink:0;padding:0 0.75rem 0.5rem 0.75rem;opacity:0.6;max-height:7rem;max-width:100%;overflow-y:auto}.load-more-button,limel-spinner{align-self:center}.load-more-button{--icon-background-color:var(--lime-elevated-surface-background-color)}.items{--limel-overflow-mask-vertical:linear-gradient( to bottom, transparent 0%, black calc(0% + var(--limel-top-edge-fade-height, 1rem)), black calc(100% - var(--limel-bottom-edge-fade-height, 1rem)), transparent 100% );-webkit-mask-image:var(--limel-overflow-mask-vertical);mask-image:var(--limel-overflow-mask-vertical);padding-top:var(--limel-top-edge-fade-height, 1rem);padding-bottom:var(--limel-bottom-edge-fade-height, 1rem);--limel-top-edge-fade-height:0.5rem;--limel-bottom-edge-fade-height:2rem;flex-grow:1;display:flex;flex-direction:column;gap:0.75rem;padding:var(--limel-top-edge-fade-height) 0.5rem var(--limel-bottom-edge-fade-height) 0.5rem;overflow-y:auto;-webkit-overflow-scrolling:touch}limebb-kanban-item{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}limebb-kanban-item:hover,limebb-kanban-item:focus,limebb-kanban-item:focus-visible{will-change:color, background-color, box-shadow, transform}limebb-kanban-item:hover,limebb-kanban-item:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}limebb-kanban-item:hover{box-shadow:var(--button-shadow-hovered)}limebb-kanban-item:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}limebb-kanban-item:hover,limebb-kanban-item:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}limebb-kanban-item:focus{outline:none}limebb-kanban-item:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}limebb-kanban-item.is-selected{box-shadow:var(--shadow-focused-state)}limebb-kanban-item.is-selected:hover{box-shadow:var(--shadow-focused-state), var(--button-shadow-hovered)}';export{n as limebb_kanban_group}
@@ -1 +1 @@
1
- import{r as t,c as i,h as e,H as r}from"./p-LEJjPpY0.js";import{b as o}from"./p-Dtg8KAQt.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:"466bd6547e34e2176054e4abe4354377ea02c316",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 t,c as i,h as e,H as r}from"./p-DwHAn7LS.js";import{b as o}from"./p-Bkno2RtN.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:"466bd6547e34e2176054e4abe4354377ea02c316",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 +1 @@
1
- import{r as t,c as e,h as i}from"./p-LEJjPpY0.js";import{n as s}from"./p-Dtg8KAQt.js";const a=[{value:"string",text:"Text"},{value:"number",text:"Number"},{value:"date",text:"Date"},{value:"datetime",text:"Date & time"},{value:"time",text:"Time"}],r=[{value:s.EQUALS,text:"Equals"},{value:s.NOT_EQUALS,text:"Does not equal"},{value:s.LESS,text:"Less than"},{value:s.LESS_OR_EQUAL,text:"Less than or equal to"},{value:s.GREATER,text:"Greater than"},{value:s.GREATER_OR_EQUAL,text:"Greater than or equal to"}],n="__relative_offset__",h="__specific__",l=[{value:"$now",text:"Now"},{value:"$today",text:"Today"},{value:"$tomorrow",text:"Tomorrow"},{value:"$yesterday",text:"Yesterday"},{value:"$this_week",text:"This week"},{value:"$this_month",text:"This month"},{value:"$this_quarter",text:"This quarter"},{value:"$this_year",text:"This year"}],o=new Set(l.map((t=>t.value))),u=[{value:"next",text:"Next"},{value:"previous",text:"Previous"}],d=[{value:"day",text:"days"},{value:"week",text:"weeks"},{value:"month",text:"months"},{value:"quarter",text:"quarters"},{value:"year",text:"years"}],v=/^\$(next|previous)_(day|week|month|quarter|year)\((\d+)\)$/,c=new Set(["date","datetime","time"]),m=class{constructor(i){t(this,i),this.change=e(this,"change"),this.value={},this.direction="next",this.unit="week",this.count=1,this.countInput="1",this.countInvalid=!1,this.handleTypeChange=t=>{var e,i;t.stopPropagation(),this.resetOperandState(),this.emit(this.value.operator,void 0,null!==(i=null===(e=t.detail)||void 0===e?void 0:e.value)&&void 0!==i?i:"string")},this.handleOperatorChange=t=>{var e;t.stopPropagation();const i=null===(e=t.detail)||void 0===e?void 0:e.value;i?this.emit(i,this.value.operand):this.emit(void 0,void 0)},this.handleScalarOperandChange=t=>{t.stopPropagation();const e=this.value.operator;e&&this.emit(e,this.parseScalarOperand(t.detail))},this.handleOperandKeyChange=t=>{var e;t.stopPropagation();const i=this.value.operator;if(!i)return;const s=null===(e=t.detail)||void 0===e?void 0:e.value;if(this.operandKey=s,s!==n)return s===h?(this.specificDate||(this.specificDate=new Date),void this.emit(i,this.formatSpecific(this.specificDate))):void this.emit(i,s||void 0);this.emit(i,this.relativeOffsetToken())},this.handleDirectionChange=t=>{var e,i;t.stopPropagation(),this.direction=null!==(i=null===(e=t.detail)||void 0===e?void 0:e.value)&&void 0!==i?i:"next",this.emitRelativeOffset()},this.handleUnitChange=t=>{var e,i;t.stopPropagation(),this.unit=null!==(i=null===(e=t.detail)||void 0===e?void 0:e.value)&&void 0!==i?i:"week",this.emitRelativeOffset()},this.handleCountChange=t=>{t.stopPropagation(),this.countInput=String(t.detail);const e=Number.parseInt(this.countInput,10);Number.isNaN(e)||e<1?this.countInvalid=!0:(this.countInvalid=!1,this.count=e,this.emitRelativeOffset())},this.handleSpecificDateChange=t=>{t.stopPropagation();const e=this.value.operator;if(!e)return;const i=t.detail instanceof Date?t.detail:void 0;this.specificDate=i,this.emit(e,i?this.formatSpecific(i):void 0)}}componentWillLoad(){this.syncFromValue(this.value)}onValueChange(t){this.syncFromValue(t)}get valueType(){var t;return null!==(t=this.value.valueType)&&void 0!==t?t:"string"}render(){const t=a.find((t=>t.value===this.valueType)),e=r.find((t=>t.value===this.value.operator));return i("div",{key:"b7ed0eedaa937029a3e51d53630cd9a352804deb",class:"rule"},i("limel-select",{key:"402c121d9f06c1c60b6c03c7b82049127a9cd272",class:"type-select",label:"Compare as",options:a,value:t,onChange:this.handleTypeChange}),i("limel-select",{key:"aa59ca982dbca9a5b17d50c721fde57c6ab888d8",class:"operator-select",label:"When the value",options:r,value:e,onChange:this.handleOperatorChange}),this.renderOperand())}renderOperand(){return this.value.operator?c.has(this.valueType)?this.renderTemporalOperand():this.renderScalarInput():null}renderScalarInput(){return i("limel-input-field",{class:"operand-input",label:"Compared with",type:"number"===this.valueType?"number":"text",value:void 0===this.value.operand?"":String(this.value.operand),onChange:this.handleScalarOperandChange})}renderTemporalOperand(){const t=this.operandOptions(),e=t.find((t=>t.value===this.operandKey));return[i("limel-select",{key:"operand-select",class:"operand-select",label:"Compared with",options:t,value:e,onChange:this.handleOperandKeyChange}),this.renderTemporalSubControl()]}operandOptions(){if("time"===this.valueType)return[{value:"$now",text:"Now"},{value:h,text:"Specific time…"}];const t="datetime"===this.valueType?"Specific date & time…":"Specific date…";return[..."date"===this.valueType?l.filter((t=>"$now"!==t.value)):l,{value:n,text:"Relative offset…"},{value:h,text:t}]}renderTemporalSubControl(){return this.operandKey===n?this.renderOffsetBuilder():this.operandKey===h?this.renderDatePicker():null}renderOffsetBuilder(){const t=u.find((t=>t.value===this.direction)),e=d.find((t=>t.value===this.unit));return i("div",{key:"offset-builder",class:"offset-builder"},i("limel-select",{class:"offset-direction",options:u,value:t,onChange:this.handleDirectionChange}),i("limel-input-field",{class:"offset-count",label:"Amount",type:"number",required:!0,invalid:this.countInvalid,value:this.countInput,onChange:this.handleCountChange}),i("limel-select",{class:"offset-unit",options:d,value:e,onChange:this.handleUnitChange}))}renderDatePicker(){return i("limel-date-picker",{key:"specific-picker",class:"operand-picker",label:"Compared with",type:this.valueType,value:this.specificDate,onChange:this.handleSpecificDateChange})}emitRelativeOffset(){const t=this.value.operator;t&&this.emit(t,this.relativeOffsetToken())}relativeOffsetToken(){return`$${this.direction}_${this.unit}(${this.count})`}parseScalarOperand(t){const e=String(t);if(""===e.trim())return;if("number"!==this.valueType)return e;const i=Number(e);return Number.isNaN(i)?void 0:i}formatSpecific(t){return"datetime"===this.valueType?t.toISOString():"time"===this.valueType?`${p(t.getHours())}:${p(t.getMinutes())}:${p(t.getSeconds())}`:`${t.getFullYear()}-${p(t.getMonth()+1)}-${p(t.getDate())}`}emit(t,e,i=this.valueType){const s={valueType:i};t&&(s.operator=t),void 0!==e&&(s.operand=e),this.change.emit(s)}resetOperandState(){this.operandKey=void 0,this.specificDate=void 0,this.direction="next",this.unit="week",this.count=1,this.countInput="1",this.countInvalid=!1}syncFromValue(t){const e=null==t?void 0:t.operand;if("string"!=typeof e||""===e)return;if(!c.has(this.valueType))return void(this.operandKey=void 0);const i=v.exec(e);if(i){const[,t,e,s]=i;return this.operandKey=n,this.direction=t,this.unit=e,this.count=Number(s),this.countInput=s,void(this.countInvalid=!1)}o.has(e)?this.operandKey=e:(this.operandKey=h,this.specificDate=this.parseSpecific(e))}parseSpecific(t){const e=new Date(this.specificDateText(t));return Number.isNaN(e.getTime())?void 0:e}specificDateText(t){return"time"===this.valueType?`1970-01-01T${t}`:"date"===this.valueType?`${t}T00:00:00`:t}static get watchers(){return{value:[{onValueChange:0}]}}};function p(t){return String(t).padStart(2,"0")}m.style=":host{display:block}.rule{display:grid;gap:0.5rem;grid-template-columns:repeat(auto-fit, minmax(12rem, 1fr))}.offset-builder{display:flex;gap:0.5rem;align-items:flex-end;grid-column:1/-1}.offset-builder .offset-count{max-width:6rem}";export{m as limebb_value_comparison_editor}
1
+ import{r as t,c as e,h as i}from"./p-DwHAn7LS.js";import{n as s}from"./p-Bkno2RtN.js";const a=[{value:"string",text:"Text"},{value:"number",text:"Number"},{value:"date",text:"Date"},{value:"datetime",text:"Date & time"},{value:"time",text:"Time"}],r=[{value:s.EQUALS,text:"Equals"},{value:s.NOT_EQUALS,text:"Does not equal"},{value:s.LESS,text:"Less than"},{value:s.LESS_OR_EQUAL,text:"Less than or equal to"},{value:s.GREATER,text:"Greater than"},{value:s.GREATER_OR_EQUAL,text:"Greater than or equal to"}],n="__relative_offset__",h="__specific__",l=[{value:"$now",text:"Now"},{value:"$today",text:"Today"},{value:"$tomorrow",text:"Tomorrow"},{value:"$yesterday",text:"Yesterday"},{value:"$this_week",text:"This week"},{value:"$this_month",text:"This month"},{value:"$this_quarter",text:"This quarter"},{value:"$this_year",text:"This year"}],o=new Set(l.map((t=>t.value))),u=[{value:"next",text:"Next"},{value:"previous",text:"Previous"}],d=[{value:"day",text:"days"},{value:"week",text:"weeks"},{value:"month",text:"months"},{value:"quarter",text:"quarters"},{value:"year",text:"years"}],v=/^\$(next|previous)_(day|week|month|quarter|year)\((\d+)\)$/,c=new Set(["date","datetime","time"]),m=class{constructor(i){t(this,i),this.change=e(this,"change"),this.value={},this.direction="next",this.unit="week",this.count=1,this.countInput="1",this.countInvalid=!1,this.handleTypeChange=t=>{var e,i;t.stopPropagation(),this.resetOperandState(),this.emit(this.value.operator,void 0,null!==(i=null===(e=t.detail)||void 0===e?void 0:e.value)&&void 0!==i?i:"string")},this.handleOperatorChange=t=>{var e;t.stopPropagation();const i=null===(e=t.detail)||void 0===e?void 0:e.value;i?this.emit(i,this.value.operand):this.emit(void 0,void 0)},this.handleScalarOperandChange=t=>{t.stopPropagation();const e=this.value.operator;e&&this.emit(e,this.parseScalarOperand(t.detail))},this.handleOperandKeyChange=t=>{var e;t.stopPropagation();const i=this.value.operator;if(!i)return;const s=null===(e=t.detail)||void 0===e?void 0:e.value;if(this.operandKey=s,s!==n)return s===h?(this.specificDate||(this.specificDate=new Date),void this.emit(i,this.formatSpecific(this.specificDate))):void this.emit(i,s||void 0);this.emit(i,this.relativeOffsetToken())},this.handleDirectionChange=t=>{var e,i;t.stopPropagation(),this.direction=null!==(i=null===(e=t.detail)||void 0===e?void 0:e.value)&&void 0!==i?i:"next",this.emitRelativeOffset()},this.handleUnitChange=t=>{var e,i;t.stopPropagation(),this.unit=null!==(i=null===(e=t.detail)||void 0===e?void 0:e.value)&&void 0!==i?i:"week",this.emitRelativeOffset()},this.handleCountChange=t=>{t.stopPropagation(),this.countInput=String(t.detail);const e=Number.parseInt(this.countInput,10);Number.isNaN(e)||e<1?this.countInvalid=!0:(this.countInvalid=!1,this.count=e,this.emitRelativeOffset())},this.handleSpecificDateChange=t=>{t.stopPropagation();const e=this.value.operator;if(!e)return;const i=t.detail instanceof Date?t.detail:void 0;this.specificDate=i,this.emit(e,i?this.formatSpecific(i):void 0)}}componentWillLoad(){this.syncFromValue(this.value)}onValueChange(t){this.syncFromValue(t)}get valueType(){var t;return null!==(t=this.value.valueType)&&void 0!==t?t:"string"}render(){const t=a.find((t=>t.value===this.valueType)),e=r.find((t=>t.value===this.value.operator));return i("div",{key:"9c6e6b6f160fb05bd4a242a207d16b8420ff41df",class:"rule"},i("limel-select",{key:"703815442cf66522e406223da8ec738eca3d17ff",class:"type-select",label:"Compare as",options:a,value:t,onChange:this.handleTypeChange}),i("limel-select",{key:"371b67efd26c2519ad2dc2a826a8a28d4b17a659",class:"operator-select",label:"When the value",options:r,value:e,onChange:this.handleOperatorChange}),this.renderOperand())}renderOperand(){return this.value.operator?c.has(this.valueType)?this.renderTemporalOperand():this.renderScalarInput():null}renderScalarInput(){return i("limel-input-field",{class:"operand-input",label:"Compared with",type:"number"===this.valueType?"number":"text",value:void 0===this.value.operand?"":String(this.value.operand),onChange:this.handleScalarOperandChange})}renderTemporalOperand(){const t=this.operandOptions(),e=t.find((t=>t.value===this.operandKey));return[i("limel-select",{key:"operand-select",class:"operand-select",label:"Compared with",options:t,value:e,onChange:this.handleOperandKeyChange}),this.renderTemporalSubControl()]}operandOptions(){if("time"===this.valueType)return[{value:"$now",text:"Now"},{value:h,text:"Specific time…"}];const t="datetime"===this.valueType?"Specific date & time…":"Specific date…";return[..."date"===this.valueType?l.filter((t=>"$now"!==t.value)):l,{value:n,text:"Relative offset…"},{value:h,text:t}]}renderTemporalSubControl(){return this.operandKey===n?this.renderOffsetBuilder():this.operandKey===h?this.renderDatePicker():null}renderOffsetBuilder(){const t=u.find((t=>t.value===this.direction)),e=d.find((t=>t.value===this.unit));return i("div",{key:"offset-builder",class:"offset-builder"},i("limel-select",{class:"offset-direction",options:u,value:t,onChange:this.handleDirectionChange}),i("limel-input-field",{class:"offset-count",label:"Amount",type:"number",required:!0,invalid:this.countInvalid,value:this.countInput,onChange:this.handleCountChange}),i("limel-select",{class:"offset-unit",options:d,value:e,onChange:this.handleUnitChange}))}renderDatePicker(){return i("limel-date-picker",{key:"specific-picker",class:"operand-picker",label:"Compared with",type:this.valueType,value:this.specificDate,onChange:this.handleSpecificDateChange})}emitRelativeOffset(){const t=this.value.operator;t&&this.emit(t,this.relativeOffsetToken())}relativeOffsetToken(){return`$${this.direction}_${this.unit}(${this.count})`}parseScalarOperand(t){const e=String(t);if(""===e.trim())return;if("number"!==this.valueType)return e;const i=Number(e);return Number.isNaN(i)?void 0:i}formatSpecific(t){return"datetime"===this.valueType?t.toISOString():"time"===this.valueType?`${f(t.getHours())}:${f(t.getMinutes())}:${f(t.getSeconds())}`:`${t.getFullYear()}-${f(t.getMonth()+1)}-${f(t.getDate())}`}emit(t,e,i=this.valueType){const s={valueType:i};t&&(s.operator=t),void 0!==e&&(s.operand=e),this.change.emit(s)}resetOperandState(){this.operandKey=void 0,this.specificDate=void 0,this.direction="next",this.unit="week",this.count=1,this.countInput="1",this.countInvalid=!1}syncFromValue(t){const e=null==t?void 0:t.operand;if("string"!=typeof e||""===e)return;if(!c.has(this.valueType))return void(this.operandKey=void 0);const i=v.exec(e);if(i){const[,t,e,s]=i;return this.operandKey=n,this.direction=t,this.unit=e,this.count=Number(s),this.countInput=s,void(this.countInvalid=!1)}o.has(e)?this.operandKey=e:(this.operandKey=h,this.specificDate=this.parseSpecific(e))}parseSpecific(t){const e=new Date(this.specificDateText(t));return Number.isNaN(e.getTime())?void 0:e}specificDateText(t){return"time"===this.valueType?`1970-01-01T${t}`:"date"===this.valueType?`${t}T00:00:00`:t}static get watchers(){return{value:[{onValueChange:0}]}}};function f(t){return String(t).padStart(2,"0")}m.style=":host{display:block}.rule{display:grid;gap:0.5rem;grid-template-columns:repeat(auto-fit, minmax(12rem, 1fr))}.offset-builder{display:flex;gap:0.5rem;align-items:flex-end;grid-column:1/-1}.offset-builder .offset-count{max-width:6rem}";export{m as limebb_value_comparison_editor}
@@ -1 +1 @@
1
- import{r as e,c as t,h as i,H as r}from"./p-LEJjPpY0.js";import{b as s}from"./p-Dtg8KAQt.js";import{g as o}from"./p-Bb18Bgig.js";import{i as n}from"./p-CkTg5UPD.js";import{b as l}from"./p-CKEnwX6j.js";import{i as a,a as d,b as h}from"./p-BgAfMcRA.js";import"./p-CtcTT7BK.js";function m(e){return"string"==typeof e||!d(e)&&a(e)&&"[object String]"==h(e)}const c=class{constructor(i){e(this,i),this.change=t(this,"change"),this.label="Sort Order",this.items=[],this.handleItemChange=e=>t=>{t.stopPropagation();const i=[...this.items];null===t.detail?i.splice(e,1):i[e]=t.detail,this.items=i,this.emitChange()},this.handleAddSortField=()=>{this.items=[...this.items,{"":"ASC"}],this.emitChange()}}componentWillLoad(){this.value&&this.value.length>0&&(this.items=[...this.value])}handleValueChange(e){e&&(e.length!==this.items.length||!e.every(((e,t)=>{const i=this.items[t];if(!i)return!1;const r=Object.keys(e)[0],s=Object.keys(i)[0];return r===s&&e[r]===i[s]})))&&(this.items=e.length>0?[...e]:[])}render(){return i(r,{key:"ce933b9c6df59149fa40d26f7e38bdce89208df0"},this.renderEmptyState(),this.renderOrderByEditor())}renderEmptyState(){return this.limetype?null:i("div",{class:"empty-state"},i("p",null,"Select a limetype to configure sorting"))}renderOrderByEditor(){return this.limetype?[this.renderHeader(),this.renderOrderByList(),this.renderActions()]:null}renderHeader(){return i("limel-header",{class:"is-narrow",heading:this.label,icon:"sorting_arrows"})}renderOrderByList(){return 0===this.items.length?null:i("div",{class:"order-by-list"},this.items.map(((e,t)=>this.renderItem(e,t))))}renderActions(){return i("limel-button",{label:"Add Sort Field",icon:"plus_math",onClick:this.handleAddSortField})}renderItem(e,t){const r=Object.keys(e)[0]||"";return i("limebb-lime-query-order-by-item",{key:`${r}-${t}`,class:"order-by-item",platform:this.platform,context:this.context,limetype:this.limetype,item:e,onItemChange:this.handleItemChange(t)})}emitChange(){this.change.emit(this.items)}static get watchers(){return{value:[{handleValueChange:0}]}}};c.style=":host(limebb-lime-query-order-by-editor){display:flex;flex-direction:column;gap:1rem;padding:1rem 0}.header{display:flex;justify-content:space-between;align-items:center;gap:1rem}.header h4{margin:0;font-size:1rem;font-weight:600;color:rgb(var(--contrast-1000))}.order-by-list{display:flex;flex-direction:column;gap:1rem;border:1px solid rgb(var(--contrast-300));border-radius:0.25rem;background-color:rgb(var(--contrast-50));min-height:4rem}.order-by-item{padding:0.5rem;border-radius:0.25rem;transition:background-color 0.2s}.order-by-item:hover{background-color:rgb(var(--contrast-100))}.actions{display:flex;width:100%}.summary{display:flex;justify-content:space-between;align-items:center;padding-top:0.5rem;border-top:1px solid rgb(var(--contrast-300))}.summary .count{font-size:0.875rem;font-weight:500;color:rgb(var(--contrast-900))}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)}.empty-state{padding:0 2rem;text-align:center;color:rgb(var(--contrast-700))}";const u=["string","text","phone","integer","decimal","percent","time","date","year","quarter","month","yesno","link","user","xml","option","set","file","system"],p=u.filter((e=>"system"!==e));p.push("belongsto","hasone","hasmany","hasandbelongstomany");const b=class{constructor(i){e(this,i),this.change=t(this,"change"),this.propertyFields=[],this.fieldName="limetype",this.handleChange=e=>{e.stopPropagation();let t="";e.detail&&"value"in e.detail&&(t=e.detail.value),this.change.emit(t||void 0)}}componentWillLoad(){const e=this.platform.get(s.Application).getLanguage();this.collator=new Intl.Collator(e,{numeric:!0,sensitivity:"base"})}componentShouldUpdate(e,t,i){var r,s,o,n;return"formInfo"!==i||(o=null===(r=null==e?void 0:e.schema)||void 0===r?void 0:r.oneOf,n=null===(s=null==t?void 0:t.schema)||void 0===s?void 0:s.oneOf,!l(o,n))}render(){var e;const t=this.getLimeTypes().map(g);t.sort(((e,t)=>this.collator.compare(e.text,t.text)));let r=t.find((e=>e.value===this.value)),s=this.invalid;return this.value&&!r&&(s=!0,t.unshift({text:(null===(e=this.limeTypeRepository.getLimeType(this.value))||void 0===e?void 0:e.localname.singular)||this.value,value:this.value}),r=t[0]),t.unshift({text:"",value:""}),i("limel-select",{key:"412e4360e37481f5e5e42eb6018a78350bcde4ae",label:this.label,options:t,value:r,required:this.required,helperText:this.helperText,invalid:s,disabled:this.disabled||this.readonly,onChange:this.handleChange})}componentWillRender(){this.updatePropertyFields(this.value||"")}getLimeTypes(){var e,t;let i=this.limetypes;return(null===(t=null===(e=this.formInfo)||void 0===e?void 0:e.schema)||void 0===t?void 0:t.oneOf)&&(i=this.formInfo.schema.oneOf.map((e=>e.const)).filter(m)),i?i.map((e=>this.limeTypeRepository.getLimeType(e))).filter(n):this.limeTypeRepository.getLimeTypes()}updatePropertyFields(e){for(const t of this.propertyFields)t.limetype=e,t.allowedPropertyTypes===u&&(t.allowedPropertyTypes=p)}get limeTypeRepository(){return this.platform.get(s.LimeTypeRepository)}},g=e=>({text:e.localname.singular,value:e.name,icon:o(e)});export{c as limebb_lime_query_order_by_editor,b as limebb_limetype_field}
1
+ import{r as e,c as t,h as i,H as r}from"./p-DwHAn7LS.js";import{b as s}from"./p-Bkno2RtN.js";import{g as o}from"./p-B-WBKAaa.js";import{i as n}from"./p-CkTg5UPD.js";import{b as a}from"./p-CKEnwX6j.js";import{i as l,a as d,b as h}from"./p-BgAfMcRA.js";import"./p-CtcTT7BK.js";function m(e){return"string"==typeof e||!d(e)&&l(e)&&"[object String]"==h(e)}const c=class{constructor(i){e(this,i),this.change=t(this,"change"),this.label="Sort Order",this.items=[],this.handleItemChange=e=>t=>{t.stopPropagation();const i=[...this.items];null===t.detail?i.splice(e,1):i[e]=t.detail,this.items=i,this.emitChange()},this.handleAddSortField=()=>{this.items=[...this.items,{"":"ASC"}],this.emitChange()}}componentWillLoad(){this.value&&this.value.length>0&&(this.items=[...this.value])}handleValueChange(e){e&&(e.length!==this.items.length||!e.every(((e,t)=>{const i=this.items[t];if(!i)return!1;const r=Object.keys(e)[0],s=Object.keys(i)[0];return r===s&&e[r]===i[s]})))&&(this.items=e.length>0?[...e]:[])}render(){return i(r,{key:"ce933b9c6df59149fa40d26f7e38bdce89208df0"},this.renderEmptyState(),this.renderOrderByEditor())}renderEmptyState(){return this.limetype?null:i("div",{class:"empty-state"},i("p",null,"Select a limetype to configure sorting"))}renderOrderByEditor(){return this.limetype?[this.renderHeader(),this.renderOrderByList(),this.renderActions()]:null}renderHeader(){return i("limel-header",{class:"is-narrow",heading:this.label,icon:"sorting_arrows"})}renderOrderByList(){return 0===this.items.length?null:i("div",{class:"order-by-list"},this.items.map(((e,t)=>this.renderItem(e,t))))}renderActions(){return i("limel-button",{label:"Add Sort Field",icon:"plus_math",onClick:this.handleAddSortField})}renderItem(e,t){const r=Object.keys(e)[0]||"";return i("limebb-lime-query-order-by-item",{key:`${r}-${t}`,class:"order-by-item",platform:this.platform,context:this.context,limetype:this.limetype,item:e,onItemChange:this.handleItemChange(t)})}emitChange(){this.change.emit(this.items)}static get watchers(){return{value:[{handleValueChange:0}]}}};c.style=":host(limebb-lime-query-order-by-editor){display:flex;flex-direction:column;gap:1rem;padding:1rem 0}.header{display:flex;justify-content:space-between;align-items:center;gap:1rem}.header h4{margin:0;font-size:1rem;font-weight:600;color:rgb(var(--contrast-1000))}.order-by-list{display:flex;flex-direction:column;gap:1rem;border:1px solid rgb(var(--contrast-300));border-radius:0.25rem;background-color:rgb(var(--contrast-50));min-height:4rem}.order-by-item{padding:0.5rem;border-radius:0.25rem;transition:background-color 0.2s}.order-by-item:hover{background-color:rgb(var(--contrast-100))}.actions{display:flex;width:100%}.summary{display:flex;justify-content:space-between;align-items:center;padding-top:0.5rem;border-top:1px solid rgb(var(--contrast-300))}.summary .count{font-size:0.875rem;font-weight:500;color:rgb(var(--contrast-900))}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)}.empty-state{padding:0 2rem;text-align:center;color:rgb(var(--contrast-700))}";const u=["string","text","phone","integer","decimal","percent","time","date","year","quarter","month","yesno","link","user","xml","option","set","file","system"],p=u.filter((e=>"system"!==e));p.push("belongsto","hasone","hasmany","hasandbelongstomany");const b=class{constructor(i){e(this,i),this.change=t(this,"change"),this.propertyFields=[],this.fieldName="limetype",this.handleChange=e=>{e.stopPropagation();let t="";e.detail&&"value"in e.detail&&(t=e.detail.value),this.change.emit(t||void 0)}}componentWillLoad(){const e=this.platform.get(s.Application).getLanguage();this.collator=new Intl.Collator(e,{numeric:!0,sensitivity:"base"})}componentShouldUpdate(e,t,i){var r,s,o,n;return"formInfo"!==i||(o=null===(r=null==e?void 0:e.schema)||void 0===r?void 0:r.oneOf,n=null===(s=null==t?void 0:t.schema)||void 0===s?void 0:s.oneOf,!a(o,n))}render(){var e;const t=this.getLimeTypes().map(g);t.sort(((e,t)=>this.collator.compare(e.text,t.text)));let r=t.find((e=>e.value===this.value)),s=this.invalid;return this.value&&!r&&(s=!0,t.unshift({text:(null===(e=this.limeTypeRepository.getLimeType(this.value))||void 0===e?void 0:e.localname.singular)||this.value,value:this.value}),r=t[0]),t.unshift({text:"",value:""}),i("limel-select",{key:"412e4360e37481f5e5e42eb6018a78350bcde4ae",label:this.label,options:t,value:r,required:this.required,helperText:this.helperText,invalid:s,disabled:this.disabled||this.readonly,onChange:this.handleChange})}componentWillRender(){this.updatePropertyFields(this.value||"")}getLimeTypes(){var e,t;let i=this.limetypes;return(null===(t=null===(e=this.formInfo)||void 0===e?void 0:e.schema)||void 0===t?void 0:t.oneOf)&&(i=this.formInfo.schema.oneOf.map((e=>e.const)).filter(m)),i?i.map((e=>this.limeTypeRepository.getLimeType(e))).filter(n):this.limeTypeRepository.getLimeTypes()}updatePropertyFields(e){for(const t of this.propertyFields)t.limetype=e,t.allowedPropertyTypes===u&&(t.allowedPropertyTypes=p)}get limeTypeRepository(){return this.platform.get(s.LimeTypeRepository)}},g=e=>({text:e.localname.singular,value:e.name,icon:o(e)});export{c as limebb_lime_query_order_by_editor,b as limebb_limetype_field}
@@ -1 +1 @@
1
- import{r,h as a}from"./p-LEJjPpY0.js";const d=class{constructor(d){r(this,d),this.renderHeader=()=>{if(this.heading||this.subheading||this.supportingText||this.icon)return a("limel-header",{heading:this.heading,subheading:this.subheading,supportingText:this.supportingText,icon:this.icon},a("slot",{name:"header-actions"}))}}render(){return[this.renderHeader(),a("slot",{key:"6ded0fe72e2cad4fe6508cb8cb38d0eff0865bcc",name:"content"})]}};d.style=":host(limebb-dashboard-widget){--dashboard-widget-background-color:var( --start-page-grid-widget-background-color, rgb(var(--contrast-100)) );--header-icon-color:var(--dashboard-widget-icon-color);--header-background-color:var( --dashboard-widget-header-background-color, var(--start-page-grid-widget-header-color) );--dashboard-widget-border-radius:var( --start-page-grid-widget-border-radius, 1rem );--header-top-right-left-border-radius:0;display:flex;flex-direction:column;border-radius:var(--dashboard-widget-border-radius);background-color:var(--dashboard-widget-background-color);height:100%;width:100%;overflow:hidden}::slotted(limebb-navigation-button[slot=header-actions]){--navigation-button-background-color:var( --dashboard-widget-header-background-color, var(--start-page-grid-widget-header-color, rgb(var(--contrast-300))) )}";export{d as limebb_dashboard_widget}
1
+ import{r,h as a}from"./p-DwHAn7LS.js";const d=class{constructor(d){r(this,d),this.renderHeader=()=>{if(this.heading||this.subheading||this.supportingText||this.icon)return a("limel-header",{heading:this.heading,subheading:this.subheading,supportingText:this.supportingText,icon:this.icon},a("slot",{name:"header-actions"}))}}render(){return[this.renderHeader(),a("slot",{key:"6ded0fe72e2cad4fe6508cb8cb38d0eff0865bcc",name:"content"})]}};d.style=":host(limebb-dashboard-widget){--dashboard-widget-background-color:var( --start-page-grid-widget-background-color, rgb(var(--contrast-100)) );--header-icon-color:var(--dashboard-widget-icon-color);--header-background-color:var( --dashboard-widget-header-background-color, var(--start-page-grid-widget-header-color) );--dashboard-widget-border-radius:var( --start-page-grid-widget-border-radius, 1rem );--header-top-right-left-border-radius:0;display:flex;flex-direction:column;border-radius:var(--dashboard-widget-border-radius);background-color:var(--dashboard-widget-background-color);height:100%;width:100%;overflow:hidden}::slotted(limebb-navigation-button[slot=header-actions]){--navigation-button-background-color:var( --dashboard-widget-header-background-color, var(--start-page-grid-widget-header-color, rgb(var(--contrast-300))) )}";export{d as limebb_dashboard_widget}
@@ -1 +1 @@
1
- import{r as e,c as t,h as i}from"./p-LEJjPpY0.js";const r=class{constructor(i){e(this,i),this.change=t(this,"change"),this.getOptionValue=e=>e.value||void 0,this.getAffixValue=e=>0===e.length?[]:e.map((e=>e.value)),this.handleChangeOptions=(e,t=e=>e)=>i=>{i.stopPropagation(),this.change.emit(Object.assign(Object.assign({},this.value),{options:Object.assign(Object.assign({},this.value.options),{[e]:t(i.detail)||void 0})}))},this.handleChangeAffix=e=>t=>{t.stopPropagation(),this.change.emit(Object.assign(Object.assign({},this.value),{[e]:this.getAffixValue(t.detail)}))},this.handleChangeHour12=e=>{e.stopPropagation();let t=JSON.parse(e.detail.value);null===t&&(t=void 0),this.change.emit(Object.assign(Object.assign({},this.value),{options:Object.assign(Object.assign({},this.value.options),{hour12:t})}))}}render(){return[this.renderDate(),this.renderTime(),this.renderAffix("prefix"),this.renderAffix("suffix")]}renderDate(){return i("limel-header",{icon:"calendar",heading:"Date settings"},i("section",null,this.renderDay(),this.renderMonth(),this.renderYear(),this.renderWeekday()))}renderDay(){const e=[{value:"",text:""},{value:"2-digit",text:"2 digit"},{value:"numeric",text:"Numeric"}],t=e.find((e=>{var t;return e.value&&e.value===(null===(t=this.value.options)||void 0===t?void 0:t.day)}));return i("limel-select",{label:"Day",options:e,value:t,onChange:this.handleChangeOptions("day",this.getOptionValue)})}renderMonth(){const e=[{value:"",text:""},{value:"long",text:"Long"},{value:"narrow",text:"Narrow"},{value:"short",text:"Short"},{value:"2-digit",text:"2 digit"},{value:"numeric",text:"Numeric"}],t=e.find((e=>{var t;return e.value&&e.value===(null===(t=this.value.options)||void 0===t?void 0:t.month)}));return i("limel-select",{label:"Month",options:e,value:t,onChange:this.handleChangeOptions("month",this.getOptionValue)})}renderYear(){const e=[{value:"",text:""},{value:"2-digit",text:"2 digit"},{value:"numeric",text:"Numeric"}],t=e.find((e=>{var t;return e.value&&e.value===(null===(t=this.value.options)||void 0===t?void 0:t.year)}));return i("limel-select",{label:"Year",options:e,value:t,onChange:this.handleChangeOptions("year",this.getOptionValue)})}renderWeekday(){const e=[{value:"",text:""},{value:"long",text:"Long"},{value:"narrow",text:"Narrow"},{value:"short",text:"Short"}],t=e.find((e=>{var t;return e.value&&e.value===(null===(t=this.value.options)||void 0===t?void 0:t.weekday)}));return i("limel-select",{label:"Weekday",options:e,value:t,onChange:this.handleChangeOptions("weekday",this.getOptionValue)})}renderTime(){return i("limel-header",{icon:"clock",heading:"Time settings"},i("section",null,this.renderHour(),this.renderMinute(),this.renderSecond(),this.renderHour12()))}renderHour(){const e=[{value:"",text:""},{value:"2-digit",text:"2 digit"},{value:"numeric",text:"Numeric"}],t=e.find((e=>{var t;return e.value&&e.value===(null===(t=this.value.options)||void 0===t?void 0:t.hour)}));return i("limel-select",{label:"Hour",options:e,value:t,onChange:this.handleChangeOptions("hour",this.getOptionValue)})}renderMinute(){const e=[{value:"",text:""},{value:"2-digit",text:"2 digit"},{value:"numeric",text:"Numeric"}],t=e.find((e=>{var t;return e.value&&e.value===(null===(t=this.value.options)||void 0===t?void 0:t.minute)}));return i("limel-select",{label:"Minute",options:e,value:t,onChange:this.handleChangeOptions("minute",this.getOptionValue)})}renderSecond(){const e=[{value:"",text:""},{value:"2-digit",text:"2 digit"},{value:"numeric",text:"Numeric"}],t=e.find((e=>{var t;return e.value&&e.value===(null===(t=this.value.options)||void 0===t?void 0:t.second)}));return i("limel-select",{label:"Second",options:e,value:t,onChange:this.handleChangeOptions("second",this.getOptionValue)})}renderHour12(){const e=[{value:"null",text:"Default",secondaryText:"Locale dependent"},{value:"true",text:"12 hour"},{value:"false",text:"24 hour"}],t=e.find((e=>{var t,i;return e.value===String(null===(t=this.value.options)||void 0===t?void 0:t.hour12)||"null"===e.value&&void 0===(null===(i=this.value.options)||void 0===i?void 0:i.hour12)}));return i("limel-select",{label:"Clock format",options:e,value:t,onChange:this.handleChangeHour12})}renderAffix(e){const t=[{text:"Weekday",value:"weekday"},{text:"Day",value:"day"},{text:"Month",value:"month"},{text:"Year",value:"year"},{text:"Hour",value:"hour"},{text:"Minute",value:"minute"},{text:"Second",value:"second"}].map((e=>Object.assign(Object.assign({},e),{disabled:!Object.keys(this.value.options||{}).includes(e.value)}))),r=t.filter((t=>{var i;return t.value&&(null===(i=this.value[e])||void 0===i?void 0:i.includes(t.value))}));return i("limel-select",{multiple:!0,label:e.charAt(0).toUpperCase()+e.slice(1),options:t,value:r,onChange:this.handleChangeAffix(e)})}};r.style="*{box-sizing:border-box}:host(limebb-info-tile-date-format){display:grid;gap:0.5rem;grid-template-columns:1fr 1fr !important}limel-header{flex-wrap:wrap;grid-column:1/-1;overflow:hidden;border-radius:0.7rem;border:1px solid rgb(var(--contrast-100))}limel-header section{width:100%;padding:0.5rem;display:grid;gap:0.5rem;grid-template-columns:repeat(auto-fit, minmax(8rem, 1fr))}";export{r as limebb_info_tile_date_format}
1
+ import{r as e,c as t,h as i}from"./p-DwHAn7LS.js";const r=class{constructor(i){e(this,i),this.change=t(this,"change"),this.getOptionValue=e=>e.value||void 0,this.getAffixValue=e=>0===e.length?[]:e.map((e=>e.value)),this.handleChangeOptions=(e,t=e=>e)=>i=>{i.stopPropagation(),this.change.emit(Object.assign(Object.assign({},this.value),{options:Object.assign(Object.assign({},this.value.options),{[e]:t(i.detail)||void 0})}))},this.handleChangeAffix=e=>t=>{t.stopPropagation(),this.change.emit(Object.assign(Object.assign({},this.value),{[e]:this.getAffixValue(t.detail)}))},this.handleChangeHour12=e=>{e.stopPropagation();let t=JSON.parse(e.detail.value);null===t&&(t=void 0),this.change.emit(Object.assign(Object.assign({},this.value),{options:Object.assign(Object.assign({},this.value.options),{hour12:t})}))}}render(){return[this.renderDate(),this.renderTime(),this.renderAffix("prefix"),this.renderAffix("suffix")]}renderDate(){return i("limel-header",{icon:"calendar",heading:"Date settings"},i("section",null,this.renderDay(),this.renderMonth(),this.renderYear(),this.renderWeekday()))}renderDay(){const e=[{value:"",text:""},{value:"2-digit",text:"2 digit"},{value:"numeric",text:"Numeric"}],t=e.find((e=>{var t;return e.value&&e.value===(null===(t=this.value.options)||void 0===t?void 0:t.day)}));return i("limel-select",{label:"Day",options:e,value:t,onChange:this.handleChangeOptions("day",this.getOptionValue)})}renderMonth(){const e=[{value:"",text:""},{value:"long",text:"Long"},{value:"narrow",text:"Narrow"},{value:"short",text:"Short"},{value:"2-digit",text:"2 digit"},{value:"numeric",text:"Numeric"}],t=e.find((e=>{var t;return e.value&&e.value===(null===(t=this.value.options)||void 0===t?void 0:t.month)}));return i("limel-select",{label:"Month",options:e,value:t,onChange:this.handleChangeOptions("month",this.getOptionValue)})}renderYear(){const e=[{value:"",text:""},{value:"2-digit",text:"2 digit"},{value:"numeric",text:"Numeric"}],t=e.find((e=>{var t;return e.value&&e.value===(null===(t=this.value.options)||void 0===t?void 0:t.year)}));return i("limel-select",{label:"Year",options:e,value:t,onChange:this.handleChangeOptions("year",this.getOptionValue)})}renderWeekday(){const e=[{value:"",text:""},{value:"long",text:"Long"},{value:"narrow",text:"Narrow"},{value:"short",text:"Short"}],t=e.find((e=>{var t;return e.value&&e.value===(null===(t=this.value.options)||void 0===t?void 0:t.weekday)}));return i("limel-select",{label:"Weekday",options:e,value:t,onChange:this.handleChangeOptions("weekday",this.getOptionValue)})}renderTime(){return i("limel-header",{icon:"clock",heading:"Time settings"},i("section",null,this.renderHour(),this.renderMinute(),this.renderSecond(),this.renderHour12()))}renderHour(){const e=[{value:"",text:""},{value:"2-digit",text:"2 digit"},{value:"numeric",text:"Numeric"}],t=e.find((e=>{var t;return e.value&&e.value===(null===(t=this.value.options)||void 0===t?void 0:t.hour)}));return i("limel-select",{label:"Hour",options:e,value:t,onChange:this.handleChangeOptions("hour",this.getOptionValue)})}renderMinute(){const e=[{value:"",text:""},{value:"2-digit",text:"2 digit"},{value:"numeric",text:"Numeric"}],t=e.find((e=>{var t;return e.value&&e.value===(null===(t=this.value.options)||void 0===t?void 0:t.minute)}));return i("limel-select",{label:"Minute",options:e,value:t,onChange:this.handleChangeOptions("minute",this.getOptionValue)})}renderSecond(){const e=[{value:"",text:""},{value:"2-digit",text:"2 digit"},{value:"numeric",text:"Numeric"}],t=e.find((e=>{var t;return e.value&&e.value===(null===(t=this.value.options)||void 0===t?void 0:t.second)}));return i("limel-select",{label:"Second",options:e,value:t,onChange:this.handleChangeOptions("second",this.getOptionValue)})}renderHour12(){const e=[{value:"null",text:"Default",secondaryText:"Locale dependent"},{value:"true",text:"12 hour"},{value:"false",text:"24 hour"}],t=e.find((e=>{var t,i;return e.value===String(null===(t=this.value.options)||void 0===t?void 0:t.hour12)||"null"===e.value&&void 0===(null===(i=this.value.options)||void 0===i?void 0:i.hour12)}));return i("limel-select",{label:"Clock format",options:e,value:t,onChange:this.handleChangeHour12})}renderAffix(e){const t=[{text:"Weekday",value:"weekday"},{text:"Day",value:"day"},{text:"Month",value:"month"},{text:"Year",value:"year"},{text:"Hour",value:"hour"},{text:"Minute",value:"minute"},{text:"Second",value:"second"}].map((e=>Object.assign(Object.assign({},e),{disabled:!Object.keys(this.value.options||{}).includes(e.value)}))),r=t.filter((t=>{var i;return t.value&&(null===(i=this.value[e])||void 0===i?void 0:i.includes(t.value))}));return i("limel-select",{multiple:!0,label:e.charAt(0).toUpperCase()+e.slice(1),options:t,value:r,onChange:this.handleChangeAffix(e)})}};r.style="*{box-sizing:border-box}:host(limebb-info-tile-date-format){display:grid;gap:0.5rem;grid-template-columns:1fr 1fr !important}limel-header{flex-wrap:wrap;grid-column:1/-1;overflow:hidden;border-radius:0.7rem;border:1px solid rgb(var(--contrast-100))}limel-header section{width:100%;padding:0.5rem;display:grid;gap:0.5rem;grid-template-columns:repeat(auto-fit, minmax(8rem, 1fr))}";export{r as limebb_info_tile_date_format}
@@ -1 +1 @@
1
- import{r as e,c as t,h as i}from"./p-LEJjPpY0.js";import{L as o}from"./p-Dtg8KAQt.js";import{v as r}from"./p-DM0fyjo-.js";import"./p-CQUZjrU4.js";function s(e){let t;try{t=JSON.parse(e)}catch(e){throw new Error(`Invalid JSON: ${e.message}`)}if(null===t||"object"!=typeof t)throw new Error("Response format must be an object");const i=new Set(["object","aggregates"]),o=Object.keys(t),r=o.filter((e=>!i.has(e)));if(r.length>0)throw new Error(`Unexpected properties in response format: ${r.join(", ")}. Only 'object' and 'aggregates' are allowed.`);if(o.length>0&&!t.object&&!t.aggregates)throw new Error("Response format must contain at least one of: object, aggregates");return t}const l=class{constructor(i){e(this,i),this.change=t(this,"change"),this.label="Response Format",this.helperText="",this.mode="visual",this.codeValue="",this.handleModeChange=e=>{e.stopPropagation();const t=e.detail.id;"visual"===t?this.switchToVisualMode():"code"===t&&this.switchToCode()},this.switchToVisualMode=()=>{try{const e=s(this.codeValue);if(!r(e,this.limetypes,this.limetype,this.visualModeEnabled).visualModeSupported)return;this.internalValue=e,this.mode="visual",this.change.emit(e)}catch(e){}},this.switchToCode=()=>{this.updateCodeValue(),this.mode="code"},this.handleCodeChange=e=>{e.stopPropagation(),this.codeValue=e.detail;try{const e=s(this.codeValue);this.internalValue=e,this.change.emit(e)}catch(e){}},this.handleVisualModeChange=e=>{e.stopPropagation(),this.internalValue=e.detail,this.updateCodeValue(),this.change.emit(e.detail)}}get visualModeEnabled(){var e,t,i;return null!==(i=null===(t=null===(e=this.platform)||void 0===e?void 0:e.isFeatureEnabled)||void 0===t?void 0:t.call(e,"useLimeQueryBuilderGuiMode"))&&void 0!==i&&i}componentWillLoad(){this.internalValue=this.value||{object:{_id:null}},this.updateCodeValue(),this.visualModeEnabled&&this.checkVisualModeSupport().visualModeSupported||(this.mode="code")}componentWillUpdate(){this.value&&"visual"===this.mode&&(this.internalValue=this.value)}render(){const e=this.checkVisualModeSupport();return i("div",{key:"649472c75a9f8e905a450f90246dda96b5cb1967",class:"response-format-builder"},this.label&&i("h1",{key:"23ac72af641ecdc9da2dd8eab87c69c98b1b743c",class:"builder-label"},this.label),this.helperText&&i("p",{key:"f575c5c0e62f9964f5ac7ac9eaa45eb59e8bf51d",class:"builder-helper-text"},this.helperText),this.visualModeEnabled&&i("div",{key:"ac2710467d1f2c1a92fab3366263ea3d56bef5aa",class:"mode-controls"},this.renderModeSwitch(e)),this.visualModeEnabled&&"code"!==this.mode?i("div",{class:"visual-mode"},this.renderVisualMode()):i("div",{class:"code-mode"},this.renderCodeEditor(e)))}renderModeSwitch(e){const t=!e.visualModeSupported,o=[{id:"visual",title:"Visual"},{id:"code",title:"Code"}].map((e=>Object.assign(Object.assign({},e),{selected:e.id===this.mode})));return i("limel-button-group",{value:o,disabled:t,onChange:this.handleModeChange})}renderCodeEditor(e){return i("div",{class:"code-editor-container"},i("limel-code-editor",{value:this.codeValue,language:"json",lineNumbers:!0,fold:!0,lint:!0,onChange:this.handleCodeChange}),!e.valid&&e.validationErrors.length>0&&i("div",{class:"validation-errors"},i("strong",null,"Invalid Response Format:"),i("ul",null,e.validationErrors.map((e=>i("li",null,e))))),this.visualModeEnabled&&e.valid&&!e.visualModeSupported&&e.visualModeLimitations.length>0&&i("div",{class:"visual-mode-limitations"},i("strong",null,"Cannot switch to visual mode:"),i("ul",null,e.visualModeLimitations.map((e=>i("li",null,e))))))}renderVisualMode(){return i("limebb-lime-query-response-format-editor",{platform:this.platform,context:this.context,limetype:this.limetype,value:this.internalValue,onChange:this.handleVisualModeChange})}checkVisualModeSupport(){if(!this.limetypes)return{valid:!1,visualModeSupported:!1,validationErrors:["Limetypes not loaded"],visualModeLimitations:[]};let e;if("code"===this.mode)try{e=s(this.codeValue)}catch(e){return{valid:!1,visualModeSupported:!1,validationErrors:[e.message],visualModeLimitations:[]}}else e=this.internalValue;return r(e,this.limetypes,this.limetype,this.visualModeEnabled)}updateCodeValue(){this.codeValue=JSON.stringify(this.internalValue,null,2)}};(function(e,t,i,o){var r,s=arguments.length,l=s<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 a=e.length-1;a>=0;a--)(r=e[a])&&(l=(s<3?r(l):s>3?r(t,i,l):r(t,i))||l);s>3&&l&&Object.defineProperty(t,i,l)})([o()],l.prototype,"limetypes",void 0),l.style=":host(limebb-lime-query-response-format-builder){display:block;width:100%}.response-format-builder{display:flex;flex-direction:column}.builder-label{color:rgb(var(--contrast-1100));font-size:1.625rem;line-height:1.25rem;font-weight:300;margin-top:1rem;margin-bottom:0.25rem}.builder-helper-text{margin-top:0px;margin-bottom:0.5rem;font-size:var(--limel-theme-default-font-size);color:rgb(var(--contrast-1100))}.mode-controls{display:flex;justify-content:flex-end;padding:0.5rem}.visual-mode,.code-mode{display:block}.code-editor-container{--code-editor-max-height:70vh;display:flex;flex-direction:column;gap:1rem}.code-editor-container .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-editor-container .validation-errors strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-editor-container .validation-errors ul{margin:0;padding-left:1.5rem}.code-editor-container .validation-errors li{margin:0.25rem 0}.code-editor-container .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-editor-container .visual-mode-limitations strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-editor-container .visual-mode-limitations ul{margin:0;padding-left:1.5rem}.code-editor-container .visual-mode-limitations li{margin:0.25rem 0}";export{l as limebb_lime_query_response_format_builder}
1
+ import{r as e,c as t,h as i}from"./p-DwHAn7LS.js";import{L as o}from"./p-Bkno2RtN.js";import{v as r}from"./p-CI6VHE0w.js";import"./p-CQUZjrU4.js";function s(e){let t;try{t=JSON.parse(e)}catch(e){throw new Error(`Invalid JSON: ${e.message}`)}if(null===t||"object"!=typeof t)throw new Error("Response format must be an object");const i=new Set(["object","aggregates"]),o=Object.keys(t),r=o.filter((e=>!i.has(e)));if(r.length>0)throw new Error(`Unexpected properties in response format: ${r.join(", ")}. Only 'object' and 'aggregates' are allowed.`);if(o.length>0&&!t.object&&!t.aggregates)throw new Error("Response format must contain at least one of: object, aggregates");return t}const l=class{constructor(i){e(this,i),this.change=t(this,"change"),this.label="Response Format",this.helperText="",this.mode="visual",this.codeValue="",this.handleModeChange=e=>{e.stopPropagation();const t=e.detail.id;"visual"===t?this.switchToVisualMode():"code"===t&&this.switchToCode()},this.switchToVisualMode=()=>{try{const e=s(this.codeValue);if(!r(e,this.limetypes,this.limetype,this.visualModeEnabled).visualModeSupported)return;this.internalValue=e,this.mode="visual",this.change.emit(e)}catch(e){}},this.switchToCode=()=>{this.updateCodeValue(),this.mode="code"},this.handleCodeChange=e=>{e.stopPropagation(),this.codeValue=e.detail;try{const e=s(this.codeValue);this.internalValue=e,this.change.emit(e)}catch(e){}},this.handleVisualModeChange=e=>{e.stopPropagation(),this.internalValue=e.detail,this.updateCodeValue(),this.change.emit(e.detail)}}get visualModeEnabled(){var e,t,i;return null!==(i=null===(t=null===(e=this.platform)||void 0===e?void 0:e.isFeatureEnabled)||void 0===t?void 0:t.call(e,"useLimeQueryBuilderGuiMode"))&&void 0!==i&&i}componentWillLoad(){this.internalValue=this.value||{object:{_id:null}},this.updateCodeValue(),this.visualModeEnabled&&this.checkVisualModeSupport().visualModeSupported||(this.mode="code")}componentWillUpdate(){this.value&&"visual"===this.mode&&(this.internalValue=this.value)}render(){const e=this.checkVisualModeSupport();return i("div",{key:"649472c75a9f8e905a450f90246dda96b5cb1967",class:"response-format-builder"},this.label&&i("h1",{key:"23ac72af641ecdc9da2dd8eab87c69c98b1b743c",class:"builder-label"},this.label),this.helperText&&i("p",{key:"f575c5c0e62f9964f5ac7ac9eaa45eb59e8bf51d",class:"builder-helper-text"},this.helperText),this.visualModeEnabled&&i("div",{key:"ac2710467d1f2c1a92fab3366263ea3d56bef5aa",class:"mode-controls"},this.renderModeSwitch(e)),this.visualModeEnabled&&"code"!==this.mode?i("div",{class:"visual-mode"},this.renderVisualMode()):i("div",{class:"code-mode"},this.renderCodeEditor(e)))}renderModeSwitch(e){const t=!e.visualModeSupported,o=[{id:"visual",title:"Visual"},{id:"code",title:"Code"}].map((e=>Object.assign(Object.assign({},e),{selected:e.id===this.mode})));return i("limel-button-group",{value:o,disabled:t,onChange:this.handleModeChange})}renderCodeEditor(e){return i("div",{class:"code-editor-container"},i("limel-code-editor",{value:this.codeValue,language:"json",lineNumbers:!0,fold:!0,lint:!0,onChange:this.handleCodeChange}),!e.valid&&e.validationErrors.length>0&&i("div",{class:"validation-errors"},i("strong",null,"Invalid Response Format:"),i("ul",null,e.validationErrors.map((e=>i("li",null,e))))),this.visualModeEnabled&&e.valid&&!e.visualModeSupported&&e.visualModeLimitations.length>0&&i("div",{class:"visual-mode-limitations"},i("strong",null,"Cannot switch to visual mode:"),i("ul",null,e.visualModeLimitations.map((e=>i("li",null,e))))))}renderVisualMode(){return i("limebb-lime-query-response-format-editor",{platform:this.platform,context:this.context,limetype:this.limetype,value:this.internalValue,onChange:this.handleVisualModeChange})}checkVisualModeSupport(){if(!this.limetypes)return{valid:!1,visualModeSupported:!1,validationErrors:["Limetypes not loaded"],visualModeLimitations:[]};let e;if("code"===this.mode)try{e=s(this.codeValue)}catch(e){return{valid:!1,visualModeSupported:!1,validationErrors:[e.message],visualModeLimitations:[]}}else e=this.internalValue;return r(e,this.limetypes,this.limetype,this.visualModeEnabled)}updateCodeValue(){this.codeValue=JSON.stringify(this.internalValue,null,2)}};(function(e,t,i,o){var r,s=arguments.length,l=s<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 a=e.length-1;a>=0;a--)(r=e[a])&&(l=(s<3?r(l):s>3?r(t,i,l):r(t,i))||l);s>3&&l&&Object.defineProperty(t,i,l)})([o()],l.prototype,"limetypes",void 0),l.style=":host(limebb-lime-query-response-format-builder){display:block;width:100%}.response-format-builder{display:flex;flex-direction:column}.builder-label{color:rgb(var(--contrast-1100));font-size:1.625rem;line-height:1.25rem;font-weight:300;margin-top:1rem;margin-bottom:0.25rem}.builder-helper-text{margin-top:0px;margin-bottom:0.5rem;font-size:var(--limel-theme-default-font-size);color:rgb(var(--contrast-1100))}.mode-controls{display:flex;justify-content:flex-end;padding:0.5rem}.visual-mode,.code-mode{display:block}.code-editor-container{--code-editor-max-height:70vh;display:flex;flex-direction:column;gap:1rem}.code-editor-container .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-editor-container .validation-errors strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-editor-container .validation-errors ul{margin:0;padding-left:1.5rem}.code-editor-container .validation-errors li{margin:0.25rem 0}.code-editor-container .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-editor-container .visual-mode-limitations strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-editor-container .visual-mode-limitations ul{margin:0;padding-left:1.5rem}.code-editor-container .visual-mode-limitations li{margin:0.25rem 0}";export{l as limebb_lime_query_response_format_builder}
@@ -0,0 +1 @@
1
+ import{i as n,a as o}from"./p-Bkno2RtN.js";function r(n){var o;return(r=(null===(o=null==n?void 0:n.ui)||void 0===o?void 0:o.color)||"rgb(var(--color-gray-default))").startsWith("lime-")?`var(--${r})`:r;var r}function t(n){var o;return{name:(null===(o=null==n?void 0:n.ui)||void 0===o?void 0:o.icon)||"decision",color:r(n)}}function i(n,o){return n.label===o}function e(n,o){return Object.values(n.properties).find((n=>n&&n.relation&&i(n.relation.getLimetype(),o)))}function u(r,t){const i=e(r,t);return!!i&&function(r){return n(r)&&!o(r)}(i)}function l(n){var o,r,t;const{targetLimetype:i,currentLimetype:e,contextLimetypeName:u,contextId:l,propertyName:v}=n;if(i&&u&&l){if(v){const n=null===(r=null===(o=null==e?void 0:e.getProperty(v))||void 0===o?void 0:o.relation)||void 0===r?void 0:r.getBackreference();if(n)return n.name}return null===(t=Object.values(i.properties).find((n=>{var o;return(null===(o=n.relation)||void 0===o?void 0:o.getLimetype().name)===u})))||void 0===t?void 0:t.name}}export{l as a,i as b,e as c,t as g,u as h}
@@ -0,0 +1 @@
1
+ import{n}from"./p-Bkno2RtN.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{a as t,g as n}from"./p-LEJjPpY0.js";var r={};function e(t){return t&&["belongsto","hasone","hasmany","hasandbelongstomany"].includes(t.type)}function i(t){return t&&["belongsto","hasone"].includes(t.type)}function o(t,n){let r=t;for(;r;){let t=Object.getOwnPropertyDescriptor(r,n);if(t)return t;r=Object.getPrototypeOf(r)}}r.LimeTypeRepository="state.limetypes";var u="context-request";function c(t,n){let r,e={context:n,callback:t=>{r=t}};return t.dispatchEvent(new CustomEvent(u,{bubbles:!0,composed:!0,detail:e})),r}function f(t){if(t.platform)return t.platform;let r=c(n(t),"platform");if(!r)throw Error("Platform not available. Set the @Prop() platform value or provide it via ContextRegistry.provide('platform', ...) at boot.");return r}var s="context";function a(t){return t.context?t.context:c(n(t),s)}var l=function(t,n){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])},l(t,n)};function h(t,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}l(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}function v(t){var n="function"==typeof Symbol&&Symbol.iterator,r=n&&t[n],e=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&e>=t.length&&(t=void 0),{value:t&&t[e++],done:!t}}};throw TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(t){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,e,i=n.call(t),o=[];try{for(;!(r=i.next()).done;)o.push(r.value)}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return o}function b(t,n,r){if(2===arguments.length)for(var e,i=0,o=n.length;i<o;i++)(e||!(i in n))&&(e||=Array.prototype.slice.call(n,0,i),e[i]=n[i]);return t.concat(e||Array.prototype.slice.call(n))}function m(t){return"function"==typeof t}function p(t){var n=t((function(t){Error.call(t),t.stack=Error().stack}));return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var d=p((function(t){return function(n){t(this),this.message=n?n.length+" errors occurred during unsubscription:\n"+n.map((function(t,n){return n+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=n}}));function g(t,n){if(t){var r=t.indexOf(n);0<=r&&t.splice(r,1)}}var w=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var t,n,r,e,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var u=v(o),c=u.next();!c.done;c=u.next())c.value.remove(this)}catch(n){t={error:n}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}else o.remove(this);var f=this.initialTeardown;if(m(f))try{f()}catch(t){i=t instanceof d?t.errors:[t]}var s=this._finalizers;if(s){this._finalizers=null;try{for(var a=v(s),l=a.next();!l.done;l=a.next()){var h=l.value;try{x(h)}catch(t){i??=[],t instanceof d?i=b(b([],y(i)),y(t.errors)):i.push(t)}}}catch(t){r={error:t}}finally{try{l&&!l.done&&(e=a.return)&&e.call(a)}finally{if(r)throw r.error}}}if(i)throw new d(i)}},t.prototype.add=function(n){if(n&&n!==this)if(this.closed)x(n);else{if(n instanceof t){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=this._finalizers??[]).push(n)}},t.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},t.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},t.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&g(n,t)},t.prototype.remove=function(n){var r=this._finalizers;r&&g(r,n),n instanceof t&&n._removeParent(this)},t.EMPTY=((n=new t).closed=!0,n),t;var n}(),j=w.EMPTY;function O(t){return t instanceof w||t&&"closed"in t&&m(t.remove)&&m(t.add)&&m(t.unsubscribe)}function x(t){m(t)?t():t.unsubscribe()}function R(){}function E(t){t()}var S=function(t){function n(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,O(n)&&n.add(r)):r.destination=M,r}return h(n,t),n.create=function(t,n,r){return new A(t,n,r)},n.prototype.next=function(t){this.isStopped||this._next(t)},n.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},n.prototype._next=function(t){this.destination.next(t)},n.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},n.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},n}(w),k=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(t){C(t)}},t.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(t){C(t)}else C(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){C(t)}},t}(),A=function(t){function n(n,r,e){var i,o=t.call(this)||this;return i=m(n)||!n?{next:n??void 0,error:r??void 0,complete:e??void 0}:n,o.destination=new k(i),o}return h(n,t),n}(S);function C(t){!function(t){!function(t,n){var r=[...arguments].slice(2);setTimeout.apply(void 0,b([t,n],y(r)))}((function(){throw t}))}(t)}var M={closed:!0,next:R,error:function(t){throw t},complete:R},P="function"==typeof Symbol&&Symbol.observable||"@@observable";function T(t){return t}var W=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(n){var r=new t;return r.source=this,r.operator=n,r},t.prototype.subscribe=function(t,n,r){var e=this,i=function(t){return t&&t instanceof S||function(t){return t&&m(t.next)&&m(t.error)&&m(t.complete)}(t)&&O(t)}(t)?t:new A(t,n,r);return E((function(){var t=e.operator,n=e.source;i.add(t?t.call(i,n):n?e._subscribe(i):e._trySubscribe(i))})),i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},t.prototype.forEach=function(t,n){var r=this;return new(n=$(n))((function(n,e){var i=new A({next:function(n){try{t(n)}catch(t){e(t),i.unsubscribe()}},error:e,complete:n});r.subscribe(i)}))},t.prototype._subscribe=function(t){return this.source?.subscribe(t)},t.prototype[P]=function(){return this},t.prototype.pipe=function(){return function(t){return 0===t.length?T:1===t.length?t[0]:function(n){return t.reduce((function(t,n){return n(t)}),n)}}([...arguments])(this)},t.prototype.toPromise=function(t){var n=this;return new(t=$(t))((function(t,r){var e;n.subscribe((function(t){return e=t}),(function(t){return r(t)}),(function(){return t(e)}))}))},t.create=function(n){return new t(n)},t}();function $(t){return t??undefined??Promise}var L=p((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),_=function(t){function n(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return h(n,t),n.prototype.lift=function(t){var n=new q(this,this);return n.operator=t,n},n.prototype._throwIfClosed=function(){if(this.closed)throw new L},n.prototype.next=function(t){var n=this;E((function(){var r,e;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||=Array.from(n.observers);try{for(var i=v(n.currentObservers),o=i.next();!o.done;o=i.next())o.value.next(t)}catch(t){r={error:t}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(r)throw r.error}}}}))},n.prototype.error=function(t){var n=this;E((function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=t;for(var r=n.observers;r.length;)r.shift().error(t)}}))},n.prototype.complete=function(){var t=this;E((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var n=t.observers;n.length;)n.shift().complete()}}))},n.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(n.prototype,"observed",{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),n.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},n.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},n.prototype._innerSubscribe=function(t){var n=this,r=this,e=r.observers;return r.hasError||r.isStopped?j:(this.currentObservers=null,e.push(t),new w((function(){n.currentObservers=null,g(e,t)})))},n.prototype._checkFinalizedStatuses=function(t){var n=this,r=n.isStopped;n.hasError?t.error(n.thrownError):r&&t.complete()},n.prototype.asObservable=function(){var t=new W;return t.source=this,t},n.create=function(t,n){return new q(t,n)},n}(W),q=function(t){function n(n,r){var e=t.call(this)||this;return e.destination=n,e.source=r,e}return h(n,t),n.prototype.next=function(t){var n,r;null==(r=(n=this.destination)?.next)||r.call(n,t)},n.prototype.error=function(t){var n,r;null==(r=(n=this.destination)?.error)||r.call(n,t)},n.prototype.complete=function(){var t,n;null==(n=(t=this.destination)?.complete)||n.call(t)},n.prototype._subscribe=function(t){return this.source?.subscribe(t)??j},n}(_),F=function(t){function n(n){var r=t.call(this)||this;return r._value=n,r}return h(n,t),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),n.prototype._subscribe=function(n){var r=t.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},n.prototype.getValue=function(){var t=this,n=t._value;if(t.hasError)throw t.thrownError;return this._throwIfClosed(),n},n.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},n}(_);function N(t){return t}function U(t,n){return(r,e)=>{let i=function(t,n,r,e){let i=D.get(t);return i||(i=[],D.set(t,i)),i.push({options:r,name:n,optionFactory:e.optionFactory||N,service:{name:e.name,method:e.method||"subscribe"}}),i}(r,e,t,n);1===i.length&&function(t,n){t.connectedCallback=H(t.connectedCallback,n),t.componentWillLoad=function(t,n){return function(...r){return!0===G.get(this)?t?t.apply(this,r):void 0:H(t,n).apply(this,r)}}(t.componentWillLoad,n),t.componentDidUnload=I(t.componentDidUnload),t.disconnectedCallback=I(t.disconnectedCallback)}(r,i)}}var D=new WeakMap,B=new WeakMap,G=new WeakMap;function H(t,r){return function(...e){G.set(this,!0);let i=[];B.set(this,i);let c=new F(a(this));i.push(function(t,r){let e=n(t);return s in e?function(t,n){let r=Object.getOwnPropertyDescriptor(t,s),e=o(t,s);return n(e?.get?.call(t)),Object.defineProperty(t,s,{configurable:!0,enumerable:!0,get:()=>e?.get?.call(t),set:r=>{e?.set?.call(t,r),n(r)}}),()=>{r?Object.defineProperty(t,s,r):Reflect.deleteProperty(t,s)}}(e,r):function(t,n,r){let e,i={context:s,subscribe:!0,callback:(t,n)=>{r(t),n&&(e=n)}};return t.dispatchEvent(new CustomEvent(u,{bubbles:!0,composed:!0,detail:i})),()=>e?.()}(e,0,r)}(this,(t=>c.next(t))));for(let t of r)t.options=t.optionFactory(t.options,this),J(t.options)&&(t.options.context=c),Y(this,t);if(t)return t.apply(this,e)}}function I(t){return async function(...n){let r;return t&&(r=t.apply(this,n)),function(t){let n=B.get(t);for(let t of n)t();B.set(t,[])}(this),r}}function J(t){return"context"in t}function Y(t,n){let r=function(t,n){let r={...n.options};!function(t,n){t.filter&&=t.filter.map((t=>t.bind(n))),t.map&&=t.map.map((t=>t.bind(n)))}(r,t);let e=n.service.name,i=f(t);if(!i.has(e))throw Error(`Service ${e} does not exist`);return i.get(e)[n.service.method](function(t,n){return r=>{t[n]=r}}(t,n.name),r)}(t,n);"function"==typeof r&&B.get(t).push(r)}function z(t={}){return U(t,{name:r.LimeTypeRepository})}function K(t={}){let n={name:r.LimeTypeRepository};return t.map=[Q,...t.map||[]],t.context=null,U(t,n)}function Q(t){let n=a(this);if(n)return t[n.limetype]}function V(t={}){let n={name:r.LimeObjectRepository};return t.map=[X,...t.map||[]],t.context=null,U(t,n)}function X(t){let n=a(this);if(!n)return;let{limetype:r,id:e}=n;return t[r]?t[r].find((t=>t.id===e)):void 0}function Z(t){return n=>{(function(t,n){t.commandId=n})(n,t.id),function(t,n){Object.defineProperty(t,Symbol.hasInstance,{value:t=>function(t){let n,r=[],e=t;for(;n=tt(e);)r=[...r,n],e=Object.getPrototypeOf(e);return[...new Set(r)]}(t).includes(n)})}(n,t.id)}}function tt(t){return"string"==typeof t?t:t&&t.constructor&&t.constructor.commandId?t.constructor.commandId:t&&t.commandId?t.commandId:null}function nt(t,n,r,e){var i,o=arguments.length,u=o<3?n:null===e?e=Object.getOwnPropertyDescriptor(n,r):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,n,r,e);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(u=(o<3?i(u):o>3?i(n,r,u):i(n,r))||u);return o>3&&u&&Object.defineProperty(n,r,u),u}r.LimeObjectRepository="state.limeobjects",r.CommandBus="commandBus";var rt=class{context;filter;relation};rt=nt([Z({id:"limeobject.bulk-create-dialog"})],rt);var et=class{limetype;limeobject;route=!1;title;subtitle;context;autoAttachRelation;saveCommand};et=nt([Z({id:"limeobject.create-dialog"})],et);var it=class{context};it=nt([Z({id:"limeobject.delete-object"})],it);var ot=class{context};ot=nt([Z({id:"limeobject.object-access"})],ot);var ut=class{context;limeobject;route=!1;label};ut=nt([Z({id:"limeobject.save-object"})],ut);var ct=function(t){return t.AND="AND",t.OR="OR",t.NOT="!",t.EQUALS="=",t.NOT_EQUALS="!=",t.GREATER=">",t.LESS="<",t.IN="IN",t.BEGINS="=?",t.LIKE="?",t.LESS_OR_EQUAL="<=",t.GREATER_OR_EQUAL=">=",t.ENDS="=$",t}({}),ft={Count:"COUNT"};r.Query="query";var st={Post:"POST"};r.Http="http",r.EventDispatcher="eventDispatcher",r.Translate="translate",r.Dialog="dialog",r.KeybindingRegistry="keybindingRegistry",r.Navigator="navigator";var at,lt,ht=class{path;query;hash;state};function vt(t){return U(t,{name:r.ConfigRepository})}function yt(t={}){return U(t,{name:r.FilterRepository})}function bt(t,r){let e=new WeakMap;t.connectedCallback=function(t,r,e){return async function(...i){let o=r({component:this,host:n(this),registry:mt(this)});return e.set(this,o),t?.apply(this,i)}}(t.connectedCallback,r,e),t.disconnectedCallback=function(t,n){return function(...r){let e=t?.apply(this,r);return n.get(this)?.(),n.delete(this),e}}(t.disconnectedCallback,e)}function mt(t){let n=f(t),e=r.ContextRegistry;if(!n.has(e))throw Error(`Service ${e} does not exist`);return n.get(e)}function pt(t){return(n,r)=>{bt(n,function(t,n){let r=new WeakMap,e=new WeakMap,i=new WeakSet;function u(t,n){return{configurable:!0,enumerable:!0,get(){return t?.get?t.get.call(this):e.get(n)},set(i){let o=e.get(n);t?.set?.call(this,i),e.set(n,i),o!==i&&r.get(n)?.notify()}}}function c(t,r){let c=function(t,r){return function(t,n){let r=t;for(;r&&r!==HTMLElement.prototype;){if(Object.getOwnPropertyDescriptor(r,n))return!0;r=Object.getPrototypeOf(r)}return!1}(r,n)?r:t}(t,r);if(e.set(t,Reflect.get(c,n)),i.has(c))return;i.add(c);let f=o(Object.getPrototypeOf(c),n);Object.defineProperty(c,n,u(f,t))}function f(n,i,o){let u=o.provide(t,i,(()=>e.get(n)));return r.set(n,u),u}function s(t,n){return()=>{n.teardown(),r.delete(t)}}return({component:t,host:n,registry:r})=>(c(t,n),s(t,f(t,n,r)))}(t,r))}}function dt(t){return(n,r)=>{bt(n,function(t,n){return({component:r,host:e,registry:i})=>i.subscribe(t,e,(t=>{Reflect.set(r,n,t)}))}(t,r))}}function gt(t){let n=window.Lime?.logger?.createLogger;return"function"==typeof n?(void 0===lt&&(lt=function(t){return t&&(function(t){let n=t.match(/\/([^/]+)-lwc-components\//);return n?n[1]:null}(t)||function(t){let n=t.match(/\/packages\/(?:@[^/]+\/)?([^/]+)/);return n?n[1]:null}(t)||function(t){let n=t.indexOf("+");if(-1===n)return null;let r=t.slice(0,n),e=r.lastIndexOf("/");return-1===e?null:r.slice(e+1)}(t)||function(t){let n=t.match(/\/static\/([^/]+)\//);return n?n[1]:null}(t))||null}(void 0===at?at="string"==typeof import.meta.url?import.meta.url:function(){try{let t=Error(".").stack;if(!t)return null;let n=t.split("\n");for(let t of n){let n=t.match(/(https?:\/\/[^)\s:]+)/);if(n)return n[1]}return null}catch{return null}}():at)),lt&&(t=`${lt}:${t}`),n(t)):(console.warn(`Logger factory is not configured. Returning console logger for scope "${t}".`),console)}ht=nt([Z({id:"navigator.navigate"})],ht),r.Notification="notifications",r.RouteRegistry="routeRegistry",r.TaskRepository="state.tasks",r.ConfigRepository="state.configs",r.Device="state.device",r.FilterRepository="state.filters",r.UserDataRepository="state.user-data",r.Application="state.application",r.UserPreferencesRepository="userPreferences",r.DateTimeFormatter="datetimeformatter",r.ConditionRegistry="conditionRegistry",r.ContextRegistry="contextRegistry",r.RuleRegistry="ruleRegistry",r.ViewFactoryRegistry="viewFactoryRegistry",r.WebComponentRegistry="webComponentRegistry",r.NotificationRepository="state.notifications",r.PollerFactory="pollerFactory",r.Logger="logger",r.ProblemRepository="problemRepository",r.AIContextRegistry="aiContextRegistry";var wt=null;try{t((function(t,n){wt||=gt("uncaught-error");let r={};n&&(r.element=n.tagName,n.id&&(r.elementId=n.id));let e=t instanceof Error?t.message:String(t),i=t instanceof Error?t:void 0;wt.error(e,i,r)}))}catch{}export{V as G,Z as H,z as L,gt as M,dt as O,K as R,pt as T,i as a,r as b,st as c,yt as d,e as i,vt as l,ct as n,ft as r}
1
+ import{a as t,g as n}from"./p-DwHAn7LS.js";var r={};function e(t){return t&&["belongsto","hasone","hasmany","hasandbelongstomany"].includes(t.type)}function i(t){return t&&["belongsto","hasone"].includes(t.type)}function o(t,n){let r=t;for(;r;){let t=Object.getOwnPropertyDescriptor(r,n);if(t)return t;r=Object.getPrototypeOf(r)}}r.LimeTypeRepository="state.limetypes";var u="context-request";function c(t,n){let r,e={context:n,callback:t=>{r=t}};return t.dispatchEvent(new CustomEvent(u,{bubbles:!0,composed:!0,detail:e})),r}function f(t){if(t.platform)return t.platform;let r=c(n(t),"platform");if(!r)throw Error("Platform not available. Set the @Prop() platform value or provide it via ContextRegistry.provide('platform', ...) at boot.");return r}var s="context";function a(t){return t.context?t.context:c(n(t),s)}var l=function(t,n){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])},l(t,n)};function h(t,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}l(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}function v(t){var n="function"==typeof Symbol&&Symbol.iterator,r=n&&t[n],e=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&e>=t.length&&(t=void 0),{value:t&&t[e++],done:!t}}};throw TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(t){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,e,i=n.call(t),o=[];try{for(;!(r=i.next()).done;)o.push(r.value)}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return o}function b(t,n,r){if(2===arguments.length)for(var e,i=0,o=n.length;i<o;i++)(e||!(i in n))&&(e||=Array.prototype.slice.call(n,0,i),e[i]=n[i]);return t.concat(e||Array.prototype.slice.call(n))}function m(t){return"function"==typeof t}function p(t){var n=t((function(t){Error.call(t),t.stack=Error().stack}));return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var d=p((function(t){return function(n){t(this),this.message=n?n.length+" errors occurred during unsubscription:\n"+n.map((function(t,n){return n+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=n}}));function g(t,n){if(t){var r=t.indexOf(n);0<=r&&t.splice(r,1)}}var w=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var t,n,r,e,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var u=v(o),c=u.next();!c.done;c=u.next())c.value.remove(this)}catch(n){t={error:n}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}else o.remove(this);var f=this.initialTeardown;if(m(f))try{f()}catch(t){i=t instanceof d?t.errors:[t]}var s=this._finalizers;if(s){this._finalizers=null;try{for(var a=v(s),l=a.next();!l.done;l=a.next()){var h=l.value;try{x(h)}catch(t){i??=[],t instanceof d?i=b(b([],y(i)),y(t.errors)):i.push(t)}}}catch(t){r={error:t}}finally{try{l&&!l.done&&(e=a.return)&&e.call(a)}finally{if(r)throw r.error}}}if(i)throw new d(i)}},t.prototype.add=function(n){if(n&&n!==this)if(this.closed)x(n);else{if(n instanceof t){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=this._finalizers??[]).push(n)}},t.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},t.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},t.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&g(n,t)},t.prototype.remove=function(n){var r=this._finalizers;r&&g(r,n),n instanceof t&&n._removeParent(this)},t.EMPTY=((n=new t).closed=!0,n),t;var n}(),j=w.EMPTY;function O(t){return t instanceof w||t&&"closed"in t&&m(t.remove)&&m(t.add)&&m(t.unsubscribe)}function x(t){m(t)?t():t.unsubscribe()}function R(){}function S(t){t()}var E=function(t){function n(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,O(n)&&n.add(r)):r.destination=M,r}return h(n,t),n.create=function(t,n,r){return new A(t,n,r)},n.prototype.next=function(t){this.isStopped||this._next(t)},n.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},n.prototype._next=function(t){this.destination.next(t)},n.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},n.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},n}(w),k=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(t){C(t)}},t.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(t){C(t)}else C(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){C(t)}},t}(),A=function(t){function n(n,r,e){var i,o=t.call(this)||this;return i=m(n)||!n?{next:n??void 0,error:r??void 0,complete:e??void 0}:n,o.destination=new k(i),o}return h(n,t),n}(E);function C(t){!function(t){!function(t,n){var r=[...arguments].slice(2);setTimeout.apply(void 0,b([t,n],y(r)))}((function(){throw t}))}(t)}var M={closed:!0,next:R,error:function(t){throw t},complete:R},T="function"==typeof Symbol&&Symbol.observable||"@@observable";function W(t){return t}var P=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(n){var r=new t;return r.source=this,r.operator=n,r},t.prototype.subscribe=function(t,n,r){var e=this,i=function(t){return t&&t instanceof E||function(t){return t&&m(t.next)&&m(t.error)&&m(t.complete)}(t)&&O(t)}(t)?t:new A(t,n,r);return S((function(){var t=e.operator,n=e.source;i.add(t?t.call(i,n):n?e._subscribe(i):e._trySubscribe(i))})),i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},t.prototype.forEach=function(t,n){var r=this;return new(n=$(n))((function(n,e){var i=new A({next:function(n){try{t(n)}catch(t){e(t),i.unsubscribe()}},error:e,complete:n});r.subscribe(i)}))},t.prototype._subscribe=function(t){return this.source?.subscribe(t)},t.prototype[T]=function(){return this},t.prototype.pipe=function(){return function(t){return 0===t.length?W:1===t.length?t[0]:function(n){return t.reduce((function(t,n){return n(t)}),n)}}([...arguments])(this)},t.prototype.toPromise=function(t){var n=this;return new(t=$(t))((function(t,r){var e;n.subscribe((function(t){return e=t}),(function(t){return r(t)}),(function(){return t(e)}))}))},t.create=function(n){return new t(n)},t}();function $(t){return t??undefined??Promise}var L=p((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),_=function(t){function n(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return h(n,t),n.prototype.lift=function(t){var n=new q(this,this);return n.operator=t,n},n.prototype._throwIfClosed=function(){if(this.closed)throw new L},n.prototype.next=function(t){var n=this;S((function(){var r,e;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||=Array.from(n.observers);try{for(var i=v(n.currentObservers),o=i.next();!o.done;o=i.next())o.value.next(t)}catch(t){r={error:t}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(r)throw r.error}}}}))},n.prototype.error=function(t){var n=this;S((function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=t;for(var r=n.observers;r.length;)r.shift().error(t)}}))},n.prototype.complete=function(){var t=this;S((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var n=t.observers;n.length;)n.shift().complete()}}))},n.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(n.prototype,"observed",{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),n.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},n.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},n.prototype._innerSubscribe=function(t){var n=this,r=this,e=r.observers;return r.hasError||r.isStopped?j:(this.currentObservers=null,e.push(t),new w((function(){n.currentObservers=null,g(e,t)})))},n.prototype._checkFinalizedStatuses=function(t){var n=this,r=n.isStopped;n.hasError?t.error(n.thrownError):r&&t.complete()},n.prototype.asObservable=function(){var t=new P;return t.source=this,t},n.create=function(t,n){return new q(t,n)},n}(P),q=function(t){function n(n,r){var e=t.call(this)||this;return e.destination=n,e.source=r,e}return h(n,t),n.prototype.next=function(t){var n,r;null==(r=(n=this.destination)?.next)||r.call(n,t)},n.prototype.error=function(t){var n,r;null==(r=(n=this.destination)?.error)||r.call(n,t)},n.prototype.complete=function(){var t,n;null==(n=(t=this.destination)?.complete)||n.call(t)},n.prototype._subscribe=function(t){return this.source?.subscribe(t)??j},n}(_),D=function(t){function n(n){var r=t.call(this)||this;return r._value=n,r}return h(n,t),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),n.prototype._subscribe=function(n){var r=t.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},n.prototype.getValue=function(){var t=this,n=t._value;if(t.hasError)throw t.thrownError;return this._throwIfClosed(),n},n.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},n}(_);function F(t){return t}function N(t,n){return(r,e)=>{let i=function(t,n,r,e){let i=U.get(t);return i||(i=[],U.set(t,i)),i.push({options:r,name:n,optionFactory:e.optionFactory||F,service:{name:e.name,method:e.method||"subscribe"}}),i}(r,e,t,n);1===i.length&&function(t,n){t.connectedCallback=G(t.connectedCallback,n),t.componentWillLoad=function(t,n){return function(...r){return!0===B.get(this)?t?t.apply(this,r):void 0:G(t,n).apply(this,r)}}(t.componentWillLoad,n),t.componentDidUnload=I(t.componentDidUnload),t.disconnectedCallback=I(t.disconnectedCallback)}(r,i)}}var U=new WeakMap,H=new WeakMap,B=new WeakMap;function G(t,r){return function(...e){B.set(this,!0);let i=[];H.set(this,i);let c=new D(a(this));i.push(function(t,r){let e=n(t);return s in e?function(t,n){let r=Object.getOwnPropertyDescriptor(t,s),e=o(t,s);return n(e?.get?.call(t)),Object.defineProperty(t,s,{configurable:!0,enumerable:!0,get:()=>e?.get?.call(t),set:r=>{e?.set?.call(t,r),n(r)}}),()=>{r?Object.defineProperty(t,s,r):Reflect.deleteProperty(t,s)}}(e,r):function(t,n,r){let e,i={context:s,subscribe:!0,callback:(t,n)=>{r(t),n&&(e=n)}};return t.dispatchEvent(new CustomEvent(u,{bubbles:!0,composed:!0,detail:i})),()=>e?.()}(e,0,r)}(this,(t=>c.next(t))));for(let t of r)t.options=t.optionFactory(t.options,this),z(t.options)&&(t.options.context=c),J(this,t);if(t)return t.apply(this,e)}}function I(t){return async function(...n){let r;return t&&(r=t.apply(this,n)),function(t){let n=H.get(t);for(let t of n)t();H.set(t,[])}(this),r}}function z(t){return"context"in t}function J(t,n){let r=function(t,n){let r={...n.options};!function(t,n){t.filter&&=t.filter.map((t=>t.bind(n))),t.map&&=t.map.map((t=>t.bind(n)))}(r,t);let e=n.service.name,i=f(t);if(!i.has(e))throw Error(`Service ${e} does not exist`);return i.get(e)[n.service.method](function(t,n){return r=>{t[n]=r}}(t,n.name),r)}(t,n);"function"==typeof r&&H.get(t).push(r)}function K(t={}){return N(t,{name:r.LimeTypeRepository})}function Q(t={}){let n={name:r.LimeTypeRepository};return t.map=[V,...t.map||[]],t.context=null,N(t,n)}function V(t){let n=a(this);if(n)return t[n.limetype]}function X(t={}){let n={name:r.LimeObjectRepository};return t.map=[Y,...t.map||[]],t.context=null,N(t,n)}function Y(t){let n=a(this);if(!n)return;let{limetype:r,id:e}=n;return t[r]?t[r].find((t=>t.id===e)):void 0}function Z(t){return n=>{(function(t,n){t.commandId=n})(n,t.id),function(t,n){Object.defineProperty(t,Symbol.hasInstance,{value:t=>function(t){let n,r=[],e=t;for(;n=tt(e);)r=[...r,n],e=Object.getPrototypeOf(e);return[...new Set(r)]}(t).includes(n)})}(n,t.id)}}function tt(t){return"string"==typeof t?t:t&&t.constructor&&t.constructor.commandId?t.constructor.commandId:t&&t.commandId?t.commandId:null}function nt(t,n,r,e){var i,o=arguments.length,u=o<3?n:null===e?e=Object.getOwnPropertyDescriptor(n,r):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,n,r,e);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(u=(o<3?i(u):o>3?i(n,r,u):i(n,r))||u);return o>3&&u&&Object.defineProperty(n,r,u),u}r.LimeObjectRepository="state.limeobjects",r.CommandBus="commandBus";var rt=class{context;filter;relation};rt=nt([Z({id:"limeobject.bulk-create-dialog"})],rt);var et=class{limetype;limeobject;route=!1;title;subtitle;context;autoAttachRelation;saveCommand};et=nt([Z({id:"limeobject.create-dialog"})],et);var it=class{context};it=nt([Z({id:"limeobject.delete-object"})],it);var ot=class{context};ot=nt([Z({id:"limeobject.object-access"})],ot);var ut=class{context;limeobject;route=!1;label};ut=nt([Z({id:"limeobject.save-object"})],ut);var ct=function(t){return t.AND="AND",t.OR="OR",t.NOT="!",t.EQUALS="=",t.NOT_EQUALS="!=",t.GREATER=">",t.LESS="<",t.IN="IN",t.BEGINS="=?",t.LIKE="?",t.LESS_OR_EQUAL="<=",t.GREATER_OR_EQUAL=">=",t.ENDS="=$",t}({}),ft={Count:"COUNT"};r.Query="query";var st={Post:"POST"};r.Http="http",r.EventDispatcher="eventDispatcher",r.Translate="translate",r.Dialog="dialog",r.KeybindingRegistry="keybindingRegistry",r.Navigator="navigator";var at,lt,ht=class{path;query;hash;state};function vt(t){return N(t,{name:r.ConfigRepository})}function yt(t={}){return N(t,{name:r.FilterRepository})}function bt(t,r){let e=new WeakMap;t.connectedCallback=function(t,r,e){return async function(...i){let o=r({component:this,host:n(this),registry:mt(this)});return e.set(this,o),t?.apply(this,i)}}(t.connectedCallback,r,e),t.disconnectedCallback=function(t,n){return function(...r){let e=t?.apply(this,r);return n.get(this)?.(),n.delete(this),e}}(t.disconnectedCallback,e)}function mt(t){let n=f(t),e=r.ContextRegistry;if(!n.has(e))throw Error(`Service ${e} does not exist`);return n.get(e)}function pt(t){return(n,r)=>{bt(n,function(t,n){let r=new WeakMap,e=new WeakMap,i=new WeakSet;function u(t,n){return{configurable:!0,enumerable:!0,get(){return t?.get?t.get.call(this):e.get(n)},set(i){let o=e.get(n);t?.set?.call(this,i),e.set(n,i),o!==i&&r.get(n)?.notify()}}}function c(t,r){let c=function(t,r){return function(t,n){let r=t;for(;r&&r!==HTMLElement.prototype;){if(Object.getOwnPropertyDescriptor(r,n))return!0;r=Object.getPrototypeOf(r)}return!1}(r,n)?r:t}(t,r);if(e.set(t,Reflect.get(c,n)),i.has(c))return;i.add(c);let f=o(Object.getPrototypeOf(c),n);Object.defineProperty(c,n,u(f,t))}function f(n,i,o){let u=o.provide(t,i,(()=>e.get(n)));return r.set(n,u),u}function s(t,n){return()=>{n.teardown(),r.delete(t)}}return({component:t,host:n,registry:r})=>(c(t,n),s(t,f(t,n,r)))}(t,r))}}function dt(t){return(n,r)=>{bt(n,function(t,n){return({component:r,host:e,registry:i})=>i.subscribe(t,e,(t=>{Reflect.set(r,n,t)}))}(t,r))}}function gt(t){let n=window.Lime?.logger?.createLogger;return"function"==typeof n?(void 0===lt&&(lt=function(t){return t&&(function(t){let n=t.match(/\/([^/]+)-lwc-components\//);return n?n[1]:null}(t)||function(t){let n=t.match(/\/packages\/(?:@[^/]+\/)?([^/]+)/);return n?n[1]:null}(t)||function(t){let n=t.indexOf("+");if(-1===n)return null;let r=t.slice(0,n),e=r.lastIndexOf("/");return-1===e?null:r.slice(e+1)}(t)||function(t){let n=t.match(/\/static\/([^/]+)\//);return n?n[1]:null}(t))||null}(void 0===at?at="string"==typeof import.meta.url?import.meta.url:function(){try{let t=Error(".").stack;if(!t)return null;let n=t.split("\n");for(let t of n){let n=t.match(/(https?:\/\/[^)\s:]+)/);if(n)return n[1]}return null}catch{return null}}():at)),lt&&(t=`${lt}:${t}`),n(t)):(console.warn(`Logger factory is not configured. Returning console logger for scope "${t}".`),console)}ht=nt([Z({id:"navigator.navigate"})],ht),r.Notification="notifications",r.RouteRegistry="routeRegistry",r.TaskRepository="state.tasks",r.ConfigRepository="state.configs",r.Device="state.device",r.FilterRepository="state.filters",r.UserDataRepository="state.user-data",r.Application="state.application",r.UserPreferencesRepository="userPreferences",r.DateTimeFormatter="datetimeformatter",r.ConditionRegistry="conditionRegistry",r.ContextRegistry="contextRegistry",r.RuleRegistry="ruleRegistry",r.ViewFactoryRegistry="viewFactoryRegistry",r.WebComponentRegistry="webComponentRegistry",r.NotificationRepository="state.notifications",r.PollerFactory="pollerFactory",r.Logger="logger",r.ProblemRepository="problemRepository",r.AIContextRegistry="aiContextRegistry";var wt=null;try{t((function(t,n){wt||=gt("uncaught-error");let r={};n&&(r.element=n.tagName,n.id&&(r.elementId=n.id));let e=t instanceof Error?t.message:String(t),i=t instanceof Error?t:void 0;wt.error(e,i,r)}))}catch{}export{X as G,Z as H,K as L,gt as M,dt as O,Q as R,pt as T,i as a,r as b,st as c,yt as d,e as i,vt as l,ct as n,ft as r}
@@ -1 +1 @@
1
- import{n as r}from"./p-Dtg8KAQt.js";import{g as t,a as o,v as e}from"./p-CQUZjrU4.js";const n=new Set(["$yesterday","$now","$today","$tomorrow","$this_week","$this_month","$this_quarter","$this_year"]),i=/^\$(previous|next)_(day|week|month|quarter|year)\(\d+\)$/,s=/^\$me(\.\w+)*$/;function a(r,o,e){if(function(r){return"string"==typeof r&&(n.has(r)||i.test(r)||s.test(r))}(r))return{valid:!0};if("string"!=typeof r||!r.startsWith("%activeObject%"))return{valid:!0};if(!o)return{valid:!0};const a=r.replace(/^%activeObject%\.?/,"");if(!a)return{valid:!0};try{return t(e,o,a)?{valid:!0}:{valid:!1,error:`Property path '${a}' does not exist on limetype '${o}'`}}catch(r){return{valid:!1,error:`Invalid placeholder path: ${r.message}`}}}function u(r,t,o=!0){const e=Object.keys(r),n=[];if(o){const r=e.filter((r=>r.startsWith("#")&&"#description"!==r));r.length>0&&n.push(`Property '${t}' contains # properties not supported in visual mode: ${r.join(", ")}`)}return{keys:e.filter((r=>"_alias"!==r&&!r.startsWith("#"))),visualModeLimitations:n}}function l(r,t,o,e,n,i=!0){if(""===r){if(i&&null!==t)throw new Error("Empty property name must have null value");return[]}const s=o[r];if(!s)throw new Error(`Property '${r}' does not exist on limetype '${n}'`);return s.relation?function(r,t,o,e,n=!0){if(null===t)return[];if("object"!=typeof t)throw new TypeError(`Relation property '${r}' must be null or an object`);const i=t,{keys:s,visualModeLimitations:a}=u(i,r,n);if(0===s.length)return a;const l=e.relation.getLimetype();if(!l)throw new Error(`Could not determine related limetype for property '${r}'`);const f={};for(const r of s)f[r]=i[r];const p=c(f,o,l.name,n);return[...a,...p]}(r,t,e,s,i):function(r,t,o=!0){if(null===t)return[];if("object"==typeof t){const{keys:e,visualModeLimitations:n}=u(t,r,o);if(0===e.length)return n;throw new Error(`Non-relation property '${r}' cannot have nested properties other than _alias or # properties (got: ${e.join(", ")})`)}throw new Error(`Non-relation property '${r}' must be null or an object (got ${typeof t})`)}(r,t,i)}function c(r,t,e,n=!0){const i=t[e];if(!i)throw new Error(`Unknown limetype: ${e}`);const s=o(i),a=[];for(const[o,i]of Object.entries(r)){if(o.startsWith("#"))continue;const r=l(o,i,s,t,e,n);a.push(...r)}return a}function f(t,o,n,i,s=!0){t&&("key"in t?function(t,o,n,i){if(!Object.values(r).includes(t.op))throw new Error(`Unsupported filter operator: ${t.op}`);const s=function(r,t,o,n){if(!r)return{valid:!1,error:"Filter key cannot be empty"};if(r.startsWith("%activeObject%")){const o=a(r,n,t);if(!o.valid)return o;const i=r.replace(/^%activeObject%\.?/,"");if(i&&n){const{error:r}=e(t,n,i);if(r)return{valid:!1,error:r}}return o}const{error:i}=e(t,o,r);return i?{valid:!1,error:i}:{valid:!0}}(t.key,n,i,o);if(!s.valid)throw new Error(`Invalid filter key '${t.key}': ${s.error}`);const u=a(t.exp,o,n);if(!u.valid)throw new Error(`Invalid placeholder in filter '${t.key}': ${u.error}`)}(t,o,n,i):"exp"in t&&function(t,o,e,n,i){if(t.op!==r.AND&&t.op!==r.OR&&t.op!==r.NOT)throw new Error(`Unsupported group operator: ${t.op}`);if(t.op===r.NOT)f(t.exp,o,e,n,i);else if(t.op===r.AND||t.op===r.OR){const r=t.exp;for(const t of r)f(t,o,e,n,i)}}(t,o,n,i,s))}function p(r,o,e,n){const i=[],s=function(r,t){return"object"!=typeof r||null===r?`orderBy[${t}] must be an object`:null}(r,o);if(s)return[s];const a=Object.keys(r),u=function(r,t){return 0===r.length?`orderBy[${t}] must have a property path`:r.length>1?`orderBy[${t}] must have exactly one property, got ${r.length}`:null}(a,o);if(u)return[u];const l=a[0],c=function(r,t){return"ASC"!==r&&"DESC"!==r?`orderBy[${t}]: direction must be 'ASC' or 'DESC', got '${r}'`:null}(r[l],o);c&&i.push(c);const f=function(r,o,e,n){if(!r||""===r)return null;return t(o,e,r)?null:`orderBy[${n}]: property path '${r}' does not exist on limetype '${e}'`}(l,e,n,o);return f&&i.push(f),i}function d(r,t,o,e){const n=[],i=[];try{const n=function(r,t,o,e=!0){const n=[];if(e&&r.aggregates&&n.push("responseFormat.aggregates is not yet supported in visual mode"),r.object){const i=c(r.object,t,o,e);n.push(...i)}return n}(r,t,o,e);i.push(...n)}catch(r){n.push(`Invalid responseFormat: ${r.message}`)}return{errors:n,limitations:i}}function y(r,t,o,e=!0){if(!r)return{valid:!0,visualModeSupported:!0,validationErrors:[],visualModeLimitations:[]};const n=[],i=[];if(r.limetype&&!t[r.limetype]&&n.push(`Unknown limetype: ${r.limetype}`),void 0===r.offset||r.orderBy||n.push("offset requires orderBy to be specified"),r.orderBy){const o=function(r,t,o){const e=[];if(!Array.isArray(r))return e.push("orderBy must be an array"),e;if(!o||!t[o])return e;for(const[n,i]of r.entries()){const r=p(i,n,t,o);e.push(...r)}return e}(r.orderBy,t,r.limetype);n.push(...o)}if(e&&void 0!==r.offset&&i.push("offset is not yet supported in visual mode"),r.filter){const{errors:s,limitations:a}=function(r,t,o,e,n){const i=[],s=[];try{f(r,t,o,e,n)}catch(r){const t=r.message;t.includes("Invalid filter key")||t.includes("Cannot filter on many-relation")?(i.push(`Invalid filter: ${t}`),s.push(t)):i.push(`Invalid filter: ${t}`)}return{errors:i,limitations:s}}(r.filter,o,t,r.limetype,e);n.push(...s),i.push(...a)}if(r.responseFormat){const{errors:o,limitations:s}=d(r.responseFormat,t,r.limetype,e);n.push(...o),i.push(...s)}return{valid:0===n.length,visualModeSupported:0===i.length,validationErrors:n,visualModeLimitations:i}}function v(r,t,o,e=!0){const n=[],i=[];if(!t[o])return n.push(`Unknown limetype: ${o}`),{valid:!1,visualModeSupported:!1,validationErrors:n,visualModeLimitations:i};const{errors:s,limitations:a}=d(r,t,o,e);return n.push(...s),i.push(...a),{valid:0===n.length,visualModeSupported:0===i.length,validationErrors:n,visualModeLimitations:i}}export{y as i,v}
1
+ import{n as r}from"./p-Bkno2RtN.js";import{g as t,a as o,v as e}from"./p-CQUZjrU4.js";const n=new Set(["$yesterday","$now","$today","$tomorrow","$this_week","$this_month","$this_quarter","$this_year"]),i=/^\$(previous|next)_(day|week|month|quarter|year)\(\d+\)$/,s=/^\$me(\.\w+)*$/;function a(r,o,e){if(function(r){return"string"==typeof r&&(n.has(r)||i.test(r)||s.test(r))}(r))return{valid:!0};if("string"!=typeof r||!r.startsWith("%activeObject%"))return{valid:!0};if(!o)return{valid:!0};const a=r.replace(/^%activeObject%\.?/,"");if(!a)return{valid:!0};try{return t(e,o,a)?{valid:!0}:{valid:!1,error:`Property path '${a}' does not exist on limetype '${o}'`}}catch(r){return{valid:!1,error:`Invalid placeholder path: ${r.message}`}}}function u(r,t,o=!0){const e=Object.keys(r),n=[];if(o){const r=e.filter((r=>r.startsWith("#")&&"#description"!==r));r.length>0&&n.push(`Property '${t}' contains # properties not supported in visual mode: ${r.join(", ")}`)}return{keys:e.filter((r=>"_alias"!==r&&!r.startsWith("#"))),visualModeLimitations:n}}function l(r,t,o,e,n,i=!0){if(""===r){if(i&&null!==t)throw new Error("Empty property name must have null value");return[]}const s=o[r];if(!s)throw new Error(`Property '${r}' does not exist on limetype '${n}'`);return s.relation?function(r,t,o,e,n=!0){if(null===t)return[];if("object"!=typeof t)throw new TypeError(`Relation property '${r}' must be null or an object`);const i=t,{keys:s,visualModeLimitations:a}=u(i,r,n);if(0===s.length)return a;const l=e.relation.getLimetype();if(!l)throw new Error(`Could not determine related limetype for property '${r}'`);const f={};for(const r of s)f[r]=i[r];const p=c(f,o,l.name,n);return[...a,...p]}(r,t,e,s,i):function(r,t,o=!0){if(null===t)return[];if("object"==typeof t){const{keys:e,visualModeLimitations:n}=u(t,r,o);if(0===e.length)return n;throw new Error(`Non-relation property '${r}' cannot have nested properties other than _alias or # properties (got: ${e.join(", ")})`)}throw new Error(`Non-relation property '${r}' must be null or an object (got ${typeof t})`)}(r,t,i)}function c(r,t,e,n=!0){const i=t[e];if(!i)throw new Error(`Unknown limetype: ${e}`);const s=o(i),a=[];for(const[o,i]of Object.entries(r)){if(o.startsWith("#"))continue;const r=l(o,i,s,t,e,n);a.push(...r)}return a}function f(t,o,n,i,s=!0){t&&("key"in t?function(t,o,n,i){if(!Object.values(r).includes(t.op))throw new Error(`Unsupported filter operator: ${t.op}`);const s=function(r,t,o,n){if(!r)return{valid:!1,error:"Filter key cannot be empty"};if(r.startsWith("%activeObject%")){const o=a(r,n,t);if(!o.valid)return o;const i=r.replace(/^%activeObject%\.?/,"");if(i&&n){const{error:r}=e(t,n,i);if(r)return{valid:!1,error:r}}return o}const{error:i}=e(t,o,r);return i?{valid:!1,error:i}:{valid:!0}}(t.key,n,i,o);if(!s.valid)throw new Error(`Invalid filter key '${t.key}': ${s.error}`);const u=a(t.exp,o,n);if(!u.valid)throw new Error(`Invalid placeholder in filter '${t.key}': ${u.error}`)}(t,o,n,i):"exp"in t&&function(t,o,e,n,i){if(t.op!==r.AND&&t.op!==r.OR&&t.op!==r.NOT)throw new Error(`Unsupported group operator: ${t.op}`);if(t.op===r.NOT)f(t.exp,o,e,n,i);else if(t.op===r.AND||t.op===r.OR){const r=t.exp;for(const t of r)f(t,o,e,n,i)}}(t,o,n,i,s))}function p(r,o,e,n){const i=[],s=function(r,t){return"object"!=typeof r||null===r?`orderBy[${t}] must be an object`:null}(r,o);if(s)return[s];const a=Object.keys(r),u=function(r,t){return 0===r.length?`orderBy[${t}] must have a property path`:r.length>1?`orderBy[${t}] must have exactly one property, got ${r.length}`:null}(a,o);if(u)return[u];const l=a[0],c=function(r,t){return"ASC"!==r&&"DESC"!==r?`orderBy[${t}]: direction must be 'ASC' or 'DESC', got '${r}'`:null}(r[l],o);c&&i.push(c);const f=function(r,o,e,n){if(!r||""===r)return null;return t(o,e,r)?null:`orderBy[${n}]: property path '${r}' does not exist on limetype '${e}'`}(l,e,n,o);return f&&i.push(f),i}function d(r,t,o,e){const n=[],i=[];try{const n=function(r,t,o,e=!0){const n=[];if(e&&r.aggregates&&n.push("responseFormat.aggregates is not yet supported in visual mode"),r.object){const i=c(r.object,t,o,e);n.push(...i)}return n}(r,t,o,e);i.push(...n)}catch(r){n.push(`Invalid responseFormat: ${r.message}`)}return{errors:n,limitations:i}}function y(r,t,o,e=!0){if(!r)return{valid:!0,visualModeSupported:!0,validationErrors:[],visualModeLimitations:[]};const n=[],i=[];if(r.limetype&&!t[r.limetype]&&n.push(`Unknown limetype: ${r.limetype}`),void 0===r.offset||r.orderBy||n.push("offset requires orderBy to be specified"),r.orderBy){const o=function(r,t,o){const e=[];if(!Array.isArray(r))return e.push("orderBy must be an array"),e;if(!o||!t[o])return e;for(const[n,i]of r.entries()){const r=p(i,n,t,o);e.push(...r)}return e}(r.orderBy,t,r.limetype);n.push(...o)}if(e&&void 0!==r.offset&&i.push("offset is not yet supported in visual mode"),r.filter){const{errors:s,limitations:a}=function(r,t,o,e,n){const i=[],s=[];try{f(r,t,o,e,n)}catch(r){const t=r.message;t.includes("Invalid filter key")||t.includes("Cannot filter on many-relation")?(i.push(`Invalid filter: ${t}`),s.push(t)):i.push(`Invalid filter: ${t}`)}return{errors:i,limitations:s}}(r.filter,o,t,r.limetype,e);n.push(...s),i.push(...a)}if(r.responseFormat){const{errors:o,limitations:s}=d(r.responseFormat,t,r.limetype,e);n.push(...o),i.push(...s)}return{valid:0===n.length,visualModeSupported:0===i.length,validationErrors:n,visualModeLimitations:i}}function v(r,t,o,e=!0){const n=[],i=[];if(!t[o])return n.push(`Unknown limetype: ${o}`),{valid:!1,visualModeSupported:!1,validationErrors:n,visualModeLimitations:i};const{errors:s,limitations:a}=d(r,t,o,e);return n.push(...s),i.push(...a),{valid:0===n.length,visualModeSupported:0===i.length,validationErrors:n,visualModeLimitations:i}}export{y as i,v}
@@ -1 +1 @@
1
- import{h as t}from"./p-LEJjPpY0.js";const e=(e,c)=>t(e.name,Object.assign({class:e.class},function(t){let e={};return t.props&&(e=Object.assign({},t.props)),Object.assign({context:t.context,platform:t.platform},e)}(e),{key:e.key}),c);export{e as L}
1
+ import{h as t}from"./p-DwHAn7LS.js";const e=(e,c)=>t(e.name,Object.assign({class:e.class},function(t){let e={};return t.props&&(e=Object.assign({},t.props)),Object.assign({context:t.context,platform:t.platform},e)}(e),{key:e.key}),c);export{e as L}
@@ -1 +1 @@
1
- import{r as t,g as i,h as s}from"./p-LEJjPpY0.js";import{g as e}from"./p-Bb18Bgig.js";import{f as h}from"./p-B95D7tDb.js";import{M as o,b as a}from"./p-Dtg8KAQt.js";const r=o("object-resolver");class l{constructor(t){this.onStateChange=t,this.state={loadFailed:!1},this.hasPendingLoad=!1,this.isDisconnected=!1}get resolvedPlatform(){return this._platform}connect(t,i,s,e){this.limetype=t,this.objectid=i,this.isDisconnected=!1,this.hasPendingLoad=!1,this._platform=e||this.findPlatform(s),this._platform?(this.resolveLimeType(),this.loadLimeObject()):r.error(`No platform found. Pass "platform" prop or place the component inside a parent that exposes "platform". limetype=${t}, objectid=${i}`)}update(t,i){this.limetype=t,this.objectid=i,this.updateState({limeobject:void 0,limetypeData:void 0,loadFailed:!1}),this.hasPendingLoad||(this.hasPendingLoad=!0,queueMicrotask((()=>{if(this.hasPendingLoad=!1,!this.isDisconnected){if(!this._platform)return this.updateState({loadFailed:!0}),void r.warn(`Cannot update: no platform available. limetype=${this.limetype}, objectid=${this.objectid}`);this.resolveLimeType(),this.loadLimeObject()}})))}disconnect(){this.isDisconnected=!0}findPlatform(t){const i=h(t,this.hasPlatformProp);return null==i?void 0:i.platform}hasPlatformProp(t){return"platform"in t&&!!t.platform&&"object"==typeof t.platform}resolveLimeType(){const t=this._platform.get(a.LimeTypeRepository);this.updateState({limetypeData:t.getLimeType(this.limetype)})}async loadLimeObject(){const t=this.limetype,i=this.objectid,s=this._platform.get(a.LimeObjectRepository),e=s.getObject(t,i);if(e)this.updateState({limeobject:e});else{try{await s.loadObject(t,i)}catch(s){if(this.isStale(t,i))return;return this.updateState({loadFailed:!0}),void r.error(`Failed to load ${t}/${i}`,s)}this.isStale(t,i)||this.updateState({limeobject:s.getObject(t,i)})}}isStale(t,i){return this.isDisconnected||this.limetype!==t||this.objectid!==i}updateState(t){this.state=Object.assign(Object.assign({},this.state),t),this.isDisconnected||this.onStateChange(this.state)}}const n=class{constructor(i){t(this,i),this.size="default",this.data={loadFailed:!1},this.resolver=new l((t=>{this.data=t}))}connectedCallback(){this.resolver.connect(this.limetype,this.objectid,i(this),this.platform)}disconnectedCallback(){this.resolver.disconnect()}handlePropChange(){this.resolver.update(this.limetype,this.objectid)}render(){if(!this.resolver.resolvedPlatform)return;const t=e(this.data.limetypeData);return s("limel-chip",{text:this.getChipText(),icon:t,size:this.size,link:{href:(i=this.limetype,h=this.objectid,`object/${i}/${h}`)},loading:!this.data.limeobject&&!this.data.loadFailed});var i,h}getChipText(){var t;return(null===(t=this.data.limeobject)||void 0===t?void 0:t.descriptive)?this.data.limeobject.descriptive:this.data.loadFailed?this.getErrorText():""}getErrorText(){if(!this.resolver.resolvedPlatform)return"loading failed";try{return this.resolver.resolvedPlatform.get(a.Translate).get("webclient.limeobject.errors.load-failed")}catch(t){return"loading failed"}}static get watchers(){return{limetype:[{handlePropChange:0}],objectid:[{handlePropChange:0}]}}};n.style=":host{display:inline-block;vertical-align:baseline}";export{n as limebb_object_chip}
1
+ import{r as t,g as i,h as s}from"./p-DwHAn7LS.js";import{g as e}from"./p-B-WBKAaa.js";import{f as h}from"./p-B95D7tDb.js";import{M as o,b as a}from"./p-Bkno2RtN.js";const r=o("object-resolver");class l{constructor(t){this.onStateChange=t,this.state={loadFailed:!1},this.hasPendingLoad=!1,this.isDisconnected=!1}get resolvedPlatform(){return this._platform}connect(t,i,s,e){this.limetype=t,this.objectid=i,this.isDisconnected=!1,this.hasPendingLoad=!1,this._platform=e||this.findPlatform(s),this._platform?(this.resolveLimeType(),this.loadLimeObject()):r.error(`No platform found. Pass "platform" prop or place the component inside a parent that exposes "platform". limetype=${t}, objectid=${i}`)}update(t,i){this.limetype=t,this.objectid=i,this.updateState({limeobject:void 0,limetypeData:void 0,loadFailed:!1}),this.hasPendingLoad||(this.hasPendingLoad=!0,queueMicrotask((()=>{if(this.hasPendingLoad=!1,!this.isDisconnected){if(!this._platform)return this.updateState({loadFailed:!0}),void r.warn(`Cannot update: no platform available. limetype=${this.limetype}, objectid=${this.objectid}`);this.resolveLimeType(),this.loadLimeObject()}})))}disconnect(){this.isDisconnected=!0}findPlatform(t){const i=h(t,this.hasPlatformProp);return null==i?void 0:i.platform}hasPlatformProp(t){return"platform"in t&&!!t.platform&&"object"==typeof t.platform}resolveLimeType(){const t=this._platform.get(a.LimeTypeRepository);this.updateState({limetypeData:t.getLimeType(this.limetype)})}async loadLimeObject(){const t=this.limetype,i=this.objectid,s=this._platform.get(a.LimeObjectRepository),e=s.getObject(t,i);if(e)this.updateState({limeobject:e});else{try{await s.loadObject(t,i)}catch(s){if(this.isStale(t,i))return;return this.updateState({loadFailed:!0}),void r.error(`Failed to load ${t}/${i}`,s)}this.isStale(t,i)||this.updateState({limeobject:s.getObject(t,i)})}}isStale(t,i){return this.isDisconnected||this.limetype!==t||this.objectid!==i}updateState(t){this.state=Object.assign(Object.assign({},this.state),t),this.isDisconnected||this.onStateChange(this.state)}}const n=class{constructor(i){t(this,i),this.size="default",this.data={loadFailed:!1},this.resolver=new l((t=>{this.data=t}))}connectedCallback(){this.resolver.connect(this.limetype,this.objectid,i(this),this.platform)}disconnectedCallback(){this.resolver.disconnect()}handlePropChange(){this.resolver.update(this.limetype,this.objectid)}render(){if(!this.resolver.resolvedPlatform)return;const t=e(this.data.limetypeData);return s("limel-chip",{text:this.getChipText(),icon:t,size:this.size,link:{href:(i=this.limetype,h=this.objectid,`object/${i}/${h}`)},loading:!this.data.limeobject&&!this.data.loadFailed});var i,h}getChipText(){var t;return(null===(t=this.data.limeobject)||void 0===t?void 0:t.descriptive)?this.data.limeobject.descriptive:this.data.loadFailed?this.getErrorText():""}getErrorText(){if(!this.resolver.resolvedPlatform)return"loading failed";try{return this.resolver.resolvedPlatform.get(a.Translate).get("webclient.limeobject.errors.load-failed")}catch(t){return"loading failed"}}static get watchers(){return{limetype:[{handlePropChange:0}],objectid:[{handlePropChange:0}]}}};n.style=":host{display:inline-block;vertical-align:baseline}";export{n as limebb_object_chip}
@@ -1 +1 @@
1
- import{r as t,c as e,h as r}from"./p-LEJjPpY0.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-DwHAn7LS.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}