@limetech/lime-crm-building-blocks 1.98.0 → 1.100.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/{index.esm-a894ac76.js → index.esm-d785eb6e.js} +2 -0
- package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
- package/dist/cjs/limebb-browser.cjs.entry.js +1 -1
- package/dist/cjs/limebb-chat-item_2.cjs.entry.js +1 -1
- package/dist/cjs/limebb-chat-list.cjs.entry.js +1 -1
- package/dist/cjs/limebb-component-config.cjs.entry.js +1 -1
- package/dist/cjs/limebb-component-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-currency-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +1 -1
- package/dist/cjs/limebb-feed.cjs.entry.js +1 -1
- package/dist/cjs/limebb-info-tile.cjs.entry.js +1 -1
- package/dist/cjs/limebb-kanban-group.cjs.entry.js +1 -1
- package/dist/cjs/limebb-kanban-item.cjs.entry.js +1 -1
- package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +68 -179
- package/dist/cjs/limebb-lime-query-filter-and.cjs.entry.js +80 -0
- package/dist/cjs/{limebb-limetype-field_2.cjs.entry.js → limebb-lime-query-filter-builder_3.cjs.entry.js} +108 -6
- package/dist/cjs/limebb-lime-query-filter-comparison_5.cjs.entry.js +705 -0
- package/dist/cjs/limebb-lime-query-filter-expression.cjs.entry.js +45 -0
- package/dist/cjs/limebb-lime-query-filter-or.cjs.entry.js +68 -0
- package/dist/cjs/limebb-limeobject-file-viewer.cjs.entry.js +1 -1
- package/dist/cjs/limebb-live-docs-info.cjs.entry.js +2 -2
- package/dist/cjs/limebb-loader.cjs.entry.js +1 -1
- package/dist/cjs/limebb-locale-picker.cjs.entry.js +2 -2
- package/dist/cjs/limebb-mention-group-counter.cjs.entry.js +2 -2
- package/dist/cjs/limebb-mention.cjs.entry.js +1 -1
- package/dist/cjs/limebb-navigation-button_2.cjs.entry.js +3 -3
- package/dist/cjs/limebb-notification-item.cjs.entry.js +2 -2
- package/dist/cjs/limebb-notification-list.cjs.entry.js +1 -1
- package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +2 -2
- package/dist/cjs/limebb-text-editor.cjs.entry.js +3 -3
- package/dist/cjs/limebb-trend-indicator.cjs.entry.js +1 -1
- package/dist/cjs/{limetype-1fe0207f.js → limetype-f2e4376e.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-and.js +41 -49
- 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-builder.js +225 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison.js +77 -41
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-expression.js +35 -46
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-group.css +130 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-group.js +269 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-not.js +19 -25
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-or.js +34 -34
- package/dist/collection/components/lime-query-builder/lime-query-builder.js +11 -26
- 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/index.esm.js +2 -1
- package/dist/components/lime-query-filter-builder.js +129 -0
- package/dist/components/lime-query-filter-comparison.js +32 -45
- package/dist/components/lime-query-filter-expression.js +315 -0
- package/dist/components/limebb-lime-query-builder.js +73 -182
- package/dist/components/limebb-lime-query-filter-and.js +130 -1
- 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-lime-query-filter-comparison.js +1 -1
- package/dist/components/limebb-lime-query-filter-expression.js +1 -1
- package/dist/components/limebb-lime-query-filter-group.d.ts +11 -0
- package/dist/components/limebb-lime-query-filter-group.js +6 -0
- package/dist/components/limebb-lime-query-filter-not.js +1 -1
- package/dist/components/limebb-lime-query-filter-or.js +118 -1
- 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 +34 -2
- 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/{index.esm-d8fdeb18.js → index.esm-bb569663.js} +2 -1
- package/dist/esm/lime-crm-building-blocks.js +1 -1
- package/dist/esm/limebb-browser.entry.js +1 -1
- package/dist/esm/limebb-chat-item_2.entry.js +1 -1
- package/dist/esm/limebb-chat-list.entry.js +1 -1
- package/dist/esm/limebb-component-config.entry.js +1 -1
- package/dist/esm/limebb-component-picker.entry.js +1 -1
- package/dist/esm/limebb-currency-picker.entry.js +1 -1
- package/dist/esm/limebb-date-picker.entry.js +1 -1
- package/dist/esm/limebb-feed-timeline-item.entry.js +1 -1
- package/dist/esm/limebb-feed.entry.js +1 -1
- package/dist/esm/limebb-info-tile.entry.js +1 -1
- package/dist/esm/limebb-kanban-group.entry.js +1 -1
- package/dist/esm/limebb-kanban-item.entry.js +1 -1
- package/dist/esm/limebb-lime-query-builder.entry.js +67 -178
- package/dist/esm/limebb-lime-query-filter-and.entry.js +76 -0
- package/dist/esm/{limebb-limetype-field_2.entry.js → limebb-lime-query-filter-builder_3.entry.js} +107 -6
- package/dist/esm/limebb-lime-query-filter-comparison_5.entry.js +697 -0
- package/dist/esm/limebb-lime-query-filter-expression.entry.js +41 -0
- package/dist/esm/limebb-lime-query-filter-or.entry.js +64 -0
- package/dist/esm/limebb-limeobject-file-viewer.entry.js +1 -1
- package/dist/esm/limebb-live-docs-info.entry.js +2 -2
- package/dist/esm/limebb-loader.entry.js +1 -1
- package/dist/esm/limebb-locale-picker.entry.js +2 -2
- package/dist/esm/limebb-mention-group-counter.entry.js +2 -2
- package/dist/esm/limebb-mention.entry.js +1 -1
- package/dist/esm/limebb-navigation-button_2.entry.js +3 -3
- package/dist/esm/limebb-notification-item.entry.js +2 -2
- package/dist/esm/limebb-notification-list.entry.js +1 -1
- package/dist/esm/limebb-percentage-visualizer.entry.js +2 -2
- package/dist/esm/limebb-text-editor.entry.js +3 -3
- package/dist/esm/limebb-trend-indicator.entry.js +1 -1
- package/dist/esm/{limetype-6e7552a7.js → limetype-c0e041f7.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-a1818969.entry.js → p-03af0e66.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-f402184f.entry.js → p-098ee6c1.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-42e52b50.entry.js → p-1be0eec7.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-2aa18c2b.entry.js → p-206575e4.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-20bfca36.js +1 -0
- package/dist/lime-crm-building-blocks/p-24aeb928.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-82d33d43.entry.js → p-2faaacbc.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-d4016891.entry.js → p-2fdcb868.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-f52125a0.entry.js → p-3122ea05.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-baf4e428.entry.js → p-3175883d.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-8c8b7115.entry.js → p-32534eb7.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-6c1146ca.entry.js → p-36ea13c0.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-422f6d51.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-1fba0ade.js → p-4838284a.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-5e4ba110.entry.js → p-5464f0de.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-e9d23ef7.entry.js → p-569c86b5.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-90e1716a.entry.js → p-5dc574a3.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-00da9b24.entry.js → p-631ca5a5.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-67dbaa4c.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-6d119dab.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-beb0d164.entry.js → p-7271f47a.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-34357744.entry.js → p-9031f136.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-91732502.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-8c4eb49f.entry.js → p-93cadc1e.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-3932077b.entry.js → p-9cac4de2.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-79d4668a.entry.js → p-a200954f.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-b198194a.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-d89c44ad.entry.js → p-b9b954d9.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-3a620226.entry.js → p-cfa1a4ad.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-ef8a5266.entry.js → p-e8946134.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-9d9f25da.entry.js → p-eb81bceb.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-50d3d61a.entry.js → p-ee1b00b9.entry.js} +1 -1
- package/dist/types/components/lime-query-builder/expressions/lime-query-filter-and.d.ts +5 -4
- 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-filter-comparison.d.ts +6 -4
- package/dist/types/components/lime-query-builder/expressions/lime-query-filter-expression.d.ts +10 -14
- package/dist/types/components/lime-query-builder/expressions/lime-query-filter-group.d.ts +60 -0
- package/dist/types/components/lime-query-builder/expressions/lime-query-filter-not.d.ts +4 -4
- package/dist/types/components/lime-query-builder/expressions/lime-query-filter-or.d.ts +5 -4
- package/dist/types/components/lime-query-builder/lime-query-builder.d.ts +1 -0
- package/dist/types/components/lime-query-builder/lime-query.types.d.ts +2 -1
- package/dist/types/components.d.ts +293 -65
- package/package.json +1 -1
- package/dist/cjs/isEqual-e77cce75.js +0 -37
- package/dist/cjs/lime-query.types-bcb63a22.js +0 -61
- package/dist/cjs/limebb-lime-query-filter-and_5.cjs.entry.js +0 -278
- package/dist/cjs/limebb-lime-query-value-input.cjs.entry.js +0 -239
- package/dist/cjs/limebb-property-selector.cjs.entry.js +0 -234
- package/dist/components/isEqual.js +0 -35
- package/dist/components/lime-query-filter-and.js +0 -408
- package/dist/esm/isEqual-57d0c223.js +0 -35
- package/dist/esm/lime-query.types-f72355e1.js +0 -59
- package/dist/esm/limebb-lime-query-filter-and_5.entry.js +0 -270
- package/dist/esm/limebb-lime-query-value-input.entry.js +0 -235
- package/dist/esm/limebb-property-selector.entry.js +0 -230
- package/dist/lime-crm-building-blocks/p-02c0cc04.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-0957b2a6.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-3b0a15ec.js +0 -1
- package/dist/lime-crm-building-blocks/p-5a6d2e7f.js +0 -1
- package/dist/lime-crm-building-blocks/p-60971d64.js +0 -1
- package/dist/lime-crm-building-blocks/p-70a28b93.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-96beaabc.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-f99c611d.entry.js +0 -1
|
@@ -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: '069ab0188df35e32bca3fe7c000d2c5c874012a5', 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: 'f6e544a1859f3166ee540435c687415bbfd5de1d', 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: '348f345b2212b3da15c0e081385a5fee76317ebe', 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: '1681bf3578fb29886f68070e3e07397d1e312dc1', 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: '1e2daa75c518f4949a7ca6fdd0ff29bc1a6d529e', slot: "trigger", tabIndex: 0, onMouseEnter: this.openPopoverWithDelay, onMouseLeave: this.resetTimeout, onFocus: this.openPopoverWithDelay }, h("slot", { key: '9d1a9b69db8ac1c4cfddd62fb9949c98700e61b7', name: "trigger" }), h("div", { key: '95fcc70f46106c426ae191b6a8d66c7d7a025ca9', class: "opening-countdown-indicator" })), h("limel-card", { key: '9294ae443aa9f279c3c01f0af48ca6a2d0d1409f', 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: 'b26fecf7c748fcd82fea453ece55189bcd1302ef', 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: 'dcd5792c82409e75e149e263fc7b4864e195a387', id: this.tooltipId }, label),
|
|
17
|
+
h("limel-tooltip", { key: '2c17e50ac616348df3a98da324b6538891cff75c', 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: '277ec61f05d5edff319ed8bb37df9bc385cb3941', 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: '8c503e1a099f65fe29e2ef1903f78ddf62f815d9', class: this.getContainerClassList() }, h("limel-notched-outline", { key: '76d8b456dec89cea949ae427091256dffc1e71ab', 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: 'e295b50dcc7a3d4cb017f7d1ca5dd187bf52299c', 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())) {
|
|
@@ -747,6 +747,7 @@ G = Xt([
|
|
|
747
747
|
id: Jt
|
|
748
748
|
})
|
|
749
749
|
], G);
|
|
750
|
+
var Zt = /* @__PURE__ */ ((t) => (t.AND = "AND", t.OR = "OR", t.NOT = "!", t.EQUALS = "=", t.NOT_EQUALS = "!=", t.GREATER = ">", t.LESS = "<", t.IN = "IN", t.BEGINS = "=?", t.LIKE = "?", t.LESS_OR_EQUAL = "<=", t.GREATER_OR_EQUAL = ">=", t.ENDS = "=$", t))(Zt || {});
|
|
750
751
|
const We = {
|
|
751
752
|
Count: "COUNT",
|
|
752
753
|
Sum: "SUM",
|
|
@@ -829,4 +830,4 @@ c.NotificationRepository = we;
|
|
|
829
830
|
const Pe = "pollerFactory";
|
|
830
831
|
c.PollerFactory = Pe;
|
|
831
832
|
|
|
832
|
-
export { De as D, Ge as G, He as H, Ke as K, Le as L, Me as M, Te as T, We as W, Ye as Y, c, h };
|
|
833
|
+
export { De as D, Ge as G, He as H, Ke as K, Le as L, Me as M, Te as T, We as W, Ye as Y, Zt as Z, c, h };
|
|
@@ -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 };
|
|
@@ -1,120 +1,107 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { Z as Zt } from './index.esm.js';
|
|
2
3
|
import { d as defineCustomElement$2 } from './lime-query-value-input.js';
|
|
3
4
|
import { d as defineCustomElement$1 } from './property-selector.js';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
* These types represent the structure of Lime Query as defined in:
|
|
9
|
-
* - lime-core/lime_query/schema.py
|
|
10
|
-
* - lime-core/lime_filter/schema.py
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Available operators with display metadata
|
|
14
|
-
*/
|
|
6
|
+
const limeQueryFilterComparisonCss = ".expression-container{display:flex;flex-direction:row;align-items:flex-start;gap:1rem;flex-wrap:wrap}.expression-container>*{flex-grow:2;width:30%;max-width:calc(100% - 3.25rem)}.expression-container>.operator{flex-grow:1;width:calc(30% + 1rem);min-width:4rem}.expression-container>.remove{flex-grow:0;width:auto;margin-left:auto}@media (max-width: 768px){.expression-container{flex-direction:column}.expression-container>*{width:100%;max-width:100%}.expression-container>.operator{width:100%}.expression-container>.remove{margin-left:0;align-self:flex-end}}";
|
|
7
|
+
const LimebbLimeQueryFilterComparisonStyle0 = limeQueryFilterComparisonCss;
|
|
8
|
+
|
|
15
9
|
const LIME_QUERY_OPERATORS = [
|
|
16
|
-
{ value:
|
|
17
|
-
{ value:
|
|
10
|
+
{ value: Zt.EQUALS, label: 'Equals', icon: 'equals' },
|
|
11
|
+
{ value: Zt.NOT_EQUALS, label: 'Not Equals', icon: 'not-equal' },
|
|
18
12
|
{
|
|
19
|
-
value:
|
|
13
|
+
value: Zt.GREATER,
|
|
20
14
|
label: 'Greater Than',
|
|
21
15
|
icon: 'greater-than',
|
|
22
16
|
applicableTypes: ['integer', 'decimal', 'date', 'time'],
|
|
23
17
|
},
|
|
24
18
|
{
|
|
25
|
-
value:
|
|
19
|
+
value: Zt.GREATER_OR_EQUAL,
|
|
26
20
|
label: 'Greater or Equal',
|
|
27
21
|
icon: 'greater-or-equal',
|
|
28
22
|
applicableTypes: ['integer', 'decimal', 'date', 'time'],
|
|
29
23
|
},
|
|
30
24
|
{
|
|
31
|
-
value:
|
|
25
|
+
value: Zt.LESS,
|
|
32
26
|
label: 'Less Than',
|
|
33
27
|
icon: 'less-than',
|
|
34
28
|
applicableTypes: ['integer', 'decimal', 'date', 'time'],
|
|
35
29
|
},
|
|
36
30
|
{
|
|
37
|
-
value:
|
|
31
|
+
value: Zt.LESS_OR_EQUAL,
|
|
38
32
|
label: 'Less or Equal',
|
|
39
33
|
icon: 'less-or-equal',
|
|
40
34
|
applicableTypes: ['integer', 'decimal', 'date', 'time'],
|
|
41
35
|
},
|
|
42
|
-
{ value:
|
|
36
|
+
{ value: Zt.IN, label: 'In List', icon: 'list' },
|
|
43
37
|
{
|
|
44
|
-
value:
|
|
38
|
+
value: Zt.LIKE,
|
|
45
39
|
label: 'Contains',
|
|
46
40
|
icon: '-lime-filter-contain',
|
|
47
41
|
applicableTypes: ['string', 'text'],
|
|
48
42
|
},
|
|
49
43
|
{
|
|
50
|
-
value:
|
|
44
|
+
value: Zt.BEGINS,
|
|
51
45
|
label: 'Begins With',
|
|
52
46
|
icon: '-lime-filter-begin',
|
|
53
47
|
applicableTypes: ['string', 'text'],
|
|
54
48
|
},
|
|
55
49
|
{
|
|
56
|
-
value:
|
|
50
|
+
value: Zt.ENDS,
|
|
57
51
|
label: 'Ends With',
|
|
58
52
|
icon: '-lime-filter-end',
|
|
59
53
|
applicableTypes: ['string', 'text'],
|
|
60
54
|
},
|
|
61
55
|
];
|
|
62
|
-
|
|
63
|
-
const limeQueryFilterComparisonCss = ".expression-container{display:flex;flex-direction:row;align-items:flex-start;gap:1rem;flex-wrap:wrap}.expression-container>*{flex-grow:2;width:30%;max-width:calc(100% - 3.25rem)}.expression-container>.operator{flex-grow:1;width:calc(30% + 1rem);min-width:4rem}.expression-container>.remove{flex-grow:0;width:auto;margin-left:auto}@media (max-width: 768px){.expression-container{flex-direction:column}.expression-container>*{width:100%;max-width:100%}.expression-container>.operator{width:100%}.expression-container>.remove{margin-left:0;align-self:flex-end}}";
|
|
64
|
-
const LimebbLimeQueryFilterComparisonStyle0 = limeQueryFilterComparisonCss;
|
|
65
|
-
|
|
66
56
|
const LimeQueryFilterComparisonComponent = /*@__PURE__*/ proxyCustomElement(class LimeQueryFilterComparisonComponent extends HTMLElement {
|
|
67
57
|
constructor() {
|
|
68
58
|
super();
|
|
69
59
|
this.__registerHost();
|
|
70
60
|
this.__attachShadow();
|
|
71
61
|
this.expressionChange = createEvent(this, "expressionChange", 7);
|
|
72
|
-
/**
|
|
73
|
-
* The comparison expression to render
|
|
74
|
-
*/
|
|
75
|
-
this.expression = {
|
|
76
|
-
filter_type: 'comparison',
|
|
77
|
-
property: '',
|
|
78
|
-
operator: '=',
|
|
79
|
-
value: '',
|
|
80
|
-
};
|
|
81
62
|
this.handlePropertyChange = (event) => {
|
|
82
63
|
event.stopPropagation();
|
|
83
|
-
this.expressionChange.emit(Object.assign(Object.assign({}, this.expression), {
|
|
64
|
+
this.expressionChange.emit(Object.assign(Object.assign({}, this.expression), { key: event.detail }));
|
|
84
65
|
};
|
|
85
66
|
this.handleOperatorChange = (event) => {
|
|
86
67
|
event.stopPropagation();
|
|
87
|
-
|
|
68
|
+
// TODO: Clear value when switching between IN and other operators
|
|
69
|
+
// since array values are incompatible with single-value operators
|
|
70
|
+
this.expressionChange.emit({
|
|
71
|
+
key: this.expression.key,
|
|
72
|
+
op: event.detail.value,
|
|
73
|
+
exp: this.expression.exp,
|
|
74
|
+
});
|
|
88
75
|
};
|
|
89
76
|
this.handleValueChange = (event) => {
|
|
90
77
|
event.stopPropagation();
|
|
91
|
-
this.expressionChange.emit(Object.assign(Object.assign({}, this.expression), {
|
|
78
|
+
this.expressionChange.emit(Object.assign(Object.assign({}, this.expression), { exp: event.detail }));
|
|
92
79
|
};
|
|
93
80
|
this.removeExpression = () => {
|
|
94
|
-
this.expressionChange.emit(
|
|
81
|
+
this.expressionChange.emit(undefined);
|
|
95
82
|
};
|
|
96
83
|
}
|
|
97
84
|
render() {
|
|
98
|
-
return (h("div", { key: '
|
|
85
|
+
return (h("div", { key: '668e0f05bdb1fb25ffd652ea650c34e5431a3332', class: "expression" }, this.label && h("limel-header", { key: '5034070b58afe31cf90699dd2a27f884e647f540', heading: this.label }), h("div", { key: '14a2b1270e5e6d7e158e29ebc5f61051e5670e80', class: "expression-container" }, this.renderPropertySelector(), this.renderOperator(), this.renderValueInput(), h("limel-icon-button", { key: 'b69bde6e88c40d2623ef015794db28cec3676c73', class: "remove", icon: "trash", label: "Remove condition", onClick: this.removeExpression }))));
|
|
99
86
|
}
|
|
100
87
|
renderPropertySelector() {
|
|
101
|
-
return (h("limebb-property-selector", { platform: this.platform, context: this.context, label: "Property", limetype: this.limetype, value: this.expression.
|
|
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 }));
|
|
102
89
|
}
|
|
103
90
|
renderOperator() {
|
|
104
|
-
const operatorHasBeenSet = !!this.expression.
|
|
91
|
+
const operatorHasBeenSet = !!this.expression.op;
|
|
105
92
|
const options = LIME_QUERY_OPERATORS.map((op) => ({
|
|
106
93
|
text: op.label,
|
|
107
94
|
value: op.value,
|
|
108
95
|
icon: op.icon ? { name: op.icon } : undefined,
|
|
109
96
|
}));
|
|
110
|
-
const selectedOption = options.find((o) => o.value === this.expression.
|
|
111
|
-
return (h("limel-select", { class: "operator", label: "Operator", value: selectedOption, options: options, disabled: !operatorHasBeenSet && !this.expression.
|
|
97
|
+
const selectedOption = options.find((o) => o.value === this.expression.op);
|
|
98
|
+
return (h("limel-select", { class: "operator", label: "Operator", value: selectedOption, options: options, disabled: !operatorHasBeenSet && !this.expression.key, onChange: this.handleOperatorChange }));
|
|
112
99
|
}
|
|
113
100
|
renderValueInput() {
|
|
114
|
-
if (!this.expression.
|
|
101
|
+
if (!this.expression.op) {
|
|
115
102
|
return null;
|
|
116
103
|
}
|
|
117
|
-
return (h("limebb-lime-query-value-input", { platform: this.platform, context: this.context, limetype: this.limetype, activeLimetype: this.activeLimetype, propertyPath: this.expression.
|
|
104
|
+
return (h("limebb-lime-query-value-input", { platform: this.platform, context: this.context, limetype: this.limetype, activeLimetype: this.activeLimetype, propertyPath: this.expression.key, operator: this.expression.op, value: this.expression.exp, onChange: this.handleValueChange }));
|
|
118
105
|
}
|
|
119
106
|
static get style() { return LimebbLimeQueryFilterComparisonStyle0; }
|
|
120
107
|
}, [1, "limebb-lime-query-filter-comparison", {
|
|
@@ -149,4 +136,4 @@ function defineCustomElement() {
|
|
|
149
136
|
} });
|
|
150
137
|
}
|
|
151
138
|
|
|
152
|
-
export {
|
|
139
|
+
export { LimeQueryFilterComparisonComponent as L, defineCustomElement as d };
|