@stack-spot/portal-layout 2.35.1 → 2.36.0-beta.1

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 (45) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/dist/Layout.d.ts +5 -1
  3. package/dist/Layout.d.ts.map +1 -1
  4. package/dist/Layout.js +28 -9
  5. package/dist/Layout.js.map +1 -1
  6. package/dist/LayoutOverlayManager.d.ts +77 -11
  7. package/dist/LayoutOverlayManager.d.ts.map +1 -1
  8. package/dist/LayoutOverlayManager.js +152 -47
  9. package/dist/LayoutOverlayManager.js.map +1 -1
  10. package/dist/components/NotificationCenter/NotificationsPanelFooter.js +1 -1
  11. package/dist/components/NotificationCenter/NotificationsPanelFooter.js.map +1 -1
  12. package/dist/components/NotificationCenter/dictionary.d.ts +1 -1
  13. package/dist/components/NotificationCenter/dictionary.d.ts.map +1 -1
  14. package/dist/components/NotificationCenter/dictionary.js +2 -2
  15. package/dist/components/NotificationCenter/dictionary.js.map +1 -1
  16. package/dist/components/OverlayContent.js +2 -2
  17. package/dist/components/error/ErrorBoundary.d.ts.map +1 -1
  18. package/dist/components/error/SilentErrorBoundary.d.ts.map +1 -1
  19. package/dist/components/menu/MenuSections.d.ts.map +1 -1
  20. package/dist/components/menu/MenuSections.js +10 -5
  21. package/dist/components/menu/MenuSections.js.map +1 -1
  22. package/dist/components/menu/types.d.ts +7 -0
  23. package/dist/components/menu/types.d.ts.map +1 -1
  24. package/dist/components/tour/StepNavigation.d.ts.map +1 -1
  25. package/dist/components/tour/StepNavigation.js +2 -1
  26. package/dist/components/tour/StepNavigation.js.map +1 -1
  27. package/dist/dictionary.js +2 -2
  28. package/dist/dictionary.js.map +1 -1
  29. package/dist/elements.d.ts +1 -0
  30. package/dist/elements.d.ts.map +1 -1
  31. package/dist/elements.js +1 -0
  32. package/dist/elements.js.map +1 -1
  33. package/dist/layout.css +30 -3
  34. package/package.json +6 -4
  35. package/src/Layout.tsx +67 -18
  36. package/src/LayoutOverlayManager.tsx +186 -48
  37. package/src/components/NotificationCenter/NotificationsPanelFooter.tsx +1 -1
  38. package/src/components/NotificationCenter/dictionary.ts +2 -2
  39. package/src/components/OverlayContent.tsx +2 -2
  40. package/src/components/menu/MenuSections.tsx +11 -5
  41. package/src/components/menu/types.ts +7 -0
  42. package/src/components/tour/StepNavigation.tsx +3 -1
  43. package/src/dictionary.ts +2 -2
  44. package/src/elements.ts +1 -0
  45. package/src/layout.css +30 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,77 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.36.0-beta.1](https://github.com/stack-spot/portal-commons/compare/portal-layout-beta@v2.35.0-beta.1...portal-layout-beta@v2.36.0-beta.1) (2025-12-01)
4
+
5
+
6
+ ### Features
7
+
8
+ * layout: multi modal ([#1825](https://github.com/stack-spot/portal-commons/issues/1825)) ([a6cba63](https://github.com/stack-spot/portal-commons/commit/a6cba631ced1e398ec1b86de80f4420d55f6c8bd))
9
+
10
+ ## [2.35.0-beta.1](https://github.com/stack-spot/portal-commons/compare/portal-layout-beta@v2.34.1-beta.1...portal-layout-beta@v2.35.0-beta.1) (2025-11-28)
11
+
12
+
13
+ ### Features
14
+
15
+ * **layout:** turn menu compact as default ([3dbe740](https://github.com/stack-spot/portal-commons/commit/3dbe740a72aed1331b2bee1f5d42a9ae937bce74))
16
+ * turn menu compact as default ([#1831](https://github.com/stack-spot/portal-commons/issues/1831)) ([4a2e6c7](https://github.com/stack-spot/portal-commons/commit/4a2e6c7ed25012c350a81f70bdc5cc3d8ff2cd46))
17
+
18
+ ## [2.38.1](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.38.0...portal-layout@v2.38.1) (2025-11-17)
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * 1968 notification panel height ([#1804](https://github.com/stack-spot/portal-commons/issues/1804)) ([c1e1937](https://github.com/stack-spot/portal-commons/commit/c1e1937ecbb472ad4b03215751e5cfa8ec22cea8))
24
+
25
+ ## [2.38.0](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.37.1...portal-layout@v2.38.0) (2025-11-10)
26
+
27
+
28
+ ### Features
29
+
30
+ * add third-level menu for inner content ([#1742](https://github.com/stack-spot/portal-commons/issues/1742)) ([9966a5c](https://github.com/stack-spot/portal-commons/commit/9966a5c6970ba676542ead228cf6a887bf8260f6))
31
+
32
+ ## [2.37.1](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.37.0...portal-layout@v2.37.1) (2025-11-07)
33
+
34
+
35
+ ### Bug Fixes
36
+
37
+ * semantic for accessibility ([#1766](https://github.com/stack-spot/portal-commons/issues/1766)) ([578bc95](https://github.com/stack-spot/portal-commons/commit/578bc95698f5d707f4645693df22c4da57f8684e))
38
+
39
+ ## [2.37.0](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.36.3...portal-layout@v2.37.0) (2025-09-30)
40
+
41
+
42
+ ### Features
43
+
44
+ * 3156 notifications ([#1491](https://github.com/stack-spot/portal-commons/issues/1491)) ([3f9f6a6](https://github.com/stack-spot/portal-commons/commit/3f9f6a6b56004893cca4e0d53afe8eccdf615005))
45
+ * upgrades translation lib ([#1645](https://github.com/stack-spot/portal-commons/issues/1645)) ([838a740](https://github.com/stack-spot/portal-commons/commit/838a7404c9946e8804cebab6ba33a24a0cf52a80))
46
+
47
+ ## [2.36.3](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.36.2...portal-layout@v2.36.3) (2025-09-02)
48
+
49
+
50
+ ### Bug Fixes
51
+
52
+ * overlay header style ([#1504](https://github.com/stack-spot/portal-commons/issues/1504)) ([567c3fb](https://github.com/stack-spot/portal-commons/commit/567c3fb768749a26215fd701314fe3b0dbabf3a3))
53
+
54
+ ## [2.36.2](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.36.1...portal-layout@v2.36.2) (2025-08-21)
55
+
56
+
57
+ ### Bug Fixes
58
+
59
+ * support button hidden ([#1424](https://github.com/stack-spot/portal-commons/issues/1424)) ([15b88ce](https://github.com/stack-spot/portal-commons/commit/15b88ce7659ac7c3192087d5b6384515ef6c00a4))
60
+
61
+ ## [2.36.1](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.36.0...portal-layout@v2.36.1) (2025-08-05)
62
+
63
+
64
+ ### Bug Fixes
65
+
66
+ * default for modal ([#1341](https://github.com/stack-spot/portal-commons/issues/1341)) ([8d0ef68](https://github.com/stack-spot/portal-commons/commit/8d0ef68fa17abebcf3c8fc46a3afee0ee089f6c1))
67
+
68
+ ## [2.36.0](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.35.1...portal-layout@v2.36.0) (2025-08-04)
69
+
70
+
71
+ ### Features
72
+
73
+ * ignoreFirstFocusOnCloseButton right panel ([#1335](https://github.com/stack-spot/portal-commons/issues/1335)) ([d3a09f1](https://github.com/stack-spot/portal-commons/commit/d3a09f144bb61d809071bbbe6c8fa7a2f914251b))
74
+
3
75
  ## [2.35.1](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.35.0...portal-layout@v2.35.1) (2025-08-04)
4
76
 
5
77
 
package/dist/Layout.d.ts CHANGED
@@ -45,6 +45,10 @@ interface RawProps extends WithStyle {
45
45
  * The React element to go in the menu content.
46
46
  */
47
47
  menuContent?: ReactElement;
48
+ /**
49
+ * The React element to go in the menu inner content (third level nav).
50
+ */
51
+ menuInnerContent?: ReactElement;
48
52
  /**
49
53
  * The React element to go in the header.
50
54
  */
@@ -70,7 +74,7 @@ interface RawProps extends WithStyle {
70
74
  * Renders the layout with the React elements passed in the props.
71
75
  * @param props the component's props {@link RawProps}.
72
76
  */
73
- export declare const RawLayout: ({ menuSections, menuContent, header, children, extra, errorDescriptor, onError, className, style }: RawProps) => import("react/jsx-runtime").JSX.Element;
77
+ export declare const RawLayout: ({ menuSections, menuContent, menuInnerContent, header, children, extra, errorDescriptor, onError, className, style }: RawProps) => import("react/jsx-runtime").JSX.Element;
74
78
  /**
75
79
  * Renders the layout with a menu and header that follow the config objects passed as parameter.
76
80
  * @param props the component's props {@link Props}.
@@ -1 +1 @@
1
- {"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../src/Layout.tsx"],"names":[],"mappings":"AACA,OAAO,EAAsB,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACxE,OAAO,yCAAyC,CAAA;AAChD,OAAO,EAAE,YAAY,EAAE,SAAS,EAAa,MAAM,OAAO,CAAA;AAG1D,OAAO,EAAU,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAGzD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAgB,MAAM,iCAAiC,CAAA;AAI3F,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAEnD,OAAO,cAAc,CAAA;AAErB,UAAU,KAAM,SAAQ,SAAS;IAC/B;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC;IAChB;;OAEG;IACH,MAAM,EAAE,WAAW,CAAC;IACpB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE,aAAa,CAAC;IAChC;;OAEG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB;;;OAGG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED,UAAU,QAAS,SAAQ,SAAS;IAClC;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE,aAAa,CAAC;IAChC;;OAEG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,GACpB,oGAEE,Q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C;IAChC;;OAEG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,GACpB,sHAEE,QAAQ,4CAkGX,CAAA;AASD;;;GAGG;AACH,eAAO,MAAM,MAAM,GAAI,+EAA+E,KAAK,4CAsB1G,CAAA"}
package/dist/Layout.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { FadingOverflow } from '@stack-spot/portal-components/FadingOverflow';
3
- import { CSSToCitricAdapter } from '@stack-spot/portal-theme';
3
+ import { CSSToCitricAdapter, listToClass } from '@stack-spot/portal-theme';
4
4
  import '@stack-spot/portal-theme/dist/theme.css';
5
5
  import { useEffect } from 'react';
6
6
  import { overlay } from './LayoutOverlayManager.js';
@@ -18,7 +18,7 @@ import './layout.css';
18
18
  * Renders the layout with the React elements passed in the props.
19
19
  * @param props the component's props {@link RawProps}.
20
20
  */
21
- export const RawLayout = ({ menuSections, menuContent, header, children, extra, errorDescriptor, onError, className, style }) => {
21
+ export const RawLayout = ({ menuSections, menuContent, menuInnerContent, header, children, extra, errorDescriptor, onError, className, style }) => {
22
22
  const { bottomDialog, modal, rightPanel } = overlay.useOverlays();
23
23
  useEffect(() => {
24
24
  if (errorDescriptor)
@@ -32,32 +32,51 @@ export const RawLayout = ({ menuSections, menuContent, header, children, extra,
32
32
  const classList = document.getElementById(elementIds.layout)?.classList;
33
33
  if (!classList)
34
34
  return;
35
- if (menuContent && document.getElementById(elementIds.menuContent)?.children.length) {
35
+ const hasMenuContent = !!menuContent && !!document.getElementById(elementIds.menuContent)?.children.length;
36
+ const hasMenuInnerContent = !!menuInnerContent && !!document.getElementById(elementIds.menuInnerContent)?.children.length;
37
+ if (hasMenuContent) {
36
38
  classList.add('menu-content-visible');
37
- if (!classList.contains('menu-manual'))
39
+ if (!classList.contains('menu-manual')) {
38
40
  classList.add('menu-compact');
41
+ }
39
42
  }
40
43
  else {
41
44
  classList.remove('menu-content-visible');
42
- if (!classList.contains('menu-manual'))
43
- classList.remove('menu-compact');
45
+ }
46
+ if (hasMenuInnerContent) {
47
+ classList.add('menu-inner-content-visible');
48
+ }
49
+ else {
50
+ classList.remove('menu-inner-content-visible');
44
51
  }
45
52
  classList[menuSections ? 'remove' : 'add']('no-menu-sections');
46
53
  if (className)
47
54
  classList.add(...className.split(/\s+/));
48
- });
49
- return (_jsxs(CSSToCitricAdapter, { children: [_jsx(WelcomeTour, {}), _jsxs("div", { id: elementIds.layout, style: style, children: [header && _jsx("header", { id: elementIds.header, children: _jsx(SilentErrorBoundary, { children: header }) }), extra && _jsx(SilentErrorBoundary, { children: extra }), _jsxs("aside", { id: elementIds.menu, children: [_jsx("nav", { role: "menubar", id: elementIds.menuContent, children: _jsx(SilentErrorBoundary, { children: menuContent }) }), menuSections &&
50
- _jsx(FadingOverflow, { sides: ['top', 'bottom'], scroll: "arrows", children: _jsx("nav", { role: "menubar", id: elementIds.menuSections, children: _jsx(SilentErrorBoundary, { children: menuSections }) }) })] }), children && _jsx("div", { id: elementIds.page, children: _jsx("article", { id: elementIds.content, children: _jsx(ErrorBoundary, { children: children }) }) }), _jsx("div", { id: elementIds.bottomDialog, role: "dialog", children: _jsx(ErrorBoundary, { children: bottomDialog }) }), _jsxs("div", { id: elementIds.backdrop, children: [_jsx("div", { id: elementIds.rightPanel, "aria-modal": true, role: "dialog", children: _jsx(ErrorBoundary, { children: rightPanel }) }), _jsx("div", { id: elementIds.modal, "aria-modal": true, role: "dialog", children: _jsx(ErrorBoundary, { children: modal }) })] }), _jsx(Toaster, {}), _jsx("div", { id: elementIds.accessibilityAnnouncer, "aria-atomic": true, "aria-live": "assertive" })] })] }));
55
+ }, [menuContent, menuInnerContent, menuSections, className]);
56
+ return (_jsxs(CSSToCitricAdapter, { children: [_jsx(WelcomeTour, {}), _jsxs("div", { id: elementIds.layout, style: style, className: "menu-manual menu-compact", children: [header && _jsx("header", { id: elementIds.header, children: _jsx(SilentErrorBoundary, { children: header }) }), extra && _jsx(SilentErrorBoundary, { children: extra }), _jsxs("aside", { id: elementIds.menu, children: [menuInnerContent &&
57
+ _jsx("nav", { role: "menubar", id: elementIds.menuInnerContent, children: _jsx(SilentErrorBoundary, { children: menuInnerContent }) }), _jsx("nav", { role: "menubar", id: elementIds.menuContent, children: _jsx(SilentErrorBoundary, { children: menuContent }) }), menuSections &&
58
+ _jsx(FadingOverflow, { sides: ['top', 'bottom'], scroll: "arrows", children: _jsx("nav", { role: "menubar", id: elementIds.menuSections, children: _jsx(SilentErrorBoundary, { children: menuSections }) }) })] }), children && _jsx("div", { id: elementIds.page, children: _jsx("article", { id: elementIds.content, children: _jsx(ErrorBoundary, { children: children }) }) }), _jsx("div", { id: elementIds.bottomDialog, role: "dialog", children: _jsx(ErrorBoundary, { children: bottomDialog }) }), _jsxs("div", { id: elementIds.backdrop, children: [_jsx("div", { id: elementIds.rightPanel, "aria-modal": true, role: "dialog", children: _jsx(ErrorBoundary, { children: rightPanel.length === 1 && !rightPanel[0].stack
59
+ ? rightPanel[0].element
60
+ : rightPanel.map((m, i) => _jsx("div", { className: listToClass([
61
+ 'right-panel-instance',
62
+ (i === rightPanel.length - 1) && 'active',
63
+ modal.length > 0 && 'disabled',
64
+ ]), ...(modal.length > 0 ? { inert: true } : {}), children: m.element }, i)) }) }), _jsx("div", { id: elementIds.modal, "aria-modal": true, role: "dialog", children: _jsx(ErrorBoundary, { children: modal.length === 1 && !modal[0].stack
65
+ ? modal[0].element
66
+ : modal.map((m, i) => _jsx("div", { className: listToClass(['modal-instance', (i === modal.length - 1) && 'active']), children: m.element }, i)) }) })] }), _jsx(Toaster, {}), _jsx("div", { id: elementIds.accessibilityAnnouncer, "aria-atomic": true, "aria-live": "assertive" })] })] }));
51
67
  };
52
68
  const MenuContentRenderer = ({ content }) => {
53
69
  const menuContent = typeof content === 'function' ? content() : content;
54
70
  return _jsx(MenuContent, { ...menuContent });
55
71
  };
72
+ const hasInnerContent = (menu) => 'innerContent' in menu;
56
73
  /**
57
74
  * Renders the layout with a menu and header that follow the config objects passed as parameter.
58
75
  * @param props the component's props {@link Props}.
59
76
  */
60
77
  export const Layout = ({ menu, header, children, extra, errorDescriptor, onError, className, style }) => (_jsx(RawLayout, { header: _jsx(Header, { ...header }), menuSections: menu.sections ? _jsx(MenuSections, { ...menu }) : undefined, menuContent: menu.content
61
78
  ? _jsx(MenuContentRenderer, { content: menu.content }, 'contentKey' in menu ? menu.contentKey : undefined)
79
+ : undefined, menuInnerContent: hasInnerContent(menu) && menu.innerContent
80
+ ? _jsx(MenuContentRenderer, { content: menu.innerContent }, 'contentKey' in menu ? menu.contentKey : undefined)
62
81
  : undefined, errorDescriptor: errorDescriptor, onError: onError, extra: extra, className: className, style: style, children: children }));
63
82
  //# sourceMappingURL=Layout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Layout.js","sourceRoot":"","sources":["../src/Layout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAA;AAC7E,OAAO,EAAE,kBAAkB,EAAa,MAAM,0BAA0B,CAAA;AACxE,OAAO,yCAAyC,CAAA;AAChD,OAAO,EAA2B,SAAS,EAAE,MAAM,OAAO,CAAA;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAe,MAAM,qBAAqB,CAAA;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,EAA+B,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAA;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;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,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,YAEX,QAAQ,GACC,CACb,CAAA"}
@@ -12,6 +12,10 @@ interface AlertOptions extends Omit<DialogOptions, 'cancel'> {
12
12
  }
13
13
  type BottomDialogOptions = Omit<DialogOptions, 'title'>;
14
14
  interface CustomModalOptions {
15
+ /**
16
+ * An optional, unique identifier for this modal.
17
+ */
18
+ id?: string;
15
19
  /**
16
20
  * The size of the modal.
17
21
  */
@@ -25,8 +29,23 @@ interface CustomModalOptions {
25
29
  * @default true
26
30
  */
27
31
  ignoreFirstFocusOnCloseButton?: boolean;
32
+ /**
33
+ * If true, instead of replacing the previously opened modal (if any), it will open on top of it (stacked).
34
+ *
35
+ * When a modal is stacked on top of another:
36
+ * - Closing the modal, closes all opened modals.
37
+ * - Popping the modal, closes only the modal at the top of the stack.
38
+ * - Only the modal at the top of the stack can be interacted with.
39
+ *
40
+ * @default false
41
+ */
42
+ stack?: boolean;
28
43
  }
29
44
  interface CustomRightPanelOptions {
45
+ /**
46
+ * An optional, unique identifier for this right panel.
47
+ */
48
+ id?: string;
30
49
  /**
31
50
  * The size of the right panel.
32
51
  */
@@ -35,16 +54,33 @@ interface CustomRightPanelOptions {
35
54
  * A function to call when the right panel closes.
36
55
  */
37
56
  onClose?: () => void;
57
+ /**
58
+ * Property that defines whether the modal should ignore the initial focus on the close button.
59
+ * @default true
60
+ */
61
+ ignoreFirstFocusOnCloseButton?: boolean;
62
+ /**
63
+ * If true, instead of replacing the previously opened right panel (if any), it will open on top of it (stacked).
64
+ *
65
+ * When a right panel is stacked on top of another:
66
+ * - Closing the panel, closes all opened panels.
67
+ * - Popping the panel, closes only the panel at the top of the stack.
68
+ * - Only the panel at the top of the stack can be interacted with.
69
+ *
70
+ * @default false
71
+ */
72
+ stack?: boolean;
38
73
  }
39
74
  declare class LayoutOverlayManager {
40
75
  static readonly instance?: LayoutOverlayManager;
41
76
  private setContent;
42
77
  private elements?;
43
- private onModalClose?;
44
78
  /**
45
79
  * Last element with focus before an overlay is shown.
46
80
  */
47
81
  private lastActiveElement;
82
+ private modals;
83
+ private panels;
48
84
  private closeCustomBackdrops;
49
85
  private onClickBackdrop;
50
86
  private onPressKeyInBackdrop;
@@ -79,6 +115,14 @@ declare class LayoutOverlayManager {
79
115
  * @returns true if the modal is currently opened. False otherwise.
80
116
  */
81
117
  isModalOpen(): boolean;
118
+ /**
119
+ * @returns the number of modals currently tracked.
120
+ */
121
+ getNumberOfOpenModals(): number;
122
+ /**
123
+ * @returns the number of right panels currently tracked.
124
+ */
125
+ getNumberOfOpenRightPanels(): number;
82
126
  /**
83
127
  * @returns true if the right panel is currently opened. False otherwise.
84
128
  */
@@ -96,7 +140,7 @@ declare class LayoutOverlayManager {
96
140
  * @param content a react element with the modal content.
97
141
  * @param options the modal options {@link CustomModalOptions}.
98
142
  */
99
- showCustomModal(content: React.ReactElement, { size, onClose, ignoreFirstFocusOnCloseButton }?: CustomModalOptions): void;
143
+ showCustomModal(content: React.ReactElement, { size, onClose, ignoreFirstFocusOnCloseButton, stack, id }?: CustomModalOptions): void;
100
144
  /**
101
145
  * Opens a modal.
102
146
  *
@@ -105,10 +149,9 @@ declare class LayoutOverlayManager {
105
149
  *
106
150
  * @param options the modal options: {@link OverlayContentProps} & { size: {@link ModalSize} }.
107
151
  */
108
- showModal({ size, ignoreFirstFocusOnCloseButton, ...props }: OverlayContentProps & {
152
+ showModal({ size, ignoreFirstFocusOnCloseButton, stack, onGoBack, id, ...props }: OverlayContentProps & {
109
153
  size?: ModalSize;
110
- ignoreFirstFocusOnCloseButton?: boolean;
111
- }): void;
154
+ } & Pick<CustomModalOptions, 'ignoreFirstFocusOnCloseButton' | 'stack' | 'id'>): void;
112
155
  private showDialog;
113
156
  /**
114
157
  * Shows a confirmation dialog and returns a promise that resolves as soon as the dialog is closed. The result of the promise is true if
@@ -149,7 +192,7 @@ declare class LayoutOverlayManager {
149
192
  * @param content a react element with the modal content.
150
193
  * @param options the modal options {@link CustomModalOptions}.
151
194
  */
152
- showCustomRightPanel(content: ReactElement, { size, onClose }?: CustomRightPanelOptions): void;
195
+ showCustomRightPanel(content: ReactElement, { size, onClose, ignoreFirstFocusOnCloseButton, stack, id }?: CustomRightPanelOptions): void;
153
196
  /**
154
197
  * Opens a right panel.
155
198
  *
@@ -158,21 +201,44 @@ declare class LayoutOverlayManager {
158
201
  *
159
202
  * @param options the modal options: {@link OverlayContentProps} & { size: {@link ModalSize} }.
160
203
  */
161
- showRightPanel({ size, ...props }: OverlayContentProps & {
162
- size?: RightPanelSize;
163
- }): void;
204
+ showRightPanel({ size, ignoreFirstFocusOnCloseButton, stack, onGoBack, id, ...props }: OverlayContentProps & Pick<CustomRightPanelOptions, 'size' | 'ignoreFirstFocusOnCloseButton' | 'stack' | 'id'>): void;
164
205
  private focusLastActiveElement;
165
206
  /**
166
- * Closes the modal if it's open.
207
+ * Closes all opened modals.
167
208
  * @param runCloseListener whether or not to run the function `onClose` passed to `showModal` or `showCustomModal`. Defaults to true.
168
209
  */
169
210
  closeModal(runCloseListener?: boolean): void;
170
211
  /**
171
- * Closes the right panel if it's open.
212
+ * Closes the top-most modal in the stack. Will behave like `closeModal` if only a single modal exists in the stack.
213
+ * @param amount number of modals to pop. Defaults to 1.
214
+ * @param runCloseListener whether or not to run the function `onClose` passed to `showModal` or `showCustomModal`. Defaults to true.
215
+ */
216
+ popModal(amount?: number, runCloseListener?: boolean): void;
217
+ /**
218
+ * Close all modals in the stack of modal until the modal with the given id is found. If no modal with the given id is found, nothing
219
+ * happens.
220
+ * @param id the id of the modal to pop to.
221
+ * @param inclusive when true, the modal with the given id is also popped. Defaults to false.
222
+ */
223
+ popModalTo(id: string, inclusive?: boolean): void;
224
+ /**
225
+ * Closes all opened right panels.
172
226
  * @param runCloseListener whether or not to run the function `onClose` passed to `showRightPanel` or `showCustomRightPanel`. Defaults to
173
227
  * true.
174
228
  */
175
229
  closeRightPanel(runCloseListener?: boolean): void;
230
+ /**
231
+ * Closes the top-most modal in the stack. Will behave like `closeModal` if only a single modal exists in the stack.
232
+ * @param runCloseListener whether or not to run the function `onClose` passed to `showModal` or `showCustomModal`. Defaults to true.
233
+ */
234
+ popRightPanel(amount?: number, runCloseListener?: boolean): void;
235
+ /**
236
+ * Close all right panels in the stack of panels until the panel with the given id is found. If no panel with the given id is found,
237
+ * nothing happens.
238
+ * @param id the id of the right panel to pop to.
239
+ * @param inclusive when true, the right panel with the given id is also popped. Defaults to false.
240
+ */
241
+ popRightPanelTo(id: string, inclusive?: boolean): void;
176
242
  /**
177
243
  * Closes the bottom dialog if it's open.
178
244
  */
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutOverlayManager.d.ts","sourceRoot":"","sources":["../src/LayoutOverlayManager.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAA6B,MAAM,OAAO,CAAA;AAC/D,OAAO,EAAU,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,EAAoC,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAInG,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,iBAAiB,EAAmC,MAAM,WAAW,CAAA;AAC3H,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAGpE,UAAU,YAAa,SAAQ,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC;IAC1D;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,KAAK,mBAAmB,GAAG,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,CAAA;AASvD,UAAU,kBAAkB;IAC1B;;OAEG;IACH,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,6BAA6B,CAAC,EAAE,OAAO,CAAC;CACzC;AAED,UAAU,uBAAuB;IAC/B;;OAEG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;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