@genesislcap/expression-builder 14.260.1 → 14.260.2

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.
Files changed (50) hide show
  1. package/dist/custom-elements.json +145 -139
  2. package/dist/dts/config/combinators.d.ts +14 -3
  3. package/dist/dts/config/combinators.d.ts.map +1 -1
  4. package/dist/dts/main/expression-builder.d.ts +111 -2
  5. package/dist/dts/main/expression-builder.d.ts.map +1 -1
  6. package/dist/dts/types/public.types.d.ts +206 -43
  7. package/dist/dts/types/public.types.d.ts.map +1 -1
  8. package/dist/dts/utils/formatting.d.ts +8 -4
  9. package/dist/dts/utils/formatting.d.ts.map +1 -1
  10. package/dist/esm/config/combinators.js +14 -3
  11. package/dist/esm/main/expression-builder.js +40 -2
  12. package/dist/esm/utils/formatting.js +8 -4
  13. package/dist/expression-builder.api.json +1156 -2
  14. package/dist/expression-builder.d.ts +339 -52
  15. package/docs/api/expression-builder.config.base_logical_combinators.md +16 -0
  16. package/docs/api/expression-builder.config.logical_combinators.md +16 -0
  17. package/docs/api/expression-builder.config.md +8 -0
  18. package/docs/api/expression-builder.config.null_combinator.md +18 -0
  19. package/docs/api/expression-builder.expressionbuilder.config.md +61 -0
  20. package/docs/api/expression-builder.expressionbuilder.dispatchchangeevent.md +31 -0
  21. package/docs/api/expression-builder.expressionbuilder.md +40 -0
  22. package/docs/api/expression-builder.expressionbuilder.model.md +35 -0
  23. package/docs/api/expression-builder.expressionbuilder.styles.md +39 -0
  24. package/docs/api/expression-builder.formatdatestring.md +18 -0
  25. package/docs/api/expression-builder.formatdatetimestring.md +18 -0
  26. package/docs/api/expression-builder.md +13 -0
  27. package/docs/api/expression-builder.types._operator.md +23 -0
  28. package/docs/api/expression-builder.types.binaryoperator.md +20 -0
  29. package/docs/api/expression-builder.types.checkboxinput.md +19 -0
  30. package/docs/api/expression-builder.types.combinator.md +29 -0
  31. package/docs/api/expression-builder.types.config.md +25 -0
  32. package/docs/api/expression-builder.types.customelements.md +47 -0
  33. package/docs/api/expression-builder.types.customstyles.md +32 -0
  34. package/docs/api/expression-builder.types.dateinput.md +20 -0
  35. package/docs/api/expression-builder.types.datetimeinput.md +20 -0
  36. package/docs/api/expression-builder.types.field.md +24 -0
  37. package/docs/api/expression-builder.types.fieldtypes.md +18 -0
  38. package/docs/api/expression-builder.types.group.md +49 -0
  39. package/docs/api/expression-builder.types.md +26 -0
  40. package/docs/api/expression-builder.types.numberinput.md +20 -0
  41. package/docs/api/expression-builder.types.operator.md +18 -0
  42. package/docs/api/expression-builder.types.rule.md +45 -0
  43. package/docs/api/expression-builder.types.selectinput.md +20 -0
  44. package/docs/api/expression-builder.types.styles.md +25 -0
  45. package/docs/api/expression-builder.types.ternararyoperator.md +20 -0
  46. package/docs/api/expression-builder.types.textinput.md +20 -0
  47. package/docs/api/expression-builder.types.uniraryoperator.md +22 -0
  48. package/docs/api/expression-builder.types.variadicoperator.md +20 -0
  49. package/docs/api-report.md +29 -34
  50. package/package.json +2 -2
