@limetech/lime-crm-building-blocks 2.0.4 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (288) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/cjs/condition-tree-translate-B_qIQz9s.js +27 -0
  3. package/dist/cjs/index.cjs.js +6 -0
  4. package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
  5. package/dist/cjs/limebb-alert-dialog.cjs.entry.js +1 -1
  6. package/dist/cjs/limebb-browser.cjs.entry.js +2 -2
  7. package/dist/cjs/limebb-chat-icon-list_3.cjs.entry.js +4 -4
  8. package/dist/cjs/limebb-chat-list.cjs.entry.js +1 -1
  9. package/dist/cjs/limebb-color-palette-picker.cjs.entry.js +1 -1
  10. package/dist/cjs/limebb-color-palette-swatches.cjs.entry.js +1 -1
  11. package/dist/cjs/limebb-composer-toolbar.cjs.entry.js +2 -2
  12. package/dist/cjs/limebb-condition-tree-editor.cjs.entry.js +90 -0
  13. package/dist/cjs/limebb-condition-tree.cjs.entry.js +882 -0
  14. package/dist/cjs/limebb-currency-picker.cjs.entry.js +1 -1
  15. package/dist/cjs/limebb-dashboard-widget.cjs.entry.js +1 -1
  16. package/dist/cjs/limebb-date-picker.cjs.entry.js +1 -1
  17. package/dist/cjs/limebb-date-range.cjs.entry.js +1 -1
  18. package/dist/cjs/limebb-document-chips.cjs.entry.js +1 -1
  19. package/dist/cjs/limebb-document-item.cjs.entry.js +2 -2
  20. package/dist/cjs/limebb-document-picker.cjs.entry.js +1 -1
  21. package/dist/cjs/limebb-feed-item-thumbnail-file-info.cjs.entry.js +1 -1
  22. package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +1 -1
  23. package/dist/cjs/limebb-feed.cjs.entry.js +1 -1
  24. package/dist/cjs/limebb-filter-chip_6.cjs.entry.js +7 -7
  25. package/dist/cjs/limebb-icon-picker.cjs.entry.js +1 -1
  26. package/dist/cjs/limebb-info-tile-format.cjs.entry.js +1 -1
  27. package/dist/cjs/limebb-info-tile.cjs.entry.js +1 -1
  28. package/dist/cjs/limebb-kanban-group.cjs.entry.js +1 -1
  29. package/dist/cjs/limebb-kanban-item.cjs.entry.js +1 -1
  30. package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +1 -1
  31. package/dist/cjs/limebb-lime-query-filter-comparison_2.cjs.entry.js +2 -2
  32. package/dist/cjs/limebb-lime-query-order-by-editor_2.cjs.entry.js +2 -2
  33. package/dist/cjs/limebb-lime-query-order-by-item.cjs.entry.js +2 -2
  34. package/dist/cjs/limebb-lime-query-response-format-builder.cjs.entry.js +1 -1
  35. package/dist/cjs/limebb-lime-query-response-format-editor_2.cjs.entry.js +1 -1
  36. package/dist/cjs/limebb-live-docs-info.cjs.entry.js +2 -2
  37. package/dist/cjs/limebb-locale-picker.cjs.entry.js +1 -1
  38. package/dist/cjs/limebb-mention-group-counter.cjs.entry.js +2 -2
  39. package/dist/cjs/limebb-navigation-button_2.cjs.entry.js +2 -2
  40. package/dist/cjs/limebb-notification-item.cjs.entry.js +1 -1
  41. package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +2 -2
  42. package/dist/cjs/limebb-rule-chip-popover.cjs.entry.js +2 -2
  43. package/dist/cjs/limebb-rule-editor.cjs.entry.js +162 -22
  44. package/dist/cjs/limebb-rule-gate.cjs.entry.js +1 -1
  45. package/dist/cjs/limebb-text-editor.cjs.entry.js +1 -1
  46. package/dist/cjs/limebb-trend-indicator.cjs.entry.js +1 -1
  47. package/dist/cjs/limebb-value-comparison-editor.cjs.entry.js +1 -1
  48. package/dist/cjs/loader.cjs.js +1 -1
  49. package/dist/cjs/rule-editor-modes-Dc6rnwD2.js +76 -0
  50. package/dist/collection/collection-manifest.json +3 -1
  51. package/dist/collection/components/alert-dialog/alert-dialog.js +1 -1
  52. package/dist/collection/components/browser/browser.js +2 -2
  53. package/dist/collection/components/chat-list/chat-icon-list/chat-icon-list.js +1 -1
  54. package/dist/collection/components/chat-list/chat-item/chat-item.js +2 -2
  55. package/dist/collection/components/chat-list/chat-list.js +1 -1
  56. package/dist/collection/components/chat-list/typing-indicator/typing-indicator.js +1 -1
  57. package/dist/collection/components/color-palette-picker/color-palette-picker.js +1 -1
  58. package/dist/collection/components/color-palette-picker/color-palette-swatches/color-palette-swatches.js +1 -1
  59. package/dist/collection/components/composer-toolbar/composer-toolbar.js +2 -2
  60. package/dist/collection/components/condition-tree/condition-tree-combinators.js +78 -0
  61. package/dist/collection/components/condition-tree/condition-tree-editor/condition-tree-editor.css +17 -0
  62. package/dist/collection/components/condition-tree/condition-tree-editor/condition-tree-editor.js +333 -0
  63. package/dist/collection/components/condition-tree/condition-tree-nodes.js +218 -0
  64. package/dist/collection/components/condition-tree/condition-tree-open-state.js +127 -0
  65. package/dist/collection/components/condition-tree/condition-tree-translate.js +22 -0
  66. package/dist/collection/components/condition-tree/condition-tree-view-context.js +22 -0
  67. package/dist/collection/components/condition-tree/condition-tree.css +132 -0
  68. package/dist/collection/components/condition-tree/condition-tree.js +461 -0
  69. package/dist/collection/components/condition-tree/condition-tree.types.js +1 -0
  70. package/dist/collection/components/condition-tree/group-node-view.js +153 -0
  71. package/dist/collection/components/condition-tree/leaf-node-view.js +74 -0
  72. package/dist/collection/components/currency-picker/currency-picker.js +1 -1
  73. package/dist/collection/components/dashboard-widget/dashboard-widget.js +1 -1
  74. package/dist/collection/components/date-picker/date-picker.js +1 -1
  75. package/dist/collection/components/date-range/date-range.js +1 -1
  76. package/dist/collection/components/document-chips/document-chips.js +1 -1
  77. package/dist/collection/components/document-picker/document-item/document-item.js +2 -2
  78. package/dist/collection/components/document-picker/document-picker.js +1 -1
  79. package/dist/collection/components/feed/feed-item/feed-timeline-item.js +1 -1
  80. package/dist/collection/components/feed/feed-item-thumbnail-file-info/feed-item-thumbnail-file-info.js +1 -1
  81. package/dist/collection/components/feed/feed.js +1 -1
  82. package/dist/collection/components/filter-chip/filter-chip.js +2 -2
  83. package/dist/collection/components/filter-condition-picker/filter-condition-picker.js +1 -1
  84. package/dist/collection/components/icon-picker/icon-picker.js +1 -1
  85. package/dist/collection/components/info-tile/format/config/info-tile-format.js +1 -1
  86. package/dist/collection/components/info-tile/info-tile.js +1 -1
  87. package/dist/collection/components/kanban/kanban-group/kanban-group.js +1 -1
  88. package/dist/collection/components/kanban/kanban-item/kanban-item.js +1 -1
  89. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison-editor.js +1 -1
  90. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison.js +2 -2
  91. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-group.js +2 -2
  92. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-not.js +1 -1
  93. package/dist/collection/components/lime-query-builder/lime-query-builder.js +1 -1
  94. package/dist/collection/components/lime-query-builder/lime-query-response-format-builder.js +1 -1
  95. package/dist/collection/components/lime-query-builder/limetype-field/limetype-field.js +1 -1
  96. package/dist/collection/components/lime-query-builder/order-by/order-by-editor.js +1 -1
  97. package/dist/collection/components/lime-query-builder/order-by/order-by-item.js +2 -2
  98. package/dist/collection/components/lime-query-builder/response-format/response-format-item.js +1 -1
  99. package/dist/collection/components/limeobject/file-viewer/live-docs-info.js +2 -2
  100. package/dist/collection/components/locale-picker/locale-picker.js +1 -1
  101. package/dist/collection/components/notification-list/notification-item/notification-item.js +1 -1
  102. package/dist/collection/components/percentage-visualizer/percentage-visualizer.js +2 -2
  103. package/dist/collection/components/rule-editor/group-node-view.js +3 -3
  104. package/dist/collection/components/rule-editor/rule-chip-popover/rule-chip-popover.js +2 -2
  105. package/dist/collection/components/rule-editor/rule-editor-mode-view.js +32 -0
  106. package/dist/collection/components/rule-editor/rule-editor-modes.js +68 -0
  107. package/dist/collection/components/rule-editor/rule-editor.css +153 -12
  108. package/dist/collection/components/rule-editor/rule-editor.js +201 -19
  109. package/dist/collection/components/rule-editor/rule-editor.types.js +1 -0
  110. package/dist/collection/components/rule-editor/value-comparison-editor/value-comparison-editor.js +1 -1
  111. package/dist/collection/components/rule-gate/rule-gate.js +1 -1
  112. package/dist/collection/components/summary-popover/summary-popover.js +2 -2
  113. package/dist/collection/components/text-editor/mention-group-counter.js +2 -2
  114. package/dist/collection/components/text-editor/text-editor.js +1 -1
  115. package/dist/collection/components/trend-indicator/trend-indicator.js +1 -1
  116. package/dist/collection/index.js +2 -0
  117. package/dist/components/chat-icon-list.js +1 -1
  118. package/dist/components/chat-item.js +1 -1
  119. package/dist/components/condition-tree-editor.js +1 -0
  120. package/dist/components/currency-picker.js +1 -1
  121. package/dist/components/date-picker.js +1 -1
  122. package/dist/components/document-item.js +1 -1
  123. package/dist/components/feed-item-thumbnail-file-info.js +1 -1
  124. package/dist/components/feed-timeline-item.js +1 -1
  125. package/dist/components/filter-chip.js +1 -1
  126. package/dist/components/filter-condition-picker.js +1 -1
  127. package/dist/components/index.js +1 -1
  128. package/dist/components/kanban-group.js +1 -1
  129. package/dist/components/kanban-item.js +1 -1
  130. package/dist/components/lime-query-filter-comparison-editor.js +1 -1
  131. package/dist/components/lime-query-filter-comparison.js +1 -1
  132. package/dist/components/lime-query-filter-expression.js +1 -1
  133. package/dist/components/limebb-alert-dialog.js +1 -1
  134. package/dist/components/limebb-browser.js +1 -1
  135. package/dist/components/limebb-chat-list.js +1 -1
  136. package/dist/components/limebb-color-palette-picker.js +1 -1
  137. package/dist/components/limebb-color-palette-swatches.js +1 -1
  138. package/dist/components/limebb-composer-toolbar.js +1 -1
  139. package/dist/components/limebb-condition-tree-editor.d.ts +11 -0
  140. package/dist/components/limebb-condition-tree-editor.js +1 -0
  141. package/dist/components/limebb-condition-tree.d.ts +11 -0
  142. package/dist/components/limebb-condition-tree.js +1 -0
  143. package/dist/components/limebb-dashboard-widget.js +1 -1
  144. package/dist/components/limebb-date-range.js +1 -1
  145. package/dist/components/limebb-document-chips.js +1 -1
  146. package/dist/components/limebb-document-picker.js +1 -1
  147. package/dist/components/limebb-feed.js +1 -1
  148. package/dist/components/limebb-icon-picker.js +1 -1
  149. package/dist/components/limebb-info-tile-format.js +1 -1
  150. package/dist/components/limebb-info-tile.js +1 -1
  151. package/dist/components/limebb-lime-query-builder.js +1 -1
  152. package/dist/components/limebb-lime-query-response-format-builder.js +1 -1
  153. package/dist/components/limebb-locale-picker.js +1 -1
  154. package/dist/components/limebb-mention-group-counter.js +1 -1
  155. package/dist/components/limebb-rule-editor.js +1 -1
  156. package/dist/components/limebb-rule-gate.js +1 -1
  157. package/dist/components/limebb-text-editor.js +1 -1
  158. package/dist/components/limebb-trend-indicator.js +1 -1
  159. package/dist/components/limebb-value-comparison-editor.js +1 -1
  160. package/dist/components/limetype-field.js +1 -1
  161. package/dist/components/live-docs-info.js +1 -1
  162. package/dist/components/notification-item.js +1 -1
  163. package/dist/components/order-by-editor.js +1 -1
  164. package/dist/components/order-by-item.js +1 -1
  165. package/dist/components/percentage-visualizer.js +1 -1
  166. package/dist/components/response-format-item.js +1 -1
  167. package/dist/components/rule-chip-popover.js +1 -1
  168. package/dist/components/rule-editor-modes.js +1 -0
  169. package/dist/components/summary-popover.js +1 -1
  170. package/dist/components/typing-indicator.js +1 -1
  171. package/dist/esm/condition-tree-translate-CBeXbZ_z.js +25 -0
  172. package/dist/esm/index.js +1 -0
  173. package/dist/esm/lime-crm-building-blocks.js +1 -1
  174. package/dist/esm/limebb-alert-dialog.entry.js +1 -1
  175. package/dist/esm/limebb-browser.entry.js +2 -2
  176. package/dist/esm/limebb-chat-icon-list_3.entry.js +4 -4
  177. package/dist/esm/limebb-chat-list.entry.js +1 -1
  178. package/dist/esm/limebb-color-palette-picker.entry.js +1 -1
  179. package/dist/esm/limebb-color-palette-swatches.entry.js +1 -1
  180. package/dist/esm/limebb-composer-toolbar.entry.js +2 -2
  181. package/dist/esm/limebb-condition-tree-editor.entry.js +88 -0
  182. package/dist/esm/limebb-condition-tree.entry.js +880 -0
  183. package/dist/esm/limebb-currency-picker.entry.js +1 -1
  184. package/dist/esm/limebb-dashboard-widget.entry.js +1 -1
  185. package/dist/esm/limebb-date-picker.entry.js +1 -1
  186. package/dist/esm/limebb-date-range.entry.js +1 -1
  187. package/dist/esm/limebb-document-chips.entry.js +1 -1
  188. package/dist/esm/limebb-document-item.entry.js +2 -2
  189. package/dist/esm/limebb-document-picker.entry.js +1 -1
  190. package/dist/esm/limebb-feed-item-thumbnail-file-info.entry.js +1 -1
  191. package/dist/esm/limebb-feed-timeline-item.entry.js +1 -1
  192. package/dist/esm/limebb-feed.entry.js +1 -1
  193. package/dist/esm/limebb-filter-chip_6.entry.js +7 -7
  194. package/dist/esm/limebb-icon-picker.entry.js +1 -1
  195. package/dist/esm/limebb-info-tile-format.entry.js +1 -1
  196. package/dist/esm/limebb-info-tile.entry.js +1 -1
  197. package/dist/esm/limebb-kanban-group.entry.js +1 -1
  198. package/dist/esm/limebb-kanban-item.entry.js +1 -1
  199. package/dist/esm/limebb-lime-query-builder.entry.js +1 -1
  200. package/dist/esm/limebb-lime-query-filter-comparison_2.entry.js +2 -2
  201. package/dist/esm/limebb-lime-query-order-by-editor_2.entry.js +2 -2
  202. package/dist/esm/limebb-lime-query-order-by-item.entry.js +2 -2
  203. package/dist/esm/limebb-lime-query-response-format-builder.entry.js +1 -1
  204. package/dist/esm/limebb-lime-query-response-format-editor_2.entry.js +1 -1
  205. package/dist/esm/limebb-live-docs-info.entry.js +2 -2
  206. package/dist/esm/limebb-locale-picker.entry.js +1 -1
  207. package/dist/esm/limebb-mention-group-counter.entry.js +2 -2
  208. package/dist/esm/limebb-navigation-button_2.entry.js +2 -2
  209. package/dist/esm/limebb-notification-item.entry.js +1 -1
  210. package/dist/esm/limebb-percentage-visualizer.entry.js +2 -2
  211. package/dist/esm/limebb-rule-chip-popover.entry.js +2 -2
  212. package/dist/esm/limebb-rule-editor.entry.js +163 -23
  213. package/dist/esm/limebb-rule-gate.entry.js +1 -1
  214. package/dist/esm/limebb-text-editor.entry.js +1 -1
  215. package/dist/esm/limebb-trend-indicator.entry.js +1 -1
  216. package/dist/esm/limebb-value-comparison-editor.entry.js +1 -1
  217. package/dist/esm/loader.js +1 -1
  218. package/dist/esm/rule-editor-modes-BCglve2Z.js +70 -0
  219. package/dist/lime-crm-building-blocks/index.esm.js +1 -1
  220. package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
  221. package/dist/lime-crm-building-blocks/{p-2f8540ab.entry.js → p-02fba38e.entry.js} +1 -1
  222. package/dist/lime-crm-building-blocks/{p-76151fce.entry.js → p-0445035f.entry.js} +1 -1
  223. package/dist/lime-crm-building-blocks/{p-4f0a4893.entry.js → p-0a05b3e9.entry.js} +1 -1
  224. package/dist/lime-crm-building-blocks/p-0dd64440.entry.js +1 -0
  225. package/dist/lime-crm-building-blocks/p-1578c8f0.entry.js +1 -0
  226. package/dist/lime-crm-building-blocks/{p-76064593.entry.js → p-170ab4be.entry.js} +1 -1
  227. package/dist/lime-crm-building-blocks/{p-542047c4.entry.js → p-27b9c824.entry.js} +1 -1
  228. package/dist/lime-crm-building-blocks/{p-2628fe8e.entry.js → p-2d1c7b6f.entry.js} +1 -1
  229. package/dist/lime-crm-building-blocks/{p-c2c181f1.entry.js → p-3fd84800.entry.js} +1 -1
  230. package/dist/lime-crm-building-blocks/{p-c7daffb6.entry.js → p-45dd8663.entry.js} +1 -1
  231. package/dist/lime-crm-building-blocks/{p-cede8095.entry.js → p-4e4d096c.entry.js} +1 -1
  232. package/dist/lime-crm-building-blocks/{p-51eb53ee.entry.js → p-54735042.entry.js} +1 -1
  233. package/dist/lime-crm-building-blocks/{p-c2899d68.entry.js → p-568c4e76.entry.js} +1 -1
  234. package/dist/lime-crm-building-blocks/{p-9907deb1.entry.js → p-584a48e4.entry.js} +1 -1
  235. package/dist/lime-crm-building-blocks/{p-ac4bddfc.entry.js → p-5b97d4f4.entry.js} +1 -1
  236. package/dist/lime-crm-building-blocks/p-615770be.entry.js +1 -0
  237. package/dist/lime-crm-building-blocks/{p-edfaf566.entry.js → p-6d8efe87.entry.js} +1 -1
  238. package/dist/lime-crm-building-blocks/p-705c53c0.entry.js +1 -0
  239. package/dist/lime-crm-building-blocks/{p-031b1648.entry.js → p-73f23d08.entry.js} +1 -1
  240. package/dist/lime-crm-building-blocks/{p-2baab674.entry.js → p-7c5ecffe.entry.js} +1 -1
  241. package/dist/lime-crm-building-blocks/{p-1fac8130.entry.js → p-7cd8dffd.entry.js} +1 -1
  242. package/dist/lime-crm-building-blocks/p-93af3e81.entry.js +1 -0
  243. package/dist/lime-crm-building-blocks/{p-247fcace.entry.js → p-97e2e5c9.entry.js} +1 -1
  244. package/dist/lime-crm-building-blocks/p-BCglve2Z.js +1 -0
  245. package/dist/lime-crm-building-blocks/p-BxCq236x.js +1 -0
  246. package/dist/lime-crm-building-blocks/p-a2b9c410.entry.js +1 -0
  247. package/dist/lime-crm-building-blocks/{p-f9f7020f.entry.js → p-a716b3a8.entry.js} +1 -1
  248. package/dist/lime-crm-building-blocks/p-b3529254.entry.js +1 -0
  249. package/dist/lime-crm-building-blocks/{p-2bfd351d.entry.js → p-b48d7d23.entry.js} +1 -1
  250. package/dist/lime-crm-building-blocks/{p-b373c60f.entry.js → p-b6807166.entry.js} +1 -1
  251. package/dist/lime-crm-building-blocks/{p-318369ae.entry.js → p-b6c2d93b.entry.js} +1 -1
  252. package/dist/lime-crm-building-blocks/{p-d82a2424.entry.js → p-c46802cd.entry.js} +1 -1
  253. package/dist/lime-crm-building-blocks/{p-9099b440.entry.js → p-c635f826.entry.js} +1 -1
  254. package/dist/lime-crm-building-blocks/{p-fec173db.entry.js → p-d816fcc8.entry.js} +1 -1
  255. package/dist/lime-crm-building-blocks/{p-4594c2b1.entry.js → p-d8ce3497.entry.js} +1 -1
  256. package/dist/lime-crm-building-blocks/{p-0f74d662.entry.js → p-d8d32cb1.entry.js} +1 -1
  257. package/dist/lime-crm-building-blocks/{p-99556fc0.entry.js → p-de7724f0.entry.js} +1 -1
  258. package/dist/lime-crm-building-blocks/{p-92403251.entry.js → p-e910963c.entry.js} +1 -1
  259. package/dist/lime-crm-building-blocks/{p-4274cbe3.entry.js → p-ea6ab8b0.entry.js} +1 -1
  260. package/dist/lime-crm-building-blocks/{p-eedbf69a.entry.js → p-ee7bd504.entry.js} +1 -1
  261. package/dist/lime-crm-building-blocks/{p-e1f35866.entry.js → p-f024c185.entry.js} +1 -1
  262. package/dist/lime-crm-building-blocks/{p-7bb2788b.entry.js → p-f102f169.entry.js} +1 -1
  263. package/dist/lime-crm-building-blocks/{p-2984005d.entry.js → p-f1060c88.entry.js} +1 -1
  264. package/dist/lime-crm-building-blocks/{p-17588c29.entry.js → p-f3905fa2.entry.js} +1 -1
  265. package/dist/lime-crm-building-blocks/{p-ac97c7cc.entry.js → p-fc372344.entry.js} +1 -1
  266. package/dist/types/components/condition-tree/condition-tree-combinators.d.ts +47 -0
  267. package/dist/types/components/condition-tree/condition-tree-editor/condition-tree-editor.d.ts +84 -0
  268. package/dist/types/components/condition-tree/condition-tree-nodes.d.ts +130 -0
  269. package/dist/types/components/condition-tree/condition-tree-open-state.d.ts +76 -0
  270. package/dist/types/components/condition-tree/condition-tree-translate.d.ts +11 -0
  271. package/dist/types/components/condition-tree/condition-tree-view-context.d.ts +48 -0
  272. package/dist/types/components/condition-tree/condition-tree.d.ts +177 -0
  273. package/dist/types/components/condition-tree/condition-tree.types.d.ts +323 -0
  274. package/dist/types/components/condition-tree/group-node-view.d.ts +30 -0
  275. package/dist/types/components/condition-tree/leaf-node-view.d.ts +21 -0
  276. package/dist/types/components/rule-editor/rule-editor-mode-view.d.ts +22 -0
  277. package/dist/types/components/rule-editor/rule-editor-modes.d.ts +43 -0
  278. package/dist/types/components/rule-editor/rule-editor.d.ts +129 -5
  279. package/dist/types/components/rule-editor/rule-editor.types.d.ts +16 -0
  280. package/dist/types/components.d.ts +412 -4
  281. package/dist/types/index.d.ts +2 -0
  282. package/dist/types/interface.d.ts +2 -0
  283. package/package.json +3 -3
  284. package/dist/lime-crm-building-blocks/p-1e83a491.entry.js +0 -1
  285. package/dist/lime-crm-building-blocks/p-73f79d42.entry.js +0 -1
  286. package/dist/lime-crm-building-blocks/p-761deada.entry.js +0 -1
  287. package/dist/lime-crm-building-blocks/p-b8d74591.entry.js +0 -1
  288. package/dist/lime-crm-building-blocks/p-e8a7a94c.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as e,c as r,h as i}from"./p-COtSgrC5.js";const t=class{constructor(i){e(this,i),this.changeStartTime=r(this,"changeStartTime"),this.changeEndTime=r(this,"changeEndTime"),this.handleStartTimeChange=e=>{e.stopPropagation(),this.changeStartTime.emit(e.detail)},this.handleEndTimeChange=e=>{e.stopPropagation(),this.changeEndTime.emit(e.detail)}}componentWillLoad(){this.originalStartTime=this.startTime,this.originalEndTime=this.endTime}render(){return i("div",{key:"d413c4c15eb1e8108ac288f66ed00a4beb333b05",class:"date-pickers"},this.renderStartDatePicker(),this.renderEndDatePicker())}renderStartDatePicker(){if(this.originalStartTime)return i("div",{class:"start-time"},this.renderDatePicker(this.startTimeLabel,this.startTime,!this.startTime,this.handleStartTimeChange))}renderEndDatePicker(){if(this.originalEndTime)return i("div",{class:"end-time"},this.renderDatePicker(this.endTimeLabel,this.endTime,!this.endTime,this.handleEndTimeChange))}renderDatePicker(e,r,t,a){const l=this.platform&&i("limebb-date-picker",{platform:this.platform,context:this.context,type:this.type,value:r,onChange:a,invalid:t});return[i("div",{class:"label-group"},i("span",{class:"circle"}),i("span",{class:"label"},e),i("span",{class:"line"})),l||i("limel-date-picker",{type:this.type,value:r,format:this.timeFormat,language:this.language,onChange:a,invalid:t})]}};t.style=":host(limebb-date-range){isolation:isolate;display:block;position:relative}*{box-sizing:border-box}.date-pickers{display:grid;grid-template-columns:repeat(auto-fit, minmax(13.5rem, 1fr));gap:0.5rem;padding:0.75rem 1rem 1.25rem 1rem}.label-group{display:flex;align-items:center;margin-bottom:0.25rem}.end-time .label-group{flex-direction:row-reverse}.label-group .label{font-size:0.75rem;padding:0 0.25rem}.label-group .circle{flex-shrink:0;width:0.5rem;height:0.5rem;border-radius:50%}.start-time .label-group .circle{background-color:rgb(var(--color-green-default))}.end-time .label-group .circle{background-color:rgb(var(--color-coral-default))}.label-group .line{flex-grow:1;height:0.25rem;border-radius:1rem}.start-time .label-group .line{background-image:linear-gradient(to right, rgb(var(--color-green-light)), rgb(var(--contrast-400)) 30%)}.end-time .label-group .line{background-image:linear-gradient(to left, rgb(var(--color-coral-light)), rgb(var(--contrast-400)) 30%)}.date-pickers:has(>:last-child:nth-child(2)) .start-time .line{margin-right:-0.5rem}.date-pickers:has(>:last-child:nth-child(2)) .end-time .line{margin-left:-0.5rem}";export{t as limebb_date_range}
