@cloudscape-design/components 3.0.805 → 3.0.806

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 (48) hide show
  1. package/app-layout/drawer/index.d.ts.map +1 -1
  2. package/app-layout/drawer/index.js +3 -2
  3. package/app-layout/drawer/index.js.map +1 -1
  4. package/app-layout/test-classes/styles.css.js +23 -22
  5. package/app-layout/test-classes/styles.scoped.css +23 -85
  6. package/app-layout/test-classes/styles.selectors.js +23 -22
  7. package/app-layout/toggles/index.d.ts.map +1 -1
  8. package/app-layout/toggles/index.js +4 -1
  9. package/app-layout/toggles/index.js.map +1 -1
  10. package/app-layout/visual-refresh/drawers.d.ts.map +1 -1
  11. package/app-layout/visual-refresh/drawers.js +8 -2
  12. package/app-layout/visual-refresh/drawers.js.map +1 -1
  13. package/app-layout/visual-refresh/navigation.d.ts.map +1 -1
  14. package/app-layout/visual-refresh/navigation.js +3 -3
  15. package/app-layout/visual-refresh/navigation.js.map +1 -1
  16. package/app-layout/visual-refresh/tools.js +1 -1
  17. package/app-layout/visual-refresh/tools.js.map +1 -1
  18. package/app-layout/visual-refresh-toolbar/toolbar/index.d.ts.map +1 -1
  19. package/app-layout/visual-refresh-toolbar/toolbar/index.js +4 -2
  20. package/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
  21. package/app-layout/visual-refresh-toolbar/toolbar/styles.css.js +15 -13
  22. package/app-layout/visual-refresh-toolbar/toolbar/styles.scoped.css +19 -15
  23. package/app-layout/visual-refresh-toolbar/toolbar/styles.selectors.js +15 -13
  24. package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/index.d.ts.map +1 -1
  25. package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/index.js +1 -0
  26. package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/index.js.map +1 -1
  27. package/internal/base-component/styles.scoped.css +21 -15
  28. package/internal/environment.js +1 -1
  29. package/internal/environment.json +1 -1
  30. package/internal/generated/styles/tokens.js +3 -3
  31. package/internal/generated/theming/index.cjs +41 -41
  32. package/internal/generated/theming/index.js +41 -41
  33. package/internal/manifest.json +1 -1
  34. package/internal/plugins/controllers/breadcrumbs.d.ts +5 -4
  35. package/internal/plugins/controllers/breadcrumbs.d.ts.map +1 -1
  36. package/internal/plugins/controllers/breadcrumbs.js +2 -4
  37. package/internal/plugins/controllers/breadcrumbs.js.map +1 -1
  38. package/internal/plugins/helpers/use-global-breadcrumbs.d.ts.map +1 -1
  39. package/internal/plugins/helpers/use-global-breadcrumbs.js +1 -1
  40. package/internal/plugins/helpers/use-global-breadcrumbs.js.map +1 -1
  41. package/package.json +1 -1
  42. package/test-utils/dom/app-layout/index.d.ts +12 -1
  43. package/test-utils/dom/app-layout/index.js +28 -2
  44. package/test-utils/dom/app-layout/index.js.map +1 -1
  45. package/test-utils/selectors/app-layout/index.d.ts +12 -1
  46. package/test-utils/selectors/app-layout/index.js +28 -2
  47. package/test-utils/selectors/app-layout/index.js.map +1 -1
  48. package/test-utils/tsconfig.tsbuildinfo +1 -1
@@ -297,9 +297,9 @@ export var colorBackgroundAvatarDefault = "var(--color-background-avatar-default
297
297
  export var colorTextAvatar = "var(--color-text-avatar-jddpvm, #ffffff)";
298
298
  export var colorBackgroundLoadingBarGenAi = "var(--color-background-loading-bar-gen-ai-7qfi9s, linear-gradient(90deg, #99f7ff 0%, #0096fa 10%, #bf80ff 24%, #7300e5 50%, #bf80ff 76%, #0096fa 90%, #99f7ff 100%))";
299
299
  export var colorBackgroundChatBubbleOutgoing = "var(--color-background-chat-bubble-outgoing-pfqan2, transparent)";
300
- export var colorBackgroundChatBubbleIncoming = "var(--color-background-chat-bubble-incoming-brq006, #f3f3f7)";
301
- export var colorTextChatBubbleOutgoing = "var(--color-text-chat-bubble-outgoing-25z5e0, #424650)";
302
- export var colorTextChatBubbleIncoming = "var(--color-text-chat-bubble-incoming-t2slde, #424650)";
300
+ export var colorBackgroundChatBubbleIncoming = "var(--color-background-chat-bubble-incoming-ljtp6c, #f3f3f7)";
301
+ export var colorTextChatBubbleOutgoing = "var(--color-text-chat-bubble-outgoing-bvbr0v, #0f141a)";
302
+ export var colorTextChatBubbleIncoming = "var(--color-text-chat-bubble-incoming-x2kig8, #0f141a)";
303
303
  export var colorBorderButtonNormalActive = "var(--color-border-button-normal-active-mn0ayd, #002b66)";
304
304
  export var colorBorderButtonNormalDefault = "var(--color-border-button-normal-default-uzqi0v, #006ce0)";
305
305
  export var colorBorderToggleButtonNormalPressed = "var(--color-border-toggle-button-normal-pressed-lylxt2, #006ce0)";
@@ -1075,15 +1075,15 @@ module.exports.preset = {
1075
1075
  },
1076
1076
  "colorBackgroundChatBubbleIncoming": {
1077
1077
  "light": "{colorGrey150}",
1078
- "dark": "{colorGrey850}"
1078
+ "dark": "{colorGrey900}"
1079
1079
  },
1080
1080
  "colorTextChatBubbleOutgoing": {
1081
- "light": "{colorTextBodySecondary}",
1082
- "dark": "{colorTextBodySecondary}"
1081
+ "light": "{colorTextBodyDefault}",
1082
+ "dark": "{colorTextBodyDefault}"
1083
1083
  },
1084
1084
  "colorTextChatBubbleIncoming": {
1085
- "light": "{colorTextBodySecondary}",
1086
- "dark": "{colorTextBodySecondary}"
1085
+ "light": "{colorTextBodyDefault}",
1086
+ "dark": "{colorTextBodyDefault}"
1087
1087
  },
