@cloudscape-design/components 3.0.754 → 3.0.756

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 (37) hide show
  1. package/expandable-section/analytics-metadata/styles.css.js +2 -1
  2. package/expandable-section/analytics-metadata/styles.scoped.css +2 -1
  3. package/expandable-section/analytics-metadata/styles.selectors.js +2 -1
  4. package/expandable-section/expandable-section-header.js +1 -1
  5. package/expandable-section/expandable-section-header.js.map +1 -1
  6. package/expandable-section/internal.d.ts.map +1 -1
  7. package/expandable-section/internal.js +2 -1
  8. package/expandable-section/internal.js.map +1 -1
  9. package/internal/environment.js +1 -1
  10. package/internal/environment.json +1 -1
  11. package/internal/manifest.json +1 -1
  12. package/package.json +1 -1
  13. package/property-filter/filtering-token/index.js +2 -2
  14. package/property-filter/filtering-token/index.js.map +1 -1
  15. package/property-filter/filtering-token/styles.css.js +18 -18
  16. package/property-filter/filtering-token/styles.scoped.css +50 -39
  17. package/property-filter/filtering-token/styles.selectors.js +18 -18
  18. package/property-filter/i18n-utils.d.ts +3 -3
  19. package/property-filter/i18n-utils.d.ts.map +1 -1
  20. package/property-filter/i18n-utils.js.map +1 -1
  21. package/property-filter/index.d.ts.map +1 -1
  22. package/property-filter/index.js +16 -3
  23. package/property-filter/index.js.map +1 -1
  24. package/property-filter/interfaces.d.ts +27 -22
  25. package/property-filter/interfaces.d.ts.map +1 -1
  26. package/property-filter/interfaces.js.map +1 -1
  27. package/property-filter/internal.d.ts +5 -9
  28. package/property-filter/internal.d.ts.map +1 -1
  29. package/property-filter/internal.js +2 -2
  30. package/property-filter/internal.js.map +1 -1
  31. package/test-utils/dom/property-filter/index.d.ts +7 -20
  32. package/test-utils/dom/property-filter/index.js +25 -51
  33. package/test-utils/dom/property-filter/index.js.map +1 -1
  34. package/test-utils/selectors/property-filter/index.d.ts +7 -20
  35. package/test-utils/selectors/property-filter/index.js +25 -53
  36. package/test-utils/selectors/property-filter/index.js.map +1 -1
  37. package/test-utils/tsconfig.tsbuildinfo +1 -1
@@ -1,6 +1,6 @@
1
- import { ComparisonOperator, I18nStrings, I18nStringsTokenGroups, InternalToken, InternalTokenGroup } from './interfaces';
1
+ import { ComparisonOperator, I18nStrings, InternalToken, InternalTokenGroup } from './interfaces';
2
2
  export type I18nStringsOperators = Pick<I18nStrings, 'operatorLessText' | 'operatorLessOrEqualText' | 'operatorGreaterText' | 'operatorGreaterOrEqualText' | 'operatorContainsText' | 'operatorDoesNotContainText' | 'operatorEqualsText' | 'operatorDoesNotEqualText' | 'operatorStartsWithText' | 'operatorDoesNotStartWithText'>;
