@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
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* It contains typing information for all components that exist in this project.
|
|
6
6
|
*/
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
|
-
import { AggregateOperator, AndOrExpression, Expression, LimeFileUrlType, LimeType, LimeWebComponentContext, LimeWebComponentPlatform, NotExpression } from "@limetech/lime-web-components";
|
|
8
|
+
import { AggregateOperator, AndOrExpression, Expression, LimeFileUrlType, LimeType, LimeWebComponentContext, LimeWebComponentPlatform, NotExpression, Operator } from "@limetech/lime-web-components";
|
|
9
9
|
import { BrowserItem } from "./components/browser/browser-item.types";
|
|
10
10
|
import { ActionBarItem, CustomElementDefinition, DateType, EditorUiType, FormInfo, Icon, Image, Languages, ListItem, ListSeparator, OpenDirection } from "@limetech/lime-elements";
|
|
11
11
|
import { ChatItem } from "./components/chat-list/chat-item/chat-item.types";
|
|
@@ -17,14 +17,14 @@ import { DateTimeFormat, NumberFormat, RelativeDateTimeFormat } from "./componen
|
|
|
17
17
|
import { InfoTile } from "./components/info-tile/info-tile";
|
|
18
18
|
import { KanbanGroup } from "./components/kanban/kanban-group/kanban-group.types";
|
|
19
19
|
import { KanbanItem } from "./components/kanban/kanban-item/kanban-item.types";
|
|
20
|
-
import {
|
|
20
|
+
import { LimeQuery, ResponseFormat } from "./components/lime-query-builder/lime-query.types";
|
|
21
21
|
import { LanguagePickerType } from "./components/locale-picker/language-picker.types";
|
|
22
22
|
import { NavigationButtonType } from "./components/navigation-button/navigation-button.types";
|
|
23
23
|
import { NotificationItem } from "./components/notification-list/notification-item/notification-item.types";
|
|
24
24
|
import { PropertySelectionItem } from "./components/lime-query-builder/property-selection-format";
|
|
25
25
|
import { TriggerMap } from "./components/text-editor/text-editor.types";
|
|
26
26
|
import { EnhancedEditorMetadata } from "./components/text-editor/uploader/building-blocks-upload-handler";
|
|
27
|
-
export { AggregateOperator, AndOrExpression, Expression, LimeFileUrlType, LimeType, LimeWebComponentContext, LimeWebComponentPlatform, NotExpression } from "@limetech/lime-web-components";
|
|
27
|
+
export { AggregateOperator, AndOrExpression, Expression, LimeFileUrlType, LimeType, LimeWebComponentContext, LimeWebComponentPlatform, NotExpression, Operator } from "@limetech/lime-web-components";
|
|
28
28
|
export { BrowserItem } from "./components/browser/browser-item.types";
|
|
29
29
|
export { ActionBarItem, CustomElementDefinition, DateType, EditorUiType, FormInfo, Icon, Image, Languages, ListItem, ListSeparator, OpenDirection } from "@limetech/lime-elements";
|
|
30
30
|
export { ChatItem } from "./components/chat-list/chat-item/chat-item.types";
|
|
@@ -36,7 +36,7 @@ export { DateTimeFormat, NumberFormat, RelativeDateTimeFormat } from "./componen
|
|
|
36
36
|
export { InfoTile } from "./components/info-tile/info-tile";
|
|
37
37
|
export { KanbanGroup } from "./components/kanban/kanban-group/kanban-group.types";
|
|
38
38
|
export { KanbanItem } from "./components/kanban/kanban-item/kanban-item.types";
|
|
39
|
-
export {
|
|
39
|
+
export { LimeQuery, ResponseFormat } from "./components/lime-query-builder/lime-query.types";
|
|
40
40
|
export { LanguagePickerType } from "./components/locale-picker/language-picker.types";
|
|
41
41
|
export { NavigationButtonType } from "./components/navigation-button/navigation-button.types";
|
|
42
42
|
export { NotificationItem } from "./components/notification-list/notification-item/notification-item.types";
|
|
@@ -968,6 +968,7 @@ export namespace Components {
|
|
|
968
968
|
* These placeholders reference properties of a contextual "active object"
|
|
969
969
|
* (e.g., `%activeObject%.company` references the company of the active object).
|
|
970
970
|
* @exampleComponent limebb-example-lime-query-builder-basic
|
|
971
|
+
* @exampleComponent limebb-example-lime-query-builder-with-active-limetype
|
|
971
972
|
* @private
|
|
972
973
|
*/
|
|
973
974
|
interface LimebbLimeQueryBuilder {
|
|
@@ -993,18 +994,16 @@ export namespace Components {
|
|
|
993
994
|
"value": LimeQuery;
|
|
994
995
|
}
|
|
995
996
|
/**
|
|
996
|
-
* Lime Query Filter
|
|
997
|
-
*
|
|
998
|
-
*
|
|
999
|
-
*
|
|
1000
|
-
*
|
|
1001
|
-
*
|
|
1002
|
-
*
|
|
1003
|
-
* - An "Add another condition" button to add more expressions
|
|
1004
|
-
* Clicking the trash icon on a child expression removes it from the AND group.
|
|
997
|
+
* Lime Query Filter Builder
|
|
998
|
+
* Entry component for building Lime Query filter expressions.
|
|
999
|
+
* This component wraps the expression router and adds promotion logic
|
|
1000
|
+
* for handling Add buttons and expression structure.
|
|
1001
|
+
* Unlike the expression router (which is pure routing), this component
|
|
1002
|
+
* contains business logic for promoting expressions and managing the
|
|
1003
|
+
* filter structure.
|
|
1005
1004
|
* @private
|
|
1006
1005
|
*/
|
|
1007
|
-
interface
|
|
1006
|
+
interface LimebbLimeQueryFilterBuilder {
|
|
1008
1007
|
/**
|
|
1009
1008
|
* The limetype of the active object (for %activeObject% placeholders)
|
|
1010
1009
|
*/
|
|
@@ -1014,13 +1013,9 @@ export namespace Components {
|
|
|
1014
1013
|
*/
|
|
1015
1014
|
"context": LimeWebComponentContext;
|
|
1016
1015
|
/**
|
|
1017
|
-
* The
|
|
1018
|
-
*/
|
|
1019
|
-
"expression": AndOrExpression;
|
|
1020
|
-
/**
|
|
1021
|
-
* Optional label for the AND group
|
|
1016
|
+
* The filter expression to build
|
|
1022
1017
|
*/
|
|
1023
|
-
"
|
|
1018
|
+
"expression": Expression | undefined;
|
|
1024
1019
|
/**
|
|
1025
1020
|
* The limetype being queried (e.g., "deal", "company")
|
|
1026
1021
|
*/
|
|
@@ -1184,44 +1179,6 @@ export namespace Components {
|
|
|
1184
1179
|
*/
|
|
1185
1180
|
"platform": LimeWebComponentPlatform;
|
|
1186
1181
|
}
|
|
1187
|
-
/**
|
|
1188
|
-
* Lime Query Filter OR Component
|
|
1189
|
-
* Renders a group of filter expressions where **at least one condition must be true**.
|
|
1190
|
-
* Users can add multiple alternative expressions, and a record only needs to match
|
|
1191
|
-
* one of them to be included in the result set.
|
|
1192
|
-
* This component displays:
|
|
1193
|
-
* - A header with "Any of these conditions is true" when there are multiple conditions
|
|
1194
|
-
* - A list of child expressions (which can be comparisons or nested AND/OR/NOT groups)
|
|
1195
|
-
* - An "Add alternative" button to add more options
|
|
1196
|
-
* Clicking the trash icon on a child expression removes it from the OR group.
|
|
1197
|
-
* @private
|
|
1198
|
-
*/
|
|
1199
|
-
interface LimebbLimeQueryFilterOr {
|
|
1200
|
-
/**
|
|
1201
|
-
* The limetype of the active object (for %activeObject% placeholders)
|
|
1202
|
-
*/
|
|
1203
|
-
"activeLimetype"?: string;
|
|
1204
|
-
/**
|
|
1205
|
-
* Component context
|
|
1206
|
-
*/
|
|
1207
|
-
"context": LimeWebComponentContext;
|
|
1208
|
-
/**
|
|
1209
|
-
* The OR expression containing child expressions
|
|
1210
|
-
*/
|
|
1211
|
-
"expression": AndOrExpression;
|
|
1212
|
-
/**
|
|
1213
|
-
* Optional label for the OR group
|
|
1214
|
-
*/
|
|
1215
|
-
"label": string;
|
|
1216
|
-
/**
|
|
1217
|
-
* The limetype being queried (e.g., "deal", "company")
|
|
1218
|
-
*/
|
|
1219
|
-
"limetype": string;
|
|
1220
|
-
/**
|
|
1221
|
-
* Platform service provider
|
|
1222
|
-
*/
|
|
1223
|
-
"platform": LimeWebComponentPlatform;
|
|
1224
|
-
}
|
|
1225
1182
|
/**
|
|
1226
1183
|
* Query Value Input Component
|
|
1227
1184
|
* Renders an appropriate input control based on the property type and operator.
|
|
@@ -1262,7 +1219,7 @@ export namespace Components {
|
|
|
1262
1219
|
/**
|
|
1263
1220
|
* The operator being used
|
|
1264
1221
|
*/
|
|
1265
|
-
"operator":
|
|
1222
|
+
"operator": Operator;
|
|
1266
1223
|
/**
|
|
1267
1224
|
* Platform service provider
|
|
1268
1225
|
*/
|
|
@@ -2119,9 +2076,9 @@ export interface LimebbLimeQueryBuilderCustomEvent<T> extends CustomEvent<T> {
|
|
|
2119
2076
|
detail: T;
|
|
2120
2077
|
target: HTMLLimebbLimeQueryBuilderElement;
|
|
2121
2078
|
}
|
|
2122
|
-
export interface
|
|
2079
|
+
export interface LimebbLimeQueryFilterBuilderCustomEvent<T> extends CustomEvent<T> {
|
|
2123
2080
|
detail: T;
|
|
2124
|
-
target:
|
|
2081
|
+
target: HTMLLimebbLimeQueryFilterBuilderElement;
|
|
2125
2082
|
}
|
|
2126
2083
|
export interface LimebbLimeQueryFilterComparisonCustomEvent<T> extends CustomEvent<T> {
|
|
2127
2084
|
detail: T;
|
|
@@ -2139,10 +2096,6 @@ export interface LimebbLimeQueryFilterNotCustomEvent<T> extends CustomEvent<T> {
|
|
|
2139
2096
|
detail: T;
|
|
2140
2097
|
target: HTMLLimebbLimeQueryFilterNotElement;
|
|
2141
2098
|
}
|
|
2142
|
-
export interface LimebbLimeQueryFilterOrCustomEvent<T> extends CustomEvent<T> {
|
|
2143
|
-
detail: T;
|
|
2144
|
-
target: HTMLLimebbLimeQueryFilterOrElement;
|
|
2145
|
-
}
|
|
2146
2099
|
export interface LimebbLimeQueryValueInputCustomEvent<T> extends CustomEvent<T> {
|
|
2147
2100
|
detail: T;
|
|
2148
2101
|
target: HTMLLimebbLimeQueryValueInputElement;
|
|
@@ -2828,6 +2781,7 @@ declare global {
|
|
|
2828
2781
|
* These placeholders reference properties of a contextual "active object"
|
|
2829
2782
|
* (e.g., `%activeObject%.company` references the company of the active object).
|
|
2830
2783
|
* @exampleComponent limebb-example-lime-query-builder-basic
|
|
2784
|
+
* @exampleComponent limebb-example-lime-query-builder-with-active-limetype
|
|
2831
2785
|
* @private
|
|
2832
2786
|
*/
|
|
2833
2787
|
interface HTMLLimebbLimeQueryBuilderElement extends Components.LimebbLimeQueryBuilder, HTMLStencilElement {
|
|
@@ -2844,34 +2798,32 @@ declare global {
|
|
|
2844
2798
|
prototype: HTMLLimebbLimeQueryBuilderElement;
|
|
2845
2799
|
new (): HTMLLimebbLimeQueryBuilderElement;
|
|
2846
2800
|
};
|
|
2847
|
-
interface
|
|
2801
|
+
interface HTMLLimebbLimeQueryFilterBuilderElementEventMap {
|
|
2848
2802
|
"expressionChange": Expression | undefined;
|
|
2849
2803
|
}
|
|
2850
2804
|
/**
|
|
2851
|
-
* Lime Query Filter
|
|
2852
|
-
*
|
|
2853
|
-
*
|
|
2854
|
-
*
|
|
2855
|
-
*
|
|
2856
|
-
*
|
|
2857
|
-
*
|
|
2858
|
-
* - An "Add another condition" button to add more expressions
|
|
2859
|
-
* Clicking the trash icon on a child expression removes it from the AND group.
|
|
2805
|
+
* Lime Query Filter Builder
|
|
2806
|
+
* Entry component for building Lime Query filter expressions.
|
|
2807
|
+
* This component wraps the expression router and adds promotion logic
|
|
2808
|
+
* for handling Add buttons and expression structure.
|
|
2809
|
+
* Unlike the expression router (which is pure routing), this component
|
|
2810
|
+
* contains business logic for promoting expressions and managing the
|
|
2811
|
+
* filter structure.
|
|
2860
2812
|
* @private
|
|
2861
2813
|
*/
|
|
2862
|
-
interface
|
|
2863
|
-
addEventListener<K extends keyof
|
|
2814
|
+
interface HTMLLimebbLimeQueryFilterBuilderElement extends Components.LimebbLimeQueryFilterBuilder, HTMLStencilElement {
|
|
2815
|
+
addEventListener<K extends keyof HTMLLimebbLimeQueryFilterBuilderElementEventMap>(type: K, listener: (this: HTMLLimebbLimeQueryFilterBuilderElement, ev: LimebbLimeQueryFilterBuilderCustomEvent<HTMLLimebbLimeQueryFilterBuilderElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2864
2816
|
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2865
2817
|
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2866
2818
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
2867
|
-
removeEventListener<K extends keyof
|
|
2819
|
+
removeEventListener<K extends keyof HTMLLimebbLimeQueryFilterBuilderElementEventMap>(type: K, listener: (this: HTMLLimebbLimeQueryFilterBuilderElement, ev: LimebbLimeQueryFilterBuilderCustomEvent<HTMLLimebbLimeQueryFilterBuilderElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
2868
2820
|
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2869
2821
|
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2870
2822
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
2871
2823
|
}
|
|
2872
|
-
var
|
|
2873
|
-
prototype:
|
|
2874
|
-
new ():
|
|
2824
|
+
var HTMLLimebbLimeQueryFilterBuilderElement: {
|
|
2825
|
+
prototype: HTMLLimebbLimeQueryFilterBuilderElement;
|
|
2826
|
+
new (): HTMLLimebbLimeQueryFilterBuilderElement;
|
|
2875
2827
|
};
|
|
2876
2828
|
interface HTMLLimebbLimeQueryFilterComparisonElementEventMap {
|
|
2877
2829
|
"expressionChange": ComparisonExpression | undefined;
|
|
@@ -2995,35 +2947,6 @@ declare global {
|
|
|
2995
2947
|
prototype: HTMLLimebbLimeQueryFilterNotElement;
|
|
2996
2948
|
new (): HTMLLimebbLimeQueryFilterNotElement;
|
|
2997
2949
|
};
|
|
2998
|
-
interface HTMLLimebbLimeQueryFilterOrElementEventMap {
|
|
2999
|
-
"expressionChange": Expression | undefined;
|
|
3000
|
-
}
|
|
3001
|
-
/**
|
|
3002
|
-
* Lime Query Filter OR Component
|
|
3003
|
-
* Renders a group of filter expressions where **at least one condition must be true**.
|
|
3004
|
-
* Users can add multiple alternative expressions, and a record only needs to match
|
|
3005
|
-
* one of them to be included in the result set.
|
|
3006
|
-
* This component displays:
|
|
3007
|
-
* - A header with "Any of these conditions is true" when there are multiple conditions
|
|
3008
|
-
* - A list of child expressions (which can be comparisons or nested AND/OR/NOT groups)
|
|
3009
|
-
* - An "Add alternative" button to add more options
|
|
3010
|
-
* Clicking the trash icon on a child expression removes it from the OR group.
|
|
3011
|
-
* @private
|
|
3012
|
-
*/
|
|
3013
|
-
interface HTMLLimebbLimeQueryFilterOrElement extends Components.LimebbLimeQueryFilterOr, HTMLStencilElement {
|
|
3014
|
-
addEventListener<K extends keyof HTMLLimebbLimeQueryFilterOrElementEventMap>(type: K, listener: (this: HTMLLimebbLimeQueryFilterOrElement, ev: LimebbLimeQueryFilterOrCustomEvent<HTMLLimebbLimeQueryFilterOrElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
3015
|
-
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
3016
|
-
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
3017
|
-
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
3018
|
-
removeEventListener<K extends keyof HTMLLimebbLimeQueryFilterOrElementEventMap>(type: K, listener: (this: HTMLLimebbLimeQueryFilterOrElement, ev: LimebbLimeQueryFilterOrCustomEvent<HTMLLimebbLimeQueryFilterOrElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
3019
|
-
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
3020
|
-
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
3021
|
-
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
3022
|
-
}
|
|
3023
|
-
var HTMLLimebbLimeQueryFilterOrElement: {
|
|
3024
|
-
prototype: HTMLLimebbLimeQueryFilterOrElement;
|
|
3025
|
-
new (): HTMLLimebbLimeQueryFilterOrElement;
|
|
3026
|
-
};
|
|
3027
2950
|
interface HTMLLimebbLimeQueryValueInputElementEventMap {
|
|
3028
2951
|
"change": any;
|
|
3029
2952
|
}
|
|
@@ -3563,12 +3486,11 @@ declare global {
|
|
|
3563
3486
|
"limebb-kanban-group": HTMLLimebbKanbanGroupElement;
|
|
3564
3487
|
"limebb-kanban-item": HTMLLimebbKanbanItemElement;
|
|
3565
3488
|
"limebb-lime-query-builder": HTMLLimebbLimeQueryBuilderElement;
|
|
3566
|
-
"limebb-lime-query-filter-
|
|
3489
|
+
"limebb-lime-query-filter-builder": HTMLLimebbLimeQueryFilterBuilderElement;
|
|
3567
3490
|
"limebb-lime-query-filter-comparison": HTMLLimebbLimeQueryFilterComparisonElement;
|
|
3568
3491
|
"limebb-lime-query-filter-expression": HTMLLimebbLimeQueryFilterExpressionElement;
|
|
3569
3492
|
"limebb-lime-query-filter-group": HTMLLimebbLimeQueryFilterGroupElement;
|
|
3570
3493
|
"limebb-lime-query-filter-not": HTMLLimebbLimeQueryFilterNotElement;
|
|
3571
|
-
"limebb-lime-query-filter-or": HTMLLimebbLimeQueryFilterOrElement;
|
|
3572
3494
|
"limebb-lime-query-value-input": HTMLLimebbLimeQueryValueInputElement;
|
|
3573
3495
|
"limebb-limeobject-file-viewer": HTMLLimebbLimeobjectFileViewerElement;
|
|
3574
3496
|
"limebb-limetype-field": HTMLLimebbLimetypeFieldElement;
|
|
@@ -4608,6 +4530,7 @@ declare namespace LocalJSX {
|
|
|
4608
4530
|
* These placeholders reference properties of a contextual "active object"
|
|
4609
4531
|
* (e.g., `%activeObject%.company` references the company of the active object).
|
|
4610
4532
|
* @exampleComponent limebb-example-lime-query-builder-basic
|
|
4533
|
+
* @exampleComponent limebb-example-lime-query-builder-with-active-limetype
|
|
4611
4534
|
* @private
|
|
4612
4535
|
*/
|
|
4613
4536
|
interface LimebbLimeQueryBuilder {
|
|
@@ -4637,18 +4560,16 @@ declare namespace LocalJSX {
|
|
|
4637
4560
|
"value"?: LimeQuery;
|
|
4638
4561
|
}
|
|
4639
4562
|
/**
|
|
4640
|
-
* Lime Query Filter
|
|
4641
|
-
*
|
|
4642
|
-
*
|
|
4643
|
-
*
|
|
4644
|
-
*
|
|
4645
|
-
*
|
|
4646
|
-
*
|
|
4647
|
-
* - An "Add another condition" button to add more expressions
|
|
4648
|
-
* Clicking the trash icon on a child expression removes it from the AND group.
|
|
4563
|
+
* Lime Query Filter Builder
|
|
4564
|
+
* Entry component for building Lime Query filter expressions.
|
|
4565
|
+
* This component wraps the expression router and adds promotion logic
|
|
4566
|
+
* for handling Add buttons and expression structure.
|
|
4567
|
+
* Unlike the expression router (which is pure routing), this component
|
|
4568
|
+
* contains business logic for promoting expressions and managing the
|
|
4569
|
+
* filter structure.
|
|
4649
4570
|
* @private
|
|
4650
4571
|
*/
|
|
4651
|
-
interface
|
|
4572
|
+
interface LimebbLimeQueryFilterBuilder {
|
|
4652
4573
|
/**
|
|
4653
4574
|
* The limetype of the active object (for %activeObject% placeholders)
|
|
4654
4575
|
*/
|
|
@@ -4658,21 +4579,17 @@ declare namespace LocalJSX {
|
|
|
4658
4579
|
*/
|
|
4659
4580
|
"context"?: LimeWebComponentContext;
|
|
4660
4581
|
/**
|
|
4661
|
-
* The
|
|
4582
|
+
* The filter expression to build
|
|
4662
4583
|
*/
|
|
4663
|
-
"expression"?:
|
|
4664
|
-
/**
|
|
4665
|
-
* Optional label for the AND group
|
|
4666
|
-
*/
|
|
4667
|
-
"label"?: string;
|
|
4584
|
+
"expression"?: Expression | undefined;
|
|
4668
4585
|
/**
|
|
4669
4586
|
* The limetype being queried (e.g., "deal", "company")
|
|
4670
4587
|
*/
|
|
4671
4588
|
"limetype"?: string;
|
|
4672
4589
|
/**
|
|
4673
|
-
* Emitted when the
|
|
4590
|
+
* Emitted when the filter expression changes Emits undefined when expression should be removed
|
|
4674
4591
|
*/
|
|
4675
|
-
"onExpressionChange"?: (event:
|
|
4592
|
+
"onExpressionChange"?: (event: LimebbLimeQueryFilterBuilderCustomEvent<Expression | undefined>) => void;
|
|
4676
4593
|
/**
|
|
4677
4594
|
* Platform service provider
|
|
4678
4595
|
*/
|
|
@@ -4848,48 +4765,6 @@ declare namespace LocalJSX {
|
|
|
4848
4765
|
*/
|
|
4849
4766
|
"platform"?: LimeWebComponentPlatform;
|
|
4850
4767
|
}
|
|
4851
|
-
/**
|
|
4852
|
-
* Lime Query Filter OR Component
|
|
4853
|
-
* Renders a group of filter expressions where **at least one condition must be true**.
|
|
4854
|
-
* Users can add multiple alternative expressions, and a record only needs to match
|
|
4855
|
-
* one of them to be included in the result set.
|
|
4856
|
-
* This component displays:
|
|
4857
|
-
* - A header with "Any of these conditions is true" when there are multiple conditions
|
|
4858
|
-
* - A list of child expressions (which can be comparisons or nested AND/OR/NOT groups)
|
|
4859
|
-
* - An "Add alternative" button to add more options
|
|
4860
|
-
* Clicking the trash icon on a child expression removes it from the OR group.
|
|
4861
|
-
* @private
|
|
4862
|
-
*/
|
|
4863
|
-
interface LimebbLimeQueryFilterOr {
|
|
4864
|
-
/**
|
|
4865
|
-
* The limetype of the active object (for %activeObject% placeholders)
|
|
4866
|
-
*/
|
|
4867
|
-
"activeLimetype"?: string;
|
|
4868
|
-
/**
|
|
4869
|
-
* Component context
|
|
4870
|
-
*/
|
|
4871
|
-
"context"?: LimeWebComponentContext;
|
|
4872
|
-
/**
|
|
4873
|
-
* The OR expression containing child expressions
|
|
4874
|
-
*/
|
|
4875
|
-
"expression"?: AndOrExpression;
|
|
4876
|
-
/**
|
|
4877
|
-
* Optional label for the OR group
|
|
4878
|
-
*/
|
|
4879
|
-
"label"?: string;
|
|
4880
|
-
/**
|
|
4881
|
-
* The limetype being queried (e.g., "deal", "company")
|
|
4882
|
-
*/
|
|
4883
|
-
"limetype"?: string;
|
|
4884
|
-
/**
|
|
4885
|
-
* Emitted when the OR expression changes (expressions added/removed/modified) Emits undefined when expression should be removed Can emit any Expression type when unwrapping (single child)
|
|
4886
|
-
*/
|
|
4887
|
-
"onExpressionChange"?: (event: LimebbLimeQueryFilterOrCustomEvent<Expression | undefined>) => void;
|
|
4888
|
-
/**
|
|
4889
|
-
* Platform service provider
|
|
4890
|
-
*/
|
|
4891
|
-
"platform"?: LimeWebComponentPlatform;
|
|
4892
|
-
}
|
|
4893
4768
|
/**
|
|
4894
4769
|
* Query Value Input Component
|
|
4895
4770
|
* Renders an appropriate input control based on the property type and operator.
|
|
@@ -4934,7 +4809,7 @@ declare namespace LocalJSX {
|
|
|
4934
4809
|
/**
|
|
4935
4810
|
* The operator being used
|
|
4936
4811
|
*/
|
|
4937
|
-
"operator"?:
|
|
4812
|
+
"operator"?: Operator;
|
|
4938
4813
|
/**
|
|
4939
4814
|
* Platform service provider
|
|
4940
4815
|
*/
|
|
@@ -5789,12 +5664,11 @@ declare namespace LocalJSX {
|
|
|
5789
5664
|
"limebb-kanban-group": LimebbKanbanGroup;
|
|
5790
5665
|
"limebb-kanban-item": LimebbKanbanItem;
|
|
5791
5666
|
"limebb-lime-query-builder": LimebbLimeQueryBuilder;
|
|
5792
|
-
"limebb-lime-query-filter-
|
|
5667
|
+
"limebb-lime-query-filter-builder": LimebbLimeQueryFilterBuilder;
|
|
5793
5668
|
"limebb-lime-query-filter-comparison": LimebbLimeQueryFilterComparison;
|
|
5794
5669
|
"limebb-lime-query-filter-expression": LimebbLimeQueryFilterExpression;
|
|
5795
5670
|
"limebb-lime-query-filter-group": LimebbLimeQueryFilterGroup;
|
|
5796
5671
|
"limebb-lime-query-filter-not": LimebbLimeQueryFilterNot;
|
|
5797
|
-
"limebb-lime-query-filter-or": LimebbLimeQueryFilterOr;
|
|
5798
5672
|
"limebb-lime-query-value-input": LimebbLimeQueryValueInput;
|
|
5799
5673
|
"limebb-limeobject-file-viewer": LimebbLimeobjectFileViewer;
|
|
5800
5674
|
"limebb-limetype-field": LimebbLimetypeField;
|
|
@@ -6111,22 +5985,21 @@ declare module "@stencil/core" {
|
|
|
6111
5985
|
* These placeholders reference properties of a contextual "active object"
|
|
6112
5986
|
* (e.g., `%activeObject%.company` references the company of the active object).
|
|
6113
5987
|
* @exampleComponent limebb-example-lime-query-builder-basic
|
|
5988
|
+
* @exampleComponent limebb-example-lime-query-builder-with-active-limetype
|
|
6114
5989
|
* @private
|
|
6115
5990
|
*/
|
|
6116
5991
|
"limebb-lime-query-builder": LocalJSX.LimebbLimeQueryBuilder & JSXBase.HTMLAttributes<HTMLLimebbLimeQueryBuilderElement>;
|
|
6117
5992
|
/**
|
|
6118
|
-
* Lime Query Filter
|
|
6119
|
-
*
|
|
6120
|
-
*
|
|
6121
|
-
*
|
|
6122
|
-
*
|
|
6123
|
-
*
|
|
6124
|
-
*
|
|
6125
|
-
* - An "Add another condition" button to add more expressions
|
|
6126
|
-
* Clicking the trash icon on a child expression removes it from the AND group.
|
|
5993
|
+
* Lime Query Filter Builder
|
|
5994
|
+
* Entry component for building Lime Query filter expressions.
|
|
5995
|
+
* This component wraps the expression router and adds promotion logic
|
|
5996
|
+
* for handling Add buttons and expression structure.
|
|
5997
|
+
* Unlike the expression router (which is pure routing), this component
|
|
5998
|
+
* contains business logic for promoting expressions and managing the
|
|
5999
|
+
* filter structure.
|
|
6127
6000
|
* @private
|
|
6128
6001
|
*/
|
|
6129
|
-
"limebb-lime-query-filter-
|
|
6002
|
+
"limebb-lime-query-filter-builder": LocalJSX.LimebbLimeQueryFilterBuilder & JSXBase.HTMLAttributes<HTMLLimebbLimeQueryFilterBuilderElement>;
|
|
6130
6003
|
/**
|
|
6131
6004
|
* Lime Query Filter Comparison Component
|
|
6132
6005
|
* Renders a single comparison expression with three parts:
|
|
@@ -6185,19 +6058,6 @@ declare module "@stencil/core" {
|
|
|
6185
6058
|
* @private
|
|
6186
6059
|
*/
|
|
6187
6060
|
"limebb-lime-query-filter-not": LocalJSX.LimebbLimeQueryFilterNot & JSXBase.HTMLAttributes<HTMLLimebbLimeQueryFilterNotElement>;
|
|
6188
|
-
/**
|
|
6189
|
-
* Lime Query Filter OR Component
|
|
6190
|
-
* Renders a group of filter expressions where **at least one condition must be true**.
|
|
6191
|
-
* Users can add multiple alternative expressions, and a record only needs to match
|
|
6192
|
-
* one of them to be included in the result set.
|
|
6193
|
-
* This component displays:
|
|
6194
|
-
* - A header with "Any of these conditions is true" when there are multiple conditions
|
|
6195
|
-
* - A list of child expressions (which can be comparisons or nested AND/OR/NOT groups)
|
|
6196
|
-
* - An "Add alternative" button to add more options
|
|
6197
|
-
* Clicking the trash icon on a child expression removes it from the OR group.
|
|
6198
|
-
* @private
|
|
6199
|
-
*/
|
|
6200
|
-
"limebb-lime-query-filter-or": LocalJSX.LimebbLimeQueryFilterOr & JSXBase.HTMLAttributes<HTMLLimebbLimeQueryFilterOrElement>;
|
|
6201
6061
|
/**
|
|
6202
6062
|
* Query Value Input Component
|
|
6203
6063
|
* Renders an appropriate input control based on the property type and operator.
|
package/package.json
CHANGED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-ff255a0d.js');
|
|
6
|
-
const index_esm = require('./index.esm-d785eb6e.js');
|
|
7
|
-
|
|
8
|
-
const limeQueryFilterAndCss = "@charset \"UTF-8\";.expression{display:flex;flex-direction:column;margin-bottom:1rem;gap:0;background-color:rgb(var(--contrast-100));border:1px solid rgb(var(--contrast-500));border-radius:0.75rem}.expression>ul{margin-top:0;margin-right:1rem;margin-bottom:1rem;margin-left:1rem;padding-left:1rem;list-style:disc}.expression>ul li{margin-top:1rem}.expression>ul li.add-button{list-style:none}";
|
|
9
|
-
const LimebbLimeQueryFilterAndStyle0 = limeQueryFilterAndCss;
|
|
10
|
-
|
|
11
|
-
const LimeQueryFilterAndComponent = class {
|
|
12
|
-
constructor(hostRef) {
|
|
13
|
-
index.registerInstance(this, hostRef);
|
|
14
|
-
this.expressionChange = index.createEvent(this, "expressionChange", 7);
|
|
15
|
-
this.renderChildExpression = (expression, childIndex) => (index.h("li", null, index.h("limebb-lime-query-filter-expression", { platform: this.platform, context: this.context, limetype: this.limetype, activeLimetype: this.activeLimetype, expression: expression, onExpressionChange: this.handleExpressionChange(childIndex) })));
|
|
16
|
-
this.handleAddChildExpression = () => {
|
|
17
|
-
const newOrGroup = {
|
|
18
|
-
op: index_esm.Zt.OR,
|
|
19
|
-
exp: [
|
|
20
|
-
{
|
|
21
|
-
key: '',
|
|
22
|
-
op: index_esm.Zt.EQUALS,
|
|
23
|
-
exp: '',
|
|
24
|
-
},
|
|
25
|
-
],
|
|
26
|
-
};
|
|
27
|
-
const updatedExpressionsList = [
|
|
28
|
-
...this.expression.exp,
|
|
29
|
-
newOrGroup,
|
|
30
|
-
];
|
|
31
|
-
this.expressionChange.emit({
|
|
32
|
-
op: index_esm.Zt.AND,
|
|
33
|
-
exp: updatedExpressionsList,
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
this.handleExpressionChange = (updatedChildIndex) => (event) => {
|
|
37
|
-
var _a;
|
|
38
|
-
event.stopPropagation();
|
|
39
|
-
const updatedExpression = (_a = event.detail) !== null && _a !== void 0 ? _a : undefined;
|
|
40
|
-
const expressions = [...this.expression.exp];
|
|
41
|
-
if (updatedExpression === undefined) {
|
|
42
|
-
expressions.splice(updatedChildIndex, 1);
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
expressions[updatedChildIndex] = updatedExpression;
|
|
46
|
-
}
|
|
47
|
-
if (expressions.length === 0) {
|
|
48
|
-
this.expressionChange.emit(undefined);
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
if (expressions.length === 1) {
|
|
52
|
-
this.expressionChange.emit(expressions[0]);
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
this.expressionChange.emit({
|
|
56
|
-
op: index_esm.Zt.AND,
|
|
57
|
-
exp: expressions,
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
render() {
|
|
62
|
-
let subheading = 'All of these conditions are true';
|
|
63
|
-
if (this.expression.exp.length <= 1) {
|
|
64
|
-
subheading = '';
|
|
65
|
-
}
|
|
66
|
-
return (index.h("div", { key: 'f07c53808d6be8d846f5a45223abb5c94b1a0b16', class: "expression" }, (this.label || subheading) && (index.h("limel-header", { key: '229f0d58ff15743fbb12da53ad9c593bfba801d1', heading: this.label, subheading: subheading })), index.h("ul", { key: '2600c2bee2b958036ea606141bcfcac0e277114c' }, this.expression.exp.map(this.renderChildExpression), index.h("li", { key: '6395e605ee8f454a820ac73601da89b19686187a', class: "add-button" }, this.renderAddChildExpression()))));
|
|
67
|
-
}
|
|
68
|
-
renderAddChildExpression() {
|
|
69
|
-
return (index.h("limel-button", { label: this.getAddButtonLabel(), icon: "plus_math", onClick: this.handleAddChildExpression }));
|
|
70
|
-
}
|
|
71
|
-
getAddButtonLabel() {
|
|
72
|
-
if (this.expression.exp.length === 0) {
|
|
73
|
-
return 'Add a condition';
|
|
74
|
-
}
|
|
75
|
-
return 'Add another condition';
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
LimeQueryFilterAndComponent.style = LimebbLimeQueryFilterAndStyle0;
|
|
79
|
-
|
|
80
|
-
exports.limebb_lime_query_filter_and = LimeQueryFilterAndComponent;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-ff255a0d.js');
|
|
6
|
-
const index_esm = require('./index.esm-d785eb6e.js');
|
|
7
|
-
|
|
8
|
-
const limeQueryFilterOrCss = "@charset \"UTF-8\";.expression{display:flex;flex-direction:column;margin-bottom:1rem;gap:0;background-color:rgb(var(--contrast-200));border:1px solid rgb(var(--contrast-600));border-radius:0.75rem}.expression>ul{margin-top:0;margin-right:1rem;margin-bottom:1rem;margin-left:1rem;padding-left:1rem;list-style:circle}.expression>ul li{margin-top:1rem}.expression>ul li.add-button{list-style:none;margin-top:0;text-align:right}";
|
|
9
|
-
const LimebbLimeQueryFilterOrStyle0 = limeQueryFilterOrCss;
|
|
10
|
-
|
|
11
|
-
const LimeQueryFilterOrComponent = class {
|
|
12
|
-
constructor(hostRef) {
|
|
13
|
-
index.registerInstance(this, hostRef);
|
|
14
|
-
this.expressionChange = index.createEvent(this, "expressionChange", 7);
|
|
15
|
-
this.renderChildExpression = (expression, childIndex) => {
|
|
16
|
-
const label = this.expression.exp.length === 1 ? this.label : undefined;
|
|
17
|
-
return (index.h("li", null, index.h("limebb-lime-query-filter-expression", { platform: this.platform, context: this.context, label: label, limetype: this.limetype, activeLimetype: this.activeLimetype, expression: expression, onExpressionChange: this.handleExpressionChange(childIndex) })));
|
|
18
|
-
};
|
|
19
|
-
this.handleExpressionChange = (updatedChildIndex) => (event) => {
|
|
20
|
-
var _a;
|
|
21
|
-
event.stopPropagation();
|
|
22
|
-
const updatedExpression = (_a = event.detail) !== null && _a !== void 0 ? _a : undefined;
|
|
23
|
-
const expressions = [...this.expression.exp];
|
|
24
|
-
if (updatedExpression === undefined) {
|
|
25
|
-
expressions.splice(updatedChildIndex, 1);
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
expressions[updatedChildIndex] = updatedExpression;
|
|
29
|
-
}
|
|
30
|
-
if (expressions.length === 0) {
|
|
31
|
-
this.expressionChange.emit(undefined);
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
if (expressions.length === 1) {
|
|
35
|
-
this.expressionChange.emit(expressions[0]);
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
this.expressionChange.emit({
|
|
39
|
-
op: index_esm.Zt.OR,
|
|
40
|
-
exp: expressions,
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
this.handleAddChildExpression = () => {
|
|
44
|
-
const newComparison = {
|
|
45
|
-
key: '',
|
|
46
|
-
op: index_esm.Zt.EQUALS,
|
|
47
|
-
exp: '',
|
|
48
|
-
};
|
|
49
|
-
const updatedExpressionsList = [
|
|
50
|
-
...this.expression.exp,
|
|
51
|
-
newComparison,
|
|
52
|
-
];
|
|
53
|
-
this.expressionChange.emit({
|
|
54
|
-
op: index_esm.Zt.OR,
|
|
55
|
-
exp: updatedExpressionsList,
|
|
56
|
-
});
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
render() {
|
|
60
|
-
return (index.h("div", { key: '8efd3bba832388365d89313ebc007514fd3478e0', class: "expression" }, this.expression.exp.length > 1 && (index.h("limel-header", { key: 'eb65924d2e9b7e0e4e47f769b3af76773ae98266', heading: this.label, subheading: "Any of these conditions is true" })), index.h("ul", { key: 'cc6a4c9d7532096f054e9e20d54e67d14d45a038' }, this.expression.exp.map(this.renderChildExpression), index.h("li", { key: 'ad876db1e6435657d2263351b75ae4acb3a6a234', class: "add-button" }, this.renderAddChildExpression()))));
|
|
61
|
-
}
|
|
62
|
-
renderAddChildExpression() {
|
|
63
|
-
return (index.h("limel-icon-button", { label: "Add alternative", icon: "plus_math", onClick: this.handleAddChildExpression }));
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
LimeQueryFilterOrComponent.style = LimebbLimeQueryFilterOrStyle0;
|
|
67
|
-
|
|
68
|
-
exports.limebb_lime_query_filter_or = LimeQueryFilterOrComponent;
|