@cloudscape-design/components-themeable 3.0.1069 → 3.0.1071
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/lib/internal/manifest.json +1 -1
- package/lib/internal/scss/app-layout/visual-refresh-toolbar/skeleton/styles.scss +6 -0
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
- package/lib/internal/scss/split-panel/styles.scss +4 -2
- package/lib/internal/template/app-layout/utils/use-focus-control.d.ts +1 -0
- package/lib/internal/template/app-layout/utils/use-focus-control.d.ts.map +1 -1
- package/lib/internal/template/app-layout/utils/use-focus-control.js +66 -6
- package/lib/internal/template/app-layout/utils/use-focus-control.js.map +1 -1
- package/lib/internal/template/app-layout/utils/use-split-panel-focus-control.d.ts.map +1 -1
- package/lib/internal/template/app-layout/utils/use-split-panel-focus-control.js +15 -13
- package/lib/internal/template/app-layout/utils/use-split-panel-focus-control.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/index.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/index.js +37 -350
- package/lib/internal/template/app-layout/visual-refresh-toolbar/index.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/interfaces.d.ts +20 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/interfaces.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/interfaces.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/internal.d.ts +6 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/internal.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/internal.js +13 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/internal.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/index.js +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/index.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/notifications/index.js +2 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/notifications/index.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/index.d.ts +11 -16
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/index.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/index.js +21 -30
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/index.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/interfaces.d.ts +21 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/interfaces.d.ts.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/interfaces.js +2 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/interfaces.js.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/multi-layout.d.ts +8 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/multi-layout.d.ts.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/multi-layout.js +41 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/multi-layout.js.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/{slot-skeletons.d.ts → skeleton-parts.d.ts} +9 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/skeleton-parts.d.ts.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/skeleton-parts.js +21 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/skeleton-parts.js.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/{slot-wrappers.d.ts → slots.d.ts} +7 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/slots.d.ts.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/{breadcrumbs/index.js → slots.js} +6 -3
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/slots.js.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +23 -21
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +42 -37
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +23 -21
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/index.d.ts +18 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/index.d.ts.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/index.js +27 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/index.js.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/interfaces.d.ts +29 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/interfaces.d.ts.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/interfaces.js +2 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/interfaces.js.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/invariants.d.ts +3 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/invariants.d.ts.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/invariants.js +4 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/invariants.js.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/props-merger.d.ts +5 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/props-merger.d.ts.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/{multi-layout.js → state/props-merger.js} +28 -40
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/props-merger.js.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-app-layout.d.ts +6 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-app-layout.d.ts.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-app-layout.js +322 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-app-layout.js.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-skeleton-slots-attributes.d.ts +4 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-skeleton-slots-attributes.d.ts.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-skeleton-slots-attributes.js +59 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-skeleton-slots-attributes.js.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.d.ts +2 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.js +2 -3
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.d.ts +5 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.d.ts.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.js +29 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.js.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.d.ts +5 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.d.ts.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.js +28 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.js.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.d.ts +5 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.d.ts.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.js +17 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.js.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/top-content-slot.d.ts +5 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/top-content-slot.d.ts.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/top-content-slot.js +19 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/top-content-slot.js.map +1 -0
- package/lib/internal/template/breadcrumb-group/internal.d.ts +2 -1
- package/lib/internal/template/breadcrumb-group/internal.d.ts.map +1 -1
- package/lib/internal/template/breadcrumb-group/internal.js +3 -2
- package/lib/internal/template/breadcrumb-group/internal.js.map +1 -1
- package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
- package/lib/internal/template/internal/environment.js +2 -2
- package/lib/internal/template/internal/environment.json +2 -2
- package/lib/internal/template/internal/types.d.ts +9 -0
- package/lib/internal/template/internal/types.d.ts.map +1 -1
- package/lib/internal/template/internal/types.js.map +1 -1
- package/lib/internal/template/internal/widget-exports.d.ts +5 -0
- package/lib/internal/template/internal/widget-exports.d.ts.map +1 -1
- package/lib/internal/template/internal/widget-exports.js +7 -0
- package/lib/internal/template/internal/widget-exports.js.map +1 -1
- package/lib/internal/template/internal/widgets/index.d.ts +2 -3
- package/lib/internal/template/internal/widgets/index.d.ts.map +1 -1
- package/lib/internal/template/internal/widgets/index.js.map +1 -1
- package/lib/internal/template/internal/widgets/loader-mock.d.ts +3 -0
- package/lib/internal/template/internal/widgets/loader-mock.d.ts.map +1 -0
- package/lib/internal/template/internal/widgets/loader-mock.js +43 -0
- package/lib/internal/template/internal/widgets/loader-mock.js.map +1 -0
- package/lib/internal/template/split-panel/styles.css.js +27 -27
- package/lib/internal/template/split-panel/styles.scoped.css +46 -44
- package/lib/internal/template/split-panel/styles.selectors.js +27 -27
- package/package.json +1 -1
- package/lib/internal/scss/app-layout/visual-refresh-toolbar/skeleton/breadcrumbs/styles.scss +0 -9
- package/lib/internal/template/app-layout/visual-refresh-toolbar/multi-layout.d.ts +0 -34
- package/lib/internal/template/app-layout/visual-refresh-toolbar/multi-layout.d.ts.map +0 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/multi-layout.js.map +0 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/breadcrumbs/index.d.ts +0 -9
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/breadcrumbs/index.d.ts.map +0 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/breadcrumbs/index.js.map +0 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/breadcrumbs/styles.css.js +0 -7
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/breadcrumbs/styles.scoped.css +0 -7
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/breadcrumbs/styles.selectors.js +0 -8
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/slot-skeletons.d.ts.map +0 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/slot-skeletons.js +0 -9
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/slot-skeletons.js.map +0 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/slot-wrappers.d.ts.map +0 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/slot-wrappers.js +0 -8
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/slot-wrappers.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/toolbar/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO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AAC,cAAc,IACb,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,IAAI,EACtC,OAAO,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,mCAAI,EAAE,EACtD,eAAe,EAAE,eAAe,EAChC,oBAAoB,EAAE,oBAAoB,EAC1C,qBAAqB,EAAE,CAAA,qBAAqB,aAArB,qBAAqB,uBAArB,qBAAqB,CAAE,SAAS,EAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,EAC3F,kBAAkB,EAAE,kBAAkB,EACtC,kBAAkB,EAAE,kBAAkB,EACtC,QAAQ,EAAE,oBAAoB,EAC9B,yBAAyB,EAAE,yBAAyB,EACpD,aAAa,EAAE,MAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,mCAAI,EAAE,EAClE,sBAAsB,EAAE,sBAAsB,aAAtB,sBAAsB,cAAtB,sBAAsB,GAAI,EAAE,EACpD,2BAA2B,EAAE,2BAA2B,EACxD,gBAAgB,EAAE,gBAAgB,EAClC,mBAAmB,EAAE,mBAAoB,GACzC,CACE,CACP,CACG,CACM,CACf,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,gCAAgC,GAAG,yBAAyB,CACvE,8BAA8B,EAC9B,eAAe,CAChB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';\n\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { AppLayoutProps } from '../../interfaces';\nimport { OnChangeParams } from '../../utils/use-drawers';\nimport { Focusable, FocusControlMultipleStates } from '../../utils/use-focus-control';\nimport { AppLayoutInternals } from '../interfaces';\nimport { BreadcrumbsSlot } from '../skeleton/breadcrumbs';\nimport { ToolbarSkeleton } from '../skeleton/slot-skeletons';\nimport { ToolbarSlot } from '../skeleton/slot-wrappers';\nimport { DrawerTriggers, SplitPanelToggleProps } from './drawer-triggers';\nimport TriggerButton from './trigger-button';\n\nimport testutilStyles from '../../test-classes/styles.css.js';\nimport styles from './styles.css.js';\n\nexport { SplitPanelToggleProps };\n\nexport interface ToolbarProps {\n ariaLabels?: AppLayoutProps.Labels;\n // navigation\n hasNavigation?: boolean;\n navigationOpen?: boolean;\n onNavigationToggle?: (open: boolean) => void;\n navigationFocusRef?: React.Ref<Focusable>;\n\n // breadcrumbs\n hasBreadcrumbsPortal?: boolean;\n\n // split panel\n hasSplitPanel?: boolean;\n splitPanelToggleProps?: SplitPanelToggleProps;\n splitPanelFocusRef?: React.Ref<Focusable>;\n onSplitPanelToggle?: () => void;\n\n // drawers\n activeDrawerId?: string | null;\n drawers?: ReadonlyArray<AppLayoutProps.Drawer>;\n drawersFocusRef?: React.Ref<Focusable>;\n globalDrawersFocusControl?: FocusControlMultipleStates;\n onActiveDrawerChange?: (drawerId: string | null, params: OnChangeParams) => void;\n globalDrawers?: ReadonlyArray<AppLayoutProps.Drawer> | undefined;\n activeGlobalDrawersIds?: ReadonlyArray<string>;\n onActiveGlobalDrawersChange?: ((drawerId: string, params: OnChangeParams) => void) | undefined;\n\n expandedDrawerId?: string | null;\n setExpandedDrawerId?: (value: string | null) => void;\n}\n\nexport interface AppLayoutToolbarImplementationProps {\n appLayoutInternals: AppLayoutInternals;\n toolbarProps: ToolbarProps;\n}\n\nexport function AppLayoutToolbarImplementation({\n appLayoutInternals,\n // the value could be undefined if this component is loaded as a widget by a different app layout version\n // not testable in a single-version setup\n toolbarProps = {},\n}: AppLayoutToolbarImplementationProps) {\n const { breadcrumbs, discoveredBreadcrumbs, verticalOffsets, isMobile, setToolbarHeight } = appLayoutInternals;\n const {\n ariaLabels,\n activeDrawerId,\n drawers,\n drawersFocusRef,\n onActiveDrawerChange,\n globalDrawersFocusControl,\n globalDrawers,\n activeGlobalDrawersIds,\n onActiveGlobalDrawersChange,\n hasNavigation,\n navigationOpen,\n navigationFocusRef,\n onNavigationToggle,\n hasSplitPanel,\n splitPanelFocusRef,\n splitPanelToggleProps,\n onSplitPanelToggle,\n expandedDrawerId,\n setExpandedDrawerId,\n } = toolbarProps;\n const drawerExpandedMode = !!expandedDrawerId;\n const ref = useRef<HTMLElement>(null);\n useResizeObserver(ref, entry => setToolbarHeight(entry.borderBoxHeight));\n useEffect(() => {\n return () => {\n setToolbarHeight(0);\n };\n // unmount effect only\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const anyPanelOpenInMobile = !!isMobile && (!!activeDrawerId || (!!navigationOpen && !!hasNavigation));\n useEffect(() => {\n if (anyPanelOpenInMobile) {\n document.body.classList.add(styles['block-body-scroll']);\n } else {\n document.body.classList.remove(styles['block-body-scroll']);\n }\n return () => {\n document.body.classList.remove(styles['block-body-scroll']);\n };\n }, [anyPanelOpenInMobile]);\n\n const navLandmarkAttributes = navigationOpen\n ? { role: 'presentation' }\n : { role: 'navigation', 'aria-label': ariaLabels?.navigation };\n\n return (\n <ToolbarSlot\n ref={ref}\n className={clsx(styles['universal-toolbar'], testutilStyles.toolbar, {\n [testutilStyles['mobile-bar']]: isMobile,\n })}\n style={{\n insetBlockStart: verticalOffsets.toolbar,\n }}\n >\n <div className={styles['toolbar-container']}>\n {hasNavigation && (\n <nav {...navLandmarkAttributes} className={clsx(styles['universal-toolbar-nav'])}>\n <TriggerButton\n ariaLabel={ariaLabels?.navigationToggle ?? undefined}\n ariaExpanded={!drawerExpandedMode && navigationOpen}\n iconName=\"menu\"\n className={testutilStyles['navigation-toggle']}\n onClick={() => {\n if (setExpandedDrawerId) {\n setExpandedDrawerId(null);\n }\n if (navigationOpen && expandedDrawerId) {\n return;\n }\n onNavigationToggle?.(!navigationOpen);\n }}\n ref={navigationFocusRef}\n selected={!drawerExpandedMode && navigationOpen}\n disabled={anyPanelOpenInMobile}\n />\n </nav>\n )}\n {(breadcrumbs || discoveredBreadcrumbs) && (\n <div className={clsx(styles['universal-toolbar-breadcrumbs'], testutilStyles.breadcrumbs)}>\n <BreadcrumbsSlot\n ownBreadcrumbs={appLayoutInternals.breadcrumbs}\n discoveredBreadcrumbs={appLayoutInternals.discoveredBreadcrumbs}\n />\n </div>\n )}\n {(drawers?.length || globalDrawers?.length || (hasSplitPanel && splitPanelToggleProps?.displayed)) && (\n <div className={clsx(styles['universal-toolbar-drawers'])}>\n <DrawerTriggers\n ariaLabels={ariaLabels}\n activeDrawerId={activeDrawerId ?? null}\n drawers={drawers?.filter(item => !!item.trigger) ?? []}\n drawersFocusRef={drawersFocusRef}\n onActiveDrawerChange={onActiveDrawerChange}\n splitPanelToggleProps={splitPanelToggleProps?.displayed ? splitPanelToggleProps : undefined}\n splitPanelFocusRef={splitPanelFocusRef}\n onSplitPanelToggle={onSplitPanelToggle}\n disabled={anyPanelOpenInMobile}\n globalDrawersFocusControl={globalDrawersFocusControl}\n globalDrawers={globalDrawers?.filter(item => !!item.trigger) ?? []}\n activeGlobalDrawersIds={activeGlobalDrawersIds ?? []}\n onActiveGlobalDrawersChange={onActiveGlobalDrawersChange}\n expandedDrawerId={expandedDrawerId}\n setExpandedDrawerId={setExpandedDrawerId!}\n />\n </div>\n )}\n </div>\n </ToolbarSlot>\n );\n}\n\nexport const createWidgetizedAppLayoutToolbar = createWidgetizedComponent(\n AppLayoutToolbarImplementation,\n ToolbarSkeleton\n);\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/toolbar/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;A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AU,EACtB,cAAc,EAAE,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,IAAI,EACtC,OAAO,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,mCAAI,EAAE,EACtD,eAAe,EAAE,eAAe,EAChC,oBAAoB,EAAE,oBAAoB,EAC1C,qBAAqB,EAAE,CAAA,qBAAqB,aAArB,qBAAqB,uBAArB,qBAAqB,CAAE,SAAS,EAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,EAC3F,kBAAkB,EAAE,kBAAkB,EACtC,kBAAkB,EAAE,kBAAkB,EACtC,QAAQ,EAAE,oBAAoB,EAC9B,yBAAyB,EAAE,yBAAyB,EACpD,aAAa,EAAE,MAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,mCAAI,EAAE,EAClE,sBAAsB,EAAE,sBAAsB,aAAtB,sBAAsB,cAAtB,sBAAsB,GAAI,EAAE,EACpD,2BAA2B,EAAE,2BAA2B,EACxD,gBAAgB,EAAE,gBAAgB,EAClC,mBAAmB,EAAE,mBAAoB,GACzC,CACE,CACP,CACG,CACM,CACf,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,gCAAgC,GAAG,yBAAyB,CACvE,8BAA8B,EAC9B,eAAe,CAChB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';\n\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { AppLayoutProps } from '../../interfaces';\nimport { OnChangeParams } from '../../utils/use-drawers';\nimport { Focusable, FocusControlMultipleStates } from '../../utils/use-focus-control';\nimport { AppLayoutInternals } from '../interfaces';\nimport { ToolbarSkeleton } from '../skeleton/skeleton-parts';\nimport { BreadcrumbsSlot, ToolbarSlot } from '../skeleton/slots';\nimport { DrawerTriggers, SplitPanelToggleProps } from './drawer-triggers';\nimport TriggerButton from './trigger-button';\n\nimport testutilStyles from '../../test-classes/styles.css.js';\nimport styles from './styles.css.js';\n\nexport { SplitPanelToggleProps };\n\nexport interface ToolbarProps {\n ariaLabels?: AppLayoutProps.Labels;\n // navigation\n hasNavigation?: boolean;\n navigationOpen?: boolean;\n onNavigationToggle?: (open: boolean) => void;\n navigationFocusRef?: React.Ref<Focusable>;\n\n // breadcrumbs\n hasBreadcrumbsPortal?: boolean;\n\n // split panel\n hasSplitPanel?: boolean;\n splitPanelToggleProps?: SplitPanelToggleProps;\n splitPanelFocusRef?: React.Ref<Focusable>;\n onSplitPanelToggle?: () => void;\n\n // drawers\n activeDrawerId?: string | null;\n drawers?: ReadonlyArray<AppLayoutProps.Drawer>;\n drawersFocusRef?: React.Ref<Focusable>;\n globalDrawersFocusControl?: FocusControlMultipleStates;\n onActiveDrawerChange?: (drawerId: string | null, params: OnChangeParams) => void;\n globalDrawers?: ReadonlyArray<AppLayoutProps.Drawer> | undefined;\n activeGlobalDrawersIds?: ReadonlyArray<string>;\n onActiveGlobalDrawersChange?: ((drawerId: string, params: OnChangeParams) => void) | undefined;\n\n expandedDrawerId?: string | null;\n setExpandedDrawerId?: (value: string | null) => void;\n}\n\nexport interface AppLayoutToolbarImplementationProps {\n appLayoutInternals: AppLayoutInternals;\n toolbarProps: ToolbarProps;\n}\n\nexport function AppLayoutToolbarImplementation({\n appLayoutInternals,\n // the value could be undefined if this component is loaded as a widget by a different app layout version\n // not testable in a single-version setup\n toolbarProps = {},\n}: AppLayoutToolbarImplementationProps) {\n const { breadcrumbs, discoveredBreadcrumbs, verticalOffsets, isMobile, setToolbarHeight } = appLayoutInternals;\n const {\n ariaLabels,\n activeDrawerId,\n drawers,\n drawersFocusRef,\n onActiveDrawerChange,\n globalDrawersFocusControl,\n globalDrawers,\n activeGlobalDrawersIds,\n onActiveGlobalDrawersChange,\n hasNavigation,\n navigationOpen,\n navigationFocusRef,\n onNavigationToggle,\n hasSplitPanel,\n splitPanelFocusRef,\n splitPanelToggleProps,\n onSplitPanelToggle,\n expandedDrawerId,\n setExpandedDrawerId,\n } = toolbarProps;\n const drawerExpandedMode = !!expandedDrawerId;\n const ref = useRef<HTMLElement>(null);\n useResizeObserver(ref, entry => setToolbarHeight(entry.borderBoxHeight));\n useEffect(() => {\n return () => {\n setToolbarHeight(0);\n };\n // unmount effect only\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const anyPanelOpenInMobile = !!isMobile && (!!activeDrawerId || (!!navigationOpen && !!hasNavigation));\n useEffect(() => {\n if (anyPanelOpenInMobile) {\n document.body.classList.add(styles['block-body-scroll']);\n } else {\n document.body.classList.remove(styles['block-body-scroll']);\n }\n return () => {\n document.body.classList.remove(styles['block-body-scroll']);\n };\n }, [anyPanelOpenInMobile]);\n\n const navLandmarkAttributes = navigationOpen\n ? { role: 'presentation' }\n : { role: 'navigation', 'aria-label': ariaLabels?.navigation };\n\n return (\n <ToolbarSlot\n ref={ref}\n className={clsx(styles['universal-toolbar'], testutilStyles.toolbar, {\n [testutilStyles['mobile-bar']]: isMobile,\n })}\n style={{\n insetBlockStart: verticalOffsets.toolbar,\n }}\n >\n <div className={styles['toolbar-container']}>\n {hasNavigation && (\n <nav {...navLandmarkAttributes} className={clsx(styles['universal-toolbar-nav'])}>\n <TriggerButton\n ariaLabel={ariaLabels?.navigationToggle ?? undefined}\n ariaExpanded={!drawerExpandedMode && navigationOpen}\n iconName=\"menu\"\n className={testutilStyles['navigation-toggle']}\n onClick={() => {\n if (setExpandedDrawerId) {\n setExpandedDrawerId(null);\n }\n if (navigationOpen && expandedDrawerId) {\n return;\n }\n onNavigationToggle?.(!navigationOpen);\n }}\n ref={navigationFocusRef}\n selected={!drawerExpandedMode && navigationOpen}\n disabled={anyPanelOpenInMobile}\n />\n </nav>\n )}\n {(breadcrumbs || discoveredBreadcrumbs) && (\n <div className={clsx(styles['universal-toolbar-breadcrumbs'], testutilStyles.breadcrumbs)}>\n <BreadcrumbsSlot\n ownBreadcrumbs={appLayoutInternals.breadcrumbs}\n discoveredBreadcrumbs={appLayoutInternals.discoveredBreadcrumbs}\n />\n </div>\n )}\n {(drawers?.length || globalDrawers?.length || (hasSplitPanel && splitPanelToggleProps?.displayed)) && (\n <div className={clsx(styles['universal-toolbar-drawers'])}>\n <DrawerTriggers\n ariaLabels={ariaLabels}\n activeDrawerId={activeDrawerId ?? null}\n drawers={drawers?.filter(item => !!item.trigger) ?? []}\n drawersFocusRef={drawersFocusRef}\n onActiveDrawerChange={onActiveDrawerChange}\n splitPanelToggleProps={splitPanelToggleProps?.displayed ? splitPanelToggleProps : undefined}\n splitPanelFocusRef={splitPanelFocusRef}\n onSplitPanelToggle={onSplitPanelToggle}\n disabled={anyPanelOpenInMobile}\n globalDrawersFocusControl={globalDrawersFocusControl}\n globalDrawers={globalDrawers?.filter(item => !!item.trigger) ?? []}\n activeGlobalDrawersIds={activeGlobalDrawersIds ?? []}\n onActiveGlobalDrawersChange={onActiveGlobalDrawersChange}\n expandedDrawerId={expandedDrawerId}\n setExpandedDrawerId={setExpandedDrawerId!}\n />\n </div>\n )}\n </div>\n </ToolbarSlot>\n );\n}\n\nexport const createWidgetizedAppLayoutToolbar = createWidgetizedComponent(\n AppLayoutToolbarImplementation,\n ToolbarSkeleton\n);\n"]}
|
package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SkeletonPartProps } from '../skeleton/interfaces';
|
|
3
|
+
export declare const AfterMainSlotImplementation: ({ appLayoutState, appLayoutProps }: SkeletonPartProps) => JSX.Element | null;
|
|
4
|
+
export declare const createWidgetizedAppLayoutAfterMainSlot: (Loader?: (({ appLayoutState, appLayoutProps }: SkeletonPartProps) => JSX.Element | null) | undefined) => ({ appLayoutState, appLayoutProps }: SkeletonPartProps) => JSX.Element | null;
|
|
5
|
+
//# sourceMappingURL=after-main-slot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"after-main-slot.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAO3D,eAAO,MAAM,2BAA2B,uCAAwC,iBAAiB,uBAqDhG,CAAC;AAEF,eAAO,MAAM,sCAAsC,kDAvD6B,iBAAiB,8EAAjB,iBAAiB,uBAuDW,CAAC"}
|
package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
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 clsx from 'clsx';
|
|
5
|
+
import { createWidgetizedComponent } from '../../../internal/widgets';
|
|
6
|
+
import { ActiveDrawersContext } from '../../utils/visibility-context';
|
|
7
|
+
import { AppLayoutDrawerImplementation as AppLayoutDrawer, AppLayoutGlobalDrawersImplementation as AppLayoutGlobalDrawers, } from '../drawer';
|
|
8
|
+
import { AppLayoutSplitPanelDrawerSideImplementation as AppLayoutSplitPanelSide } from '../split-panel';
|
|
9
|
+
import { isWidgetReady } from '../state/invariants';
|
|
10
|
+
import sharedStyles from '../../resize/styles.css.js';
|
|
11
|
+
import styles from '../skeleton/styles.css.js';
|
|
12
|
+
export const AfterMainSlotImplementation = ({ appLayoutState, appLayoutProps }) => {
|
|
13
|
+
if (!isWidgetReady(appLayoutState)) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
const { navigationOpen, activeGlobalDrawersIds, expandedDrawerId, activeDrawer, splitPanelOpen, drawers, splitPanelPosition, } = appLayoutState.widgetizedState;
|
|
17
|
+
const drawerExpandedMode = !!expandedDrawerId;
|
|
18
|
+
const toolsOpen = !!activeDrawer;
|
|
19
|
+
const globalToolsOpen = !!(activeGlobalDrawersIds === null || activeGlobalDrawersIds === void 0 ? void 0 : activeGlobalDrawersIds.length);
|
|
20
|
+
return (React.createElement(React.Fragment, null,
|
|
21
|
+
splitPanelPosition === 'side' && (React.createElement("div", { className: clsx(styles['split-panel-side'], !splitPanelOpen && styles['panel-hidden'], drawerExpandedMode && styles.hidden) },
|
|
22
|
+
React.createElement(AppLayoutSplitPanelSide, { appLayoutInternals: appLayoutState.appLayoutInternals, splitPanelInternals: appLayoutState.splitPanelInternals }, appLayoutProps.splitPanel))),
|
|
23
|
+
React.createElement("div", { className: clsx(styles.tools, !toolsOpen && styles['panel-hidden'], sharedStyles['with-motion-horizontal'], navigationOpen && !toolsOpen && styles['unfocusable-mobile'], toolsOpen && styles['tools-open'], drawerExpandedMode && styles.hidden) }, drawers && drawers.length > 0 && React.createElement(AppLayoutDrawer, { appLayoutInternals: appLayoutState.appLayoutInternals })),
|
|
24
|
+
React.createElement("div", { className: clsx(styles['global-tools'], !globalToolsOpen && styles['panel-hidden']) },
|
|
25
|
+
React.createElement(ActiveDrawersContext.Provider, { value: activeGlobalDrawersIds !== null && activeGlobalDrawersIds !== void 0 ? activeGlobalDrawersIds : [] },
|
|
26
|
+
React.createElement(AppLayoutGlobalDrawers, { appLayoutInternals: appLayoutState.appLayoutInternals })))));
|
|
27
|
+
};
|
|
28
|
+
export const createWidgetizedAppLayoutAfterMainSlot = createWidgetizedComponent(AfterMainSlotImplementation);
|
|
29
|
+
//# sourceMappingURL=after-main-slot.js.map
|
package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"after-main-slot.js","sour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AAc,CAAC,EACzC,kBAAkB,IAAI,MAAM,CAAC,MAAM,CACpC;YAED,oBAAC,uBAAuB,IACtB,kBAAkB,EAAE,cAAc,CAAC,kBAAkB,EACrD,mBAAmB,EAAE,cAAc,CAAC,mBAAmB,IAEtD,cAAc,CAAC,UAAU,CACF,CACtB,CACP;QACD,6BACE,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,KAAK,EACZ,CAAC,SAAS,IAAI,MAAM,CAAC,cAAc,CAAC,EACpC,YAAY,CAAC,wBAAwB,CAAC,EACtC,cAAc,IAAI,CAAC,SAAS,IAAI,MAAM,CAAC,oBAAoB,CAAC,EAC5D,SAAS,IAAI,MAAM,CAAC,YAAY,CAAC,EACjC,kBAAkB,IAAI,MAAM,CAAC,MAAM,CACpC,IAEA,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,oBAAC,eAAe,IAAC,kBAAkB,EAAE,cAAc,CAAC,kBAAkB,GAAI,CACxG;QACN,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC,eAAe,IAAI,MAAM,CAAC,cAAc,CAAC,CAAC;YACtF,oBAAC,oBAAoB,CAAC,QAAQ,IAAC,KAAK,EAAE,sBAAsB,aAAtB,sBAAsB,cAAtB,sBAAsB,GAAI,EAAE;gBAChE,oBAAC,sBAAsB,IAAC,kBAAkB,EAAE,cAAc,CAAC,kBAAkB,GAAI,CACnD,CAC5B,CACL,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sCAAsC,GAAG,yBAAyB,CAAC,2BAA2B,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { ActiveDrawersContext } from '../../utils/visibility-context';\nimport {\n AppLayoutDrawerImplementation as AppLayoutDrawer,\n AppLayoutGlobalDrawersImplementation as AppLayoutGlobalDrawers,\n} from '../drawer';\nimport { SkeletonPartProps } from '../skeleton/interfaces';\nimport { AppLayoutSplitPanelDrawerSideImplementation as AppLayoutSplitPanelSide } from '../split-panel';\nimport { isWidgetReady } from '../state/invariants';\n\nimport sharedStyles from '../../resize/styles.css.js';\nimport styles from '../skeleton/styles.css.js';\n\nexport const AfterMainSlotImplementation = ({ appLayoutState, appLayoutProps }: SkeletonPartProps) => {\n if (!isWidgetReady(appLayoutState)) {\n return null;\n }\n const {\n navigationOpen,\n activeGlobalDrawersIds,\n expandedDrawerId,\n activeDrawer,\n splitPanelOpen,\n drawers,\n splitPanelPosition,\n } = appLayoutState.widgetizedState;\n const drawerExpandedMode = !!expandedDrawerId;\n const toolsOpen = !!activeDrawer;\n const globalToolsOpen = !!activeGlobalDrawersIds?.length;\n return (\n <>\n {splitPanelPosition === 'side' && (\n <div\n className={clsx(\n styles['split-panel-side'],\n !splitPanelOpen && styles['panel-hidden'],\n drawerExpandedMode && styles.hidden\n )}\n >\n <AppLayoutSplitPanelSide\n appLayoutInternals={appLayoutState.appLayoutInternals}\n splitPanelInternals={appLayoutState.splitPanelInternals}\n >\n {appLayoutProps.splitPanel}\n </AppLayoutSplitPanelSide>\n </div>\n )}\n <div\n className={clsx(\n styles.tools,\n !toolsOpen && styles['panel-hidden'],\n sharedStyles['with-motion-horizontal'],\n navigationOpen && !toolsOpen && styles['unfocusable-mobile'],\n toolsOpen && styles['tools-open'],\n drawerExpandedMode && styles.hidden\n )}\n >\n {drawers && drawers.length > 0 && <AppLayoutDrawer appLayoutInternals={appLayoutState.appLayoutInternals} />}\n </div>\n <div className={clsx(styles['global-tools'], !globalToolsOpen && styles['panel-hidden'])}>\n <ActiveDrawersContext.Provider value={activeGlobalDrawersIds ?? []}>\n <AppLayoutGlobalDrawers appLayoutInternals={appLayoutState.appLayoutInternals} />\n </ActiveDrawersContext.Provider>\n </div>\n </>\n );\n};\n\nexport const createWidgetizedAppLayoutAfterMainSlot = createWidgetizedComponent(AfterMainSlotImplementation);\n"]}
|
package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SkeletonPartProps } from '../skeleton/interfaces';
|
|
3
|
+
export declare const BeforeMainSlotImplementation: ({ toolbarProps, appLayoutState, appLayoutProps }: SkeletonPartProps) => JSX.Element;
|
|
4
|
+
export declare const createWidgetizedAppLayoutBeforeMainSlot: (Loader?: (({ toolbarProps, appLayoutState, appLayoutProps }: SkeletonPartProps) => JSX.Element) | undefined) => ({ toolbarProps, appLayoutState, appLayoutProps }: SkeletonPartProps) => JSX.Element;
|
|
5
|
+
//# sourceMappingURL=before-main-slot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"before-main-slot.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAQ3D,eAAO,MAAM,4BAA4B,qDAAsD,iBAAiB,gBAqC/G,CAAC;AAEF,eAAO,MAAM,uCAAuC,gEAvC2C,iBAAiB,qFAAjB,iBAAiB,gBA0C/G,CAAC"}
|
package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
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 clsx from 'clsx';
|
|
5
|
+
import { createWidgetizedComponent } from '../../../internal/widgets';
|
|
6
|
+
import { AppLayoutNavigationImplementation as AppLayoutNavigation } from '../navigation';
|
|
7
|
+
import { BeforeMainSlotSkeleton } from '../skeleton/skeleton-parts';
|
|
8
|
+
import { isWidgetReady } from '../state/invariants';
|
|
9
|
+
import { AppLayoutToolbarImplementation as AppLayoutToolbar } from '../toolbar';
|
|
10
|
+
import sharedStyles from '../../resize/styles.css.js';
|
|
11
|
+
import styles from '../skeleton/styles.css.js';
|
|
12
|
+
export const BeforeMainSlotImplementation = ({ toolbarProps, appLayoutState, appLayoutProps }) => {
|
|
13
|
+
if (!isWidgetReady(appLayoutState)) {
|
|
14
|
+
return (React.createElement(BeforeMainSlotSkeleton, { toolbarProps: toolbarProps, appLayoutProps: appLayoutProps, appLayoutState: appLayoutState }));
|
|
15
|
+
}
|
|
16
|
+
const { activeDrawer, navigationOpen, navigation, expandedDrawerId, navigationAnimationDisabled } = appLayoutState.widgetizedState;
|
|
17
|
+
const drawerExpandedMode = !!expandedDrawerId;
|
|
18
|
+
const toolsOpen = !!activeDrawer;
|
|
19
|
+
// Must use `toolbarProps` because all layouts have to apply this mode, not just the one with toolbar
|
|
20
|
+
const drawerExpandedModeInChildLayout = !!(toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.expandedDrawerId);
|
|
21
|
+
const { __embeddedViewMode: embeddedViewMode } = appLayoutProps;
|
|
22
|
+
return (React.createElement(React.Fragment, null,
|
|
23
|
+
!!toolbarProps && !embeddedViewMode && (React.createElement(AppLayoutToolbar, { appLayoutInternals: appLayoutState.appLayoutInternals, toolbarProps: toolbarProps })),
|
|
24
|
+
navigation && (React.createElement("div", { className: clsx(styles.navigation, !navigationOpen && styles['panel-hidden'], toolsOpen && styles['unfocusable-mobile'], !navigationAnimationDisabled && sharedStyles['with-motion-horizontal'], (drawerExpandedMode || drawerExpandedModeInChildLayout) && styles.hidden) },
|
|
25
|
+
React.createElement(AppLayoutNavigation, { appLayoutInternals: appLayoutState.appLayoutInternals })))));
|
|
26
|
+
};
|
|
27
|
+
export const createWidgetizedAppLayoutBeforeMainSlot = createWidgetizedComponent(BeforeMainSlotImplementation, BeforeMainSlotSkeleton);
|
|
28
|
+
//# sourceMappingURL=before-main-slot.js.map
|
package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"before-main-slot.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,iCAAiC,IAAI,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEzF,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,8BAA8B,IAAI,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEhF,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,EAAE,YAAY,EAAE,cAAc,EAAE,cAAc,EAAqB,EAAE,EAAE;IAClH,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,EAAE;QAClC,OAAO,CACL,oBAAC,sBAAsB,IACrB,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,cAAc,GAC9B,CACH,CAAC;KACH;IACD,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,GAC/F,cAAc,CAAC,eAAe,CAAC;IACjC,MAAM,kBAAkB,GAAG,CAAC,CAAC,gBAAgB,CAAC;IAC9C,MAAM,SAAS,GAAG,CAAC,CAAC,YAAY,CAAC;IACjC,qGAAqG;IACrG,MAAM,+BAA+B,GAAG,CAAC,CAAC,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,gBAAgB,CAAA,CAAC;IACzE,MAAM,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,GAAG,cAAqB,CAAC;IACvE,OAAO,CACL;QACG,CAAC,CAAC,YAAY,IAAI,CAAC,gBAAgB,IAAI,CACtC,oBAAC,gBAAgB,IAAC,kBAAkB,EAAE,cAAc,CAAC,kBAAkB,EAAE,YAAY,EAAE,YAAY,GAAI,CACxG;QACA,UAAU,IAAI,CACb,6BACE,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,UAAU,EACjB,CAAC,cAAc,IAAI,MAAM,CAAC,cAAc,CAAC,EACzC,SAAS,IAAI,MAAM,CAAC,oBAAoB,CAAC,EACzC,CAAC,2BAA2B,IAAI,YAAY,CAAC,wBAAwB,CAAC,EACtE,CAAC,kBAAkB,IAAI,+BAA+B,CAAC,IAAI,MAAM,CAAC,MAAM,CACzE;YAED,oBAAC,mBAAmB,IAAC,kBAAkB,EAAE,cAAc,CAAC,kBAAkB,GAAI,CAC1E,CACP,CACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,uCAAuC,GAAG,yBAAyB,CAC9E,4BAA4B,EAC5B,sBAAsB,CACvB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { AppLayoutNavigationImplementation as AppLayoutNavigation } from '../navigation';\nimport { SkeletonPartProps } from '../skeleton/interfaces';\nimport { BeforeMainSlotSkeleton } from '../skeleton/skeleton-parts';\nimport { isWidgetReady } from '../state/invariants';\nimport { AppLayoutToolbarImplementation as AppLayoutToolbar } from '../toolbar';\n\nimport sharedStyles from '../../resize/styles.css.js';\nimport styles from '../skeleton/styles.css.js';\n\nexport const BeforeMainSlotImplementation = ({ toolbarProps, appLayoutState, appLayoutProps }: SkeletonPartProps) => {\n if (!isWidgetReady(appLayoutState)) {\n return (\n <BeforeMainSlotSkeleton\n toolbarProps={toolbarProps}\n appLayoutProps={appLayoutProps}\n appLayoutState={appLayoutState}\n />\n );\n }\n const { activeDrawer, navigationOpen, navigation, expandedDrawerId, navigationAnimationDisabled } =\n appLayoutState.widgetizedState;\n const drawerExpandedMode = !!expandedDrawerId;\n const toolsOpen = !!activeDrawer;\n // Must use `toolbarProps` because all layouts have to apply this mode, not just the one with toolbar\n const drawerExpandedModeInChildLayout = !!toolbarProps?.expandedDrawerId;\n const { __embeddedViewMode: embeddedViewMode } = appLayoutProps as any;\n return (\n <>\n {!!toolbarProps && !embeddedViewMode && (\n <AppLayoutToolbar appLayoutInternals={appLayoutState.appLayoutInternals} toolbarProps={toolbarProps} />\n )}\n {navigation && (\n <div\n className={clsx(\n styles.navigation,\n !navigationOpen && styles['panel-hidden'],\n toolsOpen && styles['unfocusable-mobile'],\n !navigationAnimationDisabled && sharedStyles['with-motion-horizontal'],\n (drawerExpandedMode || drawerExpandedModeInChildLayout) && styles.hidden\n )}\n >\n <AppLayoutNavigation appLayoutInternals={appLayoutState.appLayoutInternals} />\n </div>\n )}\n </>\n );\n};\n\nexport const createWidgetizedAppLayoutBeforeMainSlot = createWidgetizedComponent(\n BeforeMainSlotImplementation,\n BeforeMainSlotSkeleton\n);\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SkeletonPartProps } from '../skeleton/interfaces';
|
|
3
|
+
export declare const BottomContentSlotImplementation: ({ appLayoutState, appLayoutProps }: SkeletonPartProps) => JSX.Element | null;
|
|
4
|
+
export declare const createWidgetizedAppLayoutBottomContentSlot: (Loader?: (({ appLayoutState, appLayoutProps }: SkeletonPartProps) => JSX.Element | null) | undefined) => ({ appLayoutState, appLayoutProps }: SkeletonPartProps) => JSX.Element | null;
|
|
5
|
+
//# sourceMappingURL=bottom-content-slot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bottom-content-slot.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAM3D,eAAO,MAAM,+BAA+B,uCAAwC,iBAAiB,uBAmBpG,CAAC;AAEF,eAAO,MAAM,0CAA0C,kDArB6B,iBAAiB,8EAAjB,iBAAiB,uBAqBe,CAAC"}
|
package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
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 { createWidgetizedComponent } from '../../../internal/widgets';
|
|
5
|
+
import { AppLayoutSplitPanelDrawerBottomImplementation as AppLayoutSplitPanelBottom } from '../split-panel';
|
|
6
|
+
import { isWidgetReady } from '../state/invariants';
|
|
7
|
+
import styles from '../skeleton/styles.css.js';
|
|
8
|
+
export const BottomContentSlotImplementation = ({ appLayoutState, appLayoutProps }) => {
|
|
9
|
+
if (!isWidgetReady(appLayoutState)) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
const { splitPanelPosition, placement } = appLayoutState.widgetizedState;
|
|
13
|
+
return (React.createElement(React.Fragment, null, splitPanelPosition === 'bottom' && (React.createElement("div", { className: styles['split-panel-bottom'], style: { insetBlockEnd: placement.insetBlockEnd } },
|
|
14
|
+
React.createElement(AppLayoutSplitPanelBottom, { appLayoutInternals: appLayoutState.appLayoutInternals, splitPanelInternals: appLayoutState.splitPanelInternals }, appLayoutProps.splitPanel)))));
|
|
15
|
+
};
|
|
16
|
+
export const createWidgetizedAppLayoutBottomContentSlot = createWidgetizedComponent(BottomContentSlotImplementation);
|
|
17
|
+
//# sourceMappingURL=bottom-content-slot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bottom-content-slot.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,EAAE,6CAA6C,IAAI,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC5G,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,EAAE,cAAc,EAAE,cAAc,EAAqB,EAAE,EAAE;IACvG,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,EAAE;QAClC,OAAO,IAAI,CAAC;KACb;IACD,MAAM,EAAE,kBAAkB,EAAE,SAAS,EAAE,GAAG,cAAc,CAAC,eAAe,CAAC;IACzE,OAAO,CACL,0CACG,kBAAkB,KAAK,QAAQ,IAAI,CAClC,6BAAK,SAAS,EAAE,MAAM,CAAC,oBAAoB,CAAC,EAAE,KAAK,EAAE,EAAE,aAAa,EAAE,SAAS,CAAC,aAAa,EAAE;QAC7F,oBAAC,yBAAyB,IACxB,kBAAkB,EAAE,cAAc,CAAC,kBAAkB,EACrD,mBAAmB,EAAE,cAAc,CAAC,mBAAmB,IAEtD,cAAc,CAAC,UAAU,CACA,CACxB,CACP,CACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,0CAA0C,GAAG,yBAAyB,CAAC,+BAA+B,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { SkeletonPartProps } from '../skeleton/interfaces';\nimport { AppLayoutSplitPanelDrawerBottomImplementation as AppLayoutSplitPanelBottom } from '../split-panel';\nimport { isWidgetReady } from '../state/invariants';\n\nimport styles from '../skeleton/styles.css.js';\n\nexport const BottomContentSlotImplementation = ({ appLayoutState, appLayoutProps }: SkeletonPartProps) => {\n if (!isWidgetReady(appLayoutState)) {\n return null;\n }\n const { splitPanelPosition, placement } = appLayoutState.widgetizedState;\n return (\n <>\n {splitPanelPosition === 'bottom' && (\n <div className={styles['split-panel-bottom']} style={{ insetBlockEnd: placement.insetBlockEnd }}>\n <AppLayoutSplitPanelBottom\n appLayoutInternals={appLayoutState.appLayoutInternals}\n splitPanelInternals={appLayoutState.splitPanelInternals}\n >\n {appLayoutProps.splitPanel}\n </AppLayoutSplitPanelBottom>\n </div>\n )}\n </>\n );\n};\n\nexport const createWidgetizedAppLayoutBottomContentSlot = createWidgetizedComponent(BottomContentSlotImplementation);\n"]}
|
package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/top-content-slot.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SkeletonPartProps } from '../skeleton/interfaces';
|
|
3
|
+
export declare const TopContentSlotImplementation: ({ appLayoutProps, appLayoutState }: SkeletonPartProps) => JSX.Element | null;
|
|
4
|
+
export declare const createWidgetizedAppLayoutTopContentSlot: (Loader?: (({ appLayoutProps, appLayoutState }: SkeletonPartProps) => JSX.Element | null) | undefined) => ({ appLayoutProps, appLayoutState }: SkeletonPartProps) => JSX.Element | null;
|
|
5
|
+
//# sourceMappingURL=top-content-slot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"top-content-slot.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/top-content-slot.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAK3D,eAAO,MAAM,4BAA4B,uCAAwC,iBAAiB,uBAqBjG,CAAC;AAEF,eAAO,MAAM,uCAAuC,kDAvB6B,iBAAiB,8EAAjB,iBAAiB,uBAuBY,CAAC"}
|
package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/top-content-slot.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
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 clsx from 'clsx';
|
|
5
|
+
import { highContrastHeaderClassName } from '../../../internal/utils/content-header-utils';
|
|
6
|
+
import { createWidgetizedComponent } from '../../../internal/widgets';
|
|
7
|
+
import { AppLayoutNotificationsImplementation as AppLayoutNotifications } from '../notifications';
|
|
8
|
+
import { isWidgetReady } from '../state/invariants';
|
|
9
|
+
import styles from '../skeleton/styles.css.js';
|
|
10
|
+
export const TopContentSlotImplementation = ({ appLayoutProps, appLayoutState }) => {
|
|
11
|
+
if (!isWidgetReady(appLayoutState)) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
return (React.createElement(React.Fragment, null,
|
|
15
|
+
appLayoutProps.notifications && (React.createElement("div", { className: clsx(styles['notifications-background'], appLayoutProps.headerVariant === 'high-contrast' && highContrastHeaderClassName) })),
|
|
16
|
+
appLayoutProps.notifications && (React.createElement(AppLayoutNotifications, { appLayoutInternals: appLayoutState.appLayoutInternals }, appLayoutProps.notifications))));
|
|
17
|
+
};
|
|
18
|
+
export const createWidgetizedAppLayoutTopContentSlot = createWidgetizedComponent(TopContentSlotImplementation);
|
|
19
|
+
//# sourceMappingURL=top-content-slot.js.map
|
package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/top-content-slot.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"top-content-slot.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/top-content-slot.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,oCAAoC,IAAI,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAElG,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,EAAE,cAAc,EAAE,cAAc,EAAqB,EAAE,EAAE;IACpG,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,EAAE;QAClC,OAAO,IAAI,CAAC;KACb;IACD,OAAO,CACL;QACG,cAAc,CAAC,aAAa,IAAI,CAC/B,6BACE,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,0BAA0B,CAAC,EAClC,cAAc,CAAC,aAAa,KAAK,eAAe,IAAI,2BAA2B,CAChF,GACI,CACR;QACA,cAAc,CAAC,aAAa,IAAI,CAC/B,oBAAC,sBAAsB,IAAC,kBAAkB,EAAE,cAAc,CAAC,kBAAkB,IAC1E,cAAc,CAAC,aAAa,CACN,CAC1B,CACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,uCAAuC,GAAG,yBAAyB,CAAC,4BAA4B,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { highContrastHeaderClassName } from '../../../internal/utils/content-header-utils';\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { AppLayoutNotificationsImplementation as AppLayoutNotifications } from '../notifications';\nimport { SkeletonPartProps } from '../skeleton/interfaces';\nimport { isWidgetReady } from '../state/invariants';\n\nimport styles from '../skeleton/styles.css.js';\n\nexport const TopContentSlotImplementation = ({ appLayoutProps, appLayoutState }: SkeletonPartProps) => {\n if (!isWidgetReady(appLayoutState)) {\n return null;\n }\n return (\n <>\n {appLayoutProps.notifications && (\n <div\n className={clsx(\n styles['notifications-background'],\n appLayoutProps.headerVariant === 'high-contrast' && highContrastHeaderClassName\n )}\n ></div>\n )}\n {appLayoutProps.notifications && (\n <AppLayoutNotifications appLayoutInternals={appLayoutState.appLayoutInternals}>\n {appLayoutProps.notifications}\n </AppLayoutNotifications>\n )}\n </>\n );\n};\n\nexport const createWidgetizedAppLayoutTopContentSlot = createWidgetizedComponent(TopContentSlotImplementation);\n"]}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import { BreadcrumbGroupImplementation } from './implementation';
|
|
2
|
+
export declare const InternalBreadcrumbGroup: typeof BreadcrumbGroupImplementation;
|
|
2
3
|
//# sourceMappingURL=internal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/breadcrumb-group/internal.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/breadcrumb-group/internal.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,6BAA6B,EAAmC,MAAM,kBAAkB,CAAC;AAElG,eAAO,MAAM,uBAAuB,sCAEnC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import { createLoadableComponent } from '../internal/widgets/loader-mock';
|
|
4
|
+
import { BreadcrumbGroupImplementation, createWidgetizedBreadcrumbGroup } from './implementation';
|
|
5
|
+
export const InternalBreadcrumbGroup = createWidgetizedBreadcrumbGroup(createLoadableComponent(BreadcrumbGroupImplementation));
|
|
5
6
|
//# sourceMappingURL=internal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/breadcrumb-group/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/breadcrumb-group/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,6BAA6B,EAAE,+BAA+B,EAAE,MAAM,kBAAkB,CAAC;AAElG,MAAM,CAAC,MAAM,uBAAuB,GAAG,+BAA+B,CACpE,uBAAuB,CAAC,6BAA6B,CAAC,CACvD,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { createLoadableComponent } from '../internal/widgets/loader-mock';\nimport { BreadcrumbGroupImplementation, createWidgetizedBreadcrumbGroup } from './implementation';\n\nexport const InternalBreadcrumbGroup = createWidgetizedBreadcrumbGroup(\n createLoadableComponent(BreadcrumbGroupImplementation)\n);\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export var PACKAGE_SOURCE = "components";
|
|
2
|
-
export var PACKAGE_VERSION = "3.0.0 (
|
|
3
|
-
export var GIT_SHA = "
|
|
2
|
+
export var PACKAGE_VERSION = "3.0.0 (97fff0df)";
|
|
3
|
+
export var GIT_SHA = "97fff0df";
|
|
4
4
|
export var THEME = "open-source-visual-refresh";
|
|
5
5
|
export var SYSTEM = "console";
|
|
6
6
|
export var ALWAYS_VISUAL_REFRESH = true;
|
|
@@ -14,6 +14,15 @@
|
|
|
14
14
|
export type SomeRequired<Type, Keys extends keyof Type> = Type & {
|
|
15
15
|
[Key in Keys]-?: Type[Key];
|
|
16
16
|
};
|
|
17
|
+
/**
|
|
18
|
+
* Makes specified properties optional.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```
|
|
22
|
+
* type PartialAlertProps = SomeOptional<AlertProps, 'type' | 'children'>
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export type SomeOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
17
26
|
/**
|
|
18
27
|
* Utility type that makes a union of given type and undefined.
|
|
19
28
|
* @example
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/internal/types.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,YAAY,CAAC,IAAI,EAAE,IAAI,SAAS,MAAM,IAAI,IAAI,IAAI,GAAG;KAC9D,GAAG,IAAI,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC;CAC3B,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,QAAQ,CAAC,IAAI,IAAI,IAAI,GAAG,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/internal/types.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,YAAY,CAAC,IAAI,EAAE,IAAI,SAAS,MAAM,IAAI,IAAI,IAAI,GAAG;KAC9D,GAAG,IAAI,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC;CAC3B,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAElF;;;;;;;GAOG;AACH,MAAM,MAAM,QAAQ,CAAC,IAAI,IAAI,IAAI,GAAG,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/internal/types.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Makes specified properties required.\n *\n * @example\n * ```\n * import { AlertProps } from '~components/alert/interfaces'\n *\n * type InternalAlertProps = SomeRequired<AlertProps, 'type'>\n *\n * function Alert(props: AlertProps) { ... }\n * function InternalAlert(props: InternalAlertProps) { ... }\n * ```\n */\nexport type SomeRequired<Type, Keys extends keyof Type> = Type & {\n [Key in Keys]-?: Type[Key];\n};\n\n/**\n * Utility type that makes a union of given type and undefined.\n * @example\n * ```\n * type OptionalString = Optional<string>\n * type OptionalStringOrNumber = Optional<string | number>\n * ```\n */\nexport type Optional<Type> = Type | undefined;\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/internal/types.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Makes specified properties required.\n *\n * @example\n * ```\n * import { AlertProps } from '~components/alert/interfaces'\n *\n * type InternalAlertProps = SomeRequired<AlertProps, 'type'>\n *\n * function Alert(props: AlertProps) { ... }\n * function InternalAlert(props: InternalAlertProps) { ... }\n * ```\n */\nexport type SomeRequired<Type, Keys extends keyof Type> = Type & {\n [Key in Keys]-?: Type[Key];\n};\n\n/**\n * Makes specified properties optional.\n *\n * @example\n * ```\n * type PartialAlertProps = SomeOptional<AlertProps, 'type' | 'children'>\n * ```\n */\nexport type SomeOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;\n\n/**\n * Utility type that makes a union of given type and undefined.\n * @example\n * ```\n * type OptionalString = Optional<string>\n * type OptionalStringOrNumber = Optional<string | number>\n * ```\n */\nexport type Optional<Type> = Type | undefined;\n"]}
|
|
@@ -4,6 +4,11 @@ export { AppLayoutNavigationImplementation as AppLayoutNavigation } from '../app
|
|
|
4
4
|
export { AppLayoutNotificationsImplementation as AppLayoutNotifications } from '../app-layout/visual-refresh-toolbar/notifications';
|
|
5
5
|
export { AppLayoutSplitPanelDrawerBottomImplementation as AppLayoutSplitPanelBottom, AppLayoutSplitPanelDrawerSideImplementation as AppLayoutSplitPanelSide, } from '../app-layout/visual-refresh-toolbar/split-panel';
|
|
6
6
|
export { AppLayoutToolbarImplementation as AppLayoutToolbar } from '../app-layout/visual-refresh-toolbar/toolbar';
|
|
7
|
+
export { BeforeMainSlotImplementation as AppLayoutBeforeMainSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/before-main-slot';
|
|
8
|
+
export { AfterMainSlotImplementation as AppLayoutAfterMainSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/after-main-slot';
|
|
9
|
+
export { TopContentSlotImplementation as AppLayoutTopContentSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/top-content-slot';
|
|
10
|
+
export { BottomContentSlotImplementation as AppLayoutBottomContentSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot';
|
|
11
|
+
export { AppLayoutStateProvider as AppLayoutWidgetizedState } from '../app-layout/visual-refresh-toolbar/state';
|
|
7
12
|
export { SplitPanelImplementation as SplitPanel } from '../split-panel/implementation';
|
|
8
13
|
export { BreadcrumbGroupImplementation as BreadcrumbGroup } from '../breadcrumb-group/implementation';
|
|
9
14
|
export { DrawerImplementation as Drawer } from '../drawer/implementation';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widget-exports.d.ts","sourceRoot":"","sources":["../../../src/internal/widget-exports.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"widget-exports.d.ts","sourceRoot":"","sources":["../../../src/internal/widget-exports.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGhD,OAAO,EACL,6BAA6B,IAAI,eAAe,EAChD,oCAAoC,IAAI,sBAAsB,GAC/D,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,iCAAiC,IAAI,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAC3H,OAAO,EAAE,oCAAoC,IAAI,sBAAsB,EAAE,MAAM,oDAAoD,CAAC;AACpI,OAAO,EACL,6CAA6C,IAAI,yBAAyB,EAC1E,2CAA2C,IAAI,uBAAuB,GACvE,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,8BAA8B,IAAI,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAGlH,OAAO,EAAE,4BAA4B,IAAI,uBAAuB,EAAE,MAAM,oEAAoE,CAAC;AAC7I,OAAO,EAAE,2BAA2B,IAAI,sBAAsB,EAAE,MAAM,mEAAmE,CAAC;AAC1I,OAAO,EAAE,4BAA4B,IAAI,uBAAuB,EAAE,MAAM,oEAAoE,CAAC;AAC7I,OAAO,EAAE,+BAA+B,IAAI,0BAA0B,EAAE,MAAM,uEAAuE,CAAC;AACtJ,OAAO,EAAE,sBAAsB,IAAI,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AAEhH,OAAO,EAAE,wBAAwB,IAAI,UAAU,EAAE,MAAM,+BAA+B,CAAC;AACvF,OAAO,EAAE,6BAA6B,IAAI,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACtG,OAAO,EAAE,oBAAoB,IAAI,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,4BAA4B,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnG,OAAO,EAAE,uBAAuB,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
export { PACKAGE_VERSION } from './environment';
|
|
4
|
+
// Legacy widgetized parts
|
|
4
5
|
export { AppLayoutDrawerImplementation as AppLayoutDrawer, AppLayoutGlobalDrawersImplementation as AppLayoutGlobalDrawers, } from '../app-layout/visual-refresh-toolbar/drawer';
|
|
5
6
|
export { AppLayoutNavigationImplementation as AppLayoutNavigation } from '../app-layout/visual-refresh-toolbar/navigation';
|
|
6
7
|
export { AppLayoutNotificationsImplementation as AppLayoutNotifications } from '../app-layout/visual-refresh-toolbar/notifications';
|
|
7
8
|
export { AppLayoutSplitPanelDrawerBottomImplementation as AppLayoutSplitPanelBottom, AppLayoutSplitPanelDrawerSideImplementation as AppLayoutSplitPanelSide, } from '../app-layout/visual-refresh-toolbar/split-panel';
|
|
8
9
|
export { AppLayoutToolbarImplementation as AppLayoutToolbar } from '../app-layout/visual-refresh-toolbar/toolbar';
|
|
10
|
+
// Refactored widgetized parts
|
|
11
|
+
export { BeforeMainSlotImplementation as AppLayoutBeforeMainSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/before-main-slot';
|
|
12
|
+
export { AfterMainSlotImplementation as AppLayoutAfterMainSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/after-main-slot';
|
|
13
|
+
export { TopContentSlotImplementation as AppLayoutTopContentSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/top-content-slot';
|
|
14
|
+
export { BottomContentSlotImplementation as AppLayoutBottomContentSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot';
|
|
15
|
+
export { AppLayoutStateProvider as AppLayoutWidgetizedState } from '../app-layout/visual-refresh-toolbar/state';
|
|
9
16
|
export { SplitPanelImplementation as SplitPanel } from '../split-panel/implementation';
|
|
10
17
|
export { BreadcrumbGroupImplementation as BreadcrumbGroup } from '../breadcrumb-group/implementation';
|
|
11
18
|
export { DrawerImplementation as Drawer } from '../drawer/implementation';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widget-exports.js","sourceRoot":"","sources":["../../../src/internal/widget-exports.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAA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AACnG,OAAO,EAAE,uBAAuB,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport { PACKAGE_VERSION } from './environment';\n\n// Legacy widgetized parts\nexport {\n AppLayoutDrawerImplementation as AppLayoutDrawer,\n AppLayoutGlobalDrawersImplementation as AppLayoutGlobalDrawers,\n} from '../app-layout/visual-refresh-toolbar/drawer';\nexport { AppLayoutNavigationImplementation as AppLayoutNavigation } from '../app-layout/visual-refresh-toolbar/navigation';\nexport { AppLayoutNotificationsImplementation as AppLayoutNotifications } from '../app-layout/visual-refresh-toolbar/notifications';\nexport {\n AppLayoutSplitPanelDrawerBottomImplementation as AppLayoutSplitPanelBottom,\n AppLayoutSplitPanelDrawerSideImplementation as AppLayoutSplitPanelSide,\n} from '../app-layout/visual-refresh-toolbar/split-panel';\nexport { AppLayoutToolbarImplementation as AppLayoutToolbar } from '../app-layout/visual-refresh-toolbar/toolbar';\n\n// Refactored widgetized parts\nexport { BeforeMainSlotImplementation as AppLayoutBeforeMainSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/before-main-slot';\nexport { AfterMainSlotImplementation as AppLayoutAfterMainSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/after-main-slot';\nexport { TopContentSlotImplementation as AppLayoutTopContentSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/top-content-slot';\nexport { BottomContentSlotImplementation as AppLayoutBottomContentSlot } from '../app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot';\nexport { AppLayoutStateProvider as AppLayoutWidgetizedState } from '../app-layout/visual-refresh-toolbar/state';\n\nexport { SplitPanelImplementation as SplitPanel } from '../split-panel/implementation';\nexport { BreadcrumbGroupImplementation as BreadcrumbGroup } from '../breadcrumb-group/implementation';\nexport { DrawerImplementation as Drawer } from '../drawer/implementation';\nexport { SideNavigationImplementation as SideNavigation } from '../side-navigation/implementation';\nexport { HelpPanelImplementation as HelpPanel } from '../help-panel/implementation';\n"]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export type FunctionComponent<Props> = (props: Props) => JSX.Element;
|
|
3
|
-
type PropsType<Component extends FunctionComponent<any>> = Component extends FunctionComponent<infer Props> ? Props : never;
|
|
2
|
+
export type FunctionComponent<Props extends object> = (props: Props) => JSX.Element | null;
|
|
3
|
+
export type PropsType<Component extends FunctionComponent<any>> = Component extends FunctionComponent<infer Props> ? Props : never;
|
|
4
4
|
export declare function createWidgetizedComponent<Component extends FunctionComponent<any>>(Implementation: Component, Skeleton?: React.ForwardRefExoticComponent<PropsType<Component> & React.RefAttributes<HTMLElement>>): (Loader?: Component) => Component;
|
|
5
|
-
export {};
|
|
6
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/internal/widgets/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,MAAM,MAAM,iBAAiB,CAAC,KAAK,IAAI,CAAC,KAAK,EAAE,KAAK,KAAK,GAAG,CAAC,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/internal/widgets/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,MAAM,MAAM,iBAAiB,CAAC,KAAK,SAAS,MAAM,IAAI,CAAC,KAAK,EAAE,KAAK,KAAK,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;AAC3F,MAAM,MAAM,SAAS,CAAC,SAAS,SAAS,iBAAiB,CAAC,GAAG,CAAC,IAC5D,SAAS,SAAS,iBAAiB,CAAC,MAAM,KAAK,CAAC,GAAG,KAAK,GAAG,KAAK,CAAC;AAEnE,wBAAgB,yBAAyB,CAAC,SAAS,SAAS,iBAAiB,CAAC,GAAG,CAAC,EAChF,cAAc,EAAE,SAAS,EACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,yBAAyB,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,aAElF,SAAS,KAAG,SAAS,CAUvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/internal/widgets/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,aAAa,EAAE,MAAM,+CAA+C,CAAC;AAE9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAO5D,MAAM,UAAU,yBAAyB,CACvC,cAAyB,EACzB,QAAmG;IAEnG,OAAO,CAAC,MAAkB,EAAa,EAAE;QACvC,OAAO,CAAC,KAAK,CAAC,EAAE;YACd,MAAM,SAAS,GAAG,gBAAgB,EAAE,CAAC;YACrC,IAAI,SAAS,IAAI,aAAa,CAAC,iBAAiB,CAAC,IAAI,MAAM,EAAE;gBAC3D,OAAO,oBAAC,MAAM,kBAAC,QAAQ,EAAE,QAAQ,IAAO,KAAa,EAAI,CAAC;aAC3D;YAED,OAAO,oBAAC,cAAc,oBAAM,KAAa,EAAI,CAAC;QAChD,CAAC,CAAc,CAAC;IAClB,CAAC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { getGlobalFlag } from '@cloudscape-design/component-toolkit/internal';\n\nimport { useVisualRefresh } from '../hooks/use-visual-mode';\n\n// Built-in React.FunctionComponent has always present `children` property which is not desired\nexport type FunctionComponent<Props> = (props: Props) => JSX.Element;\
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/internal/widgets/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,aAAa,EAAE,MAAM,+CAA+C,CAAC;AAE9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAO5D,MAAM,UAAU,yBAAyB,CACvC,cAAyB,EACzB,QAAmG;IAEnG,OAAO,CAAC,MAAkB,EAAa,EAAE;QACvC,OAAO,CAAC,KAAK,CAAC,EAAE;YACd,MAAM,SAAS,GAAG,gBAAgB,EAAE,CAAC;YACrC,IAAI,SAAS,IAAI,aAAa,CAAC,iBAAiB,CAAC,IAAI,MAAM,EAAE;gBAC3D,OAAO,oBAAC,MAAM,kBAAC,QAAQ,EAAE,QAAQ,IAAO,KAAa,EAAI,CAAC;aAC3D;YAED,OAAO,oBAAC,cAAc,oBAAM,KAAa,EAAI,CAAC;QAChD,CAAC,CAAc,CAAC;IAClB,CAAC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { getGlobalFlag } from '@cloudscape-design/component-toolkit/internal';\n\nimport { useVisualRefresh } from '../hooks/use-visual-mode';\n\n// Built-in React.FunctionComponent has always present `children` property which is not desired\nexport type FunctionComponent<Props extends object> = (props: Props) => JSX.Element | null;\nexport type PropsType<Component extends FunctionComponent<any>> =\n Component extends FunctionComponent<infer Props> ? Props : never;\n\nexport function createWidgetizedComponent<Component extends FunctionComponent<any>>(\n Implementation: Component,\n Skeleton?: React.ForwardRefExoticComponent<PropsType<Component> & React.RefAttributes<HTMLElement>>\n) {\n return (Loader?: Component): Component => {\n return (props => {\n const isRefresh = useVisualRefresh();\n if (isRefresh && getGlobalFlag('appLayoutWidget') && Loader) {\n return <Loader Skeleton={Skeleton} {...(props as any)} />;\n }\n\n return <Implementation {...(props as any)} />;\n }) as Component;\n };\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader-mock.d.ts","sourceRoot":"","sources":["../../../../src/internal/widgets/loader-mock.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAa,MAAM,SAAS,CAAC;AAgBvD,wBAAgB,uBAAuB,CAAC,aAAa,SAAS,iBAAiB,CAAC,GAAG,CAAC,EAClF,SAAS,EAAE,aAAa,GACvB,aAAa,GAAG,SAAS,CA8B3B"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import React, { useEffect, useState } from 'react';
|
|
4
|
+
const getCustomFlag = (flagName) => {
|
|
5
|
+
var _a;
|
|
6
|
+
const flagHolder = typeof window !== 'undefined' ? window : globalThis;
|
|
7
|
+
const awsuiCustomFlagsSymbol = Symbol.for('awsui-custom-flags');
|
|
8
|
+
return (_a = flagHolder === null || flagHolder === void 0 ? void 0 : flagHolder[awsuiCustomFlagsSymbol]) === null || _a === void 0 ? void 0 : _a[flagName];
|
|
9
|
+
};
|
|
10
|
+
const isAppLayoutDelayedWidget = () => {
|
|
11
|
+
return !!getCustomFlag('appLayoutDelayedWidget');
|
|
12
|
+
};
|
|
13
|
+
const enableDelayedComponents = isAppLayoutDelayedWidget();
|
|
14
|
+
let loadPromise;
|
|
15
|
+
export function createLoadableComponent(Component) {
|
|
16
|
+
if (!enableDelayedComponents) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
return ((props) => {
|
|
20
|
+
const [mounted, setMounted] = useState(false);
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (!loadPromise) {
|
|
23
|
+
loadPromise = new Promise(resolve => setTimeout(() => resolve(), 1000));
|
|
24
|
+
}
|
|
25
|
+
let mounted = true;
|
|
26
|
+
loadPromise.then(() => {
|
|
27
|
+
if (mounted) {
|
|
28
|
+
setMounted(true);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
return () => {
|
|
32
|
+
mounted = false;
|
|
33
|
+
};
|
|
34
|
+
}, []);
|
|
35
|
+
if (mounted) {
|
|
36
|
+
return React.createElement(Component, Object.assign({}, props));
|
|
37
|
+
}
|
|
38
|
+
// this prop is injected in `createWidgetizedComponent` and is not a part of the component signature
|
|
39
|
+
const { Skeleton } = props;
|
|
40
|
+
return Skeleton ? React.createElement(Skeleton, Object.assign({}, props)) : React.createElement("div", null);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=loader-mock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader-mock.js","sourceRoot":"","sources":["../../../../src/internal/widgets/loader-mock.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAInD,MAAM,aAAa,GAAG,CAAC,QAAgB,EAAE,EAAE;;IACzC,MAAM,UAAU,GAAQ,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC;IAC5E,MAAM,sBAAsB,GAAG,MAAM,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAChE,OAAO,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAG,sBAA6B,CAAC,0CAAG,QAAe,CAAC,CAAC;AACxE,CAAC,CAAC;AAEF,MAAM,wBAAwB,GAAG,GAAG,EAAE;IACpC,OAAO,CAAC,CAAC,aAAa,CAAC,wBAAwB,CAAC,CAAC;AACnD,CAAC,CAAC;AAEF,MAAM,uBAAuB,GAAG,wBAAwB,EAAE,CAAC;AAE3D,IAAI,WAA0B,CAAC;AAE/B,MAAM,UAAU,uBAAuB,CACrC,SAAwB;IAExB,IAAI,CAAC,uBAAuB,EAAE;QAC5B,OAAO;KACR;IACD,OAAO,CAAC,CAAC,KAA+B,EAAE,EAAE;QAC1C,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAE9C,SAAS,CAAC,GAAG,EAAE;YACb,IAAI,CAAC,WAAW,EAAE;gBAChB,WAAW,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;aACzE;YACD,IAAI,OAAO,GAAG,IAAI,CAAC;YACnB,WAAW,CAAC,IAAI,CAAC,GAAG,EAAE;gBACpB,IAAI,OAAO,EAAE;oBACX,UAAU,CAAC,IAAI,CAAC,CAAC;iBAClB;YACH,CAAC,CAAC,CAAC;YACH,OAAO,GAAG,EAAE;gBACV,OAAO,GAAG,KAAK,CAAC;YAClB,CAAC,CAAC;QACJ,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,IAAI,OAAO,EAAE;YACX,OAAO,oBAAC,SAAS,oBAAK,KAAK,EAAI,CAAC;SACjC;QACD,oGAAoG;QACpG,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAY,CAAC;QAElC,OAAO,QAAQ,CAAC,CAAC,CAAC,oBAAC,QAAQ,oBAAK,KAAK,EAAI,CAAC,CAAC,CAAC,gCAAO,CAAC;IACtD,CAAC,CAAkB,CAAC;AACtB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useState } from 'react';\n\nimport { FunctionComponent, PropsType } from './index';\n\nconst getCustomFlag = (flagName: string) => {\n const flagHolder: any = typeof window !== 'undefined' ? window : globalThis;\n const awsuiCustomFlagsSymbol = Symbol.for('awsui-custom-flags');\n return flagHolder?.[awsuiCustomFlagsSymbol as any]?.[flagName as any];\n};\n\nconst isAppLayoutDelayedWidget = () => {\n return !!getCustomFlag('appLayoutDelayedWidget');\n};\n\nconst enableDelayedComponents = isAppLayoutDelayedWidget();\n\nlet loadPromise: Promise<void>;\n\nexport function createLoadableComponent<ComponentType extends FunctionComponent<any>>(\n Component: ComponentType\n): ComponentType | undefined {\n if (!enableDelayedComponents) {\n return;\n }\n return ((props: PropsType<ComponentType>) => {\n const [mounted, setMounted] = useState(false);\n\n useEffect(() => {\n if (!loadPromise) {\n loadPromise = new Promise(resolve => setTimeout(() => resolve(), 1000));\n }\n let mounted = true;\n loadPromise.then(() => {\n if (mounted) {\n setMounted(true);\n }\n });\n return () => {\n mounted = false;\n };\n }, []);\n\n if (mounted) {\n return <Component {...props} />;\n }\n // this prop is injected in `createWidgetizedComponent` and is not a part of the component signature\n const { Skeleton } = props as any;\n\n return Skeleton ? <Skeleton {...props} /> : <div />;\n }) as ComponentType;\n}\n"]}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"drawer": "
|
|
5
|
-
"drawer-closed": "awsui_drawer-
|
|
6
|
-
"refresh": "
|
|
7
|
-
"drawer-content-side": "awsui_drawer-content-
|
|
8
|
-
"drawer-content-bottom": "awsui_drawer-content-
|
|
9
|
-
"position-bottom": "awsui_position-
|
|
10
|
-
"hidden": "
|
|
11
|
-
"position-side": "awsui_position-
|
|
12
|
-
"with-toolbar": "awsui_with-
|
|
13
|
-
"slider-wrapper-bottom": "awsui_slider-wrapper-
|
|
14
|
-
"slider-wrapper-side": "awsui_slider-wrapper-
|
|
15
|
-
"open-button-side": "awsui_open-button-
|
|
16
|
-
"pane-header-wrapper-bottom": "awsui_pane-header-wrapper-
|
|
17
|
-
"drawer-mobile": "awsui_drawer-
|
|
18
|
-
"drawer-disable-content-paddings": "awsui_drawer-disable-content-
|
|
19
|
-
"content-bottom": "awsui_content-
|
|
20
|
-
"pane-bottom-center-align": "awsui_pane-bottom-center-
|
|
21
|
-
"pane-bottom-content-nav-padding": "awsui_pane-bottom-content-nav-
|
|
22
|
-
"pane-bottom-content-tools-padding": "awsui_pane-bottom-content-tools-
|
|
23
|
-
"content-bottom-max-width": "awsui_content-bottom-max-
|
|
24
|
-
"content-side": "awsui_content-
|
|
25
|
-
"pane-header-wrapper-side": "awsui_pane-header-wrapper-
|
|
26
|
-
"pane-content-wrapper-side": "awsui_pane-content-wrapper-
|
|
27
|
-
"header": "
|
|
28
|
-
"header-text": "awsui_header-
|
|
29
|
-
"header-actions": "awsui_header-
|
|
30
|
-
"divider": "
|
|
4
|
+
"drawer": "awsui_drawer_1r9lg_7nc4m_153",
|
|
5
|
+
"drawer-closed": "awsui_drawer-closed_1r9lg_7nc4m_190",
|
|
6
|
+
"refresh": "awsui_refresh_1r9lg_7nc4m_193",
|
|
7
|
+
"drawer-content-side": "awsui_drawer-content-side_1r9lg_7nc4m_197",
|
|
8
|
+
"drawer-content-bottom": "awsui_drawer-content-bottom_1r9lg_7nc4m_213",
|
|
9
|
+
"position-bottom": "awsui_position-bottom_1r9lg_7nc4m_220",
|
|
10
|
+
"hidden": "awsui_hidden_1r9lg_7nc4m_228",
|
|
11
|
+
"position-side": "awsui_position-side_1r9lg_7nc4m_249",
|
|
12
|
+
"with-toolbar": "awsui_with-toolbar_1r9lg_7nc4m_254",
|
|
13
|
+
"slider-wrapper-bottom": "awsui_slider-wrapper-bottom_1r9lg_7nc4m_258",
|
|
14
|
+
"slider-wrapper-side": "awsui_slider-wrapper-side_1r9lg_7nc4m_269",
|
|
15
|
+
"open-button-side": "awsui_open-button-side_1r9lg_7nc4m_283",
|
|
16
|
+
"pane-header-wrapper-bottom": "awsui_pane-header-wrapper-bottom_1r9lg_7nc4m_292",
|
|
17
|
+
"drawer-mobile": "awsui_drawer-mobile_1r9lg_7nc4m_302",
|
|
18
|
+
"drawer-disable-content-paddings": "awsui_drawer-disable-content-paddings_1r9lg_7nc4m_306",
|
|
19
|
+
"content-bottom": "awsui_content-bottom_1r9lg_7nc4m_318",
|
|
20
|
+
"pane-bottom-center-align": "awsui_pane-bottom-center-align_1r9lg_7nc4m_337",
|
|
21
|
+
"pane-bottom-content-nav-padding": "awsui_pane-bottom-content-nav-padding_1r9lg_7nc4m_342",
|
|
22
|
+
"pane-bottom-content-tools-padding": "awsui_pane-bottom-content-tools-padding_1r9lg_7nc4m_346",
|
|
23
|
+
"content-bottom-max-width": "awsui_content-bottom-max-width_1r9lg_7nc4m_350",
|
|
24
|
+
"content-side": "awsui_content-side_1r9lg_7nc4m_355",
|
|
25
|
+
"pane-header-wrapper-side": "awsui_pane-header-wrapper-side_1r9lg_7nc4m_367",
|
|
26
|
+
"pane-content-wrapper-side": "awsui_pane-content-wrapper-side_1r9lg_7nc4m_376",
|
|
27
|
+
"header": "awsui_header_1r9lg_7nc4m_387",
|
|
28
|
+
"header-text": "awsui_header-text_1r9lg_7nc4m_400",
|
|
29
|
+
"header-actions": "awsui_header-actions_1r9lg_7nc4m_414",
|
|
30
|
+
"divider": "awsui_divider_1r9lg_7nc4m_422"
|
|
31
31
|
};
|
|
32
32
|
|