3
- export type I18nStringsInternal = Omit<I18nStrings, 'formatToken' | 'removeTokenButtonAriaLabel'> & Omit<I18nStringsTokenGroups, 'groupEditAriaLabel' | 'tokenEditorTokenActionsAriaLabel' | 'tokenEditorTokenRemoveAriaLabel' | 'tokenEditorAddExistingTokenAriaLabel' | 'tokenEditorAddExistingTokenLabel'> & {
3
+ export type I18nStringsInternal = Omit<I18nStrings, 'formatToken' | 'removeTokenButtonAriaLabel' | 'groupEditAriaLabel' | 'tokenEditorTokenActionsAriaLabel' | 'tokenEditorTokenRemoveAriaLabel' | 'tokenEditorAddExistingTokenAriaLabel' | 'tokenEditorAddExistingTokenLabel'> & {
4
4
  formatToken: (token: InternalToken) => {
5
5
  propertyLabel: string;
6
6
  operator: string;
@@ -15,6 +15,6 @@ export type I18nStringsInternal = Omit<I18nStrings, 'formatToken' | 'removeToken
15
15
  tokenEditorAddExistingTokenAriaLabel: (token: InternalToken) => string;
16
16
  tokenEditorAddExistingTokenLabel: (token: InternalToken) => string;
17
17
  };
18
- export declare function usePropertyFilterI18n(def?: I18nStrings & I18nStringsTokenGroups): I18nStringsInternal;
18
+ export declare function usePropertyFilterI18n(def?: I18nStrings): I18nStringsInternal;
19
19
  export declare function operatorToDescription(operator: ComparisonOperator, i18nStrings: I18nStringsOperators): string | undefined;
20
20
  //# sourceMappingURL=i18n-utils.d.ts.map
@@ -1 +1 @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K,GAAG;YACN,OAAO,WAAW,CAAC,mBAAmB,CAAC;QACzC,KAAK,IAAI;YACP,OAAO,WAAW,CAAC,0BAA0B,CAAC;QAChD,KAAK,GAAG;YACN,OAAO,WAAW,CAAC,oBAAoB,CAAC;QAC1C,KAAK,IAAI;YACP,OAAO,WAAW,CAAC,0BAA0B,CAAC;QAChD,KAAK,GAAG;YACN,OAAO,WAAW,CAAC,kBAAkB,CAAC;QACxC,KAAK,IAAI;YACP,OAAO,WAAW,CAAC,wBAAwB,CAAC;QAC9C,KAAK,GAAG;YACN,OAAO,WAAW,CAAC,sBAAsB,CAAC;QAC5C,KAAK,IAAI;YACP,OAAO,WAAW,CAAC,4BAA4B,CAAC;QAClD,iEAAiE;QACjE,sFAAsF;QACtF,0BAA0B;QAC1B;YACE,OAAO,EAAE,CAAC;KACb;AACH,CAAC;AAED,SAAS,qBAAqB,CAAC,QAA4B;IACzD,QAAQ,QAAQ,EAAE;QAChB,KAAK,GAAG;YACN,OAAO,QAAQ,CAAC;QAClB,KAAK,IAAI;YACP,OAAO,YAAY,CAAC;QACtB,KAAK,GAAG;YACN,OAAO,cAAc,CAAC;QACxB,KAAK,IAAI;YACP,OAAO,oBAAoB,CAAC;QAC9B,KAAK,GAAG;YACN,OAAO,WAAW,CAAC;QACrB,KAAK,IAAI;YACP,OAAO,iBAAiB,CAAC;QAC3B,KAAK,GAAG;YACN,OAAO,UAAU,CAAC;QACpB,KAAK,IAAI;YACP,OAAO,cAAc,CAAC;QACxB,KAAK,GAAG;YACN,OAAO,aAAa,CAAC;QACvB,KAAK,IAAI;YACP,OAAO,iBAAiB,CAAC;QAC3B,iEAAiE;QACjE,sFAAsF;QACtF,0BAA0B;QAC1B;YACE,OAAO,QAAQ,CAAC;KACnB;AACH,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { useInternalI18n } from '../i18n/context';\nimport {\n ComparisonOperator,\n FormattedToken,\n I18nStrings,\n I18nStringsTokenGroups,\n InternalToken,\n InternalTokenGroup,\n} from './interfaces';\nimport { tokenGroupToTokens } from './utils';\n\nexport type I18nStringsOperators = Pick<\n I18nStrings,\n | 'operatorLessText'\n | 'operatorLessOrEqualText'\n | 'operatorGreaterText'\n | 'operatorGreaterOrEqualText'\n | 'operatorContainsText'\n | 'operatorDoesNotContainText'\n | 'operatorEqualsText'\n | 'operatorDoesNotEqualText'\n | 'operatorStartsWithText'\n | 'operatorDoesNotStartWithText'\n>;\n\n// Replacing i18n function with ones taking internal tokens as argument.\nexport type I18nStringsInternal = Omit<I18nStrings, 'formatToken' | 'removeTokenButtonAriaLabel'> &\n Omit<\n I18nStringsTokenGroups,\n | 'groupEditAriaLabel'\n | 'tokenEditorTokenActionsAriaLabel'\n | 'tokenEditorTokenRemoveAriaLabel'\n | 'tokenEditorAddExistingTokenAriaLabel'\n | 'tokenEditorAddExistingTokenLabel'\n > & {\n formatToken: (token: InternalToken) => {\n propertyLabel: string;\n operator: string;\n value: string;\n formattedText: string;\n };\n groupAriaLabel: (group: InternalTokenGroup) => string;\n groupEditAriaLabel: (group: InternalTokenGroup) => string;\n removeTokenButtonAriaLabel: (token: InternalToken) => string;\n tokenEditorTokenActionsAriaLabel: (token: InternalToken) => string;\n tokenEditorTokenRemoveAriaLabel: (token: InternalToken) => string;\n tokenEditorAddExistingTokenAriaLabel: (token: InternalToken) => string;\n tokenEditorAddExistingTokenLabel: (token: InternalToken) => string;\n };\n\nexport function usePropertyFilterI18n(def: I18nStrings & I18nStringsTokenGroups = {}): I18nStringsInternal {\n const i18n = useInternalI18n('property-filter');\n\n const allPropertiesLabel = i18n('i18nStrings.allPropertiesLabel', def?.allPropertiesLabel);\n const operationAndText = i18n('i18nStrings.operationAndText', def?.operationAndText);\n const operationOrText = i18n('i18nStrings.operationOrText', def?.operationOrText);\n const formatToken =\n i18n(\n 'i18nStrings.formatToken',\n def.formatToken,\n format => token =>\n format({\n token__propertyLabel: token.propertyLabel,\n token__operator: getOperatorI18nString(token.operator),\n token__value: token.value,\n })\n ) ?? (token => `${token.propertyLabel} ${token.operator} ${token.value}`);\n\n function toFormatted(token: InternalToken): FormattedToken {\n const valueFormatter = token.property?.getValueFormatter(token.operator);\n const propertyLabel = token.property ? token.property.propertyLabel : allPropertiesLabel ?? '';\n const tokenValue = valueFormatter ? valueFormatter(token.value) : token.value;\n return { propertyKey: token.property?.propertyKey, propertyLabel, operator: token.operator, value: tokenValue };\n }\n\n return {\n ...def,\n allPropertiesLabel,\n operationAndText,\n operationOrText,\n applyActionText: i18n('i18nStrings.applyActionText', def?.applyActionText),\n cancelActionText: i18n('i18nStrings.cancelActionText', def?.cancelActionText),\n clearFiltersText: i18n('i18nStrings.clearFiltersText', def?.clearFiltersText),\n editTokenHeader: i18n('i18nStrings.editTokenHeader', def?.editTokenHeader),\n groupPropertiesText: i18n('i18nStrings.groupPropertiesText', def?.groupPropertiesText),\n groupValuesText: i18n('i18nStrings.groupValuesText', def?.groupValuesText),\n operatorContainsText: i18n('i18nStrings.operatorContainsText', def?.operatorContainsText),\n operatorDoesNotContainText: i18n('i18nStrings.operatorDoesNotContainText', def?.operatorDoesNotContainText),\n operatorDoesNotEqualText: i18n('i18nStrings.operatorDoesNotEqualText', def?.operatorDoesNotEqualText),\n operatorEqualsText: i18n('i18nStrings.operatorEqualsText', def?.operatorEqualsText),\n operatorGreaterOrEqualText: i18n('i18nStrings.operatorGreaterOrEqualText', def?.operatorGreaterOrEqualText),\n operatorGreaterText: i18n('i18nStrings.operatorGreaterText', def?.operatorGreaterText),\n operatorLessOrEqualText: i18n('i18nStrings.operatorLessOrEqualText', def?.operatorLessOrEqualText),\n operatorLessText: i18n('i18nStrings.operatorLessText', def?.operatorLessText),\n operatorStartsWithText: i18n('i18nStrings.operatorStartsWithText', def?.operatorStartsWithText),\n operatorDoesNotStartWithText: i18n('i18nStrings.operatorDoesNotStartWithText', def?.operatorDoesNotStartWithText),\n operatorText: i18n('i18nStrings.operatorText', def?.operatorText),\n operatorsText: i18n('i18nStrings.operatorsText', def?.operatorsText),\n propertyText: i18n('i18nStrings.propertyText', def?.propertyText),\n tokenLimitShowFewer: i18n('i18nStrings.tokenLimitShowFewer', def?.tokenLimitShowFewer),\n tokenLimitShowMore: i18n('i18nStrings.tokenLimitShowMore', def?.tokenLimitShowMore),\n valueText: i18n('i18nStrings.valueText', def?.valueText),\n tokenEditorTokenRemoveLabel: i18n('i18nStrings.tokenEditorTokenRemoveLabel', def?.tokenEditorTokenRemoveLabel),\n tokenEditorTokenRemoveFromGroupLabel: i18n(\n 'i18nStrings.tokenEditorTokenRemoveFromGroupLabel',\n def?.tokenEditorTokenRemoveFromGroupLabel\n ),\n tokenEditorAddNewTokenLabel: i18n('i18nStrings.tokenEditorAddNewTokenLabel', def?.tokenEditorAddNewTokenLabel),\n tokenEditorAddTokenActionsAriaLabel: i18n(\n 'i18nStrings.tokenEditorAddTokenActionsAriaLabel',\n def?.tokenEditorAddTokenActionsAriaLabel\n ),\n formatToken: token => {\n const formattedToken = toFormatted(token);\n return { ...formattedToken, formattedText: formatToken(toFormatted(token)) };\n },\n groupAriaLabel: group => {\n const tokens = tokenGroupToTokens<InternalToken>(group.tokens).map(toFormatted);\n const groupOperationLabel = (group.operation === 'and' ? operationAndText : operationOrText) ?? '';\n return tokens.map(token => formatToken(token)).join(` ${groupOperationLabel} `);\n },\n groupEditAriaLabel: group => {\n const tokens = tokenGroupToTokens<InternalToken>(group.tokens).map(token => toFormatted(token));\n const operation = group.operation;\n const operationLabel = (operation === 'and' ? operationAndText : operationOrText) ?? '';\n const formatter = i18n(\n 'i18nStrings.groupEditAriaLabel',\n def.groupEditAriaLabel,\n format => () =>\n format({\n group__operationLabel: operationLabel,\n group__formattedTokens__length: tokens.length.toString(),\n group__formattedTokens0__formattedText: tokens[0] ? formatToken(tokens[0]) : '',\n group__formattedTokens1__formattedText: tokens[1] ? formatToken(tokens[1]) : '',\n group__formattedTokens2__formattedText: tokens[2] ? formatToken(tokens[2]) : '',\n group__formattedTokens3__formattedText: tokens[3] ? formatToken(tokens[3]) : '',\n })\n );\n return formatter?.({ operation, operationLabel, tokens }) ?? '';\n },\n removeTokenButtonAriaLabel: token => {\n const formatter = i18n(\n 'i18nStrings.removeTokenButtonAriaLabel',\n def.removeTokenButtonAriaLabel,\n format => () => format({ token__formattedText: formatToken(toFormatted(token)) })\n );\n return formatter?.(toFormatted(token)) ?? '';\n },\n tokenEditorTokenActionsAriaLabel: (token: InternalToken) => {\n const formatter = i18n(\n 'i18nStrings.tokenEditorTokenActionsAriaLabel',\n def.tokenEditorTokenActionsAriaLabel,\n format => () => format({ token__formattedText: formatToken(toFormatted(token)) })\n );\n return formatter?.(toFormatted(token)) ?? '';\n },\n tokenEditorTokenRemoveAriaLabel: token => {\n const formatter = i18n(\n 'i18nStrings.tokenEditorTokenRemoveAriaLabel',\n def.tokenEditorTokenRemoveAriaLabel,\n format => () => format({ token__formattedText: formatToken(toFormatted(token)) })\n );\n return formatter?.(toFormatted(token)) ?? '';\n },\n tokenEditorAddExistingTokenAriaLabel: token => {\n const formatter = i18n(\n 'i18nStrings.tokenEditorAddExistingTokenAriaLabel',\n def.tokenEditorAddExistingTokenAriaLabel,\n format => () => format({ token__formattedText: formatToken(toFormatted(token)) })\n );\n return formatter?.(toFormatted(token)) ?? '';\n },\n tokenEditorAddExistingTokenLabel: token => {\n const formattedToken = toFormatted(token);\n const formatter = i18n(\n 'i18nStrings.tokenEditorAddExistingTokenLabel',\n def.tokenEditorAddExistingTokenLabel,\n format => () =>\n format({\n token__propertyLabel: formattedToken.propertyLabel,\n token__operator: formattedToken.operator,\n token__value: formattedToken.value,\n })\n );\n return formatter?.(toFormatted(token)) ?? '';\n },\n };\n}\n\nexport function operatorToDescription(operator: ComparisonOperator, i18nStrings: I18nStringsOperators) {\n switch (operator) {\n case '<':\n return i18nStrings.operatorLessText;\n case '<=':\n return i18nStrings.operatorLessOrEqualText;\n case '>':\n return i18nStrings.operatorGreaterText;\n case '>=':\n return i18nStrings.operatorGreaterOrEqualText;\n case ':':\n return i18nStrings.operatorContainsText;\n case '!:':\n return i18nStrings.operatorDoesNotContainText;\n case '=':\n return i18nStrings.operatorEqualsText;\n case '!=':\n return i18nStrings.operatorDoesNotEqualText;\n case '^':\n return i18nStrings.operatorStartsWithText;\n case '!^':\n return i18nStrings.operatorDoesNotStartWithText;\n // The line is ignored from coverage because it is not reachable.\n // The purpose of it is to prevent TS errors if ComparisonOperator type gets extended.\n /* istanbul ignore next */\n default:\n return '';\n }\n}\n\nfunction getOperatorI18nString(operator: ComparisonOperator): string {\n switch (operator) {\n case '=':\n return 'equals';\n case '!=':\n return 'not_equals';\n case '>':\n return 'greater_than';\n case '>=':\n return 'greater_than_equal';\n case '<':\n return 'less_than';\n case '<=':\n return 'less_than_equal';\n case ':':\n return 'contains';\n case '!:':\n return 'not_contains';\n case '^':\n return 'starts_with';\n case '!^':\n return 'not_starts_with';\n // The line is ignored from coverage because it is not reachable.\n // The purpose of it is to prevent TS errors if ComparisonOperator type gets extended.\n /* istanbul ignore next */\n default:\n return operator;\n }\n}\n"]}
1
+ {"version":3,"file":"i18n-utils.js","sourceRoot":"","sources":["../../../src/property-filter/i18n-utils.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AA0C7C,MAAM,UAAU,qBAAqB,CAAC,MAAmB,EAAE;;IACzD,MAAM,IAAI,GAAG,eAAe,CAAC,iBAAiB,CAAC,CAAC;IAEhD,MAAM,kBAAkB,GAAG,IAAI,CAAC,gCAAgC,EAAE,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,kBAAkB,CAAC,CAAC;IAC3F,MAAM,gBAAgB,GAAG,IAAI,CAAC,8BAA8B,EAAE,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,gBAAgB,CAAC,CAAC;IACr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,CAAC;QAC3B,KAAK,GAAG;YACN,OAAO,UAAU,CAAC;QACpB,KAAK,IAAI;YACP,OAAO,cAAc,CAAC;QACxB,KAAK,GAAG;YACN,OAAO,aAAa,CAAC;QACvB,KAAK,IAAI;YACP,OAAO,iBAAiB,CAAC;QAC3B,iEAAiE;QACjE,sFAAsF;QACtF,0BAA0B;QAC1B;YACE,OAAO,QAAQ,CAAC;KACnB;AACH,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { useInternalI18n } from '../i18n/context';\nimport { ComparisonOperator, FormattedToken, I18nStrings, InternalToken, InternalTokenGroup } from './interfaces';\nimport { tokenGroupToTokens } from './utils';\n\nexport type I18nStringsOperators = Pick<\n I18nStrings,\n | 'operatorLessText'\n | 'operatorLessOrEqualText'\n | 'operatorGreaterText'\n | 'operatorGreaterOrEqualText'\n | 'operatorContainsText'\n | 'operatorDoesNotContainText'\n | 'operatorEqualsText'\n | 'operatorDoesNotEqualText'\n | 'operatorStartsWithText'\n | 'operatorDoesNotStartWithText'\n>;\n\n// Replacing i18n function with ones taking internal tokens as argument.\nexport type I18nStringsInternal = Omit<\n I18nStrings,\n | 'formatToken'\n | 'removeTokenButtonAriaLabel'\n | 'groupEditAriaLabel'\n | 'tokenEditorTokenActionsAriaLabel'\n | 'tokenEditorTokenRemoveAriaLabel'\n | 'tokenEditorAddExistingTokenAriaLabel'\n | 'tokenEditorAddExistingTokenLabel'\n> & {\n formatToken: (token: InternalToken) => {\n propertyLabel: string;\n operator: string;\n value: string;\n formattedText: string;\n };\n groupAriaLabel: (group: InternalTokenGroup) => string;\n groupEditAriaLabel: (group: InternalTokenGroup) => string;\n removeTokenButtonAriaLabel: (token: InternalToken) => string;\n tokenEditorTokenActionsAriaLabel: (token: InternalToken) => string;\n tokenEditorTokenRemoveAriaLabel: (token: InternalToken) => string;\n tokenEditorAddExistingTokenAriaLabel: (token: InternalToken) => string;\n tokenEditorAddExistingTokenLabel: (token: InternalToken) => string;\n};\n\nexport function usePropertyFilterI18n(def: I18nStrings = {}): I18nStringsInternal {\n const i18n = useInternalI18n('property-filter');\n\n const allPropertiesLabel = i18n('i18nStrings.allPropertiesLabel', def?.allPropertiesLabel);\n const operationAndText = i18n('i18nStrings.operationAndText', def?.operationAndText);\n const operationOrText = i18n('i18nStrings.operationOrText', def?.operationOrText);\n const formatToken =\n i18n(\n 'i18nStrings.formatToken',\n def.formatToken,\n format => token =>\n format({\n token__propertyLabel: token.propertyLabel,\n token__operator: getOperatorI18nString(token.operator),\n token__value: token.value,\n })\n ) ?? (token => `${token.propertyLabel} ${token.operator} ${token.value}`);\n\n function toFormatted(token: InternalToken): FormattedToken {\n const valueFormatter = token.property?.getValueFormatter(token.operator);\n const propertyLabel = token.property ? token.property.propertyLabel : allPropertiesLabel ?? '';\n const tokenValue = valueFormatter ? valueFormatter(token.value) : token.value;\n return { propertyKey: token.property?.propertyKey, propertyLabel, operator: token.operator, value: tokenValue };\n }\n\n return {\n ...def,\n allPropertiesLabel,\n operationAndText,\n operationOrText,\n applyActionText: i18n('i18nStrings.applyActionText', def?.applyActionText),\n cancelActionText: i18n('i18nStrings.cancelActionText', def?.cancelActionText),\n clearFiltersText: i18n('i18nStrings.clearFiltersText', def?.clearFiltersText),\n editTokenHeader: i18n('i18nStrings.editTokenHeader', def?.editTokenHeader),\n groupPropertiesText: i18n('i18nStrings.groupPropertiesText', def?.groupPropertiesText),\n groupValuesText: i18n('i18nStrings.groupValuesText', def?.groupValuesText),\n operatorContainsText: i18n('i18nStrings.operatorContainsText', def?.operatorContainsText),\n operatorDoesNotContainText: i18n('i18nStrings.operatorDoesNotContainText', def?.operatorDoesNotContainText),\n operatorDoesNotEqualText: i18n('i18nStrings.operatorDoesNotEqualText', def?.operatorDoesNotEqualText),\n operatorEqualsText: i18n('i18nStrings.operatorEqualsText', def?.operatorEqualsText),\n operatorGreaterOrEqualText: i18n('i18nStrings.operatorGreaterOrEqualText', def?.operatorGreaterOrEqualText),\n operatorGreaterText: i18n('i18nStrings.operatorGreaterText', def?.operatorGreaterText),\n operatorLessOrEqualText: i18n('i18nStrings.operatorLessOrEqualText', def?.operatorLessOrEqualText),\n operatorLessText: i18n('i18nStrings.operatorLessText', def?.operatorLessText),\n operatorStartsWithText: i18n('i18nStrings.operatorStartsWithText', def?.operatorStartsWithText),\n operatorDoesNotStartWithText: i18n('i18nStrings.operatorDoesNotStartWithText', def?.operatorDoesNotStartWithText),\n operatorText: i18n('i18nStrings.operatorText', def?.operatorText),\n operatorsText: i18n('i18nStrings.operatorsText', def?.operatorsText),\n propertyText: i18n('i18nStrings.propertyText', def?.propertyText),\n tokenLimitShowFewer: i18n('i18nStrings.tokenLimitShowFewer', def?.tokenLimitShowFewer),\n tokenLimitShowMore: i18n('i18nStrings.tokenLimitShowMore', def?.tokenLimitShowMore),\n valueText: i18n('i18nStrings.valueText', def?.valueText),\n tokenEditorTokenRemoveLabel: i18n('i18nStrings.tokenEditorTokenRemoveLabel', def?.tokenEditorTokenRemoveLabel),\n tokenEditorTokenRemoveFromGroupLabel: i18n(\n 'i18nStrings.tokenEditorTokenRemoveFromGroupLabel',\n def?.tokenEditorTokenRemoveFromGroupLabel\n ),\n tokenEditorAddNewTokenLabel: i18n('i18nStrings.tokenEditorAddNewTokenLabel', def?.tokenEditorAddNewTokenLabel),\n tokenEditorAddTokenActionsAriaLabel: i18n(\n 'i18nStrings.tokenEditorAddTokenActionsAriaLabel',\n def?.tokenEditorAddTokenActionsAriaLabel\n ),\n formatToken: token => {\n const formattedToken = toFormatted(token);\n return { ...formattedToken, formattedText: formatToken(toFormatted(token)) };\n },\n groupAriaLabel: group => {\n const tokens = tokenGroupToTokens<InternalToken>(group.tokens).map(toFormatted);\n const groupOperationLabel = (group.operation === 'and' ? operationAndText : operationOrText) ?? '';\n return tokens.map(token => formatToken(token)).join(` ${groupOperationLabel} `);\n },\n groupEditAriaLabel: group => {\n const tokens = tokenGroupToTokens<InternalToken>(group.tokens).map(token => toFormatted(token));\n const operation = group.operation;\n const operationLabel = (operation === 'and' ? operationAndText : operationOrText) ?? '';\n const formatter = i18n(\n 'i18nStrings.groupEditAriaLabel',\n def.groupEditAriaLabel,\n format => () =>\n format({\n group__operationLabel: operationLabel,\n group__formattedTokens__length: tokens.length.toString(),\n group__formattedTokens0__formattedText: tokens[0] ? formatToken(tokens[0]) : '',\n group__formattedTokens1__formattedText: tokens[1] ? formatToken(tokens[1]) : '',\n group__formattedTokens2__formattedText: tokens[2] ? formatToken(tokens[2]) : '',\n group__formattedTokens3__formattedText: tokens[3] ? formatToken(tokens[3]) : '',\n })\n );\n return formatter?.({ operation, operationLabel, tokens }) ?? '';\n },\n removeTokenButtonAriaLabel: token => {\n const formatter = i18n(\n 'i18nStrings.removeTokenButtonAriaLabel',\n def.removeTokenButtonAriaLabel,\n format => () => format({ token__formattedText: formatToken(toFormatted(token)) })\n );\n return formatter?.(toFormatted(token)) ?? '';\n },\n tokenEditorTokenActionsAriaLabel: (token: InternalToken) => {\n const formatter = i18n(\n 'i18nStrings.tokenEditorTokenActionsAriaLabel',\n def.tokenEditorTokenActionsAriaLabel,\n format => () => format({ token__formattedText: formatToken(toFormatted(token)) })\n );\n return formatter?.(toFormatted(token)) ?? '';\n },\n tokenEditorTokenRemoveAriaLabel: token => {\n const formatter = i18n(\n 'i18nStrings.tokenEditorTokenRemoveAriaLabel',\n def.tokenEditorTokenRemoveAriaLabel,\n format => () => format({ token__formattedText: formatToken(toFormatted(token)) })\n );\n return formatter?.(toFormatted(token)) ?? '';\n },\n tokenEditorAddExistingTokenAriaLabel: token => {\n const formatter = i18n(\n 'i18nStrings.tokenEditorAddExistingTokenAriaLabel',\n def.tokenEditorAddExistingTokenAriaLabel,\n format => () => format({ token__formattedText: formatToken(toFormatted(token)) })\n );\n return formatter?.(toFormatted(token)) ?? '';\n },\n tokenEditorAddExistingTokenLabel: token => {\n const formattedToken = toFormatted(token);\n const formatter = i18n(\n 'i18nStrings.tokenEditorAddExistingTokenLabel',\n def.tokenEditorAddExistingTokenLabel,\n format => () =>\n format({\n token__propertyLabel: formattedToken.propertyLabel,\n token__operator: formattedToken.operator,\n token__value: formattedToken.value,\n })\n );\n return formatter?.(toFormatted(token)) ?? '';\n },\n };\n}\n\nexport function operatorToDescription(operator: ComparisonOperator, i18nStrings: I18nStringsOperators) {\n switch (operator) {\n case '<':\n return i18nStrings.operatorLessText;\n case '<=':\n return i18nStrings.operatorLessOrEqualText;\n case '>':\n return i18nStrings.operatorGreaterText;\n case '>=':\n return i18nStrings.operatorGreaterOrEqualText;\n case ':':\n return i18nStrings.operatorContainsText;\n case '!:':\n return i18nStrings.operatorDoesNotContainText;\n case '=':\n return i18nStrings.operatorEqualsText;\n case '!=':\n return i18nStrings.operatorDoesNotEqualText;\n case '^':\n return i18nStrings.operatorStartsWithText;\n case '!^':\n return i18nStrings.operatorDoesNotStartWithText;\n // The line is ignored from coverage because it is not reachable.\n // The purpose of it is to prevent TS errors if ComparisonOperator type gets extended.\n /* istanbul ignore next */\n default:\n return '';\n }\n}\n\nfunction getOperatorI18nString(operator: ComparisonOperator): string {\n switch (operator) {\n case '=':\n return 'equals';\n case '!=':\n return 'not_equals';\n case '>':\n return 'greater_than';\n case '>=':\n return 'greater_than_equal';\n case '<':\n return 'less_than';\n case '<=':\n return 'less_than_equal';\n case ':':\n return 'contains';\n case '!:':\n return 'not_contains';\n case '^':\n return 'starts_with';\n case '!^':\n return 'not_starts_with';\n // The line is ignored from coverage because it is not reachable.\n // The purpose of it is to prevent TS errors if ComparisonOperator type gets extended.\n /* istanbul ignore next */\n default:\n return operator;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/property-filter/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAE,mBAAmB,EAAO,MAAM,cAAc,CAAC;AAKxD,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAE/B,QAAA,MAAM,cAAc,qGA6CnB,CAAC;AAGF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/property-filter/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,EAAE,mBAAmB,EAAO,MAAM,cAAc,CAAC;AAKxD,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAE/B,QAAA,MAAM,cAAc,qGA4DnB,CAAC;AAGF,eAAe,cAAc,CAAC"}
@@ -2,15 +2,24 @@ import { __rest } from "tslib";
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  import React from 'react';
5
+ import { warnOnce } from '@cloudscape-design/component-toolkit/internal';
5
6
  import { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';
6
7
  import useBaseComponent from '../internal/hooks/use-base-component';
7
8
  import { applyDisplayName } from '../internal/utils/apply-display-name';
8
9
  import PropertyFilterInternal from './internal';
9
10
  import analyticsSelectors from './analytics-metadata/styles.css.js';
10
11
  const PropertyFilter = React.forwardRef((_a, ref) => {
11
- var { filteringOptions = [], customGroupsText = [], disableFreeTextFiltering = false, asyncProperties, expandToViewport, hideOperations, tokenLimit, virtualScroll } = _a, rest = __rest(_a, ["filteringOptions", "customGroupsText", "disableFreeTextFiltering", "asyncProperties", "expandToViewport", "hideOperations", "tokenLimit", "virtualScroll"]);
12
+ var { filteringOptions = [], customGroupsText = [], enableTokenGroups = false, disableFreeTextFiltering = false, asyncProperties, expandToViewport, hideOperations = false, tokenLimit, virtualScroll } = _a, rest = __rest(_a, ["filteringOptions", "customGroupsText", "enableTokenGroups", "disableFreeTextFiltering", "asyncProperties", "expandToViewport", "hideOperations", "tokenLimit", "virtualScroll"]);
12
13
  const baseComponentProps = useBaseComponent('PropertyFilter', {
13
- props: { asyncProperties, disableFreeTextFiltering, expandToViewport, hideOperations, tokenLimit, virtualScroll },
14
+ props: {
15
+ asyncProperties,
16
+ disableFreeTextFiltering,
17
+ enableTokenGroups,
18
+ expandToViewport,
19
+ hideOperations,
20
+ tokenLimit,
21
+ virtualScroll,
22
+ },
14
23
  });
15
24
  const componentAnalyticsMetadata = {
16
25
  name: 'awsui.PropertyFilter',
@@ -20,7 +29,11 @@ const PropertyFilter = React.forwardRef((_a, ref) => {
20
29
  queryTokensCount: `${rest.query && rest.query.tokens ? rest.query.tokens.length : 0}`,
21
30
  },
22
31
  };
23
- return (React.createElement(PropertyFilterInternal, Object.assign({ ref: ref }, baseComponentProps, { filteringOptions: filteringOptions, customGroupsText: customGroupsText, disableFreeTextFiltering: disableFreeTextFiltering, asyncProperties: asyncProperties, expandToViewport: expandToViewport, hideOperations: hideOperations, tokenLimit: tokenLimit, virtualScroll: virtualScroll }, getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata }), rest)));
32
+ if (hideOperations && enableTokenGroups) {
33
+ warnOnce('PropertyFilter', 'Operations cannot be hidden when token groups are enabled.');
34
+ hideOperations = false;
35
+ }
36
+ return (React.createElement(PropertyFilterInternal, Object.assign({ ref: ref }, baseComponentProps, { filteringOptions: filteringOptions, customGroupsText: customGroupsText, enableTokenGroups: enableTokenGroups, disableFreeTextFiltering: disableFreeTextFiltering, asyncProperties: asyncProperties, expandToViewport: expandToViewport, hideOperations: hideOperations, tokenLimit: tokenLimit, virtualScroll: virtualScroll }, getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata }), rest)));
24
37
  });
25
38
  applyDisplayName(PropertyFilter, 'PropertyFilter');
26
39
  export default PropertyFilter;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/property-filter/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,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AU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,IACxB,6BAA6B,CAAC,EAAE,SAAS,EAAE,0BAA0B,EAAE,CAAC,EACxE,IAAI,EACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;AACnD,eAAe,cAAc,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { GeneratedAnalyticsMetadataPropertyFilterComponent } from './analytics-metadata/interfaces';\nimport { PropertyFilterProps, Ref } from './interfaces';\nimport PropertyFilterInternal from './internal';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\n\nexport { PropertyFilterProps };\n\nconst PropertyFilter = React.forwardRef(\n (\n {\n filteringOptions = [],\n customGroupsText = [],\n disableFreeTextFiltering = false,\n asyncProperties,\n expandToViewport,\n hideOperations,\n tokenLimit,\n virtualScroll,\n ...rest\n }: PropertyFilterProps,\n ref: React.Ref<Ref>\n ) => {\n const baseComponentProps = useBaseComponent('PropertyFilter', {\n props: { asyncProperties, disableFreeTextFiltering, expandToViewport, hideOperations, tokenLimit, virtualScroll },\n });\n\n const componentAnalyticsMetadata: GeneratedAnalyticsMetadataPropertyFilterComponent = {\n name: 'awsui.PropertyFilter',\n label: `.${analyticsSelectors['search-field']} input`,\n properties: {\n disabled: `${!!rest.disabled}`,\n queryTokensCount: `${rest.query && rest.query.tokens ? rest.query.tokens.length : 0}`,\n },\n };\n\n return (\n <PropertyFilterInternal\n ref={ref}\n {...baseComponentProps}\n filteringOptions={filteringOptions}\n customGroupsText={customGroupsText}\n disableFreeTextFiltering={disableFreeTextFiltering}\n asyncProperties={asyncProperties}\n expandToViewport={expandToViewport}\n hideOperations={hideOperations}\n tokenLimit={tokenLimit}\n virtualScroll={virtualScroll}\n {...getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata })}\n {...rest}\n />\n );\n }\n);\n\napplyDisplayName(PropertyFilter, 'PropertyFilter');\nexport default PropertyFilter;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/property-filter/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AACzE,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAGxE,OAAO,sBAAsB,MAAM,YAAY,CAAC;AAEhD,OAAO,kBAAkB,MAAM,oCAAoC,CAAC;AAIpE,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CACrC,CACE,EAWsB,EACtB,GAAmB,EACnB,EAAE;QAbF,EACE,gBAAgB,GAAG,EAAE,EACrB,gBAAgB,GAAG,EAAE,EACrB,iBAAiB,GAAG,KAAK,EACzB,wBAAwB,GAAG,KAAK,EAChC,eAAe,EACf,gBAAgB,EAChB,cAAc,GAAG,KAAK,EACtB,UAAU,EACV,aAAa,OAEO,EADjB,IAAI,cAVT,iLAWC,CADQ;IAIT,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,gBAAgB,EAAE;QAC5D,KAAK,EAAE;YACL,eAAe;YACf,wBAAwB;YACxB,iBAAiB;YACjB,gBAAgB;YAChB,cAAc;YACd,UAAU;YACV,aAAa;SACd;KACF,CAAC,CAAC;IAEH,MAAM,0BAA0B,GAAsD;QACpF,IAAI,EAAE,sBAAsB;QAC5B,KAAK,EAAE,IAAI,kBAAkB,CAAC,cAAc,CAAC,QAAQ;QACrD,UAAU,EAAE;YACV,QAAQ,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE;YAC9B,gBAAgB,EAAE,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE;SACtF;KACF,CAAC;IAEF,IAAI,cAAc,IAAI,iBAAiB,EAAE;QACvC,QAAQ,CAAC,gBAAgB,EAAE,4DAA4D,CAAC,CAAC;QACzF,cAAc,GAAG,KAAK,CAAC;KACxB;IAED,OAAO,CACL,oBAAC,sBAAsB,kBACrB,GAAG,EAAE,GAAG,IACJ,kBAAkB,IACtB,gBAAgB,EAAE,gBAAgB,EAClC,gBAAgB,EAAE,gBAAgB,EAClC,iBAAiB,EAAE,iBAAiB,EACpC,wBAAwB,EAAE,wBAAwB,EAClD,eAAe,EAAE,eAAe,EAChC,gBAAgB,EAAE,gBAAgB,EAClC,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,IACxB,6BAA6B,CAAC,EAAE,SAAS,EAAE,0BAA0B,EAAE,CAAC,EACxE,IAAI,EACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;AACnD,eAAe,cAAc,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { GeneratedAnalyticsMetadataPropertyFilterComponent } from './analytics-metadata/interfaces';\nimport { PropertyFilterProps, Ref } from './interfaces';\nimport PropertyFilterInternal from './internal';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\n\nexport { PropertyFilterProps };\n\nconst PropertyFilter = React.forwardRef(\n (\n {\n filteringOptions = [],\n customGroupsText = [],\n enableTokenGroups = false,\n disableFreeTextFiltering = false,\n asyncProperties,\n expandToViewport,\n hideOperations = false,\n tokenLimit,\n virtualScroll,\n ...rest\n }: PropertyFilterProps,\n ref: React.Ref<Ref>\n ) => {\n const baseComponentProps = useBaseComponent('PropertyFilter', {\n props: {\n asyncProperties,\n disableFreeTextFiltering,\n enableTokenGroups,\n expandToViewport,\n hideOperations,\n tokenLimit,\n virtualScroll,\n },\n });\n\n const componentAnalyticsMetadata: GeneratedAnalyticsMetadataPropertyFilterComponent = {\n name: 'awsui.PropertyFilter',\n label: `.${analyticsSelectors['search-field']} input`,\n properties: {\n disabled: `${!!rest.disabled}`,\n queryTokensCount: `${rest.query && rest.query.tokens ? rest.query.tokens.length : 0}`,\n },\n };\n\n if (hideOperations && enableTokenGroups) {\n warnOnce('PropertyFilter', 'Operations cannot be hidden when token groups are enabled.');\n hideOperations = false;\n }\n\n return (\n <PropertyFilterInternal\n ref={ref}\n {...baseComponentProps}\n filteringOptions={filteringOptions}\n customGroupsText={customGroupsText}\n enableTokenGroups={enableTokenGroups}\n disableFreeTextFiltering={disableFreeTextFiltering}\n asyncProperties={asyncProperties}\n expandToViewport={expandToViewport}\n hideOperations={hideOperations}\n tokenLimit={tokenLimit}\n virtualScroll={virtualScroll}\n {...getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata })}\n {...rest}\n />\n );\n }\n);\n\napplyDisplayName(PropertyFilter, 'PropertyFilter');\nexport default PropertyFilter;\n"]}
