@cloudscape-design/components 3.0.1094 → 3.0.1096

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 (69) hide show
  1. package/button-dropdown/item-element/styles.css.js +16 -16
  2. package/button-dropdown/item-element/styles.scoped.css +25 -25
  3. package/button-dropdown/item-element/styles.selectors.js +16 -16
  4. package/flashbar/collapsible-flashbar.d.ts +2 -2
  5. package/flashbar/collapsible-flashbar.d.ts.map +1 -1
  6. package/flashbar/collapsible-flashbar.js.map +1 -1
  7. package/flashbar/common.d.ts +3 -2
  8. package/flashbar/common.d.ts.map +1 -1
  9. package/flashbar/common.js +8 -13
  10. package/flashbar/common.js.map +1 -1
  11. package/flashbar/implementation.d.ts +4 -0
  12. package/flashbar/implementation.d.ts.map +1 -0
  13. package/flashbar/implementation.js +16 -0
  14. package/flashbar/implementation.js.map +1 -0
  15. package/flashbar/index.d.ts.map +1 -1
  16. package/flashbar/interfaces.d.ts +3 -1
  17. package/flashbar/interfaces.d.ts.map +1 -1
  18. package/flashbar/interfaces.js.map +1 -1
  19. package/flashbar/internal-do-not-use-core.js +6 -8
  20. package/flashbar/internal-do-not-use-core.js.map +1 -1
  21. package/flashbar/internal.d.ts +1 -0
  22. package/flashbar/internal.d.ts.map +1 -0
  23. package/flashbar/internal.js +5 -0
  24. package/flashbar/internal.js.map +1 -0
  25. package/flashbar/non-collapsible-flashbar.d.ts +2 -2
  26. package/flashbar/non-collapsible-flashbar.d.ts.map +1 -1
  27. package/flashbar/non-collapsible-flashbar.js.map +1 -1
  28. package/header/index.d.ts.map +1 -1
  29. package/header/index.js +6 -1
  30. package/header/index.js.map +1 -1
  31. package/internal/base-component/styles.scoped.css +6 -1
  32. package/internal/environment.js +2 -2
  33. package/internal/environment.json +2 -2
  34. package/internal/generated/styles/tokens.d.ts +1 -0
  35. package/internal/generated/styles/tokens.js +1 -0
  36. package/internal/generated/theming/index.cjs +47 -14
  37. package/internal/generated/theming/index.cjs.d.ts +9 -0
  38. package/internal/generated/theming/index.d.ts +9 -0
  39. package/internal/generated/theming/index.js +47 -14
  40. package/internal/manifest.json +1 -1
  41. package/internal/widget-exports.d.ts +1 -0
  42. package/internal/widget-exports.d.ts.map +1 -1
  43. package/internal/widget-exports.js +1 -0
  44. package/internal/widget-exports.js.map +1 -1
  45. package/package.json +1 -1
  46. package/property-filter/controller.d.ts +2 -0
  47. package/property-filter/controller.d.ts.map +1 -1
  48. package/property-filter/controller.js +5 -1
  49. package/property-filter/controller.js.map +1 -1
  50. package/property-filter/filter-options.js +5 -2
  51. package/property-filter/filter-options.js.map +1 -1
  52. package/property-filter/interfaces.d.ts +2 -0
  53. package/property-filter/interfaces.d.ts.map +1 -1
  54. package/property-filter/interfaces.js.map +1 -1
  55. package/property-filter/internal.d.ts.map +1 -1
  56. package/property-filter/internal.js +3 -1
  57. package/property-filter/internal.js.map +1 -1
  58. package/property-filter/property-editor.d.ts.map +1 -1
  59. package/property-filter/property-editor.js +1 -1
  60. package/property-filter/property-editor.js.map +1 -1
  61. package/property-filter/token-editor-inputs.js +2 -2
  62. package/property-filter/token-editor-inputs.js.map +1 -1
  63. package/select/parts/styles.css.js +22 -22
  64. package/select/parts/styles.scoped.css +24 -24
  65. package/select/parts/styles.selectors.js +22 -22
  66. package/test-utils/dom/index.js +332 -83
  67. package/test-utils/dom/index.js.map +1 -1
  68. package/test-utils/selectors/index.js +332 -83
  69. package/test-utils/selectors/index.js.map +1 -1
@@ -1214,6 +1214,10 @@ export var preset = {
1214
1214
  "light": "{colorGrey500}",
1215
1215
  "dark": "{colorGrey500}"
1216
1216
  },
