@limetech/lime-crm-building-blocks 1.98.0 → 1.99.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 (170) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/cjs/{index.esm-a894ac76.js → index.esm-d785eb6e.js} +2 -0
  3. package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
  4. package/dist/cjs/limebb-browser.cjs.entry.js +1 -1
  5. package/dist/cjs/limebb-chat-item_2.cjs.entry.js +1 -1
  6. package/dist/cjs/limebb-chat-list.cjs.entry.js +1 -1
  7. package/dist/cjs/limebb-component-config.cjs.entry.js +1 -1
  8. package/dist/cjs/limebb-component-picker.cjs.entry.js +1 -1
  9. package/dist/cjs/limebb-currency-picker.cjs.entry.js +1 -1
  10. package/dist/cjs/limebb-date-picker.cjs.entry.js +1 -1
  11. package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +1 -1
  12. package/dist/cjs/limebb-feed.cjs.entry.js +1 -1
  13. package/dist/cjs/limebb-info-tile.cjs.entry.js +1 -1
  14. package/dist/cjs/limebb-kanban-group.cjs.entry.js +1 -1
  15. package/dist/cjs/limebb-kanban-item.cjs.entry.js +1 -1
  16. package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +89 -169
  17. package/dist/cjs/limebb-lime-query-filter-and.cjs.entry.js +80 -0
  18. package/dist/cjs/limebb-lime-query-filter-comparison_2.cjs.entry.js +147 -0
  19. package/dist/cjs/limebb-lime-query-filter-group_4.cjs.entry.js +603 -0
  20. package/dist/cjs/limebb-lime-query-filter-or.cjs.entry.js +68 -0
  21. package/dist/cjs/limebb-limeobject-file-viewer.cjs.entry.js +1 -1
  22. package/dist/cjs/limebb-limetype-field_2.cjs.entry.js +37 -6
  23. package/dist/cjs/limebb-live-docs-info.cjs.entry.js +2 -2
  24. package/dist/cjs/limebb-loader.cjs.entry.js +1 -1
  25. package/dist/cjs/limebb-locale-picker.cjs.entry.js +2 -2
  26. package/dist/cjs/limebb-mention-group-counter.cjs.entry.js +2 -2
  27. package/dist/cjs/limebb-mention.cjs.entry.js +1 -1
  28. package/dist/cjs/limebb-navigation-button_2.cjs.entry.js +3 -3
  29. package/dist/cjs/limebb-notification-item.cjs.entry.js +2 -2
  30. package/dist/cjs/limebb-notification-list.cjs.entry.js +1 -1
  31. package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +2 -2
  32. package/dist/cjs/limebb-text-editor.cjs.entry.js +3 -3
  33. package/dist/cjs/limebb-trend-indicator.cjs.entry.js +1 -1
  34. package/dist/cjs/{limetype-1fe0207f.js → limetype-f2e4376e.js} +1 -1
  35. package/dist/cjs/loader.cjs.js +1 -1
  36. package/dist/collection/collection-manifest.json +1 -0
  37. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-and.js +41 -49
  38. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison.js +77 -41
  39. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-expression.js +35 -46
  40. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-group.css +130 -0
  41. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-group.js +269 -0
  42. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-not.js +19 -25
  43. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-or.js +34 -34
  44. package/dist/collection/components/lime-query-builder/lime-query-builder.js +32 -17
  45. package/dist/collection/components/lime-query-builder/limetype-field/limetype-field.js +1 -1
  46. package/dist/collection/components/limeobject/file-viewer/live-docs-info.js +2 -2
  47. package/dist/collection/components/locale-picker/locale-picker.js +1 -1
  48. package/dist/collection/components/notification-list/notification-item/notification-item.js +1 -1
  49. package/dist/collection/components/percentage-visualizer/percentage-visualizer.js +2 -2
  50. package/dist/collection/components/summary-popover/summary-popover.js +3 -3
  51. package/dist/collection/components/text-editor/mention-group-counter.js +2 -2
  52. package/dist/collection/components/text-editor/text-editor.js +1 -1
  53. package/dist/collection/components/trend-indicator/trend-indicator.js +1 -1
  54. package/dist/components/index.esm.js +2 -1
  55. package/dist/components/lime-query-filter-comparison.js +32 -45
  56. package/dist/components/lime-query-filter-expression.js +315 -0
  57. package/dist/components/limebb-lime-query-builder.js +93 -177
  58. package/dist/components/limebb-lime-query-filter-and.js +130 -1
  59. package/dist/components/limebb-lime-query-filter-comparison.js +1 -1
  60. package/dist/components/limebb-lime-query-filter-expression.js +1 -1
  61. package/dist/components/limebb-lime-query-filter-group.d.ts +11 -0
  62. package/dist/components/limebb-lime-query-filter-group.js +6 -0
  63. package/dist/components/limebb-lime-query-filter-not.js +1 -1
  64. package/dist/components/limebb-lime-query-filter-or.js +118 -1
  65. package/dist/components/limebb-locale-picker.js +1 -1
  66. package/dist/components/limebb-mention-group-counter.js +2 -2
  67. package/dist/components/limebb-percentage-visualizer.js +2 -2
  68. package/dist/components/limebb-text-editor.js +1 -1
  69. package/dist/components/limebb-trend-indicator.js +1 -1
  70. package/dist/components/limetype-field.js +34 -2
  71. package/dist/components/live-docs-info.js +2 -2
  72. package/dist/components/notification-item.js +1 -1
  73. package/dist/components/summary-popover.js +3 -3
  74. package/dist/esm/{index.esm-d8fdeb18.js → index.esm-bb569663.js} +2 -1
  75. package/dist/esm/lime-crm-building-blocks.js +1 -1
  76. package/dist/esm/limebb-browser.entry.js +1 -1
  77. package/dist/esm/limebb-chat-item_2.entry.js +1 -1
  78. package/dist/esm/limebb-chat-list.entry.js +1 -1
  79. package/dist/esm/limebb-component-config.entry.js +1 -1
  80. package/dist/esm/limebb-component-picker.entry.js +1 -1
  81. package/dist/esm/limebb-currency-picker.entry.js +1 -1
  82. package/dist/esm/limebb-date-picker.entry.js +1 -1
  83. package/dist/esm/limebb-feed-timeline-item.entry.js +1 -1
  84. package/dist/esm/limebb-feed.entry.js +1 -1
  85. package/dist/esm/limebb-info-tile.entry.js +1 -1
  86. package/dist/esm/limebb-kanban-group.entry.js +1 -1
  87. package/dist/esm/limebb-kanban-item.entry.js +1 -1
  88. package/dist/esm/limebb-lime-query-builder.entry.js +88 -168
  89. package/dist/esm/limebb-lime-query-filter-and.entry.js +76 -0
  90. package/dist/esm/limebb-lime-query-filter-comparison_2.entry.js +142 -0
  91. package/dist/esm/limebb-lime-query-filter-group_4.entry.js +596 -0
  92. package/dist/esm/limebb-lime-query-filter-or.entry.js +64 -0
  93. package/dist/esm/limebb-limeobject-file-viewer.entry.js +1 -1
  94. package/dist/esm/limebb-limetype-field_2.entry.js +36 -5
  95. package/dist/esm/limebb-live-docs-info.entry.js +2 -2
  96. package/dist/esm/limebb-loader.entry.js +1 -1
  97. package/dist/esm/limebb-locale-picker.entry.js +2 -2
  98. package/dist/esm/limebb-mention-group-counter.entry.js +2 -2
  99. package/dist/esm/limebb-mention.entry.js +1 -1
  100. package/dist/esm/limebb-navigation-button_2.entry.js +3 -3
  101. package/dist/esm/limebb-notification-item.entry.js +2 -2
  102. package/dist/esm/limebb-notification-list.entry.js +1 -1
  103. package/dist/esm/limebb-percentage-visualizer.entry.js +2 -2
  104. package/dist/esm/limebb-text-editor.entry.js +3 -3
  105. package/dist/esm/limebb-trend-indicator.entry.js +1 -1
  106. package/dist/esm/{limetype-6e7552a7.js → limetype-c0e041f7.js} +1 -1
  107. package/dist/esm/loader.js +1 -1
  108. package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
  109. package/dist/lime-crm-building-blocks/p-03accd53.entry.js +1 -0
  110. package/dist/lime-crm-building-blocks/{p-a1818969.entry.js → p-03af0e66.entry.js} +1 -1
  111. package/dist/lime-crm-building-blocks/{p-f402184f.entry.js → p-098ee6c1.entry.js} +1 -1
  112. package/dist/lime-crm-building-blocks/{p-42e52b50.entry.js → p-1be0eec7.entry.js} +1 -1
  113. package/dist/lime-crm-building-blocks/{p-2aa18c2b.entry.js → p-206575e4.entry.js} +1 -1
  114. package/dist/lime-crm-building-blocks/p-20bfca36.js +1 -0
  115. package/dist/lime-crm-building-blocks/{p-82d33d43.entry.js → p-2faaacbc.entry.js} +1 -1
  116. package/dist/lime-crm-building-blocks/{p-d4016891.entry.js → p-2fdcb868.entry.js} +1 -1
  117. package/dist/lime-crm-building-blocks/{p-f52125a0.entry.js → p-3122ea05.entry.js} +1 -1
  118. package/dist/lime-crm-building-blocks/{p-baf4e428.entry.js → p-3175883d.entry.js} +1 -1
  119. package/dist/lime-crm-building-blocks/{p-8c8b7115.entry.js → p-32534eb7.entry.js} +1 -1
  120. package/dist/lime-crm-building-blocks/{p-6c1146ca.entry.js → p-36ea13c0.entry.js} +1 -1
  121. package/dist/lime-crm-building-blocks/p-4715210d.entry.js +1 -0
  122. package/dist/lime-crm-building-blocks/{p-1fba0ade.js → p-4838284a.js} +1 -1
  123. package/dist/lime-crm-building-blocks/{p-5e4ba110.entry.js → p-5464f0de.entry.js} +1 -1
  124. package/dist/lime-crm-building-blocks/{p-e9d23ef7.entry.js → p-569c86b5.entry.js} +1 -1
  125. package/dist/lime-crm-building-blocks/{p-90e1716a.entry.js → p-5dc574a3.entry.js} +1 -1
  126. package/dist/lime-crm-building-blocks/p-5f7644b5.entry.js +1 -0
  127. package/dist/lime-crm-building-blocks/{p-00da9b24.entry.js → p-631ca5a5.entry.js} +1 -1
  128. package/dist/lime-crm-building-blocks/p-67dbaa4c.entry.js +1 -0
  129. package/dist/lime-crm-building-blocks/{p-beb0d164.entry.js → p-7271f47a.entry.js} +1 -1
  130. package/dist/lime-crm-building-blocks/{p-34357744.entry.js → p-9031f136.entry.js} +1 -1
  131. package/dist/lime-crm-building-blocks/p-91732502.entry.js +1 -0
  132. package/dist/lime-crm-building-blocks/{p-8c4eb49f.entry.js → p-93cadc1e.entry.js} +1 -1
  133. package/dist/lime-crm-building-blocks/{p-3932077b.entry.js → p-9cac4de2.entry.js} +1 -1
  134. package/dist/lime-crm-building-blocks/{p-79d4668a.entry.js → p-a200954f.entry.js} +1 -1
  135. package/dist/lime-crm-building-blocks/p-aa646df7.entry.js +1 -0
  136. package/dist/lime-crm-building-blocks/{p-d89c44ad.entry.js → p-b9b954d9.entry.js} +1 -1
  137. package/dist/lime-crm-building-blocks/{p-3a620226.entry.js → p-cfa1a4ad.entry.js} +1 -1
  138. package/dist/lime-crm-building-blocks/{p-ef8a5266.entry.js → p-e8946134.entry.js} +1 -1
  139. package/dist/lime-crm-building-blocks/{p-9d9f25da.entry.js → p-eb81bceb.entry.js} +1 -1
  140. package/dist/lime-crm-building-blocks/{p-50d3d61a.entry.js → p-ee1b00b9.entry.js} +1 -1
  141. package/dist/types/components/lime-query-builder/expressions/lime-query-filter-and.d.ts +5 -4
  142. package/dist/types/components/lime-query-builder/expressions/lime-query-filter-comparison.d.ts +6 -4
  143. package/dist/types/components/lime-query-builder/expressions/lime-query-filter-expression.d.ts +10 -14
  144. package/dist/types/components/lime-query-builder/expressions/lime-query-filter-group.d.ts +60 -0
  145. package/dist/types/components/lime-query-builder/expressions/lime-query-filter-not.d.ts +4 -4
  146. package/dist/types/components/lime-query-builder/expressions/lime-query-filter-or.d.ts +5 -4
  147. package/dist/types/components/lime-query-builder/lime-query-builder.d.ts +6 -0
  148. package/dist/types/components/lime-query-builder/lime-query.types.d.ts +2 -1
  149. package/dist/types/components.d.ts +177 -65
  150. package/package.json +1 -1
  151. package/dist/cjs/isEqual-e77cce75.js +0 -37
  152. package/dist/cjs/lime-query.types-bcb63a22.js +0 -61
  153. package/dist/cjs/limebb-lime-query-filter-and_5.cjs.entry.js +0 -278
  154. package/dist/cjs/limebb-lime-query-value-input.cjs.entry.js +0 -239
  155. package/dist/cjs/limebb-property-selector.cjs.entry.js +0 -234
  156. package/dist/components/isEqual.js +0 -35
  157. package/dist/components/lime-query-filter-and.js +0 -408
  158. package/dist/esm/isEqual-57d0c223.js +0 -35
  159. package/dist/esm/lime-query.types-f72355e1.js +0 -59
  160. package/dist/esm/limebb-lime-query-filter-and_5.entry.js +0 -270
  161. package/dist/esm/limebb-lime-query-value-input.entry.js +0 -235
  162. package/dist/esm/limebb-property-selector.entry.js +0 -230
  163. package/dist/lime-crm-building-blocks/p-02c0cc04.entry.js +0 -1
  164. package/dist/lime-crm-building-blocks/p-0957b2a6.entry.js +0 -1
  165. package/dist/lime-crm-building-blocks/p-3b0a15ec.js +0 -1
  166. package/dist/lime-crm-building-blocks/p-5a6d2e7f.js +0 -1
  167. package/dist/lime-crm-building-blocks/p-60971d64.js +0 -1
  168. package/dist/lime-crm-building-blocks/p-70a28b93.entry.js +0 -1
  169. package/dist/lime-crm-building-blocks/p-96beaabc.entry.js +0 -1
  170. package/dist/lime-crm-building-blocks/p-f99c611d.entry.js +0 -1
