@limetech/lime-crm-building-blocks 1.127.0 → 1.128.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 (138) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/{index.esm-BSgM4tyh.js → index.esm-g8gOl7RV.js} +93 -1
  3. package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
  4. package/dist/cjs/{lime-query-validation-DhL0xwur.js → lime-query-validation-DTurSvtv.js} +1 -1
  5. package/dist/cjs/limebb-browser.cjs.entry.js +1 -1
  6. package/dist/cjs/limebb-chat-icon-list_3.cjs.entry.js +1 -1
  7. package/dist/cjs/limebb-chat-list.cjs.entry.js +1 -1
  8. package/dist/cjs/limebb-component-config.cjs.entry.js +1 -1
  9. package/dist/cjs/limebb-component-picker.cjs.entry.js +1 -1
  10. package/dist/cjs/limebb-composer-toolbar.cjs.entry.js +1 -1
  11. package/dist/cjs/limebb-currency-picker.cjs.entry.js +1 -1
  12. package/dist/cjs/limebb-data-cells.cjs.entry.js +1 -1
  13. package/dist/cjs/limebb-date-picker.cjs.entry.js +1 -1
  14. package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +1 -1
  15. package/dist/cjs/limebb-feed.cjs.entry.js +1 -1
  16. package/dist/cjs/limebb-info-tile.cjs.entry.js +2 -2
  17. package/dist/cjs/limebb-kanban-group.cjs.entry.js +1 -1
  18. package/dist/cjs/limebb-kanban-item.cjs.entry.js +1 -1
  19. package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +2 -2
  20. package/dist/cjs/limebb-lime-query-filter-builder.cjs.entry.js +78 -0
  21. package/dist/cjs/limebb-lime-query-filter-comparison_2.cjs.entry.js +1 -1
  22. package/dist/cjs/limebb-lime-query-filter-group_3.cjs.entry.js +1 -1
  23. package/dist/cjs/{limebb-lime-query-filter-builder_3.cjs.entry.js → limebb-lime-query-order-by-editor_2.cjs.entry.js} +2 -75
  24. package/dist/cjs/limebb-lime-query-response-format-builder.cjs.entry.js +2 -2
  25. package/dist/cjs/limebb-limeobject-file-viewer.cjs.entry.js +1 -1
  26. package/dist/cjs/limebb-loader.cjs.entry.js +1 -1
  27. package/dist/cjs/limebb-locale-picker.cjs.entry.js +1 -1
  28. package/dist/cjs/limebb-mention.cjs.entry.js +1 -1
  29. package/dist/cjs/limebb-notification-item.cjs.entry.js +1 -1
  30. package/dist/cjs/limebb-notification-list.cjs.entry.js +1 -1
  31. package/dist/cjs/limebb-object-chip.cjs.entry.js +2 -2
  32. package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +1 -1
  33. package/dist/cjs/limebb-property-selector.cjs.entry.js +2 -2
  34. package/dist/cjs/limebb-rule-arg-filter-editor.cjs.entry.js +45 -0
  35. package/dist/cjs/limebb-rule-chip-popover.cjs.entry.js +15 -2
  36. package/dist/cjs/limebb-rule-editor.cjs.entry.js +1 -1
  37. package/dist/cjs/limebb-rule-gate.cjs.entry.js +2 -2
  38. package/dist/cjs/limebb-text-editor.cjs.entry.js +2 -2
  39. package/dist/cjs/limebb-trend-indicator.cjs.entry.js +1 -1
  40. package/dist/cjs/{limetype-DQeJRVNw.js → limetype-DJNXULgk.js} +1 -1
  41. package/dist/cjs/loader.cjs.js +1 -1
  42. package/dist/collection/collection-manifest.json +1 -0
  43. package/dist/collection/components/rule-editor/rule-arg-filter-editor/rule-arg-filter-editor.css +3 -0
  44. package/dist/collection/components/rule-editor/rule-arg-filter-editor/rule-arg-filter-editor.js +166 -0
  45. package/dist/collection/components/rule-editor/rule-chip-popover/rule-chip-popover.js +16 -3
  46. package/dist/collection/components/rule-gate/rule-gate.css +1 -1
  47. package/dist/components/index.esm.js +1 -1
  48. package/dist/components/limebb-rule-arg-filter-editor.d.ts +11 -0
  49. package/dist/components/limebb-rule-arg-filter-editor.js +1 -0
  50. package/dist/components/limebb-rule-gate.js +1 -1
  51. package/dist/components/rule-chip-popover.js +1 -1
  52. package/dist/esm/{index.esm-oW1YVf33.js → index.esm-CJU4N9K8.js} +91 -1
  53. package/dist/esm/lime-crm-building-blocks.js +1 -1
  54. package/dist/esm/{lime-query-validation-C3jEHfxk.js → lime-query-validation-COGfPUFN.js} +1 -1
  55. package/dist/esm/limebb-browser.entry.js +1 -1
  56. package/dist/esm/limebb-chat-icon-list_3.entry.js +1 -1
  57. package/dist/esm/limebb-chat-list.entry.js +1 -1
  58. package/dist/esm/limebb-component-config.entry.js +1 -1
  59. package/dist/esm/limebb-component-picker.entry.js +1 -1
  60. package/dist/esm/limebb-composer-toolbar.entry.js +1 -1
  61. package/dist/esm/limebb-currency-picker.entry.js +1 -1
  62. package/dist/esm/limebb-data-cells.entry.js +1 -1
  63. package/dist/esm/limebb-date-picker.entry.js +1 -1
  64. package/dist/esm/limebb-feed-timeline-item.entry.js +1 -1
  65. package/dist/esm/limebb-feed.entry.js +1 -1
  66. package/dist/esm/limebb-info-tile.entry.js +2 -2
  67. package/dist/esm/limebb-kanban-group.entry.js +1 -1
  68. package/dist/esm/limebb-kanban-item.entry.js +1 -1
  69. package/dist/esm/limebb-lime-query-builder.entry.js +2 -2
  70. package/dist/esm/limebb-lime-query-filter-builder.entry.js +76 -0
  71. package/dist/esm/limebb-lime-query-filter-comparison_2.entry.js +1 -1
  72. package/dist/esm/limebb-lime-query-filter-group_3.entry.js +1 -1
  73. package/dist/esm/{limebb-lime-query-filter-builder_3.entry.js → limebb-lime-query-order-by-editor_2.entry.js} +3 -75
  74. package/dist/esm/limebb-lime-query-response-format-builder.entry.js +2 -2
  75. package/dist/esm/limebb-limeobject-file-viewer.entry.js +1 -1
  76. package/dist/esm/limebb-loader.entry.js +1 -1
  77. package/dist/esm/limebb-locale-picker.entry.js +1 -1
  78. package/dist/esm/limebb-mention.entry.js +1 -1
  79. package/dist/esm/limebb-notification-item.entry.js +1 -1
  80. package/dist/esm/limebb-notification-list.entry.js +1 -1
  81. package/dist/esm/limebb-object-chip.entry.js +2 -2
  82. package/dist/esm/limebb-percentage-visualizer.entry.js +1 -1
  83. package/dist/esm/limebb-property-selector.entry.js +2 -2
  84. package/dist/esm/limebb-rule-arg-filter-editor.entry.js +43 -0
  85. package/dist/esm/limebb-rule-chip-popover.entry.js +15 -2
  86. package/dist/esm/limebb-rule-editor.entry.js +1 -1
  87. package/dist/esm/limebb-rule-gate.entry.js +2 -2
  88. package/dist/esm/limebb-text-editor.entry.js +2 -2
  89. package/dist/esm/limebb-trend-indicator.entry.js +1 -1
  90. package/dist/esm/{limetype-CBSX93Mo.js → limetype-Dc4uQPMG.js} +1 -1
  91. package/dist/esm/loader.js +1 -1
  92. package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
  93. package/dist/lime-crm-building-blocks/{p-148fe32c.entry.js → p-02565865.entry.js} +1 -1
  94. package/dist/lime-crm-building-blocks/{p-3fd4e0a1.entry.js → p-08eb070d.entry.js} +1 -1
  95. package/dist/lime-crm-building-blocks/{p-6226829d.entry.js → p-2a3098a7.entry.js} +1 -1
  96. package/dist/lime-crm-building-blocks/{p-931ef83d.entry.js → p-2a46f4be.entry.js} +1 -1
  97. package/dist/lime-crm-building-blocks/{p-9bc6a1b7.entry.js → p-31d8f414.entry.js} +1 -1
  98. package/dist/lime-crm-building-blocks/{p-4f1eca0d.entry.js → p-32c3789e.entry.js} +1 -1
  99. package/dist/lime-crm-building-blocks/{p-5496f907.entry.js → p-34eb61da.entry.js} +1 -1
  100. package/dist/lime-crm-building-blocks/{p-5b830c09.entry.js → p-3a112b17.entry.js} +1 -1
  101. package/dist/lime-crm-building-blocks/{p-7cc615c8.entry.js → p-46c00a4b.entry.js} +1 -1
  102. package/dist/lime-crm-building-blocks/{p-e79208ba.entry.js → p-48c2b617.entry.js} +1 -1
  103. package/dist/lime-crm-building-blocks/{p-bb3f1fa5.entry.js → p-48deac2a.entry.js} +1 -1
  104. package/dist/lime-crm-building-blocks/{p-a0fb1d65.entry.js → p-5743a74e.entry.js} +1 -1
  105. package/dist/lime-crm-building-blocks/{p-50e5c571.entry.js → p-6002654f.entry.js} +1 -1
  106. package/dist/lime-crm-building-blocks/p-6ff38954.entry.js +1 -0
  107. package/dist/lime-crm-building-blocks/p-7acd06eb.entry.js +1 -0
  108. package/dist/lime-crm-building-blocks/p-7c96b265.entry.js +1 -0
  109. package/dist/lime-crm-building-blocks/{p-16d36b76.entry.js → p-89b43ac5.entry.js} +1 -1
  110. package/dist/lime-crm-building-blocks/{p-88285dbb.entry.js → p-97e6712f.entry.js} +1 -1
  111. package/dist/lime-crm-building-blocks/{p-faa89d77.entry.js → p-9c27e558.entry.js} +1 -1
  112. package/dist/lime-crm-building-blocks/{p-38c2fe60.entry.js → p-9e5862de.entry.js} +1 -1
  113. package/dist/lime-crm-building-blocks/{p-GT4hqR5i.js → p-BV8CPdbi.js} +1 -1
  114. package/dist/lime-crm-building-blocks/{p-VjTMZY3E.js → p-BsNp-hBU.js} +1 -1
  115. package/dist/lime-crm-building-blocks/p-C84z8BwL.js +1 -0
  116. package/dist/lime-crm-building-blocks/{p-7759fc0c.entry.js → p-a3556715.entry.js} +1 -1
  117. package/dist/lime-crm-building-blocks/{p-82af1ade.entry.js → p-b24b7338.entry.js} +1 -1
  118. package/dist/lime-crm-building-blocks/{p-4e5f55aa.entry.js → p-bd6e12e6.entry.js} +1 -1
  119. package/dist/lime-crm-building-blocks/{p-a9ffe56f.entry.js → p-c394c1f6.entry.js} +1 -1
  120. package/dist/lime-crm-building-blocks/{p-6af7d0d2.entry.js → p-c678f22f.entry.js} +1 -1
  121. package/dist/lime-crm-building-blocks/p-c6fee2bd.entry.js +1 -0
  122. package/dist/lime-crm-building-blocks/{p-5c5788de.entry.js → p-c9003b76.entry.js} +1 -1
  123. package/dist/lime-crm-building-blocks/{p-625623b7.entry.js → p-ce3e52ac.entry.js} +1 -1
  124. package/dist/lime-crm-building-blocks/{p-56a65792.entry.js → p-d910699a.entry.js} +1 -1
  125. package/dist/lime-crm-building-blocks/{p-cf76665c.entry.js → p-e4fe45d3.entry.js} +1 -1
  126. package/dist/lime-crm-building-blocks/{p-01ecd249.entry.js → p-e6083593.entry.js} +1 -1
  127. package/dist/lime-crm-building-blocks/p-e7a10082.entry.js +1 -0
  128. package/dist/lime-crm-building-blocks/{p-0ee533c9.entry.js → p-eb8d58ab.entry.js} +1 -1
  129. package/dist/lime-crm-building-blocks/{p-fe4811a1.entry.js → p-ed1e7e34.entry.js} +1 -1
  130. package/dist/lime-crm-building-blocks/{p-b328389c.entry.js → p-fdd236ff.entry.js} +1 -1
  131. package/dist/types/components/rule-editor/rule-arg-filter-editor/rule-arg-filter-editor.d.ts +30 -0
  132. package/dist/types/components/rule-editor/rule-chip-popover/rule-chip-popover.d.ts +4 -0
  133. package/dist/types/components.d.ts +97 -0
  134. package/package.json +1 -1
  135. package/dist/lime-crm-building-blocks/p-3e4cc2a1.entry.js +0 -1
  136. package/dist/lime-crm-building-blocks/p-8c8bbbd4.entry.js +0 -1
  137. package/dist/lime-crm-building-blocks/p-e6374017.entry.js +0 -1
  138. package/dist/lime-crm-building-blocks/p-ndni-0im.js +0 -1
