@limetech/lime-crm-building-blocks 1.101.0 → 1.102.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 (113) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
  3. package/dist/cjs/lime-query-validation-6be10fa7.js +558 -0
  4. package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +4 -514
  5. package/dist/cjs/{limebb-lime-query-filter-builder_4.cjs.entry.js → limebb-lime-query-filter-builder_3.cjs.entry.js} +1 -243
  6. package/dist/cjs/limebb-lime-query-filter-comparison_2.cjs.entry.js +1 -1
  7. package/dist/cjs/limebb-lime-query-filter-group_3.cjs.entry.js +2 -2
  8. package/dist/cjs/limebb-lime-query-order-by-item.cjs.entry.js +2 -2
  9. package/dist/cjs/limebb-lime-query-response-format-builder.cjs.entry.js +242 -0
  10. package/dist/cjs/limebb-lime-query-response-format-editor_2.cjs.entry.js +322 -0
  11. package/dist/cjs/limebb-live-docs-info.cjs.entry.js +2 -2
  12. package/dist/cjs/limebb-locale-picker.cjs.entry.js +1 -1
  13. package/dist/cjs/limebb-mention-group-counter.cjs.entry.js +2 -2
  14. package/dist/cjs/limebb-navigation-button_2.cjs.entry.js +3 -3
  15. package/dist/cjs/limebb-notification-item.cjs.entry.js +1 -1
  16. package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +2 -2
  17. package/dist/cjs/limebb-text-editor.cjs.entry.js +1 -1
  18. package/dist/cjs/limebb-trend-indicator.cjs.entry.js +1 -1
  19. package/dist/cjs/loader.cjs.js +1 -1
  20. package/dist/collection/collection-manifest.json +3 -2
  21. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison.js +1 -1
  22. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-group.js +1 -1
  23. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-not.js +1 -1
  24. package/dist/collection/components/lime-query-builder/lime-query-builder.js +1 -1
  25. package/dist/collection/components/lime-query-builder/lime-query-response-format-builder.css +91 -0
  26. package/dist/collection/components/lime-query-builder/lime-query-response-format-builder.js +355 -0
  27. package/dist/collection/components/lime-query-builder/lime-query-validation.js +40 -0
  28. package/dist/collection/components/lime-query-builder/limetype-field/limetype-field.js +1 -1
  29. package/dist/collection/components/lime-query-builder/order-by/order-by-item.js +2 -2
  30. package/dist/collection/components/lime-query-builder/{response-format-editor.css → response-format/response-format-editor.css} +1 -1
  31. package/dist/collection/components/lime-query-builder/{response-format-editor.js → response-format/response-format-editor.js} +5 -5
  32. package/dist/collection/components/lime-query-builder/response-format/response-format-helpers.js +92 -0
  33. package/dist/collection/components/lime-query-builder/{response-format-item.css → response-format/response-format-item.css} +1 -1
  34. package/dist/collection/components/lime-query-builder/{response-format-item.js → response-format/response-format-item.js} +6 -6
  35. package/dist/collection/components/limeobject/file-viewer/live-docs-info.js +2 -2
  36. package/dist/collection/components/locale-picker/locale-picker.js +1 -1
  37. package/dist/collection/components/notification-list/notification-item/notification-item.js +1 -1
  38. package/dist/collection/components/percentage-visualizer/percentage-visualizer.js +2 -2
  39. package/dist/collection/components/summary-popover/summary-popover.js +3 -3
  40. package/dist/collection/components/text-editor/mention-group-counter.js +2 -2
  41. package/dist/collection/components/text-editor/text-editor.js +1 -1
  42. package/dist/collection/components/trend-indicator/trend-indicator.js +1 -1
  43. package/dist/components/lime-query-filter-comparison.js +1 -1
  44. package/dist/components/lime-query-filter-expression.js +2 -2
  45. package/dist/components/lime-query-validation.js +555 -0
  46. package/dist/components/limebb-lime-query-builder.js +14 -524
  47. package/dist/components/limebb-lime-query-response-format-builder.d.ts +11 -0
  48. package/dist/components/limebb-lime-query-response-format-builder.js +283 -0
  49. package/dist/components/limebb-lime-query-response-format-editor.d.ts +11 -0
  50. package/dist/components/{limebb-response-format-editor.js → limebb-lime-query-response-format-editor.js} +2 -2
  51. package/dist/components/limebb-lime-query-response-format-item.d.ts +11 -0
  52. package/dist/components/{limebb-response-format-item.js → limebb-lime-query-response-format-item.js} +2 -2
  53. package/dist/components/limebb-locale-picker.js +1 -1
  54. package/dist/components/limebb-mention-group-counter.js +2 -2
  55. package/dist/components/limebb-percentage-visualizer.js +2 -2
  56. package/dist/components/limebb-text-editor.js +1 -1
  57. package/dist/components/limebb-trend-indicator.js +1 -1
  58. package/dist/components/limetype-field.js +1 -1
  59. package/dist/components/live-docs-info.js +2 -2
  60. package/dist/components/notification-item.js +1 -1
  61. package/dist/components/order-by-item.js +2 -2
  62. package/dist/components/response-format-editor.js +11 -11
  63. package/dist/components/response-format-item.js +9 -9
  64. package/dist/components/summary-popover.js +3 -3
  65. package/dist/esm/lime-crm-building-blocks.js +1 -1
  66. package/dist/esm/lime-query-validation-573223a5.js +555 -0
  67. package/dist/esm/limebb-lime-query-builder.entry.js +4 -514
  68. package/dist/esm/{limebb-lime-query-filter-builder_4.entry.js → limebb-lime-query-filter-builder_3.entry.js} +2 -243
  69. package/dist/esm/limebb-lime-query-filter-comparison_2.entry.js +1 -1
  70. package/dist/esm/limebb-lime-query-filter-group_3.entry.js +2 -2
  71. package/dist/esm/limebb-lime-query-order-by-item.entry.js +2 -2
  72. package/dist/esm/limebb-lime-query-response-format-builder.entry.js +238 -0
  73. package/dist/esm/limebb-lime-query-response-format-editor_2.entry.js +317 -0
  74. package/dist/esm/limebb-live-docs-info.entry.js +2 -2
  75. package/dist/esm/limebb-locale-picker.entry.js +1 -1
  76. package/dist/esm/limebb-mention-group-counter.entry.js +2 -2
  77. package/dist/esm/limebb-navigation-button_2.entry.js +3 -3
  78. package/dist/esm/limebb-notification-item.entry.js +1 -1
  79. package/dist/esm/limebb-percentage-visualizer.entry.js +2 -2
  80. package/dist/esm/limebb-text-editor.entry.js +1 -1
  81. package/dist/esm/limebb-trend-indicator.entry.js +1 -1
  82. package/dist/esm/loader.js +1 -1
  83. package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
  84. package/dist/lime-crm-building-blocks/{p-5cf4898d.entry.js → p-0de79b7f.entry.js} +1 -1
  85. package/dist/lime-crm-building-blocks/{p-8c2fb1c9.entry.js → p-0f7135ff.entry.js} +1 -1
  86. package/dist/lime-crm-building-blocks/{p-6aa216ec.entry.js → p-186e9f1a.entry.js} +1 -1
  87. package/dist/lime-crm-building-blocks/p-289ce8b9.entry.js +1 -0
  88. package/dist/lime-crm-building-blocks/p-3351395b.entry.js +1 -0
  89. package/dist/lime-crm-building-blocks/p-33e6d0ec.entry.js +1 -0
  90. package/dist/lime-crm-building-blocks/{p-a1ee8990.entry.js → p-3d1be1c9.entry.js} +1 -1
  91. package/dist/lime-crm-building-blocks/{p-92dfc5f8.entry.js → p-577d8909.entry.js} +1 -1
  92. package/dist/lime-crm-building-blocks/{p-ccf34631.entry.js → p-6579412e.entry.js} +1 -1
  93. package/dist/lime-crm-building-blocks/{p-d84874dc.entry.js → p-6f6fed59.entry.js} +1 -1
  94. package/dist/lime-crm-building-blocks/{p-0cd036ed.entry.js → p-7e5528f6.entry.js} +1 -1
  95. package/dist/lime-crm-building-blocks/{p-8601eab5.entry.js → p-a9ac501f.entry.js} +1 -1
  96. package/dist/lime-crm-building-blocks/p-be845252.entry.js +1 -0
  97. package/dist/lime-crm-building-blocks/{p-2725671e.entry.js → p-cb338753.entry.js} +1 -1
  98. package/dist/lime-crm-building-blocks/{p-425eaba2.entry.js → p-d0721b22.entry.js} +1 -1
  99. package/dist/lime-crm-building-blocks/p-fa2da6bc.js +1 -0
  100. package/dist/types/components/lime-query-builder/lime-query-response-format-builder.d.ts +102 -0
  101. package/dist/types/components/lime-query-builder/lime-query-validation.d.ts +13 -0
  102. package/dist/types/components/lime-query-builder/{response-format-editor.d.ts → response-format/response-format-editor.d.ts} +2 -2
  103. package/dist/types/components/lime-query-builder/response-format/response-format-helpers.d.ts +42 -0
  104. package/dist/types/components/lime-query-builder/{response-format-item.d.ts → response-format/response-format-item.d.ts} +2 -2
  105. package/dist/types/components.d.ts +394 -222
  106. package/package.json +1 -1
  107. package/dist/cjs/limebb-response-format-item.cjs.entry.js +0 -80
  108. package/dist/components/limebb-response-format-editor.d.ts +0 -11
  109. package/dist/components/limebb-response-format-item.d.ts +0 -11
  110. package/dist/esm/limebb-response-format-item.entry.js +0 -76
  111. package/dist/lime-crm-building-blocks/p-244ee55b.entry.js +0 -1
  112. package/dist/lime-crm-building-blocks/p-67c174d0.entry.js +0 -1
  113. package/dist/lime-crm-building-blocks/p-f9efca1d.entry.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.102.0](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.101.0...v1.102.0) (2025-11-07)