@@ -0,0 +1,269 @@
1
+ import { h } from "@stencil/core";
2
+ import { Operator, } from "@limetech/lime-web-components";
3
+ /**
4
+ * Lime Query Filter Group Component
5
+ *
6
+ * Renders a group of filter expressions with AND/OR logic that can be toggled.
7
+ * Users can click the header to toggle between "All conditions" (AND) and
8
+ * "Any condition" (OR).
9
+ *
10
+ * This component displays:
11
+ * - A clickable header showing the current logic (AND/OR)
12
+ * - A list of child expressions (which can be comparisons or nested groups)
13
+ * - An "Add" button to add more expressions
14
+ *
15
+ * Clicking the header toggles between AND and OR logic.
16
+ * If a child component emits an ExpressionChange event with undefined, the
17
+ * child is removed from the group.
18
+ *
19
+ * @private
20
+ */
21
+ export class LimeQueryFilterGroupComponent {
22
+ constructor() {
23
+ this.renderChildExpression = (expression, childIndex) => (h("li", null, h("limebb-lime-query-filter-expression", { platform: this.platform, context: this.context, limetype: this.limetype, activeLimetype: this.activeLimetype, expression: expression, onExpressionChange: this.handleExpressionChange(childIndex) })));
24
+ this.handleToggleOperator = () => {
25
+ const newOperator = this.expression.op === Operator.AND ? Operator.OR : Operator.AND;
26
+ this.expressionChange.emit({
27
+ op: newOperator,
28
+ exp: this.expression.exp,
29
+ });
30
+ };
31
+ this.handleAddChildExpression = () => {
32
+ // Always add a new comparison directly to the list
33
+ const newChild = {
34
+ key: '',
35
+ op: Operator.EQUALS,
36
+ exp: '',
37
+ };
38
+ this.expressionChange.emit({
39
+ op: this.expression.op,
40
+ exp: [...this.expression.exp, newChild],
41
+ });
42
+ };
43
+ this.handleAddChildGroup = () => {
44
+ // Add a nested group of the opposite type
45
+ const oppositeOp = this.expression.op === Operator.AND ? Operator.OR : Operator.AND;
46
+ const newChild = {
47
+ op: oppositeOp,
48
+ exp: [
49
+ {
50
+ key: '',
51
+ op: Operator.EQUALS,
52
+ exp: '',
53
+ },
54
+ ],
55
+ };
56
+ this.expressionChange.emit({
57
+ op: this.expression.op,
58
+ exp: [...this.expression.exp, newChild],
59
+ });
60
+ };
61
+ this.handleExpressionChange = (updatedChildIndex) => (event) => {
62
+ event.stopPropagation();
63
+ const updatedExpression = event.detail;
64
+ const expressions = [...this.expression.exp];
65
+ if (updatedExpression === undefined) {
66
+ // Deletion - remove the child and potentially unwrap
67
+ expressions.splice(updatedChildIndex, 1);
68
+ if (expressions.length === 0) {
69
+ this.expressionChange.emit(undefined);
70
+ return;
71
+ }
72
+ if (expressions.length === 1) {
73
+ // Unwrap when only one child remains after deletion
74
+ this.expressionChange.emit(expressions[0]);
75
+ return;
76
+ }
77
+ }
78
+ else {
79
+ // Update - replace the child, don't unwrap
80
+ expressions[updatedChildIndex] = updatedExpression;
81
+ }
82
+ this.expressionChange.emit({
83
+ op: this.expression.op,
84
+ exp: expressions,
85
+ });
86
+ };
87
+ }
88
+ render() {
89
+ const subheading = this.getSubheading();
90
+ return (h("div", { key: '43a1d99fd896e3ad49dd97594e54bccaf74c3aa0', class: "expression" }, subheading && (h("limel-header", { key: '534eb0a3db2f0194e8a28e2fb071beb545f38458', subheading: subheading, onClick: this.handleToggleOperator, class: "clickable-header" })), h("ul", { key: '9d29d98ab034bf2878e7dc19828bc045dbdd492f' }, this.expression.exp.map(this.renderChildExpression), h("li", { key: '44b266c8aeb390b8a68b3e08a51a0760a6421f93', class: "add-button" }, this.renderAddButton(), this.renderAddGroupButton()))));
91
+ }
92
+ getSubheading() {
93
+ if (this.expression.exp.length <= 1) {
94
+ return '';
95
+ }
96
+ return this.expression.op === Operator.AND
97
+ ? 'All of these conditions are true'
98
+ : 'Any of these conditions are true';
99
+ }
100
+ renderAddButton() {
101
+ const label = this.getAddButtonLabel();
102
+ return (h("limel-button", { label: label, icon: "plus_math", onClick: this.handleAddChildExpression }));
103
+ }
104
+ renderAddGroupButton() {
105
+ const label = this.getAddGroupButtonLabel();
106
+ return (h("limel-button", { label: label, icon: "tree_structure", onClick: this.handleAddChildGroup }));
107
+ }
108
+ getAddButtonLabel() {
109
+ const isAnd = this.expression.op === Operator.AND;
110
+ if (this.expression.exp.length === 0) {
111
+ return 'Add a condition';
112
+ }
113
+ return isAnd ? 'Add another condition' : 'Add alternative';
114
+ }
115
+ getAddGroupButtonLabel() {
116
+ const isAnd = this.expression.op === Operator.AND;
117
+ if (this.expression.exp.length === 0) {
118
+ return 'Add a group';
119
+ }
120
+ return isAnd ? 'Add another group' : 'Add alternative group';
121
+ }
122
+ static get is() { return "limebb-lime-query-filter-group"; }
123
+ static get encapsulation() { return "shadow"; }
124
+ static get originalStyleUrls() {
125
+ return {
126
+ "$": ["lime-query-filter-group.scss"]
127
+ };
128
+ }
129
+ static get styleUrls() {
130
+ return {
131
+ "$": ["lime-query-filter-group.css"]
132
+ };
133
+ }
134
+ static get properties() {
135
+ return {
136
+ "platform": {
137
+ "type": "unknown",
138
+ "mutable": false,
139
+ "complexType": {
140
+ "original": "LimeWebComponentPlatform",
141
+ "resolved": "LimeWebComponentPlatform",
142
+ "references": {
143
+ "LimeWebComponentPlatform": {
144
+ "location": "import",
145
+ "path": "@limetech/lime-web-components",
146
+ "id": "node_modules::LimeWebComponentPlatform"
147
+ }
148
+ }
149
+ },
150
+ "required": false,
151
+ "optional": false,
152
+ "docs": {
153
+ "tags": [],
154
+ "text": "Platform service provider"
155
+ },
156
+ "getter": false,
157
+ "setter": false
158
+ },
159
+ "context": {
160
+ "type": "unknown",
161
+ "mutable": false,
162
+ "complexType": {
163
+ "original": "LimeWebComponentContext",
164
+ "resolved": "LimeWebComponentContext",
165
+ "references": {
166
+ "LimeWebComponentContext": {
167
+ "location": "import",
168
+ "path": "@limetech/lime-web-components",
169
+ "id": "node_modules::LimeWebComponentContext"
170
+ }
171
+ }
172
+ },
173
+ "required": false,
174
+ "optional": false,
175
+ "docs": {
176
+ "tags": [],
177
+ "text": "Component context"
178
+ },
179
+ "getter": false,
180
+ "setter": false
181
+ },
182
+ "limetype": {
183
+ "type": "string",
184
+ "mutable": false,
185
+ "complexType": {
186
+ "original": "string",
187
+ "resolved": "string",
188
+ "references": {}
189
+ },
190
+ "required": false,
191
+ "optional": false,
192
+ "docs": {
193
+ "tags": [],
194
+ "text": "The limetype being queried (e.g., \"deal\", \"company\")"
195
+ },
196
+ "getter": false,
197
+ "setter": false,
198
+ "attribute": "limetype",
199
+ "reflect": false
200
+ },
201
+ "activeLimetype": {
202
+ "type": "string",
203
+ "mutable": false,
204
+ "complexType": {
205
+ "original": "string",
206
+ "resolved": "string | undefined",
207
+ "references": {}
208
+ },
209
+ "required": false,
210
+ "optional": true,
211
+ "docs": {
212
+ "tags": [],
213
+ "text": "The limetype of the active object (for %activeObject% placeholders)"
214
+ },
215
+ "getter": false,
216
+ "setter": false,
217
+ "attribute": "active-limetype",
218
+ "reflect": false
219
+ },
220
+ "expression": {
221
+ "type": "unknown",
222
+ "mutable": false,
223
+ "complexType": {
224
+ "original": "AndOrExpression",
225
+ "resolved": "{ op: Operator.AND | Operator.OR; exp: Expression[]; }",
226
+ "references": {
227
+ "AndOrExpression": {
228
+ "location": "import",
229
+ "path": "@limetech/lime-web-components",
230
+ "id": "node_modules::AndOrExpression"
231
+ }
232
+ }
233
+ },
234
+ "required": false,
235
+ "optional": false,
236
+ "docs": {
237
+ "tags": [],
238
+ "text": "The group expression (AND or OR)"
239
+ },
240
+ "getter": false,
241
+ "setter": false
242
+ }
243
+ };
244
+ }
245
+ static get events() {
246
+ return [{
247
+ "method": "expressionChange",
248
+ "name": "expressionChange",
249
+ "bubbles": true,
250
+ "cancelable": true,
251
+ "composed": true,
252
+ "docs": {
253
+ "tags": [],
254
+ "text": "Emitted when the group expression changes\nEmits undefined when expression should be removed\nCan emit any Expression type when unwrapping (single child)"
255
+ },
256
+ "complexType": {
257
+ "original": "Expression | undefined",
258
+ "resolved": "undefined | { key: string; op: BasicOperator; exp: ExpressionValue; } | { key: string; op: Operator.IN; exp: ExpressionValue[]; } | { op: Operator.AND | Operator.OR; exp: Expression[]; } | { op: Operator.NOT; exp: Expression; } | { type: \"filter\"; key: string; op: Operator.IN; exp: string; }",
259
+ "references": {
260
+ "Expression": {
261
+ "location": "import",
262
+ "path": "@limetech/lime-web-components",
263
+ "id": "node_modules::Expression"
264
+ }
265
+ }
266
+ }
267
+ }];
268
+ }
269
+ }
@@ -1,5 +1,5 @@
1
1
  import { h } from "@stencil/core";
