@pega/cosmos-react-build 5.0.0-dev.4.7 → 5.0.0-dev.4.9
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/package.json +4 -4
- package/lib/components/AppShell/AppShell.d.ts +0 -6
- package/lib/components/AppShell/AppShell.d.ts.map +0 -1
- package/lib/components/AppShell/AppShell.js +0 -58
- package/lib/components/AppShell/AppShell.js.map +0 -1
- package/lib/components/AppShell/AppShell.styles.d.ts +0 -17
- package/lib/components/AppShell/AppShell.styles.d.ts.map +0 -1
- package/lib/components/AppShell/AppShell.styles.js +0 -269
- package/lib/components/AppShell/AppShell.styles.js.map +0 -1
- package/lib/components/AppShell/AppShell.types.d.ts +0 -72
- package/lib/components/AppShell/AppShell.types.d.ts.map +0 -1
- package/lib/components/AppShell/AppShell.types.js +0 -2
- package/lib/components/AppShell/AppShell.types.js.map +0 -1
- package/lib/components/AppShell/AppShellContext.d.ts +0 -5
- package/lib/components/AppShell/AppShellContext.d.ts.map +0 -1
- package/lib/components/AppShell/AppShellContext.js +0 -8
- package/lib/components/AppShell/AppShellContext.js.map +0 -1
- package/lib/components/AppShell/Header/AppHeader.d.ts +0 -6
- package/lib/components/AppShell/Header/AppHeader.d.ts.map +0 -1
- package/lib/components/AppShell/Header/AppHeader.js +0 -73
- package/lib/components/AppShell/Header/AppHeader.js.map +0 -1
- package/lib/components/AppShell/Header/AppHeader.styles.d.ts +0 -13
- package/lib/components/AppShell/Header/AppHeader.styles.d.ts.map +0 -1
- package/lib/components/AppShell/Header/AppHeader.styles.js +0 -158
- package/lib/components/AppShell/Header/AppHeader.styles.js.map +0 -1
- package/lib/components/AppShell/Header/AppHeader.types.d.ts +0 -33
- package/lib/components/AppShell/Header/AppHeader.types.d.ts.map +0 -1
- package/lib/components/AppShell/Header/AppHeader.types.js +0 -2
- package/lib/components/AppShell/Header/AppHeader.types.js.map +0 -1
- package/lib/components/AppShell/Header/BranchButton.d.ts +0 -20
- package/lib/components/AppShell/Header/BranchButton.d.ts.map +0 -1
- package/lib/components/AppShell/Header/BranchButton.js +0 -91
- package/lib/components/AppShell/Header/BranchButton.js.map +0 -1
- package/lib/components/AppShell/NavigationList.d.ts +0 -6
- package/lib/components/AppShell/NavigationList.d.ts.map +0 -1
- package/lib/components/AppShell/NavigationList.js +0 -97
- package/lib/components/AppShell/NavigationList.js.map +0 -1
- package/lib/components/AppShell/index.d.ts +0 -5
- package/lib/components/AppShell/index.d.ts.map +0 -1
- package/lib/components/AppShell/index.js +0 -2
- package/lib/components/AppShell/index.js.map +0 -1
- package/lib/components/DynamicContentEditor/DynamicContentEditor.d.ts +0 -10
- package/lib/components/DynamicContentEditor/DynamicContentEditor.d.ts.map +0 -1
- package/lib/components/DynamicContentEditor/DynamicContentEditor.js +0 -239
- package/lib/components/DynamicContentEditor/DynamicContentEditor.js.map +0 -1
- package/lib/components/DynamicContentEditor/DynamicContentEditor.types.d.ts +0 -23
- package/lib/components/DynamicContentEditor/DynamicContentEditor.types.d.ts.map +0 -1
- package/lib/components/DynamicContentEditor/DynamicContentEditor.types.js +0 -2
- package/lib/components/DynamicContentEditor/DynamicContentEditor.types.js.map +0 -1
- package/lib/components/DynamicContentEditor/PegaCustomElement.d.ts +0 -329
- package/lib/components/DynamicContentEditor/PegaCustomElement.d.ts.map +0 -1
- package/lib/components/DynamicContentEditor/PegaCustomElement.js +0 -23
- package/lib/components/DynamicContentEditor/PegaCustomElement.js.map +0 -1
- package/lib/components/DynamicContentEditor/index.d.ts +0 -3
- package/lib/components/DynamicContentEditor/index.d.ts.map +0 -1
- package/lib/components/DynamicContentEditor/index.js +0 -2
- package/lib/components/DynamicContentEditor/index.js.map +0 -1
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.d.ts +0 -8
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.d.ts.map +0 -1
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.js +0 -176
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.js.map +0 -1
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.d.ts +0 -10
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.d.ts.map +0 -1
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.js +0 -530
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.js.map +0 -1
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.types.d.ts +0 -36
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.types.d.ts.map +0 -1
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.types.js +0 -2
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.types.js.map +0 -1
- package/lib/components/ExpressionBuilder/CodeEditor/getCodeSuggestions.d.ts +0 -13
- package/lib/components/ExpressionBuilder/CodeEditor/getCodeSuggestions.d.ts.map +0 -1
- package/lib/components/ExpressionBuilder/CodeEditor/getCodeSuggestions.js +0 -51
- package/lib/components/ExpressionBuilder/CodeEditor/getCodeSuggestions.js.map +0 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilder.d.ts +0 -6
- package/lib/components/ExpressionBuilder/ExpressionBuilder.d.ts.map +0 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilder.js +0 -51
- package/lib/components/ExpressionBuilder/ExpressionBuilder.js.map +0 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.d.ts +0 -14
- package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.d.ts.map +0 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.js +0 -81
- package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.js.map +0 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilder.types.d.ts +0 -74
- package/lib/components/ExpressionBuilder/ExpressionBuilder.types.d.ts.map +0 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilder.types.js +0 -2
- package/lib/components/ExpressionBuilder/ExpressionBuilder.types.js.map +0 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilderContext.d.ts +0 -7
- package/lib/components/ExpressionBuilder/ExpressionBuilderContext.d.ts.map +0 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilderContext.js +0 -6
- package/lib/components/ExpressionBuilder/ExpressionBuilderContext.js.map +0 -1
- package/lib/components/ExpressionBuilder/ExpressionDetails.d.ts +0 -6
- package/lib/components/ExpressionBuilder/ExpressionDetails.d.ts.map +0 -1
- package/lib/components/ExpressionBuilder/ExpressionDetails.js +0 -12
- package/lib/components/ExpressionBuilder/ExpressionDetails.js.map +0 -1
- package/lib/components/ExpressionBuilder/ExpressionItem.d.ts +0 -6
- package/lib/components/ExpressionBuilder/ExpressionItem.d.ts.map +0 -1
- package/lib/components/ExpressionBuilder/ExpressionItem.js +0 -39
- package/lib/components/ExpressionBuilder/ExpressionItem.js.map +0 -1
- package/lib/components/ExpressionBuilder/ExpressionList.d.ts +0 -6
- package/lib/components/ExpressionBuilder/ExpressionList.d.ts.map +0 -1
- package/lib/components/ExpressionBuilder/ExpressionList.js +0 -32
- package/lib/components/ExpressionBuilder/ExpressionList.js.map +0 -1
- package/lib/components/ExpressionBuilder/index.d.ts +0 -8
- package/lib/components/ExpressionBuilder/index.d.ts.map +0 -1
- package/lib/components/ExpressionBuilder/index.js +0 -6
- package/lib/components/ExpressionBuilder/index.js.map +0 -1
- package/lib/components/FlowModeller/AddNode.d.ts +0 -18
- package/lib/components/FlowModeller/AddNode.d.ts.map +0 -1
- package/lib/components/FlowModeller/AddNode.js +0 -86
- package/lib/components/FlowModeller/AddNode.js.map +0 -1
- package/lib/components/FlowModeller/Connector.d.ts +0 -7
- package/lib/components/FlowModeller/Connector.d.ts.map +0 -1
- package/lib/components/FlowModeller/Connector.js +0 -69
- package/lib/components/FlowModeller/Connector.js.map +0 -1
- package/lib/components/FlowModeller/DeletePopover.d.ts +0 -19
- package/lib/components/FlowModeller/DeletePopover.d.ts.map +0 -1
- package/lib/components/FlowModeller/DeletePopover.js +0 -136
- package/lib/components/FlowModeller/DeletePopover.js.map +0 -1
- package/lib/components/FlowModeller/FlowModeller.d.ts +0 -5
- package/lib/components/FlowModeller/FlowModeller.d.ts.map +0 -1
- package/lib/components/FlowModeller/FlowModeller.js +0 -317
- package/lib/components/FlowModeller/FlowModeller.js.map +0 -1
- package/lib/components/FlowModeller/FlowModeller.types.d.ts +0 -27
- package/lib/components/FlowModeller/FlowModeller.types.d.ts.map +0 -1
- package/lib/components/FlowModeller/FlowModeller.types.js +0 -2
- package/lib/components/FlowModeller/FlowModeller.types.js.map +0 -1
- package/lib/components/FlowModeller/FlowModellerContext.d.ts +0 -11
- package/lib/components/FlowModeller/FlowModellerContext.d.ts.map +0 -1
- package/lib/components/FlowModeller/FlowModellerContext.js +0 -8
- package/lib/components/FlowModeller/FlowModellerContext.js.map +0 -1
- package/lib/components/FlowModeller/Node/Node.types.d.ts +0 -75
- package/lib/components/FlowModeller/Node/Node.types.d.ts.map +0 -1
- package/lib/components/FlowModeller/Node/Node.types.js +0 -27
- package/lib/components/FlowModeller/Node/Node.types.js.map +0 -1
- package/lib/components/FlowModeller/Node/NodeTemplate.styles.d.ts +0 -21
- package/lib/components/FlowModeller/Node/NodeTemplate.styles.d.ts.map +0 -1
- package/lib/components/FlowModeller/Node/NodeTemplate.styles.js +0 -151
- package/lib/components/FlowModeller/Node/NodeTemplate.styles.js.map +0 -1
- package/lib/components/FlowModeller/Node/NodeTemplates.d.ts +0 -6
- package/lib/components/FlowModeller/Node/NodeTemplates.d.ts.map +0 -1
- package/lib/components/FlowModeller/Node/NodeTemplates.js +0 -70
- package/lib/components/FlowModeller/Node/NodeTemplates.js.map +0 -1
- package/lib/components/FlowModeller/Node.d.ts +0 -5
- package/lib/components/FlowModeller/Node.d.ts.map +0 -1
- package/lib/components/FlowModeller/Node.js +0 -22
- package/lib/components/FlowModeller/Node.js.map +0 -1
- package/lib/components/FlowModeller/Renderer/Renderer.d.ts +0 -5
- package/lib/components/FlowModeller/Renderer/Renderer.d.ts.map +0 -1
- package/lib/components/FlowModeller/Renderer/Renderer.js +0 -48
- package/lib/components/FlowModeller/Renderer/Renderer.js.map +0 -1
- package/lib/components/FlowModeller/Renderer/Renderer.types.d.ts +0 -18
- package/lib/components/FlowModeller/Renderer/Renderer.types.d.ts.map +0 -1
- package/lib/components/FlowModeller/Renderer/Renderer.types.js +0 -2
- package/lib/components/FlowModeller/Renderer/Renderer.types.js.map +0 -1
- package/lib/components/FlowModeller/Renderer/Utils/Graph.d.ts +0 -59
- package/lib/components/FlowModeller/Renderer/Utils/Graph.d.ts.map +0 -1
- package/lib/components/FlowModeller/Renderer/Utils/Graph.js +0 -258
- package/lib/components/FlowModeller/Renderer/Utils/Graph.js.map +0 -1
- package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.d.ts +0 -36
- package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.d.ts.map +0 -1
- package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.js +0 -120
- package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.js.map +0 -1
- package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.d.ts +0 -27
- package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.d.ts.map +0 -1
- package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.js +0 -172
- package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.js.map +0 -1
- package/lib/components/FlowModeller/Utils/addNodeUtils.d.ts +0 -17
- package/lib/components/FlowModeller/Utils/addNodeUtils.d.ts.map +0 -1
- package/lib/components/FlowModeller/Utils/addNodeUtils.js +0 -141
- package/lib/components/FlowModeller/Utils/addNodeUtils.js.map +0 -1
- package/lib/components/FlowModeller/Utils/deleteNodeUtils.d.ts +0 -30
- package/lib/components/FlowModeller/Utils/deleteNodeUtils.d.ts.map +0 -1
- package/lib/components/FlowModeller/Utils/deleteNodeUtils.js +0 -81
- package/lib/components/FlowModeller/Utils/deleteNodeUtils.js.map +0 -1
- package/lib/components/FlowModeller/helper.d.ts +0 -39
- package/lib/components/FlowModeller/helper.d.ts.map +0 -1
- package/lib/components/FlowModeller/helper.js +0 -198
- package/lib/components/FlowModeller/helper.js.map +0 -1
- package/lib/components/FlowModeller/index.d.ts +0 -20
- package/lib/components/FlowModeller/index.d.ts.map +0 -1
- package/lib/components/FlowModeller/index.js +0 -12
- package/lib/components/FlowModeller/index.js.map +0 -1
- package/lib/components/ItemLibrary/ItemLibrary.d.ts +0 -25
- package/lib/components/ItemLibrary/ItemLibrary.d.ts.map +0 -1
- package/lib/components/ItemLibrary/ItemLibrary.js +0 -62
- package/lib/components/ItemLibrary/ItemLibrary.js.map +0 -1
- package/lib/components/ItemLibrary/index.d.ts +0 -3
- package/lib/components/ItemLibrary/index.d.ts.map +0 -1
- package/lib/components/ItemLibrary/index.js +0 -3
- package/lib/components/ItemLibrary/index.js.map +0 -1
- package/lib/components/LifeCycle/Category.d.ts +0 -15
- package/lib/components/LifeCycle/Category.d.ts.map +0 -1
- package/lib/components/LifeCycle/Category.js +0 -104
- package/lib/components/LifeCycle/Category.js.map +0 -1
- package/lib/components/LifeCycle/LifeCycle.d.ts +0 -6
- package/lib/components/LifeCycle/LifeCycle.d.ts.map +0 -1
- package/lib/components/LifeCycle/LifeCycle.js +0 -77
- package/lib/components/LifeCycle/LifeCycle.js.map +0 -1
- package/lib/components/LifeCycle/LifeCycle.types.d.ts +0 -154
- package/lib/components/LifeCycle/LifeCycle.types.d.ts.map +0 -1
- package/lib/components/LifeCycle/LifeCycle.types.js +0 -79
- package/lib/components/LifeCycle/LifeCycle.types.js.map +0 -1
- package/lib/components/LifeCycle/LifeCycleContext.d.ts +0 -9
- package/lib/components/LifeCycle/LifeCycleContext.d.ts.map +0 -1
- package/lib/components/LifeCycle/LifeCycleContext.js +0 -7
- package/lib/components/LifeCycle/LifeCycleContext.js.map +0 -1
- package/lib/components/LifeCycle/LifeCycleList.d.ts +0 -30
- package/lib/components/LifeCycle/LifeCycleList.d.ts.map +0 -1
- package/lib/components/LifeCycle/LifeCycleList.js +0 -68
- package/lib/components/LifeCycle/LifeCycleList.js.map +0 -1
- package/lib/components/LifeCycle/Stage.d.ts +0 -29
- package/lib/components/LifeCycle/Stage.d.ts.map +0 -1
- package/lib/components/LifeCycle/Stage.js +0 -232
- package/lib/components/LifeCycle/Stage.js.map +0 -1
- package/lib/components/LifeCycle/Step.d.ts +0 -40
- package/lib/components/LifeCycle/Step.d.ts.map +0 -1
- package/lib/components/LifeCycle/Step.js +0 -170
- package/lib/components/LifeCycle/Step.js.map +0 -1
- package/lib/components/LifeCycle/Task.d.ts +0 -34
- package/lib/components/LifeCycle/Task.d.ts.map +0 -1
- package/lib/components/LifeCycle/Task.js +0 -158
- package/lib/components/LifeCycle/Task.js.map +0 -1
- package/lib/components/LifeCycle/index.d.ts +0 -3
- package/lib/components/LifeCycle/index.d.ts.map +0 -1
- package/lib/components/LifeCycle/index.js +0 -2
- package/lib/components/LifeCycle/index.js.map +0 -1
- package/lib/components/MobileBuildSummary/MobileBuildSummary.d.ts +0 -8
- package/lib/components/MobileBuildSummary/MobileBuildSummary.d.ts.map +0 -1
- package/lib/components/MobileBuildSummary/MobileBuildSummary.js +0 -33
- package/lib/components/MobileBuildSummary/MobileBuildSummary.js.map +0 -1
- package/lib/components/MobileBuildSummary/MobileBuildSummary.types.d.ts +0 -31
- package/lib/components/MobileBuildSummary/MobileBuildSummary.types.d.ts.map +0 -1
- package/lib/components/MobileBuildSummary/MobileBuildSummary.types.js +0 -2
- package/lib/components/MobileBuildSummary/MobileBuildSummary.types.js.map +0 -1
- package/lib/components/MobileBuildSummary/index.d.ts +0 -3
- package/lib/components/MobileBuildSummary/index.d.ts.map +0 -1
- package/lib/components/MobileBuildSummary/index.js +0 -2
- package/lib/components/MobileBuildSummary/index.js.map +0 -1
- package/lib/components/ObjectPreview/ObjectPreview.d.ts +0 -16
- package/lib/components/ObjectPreview/ObjectPreview.d.ts.map +0 -1
- package/lib/components/ObjectPreview/ObjectPreview.js +0 -25
- package/lib/components/ObjectPreview/ObjectPreview.js.map +0 -1
- package/lib/components/ObjectPreview/index.d.ts +0 -3
- package/lib/components/ObjectPreview/index.d.ts.map +0 -1
- package/lib/components/ObjectPreview/index.js +0 -3
- package/lib/components/ObjectPreview/index.js.map +0 -1
- package/lib/components/ObjectSelect/ObjectPicker.d.ts +0 -15
- package/lib/components/ObjectSelect/ObjectPicker.d.ts.map +0 -1
- package/lib/components/ObjectSelect/ObjectPicker.js +0 -40
- package/lib/components/ObjectSelect/ObjectPicker.js.map +0 -1
- package/lib/components/ObjectSelect/ObjectSelect.d.ts +0 -32
- package/lib/components/ObjectSelect/ObjectSelect.d.ts.map +0 -1
- package/lib/components/ObjectSelect/ObjectSelect.js +0 -41
- package/lib/components/ObjectSelect/ObjectSelect.js.map +0 -1
- package/lib/components/ObjectSelect/ObjectSummary.d.ts +0 -32
- package/lib/components/ObjectSelect/ObjectSummary.d.ts.map +0 -1
- package/lib/components/ObjectSelect/ObjectSummary.js +0 -81
- package/lib/components/ObjectSelect/ObjectSummary.js.map +0 -1
- package/lib/components/ObjectSelect/index.d.ts +0 -3
- package/lib/components/ObjectSelect/index.d.ts.map +0 -1
- package/lib/components/ObjectSelect/index.js +0 -2
- package/lib/components/ObjectSelect/index.js.map +0 -1
- package/lib/components/ObjectSelect/useCreateModal.d.ts +0 -32
- package/lib/components/ObjectSelect/useCreateModal.d.ts.map +0 -1
- package/lib/components/ObjectSelect/useCreateModal.js +0 -60
- package/lib/components/ObjectSelect/useCreateModal.js.map +0 -1
- package/lib/components/PageBanner/PageBanner.d.ts +0 -22
- package/lib/components/PageBanner/PageBanner.d.ts.map +0 -1
- package/lib/components/PageBanner/PageBanner.js +0 -59
- package/lib/components/PageBanner/PageBanner.js.map +0 -1
- package/lib/components/PageBanner/index.d.ts +0 -3
- package/lib/components/PageBanner/index.d.ts.map +0 -1
- package/lib/components/PageBanner/index.js +0 -2
- package/lib/components/PageBanner/index.js.map +0 -1
- package/lib/components/PageTemplates/GalleryPage.d.ts +0 -23
- package/lib/components/PageTemplates/GalleryPage.d.ts.map +0 -1
- package/lib/components/PageTemplates/GalleryPage.js +0 -47
- package/lib/components/PageTemplates/GalleryPage.js.map +0 -1
- package/lib/components/PageTemplates/PageTemplates.d.ts +0 -27
- package/lib/components/PageTemplates/PageTemplates.d.ts.map +0 -1
- package/lib/components/PageTemplates/PageTemplates.js +0 -72
- package/lib/components/PageTemplates/PageTemplates.js.map +0 -1
- package/lib/components/PageTemplates/ShowcasePage.d.ts +0 -16
- package/lib/components/PageTemplates/ShowcasePage.d.ts.map +0 -1
- package/lib/components/PageTemplates/ShowcasePage.js +0 -29
- package/lib/components/PageTemplates/ShowcasePage.js.map +0 -1
- package/lib/components/PageTemplates/index.d.ts +0 -6
- package/lib/components/PageTemplates/index.d.ts.map +0 -1
- package/lib/components/PageTemplates/index.js +0 -4
- package/lib/components/PageTemplates/index.js.map +0 -1
- package/lib/components/SummaryCard/SummaryCard.d.ts +0 -15
- package/lib/components/SummaryCard/SummaryCard.d.ts.map +0 -1
- package/lib/components/SummaryCard/SummaryCard.js +0 -27
- package/lib/components/SummaryCard/SummaryCard.js.map +0 -1
- package/lib/components/SummaryCard/index.d.ts +0 -3
- package/lib/components/SummaryCard/index.d.ts.map +0 -1
- package/lib/components/SummaryCard/index.js +0 -3
- package/lib/components/SummaryCard/index.js.map +0 -1
- package/lib/components/Workbench/ConfigurationPanel.d.ts +0 -5
- package/lib/components/Workbench/ConfigurationPanel.d.ts.map +0 -1
- package/lib/components/Workbench/ConfigurationPanel.js +0 -10
- package/lib/components/Workbench/ConfigurationPanel.js.map +0 -1
- package/lib/components/Workbench/Toolbar.d.ts +0 -10
- package/lib/components/Workbench/Toolbar.d.ts.map +0 -1
- package/lib/components/Workbench/Toolbar.js +0 -14
- package/lib/components/Workbench/Toolbar.js.map +0 -1
- package/lib/components/Workbench/UtilityPanel.d.ts +0 -7
- package/lib/components/Workbench/UtilityPanel.d.ts.map +0 -1
- package/lib/components/Workbench/UtilityPanel.js +0 -12
- package/lib/components/Workbench/UtilityPanel.js.map +0 -1
- package/lib/components/Workbench/Workbench.d.ts +0 -6
- package/lib/components/Workbench/Workbench.d.ts.map +0 -1
- package/lib/components/Workbench/Workbench.js +0 -23
- package/lib/components/Workbench/Workbench.js.map +0 -1
- package/lib/components/Workbench/Workbench.styles.d.ts +0 -10
- package/lib/components/Workbench/Workbench.styles.d.ts.map +0 -1
- package/lib/components/Workbench/Workbench.styles.js +0 -75
- package/lib/components/Workbench/Workbench.styles.js.map +0 -1
- package/lib/components/Workbench/Workbench.types.d.ts +0 -47
- package/lib/components/Workbench/Workbench.types.d.ts.map +0 -1
- package/lib/components/Workbench/Workbench.types.js +0 -2
- package/lib/components/Workbench/Workbench.types.js.map +0 -1
- package/lib/components/Workbench/index.d.ts +0 -2
- package/lib/components/Workbench/index.d.ts.map +0 -1
- package/lib/components/Workbench/index.js +0 -2
- package/lib/components/Workbench/index.js.map +0 -1
- package/lib/index.d.ts +0 -23
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -24
- package/lib/index.js.map +0 -1
- package/lib/utils/index.d.ts +0 -2
- package/lib/utils/index.d.ts.map +0 -1
- package/lib/utils/index.js +0 -2
- package/lib/utils/index.js.map +0 -1
- package/lib/utils/utils.d.ts +0 -14
- package/lib/utils/utils.d.ts.map +0 -1
- package/lib/utils/utils.js +0 -13
- package/lib/utils/utils.js.map +0 -1
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { FC, Ref, PropsWithoutRef, MouseEvent } from 'react';
|
|
2
|
-
import { BaseProps, ForwardProps, FormControlProps, MenuItemProps } from '@pega/cosmos-react-core';
|
|
3
|
-
import { BaseDialogProps, FormDialogProps } from '@pega/cosmos-react-core/lib/components/Dialog/Dialog.types';
|
|
4
|
-
interface ObjectSummaryValueProps {
|
|
5
|
-
id: MenuItemProps['id'];
|
|
6
|
-
primary: MenuItemProps['primary'];
|
|
7
|
-
href?: string;
|
|
8
|
-
meta?: string;
|
|
9
|
-
}
|
|
10
|
-
interface ObjectConfigProps extends Pick<BaseDialogProps, 'children' | 'ref'> {
|
|
11
|
-
heading: NonNullable<FormDialogProps['heading']>;
|
|
12
|
-
label: string;
|
|
13
|
-
onOpen?: () => void;
|
|
14
|
-
onClose?: () => void;
|
|
15
|
-
onSubmit: (arg: {
|
|
16
|
-
close: () => void;
|
|
17
|
-
}) => void;
|
|
18
|
-
loading?: BaseDialogProps['progress'];
|
|
19
|
-
}
|
|
20
|
-
export interface ObjectSummaryProps extends BaseProps, Omit<FormControlProps, 'value'> {
|
|
21
|
-
value: ObjectSummaryValueProps;
|
|
22
|
-
configuration?: ObjectConfigProps;
|
|
23
|
-
onDelete: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
24
|
-
onPreview?: (e: {
|
|
25
|
-
href: string;
|
|
26
|
-
}) => void;
|
|
27
|
-
onLinkClick?: (id: MenuItemProps['id'], e: MouseEvent) => void;
|
|
28
|
-
ref: Ref<HTMLDivElement>;
|
|
29
|
-
}
|
|
30
|
-
declare const ObjectSummary: FC<PropsWithoutRef<ObjectSummaryProps> & ForwardProps>;
|
|
31
|
-
export default ObjectSummary;
|
|
32
|
-
//# sourceMappingURL=ObjectSummary.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectSummary.d.ts","sourceRoot":"","sources":["../../../src/components/ObjectSelect/ObjectSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAc,GAAG,EAAE,eAAe,EAAE,UAAU,EAAsB,MAAM,OAAO,CAAC;AAG7F,OAAO,EACL,SAAS,EAIT,YAAY,EAGZ,gBAAgB,EAChB,aAAa,EAad,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,eAAe,EACf,eAAe,EAChB,MAAM,4DAA4D,CAAC;AAIpE,UAAU,uBAAuB;IAC/B,EAAE,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;IACxB,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IAClC,IAAI,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';
|
|
3
|
-
import styled, { css } from 'styled-components';
|
|
4
|
-
import { SummaryItem, Button, Icon, StyledFormControl, FormField, useI18n, registerIcon, Text, useElement, Link, defaultThemeProp, StyledLink, useUID, FormDialog, InfoDialog, StyledButton, StyledSummaryItemActions } from '@pega/cosmos-react-core';
|
|
5
|
-
import * as times from '@pega/cosmos-react-core/lib/components/Icon/icons/times.icon';
|
|
6
|
-
import * as gear from '@pega/cosmos-react-core/lib/components/Icon/icons/gear.icon';
|
|
7
|
-
registerIcon(times, gear);
|
|
8
|
-
const StyledObjectSummary = styled(StyledFormControl)(({ theme: { base: { spacing, 'hit-area': { 'mouse-min': hitAreaMouse, 'finger-min': hitAreaFinger }, shadow: { 'focus-inset': focusInset } }, components: { 'form-control': { 'border-width': borderWidth } } }, meta }) => {
|
|
9
|
-
return css `
|
|
10
|
-
padding-block: ${meta ? spacing : '0'};
|
|
11
|
-
padding-inline-start: ${spacing};
|
|
12
|
-
min-height: ${hitAreaMouse};
|
|
13
|
-
|
|
14
|
-
${StyledLink}:focus {
|
|
15
|
-
box-shadow: ${focusInset};
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
${StyledSummaryItemActions} > ${StyledButton} {
|
|
19
|
-
margin-block: calc(-1 * ${borderWidth});
|
|
20
|
-
min-width: calc(${hitAreaMouse} - 2 * ${borderWidth});
|
|
21
|
-
min-height: calc(${hitAreaMouse} - 2 * ${borderWidth});
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
@media (pointer: coarse) {
|
|
25
|
-
min-height: ${hitAreaFinger};
|
|
26
|
-
|
|
27
|
-
${StyledSummaryItemActions} > ${StyledButton} {
|
|
28
|
-
min-width: calc(${hitAreaFinger} - 2 * ${borderWidth});
|
|
29
|
-
min-height: calc(${hitAreaFinger} - 2 * ${borderWidth});
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
`;
|
|
33
|
-
});
|
|
34
|
-
StyledObjectSummary.defaultProps = defaultThemeProp;
|
|
35
|
-
const StyledMetaText = styled(Text) `
|
|
36
|
-
display: -webkit-box;
|
|
37
|
-
-webkit-box-orient: vertical;
|
|
38
|
-
-webkit-line-clamp: 2;
|
|
39
|
-
overflow: hidden;
|
|
40
|
-
`;
|
|
41
|
-
const ObjectSummary = forwardRef(function ObjectSummary({ value, configuration, label, disabled, status, readOnly, onDelete, onPreview, onLinkClick, ...restProps }, ref) {
|
|
42
|
-
const [configTarget, setConfigTarget] = useElement();
|
|
43
|
-
const t = useI18n();
|
|
44
|
-
const describedById = useUID();
|
|
45
|
-
useEffect(() => {
|
|
46
|
-
if (configTarget)
|
|
47
|
-
configuration?.onOpen?.();
|
|
48
|
-
}, [configTarget]);
|
|
49
|
-
const configDialog = useMemo(() => {
|
|
50
|
-
if (!configuration || !configTarget || disabled)
|
|
51
|
-
return null;
|
|
52
|
-
const commonProps = {
|
|
53
|
-
heading: configuration.heading,
|
|
54
|
-
target: configTarget,
|
|
55
|
-
progress: configuration.loading,
|
|
56
|
-
ref: configuration.ref,
|
|
57
|
-
children: configuration.children
|
|
58
|
-
};
|
|
59
|
-
if (readOnly) {
|
|
60
|
-
return (_jsx(InfoDialog, { ...commonProps, onDismiss: () => {
|
|
61
|
-
setConfigTarget(null);
|
|
62
|
-
configuration.onClose?.();
|
|
63
|
-
} }));
|
|
64
|
-
}
|
|
65
|
-
return (_jsx(FormDialog, { ...commonProps, onCancel: () => {
|
|
66
|
-
setConfigTarget(null);
|
|
67
|
-
configuration.onClose?.();
|
|
68
|
-
}, onSubmit: () => {
|
|
69
|
-
configuration.onSubmit({
|
|
70
|
-
close: () => {
|
|
71
|
-
setConfigTarget(null);
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
} }));
|
|
75
|
-
}, [configTarget, configuration, disabled, readOnly]);
|
|
76
|
-
return (_jsx(FormField, { ...restProps, ref: ref, label: label, status: status, disabled: disabled, children: _jsx(SummaryItem, { as: StyledObjectSummary, status: status, meta: value.meta, readOnly: readOnly, overflowStrategy: 'ellipsis', primary: disabled || !value.href ? (_jsx(Text, { id: describedById, children: value.primary })) : (_jsx(Link, { href: value.href, "aria-label": `${label} ${value.primary}`, previewable: true, onPreview: onPreview, onClick: onLinkClick ? (e) => onLinkClick(value.id, e) : undefined, children: value.primary })), secondary: value.meta && _jsx(StyledMetaText, { variant: 'secondary', children: value.meta }), actions: _jsxs(_Fragment, { children: [configuration && (_jsx(Button, { disabled: disabled, label: configuration?.label, icon: true, variant: 'simple', onClick: (e) => {
|
|
77
|
-
setConfigTarget(e.currentTarget);
|
|
78
|
-
}, "aria-describedby": describedById, children: _jsx(Icon, { name: 'gear' }) })), !readOnly && (_jsx(Button, { disabled: disabled, label: t('clear_object_summary', [String(label)]), icon: true, variant: 'simple', onClick: onDelete, "aria-describedby": describedById, children: _jsx(Icon, { name: 'times' }) })), configDialog] }) }) }));
|
|
79
|
-
});
|
|
80
|
-
export default ObjectSummary;
|
|
81
|
-
//# sourceMappingURL=ObjectSummary.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectSummary.js","sourceRoot":"","sources":["../../../src/components/ObjectSelect/ObjectSummary.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,UAAU,EAAoC,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAEL,WAAW,EACX,MAAM,EACN,IAAI,EAEJ,iBAAiB,EACjB,SAAS,EAGT,OAAO,EACP,YAAY,EACZ,IAAI,EACJ,UAAU,EACV,IAAI,EACJ,gBAAgB,EAChB,UAAU,EACV,MAAM,EACN,UAAU,EACV,UAAU,EACV,YAAY,EACZ,wBAAwB,EACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,KAAK,MAAM,8DAA8D,CAAC;AACtF,OAAO,KAAK,IAAI,MAAM,6DAA6D,CAAC;AAMpF,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,C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AAC,QAAQ,EAChB,OAAO,EAAE,QAAQ,sBACC,aAAa,YAE/B,KAAC,IAAI,IAAC,IAAI,EAAC,OAAO,GAAG,GACd,CACV,EACA,YAAY,IACZ,GAEL,GACQ,CACb,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import { FC, forwardRef, Ref, PropsWithoutRef, MouseEvent, useEffect, useMemo } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n BaseProps,\n SummaryItem,\n Button,\n Icon,\n ForwardProps,\n StyledFormControl,\n FormField,\n FormControlProps,\n MenuItemProps,\n useI18n,\n registerIcon,\n Text,\n useElement,\n Link,\n defaultThemeProp,\n StyledLink,\n useUID,\n FormDialog,\n InfoDialog,\n StyledButton,\n StyledSummaryItemActions\n} from '@pega/cosmos-react-core';\nimport * as times from '@pega/cosmos-react-core/lib/components/Icon/icons/times.icon';\nimport * as gear from '@pega/cosmos-react-core/lib/components/Icon/icons/gear.icon';\nimport {\n BaseDialogProps,\n FormDialogProps\n} from '@pega/cosmos-react-core/lib/components/Dialog/Dialog.types';\n\nregisterIcon(times, gear);\n\ninterface ObjectSummaryValueProps {\n id: MenuItemProps['id'];\n primary: MenuItemProps['primary'];\n href?: string;\n meta?: string;\n}\n\ninterface ObjectConfigProps extends Pick<BaseDialogProps, 'children' | 'ref'> {\n heading: NonNullable<FormDialogProps['heading']>;\n label: string;\n onOpen?: () => void;\n onClose?: () => void;\n onSubmit: (arg: { close: () => void }) => void;\n loading?: BaseDialogProps['progress'];\n}\n\nexport interface ObjectSummaryProps extends BaseProps, Omit<FormControlProps, 'value'> {\n value: ObjectSummaryValueProps;\n configuration?: ObjectConfigProps;\n onDelete: (e: MouseEvent<HTMLButtonElement>) => void;\n onPreview?: (e: { href: string }) => void;\n onLinkClick?: (id: MenuItemProps['id'], e: MouseEvent) => void;\n ref: Ref<HTMLDivElement>;\n}\n\nconst StyledObjectSummary = styled(StyledFormControl)<{ meta: string }>(\n ({\n theme: {\n base: {\n spacing,\n 'hit-area': { 'mouse-min': hitAreaMouse, 'finger-min': hitAreaFinger },\n shadow: { 'focus-inset': focusInset }\n },\n components: {\n 'form-control': { 'border-width': borderWidth }\n }\n },\n meta\n }) => {\n return css`\n padding-block: ${meta ? spacing : '0'};\n padding-inline-start: ${spacing};\n min-height: ${hitAreaMouse};\n\n ${StyledLink}:focus {\n box-shadow: ${focusInset};\n }\n\n ${StyledSummaryItemActions} > ${StyledButton} {\n margin-block: calc(-1 * ${borderWidth});\n min-width: calc(${hitAreaMouse} - 2 * ${borderWidth});\n min-height: calc(${hitAreaMouse} - 2 * ${borderWidth});\n }\n\n @media (pointer: coarse) {\n min-height: ${hitAreaFinger};\n\n ${StyledSummaryItemActions} > ${StyledButton} {\n min-width: calc(${hitAreaFinger} - 2 * ${borderWidth});\n min-height: calc(${hitAreaFinger} - 2 * ${borderWidth});\n }\n }\n `;\n }\n);\n\nStyledObjectSummary.defaultProps = defaultThemeProp;\n\nconst StyledMetaText = styled(Text)`\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n`;\n\nconst ObjectSummary: FC<PropsWithoutRef<ObjectSummaryProps> & ForwardProps> = forwardRef(\n function ObjectSummary(\n {\n value,\n configuration,\n label,\n disabled,\n status,\n readOnly,\n onDelete,\n onPreview,\n onLinkClick,\n ...restProps\n },\n ref: ObjectSummaryProps['ref']\n ) {\n const [configTarget, setConfigTarget] = useElement<HTMLButtonElement>();\n const t = useI18n();\n const describedById = useUID();\n\n useEffect(() => {\n if (configTarget) configuration?.onOpen?.();\n }, [configTarget]);\n\n const configDialog = useMemo(() => {\n if (!configuration || !configTarget || disabled) return null;\n\n const commonProps: Pick<BaseDialogProps, 'target' | 'progress' | 'ref' | 'children'> &\n Pick<ObjectConfigProps, 'heading'> = {\n heading: configuration.heading,\n target: configTarget,\n progress: configuration.loading,\n ref: configuration.ref,\n children: configuration.children\n };\n\n if (readOnly) {\n return (\n <InfoDialog\n {...commonProps}\n onDismiss={() => {\n setConfigTarget(null);\n configuration.onClose?.();\n }}\n />\n );\n }\n\n return (\n <FormDialog\n {...commonProps}\n onCancel={() => {\n setConfigTarget(null);\n configuration.onClose?.();\n }}\n onSubmit={() => {\n configuration.onSubmit({\n close: () => {\n setConfigTarget(null);\n }\n });\n }}\n />\n );\n }, [configTarget, configuration, disabled, readOnly]);\n\n return (\n <FormField {...restProps} ref={ref} label={label} status={status} disabled={disabled}>\n <SummaryItem\n as={StyledObjectSummary}\n status={status}\n meta={value.meta}\n readOnly={readOnly}\n overflowStrategy='ellipsis'\n primary={\n disabled || !value.href ? (\n <Text id={describedById}>{value.primary}</Text>\n ) : (\n <Link\n href={value.href}\n aria-label={`${label} ${value.primary}`}\n previewable\n onPreview={onPreview}\n onClick={onLinkClick ? (e: MouseEvent) => onLinkClick(value.id, e) : undefined}\n >\n {value.primary}\n </Link>\n )\n }\n secondary={\n value.meta && <StyledMetaText variant='secondary'>{value.meta}</StyledMetaText>\n }\n actions={\n <>\n {configuration && (\n <Button\n disabled={disabled}\n label={configuration?.label}\n icon\n variant='simple'\n onClick={(e: MouseEvent<HTMLButtonElement>) => {\n setConfigTarget(e.currentTarget);\n }}\n aria-describedby={describedById}\n >\n <Icon name='gear' />\n </Button>\n )}\n {!readOnly && (\n <Button\n disabled={disabled}\n label={t('clear_object_summary', [String(label)])}\n icon\n variant='simple'\n onClick={onDelete}\n aria-describedby={describedById}\n >\n <Icon name='times' />\n </Button>\n )}\n {configDialog}\n </>\n }\n />\n </FormField>\n );\n }\n);\n\nexport default ObjectSummary;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ObjectSelect/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ObjectSelect/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC","sourcesContent":["export { default } from './ObjectSelect';\nexport type { ObjectSelectProps } from './ObjectSelect';\n"]}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { ComponentType } from 'react';
|
|
2
|
-
import { ModalProps } from '@pega/cosmos-react-core';
|
|
3
|
-
export interface UseCreateModalConfig<P extends object = object> {
|
|
4
|
-
/**
|
|
5
|
-
* Heading for the Modal.
|
|
6
|
-
* @default 'Create new'
|
|
7
|
-
*/
|
|
8
|
-
heading?: string;
|
|
9
|
-
/** A component to render the add new form. */
|
|
10
|
-
renderer: ComponentType<P>;
|
|
11
|
-
/** Called when a user submits a form. */
|
|
12
|
-
onSubmit: ({ close }: {
|
|
13
|
-
close: () => void;
|
|
14
|
-
}) => void;
|
|
15
|
-
/** Called when a user cancels a form. */
|
|
16
|
-
onDismiss: ({ close }: {
|
|
17
|
-
close: () => void;
|
|
18
|
-
}) => void;
|
|
19
|
-
/** Called before the modal opens. */
|
|
20
|
-
onBeforeOpen?: ModalProps['onBeforeOpen'];
|
|
21
|
-
/** Called after the modal closes. */
|
|
22
|
-
onAfterClose?: ModalProps['onAfterClose'];
|
|
23
|
-
}
|
|
24
|
-
export interface CreateModalActionProps<P extends object = object> {
|
|
25
|
-
loading?: boolean;
|
|
26
|
-
rendererProps: P;
|
|
27
|
-
}
|
|
28
|
-
declare const useCreateModal: <P extends object = object>(config: UseCreateModalConfig<P> | undefined) => {
|
|
29
|
-
renderModal: ({ rendererProps, loading }: CreateModalActionProps<P>) => void;
|
|
30
|
-
};
|
|
31
|
-
export default useCreateModal;
|
|
32
|
-
//# sourceMappingURL=useCreateModal.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useCreateModal.d.ts","sourceRoot":"","sources":["../../../src/components/ObjectSelect/useCreateModal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,aAAa,EAAE,MAAM,OAAO,CAAC;AAEzD,OAAO,EAIL,UAAU,EAIX,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,oBAAoB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IAC7D;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8CAA8C;IAC9C,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAC3B,yCAAyC;IACzC,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE;QAAE,KAAK,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,IAAI,CAAC;IACrD,yCAAyC;IACzC,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE;QAAE,KAAK,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,IAAI,CAAC;IACtD,qCAAqC;IACrC,YAAY,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC;IAC1C,qCAAqC;IACrC,YAAY,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC;CAC3C;AAED,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IAC/D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,CAAC,CAAC;CAClB;AAED,QAAA,MAAM,cAAc;;CA0FnB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useRef } from 'react';
|
|
3
|
-
import { Button, Modal, useModalManager, useI18n } from '@pega/cosmos-react-core';
|
|
4
|
-
const useCreateModal = (config) => {
|
|
5
|
-
const t = useI18n();
|
|
6
|
-
const submittingRef = useRef(false);
|
|
7
|
-
const modalMethods = useRef();
|
|
8
|
-
const { create: createModal } = useModalManager();
|
|
9
|
-
if (config) {
|
|
10
|
-
const { renderer: Renderer, onSubmit, onDismiss, onBeforeOpen, onAfterClose, heading = t('create_new') } = config;
|
|
11
|
-
const renderModal = ({ rendererProps, loading = false }) => {
|
|
12
|
-
const modalContent = _jsx(Renderer, { ...rendererProps });
|
|
13
|
-
let formActions = null;
|
|
14
|
-
if (!loading || submittingRef.current) {
|
|
15
|
-
const close = () => {
|
|
16
|
-
modalMethods.current?.dismiss();
|
|
17
|
-
modalMethods.current = undefined;
|
|
18
|
-
};
|
|
19
|
-
formActions = (_jsxs(_Fragment, { children: [_jsx(Button, { disabled: loading, onClick: () => {
|
|
20
|
-
onDismiss({ close });
|
|
21
|
-
}, children: t('cancel') }), _jsx(Button, { disabled: loading, type: 'submit', variant: 'primary', onClick: () => {
|
|
22
|
-
submittingRef.current = true;
|
|
23
|
-
onSubmit({ close });
|
|
24
|
-
}, children: t('submit') })] }));
|
|
25
|
-
}
|
|
26
|
-
const modalProps = {
|
|
27
|
-
progress: loading
|
|
28
|
-
? { message: submittingRef.current ? t('submitting') : t('loading') }
|
|
29
|
-
: undefined,
|
|
30
|
-
children: modalContent,
|
|
31
|
-
actions: formActions,
|
|
32
|
-
onRequestDismiss: loading && submittingRef.current ? () => false : undefined
|
|
33
|
-
};
|
|
34
|
-
if (modalMethods.current) {
|
|
35
|
-
modalMethods.current.update(modalProps);
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
modalMethods.current = createModal(Modal, {
|
|
39
|
-
...modalProps,
|
|
40
|
-
heading,
|
|
41
|
-
onBeforeOpen,
|
|
42
|
-
onAfterClose: () => {
|
|
43
|
-
onAfterClose?.();
|
|
44
|
-
submittingRef.current = false;
|
|
45
|
-
}
|
|
46
|
-
}, {
|
|
47
|
-
dismissible: false
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
return {
|
|
52
|
-
renderModal
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
return {
|
|
56
|
-
renderModal: () => { }
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
export default useCreateModal;
|
|
60
|
-
//# sourceMappingURL=useCreateModal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useCreateModal.js","sourceRoot":"","sources":["../../../src/components/ObjectSelect/useCreateModal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAA4B,MAAM,OAAO,CAAC;AAEzD,OAAO,EAEL,MAAM,EAGN,KAAK,EACL,eAAe,EACf,OAAO,EACR,MAAM,yBAAyB,CAAC;AAyBjC,MAAM,cAAc,GAAG,CAA4B,MAA2C,EAAE,EAAE;IAChG,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IAEpB,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACpC,MAAM,YAAY,GAAG,MAAM,EAAgB,CAAC;IAC5C,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,eAAe,EAAE,CAAC;IAElD,IAAI,MAAM,EAAE;QACV,MAAM,EACJ,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,OAAO,GAAG,CAAC,CAAC,YAAY,CAAC,EAC1B,GAAG,MAAM,CAAC;QACX,MAAM,WAAW,GAAG,CAAC,EAAE,aAAa,EAAE,OAAO,GAAG,KAAK,EAA6B,EAAE,EAAE;YACpF,MAAM,YAAY,GAAc,KAAC,QAAQ,OAAK,aAAa,GAAI,CAAC;YAEhE,IAAI,WAAW,GAAc,IAAI,CAAC;YAElC,IAAI,CAAC,OAAO,IAAI,aAAa,CAAC,OAAO,EAAE;gBACrC,MAAM,KAAK,GAAG,GAAG,EAAE;oBACjB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC;oBAChC,YAAY,CAAC,OAAO,GAAG,SAAS,CAAC;gBACnC,CAAC,CAAC;gBAEF,WAAW,GAAG,CACZ,8BACE,KAAC,MAAM,IACL,QAAQ,EAAE,OAAO,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WAAW;SACZ,CAAC;KACH;IAED,OAAO;QACL,WAAW,EAAE,GAAG,EAAE,GAAE,CAAC;KACtB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import { useRef, ReactNode, ComponentType } from 'react';\n\nimport {\n ModalMethods,\n Button,\n OmitStrict,\n ModalProps,\n Modal,\n useModalManager,\n useI18n\n} from '@pega/cosmos-react-core';\n\nexport interface UseCreateModalConfig<P extends object = object> {\n /**\n * Heading for the Modal.\n * @default 'Create new'\n */\n heading?: string;\n /** A component to render the add new form. */\n renderer: ComponentType<P>;\n /** Called when a user submits a form. */\n onSubmit: ({ close }: { close: () => void }) => void;\n /** Called when a user cancels a form. */\n onDismiss: ({ close }: { close: () => void }) => void;\n /** Called before the modal opens. */\n onBeforeOpen?: ModalProps['onBeforeOpen'];\n /** Called after the modal closes. */\n onAfterClose?: ModalProps['onAfterClose'];\n}\n\nexport interface CreateModalActionProps<P extends object = object> {\n loading?: boolean;\n rendererProps: P;\n}\n\nconst useCreateModal = <P extends object = object>(config: UseCreateModalConfig<P> | undefined) => {\n const t = useI18n();\n\n const submittingRef = useRef(false);\n const modalMethods = useRef<ModalMethods>();\n const { create: createModal } = useModalManager();\n\n if (config) {\n const {\n renderer: Renderer,\n onSubmit,\n onDismiss,\n onBeforeOpen,\n onAfterClose,\n heading = t('create_new')\n } = config;\n const renderModal = ({ rendererProps, loading = false }: CreateModalActionProps<P>) => {\n const modalContent: ReactNode = <Renderer {...rendererProps} />;\n\n let formActions: ReactNode = null;\n\n if (!loading || submittingRef.current) {\n const close = () => {\n modalMethods.current?.dismiss();\n modalMethods.current = undefined;\n };\n\n formActions = (\n <>\n <Button\n disabled={loading}\n onClick={() => {\n onDismiss({ close });\n }}\n >\n {t('cancel')}\n </Button>\n <Button\n disabled={loading}\n type='submit'\n variant='primary'\n onClick={() => {\n submittingRef.current = true;\n onSubmit({ close });\n }}\n >\n {t('submit')}\n </Button>\n </>\n );\n }\n\n const modalProps: OmitStrict<ModalProps, 'heading'> = {\n progress: loading\n ? { message: submittingRef.current ? t('submitting') : t('loading') }\n : undefined,\n children: modalContent,\n actions: formActions,\n onRequestDismiss: loading && submittingRef.current ? () => false : undefined\n };\n\n if (modalMethods.current) {\n modalMethods.current.update(modalProps);\n } else {\n modalMethods.current = createModal(\n Modal,\n {\n ...modalProps,\n heading,\n onBeforeOpen,\n onAfterClose: () => {\n onAfterClose?.();\n submittingRef.current = false;\n }\n },\n {\n dismissible: false\n }\n );\n }\n };\n\n return {\n renderModal\n };\n }\n\n return {\n renderModal: () => {}\n };\n};\n\nexport default useCreateModal;\n"]}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent, MouseEventHandler } from 'react';
|
|
2
|
-
import { ImageProps, NoChildrenProp } from '@pega/cosmos-react-core';
|
|
3
|
-
interface Action {
|
|
4
|
-
label: string;
|
|
5
|
-
onClick: MouseEventHandler<HTMLButtonElement>;
|
|
6
|
-
}
|
|
7
|
-
export interface PageBannerProps extends NoChildrenProp {
|
|
8
|
-
title: string;
|
|
9
|
-
description: string;
|
|
10
|
-
image?: ImageProps;
|
|
11
|
-
actions?: [Action] | [Action, Action];
|
|
12
|
-
link?: {
|
|
13
|
-
label: string;
|
|
14
|
-
href: string;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
export declare const StyledPageBanner: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
18
|
-
export declare const StyledImageContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
19
|
-
export declare const StyledActions: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
20
|
-
declare const PageBanner: FunctionComponent<PageBannerProps>;
|
|
21
|
-
export default PageBanner;
|
|
22
|
-
//# sourceMappingURL=PageBanner.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PageBanner.d.ts","sourceRoot":"","sources":["../../../src/components/PageBanner/PageBanner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAU,MAAM,OAAO,CAAC;AAIrE,OAAO,EASL,UAAU,EAMV,cAAc,EACf,MAAM,yBAAyB,CAAC;AAEjC,UAAU,MAAM;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;CAC/C;AAED,MAAM,WAAW,eAAgB,SAAQ,cAAc;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,IAAI,CAAC,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAED,eAAO,MAAM,gBAAgB,yGAqC3B,CAAC;AAIH,eAAO,MAAM,oBAAoB,yGAOhC,CAAC;AAEF,eAAO,MAAM,aAAa,yGAEzB,CAAC;AAEF,QAAA,MAAM,UAAU,EAAE,iBAAiB,CAAC,eAAe,CAqDlD,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useRef } from 'react';
|
|
3
|
-
import styled, { css } from 'styled-components';
|
|
4
|
-
import { readableColor } from 'polished';
|
|
5
|
-
import { Flex, Grid, Image, Text, Button, defaultThemeProp, tryCatch, StyledButton, Link, StyledLink, useBreakpoint, ShowMoreLess, StyledShowMoreLessButton } from '@pega/cosmos-react-core';
|
|
6
|
-
export const StyledPageBanner = styled.div(({ theme }) => {
|
|
7
|
-
const { base: { palette: { 'brand-primary': brandBackground }, 'font-weight': fontWeight, 'content-width': contentWidth } } = theme;
|
|
8
|
-
const color = tryCatch(() => readableColor(brandBackground));
|
|
9
|
-
return css `
|
|
10
|
-
background: ${brandBackground};
|
|
11
|
-
color: ${color};
|
|
12
|
-
|
|
13
|
-
h1:focus-visible {
|
|
14
|
-
outline: transparent;
|
|
15
|
-
box-shadow: ${theme.base.shadow.focus};
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
${StyledButton} {
|
|
19
|
-
width: max-content;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
${StyledButton} + ${StyledButton} {
|
|
23
|
-
margin-inline-start: 0;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
${StyledLink}, ${StyledShowMoreLessButton} {
|
|
27
|
-
font-weight: ${fontWeight['semi-bold']};
|
|
28
|
-
color: ${color};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
p {
|
|
32
|
-
max-width: ${contentWidth.xl};
|
|
33
|
-
}
|
|
34
|
-
`;
|
|
35
|
-
});
|
|
36
|
-
StyledPageBanner.defaultProps = defaultThemeProp;
|
|
37
|
-
export const StyledImageContainer = styled.div `
|
|
38
|
-
min-width: 100%;
|
|
39
|
-
|
|
40
|
-
img {
|
|
41
|
-
object-fit: contain;
|
|
42
|
-
max-height: 10rem;
|
|
43
|
-
}
|
|
44
|
-
`;
|
|
45
|
-
export const StyledActions = styled.div `
|
|
46
|
-
margin-block-start: auto;
|
|
47
|
-
`;
|
|
48
|
-
const PageBanner = ({ title, description, image, actions, link }) => {
|
|
49
|
-
const bannerRef = useRef(null);
|
|
50
|
-
const isMediumOrAbove = useBreakpoint('md', { breakpointRef: bannerRef });
|
|
51
|
-
const isSmallOrAbove = useBreakpoint('sm', { breakpointRef: bannerRef });
|
|
52
|
-
return (_jsxs(Grid, { container: {
|
|
53
|
-
cols: isSmallOrAbove && image ? '1fr 25%' : '1fr',
|
|
54
|
-
pad: isMediumOrAbove ? [0, 8, 0, 4] : [0, 4],
|
|
55
|
-
gap: isMediumOrAbove ? 8 : 4
|
|
56
|
-
}, as: StyledPageBanner, ref: bannerRef, children: [_jsxs(Flex, { container: { direction: 'column', pad: [2, 0], gap: 1 }, children: [_jsx(Text, { variant: 'h1', children: title }), _jsx(ShowMoreLess, { lines: 3, children: _jsx(Text, { as: 'p', children: description }) }), !isSmallOrAbove && image && (_jsx(Flex, { as: StyledImageContainer, container: { justify: 'center', alignItems: 'center' }, children: _jsx(Image, { ...image }) })), !!actions?.length && (_jsxs(Flex, { as: StyledActions, container: { alignItems: 'center', pad: [1, 0, 0, 0], gap: 1, wrap: 'wrap' }, children: [actions.map(action => (_jsx(Button, { onClick: action.onClick, children: action.label }, action.label))), link && _jsx(Link, { href: link.href, children: link.label })] }))] }), isSmallOrAbove && image && (_jsx(Flex, { as: StyledImageContainer, container: { justify: 'end', alignItems: 'center' }, children: _jsx(Image, { ...image }) }))] }));
|
|
57
|
-
};
|
|
58
|
-
export default PageBanner;
|
|
59
|
-
//# sourceMappingURL=PageBanner.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PageBanner.js","sourceRoot":"","sources":["../../../src/components/PageBanner/PageBanner.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAwC,MAAM,EAAE,MAAM,OAAO,CAAC;AACrE,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EACL,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,MAAM,EACN,gBAAgB,EAChB,QAAQ,EACR,YAAY,EAEZ,IAAI,EACJ,UAAU,EACV,aAAa,EACb,YAAY,EACZ,wBAAwB,EAEzB,MAAM,yBAAyB,CAAC;AAkBjC,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACvD,MAAM,EACJ,IAAI,EAAE,EACJ,OAAO,EAAE,EAAE,eAAe,EAAE,eAAe,EAAE,EAC7C,aA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,IAAI,KAAK,IAAI,CAC1B,KAAC,IAAI,IAAC,EAAE,EAAE,oBAAoB,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,YACjF,KAAC,KAAK,OAAK,KAAK,GAAI,GACf,CACR,IACI,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import { FunctionComponent, MouseEventHandler, useRef } from 'react';\nimport styled, { css } from 'styled-components';\nimport { readableColor } from 'polished';\n\nimport {\n Flex,\n Grid,\n Image,\n Text,\n Button,\n defaultThemeProp,\n tryCatch,\n StyledButton,\n ImageProps,\n Link,\n StyledLink,\n useBreakpoint,\n ShowMoreLess,\n StyledShowMoreLessButton,\n NoChildrenProp\n} from '@pega/cosmos-react-core';\n\ninterface Action {\n label: string;\n onClick: MouseEventHandler<HTMLButtonElement>;\n}\n\nexport interface PageBannerProps extends NoChildrenProp {\n title: string;\n description: string;\n image?: ImageProps;\n actions?: [Action] | [Action, Action];\n link?: {\n label: string;\n href: string;\n };\n}\n\nexport const StyledPageBanner = styled.div(({ theme }) => {\n const {\n base: {\n palette: { 'brand-primary': brandBackground },\n 'font-weight': fontWeight,\n 'content-width': contentWidth\n }\n } = theme;\n\n const color = tryCatch(() => readableColor(brandBackground));\n\n return css`\n background: ${brandBackground};\n color: ${color};\n\n h1:focus-visible {\n outline: transparent;\n box-shadow: ${theme.base.shadow.focus};\n }\n\n ${StyledButton} {\n width: max-content;\n }\n\n ${StyledButton} + ${StyledButton} {\n margin-inline-start: 0;\n }\n\n ${StyledLink}, ${StyledShowMoreLessButton} {\n font-weight: ${fontWeight['semi-bold']};\n color: ${color};\n }\n\n p {\n max-width: ${contentWidth.xl};\n }\n `;\n});\n\nStyledPageBanner.defaultProps = defaultThemeProp;\n\nexport const StyledImageContainer = styled.div`\n min-width: 100%;\n\n img {\n object-fit: contain;\n max-height: 10rem;\n }\n`;\n\nexport const StyledActions = styled.div`\n margin-block-start: auto;\n`;\n\nconst PageBanner: FunctionComponent<PageBannerProps> = ({\n title,\n description,\n image,\n actions,\n link\n}) => {\n const bannerRef = useRef<HTMLDivElement>(null);\n\n const isMediumOrAbove = useBreakpoint('md', { breakpointRef: bannerRef });\n const isSmallOrAbove = useBreakpoint('sm', { breakpointRef: bannerRef });\n\n return (\n <Grid\n container={{\n cols: isSmallOrAbove && image ? '1fr 25%' : '1fr',\n pad: isMediumOrAbove ? [0, 8, 0, 4] : [0, 4],\n gap: isMediumOrAbove ? 8 : 4\n }}\n as={StyledPageBanner}\n ref={bannerRef}\n >\n <Flex container={{ direction: 'column', pad: [2, 0], gap: 1 }}>\n <Text variant='h1'>{title}</Text>\n <ShowMoreLess lines={3}>\n <Text as='p'>{description}</Text>\n </ShowMoreLess>\n {!isSmallOrAbove && image && (\n <Flex as={StyledImageContainer} container={{ justify: 'center', alignItems: 'center' }}>\n <Image {...image} />\n </Flex>\n )}\n {!!actions?.length && (\n <Flex\n as={StyledActions}\n container={{ alignItems: 'center', pad: [1, 0, 0, 0], gap: 1, wrap: 'wrap' }}\n >\n {actions.map(action => (\n <Button key={action.label} onClick={action.onClick}>\n {action.label}\n </Button>\n ))}\n {link && <Link href={link.href}>{link.label}</Link>}\n </Flex>\n )}\n </Flex>\n {isSmallOrAbove && image && (\n <Flex as={StyledImageContainer} container={{ justify: 'end', alignItems: 'center' }}>\n <Image {...image} />\n </Flex>\n )}\n </Grid>\n );\n};\n\nexport default PageBanner;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PageBanner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACzD,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/PageBanner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC","sourcesContent":["export { default, StyledPageBanner } from './PageBanner';\nexport type { PageBannerProps } from './PageBanner';\n"]}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { FC, Ref, MouseEvent } from 'react';
|
|
2
|
-
import { NoChildrenProp } from '@pega/cosmos-react-core';
|
|
3
|
-
import { SummaryCardProps } from '../SummaryCard';
|
|
4
|
-
import { PageBannerProps } from '../PageBanner';
|
|
5
|
-
interface EmptyStateProps {
|
|
6
|
-
heading: string;
|
|
7
|
-
description?: string;
|
|
8
|
-
}
|
|
9
|
-
export interface GalleryPageProps extends NoChildrenProp, PageBannerProps {
|
|
10
|
-
/** Props to render the empty state content. */
|
|
11
|
-
emptyState: EmptyStateProps;
|
|
12
|
-
/** A list of cards to render as a grid. */
|
|
13
|
-
items?: SummaryCardProps[];
|
|
14
|
-
/** Callback function that is fired when an item is clicked. */
|
|
15
|
-
onItemClick: (id: SummaryCardProps['id'], e: MouseEvent<HTMLDivElement>) => void;
|
|
16
|
-
/** Ref for the wrapping element. */
|
|
17
|
-
ref?: Ref<HTMLDivElement>;
|
|
18
|
-
}
|
|
19
|
-
export declare const StyledGalleryPage: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
20
|
-
export declare const StyledContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
21
|
-
declare const GalleryPage: FC<GalleryPageProps>;
|
|
22
|
-
export default GalleryPage;
|
|
23
|
-
//# sourceMappingURL=GalleryPage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GalleryPage.d.ts","sourceRoot":"","sources":["../../../src/components/PageTemplates/GalleryPage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAA+B,GAAG,EAAE,UAAU,EAAa,MAAM,OAAO,CAAC;AAGpF,OAAO,EAIL,cAAc,EAOf,MAAM,yBAAyB,CAAC;AAEjC,OAAoB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAmB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAE5D,UAAU,eAAe;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,gBAAiB,SAAQ,cAAc,EAAE,eAAe;IACvE,+CAA+C;IAC/C,UAAU,EAAE,eAAe,CAAC;IAC5B,2CAA2C;IAC3C,KAAK,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC3B,+DAA+D;IAC/D,WAAW,EAAE,CAAC,EAAE,EAAE,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IACjF,oCAAoC;IACpC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;AAED,eAAO,MAAM,iBAAiB,yGAE7B,CAAC;AAEF,eAAO,MAAM,aAAa,yGAMxB,CAAC;AA+CH,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CA+CpC,CAAC;AAEH,eAAe,WAAW,CAAC"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, useEffect } from 'react';
|
|
3
|
-
import styled, { css } from 'styled-components';
|
|
4
|
-
import { Flex, Grid, Button, ShowMoreLess, Text, defaultThemeProp, useConfiguration, focusHeadingOrContainer, useConsolidatedRef } from '@pega/cosmos-react-core';
|
|
5
|
-
import SummaryCard from '../SummaryCard';
|
|
6
|
-
import PageBanner from '../PageBanner';
|
|
7
|
-
export const StyledGalleryPage = styled.div `
|
|
8
|
-
min-height: inherit;
|
|
9
|
-
`;
|
|
10
|
-
export const StyledContent = styled.div(({ theme }) => {
|
|
11
|
-
return css `
|
|
12
|
-
padding-block: calc(3 * ${theme.base.spacing});
|
|
13
|
-
padding-inline: calc(4 * ${theme.base.spacing});
|
|
14
|
-
min-height: 100%;
|
|
15
|
-
`;
|
|
16
|
-
});
|
|
17
|
-
StyledContent.defaultProps = defaultThemeProp;
|
|
18
|
-
const SummaryCardList = ({ items, onItemClick }) => {
|
|
19
|
-
return (_jsx(Grid, { container: {
|
|
20
|
-
cols: 'repeat(auto-fill, minmax(18.75rem, 1fr))',
|
|
21
|
-
autoRows: '10rem',
|
|
22
|
-
gap: 2
|
|
23
|
-
}, children: items && items.map(item => _jsx(SummaryCard, { ...item, onClick: onItemClick }, item.id)) }));
|
|
24
|
-
};
|
|
25
|
-
const EmptyState = ({ heading, description, actions }) => {
|
|
26
|
-
return (_jsxs(Flex, { container: { direction: 'column', alignItems: 'center', justify: 'center', rowGap: 2 }, item: { grow: 1 }, children: [_jsx(Text, { variant: 'h2', children: heading }), description && (_jsx(ShowMoreLess, { lines: 2, children: _jsx(Text, { as: 'p', children: description }) })), !!actions?.length &&
|
|
27
|
-
actions.map(action => (_jsx(Button, { variant: 'primary', onClick: action.onClick, children: action.label }, action.label)))] }));
|
|
28
|
-
};
|
|
29
|
-
const GalleryPage = forwardRef(function GalleryPage({ title, description, image, items, onItemClick, emptyState, actions, link }, ref) {
|
|
30
|
-
const { loadedRef } = useConfiguration();
|
|
31
|
-
const pageRef = useConsolidatedRef(ref);
|
|
32
|
-
// Focus heading on initial mount
|
|
33
|
-
useEffect(() => {
|
|
34
|
-
if (!pageRef.current)
|
|
35
|
-
return;
|
|
36
|
-
if (loadedRef.current) {
|
|
37
|
-
focusHeadingOrContainer(pageRef.current, title);
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
loadedRef.current = true;
|
|
41
|
-
}
|
|
42
|
-
}, [title]);
|
|
43
|
-
const noItems = !items || items.length === 0;
|
|
44
|
-
return (_jsxs(StyledGalleryPage, { ref: pageRef, children: [_jsx(PageBanner, { title: title, description: description, actions: noItems ? undefined : actions, link: link, image: image }), _jsx(StyledContent, { children: noItems ? (_jsx(EmptyState, { ...emptyState, actions: actions })) : (_jsx(SummaryCardList, { items: items, onItemClick: onItemClick })) })] }));
|
|
45
|
-
});
|
|
46
|
-
export default GalleryPage;
|
|
47
|
-
//# sourceMappingURL=GalleryPage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GalleryPage.js","sourceRoot":"","sources":["../../../src/components/PageTemplates/GalleryPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAuB,UAAU,EAAmB,SAAS,EAAE,MAAM,OAAO,CAAC;AACpF,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,IAAI,EACJ,IAAI,EACJ,MAAM,EAEN,YAAY,EACZ,IAAI,EACJ,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,WAAiC,MAAM,gBAAgB,CAAC;AAC/D,OAAO,UAA+B,MAAM,eAAe,CAAC;AAkB5D,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAAA;;CAE1C,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACpD,OAAO,GAAG,CAAA;8BACkB,KAAK,CAAC,IAAI,CAAC,OAAO;+BACjB,KAAK,CAAC,IAAI,CAAC,OAAO;;GAE9C,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,aAAa,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE9C,MAAM,eAAe,GAGhB,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE;IAC9B,OAAO,CACL,KAAC,IAAI,IACH,SAAS,EAAE;YACT,IAAI,EAAE,0CAA0C;YAChD,QAAQ,EAAE,OAAO;YACjB,GAAG,EAAE,CAAC;SACP,YAEA,K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AC,GAAG,EAAE;QACb,IAAI,CAAC,OAAO,CAAC,OAAO;YAAE,OAAO;QAE7B,IAAI,SAAS,CAAC,OAAO,EAAE;YACrB,uBAAuB,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;SACjD;aAAM;YACL,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC;SAC1B;IACH,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,MAAM,OAAO,GAAG,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;IAE7C,OAAO,CACL,MAAC,iBAAiB,IAAC,GAAG,EAAE,OAAO,aAC7B,KAAC,UAAU,IACT,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,EACtC,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,GACZ,EACF,KAAC,aAAa,cACX,OAAO,CAAC,CAAC,CAAC,CACT,KAAC,UAAU,OAAK,UAAU,EAAE,OAAO,EAAE,OAAO,GAAI,CACjD,CAAC,CAAC,CAAC,CACF,KAAC,eAAe,IAAC,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,GAAI,CAC5D,GACa,IACE,CACrB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC","sourcesContent":["import { FC, PropsWithoutRef, forwardRef, Ref, MouseEvent, useEffect } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n Flex,\n Grid,\n Button,\n NoChildrenProp,\n ShowMoreLess,\n Text,\n defaultThemeProp,\n useConfiguration,\n focusHeadingOrContainer,\n useConsolidatedRef\n} from '@pega/cosmos-react-core';\n\nimport SummaryCard, { SummaryCardProps } from '../SummaryCard';\nimport PageBanner, { PageBannerProps } from '../PageBanner';\n\ninterface EmptyStateProps {\n heading: string;\n description?: string;\n}\n\nexport interface GalleryPageProps extends NoChildrenProp, PageBannerProps {\n /** Props to render the empty state content. */\n emptyState: EmptyStateProps;\n /** A list of cards to render as a grid. */\n items?: SummaryCardProps[];\n /** Callback function that is fired when an item is clicked. */\n onItemClick: (id: SummaryCardProps['id'], e: MouseEvent<HTMLDivElement>) => void;\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n\nexport const StyledGalleryPage = styled.div`\n min-height: inherit;\n`;\n\nexport const StyledContent = styled.div(({ theme }) => {\n return css`\n padding-block: calc(3 * ${theme.base.spacing});\n padding-inline: calc(4 * ${theme.base.spacing});\n min-height: 100%;\n `;\n});\n\nStyledContent.defaultProps = defaultThemeProp;\n\nconst SummaryCardList: FC<{\n items: GalleryPageProps['items'];\n onItemClick: GalleryPageProps['onItemClick'];\n}> = ({ items, onItemClick }) => {\n return (\n <Grid\n container={{\n cols: 'repeat(auto-fill, minmax(18.75rem, 1fr))',\n autoRows: '10rem',\n gap: 2\n }}\n >\n {items && items.map(item => <SummaryCard key={item.id} {...item} onClick={onItemClick} />)}\n </Grid>\n );\n};\n\nconst EmptyState: FC<EmptyStateProps & Pick<GalleryPageProps, 'actions'>> = ({\n heading,\n description,\n actions\n}) => {\n return (\n <Flex\n container={{ direction: 'column', alignItems: 'center', justify: 'center', rowGap: 2 }}\n item={{ grow: 1 }}\n >\n <Text variant='h2'>{heading}</Text>\n {description && (\n <ShowMoreLess lines={2}>\n <Text as='p'>{description}</Text>\n </ShowMoreLess>\n )}\n {!!actions?.length &&\n actions.map(action => (\n <Button key={action.label} variant='primary' onClick={action.onClick}>\n {action.label}\n </Button>\n ))}\n </Flex>\n );\n};\n\nconst GalleryPage: FC<GalleryPageProps> = forwardRef(function GalleryPage(\n {\n title,\n description,\n image,\n items,\n onItemClick,\n emptyState,\n actions,\n link\n }: PropsWithoutRef<GalleryPageProps>,\n ref: GalleryPageProps['ref']\n) {\n const { loadedRef } = useConfiguration();\n const pageRef = useConsolidatedRef(ref);\n\n // Focus heading on initial mount\n useEffect(() => {\n if (!pageRef.current) return;\n\n if (loadedRef.current) {\n focusHeadingOrContainer(pageRef.current, title);\n } else {\n loadedRef.current = true;\n }\n }, [title]);\n\n const noItems = !items || items.length === 0;\n\n return (\n <StyledGalleryPage ref={pageRef}>\n <PageBanner\n title={title}\n description={description}\n actions={noItems ? undefined : actions}\n link={link}\n image={image}\n />\n <StyledContent>\n {noItems ? (\n <EmptyState {...emptyState} actions={actions} />\n ) : (\n <SummaryCardList items={items} onItemClick={onItemClick} />\n )}\n </StyledContent>\n </StyledGalleryPage>\n );\n});\n\nexport default GalleryPage;\n"]}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent, MouseEvent } from 'react';
|
|
2
|
-
import { OneColumnPageProps as CoreOneColumnPageProps, TabbedPageProps as CoreTabbedPageProps, FieldValueListProps, ForwardProps, PageTemplateProps, OmitStrict, StatusProps } from '@pega/cosmos-react-core';
|
|
3
|
-
export interface PageHeaderProps extends Pick<PageTemplateProps, 'title' | 'actions'> {
|
|
4
|
-
metadata?: FieldValueListProps['fields'];
|
|
5
|
-
status?: {
|
|
6
|
-
type: StatusProps['variant'];
|
|
7
|
-
label: string;
|
|
8
|
-
};
|
|
9
|
-
titleTag?: 'h1' | 'h2';
|
|
10
|
-
additionalInfo?: {
|
|
11
|
-
title: string;
|
|
12
|
-
description?: string;
|
|
13
|
-
fields: FieldValueListProps['fields'];
|
|
14
|
-
onEdit?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
type OmittedPageProps = 'header' | 'scrollContent';
|
|
18
|
-
export interface OneColumnPageProps extends OmitStrict<CoreOneColumnPageProps, OmittedPageProps>, PageHeaderProps {
|
|
19
|
-
}
|
|
20
|
-
export interface TabbedPageProps extends OmitStrict<CoreTabbedPageProps, OmittedPageProps>, PageHeaderProps {
|
|
21
|
-
}
|
|
22
|
-
export declare const StyledPage: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
23
|
-
export declare const PageHeader: ({ title, metadata, additionalInfo, actions, status, titleTag }: PageHeaderProps) => JSX.Element;
|
|
24
|
-
export declare const TabbedPage: FunctionComponent<TabbedPageProps & ForwardProps>;
|
|
25
|
-
export declare const OneColumnPage: FunctionComponent<OneColumnPageProps & ForwardProps>;
|
|
26
|
-
export {};
|
|
27
|
-
//# sourceMappingURL=PageTemplates.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PageTemplates.d.ts","sourceRoot":"","sources":["../../../src/components/PageTemplates/PageTemplates.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,iBAAiB,EAEjB,UAAU,EAGX,MAAM,OAAO,CAAC;AAGf,OAAO,EAEL,kBAAkB,IAAI,sBAAsB,EAE5C,eAAe,IAAI,mBAAmB,EACtC,mBAAmB,EAQnB,YAAY,EAGZ,iBAAiB,EACjB,UAAU,EAEV,WAAW,EAQZ,MAAM,yBAAyB,CAAC;AAWjC,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,iBAAiB,EAAE,OAAO,GAAG,SAAS,CAAC;IACnF,QAAQ,CAAC,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IACzC,MAAM,CAAC,EAAE;QAAE,IAAI,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACzD,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,cAAc,CAAC,EAAE;QACf,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,MAAM,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;QACtC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;KACrD,CAAC;CACH;AAED,KAAK,gBAAgB,GAAG,QAAQ,GAAG,eAAe,CAAC;AAEnD,MAAM,WAAW,kBACf,SAAQ,UAAU,CAAC,sBAAsB,EAAE,gBAAgB,CAAC,EAC1D,eAAe;CAAG;AAEtB,MAAM,WAAW,eACf,SAAQ,UAAU,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,EACvD,eAAe;CAAG;AA+BtB,eAAO,MAAM,UAAU,yGAiCtB,CAAC;AAIF,eAAO,MAAM,UAAU,mEAOpB,eAAe,gBAkDjB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,iBAAiB,CAAC,eAAe,GAAG,YAAY,CAgBxE,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,iBAAiB,CAAC,kBAAkB,GAAG,YAAY,CAoB9E,CAAC"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, useMemo, useRef } from 'react';
|
|
3
|
-
import styled, { css } from 'styled-components';
|
|
4
|
-
import { OneColumnPage as CoreOneColumnPage, TabbedPage as CoreTabbedPage, Flex, Status, SummaryItem, Text, Button, Popover, FieldValueList, defaultThemeProp, useI18n, StyledSummaryItemActions, registerIcon, StyledRegion, MetaList, StyledBreadcrumbs, StyledPageHeader, AdditionalInfo } from '@pega/cosmos-react-core';
|
|
5
|
-
import * as nodesDownIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/nodes-down.icon';
|
|
6
|
-
import * as informationIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/information.icon';
|
|
7
|
-
import { StyledForm } from '@pega/cosmos-react-core/lib/components/MultiStepForm/MultiStepForm';
|
|
8
|
-
import { StyledBanner } from '@pega/cosmos-react-core/lib/components/Banner/Banner';
|
|
9
|
-
import { StyledTabs } from '@pega/cosmos-react-core/lib/components/Tabs/Tabs';
|
|
10
|
-
import { StyledWorkbench } from '../Workbench/Workbench.styles';
|
|
11
|
-
registerIcon(nodesDownIcon, informationIcon);
|
|
12
|
-
const StyledTextWithEllipsis = styled(Text) `
|
|
13
|
-
overflow: hidden;
|
|
14
|
-
white-space: nowrap;
|
|
15
|
-
text-overflow: ellipsis;
|
|
16
|
-
line-height: 1.15;
|
|
17
|
-
`;
|
|
18
|
-
const StyledInfoPopover = styled(Popover)(({ theme: { base: { 'content-width': contentWidth } } }) => {
|
|
19
|
-
return css `
|
|
20
|
-
min-width: ${contentWidth.sm};
|
|
21
|
-
max-width: ${contentWidth.md};
|
|
22
|
-
overflow-wrap: break-word;
|
|
23
|
-
`;
|
|
24
|
-
});
|
|
25
|
-
StyledInfoPopover.defaultProps = defaultThemeProp;
|
|
26
|
-
const StyledHeaderContent = styled(SummaryItem) `
|
|
27
|
-
${StyledSummaryItemActions} {
|
|
28
|
-
align-self: start;
|
|
29
|
-
}
|
|
30
|
-
`;
|
|
31
|
-
export const StyledPage = styled.div(({ theme: { base: { spacing, palette: { 'primary-background': primaryBackground } } } }) => {
|
|
32
|
-
return css `
|
|
33
|
-
background: ${primaryBackground};
|
|
34
|
-
height: 100%;
|
|
35
|
-
|
|
36
|
-
${StyledBanner},
|
|
37
|
-
${StyledTabs} {
|
|
38
|
-
margin-block-start: calc(1.5 * ${spacing});
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
${StyledRegion} ${StyledWorkbench} {
|
|
42
|
-
position: absolute;
|
|
43
|
-
width: 100%;
|
|
44
|
-
margin: 0 calc(-2 * ${spacing});
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
${StyledRegion} ${StyledForm} {
|
|
48
|
-
max-width: 80ch;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
${StyledPageHeader} > ${StyledBreadcrumbs} {
|
|
52
|
-
margin-block-end: 0;
|
|
53
|
-
}
|
|
54
|
-
`;
|
|
55
|
-
});
|
|
56
|
-
StyledPage.defaultProps = defaultThemeProp;
|
|
57
|
-
export const PageHeader = ({ title, metadata, additionalInfo, actions, status, titleTag }) => {
|
|
58
|
-
const t = useI18n();
|
|
59
|
-
const metaListItems = useMemo(() => metadata?.map(({ name, value }) => `${name}: ${value}`), [metadata]);
|
|
60
|
-
const infoDialogHandle = useRef(null);
|
|
61
|
-
return (_jsx(StyledHeaderContent, { container: true, primary: _jsxs(Flex, { container: { alignItems: 'center', gap: 0.5, wrap: 'wrap' }, children: [_jsxs(Flex, { container: { gap: 0.5, alignItems: 'end' }, item: { shrink: 0 }, children: [_jsx(StyledTextWithEllipsis, { variant: 'h1', forwardedAs: titleTag, children: title }), additionalInfo && (_jsx(AdditionalInfo, { heading: additionalInfo.title, dialogHandle: infoDialogHandle, children: _jsxs(Flex, { container: { direction: 'column', alignItems: 'start', gap: 2 }, children: [_jsxs(Flex, { container: { direction: 'column', gap: 1 }, item: { grow: 1, alignSelf: 'stretch' }, children: [additionalInfo.description && _jsx(Text, { as: 'p', children: additionalInfo.description }), _jsx(FieldValueList, { variant: 'inline', fields: additionalInfo.fields })] }), additionalInfo.onEdit && (_jsx(Button, { onClick: (e) => {
|
|
62
|
-
infoDialogHandle.current?.close();
|
|
63
|
-
additionalInfo.onEdit?.(e);
|
|
64
|
-
}, children: t('edit_details') }))] }) }))] }), status && _jsx(Status, { variant: status.type, children: status.label })] }), secondary: metaListItems && _jsx(MetaList, { items: metaListItems }), actions: actions }));
|
|
65
|
-
};
|
|
66
|
-
export const TabbedPage = forwardRef(function TabbedPage({ tabs, ...restProps }, ref) {
|
|
67
|
-
return (_jsx(CoreTabbedPage, { ...restProps, as: StyledPage, header: _jsx(PageHeader, { ...restProps }), tabs: tabs, ref: ref, scrollContent: true }));
|
|
68
|
-
});
|
|
69
|
-
export const OneColumnPage = forwardRef(function OneColumnPage({ a, ...restProps }, ref) {
|
|
70
|
-
return (_jsx(CoreOneColumnPage, { ...restProps, as: StyledPage, header: _jsx(PageHeader, { ...restProps }), scrollContent: true, a: a, ref: ref }));
|
|
71
|
-
});
|
|
72
|
-
//# sourceMappingURL=PageTemplates.js.map
|