@pega/cosmos-react-build 8.0.0-build.9.1 → 8.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/AppShell/AppShell.styles.d.ts +1 -1
- package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
- package/lib/components/AppShell/AppShell.styles.js +1 -46
- package/lib/components/AppShell/AppShell.styles.js.map +1 -1
- package/lib/components/AppShell/Header/AppHeader.d.ts +2 -3
- package/lib/components/AppShell/Header/AppHeader.d.ts.map +1 -1
- package/lib/components/AppShell/Header/AppHeader.js +4 -4
- package/lib/components/AppShell/Header/AppHeader.js.map +1 -1
- package/lib/components/AppShell/Header/AppHeader.styles.d.ts +2 -2
- package/lib/components/AppShell/Header/AppHeader.styles.d.ts.map +1 -1
- package/lib/components/BackgroundPicker/BackgroundPicker.d.ts +6 -0
- package/lib/components/BackgroundPicker/BackgroundPicker.d.ts.map +1 -0
- package/lib/components/BackgroundPicker/BackgroundPicker.js +82 -0
- package/lib/components/BackgroundPicker/BackgroundPicker.js.map +1 -0
- package/lib/components/BackgroundPicker/BackgroundPicker.styles.d.ts +15 -0
- package/lib/components/BackgroundPicker/BackgroundPicker.styles.d.ts.map +1 -0
- package/lib/components/BackgroundPicker/BackgroundPicker.styles.js +152 -0
- package/lib/components/BackgroundPicker/BackgroundPicker.styles.js.map +1 -0
- package/lib/components/BackgroundPicker/BackgroundPicker.test-ids.d.ts +5 -0
- package/lib/components/BackgroundPicker/BackgroundPicker.test-ids.d.ts.map +1 -0
- package/lib/components/BackgroundPicker/BackgroundPicker.test-ids.js +30 -0
- package/lib/components/BackgroundPicker/BackgroundPicker.test-ids.js.map +1 -0
- package/lib/components/BackgroundPicker/BackgroundPicker.types.d.ts +98 -0
- package/lib/components/BackgroundPicker/BackgroundPicker.types.d.ts.map +1 -0
- package/lib/components/BackgroundPicker/BackgroundPicker.types.js +29 -0
- package/lib/components/BackgroundPicker/BackgroundPicker.types.js.map +1 -0
- package/lib/components/BackgroundPicker/GradientConfig.d.ts +6 -0
- package/lib/components/BackgroundPicker/GradientConfig.d.ts.map +1 -0
- package/lib/components/BackgroundPicker/GradientConfig.js +149 -0
- package/lib/components/BackgroundPicker/GradientConfig.js.map +1 -0
- package/lib/components/BackgroundPicker/ImageConfig.d.ts +6 -0
- package/lib/components/BackgroundPicker/ImageConfig.d.ts.map +1 -0
- package/lib/components/BackgroundPicker/ImageConfig.js +64 -0
- package/lib/components/BackgroundPicker/ImageConfig.js.map +1 -0
- package/lib/components/BackgroundPicker/SolidColorConfig.d.ts +6 -0
- package/lib/components/BackgroundPicker/SolidColorConfig.d.ts.map +1 -0
- package/lib/components/BackgroundPicker/SolidColorConfig.js +24 -0
- package/lib/components/BackgroundPicker/SolidColorConfig.js.map +1 -0
- package/lib/components/BackgroundPicker/index.d.ts +3 -0
- package/lib/components/BackgroundPicker/index.d.ts.map +1 -0
- package/lib/components/BackgroundPicker/index.js +2 -0
- package/lib/components/BackgroundPicker/index.js.map +1 -0
- package/lib/components/BackgroundPicker/utils.d.ts +24 -0
- package/lib/components/BackgroundPicker/utils.d.ts.map +1 -0
- package/lib/components/BackgroundPicker/utils.js +186 -0
- package/lib/components/BackgroundPicker/utils.js.map +1 -0
- package/lib/components/DynamicContentEditor/DynamicContentEditor.d.ts +2 -3
- package/lib/components/DynamicContentEditor/DynamicContentEditor.d.ts.map +1 -1
- package/lib/components/DynamicContentEditor/DynamicContentEditor.js.map +1 -1
- package/lib/components/DynamicInput/BooleanControl.d.ts +3 -5
- package/lib/components/DynamicInput/BooleanControl.d.ts.map +1 -1
- package/lib/components/DynamicInput/BooleanControl.js.map +1 -1
- package/lib/components/DynamicInput/DynamicInput.d.ts +1 -2
- package/lib/components/DynamicInput/DynamicInput.d.ts.map +1 -1
- package/lib/components/DynamicInput/DynamicInput.js +33 -33
- package/lib/components/DynamicInput/DynamicInput.js.map +1 -1
- package/lib/components/DynamicInput/DynamicInput.styles.d.ts +2 -2
- package/lib/components/DynamicInput/DynamicInput.styles.d.ts.map +1 -1
- package/lib/components/DynamicInput/DynamicInput.styles.js +1 -0
- package/lib/components/DynamicInput/DynamicInput.styles.js.map +1 -1
- package/lib/components/DynamicInput/DynamicInput.types.d.ts +61 -11
- package/lib/components/DynamicInput/DynamicInput.types.d.ts.map +1 -1
- package/lib/components/DynamicInput/DynamicInput.types.js.map +1 -1
- package/lib/components/Expression/Expression.d.ts +6 -0
- package/lib/components/Expression/Expression.d.ts.map +1 -0
- package/lib/components/Expression/Expression.js +36 -0
- package/lib/components/Expression/Expression.js.map +1 -0
- package/lib/components/Expression/Expression.styles.d.ts +7 -0
- package/lib/components/Expression/Expression.styles.d.ts.map +1 -0
- package/lib/components/Expression/Expression.styles.js +47 -0
- package/lib/components/Expression/Expression.styles.js.map +1 -0
- package/lib/components/Expression/Expression.test-ids.d.ts +2 -0
- package/lib/components/Expression/Expression.test-ids.d.ts.map +1 -0
- package/lib/components/Expression/Expression.test-ids.js +8 -0
- package/lib/components/Expression/Expression.test-ids.js.map +1 -0
- package/lib/components/Expression/Expression.types.d.ts +53 -0
- package/lib/components/Expression/Expression.types.d.ts.map +1 -0
- package/lib/components/Expression/Expression.types.js +2 -0
- package/lib/components/Expression/Expression.types.js.map +1 -0
- package/lib/components/Expression/index.d.ts +3 -0
- package/lib/components/Expression/index.d.ts.map +1 -0
- package/lib/components/Expression/index.js +2 -0
- package/lib/components/Expression/index.js.map +1 -0
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.d.ts +7 -5
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.d.ts.map +1 -1
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.js +393 -76
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.js.map +1 -1
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.d.ts +9 -2
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.d.ts.map +1 -1
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.js +100 -26
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.js.map +1 -1
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.test-ids.d.ts +2 -0
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.test-ids.d.ts.map +1 -0
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.test-ids.js +6 -0
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.test-ids.js.map +1 -0
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.types.d.ts +32 -6
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.types.d.ts.map +1 -1
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.types.js.map +1 -1
- package/lib/components/ExpressionBuilder/CodeEditor/getCodeSuggestions.d.ts.map +1 -1
- package/lib/components/ExpressionBuilder/CodeEditor/getCodeSuggestions.js +1 -0
- package/lib/components/ExpressionBuilder/CodeEditor/getCodeSuggestions.js.map +1 -1
- package/lib/components/ExpressionBuilder/CodeEditor/mode/jsonLinter.d.ts +3 -0
- package/lib/components/ExpressionBuilder/CodeEditor/mode/jsonLinter.d.ts.map +1 -0
- package/lib/components/ExpressionBuilder/CodeEditor/mode/jsonLinter.js +34 -0
- package/lib/components/ExpressionBuilder/CodeEditor/mode/jsonLinter.js.map +1 -0
- package/lib/components/ExpressionBuilder/ExpressionBuilder.d.ts +2 -3
- package/lib/components/ExpressionBuilder/ExpressionBuilder.d.ts.map +1 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilder.js.map +1 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.d.ts +1 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.d.ts.map +1 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilder.types.d.ts +3 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilder.types.d.ts.map +1 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilder.types.js.map +1 -1
- package/lib/components/ExpressionBuilder/ExpressionDetails.d.ts +2 -3
- package/lib/components/ExpressionBuilder/ExpressionDetails.d.ts.map +1 -1
- package/lib/components/ExpressionBuilder/ExpressionDetails.js.map +1 -1
- package/lib/components/ExpressionBuilder/ExpressionList.d.ts +2 -3
- package/lib/components/ExpressionBuilder/ExpressionList.d.ts.map +1 -1
- package/lib/components/ExpressionBuilder/ExpressionList.js.map +1 -1
- package/lib/components/ExpressionBuilder/index.d.ts +1 -1
- package/lib/components/ExpressionBuilder/index.d.ts.map +1 -1
- package/lib/components/ExpressionBuilder/index.js.map +1 -1
- package/lib/components/FieldReference/FieldReference.styles.d.ts +1 -0
- package/lib/components/FieldReference/FieldReference.styles.d.ts.map +1 -1
- package/lib/components/FieldReference/FieldReference.styles.js +45 -37
- package/lib/components/FieldReference/FieldReference.styles.js.map +1 -1
- package/lib/components/FieldReference/FieldReference.test-ids.d.ts +1 -0
- package/lib/components/FieldReference/FieldReference.test-ids.d.ts.map +1 -1
- package/lib/components/FieldReference/FieldReference.test-ids.js +3 -0
- package/lib/components/FieldReference/FieldReference.test-ids.js.map +1 -1
- package/lib/components/FieldReference/FieldReference.types.d.ts +6 -1
- package/lib/components/FieldReference/FieldReference.types.d.ts.map +1 -1
- package/lib/components/FieldReference/FieldReference.types.js.map +1 -1
- package/lib/components/FieldReference/FieldReferenceDisplay.d.ts.map +1 -1
- package/lib/components/FieldReference/FieldReferenceDisplay.js +11 -7
- package/lib/components/FieldReference/FieldReferenceDisplay.js.map +1 -1
- package/lib/components/FieldReference/FieldReferenceInput.d.ts.map +1 -1
- package/lib/components/FieldReference/FieldReferenceInput.js +17 -11
- package/lib/components/FieldReference/FieldReferenceInput.js.map +1 -1
- package/lib/components/FieldReference/FieldReferenceMenuList.d.ts +5 -4
- package/lib/components/FieldReference/FieldReferenceMenuList.d.ts.map +1 -1
- package/lib/components/FieldReference/FieldReferenceMenuList.js +7 -5
- package/lib/components/FieldReference/FieldReferenceMenuList.js.map +1 -1
- package/lib/components/FieldReference/index.d.ts +2 -2
- package/lib/components/FieldReference/index.d.ts.map +1 -1
- package/lib/components/FieldReference/index.js +1 -1
- package/lib/components/FieldReference/index.js.map +1 -1
- package/lib/components/IconTile/IconTile.d.ts +7 -3
- package/lib/components/IconTile/IconTile.d.ts.map +1 -1
- package/lib/components/IconTile/IconTile.js +40 -4
- package/lib/components/IconTile/IconTile.js.map +1 -1
- package/lib/components/IconTile/IconTile.types.d.ts +17 -15
- package/lib/components/IconTile/IconTile.types.d.ts.map +1 -1
- package/lib/components/IconTile/IconTile.types.js.map +1 -1
- package/lib/components/IconTile/Tiles/Ai.d.ts +1 -1
- package/lib/components/IconTile/Tiles/Ai.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/Ai.js.map +1 -1
- package/lib/components/IconTile/Tiles/Automation.d.ts +1 -1
- package/lib/components/IconTile/Tiles/Automation.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/Automation.js.map +1 -1
- package/lib/components/IconTile/Tiles/AutomationAppend.d.ts +1 -1
- package/lib/components/IconTile/Tiles/AutomationAppend.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/AutomationAppend.js.map +1 -1
- package/lib/components/IconTile/Tiles/AutomationCall.d.ts +1 -1
- package/lib/components/IconTile/Tiles/AutomationCall.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/AutomationCall.js.map +1 -1
- package/lib/components/IconTile/Tiles/AutomationForEach.d.ts +1 -1
- package/lib/components/IconTile/Tiles/AutomationForEach.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/AutomationForEach.js.map +1 -1
- package/lib/components/IconTile/Tiles/AutomationReturn.d.ts +1 -1
- package/lib/components/IconTile/Tiles/AutomationReturn.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/AutomationReturn.js.map +1 -1
- package/lib/components/IconTile/Tiles/AutomationSet.d.ts +1 -1
- package/lib/components/IconTile/Tiles/AutomationSet.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/AutomationSet.js.map +1 -1
- package/lib/components/IconTile/Tiles/Case.d.ts +1 -1
- package/lib/components/IconTile/Tiles/Case.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/Case.js.map +1 -1
- package/lib/components/IconTile/Tiles/CaseGoTo.d.ts +1 -1
- package/lib/components/IconTile/Tiles/CaseGoTo.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/CaseGoTo.js.map +1 -1
- package/lib/components/IconTile/Tiles/CaseProcess.d.ts +1 -1
- package/lib/components/IconTile/Tiles/CaseProcess.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/CaseProcess.js.map +1 -1
- package/lib/components/IconTile/Tiles/CaseSla.d.ts +1 -1
- package/lib/components/IconTile/Tiles/CaseSla.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/CaseSla.js.map +1 -1
- package/lib/components/IconTile/Tiles/CaseStage.d.ts +1 -1
- package/lib/components/IconTile/Tiles/CaseStage.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/CaseStage.js.map +1 -1
- package/lib/components/IconTile/Tiles/CaseWait.d.ts +1 -1
- package/lib/components/IconTile/Tiles/CaseWait.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/CaseWait.js.map +1 -1
- package/lib/components/IconTile/Tiles/LogicDecisionStep.d.ts +1 -1
- package/lib/components/IconTile/Tiles/LogicDecisionStep.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/LogicDecisionStep.js.map +1 -1
- package/lib/components/IconTile/Tiles/LogicFunction.d.ts +1 -1
- package/lib/components/IconTile/Tiles/LogicFunction.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/LogicFunction.js.map +1 -1
- package/lib/components/IconTile/Tiles/LogicValidation.d.ts +1 -1
- package/lib/components/IconTile/Tiles/LogicValidation.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/LogicValidation.js.map +1 -1
- package/lib/components/IconTile/Tiles/LogicWhen.d.ts +1 -1
- package/lib/components/IconTile/Tiles/LogicWhen.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/LogicWhen.js.map +1 -1
- package/lib/components/IconTile/Tiles/RuleAuthenticate.d.ts +1 -1
- package/lib/components/IconTile/Tiles/RuleAuthenticate.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/RuleAuthenticate.js.map +1 -1
- package/lib/components/IconTile/Tiles/RuleConfiguration.d.ts +1 -1
- package/lib/components/IconTile/Tiles/RuleConfiguration.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/RuleConfiguration.js.map +1 -1
- package/lib/components/IconTile/Tiles/RuleConnector.d.ts +1 -1
- package/lib/components/IconTile/Tiles/RuleConnector.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/RuleConnector.js.map +1 -1
- package/lib/components/IconTile/Tiles/RuleDataPage.d.ts +1 -1
- package/lib/components/IconTile/Tiles/RuleDataPage.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/RuleDataPage.js.map +1 -1
- package/lib/components/IconTile/Tiles/RuleField.d.ts +1 -1
- package/lib/components/IconTile/Tiles/RuleField.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/RuleField.js.map +1 -1
- package/lib/components/IconTile/Tiles/RuleInsight.d.ts +1 -1
- package/lib/components/IconTile/Tiles/RuleInsight.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/RuleInsight.js.map +1 -1
- package/lib/components/IconTile/Tiles/RuleIntegrationSystem.d.ts +1 -1
- package/lib/components/IconTile/Tiles/RuleIntegrationSystem.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/RuleIntegrationSystem.js.map +1 -1
- package/lib/components/IconTile/Tiles/RuleLiveData.d.ts +1 -1
- package/lib/components/IconTile/Tiles/RuleLiveData.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/RuleLiveData.js.map +1 -1
- package/lib/components/IconTile/Tiles/RuleParagraph.d.ts +1 -1
- package/lib/components/IconTile/Tiles/RuleParagraph.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/RuleParagraph.js.map +1 -1
- package/lib/components/IconTile/Tiles/RulePermission.d.ts +1 -1
- package/lib/components/IconTile/Tiles/RulePermission.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/RulePermission.js.map +1 -1
- package/lib/components/IconTile/Tiles/RulePersona.d.ts +1 -1
- package/lib/components/IconTile/Tiles/RulePersona.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/RulePersona.js.map +1 -1
- package/lib/components/IconTile/Tiles/RulePortal.d.ts +1 -1
- package/lib/components/IconTile/Tiles/RulePortal.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/RulePortal.js.map +1 -1
- package/lib/components/IconTile/Tiles/RuleRecord.d.ts +1 -1
- package/lib/components/IconTile/Tiles/RuleRecord.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/RuleRecord.js.map +1 -1
- package/lib/components/IconTile/Tiles/RuleSystem.d.ts +1 -1
- package/lib/components/IconTile/Tiles/RuleSystem.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/RuleSystem.js.map +1 -1
- package/lib/components/IconTile/Tiles/RuleView.d.ts +1 -1
- package/lib/components/IconTile/Tiles/RuleView.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/RuleView.js.map +1 -1
- package/lib/components/IconTile/Tiles/Task.d.ts +1 -1
- package/lib/components/IconTile/Tiles/Task.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/Task.js.map +1 -1
- package/lib/components/IconTile/Tiles/TaskAction.d.ts +1 -1
- package/lib/components/IconTile/Tiles/TaskAction.d.ts.map +1 -1
- package/lib/components/IconTile/Tiles/TaskAction.js.map +1 -1
- package/lib/components/IconTile/iconUtils.d.ts +11 -0
- package/lib/components/IconTile/iconUtils.d.ts.map +1 -0
- package/lib/components/IconTile/iconUtils.js +41 -0
- package/lib/components/IconTile/iconUtils.js.map +1 -0
- package/lib/components/IconTile/index.d.ts +1 -0
- package/lib/components/IconTile/index.d.ts.map +1 -1
- package/lib/components/IconTile/index.js.map +1 -1
- package/lib/components/ItemLibrary/ItemLibrary.d.ts +10 -10
- package/lib/components/ItemLibrary/ItemLibrary.d.ts.map +1 -1
- package/lib/components/ItemLibrary/ItemLibrary.js +26 -18
- package/lib/components/ItemLibrary/ItemLibrary.js.map +1 -1
- package/lib/components/LifeCycle/Category.d.ts +8 -6
- package/lib/components/LifeCycle/Category.d.ts.map +1 -1
- package/lib/components/LifeCycle/Category.js +53 -36
- package/lib/components/LifeCycle/Category.js.map +1 -1
- package/lib/components/LifeCycle/LifeCycle.d.ts +8 -4
- package/lib/components/LifeCycle/LifeCycle.d.ts.map +1 -1
- package/lib/components/LifeCycle/LifeCycle.js +113 -19
- package/lib/components/LifeCycle/LifeCycle.js.map +1 -1
- package/lib/components/LifeCycle/LifeCycle.test-ids.d.ts +6 -0
- package/lib/components/LifeCycle/LifeCycle.test-ids.d.ts.map +1 -0
- package/lib/components/LifeCycle/LifeCycle.test-ids.js +10 -0
- package/lib/components/LifeCycle/LifeCycle.test-ids.js.map +1 -0
- package/lib/components/LifeCycle/LifeCycle.types.d.ts +713 -58
- package/lib/components/LifeCycle/LifeCycle.types.d.ts.map +1 -1
- package/lib/components/LifeCycle/LifeCycle.types.js +71 -61
- package/lib/components/LifeCycle/LifeCycle.types.js.map +1 -1
- package/lib/components/LifeCycle/LifeCycleContext.d.ts +16 -4
- package/lib/components/LifeCycle/LifeCycleContext.d.ts.map +1 -1
- package/lib/components/LifeCycle/LifeCycleContext.js +7 -1
- package/lib/components/LifeCycle/LifeCycleContext.js.map +1 -1
- package/lib/components/LifeCycle/LifeCycleDragDropList.d.ts +21 -0
- package/lib/components/LifeCycle/LifeCycleDragDropList.d.ts.map +1 -0
- package/lib/components/LifeCycle/LifeCycleDragDropList.js +298 -0
- package/lib/components/LifeCycle/LifeCycleDragDropList.js.map +1 -0
- package/lib/components/LifeCycle/LifeCycleList.d.ts +8 -6
- package/lib/components/LifeCycle/LifeCycleList.d.ts.map +1 -1
- package/lib/components/LifeCycle/LifeCycleList.js +20 -30
- package/lib/components/LifeCycle/LifeCycleList.js.map +1 -1
- package/lib/components/LifeCycle/Stage.d.ts +12 -7
- package/lib/components/LifeCycle/Stage.d.ts.map +1 -1
- package/lib/components/LifeCycle/Stage.js +87 -72
- package/lib/components/LifeCycle/Stage.js.map +1 -1
- package/lib/components/LifeCycle/Step.d.ts +21 -14
- package/lib/components/LifeCycle/Step.d.ts.map +1 -1
- package/lib/components/LifeCycle/Step.js +75 -51
- package/lib/components/LifeCycle/Step.js.map +1 -1
- package/lib/components/LifeCycle/Task.d.ts +18 -7
- package/lib/components/LifeCycle/Task.d.ts.map +1 -1
- package/lib/components/LifeCycle/Task.js +119 -55
- package/lib/components/LifeCycle/Task.js.map +1 -1
- package/lib/components/LifeCycle/index.d.ts +2 -1
- package/lib/components/LifeCycle/index.d.ts.map +1 -1
- package/lib/components/LifeCycle/index.js +1 -0
- package/lib/components/LifeCycle/index.js.map +1 -1
- package/lib/components/LifeCycle/utils.d.ts +14 -0
- package/lib/components/LifeCycle/utils.d.ts.map +1 -0
- package/lib/components/LifeCycle/utils.js +250 -0
- package/lib/components/LifeCycle/utils.js.map +1 -0
- package/lib/components/MobileBuildSummary/MobileBuildSummary.d.ts +2 -3
- package/lib/components/MobileBuildSummary/MobileBuildSummary.d.ts.map +1 -1
- package/lib/components/MobileBuildSummary/MobileBuildSummary.js.map +1 -1
- package/lib/components/ObjectSelect/ObjectPicker.d.ts +2 -2
- package/lib/components/ObjectSelect/ObjectPicker.d.ts.map +1 -1
- package/lib/components/ObjectSelect/ObjectPicker.js.map +1 -1
- package/lib/components/PageTemplates/GalleryPage.d.ts +2 -2
- package/lib/components/PageTemplates/GalleryPage.d.ts.map +1 -1
- package/lib/components/PageTemplates/GalleryPage.js.map +1 -1
- package/lib/components/PageTemplates/PageTemplates.d.ts +5 -5
- package/lib/components/PageTemplates/PageTemplates.d.ts.map +1 -1
- package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
- package/lib/components/PageTemplates/ShowcasePage.d.ts +2 -2
- package/lib/components/PageTemplates/ShowcasePage.d.ts.map +1 -1
- package/lib/components/PageTemplates/ShowcasePage.js.map +1 -1
- package/lib/components/RuleSelect/RuleSelect.js +3 -3
- package/lib/components/RuleSelect/RuleSelect.js.map +1 -1
- package/lib/components/Workbench/Workbench.d.ts +2 -3
- package/lib/components/Workbench/Workbench.d.ts.map +1 -1
- package/lib/components/Workbench/Workbench.js.map +1 -1
- package/lib/components/Workbench/Workbench.styles.d.ts +2 -2
- package/lib/components/Workbench/Workbench.styles.d.ts.map +1 -1
- package/lib/index.d.ts +4 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -2
- package/lib/index.js.map +1 -1
- package/lib/{components/FieldReference → utils}/typeIconMapping.d.ts +8 -0
- package/lib/utils/typeIconMapping.d.ts.map +1 -0
- package/lib/{components/FieldReference → utils}/typeIconMapping.js +15 -3
- package/lib/utils/typeIconMapping.js.map +1 -0
- package/package.json +16 -14
- package/lib/components/FieldReference/typeIconMapping.d.ts.map +0 -1
- package/lib/components/FieldReference/typeIconMapping.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 -6
- 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 -10
- 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 -20
- 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 -69
- 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 -28
- 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 -18
- 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/IconTile/IconTile.styles.d.ts +0 -7
- package/lib/components/IconTile/IconTile.styles.d.ts.map +0 -1
- package/lib/components/IconTile/IconTile.styles.js +0 -68
- package/lib/components/IconTile/IconTile.styles.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LifeCycle.types.d.ts","sourceRoot":"","sources":["../../../src/components/LifeCycle/LifeCycle.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"LifeCycle.types.d.ts","sourceRoot":"","sources":["../../../src/components/LifeCycle/LifeCycle.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,KAAK,EACV,MAAM,EACN,WAAW,EACX,cAAc,EACd,SAAS,EACT,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAElD,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,WAAW,CAAC;AAE1D,UAAU,eAAe;IACvB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,aAAc,SAAQ,eAAe;IACpD,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,mBAAmB,CAAC;IAC5B,MAAM,EAAE;QAAE,IAAI,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9D,KAAK,CAAC,EAAE,MAAM,CA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;;;;;eAwF9B,CAAC"}
|
|
@@ -1,64 +1,57 @@
|
|
|
1
|
-
import { WorkTheme as Theme } from '@pega/cosmos-react-core';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
visual: {
|
|
33
|
-
bgColor: Theme.base.colors.green.medium,
|
|
34
|
-
bgHover: Theme.base.colors.green.light,
|
|
35
|
-
tailPointed: true,
|
|
36
|
-
headPointed: false
|
|
1
|
+
import { readableHue, WorkTheme as Theme } from '@pega/cosmos-react-core';
|
|
2
|
+
// calculates the final stage info based on prev type and returns the final stage info
|
|
3
|
+
// second param is mandatory for accurate results, optional only for the first stage
|
|
4
|
+
export const getStageInfo = (currentType, transitionType, prevStageItem, isLastItem = false, theme = Theme) => {
|
|
5
|
+
const stageTypeDefaults = {
|
|
6
|
+
start: {
|
|
7
|
+
id: 'start',
|
|
8
|
+
visual: {
|
|
9
|
+
bgColor: theme.base.colors.blue.dark,
|
|
10
|
+
bgHover: theme.base.colors.blue.medium,
|
|
11
|
+
tailPointed: false,
|
|
12
|
+
headPointed: true
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
default: {
|
|
16
|
+
id: 'default',
|
|
17
|
+
visual: {
|
|
18
|
+
bgColor: theme.base.colors.blue.medium,
|
|
19
|
+
bgHover: theme.base.colors.blue.light,
|
|
20
|
+
tailPointed: true,
|
|
21
|
+
headPointed: true
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
alternate: {
|
|
25
|
+
id: 'alternate',
|
|
26
|
+
visual: {
|
|
27
|
+
bgColor: theme.base.colors.slate.dark,
|
|
28
|
+
bgHover: theme.base.colors.slate.medium,
|
|
29
|
+
tailPointed: false,
|
|
30
|
+
headPointed: false
|
|
31
|
+
}
|
|
37
32
|
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
33
|
+
};
|
|
34
|
+
const resolutionStyle = {
|
|
35
|
+
bgColor: readableHue(theme.base.colors.green.medium, theme.base.palette.light),
|
|
36
|
+
bgHover: theme.base.colors.green.light
|
|
37
|
+
};
|
|
38
|
+
const clonedStageCopy = structuredClone(stageTypeDefaults);
|
|
39
|
+
const currentStageInfo = clonedStageCopy[currentType] || clonedStageCopy.default;
|
|
40
|
+
if (currentType !== 'alternate') {
|
|
41
|
+
if (transitionType === 'resolution') {
|
|
42
|
+
currentStageInfo.visual = {
|
|
43
|
+
...resolutionStyle,
|
|
44
|
+
tailPointed: currentType !== 'start'
|
|
45
|
+
};
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
tailPointed: false,
|
|
54
|
-
headPointed: false
|
|
47
|
+
if (transitionType === 'wait') {
|
|
48
|
+
currentStageInfo.visual = {
|
|
49
|
+
...currentStageInfo.visual,
|
|
50
|
+
tailPointed: currentType !== 'start',
|
|
51
|
+
headPointed: false
|
|
52
|
+
};
|
|
55
53
|
}
|
|
56
54
|
}
|
|
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
55
|
// cloning, to avoid getting modified
|
|
63
56
|
const result = {
|
|
64
57
|
...currentStageInfo,
|
|
@@ -66,10 +59,27 @@ export const getStageInfo = (currentType, prevType, isLastItem) => {
|
|
|
66
59
|
...currentStageInfo.visual
|
|
67
60
|
}
|
|
68
61
|
};
|
|
69
|
-
if (
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
62
|
+
if (prevStageItem?.type) {
|
|
63
|
+
const clonedStage = JSON.parse(JSON.stringify(stageTypeDefaults));
|
|
64
|
+
const prevStageInfo = clonedStage[prevStageItem.type] || clonedStage.start;
|
|
65
|
+
if (prevStageItem.type !== 'alternate') {
|
|
66
|
+
if (prevStageItem.transitionType === 'resolution') {
|
|
67
|
+
result.visual = {
|
|
68
|
+
...result.visual,
|
|
69
|
+
tailPointed: false
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
if (prevStageItem.transitionType === 'wait') {
|
|
73
|
+
result.visual = {
|
|
74
|
+
...result.visual,
|
|
75
|
+
...{ tailPointed: false }
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
result.visual.tailPointed =
|
|
81
|
+
currentStageInfo.visual.tailPointed && prevStageInfo.visual.headPointed;
|
|
82
|
+
}
|
|
73
83
|
}
|
|
74
84
|
if (isLastItem) {
|
|
75
85
|
result.visual.headPointed = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LifeCycle.types.js","sourceRoot":"","sources":["../../../src/components/LifeCycle/LifeCycle.types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,IAAI,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAqL7D,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;YACt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,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM;YACrC,WAAW,EAAE,KAAK;YAClB,WAAW,EAAE,KAAK;SACnB;KACF;CACF,CAAC;AAEF,sFAAsF;AACtF,oFAAoF;AACpF,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,WAAsB,EACtB,QAA0B,EAC1B,UAA+B,EAC/B,EAAE;IACF,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,WAAW,CAAC,IAAI,iBAAiB,CAAC,OAAO,CAAC;IACrF,qCAAqC;IACrC,MAAM,MAAM,GAAc;QACxB,GAAG,gBAAgB;QACnB,MAAM,EAAE;YACN,GAAG,gBAAgB,CAAC,MAAM;SAC3B;KACF,CAAC;IAEF,IAAI,QAAQ,EAAE,CAAC;QACb,MAAM,aAAa,GAAG,iBAAiB,CAAC,QAAQ,CAAC,IAAI,iBAAiB,CAAC,KAAK,CAAC;QAC7E,MAAM,CAAC,MAAM,CAAC,WAAW;YACvB,gBAAgB,CAAC,MAAM,CAAC,WAAW,IAAI,aAAa,CAAC,MAAM,CAAC,WAAW,CAAC;IAC5E,CAAC;IACD,IAAI,UAAU,EAAE,CAAC;QACf,MAAM,CAAC,MAAM,CAAC,WAAW,GAAG,KAAK,CAAC;IACpC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC","sourcesContent":["import type { MouseEvent, Ref } from 'react';\n\nimport { WorkTheme as Theme } from '@pega/cosmos-react-core';\nimport type {\n Action,\n StatusProps,\n NoChildrenProp,\n BaseProps,\n FormControlProps\n} from '@pega/cosmos-react-core';\n\nimport type { ColorName } from '../../utils';\nimport type { 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
|
+
{"version":3,"file":"LifeCycle.types.js","sourceRoot":"","sources":["../../../src/components/LifeCycle/LifeCycle.types.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,WAAW,EAAE,SAAS,IAAI,KAAK,EAAE,MAAM,yBAAyB,CAAC;AA2N1E,sFAAsF;AACtF,oFAAoF;AACpF,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,WAAsB,EACtB,cAAgD,EAChD,aAA6B,EA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,MAAM,CAAC,MAAM,CAAC,WAAW;gBACvB,gBAAgB,CAAC,MAAM,CAAC,WAAW,IAAI,aAAa,CAAC,MAAM,CAAC,WAAW,CAAC;QAC5E,CAAC;IACH,CAAC;IACD,IAAI,UAAU,EAAE,CAAC;QACf,MAAM,CAAC,MAAM,CAAC,WAAW,GAAG,KAAK,CAAC;IACpC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC","sourcesContent":["import type { MouseEvent, Ref } from 'react';\n\nimport type {\n Action,\n StatusProps,\n NoChildrenProp,\n BaseProps,\n FormControlProps\n} from '@pega/cosmos-react-core';\nimport { readableHue, WorkTheme as Theme } from '@pega/cosmos-react-core';\n\nimport type { LibraryItem } from '../ItemLibrary';\n\nimport type { VisualStepItemProps } from './Step';\n\nexport type StageType = 'start' | 'default' | 'alternate';\n\ninterface ItemIdentifiers {\n /** The index of the item within its list */\n index?: number;\n /** If true, this item belongs to an alternate lifecycle list */\n alternate?: boolean;\n}\n\nexport interface StepItemProps extends ItemIdentifiers {\n id: string;\n label: string;\n visual: VisualStepItemProps;\n status: { type?: StatusProps['variant'] | ''; label: string };\n error?: string;\n}\n\nexport interface TaskItemProps extends ItemIdentifiers {\n id: string;\n label: string;\n visual: {\n imgSrc: string;\n };\n error?: string;\n steps: StepItemProps[];\n subIndex?: number;\n}\n\nexport interface CategoryItemProps extends ItemIdentifiers {\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 StageItemProps extends ItemIdentifiers {\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 /* Sets stage transition to wait or resolution */\n transitionType?: 'wait' | 'resolution' | undefined;\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 menuButtonEl?: HTMLButtonElement\n ) => void;\n}\n\nexport interface CategoriesItemProps {\n label: string;\n id: string;\n}\n\nexport interface StageProps extends Omit<FormControlProps, 'status' | 'id'> {\n /** Label for the region. */\n label?: string;\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 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 /** Callback for adding a step when nodeLibrary is provided. */\n onAddStep?: (param: LifeCycleActionParam, selectedItem: LibraryItem) => void;\n /** Callback for adding a step when nodeLibrary is not provided. */\n onAddCustomStep?: (param: LifeCycleActionParam) => 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 CategoryProps extends BaseProps, NoChildrenProp {\n ref?: Ref<HTMLOListElement | HTMLDivElement>;\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 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 /** If true, step names will wrap rather than truncate. */\n wrap?: boolean;\n /** callback for Click of a step */\n onClick?: (param: LifeCycleActionParam, e: MouseEvent) => void;\n}\n\nexport interface IndexData {\n /** Determines if the item part of an alternate stage. */\n alternate: boolean;\n /** The index of the parent stage to the item, or the item itself. */\n stage?: number;\n /** The index of the parent category to the item. */\n category?: number;\n /** The index of the parent task to the item, or the item itself. */\n task?: number;\n /** The index of the parent stage to the item, or the item itself, if the task is nested within another task. */\n subTask?: number;\n /** The index of the step item. */\n step?: number;\n}\n\nexport type LifeCycleDragItemType = 'stage' | 'step' | 'alternate-stage' | 'alternate-step';\n\nexport interface LifeCycleDragDropEvent {\n /** The type of item that was moved. */\n type: 'stage' | 'step';\n /** The indices of the source item. */\n sourceData: IndexData;\n /** The indices of the target location. */\n targetData: IndexData;\n}\n\nexport interface DragDropConfig\n extends Record<LifeCycleDragItemType, { enabled: boolean; accept: LifeCycleDragItemType[] }> {\n loading?: boolean;\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 /** Callback function for updating the items following a drag drop event. */\n onDragDrop?: (event: LifeCycleDragDropEvent) => void;\n /**\n * Configuration to control which item types each lifecycle region can accept, and which types are draggable.\n * */\n dragDropConfig?: DragDropConfig;\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\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 transitionType: StageItemProps['transitionType'],\n prevStageItem: StageItemProps,\n isLastItem = false,\n theme = Theme\n) => {\n const 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 alternate: {\n id: 'alternate',\n visual: {\n bgColor: theme.base.colors.slate.dark,\n bgHover: theme.base.colors.slate.medium,\n tailPointed: false,\n headPointed: false\n }\n }\n };\n\n const resolutionStyle = {\n bgColor: readableHue(theme.base.colors.green.medium, theme.base.palette.light),\n bgHover: theme.base.colors.green.light\n };\n const clonedStageCopy = structuredClone(stageTypeDefaults);\n const currentStageInfo = clonedStageCopy[currentType] || clonedStageCopy.default;\n if (currentType !== 'alternate') {\n if (transitionType === 'resolution') {\n currentStageInfo.visual = {\n ...resolutionStyle,\n tailPointed: currentType !== 'start'\n };\n }\n if (transitionType === 'wait') {\n currentStageInfo.visual = {\n ...currentStageInfo.visual,\n tailPointed: currentType !== 'start',\n headPointed: false\n };\n }\n }\n\n // cloning, to avoid getting modified\n const result: StageInfo = {\n ...currentStageInfo,\n visual: {\n ...currentStageInfo.visual\n }\n };\n if (prevStageItem?.type) {\n const clonedStage = JSON.parse(JSON.stringify(stageTypeDefaults));\n const prevStageInfo = clonedStage[prevStageItem.type] || clonedStage.start;\n if (prevStageItem.type !== 'alternate') {\n if (prevStageItem.transitionType === 'resolution') {\n result.visual = {\n ...result.visual,\n tailPointed: false\n };\n }\n if (prevStageItem.transitionType === 'wait') {\n result.visual = {\n ...result.visual,\n ...{ tailPointed: false }\n };\n }\n } else {\n result.visual.tailPointed =\n currentStageInfo.visual.tailPointed && prevStageInfo.visual.headPointed;\n }\n }\n if (isLastItem) {\n result.visual.headPointed = false;\n }\n return result;\n};\n"]}
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import type { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import type { DragDropConfig, LifeCycleDragDropEvent, LifeCycleProps, StageItemProps } from './LifeCycle.types';
|
|
3
|
+
export interface LifeCycleDraggedItem {
|
|
4
|
+
type: LifeCycleDragDropEvent['type'];
|
|
5
|
+
id: string;
|
|
6
|
+
navigatingWithKeyboard: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface LifeCycleContextValue extends Pick<LifeCycleProps, 'selectedItemId' | 'readOnly' | 'onDragDrop'> {
|
|
9
|
+
lifeCycleData: {
|
|
10
|
+
stages: StageItemProps[];
|
|
11
|
+
alternateStages: StageItemProps[];
|
|
12
|
+
};
|
|
13
|
+
dragDropConfig: DragDropConfig;
|
|
14
|
+
dragEnabled?: boolean;
|
|
15
|
+
draggedItem?: LifeCycleDraggedItem;
|
|
16
|
+
setDraggedItem: Dispatch<SetStateAction<LifeCycleDraggedItem | undefined>>;
|
|
5
17
|
}
|
|
6
18
|
declare const LifeCycleContext: import("react").Context<LifeCycleContextValue>;
|
|
7
19
|
export default LifeCycleContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LifeCycleContext.d.ts","sourceRoot":"","sources":["../../../src/components/LifeCycle/LifeCycleContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LifeCycleContext.d.ts","sourceRoot":"","sources":["../../../src/components/LifeCycle/LifeCycleContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,KAAK,EACV,cAAc,EACd,sBAAsB,EACtB,cAAc,EACd,cAAc,EACf,MAAM,mBAAmB,CAAC;AAG3B,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,sBAAsB,EAAE,OAAO,CAAC;CACjC;AAED,MAAM,WAAW,qBACf,SAAQ,IAAI,CAAC,cAAc,EAAE,gBAAgB,GAAG,UAAU,GAAG,YAAY,CAAC;IAC1E,aAAa,EAAE;QACb,MAAM,EAAE,cAAc,EAAE,CAAC;QACzB,eAAe,EAAE,cAAc,EAAE,CAAC;KACnC,CAAC;IACF,cAAc,EAAE,cAAc,CAAC;IAC/B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,oBAAoB,CAAC;IACnC,cAAc,EAAE,QAAQ,CAAC,cAAc,CAAC,oBAAoB,GAAG,SAAS,CAAC,CAAC,CAAC;CAC5E;AAED,QAAA,MAAM,gBAAgB,gDAQpB,CAAC;AAEH,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { createContext } from 'react';
|
|
2
|
+
import { defaultDragDropConfig } from './utils';
|
|
2
3
|
const LifeCycleContext = createContext({
|
|
4
|
+
lifeCycleData: { stages: [], alternateStages: [] },
|
|
3
5
|
selectedItemId: undefined,
|
|
4
|
-
readOnly: false
|
|
6
|
+
readOnly: false,
|
|
7
|
+
dragDropConfig: defaultDragDropConfig,
|
|
8
|
+
dragEnabled: false,
|
|
9
|
+
draggedItem: undefined,
|
|
10
|
+
setDraggedItem: () => { }
|
|
5
11
|
});
|
|
6
12
|
export default LifeCycleContext;
|
|
7
13
|
//# sourceMappingURL=LifeCycleContext.js.map
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
1
|
+
{"version":3,"file":"LifeCycleContext.js","sourceRoot":"","sources":["../../../src/components/LifeCycle/LifeCycleContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAStC,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAoBhD,MAAM,gBAAgB,GAAG,aAAa,CAAwB;IAC5D,aAAa,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,eAAe,EAAE,EAAE,EAAE;IAClD,cAAc,EAAE,SAAS;IACzB,QAAQ,EAAE,KAAK;IACf,cAAc,EAAE,qBAAqB;IACrC,WAAW,EAAE,KAAK;IAClB,WAAW,EAAE,SAAS;IACtB,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;CACzB,CAAC,CAAC;AAEH,eAAe,gBAAgB,CAAC","sourcesContent":["import { createContext } from 'react';\nimport type { Dispatch, SetStateAction } from 'react';\n\nimport type {\n DragDropConfig,\n LifeCycleDragDropEvent,\n LifeCycleProps,\n StageItemProps\n} from './LifeCycle.types';\nimport { defaultDragDropConfig } from './utils';\n\nexport interface LifeCycleDraggedItem {\n type: LifeCycleDragDropEvent['type'];\n id: string;\n navigatingWithKeyboard: boolean;\n}\n\nexport interface LifeCycleContextValue\n extends Pick<LifeCycleProps, 'selectedItemId' | 'readOnly' | 'onDragDrop'> {\n lifeCycleData: {\n stages: StageItemProps[];\n alternateStages: StageItemProps[];\n };\n dragDropConfig: DragDropConfig;\n dragEnabled?: boolean;\n draggedItem?: LifeCycleDraggedItem;\n setDraggedItem: Dispatch<SetStateAction<LifeCycleDraggedItem | undefined>>;\n}\n\nconst LifeCycleContext = createContext<LifeCycleContextValue>({\n lifeCycleData: { stages: [], alternateStages: [] },\n selectedItemId: undefined,\n readOnly: false,\n dragDropConfig: defaultDragDropConfig,\n dragEnabled: false,\n draggedItem: undefined,\n setDraggedItem: () => {}\n});\n\nexport default LifeCycleContext;\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react';
|
|
2
|
+
import type { AsProp, BaseProps, ForwardProps, NoChildrenProp, TestIdProp } from '@pega/cosmos-react-core';
|
|
3
|
+
import type { DraggableItem } from '@pega/cosmos-react-dnd';
|
|
4
|
+
import type { IndexData, LifeCycleDragItemType, LifeCycleProps } from './LifeCycle.types';
|
|
5
|
+
interface LifeCycleDragDropListProps<T extends object = object> extends AsProp, BaseProps, NoChildrenProp, TestIdProp, Pick<LifeCycleProps, 'onDragDrop'> {
|
|
6
|
+
/** Unique identifier for the list */
|
|
7
|
+
id?: string;
|
|
8
|
+
/** The type of item within the list. */
|
|
9
|
+
type: LifeCycleDragItemType;
|
|
10
|
+
/** A set of indices that identify the list's location within the LifeCycle. */
|
|
11
|
+
listLocation: IndexData;
|
|
12
|
+
/** Array of data objects used for the list. */
|
|
13
|
+
items: DraggableItem<T>[];
|
|
14
|
+
/** User defined function that should return content for the draggable element. */
|
|
15
|
+
itemRenderer: ComponentType<T>;
|
|
16
|
+
/** A region for non-list item elements to be included in the droppable region. */
|
|
17
|
+
additionalDropZone?: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
declare const LifeCycleDragDropList: <T extends object = object>({ testId, id: idProp, type, listLocation, items, itemRenderer: ItemRenderer, additionalDropZone, onDragDrop, as: Component, ...restProps }: LifeCycleDragDropListProps<T> & ForwardProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export default LifeCycleDragDropList;
|
|
21
|
+
//# sourceMappingURL=LifeCycleDragDropList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LifeCycleDragDropList.d.ts","sourceRoot":"","sources":["../../../src/components/LifeCycle/LifeCycleDragDropList.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAIjE,OAAO,KAAK,EACV,MAAM,EACN,SAAS,EACT,YAAY,EACZ,cAAc,EAEd,UAAU,EACX,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,aAAa,EAA4B,MAAM,wBAAwB,CAAC;AAEtF,OAAO,KAAK,EACV,SAAS,EAET,qBAAqB,EACrB,cAAc,EACf,MAAM,mBAAmB,CAAC;AAM3B,UAAU,0BAA0B,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAC5D,SAAQ,MAAM,EACZ,SAAS,EACT,cAAc,EACd,UAAU,EACV,IAAI,CAAC,cAAc,EAAE,YAAY,CAAC;IACpC,qCAAqC;IACrC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,wCAAwC;IACxC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,+EAA+E;IAC/E,YAAY,EAAE,SAAS,CAAC;IACxB,+CAA+C;IAC/C,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;IAC1B,kFAAkF;IAClF,YAAY,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAC/B,kFAAkF;IAClF,kBAAkB,CAAC,EAAE,SAAS,CAAC;CAChC;AAqBD,QAAA,MAAM,qBAAqB,GAAI,CAAC,SAAS,MAAM,uJAW5C,0BAA0B,CAAC,CAAC,CAAC,GAAG,YAAY,4CA0X9C,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useRef, useMemo, useContext, useLayoutEffect, useEffect } from 'react';
|
|
3
|
+
import { useElement, useUID } from '@pega/cosmos-react-core';
|
|
4
|
+
import { Draggable, DragDropListContext, Droppable } from '@pega/cosmos-react-dnd';
|
|
5
|
+
import LifeCycleContext from './LifeCycleContext';
|
|
6
|
+
import { getListLocation } from './utils';
|
|
7
|
+
const LifeCycleDragDropList = ({ testId, id: idProp, type, listLocation, items, itemRenderer: ItemRenderer, additionalDropZone, onDragDrop, as: Component = 'ul', ...restProps }) => {
|
|
8
|
+
const { lifeCycleData, dragDropConfig, draggedItem, setDraggedItem } = useContext(LifeCycleContext);
|
|
9
|
+
const [clonedItems, setClonedItems] = useState(items);
|
|
10
|
+
const draggedItemRef = useRef(null);
|
|
11
|
+
const draggedItemElRef = useRef(null);
|
|
12
|
+
const itemHoveringRef = useRef(false);
|
|
13
|
+
const itemRectsRef = useRef(null);
|
|
14
|
+
const [listEl, setListEl] = useElement();
|
|
15
|
+
const uniqueId = useUID();
|
|
16
|
+
const listId = idProp ?? uniqueId;
|
|
17
|
+
const normalizedType = type.replace('alternate-', '');
|
|
18
|
+
const getItemData = (item, newIndex) => {
|
|
19
|
+
if (item.type === 'stage' || item.type === 'alternate-stage') {
|
|
20
|
+
const data = item.data;
|
|
21
|
+
return { alternate: !!data.item.alternate, stage: newIndex ?? data.item.index };
|
|
22
|
+
}
|
|
23
|
+
if (item.type === 'step' || item.type === 'alternate-step') {
|
|
24
|
+
const data = item.data;
|
|
25
|
+
return {
|
|
26
|
+
alternate: !!data.item.alternate,
|
|
27
|
+
stage: data.stageItem.index,
|
|
28
|
+
category: data.categoryItem.index,
|
|
29
|
+
task: data.taskItem.index,
|
|
30
|
+
subTask: data.taskItem.subIndex,
|
|
31
|
+
step: newIndex ?? data.item.index
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
return { alternate: false, stage: -1 };
|
|
35
|
+
};
|
|
36
|
+
const getItemRects = () => {
|
|
37
|
+
if (!listEl || listEl.children.length === 0)
|
|
38
|
+
return null;
|
|
39
|
+
return [...listEl.children].map(itemEl => {
|
|
40
|
+
return itemEl.getBoundingClientRect();
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
useLayoutEffect(() => {
|
|
44
|
+
if (!dragDropConfig.loading &&
|
|
45
|
+
(!draggedItem?.navigatingWithKeyboard ||
|
|
46
|
+
(draggedItem?.navigatingWithKeyboard && !draggedItemRef.current))) {
|
|
47
|
+
setClonedItems(items);
|
|
48
|
+
}
|
|
49
|
+
}, [items]);
|
|
50
|
+
const internalItemsRef = useRef(clonedItems);
|
|
51
|
+
internalItemsRef.current = clonedItems;
|
|
52
|
+
const triggerOnChange = (sourceData, targetData) => {
|
|
53
|
+
if (!onDragDrop ||
|
|
54
|
+
!sourceData ||
|
|
55
|
+
!targetData ||
|
|
56
|
+
JSON.stringify(sourceData) === JSON.stringify(targetData))
|
|
57
|
+
return;
|
|
58
|
+
onDragDrop({
|
|
59
|
+
type: normalizedType,
|
|
60
|
+
sourceData,
|
|
61
|
+
targetData
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
const getInsertIndex = (item, monitor) => {
|
|
65
|
+
itemRectsRef.current = getItemRects();
|
|
66
|
+
const { current: itemRects } = itemRectsRef;
|
|
67
|
+
let insertIndex = -1;
|
|
68
|
+
const prevIndex = clonedItems.findIndex(({ id }) => id === item.id);
|
|
69
|
+
const clientXY = monitor.getClientOffset();
|
|
70
|
+
if (!itemRects || !clientXY)
|
|
71
|
+
return insertIndex;
|
|
72
|
+
// If dragging stages, position must be calculated on the x-axis rather than the y-axis
|
|
73
|
+
const dragPreviewRectAnchor = normalizedType === 'stage' ? clientXY.x : clientXY.y;
|
|
74
|
+
const orientation = normalizedType === 'stage' ? 'horizontal' : 'vertical';
|
|
75
|
+
const calculateMiddle = ({ left, right, top, bottom }) => {
|
|
76
|
+
if (orientation === 'horizontal') {
|
|
77
|
+
return left + (right - left) / 2;
|
|
78
|
+
}
|
|
79
|
+
return top + (bottom - top) / 2;
|
|
80
|
+
};
|
|
81
|
+
const atHead = dragPreviewRectAnchor < calculateMiddle(itemRects[0]);
|
|
82
|
+
const atTail = dragPreviewRectAnchor >= calculateMiddle(itemRects[itemRects.length - 1]);
|
|
83
|
+
if (atHead) {
|
|
84
|
+
insertIndex = 0;
|
|
85
|
+
}
|
|
86
|
+
else if (atTail) {
|
|
87
|
+
insertIndex = prevIndex === itemRects.length - 1 ? prevIndex : itemRects.length;
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
itemRects.some((rect, i, rects) => {
|
|
91
|
+
if (i === rects.length - 1) {
|
|
92
|
+
if (prevIndex === i)
|
|
93
|
+
insertIndex = i;
|
|
94
|
+
return true;
|
|
95
|
+
}
|
|
96
|
+
const afterCurrent = dragPreviewRectAnchor >= calculateMiddle(rect);
|
|
97
|
+
const beforeNext = dragPreviewRectAnchor < calculateMiddle(rects[i + 1]);
|
|
98
|
+
if (afterCurrent && beforeNext) {
|
|
99
|
+
if (prevIndex !== -1 && i >= prevIndex)
|
|
100
|
+
insertIndex = i;
|
|
101
|
+
else
|
|
102
|
+
insertIndex = i + 1;
|
|
103
|
+
return true;
|
|
104
|
+
}
|
|
105
|
+
return false;
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
return insertIndex;
|
|
109
|
+
};
|
|
110
|
+
// Re-arrange items within the applicable lists in relation to the position of the item being dragged
|
|
111
|
+
const positionItems = (item, monitor) => {
|
|
112
|
+
if (!monitor.canDrop() || !monitor.isOver({ shallow: true }))
|
|
113
|
+
return;
|
|
114
|
+
const prevIndex = clonedItems.findIndex(({ id }) => id === item.id);
|
|
115
|
+
const insertIndex = getInsertIndex(item, monitor);
|
|
116
|
+
const targetData = { ...listLocation };
|
|
117
|
+
targetData[normalizedType] = insertIndex;
|
|
118
|
+
item.targetData = targetData;
|
|
119
|
+
item.targetListId = listId;
|
|
120
|
+
item.changeTarget = i => triggerOnChange(i.sourceData, i.targetData);
|
|
121
|
+
item.targetItemsRef = internalItemsRef;
|
|
122
|
+
let newItems;
|
|
123
|
+
if (prevIndex !== -1) {
|
|
124
|
+
if (insertIndex === prevIndex)
|
|
125
|
+
return;
|
|
126
|
+
newItems = clonedItems.filter(({ id }) => id !== item.id);
|
|
127
|
+
newItems.splice(insertIndex, 0, item);
|
|
128
|
+
setClonedItems(newItems);
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
newItems = [...clonedItems];
|
|
132
|
+
newItems.splice(insertIndex, 0, item);
|
|
133
|
+
setClonedItems(newItems);
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
// Setup data to manage the item being dragged
|
|
137
|
+
const onBegin = (itemId) => () => {
|
|
138
|
+
setDraggedItem({ type: normalizedType, id: itemId, navigatingWithKeyboard: false });
|
|
139
|
+
const initialIndex = clonedItems.findIndex(({ id }) => id === itemId);
|
|
140
|
+
const itemToDrag = clonedItems[initialIndex];
|
|
141
|
+
draggedItemRef.current = { ...itemToDrag, sourceListId: listId };
|
|
142
|
+
if (listEl) {
|
|
143
|
+
draggedItemElRef.current = listEl.querySelector(`[id="${itemToDrag.id}"]`);
|
|
144
|
+
if (draggedItemElRef.current) {
|
|
145
|
+
draggedItemElRef.current.setAttribute('style', 'opacity: 0.5');
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
const itemData = getItemData(itemToDrag);
|
|
149
|
+
return {
|
|
150
|
+
returnToSource: (item) => {
|
|
151
|
+
setClonedItems(currentItems => {
|
|
152
|
+
const newItems = currentItems.filter(({ id }) => id !== itemId);
|
|
153
|
+
newItems.splice(initialIndex, 0, item);
|
|
154
|
+
return newItems;
|
|
155
|
+
});
|
|
156
|
+
},
|
|
157
|
+
removeFromSource: () => {
|
|
158
|
+
setClonedItems(currentItems => currentItems.filter(({ id }) => id !== itemId));
|
|
159
|
+
},
|
|
160
|
+
changeTarget: i => triggerOnChange(i.sourceData, i.targetData),
|
|
161
|
+
targetItemsRef: internalItemsRef,
|
|
162
|
+
sourceData: itemData,
|
|
163
|
+
targetData: itemData,
|
|
164
|
+
sourceListId: listId,
|
|
165
|
+
targetListId: listId
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
// Execute necessary actions for when the item is dropped
|
|
169
|
+
const onEnd = (item, monitor) => {
|
|
170
|
+
if (!item)
|
|
171
|
+
return;
|
|
172
|
+
if (monitor.didDrop()) {
|
|
173
|
+
if (JSON.stringify(item.sourceData) === JSON.stringify(item.targetData)) {
|
|
174
|
+
setDraggedItem(undefined);
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
item.changeTarget?.(item);
|
|
178
|
+
if (item.sourceListId !== item.targetListId) {
|
|
179
|
+
item.removeFromSource?.();
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
setDraggedItem(undefined);
|
|
185
|
+
item.returnToSource?.(item);
|
|
186
|
+
}
|
|
187
|
+
draggedItemRef.current = null;
|
|
188
|
+
if (draggedItemElRef.current) {
|
|
189
|
+
draggedItemElRef.current.setAttribute('style', 'opacity: unset');
|
|
190
|
+
draggedItemElRef.current = null;
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
const contextValue = useMemo(() => ({
|
|
194
|
+
orientation: normalizedType === 'stage' ? 'horizontal' : 'vertical',
|
|
195
|
+
keyboardDragStart: itemId => {
|
|
196
|
+
const index = clonedItems.findIndex(({ id }) => id === itemId);
|
|
197
|
+
if (index === -1)
|
|
198
|
+
return;
|
|
199
|
+
const itemToDrag = clonedItems[index];
|
|
200
|
+
if (itemToDrag) {
|
|
201
|
+
setDraggedItem({ type: normalizedType, id: itemId, navigatingWithKeyboard: true });
|
|
202
|
+
const itemData = getItemData(itemToDrag);
|
|
203
|
+
itemToDrag.returnToSource = (item) => {
|
|
204
|
+
setClonedItems(currentItems => {
|
|
205
|
+
const newItems = currentItems.filter(({ id }) => id !== itemId);
|
|
206
|
+
newItems.splice(index, 0, item);
|
|
207
|
+
return newItems;
|
|
208
|
+
});
|
|
209
|
+
};
|
|
210
|
+
itemToDrag.sourceData = itemData;
|
|
211
|
+
itemToDrag.targetData = itemData;
|
|
212
|
+
itemToDrag.sourceListId = listId;
|
|
213
|
+
itemToDrag.targetListId = listId;
|
|
214
|
+
draggedItemRef.current = itemToDrag;
|
|
215
|
+
setClonedItems(currentItems => {
|
|
216
|
+
const newItems = currentItems.filter(({ id }) => id !== itemId);
|
|
217
|
+
newItems.splice(index, 0, itemToDrag);
|
|
218
|
+
return newItems;
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
keyboardDragEnd: itemId => {
|
|
223
|
+
const item = clonedItems.find(({ id }) => id === itemId);
|
|
224
|
+
if (!item)
|
|
225
|
+
return;
|
|
226
|
+
draggedItemRef.current = null;
|
|
227
|
+
triggerOnChange(item.sourceData, item.targetData);
|
|
228
|
+
},
|
|
229
|
+
keyboardDragCancel: itemId => {
|
|
230
|
+
const index = clonedItems.findIndex(({ id }) => id === itemId);
|
|
231
|
+
if (index === -1)
|
|
232
|
+
return;
|
|
233
|
+
setDraggedItem(undefined);
|
|
234
|
+
draggedItemRef.current = null;
|
|
235
|
+
clonedItems[index].returnToSource?.(clonedItems[index]);
|
|
236
|
+
},
|
|
237
|
+
keyboardReorderItem: (itemId, direction) => {
|
|
238
|
+
const index = clonedItems.findIndex(({ id }) => id === itemId);
|
|
239
|
+
if (index === -1)
|
|
240
|
+
return;
|
|
241
|
+
const itemData = getItemData(clonedItems[index]);
|
|
242
|
+
const newItems = [...clonedItems];
|
|
243
|
+
if (direction === 'prev' && index !== 0) {
|
|
244
|
+
const item = newItems.splice(index, 1)[0];
|
|
245
|
+
newItems.splice(index - 1, 0, {
|
|
246
|
+
...item,
|
|
247
|
+
targetData: { ...itemData, [normalizedType]: index - 1 }
|
|
248
|
+
});
|
|
249
|
+
setClonedItems(newItems);
|
|
250
|
+
}
|
|
251
|
+
else if (direction === 'next' && index !== clonedItems.length - 1) {
|
|
252
|
+
const item = newItems.splice(index, 1)[0];
|
|
253
|
+
newItems.splice(index + 1, 0, {
|
|
254
|
+
...item,
|
|
255
|
+
targetData: { ...itemData, [normalizedType]: index + 1 }
|
|
256
|
+
});
|
|
257
|
+
setClonedItems(newItems);
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
keyboardMoveLists: (itemId, direction) => {
|
|
261
|
+
const item = clonedItems.find(({ id }) => id === itemId);
|
|
262
|
+
if (!item)
|
|
263
|
+
return;
|
|
264
|
+
draggedItemRef.current = null;
|
|
265
|
+
setDraggedItem({ type: normalizedType, id: itemId, navigatingWithKeyboard: false });
|
|
266
|
+
const itemData = getItemData(item);
|
|
267
|
+
const targetListLocation = getListLocation(listLocation, normalizedType, lifeCycleData, direction);
|
|
268
|
+
if (targetListLocation) {
|
|
269
|
+
triggerOnChange(itemData, targetListLocation);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}), [clonedItems, triggerOnChange, normalizedType, listLocation, lifeCycleData]);
|
|
273
|
+
return (_jsx(DragDropListContext.Provider, { value: contextValue, children: _jsx(Droppable, { accept: dragDropConfig[type].accept, onHover: positionItems, onDrop: positionItems, children: ({ dropRef, collected: { isOver } }) => {
|
|
274
|
+
// Reset list items to original state if the item is no longer hovering over the list
|
|
275
|
+
// The useEffect is necessary for setting state within a render function
|
|
276
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
277
|
+
useEffect(() => {
|
|
278
|
+
if (!isOver && itemHoveringRef.current) {
|
|
279
|
+
const sourceItem = clonedItems.find(i => i.id === draggedItemRef.current?.id);
|
|
280
|
+
if (!sourceItem && !dragDropConfig.loading) {
|
|
281
|
+
// If item dragged away from target list, reset the items in that list to their original state
|
|
282
|
+
setClonedItems(items);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
itemHoveringRef.current = isOver;
|
|
286
|
+
}, [isOver]);
|
|
287
|
+
return (_jsxs(Component, { ref: (el) => {
|
|
288
|
+
dropRef(el);
|
|
289
|
+
setListEl(el);
|
|
290
|
+
}, ...restProps, children: [clonedItems.map(item => {
|
|
291
|
+
return (_jsx(Draggable, { id: item.id, type: item.type, data: item.data, onBegin: onBegin(item.id), onEnd: onEnd, children: ({ dragRef, previewRef, collected }) => {
|
|
292
|
+
return (_jsx(ItemRenderer, { testId: testId, id: item.id, type: item.type, ...item.data, dragRef: dragRef, previewRef: previewRef, ...collected, isDragging: !!item.sourceListId }));
|
|
293
|
+
} }, item.id));
|
|
294
|
+
}), additionalDropZone] }));
|
|
295
|
+
} }) }));
|
|
296
|
+
};
|
|
297
|
+
export default LifeCycleDragDropList;
|
|
298
|
+
//# sourceMappingURL=LifeCycleDragDropList.js.map
|