@pega/cosmos-react-build 8.0.0-build.9.1 → 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonLinter.d.ts","sourceRoot":"","sources":["../../../../../src/components/ExpressionBuilder/CodeEditor/mode/jsonLinter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,eAAO,MAAM,IAAI,SAAU,MAAM,4BA4BhC,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* eslint-disable import/prefer-default-export */
|
|
2
|
+
import { Pos } from 'codemirror';
|
|
3
|
+
export const lint = (text) => {
|
|
4
|
+
if (!text)
|
|
5
|
+
return;
|
|
6
|
+
const lintErrors = [];
|
|
7
|
+
try {
|
|
8
|
+
JSON.parse(text);
|
|
9
|
+
}
|
|
10
|
+
catch (e) {
|
|
11
|
+
if (e instanceof Error) {
|
|
12
|
+
const match = e.message.match(/position (\d+)/);
|
|
13
|
+
if (match) {
|
|
14
|
+
const position = parseInt(match[1], 10);
|
|
15
|
+
const line = text.slice(0, position).split('\n').length - 1;
|
|
16
|
+
const ch = position - text.lastIndexOf('\n', position) - 1;
|
|
17
|
+
lintErrors.push({
|
|
18
|
+
from: Pos(line, ch),
|
|
19
|
+
to: Pos(line, ch),
|
|
20
|
+
message: e.message
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
lintErrors.push({
|
|
25
|
+
from: Pos(0, 0),
|
|
26
|
+
to: Pos(0, 0),
|
|
27
|
+
message: e.message
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return lintErrors;
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=jsonLinter.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;oBACf,EAAE,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;oBACb,OAAO,EAAE,CAAC,CAAC,OAAO;iBACnB,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC","sourcesContent":["/* eslint-disable import/prefer-default-export */\nimport { Pos } from 'codemirror';\n\nimport type { LintError } from '../CodeEditor.types';\n\nexport const lint = (text: string) => {\n if (!text) return;\n const lintErrors: LintError[] = [];\n try {\n JSON.parse(text);\n } catch (e: unknown) {\n if (e instanceof Error) {\n const match = e.message.match(/position (\\d+)/);\n if (match) {\n const position = parseInt(match[1], 10);\n const line = text.slice(0, position).split('\\n').length - 1;\n const ch = position - text.lastIndexOf('\\n', position) - 1;\n\n lintErrors.push({\n from: Pos(line, ch),\n to: Pos(line, ch),\n message: e.message\n });\n } else {\n lintErrors.push({\n from: Pos(0, 0),\n to: Pos(0, 0),\n message: e.message\n });\n }\n }\n }\n return lintErrors;\n};\n"]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { ForwardProps } from '@pega/cosmos-react-core';
|
|
1
|
+
import type { ForwardRefForwardPropsComponent } from '@pega/cosmos-react-core';
|
|
3
2
|
import type { ExpressionBuilderProps } from './ExpressionBuilder.types';
|
|
4
|
-
declare const ExpressionBuilder:
|
|
3
|
+
declare const ExpressionBuilder: ForwardRefForwardPropsComponent<ExpressionBuilderProps>;
|
|
5
4
|
export default ExpressionBuilder;
|
|
6
5
|
//# sourceMappingURL=ExpressionBuilder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpressionBuilder.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionBuilder.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExpressionBuilder.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionBuilder.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAE/E,OAAO,KAAK,EAAuB,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAO7F,QAAA,MAAM,iBAAiB,EAAE,+BAA+B,CAAC,sBAAsB,CAiH9E,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpressionBuilder.js","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionBuilder.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAGzE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAKzF,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAElE,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"ExpressionBuilder.js","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionBuilder.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAGzE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAKzF,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAElE,MAAM,iBAAiB,GAA4D,UAAU,CAC3F,SAAS,iBAAiB,C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e,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC,EAAE,CAAC,GAC/D,CACtB,EAEA,CAAC,QAAQ,IAAI,CACZ,MAAC,IAAI,IACH,SAAS,EAAE;oBACT,SAAS,EAAE,QAAQ;oBACnB,OAAO,EAAE,SAAS;oBAClB,GAAG,EAAE,CAAC;iBACP,EACD,IAAI,EAAE;oBACJ,IAAI,EAAE,CAAC;oBACP,KAAK,EAAE,KAAK;iBACb,aAED,KAAC,WAAW,OAAK,MAAM,GAAI,EAC3B,KAAC,wBAAwB,CAAC,QAAQ,IAAC,KAAK,EAAE,QAAQ,YAChD,KAAC,cAAc,OAAK,IAAI,EAAE,SAAS,EAAE,SAAS,GAAI,GAChB,IAC/B,CACR,EAED,KAAC,IAAI,IACH,SAAS,EAAE;oBACT,SAAS,EAAE,QAAQ;oBACnB,OAAO,EAAE,SAAS;iBACnB,EACD,IAAI,EAAE;oBACJ,IAAI,EAAE,CAAC;oBACP,KAAK,EAAE,KAAK;iBACb,YAED,KAAC,UAAU,IACT,gBAAgB,EAAE,gBAAgB,EAClC,gBAAgB,EAAE,gBAAgB,EAClC,oBAAoB,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EACrC,iBAAiB,EAAE;wBACjB,IAAI,EAAE,YAAY;wBAClB,QAAQ;qBACT,EACD,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,gBACN,CAAC,CAAC,mBAAmB,CAAC,GAClC,GACG,IACF,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,iBAAiB,CAAC","sourcesContent":["import { forwardRef, useImperativeHandle, useMemo, useRef } from 'react';\nimport type { PropsWithoutRef } from 'react';\n\nimport { Flex, SearchInput, useI18n, VisuallyHiddenText } from '@pega/cosmos-react-core';\nimport type { ForwardRefForwardPropsComponent } from '@pega/cosmos-react-core';\n\nimport type { ExpressionItemProps, ExpressionBuilderProps } from './ExpressionBuilder.types';\nimport type { EditorState } from './CodeEditor/CodeEditor.types';\nimport ExpressionList from './ExpressionList';\nimport { StyledExpressionBuilder } from './ExpressionBuilder.styles';\nimport CodeEditor from './CodeEditor/CodeEditor';\nimport ExpressionBuilderContext from './ExpressionBuilderContext';\n\nconst ExpressionBuilder: ForwardRefForwardPropsComponent<ExpressionBuilderProps> = forwardRef(\n function ExpressionBuilder(\n {\n list,\n search,\n errors,\n defaultValue,\n handle,\n fetchSuggestions,\n loading,\n readOnly,\n onChange,\n ...restProps\n }: PropsWithoutRef<ExpressionBuilderProps>,\n ref: ExpressionBuilderProps['ref']\n ) {\n const t = useI18n();\n const codeEditorHandle = useRef<EditorState>(null);\n\n const getExpression = () => {\n return codeEditorHandle.current?.getValue() || '';\n };\n\n useImperativeHandle(\n handle,\n () => ({\n getExpression\n }),\n [getExpression]\n );\n\n const addExpression = (expression: string) => {\n codeEditorHandle.current?.insertText(expression);\n };\n const onItemAdd = (id: ExpressionItemProps['id']) => {\n list.onItemAdd(id, addExpression);\n };\n\n const ctxValue = useMemo(\n () => ({\n accent: search.accent\n }),\n [search.accent]\n );\n\n return (\n <Flex\n {...restProps}\n as={StyledExpressionBuilder}\n ref={ref}\n container={{\n justify: 'between',\n colGap: 2,\n pad: 1\n }}\n item={{\n grow: 1\n }}\n >\n {!readOnly && (\n <VisuallyHiddenText aria-live='polite' role='status'>\n {t('results_count', [list.items?.length || 0], { count: list.items?.length || 0 })}\n </VisuallyHiddenText>\n )}\n {/* Column 1 */}\n {!readOnly && (\n <Flex\n container={{\n direction: 'column',\n justify: 'between',\n gap: 1\n }}\n item={{\n grow: 1,\n basis: '50%'\n }}\n >\n <SearchInput {...search} />\n <ExpressionBuilderContext.Provider value={ctxValue}>\n <ExpressionList {...list} onItemAdd={onItemAdd} />\n </ExpressionBuilderContext.Provider>\n </Flex>\n )}\n {/* Column 2 */}\n <Flex\n container={{\n direction: 'column',\n justify: 'between'\n }}\n item={{\n grow: 1,\n basis: '50%'\n }}\n >\n <CodeEditor\n fetchSuggestions={fetchSuggestions}\n codeEditorHandle={codeEditorHandle}\n autoCompleteTriggers={['.', '@', ':']}\n editorConfigProps={{\n mode: 'expression',\n readOnly\n }}\n defaultValue={defaultValue}\n loading={loading}\n errors={errors}\n readOnly={readOnly}\n onChange={onChange}\n aria-label={t('expression_editor')}\n />\n </Flex>\n </Flex>\n );\n }\n);\n\nexport default ExpressionBuilder;\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExpressionItemProps } from './ExpressionBuilder.types';
|
|
2
|
-
export declare const StyledPrimaryText: import("styled-components").StyledComponent<import("
|
|
2
|
+
export declare const StyledPrimaryText: import("styled-components").StyledComponent<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").TextProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
3
3
|
export declare const StyledExpressionSummary: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
4
|
export declare const StyledExpressionList: import("styled-components").StyledComponent<"ul", import("styled-components").DefaultTheme, {}, never>;
|
|
5
5
|
export declare const StyledExpressionBuilder: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpressionBuilder.styles.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionBuilder.styles.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAErE,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"ExpressionBuilder.styles.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionBuilder.styles.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAErE,eAAO,MAAM,iBAAiB,kNAE7B,CAAC;AAEF,eAAO,MAAM,uBAAuB,yGAKlC,CAAC;AAIH,eAAO,MAAM,oBAAoB,wGAIhC,CAAC;AAEF,eAAO,MAAM,uBAAuB,yGASlC,CAAC;AAIH,eAAO,MAAM,iBAAiB,yGAQ5B,CAAC;AAIH,eAAO,MAAM,sBAAsB,yGAIjC,CAAC;AAIH,eAAO,MAAM,uBAAuB,yGAAe,CAAC;AAIpD,eAAO,MAAM,2BAA2B,yGAQtC,CAAC;AAIH,eAAO,MAAM,oBAAoB;cACrB,mBAAmB,CAAC,UAAU,CAAC;SAuBzC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComponentType, Ref } from 'react';
|
|
2
2
|
import type { BaseProps, EmptyStateProps, OmitStrict, SearchInputProps, FieldValueListProps, MenuProps } from '@pega/cosmos-react-core';
|
|
3
|
-
import type { CodeEditorProps } from './CodeEditor/CodeEditor.types';
|
|
3
|
+
import type { CodeEditorProps, CustomPositionProps } from './CodeEditor/CodeEditor.types';
|
|
4
4
|
export interface ExpressionItemProps {
|
|
5
5
|
/** Id of the item */
|
|
6
6
|
id: string;
|
|
@@ -44,6 +44,8 @@ export interface ExpressionListProps extends BaseProps {
|
|
|
44
44
|
export interface HandleValue {
|
|
45
45
|
/** Returns the expression value */
|
|
46
46
|
getExpression: () => string;
|
|
47
|
+
/** Insert the expression value */
|
|
48
|
+
insertExpression?: (expression: string, replaceContent?: boolean, customCursorPosition?: CustomPositionProps) => void;
|
|
47
49
|
}
|
|
48
50
|
export interface ExpressionBuilderProps extends BaseProps, OmitStrict<CodeEditorProps, 'ref' | 'codeEditorHandle'> {
|
|
49
51
|
ref?: Ref<HTMLDivElement>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpressionBuilder.types.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionBuilder.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,KAAK,EACV,SAAS,EACT,eAAe,EACf,UAAU,EACV,gBAAgB,EAChB,mBAAmB,EACnB,SAAS,EACV,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"ExpressionBuilder.types.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionBuilder.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,KAAK,EACV,SAAS,EACT,eAAe,EACf,UAAU,EACV,gBAAgB,EAChB,mBAAmB,EACnB,SAAS,EACV,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAE1F,MAAM,WAAW,mBAAmB;IAClC,qBAAqB;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,mEAAmE;IACnE,IAAI,EAAE,MAAM,CAAC;IACb,6BAA6B;IAC7B,KAAK,EAAE,CAAC,EAAE,EAAE,mBAAmB,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;IAC/C,gCAAgC;IAChC,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,mBAAmB,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;IACnD,kCAAkC;IAClC,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,mBAAmB,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;IACrD,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kDAAkD;IAClD,OAAO,CAAC,EAAE,sBAAsB,CAAC;IACjC,gFAAgF;IAChF,YAAY,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AAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,KAAK,IAAI,CAAC;KACjG,CAAC;IACF,yBAAyB;IACzB,MAAM,EAAE,IAAI,CACV,QAAQ,CAAC,gBAAgB,CAAC,EAC1B,SAAS,GAAG,gBAAgB,GAAG,gBAAgB,GAAG,OAAO,CAC1D,GACC,IAAI,CAAC,gBAAgB,EAAE,eAAe,CAAC,GACvC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAE5B,wBAAwB;IACxB,MAAM,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;CAC3B;AAED,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAC3B,aAAa,EAAE,CAAC,CAAC;CAClB;AAED,MAAM,WAAW,sBAAuB,SAAQ,SAAS;IACvD,wCAAwC;IACxC,OAAO,EAAE,QAAQ,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,CAAC;IACjD,sCAAsC;IACtC,YAAY,CAAC,EAAE,QAAQ,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,CAAC;IACvD,qCAAqC;IACrC,WAAW,CAAC,EAAE,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC;IACjC,2BAA2B;IAC3B,GAAG,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;CACxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpressionBuilder.types.js","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionBuilder.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentType, Ref } from 'react';\n\nimport type {\n BaseProps,\n EmptyStateProps,\n OmitStrict,\n SearchInputProps,\n FieldValueListProps,\n MenuProps\n} from '@pega/cosmos-react-core';\n\nimport type { CodeEditorProps } from './CodeEditor/CodeEditor.types';\n\nexport interface ExpressionItemProps {\n /** Id of the item */\n id: string;\n /** Item name to be displayed as rule name */\n primary: string;\n /** Type of expression item. Eg: Decision, When, Automation etc. */\n type: string;\n /** Callback for add event */\n onAdd: (id: ExpressionItemProps['id']) => void;\n /** Callback for expand event */\n onExpand?: (id: ExpressionItemProps['id']) => void;\n /** Callback for collapse event */\n onCollapse?: (id: ExpressionItemProps['id']) => void;\n /** Show the expanded details */\n expanded?: boolean;\n /** Expression details to show in expanded view */\n details?: ExpressionDetailsProps;\n /** Matched field to be shown in expression item collapsed mode during search */\n matchedField?: { name: string; value: string };\n}\n\nexport interface ExpressionListProps extends BaseProps {\n ref?: Ref<HTMLUListElement>;\n /** Expression builder items */\n items?: OmitStrict<ExpressionItemProps, 'onAdd' | 'onExpand' | 'onCollapse' | 'details'>[];\n /** Callback for item add */\n onItemAdd: ExpressionItemProps['onAdd'];\n /** Callback for item expand */\n onItemExpand?: ExpressionItemProps['onExpand'];\n /** Callback for item collapse */\n onItemCollapse?: ExpressionItemProps['onCollapse'];\n /** No items */\n emptyText?: EmptyStateProps['message'];\n /** Expanded items data */\n details: {\n [id: string]: ExpressionDetailsProps;\n };\n}\n\nexport interface HandleValue {\n /** Returns the expression value */\n getExpression: () => string;\n}\n\nexport interface ExpressionBuilderProps\n extends BaseProps,\n OmitStrict<CodeEditorProps, 'ref' | 'codeEditorHandle'> {\n ref?: Ref<HTMLDivElement>;\n /** Expression items list */\n list: OmitStrict<ExpressionListProps, 'ref' | 'onItemAdd'> & {\n onItemAdd: (id: ExpressionItemProps['id'], addExpression: (expression: string) => void) => void;\n };\n /** Search input props */\n search: Pick<\n Required<SearchInputProps>,\n 'filters' | 'onFilterChange' | 'onSearchChange' | 'value'\n > &\n Pick<SearchInputProps, 'defaultFilter'> &\n Pick<MenuProps, 'accent'>;\n\n /** Imperative handle */\n handle?: Ref<HandleValue>;\n}\n\nexport interface InputParams<P> {\n id: string;\n renderer: ComponentType<P>;\n rendererProps: P;\n}\n\nexport interface ExpressionDetailsProps extends BaseProps {\n /** Primary details of the expression */\n primary: Required<FieldValueListProps['fields']>;\n /** Output params of the expression */\n outputParams?: Required<FieldValueListProps['fields']>;\n /** Input params of the expression */\n inputParams?: InputParams<any>[];\n /** Ref to the component */\n ref?: Ref<HTMLElement>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ExpressionBuilder.types.js","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionBuilder.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentType, Ref } from 'react';\n\nimport type {\n BaseProps,\n EmptyStateProps,\n OmitStrict,\n SearchInputProps,\n FieldValueListProps,\n MenuProps\n} from '@pega/cosmos-react-core';\n\nimport type { CodeEditorProps, CustomPositionProps } from './CodeEditor/CodeEditor.types';\n\nexport interface ExpressionItemProps {\n /** Id of the item */\n id: string;\n /** Item name to be displayed as rule name */\n primary: string;\n /** Type of expression item. Eg: Decision, When, Automation etc. */\n type: string;\n /** Callback for add event */\n onAdd: (id: ExpressionItemProps['id']) => void;\n /** Callback for expand event */\n onExpand?: (id: ExpressionItemProps['id']) => void;\n /** Callback for collapse event */\n onCollapse?: (id: ExpressionItemProps['id']) => void;\n /** Show the expanded details */\n expanded?: boolean;\n /** Expression details to show in expanded view */\n details?: ExpressionDetailsProps;\n /** Matched field to be shown in expression item collapsed mode during search */\n matchedField?: { name: string; value: string };\n}\n\nexport interface ExpressionListProps extends BaseProps {\n ref?: Ref<HTMLUListElement>;\n /** Expression builder items */\n items?: OmitStrict<ExpressionItemProps, 'onAdd' | 'onExpand' | 'onCollapse' | 'details'>[];\n /** Callback for item add */\n onItemAdd: ExpressionItemProps['onAdd'];\n /** Callback for item expand */\n onItemExpand?: ExpressionItemProps['onExpand'];\n /** Callback for item collapse */\n onItemCollapse?: ExpressionItemProps['onCollapse'];\n /** No items */\n emptyText?: EmptyStateProps['message'];\n /** Expanded items data */\n details: {\n [id: string]: ExpressionDetailsProps;\n };\n}\n\nexport interface HandleValue {\n /** Returns the expression value */\n getExpression: () => string;\n /** Insert the expression value */\n insertExpression?: (\n expression: string,\n replaceContent?: boolean,\n customCursorPosition?: CustomPositionProps\n ) => void;\n}\n\nexport interface ExpressionBuilderProps\n extends BaseProps,\n OmitStrict<CodeEditorProps, 'ref' | 'codeEditorHandle'> {\n ref?: Ref<HTMLDivElement>;\n /** Expression items list */\n list: OmitStrict<ExpressionListProps, 'ref' | 'onItemAdd'> & {\n onItemAdd: (id: ExpressionItemProps['id'], addExpression: (expression: string) => void) => void;\n };\n /** Search input props */\n search: Pick<\n Required<SearchInputProps>,\n 'filters' | 'onFilterChange' | 'onSearchChange' | 'value'\n > &\n Pick<SearchInputProps, 'defaultFilter'> &\n Pick<MenuProps, 'accent'>;\n\n /** Imperative handle */\n handle?: Ref<HandleValue>;\n}\n\nexport interface InputParams<P> {\n id: string;\n renderer: ComponentType<P>;\n rendererProps: P;\n}\n\nexport interface ExpressionDetailsProps extends BaseProps {\n /** Primary details of the expression */\n primary: Required<FieldValueListProps['fields']>;\n /** Output params of the expression */\n outputParams?: Required<FieldValueListProps['fields']>;\n /** Input params of the expression */\n inputParams?: InputParams<any>[];\n /** Ref to the component */\n ref?: Ref<HTMLElement>;\n}\n"]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { ForwardProps } from '@pega/cosmos-react-core';
|
|
1
|
+
import type { ForwardRefForwardPropsComponent } from '@pega/cosmos-react-core';
|
|
3
2
|
import type { ExpressionDetailsProps } from './ExpressionBuilder.types';
|
|
4
|
-
declare const ExpressionDetails:
|
|
3
|
+
declare const ExpressionDetails: ForwardRefForwardPropsComponent<ExpressionDetailsProps>;
|
|
5
4
|
export default ExpressionDetails;
|
|
6
5
|
//# sourceMappingURL=ExpressionDetails.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpressionDetails.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionDetails.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExpressionDetails.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionDetails.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAE/E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAOxE,QAAA,MAAM,iBAAiB,EAAE,+BAA+B,CAAC,sBAAsB,CAiC9E,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpressionDetails.js","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionDetails.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGnC,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAI9E,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,4BAA4B,CAAC;AAEpC,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"ExpressionDetails.js","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionDetails.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGnC,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAI9E,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,4BAA4B,CAAC;AAEpC,MAAM,iBAAiB,GAA4D,UAAU,CAC3F,SAAS,iBAAiB,CACxB,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,SAAS,EAA2C,EAC7F,GAAkC;IAElC,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IACpB,OAAO,CACL,MAAC,IAAI,OACC,SAAS,EACb,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,EAClC,EAAE,EAAE,uBAAuB,aAE3B,KAAC,cAAc,IAAC,MAAM,EAAE,OAAO,GAAI,EAClC,YAAY,IAAI,CACf,MAAC,iBAAiB,eAChB,KAAC,IAAI,IAAC,OAAO,EAAC,IAAI,YAAE,CAAC,CAAC,mBAAmB,CAAC,GAAQ,EAClD,KAAC,cAAc,IAAC,MAAM,EAAE,YAAY,GAAI,IACtB,CACrB,EACA,WAAW,IAAI,CACd,MAAC,sBAAsB,eACrB,KAAC,IAAI,IAAC,OAAO,EAAC,IAAI,YAAE,CAAC,CAAC,kBAAkB,CAAC,GAAQ,EACjD,KAAC,IAAI,IAAC,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,YAC7C,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,EAAE,EAAE;4BAC7D,OAAO,KAAC,QAAQ,OAAc,aAAa,IAArB,EAAE,CAAuB,CAAC;wBAClD,CAAC,CAAC,GACG,IACgB,CAC1B,IACI,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,iBAAiB,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { PropsWithoutRef } from 'react';\n\nimport { FieldValueList, Flex, Text, useI18n } from '@pega/cosmos-react-core';\nimport type { ForwardRefForwardPropsComponent } from '@pega/cosmos-react-core';\n\nimport type { ExpressionDetailsProps } from './ExpressionBuilder.types';\nimport {\n StyledExpressionDetails,\n StyledInputParamsGroup,\n StyledParamsGroup\n} from './ExpressionBuilder.styles';\n\nconst ExpressionDetails: ForwardRefForwardPropsComponent<ExpressionDetailsProps> = forwardRef(\n function ExpressionDetails(\n { primary, inputParams, outputParams, ...restProps }: PropsWithoutRef<ExpressionDetailsProps>,\n ref: ExpressionDetailsProps['ref']\n ) {\n const t = useI18n();\n return (\n <Flex\n {...restProps}\n ref={ref}\n container={{ direction: 'column' }}\n as={StyledExpressionDetails}\n >\n <FieldValueList fields={primary} />\n {outputParams && (\n <StyledParamsGroup>\n <Text variant='h4'>{t('output_parameters')}</Text>\n <FieldValueList fields={outputParams} />\n </StyledParamsGroup>\n )}\n {inputParams && (\n <StyledInputParamsGroup>\n <Text variant='h4'>{t('input_parameters')}</Text>\n <Flex container={{ direction: 'column', gap: 1 }}>\n {inputParams.map(({ id, renderer: Renderer, rendererProps }) => {\n return <Renderer key={id} {...rendererProps} />;\n })}\n </Flex>\n </StyledInputParamsGroup>\n )}\n </Flex>\n );\n }\n);\n\nexport default ExpressionDetails;\n"]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { ForwardProps } from '@pega/cosmos-react-core';
|
|
1
|
+
import type { ForwardRefForwardPropsComponent } from '@pega/cosmos-react-core';
|
|
3
2
|
import type { ExpressionListProps } from './ExpressionBuilder.types';
|
|
4
|
-
declare const ExpressionList:
|
|
3
|
+
declare const ExpressionList: ForwardRefForwardPropsComponent<ExpressionListProps>;
|
|
5
4
|
export default ExpressionList;
|
|
6
5
|
//# sourceMappingURL=ExpressionList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpressionList.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExpressionList.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionList.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAE/E,OAAO,KAAK,EAAuB,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAI1F,QAAA,MAAM,cAAc,EAAE,+BAA+B,CAAC,mBAAmB,CAuDxE,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpressionList.js","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionList.tsx"],"names":[],"mappings":";;AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG7C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAIrD,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"ExpressionList.js","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionList.tsx"],"names":[],"mappings":";;AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG7C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAIrD,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,MAAM,cAAc,GAAyD,UAAU,CACrF,SAAS,cAAc,CACrB,EACE,KAAK,EACL,SAAS,EACT,SAAS,EACT,YAAY,EACZ,cAAc,EACd,OAAO,EACP,GAAG,SAAS,EACyB,EACvC,GAA+B;IAE/B,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAA8B,EAAE,CAAC,CAAC;IAEpF,MAAM,gBAAgB,GAAG,CAAC,EAA6B,EAAE,EAAE;QACzD,gBAAgB,CAAC,IAAI,CAAC,EAAE;YACtB,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YACnC,IAAI,SAAS,KAAK,CAAC,CAAC;gBAAE,OAAO,IAAI,CAAC;YAClC,YAAY,EAAE,CAAC,EAAE,CAAC,CAAC;YACnB,OAAO,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,MAAM,kBAAkB,GAAG,CAAC,EAA6B,EAAE,EAAE;QAC3D,gBAAgB,CAAC,IAAI,CAAC,EAAE;YACtB,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YACnC,IAAI,SAAS,KAAK,CAAC,CAAC;gBAAE,OAAO,IAAI,CAAC;YAClC,cAAc,EAAE,CAAC,EAAE,CAAC,CAAC;YACrB,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,KAAK,EAAE,CAAC,CAAC;QAC9C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,OAAO,CACL,KAAC,oBAAoB,OAAK,SAAS,EAAE,GAAG,EAAE,GAAG,YAC1C,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAC3B,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YACf,OAAO,CACL,eAAC,cAAc,OACT,IAAI,EACR,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,gBAAgB,EAC1B,UAAU,EAAE,kBAAkB,EAC9B,QAAQ,EAAE,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,EACzC,GAAG,EAAE,IAAI,CAAC,EAAE,EACZ,OAAO,EAAE,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,GAC3B,CACH,CAAC;QACJ,CAAC,CAAC,CACH,CAAC,CAAC,CAAC,CACF,KAAC,UAAU,IAAC,OAAO,EAAE,SAAS,GAAI,CACnC,GACoB,CACxB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import { forwardRef, useState } from 'react';\nimport type { PropsWithoutRef } from 'react';\n\nimport { EmptyState } from '@pega/cosmos-react-core';\nimport type { ForwardRefForwardPropsComponent } from '@pega/cosmos-react-core';\n\nimport type { ExpressionItemProps, ExpressionListProps } from './ExpressionBuilder.types';\nimport ExpressionItem from './ExpressionItem';\nimport { StyledExpressionList } from './ExpressionBuilder.styles';\n\nconst ExpressionList: ForwardRefForwardPropsComponent<ExpressionListProps> = forwardRef(\n function ExpressionList(\n {\n items,\n emptyText,\n onItemAdd,\n onItemExpand,\n onItemCollapse,\n details,\n ...restProps\n }: PropsWithoutRef<ExpressionListProps>,\n ref: ExpressionListProps['ref']\n ) {\n const [expandedItems, setExpandedItems] = useState<ExpressionItemProps['id'][]>([]);\n\n const handleItemExpand = (id: ExpressionItemProps['id']) => {\n setExpandedItems(prev => {\n const itemIndex = prev.indexOf(id);\n if (itemIndex !== -1) return prev;\n onItemExpand?.(id);\n return [...prev, id];\n });\n };\n\n const handleItemCollapse = (id: ExpressionItemProps['id']) => {\n setExpandedItems(prev => {\n const itemIndex = prev.indexOf(id);\n if (itemIndex === -1) return prev;\n onItemCollapse?.(id);\n return prev.filter(itemId => itemId !== id);\n });\n };\n\n return (\n <StyledExpressionList {...restProps} ref={ref}>\n {items && items.length > 0 ? (\n items.map(item => {\n return (\n <ExpressionItem\n {...item}\n onAdd={onItemAdd}\n onExpand={handleItemExpand}\n onCollapse={handleItemCollapse}\n expanded={expandedItems.includes(item.id)}\n key={item.id}\n details={details?.[item.id]}\n />\n );\n })\n ) : (\n <EmptyState message={emptyText} />\n )}\n </StyledExpressionList>\n );\n }\n);\n\nexport default ExpressionList;\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default } from './ExpressionBuilder';
|
|
2
2
|
export type { ExpressionListProps, ExpressionItemProps, ExpressionBuilderProps, HandleValue, InputParams } from './ExpressionBuilder.types';
|
|
3
|
-
export type { EditorState, CodeEditorProps, AutoCompleteTriggerChar, SuggestionType, CursorPosition } from './CodeEditor/CodeEditor.types';
|
|
3
|
+
export type { EditorState, CodeEditorProps, AutoCompleteTriggerChar, SuggestionType, CursorPosition, CustomPositionProps } from './CodeEditor/CodeEditor.types';
|
|
4
4
|
export { default as ExpressionItem } from './ExpressionItem';
|
|
5
5
|
export { default as ExpressionList } from './ExpressionList';
|
|
6
6
|
export { default as ExpressionDetails } from './ExpressionDetails';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,YAAY,EACV,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,EACtB,WAAW,EACX,WAAW,EACZ,MAAM,2BAA2B,CAAC;AACnC,YAAY,EACV,WAAW,EACX,eAAe,EACf,uBAAuB,EACvB,cAAc,EACd,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,YAAY,EACV,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,EACtB,WAAW,EACX,WAAW,EACZ,MAAM,2BAA2B,CAAC;AACnC,YAAY,EACV,WAAW,EACX,eAAe,EACf,uBAAuB,EACvB,cAAc,EACd,cAAc,EACd,mBAAmB,EACpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAgB9C,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC","sourcesContent":["export { default } from './ExpressionBuilder';\nexport type {\n ExpressionListProps,\n ExpressionItemProps,\n ExpressionBuilderProps,\n HandleValue,\n InputParams\n} from './ExpressionBuilder.types';\nexport type {\n EditorState,\n CodeEditorProps,\n AutoCompleteTriggerChar,\n SuggestionType,\n CursorPosition,\n CustomPositionProps\n} from './CodeEditor/CodeEditor.types';\nexport { default as ExpressionItem } from './ExpressionItem';\nexport { default as ExpressionList } from './ExpressionList';\nexport { default as ExpressionDetails } from './ExpressionDetails';\nexport { default as CodeEditor } from './CodeEditor/CodeEditor';\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const StyledFieldReferenceDisplay: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
|
+
export declare const StyledFieldReferenceDisplayGrid: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
3
|
export declare const StyledFieldReferenceInput: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
3
4
|
restingState?: boolean;
|
|
4
5
|
}, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldReference.styles.d.ts","sourceRoot":"","sources":["../../../src/components/FieldReference/FieldReference.styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FieldReference.styles.d.ts","sourceRoot":"","sources":["../../../src/components/FieldReference/FieldReference.styles.ts"],"names":[],"mappings":"AA0BA,eAAO,MAAM,2BAA2B,yGAoDtC,CAAC;AAIH,eAAO,MAAM,+BAA+B,yGAqB1C,CAAC;AAIH,eAAO,MAAM,yBAAyB;mBAA8C,OAAO;SAuCzF,CAAC;AAIH,eAAO,MAAM,eAAe,yGAM1B,CAAC;AAIH,eAAO,MAAM,gBAAgB,yGAI3B,CAAC;AAIH,eAAO,MAAM,0BAA0B;;SAcrC,CAAC;AAIH,eAAO,MAAM,wBAAwB,yGAyBnC,CAAC;AAIH,eAAO,MAAM,uBAAuB,8GAEnC,CAAC;AAEF,eAAO,MAAM,iBAAiB,0GAU5B,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
|
-
import { StyledFlex, StyledText, defaultThemeProp, StyledFormControl, StyledPopover, StyledMenuListWrapper, StyledMenuItem, StyledSummaryItem,
|
|
2
|
+
import { StyledFlex, StyledText, defaultThemeProp, StyledFormControl, StyledPopover, StyledMenuListWrapper, StyledMenuItem, StyledSummaryItem, StyledSummaryItemActions, StyledMenuListContainer as StyledCoreMenuListContainer, useDirection, StyledButton, StyledLink, StyledGrid } from '@pega/cosmos-react-core';
|
|
3
3
|
import { StyledSelectInput } from '@pega/cosmos-react-core/lib/components/ComboBox/ComboBox.styles';
|
|
4
4
|
import { StyledMenu, StyledMenuGroupHeader } from '@pega/cosmos-react-core/lib/components/Menu/Menu.styles';
|
|
5
|
+
import { ellipsisOverflow } from '@pega/cosmos-react-core/lib/styles/mixins';
|
|
6
|
+
import { StyledIconShape } from '@pega/cosmos-react-core/lib/components/Icon/Icon';
|
|
5
7
|
export const StyledFieldReferenceDisplay = styled.div(({ theme }) => {
|
|
6
|
-
const { rtl } = useDirection();
|
|
7
8
|
const { base: { 'border-radius': baseBorderRadius, 'content-width': contentWidth, 'hit-area': hitArea }, components: { input: { height }, 'form-control': { 'border-radius': formBorderRadius, 'foreground-color': fgColor, 'border-width': borderWidth } } } = theme;
|
|
8
9
|
return css `
|
|
9
10
|
width: 100%;
|
|
@@ -11,13 +12,12 @@ export const StyledFieldReferenceDisplay = styled.div(({ theme }) => {
|
|
|
11
12
|
|
|
12
13
|
& > ${StyledFlex} {
|
|
13
14
|
& > ${StyledFlex} {
|
|
15
|
+
& > ${StyledIconShape} {
|
|
16
|
+
flex-shrink: 0;
|
|
17
|
+
}
|
|
14
18
|
min-width: 0;
|
|
15
|
-
min-height:
|
|
19
|
+
min-height: ${theme.components.icon.size.s};
|
|
16
20
|
height: 100%;
|
|
17
|
-
|
|
18
|
-
${StyledText} {
|
|
19
|
-
direction: ${rtl ? 'ltr' : 'rtl'};
|
|
20
|
-
}
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
& > ${StyledText} {
|
|
@@ -26,9 +26,7 @@ export const StyledFieldReferenceDisplay = styled.div(({ theme }) => {
|
|
|
26
26
|
|
|
27
27
|
${StyledLink},
|
|
28
28
|
${StyledText} {
|
|
29
|
-
|
|
30
|
-
overflow: hidden;
|
|
31
|
-
text-overflow: ellipsis;
|
|
29
|
+
${ellipsisOverflow};
|
|
32
30
|
}
|
|
33
31
|
}
|
|
34
32
|
|
|
@@ -49,16 +47,38 @@ export const StyledFieldReferenceDisplay = styled.div(({ theme }) => {
|
|
|
49
47
|
`;
|
|
50
48
|
});
|
|
51
49
|
StyledFieldReferenceDisplay.defaultProps = defaultThemeProp;
|
|
50
|
+
export const StyledFieldReferenceDisplayGrid = styled.div(({ theme }) => {
|
|
51
|
+
return css `
|
|
52
|
+
max-width: 100%;
|
|
53
|
+
flex-grow: 1;
|
|
54
|
+
|
|
55
|
+
& > ${StyledFlex} {
|
|
56
|
+
overflow: hidden;
|
|
57
|
+
& > ${StyledIconShape} {
|
|
58
|
+
min-width: ${theme.components.icon.size.s};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
${StyledLink},
|
|
62
|
+
${StyledText} {
|
|
63
|
+
${ellipsisOverflow};
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
& > ${StyledText} {
|
|
68
|
+
${ellipsisOverflow};
|
|
69
|
+
}
|
|
70
|
+
`;
|
|
71
|
+
});
|
|
72
|
+
StyledFieldReferenceDisplayGrid.defaultProps = defaultThemeProp;
|
|
52
73
|
export const StyledFieldReferenceInput = styled(StyledSelectInput)(({ restingState, theme }) => {
|
|
53
74
|
return css `
|
|
54
75
|
min-height: ${theme.components.input.height};
|
|
55
76
|
|
|
56
|
-
& > ${
|
|
57
|
-
|
|
77
|
+
& > ${StyledGrid} > * {
|
|
78
|
+
grid-row: 1;
|
|
58
79
|
}
|
|
59
80
|
|
|
60
81
|
input {
|
|
61
|
-
width: 8ch;
|
|
62
82
|
height: 1.125rem;
|
|
63
83
|
|
|
64
84
|
${restingState &&
|
|
@@ -72,10 +92,10 @@ export const StyledFieldReferenceInput = styled(StyledSelectInput)(({ restingSta
|
|
|
72
92
|
}
|
|
73
93
|
|
|
74
94
|
${StyledFieldReferenceDisplay} {
|
|
75
|
-
position: absolute;
|
|
76
|
-
inset-block: 0;
|
|
77
95
|
padding-inline-start: calc(0.5 * ${theme.base.spacing});
|
|
78
96
|
padding-inline-end: calc(0.5 * ${theme.base.spacing});
|
|
97
|
+
position: relative;
|
|
98
|
+
z-index: 1;
|
|
79
99
|
|
|
80
100
|
&:not(&:has(${StyledButton})) {
|
|
81
101
|
padding-inline-end: ${theme.base.spacing};
|
|
@@ -119,31 +139,19 @@ export const StyledFieldReferencePicker = styled(StyledFormControl)(() => {
|
|
|
119
139
|
});
|
|
120
140
|
StyledFieldReferencePicker.defaultProps = defaultThemeProp;
|
|
121
141
|
export const StyledFieldReferenceMenu = styled.div(({ theme }) => {
|
|
122
|
-
const { rtl } = useDirection();
|
|
123
142
|
return css `
|
|
124
143
|
${StyledMenuItem} {
|
|
125
|
-
${StyledSummaryItem} > ${StyledPrimary} {
|
|
126
|
-
direction: ${rtl ? 'ltr' : 'rtl'};
|
|
127
|
-
white-space: nowrap;
|
|
128
|
-
overflow: hidden;
|
|
129
|
-
text-overflow: ellipsis;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
${StyledSummaryItem} > ${StyledSecondary} {
|
|
133
|
-
max-width: ${theme.base['content-width'].xs};
|
|
134
|
-
|
|
135
|
-
li {
|
|
136
|
-
white-space: nowrap;
|
|
137
|
-
overflow: hidden;
|
|
138
|
-
text-overflow: ellipsis;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
144
|
${StyledSummaryItem} > ${StyledSummaryItemActions} > ${StyledFlex} {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
& > :not(${StyledButton}) {
|
|
146
|
+
margin-inline: calc(
|
|
147
|
+
(${theme.base['hit-area']['mouse-min']} - ${theme.components.icon.size.s}) / 2
|
|
148
|
+
);
|
|
149
|
+
|
|
150
|
+
@media (pointer: coarse) {
|
|
151
|
+
margin-inline: calc(
|
|
152
|
+
(${theme.base['hit-area']['finger-min']} - ${theme.components.icon.size.s}) / 2
|
|
153
|
+
);
|
|
154
|
+
}
|
|
147
155
|
}
|
|
148
156
|
}
|
|
149
157
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldReference.styles.js","sourceRoot":"","sources":["../../../src/components/FieldReference/FieldReference.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EACjB,
|
|
1
|
+
{"version":3,"file":"FieldReference.styles.js","sourceRoot":"","sources":["../../../src/components/FieldReference/FieldReference.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,cAAc,EACd,i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M,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACzD,OAAO,GAAG,CAAA;wBACY,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC;gCAC7B,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC;6BAC9B,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK;aAC5C,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;;2BAET,KAAK,CAAC,IAAI,CAAC,OAAO;;GAE1C,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,iBAAiB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport {\n StyledFlex,\n StyledText,\n defaultThemeProp,\n StyledFormControl,\n StyledPopover,\n StyledMenuListWrapper,\n StyledMenuItem,\n StyledSummaryItem,\n StyledSummaryItemActions,\n StyledMenuListContainer as StyledCoreMenuListContainer,\n useDirection,\n StyledButton,\n StyledLink,\n StyledGrid\n} from '@pega/cosmos-react-core';\nimport { StyledSelectInput } from '@pega/cosmos-react-core/lib/components/ComboBox/ComboBox.styles';\nimport {\n StyledMenu,\n StyledMenuGroupHeader\n} from '@pega/cosmos-react-core/lib/components/Menu/Menu.styles';\nimport { ellipsisOverflow } from '@pega/cosmos-react-core/lib/styles/mixins';\nimport { StyledIconShape } from '@pega/cosmos-react-core/lib/components/Icon/Icon';\n\nexport const StyledFieldReferenceDisplay = styled.div(({ theme }) => {\n const {\n base: { 'border-radius': baseBorderRadius, 'content-width': contentWidth, 'hit-area': hitArea },\n components: {\n input: { height },\n 'form-control': {\n 'border-radius': formBorderRadius,\n 'foreground-color': fgColor,\n 'border-width': borderWidth\n }\n }\n } = theme;\n\n return css`\n width: 100%;\n cursor: default;\n\n & > ${StyledFlex} {\n & > ${StyledFlex} {\n & > ${StyledIconShape} {\n flex-shrink: 0;\n }\n min-width: 0;\n min-height: ${theme.components.icon.size.s};\n height: 100%;\n }\n\n & > ${StyledText} {\n max-width: ${contentWidth.xs};\n }\n\n ${StyledLink},\n ${StyledText} {\n ${ellipsisOverflow};\n }\n }\n\n ${StyledButton} {\n border-radius: calc(${baseBorderRadius} * ${formBorderRadius});\n border: 0;\n &:enabled {\n color: ${fgColor};\n }\n min-height: calc(${height} - 2 * ${borderWidth});\n height: calc(${height} - 2 * ${borderWidth});\n width: calc(${height} - 2 * ${borderWidth});\n @media (pointer: coarse) {\n min-height: calc(${hitArea['finger-min']} - 2 * ${borderWidth});\n width: calc(${hitArea['finger-min']} - 2 * ${borderWidth});\n }\n }\n `;\n});\n\nStyledFieldReferenceDisplay.defaultProps = defaultThemeProp;\n\nexport const StyledFieldReferenceDisplayGrid = styled.div(({ theme }) => {\n return css`\n max-width: 100%;\n flex-grow: 1;\n\n & > ${StyledFlex} {\n overflow: hidden;\n & > ${StyledIconShape} {\n min-width: ${theme.components.icon.size.s};\n }\n\n ${StyledLink},\n ${StyledText} {\n ${ellipsisOverflow};\n }\n }\n\n & > ${StyledText} {\n ${ellipsisOverflow};\n }\n `;\n});\n\nStyledFieldReferenceDisplayGrid.defaultProps = defaultThemeProp;\n\nexport const StyledFieldReferenceInput = styled(StyledSelectInput)<{ restingState?: boolean }>(({\n restingState,\n theme\n}) => {\n return css`\n min-height: ${theme.components.input.height};\n\n & > ${StyledGrid} > * {\n grid-row: 1;\n }\n\n input {\n height: 1.125rem;\n\n ${restingState &&\n css`\n caret-color: transparent;\n `}\n }\n\n div {\n min-height: unset;\n }\n\n ${StyledFieldReferenceDisplay} {\n padding-inline-start: calc(0.5 * ${theme.base.spacing});\n padding-inline-end: calc(0.5 * ${theme.base.spacing});\n position: relative;\n z-index: 1;\n\n &:not(&:has(${StyledButton})) {\n padding-inline-end: ${theme.base.spacing};\n }\n }\n\n div + input {\n margin-inline-start: 0;\n }\n `;\n});\n\nStyledFieldReferenceInput.defaultProps = defaultThemeProp;\n\nexport const StyledSelection = styled.div(() => {\n const { rtl } = useDirection();\n return css`\n direction: ${rtl ? 'ltr' : 'rtl'};\n overflow: hidden;\n `;\n});\n\nStyledSelection.defaultProps = defaultThemeProp;\n\nexport const StyledLeadingDot = styled.div(({ theme }) => {\n return css`\n margin-inline-start: ${theme.base.spacing};\n `;\n});\n\nStyledLeadingDot.defaultProps = defaultThemeProp;\n\nexport const StyledFieldReferencePicker = styled(StyledFormControl)(() => {\n return css`\n border: 0;\n\n ${StyledPopover} {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n\n ${StyledMenu},\n ${StyledMenuListWrapper} {\n max-height: inherit;\n }\n }\n `;\n});\n\nStyledFieldReferencePicker.defaultProps = defaultThemeProp;\n\nexport const StyledFieldReferenceMenu = styled.div(({ theme }) => {\n return css`\n ${StyledMenuItem} {\n ${StyledSummaryItem} > ${StyledSummaryItemActions} > ${StyledFlex} {\n & > :not(${StyledButton}) {\n margin-inline: calc(\n (${theme.base['hit-area']['mouse-min']} - ${theme.components.icon.size.s}) / 2\n );\n\n @media (pointer: coarse) {\n margin-inline: calc(\n (${theme.base['hit-area']['finger-min']} - ${theme.components.icon.size.s}) / 2\n );\n }\n }\n }\n }\n\n ${StyledMenuGroupHeader} {\n padding-inline-start: calc(1.125rem + 2 * ${theme.base.spacing});\n border-block-start: solid 0.0625rem ${theme.base.palette['border-line']};\n background-color: transparent;\n font-weight: ${theme.base['font-weight'].bold};\n }\n `;\n});\n\nStyledFieldReferenceMenu.defaultProps = defaultThemeProp;\n\nexport const StyledMenuListContainer = styled(StyledCoreMenuListContainer)`\n height: 100%;\n`;\n\nexport const StyledPathSegment = styled.span(({ theme }) => {\n return css`\n background-color: ${theme.base.colors.gray['extra-light']};\n border-radius: calc(0.5 * ${theme.base['border-radius']});\n border: solid 0.125rem ${theme.base.colors.gray.light};\n color: ${theme.base.colors.black};\n line-height: 1.375rem;\n padding-inline: calc(${theme.base.spacing} / 2);\n white-space: nowrap;\n `;\n});\n\nStyledPathSegment.defaultProps = defaultThemeProp;\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const getFieldReferenceInputTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["control", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
|
|
2
2
|
export declare const getFieldReferenceDisplayTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["root", "icon", "field-path", "type"]>;
|
|
3
|
+
export declare const getFieldReferenceMenuListTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["menu"]>;
|
|
3
4
|
//# sourceMappingURL=FieldReference.test-ids.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldReference.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/FieldReference/FieldReference.test-ids.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,6BAA6B,8NAG/B,CAAC;AAEZ,eAAO,MAAM,+BAA+B,2KAKjC,CAAC"}
|
|
1
|
+
{"version":3,"file":"FieldReference.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/FieldReference/FieldReference.test-ids.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,6BAA6B,8NAG/B,CAAC;AAEZ,eAAO,MAAM,+BAA+B,2KAKjC,CAAC;AAEZ,eAAO,MAAM,gCAAgC,6IAElC,CAAC"}
|
|
@@ -10,4 +10,7 @@ export const getFieldReferenceDisplayTestIds = createTestIds('field-reference-di
|
|
|
10
10
|
'field-path',
|
|
11
11
|
'type'
|
|
12
12
|
]);
|
|
13
|
+
export const getFieldReferenceMenuListTestIds = createTestIds('field-reference-menu-list', [
|
|
14
|
+
'menu'
|
|
15
|
+
]);
|
|
13
16
|
//# sourceMappingURL=FieldReference.test-ids.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldReference.test-ids.js","sourceRoot":"","sources":["../../../src/components/FieldReference/FieldReference.test-ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,qEAAqE,CAAC;AAE/F,MAAM,CAAC,MAAM,6BAA6B,GAAG,aAAa,CAAC,uBAAuB,EAAE;IAClF,SAAS;IACT,GAAG,QAAQ;CACH,CAAC,CAAC;AAEZ,MAAM,CAAC,MAAM,+BAA+B,GAAG,aAAa,CAAC,yBAAyB,EAAE;IACtF,MAAM;IACN,MAAM;IACN,YAAY;IACZ,MAAM;CACE,CAAC,CAAC","sourcesContent":["import { createTestIds } from '@pega/cosmos-react-core';\nimport { elements } from '@pega/cosmos-react-core/lib/components/FormField/FormField.test-ids';\n\nexport const getFieldReferenceInputTestIds = createTestIds('field-reference-input', [\n 'control',\n ...elements\n] as const);\n\nexport const getFieldReferenceDisplayTestIds = createTestIds('field-reference-display', [\n 'root',\n 'icon',\n 'field-path',\n 'type'\n] as const);\n"]}
|
|
1
|
+
{"version":3,"file":"FieldReference.test-ids.js","sourceRoot":"","sources":["../../../src/components/FieldReference/FieldReference.test-ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,qEAAqE,CAAC;AAE/F,MAAM,CAAC,MAAM,6BAA6B,GAAG,aAAa,CAAC,uBAAuB,EAAE;IAClF,SAAS;IACT,GAAG,QAAQ;CACH,CAAC,CAAC;AAEZ,MAAM,CAAC,MAAM,+BAA+B,GAAG,aAAa,CAAC,yBAAyB,EAAE;IACtF,MAAM;IACN,MAAM;IACN,YAAY;IACZ,MAAM;CACE,CAAC,CAAC;AAEZ,MAAM,CAAC,MAAM,gCAAgC,GAAG,aAAa,CAAC,2BAA2B,EAAE;IACzF,MAAM;CACE,CAAC,CAAC","sourcesContent":["import { createTestIds } from '@pega/cosmos-react-core';\nimport { elements } from '@pega/cosmos-react-core/lib/components/FormField/FormField.test-ids';\n\nexport const getFieldReferenceInputTestIds = createTestIds('field-reference-input', [\n 'control',\n ...elements\n] as const);\n\nexport const getFieldReferenceDisplayTestIds = createTestIds('field-reference-display', [\n 'root',\n 'icon',\n 'field-path',\n 'type'\n] as const);\n\nexport const getFieldReferenceMenuListTestIds = createTestIds('field-reference-menu-list', [\n 'menu'\n] as const);\n"]}
|
|
@@ -37,6 +37,11 @@ export interface FieldReferenceMenuItem extends Field {
|
|
|
37
37
|
items?: FieldReferenceMenuItem[];
|
|
38
38
|
/** If true or false, the parent item will be selectable. If undefined, the parent will not be selectable. */
|
|
39
39
|
selected?: MenuItemProps['selected'];
|
|
40
|
+
/**
|
|
41
|
+
* Corresponding field item from the source.
|
|
42
|
+
* Useful if the `id` alone is not unique enough to identify the source
|
|
43
|
+
*/
|
|
44
|
+
originalItem?: unknown;
|
|
40
45
|
}
|
|
41
46
|
export interface FieldReferenceDisplayProps extends NoChildrenProp, TestIdProp {
|
|
42
47
|
/** The path to the field reference. */
|
|
@@ -67,7 +72,7 @@ export interface FieldReferenceMenuProps extends Pick<MenuProps, 'scrollAt' | 'l
|
|
|
67
72
|
* */
|
|
68
73
|
createNewLabel?: string;
|
|
69
74
|
}
|
|
70
|
-
export interface FieldReferencedMenuListProps {
|
|
75
|
+
export interface FieldReferencedMenuListProps extends TestIdProp {
|
|
71
76
|
items: ParentMenuItemProps['items'];
|
|
72
77
|
id?: string;
|
|
73
78
|
parent?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldReference.types.d.ts","sourceRoot":"","sources":["../../../src/components/FieldReference/FieldReference.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,aAAa,IAAI,kBAAkB,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAElF,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,cAAc,EACd,UAAU,EACV,SAAS,EACT,gBAAgB,EAChB,uBAAuB,EACvB,MAAM,EACN,SAAS,EACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wDAAwD,CAAC;AAElG,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,KAAK;IACpB,mCAAmC;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,6BAA6B;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE;QACT,IAAI,EAAE,uBAAuB,CAAC,MAAM,CAAC,CAAC;QACtC,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;CACL;AAED,MAAM,WAAW,OAAO;IACtB,qCAAqC;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,UAAW,SAAQ,OAAO;IACzC,yCAAyC;IACzC,KAAK,EAAE,sBAAsB,EAAE,CAAC;IAChC,2GAA2G;IAC3G,QAAQ,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,sBAAuB,SAAQ,KAAK;IACnD,0GAA0G;IAC1G,KAAK,CAAC,EAAE,sBAAsB,EAAE,CAAC;IACjC,6GAA6G;IAC7G,QAAQ,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"FieldReference.types.d.ts","sourceRoot":"","sources":["../../../src/components/FieldReference/FieldReference.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,aAAa,IAAI,kBAAkB,EAAE,UAA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AC,EAAE,MAAM,IAAI,CAAC;IACxB;;;OAGG;IACH,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,kBAAkB,KAAK,OAAO,GAAG,IAAI,CAAC;IACtD,4DAA4D;IAC5D,MAAM,CAAC,EAAE,GAAG,CAAC,yBAAyB,CAAC,CAAC;IACxC,iDAAiD;IACjD,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldReference.types.js","sourceRoot":"","sources":["../../../src/components/FieldReference/FieldReference.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Ref, KeyboardEvent as ReactKeyboardEvent, MouseEvent } from 'react';\n\nimport type {\n IconProps,\n MenuItemProps,\n NoChildrenProp,\n TestIdProp,\n MenuProps,\n FormControlProps,\n FieldValueListItemProps,\n Action,\n LinkProps\n} from '@pega/cosmos-react-core';\nimport type { ParentMenuItemProps } from '@pega/cosmos-react-core/lib/components/Menu/Menu.types';\n\nexport interface Selected {\n id: string;\n text: string;\n}\n\nexport interface Field {\n /** The unique id for the field. */\n id: string;\n /** The name of the field. */\n name: string;\n /** The type of the field. */\n type?: string;\n /** Props forwarded to the Icon component. */\n icon?: IconProps;\n /** Additional data related to the field. */\n metadata?: {\n name: FieldValueListItemProps['name'];\n value: string;\n }[];\n}\n\nexport interface Context {\n /** The unique id for the context. */\n id: string;\n /** The context label. */\n name: string;\n}\n\nexport interface AltContext extends Context {\n /** Items associated with the context. */\n items: FieldReferenceMenuItem[];\n /** If true or false, the altContext will be selectable. If undefined, the altContext not be selectable. */\n selected?: MenuItemProps['selected'];\n}\n\nexport interface FieldReferenceMenuItem extends Field {\n /** A set of nested child items. If an empty array is provided, the item will still render as a parent. */\n items?: FieldReferenceMenuItem[];\n /** If true or false, the parent item will be selectable. If undefined, the parent will not be selectable. */\n selected?: MenuItemProps['selected'];\n}\n\nexport interface FieldReferenceDisplayProps extends NoChildrenProp, TestIdProp {\n /** The path to the field reference. */\n fieldPath: [Context, ...Field[]] | Field[];\n /** If defined, the fieldPath will render as a Link with these props forwarded. */\n link?: Pick<LinkProps, 'href' | 'previewable' | 'onPreview' | 'target'> & {\n onClick?: (e: MouseEvent) => void;\n };\n /** Pass an array of Action objects to append button(s) inline. */\n actions?: Action[];\n /** Data to render in a tooltip upon hover of the component. */\n tooltipData?: FieldValueListItemProps[];\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n\nexport interface FieldReferenceMenuProps\n extends Pick<MenuProps, 'scrollAt' | 'loading' | 'loadMore' | 'onCreateNew'> {\n /** Menu items to display. */\n items: FieldReferenceMenuItem[];\n /** The current context that the menu is within. */\n currentContext?: Context;\n /** Menu items to display above the standard list. These should be items that are outside of the currentContext. */\n altContexts?: AltContext[];\n /** Parent menu item for drill-down. */\n parentItem?: FieldReferenceMenuItem | AltContext;\n /**\n * A custom label for the create new action.\n * @default 'Create new'\n * */\n createNewLabel?: string;\n}\n\nexport interface FieldReferencedMenuListProps {\n items: ParentMenuItemProps['items'];\n id?: string;\n parent?: { id: string; primary: string };\n ref?: Ref<HTMLFieldSetElement>;\n}\n\nexport interface FieldReferenceHandleValue {\n /** Used to open the menu programmatically. */\n openMenu: () => void;\n /** Used to close the menu programmatically. */\n closeMenu: () => void;\n}\n\nexport default interface FieldReferenceInputProps\n extends NoChildrenProp,\n TestIdProp,\n Pick<\n FormControlProps,\n | 'id'\n | 'label'\n | 'labelHidden'\n | 'required'\n | 'disabled'\n | 'readOnly'\n | 'status'\n | 'info'\n | 'placeholder'\n | 'additionalInfo'\n > {\n /** Props related to the menu. */\n menu: FieldReferenceMenuProps;\n /**\n * If true, the current context will be prepended to all field reference paths.\n * @default false\n * */\n showCurrentContext?: boolean;\n /**\n * If true, only a selected leaf node will be shown in the selected path.\n * @default true\n * */\n showPath?: boolean;\n /** Callback fired when an altContext item is clicked. */\n onAltContextClick?: (altContext: AltContext) => void;\n /** The current selection. */\n selected?: Field[];\n /** Callback fired when the selected field path is modified. */\n onSelectedChange: (selectedValue: FieldReferenceMenuItem[]) => void;\n /** The value of the search filter. */\n filterValue?: string;\n /** Callback fired when the filtering input value changes. */\n onFilterChange: (filterValue: string) => void;\n /** If defined, the selected fieldPath will render as a Link when the input is in a resting state, with these props forwarded. */\n link?: FieldReferenceDisplayProps['link'];\n /** Pass an array of Action objects to append button(s) inline when the input is in a selected resting state. */\n actions?: FieldReferenceDisplayProps['actions'];\n /** Callback fired when the Field Reference input gains focus. */\n onFocus?: () => void;\n /**\n * Callback fired when the Field Reference looses focus within its containing element.\n * This is not specific to the input element.\n * Note, behavior will be enhanced in an upcoming release and the input will be the only focusable element.\n */\n onBlur?: () => void;\n /**\n * Fired when the user clicks on the dropdown icon to initiate opening the menu.\n * If you want to offer default menu items without an input value, pass this function.\n * This function can be an appropriate time to fetch menu item data.\n * Remember to set the loading prop to true when fetching data for an empty list.\n *\n * @param open value defining whether the click opens or closes the menu\n */\n onDropdownButtonClick?: (open: boolean) => void;\n /** Fired when user clicks on the Field Reference input. */\n onClick?: (e: MouseEvent) => void;\n /** Fired when menu opens. */\n onMenuOpen?: () => void;\n /**\n * Fired before running default component onKeyDown handler.\n * Returning `false` from this function prevents default onKeyDown handling.\n */\n onKeyDown?: (e: ReactKeyboardEvent) => boolean | void;\n /** Ref that can be used to access the imperative handle. */\n handle?: Ref<FieldReferenceHandleValue>;\n /** Reference to the component's root element. */\n ref?: Ref<HTMLDivElement>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"FieldReference.types.js","sourceRoot":"","sources":["../../../src/components/FieldReference/FieldReference.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Ref, KeyboardEvent as ReactKeyboardEvent, MouseEvent } from 'react';\n\nimport type {\n IconProps,\n MenuItemProps,\n NoChildrenProp,\n TestIdProp,\n MenuProps,\n FormControlProps,\n FieldValueListItemProps,\n Action,\n LinkProps\n} from '@pega/cosmos-react-core';\nimport type { ParentMenuItemProps } from '@pega/cosmos-react-core/lib/components/Menu/Menu.types';\n\nexport interface Selected {\n id: string;\n text: string;\n}\n\nexport interface Field {\n /** The unique id for the field. */\n id: string;\n /** The name of the field. */\n name: string;\n /** The type of the field. */\n type?: string;\n /** Props forwarded to the Icon component. */\n icon?: IconProps;\n /** Additional data related to the field. */\n metadata?: {\n name: FieldValueListItemProps['name'];\n value: string;\n }[];\n}\n\nexport interface Context {\n /** The unique id for the context. */\n id: string;\n /** The context label. */\n name: string;\n}\n\nexport interface AltContext extends Context {\n /** Items associated with the context. */\n items: FieldReferenceMenuItem[];\n /** If true or false, the altContext will be selectable. If undefined, the altContext not be selectable. */\n selected?: MenuItemProps['selected'];\n}\n\nexport interface FieldReferenceMenuItem extends Field {\n /** A set of nested child items. If an empty array is provided, the item will still render as a parent. */\n items?: FieldReferenceMenuItem[];\n /** If true or false, the parent item will be selectable. If undefined, the parent will not be selectable. */\n selected?: MenuItemProps['selected'];\n /**\n * Corresponding field item from the source.\n * Useful if the `id` alone is not unique enough to identify the source\n */\n originalItem?: unknown;\n}\n\nexport interface FieldReferenceDisplayProps extends NoChildrenProp, TestIdProp {\n /** The path to the field reference. */\n fieldPath: [Context, ...Field[]] | Field[];\n /** If defined, the fieldPath will render as a Link with these props forwarded. */\n link?: Pick<LinkProps, 'href' | 'previewable' | 'onPreview' | 'target'> & {\n onClick?: (e: MouseEvent) => void;\n };\n /** Pass an array of Action objects to append button(s) inline. */\n actions?: Action[];\n /** Data to render in a tooltip upon hover of the component. */\n tooltipData?: FieldValueListItemProps[];\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n\nexport interface FieldReferenceMenuProps\n extends Pick<MenuProps, 'scrollAt' | 'loading' | 'loadMore' | 'onCreateNew'> {\n /** Menu items to display. */\n items: FieldReferenceMenuItem[];\n /** The current context that the menu is within. */\n currentContext?: Context;\n /** Menu items to display above the standard list. These should be items that are outside of the currentContext. */\n altContexts?: AltContext[];\n /** Parent menu item for drill-down. */\n parentItem?: FieldReferenceMenuItem | AltContext;\n /**\n * A custom label for the create new action.\n * @default 'Create new'\n * */\n createNewLabel?: string;\n}\n\nexport interface FieldReferencedMenuListProps extends TestIdProp {\n items: ParentMenuItemProps['items'];\n id?: string;\n parent?: { id: string; primary: string };\n ref?: Ref<HTMLFieldSetElement>;\n}\n\nexport interface FieldReferenceHandleValue {\n /** Used to open the menu programmatically. */\n openMenu: () => void;\n /** Used to close the menu programmatically. */\n closeMenu: () => void;\n}\n\nexport default interface FieldReferenceInputProps\n extends NoChildrenProp,\n TestIdProp,\n Pick<\n FormControlProps,\n | 'id'\n | 'label'\n | 'labelHidden'\n | 'required'\n | 'disabled'\n | 'readOnly'\n | 'status'\n | 'info'\n | 'placeholder'\n | 'additionalInfo'\n > {\n /** Props related to the menu. */\n menu: FieldReferenceMenuProps;\n /**\n * If true, the current context will be prepended to all field reference paths.\n * @default false\n * */\n showCurrentContext?: boolean;\n /**\n * If true, only a selected leaf node will be shown in the selected path.\n * @default true\n * */\n showPath?: boolean;\n /** Callback fired when an altContext item is clicked. */\n onAltContextClick?: (altContext: AltContext) => void;\n /** The current selection. */\n selected?: Field[];\n /** Callback fired when the selected field path is modified. */\n onSelectedChange: (selectedValue: FieldReferenceMenuItem[]) => void;\n /** The value of the search filter. */\n filterValue?: string;\n /** Callback fired when the filtering input value changes. */\n onFilterChange: (filterValue: string) => void;\n /** If defined, the selected fieldPath will render as a Link when the input is in a resting state, with these props forwarded. */\n link?: FieldReferenceDisplayProps['link'];\n /** Pass an array of Action objects to append button(s) inline when the input is in a selected resting state. */\n actions?: FieldReferenceDisplayProps['actions'];\n /** Callback fired when the Field Reference input gains focus. */\n onFocus?: () => void;\n /**\n * Callback fired when the Field Reference looses focus within its containing element.\n * This is not specific to the input element.\n * Note, behavior will be enhanced in an upcoming release and the input will be the only focusable element.\n */\n onBlur?: () => void;\n /**\n * Fired when the user clicks on the dropdown icon to initiate opening the menu.\n * If you want to offer default menu items without an input value, pass this function.\n * This function can be an appropriate time to fetch menu item data.\n * Remember to set the loading prop to true when fetching data for an empty list.\n *\n * @param open value defining whether the click opens or closes the menu\n */\n onDropdownButtonClick?: (open: boolean) => void;\n /** Fired when user clicks on the Field Reference input. */\n onClick?: (e: MouseEvent) => void;\n /** Fired when menu opens. */\n onMenuOpen?: () => void;\n /**\n * Fired before running default component onKeyDown handler.\n * Returning `false` from this function prevents default onKeyDown handling.\n */\n onKeyDown?: (e: ReactKeyboardEvent) => boolean | void;\n /** Ref that can be used to access the imperative handle. */\n handle?: Ref<FieldReferenceHandleValue>;\n /** Reference to the component's root element. */\n ref?: Ref<HTMLDivElement>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldReferenceDisplay.d.ts","sourceRoot":"","sources":["../../../src/components/FieldReference/FieldReferenceDisplay.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FieldReferenceDisplay.d.ts","sourceRoot":"","sources":["../../../src/components/FieldReference/FieldReferenceDisplay.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAS,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;;;;AAoGhF,wBAAmF"}
|