@cloudscape-design/components 3.0.719 → 3.0.721

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 (103) hide show
  1. package/app-layout/classic.js +15 -15
  2. package/app-layout/classic.js.map +1 -1
  3. package/app-layout/internal.d.ts.map +1 -1
  4. package/app-layout/internal.js +3 -2
  5. package/app-layout/internal.js.map +1 -1
  6. package/app-layout/utils/feature-flags.d.ts +1 -1
  7. package/app-layout/utils/feature-flags.d.ts.map +1 -1
  8. package/app-layout/utils/feature-flags.js +5 -1
  9. package/app-layout/utils/feature-flags.js.map +1 -1
  10. package/app-layout/visual-refresh-toolbar/index.js +1 -1
  11. package/app-layout/visual-refresh-toolbar/index.js.map +1 -1
  12. package/app-layout/visual-refresh-toolbar/toolbar/index.d.ts.map +1 -1
  13. package/app-layout/visual-refresh-toolbar/toolbar/index.js +1 -1
  14. package/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
  15. package/breadcrumb-group/analytics-metadata/interfaces.d.ts +21 -0
  16. package/breadcrumb-group/analytics-metadata/interfaces.d.ts.map +1 -0
  17. package/breadcrumb-group/analytics-metadata/interfaces.js +4 -0
  18. package/breadcrumb-group/analytics-metadata/interfaces.js.map +1 -0
  19. package/breadcrumb-group/analytics-metadata/styles.css.js +6 -0
  20. package/breadcrumb-group/analytics-metadata/styles.scoped.css +7 -0
  21. package/breadcrumb-group/analytics-metadata/styles.selectors.js +7 -0
  22. package/breadcrumb-group/implementation.d.ts +1 -1
  23. package/breadcrumb-group/implementation.d.ts.map +1 -1
  24. package/breadcrumb-group/implementation.js +30 -4
  25. package/breadcrumb-group/implementation.js.map +1 -1
  26. package/breadcrumb-group/index.d.ts.map +1 -1
  27. package/breadcrumb-group/index.js +1 -1
  28. package/breadcrumb-group/index.js.map +1 -1
  29. package/breadcrumb-group/interfaces.d.ts +3 -1
  30. package/breadcrumb-group/interfaces.d.ts.map +1 -1
  31. package/breadcrumb-group/interfaces.js.map +1 -1
  32. package/breadcrumb-group/item/funnel.d.ts.map +1 -1
  33. package/breadcrumb-group/item/funnel.js +2 -1
  34. package/breadcrumb-group/item/funnel.js.map +1 -1
  35. package/button-dropdown/interfaces.d.ts +4 -0
  36. package/button-dropdown/interfaces.d.ts.map +1 -1
  37. package/button-dropdown/interfaces.js.map +1 -1
  38. package/button-dropdown/internal.d.ts.map +1 -1
  39. package/button-dropdown/internal.js +3 -3
  40. package/button-dropdown/internal.js.map +1 -1
  41. package/button-dropdown/item-element/index.d.ts +1 -1
  42. package/button-dropdown/item-element/index.d.ts.map +1 -1
  43. package/button-dropdown/item-element/index.js +4 -4
  44. package/button-dropdown/item-element/index.js.map +1 -1
  45. package/button-dropdown/items-list.d.ts +1 -1
  46. package/button-dropdown/items-list.d.ts.map +1 -1
  47. package/button-dropdown/items-list.js +2 -2
  48. package/button-dropdown/items-list.js.map +1 -1
  49. package/drawer/implementation.d.ts.map +1 -1
  50. package/drawer/implementation.js +3 -2
  51. package/drawer/implementation.js.map +1 -1
  52. package/help-panel/implementation.d.ts.map +1 -1
  53. package/help-panel/implementation.js +3 -2
  54. package/help-panel/implementation.js.map +1 -1
  55. package/internal/components/tooltip/index.d.ts.map +1 -1
  56. package/internal/components/tooltip/index.js +2 -4
  57. package/internal/components/tooltip/index.js.map +1 -1
  58. package/internal/environment.js +1 -1
  59. package/internal/environment.json +1 -1
  60. package/internal/manifest.json +1 -1
  61. package/internal/plugins/helpers/use-global-breadcrumbs.js +2 -2
  62. package/internal/plugins/helpers/use-global-breadcrumbs.js.map +1 -1
  63. package/package.json +1 -1
  64. package/popover/container.d.ts +1 -1
  65. package/popover/container.d.ts.map +1 -1
  66. package/popover/container.js.map +1 -1
  67. package/popover/internal.d.ts +2 -1
  68. package/popover/internal.d.ts.map +1 -1
  69. package/popover/internal.js.map +1 -1
  70. package/property-filter/filtering-token/index.d.ts +2 -0
  71. package/property-filter/filtering-token/index.d.ts.map +1 -1
  72. package/property-filter/filtering-token/index.js +2 -2
  73. package/property-filter/filtering-token/index.js.map +1 -1
  74. package/property-filter/index.d.ts.map +1 -1
  75. package/property-filter/index.js +5 -195
  76. package/property-filter/index.js.map +1 -1
  77. package/property-filter/internal.d.ts +26 -0
  78. package/property-filter/internal.d.ts.map +1 -0
  79. package/property-filter/internal.js +201 -0
  80. package/property-filter/internal.js.map +1 -0
  81. package/property-filter/styles.css.js +38 -38
  82. package/property-filter/styles.scoped.css +39 -39
  83. package/property-filter/styles.selectors.js +38 -38
  84. package/property-filter/token-editor.d.ts +2 -10
  85. package/property-filter/token-editor.d.ts.map +1 -1
  86. package/property-filter/token-editor.js +36 -29
  87. package/property-filter/token-editor.js.map +1 -1
  88. package/property-filter/token.d.ts +2 -1
  89. package/property-filter/token.d.ts.map +1 -1
  90. package/property-filter/token.js +4 -7
  91. package/property-filter/token.js.map +1 -1
  92. package/side-navigation/implementation.d.ts.map +1 -1
  93. package/side-navigation/implementation.js +3 -2
  94. package/side-navigation/implementation.js.map +1 -1
  95. package/split-panel/bottom.d.ts.map +1 -1
  96. package/split-panel/bottom.js +3 -2
  97. package/split-panel/bottom.js.map +1 -1
  98. package/split-panel/implementation.d.ts.map +1 -1
  99. package/split-panel/implementation.js +3 -2
  100. package/split-panel/implementation.js.map +1 -1
  101. package/split-panel/side.d.ts.map +1 -1
  102. package/split-panel/side.js +4 -3
  103. package/split-panel/side.js.map +1 -1
