@pega/cosmos-react-demos 3.0.0-dev.4.1 → 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.map +1 -1
- package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.jsx +2 -1
- 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 +24 -0
- package/jsx/build/ObjectSelect/ObjectSelect.mocks.d.ts.map +1 -1
- 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 +2 -7
- package/jsx/build/ObjectSelect/ObjectSelect.stories.d.ts.map +1 -1
- package/jsx/build/ObjectSelect/ObjectSelect.stories.jsx +5 -180
- package/jsx/build/ObjectSelect/ObjectSelect.stories.jsx.map +1 -1
- 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 +1 -9
- 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/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/FieldGroupList.mocks.d.ts +4 -0
- package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -1
- package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx +69 -1
- package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx.map +1 -1
- package/jsx/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -1
- package/jsx/core/FieldGroup/FieldGroupList.stories.jsx +2 -70
- package/jsx/core/FieldGroup/FieldGroupList.stories.jsx.map +1 -1
- package/jsx/core/HTML/HTML.stories.d.ts.map +1 -1
- package/jsx/core/HTML/HTML.stories.jsx +1 -1
- package/jsx/core/HTML/HTML.stories.jsx.map +1 -1
- 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/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.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 +1 -19
- 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 +97 -411
- 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/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.map +1 -1
- package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.js +2 -1
- 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 +24 -0
- package/lib/build/ObjectSelect/ObjectSelect.mocks.d.ts.map +1 -1
- package/lib/build/ObjectSelect/ObjectSelect.mocks.js +136 -0
- package/lib/build/ObjectSelect/ObjectSelect.mocks.js.map +1 -1
- package/lib/build/ObjectSelect/ObjectSelect.stories.d.ts +2 -7
- package/lib/build/ObjectSelect/ObjectSelect.stories.d.ts.map +1 -1
- package/lib/build/ObjectSelect/ObjectSelect.stories.js +12 -136
- package/lib/build/ObjectSelect/ObjectSelect.stories.js.map +1 -1
- 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 +1 -9
- 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/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/FieldGroupList.mocks.d.ts +4 -0
- package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -1
- package/lib/core/FieldGroup/FieldGroupList.mocks.js +46 -2
- package/lib/core/FieldGroup/FieldGroupList.mocks.js.map +1 -1
- package/lib/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -1
- package/lib/core/FieldGroup/FieldGroupList.stories.js +3 -47
- package/lib/core/FieldGroup/FieldGroupList.stories.js.map +1 -1
- package/lib/core/HTML/HTML.stories.d.ts.map +1 -1
- package/lib/core/HTML/HTML.stories.js +1 -1
- package/lib/core/HTML/HTML.stories.js.map +1 -1
- 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/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.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 +1 -21
- 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 +99 -427
- 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/package.json +9 -10
- package/jsx/build/FlowModeller/FlowModeller.mocks.js.map +0 -1
- package/jsx/build/ObjectSelect/ObjectSelect.mocks.js +0 -136
- package/jsx/build/ObjectSelect/ObjectSelect.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,170 +1,28 @@
|
|
|
1
|
-
import { useState, useRef, useContext,
|
|
1
|
+
import { useState, useRef, useContext, useCallback } from 'react';
|
|
2
2
|
import { action } from '@storybook/addon-actions';
|
|
3
|
-
import {
|
|
4
|
-
import styled, { css } from 'styled-components';
|
|
5
|
-
import { Card, CardContent, createUID, MenuButton, Icon, registerIcon, hasProp, Flex, Button, ModalManagerContext, Modal, menuHelpers, defaultThemeProp, CardHeader, Text, SummaryList, Grid, FieldValueList, StyledLabel } from '@pega/cosmos-react-core';
|
|
3
|
+
import { Card, CardContent, createUID, MenuButton, Icon, registerIcon, Flex, Button, ModalManagerContext, menuHelpers, CardHeader, Text, SummaryList, Grid, FieldValueList, StyledLabel } from '@pega/cosmos-react-core';
|
|
6
4
|
import * as filterIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/filter.icon';
|
|
7
|
-
import { Email, EmailConversation, EmailComposer, EmailShell, EmailSummaryItem, EmailSummaryList, EntityList } from '@pega/cosmos-react-social';
|
|
8
|
-
import { bccParticipants, ccParticipants, emailBodyContent, participants, toParticipants, emailAttachments, EntityListMockData,
|
|
5
|
+
import { Email as EmailComponent, EmailConversation, EmailComposer, EmailShell, EmailSummaryItem, EmailSummaryList, EntityList } from '@pega/cosmos-react-social';
|
|
6
|
+
import { bccParticipants, ccParticipants, emailBodyContent, participants, toParticipants, emailAttachments, EntityListMockData, viewAnalysisEmailHeaderMock, topicListMock, emailActions, generateEmailConversationParticipants, templates, handleExternalEntry, emailDemoActions, launchEmailComposer, LaunchAction, baseComposerProps, sentiment, emailSummaryItems, mockEmails, mockSuggestedReplies, mockEmailBodyTemplates } from './Email.mocks';
|
|
7
|
+
import { StyledEmailCardContent, StyledViewAnalysis } from './Email.styles';
|
|
9
8
|
registerIcon(filterIcon);
|
|
10
9
|
export default {
|
|
11
10
|
title: 'Social/Email',
|
|
12
|
-
component:
|
|
11
|
+
component: EmailComponent
|
|
13
12
|
};
|
|
14
|
-
const
|
|
15
|
-
const handleExternalEntry = (filterValue) => {
|
|
16
|
-
const pattern = /^[\w.\-_]+@[a-zA-Z]+(\.[a-zA-Z]{2,3}){1,2}$/;
|
|
17
|
-
const matched = filterValue.match(pattern);
|
|
18
|
-
return !!matched?.input;
|
|
19
|
-
};
|
|
20
|
-
const templates = mockEmailBodyTemplates.map(({ id, title }) => {
|
|
21
|
-
return {
|
|
22
|
-
id,
|
|
23
|
-
title
|
|
24
|
-
};
|
|
25
|
-
});
|
|
26
|
-
const baseComposerProps = {
|
|
27
|
-
participants,
|
|
28
|
-
externalValidator: handleExternalEntry,
|
|
29
|
-
to: {
|
|
30
|
-
reply: toParticipants.slice(0, 1),
|
|
31
|
-
replyAll: toParticipants
|
|
32
|
-
},
|
|
33
|
-
cc: ccParticipants,
|
|
34
|
-
subject: '',
|
|
35
|
-
bodyContent: '',
|
|
36
|
-
onSend: action('On Send'),
|
|
37
|
-
onCancel: () => {
|
|
38
|
-
action('cancelled email composing');
|
|
39
|
-
},
|
|
40
|
-
templates
|
|
41
|
-
};
|
|
42
|
-
var LaunchAction;
|
|
43
|
-
(function (LaunchAction) {
|
|
44
|
-
LaunchAction[LaunchAction["REPLY"] = 0] = "REPLY";
|
|
45
|
-
LaunchAction[LaunchAction["REPLYALL"] = 1] = "REPLYALL";
|
|
46
|
-
LaunchAction[LaunchAction["SUGGESTION"] = 2] = "SUGGESTION";
|
|
47
|
-
LaunchAction[LaunchAction["FORWARD"] = 3] = "FORWARD";
|
|
48
|
-
})(LaunchAction || (LaunchAction = {}));
|
|
49
|
-
const composerModals = {};
|
|
50
|
-
const getCompositeId = (id, launchAction) => {
|
|
51
|
-
return `${id}-${launchAction}`;
|
|
52
|
-
};
|
|
53
|
-
const handleComposerCancel = (compositeID) => {
|
|
54
|
-
composerModals[compositeID]?.dismissModal();
|
|
55
|
-
composerModals[compositeID]?.unMountModal();
|
|
56
|
-
delete composerModals[compositeID];
|
|
57
|
-
};
|
|
58
|
-
const launchEmailComposer = (id, launchAction, composerProps, create) => {
|
|
59
|
-
const compositeId = getCompositeId(id, launchAction);
|
|
60
|
-
const composerRef = createRef();
|
|
61
|
-
const modalControls = create(() => {
|
|
62
|
-
return (<Modal heading={composerProps.subject} options={{ id: { compositeId } }}>
|
|
63
|
-
<EmailComposer {...composerProps} ref={composerRef} onCancel={() => handleComposerCancel(compositeId)}/>
|
|
64
|
-
</Modal>);
|
|
65
|
-
}, { center: true }, { minimizable: true, maximizable: true, dockable: true });
|
|
66
|
-
composerModals[compositeId] = {
|
|
67
|
-
dismissModal: modalControls.dismiss,
|
|
68
|
-
unMountModal: modalControls.unmount,
|
|
69
|
-
composerRef
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
const emailActions = (<MenuButton text='Email actions' variant='simple' icon='more' iconOnly menu={{
|
|
73
|
-
items: [
|
|
74
|
-
{
|
|
75
|
-
id: createUID(),
|
|
76
|
-
primary: 'Reply',
|
|
77
|
-
onClick: action('On reply')
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
id: createUID(),
|
|
81
|
-
primary: 'Reply all',
|
|
82
|
-
onClick: action('On reply all')
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
id: createUID(),
|
|
86
|
-
primary: 'Forward',
|
|
87
|
-
onClick: action('Forward')
|
|
88
|
-
}
|
|
89
|
-
]
|
|
90
|
-
}}/>);
|
|
91
|
-
const emailDemoActions = (create, subject, onTemplateChange) => {
|
|
92
|
-
const id = createUID();
|
|
93
|
-
return (<MenuButton text='Email actions' variant='simple' icon='more' iconOnly menu={{
|
|
94
|
-
items: [
|
|
95
|
-
{
|
|
96
|
-
id: createUID(),
|
|
97
|
-
primary: 'Reply',
|
|
98
|
-
onClick: () => launchEmailComposer(id, LaunchAction.REPLY, {
|
|
99
|
-
...baseComposerProps,
|
|
100
|
-
onTemplateChange,
|
|
101
|
-
responseType: 'reply',
|
|
102
|
-
subject: `Re-${subject}` || ''
|
|
103
|
-
}, create)
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
id: createUID(),
|
|
107
|
-
primary: 'Reply all',
|
|
108
|
-
onClick: () => launchEmailComposer(id, LaunchAction.REPLYALL, {
|
|
109
|
-
...baseComposerProps,
|
|
110
|
-
onTemplateChange,
|
|
111
|
-
responseType: 'replyAll',
|
|
112
|
-
cc: [],
|
|
113
|
-
subject: `Re-${subject}` || ''
|
|
114
|
-
}, create)
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
id: createUID(),
|
|
118
|
-
primary: 'Forward',
|
|
119
|
-
onClick: () => launchEmailComposer(id, LaunchAction.FORWARD, {
|
|
120
|
-
...baseComposerProps,
|
|
121
|
-
onTemplateChange,
|
|
122
|
-
responseType: 'forward',
|
|
123
|
-
subject: `Fw-${subject}` || ''
|
|
124
|
-
}, create)
|
|
125
|
-
}
|
|
126
|
-
]
|
|
127
|
-
}}/>);
|
|
128
|
-
};
|
|
129
|
-
const generateEmailConversationParticipants = (emails, fields) => {
|
|
130
|
-
let l;
|
|
131
|
-
if (fields) {
|
|
132
|
-
l = [...fields];
|
|
133
|
-
}
|
|
134
|
-
else {
|
|
135
|
-
l = ['from', 'to', 'cc', 'bcc'];
|
|
136
|
-
}
|
|
137
|
-
const emailUsers = emails.map(emailItem => {
|
|
138
|
-
return l.map(n => {
|
|
139
|
-
if (hasProp(emailItem, n)) {
|
|
140
|
-
return emailItem[n];
|
|
141
|
-
}
|
|
142
|
-
return [];
|
|
143
|
-
});
|
|
144
|
-
});
|
|
145
|
-
return [...new Set(Array.from(emailUsers).flat(2))];
|
|
146
|
-
};
|
|
147
|
-
const StyledEmailCardContent = styled(CardContent)(({ theme }) => {
|
|
148
|
-
return css `
|
|
149
|
-
&&&& {
|
|
150
|
-
padding: calc(2 * ${theme.base.spacing}) 0;
|
|
151
|
-
}
|
|
152
|
-
`;
|
|
153
|
-
});
|
|
154
|
-
StyledEmailCardContent.defaultProps = defaultThemeProp;
|
|
155
|
-
export const email = () => {
|
|
13
|
+
export const Email = (args) => {
|
|
156
14
|
return (<Card>
|
|
157
15
|
<StyledEmailCardContent>
|
|
158
|
-
<
|
|
16
|
+
<EmailComponent id={createUID()} timeStamp='2022-02-24T09:12' from={mockEmails['Laura Stevens']} cc={[mockEmails['Adam Gillchrist'], mockEmails['John Paul']]} bcc={[mockEmails['Anton, Randy'], mockEmails['Hugh Phillips']]} to={[mockEmails['Sara Davis'], mockEmails['John Brown'], mockEmails['Joe Stevens']]} body='<div> Hi Team, <br /> <br /> <div>Please find the below conversation & let us know the best fare (including taxes) per person.</div><br />Regards, <br /> Laura Stevens </div>' forwardedContent={args.forwardedContent} subject='Regarding flight booking' onReply={action('On reply')} onReplyAll={action('On reply all')} onForward={action('On forward')} onSuggestionClick={action('On Suggested reply clicked')} sentiment={{
|
|
159
17
|
variant: 'positive'
|
|
160
18
|
}} actions={emailActions} suggestions={mockSuggestedReplies} attachments={[
|
|
161
19
|
{
|
|
162
|
-
id:
|
|
20
|
+
id: 'attachment_0',
|
|
163
21
|
value: 'https://pega.com/media/document.doc',
|
|
164
22
|
displayText: 'Policy document'
|
|
165
23
|
},
|
|
166
24
|
{
|
|
167
|
-
id:
|
|
25
|
+
id: 'attachment_1',
|
|
168
26
|
value: 'https://pbs.twimg.com/media/ENNN5PAXkAE-hag.jpg',
|
|
169
27
|
displayText: 'E-Ticket'
|
|
170
28
|
}
|
|
@@ -178,9 +36,29 @@ export const email = () => {
|
|
|
178
36
|
</StyledEmailCardContent>
|
|
179
37
|
</Card>);
|
|
180
38
|
};
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
39
|
+
Email.args = {
|
|
40
|
+
forwardedContent: `
|
|
41
|
+
<div id="pega-email-message-forward" style="font-family:OpenSans,sans-serif; border-left: 1px solid #c4c4c4; padding-left: 8px;">
|
|
42
|
+
<div>
|
|
43
|
+
<p class="pega-email-forward-header" style="font-size:smaller;color:#90909D;">--------------------Forwarded message--------------------<br />From: Person, Example <example.person@pega.com> <br />Date: Feb 23, 2022 9:29:59 PM <br />Subject: Regarding flight booking <br />To: Laura, Stevens <laurastevens@example.com><br /> </p>
|
|
44
|
+
</div>
|
|
45
|
+
<div class="pega-email-forward-content">
|
|
46
|
+
<div class="WordSection1">
|
|
47
|
+
<p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:'calibri' , sans-serif"><span style="color:black">Hi, </span></p>
|
|
48
|
+
<p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:'calibri' , sans-serif"><span style="color:black"> </span></p>
|
|
49
|
+
<p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:'calibri' , sans-serif"><span style="color:black">I need to book a flight from Hyderabad to Chennai. </span></p>
|
|
50
|
+
<p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:'calibri' , sans-serif"><span style="color:black">Please let me know the fare including taxes per each person. </span></p>
|
|
51
|
+
<p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:'calibri' , sans-serif"><span style="color:black"> </span></p>
|
|
52
|
+
<p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:'calibri' , sans-serif"><span style="color:black">Thanks, </span></p>
|
|
53
|
+
<p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:'calibri' , sans-serif"><span style="color:black">Goutham </span></p>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
`
|
|
58
|
+
};
|
|
59
|
+
Email.argTypes = {
|
|
60
|
+
forwardedContent: { control: { type: 'text' } }
|
|
61
|
+
};
|
|
184
62
|
export const ViewAnalysis = () => {
|
|
185
63
|
const headerProps = {
|
|
186
64
|
icon: 'list-number',
|
|
@@ -214,11 +92,11 @@ export const ViewAnalysis = () => {
|
|
|
214
92
|
</Grid>
|
|
215
93
|
</StyledViewAnalysis>);
|
|
216
94
|
};
|
|
217
|
-
export const
|
|
95
|
+
export const EmailEntities = (args) => {
|
|
218
96
|
const nestedEntities = ['Place: Nagercoil, Hyderabad', 'Location: Nagercoil'];
|
|
219
97
|
return (<Card>
|
|
220
98
|
<StyledEmailCardContent>
|
|
221
|
-
<
|
|
99
|
+
<EmailComponent id={createUID()} timeStamp='2021-01-05T09:12' from={mockEmails['Laura Stevens']} cc={[mockEmails['Adam Gillchrist'], mockEmails['John Paul']]} bcc={[mockEmails['Anton, Randy'], mockEmails['Hugh Phillips']]} to={[mockEmails['Sara Davis'], mockEmails['John Brown'], mockEmails['Joe Stevens']]} body='<div>Hi,<br/><p>I am one of the customer of Indian Overseas Bank, <b><i>Nagercoil</i></b> branch, with code <b><a href="www.google.com"><i>3967</i></a></b>. I have a saving bank account here. My account number is <i>6785420965476</i>.</p><br/><p>I have been given a debit cum ATM card from this bank and the same has been lost when I was traveling from Nagercoil to Trichy by Bus on Jan 04, 2021. I remember that my ATM card number was 1920 6746 8653 1256.</p><br/>I hereby request you to block my debit card immediately to prevent misuse of the same by some others. Also I request you to give me an new debit card as early as possible.<br/><br/>Regards,<br/>Laura Stevens</div>' entityHighlightMapping={args.enableEntityHighlighting
|
|
222
100
|
? [
|
|
223
101
|
{
|
|
224
102
|
value: '3967',
|
|
@@ -277,22 +155,22 @@ export const emailEntities = () => {
|
|
|
277
155
|
description: 'Date'
|
|
278
156
|
}
|
|
279
157
|
]
|
|
280
|
-
: undefined} contextMenu={
|
|
158
|
+
: undefined} contextMenu={args.enableContextMenu
|
|
281
159
|
? {
|
|
282
160
|
heading: 'Copy to',
|
|
283
161
|
items: [
|
|
284
162
|
{
|
|
285
|
-
id:
|
|
163
|
+
id: 'item_0',
|
|
286
164
|
primary: 'Field 1',
|
|
287
165
|
selected: false
|
|
288
166
|
},
|
|
289
167
|
{
|
|
290
|
-
id:
|
|
168
|
+
id: 'item_1',
|
|
291
169
|
primary: 'Field 2',
|
|
292
170
|
selected: true
|
|
293
171
|
},
|
|
294
172
|
{
|
|
295
|
-
id:
|
|
173
|
+
id: 'item_2',
|
|
296
174
|
primary: 'Field 3',
|
|
297
175
|
selected: true
|
|
298
176
|
}
|
|
@@ -305,10 +183,18 @@ export const emailEntities = () => {
|
|
|
305
183
|
</StyledEmailCardContent>
|
|
306
184
|
</Card>);
|
|
307
185
|
};
|
|
186
|
+
EmailEntities.args = {
|
|
187
|
+
enableEntityHighlighting: true,
|
|
188
|
+
enableContextMenu: true
|
|
189
|
+
};
|
|
190
|
+
EmailEntities.argTypes = {
|
|
191
|
+
enableEntityHighlighting: { control: { type: 'boolean' } },
|
|
192
|
+
enableContextMenu: { control: { type: 'boolean' } }
|
|
193
|
+
};
|
|
308
194
|
export const emailConversation = () => {
|
|
309
195
|
const emailArr = [
|
|
310
196
|
{
|
|
311
|
-
id:
|
|
197
|
+
id: 'item_0',
|
|
312
198
|
timeStamp: '2021-01-05T09:12',
|
|
313
199
|
from: mockEmails['Laura Stevens'],
|
|
314
200
|
cc: [mockEmails['Adam Gillchrist'], mockEmails['John Paul']],
|
|
@@ -323,7 +209,7 @@ export const emailConversation = () => {
|
|
|
323
209
|
suggestions: mockSuggestedReplies
|
|
324
210
|
},
|
|
325
211
|
{
|
|
326
|
-
id:
|
|
212
|
+
id: 'item_1',
|
|
327
213
|
timeStamp: '2021-01-02T03:12',
|
|
328
214
|
from: mockEmails['Sara Davis'],
|
|
329
215
|
cc: [mockEmails['Adam Gillchrist'], mockEmails['John Paul']],
|
|
@@ -387,12 +273,12 @@ export const EmailComposerDemo = () => {
|
|
|
387
273
|
</CardContent>
|
|
388
274
|
</Card>);
|
|
389
275
|
};
|
|
390
|
-
export const EmailDemo = (
|
|
276
|
+
export const EmailDemo = (args) => {
|
|
391
277
|
const onTemplateChange = id => {
|
|
392
278
|
const selectedTemplate = mockEmailBodyTemplates.find(template => template.id === id);
|
|
393
279
|
return selectedTemplate?.content;
|
|
394
280
|
};
|
|
395
|
-
const actions =
|
|
281
|
+
const actions = ['Transfer', 'End conversation'].map(name => ({
|
|
396
282
|
primary: name,
|
|
397
283
|
id: name,
|
|
398
284
|
onClick: action(`Clicked ${name}`)
|
|
@@ -400,22 +286,22 @@ export const EmailDemo = ({ hideSuggestions }) => {
|
|
|
400
286
|
const { create } = useContext(ModalManagerContext);
|
|
401
287
|
const emailsData = [
|
|
402
288
|
{
|
|
403
|
-
id:
|
|
289
|
+
id: 'item_0',
|
|
404
290
|
timeStamp: '2021-01-05T09:12',
|
|
405
291
|
from: participants[0],
|
|
406
292
|
to: participants.slice(0, 2),
|
|
407
293
|
body: '<div>Hi, <br /> <br /><div>Your address change request is approved.</div> <br /> <br />Regards, <br />Laura Stevens </div>',
|
|
408
294
|
unRead: true,
|
|
409
295
|
subject: 'Pause service',
|
|
410
|
-
suggestions: hideSuggestions ? undefined : mockSuggestedReplies,
|
|
296
|
+
suggestions: args.hideSuggestions ? undefined : mockSuggestedReplies,
|
|
411
297
|
attachments: [
|
|
412
298
|
{
|
|
413
|
-
id:
|
|
299
|
+
id: 'item_1_0',
|
|
414
300
|
value: 'https://pega.com/media/document.doc',
|
|
415
301
|
displayText: 'Policy document'
|
|
416
302
|
},
|
|
417
303
|
{
|
|
418
|
-
id:
|
|
304
|
+
id: 'item_1_1',
|
|
419
305
|
value: 'https://pbs.twimg.com/media/ENNN5PAXkAE-hag.jpg',
|
|
420
306
|
displayText: 'E-Ticket'
|
|
421
307
|
}
|
|
@@ -428,7 +314,7 @@ export const EmailDemo = ({ hideSuggestions }) => {
|
|
|
428
314
|
})
|
|
429
315
|
},
|
|
430
316
|
{
|
|
431
|
-
id:
|
|
317
|
+
id: 'item_1',
|
|
432
318
|
timeStamp: '2021-01-02T03:12',
|
|
433
319
|
from: participants[3],
|
|
434
320
|
to: participants.slice(2, 4),
|
|
@@ -471,7 +357,7 @@ export const EmailDemo = ({ hideSuggestions }) => {
|
|
|
471
357
|
}, create);
|
|
472
358
|
},
|
|
473
359
|
actions: emailActionItems,
|
|
474
|
-
tags: hideSuggestions
|
|
360
|
+
tags: args.hideSuggestions
|
|
475
361
|
? undefined
|
|
476
362
|
: {
|
|
477
363
|
items: ['Pause service', 'Lost or stolen'],
|
|
@@ -527,7 +413,7 @@ export const EmailDemo = ({ hideSuggestions }) => {
|
|
|
527
413
|
return {
|
|
528
414
|
from: generateEmailConversationParticipants(emails, ['from'])[0],
|
|
529
415
|
to: emails[0].to,
|
|
530
|
-
id:
|
|
416
|
+
id: `item_${i}`,
|
|
531
417
|
timeStamp: emails[0].timeStamp,
|
|
532
418
|
unReadEmailCount: emails.filter(item => item.unRead).length,
|
|
533
419
|
emails,
|
|
@@ -540,7 +426,7 @@ export const EmailDemo = ({ hideSuggestions }) => {
|
|
|
540
426
|
{
|
|
541
427
|
from: generateEmailConversationParticipants(emailsData, ['from'])[0],
|
|
542
428
|
to: generateEmailConversationParticipants(emailsData, ['to']),
|
|
543
|
-
id:
|
|
429
|
+
id: 'item_0',
|
|
544
430
|
timeStamp: new Date(emailsData[0].timeStamp),
|
|
545
431
|
unReadEmailCount: emailsData.filter(item => item.unRead).length,
|
|
546
432
|
emails: emailsData
|
|
@@ -561,15 +447,21 @@ export const EmailDemo = ({ hideSuggestions }) => {
|
|
|
561
447
|
<MenuButton variant='simple' text='More actions' icon='more' iconOnly portal menu={{ items: actions }}/>
|
|
562
448
|
</Flex>),
|
|
563
449
|
subject: 'Pause service'
|
|
564
|
-
}} autoCollapse={
|
|
450
|
+
}} autoCollapse={args.autoCollapse} conversations={args.singleConversation ? singleEmailConversation : emailConversations}/>);
|
|
451
|
+
};
|
|
452
|
+
EmailDemo.args = {
|
|
453
|
+
autoCollapse: true,
|
|
454
|
+
hideSuggestions: false,
|
|
455
|
+
singleConversation: true
|
|
456
|
+
};
|
|
457
|
+
EmailDemo.argTypes = {
|
|
458
|
+
autoCollapse: { control: { type: 'boolean' } },
|
|
459
|
+
hideSuggestions: { control: { type: 'boolean' } },
|
|
460
|
+
singleConversation: { control: { type: 'boolean' } }
|
|
565
461
|
};
|
|
566
462
|
EmailDemo.parameters = {
|
|
567
463
|
layout: 'fullscreen'
|
|
568
464
|
};
|
|
569
|
-
const sentiment = {
|
|
570
|
-
variant: 'negative',
|
|
571
|
-
labelHidden: true
|
|
572
|
-
};
|
|
573
465
|
export const EmailSummaryItemDemo = () => {
|
|
574
466
|
const [active, setActive] = useState(false);
|
|
575
467
|
return (<EmailSummaryItem style={{ width: '25rem' }} id={createUID()} activeParticipants={[
|
|
@@ -587,258 +479,34 @@ export const EmailSummaryItemDemo = () => {
|
|
|
587
479
|
setActive(true);
|
|
588
480
|
}}/>);
|
|
589
481
|
};
|
|
590
|
-
const emailSummaryItems = [
|
|
591
|
-
{
|
|
592
|
-
id: createUID(),
|
|
593
|
-
activeParticipants: [
|
|
594
|
-
{ shortName: 'Robert', fullName: 'Robert Downer', emailAddress: 'robert.downey@example.com' },
|
|
595
|
-
{ shortName: 'Support', fullName: 'Support', emailAddress: 'support@example.com' }
|
|
596
|
-
],
|
|
597
|
-
message: 'I have a quick question on travel',
|
|
598
|
-
timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
|
|
599
|
-
topic: 'Travel request',
|
|
600
|
-
sentiment,
|
|
601
|
-
active: true,
|
|
602
|
-
urgency: 85,
|
|
603
|
-
unreadEmailCount: 4
|
|
604
|
-
},
|
|
605
|
-
{
|
|
606
|
-
id: createUID(),
|
|
607
|
-
activeParticipants: [
|
|
608
|
-
{
|
|
609
|
-
shortName: 'Nathan',
|
|
610
|
-
fullName: 'Nathan Swanson',
|
|
611
|
-
emailAddress: 'nathan.swanson@example.com'
|
|
612
|
-
}
|
|
613
|
-
],
|
|
614
|
-
message: 'My luggage did not drive!',
|
|
615
|
-
timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
|
|
616
|
-
topic: 'Missing Luggage',
|
|
617
|
-
sentiment,
|
|
618
|
-
urgency: 10,
|
|
619
|
-
unreadEmailCount: 2
|
|
620
|
-
},
|
|
621
|
-
{
|
|
622
|
-
id: createUID(),
|
|
623
|
-
activeParticipants: [
|
|
624
|
-
{ shortName: 'Simpson', fullName: 'Glenn Simpson', emailAddress: 'glenn.simpson@example.com' }
|
|
625
|
-
],
|
|
626
|
-
message: 'Re: How much is a flight to Florida. Is there a discount going on?',
|
|
627
|
-
timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
|
|
628
|
-
topic: 'Travel request',
|
|
629
|
-
sentiment,
|
|
630
|
-
urgency: 65,
|
|
631
|
-
unreadEmailCount: 1
|
|
632
|
-
},
|
|
633
|
-
{
|
|
634
|
-
id: createUID(),
|
|
635
|
-
activeParticipants: [
|
|
636
|
-
{ shortName: 'Green', fullName: 'Ralph Green', emailAddress: 'ralph.green@example.com' }
|
|
637
|
-
],
|
|
638
|
-
message: 'Re: Should I purchase travel insurance? How often do we need it?',
|
|
639
|
-
timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
|
|
640
|
-
topic: 'Travel request',
|
|
641
|
-
sentiment,
|
|
642
|
-
urgency: 85,
|
|
643
|
-
unreadEmailCount: 6
|
|
644
|
-
},
|
|
645
|
-
{
|
|
646
|
-
id: createUID(),
|
|
647
|
-
activeParticipants: [
|
|
648
|
-
{ shortName: 'Greene', fullName: 'Fred Greene', emailAddress: 'Fred.greene@example.com' }
|
|
649
|
-
],
|
|
650
|
-
message: 'My next vacation',
|
|
651
|
-
timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
|
|
652
|
-
topic: 'Travel request',
|
|
653
|
-
sentiment,
|
|
654
|
-
urgency: 45
|
|
655
|
-
},
|
|
656
|
-
{
|
|
657
|
-
id: createUID(),
|
|
658
|
-
activeParticipants: [
|
|
659
|
-
{ shortName: 'Smith', fullName: 'Aya Smith', emailAddress: 'aya.smith@example.com' },
|
|
660
|
-
{ shortName: 'Support', fullName: 'Support', emailAddress: 'support@example.com' },
|
|
661
|
-
{ shortName: 'Downer', fullName: 'Robert Downer', emailAddress: 'robert.downer@example.com' }
|
|
662
|
-
],
|
|
663
|
-
message: 'Airport questions',
|
|
664
|
-
timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
|
|
665
|
-
topic: 'Travel request',
|
|
666
|
-
sentiment,
|
|
667
|
-
urgency: 35
|
|
668
|
-
},
|
|
669
|
-
{
|
|
670
|
-
id: createUID(),
|
|
671
|
-
activeParticipants: [
|
|
672
|
-
{ shortName: 'Robert', fullName: 'Robert Downer', emailAddress: 'robert.downey@example.com' },
|
|
673
|
-
{ shortName: 'Robert', fullName: 'Robert ', emailAddress: 'robert.downey@example.com' }
|
|
674
|
-
],
|
|
675
|
-
message: 'I have a quick question on travel',
|
|
676
|
-
timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
|
|
677
|
-
topic: 'Travel request',
|
|
678
|
-
sentiment,
|
|
679
|
-
urgency: 85
|
|
680
|
-
},
|
|
681
|
-
{
|
|
682
|
-
id: createUID(),
|
|
683
|
-
activeParticipants: [
|
|
684
|
-
{
|
|
685
|
-
shortName: 'Nathan',
|
|
686
|
-
fullName: 'Nathan Swanson',
|
|
687
|
-
emailAddress: 'nathan.swanson@example.com'
|
|
688
|
-
}
|
|
689
|
-
],
|
|
690
|
-
message: 'My luggage did not drive!',
|
|
691
|
-
timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
|
|
692
|
-
topic: 'Missing Luggage',
|
|
693
|
-
sentiment,
|
|
694
|
-
urgency: 10
|
|
695
|
-
},
|
|
696
|
-
{
|
|
697
|
-
id: createUID(),
|
|
698
|
-
activeParticipants: [
|
|
699
|
-
{ shortName: 'Simpson', fullName: 'Glenn Simpson', emailAddress: 'glenn.simpson@example.com' }
|
|
700
|
-
],
|
|
701
|
-
message: 'Re: How much is a flight to Florida',
|
|
702
|
-
timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
|
|
703
|
-
topic: 'Travel request',
|
|
704
|
-
sentiment,
|
|
705
|
-
urgency: 65
|
|
706
|
-
},
|
|
707
|
-
{
|
|
708
|
-
id: createUID(),
|
|
709
|
-
activeParticipants: [
|
|
710
|
-
{ shortName: 'Green', fullName: 'Ralph Green', emailAddress: 'ralph.green@example.com' }
|
|
711
|
-
],
|
|
712
|
-
message: 'Re: Should I purchase travel insurance',
|
|
713
|
-
timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
|
|
714
|
-
topic: 'Travel request',
|
|
715
|
-
sentiment,
|
|
716
|
-
urgency: 85
|
|
717
|
-
},
|
|
718
|
-
{
|
|
719
|
-
id: createUID(),
|
|
720
|
-
activeParticipants: [
|
|
721
|
-
{ shortName: 'Greene', fullName: 'Fred Greene', emailAddress: 'Fred.greene@example.com' }
|
|
722
|
-
],
|
|
723
|
-
message: 'My next vacation',
|
|
724
|
-
timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
|
|
725
|
-
topic: 'Travel request',
|
|
726
|
-
sentiment,
|
|
727
|
-
urgency: 45
|
|
728
|
-
},
|
|
729
|
-
{
|
|
730
|
-
id: createUID(),
|
|
731
|
-
activeParticipants: [
|
|
732
|
-
{ shortName: 'Smith', fullName: 'Aya Smith', emailAddress: 'aya.smith@example.com' },
|
|
733
|
-
{ shortName: 'Support', fullName: 'Support', emailAddress: 'support@example.com' },
|
|
734
|
-
{ shortName: 'Downer', fullName: 'Robert Downer', emailAddress: 'robert.downer@example.com' }
|
|
735
|
-
],
|
|
736
|
-
message: 'Airport questions',
|
|
737
|
-
timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
|
|
738
|
-
topic: 'Travel request',
|
|
739
|
-
sentiment,
|
|
740
|
-
urgency: 35
|
|
741
|
-
},
|
|
742
|
-
{
|
|
743
|
-
id: createUID(),
|
|
744
|
-
activeParticipants: [
|
|
745
|
-
{ shortName: 'Robert', fullName: 'Robert Downer', emailAddress: 'robert.downey@example.com' },
|
|
746
|
-
{ shortName: 'Robert', fullName: 'Robert ', emailAddress: 'robert.downey@example.com' }
|
|
747
|
-
],
|
|
748
|
-
message: 'I have a quick question on travel',
|
|
749
|
-
timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
|
|
750
|
-
topic: 'Travel request',
|
|
751
|
-
sentiment,
|
|
752
|
-
urgency: 85
|
|
753
|
-
},
|
|
754
|
-
{
|
|
755
|
-
id: createUID(),
|
|
756
|
-
activeParticipants: [
|
|
757
|
-
{
|
|
758
|
-
shortName: 'Nathan',
|
|
759
|
-
fullName: 'Nathan Swanson',
|
|
760
|
-
emailAddress: 'nathan.swanson@example.com'
|
|
761
|
-
}
|
|
762
|
-
],
|
|
763
|
-
message: 'My luggage did not drive!',
|
|
764
|
-
timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
|
|
765
|
-
topic: 'Missing Luggage',
|
|
766
|
-
sentiment,
|
|
767
|
-
urgency: 10
|
|
768
|
-
},
|
|
769
|
-
{
|
|
770
|
-
id: createUID(),
|
|
771
|
-
activeParticipants: [
|
|
772
|
-
{ shortName: 'Simpson', fullName: 'Glenn Simpson', emailAddress: 'glenn.simpson@example.com' }
|
|
773
|
-
],
|
|
774
|
-
message: 'Re: How much is a flight to Florida',
|
|
775
|
-
timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
|
|
776
|
-
topic: 'Travel request',
|
|
777
|
-
sentiment,
|
|
778
|
-
urgency: 65
|
|
779
|
-
},
|
|
780
|
-
{
|
|
781
|
-
id: createUID(),
|
|
782
|
-
activeParticipants: [
|
|
783
|
-
{ shortName: 'Green', fullName: 'Ralph Green', emailAddress: 'ralph.green@example.com' }
|
|
784
|
-
],
|
|
785
|
-
message: 'Re: Should I purchase travel insurance',
|
|
786
|
-
timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
|
|
787
|
-
topic: 'Travel request',
|
|
788
|
-
sentiment,
|
|
789
|
-
urgency: 85
|
|
790
|
-
},
|
|
791
|
-
{
|
|
792
|
-
id: createUID(),
|
|
793
|
-
activeParticipants: [
|
|
794
|
-
{ shortName: 'Greene', fullName: 'Fred Greene', emailAddress: 'Fred.greene@example.com' }
|
|
795
|
-
],
|
|
796
|
-
message: 'My next vacation',
|
|
797
|
-
timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
|
|
798
|
-
topic: 'Travel request',
|
|
799
|
-
sentiment,
|
|
800
|
-
urgency: 45
|
|
801
|
-
},
|
|
802
|
-
{
|
|
803
|
-
id: createUID(),
|
|
804
|
-
activeParticipants: [
|
|
805
|
-
{ shortName: 'Smith', fullName: 'Aya Smith', emailAddress: 'aya.smith@example.com' },
|
|
806
|
-
{ shortName: 'Support', fullName: 'Support', emailAddress: 'support@example.com' },
|
|
807
|
-
{ shortName: 'Downer', fullName: 'Robert Downer', emailAddress: 'robert.downer@example.com' }
|
|
808
|
-
],
|
|
809
|
-
message: 'Airport questions',
|
|
810
|
-
timeStamp: new Date(Date.UTC(new Date().getUTCFullYear(), new Date().getUTCMonth(), 24)),
|
|
811
|
-
topic: 'Travel request',
|
|
812
|
-
sentiment,
|
|
813
|
-
urgency: 35
|
|
814
|
-
}
|
|
815
|
-
];
|
|
816
482
|
export const EmailSummaryListDemo = () => {
|
|
483
|
+
const INITIAL_CHUNK_SIZE = 9;
|
|
484
|
+
const APPEND_CHUNK_SIZE = 1;
|
|
817
485
|
const emailSummaryListRef = useRef(null);
|
|
818
|
-
const [allEmailItems, setAllEmailItems] = useState(emailSummaryItems);
|
|
486
|
+
const [allEmailItems, setAllEmailItems] = useState(emailSummaryItems.slice(0, INITIAL_CHUNK_SIZE));
|
|
819
487
|
const [categories, setCategories] = useState([
|
|
820
488
|
{
|
|
821
|
-
id:
|
|
489
|
+
id: 'item_0',
|
|
822
490
|
primary: 'Default worklist',
|
|
823
491
|
selected: false
|
|
824
492
|
},
|
|
825
493
|
{
|
|
826
|
-
id:
|
|
494
|
+
id: 'item_1',
|
|
827
495
|
primary: 'Authors',
|
|
828
496
|
selected: false
|
|
829
497
|
},
|
|
830
498
|
{
|
|
831
|
-
id:
|
|
499
|
+
id: 'item_2',
|
|
832
500
|
primary: 'Administrators',
|
|
833
501
|
selected: false
|
|
834
502
|
},
|
|
835
503
|
{
|
|
836
|
-
id:
|
|
504
|
+
id: 'item_3',
|
|
837
505
|
primary: 'Managers',
|
|
838
506
|
selected: false
|
|
839
507
|
},
|
|
840
508
|
{
|
|
841
|
-
id:
|
|
509
|
+
id: 'item_4',
|
|
842
510
|
primary: 'Users',
|
|
843
511
|
selected: false
|
|
844
512
|
}
|
|
@@ -854,7 +522,25 @@ export const EmailSummaryListDemo = () => {
|
|
|
854
522
|
const onCategoryClick = (id) => {
|
|
855
523
|
setCategories(cur => menuHelpers.toggleSelected(cur, id, 'single-select'));
|
|
856
524
|
};
|
|
857
|
-
|
|
525
|
+
const [loading, setLoading] = useState(false);
|
|
526
|
+
const [hasMore, setHasMore] = useState(true);
|
|
527
|
+
const loadMore = useCallback(() => {
|
|
528
|
+
if (!loading) {
|
|
529
|
+
setLoading(true);
|
|
530
|
+
setTimeout(() => {
|
|
531
|
+
setLoading(false);
|
|
532
|
+
setAllEmailItems(prevItems => {
|
|
533
|
+
const previousItemsLength = prevItems.length;
|
|
534
|
+
const newItems = emailSummaryItems.slice(previousItemsLength, previousItemsLength + APPEND_CHUNK_SIZE);
|
|
535
|
+
if (newItems.length === 0) {
|
|
536
|
+
setHasMore(false);
|
|
537
|
+
}
|
|
538
|
+
return [...prevItems, ...newItems];
|
|
539
|
+
});
|
|
540
|
+
}, 1500);
|
|
541
|
+
}
|
|
542
|
+
}, [loading]);
|
|
543
|
+
return (<EmailSummaryList style={{ height: '100vh', width: '25rem', margin: 'auto' }} ref={emailSummaryListRef} unreadEmailCount={99} categories={categories} items={allEmailItems} onItemClick={handleItemClick} onCategoryClick={onCategoryClick} onLoadMore={hasMore ? loadMore : undefined} loading={loading} emptyMessage='No emails.'/>);
|
|
858
544
|
};
|
|
859
545
|
EmailSummaryListDemo.parameters = {
|
|
860
546
|
layout: 'fullscreen'
|