@cloudscape-design/components 3.0.1061 → 3.0.1063

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 (134) hide show
  1. package/app-layout/utils/use-focus-control.d.ts +2 -1
  2. package/app-layout/utils/use-focus-control.d.ts.map +1 -1
  3. package/app-layout/utils/use-focus-control.js +66 -6
  4. package/app-layout/utils/use-focus-control.js.map +1 -1
  5. package/app-layout/utils/use-split-panel-focus-control.d.ts.map +1 -1
  6. package/app-layout/utils/use-split-panel-focus-control.js +15 -13
  7. package/app-layout/utils/use-split-panel-focus-control.js.map +1 -1
  8. package/app-layout/visual-refresh-toolbar/index.d.ts.map +1 -1
  9. package/app-layout/visual-refresh-toolbar/index.js +37 -350
  10. package/app-layout/visual-refresh-toolbar/index.js.map +1 -1
  11. package/app-layout/visual-refresh-toolbar/interfaces.d.ts +21 -1
  12. package/app-layout/visual-refresh-toolbar/interfaces.d.ts.map +1 -1
  13. package/app-layout/visual-refresh-toolbar/interfaces.js.map +1 -1
  14. package/app-layout/visual-refresh-toolbar/internal.d.ts +24 -1
  15. package/app-layout/visual-refresh-toolbar/internal.d.ts.map +1 -1
  16. package/app-layout/visual-refresh-toolbar/internal.js +13 -0
  17. package/app-layout/visual-refresh-toolbar/internal.js.map +1 -1
  18. package/app-layout/visual-refresh-toolbar/navigation/index.js +1 -1
  19. package/app-layout/visual-refresh-toolbar/navigation/index.js.map +1 -1
  20. package/app-layout/visual-refresh-toolbar/notifications/index.js +2 -2
  21. package/app-layout/visual-refresh-toolbar/notifications/index.js.map +1 -1
  22. package/app-layout/visual-refresh-toolbar/skeleton/index.d.ts +17 -16
  23. package/app-layout/visual-refresh-toolbar/skeleton/index.d.ts.map +1 -1
  24. package/app-layout/visual-refresh-toolbar/skeleton/index.js +21 -30
  25. package/app-layout/visual-refresh-toolbar/skeleton/index.js.map +1 -1
  26. package/app-layout/visual-refresh-toolbar/skeleton/interfaces.d.ts +20 -0
  27. package/app-layout/visual-refresh-toolbar/skeleton/interfaces.d.ts.map +1 -0
  28. package/app-layout/visual-refresh-toolbar/skeleton/interfaces.js +2 -0
  29. package/app-layout/visual-refresh-toolbar/skeleton/interfaces.js.map +1 -0
  30. package/app-layout/visual-refresh-toolbar/skeleton/multi-layout.d.ts +7 -0
  31. package/app-layout/visual-refresh-toolbar/skeleton/multi-layout.d.ts.map +1 -0
  32. package/app-layout/visual-refresh-toolbar/skeleton/multi-layout.js +41 -0
  33. package/app-layout/visual-refresh-toolbar/skeleton/multi-layout.js.map +1 -0
  34. package/app-layout/visual-refresh-toolbar/skeleton/{slot-skeletons.d.ts → skeleton-parts.d.ts} +8 -0
  35. package/app-layout/visual-refresh-toolbar/skeleton/skeleton-parts.d.ts.map +1 -0
  36. package/app-layout/visual-refresh-toolbar/skeleton/skeleton-parts.js +21 -0
  37. package/app-layout/visual-refresh-toolbar/skeleton/skeleton-parts.js.map +1 -0
  38. package/app-layout/visual-refresh-toolbar/skeleton/{slot-wrappers.d.ts → slots.d.ts} +9 -0
  39. package/app-layout/visual-refresh-toolbar/skeleton/slots.d.ts.map +1 -0
  40. package/app-layout/visual-refresh-toolbar/skeleton/{breadcrumbs/index.js → slots.js} +6 -3
  41. package/app-layout/visual-refresh-toolbar/skeleton/slots.js.map +1 -0
  42. package/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +23 -21
  43. package/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +42 -37
  44. package/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +23 -21
  45. package/app-layout/visual-refresh-toolbar/state/index.d.ts +29 -0
  46. package/app-layout/visual-refresh-toolbar/state/index.d.ts.map +1 -0
  47. package/app-layout/visual-refresh-toolbar/state/index.js +27 -0
  48. package/app-layout/visual-refresh-toolbar/state/index.js.map +1 -0
  49. package/app-layout/visual-refresh-toolbar/{multi-layout.d.ts → state/interfaces.d.ts} +11 -16
  50. package/app-layout/visual-refresh-toolbar/state/interfaces.d.ts.map +1 -0
  51. package/app-layout/visual-refresh-toolbar/state/interfaces.js +2 -0
  52. package/app-layout/visual-refresh-toolbar/state/interfaces.js.map +1 -0
  53. package/app-layout/visual-refresh-toolbar/state/invariants.d.ts +2 -0
  54. package/app-layout/visual-refresh-toolbar/state/invariants.d.ts.map +1 -0
  55. package/app-layout/visual-refresh-toolbar/state/invariants.js +4 -0
  56. package/app-layout/visual-refresh-toolbar/state/invariants.js.map +1 -0
  57. package/app-layout/visual-refresh-toolbar/state/props-merger.d.ts +4 -0
  58. package/app-layout/visual-refresh-toolbar/state/props-merger.d.ts.map +1 -0
  59. package/app-layout/visual-refresh-toolbar/{multi-layout.js → state/props-merger.js} +28 -40
  60. package/app-layout/visual-refresh-toolbar/state/props-merger.js.map +1 -0
  61. package/app-layout/visual-refresh-toolbar/state/use-app-layout.d.ts +31 -0
  62. package/app-layout/visual-refresh-toolbar/state/use-app-layout.d.ts.map +1 -0
  63. package/app-layout/visual-refresh-toolbar/state/use-app-layout.js +322 -0
  64. package/app-layout/visual-refresh-toolbar/state/use-app-layout.js.map +1 -0
  65. package/app-layout/visual-refresh-toolbar/state/use-skeleton-slots-attributes.d.ts +3 -0
  66. package/app-layout/visual-refresh-toolbar/state/use-skeleton-slots-attributes.d.ts.map +1 -0
  67. package/app-layout/visual-refresh-toolbar/state/use-skeleton-slots-attributes.js +59 -0
  68. package/app-layout/visual-refresh-toolbar/state/use-skeleton-slots-attributes.js.map +1 -0
  69. package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.d.ts +2 -2
  70. package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.d.ts.map +1 -1
  71. package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js.map +1 -1
  72. package/app-layout/visual-refresh-toolbar/toolbar/index.d.ts.map +1 -1
  73. package/app-layout/visual-refresh-toolbar/toolbar/index.js +2 -3
  74. package/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
  75. package/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.d.ts +13 -0
  76. package/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.d.ts.map +1 -0
  77. package/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.js +29 -0
  78. package/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.js.map +1 -0
  79. package/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.d.ts +16 -0
  80. package/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.d.ts.map +1 -0
  81. package/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.js +28 -0
  82. package/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.js.map +1 -0
  83. package/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.d.ts +13 -0
  84. package/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.d.ts.map +1 -0
  85. package/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.js +17 -0
  86. package/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.js.map +1 -0
  87. package/app-layout/visual-refresh-toolbar/widget-areas/top-content-slot.d.ts +13 -0
  88. package/app-layout/visual-refresh-toolbar/widget-areas/top-content-slot.d.ts.map +1 -0
  89. package/app-layout/visual-refresh-toolbar/widget-areas/top-content-slot.js +19 -0
  90. package/app-layout/visual-refresh-toolbar/widget-areas/top-content-slot.js.map +1 -0
  91. package/breadcrumb-group/internal.d.ts +2 -1
  92. package/breadcrumb-group/internal.d.ts.map +1 -1
  93. package/breadcrumb-group/internal.js +3 -2
  94. package/breadcrumb-group/internal.js.map +1 -1
  95. package/button/internal.d.ts.map +1 -1
  96. package/button/internal.js +3 -26
  97. package/button/internal.js.map +1 -1
  98. package/button/style.d.ts +7 -0
  99. package/button/style.d.ts.map +1 -0
  100. package/button/style.js +33 -0
  101. package/button/style.js.map +1 -0
  102. package/internal/base-component/styles.scoped.css +1 -1
  103. package/internal/environment.js +2 -2
  104. package/internal/environment.json +2 -2
  105. package/internal/manifest.json +1 -1
  106. package/internal/types.d.ts +9 -0
  107. package/internal/types.d.ts.map +1 -1
  108. package/internal/types.js.map +1 -1
  109. package/internal/widget-exports.d.ts +5 -0
  110. package/internal/widget-exports.d.ts.map +1 -1
  111. package/internal/widget-exports.js +7 -0
  112. package/internal/widget-exports.js.map +1 -1
  113. package/internal/widgets/index.d.ts +3 -4
  114. package/internal/widgets/index.d.ts.map +1 -1
  115. package/internal/widgets/index.js.map +1 -1
  116. package/internal/widgets/loader-mock.d.ts +2 -0
  117. package/internal/widgets/loader-mock.d.ts.map +1 -0
  118. package/internal/widgets/loader-mock.js +43 -0
  119. package/internal/widgets/loader-mock.js.map +1 -0
  120. package/package.json +1 -1
  121. package/app-layout/visual-refresh-toolbar/multi-layout.d.ts.map +0 -1
  122. package/app-layout/visual-refresh-toolbar/multi-layout.js.map +0 -1
  123. package/app-layout/visual-refresh-toolbar/skeleton/breadcrumbs/index.d.ts +0 -11
  124. package/app-layout/visual-refresh-toolbar/skeleton/breadcrumbs/index.d.ts.map +0 -1
  125. package/app-layout/visual-refresh-toolbar/skeleton/breadcrumbs/index.js.map +0 -1
  126. package/app-layout/visual-refresh-toolbar/skeleton/breadcrumbs/styles.css.js +0 -7
  127. package/app-layout/visual-refresh-toolbar/skeleton/breadcrumbs/styles.scoped.css +0 -7
  128. package/app-layout/visual-refresh-toolbar/skeleton/breadcrumbs/styles.selectors.js +0 -8
  129. package/app-layout/visual-refresh-toolbar/skeleton/slot-skeletons.d.ts.map +0 -1
  130. package/app-layout/visual-refresh-toolbar/skeleton/slot-skeletons.js +0 -9
  131. package/app-layout/visual-refresh-toolbar/skeleton/slot-skeletons.js.map +0 -1
  132. package/app-layout/visual-refresh-toolbar/skeleton/slot-wrappers.d.ts.map +0 -1
  133. package/app-layout/visual-refresh-toolbar/skeleton/slot-wrappers.js +0 -8
  134. package/app-layout/visual-refresh-toolbar/skeleton/slot-wrappers.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-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CACpC,EAElC,eAAe,EAAE,CAAC,CAAC,sBAAsB,CAAC,MAAM,EAChD,SAAS,EAAE,CAAC,CAAC,YAAY,EACzB,UAAU,EAAE,gBAAgB,EAC5B,cAAc,EACZ,kBAAkB,KAAK,MAAM,IAAI,CAC/B,oBAAC,uBAAuB,IACtB,kBAAkB,EAAE,kBAAkB,EACtC,mBAAmB,EAAE,mBAAmB,IAEvC,UAAU,CACa,CAC3B,EAEH,gBAAgB,EACd,kBAAkB,KAAK,QAAQ,IAAI,CACjC,oBAAC,yBAAyB,IACxB,kBAAkB,EAAE,kBAAkB,EACtC,mBAAmB,EAAE,mBAAmB,IAEvC,UAAU,CACe,CAC7B,EAEH,cAAc,EAAE,cAAc,EAC9B,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,eAAe,EAChC,sBAAsB,EAAE,sBAAsB,GAC9C,CACkC,CACvC,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,6BAA6B,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useImperativeHandle, useLayoutEffect, useRef, useState } from 'react';\n\nimport { useMergeRefs, useStableCallback, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport ScreenreaderOnly from '../../internal/components/screenreader-only';\nimport { SplitPanelSideToggleProps } from '../../internal/context/split-panel-context';\nimport { fireNonCancelableEvent } from '../../internal/events';\nimport { useControllable } from '../../internal/hooks/use-controllable';\nimport { useIntersectionObserver } from '../../internal/hooks/use-intersection-observer';\nimport { useMobile } from '../../internal/hooks/use-mobile';\nimport { useGetGlobalBreadcrumbs } from '../../internal/plugins/helpers/use-global-breadcrumbs';\nimport globalVars from '../../internal/styles/global-vars';\nimport { getSplitPanelDefaultSize } from '../../split-panel/utils/size-utils';\nimport { AppLayoutProps } from '../interfaces';\nimport { SplitPanelProviderProps } from '../split-panel';\nimport { MIN_DRAWER_SIZE, OnChangeParams, useDrawers } from '../utils/use-drawers';\nimport { useFocusControl, useMultipleFocusControl } from '../utils/use-focus-control';\nimport { useGlobalScrollPadding } from '../utils/use-global-scroll-padding';\nimport { useSplitPanelFocusControl } from '../utils/use-split-panel-focus-control';\nimport { ActiveDrawersContext } from '../utils/visibility-context';\nimport {\n computeHorizontalLayout,\n computeSplitPanelOffsets,\n computeVerticalLayout,\n CONTENT_PADDING,\n} from './compute-layout';\nimport { AppLayoutVisibilityContext } from './contexts';\nimport { AppLayoutInternalProps, AppLayoutInternals } from './interfaces';\nimport {\n AppLayoutDrawer,\n AppLayoutGlobalDrawers,\n AppLayoutNavigation,\n AppLayoutNotifications,\n AppLayoutSplitPanelBottom,\n AppLayoutSplitPanelSide,\n AppLayoutToolbar,\n} from './internal';\nimport { useMultiAppLayout } from './multi-layout';\nimport { SkeletonLayout } from './skeleton';\n\nconst AppLayoutVisualRefreshToolbar = React.forwardRef<AppLayoutProps.Ref, AppLayoutInternalProps>(\n (\n {\n ariaLabels,\n contentHeader,\n content,\n navigationOpen,\n navigationWidth,\n navigation,\n navigationHide,\n onNavigationChange,\n tools,\n toolsOpen: controlledToolsOpen,\n onToolsChange,\n toolsHide,\n toolsWidth,\n contentType,\n headerVariant,\n breadcrumbs,\n notifications,\n stickyNotifications,\n splitPanelPreferences: controlledSplitPanelPreferences,\n splitPanelOpen: controlledSplitPanelOpen,\n splitPanel,\n splitPanelSize: controlledSplitPanelSize,\n onSplitPanelToggle,\n onSplitPanelResize,\n onSplitPanelPreferencesChange,\n disableContentPaddings,\n minContentWidth,\n maxContentWidth,\n placement,\n navigationTriggerHide,\n ...rest\n },\n forwardRef\n ) => {\n const isMobile = useMobile();\n const { __embeddedViewMode: embeddedViewMode, __forceDeduplicationType: forceDeduplicationType } = rest as any;\n const splitPanelControlId = useUniqueId('split-panel');\n const [toolbarState, setToolbarState] = useState<'show' | 'hide'>('show');\n const [toolbarHeight, setToolbarHeight] = useState(0);\n const [notificationsHeight, setNotificationsHeight] = useState(0);\n const [navigationAnimationDisabled, setNavigationAnimationDisabled] = useState(true);\n const [splitPanelAnimationDisabled, setSplitPanelAnimationDisabled] = useState(true);\n const [isNested, setIsNested] = useState(false);\n const rootRef = useRef<HTMLDivElement>(null);\n\n const [toolsOpen = false, setToolsOpen] = useControllable(controlledToolsOpen, onToolsChange, false, {\n componentName: 'AppLayout',\n controlledProp: 'toolsOpen',\n changeHandler: 'onToolsChange',\n });\n const onToolsToggle = (open: boolean) => {\n setToolsOpen(open);\n drawersFocusControl.setFocus();\n fireNonCancelableEvent(onToolsChange, { open });\n };\n\n const onGlobalDrawerFocus = (drawerId: string, open: boolean) => {\n globalDrawersFocusControl.setFocus({ force: true, drawerId, open });\n };\n\n const onAddNewActiveDrawer = (drawerId: string) => {\n // If a local drawer is already open, and we attempt to open a new one,\n // it will replace the existing one instead of opening an additional drawer,\n // since only one local drawer is supported. Therefore, layout calculations are not necessary.\n if (activeDrawer && drawers?.find(drawer => drawer.id === drawerId)) {\n return;\n }\n // get the size of drawerId. it could be either local or global drawer\n const combinedDrawers = [...(drawers || []), ...globalDrawers];\n const newDrawer = combinedDrawers.find(drawer => drawer.id === drawerId);\n if (!newDrawer) {\n return;\n }\n const newDrawerSize = Math.min(\n newDrawer.defaultSize ?? drawerSizes[drawerId] ?? MIN_DRAWER_SIZE,\n MIN_DRAWER_SIZE\n );\n // check if the active drawers could be resized to fit the new drawers\n // to do this, we need to take all active drawers, sum up their min sizes, truncate it from resizableSpaceAvailable\n // and compare a given number with the new drawer id min size\n\n // the total size of all global drawers resized to their min size\n const availableSpaceForNewDrawer = resizableSpaceAvailable - totalActiveDrawersMinSize;\n if (availableSpaceForNewDrawer >= newDrawerSize) {\n return;\n }\n\n // now we made sure we cannot accommodate the new drawer with existing ones\n closeFirstDrawer();\n };\n\n const {\n drawers,\n activeDrawer,\n minDrawerSize,\n minGlobalDrawersSizes,\n activeDrawerSize,\n ariaLabelsWithDrawers,\n globalDrawers,\n activeGlobalDrawers,\n activeGlobalDrawersIds,\n activeGlobalDrawersSizes,\n drawerSizes,\n drawersOpenQueue,\n onActiveDrawerChange,\n onActiveDrawerResize,\n onActiveGlobalDrawersChange,\n expandedDrawerId,\n setExpandedDrawerId,\n } = useDrawers({ ...rest, onGlobalDrawerFocus, onAddNewActiveDrawer }, ariaLabels, {\n ariaLabels,\n toolsHide,\n toolsOpen,\n tools,\n toolsWidth,\n onToolsToggle,\n });\n\n const onActiveDrawerChangeHandler = (\n drawerId: string | null,\n params: OnChangeParams = { initiatedByUserAction: true }\n ) => {\n onActiveDrawerChange(drawerId, params);\n drawersFocusControl.setFocus();\n };\n\n const [splitPanelOpen = false, setSplitPanelOpen] = useControllable(\n controlledSplitPanelOpen,\n onSplitPanelToggle,\n false,\n {\n componentName: 'AppLayout',\n controlledProp: 'splitPanelOpen',\n changeHandler: 'onSplitPanelToggle',\n }\n );\n\n const onSplitPanelToggleHandler = () => {\n setSplitPanelAnimationDisabled(false);\n setSplitPanelOpen(!splitPanelOpen);\n splitPanelFocusControl.setLastInteraction({ type: splitPanelOpen ? 'close' : 'open' });\n fireNonCancelableEvent(onSplitPanelToggle, { open: !splitPanelOpen });\n };\n\n const [splitPanelPreferences, setSplitPanelPreferences] = useControllable(\n controlledSplitPanelPreferences,\n onSplitPanelPreferencesChange,\n undefined,\n {\n componentName: 'AppLayout',\n controlledProp: 'splitPanelPreferences',\n changeHandler: 'onSplitPanelPreferencesChange',\n }\n );\n\n const onSplitPanelPreferencesChangeHandler = (detail: AppLayoutProps.SplitPanelPreferences) => {\n setSplitPanelPreferences(detail);\n splitPanelFocusControl.setLastInteraction({ type: 'position' });\n fireNonCancelableEvent(onSplitPanelPreferencesChange, detail);\n };\n\n const [splitPanelSize = 0, setSplitPanelSize] = useControllable(\n controlledSplitPanelSize,\n onSplitPanelResize,\n getSplitPanelDefaultSize(splitPanelPreferences?.position ?? 'bottom'),\n { componentName: 'AppLayout', controlledProp: 'splitPanelSize', changeHandler: 'onSplitPanelResize' }\n );\n\n const [splitPanelReportedSize, setSplitPanelReportedSize] = useState(0);\n const [splitPanelHeaderBlockSize, setSplitPanelHeaderBlockSize] = useState(0);\n\n const onSplitPanelResizeHandler = (size: number) => {\n setSplitPanelSize(size);\n fireNonCancelableEvent(onSplitPanelResize, { size });\n };\n\n const [splitPanelToggleConfig, setSplitPanelToggleConfig] = useState<SplitPanelSideToggleProps>({\n ariaLabel: undefined,\n displayed: false,\n });\n\n const globalDrawersFocusControl = useMultipleFocusControl(true, activeGlobalDrawersIds);\n const drawersFocusControl = useFocusControl(!!activeDrawer?.id, true, activeDrawer?.id);\n const navigationFocusControl = useFocusControl(navigationOpen, navigationTriggerHide);\n const splitPanelFocusControl = useSplitPanelFocusControl([splitPanelPreferences, splitPanelOpen]);\n\n const onNavigationToggle = useStableCallback((open: boolean) => {\n setNavigationAnimationDisabled(false);\n navigationFocusControl.setFocus();\n fireNonCancelableEvent(onNavigationChange, { open });\n });\n\n useImperativeHandle(forwardRef, () => ({\n closeNavigationIfNecessary: () => isMobile && onNavigationToggle(false),\n openTools: () => onToolsToggle(true),\n focusToolsClose: () => drawersFocusControl.setFocus(true),\n focusActiveDrawer: () => drawersFocusControl.setFocus(true),\n focusSplitPanel: () => splitPanelFocusControl.refs.slider.current?.focus(),\n focusNavigation: () => navigationFocusControl.setFocus(true),\n }));\n\n const resolvedStickyNotifications = !!stickyNotifications && !isMobile;\n //navigation must be null if hidden so toolbar knows to hide the toggle button\n const resolvedNavigation = navigationHide ? null : navigation || <></>;\n //navigation must not be open if navigationHide is true\n const resolvedNavigationOpen = !!resolvedNavigation && navigationOpen;\n const {\n maxDrawerSize,\n maxSplitPanelSize,\n splitPanelForcedPosition,\n splitPanelPosition,\n maxGlobalDrawersSizes,\n resizableSpaceAvailable,\n } = computeHorizontalLayout({\n activeDrawerSize: activeDrawer ? activeDrawerSize : 0,\n splitPanelSize,\n minContentWidth,\n navigationOpen: resolvedNavigationOpen,\n navigationWidth,\n placement,\n splitPanelOpen,\n splitPanelPosition: splitPanelPreferences?.position,\n isMobile,\n activeGlobalDrawersSizes,\n });\n\n const { ref: intersectionObserverRef, isIntersecting } = useIntersectionObserver({ initialState: true });\n const { registered, toolbarProps } = useMultiAppLayout(\n {\n forceDeduplicationType,\n ariaLabels: ariaLabelsWithDrawers,\n navigation: resolvedNavigation && !navigationTriggerHide,\n navigationOpen: resolvedNavigationOpen,\n onNavigationToggle,\n navigationFocusRef: navigationFocusControl.refs.toggle,\n breadcrumbs,\n activeDrawerId: activeDrawer?.id ?? null,\n // only pass it down if there are non-empty drawers or tools\n drawers: drawers?.length || !toolsHide ? drawers : undefined,\n globalDrawersFocusControl,\n globalDrawers: globalDrawers?.length ? globalDrawers : undefined,\n activeGlobalDrawersIds,\n onActiveGlobalDrawersChange,\n onActiveDrawerChange: onActiveDrawerChangeHandler,\n drawersFocusRef: drawersFocusControl.refs.toggle,\n splitPanel,\n splitPanelToggleProps: {\n ...splitPanelToggleConfig,\n active: splitPanelOpen,\n controlId: splitPanelControlId,\n position: splitPanelPosition,\n },\n splitPanelFocusRef: splitPanelFocusControl.refs.toggle,\n onSplitPanelToggle: onSplitPanelToggleHandler,\n expandedDrawerId,\n setExpandedDrawerId,\n },\n isIntersecting\n );\n\n const hasToolbar = !embeddedViewMode && !!toolbarProps;\n const discoveredBreadcrumbs = useGetGlobalBreadcrumbs(hasToolbar && !breadcrumbs);\n\n const verticalOffsets = computeVerticalLayout({\n topOffset: placement.insetBlockStart,\n hasVisibleToolbar: hasToolbar && toolbarState !== 'hide',\n notificationsHeight: notificationsHeight ?? 0,\n toolbarHeight: toolbarHeight ?? 0,\n stickyNotifications: resolvedStickyNotifications,\n });\n\n useGlobalScrollPadding(verticalOffsets.header);\n\n const appLayoutInternals: AppLayoutInternals = {\n ariaLabels: ariaLabelsWithDrawers,\n headerVariant,\n isMobile,\n breadcrumbs,\n discoveredBreadcrumbs,\n stickyNotifications: resolvedStickyNotifications,\n navigationOpen: resolvedNavigationOpen,\n navigation: resolvedNavigation,\n navigationFocusControl,\n activeDrawer,\n activeDrawerSize,\n minDrawerSize,\n maxDrawerSize,\n minGlobalDrawersSizes,\n maxGlobalDrawersSizes,\n drawers: drawers!,\n globalDrawers,\n activeGlobalDrawers,\n activeGlobalDrawersIds,\n activeGlobalDrawersSizes,\n onActiveGlobalDrawersChange,\n drawersFocusControl,\n globalDrawersFocusControl,\n splitPanelPosition,\n splitPanelToggleConfig,\n splitPanelOpen,\n splitPanelControlId,\n splitPanelFocusControl,\n placement,\n toolbarState,\n setToolbarState,\n verticalOffsets,\n drawersOpenQueue,\n setToolbarHeight,\n setNotificationsHeight,\n onSplitPanelToggle: onSplitPanelToggleHandler,\n onNavigationToggle,\n onActiveDrawerChange: onActiveDrawerChangeHandler,\n onActiveDrawerResize,\n splitPanelAnimationDisabled,\n expandedDrawerId,\n setExpandedDrawerId,\n };\n\n const splitPanelInternals: SplitPanelProviderProps = {\n bottomOffset: 0,\n getMaxHeight: () => {\n const availableHeight =\n document.documentElement.clientHeight - placement.insetBlockStart - placement.insetBlockEnd;\n // If the page is likely zoomed in at 200%, allow the split panel to fill the content area.\n return availableHeight < 400 ? availableHeight - 40 : availableHeight - 250;\n },\n maxWidth: maxSplitPanelSize,\n isForcedPosition: splitPanelForcedPosition,\n isOpen: splitPanelOpen,\n leftOffset: 0,\n onPreferencesChange: onSplitPanelPreferencesChangeHandler,\n onResize: onSplitPanelResizeHandler,\n onToggle: onSplitPanelToggleHandler,\n position: splitPanelPosition,\n reportSize: size => setSplitPanelReportedSize(size),\n reportHeaderHeight: size => setSplitPanelHeaderBlockSize(size),\n headerHeight: splitPanelHeaderBlockSize,\n rightOffset: 0,\n size: splitPanelSize,\n topOffset: 0,\n setSplitPanelToggle: setSplitPanelToggleConfig,\n refs: splitPanelFocusControl.refs,\n };\n\n const closeFirstDrawer = useStableCallback(() => {\n const drawerToClose = drawersOpenQueue[drawersOpenQueue.length - 1];\n if (activeDrawer && activeDrawer?.id === drawerToClose) {\n onActiveDrawerChange(null, { initiatedByUserAction: true });\n } else if (activeGlobalDrawersIds.includes(drawerToClose)) {\n onActiveGlobalDrawersChange(drawerToClose, { initiatedByUserAction: true });\n }\n });\n\n useEffect(() => {\n // Close navigation drawer on mobile so that the main content is visible\n if (isMobile) {\n onNavigationToggle(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isMobile]);\n\n const getTotalActiveDrawersMinSize = () => {\n const combinedDrawers = [...(drawers || []), ...globalDrawers];\n let result = activeGlobalDrawersIds\n .map(activeDrawerId =>\n Math.min(\n combinedDrawers.find(drawer => drawer.id === activeDrawerId)?.defaultSize ?? MIN_DRAWER_SIZE,\n MIN_DRAWER_SIZE\n )\n )\n .reduce((acc, curr) => acc + curr, 0);\n if (activeDrawer) {\n result += Math.min(activeDrawer?.defaultSize ?? MIN_DRAWER_SIZE, MIN_DRAWER_SIZE);\n }\n\n return result;\n };\n\n const totalActiveDrawersMinSize = getTotalActiveDrawersMinSize();\n\n useEffect(() => {\n if (isMobile) {\n return;\n }\n\n const activeNavigationWidth = !navigationHide && navigationOpen ? navigationWidth : 0;\n const scrollWidth = activeNavigationWidth + CONTENT_PADDING + totalActiveDrawersMinSize;\n const hasHorizontalScroll = scrollWidth > placement.inlineSize;\n if (hasHorizontalScroll) {\n if (!navigationHide && navigationOpen) {\n onNavigationToggle(false);\n return;\n }\n\n closeFirstDrawer();\n }\n }, [\n totalActiveDrawersMinSize,\n closeFirstDrawer,\n isMobile,\n navigationHide,\n navigationOpen,\n navigationWidth,\n onNavigationToggle,\n placement.inlineSize,\n ]);\n\n /**\n * Returns true if the AppLayout is nested\n * Does not apply to iframe\n */\n const getIsNestedInAppLayout = (element: HTMLElement | null): boolean => {\n let currentElement: Element | null = element?.parentElement ?? null;\n\n // this traverse is needed only for JSDOM\n // in real browsers the globalVar will be propagated to all descendants and this loops exits after initial iteration\n while (currentElement) {\n if (getComputedStyle(currentElement).getPropertyValue(globalVars.stickyVerticalTopOffset)) {\n return true;\n }\n currentElement = currentElement.parentElement;\n }\n\n return false;\n };\n\n useLayoutEffect(() => {\n if (!hasToolbar) {\n setIsNested(getIsNestedInAppLayout(rootRef.current));\n }\n }, [hasToolbar]);\n\n const splitPanelOffsets = computeSplitPanelOffsets({\n placement,\n hasSplitPanel: !!splitPanel,\n splitPanelOpen,\n splitPanelPosition,\n splitPanelFullHeight: splitPanelReportedSize,\n splitPanelHeaderHeight: splitPanelHeaderBlockSize,\n });\n\n return (\n <AppLayoutVisibilityContext.Provider value={isIntersecting}>\n {/* Rendering a hidden copy of breadcrumbs to trigger their deduplication */}\n {!hasToolbar && breadcrumbs ? <ScreenreaderOnly>{breadcrumbs}</ScreenreaderOnly> : null}\n <SkeletonLayout\n ref={useMergeRefs(intersectionObserverRef, rootRef)}\n isNested={isNested}\n // Why not use drawerExpandedMode={!!expandedDrawerId || !!toolbarProps?.expandedDrawerId} instead?\n // Because in nested layouts, the parent layout hides its main content area,\n // which means the child layout isn't rendered at all in that case\n drawerExpandedModeInChildLayout={!!toolbarProps?.expandedDrawerId}\n drawerExpandedMode={!!expandedDrawerId}\n style={{\n paddingBlockEnd: splitPanelOffsets.mainContentPaddingBlockEnd,\n ...(hasToolbar || !isNested\n ? {\n [globalVars.stickyVerticalTopOffset]: `${verticalOffsets.header}px`,\n [globalVars.stickyVerticalBottomOffset]: `${splitPanelOffsets.stickyVerticalBottomOffset}px`,\n }\n : {}),\n ...(!isMobile ? { minWidth: `${minContentWidth}px` } : {}),\n }}\n toolbar={\n hasToolbar && <AppLayoutToolbar appLayoutInternals={appLayoutInternals} toolbarProps={toolbarProps} />\n }\n notifications={\n notifications && (\n <AppLayoutNotifications appLayoutInternals={appLayoutInternals}>{notifications}</AppLayoutNotifications>\n )\n }\n headerVariant={headerVariant}\n contentHeader={contentHeader}\n // delay rendering the content until registration of this instance is complete\n content={registered ? content : null}\n navigation={resolvedNavigation && <AppLayoutNavigation appLayoutInternals={appLayoutInternals} />}\n navigationOpen={resolvedNavigationOpen}\n navigationWidth={navigationWidth}\n navigationAnimationDisabled={navigationAnimationDisabled}\n tools={drawers && drawers.length > 0 && <AppLayoutDrawer appLayoutInternals={appLayoutInternals} />}\n globalTools={\n <ActiveDrawersContext.Provider value={activeGlobalDrawersIds}>\n <AppLayoutGlobalDrawers appLayoutInternals={appLayoutInternals} />\n </ActiveDrawersContext.Provider>\n }\n globalToolsOpen={!!activeGlobalDrawersIds.length}\n toolsOpen={!!activeDrawer}\n toolsWidth={activeDrawerSize}\n sideSplitPanel={\n splitPanelPosition === 'side' && (\n <AppLayoutSplitPanelSide\n appLayoutInternals={appLayoutInternals}\n splitPanelInternals={splitPanelInternals}\n >\n {splitPanel}\n </AppLayoutSplitPanelSide>\n )\n }\n bottomSplitPanel={\n splitPanelPosition === 'bottom' && (\n <AppLayoutSplitPanelBottom\n appLayoutInternals={appLayoutInternals}\n splitPanelInternals={splitPanelInternals}\n >\n {splitPanel}\n </AppLayoutSplitPanelBottom>\n )\n }\n splitPanelOpen={splitPanelOpen}\n placement={placement}\n contentType={contentType}\n maxContentWidth={maxContentWidth}\n disableContentPaddings={disableContentPaddings}\n />\n </AppLayoutVisibilityContext.Provider>\n );\n }\n);\n\nexport default AppLayoutVisualRefreshToolbar;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAEpD,OAAO,gBAAgB,MAAM,6CAA6C,CAAC;AAE3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAExD,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EA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AAK,EACrB,cAAc,EAAE,cAAc,EAC9B,uBAAuB,EAAE,kBAAkB,GAC3C,CACkC,CACvC,CACsB;QACzB,oBAAC,wBAAwB,IAAC,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,EAAE,YAAY,GAAI,CACtG,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,6BAA6B,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useLayoutEffect, useRef, useState } from 'react';\nimport { unstable_batchedUpdates } from 'react-dom';\n\nimport ScreenreaderOnly from '../../internal/components/screenreader-only';\nimport { AppLayoutProps } from '../interfaces';\nimport { AppLayoutVisibilityContext } from './contexts';\nimport { AppLayoutInternalProps, AppLayoutPendingState } from './interfaces';\nimport { AppLayoutWidgetizedState } from './internal';\nimport { SkeletonLayout } from './skeleton';\nimport { SkeletonSlotsAttributes } from './skeleton/interfaces';\nimport { DeduplicationType, useMultiAppLayout } from './skeleton/multi-layout';\nimport { StateManager } from './state';\nimport { getPropsToMerge, mergeProps } from './state/props-merger';\nimport { ToolbarProps } from './toolbar';\n\nconst AppLayoutStateProvider: React.FC<{\n forceDeduplicationType: DeduplicationType;\n appLayoutProps: AppLayoutInternalProps;\n stateManager: React.MutableRefObject<StateManager>;\n children: (\n registered: boolean,\n appLayoutState: AppLayoutPendingState,\n toolbarProps: ToolbarProps | null,\n skeletonAttributes: SkeletonSlotsAttributes\n ) => React.ReactNode;\n}> = ({ forceDeduplicationType, appLayoutProps, stateManager, children }) => {\n const [appLayoutState, setAppLayoutState] = useState<AppLayoutPendingState>({ isIntersecting: true });\n const [skeletonAttributes, setSkeletonAttributes] = useState<SkeletonSlotsAttributes>({});\n // use { fn: } object wrapper to avoid confusion with callback form of setState\n const [deduplicator, setDeduplicator] = useState({ fn: mergeProps });\n const [deduplicationProps, setDeduplicationProps] = useState(() => getPropsToMerge(appLayoutProps, appLayoutState));\n\n const { registered, toolbarProps } = useMultiAppLayout(\n forceDeduplicationType,\n appLayoutState.isIntersecting,\n deduplicationProps,\n deduplicator.fn\n );\n\n useLayoutEffect(() => {\n stateManager.current.setState = (appLayoutState, skeletonAttributes, deduplicationProps, mergeProps) => {\n unstable_batchedUpdates(() => {\n setAppLayoutState(appLayoutState);\n setSkeletonAttributes(skeletonAttributes);\n setDeduplicationProps(deduplicationProps);\n setDeduplicator({ fn: mergeProps });\n });\n };\n }, [stateManager]);\n\n const hasToolbar = !!toolbarProps;\n useEffect(() => {\n stateManager.current.hasToolbar = hasToolbar;\n stateManager.current.setToolbar?.(hasToolbar);\n }, [stateManager, hasToolbar]);\n\n return <>{children(registered, appLayoutState, toolbarProps, skeletonAttributes)}</>;\n};\n\nconst AppLayoutVisualRefreshToolbar = React.forwardRef<AppLayoutProps.Ref, AppLayoutInternalProps>(\n (props, forwardRef) => {\n const stateManager = useRef<StateManager>({ setState: undefined, hasToolbar: true, setToolbar: undefined });\n const { __forceDeduplicationType: forceDeduplicationType, __embeddedViewMode: embeddedViewMode } = props as any;\n\n return (\n <>\n <AppLayoutStateProvider\n forceDeduplicationType={forceDeduplicationType}\n appLayoutProps={props}\n stateManager={stateManager}\n >\n {(registered, appLayoutState, toolbarProps, skeletonAttributes) => (\n <AppLayoutVisibilityContext.Provider value={appLayoutState.isIntersecting}>\n {/* Rendering a hidden copy of breadcrumbs to trigger their deduplication */}\n {(embeddedViewMode || !toolbarProps) && props.breadcrumbs ? (\n <ScreenreaderOnly>{props.breadcrumbs}</ScreenreaderOnly>\n ) : null}\n <SkeletonLayout\n registered={registered}\n toolbarProps={toolbarProps}\n appLayoutProps={props}\n appLayoutState={appLayoutState}\n skeletonSlotsAttributes={skeletonAttributes}\n />\n </AppLayoutVisibilityContext.Provider>\n )}\n </AppLayoutStateProvider>\n <AppLayoutWidgetizedState forwardRef={forwardRef} appLayoutProps={props} stateManager={stateManager} />\n </>\n );\n }\n);\n\nexport default AppLayoutVisualRefreshToolbar;\n"]}
@@ -1,7 +1,9 @@
1
1
  import React from 'react';
2
2
  import { BreadcrumbGroupProps } from '../../breadcrumb-group/interfaces';
3
3
  import { SplitPanelSideToggleProps } from '../../internal/context/split-panel-context';
4
+ import { SomeOptional } from '../../internal/types';
4
5
  import { AppLayoutProps, AppLayoutPropsWithDefaults } from '../interfaces';
6
+ import { SplitPanelProviderProps } from '../split-panel';
5
7
  import { OnChangeParams } from '../utils/use-drawers';
6
8
  import { FocusControlMultipleStates, FocusControlState } from '../utils/use-focus-control';
7
9
  import { SplitPanelFocusControlState } from '../utils/use-split-panel-focus-control';
@@ -62,4 +64,22 @@ export interface AppLayoutInternals {
62
64
  splitPanelAnimationDisabled?: boolean;
63
65
  expandedDrawerId: string | null;
64
66
  setExpandedDrawerId: (value: string | null) => void;
65
- }
67
+ }
68
+ interface AppLayoutWidgetizedState extends AppLayoutInternals {
69
+ isNested: boolean;
70
+ verticalOffsets: VerticalLayoutOutput;
71
+ navigationAnimationDisabled: boolean;
72
+ splitPanelOffsets: {
73
+ stickyVerticalBottomOffset: number;
74
+ mainContentPaddingBlockEnd: number | undefined;
75
+ };
76
+ }
77
+ export interface AppLayoutState {
78
+ rootRef: React.Ref<HTMLElement>;
79
+ isIntersecting: boolean;
80
+ widgetizedState: AppLayoutWidgetizedState;
81
+ appLayoutInternals: AppLayoutInternals;
82
+ splitPanelInternals: SplitPanelProviderProps;
83
+ }
84
+ export type AppLayoutPendingState = SomeOptional<AppLayoutState, 'appLayoutInternals' | 'splitPanelInternals' | 'widgetizedState' | 'rootRef'>;
85
+ export {};
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/interfaces.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,yBAAyB,EAAE,MAAM,4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,0BAA0B,EAAE,MAAM,GAAG,SAAS,CAAC;KAChD,CAAC;CACH;AAGD,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAChC,cAAc,EAAE,OAAO,CAAC;IAExB,eAAe,EAAE,wBAAwB,CAAC;IAE1C,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,mBAAmB,EAAE,uBAAuB,CAAC;CAC9C;AAED,MAAM,MAAM,qBAAqB,GAAG,YAAY,CAC9C,cAAc,EACd,oBAAoB,GAAG,qBAAqB,GAAG,iBAAiB,GAAG,SAAS,CAC7E,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/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 { BreadcrumbGroupProps } from '../../breadcrumb-group/interfaces';\nimport { SplitPanelSideToggleProps } from '../../internal/context/split-panel-context';\nimport { AppLayoutProps, AppLayoutPropsWithDefaults } from '../interfaces';\nimport { OnChangeParams } from '../utils/use-drawers';\nimport { FocusControlMultipleStates, FocusControlState } from '../utils/use-focus-control';\nimport { SplitPanelFocusControlState } from '../utils/use-split-panel-focus-control';\nimport { VerticalLayoutOutput } from './compute-layout';\n\nexport interface AppLayoutInternalProps extends AppLayoutPropsWithDefaults {\n navigationTriggerHide?: boolean;\n}\n\nexport type InternalDrawer = AppLayoutProps.Drawer & {\n defaultActive?: boolean;\n isExpandable?: boolean;\n ariaLabels: AppLayoutProps.Drawer['ariaLabels'] & { expandedModeButton?: string };\n};\n\n// Widgetization notice: structures in this file are shared multiple app layout instances, possibly different minor versions.\n// Treat these structures as an API and do not make incompatible changes.\nexport interface AppLayoutInternals {\n ariaLabels: AppLayoutPropsWithDefaults['ariaLabels'];\n headerVariant: AppLayoutPropsWithDefaults['headerVariant'];\n placement: AppLayoutPropsWithDefaults['placement'];\n navigationOpen: AppLayoutPropsWithDefaults['navigationOpen'];\n navigationFocusControl: FocusControlState;\n navigation: React.ReactNode;\n splitPanelPosition: AppLayoutProps.SplitPanelPreferences['position'];\n splitPanelOpen: boolean;\n splitPanelControlId: string;\n splitPanelFocusControl: SplitPanelFocusControlState;\n splitPanelToggleConfig: SplitPanelSideToggleProps;\n isMobile: boolean;\n activeDrawer: InternalDrawer | undefined;\n activeDrawerSize: number;\n minDrawerSize: number;\n maxDrawerSize: number;\n minGlobalDrawersSizes: Record<string, number>;\n maxGlobalDrawersSizes: Record<string, number>;\n drawers: ReadonlyArray<InternalDrawer>;\n drawersFocusControl: FocusControlState;\n globalDrawersFocusControl: FocusControlMultipleStates;\n activeGlobalDrawersIds: ReadonlyArray<string>;\n activeGlobalDrawers: ReadonlyArray<InternalDrawer>;\n globalDrawers: ReadonlyArray<InternalDrawer>;\n activeGlobalDrawersSizes: Record<string, number>;\n stickyNotifications: AppLayoutPropsWithDefaults['stickyNotifications'];\n breadcrumbs: React.ReactNode;\n discoveredBreadcrumbs: BreadcrumbGroupProps | null;\n toolbarState: 'show' | 'hide';\n setToolbarState: (state: 'show' | 'hide') => void;\n verticalOffsets: VerticalLayoutOutput;\n drawersOpenQueue: ReadonlyArray<string>;\n setNotificationsHeight: (height: number) => void;\n setToolbarHeight: (height: number) => void;\n onSplitPanelToggle: () => void;\n onNavigationToggle: (open: boolean) => void;\n onActiveDrawerChange: (newDrawerId: string | null, params: OnChangeParams) => void;\n onActiveDrawerResize: (detail: { id: string; size: number }) => void;\n onActiveGlobalDrawersChange: (newDrawerId: string, params: OnChangeParams) => void;\n splitPanelAnimationDisabled?: boolean;\n expandedDrawerId: string | null;\n setExpandedDrawerId: (value: string | null) => void;\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/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 { BreadcrumbGroupProps } from '../../breadcrumb-group/interfaces';\nimport { SplitPanelSideToggleProps } from '../../internal/context/split-panel-context';\nimport { SomeOptional } from '../../internal/types';\nimport { AppLayoutProps, AppLayoutPropsWithDefaults } from '../interfaces';\nimport { SplitPanelProviderProps } from '../split-panel';\nimport { OnChangeParams } from '../utils/use-drawers';\nimport { FocusControlMultipleStates, FocusControlState } from '../utils/use-focus-control';\nimport { SplitPanelFocusControlState } from '../utils/use-split-panel-focus-control';\nimport { VerticalLayoutOutput } from './compute-layout';\n\nexport interface AppLayoutInternalProps extends AppLayoutPropsWithDefaults {\n navigationTriggerHide?: boolean;\n}\n\nexport type InternalDrawer = AppLayoutProps.Drawer & {\n defaultActive?: boolean;\n isExpandable?: boolean;\n ariaLabels: AppLayoutProps.Drawer['ariaLabels'] & { expandedModeButton?: string };\n};\n\n// Widgetization notice: structures in this file are shared multiple app layout instances, possibly different minor versions.\n// Treat these structures as an API and do not make incompatible changes.\n// Legacy widget interface\nexport interface AppLayoutInternals {\n ariaLabels: AppLayoutPropsWithDefaults['ariaLabels'];\n headerVariant: AppLayoutPropsWithDefaults['headerVariant'];\n placement: AppLayoutPropsWithDefaults['placement'];\n navigationOpen: AppLayoutPropsWithDefaults['navigationOpen'];\n navigationFocusControl: FocusControlState;\n navigation: React.ReactNode;\n splitPanelPosition: AppLayoutProps.SplitPanelPreferences['position'];\n splitPanelOpen: boolean;\n splitPanelControlId: string;\n splitPanelFocusControl: SplitPanelFocusControlState;\n splitPanelToggleConfig: SplitPanelSideToggleProps;\n isMobile: boolean;\n activeDrawer: InternalDrawer | undefined;\n activeDrawerSize: number;\n minDrawerSize: number;\n maxDrawerSize: number;\n minGlobalDrawersSizes: Record<string, number>;\n maxGlobalDrawersSizes: Record<string, number>;\n drawers: ReadonlyArray<InternalDrawer>;\n drawersFocusControl: FocusControlState;\n globalDrawersFocusControl: FocusControlMultipleStates;\n activeGlobalDrawersIds: ReadonlyArray<string>;\n activeGlobalDrawers: ReadonlyArray<InternalDrawer>;\n globalDrawers: ReadonlyArray<InternalDrawer>;\n activeGlobalDrawersSizes: Record<string, number>;\n stickyNotifications: AppLayoutPropsWithDefaults['stickyNotifications'];\n breadcrumbs: React.ReactNode;\n discoveredBreadcrumbs: BreadcrumbGroupProps | null;\n toolbarState: 'show' | 'hide';\n setToolbarState: (state: 'show' | 'hide') => void;\n verticalOffsets: VerticalLayoutOutput;\n drawersOpenQueue: ReadonlyArray<string>;\n setNotificationsHeight: (height: number) => void;\n setToolbarHeight: (height: number) => void;\n onSplitPanelToggle: () => void;\n onNavigationToggle: (open: boolean) => void;\n onActiveDrawerChange: (newDrawerId: string | null, params: OnChangeParams) => void;\n onActiveDrawerResize: (detail: { id: string; size: number }) => void;\n onActiveGlobalDrawersChange: (newDrawerId: string, params: OnChangeParams) => void;\n splitPanelAnimationDisabled?: boolean;\n expandedDrawerId: string | null;\n setExpandedDrawerId: (value: string | null) => void;\n}\n\ninterface AppLayoutWidgetizedState extends AppLayoutInternals {\n isNested: boolean;\n verticalOffsets: VerticalLayoutOutput;\n navigationAnimationDisabled: boolean;\n splitPanelOffsets: {\n stickyVerticalBottomOffset: number;\n mainContentPaddingBlockEnd: number | undefined;\n };\n}\n\n// New widget interface\nexport interface AppLayoutState {\n rootRef: React.Ref<HTMLElement>;\n isIntersecting: boolean;\n // new state management\n widgetizedState: AppLayoutWidgetizedState;\n // the old object shape for backward compatibility\n appLayoutInternals: AppLayoutInternals;\n splitPanelInternals: SplitPanelProviderProps;\n}\n\nexport type AppLayoutPendingState = SomeOptional<\n AppLayoutState,\n 'appLayoutInternals' | 'splitPanelInternals' | 'widgetizedState' | 'rootRef'\n>;\n"]}
@@ -1,7 +1,30 @@
1
+ /// <reference types="react" />
1
2
  export declare const AppLayoutNavigation: typeof import("./navigation").AppLayoutNavigationImplementation;
2
3
  export declare const AppLayoutDrawer: typeof import("./drawer").AppLayoutDrawerImplementation;
3
4
  export declare const AppLayoutGlobalDrawers: typeof import("./drawer").AppLayoutGlobalDrawersImplementation;
4
5
  export declare const AppLayoutNotifications: typeof import("./notifications").AppLayoutNotificationsImplementation;
5
6
  export declare const AppLayoutToolbar: typeof import("./toolbar").AppLayoutToolbarImplementation;
6
7
  export declare const AppLayoutSplitPanelBottom: typeof import("./split-panel").AppLayoutSplitPanelDrawerBottomImplementation;
7
- export declare const AppLayoutSplitPanelSide: typeof import("./split-panel").AppLayoutSplitPanelDrawerSideImplementation;
8
+ export declare const AppLayoutSplitPanelSide: typeof import("./split-panel").AppLayoutSplitPanelDrawerSideImplementation;
9
+ export declare const AppLayoutBeforeMainSlot: ({
10
+ toolbarProps,
11
+ appLayoutState,
12
+ appLayoutProps
13
+ }: import("./skeleton/interfaces").SkeletonPartProps) => JSX.Element;
14
+ export declare const AppLayoutAfterMainSlot: ({
15
+ appLayoutState,
16
+ appLayoutProps
17
+ }: import("./skeleton/interfaces").SkeletonPartProps) => JSX.Element | null;
18
+ export declare const AppLayoutTopContentSlot: ({
19
+ appLayoutProps,
20
+ appLayoutState
21
+ }: import("./skeleton/interfaces").SkeletonPartProps) => JSX.Element | null;
22
+ export declare const AppLayoutBottomContentSlot: ({
23
+ appLayoutState,
24
+ appLayoutProps
25
+ }: import("./skeleton/interfaces").SkeletonPartProps) => JSX.Element | null;
26
+ export declare const AppLayoutWidgetizedState: ({
27
+ appLayoutProps,
28
+ stateManager,
29
+ forwardRef
30
+ }: import("./state").AppLayoutStateProps) => JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/internal.tsx"],"names":[],"mappings":"AAWA,eAAO,MAAM,mBAAmB,iEAAwC,CAAC;AACzE,eAAO,MAAM,eAAe,yDAAoC,CAAC;AACjE,eAAO,MAAM,sBAAsB,gEAA2C,CAAC;AAC/E,eAAO,MAAM,sBAAsB,uEAA2C,CAAC;AAC/E,eAAO,MAAM,gBAAgB,2DAAqC,CAAC;AACnE,eAAO,MAAM,yBAAyB,8EAAoD,CAAC;AAC3F,eAAO,MAAM,uBAAuB,4EAAkD,CAAC"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/internal.tsx"],"names":[],"mappings":";AAsBA,eAAO,MAAM,mBAAmB,iEAAwC,CAAC;AACzE,eAAO,MAAM,eAAe,yDAAoC,CAAC;AACjE,eAAO,MAAM,sBAAsB,gEAA2C,CAAC;AAC/E,eAAO,MAAM,sBAAsB,uEAA2C,CAAC;AAC/E,eAAO,MAAM,gBAAgB,2DAAqC,CAAC;AACnE,eAAO,MAAM,yBAAyB,8EAAoD,CAAC;AAC3F,eAAO,MAAM,uBAAuB,4EAAkD,CAAC;AAGvF,eAAO,MAAM,uBAAuB,sHAEnC,CAAC;AACF,eAAO,MAAM,sBAAsB,+GAElC,CAAC;AACF,eAAO,MAAM,uBAAuB,+GAEnC,CAAC;AACF,eAAO,MAAM,0BAA0B,+GAEtC,CAAC;AACF,eAAO,MAAM,wBAAwB,sGAEpC,CAAC"}
@@ -1,10 +1,17 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
+ import { createLoadableComponent } from '../../internal/widgets/loader-mock';
3
4
  import { createWidgetizedAppLayoutDrawer, createWidgetizedAppLayoutGlobalDrawers } from './drawer';
4
5
  import { createWidgetizedAppLayoutNavigation } from './navigation';
5
6
  import { createWidgetizedAppLayoutNotifications } from './notifications';
6
7
  import { createWidgetizedAppLayoutSplitPanelDrawerBottom, createWidgetizedAppLayoutSplitPanelDrawerSide, } from './split-panel';
8
+ import { AppLayoutStateProvider as AppLayoutStateImplementation, createWidgetizedAppLayoutState } from './state';
7
9
  import { createWidgetizedAppLayoutToolbar } from './toolbar';
10
+ import { AfterMainSlotImplementation, createWidgetizedAppLayoutAfterMainSlot } from './widget-areas/after-main-slot';
11
+ import { BeforeMainSlotImplementation, createWidgetizedAppLayoutBeforeMainSlot } from './widget-areas/before-main-slot';
12
+ import { BottomContentSlotImplementation, createWidgetizedAppLayoutBottomContentSlot, } from './widget-areas/bottom-content-slot';
13
+ import { createWidgetizedAppLayoutTopContentSlot, TopContentSlotImplementation } from './widget-areas/top-content-slot';
14
+ // Legacy widgetized parts
8
15
  export const AppLayoutNavigation = createWidgetizedAppLayoutNavigation();
9
16
  export const AppLayoutDrawer = createWidgetizedAppLayoutDrawer();
10
17
  export const AppLayoutGlobalDrawers = createWidgetizedAppLayoutGlobalDrawers();
@@ -12,4 +19,10 @@ export const AppLayoutNotifications = createWidgetizedAppLayoutNotifications();
12
19
  export const AppLayoutToolbar = createWidgetizedAppLayoutToolbar();
13
20
  export const AppLayoutSplitPanelBottom = createWidgetizedAppLayoutSplitPanelDrawerBottom();
14
21
  export const AppLayoutSplitPanelSide = createWidgetizedAppLayoutSplitPanelDrawerSide();
22
+ // Refactored widgetized parts
23
+ export const AppLayoutBeforeMainSlot = createWidgetizedAppLayoutBeforeMainSlot(createLoadableComponent(BeforeMainSlotImplementation));
24
+ export const AppLayoutAfterMainSlot = createWidgetizedAppLayoutAfterMainSlot(createLoadableComponent(AfterMainSlotImplementation));
25
+ export const AppLayoutTopContentSlot = createWidgetizedAppLayoutTopContentSlot(createLoadableComponent(TopContentSlotImplementation));
26
+ export const AppLayoutBottomContentSlot = createWidgetizedAppLayoutBottomContentSlot(createLoadableComponent(BottomContentSlotImplementation));
27
+ export const AppLayoutWidgetizedState = createWidgetizedAppLayoutState(createLoadableComponent(AppLayoutStateImplementation));
15
28
  //# sourceMappingURL=internal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,+BAA+B,EAAE,sCAAsC,EAAE,MAAM,UAAU,CAAC;AACnG,OAAO,EAAE,mCAAmC,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,sCAAsC,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EACL,+CAA+C,EAC/C,6CAA6C,GAC9C,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,gCAAgC,EAAE,MAAM,WAAW,CAAC;AAE7D,MAAM,CAAC,MAAM,mBAAmB,GAAG,mCAAmC,EAAE,CAAC;AACzE,MAAM,CAAC,MAAM,eAAe,GAAG,+BAA+B,EAAE,CAAC;AACjE,MAAM,CAAC,MAAM,sBAAsB,GAAG,sCAAsC,EAAE,CAAC;AAC/E,MAAM,CAAC,MAAM,sBAAsB,GAAG,sCAAsC,EAAE,CAAC;AAC/E,MAAM,CAAC,MAAM,gBAAgB,GAAG,gCAAgC,EAAE,CAAC;AACnE,MAAM,CAAC,MAAM,yBAAyB,GAAG,+CAA+C,EAAE,CAAC;AAC3F,MAAM,CAAC,MAAM,uBAAuB,GAAG,6CAA6C,EAAE,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { createWidgetizedAppLayoutDrawer, createWidgetizedAppLayoutGlobalDrawers } from './drawer';\nimport { createWidgetizedAppLayoutNavigation } from './navigation';\nimport { createWidgetizedAppLayoutNotifications } from './notifications';\nimport {\n createWidgetizedAppLayoutSplitPanelDrawerBottom,\n createWidgetizedAppLayoutSplitPanelDrawerSide,\n} from './split-panel';\nimport { createWidgetizedAppLayoutToolbar } from './toolbar';\n\nexport const AppLayoutNavigation = createWidgetizedAppLayoutNavigation();\nexport const AppLayoutDrawer = createWidgetizedAppLayoutDrawer();\nexport const AppLayoutGlobalDrawers = createWidgetizedAppLayoutGlobalDrawers();\nexport const AppLayoutNotifications = createWidgetizedAppLayoutNotifications();\nexport const AppLayoutToolbar = createWidgetizedAppLayoutToolbar();\nexport const AppLayoutSplitPanelBottom = createWidgetizedAppLayoutSplitPanelDrawerBottom();\nexport const AppLayoutSplitPanelSide = createWidgetizedAppLayoutSplitPanelDrawerSide();\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../../src/app-layout/visual-refresh-toolbar/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,+BAA+B,EAAE,sCAAsC,EAAE,MAAM,UAAU,CAAC;AACnG,OAAO,EAAE,mCAAmC,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,sCAAsC,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EACL,+CAA+C,EAC/C,6CAA6C,GAC9C,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,sBAAsB,IAAI,4BAA4B,EAAE,8BAA8B,EAAE,MAAM,SAAS,CAAC;AACjH,OAAO,EAAE,gCAAgC,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,2BAA2B,EAAE,sCAAsC,EAAE,MAAM,gCAAgC,CAAC;AACrH,OAAO,EAAE,4BAA4B,EAAE,uCAAuC,EAAE,MAAM,iCAAiC,CAAC;AACxH,OAAO,EACL,+BAA+B,EAC/B,0CAA0C,GAC3C,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,uCAAuC,EAAE,4BAA4B,EAAE,MAAM,iCAAiC,CAAC;AAExH,0BAA0B;AAC1B,MAAM,CAAC,MAAM,mBAAmB,GAAG,mCAAmC,EAAE,CAAC;AACzE,MAAM,CAAC,MAAM,eAAe,GAAG,+BAA+B,EAAE,CAAC;AACjE,MAAM,CAAC,MAAM,sBAAsB,GAAG,sCAAsC,EAAE,CAAC;AAC/E,MAAM,CAAC,MAAM,sBAAsB,GAAG,sCAAsC,EAAE,CAAC;AAC/E,MAAM,CAAC,MAAM,gBAAgB,GAAG,gCAAgC,EAAE,CAAC;AACnE,MAAM,CAAC,MAAM,yBAAyB,GAAG,+CAA+C,EAAE,CAAC;AAC3F,MAAM,CAAC,MAAM,uBAAuB,GAAG,6CAA6C,EAAE,CAAC;AAEvF,8BAA8B;AAC9B,MAAM,CAAC,MAAM,uBAAuB,GAAG,uCAAuC,CAC5E,uBAAuB,CAAC,4BAA4B,CAAC,CACtD,CAAC;AACF,MAAM,CAAC,MAAM,sBAAsB,GAAG,sCAAsC,CAC1E,uBAAuB,CAAC,2BAA2B,CAAC,CACrD,CAAC;AACF,MAAM,CAAC,MAAM,uBAAuB,GAAG,uCAAuC,CAC5E,uBAAuB,CAAC,4BAA4B,CAAC,CACtD,CAAC;AACF,MAAM,CAAC,MAAM,0BAA0B,GAAG,0CAA0C,CAClF,uBAAuB,CAAC,+BAA+B,CAAC,CACzD,CAAC;AACF,MAAM,CAAC,MAAM,wBAAwB,GAAG,8BAA8B,CACpE,uBAAuB,CAAC,4BAA4B,CAAC,CACtD,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { createLoadableComponent } from '../../internal/widgets/loader-mock';\nimport { createWidgetizedAppLayoutDrawer, createWidgetizedAppLayoutGlobalDrawers } from './drawer';\nimport { createWidgetizedAppLayoutNavigation } from './navigation';\nimport { createWidgetizedAppLayoutNotifications } from './notifications';\nimport {\n createWidgetizedAppLayoutSplitPanelDrawerBottom,\n createWidgetizedAppLayoutSplitPanelDrawerSide,\n} from './split-panel';\nimport { AppLayoutStateProvider as AppLayoutStateImplementation, createWidgetizedAppLayoutState } from './state';\nimport { createWidgetizedAppLayoutToolbar } from './toolbar';\nimport { AfterMainSlotImplementation, createWidgetizedAppLayoutAfterMainSlot } from './widget-areas/after-main-slot';\nimport { BeforeMainSlotImplementation, createWidgetizedAppLayoutBeforeMainSlot } from './widget-areas/before-main-slot';\nimport {\n BottomContentSlotImplementation,\n createWidgetizedAppLayoutBottomContentSlot,\n} from './widget-areas/bottom-content-slot';\nimport { createWidgetizedAppLayoutTopContentSlot, TopContentSlotImplementation } from './widget-areas/top-content-slot';\n\n// Legacy widgetized parts\nexport const AppLayoutNavigation = createWidgetizedAppLayoutNavigation();\nexport const AppLayoutDrawer = createWidgetizedAppLayoutDrawer();\nexport const AppLayoutGlobalDrawers = createWidgetizedAppLayoutGlobalDrawers();\nexport const AppLayoutNotifications = createWidgetizedAppLayoutNotifications();\nexport const AppLayoutToolbar = createWidgetizedAppLayoutToolbar();\nexport const AppLayoutSplitPanelBottom = createWidgetizedAppLayoutSplitPanelDrawerBottom();\nexport const AppLayoutSplitPanelSide = createWidgetizedAppLayoutSplitPanelDrawerSide();\n\n// Refactored widgetized parts\nexport const AppLayoutBeforeMainSlot = createWidgetizedAppLayoutBeforeMainSlot(\n createLoadableComponent(BeforeMainSlotImplementation)\n);\nexport const AppLayoutAfterMainSlot = createWidgetizedAppLayoutAfterMainSlot(\n createLoadableComponent(AfterMainSlotImplementation)\n);\nexport const AppLayoutTopContentSlot = createWidgetizedAppLayoutTopContentSlot(\n createLoadableComponent(TopContentSlotImplementation)\n);\nexport const AppLayoutBottomContentSlot = createWidgetizedAppLayoutBottomContentSlot(\n createLoadableComponent(BottomContentSlotImplementation)\n);\nexport const AppLayoutWidgetizedState = createWidgetizedAppLayoutState(\n createLoadableComponent(AppLayoutStateImplementation)\n);\n"]}
@@ -6,7 +6,7 @@ import { findUpUntil } from '@cloudscape-design/component-toolkit/dom';
6
6
  import { InternalButton } from '../../../button/internal';
7
7
  import { createWidgetizedComponent } from '../../../internal/widgets';
8
8
  import { getDrawerStyles } from '../compute-layout';
9
- import { NotificationsSlot } from '../skeleton/slot-wrappers';
9
+ import { NotificationsSlot } from '../skeleton/slots';
10
10
  import sharedStyles from '../../resize/styles.css.js';
11
11
  import testutilStyles from '../../test-classes/styles.css.js';
12
12
  import styles from './styles.css.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceR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AAC,sBAAsB,CAAC,EAAE,YAAY,CAAC,wBAAwB,CAAC,EAAE;YACtF,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,EAAE,cAAc;SAC/C,CAAC,EACF,KAAK,EAAE;YACL,SAAS,EAAE,YAAY;YACvB,eAAe,EAAE,eAAe;SACjC;QAED,2CACc,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,UAAU,mCAAI,SAAS,EAC/C,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,UAAU,EACjB;gBACE,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,cAAc;aACnD,EACD,cAAc,CAAC,UAAU,CAC1B,iBACY,CAAC,cAAc,EAC5B,OAAO,EAAE,iBAAiB;YAE1B,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;gBAC7C,oBAAC,cAAc,IACb,SAAS,EAAE,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,eAAe,mCAAI,SAAS,EACnD,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,EAC3C,OAAO,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,KAAK,CAAC,EACxC,OAAO,EAAC,MAAM,EACd,UAAU,EAAC,MAAM,EACjB,SAAS,EAAE,cAAc,CAAC,kBAAkB,CAAC,EAC7C,GAAG,EAAE,sBAAsB,CAAC,IAAI,CAAC,KAAK,EACtC,eAAe,EAAC,OAAO,GACvB,CACE;YACL,UAAU,CACP,CACF,CACP,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,mCAAmC,GAAG,yBAAyB,CAC1E,iCAAiC,EACjC,iBAAiB,CAClB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { findUpUntil } from '@cloudscape-design/component-toolkit/dom';\n\nimport { InternalButton } from '../../../button/internal';\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { getDrawerStyles } from '../compute-layout';\nimport { AppLayoutInternals } from '../interfaces';\nimport { NotificationsSlot } from '../skeleton/slot-wrappers';\n\nimport sharedStyles from '../../resize/styles.css.js';\nimport testutilStyles from '../../test-classes/styles.css.js';\nimport styles from './styles.css.js';\n\ninterface AppLayoutNavigationImplementationProps {\n appLayoutInternals: AppLayoutInternals;\n}\n\nexport function AppLayoutNavigationImplementation({ appLayoutInternals }: AppLayoutNavigationImplementationProps) {\n const {\n ariaLabels,\n onNavigationToggle,\n isMobile,\n navigationOpen,\n navigation,\n navigationFocusControl,\n placement,\n verticalOffsets,\n } = appLayoutInternals;\n\n const { drawerTopOffset, drawerHeight } = getDrawerStyles(verticalOffsets, isMobile, placement);\n\n // Close the Navigation drawer on mobile when a user clicks a link inside.\n const onNavigationClick = (event: React.MouseEvent) => {\n const hasLink = findUpUntil(\n event.target as HTMLElement,\n node => node.tagName === 'A' && !!(node as HTMLAnchorElement).href\n );\n if (hasLink && isMobile) {\n onNavigationToggle(false);\n }\n };\n\n return (\n <div\n className={clsx(styles['navigation-container'], sharedStyles['with-motion-horizontal'], {\n [styles['is-navigation-open']]: navigationOpen,\n })}\n style={{\n blockSize: drawerHeight,\n insetBlockStart: drawerTopOffset,\n }}\n >\n <nav\n aria-label={ariaLabels?.navigation ?? undefined}\n className={clsx(\n styles.navigation,\n {\n [testutilStyles['drawer-closed']]: !navigationOpen,\n },\n testutilStyles.navigation\n )}\n aria-hidden={!navigationOpen}\n onClick={onNavigationClick}\n >\n <div className={clsx(styles['hide-navigation'])}>\n <InternalButton\n ariaLabel={ariaLabels?.navigationClose ?? undefined}\n iconName={isMobile ? 'close' : 'angle-left'}\n onClick={() => onNavigationToggle(false)}\n variant=\"icon\"\n formAction=\"none\"\n className={testutilStyles['navigation-close']}\n ref={navigationFocusControl.refs.close}\n analyticsAction=\"close\"\n />\n </div>\n {navigation}\n </nav>\n </div>\n );\n}\n\nexport const createWidgetizedAppLayoutNavigation = createWidgetizedComponent(\n AppLayoutNavigationImplementation,\n NotificationsSlot\n);\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/navigation/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAEvE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,cAAc,MAAM,kCAAkC,CAAC;AAC9D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAMrC,MAAM,UAAU,iCAAiC,CAAC,EAAE,kBAAkB,EAA0C;;IAC9G,MAAM,EACJ,UAAU,EACV,kBAAkB,EAClB,QAAQ,EACR,cAAc,EACd,UAAU,EACV,sBAAsB,EACtB,SAAS,EACT,eAAe,GAChB,GAAG,kBAAkB,CAAC;IAEvB,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,GAAG,eAAe,CAAC,eAAe,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;IAEhG,0EAA0E;IAC1E,MAAM,iBAAiB,GAAG,CAAC,KAAuB,EAAE,EAAE;QACpD,MAAM,OAAO,GAAG,WAAW,CACzB,KAAK,CAAC,MAAqB,EAC3B,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,KAAK,GAAG,IAAI,CAAC,CAAE,IAA0B,CAAC,IAAI,CACnE,CAAC;QACF,IAAI,OAAO,IAAI,Q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amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { findUpUntil } from '@cloudscape-design/component-toolkit/dom';\n\nimport { InternalButton } from '../../../button/internal';\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { getDrawerStyles } from '../compute-layout';\nimport { AppLayoutInternals } from '../interfaces';\nimport { NotificationsSlot } from '../skeleton/slots';\n\nimport sharedStyles from '../../resize/styles.css.js';\nimport testutilStyles from '../../test-classes/styles.css.js';\nimport styles from './styles.css.js';\n\ninterface AppLayoutNavigationImplementationProps {\n appLayoutInternals: AppLayoutInternals;\n}\n\nexport function AppLayoutNavigationImplementation({ appLayoutInternals }: AppLayoutNavigationImplementationProps) {\n const {\n ariaLabels,\n onNavigationToggle,\n isMobile,\n navigationOpen,\n navigation,\n navigationFocusControl,\n placement,\n verticalOffsets,\n } = appLayoutInternals;\n\n const { drawerTopOffset, drawerHeight } = getDrawerStyles(verticalOffsets, isMobile, placement);\n\n // Close the Navigation drawer on mobile when a user clicks a link inside.\n const onNavigationClick = (event: React.MouseEvent) => {\n const hasLink = findUpUntil(\n event.target as HTMLElement,\n node => node.tagName === 'A' && !!(node as HTMLAnchorElement).href\n );\n if (hasLink && isMobile) {\n onNavigationToggle(false);\n }\n };\n\n return (\n <div\n className={clsx(styles['navigation-container'], sharedStyles['with-motion-horizontal'], {\n [styles['is-navigation-open']]: navigationOpen,\n })}\n style={{\n blockSize: drawerHeight,\n insetBlockStart: drawerTopOffset,\n }}\n >\n <nav\n aria-label={ariaLabels?.navigation ?? undefined}\n className={clsx(\n styles.navigation,\n {\n [testutilStyles['drawer-closed']]: !navigationOpen,\n },\n testutilStyles.navigation\n )}\n aria-hidden={!navigationOpen}\n onClick={onNavigationClick}\n >\n <div className={clsx(styles['hide-navigation'])}>\n <InternalButton\n ariaLabel={ariaLabels?.navigationClose ?? undefined}\n iconName={isMobile ? 'close' : 'angle-left'}\n onClick={() => onNavigationToggle(false)}\n variant=\"icon\"\n formAction=\"none\"\n className={testutilStyles['navigation-close']}\n ref={navigationFocusControl.refs.close}\n analyticsAction=\"close\"\n />\n </div>\n {navigation}\n </nav>\n </div>\n );\n}\n\nexport const createWidgetizedAppLayoutNavigation = createWidgetizedComponent(\n AppLayoutNavigationImplementation,\n NotificationsSlot\n);\n"]}
@@ -5,8 +5,8 @@ import clsx from 'clsx';
5
5
  import { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';
6
6
  import { highContrastHeaderClassName } from '../../../internal/utils/content-header-utils';
7
7
  import { createWidgetizedComponent } from '../../../internal/widgets';
8
- import { NotificationsSkeleton } from '../skeleton/slot-skeletons';
9
- import { NotificationsSlot } from '../skeleton/slot-wrappers';
8
+ import { NotificationsSkeleton } from '../skeleton/skeleton-parts';
9
+ import { NotificationsSlot } from '../skeleton/slots';
10
10
  import testutilStyles from '../../test-classes/styles.css.js';
11
11
  import styles from './styles.css.js';
12
12
  export function AppLayoutNotificationsImplementation({ appLayoutInternals, children, }) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/notifications/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAElF,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,OAAO,cAAc,MAAM,kCAAkC,CAAC;AAC9D,OAAO,MAAM,MAAM,iB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C,QAAQ,gBAAa,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,aAAa,IAC9F,QAAQ,CACL,CACY,CACrB,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,sCAAsC,GAAG,yBAAyB,CAC7E,oCAAoC,EACpC,qBAAqB,CACtB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';\n\nimport { highContrastHeaderClassName } from '../../../internal/utils/content-header-utils';\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { AppLayoutInternals } from '../interfaces';\nimport { NotificationsSkeleton } from '../skeleton/slot-skeletons';\nimport { NotificationsSlot } from '../skeleton/slot-wrappers';\n\nimport testutilStyles from '../../test-classes/styles.css.js';\nimport styles from './styles.css.js';\n\nexport interface AppLayoutNotificationsImplementationProps {\n appLayoutInternals: AppLayoutInternals;\n children: React.ReactNode;\n}\n\nexport function AppLayoutNotificationsImplementation({\n appLayoutInternals,\n children,\n}: AppLayoutNotificationsImplementationProps) {\n const { ariaLabels, stickyNotifications, setNotificationsHeight, verticalOffsets } = appLayoutInternals;\n const [hasNotificationsContent, setHasNotificationsContent] = useState(false);\n const rootRef = useRef<HTMLDivElement>(null);\n\n useResizeObserver(rootRef, entry => {\n const hasContent = entry.contentBoxHeight > 0;\n setNotificationsHeight(hasContent ? entry.borderBoxHeight : 0);\n setHasNotificationsContent(hasContent);\n });\n useEffect(() => {\n return () => {\n setNotificationsHeight(0);\n };\n // unmount effect only\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n return (\n <NotificationsSlot\n ref={rootRef}\n className={clsx(\n appLayoutInternals.headerVariant === 'high-contrast' && highContrastHeaderClassName,\n stickyNotifications && styles['sticky-notifications'],\n hasNotificationsContent && styles['has-notifications-content'],\n appLayoutInternals.headerVariant !== 'high-contrast' && styles['sticky-notifications-with-background']\n )}\n style={{\n insetBlockStart: stickyNotifications ? verticalOffsets.notifications : undefined,\n }}\n >\n <div className={testutilStyles.notifications} role=\"region\" aria-label={ariaLabels?.notifications}>\n {children}\n </div>\n </NotificationsSlot>\n );\n}\n\nexport const createWidgetizedAppLayoutNotifications = createWidgetizedComponent(\n AppLayoutNotificationsImplementation,\n NotificationsSkeleton\n);\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/notifications/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAElF,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,cAAc,MAAM,kCAAkC,CAAC;AAC9D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAOrC,MAAM,UAAU,oCAAoC,CAAC,EACnD,kBAAkB,EAClB,QAAQ,GACkC;IAC1C,MAAM,EAAE,UAAU,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,eAAe,EAAE,GAAG,kBAAkB,CAAC;IACxG,MAAM,CAAC,uBAAuB,EAAE,0BAA0B,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9E,MAAM,OAAO,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAE7C,iBAAiB,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE;QACjC,MAAM,UAAU,GAAG,KAAK,CAAC,gBAAgB,GAAG,CAAC,CAAC;QAC9C,sBAAsB,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/D,0BAA0B,CAAC,UAAU,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;IACH,SAAS,CAAC,GAAG,EAAE;QACb,OAAO,GAAG,EAAE;YACV,sBAAsB,CAAC,CAAC,CAAC,CAAC;QAC5B,CAAC,CAAC;QACF,sBAAsB;QACtB,uDAAuD;IACzD,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,CACL,oBAAC,iBAAiB,IAChB,GAAG,EAAE,OAAO,EACZ,SAAS,EAAE,IAAI,CACb,kBAAkB,CAAC,aAAa,KAAK,eAAe,IAAI,2BAA2B,EACnF,mBAAmB,IAAI,MAAM,CAAC,sBAAsB,CAAC,EACrD,uBAAuB,IAAI,MAAM,CAAC,2BAA2B,CAAC,EAC9D,kBAAkB,CAAC,aAAa,KAAK,eAAe,IAAI,MAAM,CAAC,sCAAsC,CAAC,CACvG,EACD,KAAK,EAAE;YACL,eAAe,EAAE,mBAAmB,CAAC,CAAC,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS;SACjF;QAED,6BAAK,SAAS,EAAE,cAAc,CAAC,aAAa,EAAE,IAAI,EAAC,QAAQ,gBAAa,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,aAAa,IAC9F,QAAQ,CACL,CACY,CACrB,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,sCAAsC,GAAG,yBAAyB,CAC7E,oCAAoC,EACpC,qBAAqB,CACtB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';\n\nimport { highContrastHeaderClassName } from '../../../internal/utils/content-header-utils';\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { AppLayoutInternals } from '../interfaces';\nimport { NotificationsSkeleton } from '../skeleton/skeleton-parts';\nimport { NotificationsSlot } from '../skeleton/slots';\n\nimport testutilStyles from '../../test-classes/styles.css.js';\nimport styles from './styles.css.js';\n\nexport interface AppLayoutNotificationsImplementationProps {\n appLayoutInternals: AppLayoutInternals;\n children: React.ReactNode;\n}\n\nexport function AppLayoutNotificationsImplementation({\n appLayoutInternals,\n children,\n}: AppLayoutNotificationsImplementationProps) {\n const { ariaLabels, stickyNotifications, setNotificationsHeight, verticalOffsets } = appLayoutInternals;\n const [hasNotificationsContent, setHasNotificationsContent] = useState(false);\n const rootRef = useRef<HTMLDivElement>(null);\n\n useResizeObserver(rootRef, entry => {\n const hasContent = entry.contentBoxHeight > 0;\n setNotificationsHeight(hasContent ? entry.borderBoxHeight : 0);\n setHasNotificationsContent(hasContent);\n });\n useEffect(() => {\n return () => {\n setNotificationsHeight(0);\n };\n // unmount effect only\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n return (\n <NotificationsSlot\n ref={rootRef}\n className={clsx(\n appLayoutInternals.headerVariant === 'high-contrast' && highContrastHeaderClassName,\n stickyNotifications && styles['sticky-notifications'],\n hasNotificationsContent && styles['has-notifications-content'],\n appLayoutInternals.headerVariant !== 'high-contrast' && styles['sticky-notifications-with-background']\n )}\n style={{\n insetBlockStart: stickyNotifications ? verticalOffsets.notifications : undefined,\n }}\n >\n <div className={testutilStyles.notifications} role=\"region\" aria-label={ariaLabels?.notifications}>\n {children}\n </div>\n </NotificationsSlot>\n );\n}\n\nexport const createWidgetizedAppLayoutNotifications = createWidgetizedComponent(\n AppLayoutNotificationsImplementation,\n NotificationsSkeleton\n);\n"]}
@@ -1,17 +1,18 @@
1
- import React from 'react';
2
- import { AppLayoutPropsWithDefaults } from '../../interfaces';
3
- interface SkeletonLayoutProps extends Pick<AppLayoutPropsWithDefaults, 'notifications' | 'headerVariant' | 'contentHeader' | 'content' | 'contentType' | 'maxContentWidth' | 'disableContentPaddings' | 'navigation' | 'navigationOpen' | 'navigationWidth' | 'tools' | 'toolsOpen' | 'toolsWidth' | 'placement'> {
4
- style?: React.CSSProperties;
5
- toolbar?: React.ReactNode;
6
- splitPanelOpen?: boolean;
7
- sideSplitPanel?: React.ReactNode;
8
- bottomSplitPanel?: React.ReactNode;
9
- globalTools?: React.ReactNode;
10
- globalToolsOpen?: boolean;
11
- navigationAnimationDisabled?: boolean;
12
- isNested?: boolean;
13
- drawerExpandedMode: boolean;
14
- drawerExpandedModeInChildLayout: boolean;
1
+ /// <reference types="react" />
2
+ import { AppLayoutInternalProps, AppLayoutPendingState } from '../interfaces';
3
+ import { ToolbarProps } from '../toolbar';
4
+ import { SkeletonSlotsAttributes } from './interfaces';
5
+ export interface SkeletonLayoutProps {
6
+ registered: boolean;
7
+ appLayoutProps: AppLayoutInternalProps;
8
+ appLayoutState: AppLayoutPendingState;
9
+ toolbarProps: ToolbarProps | null;
10
+ skeletonSlotsAttributes: SkeletonSlotsAttributes;
15
11
  }
16
- export declare const SkeletonLayout: React.ForwardRefExoticComponent<SkeletonLayoutProps & React.RefAttributes<HTMLDivElement>>;
17
- export {};
12
+ export declare const SkeletonLayout: ({
13
+ registered,
14
+ appLayoutProps,
15
+ appLayoutState,
16
+ toolbarProps,
17
+ skeletonSlotsAttributes
18
+ }: SkeletonLayoutProps) => JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/skeleton/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAQ9D,UAAU,mBACR,SAAQ,IAAI,CACV,0BAA0B,EACxB,eAAe,GACf,eAAe,GACf,eAAe,GACf,SAAS,GACT,aAAa,GACb,iBAAiB,GACjB,wBAAwB,GACxB,YAAY,GACZ,gBAAgB,GAChB,iBAAiB,GACjB,OAAO,GACP,WAAW,GACX,YAAY,GACZ,WAAW,CACd;IACD,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,+BAA+B,EAAE,OAAO,CAAC;CAC1C;AAUD,eAAO,MAAM,cAAc,4FA0H1B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/skeleton/index.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAO9E,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAqB,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAK1E,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,sBAAsB,CAAC;IACvC,cAAc,EAAE,qBAAqB,CAAC;IACtC,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAClC,uBAAuB,EAAE,uBAAuB,CAAC;CAClD;AAUD,eAAO,MAAM,cAAc,2FAMxB,mBAAmB,gBAmDrB,CAAC"}
@@ -5,12 +5,9 @@ import clsx from 'clsx';
5
5
  import { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';
6
6
  import VisualContext from '../../../internal/components/visual-context';
7
7
  import customCssProps from '../../../internal/generated/custom-css-properties';
8
- import { useMobile } from '../../../internal/hooks/use-mobile';
9
- import { highContrastHeaderClassName } from '../../../internal/utils/content-header-utils';
10
- import sharedStyles from '../../resize/styles.css.js';
8
+ import { AppLayoutAfterMainSlot, AppLayoutBeforeMainSlot, AppLayoutBottomContentSlot, AppLayoutTopContentSlot, } from '../internal';
11
9
  import testutilStyles from '../../test-classes/styles.css.js';
12
10
  import styles from './styles.css.js';
13
- const contentTypeCustomWidths = ['dashboard', 'cards', 'table'];
14
11
  const componentAnalyticsMetadata = {
15
12
  name: 'awsui.AppLayoutToolbar',
16
13
  label: {
@@ -18,32 +15,26 @@ const componentAnalyticsMetadata = {
18
15
  root: 'body',
19
16
  },
20
17
  };
21
- export const SkeletonLayout = React.forwardRef(({ style, notifications, headerVariant, contentHeader, content, navigation, navigationOpen, navigationWidth, tools, globalTools, toolsOpen, toolsWidth, toolbar, sideSplitPanel, bottomSplitPanel, splitPanelOpen, placement, contentType, maxContentWidth, disableContentPaddings, globalToolsOpen, navigationAnimationDisabled, isNested, drawerExpandedMode, drawerExpandedModeInChildLayout, }, ref) => {
22
- const isMobile = useMobile();
23
- const isMaxWidth = maxContentWidth === Number.MAX_VALUE || maxContentWidth === Number.MAX_SAFE_INTEGER;
24
- const anyPanelOpen = navigationOpen || toolsOpen;
18
+ export const SkeletonLayout = ({ registered, appLayoutProps, appLayoutState, toolbarProps, skeletonSlotsAttributes, }) => {
19
+ var _a, _b, _c, _d, _e;
20
+ const { contentHeader, content, navigationWidth } = appLayoutProps;
21
+ const mergedProps = {
22
+ toolbarProps,
23
+ appLayoutProps,
24
+ appLayoutState,
25
+ };
26
+ const { wrapperElAttributes, mainElAttributes, contentWrapperElAttributes, contentHeaderElAttributes, contentElAttributes, } = skeletonSlotsAttributes;
25
27
  return (React.createElement(VisualContext, { contextName: "app-layout-toolbar" },
26
- React.createElement("div", Object.assign({ ref: ref, className: clsx(styles.root, testutilStyles.root, {
27
- [styles['has-adaptive-widths-default']]: !contentTypeCustomWidths.includes(contentType),
28
- [styles['has-adaptive-widths-dashboard']]: contentType === 'dashboard',
29
- [styles['drawer-expanded-mode']]: drawerExpandedMode,
30
- }), style: {
31
- minBlockSize: isNested ? '100%' : `calc(100vh - ${placement.insetBlockStart + placement.insetBlockEnd}px)`,
32
- [customCssProps.maxContentWidth]: isMaxWidth ? '100%' : maxContentWidth ? `${maxContentWidth}px` : '',
28
+ React.createElement("div", Object.assign({}, getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata }), { ref: appLayoutState.rootRef, "data-awsui-app-layout-widget-loaded": false }, wrapperElAttributes, { className: (_a = wrapperElAttributes === null || wrapperElAttributes === void 0 ? void 0 : wrapperElAttributes.className) !== null && _a !== void 0 ? _a : clsx(styles.root, testutilStyles.root), style: (_b = wrapperElAttributes === null || wrapperElAttributes === void 0 ? void 0 : wrapperElAttributes.style) !== null && _b !== void 0 ? _b : {
33
29
  [customCssProps.navigationWidth]: `${navigationWidth}px`,
34
- [customCssProps.toolsWidth]: `${toolsWidth}px`,
35
- } }, getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata })),
36
- toolbar,
37
- navigation && (React.createElement("div", { className: clsx(styles.navigation, !navigationOpen && styles['panel-hidden'], toolsOpen && styles['unfocusable-mobile'], !navigationAnimationDisabled && sharedStyles['with-motion-horizontal'], (drawerExpandedMode || drawerExpandedModeInChildLayout) && styles.hidden) }, navigation)),
38
- React.createElement("main", { className: clsx(styles['main-landmark'], isMobile && anyPanelOpen && styles['unfocusable-mobile'], drawerExpandedMode && styles.hidden) },
39
- notifications && (React.createElement("div", { className: clsx(styles['notifications-background'], headerVariant === 'high-contrast' && highContrastHeaderClassName) })),
40
- notifications,
41
- React.createElement("div", { className: clsx(styles.main, { [styles['main-disable-paddings']]: disableContentPaddings }), style: style },
42
- contentHeader && React.createElement("div", { className: styles['content-header'] }, contentHeader),
43
- React.createElement("div", { className: clsx(styles.content, testutilStyles.content) }, content)),
44
- bottomSplitPanel && (React.createElement("div", { className: clsx(styles['split-panel-bottom']), style: { insetBlockEnd: placement.insetBlockEnd } }, bottomSplitPanel))),
45
- sideSplitPanel && (React.createElement("div", { className: clsx(styles['split-panel-side'], !splitPanelOpen && styles['panel-hidden'], drawerExpandedMode && styles.hidden) }, sideSplitPanel)),
46
- React.createElement("div", { className: clsx(styles.tools, !toolsOpen && styles['panel-hidden'], sharedStyles['with-motion-horizontal'], navigationOpen && !toolsOpen && styles['unfocusable-mobile'], toolsOpen && styles['tools-open'], drawerExpandedMode && styles.hidden) }, tools),
47
- React.createElement("div", { className: clsx(styles['global-tools'], !globalToolsOpen && styles['panel-hidden']) }, globalTools))));
48
- });
30
+ } }),
31
+ React.createElement(AppLayoutBeforeMainSlot, Object.assign({}, mergedProps)),
32
+ React.createElement("main", Object.assign({}, mainElAttributes, { className: (_c = mainElAttributes === null || mainElAttributes === void 0 ? void 0 : mainElAttributes.className) !== null && _c !== void 0 ? _c : styles['main-landmark'] }),
33
+ React.createElement(AppLayoutTopContentSlot, Object.assign({}, mergedProps)),
34
+ React.createElement("div", Object.assign({}, contentWrapperElAttributes, { className: (_d = contentWrapperElAttributes === null || contentWrapperElAttributes === void 0 ? void 0 : contentWrapperElAttributes.className) !== null && _d !== void 0 ? _d : clsx(styles.main, { [styles['main-disable-paddings']]: appLayoutProps.disableContentPaddings }) }),
35
+ contentHeader && React.createElement("div", Object.assign({}, contentHeaderElAttributes), contentHeader),
36
+ React.createElement("div", Object.assign({}, contentElAttributes, { className: (_e = contentElAttributes === null || contentElAttributes === void 0 ? void 0 : contentElAttributes.className) !== null && _e !== void 0 ? _e : testutilStyles.content }), registered ? content : null)),
37
+ React.createElement(AppLayoutBottomContentSlot, Object.assign({}, mergedProps))),
38
+ React.createElement(AppLayoutAfterMainSlot, Object.assign({}, mergedProps)))));
39
+ };
49
40
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","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I,CAAC,SAAS,IAAI,MAAM,CAAC,oBAAoB,CAAC,EAC5D,SAAS,IAAI,MAAM,CAAC,YAAY,CAAC,EACjC,kBAAkB,IAAI,MAAM,CAAC,MAAM,CACpC,IAEA,KAAK,CACF;YACN,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC,eAAe,IAAI,MAAM,CAAC,cAAc,CAAC,CAAC,IAAG,WAAW,CAAO,CACzG,CACQ,CACjB,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { GeneratedAnalyticsMetadataAppLayoutToolbarComponent } from '../../../app-layout-toolbar/analytics-metadata/interfaces';\nimport VisualContext from '../../../internal/components/visual-context';\nimport customCssProps from '../../../internal/generated/custom-css-properties';\nimport { useMobile } from '../../../internal/hooks/use-mobile';\nimport { highContrastHeaderClassName } from '../../../internal/utils/content-header-utils';\nimport { AppLayoutPropsWithDefaults } from '../../interfaces';\n\nimport sharedStyles from '../../resize/styles.css.js';\nimport testutilStyles from '../../test-classes/styles.css.js';\nimport styles from './styles.css.js';\n\nconst contentTypeCustomWidths: Array<string | undefined> = ['dashboard', 'cards', 'table'];\n\ninterface SkeletonLayoutProps\n extends Pick<\n AppLayoutPropsWithDefaults,\n | 'notifications'\n | 'headerVariant'\n | 'contentHeader'\n | 'content'\n | 'contentType'\n | 'maxContentWidth'\n | 'disableContentPaddings'\n | 'navigation'\n | 'navigationOpen'\n | 'navigationWidth'\n | 'tools'\n | 'toolsOpen'\n | 'toolsWidth'\n | 'placement'\n > {\n style?: React.CSSProperties;\n toolbar?: React.ReactNode;\n splitPanelOpen?: boolean;\n sideSplitPanel?: React.ReactNode;\n bottomSplitPanel?: React.ReactNode;\n globalTools?: React.ReactNode;\n globalToolsOpen?: boolean;\n navigationAnimationDisabled?: boolean;\n isNested?: boolean;\n drawerExpandedMode: boolean;\n drawerExpandedModeInChildLayout: boolean;\n}\n\nconst componentAnalyticsMetadata: GeneratedAnalyticsMetadataAppLayoutToolbarComponent = {\n name: 'awsui.AppLayoutToolbar',\n label: {\n selector: 'h1',\n root: 'body',\n },\n};\n\nexport const SkeletonLayout = React.forwardRef<HTMLDivElement, SkeletonLayoutProps>(\n (\n {\n style,\n notifications,\n headerVariant,\n contentHeader,\n content,\n navigation,\n navigationOpen,\n navigationWidth,\n tools,\n globalTools,\n toolsOpen,\n toolsWidth,\n toolbar,\n sideSplitPanel,\n bottomSplitPanel,\n splitPanelOpen,\n placement,\n contentType,\n maxContentWidth,\n disableContentPaddings,\n globalToolsOpen,\n navigationAnimationDisabled,\n isNested,\n drawerExpandedMode,\n drawerExpandedModeInChildLayout,\n },\n ref\n ) => {\n const isMobile = useMobile();\n const isMaxWidth = maxContentWidth === Number.MAX_VALUE || maxContentWidth === Number.MAX_SAFE_INTEGER;\n const anyPanelOpen = navigationOpen || toolsOpen;\n return (\n <VisualContext contextName=\"app-layout-toolbar\">\n <div\n ref={ref}\n className={clsx(styles.root, testutilStyles.root, {\n [styles['has-adaptive-widths-default']]: !contentTypeCustomWidths.includes(contentType),\n [styles['has-adaptive-widths-dashboard']]: contentType === 'dashboard',\n [styles['drawer-expanded-mode']]: drawerExpandedMode,\n })}\n style={{\n minBlockSize: isNested ? '100%' : `calc(100vh - ${placement.insetBlockStart + placement.insetBlockEnd}px)`,\n [customCssProps.maxContentWidth]: isMaxWidth ? '100%' : maxContentWidth ? `${maxContentWidth}px` : '',\n [customCssProps.navigationWidth]: `${navigationWidth}px`,\n [customCssProps.toolsWidth]: `${toolsWidth}px`,\n }}\n {...getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata })}\n >\n {toolbar}\n {navigation && (\n <div\n className={clsx(\n styles.navigation,\n !navigationOpen && styles['panel-hidden'],\n toolsOpen && styles['unfocusable-mobile'],\n !navigationAnimationDisabled && sharedStyles['with-motion-horizontal'],\n (drawerExpandedMode || drawerExpandedModeInChildLayout) && styles.hidden\n )}\n >\n {navigation}\n </div>\n )}\n <main\n className={clsx(\n styles['main-landmark'],\n isMobile && anyPanelOpen && styles['unfocusable-mobile'],\n drawerExpandedMode && styles.hidden\n )}\n >\n {notifications && (\n <div\n className={clsx(\n styles['notifications-background'],\n headerVariant === 'high-contrast' && highContrastHeaderClassName\n )}\n ></div>\n )}\n {notifications}\n <div\n className={clsx(styles.main, { [styles['main-disable-paddings']]: disableContentPaddings })}\n style={style}\n >\n {contentHeader && <div className={styles['content-header']}>{contentHeader}</div>}\n <div className={clsx(styles.content, testutilStyles.content)}>{content}</div>\n </div>\n {bottomSplitPanel && (\n <div className={clsx(styles['split-panel-bottom'])} style={{ insetBlockEnd: placement.insetBlockEnd }}>\n {bottomSplitPanel}\n </div>\n )}\n </main>\n {sideSplitPanel && (\n <div\n className={clsx(\n styles['split-panel-side'],\n !splitPanelOpen && styles['panel-hidden'],\n drawerExpandedMode && styles.hidden\n )}\n >\n {sideSplitPanel}\n </div>\n )}\n <div\n className={clsx(\n styles.tools,\n !toolsOpen && styles['panel-hidden'],\n sharedStyles['with-motion-horizontal'],\n navigationOpen && !toolsOpen && styles['unfocusable-mobile'],\n toolsOpen && styles['tools-open'],\n drawerExpandedMode && styles.hidden\n )}\n >\n {tools}\n </div>\n <div className={clsx(styles['global-tools'], !globalToolsOpen && styles['panel-hidden'])}>{globalTools}</div>\n </div>\n </VisualContext>\n );\n }\n);\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/skeleton/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAA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G,eAAe,IAAI;aACzD;YAGH,oBAAC,uBAAuB,oBAAK,WAAW,EAAI;YAC5C,8CAAU,gBAAgB,IAAE,SAAS,EAAE,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,SAAS,mCAAI,MAAM,CAAC,eAAe,CAAC;gBAC3F,oBAAC,uBAAuB,oBAAK,WAAW,EAAI;gBAC5C,6CACM,0BAA0B,IAC9B,SAAS,EACP,MAAA,0BAA0B,aAA1B,0BAA0B,uBAA1B,0BAA0B,CAAE,SAAS,mCACrC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC,EAAE,cAAc,CAAC,sBAAsB,EAAE,CAAC;oBAGhG,aAAa,IAAI,6CAAS,yBAAyB,GAAG,aAAa,CAAO;oBAE3E,6CAAS,mBAAmB,IAAE,SAAS,EAAE,MAAA,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAE,SAAS,mCAAI,cAAc,CAAC,OAAO,KAC9F,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CACxB,CACF;gBACN,oBAAC,0BAA0B,oBAAK,WAAW,EAAI,CAC1C;YACP,oBAAC,sBAAsB,oBAAK,WAAW,EAAI,CACvC,CACQ,CACjB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { GeneratedAnalyticsMetadataAppLayoutToolbarComponent } from '../../../app-layout-toolbar/analytics-metadata/interfaces';\nimport VisualContext from '../../../internal/components/visual-context';\nimport customCssProps from '../../../internal/generated/custom-css-properties';\nimport { AppLayoutInternalProps, AppLayoutPendingState } from '../interfaces';\nimport {\n AppLayoutAfterMainSlot,\n AppLayoutBeforeMainSlot,\n AppLayoutBottomContentSlot,\n AppLayoutTopContentSlot,\n} from '../internal';\nimport { ToolbarProps } from '../toolbar';\nimport { SkeletonPartProps, SkeletonSlotsAttributes } from './interfaces';\n\nimport testutilStyles from '../../test-classes/styles.css.js';\nimport styles from './styles.css.js';\n\nexport interface SkeletonLayoutProps {\n registered: boolean;\n appLayoutProps: AppLayoutInternalProps;\n appLayoutState: AppLayoutPendingState;\n toolbarProps: ToolbarProps | null;\n skeletonSlotsAttributes: SkeletonSlotsAttributes;\n}\n\nconst componentAnalyticsMetadata: GeneratedAnalyticsMetadataAppLayoutToolbarComponent = {\n name: 'awsui.AppLayoutToolbar',\n label: {\n selector: 'h1',\n root: 'body',\n },\n};\n\nexport const SkeletonLayout = ({\n registered,\n appLayoutProps,\n appLayoutState,\n toolbarProps,\n skeletonSlotsAttributes,\n}: SkeletonLayoutProps) => {\n const { contentHeader, content, navigationWidth } = appLayoutProps;\n const mergedProps: SkeletonPartProps = {\n toolbarProps,\n appLayoutProps,\n appLayoutState,\n };\n const {\n wrapperElAttributes,\n mainElAttributes,\n contentWrapperElAttributes,\n contentHeaderElAttributes,\n contentElAttributes,\n } = skeletonSlotsAttributes;\n\n return (\n <VisualContext contextName=\"app-layout-toolbar\">\n <div\n {...getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata })}\n ref={appLayoutState.rootRef as React.Ref<HTMLDivElement>}\n data-awsui-app-layout-widget-loaded={false}\n {...wrapperElAttributes}\n className={wrapperElAttributes?.className ?? clsx(styles.root, testutilStyles.root)}\n style={\n wrapperElAttributes?.style ?? {\n [customCssProps.navigationWidth]: `${navigationWidth}px`,\n }\n }\n >\n <AppLayoutBeforeMainSlot {...mergedProps} />\n <main {...mainElAttributes} className={mainElAttributes?.className ?? styles['main-landmark']}>\n <AppLayoutTopContentSlot {...mergedProps} />\n <div\n {...contentWrapperElAttributes}\n className={\n contentWrapperElAttributes?.className ??\n clsx(styles.main, { [styles['main-disable-paddings']]: appLayoutProps.disableContentPaddings })\n }\n >\n {contentHeader && <div {...contentHeaderElAttributes}>{contentHeader}</div>}\n {/*delay rendering the content until registration of this instance is complete*/}\n <div {...contentElAttributes} className={contentElAttributes?.className ?? testutilStyles.content}>\n {registered ? content : null}\n </div>\n </div>\n <AppLayoutBottomContentSlot {...mergedProps} />\n </main>\n <AppLayoutAfterMainSlot {...mergedProps} />\n </div>\n </VisualContext>\n );\n};\n"]}
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { AppLayoutInternalProps, AppLayoutPendingState } from '../interfaces';
3
+ import { ToolbarProps } from '../toolbar';
4
+ interface ElementAttributes {
5
+ className?: string;
6
+ style?: React.CSSProperties;
7
+ }
8
+ export interface SkeletonSlotsAttributes {
9
+ wrapperElAttributes?: ElementAttributes;
10
+ mainElAttributes?: ElementAttributes;
11
+ contentWrapperElAttributes?: ElementAttributes;
12
+ contentHeaderElAttributes?: ElementAttributes;
13
+ contentElAttributes?: ElementAttributes;
14
+ }
15
+ export interface SkeletonPartProps {
16
+ appLayoutProps: AppLayoutInternalProps;
17
+ toolbarProps: ToolbarProps | null;
18
+ appLayoutState: AppLayoutPendingState;
19
+ }
20
+ export {};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/skeleton/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,UAAU,iBAAiB;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,MAAM,WAAW,uBAAuB;IACtC,mBAAmB,CAAC,EAAE,iBAAiB,CAAC;IACxC,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;IACrC,0BAA0B,CAAC,EAAE,iBAAiB,CAAC;IAC/C,yBAAyB,CAAC,EAAE,iBAAiB,CAAC;IAC9C,mBAAmB,CAAC,EAAE,iBAAiB,CAAC;CACzC;AAED,MAAM,WAAW,iBAAiB;IAChC,cAAc,EAAE,sBAAsB,CAAC;IACvC,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAClC,cAAc,EAAE,qBAAqB,CAAC;CACvC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/skeleton/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { AppLayoutInternalProps, AppLayoutPendingState } from '../interfaces';\nimport { ToolbarProps } from '../toolbar';\n\ninterface ElementAttributes {\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport interface SkeletonSlotsAttributes {\n wrapperElAttributes?: ElementAttributes;\n mainElAttributes?: ElementAttributes;\n contentWrapperElAttributes?: ElementAttributes;\n contentHeaderElAttributes?: ElementAttributes;\n contentElAttributes?: ElementAttributes;\n}\n\nexport interface SkeletonPartProps {\n appLayoutProps: AppLayoutInternalProps;\n toolbarProps: ToolbarProps | null;\n appLayoutState: AppLayoutPendingState;\n}\n"]}
@@ -0,0 +1,7 @@
1
+ import { MergeProps, SharedProps } from '../state/interfaces';
2
+ import { ToolbarProps } from '../toolbar';
3
+ export type DeduplicationType = 'primary' | 'secondary' | 'suspended' | 'off';
4
+ export declare function useMultiAppLayout(forceDeduplicationType: DeduplicationType, isEnabled: boolean, props: SharedProps, mergeProps: MergeProps): {
5
+ registered: boolean;
6
+ toolbarProps: ToolbarProps | null;
7
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multi-layout.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/skeleton/multi-layout.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,WAAW,GAAG,WAAW,GAAG,KAAK,CAAC;AAE9E,wBAAgB,iBAAiB,CAC/B,sBAAsB,EAAE,iBAAiB,EACzC,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,WAAW,EAClB,UAAU,EAAE,UAAU,GACrB;IAAE,UAAU,EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAAA;CAAE,CAwC5D"}