@cloudscape-design/components 3.0.1192 → 3.0.1193
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.
- package/app-layout/classic.js +2 -2
- package/app-layout/classic.js.map +1 -1
- package/error-boundary/fallback.d.ts +2 -1
- package/error-boundary/fallback.d.ts.map +1 -1
- package/error-boundary/fallback.js +4 -2
- package/error-boundary/fallback.js.map +1 -1
- package/error-boundary/interfaces.d.ts +2 -1
- package/error-boundary/interfaces.d.ts.map +1 -1
- package/error-boundary/interfaces.js.map +1 -1
- package/internal/base-component/styles.scoped.css +1 -1
- package/internal/environment.js +2 -2
- package/internal/environment.json +2 -2
- package/internal/manifest.json +1 -1
- package/package.json +1 -1
package/app-layout/classic.js
CHANGED
|
@@ -249,7 +249,7 @@ const ClassicAppLayout = React.forwardRef(({ navigation, navigationWidth, naviga
|
|
|
249
249
|
: splitPanelReportedHeaderHeight)) !== null && _a !== void 0 ? _a : undefined;
|
|
250
250
|
const [mobileBarHeight, mobileBarRef] = useContainerQuery(rect => rect.contentBoxHeight);
|
|
251
251
|
return (React.createElement("div", { className: clsx(styles.root, testutilStyles.root, disableBodyScroll && styles['root-no-scroll']), ref: rootRef, style: contentHeightStyle },
|
|
252
|
-
isMobile && !__embeddedViewMode && (!toolsHide || !navigationHide || breadcrumbs) && (React.createElement(MobileToolbar, { anyPanelOpen: anyPanelOpen, toggleRefs: { navigation: navigationRefs.toggle, tools: toolsRefs.toggle }, topOffset: placement.insetBlockStart, ariaLabels: ariaLabels, navigationHide: navigationHide, toolsHide: toolsHide, onNavigationOpen: () => onNavigationToggle({ isOpen: true, autoFocus: true }), onToolsOpen: () => onToolsToggle(true), unfocusable: anyPanelOpen, mobileBarRef: mobileBarRef, drawers: drawers, activeDrawerId: activeDrawerId, onDrawerChange: newDrawerId => {
|
|
252
|
+
isMobile && !__embeddedViewMode && (!toolsHide || !navigationHide || breadcrumbs) && (React.createElement(MobileToolbar, { anyPanelOpen: anyPanelOpen, toggleRefs: { navigation: navigationRefs.toggle, tools: toolsRefs.toggle }, topOffset: placement.insetBlockStart, ariaLabels: ariaLabels, navigationHide: navigationHide, toolsHide: toolsHide, onNavigationOpen: () => onNavigationToggle({ isOpen: true, autoFocus: true }), onToolsOpen: () => onToolsToggle(true), unfocusable: anyPanelOpen, mobileBarRef: mobileBarRef, drawers: drawers === null || drawers === void 0 ? void 0 : drawers.filter(drawer => drawer.trigger), activeDrawerId: activeDrawerId, onDrawerChange: newDrawerId => {
|
|
253
253
|
onActiveDrawerChange(newDrawerId, { initiatedByUserAction: true });
|
|
254
254
|
if (newDrawerId !== activeDrawerId) {
|
|
255
255
|
focusToolsButtons();
|
|
@@ -293,7 +293,7 @@ const ClassicAppLayout = React.forwardRef(({ navigation, navigationWidth, naviga
|
|
|
293
293
|
onActiveDrawerChange(null, { initiatedByUserAction: true });
|
|
294
294
|
}
|
|
295
295
|
}, isOpen: true, hideOpenButton: true, toggleRefs: drawerRefs, type: "tools", onLoseFocus: loseDrawersFocus, activeDrawer: activeDrawer, onResize: changeDetail => onActiveDrawerResize(changeDetail), refs: drawerRefs, toolsContent: (_g = drawers === null || drawers === void 0 ? void 0 : drawers.find(drawer => drawer.id === TOOLS_DRAWER_ID)) === null || _g === void 0 ? void 0 : _g.content }, activeDrawer === null || activeDrawer === void 0 ? void 0 : activeDrawer.content)) : (!toolsHide && (React.createElement(Drawer, { contentClassName: testutilStyles.tools, toggleClassName: testutilStyles['tools-toggle'], closeClassName: testutilStyles['tools-close'], ariaLabels: togglesConfig.tools.getLabels(ariaLabels), width: toolsWidth, bottomOffset: placement.insetBlockEnd, topOffset: placement.insetBlockStart, isMobile: isMobile, onToggle: onToolsToggle, isOpen: toolsOpen, toggleRefs: toolsRefs, type: "tools", onLoseFocus: loseToolsFocus }, tools))),
|
|
296
|
-
hasDrawers && drawers.length > 0 && (React.createElement(DrawerTriggersBar, { drawerRefs: drawerRefs, bottomOffset: placement.insetBlockEnd, topOffset: placement.insetBlockStart, isMobile: isMobile, drawers: drawers, activeDrawerId: activeDrawerId, onDrawerChange: newDrawerId => {
|
|
296
|
+
hasDrawers && drawers.length > 0 && (React.createElement(DrawerTriggersBar, { drawerRefs: drawerRefs, bottomOffset: placement.insetBlockEnd, topOffset: placement.insetBlockStart, isMobile: isMobile, drawers: drawers.filter(drawer => drawer.trigger), activeDrawerId: activeDrawerId, onDrawerChange: newDrawerId => {
|
|
297
297
|
if (activeDrawerId !== newDrawerId) {
|
|
298
298
|
focusToolsButtons();
|
|
299
299
|
focusDrawersButtons();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classic.js","sourceRoot":"","sources":["../../../src/app-layout/classic.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAGlF,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EACL,iCAAiC,EACjC,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,cAAuC,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB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AAS,CAAC,aAAa,EACrC,SAAS,EAAE,SAAS,CAAC,eAAe,EACpC,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,WAAW,CAAC,EAAE;oBAC5B,IAAI,cAAc,KAAK,WAAW,EAAE,CAAC;wBACnC,iBAAiB,EAAE,CAAC;wBACpB,mBAAmB,EAAE,CAAC;oBACxB,CAAC;oBACD,oBAAoB,CAAC,WAAW,EAAE,EAAE,qBAAqB,EAAE,IAAI,EAAE,CAAC,CAAC;gBACrE,CAAC,EACD,UAAU,EAAE,UAAU,GACtB,CACH,CACG,CACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useContainerQuery } from '@cloudscape-design/component-toolkit';\nimport { findUpUntil } from '@cloudscape-design/component-toolkit/dom';\nimport { useStableCallback } from '@cloudscape-design/component-toolkit/internal';\n\nimport { SplitPanelSideToggleProps } from '../internal/context/split-panel-context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { useControllable } from '../internal/hooks/use-controllable';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport {\n CONSTRAINED_MAIN_PANEL_MIN_HEIGHT,\n CONSTRAINED_PAGE_HEIGHT,\n getSplitPanelDefaultSize,\n MAIN_PANEL_MIN_HEIGHT,\n} from '../split-panel/utils/size-utils';\nimport ContentWrapper, { ContentWrapperProps } from './content-wrapper';\nimport { Drawer, DrawerTriggersBar } from './drawer';\nimport { ResizableDrawer } from './drawer/resizable-drawer';\nimport { AppLayoutProps, AppLayoutPropsWithDefaults } from './interfaces';\nimport { MobileToolbar } from './mobile-toolbar';\nimport { Notifications } from './notifications';\nimport { SideSplitPanelDrawer, SplitPanelProvider, SplitPanelProviderProps } from './split-panel';\nimport { shouldSplitPanelBeForcedToBottom } from './split-panel/split-panel-forced-position';\nimport { togglesConfig } from './toggles';\nimport { getStickyOffsetVars } from './utils/sticky-offsets';\nimport { TOOLS_DRAWER_ID, useDrawers } from './utils/use-drawers';\nimport { useFocusControl } from './utils/use-focus-control';\nimport { useSplitPanelFocusControl } from './utils/use-split-panel-focus-control';\n\nimport styles from './styles.css.js';\nimport testutilStyles from './test-classes/styles.css.js';\n\nconst ClassicAppLayout = React.forwardRef(\n (\n {\n navigation,\n navigationWidth,\n navigationHide,\n navigationOpen,\n tools,\n toolsWidth,\n toolsHide,\n toolsOpen: controlledToolsOpen,\n breadcrumbs,\n notifications,\n stickyNotifications,\n contentHeader,\n disableContentHeaderOverlap,\n content,\n contentType,\n disableContentPaddings,\n disableBodyScroll,\n maxContentWidth,\n minContentWidth,\n placement,\n ariaLabels,\n splitPanel,\n splitPanelSize: controlledSplitPanelSize,\n splitPanelOpen: controlledSplitPanelOpen,\n splitPanelPreferences: controlledSplitPanelPreferences,\n onSplitPanelPreferencesChange,\n onSplitPanelResize,\n onSplitPanelToggle,\n onNavigationChange,\n onToolsChange,\n drawers: controlledDrawers,\n onDrawerChange,\n activeDrawerId: controlledActiveDrawerId,\n ...rest\n }: AppLayoutPropsWithDefaults,\n ref: React.Ref<AppLayoutProps.Ref>\n ) => {\n // Private API for embedded view mode\n const __embeddedViewMode = Boolean((rest as any).__embeddedViewMode);\n\n const rootRef = useRef<HTMLDivElement>(null);\n const isMobile = useMobile();\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 if (hasDrawers) {\n focusDrawersButtons();\n } else {\n focusToolsButtons();\n }\n fireNonCancelableEvent(onToolsChange, { open });\n };\n\n const {\n drawers,\n activeDrawer,\n minDrawerSize,\n activeDrawerSize,\n activeDrawerId,\n ariaLabelsWithDrawers,\n onActiveDrawerChange,\n onActiveDrawerResize,\n } = useDrawers(\n {\n drawers: controlledDrawers,\n onDrawerChange,\n activeDrawerId: controlledActiveDrawerId,\n ...rest,\n },\n ariaLabels,\n {\n disableDrawersMerge: true,\n ariaLabels,\n tools,\n toolsOpen,\n toolsHide,\n toolsWidth,\n onToolsToggle,\n }\n );\n ariaLabels = ariaLabelsWithDrawers;\n const hasDrawers = !!drawers;\n\n const { refs: navigationRefs, setFocus: focusNavButtons } = useFocusControl(navigationOpen);\n const {\n refs: toolsRefs,\n setFocus: focusToolsButtons,\n loseFocus: loseToolsFocus,\n } = useFocusControl(toolsOpen || activeDrawer !== undefined, true);\n const {\n refs: drawerRefs,\n setFocus: focusDrawersButtons,\n loseFocus: loseDrawersFocus,\n } = useFocusControl(!!activeDrawerId, true, activeDrawerId);\n\n const onNavigationToggle = useStableCallback(({ isOpen, autoFocus }: { isOpen: boolean; autoFocus: boolean }) => {\n focusNavButtons({ force: false, autoFocus });\n fireNonCancelableEvent(onNavigationChange, { open: isOpen });\n });\n\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) {\n onNavigationToggle({ isOpen: false, autoFocus: true });\n }\n };\n\n useEffect(() => {\n // Close navigation drawer on mobile so that the main content is visible\n if (isMobile) {\n onNavigationToggle({ isOpen: false, autoFocus: false });\n }\n }, [isMobile, onNavigationToggle]);\n\n const navigationVisible = !navigationHide && navigationOpen;\n const toolsVisible = !toolsHide && toolsOpen;\n\n const [headerFooterHeight, setHeaderFooterHeight] = useState(0);\n // Delay applying changes in header/footer height, as applying them immediately can cause\n // ResizeOberver warnings due to the algorithm thinking that the change might have side-effects\n // further up the tree, therefore blocking notifications to prevent loops\n useEffect(() => {\n const id = requestAnimationFrame(() =>\n setHeaderFooterHeight(placement.insetBlockStart + placement.insetBlockEnd)\n );\n return () => cancelAnimationFrame(id);\n }, [placement.insetBlockStart, placement.insetBlockEnd]);\n const contentHeightStyle = {\n [disableBodyScroll ? 'blockSize' : 'minBlockSize']: `calc(100vh - ${headerFooterHeight}px)`,\n };\n\n const [notificationsHeight, notificationsRef] = useContainerQuery(rect => rect.contentBoxHeight);\n const anyPanelOpen = navigationVisible || toolsVisible || !!activeDrawer;\n const hasRenderedNotifications = notificationsHeight ? notificationsHeight > 0 : false;\n const stickyNotificationsHeight = stickyNotifications ? (notificationsHeight ?? 0) : 0;\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 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 splitPanelPosition = splitPanelPreferences?.position || 'bottom';\n const [splitPanelReportedToggle, setSplitPanelReportedToggle] = useState<SplitPanelSideToggleProps>({\n displayed: false,\n ariaLabel: undefined,\n });\n const splitPanelDisplayed = !!(splitPanel && (splitPanelReportedToggle.displayed || splitPanelOpen));\n\n const closedDrawerWidth = 40;\n const effectiveNavigationWidth = navigationHide ? 0 : navigationOpen ? navigationWidth : closedDrawerWidth;\n\n const defaultSplitPanelSize = getSplitPanelDefaultSize(splitPanelPosition);\n const [splitPanelSize = defaultSplitPanelSize, setSplitPanelSize] = useControllable(\n controlledSplitPanelSize,\n onSplitPanelResize,\n defaultSplitPanelSize,\n {\n componentName: 'AppLayout',\n controlledProp: 'splitPanelSize',\n changeHandler: 'onSplitPanelResize',\n }\n );\n\n const mainContentRef = useRef<HTMLDivElement>(null);\n const legacyScrollRootRef = useRef<HTMLElement>(null);\n\n const { refs: splitPanelRefs, setLastInteraction: setSplitPanelLastInteraction } = useSplitPanelFocusControl([\n splitPanelPreferences,\n splitPanelOpen,\n ]);\n\n const onSplitPanelPreferencesSet = useCallback(\n (detail: { position: 'side' | 'bottom' }) => {\n setSplitPanelPreferences(detail);\n setSplitPanelLastInteraction({ type: 'position' });\n fireNonCancelableEvent(onSplitPanelPreferencesChange, detail);\n },\n [setSplitPanelPreferences, onSplitPanelPreferencesChange, setSplitPanelLastInteraction]\n );\n const onSplitPanelSizeSet = useCallback(\n (newSize: number) => {\n setSplitPanelSize(newSize);\n fireNonCancelableEvent(onSplitPanelResize, { size: newSize });\n },\n [setSplitPanelSize, onSplitPanelResize]\n );\n\n const onSplitPanelToggleHandler = useCallback(() => {\n setSplitPanelOpen(!splitPanelOpen);\n setSplitPanelLastInteraction({ type: splitPanelOpen ? 'close' : 'open' });\n fireNonCancelableEvent(onSplitPanelToggle, { open: !splitPanelOpen });\n }, [setSplitPanelOpen, splitPanelOpen, onSplitPanelToggle, setSplitPanelLastInteraction]);\n\n const getSplitPanelMaxHeight = useStableCallback(() => {\n if (typeof document === 'undefined') {\n return 0; // render the split panel in its minimum possible size\n } else if (disableBodyScroll && legacyScrollRootRef.current) {\n const availableHeight = legacyScrollRootRef.current.clientHeight;\n return availableHeight < CONSTRAINED_PAGE_HEIGHT ? availableHeight : availableHeight - MAIN_PANEL_MIN_HEIGHT;\n } else {\n const availableHeight =\n document.documentElement.clientHeight - placement.insetBlockStart - placement.insetBlockEnd;\n return availableHeight < CONSTRAINED_PAGE_HEIGHT\n ? availableHeight - CONSTRAINED_MAIN_PANEL_MIN_HEIGHT\n : availableHeight - MAIN_PANEL_MIN_HEIGHT;\n }\n });\n\n const rightDrawerBarWidth = drawers ? (drawers.length > 1 ? closedDrawerWidth : 0) : 0;\n const contentPadding = 80;\n // all content except split-panel + drawers/tools area\n const resizableSpaceAvailable = Math.max(\n 0,\n placement.inlineSize - effectiveNavigationWidth - minContentWidth - contentPadding - rightDrawerBarWidth\n );\n\n const getEffectiveToolsWidth = () => {\n if (activeDrawerSize && activeDrawer) {\n return Math.min(resizableSpaceAvailable, activeDrawerSize);\n }\n\n if (toolsHide || drawers) {\n return 0;\n }\n\n if (toolsOpen) {\n return toolsWidth;\n }\n\n return closedDrawerWidth;\n };\n\n const effectiveToolsWidth = getEffectiveToolsWidth();\n const availableWidthForSplitPanel = resizableSpaceAvailable - effectiveToolsWidth;\n const isSplitPanelForcedPosition = shouldSplitPanelBeForcedToBottom({\n isMobile,\n availableWidthForSplitPanel,\n });\n const finalSplitPanePosition = isSplitPanelForcedPosition ? 'bottom' : splitPanelPosition;\n\n const splitPaneAvailableOnTheSide = splitPanelDisplayed && finalSplitPanePosition === 'side';\n\n const sideSplitPanelSize = splitPaneAvailableOnTheSide ? (splitPanelOpen ? splitPanelSize : closedDrawerWidth) : 0;\n const sideSplitPanelMaxWidth = Math.max(0, resizableSpaceAvailable - effectiveToolsWidth);\n const drawerMaxSize = Math.max(0, resizableSpaceAvailable - sideSplitPanelSize);\n\n const navigationClosedWidth = navigationHide || isMobile ? 0 : closedDrawerWidth;\n\n const contentMaxWidthStyle = !isMobile ? { maxWidth: maxContentWidth } : undefined;\n\n const [splitPanelReportedSize, setSplitPanelReportedSize] = useState(0);\n const [splitPanelReportedHeaderHeight, setSplitPanelReportedHeaderHeight] = useState(0);\n\n const splitPanelContextProps: SplitPanelProviderProps = {\n topOffset: placement.insetBlockStart + (finalSplitPanePosition === 'bottom' ? stickyNotificationsHeight : 0),\n bottomOffset: placement.insetBlockEnd,\n leftOffset:\n placement.insetInlineStart +\n (isMobile ? 0 : !navigationHide && navigationOpen ? navigationWidth : navigationClosedWidth),\n rightOffset: isMobile ? 0 : placement.insetInlineEnd + effectiveToolsWidth + rightDrawerBarWidth,\n position: finalSplitPanePosition,\n size: splitPanelSize,\n maxWidth: sideSplitPanelMaxWidth,\n getMaxHeight: getSplitPanelMaxHeight,\n disableContentPaddings,\n contentWidthStyles: contentMaxWidthStyle,\n isOpen: splitPanelOpen,\n isForcedPosition: isSplitPanelForcedPosition,\n onResize: onSplitPanelSizeSet,\n onToggle: onSplitPanelToggleHandler,\n onPreferencesChange: onSplitPanelPreferencesSet,\n setSplitPanelToggle: setSplitPanelReportedToggle,\n reportSize: setSplitPanelReportedSize,\n reportHeaderHeight: setSplitPanelReportedHeaderHeight,\n refs: splitPanelRefs,\n };\n const splitPanelWrapped = splitPanel && (\n <SplitPanelProvider {...splitPanelContextProps}>\n {finalSplitPanePosition === 'side' ? (\n <SideSplitPanelDrawer displayed={splitPanelDisplayed}>{splitPanel}</SideSplitPanelDrawer>\n ) : (\n splitPanel\n )}\n </SplitPanelProvider>\n );\n\n const contentWrapperProps: ContentWrapperProps = {\n contentType,\n navigationPadding: navigationHide || !!navigationOpen,\n contentWidthStyles: !isMobile ? { minWidth: minContentWidth, maxWidth: maxContentWidth } : undefined,\n toolsPadding:\n // tools padding is displayed in one of the three cases\n // 1. Nothing on the that screen edge (no tools panel and no split panel)\n toolsHide ||\n (hasDrawers && !activeDrawer && (!splitPanelDisplayed || finalSplitPanePosition !== 'side')) ||\n // 2. Tools panel is present and open\n toolsVisible ||\n // 3. Split panel is open in side position\n (splitPaneAvailableOnTheSide && splitPanelOpen),\n isMobile,\n };\n\n useImperativeHandle(ref, () => ({\n openTools: () => onToolsToggle(true),\n closeNavigationIfNecessary: () => {\n if (isMobile) {\n onNavigationToggle({ isOpen: false, autoFocus: true });\n }\n },\n focusToolsClose: () => {\n if (hasDrawers) {\n focusDrawersButtons({ force: true });\n } else {\n focusToolsButtons({ force: true });\n }\n },\n focusActiveDrawer: () => focusDrawersButtons({ force: true }),\n focusSplitPanel: () => splitPanelRefs.slider.current?.focus(),\n }));\n\n const splitPanelBottomOffset =\n (!splitPanelDisplayed || finalSplitPanePosition !== 'bottom'\n ? undefined\n : splitPanelOpen\n ? splitPanelReportedSize\n : splitPanelReportedHeaderHeight) ?? undefined;\n\n const [mobileBarHeight, mobileBarRef] = useContainerQuery(rect => rect.contentBoxHeight);\n\n return (\n <div\n className={clsx(styles.root, testutilStyles.root, disableBodyScroll && styles['root-no-scroll'])}\n ref={rootRef}\n style={contentHeightStyle}\n >\n {isMobile && !__embeddedViewMode && (!toolsHide || !navigationHide || breadcrumbs) && (\n <MobileToolbar\n anyPanelOpen={anyPanelOpen}\n toggleRefs={{ navigation: navigationRefs.toggle, tools: toolsRefs.toggle }}\n topOffset={placement.insetBlockStart}\n ariaLabels={ariaLabels}\n navigationHide={navigationHide}\n toolsHide={toolsHide}\n onNavigationOpen={() => onNavigationToggle({ isOpen: true, autoFocus: true })}\n onToolsOpen={() => onToolsToggle(true)}\n unfocusable={anyPanelOpen}\n mobileBarRef={mobileBarRef}\n drawers={drawers}\n activeDrawerId={activeDrawerId}\n onDrawerChange={newDrawerId => {\n onActiveDrawerChange(newDrawerId, { initiatedByUserAction: true });\n if (newDrawerId !== activeDrawerId) {\n focusToolsButtons();\n focusDrawersButtons();\n }\n }}\n >\n {breadcrumbs}\n </MobileToolbar>\n )}\n <div className={clsx(styles.layout, disableBodyScroll && styles['layout-no-scroll'])}>\n {!navigationHide && (\n <Drawer\n contentClassName={testutilStyles.navigation}\n toggleClassName={testutilStyles['navigation-toggle']}\n closeClassName={testutilStyles['navigation-close']}\n ariaLabels={togglesConfig.navigation.getLabels(ariaLabels)}\n bottomOffset={placement.insetBlockEnd}\n topOffset={placement.insetBlockStart}\n isMobile={isMobile}\n isOpen={navigationOpen}\n onClick={isMobile ? onNavigationClick : undefined}\n onToggle={isOpen => onNavigationToggle({ isOpen, autoFocus: true })}\n toggleRefs={navigationRefs}\n type=\"navigation\"\n width={navigationWidth}\n >\n {navigation}\n </Drawer>\n )}\n <main\n ref={legacyScrollRootRef}\n className={clsx(styles['layout-main'], {\n [styles['layout-main-scrollable']]: disableBodyScroll,\n [testutilStyles['disable-body-scroll-root']]: disableBodyScroll,\n [styles.unfocusable]: isMobile && anyPanelOpen,\n })}\n >\n <div\n style={{\n marginBottom: splitPanelBottomOffset,\n }}\n >\n {notifications && (\n <Notifications\n disableContentPaddings={disableContentPaddings}\n testUtilsClassName={testutilStyles.notifications}\n labels={ariaLabels}\n topOffset={disableBodyScroll ? 0 : placement.insetBlockStart}\n sticky={!isMobile && stickyNotifications}\n ref={notificationsRef}\n >\n {notifications}\n </Notifications>\n )}\n {((!isMobile && breadcrumbs) || contentHeader) && (\n <ContentWrapper {...contentWrapperProps}>\n {!isMobile && breadcrumbs && (\n <div className={clsx(testutilStyles.breadcrumbs, styles['breadcrumbs-desktop'])}>{breadcrumbs}</div>\n )}\n {contentHeader && (\n <div\n className={clsx(\n styles['content-header-wrapper'],\n !hasRenderedNotifications && (isMobile || !breadcrumbs) && styles['content-extra-top-padding'],\n !hasRenderedNotifications && !breadcrumbs && styles['content-header-wrapper-first-child'],\n !disableContentHeaderOverlap && styles['content-header-wrapper-overlapped']\n )}\n >\n {contentHeader}\n </div>\n )}\n </ContentWrapper>\n )}\n <ContentWrapper\n {...contentWrapperProps}\n ref={mainContentRef}\n disablePaddings={disableContentPaddings}\n className={clsx(\n !disableContentPaddings && styles['content-wrapper'],\n !disableContentPaddings &&\n (isMobile || !breadcrumbs) &&\n !contentHeader &&\n styles['content-extra-top-padding'],\n testutilStyles.content,\n !disableContentHeaderOverlap && contentHeader && styles['content-overlapped'],\n !hasRenderedNotifications &&\n !breadcrumbs &&\n !isMobile &&\n !contentHeader &&\n styles['content-wrapper-first-child']\n )}\n style={getStickyOffsetVars(\n placement.insetBlockStart,\n placement.insetBlockEnd + (splitPanelBottomOffset || 0),\n `${stickyNotificationsHeight}px`,\n mobileBarHeight && !disableBodyScroll ? `${mobileBarHeight}px` : '0px',\n !!disableBodyScroll,\n isMobile\n )}\n >\n {content}\n </ContentWrapper>\n </div>\n {finalSplitPanePosition === 'bottom' && splitPanelWrapped}\n </main>\n\n {finalSplitPanePosition === 'side' && splitPanelWrapped}\n\n {hasDrawers ? (\n <ResizableDrawer\n contentClassName={clsx(\n activeDrawerId && testutilStyles['active-drawer'],\n activeDrawerId === TOOLS_DRAWER_ID && testutilStyles.tools\n )}\n toggleClassName={testutilStyles['tools-toggle']}\n closeClassName={clsx(\n testutilStyles['active-drawer-close-button'],\n activeDrawerId === TOOLS_DRAWER_ID && testutilStyles['tools-close']\n )}\n ariaLabels={{\n openLabel: activeDrawer?.ariaLabels?.triggerButton,\n closeLabel: activeDrawer?.ariaLabels?.closeButton,\n mainLabel: activeDrawer?.ariaLabels?.drawerName,\n resizeHandle: activeDrawer?.ariaLabels?.resizeHandle,\n resizeHandleTooltipText: activeDrawer?.ariaLabels?.resizeHandleTooltipText,\n }}\n minWidth={minDrawerSize}\n maxWidth={drawerMaxSize}\n width={activeDrawerSize}\n bottomOffset={placement.insetBlockEnd}\n topOffset={placement.insetBlockStart}\n isMobile={isMobile}\n onToggle={isOpen => {\n if (!isOpen) {\n focusToolsButtons();\n focusDrawersButtons();\n onActiveDrawerChange(null, { initiatedByUserAction: true });\n }\n }}\n isOpen={true}\n hideOpenButton={true}\n toggleRefs={drawerRefs}\n type=\"tools\"\n onLoseFocus={loseDrawersFocus}\n activeDrawer={activeDrawer}\n onResize={changeDetail => onActiveDrawerResize(changeDetail)}\n refs={drawerRefs}\n toolsContent={drawers?.find(drawer => drawer.id === TOOLS_DRAWER_ID)?.content}\n >\n {activeDrawer?.content}\n </ResizableDrawer>\n ) : (\n !toolsHide && (\n <Drawer\n contentClassName={testutilStyles.tools}\n toggleClassName={testutilStyles['tools-toggle']}\n closeClassName={testutilStyles['tools-close']}\n ariaLabels={togglesConfig.tools.getLabels(ariaLabels)}\n width={toolsWidth}\n bottomOffset={placement.insetBlockEnd}\n topOffset={placement.insetBlockStart}\n isMobile={isMobile}\n onToggle={onToolsToggle}\n isOpen={toolsOpen}\n toggleRefs={toolsRefs}\n type=\"tools\"\n onLoseFocus={loseToolsFocus}\n >\n {tools}\n </Drawer>\n )\n )}\n {hasDrawers && drawers.length > 0 && (\n <DrawerTriggersBar\n drawerRefs={drawerRefs}\n bottomOffset={placement.insetBlockEnd}\n topOffset={placement.insetBlockStart}\n isMobile={isMobile}\n drawers={drawers}\n activeDrawerId={activeDrawerId}\n onDrawerChange={newDrawerId => {\n if (activeDrawerId !== newDrawerId) {\n focusToolsButtons();\n focusDrawersButtons();\n }\n onActiveDrawerChange(newDrawerId, { initiatedByUserAction: true });\n }}\n ariaLabels={ariaLabels}\n />\n )}\n </div>\n </div>\n );\n }\n);\n\nexport default ClassicAppLayout;\n"]}
|
|
1
|
+
{"version":3,"file":"classic.js","sourceRoot":"","sources":["../../../src/app-layout/classic.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAGlF,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EACL,iCAAiC,EACjC,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,cAAuC,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,oB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YAAY,EAAE,SAAS,CAAC,aAAa,EACrC,SAAS,EAAE,SAAS,CAAC,eAAe,EACpC,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,EACjD,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,WAAW,CAAC,EAAE;oBAC5B,IAAI,cAAc,KAAK,WAAW,EAAE,CAAC;wBACnC,iBAAiB,EAAE,CAAC;wBACpB,mBAAmB,EAAE,CAAC;oBACxB,CAAC;oBACD,oBAAoB,CAAC,WAAW,EAAE,EAAE,qBAAqB,EAAE,IAAI,EAAE,CAAC,CAAC;gBACrE,CAAC,EACD,UAAU,EAAE,UAAU,GACtB,CACH,CACG,CACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useContainerQuery } from '@cloudscape-design/component-toolkit';\nimport { findUpUntil } from '@cloudscape-design/component-toolkit/dom';\nimport { useStableCallback } from '@cloudscape-design/component-toolkit/internal';\n\nimport { SplitPanelSideToggleProps } from '../internal/context/split-panel-context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { useControllable } from '../internal/hooks/use-controllable';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport {\n CONSTRAINED_MAIN_PANEL_MIN_HEIGHT,\n CONSTRAINED_PAGE_HEIGHT,\n getSplitPanelDefaultSize,\n MAIN_PANEL_MIN_HEIGHT,\n} from '../split-panel/utils/size-utils';\nimport ContentWrapper, { ContentWrapperProps } from './content-wrapper';\nimport { Drawer, DrawerTriggersBar } from './drawer';\nimport { ResizableDrawer } from './drawer/resizable-drawer';\nimport { AppLayoutProps, AppLayoutPropsWithDefaults } from './interfaces';\nimport { MobileToolbar } from './mobile-toolbar';\nimport { Notifications } from './notifications';\nimport { SideSplitPanelDrawer, SplitPanelProvider, SplitPanelProviderProps } from './split-panel';\nimport { shouldSplitPanelBeForcedToBottom } from './split-panel/split-panel-forced-position';\nimport { togglesConfig } from './toggles';\nimport { getStickyOffsetVars } from './utils/sticky-offsets';\nimport { TOOLS_DRAWER_ID, useDrawers } from './utils/use-drawers';\nimport { useFocusControl } from './utils/use-focus-control';\nimport { useSplitPanelFocusControl } from './utils/use-split-panel-focus-control';\n\nimport styles from './styles.css.js';\nimport testutilStyles from './test-classes/styles.css.js';\n\nconst ClassicAppLayout = React.forwardRef(\n (\n {\n navigation,\n navigationWidth,\n navigationHide,\n navigationOpen,\n tools,\n toolsWidth,\n toolsHide,\n toolsOpen: controlledToolsOpen,\n breadcrumbs,\n notifications,\n stickyNotifications,\n contentHeader,\n disableContentHeaderOverlap,\n content,\n contentType,\n disableContentPaddings,\n disableBodyScroll,\n maxContentWidth,\n minContentWidth,\n placement,\n ariaLabels,\n splitPanel,\n splitPanelSize: controlledSplitPanelSize,\n splitPanelOpen: controlledSplitPanelOpen,\n splitPanelPreferences: controlledSplitPanelPreferences,\n onSplitPanelPreferencesChange,\n onSplitPanelResize,\n onSplitPanelToggle,\n onNavigationChange,\n onToolsChange,\n drawers: controlledDrawers,\n onDrawerChange,\n activeDrawerId: controlledActiveDrawerId,\n ...rest\n }: AppLayoutPropsWithDefaults,\n ref: React.Ref<AppLayoutProps.Ref>\n ) => {\n // Private API for embedded view mode\n const __embeddedViewMode = Boolean((rest as any).__embeddedViewMode);\n\n const rootRef = useRef<HTMLDivElement>(null);\n const isMobile = useMobile();\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 if (hasDrawers) {\n focusDrawersButtons();\n } else {\n focusToolsButtons();\n }\n fireNonCancelableEvent(onToolsChange, { open });\n };\n\n const {\n drawers,\n activeDrawer,\n minDrawerSize,\n activeDrawerSize,\n activeDrawerId,\n ariaLabelsWithDrawers,\n onActiveDrawerChange,\n onActiveDrawerResize,\n } = useDrawers(\n {\n drawers: controlledDrawers,\n onDrawerChange,\n activeDrawerId: controlledActiveDrawerId,\n ...rest,\n },\n ariaLabels,\n {\n disableDrawersMerge: true,\n ariaLabels,\n tools,\n toolsOpen,\n toolsHide,\n toolsWidth,\n onToolsToggle,\n }\n );\n ariaLabels = ariaLabelsWithDrawers;\n const hasDrawers = !!drawers;\n\n const { refs: navigationRefs, setFocus: focusNavButtons } = useFocusControl(navigationOpen);\n const {\n refs: toolsRefs,\n setFocus: focusToolsButtons,\n loseFocus: loseToolsFocus,\n } = useFocusControl(toolsOpen || activeDrawer !== undefined, true);\n const {\n refs: drawerRefs,\n setFocus: focusDrawersButtons,\n loseFocus: loseDrawersFocus,\n } = useFocusControl(!!activeDrawerId, true, activeDrawerId);\n\n const onNavigationToggle = useStableCallback(({ isOpen, autoFocus }: { isOpen: boolean; autoFocus: boolean }) => {\n focusNavButtons({ force: false, autoFocus });\n fireNonCancelableEvent(onNavigationChange, { open: isOpen });\n });\n\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) {\n onNavigationToggle({ isOpen: false, autoFocus: true });\n }\n };\n\n useEffect(() => {\n // Close navigation drawer on mobile so that the main content is visible\n if (isMobile) {\n onNavigationToggle({ isOpen: false, autoFocus: false });\n }\n }, [isMobile, onNavigationToggle]);\n\n const navigationVisible = !navigationHide && navigationOpen;\n const toolsVisible = !toolsHide && toolsOpen;\n\n const [headerFooterHeight, setHeaderFooterHeight] = useState(0);\n // Delay applying changes in header/footer height, as applying them immediately can cause\n // ResizeOberver warnings due to the algorithm thinking that the change might have side-effects\n // further up the tree, therefore blocking notifications to prevent loops\n useEffect(() => {\n const id = requestAnimationFrame(() =>\n setHeaderFooterHeight(placement.insetBlockStart + placement.insetBlockEnd)\n );\n return () => cancelAnimationFrame(id);\n }, [placement.insetBlockStart, placement.insetBlockEnd]);\n const contentHeightStyle = {\n [disableBodyScroll ? 'blockSize' : 'minBlockSize']: `calc(100vh - ${headerFooterHeight}px)`,\n };\n\n const [notificationsHeight, notificationsRef] = useContainerQuery(rect => rect.contentBoxHeight);\n const anyPanelOpen = navigationVisible || toolsVisible || !!activeDrawer;\n const hasRenderedNotifications = notificationsHeight ? notificationsHeight > 0 : false;\n const stickyNotificationsHeight = stickyNotifications ? (notificationsHeight ?? 0) : 0;\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 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 splitPanelPosition = splitPanelPreferences?.position || 'bottom';\n const [splitPanelReportedToggle, setSplitPanelReportedToggle] = useState<SplitPanelSideToggleProps>({\n displayed: false,\n ariaLabel: undefined,\n });\n const splitPanelDisplayed = !!(splitPanel && (splitPanelReportedToggle.displayed || splitPanelOpen));\n\n const closedDrawerWidth = 40;\n const effectiveNavigationWidth = navigationHide ? 0 : navigationOpen ? navigationWidth : closedDrawerWidth;\n\n const defaultSplitPanelSize = getSplitPanelDefaultSize(splitPanelPosition);\n const [splitPanelSize = defaultSplitPanelSize, setSplitPanelSize] = useControllable(\n controlledSplitPanelSize,\n onSplitPanelResize,\n defaultSplitPanelSize,\n {\n componentName: 'AppLayout',\n controlledProp: 'splitPanelSize',\n changeHandler: 'onSplitPanelResize',\n }\n );\n\n const mainContentRef = useRef<HTMLDivElement>(null);\n const legacyScrollRootRef = useRef<HTMLElement>(null);\n\n const { refs: splitPanelRefs, setLastInteraction: setSplitPanelLastInteraction } = useSplitPanelFocusControl([\n splitPanelPreferences,\n splitPanelOpen,\n ]);\n\n const onSplitPanelPreferencesSet = useCallback(\n (detail: { position: 'side' | 'bottom' }) => {\n setSplitPanelPreferences(detail);\n setSplitPanelLastInteraction({ type: 'position' });\n fireNonCancelableEvent(onSplitPanelPreferencesChange, detail);\n },\n [setSplitPanelPreferences, onSplitPanelPreferencesChange, setSplitPanelLastInteraction]\n );\n const onSplitPanelSizeSet = useCallback(\n (newSize: number) => {\n setSplitPanelSize(newSize);\n fireNonCancelableEvent(onSplitPanelResize, { size: newSize });\n },\n [setSplitPanelSize, onSplitPanelResize]\n );\n\n const onSplitPanelToggleHandler = useCallback(() => {\n setSplitPanelOpen(!splitPanelOpen);\n setSplitPanelLastInteraction({ type: splitPanelOpen ? 'close' : 'open' });\n fireNonCancelableEvent(onSplitPanelToggle, { open: !splitPanelOpen });\n }, [setSplitPanelOpen, splitPanelOpen, onSplitPanelToggle, setSplitPanelLastInteraction]);\n\n const getSplitPanelMaxHeight = useStableCallback(() => {\n if (typeof document === 'undefined') {\n return 0; // render the split panel in its minimum possible size\n } else if (disableBodyScroll && legacyScrollRootRef.current) {\n const availableHeight = legacyScrollRootRef.current.clientHeight;\n return availableHeight < CONSTRAINED_PAGE_HEIGHT ? availableHeight : availableHeight - MAIN_PANEL_MIN_HEIGHT;\n } else {\n const availableHeight =\n document.documentElement.clientHeight - placement.insetBlockStart - placement.insetBlockEnd;\n return availableHeight < CONSTRAINED_PAGE_HEIGHT\n ? availableHeight - CONSTRAINED_MAIN_PANEL_MIN_HEIGHT\n : availableHeight - MAIN_PANEL_MIN_HEIGHT;\n }\n });\n\n const rightDrawerBarWidth = drawers ? (drawers.length > 1 ? closedDrawerWidth : 0) : 0;\n const contentPadding = 80;\n // all content except split-panel + drawers/tools area\n const resizableSpaceAvailable = Math.max(\n 0,\n placement.inlineSize - effectiveNavigationWidth - minContentWidth - contentPadding - rightDrawerBarWidth\n );\n\n const getEffectiveToolsWidth = () => {\n if (activeDrawerSize && activeDrawer) {\n return Math.min(resizableSpaceAvailable, activeDrawerSize);\n }\n\n if (toolsHide || drawers) {\n return 0;\n }\n\n if (toolsOpen) {\n return toolsWidth;\n }\n\n return closedDrawerWidth;\n };\n\n const effectiveToolsWidth = getEffectiveToolsWidth();\n const availableWidthForSplitPanel = resizableSpaceAvailable - effectiveToolsWidth;\n const isSplitPanelForcedPosition = shouldSplitPanelBeForcedToBottom({\n isMobile,\n availableWidthForSplitPanel,\n });\n const finalSplitPanePosition = isSplitPanelForcedPosition ? 'bottom' : splitPanelPosition;\n\n const splitPaneAvailableOnTheSide = splitPanelDisplayed && finalSplitPanePosition === 'side';\n\n const sideSplitPanelSize = splitPaneAvailableOnTheSide ? (splitPanelOpen ? splitPanelSize : closedDrawerWidth) : 0;\n const sideSplitPanelMaxWidth = Math.max(0, resizableSpaceAvailable - effectiveToolsWidth);\n const drawerMaxSize = Math.max(0, resizableSpaceAvailable - sideSplitPanelSize);\n\n const navigationClosedWidth = navigationHide || isMobile ? 0 : closedDrawerWidth;\n\n const contentMaxWidthStyle = !isMobile ? { maxWidth: maxContentWidth } : undefined;\n\n const [splitPanelReportedSize, setSplitPanelReportedSize] = useState(0);\n const [splitPanelReportedHeaderHeight, setSplitPanelReportedHeaderHeight] = useState(0);\n\n const splitPanelContextProps: SplitPanelProviderProps = {\n topOffset: placement.insetBlockStart + (finalSplitPanePosition === 'bottom' ? stickyNotificationsHeight : 0),\n bottomOffset: placement.insetBlockEnd,\n leftOffset:\n placement.insetInlineStart +\n (isMobile ? 0 : !navigationHide && navigationOpen ? navigationWidth : navigationClosedWidth),\n rightOffset: isMobile ? 0 : placement.insetInlineEnd + effectiveToolsWidth + rightDrawerBarWidth,\n position: finalSplitPanePosition,\n size: splitPanelSize,\n maxWidth: sideSplitPanelMaxWidth,\n getMaxHeight: getSplitPanelMaxHeight,\n disableContentPaddings,\n contentWidthStyles: contentMaxWidthStyle,\n isOpen: splitPanelOpen,\n isForcedPosition: isSplitPanelForcedPosition,\n onResize: onSplitPanelSizeSet,\n onToggle: onSplitPanelToggleHandler,\n onPreferencesChange: onSplitPanelPreferencesSet,\n setSplitPanelToggle: setSplitPanelReportedToggle,\n reportSize: setSplitPanelReportedSize,\n reportHeaderHeight: setSplitPanelReportedHeaderHeight,\n refs: splitPanelRefs,\n };\n const splitPanelWrapped = splitPanel && (\n <SplitPanelProvider {...splitPanelContextProps}>\n {finalSplitPanePosition === 'side' ? (\n <SideSplitPanelDrawer displayed={splitPanelDisplayed}>{splitPanel}</SideSplitPanelDrawer>\n ) : (\n splitPanel\n )}\n </SplitPanelProvider>\n );\n\n const contentWrapperProps: ContentWrapperProps = {\n contentType,\n navigationPadding: navigationHide || !!navigationOpen,\n contentWidthStyles: !isMobile ? { minWidth: minContentWidth, maxWidth: maxContentWidth } : undefined,\n toolsPadding:\n // tools padding is displayed in one of the three cases\n // 1. Nothing on the that screen edge (no tools panel and no split panel)\n toolsHide ||\n (hasDrawers && !activeDrawer && (!splitPanelDisplayed || finalSplitPanePosition !== 'side')) ||\n // 2. Tools panel is present and open\n toolsVisible ||\n // 3. Split panel is open in side position\n (splitPaneAvailableOnTheSide && splitPanelOpen),\n isMobile,\n };\n\n useImperativeHandle(ref, () => ({\n openTools: () => onToolsToggle(true),\n closeNavigationIfNecessary: () => {\n if (isMobile) {\n onNavigationToggle({ isOpen: false, autoFocus: true });\n }\n },\n focusToolsClose: () => {\n if (hasDrawers) {\n focusDrawersButtons({ force: true });\n } else {\n focusToolsButtons({ force: true });\n }\n },\n focusActiveDrawer: () => focusDrawersButtons({ force: true }),\n focusSplitPanel: () => splitPanelRefs.slider.current?.focus(),\n }));\n\n const splitPanelBottomOffset =\n (!splitPanelDisplayed || finalSplitPanePosition !== 'bottom'\n ? undefined\n : splitPanelOpen\n ? splitPanelReportedSize\n : splitPanelReportedHeaderHeight) ?? undefined;\n\n const [mobileBarHeight, mobileBarRef] = useContainerQuery(rect => rect.contentBoxHeight);\n\n return (\n <div\n className={clsx(styles.root, testutilStyles.root, disableBodyScroll && styles['root-no-scroll'])}\n ref={rootRef}\n style={contentHeightStyle}\n >\n {isMobile && !__embeddedViewMode && (!toolsHide || !navigationHide || breadcrumbs) && (\n <MobileToolbar\n anyPanelOpen={anyPanelOpen}\n toggleRefs={{ navigation: navigationRefs.toggle, tools: toolsRefs.toggle }}\n topOffset={placement.insetBlockStart}\n ariaLabels={ariaLabels}\n navigationHide={navigationHide}\n toolsHide={toolsHide}\n onNavigationOpen={() => onNavigationToggle({ isOpen: true, autoFocus: true })}\n onToolsOpen={() => onToolsToggle(true)}\n unfocusable={anyPanelOpen}\n mobileBarRef={mobileBarRef}\n drawers={drawers?.filter(drawer => drawer.trigger)}\n activeDrawerId={activeDrawerId}\n onDrawerChange={newDrawerId => {\n onActiveDrawerChange(newDrawerId, { initiatedByUserAction: true });\n if (newDrawerId !== activeDrawerId) {\n focusToolsButtons();\n focusDrawersButtons();\n }\n }}\n >\n {breadcrumbs}\n </MobileToolbar>\n )}\n <div className={clsx(styles.layout, disableBodyScroll && styles['layout-no-scroll'])}>\n {!navigationHide && (\n <Drawer\n contentClassName={testutilStyles.navigation}\n toggleClassName={testutilStyles['navigation-toggle']}\n closeClassName={testutilStyles['navigation-close']}\n ariaLabels={togglesConfig.navigation.getLabels(ariaLabels)}\n bottomOffset={placement.insetBlockEnd}\n topOffset={placement.insetBlockStart}\n isMobile={isMobile}\n isOpen={navigationOpen}\n onClick={isMobile ? onNavigationClick : undefined}\n onToggle={isOpen => onNavigationToggle({ isOpen, autoFocus: true })}\n toggleRefs={navigationRefs}\n type=\"navigation\"\n width={navigationWidth}\n >\n {navigation}\n </Drawer>\n )}\n <main\n ref={legacyScrollRootRef}\n className={clsx(styles['layout-main'], {\n [styles['layout-main-scrollable']]: disableBodyScroll,\n [testutilStyles['disable-body-scroll-root']]: disableBodyScroll,\n [styles.unfocusable]: isMobile && anyPanelOpen,\n })}\n >\n <div\n style={{\n marginBottom: splitPanelBottomOffset,\n }}\n >\n {notifications && (\n <Notifications\n disableContentPaddings={disableContentPaddings}\n testUtilsClassName={testutilStyles.notifications}\n labels={ariaLabels}\n topOffset={disableBodyScroll ? 0 : placement.insetBlockStart}\n sticky={!isMobile && stickyNotifications}\n ref={notificationsRef}\n >\n {notifications}\n </Notifications>\n )}\n {((!isMobile && breadcrumbs) || contentHeader) && (\n <ContentWrapper {...contentWrapperProps}>\n {!isMobile && breadcrumbs && (\n <div className={clsx(testutilStyles.breadcrumbs, styles['breadcrumbs-desktop'])}>{breadcrumbs}</div>\n )}\n {contentHeader && (\n <div\n className={clsx(\n styles['content-header-wrapper'],\n !hasRenderedNotifications && (isMobile || !breadcrumbs) && styles['content-extra-top-padding'],\n !hasRenderedNotifications && !breadcrumbs && styles['content-header-wrapper-first-child'],\n !disableContentHeaderOverlap && styles['content-header-wrapper-overlapped']\n )}\n >\n {contentHeader}\n </div>\n )}\n </ContentWrapper>\n )}\n <ContentWrapper\n {...contentWrapperProps}\n ref={mainContentRef}\n disablePaddings={disableContentPaddings}\n className={clsx(\n !disableContentPaddings && styles['content-wrapper'],\n !disableContentPaddings &&\n (isMobile || !breadcrumbs) &&\n !contentHeader &&\n styles['content-extra-top-padding'],\n testutilStyles.content,\n !disableContentHeaderOverlap && contentHeader && styles['content-overlapped'],\n !hasRenderedNotifications &&\n !breadcrumbs &&\n !isMobile &&\n !contentHeader &&\n styles['content-wrapper-first-child']\n )}\n style={getStickyOffsetVars(\n placement.insetBlockStart,\n placement.insetBlockEnd + (splitPanelBottomOffset || 0),\n `${stickyNotificationsHeight}px`,\n mobileBarHeight && !disableBodyScroll ? `${mobileBarHeight}px` : '0px',\n !!disableBodyScroll,\n isMobile\n )}\n >\n {content}\n </ContentWrapper>\n </div>\n {finalSplitPanePosition === 'bottom' && splitPanelWrapped}\n </main>\n\n {finalSplitPanePosition === 'side' && splitPanelWrapped}\n\n {hasDrawers ? (\n <ResizableDrawer\n contentClassName={clsx(\n activeDrawerId && testutilStyles['active-drawer'],\n activeDrawerId === TOOLS_DRAWER_ID && testutilStyles.tools\n )}\n toggleClassName={testutilStyles['tools-toggle']}\n closeClassName={clsx(\n testutilStyles['active-drawer-close-button'],\n activeDrawerId === TOOLS_DRAWER_ID && testutilStyles['tools-close']\n )}\n ariaLabels={{\n openLabel: activeDrawer?.ariaLabels?.triggerButton,\n closeLabel: activeDrawer?.ariaLabels?.closeButton,\n mainLabel: activeDrawer?.ariaLabels?.drawerName,\n resizeHandle: activeDrawer?.ariaLabels?.resizeHandle,\n resizeHandleTooltipText: activeDrawer?.ariaLabels?.resizeHandleTooltipText,\n }}\n minWidth={minDrawerSize}\n maxWidth={drawerMaxSize}\n width={activeDrawerSize}\n bottomOffset={placement.insetBlockEnd}\n topOffset={placement.insetBlockStart}\n isMobile={isMobile}\n onToggle={isOpen => {\n if (!isOpen) {\n focusToolsButtons();\n focusDrawersButtons();\n onActiveDrawerChange(null, { initiatedByUserAction: true });\n }\n }}\n isOpen={true}\n hideOpenButton={true}\n toggleRefs={drawerRefs}\n type=\"tools\"\n onLoseFocus={loseDrawersFocus}\n activeDrawer={activeDrawer}\n onResize={changeDetail => onActiveDrawerResize(changeDetail)}\n refs={drawerRefs}\n toolsContent={drawers?.find(drawer => drawer.id === TOOLS_DRAWER_ID)?.content}\n >\n {activeDrawer?.content}\n </ResizableDrawer>\n ) : (\n !toolsHide && (\n <Drawer\n contentClassName={testutilStyles.tools}\n toggleClassName={testutilStyles['tools-toggle']}\n closeClassName={testutilStyles['tools-close']}\n ariaLabels={togglesConfig.tools.getLabels(ariaLabels)}\n width={toolsWidth}\n bottomOffset={placement.insetBlockEnd}\n topOffset={placement.insetBlockStart}\n isMobile={isMobile}\n onToggle={onToolsToggle}\n isOpen={toolsOpen}\n toggleRefs={toolsRefs}\n type=\"tools\"\n onLoseFocus={loseToolsFocus}\n >\n {tools}\n </Drawer>\n )\n )}\n {hasDrawers && drawers.length > 0 && (\n <DrawerTriggersBar\n drawerRefs={drawerRefs}\n bottomOffset={placement.insetBlockEnd}\n topOffset={placement.insetBlockStart}\n isMobile={isMobile}\n drawers={drawers.filter(drawer => drawer.trigger)}\n activeDrawerId={activeDrawerId}\n onDrawerChange={newDrawerId => {\n if (activeDrawerId !== newDrawerId) {\n focusToolsButtons();\n focusDrawersButtons();\n }\n onActiveDrawerChange(newDrawerId, { initiatedByUserAction: true });\n }}\n ariaLabels={ariaLabels}\n />\n )}\n </div>\n </div>\n );\n }\n);\n\nexport default ClassicAppLayout;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fallback.d.ts","sourceRoot":"","sources":["../../../src/error-boundary/fallback.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fallback.d.ts","sourceRoot":"","sources":["../../../src/error-boundary/fallback.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAMlD,wBAAgB,qBAAqB,CAAC,EACpC,WAAgB,EAChB,cAAc,EACd,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,kBAAkB,EAAE,gBAAgB,GAAG,aAAa,CAAC,eA4B5D"}
|
|
@@ -6,11 +6,13 @@ import IntlMessageFormat from 'intl-messageformat';
|
|
|
6
6
|
import InternalAlert from '../alert/internal';
|
|
7
7
|
import InternalButton from '../button/internal';
|
|
8
8
|
import { useInternalI18n } from '../i18n/context';
|
|
9
|
+
import { getBaseProps } from '../internal/base-component';
|
|
9
10
|
import { refreshPage } from './utils';
|
|
10
11
|
import styles from './styles.css.js';
|
|
11
12
|
import testUtilStyles from './test-classes/styles.css.js';
|
|
12
|
-
export function ErrorBoundaryFallback({ i18nStrings = {}, renderFallback, }) {
|
|
13
|
+
export function ErrorBoundaryFallback({ i18nStrings = {}, renderFallback, ...props }) {
|
|
13
14
|
var _a;
|
|
15
|
+
const baseProps = getBaseProps(props);
|
|
14
16
|
const defaultSlots = {
|
|
15
17
|
header: (React.createElement("div", { className: clsx(styles.header, testUtilStyles.header) },
|
|
16
18
|
React.createElement(DefaultHeaderContent, { i18nStrings: i18nStrings }))),
|
|
@@ -19,7 +21,7 @@ export function ErrorBoundaryFallback({ i18nStrings = {}, renderFallback, }) {
|
|
|
19
21
|
action: (React.createElement("div", { className: clsx(styles.action, testUtilStyles.action) },
|
|
20
22
|
React.createElement(DefaultActionContent, { i18nStrings: i18nStrings }))),
|
|
21
23
|
};
|
|
22
|
-
return (React.createElement("div", { className: testUtilStyles.fallback }, (_a = renderFallback === null || renderFallback === void 0 ? void 0 : renderFallback(defaultSlots)) !== null && _a !== void 0 ? _a : (React.createElement(InternalAlert, { type: "error", header: defaultSlots.header, action: defaultSlots.action }, defaultSlots.description))));
|
|
24
|
+
return (React.createElement("div", { ...baseProps, className: clsx(baseProps.className, testUtilStyles.fallback) }, (_a = renderFallback === null || renderFallback === void 0 ? void 0 : renderFallback(defaultSlots)) !== null && _a !== void 0 ? _a : (React.createElement(InternalAlert, { type: "error", header: defaultSlots.header, action: defaultSlots.action }, defaultSlots.description))));
|
|
23
25
|
}
|
|
24
26
|
function DefaultHeaderContent({ i18nStrings }) {
|
|
25
27
|
const i18n = useInternalI18n('error-boundary');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fallback.js","sourceRoot":"","sources":["../../../src/error-boundary/fallback.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,iBAAiB,MAAM,oBAAoB,CAAC;AAEnD,OAAO,aAAa,MAAM,mBAAmB,CAAC;AAC9C,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"fallback.js","sour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CAAC,CAAC,IAAI,iBAAiB,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACjG,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,eAAe,CAAC;QACzB,CAAC;IACH,CAAC;IACD,MAAM,OAAO,GAAG,IAAI,CAAC,6BAA6B,EAAE,UAAU,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;IAE/G,kHAAkH;IAClH,2EAA2E;IAC3E,OAAO,CACL,0CACG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,oBAAC,KAAK,CAAC,QAAQ,IAAC,GAAG,EAAE,CAAC,IAAG,KAAK,CAAkB,CAAC,CAAC,CAAC,CAAC,OAAO,CAC9G,CACJ,CAAC;AACJ,CAAC;AAED,SAAS,oBAAoB,CAAC,EAAE,WAAW,EAAoD;IAC7F,MAAM,IAAI,GAAG,eAAe,CAAC,gBAAgB,CAAC,CAAC;IAC/C,OAAO,CACL,oBAAC,cAAc,IAAC,QAAQ,EAAC,SAAS,EAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,CAAC,gBAAgB,CAAC,IACjG,IAAI,CAAC,+BAA+B,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,iBAAiB,CAAC,CACvD,CAClB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React from 'react';\nimport clsx from 'clsx';\nimport IntlMessageFormat from 'intl-messageformat';\n\nimport InternalAlert from '../alert/internal';\nimport InternalButton from '../button/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { getBaseProps } from '../internal/base-component';\nimport { ErrorBoundaryProps } from './interfaces';\nimport { refreshPage } from './utils';\n\nimport styles from './styles.css.js';\nimport testUtilStyles from './test-classes/styles.css.js';\n\nexport function ErrorBoundaryFallback({\n i18nStrings = {},\n renderFallback,\n ...props\n}: Pick<ErrorBoundaryProps, 'renderFallback' | 'i18nStrings'>) {\n const baseProps = getBaseProps(props);\n const defaultSlots = {\n header: (\n <div className={clsx(styles.header, testUtilStyles.header)}>\n <DefaultHeaderContent i18nStrings={i18nStrings} />\n </div>\n ),\n description: (\n <div className={clsx(styles.description, testUtilStyles.description)}>\n <DefaultDescriptionContent i18nStrings={i18nStrings} />\n </div>\n ),\n action: (\n <div className={clsx(styles.action, testUtilStyles.action)}>\n <DefaultActionContent i18nStrings={i18nStrings} />\n </div>\n ),\n };\n return (\n <div {...baseProps} className={clsx(baseProps.className, testUtilStyles.fallback)}>\n {renderFallback?.(defaultSlots) ?? (\n <InternalAlert type=\"error\" header={defaultSlots.header} action={defaultSlots.action}>\n {defaultSlots.description}\n </InternalAlert>\n )}\n </div>\n );\n}\n\nfunction DefaultHeaderContent({ i18nStrings }: { i18nStrings: ErrorBoundaryProps.I18nStrings }) {\n const i18n = useInternalI18n('error-boundary');\n return <>{i18n('i18nStrings.headerText', i18nStrings?.headerText)}</>;\n}\n\nfunction DefaultDescriptionContent({\n i18nStrings: { descriptionText, components: { Feedback } = {} } = {},\n}: {\n i18nStrings: ErrorBoundaryProps.I18nStrings;\n}) {\n const i18n = useInternalI18n('error-boundary');\n\n // Dependencies for the intl-format function, where the pseudo-tags are declared as functions from parsed chunks.\n const formatArgs = Feedback\n ? {\n hasFeedback: true,\n Feedback: (chunks: React.ReactNode[]) => (\n <span className={testUtilStyles['feedback-action']}>\n <Feedback>{chunks[0] ?? ''}</Feedback>\n </span>\n ),\n }\n : { hasFeedback: false, Feedback: () => <></> };\n\n // This ensures that the description string provided via i18nStrings also supports the <Feedback> injection,\n // because the i18n() helper propagates the second argument as is, without applying intl-format to it.\n // We wrap the format with try-catch to avoid intl errors caused by incorrectly referenced components.\n function safeFormat(descriptionText?: string) {\n try {\n return descriptionText ? new IntlMessageFormat(descriptionText).format(formatArgs) : undefined;\n } catch {\n return descriptionText;\n }\n }\n const message = i18n('i18nStrings.descriptionText', safeFormat(descriptionText), format => format(formatArgs));\n\n // When the description includes <Feedback>, then the translated message is represented as an array of strings and\n // React elements that require keys when rendering to avoid React warnings.\n return (\n <>\n {Array.isArray(message) ? message.map((chunk, i) => <React.Fragment key={i}>{chunk}</React.Fragment>) : message}\n </>\n );\n}\n\nfunction DefaultActionContent({ i18nStrings }: { i18nStrings?: ErrorBoundaryProps.I18nStrings }) {\n const i18n = useInternalI18n('error-boundary');\n return (\n <InternalButton iconName=\"refresh\" onClick={refreshPage} className={testUtilStyles['refresh-action']}>\n {i18n('i18nStrings.refreshActionText', i18nStrings?.refreshActionText)}\n </InternalButton>\n );\n}\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ErrorInfo } from 'react';
|
|
2
|
-
|
|
2
|
+
import { BaseComponentProps } from '../internal/base-component';
|
|
3
|
+
export interface ErrorBoundaryProps extends BaseComponentProps {
|
|
3
4
|
/**
|
|
4
5
|
* Optional identifier for the error boundary instance.
|
|
5
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/error-boundary/interfaces.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,WAAW,kBAAkB;
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/error-boundary/interfaces.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,MAAM,WAAW,kBAAmB,SAAQ,kBAAkB;IAC5D;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;;;;;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S,CAAC;IACxD,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/error-boundary/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 { ErrorInfo } from 'react';\n\nexport interface ErrorBoundaryProps {\n /**\n * Optional identifier for the error boundary instance.\n *\n * When provided, the identifier is included in the `onError` callback payload.\n * In the rendered output, the boundary wraps its content in a `<div>` with the\n * attribute `data-awsui-boundary-id={errorBoundaryId}` to support debugging.\n */\n errorBoundaryId?: string;\n\n /**\n * Callback invoked when an error is intercepted by the boundary.\n * Use this function to record, log, or report errors (for example, to telemetry or monitoring systems).\n *\n * The callback receives a `detail` object containing:\n * * `error` (Error): The thrown error instance.\n * * `errorInfo` (React.ErrorInfo): Additional metadata captured by React.\n * * `errorBoundaryId` (optional, string): The boundary identifier, if defined.\n */\n onError: (detail: ErrorBoundaryProps.OnErrorDetail) => void;\n\n /**\n * Controls how nested error boundaries behave.\n *\n * Several components—such as app layout, container, and modal include built-in\n * error boundaries. These boundaries activate automatically when they detect\n * an ancestor boundary, inheriting configuration from the closest one.\n *\n * When `suppressNested` is set to `true`, nested built-in error boundaries\n * and nested standalone error boundaries with `suppressible=true` are disabled,\n * so the errors propagate further up and are captured by this error boundary.\n */\n suppressNested?: boolean;\n\n /**\n * When set to `true`, this error boundary can be suppressed by another error\n * boundary with `suppressNested=true`, rendered above in the components tree.\n */\n suppressible?: boolean;\n\n /**\n * Optional custom renderer for the fallback UI displayed when an error occurs.\n *\n * The function receives the default slots derived from i18n configuration:\n * * `header` (ReactNode): The fallback header text.\n * * `description` (ReactNode): The fallback description text.\n * * `action` (ReactNode): The fallback action element (a refresh button by default).\n *\n * Return a React node to fully override the default fallback presentation.\n */\n renderFallback?: (props: ErrorBoundaryProps.FallbackProps) => React.ReactNode;\n\n /**\n * Localized strings and components used in the fallback UI.\n *\n * * `headerText` (string): Header text displayed in the fallback view.\n * * `descriptionText` (string): Description text displayed in the fallback view. Supports embedding inline\n * feedback actions by including `<Feedback>` pseudo-tags when `components.Feedback` is provided.\n * * `refreshActionText` (string): Text for the default refresh action button.\n * * `components.Feedback` (React.ComponentType<I18nFeedbackProps>): A component used to render\n * inline feedback actions within the description text.\n *\n * @i18n\n */\n i18nStrings?: ErrorBoundaryProps.I18nStrings;\n\n /**\n * Child content rendered when no error has been captured.\n */\n children: React.ReactNode;\n}\n\nexport namespace ErrorBoundaryProps {\n export interface FallbackProps {\n header?: React.ReactNode;\n description?: React.ReactNode;\n action?: React.ReactNode;\n }\n\n export interface I18nStrings {\n headerText?: string;\n descriptionText?: string;\n refreshActionText?: string;\n components?: {\n Feedback?: React.ComponentType<I18nFeedbackProps>;\n };\n }\n\n export interface I18nFeedbackProps {\n children: React.ReactNode;\n }\n\n export interface OnErrorDetail {\n error: Error;\n errorInfo: ErrorInfo;\n errorBoundaryId?: string;\n }\n}\n\nexport interface BuiltInErrorBoundaryProps {\n children: React.ReactNode;\n wrapper?: (content: React.ReactNode) => React.ReactNode;\n suppressNested?: boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/error-boundary/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 { ErrorInfo } from 'react';\n\nimport { BaseComponentProps } from '../internal/base-component';\n\nexport interface ErrorBoundaryProps extends BaseComponentProps {\n /**\n * Optional identifier for the error boundary instance.\n *\n * When provided, the identifier is included in the `onError` callback payload.\n * In the rendered output, the boundary wraps its content in a `<div>` with the\n * attribute `data-awsui-boundary-id={errorBoundaryId}` to support debugging.\n */\n errorBoundaryId?: string;\n\n /**\n * Callback invoked when an error is intercepted by the boundary.\n * Use this function to record, log, or report errors (for example, to telemetry or monitoring systems).\n *\n * The callback receives a `detail` object containing:\n * * `error` (Error): The thrown error instance.\n * * `errorInfo` (React.ErrorInfo): Additional metadata captured by React.\n * * `errorBoundaryId` (optional, string): The boundary identifier, if defined.\n */\n onError: (detail: ErrorBoundaryProps.OnErrorDetail) => void;\n\n /**\n * Controls how nested error boundaries behave.\n *\n * Several components—such as app layout, container, and modal include built-in\n * error boundaries. These boundaries activate automatically when they detect\n * an ancestor boundary, inheriting configuration from the closest one.\n *\n * When `suppressNested` is set to `true`, nested built-in error boundaries\n * and nested standalone error boundaries with `suppressible=true` are disabled,\n * so the errors propagate further up and are captured by this error boundary.\n */\n suppressNested?: boolean;\n\n /**\n * When set to `true`, this error boundary can be suppressed by another error\n * boundary with `suppressNested=true`, rendered above in the components tree.\n */\n suppressible?: boolean;\n\n /**\n * Optional custom renderer for the fallback UI displayed when an error occurs.\n *\n * The function receives the default slots derived from i18n configuration:\n * * `header` (ReactNode): The fallback header text.\n * * `description` (ReactNode): The fallback description text.\n * * `action` (ReactNode): The fallback action element (a refresh button by default).\n *\n * Return a React node to fully override the default fallback presentation.\n */\n renderFallback?: (props: ErrorBoundaryProps.FallbackProps) => React.ReactNode;\n\n /**\n * Localized strings and components used in the fallback UI.\n *\n * * `headerText` (string): Header text displayed in the fallback view.\n * * `descriptionText` (string): Description text displayed in the fallback view. Supports embedding inline\n * feedback actions by including `<Feedback>` pseudo-tags when `components.Feedback` is provided.\n * * `refreshActionText` (string): Text for the default refresh action button.\n * * `components.Feedback` (React.ComponentType<I18nFeedbackProps>): A component used to render\n * inline feedback actions within the description text.\n *\n * @i18n\n */\n i18nStrings?: ErrorBoundaryProps.I18nStrings;\n\n /**\n * Child content rendered when no error has been captured.\n */\n children: React.ReactNode;\n}\n\nexport namespace ErrorBoundaryProps {\n export interface FallbackProps {\n header?: React.ReactNode;\n description?: React.ReactNode;\n action?: React.ReactNode;\n }\n\n export interface I18nStrings {\n headerText?: string;\n descriptionText?: string;\n refreshActionText?: string;\n components?: {\n Feedback?: React.ComponentType<I18nFeedbackProps>;\n };\n }\n\n export interface I18nFeedbackProps {\n children: React.ReactNode;\n }\n\n export interface OnErrorDetail {\n error: Error;\n errorInfo: ErrorInfo;\n errorBoundaryId?: string;\n }\n}\n\nexport interface BuiltInErrorBoundaryProps {\n children: React.ReactNode;\n wrapper?: (content: React.ReactNode) => React.ReactNode;\n suppressNested?: boolean;\n}\n"]}
|
package/internal/environment.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export var PACKAGE_SOURCE = "components";
|
|
2
|
-
export var PACKAGE_VERSION = "3.0.0 (
|
|
3
|
-
export var GIT_SHA = "
|
|
2
|
+
export var PACKAGE_VERSION = "3.0.0 (ed206118)";
|
|
3
|
+
export var GIT_SHA = "ed206118";
|
|
4
4
|
export var THEME = "open-source-visual-refresh";
|
|
5
5
|
export var SYSTEM = "core";
|
|
6
6
|
export var ALWAYS_VISUAL_REFRESH = true;
|
package/internal/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
"./internal/base-component/index.js",
|
|
160
160
|
"./internal/base-component/styles.css.js"
|
|
161
161
|
],
|
|
162
|
-
"version": "3.0.
|
|
162
|
+
"version": "3.0.1193",
|
|
163
163
|
"repository": {
|
|
164
164
|
"type": "git",
|
|
165
165
|
"url": "https://github.com/cloudscape-design/components.git"
|