@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,121 +0,0 @@
|
|
|
1
|
-
@charset "UTF-8";
|
|
2
|
-
/**
|
|
3
|
-
* Note! This file is exported to `dist/scss/` in the published
|
|
4
|
-
* node module, for consumer projects to import.
|
|
5
|
-
* That means this file cannot import from any file that isn't
|
|
6
|
-
* also exported, keeping the same relative path.
|
|
7
|
-
*
|
|
8
|
-
* Or, just don't import anything, that works too.
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* This can be used on a trigger element that opens a dropdown menu or a popover.
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* This mixin will mask out the content that is close to
|
|
15
|
-
* the edges of a scrollable area.
|
|
16
|
-
* - If the scrollable content has `overflow-y`, use `vertically`
|
|
17
|
-
* as an argument for `$direction`.
|
|
18
|
-
- If the scrollable content has `overflow-x`, use `horizontally`
|
|
19
|
-
* as an argument for `$direction`.
|
|
20
|
-
*
|
|
21
|
-
* For the visual effect to work smoothly, we need to make sure that
|
|
22
|
-
* the size of the fade-out edge effect is the same as the
|
|
23
|
-
* internal paddings of the scrollable area. Otherwise, content of a
|
|
24
|
-
* scrollable area that does not have a padding will fade out before
|
|
25
|
-
* any scrolling has been done.
|
|
26
|
-
* This is why this mixin already adds paddings, which automatically
|
|
27
|
-
* default to the size of the fade-out effect.
|
|
28
|
-
* This size defaults to `1rem`, but to override the size use
|
|
29
|
-
* `--limel-top-edge-fade-height` & `--limel-bottom-edge-fade-height`
|
|
30
|
-
* when `vertically` argument is set, and use
|
|
31
|
-
* `--limel-left-edge-fade-width` & `--limel-right-edge-fade-width`
|
|
32
|
-
* when `horizontally` argument is set.
|
|
33
|
-
* Of course you can also programmatically increase and decrease the
|
|
34
|
-
* size of these variables for each edge, based on the amount of
|
|
35
|
-
* scrolling that has been done by the user. In this case, make sure
|
|
36
|
-
* to add a custom padding where the mixin is used, to override
|
|
37
|
-
* the paddings that are automatically added by the mixin in the
|
|
38
|
-
* compiled CSS code.
|
|
39
|
-
*/
|
|
40
|
-
/**
|
|
41
|
-
* This mixin will add an animated underline to the bottom of an `a` elements.
|
|
42
|
-
* Note that you may need to add `all: unset;` –depending on your use case–
|
|
43
|
-
* before using this mixin.
|
|
44
|
-
*/
|
|
45
|
-
/**
|
|
46
|
-
* This mixin creates a cross-browser font stack.
|
|
47
|
-
* - `sans-serif` can be used for the UI of the components.
|
|
48
|
-
* - `monospace` can be used for code.
|
|
49
|
-
*
|
|
50
|
-
* ⚠️ If we change the font stacks, we need to update
|
|
51
|
-
* 1. the consumer documentation in `README.md`, and
|
|
52
|
-
* 2. the CSS variables of `--kompendium-example-font-family`
|
|
53
|
-
* in the `<style>` tag of `index.html`.
|
|
54
|
-
*/
|
|
55
|
-
/**
|
|
56
|
-
* This mixin is a hack, using old CSS syntax
|
|
57
|
-
* to enable you to truncate a piece of text,
|
|
58
|
-
* after a certain number of lines.
|
|
59
|
-
*/
|
|
60
|
-
/**
|
|
61
|
-
* This mixin will add a chessboard background pattern,
|
|
62
|
-
* typically used to visualize transparency.
|
|
63
|
-
*/
|
|
64
|
-
/**
|
|
65
|
-
* Make a container resizable by the user.
|
|
66
|
-
* This is used in the documentations and examples
|
|
67
|
-
* of some components, to demonstrate how the component
|
|
68
|
-
* behaves in a resizable container.
|
|
69
|
-
*/
|
|
70
|
-
/**
|
|
71
|
-
* The breakpoints below are used to create responsive designs
|
|
72
|
-
* in Lime's products. Therefore, they are here to get distributed
|
|
73
|
-
* to all components in other private repos, which rely on this `mixins`
|
|
74
|
-
* file, to create consistent styles.
|
|
75
|
-
*
|
|
76
|
-
* :::important
|
|
77
|
-
* In very rare cases you should used media queries!
|
|
78
|
-
* Nowadays, there are many better ways of achieving responsive design
|
|
79
|
-
* without media queries. For example, using CSS Grid, Flexbox, and their features.
|
|
80
|
-
* :::
|
|
81
|
-
*/
|
|
82
|
-
/**
|
|
83
|
-
* Media query mixins for responsive design based on screen width.
|
|
84
|
-
* Note that these mixins do not detect the device type!
|
|
85
|
-
*/
|
|
86
|
-
/**
|
|
87
|
-
* @mixin action-bar-interactions($item-selector)
|
|
88
|
-
* This mixin applies styles for the action bar interactions.
|
|
89
|
-
* For example, it animates the height of the action bar from `0` to `auto`.
|
|
90
|
-
*
|
|
91
|
-
* :::note
|
|
92
|
-
* The consumer should set:
|
|
93
|
-
* `--limebb-promoted-action-bar-grid-template-rows: 0fr;`
|
|
94
|
-
* when the action bar is not supposed to be visible.
|
|
95
|
-
* :::
|
|
96
|
-
*
|
|
97
|
-
* @param {string} $item-selector - The consumer component's tag name for the item that displays the action bar.
|
|
98
|
-
*/
|
|
99
|
-
.expression {
|
|
100
|
-
display: flex;
|
|
101
|
-
flex-direction: column;
|
|
102
|
-
margin-bottom: 1rem;
|
|
103
|
-
gap: 0;
|
|
104
|
-
background-color: rgb(var(--contrast-100));
|
|
105
|
-
border: 1px solid rgb(var(--contrast-500));
|
|
106
|
-
border-radius: 0.75rem;
|
|
107
|
-
}
|
|
108
|
-
.expression > ul {
|
|
109
|
-
margin-top: 0;
|
|
110
|
-
margin-right: 1rem;
|
|
111
|
-
margin-bottom: 1rem;
|
|
112
|
-
margin-left: 1rem;
|
|
113
|
-
padding-left: 1rem;
|
|
114
|
-
list-style: disc;
|
|
115
|
-
}
|
|
116
|
-
.expression > ul li {
|
|
117
|
-
margin-top: 1rem;
|
|
118
|
-
}
|
|
119
|
-
.expression > ul li.add-button {
|
|
120
|
-
list-style: none;
|
|
121
|
-
}
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
@charset "UTF-8";
|
|
2
|
-
/**
|
|
3
|
-
* Note! This file is exported to `dist/scss/` in the published
|
|
4
|
-
* node module, for consumer projects to import.
|
|
5
|
-
* That means this file cannot import from any file that isn't
|
|
6
|
-
* also exported, keeping the same relative path.
|
|
7
|
-
*
|
|
8
|
-
* Or, just don't import anything, that works too.
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* This can be used on a trigger element that opens a dropdown menu or a popover.
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* This mixin will mask out the content that is close to
|
|
15
|
-
* the edges of a scrollable area.
|
|
16
|
-
* - If the scrollable content has `overflow-y`, use `vertically`
|
|
17
|
-
* as an argument for `$direction`.
|
|
18
|
-
- If the scrollable content has `overflow-x`, use `horizontally`
|
|
19
|
-
* as an argument for `$direction`.
|
|
20
|
-
*
|
|
21
|
-
* For the visual effect to work smoothly, we need to make sure that
|
|
22
|
-
* the size of the fade-out edge effect is the same as the
|
|
23
|
-
* internal paddings of the scrollable area. Otherwise, content of a
|
|
24
|
-
* scrollable area that does not have a padding will fade out before
|
|
25
|
-
* any scrolling has been done.
|
|
26
|
-
* This is why this mixin already adds paddings, which automatically
|
|
27
|
-
* default to the size of the fade-out effect.
|
|
28
|
-
* This size defaults to `1rem`, but to override the size use
|
|
29
|
-
* `--limel-top-edge-fade-height` & `--limel-bottom-edge-fade-height`
|
|
30
|
-
* when `vertically` argument is set, and use
|
|
31
|
-
* `--limel-left-edge-fade-width` & `--limel-right-edge-fade-width`
|
|
32
|
-
* when `horizontally` argument is set.
|
|
33
|
-
* Of course you can also programmatically increase and decrease the
|
|
34
|
-
* size of these variables for each edge, based on the amount of
|
|
35
|
-
* scrolling that has been done by the user. In this case, make sure
|
|
36
|
-
* to add a custom padding where the mixin is used, to override
|
|
37
|
-
* the paddings that are automatically added by the mixin in the
|
|
38
|
-
* compiled CSS code.
|
|
39
|
-
*/
|
|
40
|
-
/**
|
|
41
|
-
* This mixin will add an animated underline to the bottom of an `a` elements.
|
|
42
|
-
* Note that you may need to add `all: unset;` –depending on your use case–
|
|
43
|
-
* before using this mixin.
|
|
44
|
-
*/
|
|
45
|
-
/**
|
|
46
|
-
* This mixin creates a cross-browser font stack.
|
|
47
|
-
* - `sans-serif` can be used for the UI of the components.
|
|
48
|
-
* - `monospace` can be used for code.
|
|
49
|
-
*
|
|
50
|
-
* ⚠️ If we change the font stacks, we need to update
|
|
51
|
-
* 1. the consumer documentation in `README.md`, and
|
|
52
|
-
* 2. the CSS variables of `--kompendium-example-font-family`
|
|
53
|
-
* in the `<style>` tag of `index.html`.
|
|
54
|
-
*/
|
|
55
|
-
/**
|
|
56
|
-
* This mixin is a hack, using old CSS syntax
|
|
57
|
-
* to enable you to truncate a piece of text,
|
|
58
|
-
* after a certain number of lines.
|
|
59
|
-
*/
|
|
60
|
-
/**
|
|
61
|
-
* This mixin will add a chessboard background pattern,
|
|
62
|
-
* typically used to visualize transparency.
|
|
63
|
-
*/
|
|
64
|
-
/**
|
|
65
|
-
* Make a container resizable by the user.
|
|
66
|
-
* This is used in the documentations and examples
|
|
67
|
-
* of some components, to demonstrate how the component
|
|
68
|
-
* behaves in a resizable container.
|
|
69
|
-
*/
|
|
70
|
-
/**
|
|
71
|
-
* The breakpoints below are used to create responsive designs
|
|
72
|
-
* in Lime's products. Therefore, they are here to get distributed
|
|
73
|
-
* to all components in other private repos, which rely on this `mixins`
|
|
74
|
-
* file, to create consistent styles.
|
|
75
|
-
*
|
|
76
|
-
* :::important
|
|
77
|
-
* In very rare cases you should used media queries!
|
|
78
|
-
* Nowadays, there are many better ways of achieving responsive design
|
|
79
|
-
* without media queries. For example, using CSS Grid, Flexbox, and their features.
|
|
80
|
-
* :::
|
|
81
|
-
*/
|
|
82
|
-
/**
|
|
83
|
-
* Media query mixins for responsive design based on screen width.
|
|
84
|
-
* Note that these mixins do not detect the device type!
|
|
85
|
-
*/
|
|
86
|
-
/**
|
|
87
|
-
* @mixin action-bar-interactions($item-selector)
|
|
88
|
-
* This mixin applies styles for the action bar interactions.
|
|
89
|
-
* For example, it animates the height of the action bar from `0` to `auto`.
|
|
90
|
-
*
|
|
91
|
-
* :::note
|
|
92
|
-
* The consumer should set:
|
|
93
|
-
* `--limebb-promoted-action-bar-grid-template-rows: 0fr;`
|
|
94
|
-
* when the action bar is not supposed to be visible.
|
|
95
|
-
* :::
|
|
96
|
-
*
|
|
97
|
-
* @param {string} $item-selector - The consumer component's tag name for the item that displays the action bar.
|
|
98
|
-
*/
|
|
99
|
-
.expression {
|
|
100
|
-
display: flex;
|
|
101
|
-
flex-direction: column;
|
|
102
|
-
margin-bottom: 1rem;
|
|
103
|
-
gap: 0;
|
|
104
|
-
background-color: rgb(var(--contrast-200));
|
|
105
|
-
border: 1px solid rgb(var(--contrast-600));
|
|
106
|
-
border-radius: 0.75rem;
|
|
107
|
-
}
|
|
108
|
-
.expression > ul {
|
|
109
|
-
margin-top: 0;
|
|
110
|
-
margin-right: 1rem;
|
|
111
|
-
margin-bottom: 1rem;
|
|
112
|
-
margin-left: 1rem;
|
|
113
|
-
padding-left: 1rem;
|
|
114
|
-
list-style: circle;
|
|
115
|
-
}
|
|
116
|
-
.expression > ul li {
|
|
117
|
-
margin-top: 1rem;
|
|
118
|
-
}
|
|
119
|
-
.expression > ul li.add-button {
|
|
120
|
-
list-style: none;
|
|
121
|
-
margin-top: 0;
|
|
122
|
-
text-align: right;
|
|
123
|
-
}
|
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
import { h } from "@stencil/core";
|
|
2
|
-
import { Operator, } from "@limetech/lime-web-components";
|
|
3
|
-
/**
|
|
4
|
-
* Lime Query Filter OR Component
|
|
5
|
-
*
|
|
6
|
-
* Renders a group of filter expressions where **at least one condition must be true**.
|
|
7
|
-
* Users can add multiple alternative expressions, and a record only needs to match
|
|
8
|
-
* one of them to be included in the result set.
|
|
9
|
-
*
|
|
10
|
-
* This component displays:
|
|
11
|
-
* - A header with "Any of these conditions is true" when there are multiple conditions
|
|
12
|
-
* - A list of child expressions (which can be comparisons or nested AND/OR/NOT groups)
|
|
13
|
-
* - An "Add alternative" button to add more options
|
|
14
|
-
*
|
|
15
|
-
* Clicking the trash icon on a child expression removes it from the OR group.
|
|
16
|
-
*
|
|
17
|
-
* @private
|
|
18
|
-
*/
|
|
19
|
-
export class LimeQueryFilterOrComponent {
|
|
20
|
-
constructor() {
|
|
21
|
-
this.renderChildExpression = (expression, childIndex) => {
|
|
22
|
-
const label = this.expression.exp.length === 1 ? this.label : undefined;
|
|
23
|
-
return (h("li", null, h("limebb-lime-query-filter-expression", { platform: this.platform, context: this.context, label: label, limetype: this.limetype, activeLimetype: this.activeLimetype, expression: expression, onExpressionChange: this.handleExpressionChange(childIndex) })));
|
|
24
|
-
};
|
|
25
|
-
this.handleExpressionChange = (updatedChildIndex) => (event) => {
|
|
26
|
-
var _a;
|
|
27
|
-
event.stopPropagation();
|
|
28
|
-
const updatedExpression = (_a = event.detail) !== null && _a !== void 0 ? _a : undefined;
|
|
29
|
-
const expressions = [...this.expression.exp];
|
|
30
|
-
if (updatedExpression === undefined) {
|
|
31
|
-
expressions.splice(updatedChildIndex, 1);
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
expressions[updatedChildIndex] = updatedExpression;
|
|
35
|
-
}
|
|
36
|
-
if (expressions.length === 0) {
|
|
37
|
-
this.expressionChange.emit(undefined);
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
if (expressions.length === 1) {
|
|
41
|
-
this.expressionChange.emit(expressions[0]);
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
this.expressionChange.emit({
|
|
45
|
-
op: Operator.OR,
|
|
46
|
-
exp: expressions,
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
this.handleAddChildExpression = () => {
|
|
50
|
-
const newComparison = {
|
|
51
|
-
key: '',
|
|
52
|
-
op: Operator.EQUALS,
|
|
53
|
-
exp: '',
|
|
54
|
-
};
|
|
55
|
-
const updatedExpressionsList = [
|
|
56
|
-
...this.expression.exp,
|
|
57
|
-
newComparison,
|
|
58
|
-
];
|
|
59
|
-
this.expressionChange.emit({
|
|
60
|
-
op: Operator.OR,
|
|
61
|
-
exp: updatedExpressionsList,
|
|
62
|
-
});
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
render() {
|
|
66
|
-
return (h("div", { key: '8efd3bba832388365d89313ebc007514fd3478e0', class: "expression" }, this.expression.exp.length > 1 && (h("limel-header", { key: 'eb65924d2e9b7e0e4e47f769b3af76773ae98266', heading: this.label, subheading: "Any of these conditions is true" })), h("ul", { key: 'cc6a4c9d7532096f054e9e20d54e67d14d45a038' }, this.expression.exp.map(this.renderChildExpression), h("li", { key: 'ad876db1e6435657d2263351b75ae4acb3a6a234', class: "add-button" }, this.renderAddChildExpression()))));
|
|
67
|
-
}
|
|
68
|
-
renderAddChildExpression() {
|
|
69
|
-
return (h("limel-icon-button", { label: "Add alternative", icon: "plus_math", onClick: this.handleAddChildExpression }));
|
|
70
|
-
}
|
|
71
|
-
static get is() { return "limebb-lime-query-filter-or"; }
|
|
72
|
-
static get encapsulation() { return "shadow"; }
|
|
73
|
-
static get originalStyleUrls() {
|
|
74
|
-
return {
|
|
75
|
-
"$": ["lime-query-filter-or.scss"]
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
static get styleUrls() {
|
|
79
|
-
return {
|
|
80
|
-
"$": ["lime-query-filter-or.css"]
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
static get properties() {
|
|
84
|
-
return {
|
|
85
|
-
"platform": {
|
|
86
|
-
"type": "unknown",
|
|
87
|
-
"mutable": false,
|
|
88
|
-
"complexType": {
|
|
89
|
-
"original": "LimeWebComponentPlatform",
|
|
90
|
-
"resolved": "LimeWebComponentPlatform",
|
|
91
|
-
"references": {
|
|
92
|
-
"LimeWebComponentPlatform": {
|
|
93
|
-
"location": "import",
|
|
94
|
-
"path": "@limetech/lime-web-components",
|
|
95
|
-
"id": "node_modules::LimeWebComponentPlatform"
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
"required": false,
|
|
100
|
-
"optional": false,
|
|
101
|
-
"docs": {
|
|
102
|
-
"tags": [],
|
|
103
|
-
"text": "Platform service provider"
|
|
104
|
-
},
|
|
105
|
-
"getter": false,
|
|
106
|
-
"setter": false
|
|
107
|
-
},
|
|
108
|
-
"context": {
|
|
109
|
-
"type": "unknown",
|
|
110
|
-
"mutable": false,
|
|
111
|
-
"complexType": {
|
|
112
|
-
"original": "LimeWebComponentContext",
|
|
113
|
-
"resolved": "LimeWebComponentContext",
|
|
114
|
-
"references": {
|
|
115
|
-
"LimeWebComponentContext": {
|
|
116
|
-
"location": "import",
|
|
117
|
-
"path": "@limetech/lime-web-components",
|
|
118
|
-
"id": "node_modules::LimeWebComponentContext"
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
"required": false,
|
|
123
|
-
"optional": false,
|
|
124
|
-
"docs": {
|
|
125
|
-
"tags": [],
|
|
126
|
-
"text": "Component context"
|
|
127
|
-
},
|
|
128
|
-
"getter": false,
|
|
129
|
-
"setter": false
|
|
130
|
-
},
|
|
131
|
-
"label": {
|
|
132
|
-
"type": "string",
|
|
133
|
-
"mutable": false,
|
|
134
|
-
"complexType": {
|
|
135
|
-
"original": "string",
|
|
136
|
-
"resolved": "string",
|
|
137
|
-
"references": {}
|
|
138
|
-
},
|
|
139
|
-
"required": false,
|
|
140
|
-
"optional": false,
|
|
141
|
-
"docs": {
|
|
142
|
-
"tags": [],
|
|
143
|
-
"text": "Optional label for the OR group"
|
|
144
|
-
},
|
|
145
|
-
"getter": false,
|
|
146
|
-
"setter": false,
|
|
147
|
-
"attribute": "label",
|
|
148
|
-
"reflect": false
|
|
149
|
-
},
|
|
150
|
-
"limetype": {
|
|
151
|
-
"type": "string",
|
|
152
|
-
"mutable": false,
|
|
153
|
-
"complexType": {
|
|
154
|
-
"original": "string",
|
|
155
|
-
"resolved": "string",
|
|
156
|
-
"references": {}
|
|
157
|
-
},
|
|
158
|
-
"required": false,
|
|
159
|
-
"optional": false,
|
|
160
|
-
"docs": {
|
|
161
|
-
"tags": [],
|
|
162
|
-
"text": "The limetype being queried (e.g., \"deal\", \"company\")"
|
|
163
|
-
},
|
|
164
|
-
"getter": false,
|
|
165
|
-
"setter": false,
|
|
166
|
-
"attribute": "limetype",
|
|
167
|
-
"reflect": false
|
|
168
|
-
},
|
|
169
|
-
"activeLimetype": {
|
|
170
|
-
"type": "string",
|
|
171
|
-
"mutable": false,
|
|
172
|
-
"complexType": {
|
|
173
|
-
"original": "string",
|
|
174
|
-
"resolved": "string | undefined",
|
|
175
|
-
"references": {}
|
|
176
|
-
},
|
|
177
|
-
"required": false,
|
|
178
|
-
"optional": true,
|
|
179
|
-
"docs": {
|
|
180
|
-
"tags": [],
|
|
181
|
-
"text": "The limetype of the active object (for %activeObject% placeholders)"
|
|
182
|
-
},
|
|
183
|
-
"getter": false,
|
|
184
|
-
"setter": false,
|
|
185
|
-
"attribute": "active-limetype",
|
|
186
|
-
"reflect": false
|
|
187
|
-
},
|
|
188
|
-
"expression": {
|
|
189
|
-
"type": "unknown",
|
|
190
|
-
"mutable": false,
|
|
191
|
-
"complexType": {
|
|
192
|
-
"original": "AndOrExpression",
|
|
193
|
-
"resolved": "{ op: Operator.AND | Operator.OR; exp: Expression[]; }",
|
|
194
|
-
"references": {
|
|
195
|
-
"AndOrExpression": {
|
|
196
|
-
"location": "import",
|
|
197
|
-
"path": "@limetech/lime-web-components",
|
|
198
|
-
"id": "node_modules::AndOrExpression"
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
},
|
|
202
|
-
"required": false,
|
|
203
|
-
"optional": false,
|
|
204
|
-
"docs": {
|
|
205
|
-
"tags": [],
|
|
206
|
-
"text": "The OR expression containing child expressions"
|
|
207
|
-
},
|
|
208
|
-
"getter": false,
|
|
209
|
-
"setter": false
|
|
210
|
-
}
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
static get events() {
|
|
214
|
-
return [{
|
|
215
|
-
"method": "expressionChange",
|
|
216
|
-
"name": "expressionChange",
|
|
217
|
-
"bubbles": true,
|
|
218
|
-
"cancelable": true,
|
|
219
|
-
"composed": true,
|
|
220
|
-
"docs": {
|
|
221
|
-
"tags": [],
|
|
222
|
-
"text": "Emitted when the OR expression changes (expressions added/removed/modified)\nEmits undefined when expression should be removed\nCan emit any Expression type when unwrapping (single child)"
|
|
223
|
-
},
|
|
224
|
-
"complexType": {
|
|
225
|
-
"original": "Expression | undefined",
|
|
226
|
-
"resolved": "undefined | { key: string; op: BasicOperator; exp: ExpressionValue; } | { key: string; op: Operator.IN; exp: ExpressionValue[]; } | { op: Operator.AND | Operator.OR; exp: Expression[]; } | { op: Operator.NOT; exp: Expression; } | { type: \"filter\"; key: string; op: Operator.IN; exp: string; }",
|
|
227
|
-
"references": {
|
|
228
|
-
"Expression": {
|
|
229
|
-
"location": "import",
|
|
230
|
-
"path": "@limetech/lime-web-components",
|
|
231
|
-
"id": "node_modules::Expression"
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}];
|
|
236
|
-
}
|
|
237
|
-
}
|