@limetech/lime-crm-building-blocks 1.100.1 → 1.101.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 (85) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
  3. package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +132 -26
  4. package/dist/cjs/{limebb-lime-query-filter-builder_3.cjs.entry.js → limebb-lime-query-filter-builder_4.cjs.entry.js} +85 -0
  5. package/dist/cjs/limebb-lime-query-order-by-item.cjs.entry.js +51 -0
  6. package/dist/cjs/limebb-live-docs-info.cjs.entry.js +2 -2
  7. package/dist/cjs/limebb-locale-picker.cjs.entry.js +1 -1
  8. package/dist/cjs/limebb-mention-group-counter.cjs.entry.js +2 -2
  9. package/dist/cjs/limebb-navigation-button_2.cjs.entry.js +3 -3
  10. package/dist/cjs/limebb-notification-item.cjs.entry.js +1 -1
  11. package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +2 -2
  12. package/dist/cjs/limebb-text-editor.cjs.entry.js +1 -1
  13. package/dist/cjs/limebb-trend-indicator.cjs.entry.js +1 -1
  14. package/dist/cjs/loader.cjs.js +1 -1
  15. package/dist/collection/collection-manifest.json +2 -0
  16. package/dist/collection/components/lime-query-builder/lime-query-builder.css +2 -5
  17. package/dist/collection/components/lime-query-builder/lime-query-builder.js +19 -19
  18. package/dist/collection/components/lime-query-builder/lime-query-validation.js +114 -7
  19. package/dist/collection/components/lime-query-builder/order-by/order-by-editor.css +72 -0
  20. package/dist/collection/components/lime-query-builder/order-by/order-by-editor.js +252 -0
  21. package/dist/collection/components/lime-query-builder/order-by/order-by-item.css +45 -0
  22. package/dist/collection/components/lime-query-builder/order-by/order-by-item.js +173 -0
  23. package/dist/collection/components/limeobject/file-viewer/live-docs-info.js +2 -2
  24. package/dist/collection/components/locale-picker/locale-picker.js +1 -1
  25. package/dist/collection/components/notification-list/notification-item/notification-item.js +1 -1
  26. package/dist/collection/components/percentage-visualizer/percentage-visualizer.js +2 -2
  27. package/dist/collection/components/summary-popover/summary-popover.js +3 -3
  28. package/dist/collection/components/text-editor/mention-group-counter.js +2 -2
  29. package/dist/collection/components/text-editor/text-editor.js +1 -1
  30. package/dist/collection/components/trend-indicator/trend-indicator.js +1 -1
  31. package/dist/components/lime-query-value-input.js +1 -1
  32. package/dist/components/limebb-lime-query-builder.js +155 -36
  33. package/dist/components/limebb-lime-query-order-by-editor.d.ts +11 -0
  34. package/dist/components/limebb-lime-query-order-by-editor.js +6 -0
  35. package/dist/components/limebb-lime-query-order-by-item.d.ts +11 -0
  36. package/dist/components/limebb-lime-query-order-by-item.js +6 -0
  37. package/dist/components/limebb-locale-picker.js +1 -1
  38. package/dist/components/limebb-mention-group-counter.js +2 -2
  39. package/dist/components/limebb-percentage-visualizer.js +2 -2
  40. package/dist/components/limebb-text-editor.js +1 -1
  41. package/dist/components/limebb-trend-indicator.js +1 -1
  42. package/dist/components/live-docs-info.js +2 -2
  43. package/dist/components/notification-item.js +1 -1
  44. package/dist/components/order-by-editor.js +123 -0
  45. package/dist/components/order-by-item.js +73 -0
  46. package/dist/components/property-selector.js +1 -1
  47. package/dist/components/summary-popover.js +3 -3
  48. package/dist/esm/lime-crm-building-blocks.js +1 -1
  49. package/dist/esm/limebb-lime-query-builder.entry.js +133 -27
  50. package/dist/esm/{limebb-lime-query-filter-builder_3.entry.js → limebb-lime-query-filter-builder_4.entry.js} +85 -1
  51. package/dist/esm/limebb-lime-query-filter-group_3.entry.js +1 -1
  52. package/dist/esm/limebb-lime-query-order-by-item.entry.js +47 -0
  53. package/dist/esm/limebb-live-docs-info.entry.js +2 -2
  54. package/dist/esm/limebb-locale-picker.entry.js +1 -1
  55. package/dist/esm/limebb-mention-group-counter.entry.js +2 -2
  56. package/dist/esm/limebb-navigation-button_2.entry.js +3 -3
  57. package/dist/esm/limebb-notification-item.entry.js +1 -1
  58. package/dist/esm/limebb-percentage-visualizer.entry.js +2 -2
  59. package/dist/esm/limebb-property-selector.entry.js +1 -1
  60. package/dist/esm/limebb-text-editor.entry.js +1 -1
  61. package/dist/esm/limebb-trend-indicator.entry.js +1 -1
  62. package/dist/esm/loader.js +1 -1
  63. package/dist/esm/{property-resolution-fde2375e.js → property-resolution-c21a1369.js} +1 -1
  64. package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
  65. package/dist/lime-crm-building-blocks/{p-58782467.entry.js → p-0cd036ed.entry.js} +1 -1
  66. package/dist/lime-crm-building-blocks/p-2725671e.entry.js +1 -0
  67. package/dist/lime-crm-building-blocks/{p-76d81eee.entry.js → p-425eaba2.entry.js} +1 -1
  68. package/dist/lime-crm-building-blocks/{p-79b8b09b.entry.js → p-5cf4898d.entry.js} +1 -1
  69. package/dist/lime-crm-building-blocks/p-67c174d0.entry.js +1 -0
  70. package/dist/lime-crm-building-blocks/{p-2048ac67.entry.js → p-8601eab5.entry.js} +1 -1
  71. package/dist/lime-crm-building-blocks/{p-1034b4a5.entry.js → p-8c2fb1c9.entry.js} +1 -1
  72. package/dist/lime-crm-building-blocks/{p-b57dafef.entry.js → p-92dfc5f8.entry.js} +1 -1
  73. package/dist/lime-crm-building-blocks/{p-8581245a.entry.js → p-a1ee8990.entry.js} +1 -1
  74. package/dist/lime-crm-building-blocks/{p-f79e354b.entry.js → p-abfc7815.entry.js} +1 -1
  75. package/dist/lime-crm-building-blocks/{p-e0ab1554.js → p-b748c770.js} +1 -1
  76. package/dist/lime-crm-building-blocks/{p-89a6c396.entry.js → p-ccf34631.entry.js} +1 -1
  77. package/dist/lime-crm-building-blocks/{p-8fb2e192.entry.js → p-d84874dc.entry.js} +1 -1
  78. package/dist/lime-crm-building-blocks/p-f9efca1d.entry.js +1 -0
  79. package/dist/types/components/lime-query-builder/lime-query-builder.d.ts +9 -6
  80. package/dist/types/components/lime-query-builder/order-by/order-by-editor.d.ts +58 -0
  81. package/dist/types/components/lime-query-builder/order-by/order-by-item.d.ts +37 -0
  82. package/dist/types/components.d.ts +218 -2
  83. package/package.json +1 -1
  84. package/dist/lime-crm-building-blocks/p-323c49bc.entry.js +0 -1
  85. package/dist/lime-crm-building-blocks/p-f22b66f6.entry.js +0 -1
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- 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);
11
+ 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);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -37,6 +37,8 @@
37
37
  "components/lime-query-builder/expressions/lime-query-filter-not.js",