1088
1088
  "colorBorderButtonNormalActive": {
1089
1089
  "light": "{colorBlue800}",
@@ -3309,16 +3309,16 @@ module.exports.preset = {
3309
3309
  "dark": "transparent"
3310
3310
  },
3311
3311
  "colorBackgroundChatBubbleIncoming": {
3312
- "light": "{colorGrey850}",
3313
- "dark": "{colorGrey850}"
3312
+ "light": "{colorGrey900}",
3313
+ "dark": "{colorGrey900}"
3314
3314
  },
3315
3315
  "colorTextChatBubbleOutgoing": {
3316
- "light": "{colorTextBodySecondary}",
3317
- "dark": "{colorTextBodySecondary}"
3316
+ "light": "{colorTextBodyDefault}",
3317
+ "dark": "{colorTextBodyDefault}"
3318
3318
  },
3319
3319
  "colorTextChatBubbleIncoming": {
3320
- "light": "{colorTextBodySecondary}",
3321
- "dark": "{colorTextBodySecondary}"
3320
+ "light": "{colorTextBodyDefault}",
3321
+ "dark": "{colorTextBodyDefault}"
3322
3322
  },
3323
3323
  "colorBorderButtonNormalActive": {
3324
3324
  "light": "{colorBlue400}",
@@ -4463,16 +4463,16 @@ module.exports.preset = {
4463
4463
  "dark": "transparent"
4464
4464
  },
4465
4465
  "colorBackgroundChatBubbleIncoming": {
4466
- "light": "{colorGrey850}",
4467
- "dark": "{colorGrey850}"
4466
+ "light": "{colorGrey900}",
4467
+ "dark": "{colorGrey900}"
4468
4468
  },
4469
4469
  "colorTextChatBubbleOutgoing": {
4470
- "light": "{colorTextBodySecondary}",
4471
- "dark": "{colorTextBodySecondary}"
4470
+ "light": "{colorTextBodyDefault}",
4471
+ "dark": "{colorTextBodyDefault}"
4472
4472
  },
4473
4473
  "colorTextChatBubbleIncoming": {
4474
- "light": "{colorTextBodySecondary}",
4475
- "dark": "{colorTextBodySecondary}"
4474
+ "light": "{colorTextBodyDefault}",
4475
+ "dark": "{colorTextBodyDefault}"
4476
4476
  },
4477
4477
  "colorBorderButtonNormalActive": {
4478
4478
  "light": "{colorBlue400}",
@@ -5550,15 +5550,15 @@ module.exports.preset = {
5550
5550
  },
5551
5551
  "colorBackgroundChatBubbleIncoming": {
5552
5552
  "light": "{colorGrey150}",
5553
- "dark": "{colorGrey850}"
5553
+ "dark": "{colorGrey900}"
5554
5554
  },
5555
5555
  "colorTextChatBubbleOutgoing": {
5556
- "light": "{colorTextBodySecondary}",
5557
- "dark": "{colorTextBodySecondary}"
5556
+ "light": "{colorTextBodyDefault}",
5557
+ "dark": "{colorTextBodyDefault}"
5558
5558
  },
5559
5559
  "colorTextChatBubbleIncoming": {
5560
- "light": "{colorTextBodySecondary}",
5561
- "dark": "{colorTextBodySecondary}"
5560
+ "light": "{colorTextBodyDefault}",
5561
+ "dark": "{colorTextBodyDefault}"
5562
5562
  },
5563
5563
  "colorBorderButtonNormalActive": {
5564
5564
  "light": "{colorWhite}",
@@ -6636,15 +6636,15 @@ module.exports.preset = {
6636
6636
  },
6637
6637
  "colorBackgroundChatBubbleIncoming": {
6638
6638
  "light": "{colorGrey150}",
6639
- "dark": "{colorGrey850}"
6639
+ "dark": "{colorGrey900}"
6640
6640
  },
6641
6641
  "colorTextChatBubbleOutgoing": {
6642
- "light": "{colorTextBodySecondary}",
6643
- "dark": "{colorTextBodySecondary}"
6642
+ "light": "{colorTextBodyDefault}",
6643
+ "dark": "{colorTextBodyDefault}"
6644
6644
  },
6645
6645
  "colorTextChatBubbleIncoming": {
6646
- "light": "{colorTextBodySecondary}",
6647
- "dark": "{colorTextBodySecondary}"
6646
+ "light": "{colorTextBodyDefault}",
6647
+ "dark": "{colorTextBodyDefault}"
6648
6648
  },
6649
6649
  "colorBorderButtonNormalActive": {
6650
6650
  "light": "{colorTextButtonNormalHover}",
@@ -7722,15 +7722,15 @@ module.exports.preset = {
7722
7722
  },
7723
7723
  "colorBackgroundChatBubbleIncoming": {
7724
7724
  "light": "{colorGrey150}",
7725
- "dark": "{colorGrey850}"
7725
+ "dark": "{colorGrey900}"
7726
7726
  },
7727
7727
  "colorTextChatBubbleOutgoing": {
7728
- "light": "{colorTextBodySecondary}",
7729
- "dark": "{colorTextBodySecondary}"
7728
+ "light": "{colorTextBodyDefault}",
7729
+ "dark": "{colorTextBodyDefault}"
7730
7730
  },
7731
7731
  "colorTextChatBubbleIncoming": {
7732
- "light": "{colorTextBodySecondary}",
7733
- "dark": "{colorTextBodySecondary}"
7732
+ "light": "{colorTextBodyDefault}",
7733
+ "dark": "{colorTextBodyDefault}"
7734
7734
  },
7735
7735
  "colorBorderButtonNormalActive": {
7736
7736
  "light": "{colorTextButtonNormalHover}",
@@ -8809,16 +8809,16 @@ module.exports.preset = {
8809
8809
  "dark": "transparent"
8810
8810
  },
8811
8811
  "colorBackgroundChatBubbleIncoming": {
8812
- "light": "{colorGrey850}",
8813
- "dark": "{colorGrey850}"
8812
+ "light": "{colorGrey900}",
8813
+ "dark": "{colorGrey900}"
8814
8814
  },
8815
8815
  "colorTextChatBubbleOutgoing": {
8816
- "light": "{colorTextBodySecondary}",
8817
- "dark": "{colorTextBodySecondary}"
8816
+ "light": "{colorTextBodyDefault}",
8817
+ "dark": "{colorTextBodyDefault}"
8818
8818
  },
8819
8819
  "colorTextChatBubbleIncoming": {
8820
- "light": "{colorTextBodySecondary}",
8821
- "dark": "{colorTextBodySecondary}"
8820
+ "light": "{colorTextBodyDefault}",
8821
+ "dark": "{colorTextBodyDefault}"
8822
8822
  },
8823
8823
  "colorBorderButtonNormalActive": {
8824
8824
  "light": "{colorTextButtonNormalHover}",
@@ -11752,9 +11752,9 @@ module.exports.preset = {
11752
11752
  "colorTextAvatar": "--color-text-avatar-jddpvm",
11753
11753
  "colorBackgroundLoadingBarGenAi": "--color-background-loading-bar-gen-ai-7qfi9s",
11754
11754
  "colorBackgroundChatBubbleOutgoing": "--color-background-chat-bubble-outgoing-pfqan2",
11755
- "colorBackgroundChatBubbleIncoming": "--color-background-chat-bubble-incoming-brq006",
11756
- "colorTextChatBubbleOutgoing": "--color-text-chat-bubble-outgoing-25z5e0",
11757
- "colorTextChatBubbleIncoming": "--color-text-chat-bubble-incoming-t2slde",
11755
+ "colorBackgroundChatBubbleIncoming": "--color-background-chat-bubble-incoming-ljtp6c",
11756
+ "colorTextChatBubbleOutgoing": "--color-text-chat-bubble-outgoing-bvbr0v",
11757
+ "colorTextChatBubbleIncoming": "--color-text-chat-bubble-incoming-x2kig8",
11758
11758
  "colorBorderButtonNormalActive": "--color-border-button-normal-active-mn0ayd",
11759
11759
  "colorBorderButtonNormalDefault": "--color-border-button-normal-default-uzqi0v",
11760
11760
  "colorBorderToggleButtonNormalPressed": "--color-border-toggle-button-normal-pressed-lylxt2",
@@ -1075,15 +1075,15 @@ export var preset = {
1075
1075
  },
1076
1076
  "colorBackgroundChatBubbleIncoming": {
1077
1077
  "light": "{colorGrey150}",
1078
- "dark": "{colorGrey850}"
1078
+ "dark": "{colorGrey900}"
1079
1079
  },
1080
1080
  "colorTextChatBubbleOutgoing": {
1081
- "light": "{colorTextBodySecondary}",
1082
- "dark": "{colorTextBodySecondary}"
1081
+ "light": "{colorTextBodyDefault}",
1082
+ "dark": "{colorTextBodyDefault}"
1083
1083
  },
1084
1084
  "colorTextChatBubbleIncoming": {
1085
- "light": "{colorTextBodySecondary}",
1086
- "dark": "{colorTextBodySecondary}"
1085
+ "light": "{colorTextBodyDefault}",
1086
+ "dark": "{colorTextBodyDefault}"
1087
1087
  },
1088
1088
  "colorBorderButtonNormalActive": {
1089
1089
  "light": "{colorBlue800}",
@@ -3309,16 +3309,16 @@ export var preset = {
3309
3309
  "dark": "transparent"
3310
3310
  },
3311
3311
  "colorBackgroundChatBubbleIncoming": {
3312
- "light": "{colorGrey850}",
3313
- "dark": "{colorGrey850}"
3312
+ "light": "{colorGrey900}",
3313
+ "dark": "{colorGrey900}"
3314
3314
  },
3315
3315
  "colorTextChatBubbleOutgoing": {
3316
- "light": "{colorTextBodySecondary}",
3317
- "dark": "{colorTextBodySecondary}"
3316
+ "light": "{colorTextBodyDefault}",
3317
+ "dark": "{colorTextBodyDefault}"
3318
3318
  },
3319
3319
  "colorTextChatBubbleIncoming": {
3320
- "light": "{colorTextBodySecondary}",
3321
- "dark": "{colorTextBodySecondary}"
3320
+ "light": "{colorTextBodyDefault}",
3321
+ "dark": "{colorTextBodyDefault}"
3322
3322
  },
3323
3323
  "colorBorderButtonNormalActive": {
3324
3324
  "light": "{colorBlue400}",
@@ -4463,16 +4463,16 @@ export var preset = {
4463
4463
  "dark": "transparent"
4464
4464
  },
4465
4465
  "colorBackgroundChatBubbleIncoming": {
4466
- "light": "{colorGrey850}",
4467
- "dark": "{colorGrey850}"
4466
+ "light": "{colorGrey900}",
4467
+ "dark": "{colorGrey900}"
4468
4468
  },
4469
4469
  "colorTextChatBubbleOutgoing": {
4470
- "light": "{colorTextBodySecondary}",
4471
- "dark": "{colorTextBodySecondary}"
4470
+ "light": "{colorTextBodyDefault}",
4471
+ "dark": "{colorTextBodyDefault}"
4472
4472
  },
4473
4473
  "colorTextChatBubbleIncoming": {
4474
- "light": "{colorTextBodySecondary}",
4475
- "dark": "{colorTextBodySecondary}"
4474
+ "light": "{colorTextBodyDefault}",
4475
+ "dark": "{colorTextBodyDefault}"
4476
4476
  },
4477
4477
  "colorBorderButtonNormalActive": {
4478
4478
  "light": "{colorBlue400}",
@@ -5550,15 +5550,15 @@ export var preset = {
5550
5550
  },
5551
5551
  "colorBackgroundChatBubbleIncoming": {
5552
5552
  "light": "{colorGrey150}",
5553
- "dark": "{colorGrey850}"
5553
+ "dark": "{colorGrey900}"
5554
5554
  },
5555
5555
  "colorTextChatBubbleOutgoing": {
5556
- "light": "{colorTextBodySecondary}",
5557
- "dark": "{colorTextBodySecondary}"
5556
+ "light": "{colorTextBodyDefault}",
5557
+ "dark": "{colorTextBodyDefault}"
5558
5558
  },
5559
5559
  "colorTextChatBubbleIncoming": {
5560
- "light": "{colorTextBodySecondary}",
5561
- "dark": "{colorTextBodySecondary}"
5560
+ "light": "{colorTextBodyDefault}",
5561
+ "dark": "{colorTextBodyDefault}"
5562
5562
  },
5563
5563
  "colorBorderButtonNormalActive": {
5564
5564
  "light": "{colorWhite}",
@@ -6636,15 +6636,15 @@ export var preset = {
6636
6636
  },
6637
6637
  "colorBackgroundChatBubbleIncoming": {
6638
6638
  "light": "{colorGrey150}",
6639
- "dark": "{colorGrey850}"
6639
+ "dark": "{colorGrey900}"
6640
6640
  },
6641
6641
  "colorTextChatBubbleOutgoing": {
6642
- "light": "{colorTextBodySecondary}",
6643
- "dark": "{colorTextBodySecondary}"
6642
+ "light": "{colorTextBodyDefault}",
6643
+ "dark": "{colorTextBodyDefault}"
6644
6644
  },
6645
6645
  "colorTextChatBubbleIncoming": {
6646
- "light": "{colorTextBodySecondary}",
6647
- "dark": "{colorTextBodySecondary}"
6646
+ "light": "{colorTextBodyDefault}",
6647
+ "dark": "{colorTextBodyDefault}"
6648
6648
  },
6649
6649
  "colorBorderButtonNormalActive": {
6650
6650
  "light": "{colorTextButtonNormalHover}",
@@ -7722,15 +7722,15 @@ export var preset = {
7722
7722
  },
7723
7723
  "colorBackgroundChatBubbleIncoming": {
7724
7724
  "light": "{colorGrey150}",
7725
- "dark": "{colorGrey850}"
7725
+ "dark": "{colorGrey900}"
7726
7726
  },
7727
7727
  "colorTextChatBubbleOutgoing": {
7728
- "light": "{colorTextBodySecondary}",
7729
- "dark": "{colorTextBodySecondary}"
7728
+ "light": "{colorTextBodyDefault}",
7729
+ "dark": "{colorTextBodyDefault}"
7730
7730
  },
7731
7731
  "colorTextChatBubbleIncoming": {
7732
- "light": "{colorTextBodySecondary}",
7733
- "dark": "{colorTextBodySecondary}"
7732
+ "light": "{colorTextBodyDefault}",
7733
+ "dark": "{colorTextBodyDefault}"
7734
7734
  },
7735
7735
  "colorBorderButtonNormalActive": {
7736
7736
  "light": "{colorTextButtonNormalHover}",
@@ -8809,16 +8809,16 @@ export var preset = {
8809
8809
  "dark": "transparent"
8810
8810
  },
8811
8811
  "colorBackgroundChatBubbleIncoming": {
8812
- "light": "{colorGrey850}",
8813
- "dark": "{colorGrey850}"
8812
+ "light": "{colorGrey900}",
8813
+ "dark": "{colorGrey900}"
8814
8814
  },
8815
8815
  "colorTextChatBubbleOutgoing": {
8816
- "light": "{colorTextBodySecondary}",
8817
- "dark": "{colorTextBodySecondary}"
8816
+ "light": "{colorTextBodyDefault}",
8817
+ "dark": "{colorTextBodyDefault}"
8818
8818
  },
8819
8819
  "colorTextChatBubbleIncoming": {
8820
- "light": "{colorTextBodySecondary}",
8821
- "dark": "{colorTextBodySecondary}"
8820
+ "light": "{colorTextBodyDefault}",
8821
+ "dark": "{colorTextBodyDefault}"
8822
8822
  },
8823
8823
  "colorBorderButtonNormalActive": {
8824
8824
  "light": "{colorTextButtonNormalHover}",
@@ -11752,9 +11752,9 @@ export var preset = {
11752
11752
  "colorTextAvatar": "--color-text-avatar-jddpvm",
11753
11753
  "colorBackgroundLoadingBarGenAi": "--color-background-loading-bar-gen-ai-7qfi9s",
11754
11754
  "colorBackgroundChatBubbleOutgoing": "--color-background-chat-bubble-outgoing-pfqan2",
11755
- "colorBackgroundChatBubbleIncoming": "--color-background-chat-bubble-incoming-brq006",
11756
- "colorTextChatBubbleOutgoing": "--color-text-chat-bubble-outgoing-25z5e0",
11757
- "colorTextChatBubbleIncoming": "--color-text-chat-bubble-incoming-t2slde",
11755
+ "colorBackgroundChatBubbleIncoming": "--color-background-chat-bubble-incoming-ljtp6c",
11756
+ "colorTextChatBubbleOutgoing": "--color-text-chat-bubble-outgoing-bvbr0v",
11757
+ "colorTextChatBubbleIncoming": "--color-text-chat-bubble-incoming-x2kig8",
11758
11758
  "colorBorderButtonNormalActive": "--color-border-button-normal-active-mn0ayd",
11759
11759
  "colorBorderButtonNormalDefault": "--color-border-button-normal-default-uzqi0v",
11760
11760
  "colorBorderToggleButtonNormalPressed": "--color-border-toggle-button-normal-pressed-lylxt2",
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "3279cb8e38e9c95a1b7ad796cf65fc5eaf2bc3c9"
2
+ "commit": "63b858d5faa9b9517b6804890288276c4a23118f"
3
3
  }
@@ -1,29 +1,30 @@
1
1
  type ChangeCallback<T> = (props: T | null) => void;
2
+ type RegistrationCallback = (isRegistered: boolean) => void;
2
3
  export interface BreadcrumbsGlobalRegistration<T> {
3
4
  update(props: T): void;
4
5
  cleanup(): void;
5
6
  }
6
7
  export interface BreadcrumbsApiInternal<T> {
7
8
  registerAppLayout: (changeCallback: ChangeCallback<T>) => (() => void) | void;
8
- registerBreadcrumbs: (props: T, onRegistered: () => void) => BreadcrumbsGlobalRegistration<T>;
9
+ registerBreadcrumbs: (props: T, onRegistered: RegistrationCallback) => BreadcrumbsGlobalRegistration<T>;
9
10
  getStateForTesting: () => {
10
11
  appLayoutUpdateCallback: ChangeCallback<T> | null;
11
12
  breadcrumbInstances: Array<{
12
13
  props: T;
13
14
  }>;
14
- breadcrumbRegistrations: Array<() => void>;
15
+ breadcrumbRegistrations: Array<RegistrationCallback>;
15
16
  };
16
17
  }
17
18
  export declare class BreadcrumbsController<T> {
18
19
  #private;
19
20
  registerAppLayout: (changeCallback: ChangeCallback<T>) => (() => void) | undefined;
20
- registerBreadcrumbs: (props: T, onRegistered: () => void) => BreadcrumbsGlobalRegistration<T>;
21
+ registerBreadcrumbs: (props: T, onRegistered: RegistrationCallback) => BreadcrumbsGlobalRegistration<T>;
21
22
  getStateForTesting: () => {
22
23
  appLayoutUpdateCallback: ChangeCallback<T> | null;
23
24
  breadcrumbInstances: {
24
25
  props: T;
25
26
  }[];
26
- breadcrumbRegistrations: (() => void)[];
27
+ breadcrumbRegistrations: RegistrationCallback[];
27
28
  };
28
29
  installInternal(internalApi?: Partial<BreadcrumbsApiInternal<T>>): BreadcrumbsApiInternal<T>;
29
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../../../../src/internal/plugins/controllers/breadcrumbs.ts"],"names":[],"mappings":"AAIA,KAAK,cAAc,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;AAEnD,MAAM,WAAW,6BAA6B,CAAC,CAAC;IAC9C,MAAM,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;IACvB,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,sBAAsB,CAAC,CAAC;IACvC,iBAAiB,EAAE,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC;IAC9E,mBAAmB,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,YAAY,EAAE,MAAM,IAAI,KAAK,6BAA6B,CAAC,CAAC,CAAC,CAAC;IAC9F,kBAAkB,EAAE,MAAM;QACxB,uBAAuB,EAAE,cAAc,CAAC,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,CAAC,GAAG,IAAI,CAAC;QAClD,mBAAmB,EAAE,KAAK,CAAC;YAAE,KAAK,EAAE,CAAC,CAAA;SAAE,CAAC,CAAC;QACzC,uBAAuB,EAAE,KAAK,CAAC,oBAAoB,CAAC,CAAC;KACtD,CAAC;CACH;AAED,qBAAa,qBAAqB,CAAC,CAAC;;IAiBlC,iBAAiB,mBAAoB,eAAe,CAAC,CAAC,8BAUpD;IAEF,mBAAmB,UAAW,CAAC,gBAAgB,oBAAoB,KAAG,8BAA8B,CAAC,CAAC,CAiBpG;IAEF,kBAAkB;;;mBA9CmB,CAAC;;;MAoDpC;IAEF,eAAe,CAAC,WAAW,GAAE,OAAO,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAM,GAAG,sBAAsB,CAAC,CAAC,CAAC;CAOjG"}
@@ -17,10 +17,7 @@ export class BreadcrumbsController {
17
17
  __classPrivateFieldGet(this, _BreadcrumbsController_appLayoutUpdateCallback, "f").call(this, (_a = latestBreadcrumb === null || latestBreadcrumb === void 0 ? void 0 : latestBreadcrumb.props) !== null && _a !== void 0 ? _a : null);
18
18
  }, 0));
19
19
  _BreadcrumbsController_notifyBreadcrumbs.set(this, debounce(() => {
20
- if (!__classPrivateFieldGet(this, _BreadcrumbsController_appLayoutUpdateCallback, "f")) {
21
- return;
22
- }
23
- __classPrivateFieldGet(this, _BreadcrumbsController_breadcrumbRegistrations, "f").forEach(listener => listener());
20
+ __classPrivateFieldGet(this, _BreadcrumbsController_breadcrumbRegistrations, "f").forEach(listener => listener(!!__classPrivateFieldGet(this, _BreadcrumbsController_appLayoutUpdateCallback, "f")));
24
21
  }, 0));
25
22
  this.registerAppLayout = (changeCallback) => {
26
23
  if (__classPrivateFieldGet(this, _BreadcrumbsController_appLayoutUpdateCallback, "f")) {
@@ -30,6 +27,7 @@ export class BreadcrumbsController {
30
27
  __classPrivateFieldGet(this, _BreadcrumbsController_notifyBreadcrumbs, "f").call(this);
31
28
  return () => {
32
29
  __classPrivateFieldSet(this, _BreadcrumbsController_appLayoutUpdateCallback, null, "f");
30
+ __classPrivateFieldGet(this, _BreadcrumbsController_notifyBreadcrumbs, "f").call(this);
33
31
  };
34
32
  };
35
33
  this.registerBreadcrumbs = (props, onRegistered) => {
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumbs.js","sourceRoot":"","sources":["../../../../../src/internal/plugins/controllers/breadcrumbs.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAmBtC,MAAM,OAAO,qBAAqB;IAAlC;QACE,yDAAqD,IAAI,EAAC;QAC1D,qDAA4C,EAAE,EAAC;QAC/C,yDAA8C,EAAE,EAAC;QAEjD,iDAAmB,QAAQ,CAAC,GAAG,EAAE;;YAC/B,IAAI,CAAC,uBAAA,IAAI,sDAAyB,EAAE;gBAClC,OAAO;aACR;YACD,MAAM,gBAAgB,GAAG,uBAAA,IAAI,kDAAqB,CAAC,uBAAA,IAAI,kDAAqB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YACzF,uBAAA,IAAI,sDAAyB,MAA7B,IAAI,EAA0B,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,KAAK,mCAAI,IAAI,CAAC,CAAC;QACjE,CAAC,EAAE,CAAC,CAAC,EAAC;QAEN,mDAAqB,QAAQ,CAAC,GAAG,EAAE;YACjC,IAAI,CAAC,uBAAA,IAAI,sDAAyB,EAAE;gBAClC,OAAO;aACR;YACD,uBAAA,IAAI,sDAAyB,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;QAChE,CAAC,EAAE,CAAC,CAAC,EAAC;QAEN,sBAAiB,GAAG,CAAC,cAAiC,EAAE,EAAE;YACxD,IAAI,uBAAA,IAAI,sDAAyB,EAAE;gBACjC,OAAO;aACR;YACD,uBAAA,IAAI,kDAA4B,cAAc,MAAA,CAAC;YAC/C,uBAAA,IAAI,gD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,CAAC;IASJ,CAAC;IAPC,eAAe,CAAC,cAAkD,EAAE;;QAClE,MAAA,WAAW,CAAC,mBAAmB,oCAA/B,WAAW,CAAC,mBAAmB,GAAK,IAAI,CAAC,mBAAmB,EAAC;QAC7D,MAAA,WAAW,CAAC,iBAAiB,oCAA7B,WAAW,CAAC,iBAAiB,GAAK,IAAI,CAAC,iBAAiB,EAAC;QACzD,MAAA,WAAW,CAAC,kBAAkB,oCAA9B,WAAW,CAAC,kBAAkB,GAAK,IAAI,CAAC,kBAAkB,EAAC;QAE3D,OAAO,WAAwC,CAAC;IAClD,CAAC;CACF","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport debounce from '../../debounce';\n\ntype ChangeCallback<T> = (props: T | null) => void;\n\nexport interface BreadcrumbsGlobalRegistration<T> {\n update(props: T): void;\n cleanup(): void;\n}\n\nexport interface BreadcrumbsApiInternal<T> {\n registerAppLayout: (changeCallback: ChangeCallback<T>) => (() => void) | void;\n registerBreadcrumbs: (props: T, onRegistered: () => void) => BreadcrumbsGlobalRegistration<T>;\n getStateForTesting: () => {\n appLayoutUpdateCallback: ChangeCallback<T> | null;\n breadcrumbInstances: Array<{ props: T }>;\n breadcrumbRegistrations: Array<() => void>;\n };\n}\n\nexport class BreadcrumbsController<T> {\n #appLayoutUpdateCallback: ChangeCallback<T> | null = null;\n #breadcrumbInstances: Array<{ props: T }> = [];\n #breadcrumbRegistrations: Array<() => void> = [];\n\n #notifyAppLayout = debounce(() => {\n if (!this.#appLayoutUpdateCallback) {\n return;\n }\n const latestBreadcrumb = this.#breadcrumbInstances[this.#breadcrumbInstances.length - 1];\n this.#appLayoutUpdateCallback(latestBreadcrumb?.props ?? null);\n }, 0);\n\n #notifyBreadcrumbs = debounce(() => {\n if (!this.#appLayoutUpdateCallback) {\n return;\n }\n this.#breadcrumbRegistrations.forEach(listener => listener());\n }, 0);\n\n registerAppLayout = (changeCallback: ChangeCallback<T>) => {\n if (this.#appLayoutUpdateCallback) {\n return;\n }\n this.#appLayoutUpdateCallback = changeCallback;\n this.#notifyBreadcrumbs();\n return () => {\n this.#appLayoutUpdateCallback = null;\n };\n };\n\n registerBreadcrumbs = (props: T, onRegistered: () => void): BreadcrumbsGlobalRegistration<T> => {\n const instance = { props: props };\n this.#breadcrumbInstances.push(instance);\n this.#breadcrumbRegistrations.push(onRegistered);\n this.#notifyBreadcrumbs();\n this.#notifyAppLayout();\n return {\n update: props => {\n instance.props = props;\n this.#notifyAppLayout();\n },\n cleanup: () => {\n this.#breadcrumbInstances.splice(this.#breadcrumbInstances.indexOf(instance), 1);\n this.#breadcrumbRegistrations.splice(this.#breadcrumbRegistrations.indexOf(onRegistered), 1);\n this.#notifyAppLayout();\n },\n };\n };\n\n getStateForTesting = () => {\n return {\n appLayoutUpdateCallback: this.#appLayoutUpdateCallback,\n breadcrumbInstances: this.#breadcrumbInstances,\n breadcrumbRegistrations: this.#breadcrumbRegistrations,\n };\n };\n\n installInternal(internalApi: Partial<BreadcrumbsApiInternal<T>> = {}): BreadcrumbsApiInternal<T> {\n internalApi.registerBreadcrumbs ??= this.registerBreadcrumbs;\n internalApi.registerAppLayout ??= this.registerAppLayout;\n internalApi.getStateForTesting ??= this.getStateForTesting;\n\n return internalApi as BreadcrumbsApiInternal<T>;\n }\n}\n"]}
1
+ {"version":3,"file":"breadcrumbs.js","sourceRoot":"","sources":["../../../../../src/internal/plugins/controllers/breadcrumbs.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAoBtC,MAAM,OAAO,qBAAqB;IAAlC;QACE,yDAAqD,IAAI,EAAC;QAC1D,qDAA4C,EAAE,EAAC;QAC/C,yDAAwD,EAAE,EAAC;QAE3D,iDAAmB,QAAQ,CAAC,GAAG,EAAE;;YAC/B,IAAI,CAAC,uBAAA,IAAI,sDAAyB,EAAE;gBAClC,OAAO;aACR;YACD,M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AM,EAAE,KAAK,CAAC,EAAE;oBACd,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC;oBACvB,uBAAA,IAAI,8CAAiB,MAArB,IAAI,CAAmB,CAAC;gBAC1B,CAAC;gBACD,OAAO,EAAE,GAAG,EAAE;oBACZ,uBAAA,IAAI,kDAAqB,CAAC,MAAM,CAAC,uBAAA,IAAI,kDAAqB,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;oBACjF,uBAAA,IAAI,sDAAyB,CAAC,MAAM,CAAC,uBAAA,IAAI,sDAAyB,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC;oBAC7F,uBAAA,IAAI,8CAAiB,MAArB,IAAI,CAAmB,CAAC;gBAC1B,CAAC;aACF,CAAC;QACJ,CAAC,CAAC;QAEF,uBAAkB,GAAG,GAAG,EAAE;YACxB,OAAO;gBACL,uBAAuB,EAAE,uBAAA,IAAI,sDAAyB;gBACtD,mBAAmB,EAAE,uBAAA,IAAI,kDAAqB;gBAC9C,uBAAuB,EAAE,uBAAA,IAAI,sDAAyB;aACvD,CAAC;QACJ,CAAC,CAAC;IASJ,CAAC;IAPC,eAAe,CAAC,cAAkD,EAAE;;QAClE,MAAA,WAAW,CAAC,mBAAmB,oCAA/B,WAAW,CAAC,mBAAmB,GAAK,IAAI,CAAC,mBAAmB,EAAC;QAC7D,MAAA,WAAW,CAAC,iBAAiB,oCAA7B,WAAW,CAAC,iBAAiB,GAAK,IAAI,CAAC,iBAAiB,EAAC;QACzD,MAAA,WAAW,CAAC,kBAAkB,oCAA9B,WAAW,CAAC,kBAAkB,GAAK,IAAI,CAAC,kBAAkB,EAAC;QAE3D,OAAO,WAAwC,CAAC;IAClD,CAAC;CACF","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport debounce from '../../debounce';\n\ntype ChangeCallback<T> = (props: T | null) => void;\ntype RegistrationCallback = (isRegistered: boolean) => void;\n\nexport interface BreadcrumbsGlobalRegistration<T> {\n update(props: T): void;\n cleanup(): void;\n}\n\nexport interface BreadcrumbsApiInternal<T> {\n registerAppLayout: (changeCallback: ChangeCallback<T>) => (() => void) | void;\n registerBreadcrumbs: (props: T, onRegistered: RegistrationCallback) => BreadcrumbsGlobalRegistration<T>;\n getStateForTesting: () => {\n appLayoutUpdateCallback: ChangeCallback<T> | null;\n breadcrumbInstances: Array<{ props: T }>;\n breadcrumbRegistrations: Array<RegistrationCallback>;\n };\n}\n\nexport class BreadcrumbsController<T> {\n #appLayoutUpdateCallback: ChangeCallback<T> | null = null;\n #breadcrumbInstances: Array<{ props: T }> = [];\n #breadcrumbRegistrations: Array<RegistrationCallback> = [];\n\n #notifyAppLayout = debounce(() => {\n if (!this.#appLayoutUpdateCallback) {\n return;\n }\n const latestBreadcrumb = this.#breadcrumbInstances[this.#breadcrumbInstances.length - 1];\n this.#appLayoutUpdateCallback(latestBreadcrumb?.props ?? null);\n }, 0);\n\n #notifyBreadcrumbs = debounce(() => {\n this.#breadcrumbRegistrations.forEach(listener => listener(!!this.#appLayoutUpdateCallback));\n }, 0);\n\n registerAppLayout = (changeCallback: ChangeCallback<T>) => {\n if (this.#appLayoutUpdateCallback) {\n return;\n }\n this.#appLayoutUpdateCallback = changeCallback;\n this.#notifyBreadcrumbs();\n return () => {\n this.#appLayoutUpdateCallback = null;\n this.#notifyBreadcrumbs();\n };\n };\n\n registerBreadcrumbs = (props: T, onRegistered: RegistrationCallback): BreadcrumbsGlobalRegistration<T> => {\n const instance = { props: props };\n this.#breadcrumbInstances.push(instance);\n this.#breadcrumbRegistrations.push(onRegistered);\n this.#notifyBreadcrumbs();\n this.#notifyAppLayout();\n return {\n update: props => {\n instance.props = props;\n this.#notifyAppLayout();\n },\n cleanup: () => {\n this.#breadcrumbInstances.splice(this.#breadcrumbInstances.indexOf(instance), 1);\n this.#breadcrumbRegistrations.splice(this.#breadcrumbRegistrations.indexOf(onRegistered), 1);\n this.#notifyAppLayout();\n },\n };\n };\n\n getStateForTesting = () => {\n return {\n appLayoutUpdateCallback: this.#appLayoutUpdateCallback,\n breadcrumbInstances: this.#breadcrumbInstances,\n breadcrumbRegistrations: this.#breadcrumbRegistrations,\n };\n };\n\n installInternal(internalApi: Partial<BreadcrumbsApiInternal<T>> = {}): BreadcrumbsApiInternal<T> {\n internalApi.registerBreadcrumbs ??= this.registerBreadcrumbs;\n internalApi.registerAppLayout ??= this.registerAppLayout;\n internalApi.getStateForTesting ??= this.getStateForTesting;\n\n return internalApi as BreadcrumbsApiInternal<T>;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"use-global-breadcrumbs.d.ts","sourceRoot":"","sources":["../../../../../src/internal/plugins/helpers/use-global-breadcrumbs.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAiC5E,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,oBAAoB,CAAC,IAAI,EAAE,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC,WAQ1G;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,oCAavD"}
1
+ {"version":3,"file":"use-global-breadcrumbs.d.ts","sourceRoot":"","sources":["../../../../../src/internal/plugins/helpers/use-global-breadcrumbs.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAmC5E,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,oBAAoB,CAAC,IAAI,EAAE,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC,WAQ1G;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,oCAavD"}
@@ -15,7 +15,7 @@ function useSetGlobalBreadcrumbsImplementation(_a) {
15
15
  if (isInToolbar || __disableGlobalization) {
16
16
  return;
17
17
  }
18
- const registration = awsuiPluginsInternal.breadcrumbs.registerBreadcrumbs(props, () => setRegistered(true));
18
+ const registration = awsuiPluginsInternal.breadcrumbs.registerBreadcrumbs(props, isRegistered => setRegistered(isRegistered !== null && isRegistered !== void 0 ? isRegistered : true));
19
19
  registrationRef.current = registration;
20
20
  return () => {
21
21
  registration.cleanup();
@@ -1 +1 @@
1
- {"version":3,"file":"use-global-breadcrumbs.js","sourceRoot":"","sources":["../../../../../src/internal/plugins/helpers/use-global-breadcrumbs.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjF,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAE7F,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAG9C,SAAS,qCAAqC,CAAC,EAGoB;;QAHpB,EAC7C,sBAAsB,OAE2C,EAD9D,KAAK,cAFqC,0BAG9C,CADS;IAER,MAAM,EAAE,WAAW,EAAE,GAAG,MAAA,UAAU,CAAC,sBAAsB,CAAC,mCAAI,EAAE,CAAC;IACjE,MAAM,eAAe,GAAG,MAAM,EAA8D,CAAC;IAC7F,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEpD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,WAAW,IAAI,sBAAsB,EAAE;YACzC,OAAO;SACR;QACD,MAAM,YAAY,GAAG,oBAAoB,CAAC,WAAW,CAAC,mBAAmB,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;QAC5G,eAAe,CAAC,OAAO,GAAG,YAAY,CAAC;QAEvC,OAAO,GAAG,EAAE;YACV,YAAY,CAAC,OAAO,EAAE,CAAC;QACzB,CAAC,CAAC;QACF,wDAAwD;QACxD,uDAAuD;IACzD,CAAC,EAAE,CAAC,WAAW,EAAE,sBAAsB,CAAC,CAAC,CAAC;IAE1C,eAAe,CAAC,GAAG,EAAE;;QACnB,MAAA,eAAe,CAAC,OAAO,0CAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;IAEH,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAsC,KAA8B;IACzG,gEAAgE;IAChE,IAAI,CAAC,0BAA0B,EAAE,EAAE;QACjC,OAAO,KAAK,CAAC;KACd;IACD,iEAAiE;IACjE,sDAAsD;IACtD,OAAO,qCAAqC,CAAC,KAAK,CAAC,CAAC;AACtD,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,OAAgB;IACtD,MAAM,CAAC,qBAAqB,EAAE,wBAAwB,CAAC,GAAG,QAAQ,CAAmC,IAAI,CAAC,CAAC;IAE3G,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO;SACR;QACD,OAAO,oBAAoB,CAAC,WAAW,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE;YACtE,wBAAwB,CAAC,WAAW,CAAC,CAAC;QACxC,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,OAAO,qBAAqB,CAAC;AAC/B,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { useContext, useEffect, useLayoutEffect, useRef, useState } from 'react';\n\nimport { useAppLayoutToolbarEnabled } from '../../../app-layout/utils/feature-flags';\nimport { BreadcrumbsSlotContext } from '../../../app-layout/visual-refresh-toolbar/contexts';\nimport { BreadcrumbGroupProps } from '../../../breadcrumb-group/interfaces';\nimport { awsuiPluginsInternal } from '../api';\nimport { BreadcrumbsGlobalRegistration } from '../controllers/breadcrumbs';\n\nfunction useSetGlobalBreadcrumbsImplementation({\n __disableGlobalization,\n ...props\n}: BreadcrumbGroupProps<any> & { __disableGlobalization?: boolean }) {\n const { isInToolbar } = useContext(BreadcrumbsSlotContext) ?? {};\n const registrationRef = useRef<BreadcrumbsGlobalRegistration<BreadcrumbGroupProps> | null>();\n const [registered, setRegistered] = useState(false);\n\n useEffect(() => {\n if (isInToolbar || __disableGlobalization) {\n return;\n }\n const registration = awsuiPluginsInternal.breadcrumbs.registerBreadcrumbs(props, () => setRegistered(true));\n registrationRef.current = registration;\n\n return () => {\n registration.cleanup();\n };\n // subsequent prop changes are handled by another effect\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isInToolbar, __disableGlobalization]);\n\n useLayoutEffect(() => {\n registrationRef.current?.update(props);\n });\n\n return registered;\n}\n\nexport function useSetGlobalBreadcrumbs<T extends BreadcrumbGroupProps.Item>(props: BreadcrumbGroupProps<T>) {\n // avoid additional side effects when this feature is not active\n if (!useAppLayoutToolbarEnabled()) {\n return false;\n }\n // getGlobalFlag() value does not change without full page reload\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return useSetGlobalBreadcrumbsImplementation(props);\n}\n\nexport function useGetGlobalBreadcrumbs(enabled: boolean) {\n const [discoveredBreadcrumbs, setDiscoveredBreadcrumbs] = useState<BreadcrumbGroupProps<any> | null>(null);\n\n useEffect(() => {\n if (!enabled) {\n return;\n }\n return awsuiPluginsInternal.breadcrumbs.registerAppLayout(breadcrumbs => {\n setDiscoveredBreadcrumbs(breadcrumbs);\n });\n }, [enabled]);\n\n return discoveredBreadcrumbs;\n}\n"]}
1
+ {"version":3,"file":"use-global-breadcrumbs.js","sourceRoot":"","sources":["../../../../../src/internal/plugins/helpers/use-global-breadcrumbs.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjF,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EA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CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,OAAgB;IACtD,MAAM,CAAC,qBAAqB,EAAE,wBAAwB,CAAC,GAAG,QAAQ,CAAmC,IAAI,CAAC,CAAC;IAE3G,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO;SACR;QACD,OAAO,oBAAoB,CAAC,WAAW,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE;YACtE,wBAAwB,CAAC,WAAW,CAAC,CAAC;QACxC,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,OAAO,qBAAqB,CAAC;AAC/B,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { useContext, useEffect, useLayoutEffect, useRef, useState } from 'react';\n\nimport { useAppLayoutToolbarEnabled } from '../../../app-layout/utils/feature-flags';\nimport { BreadcrumbsSlotContext } from '../../../app-layout/visual-refresh-toolbar/contexts';\nimport { BreadcrumbGroupProps } from '../../../breadcrumb-group/interfaces';\nimport { awsuiPluginsInternal } from '../api';\nimport { BreadcrumbsGlobalRegistration } from '../controllers/breadcrumbs';\n\nfunction useSetGlobalBreadcrumbsImplementation({\n __disableGlobalization,\n ...props\n}: BreadcrumbGroupProps<any> & { __disableGlobalization?: boolean }) {\n const { isInToolbar } = useContext(BreadcrumbsSlotContext) ?? {};\n const registrationRef = useRef<BreadcrumbsGlobalRegistration<BreadcrumbGroupProps> | null>();\n const [registered, setRegistered] = useState(false);\n\n useEffect(() => {\n if (isInToolbar || __disableGlobalization) {\n return;\n }\n const registration = awsuiPluginsInternal.breadcrumbs.registerBreadcrumbs(props, isRegistered =>\n setRegistered(isRegistered ?? true)\n );\n registrationRef.current = registration;\n\n return () => {\n registration.cleanup();\n };\n // subsequent prop changes are handled by another effect\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isInToolbar, __disableGlobalization]);\n\n useLayoutEffect(() => {\n registrationRef.current?.update(props);\n });\n\n return registered;\n}\n\nexport function useSetGlobalBreadcrumbs<T extends BreadcrumbGroupProps.Item>(props: BreadcrumbGroupProps<T>) {\n // avoid additional side effects when this feature is not active\n if (!useAppLayoutToolbarEnabled()) {\n return false;\n }\n // getGlobalFlag() value does not change without full page reload\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return useSetGlobalBreadcrumbsImplementation(props);\n}\n\nexport function useGetGlobalBreadcrumbs(enabled: boolean) {\n const [discoveredBreadcrumbs, setDiscoveredBreadcrumbs] = useState<BreadcrumbGroupProps<any> | null>(null);\n\n useEffect(() => {\n if (!enabled) {\n return;\n }\n return awsuiPluginsInternal.breadcrumbs.registerAppLayout(breadcrumbs => {\n setDiscoveredBreadcrumbs(breadcrumbs);\n });\n }, [enabled]);\n\n return discoveredBreadcrumbs;\n}\n"]}
package/package.json CHANGED
@@ -128,7 +128,7 @@
128
128
  "./internal/base-component/index.js",
129
129
  "./internal/base-component/styles.css.js"
130
130
  ],
131
- "version": "3.0.805",
131
+ "version": "3.0.806",
132
132
  "repository": {
133
133
  "type": "git",
134
134
  "url": "https://github.com/cloudscape-design/components.git"
@@ -4,12 +4,14 @@ import SplitPanelWrapper from '../split-panel';
4
4
  export default class AppLayoutWrapper extends ComponentWrapper {
5
5
  static rootSelector: string;
6
6
  findNavigation(): ElementWrapper;
7
+ findOpenNavigationPanel(): ElementWrapper | null;
7
8
  findNavigationToggle(): ElementWrapper<HTMLButtonElement>;
8
9
  findNavigationClose(): ElementWrapper<HTMLButtonElement>;
9
10
  findContentRegion(): ElementWrapper;
10
11
  findNotifications(): ElementWrapper | null;
11
12
  findBreadcrumbs(): ElementWrapper | null;
12
13
  findTools(): ElementWrapper;
14
+ findOpenToolsPanel(): ElementWrapper | null;
13
15
  findToolsClose(): ElementWrapper<HTMLButtonElement>;
14
16
  findToolsToggle(): ElementWrapper<HTMLButtonElement>;
15
17
  findSplitPanel(): SplitPanelWrapper | null;
@@ -17,7 +19,16 @@ export default class AppLayoutWrapper extends ComponentWrapper {
17
19
  findActiveDrawer(): ElementWrapper | null;
18
20
  findActiveDrawerCloseButton(): ElementWrapper<HTMLButtonElement> | null;
19
21
  findDrawersTriggers(): ElementWrapper<HTMLButtonElement>[];
20
- findDrawerTriggerById(id: string): ElementWrapper<HTMLButtonElement> | null;
22
+ /**
23
+ * Finds a drawer trigger by the given id.
24
+ *
25
+ * @param id id of the trigger to find
26
+ * @param options
27
+ * * hasBadge (boolean) - If provided, only finds drawers with the badge or without badge respectively
28
+ */
29
+ findDrawerTriggerById(id: string, options?: {
30
+ hasBadge?: boolean;
31
+ }): ElementWrapper<HTMLButtonElement> | null;
21
32
  findDrawersOverflowTrigger(): ButtonDropdownWrapper | null;
22
33
  findActiveDrawerResizeHandle(): ElementWrapper | null;
23
34
  findToolbar(): ElementWrapper | null;
@@ -11,6 +11,13 @@ class AppLayoutWrapper extends dom_1.ComponentWrapper {
11
11
  findNavigation() {
12
12
  return this.findByClassName(styles_selectors_js_1.default.navigation);
13
13
  }
14
+ findOpenNavigationPanel() {
15
+ const navigation = this.findNavigation();
16
+ if (!navigation) {
17
+ throw new Error('App Layout does not have navigation content');
18
+ }
19
+ return navigation.matches(`:not(.${styles_selectors_js_1.default['drawer-closed']})`);
20
+ }
14
21
  findNavigationToggle() {
15
22
  return this.findByClassName(styles_selectors_js_1.default['navigation-toggle']);
16
23
  }
@@ -29,6 +36,13 @@ class AppLayoutWrapper extends dom_1.ComponentWrapper {
29
36
  findTools() {
30
37
  return this.findByClassName(styles_selectors_js_1.default.tools);
31
38
  }
39
+ findOpenToolsPanel() {
40
+ const tools = this.findTools();
41
+ if (!tools) {
42
+ throw new Error('App Layout does not have tools content');
43
+ }
44
+ return tools.matches(`:not(.${styles_selectors_js_1.default['drawer-closed']})`);
45
+ }
32
46
  findToolsClose() {
33
47
  return this.findByClassName(styles_selectors_js_1.default['tools-close']);
34
48
  }
@@ -50,8 +64,20 @@ class AppLayoutWrapper extends dom_1.ComponentWrapper {
50
64
  findDrawersTriggers() {
51
65
  return this.findAllByClassName(styles_selectors_js_1.default['drawers-trigger']);
52
66
  }
53
- findDrawerTriggerById(id) {
54
- return this.find(`.${styles_selectors_js_1.default['drawers-trigger']}[data-testid="awsui-app-layout-trigger-${id}"]`);
67
+ /**
68
+ * Finds a drawer trigger by the given id.
69
+ *
70
+ * @param id id of the trigger to find
71
+ * @param options
72
+ * * hasBadge (boolean) - If provided, only finds drawers with the badge or without badge respectively
73
+ */
74
+ findDrawerTriggerById(id, options = {}) {
75
+ const trigger = this.find(`.${styles_selectors_js_1.default['drawers-trigger']}[data-testid="awsui-app-layout-trigger-${id}"]`);
76
+ if (!trigger || options.hasBadge === undefined) {
77
+ return trigger;
78
+ }
79
+ const badgeSelector = `.${styles_selectors_js_1.default['drawers-trigger-with-badge']}`;
80
+ return trigger.matches(options.hasBadge ? badgeSelector : `:not(${badgeSelector})`);
55
81
  }
56
82
  findDrawersOverflowTrigger() {
57
83
  return this.findComponent(`.${styles_selectors_js_1.default['overflow-menu']}`, button_dropdown_1.default);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/app-layout/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,gEAAyG;AAEzG,wDAAuD;AACvD,gDAA+C;AAE/C,8FAAkF;AAClF,+FAA6F;AAE7F,MAAqB,gBAAiB,SAAQ,sBAAgB;IAG5D,cAAc;QACZ,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,UAAU,CAAE,CAAC;IAC1D,CAAC;IAED,oBAAoB;QAClB,OAAO,IAAI,CAAC,eAAe,CAAoB,6BAAc,CAAC,mBAAmB,CAAC,CAAE,CAAC;IACvF,CAAC;IAED,mBAAmB;QACjB,OAAO,IAAI,CAAC,eAAe,CAAoB,6BAAc,CAAC,kBAAkB,CAAC,CAAE,CAAC;IACtF,CAAC;IAED,iBAAiB;QACf,O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F,CAAC;IAED,mBAAmB;QACjB,OAAO,IAAI,CAAC,kBAAkB,CAAoB,6BAAc,CAAC,iBAAiB,CAAC,CAAC,CAAC;IACvF,CAAC;IAED;;;;;;OAMG;IACH,qBAAqB,CAAC,EAAU,EAAE,UAAkC,EAAE;QACpE,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CACvB,IAAI,6BAAc,CAAC,iBAAiB,CAAC,0CAA0C,EAAE,IAAI,CACtF,CAAC;QACF,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,QAAQ,KAAK,SAAS,EAAE;YAC9C,OAAO,OAAO,CAAC;SAChB;QACD,MAAM,aAAa,GAAG,IAAI,6BAAc,CAAC,4BAA4B,CAAC,EAAE,CAAC;QACzE,OAAO,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,aAAa,GAAG,CAAC,CAAC;IACtF,CAAC;IAED,0BAA0B;QACxB,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,6BAAc,CAAC,eAAe,CAAC,EAAE,EAAE,yBAAqB,CAAC,CAAC;IAC1F,CAAC;IAED,4BAA4B;QAC1B,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAChE,CAAC;IAED,WAAW;QACT,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,OAAO,CAAC,CAAC;IACtD,CAAC;IAED,wBAAwB;QACtB,OAAO,IAAA,mBAAa,GAAE,CAAC,eAAe,CAAC,6BAAc,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAC5E,CAAC;;AA3GH,mCA4GC;AA3GQ,6BAAY,GAAG,6BAAc,CAAC,IAAI,CAAC"}
@@ -4,12 +4,14 @@ import SplitPanelWrapper from '../split-panel';
4
4
  export default class AppLayoutWrapper extends ComponentWrapper {
5
5
  static rootSelector: string;
6
6
  findNavigation(): ElementWrapper;
7
+ findOpenNavigationPanel(): ElementWrapper;
7
8
  findNavigationToggle(): ElementWrapper;
8
9
  findNavigationClose(): ElementWrapper;
9
10
  findContentRegion(): ElementWrapper;
10
11
  findNotifications(): ElementWrapper;
11
12
  findBreadcrumbs(): ElementWrapper;
12
13
  findTools(): ElementWrapper;
14
+ findOpenToolsPanel(): ElementWrapper;
13
15
  findToolsClose(): ElementWrapper;
14
16
  findToolsToggle(): ElementWrapper;
15
17
  findSplitPanel(): SplitPanelWrapper;
@@ -17,7 +19,16 @@ export default class AppLayoutWrapper extends ComponentWrapper {
17
19
  findActiveDrawer(): ElementWrapper;
18
20
  findActiveDrawerCloseButton(): ElementWrapper;
19
21
  findDrawersTriggers(): import("@cloudscape-design/test-utils-core/selectors").MultiElementWrapper<ElementWrapper>;
20
- findDrawerTriggerById(id: string): ElementWrapper;
22
+ /**
23
+ * Finds a drawer trigger by the given id.
24
+ *
25
+ * @param id id of the trigger to find
26
+ * @param options
27
+ * * hasBadge (boolean) - If provided, only finds drawers with the badge or without badge respectively
28
+ */
29
+ findDrawerTriggerById(id: string, options?: {
30
+ hasBadge?: boolean;
31
+ }): ElementWrapper;
21
32
  findDrawersOverflowTrigger(): ButtonDropdownWrapper;
22
33
  findActiveDrawerResizeHandle(): ElementWrapper;
23
34
  findToolbar(): ElementWrapper;