@@ -28,6 +28,7 @@ import { PropertySelectionItem } from "./components/lime-query-builder/property-
28
28
  import { LanguagePickerType } from "./components/locale-picker/language-picker.types";
29
29
  import { NavigationButtonType } from "./components/navigation-button/navigation-button.types";
30
30
  import { NotificationItem } from "./components/notification-list/notification-item/notification-item.types";
31
+ import { RuleArgFilterEditorValue } from "./components/rule-editor/rule-arg-filter-editor/rule-arg-filter-editor";
31
32
  import { TriggerMap } from "./components/text-editor/text-editor.types";
32
33
  import { EnhancedEditorMetadata } from "./components/text-editor/uploader/building-blocks-upload-handler";
33
34
  export { AlertType } from "./components/alert-dialog/alert-dialog.types";
@@ -53,6 +54,7 @@ export { PropertySelectionItem } from "./components/lime-query-builder/property-
53
54
  export { LanguagePickerType } from "./components/locale-picker/language-picker.types";
54
55
  export { NavigationButtonType } from "./components/navigation-button/navigation-button.types";
55
56
  export { NotificationItem } from "./components/notification-list/notification-item/notification-item.types";
57
+ export { RuleArgFilterEditorValue } from "./components/rule-editor/rule-arg-filter-editor/rule-arg-filter-editor";
56
58
  export { TriggerMap } from "./components/text-editor/text-editor.types";
57
59
  export { EnhancedEditorMetadata } from "./components/text-editor/uploader/building-blocks-upload-handler";
