@cloudscape-design/components 3.0.577 → 3.0.579
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.d.ts +5 -0
- package/app-layout/classic.d.ts.map +1 -0
- package/app-layout/classic.js +308 -0
- package/app-layout/classic.js.map +1 -0
- package/app-layout/implementation.d.ts +4 -0
- package/app-layout/implementation.d.ts.map +1 -0
- package/app-layout/implementation.js +11 -0
- package/app-layout/implementation.js.map +1 -0
- package/app-layout/index.d.ts.map +1 -1
- package/app-layout/index.js +6 -309
- package/app-layout/index.js.map +1 -1
- package/app-layout/internal.d.ts +3 -0
- package/app-layout/internal.d.ts.map +1 -0
- package/app-layout/internal.js +5 -0
- package/app-layout/internal.js.map +1 -0
- package/app-layout/widget.d.ts +6 -0
- package/app-layout/widget.d.ts.map +1 -0
- package/app-layout/widget.js +16 -0
- package/app-layout/widget.js.map +1 -0
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/manifest.json +1 -1
- package/internal/utils/global-flags.d.ts +1 -0
- package/internal/utils/global-flags.d.ts.map +1 -1
- package/internal/utils/global-flags.js.map +1 -1
- package/package.json +1 -1
- package/split-panel/implementation.d.ts +5 -0
- package/split-panel/implementation.d.ts.map +1 -0
- package/split-panel/implementation.js +112 -0
- package/split-panel/implementation.js.map +1 -0
- package/split-panel/index.d.ts +1 -1
- package/split-panel/index.d.ts.map +1 -1
- package/split-panel/index.js +4 -102
- package/split-panel/index.js.map +1 -1
- package/split-panel/internal.d.ts +3 -0
- package/split-panel/internal.d.ts.map +1 -0
- package/split-panel/internal.js +5 -0
- package/split-panel/internal.js.map +1 -0
- package/split-panel/widget.d.ts +6 -0
- package/split-panel/widget.d.ts.map +1 -0
- package/split-panel/widget.js +16 -0
- package/split-panel/widget.js.map +1 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AppLayoutProps } from './interfaces';
|
|
3
|
+
declare const ClassicAppLayout: React.ForwardRefExoticComponent<AppLayoutProps & React.RefAttributes<AppLayoutProps.Ref>>;
|
|
4
|
+
export default ClassicAppLayout;
|
|
5
|
+
//# sourceMappingURL=classic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classic.d.ts","sourceRoot":"","sources":["../../../src/app-layout/classic.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAK7F,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAkC9C,QAAA,MAAM,gBAAgB,2FA6kBrB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import React, { useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
|
|
6
|
+
import { useControllable } from '../internal/hooks/use-controllable';
|
|
7
|
+
import { useMobile } from '../internal/hooks/use-mobile';
|
|
8
|
+
import { fireNonCancelableEvent } from '../internal/events';
|
|
9
|
+
import { applyDefaults } from './defaults';
|
|
10
|
+
import { Notifications } from './notifications';
|
|
11
|
+
import { MobileToolbar } from './mobile-toolbar';
|
|
12
|
+
import { useFocusControl } from './utils/use-focus-control';
|
|
13
|
+
import useContentHeight from './utils/use-content-height';
|
|
14
|
+
import styles from './styles.css.js';
|
|
15
|
+
import testutilStyles from './test-classes/styles.css.js';
|
|
16
|
+
import { findUpUntil } from '../internal/utils/dom';
|
|
17
|
+
import { AppLayoutContext } from '../internal/context/app-layout-context';
|
|
18
|
+
import { CONSTRAINED_MAIN_PANEL_MIN_HEIGHT, CONSTRAINED_PAGE_HEIGHT, getSplitPanelDefaultSize, MAIN_PANEL_MIN_HEIGHT, } from '../split-panel/utils/size-utils';
|
|
19
|
+
import ContentWrapper from './content-wrapper';
|
|
20
|
+
import { Drawer, DrawerTriggersBar } from './drawer';
|
|
21
|
+
import { ResizableDrawer } from './drawer/resizable-drawer';
|
|
22
|
+
import { SPLIT_PANEL_MIN_WIDTH, SideSplitPanelDrawer, SplitPanelProvider, } from './split-panel';
|
|
23
|
+
import useAppLayoutRect from './utils/use-app-layout-rect';
|
|
24
|
+
import { isDevelopment } from '../internal/is-development';
|
|
25
|
+
import { useStableCallback, warnOnce } from '@cloudscape-design/component-toolkit/internal';
|
|
26
|
+
import { useSplitPanelFocusControl } from './utils/use-split-panel-focus-control';
|
|
27
|
+
import { TOOLS_DRAWER_ID, useDrawers } from './utils/use-drawers';
|
|
28
|
+
import { useContainerQuery } from '@cloudscape-design/component-toolkit';
|
|
29
|
+
import { togglesConfig } from './toggles';
|
|
30
|
+
const ClassicAppLayout = React.forwardRef((_a, ref) => {
|
|
31
|
+
var _b, _c, _d, _e, _f, _g;
|
|
32
|
+
var { navigation, navigationWidth = 280, navigationHide, navigationOpen: controlledNavigationOpen, tools, toolsWidth = 290, toolsHide, toolsOpen: controlledToolsOpen, breadcrumbs, notifications, stickyNotifications, contentHeader, disableContentHeaderOverlap, content, contentType = 'default', disableContentPaddings, disableBodyScroll, maxContentWidth, minContentWidth, headerSelector = '#b #h', footerSelector = '#b #f', ariaLabels, splitPanel, splitPanelSize: controlledSplitPanelSize, splitPanelOpen: controlledSplitPanelOpen, splitPanelPreferences: controlledSplitPanelPreferences, onSplitPanelPreferencesChange, onSplitPanelResize, onSplitPanelToggle, onNavigationChange, onToolsChange, drawers: controlledDrawers, onDrawerChange, activeDrawerId: controlledActiveDrawerId } = _a, rest = __rest(_a, ["navigation", "navigationWidth", "navigationHide", "navigationOpen", "tools", "toolsWidth", "toolsHide", "toolsOpen", "breadcrumbs", "notifications", "stickyNotifications", "contentHeader", "disableContentHeaderOverlap", "content", "contentType", "disableContentPaddings", "disableBodyScroll", "maxContentWidth", "minContentWidth", "headerSelector", "footerSelector", "ariaLabels", "splitPanel", "splitPanelSize", "splitPanelOpen", "splitPanelPreferences", "onSplitPanelPreferencesChange", "onSplitPanelResize", "onSplitPanelToggle", "onNavigationChange", "onToolsChange", "drawers", "onDrawerChange", "activeDrawerId"]);
|
|
33
|
+
if (isDevelopment) {
|
|
34
|
+
if (controlledToolsOpen && toolsHide) {
|
|
35
|
+
warnOnce('AppLayout', `You have enabled both the \`toolsOpen\` prop and the \`toolsHide\` prop. This is not supported. Set \`toolsOpen\` to \`false\` when you set \`toolsHide\` to \`true\`.`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
// Private API for embedded view mode
|
|
39
|
+
const __embeddedViewMode = Boolean(rest.__embeddedViewMode);
|
|
40
|
+
const rootRef = useRef(null);
|
|
41
|
+
const isMobile = useMobile();
|
|
42
|
+
const defaults = applyDefaults(contentType, { maxContentWidth, minContentWidth }, false);
|
|
43
|
+
const [navigationOpen = false, setNavigationOpen] = useControllable(controlledNavigationOpen, onNavigationChange, isMobile ? false : defaults.navigationOpen, { componentName: 'AppLayout', controlledProp: 'navigationOpen', changeHandler: 'onNavigationChange' });
|
|
44
|
+
const [toolsOpen = false, setToolsOpen] = useControllable(controlledToolsOpen, onToolsChange, isMobile ? false : defaults.toolsOpen, { componentName: 'AppLayout', controlledProp: 'toolsOpen', changeHandler: 'onToolsChange' });
|
|
45
|
+
const onToolsToggle = (open) => {
|
|
46
|
+
setToolsOpen(open);
|
|
47
|
+
focusToolsButtons();
|
|
48
|
+
fireNonCancelableEvent(onToolsChange, { open });
|
|
49
|
+
};
|
|
50
|
+
const { drawers, activeDrawer, minDrawerSize, activeDrawerSize, activeDrawerId, ariaLabelsWithDrawers, onActiveDrawerChange, onActiveDrawerResize, } = useDrawers(Object.assign({ drawers: controlledDrawers, onDrawerChange, activeDrawerId: controlledActiveDrawerId }, rest), ariaLabels, {
|
|
51
|
+
ariaLabels,
|
|
52
|
+
tools,
|
|
53
|
+
toolsOpen,
|
|
54
|
+
toolsHide,
|
|
55
|
+
toolsWidth,
|
|
56
|
+
onToolsToggle,
|
|
57
|
+
});
|
|
58
|
+
ariaLabels = ariaLabelsWithDrawers;
|
|
59
|
+
const hasDrawers = !!drawers;
|
|
60
|
+
const { refs: navigationRefs, setFocus: focusNavButtons } = useFocusControl(navigationOpen);
|
|
61
|
+
const { refs: toolsRefs, setFocus: focusToolsButtons, loseFocus: loseToolsFocus, } = useFocusControl(toolsOpen || activeDrawer !== undefined, true);
|
|
62
|
+
const { refs: drawerRefs, setFocus: focusDrawersButtons, loseFocus: loseDrawersFocus, } = useFocusControl(!!activeDrawerId, true, activeDrawerId);
|
|
63
|
+
const onNavigationToggle = useStableCallback((open) => {
|
|
64
|
+
setNavigationOpen(open);
|
|
65
|
+
focusNavButtons();
|
|
66
|
+
fireNonCancelableEvent(onNavigationChange, { open });
|
|
67
|
+
});
|
|
68
|
+
const onNavigationClick = (event) => {
|
|
69
|
+
const hasLink = findUpUntil(event.target, node => node.tagName === 'A' && !!node.href);
|
|
70
|
+
if (hasLink) {
|
|
71
|
+
onNavigationToggle(false);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
useEffect(() => {
|
|
75
|
+
// Close navigation drawer on mobile so that the main content is visible
|
|
76
|
+
if (isMobile) {
|
|
77
|
+
onNavigationToggle(false);
|
|
78
|
+
}
|
|
79
|
+
}, [isMobile, onNavigationToggle]);
|
|
80
|
+
const navigationVisible = !navigationHide && navigationOpen;
|
|
81
|
+
const toolsVisible = !toolsHide && toolsOpen;
|
|
82
|
+
const { contentHeightStyle, headerHeight, footerHeight } = useContentHeight(headerSelector, footerSelector, disableBodyScroll);
|
|
83
|
+
const [notificationsHeight, notificationsRef] = useContainerQuery(rect => rect.contentBoxHeight);
|
|
84
|
+
const anyPanelOpen = navigationVisible || toolsVisible || !!activeDrawer;
|
|
85
|
+
const hasRenderedNotifications = notificationsHeight ? notificationsHeight > 0 : false;
|
|
86
|
+
const stickyNotificationsHeight = stickyNotifications ? notificationsHeight : null;
|
|
87
|
+
const [splitPanelPreferences, setSplitPanelPreferences] = useControllable(controlledSplitPanelPreferences, onSplitPanelPreferencesChange, undefined, {
|
|
88
|
+
componentName: 'AppLayout',
|
|
89
|
+
controlledProp: 'splitPanelPreferences',
|
|
90
|
+
changeHandler: 'onSplitPanelPreferencesChange',
|
|
91
|
+
});
|
|
92
|
+
const [splitPanelOpen = false, setSplitPanelOpen] = useControllable(controlledSplitPanelOpen, onSplitPanelToggle, false, {
|
|
93
|
+
componentName: 'AppLayout',
|
|
94
|
+
controlledProp: 'splitPanelOpen',
|
|
95
|
+
changeHandler: 'onSplitPanelToggle',
|
|
96
|
+
});
|
|
97
|
+
const splitPanelPosition = (splitPanelPreferences === null || splitPanelPreferences === void 0 ? void 0 : splitPanelPreferences.position) || 'bottom';
|
|
98
|
+
const [splitPanelReportedToggle, setSplitPanelReportedToggle] = useState({
|
|
99
|
+
displayed: false,
|
|
100
|
+
ariaLabel: undefined,
|
|
101
|
+
});
|
|
102
|
+
const splitPanelDisplayed = !!(splitPanel && (splitPanelReportedToggle.displayed || splitPanelOpen));
|
|
103
|
+
const closedDrawerWidth = 40;
|
|
104
|
+
const effectiveNavigationWidth = navigationHide ? 0 : navigationOpen ? navigationWidth : closedDrawerWidth;
|
|
105
|
+
const getEffectiveToolsWidth = () => {
|
|
106
|
+
if (activeDrawer && activeDrawerSize) {
|
|
107
|
+
return activeDrawerSize;
|
|
108
|
+
}
|
|
109
|
+
if (toolsHide || drawers) {
|
|
110
|
+
return 0;
|
|
111
|
+
}
|
|
112
|
+
if (toolsOpen) {
|
|
113
|
+
return toolsWidth;
|
|
114
|
+
}
|
|
115
|
+
return closedDrawerWidth;
|
|
116
|
+
};
|
|
117
|
+
const effectiveToolsWidth = getEffectiveToolsWidth();
|
|
118
|
+
const defaultSplitPanelSize = getSplitPanelDefaultSize(splitPanelPosition);
|
|
119
|
+
const [splitPanelSize = defaultSplitPanelSize, setSplitPanelSize] = useControllable(controlledSplitPanelSize, onSplitPanelResize, defaultSplitPanelSize, {
|
|
120
|
+
componentName: 'AppLayout',
|
|
121
|
+
controlledProp: 'splitPanelSize',
|
|
122
|
+
changeHandler: 'onSplitPanelResize',
|
|
123
|
+
});
|
|
124
|
+
const mainContentRef = useRef(null);
|
|
125
|
+
const legacyScrollRootRef = useRef(null);
|
|
126
|
+
const { refs: splitPanelRefs, setLastInteraction: setSplitPanelLastInteraction } = useSplitPanelFocusControl([
|
|
127
|
+
splitPanelPreferences,
|
|
128
|
+
splitPanelOpen,
|
|
129
|
+
]);
|
|
130
|
+
const onSplitPanelPreferencesSet = useCallback((detail) => {
|
|
131
|
+
setSplitPanelPreferences(detail);
|
|
132
|
+
setSplitPanelLastInteraction({ type: 'position' });
|
|
133
|
+
fireNonCancelableEvent(onSplitPanelPreferencesChange, detail);
|
|
134
|
+
}, [setSplitPanelPreferences, onSplitPanelPreferencesChange, setSplitPanelLastInteraction]);
|
|
135
|
+
const onSplitPanelSizeSet = useCallback((newSize) => {
|
|
136
|
+
setSplitPanelSize(newSize);
|
|
137
|
+
fireNonCancelableEvent(onSplitPanelResize, { size: newSize });
|
|
138
|
+
}, [setSplitPanelSize, onSplitPanelResize]);
|
|
139
|
+
const onSplitPanelToggleHandler = useCallback(() => {
|
|
140
|
+
setSplitPanelOpen(!splitPanelOpen);
|
|
141
|
+
setSplitPanelLastInteraction({ type: splitPanelOpen ? 'close' : 'open' });
|
|
142
|
+
fireNonCancelableEvent(onSplitPanelToggle, { open: !splitPanelOpen });
|
|
143
|
+
}, [setSplitPanelOpen, splitPanelOpen, onSplitPanelToggle, setSplitPanelLastInteraction]);
|
|
144
|
+
const getSplitPanelMaxHeight = useStableCallback(() => {
|
|
145
|
+
if (typeof document === 'undefined') {
|
|
146
|
+
return 0; // render the split panel in its minimum possible size
|
|
147
|
+
}
|
|
148
|
+
else if (disableBodyScroll && legacyScrollRootRef.current) {
|
|
149
|
+
const availableHeight = legacyScrollRootRef.current.clientHeight;
|
|
150
|
+
return availableHeight < CONSTRAINED_PAGE_HEIGHT ? availableHeight : availableHeight - MAIN_PANEL_MIN_HEIGHT;
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
const availableHeight = document.documentElement.clientHeight - headerHeight - footerHeight;
|
|
154
|
+
return availableHeight < CONSTRAINED_PAGE_HEIGHT
|
|
155
|
+
? availableHeight - CONSTRAINED_MAIN_PANEL_MIN_HEIGHT
|
|
156
|
+
: availableHeight - MAIN_PANEL_MIN_HEIGHT;
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
const { left: leftOffset, right: rightOffset, width: documentWidth } = useAppLayoutRect(rootRef.current);
|
|
160
|
+
const rightDrawerBarWidth = drawers ? (drawers.length > 1 ? closedDrawerWidth : 0) : 0;
|
|
161
|
+
const contentPadding = 80;
|
|
162
|
+
// all content except split-panel + drawers/tools area
|
|
163
|
+
const resizableSpaceAvailable = Math.max(0, documentWidth -
|
|
164
|
+
leftOffset -
|
|
165
|
+
rightOffset -
|
|
166
|
+
effectiveNavigationWidth -
|
|
167
|
+
defaults.minContentWidth -
|
|
168
|
+
contentPadding -
|
|
169
|
+
rightDrawerBarWidth);
|
|
170
|
+
// if there is no space to display split panel in the side, force to bottom
|
|
171
|
+
const isSplitPanelForcedPosition = isMobile || resizableSpaceAvailable - effectiveToolsWidth < SPLIT_PANEL_MIN_WIDTH;
|
|
172
|
+
const finalSplitPanePosition = isSplitPanelForcedPosition ? 'bottom' : splitPanelPosition;
|
|
173
|
+
const splitPaneAvailableOnTheSide = splitPanelDisplayed && finalSplitPanePosition === 'side';
|
|
174
|
+
const sideSplitPanelSize = splitPaneAvailableOnTheSide ? (splitPanelOpen ? splitPanelSize : closedDrawerWidth) : 0;
|
|
175
|
+
const splitPanelMaxWidth = Math.max(0, resizableSpaceAvailable - effectiveToolsWidth);
|
|
176
|
+
const drawerMaxSize = Math.max(0, resizableSpaceAvailable - sideSplitPanelSize);
|
|
177
|
+
const navigationClosedWidth = navigationHide || isMobile ? 0 : closedDrawerWidth;
|
|
178
|
+
const contentMaxWidthStyle = !isMobile ? { maxWidth: defaults.maxContentWidth } : undefined;
|
|
179
|
+
const [splitPanelReportedSize, setSplitPanelReportedSize] = useState(0);
|
|
180
|
+
const [splitPanelReportedHeaderHeight, setSplitPanelReportedHeaderHeight] = useState(0);
|
|
181
|
+
const splitPanelContextProps = {
|
|
182
|
+
topOffset: headerHeight + (finalSplitPanePosition === 'bottom' ? stickyNotificationsHeight || 0 : 0),
|
|
183
|
+
bottomOffset: footerHeight,
|
|
184
|
+
leftOffset: leftOffset + (isMobile ? 0 : !navigationHide && navigationOpen ? navigationWidth : navigationClosedWidth),
|
|
185
|
+
rightOffset: isMobile ? 0 : rightOffset + effectiveToolsWidth + rightDrawerBarWidth,
|
|
186
|
+
position: finalSplitPanePosition,
|
|
187
|
+
size: splitPanelSize,
|
|
188
|
+
maxWidth: splitPanelMaxWidth,
|
|
189
|
+
getMaxHeight: getSplitPanelMaxHeight,
|
|
190
|
+
disableContentPaddings,
|
|
191
|
+
contentWidthStyles: contentMaxWidthStyle,
|
|
192
|
+
isOpen: splitPanelOpen,
|
|
193
|
+
isForcedPosition: isSplitPanelForcedPosition,
|
|
194
|
+
onResize: onSplitPanelSizeSet,
|
|
195
|
+
onToggle: onSplitPanelToggleHandler,
|
|
196
|
+
onPreferencesChange: onSplitPanelPreferencesSet,
|
|
197
|
+
setSplitPanelToggle: setSplitPanelReportedToggle,
|
|
198
|
+
reportSize: setSplitPanelReportedSize,
|
|
199
|
+
reportHeaderHeight: setSplitPanelReportedHeaderHeight,
|
|
200
|
+
refs: splitPanelRefs,
|
|
201
|
+
};
|
|
202
|
+
const splitPanelWrapped = splitPanel && (React.createElement(SplitPanelProvider, Object.assign({}, splitPanelContextProps), finalSplitPanePosition === 'side' ? (React.createElement(SideSplitPanelDrawer, { displayed: splitPanelDisplayed }, splitPanel)) : (splitPanel)));
|
|
203
|
+
const contentWrapperProps = {
|
|
204
|
+
contentType,
|
|
205
|
+
navigationPadding: navigationHide || !!navigationOpen,
|
|
206
|
+
contentWidthStyles: !isMobile
|
|
207
|
+
? { minWidth: defaults.minContentWidth, maxWidth: defaults.maxContentWidth }
|
|
208
|
+
: undefined,
|
|
209
|
+
toolsPadding:
|
|
210
|
+
// tools padding is displayed in one of the three cases
|
|
211
|
+
// 1. Nothing on the that screen edge (no tools panel and no split panel)
|
|
212
|
+
toolsHide ||
|
|
213
|
+
(hasDrawers && !activeDrawer && (!splitPanelDisplayed || finalSplitPanePosition !== 'side')) ||
|
|
214
|
+
// 2. Tools panel is present and open
|
|
215
|
+
toolsVisible ||
|
|
216
|
+
// 3. Split panel is open in side position
|
|
217
|
+
(splitPaneAvailableOnTheSide && splitPanelOpen),
|
|
218
|
+
isMobile,
|
|
219
|
+
};
|
|
220
|
+
useImperativeHandle(ref, () => ({
|
|
221
|
+
openTools: () => onToolsToggle(true),
|
|
222
|
+
closeNavigationIfNecessary: () => {
|
|
223
|
+
if (isMobile) {
|
|
224
|
+
onNavigationToggle(false);
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
focusToolsClose: () => {
|
|
228
|
+
if (hasDrawers) {
|
|
229
|
+
focusDrawersButtons(true);
|
|
230
|
+
}
|
|
231
|
+
else {
|
|
232
|
+
focusToolsButtons(true);
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
focusActiveDrawer: () => focusDrawersButtons(true),
|
|
236
|
+
focusSplitPanel: () => { var _a; return (_a = splitPanelRefs.slider.current) === null || _a === void 0 ? void 0 : _a.focus(); },
|
|
237
|
+
}));
|
|
238
|
+
const splitPanelBottomOffset = (_b = (!splitPanelDisplayed || finalSplitPanePosition !== 'bottom'
|
|
239
|
+
? undefined
|
|
240
|
+
: splitPanelOpen
|
|
241
|
+
? splitPanelReportedSize
|
|
242
|
+
: splitPanelReportedHeaderHeight)) !== null && _b !== void 0 ? _b : undefined;
|
|
243
|
+
const [mobileBarHeight, mobileBarRef] = useContainerQuery(rect => rect.contentBoxHeight);
|
|
244
|
+
return (React.createElement("div", { className: clsx(styles.root, testutilStyles.root, disableBodyScroll && styles['root-no-scroll']), ref: rootRef, style: contentHeightStyle },
|
|
245
|
+
isMobile && !__embeddedViewMode && (!toolsHide || !navigationHide || breadcrumbs) && (React.createElement(MobileToolbar, { anyPanelOpen: anyPanelOpen, toggleRefs: { navigation: navigationRefs.toggle, tools: toolsRefs.toggle }, topOffset: headerHeight, ariaLabels: ariaLabels, navigationHide: navigationHide, toolsHide: toolsHide, onNavigationOpen: () => onNavigationToggle(true), onToolsOpen: () => onToolsToggle(true), unfocusable: anyPanelOpen, mobileBarRef: mobileBarRef, drawers: drawers, activeDrawerId: activeDrawerId, onDrawerChange: newDrawerId => {
|
|
246
|
+
onActiveDrawerChange(newDrawerId);
|
|
247
|
+
if (newDrawerId !== activeDrawerId) {
|
|
248
|
+
focusToolsButtons();
|
|
249
|
+
focusDrawersButtons();
|
|
250
|
+
}
|
|
251
|
+
} }, breadcrumbs)),
|
|
252
|
+
React.createElement("div", { className: clsx(styles.layout, disableBodyScroll && styles['layout-no-scroll']) },
|
|
253
|
+
!navigationHide && (React.createElement(Drawer, { contentClassName: testutilStyles.navigation, toggleClassName: testutilStyles['navigation-toggle'], closeClassName: testutilStyles['navigation-close'], ariaLabels: togglesConfig.navigation.getLabels(ariaLabels), bottomOffset: footerHeight, topOffset: headerHeight, isMobile: isMobile, isOpen: navigationOpen, onClick: isMobile ? onNavigationClick : undefined, onToggle: onNavigationToggle, toggleRefs: navigationRefs, type: "navigation", width: navigationWidth }, navigation)),
|
|
254
|
+
React.createElement("main", { ref: legacyScrollRootRef, className: clsx(styles['layout-main'], {
|
|
255
|
+
[styles['layout-main-scrollable']]: disableBodyScroll,
|
|
256
|
+
[testutilStyles['disable-body-scroll-root']]: disableBodyScroll,
|
|
257
|
+
[styles.unfocusable]: isMobile && anyPanelOpen,
|
|
258
|
+
}) },
|
|
259
|
+
React.createElement("div", { style: {
|
|
260
|
+
marginBottom: splitPanelBottomOffset,
|
|
261
|
+
} },
|
|
262
|
+
notifications && (React.createElement(Notifications, { disableContentPaddings: disableContentPaddings, testUtilsClassName: testutilStyles.notifications, labels: ariaLabels, topOffset: disableBodyScroll ? 0 : headerHeight, sticky: !isMobile && stickyNotifications, ref: notificationsRef }, notifications)),
|
|
263
|
+
((!isMobile && breadcrumbs) || contentHeader) && (React.createElement(ContentWrapper, Object.assign({}, contentWrapperProps),
|
|
264
|
+
!isMobile && breadcrumbs && (React.createElement("div", { className: clsx(testutilStyles.breadcrumbs, styles['breadcrumbs-desktop']) }, breadcrumbs)),
|
|
265
|
+
contentHeader && (React.createElement("div", { className: clsx(styles['content-header-wrapper'], !hasRenderedNotifications && (isMobile || !breadcrumbs) && styles['content-extra-top-padding'], !hasRenderedNotifications && !breadcrumbs && styles['content-header-wrapper-first-child'], !disableContentHeaderOverlap && styles['content-header-wrapper-overlapped']) }, contentHeader)))),
|
|
266
|
+
React.createElement(ContentWrapper, Object.assign({}, contentWrapperProps, { ref: mainContentRef, disablePaddings: disableContentPaddings,
|
|
267
|
+
// eslint-disable-next-line react/forbid-component-props
|
|
268
|
+
className: clsx(!disableContentPaddings && styles['content-wrapper'], !disableContentPaddings &&
|
|
269
|
+
(isMobile || !breadcrumbs) &&
|
|
270
|
+
!contentHeader &&
|
|
271
|
+
styles['content-extra-top-padding'], testutilStyles.content, !disableContentHeaderOverlap && contentHeader && styles['content-overlapped'], !hasRenderedNotifications &&
|
|
272
|
+
!breadcrumbs &&
|
|
273
|
+
!isMobile &&
|
|
274
|
+
!contentHeader &&
|
|
275
|
+
styles['content-wrapper-first-child']) }),
|
|
276
|
+
React.createElement(AppLayoutContext.Provider, { value: {
|
|
277
|
+
stickyOffsetTop:
|
|
278
|
+
// We don't support the table header being sticky in case the deprecated disableBodyScroll is enabled,
|
|
279
|
+
// therefore we ensure the table header scrolls out of view by offseting a large enough value (9999px)
|
|
280
|
+
(disableBodyScroll ? (isMobile ? -9999 : 0) : headerHeight) +
|
|
281
|
+
(isMobile ? 0 : stickyNotificationsHeight !== null ? stickyNotificationsHeight : 0),
|
|
282
|
+
stickyOffsetBottom: footerHeight + (splitPanelBottomOffset || 0),
|
|
283
|
+
mobileBarHeight: mobileBarHeight !== null && mobileBarHeight !== void 0 ? mobileBarHeight : 0,
|
|
284
|
+
} }, content))),
|
|
285
|
+
finalSplitPanePosition === 'bottom' && splitPanelWrapped),
|
|
286
|
+
finalSplitPanePosition === 'side' && splitPanelWrapped,
|
|
287
|
+
hasDrawers ? (React.createElement(ResizableDrawer, { contentClassName: clsx(activeDrawerId && testutilStyles['active-drawer'], activeDrawerId === TOOLS_DRAWER_ID && testutilStyles.tools), toggleClassName: testutilStyles['tools-toggle'], closeClassName: clsx(testutilStyles['active-drawer-close-button'], activeDrawerId === TOOLS_DRAWER_ID && testutilStyles['tools-close']), ariaLabels: {
|
|
288
|
+
openLabel: (_c = activeDrawer === null || activeDrawer === void 0 ? void 0 : activeDrawer.ariaLabels) === null || _c === void 0 ? void 0 : _c.triggerButton,
|
|
289
|
+
closeLabel: (_d = activeDrawer === null || activeDrawer === void 0 ? void 0 : activeDrawer.ariaLabels) === null || _d === void 0 ? void 0 : _d.closeButton,
|
|
290
|
+
mainLabel: (_e = activeDrawer === null || activeDrawer === void 0 ? void 0 : activeDrawer.ariaLabels) === null || _e === void 0 ? void 0 : _e.drawerName,
|
|
291
|
+
resizeHandle: (_f = activeDrawer === null || activeDrawer === void 0 ? void 0 : activeDrawer.ariaLabels) === null || _f === void 0 ? void 0 : _f.resizeHandle,
|
|
292
|
+
}, minWidth: minDrawerSize, maxWidth: drawerMaxSize, width: activeDrawerSize, bottomOffset: footerHeight, topOffset: headerHeight, isMobile: isMobile, onToggle: isOpen => {
|
|
293
|
+
if (!isOpen) {
|
|
294
|
+
focusToolsButtons();
|
|
295
|
+
focusDrawersButtons();
|
|
296
|
+
onActiveDrawerChange(null);
|
|
297
|
+
}
|
|
298
|
+
}, 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: footerHeight, topOffset: headerHeight, isMobile: isMobile, onToggle: onToolsToggle, isOpen: toolsOpen, toggleRefs: toolsRefs, type: "tools", onLoseFocus: loseToolsFocus }, tools))),
|
|
299
|
+
hasDrawers && drawers.length > 0 && (React.createElement(DrawerTriggersBar, { drawerRefs: drawerRefs, bottomOffset: footerHeight, topOffset: headerHeight, isMobile: isMobile, drawers: drawers, activeDrawerId: activeDrawerId, onDrawerChange: newDrawerId => {
|
|
300
|
+
if (activeDrawerId !== newDrawerId) {
|
|
301
|
+
focusToolsButtons();
|
|
302
|
+
focusDrawersButtons();
|
|
303
|
+
}
|
|
304
|
+
onActiveDrawerChange(newDrawerId);
|
|
305
|
+
}, ariaLabels: ariaLabels })))));
|
|
306
|
+
});
|
|
307
|
+
export default ClassicAppLayout;
|
|
308
|
+
//# sourceMappingURL=classic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classic.js","sourceRoot":"","sources":["../../../src/app-layout/classic.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EA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,aAAa,EACvB,MAAM,EAAE,SAAS,EACjB,UAAU,EAAE,SAAS,EACrB,IAAI,EAAC,OAAO,EACZ,WAAW,EAAE,cAAc,IAE1B,KAAK,CACC,CACV,CACF;YACA,UAAU,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,CACnC,oBAAC,iBAAiB,IAChB,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,YAAY,EACvB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,WAAW,CAAC,EAAE;oBAC5B,IAAI,cAAc,KAAK,WAAW,EAAE;wBAClC,iBAAiB,EAAE,CAAC;wBACpB,mBAAmB,EAAE,CAAC;qBACvB;oBACD,oBAAoB,CAAC,WAAW,CAAC,CAAC;gBACpC,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 clsx from 'clsx';\nimport React, { useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';\nimport { useControllable } from '../internal/hooks/use-controllable';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { applyDefaults } from './defaults';\nimport { AppLayoutProps } from './interfaces';\nimport { Notifications } from './notifications';\nimport { MobileToolbar } from './mobile-toolbar';\nimport { useFocusControl } from './utils/use-focus-control';\nimport useContentHeight from './utils/use-content-height';\nimport styles from './styles.css.js';\nimport testutilStyles from './test-classes/styles.css.js';\nimport { findUpUntil } from '../internal/utils/dom';\nimport { AppLayoutContext } from '../internal/context/app-layout-context';\nimport { SplitPanelSideToggleProps } from '../internal/context/split-panel-context';\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 {\n SPLIT_PANEL_MIN_WIDTH,\n SideSplitPanelDrawer,\n SplitPanelProvider,\n SplitPanelProviderProps,\n} from './split-panel';\nimport useAppLayoutRect from './utils/use-app-layout-rect';\nimport { isDevelopment } from '../internal/is-development';\nimport { useStableCallback, warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { useSplitPanelFocusControl } from './utils/use-split-panel-focus-control';\nimport { TOOLS_DRAWER_ID, useDrawers } from './utils/use-drawers';\nimport { useContainerQuery } from '@cloudscape-design/component-toolkit';\nimport { togglesConfig } from './toggles';\n\nconst ClassicAppLayout = React.forwardRef(\n (\n {\n navigation,\n navigationWidth = 280,\n navigationHide,\n navigationOpen: controlledNavigationOpen,\n tools,\n toolsWidth = 290,\n toolsHide,\n toolsOpen: controlledToolsOpen,\n breadcrumbs,\n notifications,\n stickyNotifications,\n contentHeader,\n disableContentHeaderOverlap,\n content,\n contentType = 'default',\n disableContentPaddings,\n disableBodyScroll,\n maxContentWidth,\n minContentWidth,\n headerSelector = '#b #h',\n footerSelector = '#b #f',\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 }: AppLayoutProps,\n ref: React.Ref<AppLayoutProps.Ref>\n ) => {\n if (isDevelopment) {\n if (controlledToolsOpen && toolsHide) {\n warnOnce(\n 'AppLayout',\n `You have enabled both the \\`toolsOpen\\` prop and the \\`toolsHide\\` prop. This is not supported. Set \\`toolsOpen\\` to \\`false\\` when you set \\`toolsHide\\` to \\`true\\`.`\n );\n }\n }\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 defaults = applyDefaults(contentType, { maxContentWidth, minContentWidth }, false);\n const [navigationOpen = false, setNavigationOpen] = useControllable(\n controlledNavigationOpen,\n onNavigationChange,\n isMobile ? false : defaults.navigationOpen,\n { componentName: 'AppLayout', controlledProp: 'navigationOpen', changeHandler: 'onNavigationChange' }\n );\n\n const [toolsOpen = false, setToolsOpen] = useControllable(\n controlledToolsOpen,\n onToolsChange,\n isMobile ? false : defaults.toolsOpen,\n { componentName: 'AppLayout', controlledProp: 'toolsOpen', changeHandler: 'onToolsChange' }\n );\n const onToolsToggle = (open: boolean) => {\n setToolsOpen(open);\n focusToolsButtons();\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 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((open: boolean) => {\n setNavigationOpen(open);\n focusNavButtons();\n fireNonCancelableEvent(onNavigationChange, { open });\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(false);\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 }, [isMobile, onNavigationToggle]);\n\n const navigationVisible = !navigationHide && navigationOpen;\n const toolsVisible = !toolsHide && toolsOpen;\n\n const { contentHeightStyle, headerHeight, footerHeight } = useContentHeight(\n headerSelector,\n footerSelector,\n disableBodyScroll\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 : null;\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 getEffectiveToolsWidth = () => {\n if (activeDrawer && activeDrawerSize) {\n return 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\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 = document.documentElement.clientHeight - headerHeight - footerHeight;\n return availableHeight < CONSTRAINED_PAGE_HEIGHT\n ? availableHeight - CONSTRAINED_MAIN_PANEL_MIN_HEIGHT\n : availableHeight - MAIN_PANEL_MIN_HEIGHT;\n }\n });\n const { left: leftOffset, right: rightOffset, width: documentWidth } = useAppLayoutRect(rootRef.current);\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 documentWidth -\n leftOffset -\n rightOffset -\n effectiveNavigationWidth -\n defaults.minContentWidth -\n contentPadding -\n rightDrawerBarWidth\n );\n\n // if there is no space to display split panel in the side, force to bottom\n const isSplitPanelForcedPosition =\n isMobile || resizableSpaceAvailable - effectiveToolsWidth < SPLIT_PANEL_MIN_WIDTH;\n const finalSplitPanePosition = isSplitPanelForcedPosition ? 'bottom' : splitPanelPosition;\n\n const splitPaneAvailableOnTheSide = splitPanelDisplayed && finalSplitPanePosition === 'side';\n\n const sideSplitPanelSize = splitPaneAvailableOnTheSide ? (splitPanelOpen ? splitPanelSize : closedDrawerWidth) : 0;\n const splitPanelMaxWidth = 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: defaults.maxContentWidth } : undefined;\n\n const [splitPanelReportedSize, setSplitPanelReportedSize] = useState(0);\n const [splitPanelReportedHeaderHeight, setSplitPanelReportedHeaderHeight] = useState(0);\n\n const splitPanelContextProps: SplitPanelProviderProps = {\n topOffset: headerHeight + (finalSplitPanePosition === 'bottom' ? stickyNotificationsHeight || 0 : 0),\n bottomOffset: footerHeight,\n leftOffset:\n leftOffset + (isMobile ? 0 : !navigationHide && navigationOpen ? navigationWidth : navigationClosedWidth),\n rightOffset: isMobile ? 0 : rightOffset + effectiveToolsWidth + rightDrawerBarWidth,\n position: finalSplitPanePosition,\n size: splitPanelSize,\n maxWidth: splitPanelMaxWidth,\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\n ? { minWidth: defaults.minContentWidth, maxWidth: defaults.maxContentWidth }\n : 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(false);\n }\n },\n focusToolsClose: () => {\n if (hasDrawers) {\n focusDrawersButtons(true);\n } else {\n focusToolsButtons(true);\n }\n },\n focusActiveDrawer: () => focusDrawersButtons(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={headerHeight}\n ariaLabels={ariaLabels}\n navigationHide={navigationHide}\n toolsHide={toolsHide}\n onNavigationOpen={() => onNavigationToggle(true)}\n onToolsOpen={() => onToolsToggle(true)}\n unfocusable={anyPanelOpen}\n mobileBarRef={mobileBarRef}\n drawers={drawers}\n activeDrawerId={activeDrawerId}\n onDrawerChange={newDrawerId => {\n onActiveDrawerChange(newDrawerId);\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={footerHeight}\n topOffset={headerHeight}\n isMobile={isMobile}\n isOpen={navigationOpen}\n onClick={isMobile ? onNavigationClick : undefined}\n onToggle={onNavigationToggle}\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 : headerHeight}\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 // eslint-disable-next-line react/forbid-component-props\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 >\n <AppLayoutContext.Provider\n value={{\n stickyOffsetTop:\n // We don't support the table header being sticky in case the deprecated disableBodyScroll is enabled,\n // therefore we ensure the table header scrolls out of view by offseting a large enough value (9999px)\n (disableBodyScroll ? (isMobile ? -9999 : 0) : headerHeight) +\n (isMobile ? 0 : stickyNotificationsHeight !== null ? stickyNotificationsHeight : 0),\n stickyOffsetBottom: footerHeight + (splitPanelBottomOffset || 0),\n mobileBarHeight: mobileBarHeight ?? 0,\n }}\n >\n {content}\n </AppLayoutContext.Provider>\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 }}\n minWidth={minDrawerSize}\n maxWidth={drawerMaxSize}\n width={activeDrawerSize}\n bottomOffset={footerHeight}\n topOffset={headerHeight}\n isMobile={isMobile}\n onToggle={isOpen => {\n if (!isOpen) {\n focusToolsButtons();\n focusDrawersButtons();\n onActiveDrawerChange(null);\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={footerHeight}\n topOffset={headerHeight}\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={footerHeight}\n topOffset={headerHeight}\n isMobile={isMobile}\n drawers={drawers}\n activeDrawerId={activeDrawerId}\n onDrawerChange={newDrawerId => {\n if (activeDrawerId !== newDrawerId) {\n focusToolsButtons();\n focusDrawersButtons();\n }\n onActiveDrawerChange(newDrawerId);\n }}\n ariaLabels={ariaLabels}\n />\n )}\n </div>\n </div>\n );\n }\n);\n\nexport default ClassicAppLayout;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"implementation.d.ts","sourceRoot":"","sources":["../../../src/app-layout/implementation.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,eAAO,MAAM,uBAAuB,2FAGlC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { useVisualRefresh } from '../internal/hooks/use-visual-mode';
|
|
5
|
+
import ClassicAppLayout from './classic';
|
|
6
|
+
import RefreshedAppLayout from './visual-refresh';
|
|
7
|
+
export const AppLayoutImplementation = React.forwardRef((props, ref) => {
|
|
8
|
+
const isRefresh = useVisualRefresh();
|
|
9
|
+
return isRefresh ? React.createElement(RefreshedAppLayout, Object.assign({ ref: ref }, props)) : React.createElement(ClassicAppLayout, Object.assign({ ref: ref }, props));
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=implementation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"implementation.js","sourceRoot":"","sources":["../../../src/app-layout/implementation.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,gBAAgB,MAAM,WAAW,CAAC;AACzC,OAAO,kBAAkB,MAAM,kBAAkB,CAAC;AAGlD,MAAM,CAAC,MAAM,uBAAuB,GAAG,KAAK,CAAC,UAAU,CAAqC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACzG,MAAM,SAAS,GAAG,gBAAgB,EAAE,CAAC;IACrC,OAAO,SAAS,CAAC,CAAC,CAAC,oBAAC,kBAAkB,kBAAC,GAAG,EAAE,GAAG,IAAM,KAAK,EAAI,CAAC,CAAC,CAAC,oBAAC,gBAAgB,kBAAC,GAAG,EAAE,GAAG,IAAM,KAAK,EAAI,CAAC;AAC7G,CAAC,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 { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport ClassicAppLayout from './classic';\nimport RefreshedAppLayout from './visual-refresh';\nimport { AppLayoutProps } from './interfaces';\n\nexport const AppLayoutImplementation = React.forwardRef<AppLayoutProps.Ref, AppLayoutProps>((props, ref) => {\n const isRefresh = useVisualRefresh();\n return isRefresh ? <RefreshedAppLayout ref={ref} {...props} /> : <ClassicAppLayout ref={ref} {...props} />;\n});\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/app-layout/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/app-layout/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAG9C,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B,QAAA,MAAM,SAAS,2FA8Cd,CAAC;AAGF,eAAe,SAAS,CAAC"}
|