@@ -0,0 +1,20 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/expression-builder](./expression-builder.md) &gt; [Types](./expression-builder.types.md) &gt; [NumberInput](./expression-builder.types.numberinput.md)
4
+
5
+ ## Types.NumberInput type
6
+
7
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
+ >
9
+
10
+ Configuration for a number-type input, which has a number value and a number input. \*
11
+
12
+ **Signature:**
13
+
14
+ ```typescript
15
+ export type NumberInput = {
16
+ input: 'number';
17
+ type: 'int' | 'short' | 'double' | 'long' | 'bigdecimal';
18
+ validation?: (x: unknown) => string | null;
19
+ };
20
+ ```
@@ -0,0 +1,18 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/expression-builder](./expression-builder.md) &gt; [Types](./expression-builder.types.md) &gt; [Operator](./expression-builder.types.operator.md)
4
+
5
+ ## Types.Operator type
6
+
7
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
+ >
9
+
10
+ \*
11
+
12
+ **Signature:**
13
+
14
+ ```typescript
15
+ export type Operator = UniraryOperator | BinaryOperator | TernararyOperator | VariadicOperator;
16
+ ```
17
+ **References:** [UniraryOperator](./expression-builder.types.uniraryoperator.md)<!-- -->, [BinaryOperator](./expression-builder.types.binaryoperator.md)<!-- -->, [TernararyOperator](./expression-builder.types.ternararyoperator.md)<!-- -->, [VariadicOperator](./expression-builder.types.variadicoperator.md)
18
+
@@ -0,0 +1,45 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/expression-builder](./expression-builder.md) &gt; [Types](./expression-builder.types.md) &gt; [Rule](./expression-builder.types.rule.md)
4
+
5
+ ## Types.Rule type
6
+
7
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
+ >
9
+
10
+ A rule is a single constituent element of a larger expression, and is the smallest whole part of an expression.
11
+
12
+ **Signature:**
13
+
14
+ ```typescript
15
+ export type Rule = {
16
+ field: Field | null;
17
+ } & ({
18
+ operator: null;
19
+ } | {
20
+ operator: UniraryOperator;
21
+ } | {
22
+ operator: BinaryOperator;
23
+ value: any;
24
+ } | {
25
+ operator: TernararyOperator;
26
+ value: [any, any];
27
+ } | {
28
+ operator: VariadicOperator;
29
+ value: any[];
30
+ });
31
+ ```
32
+ **References:** [Field](./expression-builder.types.field.md)<!-- -->, [UniraryOperator](./expression-builder.types.uniraryoperator.md)<!-- -->, [BinaryOperator](./expression-builder.types.binaryoperator.md)<!-- -->, [TernararyOperator](./expression-builder.types.ternararyoperator.md)<!-- -->, [VariadicOperator](./expression-builder.types.variadicoperator.md)
33
+
34
+ ## Example
35
+
36
+
37
+ ```
38
+ FIELD : PROFILE_AGE
39
+ OPERATOR : GREATER_THAN
40
+ VALUE : 18
41
+
42
+ If you're constructing a boolean expression then this rule could be used to restrict users who are 17 or younger.
43
+ ```
44
+ \*
45
+
@@ -0,0 +1,20 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/expression-builder](./expression-builder.md) &gt; [Types](./expression-builder.types.md) &gt; [SelectInput](./expression-builder.types.selectinput.md)
4
+
5
+ ## Types.SelectInput type
6
+
7
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
+ >
9
+
10
+ Configuration for an enum-type input, which as a string or number value, and uses a select input. \*
11
+
12
+ **Signature:**
13
+
14
+ ```typescript
15
+ export type SelectInput = {
16
+ input: 'select';
17
+ type: 'enum';
18
+ values: Record<string, string | number>;
19
+ };
20
+ ```
@@ -0,0 +1,25 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/expression-builder](./expression-builder.md) &gt; [Types](./expression-builder.types.md) &gt; [Styles](./expression-builder.types.styles.md)
4
+
5
+ ## Types.Styles type
6
+
7
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
+ >
9
+
10
+ Configuration items for the expression builder styles.
11
+
12
+ `customElements`<!-- -->: optional `Types.CustomElements` block for overriding the html tags used in the expression builder
13
+
14
+ `customStyles`<!-- -->: optional `Types.CustomStyles` block to configure custom css for components.
15
+
16
+ **Signature:**
17
+
18
+ ```typescript
19
+ export type Styles = {
20
+ customElements?: CustomElements;
21
+ customStyles?: CustomStyles;
22
+ };
23
+ ```
24
+ **References:** [CustomElements](./expression-builder.types.customelements.md)<!-- -->, [CustomStyles](./expression-builder.types.customstyles.md)
25
+
@@ -0,0 +1,20 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/expression-builder](./expression-builder.md) &gt; [Types](./expression-builder.types.md) &gt; [TernararyOperator](./expression-builder.types.ternararyoperator.md)
4
+
5
+ ## Types.TernararyOperator type
6
+
7
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
+ >
9
+
10
+ An operator which has two values. Example `between_inclusive` \*
11
+
12
+ **Signature:**
13
+
14
+ ```typescript
15
+ export type TernararyOperator = {
16
+ nbInputs: 2;
17
+ } & _Operator;
18
+ ```
19
+ **References:** [\_Operator](./expression-builder.types._operator.md)
20
+
@@ -0,0 +1,20 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/expression-builder](./expression-builder.md) &gt; [Types](./expression-builder.types.md) &gt; [TextInput](./expression-builder.types.textinput.md)
4
+
5
+ ## Types.TextInput type
6
+
7
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
+ >
9
+
10
+ Configuration for a text-type input, which has a string value and a text input. \*
11
+
12
+ **Signature:**
13
+
14
+ ```typescript
15
+ export type TextInput = {
16
+ type: 'string';
17
+ input: 'text';
18
+ validation?: (x: unknown) => string | null;
19
+ };
20
+ ```
@@ -0,0 +1,22 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/expression-builder](./expression-builder.md) &gt; [Types](./expression-builder.types.md) &gt; [UniraryOperator](./expression-builder.types.uniraryoperator.md)
4
+
5
+ ## Types.UniraryOperator type
6
+
7
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
+ >
9
+
10
+ An operator which doesn't have any value. Example `is_null`
11
+
12
+ \*
13
+
14
+ **Signature:**
15
+
16
+ ```typescript
17
+ export type UniraryOperator = {
18
+ nbInputs: 0;
19
+ } & _Operator;
20
+ ```
21
+ **References:** [\_Operator](./expression-builder.types._operator.md)
22
+
@@ -0,0 +1,20 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/expression-builder](./expression-builder.md) &gt; [Types](./expression-builder.types.md) &gt; [VariadicOperator](./expression-builder.types.variadicoperator.md)
4
+
5
+ ## Types.VariadicOperator type
6
+
7
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
+ >
9
+
10
+ An operator which can have any number of values where `NumVals >= 1`<!-- -->, defaulting to 1. Example `one_of`<!-- -->. \*
11
+
12
+ **Signature:**
13
+
14
+ ```typescript
15
+ export type VariadicOperator = {
16
+ nbInputs: 'many';
17
+ } & _Operator;
18
+ ```
19
+ **References:** [\_Operator](./expression-builder.types._operator.md)
20
+
@@ -8,24 +8,24 @@ import { ElementStyles } from '@microsoft/fast-element';
8
8
  import { GenesisElement } from '@genesislcap/web-core';
