@cloudscape-design/components 3.0.576 → 3.0.578
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
- package/internal/components/dark-ribbon/index.d.ts +0 -9
- package/internal/components/dark-ribbon/index.d.ts.map +0 -1
- package/internal/components/dark-ribbon/index.js +0 -47
- package/internal/components/dark-ribbon/index.js.map +0 -1
- package/internal/components/dark-ribbon/styles.css.js +0 -7
- package/internal/components/dark-ribbon/styles.scoped.css +0 -17
- package/internal/components/dark-ribbon/styles.selectors.js +0 -8
package/app-layout/index.js
CHANGED
|
@@ -1,38 +1,12 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
import
|
|
5
|
-
import React, { useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
|
|
6
|
-
import { getBaseProps } from '../internal/base-component';
|
|
7
|
-
import { useControllable } from '../internal/hooks/use-controllable';
|
|
8
|
-
import { useMobile } from '../internal/hooks/use-mobile';
|
|
9
|
-
import { fireNonCancelableEvent } from '../internal/events';
|
|
10
|
-
import { applyDefaults } from './defaults';
|
|
11
|
-
import { Notifications } from './notifications';
|
|
12
|
-
import { MobileToolbar } from './mobile-toolbar';
|
|
13
|
-
import { useFocusControl } from './utils/use-focus-control';
|
|
14
|
-
import useContentHeight from './utils/use-content-height';
|
|
15
|
-
import styles from './styles.css.js';
|
|
16
|
-
import testutilStyles from './test-classes/styles.css.js';
|
|
17
|
-
import { findUpUntil } from '../internal/utils/dom';
|
|
18
|
-
import { AppLayoutContext } from '../internal/context/app-layout-context';
|
|
19
|
-
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
20
|
-
import { CONSTRAINED_MAIN_PANEL_MIN_HEIGHT, CONSTRAINED_PAGE_HEIGHT, getSplitPanelDefaultSize, MAIN_PANEL_MIN_HEIGHT, } from '../split-panel/utils/size-utils';
|
|
4
|
+
import React from 'react';
|
|
21
5
|
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
22
|
-
import { useVisualRefresh } from '../internal/hooks/use-visual-mode';
|
|
23
|
-
import ContentWrapper from './content-wrapper';
|
|
24
|
-
import { Drawer, DrawerTriggersBar } from './drawer';
|
|
25
|
-
import { ResizableDrawer } from './drawer/resizable-drawer';
|
|
26
|
-
import { SPLIT_PANEL_MIN_WIDTH, SideSplitPanelDrawer, SplitPanelProvider, } from './split-panel';
|
|
27
|
-
import useAppLayoutRect from './utils/use-app-layout-rect';
|
|
28
|
-
import { isDevelopment } from '../internal/is-development';
|
|
29
|
-
import { useStableCallback, warnOnce } from '@cloudscape-design/component-toolkit/internal';
|
|
30
|
-
import RefreshedAppLayout from './visual-refresh';
|
|
31
6
|
import { useInternalI18n } from '../i18n/context';
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import { togglesConfig } from './toggles';
|
|
7
|
+
import { getBaseProps } from '../internal/base-component';
|
|
8
|
+
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
9
|
+
import { AppLayoutInternal } from './internal';
|
|
36
10
|
const AppLayout = React.forwardRef((_a, ref) => {
|
|
37
11
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
38
12
|
var { contentType = 'default', headerSelector = '#b #h', footerSelector = '#b #f' } = _a, rest = __rest(_a, ["contentType", "headerSelector", "footerSelector"]);
|
|
@@ -51,7 +25,6 @@ const AppLayout = React.forwardRef((_a, ref) => {
|
|
|
51
25
|
disableContentHeaderOverlap: rest.disableContentHeaderOverlap,
|
|
52
26
|
},
|
|
53
27
|
});
|
|
54
|
-
const isRefresh = useVisualRefresh();
|
|
55
28
|
const i18n = useInternalI18n('app-layout');
|
|
56
29
|
const ariaLabels = {
|
|
57
30
|
navigation: i18n('ariaLabels.navigation', (_b = rest.ariaLabels) === null || _b === void 0 ? void 0 : _b.navigation),
|
|
@@ -68,284 +41,8 @@ const AppLayout = React.forwardRef((_a, ref) => {
|
|
|
68
41
|
// This re-builds the props including the default values
|
|
69
42
|
const props = Object.assign(Object.assign({ contentType, headerSelector, footerSelector }, rest), { ariaLabels });
|
|
70
43
|
const baseProps = getBaseProps(rest);
|
|
71
|
-
return (React.createElement("div", Object.assign({ ref: __internalRootRef }, baseProps),
|
|
72
|
-
});
|
|
73
|
-
const OldAppLayout = React.forwardRef((_a, ref) => {
|
|
74
|
-
var _b, _c, _d, _e, _f, _g;
|
|
75
|
-
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"]);
|
|
76
|
-
if (isDevelopment) {
|
|
77
|
-
if (controlledToolsOpen && toolsHide) {
|
|
78
|
-
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\`.`);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
// Private API for embedded view mode
|
|
82
|
-
const __embeddedViewMode = Boolean(rest.__embeddedViewMode);
|
|
83
|
-
const rootRef = useRef(null);
|
|
84
|
-
const isMobile = useMobile();
|
|
85
|
-
const defaults = applyDefaults(contentType, { maxContentWidth, minContentWidth }, false);
|
|
86
|
-
const [navigationOpen = false, setNavigationOpen] = useControllable(controlledNavigationOpen, onNavigationChange, isMobile ? false : defaults.navigationOpen, { componentName: 'AppLayout', controlledProp: 'navigationOpen', changeHandler: 'onNavigationChange' });
|
|
87
|
-
const [toolsOpen = false, setToolsOpen] = useControllable(controlledToolsOpen, onToolsChange, isMobile ? false : defaults.toolsOpen, { componentName: 'AppLayout', controlledProp: 'toolsOpen', changeHandler: 'onToolsChange' });
|
|
88
|
-
const onToolsToggle = (open) => {
|
|
89
|
-
setToolsOpen(open);
|
|
90
|
-
focusToolsButtons();
|
|
91
|
-
fireNonCancelableEvent(onToolsChange, { open });
|
|
92
|
-
};
|
|
93
|
-
const { drawers, activeDrawer, minDrawerSize, activeDrawerSize, activeDrawerId, ariaLabelsWithDrawers, onActiveDrawerChange, onActiveDrawerResize, } = useDrawers(Object.assign({ drawers: controlledDrawers, onDrawerChange, activeDrawerId: controlledActiveDrawerId }, rest), ariaLabels, {
|
|
94
|
-
ariaLabels,
|
|
95
|
-
tools,
|
|
96
|
-
toolsOpen,
|
|
97
|
-
toolsHide,
|
|
98
|
-
toolsWidth,
|
|
99
|
-
onToolsToggle,
|
|
100
|
-
});
|
|
101
|
-
ariaLabels = ariaLabelsWithDrawers;
|
|
102
|
-
const hasDrawers = !!drawers;
|
|
103
|
-
const { refs: navigationRefs, setFocus: focusNavButtons } = useFocusControl(navigationOpen);
|
|
104
|
-
const { refs: toolsRefs, setFocus: focusToolsButtons, loseFocus: loseToolsFocus, } = useFocusControl(toolsOpen || activeDrawer !== undefined, true);
|
|
105
|
-
const { refs: drawerRefs, setFocus: focusDrawersButtons, loseFocus: loseDrawersFocus, } = useFocusControl(!!activeDrawerId, true, activeDrawerId);
|
|
106
|
-
const onNavigationToggle = useStableCallback((open) => {
|
|
107
|
-
setNavigationOpen(open);
|
|
108
|
-
focusNavButtons();
|
|
109
|
-
fireNonCancelableEvent(onNavigationChange, { open });
|
|
110
|
-
});
|
|
111
|
-
const onNavigationClick = (event) => {
|
|
112
|
-
const hasLink = findUpUntil(event.target, node => node.tagName === 'A' && !!node.href);
|
|
113
|
-
if (hasLink) {
|
|
114
|
-
onNavigationToggle(false);
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
useEffect(() => {
|
|
118
|
-
// Close navigation drawer on mobile so that the main content is visible
|
|
119
|
-
if (isMobile) {
|
|
120
|
-
onNavigationToggle(false);
|
|
121
|
-
}
|
|
122
|
-
}, [isMobile, onNavigationToggle]);
|
|
123
|
-
const navigationVisible = !navigationHide && navigationOpen;
|
|
124
|
-
const toolsVisible = !toolsHide && toolsOpen;
|
|
125
|
-
const { contentHeightStyle, headerHeight, footerHeight } = useContentHeight(headerSelector, footerSelector, disableBodyScroll);
|
|
126
|
-
const [notificationsHeight, notificationsRef] = useContainerQuery(rect => rect.contentBoxHeight);
|
|
127
|
-
const anyPanelOpen = navigationVisible || toolsVisible || !!activeDrawer;
|
|
128
|
-
const hasRenderedNotifications = notificationsHeight ? notificationsHeight > 0 : false;
|
|
129
|
-
const stickyNotificationsHeight = stickyNotifications ? notificationsHeight : null;
|
|
130
|
-
const [splitPanelPreferences, setSplitPanelPreferences] = useControllable(controlledSplitPanelPreferences, onSplitPanelPreferencesChange, undefined, {
|
|
131
|
-
componentName: 'AppLayout',
|
|
132
|
-
controlledProp: 'splitPanelPreferences',
|
|
133
|
-
changeHandler: 'onSplitPanelPreferencesChange',
|
|
134
|
-
});
|
|
135
|
-
const [splitPanelOpen = false, setSplitPanelOpen] = useControllable(controlledSplitPanelOpen, onSplitPanelToggle, false, {
|
|
136
|
-
componentName: 'AppLayout',
|
|
137
|
-
controlledProp: 'splitPanelOpen',
|
|
138
|
-
changeHandler: 'onSplitPanelToggle',
|
|
139
|
-
});
|
|
140
|
-
const splitPanelPosition = (splitPanelPreferences === null || splitPanelPreferences === void 0 ? void 0 : splitPanelPreferences.position) || 'bottom';
|
|
141
|
-
const [splitPanelReportedToggle, setSplitPanelReportedToggle] = useState({
|
|
142
|
-
displayed: false,
|
|
143
|
-
ariaLabel: undefined,
|
|
144
|
-
});
|
|
145
|
-
const splitPanelDisplayed = !!(splitPanel && (splitPanelReportedToggle.displayed || splitPanelOpen));
|
|
146
|
-
const closedDrawerWidth = 40;
|
|
147
|
-
const effectiveNavigationWidth = navigationHide ? 0 : navigationOpen ? navigationWidth : closedDrawerWidth;
|
|
148
|
-
const getEffectiveToolsWidth = () => {
|
|
149
|
-
if (activeDrawer && activeDrawerSize) {
|
|
150
|
-
return activeDrawerSize;
|
|
151
|
-
}
|
|
152
|
-
if (toolsHide || drawers) {
|
|
153
|
-
return 0;
|
|
154
|
-
}
|
|
155
|
-
if (toolsOpen) {
|
|
156
|
-
return toolsWidth;
|
|
157
|
-
}
|
|
158
|
-
return closedDrawerWidth;
|
|
159
|
-
};
|
|
160
|
-
const effectiveToolsWidth = getEffectiveToolsWidth();
|
|
161
|
-
const defaultSplitPanelSize = getSplitPanelDefaultSize(splitPanelPosition);
|
|
162
|
-
const [splitPanelSize = defaultSplitPanelSize, setSplitPanelSize] = useControllable(controlledSplitPanelSize, onSplitPanelResize, defaultSplitPanelSize, {
|
|
163
|
-
componentName: 'AppLayout',
|
|
164
|
-
controlledProp: 'splitPanelSize',
|
|
165
|
-
changeHandler: 'onSplitPanelResize',
|
|
166
|
-
});
|
|
167
|
-
const mainContentRef = useRef(null);
|
|
168
|
-
const legacyScrollRootRef = useRef(null);
|
|
169
|
-
const { refs: splitPanelRefs, setLastInteraction: setSplitPanelLastInteraction } = useSplitPanelFocusControl([
|
|
170
|
-
splitPanelPreferences,
|
|
171
|
-
splitPanelOpen,
|
|
172
|
-
]);
|
|
173
|
-
const onSplitPanelPreferencesSet = useCallback((detail) => {
|
|
174
|
-
setSplitPanelPreferences(detail);
|
|
175
|
-
setSplitPanelLastInteraction({ type: 'position' });
|
|
176
|
-
fireNonCancelableEvent(onSplitPanelPreferencesChange, detail);
|
|
177
|
-
}, [setSplitPanelPreferences, onSplitPanelPreferencesChange, setSplitPanelLastInteraction]);
|
|
178
|
-
const onSplitPanelSizeSet = useCallback((newSize) => {
|
|
179
|
-
setSplitPanelSize(newSize);
|
|
180
|
-
fireNonCancelableEvent(onSplitPanelResize, { size: newSize });
|
|
181
|
-
}, [setSplitPanelSize, onSplitPanelResize]);
|
|
182
|
-
const onSplitPanelToggleHandler = useCallback(() => {
|
|
183
|
-
setSplitPanelOpen(!splitPanelOpen);
|
|
184
|
-
setSplitPanelLastInteraction({ type: splitPanelOpen ? 'close' : 'open' });
|
|
185
|
-
fireNonCancelableEvent(onSplitPanelToggle, { open: !splitPanelOpen });
|
|
186
|
-
}, [setSplitPanelOpen, splitPanelOpen, onSplitPanelToggle, setSplitPanelLastInteraction]);
|
|
187
|
-
const getSplitPanelMaxHeight = useStableCallback(() => {
|
|
188
|
-
if (typeof document === 'undefined') {
|
|
189
|
-
return 0; // render the split panel in its minimum possible size
|
|
190
|
-
}
|
|
191
|
-
else if (disableBodyScroll && legacyScrollRootRef.current) {
|
|
192
|
-
const availableHeight = legacyScrollRootRef.current.clientHeight;
|
|
193
|
-
return availableHeight < CONSTRAINED_PAGE_HEIGHT ? availableHeight : availableHeight - MAIN_PANEL_MIN_HEIGHT;
|
|
194
|
-
}
|
|
195
|
-
else {
|
|
196
|
-
const availableHeight = document.documentElement.clientHeight - headerHeight - footerHeight;
|
|
197
|
-
return availableHeight < CONSTRAINED_PAGE_HEIGHT
|
|
198
|
-
? availableHeight - CONSTRAINED_MAIN_PANEL_MIN_HEIGHT
|
|
199
|
-
: availableHeight - MAIN_PANEL_MIN_HEIGHT;
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
const { left: leftOffset, right: rightOffset, width: documentWidth } = useAppLayoutRect(rootRef.current);
|
|
203
|
-
const rightDrawerBarWidth = drawers ? (drawers.length > 1 ? closedDrawerWidth : 0) : 0;
|
|
204
|
-
const contentPadding = 80;
|
|
205
|
-
// all content except split-panel + drawers/tools area
|
|
206
|
-
const resizableSpaceAvailable = Math.max(0, documentWidth -
|
|
207
|
-
leftOffset -
|
|
208
|
-
rightOffset -
|
|
209
|
-
effectiveNavigationWidth -
|
|
210
|
-
defaults.minContentWidth -
|
|
211
|
-
contentPadding -
|
|
212
|
-
rightDrawerBarWidth);
|
|
213
|
-
// if there is no space to display split panel in the side, force to bottom
|
|
214
|
-
const isSplitPanelForcedPosition = isMobile || resizableSpaceAvailable - effectiveToolsWidth < SPLIT_PANEL_MIN_WIDTH;
|
|
215
|
-
const finalSplitPanePosition = isSplitPanelForcedPosition ? 'bottom' : splitPanelPosition;
|
|
216
|
-
const splitPaneAvailableOnTheSide = splitPanelDisplayed && finalSplitPanePosition === 'side';
|
|
217
|
-
const sideSplitPanelSize = splitPaneAvailableOnTheSide ? (splitPanelOpen ? splitPanelSize : closedDrawerWidth) : 0;
|
|
218
|
-
const splitPanelMaxWidth = Math.max(0, resizableSpaceAvailable - effectiveToolsWidth);
|
|
219
|
-
const drawerMaxSize = Math.max(0, resizableSpaceAvailable - sideSplitPanelSize);
|
|
220
|
-
const navigationClosedWidth = navigationHide || isMobile ? 0 : closedDrawerWidth;
|
|
221
|
-
const contentMaxWidthStyle = !isMobile ? { maxWidth: defaults.maxContentWidth } : undefined;
|
|
222
|
-
const [splitPanelReportedSize, setSplitPanelReportedSize] = useState(0);
|
|
223
|
-
const [splitPanelReportedHeaderHeight, setSplitPanelReportedHeaderHeight] = useState(0);
|
|
224
|
-
const splitPanelContextProps = {
|
|
225
|
-
topOffset: headerHeight + (finalSplitPanePosition === 'bottom' ? stickyNotificationsHeight || 0 : 0),
|
|
226
|
-
bottomOffset: footerHeight,
|
|
227
|
-
leftOffset: leftOffset + (isMobile ? 0 : !navigationHide && navigationOpen ? navigationWidth : navigationClosedWidth),
|
|
228
|
-
rightOffset: isMobile ? 0 : rightOffset + effectiveToolsWidth + rightDrawerBarWidth,
|
|
229
|
-
position: finalSplitPanePosition,
|
|
230
|
-
size: splitPanelSize,
|
|
231
|
-
maxWidth: splitPanelMaxWidth,
|
|
232
|
-
getMaxHeight: getSplitPanelMaxHeight,
|
|
233
|
-
disableContentPaddings,
|
|
234
|
-
contentWidthStyles: contentMaxWidthStyle,
|
|
235
|
-
isOpen: splitPanelOpen,
|
|
236
|
-
isForcedPosition: isSplitPanelForcedPosition,
|
|
237
|
-
onResize: onSplitPanelSizeSet,
|
|
238
|
-
onToggle: onSplitPanelToggleHandler,
|
|
239
|
-
onPreferencesChange: onSplitPanelPreferencesSet,
|
|
240
|
-
setSplitPanelToggle: setSplitPanelReportedToggle,
|
|
241
|
-
reportSize: setSplitPanelReportedSize,
|
|
242
|
-
reportHeaderHeight: setSplitPanelReportedHeaderHeight,
|
|
243
|
-
refs: splitPanelRefs,
|
|
244
|
-
};
|
|
245
|
-
const splitPanelWrapped = splitPanel && (React.createElement(SplitPanelProvider, Object.assign({}, splitPanelContextProps), finalSplitPanePosition === 'side' ? (React.createElement(SideSplitPanelDrawer, { displayed: splitPanelDisplayed }, splitPanel)) : (splitPanel)));
|
|
246
|
-
const contentWrapperProps = {
|
|
247
|
-
contentType,
|
|
248
|
-
navigationPadding: navigationHide || !!navigationOpen,
|
|
249
|
-
contentWidthStyles: !isMobile
|
|
250
|
-
? { minWidth: defaults.minContentWidth, maxWidth: defaults.maxContentWidth }
|
|
251
|
-
: undefined,
|
|
252
|
-
toolsPadding:
|
|
253
|
-
// tools padding is displayed in one of the three cases
|
|
254
|
-
// 1. Nothing on the that screen edge (no tools panel and no split panel)
|
|
255
|
-
toolsHide ||
|
|
256
|
-
(hasDrawers && !activeDrawer && (!splitPanelDisplayed || finalSplitPanePosition !== 'side')) ||
|
|
257
|
-
// 2. Tools panel is present and open
|
|
258
|
-
toolsVisible ||
|
|
259
|
-
// 3. Split panel is open in side position
|
|
260
|
-
(splitPaneAvailableOnTheSide && splitPanelOpen),
|
|
261
|
-
isMobile,
|
|
262
|
-
};
|
|
263
|
-
useImperativeHandle(ref, () => ({
|
|
264
|
-
openTools: () => onToolsToggle(true),
|
|
265
|
-
closeNavigationIfNecessary: () => {
|
|
266
|
-
if (isMobile) {
|
|
267
|
-
onNavigationToggle(false);
|
|
268
|
-
}
|
|
269
|
-
},
|
|
270
|
-
focusToolsClose: () => {
|
|
271
|
-
if (hasDrawers) {
|
|
272
|
-
focusDrawersButtons(true);
|
|
273
|
-
}
|
|
274
|
-
else {
|
|
275
|
-
focusToolsButtons(true);
|
|
276
|
-
}
|
|
277
|
-
},
|
|
278
|
-
focusActiveDrawer: () => focusDrawersButtons(true),
|
|
279
|
-
focusSplitPanel: () => { var _a; return (_a = splitPanelRefs.slider.current) === null || _a === void 0 ? void 0 : _a.focus(); },
|
|
280
|
-
}));
|
|
281
|
-
const splitPanelBottomOffset = (_b = (!splitPanelDisplayed || finalSplitPanePosition !== 'bottom'
|
|
282
|
-
? undefined
|
|
283
|
-
: splitPanelOpen
|
|
284
|
-
? splitPanelReportedSize
|
|
285
|
-
: splitPanelReportedHeaderHeight)) !== null && _b !== void 0 ? _b : undefined;
|
|
286
|
-
const [mobileBarHeight, mobileBarRef] = useContainerQuery(rect => rect.contentBoxHeight);
|
|
287
|
-
return (React.createElement("div", { className: clsx(styles.root, testutilStyles.root, disableBodyScroll && styles['root-no-scroll']), ref: rootRef, style: contentHeightStyle },
|
|
288
|
-
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 => {
|
|
289
|
-
onActiveDrawerChange(newDrawerId);
|
|
290
|
-
if (newDrawerId !== activeDrawerId) {
|
|
291
|
-
focusToolsButtons();
|
|
292
|
-
focusDrawersButtons();
|
|
293
|
-
}
|
|
294
|
-
} }, breadcrumbs)),
|
|
295
|
-
React.createElement("div", { className: clsx(styles.layout, disableBodyScroll && styles['layout-no-scroll']) },
|
|
296
|
-
!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)),
|
|
297
|
-
React.createElement("main", { ref: legacyScrollRootRef, className: clsx(styles['layout-main'], {
|
|
298
|
-
[styles['layout-main-scrollable']]: disableBodyScroll,
|
|
299
|
-
[testutilStyles['disable-body-scroll-root']]: disableBodyScroll,
|
|
300
|
-
[styles.unfocusable]: isMobile && anyPanelOpen,
|
|
301
|
-
}) },
|
|
302
|
-
React.createElement("div", { style: {
|
|
303
|
-
marginBottom: splitPanelBottomOffset,
|
|
304
|
-
} },
|
|
305
|
-
notifications && (React.createElement(Notifications, { disableContentPaddings: disableContentPaddings, testUtilsClassName: testutilStyles.notifications, labels: ariaLabels, topOffset: disableBodyScroll ? 0 : headerHeight, sticky: !isMobile && stickyNotifications, ref: notificationsRef }, notifications)),
|
|
306
|
-
((!isMobile && breadcrumbs) || contentHeader) && (React.createElement(ContentWrapper, Object.assign({}, contentWrapperProps),
|
|
307
|
-
!isMobile && breadcrumbs && (React.createElement("div", { className: clsx(testutilStyles.breadcrumbs, styles['breadcrumbs-desktop']) }, breadcrumbs)),
|
|
308
|
-
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)))),
|
|
309
|
-
React.createElement(ContentWrapper, Object.assign({}, contentWrapperProps, { ref: mainContentRef, disablePaddings: disableContentPaddings,
|
|
310
|
-
// eslint-disable-next-line react/forbid-component-props
|
|
311
|
-
className: clsx(!disableContentPaddings && styles['content-wrapper'], !disableContentPaddings &&
|
|
312
|
-
(isMobile || !breadcrumbs) &&
|
|
313
|
-
!contentHeader &&
|
|
314
|
-
styles['content-extra-top-padding'], testutilStyles.content, !disableContentHeaderOverlap && contentHeader && styles['content-overlapped'], !hasRenderedNotifications &&
|
|
315
|
-
!breadcrumbs &&
|
|
316
|
-
!isMobile &&
|
|
317
|
-
!contentHeader &&
|
|
318
|
-
styles['content-wrapper-first-child']) }),
|
|
319
|
-
React.createElement(AppLayoutContext.Provider, { value: {
|
|
320
|
-
stickyOffsetTop:
|
|
321
|
-
// We don't support the table header being sticky in case the deprecated disableBodyScroll is enabled,
|
|
322
|
-
// therefore we ensure the table header scrolls out of view by offseting a large enough value (9999px)
|
|
323
|
-
(disableBodyScroll ? (isMobile ? -9999 : 0) : headerHeight) +
|
|
324
|
-
(isMobile ? 0 : stickyNotificationsHeight !== null ? stickyNotificationsHeight : 0),
|
|
325
|
-
stickyOffsetBottom: footerHeight + (splitPanelBottomOffset || 0),
|
|
326
|
-
mobileBarHeight: mobileBarHeight !== null && mobileBarHeight !== void 0 ? mobileBarHeight : 0,
|
|
327
|
-
} }, content))),
|
|
328
|
-
finalSplitPanePosition === 'bottom' && splitPanelWrapped),
|
|
329
|
-
finalSplitPanePosition === 'side' && splitPanelWrapped,
|
|
330
|
-
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: {
|
|
331
|
-
openLabel: (_c = activeDrawer === null || activeDrawer === void 0 ? void 0 : activeDrawer.ariaLabels) === null || _c === void 0 ? void 0 : _c.triggerButton,
|
|
332
|
-
closeLabel: (_d = activeDrawer === null || activeDrawer === void 0 ? void 0 : activeDrawer.ariaLabels) === null || _d === void 0 ? void 0 : _d.closeButton,
|
|
333
|
-
mainLabel: (_e = activeDrawer === null || activeDrawer === void 0 ? void 0 : activeDrawer.ariaLabels) === null || _e === void 0 ? void 0 : _e.drawerName,
|
|
334
|
-
resizeHandle: (_f = activeDrawer === null || activeDrawer === void 0 ? void 0 : activeDrawer.ariaLabels) === null || _f === void 0 ? void 0 : _f.resizeHandle,
|
|
335
|
-
}, minWidth: minDrawerSize, maxWidth: drawerMaxSize, width: activeDrawerSize, bottomOffset: footerHeight, topOffset: headerHeight, isMobile: isMobile, onToggle: isOpen => {
|
|
336
|
-
if (!isOpen) {
|
|
337
|
-
focusToolsButtons();
|
|
338
|
-
focusDrawersButtons();
|
|
339
|
-
onActiveDrawerChange(null);
|
|
340
|
-
}
|
|
341
|
-
}, 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))),
|
|
342
|
-
hasDrawers && drawers.length > 0 && (React.createElement(DrawerTriggersBar, { drawerRefs: drawerRefs, bottomOffset: footerHeight, topOffset: headerHeight, isMobile: isMobile, drawers: drawers, activeDrawerId: activeDrawerId, onDrawerChange: newDrawerId => {
|
|
343
|
-
if (activeDrawerId !== newDrawerId) {
|
|
344
|
-
focusToolsButtons();
|
|
345
|
-
focusDrawersButtons();
|
|
346
|
-
}
|
|
347
|
-
onActiveDrawerChange(newDrawerId);
|
|
348
|
-
}, ariaLabels: ariaLabels })))));
|
|
44
|
+
return (React.createElement("div", Object.assign({ ref: __internalRootRef }, baseProps),
|
|
45
|
+
React.createElement(AppLayoutInternal, Object.assign({ ref: ref }, props))));
|
|
349
46
|
});
|
|
350
47
|
applyDisplayName(AppLayout, 'AppLayout');
|
|
351
48
|
export default AppLayout;
|
package/app-layout/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/app-layout/index.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,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AA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c,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,gBAAgB,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;AACzC,eAAe,SAAS,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 { getBaseProps } from '../internal/base-component';\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 { applyDisplayName } from '../internal/utils/apply-display-name';\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 useBaseComponent from '../internal/hooks/use-base-component';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\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 RefreshedAppLayout from './visual-refresh';\nimport { useInternalI18n } from '../i18n/context';\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\nexport { AppLayoutProps };\n\nconst AppLayout = React.forwardRef(\n (\n { contentType = 'default', headerSelector = '#b #h', footerSelector = '#b #f', ...rest }: AppLayoutProps,\n ref: React.Ref<AppLayoutProps.Ref>\n ) => {\n const { __internalRootRef } = useBaseComponent<HTMLDivElement>('AppLayout', {\n props: {\n contentType,\n disableContentPaddings: rest.disableContentPaddings,\n disableBodyScroll: rest.disableBodyScroll,\n navigationWidth: rest.navigationWidth,\n navigationHide: rest.navigationHide,\n toolsHide: rest.toolsHide,\n toolsWidth: rest.toolsWidth,\n maxContentWidth: rest.maxContentWidth,\n minContentWidth: rest.minContentWidth,\n stickyNotifications: rest.stickyNotifications,\n disableContentHeaderOverlap: rest.disableContentHeaderOverlap,\n },\n });\n const isRefresh = useVisualRefresh();\n\n const i18n = useInternalI18n('app-layout');\n const ariaLabels = {\n navigation: i18n('ariaLabels.navigation', rest.ariaLabels?.navigation),\n navigationClose: i18n('ariaLabels.navigationClose', rest.ariaLabels?.navigationClose),\n navigationToggle: i18n('ariaLabels.navigationToggle', rest.ariaLabels?.navigationToggle),\n notifications: i18n('ariaLabels.notifications', rest.ariaLabels?.notifications),\n tools: i18n('ariaLabels.tools', rest.ariaLabels?.tools),\n toolsClose: i18n('ariaLabels.toolsClose', rest.ariaLabels?.toolsClose),\n toolsToggle: i18n('ariaLabels.toolsToggle', rest.ariaLabels?.toolsToggle),\n drawers: i18n('ariaLabels.drawers', rest.ariaLabels?.drawers),\n drawersOverflow: i18n('ariaLabels.drawersOverflow', rest.ariaLabels?.drawersOverflow),\n drawersOverflowWithBadge: i18n('ariaLabels.drawersOverflowWithBadge', rest.ariaLabels?.drawersOverflowWithBadge),\n };\n\n // This re-builds the props including the default values\n const props = { contentType, headerSelector, footerSelector, ...rest, ariaLabels };\n\n const baseProps = getBaseProps(rest);\n\n return (\n <div ref={__internalRootRef} {...baseProps}>\n {isRefresh ? <RefreshedAppLayout {...props} ref={ref} /> : <OldAppLayout {...props} ref={ref} />}\n </div>\n );\n }\n);\n\nconst OldAppLayout = 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\napplyDisplayName(AppLayout, 'AppLayout');\nexport default AppLayout;\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/app-layout/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAExE,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAI/C,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAChC,CACE,EAAwG,EACxG,GAAkC,EAClC,EAAE;;QAFF,EAAE,WAAW,GAAG,SAAS,EAAE,cAAc,GAAG,OAAO,EAAE,cAAc,GAAG,OAAO,OAA2B,EAAtB,IAAI,cAAtF,mDAAwF,CAAF;IAGtF,MAAM,EAAE,iBAAiB,EAAE,GAAG,gBAAgB,CAAiB,WAAW,EAAE;QAC1E,KAAK,EAAE;YACL,WAAW;YACX,sBAAsB,EAAE,IAAI,CAAC,sBAAsB;YACnD,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;YACzC,eAAe,EAAE,IAAI,C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AI,CAAC,UAAU,0CAAE,wBAAwB,CAAC;KACjH,CAAC;IAEF,wDAAwD;IACxD,MAAM,KAAK,iCAAK,WAAW,EAAE,cAAc,EAAE,cAAc,IAAK,IAAI,KAAE,UAAU,GAAE,CAAC;IAEnF,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IAErC,OAAO,CACL,2CAAK,GAAG,EAAE,iBAAiB,IAAM,SAAS;QACxC,oBAAC,iBAAiB,kBAAC,GAAG,EAAE,GAAG,IAAM,KAAK,EAAI,CACtC,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;AACzC,eAAe,SAAS,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { useInternalI18n } from '../i18n/context';\nimport { getBaseProps } from '../internal/base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { AppLayoutProps } from './interfaces';\nimport { AppLayoutInternal } from './internal';\n\nexport { AppLayoutProps };\n\nconst AppLayout = React.forwardRef(\n (\n { contentType = 'default', headerSelector = '#b #h', footerSelector = '#b #f', ...rest }: AppLayoutProps,\n ref: React.Ref<AppLayoutProps.Ref>\n ) => {\n const { __internalRootRef } = useBaseComponent<HTMLDivElement>('AppLayout', {\n props: {\n contentType,\n disableContentPaddings: rest.disableContentPaddings,\n disableBodyScroll: rest.disableBodyScroll,\n navigationWidth: rest.navigationWidth,\n navigationHide: rest.navigationHide,\n toolsHide: rest.toolsHide,\n toolsWidth: rest.toolsWidth,\n maxContentWidth: rest.maxContentWidth,\n minContentWidth: rest.minContentWidth,\n stickyNotifications: rest.stickyNotifications,\n disableContentHeaderOverlap: rest.disableContentHeaderOverlap,\n },\n });\n\n const i18n = useInternalI18n('app-layout');\n const ariaLabels = {\n navigation: i18n('ariaLabels.navigation', rest.ariaLabels?.navigation),\n navigationClose: i18n('ariaLabels.navigationClose', rest.ariaLabels?.navigationClose),\n navigationToggle: i18n('ariaLabels.navigationToggle', rest.ariaLabels?.navigationToggle),\n notifications: i18n('ariaLabels.notifications', rest.ariaLabels?.notifications),\n tools: i18n('ariaLabels.tools', rest.ariaLabels?.tools),\n toolsClose: i18n('ariaLabels.toolsClose', rest.ariaLabels?.toolsClose),\n toolsToggle: i18n('ariaLabels.toolsToggle', rest.ariaLabels?.toolsToggle),\n drawers: i18n('ariaLabels.drawers', rest.ariaLabels?.drawers),\n drawersOverflow: i18n('ariaLabels.drawersOverflow', rest.ariaLabels?.drawersOverflow),\n drawersOverflowWithBadge: i18n('ariaLabels.drawersOverflowWithBadge', rest.ariaLabels?.drawersOverflowWithBadge),\n };\n\n // This re-builds the props including the default values\n const props = { contentType, headerSelector, footerSelector, ...rest, ariaLabels };\n\n const baseProps = getBaseProps(rest);\n\n return (\n <div ref={__internalRootRef} {...baseProps}>\n <AppLayoutInternal ref={ref} {...props} />\n </div>\n );\n }\n);\n\napplyDisplayName(AppLayout, 'AppLayout');\nexport default AppLayout;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/app-layout/internal.tsx"],"names":[],"mappings":";AAIA,eAAO,MAAM,iBAAiB,6JAA8B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/app-layout/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAErD,MAAM,CAAC,MAAM,iBAAiB,GAAG,yBAAyB,EAAE,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { createWidgetizedAppLayout } from './widget';\n\nexport const AppLayoutInternal = createWidgetizedAppLayout();\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AppLayoutProps } from './interfaces';
|
|
3
|
+
type AppLayoutType = React.ForwardRefExoticComponent<AppLayoutProps & React.RefAttributes<AppLayoutProps.Ref>>;
|
|
4
|
+
export declare function createWidgetizedAppLayout(AppLayoutLoader?: AppLayoutType): AppLayoutType;
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=widget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget.d.ts","sourceRoot":"","sources":["../../../src/app-layout/widget.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAI9C,KAAK,aAAa,GAAG,KAAK,CAAC,yBAAyB,CAAC,cAAc,GAAG,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;AAE/G,wBAAgB,yBAAyB,CAAC,eAAe,CAAC,EAAE,aAAa,GAAG,aAAa,CASxF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
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 { getGlobalFlag } from '../internal/utils/global-flags';
|
|
5
|
+
import { useVisualRefresh } from '../internal/hooks/use-visual-mode';
|
|
6
|
+
import { AppLayoutImplementation } from './implementation';
|
|
7
|
+
export function createWidgetizedAppLayout(AppLayoutLoader) {
|
|
8
|
+
return React.forwardRef((props, ref) => {
|
|
9
|
+
const isRefresh = useVisualRefresh();
|
|
10
|
+
if (isRefresh && getGlobalFlag('appLayoutWidget') && AppLayoutLoader) {
|
|
11
|
+
return React.createElement(AppLayoutLoader, Object.assign({ ref: ref }, props));
|
|
12
|
+
}
|
|
13
|
+
return React.createElement(AppLayoutImplementation, Object.assign({ ref: ref }, props));
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=widget.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget.js","sourceRoot":"","sources":["../../../src/app-layout/widget.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAI3D,MAAM,UAAU,yBAAyB,CAAC,eAA+B;IACvE,OAAO,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QACrC,MAAM,SAAS,GAAG,gBAAgB,EAAE,CAAC;QACrC,IAAI,SAAS,IAAI,aAAa,CAAC,iBAAiB,CAAC,IAAI,eAAe,EAAE;YACpE,OAAO,oBAAC,eAAe,kBAAC,GAAG,EAAE,GAAG,IAAM,KAAK,EAAI,CAAC;SACjD;QAED,OAAO,oBAAC,uBAAuB,kBAAC,GAAG,EAAE,GAAG,IAAM,KAAK,EAAI,CAAC;IAC1D,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { getGlobalFlag } from '../internal/utils/global-flags';\nimport { AppLayoutProps } from './interfaces';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { AppLayoutImplementation } from './implementation';\n\ntype AppLayoutType = React.ForwardRefExoticComponent<AppLayoutProps & React.RefAttributes<AppLayoutProps.Ref>>;\n\nexport function createWidgetizedAppLayout(AppLayoutLoader?: AppLayoutType): AppLayoutType {\n return React.forwardRef((props, ref) => {\n const isRefresh = useVisualRefresh();\n if (isRefresh && getGlobalFlag('appLayoutWidget') && AppLayoutLoader) {\n return <AppLayoutLoader ref={ref} {...props} />;\n }\n\n return <AppLayoutImplementation ref={ref} {...props} />;\n });\n}\n"]}
|
package/internal/environment.js
CHANGED
package/internal/manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global-flags.d.ts","sourceRoot":"","sources":["../../../../src/internal/utils/global-flags.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB,eAAmC,CAAC;AAEvE,UAAU,WAAW;IACnB,wBAAwB,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"global-flags.d.ts","sourceRoot":"","sources":["../../../../src/internal/utils/global-flags.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB,eAAmC,CAAC;AAEvE,UAAU,WAAW;IACnB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,WAAW;IAC1B,CAAC,sBAAsB,CAAC,CAAC,EAAE,WAAW,CAAC;CACxC;AAED,eAAO,MAAM,YAAY,qBAExB,CAAC;AAWF,eAAO,MAAM,aAAa,aAAc,MAAM,WAAW,KAAG,WAAW,CAAC,MAAM,WAAW,CAAC,GAAG,SAU5F,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global-flags.js","sourceRoot":"","sources":["../../../../src/internal/utils/global-flags.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"global-flags.js","sourceRoot":"","sources":["../../../../src/internal/utils/global-flags.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;AAWvE,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE;IAC/B,OAAO,MAAM,CAAC,GAAG,CAAC;AACpB,CAAC,CAAC;AAEF,SAAS,SAAS;IAChB,OAAO,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC;AAC7D,CAAC;AAED,SAAS,QAAQ,CAAC,MAAe,EAAE,QAA2B;;IAC5D,MAAM,MAAM,GAAG,MAA4B,CAAC;IAC5C,OAAO,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,sBAAsB,CAAC,0CAAG,QAAQ,CAAC,CAAC;AACtD,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,QAA2B,EAA8C,EAAE;IACvG,IAAI;QACF,MAAM,OAAO,GAAG,QAAQ,CAAC,SAAS,EAAE,EAAE,QAAQ,CAAC,CAAC;QAChD,IAAI,OAAO,KAAK,SAAS,EAAE;YACzB,OAAO,OAAO,CAAC;SAChB;QACD,OAAO,QAAQ,CAAC,YAAY,EAAE,EAAE,QAAQ,CAAC,CAAC;KAC3C;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,SAAS,CAAC;KAClB;AACH,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport const awsuiGlobalFlagsSymbol = Symbol.for('awsui-global-flags');\n\ninterface GlobalFlags {\n removeHighContrastHeader?: boolean;\n appLayoutWidget?: boolean;\n}\n\nexport interface FlagsHolder {\n [awsuiGlobalFlagsSymbol]?: GlobalFlags;\n}\n\nexport const getTopWindow = () => {\n return window.top;\n};\n\nfunction getGlobal() {\n return typeof window !== 'undefined' ? window : globalThis;\n}\n\nfunction readFlag(window: unknown, flagName: keyof GlobalFlags) {\n const holder = window as FlagsHolder | null;\n return holder?.[awsuiGlobalFlagsSymbol]?.[flagName];\n}\n\nexport const getGlobalFlag = (flagName: keyof GlobalFlags): GlobalFlags[keyof GlobalFlags] | undefined => {\n try {\n const ownFlag = readFlag(getGlobal(), flagName);\n if (ownFlag !== undefined) {\n return ownFlag;\n }\n return readFlag(getTopWindow(), flagName);\n } catch (e) {\n return undefined;\n }\n};\n"]}
|
package/package.json
CHANGED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SplitPanelProps } from './interfaces';
|
|
3
|
+
export { SplitPanelProps };
|
|
4
|
+
export declare const SplitPanelImplementation: React.ForwardRefExoticComponent<SplitPanelProps & React.RefAttributes<HTMLElement>>;
|
|
5
|
+
//# sourceMappingURL=implementation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"implementation.d.ts","sourceRoot":"","sources":["../../../src/split-panel/implementation.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAO5E,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAiB/C,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,eAAO,MAAM,wBAAwB,qFAiPpC,CAAC"}
|