@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.
Files changed (53) hide show
  1. package/internal/environment.js +1 -1
  2. package/internal/environment.json +1 -1
  3. package/internal/manifest.json +1 -1
  4. package/package.json +1 -1
  5. package/property-filter/styles.css.js +38 -46
  6. package/property-filter/styles.scoped.css +44 -60
  7. package/property-filter/styles.selectors.js +38 -46
  8. package/property-filter/token-editor-inputs.d.ts +37 -0
  9. package/property-filter/token-editor-inputs.d.ts.map +1 -0
  10. package/property-filter/token-editor-inputs.js +59 -0
  11. package/property-filter/token-editor-inputs.js.map +1 -0
  12. package/property-filter/token-editor.d.ts +18 -39
  13. package/property-filter/token-editor.d.ts.map +1 -1
  14. package/property-filter/token-editor.js +106 -88
  15. package/property-filter/token-editor.js.map +1 -1
  16. package/property-filter/token.d.ts.map +1 -1
  17. package/property-filter/token.js +9 -1
  18. package/property-filter/token.js.map +1 -1
  19. package/radio-group/radio-button.d.ts +1 -0
  20. package/radio-group/radio-button.d.ts.map +1 -1
  21. package/radio-group/radio-button.js +2 -2
  22. package/radio-group/radio-button.js.map +1 -1
  23. package/test-utils/tsconfig.tsbuildinfo +1 -1
  24. package/tiles/analytics-metadata/interfaces.d.ts +14 -0
  25. package/tiles/analytics-metadata/interfaces.d.ts.map +1 -0
  26. package/tiles/analytics-metadata/interfaces.js +4 -0
  27. package/tiles/analytics-metadata/interfaces.js.map +1 -0
  28. package/tiles/analytics-metadata/styles.css.js +6 -0
  29. package/tiles/analytics-metadata/styles.scoped.css +7 -0
  30. package/tiles/analytics-metadata/styles.selectors.js +7 -0
  31. package/tiles/index.d.ts.map +1 -1
  32. package/tiles/index.js +8 -1
  33. package/tiles/index.js.map +1 -1
  34. package/tiles/internal.d.ts.map +1 -1
  35. package/tiles/internal.js +12 -1
  36. package/tiles/internal.js.map +1 -1
  37. package/tiles/tile.d.ts.map +1 -1
  38. package/tiles/tile.js +8 -4
  39. package/tiles/tile.js.map +1 -1
  40. package/toggle/analytics-metadata/interfaces.d.ts +13 -0
  41. package/toggle/analytics-metadata/interfaces.d.ts.map +1 -0
  42. package/toggle/analytics-metadata/interfaces.js +4 -0
  43. package/toggle/analytics-metadata/interfaces.js.map +1 -0
  44. package/toggle/index.js +1 -1
  45. package/toggle/index.js.map +1 -1
  46. package/toggle/internal.d.ts +4 -1
  47. package/toggle/internal.d.ts.map +1 -1
  48. package/toggle/internal.js +16 -2
  49. package/toggle/internal.js.map +1 -1
  50. package/property-filter/token-editor-grouped.d.ts +0 -32
  51. package/property-filter/token-editor-grouped.d.ts.map +0 -1
  52. package/property-filter/token-editor-grouped.js +0 -114
  53. package/property-filter/token-editor-grouped.js.map +0 -1
@@ -1,4 +1,4 @@
1
1
  export var PACKAGE_SOURCE = "components";
2
- export var PACKAGE_VERSION = "3.0.0 (74c98cf6)";
2
+ export var PACKAGE_VERSION = "3.0.0 (24407b38)";
3
3
  export var THEME = "open-source-visual-refresh";
4
4
  export var ALWAYS_VISUAL_REFRESH = true;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "PACKAGE_SOURCE": "components",
3
- "PACKAGE_VERSION": "3.0.0 (74c98cf6)",
3
+ "PACKAGE_VERSION": "3.0.0 (24407b38)",
4
4
  "THEME": "default",
5
5
  "ALWAYS_VISUAL_REFRESH": false
6
6
  }
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "74c98cf64eb1202dad898ac41ad150ae2fb349e5"
2
+ "commit": "24407b38efa400fc5114b1b6db8867c93c9b66a0"
3
3
  }
package/package.json CHANGED
@@ -126,7 +126,7 @@
126
126
  "./internal/base-component/index.js",
127
127
  "./internal/base-component/styles.css.js"
128
128
  ],
