@genesislcap/expression-builder 14.408.0 → 14.409.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/README.md +24 -2
- package/package.json +10 -10
- package/docs/api/expression-builder.config.base_logical_combinators.md +0 -16
- package/docs/api/expression-builder.config.base_operators.md +0 -16
- package/docs/api/expression-builder.config.logical_combinators.md +0 -16
- package/docs/api/expression-builder.config.md +0 -67
- package/docs/api/expression-builder.config.null_combinator.md +0 -18
- package/docs/api/expression-builder.expressionbuilder.config.md +0 -61
- package/docs/api/expression-builder.expressionbuilder.dispatchchangeevent.md +0 -59
- package/docs/api/expression-builder.expressionbuilder.md +0 -152
- package/docs/api/expression-builder.expressionbuilder.model.md +0 -35
- package/docs/api/expression-builder.expressionbuilder.styles.md +0 -39
- package/docs/api/expression-builder.formatdatestring.md +0 -57
- package/docs/api/expression-builder.formatdatetimestring.md +0 -57
- package/docs/api/expression-builder.md +0 -149
- package/docs/api/expression-builder.styles.md +0 -16
- package/docs/api/expression-builder.template.md +0 -16
- package/docs/api/expression-builder.types._operator.md +0 -25
- package/docs/api/expression-builder.types.binaryoperator.md +0 -20
- package/docs/api/expression-builder.types.checkboxinput.md +0 -19
- package/docs/api/expression-builder.types.combinator.md +0 -29
- package/docs/api/expression-builder.types.config.md +0 -25
- package/docs/api/expression-builder.types.customelements.md +0 -48
- package/docs/api/expression-builder.types.customstyles.md +0 -32
- package/docs/api/expression-builder.types.dateinput.md +0 -20
- package/docs/api/expression-builder.types.datetimeinput.md +0 -20
- package/docs/api/expression-builder.types.field.md +0 -24
- package/docs/api/expression-builder.types.fieldtypes.md +0 -18
- package/docs/api/expression-builder.types.group.md +0 -49
- package/docs/api/expression-builder.types.md +0 -286
- package/docs/api/expression-builder.types.numberinput.md +0 -20
- package/docs/api/expression-builder.types.operator.md +0 -18
- package/docs/api/expression-builder.types.rule.md +0 -45
- package/docs/api/expression-builder.types.selectinput.md +0 -23
- package/docs/api/expression-builder.types.styles.md +0 -25
- package/docs/api/expression-builder.types.ternararyoperator.md +0 -20
- package/docs/api/expression-builder.types.textinput.md +0 -20
- package/docs/api/expression-builder.types.uniraryoperator.md +0 -22
- package/docs/api/expression-builder.types.variadicoperator.md +0 -20
- package/docs/api/index.md +0 -30
- package/docs/api-report.md.api.md +0 -268
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/expression-builder](./expression-builder.md)
|
|
4
|
-
|
|
5
|
-
## expression-builder package
|
|
6
|
-
|
|
7
|
-
## Classes
|
|
8
|
-
|
|
9
|
-
<table><thead><tr><th>
|
|
10
|
-
|
|
11
|
-
Class
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
</th><th>
|
|
15
|
-
|
|
16
|
-
Description
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
</th></tr></thead>
|
|
20
|
-
<tbody><tr><td>
|
|
21
|
-
|
|
22
|
-
[ExpressionBuilder](./expression-builder.expressionbuilder.md)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</td><td>
|
|
26
|
-
|
|
27
|
-
**_(BETA)_** Top level component to allow the user to build expressions. It produces a generic payload which doesn't have any system by itself to evaluate or execute the built expression.
|
|
28
|
-
|
|
29
|
-
The basics required to work with this component:
|
|
30
|
-
|
|
31
|
-
[ExpressionBuilder.config](./expression-builder.expressionbuilder.config.md) property to configure and input data and models into the component.
|
|
32
|
-
|
|
33
|
-
\_Event\_ change - `Types.Group` emits the model configuration on change. If you create a child component of the expression builder where you want to use a different (e.g. domain specific) model then it will likely override then emit event and instead emit it's own model. To check the underlying `Types.Group` model check the [ExpressionBuilder.model](./expression-builder.expressionbuilder.model.md) property.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
</td></tr>
|
|
37
|
-
</tbody></table>
|
|
38
|
-
|
|
39
|
-
## Functions
|
|
40
|
-
|
|
41
|
-
<table><thead><tr><th>
|
|
42
|
-
|
|
43
|
-
Function
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
</th><th>
|
|
47
|
-
|
|
48
|
-
Description
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
</th></tr></thead>
|
|
52
|
-
<tbody><tr><td>
|
|
53
|
-
|
|
54
|
-
[formatDateString(date)](./expression-builder.formatdatestring.md)
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
</td><td>
|
|
58
|
-
|
|
59
|
-
**_(BETA)_** Gets the string representation from a `Date` which is the format a `date` input uses. `yyyy-mm-dd`<!-- -->. Uses UTC methods to ensure consistent output regardless of timezone.
|
|
60
|
-
|
|
61
|
-
Used to convert a javascript date object into the required string format expected by the expression builder.
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
</td></tr>
|
|
65
|
-
<tr><td>
|
|
66
|
-
|
|
67
|
-
[formatDateTimeString(date)](./expression-builder.formatdatetimestring.md)
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
</td><td>
|
|
71
|
-
|
|
72
|
-
**_(BETA)_** Gets the string representation from a `Date` which is the format a `datetime-local` input uses. `yyyy-mm-ddThh:mm:ss`<!-- -->. Uses UTC methods to ensure consistent output regardless of timezone.
|
|
73
|
-
|
|
74
|
-
Used to convert a javascript date object into the required string format expected by the expression builder.
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
</td></tr>
|
|
78
|
-
</tbody></table>
|
|
79
|
-
|
|
80
|
-
## Namespaces
|
|
81
|
-
|
|
82
|
-
<table><thead><tr><th>
|
|
83
|
-
|
|
84
|
-
Namespace
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
</th><th>
|
|
88
|
-
|
|
89
|
-
Description
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
</th></tr></thead>
|
|
93
|
-
<tbody><tr><td>
|
|
94
|
-
|
|
95
|
-
[Config](./expression-builder.config.md)
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
</td><td>
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
</td></tr>
|
|
102
|
-
<tr><td>
|
|
103
|
-
|
|
104
|
-
[Types](./expression-builder.types.md)
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
</td><td>
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
</td></tr>
|
|
111
|
-
</tbody></table>
|
|
112
|
-
|
|
113
|
-
## Variables
|
|
114
|
-
|
|
115
|
-
<table><thead><tr><th>
|
|
116
|
-
|
|
117
|
-
Variable
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
</th><th>
|
|
121
|
-
|
|
122
|
-
Description
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
</th></tr></thead>
|
|
126
|
-
<tbody><tr><td>
|
|
127
|
-
|
|
128
|
-
[styles](./expression-builder.styles.md)
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
</td><td>
|
|
132
|
-
|
|
133
|
-
**_(ALPHA)_** \*
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
</td></tr>
|
|
137
|
-
<tr><td>
|
|
138
|
-
|
|
139
|
-
[template](./expression-builder.template.md)
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
</td><td>
|
|
143
|
-
|
|
144
|
-
**_(ALPHA)_** \*
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
</td></tr>
|
|
148
|
-
</tbody></table>
|
|
149
|
-
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/expression-builder](./expression-builder.md) > [styles](./expression-builder.styles.md)
|
|
4
|
-
|
|
5
|
-
## styles variable
|
|
6
|
-
|
|
7
|
-
> This API is provided as an alpha 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
|
-
styles: import("@microsoft/fast-element").ElementStyles
|
|
16
|
-
```
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/expression-builder](./expression-builder.md) > [template](./expression-builder.template.md)
|
|
4
|
-
|
|
5
|
-
## template variable
|
|
6
|
-
|
|
7
|
-
> This API is provided as an alpha 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
|
-
template: import("@microsoft/fast-element").ViewTemplate<ExpressionBuilder, any>
|
|
16
|
-
```
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/expression-builder](./expression-builder.md) > [Types](./expression-builder.types.md) > [\_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 = {
|
|
16
|
-
applyTo: FieldTypes['type'][];
|
|
17
|
-
optgroup?: string | null;
|
|
18
|
-
type: string;
|
|
19
|
-
label?: string;
|
|
20
|
-
tooltip?: string;
|
|
21
|
-
valueType?: FieldTypes;
|
|
22
|
-
};
|
|
23
|
-
```
|
|
24
|
-
**References:** [FieldTypes](./expression-builder.types.fieldtypes.md)
|
|
25
|
-
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/expression-builder](./expression-builder.md) > [Types](./expression-builder.types.md) > [BinaryOperator](./expression-builder.types.binaryoperator.md)
|
|
4
|
-
|
|
5
|
-
## Types.BinaryOperator 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 one value. Example `greater_than` \*
|
|
11
|
-
|
|
12
|
-
**Signature:**
|
|
13
|
-
|
|
14
|
-
```typescript
|
|
15
|
-
export type BinaryOperator = {
|
|
16
|
-
nbInputs: 1;
|
|
17
|
-
} & _Operator;
|
|
18
|
-
```
|
|
19
|
-
**References:** [\_Operator](./expression-builder.types._operator.md)
|
|
20
|
-
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/expression-builder](./expression-builder.md) > [Types](./expression-builder.types.md) > [CheckboxInput](./expression-builder.types.checkboxinput.md)
|
|
4
|
-
|
|
5
|
-
## Types.CheckboxInput 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 boolean-type input, which has a boolean value and a checkbox. \*
|
|
11
|
-
|
|
12
|
-
**Signature:**
|
|
13
|
-
|
|
14
|
-
```typescript
|
|
15
|
-
export type CheckboxInput = {
|
|
16
|
-
input: 'checkbox';
|
|
17
|
-
type: 'boolean';
|
|
18
|
-
};
|
|
19
|
-
```
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/expression-builder](./expression-builder.md) > [Types](./expression-builder.types.md) > [Combinator](./expression-builder.types.combinator.md)
|
|
4
|
-
|
|
5
|
-
## Types.Combinator 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 Combinator = {
|
|
16
|
-
type: string;
|
|
17
|
-
maxRules: 1 | 2 | 'many';
|
|
18
|
-
invisible?: boolean;
|
|
19
|
-
label?: string;
|
|
20
|
-
description?: string;
|
|
21
|
-
allowedFields?: Field['fieldId'][];
|
|
22
|
-
allowedOperators?: Operator['type'][];
|
|
23
|
-
validator?: (group: Group) => string | null;
|
|
24
|
-
allowLiterals?: boolean;
|
|
25
|
-
forceFieldOnly?: boolean;
|
|
26
|
-
};
|
|
27
|
-
```
|
|
28
|
-
**References:** [Field](./expression-builder.types.field.md)<!-- -->, [Operator](./expression-builder.types.operator.md)<!-- -->, [Group](./expression-builder.types.group.md)
|
|
29
|
-
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/expression-builder](./expression-builder.md) > [Types](./expression-builder.types.md) > [Config](./expression-builder.types.config.md)
|
|
4
|
-
|
|
5
|
-
## Types.Config 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 Config = {
|
|
16
|
-
operators: Operator[];
|
|
17
|
-
fields: Field[];
|
|
18
|
-
combinators: Combinator[];
|
|
19
|
-
model?: Group;
|
|
20
|
-
maxNesting?: number;
|
|
21
|
-
partialRuleValidationWarning?: boolean;
|
|
22
|
-
};
|
|
23
|
-
```
|
|
24
|
-
**References:** [Operator](./expression-builder.types.operator.md)<!-- -->, [Field](./expression-builder.types.field.md)<!-- -->, [Combinator](./expression-builder.types.combinator.md)<!-- -->, [Group](./expression-builder.types.group.md)
|
|
25
|
-
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/expression-builder](./expression-builder.md) > [Types](./expression-builder.types.md) > [CustomElements](./expression-builder.types.customelements.md)
|
|
4
|
-
|
|
5
|
-
## Types.CustomElements 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
|
-
By default the expression builder uses the basic html components such as buttons and inputs. If you want to integrate your own components from a design system or otherwise you can add the tag names for your elements here. For your custom components to work they must expose the same API as the underlying HTML element they're overriding.
|
|
11
|
-
|
|
12
|
-
`checkbox`<!-- -->: Custom element tag for checkbox inputs
|
|
13
|
-
|
|
14
|
-
`text`<!-- -->: Custom element tag for text inputs
|
|
15
|
-
|
|
16
|
-
`number`<!-- -->: Custom element tag for number inputs
|
|
17
|
-
|
|
18
|
-
`date`<!-- -->: Custom element tag for date inputs
|
|
19
|
-
|
|
20
|
-
`datetimeLocal`<!-- -->: Custom element tag for datetime-local inputs
|
|
21
|
-
|
|
22
|
-
`select`<!-- -->: Custom element tag for select inputs
|
|
23
|
-
|
|
24
|
-
`option`<!-- -->: Custom element tag for option elements
|
|
25
|
-
|
|
26
|
-
`button`<!-- -->: Custom element tag for button elements
|
|
27
|
-
|
|
28
|
-
`radio`<!-- -->: Custom element tag for radio and radio group elements. When using a custom element for a radio you require a parent radio group component to semantically link the radios into a group. The parent radio group must expose the `change` event and `value` attribute.
|
|
29
|
-
|
|
30
|
-
**Signature:**
|
|
31
|
-
|
|
32
|
-
```typescript
|
|
33
|
-
export type CustomElements = {
|
|
34
|
-
checkbox?: string;
|
|
35
|
-
text?: string;
|
|
36
|
-
number?: string;
|
|
37
|
-
date?: string;
|
|
38
|
-
datetimeLocal?: string;
|
|
39
|
-
select?: string;
|
|
40
|
-
option?: string;
|
|
41
|
-
optgroup?: string;
|
|
42
|
-
button?: string;
|
|
43
|
-
radio?: {
|
|
44
|
-
input: string;
|
|
45
|
-
group: string;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
```
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/expression-builder](./expression-builder.md) > [Types](./expression-builder.types.md) > [CustomStyles](./expression-builder.types.customstyles.md)
|
|
4
|
-
|
|
5
|
-
## Types.CustomStyles 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
|
-
Optional strings for configuring css to be applied inside of each constituent element's shadow DOM. To apply styles to components which are used inside of multiple different components (such as buttons which are used in groups, rules, and values) you must ensure the styling is set in each block. If your styling isn't showing the ensure that you're using more specific css rules to override the precedence of your rule.
|
|
11
|
-
|
|
12
|
-
`rule`<!-- -->: Additional CSS for expression rule component
|
|
13
|
-
|
|
14
|
-
`value`<!-- -->: Additional CSS for rule value component
|
|
15
|
-
|
|
16
|
-
`field`<!-- -->: Additional CSS for rule field component
|
|
17
|
-
|
|
18
|
-
`operator`<!-- -->: Additional CSS for rule operator component
|
|
19
|
-
|
|
20
|
-
`group`<!-- -->: Additional CSS for expression group component
|
|
21
|
-
|
|
22
|
-
**Signature:**
|
|
23
|
-
|
|
24
|
-
```typescript
|
|
25
|
-
export type CustomStyles = {
|
|
26
|
-
rule?: string;
|
|
27
|
-
value?: string;
|
|
28
|
-
field?: string;
|
|
29
|
-
operator?: string;
|
|
30
|
-
group?: string;
|
|
31
|
-
};
|
|
32
|
-
```
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/expression-builder](./expression-builder.md) > [Types](./expression-builder.types.md) > [DateInput](./expression-builder.types.dateinput.md)
|
|
4
|
-
|
|
5
|
-
## Types.DateInput 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 date input, which has s string value and a date field input \*
|
|
11
|
-
|
|
12
|
-
**Signature:**
|
|
13
|
-
|
|
14
|
-
```typescript
|
|
15
|
-
export type DateInput = {
|
|
16
|
-
input: 'date';
|
|
17
|
-
type: 'date';
|
|
18
|
-
validation?: (x: unknown) => string | null;
|
|
19
|
-
};
|
|
20
|
-
```
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/expression-builder](./expression-builder.md) > [Types](./expression-builder.types.md) > [DateTimeInput](./expression-builder.types.datetimeinput.md)
|
|
4
|
-
|
|
5
|
-
## Types.DateTimeInput 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 datetime input, which has s string value and a datetime field input \*
|
|
11
|
-
|
|
12
|
-
**Signature:**
|
|
13
|
-
|
|
14
|
-
```typescript
|
|
15
|
-
export type DateTimeInput = {
|
|
16
|
-
input: 'datetime-local';
|
|
17
|
-
type: 'date-time';
|
|
18
|
-
validation?: (x: unknown) => string | null;
|
|
19
|
-
};
|
|
20
|
-
```
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/expression-builder](./expression-builder.md) > [Types](./expression-builder.types.md) > [Field](./expression-builder.types.field.md)
|
|
4
|
-
|
|
5
|
-
## Types.Field 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 Field = {
|
|
16
|
-
optgroup?: string | null;
|
|
17
|
-
defaultValue?: any;
|
|
18
|
-
fieldId: string;
|
|
19
|
-
label: string;
|
|
20
|
-
operators?: string[];
|
|
21
|
-
} & FieldTypes;
|
|
22
|
-
```
|
|
23
|
-
**References:** [FieldTypes](./expression-builder.types.fieldtypes.md)
|
|
24
|
-
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/expression-builder](./expression-builder.md) > [Types](./expression-builder.types.md) > [FieldTypes](./expression-builder.types.fieldtypes.md)
|
|
4
|
-
|
|
5
|
-
## Types.FieldTypes 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
|
-
Union of all input types \*
|
|
11
|
-
|
|
12
|
-
**Signature:**
|
|
13
|
-
|
|
14
|
-
```typescript
|
|
15
|
-
export type FieldTypes = TextInput | NumberInput | CheckboxInput | SelectInput | DateInput | DateTimeInput;
|
|
16
|
-
```
|
|
17
|
-
**References:** [TextInput](./expression-builder.types.textinput.md)<!-- -->, [NumberInput](./expression-builder.types.numberinput.md)<!-- -->, [CheckboxInput](./expression-builder.types.checkboxinput.md)<!-- -->, [SelectInput](./expression-builder.types.selectinput.md)<!-- -->, [DateInput](./expression-builder.types.dateinput.md)<!-- -->, [DateTimeInput](./expression-builder.types.datetimeinput.md)
|
|
18
|
-
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/expression-builder](./expression-builder.md) > [Types](./expression-builder.types.md) > [Group](./expression-builder.types.group.md)
|
|
4
|
-
|
|
5
|
-
## Types.Group 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 group forms the overall model of the expression builder, and is recursive to itself allowing for a nested tree.
|
|
11
|
-
|
|
12
|
-
**Signature:**
|
|
13
|
-
|
|
14
|
-
```typescript
|
|
15
|
-
export type Group = {
|
|
16
|
-
combinator: Combinator;
|
|
17
|
-
children: (Rule | Group)[];
|
|
18
|
-
};
|
|
19
|
-
```
|
|
20
|
-
**References:** [Combinator](./expression-builder.types.combinator.md)<!-- -->, [Rule](./expression-builder.types.rule.md)<!-- -->, [Group](./expression-builder.types.group.md)
|
|
21
|
-
|
|
22
|
-
## Example
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
RULE 1
|
|
27
|
-
FIELD : PROFILE_AGE
|
|
28
|
-
OPERATOR : GREATER_THAN
|
|
29
|
-
VALUE : 18
|
|
30
|
-
|
|
31
|
-
COMBINATOR : OR
|
|
32
|
-
|
|
33
|
-
GROUP 2
|
|
34
|
-
RULE 2
|
|
35
|
-
FIELD : PARENT_ROLE
|
|
36
|
-
OPERATOR : ONE_OF
|
|
37
|
-
VALUE : GIVES_PERMISSION
|
|
38
|
-
|
|
39
|
-
COMBINATOR : AND
|
|
40
|
-
|
|
41
|
-
RULE 3
|
|
42
|
-
FIELD : GRANTS_CHILD_ACCESS
|
|
43
|
-
OPERATOR : EQUALS
|
|
44
|
-
VALUE : true
|
|
45
|
-
|
|
46
|
-
If you're constructing a boolean expression then this rule could be used to restrict users who are 17 or younger, but
|
|
47
|
-
allowing parents who have specific rights to be able to grant access too.
|
|
48
|
-
```
|
|
49
|
-
|