9
9
  import { ViewTemplate } from '@microsoft/fast-element';
10
10
 
11
- // @alpha (undocumented)
11
+ // @beta
12
12
  const BASE_LOGICAL_COMBINATORS: Combinator[];
13
13
 
14
14
  // @alpha (undocumented)
15
15
  const BASE_OPERATORS: Operator[];
16
16
 
17
- // @alpha (undocumented)
17
+ // @beta
18
18
  type BinaryOperator = {
19
19
  nbInputs: 1;
20
20
  } & _Operator;
21
21
 
22
- // @alpha (undocumented)
22
+ // @beta
23
23
  type CheckboxInput = {
24
24
  input: 'checkbox';
25
25
  type: 'boolean';
26
26
  };
27
27
 
28
- // @alpha (undocumented)
28
+ // @beta (undocumented)
29
29
  type Combinator = {
30
30
  type: string;
31
31
  maxRules: 1 | 2 | 'many';
@@ -49,7 +49,7 @@ declare namespace Config {
49
49
  }
50
50
  export { Config }
51
51
 
52
- // @alpha (undocumented)
52
+ // @beta (undocumented)
53
53
  type Config_2 = {
54
54
  operators: Operator[];
55
55
  fields: Field[];
@@ -59,7 +59,7 @@ type Config_2 = {
59
59
  partialRuleValidationWarning?: boolean;
60
60
  };
61
61
 
62
- // @alpha (undocumented)
62
+ // @beta
63
63
  type CustomElements = {
64
64
  checkbox?: string;
65
65
  text?: string;
@@ -75,7 +75,7 @@ type CustomElements = {
75
75
  };
76
76
  };
77
77
 
78
- // @alpha (undocumented)
78
+ // @beta
79
79
  type CustomStyles = {
80
80
  rule?: string;
81
81
  value?: string;
@@ -84,14 +84,14 @@ type CustomStyles = {
84
84
  group?: string;
85
85
  };
86
86
 
87
- // @alpha (undocumented)
87
+ // @beta
88
88
  type DateInput = {
89
89
  input: 'date';
90
90
  type: 'date';
91
91
  validation?: (x: unknown) => string | null;
92
92
  };
93
93
 
94
- // @alpha (undocumented)
94
+ // @beta
95
95
  type DateTimeInput = {
96
96
  input: 'datetime-local';
97
97
  type: 'date-time';
@@ -100,15 +100,14 @@ type DateTimeInput = {
100
100
 
101
101
  // Warning: (ae-forgotten-export) The symbol "MetadataProvider" needs to be exported by the entry point index.d.ts
102
102
  //
103
- // @alpha (undocumented)
103
+ // @beta
104
104
  export class ExpressionBuilder extends GenesisElement implements MetadataProvider {
105
- // (undocumented)
106
105
  config: Config_2;
107
106
  // @internal (undocumented)
108
107
  configChanged(_: Config_2, newConfig: Config_2): void;
109
- // (undocumented)
108
+ // @internal (undocumented)
110
109
  connectedCallback(): void;
111
- // (undocumented)
110
+ // @internal (undocumented)
112
111
  disconnectedCallback(): void;
113
112
  protected dispatchChangeEvent(group: Group): void;
114
113
  // @internal (undocumented)
@@ -118,57 +117,53 @@ export class ExpressionBuilder extends GenesisElement implements MetadataProvide
118
117
  // @internal (undocumented)
119
118
  getRuleId(): string;
120
119
  // Warning: (ae-forgotten-export) The symbol "ModelGroup" needs to be exported by the entry point index.d.ts
121
- //
122
- // (undocumented)
123
120
  model: ModelGroup | null;
124
121
  // @internal (undocumented)
125
122
  modelChanged(_: Config_2, newModel: ModelGroup): void;
126
- // (undocumented)
127
123
  styles?: Styles;
128
124
  }
129
125
 
130
- // @alpha (undocumented)
126
+ // @beta (undocumented)
131
127
  type Field = {
132
128
  optgroup?: string | null;
133
- data?: any;
134
129
  defaultValue?: any;
135
130
  fieldId: string;
136
131
  label: string;
137
132
  operators?: string[];
138
133
  } & FieldTypes;
139
134
 
140
- // @alpha (undocumented)
135
+ // @beta
141
136
  type FieldTypes = TextInput | NumberInput | CheckboxInput | SelectInput | DateInput | DateTimeInput;
142
137
 
143
- // @alpha
138
+ // @beta
144
139
  export const formatDateString: (date: Date) => string;
145
140
 
146
- // @alpha
141
+ // @beta
147
142
  export const formatDateTimeString: (date: Date) => string;
148
143
 
149
- // @alpha (undocumented)
144
+ // @beta
150
145
  type Group = {
151
146
  combinator: Combinator;
152
147
  children: (Rule | Group)[];
153
148
  };
154
149
 
155
- // @alpha (undocumented)
150
+ // @beta
156
151
  const LOGICAL_COMBINATORS: Combinator[];
157
152
 
158
- // @alpha (undocumented)
153
+ // @beta
159
154
  const NULL_COMBINATOR: Combinator;
160
155
 
161
- // @alpha (undocumented)
156
+ // @beta
162
157
  type NumberInput = {
163
158
  input: 'number';
164
159
  type: 'int' | 'short' | 'double' | 'long' | 'bigdecimal';
165
160
  validation?: (x: unknown) => string | null;
166
161
  };
167
162
 
168
- // @alpha (undocumented)
163
+ // @beta (undocumented)
169
164
  type Operator = UniraryOperator | BinaryOperator | TernararyOperator | VariadicOperator;
170
165
 
171
- // @alpha (undocumented)
166
+ // @beta (undocumented)
172
167
  type _Operator = {
173
168
  applyTo: FieldTypes['type'][];
174
169
  optgroup?: string | null;
@@ -176,7 +171,7 @@ type _Operator = {
176
171
  tooltip?: string;
177
172
  };
178
173
 
179
- // @alpha (undocumented)
174
+ // @beta
180
175
  type Rule = {
181
176
  field: Field | null;
182
177
  } & ({
@@ -194,14 +189,14 @@ type Rule = {
194
189
  value: any[];
195
190
  });
196
191
 
197
- // @alpha (undocumented)
192
+ // @beta
198
193
  type SelectInput = {
199
194
  input: 'select';
200
195
  type: 'enum';
201
196
  values: Record<string, string | number>;
202
197
  };
203
198
 
204
- // @alpha (undocumented)
199
+ // @beta
205
200
  type Styles = {
206
201
  customElements?: CustomElements;
207
202
  customStyles?: CustomStyles;
@@ -213,12 +208,12 @@ export const styles: ElementStyles;
213
208
  // @alpha (undocumented)
214
209
  export const template: ViewTemplate<ExpressionBuilder, any>;
215
210
 
216
- // @alpha (undocumented)
211
+ // @beta
217
212
  type TernararyOperator = {
218
213
  nbInputs: 2;
219
214
  } & _Operator;
220
215
 
221
- // @alpha (undocumented)
216
+ // @beta
222
217
  type TextInput = {
223
218
  type: 'string';
224
219
  input: 'text';
@@ -252,12 +247,12 @@ declare namespace Types {
252
247
  }
253
248
  export { Types }
254
249
 
255
- // @alpha (undocumented)
250
+ // @beta
256
251
  type UniraryOperator = {
257
252
  nbInputs: 0;
258
253
  } & _Operator;
259
254
 
260
- // @alpha (undocumented)
255
+ // @beta
261
256
  type VariadicOperator = {
262
257
  nbInputs: 'many';
263
258
  } & _Operator;
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.260.1",
4
+ "version": "14.260.2",
5
5
  "license": "SEE LICENSE IN license.txt",
6
6
  "main": "dist/esm/index.js",
7
7
  "types": "dist/expression-builder.d.ts",
@@ -59,5 +59,5 @@
59
59
  "access": "public"
60
60
  },
61
61
  "customElements": "dist/custom-elements.json",
62
- "gitHead": "440fc2e296a21758cba55081875cc67b94707596"
62
+ "gitHead": "74542c54a01f7e6bfc1902d5d26ea8475dffe0cb"
63
63
  }