38
38
  "components/lime-query-builder/expressions/lime-query-value-input.js",
39
39
  "components/lime-query-builder/limetype-field/limetype-field.js",
40
+ "components/lime-query-builder/order-by/order-by-editor.js",
41
+ "components/lime-query-builder/order-by/order-by-item.js",
40
42
  "components/lime-query-builder/property-selector/property-selector.js",
41
43
  "components/limeobject/file-viewer/file-viewer.js",
42
44
  "components/limeobject/file-viewer/live-docs-info.js",
@@ -108,8 +108,8 @@
108
108
  }
109
109
 
110
110
  .query-options-controls {
111
- display: grid;
112
- grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
111
+ display: flex;
112
+ flex-direction: column;
113
113
  gap: 1rem;
114
114
  }
115
115
 
@@ -117,7 +117,4 @@
117
117
  .lime-query-builder {
118
118
  gap: 1.5rem;
119
119
  }
120
- .query-options-controls {
121
- grid-template-columns: 1fr;
122
- }
123
120
  }
@@ -75,6 +75,11 @@ export class LimeQueryBuilder {
75
75
  this.limit = value ? Number.parseInt(value, 10) : undefined;
76
76
  this.emitChange();
77
77
  };
78
+ this.handleOrderByChange = (event) => {
79
+ event.stopPropagation();
80
+ this.orderBy = event.detail;
81
+ this.emitChange();
82
+ };
78
83
  this.switchToGui = () => {
79
84
  // Validate JSON before switching
80
85
  try {
@@ -90,6 +95,7 @@ export class LimeQueryBuilder {
90
95
  this.filter = parsed.filter;
91
96
  this.internalResponseFormat = parsed.responseFormat;
92
97
  this.limit = parsed.limit;
98
+ this.orderBy = parsed.orderBy;
93
99
  this.mode = 'gui';
94
100
  this.change.emit(parsed);
95
101
  }
@@ -131,6 +137,7 @@ export class LimeQueryBuilder {
131
137
  this.filter = this.value.filter;
132
138
  this.internalResponseFormat = this.value.responseFormat;
133
139
  this.limit = this.value.limit;
140
+ this.orderBy = this.value.orderBy;
134
141
  }
135
142
  // Initialize code value from prop
136
143
  this.updateCodeValue();
@@ -143,7 +150,7 @@ export class LimeQueryBuilder {
143
150
  render() {
144
151
  const guiSupported = this.checkGuiSupport();
145
152
  const showCodeMode = !this.guiModeEnabled || this.mode === 'code';
146
- return (h("div", { key: '0b4d2bb5b4d503a775d8d3215e1e4c74fdb1eceb', class: "lime-query-builder" }, this.renderLabel(), this.renderModeControls(guiSupported), showCodeMode
153
+ return (h("div", { key: 'f51ae0459c1c7f482f3a790abb4cc3bd60b83e70', class: "lime-query-builder" }, this.renderLabel(), this.renderModeControls(guiSupported), showCodeMode
147
154
  ? this.renderCodeMode(guiSupported)
148
155
  : this.renderGuiMode()));
149
156
  }
@@ -155,27 +162,16 @@ export class LimeQueryBuilder {
155
162
  if (!this.limetype) {
156
163
  return;
157
164
  }
158
- // Use internal state, then default to returning just _id
159
- const responseFormat = this.internalResponseFormat || {
160
- object: {
161
- _id: null,
162
- },
163
- };
164
- const limeQuery = {
165
- limetype: this.limetype,
166
- responseFormat: responseFormat,
167
- filter: this.filter,
168
- };
169
- if (this.limit !== undefined && this.limit > 0) {
170
- limeQuery.limit = this.limit;
171
- }
172
- this.change.emit(limeQuery);
165
+ this.change.emit(this.buildLimeQuery());
173
166
  }
174
167
  updateCodeValue() {
175
168
  if (!this.limetype) {
176
169
  this.codeValue = JSON.stringify(this.value || {}, null, 2);
177
170
  return;
178
171
  }
172
+ this.codeValue = JSON.stringify(this.buildLimeQuery(), null, 2);
173
+ }
174
+ buildLimeQuery() {
179
175
  // Use internal state, then default to returning just _id
180
176
  const responseFormat = this.internalResponseFormat || {
181
177
  object: {
@@ -190,7 +186,10 @@ export class LimeQueryBuilder {
190
186
  if (this.limit !== undefined && this.limit > 0) {
191
187
  limeQuery.limit = this.limit;
192
188
  }
193
- this.codeValue = JSON.stringify(limeQuery, null, 2);
189
+ if (this.orderBy && this.orderBy.length > 0) {
190
+ limeQuery.orderBy = this.orderBy;
191
+ }
192
+ return limeQuery;
194
193
  }
195
194
  checkGuiSupport() {
196
195
  if (!this.limetypes) {
@@ -275,7 +274,7 @@ export class LimeQueryBuilder {
275
274
  if (!this.limetype) {
276
275
  return;
277
276
  }
278
- return (h("div", { class: "query-options-section" }, h("h4", { class: "section-label" }, "Query Options"), h("div", { class: "query-options-controls" }, h("limel-input-field", { label: "Limit", type: "number", value: ((_a = this.limit) === null || _a === void 0 ? void 0 : _a.toString()) || '', placeholder: "No limit", helperText: "Maximum number of results", onChange: this.handleLimitChange }))));
277
+ return (h("div", { class: "query-options-section" }, h("h4", { class: "section-label" }, "Query Options"), h("div", { class: "query-options-controls" }, h("limel-input-field", { label: "Limit", type: "number", value: ((_a = this.limit) === null || _a === void 0 ? void 0 : _a.toString()) || '', placeholder: "No limit", helperText: "Maximum number of results", onChange: this.handleLimitChange }), h("limebb-lime-query-order-by-editor", { platform: this.platform, context: this.context, limetype: this.limetype, value: this.orderBy, onChange: this.handleOrderByChange }))));
279
278
  }
280
279
  renderGuiMode() {
281
280
  return (h("div", { class: "gui-mode" }, this.renderLimetypeSection(), this.renderResponseFormatSection(), this.renderFilterSection(), this.renderQueryOptionsSection()));
@@ -426,7 +425,8 @@ export class LimeQueryBuilder {
426
425
  "limetype": {},
427
426
  "filter": {},
428
427
  "internalResponseFormat": {},
429
- "limit": {}
428
+ "limit": {},
429
+ "orderBy": {}
430
430
  };
431
431
  }
432
432
  static get events() {
@@ -328,6 +328,113 @@ function validateLimeQueryFilterInternal(filter, activeLimetype, limetypes, guiM
328
328
  }
329
329
  return errors;
330
330
  }
331
+ /**
332
+ * Validate orderBy specification
333
+ * @param orderBy Array of orderBy items to validate
334
+ * @param limetypes Record of all available limetypes
335
+ * @param limetype The limetype for this Lime Query
336
+ * @returns Array of validation error messages
337
+ */
338
+ function validateOrderBy(orderBy, limetypes, limetype) {
339
+ const errors = [];
340
+ if (!Array.isArray(orderBy)) {
341
+ errors.push('orderBy must be an array');
342
+ return errors;
343
+ }
344
+ if (!limetype || !limetypes[limetype]) {
345
+ // Can't validate property paths without limetype
346
+ return errors;
347
+ }
348
+ for (const [index, item] of orderBy.entries()) {
349
+ const itemErrors = validateOrderByItem(item, index, limetypes, limetype);
350
+ errors.push(...itemErrors);
351
+ }
352
+ return errors;
353
+ }
354
+ /**
355
+ * Validate a single orderBy item
356
+ * @param item The orderBy item to validate
357
+ * @param index The index of the item in the array (for error messages)
358
+ * @param limetypes Record of all available limetypes
359
+ * @param limetype The limetype for this Lime Query
360
+ * @returns Array of validation error messages for this item
361
+ */
362
+ function validateOrderByItem(item, index, limetypes, limetype) {
363
+ const errors = [];
364
+ const objectError = validateOrderByItemIsObject(item, index);
365
+ if (objectError) {
366
+ return [objectError];
367
+ }
368
+ const keys = Object.keys(item);
369
+ const keyError = validateOrderByItemHasSingleKey(keys, index);
370
+ if (keyError) {
371
+ return [keyError];
372
+ }
373
+ const propertyPath = keys[0];
374
+ const direction = item[propertyPath];
375
+ const directionError = validateOrderByDirection(direction, index);
376
+ if (directionError) {
377
+ errors.push(directionError);
378
+ }
379
+ const pathError = validateOrderByPropertyPath(propertyPath, limetypes, limetype, index);
380
+ if (pathError) {
381
+ errors.push(pathError);
382
+ }
383
+ return errors;
384
+ }
385
+ /**
386
+ * Validate that the orderBy item is an object
387
+ * @param item
388
+ * @param index
389
+ */
390
+ function validateOrderByItemIsObject(item, index) {
391
+ if (typeof item !== 'object' || item === null) {
392
+ return `orderBy[${index}] must be an object`;
393
+ }
394
+ return null;
395
+ }
396
+ /**
397
+ * Validate that the orderBy item has exactly one property key
398
+ * @param keys
399
+ * @param index
400
+ */
401
+ function validateOrderByItemHasSingleKey(keys, index) {
402
+ if (keys.length === 0) {
403
+ return `orderBy[${index}] must have a property path`;
404
+ }
405
+ if (keys.length > 1) {
406
+ return `orderBy[${index}] must have exactly one property, got ${keys.length}`;
407
+ }
408
+ return null;
409
+ }
410
+ /**
411
+ * Validate that the sort direction is either ASC or DESC
412
+ * @param direction
413
+ * @param index
414
+ */
415
+ function validateOrderByDirection(direction, index) {
416
+ if (direction !== 'ASC' && direction !== 'DESC') {
417
+ return `orderBy[${index}]: direction must be 'ASC' or 'DESC', got '${direction}'`;
418
+ }
419
+ return null;
420
+ }
421
+ /**
422
+ * Validate that the property path exists on the limetype
423
+ * @param propertyPath
424
+ * @param limetypes
425
+ * @param limetype
426
+ * @param index
427
+ */
428
+ function validateOrderByPropertyPath(propertyPath, limetypes, limetype, index) {
429
+ if (!propertyPath || propertyPath === '') {
430
+ return null;
431
+ }
432
+ const property = getPropertyFromPath(limetypes, limetype, propertyPath);
433
+ if (!property) {
434
+ return `orderBy[${index}]: property path '${propertyPath}' does not exist on limetype '${limetype}'`;
435
+ }
436
+ return null;
437
+ }
331
438
  /**
332
439
  * Validate Lime Query response format and collect errors/limitations
333
440
  * @param responseFormat The response format to validate
@@ -377,14 +484,14 @@ export function isLimeQuerySupported(limeQuery, limetypes, activeLimetype, guiMo
377
484
  if (limeQuery.offset !== undefined && !limeQuery.orderBy) {
378
485
  validationErrors.push('offset requires orderBy to be specified');
379
486
  }
487
+ // Validate orderBy
488
+ if (limeQuery.orderBy) {
489
+ const orderByErrors = validateOrderBy(limeQuery.orderBy, limetypes, limeQuery.limetype);
490
+ validationErrors.push(...orderByErrors);
491
+ }
380
492
  // Check for GUI-unsupported top-level properties
381
- if (guiModeEnabled) {
382
- if (limeQuery.orderBy) {
383
- guiLimitations.push('orderBy is not yet supported in GUI mode');
384
- }
385
- if (limeQuery.offset !== undefined) {
386
- guiLimitations.push('offset is not yet supported in GUI mode');
387
- }
493
+ if (guiModeEnabled && limeQuery.offset !== undefined) {
494
+ guiLimitations.push('offset is not yet supported in GUI mode');
388
495
  }
389
496
  // Validate filter
390
497
  if (limeQuery.filter) {
@@ -0,0 +1,72 @@
1
+ :host(limebb-lime-query-order-by-editor) {
2
+ display: block;
3
+ width: 100%;
4
+ }
5
+
6
+ .order-by-editor {
7
+ display: flex;
8
+ flex-direction: column;
9
+ gap: 1rem;
10
+ padding: 1rem;
11
+ }
12
+
13
+ .header {
14
+ display: flex;
15
+ justify-content: space-between;
16
+ align-items: center;
17
+ gap: 1rem;
18
+ }
19
+ .header h4 {
20
+ margin: 0;
21
+ font-size: 1rem;
22
+ font-weight: 600;
23
+ color: rgb(var(--contrast-1000));
24
+ }
25
+
26
+ .order-by-list {
27
+ display: flex;
28
+ flex-direction: column;
29
+ gap: 1rem;
30
+ padding: 0.5rem;
31
+ border: 1px solid rgb(var(--contrast-300));
32
+ border-radius: 0.25rem;
33
+ background-color: rgb(var(--contrast-50));
34
+ min-height: 4rem;
35
+ }
36
+
37
+ .order-by-item {
38
+ padding: 0.5rem;
39
+ border-radius: 0.25rem;
40
+ transition: background-color 0.2s;
41
+ }
42
+ .order-by-item:hover {
43
+ background-color: rgb(var(--contrast-100));
44
+ }
45
+
46
+ .actions {
47
+ display: flex;
48
+ justify-content: flex-start;
49
+ }
50
+
51
+ .summary {
52
+ display: flex;
53
+ justify-content: space-between;
54
+ align-items: center;
55
+ padding-top: 0.5rem;
56
+ border-top: 1px solid rgb(var(--contrast-300));
57
+ }
58
+ .summary .count {
59
+ font-size: 0.875rem;
60
+ font-weight: 500;
61
+ color: rgb(var(--contrast-900));
62
+ }
63
+
64
+ .empty-state {
65
+ padding: 2rem;
66
+ text-align: center;
67
+ color: rgb(var(--contrast-700));
68
+ font-style: italic;
69
+ }
70
+ .empty-state p {
71
+ margin: 0;
72
+ }
@@ -0,0 +1,252 @@
1
+ import { h, } from "@stencil/core";
2
+ /**
3
+ * Order By Editor Component
4
+ *
5
+ * Allows users to specify the order in which query results should be sorted.
6
+ * Supports sorting by multiple properties with ascending or descending order.
7
+ *
8
+ * Features:
9
+ * - **Property selection**: Choose properties using dropdown navigation
10
+ * - **Sort direction**: Toggle between ascending (ASC) and descending (DESC)
11
+ * - **Multiple sort fields**: Add multiple properties to create complex sorting
12
+ * - **Order matters**: Properties are sorted in the order they appear in the list
13
+ * - **Dynamic list**: Add/remove sort fields
14
+ *
15
+ * The component generates an `OrderByItem[]` array where each item specifies
16
+ * a property path and sort direction.
17
+ *
18
+ * @private
19
+ */
20
+ export class OrderByEditor {
21
+ constructor() {
22
+ /**
23
+ * Optional label
24
+ */
25
+ this.label = 'Sort Order';
26
+ this.items = [];
27
+ this.handleItemChange = (index) => (event) => {
28
+ event.stopPropagation();
29
+ const newItems = [...this.items];
30
+ if (event.detail === null) {
31
+ // Remove item
32
+ newItems.splice(index, 1);
33
+ }
34
+ else {
35
+ // Update item
36
+ newItems[index] = event.detail;
37
+ }
38
+ this.items = newItems;
39
+ this.emitChange();
40
+ };
41
+ this.handleAddSortField = () => {
42
+ // Add new item with empty path and ASC direction
43
+ this.items = [...this.items, { '': 'ASC' }];
44
+ this.emitChange();
45
+ };
46
+ }
47
+ componentWillLoad() {
48
+ if (this.value && this.value.length > 0) {
49
+ this.items = [...this.value];
50
+ }
51
+ }
52
+ handleValueChange(newValue) {
53
+ if (!newValue) {
54
+ return;
55
+ }
56
+ // Check if items have changed
57
+ const itemsChanged = newValue.length !== this.items.length ||
58
+ !newValue.every((item, index) => {
59
+ const currentItem = this.items[index];
60
+ if (!currentItem)
61
+ return false;
62
+ const itemKey = Object.keys(item)[0];
63
+ const currentKey = Object.keys(currentItem)[0];
64
+ return (itemKey === currentKey &&
65
+ item[itemKey] === currentItem[currentKey]);
66
+ });
67
+ if (itemsChanged) {
68
+ this.items = newValue.length > 0 ? [...newValue] : [];
69
+ }
70
+ }
71
+ render() {
72
+ if (!this.limetype) {
73
+ return (h("div", { class: "empty-state" }, h("p", null, "Select a limetype to configure sorting")));
74
+ }
75
+ return (h("div", { class: "order-by-editor" }, h("div", { class: "header" }, h("h4", null, this.label)), this.renderOrderByList(), this.renderActions()));
76
+ }
77
+ renderOrderByList() {
78
+ if (this.items.length === 0) {
79
+ return null;
80
+ }
81
+ return (h("div", { class: "order-by-list" }, this.items.map((item, index) => this.renderItem(item, index))));
82
+ }
83
+ renderActions() {
84
+ return (h("div", { class: "actions" }, h("limel-button", { label: "Add Sort Field", icon: "plus_math", onClick: this.handleAddSortField })));
85
+ }
86
+ renderItem(item, index) {
87
+ const propertyPath = Object.keys(item)[0] || '';
88
+ return (h("limebb-lime-query-order-by-item", { key: `${propertyPath}-${index}`, class: "order-by-item", platform: this.platform, context: this.context, limetype: this.limetype, item: item, onItemChange: this.handleItemChange(index) }));
89
+ }
90
+ emitChange() {
91
+ this.change.emit(this.items);
92
+ }
93
+ static get is() { return "limebb-lime-query-order-by-editor"; }
94
+ static get encapsulation() { return "shadow"; }
95
+ static get originalStyleUrls() {
96
+ return {
97
+ "$": ["order-by-editor.scss"]
98
+ };
99
+ }
100
+ static get styleUrls() {
101
+ return {
102
+ "$": ["order-by-editor.css"]
103
+ };
104
+ }
105
+ static get properties() {
106
+ return {
107
+ "platform": {
108
+ "type": "unknown",
109
+ "mutable": false,
110
+ "complexType": {
111
+ "original": "LimeWebComponentPlatform",
112
+ "resolved": "LimeWebComponentPlatform",
113
+ "references": {
114
+ "LimeWebComponentPlatform": {
115
+ "location": "import",
116
+ "path": "@limetech/lime-web-components",
117
+ "id": "node_modules::LimeWebComponentPlatform"
118
+ }
119
+ }
120
+ },
121
+ "required": false,
122
+ "optional": false,
123
+ "docs": {
124
+ "tags": [],
125
+ "text": "Platform service provider"
126
+ },
127
+ "getter": false,
128
+ "setter": false
129
+ },
130
+ "context": {
131
+ "type": "unknown",
132
+ "mutable": false,
133
+ "complexType": {
134
+ "original": "LimeWebComponentContext",
135
+ "resolved": "LimeWebComponentContext",
136
+ "references": {
137
+ "LimeWebComponentContext": {
138
+ "location": "import",
139
+ "path": "@limetech/lime-web-components",
140
+ "id": "node_modules::LimeWebComponentContext"
141
+ }
142
+ }
143
+ },
144
+ "required": false,
145
+ "optional": false,
146
+ "docs": {
147
+ "tags": [],
148
+ "text": "Component context"
149
+ },
150
+ "getter": false,
151
+ "setter": false
152
+ },
153
+ "limetype": {
154
+ "type": "string",
155
+ "mutable": false,
156
+ "complexType": {
157
+ "original": "string",
158
+ "resolved": "string",
159
+ "references": {}
160
+ },
161
+ "required": false,
162
+ "optional": false,
163
+ "docs": {
164
+ "tags": [],
165
+ "text": "The limetype to select properties from"
166
+ },
167
+ "getter": false,
168
+ "setter": false,
169
+ "attribute": "limetype",
170
+ "reflect": false
171
+ },
172
+ "value": {
173
+ "type": "unknown",
174
+ "mutable": false,
175
+ "complexType": {
176
+ "original": "OrderByItem[]",
177
+ "resolved": "OrderByItem[] | undefined",
178
+ "references": {
179
+ "OrderByItem": {
180
+ "location": "import",
181
+ "path": "../lime-query.types",
182
+ "id": "src/components/lime-query-builder/lime-query.types.ts::OrderByItem"
183
+ }
184
+ }
185
+ },
186
+ "required": false,
187
+ "optional": true,
188
+ "docs": {
189
+ "tags": [],
190
+ "text": "Current order by specification"
191
+ },
192
+ "getter": false,
193
+ "setter": false
194
+ },
195
+ "label": {
196
+ "type": "string",
197
+ "mutable": false,
198
+ "complexType": {
199
+ "original": "string",
200
+ "resolved": "string",
201
+ "references": {}
202
+ },
203
+ "required": false,
204
+ "optional": false,
205
+ "docs": {
206
+ "tags": [],
207
+ "text": "Optional label"
208
+ },
209
+ "getter": false,
210
+ "setter": false,
211
+ "attribute": "label",
212
+ "reflect": false,
213
+ "defaultValue": "'Sort Order'"
214
+ }
215
+ };
216
+ }
217
+ static get states() {
218
+ return {
219
+ "items": {}
220
+ };
221
+ }
222
+ static get events() {
223
+ return [{
224
+ "method": "change",
225
+ "name": "change",
226
+ "bubbles": true,
227
+ "cancelable": true,
228
+ "composed": true,
229
+ "docs": {
230
+ "tags": [],
231
+ "text": "Emitted when the order by specification changes"
232
+ },
233
+ "complexType": {
234
+ "original": "OrderByItem[]",
235
+ "resolved": "OrderByItem[]",
236
+ "references": {
237
+ "OrderByItem": {
238
+ "location": "import",
239
+ "path": "../lime-query.types",
240
+ "id": "src/components/lime-query-builder/lime-query.types.ts::OrderByItem"
241
+ }
242
+ }
243
+ }
244
+ }];
245
+ }
246
+ static get watchers() {
247
+ return [{
248
+ "propName": "value",
249
+ "methodName": "handleValueChange"
250
+ }];
251
+ }
252
+ }