@limetech/lime-crm-building-blocks 1.99.0 → 1.100.1
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 +52 -216
- package/dist/cjs/{limebb-limetype-field_2.cjs.entry.js → limebb-lime-query-filter-builder_3.cjs.entry.js} +72 -1
- package/dist/cjs/limebb-lime-query-filter-comparison_2.cjs.entry.js +1 -1
- package/dist/cjs/{limebb-lime-query-filter-group_4.cjs.entry.js → limebb-lime-query-filter-group_3.cjs.entry.js} +5 -231
- 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 +1 -2
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-builder.css +5 -0
- package/dist/collection/components/lime-query-builder/expressions/{lime-query-filter-and.js → lime-query-filter-builder.js} +59 -83
- 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.js +9 -39
- package/dist/collection/components/lime-query-builder/lime-query-validation.js +46 -19
- 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/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-builder.js +129 -0
- 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 +2 -2
- package/dist/components/limebb-lime-query-builder.js +60 -218
- package/dist/components/limebb-lime-query-filter-builder.d.ts +11 -0
- package/dist/components/limebb-lime-query-filter-builder.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/summary-popover.js +3 -3
- package/dist/esm/lime-crm-building-blocks.js +1 -1
- package/dist/esm/limebb-lime-query-builder.entry.js +53 -217
- package/dist/esm/{limebb-limetype-field_2.entry.js → limebb-lime-query-filter-builder_3.entry.js} +73 -3
- package/dist/esm/limebb-lime-query-filter-comparison_2.entry.js +1 -1
- package/dist/esm/{limebb-lime-query-filter-group_4.entry.js → limebb-lime-query-filter-group_3.entry.js} +7 -232
- 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/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
- package/dist/lime-crm-building-blocks/{p-b9b954d9.entry.js → p-1034b4a5.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-93cadc1e.entry.js → p-2048ac67.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-323c49bc.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-631ca5a5.entry.js → p-58782467.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-aa646df7.entry.js → p-6aa216ec.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-9cac4de2.entry.js → p-76d81eee.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-e8946134.entry.js → p-79b8b09b.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-569c86b5.entry.js → p-8581245a.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-89a6c396.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-36ea13c0.entry.js → p-8fb2e192.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-3122ea05.entry.js → p-b57dafef.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-f22b66f6.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-f79e354b.entry.js +1 -0
- package/dist/types/components/lime-query-builder/expressions/lime-query-filter-builder.d.ts +50 -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 +1 -6
- package/dist/types/components/lime-query-builder/lime-query.types.d.ts +0 -72
- package/dist/types/components.d.ts +58 -198
- 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-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-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-or.entry.js +0 -64
- package/dist/lime-crm-building-blocks/p-03accd53.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-4715210d.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-5f7644b5.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-67dbaa4c.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-91732502.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
|
@@ -1,57 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* TypeScript type definitions for Lime Query DSL
|
|
3
|
-
*
|
|
4
|
-
* These types represent the structure of Lime Query as defined in:
|
|
5
|
-
* - lime-core/lime_query/schema.py
|
|
6
|
-
* - lime-core/lime_filter/schema.py
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Available operators with display metadata
|
|
10
|
-
*/
|
|
11
|
-
export const LIME_QUERY_OPERATORS = [
|
|
12
|
-
{ value: '=', label: 'Equals', icon: 'equals' },
|
|
13
|
-
{ value: '!=', label: 'Not Equals', icon: 'not-equal' },
|
|
14
|
-
{
|
|
15
|
-
value: '>',
|
|
16
|
-
label: 'Greater Than',
|
|
17
|
-
icon: 'greater-than',
|
|
18
|
-
applicableTypes: ['integer', 'decimal', 'date', 'time'],
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
value: '>=',
|
|
22
|
-
label: 'Greater or Equal',
|
|
23
|
-
icon: 'greater-or-equal',
|
|
24
|
-
applicableTypes: ['integer', 'decimal', 'date', 'time'],
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
value: '<',
|
|
28
|
-
label: 'Less Than',
|
|
29
|
-
icon: 'less-than',
|
|
30
|
-
applicableTypes: ['integer', 'decimal', 'date', 'time'],
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
value: '<=',
|
|
34
|
-
label: 'Less or Equal',
|
|
35
|
-
icon: 'less-or-equal',
|
|
36
|
-
applicableTypes: ['integer', 'decimal', 'date', 'time'],
|
|
37
|
-
},
|
|
38
|
-
{ value: 'IN', label: 'In List', icon: 'list' },
|
|
39
|
-
{
|
|
40
|
-
value: '?',
|
|
41
|
-
label: 'Contains',
|
|
42
|
-
icon: '-lime-filter-contain',
|
|
43
|
-
applicableTypes: ['string', 'text'],
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
value: '=?',
|
|
47
|
-
label: 'Begins With',
|
|
48
|
-
icon: '-lime-filter-begin',
|
|
49
|
-
applicableTypes: ['string', 'text'],
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
value: '=$',
|
|
53
|
-
label: 'Ends With',
|
|
54
|
-
icon: '-lime-filter-end',
|
|
55
|
-
applicableTypes: ['string', 'text'],
|
|
56
|
-
},
|
|
57
|
-
];
|
|
1
|
+
export {};
|
|
@@ -78,7 +78,7 @@ export class LimetypeField {
|
|
|
78
78
|
value: '',
|
|
79
79
|
};
|
|
80
80
|
options.unshift(emptyOption);
|
|
81
|
-
return (h("limel-select", { key: '
|
|
81
|
+
return (h("limel-select", { key: 'fd9522c5df730f65a5ac57140bca6c05c5acd63d', 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: '
|
|
9
|
-
h("p", { key: '
|
|
8
|
+
h("div", { key: 'f215884110f6647cf6c0b501d6bec3d0475c7eb5', class: "header" }, h("limel-icon", { key: '483ac1d1166621d9ec91d430b58fe37d720ef740', name: "not_showing_video_frames" }), h("h2", { key: 'c9d8894b11a48ebecb3cac470df3b292e41f7c8e' }, "Viewing this file type requires ", h("em", { key: 'cc8b9bf7005a24ec608e7e14d86fe5047c543251' }, "Live Docs"))),
|
|
9
|
+
h("p", { key: '091075e3ffebbd89142b0466474977e05a6f8086' }, h("em", { key: 'b7393f26c3a1e5737b920389a8dab5ca5d5f591c' }, "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: '67f751f807d209c7bf5c752bda39f4e4911b332b', 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: 'd8592dd9e39e3dba64e2ee11cd223a66138ef57d', 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: 'bcbac9d93025efeaf1d6f6cde3ab7632b527b5a0', 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: '85bcdba3b1ba660f32eebcdc0e46dd8652ae9b48', 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: 'ef664323cf5a8a6a091394e8dffa291959c9e3f3', 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: '20b55181865c993677fec5fc86a66ea9cd817cd0', 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: '2fb3afb6c2a05cfbd4e1991b3204c5b495c20c03', 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: 'fbd08fbebaed580db3aaaf3b1bbba4e52605bced', slot: "trigger", tabIndex: 0, onMouseEnter: this.openPopoverWithDelay, onMouseLeave: this.resetTimeout, onFocus: this.openPopoverWithDelay }, h("slot", { key: 'd16285c72329080ecde42bc6f7c3966f27a66968', name: "trigger" }), h("div", { key: '77c127616635768db8012adf936c56f75d2bccb3', class: "opening-countdown-indicator" })), h("limel-card", { key: '2d3c9a55b1292945422af4783b29d37ea9570fde', 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: '234309cf2f82f6493a5d72944d320a902618c83b', 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: '32727487e0750dad1e08b94915af9b33e562ba9d', id: this.tooltipId }, label),
|
|
17
|
+
h("limel-tooltip", { key: 'a9c062dca4f2f46fb187c902de8ecab4993e456d', 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: '42b8630e5e15e4e7ca20277687695a245f2ea267', 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: '33119aa80ea39fbe4ad0fd7da3c89d844efd7bd6', class: this.getContainerClassList() }, h("limel-notched-outline", { key: '9357919d89ea26063f9c0bbf85a48e3e235364c7', 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: 'b29c00421943e45fed684e63dfebf895686f6d45', 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())) {
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { Z as Zt } from './index.esm.js';
|
|
3
|
+
import { d as defineCustomElement$6 } from './lime-query-filter-comparison.js';
|
|
4
|
+
import { d as defineCustomElement$3, a as defineCustomElement$4, b as defineCustomElement$5 } from './lime-query-filter-expression.js';
|
|
5
|
+
import { d as defineCustomElement$2 } from './lime-query-value-input.js';
|
|
6
|
+
import { d as defineCustomElement$1 } from './property-selector.js';
|
|
7
|
+
|
|
8
|
+
const limeQueryFilterBuilderCss = ".expression-with-promotion{display:flex;flex-direction:column;gap:1rem}";
|
|
9
|
+
const LimebbLimeQueryFilterBuilderStyle0 = limeQueryFilterBuilderCss;
|
|
10
|
+
|
|
11
|
+
const LimeQueryFilterBuilderComponent = /*@__PURE__*/ proxyCustomElement(class LimeQueryFilterBuilderComponent extends HTMLElement {
|
|
12
|
+
constructor() {
|
|
13
|
+
super();
|
|
14
|
+
this.__registerHost();
|
|
15
|
+
this.__attachShadow();
|
|
16
|
+
this.expressionChange = createEvent(this, "expressionChange", 7);
|
|
17
|
+
this.handleAddFirstCondition = () => {
|
|
18
|
+
const newExpression = {
|
|
19
|
+
key: '',
|
|
20
|
+
op: Zt.EQUALS,
|
|
21
|
+
exp: '',
|
|
22
|
+
};
|
|
23
|
+
this.expressionChange.emit(newExpression);
|
|
24
|
+
};
|
|
25
|
+
this.handlePromoteAndAdd = () => {
|
|
26
|
+
if (!this.expression) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
// Wrap current expression in AND and add a new comparison
|
|
30
|
+
const newExpression = {
|
|
31
|
+
op: Zt.AND,
|
|
32
|
+
exp: [
|
|
33
|
+
this.expression,
|
|
34
|
+
{
|
|
35
|
+
key: '',
|
|
36
|
+
op: Zt.EQUALS,
|
|
37
|
+
exp: '',
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
};
|
|
41
|
+
this.expressionChange.emit(newExpression);
|
|
42
|
+
};
|
|
43
|
+
this.handleExpressionChange = (event) => {
|
|
44
|
+
var _a;
|
|
45
|
+
event.stopPropagation();
|
|
46
|
+
this.expressionChange.emit((_a = event.detail) !== null && _a !== void 0 ? _a : undefined);
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
render() {
|
|
50
|
+
if (!this.expression) {
|
|
51
|
+
return this.renderEmptyState();
|
|
52
|
+
}
|
|
53
|
+
// Check if we need to show promotion UI (comparison or NOT)
|
|
54
|
+
if (this.needsPromotion()) {
|
|
55
|
+
return this.renderWithPromotionButton();
|
|
56
|
+
}
|
|
57
|
+
// AND/OR groups handle their own Add buttons
|
|
58
|
+
return (h("limebb-lime-query-filter-expression", { platform: this.platform, context: this.context, limetype: this.limetype, activeLimetype: this.activeLimetype, expression: this.expression, onExpressionChange: this.handleExpressionChange }));
|
|
59
|
+
}
|
|
60
|
+
needsPromotion() {
|
|
61
|
+
if (!this.expression) {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
// Basic comparison needs promotion
|
|
65
|
+
if ('key' in this.expression) {
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
// NOT needs promotion
|
|
69
|
+
return this.expression.op === Zt.NOT;
|
|
70
|
+
}
|
|
71
|
+
renderEmptyState() {
|
|
72
|
+
return (h("limel-button", { label: "Add a condition", icon: "plus_math", onClick: this.handleAddFirstCondition }));
|
|
73
|
+
}
|
|
74
|
+
renderWithPromotionButton() {
|
|
75
|
+
return (h("div", { class: "expression-with-promotion" }, h("limebb-lime-query-filter-expression", { platform: this.platform, context: this.context, limetype: this.limetype, activeLimetype: this.activeLimetype, expression: this.expression, onExpressionChange: this.handleExpressionChange }), h("limel-button", { label: "Add another condition", icon: "plus_math", onClick: this.handlePromoteAndAdd })));
|
|
76
|
+
}
|
|
77
|
+
static get style() { return LimebbLimeQueryFilterBuilderStyle0; }
|
|
78
|
+
}, [1, "limebb-lime-query-filter-builder", {
|
|
79
|
+
"platform": [16],
|
|
80
|
+
"context": [16],
|
|
81
|
+
"limetype": [1],
|
|
82
|
+
"activeLimetype": [1, "active-limetype"],
|
|
83
|
+
"expression": [16]
|
|
84
|
+
}]);
|
|
85
|
+
function defineCustomElement() {
|
|
86
|
+
if (typeof customElements === "undefined") {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
const components = ["limebb-lime-query-filter-builder", "limebb-lime-query-filter-comparison", "limebb-lime-query-filter-expression", "limebb-lime-query-filter-group", "limebb-lime-query-filter-not", "limebb-lime-query-value-input", "limebb-property-selector"];
|
|
90
|
+
components.forEach(tagName => { switch (tagName) {
|
|
91
|
+
case "limebb-lime-query-filter-builder":
|
|
92
|
+
if (!customElements.get(tagName)) {
|
|
93
|
+
customElements.define(tagName, LimeQueryFilterBuilderComponent);
|
|
94
|
+
}
|
|
95
|
+
break;
|
|
96
|
+
case "limebb-lime-query-filter-comparison":
|
|
97
|
+
if (!customElements.get(tagName)) {
|
|
98
|
+
defineCustomElement$6();
|
|
99
|
+
}
|
|
100
|
+
break;
|
|
101
|
+
case "limebb-lime-query-filter-expression":
|
|
102
|
+
if (!customElements.get(tagName)) {
|
|
103
|
+
defineCustomElement$5();
|
|
104
|
+
}
|
|
105
|
+
break;
|
|
106
|
+
case "limebb-lime-query-filter-group":
|
|
107
|
+
if (!customElements.get(tagName)) {
|
|
108
|
+
defineCustomElement$4();
|
|
109
|
+
}
|
|
110
|
+
break;
|
|
111
|
+
case "limebb-lime-query-filter-not":
|
|
112
|
+
if (!customElements.get(tagName)) {
|
|
113
|
+
defineCustomElement$3();
|
|
114
|
+
}
|
|
115
|
+
break;
|
|
116
|
+
case "limebb-lime-query-value-input":
|
|
117
|
+
if (!customElements.get(tagName)) {
|
|
118
|
+
defineCustomElement$2();
|
|
119
|
+
}
|
|
120
|
+
break;
|
|
121
|
+
case "limebb-property-selector":
|
|
122
|
+
if (!customElements.get(tagName)) {
|
|
123
|
+
defineCustomElement$1();
|
|
124
|
+
}
|
|
125
|
+
break;
|
|
126
|
+
} });
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export { LimeQueryFilterBuilderComponent as L, defineCustomElement as d };
|
|
@@ -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,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { T as Te } from './index.esm.js';
|
|
2
|
+
import { T as Te, Z as Zt } from './index.esm.js';
|
|
3
3
|
import { a 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}";
|
|
@@ -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();
|