@limetech/lime-crm-building-blocks 1.100.0 → 1.101.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
- package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +177 -204
- package/dist/cjs/{limebb-lime-query-filter-builder_3.cjs.entry.js → limebb-lime-query-filter-builder_4.cjs.entry.js} +86 -1
- package/dist/cjs/limebb-lime-query-filter-comparison_2.cjs.entry.js +147 -0
- package/dist/cjs/{limebb-lime-query-filter-comparison_5.cjs.entry.js → limebb-lime-query-filter-group_3.cjs.entry.js} +5 -333
- package/dist/cjs/limebb-lime-query-order-by-item.cjs.entry.js +51 -0
- package/dist/cjs/limebb-live-docs-info.cjs.entry.js +2 -2
- package/dist/cjs/limebb-locale-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-mention-group-counter.cjs.entry.js +2 -2
- package/dist/cjs/limebb-navigation-button_2.cjs.entry.js +3 -3
- package/dist/cjs/limebb-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +2 -2
- package/dist/cjs/limebb-property-selector.cjs.entry.js +234 -0
- package/dist/cjs/limebb-text-editor.cjs.entry.js +1 -1
- package/dist/cjs/limebb-trend-indicator.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison.js +1 -1
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-group.js +1 -1
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-not.js +1 -1
- package/dist/collection/components/lime-query-builder/expressions/lime-query-value-input.js +7 -7
- package/dist/collection/components/lime-query-builder/lime-query-builder.css +2 -5
- package/dist/collection/components/lime-query-builder/lime-query-builder.js +19 -19
- package/dist/collection/components/lime-query-builder/lime-query-validation.js +160 -26
- package/dist/collection/components/lime-query-builder/lime-query.types.js +1 -57
- package/dist/collection/components/lime-query-builder/limetype-field/limetype-field.js +1 -1
- package/dist/collection/components/lime-query-builder/order-by/order-by-editor.css +72 -0
- package/dist/collection/components/lime-query-builder/order-by/order-by-editor.js +252 -0
- package/dist/collection/components/lime-query-builder/order-by/order-by-item.css +45 -0
- package/dist/collection/components/lime-query-builder/order-by/order-by-item.js +173 -0
- package/dist/collection/components/limeobject/file-viewer/live-docs-info.js +2 -2
- package/dist/collection/components/locale-picker/locale-picker.js +1 -1
- package/dist/collection/components/notification-list/notification-item/notification-item.js +1 -1
- package/dist/collection/components/percentage-visualizer/percentage-visualizer.js +2 -2
- package/dist/collection/components/summary-popover/summary-popover.js +3 -3
- package/dist/collection/components/text-editor/mention-group-counter.js +2 -2
- package/dist/collection/components/text-editor/text-editor.js +1 -1
- package/dist/collection/components/trend-indicator/trend-indicator.js +1 -1
- package/dist/components/lime-query-filter-comparison.js +1 -1
- package/dist/components/lime-query-filter-expression.js +2 -2
- package/dist/components/lime-query-value-input.js +3 -3
- package/dist/components/limebb-lime-query-builder.js +201 -215
- package/dist/components/limebb-lime-query-order-by-editor.d.ts +11 -0
- package/dist/components/limebb-lime-query-order-by-editor.js +6 -0
- package/dist/components/limebb-lime-query-order-by-item.d.ts +11 -0
- package/dist/components/limebb-lime-query-order-by-item.js +6 -0
- package/dist/components/limebb-locale-picker.js +1 -1
- package/dist/components/limebb-mention-group-counter.js +2 -2
- package/dist/components/limebb-percentage-visualizer.js +2 -2
- package/dist/components/limebb-text-editor.js +1 -1
- package/dist/components/limebb-trend-indicator.js +1 -1
- package/dist/components/limetype-field.js +1 -1
- package/dist/components/live-docs-info.js +2 -2
- package/dist/components/notification-item.js +1 -1
- package/dist/components/order-by-editor.js +123 -0
- package/dist/components/order-by-item.js +73 -0
- package/dist/components/property-selector.js +1 -1
- package/dist/components/summary-popover.js +3 -3
- package/dist/esm/lime-crm-building-blocks.js +1 -1
- package/dist/esm/limebb-lime-query-builder.entry.js +179 -206
- package/dist/esm/{limebb-lime-query-filter-builder_3.entry.js → limebb-lime-query-filter-builder_4.entry.js} +86 -2
- package/dist/esm/limebb-lime-query-filter-comparison_2.entry.js +142 -0
- package/dist/esm/{limebb-lime-query-filter-comparison_5.entry.js → limebb-lime-query-filter-group_3.entry.js} +7 -333
- package/dist/esm/limebb-lime-query-order-by-item.entry.js +47 -0
- package/dist/esm/limebb-live-docs-info.entry.js +2 -2
- package/dist/esm/limebb-locale-picker.entry.js +1 -1
- package/dist/esm/limebb-mention-group-counter.entry.js +2 -2
- package/dist/esm/limebb-navigation-button_2.entry.js +3 -3
- package/dist/esm/limebb-notification-item.entry.js +1 -1
- package/dist/esm/limebb-percentage-visualizer.entry.js +2 -2
- package/dist/esm/limebb-property-selector.entry.js +230 -0
- package/dist/esm/limebb-text-editor.entry.js +1 -1
- package/dist/esm/limebb-trend-indicator.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{property-resolution-fde2375e.js → property-resolution-c21a1369.js} +1 -1
- package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
- package/dist/lime-crm-building-blocks/{p-631ca5a5.entry.js → p-0cd036ed.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-2725671e.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-9cac4de2.entry.js → p-425eaba2.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-e8946134.entry.js → p-5cf4898d.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-67c174d0.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-6aa216ec.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-93cadc1e.entry.js → p-8601eab5.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-b9b954d9.entry.js → p-8c2fb1c9.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-3122ea05.entry.js → p-92dfc5f8.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-569c86b5.entry.js → p-a1ee8990.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-abfc7815.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-e0ab1554.js → p-b748c770.js} +1 -1
- package/dist/lime-crm-building-blocks/p-ccf34631.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-36ea13c0.entry.js → p-d84874dc.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-f9efca1d.entry.js +1 -0
- package/dist/types/components/lime-query-builder/expressions/lime-query-value-input.d.ts +2 -3
- package/dist/types/components/lime-query-builder/lime-query-builder.d.ts +9 -6
- package/dist/types/components/lime-query-builder/lime-query.types.d.ts +0 -72
- package/dist/types/components/lime-query-builder/order-by/order-by-editor.d.ts +58 -0
- package/dist/types/components/lime-query-builder/order-by/order-by-item.d.ts +37 -0
- package/dist/types/components.d.ts +165 -205
- package/package.json +1 -1
- package/dist/cjs/limebb-lime-query-filter-and.cjs.entry.js +0 -80
- package/dist/cjs/limebb-lime-query-filter-expression.cjs.entry.js +0 -45
- package/dist/cjs/limebb-lime-query-filter-or.cjs.entry.js +0 -68
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-and.css +0 -121
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-and.js +0 -249
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-or.css +0 -123
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-or.js +0 -237
- package/dist/collection/components/lime-query-builder/filter-conversion.js +0 -255
- package/dist/components/limebb-lime-query-filter-and.d.ts +0 -11
- package/dist/components/limebb-lime-query-filter-and.js +0 -135
- package/dist/components/limebb-lime-query-filter-or.d.ts +0 -11
- package/dist/components/limebb-lime-query-filter-or.js +0 -123
- package/dist/esm/limebb-lime-query-filter-and.entry.js +0 -76
- package/dist/esm/limebb-lime-query-filter-expression.entry.js +0 -41
- package/dist/esm/limebb-lime-query-filter-or.entry.js +0 -64
- package/dist/lime-crm-building-blocks/p-24aeb928.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-422f6d51.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-67dbaa4c.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-6d119dab.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-91732502.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-b198194a.entry.js +0 -1
- package/dist/types/components/lime-query-builder/expressions/lime-query-filter-and.d.ts +0 -57
- package/dist/types/components/lime-query-builder/expressions/lime-query-filter-or.d.ts +0 -56
- package/dist/types/components/lime-query-builder/filter-conversion.d.ts +0 -31
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { h, } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* Order By Editor Component
|
|
4
|
+
*
|
|
5
|
+
* Allows users to specify the order in which query results should be sorted.
|
|
6
|
+
* Supports sorting by multiple properties with ascending or descending order.
|
|
7
|
+
*
|
|
8
|
+
* Features:
|
|
9
|
+
* - **Property selection**: Choose properties using dropdown navigation
|
|
10
|
+
* - **Sort direction**: Toggle between ascending (ASC) and descending (DESC)
|
|
11
|
+
* - **Multiple sort fields**: Add multiple properties to create complex sorting
|
|
12
|
+
* - **Order matters**: Properties are sorted in the order they appear in the list
|
|
13
|
+
* - **Dynamic list**: Add/remove sort fields
|
|
14
|
+
*
|
|
15
|
+
* The component generates an `OrderByItem[]` array where each item specifies
|
|
16
|
+
* a property path and sort direction.
|
|
17
|
+
*
|
|
18
|
+
* @private
|
|
19
|
+
*/
|
|
20
|
+
export class OrderByEditor {
|
|
21
|
+
constructor() {
|
|
22
|
+
/**
|
|
23
|
+
* Optional label
|
|
24
|
+
*/
|
|
25
|
+
this.label = 'Sort Order';
|
|
26
|
+
this.items = [];
|
|
27
|
+
this.handleItemChange = (index) => (event) => {
|
|
28
|
+
event.stopPropagation();
|
|
29
|
+
const newItems = [...this.items];
|
|
30
|
+
if (event.detail === null) {
|
|
31
|
+
// Remove item
|
|
32
|
+
newItems.splice(index, 1);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
// Update item
|
|
36
|
+
newItems[index] = event.detail;
|
|
37
|
+
}
|
|
38
|
+
this.items = newItems;
|
|
39
|
+
this.emitChange();
|
|
40
|
+
};
|
|
41
|
+
this.handleAddSortField = () => {
|
|
42
|
+
// Add new item with empty path and ASC direction
|
|
43
|
+
this.items = [...this.items, { '': 'ASC' }];
|
|
44
|
+
this.emitChange();
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
componentWillLoad() {
|
|
48
|
+
if (this.value && this.value.length > 0) {
|
|
49
|
+
this.items = [...this.value];
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
handleValueChange(newValue) {
|
|
53
|
+
if (!newValue) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
// Check if items have changed
|
|
57
|
+
const itemsChanged = newValue.length !== this.items.length ||
|
|
58
|
+
!newValue.every((item, index) => {
|
|
59
|
+
const currentItem = this.items[index];
|
|
60
|
+
if (!currentItem)
|
|
61
|
+
return false;
|
|
62
|
+
const itemKey = Object.keys(item)[0];
|
|
63
|
+
const currentKey = Object.keys(currentItem)[0];
|
|
64
|
+
return (itemKey === currentKey &&
|
|
65
|
+
item[itemKey] === currentItem[currentKey]);
|
|
66
|
+
});
|
|
67
|
+
if (itemsChanged) {
|
|
68
|
+
this.items = newValue.length > 0 ? [...newValue] : [];
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
render() {
|
|
72
|
+
if (!this.limetype) {
|
|
73
|
+
return (h("div", { class: "empty-state" }, h("p", null, "Select a limetype to configure sorting")));
|
|
74
|
+
}
|
|
75
|
+
return (h("div", { class: "order-by-editor" }, h("div", { class: "header" }, h("h4", null, this.label)), this.renderOrderByList(), this.renderActions()));
|
|
76
|
+
}
|
|
77
|
+
renderOrderByList() {
|
|
78
|
+
if (this.items.length === 0) {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
return (h("div", { class: "order-by-list" }, this.items.map((item, index) => this.renderItem(item, index))));
|
|
82
|
+
}
|
|
83
|
+
renderActions() {
|
|
84
|
+
return (h("div", { class: "actions" }, h("limel-button", { label: "Add Sort Field", icon: "plus_math", onClick: this.handleAddSortField })));
|
|
85
|
+
}
|
|
86
|
+
renderItem(item, index) {
|
|
87
|
+
const propertyPath = Object.keys(item)[0] || '';
|
|
88
|
+
return (h("limebb-lime-query-order-by-item", { key: `${propertyPath}-${index}`, class: "order-by-item", platform: this.platform, context: this.context, limetype: this.limetype, item: item, onItemChange: this.handleItemChange(index) }));
|
|
89
|
+
}
|
|
90
|
+
emitChange() {
|
|
91
|
+
this.change.emit(this.items);
|
|
92
|
+
}
|
|
93
|
+
static get is() { return "limebb-lime-query-order-by-editor"; }
|
|
94
|
+
static get encapsulation() { return "shadow"; }
|
|
95
|
+
static get originalStyleUrls() {
|
|
96
|
+
return {
|
|
97
|
+
"$": ["order-by-editor.scss"]
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
static get styleUrls() {
|
|
101
|
+
return {
|
|
102
|
+
"$": ["order-by-editor.css"]
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
static get properties() {
|
|
106
|
+
return {
|
|
107
|
+
"platform": {
|
|
108
|
+
"type": "unknown",
|
|
109
|
+
"mutable": false,
|
|
110
|
+
"complexType": {
|
|
111
|
+
"original": "LimeWebComponentPlatform",
|
|
112
|
+
"resolved": "LimeWebComponentPlatform",
|
|
113
|
+
"references": {
|
|
114
|
+
"LimeWebComponentPlatform": {
|
|
115
|
+
"location": "import",
|
|
116
|
+
"path": "@limetech/lime-web-components",
|
|
117
|
+
"id": "node_modules::LimeWebComponentPlatform"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"required": false,
|
|
122
|
+
"optional": false,
|
|
123
|
+
"docs": {
|
|
124
|
+
"tags": [],
|
|
125
|
+
"text": "Platform service provider"
|
|
126
|
+
},
|
|
127
|
+
"getter": false,
|
|
128
|
+
"setter": false
|
|
129
|
+
},
|
|
130
|
+
"context": {
|
|
131
|
+
"type": "unknown",
|
|
132
|
+
"mutable": false,
|
|
133
|
+
"complexType": {
|
|
134
|
+
"original": "LimeWebComponentContext",
|
|
135
|
+
"resolved": "LimeWebComponentContext",
|
|
136
|
+
"references": {
|
|
137
|
+
"LimeWebComponentContext": {
|
|
138
|
+
"location": "import",
|
|
139
|
+
"path": "@limetech/lime-web-components",
|
|
140
|
+
"id": "node_modules::LimeWebComponentContext"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"required": false,
|
|
145
|
+
"optional": false,
|
|
146
|
+
"docs": {
|
|
147
|
+
"tags": [],
|
|
148
|
+
"text": "Component context"
|
|
149
|
+
},
|
|
150
|
+
"getter": false,
|
|
151
|
+
"setter": false
|
|
152
|
+
},
|
|
153
|
+
"limetype": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"mutable": false,
|
|
156
|
+
"complexType": {
|
|
157
|
+
"original": "string",
|
|
158
|
+
"resolved": "string",
|
|
159
|
+
"references": {}
|
|
160
|
+
},
|
|
161
|
+
"required": false,
|
|
162
|
+
"optional": false,
|
|
163
|
+
"docs": {
|
|
164
|
+
"tags": [],
|
|
165
|
+
"text": "The limetype to select properties from"
|
|
166
|
+
},
|
|
167
|
+
"getter": false,
|
|
168
|
+
"setter": false,
|
|
169
|
+
"attribute": "limetype",
|
|
170
|
+
"reflect": false
|
|
171
|
+
},
|
|
172
|
+
"value": {
|
|
173
|
+
"type": "unknown",
|
|
174
|
+
"mutable": false,
|
|
175
|
+
"complexType": {
|
|
176
|
+
"original": "OrderByItem[]",
|
|
177
|
+
"resolved": "OrderByItem[] | undefined",
|
|
178
|
+
"references": {
|
|
179
|
+
"OrderByItem": {
|
|
180
|
+
"location": "import",
|
|
181
|
+
"path": "../lime-query.types",
|
|
182
|
+
"id": "src/components/lime-query-builder/lime-query.types.ts::OrderByItem"
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"required": false,
|
|
187
|
+
"optional": true,
|
|
188
|
+
"docs": {
|
|
189
|
+
"tags": [],
|
|
190
|
+
"text": "Current order by specification"
|
|
191
|
+
},
|
|
192
|
+
"getter": false,
|
|
193
|
+
"setter": false
|
|
194
|
+
},
|
|
195
|
+
"label": {
|
|
196
|
+
"type": "string",
|
|
197
|
+
"mutable": false,
|
|
198
|
+
"complexType": {
|
|
199
|
+
"original": "string",
|
|
200
|
+
"resolved": "string",
|
|
201
|
+
"references": {}
|
|
202
|
+
},
|
|
203
|
+
"required": false,
|
|
204
|
+
"optional": false,
|
|
205
|
+
"docs": {
|
|
206
|
+
"tags": [],
|
|
207
|
+
"text": "Optional label"
|
|
208
|
+
},
|
|
209
|
+
"getter": false,
|
|
210
|
+
"setter": false,
|
|
211
|
+
"attribute": "label",
|
|
212
|
+
"reflect": false,
|
|
213
|
+
"defaultValue": "'Sort Order'"
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
static get states() {
|
|
218
|
+
return {
|
|
219
|
+
"items": {}
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
static get events() {
|
|
223
|
+
return [{
|
|
224
|
+
"method": "change",
|
|
225
|
+
"name": "change",
|
|
226
|
+
"bubbles": true,
|
|
227
|
+
"cancelable": true,
|
|
228
|
+
"composed": true,
|
|
229
|
+
"docs": {
|
|
230
|
+
"tags": [],
|
|
231
|
+
"text": "Emitted when the order by specification changes"
|
|
232
|
+
},
|
|
233
|
+
"complexType": {
|
|
234
|
+
"original": "OrderByItem[]",
|
|
235
|
+
"resolved": "OrderByItem[]",
|
|
236
|
+
"references": {
|
|
237
|
+
"OrderByItem": {
|
|
238
|
+
"location": "import",
|
|
239
|
+
"path": "../lime-query.types",
|
|
240
|
+
"id": "src/components/lime-query-builder/lime-query.types.ts::OrderByItem"
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}];
|
|
245
|
+
}
|
|
246
|
+
static get watchers() {
|
|
247
|
+
return [{
|
|
248
|
+
"propName": "value",
|
|
249
|
+
"methodName": "handleValueChange"
|
|
250
|
+
}];
|
|
251
|
+
}
|
|
252
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
:host(limebb-lime-query-order-by-item) {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 0.5rem;
|
|
5
|
+
width: 100%;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.order-by-controls {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: row;
|
|
11
|
+
align-items: flex-start;
|
|
12
|
+
gap: 0.5rem;
|
|
13
|
+
width: 100%;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.property-path {
|
|
17
|
+
flex-grow: 1;
|
|
18
|
+
min-width: min(20rem, 100%);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.control-buttons {
|
|
22
|
+
flex-shrink: 0;
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: row;
|
|
25
|
+
gap: 0.25rem;
|
|
26
|
+
align-items: center;
|
|
27
|
+
padding-top: 0.5rem;
|
|
28
|
+
}
|
|
29
|
+
.control-buttons limel-icon-button {
|
|
30
|
+
opacity: 0.6;
|
|
31
|
+
transition: opacity 0.2s ease;
|
|
32
|
+
}
|
|
33
|
+
.control-buttons limel-icon-button:hover {
|
|
34
|
+
opacity: 1;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@media (max-width: 768px) {
|
|
38
|
+
.order-by-controls {
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
gap: 0.5rem;
|
|
41
|
+
}
|
|
42
|
+
.control-buttons {
|
|
43
|
+
padding-top: 0;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* Order By Item Component
|
|
4
|
+
*
|
|
5
|
+
* Represents a single order by specification with property selection and direction toggle
|
|
6
|
+
* Part of the order by editor
|
|
7
|
+
* @private
|
|
8
|
+
*/
|
|
9
|
+
export class OrderByItemComponent {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.handlePathChange = (event) => {
|
|
12
|
+
event.stopPropagation();
|
|
13
|
+
const newPath = event.detail;
|
|
14
|
+
if (!newPath) {
|
|
15
|
+
// If path is cleared, keep the current item but with empty path
|
|
16
|
+
const currentDirection = this.item[Object.keys(this.item)[0]] || 'ASC';
|
|
17
|
+
this.itemChange.emit({ '': currentDirection });
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
// Get current direction
|
|
21
|
+
const currentPath = Object.keys(this.item)[0];
|
|
22
|
+
const currentDirection = this.item[currentPath] || 'ASC';
|
|
23
|
+
// Create new item with new path but same direction
|
|
24
|
+
const newItem = { [newPath]: currentDirection };
|
|
25
|
+
this.itemChange.emit(newItem);
|
|
26
|
+
};
|
|
27
|
+
this.handleToggleDirection = () => {
|
|
28
|
+
const propertyPath = Object.keys(this.item)[0] || '';
|
|
29
|
+
const currentDirection = this.item[propertyPath] || 'ASC';
|
|
30
|
+
const newDirection = currentDirection === 'ASC' ? 'DESC' : 'ASC';
|
|
31
|
+
const newItem = { [propertyPath]: newDirection };
|
|
32
|
+
this.itemChange.emit(newItem);
|
|
33
|
+
};
|
|
34
|
+
this.handleRemove = () => {
|
|
35
|
+
this.itemChange.emit(null);
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
render() {
|
|
39
|
+
const propertyPath = Object.keys(this.item)[0] || '';
|
|
40
|
+
const direction = this.item[propertyPath] || 'ASC';
|
|
41
|
+
return (h("div", { key: 'e0faeb5b370d8aba00a668f0861e8e1cb4eec495', class: "order-by-controls" }, h("div", { key: 'd013e829ca193b6ce9cc3756c3700584984f4478', class: "property-path" }, h("limebb-property-selector", { key: '11dee28e5de28d0dc6934abdfe613e87a8b8fbed', platform: this.platform, context: this.context, limetype: this.limetype, label: "Property", value: propertyPath, required: true, onChange: this.handlePathChange })), h("div", { key: '66aa416b1f9683a15357d609e3685379d8993733', class: "control-buttons" }, h("limel-icon-button", { key: '360f271ecd3cf42581ae21617d297c84ee93569e', icon: direction === 'ASC'
|
|
42
|
+
? 'sort_ascending'
|
|
43
|
+
: 'sort_descending', label: direction === 'ASC' ? 'Ascending' : 'Descending', onClick: this.handleToggleDirection }), h("limel-icon-button", { key: '3cbb13bff679a0ca95bb30b7853551b8bc276520', icon: "trash", label: "Remove", onClick: this.handleRemove }))));
|
|
44
|
+
}
|
|
45
|
+
static get is() { return "limebb-lime-query-order-by-item"; }
|
|
46
|
+
static get encapsulation() { return "shadow"; }
|
|
47
|
+
static get originalStyleUrls() {
|
|
48
|
+
return {
|
|
49
|
+
"$": ["order-by-item.scss"]
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
static get styleUrls() {
|
|
53
|
+
return {
|
|
54
|
+
"$": ["order-by-item.css"]
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
static get properties() {
|
|
58
|
+
return {
|
|
59
|
+
"platform": {
|
|
60
|
+
"type": "unknown",
|
|
61
|
+
"mutable": false,
|
|
62
|
+
"complexType": {
|
|
63
|
+
"original": "LimeWebComponentPlatform",
|
|
64
|
+
"resolved": "LimeWebComponentPlatform",
|
|
65
|
+
"references": {
|
|
66
|
+
"LimeWebComponentPlatform": {
|
|
67
|
+
"location": "import",
|
|
68
|
+
"path": "@limetech/lime-web-components",
|
|
69
|
+
"id": "node_modules::LimeWebComponentPlatform"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"required": false,
|
|
74
|
+
"optional": false,
|
|
75
|
+
"docs": {
|
|
76
|
+
"tags": [],
|
|
77
|
+
"text": "Platform service provider"
|
|
78
|
+
},
|
|
79
|
+
"getter": false,
|
|
80
|
+
"setter": false
|
|
81
|
+
},
|
|
82
|
+
"context": {
|
|
83
|
+
"type": "unknown",
|
|
84
|
+
"mutable": false,
|
|
85
|
+
"complexType": {
|
|
86
|
+
"original": "LimeWebComponentContext",
|
|
87
|
+
"resolved": "LimeWebComponentContext",
|
|
88
|
+
"references": {
|
|
89
|
+
"LimeWebComponentContext": {
|
|
90
|
+
"location": "import",
|
|
91
|
+
"path": "@limetech/lime-web-components",
|
|
92
|
+
"id": "node_modules::LimeWebComponentContext"
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"required": false,
|
|
97
|
+
"optional": false,
|
|
98
|
+
"docs": {
|
|
99
|
+
"tags": [],
|
|
100
|
+
"text": "Component context"
|
|
101
|
+
},
|
|
102
|
+
"getter": false,
|
|
103
|
+
"setter": false
|
|
104
|
+
},
|
|
105
|
+
"limetype": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"mutable": false,
|
|
108
|
+
"complexType": {
|
|
109
|
+
"original": "string",
|
|
110
|
+
"resolved": "string",
|
|
111
|
+
"references": {}
|
|
112
|
+
},
|
|
113
|
+
"required": false,
|
|
114
|
+
"optional": false,
|
|
115
|
+
"docs": {
|
|
116
|
+
"tags": [],
|
|
117
|
+
"text": "The limetype to select properties from"
|
|
118
|
+
},
|
|
119
|
+
"getter": false,
|
|
120
|
+
"setter": false,
|
|
121
|
+
"attribute": "limetype",
|
|
122
|
+
"reflect": false
|
|
123
|
+
},
|
|
124
|
+
"item": {
|
|
125
|
+
"type": "unknown",
|
|
126
|
+
"mutable": false,
|
|
127
|
+
"complexType": {
|
|
128
|
+
"original": "OrderByItem",
|
|
129
|
+
"resolved": "{ [propertyPath: string]: \"ASC\" | \"DESC\"; }",
|
|
130
|
+
"references": {
|
|
131
|
+
"OrderByItem": {
|
|
132
|
+
"location": "import",
|
|
133
|
+
"path": "../lime-query.types",
|
|
134
|
+
"id": "src/components/lime-query-builder/lime-query.types.ts::OrderByItem"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"required": false,
|
|
139
|
+
"optional": false,
|
|
140
|
+
"docs": {
|
|
141
|
+
"tags": [],
|
|
142
|
+
"text": "The order by item (e.g., { \"company.name\": \"ASC\" })"
|
|
143
|
+
},
|
|
144
|
+
"getter": false,
|
|
145
|
+
"setter": false
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
static get events() {
|
|
150
|
+
return [{
|
|
151
|
+
"method": "itemChange",
|
|
152
|
+
"name": "itemChange",
|
|
153
|
+
"bubbles": true,
|
|
154
|
+
"cancelable": true,
|
|
155
|
+
"composed": true,
|
|
156
|
+
"docs": {
|
|
157
|
+
"tags": [],
|
|
158
|
+
"text": "Emitted when the item changes or should be removed"
|
|
159
|
+
},
|
|
160
|
+
"complexType": {
|
|
161
|
+
"original": "OrderByItem | null",
|
|
162
|
+
"resolved": "null | { [propertyPath: string]: \"ASC\" | \"DESC\"; }",
|
|
163
|
+
"references": {
|
|
164
|
+
"OrderByItem": {
|
|
165
|
+
"location": "import",
|
|
166
|
+
"path": "../lime-query.types",
|
|
167
|
+
"id": "src/components/lime-query-builder/lime-query.types.ts::OrderByItem"
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}];
|
|
172
|
+
}
|
|
173
|
+
}
|
|
@@ -5,8 +5,8 @@ import { h } from "@stencil/core";
|
|
|
5
5
|
export class LiveDocsInfo {
|
|
6
6
|
render() {
|
|
7
7
|
return [
|
|
8
|
-
h("div", { key: '
|
|
9
|
-
h("p", { key: '
|
|
8
|
+
h("div", { key: '7e6645d68a1fe53d0acc1b3dee259fe184515cee', class: "header" }, h("limel-icon", { key: 'b08f3f80ea09bf9dfb30fec69db91b58f52748bc', name: "not_showing_video_frames" }), h("h2", { key: '984c39002d8dc456df904ed631472ab5c7e434f7' }, "Viewing this file type requires ", h("em", { key: 'cc3aa66537ef0ca8bb201595fba8b63f0d287730' }, "Live Docs"))),
|
|
9
|
+
h("p", { key: '38669b0342f36b1faee7599c0fd28fcebf993351' }, h("em", { key: '7e605cc3e057a8daffe575104272e9aa2634673a' }, "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: 'ada35e1e88af734d219f03b7d68417c95ea837a5', 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: '
|
|
56
|
+
return (h("limel-select", { key: 'f0be5c869ed7ad1a32e2c0604584f26cc5a40522', 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: '
|
|
59
|
+
return (h(Host, { key: '17b7219101660b7f6bab37072d5de5d9f212863f', 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),
|
|
@@ -91,11 +91,11 @@ export class PercentageVisualizer {
|
|
|
91
91
|
render() {
|
|
92
92
|
const normalizedValue = this.getNormalizedValue();
|
|
93
93
|
const zeroPoint = this.getZeroPointPosition();
|
|
94
|
-
return (h(Host, { key: '
|
|
94
|
+
return (h(Host, { key: '728bef6c27bd5879d971411f812db124c3ac53b3', class: this.getContainerClassList(), style: {
|
|
95
95
|
'--limebb-percentage-visualizer-zero-point-position': `${zeroPoint}%`,
|
|
96
96
|
'--limebb-percentage-visualizer-width': `${Math.abs(normalizedValue)}%`,
|
|
97
97
|
'--limebb-percentage-visualizer-rotate': `${normalizedValue >= 0 ? '0deg' : '180deg'}`,
|
|
98
|
-
} }, h("limel-notched-outline", { key: '
|
|
98
|
+
} }, h("limel-notched-outline", { key: '0cf575a7e896955572000dd906d98441dec808b1', tabIndex: 0, role: "meter", "aria-valuemin": this.rangeMin, "aria-valuemax": this.rangeMax, "aria-valuenow": this.numValue, "aria-labelledby": this.labelId, "aria-describedby": this.helperTextId, label: this.label, labelId: this.labelId, invalid: this.invalid, required: this.required, hasValue: true, hasFloatingLabel: true, "aria-controls": this.helperTextId }, h("div", { key: '6dc2beefea4d1a5b0a967fd1087db3fe88c8cdf5', slot: "content" }, this.renderVisualization())), this.renderHelperLine()));
|
|
99
99
|
}
|
|
100
100
|
renderVisualization() {
|
|
101
101
|
if (this.reducePresence && (this.numValue === 0 || !this.hasValue())) {
|
|
@@ -118,14 +118,14 @@ export class SummaryPopover {
|
|
|
118
118
|
top: '0.125rem',
|
|
119
119
|
right: '0.125rem',
|
|
120
120
|
};
|
|
121
|
-
return (h("limel-popover", { key: '
|
|
121
|
+
return (h("limel-popover", { key: '3ddac967d05644e0e3b18979a051561e08f316c4', style: {
|
|
122
122
|
'--limebb-summary-popover-timeout': `${this.triggerDelay}ms`,
|
|
123
|
-
}, open: this.isPopoverOpen, onClose: this.onPopoverClose, openDirection: this.openDirection }, h("div", { key: '
|
|
123
|
+
}, open: this.isPopoverOpen, onClose: this.onPopoverClose, openDirection: this.openDirection }, h("div", { key: '6187ae07695296c905f2d0bf782b515d15183f05', slot: "trigger", tabIndex: 0, onMouseEnter: this.openPopoverWithDelay, onMouseLeave: this.resetTimeout, onFocus: this.openPopoverWithDelay }, h("slot", { key: '2b338b6ba353104031e0ae9bb1f1380a2f528f1c', name: "trigger" }), h("div", { key: 'ccce297cd4c8a6640a81a0ec54d1b17cafd090a4', class: "opening-countdown-indicator" })), h("limel-card", { key: 'c786b96ad260240ad28b45746f7f3974efe92670', style: {
|
|
124
124
|
'max-width': this.popoverMaxWidth,
|
|
125
125
|
'max-height': this.popoverMaxHeight,
|
|
126
126
|
'min-width': '7rem',
|
|
127
127
|
'min-height': '3rem',
|
|
128
|
-
}, orientation: "landscape", heading: this.heading, subheading: this.subheading, icon: this.icon, value: this.value, image: this.image, actions: this.actions, onActionSelected: this.handleSelected }, h("limebb-navigation-button", { key: '
|
|
128
|
+
}, orientation: "landscape", heading: this.heading, subheading: this.subheading, icon: this.icon, value: this.value, image: this.image, actions: this.actions, onActionSelected: this.handleSelected }, h("limebb-navigation-button", { key: 'de2b607312164f264c0a344662a69754e1afb7d9', slot: "component", type: "close", style: closeButtonStyle, tooltipLabel: "Close", tooltipHelperLabel: "Esc", onClick: this.handleCloseClick }))));
|
|
129
129
|
}
|
|
130
130
|
static get is() { return "limebb-summary-popover"; }
|
|
131
131
|
static get encapsulation() { return "shadow"; }
|
|
@@ -13,8 +13,8 @@ export class MentionGroupCounter {
|
|
|
13
13
|
render() {
|
|
14
14
|
const label = this.getLabel();
|
|
15
15
|
return [
|
|
16
|
-
h("span", { key: '
|
|
17
|
-
h("limel-tooltip", { key: '
|
|
16
|
+
h("span", { key: 'bb868b62f71fe65927d1cd9bad6ee08648a33c73', id: this.tooltipId }, label),
|
|
17
|
+
h("limel-tooltip", { key: '5018e97cb9d5522b91ed1c55643ad33c3d7fd51d', elementId: this.tooltipId, label: label, helperLabel: this.helperLabel }),
|
|
18
18
|
];
|
|
19
19
|
}
|
|
20
20
|
getLabel() {
|
|
@@ -389,7 +389,7 @@ export class LimeBBTextEditor {
|
|
|
389
389
|
}
|
|
390
390
|
render() {
|
|
391
391
|
return [
|
|
392
|
-
h("limel-text-editor", { key: '
|
|
392
|
+
h("limel-text-editor", { key: '3ad4c2bac61f34439bf94b42e0aa7ccceeff9c33', ref: (el) => (this.textEditor = el), 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 }),
|
|
393
393
|
this.renderPicker(),
|
|
394
394
|
];
|
|
395
395
|
}
|
|
@@ -52,7 +52,7 @@ export class TrendIndicator {
|
|
|
52
52
|
this.numValue = this.parseValue(this.value);
|
|
53
53
|
}
|
|
54
54
|
render() {
|
|
55
|
-
return (h(Host, { key: '
|
|
55
|
+
return (h(Host, { key: '976bce0393bfff47ba599dc0d534ec9992cec3f8', class: this.getContainerClassList() }, h("limel-notched-outline", { key: '86a89b3773d2fbf3aa9009fd27ce9cb2410f03b5', id: this.tooltipId, label: this.label, labelId: this.labelId, invalid: this.invalid, required: this.required, hasValue: true, hasFloatingLabel: true, "aria-labelledby": this.labelId, "aria-describedby": this.helperTextId, "aria-controls": this.helperTextId }, h("div", { key: '0b9e048eeea62c452671b74db468aa5587e8ddbf', slot: "content", tabIndex: 0 }, this.renderVisualization())), this.renderHelperLine(), this.renderTooltip()));
|
|
56
56
|
}
|
|
57
57
|
renderVisualization() {
|
|
58
58
|
if (this.reducePresence && (this.numValue === 0 || !this.hasValue())) {
|
|
@@ -82,7 +82,7 @@ const LimeQueryFilterComparisonComponent = /*@__PURE__*/ proxyCustomElement(clas
|
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
84
|
render() {
|
|
85
|
-
return (h("div", { key: '
|
|
85
|
+
return (h("div", { key: 'a077c982ced9840beec3e574cd3e2e336cff6071', class: "expression" }, this.label && h("limel-header", { key: 'fbcb5cf515aac2c8e68d29947c7560684f30822c', heading: this.label }), h("div", { key: 'ffea426ea1295ae11aaa3c910f835acbeed24cd9', class: "expression-container" }, this.renderPropertySelector(), this.renderOperator(), this.renderValueInput(), h("limel-icon-button", { key: '20064f9fe42a4dfa71b2e1e2d393d50bbe20e2cb', class: "remove", icon: "trash", label: "Remove condition", onClick: this.removeExpression }))));
|
|
86
86
|
}
|
|
87
87
|
renderPropertySelector() {
|
|
88
88
|
return (h("limebb-property-selector", { platform: this.platform, context: this.context, label: "Property", limetype: this.limetype, value: this.expression.key, required: true, onChange: this.handlePropertyChange }));
|
|
@@ -28,7 +28,7 @@ const LimeQueryFilterNotComponent = /*@__PURE__*/ proxyCustomElement(class LimeQ
|
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
render() {
|
|
31
|
-
return (h("div", { key: '
|
|
31
|
+
return (h("div", { key: '9ab4a6b1e99668a0bcee3e3ba8cbbbe5185222e0', class: "expression" }, this.label && h("limel-header", { key: '85e997b0f96db306dd7a4433da959a74303aacfa', heading: this.label }), h("limebb-lime-query-filter-expression", { key: '14f634e125ee78f2aa70c7537b270a31699ba7c2', platform: this.platform, context: this.context, label: "Not", limetype: this.limetype, activeLimetype: this.activeLimetype, expression: this.expression.exp, onExpressionChange: this.handleExpressionChange })));
|
|
32
32
|
}
|
|
33
33
|
static get style() { return LimebbLimeQueryFilterNotStyle0; }
|
|
34
34
|
}, [1, "limebb-lime-query-filter-not", {
|
|
@@ -149,7 +149,7 @@ const LimeQueryFilterGroupComponent = /*@__PURE__*/ proxyCustomElement(class Lim
|
|
|
149
149
|
}
|
|
150
150
|
render() {
|
|
151
151
|
const subheading = this.getSubheading();
|
|
152
|
-
return (h("div", { key: '
|
|
152
|
+
return (h("div", { key: '0ed5a1403d9641926cd6d474910cedf9c7bba89e', class: "expression" }, subheading && (h("limel-header", { key: 'ea88a97df09f0fb5a21bf9afb4745256a611c7f8', subheading: subheading, onClick: this.handleToggleOperator, class: "clickable-header" })), h("ul", { key: 'cfbcdd539e84f79bf1d778e075cd3317d7409647' }, this.expression.exp.map(this.renderChildExpression), h("li", { key: 'ec443459245bf5852920bb4d3e341f2490a7b75b', class: "add-button" }, this.renderAddButton(), this.renderAddGroupButton()))));
|
|
153
153
|
}
|
|
154
154
|
getSubheading() {
|
|
155
155
|
if (this.expression.exp.length <= 1) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { T as Te } from './index.esm.js';
|
|
3
|
-
import {
|
|
2
|
+
import { T as Te, Z as Zt } from './index.esm.js';
|
|
3
|
+
import { g as getPropertyFromPath, d as defineCustomElement$1 } from './property-selector.js';
|
|
4
4
|
|
|
5
5
|
const limeQueryValueInputCss = ":host{display:block}.value-input-container{display:flex;flex-direction:row;align-items:flex-start;gap:0.5rem;width:100%}.mode-toggle{flex-shrink:0;margin-top:0.5rem;opacity:0.7;transition:opacity 0.2s ease}.mode-toggle:hover{opacity:1}.placeholder-input{flex-grow:1;display:flex;flex-direction:column;gap:0.5rem}.placeholder-preview{display:flex;align-items:center;gap:0.5rem;padding:0.5rem;background-color:rgba(var(--color-blue-light), 0.1);border-radius:var(--border-radius-small);font-size:0.875rem;color:rgb(var(--color-blue-default));border-left:3px solid rgb(var(--color-blue-default))}.placeholder-preview limel-icon{flex-shrink:0;color:rgb(var(--color-blue-default))}.placeholder-preview span{font-family:var(--font-monospace);word-break:break-all}";
|
|
6
6
|
const LimebbLimeQueryValueInputStyle0 = limeQueryValueInputCss;
|
|
@@ -149,7 +149,7 @@ const LimeQueryValueInput = /*@__PURE__*/ proxyCustomElement(class LimeQueryValu
|
|
|
149
149
|
}
|
|
150
150
|
renderValueInputByType() {
|
|
151
151
|
// Special handling for IN operator - always use chip set for arrays
|
|
152
|
-
if (this.operator ===
|
|
152
|
+
if (this.operator === Zt.IN) {
|
|
153
153
|
return this.renderMultiValueInput();
|
|
154
154
|
}
|
|
155
155
|
const property = this.getProperty();
|