129
- "version": "3.0.714",
129
+ "version": "3.0.716",
130
130
  "repository": {
131
131
  "type": "git",
132
132
  "url": "https://github.com/cloudscape-design/components.git"
@@ -1,51 +1,43 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "root": "awsui_root_1wzqe_s6hek_97",
5
- "search-field": "awsui_search-field_1wzqe_s6hek_132",
6
- "input-wrapper": "awsui_input-wrapper_1wzqe_s6hek_138",
7
- "add-token": "awsui_add-token_1wzqe_s6hek_142",
8
- "tokens": "awsui_tokens_1wzqe_s6hek_149",
9
- "token-operator": "awsui_token-operator_1wzqe_s6hek_154",
10
- "property-editor": "awsui_property-editor_1wzqe_s6hek_158",
11
- "token-editor": "awsui_token-editor_1wzqe_s6hek_159",
12
- "property-editor-form": "awsui_property-editor-form_1wzqe_s6hek_164",
13
- "token-editor-form": "awsui_token-editor-form_1wzqe_s6hek_165",
14
- "property-editor-field-property": "awsui_property-editor-field-property_1wzqe_s6hek_168",
15
- "token-editor-field-property": "awsui_token-editor-field-property_1wzqe_s6hek_169",
16
- "property-editor-field-operator": "awsui_property-editor-field-operator_1wzqe_s6hek_172",
17
- "token-editor-field-operator": "awsui_token-editor-field-operator_1wzqe_s6hek_173",
18
- "property-editor-field-value": "awsui_property-editor-field-value_1wzqe_s6hek_176",
19
- "token-editor-field-value": "awsui_token-editor-field-value_1wzqe_s6hek_177",
20
- "property-editor-cancel": "awsui_property-editor-cancel_1wzqe_s6hek_180",
21
- "token-editor-cancel": "awsui_token-editor-cancel_1wzqe_s6hek_181",
22
- "property-editor-submit": "awsui_property-editor-submit_1wzqe_s6hek_184",
23
- "token-editor-submit": "awsui_token-editor-submit_1wzqe_s6hek_185",
24
- "property-editor-actions": "awsui_property-editor-actions_1wzqe_s6hek_188",
25
- "token-editor-actions": "awsui_token-editor-actions_1wzqe_s6hek_189",
26
- "token-editor-grouped": "awsui_token-editor-grouped_1wzqe_s6hek_201",
27
- "token-editor-grouped-form": "awsui_token-editor-grouped-form_1wzqe_s6hek_209",
28
- "token-editor-grouped-field-property": "awsui_token-editor-grouped-field-property_1wzqe_s6hek_212",
29
- "token-editor-grouped-field-operator": "awsui_token-editor-grouped-field-operator_1wzqe_s6hek_215",
30
- "token-editor-grouped-field-value": "awsui_token-editor-grouped-field-value_1wzqe_s6hek_218",
31
- "token-editor-grouped-cancel": "awsui_token-editor-grouped-cancel_1wzqe_s6hek_221",
32
- "token-editor-grouped-submit": "awsui_token-editor-grouped-submit_1wzqe_s6hek_224",
33
- "token-editor-grouped-actions": "awsui_token-editor-grouped-actions_1wzqe_s6hek_227",
34
- "token-editor-grouped-grid": "awsui_token-editor-grouped-grid_1wzqe_s6hek_236",
35
- "token-editor-grouped-grid-group": "awsui_token-editor-grouped-grid-group_1wzqe_s6hek_273",
36
- "token-editor-narrow": "awsui_token-editor-narrow_1wzqe_s6hek_276",
37
- "token-editor-grouped-group": "awsui_token-editor-grouped-group_1wzqe_s6hek_280",
38
- "token-editor-grouped-grid-header": "awsui_token-editor-grouped-grid-header_1wzqe_s6hek_285",
39
- "token-editor-grouped-grid-cell": "awsui_token-editor-grouped-grid-cell_1wzqe_s6hek_291",
40
- "token-editor-grouped-add-token": "awsui_token-editor-grouped-add-token_1wzqe_s6hek_296",
41
- "custom-content-wrapper": "awsui_custom-content-wrapper_1wzqe_s6hek_306",
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
- .awsui_root_1wzqe_s6hek_97:not(#\9) {
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-field_1wzqe_s6hek_132:not(#\9) {
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-wrapper_1wzqe_s6hek_138:not(#\9) {
139
+ .awsui_input-wrapper_1wzqe_8mqhl_138:not(#\9) {
140
140
  flex-grow: 1;
141
141
  }
142
142
 
143
- .awsui_add-token_1wzqe_s6hek_142:not(#\9) {
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
- .awsui_tokens_1wzqe_s6hek_149:not(#\9) {
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-operator_1wzqe_s6hek_154:not(#\9) {
155
+ .awsui_token-operator_1wzqe_8mqhl_154:not(#\9) {
156
156
  font-weight: bold;
157
157
  }
158
158
 
159
- .awsui_property-editor_1wzqe_s6hek_158:not(#\9),
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-form_1wzqe_s6hek_164:not(#\9),
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-property_1wzqe_s6hek_168:not(#\9),
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-operator_1wzqe_s6hek_172:not(#\9),
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-value_1wzqe_s6hek_176:not(#\9),
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-cancel_1wzqe_s6hek_180:not(#\9),
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-submit_1wzqe_s6hek_184:not(#\9),
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-actions_1wzqe_s6hek_188:not(#\9),
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-editor-actions_1wzqe_s6hek_189:not(#\9) {
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-grouped-form_1wzqe_s6hek_209:not(#\9) {
213
- margin-block-end: var(--space-scaled-l-0hpmd7, 20px);
202
+ .awsui_token-editor-form_1wzqe_8mqhl_199:not(#\9) {
203
+ /* used in test-utils */
214
204
  }
215
- .awsui_token-editor-grouped-field-property_1wzqe_s6hek_212:not(#\9) {
205
+ .awsui_token-editor-field-property_1wzqe_8mqhl_202:not(#\9) {
216
206
  flex-grow: 2;
217
207
  }
218
- .awsui_token-editor-grouped-field-operator_1wzqe_s6hek_215:not(#\9) {
208
+ .awsui_token-editor-field-operator_1wzqe_8mqhl_205:not(#\9) {
219
209
  flex-grow: 1;
220
210
  }
221
- .awsui_token-editor-grouped-field-value_1wzqe_s6hek_218:not(#\9) {
211
+ .awsui_token-editor-field-value_1wzqe_8mqhl_208:not(#\9) {
222
212
  flex-grow: 2;
223
213
  }
224
- .awsui_token-editor-grouped-cancel_1wzqe_s6hek_221:not(#\9) {
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-grouped-submit_1wzqe_s6hek_224:not(#\9) {
217
+ .awsui_token-editor-submit_1wzqe_8mqhl_214:not(#\9) {
228
218
  /* used in test-utils */
229
219
  }
230
- .awsui_token-editor-grouped-actions_1wzqe_s6hek_227:not(#\9) {
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-grouped-grid_1wzqe_s6hek_236:not(#\9) {
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-grouped-grid-group_1wzqe_s6hek_273:not(#\9) {
267
+ .awsui_token-editor-grid-group_1wzqe_8mqhl_263:not(#\9) {
278
268
  display: contents;
279
269
  }
280
- .awsui_token-editor-grouped-grid_1wzqe_s6hek_236.awsui_token-editor-narrow_1wzqe_s6hek_276:not(#\9) {
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-grouped-grid_1wzqe_s6hek_236.awsui_token-editor-narrow_1wzqe_s6hek_276 > .awsui_token-editor-grouped-group_1wzqe_s6hek_280:not(#\9) {
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-grouped-grid-header_1wzqe_s6hek_285:not(#\9) {
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-grouped-grid-cell_1wzqe_s6hek_291:not(#\9) {
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-grouped-add-token_1wzqe_s6hek_296:not(#\9) {
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
- .awsui_property-editor_1wzqe_s6hek_158:not(#\9) {
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-control_1wzqe_s6hek_310:not(#\9) {
298
+ .awsui_custom-control_1wzqe_8mqhl_294:not(#\9) {
315
299
  margin-inline-end: var(--space-s-34lx8l, 12px);
316
300
  }
317
301
 
318
- .awsui_input_1wzqe_s6hek_138:not(#\9) {
302
+ .awsui_input_1wzqe_8mqhl_138:not(#\9) {
319
303
  flex: 1;
320
304
  }
321
305
 
322
- .awsui_results_1wzqe_s6hek_318:not(#\9) {
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-trigger_1wzqe_s6hek_323:not(#\9) {
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-all_1wzqe_s6hek_328:not(#\9),
333
- .awsui_join-operation_1wzqe_s6hek_329:not(#\9),
334
- .awsui_custom-filter-actions_1wzqe_s6hek_330:not(#\9) {
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
- .awsui_constraint_1wzqe_s6hek_334:not(#\9) {
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": "awsui_root_1wzqe_s6hek_97",
6
- "search-field": "awsui_search-field_1wzqe_s6hek_132",
7
- "input-wrapper": "awsui_input-wrapper_1wzqe_s6hek_138",
8
- "add-token": "awsui_add-token_1wzqe_s6hek_142",
9
- "tokens": "awsui_tokens_1wzqe_s6hek_149",
10
- "token-operator": "awsui_token-operator_1wzqe_s6hek_154",
11
- "property-editor": "awsui_property-editor_1wzqe_s6hek_158",
12
- "token-editor": "awsui_token-editor_1wzqe_s6hek_159",
13
- "property-editor-form": "awsui_property-editor-form_1wzqe_s6hek_164",
14
- "token-editor-form": "awsui_token-editor-form_1wzqe_s6hek_165",
15
- "property-editor-field-property": "awsui_property-editor-field-property_1wzqe_s6hek_168",
16
- "token-editor-field-property": "awsui_token-editor-field-property_1wzqe_s6hek_169",
17
- "property-editor-field-operator": "awsui_property-editor-field-operator_1wzqe_s6hek_172",
18
- "token-editor-field-operator": "awsui_token-editor-field-operator_1wzqe_s6hek_173",
19
- "property-editor-field-value": "awsui_property-editor-field-value_1wzqe_s6hek_176",
20
- "token-editor-field-value": "awsui_token-editor-field-value_1wzqe_s6hek_177",
21
- "property-editor-cancel": "awsui_property-editor-cancel_1wzqe_s6hek_180",
22
- "token-editor-cancel": "awsui_token-editor-cancel_1wzqe_s6hek_181",
23
- "property-editor-submit": "awsui_property-editor-submit_1wzqe_s6hek_184",
24
- "token-editor-submit": "awsui_token-editor-submit_1wzqe_s6hek_185",
25
- "property-editor-actions": "awsui_property-editor-actions_1wzqe_s6hek_188",
26
- "token-editor-actions": "awsui_token-editor-actions_1wzqe_s6hek_189",
27
- "token-editor-grouped": "awsui_token-editor-grouped_1wzqe_s6hek_201",
28
- "token-editor-grouped-form": "awsui_token-editor-grouped-form_1wzqe_s6hek_209",
29
- "token-editor-grouped-field-property": "awsui_token-editor-grouped-field-property_1wzqe_s6hek_212",
30
- "token-editor-grouped-field-operator": "awsui_token-editor-grouped-field-operator_1wzqe_s6hek_215",
31
- "token-editor-grouped-field-value": "awsui_token-editor-grouped-field-value_1wzqe_s6hek_218",
32
- "token-editor-grouped-cancel": "awsui_token-editor-grouped-cancel_1wzqe_s6hek_221",
33
- "token-editor-grouped-submit": "awsui_token-editor-grouped-submit_1wzqe_s6hek_224",
34
- "token-editor-grouped-actions": "awsui_token-editor-grouped-actions_1wzqe_s6hek_227",
35
- "token-editor-grouped-grid": "awsui_token-editor-grouped-grid_1wzqe_s6hek_236",
36
- "token-editor-grouped-grid-group": "awsui_token-editor-grouped-grid-group_1wzqe_s6hek_273",
37
- "token-editor-narrow": "awsui_token-editor-narrow_1wzqe_s6hek_276",
38
- "token-editor-grouped-group": "awsui_token-editor-grouped-group_1wzqe_s6hek_280",
39
- "token-editor-grouped-grid-header": "awsui_token-editor-grouped-grid-header_1wzqe_s6hek_285",
40
- "token-editor-grouped-grid-cell": "awsui_token-editor-grouped-grid-cell_1wzqe_s6hek_291",
41
- "token-editor-grouped-add-token": "awsui_token-editor-grouped-add-token_1wzqe_s6hek_296",
42
- "custom-content-wrapper": "awsui_custom-content-wrapper_1wzqe_s6hek_306",
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,I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B,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,"file":"token-editor-inputs.js","sourceRoot":"","sources":["../../../src/property-filter/token-editor-inputs.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,mBAAmB,MAAM,4BAA4B,CAAC;AAI7D,OAAO,cAAc,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAUrG,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAanD,MAAM,UAAU,aAAa,CAAC,EAC5B,QAAQ,EACR,mBAAmB,EACnB,UAAU,EACV,mBAAmB,EACnB,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,iBAAiB,GACE;;IACnB,MAAM,sBAAsB,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC;IACzD,MAAM,wBAAwB,GAAG,UAAU,CAAC,CAAC,iCAAM,UAAU,GAAK,sBAAsB,EAAG,CAAC,CAAC,EAAE,CAAC;IAChG,MAAM,eAAe,GAAqD,sBAAsB,CAC9F,mBAAmB,EACnB,gBAAgB,EAChB,WAAW,EACX,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC,CAAC;QACnC,KAAK,EAAE,WAAW;QAClB,KAAK,EAAE,aAAa;QACpB,iBAAiB,EAAE,IAAI;KACxB,CAAC,CACH,CAAC;IAEF,MAAM,mBAAmB,GAAG;QAC1B,KAAK,EAAE,WAAW,CAAC,kBAAkB;QACrC,KAAK,EAAE,SAAS;KACjB,CAAC;IACF,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE;QAC/B,eAAe,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;KAC9C;IACD,OAAO,CACL,oBAAC,cAAc,kBACb,OAAO,EAAE,eAAe,EACx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AAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,EAClE,KAAK,EAAE,MAAA,MAAA,aAAa,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"]}