2
- import { isEqual } from "lodash-es";
2
+ import { Operator, } from "@limetech/lime-web-components";
3
3
  /**
4
4
  * Lime Query Filter NOT Component
5
5
  *
@@ -21,22 +21,21 @@ import { isEqual } from "lodash-es";
21
21
  export class LimeQueryFilterNotComponent {
22
22
  constructor() {
23
23
  this.handleExpressionChange = (event) => {
24
+ var _a;
24
25
  event.stopPropagation();
25
- const missingExpression = {
26
- filter_type: '',
27
- };
28
- if (isEqual(event.detail, missingExpression)) {
29
- this.expressionChange.emit(missingExpression);
26
+ const updatedExpression = (_a = event.detail) !== null && _a !== void 0 ? _a : undefined;
27
+ if (updatedExpression === undefined) {
28
+ this.expressionChange.emit(undefined);
30
29
  return;
31
30
  }
32
31
  this.expressionChange.emit({
33
- filter_type: 'NOT',
34
- expression: event.detail,
32
+ op: Operator.NOT,
33
+ exp: updatedExpression,
35
34
  });
36
35
  };
37
36
  }
38
37
  render() {
39
- return (h("div", { key: '005a133401b16d03bdb5d8683b6a51c2c9691dfb', class: "expression" }, this.label && h("limel-header", { key: '31b44cd46fa6cd6fbe19e77df4eef9075523733d', heading: this.label }), h("limebb-lime-query-filter-expression", { key: '487f857eccec79d6a1da6a71aa31be04204b8862', platform: this.platform, context: this.context, label: "Not", limetype: this.limetype, activeLimetype: this.activeLimetype, expression: this.expression.expression, onExpressionChange: this.handleExpressionChange })));
38
+ return (h("div", { key: 'f1dfd7fd4ec7dc1873841d1c8b3d2bb6677634fd', class: "expression" }, this.label && h("limel-header", { key: '91e1b754f6e45c70f49bf2a770898a590defaf22', heading: this.label }), h("limebb-lime-query-filter-expression", { key: 'bf42f3c71521a413e5ecc49a8e0d6401b34384a2', platform: this.platform, context: this.context, label: "Not", limetype: this.limetype, activeLimetype: this.activeLimetype, expression: this.expression.exp, onExpressionChange: this.handleExpressionChange })));
40
39
  }
41
40
  static get is() { return "limebb-lime-query-filter-not"; }
42
41
  static get encapsulation() { return "shadow"; }
@@ -159,13 +158,13 @@ export class LimeQueryFilterNotComponent {
159
158
  "type": "unknown",
160
159
  "mutable": false,
161
160
  "complexType": {
162
- "original": "LimeQueryFilterNot",
163
- "resolved": "LimeQueryFilterNot",
161
+ "original": "NotExpression",
162
+ "resolved": "{ op: Operator.NOT; exp: Expression; }",
164
163
  "references": {
165
- "LimeQueryFilterNot": {
164
+ "NotExpression": {
166
165
  "location": "import",
167
- "path": "../lime-query.types",
168
- "id": "src/components/lime-query-builder/lime-query.types.ts::LimeQueryFilterNot"
166
+ "path": "@limetech/lime-web-components",
167
+ "id": "node_modules::NotExpression"
169
168
  }
170
169
  }
171
170
  },
@@ -189,21 +188,16 @@ export class LimeQueryFilterNotComponent {
189
188
  "composed": true,
190
189
  "docs": {
191
190
  "tags": [],
192
- "text": "Emitted when the NOT expression changes (child expression modified or removed)"
191
+ "text": "Emitted when the NOT expression changes (child expression modified or removed)\nEmits undefined when the expression should be removed"
193
192
  },
194
193
  "complexType": {
195
- "original": "LimeQueryFilterNot | LimeQueryFilterMissing",
196
- "resolved": "LimeQueryFilterMissing | LimeQueryFilterNot",
194
+ "original": "NotExpression | undefined",
195
+ "resolved": "undefined | { op: Operator.NOT; exp: Expression; }",
197
196
  "references": {
198
- "LimeQueryFilterNot": {
199
- "location": "import",
200
- "path": "../lime-query.types",
201
- "id": "src/components/lime-query-builder/lime-query.types.ts::LimeQueryFilterNot"
202
- },
203
- "LimeQueryFilterMissing": {
197
+ "NotExpression": {
204
198
  "location": "import",
205
- "path": "../lime-query.types",
206
- "id": "src/components/lime-query-builder/lime-query.types.ts::LimeQueryFilterMissing"
199
+ "path": "@limetech/lime-web-components",
200
+ "id": "node_modules::NotExpression"
207
201
  }
208
202
  }
209
203
  }
@@ -1,5 +1,5 @@
1
1
  import { h } from "@stencil/core";
2
- import { isEqual } from "lodash-es";
2
+ import { Operator, } from "@limetech/lime-web-components";
3
3
  /**
4
4
  * Lime Query Filter OR Component
5
5
  *
@@ -19,46 +19,51 @@ import { isEqual } from "lodash-es";
19
19
  export class LimeQueryFilterOrComponent {
20
20
  constructor() {
21
21
  this.renderChildExpression = (expression, childIndex) => {
22
- const label = this.expression.expressions.length === 1 ? this.label : undefined;
22
+ const label = this.expression.exp.length === 1 ? this.label : undefined;
23
23
  return (h("li", null, h("limebb-lime-query-filter-expression", { platform: this.platform, context: this.context, label: label, limetype: this.limetype, activeLimetype: this.activeLimetype, expression: expression, onExpressionChange: this.handleExpressionChange(childIndex) })));
24
24
  };
25
25
  this.handleExpressionChange = (updatedChildIndex) => (event) => {
26
+ var _a;
26
27
  event.stopPropagation();
27
- const updatedExpression = event.detail;
28
- const expressions = [...this.expression.expressions];
29
- const missingExpression = {
30
- filter_type: '',
31
- };
32
- if (isEqual(updatedExpression, missingExpression)) {
28
+ const updatedExpression = (_a = event.detail) !== null && _a !== void 0 ? _a : undefined;
29
+ const expressions = [...this.expression.exp];
30
+ if (updatedExpression === undefined) {
33
31
  expressions.splice(updatedChildIndex, 1);
34
32
  }
35
33
  else {
36
34
  expressions[updatedChildIndex] = updatedExpression;
37
35
  }
38
36
  if (expressions.length === 0) {
39
- this.expressionChange.emit(missingExpression);
37
+ this.expressionChange.emit(undefined);
38
+ return;
39
+ }
40
+ if (expressions.length === 1) {
41
+ this.expressionChange.emit(expressions[0]);
40
42
  return;
41
43
  }
42
44
  this.expressionChange.emit({
43
- filter_type: 'OR',
44
- expressions: expressions,
45
+ op: Operator.OR,
46
+ exp: expressions,
45
47
  });
46
48
  };
47
49
  this.handleAddChildExpression = () => {
50
+ const newComparison = {
51
+ key: '',
52
+ op: Operator.EQUALS,
53
+ exp: '',
54
+ };
48
55
  const updatedExpressionsList = [
49
- ...this.expression.expressions,
50
- {
51
- filter_type: '',
52
- },
56
+ ...this.expression.exp,
57
+ newComparison,
53
58
  ];
54
59
  this.expressionChange.emit({
55
- filter_type: 'OR',
56
- expressions: updatedExpressionsList,
60
+ op: Operator.OR,
61
+ exp: updatedExpressionsList,
57
62
  });
58
63
  };
59
64
  }
60
65
  render() {
61
- return (h("div", { key: '9a0e6876f32ebcb614ab1ef0ccb122a5a5b8e978', class: "expression" }, this.expression.expressions.length > 1 && (h("limel-header", { key: 'cb1ff04ce7669582f0c4f6afefbce3402876d435', heading: this.label, subheading: "Any of these conditions is true" })), h("ul", { key: '21efcfec20f4ea04105ccbea880dbb9ed551efb9' }, this.expression.expressions.map(this.renderChildExpression), h("li", { key: '541811a52176182be501078c3cf662bbe6a71cda', class: "add-button" }, this.renderAddChildExpression()))));
66
+ return (h("div", { key: '8efd3bba832388365d89313ebc007514fd3478e0', class: "expression" }, this.expression.exp.length > 1 && (h("limel-header", { key: 'eb65924d2e9b7e0e4e47f769b3af76773ae98266', heading: this.label, subheading: "Any of these conditions is true" })), h("ul", { key: 'cc6a4c9d7532096f054e9e20d54e67d14d45a038' }, this.expression.exp.map(this.renderChildExpression), h("li", { key: 'ad876db1e6435657d2263351b75ae4acb3a6a234', class: "add-button" }, this.renderAddChildExpression()))));
62
67
  }
63
68
  renderAddChildExpression() {
64
69
  return (h("limel-icon-button", { label: "Add alternative", icon: "plus_math", onClick: this.handleAddChildExpression }));
@@ -184,13 +189,13 @@ export class LimeQueryFilterOrComponent {
184
189
  "type": "unknown",
185
190
  "mutable": false,
186
191
  "complexType": {
187
- "original": "LimeQueryFilterOr",
188
- "resolved": "LimeQueryFilterOr",
192
+ "original": "AndOrExpression",
193
+ "resolved": "{ op: Operator.AND | Operator.OR; exp: Expression[]; }",
189
194
  "references": {
190
- "LimeQueryFilterOr": {
195
+ "AndOrExpression": {
191
196
  "location": "import",
192
- "path": "../lime-query.types",
193
- "id": "src/components/lime-query-builder/lime-query.types.ts::LimeQueryFilterOr"
197
+ "path": "@limetech/lime-web-components",
198
+ "id": "node_modules::AndOrExpression"
194
199
  }
195
200
  }
196
201
  },
@@ -214,21 +219,16 @@ export class LimeQueryFilterOrComponent {
214
219
  "composed": true,
215
220
  "docs": {
216
221
  "tags": [],
217
- "text": "Emitted when the OR expression changes (expressions added/removed/modified)"
222
+ "text": "Emitted when the OR expression changes (expressions added/removed/modified)\nEmits undefined when expression should be removed\nCan emit any Expression type when unwrapping (single child)"
218
223
  },
219
224
  "complexType": {
220
- "original": "LimeQueryFilterOr | LimeQueryFilterMissing",
221
- "resolved": "LimeQueryFilterMissing | LimeQueryFilterOr",
225
+ "original": "Expression | undefined",
226
+ "resolved": "undefined | { key: string; op: BasicOperator; exp: ExpressionValue; } | { key: string; op: Operator.IN; exp: ExpressionValue[]; } | { op: Operator.AND | Operator.OR; exp: Expression[]; } | { op: Operator.NOT; exp: Expression; } | { type: \"filter\"; key: string; op: Operator.IN; exp: string; }",
222
227
  "references": {
223
- "LimeQueryFilterOr": {
228
+ "Expression": {
224
229
  "location": "import",
225
- "path": "../lime-query.types",
226
- "id": "src/components/lime-query-builder/lime-query.types.ts::LimeQueryFilterOr"
227
- },
228
- "LimeQueryFilterMissing": {
229
- "location": "import",
230
- "path": "../lime-query.types",
231
- "id": "src/components/lime-query-builder/lime-query.types.ts::LimeQueryFilterMissing"
230
+ "path": "@limetech/lime-web-components",
231
+ "id": "node_modules::Expression"
232
232
  }
233
233
  }
234
234
  }
@@ -9,8 +9,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
9
9
  return c > 3 && r && Object.defineProperty(target, key, r), r;
10
10
  };
11
11
  import { h } from "@stencil/core";
12
- import { SelectLimeTypes as Limetypes, } from "@limetech/lime-web-components";
13
- import { guiFilterToLimeQuery, limeQueryToGuiFilter, normalizeLimeQueryFilterForGui, } from "./filter-conversion";
12
+ import { Operator, SelectLimeTypes as Limetypes, } from "@limetech/lime-web-components";
14
13
  import { isLimeQuerySupported, } from "./lime-query-validation";
15
14
  /**
16
15
  * Lime Query Builder Component
@@ -46,16 +45,16 @@ export class LimeQueryBuilder {
46
45
  this.codeValue = '';
47
46
  this.limetype = '';
48
47
  this.filter = {
49
- filter_type: 'AND',
50
- expressions: [],
48
+ op: Operator.AND,
49
+ exp: [],
51
50
  };
52
51
  this.handleLimetypeChange = (event) => {
53
52
  event.stopPropagation();
54
53
  this.limetype = event.detail;
55
54
  // Reset filter when limetype changes
56
55
  this.filter = {
57
- filter_type: 'AND',
58
- expressions: [],
56
+ op: Operator.AND,
57
+ exp: [],
59
58
  };
60
59
  // Reset response format when limetype changes
61
60
  this.internalResponseFormat = {
@@ -67,15 +66,15 @@ export class LimeQueryBuilder {
67
66
  };
68
67
  this.handleFilterChange = (event) => {
69
68
  event.stopPropagation();
70
- // Convert missing expression back to empty AND to keep the UI consistent
71
- if (event.detail.filter_type === '') {
69
+ const expression = event.detail;
70
+ if (expression === undefined) {
72
71
  this.filter = {
73
- filter_type: 'AND',
74
- expressions: [],
72
+ op: Operator.AND,
73
+ exp: [],
75
74
  };
76
75
  }
77
76
  else {
78
- this.filter = event.detail;
77
+ this.filter = expression;
79
78
  }
80
79
  this.emitChange();
81
80
  };
@@ -102,7 +101,7 @@ export class LimeQueryBuilder {
102
101
  }
103
102
  // Update internal state from parsed query
104
103
  this.limetype = parsed.limetype || '';
105
- this.filter = normalizeLimeQueryFilterForGui(limeQueryToGuiFilter(parsed.filter));
104
+ this.filter = this.normalizeFilter(parsed.filter);
106
105
  this.internalResponseFormat = parsed.responseFormat;
107
106
  this.limit = parsed.limit;
108
107
  this.mode = 'gui';
@@ -143,7 +142,7 @@ export class LimeQueryBuilder {
143
142
  }
144
143
  if (this.value) {
145
144
  this.limetype = this.value.limetype || '';
146
- this.filter = normalizeLimeQueryFilterForGui(limeQueryToGuiFilter(this.value.filter));
145
+ this.filter = this.normalizeFilter(this.value.filter);
147
146
  this.internalResponseFormat = this.value.responseFormat;
148
147
  this.limit = this.value.limit;
149
148
  }
@@ -158,10 +157,26 @@ export class LimeQueryBuilder {
158
157
  render() {
159
158
  const guiSupported = this.checkGuiSupport();
160
159
  const showCodeMode = !this.guiModeEnabled || this.mode === 'code';
161
- return (h("div", { key: '96d1a933f699404c3806af3742e9ad30d53562aa', class: "lime-query-builder" }, this.renderLabel(), this.renderModeControls(guiSupported), showCodeMode
160
+ return (h("div", { key: '5ff70a352e3e57ff4c51d44627bd4b5ed367fff4', class: "lime-query-builder" }, this.renderLabel(), this.renderModeControls(guiSupported), showCodeMode
162
161
  ? this.renderCodeMode(guiSupported)
163
162
  : this.renderGuiMode()));
164
163
  }
164
+ /**
165
+ * Normalize filter to ensure top-level is an AND group.
166
+ * This ensures Add buttons are available in the UI.
167
+ * @param filter
168
+ */
169
+ normalizeFilter(filter) {
170
+ if (!filter) {
171
+ return { op: Operator.AND, exp: [] };
172
+ }
173
+ // If it's already an AND at the top level, keep it
174
+ if ('op' in filter && filter.op === Operator.AND) {
175
+ return filter;
176
+ }
177
+ // Otherwise wrap in AND
178
+ return { op: Operator.AND, exp: [filter] };
179
+ }
165
180
  emitChange() {
166
181
  // Only emit in GUI mode
167
182
  if (this.mode === 'code') {
@@ -179,7 +194,7 @@ export class LimeQueryBuilder {
179
194
  const limeQuery = {
180
195
  limetype: this.limetype,
181
196
  responseFormat: responseFormat,
182
- filter: guiFilterToLimeQuery(this.filter),
197
+ filter: this.filter,
183
198
  };
184
199
  if (this.limit !== undefined && this.limit > 0) {
185
200
  limeQuery.limit = this.limit;
@@ -200,7 +215,7 @@ export class LimeQueryBuilder {
200
215
  const limeQuery = {
201
216
  limetype: this.limetype,
202
217
  responseFormat: responseFormat,
203
- filter: guiFilterToLimeQuery(this.filter),
218
+ filter: this.filter,
204
219
  };
205
220
  if (this.limit !== undefined && this.limit > 0) {
206
221
  limeQuery.limit = this.limit;
@@ -251,7 +266,7 @@ export class LimeQueryBuilder {
251
266
  queryToCheck = {
252
267
  limetype: this.limetype,
253
268
  responseFormat: responseFormat,
254
- filter: guiFilterToLimeQuery(this.filter),
269
+ filter: this.filter,
255
270
  };
256
271
  if (this.limit !== undefined && this.limit > 0) {
257
272
  queryToCheck.limit = this.limit;
@@ -78,7 +78,7 @@ export class LimetypeField {
78
78
  value: '',
79
79
  };
80
80
  options.unshift(emptyOption);
81
- return (h("limel-select", { key: '82ce4b92e4ff1285e259f07a35634df722f5baab', label: this.label, options: options, value: selectedOption, required: this.required, helperText: this.helperText, invalid: invalid, disabled: this.disabled || this.readonly, onChange: this.handleChange }));
81
+ return (h("limel-select", { key: 'cf27b83c4751838e85436af443a275b3d7c9dfee', label: this.label, options: options, value: selectedOption, required: this.required, helperText: this.helperText, invalid: invalid, disabled: this.disabled || this.readonly, onChange: this.handleChange }));
82
82
  }
83
83
  componentWillRender() {
84
84
  this.updatePropertyFields(this.value || '');
@@ -5,8 +5,8 @@ import { h } from "@stencil/core";
5
5
  export class LiveDocsInfo {
6
6
  render() {
7
7
  return [
8
- h("div", { key: '98c48e74c9cade3b2da713618d585dd8f80e3116', class: "header" }, h("limel-icon", { key: 'b8f56066533f64842a25a324c2794914700c2e8a', name: "not_showing_video_frames" }), h("h2", { key: 'c1e8c722d1fc7d22a85f348a66094ffd8c5a5dd3' }, "Viewing this file type requires ", h("em", { key: '8aca798b2cf1bfe81be5142496e693f57efea8b1' }, "Live Docs"))),
9
- h("p", { key: '3934d0c93f6c4b6524643c2ecadd0f3f0f925b09' }, h("em", { key: '1d3b811bf94ba19644231e77434442f9f1ade8f6' }, "Live Docs"), " not only enables you to view many file formats such as Microsoft Office documents, but it also empowers you to edit them right in the CRM. No need to download anything on your device!", h("a", { key: '023c16b0cfc5b57d750c9a344690fcce51350100', target: "_blank", href: "https://www.lime-technologies.com/en/lime-crm/live-docs/" }, "Learn more")),
8
+ h("div", { key: '849694495956b6afbdfeac8aa7de680e1ab03450', class: "header" }, h("limel-icon", { key: '84117fdfff949d6b41b9ec3f2b3ec73f21e5be7b', name: "not_showing_video_frames" }), h("h2", { key: '90f1738815699808c6353707b4f366d8a2c661ac' }, "Viewing this file type requires ", h("em", { key: 'ef09921e893851f06b756e1e2777847a7e4bd563' }, "Live Docs"))),
9
+ h("p", { key: 'a835a0e1cabd84d7509167b3331878807b083130' }, h("em", { key: '3f9ce9e473f33b89adfeb3b143e46cabb6feb1d4' }, "Live Docs"), " not only enables you to view many file formats such as Microsoft Office documents, but it also empowers you to edit them right in the CRM. No need to download anything on your device!", h("a", { key: 'f3e683b041ddd66e6f23514d9bb5f3faf80f4c3a', target: "_blank", href: "https://www.lime-technologies.com/en/lime-crm/live-docs/" }, "Learn more")),
10
10
  ];
11
11
  }
12
12
  static get is() { return "limebb-live-docs-info"; }
@@ -53,7 +53,7 @@ export class LocalePicker {
53
53
  const value = this.value;
54
54
  selectedOptions = options.find((option) => option.value === value);
55
55
  }
56
- return (h("limel-select", { key: '4010306cc9bb60b5d1233165eeca5468fe011c33', value: selectedOptions, options: sortBy(options, 'text'), helperText: this.helperText, label: this.label, required: this.required, disabled: this.disabled, readonly: this.readonly, onChange: this.handleChange, multiple: this.multipleChoice }));
56
+ return (h("limel-select", { key: '5b3491e9dd6725186c4a2795e7893de43457e147', value: selectedOptions, options: sortBy(options, 'text'), helperText: this.helperText, label: this.label, required: this.required, disabled: this.disabled, readonly: this.readonly, onChange: this.handleChange, multiple: this.multipleChoice }));
57
57
  }
58
58
  static get is() { return "limebb-locale-picker"; }
59
59
  static get encapsulation() { return "shadow"; }
@@ -56,7 +56,7 @@ export class NotificationListItem {
56
56
  }
57
57
  render() {
58
58
  var _a, _b;
59
- return (h(Host, { key: 'e51a5ebe9c955d43f1025a61a12ca870abb66347', id: this.item.id, class: {
59
+ return (h(Host, { key: '39801fd8e10f1dc228741df48561cad3c59d81d7', id: this.item.id, class: {
60
60
  'is-clickable': this.isItemClickable(),
61
61
  'is-read': !!((_a = this.item) === null || _a === void 0 ? void 0 : _a.read),
62
62
  'is-selected': !!((_b = this.item) === null || _b === void 0 ? void 0 : _b.selected),