@genesislcap/expression-builder 14.386.1 → 14.387.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/dist/custom-elements.json +1 -1
- package/dist/dts/types/public.types.d.ts +3 -0
- package/dist/dts/types/public.types.d.ts.map +1 -1
- package/dist/esm/main/rule-operator/rule-operator.template.js +2 -2
- package/dist/esm/main/rule-value/rule-value.template.js +1 -1
- package/dist/expression-builder.api.json +1 -1
- package/dist/expression-builder.d.ts +3 -0
- package/docs/api/expression-builder.types._operator.md +1 -0
- package/docs/api-report.md.api.md +1 -0
- package/package.json +10 -10
|
@@ -1800,7 +1800,7 @@
|
|
|
1800
1800
|
{
|
|
1801
1801
|
"kind": "variable",
|
|
1802
1802
|
"name": "template",
|
|
1803
|
-
"default": "html<RuleOperator>`\n ${(context) => {\n const selectTag = context.styles?.customElements?.select || 'select';\n const optionTag = context.styles?.customElements?.option || 'option';\n const optgroupTag = context.styles?.customElements?.optgroup || 'optgroup';\n\n return html<RuleOperator>`\n <${selectTag}\n class=\"form-select\"\n @change=${(x, c) => x.handleOperatorChange(c.event)}\n value=${(x) => x.operator?.type}\n >\n <${optionTag} value=\"\">Select an operator</${optionTag}>\n ${repeat(\n (x) => x.groupedOperators,\n html<{ optgroup: string | null; xs: Operator[] } | Operator, RuleOperator>`\n ${(groupOrOperator) => {\n if ('xs' in groupOrOperator) {\n return html<{ optgroup: string | null; xs: Operator[] }, RuleOperator>`\n <${optgroupTag} label=\"${groupOrOperator.optgroup}\">\n ${repeat(\n (x) => x.xs,\n html<Operator>`\n <${optionTag}\n value=\"${(x) => x.type}\"\n ?selected=${(x, c) => x.type === c.parentContext.parent.operator?.type}\n title=${(x) => x.tooltip}\n >\n ${(x) => x.type}\n </${optionTag}>\n `,\n )}\n </${optgroupTag}>\n `;\n } else {\n return html<Operator, RuleOperator>`\n <${optionTag}\n value=\"${(x) => x.type}\"\n ?selected=${(x, c) => c.parent.operator?.type === x.type}\n title=${(x) => x.tooltip}\n >\n ${(x) => x.type}\n </${optionTag}>\n `;\n }\n }}\n `,\n )}\n </${selectTag}>\n `;\n }}\n`"
|
|
1803
|
+
"default": "html<RuleOperator>`\n ${(context) => {\n const selectTag = context.styles?.customElements?.select || 'select';\n const optionTag = context.styles?.customElements?.option || 'option';\n const optgroupTag = context.styles?.customElements?.optgroup || 'optgroup';\n\n return html<RuleOperator>`\n <${selectTag}\n class=\"form-select\"\n @change=${(x, c) => x.handleOperatorChange(c.event)}\n value=${(x) => x.operator?.type}\n >\n <${optionTag} value=\"\">Select an operator</${optionTag}>\n ${repeat(\n (x) => x.groupedOperators,\n html<{ optgroup: string | null; xs: Operator[] } | Operator, RuleOperator>`\n ${(groupOrOperator) => {\n if ('xs' in groupOrOperator) {\n return html<{ optgroup: string | null; xs: Operator[] }, RuleOperator>`\n <${optgroupTag} label=\"${groupOrOperator.optgroup}\">\n ${repeat(\n (x) => x.xs,\n html<Operator>`\n <${optionTag}\n value=\"${(x) => x.type}\"\n ?selected=${(x, c) => x.type === c.parentContext.parent.operator?.type}\n title=${(x) => x.tooltip}\n >\n ${(x) => x.label ?? x.type}\n </${optionTag}>\n `,\n )}\n </${optgroupTag}>\n `;\n } else {\n return html<Operator, RuleOperator>`\n <${optionTag}\n value=\"${(x) => x.type}\"\n ?selected=${(x, c) => c.parent.operator?.type === x.type}\n title=${(x) => x.tooltip}\n >\n ${(x) => x.label ?? x.type}\n </${optionTag}>\n `;\n }\n }}\n `,\n )}\n </${selectTag}>\n `;\n }}\n`"
|
|
1804
1804
|
}
|
|
1805
1805
|
],
|
|
1806
1806
|
"exports": [
|
|
@@ -117,6 +117,8 @@ export type Config = {
|
|
|
117
117
|
*
|
|
118
118
|
* `type`: The name of the operator (e.g. one_of)
|
|
119
119
|
*
|
|
120
|
+
* `label`: Optional: Display label (if different from type)
|
|
121
|
+
*
|
|
120
122
|
* `tooltip`: Optional tooltip to display on mouse hover
|
|
121
123
|
*
|
|
122
124
|
* `valueType`: [EXPERIMENTAL] Optional override to change the input type for the operator (e.g. a date field could present a string input)
|
|
@@ -126,6 +128,7 @@ export type _Operator = {
|
|
|
126
128
|
applyTo: FieldTypes['type'][];
|
|
127
129
|
optgroup?: string | null;
|
|
128
130
|
type: string;
|
|
131
|
+
label?: string;
|
|
129
132
|
tooltip?: string;
|
|
130
133
|
valueType?: FieldTypes;
|
|
131
134
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.types.d.ts","sourceRoot":"","sources":["../../../src/types/public.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;;;IASI;AACJ,MAAM,MAAM,MAAM,GAAG;IACnB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B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CAAC;CACd,CACJ,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,MAAM,KAAK,GAAG;IAClB,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,EAAE,CAAC,IAAI,GAAG,KAAK,CAAC,EAAE,CAAC;CAC5B,CAAC"}
|
|
@@ -23,7 +23,7 @@ export const template = html `
|
|
|
23
23
|
?selected=${(x, c) => { var _a; return x.type === ((_a = c.parentContext.parent.operator) === null || _a === void 0 ? void 0 : _a.type); }}
|
|
24
24
|
title=${(x) => x.tooltip}
|
|
25
25
|
>
|
|
26
|
-
${(x) => x.type}
|
|
26
|
+
${(x) => { var _a; return (_a = x.label) !== null && _a !== void 0 ? _a : x.type; }}
|
|
27
27
|
</${optionTag}>
|
|
28
28
|
`)}
|
|
29
29
|
</${optgroupTag}>
|
|
@@ -36,7 +36,7 @@ export const template = html `
|
|
|
36
36
|
?selected=${(x, c) => { var _a; return ((_a = c.parent.operator) === null || _a === void 0 ? void 0 : _a.type) === x.type; }}
|
|
37
37
|
title=${(x) => x.tooltip}
|
|
38
38
|
>
|
|
39
|
-
${(x) => x.type}
|
|
39
|
+
${(x) => { var _a; return (_a = x.label) !== null && _a !== void 0 ? _a : x.type; }}
|
|
40
40
|
</${optionTag}>
|
|
41
41
|
`;
|
|
42
42
|
}
|
|
@@ -13,7 +13,7 @@ const simpleTemplate = html `
|
|
|
13
13
|
const tagName = customTag || 'input';
|
|
14
14
|
return html `
|
|
15
15
|
<${tagName}
|
|
16
|
-
|
|
16
|
+
type="${inputType}"
|
|
17
17
|
class="text-input ${(x) => classNames(['error', x.validationError])}"
|
|
18
18
|
value=${(x) => x.value}
|
|
19
19
|
@blur=${(x, c) => x.handleInputChange(c.event)}
|
|
@@ -679,7 +679,7 @@
|
|
|
679
679
|
},
|
|
680
680
|
{
|
|
681
681
|
"kind": "Content",
|
|
682
|
-
"text": "['type'][];\n optgroup?: string | null;\n type: string;\n tooltip?: string;\n valueType?: "
|
|
682
|
+
"text": "['type'][];\n optgroup?: string | null;\n type: string;\n label?: string;\n tooltip?: string;\n valueType?: "
|
|
683
683
|
},
|
|
684
684
|
{
|
|
685
685
|
"kind": "Reference",
|
|
@@ -494,6 +494,8 @@ declare type Operator = UniraryOperator | BinaryOperator | TernararyOperator | V
|
|
|
494
494
|
*
|
|
495
495
|
* `type`: The name of the operator (e.g. one_of)
|
|
496
496
|
*
|
|
497
|
+
* `label`: Optional: Display label (if different from type)
|
|
498
|
+
*
|
|
497
499
|
* `tooltip`: Optional tooltip to display on mouse hover
|
|
498
500
|
*
|
|
499
501
|
* `valueType`: [EXPERIMENTAL] Optional override to change the input type for the operator (e.g. a date field could present a string input)
|
|
@@ -503,6 +505,7 @@ declare type _Operator = {
|
|
|
503
505
|
applyTo: FieldTypes['type'][];
|
|
504
506
|
optgroup?: string | null;
|
|
505
507
|
type: string;
|
|
508
|
+
label?: string;
|
|
506
509
|
tooltip?: string;
|
|
507
510
|
valueType?: FieldTypes;
|
|
508
511
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/expression-builder",
|
|
3
3
|
"description": "Genesis Foundation Expression Builder",
|
|
4
|
-
"version": "14.
|
|
4
|
+
"version": "14.387.0",
|
|
5
5
|
"license": "SEE LICENSE IN license.txt",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
7
7
|
"types": "dist/expression-builder.d.ts",
|
|
@@ -36,16 +36,16 @@
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@genesislcap/foundation-testing": "14.
|
|
40
|
-
"@genesislcap/genx": "14.
|
|
41
|
-
"@genesislcap/rollup-builder": "14.
|
|
42
|
-
"@genesislcap/ts-builder": "14.
|
|
43
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
44
|
-
"@genesislcap/vite-builder": "14.
|
|
45
|
-
"@genesislcap/webpack-builder": "14.
|
|
39
|
+
"@genesislcap/foundation-testing": "14.387.0",
|
|
40
|
+
"@genesislcap/genx": "14.387.0",
|
|
41
|
+
"@genesislcap/rollup-builder": "14.387.0",
|
|
42
|
+
"@genesislcap/ts-builder": "14.387.0",
|
|
43
|
+
"@genesislcap/uvu-playwright-builder": "14.387.0",
|
|
44
|
+
"@genesislcap/vite-builder": "14.387.0",
|
|
45
|
+
"@genesislcap/webpack-builder": "14.387.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@genesislcap/web-core": "14.
|
|
48
|
+
"@genesislcap/web-core": "14.387.0",
|
|
49
49
|
"rfdc": "1.4.1"
|
|
50
50
|
},
|
|
51
51
|
"repository": {
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"access": "public"
|
|
58
58
|
},
|
|
59
59
|
"customElements": "dist/custom-elements.json",
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "0e0b8fa3af6755e41cbd83e993e25e4de68e4d98"
|
|
61
61
|
}
|