@genesislcap/foundation-ui 14.247.2 → 14.248.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 +4071 -3343
- package/dist/dts/expression-builder/expression-builder.d.ts +11 -0
- package/dist/dts/expression-builder/expression-builder.d.ts.map +1 -0
- package/dist/dts/expression-builder/index.d.ts +4 -0
- package/dist/dts/expression-builder/index.d.ts.map +1 -0
- package/dist/dts/expression-builder/rule-expression-builder.d.ts +181 -0
- package/dist/dts/expression-builder/rule-expression-builder.d.ts.map +1 -0
- package/dist/dts/expression-builder/types.d.ts +104 -0
- package/dist/dts/expression-builder/types.d.ts.map +1 -0
- package/dist/dts/index.d.ts +5 -4
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/esm/expression-builder/expression-builder.js +20 -0
- package/dist/esm/expression-builder/index.js +3 -0
- package/dist/esm/expression-builder/rule-expression-builder.js +540 -0
- package/dist/esm/expression-builder/types.js +21 -0
- package/dist/esm/index.js +5 -4
- package/package.json +18 -17
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ExpressionBuilder } from '@genesislcap/expression-builder';
|
|
2
|
+
/**
|
|
3
|
+
* We don't create the foundation version of the component in the same way as the other components,
|
|
4
|
+
* they're composed from a base FAST component.
|
|
5
|
+
* The reason for this is that we want to have ExpressionBuilder as an independent and open source
|
|
6
|
+
* component, and due to this we don't want to release it as base components that someone needs to use
|
|
7
|
+
* FAST to compose.
|
|
8
|
+
*/
|
|
9
|
+
export declare class FoundationExpressionBuilder extends ExpressionBuilder {
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=expression-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expression-builder.d.ts","sourceRoot":"","sources":["../../../src/expression-builder/expression-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAoB,MAAM,iCAAiC,CAAC;AAGtF;;;;;;GAMG;AACH,qBAKa,2BAA4B,SAAQ,iBAAiB;CAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/expression-builder/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { ExpressionBuilder } from '@genesislcap/expression-builder';
|
|
2
|
+
import { ExpressionBuilderTypes, RuleExpression } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Operator names for the server expression
|
|
5
|
+
* Mapped to the RuleExpression names where possible
|
|
6
|
+
* @internal
|
|
7
|
+
**/
|
|
8
|
+
export declare const clientOperators: {
|
|
9
|
+
EQUALS: "EQUALS";
|
|
10
|
+
NOT_EQUALS: "NOT_EQUALS";
|
|
11
|
+
IS_NULL: string;
|
|
12
|
+
NOT_NULL: string;
|
|
13
|
+
IS_BLANK: string;
|
|
14
|
+
NOT_BLANK: string;
|
|
15
|
+
CONTAINS_IGNORE_CASE: string;
|
|
16
|
+
CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE: string;
|
|
17
|
+
CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE_WITH_DELIMITER: string;
|
|
18
|
+
GREATER_THAN: "GREATER_THAN";
|
|
19
|
+
GREATER_THAN_OR_EQUAL: "GREATER_THAN_OR_EQUAL";
|
|
20
|
+
LESS_THAN: "LESS_THAN";
|
|
21
|
+
LESS_THAN_OR_EQUAL: "LESS_THAN_OR_EQUAL";
|
|
22
|
+
IS_BEFORE: string;
|
|
23
|
+
IS_AFTER: string;
|
|
24
|
+
ON_OR_BEFORE: string;
|
|
25
|
+
ON_OR_AFTER: string;
|
|
26
|
+
};
|
|
27
|
+
type Operators = keyof typeof clientOperators;
|
|
28
|
+
export type ValueExpression = RuleExpression.BooleanValue | RuleExpression.NumericValue | RuleExpression.StringValue;
|
|
29
|
+
/**
|
|
30
|
+
* Convert from Expression builder to Genesis
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* Converts a client BinaryOperator to a server BinaryExpression
|
|
34
|
+
*
|
|
35
|
+
* The opposite of `fromBinaryExpression`
|
|
36
|
+
* @internal
|
|
37
|
+
**/
|
|
38
|
+
export declare function toBinaryExpression(rule: ExpressionBuilderTypes.Rule, OPERATION: RuleExpression.Operation, TYPE: ValueExpression['TYPE']): RuleExpression.Expression['BinaryExpression'] | null;
|
|
39
|
+
/**
|
|
40
|
+
* Converts a client BinaryOperator to a server BinaryExpression
|
|
41
|
+
*
|
|
42
|
+
* The opposite of `fromBinaryExpression`
|
|
43
|
+
*
|
|
44
|
+
* @privateRemarks
|
|
45
|
+
* Used in specific cases where a server operation doesn't map nicely to a client one,
|
|
46
|
+
* such as IS_NULL being a client UniraryOperation but a server BinaryExpression
|
|
47
|
+
* @internal
|
|
48
|
+
**/
|
|
49
|
+
export declare function toSetValueBinaryExpression(rule: ExpressionBuilderTypes.Rule, OPERATION: RuleExpression.Operation, RIGHT: RuleExpression.Expression['BinaryExpression']['RIGHT']): RuleExpression.Expression['BinaryExpression'] | null;
|
|
50
|
+
/**
|
|
51
|
+
* Converts a client BinaryOperator to a server MethodExpression
|
|
52
|
+
*
|
|
53
|
+
* The opposite of `fromMethodExpression`
|
|
54
|
+
*
|
|
55
|
+
* @internal
|
|
56
|
+
**/
|
|
57
|
+
export declare function toMethodExpression(rule: ExpressionBuilderTypes.Rule, METHOD: RuleExpression.MethodCall, extraParams?: RuleExpression.Expression['MethodExpression']['PARAMETERS']): RuleExpression.Expression['MethodExpression'] | null;
|
|
58
|
+
/**
|
|
59
|
+
* Converts a client field type to a server expression type
|
|
60
|
+
*
|
|
61
|
+
* @internal
|
|
62
|
+
**/
|
|
63
|
+
export declare function mapFieldTypeToRuleExpressionType(rule: ExpressionBuilderTypes.Rule): ValueExpression['TYPE'];
|
|
64
|
+
export declare const MILLIS_TO_SECONDS = 1000;
|
|
65
|
+
/**
|
|
66
|
+
* Converts a client field value to a server field value
|
|
67
|
+
*
|
|
68
|
+
* The opposite to `rebuildRuleValue`
|
|
69
|
+
*
|
|
70
|
+
* @privateRemarks
|
|
71
|
+
* `string` (+`enum`) and `boolean` types are left as they are
|
|
72
|
+
* `number` types are converted to string due to the limitation of BigDecimal values from the server
|
|
73
|
+
* `date` and `datetime-local` converted to epoch time as the server works with numbers
|
|
74
|
+
*
|
|
75
|
+
* @internal
|
|
76
|
+
**/
|
|
77
|
+
export declare function transformRuleValue(rule: ExpressionBuilderTypes.Rule): ExpressionBuilderTypes.Rule;
|
|
78
|
+
/**
|
|
79
|
+
* Converts a client operator name to a server operator name
|
|
80
|
+
*
|
|
81
|
+
* The opposite to `transformServerNameToOperatorName`
|
|
82
|
+
*
|
|
83
|
+
* @privateRemarks
|
|
84
|
+
* Most names are the same, but this handles cases where date comparison operator names are different
|
|
85
|
+
* on the display to their server name
|
|
86
|
+
*
|
|
87
|
+
* TODO: We could clean this up if we support labels/aliases on the client component
|
|
88
|
+
*
|
|
89
|
+
* @internal
|
|
90
|
+
**/
|
|
91
|
+
export declare function transformOperatorNameToServerName(op: Operators): RuleExpression.Operation;
|
|
92
|
+
/**
|
|
93
|
+
* Converts a client `Rule` into the correct server `Expression`
|
|
94
|
+
*
|
|
95
|
+
* @privateRemarks
|
|
96
|
+
* The server doesn't have a concept for a partial expression so if the user doesn't fill out all values
|
|
97
|
+
* (e.g. chooses a field but not an operator) that would be lost via this process
|
|
98
|
+
*
|
|
99
|
+
* @internal
|
|
100
|
+
**/
|
|
101
|
+
export declare function ruleToRuleExpression(ruleInput: ExpressionBuilderTypes.Rule): RuleExpression.Expression[keyof RuleExpression.Expression] | null;
|
|
102
|
+
/**
|
|
103
|
+
* Converts a client `Group` into the correct server `Expression`
|
|
104
|
+
*
|
|
105
|
+
* @internal
|
|
106
|
+
**/
|
|
107
|
+
export declare function groupToRuleExpression(group: ExpressionBuilderTypes.Group): RuleExpression.Expression['PredicateExpression'];
|
|
108
|
+
/**
|
|
109
|
+
* Convert from Genesis to Expression builder
|
|
110
|
+
*/
|
|
111
|
+
/**
|
|
112
|
+
* Converts a server operator name to a client operator name
|
|
113
|
+
*
|
|
114
|
+
* The opposite to `transformOperatorNameToServerName`
|
|
115
|
+
*
|
|
116
|
+
* @privateRemarks
|
|
117
|
+
* Most names are the same, but this handles cases where date comparison operator names are different
|
|
118
|
+
* on the display to their server name
|
|
119
|
+
*
|
|
120
|
+
* TODO: We could clean this up if we support labels/aliases on the client component
|
|
121
|
+
*
|
|
122
|
+
* @internal
|
|
123
|
+
**/
|
|
124
|
+
export declare function transformServerNameToOperatorName(op: RuleExpression.Operation): Operators;
|
|
125
|
+
/**
|
|
126
|
+
* Converts a server field value to a client field value
|
|
127
|
+
*
|
|
128
|
+
* The opposite to `transformRuleValue`
|
|
129
|
+
*
|
|
130
|
+
* @privateRemarks
|
|
131
|
+
* `string` (+`enum`) and `boolean` types are left as they are
|
|
132
|
+
* `date` and `datetime-local` are converted to the string format required for input type=[date|datetime-local]
|
|
133
|
+
* `number` types are parsed as ints or floats as required
|
|
134
|
+
*
|
|
135
|
+
* @internal
|
|
136
|
+
**/
|
|
137
|
+
export declare function rebuildRuleValue(rule: Omit<ExpressionBuilderTypes.Rule, 'value'>, rhs: RuleExpression.Expression['BinaryExpression']['RIGHT']): ExpressionBuilderTypes.Rule;
|
|
138
|
+
/**
|
|
139
|
+
* Handles operator names which have a special client name, but serialised to a normal operator on the server
|
|
140
|
+
*
|
|
141
|
+
* @privateRemarks
|
|
142
|
+
* e.g. `NOT_NULL` is a standard NOT_EQUAL BinaryExpression on the server, but a special UniraryOperation on the client
|
|
143
|
+
*
|
|
144
|
+
* @internal
|
|
145
|
+
**/
|
|
146
|
+
export declare function rebuildOperator(binExpr: RuleExpression.Expression['BinaryExpression']): ExpressionBuilderTypes.Operator;
|
|
147
|
+
/**
|
|
148
|
+
* Converts a server BinaryExpression to a client BinaryOperator
|
|
149
|
+
*
|
|
150
|
+
* The opposite of `toBinaryExpression`
|
|
151
|
+
* @internal
|
|
152
|
+
**/
|
|
153
|
+
export declare function fromBinaryExpression(fields: ExpressionBuilderTypes.Field[], binExpr: RuleExpression.Expression['BinaryExpression']): ExpressionBuilderTypes.Rule;
|
|
154
|
+
/**
|
|
155
|
+
* Converts a server MethodExpression to a client BinaryOperator
|
|
156
|
+
*
|
|
157
|
+
* The opposite of `toMethodExpression`
|
|
158
|
+
*
|
|
159
|
+
* @internal
|
|
160
|
+
**/
|
|
161
|
+
export declare function fromMethodExpression(fields: ExpressionBuilderTypes.Field[], methodExpr: RuleExpression.Expression['MethodExpression']): ExpressionBuilderTypes.Rule;
|
|
162
|
+
/**
|
|
163
|
+
* Converts recursively from a PREDICATE_EXPRESSION to client Groups and Rules
|
|
164
|
+
*
|
|
165
|
+
* @internal
|
|
166
|
+
**/
|
|
167
|
+
export declare function ruleExpressionToGroup(fields: ExpressionBuilderTypes.Field[], expr: RuleExpression.Expression['PredicateExpression']): ExpressionBuilderTypes.Group;
|
|
168
|
+
/**
|
|
169
|
+
* We don't create the foundation version of the component in the same way as the other components,
|
|
170
|
+
* they're composed from a base FAST component.
|
|
171
|
+
* The reason for this is that we want to have ExpressionBuilder as an independent and open source
|
|
172
|
+
* component, and due to this we don't want to release it as base components that someone needs to use
|
|
173
|
+
* FAST to compose.
|
|
174
|
+
*/
|
|
175
|
+
export declare class FoundationRuleExpressionBuilder extends ExpressionBuilder {
|
|
176
|
+
ruleConfig: ExpressionBuilderTypes.RuleConfig;
|
|
177
|
+
ruleConfigChanged(_: ExpressionBuilderTypes.RuleConfig, newConfig: ExpressionBuilderTypes.RuleConfig): void;
|
|
178
|
+
dispatchChangeEvent(group: ExpressionBuilderTypes.Group): void;
|
|
179
|
+
}
|
|
180
|
+
export {};
|
|
181
|
+
//# sourceMappingURL=rule-expression-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule-expression-builder.d.ts","sourceRoot":"","s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ACJ,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,sBAAsB,CAAC,KAAK,EAAE,EACtC,UAAU,EAAE,cAAc,CAAC,UAAU,CAAC,kBAAkB,CAAC,GACxD,sBAAsB,CAAC,IAAI,CAY7B;AAED;;;;IAII;AACJ,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,sBAAsB,CAAC,KAAK,EAAE,EACtC,IAAI,EAAE,cAAc,CAAC,UAAU,CAAC,qBAAqB,CAAC,GACrD,sBAAsB,CAAC,KAAK,CAa9B;AAED;;;;;;GAMG;AACH,qBAKa,+BAAgC,SAAQ,iBAAiB;IACxD,UAAU,EAAE,sBAAsB,CAAC,UAAU,CAAC;IAE1D,iBAAiB,CACf,CAAC,EAAE,sBAAsB,CAAC,UAAU,EACpC,SAAS,EAAE,sBAAsB,CAAC,UAAU;IAkBrC,mBAAmB,CAAC,KAAK,EAAE,sBAAsB,CAAC,KAAK;CAWjE"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { Types, Config } from '@genesislcap/expression-builder';
|
|
2
|
+
declare module '@genesislcap/expression-builder' {
|
|
3
|
+
namespace Types {
|
|
4
|
+
type RuleConfig = Pick<Types.Config, 'fields' | 'maxNesting'> & {
|
|
5
|
+
model?: RuleExpression.RuleExpression;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export { Types as ExpressionBuilderTypes, Config as ExpressionBuilderConfig };
|
|
10
|
+
export declare const ExpressionBuilderCore: {
|
|
11
|
+
template: import("@microsoft/fast-element").ViewTemplate<import("@genesislcap/expression-builder").ExpressionBuilder, any>;
|
|
12
|
+
styles: import("@microsoft/fast-element").ElementStyles;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Based on the RuleExpression config in Kotlin
|
|
16
|
+
*/
|
|
17
|
+
export declare namespace RuleExpression {
|
|
18
|
+
type BooleanValue = {
|
|
19
|
+
VALUE: boolean;
|
|
20
|
+
TYPE: 'BOOLEAN';
|
|
21
|
+
};
|
|
22
|
+
type Field = {
|
|
23
|
+
NAME: string;
|
|
24
|
+
TYPE: 'FIELD';
|
|
25
|
+
};
|
|
26
|
+
type NumericValue = {
|
|
27
|
+
VALUE: string;
|
|
28
|
+
TYPE: 'NUMBER';
|
|
29
|
+
};
|
|
30
|
+
type StringValue = {
|
|
31
|
+
VALUE: string;
|
|
32
|
+
TYPE: 'STRING';
|
|
33
|
+
};
|
|
34
|
+
type PlaceHolder = {
|
|
35
|
+
KEY: string;
|
|
36
|
+
TYPE: 'PLACEHOLDER';
|
|
37
|
+
};
|
|
38
|
+
type NullValue = {
|
|
39
|
+
TYPE: 'NULL';
|
|
40
|
+
};
|
|
41
|
+
type RuleExpression = {
|
|
42
|
+
CONDITIONS: Condition[];
|
|
43
|
+
};
|
|
44
|
+
type ResultExpression = {
|
|
45
|
+
ASSIGNMENTS: Assignment[];
|
|
46
|
+
};
|
|
47
|
+
type Condition = {
|
|
48
|
+
LEFT: Expression['SingleExpression'];
|
|
49
|
+
OPERATION: Operation;
|
|
50
|
+
RIGHT: Expression[keyof Expression];
|
|
51
|
+
};
|
|
52
|
+
type Assignment = {
|
|
53
|
+
FIELD: Field;
|
|
54
|
+
VALUE: Expression[keyof Expression];
|
|
55
|
+
};
|
|
56
|
+
type Expression = {
|
|
57
|
+
SingleExpression: BooleanValue | Field | NumericValue | StringValue | PlaceHolder | NullValue;
|
|
58
|
+
BinaryExpression: {
|
|
59
|
+
LEFT: Expression[keyof Expression];
|
|
60
|
+
OPERATION: Operation;
|
|
61
|
+
RIGHT: Expression[keyof Expression];
|
|
62
|
+
TYPE: 'BINARY_EXPRESSION';
|
|
63
|
+
};
|
|
64
|
+
MethodExpression: {
|
|
65
|
+
METHOD: MethodCall;
|
|
66
|
+
PARAMETERS: Expression['SingleExpression'][];
|
|
67
|
+
TYPE: 'METHOD_EXPRESSION';
|
|
68
|
+
};
|
|
69
|
+
PredicateExpression: {
|
|
70
|
+
TYPE: 'PREDICATE_EXPRESSION';
|
|
71
|
+
OPERATION: LogicalOperation;
|
|
72
|
+
CONDITIONS: Expression[keyof Expression][];
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
const methodCall: {
|
|
76
|
+
readonly CONTAINS_IGNORE_CASE: "CONTAINS_IGNORE_CASE";
|
|
77
|
+
readonly CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE: "CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE";
|
|
78
|
+
};
|
|
79
|
+
type MethodCall = keyof typeof methodCall;
|
|
80
|
+
const logicalOperations: {
|
|
81
|
+
readonly AND: "AND";
|
|
82
|
+
readonly OR: "OR";
|
|
83
|
+
};
|
|
84
|
+
const operations: {
|
|
85
|
+
readonly GREATER_THAN: "GREATER_THAN";
|
|
86
|
+
readonly LESS_THAN: "LESS_THAN";
|
|
87
|
+
readonly GREATER_THAN_OR_EQUAL: "GREATER_THAN_OR_EQUAL";
|
|
88
|
+
readonly LESS_THAN_OR_EQUAL: "LESS_THAN_OR_EQUAL";
|
|
89
|
+
readonly EQUALS: "EQUALS";
|
|
90
|
+
readonly NOT_EQUALS: "NOT_EQUALS";
|
|
91
|
+
readonly PLUS: "PLUS";
|
|
92
|
+
readonly MINUS: "MINUS";
|
|
93
|
+
readonly MULTIPLY: "MULTIPLY";
|
|
94
|
+
readonly DIVIDE: "DIVIDE";
|
|
95
|
+
readonly BITWISE_AND: "BITWISE_AND";
|
|
96
|
+
readonly BITWISE_OR: "BITWISE_OR";
|
|
97
|
+
readonly ASSIGNMENT: "ASSIGNMENT";
|
|
98
|
+
readonly AND: "AND";
|
|
99
|
+
readonly OR: "OR";
|
|
100
|
+
};
|
|
101
|
+
type LogicalOperation = keyof typeof logicalOperations;
|
|
102
|
+
type Operation = keyof typeof operations;
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/expression-builder/types.ts"],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from './badge';
|
|
14
14
|
export * from './banner';
|
|
15
|
-
export * from './breadcrumb-item';
|
|
16
15
|
export * from './breadcrumb';
|
|
16
|
+
export * from './breadcrumb-item';
|
|
17
17
|
export * from './button';
|
|
18
|
-
export * from './context';
|
|
19
18
|
export * from './calendar';
|
|
20
19
|
export * from './card';
|
|
21
20
|
export * from './categorized-multiselect';
|
|
22
21
|
export * from './checkbox';
|
|
23
22
|
export * from './combobox';
|
|
24
23
|
export * from './connection-indicator';
|
|
24
|
+
export * from './context';
|
|
25
25
|
export * from './data-grid';
|
|
26
26
|
export * from './data-grid-cell';
|
|
27
27
|
export * from './data-grid-datasource';
|
|
@@ -32,9 +32,10 @@ export * from './dialog';
|
|
|
32
32
|
export * from './disclosure';
|
|
33
33
|
export * from './divider';
|
|
34
34
|
export * from './dropdown-menu';
|
|
35
|
-
export * from './error-boundary';
|
|
36
35
|
export * from './error-banner';
|
|
36
|
+
export * from './error-boundary';
|
|
37
37
|
export * from './error-dialog';
|
|
38
|
+
export * from './expression-builder';
|
|
38
39
|
export * from './file-upload';
|
|
39
40
|
export * from './filter';
|
|
40
41
|
export * from './filter-bar';
|
|
@@ -70,8 +71,8 @@ export * from './select';
|
|
|
70
71
|
export * from './skeleton';
|
|
71
72
|
export * from './slider';
|
|
72
73
|
export * from './slider-label';
|
|
73
|
-
export * from './stacking-icons';
|
|
74
74
|
export * from './snackbar';
|
|
75
|
+
export * from './stacking-icons';
|
|
75
76
|
export * from './stepper';
|
|
76
77
|
export * from './stepper-tab';
|
|
77
78
|
export * from './stepper-tab-panel';
|
package/dist/dts/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEvF,OAAO,EAAE,cAA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AC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,SAAS,IAAI,qBAAqB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { ExpressionBuilder, template, styles } from '@genesislcap/expression-builder';
|
|
3
|
+
import { customElement } from '@microsoft/fast-element';
|
|
4
|
+
/**
|
|
5
|
+
* We don't create the foundation version of the component in the same way as the other components,
|
|
6
|
+
* they're composed from a base FAST component.
|
|
7
|
+
* The reason for this is that we want to have ExpressionBuilder as an independent and open source
|
|
8
|
+
* component, and due to this we don't want to release it as base components that someone needs to use
|
|
9
|
+
* FAST to compose.
|
|
10
|
+
*/
|
|
11
|
+
let FoundationExpressionBuilder = class FoundationExpressionBuilder extends ExpressionBuilder {
|
|
12
|
+
};
|
|
13
|
+
FoundationExpressionBuilder = __decorate([
|
|
14
|
+
customElement({
|
|
15
|
+
name: 'foundation-expression-builder',
|
|
16
|
+
styles: styles,
|
|
17
|
+
template,
|
|
18
|
+
})
|
|
19
|
+
], FoundationExpressionBuilder);
|
|
20
|
+
export { FoundationExpressionBuilder };
|