@cloudscape-design/components 3.0.714 → 3.0.716
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/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/manifest.json +1 -1
- package/package.json +1 -1
- package/property-filter/styles.css.js +38 -46
- package/property-filter/styles.scoped.css +44 -60
- package/property-filter/styles.selectors.js +38 -46
- package/property-filter/token-editor-inputs.d.ts +37 -0
- package/property-filter/token-editor-inputs.d.ts.map +1 -0
- package/property-filter/token-editor-inputs.js +59 -0
- package/property-filter/token-editor-inputs.js.map +1 -0
- package/property-filter/token-editor.d.ts +18 -39
- package/property-filter/token-editor.d.ts.map +1 -1
- package/property-filter/token-editor.js +106 -88
- package/property-filter/token-editor.js.map +1 -1
- package/property-filter/token.d.ts.map +1 -1
- package/property-filter/token.js +9 -1
- package/property-filter/token.js.map +1 -1
- package/radio-group/radio-button.d.ts +1 -0
- package/radio-group/radio-button.d.ts.map +1 -1
- package/radio-group/radio-button.js +2 -2
- package/radio-group/radio-button.js.map +1 -1
- package/test-utils/tsconfig.tsbuildinfo +1 -1
- package/tiles/analytics-metadata/interfaces.d.ts +14 -0
- package/tiles/analytics-metadata/interfaces.d.ts.map +1 -0
- package/tiles/analytics-metadata/interfaces.js +4 -0
- package/tiles/analytics-metadata/interfaces.js.map +1 -0
- package/tiles/analytics-metadata/styles.css.js +6 -0
- package/tiles/analytics-metadata/styles.scoped.css +7 -0
- package/tiles/analytics-metadata/styles.selectors.js +7 -0
- package/tiles/index.d.ts.map +1 -1
- package/tiles/index.js +8 -1
- package/tiles/index.js.map +1 -1
- package/tiles/internal.d.ts.map +1 -1
- package/tiles/internal.js +12 -1
- package/tiles/internal.js.map +1 -1
- package/tiles/tile.d.ts.map +1 -1
- package/tiles/tile.js +8 -4
- package/tiles/tile.js.map +1 -1
- package/toggle/analytics-metadata/interfaces.d.ts +13 -0
- package/toggle/analytics-metadata/interfaces.d.ts.map +1 -0
- package/toggle/analytics-metadata/interfaces.js +4 -0
- package/toggle/analytics-metadata/interfaces.js.map +1 -0
- package/toggle/index.js +1 -1
- package/toggle/index.js.map +1 -1
- package/toggle/internal.d.ts +4 -1
- package/toggle/internal.d.ts.map +1 -1
- package/toggle/internal.js +16 -2
- package/toggle/internal.js.map +1 -1
- package/property-filter/token-editor-grouped.d.ts +0 -32
- package/property-filter/token-editor-grouped.d.ts.map +0 -1
- package/property-filter/token-editor-grouped.js +0 -114
- package/property-filter/token-editor-grouped.js.map +0 -1
package/internal/environment.js
CHANGED
package/internal/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,51 +1,43 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"search-field": "awsui_search-
|
|
6
|
-
"input-wrapper": "awsui_input-
|
|
7
|
-
"add-token": "awsui_add-
|
|
8
|
-
"tokens": "
|
|
9
|
-
"token-operator": "awsui_token-
|
|
10
|
-
"property-editor": "awsui_property-
|
|
11
|
-
"
|
|
12
|
-
"property-editor-
|
|
13
|
-
"
|
|
14
|
-
"property-editor-field-
|
|
15
|
-
"
|
|
16
|
-
"property-editor-
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"token-editor-
|
|
20
|
-
"
|
|
21
|
-
"token-editor-
|
|
22
|
-
"
|
|
23
|
-
"token-editor-
|
|
24
|
-
"
|
|
25
|
-
"token-editor-actions": "awsui_token-editor-
|
|
26
|
-
"token-editor-
|
|
27
|
-
"token-editor-
|
|
28
|
-
"token-editor-
|
|
29
|
-
"token-editor-
|
|
30
|
-
"token-editor-
|
|
31
|
-
"token-editor-
|
|
32
|
-
"token-editor-
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"token-
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"custom-control": "awsui_custom-control_1wzqe_s6hek_310",
|
|
43
|
-
"input": "awsui_input_1wzqe_s6hek_138",
|
|
44
|
-
"results": "awsui_results_1wzqe_s6hek_318",
|
|
45
|
-
"token-trigger": "awsui_token-trigger_1wzqe_s6hek_323",
|
|
46
|
-
"remove-all": "awsui_remove-all_1wzqe_s6hek_328",
|
|
47
|
-
"join-operation": "awsui_join-operation_1wzqe_s6hek_329",
|
|
48
|
-
"custom-filter-actions": "awsui_custom-filter-actions_1wzqe_s6hek_330",
|
|
49
|
-
"constraint": "awsui_constraint_1wzqe_s6hek_334"
|
|
4
|
+
"root": "awsui_root_1wzqe_8mqhl_97",
|
|
5
|
+
"search-field": "awsui_search-field_1wzqe_8mqhl_132",
|
|
6
|
+
"input-wrapper": "awsui_input-wrapper_1wzqe_8mqhl_138",
|
|
7
|
+
"add-token": "awsui_add-token_1wzqe_8mqhl_142",
|
|
8
|
+
"tokens": "awsui_tokens_1wzqe_8mqhl_149",
|
|
9
|
+
"token-operator": "awsui_token-operator_1wzqe_8mqhl_154",
|
|
10
|
+
"property-editor": "awsui_property-editor_1wzqe_8mqhl_158",
|
|
11
|
+
"property-editor-form": "awsui_property-editor-form_1wzqe_8mqhl_166",
|
|
12
|
+
"property-editor-field-property": "awsui_property-editor-field-property_1wzqe_8mqhl_169",
|
|
13
|
+
"property-editor-field-operator": "awsui_property-editor-field-operator_1wzqe_8mqhl_172",
|
|
14
|
+
"property-editor-field-value": "awsui_property-editor-field-value_1wzqe_8mqhl_175",
|
|
15
|
+
"property-editor-cancel": "awsui_property-editor-cancel_1wzqe_8mqhl_178",
|
|
16
|
+
"property-editor-submit": "awsui_property-editor-submit_1wzqe_8mqhl_181",
|
|
17
|
+
"property-editor-actions": "awsui_property-editor-actions_1wzqe_8mqhl_184",
|
|
18
|
+
"token-editor": "awsui_token-editor_1wzqe_8mqhl_191",
|
|
19
|
+
"token-editor-form": "awsui_token-editor-form_1wzqe_8mqhl_199",
|
|
20
|
+
"token-editor-field-property": "awsui_token-editor-field-property_1wzqe_8mqhl_202",
|
|
21
|
+
"token-editor-field-operator": "awsui_token-editor-field-operator_1wzqe_8mqhl_205",
|
|
22
|
+
"token-editor-field-value": "awsui_token-editor-field-value_1wzqe_8mqhl_208",
|
|
23
|
+
"token-editor-cancel": "awsui_token-editor-cancel_1wzqe_8mqhl_211",
|
|
24
|
+
"token-editor-submit": "awsui_token-editor-submit_1wzqe_8mqhl_214",
|
|
25
|
+
"token-editor-actions": "awsui_token-editor-actions_1wzqe_8mqhl_217",
|
|
26
|
+
"token-editor-grid": "awsui_token-editor-grid_1wzqe_8mqhl_226",
|
|
27
|
+
"token-editor-grid-group": "awsui_token-editor-grid-group_1wzqe_8mqhl_263",
|
|
28
|
+
"token-editor-narrow": "awsui_token-editor-narrow_1wzqe_8mqhl_266",
|
|
29
|
+
"token-editor-group": "awsui_token-editor-group_1wzqe_8mqhl_270",
|
|
30
|
+
"token-editor-grid-header": "awsui_token-editor-grid-header_1wzqe_8mqhl_275",
|
|
31
|
+
"token-editor-grid-cell": "awsui_token-editor-grid-cell_1wzqe_8mqhl_281",
|
|
32
|
+
"token-editor-add-token": "awsui_token-editor-add-token_1wzqe_8mqhl_286",
|
|
33
|
+
"custom-content-wrapper": "awsui_custom-content-wrapper_1wzqe_8mqhl_290",
|
|
34
|
+
"custom-control": "awsui_custom-control_1wzqe_8mqhl_294",
|
|
35
|
+
"input": "awsui_input_1wzqe_8mqhl_138",
|
|
36
|
+
"results": "awsui_results_1wzqe_8mqhl_302",
|
|
37
|
+
"token-trigger": "awsui_token-trigger_1wzqe_8mqhl_307",
|
|
38
|
+
"remove-all": "awsui_remove-all_1wzqe_8mqhl_312",
|
|
39
|
+
"join-operation": "awsui_join-operation_1wzqe_8mqhl_313",
|
|
40
|
+
"custom-filter-actions": "awsui_custom-filter-actions_1wzqe_8mqhl_314",
|
|
41
|
+
"constraint": "awsui_constraint_1wzqe_8mqhl_318"
|
|
50
42
|
};
|
|
51
43
|
|
|
@@ -94,7 +94,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
94
94
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
95
95
|
SPDX-License-Identifier: Apache-2.0
|
|
96
96
|
*/
|
|
97
|
-
.
|
|
97
|
+
.awsui_root_1wzqe_8mqhl_97:not(#\9) {
|
|
98
98
|
border-collapse: separate;
|
|
99
99
|
border-spacing: 0;
|
|
100
100
|
box-sizing: border-box;
|
|
@@ -130,77 +130,67 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
130
130
|
-moz-osx-font-smoothing: auto;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
.awsui_search-
|
|
133
|
+
.awsui_search-field_1wzqe_8mqhl_132:not(#\9) {
|
|
134
134
|
display: flex;
|
|
135
135
|
align-items: flex-end;
|
|
136
136
|
max-inline-size: calc(688px - 2 * var(--space-l-t419sm, 20px));
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
.awsui_input-
|
|
139
|
+
.awsui_input-wrapper_1wzqe_8mqhl_138:not(#\9) {
|
|
140
140
|
flex-grow: 1;
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
.awsui_add-
|
|
143
|
+
.awsui_add-token_1wzqe_8mqhl_142:not(#\9) {
|
|
144
144
|
border-inline-start: 1px solid var(--color-border-divider-default-j74lyz, #b6bec9);
|
|
145
145
|
box-sizing: border-box;
|
|
146
146
|
margin-inline-start: var(--space-m-udix3p, 16px);
|
|
147
147
|
padding-inline-start: var(--space-m-udix3p, 16px);
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
.
|
|
150
|
+
.awsui_tokens_1wzqe_8mqhl_149:not(#\9) {
|
|
151
151
|
margin-block: var(--space-xs-zb16t3, 8px);
|
|
152
152
|
margin-inline: 0;
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
.awsui_token-
|
|
155
|
+
.awsui_token-operator_1wzqe_8mqhl_154:not(#\9) {
|
|
156
156
|
font-weight: bold;
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
.awsui_property-
|
|
160
|
-
.awsui_token-editor_1wzqe_s6hek_159:not(#\9) {
|
|
159
|
+
.awsui_property-editor_1wzqe_8mqhl_158:not(#\9) {
|
|
161
160
|
-webkit-user-select: text;
|
|
162
161
|
user-select: text;
|
|
163
162
|
margin-block: var(--space-xxs-p8yyaw, 4px);
|
|
164
163
|
margin-inline: var(--space-xxs-p8yyaw, 4px);
|
|
164
|
+
padding-block: var(--space-m-udix3p, 16px);
|
|
165
|
+
padding-inline: var(--space-m-udix3p, 16px);
|
|
166
|
+
overflow-y: auto;
|
|
165
167
|
}
|
|
166
|
-
.awsui_property-editor-
|
|
167
|
-
.awsui_token-editor-form_1wzqe_s6hek_165:not(#\9) {
|
|
168
|
+
.awsui_property-editor-form_1wzqe_8mqhl_166:not(#\9) {
|
|
168
169
|
margin-block-end: var(--space-scaled-l-0hpmd7, 20px);
|
|
169
170
|
}
|
|
170
|
-
.awsui_property-editor-field-
|
|
171
|
-
.awsui_token-editor-field-property_1wzqe_s6hek_169:not(#\9) {
|
|
171
|
+
.awsui_property-editor-field-property_1wzqe_8mqhl_169:not(#\9) {
|
|
172
172
|
/* used in test-utils */
|
|
173
173
|
}
|
|
174
|
-
.awsui_property-editor-field-
|
|
175
|
-
.awsui_token-editor-field-operator_1wzqe_s6hek_173:not(#\9) {
|
|
174
|
+
.awsui_property-editor-field-operator_1wzqe_8mqhl_172:not(#\9) {
|
|
176
175
|
margin-block-start: var(--space-scaled-l-0hpmd7, 20px);
|
|
177
176
|
}
|
|
178
|
-
.awsui_property-editor-field-
|
|
179
|
-
.awsui_token-editor-field-value_1wzqe_s6hek_177:not(#\9) {
|
|
177
|
+
.awsui_property-editor-field-value_1wzqe_8mqhl_175:not(#\9) {
|
|
180
178
|
margin-block-start: var(--space-scaled-l-0hpmd7, 20px);
|
|
181
179
|
}
|
|
182
|
-
.awsui_property-editor-
|
|
183
|
-
.awsui_token-editor-cancel_1wzqe_s6hek_181:not(#\9) {
|
|
180
|
+
.awsui_property-editor-cancel_1wzqe_8mqhl_178:not(#\9) {
|
|
184
181
|
margin-inline-end: var(--space-xs-zb16t3, 8px);
|
|
185
182
|
}
|
|
186
|
-
.awsui_property-editor-
|
|
187
|
-
.awsui_token-editor-submit_1wzqe_s6hek_185:not(#\9) {
|
|
183
|
+
.awsui_property-editor-submit_1wzqe_8mqhl_181:not(#\9) {
|
|
188
184
|
/* used in test-utils */
|
|
189
185
|
}
|
|
190
|
-
.awsui_property-editor-
|
|
191
|
-
.awsui_token-editor-actions_1wzqe_s6hek_189:not(#\9) {
|
|
186
|
+
.awsui_property-editor-actions_1wzqe_8mqhl_184:not(#\9) {
|
|
192
187
|
display: flex;
|
|
193
188
|
justify-content: flex-end;
|
|
194
189
|
padding-block-start: var(--space-s-34lx8l, 12px);
|
|
195
190
|
border-block-start: 1px solid var(--color-border-dropdown-item-default-k36ra7, #b6bec9);
|
|
196
191
|
}
|
|
197
192
|
|
|
198
|
-
.awsui_token-
|
|
199
|
-
padding-inline-end: calc(var(--space-m-udix3p, 16px) + var(--space-xxs-p8yyaw, 4px));
|
|
200
|
-
margin-inline: calc(-1 * var(--space-m-udix3p, 16px) + -1 * var(--space-xxs-p8yyaw, 4px));
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.awsui_token-editor-grouped_1wzqe_s6hek_201:not(#\9) {
|
|
193
|
+
.awsui_token-editor_1wzqe_8mqhl_191:not(#\9) {
|
|
204
194
|
display: flex;
|
|
205
195
|
flex-direction: column;
|
|
206
196
|
gap: var(--space-s-34lx8l, 12px);
|
|
@@ -209,25 +199,25 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
209
199
|
margin-block: var(--space-xxs-p8yyaw, 4px);
|
|
210
200
|
margin-inline: var(--space-xxs-p8yyaw, 4px);
|
|
211
201
|
}
|
|
212
|
-
.awsui_token-editor-
|
|
213
|
-
|
|
202
|
+
.awsui_token-editor-form_1wzqe_8mqhl_199:not(#\9) {
|
|
203
|
+
/* used in test-utils */
|
|
214
204
|
}
|
|
215
|
-
.awsui_token-editor-
|
|
205
|
+
.awsui_token-editor-field-property_1wzqe_8mqhl_202:not(#\9) {
|
|
216
206
|
flex-grow: 2;
|
|
217
207
|
}
|
|
218
|
-
.awsui_token-editor-
|
|
208
|
+
.awsui_token-editor-field-operator_1wzqe_8mqhl_205:not(#\9) {
|
|
219
209
|
flex-grow: 1;
|
|
220
210
|
}
|
|
221
|
-
.awsui_token-editor-
|
|
211
|
+
.awsui_token-editor-field-value_1wzqe_8mqhl_208:not(#\9) {
|
|
222
212
|
flex-grow: 2;
|
|
223
213
|
}
|
|
224
|
-
.awsui_token-editor-
|
|
214
|
+
.awsui_token-editor-cancel_1wzqe_8mqhl_211:not(#\9) {
|
|
225
215
|
margin-inline-end: var(--space-xs-zb16t3, 8px);
|
|
226
216
|
}
|
|
227
|
-
.awsui_token-editor-
|
|
217
|
+
.awsui_token-editor-submit_1wzqe_8mqhl_214:not(#\9) {
|
|
228
218
|
/* used in test-utils */
|
|
229
219
|
}
|
|
230
|
-
.awsui_token-editor-
|
|
220
|
+
.awsui_token-editor-actions_1wzqe_8mqhl_217:not(#\9) {
|
|
231
221
|
display: flex;
|
|
232
222
|
justify-content: flex-end;
|
|
233
223
|
padding-block-start: var(--space-s-34lx8l, 12px);
|
|
@@ -236,7 +226,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
236
226
|
margin-inline: calc(-1 * var(--space-m-udix3p, 16px) + -1 * var(--space-xxs-p8yyaw, 4px));
|
|
237
227
|
margin-block-start: var(--space-s-34lx8l, 12px);
|
|
238
228
|
}
|
|
239
|
-
.awsui_token-editor-
|
|
229
|
+
.awsui_token-editor-grid_1wzqe_8mqhl_226:not(#\9) {
|
|
240
230
|
border-collapse: separate;
|
|
241
231
|
border-spacing: 0;
|
|
242
232
|
box-sizing: border-box;
|
|
@@ -272,70 +262,64 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
272
262
|
-moz-osx-font-smoothing: auto;
|
|
273
263
|
display: grid;
|
|
274
264
|
gap: var(--space-s-34lx8l, 12px);
|
|
275
|
-
grid-template-columns: 2fr 120px 3fr min-content;
|
|
265
|
+
grid-template-columns: minmax(100px, 2fr) minmax(100px, 120px) minmax(100px, 3fr) min-content;
|
|
276
266
|
}
|
|
277
|
-
.awsui_token-editor-
|
|
267
|
+
.awsui_token-editor-grid-group_1wzqe_8mqhl_263:not(#\9) {
|
|
278
268
|
display: contents;
|
|
279
269
|
}
|
|
280
|
-
.awsui_token-editor-
|
|
281
|
-
grid-template-columns: 1fr;
|
|
270
|
+
.awsui_token-editor-grid_1wzqe_8mqhl_226.awsui_token-editor-narrow_1wzqe_8mqhl_266:not(#\9) {
|
|
271
|
+
grid-template-columns: minmax(100px, 1fr);
|
|
282
272
|
gap: var(--space-m-udix3p, 16px);
|
|
283
273
|
}
|
|
284
|
-
.awsui_token-editor-
|
|
274
|
+
.awsui_token-editor-grid_1wzqe_8mqhl_226.awsui_token-editor-narrow_1wzqe_8mqhl_266 > .awsui_token-editor-group_1wzqe_8mqhl_270:not(#\9) {
|
|
285
275
|
display: flex;
|
|
286
276
|
flex-direction: column;
|
|
287
277
|
gap: var(--space-s-34lx8l, 12px);
|
|
288
278
|
}
|
|
289
|
-
.awsui_token-editor-
|
|
279
|
+
.awsui_token-editor-grid-header_1wzqe_8mqhl_275:not(#\9) {
|
|
290
280
|
color: var(--color-text-column-header-czuvwg, #414d5c);
|
|
291
281
|
font-weight: var(--font-weight-heading-s-cwn6wc, 700);
|
|
292
282
|
padding-block: var(--space-scaled-xxs-7597g1, 4px);
|
|
293
283
|
text-align: start;
|
|
294
284
|
}
|
|
295
|
-
.awsui_token-editor-
|
|
285
|
+
.awsui_token-editor-grid-cell_1wzqe_8mqhl_281:not(#\9):not(.awsui_token-editor-narrow_1wzqe_8mqhl_266) {
|
|
296
286
|
display: flex;
|
|
297
287
|
align-items: flex-end;
|
|
298
288
|
justify-content: flex-end;
|
|
299
289
|
}
|
|
300
|
-
.awsui_token-editor-
|
|
290
|
+
.awsui_token-editor-add-token_1wzqe_8mqhl_286:not(#\9) {
|
|
301
291
|
margin-block-start: var(--space-s-34lx8l, 12px);
|
|
302
292
|
}
|
|
303
293
|
|
|
304
|
-
.
|
|
305
|
-
padding-block: var(--space-m-udix3p, 16px);
|
|
306
|
-
padding-inline: var(--space-m-udix3p, 16px);
|
|
307
|
-
overflow-y: auto;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
.awsui_custom-content-wrapper_1wzqe_s6hek_306:not(#\9) {
|
|
294
|
+
.awsui_custom-content-wrapper_1wzqe_8mqhl_290:not(#\9) {
|
|
311
295
|
display: contents;
|
|
312
296
|
}
|
|
313
297
|
|
|
314
|
-
.awsui_custom-
|
|
298
|
+
.awsui_custom-control_1wzqe_8mqhl_294:not(#\9) {
|
|
315
299
|
margin-inline-end: var(--space-s-34lx8l, 12px);
|
|
316
300
|
}
|
|
317
301
|
|
|
318
|
-
.
|
|
302
|
+
.awsui_input_1wzqe_8mqhl_138:not(#\9) {
|
|
319
303
|
flex: 1;
|
|
320
304
|
}
|
|
321
305
|
|
|
322
|
-
.
|
|
306
|
+
.awsui_results_1wzqe_8mqhl_302:not(#\9) {
|
|
323
307
|
padding-block: calc(var(--space-scaled-xxs-7597g1, 4px) + var(--border-field-width-09w7vk, 2px));
|
|
324
308
|
padding-inline: 0;
|
|
325
309
|
}
|
|
326
310
|
|
|
327
|
-
.awsui_token-
|
|
311
|
+
.awsui_token-trigger_1wzqe_8mqhl_307:not(#\9) {
|
|
328
312
|
min-inline-size: 0;
|
|
329
313
|
word-break: break-word;
|
|
330
314
|
}
|
|
331
315
|
|
|
332
|
-
.awsui_remove-
|
|
333
|
-
.awsui_join-
|
|
334
|
-
.awsui_custom-filter-
|
|
316
|
+
.awsui_remove-all_1wzqe_8mqhl_312:not(#\9),
|
|
317
|
+
.awsui_join-operation_1wzqe_8mqhl_313:not(#\9),
|
|
318
|
+
.awsui_custom-filter-actions_1wzqe_8mqhl_314:not(#\9) {
|
|
335
319
|
/* used in test-utils */
|
|
336
320
|
}
|
|
337
321
|
|
|
338
|
-
.
|
|
322
|
+
.awsui_constraint_1wzqe_8mqhl_318:not(#\9) {
|
|
339
323
|
padding-block-start: var(--space-xxs-p8yyaw, 4px);
|
|
340
324
|
color: var(--color-text-form-secondary-dxc248, #5f6b7a);
|
|
341
325
|
font-size: var(--font-size-body-s-asqx2i, 12px);
|
|
@@ -2,51 +2,43 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"root": "
|
|
6
|
-
"search-field": "awsui_search-
|
|
7
|
-
"input-wrapper": "awsui_input-
|
|
8
|
-
"add-token": "awsui_add-
|
|
9
|
-
"tokens": "
|
|
10
|
-
"token-operator": "awsui_token-
|
|
11
|
-
"property-editor": "awsui_property-
|
|
12
|
-
"
|
|
13
|
-
"property-editor-
|
|
14
|
-
"
|
|
15
|
-
"property-editor-field-
|
|
16
|
-
"
|
|
17
|
-
"property-editor-
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"token-editor-
|
|
21
|
-
"
|
|
22
|
-
"token-editor-
|
|
23
|
-
"
|
|
24
|
-
"token-editor-
|
|
25
|
-
"
|
|
26
|
-
"token-editor-actions": "awsui_token-editor-
|
|
27
|
-
"token-editor-
|
|
28
|
-
"token-editor-
|
|
29
|
-
"token-editor-
|
|
30
|
-
"token-editor-
|
|
31
|
-
"token-editor-
|
|
32
|
-
"token-editor-
|
|
33
|
-
"token-editor-
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"token-
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"custom-control": "awsui_custom-control_1wzqe_s6hek_310",
|
|
44
|
-
"input": "awsui_input_1wzqe_s6hek_138",
|
|
45
|
-
"results": "awsui_results_1wzqe_s6hek_318",
|
|
46
|
-
"token-trigger": "awsui_token-trigger_1wzqe_s6hek_323",
|
|
47
|
-
"remove-all": "awsui_remove-all_1wzqe_s6hek_328",
|
|
48
|
-
"join-operation": "awsui_join-operation_1wzqe_s6hek_329",
|
|
49
|
-
"custom-filter-actions": "awsui_custom-filter-actions_1wzqe_s6hek_330",
|
|
50
|
-
"constraint": "awsui_constraint_1wzqe_s6hek_334"
|
|
5
|
+
"root": "awsui_root_1wzqe_8mqhl_97",
|
|
6
|
+
"search-field": "awsui_search-field_1wzqe_8mqhl_132",
|
|
7
|
+
"input-wrapper": "awsui_input-wrapper_1wzqe_8mqhl_138",
|
|
8
|
+
"add-token": "awsui_add-token_1wzqe_8mqhl_142",
|
|
9
|
+
"tokens": "awsui_tokens_1wzqe_8mqhl_149",
|
|
10
|
+
"token-operator": "awsui_token-operator_1wzqe_8mqhl_154",
|
|
11
|
+
"property-editor": "awsui_property-editor_1wzqe_8mqhl_158",
|
|
12
|
+
"property-editor-form": "awsui_property-editor-form_1wzqe_8mqhl_166",
|
|
13
|
+
"property-editor-field-property": "awsui_property-editor-field-property_1wzqe_8mqhl_169",
|
|
14
|
+
"property-editor-field-operator": "awsui_property-editor-field-operator_1wzqe_8mqhl_172",
|
|
15
|
+
"property-editor-field-value": "awsui_property-editor-field-value_1wzqe_8mqhl_175",
|
|
16
|
+
"property-editor-cancel": "awsui_property-editor-cancel_1wzqe_8mqhl_178",
|
|
17
|
+
"property-editor-submit": "awsui_property-editor-submit_1wzqe_8mqhl_181",
|
|
18
|
+
"property-editor-actions": "awsui_property-editor-actions_1wzqe_8mqhl_184",
|
|
19
|
+
"token-editor": "awsui_token-editor_1wzqe_8mqhl_191",
|
|
20
|
+
"token-editor-form": "awsui_token-editor-form_1wzqe_8mqhl_199",
|
|
21
|
+
"token-editor-field-property": "awsui_token-editor-field-property_1wzqe_8mqhl_202",
|
|
22
|
+
"token-editor-field-operator": "awsui_token-editor-field-operator_1wzqe_8mqhl_205",
|
|
23
|
+
"token-editor-field-value": "awsui_token-editor-field-value_1wzqe_8mqhl_208",
|
|
24
|
+
"token-editor-cancel": "awsui_token-editor-cancel_1wzqe_8mqhl_211",
|
|
25
|
+
"token-editor-submit": "awsui_token-editor-submit_1wzqe_8mqhl_214",
|
|
26
|
+
"token-editor-actions": "awsui_token-editor-actions_1wzqe_8mqhl_217",
|
|
27
|
+
"token-editor-grid": "awsui_token-editor-grid_1wzqe_8mqhl_226",
|
|
28
|
+
"token-editor-grid-group": "awsui_token-editor-grid-group_1wzqe_8mqhl_263",
|
|
29
|
+
"token-editor-narrow": "awsui_token-editor-narrow_1wzqe_8mqhl_266",
|
|
30
|
+
"token-editor-group": "awsui_token-editor-group_1wzqe_8mqhl_270",
|
|
31
|
+
"token-editor-grid-header": "awsui_token-editor-grid-header_1wzqe_8mqhl_275",
|
|
32
|
+
"token-editor-grid-cell": "awsui_token-editor-grid-cell_1wzqe_8mqhl_281",
|
|
33
|
+
"token-editor-add-token": "awsui_token-editor-add-token_1wzqe_8mqhl_286",
|
|
34
|
+
"custom-content-wrapper": "awsui_custom-content-wrapper_1wzqe_8mqhl_290",
|
|
35
|
+
"custom-control": "awsui_custom-control_1wzqe_8mqhl_294",
|
|
36
|
+
"input": "awsui_input_1wzqe_8mqhl_138",
|
|
37
|
+
"results": "awsui_results_1wzqe_8mqhl_302",
|
|
38
|
+
"token-trigger": "awsui_token-trigger_1wzqe_8mqhl_307",
|
|
39
|
+
"remove-all": "awsui_remove-all_1wzqe_8mqhl_312",
|
|
40
|
+
"join-operation": "awsui_join-operation_1wzqe_8mqhl_313",
|
|
41
|
+
"custom-filter-actions": "awsui_custom-filter-actions_1wzqe_8mqhl_314",
|
|
42
|
+
"constraint": "awsui_constraint_1wzqe_8mqhl_318"
|
|
51
43
|
};
|
|
52
44
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DropdownStatusProps } from '../internal/components/dropdown-status/interfaces.js';
|
|
3
|
+
import { NonCancelableEventHandler } from '../internal/events/index.js';
|
|
4
|
+
import { ComparisonOperator, GroupText, I18nStrings, InternalFilteringOption, InternalFilteringProperty, InternalFreeTextFiltering, LoadItemsDetail } from './interfaces.js';
|
|
5
|
+
interface PropertyInputProps {
|
|
6
|
+
asyncProps: null | DropdownStatusProps;
|
|
7
|
+
customGroupsText: readonly GroupText[];
|
|
8
|
+
freeTextFiltering: InternalFreeTextFiltering;
|
|
9
|
+
filteringProperties: readonly InternalFilteringProperty[];
|
|
10
|
+
i18nStrings: I18nStrings;
|
|
11
|
+
onChangePropertyKey: (propertyKey: undefined | string) => void;
|
|
12
|
+
onLoadItems?: NonCancelableEventHandler<LoadItemsDetail>;
|
|
13
|
+
property: null | InternalFilteringProperty;
|
|
14
|
+
}
|
|
15
|
+
export declare function PropertyInput({ property, onChangePropertyKey, asyncProps, filteringProperties, onLoadItems, customGroupsText, i18nStrings, freeTextFiltering, }: PropertyInputProps): JSX.Element;
|
|
16
|
+
interface OperatorInputProps {
|
|
17
|
+
i18nStrings: I18nStrings;
|
|
18
|
+
onChangeOperator: (operator: ComparisonOperator) => void;
|
|
19
|
+
operator: undefined | ComparisonOperator;
|
|
20
|
+
property: null | InternalFilteringProperty;
|
|
21
|
+
freeTextFiltering: InternalFreeTextFiltering;
|
|
22
|
+
triggerVariant: 'option' | 'label';
|
|
23
|
+
}
|
|
24
|
+
export declare function OperatorInput({ property, operator, onChangeOperator, i18nStrings, freeTextFiltering, triggerVariant, }: OperatorInputProps): JSX.Element;
|
|
25
|
+
interface ValueInputProps {
|
|
26
|
+
asyncProps: DropdownStatusProps;
|
|
27
|
+
filteringOptions: readonly InternalFilteringOption[];
|
|
28
|
+
i18nStrings: I18nStrings;
|
|
29
|
+
onChangeValue: (value: string) => void;
|
|
30
|
+
onLoadItems?: NonCancelableEventHandler<LoadItemsDetail>;
|
|
31
|
+
operator: undefined | ComparisonOperator;
|
|
32
|
+
property: null | InternalFilteringProperty;
|
|
33
|
+
value: undefined | string;
|
|
34
|
+
}
|
|
35
|
+
export declare function ValueInput({ property, operator, value, onChangeValue, asyncProps, filteringOptions, onLoadItems, i18nStrings, }: ValueInputProps): JSX.Element;
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=token-editor-inputs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token-editor-inputs.d.ts","sourceRoot":"","sources":["../../../src/property-filter/token-editor-inputs.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAIxE,OAAO,EACL,kBAAkB,EAClB,SAAS,EACT,WAAW,EACX,uBAAuB,EACvB,yBAAyB,EACzB,yBAAyB,EACzB,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAGzB,UAAU,kBAAkB;IAC1B,UAAU,EAAE,IAAI,GAAG,mBAAmB,CAAC;IACvC,gBAAgB,EAAE,SAAS,SAAS,EAAE,CAAC;IACvC,iBAAiB,EAAE,yBAAyB,CAAC;IAC7C,mBAAmB,EAAE,SAAS,yBAAyB,EAAE,CAAC;IAC1D,WAAW,EAAE,WAAW,CAAC;IACzB,mBAAmB,EAAE,CAAC,WAAW,EAAE,SAAS,GAAG,MAAM,KAAK,IAAI,CAAC;IAC/D,WAAW,CAAC,EAAE,yBAAyB,CAAC,eAAe,CAAC,CAAC;IACzD,QAAQ,EAAE,IAAI,GAAG,yBAAyB,CAAC;CAC5C;AAED,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,mBAAmB,EACnB,UAAU,EACV,mBAAmB,EACnB,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,iBAAiB,GAClB,EAAE,kBAAkB,eAoCpB;AAED,UAAU,kBAAkB;IAC1B,WAAW,EAAE,WAAW,CAAC;IACzB,gBAAgB,EAAE,CAAC,QAAQ,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACzD,QAAQ,EAAE,SAAS,GAAG,kBAAkB,CAAC;IACzC,QAAQ,EAAE,IAAI,GAAG,yBAAyB,CAAC;IAC3C,iBAAiB,EAAE,yBAAyB,CAAC;IAC7C,cAAc,EAAE,QAAQ,GAAG,OAAO,CAAC;CACpC;AAED,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,cAAc,GACf,EAAE,kBAAkB,eAsBpB;AAED,UAAU,eAAe;IACvB,UAAU,EAAE,mBAAmB,CAAC;IAChC,gBAAgB,EAAE,SAAS,uBAAuB,EAAE,CAAC;IACrD,WAAW,EAAE,WAAW,CAAC;IACzB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,yBAAyB,CAAC,eAAe,CAAC,CAAC;IACzD,QAAQ,EAAE,SAAS,GAAG,kBAAkB,CAAC;IACzC,QAAQ,EAAE,IAAI,GAAG,yBAAyB,CAAC;IAC3C,KAAK,EAAE,SAAS,GAAG,MAAM,CAAC;CAC3B;AAED,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,WAAW,EACX,WAAW,GACZ,EAAE,eAAe,eA6BjB"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import InternalAutosuggest from '../autosuggest/internal.js';
|
|
5
|
+
import InternalSelect from '../select/internal.js';
|
|
6
|
+
import { getAllowedOperators, getPropertySuggestions, operatorToDescription } from './controller.js';
|
|
7
|
+
import { useLoadItems } from './use-load-items.js';
|
|
8
|
+
export function PropertyInput({ property, onChangePropertyKey, asyncProps, filteringProperties, onLoadItems, customGroupsText, i18nStrings, freeTextFiltering, }) {
|
|
9
|
+
var _a;
|
|
10
|
+
const propertySelectHandlers = useLoadItems(onLoadItems);
|
|
11
|
+
const asyncPropertySelectProps = asyncProps ? Object.assign(Object.assign({}, asyncProps), propertySelectHandlers) : {};
|
|
12
|
+
const propertyOptions = getPropertySuggestions(filteringProperties, customGroupsText, i18nStrings, ({ propertyKey, propertyLabel }) => ({
|
|
13
|
+
value: propertyKey,
|
|
14
|
+
label: propertyLabel,
|
|
15
|
+
dontCloseOnSelect: true,
|
|
16
|
+
}));
|
|
17
|
+
const allPropertiesOption = {
|
|
18
|
+
label: i18nStrings.allPropertiesLabel,
|
|
19
|
+
value: undefined,
|
|
20
|
+
};
|
|
21
|
+
if (!freeTextFiltering.disabled) {
|
|
22
|
+
propertyOptions.unshift(allPropertiesOption);
|
|
23
|
+
}
|
|
24
|
+
return (React.createElement(InternalSelect, Object.assign({ options: propertyOptions, selectedOption: property
|
|
25
|
+
? {
|
|
26
|
+
value: (_a = property.propertyKey) !== null && _a !== void 0 ? _a : undefined,
|
|
27
|
+
label: property.propertyLabel,
|
|
28
|
+
}
|
|
29
|
+
: allPropertiesOption, onChange: e => onChangePropertyKey(e.detail.selectedOption.value) }, asyncPropertySelectProps)));
|
|
30
|
+
}
|
|
31
|
+
export function OperatorInput({ property, operator, onChangeOperator, i18nStrings, freeTextFiltering, triggerVariant, }) {
|
|
32
|
+
const operatorOptions = (property ? getAllowedOperators(property) : freeTextFiltering.operators).map(operator => ({
|
|
33
|
+
value: operator,
|
|
34
|
+
label: operator,
|
|
35
|
+
description: operatorToDescription(operator, i18nStrings),
|
|
36
|
+
}));
|
|
37
|
+
return (React.createElement(InternalSelect, { options: operatorOptions, triggerVariant: triggerVariant, selectedOption: operator
|
|
38
|
+
? {
|
|
39
|
+
value: operator,
|
|
40
|
+
label: operator,
|
|
41
|
+
description: operatorToDescription(operator, i18nStrings),
|
|
42
|
+
}
|
|
43
|
+
: null, onChange: e => onChangeOperator(e.detail.selectedOption.value) }));
|
|
44
|
+
}
|
|
45
|
+
export function ValueInput({ property, operator, value, onChangeValue, asyncProps, filteringOptions, onLoadItems, i18nStrings, }) {
|
|
46
|
+
var _a, _b, _c;
|
|
47
|
+
const valueOptions = property
|
|
48
|
+
? filteringOptions
|
|
49
|
+
.filter(option => { var _a; return ((_a = option.property) === null || _a === void 0 ? void 0 : _a.propertyKey) === property.propertyKey; })
|
|
50
|
+
.map(({ label, value }) => ({ label, value }))
|
|
51
|
+
: [];
|
|
52
|
+
const valueAutosuggestHandlers = useLoadItems(onLoadItems, '', property === null || property === void 0 ? void 0 : property.externalProperty);
|
|
53
|
+
const asyncValueAutosuggestProps = (property === null || property === void 0 ? void 0 : property.propertyKey)
|
|
54
|
+
? Object.assign(Object.assign({}, valueAutosuggestHandlers), asyncProps) : { empty: asyncProps.empty };
|
|
55
|
+
const [matchedOption] = valueOptions.filter(option => option.value === value);
|
|
56
|
+
const OperatorForm = (property === null || property === void 0 ? void 0 : property.propertyKey) && operator && (property === null || property === void 0 ? void 0 : property.getValueFormRenderer(operator));
|
|
57
|
+
return OperatorForm ? (React.createElement(OperatorForm, { value: value, onChange: onChangeValue, operator: operator })) : (React.createElement(InternalAutosuggest, Object.assign({ enteredTextLabel: (_a = i18nStrings.enteredTextLabel) !== null && _a !== void 0 ? _a : (value => value), value: (_c = (_b = matchedOption === null || matchedOption === void 0 ? void 0 : matchedOption.label) !== null && _b !== void 0 ? _b : value) !== null && _c !== void 0 ? _c : '', clearAriaLabel: i18nStrings.clearAriaLabel, onChange: e => onChangeValue(e.detail.value), disabled: !operator, options: valueOptions }, asyncValueAutosuggestProps, { virtualScroll: true })));
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=token-editor-inputs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"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aAAb,aAAa,uBAAb,aAAa,CAAE,KAAK,mCAAI,KAAK,mCAAI,EAAE,EAC1C,cAAc,EAAE,WAAW,CAAC,cAAc,EAC1C,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAC5C,QAAQ,EAAE,CAAC,QAAQ,EACnB,OAAO,EAAE,YAAY,IACjB,0BAA0B,IAC9B,aAAa,EAAE,IAAI,IACnB,CACH,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React from 'react';\n\nimport InternalAutosuggest from '../autosuggest/internal.js';\nimport { DropdownStatusProps } from '../internal/components/dropdown-status/interfaces.js';\nimport { NonCancelableEventHandler } from '../internal/events/index.js';\nimport { SelectProps } from '../select/interfaces.js';\nimport InternalSelect from '../select/internal.js';\nimport { getAllowedOperators, getPropertySuggestions, operatorToDescription } from './controller.js';\nimport {\n ComparisonOperator,\n GroupText,\n I18nStrings,\n InternalFilteringOption,\n InternalFilteringProperty,\n InternalFreeTextFiltering,\n LoadItemsDetail,\n} from './interfaces.js';\nimport { useLoadItems } from './use-load-items.js';\n\ninterface PropertyInputProps {\n asyncProps: null | DropdownStatusProps;\n customGroupsText: readonly GroupText[];\n freeTextFiltering: InternalFreeTextFiltering;\n filteringProperties: readonly InternalFilteringProperty[];\n i18nStrings: I18nStrings;\n onChangePropertyKey: (propertyKey: undefined | string) => void;\n onLoadItems?: NonCancelableEventHandler<LoadItemsDetail>;\n property: null | InternalFilteringProperty;\n}\n\nexport function PropertyInput({\n property,\n onChangePropertyKey,\n asyncProps,\n filteringProperties,\n onLoadItems,\n customGroupsText,\n i18nStrings,\n freeTextFiltering,\n}: PropertyInputProps) {\n const propertySelectHandlers = useLoadItems(onLoadItems);\n const asyncPropertySelectProps = asyncProps ? { ...asyncProps, ...propertySelectHandlers } : {};\n const propertyOptions: (SelectProps.Option | SelectProps.OptionGroup)[] = getPropertySuggestions(\n filteringProperties,\n customGroupsText,\n i18nStrings,\n ({ propertyKey, propertyLabel }) => ({\n value: propertyKey,\n label: propertyLabel,\n dontCloseOnSelect: true,\n })\n );\n\n const allPropertiesOption = {\n label: i18nStrings.allPropertiesLabel,\n value: undefined,\n };\n if (!freeTextFiltering.disabled) {\n propertyOptions.unshift(allPropertiesOption);\n }\n return (\n <InternalSelect\n options={propertyOptions}\n selectedOption={\n property\n ? {\n value: property.propertyKey ?? undefined,\n label: property.propertyLabel,\n }\n : allPropertiesOption\n }\n onChange={e => onChangePropertyKey(e.detail.selectedOption.value)}\n {...asyncPropertySelectProps}\n />\n );\n}\n\ninterface OperatorInputProps {\n i18nStrings: I18nStrings;\n onChangeOperator: (operator: ComparisonOperator) => void;\n operator: undefined | ComparisonOperator;\n property: null | InternalFilteringProperty;\n freeTextFiltering: InternalFreeTextFiltering;\n triggerVariant: 'option' | 'label';\n}\n\nexport function OperatorInput({\n property,\n operator,\n onChangeOperator,\n i18nStrings,\n freeTextFiltering,\n triggerVariant,\n}: OperatorInputProps) {\n const operatorOptions = (property ? getAllowedOperators(property) : freeTextFiltering.operators).map(operator => ({\n value: operator,\n label: operator,\n description: operatorToDescription(operator, i18nStrings),\n }));\n return (\n <InternalSelect\n options={operatorOptions}\n triggerVariant={triggerVariant}\n selectedOption={\n operator\n ? {\n value: operator,\n label: operator,\n description: operatorToDescription(operator, i18nStrings),\n }\n : null\n }\n onChange={e => onChangeOperator(e.detail.selectedOption.value as ComparisonOperator)}\n />\n );\n}\n\ninterface ValueInputProps {\n asyncProps: DropdownStatusProps;\n filteringOptions: readonly InternalFilteringOption[];\n i18nStrings: I18nStrings;\n onChangeValue: (value: string) => void;\n onLoadItems?: NonCancelableEventHandler<LoadItemsDetail>;\n operator: undefined | ComparisonOperator;\n property: null | InternalFilteringProperty;\n value: undefined | string;\n}\n\nexport function ValueInput({\n property,\n operator,\n value,\n onChangeValue,\n asyncProps,\n filteringOptions,\n onLoadItems,\n i18nStrings,\n}: ValueInputProps) {\n const valueOptions = property\n ? filteringOptions\n .filter(option => option.property?.propertyKey === property.propertyKey)\n .map(({ label, value }) => ({ label, value }))\n : [];\n\n const valueAutosuggestHandlers = useLoadItems(onLoadItems, '', property?.externalProperty);\n const asyncValueAutosuggestProps = property?.propertyKey\n ? { ...valueAutosuggestHandlers, ...asyncProps }\n : { empty: asyncProps.empty };\n const [matchedOption] = valueOptions.filter(option => option.value === value);\n\n const OperatorForm = property?.propertyKey && operator && property?.getValueFormRenderer(operator);\n\n return OperatorForm ? (\n <OperatorForm value={value} onChange={onChangeValue} operator={operator} />\n ) : (\n <InternalAutosuggest\n enteredTextLabel={i18nStrings.enteredTextLabel ?? (value => value)}\n value={matchedOption?.label ?? value ?? ''}\n clearAriaLabel={i18nStrings.clearAriaLabel}\n onChange={e => onChangeValue(e.detail.value)}\n disabled={!operator}\n options={valueOptions}\n {...asyncValueAutosuggestProps}\n virtualScroll={true}\n />\n );\n}\n"]}
|