2
+
3
+ ### Features
4
+
5
+
6
+ * **lime-query-builder:** add response-format-builder component ([2e6670e](https://github.com/Lundalogik/lime-crm-building-blocks/commit/2e6670ebdc1e5a6d66bc736342e70e1edc0bd75a)), closes [Lundalogik/crm-insights-and-intelligence#123](https://github.com/Lundalogik/crm-insights-and-intelligence/issues/123)
7
+
1
8
  ## [1.101.0](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.100.1...v1.101.0) (2025-11-07)
2
9
 
3
10
  ### 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],\"orderBy\":[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-lime-query-order-by-item.cjs\",[[1,\"limebb-lime-query-order-by-item\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"item\":[16]}]]],[\"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_4.cjs\",[[1,\"limebb-lime-query-filter-builder\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"expression\":[16]}],[1,\"limebb-lime-query-order-by-editor\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"value\":[16],\"label\":[1],\"items\":[32]},null,{\"value\":[\"handleValueChange\"]}],[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);
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],\"orderBy\":[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-lime-query-response-format-builder.cjs\",[[1,\"limebb-lime-query-response-format-builder\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"value\":[16],\"label\":[1],\"limetypes\":[32],\"mode\":[32],\"codeValue\":[32],\"internalValue\":[32]}]]],[\"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-item.cjs\",[[1,\"limebb-kanban-item\",{\"platform\":[16],\"context\":[16],\"item\":[16]}]]],[\"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-lime-query-order-by-item.cjs\",[[1,\"limebb-lime-query-order-by-item\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"item\":[16]}]]],[\"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-builder_3.cjs\",[[1,\"limebb-lime-query-filter-builder\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"expression\":[16]}],[1,\"limebb-lime-query-order-by-editor\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"value\":[16],\"label\":[1],\"items\":[32]},null,{\"value\":[\"handleValueChange\"]}],[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-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-lime-query-response-format-editor_2.cjs\",[[1,\"limebb-lime-query-response-format-editor\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"value\":[16],\"label\":[1],\"items\":[32]}],[1,\"limebb-lime-query-response-format-item\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"item\":[16],\"showAliasInput\":[32],\"showDescriptionInput\":[32]}]]],[\"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-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]}]]]]"), options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -0,0 +1,558 @@
1
+ 'use strict';
2
+
3
+ const index_esm = require('./index.esm-d785eb6e.js');
4
+ const propertyResolution = require('./property-resolution-fb42a46b.js');
5
+
6
+ /**
7
+ * Dynamic filter values and placeholders that are valid in Lime Query
8
+ */
9
+ const VALID_DYNAMIC_VALUES = new Set([
10
+ // Temporal
11
+ '$yesterday',
12
+ '$now',
13
+ '$today',
14
+ '$tomorrow',
15
+ // Ranges
16
+ '$this_week',
17
+ '$this_month',
18
+ '$this_quarter',
19
+ '$this_year',
20
+ ]);
21
+ /**
22
+ * Pattern for relative date functions: $previous_day(x), $next_month(x), etc.
23
+ */
24
+ const RELATIVE_DATE_PATTERN = /^\$(previous|next)_(day|week|month|quarter|year)\(\d+\)$/;
25
+ /**
26
+ * Pattern for user context variables: $me, $me.office.name, etc.
27
+ */
28
+ const USER_CONTEXT_PATTERN = /^\$me(\.\w+)*$/;
29
+ /**
30
+ * Check if a value is a valid dynamic value or placeholder
31
+ * @param value
32
+ */
33
+ function isValidDynamicValue(value) {
34
+ if (typeof value !== 'string') {
35
+ return false;
36
+ }
37
+ return (VALID_DYNAMIC_VALUES.has(value) ||
38
+ RELATIVE_DATE_PATTERN.test(value) ||
39
+ USER_CONTEXT_PATTERN.test(value));
40
+ }
41
+ /**
42
+ * Validate a placeholder value
43
+ * @param value The value to check (might be a placeholder)
44
+ * @param activeLimetype The limetype of the active object
45
+ * @param limetypes Record of all available limetypes
46
+ * @returns Validation result with error message if invalid
47
+ */
48
+ function validatePlaceholder(value, activeLimetype, limetypes) {
49
+ // Check if it's a valid dynamic value ($today, $me, etc.)
50
+ if (isValidDynamicValue(value)) {
51
+ return { valid: true };
52
+ }
53
+ // Not a placeholder, no validation needed
54
+ if (typeof value !== 'string' || !value.startsWith('%activeObject%')) {
55
+ return { valid: true };
56
+ }
57
+ // Placeholder used but no active limetype specified
58
+ // This is always valid - activeLimetype is optional and only used for validation
59
+ if (!activeLimetype) {
60
+ return { valid: true };
61
+ }
62
+ // Extract property path from placeholder
63
+ const propertyPath = value.replace(/^%activeObject%\.?/, '');
64
+ // %activeObject% without property path is valid (references the ID)
65
+ if (!propertyPath) {
66
+ return { valid: true };
67
+ }
68
+ // Validate the property path exists on the active limetype
69
+ try {
70
+ const property = propertyResolution.getPropertyFromPath(limetypes, activeLimetype, propertyPath);
71
+ if (!property) {
72
+ return {
73
+ valid: false,
74
+ error: `Property path '${propertyPath}' does not exist on limetype '${activeLimetype}'`,
75
+ };
76
+ }
77
+ // Path validation is already done by getPropertyFromPath
78
+ // If we can traverse the path successfully, it means all intermediate
79
+ // properties are valid single relations (belongsTo/hasOne).
80
+ // hasMany relations cannot be traversed in paths.
81
+ return { valid: true };
82
+ }
83
+ catch (error) {
84
+ return {
85
+ valid: false,
86
+ error: `Invalid placeholder path: ${error.message}`,
87
+ };
88
+ }
89
+ }
90
+ /**
91
+ * Validate a response format against limetype schemas
92
+ * Throws errors for invalid property references
93
+ * Returns GUI limitations for features not yet supported in GUI
94
+ * @param responseFormat
95
+ * @param limetypes Record of all available limetypes
96
+ * @param limetype The root limetype for this query
97
+ * @param guiModeEnabled Whether GUI mode is enabled
98
+ * @returns GUI limitations found (if any)
99
+ */
100
+ function validateResponseFormat(responseFormat, limetypes, limetype, guiModeEnabled = true) {
101
+ const guiLimitations = [];
102
+ // Check for GUI-unsupported features
103
+ if (guiModeEnabled && responseFormat.aggregates) {
104
+ guiLimitations.push('responseFormat.aggregates is not yet supported in GUI mode');
105
+ }
106
+ // Validate object properties (throws on invalid properties)
107
+ if (responseFormat.object) {
108
+ const objectLimitations = validatePropertySelection(responseFormat.object, limetypes, limetype, guiModeEnabled);
109
+ guiLimitations.push(...objectLimitations);
110
+ }
111
+ return guiLimitations;
112
+ }
113
+ /**
114
+ * Extract non-metadata keys from a property value object
115
+ * Filters out _alias and all # properties (which are treated as comments)
116
+ * @param propValue Property value object
117
+ * @param propName Property name (for error messages)
118
+ * @param guiModeEnabled Whether GUI mode is enabled (affects validation)
119
+ * @returns Object with non-metadata keys and any GUI limitations found
120
+ */
121
+ function extractNonMetadataKeys(propValue, propName, guiModeEnabled = true) {
122
+ const keys = Object.keys(propValue);
123
+ const guiLimitations = [];
124
+ // Check for # properties other than #description (GUI limitation)
125
+ if (guiModeEnabled) {
126
+ const unsupportedHashProps = keys.filter((k) => k.startsWith('#') && k !== '#description');
127
+ if (unsupportedHashProps.length > 0) {
128
+ guiLimitations.push(`Property '${propName}' contains # properties not supported in GUI: ${unsupportedHashProps.join(', ')}`);
129
+ }
130
+ }
131
+ // Filter out _alias and all # properties (they are metadata/comments)
132
+ const nonMetadataKeys = keys.filter((k) => k !== '_alias' && !k.startsWith('#'));
133
+ return { keys: nonMetadataKeys, guiLimitations };
134
+ }
135
+ /**
136
+ * Validate a relation property value
137
+ * @param propName Property name
138
+ * @param propValue Property value
139
+ * @param limetypes Record of all available limetypes
140
+ * @param property
141
+ * @param guiModeEnabled Whether GUI mode is enabled (affects validation)
142
+ * @returns GUI limitations found (if any)
143
+ */
144
+ function validateRelationProperty(propName, propValue, limetypes, property, guiModeEnabled = true) {
145
+ // null is valid - just return the relation ID
146
+ if (propValue === null) {
147
+ return [];
148
+ }
149
+ if (typeof propValue !== 'object') {
150
+ throw new TypeError(`Relation property '${propName}' must be null or an object`);
151
+ }
152
+ const propValueObj = propValue;
153
+ const { keys: otherKeys, guiLimitations } = extractNonMetadataKeys(propValueObj, propName, guiModeEnabled);
154
+ // If it's just {} or { _alias: "...", "#...": "..." }, that's valid
155
+ if (otherKeys.length === 0) {
156
+ return guiLimitations;
157
+ }
158
+ // Otherwise, validate nested properties
159
+ const relatedLimetype = property.relation.getLimetype();
160
+ if (!relatedLimetype) {
161
+ throw new Error(`Could not determine related limetype for property '${propName}'`);
162
+ }
163
+ // Build a clean PropertySelection without metadata for recursive validation
164
+ const cleanSelection = {};
165
+ for (const key of otherKeys) {
166
+ cleanSelection[key] = propValueObj[key];
167
+ }
168
+ const nestedLimitations = validatePropertySelection(cleanSelection, limetypes, relatedLimetype.name, guiModeEnabled);
169
+ return [...guiLimitations, ...nestedLimitations];
170
+ }
171
+ /**
172
+ * Validate a non-relation property value
173
+ * @param propName Property name
174
+ * @param propValue Property value
175
+ * @param guiModeEnabled Whether GUI mode is enabled (affects validation)
176
+ * @returns GUI limitations found (if any)
177
+ */
178
+ function validateNonRelationProperty(propName, propValue, guiModeEnabled = true) {
179
+ // null is valid
180
+ if (propValue === null) {
181
+ return [];
182
+ }
183
+ // Allow empty object {} or object with only metadata (_alias, #...)
184
+ if (typeof propValue === 'object') {
185
+ const { keys: nonMetadataKeys, guiLimitations } = extractNonMetadataKeys(propValue, propName, guiModeEnabled);
186
+ if (nonMetadataKeys.length === 0) {
187
+ // {} or { _alias: "...", "#...": "..." } is valid
188
+ return guiLimitations;
189
+ }
190
+ throw new Error(`Non-relation property '${propName}' cannot have nested properties other than _alias or # properties (got: ${nonMetadataKeys.join(', ')})`);
191
+ }
192
+ throw new Error(`Non-relation property '${propName}' must be null or an object (got ${typeof propValue})`);
193
+ }
194
+ /**
195
+ * Validate a single property entry
196
+ * @param propName Property name
197
+ * @param propValue Property value
198
+ * @param normalizedProperties Normalized properties of the limetype
199
+ * @param limetypes Record of all available limetypes
200
+ * @param limetype Current limetype name
201
+ * @param guiModeEnabled Whether GUI mode is enabled (affects validation)
202
+ * @returns GUI limitations found (if any)
203
+ */
204
+ function validateSinglePropertyEntry(propName, propValue, normalizedProperties, limetypes, limetype, guiModeEnabled = true) {
205
+ // Allow empty string (editing state in GUI)
206
+ if (propName === '') {
207
+ // Only validate empty property name in GUI mode
208
+ if (guiModeEnabled && propValue !== null) {
209
+ throw new Error('Empty property name must have null value');
210
+ }
211
+ return [];
212
+ }
213
+ // Validate property exists on limetype
214
+ const property = normalizedProperties[propName];
215
+ if (!property) {
216
+ throw new Error(`Property '${propName}' does not exist on limetype '${limetype}'`);
217
+ }
218
+ // Validate value based on property type
219
+ if (property.relation) {
220
+ return validateRelationProperty(propName, propValue, limetypes, property, guiModeEnabled);
221
+ }
222
+ else {
223
+ return validateNonRelationProperty(propName, propValue, guiModeEnabled);
224
+ }
225
+ }
226
+ /**
227
+ * Validate a property selection object against a limetype schema
228
+ * Recursively validates nested property selections for relations
229
+ * @param selection
230
+ * @param limetypes Record of all available limetypes
231
+ * @param limetype The limetype for this level of the selection
232
+ * @param guiModeEnabled Whether GUI mode is enabled (affects validation)
233
+ * @returns GUI limitations found (if any)
234
+ */
235
+ function validatePropertySelection(selection, limetypes, limetype, guiModeEnabled = true) {
236
+ const limetypeObj = limetypes[limetype];
237
+ if (!limetypeObj) {
238
+ throw new Error(`Unknown limetype: ${limetype}`);
239
+ }
240
+ const normalizedProperties = propertyResolution.getNormalizedProperties(limetypeObj);
241
+ const allGuiLimitations = [];
242
+ for (const [propName, propValue] of Object.entries(selection)) {
243
+ // Skip # properties (comments/metadata that backend accepts via unknown=INCLUDE)
244
+ // Note: _alias only appears inside property value objects, not at this level
245
+ if (propName.startsWith('#')) {
246
+ continue;
247
+ }
248
+ const limitations = validateSinglePropertyEntry(propName, propValue, normalizedProperties, limetypes, limetype, guiModeEnabled);
249
+ allGuiLimitations.push(...limitations);
250
+ }
251
+ return allGuiLimitations;
252
+ }
253
+ /**
254
+ * Validate a comparison expression (has 'key' property)
255
+ * @param filter
256
+ * @param activeLimetype
257
+ * @param limetypes
258
+ */
259
+ function validateComparisonExpression(filter, activeLimetype, limetypes) {
260
+ // Validate operator
261
+ const allValidOperators = Object.values(index_esm.Zt);
262
+ if (!allValidOperators.includes(filter.op)) {
263
+ throw new Error(`Unsupported filter operator: ${filter.op}`);
264
+ }
265
+ // Validate placeholder
266
+ const result = validatePlaceholder(filter.exp, activeLimetype, limetypes);
267
+ if (!result.valid) {
268
+ throw new Error(`Invalid placeholder in filter '${filter.key}': ${result.error}`);
269
+ }
270
+ }
271
+ /**
272
+ * Validate a group expression (AND/OR/NOT)
273
+ * @param filter
274
+ * @param activeLimetype
275
+ * @param limetypes
276
+ * @param guiModeEnabled
277
+ */
278
+ function validateGroupExpression(filter, activeLimetype, limetypes, guiModeEnabled) {
279
+ // Validate operator
280
+ if (filter.op !== index_esm.Zt.AND &&
281
+ filter.op !== index_esm.Zt.OR &&
282
+ filter.op !== index_esm.Zt.NOT) {
283
+ throw new Error(`Unsupported group operator: ${filter.op}`);
284
+ }
285
+ // Recursively validate children
286
+ if (filter.op === index_esm.Zt.NOT) {
287
+ validateFilterPlaceholders(filter.exp, activeLimetype, limetypes, guiModeEnabled);
288
+ }
289
+ else if (filter.op === index_esm.Zt.AND || filter.op === index_esm.Zt.OR) {
290
+ const expressions = filter.exp;
291
+ for (const expr of expressions) {
292
+ validateFilterPlaceholders(expr, activeLimetype, limetypes, guiModeEnabled);
293
+ }
294
+ }
295
+ }
296
+ /**
297
+ * Validate placeholders in a filter expression
298
+ * @param filter Filter expression to validate
299
+ * @param activeLimetype The limetype of the active object
300
+ * @param limetypes Record of all available limetypes
301
+ * @param guiModeEnabled Whether GUI mode is enabled (affects validation)
302
+ */
303
+ function validateFilterPlaceholders(filter, activeLimetype, limetypes, guiModeEnabled = true) {
304
+ if (!filter) {
305
+ return;
306
+ }
307
+ if ('key' in filter) {
308
+ validateComparisonExpression(filter, activeLimetype, limetypes);
309
+ return;
310
+ }
311
+ if ('exp' in filter) {
312
+ validateGroupExpression(filter, activeLimetype, limetypes, guiModeEnabled);
313
+ }
314
+ }
315
+ /**
316
+ * Validate Lime Query filter and collect errors
317
+ * @param filter The filter expression or group to validate
318
+ * @param activeLimetype Optional active object limetype for placeholder validation
319
+ * @param limetypes Record of all available limetypes
320
+ * @param guiModeEnabled Whether GUI mode is enabled
321
+ * @returns Array of validation error messages
322
+ */
323
+ function validateLimeQueryFilterInternal(filter, activeLimetype, limetypes, guiModeEnabled) {
324
+ const errors = [];
325
+ try {
326
+ validateFilterPlaceholders(filter, activeLimetype, limetypes, guiModeEnabled);
327
+ }
328
+ catch (error) {
329
+ errors.push(`Invalid filter: ${error.message}`);
330
+ }
331
+ return errors;
332
+ }
333
+ /**
334
+ * Validate orderBy specification
335
+ * @param orderBy Array of orderBy items to validate
336
+ * @param limetypes Record of all available limetypes
337
+ * @param limetype The limetype for this Lime Query
338
+ * @returns Array of validation error messages
339
+ */
340
+ function validateOrderBy(orderBy, limetypes, limetype) {
341
+ const errors = [];
342
+ if (!Array.isArray(orderBy)) {
343
+ errors.push('orderBy must be an array');
344
+ return errors;
345
+ }
346
+ if (!limetype || !limetypes[limetype]) {
347
+ // Can't validate property paths without limetype
348
+ return errors;
349
+ }
350
+ for (const [index, item] of orderBy.entries()) {
351
+ const itemErrors = validateOrderByItem(item, index, limetypes, limetype);
352
+ errors.push(...itemErrors);
353
+ }
354
+ return errors;
355
+ }
356
+ /**
357
+ * Validate a single orderBy item
358
+ * @param item The orderBy item to validate
359
+ * @param index The index of the item in the array (for error messages)
360
+ * @param limetypes Record of all available limetypes
361
+ * @param limetype The limetype for this Lime Query
362
+ * @returns Array of validation error messages for this item
363
+ */
364
+ function validateOrderByItem(item, index, limetypes, limetype) {
365
+ const errors = [];
366
+ const objectError = validateOrderByItemIsObject(item, index);
367
+ if (objectError) {
368
+ return [objectError];
369
+ }
370
+ const keys = Object.keys(item);
371
+ const keyError = validateOrderByItemHasSingleKey(keys, index);
372
+ if (keyError) {
373
+ return [keyError];
374
+ }
375
+ const propertyPath = keys[0];
376
+ const direction = item[propertyPath];
377
+ const directionError = validateOrderByDirection(direction, index);
378
+ if (directionError) {
379
+ errors.push(directionError);
380
+ }
381
+ const pathError = validateOrderByPropertyPath(propertyPath, limetypes, limetype, index);
382
+ if (pathError) {
383
+ errors.push(pathError);
384
+ }
385
+ return errors;
386
+ }
387
+ /**
388
+ * Validate that the orderBy item is an object
389
+ * @param item
390
+ * @param index
391
+ */
392
+ function validateOrderByItemIsObject(item, index) {
393
+ if (typeof item !== 'object' || item === null) {
394
+ return `orderBy[${index}] must be an object`;
395
+ }
396
+ return null;
397
+ }
398
+ /**
399
+ * Validate that the orderBy item has exactly one property key
400
+ * @param keys
401
+ * @param index
402
+ */
403
+ function validateOrderByItemHasSingleKey(keys, index) {
404
+ if (keys.length === 0) {
405
+ return `orderBy[${index}] must have a property path`;
406
+ }
407
+ if (keys.length > 1) {
408
+ return `orderBy[${index}] must have exactly one property, got ${keys.length}`;
409
+ }
410
+ return null;
411
+ }
412
+ /**
413
+ * Validate that the sort direction is either ASC or DESC
414
+ * @param direction
415
+ * @param index
416
+ */
417
+ function validateOrderByDirection(direction, index) {
418
+ if (direction !== 'ASC' && direction !== 'DESC') {
419
+ return `orderBy[${index}]: direction must be 'ASC' or 'DESC', got '${direction}'`;
420
+ }
421
+ return null;
422
+ }
423
+ /**
424
+ * Validate that the property path exists on the limetype
425
+ * @param propertyPath
426
+ * @param limetypes
427
+ * @param limetype
428
+ * @param index
429
+ */
430
+ function validateOrderByPropertyPath(propertyPath, limetypes, limetype, index) {
431
+ if (!propertyPath || propertyPath === '') {
432
+ return null;
433
+ }
434
+ const property = propertyResolution.getPropertyFromPath(limetypes, limetype, propertyPath);
435
+ if (!property) {
436
+ return `orderBy[${index}]: property path '${propertyPath}' does not exist on limetype '${limetype}'`;
437
+ }
438
+ return null;
439
+ }
440
+ /**
441
+ * Validate Lime Query response format and collect errors/limitations
442
+ * @param responseFormat The response format to validate
443
+ * @param limetypes Record of all available limetypes
444
+ * @param limetype The limetype for this Lime Query
445
+ * @param guiModeEnabled Whether GUI mode is enabled
446
+ * @returns Object with validation errors and GUI limitations
447
+ */
448
+ function validateLimeQueryResponseFormatInternal(responseFormat, limetypes, limetype, guiModeEnabled) {
449
+ const errors = [];
450
+ const limitations = [];
451
+ try {
452
+ const formatLimitations = validateResponseFormat(responseFormat, limetypes, limetype, guiModeEnabled);
453
+ limitations.push(...formatLimitations);
454
+ }
455
+ catch (error) {
456
+ errors.push(`Invalid responseFormat: ${error.message}`);
457
+ }
458
+ return { errors, limitations };
459
+ }
460
+ /**
461
+ * Validate a Lime Query
462
+ * Returns validation result with separate arrays for validity errors and GUI limitations
463
+ * @param limeQuery The Lime Query to validate
464
+ * @param limetypes Record of all available limetypes
465
+ * @param activeLimetype Optional active object limetype for placeholder validation
466
+ * @param guiModeEnabled Whether GUI mode is enabled (affects validation)
467
+ * @returns LimeQueryValidationResult with validity status and any errors/limitations
468
+ */
469
+ function isLimeQuerySupported(limeQuery, limetypes, activeLimetype, guiModeEnabled = true) {
470
+ // Handle empty/undefined Lime Query
471
+ if (!limeQuery) {
472
+ return {
473
+ valid: true,
474
+ guiSupported: true,
475
+ validationErrors: [],
476
+ guiLimitations: [],
477
+ };
478
+ }
479
+ const validationErrors = [];
480
+ const guiLimitations = [];
481
+ // Validate limetype exists
482
+ if (limeQuery.limetype && !limetypes[limeQuery.limetype]) {
483
+ validationErrors.push(`Unknown limetype: ${limeQuery.limetype}`);
484
+ }
485
+ // Check for offset without orderBy (Lime Query requirement)
486
+ if (limeQuery.offset !== undefined && !limeQuery.orderBy) {
487
+ validationErrors.push('offset requires orderBy to be specified');
488
+ }
489
+ // Validate orderBy
490
+ if (limeQuery.orderBy) {
491
+ const orderByErrors = validateOrderBy(limeQuery.orderBy, limetypes, limeQuery.limetype);
492
+ validationErrors.push(...orderByErrors);
493
+ }
494
+ // Check for GUI-unsupported top-level properties
495
+ if (guiModeEnabled && limeQuery.offset !== undefined) {
496
+ guiLimitations.push('offset is not yet supported in GUI mode');
497
+ }
498
+ // Validate filter
499
+ if (limeQuery.filter) {
500
+ const filterErrors = validateLimeQueryFilterInternal(limeQuery.filter, activeLimetype, limetypes, guiModeEnabled);
501
+ validationErrors.push(...filterErrors);
502
+ }
503
+ // Validate responseFormat
504
+ if (limeQuery.responseFormat) {
505
+ const { errors, limitations } = validateLimeQueryResponseFormatInternal(limeQuery.responseFormat, limetypes, limeQuery.limetype, guiModeEnabled);
506
+ validationErrors.push(...errors);
507
+ guiLimitations.push(...limitations);
508
+ }
509
+ return {
510
+ valid: validationErrors.length === 0,
511
+ guiSupported: guiLimitations.length === 0,
512
+ validationErrors,
513
+ guiLimitations,
514
+ };
515
+ }
516
+ // ============================================================================
517
+ // Specialized Validators for Modular Builders
518
+ // ============================================================================
519
+ /**
520
+ * Validate a ResponseFormat in isolation (for response-format-builder)
521
+ *
522
+ * This validator is designed for the response-format-builder component,
523
+ * which only handles ResponseFormat editing without the full LimeQuery context.
524
+ *
525
+ * @param responseFormat - The response format to validate
526
+ * @param limetypes - Record of all available limetypes
527
+ * @param limetype - The limetype context for validation
528
+ * @param guiModeEnabled - Whether GUI mode is enabled (affects validation)
529
+ * @returns Validation result with errors and GUI limitations
530
+ */
531
+ function validateResponseFormatOnly(responseFormat, limetypes, limetype, guiModeEnabled = true) {
532
+ const validationErrors = [];
533
+ const guiLimitations = [];
534
+ // Validate limetype exists
535
+ if (!limetypes[limetype]) {
536
+ validationErrors.push(`Unknown limetype: ${limetype}`);
537
+ // Can't proceed with property validation if limetype is unknown
538
+ return {
539
+ valid: false,
540
+ guiSupported: false,
541
+ validationErrors,
542
+ guiLimitations,
543
+ };
544
+ }
545
+ // Use internal validation logic
546
+ const { errors, limitations } = validateLimeQueryResponseFormatInternal(responseFormat, limetypes, limetype, guiModeEnabled);
547
+ validationErrors.push(...errors);
548
+ guiLimitations.push(...limitations);
549
+ return {
550
+ valid: validationErrors.length === 0,
551
+ guiSupported: guiLimitations.length === 0,
552
+ validationErrors,
553
+ guiLimitations,
554
+ };
555
+ }
556
+
557
+ exports.isLimeQuerySupported = isLimeQuerySupported;
558
+ exports.validateResponseFormatOnly = validateResponseFormatOnly;