58
60
  export namespace Components {
@@ -2204,6 +2206,29 @@ export namespace Components {
2204
2206
  */
2205
2207
  "value": string;
2206
2208
  }
2209
+ /**
2210
+ * Args editor for `limetech.limeobject-matches-filter`. Reads the
2211
+ * `limetype` via `@SelectContext('context')`; renders an informational
2212
+ * callout when no ancestor provides one.
2213
+ * @alpha
2214
+ * @private
2215
+ */
2216
+ interface LimebbRuleArgFilterEditor {
2217
+ /**
2218
+ * The context describing where this component is running. The context provides information about the current limetype and record ID (if viewing/editing a specific record). Components can use this to load relevant data and understand their operating environment.
2219
+ */
2220
+ "context": LimeWebComponentContext;
2221
+ /**
2222
+ * Reference to the platform service container. Use this to access all platform services like repositories, HTTP client, command bus, navigator, and more. The platform instance is shared across all components in the same application context.
2223
+ */
2224
+ "platform": LimeWebComponentPlatform;
2225
+ /**
2226
+ * The value of the current property
2227
+ * @inheritdoc
2228
+ * @default {}
2229
+ */
2230
+ "value": RuleArgFilterEditorValue;
2231
+ }
2207
2232
  /**
2208
2233
  * Popover content for a rule-editor chip. Carries its own styles so
2209
2234
  * they travel with the element when `limel-popover` portals it out of
@@ -2211,6 +2236,9 @@ export namespace Components {
2211
2236
  * @private
2212
2237
  */
2213
2238
  interface LimebbRuleChipPopover {
2239
+ /**
2240
+ * Bridges the rule editor's context across the `limel-popover` portal.
2241
+ */
2214
2242
  "context": LimeWebComponentContext;
2215
2243
  /**
2216
2244
  * @default false
@@ -2795,6 +2823,10 @@ export interface LimebbPropertySelectorCustomEvent<T> extends CustomEvent<T> {
2795
2823
  detail: T;
2796
2824
  target: HTMLLimebbPropertySelectorElement;
2797
2825
  }
2826
+ export interface LimebbRuleArgFilterEditorCustomEvent<T> extends CustomEvent<T> {
2827
+ detail: T;
2828
+ target: HTMLLimebbRuleArgFilterEditorElement;
2829
+ }
2798
2830
  export interface LimebbRuleChipPopoverCustomEvent<T> extends CustomEvent<T> {
2799
2831
  detail: T;
2800
2832
  target: HTMLLimebbRuleChipPopoverElement;
@@ -4305,6 +4337,30 @@ declare global {
4305
4337
  prototype: HTMLLimebbPropertySelectorElement;
4306
4338
  new (): HTMLLimebbPropertySelectorElement;
4307
4339
  };
4340
+ interface HTMLLimebbRuleArgFilterEditorElementEventMap {
4341
+ "change": RuleArgFilterEditorValue;
4342
+ }
4343
+ /**
4344
+ * Args editor for `limetech.limeobject-matches-filter`. Reads the
4345
+ * `limetype` via `@SelectContext('context')`; renders an informational
4346
+ * callout when no ancestor provides one.
4347
+ * @alpha
4348
+ * @private
4349
+ */
4350
+ interface HTMLLimebbRuleArgFilterEditorElement extends Components.LimebbRuleArgFilterEditor, HTMLStencilElement {
4351
+ addEventListener<K extends keyof HTMLLimebbRuleArgFilterEditorElementEventMap>(type: K, listener: (this: HTMLLimebbRuleArgFilterEditorElement, ev: LimebbRuleArgFilterEditorCustomEvent<HTMLLimebbRuleArgFilterEditorElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
4352
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
4353
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
4354
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
4355
+ removeEventListener<K extends keyof HTMLLimebbRuleArgFilterEditorElementEventMap>(type: K, listener: (this: HTMLLimebbRuleArgFilterEditorElement, ev: LimebbRuleArgFilterEditorCustomEvent<HTMLLimebbRuleArgFilterEditorElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
4356
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
4357
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
4358
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
4359
+ }
4360
+ var HTMLLimebbRuleArgFilterEditorElement: {
4361
+ prototype: HTMLLimebbRuleArgFilterEditorElement;
4362
+ new (): HTMLLimebbRuleArgFilterEditorElement;
4363
+ };
4308
4364
  interface HTMLLimebbRuleChipPopoverElementEventMap {
4309
4365
  "negate": boolean;
4310
4366
  "updateArgs": JsonValue;
@@ -4606,6 +4662,7 @@ declare global {
4606
4662
  "limebb-object-chip": HTMLLimebbObjectChipElement;
4607
4663
  "limebb-percentage-visualizer": HTMLLimebbPercentageVisualizerElement;
4608
4664
  "limebb-property-selector": HTMLLimebbPropertySelectorElement;
4665
+ "limebb-rule-arg-filter-editor": HTMLLimebbRuleArgFilterEditorElement;
4609
4666
  "limebb-rule-chip-popover": HTMLLimebbRuleChipPopoverElement;
4610
4667
  "limebb-rule-editor": HTMLLimebbRuleEditorElement;
4611
4668
  "limebb-rule-gate": HTMLLimebbRuleGateElement;
@@ -6953,6 +7010,34 @@ declare namespace LocalJSX {
6953
7010
  */
6954
7011
  "value"?: string;
6955
7012
  }
7013
+ /**
7014
+ * Args editor for `limetech.limeobject-matches-filter`. Reads the
7015
+ * `limetype` via `@SelectContext('context')`; renders an informational
7016
+ * callout when no ancestor provides one.
7017
+ * @alpha
7018
+ * @private
7019
+ */
7020
+ interface LimebbRuleArgFilterEditor {
7021
+ /**
7022
+ * The context describing where this component is running. The context provides information about the current limetype and record ID (if viewing/editing a specific record). Components can use this to load relevant data and understand their operating environment.
7023
+ */
7024
+ "context"?: LimeWebComponentContext;
7025
+ /**
7026
+ * The event to emit when the value of the current property has changed
7027
+ * @inheritdoc
7028
+ */
7029
+ "onChange"?: (event: LimebbRuleArgFilterEditorCustomEvent<RuleArgFilterEditorValue>) => void;
7030
+ /**
7031
+ * Reference to the platform service container. Use this to access all platform services like repositories, HTTP client, command bus, navigator, and more. The platform instance is shared across all components in the same application context.
7032
+ */
7033
+ "platform"?: LimeWebComponentPlatform;
7034
+ /**
7035
+ * The value of the current property
7036
+ * @inheritdoc
7037
+ * @default {}
7038
+ */
7039
+ "value"?: RuleArgFilterEditorValue;
7040
+ }
6956
7041
  /**
6957
7042
  * Popover content for a rule-editor chip. Carries its own styles so
6958
7043
  * they travel with the element when `limel-popover` portals it out of
@@ -6960,6 +7045,9 @@ declare namespace LocalJSX {
6960
7045
  * @private
6961
7046
  */
6962
7047
  interface LimebbRuleChipPopover {
7048
+ /**
7049
+ * Bridges the rule editor's context across the `limel-popover` portal.
7050
+ */
6963
7051
  "context"?: LimeWebComponentContext;
6964
7052
  /**
6965
7053
  * @default false
@@ -7795,6 +7883,7 @@ declare namespace LocalJSX {
7795
7883
  "limebb-object-chip": Omit<LimebbObjectChip, keyof LimebbObjectChipAttributes> & { [K in keyof LimebbObjectChip & keyof LimebbObjectChipAttributes]?: LimebbObjectChip[K] } & { [K in keyof LimebbObjectChip & keyof LimebbObjectChipAttributes as `attr:${K}`]?: LimebbObjectChipAttributes[K] } & { [K in keyof LimebbObjectChip & keyof LimebbObjectChipAttributes as `prop:${K}`]?: LimebbObjectChip[K] };
7796
7884
  "limebb-percentage-visualizer": Omit<LimebbPercentageVisualizer, keyof LimebbPercentageVisualizerAttributes> & { [K in keyof LimebbPercentageVisualizer & keyof LimebbPercentageVisualizerAttributes]?: LimebbPercentageVisualizer[K] } & { [K in keyof LimebbPercentageVisualizer & keyof LimebbPercentageVisualizerAttributes as `attr:${K}`]?: LimebbPercentageVisualizerAttributes[K] } & { [K in keyof LimebbPercentageVisualizer & keyof LimebbPercentageVisualizerAttributes as `prop:${K}`]?: LimebbPercentageVisualizer[K] };
7797
7885
  "limebb-property-selector": Omit<LimebbPropertySelector, keyof LimebbPropertySelectorAttributes> & { [K in keyof LimebbPropertySelector & keyof LimebbPropertySelectorAttributes]?: LimebbPropertySelector[K] } & { [K in keyof LimebbPropertySelector & keyof LimebbPropertySelectorAttributes as `attr:${K}`]?: LimebbPropertySelectorAttributes[K] } & { [K in keyof LimebbPropertySelector & keyof LimebbPropertySelectorAttributes as `prop:${K}`]?: LimebbPropertySelector[K] };
7886
+ "limebb-rule-arg-filter-editor": LimebbRuleArgFilterEditor;
7798
7887
  "limebb-rule-chip-popover": Omit<LimebbRuleChipPopover, keyof LimebbRuleChipPopoverAttributes> & { [K in keyof LimebbRuleChipPopover & keyof LimebbRuleChipPopoverAttributes]?: LimebbRuleChipPopover[K] } & { [K in keyof LimebbRuleChipPopover & keyof LimebbRuleChipPopoverAttributes as `attr:${K}`]?: LimebbRuleChipPopoverAttributes[K] } & { [K in keyof LimebbRuleChipPopover & keyof LimebbRuleChipPopoverAttributes as `prop:${K}`]?: LimebbRuleChipPopover[K] };
7799
7888
  "limebb-rule-editor": Omit<LimebbRuleEditor, keyof LimebbRuleEditorAttributes> & { [K in keyof LimebbRuleEditor & keyof LimebbRuleEditorAttributes]?: LimebbRuleEditor[K] } & { [K in keyof LimebbRuleEditor & keyof LimebbRuleEditorAttributes as `attr:${K}`]?: LimebbRuleEditorAttributes[K] } & { [K in keyof LimebbRuleEditor & keyof LimebbRuleEditorAttributes as `prop:${K}`]?: LimebbRuleEditor[K] };
7800
7889
  "limebb-rule-gate": LimebbRuleGate;
@@ -8552,6 +8641,14 @@ declare module "@stencil/core" {
8552
8641
  * @private
8553
8642
  */
8554
8643
  "limebb-property-selector": LocalJSX.IntrinsicElements["limebb-property-selector"] & JSXBase.HTMLAttributes<HTMLLimebbPropertySelectorElement>;
8644
+ /**
8645
+ * Args editor for `limetech.limeobject-matches-filter`. Reads the
8646
+ * `limetype` via `@SelectContext('context')`; renders an informational
8647
+ * callout when no ancestor provides one.
8648
+ * @alpha
8649
+ * @private
8650
+ */
8651
+ "limebb-rule-arg-filter-editor": LocalJSX.IntrinsicElements["limebb-rule-arg-filter-editor"] & JSXBase.HTMLAttributes<HTMLLimebbRuleArgFilterEditorElement>;
8555
8652
  /**
8556
8653
  * Popover content for a rule-editor chip. Carries its own styles so
8557
8654
  * they travel with the element when `limel-popover` portals it out of
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/lime-crm-building-blocks",
3
- "version": "1.127.0",
3
+ "version": "1.128.0",
4
4
  "description": "A home for shared components meant for use with Lime CRM",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -1 +0,0 @@
1
- import{r as t,c as e,h as i,H as r}from"./p-BIwHMk6j.js";import{n as s,b as o}from"./p-ndni-0im.js";import{g as n}from"./p-GT4hqR5i.js";import{i as l}from"./p-CkTg5UPD.js";import{b as a}from"./p-CKEnwX6j.js";import{i as h,a as d,b as m}from"./p-BgAfMcRA.js";import"./p-CtcTT7BK.js";function c(t){return"string"==typeof t||!d(t)&&h(t)&&"[object String]"==m(t)}const p=class{constructor(i){t(this,i),this.expressionChange=e(this,"expressionChange"),this.handleAddFirstCondition=()=>{this.expressionChange.emit({key:"",op:s.EQUALS,exp:""})},this.handlePromoteAndAdd=()=>{this.expression&&this.expressionChange.emit({op:s.AND,exp:[this.expression,{key:"",op:s.EQUALS,exp:""}]})},this.handleExpressionChange=t=>{var e;t.stopPropagation(),this.expressionChange.emit(null!==(e=t.detail)&&void 0!==e?e:void 0)}}render(){return this.expression?this.needsPromotion()?this.renderWithPromotionButton():i("limebb-lime-query-filter-expression",{platform:this.platform,context:this.context,limetype:this.limetype,activeLimetype:this.activeLimetype,expression:this.expression,onExpressionChange:this.handleExpressionChange}):this.renderEmptyState()}needsPromotion(){return!!this.expression&&("key"in this.expression||this.expression.op===s.NOT)}renderEmptyState(){return i("limel-button",{label:"Condition",icon:{name:"plus_math",title:"Add"},onClick:this.handleAddFirstCondition})}renderWithPromotionButton(){return i("div",{class:"expression-with-promotion"},i("limebb-lime-query-filter-expression",{platform:this.platform,context:this.context,limetype:this.limetype,activeLimetype:this.activeLimetype,expression:this.expression,onExpressionChange:this.handleExpressionChange}),i("limel-button",{label:"Add another condition",icon:"plus_math",onClick:this.handlePromoteAndAdd}))}};p.style=".expression-with-promotion{display:flex;flex-direction:column;gap:1rem}limel-button{width:100%}.query-options-section{margin-top:1rem}";const u=class{constructor(i){t(this,i),this.change=e(this,"change"),this.label="Sort Order",this.items=[],this.handleItemChange=t=>e=>{e.stopPropagation();const i=[...this.items];null===e.detail?i.splice(t,1):i[t]=e.detail,this.items=i,this.emitChange()},this.handleAddSortField=()=>{this.items=[...this.items,{"":"ASC"}],this.emitChange()}}componentWillLoad(){this.value&&this.value.length>0&&(this.items=[...this.value])}handleValueChange(t){t&&(t.length!==this.items.length||!t.every(((t,e)=>{const i=this.items[e];if(!i)return!1;const r=Object.keys(t)[0],s=Object.keys(i)[0];return r===s&&t[r]===i[s]})))&&(this.items=t.length>0?[...t]:[])}render(){return i(r,{key:"6ef5ee3cf7b67cc0f821272f9d552eab48b60065"},this.renderEmptyState(),this.renderOrderByEditor())}renderEmptyState(){return this.limetype?null:i("div",{class:"empty-state"},i("p",null,"Select a limetype to configure sorting"))}renderOrderByEditor(){return this.limetype?[this.renderHeader(),this.renderOrderByList(),this.renderActions()]:null}renderHeader(){return i("limel-header",{class:"is-narrow",heading:this.label,icon:"sorting_arrows"})}renderOrderByList(){return 0===this.items.length?null:i("div",{class:"order-by-list"},this.items.map(((t,e)=>this.renderItem(t,e))))}renderActions(){return i("limel-button",{label:"Add Sort Field",icon:"plus_math",onClick:this.handleAddSortField})}renderItem(t,e){const r=Object.keys(t)[0]||"";return i("limebb-lime-query-order-by-item",{key:`${r}-${e}`,class:"order-by-item",platform:this.platform,context:this.context,limetype:this.limetype,item:t,onItemChange:this.handleItemChange(e)})}emitChange(){this.change.emit(this.items)}static get watchers(){return{value:[{handleValueChange:0}]}}};u.style=":host(limebb-lime-query-order-by-editor){display:flex;flex-direction:column;gap:1rem;padding:1rem 0}.header{display:flex;justify-content:space-between;align-items:center;gap:1rem}.header h4{margin:0;font-size:1rem;font-weight:600;color:rgb(var(--contrast-1000))}.order-by-list{display:flex;flex-direction:column;gap:1rem;border:1px solid rgb(var(--contrast-300));border-radius:0.25rem;background-color:rgb(var(--contrast-50));min-height:4rem}.order-by-item{padding:0.5rem;border-radius:0.25rem;transition:background-color 0.2s}.order-by-item:hover{background-color:rgb(var(--contrast-100))}.actions{display:flex;width:100%}.summary{display:flex;justify-content:space-between;align-items:center;padding-top:0.5rem;border-top:1px solid rgb(var(--contrast-300))}.summary .count{font-size:0.875rem;font-weight:500;color:rgb(var(--contrast-900))}limel-header.is-narrow{--header-top-right-left-border-radius:0;width:calc(100% + var(--limebb-lime-query-builder-visual-mode-padding) * 2);margin-left:calc(var(--limebb-lime-query-builder-visual-mode-padding) * -1)}.empty-state{padding:0 2rem;text-align:center;color:rgb(var(--contrast-700))}";const b=["string","text","phone","integer","decimal","percent","time","date","year","quarter","month","yesno","link","user","xml","option","set","file","system"],y=b.filter((t=>"system"!==t));y.push("belongsto","hasone","hasmany","hasandbelongstomany");const g=class{constructor(i){t(this,i),this.change=e(this,"change"),this.propertyFields=[],this.fieldName="limetype",this.handleChange=t=>{t.stopPropagation();let e="";t.detail&&"value"in t.detail&&(e=t.detail.value),this.change.emit(e||void 0)}}componentWillLoad(){const t=this.platform.get(o.Application).getLanguage();this.collator=new Intl.Collator(t,{numeric:!0,sensitivity:"base"})}componentShouldUpdate(t,e,i){var r,s,o,n;return"formInfo"!==i||(o=null===(r=null==t?void 0:t.schema)||void 0===r?void 0:r.oneOf,n=null===(s=null==e?void 0:e.schema)||void 0===s?void 0:s.oneOf,!a(o,n))}render(){var t;const e=this.getLimeTypes().map(f);e.sort(((t,e)=>this.collator.compare(t.text,e.text)));let r=e.find((t=>t.value===this.value)),s=this.invalid;return this.value&&!r&&(s=!0,e.unshift({text:(null===(t=this.limeTypeRepository.getLimeType(this.value))||void 0===t?void 0:t.localname.singular)||this.value,value:this.value}),r=e[0]),e.unshift({text:"",value:""}),i("limel-select",{key:"20a7d5eb86c746d11ad805083be5ef9f5fd2397d",label:this.label,options:e,value:r,required:this.required,helperText:this.helperText,invalid:s,disabled:this.disabled||this.readonly,onChange:this.handleChange})}componentWillRender(){this.updatePropertyFields(this.value||"")}getLimeTypes(){var t,e;let i=this.limetypes;return(null===(e=null===(t=this.formInfo)||void 0===t?void 0:t.schema)||void 0===e?void 0:e.oneOf)&&(i=this.formInfo.schema.oneOf.map((t=>t.const)).filter(c)),i?i.map((t=>this.limeTypeRepository.getLimeType(t))).filter(l):this.limeTypeRepository.getLimeTypes()}updatePropertyFields(t){for(const e of this.propertyFields)e.limetype=t,e.allowedPropertyTypes===b&&(e.allowedPropertyTypes=y)}get limeTypeRepository(){return this.platform.get(o.LimeTypeRepository)}},f=t=>({text:t.localname.singular,value:t.name,icon:n(t)});export{p as limebb_lime_query_filter_builder,u as limebb_lime_query_order_by_editor,g as limebb_limetype_field}
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as e,g as s}from"./p-BIwHMk6j.js";import{b as r,r as n,c as o,L as h}from"./p-ndni-0im.js";import{A as a,a as c,b as u,E as l,T as d}from"./p-CwMJvF_Z.js";import{o as f,U as v,c as m,a as p,d as b,n as g,i as y,S as j,g as w}from"./p-CtcTT7BK.js";import{d as O}from"./p-Ceen0vzd.js";import{c as x,e as k,S,i as C,a as T,r as I}from"./p-BgAfMcRA.js";import{c as A}from"./p-C2JP2nLw.js";import{h as F,b as M,c as E}from"./p-GT4hqR5i.js";import{i as P}from"./p-CkTg5UPD.js";import{i as N}from"./p-6PYziigk.js";var R=/\s/,$=/^\s+/;var _=/^[-+]0x[0-9a-f]+$/i,D=/^0b[01]+$/i,L=/^0o[0-7]+$/i,z=parseInt;function U(t){if("number"==typeof t)return t;if(N(t))return NaN;if(x(t)){var i="function"==typeof t.valueOf?t.valueOf():t;t=x(i)?i+"":i}if("string"!=typeof t)return 0===t?t:+t;var e;t=(e=t)?e.slice(0,function(t){for(var i=t.length;i--&&R.test(t.charAt(i)););return i}(e)+1).replace($,""):e;var s=D.test(t);return s||L.test(t)?z(t.slice(2),s?2:8):_.test(t)?NaN:+t}var G=Object.create,B=function(){function t(){}return function(i){if(!x(i))return{};if(G)return G(i);t.prototype=i;var e=new t;return t.prototype=void 0,e}}(),q=Object.prototype.hasOwnProperty;var H=f(Object.getPrototypeOf,Object);"object"==typeof exports&&exports&&!exports.nodeType&&exports&&"object"==typeof module&&module&&!module.nodeType&&module;var Q=Object.prototype.hasOwnProperty;function W(t){var i=new t.constructor(t.byteLength);return new v(i).set(new v(t)),i}var J=/\w*$/,K=S?S.prototype:void 0,V=K?K.valueOf:void 0;var Y=g&&g.isMap,Z=Y?b(Y):function(t){return C(t)&&"[object Map]"==p(t)},X=g&&g.isSet,tt=X?b(X):function(t){return C(t)&&"[object Set]"==p(t)},it="[object Arguments]",et="[object Function]",st="[object Object]",rt={};function nt(t,i,e,s,r,n){var o;if(void 0!==o)return o;if(!x(t))return t;var h=T(t);if(h)o=function(t){var i=t.length,e=new t.constructor(i);return i&&"string"==typeof t[0]&&Q.call(t,"index")&&(e.index=t.index,e.input=t.input),e}(t);else{var a=p(t),c=a==et||"[object GeneratorFunction]"==a;if(y(t))return t.slice();if(a==st||a==it||c&&!r)o=c?{}:function(t){return"function"!=typeof t.constructor||m(t)?{}:B(H(t))}(t);else{if(!rt[a])return r?t:{};o=function(t,i){var e,s,r,n,o=t.constructor;switch(i){case"[object ArrayBuffer]":return W(t);case"[object Boolean]":case"[object Date]":return new o(+t);case"[object DataView]":return n=W((r=t).buffer),new r.constructor(n,r.byteOffset,r.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(t){var i=W(t.buffer);return new t.constructor(i,t.byteOffset,t.length)}(t);case"[object Map]":case"[object Set]":return new o;case"[object Number]":case"[object String]":return new o(t);case"[object RegExp]":return(s=new(e=t).constructor(e.source,J.exec(e))).lastIndex=e.lastIndex,s;case"[object Symbol]":return V?Object(V.call(t)):{}}}(t,a)}}n||(n=new j);var u=n.get(t);if(u)return u;n.set(t,o),tt(t)?t.forEach((function(s){o.add(nt(s,i,e,0,t,n))})):Z(t)&&t.forEach((function(s,r){o.set(r,nt(s,i,e,0,t,n))}));var l=h?void 0:w(t);return function(t,i){for(var e=-1,s=null==t?0:t.length;++e<s&&!1!==i(t[e],e););}(l||t,(function(s,r){l&&(s=t[r=s]),function(t,i,e){var s=t[i];q.call(t,i)&&k(s,e)&&(void 0!==e||i in t)||function(t,i,e){"__proto__"==i&&O?O(t,i,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[i]=e}(t,i,e)}(o,r,nt(s,i,e,0,t,n))})),o}rt[it]=rt["[object Array]"]=rt["[object ArrayBuffer]"]=rt["[object DataView]"]=rt["[object Boolean]"]=rt["[object Date]"]=rt["[object Float32Array]"]=rt["[object Float64Array]"]=rt["[object Int8Array]"]=rt["[object Int16Array]"]=rt["[object Int32Array]"]=rt["[object Map]"]=rt["[object Number]"]=rt[st]=rt["[object RegExp]"]=rt["[object Set]"]=rt["[object String]"]=rt["[object Symbol]"]=rt["[object Uint8Array]"]=rt["[object Uint8ClampedArray]"]=rt["[object Uint16Array]"]=rt["[object Uint32Array]"]=!0,rt["[object Error]"]=rt[et]=rt["[object WeakMap]"]=!1;var ot=function(){return I.Date.now()},ht=Math.max,at=Math.min;class ct{get limeObjectService(){return this.platform.get(r.LimeObjectRepository)}get queryService(){return this.platform.get(r.Query)}get viewFactoryRegistry(){return this.platform.get(r.ViewFactoryRegistry)}get contextRegistry(){return this.platform.get(r.ContextRegistry)}get translator(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(r.Translate)}get triggerCharacter(){return this._triggerCharacter}get triggerHandler(){return this._triggerHandler}constructor(t,i,e,s){this.platform=t,this.context=i,this.searchableLimetypes=e,this.host=s,this.groupCounts={},this._triggerCharacter="@",this._triggerHandler={searcher:t=>this.searcher(t),inserter:(t,i)=>this.inserter(t,i),emptySearchMessage:"Start typing a name...",noItemsFoundMessage:"No results for your search...",nodeDefinition:{customElement:{tagName:"limebb-mention",attributes:["limetype","objectid","href"]},mapAttributes:t=>({limetype:t.value.getLimetype().name,objectid:t.value.id,href:`object/${this.context.limetype}/${this.context.id}`})}},this.searcher=async t=>{if(!t)return[];const{objects:i}=await this.limeObjectService.search(t,this.searchableLimetypes,10);return this.createSearchListItems(i)},this.inserter=async(t,i)=>{var e;const s=this.triggerHandler.nodeDefinition;s&&t.insert({node:{tagName:s.customElement.tagName,attributes:s.mapAttributes(i)},children:[null===(e=i.value)||void 0===e?void 0:e.descriptive]})}}async initialize(){await this.loadGroupCounts()}async loadGroupCounts(){const t=this.searchableLimetypes.filter((t=>!M(t,"user")&&F(t,"user"))).map((t=>this.getGroupCounts(t)));for(const i of await Promise.all(t))Object.assign(this.groupCounts,i)}async getGroupCounts(t){var i;const e=E(t,"user"),s=t.name;try{const t=await this.queryService.execute({limetype:s,responseFormat:{object:{_id:null,[e.name]:{count:{aggregate:{op:n.Count}}}}}});if(!(null===(i=t.objects)||void 0===i?void 0:i.length))return{[s]:{}};const r=this.createGroupCount(t.objects,e.name);return{[s]:r}}catch(i){return console.error(`Error fetching group count for limetype: ${t.name}`,i),{[s]:{}}}}createGroupCount(t,i){const e={};for(const s of t){const{_id:t,[i]:r}=s;e[t]=r.count}return e}createSearchListItems(t=[]){return t.map((t=>this.createSearchListItem(t))).filter(P)}createSearchListItem(t){const i=this.viewFactoryRegistry.getFactory("search"),e=this.limeObjectService.getObject(t._limetype,t._id);if(!e)return null;const s=i(e,this.contextRegistry.scope({host:this.host})),r=this.getGroupCountComponent(e);return Object.assign(Object.assign({},s),r?{primaryComponent:r}:{})}getGroupCountComponent(t){var i;const e=t.getLimetype(),s=null===(i=this.groupCounts[e.name])||void 0===i?void 0:i[t.id],r=E(e,"user");if(void 0!==s&&r)return{name:"limebb-mention-group-counter",props:{count:s,limetype:r.relation.getLimetype(),helperLabel:this.translator.get("webclient.notification-center.members-will-be-notified")}}}}class ut{constructor(t,i){this.file=t,this.http=i,this.uploadCancelled=!1,this.getUrl=t=>`api/v1/file/${null!=t?t:""}`}async initialize(){this.uploadService=await this.http.createFileUpload(o.Post,this.getUrl(),this.file),this.progressCallback&&(this.uploadService.onProgress=this.progressCallback)}async upload(){return this.uploadService.upload()}getFileName(){return this.file.name}cancel(){this.uploadService.cancel(),this.uploadCancelled=!0}set onProgress(t){this.progressCallback=t,this.uploadService&&(this.uploadService.onProgress=t)}}class lt{constructor(t){this.platform=t}async handleImagePasted(t){const i=null==t?void 0:t.fileInfo;if(!i)return;if(!this.validateImageSize(i))return;t.insertThumbnail();const e=await this.createFileUpload(i),s=null==e?void 0:e.href;return s&&void 0!==(null==e?void 0:e.fileId)?t.insertImage(s):t.insertFailedThumbnail(),e}parseFileIdFromSrc(t){if(t){const i=/\/(\d+)\/contents\/?$/.exec(t);if(i&&i[1])return Number(i[1])}}validateImageSize(t){return!!t.fileContent&&t.fileContent.size<=52428800}async createFileUpload(t){var i;if(!t.fileContent)return;const e=new ut(t.fileContent,this.http);await e.initialize();const s=Object.assign(Object.assign({},t),{progress:0,file:e,state:"added",fileId:void 0,href:void 0,id:t.id});e.onProgress=t=>{0===s.progress&&(s.state="uploading"),s.progress=t,100===t&&(s.state="finalizing")};const r=await e.upload();return s.fileId=r.id,s.filename=r.filename,s.extension=r.extension,s.contentType=r.contentType,s.size=r.size,s.state="done",s.href=null===(i=r._links)||void 0===i?void 0:i.contents.href,s}get http(){return this.platform.get(r.Http)}}const dt=class{watchOpen(){this.setupHandlers(),this.setPickerMessage()}watchQuery(){this.setPickerMessage()}constructor(e){t(this,e),this.change=i(this,"change"),this.metadataChange=i(this,"metadataChange"),this.allowMentioning=!1,this.contentType="markdown",this.language="en",this.disabled=!1,this.readonly=!1,this.invalid=!1,this.required=!1,this.ui="standard",this.allowResize=!0,this.value="",this.triggerMap={},this.customElements=[],this.allowInlineImages=!1,this.items=[],this.highlightedItemIndex=0,this.isPickerOpen=!1,this.isSearching=!1,this.registeredTriggers=[],this.registeredTriggerMap=this.triggerMap,this.registeredCustomElements=this.customElements,this.activeTrigger=void 0,this.handleMouseClick=t=>{this.textEditorPickerElement&&(t.target===this.textEditorPickerElement||this.resetTriggerAndPicker())},this.handleKeyPress=t=>{if(!this.isPickerOpen||!this.activeTrigger)return;if(![c,u,a,l,d].includes(t.key))return;if(t.stopPropagation(),t.preventDefault(),"keyup"===t.type)return;const i={[c]:this.handleEscapeKey,[l]:this.handleEnterOrTabKey,[d]:this.handleEnterOrTabKey,[a]:this.handleArrowKeyPress,[u]:this.handleArrowKeyPress}[t.key];i&&i(t)},this.handleArrowKeyPress=t=>{this.highlightedItemIndex=this.findNonSeparatorIndex(t.key,this.highlightedItemIndex)},this.findNonSeparatorIndex=(t,i,e=0)=>{if(0===this.items.length||e>this.items.length)return i;const s=((t,i,e)=>(i+(t===a?1:-1)+e)%e)(t,i,this.items.length);return this.isListSeparator(this.items[s])?this.findNonSeparatorIndex(t,s,e+1):s},this.handleEscapeKey=()=>{var t;null===(t=this.triggerFunction)||void 0===t||t.stopTrigger(),this.resetTriggerAndPicker()},this.handleEnterOrTabKey=t=>{this.handleItemSelection(t)},this.handleMetadataChange=t=>{t.stopPropagation();const i=t.detail,e=this.getEnhancedImages(i.images||[]),s=Object.assign(Object.assign({},i),{images:e});this.metadataChange.emit(s)},this.handleImagePasted=t=>{t.stopPropagation(),this.allowInlineImages&&this.uploadHandler.handleImagePasted(t.detail)},this.handleTriggerStart=t=>{t.stopPropagation(),this.activeTrigger=t.detail.trigger,this.triggerFunction=t.detail.textEditor,this.isPickerOpen=!0},this.handleTriggerStop=t=>{t.stopPropagation(),this.resetTriggerAndPicker()},this.handleTriggerChange=t=>{var i;t.stopImmediatePropagation(),this.editorPickerQuery=t.detail.value;const e=null===(i=this.registeredTriggerMap[t.detail.trigger])||void 0===i?void 0:i.searcher;e&&(this.isSearching=!0,this.debouncedSearchFn(e,this.editorPickerQuery))},this.resetTriggerAndPicker=()=>{this.isPickerOpen=!1,this.activeTrigger=void 0,this.triggerFunction=void 0,this.isSearching=!1,this.highlightedItemIndex=0,this.items=[]},this.handleItemSelection=t=>{var i;let e;if(t instanceof CustomEvent)e=t.detail;else{if(!(t instanceof KeyboardEvent))return;{const t=this.items[this.highlightedItemIndex];if(this.isListSeparator(t))return;e=t}}if(!this.activeTrigger||(null==e?void 0:e.disabled))return;const s=this.registeredTriggerMap[this.activeTrigger];try{s.inserter(this.triggerFunction,e)}catch(t){console.error("Error inserting",t)}this.resetTriggerAndPicker(),null===(i=this.textEditor)||void 0===i||i.focus()},this.handleVisibilityChange=()=>{"hidden"===document.visibilityState&&this.saveDraft()},this.handleBeforeUnload=()=>{this.saveDraft()},this.portalId=A(),this.debouncedSearchFn=function(t,i,e){var s,r,n,o,h,a,c=0,u=!1,l=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function f(i){var e=s,n=r;return s=r=void 0,c=i,o=t.apply(n,e)}function v(t){var e=t-a;return void 0===a||e>=i||e<0||l&&t-c>=n}function m(){var t=ot();if(v(t))return p(t);h=setTimeout(m,function(t){var e=i-(t-a);return l?at(e,n-(t-c)):e}(t))}function p(t){return h=void 0,d&&s?f(t):(s=r=void 0,o)}function b(){var t=ot(),e=v(t);if(s=arguments,r=this,a=t,e){if(void 0===h)return function(t){return c=t,h=setTimeout(m,i),u?f(t):o}(a);if(l)return clearTimeout(h),h=setTimeout(m,i),f(a)}return void 0===h&&(h=setTimeout(m,i)),o}return i=U(i)||0,x(e)&&(u=!!e.leading,n=(l="maxWait"in e)?ht(U(e.maxWait)||0,i):n,d="trailing"in e?!!e.trailing:d),b.cancel=function(){void 0!==h&&clearTimeout(h),c=0,s=a=r=h=void 0},b.flush=function(){return void 0===h?o:p(ot())},b}((async(t,i)=>{try{const e=await t(i);if(i!==this.editorPickerQuery||!this.activeTrigger)return;this.items=e}catch(t){console.error("Error searching",t)}finally{this.isSearching=!1}}),300)}connectedCallback(){var t,i,e,s;if(this.draftIdentifier){const r=null!==(i=null===(t=this.context)||void 0===t?void 0:t.id)&&void 0!==i?i:"no-limeobject",n=null!==(s=null===(e=this.context)||void 0===e?void 0:e.limetype)&&void 0!==s?s:"no-limetype";this.textEditorInnerId=["text-editor-draft",n,r,this.draftIdentifier].join("-")}this.textEditorInnerId&&(document.addEventListener("visibilitychange",this.handleVisibilityChange),window.addEventListener("beforeunload",this.handleBeforeUnload)),this.uploadHandler=new lt(this.platform)}componentWillLoad(){this.allowMentioning&&this.registerMentions(),this.registerTriggers(),this.loadDraft()}disconnectedCallback(){document.removeEventListener("visibilitychange",this.handleVisibilityChange),window.removeEventListener("beforeunload",this.handleBeforeUnload),document.removeEventListener("mousedown",this.handleMouseClick),this.saveDraft(),this.host&&(this.host.removeEventListener("keyup",this.handleKeyPress,{capture:!0}),this.host.removeEventListener("keydown",this.handleKeyPress,{capture:!0})),this.debouncedSearchFn&&this.debouncedSearchFn.cancel&&this.debouncedSearchFn.cancel()}registerMentions(){const t=new ct(this.platform,this.context,this.searchableLimetypes,this.host),i=t.triggerHandler.nodeDefinition;i&&(this.registeredCustomElements.push(i.customElement),this.registeredTriggerMap[t.triggerCharacter]=t.triggerHandler,t.initialize())}registerTriggers(){this.registeredTriggers=Object.keys(this.registeredTriggerMap)}setPickerMessage(){var t;if(!this.activeTrigger)return;const i=this.registeredTriggerMap[this.activeTrigger];this.pickerMessage=(null===(t=this.editorPickerQuery)||void 0===t?void 0:t.length)>0?i.noItemsFoundMessage:i.emptySearchMessage}setupHandlers(){this.isPickerOpen?(this.host.addEventListener("keyup",this.handleKeyPress,{capture:!0}),this.host.addEventListener("keydown",this.handleKeyPress,{capture:!0}),document.addEventListener("mousedown",this.handleMouseClick)):(this.host.removeEventListener("keyup",this.handleKeyPress,{capture:!0}),this.host.removeEventListener("keydown",this.handleKeyPress,{capture:!0}),document.removeEventListener("mousedown",this.handleMouseClick))}isListSeparator(t){return"separator"in t&&!0===t.separator}render(){return[e("limel-text-editor",{key:"3ef0538b3df2cfbd3e363868add7dad46559e035",ref:t=>this.textEditor=t,tabindex:this.disabled?-1:0,value:this.value,contentType:this.contentType,customElements:this.registeredCustomElements,"aria-disabled":this.disabled,language:this.language,triggers:this.registeredTriggers,onTriggerStart:this.handleTriggerStart,onTriggerStop:this.handleTriggerStop,onTriggerChange:this.handleTriggerChange,onImagePasted:this.handleImagePasted,onMetadataChange:this.handleMetadataChange,ui:this.ui,allowResize:this.allowResize,required:this.required,disabled:this.disabled,readonly:this.readonly,helperText:this.helperText,placeholder:this.placeholder,label:this.label,invalid:this.invalid}),this.renderPicker()]}renderPicker(){if(this.isPickerOpen)return e("limel-portal",{containerId:this.portalId,visible:this.isPickerOpen,openDirection:"top",inheritParentWidth:!0,anchor:this.textEditor},e("limebb-text-editor-picker",{ref:t=>this.textEditorPickerElement=t,items:(t=this.items,i=this.highlightedItemIndex,t.map(((t,e)=>{const s=nt(t,5);return Object.assign(Object.assign({},s),{selected:e===i})}))),onItemSelected:this.handleItemSelection,emptyMessage:this.pickerMessage,isSearching:this.isSearching}));var t,i}getEnhancedImages(t){return t.map((t=>{let i;return"success"===t.state&&(i=this.uploadHandler.parseFileIdFromSrc(t.src)),i?Object.assign(Object.assign({},t),{fileId:i}):t}))}loadDraft(){if(!this.userDataService||!this.textEditorInnerId)return;if(this.value)return;const t=this.userDataService.get(this.textEditorInnerId);t&&this.change.emit(t)}saveDraft(){var t,i,e,s;if(!this.textEditorInnerId)return;const r=null===(t=this.value)||void 0===t?void 0:t.trim(),n=null===(i=this.userDataService)||void 0===i?void 0:i.get(this.textEditorInnerId);r&&r!==n?null===(e=this.userDataService)||void 0===e||e.set(this.textEditorInnerId,r):!r&&n&&(null===(s=this.userDataService)||void 0===s||s.set(this.textEditorInnerId,void 0))}get userDataService(){return this.platform.get(r.UserDataRepository)}static get delegatesFocus(){return!0}get host(){return s(this)}static get watchers(){return{isPickerOpen:[{watchOpen:0}],editorPickerQuery:[{watchQuery:0}]}}};(function(t,i,e,s){var r,n=arguments.length,o=n<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,s);else for(var h=t.length-1;h>=0;h--)(r=t[h])&&(o=(n<3?r(o):n>3?r(i,e,o):r(i,e))||o);n>3&&o&&Object.defineProperty(i,e,o)})([h({map:[function(t){return Object.values(t).filter((t=>M(t,"user")||F(t,"user")))}]})],dt.prototype,"searchableLimetypes",void 0),dt.style=":host(limebb-text-editor){display:block;width:100%;min-width:5rem;min-height:5rem;height:100%;max-height:var(--text-editor-max-height, calc(100vh - (env(safe-area-inset-top) + env(safe-area-inset-bottom)) - 4rem))}";export{dt as limebb_text_editor}
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as r}from"./p-BIwHMk6j.js";import{b as i}from"./p-ndni-0im.js";import{L as o}from"./p-C_tMNOSt.js";const s=class{constructor(r){e(this,r),this.negate=t(this,"negate"),this.updateArgs=t(this,"updateArgs"),this.deleteChip=t(this,"deleteChip"),this.isNegated=!1,this.readonly=!1,this.disabled=!1,this.isMutable=!0,this.handleNegateChange=e=>{e.stopPropagation(),this.negate.emit(e.detail)},this.handleArgsChange=e=>{e.stopPropagation(),this.updateArgs.emit(e.detail)},this.handleDelete=()=>{this.deleteChip.emit()}}render(){return r("div",{key:"6aae573b524737ee3d2a4b2d3df68ec9bf1f1a0f",class:"popover"},this.renderHeader(),this.renderBody())}renderHeader(){var e,t,i,o;const s=(null===(e=this.metadata)||void 0===e?void 0:e.title)?this.translator.get(this.metadata.title):null!==(i=null===(t=this.refNode)||void 0===t?void 0:t.id)&&void 0!==i?i:"";return r("limel-header",{class:"popover__header is-narrow",heading:s,icon:null===(o=this.metadata)||void 0===o?void 0:o.icon},this.renderHeaderActions())}renderHeaderActions(){return this.isMutable?r("div",{slot:"actions",class:"popover__header-actions"},r("limel-switch",{class:"popover__negate-switch",label:this.translator.get("webclient.rule-editor.negate"),value:this.isNegated,onChange:this.handleNegateChange}),r("limel-icon-button",{class:"popover__delete-button",icon:"trash",label:this.translator.get("webclient.rule-editor.delete"),onClick:this.handleDelete})):null}get translator(){return this.platform.get(i.Translate)}renderBody(){var e,t;const i=null===(e=this.metadata)||void 0===e?void 0:e.configComponent;return i?r("div",{class:"popover__body"},r(o,{platform:this.platform,context:this.context,name:i.name,props:Object.assign(Object.assign({},i.props),{value:null===(t=this.refNode)||void 0===t?void 0:t.args,readonly:this.readonly,disabled:this.disabled,onChange:this.handleArgsChange})})):null}};s.style=":host{display:block}.popover{display:flex;flex-direction:column;min-width:24rem;background-color:rgb(var(--contrast-100));border:1px solid rgb(var(--contrast-700));border-radius:0.5rem;box-shadow:0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);overflow:hidden}.popover__header{--header-background-color:rgba(var(--contrast-300));padding-right:0.5rem;gap:1rem}.popover__header-actions{display:grid;grid-auto-flow:column;grid-gap:0.75rem;padding:0.25rem;align-items:center}.popover__delete-button{color:rgb(var(--contrast-1100))}.popover__body{padding:1rem}";export{s as limebb_rule_chip_popover}
@@ -1 +0,0 @@
1
- import{a as t,g as n}from"./p-BIwHMk6j.js";var r={};function i(t){return t&&["belongsto","hasone","hasmany","hasandbelongstomany"].includes(t.type)}function e(t){return t&&["belongsto","hasone"].includes(t.type)}r.LimeTypeRepository="state.limetypes";var o="context-request";function u(t,n){let r,i={context:n,callback:t=>{r=t}};return t.dispatchEvent(new CustomEvent(o,{bubbles:!0,composed:!0,detail:i})),r}var c="context";function f(t){return t.context?t.context:u(n(t),c)}var s=function(t,n){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])},s(t,n)};function a(t,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}s(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}function l(t){var n="function"==typeof Symbol&&Symbol.iterator,r=n&&t[n],i=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(t){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,e=n.call(t),o=[];try{for(;!(r=e.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=e.return)&&n.call(e)}finally{if(i)throw i.error}}return o}function v(t,n,r){if(2===arguments.length)for(var i,e=0,o=n.length;e<o;e++)(i||!(e in n))&&(i||=Array.prototype.slice.call(n,0,e),i[e]=n[e]);return t.concat(i||Array.prototype.slice.call(n))}function y(t){return"function"==typeof t}function b(t){var n=t((function(t){Error.call(t),t.stack=Error().stack}));return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var m=b((function(t){return function(n){t(this),this.message=n?n.length+" errors occurred during unsubscription:\n"+n.map((function(t,n){return n+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=n}}));function p(t,n){if(t){var r=t.indexOf(n);0<=r&&t.splice(r,1)}}var d=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var t,n,r,i,e;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var u=l(o),c=u.next();!c.done;c=u.next())c.value.remove(this)}catch(n){t={error:n}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}else o.remove(this);var f=this.initialTeardown;if(y(f))try{f()}catch(t){e=t instanceof m?t.errors:[t]}var s=this._finalizers;if(s){this._finalizers=null;try{for(var a=l(s),b=a.next();!b.done;b=a.next()){var p=b.value;try{j(p)}catch(t){e??=[],t instanceof m?e=v(v([],h(e)),h(t.errors)):e.push(t)}}}catch(t){r={error:t}}finally{try{b&&!b.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}}if(e)throw new m(e)}},t.prototype.add=function(n){if(n&&n!==this)if(this.closed)j(n);else{if(n instanceof t){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=this._finalizers??[]).push(n)}},t.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},t.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},t.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&p(n,t)},t.prototype.remove=function(n){var r=this._finalizers;r&&p(r,n),n instanceof t&&n._removeParent(this)},t.EMPTY=((n=new t).closed=!0,n),t;var n}(),g=d.EMPTY;function w(t){return t instanceof d||t&&"closed"in t&&y(t.remove)&&y(t.add)&&y(t.unsubscribe)}function j(t){y(t)?t():t.unsubscribe()}function x(){}function O(t){t()}var R=function(t){function n(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,w(n)&&n.add(r)):r.destination=A,r}return a(n,t),n.create=function(t,n,r){return new S(t,n,r)},n.prototype.next=function(t){this.isStopped||this._next(t)},n.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},n.prototype._next=function(t){this.destination.next(t)},n.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},n.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},n}(d),E=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(t){k(t)}},t.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(t){k(t)}else k(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){k(t)}},t}(),S=function(t){function n(n,r,i){var e,o=t.call(this)||this;return e=y(n)||!n?{next:n??void 0,error:r??void 0,complete:i??void 0}:n,o.destination=new E(e),o}return a(n,t),n}(R);function k(t){!function(t){!function(t,n){var r=[...arguments].slice(2);setTimeout.apply(void 0,v([t,n],h(r)))}((function(){throw t}))}(t)}var A={closed:!0,next:x,error:function(t){throw t},complete:x},C="function"==typeof Symbol&&Symbol.observable||"@@observable";function P(t){return t}var M=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(n){var r=new t;return r.source=this,r.operator=n,r},t.prototype.subscribe=function(t,n,r){var i=this,e=function(t){return t&&t instanceof R||function(t){return t&&y(t.next)&&y(t.error)&&y(t.complete)}(t)&&w(t)}(t)?t:new S(t,n,r);return O((function(){var t=i.operator,n=i.source;e.add(t?t.call(e,n):n?i._subscribe(e):i._trySubscribe(e))})),e},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},t.prototype.forEach=function(t,n){var r=this;return new(n=T(n))((function(n,i){var e=new S({next:function(n){try{t(n)}catch(t){i(t),e.unsubscribe()}},error:i,complete:n});r.subscribe(e)}))},t.prototype._subscribe=function(t){return this.source?.subscribe(t)},t.prototype[C]=function(){return this},t.prototype.pipe=function(){return function(t){return 0===t.length?P:1===t.length?t[0]:function(n){return t.reduce((function(t,n){return n(t)}),n)}}([...arguments])(this)},t.prototype.toPromise=function(t){var n=this;return new(t=T(t))((function(t,r){var i;n.subscribe((function(t){return i=t}),(function(t){return r(t)}),(function(){return t(i)}))}))},t.create=function(n){return new t(n)},t}();function T(t){return t??undefined??Promise}var $=b((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),_=function(t){function n(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return a(n,t),n.prototype.lift=function(t){var n=new q(this,this);return n.operator=t,n},n.prototype._throwIfClosed=function(){if(this.closed)throw new $},n.prototype.next=function(t){var n=this;O((function(){var r,i;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||=Array.from(n.observers);try{for(var e=l(n.currentObservers),o=e.next();!o.done;o=e.next())o.value.next(t)}catch(t){r={error:t}}finally{try{o&&!o.done&&(i=e.return)&&i.call(e)}finally{if(r)throw r.error}}}}))},n.prototype.error=function(t){var n=this;O((function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=t;for(var r=n.observers;r.length;)r.shift().error(t)}}))},n.prototype.complete=function(){var t=this;O((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var n=t.observers;n.length;)n.shift().complete()}}))},n.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(n.prototype,"observed",{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),n.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},n.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},n.prototype._innerSubscribe=function(t){var n=this,r=this,i=r.observers;return r.hasError||r.isStopped?g:(this.currentObservers=null,i.push(t),new d((function(){n.currentObservers=null,p(i,t)})))},n.prototype._checkFinalizedStatuses=function(t){var n=this,r=n.isStopped;n.hasError?t.error(n.thrownError):r&&t.complete()},n.prototype.asObservable=function(){var t=new M;return t.source=this,t},n.create=function(t,n){return new q(t,n)},n}(M),q=function(t){function n(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return a(n,t),n.prototype.next=function(t){var n,r;null==(r=(n=this.destination)?.next)||r.call(n,t)},n.prototype.error=function(t){var n,r;null==(r=(n=this.destination)?.error)||r.call(n,t)},n.prototype.complete=function(){var t,n;null==(n=(t=this.destination)?.complete)||n.call(t)},n.prototype._subscribe=function(t){return this.source?.subscribe(t)??g},n}(_),F=function(t){function n(n){var r=t.call(this)||this;return r._value=n,r}return a(n,t),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),n.prototype._subscribe=function(n){var r=t.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},n.prototype.getValue=function(){var t=this,n=t._value;if(t.hasError)throw t.thrownError;return this._throwIfClosed(),n},n.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},n}(_);function N(t){return t}function U(t,n){return(r,i)=>{let e=function(t,n,r,i){let e=W.get(t);return e||(e=[],W.set(t,e)),e.push({options:r,name:n,optionFactory:i.optionFactory||N,service:{name:i.name,method:i.method||"subscribe"}}),e}(r,i,t,n);1===e.length&&function(t,n){t.connectedCallback=I(t.connectedCallback,n),t.componentWillLoad=function(t,n){return function(...r){return!0===D.get(this)?t?t.apply(this,r):void 0:I(t,n).apply(this,r)}}(t.componentWillLoad,n),t.componentDidUnload=L(t.componentDidUnload),t.disconnectedCallback=L(t.disconnectedCallback)}(r,e)}}var W=new WeakMap,B=new WeakMap,D=new WeakMap;function I(t,r){return function(...i){D.set(this,!0);let e=[];B.set(this,e);let u=new F(f(this));e.push(function(t,r){let i=n(t);return c in i?function(t,n){let r=Object.getOwnPropertyDescriptor(t,c),i=function(t,n){let r=t;for(;r;){let t=Object.getOwnPropertyDescriptor(r,n);if(t)return t;r=Object.getPrototypeOf(r)}}(t,c);return n(i?.get?.call(t)),Object.defineProperty(t,c,{configurable:!0,enumerable:!0,get:()=>i?.get?.call(t),set:r=>{i?.set?.call(t,r),n(r)}}),()=>{r?Object.defineProperty(t,c,r):Reflect.deleteProperty(t,c)}}(i,r):function(t,n,r){let i,e={context:c,subscribe:!0,callback:(t,n)=>{r(t),n&&(i=n)}};return t.dispatchEvent(new CustomEvent(o,{bubbles:!0,composed:!0,detail:e})),()=>i?.()}(i,0,r)}(this,(t=>u.next(t))));for(let t of r)t.options=t.optionFactory(t.options,this),G(t.options)&&(t.options.context=u),H(this,t);if(t)return t.apply(this,i)}}function L(t){return async function(...n){let r;return t&&(r=t.apply(this,n)),function(t){let n=B.get(t);for(let t of n)t();B.set(t,[])}(this),r}}function G(t){return"context"in t}function H(t,r){let i=function(t,r){let i={...r.options};!function(t,n){t.filter&&=t.filter.map((t=>t.bind(n))),t.map&&=t.map.map((t=>t.bind(n)))}(i,t);let e=r.service.name,o=function(t){if(t.platform)return t.platform;let r=u(n(t),"platform");if(!r)throw Error("Platform not available. Set the @Prop() platform value or provide it via ContextRegistry.provide('platform', ...) at boot.");return r}(t);if(!o.has(e))throw Error(`Service ${e} does not exist`);return o.get(e)[r.service.method](function(t,n){return r=>{t[n]=r}}(t,r.name),i)}(t,r);"function"==typeof i&&B.get(t).push(i)}function z(t={}){return U(t,{name:r.LimeTypeRepository})}function J(t={}){let n={name:r.LimeTypeRepository};return t.map=[K,...t.map||[]],t.context=null,U(t,n)}function K(t){let n=f(this);if(n)return t[n.limetype]}function Q(t={}){let n={name:r.LimeObjectRepository};return t.map=[V,...t.map||[]],t.context=null,U(t,n)}function V(t){let n=f(this);if(!n)return;let{limetype:r,id:i}=n;return t[r]?t[r].find((t=>t.id===i)):void 0}function X(t){return n=>{(function(t,n){t.commandId=n})(n,t.id),function(t,n){Object.defineProperty(t,Symbol.hasInstance,{value:t=>function(t){let n,r=[],i=t;for(;n=Y(i);)r=[...r,n],i=Object.getPrototypeOf(i);return[...new Set(r)]}(t).includes(n)})}(n,t.id)}}function Y(t){return"string"==typeof t?t:t&&t.constructor&&t.constructor.commandId?t.constructor.commandId:t&&t.commandId?t.commandId:null}function Z(t,n,r,i){var e,o=arguments.length,u=o<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,n,r,i);else for(var c=t.length-1;c>=0;c--)(e=t[c])&&(u=(o<3?e(u):o>3?e(n,r,u):e(n,r))||u);return o>3&&u&&Object.defineProperty(n,r,u),u}r.LimeObjectRepository="state.limeobjects",r.CommandBus="commandBus";var tt=class{context;filter;relation};tt=Z([X({id:"limeobject.bulk-create-dialog"})],tt);var nt=class{limetype;limeobject;route=!1;title;subtitle;context;autoAttachRelation;saveCommand};nt=Z([X({id:"limeobject.create-dialog"})],nt);var rt=class{context};rt=Z([X({id:"limeobject.delete-object"})],rt);var it=class{context};it=Z([X({id:"limeobject.object-access"})],it);var et=class{context;limeobject;route=!1;label};et=Z([X({id:"limeobject.save-object"})],et);var ot=function(t){return t.AND="AND",t.OR="OR",t.NOT="!",t.EQUALS="=",t.NOT_EQUALS="!=",t.GREATER=">",t.LESS="<",t.IN="IN",t.BEGINS="=?",t.LIKE="?",t.LESS_OR_EQUAL="<=",t.GREATER_OR_EQUAL=">=",t.ENDS="=$",t}({}),ut={Count:"COUNT"};r.Query="query";var ct={Post:"POST"};r.Http="http",r.EventDispatcher="eventDispatcher",r.Translate="translate",r.Dialog="dialog",r.KeybindingRegistry="keybindingRegistry",r.Navigator="navigator";var ft,st,at=class{path;query;hash;state};function lt(t){return U(t,{name:r.ConfigRepository})}function ht(t={}){return U(t,{name:r.FilterRepository})}function vt(t){let n=window.Lime?.logger?.createLogger;return"function"==typeof n?(void 0===st&&(st=function(t){return t&&(function(t){let n=t.match(/\/([^/]+)-lwc-components\//);return n?n[1]:null}(t)||function(t){let n=t.match(/\/packages\/(?:@[^/]+\/)?([^/]+)/);return n?n[1]:null}(t)||function(t){let n=t.indexOf("+");if(-1===n)return null;let r=t.slice(0,n),i=r.lastIndexOf("/");return-1===i?null:r.slice(i+1)}(t)||function(t){let n=t.match(/\/static\/([^/]+)\//);return n?n[1]:null}(t))||null}(void 0===ft?ft="string"==typeof import.meta.url?import.meta.url:function(){try{let t=Error(".").stack;if(!t)return null;let n=t.split("\n");for(let t of n){let n=t.match(/(https?:\/\/[^)\s:]+)/);if(n)return n[1]}return null}catch{return null}}():ft)),st&&(t=`${st}:${t}`),n(t)):(console.warn(`Logger factory is not configured. Returning console logger for scope "${t}".`),console)}at=Z([X({id:"navigator.navigate"})],at),r.Notification="notifications",r.RouteRegistry="routeRegistry",r.TaskRepository="state.tasks",r.ConfigRepository="state.configs",r.Device="state.device",r.FilterRepository="state.filters",r.UserDataRepository="state.user-data",r.Application="state.application",r.UserPreferencesRepository="userPreferences",r.DateTimeFormatter="datetimeformatter",r.ConditionRegistry="conditionRegistry",r.ContextRegistry="contextRegistry",r.RuleRegistry="ruleRegistry",r.ViewFactoryRegistry="viewFactoryRegistry",r.WebComponentRegistry="webComponentRegistry",r.NotificationRepository="state.notifications",r.PollerFactory="pollerFactory",r.Logger="logger",r.ProblemRepository="problemRepository",r.AIContextRegistry="aiContextRegistry";var yt=null;try{t((function(t,n){yt||=vt("uncaught-error");let r={};n&&(r.element=n.tagName,n.id&&(r.elementId=n.id));let i=t instanceof Error?t.message:String(t),e=t instanceof Error?t:void 0;yt.error(i,e,r)}))}catch{}export{Q as G,X as H,z as L,vt as M,J as R,e as a,r as b,ct as c,ht as d,i,lt as l,ot as n,ut as r}