@@ -0,0 +1,201 @@
1
+ import { __rest } from "tslib";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ import React, { useImperativeHandle, useRef, useState } from 'react';
5
+ import clsx from 'clsx';
6
+ import { InternalButton } from '../button/internal';
7
+ import { useInternalI18n } from '../i18n/context';
8
+ import { getBaseProps } from '../internal/base-component';
9
+ import TokenList from '../internal/components/token-list';
10
+ import { fireNonCancelableEvent } from '../internal/events';
11
+ import { useUniqueId } from '../internal/hooks/use-unique-id/index';
12
+ import { joinStrings } from '../internal/utils/strings';
13
+ import InternalSpaceBetween from '../space-between/internal';
14
+ import { SearchResults } from '../text-filter/search-results';
15
+ import { getAllowedOperators, getAutosuggestOptions, getQueryActions, parseText } from './controller';
16
+ import { getI18nToken } from './i18n-utils';
17
+ import { PropertyEditor } from './property-editor';
18
+ import PropertyFilterAutosuggest from './property-filter-autosuggest';
19
+ import { TokenButton } from './token';
20
+ import { useLoadItems } from './use-load-items';
21
+ import { matchTokenValue } from './utils';
22
+ import styles from './styles.css.js';
23
+ const PropertyFilterInternal = React.forwardRef((_a, ref) => {
24
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
25
+ var { disabled, countText, query, hideOperations, onChange, filteringProperties, filteringOptions, customGroupsText, disableFreeTextFiltering, freeTextFiltering, onLoadItems, virtualScroll, customControl, customFilterActions, filteringPlaceholder, filteringAriaLabel, filteringEmpty, filteringLoadingText, filteringFinishedText, filteringErrorText, filteringRecoveryText, filteringConstraintText, filteringStatusType, asyncProperties, tokenLimit, expandToViewport, tokenLimitShowFewerAriaLabel, tokenLimitShowMoreAriaLabel, enableTokenGroups = false, i18nStringsExt = {}, __internalRootRef } = _a, rest = __rest(_a, ["disabled", "countText", "query", "hideOperations", "onChange", "filteringProperties", "filteringOptions", "customGroupsText", "disableFreeTextFiltering", "freeTextFiltering", "onLoadItems", "virtualScroll", "customControl", "customFilterActions", "filteringPlaceholder", "filteringAriaLabel", "filteringEmpty", "filteringLoadingText", "filteringFinishedText", "filteringErrorText", "filteringRecoveryText", "filteringConstraintText", "filteringStatusType", "asyncProperties", "tokenLimit", "expandToViewport", "tokenLimitShowFewerAriaLabel", "tokenLimitShowMoreAriaLabel", "enableTokenGroups", "i18nStringsExt", "__internalRootRef"]);
26
+ const [removedTokenIndex, setRemovedTokenIndex] = useState(null);
27
+ const inputRef = useRef(null);
28
+ const baseProps = getBaseProps(rest);
29
+ const i18n = useInternalI18n('property-filter');
30
+ const i18nStrings = Object.assign(Object.assign(Object.assign({}, rest.i18nStrings), { allPropertiesLabel: i18n('i18nStrings.allPropertiesLabel', (_b = rest.i18nStrings) === null || _b === void 0 ? void 0 : _b.allPropertiesLabel), applyActionText: i18n('i18nStrings.applyActionText', (_c = rest.i18nStrings) === null || _c === void 0 ? void 0 : _c.applyActionText), cancelActionText: i18n('i18nStrings.cancelActionText', (_d = rest.i18nStrings) === null || _d === void 0 ? void 0 : _d.cancelActionText), clearFiltersText: i18n('i18nStrings.clearFiltersText', (_e = rest.i18nStrings) === null || _e === void 0 ? void 0 : _e.clearFiltersText), editTokenHeader: i18n('i18nStrings.editTokenHeader', (_f = rest.i18nStrings) === null || _f === void 0 ? void 0 : _f.editTokenHeader), groupPropertiesText: i18n('i18nStrings.groupPropertiesText', (_g = rest.i18nStrings) === null || _g === void 0 ? void 0 : _g.groupPropertiesText), groupValuesText: i18n('i18nStrings.groupValuesText', (_h = rest.i18nStrings) === null || _h === void 0 ? void 0 : _h.groupValuesText), operationAndText: i18n('i18nStrings.operationAndText', (_j = rest.i18nStrings) === null || _j === void 0 ? void 0 : _j.operationAndText), operationOrText: i18n('i18nStrings.operationOrText', (_k = rest.i18nStrings) === null || _k === void 0 ? void 0 : _k.operationOrText), operatorContainsText: i18n('i18nStrings.operatorContainsText', (_l = rest.i18nStrings) === null || _l === void 0 ? void 0 : _l.operatorContainsText), operatorDoesNotContainText: i18n('i18nStrings.operatorDoesNotContainText', (_m = rest.i18nStrings) === null || _m === void 0 ? void 0 : _m.operatorDoesNotContainText), operatorDoesNotEqualText: i18n('i18nStrings.operatorDoesNotEqualText', (_o = rest.i18nStrings) === null || _o === void 0 ? void 0 : _o.operatorDoesNotEqualText), operatorEqualsText: i18n('i18nStrings.operatorEqualsText', (_p = rest.i18nStrings) === null || _p === void 0 ? void 0 : _p.operatorEqualsText), operatorGreaterOrEqualText: i18n('i18nStrings.operatorGreaterOrEqualText', (_q = rest.i18nStrings) === null || _q === void 0 ? void 0 : _q.operatorGreaterOrEqualText), operatorGreaterText: i18n('i18nStrings.operatorGreaterText', (_r = rest.i18nStrings) === null || _r === void 0 ? void 0 : _r.operatorGreaterText), operatorLessOrEqualText: i18n('i18nStrings.operatorLessOrEqualText', (_s = rest.i18nStrings) === null || _s === void 0 ? void 0 : _s.operatorLessOrEqualText), operatorLessText: i18n('i18nStrings.operatorLessText', (_t = rest.i18nStrings) === null || _t === void 0 ? void 0 : _t.operatorLessText), operatorStartsWithText: i18n('i18nStrings.operatorStartsWithText', (_u = rest.i18nStrings) === null || _u === void 0 ? void 0 : _u.operatorStartsWithText), operatorDoesNotStartWithText: i18n('i18nStrings.operatorDoesNotStartWithText', (_v = rest.i18nStrings) === null || _v === void 0 ? void 0 : _v.operatorDoesNotStartWithText), operatorText: i18n('i18nStrings.operatorText', (_w = rest.i18nStrings) === null || _w === void 0 ? void 0 : _w.operatorText), operatorsText: i18n('i18nStrings.operatorsText', (_x = rest.i18nStrings) === null || _x === void 0 ? void 0 : _x.operatorsText), propertyText: i18n('i18nStrings.propertyText', (_y = rest.i18nStrings) === null || _y === void 0 ? void 0 : _y.propertyText), tokenLimitShowFewer: i18n('i18nStrings.tokenLimitShowFewer', (_z = rest.i18nStrings) === null || _z === void 0 ? void 0 : _z.tokenLimitShowFewer), tokenLimitShowMore: i18n('i18nStrings.tokenLimitShowMore', (_0 = rest.i18nStrings) === null || _0 === void 0 ? void 0 : _0.tokenLimitShowMore), valueText: i18n('i18nStrings.valueText', (_1 = rest.i18nStrings) === null || _1 === void 0 ? void 0 : _1.valueText) }), i18nStringsExt);
31
+ useImperativeHandle(ref, () => ({ focus: () => { var _a; return (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus(); } }), []);
32
+ const showResults = !!((_2 = query.tokens) === null || _2 === void 0 ? void 0 : _2.length) && !disabled && !!countText;
33
+ const { addToken, removeToken, setToken, setOperation, removeAllTokens } = getQueryActions(query, onChange, inputRef);
34
+ const [filteringText, setFilteringText] = useState('');
35
+ const { internalProperties, internalOptions, internalQuery, internalFreeText } = (() => {
36
+ var _a, _b;
37
+ const propertyByKey = filteringProperties.reduce((acc, property) => {
38
+ var _a, _b, _c, _d, _e;
39
+ const extendedOperators = ((_a = property === null || property === void 0 ? void 0 : property.operators) !== null && _a !== void 0 ? _a : []).reduce((acc, operator) => (typeof operator === 'object' ? acc.set(operator.operator, operator) : acc), new Map());
40
+ acc.set(property.key, {
41
+ propertyKey: property.key,
42
+ propertyLabel: (_b = property === null || property === void 0 ? void 0 : property.propertyLabel) !== null && _b !== void 0 ? _b : '',
43
+ groupValuesLabel: (_c = property === null || property === void 0 ? void 0 : property.groupValuesLabel) !== null && _c !== void 0 ? _c : '',
44
+ propertyGroup: property === null || property === void 0 ? void 0 : property.group,
45
+ operators: ((_d = property === null || property === void 0 ? void 0 : property.operators) !== null && _d !== void 0 ? _d : []).map(op => (typeof op === 'string' ? op : op.operator)),
46
+ defaultOperator: (_e = property === null || property === void 0 ? void 0 : property.defaultOperator) !== null && _e !== void 0 ? _e : '=',
47
+ getValueFormatter: operator => { var _a, _b; return (operator ? (_b = (_a = extendedOperators.get(operator)) === null || _a === void 0 ? void 0 : _a.format) !== null && _b !== void 0 ? _b : null : null); },
48
+ getValueFormRenderer: operator => { var _a, _b; return (operator ? (_b = (_a = extendedOperators.get(operator)) === null || _a === void 0 ? void 0 : _a.form) !== null && _b !== void 0 ? _b : null : null); },
49
+ externalProperty: property,
50
+ });
51
+ return acc;
52
+ }, new Map());
53
+ const getProperty = (propertyKey) => { var _a; return (_a = propertyByKey.get(propertyKey)) !== null && _a !== void 0 ? _a : null; };
54
+ const internalOptions = filteringOptions.map(option => {
55
+ var _a, _b;
56
+ return ({
57
+ property: getProperty(option.propertyKey),
58
+ value: option.value,
59
+ label: (_b = (_a = option.label) !== null && _a !== void 0 ? _a : option.value) !== null && _b !== void 0 ? _b : '',
60
+ });
61
+ });
62
+ const internalQuery = {
63
+ operation: query.operation,
64
+ tokens: query.tokens.map(token => ({
65
+ property: token.propertyKey ? getProperty(token.propertyKey) : null,
66
+ operator: token.operator,
67
+ value: token.value,
68
+ __source: token,
69
+ })),
70
+ };
71
+ const internalFreeText = {
72
+ disabled: disableFreeTextFiltering,
73
+ operators: (_a = freeTextFiltering === null || freeTextFiltering === void 0 ? void 0 : freeTextFiltering.operators) !== null && _a !== void 0 ? _a : [':', '!:'],
74
+ defaultOperator: (_b = freeTextFiltering === null || freeTextFiltering === void 0 ? void 0 : freeTextFiltering.defaultOperator) !== null && _b !== void 0 ? _b : ':',
75
+ };
76
+ return { internalProperties: [...propertyByKey.values()], internalOptions, internalQuery, internalFreeText };
77
+ })();
78
+ i18nStrings.removeTokenButtonAriaLabel = i18n('i18nStrings.removeTokenButtonAriaLabel', (_3 = rest.i18nStrings) === null || _3 === void 0 ? void 0 : _3.removeTokenButtonAriaLabel, format => token => format(getI18nToken(token)));
79
+ const parsedText = parseText(filteringText, internalProperties, internalFreeText);
80
+ const autosuggestOptions = getAutosuggestOptions(parsedText, internalProperties, internalOptions, customGroupsText, i18nStrings);
81
+ const createToken = (currentText) => {
82
+ const parsedText = parseText(currentText, internalProperties, internalFreeText);
83
+ let newToken;
84
+ switch (parsedText.step) {
85
+ case 'property': {
86
+ newToken = matchTokenValue({
87
+ property: parsedText.property,
88
+ operator: parsedText.operator,
89
+ value: parsedText.value,
90
+ }, internalOptions);
91
+ break;
92
+ }
93
+ case 'free-text': {
94
+ newToken = {
95
+ operator: parsedText.operator || internalFreeText.defaultOperator,
96
+ value: parsedText.value,
97
+ };
98
+ break;
99
+ }
100
+ case 'operator': {
101
+ newToken = {
102
+ operator: internalFreeText.defaultOperator,
103
+ value: currentText,
104
+ };
105
+ break;
106
+ }
107
+ }
108
+ if (internalFreeText.disabled && !('propertyKey' in newToken)) {
109
+ return;
110
+ }
111
+ addToken(newToken);
112
+ setFilteringText('');
113
+ };
114
+ const getLoadMoreDetail = (parsedText, filteringText) => {
115
+ const loadMoreDetail = {
116
+ filteringProperty: undefined,
117
+ filteringText,
118
+ filteringOperator: undefined,
119
+ };
120
+ if (parsedText.step === 'property') {
121
+ loadMoreDetail.filteringProperty = parsedText.property.externalProperty;
122
+ loadMoreDetail.filteringText = parsedText.value;
123
+ loadMoreDetail.filteringOperator = parsedText.operator;
124
+ }
125
+ return loadMoreDetail;
126
+ };
127
+ const loadMoreDetail = getLoadMoreDetail(parsedText, filteringText);
128
+ const inputLoadItemsHandlers = useLoadItems(onLoadItems, loadMoreDetail.filteringText, loadMoreDetail.filteringProperty, loadMoreDetail.filteringText, loadMoreDetail.filteringOperator);
129
+ const asyncProps = {
130
+ empty: filteringEmpty,
131
+ loadingText: filteringLoadingText,
132
+ finishedText: filteringFinishedText,
133
+ errorText: filteringErrorText,
134
+ recoveryText: filteringRecoveryText,
135
+ statusType: filteringStatusType,
136
+ };
137
+ const asyncAutosuggestProps = !!filteringText.length || asyncProperties
138
+ ? Object.assign(Object.assign({}, inputLoadItemsHandlers), asyncProps) : {};
139
+ const handleSelected = event => {
140
+ var _a;
141
+ const { detail: option } = event;
142
+ const value = option.value || '';
143
+ if (!value) {
144
+ return;
145
+ }
146
+ if (!('keepOpenOnSelect' in option)) {
147
+ createToken(value);
148
+ return;
149
+ }
150
+ // stop dropdown from closing
151
+ event.preventDefault();
152
+ const parsedText = parseText(value, internalProperties, internalFreeText);
153
+ const loadMoreDetail = getLoadMoreDetail(parsedText, value);
154
+ // Insert operator automatically if only one operator is defined for the given property.
155
+ if (parsedText.step === 'operator') {
156
+ const operators = getAllowedOperators(parsedText.property);
157
+ if (value.trim() === parsedText.property.propertyLabel && operators.length === 1) {
158
+ loadMoreDetail.filteringProperty = (_a = parsedText.property.externalProperty) !== null && _a !== void 0 ? _a : undefined;
159
+ loadMoreDetail.filteringOperator = operators[0];
160
+ loadMoreDetail.filteringText = '';
161
+ setFilteringText(parsedText.property.propertyLabel + ' ' + operators[0] + ' ');
162
+ }
163
+ }
164
+ fireNonCancelableEvent(onLoadItems, Object.assign(Object.assign({}, loadMoreDetail), { firstPage: true, samePage: false }));
165
+ };
166
+ const operatorForm = parsedText.step === 'property' && parsedText.property.getValueFormRenderer(parsedText.operator);
167
+ const searchResultsId = useUniqueId('property-filter-search-results');
168
+ const constraintTextId = useUniqueId('property-filter-constraint');
169
+ const textboxAriaDescribedBy = filteringConstraintText
170
+ ? joinStrings(rest.ariaDescribedby, constraintTextId)
171
+ : rest.ariaDescribedby;
172
+ return (React.createElement("div", Object.assign({}, baseProps, { className: clsx(baseProps.className, styles.root), ref: __internalRootRef }),
173
+ React.createElement("div", { className: styles['search-field'] },
174
+ customControl && React.createElement("div", { className: styles['custom-control'] }, customControl),
175
+ React.createElement(PropertyFilterAutosuggest, Object.assign({ ref: inputRef, virtualScroll: virtualScroll, enteredTextLabel: i18nStrings.enteredTextLabel, ariaLabel: filteringAriaLabel !== null && filteringAriaLabel !== void 0 ? filteringAriaLabel : i18nStrings.filteringAriaLabel, placeholder: filteringPlaceholder !== null && filteringPlaceholder !== void 0 ? filteringPlaceholder : i18nStrings.filteringPlaceholder, ariaLabelledby: rest.ariaLabelledby, ariaDescribedby: textboxAriaDescribedBy, controlId: rest.controlId, value: filteringText, disabled: disabled }, autosuggestOptions, { onChange: event => setFilteringText(event.detail.value), empty: filteringEmpty }, asyncAutosuggestProps, { expandToViewport: expandToViewport, onOptionClick: handleSelected, customForm: operatorForm && (React.createElement(PropertyEditor, { property: parsedText.property, operator: parsedText.operator, filter: parsedText.value, operatorForm: operatorForm, i18nStrings: i18nStrings, onCancel: () => {
176
+ var _a, _b;
177
+ setFilteringText('');
178
+ (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.close();
179
+ (_b = inputRef.current) === null || _b === void 0 ? void 0 : _b.focus({ preventDropdown: true });
180
+ }, onSubmit: token => {
181
+ var _a, _b;
182
+ addToken(token);
183
+ setFilteringText('');
184
+ (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus({ preventDropdown: true });
185
+ (_b = inputRef.current) === null || _b === void 0 ? void 0 : _b.close();
186
+ } })), hideEnteredTextOption: internalFreeText.disabled && parsedText.step !== 'property', clearAriaLabel: i18nStrings.clearAriaLabel, searchResultsId: showResults ? searchResultsId : undefined })),
187
+ showResults ? (React.createElement("div", { className: styles.results },
188
+ React.createElement(SearchResults, { id: searchResultsId }, countText))) : null),
189
+ filteringConstraintText && (React.createElement("div", { id: constraintTextId, className: styles.constraint }, filteringConstraintText)),
190
+ internalQuery.tokens && internalQuery.tokens.length > 0 && (React.createElement("div", { className: styles.tokens },
191
+ React.createElement(InternalSpaceBetween, { size: "xs", direction: "horizontal" },
192
+ React.createElement(TokenList, { alignment: "inline", limit: tokenLimit, items: internalQuery.tokens, limitShowFewerAriaLabel: tokenLimitShowFewerAriaLabel, limitShowMoreAriaLabel: tokenLimitShowMoreAriaLabel, renderItem: (token, tokenIndex) => (React.createElement(TokenButton, { token: token, first: tokenIndex === 0, operation: internalQuery.operation, removeToken: () => {
193
+ removeToken(tokenIndex);
194
+ setRemovedTokenIndex(tokenIndex);
195
+ }, setToken: (newToken) => setToken(tokenIndex, newToken), setOperation: setOperation, filteringProperties: internalProperties, filteringOptions: internalOptions, asyncProps: asyncProps, onLoadItems: onLoadItems, i18nStrings: i18nStrings, asyncProperties: asyncProperties, hideOperations: hideOperations, customGroupsText: customGroupsText, freeTextFiltering: internalFreeText, disabled: disabled, expandToViewport: expandToViewport, enableTokenGroups: enableTokenGroups })), i18nStrings: {
196
+ limitShowFewer: i18nStrings.tokenLimitShowFewer,
197
+ limitShowMore: i18nStrings.tokenLimitShowMore,
198
+ }, after: customFilterActions ? (React.createElement("div", { className: styles['custom-filter-actions'] }, customFilterActions)) : (React.createElement(InternalButton, { formAction: "none", onClick: removeAllTokens, className: styles['remove-all'], disabled: disabled }, i18nStrings.clearFiltersText)), moveFocusNextToIndex: removedTokenIndex }))))));
199
+ });
200
+ export default PropertyFilterInternal;
201
+ //# sourceMappingURL=internal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal.js","source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AW,EACxB,eAAe,EAAE,eAAe,EAChC,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,gBAAgB,EAClC,iBAAiB,EAAE,gBAAgB,EACnC,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,gBAAgB,EAClC,iBAAiB,EAAE,iBAAiB,GACpC,CACH,EACD,WAAW,EAAE;wBACX,cAAc,EAAE,WAAW,CAAC,mBAAmB;wBAC/C,aAAa,EAAE,WAAW,CAAC,kBAAkB;qBAC9C,EACD,KAAK,EACH,mBAAmB,CAAC,CAAC,CAAC,CACpB,6BAAK,SAAS,EAAE,MAAM,CAAC,uBAAuB,CAAC,IAAG,mBAAmB,CAAO,CAC7E,CAAC,CAAC,CAAC,CACF,oBAAC,cAAc,IACb,UAAU,EAAC,MAAM,EACjB,OAAO,EAAE,eAAe,EACxB,SAAS,EAAE,MAAM,CAAC,YAAY,CAAC,EAC/B,QAAQ,EAAE,QAAQ,IAEjB,WAAW,CAAC,gBAAgB,CACd,CAClB,EAEH,oBAAoB,EAAE,iBAAiB,GACvC,CACmB,CACnB,CACP,CACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,sBAAsB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useImperativeHandle, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { PropertyFilterOperator } from '@cloudscape-design/collection-hooks';\n\nimport { InternalButton } from '../button/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { getBaseProps } from '../internal/base-component';\nimport { AutosuggestInputRef } from '../internal/components/autosuggest-input';\nimport TokenList from '../internal/components/token-list';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useUniqueId } from '../internal/hooks/use-unique-id/index';\nimport { SomeRequired } from '../internal/types';\nimport { joinStrings } from '../internal/utils/strings';\nimport InternalSpaceBetween from '../space-between/internal';\nimport { SearchResults } from '../text-filter/search-results';\nimport { getAllowedOperators, getAutosuggestOptions, getQueryActions, parseText } from './controller';\nimport { getI18nToken } from './i18n-utils';\nimport {\n ComparisonOperator,\n ExtendedOperator,\n FilteringProperty,\n FormattedToken,\n InternalFilteringOption,\n InternalFilteringProperty,\n InternalFreeTextFiltering,\n InternalQuery,\n ParsedText,\n PropertyFilterProps,\n Ref,\n Token,\n} from './interfaces';\nimport { PropertyEditor } from './property-editor';\nimport PropertyFilterAutosuggest, { PropertyFilterAutosuggestProps } from './property-filter-autosuggest';\nimport { TokenButton } from './token';\nimport { useLoadItems } from './use-load-items';\nimport { matchTokenValue } from './utils';\n\nimport styles from './styles.css.js';\n\nexport interface I18nStringsExt {\n tokenEditorTokenActionsLabel?: (token: FormattedToken) => string;\n tokenEditorTokenRemoveLabel?: (token: FormattedToken) => string;\n tokenEditorTokenRemoveFromGroupLabel?: (token: FormattedToken) => string;\n tokenEditorAddNewTokenLabel?: string;\n tokenEditorAddTokenActionsLabel?: string;\n tokenEditorAddExistingTokenLabel?: (token: FormattedToken) => string;\n}\n\nexport type PropertyFilterInternalProps = SomeRequired<\n PropertyFilterProps,\n 'filteringOptions' | 'customGroupsText' | 'disableFreeTextFiltering'\n> &\n InternalBaseComponentProps & {\n enableTokenGroups?: boolean;\n i18nStringsExt?: I18nStringsExt;\n };\n\nconst PropertyFilterInternal = React.forwardRef(\n (\n {\n disabled,\n countText,\n query,\n hideOperations,\n onChange,\n filteringProperties,\n filteringOptions,\n customGroupsText,\n disableFreeTextFiltering,\n freeTextFiltering,\n onLoadItems,\n virtualScroll,\n customControl,\n customFilterActions,\n filteringPlaceholder,\n filteringAriaLabel,\n filteringEmpty,\n filteringLoadingText,\n filteringFinishedText,\n filteringErrorText,\n filteringRecoveryText,\n filteringConstraintText,\n filteringStatusType,\n asyncProperties,\n tokenLimit,\n expandToViewport,\n tokenLimitShowFewerAriaLabel,\n tokenLimitShowMoreAriaLabel,\n enableTokenGroups = false,\n i18nStringsExt = {},\n __internalRootRef,\n ...rest\n }: PropertyFilterInternalProps,\n ref: React.Ref<Ref>\n ) => {\n const [removedTokenIndex, setRemovedTokenIndex] = useState<null | number>(null);\n\n const inputRef = useRef<AutosuggestInputRef>(null);\n const baseProps = getBaseProps(rest);\n\n const i18n = useInternalI18n('property-filter');\n const i18nStrings: PropertyFilterProps.I18nStrings & I18nStringsExt = {\n ...rest.i18nStrings,\n allPropertiesLabel: i18n('i18nStrings.allPropertiesLabel', rest.i18nStrings?.allPropertiesLabel),\n applyActionText: i18n('i18nStrings.applyActionText', rest.i18nStrings?.applyActionText),\n cancelActionText: i18n('i18nStrings.cancelActionText', rest.i18nStrings?.cancelActionText),\n clearFiltersText: i18n('i18nStrings.clearFiltersText', rest.i18nStrings?.clearFiltersText),\n editTokenHeader: i18n('i18nStrings.editTokenHeader', rest.i18nStrings?.editTokenHeader),\n groupPropertiesText: i18n('i18nStrings.groupPropertiesText', rest.i18nStrings?.groupPropertiesText),\n groupValuesText: i18n('i18nStrings.groupValuesText', rest.i18nStrings?.groupValuesText),\n operationAndText: i18n('i18nStrings.operationAndText', rest.i18nStrings?.operationAndText),\n operationOrText: i18n('i18nStrings.operationOrText', rest.i18nStrings?.operationOrText),\n operatorContainsText: i18n('i18nStrings.operatorContainsText', rest.i18nStrings?.operatorContainsText),\n operatorDoesNotContainText: i18n(\n 'i18nStrings.operatorDoesNotContainText',\n rest.i18nStrings?.operatorDoesNotContainText\n ),\n operatorDoesNotEqualText: i18n(\n 'i18nStrings.operatorDoesNotEqualText',\n rest.i18nStrings?.operatorDoesNotEqualText\n ),\n operatorEqualsText: i18n('i18nStrings.operatorEqualsText', rest.i18nStrings?.operatorEqualsText),\n operatorGreaterOrEqualText: i18n(\n 'i18nStrings.operatorGreaterOrEqualText',\n rest.i18nStrings?.operatorGreaterOrEqualText\n ),\n operatorGreaterText: i18n('i18nStrings.operatorGreaterText', rest.i18nStrings?.operatorGreaterText),\n operatorLessOrEqualText: i18n('i18nStrings.operatorLessOrEqualText', rest.i18nStrings?.operatorLessOrEqualText),\n operatorLessText: i18n('i18nStrings.operatorLessText', rest.i18nStrings?.operatorLessText),\n operatorStartsWithText: i18n('i18nStrings.operatorStartsWithText', rest.i18nStrings?.operatorStartsWithText),\n operatorDoesNotStartWithText: i18n(\n 'i18nStrings.operatorDoesNotStartWithText',\n rest.i18nStrings?.operatorDoesNotStartWithText\n ),\n operatorText: i18n('i18nStrings.operatorText', rest.i18nStrings?.operatorText),\n operatorsText: i18n('i18nStrings.operatorsText', rest.i18nStrings?.operatorsText),\n propertyText: i18n('i18nStrings.propertyText', rest.i18nStrings?.propertyText),\n tokenLimitShowFewer: i18n('i18nStrings.tokenLimitShowFewer', rest.i18nStrings?.tokenLimitShowFewer),\n tokenLimitShowMore: i18n('i18nStrings.tokenLimitShowMore', rest.i18nStrings?.tokenLimitShowMore),\n valueText: i18n('i18nStrings.valueText', rest.i18nStrings?.valueText),\n ...i18nStringsExt,\n };\n\n useImperativeHandle(ref, () => ({ focus: () => inputRef.current?.focus() }), []);\n const showResults = !!query.tokens?.length && !disabled && !!countText;\n const { addToken, removeToken, setToken, setOperation, removeAllTokens } = getQueryActions(\n query,\n onChange,\n inputRef\n );\n const [filteringText, setFilteringText] = useState<string>('');\n\n const { internalProperties, internalOptions, internalQuery, internalFreeText } = (() => {\n const propertyByKey = filteringProperties.reduce((acc, property) => {\n const extendedOperators = (property?.operators ?? []).reduce(\n (acc, operator) => (typeof operator === 'object' ? acc.set(operator.operator, operator) : acc),\n new Map<PropertyFilterOperator, null | ExtendedOperator<any>>()\n );\n acc.set(property.key, {\n propertyKey: property.key,\n propertyLabel: property?.propertyLabel ?? '',\n groupValuesLabel: property?.groupValuesLabel ?? '',\n propertyGroup: property?.group,\n operators: (property?.operators ?? []).map(op => (typeof op === 'string' ? op : op.operator)),\n defaultOperator: property?.defaultOperator ?? '=',\n getValueFormatter: operator => (operator ? extendedOperators.get(operator)?.format ?? null : null),\n getValueFormRenderer: operator => (operator ? extendedOperators.get(operator)?.form ?? null : null),\n externalProperty: property,\n });\n return acc;\n }, new Map<string, InternalFilteringProperty>());\n const getProperty = (propertyKey: string): null | InternalFilteringProperty =>\n propertyByKey.get(propertyKey) ?? null;\n\n const internalOptions: readonly InternalFilteringOption[] = filteringOptions.map(option => ({\n property: getProperty(option.propertyKey),\n value: option.value,\n label: option.label ?? option.value ?? '',\n }));\n\n const internalQuery: InternalQuery = {\n operation: query.operation,\n tokens: query.tokens.map(token => ({\n property: token.propertyKey ? getProperty(token.propertyKey) : null,\n operator: token.operator,\n value: token.value,\n __source: token,\n })),\n };\n\n const internalFreeText: InternalFreeTextFiltering = {\n disabled: disableFreeTextFiltering,\n operators: freeTextFiltering?.operators ?? [':', '!:'],\n defaultOperator: freeTextFiltering?.defaultOperator ?? ':',\n };\n\n return { internalProperties: [...propertyByKey.values()], internalOptions, internalQuery, internalFreeText };\n })();\n\n i18nStrings.removeTokenButtonAriaLabel = i18n(\n 'i18nStrings.removeTokenButtonAriaLabel',\n rest.i18nStrings?.removeTokenButtonAriaLabel,\n format => token => format(getI18nToken(token))\n );\n\n const parsedText = parseText(filteringText, internalProperties, internalFreeText);\n const autosuggestOptions = getAutosuggestOptions(\n parsedText,\n internalProperties,\n internalOptions,\n customGroupsText,\n i18nStrings\n );\n\n const createToken = (currentText: string) => {\n const parsedText = parseText(currentText, internalProperties, internalFreeText);\n let newToken: Token;\n switch (parsedText.step) {\n case 'property': {\n newToken = matchTokenValue(\n {\n property: parsedText.property,\n operator: parsedText.operator,\n value: parsedText.value,\n },\n internalOptions\n );\n break;\n }\n case 'free-text': {\n newToken = {\n operator: parsedText.operator || internalFreeText.defaultOperator,\n value: parsedText.value,\n };\n break;\n }\n case 'operator': {\n newToken = {\n operator: internalFreeText.defaultOperator,\n value: currentText,\n };\n break;\n }\n }\n if (internalFreeText.disabled && !('propertyKey' in newToken)) {\n return;\n }\n addToken(newToken);\n setFilteringText('');\n };\n const getLoadMoreDetail = (parsedText: ParsedText, filteringText: string) => {\n const loadMoreDetail: {\n filteringProperty: FilteringProperty | undefined;\n filteringText: string;\n filteringOperator: ComparisonOperator | undefined;\n } = {\n filteringProperty: undefined,\n filteringText,\n filteringOperator: undefined,\n };\n if (parsedText.step === 'property') {\n loadMoreDetail.filteringProperty = parsedText.property.externalProperty;\n loadMoreDetail.filteringText = parsedText.value;\n loadMoreDetail.filteringOperator = parsedText.operator;\n }\n return loadMoreDetail;\n };\n const loadMoreDetail = getLoadMoreDetail(parsedText, filteringText);\n const inputLoadItemsHandlers = useLoadItems(\n onLoadItems,\n loadMoreDetail.filteringText,\n loadMoreDetail.filteringProperty,\n loadMoreDetail.filteringText,\n loadMoreDetail.filteringOperator\n );\n const asyncProps = {\n empty: filteringEmpty,\n loadingText: filteringLoadingText,\n finishedText: filteringFinishedText,\n errorText: filteringErrorText,\n recoveryText: filteringRecoveryText,\n statusType: filteringStatusType,\n };\n const asyncAutosuggestProps =\n !!filteringText.length || asyncProperties\n ? {\n ...inputLoadItemsHandlers,\n ...asyncProps,\n }\n : {};\n const handleSelected: PropertyFilterAutosuggestProps['onOptionClick'] = event => {\n const { detail: option } = event;\n const value = option.value || '';\n if (!value) {\n return;\n }\n\n if (!('keepOpenOnSelect' in option)) {\n createToken(value);\n return;\n }\n\n // stop dropdown from closing\n event.preventDefault();\n\n const parsedText = parseText(value, internalProperties, internalFreeText);\n const loadMoreDetail = getLoadMoreDetail(parsedText, value);\n\n // Insert operator automatically if only one operator is defined for the given property.\n if (parsedText.step === 'operator') {\n const operators = getAllowedOperators(parsedText.property);\n if (value.trim() === parsedText.property.propertyLabel && operators.length === 1) {\n loadMoreDetail.filteringProperty = parsedText.property.externalProperty ?? undefined;\n loadMoreDetail.filteringOperator = operators[0];\n loadMoreDetail.filteringText = '';\n setFilteringText(parsedText.property.propertyLabel + ' ' + operators[0] + ' ');\n }\n }\n\n fireNonCancelableEvent(onLoadItems, { ...loadMoreDetail, firstPage: true, samePage: false });\n };\n\n const operatorForm =\n parsedText.step === 'property' && parsedText.property.getValueFormRenderer(parsedText.operator);\n\n const searchResultsId = useUniqueId('property-filter-search-results');\n const constraintTextId = useUniqueId('property-filter-constraint');\n const textboxAriaDescribedBy = filteringConstraintText\n ? joinStrings(rest.ariaDescribedby, constraintTextId)\n : rest.ariaDescribedby;\n\n return (\n <div {...baseProps} className={clsx(baseProps.className, styles.root)} ref={__internalRootRef}>\n <div className={styles['search-field']}>\n {customControl && <div className={styles['custom-control']}>{customControl}</div>}\n <PropertyFilterAutosuggest\n ref={inputRef}\n virtualScroll={virtualScroll}\n enteredTextLabel={i18nStrings.enteredTextLabel}\n ariaLabel={filteringAriaLabel ?? i18nStrings.filteringAriaLabel}\n placeholder={filteringPlaceholder ?? i18nStrings.filteringPlaceholder}\n ariaLabelledby={rest.ariaLabelledby}\n ariaDescribedby={textboxAriaDescribedBy}\n controlId={rest.controlId}\n value={filteringText}\n disabled={disabled}\n {...autosuggestOptions}\n onChange={event => setFilteringText(event.detail.value)}\n empty={filteringEmpty}\n {...asyncAutosuggestProps}\n expandToViewport={expandToViewport}\n onOptionClick={handleSelected}\n customForm={\n operatorForm && (\n <PropertyEditor\n property={parsedText.property}\n operator={parsedText.operator}\n filter={parsedText.value}\n operatorForm={operatorForm}\n i18nStrings={i18nStrings}\n onCancel={() => {\n setFilteringText('');\n inputRef.current?.close();\n inputRef.current?.focus({ preventDropdown: true });\n }}\n onSubmit={token => {\n addToken(token);\n setFilteringText('');\n inputRef.current?.focus({ preventDropdown: true });\n inputRef.current?.close();\n }}\n />\n )\n }\n hideEnteredTextOption={internalFreeText.disabled && parsedText.step !== 'property'}\n clearAriaLabel={i18nStrings.clearAriaLabel}\n searchResultsId={showResults ? searchResultsId : undefined}\n />\n {showResults ? (\n <div className={styles.results}>\n <SearchResults id={searchResultsId}>{countText}</SearchResults>\n </div>\n ) : null}\n </div>\n {filteringConstraintText && (\n <div id={constraintTextId} className={styles.constraint}>\n {filteringConstraintText}\n </div>\n )}\n {internalQuery.tokens && internalQuery.tokens.length > 0 && (\n <div className={styles.tokens}>\n <InternalSpaceBetween size=\"xs\" direction=\"horizontal\">\n <TokenList\n alignment=\"inline\"\n limit={tokenLimit}\n items={internalQuery.tokens}\n limitShowFewerAriaLabel={tokenLimitShowFewerAriaLabel}\n limitShowMoreAriaLabel={tokenLimitShowMoreAriaLabel}\n renderItem={(token, tokenIndex) => (\n <TokenButton\n token={token}\n first={tokenIndex === 0}\n operation={internalQuery.operation}\n removeToken={() => {\n removeToken(tokenIndex);\n setRemovedTokenIndex(tokenIndex);\n }}\n setToken={(newToken: Token) => setToken(tokenIndex, newToken)}\n setOperation={setOperation}\n filteringProperties={internalProperties}\n filteringOptions={internalOptions}\n asyncProps={asyncProps}\n onLoadItems={onLoadItems}\n i18nStrings={i18nStrings}\n asyncProperties={asyncProperties}\n hideOperations={hideOperations}\n customGroupsText={customGroupsText}\n freeTextFiltering={internalFreeText}\n disabled={disabled}\n expandToViewport={expandToViewport}\n enableTokenGroups={enableTokenGroups}\n />\n )}\n i18nStrings={{\n limitShowFewer: i18nStrings.tokenLimitShowFewer,\n limitShowMore: i18nStrings.tokenLimitShowMore,\n }}\n after={\n customFilterActions ? (\n <div className={styles['custom-filter-actions']}>{customFilterActions}</div>\n ) : (\n <InternalButton\n formAction=\"none\"\n onClick={removeAllTokens}\n className={styles['remove-all']}\n disabled={disabled}\n >\n {i18nStrings.clearFiltersText}\n </InternalButton>\n )\n }\n moveFocusNextToIndex={removedTokenIndex}\n />\n </InternalSpaceBetween>\n </div>\n )}\n </div>\n );\n }\n);\n\nexport default PropertyFilterInternal;\n"]}
@@ -1,43 +1,43 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
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"
4
+ "root": "awsui_root_1wzqe_109an_97",
5
+ "search-field": "awsui_search-field_1wzqe_109an_132",
6
+ "input-wrapper": "awsui_input-wrapper_1wzqe_109an_138",
7
+ "add-token": "awsui_add-token_1wzqe_109an_142",
8
+ "tokens": "awsui_tokens_1wzqe_109an_149",
9
+ "token-operator": "awsui_token-operator_1wzqe_109an_154",
10
+ "property-editor": "awsui_property-editor_1wzqe_109an_158",
11
+ "property-editor-form": "awsui_property-editor-form_1wzqe_109an_166",
12
+ "property-editor-field-property": "awsui_property-editor-field-property_1wzqe_109an_169",
13
+ "property-editor-field-operator": "awsui_property-editor-field-operator_1wzqe_109an_172",
14
+ "property-editor-field-value": "awsui_property-editor-field-value_1wzqe_109an_175",
15
+ "property-editor-cancel": "awsui_property-editor-cancel_1wzqe_109an_178",
16
+ "property-editor-submit": "awsui_property-editor-submit_1wzqe_109an_181",
17
+ "property-editor-actions": "awsui_property-editor-actions_1wzqe_109an_184",
18
+ "token-editor": "awsui_token-editor_1wzqe_109an_191",
19
+ "token-editor-form": "awsui_token-editor-form_1wzqe_109an_199",
20
+ "token-editor-field-property": "awsui_token-editor-field-property_1wzqe_109an_202",
21
+ "token-editor-field-operator": "awsui_token-editor-field-operator_1wzqe_109an_205",
22
+ "token-editor-field-value": "awsui_token-editor-field-value_1wzqe_109an_208",
23
+ "token-editor-cancel": "awsui_token-editor-cancel_1wzqe_109an_211",
24
+ "token-editor-submit": "awsui_token-editor-submit_1wzqe_109an_214",
25
+ "token-editor-actions": "awsui_token-editor-actions_1wzqe_109an_217",
26
+ "token-editor-grid": "awsui_token-editor-grid_1wzqe_109an_226",
27
+ "token-editor-grid-group": "awsui_token-editor-grid-group_1wzqe_109an_263",
28
+ "token-editor-narrow": "awsui_token-editor-narrow_1wzqe_109an_266",
29
+ "token-editor-group": "awsui_token-editor-group_1wzqe_109an_270",
30
+ "token-editor-grid-header": "awsui_token-editor-grid-header_1wzqe_109an_275",
31
+ "token-editor-grid-cell": "awsui_token-editor-grid-cell_1wzqe_109an_281",
32
+ "token-editor-add-token": "awsui_token-editor-add-token_1wzqe_109an_286",
33
+ "custom-content-wrapper": "awsui_custom-content-wrapper_1wzqe_109an_290",
34
+ "custom-control": "awsui_custom-control_1wzqe_109an_294",
35
+ "input": "awsui_input_1wzqe_109an_138",
36
+ "results": "awsui_results_1wzqe_109an_302",
37
+ "token-trigger": "awsui_token-trigger_1wzqe_109an_307",
38
+ "remove-all": "awsui_remove-all_1wzqe_109an_312",
39
+ "join-operation": "awsui_join-operation_1wzqe_109an_313",
40
+ "custom-filter-actions": "awsui_custom-filter-actions_1wzqe_109an_314",
41
+ "constraint": "awsui_constraint_1wzqe_109an_318"
42
42
  };
43
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_8mqhl_97:not(#\9) {
97
+ .awsui_root_1wzqe_109an_97:not(#\9) {
98
98
  border-collapse: separate;
99
99
  border-spacing: 0;
100
100
  box-sizing: border-box;
@@ -130,33 +130,33 @@ 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_8mqhl_132:not(#\9) {
133
+ .awsui_search-field_1wzqe_109an_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_8mqhl_138:not(#\9) {
139
+ .awsui_input-wrapper_1wzqe_109an_138:not(#\9) {
140
140
  flex-grow: 1;
141
141
  }
142
142
 
143
- .awsui_add-token_1wzqe_8mqhl_142:not(#\9) {
143
+ .awsui_add-token_1wzqe_109an_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_8mqhl_149:not(#\9) {
150
+ .awsui_tokens_1wzqe_109an_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_8mqhl_154:not(#\9) {
155
+ .awsui_token-operator_1wzqe_109an_154:not(#\9) {
156
156
  font-weight: bold;
157
157
  }
158
158
 
159
- .awsui_property-editor_1wzqe_8mqhl_158:not(#\9) {
159
+ .awsui_property-editor_1wzqe_109an_158:not(#\9) {
160
160
  -webkit-user-select: text;
161
161
  user-select: text;
162
162
  margin-block: var(--space-xxs-p8yyaw, 4px);
@@ -165,32 +165,32 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
165
165
  padding-inline: var(--space-m-udix3p, 16px);
166
166
  overflow-y: auto;
167
167
  }
168
- .awsui_property-editor-form_1wzqe_8mqhl_166:not(#\9) {
168
+ .awsui_property-editor-form_1wzqe_109an_166:not(#\9) {
169
169
  margin-block-end: var(--space-scaled-l-0hpmd7, 20px);
170
170
  }
171
- .awsui_property-editor-field-property_1wzqe_8mqhl_169:not(#\9) {
171
+ .awsui_property-editor-field-property_1wzqe_109an_169:not(#\9) {
172
172
  /* used in test-utils */
173
173
  }
174
- .awsui_property-editor-field-operator_1wzqe_8mqhl_172:not(#\9) {
174
+ .awsui_property-editor-field-operator_1wzqe_109an_172:not(#\9) {
175
175
  margin-block-start: var(--space-scaled-l-0hpmd7, 20px);
176
176
  }
177
- .awsui_property-editor-field-value_1wzqe_8mqhl_175:not(#\9) {
177
+ .awsui_property-editor-field-value_1wzqe_109an_175:not(#\9) {
178
178
  margin-block-start: var(--space-scaled-l-0hpmd7, 20px);
179
179
  }
180
- .awsui_property-editor-cancel_1wzqe_8mqhl_178:not(#\9) {
180
+ .awsui_property-editor-cancel_1wzqe_109an_178:not(#\9) {
181
181
  margin-inline-end: var(--space-xs-zb16t3, 8px);
182
182
  }
183
- .awsui_property-editor-submit_1wzqe_8mqhl_181:not(#\9) {
183
+ .awsui_property-editor-submit_1wzqe_109an_181:not(#\9) {
184
184
  /* used in test-utils */
185
185
  }
186
- .awsui_property-editor-actions_1wzqe_8mqhl_184:not(#\9) {
186
+ .awsui_property-editor-actions_1wzqe_109an_184:not(#\9) {
187
187
  display: flex;
188
188
  justify-content: flex-end;
189
189
  padding-block-start: var(--space-s-34lx8l, 12px);
190
190
  border-block-start: 1px solid var(--color-border-dropdown-item-default-k36ra7, #b6bec9);
191
191
  }
192
192
 
193
- .awsui_token-editor_1wzqe_8mqhl_191:not(#\9) {
193
+ .awsui_token-editor_1wzqe_109an_191:not(#\9) {
194
194
  display: flex;
195
195
  flex-direction: column;
196
196
  gap: var(--space-s-34lx8l, 12px);
@@ -199,25 +199,25 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
199
199
  margin-block: var(--space-xxs-p8yyaw, 4px);
200
200
  margin-inline: var(--space-xxs-p8yyaw, 4px);
201
201
  }
202
- .awsui_token-editor-form_1wzqe_8mqhl_199:not(#\9) {
202
+ .awsui_token-editor-form_1wzqe_109an_199:not(#\9) {
203
203
  /* used in test-utils */
204
204
  }
205
- .awsui_token-editor-field-property_1wzqe_8mqhl_202:not(#\9) {
205
+ .awsui_token-editor-field-property_1wzqe_109an_202:not(#\9) {
206
206
  flex-grow: 2;
207
207
  }
208
- .awsui_token-editor-field-operator_1wzqe_8mqhl_205:not(#\9) {
208
+ .awsui_token-editor-field-operator_1wzqe_109an_205:not(#\9) {
209
209
  flex-grow: 1;
210
210
  }
211
- .awsui_token-editor-field-value_1wzqe_8mqhl_208:not(#\9) {
211
+ .awsui_token-editor-field-value_1wzqe_109an_208:not(#\9) {
212
212
  flex-grow: 2;
213
213
  }
214
- .awsui_token-editor-cancel_1wzqe_8mqhl_211:not(#\9) {
214
+ .awsui_token-editor-cancel_1wzqe_109an_211:not(#\9) {
215
215
  margin-inline-end: var(--space-xs-zb16t3, 8px);
216
216
  }
217
- .awsui_token-editor-submit_1wzqe_8mqhl_214:not(#\9) {
217
+ .awsui_token-editor-submit_1wzqe_109an_214:not(#\9) {
218
218
  /* used in test-utils */
219
219
  }
220
- .awsui_token-editor-actions_1wzqe_8mqhl_217:not(#\9) {
220
+ .awsui_token-editor-actions_1wzqe_109an_217:not(#\9) {
221
221
  display: flex;
222
222
  justify-content: flex-end;
223
223
  padding-block-start: var(--space-s-34lx8l, 12px);
@@ -226,7 +226,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
226
226
  margin-inline: calc(-1 * var(--space-m-udix3p, 16px) + -1 * var(--space-xxs-p8yyaw, 4px));
227
227
  margin-block-start: var(--space-s-34lx8l, 12px);
228
228
  }
229
- .awsui_token-editor-grid_1wzqe_8mqhl_226:not(#\9) {
229
+ .awsui_token-editor-grid_1wzqe_109an_226:not(#\9) {
230
230
  border-collapse: separate;
231
231
  border-spacing: 0;
232
232
  box-sizing: border-box;
@@ -262,64 +262,64 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
262
262
  -moz-osx-font-smoothing: auto;
263
263
  display: grid;
264
264
  gap: var(--space-s-34lx8l, 12px);
265
- grid-template-columns: minmax(100px, 2fr) minmax(100px, 120px) minmax(100px, 3fr) min-content;
265
+ grid-template-columns: minmax(min-content, 2fr) minmax(min-content, 120px) minmax(min-content, 3fr) min-content;
266
266
  }
267
- .awsui_token-editor-grid-group_1wzqe_8mqhl_263:not(#\9) {
267
+ .awsui_token-editor-grid-group_1wzqe_109an_263:not(#\9) {
268
268
  display: contents;
269
269
  }
270
- .awsui_token-editor-grid_1wzqe_8mqhl_226.awsui_token-editor-narrow_1wzqe_8mqhl_266:not(#\9) {
270
+ .awsui_token-editor-grid_1wzqe_109an_226.awsui_token-editor-narrow_1wzqe_109an_266:not(#\9) {
271
271
  grid-template-columns: minmax(100px, 1fr);
272
272
  gap: var(--space-m-udix3p, 16px);
273
273
  }
274
- .awsui_token-editor-grid_1wzqe_8mqhl_226.awsui_token-editor-narrow_1wzqe_8mqhl_266 > .awsui_token-editor-group_1wzqe_8mqhl_270:not(#\9) {
274
+ .awsui_token-editor-grid_1wzqe_109an_226.awsui_token-editor-narrow_1wzqe_109an_266 > .awsui_token-editor-group_1wzqe_109an_270:not(#\9) {
275
275
  display: flex;
276
276
  flex-direction: column;
277
277
  gap: var(--space-s-34lx8l, 12px);
278
278
  }
279
- .awsui_token-editor-grid-header_1wzqe_8mqhl_275:not(#\9) {
279
+ .awsui_token-editor-grid-header_1wzqe_109an_275:not(#\9) {
280
280
  color: var(--color-text-column-header-czuvwg, #414d5c);
281
281
  font-weight: var(--font-weight-heading-s-cwn6wc, 700);
282
282
  padding-block: var(--space-scaled-xxs-7597g1, 4px);
283
283
  text-align: start;
284
284
  }
285
- .awsui_token-editor-grid-cell_1wzqe_8mqhl_281:not(#\9):not(.awsui_token-editor-narrow_1wzqe_8mqhl_266) {
285
+ .awsui_token-editor-grid-cell_1wzqe_109an_281:not(#\9):not(.awsui_token-editor-narrow_1wzqe_109an_266) {
286
286
  display: flex;
287
287
  align-items: flex-end;
288
288
  justify-content: flex-end;
289
289
  }
290
- .awsui_token-editor-add-token_1wzqe_8mqhl_286:not(#\9) {
290
+ .awsui_token-editor-add-token_1wzqe_109an_286:not(#\9) {
291
291
  margin-block-start: var(--space-s-34lx8l, 12px);
292
292
  }
293
293
 
294
- .awsui_custom-content-wrapper_1wzqe_8mqhl_290:not(#\9) {
294
+ .awsui_custom-content-wrapper_1wzqe_109an_290:not(#\9) {
295
295
  display: contents;
296
296
  }
297
297
 
298
- .awsui_custom-control_1wzqe_8mqhl_294:not(#\9) {
298
+ .awsui_custom-control_1wzqe_109an_294:not(#\9) {
299
299
  margin-inline-end: var(--space-s-34lx8l, 12px);
300
300
  }
301
301
 
302
- .awsui_input_1wzqe_8mqhl_138:not(#\9) {
302
+ .awsui_input_1wzqe_109an_138:not(#\9) {
303
303
  flex: 1;
304
304
  }
305
305
 
306
- .awsui_results_1wzqe_8mqhl_302:not(#\9) {
306
+ .awsui_results_1wzqe_109an_302:not(#\9) {
307
307
  padding-block: calc(var(--space-scaled-xxs-7597g1, 4px) + var(--border-field-width-09w7vk, 2px));
308
308
  padding-inline: 0;
309
309
  }
310
310
 
311
- .awsui_token-trigger_1wzqe_8mqhl_307:not(#\9) {
311
+ .awsui_token-trigger_1wzqe_109an_307:not(#\9) {
312
312
  min-inline-size: 0;
313
313
  word-break: break-word;
314
314
  }
315
315
 
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) {
316
+ .awsui_remove-all_1wzqe_109an_312:not(#\9),
317
+ .awsui_join-operation_1wzqe_109an_313:not(#\9),
318
+ .awsui_custom-filter-actions_1wzqe_109an_314:not(#\9) {
319
319
  /* used in test-utils */
320
320
  }
321
321
 
322
- .awsui_constraint_1wzqe_8mqhl_318:not(#\9) {
322
+ .awsui_constraint_1wzqe_109an_318:not(#\9) {
323
323
  padding-block-start: var(--space-xxs-p8yyaw, 4px);
324
324
  color: var(--color-text-form-secondary-dxc248, #5f6b7a);
325
325
  font-size: var(--font-size-body-s-asqx2i, 12px);