1
+ import{r as e,c as r,h as i}from"./p-COtSgrC5.js";const t=class{constructor(i){e(this,i),this.changeStartTime=r(this,"changeStartTime"),this.changeEndTime=r(this,"changeEndTime"),this.handleStartTimeChange=e=>{e.stopPropagation(),this.changeStartTime.emit(e.detail)},this.handleEndTimeChange=e=>{e.stopPropagation(),this.changeEndTime.emit(e.detail)}}componentWillLoad(){this.originalStartTime=this.startTime,this.originalEndTime=this.endTime}render(){return i("div",{key:"164c0dd19a89356dcd9186768033d7974006dcb5",class:"date-pickers"},this.renderStartDatePicker(),this.renderEndDatePicker())}renderStartDatePicker(){if(this.originalStartTime)return i("div",{class:"start-time"},this.renderDatePicker(this.startTimeLabel,this.startTime,!this.startTime,this.handleStartTimeChange))}renderEndDatePicker(){if(this.originalEndTime)return i("div",{class:"end-time"},this.renderDatePicker(this.endTimeLabel,this.endTime,!this.endTime,this.handleEndTimeChange))}renderDatePicker(e,r,t,a){const l=this.platform&&i("limebb-date-picker",{platform:this.platform,context:this.context,type:this.type,value:r,onChange:a,invalid:t});return[i("div",{class:"label-group"},i("span",{class:"circle"}),i("span",{class:"label"},e),i("span",{class:"line"})),l||i("limel-date-picker",{type:this.type,value:r,format:this.timeFormat,language:this.language,onChange:a,invalid:t})]}};t.style=":host(limebb-date-range){isolation:isolate;display:block;position:relative}*{box-sizing:border-box}.date-pickers{display:grid;grid-template-columns:repeat(auto-fit, minmax(13.5rem, 1fr));gap:0.5rem;padding:0.75rem 1rem 1.25rem 1rem}.label-group{display:flex;align-items:center;margin-bottom:0.25rem}.end-time .label-group{flex-direction:row-reverse}.label-group .label{font-size:0.75rem;padding:0 0.25rem}.label-group .circle{flex-shrink:0;width:0.5rem;height:0.5rem;border-radius:50%}.start-time .label-group .circle{background-color:rgb(var(--color-green-default))}.end-time .label-group .circle{background-color:rgb(var(--color-coral-default))}.label-group .line{flex-grow:1;height:0.25rem;border-radius:1rem}.start-time .label-group .line{background-image:linear-gradient(to right, rgb(var(--color-green-light)), rgb(var(--contrast-400)) 30%)}.end-time .label-group .line{background-image:linear-gradient(to left, rgb(var(--color-coral-light)), rgb(var(--contrast-400)) 30%)}.date-pickers:has(>:last-child:nth-child(2)) .start-time .line{margin-right:-0.5rem}.date-pickers:has(>:last-child:nth-child(2)) .end-time .line{margin-left:-0.5rem}";export{t as limebb_date_range}
@@ -0,0 +1,47 @@
1
+ import { ConditionTreeCombinator } from './condition-tree.types';
2
+ /**
3
+ * Every combinator a group can use, in the order they are offered.
4
+ *
5
+ * @public
6
+ */
7
+ export declare const CONDITION_TREE_COMBINATORS: readonly ConditionTreeCombinator[];
8
+ /**
9
+ * The combinator to give a group nested inside one joined by `combinator`.
10
+ *
11
+ * The opposite join is the useful default: a group joined the same way as the
12
+ * one holding it says nothing the outer group does not already say. The
13
+ * negation is dropped with it, since a nested group has nothing to negate yet.
14
+ * @param combinator
15
+ */
16
+ export declare function oppositeCombinator(combinator: ConditionTreeCombinator): ConditionTreeCombinator;
17
+ interface CombinatorPresentation {
18
+ /**
19
+ * Color of the group's rail and of the separators between its rows. Kept as
20
+ * a literal CSS expression rather than a component-scoped custom property
21
+ * because it also has to reach the combinator dropdown, which renders
22
+ * through `limel-portal` and therefore outside this component's styles.
23
+ */
24
+ color: string;
25
+ iconName: string;
26
+ labelKey: string;
27
+ label: string;
28
+ descriptionKey: string;
29
+ description: string;
30
+ /**
31
+ * Whether the combinator is the negation of its conjunction, which decides
32
+ * both the marker prefix between rows and how a consumer unfolds it.
33
+ */
34
+ negated: boolean;
35
+ /**
36
+ * Which of the two shared delimiters marks the joins between rows.
37
+ */
38
+ delimiterKey: string;
39
+ delimiter: string;
40
+ }
41
+ /**
42
+ * How each combinator looks and reads. The labels are fallbacks used when the
43
+ * platform has no translation for the key next to them.
44
+ */
45
+ export declare const COMBINATOR_PRESENTATION: Record<ConditionTreeCombinator, CombinatorPresentation>;
46
+ export {};
47
+ //# sourceMappingURL=condition-tree-combinators.d.ts.map
@@ -0,0 +1,84 @@
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
+ import { ComponentDescriptor, LimeWebComponentContext, LimeWebComponentPlatform } from '@limetech/lime-web-components';
3
+ /**
4
+ * The body of a condition's editor popover: the consumer's editor, and — for a
5
+ * condition that cannot express its own negation — a switch that negates it.
6
+ *
7
+ * It is an element of its own rather than markup inside the tree because
8
+ * `limel-popover` portals its content out of the tree's shadow DOM, leaving it
9
+ * behind. Carrying its own shadow root means its styles travel with it.
10
+ *
11
+ * @private
12
+ */
13
+ export declare class ConditionTreeEditor {
14
+ /**
15
+ * Platform service provider
16
+ */
17
+ platform: LimeWebComponentPlatform;
18
+ /**
19
+ * Bridges the tree's context across the `limel-popover` portal.
20
+ */
21
+ context: LimeWebComponentContext;
22
+ /**
23
+ * Whether the popover holding this element is open.
24
+ *
25
+ * The element itself stays in place while closed, because `limel-popover`
26
+ * moves its content into the popover surface once and for all when that
27
+ * surface first loads — anything not there by then is never moved. Drawing
28
+ * nothing until asked is what keeps the consumer's editor from being built
29
+ * for every condition in the tree.
30
+ */
31
+ open: boolean;
32
+ /**
33
+ * The editor to mount, as given on the condition.
34
+ */
35
+ editor?: ComponentDescriptor;
36
+ /**
37
+ * The condition being edited, in the consumer's own model. Handed to the
38
+ * mounted editor as `value`.
39
+ */
40
+ value?: any;
41
+ /**
42
+ * Title of the condition, shown above the editor when there is a header to
43
+ * show at all.
44
+ */
45
+ heading?: string;
46
+ /**
47
+ * Whether the condition is negated. `undefined` means the condition
48
+ * expresses its own polarity and no switch is offered.
49
+ */
50
+ negated?: boolean;
51
+ /**
52
+ * @inheritdoc
53
+ */
54
+ readonly: boolean;
55
+ /**
56
+ * @inheritdoc
57
+ */
58
+ disabled: boolean;
59
+ /**
60
+ * Emitted when the user toggles the negation switch.
61
+ */
62
+ negateChange: EventEmitter<boolean>;
63
+ /**
64
+ * Emitted with the replacement condition when the mounted editor reports
65
+ * one.
66
+ *
67
+ * `limel-popover` portals this element out of the tree's shadow DOM, so an
68
+ * event from the editor never reaches the tree on its own. Catching it here
69
+ * and emitting it again is what carries it back across.
70
+ */
71
+ conditionChange: EventEmitter<any>;
72
+ render(): any[] | null;
73
+ /**
74
+ * The header exists only to hold the negation switch, so a condition that
75
+ * owns its polarity gets no header at all — its editor is the whole
76
+ * popover, exactly as if this element weren't here.
77
+ */
78
+ private renderHeader;
79
+ private renderBody;
80
+ private get negateLabel();
81
+ private handleNegate;
82
+ private handleConditionChange;
83
+ }
84
+ //# sourceMappingURL=condition-tree-editor.d.ts.map
@@ -0,0 +1,130 @@
1
+ import { ConditionTreeAdapter, ConditionTreeCombinator, ConditionTreeDescription, ConditionTreeGroupDescription } from './condition-tree.types';
2
+ /**
3
+ * The address of a node in the tree: the index of each step down from the root.
4
+ *
5
+ * The root itself is the empty path. `[1, 0]` is the first child of the second
6
+ * child of the root. Paths never leave the component — a consumer addresses its
7
+ * own tree by holding on to its own nodes — but the recursive render needs a
8
+ * way to say which node a control belongs to, and this is it.
9
+ */
10
+ export type ConditionTreePath = number[];
11
+ /**
12
+ * A stable string form of a path, for `key` attributes and for comparing two
13
+ * paths without an element-by-element loop at every call site.
14
+ * @param path
15
+ */
16
+ export declare function pathKey(path: ConditionTreePath): string;
17
+ /**
18
+ * Reads and rebuilds a consumer's tree through its adapter.
19
+ *
20
+ * Walking down goes through `describe`, so the tree never has to know how a
21
+ * consumer nests its nodes. Rebuilding goes up through `group`, and only groups
22
+ * are rebuilt: a condition is moved as the object it already is.
23
+ */
24
+ export declare class ConditionTreeWalker<T> {
25
+ private adapter;
26
+ private isVisited;
27
+ /**
28
+ * @param adapter
29
+ * @param isVisited - Whether the user has opened and closed a node's
30
+ * editor. Read through a function rather than taken as a set, so that the
31
+ * walker outlives the tree's tally growing.
32
+ */
33
+ constructor(adapter: ConditionTreeAdapter<T>, isVisited?: (node: T) => boolean);
34
+ /**
35
+ * What the tree should draw for `node`.
36
+ * @param node
37
+ */
38
+ describe(node: T): ConditionTreeDescription<T>;
39
+ /**
40
+ * How `node` reads as a group, or `undefined` when it is a single
41
+ * condition rather than a group of them.
42
+ * @param node
43
+ */
44
+ groupOf(node: T): ConditionTreeGroupDescription<T> | undefined;
45
+ /**
46
+ * The children of a group, or `undefined` for a single condition.
47
+ * @param node
48
+ */
49
+ childrenOf(node: T): T[] | undefined;
50
+ /**
51
+ * The node at `path`, or `undefined` when the path leads nowhere — which
52
+ * happens routinely when the consumer replaces the tree while an editor is
53
+ * open.
54
+ * @param root
55
+ * @param path
56
+ */
57
+ nodeAt(root: T | undefined, path: ConditionTreePath): T | undefined;
58
+ /**
59
+ * The group at `path`, or `undefined` when the path leads nowhere or to a
60
+ * condition. Every caller that wants to look inside a group first has to
61
+ * find it and then find out whether it is one, so both steps live here.
62
+ * @param root
63
+ * @param path
64
+ */
65
+ groupAt(root: T | undefined, path: ConditionTreePath): ConditionTreeGroupDescription<T> | undefined;
66
+ /**
67
+ * Whether `node` is still somewhere in the tree, by identity.
68
+ *
69
+ * Identity rather than equality: a condition the tree did not touch is the
70
+ * very object the consumer handed over, so one that merely looks the same
71
+ * is a different condition.
72
+ * @param root
73
+ * @param node
74
+ */
75
+ contains(root: T | undefined, node: T): boolean;
76
+ /**
77
+ * Every condition asking to be opened, in display order.
78
+ *
79
+ * All of them rather than the first, because a consumer that leaves the
80
+ * flag on a condition it has already added would otherwise keep pointing at
81
+ * that one, and the next condition added would never get its turn.
82
+ * @param root
83
+ */
84
+ autoOpenNodes(root: T | undefined): T[];
85
+ /**
86
+ * The tree with the node at `path` replaced by `next`, or removed when
87
+ * `next` is `undefined`.
88
+ * @param root
89
+ * @param path
90
+ * @param next
91
+ */
92
+ replaceAt(root: T, path: ConditionTreePath, next: T | undefined): T | undefined;
93
+ /**
94
+ * The tree with `child` added to the end of the group at `path`. A path
95
+ * leading to a condition rather than a group leaves the tree alone: there
96
+ * is nothing there to add to.
97
+ * @param root
98
+ * @param path
99
+ * @param child
100
+ */
101
+ appendAt(root: T, path: ConditionTreePath, child: T): T | undefined;
102
+ /**
103
+ * The tree with the group at `path` joined by `combinator` instead, and
104
+ * what is inside it left alone. A path leading anywhere but a group leaves
105
+ * the tree as it was.
106
+ * @param root
107
+ * @param path
108
+ * @param combinator
109
+ */
110
+ rejoinAt(root: T, path: ConditionTreePath, combinator: ConditionTreeCombinator): T | undefined;
111
+ /**
112
+ * The tree with the condition at `path` negated, or not.
113
+ *
114
+ * An adapter with no way to rebuild a negated condition leaves the tree
115
+ * alone: it has already told the tree not to offer the control.
116
+ * @param root
117
+ * @param path
118
+ * @param negated
119
+ */
120
+ negateAt(root: T, path: ConditionTreePath, negated: boolean): T | undefined;
121
+ /**
122
+ * A group holding `children`, or nothing at all when there are none left: a
123
+ * group with nothing in it says nothing, so it goes the way of its last
124
+ * condition — and so, in turn, does the group that held it.
125
+ * @param combinator
126
+ * @param children
127
+ */
128
+ private rebuild;
129
+ }
130
+ //# sourceMappingURL=condition-tree-nodes.d.ts.map
@@ -0,0 +1,76 @@
1
+ import { ConditionTreeWalker } from './condition-tree-nodes';
2
+ /**
3
+ * Which condition's editor is open, and what the tree remembers about the user
4
+ * having been there.
5
+ *
6
+ * All of it is held by condition rather than by place in the tree, so that it
7
+ * survives the tree being rearranged around it.
8
+ *
9
+ * Every method returns a new state rather than changing this one, because
10
+ * `limebb-condition-tree` keeps it in `@State` and Stencil redraws on a new
11
+ * reference, not on a changed field.
12
+ */
13
+ export declare class ConditionTreeOpenState {
14
+ private readonly fields;
15
+ private constructor();
16
+ static empty(): ConditionTreeOpenState;
17
+ get openNode(): unknown;
18
+ /**
19
+ * Whether the user has opened this condition's editor and closed it again.
20
+ * @param node
21
+ */
22
+ hasSeen(node: unknown): boolean;
23
+ /**
24
+ * The open editor moved onto `next`, or onto nothing at all, remembering
25
+ * the condition left behind — the moment the user is done with it for now,
26
+ * and the earliest anything can fairly judge it. Losing a condition because
27
+ * it went away is not the user leaving it: see `dropIfGone`.
28
+ * @param next
29
+ */
30
+ moveTo(next: unknown): ConditionTreeOpenState;
31
+ /**
32
+ * The same state, now waiting for `next` — the condition an editor just
33
+ * reported — to turn up in a tree from the consumer.
34
+ * @param next
35
+ */
36
+ expect(next: unknown): ConditionTreeOpenState;
37
+ /**
38
+ * The state brought up to date with a tree the consumer has just handed
39
+ * over: follow the condition that replaced the one being edited, open
40
+ * whatever is asking to be opened, and let go of a condition that is no
41
+ * longer there.
42
+ * @param root
43
+ * @param walker
44
+ */
45
+ sync(root: unknown, walker: ConditionTreeWalker<any>): ConditionTreeOpenState;
46
+ private with;
47
+ /**
48
+ * Move the editor onto the replacement, once the consumer has sent a tree
49
+ * holding it. One that reports the edit elsewhere, or normalizes the
50
+ * condition on the way through, never sends it back at all — the editor
51
+ * then stays where it is, and `dropIfGone` settles it if that has gone too.
52
+ * @param root
53
+ * @param walker
54
+ */
55
+ private followPending;
56
+ /**
57
+ * Open the condition that is asking for it and has not had its turn yet.
58
+ *
59
+ * A consumer is free to leave the flag on conditions it added earlier, so
60
+ * what settles this is not the flag alone but whether that condition has
61
+ * already been opened once. Conditions that stop asking are forgotten
62
+ * again, so one that is removed and put back opens anew.
63
+ * @param root
64
+ * @param walker
65
+ */
66
+ private openWhatAsks;
67
+ /**
68
+ * Let go of the open condition when it is no longer there — the user
69
+ * removed it, or the consumer replaced the tree under it. That is not the
70
+ * user finishing with it, so it does not count as having been seen.
71
+ * @param root
72
+ * @param walker
73
+ */
74
+ private dropIfGone;
75
+ }
76
+ //# sourceMappingURL=condition-tree-open-state.d.ts.map
@@ -0,0 +1,11 @@
1
+ import { LimeWebComponentPlatform } from '@limetech/lime-web-components';
2
+ /**
3
+ * A translate function that falls back to the given English wording when the
4
+ * platform is absent or has no translation for the key.
5
+ *
6
+ * The tree is presentational and is rendered in docs and tests without a fully
7
+ * loaded platform, so it must read sensibly either way.
8
+ * @param platform
9
+ */
10
+ export declare function createTranslator(platform?: LimeWebComponentPlatform): (key: string, fallback: string) => string;
11
+ //# sourceMappingURL=condition-tree-translate.d.ts.map
@@ -0,0 +1,48 @@
1
+ import { FunctionalComponent } from '../../stencil-public-runtime';
2
+ import { ListSeparator, MenuItem } from '@limetech/lime-elements';
3
+ import { LimeWebComponentContext, LimeWebComponentPlatform } from '@limetech/lime-web-components';
4
+ import { ConditionTreeCombinator } from './condition-tree.types';
5
+ import { ConditionTreePath, ConditionTreeWalker } from './condition-tree-nodes';
6
+ /**
7
+ * State and callbacks the tree passes down through its recursive render. Built
8
+ * once per render in `limebb-condition-tree`'s `render()`, and forwarded
9
+ * unchanged by every view.
10
+ *
11
+ * This module holds what both kinds of view need and imports neither of them,
12
+ * so that the recursion — a group drawing groups — runs one way down the import
13
+ * graph rather than back and forth across it.
14
+ */
15
+ export interface ConditionTreeRenderContext {
16
+ platform: LimeWebComponentPlatform;
17
+ context: LimeWebComponentContext;
18
+ walker: ConditionTreeWalker<any>;
19
+ translate: (key: string, fallback: string) => string;
20
+ combinators: ConditionTreeCombinator[];
21
+ readonly: boolean;
22
+ disabled: boolean;
23
+ negatable: boolean;
24
+ openNode: unknown;
25
+ addOptions?: Array<MenuItem | ListSeparator>;
26
+ onAddLeaf: (path: ConditionTreePath, item?: MenuItem) => void;
27
+ onAddGroup: (path: ConditionTreePath) => void;
28
+ onDelete: (path: ConditionTreePath) => void;
29
+ onCombinator: (path: ConditionTreePath, combinator: ConditionTreeCombinator) => void;
30
+ onNegate: (path: ConditionTreePath, negated: boolean) => void;
31
+ onConditionChange: (path: ConditionTreePath, next: unknown) => void;
32
+ onOpen: (node: unknown) => void;
33
+ }
34
+ /**
35
+ * Problems reported on a node, listed beneath it.
36
+ * @param props
37
+ */
38
+ export declare const IssuesView: FunctionalComponent<{
39
+ issues?: string[];
40
+ }>;
41
+ /**
42
+ * Throwing a node away. Shared because both kinds offer it: a group through
43
+ * the button in its header, a condition through the cross on its chip.
44
+ * @param path
45
+ * @param ctx
46
+ */
47
+ export declare const handleDelete: (path: ConditionTreePath, ctx: ConditionTreeRenderContext) => (event: Event) => void;
48
+ //# sourceMappingURL=condition-tree-view-context.d.ts.map
@@ -0,0 +1,177 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ import { LimeWebComponent, LimeWebComponentContext, LimeWebComponentPlatform } from '@limetech/lime-web-components';
3
+ import { ConditionTreeAdapter, ConditionTreeCombinator } from './condition-tree.types';
4
+ import { ListSeparator, MenuItem } from '@limetech/lime-elements';
5
+ /**
6
+ * The shared skeleton for editing a tree of conditions: nested groups joined by
7
+ * "All of the following" or "Any of the following", or the negations of those
8
+ * two, each holding conditions shown as chips, with the buttons that add,
9
+ * remove and regroup them.
10
+ *
11
+ * This component is deliberately ignorant of what a condition *is*.
12
+ *
13
+ * A condition is visualized as a chip, plus the tag name of an editor to open.
14
+ * So the same skeleton serves a condition that tests a property ("Deal value is
15
+ * greater than 100 000") and one that is opaque ("User is a member of a group")
16
+ * without either model leaking into it.
17
+ *
18
+ * It holds no tree of its own either. The consumer passes in its own tree, and
19
+ * an adapter that reads one node and rebuilds one group. Every structural edit
20
+ * — add, delete, regroup, rejoin, negate — is applied here and handed back as a
21
+ * tree of the same kind, so no consumer has to write that code twice.
22
+ *
23
+ * @exampleComponent limebb-example-condition-tree-basic
24
+ * @exampleComponent limebb-example-condition-tree-combinators
25
+ * @exampleComponent limebb-example-condition-tree-editors
26
+ * @exampleComponent limebb-example-condition-tree-palette
27
+ *
28
+ * @beta
29
+ */
30
+ export declare class ConditionTree implements LimeWebComponent {
31
+ /**
32
+ * Platform service provider
33
+ */
34
+ platform: LimeWebComponentPlatform;
35
+ /**
36
+ * Component context, forwarded to each condition's editor.
37
+ */
38
+ context: LimeWebComponentContext;
39
+ /**
40
+ * The consumer's own tree, rendered as-is — the root node, in whatever
41
+ * shape `adapter` reads. Leave it unset for a tree with nothing in it yet,
42
+ * which draws an empty group asking for its first condition.
43
+ */
44
+ value?: any;
45
+ /**
46
+ * How to read and rebuild `value`. Build it once and hold on to it: one
47
+ * built inside a consumer's `render()` is a new object every time, which
48
+ * makes this component re-render for no reason.
49
+ *
50
+ * A Stencil element cannot be generic, so this is typed loosely here.
51
+ * Declare the adapter as `ConditionTreeAdapter<YourNode>` where you write
52
+ * it, and the compiler checks it against your own model.
53
+ */
54
+ adapter: ConditionTreeAdapter<any>;
55
+ /**
56
+ * Which combinators to offer in the group dropdowns, in the order given.
57
+ *
58
+ * All four are offered by default. "Not all of the following" and "None of
59
+ * the following" are harder to reason about than the two they negate, so a
60
+ * consumer whose users would be better served without them passes
61
+ * `['all', 'any']`. A group that already uses a combinator left off this
62
+ * list still shows it, rather than misrepresenting itself as using one of
63
+ * the offered ones.
64
+ */
65
+ combinators: ConditionTreeCombinator[];
66
+ /**
67
+ * The kinds of condition a user can add, offered as a menu when the add
68
+ * button is pressed. The chosen item is passed to `adapter.createLeaf`.
69
+ *
70
+ * Leave it unset when every condition in the tree is of the same kind:
71
+ * a blank one can simply be inserted, and its editor settles the rest, so
72
+ * pressing the button is the whole interaction. Set it when conditions come
73
+ * in kinds that have nothing in common — "the deal is worth more than
74
+ * 100 000", "the user belongs to a group", "it is the first day of the
75
+ * month" — where nothing can be inserted until the user says which.
76
+ *
77
+ * The menu has to be rendered here rather than by the consumer, because
78
+ * the button it hangs from lives inside this component.
79
+ */
80
+ addOptions?: Array<MenuItem | ListSeparator>;
81
+ /**
82
+ * Set to `true` when the tree is not the viewer's to change: the add,
83
+ * delete and negate controls are not rendered at all, leaving the
84
+ * conditions to be read. Use it where the tree is being shown rather than
85
+ * edited — a saved filter summarized on a card, or a rule the viewer has
86
+ * no rights over.
87
+ */
88
+ readonly: boolean;
89
+ /**
90
+ * Set to `true` when the tree *is* the viewer's to change, but not at this
91
+ * moment: every control stays where it is, dimmed and inert. Use it for a
92
+ * state that will pass — a form mid-save, or a tree behind an "Apply a
93
+ * filter" switch that is currently off.
94
+ */
95
+ disabled: boolean;
96
+ /**
97
+ * Emitted with the whole tree, of the consumer's own kind, whenever the
98
+ * user changes it. `null` means the last condition went and there is
99
+ * nothing left — an event carries no detail otherwise.
100
+ */
101
+ change: EventEmitter<any>;
102
+ /**
103
+ * Which editor is open, and what the user has already been through — see
104
+ * `condition-tree-open-state.ts`.
105
+ */
106
+ private openState;
107
+ private walker;
108
+ componentWillLoad(): void;
109
+ protected buildWalker(): void;
110
+ /**
111
+ * Nothing can be read out of a tree until there is an adapter to read it
112
+ * with, so a tree that arrives first waits here. `buildWalker` catches it
113
+ * up when the adapter turns up.
114
+ */
115
+ protected syncOpenState(): void;
116
+ render(): any;
117
+ /**
118
+ * The empty tree is drawn as the group it is about to become, rather than
119
+ * as a lone button: every condition here ends up inside a group, so the
120
+ * first one lands in a frame that was already on screen instead of
121
+ * conjuring one around itself. It can be filled either way round, with a
122
+ * condition or with a nested group.
123
+ */
124
+ private renderEmptyState;
125
+ private renderContext;
126
+ private addLeaf;
127
+ /**
128
+ * A nested group is joined the other way round from the one holding it: a
129
+ * group joined the same way as its parent would say nothing the parent does
130
+ * not already say.
131
+ * @param path
132
+ */
133
+ private addGroup;
134
+ /**
135
+ * What a new group starts with: one blank condition, so that a group is
136
+ * never handed over saying nothing — the same rule by which a group emptied
137
+ * of its last condition is dropped rather than kept. A consumer offering a
138
+ * menu of kinds is the exception, since the tree cannot know which kind to
139
+ * make.
140
+ */
141
+ private newGroupChildren;
142
+ /**
143
+ * Add a condition, or a group to put conditions in.
144
+ *
145
+ * Everything in this tree lives inside a group, so the first thing added
146
+ * to an empty one gets a root group to live in. After that the walker
147
+ * places it.
148
+ * @param path
149
+ * @param child
150
+ */
151
+ private grow;
152
+ /**
153
+ * An empty tree has nothing to edit.
154
+ * @param edit
155
+ */
156
+ private applyEdit;
157
+ /**
158
+ * Announce a tree the user has changed — unless it was not theirs to
159
+ * change. Every control is hidden or dimmed by then, so what this catches
160
+ * is an editor: the tree mounts whatever component a condition names, and
161
+ * has no way to make it honour the `readonly` it was handed.
162
+ * @param next
163
+ */
164
+ private emitChange;
165
+ /**
166
+ * Whether there is no tree yet — which is not the same as a tree that
167
+ * happens to be an empty group.
168
+ */
169
+ private get isEmpty();
170
+ /**
171
+ * The combinator a group made here is joined by: the first one the consumer
172
+ * offers, so a tree that never offers "All of the following" never invents
173
+ * one.
174
+ */
175
+ private rootCombinator;
176
+ }
177
+ //# sourceMappingURL=condition-tree.d.ts.map