@limetech/lime-crm-building-blocks 1.99.0 → 1.100.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 (106) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
  3. package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +52 -216
  4. package/dist/cjs/{limebb-limetype-field_2.cjs.entry.js → limebb-lime-query-filter-builder_3.cjs.entry.js} +72 -1
  5. package/dist/cjs/limebb-lime-query-filter-comparison_2.cjs.entry.js +1 -1
  6. package/dist/cjs/{limebb-lime-query-filter-group_4.cjs.entry.js → limebb-lime-query-filter-group_3.cjs.entry.js} +5 -231
  7. package/dist/cjs/limebb-live-docs-info.cjs.entry.js +2 -2
  8. package/dist/cjs/limebb-locale-picker.cjs.entry.js +1 -1
  9. package/dist/cjs/limebb-mention-group-counter.cjs.entry.js +2 -2
  10. package/dist/cjs/limebb-navigation-button_2.cjs.entry.js +3 -3
  11. package/dist/cjs/limebb-notification-item.cjs.entry.js +1 -1
  12. package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +2 -2
  13. package/dist/cjs/limebb-property-selector.cjs.entry.js +234 -0
  14. package/dist/cjs/limebb-text-editor.cjs.entry.js +1 -1
  15. package/dist/cjs/limebb-trend-indicator.cjs.entry.js +1 -1
  16. package/dist/cjs/loader.cjs.js +1 -1
  17. package/dist/collection/collection-manifest.json +1 -2
  18. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-builder.css +5 -0
  19. package/dist/collection/components/lime-query-builder/expressions/{lime-query-filter-and.js → lime-query-filter-builder.js} +59 -83
  20. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison.js +1 -1
  21. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-group.js +1 -1
  22. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-not.js +1 -1
  23. package/dist/collection/components/lime-query-builder/expressions/lime-query-value-input.js +7 -7
  24. package/dist/collection/components/lime-query-builder/lime-query-builder.js +9 -39
  25. package/dist/collection/components/lime-query-builder/lime-query-validation.js +46 -19
  26. package/dist/collection/components/lime-query-builder/lime-query.types.js +1 -57
  27. package/dist/collection/components/lime-query-builder/limetype-field/limetype-field.js +1 -1
  28. package/dist/collection/components/limeobject/file-viewer/live-docs-info.js +2 -2
  29. package/dist/collection/components/locale-picker/locale-picker.js +1 -1
  30. package/dist/collection/components/notification-list/notification-item/notification-item.js +1 -1
  31. package/dist/collection/components/percentage-visualizer/percentage-visualizer.js +2 -2
  32. package/dist/collection/components/summary-popover/summary-popover.js +3 -3
  33. package/dist/collection/components/text-editor/mention-group-counter.js +2 -2
  34. package/dist/collection/components/text-editor/text-editor.js +1 -1
  35. package/dist/collection/components/trend-indicator/trend-indicator.js +1 -1
  36. package/dist/components/lime-query-filter-builder.js +129 -0
  37. package/dist/components/lime-query-filter-comparison.js +1 -1
  38. package/dist/components/lime-query-filter-expression.js +2 -2
  39. package/dist/components/lime-query-value-input.js +2 -2
  40. package/dist/components/limebb-lime-query-builder.js +60 -218
  41. package/dist/components/limebb-lime-query-filter-builder.d.ts +11 -0
  42. package/dist/components/limebb-lime-query-filter-builder.js +6 -0
  43. package/dist/components/limebb-locale-picker.js +1 -1
  44. package/dist/components/limebb-mention-group-counter.js +2 -2
  45. package/dist/components/limebb-percentage-visualizer.js +2 -2
  46. package/dist/components/limebb-text-editor.js +1 -1
  47. package/dist/components/limebb-trend-indicator.js +1 -1
  48. package/dist/components/limetype-field.js +1 -1
  49. package/dist/components/live-docs-info.js +2 -2
  50. package/dist/components/notification-item.js +1 -1
  51. package/dist/components/summary-popover.js +3 -3
  52. package/dist/esm/lime-crm-building-blocks.js +1 -1
  53. package/dist/esm/limebb-lime-query-builder.entry.js +53 -217
  54. package/dist/esm/{limebb-limetype-field_2.entry.js → limebb-lime-query-filter-builder_3.entry.js} +73 -3
  55. package/dist/esm/limebb-lime-query-filter-comparison_2.entry.js +1 -1
  56. package/dist/esm/{limebb-lime-query-filter-group_4.entry.js → limebb-lime-query-filter-group_3.entry.js} +7 -232
  57. package/dist/esm/limebb-live-docs-info.entry.js +2 -2
  58. package/dist/esm/limebb-locale-picker.entry.js +1 -1
  59. package/dist/esm/limebb-mention-group-counter.entry.js +2 -2
  60. package/dist/esm/limebb-navigation-button_2.entry.js +3 -3
  61. package/dist/esm/limebb-notification-item.entry.js +1 -1
  62. package/dist/esm/limebb-percentage-visualizer.entry.js +2 -2
  63. package/dist/esm/limebb-property-selector.entry.js +230 -0
  64. package/dist/esm/limebb-text-editor.entry.js +1 -1
  65. package/dist/esm/limebb-trend-indicator.entry.js +1 -1
  66. package/dist/esm/loader.js +1 -1
  67. package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
  68. package/dist/lime-crm-building-blocks/{p-b9b954d9.entry.js → p-1034b4a5.entry.js} +1 -1
  69. package/dist/lime-crm-building-blocks/{p-93cadc1e.entry.js → p-2048ac67.entry.js} +1 -1
  70. package/dist/lime-crm-building-blocks/p-323c49bc.entry.js +1 -0
  71. package/dist/lime-crm-building-blocks/{p-631ca5a5.entry.js → p-58782467.entry.js} +1 -1
  72. package/dist/lime-crm-building-blocks/{p-aa646df7.entry.js → p-6aa216ec.entry.js} +1 -1
  73. package/dist/lime-crm-building-blocks/{p-9cac4de2.entry.js → p-76d81eee.entry.js} +1 -1
  74. package/dist/lime-crm-building-blocks/{p-e8946134.entry.js → p-79b8b09b.entry.js} +1 -1
  75. package/dist/lime-crm-building-blocks/{p-569c86b5.entry.js → p-8581245a.entry.js} +1 -1
  76. package/dist/lime-crm-building-blocks/p-89a6c396.entry.js +1 -0
  77. package/dist/lime-crm-building-blocks/{p-36ea13c0.entry.js → p-8fb2e192.entry.js} +1 -1
  78. package/dist/lime-crm-building-blocks/{p-3122ea05.entry.js → p-b57dafef.entry.js} +1 -1
  79. package/dist/lime-crm-building-blocks/p-f22b66f6.entry.js +1 -0
  80. package/dist/lime-crm-building-blocks/p-f79e354b.entry.js +1 -0
  81. package/dist/types/components/lime-query-builder/expressions/lime-query-filter-builder.d.ts +50 -0
  82. package/dist/types/components/lime-query-builder/expressions/lime-query-value-input.d.ts +2 -3
  83. package/dist/types/components/lime-query-builder/lime-query-builder.d.ts +1 -6
  84. package/dist/types/components/lime-query-builder/lime-query.types.d.ts +0 -72
  85. package/dist/types/components.d.ts +58 -198
  86. package/package.json +1 -1
  87. package/dist/cjs/limebb-lime-query-filter-and.cjs.entry.js +0 -80
  88. package/dist/cjs/limebb-lime-query-filter-or.cjs.entry.js +0 -68
  89. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-and.css +0 -121
  90. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-or.css +0 -123
  91. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-or.js +0 -237
  92. package/dist/collection/components/lime-query-builder/filter-conversion.js +0 -255
  93. package/dist/components/limebb-lime-query-filter-and.d.ts +0 -11
  94. package/dist/components/limebb-lime-query-filter-and.js +0 -135
  95. package/dist/components/limebb-lime-query-filter-or.d.ts +0 -11
  96. package/dist/components/limebb-lime-query-filter-or.js +0 -123
  97. package/dist/esm/limebb-lime-query-filter-and.entry.js +0 -76
  98. package/dist/esm/limebb-lime-query-filter-or.entry.js +0 -64
  99. package/dist/lime-crm-building-blocks/p-03accd53.entry.js +0 -1
  100. package/dist/lime-crm-building-blocks/p-4715210d.entry.js +0 -1
  101. package/dist/lime-crm-building-blocks/p-5f7644b5.entry.js +0 -1
  102. package/dist/lime-crm-building-blocks/p-67dbaa4c.entry.js +0 -1
  103. package/dist/lime-crm-building-blocks/p-91732502.entry.js +0 -1
  104. package/dist/types/components/lime-query-builder/expressions/lime-query-filter-and.d.ts +0 -57
  105. package/dist/types/components/lime-query-builder/expressions/lime-query-filter-or.d.ts +0 -56
  106. package/dist/types/components/lime-query-builder/filter-conversion.d.ts +0 -31
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.100.1](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.100.0...v1.100.1) (2025-11-07)
2
+
3
+ ### Bug Fixes
4
+
5
+
6
+ * **lime-query-builder:** add operator validation ([5abd88c](https://github.com/Lundalogik/lime-crm-building-blocks/commit/5abd88cc8e80ba1a8ccfb845c06ceca9b9fdc2e7))
7
+
8
+ ## [1.100.0](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.99.0...v1.100.0) (2025-11-07)
9
+
10
+ ### Features
11
+
12
+
13
+ * **lime-query-builder:** add filter builder with promotion logic ([8b33ff5](https://github.com/Lundalogik/lime-crm-building-blocks/commit/8b33ff507e196a925a3bb2354f32a86fe03b3621))
14
+
1
15
  ## [1.99.0](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.98.0...v1.99.0) (2025-11-07)
2
16
 
3
17
  ### Features
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy(JSON.parse("[[\"limebb-lime-query-builder.cjs\",[[1,\"limebb-lime-query-builder\",{\"platform\":[16],\"context\":[16],\"value\":[16],\"label\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"limetypes\":[32],\"mode\":[32],\"codeValue\":[32],\"limetype\":[32],\"filter\":[32],\"internalResponseFormat\":[32],\"limit\":[32]}]]],[\"limebb-lime-query-filter-and.cjs\",[[1,\"limebb-lime-query-filter-and\",{\"platform\":[16],\"context\":[16],\"label\":[1],\"limetype\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"expression\":[16]}]]],[\"limebb-lime-query-filter-or.cjs\",[[1,\"limebb-lime-query-filter-or\",{\"platform\":[16],\"context\":[16],\"label\":[1],\"limetype\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"expression\":[16]}]]],[\"limebb-feed.cjs\",[[1,\"limebb-feed\",{\"platform\":[16],\"context\":[16],\"items\":[16],\"emptyStateMessage\":[1,\"empty-state-message\"],\"heading\":[1],\"loading\":[4],\"minutesOfProximity\":[2,\"minutes-of-proximity\"],\"totalCount\":[2,\"total-count\"],\"direction\":[513],\"lastVisitedTimestamp\":[1,\"last-visited-timestamp\"],\"highlightedItemId\":[8,\"highlighted-item-id\"]},null,{\"highlightedItemId\":[\"highlightedItemIdChanged\"]}]]],[\"limebb-kanban.cjs\",[[1,\"limebb-kanban\",{\"platform\":[16],\"context\":[16],\"groups\":[16]}]]],[\"limebb-chat-list.cjs\",[[1,\"limebb-chat-list\",{\"platform\":[16],\"context\":[16],\"items\":[16],\"loading\":[516],\"isTypingIndicatorVisible\":[516,\"is-typing-indicator-visible\"],\"lastVisitedTimestamp\":[513,\"last-visited-timestamp\"],\"order\":[513]},null,{\"items\":[\"handleItemsChange\"]}]]],[\"limebb-limeobject-file-viewer.cjs\",[[1,\"limebb-limeobject-file-viewer\",{\"platform\":[16],\"context\":[16],\"property\":[1],\"fileTypes\":[16],\"limeobject\":[32],\"limetype\":[32]}]]],[\"limebb-text-editor.cjs\",[[1,\"limebb-text-editor\",{\"platform\":[16],\"context\":[16],\"allowMentioning\":[4,\"allow-mentioning\"],\"contentType\":[1,\"content-type\"],\"language\":[513],\"disabled\":[516],\"readonly\":[516],\"helperText\":[513,\"helper-text\"],\"placeholder\":[513],\"label\":[513],\"invalid\":[516],\"required\":[516],\"selectedContext\":[16],\"ui\":[513],\"allowResize\":[4,\"allow-resize\"],\"value\":[1],\"draftIdentifier\":[1,\"draft-identifier\"],\"triggerMap\":[16],\"customElements\":[16],\"allowInlineImages\":[4,\"allow-inline-images\"],\"items\":[32],\"highlightedItemIndex\":[32],\"editorPickerQuery\":[32],\"searchableLimetypes\":[32],\"isPickerOpen\":[32],\"isSearching\":[32]},null,{\"isPickerOpen\":[\"watchOpen\"],\"editorPickerQuery\":[\"watchQuery\"]}]]],[\"limebb-date-range.cjs\",[[1,\"limebb-date-range\",{\"platform\":[16],\"context\":[16],\"startTime\":[16],\"endTime\":[16],\"startTimeLabel\":[1,\"start-time-label\"],\"endTimeLabel\":[1,\"end-time-label\"],\"language\":[1],\"timeFormat\":[1,\"time-format\"],\"type\":[1]}]]],[\"limebb-document-picker.cjs\",[[1,\"limebb-document-picker\",{\"platform\":[16],\"context\":[16],\"items\":[16],\"label\":[513],\"helperText\":[513,\"helper-text\"],\"invalid\":[516],\"required\":[516],\"type\":[513]}]]],[\"limebb-info-tile-currency-format.cjs\",[[1,\"limebb-info-tile-currency-format\",{\"platform\":[16],\"context\":[16],\"value\":[16]}]]],[\"limebb-notification-list.cjs\",[[1,\"limebb-notification-list\",{\"platform\":[16],\"context\":[16],\"items\":[16],\"loading\":[4],\"lastVisitedTimestamp\":[1,\"last-visited-timestamp\"]},null,{\"items\":[\"handleItemsChange\"]}]]],[\"limebb-browser.cjs\",[[17,\"limebb-browser\",{\"platform\":[16],\"context\":[16],\"items\":[16],\"layout\":[1],\"filter\":[32]}]]],[\"limebb-component-config.cjs\",[[1,\"limebb-component-config\",{\"platform\":[16],\"context\":[16],\"value\":[16],\"required\":[4],\"readonly\":[4],\"disabled\":[4],\"label\":[1],\"helperText\":[1,\"helper-text\"],\"formInfo\":[16],\"type\":[1],\"nameField\":[1,\"name-field\"],\"configComponent\":[32],\"configViewType\":[32]},null,{\"formInfo\":[\"watchFormInfo\"],\"configComponent\":[\"watchconfigComponent\"]}]]],[\"limebb-component-picker.cjs\",[[1,\"limebb-component-picker\",{\"platform\":[16],\"context\":[16],\"type\":[1],\"tags\":[16],\"value\":[1],\"copyLabel\":[1,\"copy-label\"],\"hideCopyButton\":[4,\"hide-copy-button\"],\"required\":[4],\"readonly\":[4],\"disabled\":[4],\"label\":[1],\"helperText\":[1,\"helper-text\"]}]]],[\"limebb-dashboard-widget.cjs\",[[1,\"limebb-dashboard-widget\",{\"heading\":[513],\"subheading\":[513],\"supportingText\":[513,\"supporting-text\"],\"icon\":[513]}]]],[\"limebb-icon-picker.cjs\",[[1,\"limebb-icon-picker\",{\"value\":[1],\"required\":[4],\"readonly\":[4],\"invalid\":[4],\"disabled\":[4],\"label\":[1],\"helperText\":[1,\"helper-text\"]}]]],[\"limebb-info-tile.cjs\",[[1,\"limebb-info-tile\",{\"platform\":[16],\"context\":[16],\"filterId\":[513,\"filter-id\"],\"disabled\":[4],\"icon\":[513],\"label\":[1],\"prefix\":[1],\"suffix\":[1],\"propertyName\":[1,\"property-name\"],\"aggregateOperator\":[1,\"aggregate-operator\"],\"format\":[16],\"config\":[32],\"filters\":[32],\"value\":[32],\"loading\":[32],\"error\":[32]},null,{\"filterId\":[\"watchFilterId\"],\"propertyName\":[\"watchPropertyName\"],\"aggregateOperator\":[\"watchAggregateOperator\"]}]]],[\"limebb-info-tile-date-format.cjs\",[[1,\"limebb-info-tile-date-format\",{\"value\":[16]}]]],[\"limebb-info-tile-decimal-format.cjs\",[[1,\"limebb-info-tile-decimal-format\",{\"value\":[16]}]]],[\"limebb-info-tile-format.cjs\",[[1,\"limebb-info-tile-format\",{\"platform\":[16],\"context\":[16],\"type\":[1],\"value\":[16]}]]],[\"limebb-info-tile-relative-date-format.cjs\",[[1,\"limebb-info-tile-relative-date-format\",{\"value\":[16]}]]],[\"limebb-info-tile-unit-format.cjs\",[[1,\"limebb-info-tile-unit-format\",{\"value\":[16]}]]],[\"limebb-loader.cjs\",[[1,\"limebb-loader\",{\"platform\":[16],\"context\":[16]}]]],[\"limebb-locale-picker.cjs\",[[1,\"limebb-locale-picker\",{\"platform\":[16],\"context\":[16],\"value\":[1],\"required\":[4],\"disabled\":[4],\"label\":[1],\"helperText\":[1,\"helper-text\"],\"readonly\":[4],\"multipleChoice\":[4,\"multiple-choice\"],\"allLanguages\":[32]}]]],[\"limebb-mention.cjs\",[[1,\"limebb-mention\",{\"limetype\":[1],\"objectid\":[2],\"limeobject\":[32]}]]],[\"limebb-mention-group-counter.cjs\",[[1,\"limebb-mention-group-counter\",{\"count\":[2],\"limetype\":[16],\"helperLabel\":[1,\"helper-label\"]}]]],[\"limebb-percentage-visualizer.cjs\",[[1,\"limebb-percentage-visualizer\",{\"platform\":[16],\"context\":[16],\"value\":[520],\"rangeMax\":[514,\"range-max\"],\"rangeMin\":[514,\"range-min\"],\"multiplier\":[514],\"label\":[513],\"invalid\":[516],\"required\":[516],\"helperText\":[513,\"helper-text\"],\"reducePresence\":[516,\"reduce-presence\"],\"displayPercentageColors\":[516,\"display-percentage-colors\"]},null,{\"value\":[\"valueChanged\"]}]]],[\"limebb-trend-indicator.cjs\",[[1,\"limebb-trend-indicator\",{\"platform\":[16],\"context\":[16],\"value\":[520],\"formerValue\":[514,\"former-value\"],\"suffix\":[513],\"label\":[513],\"invalid\":[516],\"required\":[516],\"helperText\":[513,\"helper-text\"],\"reducePresence\":[516,\"reduce-presence\"]},null,{\"value\":[\"valueChanged\"]}]]],[\"limebb-feed-item-thumbnail-file-info.cjs\",[[1,\"limebb-feed-item-thumbnail-file-info\",{\"description\":[1]}]]],[\"limebb-feed-timeline-item.cjs\",[[1,\"limebb-feed-timeline-item\",{\"platform\":[16],\"context\":[16],\"item\":[16],\"ui\":[513],\"helperText\":[1,\"helper-text\"],\"hasError\":[516,\"has-error\"],\"isBundled\":[516,\"is-bundled\"],\"headingCanExpand\":[32],\"isHeadingExpanded\":[32],\"showMore\":[32],\"isTall\":[32]}]]],[\"limebb-kanban-group.cjs\",[[1,\"limebb-kanban-group\",{\"platform\":[16],\"context\":[16],\"identifier\":[1],\"heading\":[513],\"help\":[1],\"items\":[16],\"summary\":[1],\"loading\":[516],\"totalCount\":[514,\"total-count\"]}]]],[\"limebb-empty-state.cjs\",[[1,\"limebb-empty-state\",{\"heading\":[513],\"value\":[513],\"icon\":[16]}]]],[\"limebb-text-editor-picker.cjs\",[[1,\"limebb-text-editor-picker\",{\"items\":[16],\"open\":[516],\"isSearching\":[4,\"is-searching\"],\"emptyMessage\":[1,\"empty-message\"]},null,{\"open\":[\"watchOpen\"]}]]],[\"limebb-currency-picker.cjs\",[[1,\"limebb-currency-picker\",{\"platform\":[16],\"context\":[16],\"label\":[513],\"currencies\":[16],\"helperText\":[513,\"helper-text\"],\"required\":[516],\"readonly\":[516],\"invalid\":[516],\"disabled\":[516],\"value\":[1]}]]],[\"limebb-date-picker.cjs\",[[1,\"limebb-date-picker\",{\"platform\":[16],\"context\":[16],\"disabled\":[516],\"readonly\":[516],\"invalid\":[516],\"label\":[513],\"placeholder\":[513],\"helperText\":[513,\"helper-text\"],\"required\":[516],\"value\":[1],\"type\":[513]}]]],[\"limebb-document-item.cjs\",[[17,\"limebb-document-item\",{\"platform\":[16],\"context\":[16],\"item\":[16],\"type\":[513]}]]],[\"limebb-live-docs-info.cjs\",[[1,\"limebb-live-docs-info\"]]],[\"limebb-notification-item.cjs\",[[1,\"limebb-notification-item\",{\"platform\":[16],\"context\":[16],\"item\":[16]}]]],[\"limebb-limetype-field_2.cjs\",[[1,\"limebb-response-format-editor\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"value\":[16],\"label\":[1],\"items\":[32]}],[0,\"limebb-limetype-field\",{\"platform\":[16],\"context\":[16],\"label\":[513],\"required\":[516],\"readonly\":[516],\"disabled\":[516],\"value\":[513],\"helperText\":[513,\"helper-text\"],\"invalid\":[4],\"limetypes\":[16],\"propertyFields\":[16],\"fieldName\":[1,\"field-name\"],\"formInfo\":[16]}]]],[\"limebb-kanban-item.cjs\",[[1,\"limebb-kanban-item\",{\"platform\":[16],\"context\":[16],\"item\":[16]}]]],[\"limebb-lime-query-filter-group_4.cjs\",[[1,\"limebb-lime-query-value-input\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"propertyPath\":[1,\"property-path\"],\"operator\":[1],\"value\":[8],\"label\":[1],\"limetypes\":[32],\"inputMode\":[32]}],[1,\"limebb-lime-query-filter-group\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"expression\":[16]}],[1,\"limebb-lime-query-filter-not\",{\"platform\":[16],\"context\":[16],\"label\":[1],\"limetype\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"expression\":[16]}],[1,\"limebb-property-selector\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"value\":[1],\"label\":[1],\"required\":[4],\"helperText\":[1,\"helper-text\"],\"limetypes\":[32],\"isOpen\":[32],\"navigationPath\":[32]}]]],[\"limebb-response-format-item.cjs\",[[1,\"limebb-response-format-item\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"item\":[16],\"showAliasInput\":[32],\"showDescriptionInput\":[32]}]]],[\"limebb-chat-item_2.cjs\",[[1,\"limebb-chat-item\",{\"platform\":[16],\"context\":[16],\"item\":[16],\"helperText\":[1,\"helper-text\"],\"hasError\":[516,\"has-error\"]}],[1,\"limebb-typing-indicator\"]]],[\"limebb-navigation-button_2.cjs\",[[1,\"limebb-summary-popover\",{\"triggerDelay\":[514,\"trigger-delay\"],\"heading\":[513],\"subheading\":[513],\"image\":[16],\"icon\":[513],\"value\":[1],\"openDirection\":[513,\"open-direction\"],\"popoverMaxWidth\":[513,\"popover-max-width\"],\"popoverMaxHeight\":[513,\"popover-max-height\"],\"actions\":[16],\"isPopoverOpen\":[32]}],[17,\"limebb-navigation-button\",{\"href\":[513],\"tooltipLabel\":[513,\"tooltip-label\"],\"tooltipHelperLabel\":[513,\"tooltip-helper-label\"],\"type\":[513]}]]],[\"limebb-lime-query-filter-comparison_2.cjs\",[[1,\"limebb-lime-query-filter-expression\",{\"platform\":[16],\"context\":[16],\"label\":[1],\"limetype\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"expression\":[16]}],[1,\"limebb-lime-query-filter-comparison\",{\"platform\":[16],\"context\":[16],\"label\":[1],\"limetype\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"expression\":[16]}]]]]"), options);
22
+ return index.bootstrapLazy(JSON.parse("[[\"limebb-lime-query-builder.cjs\",[[1,\"limebb-lime-query-builder\",{\"platform\":[16],\"context\":[16],\"value\":[16],\"label\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"limetypes\":[32],\"mode\":[32],\"codeValue\":[32],\"limetype\":[32],\"filter\":[32],\"internalResponseFormat\":[32],\"limit\":[32]}]]],[\"limebb-feed.cjs\",[[1,\"limebb-feed\",{\"platform\":[16],\"context\":[16],\"items\":[16],\"emptyStateMessage\":[1,\"empty-state-message\"],\"heading\":[1],\"loading\":[4],\"minutesOfProximity\":[2,\"minutes-of-proximity\"],\"totalCount\":[2,\"total-count\"],\"direction\":[513],\"lastVisitedTimestamp\":[1,\"last-visited-timestamp\"],\"highlightedItemId\":[8,\"highlighted-item-id\"]},null,{\"highlightedItemId\":[\"highlightedItemIdChanged\"]}]]],[\"limebb-kanban.cjs\",[[1,\"limebb-kanban\",{\"platform\":[16],\"context\":[16],\"groups\":[16]}]]],[\"limebb-chat-list.cjs\",[[1,\"limebb-chat-list\",{\"platform\":[16],\"context\":[16],\"items\":[16],\"loading\":[516],\"isTypingIndicatorVisible\":[516,\"is-typing-indicator-visible\"],\"lastVisitedTimestamp\":[513,\"last-visited-timestamp\"],\"order\":[513]},null,{\"items\":[\"handleItemsChange\"]}]]],[\"limebb-limeobject-file-viewer.cjs\",[[1,\"limebb-limeobject-file-viewer\",{\"platform\":[16],\"context\":[16],\"property\":[1],\"fileTypes\":[16],\"limeobject\":[32],\"limetype\":[32]}]]],[\"limebb-text-editor.cjs\",[[1,\"limebb-text-editor\",{\"platform\":[16],\"context\":[16],\"allowMentioning\":[4,\"allow-mentioning\"],\"contentType\":[1,\"content-type\"],\"language\":[513],\"disabled\":[516],\"readonly\":[516],\"helperText\":[513,\"helper-text\"],\"placeholder\":[513],\"label\":[513],\"invalid\":[516],\"required\":[516],\"selectedContext\":[16],\"ui\":[513],\"allowResize\":[4,\"allow-resize\"],\"value\":[1],\"draftIdentifier\":[1,\"draft-identifier\"],\"triggerMap\":[16],\"customElements\":[16],\"allowInlineImages\":[4,\"allow-inline-images\"],\"items\":[32],\"highlightedItemIndex\":[32],\"editorPickerQuery\":[32],\"searchableLimetypes\":[32],\"isPickerOpen\":[32],\"isSearching\":[32]},null,{\"isPickerOpen\":[\"watchOpen\"],\"editorPickerQuery\":[\"watchQuery\"]}]]],[\"limebb-date-range.cjs\",[[1,\"limebb-date-range\",{\"platform\":[16],\"context\":[16],\"startTime\":[16],\"endTime\":[16],\"startTimeLabel\":[1,\"start-time-label\"],\"endTimeLabel\":[1,\"end-time-label\"],\"language\":[1],\"timeFormat\":[1,\"time-format\"],\"type\":[1]}]]],[\"limebb-document-picker.cjs\",[[1,\"limebb-document-picker\",{\"platform\":[16],\"context\":[16],\"items\":[16],\"label\":[513],\"helperText\":[513,\"helper-text\"],\"invalid\":[516],\"required\":[516],\"type\":[513]}]]],[\"limebb-info-tile-currency-format.cjs\",[[1,\"limebb-info-tile-currency-format\",{\"platform\":[16],\"context\":[16],\"value\":[16]}]]],[\"limebb-notification-list.cjs\",[[1,\"limebb-notification-list\",{\"platform\":[16],\"context\":[16],\"items\":[16],\"loading\":[4],\"lastVisitedTimestamp\":[1,\"last-visited-timestamp\"]},null,{\"items\":[\"handleItemsChange\"]}]]],[\"limebb-browser.cjs\",[[17,\"limebb-browser\",{\"platform\":[16],\"context\":[16],\"items\":[16],\"layout\":[1],\"filter\":[32]}]]],[\"limebb-component-config.cjs\",[[1,\"limebb-component-config\",{\"platform\":[16],\"context\":[16],\"value\":[16],\"required\":[4],\"readonly\":[4],\"disabled\":[4],\"label\":[1],\"helperText\":[1,\"helper-text\"],\"formInfo\":[16],\"type\":[1],\"nameField\":[1,\"name-field\"],\"configComponent\":[32],\"configViewType\":[32]},null,{\"formInfo\":[\"watchFormInfo\"],\"configComponent\":[\"watchconfigComponent\"]}]]],[\"limebb-component-picker.cjs\",[[1,\"limebb-component-picker\",{\"platform\":[16],\"context\":[16],\"type\":[1],\"tags\":[16],\"value\":[1],\"copyLabel\":[1,\"copy-label\"],\"hideCopyButton\":[4,\"hide-copy-button\"],\"required\":[4],\"readonly\":[4],\"disabled\":[4],\"label\":[1],\"helperText\":[1,\"helper-text\"]}]]],[\"limebb-dashboard-widget.cjs\",[[1,\"limebb-dashboard-widget\",{\"heading\":[513],\"subheading\":[513],\"supportingText\":[513,\"supporting-text\"],\"icon\":[513]}]]],[\"limebb-icon-picker.cjs\",[[1,\"limebb-icon-picker\",{\"value\":[1],\"required\":[4],\"readonly\":[4],\"invalid\":[4],\"disabled\":[4],\"label\":[1],\"helperText\":[1,\"helper-text\"]}]]],[\"limebb-info-tile.cjs\",[[1,\"limebb-info-tile\",{\"platform\":[16],\"context\":[16],\"filterId\":[513,\"filter-id\"],\"disabled\":[4],\"icon\":[513],\"label\":[1],\"prefix\":[1],\"suffix\":[1],\"propertyName\":[1,\"property-name\"],\"aggregateOperator\":[1,\"aggregate-operator\"],\"format\":[16],\"config\":[32],\"filters\":[32],\"value\":[32],\"loading\":[32],\"error\":[32]},null,{\"filterId\":[\"watchFilterId\"],\"propertyName\":[\"watchPropertyName\"],\"aggregateOperator\":[\"watchAggregateOperator\"]}]]],[\"limebb-info-tile-date-format.cjs\",[[1,\"limebb-info-tile-date-format\",{\"value\":[16]}]]],[\"limebb-info-tile-decimal-format.cjs\",[[1,\"limebb-info-tile-decimal-format\",{\"value\":[16]}]]],[\"limebb-info-tile-format.cjs\",[[1,\"limebb-info-tile-format\",{\"platform\":[16],\"context\":[16],\"type\":[1],\"value\":[16]}]]],[\"limebb-info-tile-relative-date-format.cjs\",[[1,\"limebb-info-tile-relative-date-format\",{\"value\":[16]}]]],[\"limebb-info-tile-unit-format.cjs\",[[1,\"limebb-info-tile-unit-format\",{\"value\":[16]}]]],[\"limebb-loader.cjs\",[[1,\"limebb-loader\",{\"platform\":[16],\"context\":[16]}]]],[\"limebb-locale-picker.cjs\",[[1,\"limebb-locale-picker\",{\"platform\":[16],\"context\":[16],\"value\":[1],\"required\":[4],\"disabled\":[4],\"label\":[1],\"helperText\":[1,\"helper-text\"],\"readonly\":[4],\"multipleChoice\":[4,\"multiple-choice\"],\"allLanguages\":[32]}]]],[\"limebb-mention.cjs\",[[1,\"limebb-mention\",{\"limetype\":[1],\"objectid\":[2],\"limeobject\":[32]}]]],[\"limebb-mention-group-counter.cjs\",[[1,\"limebb-mention-group-counter\",{\"count\":[2],\"limetype\":[16],\"helperLabel\":[1,\"helper-label\"]}]]],[\"limebb-percentage-visualizer.cjs\",[[1,\"limebb-percentage-visualizer\",{\"platform\":[16],\"context\":[16],\"value\":[520],\"rangeMax\":[514,\"range-max\"],\"rangeMin\":[514,\"range-min\"],\"multiplier\":[514],\"label\":[513],\"invalid\":[516],\"required\":[516],\"helperText\":[513,\"helper-text\"],\"reducePresence\":[516,\"reduce-presence\"],\"displayPercentageColors\":[516,\"display-percentage-colors\"]},null,{\"value\":[\"valueChanged\"]}]]],[\"limebb-trend-indicator.cjs\",[[1,\"limebb-trend-indicator\",{\"platform\":[16],\"context\":[16],\"value\":[520],\"formerValue\":[514,\"former-value\"],\"suffix\":[513],\"label\":[513],\"invalid\":[516],\"required\":[516],\"helperText\":[513,\"helper-text\"],\"reducePresence\":[516,\"reduce-presence\"]},null,{\"value\":[\"valueChanged\"]}]]],[\"limebb-feed-timeline-item.cjs\",[[1,\"limebb-feed-timeline-item\",{\"platform\":[16],\"context\":[16],\"item\":[16],\"ui\":[513],\"helperText\":[1,\"helper-text\"],\"hasError\":[516,\"has-error\"],\"isBundled\":[516,\"is-bundled\"],\"headingCanExpand\":[32],\"isHeadingExpanded\":[32],\"showMore\":[32],\"isTall\":[32]}]]],[\"limebb-kanban-group.cjs\",[[1,\"limebb-kanban-group\",{\"platform\":[16],\"context\":[16],\"identifier\":[1],\"heading\":[513],\"help\":[1],\"items\":[16],\"summary\":[1],\"loading\":[516],\"totalCount\":[514,\"total-count\"]}]]],[\"limebb-text-editor-picker.cjs\",[[1,\"limebb-text-editor-picker\",{\"items\":[16],\"open\":[516],\"isSearching\":[4,\"is-searching\"],\"emptyMessage\":[1,\"empty-message\"]},null,{\"open\":[\"watchOpen\"]}]]],[\"limebb-currency-picker.cjs\",[[1,\"limebb-currency-picker\",{\"platform\":[16],\"context\":[16],\"label\":[513],\"currencies\":[16],\"helperText\":[513,\"helper-text\"],\"required\":[516],\"readonly\":[516],\"invalid\":[516],\"disabled\":[516],\"value\":[1]}]]],[\"limebb-date-picker.cjs\",[[1,\"limebb-date-picker\",{\"platform\":[16],\"context\":[16],\"disabled\":[516],\"readonly\":[516],\"invalid\":[516],\"label\":[513],\"placeholder\":[513],\"helperText\":[513,\"helper-text\"],\"required\":[516],\"value\":[1],\"type\":[513]}]]],[\"limebb-document-item.cjs\",[[17,\"limebb-document-item\",{\"platform\":[16],\"context\":[16],\"item\":[16],\"type\":[513]}]]],[\"limebb-live-docs-info.cjs\",[[1,\"limebb-live-docs-info\"]]],[\"limebb-notification-item.cjs\",[[1,\"limebb-notification-item\",{\"platform\":[16],\"context\":[16],\"item\":[16]}]]],[\"limebb-kanban-item.cjs\",[[1,\"limebb-kanban-item\",{\"platform\":[16],\"context\":[16],\"item\":[16]}]]],[\"limebb-property-selector.cjs\",[[1,\"limebb-property-selector\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"value\":[1],\"label\":[1],\"required\":[4],\"helperText\":[1,\"helper-text\"],\"limetypes\":[32],\"isOpen\":[32],\"navigationPath\":[32]}]]],[\"limebb-response-format-item.cjs\",[[1,\"limebb-response-format-item\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"item\":[16],\"showAliasInput\":[32],\"showDescriptionInput\":[32]}]]],[\"limebb-chat-item_2.cjs\",[[1,\"limebb-chat-item\",{\"platform\":[16],\"context\":[16],\"item\":[16],\"helperText\":[1,\"helper-text\"],\"hasError\":[516,\"has-error\"]}],[1,\"limebb-typing-indicator\"]]],[\"limebb-feed-item-thumbnail-file-info.cjs\",[[1,\"limebb-feed-item-thumbnail-file-info\",{\"description\":[1]}]]],[\"limebb-lime-query-filter-group_3.cjs\",[[1,\"limebb-lime-query-value-input\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"propertyPath\":[1,\"property-path\"],\"operator\":[1],\"value\":[8],\"label\":[1],\"limetypes\":[32],\"inputMode\":[32]}],[1,\"limebb-lime-query-filter-group\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"expression\":[16]}],[1,\"limebb-lime-query-filter-not\",{\"platform\":[16],\"context\":[16],\"label\":[1],\"limetype\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"expression\":[16]}]]],[\"limebb-lime-query-filter-comparison_2.cjs\",[[1,\"limebb-lime-query-filter-expression\",{\"platform\":[16],\"context\":[16],\"label\":[1],\"limetype\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"expression\":[16]}],[1,\"limebb-lime-query-filter-comparison\",{\"platform\":[16],\"context\":[16],\"label\":[1],\"limetype\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"expression\":[16]}]]],[\"limebb-lime-query-filter-builder_3.cjs\",[[1,\"limebb-lime-query-filter-builder\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"expression\":[16]}],[1,\"limebb-response-format-editor\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"value\":[16],\"label\":[1],\"items\":[32]}],[0,\"limebb-limetype-field\",{\"platform\":[16],\"context\":[16],\"label\":[513],\"required\":[516],\"readonly\":[516],\"disabled\":[516],\"value\":[513],\"helperText\":[513,\"helper-text\"],\"invalid\":[4],\"limetypes\":[16],\"propertyFields\":[16],\"fieldName\":[1,\"field-name\"],\"formInfo\":[16]}]]],[\"limebb-empty-state.cjs\",[[1,\"limebb-empty-state\",{\"heading\":[513],\"value\":[513],\"icon\":[16]}]]],[\"limebb-navigation-button_2.cjs\",[[1,\"limebb-summary-popover\",{\"triggerDelay\":[514,\"trigger-delay\"],\"heading\":[513],\"subheading\":[513],\"image\":[16],\"icon\":[513],\"value\":[1],\"openDirection\":[513,\"open-direction\"],\"popoverMaxWidth\":[513,\"popover-max-width\"],\"popoverMaxHeight\":[513,\"popover-max-height\"],\"actions\":[16],\"isPopoverOpen\":[32]}],[17,\"limebb-navigation-button\",{\"href\":[513],\"tooltipLabel\":[513,\"tooltip-label\"],\"tooltipHelperLabel\":[513,\"tooltip-helper-label\"],\"type\":[513]}]]]]"), options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -6,166 +6,6 @@ const index = require('./index-ff255a0d.js');
6
6
  const index_esm = require('./index.esm-d785eb6e.js');
7
7
  const propertyResolution = require('./property-resolution-fb42a46b.js');
8
8
 
9
- /**
10
- * TypeScript type definitions for Lime Query DSL
11
- *
12
- * These types represent the structure of Lime Query as defined in:
13
- * - lime-core/lime_query/schema.py
14
- * - lime-core/lime_filter/schema.py
15
- */
16
- /**
17
- * Available operators with display metadata
18
- */
19
- const LIME_QUERY_OPERATORS = [
20
- { value: '=', label: 'Equals', icon: 'equals' },
21
- { value: '!=', label: 'Not Equals', icon: 'not-equal' },
22
- {
23
- value: '>',
24
- label: 'Greater Than',
25
- icon: 'greater-than',
26
- applicableTypes: ['integer', 'decimal', 'date', 'time'],
27
- },
28
- {
29
- value: '>=',
30
- label: 'Greater or Equal',
31
- icon: 'greater-or-equal',
32
- applicableTypes: ['integer', 'decimal', 'date', 'time'],
33
- },
34
- {
35
- value: '<',
36
- label: 'Less Than',
37
- icon: 'less-than',
38
- applicableTypes: ['integer', 'decimal', 'date', 'time'],
39
- },
40
- {
41
- value: '<=',
42
- label: 'Less or Equal',
43
- icon: 'less-or-equal',
44
- applicableTypes: ['integer', 'decimal', 'date', 'time'],
45
- },
46
- { value: 'IN', label: 'In List', icon: 'list' },
47
- {
48
- value: '?',
49
- label: 'Contains',
50
- icon: '-lime-filter-contain',
51
- applicableTypes: ['string', 'text'],
52
- },
53
- {
54
- value: '=?',
55
- label: 'Begins With',
56
- icon: '-lime-filter-begin',
57
- applicableTypes: ['string', 'text'],
58
- },
59
- {
60
- value: '=$',
61
- label: 'Ends With',
62
- icon: '-lime-filter-end',
63
- applicableTypes: ['string', 'text'],
64
- },
65
- ];
66
-
67
- /**
68
- * Validate and convert a FilterExpression (comparison filter)
69
- * @param filter
70
- */
71
- function validateAndConvertFilterExpression(filter) {
72
- // Validate required properties exist
73
- if (!('op' in filter) || !('exp' in filter)) {
74
- throw new Error('Invalid filter: comparison must have key, op, and exp properties');
75
- }
76
- // Validate operator is supported
77
- const supportedOps = LIME_QUERY_OPERATORS.map((o) => o.value);
78
- if (!supportedOps.includes(filter.op)) {
79
- throw new Error(`Unsupported filter operator: ${filter.op}`);
80
- }
81
- // Check for unexpected properties
82
- // Note: 'type' property is allowed for filter references
83
- const knownProps = new Set(['key', 'op', 'exp', 'type']);
84
- const unexpectedProps = Object.keys(filter).filter((k) => !knownProps.has(k));
85
- if (unexpectedProps.length > 0) {
86
- throw new Error(`Unexpected properties in filter comparison: ${unexpectedProps.join(', ')}`);
87
- }
88
- return {
89
- filter_type: 'comparison',
90
- property: filter.key,
91
- operator: filter.op,
92
- value: filter.exp,
93
- };
94
- }
95
- /**
96
- * Validate and convert a FilterGroup (AND/OR/NOT filter)
97
- * @param filter
98
- */
99
- function validateAndConvertFilterGroup(filter) {
100
- // Validate it has 'op' property
101
- if (!('op' in filter)) {
102
- throw new Error('Invalid filter: filter group must have op property');
103
- }
104
- // Validate it has 'exp' property
105
- if (!('exp' in filter)) {
106
- throw new Error('Invalid filter: filter group must have exp property');
107
- }
108
- // Check for unexpected properties in filter groups
109
- const knownGroupProps = new Set(['op', 'exp']);
110
- const unexpectedGroupProps = Object.keys(filter).filter((k) => !knownGroupProps.has(k));
111
- if (unexpectedGroupProps.length > 0) {
112
- throw new Error(`Unexpected properties in filter group: ${unexpectedGroupProps.join(', ')}`);
113
- }
114
- if (filter.op === '!') {
115
- // NOT filter: exp should be a single expression (not array)
116
- if (Array.isArray(filter.exp)) {
117
- throw new TypeError('Invalid NOT filter: exp should be a single expression, not an array');
118
- }
119
- return {
120
- filter_type: 'NOT',
121
- expression: limeQueryToGuiFilter(filter.exp),
122
- };
123
- }
124
- if (filter.op === 'AND') {
125
- // AND filter: exp should be an array
126
- if (!Array.isArray(filter.exp)) {
127
- throw new TypeError('Invalid AND filter: exp must be an array');
128
- }
129
- return {
130
- filter_type: 'AND',
131
- expressions: filter.exp.map(limeQueryToGuiFilter),
132
- };
133
- }
134
- if (filter.op === 'OR') {
135
- // OR filter: exp should be an array
136
- if (!Array.isArray(filter.exp)) {
137
- throw new TypeError('Invalid OR filter: exp must be an array');
138
- }
139
- return {
140
- filter_type: 'OR',
141
- expressions: filter.exp.map(limeQueryToGuiFilter),
142
- };
143
- }
144
- // If we reach here, the operator is unsupported
145
- throw new Error(`Unsupported filter operator: ${filter.op}`);
146
- }
147
- /**
148
- * Convert Lime Query filter to UI filter representation
149
- * Throws errors for unsupported filter structures
150
- * @param filter
151
- */
152
- function limeQueryToGuiFilter(filter) {
153
- if (!filter) {
154
- // Return empty AND instead of missing expression
155
- // This ensures users see the "Add a condition" button
156
- return {
157
- filter_type: 'AND',
158
- expressions: [],
159
- };
160
- }
161
- // Check if it's a FilterExpression (has 'key' property)
162
- if ('key' in filter) {
163
- return validateAndConvertFilterExpression(filter);
164
- }
165
- // It's a FilterGroup
166
- return validateAndConvertFilterGroup(filter);
167
- }
168
-
169
9
  /**
170
10
  * Dynamic filter values and placeholders that are valid in Lime Query
171
11
  */
@@ -413,6 +253,49 @@ function validatePropertySelection(selection, limetypes, limetype, guiModeEnable
413
253
  }
414
254
  return allGuiLimitations;
415
255
  }
256
+ /**
257
+ * Validate a comparison expression (has 'key' property)
258
+ * @param filter
259
+ * @param activeLimetype
260
+ * @param limetypes
261
+ */
262
+ function validateComparisonExpression(filter, activeLimetype, limetypes) {
263
+ // Validate operator
264
+ const allValidOperators = Object.values(index_esm.Zt);
265
+ if (!allValidOperators.includes(filter.op)) {
266
+ throw new Error(`Unsupported filter operator: ${filter.op}`);
267
+ }
268
+ // Validate placeholder
269
+ const result = validatePlaceholder(filter.exp, activeLimetype, limetypes);
270
+ if (!result.valid) {
271
+ throw new Error(`Invalid placeholder in filter '${filter.key}': ${result.error}`);
272
+ }
273
+ }
274
+ /**
275
+ * Validate a group expression (AND/OR/NOT)
276
+ * @param filter
277
+ * @param activeLimetype
278
+ * @param limetypes
279
+ * @param guiModeEnabled
280
+ */
281
+ function validateGroupExpression(filter, activeLimetype, limetypes, guiModeEnabled) {
282
+ // Validate operator
283
+ if (filter.op !== index_esm.Zt.AND &&
284
+ filter.op !== index_esm.Zt.OR &&
285
+ filter.op !== index_esm.Zt.NOT) {
286
+ throw new Error(`Unsupported group operator: ${filter.op}`);
287
+ }
288
+ // Recursively validate children
289
+ if (filter.op === index_esm.Zt.NOT) {
290
+ validateFilterPlaceholders(filter.exp, activeLimetype, limetypes, guiModeEnabled);
291
+ }
292
+ else if (filter.op === index_esm.Zt.AND || filter.op === index_esm.Zt.OR) {
293
+ const expressions = filter.exp;
294
+ for (const expr of expressions) {
295
+ validateFilterPlaceholders(expr, activeLimetype, limetypes, guiModeEnabled);
296
+ }
297
+ }
298
+ }
416
299
  /**
417
300
  * Validate placeholders in a filter expression
418
301
  * @param filter Filter expression to validate
@@ -424,27 +307,12 @@ function validateFilterPlaceholders(filter, activeLimetype, limetypes, guiModeEn
424
307
  if (!filter) {
425
308
  return;
426
309
  }
427
- // Check if it's a FilterExpression (has 'key' property)
428
310
  if ('key' in filter) {
429
- const result = validatePlaceholder(filter.exp, activeLimetype, limetypes);
430
- if (!result.valid) {
431
- throw new Error(`Invalid placeholder in filter '${filter.key}': ${result.error}`);
432
- }
311
+ validateComparisonExpression(filter, activeLimetype, limetypes);
433
312
  return;
434
313
  }
435
- // It's a FilterGroup - recursively validate children
436
314
  if ('exp' in filter) {
437
- if (filter.op === '!') {
438
- // NOT has a single expression
439
- validateFilterPlaceholders(filter.exp, activeLimetype, limetypes, guiModeEnabled);
440
- }
441
- else if (filter.op === 'AND' || filter.op === 'OR') {
442
- // AND/OR have array of expressions
443
- const expressions = filter.exp;
444
- for (const expr of expressions) {
445
- validateFilterPlaceholders(expr, activeLimetype, limetypes, guiModeEnabled);
446
- }
447
- }
315
+ validateGroupExpression(filter, activeLimetype, limetypes, guiModeEnabled);
448
316
  }
449
317
  }
450
318
  /**
@@ -458,7 +326,6 @@ function validateFilterPlaceholders(filter, activeLimetype, limetypes, guiModeEn
458
326
  function validateLimeQueryFilterInternal(filter, activeLimetype, limetypes, guiModeEnabled) {
459
327
  const errors = [];
460
328
  try {
461
- limeQueryToGuiFilter(filter);
462
329
  validateFilterPlaceholders(filter, activeLimetype, limetypes, guiModeEnabled);
463
330
  }
464
331
  catch (error) {
@@ -563,18 +430,11 @@ const LimeQueryBuilder = class {
563
430
  this.mode = 'gui';
564
431
  this.codeValue = '';
565
432
  this.limetype = '';
566
- this.filter = {
567
- op: index_esm.Zt.AND,
568
- exp: [],
569
- };
570
433
  this.handleLimetypeChange = (event) => {
571
434
  event.stopPropagation();
572
435
  this.limetype = event.detail;
573
436
  // Reset filter when limetype changes
574
- this.filter = {
575
- op: index_esm.Zt.AND,
576
- exp: [],
577
- };
437
+ this.filter = undefined;
578
438
  // Reset response format when limetype changes
579
439
  this.internalResponseFormat = {
580
440
  object: {
@@ -584,17 +444,9 @@ const LimeQueryBuilder = class {
584
444
  this.emitChange();
585
445
  };
586
446
  this.handleFilterChange = (event) => {
447
+ var _a;
587
448
  event.stopPropagation();
588
- const expression = event.detail;
589
- if (expression === undefined) {
590
- this.filter = {
591
- op: index_esm.Zt.AND,
592
- exp: [],
593
- };
594
- }
595
- else {
596
- this.filter = expression;
597
- }
449
+ this.filter = (_a = event.detail) !== null && _a !== void 0 ? _a : undefined;
598
450
  this.emitChange();
599
451
  };
600
452
  this.handleResponseFormatChange = (event) => {
@@ -620,7 +472,7 @@ const LimeQueryBuilder = class {
620
472
  }
621
473
  // Update internal state from parsed query
622
474
  this.limetype = parsed.limetype || '';
623
- this.filter = this.normalizeFilter(parsed.filter);
475
+ this.filter = parsed.filter;
624
476
  this.internalResponseFormat = parsed.responseFormat;
625
477
  this.limit = parsed.limit;
626
478
  this.mode = 'gui';
@@ -661,7 +513,7 @@ const LimeQueryBuilder = class {
661
513
  }
662
514
  if (this.value) {
663
515
  this.limetype = this.value.limetype || '';
664
- this.filter = this.normalizeFilter(this.value.filter);
516
+ this.filter = this.value.filter;
665
517
  this.internalResponseFormat = this.value.responseFormat;
666
518
  this.limit = this.value.limit;
667
519
  }
@@ -676,26 +528,10 @@ const LimeQueryBuilder = class {
676
528
  render() {
677
529
  const guiSupported = this.checkGuiSupport();
678
530
  const showCodeMode = !this.guiModeEnabled || this.mode === 'code';
679
- return (index.h("div", { key: '5ff70a352e3e57ff4c51d44627bd4b5ed367fff4', class: "lime-query-builder" }, this.renderLabel(), this.renderModeControls(guiSupported), showCodeMode
531
+ return (index.h("div", { key: '0b4d2bb5b4d503a775d8d3215e1e4c74fdb1eceb', class: "lime-query-builder" }, this.renderLabel(), this.renderModeControls(guiSupported), showCodeMode
680
532
  ? this.renderCodeMode(guiSupported)
681
533
  : this.renderGuiMode()));
682
534
  }
683
- /**
684
- * Normalize filter to ensure top-level is an AND group.
685
- * This ensures Add buttons are available in the UI.
686
- * @param filter
687
- */
688
- normalizeFilter(filter) {
689
- if (!filter) {
690
- return { op: index_esm.Zt.AND, exp: [] };
691
- }
692
- // If it's already an AND at the top level, keep it
693
- if ('op' in filter && filter.op === index_esm.Zt.AND) {
694
- return filter;
695
- }
696
- // Otherwise wrap in AND
697
- return { op: index_esm.Zt.AND, exp: [filter] };
698
- }
699
535
  emitChange() {
700
536
  // Only emit in GUI mode
701
537
  if (this.mode === 'code') {
@@ -817,7 +653,7 @@ const LimeQueryBuilder = class {
817
653
  if (!this.limetype) {
818
654
  return;
819
655
  }
820
- return (index.h("div", { class: "filter-section" }, index.h("h4", { class: "section-label" }, "Filter Conditions"), index.h("limebb-lime-query-filter-expression", { platform: this.platform, context: this.context, limetype: this.limetype, activeLimetype: this.activeLimetype, expression: this.filter, onExpressionChange: this.handleFilterChange })));
656
+ return (index.h("div", { class: "filter-section" }, index.h("h4", { class: "section-label" }, "Filter Conditions"), index.h("limebb-lime-query-filter-builder", { platform: this.platform, context: this.context, limetype: this.limetype, activeLimetype: this.activeLimetype, expression: this.filter, onExpressionChange: this.handleFilterChange })));
821
657
  }
822
658
  renderQueryOptionsSection() {
823
659
  var _a;
@@ -69,6 +69,76 @@ function isEqual(value, other) {
69
69
  return _baseIsEqual.baseIsEqual(value, other);
70
70
  }
71
71
 
72
+ const limeQueryFilterBuilderCss = ".expression-with-promotion{display:flex;flex-direction:column;gap:1rem}";
73
+ const LimebbLimeQueryFilterBuilderStyle0 = limeQueryFilterBuilderCss;
74
+
75
+ const LimeQueryFilterBuilderComponent = class {
76
+ constructor(hostRef) {
77
+ index.registerInstance(this, hostRef);
78
+ this.expressionChange = index.createEvent(this, "expressionChange", 7);
79
+ this.handleAddFirstCondition = () => {
80
+ const newExpression = {
81
+ key: '',
82
+ op: index_esm.Zt.EQUALS,
83
+ exp: '',
84
+ };
85
+ this.expressionChange.emit(newExpression);
86
+ };
87
+ this.handlePromoteAndAdd = () => {
88
+ if (!this.expression) {
89
+ return;
90
+ }
91
+ // Wrap current expression in AND and add a new comparison
92
+ const newExpression = {
93
+ op: index_esm.Zt.AND,
94
+ exp: [
95
+ this.expression,
96
+ {
97
+ key: '',
98
+ op: index_esm.Zt.EQUALS,
99
+ exp: '',
100
+ },
101
+ ],
102
+ };
103
+ this.expressionChange.emit(newExpression);
104
+ };
105
+ this.handleExpressionChange = (event) => {
106
+ var _a;
107
+ event.stopPropagation();
108
+ this.expressionChange.emit((_a = event.detail) !== null && _a !== void 0 ? _a : undefined);
109
+ };
110
+ }
111
+ render() {
112
+ if (!this.expression) {
113
+ return this.renderEmptyState();
114
+ }
115
+ // Check if we need to show promotion UI (comparison or NOT)
116
+ if (this.needsPromotion()) {
117
+ return this.renderWithPromotionButton();
118
+ }
119
+ // AND/OR groups handle their own Add buttons
120
+ return (index.h("limebb-lime-query-filter-expression", { platform: this.platform, context: this.context, limetype: this.limetype, activeLimetype: this.activeLimetype, expression: this.expression, onExpressionChange: this.handleExpressionChange }));
121
+ }
122
+ needsPromotion() {
123
+ if (!this.expression) {
124
+ return false;
125
+ }
126
+ // Basic comparison needs promotion
127
+ if ('key' in this.expression) {
128
+ return true;
129
+ }
130
+ // NOT needs promotion
131
+ return this.expression.op === index_esm.Zt.NOT;
132
+ }
133
+ renderEmptyState() {
134
+ return (index.h("limel-button", { label: "Add a condition", icon: "plus_math", onClick: this.handleAddFirstCondition }));
135
+ }
136
+ renderWithPromotionButton() {
137
+ return (index.h("div", { class: "expression-with-promotion" }, index.h("limebb-lime-query-filter-expression", { platform: this.platform, context: this.context, limetype: this.limetype, activeLimetype: this.activeLimetype, expression: this.expression, onExpressionChange: this.handleExpressionChange }), index.h("limel-button", { label: "Add another condition", icon: "plus_math", onClick: this.handlePromoteAndAdd })));
138
+ }
139
+ };
140
+ LimeQueryFilterBuilderComponent.style = LimebbLimeQueryFilterBuilderStyle0;
141
+
72
142
  const RELATION_PROPERTY_TYPES = [
73
143
  'belongsto',
74
144
  'hasone',
@@ -154,7 +224,7 @@ const LimetypeField = class {
154
224
  value: '',
155
225
  };
156
226
  options.unshift(emptyOption);
157
- return (index.h("limel-select", { key: 'cf27b83c4751838e85436af443a275b3d7c9dfee', label: this.label, options: options, value: selectedOption, required: this.required, helperText: this.helperText, invalid: invalid, disabled: this.disabled || this.readonly, onChange: this.handleChange }));
227
+ return (index.h("limel-select", { key: 'fd9522c5df730f65a5ac57140bca6c05c5acd63d', label: this.label, options: options, value: selectedOption, required: this.required, helperText: this.helperText, invalid: invalid, disabled: this.disabled || this.readonly, onChange: this.handleChange }));
158
228
  }
159
229
  componentWillRender() {
160
230
  this.updatePropertyFields(this.value || '');
@@ -433,5 +503,6 @@ const ResponseFormatEditor = class {
433
503
  };
434
504
  ResponseFormatEditor.style = LimebbResponseFormatEditorStyle0;
435
505
 
506
+ exports.limebb_lime_query_filter_builder = LimeQueryFilterBuilderComponent;
436
507
  exports.limebb_limetype_field = LimetypeField;
437
508
  exports.limebb_response_format_editor = ResponseFormatEditor;
@@ -82,7 +82,7 @@ const LimeQueryFilterComparisonComponent = class {
82
82
  };
83
83
  }
84
84
  render() {
85
- return (index.h("div", { key: '668e0f05bdb1fb25ffd652ea650c34e5431a3332', class: "expression" }, this.label && index.h("limel-header", { key: '5034070b58afe31cf90699dd2a27f884e647f540', heading: this.label }), index.h("div", { key: '14a2b1270e5e6d7e158e29ebc5f61051e5670e80', class: "expression-container" }, this.renderPropertySelector(), this.renderOperator(), this.renderValueInput(), index.h("limel-icon-button", { key: 'b69bde6e88c40d2623ef015794db28cec3676c73', class: "remove", icon: "trash", label: "Remove condition", onClick: this.removeExpression }))));
85
+ return (index.h("div", { key: 'a077c982ced9840beec3e574cd3e2e336cff6071', class: "expression" }, this.label && index.h("limel-header", { key: 'fbcb5cf515aac2c8e68d29947c7560684f30822c', heading: this.label }), index.h("div", { key: 'ffea426ea1295ae11aaa3c910f835acbeed24cd9', class: "expression-container" }, this.renderPropertySelector(), this.renderOperator(), this.renderValueInput(), index.h("limel-icon-button", { key: '20064f9fe42a4dfa71b2e1e2d393d50bbe20e2cb', class: "remove", icon: "trash", label: "Remove condition", onClick: this.removeExpression }))));
86
86
  }
87
87
  renderPropertySelector() {
88
88
  return (index.h("limebb-property-selector", { platform: this.platform, context: this.context, label: "Property", limetype: this.limetype, value: this.expression.key, required: true, onChange: this.handlePropertyChange }));