1217
+ "colorItemSelected": {
1218
+ "light": "{colorBlue600}",
1219
+ "dark": "{colorBlue400}"
1220
+ },
1217
1221
  "colorBorderCalendarGrid": {
1218
1222
  "light": "transparent",
1219
1223
  "dark": "transparent"
@@ -1339,8 +1343,8 @@ export var preset = {
1339
1343
  "dark": "{colorBorderItemSelected}"
1340
1344
  },
1341
1345
  "colorBorderItemSelected": {
1342
- "light": "{colorBlue600}",
1343
- "dark": "{colorBlue400}"
1346
+ "light": "{colorItemSelected}",
1347
+ "dark": "{colorItemSelected}"
1344
1348
  },
1345
1349
  "colorBorderLayout": {
1346
1350
  "light": "{colorGrey350}",
@@ -3494,6 +3498,10 @@ export var preset = {
3494
3498
  "light": "{colorGrey500}",
3495
3499
  "dark": "{colorGrey500}"
3496
3500
  },
3501
+ "colorItemSelected": {
3502
+ "light": "{colorBlue400}",
3503
+ "dark": "{colorBlue400}"
3504
+ },
3497
3505
  "colorBorderCalendarGrid": {
3498
3506
  "light": "transparent",
3499
3507
  "dark": "transparent"
@@ -3619,8 +3627,8 @@ export var preset = {
3619
3627
  "dark": "{colorBorderItemSelected}"
3620
3628
  },
3621
3629
  "colorBorderItemSelected": {
3622
- "light": "{colorBlue400}",
3623
- "dark": "{colorBlue400}"
3630
+ "light": "{colorItemSelected}",
3631
+ "dark": "{colorItemSelected}"
3624
3632
  },
3625
3633
  "colorBorderLayout": {
3626
3634
  "light": "{colorGrey650}",
@@ -4672,6 +4680,10 @@ export var preset = {
4672
4680
  "light": "{colorGrey500}",
4673
4681
  "dark": "{colorGrey500}"
4674
4682
  },
4683
+ "colorItemSelected": {
4684
+ "light": "{colorBlue400}",
4685
+ "dark": "{colorBlue400}"
4686
+ },
4675
4687
  "colorBorderCalendarGrid": {
4676
4688
  "light": "transparent",
4677
4689
  "dark": "transparent"
@@ -4797,8 +4809,8 @@ export var preset = {
4797
4809
  "dark": "{colorBorderItemSelected}"
4798
4810
  },
4799
4811
  "colorBorderItemSelected": {
4800
- "light": "{colorBlue400}",
4801
- "dark": "{colorBlue400}"
4812
+ "light": "{colorItemSelected}",
4813
+ "dark": "{colorItemSelected}"
4802
4814
  },
4803
4815
  "colorBorderLayout": {
4804
4816
  "light": "{colorGrey650}",
@@ -5782,6 +5794,10 @@ export var preset = {
5782
5794
  "light": "{colorGrey500}",
5783
5795
  "dark": "{colorGrey500}"
5784
5796
  },
5797
+ "colorItemSelected": {
5798
+ "light": "{colorBlue600}",
5799
+ "dark": "{colorBlue400}"
5800
+ },
5785
5801
  "colorBorderCalendarGrid": {
5786
5802
  "light": "transparent",
5787
5803
  "dark": "transparent"
@@ -5907,8 +5923,8 @@ export var preset = {
5907
5923
  "dark": "{colorBorderItemSelected}"
5908
5924
  },
5909
5925
  "colorBorderItemSelected": {
5910
- "light": "{colorBlue600}",
5911
- "dark": "{colorBlue400}"
5926
+ "light": "{colorItemSelected}",
5927
+ "dark": "{colorItemSelected}"
5912
5928
  },
5913
5929
  "colorBorderLayout": {
5914
5930
  "light": "{colorGrey350}",
@@ -6892,6 +6908,10 @@ export var preset = {
6892
6908
  "light": "{colorGrey500}",
6893
6909
  "dark": "{colorGrey500}"
6894
6910
  },
6911
+ "colorItemSelected": {
6912
+ "light": "{colorBlue600}",
6913
+ "dark": "{colorBlue400}"
6914
+ },
6895
6915
  "colorBorderCalendarGrid": {
6896
6916
  "light": "transparent",
6897
6917
  "dark": "transparent"
@@ -7017,8 +7037,8 @@ export var preset = {
7017
7037
  "dark": "{colorBorderItemSelected}"
7018
7038
  },
7019
7039
  "colorBorderItemSelected": {
7020
- "light": "{colorBlue600}",
7021
- "dark": "{colorBlue400}"
7040
+ "light": "{colorItemSelected}",
7041
+ "dark": "{colorItemSelected}"
7022
7042
  },
7023
7043
  "colorBorderLayout": {
7024
7044
  "light": "{colorGrey350}",
@@ -8002,6 +8022,10 @@ export var preset = {
8002
8022
  "light": "{colorGrey500}",
8003
8023
  "dark": "{colorGrey500}"
8004
8024
  },
8025
+ "colorItemSelected": {
8026
+ "light": "{colorBlue600}",
8027
+ "dark": "{colorBlue400}"
8028
+ },
8005
8029
  "colorBorderCalendarGrid": {
8006
8030
  "light": "transparent",
8007
8031
  "dark": "transparent"
@@ -8127,8 +8151,8 @@ export var preset = {
8127
8151
  "dark": "{colorBorderItemSelected}"
8128
8152
  },
8129
8153
  "colorBorderItemSelected": {
8130
- "light": "{colorBlue600}",
8131
- "dark": "{colorBlue400}"
8154
+ "light": "{colorItemSelected}",
8155
+ "dark": "{colorItemSelected}"
8132
8156
  },
8133
8157
  "colorBorderLayout": {
8134
8158
  "light": "{colorGrey350}",
@@ -9114,6 +9138,10 @@ export var preset = {
9114
9138
  "light": "{colorGrey500}",
9115
9139
  "dark": "{colorGrey500}"
9116
9140
  },
9141
+ "colorItemSelected": {
9142
+ "light": "{colorBlue400}",
9143
+ "dark": "{colorBlue400}"
9144
+ },
9117
9145
  "colorBorderCalendarGrid": {
9118
9146
  "light": "transparent",
9119
9147
  "dark": "transparent"
@@ -9239,8 +9267,8 @@ export var preset = {
9239
9267
  "dark": "{colorBorderItemSelected}"
9240
9268
  },
9241
9269
  "colorBorderItemSelected": {
9242
- "light": "{colorBlue400}",
9243
- "dark": "{colorBlue400}"
9270
+ "light": "{colorItemSelected}",
9271
+ "dark": "{colorItemSelected}"
9244
9272
  },
9245
9273
  "colorBorderLayout": {
9246
9274
  "light": "{colorGrey650}",
@@ -10069,6 +10097,7 @@ export var preset = {
10069
10097
  "colorTextButtonIconDisabled": "color",
10070
10098
  "colorBorderButtonPrimaryDisabled": "color",
10071
10099
  "colorTextButtonPrimaryDisabled": "color",
10100
+ "colorItemSelected": "color",
10072
10101
  "colorBorderCalendarGrid": "color",
10073
10102
  "colorBorderCalendarGridSelectedFocusRing": "color",
10074
10103
  "colorBorderCellShaded": "color",
@@ -10538,6 +10567,7 @@ export var preset = {
10538
10567
  "colorTextButtonIconDisabled",
10539
10568
  "colorBorderButtonPrimaryDisabled",
10540
10569
  "colorTextButtonPrimaryDisabled",
10570
+ "colorItemSelected",
10541
10571
  "colorBorderContainerTop",
10542
10572
  "colorBorderControlDefault",
10543
10573
  "colorBorderDividerDefault",
@@ -10898,6 +10928,7 @@ export var preset = {
10898
10928
  "colorTextButtonIconDisabled",
10899
10929
  "colorBorderButtonPrimaryDisabled",
10900
10930
  "colorTextButtonPrimaryDisabled",
10931
+ "colorItemSelected",
10901
10932
  "colorBorderContainerTop",
10902
10933
  "colorBorderControlDefault",
10903
10934
  "colorBorderDividerDefault",
@@ -11398,6 +11429,7 @@ export var preset = {
11398
11429
  "colorTextButtonIconDisabled": "color-text-button-icon-disabled",
11399
11430
  "colorBorderButtonPrimaryDisabled": "color-border-button-primary-disabled",
11400
11431
  "colorTextButtonPrimaryDisabled": "color-text-button-primary-disabled",
11432
+ "colorItemSelected": "color-item-selected",
11401
11433
  "colorBorderCalendarGrid": "color-border-calendar-grid",
11402
11434
  "colorBorderCalendarGridSelectedFocusRing": "color-border-calendar-grid-selected-focus-ring",
11403
11435
  "colorBorderCellShaded": "color-border-cell-shaded",
@@ -12156,6 +12188,7 @@ export var preset = {
12156
12188
  "colorTextButtonIconDisabled": "--color-text-button-icon-disabled-nnofkn",
12157
12189
  "colorBorderButtonPrimaryDisabled": "--color-border-button-primary-disabled-b5p1ji",
12158
12190
  "colorTextButtonPrimaryDisabled": "--color-text-button-primary-disabled-q79gms",
12191
+ "colorItemSelected": "--color-item-selected-72rnwy",
12159
12192
  "colorBorderCalendarGrid": "--color-border-calendar-grid-67r4w4",
12160
12193
  "colorBorderCalendarGridSelectedFocusRing": "--color-border-calendar-grid-selected-focus-ring-jk1fb0",
12161
12194
  "colorBorderCellShaded": "--color-border-cell-shaded-0ipazf",
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "a463d12ad683b181343235ae03fac117ddad0fa3"
2
+ "commit": "75569d1090e38b1554cafb5476d102025115c4a4"
3
3
  }
@@ -12,5 +12,6 @@ export { AppLayoutStateProvider as AppLayoutWidgetizedState } from '../app-layou
12
12
  export { SplitPanelImplementation as SplitPanel } from '../split-panel/implementation';
13
13
  export { BreadcrumbGroupImplementation as BreadcrumbGroup } from '../breadcrumb-group/implementation';
14
14
  export { DrawerImplementation as Drawer } from '../drawer/implementation';
15
+ export { FlashbarImplementation as Flashbar } from '../flashbar/implementation';
15
16
  export { SideNavigationImplementation as SideNavigation } from '../side-navigation/implementation';
16
17
  export { HelpPanelImplementation as HelpPanel } from '../help-panel/implementation';
@@ -1 +1 @@
1
- {"version":3,"file":"widget-exports.d.ts","sourceRoot":"","sources":["../../../src/internal/widget-exports.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGhD,OAAO,EACL,6BAA6B,IAAI,eAAe,EAChD,oCAAoC,IAAI,sBAAsB,GAC/D,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,iCAAiC,IAAI,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAC3H,OAAO,EAAE,oCAAoC,IAAI,sBAAsB,EAAE,MAAM,oDAAoD,CAAC;AACpI,OAAO,EACL,6CAA6C,IAAI,yBAAyB,EAC1E,2CAA2C,IAAI,uBAAuB,GACvE,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,8BAA8B,IAAI,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAGlH,OAAO,EAAE,4BAA4B,IAAI,uBAAuB,EAAE,MAAM,oEAAoE,CAAC;AAC7I,OAAO,EAAE,2BAA2B,IAAI,sBAAsB,EAAE,MAAM,mEAAmE,CAAC;AAC1I,OAAO,EAAE,4BAA4B,IAAI,uBAAuB,EAAE,MAAM,oEAAoE,CAAC;AAC7I,OAAO,EAAE,+BAA+B,IAAI,0BAA0B,EAAE,MAAM,uEAAuE,CAAC;AACtJ,OAAO,EAAE,sBAAsB,IAAI,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AAEhH,OAAO,EAAE,wBAAwB,IAAI,UAAU,EAAE,MAAM,+BAA+B,CAAC;AACvF,OAAO,EAAE,6BAA6B,IAAI,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACtG,OAAO,EAAE,oBAAoB,IAAI,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,4BAA4B,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnG,OAAO,EAAE,uBAAuB,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAC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SAAS,EAAE,MAAM,8BAA8B,CAAC"}
@@ -16,6 +16,7 @@ export { AppLayoutStateProvider as AppLayoutWidgetizedState } from '../app-layou
16
16
  export { SplitPanelImplementation as SplitPanel } from '../split-panel/implementation';
17
17
  export { BreadcrumbGroupImplementation as BreadcrumbGroup } from '../breadcrumb-group/implementation';
18
18
  export { DrawerImplementation as Drawer } from '../drawer/implementation';
19
+ export { FlashbarImplementation as Flashbar } from '../flashbar/implementation';
19
20
  export { SideNavigationImplementation as SideNavigation } from '../side-navigation/implementation';
20
21
  export { HelpPanelImplementation as HelpPanel } from '../help-panel/implementation';
21
22
  //# sourceMappingURL=widget-exports.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"widget-exports.js","sourceRoot":"","sources":["../../../src/internal/widget-exports.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,0BAA0B;AAC1B,OAAO,EACL,6BAA6B,IAAI,eAAe,EAChD,oCAAoC,IAAI,sBAAsB,GAC/D,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,iCAAiC,IAAI,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAC3H,OAAO,EAAE,oCAAoC,IAAI,sBAAsB,EAAE,MAAM,oDAAoD,CAAC;AACpI,OAAO,EACL,6CAA6C,IAAI,yBAAyB,EAC1E,2CAA2C,IAAI,uBAAuB,GACvE,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,8BAA8B,IAAI,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAElH,8BAA8B;AAC9B,OAAO,EAAE,4BAA4B,IAAI,uBAAuB,EAAE,MAAM,oEAAoE,CAAC;AAC7I,OAAO,EAAE,2BAA2B,IAAI,sBAAsB,EAAE,MAAM,mEAAmE,CAAC;AAC1I,OAAO,EAAE,4BAA4B,IAAI,uBAAuB,EAAE,MAAM,oEAAoE,CAAC;AAC7I,OAAO,EAAE,+BAA+B,IAAI,0BAA0B,EAAE,MAAM,uEAAuE,CAAC;AACtJ,OAAO,EAAE,sBAAsB,IAAI,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AAEhH,OAAO,EAAE,wBAAwB,IAAI,UAAU,EAAE,MAAM,+BAA+B,CAAC;AACvF,OAAO,EAAE,6BAA6B,IAAI,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACtG,OAAO,EAAE,oBAAoB,IAAI,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,4BAA4B,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnG,OAAO,EAAE,uBAAuB,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport { PACKAGE_VERSION } from './environment';\n\n// Legacy widgetized parts\nexport {\n AppLayoutDrawerImplementation as AppLayoutDrawer,\n AppLayoutGlobalDrawersImplementation as AppLayoutGlobalDrawers,\n} from '../app-layout/visual-refresh-toolbar/drawer';\nexport { AppLayoutNavigationImplementation as AppLayoutNavigation } from '../app-layout/visual-refresh-toolbar/navigation';\nexport { AppLayoutNotificationsImplementation as AppLayoutNotifications } from '../app-layout/visual-refresh-toolbar/notifications';\nexport {\n AppLayoutSplitPanelDrawerBottomImplementation as AppLayoutSplitPanelBottom,\n AppLayoutSplitPanelDrawerSideImplementation as AppLayoutSplitPanelSide,\n} from '../app-layout/visual-refresh-toolbar/split-panel';\nexport { AppLayoutToolbarImplementation as AppLayoutToolbar } from '../app-layout/visual-refresh-toolbar/toolbar';\n\n// Refactored widgetized parts\nexport { BeforeMainSlotImplementation as AppLayoutBeforeMainSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/before-main-slot';\nexport { AfterMainSlotImplementation as AppLayoutAfterMainSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/after-main-slot';\nexport { TopContentSlotImplementation as AppLayoutTopContentSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/top-content-slot';\nexport { BottomContentSlotImplementation as AppLayoutBottomContentSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot';\nexport { AppLayoutStateProvider as AppLayoutWidgetizedState } from '../app-layout/visual-refresh-toolbar/state';\n\nexport { SplitPanelImplementation as SplitPanel } from '../split-panel/implementation';\nexport { BreadcrumbGroupImplementation as BreadcrumbGroup } from '../breadcrumb-group/implementation';\nexport { DrawerImplementation as Drawer } from '../drawer/implementation';\nexport { SideNavigationImplementation as SideNavigation } from '../side-navigation/implementation';\nexport { HelpPanelImplementation as HelpPanel } from '../help-panel/implementation';\n"]}
1
+ {"version":3,"file":"widget-exports.js","sourceRoot":"","sources":["../../../src/internal/widget-exports.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,0BAA0B;AAC1B,OAAO,EACL,6BAA6B,IAAI,eAAe,EAChD,oCAAoC,IAAI,sBAAsB,GAC/D,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,iCAAiC,IAAI,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAC3H,OAAO,EAAE,oCAAoC,IAAI,sBAAsB,EAAE,MAAM,oDAAoD,CAAC;AACpI,OAAO,EACL,6CAA6C,IAAI,yBAAyB,EAC1E,2CAA2C,IAAI,uBAAuB,GACvE,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,8BAA8B,IAAI,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAElH,8BAA8B;AAC9B,OAAO,EAAE,4BAA4B,IAAI,uBAAuB,EAAE,MAAM,oEAAoE,CAAC;AAC7I,OAAO,EAAE,2BAA2B,IAAI,sBAAsB,EAAE,MAAM,mEAAmE,CAAC;AAC1I,OAAO,EAAE,4BAA4B,IAAI,uBAAuB,EAAE,MAAM,oEAAoE,CAAC;AAC7I,OAAO,EAAE,+BAA+B,IAAI,0BAA0B,EAAE,MAAM,uEAAuE,CAAC;AACtJ,OAAO,EAAE,sBAAsB,IAAI,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AAEhH,OAAO,EAAE,wBAAwB,IAAI,UAAU,EAAE,MAAM,+BAA+B,CAAC;AACvF,OAAO,EAAE,6BAA6B,IAAI,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACtG,OAAO,EAAE,oBAAoB,IAAI,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,sBAAsB,IAAI,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,4BAA4B,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnG,OAAO,EAAE,uBAAuB,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport { PACKAGE_VERSION } from './environment';\n\n// Legacy widgetized parts\nexport {\n AppLayoutDrawerImplementation as AppLayoutDrawer,\n AppLayoutGlobalDrawersImplementation as AppLayoutGlobalDrawers,\n} from '../app-layout/visual-refresh-toolbar/drawer';\nexport { AppLayoutNavigationImplementation as AppLayoutNavigation } from '../app-layout/visual-refresh-toolbar/navigation';\nexport { AppLayoutNotificationsImplementation as AppLayoutNotifications } from '../app-layout/visual-refresh-toolbar/notifications';\nexport {\n AppLayoutSplitPanelDrawerBottomImplementation as AppLayoutSplitPanelBottom,\n AppLayoutSplitPanelDrawerSideImplementation as AppLayoutSplitPanelSide,\n} from '../app-layout/visual-refresh-toolbar/split-panel';\nexport { AppLayoutToolbarImplementation as AppLayoutToolbar } from '../app-layout/visual-refresh-toolbar/toolbar';\n\n// Refactored widgetized parts\nexport { BeforeMainSlotImplementation as AppLayoutBeforeMainSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/before-main-slot';\nexport { AfterMainSlotImplementation as AppLayoutAfterMainSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/after-main-slot';\nexport { TopContentSlotImplementation as AppLayoutTopContentSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/top-content-slot';\nexport { BottomContentSlotImplementation as AppLayoutBottomContentSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot';\nexport { AppLayoutStateProvider as AppLayoutWidgetizedState } from '../app-layout/visual-refresh-toolbar/state';\n\nexport { SplitPanelImplementation as SplitPanel } from '../split-panel/implementation';\nexport { BreadcrumbGroupImplementation as BreadcrumbGroup } from '../breadcrumb-group/implementation';\nexport { DrawerImplementation as Drawer } from '../drawer/implementation';\nexport { FlashbarImplementation as Flashbar } from '../flashbar/implementation';\nexport { SideNavigationImplementation as SideNavigation } from '../side-navigation/implementation';\nexport { HelpPanelImplementation as HelpPanel } from '../help-panel/implementation';\n"]}
package/package.json CHANGED
@@ -151,7 +151,7 @@
151
151
  "./internal/base-component/index.js",
152
152
  "./internal/base-component/styles.css.js"
153
153
  ],
154
- "version": "3.0.1094",
154
+ "version": "3.0.1096",
155
155
  "repository": {
156
156
  "type": "git",
157
157
  "url": "https://github.com/cloudscape-design/components.git"
@@ -33,6 +33,8 @@ export declare const getAutosuggestOptions: (parsedText: ParsedText, filteringPr
33
33
  value: string;
34
34
  label: string;
35
35
  __labelPrefix: string;
36
+ tags: readonly string[] | undefined;
37
+ filteringTags: readonly string[] | undefined;
36
38
  }[];
37
39
  label: string;
38
40
  }[];
@@ -1 +1 @@
1
- {"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../src/property-filter/controller.ts"],"names":[],"mappings":"AAIA,OAAO,EAA0B,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAAE,oBAAoB,EAAyB,MAAM,cAAc,CAAC;AAC3E,OAAO,EACL,kBAAkB,EAClB,SAAS,EACT,WAAW,EACX,uBAAuB,EACvB,yBAAyB,EACzB,yBAAyB,EACzB,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,UAAU,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
125
125
  value: property.propertyLabel + ' ' + (operator || '=') + ' ' + filteringOption.value,
126
126
  label: filteringOption.label,
127
127
  __labelPrefix: property.propertyLabel + ' ' + (operator || '='),
128
+ tags: filteringOption.tags,
129
+ filteringTags: filteringOption.filteringTags,
128
130
  });
129
131
  });
130
132
  return [defaultGroup, ...Object.keys(customGroups).map(group => customGroups[group])];
@@ -166,10 +168,12 @@ export const getAutosuggestOptions = (parsedText, filteringProperties, filtering
166
168
  filterText: parsedText.value,
167
169
  options: [
168
170
  {
169
- options: options.map(({ label, value }) => ({
171
+ options: options.map(({ label, value, tags, filteringTags }) => ({
170
172
  value: propertyLabel + ' ' + parsedText.operator + ' ' + value,
171
173
  label: label,
172
174
  __labelPrefix: propertyLabel + ' ' + parsedText.operator,
175
+ tags: tags,
176
+ filteringTags: filteringTags,
173
177
  })),
174
178
  label: groupValuesLabel,
175
179
  },
@@ -1 +1 @@
1
- {"version":3,"file":"controller.js","sourceRoot":"","sources":["../../../src/property-filter/controller.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAGtC,OAAO,EAAE,sBAAsB,EAA6B,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAAwB,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAiB3E,OAAO,EACL,sBAAsB,EACtB,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,SAAS,GACV,MAAM,SAAS,CAAC;AAKjB,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC9B,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,iBAAiB,GAMlB,EAAE,EAAE;IACH,MAAM,QAAQ,GAAG,CAAC,KAAoB,EAAE,EAAE;QACxC,SAAS,cAAc,CAAC,KAAyC;YAC/D,IAAI,UAAU,IAAI,KAAK,EAAE;gBACvB,OAAO,eAAe,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;aACjD;YACD,uCAAY,KAAK,KAAE,MAAM,EAAE,KAA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,MAAM,qBAAqB,GAAG,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC;YACjD,MAAM,wBAAwB,GAAG,CAAC,CAAC,UAAU,CAAC,IAAI,KAAK,WAAW,IAAI,UAAU,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC;YACpG,OAAO;gBACL,UAAU,EAAE,UAAU,CAAC,KAAK;gBAC5B,OAAO,EAAE;oBACP,GAAG,CAAC,wBAAwB;wBAC1B,CAAC,CAAC,sBAAsB,CACpB,mBAAmB,EACnB,gBAAgB,EAChB,WAAW,EACX,oCAAoC,CACrC;wBACH,CAAC,CAAC,EAAE,CAAC;oBACP,GAAG,CAAC,qBAAqB;wBACvB,CAAC,CAAC,sBAAsB,CAAC,gBAAgB,EAAE,UAAU,CAAC,QAAQ,EAAE,WAAW,EAAE,gBAAgB,CAAC;wBAC9F,CAAC,CAAC,EAAE,CAAC;iBACR;aACF,CAAC;SACH;KACF;AACH,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { AutosuggestProps } from '../autosuggest/interfaces';\nimport { fireNonCancelableEvent, NonCancelableEventHandler } from '../internal/events';\nimport { I18nStringsOperators, operatorToDescription } from './i18n-utils';\nimport {\n ComparisonOperator,\n GroupText,\n I18nStrings,\n InternalFilteringOption,\n InternalFilteringProperty,\n InternalFreeTextFiltering,\n InternalQuery,\n InternalToken,\n InternalTokenGroup,\n JoinOperation,\n ParsedText,\n Query,\n Token,\n TokenGroup,\n} from './interfaces';\nimport {\n matchFilteringProperty,\n matchOperator,\n matchOperatorPrefix,\n matchTokenValue,\n removeOperator,\n tokenGroupToTokens,\n trimStart,\n} from './utils';\n\ntype I18nStringsController = I18nStringsOperators &\n Pick<I18nStrings, 'operatorsText' | 'groupPropertiesText' | 'groupValuesText'>;\n\nexport const getQueryActions = ({\n query,\n onChange,\n filteringOptions,\n enableTokenGroups,\n}: {\n query: InternalQuery;\n onChange: NonCancelableEventHandler<Query>;\n filteringOptions: readonly InternalFilteringOption[];\n enableTokenGroups: boolean;\n}) => {\n const setQuery = (query: InternalQuery) => {\n function transformToken(token: InternalToken | InternalTokenGroup): Token | TokenGroup {\n if ('operator' in token) {\n return matchTokenValue(token, filteringOptions);\n }\n return { ...token, tokens: token.tokens.map(transformToken) };\n }\n const tokens = query.tokens.map(transformToken);\n\n if (enableTokenGroups) {\n fireNonCancelableEvent(onChange, { tokens: [], operation: query.operation, tokenGroups: tokens });\n } else {\n fireNonCancelableEvent(onChange, { tokens: tokenGroupToTokens<Token>(tokens), operation: query.operation });\n }\n };\n\n const addToken = (token: InternalToken) => {\n setQuery({ ...query, tokens: [...query.tokens, token] });\n };\n\n const updateToken = (\n updateIndex: number,\n updatedToken: InternalToken | InternalTokenGroup,\n releasedTokens: InternalToken[]\n ) => {\n const nestedTokens = tokenGroupToTokens<InternalToken>([updatedToken]);\n const capturedTokenIndices = nestedTokens.map(token => token.standaloneIndex).filter(index => index !== undefined);\n const tokens = query.tokens\n .map((token, index) => (index === updateIndex ? updatedToken : token))\n .filter((_, index) => index === updateIndex || !capturedTokenIndices.includes(index));\n tokens.push(...releasedTokens);\n setQuery({ ...query, tokens });\n };\n\n const removeToken = (removeIndex: number) => {\n setQuery({ ...query, tokens: query.tokens.filter((_, index) => index !== removeIndex) });\n };\n\n const removeAllTokens = () => {\n setQuery({ ...query, tokens: [] });\n };\n\n const updateOperation = (operation: JoinOperation) => {\n setQuery({ ...query, operation });\n };\n\n return { addToken, updateToken, updateOperation, removeToken, removeAllTokens };\n};\n\nexport const getAllowedOperators = (property: InternalFilteringProperty): ComparisonOperator[] => {\n const { operators = [], defaultOperator } = property;\n const operatorOrder = ['=', '!=', ':', '!:', '^', '!^', '>=', '<=', '<', '>'] as const;\n const operatorSet = new Set([defaultOperator, ...operators]);\n return operatorOrder.filter(op => operatorSet.has(op));\n};\n\n/*\n * parses the value of the filtering input to figure out the current step of entering the token:\n * - \"property\": means that a filter on a particular column is being added, with operator already finalized\n * - \"operator\": means that a filter on a particular column is being added, with operator not yet finalized\n * - \"free-text\": means that a \"free text\" token is being added\n */\nexport const parseText = (\n filteringText: string,\n filteringProperties: readonly InternalFilteringProperty[],\n freeTextFiltering: InternalFreeTextFiltering\n): ParsedText => {\n const property = matchFilteringProperty(filteringProperties, filteringText);\n if (!property) {\n if (!freeTextFiltering.disabled) {\n // For free text filtering, we allow ! as a shortcut for !:\n const freeTextOperators =\n freeTextFiltering.operators.indexOf('!:') >= 0\n ? ['!', ...freeTextFiltering.operators]\n : freeTextFiltering.operators;\n const operator = matchOperator(freeTextOperators, filteringText);\n if (operator) {\n return {\n step: 'free-text',\n operator: operator === '!' ? '!:' : operator,\n value: removeOperator(filteringText, operator),\n };\n }\n }\n\n return {\n step: 'free-text',\n value: filteringText,\n };\n }\n\n const allowedOps = getAllowedOperators(property);\n\n const textWithoutProperty = filteringText.substring(property.propertyLabel.length);\n const operator = matchOperator(allowedOps, trimStart(textWithoutProperty));\n if (operator) {\n return {\n step: 'property',\n property,\n operator,\n value: removeOperator(textWithoutProperty, operator),\n };\n }\n\n const operatorPrefix = matchOperatorPrefix(allowedOps, trimStart(textWithoutProperty));\n if (operatorPrefix !== null) {\n return { step: 'operator', property, operatorPrefix };\n }\n\n return {\n step: 'free-text',\n value: filteringText,\n };\n};\n\ninterface OptionGroup<T> {\n label: string;\n options: T[];\n}\n\nconst getAllValueSuggestions = (\n filteringOptions: readonly InternalFilteringOption[],\n operator: ComparisonOperator | undefined = '=',\n i18nStrings: I18nStringsController,\n customGroupsText: readonly GroupText[]\n) => {\n const defaultGroup: OptionGroup<AutosuggestProps.Option> = {\n label: i18nStrings.groupValuesText ?? '',\n options: [],\n };\n const customGroups: { [K in string]: OptionGroup<AutosuggestProps.Option> } = {};\n filteringOptions.forEach(filteringOption => {\n const property = filteringOption.property;\n // given option refers to a non-existent filtering property\n if (!property) {\n return;\n }\n // this option's filtering property does not support current operator\n if (getAllowedOperators(property).indexOf(operator) === -1) {\n return;\n }\n if (property.propertyGroup && !customGroups[property.propertyGroup]) {\n const label = customGroupsText.reduce<string>(\n (acc, customGroup) => (customGroup.group === property.propertyGroup ? customGroup.values : acc),\n ''\n );\n customGroups[property.propertyGroup] = {\n label,\n options: [],\n };\n }\n const propertyGroup = property.propertyGroup ? customGroups[property.propertyGroup] : defaultGroup;\n propertyGroup.options.push({\n value: property.propertyLabel + ' ' + (operator || '=') + ' ' + filteringOption.value,\n label: filteringOption.label,\n __labelPrefix: property.propertyLabel + ' ' + (operator || '='),\n });\n });\n return [defaultGroup, ...Object.keys(customGroups).map(group => customGroups[group])];\n};\n\nconst filteringPropertyToAutosuggestOption = (filteringProperty: InternalFilteringProperty) => ({\n value: filteringProperty.propertyLabel,\n label: filteringProperty.propertyLabel,\n keepOpenOnSelect: true,\n});\n\nexport function getPropertySuggestions<T>(\n filteringProperties: readonly InternalFilteringProperty[],\n customGroupsText: readonly GroupText[],\n i18nStrings: I18nStringsController,\n filteringPropertyToOption: (filteringProperty: InternalFilteringProperty) => T\n) {\n const defaultGroup: OptionGroup<T> = {\n label: i18nStrings.groupPropertiesText ?? '',\n options: [],\n };\n const customGroups: { [K in string]: OptionGroup<T> } = {};\n\n filteringProperties.forEach(filteringProperty => {\n const { propertyGroup } = filteringProperty;\n let optionsGroup = defaultGroup;\n if (propertyGroup) {\n if (!customGroups[propertyGroup]) {\n const label = customGroupsText.reduce<string>(\n (acc, customGroup) => (customGroup.group === propertyGroup ? customGroup.properties : acc),\n ''\n );\n customGroups[propertyGroup] = { options: [], label };\n }\n optionsGroup = customGroups[propertyGroup];\n }\n optionsGroup.options.push(filteringPropertyToOption(filteringProperty));\n });\n const defaultGroupArray = defaultGroup.options.length ? [defaultGroup] : [];\n const customGroupsArray = Object.keys(customGroups).map(groupKey => customGroups[groupKey]);\n return [...defaultGroupArray, ...customGroupsArray];\n}\n\nexport const getAutosuggestOptions = (\n parsedText: ParsedText,\n filteringProperties: readonly InternalFilteringProperty[],\n filteringOptions: readonly InternalFilteringOption[],\n customGroupsText: readonly GroupText[],\n i18nStrings: I18nStringsController\n) => {\n switch (parsedText.step) {\n case 'property': {\n const { propertyLabel, groupValuesLabel } = parsedText.property;\n const options = filteringOptions.filter(o => o.property === parsedText.property);\n return {\n filterText: parsedText.value,\n options: [\n {\n options: options.map(({ label, value }) => ({\n value: propertyLabel + ' ' + parsedText.operator + ' ' + value,\n label: label,\n __labelPrefix: propertyLabel + ' ' + parsedText.operator,\n })),\n label: groupValuesLabel,\n },\n ],\n };\n }\n case 'operator': {\n return {\n filterText: parsedText.property.propertyLabel + ' ' + parsedText.operatorPrefix,\n options: [\n ...getPropertySuggestions(\n filteringProperties,\n customGroupsText,\n i18nStrings,\n filteringPropertyToAutosuggestOption\n ),\n {\n options: getAllowedOperators(parsedText.property).map(value => ({\n value: parsedText.property.propertyLabel + ' ' + value + ' ',\n label: parsedText.property.propertyLabel + ' ' + value,\n description: operatorToDescription(value, i18nStrings),\n keepOpenOnSelect: true,\n })),\n label: i18nStrings.operatorsText,\n },\n ],\n };\n }\n case 'free-text': {\n const needsValueSuggestions = !!parsedText.value;\n const needsPropertySuggestions = !(parsedText.step === 'free-text' && parsedText.operator === '!:');\n return {\n filterText: parsedText.value,\n options: [\n ...(needsPropertySuggestions\n ? getPropertySuggestions(\n filteringProperties,\n customGroupsText,\n i18nStrings,\n filteringPropertyToAutosuggestOption\n )\n : []),\n ...(needsValueSuggestions\n ? getAllValueSuggestions(filteringOptions, parsedText.operator, i18nStrings, customGroupsText)\n : []),\n ],\n };\n }\n }\n};\n"]}
1
+ {"version":3,"file":"controller.js","sourceRoot":"","sources":["../../../src/property-filter/controller.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAGtC,OAAO,EAAE,sBAAsB,EAA6B,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAAwB,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAiB3E,OAAO,EACL,sBAAsB,EACtB,aAAa,EACb,mBAAmB,E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AutosuggestProps } from '../autosuggest/interfaces';\nimport { fireNonCancelableEvent, NonCancelableEventHandler } from '../internal/events';\nimport { I18nStringsOperators, operatorToDescription } from './i18n-utils';\nimport {\n ComparisonOperator,\n GroupText,\n I18nStrings,\n InternalFilteringOption,\n InternalFilteringProperty,\n InternalFreeTextFiltering,\n InternalQuery,\n InternalToken,\n InternalTokenGroup,\n JoinOperation,\n ParsedText,\n Query,\n Token,\n TokenGroup,\n} from './interfaces';\nimport {\n matchFilteringProperty,\n matchOperator,\n matchOperatorPrefix,\n matchTokenValue,\n removeOperator,\n tokenGroupToTokens,\n trimStart,\n} from './utils';\n\ntype I18nStringsController = I18nStringsOperators &\n Pick<I18nStrings, 'operatorsText' | 'groupPropertiesText' | 'groupValuesText'>;\n\nexport const getQueryActions = ({\n query,\n onChange,\n filteringOptions,\n enableTokenGroups,\n}: {\n query: InternalQuery;\n onChange: NonCancelableEventHandler<Query>;\n filteringOptions: readonly InternalFilteringOption[];\n enableTokenGroups: boolean;\n}) => {\n const setQuery = (query: InternalQuery) => {\n function transformToken(token: InternalToken | InternalTokenGroup): Token | TokenGroup {\n if ('operator' in token) {\n return matchTokenValue(token, filteringOptions);\n }\n return { ...token, tokens: token.tokens.map(transformToken) };\n }\n const tokens = query.tokens.map(transformToken);\n\n if (enableTokenGroups) {\n fireNonCancelableEvent(onChange, { tokens: [], operation: query.operation, tokenGroups: tokens });\n } else {\n fireNonCancelableEvent(onChange, { tokens: tokenGroupToTokens<Token>(tokens), operation: query.operation });\n }\n };\n\n const addToken = (token: InternalToken) => {\n setQuery({ ...query, tokens: [...query.tokens, token] });\n };\n\n const updateToken = (\n updateIndex: number,\n updatedToken: InternalToken | InternalTokenGroup,\n releasedTokens: InternalToken[]\n ) => {\n const nestedTokens = tokenGroupToTokens<InternalToken>([updatedToken]);\n const capturedTokenIndices = nestedTokens.map(token => token.standaloneIndex).filter(index => index !== undefined);\n const tokens = query.tokens\n .map((token, index) => (index === updateIndex ? updatedToken : token))\n .filter((_, index) => index === updateIndex || !capturedTokenIndices.includes(index));\n tokens.push(...releasedTokens);\n setQuery({ ...query, tokens });\n };\n\n const removeToken = (removeIndex: number) => {\n setQuery({ ...query, tokens: query.tokens.filter((_, index) => index !== removeIndex) });\n };\n\n const removeAllTokens = () => {\n setQuery({ ...query, tokens: [] });\n };\n\n const updateOperation = (operation: JoinOperation) => {\n setQuery({ ...query, operation });\n };\n\n return { addToken, updateToken, updateOperation, removeToken, removeAllTokens };\n};\n\nexport const getAllowedOperators = (property: InternalFilteringProperty): ComparisonOperator[] => {\n const { operators = [], defaultOperator } = property;\n const operatorOrder = ['=', '!=', ':', '!:', '^', '!^', '>=', '<=', '<', '>'] as const;\n const operatorSet = new Set([defaultOperator, ...operators]);\n return operatorOrder.filter(op => operatorSet.has(op));\n};\n\n/*\n * parses the value of the filtering input to figure out the current step of entering the token:\n * - \"property\": means that a filter on a particular column is being added, with operator already finalized\n * - \"operator\": means that a filter on a particular column is being added, with operator not yet finalized\n * - \"free-text\": means that a \"free text\" token is being added\n */\nexport const parseText = (\n filteringText: string,\n filteringProperties: readonly InternalFilteringProperty[],\n freeTextFiltering: InternalFreeTextFiltering\n): ParsedText => {\n const property = matchFilteringProperty(filteringProperties, filteringText);\n if (!property) {\n if (!freeTextFiltering.disabled) {\n // For free text filtering, we allow ! as a shortcut for !:\n const freeTextOperators =\n freeTextFiltering.operators.indexOf('!:') >= 0\n ? ['!', ...freeTextFiltering.operators]\n : freeTextFiltering.operators;\n const operator = matchOperator(freeTextOperators, filteringText);\n if (operator) {\n return {\n step: 'free-text',\n operator: operator === '!' ? '!:' : operator,\n value: removeOperator(filteringText, operator),\n };\n }\n }\n\n return {\n step: 'free-text',\n value: filteringText,\n };\n }\n\n const allowedOps = getAllowedOperators(property);\n\n const textWithoutProperty = filteringText.substring(property.propertyLabel.length);\n const operator = matchOperator(allowedOps, trimStart(textWithoutProperty));\n if (operator) {\n return {\n step: 'property',\n property,\n operator,\n value: removeOperator(textWithoutProperty, operator),\n };\n }\n\n const operatorPrefix = matchOperatorPrefix(allowedOps, trimStart(textWithoutProperty));\n if (operatorPrefix !== null) {\n return { step: 'operator', property, operatorPrefix };\n }\n\n return {\n step: 'free-text',\n value: filteringText,\n };\n};\n\ninterface OptionGroup<T> {\n label: string;\n options: T[];\n}\n\nconst getAllValueSuggestions = (\n filteringOptions: readonly InternalFilteringOption[],\n operator: ComparisonOperator | undefined = '=',\n i18nStrings: I18nStringsController,\n customGroupsText: readonly GroupText[]\n) => {\n const defaultGroup: OptionGroup<AutosuggestProps.Option> = {\n label: i18nStrings.groupValuesText ?? '',\n options: [],\n };\n const customGroups: { [K in string]: OptionGroup<AutosuggestProps.Option> } = {};\n filteringOptions.forEach(filteringOption => {\n const property = filteringOption.property;\n // given option refers to a non-existent filtering property\n if (!property) {\n return;\n }\n // this option's filtering property does not support current operator\n if (getAllowedOperators(property).indexOf(operator) === -1) {\n return;\n }\n if (property.propertyGroup && !customGroups[property.propertyGroup]) {\n const label = customGroupsText.reduce<string>(\n (acc, customGroup) => (customGroup.group === property.propertyGroup ? customGroup.values : acc),\n ''\n );\n customGroups[property.propertyGroup] = {\n label,\n options: [],\n };\n }\n const propertyGroup = property.propertyGroup ? customGroups[property.propertyGroup] : defaultGroup;\n propertyGroup.options.push({\n value: property.propertyLabel + ' ' + (operator || '=') + ' ' + filteringOption.value,\n label: filteringOption.label,\n __labelPrefix: property.propertyLabel + ' ' + (operator || '='),\n tags: filteringOption.tags,\n filteringTags: filteringOption.filteringTags,\n });\n });\n return [defaultGroup, ...Object.keys(customGroups).map(group => customGroups[group])];\n};\n\nconst filteringPropertyToAutosuggestOption = (filteringProperty: InternalFilteringProperty) => ({\n value: filteringProperty.propertyLabel,\n label: filteringProperty.propertyLabel,\n keepOpenOnSelect: true,\n});\n\nexport function getPropertySuggestions<T>(\n filteringProperties: readonly InternalFilteringProperty[],\n customGroupsText: readonly GroupText[],\n i18nStrings: I18nStringsController,\n filteringPropertyToOption: (filteringProperty: InternalFilteringProperty) => T\n) {\n const defaultGroup: OptionGroup<T> = {\n label: i18nStrings.groupPropertiesText ?? '',\n options: [],\n };\n const customGroups: { [K in string]: OptionGroup<T> } = {};\n\n filteringProperties.forEach(filteringProperty => {\n const { propertyGroup } = filteringProperty;\n let optionsGroup = defaultGroup;\n if (propertyGroup) {\n if (!customGroups[propertyGroup]) {\n const label = customGroupsText.reduce<string>(\n (acc, customGroup) => (customGroup.group === propertyGroup ? customGroup.properties : acc),\n ''\n );\n customGroups[propertyGroup] = { options: [], label };\n }\n optionsGroup = customGroups[propertyGroup];\n }\n optionsGroup.options.push(filteringPropertyToOption(filteringProperty));\n });\n const defaultGroupArray = defaultGroup.options.length ? [defaultGroup] : [];\n const customGroupsArray = Object.keys(customGroups).map(groupKey => customGroups[groupKey]);\n return [...defaultGroupArray, ...customGroupsArray];\n}\n\nexport const getAutosuggestOptions = (\n parsedText: ParsedText,\n filteringProperties: readonly InternalFilteringProperty[],\n filteringOptions: readonly InternalFilteringOption[],\n customGroupsText: readonly GroupText[],\n i18nStrings: I18nStringsController\n) => {\n switch (parsedText.step) {\n case 'property': {\n const { propertyLabel, groupValuesLabel } = parsedText.property;\n const options = filteringOptions.filter(o => o.property === parsedText.property);\n return {\n filterText: parsedText.value,\n options: [\n {\n options: options.map(({ label, value, tags, filteringTags }) => ({\n value: propertyLabel + ' ' + parsedText.operator + ' ' + value,\n label: label,\n __labelPrefix: propertyLabel + ' ' + parsedText.operator,\n tags: tags,\n filteringTags: filteringTags,\n })),\n label: groupValuesLabel,\n },\n ],\n };\n }\n case 'operator': {\n return {\n filterText: parsedText.property.propertyLabel + ' ' + parsedText.operatorPrefix,\n options: [\n ...getPropertySuggestions(\n filteringProperties,\n customGroupsText,\n i18nStrings,\n filteringPropertyToAutosuggestOption\n ),\n {\n options: getAllowedOperators(parsedText.property).map(value => ({\n value: parsedText.property.propertyLabel + ' ' + value + ' ',\n label: parsedText.property.propertyLabel + ' ' + value,\n description: operatorToDescription(value, i18nStrings),\n keepOpenOnSelect: true,\n })),\n label: i18nStrings.operatorsText,\n },\n ],\n };\n }\n case 'free-text': {\n const needsValueSuggestions = !!parsedText.value;\n const needsPropertySuggestions = !(parsedText.step === 'free-text' && parsedText.operator === '!:');\n return {\n filterText: parsedText.value,\n options: [\n ...(needsPropertySuggestions\n ? getPropertySuggestions(\n filteringProperties,\n customGroupsText,\n i18nStrings,\n filteringPropertyToAutosuggestOption\n )\n : []),\n ...(needsValueSuggestions\n ? getAllValueSuggestions(filteringOptions, parsedText.operator, i18nStrings, customGroupsText)\n : []),\n ],\n };\n }\n }\n};\n"]}
@@ -22,11 +22,14 @@ function isGroup(optionOrGroup) {
22
22
  return 'options' in optionOrGroup;
23
23
  }
24
24
  function matchSingleOption(option, searchText) {
25
- var _a, _b;
25
+ var _a, _b, _c, _d, _e, _f;
26
26
  searchText = searchText.toLowerCase();
27
27
  const label = ((_a = option.label) !== null && _a !== void 0 ? _a : '').toLowerCase();
28
28
  const labelPrefix = (_b = option.__labelPrefix) !== null && _b !== void 0 ? _b : '';
29
29
  const value = (option.value ? option.value.slice(labelPrefix.length) : '').toLowerCase();
30
- return label.indexOf(searchText) !== -1 || value.indexOf(searchText) !== -1;
30
+ const matchesLabelOrValue = label.indexOf(searchText) !== -1 || value.indexOf(searchText) !== -1;
31
+ const matchesTags = (_d = (_c = option.tags) === null || _c === void 0 ? void 0 : _c.some(tag => tag.toLowerCase().indexOf(searchText) !== -1)) !== null && _d !== void 0 ? _d : false;
32
+ const matchesFilteringTags = (_f = (_e = option.filteringTags) === null || _e === void 0 ? void 0 : _e.some(tag => tag.toLowerCase().indexOf(searchText) !== -1)) !== null && _f !== void 0 ? _f : false;
33
+ return matchesLabelOrValue || matchesTags || matchesFilteringTags;
31
34
  }
32
35
  //# sourceMappingURL=filter-options.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"filter-options.js","sourceRoot":"","sources":["../../../src/property-filter/filter-options.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAs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C,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;AAC9E,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { AutosuggestProps } from '../autosuggest/interfaces';\nimport { OptionDefinition } from '../internal/components/option/interfaces';\n\nexport function filterOptions(\n options: readonly (AutosuggestProps.Option | AutosuggestProps.OptionGroup)[],\n searchText = ''\n): readonly (AutosuggestProps.Option | AutosuggestProps.OptionGroup)[] {\n if (!searchText) {\n return options;\n }\n\n const filtered: (AutosuggestProps.Option | AutosuggestProps.OptionGroup)[] = [];\n for (const option of options) {\n if (isGroup(option)) {\n const childOptions = filterOptions(option.options, searchText);\n if (childOptions.length > 0) {\n filtered.push({ ...option, options: childOptions });\n }\n } else if (matchSingleOption(option, searchText)) {\n filtered.push(option);\n }\n }\n return filtered;\n}\n\nfunction isGroup(optionOrGroup: AutosuggestProps.Option): optionOrGroup is AutosuggestProps.OptionGroup {\n return 'options' in optionOrGroup;\n}\n\nfunction matchSingleOption(option: OptionDefinition, searchText: string): boolean {\n searchText = searchText.toLowerCase();\n\n const label = (option.label ?? '').toLowerCase();\n const labelPrefix = option.__labelPrefix ?? '';\n const value = (option.value ? option.value.slice(labelPrefix.length) : '').toLowerCase();\n return label.indexOf(searchText) !== -1 || value.indexOf(searchText) !== -1;\n}\n"]}
1
+ {"version":3,"file":"filter-options.js","sourceRoot":"","sources":["../../../src/property-filter/filter-options.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAKtC,MAAM,UAAU,aAAa,CAC3B,OAA4E,EAC5E,UAAU,GAAG,EAAE;IAEf,IAAI,CAAC,UAAU,EAAE;QACf,OAAO,OAAO,CAAC;KAChB;IAED,MAAM,QAAQ,GAA+D,EAAE,CAAC;IAChF,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;QAC5B,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE;YACnB,MAAM,YAAY,GAAG,aAA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AAA,MAAA,MAAM,CAAC,aAAa,0CAAE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,mCAAI,KAAK,CAAC;IACtH,OAAO,mBAAmB,IAAI,WAAW,IAAI,oBAAoB,CAAC;AACpE,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { AutosuggestProps } from '../autosuggest/interfaces';\nimport { OptionDefinition } from '../internal/components/option/interfaces';\n\nexport function filterOptions(\n options: readonly (AutosuggestProps.Option | AutosuggestProps.OptionGroup)[],\n searchText = ''\n): readonly (AutosuggestProps.Option | AutosuggestProps.OptionGroup)[] {\n if (!searchText) {\n return options;\n }\n\n const filtered: (AutosuggestProps.Option | AutosuggestProps.OptionGroup)[] = [];\n for (const option of options) {\n if (isGroup(option)) {\n const childOptions = filterOptions(option.options, searchText);\n if (childOptions.length > 0) {\n filtered.push({ ...option, options: childOptions });\n }\n } else if (matchSingleOption(option, searchText)) {\n filtered.push(option);\n }\n }\n return filtered;\n}\n\nfunction isGroup(optionOrGroup: AutosuggestProps.Option): optionOrGroup is AutosuggestProps.OptionGroup {\n return 'options' in optionOrGroup;\n}\n\nfunction matchSingleOption(option: OptionDefinition, searchText: string): boolean {\n searchText = searchText.toLowerCase();\n\n const label = (option.label ?? '').toLowerCase();\n const labelPrefix = option.__labelPrefix ?? '';\n const value = (option.value ? option.value.slice(labelPrefix.length) : '').toLowerCase();\n\n const matchesLabelOrValue = label.indexOf(searchText) !== -1 || value.indexOf(searchText) !== -1;\n const matchesTags = option.tags?.some(tag => tag.toLowerCase().indexOf(searchText) !== -1) ?? false;\n const matchesFilteringTags = option.filteringTags?.some(tag => tag.toLowerCase().indexOf(searchText) !== -1) ?? false;\n return matchesLabelOrValue || matchesTags || matchesFilteringTags;\n}\n"]}
@@ -339,6 +339,8 @@ export interface InternalFilteringOption {
339
339
  property: null | InternalFilteringProperty;
340
340
  value: string;
341
341
  label: string;
342
+ tags?: ReadonlyArray<string>;
343
+ filteringTags?: ReadonlyArray<string>;
342
344
  }
343
345
  export interface InternalFreeTextFiltering {
344
346
  disabled: boolean;
@@ -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,EACxB,uBAAuB,EACxB,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;;;OAGG;IACH,WAAW,CAAC,EAAE,mBAAmB,CAAC,WAAW,CAAC;IAC9C;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;;;;;;OAUG;IACH,KAAK,EAAE,mBAAmB,CAAC,KAAK,CAAC;IACjC;;;;;;;O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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 PropertyFilterTokenType,\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 * When the `countText` or `query` changes, it will be announced to assistive technologies.\n */\n countText?: string;\n\n /**\n * Set to `true` while the related collection is loading (e.g. during an async filtering action).\n * If set to `true`, the live announcement of countText by assistive technologies will be paused until it changes back to `false`.\n */\n loading?: boolean;\n\n /**\n * An object representing the current query displayed in the property filter, which 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 [unknown]: The value of the token to be used as a filter. Can be null or string for default tokens, string[] for enum tokens, and anything for tokens with custom forms.\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, or use `readOnlyOperations`.\n *\n * This property cannot be set when `enableTokenGroups=true`.\n */\n hideOperations?: boolean;\n /**\n * If readOnlyOperations it set, the indicator of the operation (that is, `and` or `or`) is shown, but the\n * operation cannot be changed. This is also supported for nested tokens when `enableTokenGroups=true`.\n */\n readOnlyOperations?: boolean;\n /**\n * Activates token grouping mechanism to support token 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?: PropertyFilterProps.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 export type StatusType = DropdownStatusProps.StatusType;\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 ExtendedOperatorForm<TokenValue> = PropertyFilterOperatorForm<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 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 getTokenType: (operator?: PropertyFilterOperator) => PropertyFilterTokenType;\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 PropertyFilterTokenType,\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 * When the `countText` or `query` changes, it will be announced to assistive technologies.\n */\n countText?: string;\n\n /**\n * Set to `true` while the related collection is loading (e.g. during an async filtering action).\n * If set to `true`, the live announcement of countText by assistive technologies will be paused until it changes back to `false`.\n */\n loading?: boolean;\n\n /**\n * An object representing the current query displayed in the property filter, which 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 [unknown]: The value of the token to be used as a filter. Can be null or string for default tokens, string[] for enum tokens, and anything for tokens with custom forms.\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, or use `readOnlyOperations`.\n *\n * This property cannot be set when `enableTokenGroups=true`.\n */\n hideOperations?: boolean;\n /**\n * If readOnlyOperations it set, the indicator of the operation (that is, `and` or `or`) is shown, but the\n * operation cannot be changed. This is also supported for nested tokens when `enableTokenGroups=true`.\n */\n readOnlyOperations?: boolean;\n /**\n * Activates token grouping mechanism to support token 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?: PropertyFilterProps.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 export type StatusType = DropdownStatusProps.StatusType;\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 ExtendedOperatorForm<TokenValue> = PropertyFilterOperatorForm<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 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 getTokenType: (operator?: PropertyFilterOperator) => PropertyFilterTokenType;\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 tags?: ReadonlyArray<string>;\n filteringTags?: ReadonlyArray<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 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/property-filter/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoE,MAAM,OAAO,CAAC;AAazF,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAWlF,OAAO,EAWL,mBAAmB,EAIpB,MAAM,cAAc,CAAC;AAsBtB,QAAA,MAAM,sBAAsB;;;;;;;8EA8c3B,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/property-filter/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoE,MAAM,OAAO,CAAC;AAazF,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAWlF,OAAO,EAWL,mBAAmB,EAIpB,MAAM,cAAc,CAAC;AAsBtB,QAAA,MAAM,sBAAsB;;;;;;;8EAgd3B,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -73,11 +73,13 @@ const PropertyFilterInternal = React.forwardRef((_a, ref) => {
73
73
  }, new Map());
74
74
  const getProperty = (propertyKey) => { var _a; return (_a = propertyByKey.get(propertyKey)) !== null && _a !== void 0 ? _a : null; };
75
75
  const internalOptions = filteringOptions.map(option => {
76
- var _a, _b;
76
+ var _a, _b, _c, _d;
77
77
  return ({
78
78
  property: getProperty(option.propertyKey),
79
79
  value: option.value,
80
80
  label: (_b = (_a = option.label) !== null && _a !== void 0 ? _a : option.value) !== null && _b !== void 0 ? _b : '',
81
+ tags: (_c = option.tags) !== null && _c !== void 0 ? _c : [],
82
+ filteringTags: (_d = option.filteringTags) !== null && _d !== void 0 ? _d : [],
81
83
  });
82
84
  });
83
85
  function transformToken(tokenOrGroup, standaloneIndex) {