@pega/cosmos-react-demos 3.0.0-dev.3.0 → 3.0.0-dev.4.2
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/jsx/build/AppShell/AppShell.mocks.d.ts +17 -0
- package/jsx/build/AppShell/AppShell.mocks.d.ts.map +1 -1
- package/jsx/build/AppShell/AppShell.mocks.js +15 -0
- package/jsx/build/AppShell/AppShell.mocks.js.map +1 -1
- package/jsx/build/AppShell/AppShell.stories.d.ts +2 -0
- package/jsx/build/AppShell/AppShell.stories.d.ts.map +1 -1
- package/jsx/build/AppShell/AppShell.stories.jsx +2 -17
- package/jsx/build/AppShell/AppShell.stories.jsx.map +1 -1
- package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts +4 -1
- package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts.map +1 -1
- package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.jsx +18 -2
- package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.jsx.map +1 -1
- package/jsx/build/FlowModeller/FlowModeller.mocks.d.ts +19 -2
- package/jsx/build/FlowModeller/FlowModeller.mocks.d.ts.map +1 -1
- package/jsx/build/FlowModeller/{FlowModeller.mocks.js → FlowModeller.mocks.jsx} +71 -7
- package/jsx/build/FlowModeller/FlowModeller.mocks.jsx.map +1 -0
- package/jsx/build/FlowModeller/FlowModeller.stories.d.ts +2 -7
- package/jsx/build/FlowModeller/FlowModeller.stories.d.ts.map +1 -1
- package/jsx/build/FlowModeller/FlowModeller.stories.jsx +14 -100
- package/jsx/build/FlowModeller/FlowModeller.stories.jsx.map +1 -1
- package/jsx/build/FlowModeller/FlowModeller.styles.d.ts +2 -0
- package/jsx/build/FlowModeller/FlowModeller.styles.d.ts.map +1 -0
- package/jsx/build/FlowModeller/FlowModeller.styles.js +8 -0
- package/jsx/build/FlowModeller/FlowModeller.styles.js.map +1 -0
- package/jsx/build/ItemLibrary/LibraryPicker.stories.d.ts +2 -5
- package/jsx/build/ItemLibrary/LibraryPicker.stories.d.ts.map +1 -1
- package/jsx/build/ItemLibrary/LibraryPicker.stories.jsx.map +1 -1
- package/jsx/build/LifeCycle/LifeCycle.stories.d.ts +2 -4
- package/jsx/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -1
- package/jsx/build/LifeCycle/LifeCycle.stories.jsx.map +1 -1
- package/jsx/build/ObjectSelect/ObjectSelect.mocks.d.ts +40 -0
- package/jsx/build/ObjectSelect/ObjectSelect.mocks.d.ts.map +1 -0
- package/jsx/build/ObjectSelect/ObjectSelect.mocks.jsx +315 -0
- package/jsx/build/ObjectSelect/ObjectSelect.mocks.jsx.map +1 -0
- package/jsx/build/ObjectSelect/ObjectSelect.stories.d.ts +9 -0
- package/jsx/build/ObjectSelect/ObjectSelect.stories.d.ts.map +1 -0
- package/jsx/build/ObjectSelect/ObjectSelect.stories.jsx +137 -0
- package/jsx/build/ObjectSelect/ObjectSelect.stories.jsx.map +1 -0
- package/jsx/build/ObjectSelect/ObjectSelect.styles.d.ts +4 -0
- package/jsx/build/ObjectSelect/ObjectSelect.styles.d.ts.map +1 -0
- package/jsx/build/ObjectSelect/ObjectSelect.styles.js +27 -0
- package/jsx/build/ObjectSelect/ObjectSelect.styles.js.map +1 -0
- package/jsx/build/PageTemplates/GalleryPage.mocks.d.ts +45 -0
- package/jsx/build/PageTemplates/GalleryPage.mocks.d.ts.map +1 -0
- package/jsx/build/PageTemplates/GalleryPage.mocks.jsx +78 -0
- package/jsx/build/PageTemplates/GalleryPage.mocks.jsx.map +1 -0
- package/jsx/build/PageTemplates/GalleryPage.stories.d.ts +1 -0
- package/jsx/build/PageTemplates/GalleryPage.stories.d.ts.map +1 -1
- package/jsx/build/PageTemplates/GalleryPage.stories.jsx +3 -79
- package/jsx/build/PageTemplates/GalleryPage.stories.jsx.map +1 -1
- package/jsx/build/PageTemplates/PageTemplates.mocks.d.ts +11 -0
- package/jsx/build/PageTemplates/PageTemplates.mocks.d.ts.map +1 -0
- package/jsx/build/PageTemplates/PageTemplates.mocks.jsx +129 -0
- package/jsx/build/PageTemplates/PageTemplates.mocks.jsx.map +1 -0
- package/jsx/build/PageTemplates/PageTemplates.stories.d.ts +1 -0
- package/jsx/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/jsx/build/PageTemplates/PageTemplates.stories.jsx +4 -129
- package/jsx/build/PageTemplates/PageTemplates.stories.jsx.map +1 -1
- package/jsx/build/Workbench/Workbench.stories.d.ts.map +1 -1
- package/jsx/build/Workbench/Workbench.stories.jsx +3 -14
- package/jsx/build/Workbench/Workbench.stories.jsx.map +1 -1
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.d.ts +3 -0
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.d.ts.map +1 -0
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.js +13 -0
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.js.map +1 -0
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts +16 -8
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts.map +1 -1
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.jsx +59 -56
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.jsx.map +1 -1
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.styles.d.ts +5 -0
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.styles.d.ts.map +1 -0
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.styles.js +15 -0
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.styles.js.map +1 -0
- package/jsx/core/AppShell/AppShell.stories.d.ts +1 -0
- package/jsx/core/AppShell/AppShell.stories.d.ts.map +1 -1
- package/jsx/core/AppShell/AppShell.stories.jsx +3 -1
- package/jsx/core/AppShell/AppShell.stories.jsx.map +1 -1
- package/jsx/core/Button/Button.stories.jsx +6 -6
- package/jsx/core/Button/Button.stories.jsx.map +1 -1
- package/jsx/core/ColorPicker/ColorPicker.stories.d.ts.map +1 -1
- package/jsx/core/ColorPicker/ColorPicker.stories.jsx +2 -10
- package/jsx/core/ColorPicker/ColorPicker.stories.jsx.map +1 -1
- package/jsx/core/ColorPicker/ColorPicker.styles.d.ts +4 -0
- package/jsx/core/ColorPicker/ColorPicker.styles.d.ts.map +1 -0
- package/jsx/core/ColorPicker/ColorPicker.styles.js +11 -0
- package/jsx/core/ColorPicker/ColorPicker.styles.js.map +1 -0
- package/jsx/core/Configuration/Configuration.mocks.d.ts +7 -0
- package/jsx/core/Configuration/Configuration.mocks.d.ts.map +1 -0
- package/jsx/core/Configuration/Configuration.mocks.jsx +9 -0
- package/jsx/core/Configuration/Configuration.mocks.jsx.map +1 -0
- package/jsx/core/Configuration/Configuration.stories.d.ts.map +1 -1
- package/jsx/core/Configuration/Configuration.stories.jsx +2 -18
- package/jsx/core/Configuration/Configuration.stories.jsx.map +1 -1
- package/jsx/core/Configuration/Configuration.styles.d.ts +6 -0
- package/jsx/core/Configuration/Configuration.styles.d.ts.map +1 -0
- package/jsx/core/Configuration/Configuration.styles.js +12 -0
- package/jsx/core/Configuration/Configuration.styles.js.map +1 -0
- package/jsx/core/DateTime/DateTime.stories.d.ts.map +1 -1
- package/jsx/core/DateTime/DateTime.stories.jsx +1 -0
- package/jsx/core/DateTime/DateTime.stories.jsx.map +1 -1
- package/jsx/core/FieldGroup/FieldGroup.stories.d.ts +2 -0
- package/jsx/core/FieldGroup/FieldGroup.stories.d.ts.map +1 -1
- package/jsx/core/FieldGroup/FieldGroup.stories.jsx +8 -4
- package/jsx/core/FieldGroup/FieldGroup.stories.jsx.map +1 -1
- package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts +4 -0
- package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -1
- package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx +70 -2
- package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx.map +1 -1
- package/jsx/core/FieldGroup/FieldGroupList.stories.d.ts +9 -8
- package/jsx/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -1
- package/jsx/core/FieldGroup/FieldGroupList.stories.jsx +51 -88
- package/jsx/core/FieldGroup/FieldGroupList.stories.jsx.map +1 -1
- package/jsx/core/File/FileDisplay.stories.d.ts.map +1 -1
- package/jsx/core/File/FileDisplay.stories.jsx +16 -38
- package/jsx/core/File/FileDisplay.stories.jsx.map +1 -1
- package/jsx/core/HTML/HTML.stories.d.ts +6 -0
- package/jsx/core/HTML/HTML.stories.d.ts.map +1 -0
- package/jsx/core/HTML/HTML.stories.jsx +13 -0
- package/jsx/core/HTML/HTML.stories.jsx.map +1 -0
- package/jsx/core/Icon/Icon.stories.d.ts.map +1 -1
- package/jsx/core/Icon/Icon.stories.jsx +5 -27
- package/jsx/core/Icon/Icon.stories.jsx.map +1 -1
- package/jsx/core/Icon/Icon.styles.d.ts +4 -0
- package/jsx/core/Icon/Icon.styles.d.ts.map +1 -0
- package/jsx/core/Icon/Icon.styles.js +25 -0
- package/jsx/core/Icon/Icon.styles.js.map +1 -0
- package/jsx/core/IconPicker/IconPicker.stories.jsx +1 -1
- package/jsx/core/IconPicker/IconPicker.stories.jsx.map +1 -1
- package/jsx/core/Link/Link.stories.d.ts +1 -11
- package/jsx/core/Link/Link.stories.d.ts.map +1 -1
- package/jsx/core/Link/Link.stories.jsx.map +1 -1
- package/jsx/core/ListToolbar/ListToolbar.mocks.d.ts +9 -0
- package/jsx/core/ListToolbar/ListToolbar.mocks.d.ts.map +1 -0
- package/jsx/core/ListToolbar/ListToolbar.mocks.jsx +71 -0
- package/jsx/core/ListToolbar/ListToolbar.mocks.jsx.map +1 -0
- package/jsx/core/ListToolbar/ListToolbar.stories.d.ts +7 -0
- package/jsx/core/ListToolbar/ListToolbar.stories.d.ts.map +1 -0
- package/jsx/core/ListToolbar/ListToolbar.stories.jsx +87 -0
- package/jsx/core/ListToolbar/ListToolbar.stories.jsx.map +1 -0
- package/jsx/core/Number/Number.stories.d.ts.map +1 -1
- package/jsx/core/Number/Number.stories.jsx +2 -0
- package/jsx/core/Number/Number.stories.jsx.map +1 -1
- package/jsx/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/jsx/core/PageTemplates/PageTemplates.stories.jsx +1 -11
- package/jsx/core/PageTemplates/PageTemplates.stories.jsx.map +1 -1
- package/jsx/core/PageTemplates/PageTemplates.styles.d.ts +1 -0
- package/jsx/core/PageTemplates/PageTemplates.styles.d.ts.map +1 -1
- package/jsx/core/PageTemplates/PageTemplates.styles.js +9 -0
- package/jsx/core/PageTemplates/PageTemplates.styles.js.map +1 -1
- package/jsx/core/Tooltip/Tooltip.stories.d.ts +2 -5
- package/jsx/core/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/jsx/core/Tooltip/Tooltip.stories.jsx.map +1 -1
- package/jsx/core/Tree/Tree.stories.d.ts.map +1 -1
- package/jsx/core/Tree/Tree.stories.jsx +2 -2
- package/jsx/core/Tree/Tree.stories.jsx.map +1 -1
- package/jsx/cs/Article/Article.stories.d.ts +2 -10
- package/jsx/cs/Article/Article.stories.d.ts.map +1 -1
- package/jsx/cs/Article/Article.stories.jsx.map +1 -1
- package/jsx/cs/ArticleList/ArticleList.stories.d.ts +2 -11
- package/jsx/cs/ArticleList/ArticleList.stories.d.ts.map +1 -1
- package/jsx/cs/ArticleList/ArticleList.stories.jsx +2 -1
- package/jsx/cs/ArticleList/ArticleList.stories.jsx.map +1 -1
- package/jsx/cs/CSCaseView/CSAppShell.stories.d.ts +2 -36
- package/jsx/cs/CSCaseView/CSAppShell.stories.d.ts.map +1 -1
- package/jsx/cs/CSCaseView/CSAppShell.stories.jsx +6 -33
- package/jsx/cs/CSCaseView/CSAppShell.stories.jsx.map +1 -1
- package/jsx/cs/CSCaseView/CSCaseView.mocks.d.ts +9 -0
- package/jsx/cs/CSCaseView/CSCaseView.mocks.d.ts.map +1 -1
- package/jsx/cs/CSCaseView/{CSCaseView.mocks.js → CSCaseView.mocks.jsx} +30 -1
- package/jsx/cs/CSCaseView/CSCaseView.mocks.jsx.map +1 -0
- package/jsx/cs/CallControlPanel/CallControlPanel.stories.d.ts +2 -2
- package/jsx/cs/CallControlPanel/CallControlPanel.stories.d.ts.map +1 -1
- package/jsx/cs/CallControlPanel/CallControlPanel.stories.jsx +4 -4
- package/jsx/cs/CallControlPanel/CallControlPanel.stories.jsx.map +1 -1
- package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts +2 -8
- package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -1
- package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx +3 -3
- package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx.map +1 -1
- package/jsx/cs/InteractionNotification/InteractionNotification.stories.d.ts +7 -6
- package/jsx/cs/InteractionNotification/InteractionNotification.stories.d.ts.map +1 -1
- package/jsx/cs/InteractionNotification/InteractionNotification.stories.jsx +13 -5
- package/jsx/cs/InteractionNotification/InteractionNotification.stories.jsx.map +1 -1
- package/jsx/cs/InteractionTimer/InteractionTimer.mocks.d.ts +11 -0
- package/jsx/cs/InteractionTimer/InteractionTimer.mocks.d.ts.map +1 -0
- package/jsx/cs/InteractionTimer/InteractionTimer.mocks.js +29 -0
- package/jsx/cs/InteractionTimer/InteractionTimer.mocks.js.map +1 -0
- package/jsx/cs/InteractionTimer/InteractionTimer.stories.d.ts +2 -7
- package/jsx/cs/InteractionTimer/InteractionTimer.stories.d.ts.map +1 -1
- package/jsx/cs/InteractionTimer/InteractionTimer.stories.jsx +6 -30
- package/jsx/cs/InteractionTimer/InteractionTimer.stories.jsx.map +1 -1
- package/jsx/cs/TaskManager/TaskManager.mocks.d.ts +6 -0
- package/jsx/cs/TaskManager/TaskManager.mocks.d.ts.map +1 -1
- package/jsx/cs/TaskManager/TaskManager.mocks.js +7 -0
- package/jsx/cs/TaskManager/TaskManager.mocks.js.map +1 -1
- package/jsx/cs/TaskManager/TaskManager.stories.d.ts +6 -5
- package/jsx/cs/TaskManager/TaskManager.stories.d.ts.map +1 -1
- package/jsx/cs/TaskManager/TaskManager.stories.jsx +25 -29
- package/jsx/cs/TaskManager/TaskManager.stories.jsx.map +1 -1
- package/jsx/cs/TaskManager/TaskManager.styles.d.ts +3 -0
- package/jsx/cs/TaskManager/TaskManager.styles.d.ts.map +1 -0
- package/jsx/cs/TaskManager/TaskManager.styles.js +8 -0
- package/jsx/cs/TaskManager/TaskManager.styles.js.map +1 -0
- package/jsx/dnd/DragDropList/DragDropList.mocks.d.ts +15 -0
- package/jsx/dnd/DragDropList/DragDropList.mocks.d.ts.map +1 -0
- package/jsx/dnd/DragDropList/DragDropList.mocks.jsx +33 -0
- package/jsx/dnd/DragDropList/DragDropList.mocks.jsx.map +1 -0
- package/jsx/dnd/DragDropList/DragDropList.stories.d.ts +8 -9
- package/jsx/dnd/DragDropList/DragDropList.stories.d.ts.map +1 -1
- package/jsx/dnd/DragDropList/DragDropList.stories.jsx +14 -78
- package/jsx/dnd/DragDropList/DragDropList.stories.jsx.map +1 -1
- package/jsx/dnd/DragDropList/DragDropList.styles.d.ts +6 -0
- package/jsx/dnd/DragDropList/DragDropList.styles.d.ts.map +1 -0
- package/jsx/dnd/DragDropList/DragDropList.styles.js +32 -0
- package/jsx/dnd/DragDropList/DragDropList.styles.js.map +1 -0
- package/jsx/rte/Editor/Editor.mocks.d.ts +6 -0
- package/jsx/rte/Editor/Editor.mocks.d.ts.map +1 -0
- package/jsx/rte/Editor/Editor.mocks.jsx +20 -0
- package/jsx/rte/Editor/Editor.mocks.jsx.map +1 -0
- package/jsx/rte/Editor/Editor.stories.d.ts.map +1 -1
- package/jsx/rte/Editor/Editor.stories.jsx +2 -20
- package/jsx/rte/Editor/Editor.stories.jsx.map +1 -1
- package/jsx/rte/RichTextEditor/RichTextEditor.stories.d.ts +2 -3
- package/jsx/rte/RichTextEditor/RichTextEditor.stories.d.ts.map +1 -1
- package/jsx/rte/RichTextEditor/RichTextEditor.stories.jsx.map +1 -1
- package/jsx/social/Chat/RepeatingView.mocks.d.ts +14 -0
- package/jsx/social/Chat/RepeatingView.mocks.d.ts.map +1 -0
- package/jsx/social/Chat/RepeatingView.mocks.js +11 -0
- package/jsx/social/Chat/RepeatingView.mocks.js.map +1 -0
- package/jsx/social/Chat/RepeatingView.stories.d.ts +6 -17
- package/jsx/social/Chat/RepeatingView.stories.d.ts.map +1 -1
- package/jsx/social/Chat/RepeatingView.stories.jsx +16 -46
- package/jsx/social/Chat/RepeatingView.stories.jsx.map +1 -1
- package/jsx/social/Chat/RepeatingView.styles.d.ts +2 -0
- package/jsx/social/Chat/RepeatingView.styles.d.ts.map +1 -0
- package/jsx/social/Chat/RepeatingView.styles.js +22 -0
- package/jsx/social/Chat/RepeatingView.styles.js.map +1 -0
- package/jsx/social/Email/Email.mocks.d.ts +155 -2
- package/jsx/social/Email/Email.mocks.d.ts.map +1 -1
- package/jsx/social/Email/Email.mocks.jsx +756 -0
- package/jsx/social/Email/Email.mocks.jsx.map +1 -0
- package/jsx/social/Email/Email.stories.d.ts +14 -14
- package/jsx/social/Email/Email.stories.d.ts.map +1 -1
- package/jsx/social/Email/Email.stories.jsx +115 -407
- package/jsx/social/Email/Email.stories.jsx.map +1 -1
- package/jsx/social/Email/Email.styles.d.ts +4 -0
- package/jsx/social/Email/Email.styles.d.ts.map +1 -0
- package/jsx/social/Email/Email.styles.js +14 -0
- package/jsx/social/Email/Email.styles.js.map +1 -0
- package/jsx/social/Feed/Feed.stories.d.ts.map +1 -1
- package/jsx/social/Feed/Feed.stories.jsx +23 -18
- package/jsx/social/Feed/Feed.stories.jsx.map +1 -1
- package/jsx/social/Feed/FeedPost.stories.d.ts.map +1 -1
- package/jsx/social/Feed/FeedPost.stories.jsx +30 -20
- package/jsx/social/Feed/FeedPost.stories.jsx.map +1 -1
- package/jsx/social/Feed/FeedReply.stories.d.ts.map +1 -1
- package/jsx/social/Feed/FeedReply.stories.jsx +21 -16
- package/jsx/social/Feed/FeedReply.stories.jsx.map +1 -1
- package/jsx/work/CaseView/MobileCaseView.stories.d.ts +2 -7
- package/jsx/work/CaseView/MobileCaseView.stories.d.ts.map +1 -1
- package/jsx/work/CaseView/MobileCaseView.stories.jsx.map +1 -1
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.mocks.d.ts +45 -0
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.mocks.d.ts.map +1 -0
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.mocks.jsx +166 -0
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.mocks.jsx.map +1 -0
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts +2 -6
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts.map +1 -1
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.jsx +2 -174
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.jsx.map +1 -1
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.styles.d.ts +4 -0
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.styles.d.ts.map +1 -0
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.styles.js +11 -0
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.styles.js.map +1 -0
- package/jsx/work/Timeline/Timeline.stories.d.ts +2 -0
- package/jsx/work/Timeline/Timeline.stories.d.ts.map +1 -1
- package/jsx/work/Timeline/Timeline.stories.jsx +28 -1
- package/jsx/work/Timeline/Timeline.stories.jsx.map +1 -1
- package/lib/build/AppShell/AppShell.mocks.d.ts +17 -0
- package/lib/build/AppShell/AppShell.mocks.d.ts.map +1 -1
- package/lib/build/AppShell/AppShell.mocks.js +16 -0
- package/lib/build/AppShell/AppShell.mocks.js.map +1 -1
- package/lib/build/AppShell/AppShell.stories.d.ts +2 -0
- package/lib/build/AppShell/AppShell.stories.d.ts.map +1 -1
- package/lib/build/AppShell/AppShell.stories.js +3 -18
- package/lib/build/AppShell/AppShell.stories.js.map +1 -1
- package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts +4 -1
- package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts.map +1 -1
- package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.js +18 -2
- package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.js.map +1 -1
- package/lib/build/FlowModeller/FlowModeller.mocks.d.ts +19 -2
- package/lib/build/FlowModeller/FlowModeller.mocks.d.ts.map +1 -1
- package/lib/build/FlowModeller/FlowModeller.mocks.js +58 -6
- package/lib/build/FlowModeller/FlowModeller.mocks.js.map +1 -1
- package/lib/build/FlowModeller/FlowModeller.stories.d.ts +2 -7
- package/lib/build/FlowModeller/FlowModeller.stories.d.ts.map +1 -1
- package/lib/build/FlowModeller/FlowModeller.stories.js +15 -90
- package/lib/build/FlowModeller/FlowModeller.stories.js.map +1 -1
- package/lib/build/FlowModeller/FlowModeller.styles.d.ts +2 -0
- package/lib/build/FlowModeller/FlowModeller.styles.d.ts.map +1 -0
- package/lib/build/FlowModeller/FlowModeller.styles.js +8 -0
- package/lib/build/FlowModeller/FlowModeller.styles.js.map +1 -0
- package/lib/build/ItemLibrary/LibraryPicker.stories.d.ts +2 -5
- package/lib/build/ItemLibrary/LibraryPicker.stories.d.ts.map +1 -1
- package/lib/build/ItemLibrary/LibraryPicker.stories.js.map +1 -1
- package/lib/build/LifeCycle/LifeCycle.stories.d.ts +2 -4
- package/lib/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -1
- package/lib/build/LifeCycle/LifeCycle.stories.js.map +1 -1
- package/lib/build/ObjectSelect/ObjectSelect.mocks.d.ts +40 -0
- package/lib/build/ObjectSelect/ObjectSelect.mocks.d.ts.map +1 -0
- package/lib/build/ObjectSelect/ObjectSelect.mocks.js +272 -0
- package/lib/build/ObjectSelect/ObjectSelect.mocks.js.map +1 -0
- package/lib/build/ObjectSelect/ObjectSelect.stories.d.ts +9 -0
- package/lib/build/ObjectSelect/ObjectSelect.stories.d.ts.map +1 -0
- package/lib/build/ObjectSelect/ObjectSelect.stories.js +123 -0
- package/lib/build/ObjectSelect/ObjectSelect.stories.js.map +1 -0
- package/lib/build/ObjectSelect/ObjectSelect.styles.d.ts +4 -0
- package/lib/build/ObjectSelect/ObjectSelect.styles.d.ts.map +1 -0
- package/lib/build/ObjectSelect/ObjectSelect.styles.js +27 -0
- package/lib/build/ObjectSelect/ObjectSelect.styles.js.map +1 -0
- package/lib/build/PageTemplates/GalleryPage.mocks.d.ts +45 -0
- package/lib/build/PageTemplates/GalleryPage.mocks.d.ts.map +1 -0
- package/lib/build/PageTemplates/GalleryPage.mocks.js +79 -0
- package/lib/build/PageTemplates/GalleryPage.mocks.js.map +1 -0
- package/lib/build/PageTemplates/GalleryPage.stories.d.ts +1 -0
- package/lib/build/PageTemplates/GalleryPage.stories.d.ts.map +1 -1
- package/lib/build/PageTemplates/GalleryPage.stories.js +3 -79
- package/lib/build/PageTemplates/GalleryPage.stories.js.map +1 -1
- package/lib/build/PageTemplates/PageTemplates.mocks.d.ts +11 -0
- package/lib/build/PageTemplates/PageTemplates.mocks.d.ts.map +1 -0
- package/lib/build/PageTemplates/PageTemplates.mocks.js +96 -0
- package/lib/build/PageTemplates/PageTemplates.mocks.js.map +1 -0
- package/lib/build/PageTemplates/PageTemplates.stories.d.ts +1 -0
- package/lib/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/lib/build/PageTemplates/PageTemplates.stories.js +5 -95
- package/lib/build/PageTemplates/PageTemplates.stories.js.map +1 -1
- package/lib/build/Workbench/Workbench.stories.d.ts.map +1 -1
- package/lib/build/Workbench/Workbench.stories.js +3 -14
- package/lib/build/Workbench/Workbench.stories.js.map +1 -1
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.mocks.d.ts +3 -0
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.mocks.d.ts.map +1 -0
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.mocks.js +13 -0
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.mocks.js.map +1 -0
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts +16 -8
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts.map +1 -1
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.js +56 -54
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.js.map +1 -1
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.styles.d.ts +5 -0
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.styles.d.ts.map +1 -0
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.styles.js +15 -0
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.styles.js.map +1 -0
- package/lib/core/AppShell/AppShell.stories.d.ts +1 -0
- package/lib/core/AppShell/AppShell.stories.d.ts.map +1 -1
- package/lib/core/AppShell/AppShell.stories.js +3 -1
- package/lib/core/AppShell/AppShell.stories.js.map +1 -1
- package/lib/core/Button/Button.stories.js +2 -2
- package/lib/core/Button/Button.stories.js.map +1 -1
- package/lib/core/ColorPicker/ColorPicker.stories.d.ts.map +1 -1
- package/lib/core/ColorPicker/ColorPicker.stories.js +2 -10
- package/lib/core/ColorPicker/ColorPicker.stories.js.map +1 -1
- package/lib/core/ColorPicker/ColorPicker.styles.d.ts +4 -0
- package/lib/core/ColorPicker/ColorPicker.styles.d.ts.map +1 -0
- package/lib/core/ColorPicker/ColorPicker.styles.js +11 -0
- package/lib/core/ColorPicker/ColorPicker.styles.js.map +1 -0
- package/lib/core/Configuration/Configuration.mocks.d.ts +7 -0
- package/lib/core/Configuration/Configuration.mocks.d.ts.map +1 -0
- package/lib/core/Configuration/Configuration.mocks.js +6 -0
- package/lib/core/Configuration/Configuration.mocks.js.map +1 -0
- package/lib/core/Configuration/Configuration.stories.d.ts.map +1 -1
- package/lib/core/Configuration/Configuration.stories.js +3 -15
- package/lib/core/Configuration/Configuration.stories.js.map +1 -1
- package/lib/core/Configuration/Configuration.styles.d.ts +6 -0
- package/lib/core/Configuration/Configuration.styles.d.ts.map +1 -0
- package/lib/core/Configuration/Configuration.styles.js +12 -0
- package/lib/core/Configuration/Configuration.styles.js.map +1 -0
- package/lib/core/DateTime/DateTime.stories.d.ts.map +1 -1
- package/lib/core/DateTime/DateTime.stories.js +2 -0
- package/lib/core/DateTime/DateTime.stories.js.map +1 -1
- package/lib/core/FieldGroup/FieldGroup.stories.d.ts +2 -0
- package/lib/core/FieldGroup/FieldGroup.stories.d.ts.map +1 -1
- package/lib/core/FieldGroup/FieldGroup.stories.js +7 -3
- package/lib/core/FieldGroup/FieldGroup.stories.js.map +1 -1
- package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts +4 -0
- package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -1
- package/lib/core/FieldGroup/FieldGroupList.mocks.js +47 -3
- package/lib/core/FieldGroup/FieldGroupList.mocks.js.map +1 -1
- package/lib/core/FieldGroup/FieldGroupList.stories.d.ts +9 -8
- package/lib/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -1
- package/lib/core/FieldGroup/FieldGroupList.stories.js +52 -65
- package/lib/core/FieldGroup/FieldGroupList.stories.js.map +1 -1
- package/lib/core/File/FileDisplay.stories.d.ts.map +1 -1
- package/lib/core/File/FileDisplay.stories.js +17 -29
- package/lib/core/File/FileDisplay.stories.js.map +1 -1
- package/lib/core/HTML/HTML.stories.d.ts +6 -0
- package/lib/core/HTML/HTML.stories.d.ts.map +1 -0
- package/lib/core/HTML/HTML.stories.js +14 -0
- package/lib/core/HTML/HTML.stories.js.map +1 -0
- package/lib/core/Icon/Icon.stories.d.ts.map +1 -1
- package/lib/core/Icon/Icon.stories.js +6 -29
- package/lib/core/Icon/Icon.stories.js.map +1 -1
- package/lib/core/Icon/Icon.styles.d.ts +4 -0
- package/lib/core/Icon/Icon.styles.d.ts.map +1 -0
- package/lib/core/Icon/Icon.styles.js +25 -0
- package/lib/core/Icon/Icon.styles.js.map +1 -0
- package/lib/core/IconPicker/IconPicker.stories.js +1 -1
- package/lib/core/IconPicker/IconPicker.stories.js.map +1 -1
- package/lib/core/Link/Link.stories.d.ts +1 -11
- package/lib/core/Link/Link.stories.d.ts.map +1 -1
- package/lib/core/Link/Link.stories.js.map +1 -1
- package/lib/core/ListToolbar/ListToolbar.mocks.d.ts +9 -0
- package/lib/core/ListToolbar/ListToolbar.mocks.d.ts.map +1 -0
- package/lib/core/ListToolbar/ListToolbar.mocks.js +50 -0
- package/lib/core/ListToolbar/ListToolbar.mocks.js.map +1 -0
- package/lib/core/ListToolbar/ListToolbar.stories.d.ts +7 -0
- package/lib/core/ListToolbar/ListToolbar.stories.d.ts.map +1 -0
- package/lib/core/ListToolbar/ListToolbar.stories.js +79 -0
- package/lib/core/ListToolbar/ListToolbar.stories.js.map +1 -0
- package/lib/core/Number/Number.stories.d.ts.map +1 -1
- package/lib/core/Number/Number.stories.js +2 -0
- package/lib/core/Number/Number.stories.js.map +1 -1
- package/lib/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/lib/core/PageTemplates/PageTemplates.stories.js +1 -11
- package/lib/core/PageTemplates/PageTemplates.stories.js.map +1 -1
- package/lib/core/PageTemplates/PageTemplates.styles.d.ts +1 -0
- package/lib/core/PageTemplates/PageTemplates.styles.d.ts.map +1 -1
- package/lib/core/PageTemplates/PageTemplates.styles.js +9 -0
- package/lib/core/PageTemplates/PageTemplates.styles.js.map +1 -1
- package/lib/core/Tooltip/Tooltip.stories.d.ts +2 -5
- package/lib/core/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/lib/core/Tooltip/Tooltip.stories.js.map +1 -1
- package/lib/core/Tree/Tree.stories.d.ts.map +1 -1
- package/lib/core/Tree/Tree.stories.js +2 -2
- package/lib/core/Tree/Tree.stories.js.map +1 -1
- package/lib/cs/Article/Article.stories.d.ts +2 -10
- package/lib/cs/Article/Article.stories.d.ts.map +1 -1
- package/lib/cs/Article/Article.stories.js.map +1 -1
- package/lib/cs/ArticleList/ArticleList.stories.d.ts +2 -11
- package/lib/cs/ArticleList/ArticleList.stories.d.ts.map +1 -1
- package/lib/cs/ArticleList/ArticleList.stories.js +2 -1
- package/lib/cs/ArticleList/ArticleList.stories.js.map +1 -1
- package/lib/cs/CSCaseView/CSAppShell.stories.d.ts +2 -36
- package/lib/cs/CSCaseView/CSAppShell.stories.d.ts.map +1 -1
- package/lib/cs/CSCaseView/CSAppShell.stories.js +6 -19
- package/lib/cs/CSCaseView/CSAppShell.stories.js.map +1 -1
- package/lib/cs/CSCaseView/CSCaseView.mocks.d.ts +9 -0
- package/lib/cs/CSCaseView/CSCaseView.mocks.d.ts.map +1 -1
- package/lib/cs/CSCaseView/CSCaseView.mocks.js +16 -0
- package/lib/cs/CSCaseView/CSCaseView.mocks.js.map +1 -1
- package/lib/cs/CallControlPanel/CallControlPanel.stories.d.ts +2 -2
- package/lib/cs/CallControlPanel/CallControlPanel.stories.d.ts.map +1 -1
- package/lib/cs/CallControlPanel/CallControlPanel.stories.js +4 -4
- package/lib/cs/CallControlPanel/CallControlPanel.stories.js.map +1 -1
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts +2 -8
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -1
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js +3 -3
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js.map +1 -1
- package/lib/cs/InteractionNotification/InteractionNotification.stories.d.ts +7 -6
- package/lib/cs/InteractionNotification/InteractionNotification.stories.d.ts.map +1 -1
- package/lib/cs/InteractionNotification/InteractionNotification.stories.js +13 -5
- package/lib/cs/InteractionNotification/InteractionNotification.stories.js.map +1 -1
- package/lib/cs/InteractionTimer/InteractionTimer.mocks.d.ts +11 -0
- package/lib/cs/InteractionTimer/InteractionTimer.mocks.d.ts.map +1 -0
- package/lib/cs/InteractionTimer/InteractionTimer.mocks.js +29 -0
- package/lib/cs/InteractionTimer/InteractionTimer.mocks.js.map +1 -0
- package/lib/cs/InteractionTimer/InteractionTimer.stories.d.ts +2 -7
- package/lib/cs/InteractionTimer/InteractionTimer.stories.d.ts.map +1 -1
- package/lib/cs/InteractionTimer/InteractionTimer.stories.js +6 -30
- package/lib/cs/InteractionTimer/InteractionTimer.stories.js.map +1 -1
- package/lib/cs/TaskManager/TaskManager.mocks.d.ts +6 -0
- package/lib/cs/TaskManager/TaskManager.mocks.d.ts.map +1 -1
- package/lib/cs/TaskManager/TaskManager.mocks.js +7 -0
- package/lib/cs/TaskManager/TaskManager.mocks.js.map +1 -1
- package/lib/cs/TaskManager/TaskManager.stories.d.ts +6 -5
- package/lib/cs/TaskManager/TaskManager.stories.d.ts.map +1 -1
- package/lib/cs/TaskManager/TaskManager.stories.js +25 -29
- package/lib/cs/TaskManager/TaskManager.stories.js.map +1 -1
- package/lib/cs/TaskManager/TaskManager.styles.d.ts +3 -0
- package/lib/cs/TaskManager/TaskManager.styles.d.ts.map +1 -0
- package/lib/cs/TaskManager/TaskManager.styles.js +8 -0
- package/lib/cs/TaskManager/TaskManager.styles.js.map +1 -0
- package/lib/dnd/DragDropList/DragDropList.mocks.d.ts +15 -0
- package/lib/dnd/DragDropList/DragDropList.mocks.d.ts.map +1 -0
- package/lib/dnd/DragDropList/DragDropList.mocks.js +32 -0
- package/lib/dnd/DragDropList/DragDropList.mocks.js.map +1 -0
- package/lib/dnd/DragDropList/DragDropList.stories.d.ts +8 -9
- package/lib/dnd/DragDropList/DragDropList.stories.d.ts.map +1 -1
- package/lib/dnd/DragDropList/DragDropList.stories.js +14 -85
- package/lib/dnd/DragDropList/DragDropList.stories.js.map +1 -1
- package/lib/dnd/DragDropList/DragDropList.styles.d.ts +6 -0
- package/lib/dnd/DragDropList/DragDropList.styles.d.ts.map +1 -0
- package/lib/dnd/DragDropList/DragDropList.styles.js +32 -0
- package/lib/dnd/DragDropList/DragDropList.styles.js.map +1 -0
- package/lib/rte/Editor/Editor.mocks.d.ts +6 -0
- package/lib/rte/Editor/Editor.mocks.d.ts.map +1 -0
- package/lib/rte/Editor/Editor.mocks.js +23 -0
- package/lib/rte/Editor/Editor.mocks.js.map +1 -0
- package/lib/rte/Editor/Editor.stories.d.ts.map +1 -1
- package/lib/rte/Editor/Editor.stories.js +2 -22
- package/lib/rte/Editor/Editor.stories.js.map +1 -1
- package/lib/rte/RichTextEditor/RichTextEditor.stories.d.ts +2 -3
- package/lib/rte/RichTextEditor/RichTextEditor.stories.d.ts.map +1 -1
- package/lib/rte/RichTextEditor/RichTextEditor.stories.js.map +1 -1
- package/lib/social/Chat/RepeatingView.mocks.d.ts +14 -0
- package/lib/social/Chat/RepeatingView.mocks.d.ts.map +1 -0
- package/lib/social/Chat/RepeatingView.mocks.js +11 -0
- package/lib/social/Chat/RepeatingView.mocks.js.map +1 -0
- package/lib/social/Chat/RepeatingView.stories.d.ts +6 -17
- package/lib/social/Chat/RepeatingView.stories.d.ts.map +1 -1
- package/lib/social/Chat/RepeatingView.stories.js +16 -46
- package/lib/social/Chat/RepeatingView.stories.js.map +1 -1
- package/lib/social/Chat/RepeatingView.styles.d.ts +2 -0
- package/lib/social/Chat/RepeatingView.styles.d.ts.map +1 -0
- package/lib/social/Chat/RepeatingView.styles.js +22 -0
- package/lib/social/Chat/RepeatingView.styles.js.map +1 -0
- package/lib/social/Email/Email.mocks.d.ts +155 -2
- package/lib/social/Email/Email.mocks.d.ts.map +1 -1
- package/lib/social/Email/Email.mocks.js +361 -0
- package/lib/social/Email/Email.mocks.js.map +1 -1
- package/lib/social/Email/Email.stories.d.ts +14 -14
- package/lib/social/Email/Email.stories.d.ts.map +1 -1
- package/lib/social/Email/Email.stories.js +117 -423
- package/lib/social/Email/Email.stories.js.map +1 -1
- package/lib/social/Email/Email.styles.d.ts +4 -0
- package/lib/social/Email/Email.styles.d.ts.map +1 -0
- package/lib/social/Email/Email.styles.js +14 -0
- package/lib/social/Email/Email.styles.js.map +1 -0
- package/lib/social/Feed/Feed.stories.d.ts.map +1 -1
- package/lib/social/Feed/Feed.stories.js +23 -18
- package/lib/social/Feed/Feed.stories.js.map +1 -1
- package/lib/social/Feed/FeedPost.stories.d.ts.map +1 -1
- package/lib/social/Feed/FeedPost.stories.js +30 -20
- package/lib/social/Feed/FeedPost.stories.js.map +1 -1
- package/lib/social/Feed/FeedReply.stories.d.ts.map +1 -1
- package/lib/social/Feed/FeedReply.stories.js +21 -16
- package/lib/social/Feed/FeedReply.stories.js.map +1 -1
- package/lib/work/CaseView/MobileCaseView.stories.d.ts +2 -7
- package/lib/work/CaseView/MobileCaseView.stories.d.ts.map +1 -1
- package/lib/work/CaseView/MobileCaseView.stories.js.map +1 -1
- package/lib/work/ConfigurableLayout/ConfigurableLayout.mocks.d.ts +45 -0
- package/lib/work/ConfigurableLayout/ConfigurableLayout.mocks.d.ts.map +1 -0
- package/lib/work/ConfigurableLayout/ConfigurableLayout.mocks.js +165 -0
- package/lib/work/ConfigurableLayout/ConfigurableLayout.mocks.js.map +1 -0
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts +2 -6
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts.map +1 -1
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.js +2 -172
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.js.map +1 -1
- package/lib/work/ConfigurableLayout/ConfigurableLayout.styles.d.ts +4 -0
- package/lib/work/ConfigurableLayout/ConfigurableLayout.styles.d.ts.map +1 -0
- package/lib/work/ConfigurableLayout/ConfigurableLayout.styles.js +11 -0
- package/lib/work/ConfigurableLayout/ConfigurableLayout.styles.js.map +1 -0
- package/lib/work/Timeline/Timeline.stories.d.ts +2 -0
- package/lib/work/Timeline/Timeline.stories.d.ts.map +1 -1
- package/lib/work/Timeline/Timeline.stories.js +22 -2
- package/lib/work/Timeline/Timeline.stories.js.map +1 -1
- package/package.json +16 -17
- package/jsx/build/FlowModeller/FlowModeller.mocks.js.map +0 -1
- package/jsx/cs/CSCaseView/CSCaseView.mocks.js.map +0 -1
- package/jsx/social/Email/Email.mocks.js +0 -395
- package/jsx/social/Email/Email.mocks.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageTemplates.stories.jsx","sourceRoot":"","sources":["../../../src/build/PageTemplates/PageTemplates.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EACR,OAAO,EAIP,UAAU,EACV,MAAM,EACN,UAAU,EAEX,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,OAAO,EACL,MAAM,EACN,MAAM,EAEN,WAAW,EACX,YAAY,EACZ,aAAa,EACb,KAAK,EACL,mBAAmB,EACnB,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,QAAQ,EACR,MAAM,EACN,MAAM,EACN,QAAQ,EAER,cAAc,EACd,IAAI,EACJ,OAAO,EAGR,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,cAAc,EAAuB,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAiB,UAAU,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9F,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACd,QAAQ,EACT,MAAM,4BAA4B,CAAC;AAEpC,eAAe;IACb,KAAK,EAAE,qBAAqB;IAC5B,UAAU,EAAE;QACV,MAAM,EAAE,YAAY;KACrB;CACM,CAAC;AAuCV,MAAM,UAAU,GAAG,GAAY,EAAE;IAC/B,MAAM,MAAM,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;IACvD,OAAO;QACL;YACE,GAAG,MAAM;Y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o,\n FormEvent,\n ChangeEvent,\n FocusEvent,\n useReducer,\n useRef,\n useContext,\n MouseEvent\n} from 'react';\nimport { action } from '@storybook/addon-actions';\n\nimport {\n Button,\n Banner,\n StandardTreeProps,\n treeHelpers,\n StandardTree,\n Configuration,\n Modal,\n ModalManagerContext,\n BuildTheme,\n Flex,\n Form,\n Input,\n CheckboxGroup,\n RadioButtonGroup,\n RadioButton,\n Checkbox,\n Select,\n Option,\n TextArea,\n FormControlProps,\n ToasterContext,\n Text,\n Actions,\n StatusProps,\n PageTemplateProps\n} from '@pega/cosmos-react-core';\nimport { RichTextEditor, RichTextEditorState } from '@pega/cosmos-react-rte';\nimport { AppShell, AppShellProps, TabbedPage, OneColumnPage } from '@pega/cosmos-react-build';\n\nimport { FileInputDemo } from '../../core/File/FileInput.stories';\nimport { TableDemo } from '../../core/Table/Table.stories';\nimport { WorkbenchDemo } from '../Workbench/Workbench.stories';\nimport {\n appExplorerMenuList,\n branchesMenuList,\n recordMenuList,\n treeList\n} from '../AppShell/AppShell.mocks';\n\nexport default {\n title: 'Build/PageTemplates',\n parameters: {\n layout: 'fullscreen'\n }\n} as Meta;\n\nexport interface PageTemplatesStoryProps extends PageTemplateProps {\n template:\n | 'one column'\n | 'two column'\n | 'three column'\n | 'four column'\n | 'wide narrow'\n | 'narrow wide'\n | 'wide wide narrow'\n | 'narrow wide wide'\n | 'narrow wide narrow'\n | 'tabbed';\n showBreadcrumbs?: boolean;\n pathData?: string;\n showActions?: boolean;\n showBanners?: boolean;\n subTitle?: string;\n showBranch?: boolean;\n branchName?: string;\n statusVariant?: StatusProps['variant'];\n statusLabel: string;\n showEditButton?: boolean;\n onEdit?: (e: MouseEvent<HTMLButtonElement>) => void;\n}\n\ninterface Field extends FormControlProps {\n help?: string;\n error?: string;\n validator: (this: Field) => boolean;\n}\n\ninterface AppShellStory {\n main: AppShellProps['main'];\n hideNavigation?: boolean;\n}\n\n// Get initial field properties\nconst initFields = (): Field[] => {\n const common = { value: undefined, status: undefined };\n return [\n {\n ...common,\n name: 'name',\n required: true,\n error: 'Please enter first and last name',\n validator() {\n if (!this.value) return false;\n return /^[a-z]+\\s[a-z]+$/i.test(this.value);\n }\n },\n {\n ...common,\n name: 'email',\n required: true,\n error: 'Enter a @pega.com address',\n validator() {\n if (!this.value) return false;\n return /^\\S+@pega\\.com$/.test(this.value);\n }\n },\n {\n ...common,\n name: 'notes',\n required: true,\n help: 'See how fast you can type 20 characters go',\n error: 'You need to tell us more than 20 characters',\n validator() {\n if (!this.value) return false;\n return this.value.length >= 20;\n }\n }\n ];\n};\n\n// Handles setting of state for all fields\nconst fieldReducer = (\n fields: Field[],\n {\n target,\n type\n }:\n | ChangeEvent<HTMLInputElement | HTMLTextAreaElement>\n | FocusEvent<HTMLInputElement | HTMLTextAreaElement>\n) => {\n return fields.map(field => {\n if (field.name === target.name) {\n field.value = target.value;\n if (type === 'blur' || field.status === 'error') {\n if ((field.required || field.value) && !field.validator()) {\n field.status = 'error';\n field.info = field.error;\n } else {\n field.status = undefined;\n field.info = field.help;\n }\n }\n }\n return field;\n });\n};\n\nconst OneColumnForm = () => {\n const editorRef = useRef<RichTextEditorState>(null);\n const [fields, setField] = useReducer(fieldReducer, undefined, initFields);\n const { push } = useContext(ToasterContext);\n\n const name = fields.find(field => field.name === 'name');\n const email = fields.find(field => field.name === 'email');\n const notes = fields.find(field => field.name === 'notes');\n\n if (!name || !email || !notes) return null;\n\n const canSubmit = fields.every(field => field.value && field.validator());\n\n const actions = (\n <>\n <Button\n name='Cancel'\n variant='secondary'\n onClick={() => {\n push({ content: 'Form cancelled!' });\n }}\n >\n Cancel\n </Button>\n <Button name='Submit' type='submit' variant='primary' disabled={!canSubmit}>\n Submit\n </Button>\n </>\n );\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n editorRef.current?.appendImage({ src, alt: image.name }, id);\n };\n\n return (\n <Form\n actions={actions}\n onSubmit={(e: FormEvent) => {\n e.preventDefault();\n push({ content: 'Form submitted!' });\n }}\n style={{ maxWidth: '37.5rem' }}\n >\n <Text variant='h4' as='h4'>\n Demo Form\n </Text>\n <Flex container={{ direction: 'column', gap: 2 }} item={{ grow: 1 }}>\n <Input\n name='name'\n label='Name'\n value={name.value}\n required={name.required}\n status={name.status}\n info='some help text here'\n onChange={(e: ChangeEvent<HTMLInputElement>) => setField({ ...e })}\n onBlur={(e: FocusEvent<HTMLInputElement>) => setField({ ...e })}\n autoComplete='off'\n />\n\n <Input\n name='email'\n value={email.value}\n type='email'\n label='Email'\n required={email.required}\n status={email.status}\n info='some help text here'\n onChange={(e: ChangeEvent<HTMLInputElement>) => setField({ ...e })}\n onBlur={(e: FocusEvent<HTMLInputElement>) => setField({ ...e })}\n autoComplete='off'\n />\n\n <CheckboxGroup name='visited' label='Places you have worked'>\n {['Cambridge', 'Krakow', 'Hyderabad', 'Bangalore'].map(office => (\n <Checkbox\n key={office}\n label={office}\n onChange={(e: ChangeEvent<HTMLInputElement>) => setField({ ...e })}\n />\n ))}\n </CheckboxGroup>\n\n <RadioButtonGroup name='meetings' label='Do you enjoy early morning meetings?'>\n {['Yes', \"No...no I don't\"].map(option => (\n <RadioButton\n key={option}\n label={option}\n onChange={(e: ChangeEvent<HTMLInputElement>) => setField({ ...e })}\n />\n ))}\n </RadioButtonGroup>\n\n <Select label='What would you like to eat?' info='FYI: options are limited'>\n <Option>choose meal...</Option>\n <Option>Pizza</Option>\n <Option>Sandwich</Option>\n <Option>Salad</Option>\n </Select>\n\n <TextArea\n name='notes'\n required={notes.required}\n label='Meeting Notes'\n status={notes.status}\n info={notes.info || notes.help}\n onChange={(e: ChangeEvent<HTMLTextAreaElement>) => setField({ ...e })}\n onBlur={(e: FocusEvent<HTMLInputElement>) => setField({ ...e })}\n />\n <RichTextEditor\n label='Detailed meeting notes'\n info='The rich text editor can be used in forms, comments, and documents'\n toolbar={[\n 'inline-styling',\n 'headers',\n 'tables',\n 'links',\n 'images',\n 'lists',\n 'cut-copy-paste',\n 'indentation'\n ]}\n onImageAdded={onImageAdded}\n ref={editorRef}\n />\n\n <FileInputDemo />\n </Flex>\n </Form>\n );\n};\n\nconst AppShellWithMenuNavigation = (args: AppShellStory) => {\n const [currentNodeId, setCurrentNodeId] = useState<string | undefined>();\n const [allNodes, setAllNodes] = useState<StandardTreeProps['nodes']>(treeList);\n\n const onNodeClick = (id: string) => {\n const clickedNode = treeHelpers.getNode(allNodes, id);\n\n if (!clickedNode?.nodes) {\n setCurrentNodeId(id);\n return;\n }\n\n setAllNodes(tree =>\n treeHelpers.mapNode(tree, id, node => {\n return {\n ...node,\n expanded: !node.expanded\n };\n })\n );\n\n return (\n <StandardTree\n nodes={recordMenuList}\n onNodeClick={onNodeClick}\n currentNodeId={currentNodeId}\n />\n );\n };\n\n const appHeader = {\n brand: {\n name: 'AppStudioX'\n },\n utils: {\n avatar: { name: 'Alan' },\n search: {\n placeholder: 'Search anything, anywhere'\n },\n branchName: 'test',\n actions: [\n {\n primary: 'Switch branch',\n id: 'switchbranch',\n onClick: action('Clicked switchbranch')\n },\n {\n primary: 'Create branch',\n id: 'createbranch',\n onClick: action('Clicked createbranch')\n }\n ]\n },\n links: [\n {\n id: '1',\n name: 'Applications',\n onClick: action('Clicked Applications')\n },\n {\n id: '2',\n name: 'Shared resources',\n onClick: action('Clicked Shared resources')\n },\n {\n id: '3',\n name: 'Teams',\n onClick: () => {}\n },\n {\n id: '4',\n name: 'AI & Analytics',\n onClick: action('Clicked AI & Analytics')\n },\n {\n id: '5',\n name: 'Deploy',\n onClick: action('Clicked Deploy')\n }\n ]\n };\n\n return (\n <Configuration theme={BuildTheme}>\n <AppShell\n main={args.main}\n appHeader={appHeader}\n hideNav={args.hideNavigation}\n appInfo={{\n text: 'xCompass',\n visual: {\n icon: {\n name: 'compass',\n bgColor: '#20AA50'\n }\n }\n }}\n navigation={{\n nodes: allNodes,\n currentNodeId,\n onNodeClick\n }}\n utils={{\n onItemClick: id => {\n if (id === 'explorer') {\n setAllNodes(appExplorerMenuList);\n }\n\n if (id === 'branches') {\n setAllNodes(branchesMenuList);\n }\n\n if (id === 'records') {\n setAllNodes(recordMenuList);\n }\n },\n items: [\n {\n label: 'App Explorer',\n id: 'explorer'\n },\n {\n label: 'Branches',\n id: 'branches'\n },\n {\n label: 'Records',\n id: 'records'\n }\n ],\n drawer: {\n onBeforeClose: () => setAllNodes(treeList)\n }\n }}\n />\n </Configuration>\n );\n};\n\nexport const PageTemplatesDemo: Story<PageTemplatesStoryProps & AppShellStory> = (\n args: PageTemplatesStoryProps & AppShellStory\n) => {\n const [currentTabId, setCurrentTabId] = useState('accounts');\n const [content, setContent] = useState(\n <>\n <TableDemo />\n </>\n );\n const { create } = useContext(ModalManagerContext);\n\n const getPath = () => {\n if (args.showBreadcrumbs) {\n const path = args.pathData;\n\n return path\n ? path.split(',').map((crumb: string, i) => {\n // FIXME: https://stackoverflow.com/questions/63616486/property-replaceall-does-not-exist-on-type-string\n return {\n id: crumb,\n primary: crumb,\n href: i < 3 ? `#${(crumb as any).replace(/\\s/g, '-')}` : undefined\n };\n })\n : [];\n }\n };\n\n const actions: PageTemplateProps['actions'] = args.showActions ? (\n <Flex container>\n <Button variant='primary'>Save</Button>\n <Actions\n menuAt={2}\n items={[\n {\n id: '1',\n text: 'Page action 1'\n },\n {\n id: '2',\n text: 'Page action 2'\n }\n ]}\n />\n </Flex>\n ) : undefined;\n\n const banners: PageTemplateProps['banners'] = args.showBanners ? (\n <Banner\n id='warning-banner'\n variant='warning'\n messages={['This is a warning banner. You have been warned!']}\n />\n ) : undefined;\n\n const mainContent = <OneColumnForm />;\n const modal = () => (\n <Configuration theme={BuildTheme}>\n <Modal heading='This is the Modal heading' autoWidth={false} center stretch={false}>\n <Text>This is the content of the Modal.</Text>\n </Modal>\n </Configuration>\n );\n\n const pageTemplateProps = useMemo(() => {\n const branchName = args.showBranch ? args.branchName : '';\n const status = args.showBranch\n ? {\n type: args.statusVariant,\n label: args.statusLabel\n }\n : undefined;\n\n return {\n title: args.title,\n actions,\n banners,\n path: getPath(),\n branchName,\n status,\n metadata: [\n { id: '1', name: 'ID', value: 'InterestRate' },\n { id: '2', name: 'Rule type', value: 'Field' },\n {\n id: '3',\n name: 'Scope',\n value: 'O1XPTI-CCompass-Work-MortgageRequest'\n },\n { id: '4', name: 'Application', value: 'XCompass' }\n ],\n additionalInfo: {\n title: 'Interest rate',\n description: 'Interest rate for the savings account',\n fields: [\n {\n id: '1',\n name: 'Id',\n value: 'InterestRate'\n },\n {\n id: '2',\n name: 'Rule type',\n value: 'Field'\n },\n {\n id: '3',\n name: 'Scope',\n value: 'O1XPTI-CCompass-Work-MortgageRequest'\n },\n {\n id: '4',\n name: 'Branch',\n value: 'xCompass (Main)'\n },\n {\n id: '5',\n name: 'Application',\n value: 'XCompass'\n }\n ],\n onEdit: args.showEditButton\n ? (e: MouseEvent<HTMLButtonElement>) => {\n args.onEdit?.(e);\n create(modal);\n }\n : undefined\n }\n };\n }, [args]);\n\n let demo;\n\n switch (args.template) {\n case 'one column':\n demo = <OneColumnPage a={mainContent} {...pageTemplateProps} />;\n break;\n case 'tabbed':\n default:\n demo = (\n <TabbedPage\n a={content}\n tabs={{\n tabs: [\n { id: 'accounts', name: 'Accounts' },\n { id: 'form', name: 'Form' },\n { id: 'workbench', name: 'Workbench' }\n ],\n type: 'horizontal',\n currentTabId,\n onTabClick: id => {\n setCurrentTabId(id);\n // eslint-disable-next-line sonarjs/no-nested-switch\n switch (id) {\n case 'form':\n setContent(<OneColumnForm />);\n break;\n case 'accounts':\n setContent(<TableDemo />);\n break;\n case 'workbench':\n setContent(<WorkbenchDemo />);\n break;\n default:\n }\n }\n }}\n {...pageTemplateProps}\n />\n );\n break;\n }\n\n return (\n <AppShellWithMenuNavigation\n main={demo as AppShellProps['main']}\n hideNavigation={args.hideNavigation}\n />\n );\n};\n\nPageTemplatesDemo.args = {\n template: 'tabbed',\n title: 'Interest rate',\n subTitle: 'Uplus-Data-Integrations',\n hideNavigation: false,\n showBreadcrumbs: true,\n pathData: 'Home,xCompass,Fields',\n showActions: true,\n showBanners: false,\n showBranch: true,\n statusVariant: 'pending',\n statusLabel: 'private change',\n branchName: 'xCompass (Main)',\n showEditButton: true,\n onEdit: action('Clicked edit button in popover')\n};\n\nPageTemplatesDemo.argTypes = {\n template: {\n options: ['one column', 'tabbed'],\n control: { type: 'select' }\n },\n subTitle: { control: { type: 'text' } },\n title: { control: { type: 'text' } },\n hideNavigation: { control: { type: 'boolean' } },\n showBreadcrumbs: { control: { type: 'boolean' } },\n pathData: { control: { type: 'text' } },\n showActions: { control: { type: 'boolean' } },\n showBanners: { control: { type: 'boolean' } },\n showBranch: { control: { type: 'boolean' } },\n statusVariant: {\n options: ['success', 'urgent', 'warn', 'pending', 'info'],\n control: { type: 'select' }\n },\n statusLabel: { control: { type: 'text' } },\n branchName: { control: { type: 'text' } },\n showEditButton: { control: { type: 'boolean' } },\n onEdit: { table: { disable: true } }\n};\n"]}
|
|
1
|
+
{"version":3,"file":"PageTemplates.stories.jsx","sourceRoot":"","sources":["../../../src/build/PageTemplates/PageTemplates.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAc,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,OAAO,EACL,MAAM,EACN,MAAM,EAEN,WAAW,EACX,YAAY,EACZ,aAAa,EACb,KAAK,EACL,mBAAmB,EACnB,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,OAAO,EAGR,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAiB,UAAU,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9F,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACd,QAAQ,EACT,MAAM,4BAA4B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AAM,EAAE,EAAE;IACpC,cAAc,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAChD,eAAe,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACjD,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACvC,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC7C,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC7C,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC5C,aAAa,EAAE;QACb,OAAO,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC;QACzD,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC5B;IACD,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC1C,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACzC,cAAc,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAChD,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;CACrC,CAAC","sourcesContent":["// cSpell:words XPTI\nimport { Meta, Story } from '@storybook/react';\nimport { useState, useMemo, useContext, MouseEvent } from 'react';\nimport { action } from '@storybook/addon-actions';\n\nimport {\n Button,\n Banner,\n StandardTreeProps,\n treeHelpers,\n StandardTree,\n Configuration,\n Modal,\n ModalManagerContext,\n BuildTheme,\n Flex,\n Text,\n Actions,\n StatusProps,\n PageTemplateProps\n} from '@pega/cosmos-react-core';\nimport { AppShell, AppShellProps, TabbedPage, OneColumnPage } from '@pega/cosmos-react-build';\n\nimport { TableDemo } from '../../core/Table/Table.stories';\nimport { WorkbenchDemo } from '../Workbench/Workbench.stories';\nimport {\n appExplorerMenuList,\n branchesMenuList,\n recordMenuList,\n treeList\n} from '../AppShell/AppShell.mocks';\n\nimport { OneColumnForm } from './PageTemplates.mocks';\n\nexport default {\n title: 'Build/PageTemplates',\n parameters: {\n layout: 'fullscreen'\n }\n} as Meta;\n\nexport interface PageTemplatesStoryProps extends PageTemplateProps {\n template:\n | 'one column'\n | 'two column'\n | 'three column'\n | 'four column'\n | 'wide narrow'\n | 'narrow wide'\n | 'wide wide narrow'\n | 'narrow wide wide'\n | 'narrow wide narrow'\n | 'tabbed';\n showBreadcrumbs?: boolean;\n pathData?: string;\n showActions?: boolean;\n showBanners?: boolean;\n subTitle?: string;\n showBranch?: boolean;\n branchName?: string;\n statusVariant?: StatusProps['variant'];\n statusLabel: string;\n showEditButton?: boolean;\n onEdit?: (e: MouseEvent<HTMLButtonElement>) => void;\n}\n\ninterface AppShellStory {\n main: AppShellProps['main'];\n hideNavigation?: boolean;\n}\n\nexport const AppShellWithMenuNavigation = (args: AppShellStory) => {\n const [currentNodeId, setCurrentNodeId] = useState<string | undefined>();\n const [allNodes, setAllNodes] = useState<StandardTreeProps['nodes']>(treeList);\n\n const onNodeClick = (id: string) => {\n const clickedNode = treeHelpers.getNode(allNodes, id);\n\n if (!clickedNode?.nodes) {\n setCurrentNodeId(id);\n return;\n }\n\n setAllNodes(tree =>\n treeHelpers.mapNode(tree, id, node => {\n return {\n ...node,\n expanded: !node.expanded\n };\n })\n );\n\n return (\n <StandardTree\n nodes={recordMenuList}\n onNodeClick={onNodeClick}\n currentNodeId={currentNodeId}\n />\n );\n };\n\n const appHeader = {\n brand: {\n name: 'AppStudioX'\n },\n utils: {\n avatar: { name: 'Alan' },\n search: {\n placeholder: 'Search anything, anywhere'\n },\n branchName: 'test',\n actions: [\n {\n primary: 'Switch branch',\n id: 'switchbranch',\n onClick: action('Clicked switchbranch')\n },\n {\n primary: 'Create branch',\n id: 'createbranch',\n onClick: action('Clicked createbranch')\n }\n ]\n },\n links: [\n {\n id: '1',\n name: 'Applications',\n onClick: action('Clicked Applications')\n },\n {\n id: '2',\n name: 'Shared resources',\n onClick: action('Clicked Shared resources')\n },\n {\n id: '3',\n name: 'Teams',\n onClick: () => {}\n },\n {\n id: '4',\n name: 'AI & Analytics',\n onClick: action('Clicked AI & Analytics')\n },\n {\n id: '5',\n name: 'Deploy',\n onClick: action('Clicked Deploy')\n }\n ]\n };\n\n return (\n <Configuration theme={BuildTheme}>\n <AppShell\n main={args.main}\n appHeader={appHeader}\n hideNav={args.hideNavigation}\n appInfo={{\n text: 'xCompass',\n visual: {\n icon: {\n name: 'compass',\n bgColor: '#20AA50'\n }\n }\n }}\n navigation={{\n nodes: allNodes,\n currentNodeId,\n onNodeClick\n }}\n utils={{\n onItemClick: id => {\n if (id === 'explorer') {\n setAllNodes(appExplorerMenuList);\n }\n\n if (id === 'branches') {\n setAllNodes(branchesMenuList);\n }\n\n if (id === 'records') {\n setAllNodes(recordMenuList);\n }\n },\n items: [\n {\n label: 'App Explorer',\n id: 'explorer'\n },\n {\n label: 'Branches',\n id: 'branches'\n },\n {\n label: 'Records',\n id: 'records'\n }\n ],\n drawer: {\n onBeforeClose: () => setAllNodes(treeList)\n }\n }}\n />\n </Configuration>\n );\n};\n\nexport const PageTemplatesDemo: Story<PageTemplatesStoryProps & AppShellStory> = (\n args: PageTemplatesStoryProps & AppShellStory\n) => {\n const [currentTabId, setCurrentTabId] = useState('accounts');\n const [content, setContent] = useState(\n <>\n <TableDemo />\n </>\n );\n const { create } = useContext(ModalManagerContext);\n\n const getPath = () => {\n if (args.showBreadcrumbs) {\n const path = args.pathData;\n\n return path\n ? path.split(',').map((crumb: string, i) => {\n // FIXME: https://stackoverflow.com/questions/63616486/property-replaceall-does-not-exist-on-type-string\n return {\n id: crumb,\n primary: crumb,\n href: i < 3 ? `#${(crumb as any).replace(/\\s/g, '-')}` : undefined\n };\n })\n : [];\n }\n };\n\n const actions: PageTemplateProps['actions'] = args.showActions ? (\n <Flex container>\n <Button variant='primary'>Save</Button>\n <Actions\n menuAt={2}\n items={[\n {\n id: '1',\n text: 'Page action 1'\n },\n {\n id: '2',\n text: 'Page action 2'\n }\n ]}\n />\n </Flex>\n ) : undefined;\n\n const banners: PageTemplateProps['banners'] = args.showBanners ? (\n <Banner\n id='warning-banner'\n variant='warning'\n messages={['This is a warning banner. You have been warned!']}\n />\n ) : undefined;\n\n const mainContent = <OneColumnForm />;\n const modal = () => (\n <Configuration theme={BuildTheme}>\n <Modal heading='This is the Modal heading' autoWidth={false} center stretch={false}>\n <Text>This is the content of the Modal.</Text>\n </Modal>\n </Configuration>\n );\n\n const pageTemplateProps = useMemo(() => {\n const branchName = args.showBranch ? args.branchName : '';\n const status = args.showBranch\n ? {\n type: args.statusVariant,\n label: args.statusLabel\n }\n : undefined;\n\n return {\n title: args.title,\n actions,\n banners,\n path: getPath(),\n branchName,\n status,\n metadata: [\n { id: '1', name: 'ID', value: 'InterestRate' },\n { id: '2', name: 'Rule type', value: 'Field' },\n {\n id: '3',\n name: 'Scope',\n value: 'O1XPTI-CCompass-Work-MortgageRequest'\n },\n { id: '4', name: 'Application', value: 'XCompass' }\n ],\n additionalInfo: {\n title: 'Interest rate',\n description: 'Interest rate for the savings account',\n fields: [\n {\n id: '1',\n name: 'Id',\n value: 'InterestRate'\n },\n {\n id: '2',\n name: 'Rule type',\n value: 'Field'\n },\n {\n id: '3',\n name: 'Scope',\n value: 'O1XPTI-CCompass-Work-MortgageRequest'\n },\n {\n id: '4',\n name: 'Branch',\n value: 'xCompass (Main)'\n },\n {\n id: '5',\n name: 'Application',\n value: 'XCompass'\n }\n ],\n onEdit: args.showEditButton\n ? (e: MouseEvent<HTMLButtonElement>) => {\n args.onEdit?.(e);\n create(modal);\n }\n : undefined\n }\n };\n }, [args]);\n\n let demo;\n\n switch (args.template) {\n case 'one column':\n demo = <OneColumnPage a={mainContent} {...pageTemplateProps} />;\n break;\n case 'tabbed':\n default:\n demo = (\n <TabbedPage\n a={content}\n tabs={{\n tabs: [\n { id: 'accounts', name: 'Accounts' },\n { id: 'form', name: 'Form' },\n { id: 'workbench', name: 'Workbench' }\n ],\n type: 'horizontal',\n currentTabId,\n onTabClick: id => {\n setCurrentTabId(id);\n // eslint-disable-next-line sonarjs/no-nested-switch\n switch (id) {\n case 'form':\n setContent(<OneColumnForm />);\n break;\n case 'accounts':\n setContent(<TableDemo />);\n break;\n case 'workbench':\n setContent(<WorkbenchDemo />);\n break;\n default:\n }\n }\n }}\n {...pageTemplateProps}\n />\n );\n break;\n }\n\n return (\n <AppShellWithMenuNavigation\n main={demo as AppShellProps['main']}\n hideNavigation={args.hideNavigation}\n />\n );\n};\n\nPageTemplatesDemo.args = {\n template: 'tabbed',\n title: 'Interest rate',\n subTitle: 'Uplus-Data-Integrations',\n hideNavigation: false,\n showBreadcrumbs: true,\n pathData: 'Home,xCompass,Fields',\n showActions: true,\n showBanners: false,\n showBranch: true,\n statusVariant: 'pending',\n statusLabel: 'private change',\n branchName: 'xCompass (Main)',\n showEditButton: true,\n // eslint-disable-next-line demo-patterns/literal-args\n onEdit: action('Clicked edit button in popover')\n};\n\nPageTemplatesDemo.argTypes = {\n template: {\n options: ['one column', 'tabbed'],\n control: { type: 'select' }\n },\n subTitle: { control: { type: 'text' } },\n title: { control: { type: 'text' } },\n hideNavigation: { control: { type: 'boolean' } },\n showBreadcrumbs: { control: { type: 'boolean' } },\n pathData: { control: { type: 'text' } },\n showActions: { control: { type: 'boolean' } },\n showBanners: { control: { type: 'boolean' } },\n showBranch: { control: { type: 'boolean' } },\n statusVariant: {\n options: ['success', 'urgent', 'warn', 'pending', 'info'],\n control: { type: 'select' }\n },\n statusLabel: { control: { type: 'text' } },\n branchName: { control: { type: 'text' } },\n showEditButton: { control: { type: 'boolean' } },\n onEdit: { table: { disable: true } }\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Workbench.stories.d.ts","sourceRoot":"","sources":["../../../src/build/Workbench/Workbench.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;;
|
|
1
|
+
{"version":3,"file":"Workbench.stories.d.ts","sourceRoot":"","sources":["../../../src/build/Workbench/Workbench.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;;AAqC/C,wBAYU;AAEV,MAAM,WAAW,mBAAmB;IAClC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,mBAAmB,CA+HpD,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
|
-
import
|
|
3
|
-
import { treeHelpers, StandardTree, Flex, SearchInput, TextArea, defaultThemeProp, Input, Configuration, BuildTheme } from '@pega/cosmos-react-core';
|
|
2
|
+
import { treeHelpers, StandardTree, Flex, SearchInput, TextArea, Input, Configuration, BuildTheme } from '@pega/cosmos-react-core';
|
|
4
3
|
import { FlowModeller, Workbench } from '@pega/cosmos-react-build';
|
|
5
4
|
import { DirectedGraph } from '@pega/cosmos-react-build/lib/components/FlowModeller/Renderer/Utils/Graph';
|
|
6
5
|
import FlowModellerHelper from '@pega/cosmos-react-build/lib/components/FlowModeller/helper';
|
|
@@ -17,13 +16,6 @@ export default {
|
|
|
17
16
|
</div>)
|
|
18
17
|
]
|
|
19
18
|
};
|
|
20
|
-
const StyledSearch = styled.div(({ theme }) => {
|
|
21
|
-
return css `
|
|
22
|
-
margin: 0 calc(2 * ${theme.base.spacing}) calc(2 * ${theme.base.spacing})
|
|
23
|
-
calc(2 * ${theme.base.spacing});
|
|
24
|
-
`;
|
|
25
|
-
});
|
|
26
|
-
StyledSearch.defaultProps = defaultThemeProp;
|
|
27
19
|
export const WorkbenchDemo = (args) => {
|
|
28
20
|
const [open, setOpen] = useState(false);
|
|
29
21
|
const [heading, setHeading] = useState('');
|
|
@@ -95,7 +87,6 @@ export const WorkbenchDemo = (args) => {
|
|
|
95
87
|
};
|
|
96
88
|
return (<Configuration theme={BuildTheme}>
|
|
97
89
|
<Workbench utilityPanels={utilityPanels} initiallyVisiblePanelId={utilityPanels[0].id} toolbar={{
|
|
98
|
-
zoom: args.zoom,
|
|
99
90
|
toolbarActions: args.showActions ? toolbarActions : undefined
|
|
100
91
|
}} configurationPanel={{
|
|
101
92
|
open,
|
|
@@ -111,12 +102,10 @@ export const WorkbenchDemo = (args) => {
|
|
|
111
102
|
};
|
|
112
103
|
WorkbenchDemo.args = {
|
|
113
104
|
showActions: true,
|
|
114
|
-
hideSidePanel: false
|
|
115
|
-
zoom: true
|
|
105
|
+
hideSidePanel: false
|
|
116
106
|
};
|
|
117
107
|
WorkbenchDemo.argTypes = {
|
|
118
108
|
showActions: { control: { type: 'boolean' } },
|
|
119
|
-
hideSidePanel: { control: { type: 'boolean' } }
|
|
120
|
-
zoom: { control: { type: 'boolean' } }
|
|
109
|
+
hideSidePanel: { control: { type: 'boolean' } }
|
|
121
110
|
};
|
|
122
111
|
//# sourceMappingURL=Workbench.stories.jsx.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Workbench.stories.jsx","sourceRoot":"","sources":["../../../src/build/Workbench/Workbench.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAEL,WAAW,EACX,YAAY,EACZ,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,gBAAgB,EAChB,KAAK,EACL,aAAa,EACb,UAAU,EACX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,YAAY,EAA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AG,EAAE;gBACd,OAAO,CAAC,KAAK,CAAC,CAAC;YACjB,CAAC;SACF,CAAC,CAEF;QAAA,CAAC,aAAa,CAAC,AAAD,EAChB;MAAA,EAAE,SAAS,CACb;IAAA,EAAE,aAAa,CAAC,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,aAAa,CAAC,IAAI,GAAG;IACnB,WAAW,EAAE,IAAI;IACjB,aAAa,EAAE,KAAK;IACpB,IAAI,EAAE,IAAI;CACX,CAAC;AAEF,aAAa,CAAC,QAAQ,GAAG;IACvB,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC7C,aAAa,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC/C,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;CACvC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n StandardTreeProps,\n treeHelpers,\n StandardTree,\n Flex,\n SearchInput,\n TextArea,\n defaultThemeProp,\n Input,\n Configuration,\n BuildTheme\n} from '@pega/cosmos-react-core';\nimport { FlowModeller, Workbench } from '@pega/cosmos-react-build';\nimport { IconNames } from '@pega/cosmos-react-core/lib/components/Icon/iconNames';\nimport {\n NodeProps,\n NodeType\n} from '@pega/cosmos-react-build/lib/components/FlowModeller/Node/Node.types';\nimport {\n DirectedGraph,\n GraphData,\n ConnectorProps\n} from '@pega/cosmos-react-build/lib/components/FlowModeller/Renderer/Utils/Graph';\nimport FlowModellerHelper from '@pega/cosmos-react-build/lib/components/FlowModeller/helper';\nimport { AddNodeHandlerParams } from '@pega/cosmos-react-build/lib/components/FlowModeller/Renderer/Renderer.types';\n\nimport {\n nodeLibrary,\n nodeActions,\n exampleCRMNodesData as nodesData,\n exampleCRMConnectorsData as connectorsData\n} from '../FlowModeller/FlowModeller.mocks';\n\nimport { sideList } from './Workbench.mocks';\n\nexport default {\n title: 'Build/Workbench',\n parameters: {\n layout: 'fullscreen'\n },\n decorators: [\n StoryComp => (\n <div style={{ height: '100vh' }}>\n <StoryComp />\n </div>\n )\n ]\n} as Meta;\n\nexport interface WorkbenchStoryProps {\n showActions?: boolean;\n hideSidePanel?: boolean;\n zoom?: boolean;\n}\n\nconst StyledSearch = styled.div(({ theme }) => {\n return css`\n margin: 0 calc(2 * ${theme.base.spacing}) calc(2 * ${theme.base.spacing})\n calc(2 * ${theme.base.spacing});\n `;\n});\n\nStyledSearch.defaultProps = defaultThemeProp;\n\nexport const WorkbenchDemo: Story<WorkbenchStoryProps> = (args: WorkbenchStoryProps) => {\n const [open, setOpen] = useState(false);\n const [heading, setHeading] = useState('');\n const [description, setDescription] = useState('');\n const Content = () => {\n const [currentNodeId, setCurrentNodeId] = useState<string | undefined>();\n const [allNodes, setAllNodes] = useState<StandardTreeProps['nodes']>(sideList);\n\n return (\n <>\n <SearchInput />\n <StandardTree\n currentNodeId={currentNodeId}\n nodes={allNodes}\n onNodeClick={id => {\n const clickedNode = treeHelpers.getNode(allNodes, id);\n setCurrentNodeId(id);\n // If a leaf node, just set to current\n if (!clickedNode?.nodes) return;\n\n setAllNodes(tree =>\n treeHelpers.mapNode(tree, id, node => {\n return {\n ...node,\n expanded: !node.expanded\n };\n })\n );\n }}\n />\n </>\n );\n };\n\n const ConfigContent = () => {\n return (\n <Flex container={{ direction: 'column', gap: 2 }}>\n <Input defaultValue={heading} />\n <TextArea\n name='Description'\n required\n label='Description'\n displayCharCount\n maxLength={300}\n value={description}\n />\n </Flex>\n );\n };\n\n const FlowChartView = () => {\n const [graphData, setGraphData] = useState<GraphData<NodeProps, ConnectorProps>>({\n nodes: nodesData,\n connectors: connectorsData\n });\n\n const launchPropertyModal = (node: NodeProps) => {\n setHeading(node.label);\n setDescription(node.description || '');\n setOpen(true);\n };\n\n const addNode = (nodeType: NodeType, metaData: AddNodeHandlerParams) => {\n const UpdatedData = FlowModellerHelper.addNode({\n nodeType,\n graphData,\n metaData\n });\n if (UpdatedData) {\n const newGraphData: GraphData<NodeProps, ConnectorProps> = UpdatedData;\n setGraphData(newGraphData);\n }\n };\n\n const selectNode = (nodeId: NodeProps['id']) => {\n const graph = new DirectedGraph(graphData);\n const node = graph.getNode(nodeId);\n launchPropertyModal(node);\n };\n\n return (\n <FlowModeller\n graphData={graphData}\n nodeLibrary={nodeLibrary}\n onNodeAdd={addNode}\n onNodeClick={selectNode}\n actions={nodeActions}\n />\n );\n };\n\n const ExplorerContent = () => {\n return <SearchInput />;\n };\n\n const utilityPanels = [\n { title: 'Steps', id: '1', icon: 'plus' as IconNames, content: <Content /> },\n { title: 'Explorer', id: '2', icon: 'app' as IconNames, content: <ExplorerContent /> },\n { title: 'Views', id: '3', icon: 'headline' as IconNames, content: <Content /> }\n ];\n\n const toolbarActions = {\n undo: { id: 'undo', disabled: false, onClick: () => {} },\n redo: { id: 'redo', disabled: true, onClick: () => {} }\n };\n\n return (\n <Configuration theme={BuildTheme}>\n <Workbench\n utilityPanels={utilityPanels}\n initiallyVisiblePanelId={utilityPanels[0].id}\n toolbar={{\n zoom: args.zoom,\n toolbarActions: args.showActions ? toolbarActions : undefined\n }}\n configurationPanel={{\n open,\n content: <ConfigContent />,\n header: heading,\n onDismiss: () => {\n setOpen(false);\n }\n }}\n >\n <FlowChartView />\n </Workbench>\n </Configuration>\n );\n};\n\nWorkbenchDemo.args = {\n showActions: true,\n hideSidePanel: false,\n zoom: true\n};\n\nWorkbenchDemo.argTypes = {\n showActions: { control: { type: 'boolean' } },\n hideSidePanel: { control: { type: 'boolean' } },\n zoom: { control: { type: 'boolean' } }\n};\n"]}
|
|
1
|
+
{"version":3,"file":"Workbench.stories.jsx","sourceRoot":"","sources":["../../../src/build/Workbench/Workbench.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAEL,WAAW,EACX,YAAY,EACZ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ACnB,WAAW,EAAE,IAAI;IACjB,aAAa,EAAE,KAAK;CACrB,CAAC;AAEF,aAAa,CAAC,QAAQ,GAAG;IACvB,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC7C,aAAa,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;CAChD,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useState } from 'react';\n\nimport {\n StandardTreeProps,\n treeHelpers,\n StandardTree,\n Flex,\n SearchInput,\n TextArea,\n Input,\n Configuration,\n BuildTheme\n} from '@pega/cosmos-react-core';\nimport { FlowModeller, Workbench } from '@pega/cosmos-react-build';\nimport { IconNames } from '@pega/cosmos-react-core/lib/components/Icon/iconNames';\nimport {\n NodeProps,\n NodeType\n} from '@pega/cosmos-react-build/lib/components/FlowModeller/Node/Node.types';\nimport {\n DirectedGraph,\n GraphData,\n ConnectorProps\n} from '@pega/cosmos-react-build/lib/components/FlowModeller/Renderer/Utils/Graph';\nimport FlowModellerHelper from '@pega/cosmos-react-build/lib/components/FlowModeller/helper';\nimport { AddNodeHandlerParams } from '@pega/cosmos-react-build/lib/components/FlowModeller/Renderer/Renderer.types';\n\nimport {\n nodeLibrary,\n nodeActions,\n exampleCRMNodesData as nodesData,\n exampleCRMConnectorsData as connectorsData\n} from '../FlowModeller/FlowModeller.mocks';\n\nimport { sideList } from './Workbench.mocks';\n\nexport default {\n title: 'Build/Workbench',\n parameters: {\n layout: 'fullscreen'\n },\n decorators: [\n StoryComp => (\n <div style={{ height: '100vh' }}>\n <StoryComp />\n </div>\n )\n ]\n} as Meta;\n\nexport interface WorkbenchStoryProps {\n showActions?: boolean;\n hideSidePanel?: boolean;\n zoom?: boolean;\n}\n\nexport const WorkbenchDemo: Story<WorkbenchStoryProps> = (args: WorkbenchStoryProps) => {\n const [open, setOpen] = useState(false);\n const [heading, setHeading] = useState('');\n const [description, setDescription] = useState('');\n const Content = () => {\n const [currentNodeId, setCurrentNodeId] = useState<string | undefined>();\n const [allNodes, setAllNodes] = useState<StandardTreeProps['nodes']>(sideList);\n\n return (\n <>\n <SearchInput />\n <StandardTree\n currentNodeId={currentNodeId}\n nodes={allNodes}\n onNodeClick={id => {\n const clickedNode = treeHelpers.getNode(allNodes, id);\n setCurrentNodeId(id);\n // If a leaf node, just set to current\n if (!clickedNode?.nodes) return;\n\n setAllNodes(tree =>\n treeHelpers.mapNode(tree, id, node => {\n return {\n ...node,\n expanded: !node.expanded\n };\n })\n );\n }}\n />\n </>\n );\n };\n\n const ConfigContent = () => {\n return (\n <Flex container={{ direction: 'column', gap: 2 }}>\n <Input defaultValue={heading} />\n <TextArea\n name='Description'\n required\n label='Description'\n displayCharCount\n maxLength={300}\n value={description}\n />\n </Flex>\n );\n };\n\n const FlowChartView = () => {\n const [graphData, setGraphData] = useState<GraphData<NodeProps, ConnectorProps>>({\n nodes: nodesData,\n connectors: connectorsData\n });\n\n const launchPropertyModal = (node: NodeProps) => {\n setHeading(node.label);\n setDescription(node.description || '');\n setOpen(true);\n };\n\n const addNode = (nodeType: NodeType, metaData: AddNodeHandlerParams) => {\n const UpdatedData = FlowModellerHelper.addNode({\n nodeType,\n graphData,\n metaData\n });\n if (UpdatedData) {\n const newGraphData: GraphData<NodeProps, ConnectorProps> = UpdatedData;\n setGraphData(newGraphData);\n }\n };\n\n const selectNode = (nodeId: NodeProps['id']) => {\n const graph = new DirectedGraph(graphData);\n const node = graph.getNode(nodeId);\n launchPropertyModal(node);\n };\n\n return (\n <FlowModeller\n graphData={graphData}\n nodeLibrary={nodeLibrary}\n onNodeAdd={addNode}\n onNodeClick={selectNode}\n actions={nodeActions}\n />\n );\n };\n\n const ExplorerContent = () => {\n return <SearchInput />;\n };\n\n const utilityPanels = [\n { title: 'Steps', id: '1', icon: 'plus' as IconNames, content: <Content /> },\n { title: 'Explorer', id: '2', icon: 'app' as IconNames, content: <ExplorerContent /> },\n { title: 'Views', id: '3', icon: 'headline' as IconNames, content: <Content /> }\n ];\n\n const toolbarActions = {\n undo: { id: 'undo', disabled: false, onClick: () => {} },\n redo: { id: 'redo', disabled: true, onClick: () => {} }\n };\n\n return (\n <Configuration theme={BuildTheme}>\n <Workbench\n utilityPanels={utilityPanels}\n initiallyVisiblePanelId={utilityPanels[0].id}\n toolbar={{\n toolbarActions: args.showActions ? toolbarActions : undefined\n }}\n configurationPanel={{\n open,\n content: <ConfigContent />,\n header: heading,\n onDismiss: () => {\n setOpen(false);\n }\n }}\n >\n <FlowChartView />\n </Workbench>\n </Configuration>\n );\n};\n\nWorkbenchDemo.args = {\n showActions: true,\n hideSidePanel: false\n};\n\nWorkbenchDemo.argTypes = {\n showActions: { control: { type: 'boolean' } },\n hideSidePanel: { control: { type: 'boolean' } }\n};\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DateFunctionsByType, RHSType } from '@pega/cosmos-react-condition-builder';
|
|
2
|
+
export declare const convertRhsTypes: (useLiteralRHSType: boolean, useFieldRHSType: boolean, useRelativeDatesType: boolean, dateFunctions?: DateFunctionsByType | undefined) => Set<RHSType>;
|
|
3
|
+
//# sourceMappingURL=ConditionBuilder.mocks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConditionBuilder.mocks.d.ts","sourceRoot":"","sources":["../../../src/condition-builder/ConditionBuilder/ConditionBuilder.mocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAEpF,eAAO,MAAM,eAAe,sBACP,OAAO,mBACT,OAAO,wBACF,OAAO,kEAS9B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const convertRhsTypes = (useLiteralRHSType, useFieldRHSType, useRelativeDatesType, dateFunctions) => {
|
|
2
|
+
const setRhsTypes = new Set();
|
|
3
|
+
if (useLiteralRHSType)
|
|
4
|
+
setRhsTypes.add('LITERAL');
|
|
5
|
+
if (useFieldRHSType)
|
|
6
|
+
setRhsTypes.add('FIELD');
|
|
7
|
+
if (dateFunctions)
|
|
8
|
+
setRhsTypes.add('DATE_FUNCTION');
|
|
9
|
+
if (useRelativeDatesType)
|
|
10
|
+
setRhsTypes.add('RELATIVE_DATE');
|
|
11
|
+
return setRhsTypes;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=ConditionBuilder.mocks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConditionBuilder.mocks.js","sourceRoot":"","sources":["../../../src/condition-builder/ConditionBuilder/ConditionBuilder.mocks.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,iBAA0B,EAC1B,eAAwB,EACxB,oBAA6B,EAC7B,aAAmC,EACnC,EAAE;IACF,MAAM,WAAW,GAAiB,IAAI,GAAG,EAAW,CAAC;IACrD,IAAI,iBAAiB;QAAE,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAClD,IAAI,eAAe;QAAE,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC9C,IAAI,aAAa;QAAE,WAAW,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IACpD,IAAI,oBAAoB;QAAE,WAAW,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IAC3D,OAAO,WAAW,CAAC;AACrB,CAAC,CAAC","sourcesContent":["import { DateFunctionsByType, RHSType } from '@pega/cosmos-react-condition-builder';\n\nexport const convertRhsTypes = (\n useLiteralRHSType: boolean,\n useFieldRHSType: boolean,\n useRelativeDatesType: boolean,\n dateFunctions?: DateFunctionsByType\n) => {\n const setRhsTypes: Set<RHSType> = new Set<RHSType>();\n if (useLiteralRHSType) setRhsTypes.add('LITERAL');\n if (useFieldRHSType) setRhsTypes.add('FIELD');\n if (dateFunctions) setRhsTypes.add('DATE_FUNCTION');\n if (useRelativeDatesType) setRhsTypes.add('RELATIVE_DATE');\n return setRhsTypes;\n};\n"]}
|
|
@@ -1,10 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
declare const _default:
|
|
3
|
-
title: string;
|
|
4
|
-
component: import("react").FunctionComponent<import("@pega/cosmos-react-condition-builder").ConditionBuilderProps & import("@pega/cosmos-react-core").ForwardProps>;
|
|
5
|
-
};
|
|
1
|
+
import { Meta, Story } from '@storybook/react';
|
|
2
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
6
3
|
export default _default;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
interface ConditionBuilderStoryProps {
|
|
5
|
+
validComparators?: boolean;
|
|
6
|
+
disallowNOT?: boolean;
|
|
7
|
+
renderInPopover?: boolean;
|
|
8
|
+
dateFunctions?: boolean;
|
|
9
|
+
itemDirection?: 'column' | 'row';
|
|
10
|
+
useLiteralRHSType?: boolean;
|
|
11
|
+
useFieldRHSType?: boolean;
|
|
12
|
+
useRelativeDatesRHSType?: boolean;
|
|
13
|
+
showLhsAsLabel?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const DefaultBuilder: Story<ConditionBuilderStoryProps>;
|
|
16
|
+
export declare const FieldConditionDemo: Story<ConditionBuilderStoryProps>;
|
|
17
|
+
export declare const AtomicConditionDemo: Story<ConditionBuilderStoryProps>;
|
|
10
18
|
//# sourceMappingURL=ConditionBuilder.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConditionBuilder.stories.d.ts","sourceRoot":"","sources":["../../../src/condition-builder/ConditionBuilder/ConditionBuilder.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ConditionBuilder.stories.d.ts","sourceRoot":"","sources":["../../../src/condition-builder/ConditionBuilder/ConditionBuilder.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;;AA6B/C,wBAGU;AAEV,UAAU,0BAA0B;IAClC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IACjC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,0BAA0B,CA8F5D,CAAC;AAgBF,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,0BAA0B,CAkFhE,CAAC;AAcF,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,0BAA0B,CAyJjE,CAAC"}
|
|
@@ -1,26 +1,14 @@
|
|
|
1
1
|
import { useRef, useState } from 'react';
|
|
2
|
-
import
|
|
3
|
-
import { boolean, select } from '@storybook/addon-knobs';
|
|
4
|
-
import { Card, CardContent, Text, Grid, Button, defaultThemeProp, Popover, useElement, useOuterEvent, Flex, useI18n } from '@pega/cosmos-react-core';
|
|
2
|
+
import { Card, CardContent, Text, Button, Popover, useElement, useOuterEvent, Flex, useI18n } from '@pega/cosmos-react-core';
|
|
5
3
|
import { ConditionBuilder, FieldCondition, AtomicCondition, getInitConditionForLhs, isValidCondition, formatCondition } from '@pega/cosmos-react-condition-builder';
|
|
6
4
|
import { demoFields, demoCondition, demoComparators, demoDateFunctions } from './props.mock';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
`;
|
|
10
|
-
const StyledCodeBlock = styled.pre `
|
|
11
|
-
padding: ${props => props.theme.base.spacing};
|
|
12
|
-
margin-bottom: ${props => props.theme.base.spacing};
|
|
13
|
-
`;
|
|
14
|
-
StyledCodeBlock.defaultProps = defaultThemeProp;
|
|
15
|
-
const StyledList = styled.ul `
|
|
16
|
-
padding-left: calc(4 * ${props => props.theme.base.spacing});
|
|
17
|
-
`;
|
|
18
|
-
StyledList.defaultProps = defaultThemeProp;
|
|
5
|
+
import { StyledCodeBlock, StyledGrid, StyledList } from './ConditionBuilder.styles';
|
|
6
|
+
import { convertRhsTypes } from './ConditionBuilder.mocks';
|
|
19
7
|
export default {
|
|
20
8
|
title: 'Condition Builder/ConditionBuilder',
|
|
21
9
|
component: ConditionBuilder
|
|
22
10
|
};
|
|
23
|
-
export const DefaultBuilder = () => {
|
|
11
|
+
export const DefaultBuilder = (args) => {
|
|
24
12
|
const translate = useI18n();
|
|
25
13
|
const [condition, setCondition] = useState(() => {
|
|
26
14
|
const prevCondition = sessionStorage.getItem('CBDemoCondition');
|
|
@@ -32,10 +20,6 @@ export const DefaultBuilder = () => {
|
|
|
32
20
|
}
|
|
33
21
|
return demoCondition;
|
|
34
22
|
});
|
|
35
|
-
const validComparators = boolean('Limit Comparators', false) ? demoComparators : undefined;
|
|
36
|
-
const disallowNOT = boolean('Disallow NOT operator', false);
|
|
37
|
-
const renderInPopover = boolean('Render inside Popover', false);
|
|
38
|
-
const dateFunctions = boolean('Enable Date functions', true) ? demoDateFunctions : undefined;
|
|
39
23
|
const buttonRef = useRef(null);
|
|
40
24
|
const [isOpen, setIsOpen] = useState(false);
|
|
41
25
|
const [popoverEl, setPopoverEl] = useElement(null);
|
|
@@ -49,7 +33,7 @@ export const DefaultBuilder = () => {
|
|
|
49
33
|
if (e.key === 'Escape')
|
|
50
34
|
hidePopover();
|
|
51
35
|
};
|
|
52
|
-
const builderJsx = (<ConditionBuilder fields={demoFields} condition={condition} validComparators={validComparators} validRhsTypes={new Set(['LITERAL', 'FIELD', 'DATE_FUNCTION', 'RELATIVE_DATE'])} dateFunctions={dateFunctions} disallowNOT={disallowNOT} onConditionSubmit={(c) => {
|
|
36
|
+
const builderJsx = (<ConditionBuilder fields={demoFields} condition={condition} validComparators={args.validComparators ? demoComparators : undefined} validRhsTypes={new Set(['LITERAL', 'FIELD', 'DATE_FUNCTION', 'RELATIVE_DATE'])} dateFunctions={args.dateFunctions ? demoDateFunctions : undefined} disallowNOT={args.disallowNOT} onConditionSubmit={(c) => {
|
|
53
37
|
setCondition(c);
|
|
54
38
|
hidePopover();
|
|
55
39
|
sessionStorage.setItem('CBDemoCondition', JSON.stringify(c));
|
|
@@ -58,9 +42,9 @@ export const DefaultBuilder = () => {
|
|
|
58
42
|
cols: '1fr',
|
|
59
43
|
rowGap: 3
|
|
60
44
|
}}>
|
|
61
|
-
{!renderInPopover && builderJsx}
|
|
45
|
+
{!args.renderInPopover && builderJsx}
|
|
62
46
|
|
|
63
|
-
{renderInPopover && (<>
|
|
47
|
+
{args.renderInPopover && (<>
|
|
64
48
|
<Button ref={buttonRef} aria-haspopup aria-expanded={isOpen} onClick={() => setIsOpen(!isOpen)} onKeyDown={hideOnEscape}>
|
|
65
49
|
Open Condition builder
|
|
66
50
|
</Button>
|
|
@@ -85,12 +69,21 @@ export const DefaultBuilder = () => {
|
|
|
85
69
|
</div>
|
|
86
70
|
</StyledGrid>);
|
|
87
71
|
};
|
|
88
|
-
|
|
72
|
+
DefaultBuilder.args = {
|
|
73
|
+
validComparators: false,
|
|
74
|
+
disallowNOT: false,
|
|
75
|
+
renderInPopover: false,
|
|
76
|
+
dateFunctions: true
|
|
77
|
+
};
|
|
78
|
+
DefaultBuilder.argTypes = {
|
|
79
|
+
validComparators: { control: { type: 'boolean' } },
|
|
80
|
+
disallowNOT: { control: { type: 'boolean' } },
|
|
81
|
+
renderInPopover: { control: { type: 'boolean' } },
|
|
82
|
+
dateFunctions: { control: { type: 'boolean' } }
|
|
83
|
+
};
|
|
84
|
+
export const FieldConditionDemo = (args) => {
|
|
89
85
|
const translate = useI18n();
|
|
90
86
|
const [condition, setCondition] = useState(undefined);
|
|
91
|
-
const validComparators = boolean('Limit Comparators', false) ? demoComparators : undefined;
|
|
92
|
-
const renderInPopover = boolean('Render inside Popover', false);
|
|
93
|
-
const dateFunctions = boolean('Enable Date functions', true) ? demoDateFunctions : undefined;
|
|
94
87
|
const buttonRef = useRef(null);
|
|
95
88
|
const [isOpen, setIsOpen] = useState(false);
|
|
96
89
|
const [popoverEl, setPopoverEl] = useElement(null);
|
|
@@ -104,7 +97,7 @@ export const FieldConditionDemo = () => {
|
|
|
104
97
|
if (e.key === 'Escape')
|
|
105
98
|
hidePopover();
|
|
106
99
|
};
|
|
107
|
-
const builderJsx = (<FieldCondition targetField='lastActivityAt' fields={demoFields} condition={condition} validComparators={validComparators} validRhsTypes={new Set(['LITERAL', 'FIELD', 'DATE_FUNCTION', 'RELATIVE_DATE'])} dateFunctions={dateFunctions} onSubmit={c => {
|
|
100
|
+
const builderJsx = (<FieldCondition targetField='lastActivityAt' fields={demoFields} condition={condition} validComparators={args.validComparators ? demoComparators : undefined} validRhsTypes={new Set(['LITERAL', 'FIELD', 'DATE_FUNCTION', 'RELATIVE_DATE'])} dateFunctions={args.dateFunctions ? demoDateFunctions : undefined} onSubmit={c => {
|
|
108
101
|
hidePopover();
|
|
109
102
|
setCondition(c);
|
|
110
103
|
}}/>);
|
|
@@ -114,9 +107,9 @@ export const FieldConditionDemo = () => {
|
|
|
114
107
|
alignItems: 'start',
|
|
115
108
|
colGap: 4
|
|
116
109
|
}}>
|
|
117
|
-
{!renderInPopover && builderJsx}
|
|
110
|
+
{!args.renderInPopover && builderJsx}
|
|
118
111
|
|
|
119
|
-
{renderInPopover && (<>
|
|
112
|
+
{args.renderInPopover && (<>
|
|
120
113
|
<Button ref={buttonRef} aria-haspopup aria-expanded={isOpen} onClick={() => setIsOpen(!isOpen)} onKeyDown={hideOnEscape}>
|
|
121
114
|
Open Condition builder
|
|
122
115
|
</Button>
|
|
@@ -139,29 +132,19 @@ export const FieldConditionDemo = () => {
|
|
|
139
132
|
</div>
|
|
140
133
|
</StyledGrid>);
|
|
141
134
|
};
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
setRhsTypes.add('RELATIVE_DATE');
|
|
152
|
-
return setRhsTypes;
|
|
135
|
+
FieldConditionDemo.args = {
|
|
136
|
+
validComparators: false,
|
|
137
|
+
renderInPopover: false,
|
|
138
|
+
dateFunctions: true
|
|
139
|
+
};
|
|
140
|
+
FieldConditionDemo.argTypes = {
|
|
141
|
+
validComparators: { control: { type: 'boolean' } },
|
|
142
|
+
renderInPopover: { control: { type: 'boolean' } },
|
|
143
|
+
dateFunctions: { control: { type: 'boolean' } }
|
|
153
144
|
};
|
|
154
|
-
export const AtomicConditionDemo = () => {
|
|
145
|
+
export const AtomicConditionDemo = (args) => {
|
|
155
146
|
const translate = useI18n();
|
|
156
|
-
const
|
|
157
|
-
const itemDirection = select('Item Direction', { Column: 'column', Row: 'row' }, 'column');
|
|
158
|
-
const validComparators = boolean('Limit Comparators', false) ? demoComparators : undefined;
|
|
159
|
-
const useLiteralRHSType = boolean('Enable Literal RHS Type', true);
|
|
160
|
-
const useFieldRHSType = boolean('Enable Field RHS Type', true);
|
|
161
|
-
const useRelativeDatesRHSType = boolean('Enable Relative Dates RHS Type', true);
|
|
162
|
-
const dateFunctions = boolean('Enable Date functions', true) ? demoDateFunctions : undefined;
|
|
163
|
-
const validRHSTypes = convertRhsTypes(useLiteralRHSType, useFieldRHSType, useRelativeDatesRHSType, dateFunctions);
|
|
164
|
-
const showLhsAsLabel = boolean('Show LHS as Label', false);
|
|
147
|
+
const validRHSTypes = convertRhsTypes(!!args.useLiteralRHSType, !!args.useFieldRHSType, !!args.useRelativeDatesRHSType, args.dateFunctions ? demoDateFunctions : undefined);
|
|
165
148
|
const [submitCondition, setSubmitCondition] = useState(undefined);
|
|
166
149
|
const buttonRef = useRef(null);
|
|
167
150
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -178,11 +161,11 @@ export const AtomicConditionDemo = () => {
|
|
|
178
161
|
};
|
|
179
162
|
const [showErrorIndicators, setShowErrorIndicators] = useState(false);
|
|
180
163
|
const [condition, setCondition] = useState(() => submitCondition ||
|
|
181
|
-
getInitConditionForLhs({ field: 'age' }, demoFields, validRHSTypes, validComparators, dateFunctions));
|
|
164
|
+
getInitConditionForLhs({ field: 'age' }, demoFields, validRHSTypes, args.validComparators ? demoComparators : undefined, args.dateFunctions ? demoDateFunctions : undefined));
|
|
182
165
|
const handleSubmission = () => {
|
|
183
166
|
setShowErrorIndicators(false);
|
|
184
167
|
if (isValidCondition(condition, demoFields, true)) {
|
|
185
|
-
if (renderInPopover)
|
|
168
|
+
if (args.renderInPopover)
|
|
186
169
|
setIsOpen(false);
|
|
187
170
|
setSubmitCondition(condition);
|
|
188
171
|
}
|
|
@@ -191,7 +174,7 @@ export const AtomicConditionDemo = () => {
|
|
|
191
174
|
}
|
|
192
175
|
};
|
|
193
176
|
const atomicConditionJSX = (<Flex container={{ direction: 'column', gap: 2 }}>
|
|
194
|
-
<AtomicCondition condition={condition} fields={demoFields} indicateErrors={showErrorIndicators} validComparators={validComparators} dateFunctions={dateFunctions} onChange={c => setCondition(c)} itemDirection={itemDirection} showLhsAsLabel={showLhsAsLabel} validRhsTypes={validRHSTypes}/>
|
|
177
|
+
<AtomicCondition condition={condition} fields={demoFields} indicateErrors={showErrorIndicators} validComparators={args.validComparators ? demoComparators : undefined} dateFunctions={args.dateFunctions ? demoDateFunctions : undefined} onChange={c => setCondition(c)} itemDirection={args.itemDirection} showLhsAsLabel={args.showLhsAsLabel} validRhsTypes={validRHSTypes}/>
|
|
195
178
|
<Button variant='primary' onClick={handleSubmission}>
|
|
196
179
|
Submit Condition
|
|
197
180
|
</Button>
|
|
@@ -202,9 +185,9 @@ export const AtomicConditionDemo = () => {
|
|
|
202
185
|
alignItems: 'start',
|
|
203
186
|
colGap: 4
|
|
204
187
|
}}>
|
|
205
|
-
{!renderInPopover && atomicConditionJSX}
|
|
188
|
+
{!args.renderInPopover && atomicConditionJSX}
|
|
206
189
|
|
|
207
|
-
{renderInPopover && (<>
|
|
190
|
+
{args.renderInPopover && (<>
|
|
208
191
|
<Button ref={buttonRef} aria-haspopup aria-expanded={isOpen} onClick={() => setIsOpen(!isOpen)} onKeyDown={hideOnEscape}>
|
|
209
192
|
{`${isOpen ? 'Close' : 'Open'} Atomic Condition`}
|
|
210
193
|
</Button>
|
|
@@ -260,4 +243,24 @@ export const AtomicConditionDemo = () => {
|
|
|
260
243
|
</Card>
|
|
261
244
|
</StyledGrid>);
|
|
262
245
|
};
|
|
246
|
+
AtomicConditionDemo.args = {
|
|
247
|
+
validComparators: false,
|
|
248
|
+
renderInPopover: false,
|
|
249
|
+
dateFunctions: true,
|
|
250
|
+
itemDirection: 'column',
|
|
251
|
+
useLiteralRHSType: true,
|
|
252
|
+
useFieldRHSType: true,
|
|
253
|
+
useRelativeDatesRHSType: true,
|
|
254
|
+
showLhsAsLabel: false
|
|
255
|
+
};
|
|
256
|
+
AtomicConditionDemo.argTypes = {
|
|
257
|
+
validComparators: { control: { type: 'boolean' } },
|
|
258
|
+
renderInPopover: { control: { type: 'boolean' } },
|
|
259
|
+
dateFunctions: { control: { type: 'boolean' } },
|
|
260
|
+
itemDirection: { options: ['column', 'row'], control: { type: 'select' } },
|
|
261
|
+
useLiteralRHSType: { control: { type: 'boolean' } },
|
|
262
|
+
useFieldRHSType: { control: { type: 'boolean' } },
|
|
263
|
+
useRelativeDatesRHSType: { control: { type: 'boolean' } },
|
|
264
|
+
showLhsAsLabel: { control: { type: 'boolean' } }
|
|
265
|
+
};
|
|
263
266
|
//# sourceMappingURL=ConditionBuilder.stories.jsx.map
|