@pega/cosmos-react-build 8.8.0 → 9.0.0-build.10.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/AuthoringPanel/AuthoringPanel.d.ts +7 -0
- package/lib/components/AuthoringPanel/AuthoringPanel.d.ts.map +1 -0
- package/lib/components/AuthoringPanel/AuthoringPanel.js +49 -0
- package/lib/components/AuthoringPanel/AuthoringPanel.js.map +1 -0
- package/lib/components/AuthoringPanel/AuthoringPanel.styles.d.ts +18 -0
- package/lib/components/AuthoringPanel/AuthoringPanel.styles.d.ts.map +1 -0
- package/lib/components/AuthoringPanel/AuthoringPanel.styles.js +133 -0
- package/lib/components/AuthoringPanel/AuthoringPanel.styles.js.map +1 -0
- package/lib/components/AuthoringPanel/AuthoringPanel.test-ids.d.ts +2 -0
- package/lib/components/AuthoringPanel/AuthoringPanel.test-ids.d.ts.map +1 -0
- package/lib/components/AuthoringPanel/AuthoringPanel.test-ids.js +16 -0
- package/lib/components/AuthoringPanel/AuthoringPanel.test-ids.js.map +1 -0
- package/lib/components/AuthoringPanel/AuthoringPanel.types.d.ts +81 -0
- package/lib/components/AuthoringPanel/AuthoringPanel.types.d.ts.map +1 -0
- package/lib/components/AuthoringPanel/AuthoringPanel.types.js +2 -0
- package/lib/components/AuthoringPanel/AuthoringPanel.types.js.map +1 -0
- package/lib/components/AuthoringPanel/AuthoringPanelHeader.d.ts +6 -0
- package/lib/components/AuthoringPanel/AuthoringPanelHeader.d.ts.map +1 -0
- package/lib/components/AuthoringPanel/AuthoringPanelHeader.js +41 -0
- package/lib/components/AuthoringPanel/AuthoringPanelHeader.js.map +1 -0
- package/lib/components/AuthoringPanel/index.d.ts +4 -0
- package/lib/components/AuthoringPanel/index.d.ts.map +1 -0
- package/lib/components/AuthoringPanel/index.js +3 -0
- package/lib/components/AuthoringPanel/index.js.map +1 -0
- package/lib/components/Automation/Automation.d.ts +7 -0
- package/lib/components/Automation/Automation.d.ts.map +1 -0
- package/lib/components/Automation/Automation.js +113 -0
- package/lib/components/Automation/Automation.js.map +1 -0
- package/lib/components/Automation/Automation.styles.d.ts +12 -0
- package/lib/components/Automation/Automation.styles.d.ts.map +1 -0
- package/lib/components/Automation/Automation.styles.js +68 -0
- package/lib/components/Automation/Automation.styles.js.map +1 -0
- package/lib/components/Automation/Automation.test-ids.d.ts +3 -0
- package/lib/components/Automation/Automation.test-ids.d.ts.map +1 -0
- package/lib/components/Automation/Automation.test-ids.js +21 -0
- package/lib/components/Automation/Automation.test-ids.js.map +1 -0
- package/lib/components/Automation/Automation.types.d.ts +95 -0
- package/lib/components/Automation/Automation.types.d.ts.map +1 -0
- package/lib/components/Automation/Automation.types.js +18 -0
- package/lib/components/Automation/Automation.types.js.map +1 -0
- package/lib/components/Automation/Automation.utils.d.ts +109 -0
- package/lib/components/Automation/Automation.utils.d.ts.map +1 -0
- package/lib/components/Automation/Automation.utils.js +208 -0
- package/lib/components/Automation/Automation.utils.js.map +1 -0
- package/lib/components/Automation/AutomationContext.d.ts +4 -0
- package/lib/components/Automation/AutomationContext.d.ts.map +1 -0
- package/lib/components/Automation/AutomationContext.js +9 -0
- package/lib/components/Automation/AutomationContext.js.map +1 -0
- package/lib/components/Automation/RuleStep.d.ts +7 -0
- package/lib/components/Automation/RuleStep.d.ts.map +1 -0
- package/lib/components/Automation/RuleStep.js +151 -0
- package/lib/components/Automation/RuleStep.js.map +1 -0
- package/lib/components/Automation/index.d.ts +5 -0
- package/lib/components/Automation/index.d.ts.map +1 -0
- package/lib/components/Automation/index.js +4 -0
- package/lib/components/Automation/index.js.map +1 -0
- package/lib/components/DynamicInput/BooleanControl.d.ts +2 -2
- package/lib/components/DynamicInput/BooleanControl.d.ts.map +1 -1
- package/lib/components/DynamicInput/BooleanControl.js.map +1 -1
- package/lib/components/DynamicInput/ConstantControl.d.ts +61 -0
- package/lib/components/DynamicInput/ConstantControl.d.ts.map +1 -0
- package/lib/components/DynamicInput/ConstantControl.js +58 -0
- package/lib/components/DynamicInput/ConstantControl.js.map +1 -0
- package/lib/components/DynamicInput/DynamicInput.d.ts +2 -2
- package/lib/components/DynamicInput/DynamicInput.d.ts.map +1 -1
- package/lib/components/DynamicInput/DynamicInput.js +13 -63
- package/lib/components/DynamicInput/DynamicInput.js.map +1 -1
- package/lib/components/DynamicInput/DynamicInput.styles.d.ts +0 -1
- package/lib/components/DynamicInput/DynamicInput.styles.d.ts.map +1 -1
- package/lib/components/DynamicInput/DynamicInput.styles.js +48 -41
- package/lib/components/DynamicInput/DynamicInput.styles.js.map +1 -1
- package/lib/components/DynamicInput/DynamicInput.types.d.ts +26 -81
- 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/index.d.ts +2 -0
- package/lib/components/DynamicInput/index.d.ts.map +1 -1
- package/lib/components/DynamicInput/index.js +1 -0
- package/lib/components/DynamicInput/index.js.map +1 -1
- package/lib/components/DynamicInput/utils.d.ts.map +1 -1
- package/lib/components/DynamicInput/utils.js +3 -2
- package/lib/components/DynamicInput/utils.js.map +1 -1
- package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.d.ts +34 -0
- package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.d.ts.map +1 -0
- package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.js +55 -0
- package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.js.map +1 -0
- package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.test-ids.d.ts +2 -0
- package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.test-ids.d.ts.map +1 -0
- package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.test-ids.js +10 -0
- package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.test-ids.js.map +1 -0
- package/lib/components/EmptyRuleTemplate/index.d.ts +3 -0
- package/lib/components/EmptyRuleTemplate/index.d.ts.map +1 -0
- package/lib/components/EmptyRuleTemplate/index.js +2 -0
- package/lib/components/EmptyRuleTemplate/index.js.map +1 -0
- package/lib/components/Expression/Expression.d.ts.map +1 -1
- package/lib/components/Expression/Expression.js +8 -7
- package/lib/components/Expression/Expression.js.map +1 -1
- package/lib/components/Expression/Expression.styles.d.ts +5 -1
- package/lib/components/Expression/Expression.styles.d.ts.map +1 -1
- package/lib/components/Expression/Expression.styles.js +15 -3
- package/lib/components/Expression/Expression.styles.js.map +1 -1
- package/lib/components/Expression/Expression.test-ids.d.ts +1 -0
- package/lib/components/Expression/Expression.test-ids.d.ts.map +1 -1
- package/lib/components/Expression/Expression.test-ids.js +6 -0
- package/lib/components/Expression/Expression.test-ids.js.map +1 -1
- package/lib/components/Expression/ExpressionBuilderModal.d.ts +6 -0
- package/lib/components/Expression/ExpressionBuilderModal.d.ts.map +1 -0
- package/lib/components/Expression/ExpressionBuilderModal.js +53 -0
- package/lib/components/Expression/ExpressionBuilderModal.js.map +1 -0
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.d.ts.map +1 -1
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.js +1 -0
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.js.map +1 -1
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.d.ts.map +1 -1
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.js +3 -2
- package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.js.map +1 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilder.d.ts +4 -2
- package/lib/components/ExpressionBuilder/ExpressionBuilder.d.ts.map +1 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilder.js +66 -25
- package/lib/components/ExpressionBuilder/ExpressionBuilder.js.map +1 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.d.ts +18 -2
- package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.d.ts.map +1 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.js +80 -13
- package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.js.map +1 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilder.test-ids.d.ts +5 -0
- package/lib/components/ExpressionBuilder/ExpressionBuilder.test-ids.d.ts.map +1 -0
- package/lib/components/ExpressionBuilder/ExpressionBuilder.test-ids.js +22 -0
- package/lib/components/ExpressionBuilder/ExpressionBuilder.test-ids.js.map +1 -0
- package/lib/components/ExpressionBuilder/ExpressionBuilder.types.d.ts +33 -5
- package/lib/components/ExpressionBuilder/ExpressionBuilder.types.d.ts.map +1 -1
- package/lib/components/ExpressionBuilder/ExpressionBuilder.types.js.map +1 -1
- package/lib/components/ExpressionBuilder/ExpressionDetails.d.ts +4 -2
- package/lib/components/ExpressionBuilder/ExpressionDetails.d.ts.map +1 -1
- package/lib/components/ExpressionBuilder/ExpressionDetails.js +6 -4
- package/lib/components/ExpressionBuilder/ExpressionDetails.js.map +1 -1
- package/lib/components/ExpressionBuilder/ExpressionItem.d.ts +4 -2
- package/lib/components/ExpressionBuilder/ExpressionItem.d.ts.map +1 -1
- package/lib/components/ExpressionBuilder/ExpressionItem.js +8 -6
- package/lib/components/ExpressionBuilder/ExpressionItem.js.map +1 -1
- package/lib/components/ExpressionBuilder/ExpressionList.d.ts +4 -2
- package/lib/components/ExpressionBuilder/ExpressionList.d.ts.map +1 -1
- package/lib/components/ExpressionBuilder/ExpressionList.js +17 -5
- package/lib/components/ExpressionBuilder/ExpressionList.js.map +1 -1
- package/lib/components/ExpressionBuilder/index.d.ts +1 -0
- package/lib/components/ExpressionBuilder/index.d.ts.map +1 -1
- package/lib/components/ExpressionBuilder/index.js +1 -0
- package/lib/components/ExpressionBuilder/index.js.map +1 -1
- package/lib/components/FieldReference/FieldReference.types.d.ts +16 -2
- package/lib/components/FieldReference/FieldReference.types.d.ts.map +1 -1
- package/lib/components/FieldReference/FieldReference.types.js.map +1 -1
- package/lib/components/FieldReference/FieldReferenceInput.d.ts.map +1 -1
- package/lib/components/FieldReference/FieldReferenceInput.js +5 -5
- package/lib/components/FieldReference/FieldReferenceInput.js.map +1 -1
- package/lib/components/FieldReference/helpers.d.ts +7 -1
- package/lib/components/FieldReference/helpers.d.ts.map +1 -1
- package/lib/components/FieldReference/helpers.js +31 -1
- package/lib/components/FieldReference/helpers.js.map +1 -1
- package/lib/components/FieldReference/index.d.ts +2 -2
- package/lib/components/FieldReference/index.d.ts.map +1 -1
- package/lib/components/FieldReference/index.js +1 -1
- package/lib/components/FieldReference/index.js.map +1 -1
- package/lib/components/IconTile/iconUtils.d.ts +2 -1
- package/lib/components/IconTile/iconUtils.d.ts.map +1 -1
- package/lib/components/IconTile/iconUtils.js +94 -1
- package/lib/components/IconTile/iconUtils.js.map +1 -1
- package/lib/components/IconTile/index.d.ts +1 -0
- package/lib/components/IconTile/index.d.ts.map +1 -1
- package/lib/components/IconTile/index.js +1 -0
- package/lib/components/IconTile/index.js.map +1 -1
- package/lib/components/LifeCycle/Category.d.ts +0 -1
- package/lib/components/LifeCycle/Category.d.ts.map +1 -1
- package/lib/components/LifeCycle/Category.js +16 -56
- package/lib/components/LifeCycle/Category.js.map +1 -1
- package/lib/components/LifeCycle/LifeCycle.js +2 -2
- package/lib/components/LifeCycle/LifeCycle.js.map +1 -1
- package/lib/components/LifeCycle/LifeCycle.types.d.ts +37 -2
- package/lib/components/LifeCycle/LifeCycle.types.d.ts.map +1 -1
- package/lib/components/LifeCycle/LifeCycle.types.js +9 -9
- package/lib/components/LifeCycle/LifeCycle.types.js.map +1 -1
- package/lib/components/LifeCycle/LifeCycleDragDropList.d.ts.map +1 -1
- package/lib/components/LifeCycle/LifeCycleDragDropList.js +25 -3
- package/lib/components/LifeCycle/LifeCycleDragDropList.js.map +1 -1
- package/lib/components/LifeCycle/Stage.d.ts.map +1 -1
- package/lib/components/LifeCycle/Stage.js +20 -11
- package/lib/components/LifeCycle/Stage.js.map +1 -1
- package/lib/components/LifeCycle/Step.d.ts.map +1 -1
- package/lib/components/LifeCycle/Step.js +1 -0
- package/lib/components/LifeCycle/Step.js.map +1 -1
- package/lib/components/LifeCycle/Task.d.ts +7 -1
- package/lib/components/LifeCycle/Task.d.ts.map +1 -1
- package/lib/components/LifeCycle/Task.js +19 -10
- package/lib/components/LifeCycle/Task.js.map +1 -1
- package/lib/components/LifeCycle/TaskGroup.d.ts +23 -0
- package/lib/components/LifeCycle/TaskGroup.d.ts.map +1 -0
- package/lib/components/LifeCycle/TaskGroup.js +92 -0
- package/lib/components/LifeCycle/TaskGroup.js.map +1 -0
- package/lib/components/LifeCycle/index.d.ts +1 -1
- package/lib/components/LifeCycle/index.d.ts.map +1 -1
- package/lib/components/LifeCycle/index.js +1 -1
- package/lib/components/LifeCycle/index.js.map +1 -1
- package/lib/components/LifeCycle/utils.d.ts +6 -1
- package/lib/components/LifeCycle/utils.d.ts.map +1 -1
- package/lib/components/LifeCycle/utils.js +129 -0
- package/lib/components/LifeCycle/utils.js.map +1 -1
- package/lib/components/ObjectSelect/InputTree/InputTree.d.ts +21 -0
- package/lib/components/ObjectSelect/InputTree/InputTree.d.ts.map +1 -0
- package/lib/components/ObjectSelect/InputTree/InputTree.js +20 -0
- package/lib/components/ObjectSelect/InputTree/InputTree.js.map +1 -0
- package/lib/components/ObjectSelect/InputTree/InputTree.styles.d.ts +10 -0
- package/lib/components/ObjectSelect/InputTree/InputTree.styles.d.ts.map +1 -0
- package/lib/components/ObjectSelect/InputTree/InputTree.styles.js +82 -0
- package/lib/components/ObjectSelect/InputTree/InputTree.styles.js.map +1 -0
- package/lib/components/ObjectSelect/InputTree/index.d.ts +3 -0
- package/lib/components/ObjectSelect/InputTree/index.d.ts.map +1 -0
- package/lib/components/ObjectSelect/InputTree/index.js +2 -0
- package/lib/components/ObjectSelect/InputTree/index.js.map +1 -0
- package/lib/components/ObjectSelect/ObjectPicker.d.ts +11 -5
- package/lib/components/ObjectSelect/ObjectPicker.d.ts.map +1 -1
- package/lib/components/ObjectSelect/ObjectPicker.js +24 -15
- package/lib/components/ObjectSelect/ObjectPicker.js.map +1 -1
- package/lib/components/ObjectSelect/ObjectSelect.d.ts +2 -29
- package/lib/components/ObjectSelect/ObjectSelect.d.ts.map +1 -1
- package/lib/components/ObjectSelect/ObjectSelect.js +80 -23
- package/lib/components/ObjectSelect/ObjectSelect.js.map +1 -1
- package/lib/components/ObjectSelect/ObjectSelect.types.d.ts +53 -0
- package/lib/components/ObjectSelect/ObjectSelect.types.d.ts.map +1 -0
- package/lib/components/ObjectSelect/ObjectSelect.types.js +2 -0
- package/lib/components/ObjectSelect/ObjectSelect.types.js.map +1 -0
- package/lib/components/ObjectSelect/index.d.ts +1 -1
- package/lib/components/ObjectSelect/index.d.ts.map +1 -1
- package/lib/components/ObjectSelect/index.js.map +1 -1
- package/lib/components/ObjectSelect/useCreateModal.d.ts +6 -2
- package/lib/components/ObjectSelect/useCreateModal.d.ts.map +1 -1
- package/lib/components/ObjectSelect/useCreateModal.js +7 -4
- package/lib/components/ObjectSelect/useCreateModal.js.map +1 -1
- package/lib/components/PageBanner/PageBanner.d.ts +6 -4
- package/lib/components/PageBanner/PageBanner.d.ts.map +1 -1
- package/lib/components/PageBanner/PageBanner.js +10 -9
- package/lib/components/PageBanner/PageBanner.js.map +1 -1
- package/lib/components/PageBanner/PageBanner.test-ids.d.ts +2 -0
- package/lib/components/PageBanner/PageBanner.test-ids.d.ts.map +1 -0
- package/lib/components/PageBanner/PageBanner.test-ids.js +9 -0
- package/lib/components/PageBanner/PageBanner.test-ids.js.map +1 -0
- package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageHeader.d.ts +12 -0
- package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageHeader.d.ts.map +1 -0
- package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageHeader.js +158 -0
- package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageHeader.js.map +1 -0
- package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageTemplate.d.ts +5 -0
- package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageTemplate.d.ts.map +1 -0
- package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageTemplate.js +17 -0
- package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageTemplate.js.map +1 -0
- package/lib/components/PageTemplates/GalleryPage.d.ts +14 -4
- package/lib/components/PageTemplates/GalleryPage.d.ts.map +1 -1
- package/lib/components/PageTemplates/GalleryPage.js +57 -12
- package/lib/components/PageTemplates/GalleryPage.js.map +1 -1
- package/lib/components/PageTemplates/HeaderActionButtons.d.ts +5 -0
- package/lib/components/PageTemplates/HeaderActionButtons.d.ts.map +1 -0
- package/lib/components/PageTemplates/HeaderActionButtons.js +14 -0
- package/lib/components/PageTemplates/HeaderActionButtons.js.map +1 -0
- package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageHeader.d.ts +8 -0
- package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageHeader.d.ts.map +1 -0
- package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageHeader.js +23 -0
- package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageHeader.js.map +1 -0
- package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageTemplate.d.ts +5 -0
- package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageTemplate.d.ts.map +1 -0
- package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageTemplate.js +10 -0
- package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageTemplate.js.map +1 -0
- package/lib/components/PageTemplates/OverviewPageTemplate/OverviewPageTemplate.d.ts +5 -0
- package/lib/components/PageTemplates/OverviewPageTemplate/OverviewPageTemplate.d.ts.map +1 -0
- package/lib/components/PageTemplates/OverviewPageTemplate/OverviewPageTemplate.js +10 -0
- package/lib/components/PageTemplates/OverviewPageTemplate/OverviewPageTemplate.js.map +1 -0
- package/lib/components/PageTemplates/OverviewPageTemplate/PageBanner.d.ts +21 -0
- package/lib/components/PageTemplates/OverviewPageTemplate/PageBanner.d.ts.map +1 -0
- package/lib/components/PageTemplates/OverviewPageTemplate/PageBanner.js +22 -0
- package/lib/components/PageTemplates/OverviewPageTemplate/PageBanner.js.map +1 -0
- package/lib/components/PageTemplates/PageTemplate.styles.d.ts +16 -0
- package/lib/components/PageTemplates/PageTemplate.styles.d.ts.map +1 -0
- package/lib/components/PageTemplates/PageTemplate.styles.js +167 -0
- package/lib/components/PageTemplates/PageTemplate.styles.js.map +1 -0
- package/lib/components/PageTemplates/PageTemplate.types.d.ts +114 -0
- package/lib/components/PageTemplates/PageTemplate.types.d.ts.map +1 -0
- package/lib/components/PageTemplates/PageTemplate.types.js +2 -0
- package/lib/components/PageTemplates/PageTemplate.types.js.map +1 -0
- package/lib/components/PageTemplates/PageTemplates.d.ts +16 -12
- package/lib/components/PageTemplates/PageTemplates.d.ts.map +1 -1
- package/lib/components/PageTemplates/PageTemplates.js +12 -12
- package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
- package/lib/components/PageTemplates/PageTemplates.test-ids.d.ts +4 -0
- package/lib/components/PageTemplates/PageTemplates.test-ids.d.ts.map +1 -0
- package/lib/components/PageTemplates/PageTemplates.test-ids.js +25 -0
- package/lib/components/PageTemplates/PageTemplates.test-ids.js.map +1 -0
- package/lib/components/PageTemplates/ShowcasePage.d.ts +2 -2
- package/lib/components/PageTemplates/ShowcasePage.d.ts.map +1 -1
- package/lib/components/PageTemplates/ShowcasePage.js +5 -6
- package/lib/components/PageTemplates/ShowcasePage.js.map +1 -1
- package/lib/components/PageTemplates/index.d.ts +6 -1
- package/lib/components/PageTemplates/index.d.ts.map +1 -1
- package/lib/components/PageTemplates/index.js +5 -1
- package/lib/components/PageTemplates/index.js.map +1 -1
- package/lib/components/RulePicker/RulePicker.d.ts +4 -0
- package/lib/components/RulePicker/RulePicker.d.ts.map +1 -0
- package/lib/components/RulePicker/RulePicker.js +81 -0
- package/lib/components/RulePicker/RulePicker.js.map +1 -0
- package/lib/index.d.ts +5 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -1
- package/lib/index.js.map +1 -1
- package/lib/utils/typeIconMapping.js +1 -1
- package/lib/utils/typeIconMapping.js.map +1 -1
- package/package.json +4 -4
- 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
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ForwardRefForwardPropsComponent } from '@pega/cosmos-react-core';
|
|
2
|
+
import type { AuthoringPanelProps } from './AuthoringPanel.types';
|
|
3
|
+
declare const _default: ForwardRefForwardPropsComponent<AuthoringPanelProps> & {
|
|
4
|
+
getTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["additional-info", "dismiss", "interactive-title", "actions", "progress", "title", "primary-action", "visual", "secondary", "visual", "secondary", "info-edit"]>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
//# sourceMappingURL=AuthoringPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthoringPanel.d.ts","sourceRoot":"","sources":["../../../src/components/AuthoringPanel/AuthoringPanel.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAU/E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;;;;AAmJlE,wBAAqE"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, forwardRef, useRef, useContext } from 'react';
|
|
3
|
+
import { Icon, Button, Flex, useTestIds, withTestIds, OneColumnPage, useConsolidatedRef, useI18n, Progress, useEscape, useDirection, AppShellContext, useBreakpoint, useFocusTrap, ErrorState, Drawer } from '@pega/cosmos-react-core';
|
|
4
|
+
import { resizeDrawerDefaultWidth } from '@pega/cosmos-react-core/lib/styles/constants';
|
|
5
|
+
import { getAuthoringPanelTestIds } from './AuthoringPanel.test-ids';
|
|
6
|
+
import { StyledPanelPage, StyledAuthoringPanel, StyledProgressContainer, StyledPreviewDrawer } from './AuthoringPanel.styles';
|
|
7
|
+
import AuthoringPanelHeader from './AuthoringPanelHeader';
|
|
8
|
+
const AuthoringPanel = forwardRef(({ testId, content, header, open, onDismiss, progress, actions, target, error, onErrorRetry }, ref) => {
|
|
9
|
+
const contentRef = useConsolidatedRef(ref);
|
|
10
|
+
const dismissButtonRef = useRef(null);
|
|
11
|
+
const t = useI18n();
|
|
12
|
+
const testIds = useTestIds(testId, getAuthoringPanelTestIds);
|
|
13
|
+
const previewRef = useConsolidatedRef(ref);
|
|
14
|
+
const direction = useDirection();
|
|
15
|
+
const { setPreviewActive } = useContext(AppShellContext);
|
|
16
|
+
const isSmallOrAbove = useBreakpoint('sm');
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
if (open && dismissButtonRef.current && !progress) {
|
|
19
|
+
dismissButtonRef.current.focus();
|
|
20
|
+
}
|
|
21
|
+
}, [open, progress]);
|
|
22
|
+
const dismissPanel = () => {
|
|
23
|
+
if (onDismiss) {
|
|
24
|
+
onDismiss(target);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
useEscape(() => {
|
|
28
|
+
if (open && onDismiss) {
|
|
29
|
+
dismissPanel();
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (open) {
|
|
34
|
+
setPreviewActive(true);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
setPreviewActive(false);
|
|
38
|
+
}
|
|
39
|
+
}, [open]);
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
return () => {
|
|
42
|
+
setPreviewActive(false);
|
|
43
|
+
};
|
|
44
|
+
}, []);
|
|
45
|
+
useFocusTrap(previewRef, true, [], false);
|
|
46
|
+
return (_jsx(Drawer, { "data-testid": testIds.root, as: StyledPreviewDrawer, role: 'complementary', forwardedAs: Flex, container: { direction: 'column' }, ref: previewRef, open: open && isSmallOrAbove, position: 'fixed', placement: direction.end, "aria-label": t('preview_of_noun', [header.primary.title]), shadow: true, nullWhenClosed: true, resizeable: true, size: resizeDrawerDefaultWidth, children: open && (_jsx(Flex, { item: { shrink: 0 }, as: StyledAuthoringPanel, open: open, "aria-label": header.primary, children: progress ? (_jsxs(Flex, { container: { direction: 'column' }, as: StyledProgressContainer, children: [onDismiss && (_jsx(Flex, { container: { justify: 'end' }, children: _jsx(Button, { "data-testid": testIds.dismiss, icon: true, variant: 'simple', compact: true, ref: dismissButtonRef, label: t('dismiss_label_a11y', ['panel']), onClick: dismissPanel, children: _jsx(Icon, { name: 'times' }) }) })), _jsx(Progress, { "data-testid": testIds.progress, visible: !!progress, focusOnVisible: true, placement: 'local', message: typeof progress === 'string' ? progress : undefined })] })) : (_jsx(Flex, { container: { gap: 1 }, as: OneColumnPage, ref: contentRef, title: header.primary.title, forwardedAs: StyledPanelPage, header: _jsx(AuthoringPanelHeader, { header: header, actions: actions, onDismiss: dismissPanel, dismissButtonRef: dismissButtonRef, testId: testId, error: error }), scrollContent: true, a: error ? (_jsx(ErrorState, { message: t('preview_error'), onRetry: onErrorRetry })) : (content) })) })) }));
|
|
47
|
+
});
|
|
48
|
+
export default withTestIds(AuthoringPanel, getAuthoringPanelTestIds);
|
|
49
|
+
//# sourceMappingURL=AuthoringPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthoringPanel.js","sourceRoot":"","sources":["../../../src/components/AuthoringPanel/AuthoringPanel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGlE,OAAO,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,UAAU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KAAK,CAAC,CAAC,CAAC,CACN,KAAC,UAAU,IAAC,OAAO,EAAE,CAAC,CAAC,eAAe,CAAC,EAAE,OAAO,EAAE,YAAY,GAAI,CACnE,CAAC,CAAC,CAAC,CACF,OAAO,CACR,GAEH,CACH,GACI,CACR,GACM,CACV,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC,cAAc,EAAE,wBAAwB,CAAC,CAAC","sourcesContent":["import { useEffect, forwardRef, useRef, useContext } from 'react';\nimport type { PropsWithoutRef, RefObject } from 'react';\n\nimport {\n Icon,\n Button,\n Flex,\n useTestIds,\n withTestIds,\n OneColumnPage,\n useConsolidatedRef,\n useI18n,\n Progress,\n useEscape,\n useDirection,\n AppShellContext,\n useBreakpoint,\n useFocusTrap,\n ErrorState,\n Drawer\n} from '@pega/cosmos-react-core';\nimport type { ForwardRefForwardPropsComponent } from '@pega/cosmos-react-core';\nimport { resizeDrawerDefaultWidth } from '@pega/cosmos-react-core/lib/styles/constants';\n\nimport { getAuthoringPanelTestIds } from './AuthoringPanel.test-ids';\nimport {\n StyledPanelPage,\n StyledAuthoringPanel,\n StyledProgressContainer,\n StyledPreviewDrawer\n} from './AuthoringPanel.styles';\nimport type { AuthoringPanelProps } from './AuthoringPanel.types';\nimport AuthoringPanelHeader from './AuthoringPanelHeader';\n\nconst AuthoringPanel: ForwardRefForwardPropsComponent<AuthoringPanelProps> = forwardRef(\n (\n {\n testId,\n content,\n header,\n open,\n onDismiss,\n progress,\n actions,\n target,\n error,\n onErrorRetry\n }: PropsWithoutRef<AuthoringPanelProps>,\n ref: AuthoringPanelProps['ref']\n ) => {\n const contentRef = useConsolidatedRef<HTMLDivElement>(ref);\n const dismissButtonRef: RefObject<HTMLButtonElement> = useRef<HTMLButtonElement>(null);\n const t = useI18n();\n const testIds = useTestIds(testId, getAuthoringPanelTestIds);\n const previewRef = useConsolidatedRef(ref);\n const direction = useDirection();\n\n const { setPreviewActive } = useContext(AppShellContext);\n const isSmallOrAbove = useBreakpoint('sm');\n\n useEffect(() => {\n if (open && dismissButtonRef.current && !progress) {\n dismissButtonRef.current.focus();\n }\n }, [open, progress]);\n\n const dismissPanel = () => {\n if (onDismiss) {\n onDismiss(target);\n }\n };\n\n useEscape(() => {\n if (open && onDismiss) {\n dismissPanel();\n }\n });\n\n useEffect(() => {\n if (open) {\n setPreviewActive(true);\n } else {\n setPreviewActive(false);\n }\n }, [open]);\n\n useEffect(() => {\n return () => {\n setPreviewActive(false);\n };\n }, []);\n\n useFocusTrap(previewRef, true, [], false);\n\n return (\n <Drawer\n data-testid={testIds.root}\n as={StyledPreviewDrawer}\n role='complementary'\n forwardedAs={Flex}\n container={{ direction: 'column' }}\n ref={previewRef}\n open={open && isSmallOrAbove}\n position='fixed'\n placement={direction.end}\n aria-label={t('preview_of_noun', [header.primary.title])}\n shadow\n nullWhenClosed\n resizeable\n size={resizeDrawerDefaultWidth}\n >\n {open && (\n <Flex\n item={{ shrink: 0 }}\n as={StyledAuthoringPanel}\n open={open}\n aria-label={header.primary}\n >\n {progress ? (\n <Flex container={{ direction: 'column' }} as={StyledProgressContainer}>\n {onDismiss && (\n <Flex container={{ justify: 'end' }}>\n <Button\n data-testid={testIds.dismiss}\n icon\n variant='simple'\n compact\n ref={dismissButtonRef}\n label={t('dismiss_label_a11y', ['panel'])}\n onClick={dismissPanel}\n >\n <Icon name='times' />\n </Button>\n </Flex>\n )}\n\n <Progress\n data-testid={testIds.progress}\n visible={!!progress}\n focusOnVisible\n placement='local'\n message={typeof progress === 'string' ? progress : undefined}\n />\n </Flex>\n ) : (\n <Flex\n container={{ gap: 1 }}\n as={OneColumnPage}\n ref={contentRef}\n title={header.primary.title}\n forwardedAs={StyledPanelPage}\n header={\n <AuthoringPanelHeader\n header={header}\n actions={actions}\n onDismiss={dismissPanel}\n dismissButtonRef={dismissButtonRef}\n testId={testId}\n error={error}\n />\n }\n scrollContent\n a={\n error ? (\n <ErrorState message={t('preview_error')} onRetry={onErrorRetry} />\n ) : (\n content\n )\n }\n />\n )}\n </Flex>\n )}\n </Drawer>\n );\n }\n);\n\nexport default withTestIds(AuthoringPanel, getAuthoringPanelTestIds);\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { AuthoringPanelProps } from './AuthoringPanel.types';
|
|
2
|
+
export declare const StyledPanelPage: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
+
export declare const StyledAuthoringPanel: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Pick<AuthoringPanelProps, "open">, never>;
|
|
4
|
+
export declare const StyledHeaderContent: import("styled-components").StyledComponent<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").FlexProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
5
|
+
export declare const StyledTitleContainer: import("styled-components").StyledComponent<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").FlexProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
6
|
+
export declare const StyledProgressContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
7
|
+
export declare const StyledActions: import("styled-components").StyledComponent<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").FlexProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
8
|
+
export declare const StyledTextWithEllipsis: import("styled-components").StyledComponent<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").TextProps>, import("styled-components").DefaultTheme, {
|
|
9
|
+
isLink: boolean;
|
|
10
|
+
}, never>;
|
|
11
|
+
export declare const StyledPrimaryTextButton: import("styled-components").StyledComponent<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").ButtonProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
12
|
+
export declare const StyledPrimaryTextLink: import("styled-components").StyledComponent<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").LinkProps> & {
|
|
13
|
+
getTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["preview-popover", "preview", "new-tab"]>;
|
|
14
|
+
}, import("styled-components").DefaultTheme, {}, never>;
|
|
15
|
+
export declare const StyledTitlesContainer: import("styled-components").StyledComponent<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").FlexProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
16
|
+
export declare const StyledPrimaryContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
17
|
+
export declare const StyledPreviewDrawer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
18
|
+
//# sourceMappingURL=AuthoringPanel.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthoringPanel.styles.d.ts","sourceRoot":"","sources":["../../../src/components/AuthoringPanel/AuthoringPanel.styles.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE,eAAO,MAAM,eAAe,yGA0B1B,CAAC;AAGH,eAAO,MAAM,oBAAoB,wIAchC,CAAC;AAGF,eAAO,MAAM,mBAAmB,kNAE/B,CAAC;AAEF,eAAO,MAAM,oBAAoB,kNAEhC,CAAC;AAEF,eAAO,MAAM,uBAAuB,yGAQlC,CAAC;AAGH,eAAO,MAAM,aAAa,kNAIzB,CAAC;AAEF,eAAO,MAAM,sBAAsB;YAA0B,OAAO;SAalE,CAAC;AAGH,eAAO,MAAM,uBAAuB,oNAYlC,CAAC;AAGH,eAAO,MAAM,qBAAqB;2BA/CtB,CAAC;uDA0DX,CAAC;AAGH,eAAO,MAAM,qBAAqB,kNAEjC,CAAC;AAEF,eAAO,MAAM,sBAAsB,yGAIjC,CAAC;AAGH,eAAO,MAAM,mBAAmB,yGAsB9B,CAAC"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import { Button, Text, StyledPageHeader, Link, defaultThemeProp, StyledButton, StyledVisual, Flex, readableHue } from '@pega/cosmos-react-core';
|
|
3
|
+
import { ellipsisOverflow } from '@pega/cosmos-react-core/lib/styles/mixins';
|
|
4
|
+
import { StyledRegions } from '@pega/cosmos-react-core/lib/components/PageTemplates/PageTemplates';
|
|
5
|
+
import { resizeDrawerMaxWidth, resizeDrawerMinWidth } from '@pega/cosmos-react-core/lib/styles/constants';
|
|
6
|
+
import { StyledTabPanel } from '@pega/cosmos-react-core/lib/components/Tabs/TabPanel';
|
|
7
|
+
import { StyledPage } from '../PageTemplates/PageTemplates';
|
|
8
|
+
export const StyledPanelPage = styled(StyledPage)(({ theme }) => {
|
|
9
|
+
const { spacing } = theme.base;
|
|
10
|
+
return css `
|
|
11
|
+
width: 100%;
|
|
12
|
+
|
|
13
|
+
${StyledPageHeader} {
|
|
14
|
+
padding: calc(2 * ${spacing});
|
|
15
|
+
padding-block-end: 0;
|
|
16
|
+
}
|
|
17
|
+
${StyledVisual} {
|
|
18
|
+
align-self: start;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
${StyledRegions} {
|
|
22
|
+
padding: 0;
|
|
23
|
+
|
|
24
|
+
& ${StyledPageHeader} {
|
|
25
|
+
border-bottom: none;
|
|
26
|
+
padding-block: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
${StyledTabPanel} {
|
|
30
|
+
padding-inline: calc(2 * ${spacing});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
`;
|
|
34
|
+
});
|
|
35
|
+
StyledPanelPage.defaultProps = defaultThemeProp;
|
|
36
|
+
export const StyledAuthoringPanel = styled.div(({ open, theme }) => {
|
|
37
|
+
const { animation, palette, spacing } = theme.base;
|
|
38
|
+
const translate = open ? 0 : '100%';
|
|
39
|
+
return css `
|
|
40
|
+
height: calc(100vh - 3rem);
|
|
41
|
+
position: relative;
|
|
42
|
+
border-inline-start: solid calc(0.125 * ${spacing}) ${palette['border-line']};
|
|
43
|
+
transition-property: transform, opacity;
|
|
44
|
+
transition-duration: calc(2 * ${animation.speed});
|
|
45
|
+
transition-timing-function: ${animation.timing.ease};
|
|
46
|
+
transform: ${open ? 'none' : `translateX(${translate})`};
|
|
47
|
+
`;
|
|
48
|
+
});
|
|
49
|
+
StyledAuthoringPanel.defaultProps = defaultThemeProp;
|
|
50
|
+
export const StyledHeaderContent = styled(Flex) `
|
|
51
|
+
overflow: hidden;
|
|
52
|
+
`;
|
|
53
|
+
export const StyledTitleContainer = styled(Flex) `
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
`;
|
|
56
|
+
export const StyledProgressContainer = styled.div(({ theme }) => {
|
|
57
|
+
return css `
|
|
58
|
+
padding: calc(2 * ${theme.base.spacing});
|
|
59
|
+
width: 100%;
|
|
60
|
+
${StyledButton} {
|
|
61
|
+
z-index: ${theme.base['z-index'].drawer};
|
|
62
|
+
}
|
|
63
|
+
`;
|
|
64
|
+
});
|
|
65
|
+
StyledProgressContainer.defaultProps = defaultThemeProp;
|
|
66
|
+
export const StyledActions = styled(Flex) `
|
|
67
|
+
${StyledButton} {
|
|
68
|
+
margin-inline-start: 0;
|
|
69
|
+
}
|
|
70
|
+
`;
|
|
71
|
+
export const StyledTextWithEllipsis = styled(Text)(({ theme: { base: { spacing } }, isLink }) => {
|
|
72
|
+
return css `
|
|
73
|
+
${ellipsisOverflow}
|
|
74
|
+
${isLink === false &&
|
|
75
|
+
`
|
|
76
|
+
margin: calc(0.5 * ${spacing});
|
|
77
|
+
`}
|
|
78
|
+
`;
|
|
79
|
+
});
|
|
80
|
+
StyledTextWithEllipsis.defaultProps = defaultThemeProp;
|
|
81
|
+
export const StyledPrimaryTextButton = styled(Button)(({ theme: { base: { spacing } } }) => {
|
|
82
|
+
return css `
|
|
83
|
+
overflow: hidden;
|
|
84
|
+
height: 100%;
|
|
85
|
+
max-width: fit-content;
|
|
86
|
+
text-overflow: ellipsis;
|
|
87
|
+
margin: calc(0.5 * ${spacing});
|
|
88
|
+
`;
|
|
89
|
+
});
|
|
90
|
+
StyledPrimaryTextButton.defaultProps = defaultThemeProp;
|
|
91
|
+
export const StyledPrimaryTextLink = styled(Link)(({ theme: { base: { spacing } } }) => {
|
|
92
|
+
return css `
|
|
93
|
+
margin: calc(0.5 * ${spacing});
|
|
94
|
+
overflow: hidden;
|
|
95
|
+
max-width: fit-content;
|
|
96
|
+
${ellipsisOverflow}
|
|
97
|
+
`;
|
|
98
|
+
});
|
|
99
|
+
StyledPrimaryTextLink.defaultProps = defaultThemeProp;
|
|
100
|
+
export const StyledTitlesContainer = styled(Flex) `
|
|
101
|
+
overflow: hidden;
|
|
102
|
+
`;
|
|
103
|
+
export const StyledPrimaryContainer = styled.div(({ theme }) => {
|
|
104
|
+
return css `
|
|
105
|
+
margin-block-start: calc(-1 * ${theme.base.spacing});
|
|
106
|
+
`;
|
|
107
|
+
});
|
|
108
|
+
StyledPrimaryContainer.defaultProps = defaultThemeProp;
|
|
109
|
+
export const StyledPreviewDrawer = styled.div(({ theme }) => {
|
|
110
|
+
return css `
|
|
111
|
+
min-width: ${resizeDrawerMinWidth};
|
|
112
|
+
max-width: ${resizeDrawerMaxWidth};
|
|
113
|
+
width: var(--resize-drawer-width);
|
|
114
|
+
background: ${theme.base.palette['primary-background']};
|
|
115
|
+
height: calc(100vh - var(--appshell-offset, 0rem));
|
|
116
|
+
top: var(--appshell-offset, 0);
|
|
117
|
+
z-index: calc(${theme.base['z-index'].drawer} + 500);
|
|
118
|
+
transition-property: transform, box-shadow, opacity, border-inline-start;
|
|
119
|
+
transition-duration: max(${theme.base.animation.speed}, 0.0001s);
|
|
120
|
+
transition-timing-function: ${theme.base.animation.timing.ease};
|
|
121
|
+
|
|
122
|
+
@media (min-width: ${theme.base.breakpoints.xl}) {
|
|
123
|
+
box-shadow: none;
|
|
124
|
+
border-inline-start: 0.0625rem solid
|
|
125
|
+
${readableHue(theme.base.palette['border-line'], theme.base.palette['app-background'], {
|
|
126
|
+
mode: 'both',
|
|
127
|
+
level: 'AANonText'
|
|
128
|
+
})};
|
|
129
|
+
}
|
|
130
|
+
`;
|
|
131
|
+
});
|
|
132
|
+
StyledPreviewDrawer.defaultProps = defaultThemeProp;
|
|
133
|
+
//# sourceMappingURL=AuthoringPanel.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthoringPanel.styles.js","sourceRoot":"","sources":["../../../src/components/AuthoringPanel/AuthoringPanel.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,MAAM,EACN,IAAI,EACJ,gBAAgB,EAChB,IAAI,EACJ,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,IAAI,EACJ,WAAW,EACZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,oEAAoE,CAAC;AACnG,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AAEtF,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAI5D,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC9D,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC;IAC/B,OAAO,GAAG,CAAA;;;MAGN,gBAAgB;0BACI,OAAO;;;MAG3B,YAAY;;;;MAIZ,aAAa;;;UAGT,gBAAgB;;;;;QAKlB,cAAc;mCACa,OAAO;;;GAGvC,CAAC;AACJ,CAAC,CAAC,CAAC;AACH,eAAe,CAAC,Y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AK,EAAE,EAAE,EAAE;IAC1D,OAAO,GAAG,CAAA;iBACK,oBAAoB;iBACpB,oBAAoB;;kBAEnB,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC;;;oBAGtC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM;;+BAEjB,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK;kCACvB,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI;;yBAEzC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;;;UAGxC,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE;QACrF,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,WAAW;KACnB,CAAC;;GAEP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,mBAAmB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport {\n Button,\n Text,\n StyledPageHeader,\n Link,\n defaultThemeProp,\n StyledButton,\n StyledVisual,\n Flex,\n readableHue\n} from '@pega/cosmos-react-core';\nimport { ellipsisOverflow } from '@pega/cosmos-react-core/lib/styles/mixins';\nimport { StyledRegions } from '@pega/cosmos-react-core/lib/components/PageTemplates/PageTemplates';\nimport {\n resizeDrawerMaxWidth,\n resizeDrawerMinWidth\n} from '@pega/cosmos-react-core/lib/styles/constants';\nimport { StyledTabPanel } from '@pega/cosmos-react-core/lib/components/Tabs/TabPanel';\n\nimport { StyledPage } from '../PageTemplates/PageTemplates';\n\nimport type { AuthoringPanelProps } from './AuthoringPanel.types';\n\nexport const StyledPanelPage = styled(StyledPage)(({ theme }) => {\n const { spacing } = theme.base;\n return css`\n width: 100%;\n\n ${StyledPageHeader} {\n padding: calc(2 * ${spacing});\n padding-block-end: 0;\n }\n ${StyledVisual} {\n align-self: start;\n }\n\n ${StyledRegions} {\n padding: 0;\n\n & ${StyledPageHeader} {\n border-bottom: none;\n padding-block: 0;\n }\n\n ${StyledTabPanel} {\n padding-inline: calc(2 * ${spacing});\n }\n }\n `;\n});\nStyledPanelPage.defaultProps = defaultThemeProp;\n\nexport const StyledAuthoringPanel = styled.div<Pick<AuthoringPanelProps, 'open'>>(\n ({ open, theme }) => {\n const { animation, palette, spacing } = theme.base;\n const translate = open ? 0 : '100%';\n return css`\n height: calc(100vh - 3rem);\n position: relative;\n border-inline-start: solid calc(0.125 * ${spacing}) ${palette['border-line']};\n transition-property: transform, opacity;\n transition-duration: calc(2 * ${animation.speed});\n transition-timing-function: ${animation.timing.ease};\n transform: ${open ? 'none' : `translateX(${translate})`};\n `;\n }\n);\nStyledAuthoringPanel.defaultProps = defaultThemeProp;\n\nexport const StyledHeaderContent = styled(Flex)`\n overflow: hidden;\n`;\n\nexport const StyledTitleContainer = styled(Flex)`\n overflow: hidden;\n`;\n\nexport const StyledProgressContainer = styled.div(({ theme }) => {\n return css`\n padding: calc(2 * ${theme.base.spacing});\n width: 100%;\n ${StyledButton} {\n z-index: ${theme.base['z-index'].drawer};\n }\n `;\n});\nStyledProgressContainer.defaultProps = defaultThemeProp;\n\nexport const StyledActions = styled(Flex)`\n ${StyledButton} {\n margin-inline-start: 0;\n }\n`;\n\nexport const StyledTextWithEllipsis = styled(Text)<{ isLink: boolean }>(({\n theme: {\n base: { spacing }\n },\n isLink\n}) => {\n return css`\n ${ellipsisOverflow}\n ${isLink === false &&\n `\n margin: calc(0.5 * ${spacing});\n `}\n `;\n});\nStyledTextWithEllipsis.defaultProps = defaultThemeProp;\n\nexport const StyledPrimaryTextButton = styled(Button)(({\n theme: {\n base: { spacing }\n }\n}) => {\n return css`\n overflow: hidden;\n height: 100%;\n max-width: fit-content;\n text-overflow: ellipsis;\n margin: calc(0.5 * ${spacing});\n `;\n});\nStyledPrimaryTextButton.defaultProps = defaultThemeProp;\n\nexport const StyledPrimaryTextLink = styled(Link)(({\n theme: {\n base: { spacing }\n }\n}) => {\n return css`\n margin: calc(0.5 * ${spacing});\n overflow: hidden;\n max-width: fit-content;\n ${ellipsisOverflow}\n `;\n});\nStyledPrimaryTextLink.defaultProps = defaultThemeProp;\n\nexport const StyledTitlesContainer = styled(Flex)`\n overflow: hidden;\n`;\n\nexport const StyledPrimaryContainer = styled.div(({ theme }) => {\n return css`\n margin-block-start: calc(-1 * ${theme.base.spacing});\n `;\n});\nStyledPrimaryContainer.defaultProps = defaultThemeProp;\n\nexport const StyledPreviewDrawer = styled.div(({ theme }) => {\n return css`\n min-width: ${resizeDrawerMinWidth};\n max-width: ${resizeDrawerMaxWidth};\n width: var(--resize-drawer-width);\n background: ${theme.base.palette['primary-background']};\n height: calc(100vh - var(--appshell-offset, 0rem));\n top: var(--appshell-offset, 0);\n z-index: calc(${theme.base['z-index'].drawer} + 500);\n transition-property: transform, box-shadow, opacity, border-inline-start;\n transition-duration: max(${theme.base.animation.speed}, 0.0001s);\n transition-timing-function: ${theme.base.animation.timing.ease};\n\n @media (min-width: ${theme.base.breakpoints.xl}) {\n box-shadow: none;\n border-inline-start: 0.0625rem solid\n ${readableHue(theme.base.palette['border-line'], theme.base.palette['app-background'], {\n mode: 'both',\n level: 'AANonText'\n })};\n }\n `;\n});\n\nStyledPreviewDrawer.defaultProps = defaultThemeProp;\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const getAuthoringPanelTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["additional-info", "dismiss", "interactive-title", "actions", "progress", "title", "primary-action", "visual", "secondary", "visual", "secondary", "info-edit"]>;
|
|
2
|
+
//# sourceMappingURL=AuthoringPanel.test-ids.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthoringPanel.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/AuthoringPanel/AuthoringPanel.test-ids.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,wBAAwB,qSAa1B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createTestIds } from '@pega/cosmos-react-core';
|
|
2
|
+
export const getAuthoringPanelTestIds = createTestIds('authoring-panel', [
|
|
3
|
+
'additional-info',
|
|
4
|
+
'dismiss',
|
|
5
|
+
'interactive-title',
|
|
6
|
+
'actions',
|
|
7
|
+
'progress',
|
|
8
|
+
'title',
|
|
9
|
+
'primary-action',
|
|
10
|
+
'visual',
|
|
11
|
+
'secondary',
|
|
12
|
+
'visual',
|
|
13
|
+
'secondary',
|
|
14
|
+
'info-edit'
|
|
15
|
+
]);
|
|
16
|
+
//# sourceMappingURL=AuthoringPanel.test-ids.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthoringPanel.test-ids.js","sourceRoot":"","sources":["../../../src/components/AuthoringPanel/AuthoringPanel.test-ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,MAAM,CAAC,MAAM,wBAAwB,GAAG,aAAa,CAAC,iBAAiB,EAAE;IACvE,iBAAiB;IACjB,SAAS;IACT,mBAAmB;IACnB,SAAS;IACT,UAAU;IACV,OAAO;IACP,gBAAgB;IAChB,QAAQ;IACR,WAAW;IACX,QAAQ;IACR,WAAW;IACX,WAAW;CACH,CAAC,CAAC","sourcesContent":["import { createTestIds } from '@pega/cosmos-react-core';\n\nexport const getAuthoringPanelTestIds = createTestIds('authoring-panel', [\n 'additional-info',\n 'dismiss',\n 'interactive-title',\n 'actions',\n 'progress',\n 'title',\n 'primary-action',\n 'visual',\n 'secondary',\n 'visual',\n 'secondary',\n 'info-edit'\n] as const);\n"]}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { Ref, ReactNode, MouseEvent, KeyboardEvent, RefObject } from 'react';
|
|
2
|
+
import type { FieldValueListProps, ProgressProps, TestIdProp, BaseProps, TextProps, OmitStrict, Action, ErrorStateProps } from '@pega/cosmos-react-core';
|
|
3
|
+
import type { IconTileProps } from '../IconTile';
|
|
4
|
+
import { getAuthoringPanelTestIds } from './AuthoringPanel.test-ids';
|
|
5
|
+
interface AdditionalInfoProps {
|
|
6
|
+
/** Title text in the Additional info dialog. */
|
|
7
|
+
title: string;
|
|
8
|
+
/** Description text in the Additional info dialog. */
|
|
9
|
+
description?: string;
|
|
10
|
+
/** Metadata for field list in the Additional info dialog. */
|
|
11
|
+
fields: FieldValueListProps['fields'];
|
|
12
|
+
/** Click handler for Edit button in the Additional info dialog. */
|
|
13
|
+
onEdit?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
14
|
+
}
|
|
15
|
+
export interface AuthoringPanelProps extends BaseProps, TestIdProp {
|
|
16
|
+
/**
|
|
17
|
+
* If true, the Panel will be visible.
|
|
18
|
+
*/
|
|
19
|
+
open: boolean;
|
|
20
|
+
progress?: boolean | ProgressProps['message'];
|
|
21
|
+
header: {
|
|
22
|
+
primary: {
|
|
23
|
+
/** The primary header text on the panel. */
|
|
24
|
+
title: string;
|
|
25
|
+
/** URL to navigate to. This will render the primary header text as a link. */
|
|
26
|
+
href?: string;
|
|
27
|
+
/** Click handler for the link. If no href if passed, this will render the primary header text as a button. */
|
|
28
|
+
onClick?: (e: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>) => void;
|
|
29
|
+
};
|
|
30
|
+
secondary?: {
|
|
31
|
+
/** The secondary header text on the panel containing rule type information. */
|
|
32
|
+
title: string;
|
|
33
|
+
/** URL to navigate to. This will render the secondary header text as a link. */
|
|
34
|
+
href?: string;
|
|
35
|
+
/** Click handler for the link. If no href if passed, this will render the secondary header text as a button. */
|
|
36
|
+
onClick?: (e: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>) => void;
|
|
37
|
+
};
|
|
38
|
+
/** Pass a title and fields to show additional information icon. */
|
|
39
|
+
additionalInfo?: AdditionalInfoProps;
|
|
40
|
+
/** A visual associated with the panel header. */
|
|
41
|
+
visual?: OmitStrict<IconTileProps, 'size'>;
|
|
42
|
+
};
|
|
43
|
+
/** Dismiss handler for the authoring panel. */
|
|
44
|
+
onDismiss?: (el: HTMLElement | null) => void;
|
|
45
|
+
/**
|
|
46
|
+
* A set of Action Buttons to render on the panel header.
|
|
47
|
+
* If array contains one object, then a single button will be rendered.
|
|
48
|
+
* If array contains multiple objects, then a menu button will be rendered with each button as menu item.
|
|
49
|
+
*/
|
|
50
|
+
actions?: Action[];
|
|
51
|
+
/** Ref to the element. */
|
|
52
|
+
ref?: Ref<HTMLDivElement>;
|
|
53
|
+
/** A region to display panel content. */
|
|
54
|
+
content: ReactNode;
|
|
55
|
+
/**
|
|
56
|
+
* An element the panel is contextually and visually associated with. Normally a triggering button.
|
|
57
|
+
* On dismiss, focus is returned back to this element.
|
|
58
|
+
*/
|
|
59
|
+
target: HTMLElement | null;
|
|
60
|
+
/** If true, the authoring panel will render in an error state. */
|
|
61
|
+
error?: boolean;
|
|
62
|
+
/** Callback fired when "Try again" button is clicked in an error state. */
|
|
63
|
+
onErrorRetry?: ErrorStateProps['onRetry'];
|
|
64
|
+
}
|
|
65
|
+
interface PaneltestIdsProps {
|
|
66
|
+
testIds: Partial<ReturnType<typeof getAuthoringPanelTestIds>>;
|
|
67
|
+
}
|
|
68
|
+
export interface AuthoringPanelHeaderProps extends Pick<AuthoringPanelProps, 'error'>, TestIdProp {
|
|
69
|
+
header: AuthoringPanelProps['header'];
|
|
70
|
+
actions: AuthoringPanelProps['actions'];
|
|
71
|
+
onDismiss: AuthoringPanelProps['onDismiss'];
|
|
72
|
+
dismissButtonRef: RefObject<HTMLButtonElement>;
|
|
73
|
+
}
|
|
74
|
+
export interface HeaderTextProps extends Pick<AuthoringPanelProps['header']['primary'], 'href' | 'onClick'>, Pick<TextProps, 'variant'>, PaneltestIdsProps {
|
|
75
|
+
title: string;
|
|
76
|
+
titleTestId?: string;
|
|
77
|
+
}
|
|
78
|
+
export interface AdditionalInfoContainerProps extends AdditionalInfoProps, PaneltestIdsProps {
|
|
79
|
+
}
|
|
80
|
+
export {};
|
|
81
|
+
//# sourceMappingURL=AuthoringPanel.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthoringPanel.types.d.ts","sourceRoot":"","sources":["../../../src/components/AuthoringPanel/AuthoringPanel.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElF,OAAO,KAAK,EACV,mBAAmB,EACnB,aAAa,EACb,UAAU,EACV,SAAS,EACT,SAAS,EACT,UAAU,EACV,MAAM,EACN,eAAe,EAChB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAErE,UAAU,mBAAmB;IAC3B,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6DAA6D;IAC7D,MAAM,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IACtC,mEAAmE;IACnE,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;CACrD;AAED,MAAM,WAAW,mBAAoB,SAAQ,SAAS,EAAE,UAAU;IAChE;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IAEd,QAAQ,CAAC,EAAE,OAAO,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC;IAC9C,MAAM,EAAE;QACN,OAAO,EAAE;YACP,4CAA4C;YAC5C,KAAK,EAAE,MAAM,CAAC;YACd,8EAA8E;YAC9E,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,8GAA8G;YAC9G,OAAO,CAAC,EAAE,CAAC,CAAC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;IACxC,SAAS,EAAE,mBAAmB,CAAC,WAAW,CAAC,CAAC;IAC5C,gBAAgB,EAAE,SAAS,CAAC,iBAAiB,CAAC,CAAC;CAChD;AAED,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,EACxE,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,EAC1B,iBAAiB;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,4BAA6B,SAAQ,mBAAmB,EAAE,iBAAiB;CAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthoringPanel.types.js","sourceRoot":"","sources":["../../../src/components/AuthoringPanel/AuthoringPanel.types.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["import type { Ref, ReactNode, MouseEvent, KeyboardEvent, RefObject } from 'react';\n\nimport type {\n FieldValueListProps,\n ProgressProps,\n TestIdProp,\n BaseProps,\n TextProps,\n OmitStrict,\n Action,\n ErrorStateProps\n} from '@pega/cosmos-react-core';\n\nimport type { IconTileProps } from '../IconTile';\n\nimport { getAuthoringPanelTestIds } from './AuthoringPanel.test-ids';\n\ninterface AdditionalInfoProps {\n /** Title text in the Additional info dialog. */\n title: string;\n /** Description text in the Additional info dialog. */\n description?: string;\n /** Metadata for field list in the Additional info dialog. */\n fields: FieldValueListProps['fields'];\n /** Click handler for Edit button in the Additional info dialog. */\n onEdit?: (e: MouseEvent<HTMLButtonElement>) => void;\n}\n\nexport interface AuthoringPanelProps extends BaseProps, TestIdProp {\n /**\n * If true, the Panel will be visible.\n */\n open: boolean;\n /* If true, the Panel will render a progress loader. */\n progress?: boolean | ProgressProps['message'];\n header: {\n primary: {\n /** The primary header text on the panel. */\n title: string;\n /** URL to navigate to. This will render the primary header text as a link. */\n href?: string;\n /** Click handler for the link. If no href if passed, this will render the primary header text as a button. */\n onClick?: (e: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>) => void;\n };\n secondary?: {\n /** The secondary header text on the panel containing rule type information. */\n title: string;\n /** URL to navigate to. This will render the secondary header text as a link. */\n href?: string;\n /** Click handler for the link. If no href if passed, this will render the secondary header text as a button. */\n onClick?: (e: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>) => void;\n };\n /** Pass a title and fields to show additional information icon. */\n additionalInfo?: AdditionalInfoProps;\n /** A visual associated with the panel header. */\n visual?: OmitStrict<IconTileProps, 'size'>;\n };\n /** Dismiss handler for the authoring panel. */\n onDismiss?: (el: HTMLElement | null) => void;\n /**\n * A set of Action Buttons to render on the panel header.\n * If array contains one object, then a single button will be rendered.\n * If array contains multiple objects, then a menu button will be rendered with each button as menu item.\n */\n actions?: Action[];\n /** Ref to the element. */\n ref?: Ref<HTMLDivElement>;\n /** A region to display panel content. */\n content: ReactNode;\n /**\n * An element the panel is contextually and visually associated with. Normally a triggering button.\n * On dismiss, focus is returned back to this element.\n */\n target: HTMLElement | null;\n /** If true, the authoring panel will render in an error state. */\n error?: boolean;\n /** Callback fired when \"Try again\" button is clicked in an error state. */\n onErrorRetry?: ErrorStateProps['onRetry'];\n}\n\ninterface PaneltestIdsProps {\n testIds: Partial<ReturnType<typeof getAuthoringPanelTestIds>>;\n}\n\nexport interface AuthoringPanelHeaderProps extends Pick<AuthoringPanelProps, 'error'>, TestIdProp {\n header: AuthoringPanelProps['header'];\n actions: AuthoringPanelProps['actions'];\n onDismiss: AuthoringPanelProps['onDismiss'];\n dismissButtonRef: RefObject<HTMLButtonElement>;\n}\n\nexport interface HeaderTextProps\n extends Pick<AuthoringPanelProps['header']['primary'], 'href' | 'onClick'>,\n Pick<TextProps, 'variant'>,\n PaneltestIdsProps {\n title: string;\n titleTestId?: string;\n}\n\nexport interface AdditionalInfoContainerProps extends AdditionalInfoProps, PaneltestIdsProps {}\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AuthoringPanelHeaderProps } from './AuthoringPanel.types';
|
|
2
|
+
declare const _default: (({ header, actions, onDismiss, testId, dismissButtonRef, error }: AuthoringPanelHeaderProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
3
|
+
getTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["additional-info", "dismiss", "interactive-title", "actions", "progress", "title", "primary-action", "visual", "secondary", "visual", "secondary", "info-edit"]>;
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|
|
6
|
+
//# sourceMappingURL=AuthoringPanelHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthoringPanelHeader.d.ts","sourceRoot":"","sources":["../../../src/components/AuthoringPanel/AuthoringPanelHeader.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EACV,yBAAyB,EAG1B,MAAM,wBAAwB,CAAC;2FAsG7B,yBAAyB;;;AA8F5B,wBAA2E"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, useMemo } from 'react';
|
|
3
|
+
import { Icon, Button, Flex, AdditionalInfo, Actions, FieldValueList, useI18n, Tooltip, useElement, Text, withTestIds, useTestIds } from '@pega/cosmos-react-core';
|
|
4
|
+
import IconTile from '../IconTile/IconTile';
|
|
5
|
+
import { getAuthoringPanelTestIds } from './AuthoringPanel.test-ids';
|
|
6
|
+
import { StyledTextWithEllipsis, StyledPrimaryTextButton, StyledPrimaryTextLink, StyledPrimaryContainer, StyledTitlesContainer, StyledActions } from './AuthoringPanel.styles';
|
|
7
|
+
const HeaderTitleText = ({ title, href, onClick, testIds, variant, titleTestId }) => {
|
|
8
|
+
const [el, setEl] = useElement();
|
|
9
|
+
const getHeaderText = () => {
|
|
10
|
+
if (onClick) {
|
|
11
|
+
return (_jsx(StyledPrimaryTextButton, { variant: 'link', onClick: onClick, "data-testid": testIds.interactiveTitle, children: _jsx(StyledTextWithEllipsis, { "data-testid": titleTestId, variant: variant, ref: setEl, children: title }) }));
|
|
12
|
+
}
|
|
13
|
+
if (href) {
|
|
14
|
+
return (_jsx(StyledPrimaryTextLink, { href: href, variant: 'link', "data-testid": testIds.interactiveTitle, children: _jsx(StyledTextWithEllipsis, { "data-testid": titleTestId, variant: variant, ref: setEl, children: title }) }));
|
|
15
|
+
}
|
|
16
|
+
return (_jsx(StyledTextWithEllipsis, { "data-testid": titleTestId, variant: variant, ref: setEl, isLink: false, children: title }));
|
|
17
|
+
};
|
|
18
|
+
return (_jsxs(_Fragment, { children: [getHeaderText(), el && (_jsx(Tooltip, { target: el, smart: true, showDelay: 'none', hideDelay: 'none', children: title }))] }));
|
|
19
|
+
};
|
|
20
|
+
const AdditionalInfoContainer = ({ title, description, fields, onEdit, testIds }) => {
|
|
21
|
+
const t = useI18n();
|
|
22
|
+
const infoDialogHandle = useRef(null);
|
|
23
|
+
return (_jsx(AdditionalInfo, { "data-testid": testIds.additionalInfo, heading: title, dialogHandle: infoDialogHandle, children: _jsxs(Flex, { container: { direction: 'column', alignItems: 'start', gap: 2 }, children: [_jsxs(Flex, { container: { direction: 'column', gap: 1 }, item: { grow: 1 }, children: [description && _jsx(Text, { as: 'p', children: description }), _jsx(FieldValueList, { variant: 'inline', fields: fields })] }), onEdit && (_jsx(Button, { "data-testid": testIds.infoEdit, onClick: (e) => {
|
|
24
|
+
infoDialogHandle.current?.close();
|
|
25
|
+
onEdit?.(e);
|
|
26
|
+
}, children: t('edit_details') }))] }) }));
|
|
27
|
+
};
|
|
28
|
+
const AuthoringPanelHeader = ({ header, actions, onDismiss, testId, dismissButtonRef, error }) => {
|
|
29
|
+
const { additionalInfo, primary, secondary, visual, ...restHeaderProps } = header;
|
|
30
|
+
const t = useI18n();
|
|
31
|
+
const testIds = useTestIds(testId, getAuthoringPanelTestIds);
|
|
32
|
+
const visualNode = useMemo(() => visual ? (_jsx(Flex, { item: { shrink: 0 }, as: IconTile, testId: testIds.visual, name: visual.name, label: visual.label, category: visual.category, inverted: visual.inverted, set: visual.set, size: 'xl' })) : undefined, [visual]);
|
|
33
|
+
return (_jsxs(Flex, { container: {
|
|
34
|
+
direction: 'row',
|
|
35
|
+
alignItems: 'center',
|
|
36
|
+
justify: error ? 'end' : 'between',
|
|
37
|
+
colGap: 0.5
|
|
38
|
+
}, children: [!error && (_jsxs(Flex, { container: { alignItems: 'center', colGap: 0.5 }, as: StyledTitlesContainer, children: [visualNode, _jsxs(Flex, { container: { direction: 'column' }, as: StyledTitlesContainer, children: [secondary?.title && (_jsx(HeaderTitleText, { ...restHeaderProps, title: secondary.title, onClick: secondary.onClick, href: secondary.href, variant: 'primary', titleTestId: testIds.secondary, testIds: testIds })), _jsx(Flex, { as: secondary ? StyledPrimaryContainer : undefined, container: { wrap: 'wrap' }, children: _jsx(HeaderTitleText, { ...restHeaderProps, title: primary.title, onClick: primary.onClick, href: primary.href, variant: 'h2', titleTestId: testIds.title, testIds: testIds }) })] })] })), (actions || onDismiss) && (_jsxs(StyledActions, { container: { alignItems: 'end', colGap: 1 }, children: [!error && (_jsxs(_Fragment, { children: [additionalInfo && _jsx(AdditionalInfoContainer, { ...additionalInfo, testIds: testIds }), actions && actions.length > 0 && (_jsx(Actions, { "data-testid": testIds.actions, iconOnly: true, compact: true, menuAt: 2, items: actions }))] })), onDismiss && (_jsx(Button, { "data-testid": testIds.dismiss, icon: true, variant: 'simple', compact: true, ref: dismissButtonRef, label: t('dismiss_label_a11y', ['panel']), onClick: onDismiss, children: _jsx(Icon, { name: 'times' }) }))] }))] }));
|
|
39
|
+
};
|
|
40
|
+
export default withTestIds(AuthoringPanelHeader, getAuthoringPanelTestIds);
|
|
41
|
+
//# sourceMappingURL=AuthoringPanelHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthoringPanelHeader.js","sourceRoot":"","sources":["../../../src/components/AuthoringPanel/AuthoringPanelHeader.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGxC,OAAO,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,cAAc,EACd,OAAO,EACP,cAAc,EACd,OAAO,EACP,OAAO,EACP,UAAU,EACV,IAAI,EACJ,WAAW,EACX,UAAU,EACX,MAAM,yBAAyB,CAAC;AAGjC,OAAO,QAAQ,MAAM,sBAAsB,CAAC;AAE5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,aAAa,EACd,MAAM,yBAAyB,CAAC;AAOjC,MAAM,eAAe,GAAG,CAAC,EACvB,KAAK,EACL,IAAI,EACJ,OAAO,EACP,OAAO,EACP,OAAO,EACP,WAAW,EACK,EAAE,EAAE;IACpB,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,GAAG,UAAU,EAAE,CAAC;IACjC,MAAM,aAAa,GAAG,GAAG,EAAE;QACzB,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,CACL,KAAC,uBAAuB,IACtB,OAAO,EAAC,MAAM,EACd,OAAO,EAAE,OAAO,iBACH,OAAO,CAAC,gBAAgB,YAErC,KAAC,sBAAsB,mBAAc,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,YAC3E,KAAK,GACiB,GACD,CAC3B,CAAC;QACJ,CAAC;QACD,IAAI,IAAI,EAAE,CAAC;YACT,OAAO,CACL,KAAC,qBAAqB,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAC,MAAM,iBAAc,OAAO,CAAC,gBAAgB,YACrF,KAAC,sBAAsB,mBAAc,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,KA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,OAAO,QACP,MAAM,EAAE,CAAC,EACT,KAAK,EAAE,OAAO,GACd,CACH,IACA,CACJ,EACA,SAAS,IAAI,CACZ,KAAC,MAAM,mBACQ,OAAO,CAAC,OAAO,EAC5B,IAAI,QACJ,OAAO,EAAC,QAAQ,EAChB,OAAO,QACP,GAAG,EAAE,gBAAgB,EACrB,KAAK,EAAE,CAAC,CAAC,oBAAoB,EAAE,CAAC,OAAO,CAAC,CAAC,EACzC,OAAO,EAAE,SAAS,YAElB,KAAC,IAAI,IAAC,IAAI,EAAC,OAAO,GAAG,GACd,CACV,IACa,CACjB,IACI,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC,oBAAoB,EAAE,wBAAwB,CAAC,CAAC","sourcesContent":["import { useRef, useMemo } from 'react';\nimport type { MouseEvent } from 'react';\n\nimport {\n Icon,\n Button,\n Flex,\n AdditionalInfo,\n Actions,\n FieldValueList,\n useI18n,\n Tooltip,\n useElement,\n Text,\n withTestIds,\n useTestIds\n} from '@pega/cosmos-react-core';\nimport type { DialogHandleValue } from '@pega/cosmos-react-core';\n\nimport IconTile from '../IconTile/IconTile';\n\nimport { getAuthoringPanelTestIds } from './AuthoringPanel.test-ids';\nimport {\n StyledTextWithEllipsis,\n StyledPrimaryTextButton,\n StyledPrimaryTextLink,\n StyledPrimaryContainer,\n StyledTitlesContainer,\n StyledActions\n} from './AuthoringPanel.styles';\nimport type {\n AuthoringPanelHeaderProps,\n HeaderTextProps,\n AdditionalInfoContainerProps\n} from './AuthoringPanel.types';\n\nconst HeaderTitleText = ({\n title,\n href,\n onClick,\n testIds,\n variant,\n titleTestId\n}: HeaderTextProps) => {\n const [el, setEl] = useElement();\n const getHeaderText = () => {\n if (onClick) {\n return (\n <StyledPrimaryTextButton\n variant='link'\n onClick={onClick}\n data-testid={testIds.interactiveTitle}\n >\n <StyledTextWithEllipsis data-testid={titleTestId} variant={variant} ref={setEl}>\n {title}\n </StyledTextWithEllipsis>\n </StyledPrimaryTextButton>\n );\n }\n if (href) {\n return (\n <StyledPrimaryTextLink href={href} variant='link' data-testid={testIds.interactiveTitle}>\n <StyledTextWithEllipsis data-testid={titleTestId} variant={variant} ref={setEl}>\n {title}\n </StyledTextWithEllipsis>\n </StyledPrimaryTextLink>\n );\n }\n return (\n <StyledTextWithEllipsis\n data-testid={titleTestId}\n variant={variant}\n ref={setEl}\n isLink={false}\n >\n {title}\n </StyledTextWithEllipsis>\n );\n };\n\n return (\n <>\n {getHeaderText()}\n\n {el && (\n <Tooltip target={el} smart showDelay='none' hideDelay='none'>\n {title}\n </Tooltip>\n )}\n </>\n );\n};\n\nconst AdditionalInfoContainer = ({\n title,\n description,\n fields,\n onEdit,\n testIds\n}: AdditionalInfoContainerProps) => {\n const t = useI18n();\n const infoDialogHandle = useRef<DialogHandleValue>(null);\n return (\n <AdditionalInfo\n data-testid={testIds.additionalInfo}\n heading={title}\n dialogHandle={infoDialogHandle}\n >\n <Flex container={{ direction: 'column', alignItems: 'start', gap: 2 }}>\n <Flex container={{ direction: 'column', gap: 1 }} item={{ grow: 1 }}>\n {description && <Text as='p'>{description}</Text>}\n <FieldValueList variant='inline' fields={fields} />\n </Flex>\n {onEdit && (\n <Button\n data-testid={testIds.infoEdit}\n onClick={(e: MouseEvent<HTMLButtonElement>) => {\n infoDialogHandle.current?.close();\n onEdit?.(e);\n }}\n >\n {t('edit_details')}\n </Button>\n )}\n </Flex>\n </AdditionalInfo>\n );\n};\n\nconst AuthoringPanelHeader = ({\n header,\n actions,\n onDismiss,\n testId,\n dismissButtonRef,\n error\n}: AuthoringPanelHeaderProps) => {\n const { additionalInfo, primary, secondary, visual, ...restHeaderProps } = header;\n const t = useI18n();\n const testIds = useTestIds(testId, getAuthoringPanelTestIds);\n const visualNode = useMemo(\n () =>\n visual ? (\n <Flex\n item={{ shrink: 0 }}\n as={IconTile}\n testId={testIds.visual}\n name={visual.name}\n label={visual.label}\n category={visual.category}\n inverted={visual.inverted}\n set={visual.set}\n size='xl'\n />\n ) : undefined,\n [visual]\n );\n return (\n <Flex\n container={{\n direction: 'row',\n alignItems: 'center',\n justify: error ? 'end' : 'between',\n colGap: 0.5\n }}\n >\n {!error && (\n <Flex container={{ alignItems: 'center', colGap: 0.5 }} as={StyledTitlesContainer}>\n {visualNode}\n <Flex container={{ direction: 'column' }} as={StyledTitlesContainer}>\n {secondary?.title && (\n <HeaderTitleText\n {...restHeaderProps}\n title={secondary.title}\n onClick={secondary.onClick}\n href={secondary.href}\n variant='primary'\n titleTestId={testIds.secondary}\n testIds={testIds}\n />\n )}\n <Flex as={secondary ? StyledPrimaryContainer : undefined} container={{ wrap: 'wrap' }}>\n <HeaderTitleText\n {...restHeaderProps}\n title={primary.title}\n onClick={primary.onClick}\n href={primary.href}\n variant='h2'\n titleTestId={testIds.title}\n testIds={testIds}\n />\n </Flex>\n </Flex>\n </Flex>\n )}\n {(actions || onDismiss) && (\n <StyledActions container={{ alignItems: 'end', colGap: 1 }}>\n {!error && (\n <>\n {additionalInfo && <AdditionalInfoContainer {...additionalInfo} testIds={testIds} />}\n {actions && actions.length > 0 && (\n <Actions\n data-testid={testIds.actions}\n iconOnly\n compact\n menuAt={2}\n items={actions}\n />\n )}\n </>\n )}\n {onDismiss && (\n <Button\n data-testid={testIds.dismiss}\n icon\n variant='simple'\n compact\n ref={dismissButtonRef}\n label={t('dismiss_label_a11y', ['panel'])}\n onClick={onDismiss}\n >\n <Icon name='times' />\n </Button>\n )}\n </StyledActions>\n )}\n </Flex>\n );\n};\n\nexport default withTestIds(AuthoringPanelHeader, getAuthoringPanelTestIds);\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AuthoringPanel/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,YAAY,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/AuthoringPanel/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC","sourcesContent":["export { default as AuthoringPanel } from './AuthoringPanel';\nexport type { AuthoringPanelProps } from './AuthoringPanel.types';\nexport { StyledAuthoringPanel } from './AuthoringPanel.styles';\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ForwardRefForwardPropsComponent } from '@pega/cosmos-react-core';
|
|
2
|
+
import type { AutomationProps } from './Automation.types';
|
|
3
|
+
declare const _default: ForwardRefForwardPropsComponent<AutomationProps> & {
|
|
4
|
+
getTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["expand-all", "collapse-all", "generate-comments", "steps"]>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
//# sourceMappingURL=Automation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Automation.d.ts","sourceRoot":"","sources":["../../../src/components/Automation/Automation.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAa,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAS1F,OAAO,KAAK,EAAE,eAAe,EAAoB,MAAM,oBAAoB,CAAC;;;;AAyL5E,wBAA6D"}
|