@pega/cosmos-react-build 8.0.0-build.9.0 → 8.0.0
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,151 +0,0 @@
|
|
|
1
|
-
import styled, { css } from 'styled-components';
|
|
2
|
-
import { defaultThemeProp, Card, Text, CardFooter, Icon } from '@pega/cosmos-react-core';
|
|
3
|
-
export const StyledCircle = styled.div(({ theme }) => {
|
|
4
|
-
return css `
|
|
5
|
-
height: 2rem;
|
|
6
|
-
width: 2rem;
|
|
7
|
-
background: var(--bg-color);
|
|
8
|
-
border-radius: 50%;
|
|
9
|
-
align-self: center;
|
|
10
|
-
&:focus {
|
|
11
|
-
outline: none;
|
|
12
|
-
box-shadow: ${theme.base.shadow.focus};
|
|
13
|
-
}
|
|
14
|
-
`;
|
|
15
|
-
});
|
|
16
|
-
StyledCircle.defaultProps = defaultThemeProp;
|
|
17
|
-
export const StyledLabel = styled(Text)(({ nodeType, theme }) => {
|
|
18
|
-
return css `
|
|
19
|
-
align-self: center;
|
|
20
|
-
${nodeType.name === 'start'
|
|
21
|
-
? css `
|
|
22
|
-
padding-block-end: ${theme.base.spacing};
|
|
23
|
-
`
|
|
24
|
-
: css `
|
|
25
|
-
padding-block-start: ${theme.base.spacing};
|
|
26
|
-
`}
|
|
27
|
-
`;
|
|
28
|
-
});
|
|
29
|
-
StyledLabel.defaultProps = defaultThemeProp;
|
|
30
|
-
export const StyledIcon = styled.div(({ theme }) => {
|
|
31
|
-
return css `
|
|
32
|
-
min-height: 2rem;
|
|
33
|
-
min-width: 2rem;
|
|
34
|
-
padding: calc(0.5 * ${theme.base.spacing});
|
|
35
|
-
margin-inline-end: ${theme.base.spacing};
|
|
36
|
-
text-align: center;
|
|
37
|
-
background-color: var(--bg-color);
|
|
38
|
-
color: var(--fg-color);
|
|
39
|
-
border-radius: ${theme.base['border-radius']};
|
|
40
|
-
`;
|
|
41
|
-
});
|
|
42
|
-
StyledIcon.defaultProps = defaultThemeProp;
|
|
43
|
-
export const StyledNodeTemplateHeader = styled.header(({ theme }) => {
|
|
44
|
-
return css `
|
|
45
|
-
white-space: nowrap;
|
|
46
|
-
button {
|
|
47
|
-
border-radius: ${theme.base['border-radius']};
|
|
48
|
-
}
|
|
49
|
-
`;
|
|
50
|
-
});
|
|
51
|
-
StyledNodeTemplateHeader.defaultProps = defaultThemeProp;
|
|
52
|
-
export const StyledText = styled(Text)(({ error, theme }) => {
|
|
53
|
-
return css `
|
|
54
|
-
padding-inline-end: ${theme.base.spacing};
|
|
55
|
-
overflow: hidden;
|
|
56
|
-
text-overflow: ellipsis;
|
|
57
|
-
max-width: ${error ? '20ch' : '23ch'};
|
|
58
|
-
`;
|
|
59
|
-
});
|
|
60
|
-
StyledText.defaultProps = defaultThemeProp;
|
|
61
|
-
export const StyledNodeTemplate = styled(Card)(({ highlight, theme }) => {
|
|
62
|
-
return css `
|
|
63
|
-
width: 17.5rem;
|
|
64
|
-
height: 7.5rem;
|
|
65
|
-
align-self: center;
|
|
66
|
-
overflow: hidden;
|
|
67
|
-
border: 0.125rem solid transparent;
|
|
68
|
-
|
|
69
|
-
${highlight &&
|
|
70
|
-
css `
|
|
71
|
-
&&& {
|
|
72
|
-
color: ${theme.base.colors.black};
|
|
73
|
-
background-color: ${theme.base.colors.red['extra-light']};
|
|
74
|
-
border-radius: 0.25rem;
|
|
75
|
-
box-shadow: 0 0 0 0.125rem ${theme.base.colors.red.medium};
|
|
76
|
-
}
|
|
77
|
-
`}
|
|
78
|
-
|
|
79
|
-
&&& {
|
|
80
|
-
border-radius: ${theme.base['border-radius']};
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
&:hover {
|
|
84
|
-
cursor: pointer;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
:focus-visible {
|
|
88
|
-
box-shadow: ${theme.base.shadow.focus};
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
&[aria-current='location'] {
|
|
92
|
-
box-shadow: none;
|
|
93
|
-
border: 0.125rem solid ${theme.base.palette.interactive};
|
|
94
|
-
cursor: pointer;
|
|
95
|
-
}
|
|
96
|
-
`;
|
|
97
|
-
});
|
|
98
|
-
StyledNodeTemplate.defaultProps = defaultThemeProp;
|
|
99
|
-
export const StyledNodeTemplateFooter = styled(CardFooter)(({ theme }) => {
|
|
100
|
-
return css `
|
|
101
|
-
margin-top: auto;
|
|
102
|
-
&:not(${StyledNodeTemplate} ${StyledNodeTemplate} > &) {
|
|
103
|
-
padding: ${theme.base.spacing};
|
|
104
|
-
}
|
|
105
|
-
`;
|
|
106
|
-
});
|
|
107
|
-
StyledNodeTemplateFooter.defaultProps = defaultThemeProp;
|
|
108
|
-
export const StyledNodeTempleteContent = styled.div(({ theme }) => {
|
|
109
|
-
return css `
|
|
110
|
-
padding: ${theme.base.spacing};
|
|
111
|
-
padding-block-start: 0;
|
|
112
|
-
max-height: 2.5rem;
|
|
113
|
-
display: -webkit-box;
|
|
114
|
-
-webkit-line-clamp: 2;
|
|
115
|
-
-webkit-box-orient: vertical;
|
|
116
|
-
overflow: hidden;
|
|
117
|
-
text-overflow: ellipsis;
|
|
118
|
-
white-space: pre-wrap;
|
|
119
|
-
word-wrap: break-word;
|
|
120
|
-
`;
|
|
121
|
-
});
|
|
122
|
-
StyledNodeTempleteContent.defaultProps = defaultThemeProp;
|
|
123
|
-
export const StyledAdditionalData = styled.dl `
|
|
124
|
-
overflow: hidden;
|
|
125
|
-
`;
|
|
126
|
-
export const StyledAdditionalDataItem = styled.div(({ theme }) => {
|
|
127
|
-
return css `
|
|
128
|
-
padding: 0 calc(0.5 * ${theme.base.spacing});
|
|
129
|
-
background-color: ${theme.base.palette['secondary-background']};
|
|
130
|
-
border-radius: ${theme.base['border-radius']};
|
|
131
|
-
`;
|
|
132
|
-
});
|
|
133
|
-
StyledAdditionalDataItem.defaultProps = defaultThemeProp;
|
|
134
|
-
export const StyledTextWithEllipsis = styled(Text)(() => {
|
|
135
|
-
return css `
|
|
136
|
-
overflow: hidden;
|
|
137
|
-
width: auto;
|
|
138
|
-
display: inline-block;
|
|
139
|
-
white-space: nowrap;
|
|
140
|
-
text-overflow: ellipsis;
|
|
141
|
-
`;
|
|
142
|
-
});
|
|
143
|
-
StyledTextWithEllipsis.defaultProps = defaultThemeProp;
|
|
144
|
-
export const StyledErrorIcon = styled(Icon)(({ theme }) => {
|
|
145
|
-
return css `
|
|
146
|
-
color: ${theme.base.palette.urgent};
|
|
147
|
-
margin-inline-end: ${theme.base.spacing};
|
|
148
|
-
`;
|
|
149
|
-
});
|
|
150
|
-
StyledErrorIcon.defaultProps = defaultThemeProp;
|
|
151
|
-
//# sourceMappingURL=NodeTemplate.styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NodeTemplate.styles.js","sourceRoot":"","sources":["../../../../src/components/FlowModeller/Node/NodeTemplate.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAIzF,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACnD,OAAO,GAAG,CAAA;;;;;;;;oBAQQ,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;;GAExC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,YAAY,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE7C,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,CAAyB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE;IACtF,OAAO,GAAG,CAAA;;MAEN,QAAQ,CAAC,IAAI,KAAK,OAAO;QACzB,C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OAAO,GAAG,CAAA;4BACgB,KAAK,CAAC,IAAI,CAAC,OAAO;wBACtB,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC;qBAC7C,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC;GAC7C,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,wBAAwB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEzD,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE;IACtD,OAAO,GAAG,CAAA;;;;;;GAMT,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,sBAAsB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEvD,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACxD,OAAO,GAAG,CAAA;aACC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM;yBACb,KAAK,CAAC,IAAI,CAAC,OAAO;GACxC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { defaultThemeProp, Card, Text, CardFooter, Icon } from '@pega/cosmos-react-core';\n\nimport type { NodeType } from './Node.types';\n\nexport const StyledCircle = styled.div(({ theme }) => {\n return css`\n height: 2rem;\n width: 2rem;\n background: var(--bg-color);\n border-radius: 50%;\n align-self: center;\n &:focus {\n outline: none;\n box-shadow: ${theme.base.shadow.focus};\n }\n `;\n});\n\nStyledCircle.defaultProps = defaultThemeProp;\n\nexport const StyledLabel = styled(Text)<{ nodeType: NodeType }>(({ nodeType, theme }) => {\n return css`\n align-self: center;\n ${nodeType.name === 'start'\n ? css`\n padding-block-end: ${theme.base.spacing};\n `\n : css`\n padding-block-start: ${theme.base.spacing};\n `}\n `;\n});\n\nStyledLabel.defaultProps = defaultThemeProp;\n\nexport const StyledIcon = styled.div(({ theme }) => {\n return css`\n min-height: 2rem;\n min-width: 2rem;\n padding: calc(0.5 * ${theme.base.spacing});\n margin-inline-end: ${theme.base.spacing};\n text-align: center;\n background-color: var(--bg-color);\n color: var(--fg-color);\n border-radius: ${theme.base['border-radius']};\n `;\n});\n\nStyledIcon.defaultProps = defaultThemeProp;\n\nexport const StyledNodeTemplateHeader = styled.header(({ theme }) => {\n return css`\n white-space: nowrap;\n button {\n border-radius: ${theme.base['border-radius']};\n }\n `;\n});\n\nStyledNodeTemplateHeader.defaultProps = defaultThemeProp;\n\nexport const StyledText = styled(Text)<{ error?: string | undefined }>(({ error, theme }) => {\n return css`\n padding-inline-end: ${theme.base.spacing};\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: ${error ? '20ch' : '23ch'};\n `;\n});\n\nStyledText.defaultProps = defaultThemeProp;\n\nexport const StyledNodeTemplate = styled(Card)<{ highlight: boolean }>(({ highlight, theme }) => {\n return css`\n width: 17.5rem;\n height: 7.5rem;\n align-self: center;\n overflow: hidden;\n border: 0.125rem solid transparent;\n\n ${highlight &&\n css`\n &&& {\n color: ${theme.base.colors.black};\n background-color: ${theme.base.colors.red['extra-light']};\n border-radius: 0.25rem;\n box-shadow: 0 0 0 0.125rem ${theme.base.colors.red.medium};\n }\n `}\n\n &&& {\n border-radius: ${theme.base['border-radius']};\n }\n\n &:hover {\n cursor: pointer;\n }\n\n :focus-visible {\n box-shadow: ${theme.base.shadow.focus};\n }\n\n &[aria-current='location'] {\n box-shadow: none;\n border: 0.125rem solid ${theme.base.palette.interactive};\n cursor: pointer;\n }\n `;\n});\n\nStyledNodeTemplate.defaultProps = defaultThemeProp;\n\nexport const StyledNodeTemplateFooter = styled(CardFooter)(({ theme }) => {\n return css`\n margin-top: auto;\n &:not(${StyledNodeTemplate} ${StyledNodeTemplate} > &) {\n padding: ${theme.base.spacing};\n }\n `;\n});\n\nStyledNodeTemplateFooter.defaultProps = defaultThemeProp;\n\nexport const StyledNodeTempleteContent = styled.div(({ theme }) => {\n return css`\n padding: ${theme.base.spacing};\n padding-block-start: 0;\n max-height: 2.5rem;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: pre-wrap;\n word-wrap: break-word;\n `;\n});\n\nStyledNodeTempleteContent.defaultProps = defaultThemeProp;\n\nexport const StyledAdditionalData = styled.dl`\n overflow: hidden;\n`;\n\nexport const StyledAdditionalDataItem = styled.div(({ theme }) => {\n return css`\n padding: 0 calc(0.5 * ${theme.base.spacing});\n background-color: ${theme.base.palette['secondary-background']};\n border-radius: ${theme.base['border-radius']};\n `;\n});\n\nStyledAdditionalDataItem.defaultProps = defaultThemeProp;\n\nexport const StyledTextWithEllipsis = styled(Text)(() => {\n return css`\n overflow: hidden;\n width: auto;\n display: inline-block;\n white-space: nowrap;\n text-overflow: ellipsis;\n `;\n});\n\nStyledTextWithEllipsis.defaultProps = defaultThemeProp;\n\nexport const StyledErrorIcon = styled(Icon)(({ theme }) => {\n return css`\n color: ${theme.base.palette.urgent};\n margin-inline-end: ${theme.base.spacing};\n `;\n});\n\nStyledErrorIcon.defaultProps = defaultThemeProp;\n"]}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { PropsWithoutRef } from 'react';
|
|
2
|
-
import type { NodeProps, NodeComponentProps } from './Node.types';
|
|
3
|
-
export declare const DefaultNode: ({ id, label, type, description, additionalData, actions, onActionClick, onClick, onDelete, reference, error, selected, referencedNode, ...restProps }: NodeComponentProps) => JSX.Element;
|
|
4
|
-
export declare const StartNode: ({ type, label }: PropsWithoutRef<NodeProps>) => JSX.Element;
|
|
5
|
-
export declare const EndNode: ({ type, label }: PropsWithoutRef<NodeProps>) => JSX.Element;
|
|
6
|
-
//# sourceMappingURL=NodeTemplates.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NodeTemplates.d.ts","sourceRoot":"","sources":["../../../../src/components/FlowModeller/Node/NodeTemplates.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAgD,MAAM,OAAO,CAAC;AA8B3F,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAA2B,MAAM,cAAc,CAAC;AAqC3F,eAAO,MAAM,WAAW,0JAerB,kBAAkB,gBAkGpB,CAAC;AAEF,eAAO,MAAM,SAAS,oBAAqB,eAAe,CAAC,SAAS,CAAC,gBAgBpE,CAAC;AAEF,eAAO,MAAM,OAAO,oBAAqB,eAAe,CAAC,SAAS,CAAC,gBAgBlE,CAAC"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback, useContext } from 'react';
|
|
3
|
-
import { MenuButton, Icon, Flex, useI18n, Text, registerIcon, readableColor } from '@pega/cosmos-react-core';
|
|
4
|
-
import * as warnSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/warn-solid.icon';
|
|
5
|
-
import { colorMap } from '../../../utils';
|
|
6
|
-
import FlowModellerContext from '../FlowModellerContext';
|
|
7
|
-
import { StyledLabel, StyledCircle, StyledIcon, StyledNodeTemplateHeader, StyledNodeTempleteContent, StyledNodeTemplate, StyledText, StyledTextWithEllipsis, StyledAdditionalData, StyledNodeTemplateFooter, StyledAdditionalDataItem, StyledErrorIcon } from './NodeTemplate.styles';
|
|
8
|
-
registerIcon(warnSolidIcon);
|
|
9
|
-
const MetaListItem = ({ label, value }) => {
|
|
10
|
-
return (_jsxs(Flex, { as: StyledAdditionalDataItem, container: { wrap: 'nowrap', pad: 0.25, gap: 0.25 }, item: { grow: 1 }, children: [_jsx(StyledTextWithEllipsis, { as: 'dd', children: label }), _jsx(Text, { role: 'separator', variant: 'secondary', "aria-hidden": true, children: ":\u00A0" }), _jsx(StyledTextWithEllipsis, { as: 'dt', children: value })] }));
|
|
11
|
-
};
|
|
12
|
-
const MetaList = ({ metadata }) => {
|
|
13
|
-
return (_jsxs(Flex, { as: StyledAdditionalData, container: { wrap: 'nowrap', colGap: 1, rowGap: 0.25 }, children: [metadata?.map((data, index) => {
|
|
14
|
-
if (index >= 2) {
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
return _jsx(MetaListItem, { ...data }, data.id);
|
|
18
|
-
}), metadata && metadata.length > 2 && (_jsx(Flex, { as: StyledAdditionalDataItem, container: { pad: 0.25 }, item: { grow: 1, shrink: 0 }, children: _jsx(StyledTextWithEllipsis, { as: 'dt', children: `+${metadata.length - 2}` }) }))] }));
|
|
19
|
-
};
|
|
20
|
-
export const DefaultNode = ({ id, label, type, description, additionalData, actions, onActionClick, onClick, onDelete, reference, error, selected, referencedNode, ...restProps }) => {
|
|
21
|
-
const t = useI18n();
|
|
22
|
-
const actionItems = actions?.map(actionItem => {
|
|
23
|
-
return {
|
|
24
|
-
id: actionItem.id,
|
|
25
|
-
primary: actionItem.text,
|
|
26
|
-
onClick: (actionId, e) => {
|
|
27
|
-
e.stopPropagation();
|
|
28
|
-
onActionClick?.({ actionId, nodeId: id }, e);
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
});
|
|
32
|
-
const references = referencedNode && [
|
|
33
|
-
{ id: referencedNode?.id, label: t('go_to_noun'), value: referencedNode?.label }
|
|
34
|
-
];
|
|
35
|
-
if (onDelete !== undefined) {
|
|
36
|
-
actionItems?.push({
|
|
37
|
-
id: 'flowmodeller-delete-node',
|
|
38
|
-
primary: t('delete'),
|
|
39
|
-
onClick: (actionId, e) => {
|
|
40
|
-
e.stopPropagation();
|
|
41
|
-
onDelete?.({ actionId, nodeId: id }, e);
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
const handleEnterKeyDown = useCallback((e) => {
|
|
46
|
-
if (e.key === 'Enter' && !e.shiftKey) {
|
|
47
|
-
onClick?.(id, e);
|
|
48
|
-
}
|
|
49
|
-
}, [onClick]);
|
|
50
|
-
const color = readableColor(colorMap[type.color]);
|
|
51
|
-
const { readOnly, highlights } = useContext(FlowModellerContext);
|
|
52
|
-
return (_jsxs(StyledNodeTemplate, { "aria-label": error ? t('step_name_error', [label]) : label, "aria-current": selected ? 'location' : undefined, onClick: (e) => onClick?.(id, e), onKeyDown: handleEnterKeyDown, id: `modeller-node-${id}`, highlight: !!highlights?.nodes?.[id], ...restProps, children: [_jsxs(Flex, { as: StyledNodeTemplateHeader, container: { alignItems: 'center', pad: 1, justify: 'between' }, children: [_jsxs(Flex, { container: { alignItems: 'center' }, children: [error && _jsx(StyledErrorIcon, { name: 'warn-solid' }), _jsx(StyledIcon, { id: id, style: {
|
|
53
|
-
'--bg-color': colorMap[type.color],
|
|
54
|
-
'--fg-color': color
|
|
55
|
-
}, children: _jsx(Icon, { name: type.icon }) }), _jsx(StyledText, { variant: 'h4', children: label })] }), !readOnly && actionItems && (_jsx(MenuButton, { portal: true, variant: 'simple', text: t('actions'), icon: 'more', iconOnly: true, onClick: (e) => e.stopPropagation(), onKeyDown: (e) => e.stopPropagation(), menu: {
|
|
56
|
-
items: actionItems
|
|
57
|
-
} }))] }), description && _jsx(StyledNodeTempleteContent, { children: description }), additionalData && type.minConnectors > 0 && (_jsx(StyledNodeTemplateFooter, { children: _jsx(MetaList, { metadata: additionalData }) })), references && type.minConnectors < 1 && (_jsx(StyledNodeTemplateFooter, { children: _jsx(MetaList, { metadata: references }) }))] }));
|
|
58
|
-
};
|
|
59
|
-
export const StartNode = ({ type, label }) => {
|
|
60
|
-
return (_jsxs(Flex, { container: { justify: 'center', direction: 'column' }, children: [_jsx(StyledLabel, { nodeType: type, children: label }), _jsx(StyledCircle, { style: {
|
|
61
|
-
'--bg-color': colorMap[type.color]
|
|
62
|
-
}, tabIndex: 0, "aria-label": label, role: 'button' })] }));
|
|
63
|
-
};
|
|
64
|
-
export const EndNode = ({ type, label }) => {
|
|
65
|
-
return (_jsxs(Flex, { container: { justify: 'center', direction: 'column' }, children: [_jsx(StyledCircle, { style: {
|
|
66
|
-
'--bg-color': colorMap[type.color]
|
|
67
|
-
}, tabIndex: 0, "aria-label": label, role: 'button' }), _jsx(StyledLabel, { nodeType: type, children: label })] }));
|
|
68
|
-
};
|
|
69
|
-
//# sourceMappingURL=NodeTemplates.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NodeTemplates.js","sourceRoot":"","sources":["../../../../src/components/FlowModeller/Node/NodeTemplates.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGhD,OAAO,EACL,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,aAAa,EACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,aAAa,MAAM,mEAAmE,CAAC;AAEnG,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,mBAAmB,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EACL,WAAW,EACX,YAAY,EACZ,UAAU,EACV,wBAAwB,EACxB,yBAAyB,EACzB,kBAAkB,EAClB,UAAU,EACV,sBAAsB,EACtB,oBAAoB,EACpB,wBAAwB,EACxB,wBAAwB,EACxB,eAAe,EAChB,MAAM,uBAAuB,CAAC;AAG/B,YAAY,CAAC,aAAa,CAAC,CAAC;AAE5B,MAAM,YAAY,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,EAA2B,EAAE,EAAE;IACjE,OAAO,CACL,MAAC,IAAI,IACH,EAAE,EAAE,wBAAwB,EAC5B,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,EACnD,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,aAEjB,KAAC,sBAAsB,IAAC,EAAE,EAAC,IAAI,YAAE,KAAK,GAA0B,EAChE,KAAC,IAAI,IAAC,IAAI,EAAC,WAAW,EAAC,OAAO,EAAC,WAAW,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AY,IACX,KAAK,EACH;oBACE,YAAY,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;iBAClB,EAEpB,QAAQ,EAAE,CAAC,gBACC,KAAK,EACjB,IAAI,EAAC,QAAQ,GACb,EACF,KAAC,WAAW,IAAC,QAAQ,EAAE,IAAI,YAAG,KAAK,GAAe,IAC7C,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useCallback, useContext } from 'react';\nimport type { PropsWithoutRef, CSSProperties, MouseEvent, KeyboardEvent, FC } from 'react';\n\nimport {\n MenuButton,\n Icon,\n Flex,\n useI18n,\n Text,\n registerIcon,\n readableColor\n} from '@pega/cosmos-react-core';\nimport * as warnSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/warn-solid.icon';\n\nimport { colorMap } from '../../../utils';\nimport FlowModellerContext from '../FlowModellerContext';\n\nimport {\n StyledLabel,\n StyledCircle,\n StyledIcon,\n StyledNodeTemplateHeader,\n StyledNodeTempleteContent,\n StyledNodeTemplate,\n StyledText,\n StyledTextWithEllipsis,\n StyledAdditionalData,\n StyledNodeTemplateFooter,\n StyledAdditionalDataItem,\n StyledErrorIcon\n} from './NodeTemplate.styles';\nimport type { NodeProps, NodeComponentProps, AdditionalDataItemProps } from './Node.types';\n\nregisterIcon(warnSolidIcon);\n\nconst MetaListItem = ({ label, value }: AdditionalDataItemProps) => {\n return (\n <Flex\n as={StyledAdditionalDataItem}\n container={{ wrap: 'nowrap', pad: 0.25, gap: 0.25 }}\n item={{ grow: 1 }}\n >\n <StyledTextWithEllipsis as='dd'>{label}</StyledTextWithEllipsis>\n <Text role='separator' variant='secondary' aria-hidden>\n : \n </Text>\n <StyledTextWithEllipsis as='dt'>{value}</StyledTextWithEllipsis>\n </Flex>\n );\n};\n\nconst MetaList: FC<{ metadata: NodeProps['additionalData'] }> = ({ metadata }) => {\n return (\n <Flex as={StyledAdditionalData} container={{ wrap: 'nowrap', colGap: 1, rowGap: 0.25 }}>\n {metadata?.map((data: AdditionalDataItemProps, index: number) => {\n if (index >= 2) {\n return;\n }\n return <MetaListItem key={data.id} {...data} />;\n })}\n {metadata && metadata.length > 2 && (\n <Flex as={StyledAdditionalDataItem} container={{ pad: 0.25 }} item={{ grow: 1, shrink: 0 }}>\n <StyledTextWithEllipsis as='dt'>{`+${metadata.length - 2}`}</StyledTextWithEllipsis>\n </Flex>\n )}\n </Flex>\n );\n};\nexport const DefaultNode = ({\n id,\n label,\n type,\n description,\n additionalData,\n actions,\n onActionClick,\n onClick,\n onDelete,\n reference,\n error,\n selected,\n referencedNode,\n ...restProps\n}: NodeComponentProps) => {\n const t = useI18n();\n\n const actionItems = actions?.map(actionItem => {\n return {\n id: actionItem.id,\n primary: actionItem.text,\n onClick: (actionId: string, e: MouseEvent) => {\n e.stopPropagation();\n onActionClick?.({ actionId, nodeId: id }, e);\n }\n };\n });\n\n const references = referencedNode && [\n { id: referencedNode?.id, label: t('go_to_noun'), value: referencedNode?.label }\n ];\n\n if (onDelete !== undefined) {\n actionItems?.push({\n id: 'flowmodeller-delete-node',\n primary: t('delete'),\n onClick: (actionId: string, e: MouseEvent) => {\n e.stopPropagation();\n onDelete?.({ actionId, nodeId: id }, e);\n }\n });\n }\n\n const handleEnterKeyDown = useCallback(\n (e: KeyboardEvent) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n onClick?.(id, e);\n }\n },\n [onClick]\n );\n\n const color = readableColor(colorMap[type.color]);\n const { readOnly, highlights } = useContext(FlowModellerContext);\n\n return (\n <StyledNodeTemplate\n aria-label={error ? t('step_name_error', [label]) : label}\n aria-current={selected ? 'location' : undefined}\n onClick={(e: MouseEvent) => onClick?.(id, e)}\n onKeyDown={handleEnterKeyDown}\n id={`modeller-node-${id}`}\n highlight={!!highlights?.nodes?.[id]}\n {...restProps}\n >\n <Flex\n as={StyledNodeTemplateHeader}\n container={{ alignItems: 'center', pad: 1, justify: 'between' }}\n >\n <Flex container={{ alignItems: 'center' }}>\n {error && <StyledErrorIcon name='warn-solid' />}\n <StyledIcon\n id={id}\n style={\n {\n '--bg-color': colorMap[type.color],\n '--fg-color': color\n } as CSSProperties\n }\n >\n <Icon name={type.icon} />\n </StyledIcon>\n <StyledText variant='h4'>{label}</StyledText>\n </Flex>\n {!readOnly && actionItems && (\n <MenuButton\n portal\n variant='simple'\n text={t('actions')}\n icon='more'\n iconOnly\n onClick={(e: MouseEvent) => e.stopPropagation()}\n onKeyDown={(e: KeyboardEvent) => e.stopPropagation()}\n menu={{\n items: actionItems\n }}\n />\n )}\n </Flex>\n {description && <StyledNodeTempleteContent>{description}</StyledNodeTempleteContent>}\n {additionalData && type.minConnectors > 0 && (\n <StyledNodeTemplateFooter>\n <MetaList metadata={additionalData} />\n </StyledNodeTemplateFooter>\n )}\n {references && type.minConnectors < 1 && (\n <StyledNodeTemplateFooter>\n <MetaList metadata={references} />\n </StyledNodeTemplateFooter>\n )}\n </StyledNodeTemplate>\n );\n};\n\nexport const StartNode = ({ type, label }: PropsWithoutRef<NodeProps>) => {\n return (\n <Flex container={{ justify: 'center', direction: 'column' }}>\n <StyledLabel nodeType={type}>{label}</StyledLabel>\n <StyledCircle\n style={\n {\n '--bg-color': colorMap[type.color]\n } as CSSProperties\n }\n tabIndex={0}\n aria-label={label}\n role='button'\n />\n </Flex>\n );\n};\n\nexport const EndNode = ({ type, label }: PropsWithoutRef<NodeProps>) => {\n return (\n <Flex container={{ justify: 'center', direction: 'column' }}>\n <StyledCircle\n style={\n {\n '--bg-color': colorMap[type.color]\n } as CSSProperties\n }\n tabIndex={0}\n aria-label={label}\n role='button'\n />\n <StyledLabel nodeType={type}>{label}</StyledLabel>\n </Flex>\n );\n};\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Node.d.ts","sourceRoot":"","sources":["../../../src/components/FlowModeller/Node.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAc,MAAM,OAAO,CAAC;AAS5C,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEhE,QAAA,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,CAkCtB,CAAC;AAEH,eAAe,IAAI,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { memo, useCallback } from 'react';
|
|
3
|
-
import { START_NODETYPE, STOP_NODETYPE } from './Node/Node.types';
|
|
4
|
-
import { DefaultNode, EndNode, StartNode } from './Node/NodeTemplates';
|
|
5
|
-
const Node = memo(props => {
|
|
6
|
-
const { id, type, label, data, ...restProps } = props;
|
|
7
|
-
const clickHandler = useCallback((nodeId, e) => {
|
|
8
|
-
data?.onClick?.(nodeId, e);
|
|
9
|
-
}, [data?.onClick]);
|
|
10
|
-
if (!type) {
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
|
-
if (type?.id === START_NODETYPE.id) {
|
|
14
|
-
return _jsx(StartNode, { id: id, type: type, label: label.toUpperCase() });
|
|
15
|
-
}
|
|
16
|
-
if (type?.id === STOP_NODETYPE.id) {
|
|
17
|
-
return _jsx(EndNode, { id: id, type: type, label: label.toUpperCase() });
|
|
18
|
-
}
|
|
19
|
-
return (_jsx(DefaultNode, { ...restProps, id: id, label: label, type: type, onClick: clickHandler, onDelete: data?.onDelete, onActionClick: data?.onActionClick, actions: data?.actions, selected: data.selected }));
|
|
20
|
-
});
|
|
21
|
-
export default Node;
|
|
22
|
-
//# sourceMappingURL=Node.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Node.js","sourceRoot":"","sources":["../../../src/components/FlowModeller/Node.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAMlE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAA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ent } from 'react';\n\nimport { START_NODETYPE, STOP_NODETYPE } from './Node/Node.types';\nimport type {\n ModellerNodeComponentProps,\n NodeComponentData,\n NodeComponentProps\n} from './Node/Node.types';\nimport { DefaultNode, EndNode, StartNode } from './Node/NodeTemplates';\nimport type { Node as GraphNode } from './Renderer/Utils/Graph';\n\nconst Node: FC<GraphNode> = memo(props => {\n const { id, type, label, data, ...restProps } =\n props as ModellerNodeComponentProps<NodeComponentData>;\n\n const clickHandler = useCallback(\n (nodeId: string, e: MouseEvent) => {\n data?.onClick?.(nodeId, e);\n },\n [data?.onClick]\n );\n\n if (!type) {\n return null;\n }\n\n if (type?.id === START_NODETYPE.id) {\n return <StartNode id={id} type={type} label={label.toUpperCase()} />;\n }\n if (type?.id === STOP_NODETYPE.id) {\n return <EndNode id={id} type={type} label={label.toUpperCase()} />;\n }\n return (\n <DefaultNode\n {...restProps}\n id={id}\n label={label}\n type={type}\n onClick={clickHandler as NodeComponentProps['onClick']}\n onDelete={data?.onDelete}\n onActionClick={data?.onActionClick}\n actions={data?.actions}\n selected={data.selected}\n />\n );\n});\n\nexport default Node;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Renderer.d.ts","sourceRoot":"","sources":["../../../../src/components/FlowModeller/Renderer/Renderer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAOhC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAwBtD,QAAA,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CA+C/B,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { createElement as _createElement } from "react";
|
|
3
|
-
import { useContext } from 'react';
|
|
4
|
-
import styled, { css } from 'styled-components';
|
|
5
|
-
import { Flex } from '@pega/cosmos-react-core';
|
|
6
|
-
import FlowModellerContext from '../FlowModellerContext';
|
|
7
|
-
import GraphLayout from './Utils/GraphLayout';
|
|
8
|
-
import { DirectedGraph } from './Utils/Graph';
|
|
9
|
-
const StyledWrapper = styled.div `
|
|
10
|
-
position: relative;
|
|
11
|
-
width: 100%;
|
|
12
|
-
height: 100%;
|
|
13
|
-
`;
|
|
14
|
-
const StyledContentWrapper = styled.div `
|
|
15
|
-
position: absolute;
|
|
16
|
-
top: 0;
|
|
17
|
-
left: 0;
|
|
18
|
-
`;
|
|
19
|
-
const StyledNodeWrapper = styled(StyledContentWrapper)(() => {
|
|
20
|
-
return css `
|
|
21
|
-
width: var(--width);
|
|
22
|
-
height: var(--height);
|
|
23
|
-
transform: translate(var(--xPos), var(--yPos));
|
|
24
|
-
`;
|
|
25
|
-
});
|
|
26
|
-
const Renderer = ({ graphData, connector: Connector, node: Node }) => {
|
|
27
|
-
// apply the plotted positions
|
|
28
|
-
const { readOnly } = useContext(FlowModellerContext);
|
|
29
|
-
const graph = new DirectedGraph(graphData);
|
|
30
|
-
const graphDimensions = GraphLayout.plot(graphData, readOnly);
|
|
31
|
-
return (_jsxs(StyledWrapper, { children: [_jsx(StyledContentWrapper, { children: _jsx("svg", { width: graphDimensions.width, height: graphDimensions.height, viewBox: `0 0 ${graphDimensions.width} ${graphDimensions.height}`, children: Connector &&
|
|
32
|
-
graphData.connectors.map(item => {
|
|
33
|
-
return _createElement(Connector, { ...item, key: item.id });
|
|
34
|
-
}) }) }), _jsx(StyledContentWrapper, { children: graphData.nodes.map(item => {
|
|
35
|
-
let referencedNode;
|
|
36
|
-
if (item.type?.minConnectors === 0 && item.reference) {
|
|
37
|
-
referencedNode = graph.getNode(item.reference);
|
|
38
|
-
}
|
|
39
|
-
return (_jsx(Flex, { as: StyledNodeWrapper, id: item.id, style: {
|
|
40
|
-
'--width': `${item.dimensions.width}px`,
|
|
41
|
-
'--height': `${item.dimensions.height}px`,
|
|
42
|
-
'--xPos': `${item.position.x}px`,
|
|
43
|
-
'--yPos': `${item.position.y}px`
|
|
44
|
-
}, container: { justify: 'center' }, children: Node && _jsx(Node, { ...item, referencedNode: referencedNode }) }, item.id));
|
|
45
|
-
}) })] }));
|
|
46
|
-
};
|
|
47
|
-
export default Renderer;
|
|
48
|
-
//# sourceMappingURL=Renderer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Renderer.js","sourceRoot":"","sources":["../../../../src/components/FlowModeller/Renderer/Renderer.tsx"],"names":[],"mappings":";;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAE/C,OAAO,mBAAmB,MAAM,wBAAwB,CAAC;AAGzD,OAAO,WAAW,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAI/B,CAAC;AAEF,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAItC,CAAC;AAEF,MAAM,iBAAiB,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC,GAAG,EAAE;IAC1D,OAAO,GAAG,CAAA;;;;GAIT,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,QAAQ,GAAsB,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE;IACtF,8BAA8B;IAC9B,MAAM,EAAE,QAAQ,EAAE,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC;IACrD,MAAM,KAAK,GAAG,IAAI,aAAa,CAAC,SAAS,CAAC,CAAC;IAC3C,MAAM,eAAe,GAAG,WAAW,CAAC,IAAI,CAA6B,SAAS,EAAE,QAAQ,CAAC,CAAC;IAE1F,OA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CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import { useContext } from 'react';\nimport type { FC } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Flex } from '@pega/cosmos-react-core';\n\nimport FlowModellerContext from '../FlowModellerContext';\n\nimport type { RendererProps } from './Renderer.types';\nimport GraphLayout from './Utils/GraphLayout';\nimport { DirectedGraph } from './Utils/Graph';\n\nconst StyledWrapper = styled.div`\n position: relative;\n width: 100%;\n height: 100%;\n`;\n\nconst StyledContentWrapper = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n`;\n\nconst StyledNodeWrapper = styled(StyledContentWrapper)(() => {\n return css`\n width: var(--width);\n height: var(--height);\n transform: translate(var(--xPos), var(--yPos));\n `;\n});\n\nconst Renderer: FC<RendererProps> = ({ graphData, connector: Connector, node: Node }) => {\n // apply the plotted positions\n const { readOnly } = useContext(FlowModellerContext);\n const graph = new DirectedGraph(graphData);\n const graphDimensions = GraphLayout.plot<RendererProps['graphData']>(graphData, readOnly);\n\n return (\n <StyledWrapper>\n <StyledContentWrapper>\n <svg\n width={graphDimensions.width}\n height={graphDimensions.height}\n viewBox={`0 0 ${graphDimensions.width} ${graphDimensions.height}`}\n >\n {Connector &&\n graphData.connectors.map(item => {\n return <Connector {...item} key={item.id} />;\n })}\n </svg>\n </StyledContentWrapper>\n <StyledContentWrapper>\n {graphData.nodes.map(item => {\n let referencedNode;\n if (item.type?.minConnectors === 0 && item.reference) {\n referencedNode = graph.getNode(item.reference);\n }\n\n return (\n <Flex\n key={item.id}\n as={StyledNodeWrapper}\n id={item.id}\n style={{\n '--width': `${item.dimensions.width}px`,\n '--height': `${item.dimensions.height}px`,\n '--xPos': `${item.position.x}px`,\n '--yPos': `${item.position.y}px`\n }}\n container={{ justify: 'center' }}\n >\n {Node && <Node {...item} referencedNode={referencedNode} />}\n </Flex>\n );\n })}\n </StyledContentWrapper>\n </StyledWrapper>\n );\n};\n\nexport default Renderer;\n"]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { FC } from 'react';
|
|
2
|
-
import type { ConnectorProps, Node, GraphData } from './Utils/Graph';
|
|
3
|
-
import type { PlottedGraphConnector, PlottedGraphNode } from './Utils/GraphLayout';
|
|
4
|
-
export interface AddNodeHandlerParams {
|
|
5
|
-
refType: 'node' | 'connector';
|
|
6
|
-
refId: string | string[];
|
|
7
|
-
}
|
|
8
|
-
export interface RendererProps {
|
|
9
|
-
graphData: GraphData<PlottedGraphNode, PlottedGraphConnector>;
|
|
10
|
-
disableAutoLayout?: boolean;
|
|
11
|
-
highlights?: {
|
|
12
|
-
nodes: Record<string, Node>;
|
|
13
|
-
connectors: Record<string, ConnectorProps>;
|
|
14
|
-
};
|
|
15
|
-
connector?: FC<PlottedGraphConnector>;
|
|
16
|
-
node?: FC<PlottedGraphNode>;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=Renderer.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Renderer.types.d.ts","sourceRoot":"","sources":["../../../../src/components/FlowModeller/Renderer/Renderer.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEnF,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,GAAG,WAAW,CAAC;IAC9B,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,SAAS,CAAC,gBAAgB,EAAE,qBAAqB,CAAC,CAAC;IAC9D,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE;QACX,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAC5B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;KAC5C,CAAC;IACF,SAAS,CAAC,EAAE,EAAE,CAAC,qBAAqB,CAAC,CAAC;IACtC,IAAI,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC,CAAC;CAC7B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Renderer.types.js","sourceRoot":"","sources":["../../../../src/components/FlowModeller/Renderer/Renderer.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { FC } from 'react';\n\nimport type { ConnectorProps, Node, GraphData } from './Utils/Graph';\nimport type { PlottedGraphConnector, PlottedGraphNode } from './Utils/GraphLayout';\n\nexport interface AddNodeHandlerParams {\n refType: 'node' | 'connector';\n refId: string | string[];\n}\n\nexport interface RendererProps {\n graphData: GraphData<PlottedGraphNode, PlottedGraphConnector>;\n disableAutoLayout?: boolean;\n highlights?: {\n nodes: Record<string, Node>;\n connectors: Record<string, ConnectorProps>;\n };\n connector?: FC<PlottedGraphConnector>;\n node?: FC<PlottedGraphNode>;\n}\n"]}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
export interface ConnectorProps<T = unknown> {
|
|
2
|
-
id: string;
|
|
3
|
-
fromNodeId: string;
|
|
4
|
-
toNodeId: string;
|
|
5
|
-
label?: string;
|
|
6
|
-
data?: T;
|
|
7
|
-
}
|
|
8
|
-
export interface NodeType {
|
|
9
|
-
minConnectors: number;
|
|
10
|
-
}
|
|
11
|
-
export interface Node<T = unknown> {
|
|
12
|
-
type?: NodeType;
|
|
13
|
-
id: string;
|
|
14
|
-
data?: T;
|
|
15
|
-
reference?: string;
|
|
16
|
-
}
|
|
17
|
-
export interface GraphData<T extends Node = Node, U extends ConnectorProps = ConnectorProps> {
|
|
18
|
-
nodes: T[];
|
|
19
|
-
connectors: U[];
|
|
20
|
-
}
|
|
21
|
-
export declare class DirectedGraph<T extends Node = Node, U extends ConnectorProps = ConnectorProps, D1 = unknown, D2 = unknown> {
|
|
22
|
-
private nodes;
|
|
23
|
-
private connectors;
|
|
24
|
-
private nodeData;
|
|
25
|
-
private connectorData;
|
|
26
|
-
private inConnectors;
|
|
27
|
-
private prevNodesCount;
|
|
28
|
-
private outConnectors;
|
|
29
|
-
private nextNodesCount;
|
|
30
|
-
private nodeCount;
|
|
31
|
-
private connectorsCount;
|
|
32
|
-
constructor(graphData?: GraphData<T, U>);
|
|
33
|
-
getGraphData(): GraphData<T, U>;
|
|
34
|
-
getNodeCount(): number;
|
|
35
|
-
getNodes(): T[];
|
|
36
|
-
addNode(node: T, data?: D1): DirectedGraph;
|
|
37
|
-
getNode(nodeId: string): T;
|
|
38
|
-
hasNode(nodeId: string): boolean;
|
|
39
|
-
deleteNode(nodeId: string, ignoreConnectors?: boolean): DirectedGraph<T, U>;
|
|
40
|
-
getPrevNodes(nodeId: string): T[];
|
|
41
|
-
getNextNodes(nodeId: string): T[];
|
|
42
|
-
getPrevNodesCount(nodeId: string): number;
|
|
43
|
-
getNextNodesCount(nodeId: string): number;
|
|
44
|
-
isLeaf(nodeId: string): boolean;
|
|
45
|
-
getConnectorsCount(): number;
|
|
46
|
-
getConnectors(): U[];
|
|
47
|
-
addConnector(connector: U, data?: D2): DirectedGraph<T, U>;
|
|
48
|
-
hasConnector(id: string): boolean;
|
|
49
|
-
getConnector(id: string): U;
|
|
50
|
-
removeConnector(id: string): DirectedGraph<T, U>;
|
|
51
|
-
setConnector(id: string, data: {
|
|
52
|
-
fromNodeId?: string;
|
|
53
|
-
toNodeId?: string;
|
|
54
|
-
}): DirectedGraph<T, U>;
|
|
55
|
-
getInConnectors(toNodeId: string, fromNodeId?: string): U[];
|
|
56
|
-
getOutConnectors(fromNodeId: string, toNodeId?: string): U[];
|
|
57
|
-
getAllNodeConnectors(nodeId: string): U[] | undefined;
|
|
58
|
-
}
|
|
59
|
-
//# sourceMappingURL=Graph.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|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