@pega/cosmos-react-demos 3.0.0-dev.25.0 → 3.0.0-dev.27.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/jsx/build/ExpressionBuilder/ExpressionBuilder.mocks.d.ts +51 -2
- package/jsx/build/ExpressionBuilder/ExpressionBuilder.mocks.d.ts.map +1 -1
- package/jsx/build/ExpressionBuilder/ExpressionBuilder.mocks.js +380 -47
- package/jsx/build/ExpressionBuilder/ExpressionBuilder.mocks.js.map +1 -1
- package/jsx/build/ExpressionBuilder/ExpressionBuilder.stories.d.ts +3 -1
- package/jsx/build/ExpressionBuilder/ExpressionBuilder.stories.d.ts.map +1 -1
- package/jsx/build/ExpressionBuilder/ExpressionBuilder.stories.jsx +206 -23
- package/jsx/build/ExpressionBuilder/ExpressionBuilder.stories.jsx.map +1 -1
- package/jsx/core/FieldGroup/FieldGroup.stories.d.ts +2 -0
- package/jsx/core/FieldGroup/FieldGroup.stories.d.ts.map +1 -1
- package/jsx/core/FieldGroup/FieldGroup.stories.jsx +12 -4
- package/jsx/core/FieldGroup/FieldGroup.stories.jsx.map +1 -1
- package/jsx/core/Link/Link.stories.d.ts.map +1 -1
- package/jsx/core/Link/Link.stories.jsx +2 -1
- package/jsx/core/Link/Link.stories.jsx.map +1 -1
- package/jsx/core/ListToolbar/ListToolbar.stories.d.ts +2 -1
- package/jsx/core/ListToolbar/ListToolbar.stories.d.ts.map +1 -1
- package/jsx/core/ListToolbar/ListToolbar.stories.jsx +9 -5
- package/jsx/core/ListToolbar/ListToolbar.stories.jsx.map +1 -1
- package/jsx/core/Modal/Modal.stories.d.ts +10 -1
- package/jsx/core/Modal/Modal.stories.d.ts.map +1 -1
- package/jsx/core/Modal/Modal.stories.jsx +33 -6
- package/jsx/core/Modal/Modal.stories.jsx.map +1 -1
- package/jsx/core/SkipLinks/SkipLinks.stories.d.ts +6 -0
- package/jsx/core/SkipLinks/SkipLinks.stories.d.ts.map +1 -0
- package/jsx/core/SkipLinks/SkipLinks.stories.jsx +29 -0
- package/jsx/core/SkipLinks/SkipLinks.stories.jsx.map +1 -0
- package/jsx/core/SkipLinks/SkipLinks.styles.d.ts +2 -0
- package/jsx/core/SkipLinks/SkipLinks.styles.d.ts.map +1 -0
- package/jsx/core/SkipLinks/SkipLinks.styles.js +16 -0
- package/jsx/core/SkipLinks/SkipLinks.styles.js.map +1 -0
- package/jsx/core/Tree/Tree.stories.d.ts.map +1 -1
- package/jsx/core/Tree/Tree.stories.jsx +14 -0
- package/jsx/core/Tree/Tree.stories.jsx.map +1 -1
- package/jsx/cs/TaskManager/TaskManager.stories.d.ts.map +1 -1
- package/jsx/cs/TaskManager/TaskManager.stories.jsx +17 -10
- package/jsx/cs/TaskManager/TaskManager.stories.jsx.map +1 -1
- package/jsx/social/Chat/Chat.mocks.d.ts +14 -1
- package/jsx/social/Chat/Chat.mocks.d.ts.map +1 -1
- package/jsx/social/Chat/Chat.mocks.js +5 -5
- package/jsx/social/Chat/Chat.mocks.js.map +1 -1
- package/jsx/social/Chat/Chat.stories.d.ts.map +1 -1
- package/jsx/social/Chat/Chat.stories.jsx +87 -7
- package/jsx/social/Chat/Chat.stories.jsx.map +1 -1
- package/jsx/social/Email/Email.mocks.d.ts +10 -1
- package/jsx/social/Email/Email.mocks.d.ts.map +1 -1
- package/jsx/social/Email/Email.mocks.jsx +12 -15
- package/jsx/social/Email/Email.mocks.jsx.map +1 -1
- package/jsx/social/Email/Email.stories.d.ts +15 -1
- package/jsx/social/Email/Email.stories.d.ts.map +1 -1
- package/jsx/social/Email/Email.stories.jsx +279 -108
- package/jsx/social/Email/Email.stories.jsx.map +1 -1
- package/jsx/tools/Clipboard/Clipboard.mocks.d.ts +2 -2
- package/jsx/tools/Clipboard/Clipboard.mocks.d.ts.map +1 -1
- package/jsx/tools/Clipboard/Clipboard.mocks.jsx +42 -43
- package/jsx/tools/Clipboard/Clipboard.mocks.jsx.map +1 -1
- package/jsx/tools/Clipboard/Clipboard.stories.d.ts.map +1 -1
- package/jsx/tools/Clipboard/Clipboard.stories.jsx +32 -31
- package/jsx/tools/Clipboard/Clipboard.stories.jsx.map +1 -1
- package/jsx/work/Details/Details.stories.d.ts.map +1 -1
- package/jsx/work/Details/Details.stories.jsx +7 -0
- package/jsx/work/Details/Details.stories.jsx.map +1 -1
- package/jsx/work/SearchResults/SearchResults.mocks.d.ts +6 -0
- package/jsx/work/SearchResults/SearchResults.mocks.d.ts.map +1 -1
- package/jsx/work/SearchResults/SearchResults.mocks.jsx +39 -38
- package/jsx/work/SearchResults/SearchResults.mocks.jsx.map +1 -1
- package/jsx/work/SearchResults/SearchResults.stories.d.ts.map +1 -1
- package/jsx/work/SearchResults/SearchResults.stories.jsx +71 -43
- package/jsx/work/SearchResults/SearchResults.stories.jsx.map +1 -1
- package/lib/build/ExpressionBuilder/ExpressionBuilder.mocks.d.ts +51 -2
- package/lib/build/ExpressionBuilder/ExpressionBuilder.mocks.d.ts.map +1 -1
- package/lib/build/ExpressionBuilder/ExpressionBuilder.mocks.js +380 -47
- package/lib/build/ExpressionBuilder/ExpressionBuilder.mocks.js.map +1 -1
- package/lib/build/ExpressionBuilder/ExpressionBuilder.stories.d.ts +3 -1
- package/lib/build/ExpressionBuilder/ExpressionBuilder.stories.d.ts.map +1 -1
- package/lib/build/ExpressionBuilder/ExpressionBuilder.stories.js +215 -26
- package/lib/build/ExpressionBuilder/ExpressionBuilder.stories.js.map +1 -1
- package/lib/core/FieldGroup/FieldGroup.stories.d.ts +2 -0
- package/lib/core/FieldGroup/FieldGroup.stories.d.ts.map +1 -1
- package/lib/core/FieldGroup/FieldGroup.stories.js +11 -3
- package/lib/core/FieldGroup/FieldGroup.stories.js.map +1 -1
- package/lib/core/Link/Link.stories.d.ts.map +1 -1
- package/lib/core/Link/Link.stories.js +2 -1
- package/lib/core/Link/Link.stories.js.map +1 -1
- package/lib/core/ListToolbar/ListToolbar.stories.d.ts +2 -1
- package/lib/core/ListToolbar/ListToolbar.stories.d.ts.map +1 -1
- package/lib/core/ListToolbar/ListToolbar.stories.js +9 -5
- package/lib/core/ListToolbar/ListToolbar.stories.js.map +1 -1
- package/lib/core/Modal/Modal.stories.d.ts +10 -1
- package/lib/core/Modal/Modal.stories.d.ts.map +1 -1
- package/lib/core/Modal/Modal.stories.js +33 -6
- package/lib/core/Modal/Modal.stories.js.map +1 -1
- package/lib/core/SkipLinks/SkipLinks.stories.d.ts +6 -0
- package/lib/core/SkipLinks/SkipLinks.stories.d.ts.map +1 -0
- package/lib/core/SkipLinks/SkipLinks.stories.js +28 -0
- package/lib/core/SkipLinks/SkipLinks.stories.js.map +1 -0
- package/lib/core/SkipLinks/SkipLinks.styles.d.ts +2 -0
- package/lib/core/SkipLinks/SkipLinks.styles.d.ts.map +1 -0
- package/lib/core/SkipLinks/SkipLinks.styles.js +16 -0
- package/lib/core/SkipLinks/SkipLinks.styles.js.map +1 -0
- package/lib/core/Tree/Tree.stories.d.ts.map +1 -1
- package/lib/core/Tree/Tree.stories.js +16 -0
- package/lib/core/Tree/Tree.stories.js.map +1 -1
- package/lib/cs/TaskManager/TaskManager.stories.d.ts.map +1 -1
- package/lib/cs/TaskManager/TaskManager.stories.js +17 -10
- package/lib/cs/TaskManager/TaskManager.stories.js.map +1 -1
- package/lib/social/Chat/Chat.mocks.d.ts +14 -1
- package/lib/social/Chat/Chat.mocks.d.ts.map +1 -1
- package/lib/social/Chat/Chat.mocks.js +5 -5
- package/lib/social/Chat/Chat.mocks.js.map +1 -1
- package/lib/social/Chat/Chat.stories.d.ts.map +1 -1
- package/lib/social/Chat/Chat.stories.js +68 -6
- package/lib/social/Chat/Chat.stories.js.map +1 -1
- package/lib/social/Email/Email.mocks.d.ts +10 -1
- package/lib/social/Email/Email.mocks.d.ts.map +1 -1
- package/lib/social/Email/Email.mocks.js +12 -15
- package/lib/social/Email/Email.mocks.js.map +1 -1
- package/lib/social/Email/Email.stories.d.ts +15 -1
- package/lib/social/Email/Email.stories.d.ts.map +1 -1
- package/lib/social/Email/Email.stories.js +246 -85
- package/lib/social/Email/Email.stories.js.map +1 -1
- package/lib/tools/Clipboard/Clipboard.mocks.d.ts +2 -2
- package/lib/tools/Clipboard/Clipboard.mocks.d.ts.map +1 -1
- package/lib/tools/Clipboard/Clipboard.mocks.js +35 -40
- package/lib/tools/Clipboard/Clipboard.mocks.js.map +1 -1
- package/lib/tools/Clipboard/Clipboard.stories.d.ts.map +1 -1
- package/lib/tools/Clipboard/Clipboard.stories.js +40 -31
- package/lib/tools/Clipboard/Clipboard.stories.js.map +1 -1
- package/lib/work/Details/Details.stories.d.ts.map +1 -1
- package/lib/work/Details/Details.stories.js +1 -1
- package/lib/work/Details/Details.stories.js.map +1 -1
- package/lib/work/SearchResults/SearchResults.mocks.d.ts +6 -0
- package/lib/work/SearchResults/SearchResults.mocks.d.ts.map +1 -1
- package/lib/work/SearchResults/SearchResults.mocks.js +39 -38
- package/lib/work/SearchResults/SearchResults.mocks.js.map +1 -1
- package/lib/work/SearchResults/SearchResults.stories.d.ts.map +1 -1
- package/lib/work/SearchResults/SearchResults.stories.js +71 -43
- package/lib/work/SearchResults/SearchResults.stories.js.map +1 -1
- package/package.json +9 -9
|
@@ -1,11 +1,60 @@
|
|
|
1
1
|
import { MenuProps } from '@pega/cosmos-react-core';
|
|
2
2
|
export declare const errors = "Error message 1. Some unrealistic error message. Server unreachable. Check your network connection and try again";
|
|
3
|
-
export declare const items: {
|
|
3
|
+
export declare const items: ({
|
|
4
4
|
id: string;
|
|
5
5
|
primary: string;
|
|
6
6
|
type: string;
|
|
7
7
|
expression: string;
|
|
8
|
-
|
|
8
|
+
details: {
|
|
9
|
+
primary: {
|
|
10
|
+
field: string;
|
|
11
|
+
value: string;
|
|
12
|
+
}[];
|
|
13
|
+
output: {
|
|
14
|
+
field: string;
|
|
15
|
+
value: string;
|
|
16
|
+
}[];
|
|
17
|
+
input: {
|
|
18
|
+
id: string;
|
|
19
|
+
field: string;
|
|
20
|
+
type: string;
|
|
21
|
+
}[];
|
|
22
|
+
};
|
|
23
|
+
} | {
|
|
24
|
+
id: string;
|
|
25
|
+
primary: string;
|
|
26
|
+
type: string;
|
|
27
|
+
expression: string;
|
|
28
|
+
details: {
|
|
29
|
+
primary: {
|
|
30
|
+
field: string;
|
|
31
|
+
value: string;
|
|
32
|
+
}[];
|
|
33
|
+
output?: undefined;
|
|
34
|
+
input?: undefined;
|
|
35
|
+
};
|
|
36
|
+
} | {
|
|
37
|
+
id: string;
|
|
38
|
+
primary: string;
|
|
39
|
+
type: string;
|
|
40
|
+
expression: string;
|
|
41
|
+
details: {
|
|
42
|
+
primary: {
|
|
43
|
+
field: string;
|
|
44
|
+
value: string;
|
|
45
|
+
}[];
|
|
46
|
+
output: {
|
|
47
|
+
field: string;
|
|
48
|
+
value: string;
|
|
49
|
+
}[];
|
|
50
|
+
input?: undefined;
|
|
51
|
+
};
|
|
52
|
+
})[];
|
|
9
53
|
export declare const filterCategories: MenuProps['items'];
|
|
10
54
|
export declare const StyledExpressionBuilderDemo: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
55
|
+
export declare const primaryDetails: {
|
|
56
|
+
id: string;
|
|
57
|
+
name: string;
|
|
58
|
+
value: string;
|
|
59
|
+
}[];
|
|
11
60
|
//# sourceMappingURL=ExpressionBuilder.mocks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpressionBuilder.mocks.d.ts","sourceRoot":"","sources":["../../../src/build/ExpressionBuilder/ExpressionBuilder.mocks.ts"],"names":[],"mappings":"AAIA,OAAO,EAAa,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAE/D,eAAO,MAAM,MAAM,qHACiG,CAAC;AAErH,eAAO,MAAM,KAAK
|
|
1
|
+
{"version":3,"file":"ExpressionBuilder.mocks.d.ts","sourceRoot":"","sources":["../../../src/build/ExpressionBuilder/ExpressionBuilder.mocks.ts"],"names":[],"mappings":"AAIA,OAAO,EAAa,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAE/D,eAAO,MAAM,MAAM,qHACiG,CAAC;AAErH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAuZjB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,SAAS,CAAC,OAAO,CA+B/C,CAAC;AAEF,eAAO,MAAM,2BAA2B,yGAMtC,CAAC;AAEH,eAAO,MAAM,cAAc;;;;GAgB1B,CAAC"}
|
|
@@ -4,93 +4,409 @@ export const errors = 'Error message 1. Some unrealistic error message. Server u
|
|
|
4
4
|
export const items = [
|
|
5
5
|
{
|
|
6
6
|
id: createUID(),
|
|
7
|
-
primary: '
|
|
7
|
+
primary: 'Validate loan value',
|
|
8
8
|
type: 'Decision',
|
|
9
|
-
expression: '
|
|
9
|
+
expression: 'validateLoanValue()',
|
|
10
|
+
details: {
|
|
11
|
+
primary: [
|
|
12
|
+
{
|
|
13
|
+
field: 'Description',
|
|
14
|
+
value: 'Function to validate loan value'
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
field: 'Scope',
|
|
18
|
+
value: 'CCDBankLoan'
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
field: 'Namespace',
|
|
22
|
+
value: 'px'
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
output: [
|
|
26
|
+
{
|
|
27
|
+
field: 'isValid',
|
|
28
|
+
value: 'Boolean'
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
input: [
|
|
32
|
+
{
|
|
33
|
+
id: 'accountNumber',
|
|
34
|
+
field: 'Account number',
|
|
35
|
+
type: 'text'
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: 'term',
|
|
39
|
+
field: 'Term in years',
|
|
40
|
+
type: 'number'
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: 'accountType',
|
|
44
|
+
field: 'Account type',
|
|
45
|
+
type: 'text'
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
10
49
|
},
|
|
11
50
|
{
|
|
12
51
|
id: createUID(),
|
|
13
|
-
primary: 'Loan amount under
|
|
52
|
+
primary: 'Loan amount under 100k',
|
|
14
53
|
type: 'When',
|
|
15
|
-
expression: '
|
|
54
|
+
expression: 'isLoanAmountUnder100k()',
|
|
55
|
+
details: {
|
|
56
|
+
primary: [
|
|
57
|
+
{
|
|
58
|
+
field: 'Scope',
|
|
59
|
+
value: 'CCDBankLoan'
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
field: 'Namespace',
|
|
63
|
+
value: 'px'
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
output: [
|
|
67
|
+
{
|
|
68
|
+
field: 'isUnder100k',
|
|
69
|
+
value: 'Boolean'
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
input: [
|
|
73
|
+
{
|
|
74
|
+
id: 'accountNumber',
|
|
75
|
+
field: 'Account number',
|
|
76
|
+
type: 'text'
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
}
|
|
16
80
|
},
|
|
17
81
|
{
|
|
18
82
|
id: createUID(),
|
|
19
83
|
primary: 'Loan number',
|
|
20
84
|
type: 'Field',
|
|
21
|
-
expression: '.
|
|
85
|
+
expression: '.loanNumber',
|
|
86
|
+
details: {
|
|
87
|
+
primary: [
|
|
88
|
+
{
|
|
89
|
+
field: 'Description',
|
|
90
|
+
value: 'Loan account number of current customer'
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
field: 'Scope',
|
|
94
|
+
value: 'CCDBankLoan'
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
field: 'Namespace',
|
|
98
|
+
value: 'px'
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
|
22
102
|
},
|
|
23
103
|
{
|
|
24
104
|
id: createUID(),
|
|
25
|
-
primary: '
|
|
26
|
-
type: '
|
|
27
|
-
expression: '
|
|
105
|
+
primary: 'Customer name',
|
|
106
|
+
type: 'Field',
|
|
107
|
+
expression: '.customerName',
|
|
108
|
+
details: {
|
|
109
|
+
primary: [
|
|
110
|
+
{
|
|
111
|
+
field: 'Description',
|
|
112
|
+
value: 'Fullname of current customer'
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
field: 'Scope',
|
|
116
|
+
value: 'CCDBankLoan'
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
field: 'Namespace',
|
|
120
|
+
value: 'px'
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
}
|
|
28
124
|
},
|
|
29
125
|
{
|
|
30
126
|
id: createUID(),
|
|
31
|
-
primary: '
|
|
127
|
+
primary: 'Max',
|
|
32
128
|
type: 'Function',
|
|
33
|
-
expression: '
|
|
129
|
+
expression: 'max()',
|
|
130
|
+
details: {
|
|
131
|
+
primary: [
|
|
132
|
+
{
|
|
133
|
+
field: 'Description',
|
|
134
|
+
value: 'Returns max of two numbers'
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
field: 'Scope',
|
|
138
|
+
value: 'base'
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
field: 'Namespace',
|
|
142
|
+
value: 'py'
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
output: [
|
|
146
|
+
{
|
|
147
|
+
field: 'max',
|
|
148
|
+
value: 'Number'
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
input: [
|
|
152
|
+
{
|
|
153
|
+
id: 'param1',
|
|
154
|
+
field: 'Param 1',
|
|
155
|
+
type: 'number'
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
id: 'param2',
|
|
159
|
+
field: 'Param 2',
|
|
160
|
+
type: 'number'
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
}
|
|
34
164
|
},
|
|
35
165
|
{
|
|
36
166
|
id: createUID(),
|
|
37
|
-
primary: '
|
|
38
|
-
type: '
|
|
39
|
-
expression: '
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
167
|
+
primary: 'Min',
|
|
168
|
+
type: 'Function',
|
|
169
|
+
expression: 'min()',
|
|
170
|
+
details: {
|
|
171
|
+
primary: [
|
|
172
|
+
{
|
|
173
|
+
field: 'Description',
|
|
174
|
+
value: 'Return min of two numbers'
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
field: 'Scope',
|
|
178
|
+
value: 'base'
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
field: 'Namespace',
|
|
182
|
+
value: 'py'
|
|
183
|
+
}
|
|
184
|
+
],
|
|
185
|
+
output: [
|
|
186
|
+
{
|
|
187
|
+
field: 'min',
|
|
188
|
+
value: 'Number'
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
input: [
|
|
192
|
+
{
|
|
193
|
+
id: 'param1',
|
|
194
|
+
field: 'Param 1',
|
|
195
|
+
type: 'number'
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
id: 'param2',
|
|
199
|
+
field: 'Param 2',
|
|
200
|
+
type: 'number'
|
|
201
|
+
}
|
|
202
|
+
]
|
|
203
|
+
}
|
|
46
204
|
},
|
|
47
205
|
{
|
|
48
206
|
id: createUID(),
|
|
49
|
-
primary: '
|
|
50
|
-
type: '
|
|
51
|
-
expression: '
|
|
207
|
+
primary: 'Sum',
|
|
208
|
+
type: 'Function',
|
|
209
|
+
expression: 'sum()',
|
|
210
|
+
details: {
|
|
211
|
+
primary: [
|
|
212
|
+
{
|
|
213
|
+
field: 'Description',
|
|
214
|
+
value: 'Return sum of two numbers'
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
field: 'Scope',
|
|
218
|
+
value: 'base'
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
field: 'Namespace',
|
|
222
|
+
value: 'py'
|
|
223
|
+
}
|
|
224
|
+
],
|
|
225
|
+
output: [
|
|
226
|
+
{
|
|
227
|
+
field: 'sum',
|
|
228
|
+
value: 'Number'
|
|
229
|
+
}
|
|
230
|
+
],
|
|
231
|
+
input: [
|
|
232
|
+
{
|
|
233
|
+
id: 'param1',
|
|
234
|
+
field: 'Param 1',
|
|
235
|
+
type: 'number'
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
id: 'param2',
|
|
239
|
+
field: 'Param 2',
|
|
240
|
+
type: 'number'
|
|
241
|
+
}
|
|
242
|
+
]
|
|
243
|
+
}
|
|
52
244
|
},
|
|
53
245
|
{
|
|
54
246
|
id: createUID(),
|
|
55
|
-
primary: '
|
|
56
|
-
type: '
|
|
57
|
-
expression: '
|
|
247
|
+
primary: 'Absolute',
|
|
248
|
+
type: 'Function',
|
|
249
|
+
expression: 'abs()',
|
|
250
|
+
details: {
|
|
251
|
+
primary: [
|
|
252
|
+
{
|
|
253
|
+
field: 'Description',
|
|
254
|
+
value: 'Return absolute value of a number'
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
field: 'Scope',
|
|
258
|
+
value: 'base'
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
field: 'Namespace',
|
|
262
|
+
value: 'py'
|
|
263
|
+
}
|
|
264
|
+
],
|
|
265
|
+
output: [
|
|
266
|
+
{
|
|
267
|
+
field: 'abs',
|
|
268
|
+
value: 'Number'
|
|
269
|
+
}
|
|
270
|
+
],
|
|
271
|
+
input: [
|
|
272
|
+
{
|
|
273
|
+
id: 'param1',
|
|
274
|
+
field: 'Param 1',
|
|
275
|
+
type: 'number'
|
|
276
|
+
}
|
|
277
|
+
]
|
|
278
|
+
}
|
|
58
279
|
},
|
|
59
280
|
{
|
|
60
281
|
id: createUID(),
|
|
61
|
-
primary: '
|
|
282
|
+
primary: 'Square root',
|
|
62
283
|
type: 'Function',
|
|
63
|
-
expression: '
|
|
284
|
+
expression: 'sqrt()',
|
|
285
|
+
details: {
|
|
286
|
+
primary: [
|
|
287
|
+
{
|
|
288
|
+
field: 'Description',
|
|
289
|
+
value: 'Return square root of a number'
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
field: 'Scope',
|
|
293
|
+
value: 'base'
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
field: 'Namespace',
|
|
297
|
+
value: 'py'
|
|
298
|
+
}
|
|
299
|
+
],
|
|
300
|
+
output: [
|
|
301
|
+
{
|
|
302
|
+
field: 'squareRoot',
|
|
303
|
+
value: 'Number'
|
|
304
|
+
}
|
|
305
|
+
],
|
|
306
|
+
input: [
|
|
307
|
+
{
|
|
308
|
+
id: 'param1',
|
|
309
|
+
field: 'Param 1',
|
|
310
|
+
type: 'number'
|
|
311
|
+
}
|
|
312
|
+
]
|
|
313
|
+
}
|
|
64
314
|
},
|
|
65
315
|
{
|
|
66
316
|
id: createUID(),
|
|
67
|
-
primary: '
|
|
68
|
-
type: '
|
|
69
|
-
expression: '
|
|
317
|
+
primary: 'Average',
|
|
318
|
+
type: 'Function',
|
|
319
|
+
expression: 'average()',
|
|
320
|
+
details: {
|
|
321
|
+
primary: [
|
|
322
|
+
{
|
|
323
|
+
field: 'Description',
|
|
324
|
+
value: 'Return average value of two number'
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
field: 'Scope',
|
|
328
|
+
value: 'base'
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
field: 'Namespace',
|
|
332
|
+
value: 'py'
|
|
333
|
+
}
|
|
334
|
+
],
|
|
335
|
+
output: [
|
|
336
|
+
{
|
|
337
|
+
field: 'average',
|
|
338
|
+
value: 'Number'
|
|
339
|
+
}
|
|
340
|
+
],
|
|
341
|
+
input: [
|
|
342
|
+
{
|
|
343
|
+
id: 'param1',
|
|
344
|
+
field: 'Param 1',
|
|
345
|
+
type: 'number'
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
id: 'param2',
|
|
349
|
+
field: 'Param 2',
|
|
350
|
+
type: 'number'
|
|
351
|
+
}
|
|
352
|
+
]
|
|
353
|
+
}
|
|
70
354
|
},
|
|
71
355
|
{
|
|
72
356
|
id: createUID(),
|
|
73
|
-
primary: '
|
|
357
|
+
primary: 'Is the current browser Firefox',
|
|
74
358
|
type: 'When',
|
|
75
|
-
expression: '
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
359
|
+
expression: 'isFirefox()',
|
|
360
|
+
details: {
|
|
361
|
+
primary: [
|
|
362
|
+
{
|
|
363
|
+
field: 'Description',
|
|
364
|
+
value: 'Return true if the current browser is Firefox'
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
field: 'Scope',
|
|
368
|
+
value: 'base'
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
field: 'Namespace',
|
|
372
|
+
value: 'py'
|
|
373
|
+
}
|
|
374
|
+
],
|
|
375
|
+
output: [
|
|
376
|
+
{
|
|
377
|
+
field: 'isFirefox',
|
|
378
|
+
value: 'Boolean'
|
|
379
|
+
}
|
|
380
|
+
]
|
|
381
|
+
}
|
|
82
382
|
},
|
|
83
383
|
{
|
|
84
384
|
id: createUID(),
|
|
85
|
-
primary: '
|
|
86
|
-
type: '
|
|
87
|
-
expression: '
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
385
|
+
primary: 'Is the current browser Internet Explorer',
|
|
386
|
+
type: 'When',
|
|
387
|
+
expression: 'isIE()',
|
|
388
|
+
details: {
|
|
389
|
+
primary: [
|
|
390
|
+
{
|
|
391
|
+
field: 'Description',
|
|
392
|
+
value: 'Return true if the current browser is IE'
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
field: 'Scope',
|
|
396
|
+
value: 'base'
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
field: 'Namespace',
|
|
400
|
+
value: 'py'
|
|
401
|
+
}
|
|
402
|
+
],
|
|
403
|
+
output: [
|
|
404
|
+
{
|
|
405
|
+
field: 'isIE',
|
|
406
|
+
value: 'Boolean'
|
|
407
|
+
}
|
|
408
|
+
]
|
|
409
|
+
}
|
|
94
410
|
}
|
|
95
411
|
];
|
|
96
412
|
export const filterCategories = [
|
|
@@ -132,4 +448,21 @@ export const StyledExpressionBuilderDemo = styled.div(() => {
|
|
|
132
448
|
position: relative;
|
|
133
449
|
`;
|
|
134
450
|
});
|
|
451
|
+
export const primaryDetails = [
|
|
452
|
+
{
|
|
453
|
+
id: 'desc',
|
|
454
|
+
name: 'Description',
|
|
455
|
+
value: 'Send email to recipients'
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
id: 'scope',
|
|
459
|
+
name: 'Scope',
|
|
460
|
+
value: 'Email'
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
id: 'namespace',
|
|
464
|
+
name: 'Namespace',
|
|
465
|
+
value: 'px'
|
|
466
|
+
}
|
|
467
|
+
];
|
|
135
468
|
//# sourceMappingURL=ExpressionBuilder.mocks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpressionBuilder.mocks.js","sourceRoot":"","sources":["../../../src/build/ExpressionBuilder/ExpressionBuilder.mocks.ts"],"names":[],"mappings":"AAEA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAa,MAAM,yBAAyB,CAAC;AAE/D,MAAM,CAAC,MAAM,MAAM,GACjB,kHAAkH,CAAC;AAErH,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB;QACE,EAAE,EAAE,SAAS,EAAE;QACf,OAAO,EAAE,0BAA0B;QACnC,IAAI,EAAE,UAAU;QAChB,UAAU,EAAE,yBAAyB;KACtC;IACD;QACE,EAAE,EAAE,SAAS,EAAE;QACf,OAAO,EAAE,wBAAwB;QACjC,IAAI,EAAE,MAAM;QACZ,UAAU,EAAE,aAAa;KAC1B;IACD;QACE,EAAE,EAAE,SAAS,EAAE;QACf,OAAO,EAAE,aAAa;QACtB,IAAI,EAAE,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;QACtB,IAAI,EAAE,YAAY;QAClB,UAAU,EAAE,eAAe;KAC5B;IACD;QACE,EAAE,EAAE,SAAS,EAAE;QACf,OAAO,EAAE,sBAAsB;QAC/B,IAAI,EAAE,UAAU;QAChB,UAAU,EAAE,QAAQ;KACrB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAuB;IAClD;QACE,EAAE,EAAE,QAAQ;QACZ,OAAO,EAAE,KAAK;QACd,QAAQ,EAAE,IAAI;KACf;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,OAAO,EAAE,YAAY;QACrB,QAAQ,EAAE,KAAK;KAChB;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,OAAO,EAAE,eAAe;QACxB,QAAQ,EAAE,KAAK;KAChB;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,OAAO,EAAE,UAAU;QACnB,QAAQ,EAAE,KAAK;KAChB;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,OAAO,EAAE,WAAW;QACpB,QAAQ,EAAE,KAAK;KAChB;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,OAAO,EAAE,UAAU;QACnB,QAAQ,EAAE,KAAK;KAChB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE;IACzD,OAAO,GAAG,CAAA;;;;GAIT,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["// cSpell:words O1XPTI\n\nimport styled, { css } from 'styled-components';\n\nimport { createUID, MenuProps } from '@pega/cosmos-react-core';\n\nexport const errors =\n 'Error message 1. Some unrealistic error message. Server unreachable. Check your network connection and try again';\n\nexport const items = [\n {\n id: createUID(),\n primary: 'Loan to value validation',\n type: 'Decision',\n expression: 'LoanToValueValidation()'\n },\n {\n id: createUID(),\n primary: 'Loan amount under 100K',\n type: 'When',\n expression: 'Under100K()'\n },\n {\n id: createUID(),\n primary: 'Loan number',\n type: 'Field',\n expression: '.LoanNumber'\n },\n {\n id: createUID(),\n primary: 'Loan',\n type: 'Validation',\n expression: 'Loan()'\n },\n {\n id: createUID(),\n primary: 'Number',\n type: 'Function',\n expression: 'isValidNumber()'\n },\n {\n id: createUID(),\n primary: 'Approval Hierarchy',\n type: 'Decision',\n expression: 'Approval()'\n },\n {\n id: createUID(),\n primary: 'Amount above 100K',\n type: 'When',\n expression: 'Above100K()'\n },\n {\n id: createUID(),\n primary: 'Account number',\n type: 'Field',\n expression: '.AccountNumber'\n },\n {\n id: createUID(),\n primary: 'Account location',\n type: 'Validation',\n expression: 'Location()'\n },\n {\n id: createUID(),\n primary: 'Add',\n type: 'Function',\n expression: 'Add()'\n },\n {\n id: createUID(),\n primary: 'Assigning department',\n type: 'Decision',\n expression: 'Department()'\n },\n {\n id: createUID(),\n primary: 'Loan amount under 200K and above 100K',\n type: 'When',\n expression: 'Under200K()'\n },\n {\n id: createUID(),\n primary: 'Account holder',\n type: 'Field',\n expression: '.AccountHolder'\n },\n {\n id: createUID(),\n primary: 'Eligibility',\n type: 'Validation',\n expression: 'Eligibility()'\n },\n {\n id: createUID(),\n primary: 'Calculate Expression',\n type: 'Function',\n expression: 'calc()'\n }\n];\n\nexport const filterCategories: MenuProps['items'] = [\n {\n id: 'item_0',\n primary: 'All',\n selected: true\n },\n {\n id: 'item_1',\n primary: 'Automation',\n selected: false\n },\n {\n id: 'item_2',\n primary: 'Configuration',\n selected: false\n },\n {\n id: 'item_3',\n primary: 'Decision',\n selected: false\n },\n {\n id: 'item_4',\n primary: 'Data page',\n selected: false\n },\n {\n id: 'item_5',\n primary: 'Function',\n selected: false\n }\n];\n\nexport const StyledExpressionBuilderDemo = styled.div(() => {\n return css`\n max-width: 95%;\n height: 80vh;\n position: relative;\n `;\n});\n"]}
|
|
1
|
+
{"version":3,"file":"ExpressionBuilder.mocks.js","sourceRoot":"","sources":["../../../src/build/ExpressionBuilder/ExpressionBuilder.mocks.ts"],"names":[],"mappings":"AAEA,OAAO,MAAM,EAAE,EAAE,GAAG,EA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QACE,EAAE,EAAE,WAAW;QACf,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE,IAAI;KACZ;CACF,CAAC","sourcesContent":["// cSpell:words O1XPTI\n\nimport styled, { css } from 'styled-components';\n\nimport { createUID, MenuProps } from '@pega/cosmos-react-core';\n\nexport const errors =\n 'Error message 1. Some unrealistic error message. Server unreachable. Check your network connection and try again';\n\nexport const items = [\n {\n id: createUID(),\n primary: 'Validate loan value',\n type: 'Decision',\n expression: 'validateLoanValue()',\n details: {\n primary: [\n {\n field: 'Description',\n value: 'Function to validate loan value'\n },\n {\n field: 'Scope',\n value: 'CCDBankLoan'\n },\n {\n field: 'Namespace',\n value: 'px'\n }\n ],\n output: [\n {\n field: 'isValid',\n value: 'Boolean'\n }\n ],\n input: [\n {\n id: 'accountNumber',\n field: 'Account number',\n type: 'text'\n },\n {\n id: 'term',\n field: 'Term in years',\n type: 'number'\n },\n {\n id: 'accountType',\n field: 'Account type',\n type: 'text'\n }\n ]\n }\n },\n {\n id: createUID(),\n primary: 'Loan amount under 100k',\n type: 'When',\n expression: 'isLoanAmountUnder100k()',\n details: {\n primary: [\n {\n field: 'Scope',\n value: 'CCDBankLoan'\n },\n {\n field: 'Namespace',\n value: 'px'\n }\n ],\n output: [\n {\n field: 'isUnder100k',\n value: 'Boolean'\n }\n ],\n input: [\n {\n id: 'accountNumber',\n field: 'Account number',\n type: 'text'\n }\n ]\n }\n },\n {\n id: createUID(),\n primary: 'Loan number',\n type: 'Field',\n expression: '.loanNumber',\n details: {\n primary: [\n {\n field: 'Description',\n value: 'Loan account number of current customer'\n },\n {\n field: 'Scope',\n value: 'CCDBankLoan'\n },\n {\n field: 'Namespace',\n value: 'px'\n }\n ]\n }\n },\n {\n id: createUID(),\n primary: 'Customer name',\n type: 'Field',\n expression: '.customerName',\n details: {\n primary: [\n {\n field: 'Description',\n value: 'Fullname of current customer'\n },\n {\n field: 'Scope',\n value: 'CCDBankLoan'\n },\n {\n field: 'Namespace',\n value: 'px'\n }\n ]\n }\n },\n {\n id: createUID(),\n primary: 'Max',\n type: 'Function',\n expression: 'max()',\n details: {\n primary: [\n {\n field: 'Description',\n value: 'Returns max of two numbers'\n },\n {\n field: 'Scope',\n value: 'base'\n },\n {\n field: 'Namespace',\n value: 'py'\n }\n ],\n output: [\n {\n field: 'max',\n value: 'Number'\n }\n ],\n input: [\n {\n id: 'param1',\n field: 'Param 1',\n type: 'number'\n },\n {\n id: 'param2',\n field: 'Param 2',\n type: 'number'\n }\n ]\n }\n },\n {\n id: createUID(),\n primary: 'Min',\n type: 'Function',\n expression: 'min()',\n details: {\n primary: [\n {\n field: 'Description',\n value: 'Return min of two numbers'\n },\n {\n field: 'Scope',\n value: 'base'\n },\n {\n field: 'Namespace',\n value: 'py'\n }\n ],\n output: [\n {\n field: 'min',\n value: 'Number'\n }\n ],\n input: [\n {\n id: 'param1',\n field: 'Param 1',\n type: 'number'\n },\n {\n id: 'param2',\n field: 'Param 2',\n type: 'number'\n }\n ]\n }\n },\n {\n id: createUID(),\n primary: 'Sum',\n type: 'Function',\n expression: 'sum()',\n details: {\n primary: [\n {\n field: 'Description',\n value: 'Return sum of two numbers'\n },\n {\n field: 'Scope',\n value: 'base'\n },\n {\n field: 'Namespace',\n value: 'py'\n }\n ],\n output: [\n {\n field: 'sum',\n value: 'Number'\n }\n ],\n input: [\n {\n id: 'param1',\n field: 'Param 1',\n type: 'number'\n },\n {\n id: 'param2',\n field: 'Param 2',\n type: 'number'\n }\n ]\n }\n },\n {\n id: createUID(),\n primary: 'Absolute',\n type: 'Function',\n expression: 'abs()',\n details: {\n primary: [\n {\n field: 'Description',\n value: 'Return absolute value of a number'\n },\n {\n field: 'Scope',\n value: 'base'\n },\n {\n field: 'Namespace',\n value: 'py'\n }\n ],\n output: [\n {\n field: 'abs',\n value: 'Number'\n }\n ],\n input: [\n {\n id: 'param1',\n field: 'Param 1',\n type: 'number'\n }\n ]\n }\n },\n {\n id: createUID(),\n primary: 'Square root',\n type: 'Function',\n expression: 'sqrt()',\n details: {\n primary: [\n {\n field: 'Description',\n value: 'Return square root of a number'\n },\n {\n field: 'Scope',\n value: 'base'\n },\n {\n field: 'Namespace',\n value: 'py'\n }\n ],\n output: [\n {\n field: 'squareRoot',\n value: 'Number'\n }\n ],\n input: [\n {\n id: 'param1',\n field: 'Param 1',\n type: 'number'\n }\n ]\n }\n },\n {\n id: createUID(),\n primary: 'Average',\n type: 'Function',\n expression: 'average()',\n details: {\n primary: [\n {\n field: 'Description',\n value: 'Return average value of two number'\n },\n {\n field: 'Scope',\n value: 'base'\n },\n {\n field: 'Namespace',\n value: 'py'\n }\n ],\n output: [\n {\n field: 'average',\n value: 'Number'\n }\n ],\n input: [\n {\n id: 'param1',\n field: 'Param 1',\n type: 'number'\n },\n {\n id: 'param2',\n field: 'Param 2',\n type: 'number'\n }\n ]\n }\n },\n {\n id: createUID(),\n primary: 'Is the current browser Firefox',\n type: 'When',\n expression: 'isFirefox()',\n details: {\n primary: [\n {\n field: 'Description',\n value: 'Return true if the current browser is Firefox'\n },\n {\n field: 'Scope',\n value: 'base'\n },\n {\n field: 'Namespace',\n value: 'py'\n }\n ],\n output: [\n {\n field: 'isFirefox',\n value: 'Boolean'\n }\n ]\n }\n },\n {\n id: createUID(),\n primary: 'Is the current browser Internet Explorer',\n type: 'When',\n expression: 'isIE()',\n details: {\n primary: [\n {\n field: 'Description',\n value: 'Return true if the current browser is IE'\n },\n {\n field: 'Scope',\n value: 'base'\n },\n {\n field: 'Namespace',\n value: 'py'\n }\n ],\n output: [\n {\n field: 'isIE',\n value: 'Boolean'\n }\n ]\n }\n }\n];\n\nexport const filterCategories: MenuProps['items'] = [\n {\n id: 'item_0',\n primary: 'All',\n selected: true\n },\n {\n id: 'item_1',\n primary: 'Automation',\n selected: false\n },\n {\n id: 'item_2',\n primary: 'Configuration',\n selected: false\n },\n {\n id: 'item_3',\n primary: 'Decision',\n selected: false\n },\n {\n id: 'item_4',\n primary: 'Data page',\n selected: false\n },\n {\n id: 'item_5',\n primary: 'Function',\n selected: false\n }\n];\n\nexport const StyledExpressionBuilderDemo = styled.div(() => {\n return css`\n max-width: 95%;\n height: 80vh;\n position: relative;\n `;\n});\n\nexport const primaryDetails = [\n {\n id: 'desc',\n name: 'Description',\n value: 'Send email to recipients'\n },\n {\n id: 'scope',\n name: 'Scope',\n value: 'Email'\n },\n {\n id: 'namespace',\n name: 'Namespace',\n value: 'px'\n }\n];\n"]}
|
|
@@ -3,12 +3,14 @@ import { ExpressionBuilderProps } from '@pega/cosmos-react-build';
|
|
|
3
3
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const ExpressionItemDemo: Story;
|
|
6
|
+
export declare const ExpressionDetailsDemo: Story;
|
|
6
7
|
export declare const ExpressionListDemo: Story;
|
|
7
8
|
interface ExpressionBuilderStoryProps {
|
|
8
9
|
showErrors?: boolean;
|
|
9
10
|
errors?: ExpressionBuilderProps['errors'];
|
|
10
|
-
|
|
11
|
+
onItemAdd?: ExpressionBuilderProps['list']['onItemAdd'];
|
|
11
12
|
onItemExpand?: ExpressionBuilderProps['list']['onItemExpand'];
|
|
13
|
+
onItemCollapse?: ExpressionBuilderProps['list']['onItemCollapse'];
|
|
12
14
|
onFilterChange?: ExpressionBuilderProps['search']['onFilterChange'];
|
|
13
15
|
onSearchChange?: ExpressionBuilderProps['search']['onSearchChange'];
|
|
14
16
|
handle?: ExpressionBuilderProps['handle'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpressionBuilder.stories.d.ts","sourceRoot":"","sources":["../../../src/build/ExpressionBuilder/ExpressionBuilder.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAI/C,OAAO,EAKL,sBAAsB,
|
|
1
|
+
{"version":3,"file":"ExpressionBuilder.stories.d.ts","sourceRoot":"","sources":["../../../src/build/ExpressionBuilder/ExpressionBuilder.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAI/C,OAAO,EAKL,sBAAsB,EAIvB,MAAM,0BAA0B,CAAC;;AAUlC,wBAGU;AAEV,eAAO,MAAM,kBAAkB,EAAE,KA6DhC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,KAoCnC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAwEhC,CAAC;AAEF,UAAU,2BAA2B;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,sBAAsB,CAAC,QAAQ,CAAC,CAAC;IAC1C,SAAS,CAAC,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC;IACxD,YAAY,CAAC,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC,cAAc,CAAC,CAAC;IAC9D,cAAc,CAAC,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC,gBAAgB,CAAC,CAAC;IAClE,cAAc,CAAC,EAAE,sBAAsB,CAAC,QAAQ,CAAC,CAAC,gBAAgB,CAAC,CAAC;IACpE,cAAc,CAAC,EAAE,sBAAsB,CAAC,QAAQ,CAAC,CAAC,gBAAgB,CAAC,CAAC;IACpE,MAAM,CAAC,EAAE,sBAAsB,CAAC,QAAQ,CAAC,CAAC;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,2BAA2B,CAsJpE,CAAC"}
|