@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,77 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { createElement as _createElement } from "react";
|
|
3
|
-
import { forwardRef, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
4
|
-
import styled, { css } from 'styled-components';
|
|
5
|
-
import { defaultThemeProp, Flex, Button, Icon, useI18n } from '@pega/cosmos-react-core';
|
|
6
|
-
import LifeCycleList from './LifeCycleList';
|
|
7
|
-
import LifeCycleContext from './LifeCycleContext';
|
|
8
|
-
const StyledAddButton = styled(Button)(({ theme }) => {
|
|
9
|
-
return css `
|
|
10
|
-
align-self: flex-start;
|
|
11
|
-
margin-block-start: calc(${theme.base.spacing} / 2);
|
|
12
|
-
`;
|
|
13
|
-
});
|
|
14
|
-
StyledAddButton.defaultProps = defaultThemeProp;
|
|
15
|
-
const LifeCycle = forwardRef(function LifeCycle({ items, categories, alternateItems = [], onAddStage, onAddAlternateStage, stage, alternateStage, selectedItemId, readOnly, ...restProps }, ref) {
|
|
16
|
-
const lifeCycleEl = useRef(null);
|
|
17
|
-
const t = useI18n();
|
|
18
|
-
const [categoriesState, setcategoriesState] = useState(categories);
|
|
19
|
-
const categoryElements = [];
|
|
20
|
-
const setRef = (element) => {
|
|
21
|
-
if (element) {
|
|
22
|
-
categoryElements.push(element);
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
useLayoutEffect(() => {
|
|
26
|
-
let isHeightChanged = false;
|
|
27
|
-
const categoriesColumn = [...categories];
|
|
28
|
-
if (categoriesColumn && categoriesColumn.length > 0) {
|
|
29
|
-
categoriesColumn.forEach((categoryItem, index) => {
|
|
30
|
-
const categoryElm = [...categoryElements];
|
|
31
|
-
let isActiveElement = false;
|
|
32
|
-
const categoryComponent = categoryElm.filter((element) => {
|
|
33
|
-
if (element.getAttribute('data-id') === categoryItem.id) {
|
|
34
|
-
if (categoryItem.elementId === element.getAttribute('id')) {
|
|
35
|
-
isActiveElement = true;
|
|
36
|
-
}
|
|
37
|
-
return true;
|
|
38
|
-
}
|
|
39
|
-
return false;
|
|
40
|
-
});
|
|
41
|
-
if (!isActiveElement) {
|
|
42
|
-
categoryItem.elementId = '';
|
|
43
|
-
categoryItem.height = 0;
|
|
44
|
-
}
|
|
45
|
-
categoryComponent.forEach(categoryElement => {
|
|
46
|
-
const columnHeight = categoryItem?.height ?? 0;
|
|
47
|
-
const height = categoryElement.scrollHeight;
|
|
48
|
-
const elementId = categoryElement.getAttribute('id');
|
|
49
|
-
if (height > columnHeight ||
|
|
50
|
-
(categoryItem.elementId === elementId && height !== columnHeight)) {
|
|
51
|
-
isHeightChanged = true;
|
|
52
|
-
categoriesColumn[index].height = height;
|
|
53
|
-
if (elementId)
|
|
54
|
-
categoriesColumn[index].elementId = elementId;
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
if (isHeightChanged) {
|
|
59
|
-
isHeightChanged = false;
|
|
60
|
-
setcategoriesState(categoriesColumn);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
const lifeCycleContext = useMemo(() => ({
|
|
65
|
-
selectedItemId,
|
|
66
|
-
readOnly
|
|
67
|
-
}), [selectedItemId, readOnly]);
|
|
68
|
-
return (_jsx(Flex, { container: { gap: 2 }, ref: ref, children: _jsxs(LifeCycleContext.Provider, { value: lifeCycleContext, children: [_jsxs(Flex, { ref: lifeCycleEl, container: true, "aria-label": t('stage'), children: [items.map((stageItem, index, stageArray) => {
|
|
69
|
-
const listId = stageItem.id;
|
|
70
|
-
return (_createElement(LifeCycleList, { ...restProps, key: listId, id: listId, item: stageItem, isFirstItem: index === 0, isLastItem: index === stageArray.length - 1, ref: setRef, stage: stage, prevStageVariant: stageArray[index - 1]?.type, categories: categoriesState }));
|
|
71
|
-
}), !readOnly && (_jsx(StyledAddButton, { variant: 'simple', label: t('add_stage'), icon: true, onClick: onAddStage, children: _jsx(Icon, { name: 'plus' }) }))] }), alternateItems.length !== 0 && (_jsxs(Flex, { container: true, ref: lifeCycleEl, "aria-label": t('alternate_stage'), children: [alternateItems.map((stageItem, index, stageArray) => {
|
|
72
|
-
const listId = stageItem.id;
|
|
73
|
-
return (_createElement(LifeCycleList, { ...restProps, key: listId, id: listId, item: stageItem, isFirstItem: index === 0, isLastItem: index === stageArray.length - 1, ref: setRef, categories: categoriesState, stageVariant: 'alternate', prevStageVariant: stageArray[index - 1]?.type, stage: alternateStage }));
|
|
74
|
-
}), !readOnly && (_jsx(StyledAddButton, { variant: 'simple', label: t('add_alternate_stage'), icon: true, onClick: onAddAlternateStage, children: _jsx(Icon, { name: 'plus' }) }))] }))] }) }));
|
|
75
|
-
});
|
|
76
|
-
export default LifeCycle;
|
|
77
|
-
//# sourceMappingURL=LifeCycle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LifeCycle.js","sourceRoot":"","sources":["../../../src/components/LifeCycle/LifeCycle.tsx"],"names":[],"mappings":";;AAAA,OAAO,EACL,UAAU,EAGV,eAAe,EACf,OAAO,EACP,MAAM,EACN,QAAQ,EACT,MAAM,OAAO,CAAC;AACf,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,gBAAgB,EAEhB,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,OAAO,EACR,MAAM,yBAAyB,CAAC;AAEjC,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,OAAO,gBAA2C,MAAM,oBAAoB,CAAC;AAE7E,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACnD,OAAO,GAAG,CAAA;;+BAEmB,KAAK,CAAC,IAAI,CAAC,OAAO;GAC9C,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEhD,MAAM,SAAS,GAAqD,UAAU,CAAC,SAAS,SAAS,CAC/F,EACE,KAAK,EACL,UAAU,EACV,cAAc,GAAG,EAAE,EACnB,UAAU,EACV,mBAAmB,EACnB,KAAK,EACL,cAAc,EACd,cAAc,EACd,QAAQ,EACR,GAAG,SAAS,EACoB,EAClC,GAA0B;IAE1B,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IACjC,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IACpB,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC;IACnE,MAAM,gBAAgB,GAAkB,EAAE,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,CACR,IACyB,GACvB,CACR,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC","sourcesContent":["import {\n forwardRef,\n FunctionComponent,\n PropsWithoutRef,\n useLayoutEffect,\n useMemo,\n useRef,\n useState\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n defaultThemeProp,\n ForwardProps,\n Flex,\n Button,\n Icon,\n useI18n\n} from '@pega/cosmos-react-core';\n\nimport LifeCycleList from './LifeCycleList';\nimport { StageItemProps, LifeCycleProps } from './LifeCycle.types';\nimport LifeCycleContext, { LifeCycleContextValue } from './LifeCycleContext';\n\nconst StyledAddButton = styled(Button)(({ theme }) => {\n return css`\n align-self: flex-start;\n margin-block-start: calc(${theme.base.spacing} / 2);\n `;\n});\n\nStyledAddButton.defaultProps = defaultThemeProp;\n\nconst LifeCycle: FunctionComponent<LifeCycleProps & ForwardProps> = forwardRef(function LifeCycle(\n {\n items,\n categories,\n alternateItems = [],\n onAddStage,\n onAddAlternateStage,\n stage,\n alternateStage,\n selectedItemId,\n readOnly,\n ...restProps\n }: PropsWithoutRef<LifeCycleProps>,\n ref: LifeCycleProps['ref']\n) {\n const lifeCycleEl = useRef(null);\n const t = useI18n();\n const [categoriesState, setcategoriesState] = useState(categories);\n const categoryElements: HTMLElement[] = [];\n const setRef = (element: HTMLOListElement) => {\n if (element) {\n categoryElements.push(element);\n }\n };\n\n useLayoutEffect(() => {\n let isHeightChanged = false;\n const categoriesColumn = [...categories];\n if (categoriesColumn && categoriesColumn.length > 0) {\n categoriesColumn.forEach((categoryItem, index) => {\n const categoryElm = [...categoryElements];\n let isActiveElement = false;\n const categoryComponent = categoryElm.filter((element: HTMLElement) => {\n if (element.getAttribute('data-id') === categoryItem.id) {\n if (categoryItem.elementId === element.getAttribute('id')) {\n isActiveElement = true;\n }\n return true;\n }\n return false;\n });\n if (!isActiveElement) {\n categoryItem.elementId = '';\n categoryItem.height = 0;\n }\n categoryComponent.forEach(categoryElement => {\n const columnHeight = categoryItem?.height ?? 0;\n const height = categoryElement.scrollHeight;\n const elementId = categoryElement.getAttribute('id');\n if (\n height > columnHeight ||\n (categoryItem.elementId === elementId && height !== columnHeight)\n ) {\n isHeightChanged = true;\n categoriesColumn[index].height = height;\n if (elementId) categoriesColumn[index].elementId = elementId;\n }\n });\n });\n if (isHeightChanged) {\n isHeightChanged = false;\n setcategoriesState(categoriesColumn);\n }\n }\n });\n\n const lifeCycleContext: LifeCycleContextValue = useMemo(\n () => ({\n selectedItemId,\n readOnly\n }),\n [selectedItemId, readOnly]\n );\n\n return (\n <Flex container={{ gap: 2 }} ref={ref}>\n <LifeCycleContext.Provider value={lifeCycleContext}>\n <Flex ref={lifeCycleEl} container aria-label={t('stage')}>\n {items.map((stageItem: StageItemProps, index: number, stageArray: StageItemProps[]) => {\n const listId = stageItem.id;\n return (\n <LifeCycleList\n {...restProps}\n key={listId}\n id={listId}\n item={stageItem}\n isFirstItem={index === 0}\n isLastItem={index === stageArray.length - 1}\n ref={setRef}\n stage={stage}\n prevStageVariant={stageArray[index - 1]?.type}\n categories={categoriesState}\n />\n );\n })}\n {!readOnly && (\n <StyledAddButton variant='simple' label={t('add_stage')} icon onClick={onAddStage}>\n <Icon name='plus' />\n </StyledAddButton>\n )}\n </Flex>\n {alternateItems.length !== 0 && (\n <Flex container ref={lifeCycleEl} aria-label={t('alternate_stage')}>\n {alternateItems.map(\n (stageItem: StageItemProps, index: number, stageArray: StageItemProps[]) => {\n const listId = stageItem.id;\n return (\n <LifeCycleList\n {...restProps}\n key={listId}\n id={listId}\n item={stageItem}\n isFirstItem={index === 0}\n isLastItem={index === stageArray.length - 1}\n ref={setRef}\n categories={categoriesState}\n stageVariant='alternate'\n prevStageVariant={stageArray[index - 1]?.type}\n stage={alternateStage}\n />\n );\n }\n )}\n {!readOnly && (\n <StyledAddButton\n variant='simple'\n label={t('add_alternate_stage')}\n icon\n onClick={onAddAlternateStage}\n >\n <Icon name='plus' />\n </StyledAddButton>\n )}\n </Flex>\n )}\n </LifeCycleContext.Provider>\n </Flex>\n );\n});\n\nexport default LifeCycle;\n"]}
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
import { MouseEvent, Ref } from 'react';
|
|
2
|
-
import { Action, StatusProps, NoChildrenProp, BaseProps, FormControlProps } from '@pega/cosmos-react-core';
|
|
3
|
-
import { ColorName } from '../../utils';
|
|
4
|
-
import { LibraryItem } from '../ItemLibrary';
|
|
5
|
-
export type StageType = 'start' | 'default' | 'default-wait' | 'resolution' | 'alternate' | 'alternate-wait';
|
|
6
|
-
export interface StepItemProps {
|
|
7
|
-
id: string;
|
|
8
|
-
label: string;
|
|
9
|
-
visual: {
|
|
10
|
-
color: ColorName;
|
|
11
|
-
icon: string;
|
|
12
|
-
label: string;
|
|
13
|
-
imgurl: string;
|
|
14
|
-
};
|
|
15
|
-
status: {
|
|
16
|
-
type?: StatusProps['variant'] | '';
|
|
17
|
-
label: string;
|
|
18
|
-
};
|
|
19
|
-
error: string;
|
|
20
|
-
}
|
|
21
|
-
export interface TaskItemProps {
|
|
22
|
-
id: string;
|
|
23
|
-
label: string;
|
|
24
|
-
visual: {
|
|
25
|
-
imgurl: string;
|
|
26
|
-
};
|
|
27
|
-
error: string;
|
|
28
|
-
steps: StepItemProps[];
|
|
29
|
-
}
|
|
30
|
-
export interface StageItemProps {
|
|
31
|
-
/** Data model should have id of the stage item */
|
|
32
|
-
id: string;
|
|
33
|
-
/** Data model should have the stage label */
|
|
34
|
-
label: string;
|
|
35
|
-
/** Data model should have the categoryData array */
|
|
36
|
-
categories: CategoryItemProps[];
|
|
37
|
-
/** Data model should have the stageType as below */
|
|
38
|
-
type: StageType;
|
|
39
|
-
error: string;
|
|
40
|
-
}
|
|
41
|
-
export interface CategoryItemProps {
|
|
42
|
-
/** Data model should have id of the stage item */
|
|
43
|
-
id: string;
|
|
44
|
-
/** id to map with category items */
|
|
45
|
-
categoryId: string;
|
|
46
|
-
/** Data model should have the categoryData array */
|
|
47
|
-
tasks: TaskItemProps[] | TaskItemProps[][];
|
|
48
|
-
}
|
|
49
|
-
export interface CategoriesItemProps {
|
|
50
|
-
label: string;
|
|
51
|
-
id: string;
|
|
52
|
-
}
|
|
53
|
-
export interface StageProps extends Omit<FormControlProps, 'status' | 'id'> {
|
|
54
|
-
/** Pass an array of Action objects to append button(s) inline with the Input. */
|
|
55
|
-
actions?: Record<StageType, LifeCycleAction[]> | LifeCycleAction[];
|
|
56
|
-
/** Callback for Add stage */
|
|
57
|
-
onAddStage?: () => void;
|
|
58
|
-
/** Callback for Adding alternate stage */
|
|
59
|
-
onAddAlternateStage?: () => void;
|
|
60
|
-
/** callback for Click of stage */
|
|
61
|
-
onClick?: (param: LifeCycleActionParam, e: MouseEvent) => void;
|
|
62
|
-
}
|
|
63
|
-
export interface CategoriesProps extends CategoriesItemProps {
|
|
64
|
-
/** height property used to manipulate height of catergory dom */
|
|
65
|
-
height?: number;
|
|
66
|
-
elementId?: string;
|
|
67
|
-
}
|
|
68
|
-
export interface CategoryProps extends BaseProps, NoChildrenProp {
|
|
69
|
-
ref?: Ref<HTMLOListElement>;
|
|
70
|
-
/** Pass the category items */
|
|
71
|
-
item: CategoryItemProps;
|
|
72
|
-
/** Enable the title for categories */
|
|
73
|
-
showTitle?: boolean;
|
|
74
|
-
/** Props of the categoryColumn */
|
|
75
|
-
category?: CategoriesProps;
|
|
76
|
-
/** Task component prop */
|
|
77
|
-
task: TaskProps;
|
|
78
|
-
/** Stage data - to be passed in callbacks */
|
|
79
|
-
stageItem: StageItemProps;
|
|
80
|
-
/** Id for the component */
|
|
81
|
-
id: string;
|
|
82
|
-
}
|
|
83
|
-
export interface TaskProps extends Omit<FormControlProps, 'status' | 'id'> {
|
|
84
|
-
/** Pass an array of Action objects to append button(s) inline with the Input. */
|
|
85
|
-
actions?: LifeCycleAction[];
|
|
86
|
-
/** Tooltip for adding items to the task component */
|
|
87
|
-
addStepTitle: string;
|
|
88
|
-
/** Region for adding the task component */
|
|
89
|
-
addTask: {
|
|
90
|
-
title: string;
|
|
91
|
-
showOnce: boolean;
|
|
92
|
-
onAddTask?: LifeCycleAction['onClick'];
|
|
93
|
-
};
|
|
94
|
-
onAddStep?: (param: LifeCycleActionParam, selectedItem: LibraryItem) => void;
|
|
95
|
-
/** callback for Click of a task */
|
|
96
|
-
onClick?: (param: LifeCycleActionParam, e: MouseEvent) => void;
|
|
97
|
-
/** Types of Nodes */
|
|
98
|
-
nodeLibrary: LibraryItem[];
|
|
99
|
-
}
|
|
100
|
-
export interface StepProps extends Omit<FormControlProps, 'status' | 'id'> {
|
|
101
|
-
/** Pass an array of Action objects to append button(s) inline with the Input. */
|
|
102
|
-
actions?: LifeCycleAction[];
|
|
103
|
-
/** callback for Click of a step */
|
|
104
|
-
onClick?: (param: LifeCycleActionParam, e: MouseEvent) => void;
|
|
105
|
-
}
|
|
106
|
-
export interface LifeCycleActionParam {
|
|
107
|
-
value?: string;
|
|
108
|
-
stage?: StageItemProps;
|
|
109
|
-
task?: TaskItemProps;
|
|
110
|
-
category?: CategoryItemProps;
|
|
111
|
-
step?: StepItemProps;
|
|
112
|
-
type?: 'Stage' | 'Step' | 'Task' | 'Alternate Stage';
|
|
113
|
-
routeTo?: string;
|
|
114
|
-
}
|
|
115
|
-
export interface LifeCycleAction extends Omit<Action, 'onClick'> {
|
|
116
|
-
onClick: (param: LifeCycleActionParam, e: MouseEvent<HTMLButtonElement | HTMLAnchorElement | HTMLInputElement>) => void;
|
|
117
|
-
}
|
|
118
|
-
export interface LifeCycleProps extends BaseProps, NoChildrenProp {
|
|
119
|
-
/** Pass reference to the LifeCycleComponent */
|
|
120
|
-
ref?: Ref<HTMLDivElement>;
|
|
121
|
-
/** Array of stages and its contents */
|
|
122
|
-
items: StageItemProps[];
|
|
123
|
-
/** Array of alternate stages and its contents */
|
|
124
|
-
alternateItems?: StageItemProps[];
|
|
125
|
-
/** Props for the task component */
|
|
126
|
-
task: TaskProps[];
|
|
127
|
-
/** Props for the Stage component */
|
|
128
|
-
stage: StageProps;
|
|
129
|
-
/** Props for the AlternatStage component */
|
|
130
|
-
alternateStage: StageProps;
|
|
131
|
-
/** Props for the Cluster component */
|
|
132
|
-
categories: CategoriesProps[];
|
|
133
|
-
/** Props for the Step component */
|
|
134
|
-
step: StepProps[];
|
|
135
|
-
/** Call back function for on AddState */
|
|
136
|
-
onAddStage: () => void;
|
|
137
|
-
/** Call back function to add alternate stages */
|
|
138
|
-
onAddAlternateStage: () => void;
|
|
139
|
-
/** Selected stage or task or step */
|
|
140
|
-
selectedItemId?: string;
|
|
141
|
-
/** makes component read-only */
|
|
142
|
-
readOnly?: boolean;
|
|
143
|
-
}
|
|
144
|
-
export interface StageInfo {
|
|
145
|
-
id: StageType;
|
|
146
|
-
visual: {
|
|
147
|
-
bgColor: string;
|
|
148
|
-
bgHover: string;
|
|
149
|
-
tailPointed?: boolean;
|
|
150
|
-
headPointed?: boolean;
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
export declare const getStageInfo: (currentType: StageType, prevType: StageType | null, isLastItem: boolean | undefined) => StageInfo;
|
|
154
|
-
//# sourceMappingURL=LifeCycle.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LifeCycle.types.d.ts","sourceRoot":"","sources":["../../../src/components/LifeCycle/LifeCycle.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,EACL,MAAM,EACN,WAAW,EAEX,cAAc,EACd,SAAS,EACT,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,MAAM,SAAS,GACjB,OAAO,GACP,SAAS,GACT,cAAc,GACd,YAAY,GACZ,WAAW,GACX,gBAAgB,CAAC;AAErB,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,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,CAAC;IAClB,oCAAoC;IACpC,KAAK,EAAE,UAAU,CAAC;IAClB,4CAA4C;IAC5C,cAAc,EAAE,UAAU,CAAC;IAC3B,sCAAsC;IACtC,UAAU,EAAE,eAAe,EAAE,CAAC;IAC9B,mCAAmC;IACnC,IAAI,EAAE,SAAS,EAAE,CAAC;IAClB,yCAAyC;IACzC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,iDAAiD;IACjD,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,qCAAqC;IACrC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,SAAS,CAAC;IACd,MAAM,EAAE;QACN,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,WAAW,CAAC,EAAE,OAAO,CAAC;KACvB,CAAC;CACH;AA6DD,eAAO,MAAM,YAAY,gBACV,SAAS,YACZ,SAAS,GAAG,IAAI,cACd,OAAO,GAAG,SAAS,cAoBhC,CAAC"}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { WorkTheme as Theme } from '@pega/cosmos-react-core';
|
|
2
|
-
const StageTypeDefaults = {
|
|
3
|
-
start: {
|
|
4
|
-
id: 'start',
|
|
5
|
-
visual: {
|
|
6
|
-
bgColor: Theme.base.colors.blue.dark,
|
|
7
|
-
bgHover: Theme.base.colors.blue.medium,
|
|
8
|
-
tailPointed: false,
|
|
9
|
-
headPointed: true
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
default: {
|
|
13
|
-
id: 'default',
|
|
14
|
-
visual: {
|
|
15
|
-
bgColor: Theme.base.colors.blue.medium,
|
|
16
|
-
bgHover: Theme.base.colors.blue.light,
|
|
17
|
-
tailPointed: true,
|
|
18
|
-
headPointed: true
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
'default-wait': {
|
|
22
|
-
id: 'default-wait',
|
|
23
|
-
visual: {
|
|
24
|
-
bgColor: Theme.base.colors.blue.medium,
|
|
25
|
-
bgHover: Theme.base.colors.blue.light,
|
|
26
|
-
tailPointed: true,
|
|
27
|
-
headPointed: false
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
resolution: {
|
|
31
|
-
id: 'resolution',
|
|
32
|
-
visual: {
|
|
33
|
-
bgColor: Theme.base.colors.green.medium,
|
|
34
|
-
bgHover: Theme.base.colors.green.light,
|
|
35
|
-
tailPointed: true,
|
|
36
|
-
headPointed: false
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
alternate: {
|
|
40
|
-
id: 'alternate',
|
|
41
|
-
visual: {
|
|
42
|
-
bgColor: Theme.base.colors.red.dark,
|
|
43
|
-
bgHover: Theme.base.colors.red.medium,
|
|
44
|
-
tailPointed: false,
|
|
45
|
-
headPointed: false
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
'alternate-wait': {
|
|
49
|
-
id: 'alternate-wait',
|
|
50
|
-
visual: {
|
|
51
|
-
bgColor: Theme.base.colors.red.dark,
|
|
52
|
-
bgHover: Theme.base.colors.red.medium,
|
|
53
|
-
tailPointed: false,
|
|
54
|
-
headPointed: false
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
// calculates the final stage info based on prev type and returns the final stage info
|
|
59
|
-
// second param is mandatory for accurate results, optional only for the first stage
|
|
60
|
-
export const getStageInfo = (currentType, prevType, isLastItem) => {
|
|
61
|
-
const currentStageInfo = StageTypeDefaults[currentType] || StageTypeDefaults.default;
|
|
62
|
-
// cloning, to avoid getting modified
|
|
63
|
-
const result = {
|
|
64
|
-
...currentStageInfo,
|
|
65
|
-
visual: {
|
|
66
|
-
...currentStageInfo.visual
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
if (prevType) {
|
|
70
|
-
const prevStageInfo = StageTypeDefaults[prevType] || StageTypeDefaults.start;
|
|
71
|
-
result.visual.tailPointed =
|
|
72
|
-
currentStageInfo.visual.tailPointed && prevStageInfo.visual.headPointed;
|
|
73
|
-
}
|
|
74
|
-
if (isLastItem) {
|
|
75
|
-
result.visual.headPointed = false;
|
|
76
|
-
}
|
|
77
|
-
return result;
|
|
78
|
-
};
|
|
79
|
-
//# sourceMappingURL=LifeCycle.types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LifeCycle.types.js","sourceRoot":"","sources":["../../../src/components/LifeCycle/LifeCycle.types.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,SAAS,IAAI,KAAK,EAInB,MAAM,yBAAyB,CAAC;AA8KjC,MAAM,iBAAiB,GAAiC;IACtD,KAAK,EAAE;QACL,EAAE,EAAE,OAAO;QACX,MAAM,EAAE;YACN,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI;YACpC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM;YACtC,WAAW,EAAE,KAAK;YAClB,WAAW,EAAE,IAAI;SAClB;KACF;IACD,OAAO,EAAE;QACP,EAAE,EAAE,SAAS;QACb,MAAM,EAAE;YACN,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM;YACtC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK;YACrC,WAAW,EAAE,IAAI;YACjB,WAAW,EAAE,IAAI;SAClB;KACF;IACD,cAAc,EAAE;QACd,EAAE,EAAE,cAAc;QAClB,MAAM,EAAE;YACN,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM;YACtC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK;YACrC,WAAW,EAAE,IAAI;YACjB,WAAW,EAAE,KAA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AAC,KAAK,CAAC;QAC7E,MAAM,CAAC,MAAM,CAAC,WAAW;YACvB,gBAAgB,CAAC,MAAM,CAAC,WAAW,IAAI,aAAa,CAAC,MAAM,CAAC,WAAW,CAAC;KAC3E;IACD,IAAI,UAAU,EAAE;QACd,MAAM,CAAC,MAAM,CAAC,WAAW,GAAG,KAAK,CAAC;KACnC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC","sourcesContent":["import { MouseEvent, Ref } from 'react';\n\nimport {\n Action,\n StatusProps,\n WorkTheme as Theme,\n NoChildrenProp,\n BaseProps,\n FormControlProps\n} from '@pega/cosmos-react-core';\n\nimport { ColorName } from '../../utils';\nimport { LibraryItem } from '../ItemLibrary';\n\nexport type StageType =\n | 'start'\n | 'default'\n | 'default-wait'\n | 'resolution'\n | 'alternate'\n | 'alternate-wait';\n\nexport interface StepItemProps {\n id: string;\n label: string;\n visual: {\n color: ColorName;\n icon: string;\n label: string;\n imgurl: string;\n };\n status: { type?: StatusProps['variant'] | ''; label: string };\n error: string;\n}\n\nexport interface TaskItemProps {\n id: string;\n label: string;\n visual: {\n imgurl: string;\n };\n error: string;\n steps: StepItemProps[];\n}\n\nexport interface StageItemProps {\n /** Data model should have id of the stage item */\n id: string;\n /** Data model should have the stage label */\n label: string;\n /** Data model should have the categoryData array */\n categories: CategoryItemProps[];\n /** Data model should have the stageType as below */\n type: StageType;\n error: string;\n}\n\nexport interface CategoryItemProps {\n /** Data model should have id of the stage item */\n id: string;\n /** id to map with category items */\n categoryId: string;\n /** Data model should have the categoryData array */\n tasks: TaskItemProps[] | TaskItemProps[][];\n}\n\nexport interface CategoriesItemProps {\n label: string;\n id: string;\n}\n\nexport interface StageProps extends Omit<FormControlProps, 'status' | 'id'> {\n /** Pass an array of Action objects to append button(s) inline with the Input. */\n actions?: Record<StageType, LifeCycleAction[]> | LifeCycleAction[];\n /** Callback for Add stage */\n onAddStage?: () => void;\n /** Callback for Adding alternate stage */\n onAddAlternateStage?: () => void;\n /** callback for Click of stage */\n onClick?: (param: LifeCycleActionParam, e: MouseEvent) => void;\n}\n\nexport interface CategoriesProps extends CategoriesItemProps {\n /** height property used to manipulate height of catergory dom */\n height?: number;\n elementId?: string;\n}\n\nexport interface CategoryProps extends BaseProps, NoChildrenProp {\n ref?: Ref<HTMLOListElement>;\n /** Pass the category items */\n item: CategoryItemProps;\n /** Enable the title for categories */\n showTitle?: boolean;\n /** Props of the categoryColumn */\n category?: CategoriesProps;\n /** Task component prop */\n task: TaskProps;\n /** Stage data - to be passed in callbacks */\n stageItem: StageItemProps;\n /** Id for the component */\n id: string;\n}\n\nexport interface TaskProps extends Omit<FormControlProps, 'status' | 'id'> {\n /** Pass an array of Action objects to append button(s) inline with the Input. */\n actions?: LifeCycleAction[];\n /** Tooltip for adding items to the task component */\n addStepTitle: string;\n /** Region for adding the task component */\n addTask: {\n title: string;\n showOnce: boolean;\n onAddTask?: LifeCycleAction['onClick'];\n };\n onAddStep?: (param: LifeCycleActionParam, selectedItem: LibraryItem) => void;\n /** callback for Click of a task */\n onClick?: (param: LifeCycleActionParam, e: MouseEvent) => void;\n /** Types of Nodes */\n nodeLibrary: LibraryItem[];\n}\n\nexport interface StepProps extends Omit<FormControlProps, 'status' | 'id'> {\n /** Pass an array of Action objects to append button(s) inline with the Input. */\n actions?: LifeCycleAction[];\n /** callback for Click of a step */\n onClick?: (param: LifeCycleActionParam, e: MouseEvent) => void;\n}\n\nexport interface LifeCycleActionParam {\n value?: string;\n stage?: StageItemProps;\n task?: TaskItemProps;\n category?: CategoryItemProps;\n step?: StepItemProps;\n type?: 'Stage' | 'Step' | 'Task' | 'Alternate Stage';\n routeTo?: string;\n}\n\nexport interface LifeCycleAction extends Omit<Action, 'onClick'> {\n onClick: (\n param: LifeCycleActionParam,\n e: MouseEvent<HTMLButtonElement | HTMLAnchorElement | HTMLInputElement>\n ) => void;\n}\n\nexport interface LifeCycleProps extends BaseProps, NoChildrenProp {\n /** Pass reference to the LifeCycleComponent */\n ref?: Ref<HTMLDivElement>;\n /** Array of stages and its contents */\n items: StageItemProps[];\n /** Array of alternate stages and its contents */\n alternateItems?: StageItemProps[];\n /** Props for the task component */\n task: TaskProps[];\n /** Props for the Stage component */\n stage: StageProps;\n /** Props for the AlternatStage component */\n alternateStage: StageProps;\n /** Props for the Cluster component */\n categories: CategoriesProps[];\n /** Props for the Step component */\n step: StepProps[];\n /** Call back function for on AddState */\n onAddStage: () => void;\n /** Call back function to add alternate stages */\n onAddAlternateStage: () => void;\n /** Selected stage or task or step */\n selectedItemId?: string;\n /** makes component read-only */\n readOnly?: boolean;\n}\n\nexport interface StageInfo {\n id: StageType;\n visual: {\n bgColor: string;\n bgHover: string;\n tailPointed?: boolean;\n headPointed?: boolean;\n };\n}\n\nconst StageTypeDefaults: Record<StageType, StageInfo> = {\n start: {\n id: 'start',\n visual: {\n bgColor: Theme.base.colors.blue.dark,\n bgHover: Theme.base.colors.blue.medium,\n tailPointed: false,\n headPointed: true\n }\n },\n default: {\n id: 'default',\n visual: {\n bgColor: Theme.base.colors.blue.medium,\n bgHover: Theme.base.colors.blue.light,\n tailPointed: true,\n headPointed: true\n }\n },\n 'default-wait': {\n id: 'default-wait',\n visual: {\n bgColor: Theme.base.colors.blue.medium,\n bgHover: Theme.base.colors.blue.light,\n tailPointed: true,\n headPointed: false\n }\n },\n resolution: {\n id: 'resolution',\n visual: {\n bgColor: Theme.base.colors.green.medium,\n bgHover: Theme.base.colors.green.light,\n tailPointed: true,\n headPointed: false\n }\n },\n alternate: {\n id: 'alternate',\n visual: {\n bgColor: Theme.base.colors.red.dark,\n bgHover: Theme.base.colors.red.medium,\n tailPointed: false,\n headPointed: false\n }\n },\n 'alternate-wait': {\n id: 'alternate-wait',\n visual: {\n bgColor: Theme.base.colors.red.dark,\n bgHover: Theme.base.colors.red.medium,\n tailPointed: false,\n headPointed: false\n }\n }\n};\n\n// calculates the final stage info based on prev type and returns the final stage info\n// second param is mandatory for accurate results, optional only for the first stage\nexport const getStageInfo = (\n currentType: StageType,\n prevType: StageType | null,\n isLastItem: boolean | undefined\n) => {\n const currentStageInfo = StageTypeDefaults[currentType] || StageTypeDefaults.default;\n // cloning, to avoid getting modified\n const result: StageInfo = {\n ...currentStageInfo,\n visual: {\n ...currentStageInfo.visual\n }\n };\n\n if (prevType) {\n const prevStageInfo = StageTypeDefaults[prevType] || StageTypeDefaults.start;\n result.visual.tailPointed =\n currentStageInfo.visual.tailPointed && prevStageInfo.visual.headPointed;\n }\n if (isLastItem) {\n result.visual.headPointed = false;\n }\n return result;\n};\n"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { LifeCycleProps } from './LifeCycle.types';
|
|
3
|
-
export interface LifeCycleContextValue {
|
|
4
|
-
selectedItemId: LifeCycleProps['selectedItemId'];
|
|
5
|
-
readOnly: LifeCycleProps['readOnly'];
|
|
6
|
-
}
|
|
7
|
-
declare const LifeCycleContext: import("react").Context<LifeCycleContextValue>;
|
|
8
|
-
export default LifeCycleContext;
|
|
9
|
-
//# sourceMappingURL=LifeCycleContext.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LifeCycleContext.d.ts","sourceRoot":"","sources":["../../../src/components/LifeCycle/LifeCycleContext.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,WAAW,qBAAqB;IACpC,cAAc,EAAE,cAAc,CAAC,gBAAgB,CAAC,CAAC;IACjD,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;CACtC;AAED,QAAA,MAAM,gBAAgB,gDAGpB,CAAC;AAEH,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LifeCycleContext.js","sourceRoot":"","sources":["../../../src/components/LifeCycle/LifeCycleContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAStC,MAAM,gBAAgB,GAAG,aAAa,CAAwB;IAC5D,cAAc,EAAE,SAAS;IACzB,QAAQ,EAAE,KAAK;CAChB,CAAC,CAAC;AAEH,eAAe,gBAAgB,CAAC","sourcesContent":["import { createContext } from 'react';\n\nimport { LifeCycleProps } from './LifeCycle.types';\n\nexport interface LifeCycleContextValue {\n selectedItemId: LifeCycleProps['selectedItemId'];\n readOnly: LifeCycleProps['readOnly'];\n}\n\nconst LifeCycleContext = createContext<LifeCycleContextValue>({\n selectedItemId: undefined,\n readOnly: false\n});\n\nexport default LifeCycleContext;\n"]}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent, Ref } from 'react';
|
|
2
|
-
import { NoChildrenProp } from '@pega/cosmos-react-core';
|
|
3
|
-
import { StageItemProps, TaskProps, StepProps, CategoriesProps, StageType, StageProps } from './LifeCycle.types';
|
|
4
|
-
export interface LifeCycleListProps extends NoChildrenProp {
|
|
5
|
-
/** Pass reference to the LifeCycleComponent */
|
|
6
|
-
ref?: Ref<HTMLOListElement>;
|
|
7
|
-
/** Array of categories column props */
|
|
8
|
-
categories: CategoriesProps[];
|
|
9
|
-
/** Array of Task props */
|
|
10
|
-
task: TaskProps[];
|
|
11
|
-
/** Array of Step props */
|
|
12
|
-
stage?: StageProps;
|
|
13
|
-
/** Array of Stage props */
|
|
14
|
-
step?: StepProps[];
|
|
15
|
-
/** Data model should be have stages array */
|
|
16
|
-
item: StageItemProps;
|
|
17
|
-
/** Count of number of stages */
|
|
18
|
-
isFirstItem?: boolean;
|
|
19
|
-
/** Index of stages item */
|
|
20
|
-
isLastItem?: boolean;
|
|
21
|
-
/** type of stage */
|
|
22
|
-
stageVariant?: StageType;
|
|
23
|
-
/** type of previous stage */
|
|
24
|
-
prevStageVariant: StageType;
|
|
25
|
-
/** id for the list item */
|
|
26
|
-
id?: string;
|
|
27
|
-
}
|
|
28
|
-
declare const LifeCycleList: FunctionComponent<LifeCycleListProps>;
|
|
29
|
-
export default LifeCycleList;
|
|
30
|
-
//# sourceMappingURL=LifeCycleList.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LifeCycleList.d.ts","sourceRoot":"","sources":["../../../src/components/LifeCycle/LifeCycleList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAG3D,OAAO,EAAoB,cAAc,EAA2B,MAAM,yBAAyB,CAAC;AAEpG,OAAO,EACL,cAAc,EAEd,SAAS,EACT,SAAS,EAET,eAAe,EACf,SAAS,EACT,UAAU,EACX,MAAM,mBAAmB,CAAC;AAI3B,MAAM,WAAW,kBAAmB,SAAQ,cAAc;IACxD,+CAA+C;IAC/C,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAC5B,wCAAwC;IACxC,UAAU,EAAE,eAAe,EAAE,CAAC;IAC9B,0BAA0B;IAC1B,IAAI,EAAE,SAAS,EAAE,CAAC;IAClB,0BAA0B;IAC1B,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,2BAA2B;IAC3B,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC;IACnB,6CAA6C;IAC7C,IAAI,EAAE,cAAc,CAAC;IACrB,gCAAgC;IAChC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,2BAA2B;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oBAAoB;IACpB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,6BAA6B;IAC7B,gBAAgB,EAAE,SAAS,CAAC;IAC5B,2BAA2B;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAsBD,QAAA,MAAM,aAAa,EAAE,iBAAiB,CAAC,kBAAkB,CA6FvD,CAAC;AAEH,eAAe,aAAa,CAAC"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { createElement as _createElement } from "react";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef } from 'react';
|
|
4
|
-
import styled, { css } from 'styled-components';
|
|
5
|
-
import { defaultThemeProp, createUID, useDirection } from '@pega/cosmos-react-core';
|
|
6
|
-
import { getStageInfo } from './LifeCycle.types';
|
|
7
|
-
import Stage from './Stage';
|
|
8
|
-
import Category from './Category';
|
|
9
|
-
const StyledLifeCycleList = styled.li(({ theme, lastItem }) => {
|
|
10
|
-
const { rtl } = useDirection();
|
|
11
|
-
return css `
|
|
12
|
-
list-style-type: none;
|
|
13
|
-
padding: 0 ${theme.base.spacing} 0 0;
|
|
14
|
-
width: 15rem;
|
|
15
|
-
${lastItem &&
|
|
16
|
-
css `
|
|
17
|
-
padding: 0 calc(0.5 * ${theme.base.spacing}) 0 0;
|
|
18
|
-
`}
|
|
19
|
-
${lastItem &&
|
|
20
|
-
rtl &&
|
|
21
|
-
css `
|
|
22
|
-
padding: 0 ${theme.base.spacing} 0 calc(0.5 * ${theme.base.spacing});
|
|
23
|
-
`}
|
|
24
|
-
`;
|
|
25
|
-
});
|
|
26
|
-
StyledLifeCycleList.defaultProps = defaultThemeProp;
|
|
27
|
-
const LifeCycleList = forwardRef(function LifeCycleList({ item, isFirstItem, isLastItem, categories, stage: stageProps, task, step, prevStageVariant, stageVariant, id, ...restProps }, ref) {
|
|
28
|
-
const showTitle = isFirstItem || false;
|
|
29
|
-
let sortedCategory = [];
|
|
30
|
-
const listId = id || createUID();
|
|
31
|
-
// Function used to rearrange the category data depends on Categories order
|
|
32
|
-
const catgoryItem = (categoryData) => {
|
|
33
|
-
const sortedColumn = [];
|
|
34
|
-
if (categories && categories.length > 0 && categoryData.length > 0) {
|
|
35
|
-
categories.forEach(categoryColumnItem => {
|
|
36
|
-
categoryData.forEach((categoryItem) => {
|
|
37
|
-
if (categoryItem.categoryId === categoryColumnItem.id) {
|
|
38
|
-
sortedColumn.push(categoryItem);
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
return sortedColumn;
|
|
44
|
-
};
|
|
45
|
-
if (categories && categories.length !== 0) {
|
|
46
|
-
sortedCategory = catgoryItem(item.categories);
|
|
47
|
-
}
|
|
48
|
-
const stageInfo = getStageInfo(item.type, prevStageVariant, isLastItem);
|
|
49
|
-
return (_jsxs(StyledLifeCycleList, { lastItem: isLastItem, children: [_jsx(Stage, { value: item.label, stageInfo: stageInfo, item: item, error: item.error, id: item.id, ...stageProps }), sortedCategory.length !== 0 &&
|
|
50
|
-
sortedCategory.map((categoryItem, categoryindex) => {
|
|
51
|
-
const taskProps = task[categoryindex];
|
|
52
|
-
let stepProps;
|
|
53
|
-
if (step)
|
|
54
|
-
stepProps = step[categoryindex];
|
|
55
|
-
return (_createElement(Category, { ...restProps, key: categoryItem.categoryId, id: categoryItem.categoryId, ref: ref, category: categories[categoryindex], item: categoryItem, showTitle: showTitle, stageItem: item, task: taskProps, step: stepProps }));
|
|
56
|
-
}), sortedCategory.length === 0 &&
|
|
57
|
-
categories.length === 0 &&
|
|
58
|
-
item.categories.length > 0 &&
|
|
59
|
-
item.categories.map((categoryItem, categoryindex) => {
|
|
60
|
-
const taskProps = task[categoryindex];
|
|
61
|
-
let stepProps;
|
|
62
|
-
if (step)
|
|
63
|
-
stepProps = step[categoryindex];
|
|
64
|
-
return (_jsx(Category, { id: categoryItem.categoryId, ref: ref, item: categoryItem, stageItem: item, task: taskProps, step: stepProps, showTitle: showTitle }, categoryItem.categoryId));
|
|
65
|
-
})] }, listId));
|
|
66
|
-
});
|
|
67
|
-
export default LifeCycleList;
|
|
68
|
-
//# sourceMappingURL=LifeCycleList.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LifeCycleList.js","sourceRoot":"","sources":["../../../src/components/LifeCycle/LifeCycleList.tsx"],"names":[],"mappings":";;AAAA,OAAO,EAAE,UAAU,EAA0B,MAAM,OAAO,CAAC;AAC3D,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAA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AAQ,EAAE,UAAU,CAAC,aAAa,CAAC,EACnC,IAAI,EAAE,YAAY,EAClB,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,IAAI,EACf,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,SAAS,GACf,CACH,CAAC;gBACJ,CAAC,CAAC,EACH,cAAc,CAAC,MAAM,KAAK,CAAC;gBAC1B,UAAU,CAAC,MAAM,KAAK,CAAC;gBACvB,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC;gBAC1B,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,YAA+B,EAAE,aAAqB,EAAE,EAAE;oBAC7E,MAAM,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC;oBACtC,IAAI,SAAS,CAAC;oBACd,IAAI,IAAI;wBAAE,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC;oBAE1C,OAAO,CACL,KAAC,QAAQ,IAEP,EAAE,EAAE,YAAY,CAAC,UAAU,EAC3B,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,YAAY,EAClB,SAAS,EAAE,IAAI,EACf,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,SAAS,EACf,SAAS,EAAE,SAAS,IAPf,YAAY,CAAC,UAAU,CAQ5B,CACH,CAAC;gBACJ,CAAC,CAAC,KAjDoB,MAAM,CAkDV,CACvB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,aAAa,CAAC","sourcesContent":["import { forwardRef, FunctionComponent, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { defaultThemeProp, NoChildrenProp, createUID, useDirection } from '@pega/cosmos-react-core';\n\nimport {\n StageItemProps,\n CategoryItemProps,\n TaskProps,\n StepProps,\n getStageInfo,\n CategoriesProps,\n StageType,\n StageProps\n} from './LifeCycle.types';\nimport Stage from './Stage';\nimport Category from './Category';\n\nexport interface LifeCycleListProps extends NoChildrenProp {\n /** Pass reference to the LifeCycleComponent */\n ref?: Ref<HTMLOListElement>;\n /** Array of categories column props */\n categories: CategoriesProps[];\n /** Array of Task props */\n task: TaskProps[];\n /** Array of Step props */\n stage?: StageProps;\n /** Array of Stage props */\n step?: StepProps[];\n /** Data model should be have stages array */\n item: StageItemProps;\n /** Count of number of stages */\n isFirstItem?: boolean;\n /** Index of stages item */\n isLastItem?: boolean;\n /** type of stage */\n stageVariant?: StageType;\n /** type of previous stage */\n prevStageVariant: StageType;\n /** id for the list item */\n id?: string;\n}\n\nconst StyledLifeCycleList = styled.li<{ lastItem: boolean | undefined }>(({ theme, lastItem }) => {\n const { rtl } = useDirection();\n return css`\n list-style-type: none;\n padding: 0 ${theme.base.spacing} 0 0;\n width: 15rem;\n ${lastItem &&\n css`\n padding: 0 calc(0.5 * ${theme.base.spacing}) 0 0;\n `}\n ${lastItem &&\n rtl &&\n css`\n padding: 0 ${theme.base.spacing} 0 calc(0.5 * ${theme.base.spacing});\n `}\n `;\n});\n\nStyledLifeCycleList.defaultProps = defaultThemeProp;\n\nconst LifeCycleList: FunctionComponent<LifeCycleListProps> = forwardRef(function LifeCycleList(\n {\n item,\n isFirstItem,\n isLastItem,\n categories,\n stage: stageProps,\n task,\n step,\n prevStageVariant,\n stageVariant,\n id,\n ...restProps\n }: LifeCycleListProps,\n ref: LifeCycleListProps['ref']\n) {\n const showTitle = isFirstItem || false;\n let sortedCategory: CategoryItemProps[] = [];\n const listId = id || createUID();\n\n // Function used to rearrange the category data depends on Categories order\n const catgoryItem = (categoryData: CategoryItemProps[]) => {\n const sortedColumn: CategoryItemProps[] = [];\n if (categories && categories.length > 0 && categoryData.length > 0) {\n categories.forEach(categoryColumnItem => {\n categoryData.forEach((categoryItem: CategoryItemProps) => {\n if (categoryItem.categoryId === categoryColumnItem.id) {\n sortedColumn.push(categoryItem);\n }\n });\n });\n }\n return sortedColumn;\n };\n\n if (categories && categories.length !== 0) {\n sortedCategory = catgoryItem(item.categories);\n }\n\n const stageInfo = getStageInfo(item.type, prevStageVariant, isLastItem);\n return (\n <StyledLifeCycleList key={listId} lastItem={isLastItem}>\n <Stage\n value={item.label}\n stageInfo={stageInfo}\n item={item}\n error={item.error}\n id={item.id}\n {...stageProps}\n />\n {sortedCategory.length !== 0 &&\n sortedCategory.map((categoryItem: CategoryItemProps, categoryindex: number) => {\n const taskProps = task[categoryindex];\n let stepProps;\n if (step) stepProps = step[categoryindex];\n return (\n <Category\n {...restProps}\n key={categoryItem.categoryId}\n id={categoryItem.categoryId}\n ref={ref}\n category={categories[categoryindex]}\n item={categoryItem}\n showTitle={showTitle}\n stageItem={item}\n task={taskProps}\n step={stepProps}\n />\n );\n })}\n {sortedCategory.length === 0 &&\n categories.length === 0 &&\n item.categories.length > 0 &&\n item.categories.map((categoryItem: CategoryItemProps, categoryindex: number) => {\n const taskProps = task[categoryindex];\n let stepProps;\n if (step) stepProps = step[categoryindex];\n\n return (\n <Category\n key={categoryItem.categoryId}\n id={categoryItem.categoryId}\n ref={ref}\n item={categoryItem}\n stageItem={item}\n task={taskProps}\n step={stepProps}\n showTitle={showTitle}\n />\n );\n })}\n </StyledLifeCycleList>\n );\n});\n\nexport default LifeCycleList;\n"]}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent, Ref } from 'react';
|
|
2
|
-
import { BaseProps, ForwardProps } from '@pega/cosmos-react-core';
|
|
3
|
-
import { StageInfo, StageItemProps, StageProps } from './LifeCycle.types';
|
|
4
|
-
export interface StageComponentProps extends BaseProps, StageProps {
|
|
5
|
-
ref?: Ref<HTMLDivElement>;
|
|
6
|
-
/** Pass text for the task. */
|
|
7
|
-
value: string;
|
|
8
|
-
/** unique id of the component */
|
|
9
|
-
id: string;
|
|
10
|
-
/** Controls the styling of the stage. */
|
|
11
|
-
stageInfo: StageInfo;
|
|
12
|
-
/** Full data object which can be passed to the callback */
|
|
13
|
-
item: StageItemProps;
|
|
14
|
-
/** The status is used to show the input error status and the info on tooltip in case of error */
|
|
15
|
-
error?: string;
|
|
16
|
-
}
|
|
17
|
-
export declare const StyledWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
18
|
-
export declare const StyledStageButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
|
|
19
|
-
error: string | undefined;
|
|
20
|
-
}, never>;
|
|
21
|
-
export declare const StyledStageActions: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
22
|
-
export declare const StyledWarnIcon: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@pega/cosmos-react-core").IconProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
23
|
-
export declare const StyledStage: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Pick<StageComponentProps, "stageInfo"> & {
|
|
24
|
-
status: boolean;
|
|
25
|
-
error: string;
|
|
26
|
-
}, never>;
|
|
27
|
-
declare const Stage: FunctionComponent<StageComponentProps & ForwardProps>;
|
|
28
|
-
export default Stage;
|
|
29
|
-
//# sourceMappingURL=Stage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Stage.d.ts","sourceRoot":"","sources":["../../../src/components/LifeCycle/Stage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAqB,GAAG,EAAc,MAAM,OAAO,CAAC;AAI1F,OAAO,EAEL,SAAS,EACT,YAAY,EAQb,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAGL,SAAS,EACT,cAAc,EACd,UAAU,EACX,MAAM,mBAAmB,CAAC;AAE3B,MAAM,WAAW,mBAAoB,SAAQ,SAAS,EAAE,UAAU;IAChE,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1B,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,yCAAyC;IACzC,SAAS,EAAE,SAAS,CAAC;IACrB,2DAA2D;IAC3D,IAAI,EAAE,cAAc,CAAC;IACrB,iGAAiG;IACjG,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,aAAa,yGAEzB,CAAC;AAIF,eAAO,MAAM,iBAAiB;WACrB,MAAM,GAAG,SAAS;SAyBzB,CAAC;AAIH,eAAO,MAAM,kBAAkB,yGAE9B,CAAC;AAIF,eAAO,MAAM,cAAc,0LAQzB,CAAC;AAIH,eAAO,MAAM,WAAW;YAEZ,OAAO;WACR,MAAM;SAsIf,CAAC;AAIH,QAAA,MAAM,KAAK,EAAE,iBAAiB,CAAC,mBAAmB,GAAG,YAAY,CAkG/D,CAAC;AAEH,eAAe,KAAK,CAAC"}
|