@@ -27,15 +27,15 @@ export interface PropertyFilterProps extends BaseComponentProps, ExpandToViewpor
27
27
  */
28
28
  countText?: string;
29
29
  /**
30
- * An object representing the current query displayed in the property filter. Has two properties: `tokens` and `operation`.
31
- * `tokens` is an array of objects that will be displayed to the user beneath the filtering input.
32
- * Each token has the following properties:
30
+ * An object representing the current query displayed in the property filter. Has three properties: `operation`, `tokens`, and `tokenGroups`.
31
+ * The `operation` property has two valid values: "and", "or", and controls the join operation to be applied between tokens when filtering the items.
32
+ * The `tokens` property is an array of objects that will be displayed to the user beneath the filtering input. When `enableTokenGroups=true`, the
33
+ * `tokenGroups` property is used instead, which supports nested tokens.
33
34
  *
35
+ * Each token has the following properties:
34
36
  * * value [string]: The string value of the token to be used as a filter.
35
37
  * * propertyKey [string]: The key of the corresponding property in filteringProperties.
36
38
  * * operator ['<' | '<=' | '>' | '>=' | ':' | '!:' | '=' | '!=' | '^' | '!^']: The operator which indicates how to filter the dataset using this token.
37
- *
38
- * `operation` has two valid values [and, or] and controls the join operation to be applied between tokens when filtering the items.
39
39
  */
