@pega/cosmos-react-build 9.0.0-build.9.8 → 9.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 +13 -11
- package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
- package/lib/components/AppShell/Header/AppHeader.styles.d.ts +11 -7
- package/lib/components/AppShell/Header/AppHeader.styles.d.ts.map +1 -1
- package/lib/components/AppShell/Header/BranchButton.d.ts +6 -4
- package/lib/components/AppShell/Header/BranchButton.d.ts.map +1 -1
- package/lib/components/AppShell/Header/BranchButton.js.map +1 -1
- package/lib/components/AuthoringPanel/AuthoringPanel.styles.d.ts +753 -15
- package/lib/components/AuthoringPanel/AuthoringPanel.styles.d.ts.map +1 -1
- package/lib/components/AuthoringPanel/AuthoringPanel.styles.js +5 -4
- package/lib/components/AuthoringPanel/AuthoringPanel.styles.js.map +1 -1
- package/lib/components/Automation/Automation.js.map +1 -1
- package/lib/components/Automation/Automation.styles.d.ts +33 -10
- package/lib/components/Automation/Automation.styles.d.ts.map +1 -1
- package/lib/components/Automation/Automation.styles.js +1 -1
- package/lib/components/Automation/Automation.styles.js.map +1 -1
- package/lib/components/BackgroundPicker/BackgroundPicker.styles.d.ts +375 -11
- package/lib/components/BackgroundPicker/BackgroundPicker.styles.d.ts.map +1 -1
- package/lib/components/BackgroundPicker/BackgroundPicker.styles.js.map +1 -1
- package/lib/components/DynamicContentEditor/DynamicContentEditor.d.ts +8 -4
- package/lib/components/DynamicContentEditor/DynamicContentEditor.d.ts.map +1 -1
- package/lib/components/DynamicContentEditor/DynamicContentEditor.js +88 -68
- package/lib/components/DynamicContentEditor/DynamicContentEditor.js.map +1 -1
- package/lib/components/DynamicContentEditor/DynamicContentEditor.test-ids.d.ts +2 -0
- package/lib/components/DynamicContentEditor/DynamicContentEditor.test-ids.d.ts.map +1 -0
- package/lib/components/DynamicContentEditor/DynamicContentEditor.test-ids.js +9 -0
- package/lib/components/DynamicContentEditor/DynamicContentEditor.test-ids.js.map +1 -0
- package/lib/components/DynamicContentEditor/DynamicContentEditor.types.d.ts +12 -3
- package/lib/components/DynamicContentEditor/DynamicContentEditor.types.d.ts.map +1 -1
- package/lib/components/DynamicContentEditor/DynamicContentEditor.types.js +2 -1
- package/lib/components/DynamicContentEditor/DynamicContentEditor.types.js.map +1 -1
- package/lib/components/DynamicInput/DynamicInput.d.ts.map +1 -1
- package/lib/components/DynamicInput/DynamicInput.js +11 -5
- package/lib/components/DynamicInput/DynamicInput.js.map +1 -1
- package/lib/components/DynamicInput/DynamicInput.styles.d.ts +187 -2
- package/lib/components/DynamicInput/DynamicInput.styles.d.ts.map +1 -1
- package/lib/components/DynamicInput/DynamicInput.styles.js +29 -2
- package/lib/components/DynamicInput/DynamicInput.styles.js.map +1 -1
- package/lib/components/DynamicInput/DynamicInput.types.d.ts +4 -2
- package/lib/components/DynamicInput/DynamicInput.types.d.ts.map +1 -1
- package/lib/components/DynamicInput/DynamicInput.types.js.map +1 -1
- package/lib/components/DynamicInput/SourceButton.d.ts +1 -1
- package/lib/components/DynamicInput/SourceButton.d.ts.map +1 -1
- package/lib/components/DynamicInput/SourceButton.js.map +1 -1
- package/lib/components/DynamicInput/utils.d.ts.map +1 -1
- package/lib/components/DynamicInput/utils.js +5 -1
- package/lib/components/DynamicInput/utils.js.map +1 -1
- package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.d.ts +5 -5
- package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.d.ts.map +1 -1
- package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.js.map +1 -1
- package/lib/components/Expression/Expression.styles.d.ts +376 -8
- package/lib/components/Expression/Expression.styles.d.ts.map +1 -1
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.d.ts.map +1 -1
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.js +138 -41
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.js.map +1 -1
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.d.ts +190 -8
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.d.ts.map +1 -1
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.js +53 -32
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.js.map +1 -1
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.types.d.ts +2 -1
- 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 +1 -1
- package/lib/components/ExpressionBuilder/CodeEditor/getCodeSuggestions.d.ts.map +1 -1
- package/lib/components/ExpressionBuilder/CodeEditor/getCodeSuggestions.js +7 -7
- package/lib/components/ExpressionBuilder/CodeEditor/getCodeSuggestions.js.map +1 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilder.d.ts.map +1 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilder.js +7 -6
- package/lib/components/ExpressionBuilder/ExpressionBuilder.js.map +1 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.d.ts +211 -22
- package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.d.ts.map +1 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.js +6 -0
- package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.js.map +1 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilder.types.d.ts +5 -3
- 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/ExpressionItem.d.ts.map +1 -1
- package/lib/components/ExpressionBuilder/ExpressionItem.js +17 -13
- package/lib/components/ExpressionBuilder/ExpressionItem.js.map +1 -1
- package/lib/components/ExpressionBuilder/ExpressionList.d.ts.map +1 -1
- package/lib/components/ExpressionBuilder/ExpressionList.js +18 -13
- 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 +20 -11
- package/lib/components/FieldReference/FieldReference.styles.d.ts.map +1 -1
- package/lib/components/FieldReference/FieldReference.styles.js +10 -1
- package/lib/components/FieldReference/FieldReference.styles.js.map +1 -1
- package/lib/components/FieldReference/FieldReferenceDisplay.d.ts.map +1 -1
- package/lib/components/FieldReference/FieldReferenceDisplay.js +3 -3
- 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 +13 -5
- package/lib/components/FieldReference/FieldReferenceInput.js.map +1 -1
- package/lib/components/FlowModeller/AddNode.d.ts +22 -0
- package/lib/components/FlowModeller/AddNode.d.ts.map +1 -0
- package/lib/components/FlowModeller/AddNode.js +95 -0
- package/lib/components/FlowModeller/AddNode.js.map +1 -0
- package/lib/components/FlowModeller/Connector.d.ts +12 -0
- package/lib/components/FlowModeller/Connector.d.ts.map +1 -0
- package/lib/components/FlowModeller/Connector.js +84 -0
- package/lib/components/FlowModeller/Connector.js.map +1 -0
- package/lib/components/FlowModeller/DeleteDialog.d.ts +39 -0
- package/lib/components/FlowModeller/DeleteDialog.d.ts.map +1 -0
- package/lib/components/FlowModeller/DeleteDialog.js +158 -0
- package/lib/components/FlowModeller/DeleteDialog.js.map +1 -0
- package/lib/components/FlowModeller/FlowAuthoringPanel/FlowAuthoringPanel.d.ts +4 -0
- package/lib/components/FlowModeller/FlowAuthoringPanel/FlowAuthoringPanel.d.ts.map +1 -0
- package/lib/components/FlowModeller/FlowAuthoringPanel/FlowAuthoringPanel.js +37 -0
- package/lib/components/FlowModeller/FlowAuthoringPanel/FlowAuthoringPanel.js.map +1 -0
- package/lib/components/FlowModeller/FlowAuthoringPanel/FlowAuthoringPanel.styles.d.ts +8 -0
- package/lib/components/FlowModeller/FlowAuthoringPanel/FlowAuthoringPanel.styles.d.ts.map +1 -0
- package/lib/components/FlowModeller/FlowAuthoringPanel/FlowAuthoringPanel.styles.js +80 -0
- package/lib/components/FlowModeller/FlowAuthoringPanel/FlowAuthoringPanel.styles.js.map +1 -0
- package/lib/components/FlowModeller/FlowAuthoringPanel/FlowAuthoringPanel.types.d.ts +36 -0
- package/lib/components/FlowModeller/FlowAuthoringPanel/FlowAuthoringPanel.types.d.ts.map +1 -0
- package/lib/components/FlowModeller/FlowAuthoringPanel/FlowAuthoringPanel.types.js +2 -0
- package/lib/components/FlowModeller/FlowAuthoringPanel/FlowAuthoringPanel.types.js.map +1 -0
- package/lib/components/FlowModeller/FlowModeller.d.ts +5 -0
- package/lib/components/FlowModeller/FlowModeller.d.ts.map +1 -0
- package/lib/components/FlowModeller/FlowModeller.js +359 -0
- package/lib/components/FlowModeller/FlowModeller.js.map +1 -0
- package/lib/components/FlowModeller/FlowModeller.test-ids.d.ts +3 -0
- package/lib/components/FlowModeller/FlowModeller.test-ids.d.ts.map +1 -0
- package/lib/components/FlowModeller/FlowModeller.test-ids.js +5 -0
- package/lib/components/FlowModeller/FlowModeller.test-ids.js.map +1 -0
- package/lib/components/FlowModeller/FlowModeller.types.d.ts +84 -0
- package/lib/components/FlowModeller/FlowModeller.types.d.ts.map +1 -0
- package/lib/components/FlowModeller/FlowModeller.types.js +2 -0
- package/lib/components/FlowModeller/FlowModeller.types.js.map +1 -0
- package/lib/components/FlowModeller/FlowModellerContext.d.ts +10 -0
- package/lib/components/FlowModeller/FlowModellerContext.d.ts.map +1 -0
- package/lib/components/FlowModeller/FlowModellerContext.js +8 -0
- package/lib/components/FlowModeller/FlowModellerContext.js.map +1 -0
- package/lib/components/FlowModeller/Node/Node.types.d.ts +93 -0
- package/lib/components/FlowModeller/Node/Node.types.d.ts.map +1 -0
- package/lib/components/FlowModeller/Node/Node.types.js +27 -0
- package/lib/components/FlowModeller/Node/Node.types.js.map +1 -0
- package/lib/components/FlowModeller/Node/NodeTemplate.styles.d.ts +212 -0
- package/lib/components/FlowModeller/Node/NodeTemplate.styles.d.ts.map +1 -0
- package/lib/components/FlowModeller/Node/NodeTemplate.styles.js +144 -0
- package/lib/components/FlowModeller/Node/NodeTemplate.styles.js.map +1 -0
- package/lib/components/FlowModeller/Node/NodeTemplates.d.ts +5 -0
- package/lib/components/FlowModeller/Node/NodeTemplates.d.ts.map +1 -0
- package/lib/components/FlowModeller/Node/NodeTemplates.js +130 -0
- package/lib/components/FlowModeller/Node/NodeTemplates.js.map +1 -0
- package/lib/components/FlowModeller/Node.d.ts +10 -0
- package/lib/components/FlowModeller/Node.d.ts.map +1 -0
- package/lib/components/FlowModeller/Node.js +43 -0
- package/lib/components/FlowModeller/Node.js.map +1 -0
- package/lib/components/FlowModeller/Renderer/Renderer.d.ts +4 -0
- package/lib/components/FlowModeller/Renderer/Renderer.d.ts.map +1 -0
- package/lib/components/FlowModeller/Renderer/Renderer.js +198 -0
- package/lib/components/FlowModeller/Renderer/Renderer.js.map +1 -0
- package/lib/components/FlowModeller/Renderer/Renderer.types.d.ts +20 -0
- package/lib/components/FlowModeller/Renderer/Renderer.types.d.ts.map +1 -0
- package/lib/components/FlowModeller/Renderer/Renderer.types.js +2 -0
- package/lib/components/FlowModeller/Renderer/Renderer.types.js.map +1 -0
- package/lib/components/FlowModeller/Renderer/Utils/Graph.d.ts +63 -0
- package/lib/components/FlowModeller/Renderer/Utils/Graph.d.ts.map +1 -0
- package/lib/components/FlowModeller/Renderer/Utils/Graph.js +291 -0
- package/lib/components/FlowModeller/Renderer/Utils/Graph.js.map +1 -0
- package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.d.ts +37 -0
- package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.d.ts.map +1 -0
- package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.js +114 -0
- package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.js.map +1 -0
- package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.d.ts +29 -0
- package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.d.ts.map +1 -0
- package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.js +191 -0
- package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.js.map +1 -0
- package/lib/components/FlowModeller/Renderer/Utils/RendererUtils.d.ts +38 -0
- package/lib/components/FlowModeller/Renderer/Utils/RendererUtils.d.ts.map +1 -0
- package/lib/components/FlowModeller/Renderer/Utils/RendererUtils.js +363 -0
- package/lib/components/FlowModeller/Renderer/Utils/RendererUtils.js.map +1 -0
- package/lib/components/FlowModeller/Utils/addNodeUtils.d.ts +18 -0
- package/lib/components/FlowModeller/Utils/addNodeUtils.d.ts.map +1 -0
- package/lib/components/FlowModeller/Utils/addNodeUtils.js +148 -0
- package/lib/components/FlowModeller/Utils/addNodeUtils.js.map +1 -0
- package/lib/components/FlowModeller/Utils/deleteNodeUtils.d.ts +33 -0
- package/lib/components/FlowModeller/Utils/deleteNodeUtils.d.ts.map +1 -0
- package/lib/components/FlowModeller/Utils/deleteNodeUtils.js +89 -0
- package/lib/components/FlowModeller/Utils/deleteNodeUtils.js.map +1 -0
- package/lib/components/FlowModeller/constants.d.ts +10 -0
- package/lib/components/FlowModeller/constants.d.ts.map +1 -0
- package/lib/components/FlowModeller/constants.js +9 -0
- package/lib/components/FlowModeller/constants.js.map +1 -0
- package/lib/components/FlowModeller/helper.d.ts +39 -0
- package/lib/components/FlowModeller/helper.d.ts.map +1 -0
- package/lib/components/FlowModeller/helper.js +230 -0
- package/lib/components/FlowModeller/helper.js.map +1 -0
- package/lib/components/FlowModeller/index.d.ts +18 -0
- package/lib/components/FlowModeller/index.d.ts.map +1 -0
- package/lib/components/FlowModeller/index.js +11 -0
- package/lib/components/FlowModeller/index.js.map +1 -0
- package/lib/components/IconTile/IconTile.d.ts +2 -2
- package/lib/components/IconTile/IconTile.d.ts.map +1 -1
- package/lib/components/ItemLibrary/ItemLibrary.d.ts +2 -2
- package/lib/components/ItemLibrary/ItemLibrary.d.ts.map +1 -1
- package/lib/components/ItemLibrary/ItemLibrary.js +5 -1
- package/lib/components/ItemLibrary/ItemLibrary.js.map +1 -1
- package/lib/components/LifeCycle/Category.d.ts +6 -6
- package/lib/components/LifeCycle/Category.d.ts.map +1 -1
- package/lib/components/LifeCycle/LifeCycle.d.ts +184 -2
- package/lib/components/LifeCycle/LifeCycle.d.ts.map +1 -1
- package/lib/components/LifeCycle/LifeCycle.types.d.ts +70 -0
- package/lib/components/LifeCycle/LifeCycle.types.d.ts.map +1 -1
- package/lib/components/LifeCycle/Stage.d.ts +6 -6
- package/lib/components/LifeCycle/Stage.d.ts.map +1 -1
- package/lib/components/LifeCycle/Step.d.ts +8 -8
- package/lib/components/LifeCycle/Step.d.ts.map +1 -1
- package/lib/components/LifeCycle/Step.js +1 -1
- package/lib/components/LifeCycle/Step.js.map +1 -1
- package/lib/components/LifeCycle/Task.d.ts +14 -10
- package/lib/components/LifeCycle/Task.d.ts.map +1 -1
- package/lib/components/LifeCycle/TaskGroup.d.ts +3 -1
- package/lib/components/LifeCycle/TaskGroup.d.ts.map +1 -1
- package/lib/components/MobileBuildSummary/MobileBuildSummary.d.ts +2 -2
- package/lib/components/MobileBuildSummary/MobileBuildSummary.d.ts.map +1 -1
- package/lib/components/ObjectSelect/InputTree/InputTree.styles.d.ts +10 -8
- package/lib/components/ObjectSelect/InputTree/InputTree.styles.d.ts.map +1 -1
- package/lib/components/ObjectSelect/InputTree/InputTree.styles.js +1 -1
- package/lib/components/ObjectSelect/InputTree/InputTree.styles.js.map +1 -1
- package/lib/components/PageBanner/PageBanner.d.ts +3 -3
- package/lib/components/PageBanner/PageBanner.d.ts.map +1 -1
- package/lib/components/PageBanner/PageBanner.js +6 -2
- package/lib/components/PageBanner/PageBanner.js.map +1 -1
- package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageHeader.d.ts +4 -2
- package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageHeader.d.ts.map +1 -1
- package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageHeader.js +23 -12
- package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageHeader.js.map +1 -1
- package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageTemplate.d.ts.map +1 -1
- package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageTemplate.js +14 -5
- package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageTemplate.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/HeaderActionButtons.d.ts.map +1 -1
- package/lib/components/PageTemplates/HeaderActionButtons.js +11 -3
- package/lib/components/PageTemplates/HeaderActionButtons.js.map +1 -1
- package/lib/components/PageTemplates/PageTemplate.styles.d.ts +375 -8
- package/lib/components/PageTemplates/PageTemplate.styles.d.ts.map +1 -1
- package/lib/components/PageTemplates/PageTemplate.styles.js +18 -10
- package/lib/components/PageTemplates/PageTemplate.styles.js.map +1 -1
- package/lib/components/PageTemplates/PageTemplate.types.d.ts +18 -13
- package/lib/components/PageTemplates/PageTemplate.types.d.ts.map +1 -1
- package/lib/components/PageTemplates/PageTemplate.types.js.map +1 -1
- package/lib/components/PageTemplates/PageTemplates.d.ts +4 -1
- package/lib/components/PageTemplates/PageTemplates.d.ts.map +1 -1
- package/lib/components/PageTemplates/PageTemplates.js +9 -5
- 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/RulePicker/RulePicker.d.ts +1 -1
- package/lib/components/SummaryCard/SummaryCard.d.ts.map +1 -1
- package/lib/components/SummaryCard/SummaryCard.js +13 -1
- package/lib/components/SummaryCard/SummaryCard.js.map +1 -1
- package/lib/components/Workbench/Workbench.styles.d.ts +12 -8
- package/lib/components/Workbench/Workbench.styles.d.ts.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/utils/typeIconMapping.d.ts.map +1 -1
- package/lib/utils/typeIconMapping.js +2 -0
- package/lib/utils/typeIconMapping.js.map +1 -1
- package/lib/utils/utils.d.ts +5 -0
- package/lib/utils/utils.d.ts.map +1 -0
- package/lib/utils/utils.js +19 -0
- package/lib/utils/utils.js.map +1 -0
- package/package.json +7 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpressionItem.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ExpressionItem.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAgB/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAI5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;;;;AA+HrE,wBAAsE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useContext, useMemo } from 'react';
|
|
3
|
-
import { Button, ExpandCollapse, Flex, Icon,
|
|
2
|
+
import { useContext, useMemo, useRef } from 'react';
|
|
3
|
+
import { Button, ExpandCollapse, Flex, Icon, registerIcon, StyledLabel, Text, useDirection, useHighlight, useI18n, useTestIds, withTestIds } from '@pega/cosmos-react-core';
|
|
4
4
|
import * as caretRightIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/caret-right.icon';
|
|
5
5
|
import * as caretLeftIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/caret-left.icon';
|
|
6
6
|
import { StyledPrimaryText, StyledExpandCollapseContent, StyledExpressionExplanation, StyledExpressionItem } from './ExpressionBuilder.styles';
|
|
@@ -13,19 +13,23 @@ const ExpressionItem = ({ id, testId, primary, type, onAdd, onExpand, onCollapse
|
|
|
13
13
|
const t = useI18n();
|
|
14
14
|
const testIds = useTestIds(testId, getExpressionItemsTestIds);
|
|
15
15
|
const { accent } = useContext(ExpressionBuilderContext);
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
const primaryRef = useRef(null);
|
|
17
|
+
const metaRef = useRef(null);
|
|
18
|
+
const primaryPattern = useMemo(() => {
|
|
19
|
+
if (!accent || matchedField)
|
|
20
|
+
return undefined;
|
|
21
|
+
return typeof accent === 'function' ? accent(primary) : accent;
|
|
22
|
+
}, [accent, matchedField, primary]);
|
|
23
|
+
const metaPattern = useMemo(() => {
|
|
24
|
+
if (!accent || !matchedField || expanded)
|
|
25
|
+
return undefined;
|
|
26
|
+
return typeof accent === 'function' ? accent(matchedField.value) : accent;
|
|
27
|
+
}, [accent, matchedField, expanded]);
|
|
28
|
+
useHighlight(primaryRef, primaryPattern);
|
|
29
|
+
useHighlight(metaRef, metaPattern);
|
|
25
30
|
const caretIcon = useMemo(() => {
|
|
26
31
|
return expanded ? 'caret-down' : `caret-${caretDirection}`;
|
|
27
32
|
}, [expanded, caretDirection]);
|
|
28
|
-
const accentedMeta = matchedField && !expanded ? accentedText(matchedField.value) : undefined;
|
|
29
33
|
return (_jsxs(StyledExpressionItem, { expanded: expanded, children: [_jsxs(Flex, { "data-testid": testIds.root, ...restProps, as: StyledExpressionExplanation, id: id, container: { gap: 1, alignItems: 'start' }, children: [_jsx(Button, { "data-testid": testIds.collapseItemButton, icon: true, variant: 'simple', onClick: onCollapse || onExpand
|
|
30
34
|
? () => {
|
|
31
35
|
if (expanded) {
|
|
@@ -35,7 +39,7 @@ const ExpressionItem = ({ id, testId, primary, type, onAdd, onExpand, onCollapse
|
|
|
35
39
|
onExpand?.(id);
|
|
36
40
|
}
|
|
37
41
|
}
|
|
38
|
-
: undefined, "aria-label": `${type}: ${primary}`, "aria-expanded": expanded, label: expanded ? t('collapse') : t('expand'), children: _jsx(Icon, { name: caretIcon }) }), _jsxs(Flex, { container: { alignItems: 'start', direction: 'column' }, item: { grow: 1 }, children: [_jsx(StyledPrimaryText, { variant: 'primary', children:
|
|
42
|
+
: undefined, "aria-label": `${type}: ${primary}`, "aria-expanded": expanded, label: expanded ? t('collapse') : t('expand'), children: _jsx(Icon, { name: caretIcon }) }), _jsxs(Flex, { container: { alignItems: 'start', direction: 'column' }, item: { grow: 1 }, children: [_jsx(StyledPrimaryText, { variant: 'primary', children: _jsx("span", { ref: primaryRef, children: primary }) }), matchedField && !expanded ? (_jsxs("div", { children: [_jsxs(StyledLabel, { as: 'span', children: [matchedField?.name, ":"] }), _jsx("span", { ref: metaRef, children: matchedField.value })] })) : (_jsx(Text, { variant: 'secondary', children: type }))] }), !expanded && (_jsx(Button, { "data-testid": testIds.addItemButton, icon: true, variant: 'simple', onClick: () => onAdd(id), "aria-label": t('add_noun', [`${type}: ${primary}`]), label: t('add'), children: _jsx(Icon, { name: 'plus' }) }))] }), _jsx(ExpandCollapse, { collapsed: !expanded, children: _jsxs(Flex, { as: StyledExpandCollapseContent, container: { direction: 'column' }, children: [details && _jsx(ExpressionDetails, { testId: testIds.root, ...details }), _jsx(Button, { "data-testid": testIds.addItem, variant: 'primary', onClick: () => onAdd(id), "aria-label": t('add_noun', [`${type}: ${primary}`]), children: t('add') })] }) })] }));
|
|
39
43
|
};
|
|
40
44
|
export default withTestIds(ExpressionItem, getExpressionItemsTestIds);
|
|
41
45
|
//# sourceMappingURL=ExpressionItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpressionItem.js","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ExpressionItem.js","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAGpD,OAAO,EACL,MAAM,EACN,cAAc,EACd,IAAI,EACJ,IAAI,EACJ,YAAY,EACZ,WAAW,EACX,IAAI,EACJ,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,UAAU,EACV,WAAW,EACZ,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,cAAc,MAAM,oEAAoE,CAAC;AACrG,OAAO,KAAK,aAAa,MAAM,mEAAmE,CAAC;AAGnG,OAAO,EACL,iBAAiB,EACjB,2BAA2B,EAC3B,2BAA2B,EAC3B,oBAAoB,EACrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAEzE,YAAY,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;AAE5C,MAAM,cAAc,GAA0D,CAAC,EAC7E,EAAE,EACF,MAAM,EACN,OAAO,EACP,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,UAAU,EACV,OAAO,EACP,YAAY,EACZ,QAAQ,GAAG,KAAK,EAChB,GAAG,SAAS,EACb,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,EAAE,cAAc,EAAE,GAAG,YAAY,EAAE,CAAC;IAC/C,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IACpB,MAAM,OAAO,GAAG,UAAU,CAAC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AC,QAAQ,IAAI,CACZ,KAAC,MAAM,mBACQ,OAAO,CAAC,aAAa,EAClC,IAAI,QACJ,OAAO,EAAC,QAAQ,EAChB,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,gBACZ,CAAC,CAAC,UAAU,EAAE,CAAC,GAAG,IAAI,KAAK,OAAO,EAAE,CAAC,CAAC,EAClD,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,YAEf,KAAC,IAAI,IAAC,IAAI,EAAC,MAAM,GAAG,GACb,CACV,IACI,EACP,KAAC,cAAc,IAAC,SAAS,EAAE,CAAC,QAAQ,YAClC,MAAC,IAAI,IAAC,EAAE,EAAE,2BAA2B,EAAE,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,aACtE,OAAO,IAAI,KAAC,iBAAiB,IAAC,MAAM,EAAE,OAAO,CAAC,IAAI,KAAM,OAAO,GAAI,EACpE,KAAC,MAAM,mBACQ,OAAO,CAAC,OAAO,EAC5B,OAAO,EAAC,SAAS,EACjB,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,gBACZ,CAAC,CAAC,UAAU,EAAE,CAAC,GAAG,IAAI,KAAK,OAAO,EAAE,CAAC,CAAC,YAEjD,CAAC,CAAC,KAAK,CAAC,GACF,IACJ,GACQ,IACI,CACxB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC,cAAc,EAAE,yBAAyB,CAAC,CAAC","sourcesContent":["import { useContext, useMemo, useRef } from 'react';\nimport type { FunctionComponent } from 'react';\n\nimport {\n Button,\n ExpandCollapse,\n Flex,\n Icon,\n registerIcon,\n StyledLabel,\n Text,\n useDirection,\n useHighlight,\n useI18n,\n useTestIds,\n withTestIds\n} from '@pega/cosmos-react-core';\nimport type { ForwardProps } from '@pega/cosmos-react-core';\nimport * as caretRightIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/caret-right.icon';\nimport * as caretLeftIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/caret-left.icon';\n\nimport type { ExpressionItemProps } from './ExpressionBuilder.types';\nimport {\n StyledPrimaryText,\n StyledExpandCollapseContent,\n StyledExpressionExplanation,\n StyledExpressionItem\n} from './ExpressionBuilder.styles';\nimport ExpressionDetails from './ExpressionDetails';\nimport ExpressionBuilderContext from './ExpressionBuilderContext';\nimport { getExpressionItemsTestIds } from './ExpressionBuilder.test-ids';\n\nregisterIcon(caretLeftIcon, caretRightIcon);\n\nconst ExpressionItem: FunctionComponent<ExpressionItemProps & ForwardProps> = ({\n id,\n testId,\n primary,\n type,\n onAdd,\n onExpand,\n onCollapse,\n details,\n matchedField,\n expanded = false,\n ...restProps\n}) => {\n const { end: caretDirection } = useDirection();\n const t = useI18n();\n const testIds = useTestIds(testId, getExpressionItemsTestIds);\n\n const { accent } = useContext(ExpressionBuilderContext);\n\n const primaryRef = useRef<HTMLSpanElement>(null);\n const metaRef = useRef<HTMLSpanElement>(null);\n\n const primaryPattern = useMemo(() => {\n if (!accent || matchedField) return undefined;\n return typeof accent === 'function' ? accent(primary) : accent;\n }, [accent, matchedField, primary]);\n\n const metaPattern = useMemo(() => {\n if (!accent || !matchedField || expanded) return undefined;\n return typeof accent === 'function' ? accent(matchedField.value) : accent;\n }, [accent, matchedField, expanded]);\n\n useHighlight(primaryRef, primaryPattern);\n useHighlight(metaRef, metaPattern);\n\n const caretIcon = useMemo(() => {\n return expanded ? 'caret-down' : `caret-${caretDirection}`;\n }, [expanded, caretDirection]);\n\n return (\n <StyledExpressionItem expanded={expanded}>\n <Flex\n data-testid={testIds.root}\n {...restProps}\n as={StyledExpressionExplanation}\n id={id}\n container={{ gap: 1, alignItems: 'start' }}\n >\n <Button\n data-testid={testIds.collapseItemButton}\n icon\n variant='simple'\n onClick={\n onCollapse || onExpand\n ? () => {\n if (expanded) {\n onCollapse?.(id);\n } else {\n onExpand?.(id);\n }\n }\n : undefined\n }\n aria-label={`${type}: ${primary}`}\n aria-expanded={expanded}\n label={expanded ? t('collapse') : t('expand')}\n >\n <Icon name={caretIcon} />\n </Button>\n\n <Flex container={{ alignItems: 'start', direction: 'column' }} item={{ grow: 1 }}>\n <StyledPrimaryText variant='primary'>\n <span ref={primaryRef}>{primary}</span>\n </StyledPrimaryText>\n {matchedField && !expanded ? (\n <div>\n <StyledLabel as='span'>{matchedField?.name}:</StyledLabel>\n <span ref={metaRef}>{matchedField.value}</span>\n </div>\n ) : (\n <Text variant='secondary'>{type}</Text>\n )}\n </Flex>\n\n {!expanded && (\n <Button\n data-testid={testIds.addItemButton}\n icon\n variant='simple'\n onClick={() => onAdd(id)}\n aria-label={t('add_noun', [`${type}: ${primary}`])}\n label={t('add')}\n >\n <Icon name='plus' />\n </Button>\n )}\n </Flex>\n <ExpandCollapse collapsed={!expanded}>\n <Flex as={StyledExpandCollapseContent} container={{ direction: 'column' }}>\n {details && <ExpressionDetails testId={testIds.root} {...details} />}\n <Button\n data-testid={testIds.addItem}\n variant='primary'\n onClick={() => onAdd(id)}\n aria-label={t('add_noun', [`${type}: ${primary}`])}\n >\n {t('add')}\n </Button>\n </Flex>\n </ExpandCollapse>\n </StyledExpressionItem>\n );\n};\n\nexport default withTestIds(ExpressionItem, getExpressionItemsTestIds);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpressionList.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionList.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAE/E,OAAO,KAAK,EAAuB,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;;;;
|
|
1
|
+
{"version":3,"file":"ExpressionList.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionList.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAE/E,OAAO,KAAK,EAAuB,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;;;;AA0F1F,wBAAqE"}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { createElement as _createElement } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef, useState, useEffect } from 'react';
|
|
4
|
+
import { EmptyState, useItemIntersection, useTestIds, withTestIds, Progress } from '@pega/cosmos-react-core';
|
|
5
5
|
import ExpressionItem from './ExpressionItem';
|
|
6
6
|
import { StyledExpressionList } from './ExpressionBuilder.styles';
|
|
7
7
|
import { getExpressionListTestIds } from './ExpressionBuilder.test-ids';
|
|
8
8
|
const LIST_OFFSET = 20;
|
|
9
|
-
const ExpressionList = forwardRef(function ExpressionList({ testId, items = [], emptyText, onItemAdd, onItemExpand, onItemCollapse, details, ...restProps }, ref) {
|
|
9
|
+
const ExpressionList = forwardRef(function ExpressionList({ testId, items = [], emptyText, onItemAdd, onItemExpand, onItemCollapse, details, scrollableRef, loading, ...restProps }, ref) {
|
|
10
10
|
const [count, setCount] = useState(Math.min(LIST_OFFSET, items.length));
|
|
11
|
-
const listRef = useRef(null);
|
|
12
11
|
useEffect(() => {
|
|
13
|
-
|
|
12
|
+
if (items.length > 0) {
|
|
13
|
+
setCount(Math.min(LIST_OFFSET, items.length));
|
|
14
|
+
}
|
|
14
15
|
}, [items]);
|
|
15
|
-
const
|
|
16
|
-
useItemIntersection(
|
|
16
|
+
const testIds = useTestIds(testId, getExpressionListTestIds);
|
|
17
|
+
useItemIntersection(scrollableRef, count - 1, () => {
|
|
17
18
|
setCount(prev => Math.min(items.length, prev + LIST_OFFSET));
|
|
18
|
-
},
|
|
19
|
+
}, `ul[data-testid="${testIds.root}"] > li`);
|
|
19
20
|
const [expandedItems, setExpandedItems] = useState([]);
|
|
20
21
|
const handleItemExpand = (id) => {
|
|
21
22
|
setExpandedItems(prev => {
|
|
@@ -35,10 +36,14 @@ const ExpressionList = forwardRef(function ExpressionList({ testId, items = [],
|
|
|
35
36
|
return prev.filter(itemId => itemId !== id);
|
|
36
37
|
});
|
|
37
38
|
};
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
const getLoadingOrEmptyState = () => {
|
|
40
|
+
return loading ? (_jsx(Progress, { placement: 'block', message: emptyText })) : (_jsx(EmptyState, { message: emptyText }));
|
|
41
|
+
};
|
|
42
|
+
return (_jsx(StyledExpressionList, { ...restProps, ref: ref, "data-testid": testIds.root, children: items && items.length > 0
|
|
43
|
+
? items.slice(0, count).map(item => {
|
|
44
|
+
return (_createElement(ExpressionItem, { ...item, onAdd: onItemAdd, onExpand: handleItemExpand, onCollapse: handleItemCollapse, expanded: expandedItems.includes(item.id), key: item.id, details: details?.[item.id] }));
|
|
45
|
+
})
|
|
46
|
+
: getLoadingOrEmptyState() }));
|
|
42
47
|
});
|
|
43
48
|
export default withTestIds(ExpressionList, getExpressionListTestIds);
|
|
44
49
|
//# sourceMappingURL=ExpressionList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpressionList.js","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionList.tsx"],"names":[],"mappings":";;AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"ExpressionList.js","sourceRoot":"","sources":["../../../src/components/ExpressionBuilder/ExpressionList.tsx"],"names":[],"mappings":";;AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAwB,MAAM,OAAO,CAAC;AAE9E,OAAO,EACL,UAAU,EACV,mBAAmB,EACnB,UAAU,EACV,WAAW,EACX,QAAQ,EACT,MAAM,yBAAyB,CAAC;AAIjC,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8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G,EAAE,IAAI,CAAC,EAAE,EACZ,OAAO,EAAE,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,GAC3B,CACH,CAAC;YACJ,CAAC,CAAC;YACJ,CAAC,CAAC,sBAAsB,EAAE,GACP,CACxB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC,cAAc,EAAE,wBAAwB,CAAC,CAAC","sourcesContent":["import { forwardRef, useState, useEffect, type PropsWithoutRef } from 'react';\n\nimport {\n EmptyState,\n useItemIntersection,\n useTestIds,\n withTestIds,\n Progress\n} 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';\nimport { getExpressionListTestIds } from './ExpressionBuilder.test-ids';\n\nconst LIST_OFFSET = 20;\nconst ExpressionList: ForwardRefForwardPropsComponent<ExpressionListProps> = forwardRef(\n function ExpressionList(\n {\n testId,\n items = [],\n emptyText,\n onItemAdd,\n onItemExpand,\n onItemCollapse,\n details,\n scrollableRef,\n loading,\n ...restProps\n }: PropsWithoutRef<ExpressionListProps>,\n ref: ExpressionListProps['ref']\n ) {\n const [count, setCount] = useState(Math.min(LIST_OFFSET, items.length));\n\n useEffect(() => {\n if (items.length > 0) {\n setCount(Math.min(LIST_OFFSET, items.length));\n }\n }, [items]);\n\n const testIds = useTestIds(testId, getExpressionListTestIds);\n\n useItemIntersection(\n scrollableRef,\n count - 1,\n () => {\n setCount(prev => Math.min(items.length, prev + LIST_OFFSET));\n },\n `ul[data-testid=\"${testIds.root}\"] > li`\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 const getLoadingOrEmptyState = () => {\n return loading ? (\n <Progress placement='block' message={emptyText} />\n ) : (\n <EmptyState message={emptyText} />\n );\n };\n\n return (\n <StyledExpressionList {...restProps} ref={ref} data-testid={testIds.root}>\n {items && items.length > 0\n ? items.slice(0, count).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 : getLoadingOrEmptyState()}\n </StyledExpressionList>\n );\n }\n);\n\nexport default withTestIds(ExpressionList, getExpressionListTestIds);\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, CustomPositionProps } from './CodeEditor/CodeEditor.types';
|
|
3
|
+
export type { EditorState, CodeEditorProps, AutoCompleteTriggerChar, SuggestionType, CursorPosition, CustomPositionProps, LintError } 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,EACd,mBAAmB,
|
|
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,EACnB,SAAS,EACV,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;AAChE,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,4BAA4B,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;AAiB9C,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;AAChE,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,4BAA4B,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 LintError\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';\nexport { default as ExpressionBuilderContext } from './ExpressionBuilderContext';\n"]}
|
|
@@ -1,14 +1,23 @@
|
|
|
1
|
-
export declare const StyledFieldReferenceDisplay: import("styled-components").
|
|
2
|
-
export declare const StyledFieldReferenceDisplayGrid: import("styled-components").
|
|
3
|
-
export declare const StyledFieldReferenceInput: import("styled-components").
|
|
1
|
+
export declare const StyledFieldReferenceDisplay: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
2
|
+
export declare const StyledFieldReferenceDisplayGrid: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
+
export declare const StyledFieldReferenceInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, "ref"> & {
|
|
4
|
+
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
5
|
+
}, {
|
|
4
6
|
restingState?: boolean;
|
|
5
|
-
}
|
|
6
|
-
export declare const StyledSelection: import("styled-components").
|
|
7
|
-
export declare const StyledLeadingDot: import("styled-components").
|
|
8
|
-
export declare const StyledFieldReferencePicker: import("styled-components").
|
|
7
|
+
}>> & string;
|
|
8
|
+
export declare const StyledSelection: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
9
|
+
export declare const StyledLeadingDot: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
10
|
+
export declare const StyledFieldReferencePicker: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("@pega/cosmos-react-core").FormControlProps | "hasSuggestion"> & Pick<import("@pega/cosmos-react-core").FormControlProps, keyof import("@pega/cosmos-react-core").FormControlProps> & Required<Pick<import("@pega/cosmos-react-core").FormControlProps, never>> & {
|
|
9
11
|
hasSuggestion?: boolean;
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export declare const
|
|
12
|
+
}, "ref"> & {
|
|
13
|
+
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
14
|
+
}, never>> & string;
|
|
15
|
+
export declare const StyledFieldReferenceMenu: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
16
|
+
export declare const StyledMenuListContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, never>, "ref"> & {
|
|
17
|
+
ref?: ((instance: HTMLFieldSetElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLFieldSetElement> | null | undefined;
|
|
18
|
+
}, never>> & string;
|
|
19
|
+
export declare const StyledPathSegment: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
20
|
+
export declare const StyledFieldValueList: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("@pega/cosmos-react-core").FieldValueListProps & import("@pega/cosmos-react-core").ForwardProps, never>> & string & Omit<import("react").FunctionComponent<import("@pega/cosmos-react-core").FieldValueListProps & import("@pega/cosmos-react-core").ForwardProps> & {
|
|
21
|
+
getTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly []>;
|
|
22
|
+
}, keyof import("react").Component<any, {}, any>>;
|
|
14
23
|
//# sourceMappingURL=FieldReference.styles.d.ts.map
|
|
@@ -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":"AA4BA,eAAO,MAAM,2BAA2B,6NAoDtC,CAAC;AAIH,eAAO,MAAM,+BAA+B,6NAqB1C,CAAC;AAIH,eAAO,MAAM,yBAAyB;;;mBAA8C,OAAO;YAwCzF,CAAC;AAIH,eAAO,MAAM,eAAe,6NAM1B,CAAC;AAIH,eAAO,MAAM,gBAAgB,6NAI3B,CAAC;AAIH,eAAO,MAAM,0BAA0B;;;;mBAcrC,CAAC;AAIH,eAAO,MAAM,wBAAwB,6NAyBnC,CAAC;AAIH,eAAO,MAAM,uBAAuB;;mBAEnC,CAAC;AAEF,eAAO,MAAM,iBAAiB,+NAU5B,CAAC;AAIH,eAAO,MAAM,oBAAoB;2BAtGT,CAAC;iDA4GvB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
|
-
import { StyledFlex, StyledText, defaultThemeProp, StyledFormControl, StyledPopover, StyledMenuListWrapper, StyledMenuItem, StyledSummaryItem, StyledSummaryItemActions, StyledMenuListContainer as StyledCoreMenuListContainer, useDirection, StyledButton, StyledLink, StyledGrid } from '@pega/cosmos-react-core';
|
|
2
|
+
import { StyledFlex, StyledText, defaultThemeProp, StyledFormControl, StyledPopover, StyledMenuListWrapper, StyledMenuItem, StyledSummaryItem, StyledSummaryItemActions, StyledMenuListContainer as StyledCoreMenuListContainer, useDirection, StyledButton, StyledLink, StyledGrid, FieldValueList, StyledLabel } 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
5
|
import { ellipsisOverflow } from '@pega/cosmos-react-core/lib/styles/mixins';
|
|
@@ -83,6 +83,7 @@ export const StyledFieldReferenceInput = styled(StyledSelectInput)(({ restingSta
|
|
|
83
83
|
|
|
84
84
|
${restingState &&
|
|
85
85
|
css `
|
|
86
|
+
color: transparent;
|
|
86
87
|
caret-color: transparent;
|
|
87
88
|
`}
|
|
88
89
|
}
|
|
@@ -180,4 +181,12 @@ export const StyledPathSegment = styled.span(({ theme }) => {
|
|
|
180
181
|
`;
|
|
181
182
|
});
|
|
182
183
|
StyledPathSegment.defaultProps = defaultThemeProp;
|
|
184
|
+
export const StyledFieldValueList = styled(FieldValueList)(({ theme }) => {
|
|
185
|
+
return css `
|
|
186
|
+
${StyledLabel} {
|
|
187
|
+
color: ${theme.components.tooltip['foreground-color']};
|
|
188
|
+
}
|
|
189
|
+
`;
|
|
190
|
+
});
|
|
191
|
+
StyledFieldValueList.defaultProps = defaultThemeProp;
|
|
183
192
|
//# sourceMappingURL=FieldReference.styles.js.map
|
|
@@ -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,wBAAwB,EACxB,uBAAuB,IAAI,2BAA2B,EACtD,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,UAAU,EACX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iEAAiE,CAAC;AACpG,OAAO,EACL,UAAU,EACV,qBAAqB,EACtB,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CA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AC5C,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
|
+
{"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,cAA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C,CAAA;;CAEzE,CAAC;AAEF,MAAM,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;AAElD,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACvE,OAAO,GAAG,CAAA;MACN,WAAW;eACF,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,kBAAkB,CAAC;;GAExD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,oBAAoB,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 FieldValueList,\n StyledLabel\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 color: transparent;\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\nexport const StyledFieldValueList = styled(FieldValueList)(({ theme }) => {\n return css`\n ${StyledLabel} {\n color: ${theme.components.tooltip['foreground-color']};\n }\n `;\n});\n\nStyledFieldValueList.defaultProps = defaultThemeProp;\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":"AAkBA,OAAO,KAAK,EAAS,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;;;;AAqGhF,wBAAmF"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
|
-
import { useTestIds, Flex, Text, Icon, Grid, NoValue, withTestIds, hasProp, Actions, Link,
|
|
3
|
+
import { useTestIds, Flex, Text, Icon, Grid, NoValue, withTestIds, hasProp, Actions, Link, Tooltip, useElement } from '@pega/cosmos-react-core';
|
|
4
4
|
import { getFieldReferenceDisplayTestIds } from './FieldReference.test-ids';
|
|
5
|
-
import { StyledFieldReferenceDisplay, StyledFieldReferenceDisplayGrid } from './FieldReference.styles';
|
|
5
|
+
import { StyledFieldReferenceDisplay, StyledFieldReferenceDisplayGrid, StyledFieldValueList } from './FieldReference.styles';
|
|
6
6
|
const FieldReferenceDisplay = forwardRef(function FieldReferenceDisplay({ testId, fieldPath, link, actions, tooltipData }, ref) {
|
|
7
7
|
const testIds = useTestIds(testId, getFieldReferenceDisplayTestIds);
|
|
8
8
|
const [displayEl, setDisplayEl] = useElement();
|
|
@@ -28,7 +28,7 @@ const FieldReferenceDisplay = forwardRef(function FieldReferenceDisplay({ testId
|
|
|
28
28
|
}
|
|
29
29
|
: undefined, children: fieldPath.map(field => field.name).join(' . ') })) : (_jsx(Text, { "data-testid": testIds.fieldPath, children: fieldPath.map(field => field.name).join(' . ') }))] }), type && (_jsx(Flex, { container: {
|
|
30
30
|
justify: 'end'
|
|
31
|
-
}, item: { grow: 1 }, children: _jsx(Text, { "data-testid": testIds.type, variant: 'secondary', children: type }) }))] }), actions && _jsx(Actions, { items: actions })] })) : (_jsx(NoValue, {})) }), tooltipData && (_jsx(Tooltip, { target: displayEl, ignoredElements: [linkEl], hideDelay: 'none', describeTarget: true, children: _jsx(
|
|
31
|
+
}, item: { grow: 1 }, children: _jsx(Text, { "data-testid": testIds.type, variant: 'secondary', children: type }) }))] }), actions && _jsx(Actions, { items: actions })] })) : (_jsx(NoValue, {})) }), tooltipData && (_jsx(Tooltip, { target: displayEl, ignoredElements: [linkEl], hideDelay: 'none', describeTarget: true, children: _jsx(StyledFieldValueList, { fields: tooltipData }) }))] }));
|
|
32
32
|
});
|
|
33
33
|
export default withTestIds(FieldReferenceDisplay, getFieldReferenceDisplayTestIds);
|
|
34
34
|
//# sourceMappingURL=FieldReferenceDisplay.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldReferenceDisplay.js","sourceRoot":"","sources":["../../../src/components/FieldReference/FieldReferenceDisplay.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGnC,OAAO,EACL,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,WAAW,EACX,OAAO,EACP,OAAO,EACP,IAAI,EACJ,
|
|
1
|
+
{"version":3,"file":"FieldReferenceDisplay.js","sourceRoot":"","sources":["../../../src/components/FieldReference/FieldReferenceDisplay.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGnC,OAAO,EACL,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,WAAW,EACX,OAAO,EACP,OAAO,EACP,IAAI,EACJ,OAAO,EACP,UAAU,EACX,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EACL,2BAA2B,EAC3B,+BAA+B,EAC/B,oBAAoB,EACrB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,qBAAqB,GAAG,UAAU,CAAC,SAAS,qBAAqB,CACrE,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAA+C,EAC9F,GAAsC;IAEtC,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,EAAE,+BAA+B,CAAC,CAAC;IACpE,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,UAAU,EAAkB,CAAC;IAC/D,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,UAAU,EAAqB,CAAC;IAE5D,MAAM,IAAI,GACR,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAE,EAAE,MAAM,CAAC;QACtD,CAAC,CAAE,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAY,CAAC,IAAI;QACnC,CAAC,CAAC,SAAS,CAAC;IAChB,MAAM,IAAI,GACR,CA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C,CAAC,SAAS,YAGd,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAC1C,CACR,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,mBAAc,OAAO,CAAC,SAAS,YACjC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAC1C,CACR,IACI,EACN,IAAI,IAAI,CACP,KAAC,IAAI,IACH,SAAS,EAAE;wCACT,OAAO,EAAE,KAAK;qCACf,EACD,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,YAEjB,KAAC,IAAI,mBAAc,OAAO,CAAC,IAAI,EAAE,OAAO,EAAC,WAAW,YACjD,IAAI,GACA,GACF,CACR,IACI,EACN,OAAO,IAAI,KAAC,OAAO,IAAC,KAAK,EAAE,OAAO,GAAI,IACtC,CACJ,CAAC,CAAC,CAAC,CACF,KAAC,OAAO,KAAG,CACZ,GACI,EAEN,WAAW,IAAI,CACd,KAAC,OAAO,IAAC,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC,MAAM,CAAC,EAAE,SAAS,EAAC,MAAM,EAAC,cAAc,kBACpF,KAAC,oBAAoB,IAAC,MAAM,EAAE,WAAW,GAAI,GACrC,CACX,IACA,CACJ,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC,qBAAqB,EAAE,+BAA+B,CAAC,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { PropsWithoutRef, MouseEvent } from 'react';\n\nimport {\n useTestIds,\n Flex,\n Text,\n Icon,\n Grid,\n NoValue,\n withTestIds,\n hasProp,\n Actions,\n Link,\n Tooltip,\n useElement\n} from '@pega/cosmos-react-core';\n\nimport type { Field, FieldReferenceDisplayProps } from './FieldReference.types';\nimport { getFieldReferenceDisplayTestIds } from './FieldReference.test-ids';\nimport {\n StyledFieldReferenceDisplay,\n StyledFieldReferenceDisplayGrid,\n StyledFieldValueList\n} from './FieldReference.styles';\n\nconst FieldReferenceDisplay = forwardRef(function FieldReferenceDisplay(\n { testId, fieldPath, link, actions, tooltipData }: PropsWithoutRef<FieldReferenceDisplayProps>,\n ref: FieldReferenceDisplayProps['ref']\n) {\n const testIds = useTestIds(testId, getFieldReferenceDisplayTestIds);\n const [displayEl, setDisplayEl] = useElement<HTMLDivElement>();\n const [linkEl, setLinkEl] = useElement<HTMLAnchorElement>();\n\n const icon =\n !!fieldPath.at(-1) && hasProp(fieldPath.at(-1)!, 'icon')\n ? (fieldPath.at(-1)! as Field).icon\n : undefined;\n const type =\n !!fieldPath.at(-1) && hasProp(fieldPath.at(-1)!, 'type')\n ? (fieldPath.at(-1)! as Field).type\n : undefined;\n\n return (\n <>\n <Flex\n as={StyledFieldReferenceDisplay}\n data-testid={testIds.root}\n ref={ref}\n container={{\n justify: 'between',\n alignItems: 'center',\n colGap: 0.5\n }}\n >\n {fieldPath.length ? (\n <>\n <Grid\n ref={setDisplayEl}\n as={StyledFieldReferenceDisplayGrid}\n container={{\n alignItems: 'center',\n gap: 1,\n cols: type ? 'auto 1fr' : 'auto',\n areas: type ? '\"primary secondary\"' : '\"primary\"'\n }}\n >\n <Flex container={{ alignItems: 'center', colGap: 1 }}>\n {icon && <Icon data-testid={testIds.icon} {...icon} size='s' />}\n {link ? (\n <Link\n data-testid={testIds.fieldPath}\n ref={setLinkEl}\n {...link}\n onClick={\n link.onClick\n ? (e: MouseEvent) => {\n link.onClick?.(e);\n }\n : undefined\n }\n >\n {fieldPath.map(field => field.name).join(' . ')}\n </Link>\n ) : (\n <Text data-testid={testIds.fieldPath}>\n {fieldPath.map(field => field.name).join(' . ')}\n </Text>\n )}\n </Flex>\n {type && (\n <Flex\n container={{\n justify: 'end'\n }}\n item={{ grow: 1 }}\n >\n <Text data-testid={testIds.type} variant='secondary'>\n {type}\n </Text>\n </Flex>\n )}\n </Grid>\n {actions && <Actions items={actions} />}\n </>\n ) : (\n <NoValue />\n )}\n </Flex>\n\n {tooltipData && (\n <Tooltip target={displayEl} ignoredElements={[linkEl]} hideDelay='none' describeTarget>\n <StyledFieldValueList fields={tooltipData} />\n </Tooltip>\n )}\n </>\n );\n});\n\nexport default withTestIds(FieldReferenceDisplay, getFieldReferenceDisplayTestIds);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldReferenceInput.d.ts","sourceRoot":"","sources":["../../../src/components/FieldReference/FieldReferenceInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FieldReferenceInput.d.ts","sourceRoot":"","sources":["../../../src/components/FieldReference/FieldReferenceInput.tsx"],"names":[],"mappings":"AA+CA,OAAO,KAAK,wBAAwB,MAAM,wBAAwB,CAAC;;;;AAoqBnE,wBAA+E"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, Fragment, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
3
|
-
import { registerIcon, navigatorIsAvailable, useUID, useTestIds, useI18n, useElement, useConsolidatedRef, useFocusWithin, Icon, useEscape, Button, Flex, Grid, StyledFormControl, VisuallyHiddenText,
|
|
3
|
+
import { registerIcon, navigatorIsAvailable, useUID, useTestIds, useI18n, useElement, useConsolidatedRef, useFocusWithin, Icon, useEscape, Button, Flex, Grid, StyledFormControl, VisuallyHiddenText, Popover, getFocusables, Menu, FormField, withTestIds } from '@pega/cosmos-react-core';
|
|
4
4
|
import * as caretDownIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/caret-down.icon';
|
|
5
5
|
import * as caretUpIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/caret-up.icon';
|
|
6
6
|
import { fitToContent } from '@pega/cosmos-react-core/lib/components/Popover/modifiers';
|
|
7
|
-
import { StyledFieldReferenceInput, StyledFieldReferencePicker, StyledPathSegment, StyledSelection, StyledFieldReferenceMenu, StyledLeadingDot } from './FieldReference.styles';
|
|
7
|
+
import { StyledFieldReferenceInput, StyledFieldReferencePicker, StyledPathSegment, StyledSelection, StyledFieldReferenceMenu, StyledLeadingDot, StyledFieldValueList } from './FieldReference.styles';
|
|
8
8
|
import { getFieldReferenceInputTestIds } from './FieldReference.test-ids';
|
|
9
9
|
import FieldReferenceDisplay from './FieldReferenceDisplay';
|
|
10
10
|
import FieldReferenceMenuList from './FieldReferenceMenuList';
|
|
@@ -97,7 +97,7 @@ const FieldReferenceInput = forwardRef(function FieldReferenceInput(props, ref)
|
|
|
97
97
|
primary: item.name,
|
|
98
98
|
secondary: item.type ? [item.type] : undefined,
|
|
99
99
|
items: item.items ? formatMenuItems({ items: item.items, context: item }) : undefined,
|
|
100
|
-
tooltip: showTooltips ? (_jsx(
|
|
100
|
+
tooltip: showTooltips ? (_jsx(StyledFieldValueList, { fields: tooltipData, truncate: false })) : undefined,
|
|
101
101
|
selected: item.selected
|
|
102
102
|
};
|
|
103
103
|
});
|
|
@@ -331,7 +331,15 @@ const FieldReferenceInput = forwardRef(function FieldReferenceInput(props, ref)
|
|
|
331
331
|
colStart: !!selected.length && open ? '3' : '1',
|
|
332
332
|
colEnd: '4',
|
|
333
333
|
alignSelf: 'center'
|
|
334
|
-
}, as: 'input', size: 1, ref: inputRef, role: 'combobox', "aria-autocomplete": 'list', "aria-expanded": !readOnly && !disabled && open, "aria-controls": !pauseSelectedDescendantEvaluation ? listId : ariaControls, "aria-haspopup": 'menu', "aria-describedby": ariaDescribedBy, value:
|
|
334
|
+
}, as: 'input', size: 1, ref: inputRef, role: 'combobox', "aria-autocomplete": 'list', "aria-expanded": !readOnly && !disabled && open, "aria-controls": !pauseSelectedDescendantEvaluation ? listId : ariaControls, "aria-haspopup": 'menu', "aria-describedby": ariaDescribedBy, value: (() => {
|
|
335
|
+
if (open) {
|
|
336
|
+
return filterValue;
|
|
337
|
+
}
|
|
338
|
+
if (selected.length > 0) {
|
|
339
|
+
return selected.map(({ name }) => name).join('.');
|
|
340
|
+
}
|
|
341
|
+
return '';
|
|
342
|
+
})(), id: id, onChange: (e) => {
|
|
335
343
|
if (e.target.value !== '.') {
|
|
336
344
|
if (e.target.value.endsWith('.')) {
|
|
337
345
|
const search = e.target.value.replace('.', '');
|
|
@@ -358,7 +366,7 @@ const FieldReferenceInput = forwardRef(function FieldReferenceInput(props, ref)
|
|
|
358
366
|
setOpen(true);
|
|
359
367
|
toggleMenuDescendantsActive(true);
|
|
360
368
|
}
|
|
361
|
-
}, onClick: onInputClick, onKeyDown: onInputKeyDown, onKeyUp: onInputKeyUp, readOnly: readOnly, disabled: disabled, placeholder: !selected.length && !showDot ? placeholder : undefined, autoComplete: 'off', required:
|
|
369
|
+
}, onClick: onInputClick, onKeyDown: onInputKeyDown, onKeyUp: onInputKeyUp, readOnly: readOnly, disabled: disabled, placeholder: !selected.length && !showDot ? placeholder : undefined, autoComplete: 'off', required: required })] }), dropdownButton] }), _jsx(Popover, { ref: popoverRef, show: open, target: containerRef.current, placement: 'bottom-start', modifiers: [fitToContent], strategy: 'fixed', onMouseDown: (e) => e.preventDefault(), onKeyDown: (e) => {
|
|
362
370
|
if (!inputRef.current)
|
|
363
371
|
return;
|
|
364
372
|
if (e.key === 'Tab') {
|