@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":"FeedPost.stories.js","sourceRoot":"","sources":["../../../src/social/Feed/FeedPost.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EACL,MAAM,EACN,WAAW,EACX,IAAI,EAEJ,OAAO,EAEP,KAAK,EAEL,MAAM,EACP,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,IAAI,EACJ,QAAQ,EAET,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,OAAO,EAAgB,MAAM,yBAAyB,CAAC;AAEhE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EACL,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,mBAAmB,EAEpB,MAAM,cAAc,CAAC;AAEtB,eAAe;IACb,KAAK,EAAE,sBAAsB;IAC7B,SAAS,EAAE,QAAQ;CACZ,CAAC;AAEV,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,QAAQ,GAAG,aAAa,EACxB,QAAQ,GAAG,aAAa,EACxB,OAAO,EACP,QAAQ,EACR,UAAU,EACV,WAAW,EAAE,eAAe,EAC5B,OAAO,EACP,WAAW,EAAE,IAAI,EACjB,UAAU,EACV,KAAK,EAAE,SAAS,EAChB,SAAS,EAAE,aAAa,EACxB,QAAQ,GAAG,GAAG,EAAE,GAAE,CAAC,EACnB,UAAU,GAAG,IAAI,EACC,EAAE,EAAE;IACtB,MAAM,cAAc,GAAG,eAAe;QACpC,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,iFAAiF,CAAC;IAEtF,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,CAAC,EAAE;QAC1D,OAAO,CAC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EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,EAC1D,KAAK,EAAE,CAAC,KAAC,YAAY,IAAC,OAAO,EAAE,KAAC,KAAK,IAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,WAAI,EAAE,OAAO,EAAE,EAAE,WAAI,CAAC,WACxF,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta } from '@storybook/react';\nimport { useState } from 'react';\n\nimport {\n Avatar,\n CardContent,\n Link,\n MenuItemProps,\n Popover,\n SummaryListItem,\n Table,\n ColumnProps,\n useUID\n} from '@pega/cosmos-react-core';\nimport {\n HashtagButtonConfig,\n MentionButtonConfig,\n Feed,\n FeedPost,\n AttachedFiles\n} from '@pega/cosmos-react-social';\nimport { Glimpse, GlimpseProps } from '@pega/cosmos-react-work';\n\nimport { FeedReplyDemo } from './FeedReply.stories';\nimport {\n generatedLikes,\n caseMentions,\n userMentions,\n availableRecipients,\n FeedPostDemoProps\n} from './Feed.mocks';\n\nexport default {\n title: 'Social/Feed/FeedPost',\n component: FeedPost\n} as Meta;\n\nexport const FeedPostDemo = ({\n fullname = 'Katie Smith',\n username = 'katie_smith',\n content,\n postType,\n recipients,\n attachments: postAttachments,\n replies,\n timeElapsed: time,\n userStatus,\n likes: userLikes,\n likeCount: userLikeCount,\n onDelete = () => {},\n renderFeed = true\n}: FeedPostDemoProps) => {\n const defaultContent = postAttachments\n ? ''\n : 'This post mentions @deans:Seth DeAngelo:user: and also contains a tag! #cosmos:';\n\n const defaultReplies = Array.from(Array(12).keys(), index => {\n return (\n <FeedReplyDemo\n key={`reply-story-${index + 1}`}\n fullname={fullname}\n content={`This is reply number ${index + 1}!`}\n renderFeed={false}\n />\n );\n });\n\n const key = useUID();\n const [postContent, setPostContent] = useState(content || defaultContent);\n const [searchResults, setSearchResults] = useState<MenuItemProps[]>([]);\n\n const [likes, setLikes] = useState<SummaryListItem[]>([]);\n const [liked, setLiked] = useState(false);\n const [likeCount, setLikeCount] = useState<number>(\n userLikeCount || (renderFeed ? generatedLikes.length : 0)\n );\n const [recipientsList, setRecipientsList] = useState<MenuItemProps[]>([]);\n const [edited, setEdited] = useState(false);\n const [timeElapsed, setTimeElapsed] = useState(time || '4 days ago');\n\n const [popoverOpen, setPopoverOpen] = useState(false);\n const [popoverTarget, setPopoverTarget] = useState<Element>();\n\n const [extraReplies, setExtraReplies] = useState<any[]>([]);\n const [replyAttachments, setReplyAttachments] = useState<AttachedFiles[]>([]);\n const [replyCount, setReplyCount] = useState<number>(\n replies ? replies.length : defaultReplies.length\n );\n const [repliesLoading, setRepliesLoading] = useState(false);\n const [repliesShown, setRepliesShown] = useState(3);\n\n const [additionalLikeAdded, setAdditionalLikeAdded] = useState(false);\n const [allRecipientsVisible, setAllRecipientsVisible] = useState(false);\n\n const onShowMoreReplies = () => {\n setRepliesLoading(true);\n setTimeout(() => {\n setRepliesShown(curr => {\n if (curr + 3 <= defaultReplies.length) return curr + 3;\n return defaultReplies.length;\n });\n setRepliesLoading(false);\n }, 1000);\n };\n\n const onShowLessReplies = () => {\n setRepliesLoading(true);\n setTimeout(() => {\n setRepliesShown(3);\n setRepliesLoading(false);\n }, 1000);\n };\n\n const onSearch = ({\n type,\n search,\n mentionType\n }: {\n type: 'mention' | 'tag';\n search: string;\n mentionType: string;\n }) => {\n if (type === 'mention') {\n const availableMentions = mentionType === 'case' ? caseMentions : userMentions;\n\n const mentions: MenuItemProps[] = availableMentions\n .filter((user: GlimpseProps) => {\n const names = user.primary.toLowerCase().split(' ');\n const searchWords = search.toLowerCase().split(' ');\n return !!searchWords.every((word: string) =>\n names.find((name: string) => name.startsWith(word))\n );\n })\n .map(({ id, primary, secondary, visual }) => {\n return {\n id,\n primary,\n secondary,\n visual\n };\n });\n setSearchResults(mentions);\n } else {\n setSearchResults(\n ['cosmos', 'hashtag', 'pega']\n .filter(tag => {\n return tag.toLowerCase().includes(search.toLowerCase());\n })\n .map(tag => ({ id: tag, primary: tag }))\n );\n }\n };\n\n const onFilesAdded = (files: AttachedFiles[]) => {\n files.forEach(file => {\n if (file.type.split('/')[0] === 'image') file.thumbnail = URL.createObjectURL(file);\n\n file.onDelete = () => {\n setReplyAttachments?.(current => {\n return current.filter(x => x.name !== file.name);\n });\n };\n });\n\n setReplyAttachments(files);\n };\n\n const getInitialLikes = () => {\n if (likes.length) return;\n\n setLikes(userLikes || (renderFeed ? generatedLikes : []));\n };\n\n const generateNewLike = () => {\n setTimeout(() => {\n setLikes(oldLikes => [\n ...oldLikes,\n {\n primary: 'Generated Like',\n secondary: ['This like was added after the onLoadMore callback triggered'],\n visual: <Avatar size='l' name='Generated Like' />,\n id: 'generatedLike'\n }\n ]);\n setAdditionalLikeAdded(true);\n }, 1000);\n };\n\n const getInitialRecipients = () => {\n if (recipientsList.length) return;\n\n setRecipientsList(\n recipients ||\n availableRecipients.slice(0, !allRecipientsVisible ? 10 : availableRecipients.length)\n );\n };\n\n const getAllRecipients = () => {\n setTimeout(() => {\n setAllRecipientsVisible(true);\n setRecipientsList(recipients || availableRecipients);\n }, 1000);\n };\n\n const onMentionClick = ({ id, type }: { id: string; type: string }) => {\n if (type === 'user') {\n const user = userMentions.find(mention => mention.id === id);\n if (user) return <Glimpse {...user} />;\n }\n };\n\n const post = (\n <>\n <FeedPost\n id={key}\n key={key}\n info={{\n fullname,\n username,\n timeElapsed,\n content: postContent,\n postType,\n recipients: recipientsList,\n recipientsCount: recipients ? recipients.length : availableRecipients.length,\n attachments: postAttachments,\n liked,\n postContext: renderFeed ? (\n <Link href='https://www.pega.com' target='_blank'>\n Pega\n </Link>\n ) : undefined,\n userStatus\n }}\n interactionInfo={{\n likeLabel: 'Like',\n likes,\n likeCount: likeCount >= 10 ? likeCount + 1 : likeCount,\n commentLabel: 'Comment'\n }}\n maxContentHeight={80}\n onLikeClick={({ user }) => {\n const userLikedIndex = likes.findIndex(x => x.id === user.id);\n if (userLikedIndex !== -1) {\n setLikes(oldLikes => {\n const oldLikesArr = [...oldLikes];\n oldLikesArr.splice(userLikedIndex, 1);\n return oldLikesArr;\n });\n setLikeCount(curr => curr - 1);\n } else {\n setLikes(oldLikes => [user, ...oldLikes]);\n setLikeCount(curr => curr + 1);\n }\n setLiked(curr => !curr);\n }}\n onLikeCountInteraction={getInitialLikes}\n onLoadMoreLikes={!additionalLikeAdded ? generateNewLike : undefined}\n onRecipientInteraction={getInitialRecipients}\n onLoadMoreRecipients={!allRecipientsVisible ? getAllRecipients : undefined}\n onUserClick={(_, clickEvent) => {\n if (clickEvent) {\n setPopoverTarget(clickEvent.target as Element);\n setPopoverOpen(curr => !curr);\n }\n }}\n menuItems={[\n { primary: 'Custom action', id: 'custom', onClick: () => {} },\n { primary: 'Delete', id: 'delete', onClick: onDelete }\n ]}\n onEditSubmit={({ value }) => {\n setPostContent(value);\n setEdited(true);\n setTimeElapsed('Just now');\n }}\n edited={edited}\n replies={\n replies\n ? [...replies, ...extraReplies]\n : [...defaultReplies.slice(-repliesShown), ...extraReplies]\n }\n replyCount={replyCount}\n repliesLoading={repliesLoading}\n onShowMoreReplies={onShowMoreReplies}\n onShowLessReplies={repliesShown > 3 ? onShowLessReplies : undefined}\n replyInput={{\n commentLabel: 'Send Comment',\n attachments: replyAttachments,\n onFilesAdded,\n onSubmit: replyEvent => {\n setReplyAttachments([]);\n\n replyEvent.attachments.forEach(file => {\n delete file.onDelete;\n file.onPreview = () => {};\n file.onDownload = () => {};\n });\n\n setExtraReplies(oldReplies => [\n ...oldReplies,\n <FeedReplyDemo\n key={`replies-${oldReplies.length}`}\n fullname='Demo User'\n username='demo_user'\n content={replyEvent.value}\n attachments={replyEvent.attachments}\n timeElapsed='Just now'\n renderFeed={false}\n />\n ]);\n setReplyCount(oldReplyCount => oldReplyCount + 1);\n replyEvent.clear();\n },\n placeholder: 'Add a comment'\n }}\n />\n {popoverTarget && (\n <Popover show={popoverOpen} target={popoverTarget} placement='bottom' portal>\n <CardContent>{fullname}</CardContent>\n </Popover>\n )}\n </>\n );\n\n return renderFeed ? (\n <Feed\n searchTypes={['user', 'case']}\n onDecoratorSearch={onSearch}\n searchResults={searchResults}\n onMentionClick={onMentionClick}\n interactionRenderers={[MentionButtonConfig, HashtagButtonConfig]}\n userInfo={{ username: 'demo_user', fullname: 'Demo User' }}\n posts={[post]}\n />\n ) : (\n post\n );\n};\n\nexport const FeedPostWithPresence = () => {\n return <FeedPostDemo userStatus='active' />;\n};\n\nexport const FeedPostWithJSX = () => {\n const data = [\n {\n id: '123',\n name: 'Jane Smith',\n dob: '12/31/1990',\n address: 'Boston, MA',\n email: 'jsmith@email.com',\n balance: '$2,200'\n },\n {\n id: '456',\n name: 'Joe Smith',\n dob: '01/01/1980',\n address: '',\n email: 'joe.smith@email.com',\n balance: '$1,350'\n },\n {\n id: '789',\n name: 'Mirian Lou',\n dob: '02/29/1985',\n address: (\n <>\n <div>100 Main St.</div>\n <div>Cambridge, MA</div>\n </>\n ),\n email: '',\n balance: '$10'\n }\n ];\n\n const columns: ColumnProps<typeof data[number]>[] = [\n { renderer: 'name', label: 'Name' },\n { renderer: 'dob', label: 'Date of Birth' },\n { renderer: 'address', label: 'Address' },\n { renderer: 'email', label: 'Email' },\n { renderer: 'balance', label: 'Account Balance', align: 'right' }\n ];\n\n return (\n <Feed\n userInfo={{ username: 'demo_user', fullname: 'Demo User' }}\n posts={[<FeedPostDemo content={<Table columns={columns} data={data} />} replies={[]} />]}\n />\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"FeedPost.stories.js","sourceRoot":"","sources":["../../../src/social/Feed/FeedPost.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE9C,OAAO,EACL,MAAM,EACN,WAAW,EACX,IAAI,EAEJ,OAAO,EAEP,KAAK,EAEL,MAAM,EACP,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,IAAI,EACJ,QAAQ,EAET,MAAM,2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iB,EAAE,KAAK,EAAE,OAAO,EAAE;KAClE,CAAC;IAEF,OAAO,CACL,KAAC,IAAI,IACH,QAAQ,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,EAC1D,KAAK,EAAE,CAAC,KAAC,YAAY,IAAC,OAAO,EAAE,KAAC,KAAK,IAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,WAAI,EAAE,OAAO,EAAE,EAAE,WAAI,CAAC,WACxF,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta } from '@storybook/react';\nimport { useCallback, useState } from 'react';\n\nimport {\n Avatar,\n CardContent,\n Link,\n MenuItemProps,\n Popover,\n SummaryListItem,\n Table,\n ColumnProps,\n useUID\n} from '@pega/cosmos-react-core';\nimport {\n HashtagButtonConfig,\n MentionButtonConfig,\n Feed,\n FeedPost,\n AttachedFiles\n} from '@pega/cosmos-react-social';\nimport { Glimpse, GlimpseProps } from '@pega/cosmos-react-work';\n\nimport { FeedReplyDemo } from './FeedReply.stories';\nimport {\n generatedLikes,\n caseMentions,\n userMentions,\n availableRecipients,\n FeedPostDemoProps\n} from './Feed.mocks';\n\nexport default {\n title: 'Social/Feed/FeedPost',\n component: FeedPost\n} as Meta;\n\nexport const FeedPostDemo = ({\n fullname = 'Katie Smith',\n username = 'katie_smith',\n content,\n postType,\n recipients,\n attachments: postAttachments,\n replies,\n timeElapsed: time,\n userStatus,\n likes: userLikes,\n likeCount: userLikeCount,\n onDelete = () => {},\n renderFeed = true\n}: FeedPostDemoProps) => {\n const defaultContent = postAttachments\n ? ''\n : 'This post mentions @deans:Seth DeAngelo:user: and also contains a tag! #cosmos:';\n\n const defaultReplies = Array.from(Array(12).keys(), index => {\n return (\n <FeedReplyDemo\n key={`reply-story-${index + 1}`}\n fullname={fullname}\n content={`This is reply number ${index + 1}!`}\n renderFeed={false}\n />\n );\n });\n\n const key = useUID();\n const [postContent, setPostContent] = useState(content || defaultContent);\n const [searchResults, setSearchResults] = useState<MenuItemProps[]>([]);\n\n const [likes, setLikes] = useState<SummaryListItem[]>([]);\n const [liked, setLiked] = useState(false);\n const [likeCount, setLikeCount] = useState<number>(\n userLikeCount || (renderFeed ? generatedLikes.length : 0)\n );\n const [recipientsList, setRecipientsList] = useState<MenuItemProps[]>([]);\n const [edited, setEdited] = useState(false);\n const [timeElapsed, setTimeElapsed] = useState(time || '4 days ago');\n\n const [popoverOpen, setPopoverOpen] = useState(false);\n const [popoverTarget, setPopoverTarget] = useState<Element>();\n\n const [extraReplies, setExtraReplies] = useState<any[]>([]);\n const [replyAttachments, setReplyAttachments] = useState<AttachedFiles[]>([]);\n const [replyCount, setReplyCount] = useState<number>(\n replies ? replies.length : defaultReplies.length\n );\n const [repliesLoading, setRepliesLoading] = useState(false);\n const [repliesShown, setRepliesShown] = useState(3);\n\n const [additionalLikeAdded, setAdditionalLikeAdded] = useState(false);\n const [allRecipientsVisible, setAllRecipientsVisible] = useState(false);\n\n const onShowMoreReplies = () => {\n setRepliesLoading(true);\n setTimeout(() => {\n setRepliesShown(curr => {\n if (curr + 3 <= defaultReplies.length) return curr + 3;\n return defaultReplies.length;\n });\n setRepliesLoading(false);\n }, 1000);\n };\n\n const onShowLessReplies = () => {\n setRepliesLoading(true);\n setTimeout(() => {\n setRepliesShown(3);\n setRepliesLoading(false);\n }, 1000);\n };\n\n const onSearch = ({\n type,\n search,\n mentionType\n }: {\n type: 'mention' | 'tag';\n search: string;\n mentionType: string;\n }) => {\n if (type === 'mention') {\n const availableMentions = mentionType === 'case' ? caseMentions : userMentions;\n\n const mentions: MenuItemProps[] = availableMentions\n .filter((user: GlimpseProps) => {\n const names = user.primary.toLowerCase().split(' ');\n const searchWords = search.toLowerCase().split(' ');\n return !!searchWords.every((word: string) =>\n names.find((name: string) => name.startsWith(word))\n );\n })\n .map(({ id, primary, secondary, visual }) => {\n return {\n id,\n primary,\n secondary,\n visual\n };\n });\n setSearchResults(mentions);\n } else {\n setSearchResults(\n ['cosmos', 'hashtag', 'pega']\n .filter(tag => {\n return tag.toLowerCase().includes(search.toLowerCase());\n })\n .map(tag => ({ id: tag, primary: tag }))\n );\n }\n };\n\n const onFilesAdded = (files: AttachedFiles[]) => {\n files.forEach(file => {\n if (file.type.split('/')[0] === 'image') file.thumbnail = URL.createObjectURL(file);\n\n file.onDelete = () => {\n setReplyAttachments?.(current => {\n return current.filter(x => x.name !== file.name);\n });\n };\n });\n\n setReplyAttachments(files);\n };\n\n const getInitialLikes = () => {\n if (likes.length) return;\n\n setLikes(userLikes || (renderFeed ? generatedLikes : []));\n };\n\n const [likesLoading, setLikesLoading] = useState(false);\n\n const generateNewLike = useCallback(() => {\n if (!likesLoading) {\n setLikesLoading(true);\n setTimeout(() => {\n setLikesLoading(false);\n setLikes(oldLikes => [\n ...oldLikes,\n {\n primary: 'Generated Like',\n secondary: ['This like was added after the onLoadMore callback triggered'],\n visual: <Avatar size='l' name='Generated Like' />,\n id: 'generatedLike'\n }\n ]);\n setAdditionalLikeAdded(true);\n }, 1000);\n }\n }, [likesLoading]);\n\n const getInitialRecipients = () => {\n if (recipientsList.length) return;\n\n setRecipientsList(\n recipients ||\n availableRecipients.slice(0, !allRecipientsVisible ? 10 : availableRecipients.length)\n );\n };\n\n const [recipientsLoading, setRecipientsLoading] = useState(false);\n\n const getAllRecipients = () => {\n if (!recipientsLoading) {\n setRecipientsLoading(true);\n setTimeout(() => {\n setRecipientsLoading(false);\n setAllRecipientsVisible(true);\n setRecipientsList(recipients || availableRecipients);\n }, 1000);\n }\n };\n\n const onMentionClick = ({ id, type }: { id: string; type: string }) => {\n if (type === 'user') {\n const user = userMentions.find(mention => mention.id === id);\n if (user) return <Glimpse {...user} />;\n }\n };\n\n const post = (\n <>\n <FeedPost\n id={key}\n key={key}\n info={{\n fullname,\n username,\n timeElapsed,\n content: postContent,\n postType,\n recipients: recipientsList,\n recipientsCount: recipients ? recipients.length : availableRecipients.length,\n attachments: postAttachments,\n liked,\n postContext: renderFeed ? (\n <Link href='https://www.pega.com' target='_blank'>\n Pega\n </Link>\n ) : undefined,\n userStatus\n }}\n interactionInfo={{\n likeLabel: 'Like',\n likes,\n likeCount: likeCount >= 10 ? likeCount + 1 : likeCount,\n commentLabel: 'Comment'\n }}\n maxContentHeight={80}\n onLikeClick={({ user }) => {\n const userLikedIndex = likes.findIndex(x => x.id === user.id);\n if (userLikedIndex !== -1) {\n setLikes(oldLikes => {\n const oldLikesArr = [...oldLikes];\n oldLikesArr.splice(userLikedIndex, 1);\n return oldLikesArr;\n });\n setLikeCount(curr => curr - 1);\n } else {\n setLikes(oldLikes => [user, ...oldLikes]);\n setLikeCount(curr => curr + 1);\n }\n setLiked(curr => !curr);\n }}\n onLikeCountInteraction={getInitialLikes}\n likesLoading={likesLoading}\n onLoadMoreLikes={!additionalLikeAdded ? generateNewLike : undefined}\n onRecipientInteraction={getInitialRecipients}\n recipientsLoading={recipientsLoading}\n onLoadMoreRecipients={!allRecipientsVisible ? getAllRecipients : undefined}\n onUserClick={(_, clickEvent) => {\n if (clickEvent) {\n setPopoverTarget(clickEvent.target as Element);\n setPopoverOpen(curr => !curr);\n }\n }}\n menuItems={[\n { primary: 'Custom action', id: 'custom', onClick: () => {} },\n { primary: 'Delete', id: 'delete', onClick: onDelete }\n ]}\n onEditSubmit={({ value }) => {\n setPostContent(value);\n setEdited(true);\n setTimeElapsed('Just now');\n }}\n edited={edited}\n replies={\n replies\n ? [...replies, ...extraReplies]\n : [...defaultReplies.slice(-repliesShown), ...extraReplies]\n }\n replyCount={replyCount}\n repliesLoading={repliesLoading}\n onShowMoreReplies={onShowMoreReplies}\n onShowLessReplies={repliesShown > 3 ? onShowLessReplies : undefined}\n replyInput={{\n commentLabel: 'Send Comment',\n attachments: replyAttachments,\n onFilesAdded,\n onSubmit: replyEvent => {\n setReplyAttachments([]);\n\n replyEvent.attachments.forEach(file => {\n delete file.onDelete;\n file.onPreview = () => {};\n file.onDownload = () => {};\n });\n\n setExtraReplies(oldReplies => [\n ...oldReplies,\n <FeedReplyDemo\n key={`replies-${oldReplies.length}`}\n fullname='Demo User'\n username='demo_user'\n content={replyEvent.value}\n attachments={replyEvent.attachments}\n timeElapsed='Just now'\n renderFeed={false}\n />\n ]);\n setReplyCount(oldReplyCount => oldReplyCount + 1);\n replyEvent.clear();\n },\n placeholder: 'Add a comment'\n }}\n />\n {popoverTarget && (\n <Popover show={popoverOpen} target={popoverTarget} placement='bottom' portal>\n <CardContent>{fullname}</CardContent>\n </Popover>\n )}\n </>\n );\n\n return renderFeed ? (\n <Feed\n searchTypes={['user', 'case']}\n onDecoratorSearch={onSearch}\n searchResults={searchResults}\n onMentionClick={onMentionClick}\n interactionRenderers={[MentionButtonConfig, HashtagButtonConfig]}\n userInfo={{ username: 'demo_user', fullname: 'Demo User' }}\n posts={[post]}\n />\n ) : (\n post\n );\n};\n\nexport const FeedPostWithPresence = () => {\n return <FeedPostDemo userStatus='active' />;\n};\n\nexport const FeedPostWithJSX = () => {\n const data = [\n {\n id: '123',\n name: 'Jane Smith',\n dob: '12/31/1990',\n address: 'Boston, MA',\n email: 'jsmith@email.com',\n balance: '$2,200'\n },\n {\n id: '456',\n name: 'Joe Smith',\n dob: '01/01/1980',\n address: '',\n email: 'joe.smith@email.com',\n balance: '$1,350'\n },\n {\n id: '789',\n name: 'Mirian Lou',\n dob: '02/29/1985',\n address: (\n <>\n <div>100 Main St.</div>\n <div>Cambridge, MA</div>\n </>\n ),\n email: '',\n balance: '$10'\n }\n ];\n\n const columns: ColumnProps<typeof data[number]>[] = [\n { renderer: 'name', label: 'Name' },\n { renderer: 'dob', label: 'Date of Birth' },\n { renderer: 'address', label: 'Address' },\n { renderer: 'email', label: 'Email' },\n { renderer: 'balance', label: 'Account Balance', align: 'right' }\n ];\n\n return (\n <Feed\n userInfo={{ username: 'demo_user', fullname: 'Demo User' }}\n posts={[<FeedPostDemo content={<Table columns={columns} data={data} />} replies={[]} />]}\n />\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeedReply.stories.d.ts","sourceRoot":"","sources":["../../../src/social/Feed/FeedReply.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAIxC,OAAO,EAGL,cAAc,EAGf,MAAM,2BAA2B,CAAC;;AAKnC,wBAGU;AAEV,eAAO,MAAM,aAAa;;;;kBAYV,cAAc,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC;;iBAEtC,cAAc,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC;;
|
|
1
|
+
{"version":3,"file":"FeedReply.stories.d.ts","sourceRoot":"","sources":["../../../src/social/Feed/FeedReply.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAIxC,OAAO,EAGL,cAAc,EAGf,MAAM,2BAA2B,CAAC;;AAKnC,wBAGU;AAEV,eAAO,MAAM,aAAa;;;;kBAYV,cAAc,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC;;iBAEtC,cAAc,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC;;iBA6HlD,CAAC;AAEF,eAAO,MAAM,qBAAqB,mBAEjC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from 'react';
|
|
2
|
+
import { useState, useCallback } from 'react';
|
|
3
3
|
import { Avatar, CardContent, Popover, useUID } from '@pega/cosmos-react-core';
|
|
4
4
|
import { Feed, FeedReply, HashtagButtonConfig, MentionButtonConfig } from '@pega/cosmos-react-social';
|
|
5
5
|
import { Glimpse } from '@pega/cosmos-react-work';
|
|
@@ -27,20 +27,25 @@ export const FeedReplyDemo = ({ fullname = 'Katie Smith', username = 'katie_smit
|
|
|
27
27
|
return;
|
|
28
28
|
setLikes(renderFeed ? generatedLikes : []);
|
|
29
29
|
};
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
30
|
+
const [likesLoading, setLikesLoading] = useState(false);
|
|
31
|
+
const generateNewLike = useCallback(() => {
|
|
32
|
+
if (!likesLoading) {
|
|
33
|
+
setLikesLoading(true);
|
|
34
|
+
setTimeout(() => {
|
|
35
|
+
setLikesLoading(false);
|
|
36
|
+
setLikes(oldLikes => [
|
|
37
|
+
...oldLikes,
|
|
38
|
+
{
|
|
39
|
+
primary: 'Generated Like',
|
|
40
|
+
secondary: ['This like was added after the onLoadMore callback triggered'],
|
|
41
|
+
visual: _jsx(Avatar, { size: 'l', name: 'Generated Like' }, void 0),
|
|
42
|
+
id: 'generatedLike'
|
|
43
|
+
}
|
|
44
|
+
]);
|
|
45
|
+
setAdditionalLikeAdded(true);
|
|
46
|
+
}, 1000);
|
|
47
|
+
}
|
|
48
|
+
}, [likesLoading]);
|
|
44
49
|
const onMentionClick = ({ id, type }) => {
|
|
45
50
|
if (type === 'user') {
|
|
46
51
|
const user = userMentions.find(mention => mention.id === id);
|
|
@@ -81,7 +86,7 @@ export const FeedReplyDemo = ({ fullname = 'Katie Smith', username = 'katie_smit
|
|
|
81
86
|
setLikeCount(curr => curr + 1);
|
|
82
87
|
}
|
|
83
88
|
setLiked(curr => !curr);
|
|
84
|
-
}, onLikeCountInteraction: getInitialLikes, onLoadMoreLikes: !additionalLikeAdded ? generateNewLike : undefined, onUserClick: (_, clickEvent) => {
|
|
89
|
+
}, onLikeCountInteraction: getInitialLikes, onLoadMoreLikes: !additionalLikeAdded ? generateNewLike : undefined, likesLoading: likesLoading, onUserClick: (_, clickEvent) => {
|
|
85
90
|
if (clickEvent) {
|
|
86
91
|
setPopoverTarget(clickEvent.target);
|
|
87
92
|
setPopoverOpen(curr => !curr);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeedReply.stories.js","sourceRoot":"","sources":["../../../src/social/Feed/FeedReply.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"FeedReply.stories.js","sourceRoot":"","sources":["../../../src/social/Feed/FeedReply.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAmB,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAChG,OAAO,EACL,IAAI,EACJ,SAAS,EAET,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAElD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5D,eAAe;IACb,KAAK,EAAE,uBAAuB;IAC9B,SAAS,EAAE,SAAS;CACb,CAAC;AAEV,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC5B,QAAQ,GAAG,aAAa,EACxB,QAAQ,GAAG,aAAa,EACxB,OAAO,EACP,WAAW,EACX,WAAW,EAAE,IAAI,EACjB,UAAU,EACV,UAAU,GAAG,IAAI,EASlB,EAAE,EAAE;IACH,MAAM,cAAc,GAAG,WAAW;QAChC,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,kFAAkF,CAAC;IAEvF,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;IACrB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAoB,EAAE,CAAC,CAAC;IAC1D,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC1C,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,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AAa,IAAI,CAChB,KAAC,OAAO,IAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,EAAC,QAAQ,EAAC,MAAM,kBAC1E,KAAC,WAAW,cAAE,QAAQ,WAAe,WAC7B,CACX,YACA,CACJ,CAAC;IAEF,OAAO,UAAU,CAAC,CAAC,CAAC,CAClB,KAAC,IAAI,IACH,cAAc,EAAE,cAAc,EAC9B,oBAAoB,EAAE,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,EAChE,QAAQ,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,EAC1D,KAAK,EAAE,CAAC,KAAK,CAAC,WACd,CACH,CAAC,CAAC,CAAC,CACF,KAAK,CACN,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,EAAE;IACxC,OAAO,KAAC,aAAa,IAAC,UAAU,EAAC,QAAQ,WAAG,CAAC;AAC/C,CAAC,CAAC","sourcesContent":["import { Meta } from '@storybook/react';\nimport { useState, useCallback } from 'react';\n\nimport { Avatar, CardContent, Popover, SummaryListItem, useUID } from '@pega/cosmos-react-core';\nimport {\n Feed,\n FeedReply,\n FeedReplyProps,\n HashtagButtonConfig,\n MentionButtonConfig\n} from '@pega/cosmos-react-social';\nimport { Glimpse } from '@pega/cosmos-react-work';\n\nimport { generatedLikes, userMentions } from './Feed.mocks';\n\nexport default {\n title: 'Social/Feed/FeedReply',\n component: FeedReply\n} as Meta;\n\nexport const FeedReplyDemo = ({\n fullname = 'Katie Smith',\n username = 'katie_smith',\n content,\n attachments,\n timeElapsed: time,\n userStatus,\n renderFeed = true\n}: {\n fullname?: FeedReplyProps['info']['fullname'];\n username?: FeedReplyProps['info']['username'];\n content?: FeedReplyProps['info']['content'];\n attachments?: FeedReplyProps['info']['attachments'];\n timeElapsed?: FeedReplyProps['info']['timeElapsed'];\n userStatus?: FeedReplyProps['info']['userStatus'];\n renderFeed?: boolean;\n}) => {\n const defaultContent = attachments\n ? ''\n : 'This reply mentions @deans:Seth DeAngelo:user: and also contains a tag! #cosmos:';\n\n const key = useUID();\n const [likes, setLikes] = useState<SummaryListItem[]>([]);\n const [liked, setLiked] = useState(false);\n const [likeCount, setLikeCount] = useState(renderFeed ? generatedLikes.length : 0);\n const [replyContent, setReplyContent] = useState(content || defaultContent);\n const [edited, setEdited] = useState(false);\n const [timeElapsed, setTimeElapsed] = useState(time || '3 days ago');\n const [popoverOpen, setPopoverOpen] = useState(false);\n const [popoverTarget, setPopoverTarget] = useState<Element>();\n const [additionalLikeAdded, setAdditionalLikeAdded] = useState(false);\n\n const getInitialLikes = () => {\n if (likes.length) return;\n\n setLikes(renderFeed ? generatedLikes : []);\n };\n\n const [likesLoading, setLikesLoading] = useState(false);\n\n const generateNewLike = useCallback(() => {\n if (!likesLoading) {\n setLikesLoading(true);\n setTimeout(() => {\n setLikesLoading(false);\n setLikes(oldLikes => [\n ...oldLikes,\n {\n primary: 'Generated Like',\n secondary: ['This like was added after the onLoadMore callback triggered'],\n visual: <Avatar size='l' name='Generated Like' />,\n id: 'generatedLike'\n }\n ]);\n setAdditionalLikeAdded(true);\n }, 1000);\n }\n }, [likesLoading]);\n\n const onMentionClick = ({ id, type }: { id: string; type: string }) => {\n if (type === 'user') {\n const user = userMentions.find(mention => mention.id === id);\n if (user) return <Glimpse {...user} />;\n }\n };\n\n const reply = (\n <>\n <FeedReply\n id={key}\n key={key}\n info={{\n timeElapsed,\n content: replyContent,\n attachments,\n username,\n fullname,\n fullnameLabel: `${fullname}'s Profile`,\n liked,\n userStatus\n }}\n interactionInfo={{\n likes,\n likeCount: likeCount >= 10 ? likeCount + 1 : likeCount,\n likeLabel: 'Like',\n commentLabel: 'Comment'\n }}\n maxContentHeight={40}\n menuItems={[{ primary: 'Custom action', id: 'custom', onClick: () => {} }]}\n onEditSubmit={({ value }) => {\n setReplyContent(value);\n setEdited(true);\n setTimeElapsed('Just now');\n }}\n edited={edited}\n onCommentClick={() => {}}\n onLikeClick={({ user }) => {\n const userLikedIndex = likes.findIndex(x => x.id === user.id);\n if (userLikedIndex !== -1) {\n setLikes(oldLikes => {\n const oldLikesArr = [...oldLikes];\n oldLikesArr.splice(userLikedIndex, 1);\n return oldLikesArr;\n });\n setLikeCount(curr => curr - 1);\n } else {\n setLikes(oldLikes => [user, ...oldLikes]);\n setLikeCount(curr => curr + 1);\n }\n setLiked(curr => !curr);\n }}\n onLikeCountInteraction={getInitialLikes}\n onLoadMoreLikes={!additionalLikeAdded ? generateNewLike : undefined}\n likesLoading={likesLoading}\n onUserClick={(_, clickEvent) => {\n if (clickEvent) {\n setPopoverTarget(clickEvent.target as Element);\n setPopoverOpen(curr => !curr);\n }\n }}\n />\n {popoverTarget && (\n <Popover show={popoverOpen} target={popoverTarget} placement='bottom' portal>\n <CardContent>{fullname}</CardContent>\n </Popover>\n )}\n </>\n );\n\n return renderFeed ? (\n <Feed\n onMentionClick={onMentionClick}\n interactionRenderers={[MentionButtonConfig, HashtagButtonConfig]}\n userInfo={{ username: 'demo_user', fullname: 'Demo User' }}\n posts={[reply]}\n />\n ) : (\n reply\n );\n};\n\nexport const FeedReplyWithPresence = () => {\n return <FeedReplyDemo userStatus='active' />;\n};\n"]}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
component: import("react").FC<import("@pega/cosmos-react-core").ForwardProps & import("@pega/cosmos-react-work").MobileCaseViewProps>;
|
|
5
|
-
parameters: {
|
|
6
|
-
layout: string;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
2
|
+
import { Meta } from '@storybook/react';
|
|
3
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
9
4
|
export default _default;
|
|
10
5
|
export declare const MobileCaseViewDemo: () => JSX.Element;
|
|
11
6
|
//# sourceMappingURL=MobileCaseView.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileCaseView.stories.d.ts","sourceRoot":"","sources":["../../../src/work/CaseView/MobileCaseView.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MobileCaseView.stories.d.ts","sourceRoot":"","sources":["../../../src/work/CaseView/MobileCaseView.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;;AAIxC,wBAMU;AAEV,eAAO,MAAM,kBAAkB,mBAyB9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileCaseView.stories.js","sourceRoot":"","sources":["../../../src/work/CaseView/MobileCaseView.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"MobileCaseView.stories.js","sourceRoot":"","sources":["../../../src/work/CaseView/MobileCaseView.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAG9C,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,eAAe;IACb,KAAK,EAAE,sBAAsB;IAC7B,SAAS,EAAE,cAAc;IACzB,UAAU,EAAE;QACV,MAAM,EAAE,YAAY;KACrB;CACM,CAAC;AAEV,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACrC,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE;QAClD,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;QACvB,OAAO,EAAE,IAAI,EAAE,aAAa,GAAG,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC;IAC/C,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC7D,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAE3D,MAAM,UAAU,GAAG,WAAW,CAAC,CAAC,EAAU,EAAE,EAAE;QAC5C,eAAe,CAAC,EAAE,CAAC,CAAC;QACpB,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IAC7D,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,KAAC,cAAc,IACb,KAAK,EAAC,wBAAwB,EAC9B,IAAI,EAAE;YACJ,IAAI;YACJ,UAAU;YACV,YAAY;SACb,EACD,UAAU,EAAE,cAAK,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAG,UAAU,WAAO,WACjE,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useState, useCallback } from 'react';\nimport { Meta } from '@storybook/react';\n\nimport { MobileCaseView } from '@pega/cosmos-react-work';\n\nexport default {\n title: 'Work/CaseView/Mobile',\n component: MobileCaseView,\n parameters: {\n layout: 'fullscreen'\n }\n} as Meta;\n\nexport const MobileCaseViewDemo = () => {\n const tabs = Array.from({ length: 2 }, (undef, i) => {\n const key = `${i + 1}`;\n return { name: `Hello tab ${key}`, id: key };\n });\n\n const [currentTabId, setCurrentTabId] = useState(tabs[0].id);\n const [tabContent, setTabContent] = useState(tabs[0].name);\n\n const onTabClick = useCallback((id: string) => {\n setCurrentTabId(id);\n setTabContent(tabs.find(tab => tab.id === id)?.name ?? '');\n }, []);\n\n return (\n <MobileCaseView\n title='Mobile Case View Story'\n tabs={{\n tabs,\n onTabClick,\n currentTabId\n }}\n tabContent={<div style={{ padding: '2.5rem' }}>{tabContent}</div>}\n />\n );\n};\n"]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Placeholder: ({ text }: {
|
|
3
|
+
text: string;
|
|
4
|
+
}) => JSX.Element;
|
|
5
|
+
export declare const regionAItems: ({
|
|
6
|
+
id: string;
|
|
7
|
+
content: JSX.Element;
|
|
8
|
+
layoutConfig: {
|
|
9
|
+
width: string;
|
|
10
|
+
minWidth: number;
|
|
11
|
+
};
|
|
12
|
+
} | {
|
|
13
|
+
id: string;
|
|
14
|
+
content: JSX.Element;
|
|
15
|
+
layoutConfig: {
|
|
16
|
+
width: string;
|
|
17
|
+
minWidth?: undefined;
|
|
18
|
+
};
|
|
19
|
+
})[];
|
|
20
|
+
export declare const regionBItems: ({
|
|
21
|
+
id: string;
|
|
22
|
+
content: JSX.Element;
|
|
23
|
+
layoutConfig: {
|
|
24
|
+
width: string;
|
|
25
|
+
minWidth: number;
|
|
26
|
+
fillAvailable?: undefined;
|
|
27
|
+
};
|
|
28
|
+
} | {
|
|
29
|
+
id: string;
|
|
30
|
+
content: JSX.Element;
|
|
31
|
+
layoutConfig: {
|
|
32
|
+
width: string;
|
|
33
|
+
minWidth?: undefined;
|
|
34
|
+
fillAvailable?: undefined;
|
|
35
|
+
};
|
|
36
|
+
} | {
|
|
37
|
+
id: string;
|
|
38
|
+
content: JSX.Element;
|
|
39
|
+
layoutConfig: {
|
|
40
|
+
width: string;
|
|
41
|
+
minWidth: number;
|
|
42
|
+
fillAvailable: boolean;
|
|
43
|
+
};
|
|
44
|
+
})[];
|
|
45
|
+
//# sourceMappingURL=ConfigurableLayout.mocks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigurableLayout.mocks.d.ts","sourceRoot":"","sources":["../../../src/work/ConfigurableLayout/ConfigurableLayout.mocks.tsx"],"names":[],"mappings":";AAIA,eAAO,MAAM,WAAW;UAAsB,MAAM;iBAUnD,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;IA8DxB,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;IA2FxB,CAAC"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Flex } from '@pega/cosmos-react-core';
|
|
3
|
+
import { StyledPlaceholder } from './ConfigurableLayout.styles';
|
|
4
|
+
export const Placeholder = ({ text }) => {
|
|
5
|
+
const props = {
|
|
6
|
+
verticalPadding: Math.floor(Math.random() * (4 - 1 + 1)) + 1
|
|
7
|
+
};
|
|
8
|
+
return (_jsx(Flex, { as: StyledPlaceholder, container: { direction: 'column', justify: 'center' }, ...props, children: _jsx("p", { children: text }, void 0) }, void 0));
|
|
9
|
+
};
|
|
10
|
+
export const regionAItems = [
|
|
11
|
+
{
|
|
12
|
+
id: 'a0',
|
|
13
|
+
content: _jsx(Placeholder, { text: 'A0' }, void 0),
|
|
14
|
+
layoutConfig: {
|
|
15
|
+
width: '1/4',
|
|
16
|
+
minWidth: 150
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: 'a1',
|
|
21
|
+
content: _jsx(Placeholder, { text: 'A1' }, void 0),
|
|
22
|
+
layoutConfig: {
|
|
23
|
+
width: '1/4',
|
|
24
|
+
minWidth: 150
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: 'a2',
|
|
29
|
+
content: _jsx(Placeholder, { text: 'A2' }, void 0),
|
|
30
|
+
layoutConfig: {
|
|
31
|
+
width: '1/4',
|
|
32
|
+
minWidth: 150
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: 'a3',
|
|
37
|
+
content: _jsx(Placeholder, { text: 'A3' }, void 0),
|
|
38
|
+
layoutConfig: {
|
|
39
|
+
width: '1/4',
|
|
40
|
+
minWidth: 150
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: 'a4',
|
|
45
|
+
content: _jsx(Placeholder, { text: 'A4' }, void 0),
|
|
46
|
+
layoutConfig: {
|
|
47
|
+
width: '3/4'
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: 'a5',
|
|
52
|
+
content: _jsx(Placeholder, { text: 'A5' }, void 0),
|
|
53
|
+
layoutConfig: {
|
|
54
|
+
width: '1/4',
|
|
55
|
+
minWidth: 150
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: 'a6',
|
|
60
|
+
content: _jsx(Placeholder, { text: 'A6' }, void 0),
|
|
61
|
+
layoutConfig: {
|
|
62
|
+
width: '1/3'
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: 'a7',
|
|
67
|
+
content: _jsx(Placeholder, { text: 'A7' }, void 0),
|
|
68
|
+
layoutConfig: {
|
|
69
|
+
width: '2/3'
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
];
|
|
73
|
+
export const regionBItems = [
|
|
74
|
+
{
|
|
75
|
+
id: 'b0',
|
|
76
|
+
content: _jsx(Placeholder, { text: 'B0' }, void 0),
|
|
77
|
+
layoutConfig: {
|
|
78
|
+
width: '1/4',
|
|
79
|
+
minWidth: 150
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: 'b1',
|
|
84
|
+
content: _jsx(Placeholder, { text: 'B1' }, void 0),
|
|
85
|
+
layoutConfig: {
|
|
86
|
+
width: '1/4',
|
|
87
|
+
minWidth: 150
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
id: 'b2',
|
|
92
|
+
content: _jsx(Placeholder, { text: 'B2' }, void 0),
|
|
93
|
+
layoutConfig: {
|
|
94
|
+
width: '1/4',
|
|
95
|
+
minWidth: 150
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: 'b3',
|
|
100
|
+
content: _jsx(Placeholder, { text: 'B3' }, void 0),
|
|
101
|
+
layoutConfig: {
|
|
102
|
+
width: '1/4',
|
|
103
|
+
minWidth: 150
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: 'b4',
|
|
108
|
+
content: _jsx(Placeholder, { text: 'B4' }, void 0),
|
|
109
|
+
layoutConfig: {
|
|
110
|
+
width: '1/2'
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
id: 'b5',
|
|
115
|
+
content: _jsx(Placeholder, { text: 'B5' }, void 0),
|
|
116
|
+
layoutConfig: {
|
|
117
|
+
width: '1/2'
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
id: 'b6',
|
|
122
|
+
content: _jsx(Placeholder, { text: 'B6' }, void 0),
|
|
123
|
+
layoutConfig: {
|
|
124
|
+
width: 'full'
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
id: 'b7',
|
|
129
|
+
content: _jsx(Placeholder, { text: 'B7' }, void 0),
|
|
130
|
+
layoutConfig: {
|
|
131
|
+
width: '1/3'
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
id: 'b8',
|
|
136
|
+
content: _jsx(Placeholder, { text: 'B8' }, void 0),
|
|
137
|
+
layoutConfig: {
|
|
138
|
+
width: '2/3'
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
id: 'b9',
|
|
143
|
+
content: _jsx(Placeholder, { text: 'B9' }, void 0),
|
|
144
|
+
layoutConfig: {
|
|
145
|
+
width: '3/4'
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
id: 'b10',
|
|
150
|
+
content: _jsx(Placeholder, { text: 'B10' }, void 0),
|
|
151
|
+
layoutConfig: {
|
|
152
|
+
width: '1/4'
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
id: 'b11',
|
|
157
|
+
content: _jsx(Placeholder, { text: 'B11' }, void 0),
|
|
158
|
+
layoutConfig: {
|
|
159
|
+
width: '1/4',
|
|
160
|
+
minWidth: 330,
|
|
161
|
+
fillAvailable: false
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
];
|
|
165
|
+
//# sourceMappingURL=ConfigurableLayout.mocks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigurableLayout.mocks.js","sourceRoot":"","sources":["../../../src/work/ConfigurableLayout/ConfigurableLayout.mocks.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAE/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAAE,IAAI,EAAoB,EAAE,EAAE;IACxD,MAAM,KAAK,GAAG;QACZ,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;KAC7D,CAAC;IAEF,OAAO,CACL,KAAC,IAAI,IAAC,EAAE,EAAE,iBAAiB,EAAE,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAM,KAAK,YAC3F,sBAAI,IAAI,WAAK,WACR,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B;QACE,EAAE,EAAE,IAAI;QACR,OAAO,EAAE,KAAC,WAAW,IAAC,IAAI,EAAC,IAAI,WAAG;QAClC,YAAY,EAAE;YACZ,KAAK,EAAE,KAAK;YACZ,QAAQ,EAAE,GAAG;SACd;KACF;IACD;QACE,EAAE,EAAE,IAAI;QACR,OAAO,EAAE,KAAC,WAAW,IAAC,IAAI,EAAC,IAAI,WAAG;QAClC,YAA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AY,EAAE;YACZ,KAAK,EAAE,KAAK;SACb;KACF;IACD;QACE,EAAE,EAAE,KAAK;QACT,OAAO,EAAE,KAAC,WAAW,IAAC,IAAI,EAAC,KAAK,WAAG;QACnC,YAAY,EAAE;YACZ,KAAK,EAAE,KAAK;SACb;KACF;IACD;QACE,EAAE,EAAE,KAAK;QACT,OAAO,EAAE,KAAC,WAAW,IAAC,IAAI,EAAC,KAAK,WAAG;QACnC,YAAY,EAAE;YACZ,KAAK,EAAE,KAAK;YACZ,QAAQ,EAAE,GAAG;YACb,aAAa,EAAE,KAAK;SACrB;KACF;CACF,CAAC","sourcesContent":["import { Flex } from '@pega/cosmos-react-core';\n\nimport { StyledPlaceholder } from './ConfigurableLayout.styles';\n\nexport const Placeholder = ({ text }: { text: string }) => {\n const props = {\n verticalPadding: Math.floor(Math.random() * (4 - 1 + 1)) + 1\n };\n\n return (\n <Flex as={StyledPlaceholder} container={{ direction: 'column', justify: 'center' }} {...props}>\n <p>{text}</p>\n </Flex>\n );\n};\n\nexport const regionAItems = [\n {\n id: 'a0',\n content: <Placeholder text='A0' />,\n layoutConfig: {\n width: '1/4',\n minWidth: 150\n }\n },\n {\n id: 'a1',\n content: <Placeholder text='A1' />,\n layoutConfig: {\n width: '1/4',\n minWidth: 150\n }\n },\n {\n id: 'a2',\n content: <Placeholder text='A2' />,\n layoutConfig: {\n width: '1/4',\n minWidth: 150\n }\n },\n {\n id: 'a3',\n content: <Placeholder text='A3' />,\n layoutConfig: {\n width: '1/4',\n minWidth: 150\n }\n },\n {\n id: 'a4',\n content: <Placeholder text='A4' />,\n layoutConfig: {\n width: '3/4'\n }\n },\n {\n id: 'a5',\n content: <Placeholder text='A5' />,\n layoutConfig: {\n width: '1/4',\n minWidth: 150\n }\n },\n {\n id: 'a6',\n content: <Placeholder text='A6' />,\n layoutConfig: {\n width: '1/3'\n }\n },\n {\n id: 'a7',\n content: <Placeholder text='A7' />,\n layoutConfig: {\n width: '2/3'\n }\n }\n];\n\nexport const regionBItems = [\n {\n id: 'b0',\n content: <Placeholder text='B0' />,\n layoutConfig: {\n width: '1/4',\n minWidth: 150\n }\n },\n {\n id: 'b1',\n content: <Placeholder text='B1' />,\n layoutConfig: {\n width: '1/4',\n minWidth: 150\n }\n },\n {\n id: 'b2',\n content: <Placeholder text='B2' />,\n layoutConfig: {\n width: '1/4',\n minWidth: 150\n }\n },\n {\n id: 'b3',\n content: <Placeholder text='B3' />,\n layoutConfig: {\n width: '1/4',\n minWidth: 150\n }\n },\n {\n id: 'b4',\n content: <Placeholder text='B4' />,\n layoutConfig: {\n width: '1/2'\n }\n },\n {\n id: 'b5',\n content: <Placeholder text='B5' />,\n layoutConfig: {\n width: '1/2'\n }\n },\n {\n id: 'b6',\n content: <Placeholder text='B6' />,\n layoutConfig: {\n width: 'full'\n }\n },\n {\n id: 'b7',\n content: <Placeholder text='B7' />,\n layoutConfig: {\n width: '1/3'\n }\n },\n {\n id: 'b8',\n content: <Placeholder text='B8' />,\n layoutConfig: {\n width: '2/3'\n }\n },\n {\n id: 'b9',\n content: <Placeholder text='B9' />,\n layoutConfig: {\n width: '3/4'\n }\n },\n {\n id: 'b10',\n content: <Placeholder text='B10' />,\n layoutConfig: {\n width: '1/4'\n }\n },\n {\n id: 'b11',\n content: <Placeholder text='B11' />,\n layoutConfig: {\n width: '1/4',\n minWidth: 330,\n fillAvailable: false\n }\n }\n];\n"]}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
parameters: {
|
|
5
|
-
layout: string;
|
|
6
|
-
};
|
|
7
|
-
};
|
|
2
|
+
import { Meta } from '@storybook/react';
|
|
3
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
8
4
|
export default _default;
|
|
9
5
|
export declare const ConfigurableLayoutInPageRegions: () => JSX.Element;
|
|
10
6
|
//# sourceMappingURL=ConfigurableLayout.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigurableLayout.stories.d.ts","sourceRoot":"","sources":["../../../src/work/ConfigurableLayout/ConfigurableLayout.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ConfigurableLayout.stories.d.ts","sourceRoot":"","sources":["../../../src/work/ConfigurableLayout/ConfigurableLayout.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;;AAaxC,wBAKU;AAEV,eAAO,MAAM,+BAA+B,mBAgC3C,CAAC"}
|