40
40
  query: PropertyFilterProps.Query;
41
41
  /**
@@ -45,6 +45,11 @@ export interface PropertyFilterProps extends BaseComponentProps, ExpandToViewpor
45
45
  * operations are communicated to the user in another way.
46
46
  */
47
47
  hideOperations?: boolean;
48
+ /**
49
+ * Activates token grouping mechanism to support tokens nesting (up to one level).
50
+ * When `true`, the `query.tokens` property is ignored and `query.tokenGroups` is used instead.
51
+ */
52
+ enableTokenGroups?: boolean;
48
53
  /**
49
54
  * Fired when the `query` gets changed. Filter the dataset in response to this event using the values in the `detail` object.
50
55
  */
@@ -195,6 +200,7 @@ export interface PropertyFilterProps extends BaseComponentProps, ExpandToViewpor
195
200
  }
196
201
  export declare namespace PropertyFilterProps {
197
202
  type Token = PropertyFilterToken;
203
+ type TokenGroup = PropertyFilterTokenGroup;
198
204
  type JoinOperation = PropertyFilterOperation;
199
205
  type ComparisonOperator = PropertyFilterOperator;
200
206
  type ExtendedOperator<TokenValue> = PropertyFilterOperatorExtended<TokenValue>;
@@ -252,6 +258,15 @@ export declare namespace PropertyFilterProps {
252
258
  tokenOperatorAriaLabel?: string;
253
259
  removeTokenButtonAriaLabel?: (token: FormattedToken) => string;
254
260
  enteredTextLabel?: AutosuggestProps.EnteredTextLabel;
261
+ groupEditAriaLabel?: (group: FormattedTokenGroup) => string;
262
+ tokenEditorTokenActionsAriaLabel?: (token: FormattedToken) => string;
263
+ tokenEditorTokenRemoveAriaLabel?: (token: FormattedToken) => string;
264
+ tokenEditorTokenRemoveLabel?: string;
265
+ tokenEditorTokenRemoveFromGroupLabel?: string;
266
+ tokenEditorAddNewTokenLabel?: string;
267
+ tokenEditorAddTokenActionsAriaLabel?: string;
268
+ tokenEditorAddExistingTokenAriaLabel?: (token: FormattedToken) => string;
269
+ tokenEditorAddExistingTokenLabel?: (token: FormattedToken) => string;
255
270
  }
256
271
  interface FormattedToken {
257
272
  propertyKey?: string;
@@ -259,6 +274,11 @@ export declare namespace PropertyFilterProps {
259
274
  operator: ComparisonOperator;
260
275
  value: string;
261
276
  }
277
+ interface FormattedTokenGroup {
278
+ tokens: FormattedToken[];
279
+ operation: string;
280
+ operationLabel: string;
281
+ }
262
282
  interface GroupText {
263
283
  properties: string;
264
284
  values: string;
@@ -275,24 +295,8 @@ export declare namespace PropertyFilterProps {
275
295
  focus(): void;
276
296
  }
277
297
  }
278
- export type TokenGroup = PropertyFilterTokenGroup;
279
- export interface FormattedTokenGroup {
280
- tokens: FormattedToken[];
281
- operation: string;
282
- operationLabel: string;
283
- }
284
- export interface I18nStringsTokenGroups {
285
- groupEditAriaLabel?: (group: FormattedTokenGroup) => string;
286
- tokenEditorTokenActionsAriaLabel?: (token: FormattedToken) => string;
287
- tokenEditorTokenRemoveAriaLabel?: (token: FormattedToken) => string;
288
- tokenEditorTokenRemoveLabel?: string;
289
- tokenEditorTokenRemoveFromGroupLabel?: string;
290
- tokenEditorAddNewTokenLabel?: string;
291
- tokenEditorAddTokenActionsAriaLabel?: string;
292
- tokenEditorAddExistingTokenAriaLabel?: (token: FormattedToken) => string;
293
- tokenEditorAddExistingTokenLabel?: (token: FormattedToken) => string;
294
- }
295
298
  export type Token = PropertyFilterProps.Token;
299
+ export type TokenGroup = PropertyFilterProps.TokenGroup;
296
300
  export type JoinOperation = PropertyFilterProps.JoinOperation;
297
301
  export type ComparisonOperator = PropertyFilterProps.ComparisonOperator;
298
302
  export type ExtendedOperator<TokenValue> = PropertyFilterOperatorExtended<TokenValue>;
@@ -307,6 +311,7 @@ export type I18nStrings = PropertyFilterProps.I18nStrings;
307
311
  export type GroupText = PropertyFilterProps.GroupText;
308
312
  export type FilteringChangeDetail = PropertyFilterProps.FilteringChangeDetail;
309
313
  export type FormattedToken = PropertyFilterProps.FormattedToken;
314
+ export type FormattedTokenGroup = PropertyFilterProps.FormattedTokenGroup;
310
315
  export type Ref = PropertyFilterProps.Ref;
311
316
  export interface InternalFilteringProperty<TokenValue = any> {
312
317
  propertyKey: string;
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/property-filter/interfaces.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,+BAA+B,EAC/B,uBAAuB,EACvB,sBAAsB,EACtB,8BAA8B,EAC9B,0BAA0B,EAC1B,4BAA4B,EAC5B,+BAA+B,EAC/B,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,EACzB,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,WAAW,mBAAoB,SAAQ,kBAAkB,EAAE,gBAAgB,EAAE,qBAAqB;IACtG;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAG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AC,KAAK,EAAE,MAAM,CAAA;CAAE,GACtG;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,EAAE,yBAAyB,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,GACjF;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/property-filter/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","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 {\n PropertyFilterFreeTextFiltering,\n PropertyFilterOperation,\n PropertyFilterOperator,\n PropertyFilterOperatorExtended,\n PropertyFilterOperatorForm,\n PropertyFilterOperatorFormat,\n PropertyFilterOperatorFormProps,\n PropertyFilterOption,\n PropertyFilterProperty,\n PropertyFilterQuery,\n PropertyFilterToken,\n PropertyFilterTokenGroup,\n} from '@cloudscape-design/collection-hooks';\n\nimport { AutosuggestProps } from '../autosuggest/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { ExpandToViewport } from '../internal/components/dropdown/interfaces';\nimport { DropdownStatusProps } from '../internal/components/dropdown-status';\nimport { FormFieldControlProps } from '../internal/context/form-field-context';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface PropertyFilterProps extends BaseComponentProps, ExpandToViewport, FormFieldControlProps {\n /**\n * If set to `true`, the filtering input will be disabled.\n * Use it, for example, if you are fetching new items upon filtering change\n * in order to prevent the user from changing the filtering query.\n */\n disabled?: boolean;\n /**\n * An object containing all the necessary localized strings required by the component.\n * @i18n\n */\n i18nStrings?: PropertyFilterProps.I18nStrings;\n /**\n * Accepts a human-readable, localized string that indicates the number of results. For example, \"1 match\" or \"165 matches.\"\n * If the total number of results is unknown, also include an indication that there may be more results than\n * the number listed. For example, \"25+ matches.\"\n *\n * The count text is only displayed when `query.tokens` isn't empty.\n */\n countText?: string;\n /**\n * An object representing the current query displayed in the property filter. Has two properties: `tokens` and `operation`.\n * `tokens` is an array of objects that will be displayed to the user beneath the filtering input.\n * Each token has the following properties:\n *\n * * value [string]: The string value of the token to be used as a filter.\n * * propertyKey [string]: The key of the corresponding property in filteringProperties.\n * * operator ['<' | '<=' | '>' | '>=' | ':' | '!:' | '=' | '!=' | '^' | '!^']: The operator which indicates how to filter the dataset using this token.\n *\n * `operation` has two valid values [and, or] and controls the join operation to be applied between tokens when filtering the items.\n */\n query: PropertyFilterProps.Query;\n /**\n * If hideOperations it set, the indicator of the operation (that is, `and` or `or`) and the selection of operations\n * (applied to the property and value token) are hidden from the user. Only use when you have a custom\n * filtering logic which combines tokens in different way than the default one. When used, ensure that\n * operations are communicated to the user in another way.\n */\n hideOperations?: boolean;\n /**\n * Fired when the `query` gets changed. Filter the dataset in response to this event using the values in the `detail` object.\n */\n onChange: NonCancelableEventHandler<PropertyFilterProps.Query>;\n /**\n * An array of properties by which the data set can be filtered. Each element has the following properties:\n *\n * * groupValuesLabel [string]: Localized string to display for the 'Values' group label for a specific property.\n * * key [string]: The identifier of this property.\n * * propertyLabel [string]: A human-readable string for the property.\n * * operators [Array]: A list of all operators supported by this property. If you omit the equals operator because your API does not support it, make sure to set `defaultOperator` to a supported operator from this list.\n * * group [string]: Optional identifier of a custom group that this filtering option is assigned to. Use to create additional groups below the default one. Make sure to also define labels for the group in the customGroupsText property. Notice that only one level of options nesting is supported.\n * * defaultOperator [ComparisonOperator]: Optional parameter that changes the default operator used with this filtering property. Use it only if your API does not support \"equals\" filtering terms with this property.\n */\n filteringProperties: ReadonlyArray<PropertyFilterProps.FilteringProperty>;\n /**\n * An array of possible values of the individual `filteringProperties`. Each element has the following properties:\n *\n * * `propertyKey` [string]: The key of the corresponding filtering property in the `filteringProperties` array.\n * * `value` [string]: The value that will be used as a suggestion when creating or modifying a filtering token.\n * * `label` [string]: Optional suggestion label to be matched instead of the value.\n *\n * Filtering options that require labels can only use `=` and `!=` operators. The token value must be labelled separately, for example:\n * ```\n * const filteringProperty = {\n * key: 'state',\n * propertyLabel: 'State',\n * operators: ['=', '!='].map(operator => ({ operator, format: getStateLabel }))\n * }\n * const filteringOptions = [\n * { propertyKey: 'state', value: 'STOPPED', label: getStateLabel('STOPPED') },\n * { propertyKey: 'state', value: 'STOPPING', label: getStateLabel('STOPPING') },\n * { propertyKey: 'state', value: 'RUNNING', label: getStateLabel('RUNNING') },\n * ]\n * ```\n */\n filteringOptions?: ReadonlyArray<PropertyFilterProps.FilteringOption>;\n /**\n * An array of objects that contain localized, human-readable strings for the labels of custom groups within the filtering dropdown. Use group property to associate the strings with your custom group of options. Define the following values for each group:\n *\n * * properties [string]: The group label in the filtering dropdown that contains the list of properties from this group. For example: Tags.\n * * values [string]: The group label in the filtering dropdown that contains the list of values from this group. For example: Tags values.\n * * group [string]: The identifier of a custom group.\n */\n customGroupsText?: PropertyFilterProps.GroupText[];\n /**\n * Set `disableFreeTextFiltering` only if you can’t filter the dataset using a filter that is applied to every column,\n * instead of a specific property. This would stop the user from creating such tokens.\n */\n disableFreeTextFiltering?: boolean;\n /**\n * An object configuring the operators for free text filtering, which has the following properties:\n *\n * * operators [Array]: A list of all operators supported for free text filtering. If you omit the contains operator because your API does not support it, make sure to set `defaultOperator` to a supported operator from this list.\n * * defaultOperator [ComparisonOperator]: An optional parameter that changes the default operator used for free text filtering. Use this parameter only if your API does not support \"contains\" free test filtering terms.\n */\n freeTextFiltering?: PropertyFilterProps.FreeTextFiltering;\n /**\n * Use this event to asynchronously load filteringOptions, component currently needs. The detail object contains following properties:\n *\n * * `filteringProperty` - The property for which you need to fetch the options.\n * * `filteringOperator` - The operator for which you need to fetch the options.\n * * `filteringText` - The value that you need to use to fetch options.\n * * `firstPage` - Indicates that you should fetch the first page of options for a `filteringProperty` that match the `filteringText`.\n * * `samePage` - Indicates that you should fetch the same page that you have previously fetched (for example, when the user clicks on the recovery button).\n */\n onLoadItems?: NonCancelableEventHandler<PropertyFilterProps.LoadItemsDetail>;\n /**\n * If you have more than 500 `filteringOptions`, enable this flag to apply a performance optimization that makes\n * the filtering experience smoother. We don't recommend enabling the feature if you have less than 500 options,\n * because the improvements to performance are offset by a visible scrolling lag. When you set this flag to true,\n * it removes options that are not currently in view from the DOM.\n */\n virtualScroll?: boolean;\n /**\n * A slot located before the filtering input. Use it if for a Select component if your dataset supports property\n * filter queries only after an initial filter is applied.\n */\n customControl?: React.ReactNode;\n /**\n * A slot that replaces the standard \"Clear filter\" button.\n * When using this slot, make sure to still provide a mechanism to clear all filters.\n */\n customFilterActions?: React.ReactNode;\n /**\n * Set `asyncProperties` if you need to load `filteringProperties` asynchronously. This would cause extra `onLoadMore`\n * events to fire calling for more properties.\n */\n asyncProperties?: boolean;\n /**\n * Specifies the maximum number of displayed tokens. If the property isn't set, all of the tokens are displayed.\n */\n tokenLimit?: number;\n /**\n * The label that will be passed down to the Autosuggest `ariaLabel` property.\n * See the [Autosuggest API](/components/autosuggest/?tabId=api) page for more details.\n */\n filteringAriaLabel?: string;\n /**\n * Placeholder for the filtering input.\n */\n filteringPlaceholder?: string;\n /**\n * Displayed when there are no options to display.\n * This is only shown when `statusType` is set to `finished` or not set at all.\n */\n filteringEmpty?: React.ReactNode;\n /**\n * Specifies the text to display when in the loading state.\n **/\n filteringLoadingText?: string;\n /**\n * Specifies the text to display at the bottom of the dropdown menu after pagination has reached the end.\n **/\n filteringFinishedText?: string;\n /**\n * Specifies the text to display when a data fetching error occurs. Make sure that you provide `recoveryText`.\n **/\n filteringErrorText?: string;\n /**\n * Specifies the text for the recovery button. The text is displayed next to the error text.\n * Use the `onLoadItems` event to perform a recovery action (for example, retrying the request).\n **/\n filteringRecoveryText?: string;\n /**\n * Constraint text that's displayed below the filtering input.\n * Use this to provide additional information about supported filters.\n */\n filteringConstraintText?: React.ReactNode;\n /**\n * Specifies the current status of loading more options.\n * * `pending` - Indicates that no request in progress, but more options may be loaded.\n * * `loading` - Indicates that data fetching is in progress.\n * * `finished` - Indicates that pagination has finished and no more requests are expected.\n * * `error` - Indicates that an error occurred during fetch. You should use `recoveryText` to enable the user to recover.\n **/\n filteringStatusType?: DropdownStatusProps.StatusType;\n\n /**\n * Adds an aria-label to the \"Show fewer\" button for the token group control.\n * Use to assign unique labels when there are multiple token groups with the same `tokenLimitShowFewer` label on one page.\n */\n tokenLimitShowFewerAriaLabel?: string;\n /**\n * Adds an aria-label to the \"Show more\" button for the token group control.\n * Use to assign unique labels when there are multiple token groups with the same `tokenLimitShowMore` label on one page.\n */\n tokenLimitShowMoreAriaLabel?: string;\n}\n\nexport namespace PropertyFilterProps {\n export type Token = PropertyFilterToken;\n export type JoinOperation = PropertyFilterOperation;\n export type ComparisonOperator = PropertyFilterOperator;\n export type ExtendedOperator<TokenValue> = PropertyFilterOperatorExtended<TokenValue>;\n export type ExtendedOperatorFormProps<TokenValue> = PropertyFilterOperatorFormProps<TokenValue>;\n export type ExtendedOperatorForm<TokenValue> = PropertyFilterOperatorForm<TokenValue>;\n export type ExtendedOperatorFormat<TokenValue> = PropertyFilterOperatorFormat<TokenValue>;\n export type FilteringOption = PropertyFilterOption;\n export type FilteringProperty = PropertyFilterProperty;\n export type FreeTextFiltering = PropertyFilterFreeTextFiltering;\n export type Query = PropertyFilterQuery;\n\n export interface LoadItemsDetail {\n filteringProperty?: FilteringProperty;\n filteringOperator?: ComparisonOperator;\n filteringText: string;\n firstPage: boolean;\n samePage: boolean;\n }\n\n export interface I18nStrings {\n /**\n * @deprecated Use `filteringAriaLabel` on the component instead.\n */\n filteringAriaLabel?: string;\n\n /**\n * @deprecated Use `filteringPlaceholder` on the component instead.\n */\n filteringPlaceholder?: string;\n\n dismissAriaLabel?: string;\n clearAriaLabel?: string;\n groupValuesText?: string;\n groupPropertiesText?: string;\n operatorsText?: string;\n\n operationAndText?: string;\n operationOrText?: string;\n\n operatorLessText?: string;\n operatorLessOrEqualText?: string;\n operatorGreaterText?: string;\n operatorGreaterOrEqualText?: string;\n operatorContainsText?: string;\n operatorDoesNotContainText?: string;\n operatorEqualsText?: string;\n operatorDoesNotEqualText?: string;\n operatorStartsWithText?: string;\n operatorDoesNotStartWithText?: string;\n\n editTokenHeader?: string;\n propertyText?: string;\n operatorText?: string;\n valueText?: string;\n cancelActionText?: string;\n applyActionText?: string;\n allPropertiesLabel?: string;\n\n formatToken?: (token: FormattedToken) => string;\n\n tokenLimitShowMore?: string;\n tokenLimitShowFewer?: string;\n clearFiltersText?: string;\n tokenOperatorAriaLabel?: string;\n removeTokenButtonAriaLabel?: (token: FormattedToken) => string;\n enteredTextLabel?: AutosuggestProps.EnteredTextLabel;\n }\n\n export interface FormattedToken {\n propertyKey?: string;\n propertyLabel: string;\n operator: ComparisonOperator;\n value: string;\n }\n\n export interface GroupText {\n properties: string;\n values: string;\n group: string;\n }\n\n export interface FilteringChangeDetail {\n filteringText: string;\n filteringProperty?: FilteringProperty;\n }\n\n export interface Ref {\n /**\n * Sets focus on the underlying input control.\n */\n focus(): void;\n }\n}\n\n// Re-exported namespace interfaces to use module-style imports internally\n\nexport type TokenGroup = PropertyFilterTokenGroup;\n\nexport interface FormattedTokenGroup {\n tokens: FormattedToken[];\n operation: string;\n operationLabel: string;\n}\n\nexport interface I18nStringsTokenGroups {\n groupEditAriaLabel?: (group: FormattedTokenGroup) => string;\n tokenEditorTokenActionsAriaLabel?: (token: FormattedToken) => string;\n tokenEditorTokenRemoveAriaLabel?: (token: FormattedToken) => string;\n tokenEditorTokenRemoveLabel?: string;\n tokenEditorTokenRemoveFromGroupLabel?: string;\n tokenEditorAddNewTokenLabel?: string;\n tokenEditorAddTokenActionsAriaLabel?: string;\n tokenEditorAddExistingTokenAriaLabel?: (token: FormattedToken) => string;\n tokenEditorAddExistingTokenLabel?: (token: FormattedToken) => string;\n}\n\nexport type Token = PropertyFilterProps.Token;\nexport type JoinOperation = PropertyFilterProps.JoinOperation;\nexport type ComparisonOperator = PropertyFilterProps.ComparisonOperator;\nexport type ExtendedOperator<TokenValue> = PropertyFilterOperatorExtended<TokenValue>;\nexport type ExtendedOperatorFormProps<TokenValue> = PropertyFilterOperatorFormProps<TokenValue>;\nexport type ExtendedOperatorForm<TokenValue> = PropertyFilterOperatorForm<TokenValue>;\nexport type ExtendedOperatorFormat<TokenValue> = PropertyFilterOperatorFormat<TokenValue>;\nexport type FilteringOption = PropertyFilterProps.FilteringOption;\nexport type FilteringProperty = PropertyFilterProps.FilteringProperty;\nexport type Query = PropertyFilterProps.Query;\nexport type LoadItemsDetail = PropertyFilterProps.LoadItemsDetail;\nexport type I18nStrings = PropertyFilterProps.I18nStrings;\nexport type GroupText = PropertyFilterProps.GroupText;\nexport type FilteringChangeDetail = PropertyFilterProps.FilteringChangeDetail;\nexport type FormattedToken = PropertyFilterProps.FormattedToken;\nexport type Ref = PropertyFilterProps.Ref;\n\n// Utility types\n\nexport interface InternalFilteringProperty<TokenValue = any> {\n propertyKey: string;\n propertyLabel: string;\n groupValuesLabel: string;\n propertyGroup?: string;\n operators: readonly PropertyFilterOperator[];\n defaultOperator: PropertyFilterOperator;\n getValueFormatter: (operator?: PropertyFilterOperator) => null | ((value: any) => string);\n getValueFormRenderer: (operator?: PropertyFilterOperator) => null | PropertyFilterOperatorForm<TokenValue>;\n // Original property used in callbacks.\n externalProperty: PropertyFilterProperty;\n}\n\nexport interface InternalFilteringOption {\n property: null | InternalFilteringProperty;\n value: string;\n label: string;\n}\n\nexport interface InternalFreeTextFiltering {\n disabled: boolean;\n operators: readonly PropertyFilterOperator[];\n defaultOperator: PropertyFilterOperator;\n}\n\nexport interface InternalToken<TokenValue = any> {\n standaloneIndex?: number;\n property: null | InternalFilteringProperty<TokenValue>;\n operator: PropertyFilterOperator;\n value: TokenValue;\n}\n\nexport interface InternalTokenGroup<TokenValue = any> {\n operation: PropertyFilterOperation;\n tokens: readonly (InternalToken<TokenValue> | InternalTokenGroup<TokenValue>)[];\n}\n\nexport type InternalQuery = InternalTokenGroup;\n\nexport type ParsedText =\n | { step: 'property'; property: InternalFilteringProperty; operator: ComparisonOperator; value: string }\n | { step: 'operator'; property: InternalFilteringProperty; operatorPrefix: string }\n | { step: 'free-text'; operator?: ComparisonOperator; value: string };\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/property-filter/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","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 {\n PropertyFilterFreeTextFiltering,\n PropertyFilterOperation,\n PropertyFilterOperator,\n PropertyFilterOperatorExtended,\n PropertyFilterOperatorForm,\n PropertyFilterOperatorFormat,\n PropertyFilterOperatorFormProps,\n PropertyFilterOption,\n PropertyFilterProperty,\n PropertyFilterQuery,\n PropertyFilterToken,\n PropertyFilterTokenGroup,\n} from '@cloudscape-design/collection-hooks';\n\nimport { AutosuggestProps } from '../autosuggest/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { ExpandToViewport } from '../internal/components/dropdown/interfaces';\nimport { DropdownStatusProps } from '../internal/components/dropdown-status';\nimport { FormFieldControlProps } from '../internal/context/form-field-context';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface PropertyFilterProps extends BaseComponentProps, ExpandToViewport, FormFieldControlProps {\n /**\n * If set to `true`, the filtering input will be disabled.\n * Use it, for example, if you are fetching new items upon filtering change\n * in order to prevent the user from changing the filtering query.\n */\n disabled?: boolean;\n /**\n * An object containing all the necessary localized strings required by the component.\n * @i18n\n */\n i18nStrings?: PropertyFilterProps.I18nStrings;\n /**\n * Accepts a human-readable, localized string that indicates the number of results. For example, \"1 match\" or \"165 matches.\"\n * If the total number of results is unknown, also include an indication that there may be more results than\n * the number listed. For example, \"25+ matches.\"\n *\n * The count text is only displayed when `query.tokens` isn't empty.\n */\n countText?: string;\n /**\n * An object representing the current query displayed in the property filter. Has three properties: `operation`, `tokens`, and `tokenGroups`.\n * The `operation` property has two valid values: \"and\", \"or\", and controls the join operation to be applied between tokens when filtering the items.\n * The `tokens` property is an array of objects that will be displayed to the user beneath the filtering input. When `enableTokenGroups=true`, the\n * `tokenGroups` property is used instead, which supports nested tokens.\n *\n * Each token has the following properties:\n * * value [string]: The string value of the token to be used as a filter.\n * * propertyKey [string]: The key of the corresponding property in filteringProperties.\n * * operator ['<' | '<=' | '>' | '>=' | ':' | '!:' | '=' | '!=' | '^' | '!^']: The operator which indicates how to filter the dataset using this token.\n */\n query: PropertyFilterProps.Query;\n /**\n * If hideOperations it set, the indicator of the operation (that is, `and` or `or`) and the selection of operations\n * (applied to the property and value token) are hidden from the user. Only use when you have a custom\n * filtering logic which combines tokens in different way than the default one. When used, ensure that\n * operations are communicated to the user in another way.\n */\n hideOperations?: boolean;\n /**\n * Activates token grouping mechanism to support tokens nesting (up to one level).\n * When `true`, the `query.tokens` property is ignored and `query.tokenGroups` is used instead.\n */\n enableTokenGroups?: boolean;\n /**\n * Fired when the `query` gets changed. Filter the dataset in response to this event using the values in the `detail` object.\n */\n onChange: NonCancelableEventHandler<PropertyFilterProps.Query>;\n /**\n * An array of properties by which the data set can be filtered. Each element has the following properties:\n *\n * * groupValuesLabel [string]: Localized string to display for the 'Values' group label for a specific property.\n * * key [string]: The identifier of this property.\n * * propertyLabel [string]: A human-readable string for the property.\n * * operators [Array]: A list of all operators supported by this property. If you omit the equals operator because your API does not support it, make sure to set `defaultOperator` to a supported operator from this list.\n * * group [string]: Optional identifier of a custom group that this filtering option is assigned to. Use to create additional groups below the default one. Make sure to also define labels for the group in the customGroupsText property. Notice that only one level of options nesting is supported.\n * * defaultOperator [ComparisonOperator]: Optional parameter that changes the default operator used with this filtering property. Use it only if your API does not support \"equals\" filtering terms with this property.\n */\n filteringProperties: ReadonlyArray<PropertyFilterProps.FilteringProperty>;\n /**\n * An array of possible values of the individual `filteringProperties`. Each element has the following properties:\n *\n * * `propertyKey` [string]: The key of the corresponding filtering property in the `filteringProperties` array.\n * * `value` [string]: The value that will be used as a suggestion when creating or modifying a filtering token.\n * * `label` [string]: Optional suggestion label to be matched instead of the value.\n *\n * Filtering options that require labels can only use `=` and `!=` operators. The token value must be labelled separately, for example:\n * ```\n * const filteringProperty = {\n * key: 'state',\n * propertyLabel: 'State',\n * operators: ['=', '!='].map(operator => ({ operator, format: getStateLabel }))\n * }\n * const filteringOptions = [\n * { propertyKey: 'state', value: 'STOPPED', label: getStateLabel('STOPPED') },\n * { propertyKey: 'state', value: 'STOPPING', label: getStateLabel('STOPPING') },\n * { propertyKey: 'state', value: 'RUNNING', label: getStateLabel('RUNNING') },\n * ]\n * ```\n */\n filteringOptions?: ReadonlyArray<PropertyFilterProps.FilteringOption>;\n /**\n * An array of objects that contain localized, human-readable strings for the labels of custom groups within the filtering dropdown. Use group property to associate the strings with your custom group of options. Define the following values for each group:\n *\n * * properties [string]: The group label in the filtering dropdown that contains the list of properties from this group. For example: Tags.\n * * values [string]: The group label in the filtering dropdown that contains the list of values from this group. For example: Tags values.\n * * group [string]: The identifier of a custom group.\n */\n customGroupsText?: PropertyFilterProps.GroupText[];\n /**\n * Set `disableFreeTextFiltering` only if you can’t filter the dataset using a filter that is applied to every column,\n * instead of a specific property. This would stop the user from creating such tokens.\n */\n disableFreeTextFiltering?: boolean;\n /**\n * An object configuring the operators for free text filtering, which has the following properties:\n *\n * * operators [Array]: A list of all operators supported for free text filtering. If you omit the contains operator because your API does not support it, make sure to set `defaultOperator` to a supported operator from this list.\n * * defaultOperator [ComparisonOperator]: An optional parameter that changes the default operator used for free text filtering. Use this parameter only if your API does not support \"contains\" free test filtering terms.\n */\n freeTextFiltering?: PropertyFilterProps.FreeTextFiltering;\n /**\n * Use this event to asynchronously load filteringOptions, component currently needs. The detail object contains following properties:\n *\n * * `filteringProperty` - The property for which you need to fetch the options.\n * * `filteringOperator` - The operator for which you need to fetch the options.\n * * `filteringText` - The value that you need to use to fetch options.\n * * `firstPage` - Indicates that you should fetch the first page of options for a `filteringProperty` that match the `filteringText`.\n * * `samePage` - Indicates that you should fetch the same page that you have previously fetched (for example, when the user clicks on the recovery button).\n */\n onLoadItems?: NonCancelableEventHandler<PropertyFilterProps.LoadItemsDetail>;\n /**\n * If you have more than 500 `filteringOptions`, enable this flag to apply a performance optimization that makes\n * the filtering experience smoother. We don't recommend enabling the feature if you have less than 500 options,\n * because the improvements to performance are offset by a visible scrolling lag. When you set this flag to true,\n * it removes options that are not currently in view from the DOM.\n */\n virtualScroll?: boolean;\n /**\n * A slot located before the filtering input. Use it if for a Select component if your dataset supports property\n * filter queries only after an initial filter is applied.\n */\n customControl?: React.ReactNode;\n /**\n * A slot that replaces the standard \"Clear filter\" button.\n * When using this slot, make sure to still provide a mechanism to clear all filters.\n */\n customFilterActions?: React.ReactNode;\n /**\n * Set `asyncProperties` if you need to load `filteringProperties` asynchronously. This would cause extra `onLoadMore`\n * events to fire calling for more properties.\n */\n asyncProperties?: boolean;\n /**\n * Specifies the maximum number of displayed tokens. If the property isn't set, all of the tokens are displayed.\n */\n tokenLimit?: number;\n /**\n * The label that will be passed down to the Autosuggest `ariaLabel` property.\n * See the [Autosuggest API](/components/autosuggest/?tabId=api) page for more details.\n */\n filteringAriaLabel?: string;\n /**\n * Placeholder for the filtering input.\n */\n filteringPlaceholder?: string;\n /**\n * Displayed when there are no options to display.\n * This is only shown when `statusType` is set to `finished` or not set at all.\n */\n filteringEmpty?: React.ReactNode;\n /**\n * Specifies the text to display when in the loading state.\n **/\n filteringLoadingText?: string;\n /**\n * Specifies the text to display at the bottom of the dropdown menu after pagination has reached the end.\n **/\n filteringFinishedText?: string;\n /**\n * Specifies the text to display when a data fetching error occurs. Make sure that you provide `recoveryText`.\n **/\n filteringErrorText?: string;\n /**\n * Specifies the text for the recovery button. The text is displayed next to the error text.\n * Use the `onLoadItems` event to perform a recovery action (for example, retrying the request).\n **/\n filteringRecoveryText?: string;\n /**\n * Constraint text that's displayed below the filtering input.\n * Use this to provide additional information about supported filters.\n */\n filteringConstraintText?: React.ReactNode;\n /**\n * Specifies the current status of loading more options.\n * * `pending` - Indicates that no request in progress, but more options may be loaded.\n * * `loading` - Indicates that data fetching is in progress.\n * * `finished` - Indicates that pagination has finished and no more requests are expected.\n * * `error` - Indicates that an error occurred during fetch. You should use `recoveryText` to enable the user to recover.\n **/\n filteringStatusType?: DropdownStatusProps.StatusType;\n\n /**\n * Adds an aria-label to the \"Show fewer\" button for the token group control.\n * Use to assign unique labels when there are multiple token groups with the same `tokenLimitShowFewer` label on one page.\n */\n tokenLimitShowFewerAriaLabel?: string;\n /**\n * Adds an aria-label to the \"Show more\" button for the token group control.\n * Use to assign unique labels when there are multiple token groups with the same `tokenLimitShowMore` label on one page.\n */\n tokenLimitShowMoreAriaLabel?: string;\n}\n\nexport namespace PropertyFilterProps {\n export type Token = PropertyFilterToken;\n export type TokenGroup = PropertyFilterTokenGroup;\n export type JoinOperation = PropertyFilterOperation;\n export type ComparisonOperator = PropertyFilterOperator;\n export type ExtendedOperator<TokenValue> = PropertyFilterOperatorExtended<TokenValue>;\n export type ExtendedOperatorFormProps<TokenValue> = PropertyFilterOperatorFormProps<TokenValue>;\n export type ExtendedOperatorForm<TokenValue> = PropertyFilterOperatorForm<TokenValue>;\n export type ExtendedOperatorFormat<TokenValue> = PropertyFilterOperatorFormat<TokenValue>;\n export type FilteringOption = PropertyFilterOption;\n export type FilteringProperty = PropertyFilterProperty;\n export type FreeTextFiltering = PropertyFilterFreeTextFiltering;\n export type Query = PropertyFilterQuery;\n\n export interface LoadItemsDetail {\n filteringProperty?: FilteringProperty;\n filteringOperator?: ComparisonOperator;\n filteringText: string;\n firstPage: boolean;\n samePage: boolean;\n }\n\n export interface I18nStrings {\n /**\n * @deprecated Use `filteringAriaLabel` on the component instead.\n */\n filteringAriaLabel?: string;\n\n /**\n * @deprecated Use `filteringPlaceholder` on the component instead.\n */\n filteringPlaceholder?: string;\n\n dismissAriaLabel?: string;\n clearAriaLabel?: string;\n groupValuesText?: string;\n groupPropertiesText?: string;\n operatorsText?: string;\n\n operationAndText?: string;\n operationOrText?: string;\n\n operatorLessText?: string;\n operatorLessOrEqualText?: string;\n operatorGreaterText?: string;\n operatorGreaterOrEqualText?: string;\n operatorContainsText?: string;\n operatorDoesNotContainText?: string;\n operatorEqualsText?: string;\n operatorDoesNotEqualText?: string;\n operatorStartsWithText?: string;\n operatorDoesNotStartWithText?: string;\n\n editTokenHeader?: string;\n propertyText?: string;\n operatorText?: string;\n valueText?: string;\n cancelActionText?: string;\n applyActionText?: string;\n allPropertiesLabel?: string;\n\n formatToken?: (token: FormattedToken) => string;\n\n tokenLimitShowMore?: string;\n tokenLimitShowFewer?: string;\n clearFiltersText?: string;\n tokenOperatorAriaLabel?: string;\n removeTokenButtonAriaLabel?: (token: FormattedToken) => string;\n enteredTextLabel?: AutosuggestProps.EnteredTextLabel;\n\n groupEditAriaLabel?: (group: FormattedTokenGroup) => string;\n tokenEditorTokenActionsAriaLabel?: (token: FormattedToken) => string;\n tokenEditorTokenRemoveAriaLabel?: (token: FormattedToken) => string;\n tokenEditorTokenRemoveLabel?: string;\n tokenEditorTokenRemoveFromGroupLabel?: string;\n tokenEditorAddNewTokenLabel?: string;\n tokenEditorAddTokenActionsAriaLabel?: string;\n tokenEditorAddExistingTokenAriaLabel?: (token: FormattedToken) => string;\n tokenEditorAddExistingTokenLabel?: (token: FormattedToken) => string;\n }\n\n export interface FormattedToken {\n propertyKey?: string;\n propertyLabel: string;\n operator: ComparisonOperator;\n value: string;\n }\n\n export interface FormattedTokenGroup {\n tokens: FormattedToken[];\n operation: string;\n operationLabel: string;\n }\n\n export interface GroupText {\n properties: string;\n values: string;\n group: string;\n }\n\n export interface FilteringChangeDetail {\n filteringText: string;\n filteringProperty?: FilteringProperty;\n }\n\n export interface Ref {\n /**\n * Sets focus on the underlying input control.\n */\n focus(): void;\n }\n}\n\n// Re-exported namespace interfaces to use module-style imports internally\n\nexport type Token = PropertyFilterProps.Token;\nexport type TokenGroup = PropertyFilterProps.TokenGroup;\nexport type JoinOperation = PropertyFilterProps.JoinOperation;\nexport type ComparisonOperator = PropertyFilterProps.ComparisonOperator;\nexport type ExtendedOperator<TokenValue> = PropertyFilterOperatorExtended<TokenValue>;\nexport type ExtendedOperatorFormProps<TokenValue> = PropertyFilterOperatorFormProps<TokenValue>;\nexport type ExtendedOperatorForm<TokenValue> = PropertyFilterOperatorForm<TokenValue>;\nexport type ExtendedOperatorFormat<TokenValue> = PropertyFilterOperatorFormat<TokenValue>;\nexport type FilteringOption = PropertyFilterProps.FilteringOption;\nexport type FilteringProperty = PropertyFilterProps.FilteringProperty;\nexport type Query = PropertyFilterProps.Query;\nexport type LoadItemsDetail = PropertyFilterProps.LoadItemsDetail;\nexport type I18nStrings = PropertyFilterProps.I18nStrings;\nexport type GroupText = PropertyFilterProps.GroupText;\nexport type FilteringChangeDetail = PropertyFilterProps.FilteringChangeDetail;\nexport type FormattedToken = PropertyFilterProps.FormattedToken;\nexport type FormattedTokenGroup = PropertyFilterProps.FormattedTokenGroup;\nexport type Ref = PropertyFilterProps.Ref;\n\n// Utility types\n\nexport interface InternalFilteringProperty<TokenValue = any> {\n propertyKey: string;\n propertyLabel: string;\n groupValuesLabel: string;\n propertyGroup?: string;\n operators: readonly PropertyFilterOperator[];\n defaultOperator: PropertyFilterOperator;\n getValueFormatter: (operator?: PropertyFilterOperator) => null | ((value: any) => string);\n getValueFormRenderer: (operator?: PropertyFilterOperator) => null | PropertyFilterOperatorForm<TokenValue>;\n // Original property used in callbacks.\n externalProperty: PropertyFilterProperty;\n}\n\nexport interface InternalFilteringOption {\n property: null | InternalFilteringProperty;\n value: string;\n label: string;\n}\n\nexport interface InternalFreeTextFiltering {\n disabled: boolean;\n operators: readonly PropertyFilterOperator[];\n defaultOperator: PropertyFilterOperator;\n}\n\nexport interface InternalToken<TokenValue = any> {\n standaloneIndex?: number;\n property: null | InternalFilteringProperty<TokenValue>;\n operator: PropertyFilterOperator;\n value: TokenValue;\n}\n\nexport interface InternalTokenGroup<TokenValue = any> {\n operation: PropertyFilterOperation;\n tokens: readonly (InternalToken<TokenValue> | InternalTokenGroup<TokenValue>)[];\n}\n\nexport type InternalQuery = InternalTokenGroup;\n\nexport type ParsedText =\n | { step: 'property'; property: InternalFilteringProperty; operator: ComparisonOperator; value: string }\n | { step: 'operator'; property: InternalFilteringProperty; operatorPrefix: string }\n | { step: 'free-text'; operator?: ComparisonOperator; value: string };\n"]}
@@ -1,18 +1,14 @@
1
1
  import React from 'react';
2
2
  import { InternalBaseComponentProps } from '../internal/hooks/use-base-component';
3
3
  import { SomeRequired } from '../internal/types';
4
- import { I18nStringsTokenGroups, PropertyFilterProps } from './interfaces';
5
- export type PropertyFilterInternalProps = SomeRequired<PropertyFilterProps, 'filteringOptions' | 'customGroupsText' | 'disableFreeTextFiltering'> & InternalBaseComponentProps & {
6
- enableTokenGroups?: boolean;
7
- i18nStringsTokenGroups?: I18nStringsTokenGroups;
8
- };
4
+ import { PropertyFilterProps } from './interfaces';
5
+ export type PropertyFilterInternalProps = SomeRequired<PropertyFilterProps, 'filteringOptions' | 'customGroupsText' | 'enableTokenGroups' | 'disableFreeTextFiltering' | 'hideOperations'> & InternalBaseComponentProps;
9
6
  declare const PropertyFilterInternal: React.ForwardRefExoticComponent<PropertyFilterProps & {
7
+ hideOperations: boolean;
8
+ enableTokenGroups: boolean;
10
9
  filteringOptions: readonly import("@cloudscape-design/collection-hooks").PropertyFilterOption[];
11
10
  customGroupsText: PropertyFilterProps.GroupText[];
12
11
  disableFreeTextFiltering: boolean;
13
- } & InternalBaseComponentProps<any> & {
14
- enableTokenGroups?: boolean | undefined;
15
- i18nStringsTokenGroups?: I18nStringsTokenGroups | undefined;
16
- } & React.RefAttributes<PropertyFilterProps.Ref>>;
12
+ } & InternalBaseComponentProps<any> & React.RefAttributes<PropertyFilterProps.Ref>>;
17
13
  export default PropertyFilterInternal;
18
14
  //# sourceMappingURL=internal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/property-filter/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAgD,MAAM,OAAO,CAAC;AAWrE,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAIlF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAOjD,OAAO,EAIL,sBAAsB,EAQtB,mBAAmB,EAIpB,MAAM,cAAc,CAAC;AAUtB,MAAM,MAAM,2BAA2B,GAAG,YAAY,CACpD,mBAAmB,EACnB,kBAAkB,GAAG,kBAAkB,GAAG,0BAA0B,CACrE,GACC,0BAA0B,GAAG;IAC3B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,sBAAsB,CAAC,EAAE,sBAAsB,CAAC;CACjD,CAAC;AAEJ,QAAA,MAAM,sBAAsB;;;;;;;iDAwX3B,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/property-filter/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAgD,MAAM,OAAO,CAAC;AAWrE,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAIlF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAOjD,OAAO,EAWL,mBAAmB,EAIpB,MAAM,cAAc,CAAC;AAUtB,MAAM,MAAM,2BAA2B,GAAG,YAAY,CACpD,mBAAmB,EACnB,kBAAkB,GAAG,kBAAkB,GAAG,mBAAmB,GAAG,0BAA0B,GAAG,gBAAgB,CAC9G,GACC,0BAA0B,CAAC;AAE7B,QAAA,MAAM,sBAAsB;;;;;;mFAuX3B,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -25,7 +25,7 @@ import analyticsSelectors from './analytics-metadata/styles.css.js';
25
25
  import styles from './styles.css.js';
26
26
  const PropertyFilterInternal = React.forwardRef((_a, ref) => {
27
27
  var _b;
28
- 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, i18nStringsTokenGroups, __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", "i18nStringsTokenGroups", "__internalRootRef"]);
28
+ 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, __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", "__internalRootRef"]);
29
29
  const [nextFocusIndex, setNextFocusIndex] = useState(null);
30
30
  const onFocusMoved = () => setNextFocusIndex(null);
31
31
  const tokenListRef = useListFocusController({
@@ -38,7 +38,7 @@ const PropertyFilterInternal = React.forwardRef((_a, ref) => {
38
38
  const mergedRef = useMergeRefs(tokenListRef, __internalRootRef);
39
39
  const inputRef = useRef(null);
40
40
  const baseProps = getBaseProps(rest);
41
- const i18nStrings = usePropertyFilterI18n(Object.assign(Object.assign({}, rest.i18nStrings), i18nStringsTokenGroups));
41
+ const i18nStrings = usePropertyFilterI18n(rest.i18nStrings);
42
42
  useImperativeHandle(ref, () => ({ focus: () => { var _a; return (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus(); } }), []);
43
43
  const showResults = !!((_b = query.tokens) === null || _b === void 0 ? void 0 : _b.length) && !disabled && !!countText;
44
44
  const [filteringText, setFilteringText] = useState('');