@pega/cosmos-react-build 5.0.0-dev.4.7 → 5.0.0-dev.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/lib/components/AppShell/AppShell.d.ts +0 -6
- package/lib/components/AppShell/AppShell.d.ts.map +0 -1
- package/lib/components/AppShell/AppShell.js +0 -58
- package/lib/components/AppShell/AppShell.js.map +0 -1
- package/lib/components/AppShell/AppShell.styles.d.ts +0 -17
- package/lib/components/AppShell/AppShell.styles.d.ts.map +0 -1
- package/lib/components/AppShell/AppShell.styles.js +0 -269
- package/lib/components/AppShell/AppShell.styles.js.map +0 -1
- package/lib/components/AppShell/AppShell.types.d.ts +0 -72
- package/lib/components/AppShell/AppShell.types.d.ts.map +0 -1
- package/lib/components/AppShell/AppShell.types.js +0 -2
- package/lib/components/AppShell/AppShell.types.js.map +0 -1
- package/lib/components/AppShell/AppShellContext.d.ts +0 -5
- package/lib/components/AppShell/AppShellContext.d.ts.map +0 -1
- package/lib/components/AppShell/AppShellContext.js +0 -8
- package/lib/components/AppShell/AppShellContext.js.map +0 -1
- package/lib/components/AppShell/Header/AppHeader.d.ts +0 -6
- package/lib/components/AppShell/Header/AppHeader.d.ts.map +0 -1
- package/lib/components/AppShell/Header/AppHeader.js +0 -73
- package/lib/components/AppShell/Header/AppHeader.js.map +0 -1
- package/lib/components/AppShell/Header/AppHeader.styles.d.ts +0 -13
- package/lib/components/AppShell/Header/AppHeader.styles.d.ts.map +0 -1
- package/lib/components/AppShell/Header/AppHeader.styles.js +0 -158
- package/lib/components/AppShell/Header/AppHeader.styles.js.map +0 -1
- package/lib/components/AppShell/Header/AppHeader.types.d.ts +0 -33
- package/lib/components/AppShell/Header/AppHeader.types.d.ts.map +0 -1
- package/lib/components/AppShell/Header/AppHeader.types.js +0 -2
- package/lib/components/AppShell/Header/AppHeader.types.js.map +0 -1
- package/lib/components/AppShell/Header/BranchButton.d.ts +0 -20
- package/lib/components/AppShell/Header/BranchButton.d.ts.map +0 -1
- package/lib/components/AppShell/Header/BranchButton.js +0 -91
- package/lib/components/AppShell/Header/BranchButton.js.map +0 -1
- package/lib/components/AppShell/NavigationList.d.ts +0 -6
- package/lib/components/AppShell/NavigationList.d.ts.map +0 -1
- package/lib/components/AppShell/NavigationList.js +0 -97
- package/lib/components/AppShell/NavigationList.js.map +0 -1
- package/lib/components/AppShell/index.d.ts +0 -5
- package/lib/components/AppShell/index.d.ts.map +0 -1
- package/lib/components/AppShell/index.js +0 -2
- package/lib/components/AppShell/index.js.map +0 -1
- package/lib/components/DynamicContentEditor/DynamicContentEditor.d.ts +0 -10
- package/lib/components/DynamicContentEditor/DynamicContentEditor.d.ts.map +0 -1
- package/lib/components/DynamicContentEditor/DynamicContentEditor.js +0 -239
- package/lib/components/DynamicContentEditor/DynamicContentEditor.js.map +0 -1
- package/lib/components/DynamicContentEditor/DynamicContentEditor.types.d.ts +0 -23
- package/lib/components/DynamicContentEditor/DynamicContentEditor.types.d.ts.map +0 -1
- package/lib/components/DynamicContentEditor/DynamicContentEditor.types.js +0 -2
- package/lib/components/DynamicContentEditor/DynamicContentEditor.types.js.map +0 -1
- package/lib/components/DynamicContentEditor/PegaCustomElement.d.ts +0 -329
- package/lib/components/DynamicContentEditor/PegaCustomElement.d.ts.map +0 -1
- package/lib/components/DynamicContentEditor/PegaCustomElement.js +0 -23
- package/lib/components/DynamicContentEditor/PegaCustomElement.js.map +0 -1
- package/lib/components/DynamicContentEditor/index.d.ts +0 -3
- package/lib/components/DynamicContentEditor/index.d.ts.map +0 -1
- package/lib/components/DynamicContentEditor/index.js +0 -2
- package/lib/components/DynamicContentEditor/index.js.map +0 -1
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.d.ts +0 -8
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.d.ts.map +0 -1
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.js +0 -176
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.js.map +0 -1
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.d.ts +0 -10
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.d.ts.map +0 -1
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.js +0 -530
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.js.map +0 -1
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.types.d.ts +0 -36
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.types.d.ts.map +0 -1
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.types.js +0 -2
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.types.js.map +0 -1
- package/lib/components/ExpressionBuilder/CodeEditor/getCodeSuggestions.d.ts +0 -13
- package/lib/components/ExpressionBuilder/CodeEditor/getCodeSuggestions.d.ts.map +0 -1
- package/lib/components/ExpressionBuilder/CodeEditor/getCodeSuggestions.js +0 -51
- package/lib/components/ExpressionBuilder/CodeEditor/getCodeSuggestions.js.map +0 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilder.d.ts +0 -6
- package/lib/components/ExpressionBuilder/ExpressionBuilder.d.ts.map +0 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilder.js +0 -51
- package/lib/components/ExpressionBuilder/ExpressionBuilder.js.map +0 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.d.ts +0 -14
- package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.d.ts.map +0 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.js +0 -81
- package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.js.map +0 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilder.types.d.ts +0 -74
- package/lib/components/ExpressionBuilder/ExpressionBuilder.types.d.ts.map +0 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilder.types.js +0 -2
- package/lib/components/ExpressionBuilder/ExpressionBuilder.types.js.map +0 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilderContext.d.ts +0 -7
- package/lib/components/ExpressionBuilder/ExpressionBuilderContext.d.ts.map +0 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilderContext.js +0 -6
- package/lib/components/ExpressionBuilder/ExpressionBuilderContext.js.map +0 -1
- package/lib/components/ExpressionBuilder/ExpressionDetails.d.ts +0 -6
- package/lib/components/ExpressionBuilder/ExpressionDetails.d.ts.map +0 -1
- package/lib/components/ExpressionBuilder/ExpressionDetails.js +0 -12
- package/lib/components/ExpressionBuilder/ExpressionDetails.js.map +0 -1
- package/lib/components/ExpressionBuilder/ExpressionItem.d.ts +0 -6
- package/lib/components/ExpressionBuilder/ExpressionItem.d.ts.map +0 -1
- package/lib/components/ExpressionBuilder/ExpressionItem.js +0 -39
- package/lib/components/ExpressionBuilder/ExpressionItem.js.map +0 -1
- package/lib/components/ExpressionBuilder/ExpressionList.d.ts +0 -6
- package/lib/components/ExpressionBuilder/ExpressionList.d.ts.map +0 -1
- package/lib/components/ExpressionBuilder/ExpressionList.js +0 -32
- package/lib/components/ExpressionBuilder/ExpressionList.js.map +0 -1
- package/lib/components/ExpressionBuilder/index.d.ts +0 -8
- package/lib/components/ExpressionBuilder/index.d.ts.map +0 -1
- package/lib/components/ExpressionBuilder/index.js +0 -6
- package/lib/components/ExpressionBuilder/index.js.map +0 -1
- package/lib/components/FlowModeller/AddNode.d.ts +0 -18
- package/lib/components/FlowModeller/AddNode.d.ts.map +0 -1
- package/lib/components/FlowModeller/AddNode.js +0 -86
- package/lib/components/FlowModeller/AddNode.js.map +0 -1
- package/lib/components/FlowModeller/Connector.d.ts +0 -7
- package/lib/components/FlowModeller/Connector.d.ts.map +0 -1
- package/lib/components/FlowModeller/Connector.js +0 -69
- package/lib/components/FlowModeller/Connector.js.map +0 -1
- package/lib/components/FlowModeller/DeletePopover.d.ts +0 -19
- package/lib/components/FlowModeller/DeletePopover.d.ts.map +0 -1
- package/lib/components/FlowModeller/DeletePopover.js +0 -136
- package/lib/components/FlowModeller/DeletePopover.js.map +0 -1
- package/lib/components/FlowModeller/FlowModeller.d.ts +0 -5
- package/lib/components/FlowModeller/FlowModeller.d.ts.map +0 -1
- package/lib/components/FlowModeller/FlowModeller.js +0 -317
- package/lib/components/FlowModeller/FlowModeller.js.map +0 -1
- package/lib/components/FlowModeller/FlowModeller.types.d.ts +0 -27
- package/lib/components/FlowModeller/FlowModeller.types.d.ts.map +0 -1
- package/lib/components/FlowModeller/FlowModeller.types.js +0 -2
- package/lib/components/FlowModeller/FlowModeller.types.js.map +0 -1
- package/lib/components/FlowModeller/FlowModellerContext.d.ts +0 -11
- package/lib/components/FlowModeller/FlowModellerContext.d.ts.map +0 -1
- package/lib/components/FlowModeller/FlowModellerContext.js +0 -8
- package/lib/components/FlowModeller/FlowModellerContext.js.map +0 -1
- package/lib/components/FlowModeller/Node/Node.types.d.ts +0 -75
- package/lib/components/FlowModeller/Node/Node.types.d.ts.map +0 -1
- package/lib/components/FlowModeller/Node/Node.types.js +0 -27
- package/lib/components/FlowModeller/Node/Node.types.js.map +0 -1
- package/lib/components/FlowModeller/Node/NodeTemplate.styles.d.ts +0 -21
- package/lib/components/FlowModeller/Node/NodeTemplate.styles.d.ts.map +0 -1
- package/lib/components/FlowModeller/Node/NodeTemplate.styles.js +0 -151
- package/lib/components/FlowModeller/Node/NodeTemplate.styles.js.map +0 -1
- package/lib/components/FlowModeller/Node/NodeTemplates.d.ts +0 -6
- package/lib/components/FlowModeller/Node/NodeTemplates.d.ts.map +0 -1
- package/lib/components/FlowModeller/Node/NodeTemplates.js +0 -70
- package/lib/components/FlowModeller/Node/NodeTemplates.js.map +0 -1
- package/lib/components/FlowModeller/Node.d.ts +0 -5
- package/lib/components/FlowModeller/Node.d.ts.map +0 -1
- package/lib/components/FlowModeller/Node.js +0 -22
- package/lib/components/FlowModeller/Node.js.map +0 -1
- package/lib/components/FlowModeller/Renderer/Renderer.d.ts +0 -5
- package/lib/components/FlowModeller/Renderer/Renderer.d.ts.map +0 -1
- package/lib/components/FlowModeller/Renderer/Renderer.js +0 -48
- package/lib/components/FlowModeller/Renderer/Renderer.js.map +0 -1
- package/lib/components/FlowModeller/Renderer/Renderer.types.d.ts +0 -18
- package/lib/components/FlowModeller/Renderer/Renderer.types.d.ts.map +0 -1
- package/lib/components/FlowModeller/Renderer/Renderer.types.js +0 -2
- package/lib/components/FlowModeller/Renderer/Renderer.types.js.map +0 -1
- package/lib/components/FlowModeller/Renderer/Utils/Graph.d.ts +0 -59
- package/lib/components/FlowModeller/Renderer/Utils/Graph.d.ts.map +0 -1
- package/lib/components/FlowModeller/Renderer/Utils/Graph.js +0 -258
- package/lib/components/FlowModeller/Renderer/Utils/Graph.js.map +0 -1
- package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.d.ts +0 -36
- package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.d.ts.map +0 -1
- package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.js +0 -120
- package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.js.map +0 -1
- package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.d.ts +0 -27
- package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.d.ts.map +0 -1
- package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.js +0 -172
- package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.js.map +0 -1
- package/lib/components/FlowModeller/Utils/addNodeUtils.d.ts +0 -17
- package/lib/components/FlowModeller/Utils/addNodeUtils.d.ts.map +0 -1
- package/lib/components/FlowModeller/Utils/addNodeUtils.js +0 -141
- package/lib/components/FlowModeller/Utils/addNodeUtils.js.map +0 -1
- package/lib/components/FlowModeller/Utils/deleteNodeUtils.d.ts +0 -30
- package/lib/components/FlowModeller/Utils/deleteNodeUtils.d.ts.map +0 -1
- package/lib/components/FlowModeller/Utils/deleteNodeUtils.js +0 -81
- package/lib/components/FlowModeller/Utils/deleteNodeUtils.js.map +0 -1
- package/lib/components/FlowModeller/helper.d.ts +0 -39
- package/lib/components/FlowModeller/helper.d.ts.map +0 -1
- package/lib/components/FlowModeller/helper.js +0 -198
- package/lib/components/FlowModeller/helper.js.map +0 -1
- package/lib/components/FlowModeller/index.d.ts +0 -20
- package/lib/components/FlowModeller/index.d.ts.map +0 -1
- package/lib/components/FlowModeller/index.js +0 -12
- package/lib/components/FlowModeller/index.js.map +0 -1
- package/lib/components/ItemLibrary/ItemLibrary.d.ts +0 -25
- package/lib/components/ItemLibrary/ItemLibrary.d.ts.map +0 -1
- package/lib/components/ItemLibrary/ItemLibrary.js +0 -62
- package/lib/components/ItemLibrary/ItemLibrary.js.map +0 -1
- package/lib/components/ItemLibrary/index.d.ts +0 -3
- package/lib/components/ItemLibrary/index.d.ts.map +0 -1
- package/lib/components/ItemLibrary/index.js +0 -3
- package/lib/components/ItemLibrary/index.js.map +0 -1
- package/lib/components/LifeCycle/Category.d.ts +0 -15
- package/lib/components/LifeCycle/Category.d.ts.map +0 -1
- package/lib/components/LifeCycle/Category.js +0 -104
- package/lib/components/LifeCycle/Category.js.map +0 -1
- package/lib/components/LifeCycle/LifeCycle.d.ts +0 -6
- package/lib/components/LifeCycle/LifeCycle.d.ts.map +0 -1
- package/lib/components/LifeCycle/LifeCycle.js +0 -77
- package/lib/components/LifeCycle/LifeCycle.js.map +0 -1
- package/lib/components/LifeCycle/LifeCycle.types.d.ts +0 -154
- package/lib/components/LifeCycle/LifeCycle.types.d.ts.map +0 -1
- package/lib/components/LifeCycle/LifeCycle.types.js +0 -79
- package/lib/components/LifeCycle/LifeCycle.types.js.map +0 -1
- package/lib/components/LifeCycle/LifeCycleContext.d.ts +0 -9
- package/lib/components/LifeCycle/LifeCycleContext.d.ts.map +0 -1
- package/lib/components/LifeCycle/LifeCycleContext.js +0 -7
- package/lib/components/LifeCycle/LifeCycleContext.js.map +0 -1
- package/lib/components/LifeCycle/LifeCycleList.d.ts +0 -30
- package/lib/components/LifeCycle/LifeCycleList.d.ts.map +0 -1
- package/lib/components/LifeCycle/LifeCycleList.js +0 -68
- package/lib/components/LifeCycle/LifeCycleList.js.map +0 -1
- package/lib/components/LifeCycle/Stage.d.ts +0 -29
- package/lib/components/LifeCycle/Stage.d.ts.map +0 -1
- package/lib/components/LifeCycle/Stage.js +0 -232
- package/lib/components/LifeCycle/Stage.js.map +0 -1
- package/lib/components/LifeCycle/Step.d.ts +0 -40
- package/lib/components/LifeCycle/Step.d.ts.map +0 -1
- package/lib/components/LifeCycle/Step.js +0 -170
- package/lib/components/LifeCycle/Step.js.map +0 -1
- package/lib/components/LifeCycle/Task.d.ts +0 -34
- package/lib/components/LifeCycle/Task.d.ts.map +0 -1
- package/lib/components/LifeCycle/Task.js +0 -158
- package/lib/components/LifeCycle/Task.js.map +0 -1
- package/lib/components/LifeCycle/index.d.ts +0 -3
- package/lib/components/LifeCycle/index.d.ts.map +0 -1
- package/lib/components/LifeCycle/index.js +0 -2
- package/lib/components/LifeCycle/index.js.map +0 -1
- package/lib/components/MobileBuildSummary/MobileBuildSummary.d.ts +0 -8
- package/lib/components/MobileBuildSummary/MobileBuildSummary.d.ts.map +0 -1
- package/lib/components/MobileBuildSummary/MobileBuildSummary.js +0 -33
- package/lib/components/MobileBuildSummary/MobileBuildSummary.js.map +0 -1
- package/lib/components/MobileBuildSummary/MobileBuildSummary.types.d.ts +0 -31
- package/lib/components/MobileBuildSummary/MobileBuildSummary.types.d.ts.map +0 -1
- package/lib/components/MobileBuildSummary/MobileBuildSummary.types.js +0 -2
- package/lib/components/MobileBuildSummary/MobileBuildSummary.types.js.map +0 -1
- package/lib/components/MobileBuildSummary/index.d.ts +0 -3
- package/lib/components/MobileBuildSummary/index.d.ts.map +0 -1
- package/lib/components/MobileBuildSummary/index.js +0 -2
- package/lib/components/MobileBuildSummary/index.js.map +0 -1
- package/lib/components/ObjectPreview/ObjectPreview.d.ts +0 -16
- package/lib/components/ObjectPreview/ObjectPreview.d.ts.map +0 -1
- package/lib/components/ObjectPreview/ObjectPreview.js +0 -25
- package/lib/components/ObjectPreview/ObjectPreview.js.map +0 -1
- package/lib/components/ObjectPreview/index.d.ts +0 -3
- package/lib/components/ObjectPreview/index.d.ts.map +0 -1
- package/lib/components/ObjectPreview/index.js +0 -3
- package/lib/components/ObjectPreview/index.js.map +0 -1
- package/lib/components/ObjectSelect/ObjectPicker.d.ts +0 -15
- package/lib/components/ObjectSelect/ObjectPicker.d.ts.map +0 -1
- package/lib/components/ObjectSelect/ObjectPicker.js +0 -40
- package/lib/components/ObjectSelect/ObjectPicker.js.map +0 -1
- package/lib/components/ObjectSelect/ObjectSelect.d.ts +0 -32
- package/lib/components/ObjectSelect/ObjectSelect.d.ts.map +0 -1
- package/lib/components/ObjectSelect/ObjectSelect.js +0 -41
- package/lib/components/ObjectSelect/ObjectSelect.js.map +0 -1
- package/lib/components/ObjectSelect/ObjectSummary.d.ts +0 -32
- package/lib/components/ObjectSelect/ObjectSummary.d.ts.map +0 -1
- package/lib/components/ObjectSelect/ObjectSummary.js +0 -81
- package/lib/components/ObjectSelect/ObjectSummary.js.map +0 -1
- package/lib/components/ObjectSelect/index.d.ts +0 -3
- package/lib/components/ObjectSelect/index.d.ts.map +0 -1
- package/lib/components/ObjectSelect/index.js +0 -2
- package/lib/components/ObjectSelect/index.js.map +0 -1
- package/lib/components/ObjectSelect/useCreateModal.d.ts +0 -32
- package/lib/components/ObjectSelect/useCreateModal.d.ts.map +0 -1
- package/lib/components/ObjectSelect/useCreateModal.js +0 -60
- package/lib/components/ObjectSelect/useCreateModal.js.map +0 -1
- package/lib/components/PageBanner/PageBanner.d.ts +0 -22
- package/lib/components/PageBanner/PageBanner.d.ts.map +0 -1
- package/lib/components/PageBanner/PageBanner.js +0 -59
- package/lib/components/PageBanner/PageBanner.js.map +0 -1
- package/lib/components/PageBanner/index.d.ts +0 -3
- package/lib/components/PageBanner/index.d.ts.map +0 -1
- package/lib/components/PageBanner/index.js +0 -2
- package/lib/components/PageBanner/index.js.map +0 -1
- package/lib/components/PageTemplates/GalleryPage.d.ts +0 -23
- package/lib/components/PageTemplates/GalleryPage.d.ts.map +0 -1
- package/lib/components/PageTemplates/GalleryPage.js +0 -47
- package/lib/components/PageTemplates/GalleryPage.js.map +0 -1
- package/lib/components/PageTemplates/PageTemplates.d.ts +0 -27
- package/lib/components/PageTemplates/PageTemplates.d.ts.map +0 -1
- package/lib/components/PageTemplates/PageTemplates.js +0 -72
- package/lib/components/PageTemplates/PageTemplates.js.map +0 -1
- package/lib/components/PageTemplates/ShowcasePage.d.ts +0 -16
- package/lib/components/PageTemplates/ShowcasePage.d.ts.map +0 -1
- package/lib/components/PageTemplates/ShowcasePage.js +0 -29
- package/lib/components/PageTemplates/ShowcasePage.js.map +0 -1
- package/lib/components/PageTemplates/index.d.ts +0 -6
- package/lib/components/PageTemplates/index.d.ts.map +0 -1
- package/lib/components/PageTemplates/index.js +0 -4
- package/lib/components/PageTemplates/index.js.map +0 -1
- package/lib/components/SummaryCard/SummaryCard.d.ts +0 -15
- package/lib/components/SummaryCard/SummaryCard.d.ts.map +0 -1
- package/lib/components/SummaryCard/SummaryCard.js +0 -27
- package/lib/components/SummaryCard/SummaryCard.js.map +0 -1
- package/lib/components/SummaryCard/index.d.ts +0 -3
- package/lib/components/SummaryCard/index.d.ts.map +0 -1
- package/lib/components/SummaryCard/index.js +0 -3
- package/lib/components/SummaryCard/index.js.map +0 -1
- package/lib/components/Workbench/ConfigurationPanel.d.ts +0 -5
- package/lib/components/Workbench/ConfigurationPanel.d.ts.map +0 -1
- package/lib/components/Workbench/ConfigurationPanel.js +0 -10
- package/lib/components/Workbench/ConfigurationPanel.js.map +0 -1
- package/lib/components/Workbench/Toolbar.d.ts +0 -10
- package/lib/components/Workbench/Toolbar.d.ts.map +0 -1
- package/lib/components/Workbench/Toolbar.js +0 -14
- package/lib/components/Workbench/Toolbar.js.map +0 -1
- package/lib/components/Workbench/UtilityPanel.d.ts +0 -7
- package/lib/components/Workbench/UtilityPanel.d.ts.map +0 -1
- package/lib/components/Workbench/UtilityPanel.js +0 -12
- package/lib/components/Workbench/UtilityPanel.js.map +0 -1
- package/lib/components/Workbench/Workbench.d.ts +0 -6
- package/lib/components/Workbench/Workbench.d.ts.map +0 -1
- package/lib/components/Workbench/Workbench.js +0 -23
- package/lib/components/Workbench/Workbench.js.map +0 -1
- package/lib/components/Workbench/Workbench.styles.d.ts +0 -10
- package/lib/components/Workbench/Workbench.styles.d.ts.map +0 -1
- package/lib/components/Workbench/Workbench.styles.js +0 -75
- package/lib/components/Workbench/Workbench.styles.js.map +0 -1
- package/lib/components/Workbench/Workbench.types.d.ts +0 -47
- package/lib/components/Workbench/Workbench.types.d.ts.map +0 -1
- package/lib/components/Workbench/Workbench.types.js +0 -2
- package/lib/components/Workbench/Workbench.types.js.map +0 -1
- package/lib/components/Workbench/index.d.ts +0 -2
- package/lib/components/Workbench/index.d.ts.map +0 -1
- package/lib/components/Workbench/index.js +0 -2
- package/lib/components/Workbench/index.js.map +0 -1
- package/lib/index.d.ts +0 -23
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -24
- package/lib/index.js.map +0 -1
- package/lib/utils/index.d.ts +0 -2
- package/lib/utils/index.d.ts.map +0 -1
- package/lib/utils/index.js +0 -2
- package/lib/utils/index.js.map +0 -1
- package/lib/utils/utils.d.ts +0 -14
- package/lib/utils/utils.d.ts.map +0 -1
- package/lib/utils/utils.js +0 -13
- package/lib/utils/utils.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PegaCustomElement.d.ts","sourceRoot":"","sources":["../../../src/components/DynamicContentEditor/PegaCustomElement.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,4MAYpC,CAAC;AAEH,eAAO,MAAM,0BAA0B,QAAS,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQhE,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export const pegaReferenceElementStyle = `pega-reference {
|
|
2
|
-
color:#076bc9;
|
|
3
|
-
cursor:pointer;
|
|
4
|
-
}
|
|
5
|
-
pega-reference:hover{
|
|
6
|
-
text-decoration:underline;
|
|
7
|
-
}
|
|
8
|
-
pega-reference::before{
|
|
9
|
-
content: '['
|
|
10
|
-
}
|
|
11
|
-
pega-reference::after{
|
|
12
|
-
content: ']'
|
|
13
|
-
}`;
|
|
14
|
-
export const createPegaReferenceElement = (win) => {
|
|
15
|
-
return class PegaReferenceElement extends win.HTMLElement {
|
|
16
|
-
connectedCallback() {
|
|
17
|
-
const template = document.createElement('template');
|
|
18
|
-
const temp = document.importNode(template.content, true);
|
|
19
|
-
this.append(temp);
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=PegaCustomElement.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PegaCustomElement.js","sourceRoot":"","sources":["../../../src/components/DynamicContentEditor/PegaCustomElement.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;;;;;;;;;EAYvC,CAAC;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,GAAsB,EAAE,EAAE;IACnE,OAAO,MAAM,oBAAqB,SAAQ,GAAG,CAAC,WAAW;QACvD,iBAAiB;YACf,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;YACpD,MAAM,IAAI,GAAG,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YACzD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["export const pegaReferenceElementStyle = `pega-reference {\n color:#076bc9;\n cursor:pointer;\n}\npega-reference:hover{\n text-decoration:underline;\n}\npega-reference::before{\n content: '['\n}\npega-reference::after{\n content: ']'\n}`;\n\nexport const createPegaReferenceElement = (win: typeof globalThis) => {\n return class PegaReferenceElement extends win.HTMLElement {\n connectedCallback() {\n const template = document.createElement('template');\n const temp = document.importNode(template.content, true);\n this.append(temp);\n }\n };\n};\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DynamicContentEditor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,YAAY,EAAE,yBAAyB,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/DynamicContentEditor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC","sourcesContent":["export { default } from './DynamicContentEditor';\nexport type { DynamicContentEditorProps, ItemType } from './DynamicContentEditor.types';\n"]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
2
|
-
import 'codemirror/addon/edit/closebrackets';
|
|
3
|
-
import 'codemirror/addon/hint/show-hint.js';
|
|
4
|
-
import { ForwardProps } from '@pega/cosmos-react-core';
|
|
5
|
-
import { CodeEditorProps } from './CodeEditor.types';
|
|
6
|
-
declare const CodeEditor: FunctionComponent<CodeEditorProps & ForwardProps>;
|
|
7
|
-
export default CodeEditor;
|
|
8
|
-
//# sourceMappingURL=CodeEditor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CodeEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/ExpressionBuilder/CodeEditor/CodeEditor.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,iBAAiB,EAMlB,MAAM,OAAO,CAAC;AAUf,OAAO,qCAAqC,CAAC;AAC7C,OAAO,oCAAoC,CAAC;AAE5C,OAAO,EAAkC,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGvF,OAAO,EAEL,eAAe,EAGhB,MAAM,oBAAoB,CAAC;AA0E5B,QAAA,MAAM,UAAU,EAAE,iBAAiB,CAAC,eAAe,GAAG,YAAY,CAsJjE,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// cspell:words unfocus
|
|
3
|
-
import { forwardRef, useRef, useState, useEffect, useImperativeHandle } from 'react';
|
|
4
|
-
import { Controlled as ReactCodeMirror } from 'react-codemirror2';
|
|
5
|
-
import { showHint, defineMode } from 'codemirror';
|
|
6
|
-
import 'codemirror/addon/edit/closebrackets';
|
|
7
|
-
import 'codemirror/addon/hint/show-hint.js';
|
|
8
|
-
import { useConsolidatedRef, useElement } from '@pega/cosmos-react-core';
|
|
9
|
-
import { StyledFormFieldInfo } from '@pega/cosmos-react-core/lib/components/FormField/FormField';
|
|
10
|
-
import { StyledCodeEditor } from './CodeEditor.styles';
|
|
11
|
-
import getCodeSuggestions from './getCodeSuggestions';
|
|
12
|
-
defineMode('expression', () => {
|
|
13
|
-
const tokens = [
|
|
14
|
-
// Below regex is used to identify the context
|
|
15
|
-
{ token: /\w+@/, style: 'ex-context' },
|
|
16
|
-
// Below regex is used to identify the RuleType
|
|
17
|
-
{ token: /\w+:/, style: 'ex-context' },
|
|
18
|
-
// Below regex is used to identify the RuleName
|
|
19
|
-
{ token: /\w+[(]/, style: 'ex-ruleName' },
|
|
20
|
-
// Below regex is used to identify the delimeters
|
|
21
|
-
{ token: /[:.(),]/, style: 'ex-delimeter' },
|
|
22
|
-
// Below regex is used to identify the operators
|
|
23
|
-
{ token: /[-+\\/*=<>@]+/, style: 'ex-operator' },
|
|
24
|
-
// Below regex is used to identify the spaces
|
|
25
|
-
{ token: / /, style: 'ex-space' }
|
|
26
|
-
];
|
|
27
|
-
return {
|
|
28
|
-
startState() {
|
|
29
|
-
return { inString: false };
|
|
30
|
-
},
|
|
31
|
-
token(stream, state) {
|
|
32
|
-
// Used to identify the constants in the expression
|
|
33
|
-
const nextChar = stream.peek();
|
|
34
|
-
if (!state.inString && (nextChar === "'" || nextChar === '"')) {
|
|
35
|
-
stream.next(); // Skip quote
|
|
36
|
-
state.inString = true; // Update state
|
|
37
|
-
}
|
|
38
|
-
if (state.inString) {
|
|
39
|
-
if (nextChar && stream.skipTo(nextChar)) {
|
|
40
|
-
// Quote found on this line
|
|
41
|
-
stream.next(); // Skip quote
|
|
42
|
-
state.inString = false; // Clear flag
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
stream.skipToEnd(); // Rest of line is string
|
|
46
|
-
}
|
|
47
|
-
return nextChar === '"' ? 'ex-constant' : 'ex-context'; // Token style
|
|
48
|
-
}
|
|
49
|
-
if (stream.peek() === '.') {
|
|
50
|
-
stream.next();
|
|
51
|
-
if (stream.match(/.\w+\(/))
|
|
52
|
-
return 'ex-delimeter';
|
|
53
|
-
}
|
|
54
|
-
// Used to match the regex in the expression
|
|
55
|
-
for (const element of tokens) {
|
|
56
|
-
const match = stream.match(element.token, false);
|
|
57
|
-
if (match) {
|
|
58
|
-
if (stream.pos === stream.start) {
|
|
59
|
-
stream.next();
|
|
60
|
-
}
|
|
61
|
-
return element.style;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
stream.next();
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
});
|
|
69
|
-
const defaultConfigOptions = {
|
|
70
|
-
lineWrapping: true,
|
|
71
|
-
smartIndent: true,
|
|
72
|
-
autoCloseBrackets: true,
|
|
73
|
-
extraKeys: { Tab: false, 'Shift-Tab': false }
|
|
74
|
-
};
|
|
75
|
-
const CodeEditor = forwardRef(function CodeEditor({ fetchSuggestions, autoCompleteTriggers, editorConfigProps, codeEditorHandle, defaultValue = '', loading = false, readOnly, errors, onChange, ...props }, ref) {
|
|
76
|
-
const [value, setCode] = useState(defaultValue);
|
|
77
|
-
const [suggestions, setSuggestions] = useState([]);
|
|
78
|
-
const [codeMirror, setCodeMirror] = useState(null);
|
|
79
|
-
const [codeEditorContainer, setCodeEditorContainer] = useElement();
|
|
80
|
-
const codeEditorConsolidatedRef = useConsolidatedRef(setCodeEditorContainer, ref);
|
|
81
|
-
const [suggestionTrigger, setSuggestionTrigger] = useState(null);
|
|
82
|
-
const [popover, showPopover] = useState(false);
|
|
83
|
-
const mounted = useRef(false);
|
|
84
|
-
useImperativeHandle(codeEditorHandle, () => ({
|
|
85
|
-
insertText: (text) => {
|
|
86
|
-
if (codeMirror) {
|
|
87
|
-
if (codeMirror.getSelection()) {
|
|
88
|
-
codeMirror.replaceSelection(text);
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
const cur = codeMirror.getCursor();
|
|
92
|
-
codeMirror.replaceRange(text, cur);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
getValue: () => {
|
|
97
|
-
return codeMirror?.getValue();
|
|
98
|
-
}
|
|
99
|
-
}), [codeMirror]);
|
|
100
|
-
const autoComplete = (codeEditor) => {
|
|
101
|
-
const hintOptions = {
|
|
102
|
-
completeSingle: false,
|
|
103
|
-
completeOnSingleClick: true,
|
|
104
|
-
closeOnUnfocus: true,
|
|
105
|
-
suggestions,
|
|
106
|
-
container: codeEditorContainer,
|
|
107
|
-
loading,
|
|
108
|
-
triggerCharacterCursorPos: suggestionTrigger?.cursorPosition
|
|
109
|
-
};
|
|
110
|
-
showHint(codeEditor, getCodeSuggestions, hintOptions);
|
|
111
|
-
};
|
|
112
|
-
const onBeforeChange = async (editor, _data, textvalue) => {
|
|
113
|
-
setCode(textvalue);
|
|
114
|
-
onChange?.(textvalue);
|
|
115
|
-
const currentCursor = editor.getCursor();
|
|
116
|
-
const currentCharacter = editor
|
|
117
|
-
.getTokenAt(currentCursor)
|
|
118
|
-
.string.trim();
|
|
119
|
-
let newSuggestions = [];
|
|
120
|
-
if (autoCompleteTriggers?.includes(currentCharacter) && fetchSuggestions) {
|
|
121
|
-
setSuggestionTrigger({
|
|
122
|
-
character: currentCharacter,
|
|
123
|
-
cursorPosition: currentCursor
|
|
124
|
-
});
|
|
125
|
-
newSuggestions = [
|
|
126
|
-
...(await fetchSuggestions(currentCharacter, {
|
|
127
|
-
line: currentCursor.line,
|
|
128
|
-
ch: currentCursor.ch
|
|
129
|
-
}))
|
|
130
|
-
];
|
|
131
|
-
if (mounted.current) {
|
|
132
|
-
setSuggestions(newSuggestions);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
useEffect(() => {
|
|
137
|
-
if (!popover)
|
|
138
|
-
return;
|
|
139
|
-
const isSuggestionTriggerPresent = suggestionTrigger &&
|
|
140
|
-
codeMirror
|
|
141
|
-
?.getTokenAt(suggestionTrigger.cursorPosition)
|
|
142
|
-
.string.includes(suggestionTrigger.character);
|
|
143
|
-
if (!isSuggestionTriggerPresent) {
|
|
144
|
-
codeMirror?.closeHint();
|
|
145
|
-
showPopover(false);
|
|
146
|
-
setSuggestionTrigger(null);
|
|
147
|
-
}
|
|
148
|
-
}, [onBeforeChange]);
|
|
149
|
-
useEffect(() => {
|
|
150
|
-
if (codeMirror && (suggestionTrigger || loading)) {
|
|
151
|
-
autoComplete(codeMirror);
|
|
152
|
-
showPopover(true);
|
|
153
|
-
}
|
|
154
|
-
else {
|
|
155
|
-
codeMirror?.closeHint();
|
|
156
|
-
showPopover(false);
|
|
157
|
-
}
|
|
158
|
-
}, [suggestions, loading]);
|
|
159
|
-
useEffect(() => {
|
|
160
|
-
mounted.current = true;
|
|
161
|
-
return () => {
|
|
162
|
-
mounted.current = false;
|
|
163
|
-
};
|
|
164
|
-
}, []);
|
|
165
|
-
return (_jsxs(StyledCodeEditor, { container: {
|
|
166
|
-
direction: 'column',
|
|
167
|
-
justify: 'between'
|
|
168
|
-
}, item: {
|
|
169
|
-
grow: 1
|
|
170
|
-
}, ref: codeEditorConsolidatedRef, errors: errors, readOnly: readOnly, isLoading: loading, suggestions: suggestions, ...props, children: [_jsx(ReactCodeMirror, { value: value, onBeforeChange: onBeforeChange, options: { ...defaultConfigOptions, ...editorConfigProps }, editorDidMount: editor => {
|
|
171
|
-
editor.setSize('100%', '100%');
|
|
172
|
-
setCodeMirror(editor);
|
|
173
|
-
} }), errors && _jsx(StyledFormFieldInfo, { status: 'error', children: errors })] }));
|
|
174
|
-
});
|
|
175
|
-
export default CodeEditor;
|
|
176
|
-
//# sourceMappingURL=CodeEditor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CodeEditor.js","sourceRoot":"","sources":["../../../../src/components/ExpressionBuilder/CodeEditor/CodeEditor.tsx"],"names":[],"mappings":";AAAA,uBAAuB;AACvB,OAAO,EACL,UAAU,EAGV,MAAM,EACN,QAAQ,EACR,SAAS,EACT,mBAAmB,EACpB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,UAAU,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EACL,QAAQ,EACR,UAAU,EAKX,MAAM,YAAY,CAAC;AACpB,OAAO,qCAAqC,CAAC;AAC7C,OAAO,oCAAoC,CAAC;AAE5C,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAgB,MAAM,yBAAyB,CAAC;AACvF,OAAO,EAAE,mBAAmB,EAAE,MAAM,4DAA4D,CAAC;AAQjG,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,kBAAkB,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AC,mBAAmB,IAAC,MAAM,EAAC,OAAO,YAAE,MAAM,GAAuB,IAC5D,CACpB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["// cspell:words unfocus\nimport {\n forwardRef,\n FunctionComponent,\n PropsWithoutRef,\n useRef,\n useState,\n useEffect,\n useImperativeHandle\n} from 'react';\nimport { Controlled as ReactCodeMirror } from 'react-codemirror2';\nimport {\n showHint,\n defineMode,\n Editor,\n Position,\n EditorChange,\n EditorConfiguration\n} from 'codemirror';\nimport 'codemirror/addon/edit/closebrackets';\nimport 'codemirror/addon/hint/show-hint.js';\n\nimport { useConsolidatedRef, useElement, ForwardProps } from '@pega/cosmos-react-core';\nimport { StyledFormFieldInfo } from '@pega/cosmos-react-core/lib/components/FormField/FormField';\n\nimport {\n AutoCompleteTriggerChar,\n CodeEditorProps,\n EditorState,\n SuggestionType\n} from './CodeEditor.types';\nimport { StyledCodeEditor } from './CodeEditor.styles';\nimport getCodeSuggestions from './getCodeSuggestions';\n\ndefineMode('expression', () => {\n const tokens = [\n // Below regex is used to identify the context\n { token: /\\w+@/, style: 'ex-context' },\n // Below regex is used to identify the RuleType\n { token: /\\w+:/, style: 'ex-context' },\n // Below regex is used to identify the RuleName\n { token: /\\w+[(]/, style: 'ex-ruleName' },\n // Below regex is used to identify the delimeters\n { token: /[:.(),]/, style: 'ex-delimeter' },\n // Below regex is used to identify the operators\n { token: /[-+\\\\/*=<>@]+/, style: 'ex-operator' },\n // Below regex is used to identify the spaces\n { token: / /, style: 'ex-space' }\n ];\n\n return {\n startState() {\n return { inString: false };\n },\n token(stream, state) {\n // Used to identify the constants in the expression\n const nextChar = stream.peek();\n if (!state.inString && (nextChar === \"'\" || nextChar === '\"')) {\n stream.next(); // Skip quote\n state.inString = true; // Update state\n }\n\n if (state.inString) {\n if (nextChar && stream.skipTo(nextChar)) {\n // Quote found on this line\n stream.next(); // Skip quote\n state.inString = false; // Clear flag\n } else {\n stream.skipToEnd(); // Rest of line is string\n }\n return nextChar === '\"' ? 'ex-constant' : 'ex-context'; // Token style\n }\n\n if (stream.peek() === '.') {\n stream.next();\n if (stream.match(/.\\w+\\(/)) return 'ex-delimeter';\n }\n\n // Used to match the regex in the expression\n for (const element of tokens) {\n const match = stream.match(element.token, false);\n if (match) {\n if (stream.pos === stream.start) {\n stream.next();\n }\n return element.style;\n }\n }\n stream.next();\n return null;\n }\n };\n});\n\nconst defaultConfigOptions: Pick<\n EditorConfiguration,\n 'lineWrapping' | 'smartIndent' | 'autoCloseBrackets' | 'extraKeys'\n> = {\n lineWrapping: true,\n smartIndent: true,\n autoCloseBrackets: true,\n extraKeys: { Tab: false, 'Shift-Tab': false }\n};\n\nconst CodeEditor: FunctionComponent<CodeEditorProps & ForwardProps> = forwardRef(\n function CodeEditor(\n {\n fetchSuggestions,\n autoCompleteTriggers,\n editorConfigProps,\n codeEditorHandle,\n defaultValue = '',\n loading = false,\n readOnly,\n errors,\n onChange,\n ...props\n }: PropsWithoutRef<CodeEditorProps>,\n ref: CodeEditorProps['ref']\n ) {\n const [value, setCode] = useState<string>(defaultValue);\n const [suggestions, setSuggestions] = useState<SuggestionType[]>([]);\n const [codeMirror, setCodeMirror] = useState<Editor | null>(null);\n const [codeEditorContainer, setCodeEditorContainer] = useElement<HTMLDivElement>();\n const codeEditorConsolidatedRef = useConsolidatedRef(setCodeEditorContainer, ref);\n const [suggestionTrigger, setSuggestionTrigger] = useState<{\n character: AutoCompleteTriggerChar;\n cursorPosition: Position;\n } | null>(null);\n const [popover, showPopover] = useState(false);\n const mounted = useRef(false);\n\n useImperativeHandle<any, EditorState>(\n codeEditorHandle,\n () => ({\n insertText: (text: string) => {\n if (codeMirror) {\n if (codeMirror.getSelection()) {\n codeMirror.replaceSelection(text);\n } else {\n const cur: Position = codeMirror.getCursor();\n codeMirror.replaceRange(text, cur);\n }\n }\n },\n getValue: () => {\n return codeMirror?.getValue();\n }\n }),\n [codeMirror]\n );\n\n const autoComplete = (codeEditor: Editor) => {\n const hintOptions = {\n completeSingle: false,\n completeOnSingleClick: true,\n closeOnUnfocus: true,\n suggestions,\n container: codeEditorContainer,\n loading,\n triggerCharacterCursorPos: suggestionTrigger?.cursorPosition\n };\n showHint(codeEditor, getCodeSuggestions, hintOptions);\n };\n\n const onBeforeChange = async (editor: Editor, _data: EditorChange, textvalue: string) => {\n setCode(textvalue);\n onChange?.(textvalue);\n const currentCursor = editor.getCursor();\n const currentCharacter = editor\n .getTokenAt(currentCursor)\n .string.trim() as AutoCompleteTriggerChar;\n\n let newSuggestions: SuggestionType[] = [];\n\n if (autoCompleteTriggers?.includes(currentCharacter) && fetchSuggestions) {\n setSuggestionTrigger({\n character: currentCharacter,\n cursorPosition: currentCursor\n });\n\n newSuggestions = [\n ...(await fetchSuggestions(currentCharacter, {\n line: currentCursor.line,\n ch: currentCursor.ch\n }))\n ];\n if (mounted.current) {\n setSuggestions(newSuggestions);\n }\n }\n };\n\n useEffect(() => {\n if (!popover) return;\n const isSuggestionTriggerPresent =\n suggestionTrigger &&\n codeMirror\n ?.getTokenAt(suggestionTrigger.cursorPosition)\n .string.includes(suggestionTrigger.character);\n\n if (!isSuggestionTriggerPresent) {\n codeMirror?.closeHint();\n showPopover(false);\n setSuggestionTrigger(null);\n }\n }, [onBeforeChange]);\n\n useEffect(() => {\n if (codeMirror && (suggestionTrigger || loading)) {\n autoComplete(codeMirror);\n showPopover(true);\n } else {\n codeMirror?.closeHint();\n showPopover(false);\n }\n }, [suggestions, loading]);\n\n useEffect(() => {\n mounted.current = true;\n return () => {\n mounted.current = false;\n };\n }, []);\n\n return (\n <StyledCodeEditor\n container={{\n direction: 'column',\n justify: 'between'\n }}\n item={{\n grow: 1\n }}\n ref={codeEditorConsolidatedRef}\n errors={errors}\n readOnly={readOnly}\n isLoading={loading}\n suggestions={suggestions}\n {...props}\n >\n <ReactCodeMirror\n value={value}\n onBeforeChange={onBeforeChange}\n options={{ ...defaultConfigOptions, ...editorConfigProps }}\n editorDidMount={editor => {\n editor.setSize('100%', '100%');\n setCodeMirror(editor);\n }}\n />\n {errors && <StyledFormFieldInfo status='error'>{errors}</StyledFormFieldInfo>}\n </StyledCodeEditor>\n );\n }\n);\n\nexport default CodeEditor;\n"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { SuggestionType } from './CodeEditor.types';
|
|
3
|
-
export declare const StyledLoading: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
-
export declare const StyledCodeEditor: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").FlexProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {
|
|
5
|
-
isLoading?: boolean | undefined;
|
|
6
|
-
errors?: string | undefined;
|
|
7
|
-
readOnly?: boolean | undefined;
|
|
8
|
-
suggestions: SuggestionType[];
|
|
9
|
-
}, never>;
|
|
10
|
-
//# sourceMappingURL=CodeEditor.styles.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CodeEditor.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.ts"],"names":[],"mappings":";AAOA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,eAAO,MAAM,aAAa,yGAEzB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;iBAId,cAAc,EAAE;SA4hB9B,CAAC"}
|