@pega/cosmos-react-demos 2.1.2 → 3.0.0-dev.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/jsx/build/AppHeader/AppHeader.stories.d.ts +2 -1
- package/jsx/build/AppHeader/AppHeader.stories.d.ts.map +1 -1
- package/jsx/build/AppHeader/AppHeader.stories.jsx +46 -13
- package/jsx/build/AppHeader/AppHeader.stories.jsx.map +1 -1
- package/jsx/build/AppShell/AppShell.stories.d.ts +2 -1
- package/jsx/build/AppShell/AppShell.stories.d.ts.map +1 -1
- package/jsx/build/AppShell/AppShell.stories.jsx +46 -13
- package/jsx/build/AppShell/AppShell.stories.jsx.map +1 -1
- package/jsx/build/ItemLibrary/LibraryPicker.mocks.d.ts +7 -0
- package/jsx/build/ItemLibrary/LibraryPicker.mocks.d.ts.map +1 -0
- package/jsx/build/ItemLibrary/LibraryPicker.mocks.js +50 -0
- package/jsx/build/ItemLibrary/LibraryPicker.mocks.js.map +1 -0
- package/jsx/build/ItemLibrary/LibraryPicker.stories.d.ts +9 -0
- package/jsx/build/ItemLibrary/LibraryPicker.stories.d.ts.map +1 -0
- package/jsx/build/ItemLibrary/LibraryPicker.stories.jsx +45 -0
- package/jsx/build/ItemLibrary/LibraryPicker.stories.jsx.map +1 -0
- package/jsx/build/LifeCycle/LifeCycle.mocks.js +1 -1
- package/jsx/build/LifeCycle/LifeCycle.mocks.js.map +1 -1
- package/jsx/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -1
- package/jsx/build/LifeCycle/LifeCycle.stories.jsx +52 -34
- package/jsx/build/LifeCycle/LifeCycle.stories.jsx.map +1 -1
- package/jsx/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/jsx/build/PageTemplates/PageTemplates.stories.jsx +2 -6
- 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 +10 -12
- package/jsx/build/Workbench/Workbench.stories.jsx.map +1 -1
- package/jsx/core/AppShell/AppShell.stories.d.ts +5 -0
- package/jsx/core/AppShell/AppShell.stories.d.ts.map +1 -1
- package/jsx/core/AppShell/AppShell.stories.jsx +25 -1
- package/jsx/core/AppShell/AppShell.stories.jsx.map +1 -1
- package/jsx/core/Avatar/Avatar.stories.d.ts +5 -0
- package/jsx/core/Avatar/Avatar.stories.d.ts.map +1 -1
- package/jsx/core/Avatar/Avatar.stories.jsx +32 -5
- package/jsx/core/Avatar/Avatar.stories.jsx.map +1 -1
- package/jsx/core/Badges/Status.stories.d.ts +5 -0
- package/jsx/core/Badges/Status.stories.d.ts.map +1 -1
- package/jsx/core/Badges/Status.stories.jsx +25 -1
- package/jsx/core/Badges/Status.stories.jsx.map +1 -1
- package/jsx/core/Banner/Banner.mocks.d.ts +18 -0
- package/jsx/core/Banner/Banner.mocks.d.ts.map +1 -0
- package/jsx/core/Banner/Banner.mocks.jsx +41 -0
- package/jsx/core/Banner/Banner.mocks.jsx.map +1 -0
- package/jsx/core/Banner/Banner.stories.d.ts +5 -1
- package/jsx/core/Banner/Banner.stories.d.ts.map +1 -1
- package/jsx/core/Banner/Banner.stories.jsx +22 -39
- package/jsx/core/Banner/Banner.stories.jsx.map +1 -1
- package/jsx/core/Button/Button.stories.d.ts +8 -0
- package/jsx/core/Button/Button.stories.d.ts.map +1 -1
- package/jsx/core/Button/Button.stories.jsx +32 -3
- package/jsx/core/Button/Button.stories.jsx.map +1 -1
- package/jsx/core/Card/Card.stories.d.ts +5 -0
- package/jsx/core/Card/Card.stories.d.ts.map +1 -1
- package/jsx/core/Card/Card.stories.jsx +30 -1
- package/jsx/core/Card/Card.stories.jsx.map +1 -1
- package/jsx/core/Checkbox/Checkbox.stories.d.ts +12 -0
- package/jsx/core/Checkbox/Checkbox.stories.d.ts.map +1 -1
- package/jsx/core/Checkbox/Checkbox.stories.jsx +54 -1
- package/jsx/core/Checkbox/Checkbox.stories.jsx.map +1 -1
- package/jsx/core/Configuration/Configuration.stories.d.ts +17 -0
- package/jsx/core/Configuration/Configuration.stories.d.ts.map +1 -1
- package/jsx/core/Configuration/Configuration.stories.jsx +94 -3
- package/jsx/core/Configuration/Configuration.stories.jsx.map +1 -1
- package/jsx/core/DateTime/DateTimeDisplay.stories.jsx +1 -0
- package/jsx/core/DateTime/DateTimeDisplay.stories.jsx.map +1 -1
- package/jsx/core/ExpandCollapse/ExpandCollapse.styles.d.ts.map +1 -1
- package/jsx/core/ExpandCollapse/ExpandCollapse.styles.js +5 -0
- package/jsx/core/ExpandCollapse/ExpandCollapse.styles.js.map +1 -1
- package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts +21 -0
- package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -0
- package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx +36 -0
- package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx.map +1 -0
- package/jsx/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -1
- package/jsx/core/FieldGroup/FieldGroupList.stories.jsx +1 -34
- package/jsx/core/FieldGroup/FieldGroupList.stories.jsx.map +1 -1
- package/jsx/core/File/FileDisplay.stories.d.ts +8 -1
- package/jsx/core/File/FileDisplay.stories.d.ts.map +1 -1
- package/jsx/core/File/FileDisplay.stories.jsx +37 -2
- package/jsx/core/File/FileDisplay.stories.jsx.map +1 -1
- package/jsx/core/Flex/Flex.styles.d.ts +2 -2
- package/jsx/core/Flex/Flex.styles.d.ts.map +1 -1
- package/jsx/core/Flex/Flex.styles.js +17 -17
- package/jsx/core/Flex/Flex.styles.js.map +1 -1
- package/jsx/core/Flex/FlexContainer.stories.d.ts +2 -0
- package/jsx/core/Flex/FlexContainer.stories.d.ts.map +1 -1
- package/jsx/core/Flex/FlexContainer.stories.jsx +45 -32
- package/jsx/core/Flex/FlexContainer.stories.jsx.map +1 -1
- package/jsx/core/Flex/FlexItem.stories.jsx +13 -13
- package/jsx/core/Flex/FlexItem.stories.jsx.map +1 -1
- package/jsx/core/Form/Form.mocks.d.ts +8 -0
- package/jsx/core/Form/Form.mocks.d.ts.map +1 -0
- package/jsx/core/Form/Form.mocks.jsx +138 -0
- package/jsx/core/Form/Form.mocks.jsx.map +1 -0
- package/jsx/core/Form/Form.stories.d.ts +10 -7
- package/jsx/core/Form/Form.stories.d.ts.map +1 -1
- package/jsx/core/Form/Form.stories.jsx +44 -138
- package/jsx/core/Form/Form.stories.jsx.map +1 -1
- package/jsx/core/Grid/Grid.styles.d.ts +2 -2
- package/jsx/core/Grid/Grid.styles.d.ts.map +1 -1
- package/jsx/core/Grid/Grid.styles.js +4 -4
- package/jsx/core/Grid/Grid.styles.js.map +1 -1
- package/jsx/core/Grid/GridContainer.stories.d.ts +6 -5
- package/jsx/core/Grid/GridContainer.stories.d.ts.map +1 -1
- package/jsx/core/Grid/GridContainer.stories.jsx +51 -44
- package/jsx/core/Grid/GridContainer.stories.jsx.map +1 -1
- package/jsx/core/Grid/GridItem.stories.d.ts +2 -2
- package/jsx/core/Grid/GridItem.stories.d.ts.map +1 -1
- package/jsx/core/Grid/GridItem.stories.jsx +28 -28
- package/jsx/core/Grid/GridItem.stories.jsx.map +1 -1
- package/jsx/core/Icon/Icon.mocks.d.ts +3 -0
- package/jsx/core/Icon/Icon.mocks.d.ts.map +1 -0
- package/jsx/core/Icon/Icon.mocks.jsx +9 -0
- package/jsx/core/Icon/Icon.mocks.jsx.map +1 -0
- package/jsx/core/Icon/Icon.stories.d.ts +1 -0
- package/jsx/core/Icon/Icon.stories.d.ts.map +1 -1
- package/jsx/core/Icon/Icon.stories.jsx +7 -1
- package/jsx/core/Icon/Icon.stories.jsx.map +1 -1
- package/jsx/core/IconPicker/IconPicker.stories.d.ts.map +1 -1
- package/jsx/core/IconPicker/IconPicker.stories.jsx +0 -1
- package/jsx/core/IconPicker/IconPicker.stories.jsx.map +1 -1
- package/jsx/core/Input/Input.stories.d.ts +9 -0
- package/jsx/core/Input/Input.stories.d.ts.map +1 -1
- package/jsx/core/Input/Input.stories.jsx +40 -1
- package/jsx/core/Input/Input.stories.jsx.map +1 -1
- package/jsx/core/Label/Label.stories.d.ts +4 -0
- package/jsx/core/Label/Label.stories.d.ts.map +1 -1
- package/jsx/core/Label/Label.stories.jsx +18 -1
- package/jsx/core/Label/Label.stories.jsx.map +1 -1
- package/jsx/core/Lightbox/Lightbox.mocks.d.ts +15 -0
- package/jsx/core/Lightbox/Lightbox.mocks.d.ts.map +1 -0
- package/jsx/core/Lightbox/Lightbox.mocks.js +59 -0
- package/jsx/core/Lightbox/Lightbox.mocks.js.map +1 -0
- package/jsx/core/Lightbox/Lightbox.stories.d.ts +7 -6
- package/jsx/core/Lightbox/Lightbox.stories.d.ts.map +1 -1
- package/jsx/core/Lightbox/Lightbox.stories.jsx +14 -65
- package/jsx/core/Lightbox/Lightbox.stories.jsx.map +1 -1
- package/jsx/core/Link/Link.stories.d.ts +11 -1
- package/jsx/core/Link/Link.stories.d.ts.map +1 -1
- package/jsx/core/Link/Link.stories.jsx +22 -5
- package/jsx/core/Link/Link.stories.jsx.map +1 -1
- package/jsx/core/List/CommaSeparatedList.stories.d.ts.map +1 -1
- package/jsx/core/List/CommaSeparatedList.stories.jsx +17 -19
- package/jsx/core/List/CommaSeparatedList.stories.jsx.map +1 -1
- package/jsx/core/List/OrderedList.stories.d.ts.map +1 -1
- package/jsx/core/List/OrderedList.stories.jsx +10 -10
- package/jsx/core/List/OrderedList.stories.jsx.map +1 -1
- package/jsx/core/List/UnorderedList.stories.d.ts.map +1 -1
- package/jsx/core/List/UnorderedList.stories.jsx +10 -10
- package/jsx/core/List/UnorderedList.stories.jsx.map +1 -1
- package/jsx/core/Menu/Menu.stories.d.ts +3 -3
- package/jsx/core/Menu/Menu.stories.d.ts.map +1 -1
- package/jsx/core/Menu/Menu.stories.jsx +8 -12
- package/jsx/core/Menu/Menu.stories.jsx.map +1 -1
- package/jsx/core/Modal/Modal.mocks.jsx +1 -1
- package/jsx/core/Modal/Modal.mocks.jsx.map +1 -1
- package/jsx/core/Number/Number.stories.d.ts.map +1 -1
- package/jsx/core/Number/Number.stories.jsx +1 -4
- package/jsx/core/Number/Number.stories.jsx.map +1 -1
- package/jsx/core/PageTemplates/PageTemplates.stories.d.ts +5 -2
- package/jsx/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/jsx/core/PageTemplates/PageTemplates.stories.jsx +3 -3
- package/jsx/core/PageTemplates/PageTemplates.stories.jsx.map +1 -1
- package/jsx/core/Paragraph/ParagraphDisplay.stories.jsx +3 -0
- package/jsx/core/Paragraph/ParagraphDisplay.stories.jsx.map +1 -1
- package/jsx/core/Popover/Popover.stories.d.ts +1 -2
- package/jsx/core/Popover/Popover.stories.d.ts.map +1 -1
- package/jsx/core/Popover/Popover.stories.jsx +35 -37
- package/jsx/core/Popover/Popover.stories.jsx.map +1 -1
- package/jsx/core/Progress/Progress.stories.d.ts +4 -0
- package/jsx/core/Progress/Progress.stories.d.ts.map +1 -1
- package/jsx/core/Progress/Progress.stories.jsx +22 -1
- package/jsx/core/Progress/Progress.stories.jsx.map +1 -1
- package/jsx/core/RadioButton/RadioButton.stories.d.ts +12 -0
- package/jsx/core/RadioButton/RadioButton.stories.d.ts.map +1 -1
- package/jsx/core/RadioButton/RadioButton.stories.jsx +53 -1
- package/jsx/core/RadioButton/RadioButton.stories.jsx.map +1 -1
- package/jsx/core/Rating/Rating.stories.d.ts +8 -1
- package/jsx/core/Rating/Rating.stories.d.ts.map +1 -1
- package/jsx/core/Rating/Rating.stories.jsx +21 -4
- package/jsx/core/Rating/Rating.stories.jsx.map +1 -1
- package/jsx/core/SearchInput/SearchInput.stories.d.ts +4 -0
- package/jsx/core/SearchInput/SearchInput.stories.d.ts.map +1 -1
- package/jsx/core/SearchInput/SearchInput.stories.jsx +18 -1
- package/jsx/core/SearchInput/SearchInput.stories.jsx.map +1 -1
- package/jsx/core/Select/Select.stories.d.ts +8 -0
- package/jsx/core/Select/Select.stories.d.ts.map +1 -1
- package/jsx/core/Select/Select.stories.jsx +35 -1
- package/jsx/core/Select/Select.stories.jsx.map +1 -1
- package/jsx/core/Sentiment/Sentiment.stories.d.ts +6 -0
- package/jsx/core/Sentiment/Sentiment.stories.d.ts.map +1 -1
- package/jsx/core/Sentiment/Sentiment.stories.jsx +37 -6
- package/jsx/core/Sentiment/Sentiment.stories.jsx.map +1 -1
- package/jsx/core/SummaryList/SummaryList.stories.jsx +1 -1
- package/jsx/core/SummaryList/SummaryList.stories.jsx.map +1 -1
- package/jsx/core/Switch/Switch.stories.d.ts +7 -0
- package/jsx/core/Switch/Switch.stories.d.ts.map +1 -1
- package/jsx/core/Switch/Switch.stories.jsx +34 -1
- package/jsx/core/Switch/Switch.stories.jsx.map +1 -1
- package/jsx/core/Table/Table.stories.d.ts +25 -0
- package/jsx/core/Table/Table.stories.d.ts.map +1 -1
- package/jsx/core/Table/Table.stories.jsx +120 -1
- package/jsx/core/Table/Table.stories.jsx.map +1 -1
- package/jsx/core/Tabs/Tabs.stories.d.ts +5 -0
- package/jsx/core/Tabs/Tabs.stories.d.ts.map +1 -1
- package/jsx/core/Tabs/Tabs.stories.jsx +39 -1
- package/jsx/core/Tabs/Tabs.stories.jsx.map +1 -1
- package/jsx/core/Text/Text.stories.d.ts +19 -0
- package/jsx/core/Text/Text.stories.d.ts.map +1 -1
- package/jsx/core/Text/Text.stories.jsx +112 -1
- package/jsx/core/Text/Text.stories.jsx.map +1 -1
- package/jsx/core/TextArea/TextArea.stories.d.ts +5 -0
- package/jsx/core/TextArea/TextArea.stories.d.ts.map +1 -1
- package/jsx/core/TextArea/TextArea.stories.jsx +22 -1
- package/jsx/core/TextArea/TextArea.stories.jsx.map +1 -1
- package/jsx/core/Toaster/Toaster.stories.d.ts.map +1 -1
- package/jsx/core/Toaster/Toaster.stories.jsx +8 -3
- package/jsx/core/Toaster/Toaster.stories.jsx.map +1 -1
- package/jsx/core/Tooltip/Tooltip.stories.d.ts +6 -0
- package/jsx/core/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/jsx/core/Tooltip/Tooltip.stories.jsx +28 -1
- package/jsx/core/Tooltip/Tooltip.stories.jsx.map +1 -1
- package/jsx/cs/CSCaseView/CSAppShell.stories.jsx +1 -1
- package/jsx/cs/CSCaseView/CSAppShell.stories.jsx.map +1 -1
- package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -1
- package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx +12 -10
- package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx.map +1 -1
- package/jsx/cs/TaskManager/TaskManager.mocks.d.ts +1 -2
- package/jsx/cs/TaskManager/TaskManager.mocks.d.ts.map +1 -1
- package/jsx/cs/TaskManager/TaskManager.mocks.js +5 -10
- package/jsx/cs/TaskManager/TaskManager.mocks.js.map +1 -1
- package/jsx/cs/TaskManager/TaskManager.stories.d.ts +8 -3
- package/jsx/cs/TaskManager/TaskManager.stories.d.ts.map +1 -1
- package/jsx/cs/TaskManager/TaskManager.stories.jsx +164 -132
- package/jsx/cs/TaskManager/TaskManager.stories.jsx.map +1 -1
- package/jsx/rte/RichTextEditor/RichTextEditor.stories.jsx +1 -1
- package/jsx/rte/RichTextEditor/RichTextEditor.stories.jsx.map +1 -1
- package/jsx/rte/RichTextEditor/RichTextViewer.stories.d.ts +1 -0
- package/jsx/rte/RichTextEditor/RichTextViewer.stories.d.ts.map +1 -1
- package/jsx/rte/RichTextEditor/RichTextViewer.stories.jsx +19 -2
- package/jsx/rte/RichTextEditor/RichTextViewer.stories.jsx.map +1 -1
- package/jsx/social/Chat/Chat.stories.d.ts +31 -22
- package/jsx/social/Chat/Chat.stories.d.ts.map +1 -1
- package/jsx/social/Chat/Chat.stories.jsx +106 -153
- package/jsx/social/Chat/Chat.stories.jsx.map +1 -1
- package/jsx/social/Email/Email.mocks.d.ts +1 -2
- package/jsx/social/Email/Email.mocks.d.ts.map +1 -1
- package/jsx/social/Email/{Email.mocks.jsx → Email.mocks.js} +2 -3
- package/jsx/social/Email/Email.mocks.js.map +1 -0
- package/jsx/social/Email/Email.stories.d.ts.map +1 -1
- package/jsx/social/Email/Email.stories.jsx +7 -8
- package/jsx/social/Email/Email.stories.jsx.map +1 -1
- package/jsx/social/Feed/FeedNewPost.stories.jsx +1 -1
- package/jsx/social/Feed/FeedNewPost.stories.jsx.map +1 -1
- package/jsx/social/Feed/FeedPost.stories.jsx +1 -1
- package/jsx/social/Feed/FeedPost.stories.jsx.map +1 -1
- package/jsx/work/AppAnnouncement/AppAnnouncement.stories.d.ts.map +1 -1
- package/jsx/work/AppAnnouncement/AppAnnouncement.stories.jsx +6 -7
- package/jsx/work/AppAnnouncement/AppAnnouncement.stories.jsx.map +1 -1
- package/jsx/work/CaseView/FileService.mock.d.ts.map +1 -1
- package/jsx/work/CaseView/FileService.mock.jsx +6 -2
- package/jsx/work/CaseView/FileService.mock.jsx.map +1 -1
- package/jsx/work/Confirmation/Confirmation.stories.d.ts +1 -1
- package/jsx/work/Confirmation/Confirmation.stories.d.ts.map +1 -1
- package/jsx/work/Confirmation/Confirmation.stories.jsx +14 -3
- package/jsx/work/Confirmation/Confirmation.stories.jsx.map +1 -1
- package/jsx/work/Confirmation/Confirmation.styles.d.ts +2 -0
- package/jsx/work/Confirmation/Confirmation.styles.d.ts.map +1 -0
- package/jsx/work/Confirmation/Confirmation.styles.js +7 -0
- package/jsx/work/Confirmation/Confirmation.styles.js.map +1 -0
- package/jsx/work/Details/Details.stories.jsx +3 -3
- package/jsx/work/Details/Details.stories.jsx.map +1 -1
- package/jsx/work/SearchResults/SearchResults.stories.d.ts.map +1 -1
- package/jsx/work/SearchResults/SearchResults.stories.jsx +3 -9
- package/jsx/work/SearchResults/SearchResults.stories.jsx.map +1 -1
- package/jsx/work/SearchResults/SearchResults.styles.d.ts +5 -0
- package/jsx/work/SearchResults/SearchResults.styles.d.ts.map +1 -0
- package/jsx/work/SearchResults/SearchResults.styles.js +12 -0
- package/jsx/work/SearchResults/SearchResults.styles.js.map +1 -0
- package/jsx/work/Stakeholders/Stakeholders.mocks.d.ts +17 -0
- package/jsx/work/Stakeholders/Stakeholders.mocks.d.ts.map +1 -0
- package/jsx/work/Stakeholders/Stakeholders.mocks.jsx +32 -0
- package/jsx/work/Stakeholders/Stakeholders.mocks.jsx.map +1 -0
- package/jsx/work/Stakeholders/Stakeholders.stories.d.ts +2 -5
- package/jsx/work/Stakeholders/Stakeholders.stories.d.ts.map +1 -1
- package/jsx/work/Stakeholders/Stakeholders.stories.jsx +2 -30
- package/jsx/work/Stakeholders/Stakeholders.stories.jsx.map +1 -1
- package/jsx/work/Timeline/Timeline.stories.d.ts.map +1 -1
- package/jsx/work/Timeline/Timeline.stories.jsx +2 -2
- package/jsx/work/Timeline/Timeline.stories.jsx.map +1 -1
- package/lib/build/AppHeader/AppHeader.stories.d.ts +2 -1
- package/lib/build/AppHeader/AppHeader.stories.d.ts.map +1 -1
- package/lib/build/AppHeader/AppHeader.stories.js +46 -13
- package/lib/build/AppHeader/AppHeader.stories.js.map +1 -1
- package/lib/build/AppShell/AppShell.stories.d.ts +2 -1
- package/lib/build/AppShell/AppShell.stories.d.ts.map +1 -1
- package/lib/build/AppShell/AppShell.stories.js +46 -13
- package/lib/build/AppShell/AppShell.stories.js.map +1 -1
- package/lib/build/ItemLibrary/LibraryPicker.mocks.d.ts +7 -0
- package/lib/build/ItemLibrary/LibraryPicker.mocks.d.ts.map +1 -0
- package/lib/build/ItemLibrary/LibraryPicker.mocks.js +50 -0
- package/lib/build/ItemLibrary/LibraryPicker.mocks.js.map +1 -0
- package/lib/build/ItemLibrary/LibraryPicker.stories.d.ts +9 -0
- package/lib/build/ItemLibrary/LibraryPicker.stories.d.ts.map +1 -0
- package/lib/build/ItemLibrary/LibraryPicker.stories.js +40 -0
- package/lib/build/ItemLibrary/LibraryPicker.stories.js.map +1 -0
- package/lib/build/LifeCycle/LifeCycle.mocks.js +1 -1
- package/lib/build/LifeCycle/LifeCycle.mocks.js.map +1 -1
- package/lib/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -1
- package/lib/build/LifeCycle/LifeCycle.stories.js +52 -48
- package/lib/build/LifeCycle/LifeCycle.stories.js.map +1 -1
- package/lib/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/lib/build/PageTemplates/PageTemplates.stories.js +2 -2
- 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 +15 -17
- package/lib/build/Workbench/Workbench.stories.js.map +1 -1
- package/lib/core/AppShell/AppShell.stories.d.ts +5 -0
- package/lib/core/AppShell/AppShell.stories.d.ts.map +1 -1
- package/lib/core/AppShell/AppShell.stories.js +23 -1
- package/lib/core/AppShell/AppShell.stories.js.map +1 -1
- package/lib/core/Avatar/Avatar.stories.d.ts +5 -0
- package/lib/core/Avatar/Avatar.stories.d.ts.map +1 -1
- package/lib/core/Avatar/Avatar.stories.js +30 -5
- package/lib/core/Avatar/Avatar.stories.js.map +1 -1
- package/lib/core/Badges/Status.stories.d.ts +5 -0
- package/lib/core/Badges/Status.stories.d.ts.map +1 -1
- package/lib/core/Badges/Status.stories.js +23 -1
- package/lib/core/Badges/Status.stories.js.map +1 -1
- package/lib/core/Banner/Banner.mocks.d.ts +18 -0
- package/lib/core/Banner/Banner.mocks.d.ts.map +1 -0
- package/lib/core/Banner/Banner.mocks.js +36 -0
- package/lib/core/Banner/Banner.mocks.js.map +1 -0
- package/lib/core/Banner/Banner.stories.d.ts +5 -1
- package/lib/core/Banner/Banner.stories.d.ts.map +1 -1
- package/lib/core/Banner/Banner.stories.js +21 -33
- package/lib/core/Banner/Banner.stories.js.map +1 -1
- package/lib/core/Button/Button.stories.d.ts +8 -0
- package/lib/core/Button/Button.stories.d.ts.map +1 -1
- package/lib/core/Button/Button.stories.js +29 -2
- package/lib/core/Button/Button.stories.js.map +1 -1
- package/lib/core/Card/Card.stories.d.ts +5 -0
- package/lib/core/Card/Card.stories.d.ts.map +1 -1
- package/lib/core/Card/Card.stories.js +19 -1
- package/lib/core/Card/Card.stories.js.map +1 -1
- package/lib/core/Checkbox/Checkbox.stories.d.ts +12 -0
- package/lib/core/Checkbox/Checkbox.stories.d.ts.map +1 -1
- package/lib/core/Checkbox/Checkbox.stories.js +52 -1
- package/lib/core/Checkbox/Checkbox.stories.js.map +1 -1
- package/lib/core/Configuration/Configuration.stories.d.ts +17 -0
- package/lib/core/Configuration/Configuration.stories.d.ts.map +1 -1
- package/lib/core/Configuration/Configuration.stories.js +62 -3
- package/lib/core/Configuration/Configuration.stories.js.map +1 -1
- package/lib/core/DateTime/DateTimeDisplay.stories.js +1 -0
- package/lib/core/DateTime/DateTimeDisplay.stories.js.map +1 -1
- package/lib/core/ExpandCollapse/ExpandCollapse.styles.d.ts.map +1 -1
- package/lib/core/ExpandCollapse/ExpandCollapse.styles.js +5 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.styles.js.map +1 -1
- package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts +21 -0
- package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -0
- package/lib/core/FieldGroup/FieldGroupList.mocks.js +38 -0
- package/lib/core/FieldGroup/FieldGroupList.mocks.js.map +1 -0
- package/lib/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -1
- package/lib/core/FieldGroup/FieldGroupList.stories.js +1 -35
- package/lib/core/FieldGroup/FieldGroupList.stories.js.map +1 -1
- package/lib/core/File/FileDisplay.stories.d.ts +8 -1
- package/lib/core/File/FileDisplay.stories.d.ts.map +1 -1
- package/lib/core/File/FileDisplay.stories.js +32 -2
- package/lib/core/File/FileDisplay.stories.js.map +1 -1
- package/lib/core/Flex/Flex.styles.d.ts +2 -2
- package/lib/core/Flex/Flex.styles.d.ts.map +1 -1
- package/lib/core/Flex/Flex.styles.js +17 -17
- package/lib/core/Flex/Flex.styles.js.map +1 -1
- package/lib/core/Flex/FlexContainer.stories.d.ts +2 -0
- package/lib/core/Flex/FlexContainer.stories.d.ts.map +1 -1
- package/lib/core/Flex/FlexContainer.stories.js +10 -7
- package/lib/core/Flex/FlexContainer.stories.js.map +1 -1
- package/lib/core/Flex/FlexItem.stories.js +4 -4
- package/lib/core/Flex/FlexItem.stories.js.map +1 -1
- package/lib/core/Form/Form.mocks.d.ts +8 -0
- package/lib/core/Form/Form.mocks.d.ts.map +1 -0
- package/lib/core/Form/Form.mocks.js +97 -0
- package/lib/core/Form/Form.mocks.js.map +1 -0
- package/lib/core/Form/Form.stories.d.ts +10 -7
- package/lib/core/Form/Form.stories.d.ts.map +1 -1
- package/lib/core/Form/Form.stories.js +42 -96
- package/lib/core/Form/Form.stories.js.map +1 -1
- package/lib/core/Grid/Grid.styles.d.ts +2 -2
- package/lib/core/Grid/Grid.styles.d.ts.map +1 -1
- package/lib/core/Grid/Grid.styles.js +4 -4
- package/lib/core/Grid/Grid.styles.js.map +1 -1
- package/lib/core/Grid/GridContainer.stories.d.ts +6 -5
- package/lib/core/Grid/GridContainer.stories.d.ts.map +1 -1
- package/lib/core/Grid/GridContainer.stories.js +27 -24
- package/lib/core/Grid/GridContainer.stories.js.map +1 -1
- package/lib/core/Grid/GridItem.stories.d.ts +2 -2
- package/lib/core/Grid/GridItem.stories.d.ts.map +1 -1
- package/lib/core/Grid/GridItem.stories.js +10 -10
- package/lib/core/Grid/GridItem.stories.js.map +1 -1
- package/lib/core/Icon/Icon.mocks.d.ts +3 -0
- package/lib/core/Icon/Icon.mocks.d.ts.map +1 -0
- package/lib/core/Icon/Icon.mocks.js +10 -0
- package/lib/core/Icon/Icon.mocks.js.map +1 -0
- package/lib/core/Icon/Icon.stories.d.ts +1 -0
- package/lib/core/Icon/Icon.stories.d.ts.map +1 -1
- package/lib/core/Icon/Icon.stories.js +7 -1
- package/lib/core/Icon/Icon.stories.js.map +1 -1
- package/lib/core/IconPicker/IconPicker.stories.d.ts.map +1 -1
- package/lib/core/IconPicker/IconPicker.stories.js +0 -1
- package/lib/core/IconPicker/IconPicker.stories.js.map +1 -1
- package/lib/core/Input/Input.stories.d.ts +9 -0
- package/lib/core/Input/Input.stories.d.ts.map +1 -1
- package/lib/core/Input/Input.stories.js +38 -1
- package/lib/core/Input/Input.stories.js.map +1 -1
- package/lib/core/Label/Label.stories.d.ts +4 -0
- package/lib/core/Label/Label.stories.d.ts.map +1 -1
- package/lib/core/Label/Label.stories.js +16 -1
- package/lib/core/Label/Label.stories.js.map +1 -1
- package/lib/core/Lightbox/Lightbox.mocks.d.ts +15 -0
- package/lib/core/Lightbox/Lightbox.mocks.d.ts.map +1 -0
- package/lib/core/Lightbox/Lightbox.mocks.js +67 -0
- package/lib/core/Lightbox/Lightbox.mocks.js.map +1 -0
- package/lib/core/Lightbox/Lightbox.stories.d.ts +7 -6
- package/lib/core/Lightbox/Lightbox.stories.d.ts.map +1 -1
- package/lib/core/Lightbox/Lightbox.stories.js +14 -73
- package/lib/core/Lightbox/Lightbox.stories.js.map +1 -1
- package/lib/core/Link/Link.stories.d.ts +11 -1
- package/lib/core/Link/Link.stories.d.ts.map +1 -1
- package/lib/core/Link/Link.stories.js +7 -4
- package/lib/core/Link/Link.stories.js.map +1 -1
- package/lib/core/List/CommaSeparatedList.stories.d.ts.map +1 -1
- package/lib/core/List/CommaSeparatedList.stories.js +17 -17
- package/lib/core/List/CommaSeparatedList.stories.js.map +1 -1
- package/lib/core/List/OrderedList.stories.d.ts.map +1 -1
- package/lib/core/List/OrderedList.stories.js +10 -10
- package/lib/core/List/OrderedList.stories.js.map +1 -1
- package/lib/core/List/UnorderedList.stories.d.ts.map +1 -1
- package/lib/core/List/UnorderedList.stories.js +10 -10
- package/lib/core/List/UnorderedList.stories.js.map +1 -1
- package/lib/core/Menu/Menu.stories.d.ts +3 -3
- package/lib/core/Menu/Menu.stories.d.ts.map +1 -1
- package/lib/core/Menu/Menu.stories.js +8 -12
- package/lib/core/Menu/Menu.stories.js.map +1 -1
- package/lib/core/Modal/Modal.mocks.js +1 -1
- package/lib/core/Modal/Modal.mocks.js.map +1 -1
- package/lib/core/Number/Number.stories.d.ts.map +1 -1
- package/lib/core/Number/Number.stories.js +1 -4
- package/lib/core/Number/Number.stories.js.map +1 -1
- package/lib/core/PageTemplates/PageTemplates.stories.d.ts +5 -2
- package/lib/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/lib/core/PageTemplates/PageTemplates.stories.js +3 -3
- package/lib/core/PageTemplates/PageTemplates.stories.js.map +1 -1
- package/lib/core/Paragraph/ParagraphDisplay.stories.js +3 -0
- package/lib/core/Paragraph/ParagraphDisplay.stories.js.map +1 -1
- package/lib/core/Popover/Popover.stories.d.ts +1 -2
- package/lib/core/Popover/Popover.stories.d.ts.map +1 -1
- package/lib/core/Popover/Popover.stories.js +24 -25
- package/lib/core/Popover/Popover.stories.js.map +1 -1
- package/lib/core/Progress/Progress.stories.d.ts +4 -0
- package/lib/core/Progress/Progress.stories.d.ts.map +1 -1
- package/lib/core/Progress/Progress.stories.js +18 -1
- package/lib/core/Progress/Progress.stories.js.map +1 -1
- package/lib/core/RadioButton/RadioButton.stories.d.ts +12 -0
- package/lib/core/RadioButton/RadioButton.stories.d.ts.map +1 -1
- package/lib/core/RadioButton/RadioButton.stories.js +51 -1
- package/lib/core/RadioButton/RadioButton.stories.js.map +1 -1
- package/lib/core/Rating/Rating.stories.d.ts +8 -1
- package/lib/core/Rating/Rating.stories.d.ts.map +1 -1
- package/lib/core/Rating/Rating.stories.js +19 -4
- package/lib/core/Rating/Rating.stories.js.map +1 -1
- package/lib/core/SearchInput/SearchInput.stories.d.ts +4 -0
- package/lib/core/SearchInput/SearchInput.stories.d.ts.map +1 -1
- package/lib/core/SearchInput/SearchInput.stories.js +16 -1
- package/lib/core/SearchInput/SearchInput.stories.js.map +1 -1
- package/lib/core/Select/Select.stories.d.ts +8 -0
- package/lib/core/Select/Select.stories.d.ts.map +1 -1
- package/lib/core/Select/Select.stories.js +28 -1
- package/lib/core/Select/Select.stories.js.map +1 -1
- package/lib/core/Sentiment/Sentiment.stories.d.ts +6 -0
- package/lib/core/Sentiment/Sentiment.stories.d.ts.map +1 -1
- package/lib/core/Sentiment/Sentiment.stories.js +34 -7
- package/lib/core/Sentiment/Sentiment.stories.js.map +1 -1
- package/lib/core/SummaryList/SummaryList.stories.js +1 -1
- package/lib/core/SummaryList/SummaryList.stories.js.map +1 -1
- package/lib/core/Switch/Switch.stories.d.ts +7 -0
- package/lib/core/Switch/Switch.stories.d.ts.map +1 -1
- package/lib/core/Switch/Switch.stories.js +32 -1
- package/lib/core/Switch/Switch.stories.js.map +1 -1
- package/lib/core/Table/Table.stories.d.ts +25 -0
- package/lib/core/Table/Table.stories.d.ts.map +1 -1
- package/lib/core/Table/Table.stories.js +113 -1
- package/lib/core/Table/Table.stories.js.map +1 -1
- package/lib/core/Tabs/Tabs.stories.d.ts +5 -0
- package/lib/core/Tabs/Tabs.stories.d.ts.map +1 -1
- package/lib/core/Tabs/Tabs.stories.js +30 -1
- package/lib/core/Tabs/Tabs.stories.js.map +1 -1
- package/lib/core/Text/Text.stories.d.ts +19 -0
- package/lib/core/Text/Text.stories.d.ts.map +1 -1
- package/lib/core/Text/Text.stories.js +102 -2
- package/lib/core/Text/Text.stories.js.map +1 -1
- package/lib/core/TextArea/TextArea.stories.d.ts +5 -0
- package/lib/core/TextArea/TextArea.stories.d.ts.map +1 -1
- package/lib/core/TextArea/TextArea.stories.js +20 -1
- package/lib/core/TextArea/TextArea.stories.js.map +1 -1
- package/lib/core/Toaster/Toaster.stories.d.ts.map +1 -1
- package/lib/core/Toaster/Toaster.stories.js +8 -3
- package/lib/core/Toaster/Toaster.stories.js.map +1 -1
- package/lib/core/Tooltip/Tooltip.stories.d.ts +6 -0
- package/lib/core/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/lib/core/Tooltip/Tooltip.stories.js +20 -1
- package/lib/core/Tooltip/Tooltip.stories.js.map +1 -1
- package/lib/cs/CSCaseView/CSAppShell.stories.js +1 -1
- package/lib/cs/CSCaseView/CSAppShell.stories.js.map +1 -1
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -1
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js +12 -10
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js.map +1 -1
- package/lib/cs/TaskManager/TaskManager.mocks.d.ts +1 -2
- package/lib/cs/TaskManager/TaskManager.mocks.d.ts.map +1 -1
- package/lib/cs/TaskManager/TaskManager.mocks.js +5 -10
- package/lib/cs/TaskManager/TaskManager.mocks.js.map +1 -1
- package/lib/cs/TaskManager/TaskManager.stories.d.ts +8 -3
- package/lib/cs/TaskManager/TaskManager.stories.d.ts.map +1 -1
- package/lib/cs/TaskManager/TaskManager.stories.js +142 -119
- package/lib/cs/TaskManager/TaskManager.stories.js.map +1 -1
- package/lib/rte/RichTextEditor/RichTextEditor.stories.js +1 -1
- package/lib/rte/RichTextEditor/RichTextEditor.stories.js.map +1 -1
- package/lib/rte/RichTextEditor/RichTextViewer.stories.d.ts +1 -0
- package/lib/rte/RichTextEditor/RichTextViewer.stories.d.ts.map +1 -1
- package/lib/rte/RichTextEditor/RichTextViewer.stories.js +15 -2
- package/lib/rte/RichTextEditor/RichTextViewer.stories.js.map +1 -1
- package/lib/social/Chat/Chat.stories.d.ts +33 -22
- package/lib/social/Chat/Chat.stories.d.ts.map +1 -1
- package/lib/social/Chat/Chat.stories.js +102 -158
- package/lib/social/Chat/Chat.stories.js.map +1 -1
- package/lib/social/Email/Email.mocks.d.ts +1 -2
- package/lib/social/Email/Email.mocks.d.ts.map +1 -1
- package/lib/social/Email/Email.mocks.js +1 -3
- package/lib/social/Email/Email.mocks.js.map +1 -1
- package/lib/social/Email/Email.stories.d.ts.map +1 -1
- package/lib/social/Email/Email.stories.js +7 -8
- package/lib/social/Email/Email.stories.js.map +1 -1
- package/lib/social/Feed/FeedNewPost.stories.js +1 -1
- package/lib/social/Feed/FeedNewPost.stories.js.map +1 -1
- package/lib/social/Feed/FeedPost.stories.js +1 -1
- package/lib/social/Feed/FeedPost.stories.js.map +1 -1
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.d.ts.map +1 -1
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.js +6 -7
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.js.map +1 -1
- package/lib/work/CaseView/FileService.mock.d.ts.map +1 -1
- package/lib/work/CaseView/FileService.mock.js +6 -2
- package/lib/work/CaseView/FileService.mock.js.map +1 -1
- package/lib/work/Confirmation/Confirmation.stories.d.ts +1 -1
- package/lib/work/Confirmation/Confirmation.stories.d.ts.map +1 -1
- package/lib/work/Confirmation/Confirmation.stories.js +12 -4
- package/lib/work/Confirmation/Confirmation.stories.js.map +1 -1
- package/lib/work/Confirmation/Confirmation.styles.d.ts +2 -0
- package/lib/work/Confirmation/Confirmation.styles.d.ts.map +1 -0
- package/lib/work/Confirmation/Confirmation.styles.js +7 -0
- package/lib/work/Confirmation/Confirmation.styles.js.map +1 -0
- package/lib/work/Details/Details.stories.js +3 -3
- package/lib/work/Details/Details.stories.js.map +1 -1
- package/lib/work/SearchResults/SearchResults.stories.d.ts.map +1 -1
- package/lib/work/SearchResults/SearchResults.stories.js +3 -9
- package/lib/work/SearchResults/SearchResults.stories.js.map +1 -1
- package/lib/work/SearchResults/SearchResults.styles.d.ts +5 -0
- package/lib/work/SearchResults/SearchResults.styles.d.ts.map +1 -0
- package/lib/work/SearchResults/SearchResults.styles.js +12 -0
- package/lib/work/SearchResults/SearchResults.styles.js.map +1 -0
- package/lib/work/Stakeholders/Stakeholders.mocks.d.ts +22 -0
- package/lib/work/Stakeholders/Stakeholders.mocks.d.ts.map +1 -0
- package/lib/work/Stakeholders/Stakeholders.mocks.js +36 -0
- package/lib/work/Stakeholders/Stakeholders.mocks.js.map +1 -0
- package/lib/work/Stakeholders/Stakeholders.stories.d.ts +2 -5
- package/lib/work/Stakeholders/Stakeholders.stories.d.ts.map +1 -1
- package/lib/work/Stakeholders/Stakeholders.stories.js +3 -34
- package/lib/work/Stakeholders/Stakeholders.stories.js.map +1 -1
- package/lib/work/Timeline/Timeline.stories.d.ts.map +1 -1
- package/lib/work/Timeline/Timeline.stories.js +2 -2
- package/lib/work/Timeline/Timeline.stories.js.map +1 -1
- package/package.json +16 -16
- package/jsx/social/Email/Email.mocks.jsx.map +0 -1
|
@@ -1,36 +1,18 @@
|
|
|
1
1
|
import { useState, useRef, useEffect, useCallback, useMemo } from 'react';
|
|
2
2
|
import { action } from '@storybook/addon-actions';
|
|
3
|
-
import { radios, array, boolean, text, number, optionsKnob, button } from '@storybook/addon-knobs';
|
|
4
3
|
import { Button, Icon, registerIcon, Text, MenuButton, Flex, Popover, Link, Status, EmojiContext, createUID, useOuterEvent, TextArea, Select, Option, Menu, useElement, FieldValueList } from '@pega/cosmos-react-core';
|
|
5
4
|
import * as arrowMicroDownIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/arrow-micro-down.icon';
|
|
6
5
|
import * as replyIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/reply.icon';
|
|
7
6
|
import * as replyAllIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/reply-all.icon';
|
|
8
7
|
import * as forwardIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/forward.icon';
|
|
9
|
-
import { Chat, ChatHeader, ChatBody, ChatComposer, ChatTranscript, Message, MessageList
|
|
8
|
+
import { Chat, ChatHeader, ChatBody, ChatComposer, ChatTranscript, Message, MessageList, NewMessageSeparatorId, SuggestedReplyPicker, SystemMessage, TranscriptMessage, TypeIndicator } from '@pega/cosmos-react-social';
|
|
10
9
|
import { ChatMockData } from './Chat.mocks';
|
|
11
10
|
registerIcon(forwardIcon, replyIcon, replyAllIcon, arrowMicroDownIcon);
|
|
12
11
|
export default {
|
|
13
12
|
title: 'Social/Chat',
|
|
14
13
|
component: Chat
|
|
15
14
|
};
|
|
16
|
-
const
|
|
17
|
-
label: 'Channel',
|
|
18
|
-
options: {
|
|
19
|
-
LiveChat: {
|
|
20
|
-
title: 'Live chat',
|
|
21
|
-
icon: 'chat-solid'
|
|
22
|
-
},
|
|
23
|
-
Twitter: {
|
|
24
|
-
title: 'Twitter chat',
|
|
25
|
-
icon: 'twitter'
|
|
26
|
-
},
|
|
27
|
-
Facebook: {
|
|
28
|
-
title: 'Facebook messenger',
|
|
29
|
-
icon: 'facebook'
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
export const chatHeader = () => {
|
|
15
|
+
export const ChatHeaderDemo = () => {
|
|
34
16
|
const actionsConfig = (<Flex>
|
|
35
17
|
<Button variant='simple' aria-label='Show transcripts'>
|
|
36
18
|
<Flex container={{
|
|
@@ -47,27 +29,16 @@ export const chatHeader = () => {
|
|
|
47
29
|
</Flex>);
|
|
48
30
|
return (<ChatHeader title='Live Chat' icon='chat-solid' aria-label='Chat header' actions={actionsConfig}/>);
|
|
49
31
|
};
|
|
50
|
-
export const
|
|
32
|
+
export const MessageListDemo = () => {
|
|
51
33
|
const messages = ChatMockData.chatMessages;
|
|
52
34
|
const [unReadMessageCount, setUnReadMessagesCount] = useState(1);
|
|
53
35
|
return (<Flex container style={{ height: '80vh' }}>
|
|
54
|
-
<
|
|
36
|
+
<MessageList tabIndex={0} messages={messages} unReadMessageCount={unReadMessageCount} onScrollToButtonClick={() => {
|
|
55
37
|
setUnReadMessagesCount(0);
|
|
56
38
|
}}/>
|
|
57
39
|
</Flex>);
|
|
58
40
|
};
|
|
59
|
-
export const
|
|
60
|
-
const MessageVariantPropValues = {
|
|
61
|
-
sender: 'sender',
|
|
62
|
-
receiver: 'receiver',
|
|
63
|
-
other: 'other'
|
|
64
|
-
};
|
|
65
|
-
const MessageDirectionPropValues = {
|
|
66
|
-
in: 'in',
|
|
67
|
-
out: 'out'
|
|
68
|
-
};
|
|
69
|
-
const variantProp = radios('Variant', MessageVariantPropValues, 'receiver');
|
|
70
|
-
const directionProp = radios('Direction', MessageDirectionPropValues, 'in');
|
|
41
|
+
export const MessageDemo = (args) => {
|
|
71
42
|
const attachments = [
|
|
72
43
|
{
|
|
73
44
|
id: '2499167340',
|
|
@@ -93,27 +64,40 @@ export const messageComponent = () => {
|
|
|
93
64
|
];
|
|
94
65
|
return (<>
|
|
95
66
|
|
|
96
|
-
<Message type='message' attachments={attachments} avatarInfo={{ name: 'John Brown' }} status='Opened' timeStamp='1:44 PM' message='Hi, Welcome to u-plus. How can I help you ?' variant={
|
|
67
|
+
<Message type='message' attachments={attachments} avatarInfo={{ name: 'John Brown' }} status='Opened' timeStamp='1:44 PM' message='Hi, Welcome to u-plus. How can I help you ?' variant={args.variant} direction={args.direction}/>
|
|
97
68
|
<br />
|
|
98
69
|
|
|
99
|
-
<Message type='message' message='Hi, Welcome to u-plus. How can I help you ?' avatarInfo={{ name: 'John Brown' }} pagePushLinks={pagePushLinks} variant={
|
|
70
|
+
<Message type='message' message='Hi, Welcome to u-plus. How can I help you ?' avatarInfo={{ name: 'John Brown' }} pagePushLinks={pagePushLinks} variant={args.variant} direction={args.direction}/>
|
|
100
71
|
<br />
|
|
101
72
|
|
|
102
|
-
<Message type='message' message='Hi, Welcome to u-plus. How can I help you ?' avatarInfo={{ name: 'John Brown' }} variant={
|
|
73
|
+
<Message type='message' message='Hi, Welcome to u-plus. How can I help you ?' avatarInfo={{ name: 'John Brown' }} variant={args.variant} direction={args.direction}/>
|
|
103
74
|
</>);
|
|
104
75
|
};
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
return <TypeIndicator avatarInfo={{ name: 'John Brown' }} message={TypeIndicatorMessageProp}/>;
|
|
76
|
+
MessageDemo.args = {
|
|
77
|
+
variant: 'receiver',
|
|
78
|
+
direction: 'in'
|
|
109
79
|
};
|
|
110
|
-
|
|
80
|
+
MessageDemo.argTypes = {
|
|
81
|
+
variant: { options: ['receiver', 'sender', 'other'], control: { type: 'select' } },
|
|
82
|
+
direction: { options: ['in', 'out'], control: { type: 'select' } }
|
|
83
|
+
};
|
|
84
|
+
export const SystemMessageDemo = () => (<SystemMessage message='John Brown has joined' timeStamp='10:00 AM'/>);
|
|
85
|
+
export const TypeIndicatorDemo = (args) => {
|
|
86
|
+
return <TypeIndicator avatarInfo={{ name: 'John Brown' }} message={args.message}/>;
|
|
87
|
+
};
|
|
88
|
+
TypeIndicatorDemo.args = {
|
|
89
|
+
message: ''
|
|
90
|
+
};
|
|
91
|
+
TypeIndicatorDemo.argTypes = {
|
|
92
|
+
message: { control: { type: 'text' } }
|
|
93
|
+
};
|
|
94
|
+
export const ChatTranscriptsDemo = () => {
|
|
111
95
|
return ChatMockData.transcripts.map((transcript) => {
|
|
112
96
|
return (<ChatTranscript tabIndex={0} title={transcript.title} key={transcript.id} transcript={transcript.data}/>);
|
|
113
97
|
});
|
|
114
98
|
};
|
|
115
|
-
export const
|
|
116
|
-
export const
|
|
99
|
+
export const TranscriptMessageDemo = () => (<TranscriptMessage timeStamp='01:20 PM' variant='bot' message='Hello… This is bot. How can I help you? Please select your category.'/>);
|
|
100
|
+
export const SuggestedReplyPickerDemo = () => {
|
|
117
101
|
const suggestedReplies = [
|
|
118
102
|
{
|
|
119
103
|
id: createUID(),
|
|
@@ -130,27 +114,37 @@ export const suggestedReplyPickerComponent = () => {
|
|
|
130
114
|
action(`Suggested reply picked ${suggestedReply.message}`)();
|
|
131
115
|
}} onDismiss={action('Suggested reply dismissed')}/>);
|
|
132
116
|
};
|
|
133
|
-
export const
|
|
117
|
+
export const ChatComposerDemo = (args) => (<ChatComposer maxAttachments={args.maxAttachments} attachments={ChatMockData.defaultAttachments} maxLength={256} placeholder='Type here to send message' onSend={() => { }}>
|
|
134
118
|
<MenuButton text='Phrases' menu={{ items: [] }}/>
|
|
135
119
|
<MenuButton text='Page Push' menu={{ items: [] }}/>
|
|
136
120
|
</ChatComposer>);
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
return obj;
|
|
145
|
-
}, {});
|
|
146
|
-
const channelOptions = Object.keys(Channels.options).reduce((obj, key) => {
|
|
147
|
-
obj[key] = key;
|
|
148
|
-
return obj;
|
|
149
|
-
}, {});
|
|
150
|
-
export const StandardChat = ({ chatWidth = '30rem' }) => {
|
|
121
|
+
ChatComposerDemo.args = {
|
|
122
|
+
maxAttachments: 2
|
|
123
|
+
};
|
|
124
|
+
ChatComposerDemo.argTypes = {
|
|
125
|
+
maxAttachments: { control: { type: 'number' } }
|
|
126
|
+
};
|
|
127
|
+
export const StandardChat = (args) => {
|
|
151
128
|
const ChatMockDataClone = useMemo(() => {
|
|
152
129
|
return JSON.parse(JSON.stringify(ChatMockData));
|
|
153
130
|
}, [ChatMockData]);
|
|
131
|
+
const Channels = {
|
|
132
|
+
label: 'Channel',
|
|
133
|
+
options: {
|
|
134
|
+
LiveChat: {
|
|
135
|
+
title: 'Live chat',
|
|
136
|
+
icon: 'chat-solid'
|
|
137
|
+
},
|
|
138
|
+
Twitter: {
|
|
139
|
+
title: 'Twitter chat',
|
|
140
|
+
icon: 'twitter'
|
|
141
|
+
},
|
|
142
|
+
Facebook: {
|
|
143
|
+
title: 'Facebook messenger',
|
|
144
|
+
icon: 'facebook'
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
};
|
|
154
148
|
const { participants, chatMessages: mockChatMessagesJson, transcripts, defaultAttachments, suggestedReplies } = ChatMockDataClone;
|
|
155
149
|
const conversationRatingMessage = {
|
|
156
150
|
id: createUID(),
|
|
@@ -195,25 +189,11 @@ export const StandardChat = ({ chatWidth = '30rem' }) => {
|
|
|
195
189
|
timers.current.forEach(clearTimeout);
|
|
196
190
|
};
|
|
197
191
|
}, []);
|
|
198
|
-
const selectedChannel = radios(Channels.label, channelOptions, Object.keys(channelOptions)[0]);
|
|
199
|
-
const actions = array('Actions', ['Transfer', 'End chat']).map(name => ({
|
|
200
|
-
primary: name,
|
|
201
|
-
id: name,
|
|
202
|
-
onClick: action(`Clicked ${name}`)
|
|
203
|
-
}));
|
|
204
192
|
const [showSuggestedReplies, setShowSuggestedReplies] = useState(true);
|
|
205
|
-
const disableChat = boolean('Disable chat', false);
|
|
206
|
-
const simulateConversation = boolean('Simulate conversation', false);
|
|
207
|
-
const placeHolder = text('Placeholder', 'Enter message');
|
|
208
|
-
const defaultMessage = text('Default message', 'Greetings! Hope you are having a great time, Please reach out to us for any help, Thanks!');
|
|
209
|
-
const maxLength = number('Max characters', 280);
|
|
210
|
-
const typers = optionsKnob('Participants typing', chatParticipants, '', {
|
|
211
|
-
display: 'multi-select'
|
|
212
|
-
});
|
|
213
193
|
const [showTranscripts, setShowTranscripts] = useState(false);
|
|
214
194
|
const [attachments, setAttachments] = useState(defaultAttachments);
|
|
215
195
|
const [unreadMessagesCount, setUnreadMessagesCount] = useState(0);
|
|
216
|
-
const [chatMessages, setChatMessages] = useState(simulateConversation ? mockChatMessages.slice(0, 0) : mockChatMessages);
|
|
196
|
+
const [chatMessages, setChatMessages] = useState(args.simulateConversation ? mockChatMessages.slice(0, 0) : mockChatMessages);
|
|
217
197
|
const onDeleteAttachment = useCallback((name) => {
|
|
218
198
|
setAttachments(prevAttachments => prevAttachments.filter(item => item.name !== name));
|
|
219
199
|
}, [setAttachments]);
|
|
@@ -252,7 +232,7 @@ export const StandardChat = ({ chatWidth = '30rem' }) => {
|
|
|
252
232
|
}
|
|
253
233
|
};
|
|
254
234
|
useEffect(() => {
|
|
255
|
-
if (simulateConversation) {
|
|
235
|
+
if (args.simulateConversation) {
|
|
256
236
|
const timeOutId = setTimeout(() => {
|
|
257
237
|
if (mockChatMessages.length) {
|
|
258
238
|
appendMessage(mockChatMessages.shift());
|
|
@@ -262,49 +242,7 @@ export const StandardChat = ({ chatWidth = '30rem' }) => {
|
|
|
262
242
|
clearTimeout(timeOutId);
|
|
263
243
|
};
|
|
264
244
|
}
|
|
265
|
-
}, [chatMessages, simulateConversation]);
|
|
266
|
-
const customerMessage = text('Customer message', '');
|
|
267
|
-
button('Send customer message', () => {
|
|
268
|
-
appendMessage({
|
|
269
|
-
type: 'message',
|
|
270
|
-
...participants.receiver,
|
|
271
|
-
message: customerMessage,
|
|
272
|
-
timeStamp: '1:45 PM'
|
|
273
|
-
});
|
|
274
|
-
return false;
|
|
275
|
-
});
|
|
276
|
-
const managerMessage = text('Manager message', '');
|
|
277
|
-
button('Send manager message', () => {
|
|
278
|
-
appendMessage({
|
|
279
|
-
type: 'message',
|
|
280
|
-
...participants.other,
|
|
281
|
-
message: managerMessage,
|
|
282
|
-
timeStamp: '1:45 PM'
|
|
283
|
-
});
|
|
284
|
-
return false;
|
|
285
|
-
});
|
|
286
|
-
const typingIndicators = typers
|
|
287
|
-
.toString()
|
|
288
|
-
.split(',')
|
|
289
|
-
.filter(person => person !== '')
|
|
290
|
-
.map(name => {
|
|
291
|
-
let message = '';
|
|
292
|
-
if (name === participants.receiver.avatarInfo.name) {
|
|
293
|
-
message = customerMessage;
|
|
294
|
-
}
|
|
295
|
-
else if (name === participants.other.avatarInfo.name) {
|
|
296
|
-
message = managerMessage;
|
|
297
|
-
}
|
|
298
|
-
return {
|
|
299
|
-
id: name,
|
|
300
|
-
type: 'typing',
|
|
301
|
-
avatarInfo: {
|
|
302
|
-
name
|
|
303
|
-
},
|
|
304
|
-
message,
|
|
305
|
-
ariaLabel: `${name} is typing`
|
|
306
|
-
};
|
|
307
|
-
});
|
|
245
|
+
}, [chatMessages, args.simulateConversation]);
|
|
308
246
|
const [openPopover, setOpenPopover] = useState(false);
|
|
309
247
|
const [popoverRef, setPopoverRef] = useElement();
|
|
310
248
|
const [buttonRef, setButtonRef] = useElement();
|
|
@@ -358,7 +296,7 @@ export const StandardChat = ({ chatWidth = '30rem' }) => {
|
|
|
358
296
|
if (openPopover)
|
|
359
297
|
setOpenPopover(false);
|
|
360
298
|
});
|
|
361
|
-
const header = (<ChatHeader title={Channels.options[selectedChannel].title} icon={Channels.options[selectedChannel].icon} aria-label='Chat header' actions={<Flex>
|
|
299
|
+
const header = (<ChatHeader title={Channels.options[args.selectedChannel || 'LiveChat'].title} icon={Channels.options[args.selectedChannel || 'LiveChat'].icon} aria-label='Chat header' actions={<Flex>
|
|
362
300
|
<Button variant='simple' onClick={() => setShowTranscripts(!showTranscripts)} aria-label='Show transcripts'>
|
|
363
301
|
<Flex container={{
|
|
364
302
|
gap: 1,
|
|
@@ -374,10 +312,15 @@ export const StandardChat = ({ chatWidth = '30rem' }) => {
|
|
|
374
312
|
<Popover show={openPopover} target={buttonRef} ref={setPopoverRef} arrow placement='bottom-end'>
|
|
375
313
|
<Flex container={{ direction: 'column', gap: 1, pad: 2 }}>
|
|
376
314
|
<Text variant='h4'>{additionalInfo.title}</Text>
|
|
377
|
-
<FieldValueList variant='inline' fields={additionalInfo.options[selectedChannel]}/>
|
|
315
|
+
<FieldValueList variant='inline' fields={additionalInfo.options[args.selectedChannel || 'LiveChat']}/>
|
|
378
316
|
</Flex>
|
|
379
317
|
</Popover>
|
|
380
|
-
<MenuButton text='More actions' icon='more' iconOnly variant='simple' portal menu={{
|
|
318
|
+
<MenuButton text='More actions' icon='more' iconOnly variant='simple' portal menu={{
|
|
319
|
+
items: [
|
|
320
|
+
{ primary: 'Transfer', id: 'transcript', onClick: action('Clicked Transfer') },
|
|
321
|
+
{ primary: 'End chat', id: 'endChat', onClick: action('Clicked End chat') }
|
|
322
|
+
]
|
|
323
|
+
}}/>
|
|
381
324
|
</Flex>}/>);
|
|
382
325
|
const [showEarlierTranscripts, setShowEarlierTranscripts] = useState(false);
|
|
383
326
|
const transcriptsContainerRef = useRef(null);
|
|
@@ -414,7 +357,6 @@ export const StandardChat = ({ chatWidth = '30rem' }) => {
|
|
|
414
357
|
})}
|
|
415
358
|
</div>) : undefined;
|
|
416
359
|
}, [showTranscripts, setShowTranscripts, showEarlierTranscripts, setShowEarlierTranscripts]);
|
|
417
|
-
const showChatBanner = boolean('Show banner', true);
|
|
418
360
|
const chatBanner = {
|
|
419
361
|
id: 'warning',
|
|
420
362
|
messages: ['This is a public interaction and any responses will be public and visible'],
|
|
@@ -422,7 +364,7 @@ export const StandardChat = ({ chatWidth = '30rem' }) => {
|
|
|
422
364
|
variant: 'warning'
|
|
423
365
|
};
|
|
424
366
|
const body = (<ChatBody>
|
|
425
|
-
<
|
|
367
|
+
<MessageList unReadMessageCount={unreadMessagesCount} onScrollToButtonClick={() => {
|
|
426
368
|
const newRandomMessageId = Math.random().toString(36).substr(2, 9);
|
|
427
369
|
setChatMessages(prevChatMessages => prevChatMessages.map(message => {
|
|
428
370
|
if (message.id === NewMessageSeparatorId) {
|
|
@@ -436,28 +378,21 @@ export const StandardChat = ({ chatWidth = '30rem' }) => {
|
|
|
436
378
|
}, 5000);
|
|
437
379
|
timers.current.push(timeOutId);
|
|
438
380
|
setUnreadMessagesCount(0);
|
|
439
|
-
}} tabIndex={0} ref={conversationRef} messages={[
|
|
381
|
+
}} tabIndex={0} ref={conversationRef} messages={[
|
|
382
|
+
...chatMessages,
|
|
383
|
+
{
|
|
384
|
+
id: 'Pegasystems',
|
|
385
|
+
type: 'typing',
|
|
386
|
+
avatarInfo: {
|
|
387
|
+
name: 'Pegasystems',
|
|
388
|
+
imageSrc: 'https://www.pega.com/sites/default/files/media/images/2018-12/Pega.com-og.png'
|
|
389
|
+
},
|
|
390
|
+
message: args.message,
|
|
391
|
+
ariaLabel: 'Pegasystems is typing'
|
|
392
|
+
}
|
|
393
|
+
]}/>
|
|
440
394
|
</ChatBody>);
|
|
441
395
|
const chatComposerImperativeHandleRef = useRef(null);
|
|
442
|
-
const phrase = text('Phrase', 'How can I help you?');
|
|
443
|
-
button('Push prase at start', () => {
|
|
444
|
-
if (chatComposerImperativeHandleRef.current) {
|
|
445
|
-
chatComposerImperativeHandleRef.current.appendToMessage(phrase, 'start');
|
|
446
|
-
}
|
|
447
|
-
return false;
|
|
448
|
-
});
|
|
449
|
-
button('Push prase at end', () => {
|
|
450
|
-
if (chatComposerImperativeHandleRef.current) {
|
|
451
|
-
chatComposerImperativeHandleRef.current.appendToMessage(phrase, 'end');
|
|
452
|
-
}
|
|
453
|
-
return false;
|
|
454
|
-
});
|
|
455
|
-
button('Push prase at cursor', () => {
|
|
456
|
-
if (chatComposerImperativeHandleRef.current) {
|
|
457
|
-
chatComposerImperativeHandleRef.current.appendToMessage(phrase, 'cursor');
|
|
458
|
-
}
|
|
459
|
-
return false;
|
|
460
|
-
});
|
|
461
396
|
const [mountPopover, setMountPopover] = useState(false);
|
|
462
397
|
const specialKeysConfig = {
|
|
463
398
|
keys: ['//'],
|
|
@@ -478,7 +413,7 @@ export const StandardChat = ({ chatWidth = '30rem' }) => {
|
|
|
478
413
|
useOuterEvent('mousedown', [chatComposerImperativeHandleRef?.current?.chatComposerRef?.current], () => {
|
|
479
414
|
setMountPopover(false);
|
|
480
415
|
});
|
|
481
|
-
const footer = (<ChatComposer ref={chatComposerImperativeHandleRef} maxAttachments={
|
|
416
|
+
const footer = (<ChatComposer ref={chatComposerImperativeHandleRef} maxAttachments={args.maxAttachments} attachments={attachments} specialKeysConfig={specialKeysConfig} showEmoji disabled={args.disableChat} onAddAttachment={() => {
|
|
482
417
|
setAttachments([
|
|
483
418
|
...attachments,
|
|
484
419
|
{
|
|
@@ -487,7 +422,7 @@ export const StandardChat = ({ chatWidth = '30rem' }) => {
|
|
|
487
422
|
onDelete: onDeleteAttachment
|
|
488
423
|
}
|
|
489
424
|
]);
|
|
490
|
-
}} maxLength={maxLength} placeholder={
|
|
425
|
+
}} maxLength={args.maxLength} placeholder={args.placeholder} defaultMessage={args.defaultMessage} onSend={message => {
|
|
491
426
|
action(`onAppendMessage: ${message}`)();
|
|
492
427
|
appendMessage({
|
|
493
428
|
...participants.sender,
|
|
@@ -496,8 +431,8 @@ export const StandardChat = ({ chatWidth = '30rem' }) => {
|
|
|
496
431
|
timeStamp: '1:45 PM'
|
|
497
432
|
});
|
|
498
433
|
}}>
|
|
499
|
-
<MenuButton text='Phrases' actions={[]} disabled={disableChat}/>
|
|
500
|
-
<MenuButton text='Page push' actions={[]} disabled={disableChat}/>
|
|
434
|
+
<MenuButton text='Phrases' actions={[]} disabled={args.disableChat}/>
|
|
435
|
+
<MenuButton text='Page push' actions={[]} disabled={args.disableChat}/>
|
|
501
436
|
<Popover show={mountPopover} target={chatComposerImperativeHandleRef?.current?.textAreaRef?.current} placement='top-start'>
|
|
502
437
|
<Menu scrollAt={20} items={ChatMockData.phrasesDisplayNames.map((name, idx) => ({
|
|
503
438
|
primary: name,
|
|
@@ -506,10 +441,6 @@ export const StandardChat = ({ chatWidth = '30rem' }) => {
|
|
|
506
441
|
}))}/>
|
|
507
442
|
</Popover>
|
|
508
443
|
</ChatComposer>);
|
|
509
|
-
button('Toggle suggested replies', () => {
|
|
510
|
-
setShowSuggestedReplies(show => !show);
|
|
511
|
-
return false;
|
|
512
|
-
});
|
|
513
444
|
const suggestedReplyPicker = suggestedReplies.length > 0 && showSuggestedReplies ? (<SuggestedReplyPicker replies={suggestedReplies} onSelect={(suggestedReply) => {
|
|
514
445
|
chatComposerImperativeHandleRef.current?.appendToMessage(suggestedReply.message, 'cursor');
|
|
515
446
|
setShowSuggestedReplies(false);
|
|
@@ -524,13 +455,35 @@ export const StandardChat = ({ chatWidth = '30rem' }) => {
|
|
|
524
455
|
justify: 'center'
|
|
525
456
|
}} style={{
|
|
526
457
|
height: 'calc(100vh)',
|
|
527
|
-
width: chatWidth,
|
|
458
|
+
width: args.chatWidth || '30rem',
|
|
528
459
|
margin: 'auto'
|
|
529
460
|
}}>
|
|
530
|
-
<Chat utility={utilityComp} header={header} banner={showChatBanner ? chatBanner : undefined} body={body} footer={footer} suggestedReplyPicker={suggestedReplyPicker}/>
|
|
461
|
+
<Chat utility={utilityComp} header={header} banner={args.showChatBanner ? chatBanner : undefined} body={body} footer={footer} suggestedReplyPicker={suggestedReplyPicker}/>
|
|
531
462
|
</Flex>
|
|
532
463
|
</EmojiContext.Provider>);
|
|
533
464
|
};
|
|
465
|
+
StandardChat.args = {
|
|
466
|
+
maxAttachments: 2,
|
|
467
|
+
selectedChannel: 'LiveChat',
|
|
468
|
+
showChatBanner: true,
|
|
469
|
+
disableChat: false,
|
|
470
|
+
simulateConversation: false,
|
|
471
|
+
message: '',
|
|
472
|
+
placeholder: 'Enter message',
|
|
473
|
+
defaultMessage: 'Greetings! Hope you are having a great time, Please reach out to us for any help, Thanks!',
|
|
474
|
+
maxLength: 280
|
|
475
|
+
};
|
|
476
|
+
StandardChat.argTypes = {
|
|
477
|
+
maxAttachments: { control: { type: 'number' } },
|
|
478
|
+
selectedChannel: { options: ['LiveChat', 'Twitter', 'Facebook'], control: { type: 'select' } },
|
|
479
|
+
showChatBanner: { control: { type: 'boolean' } },
|
|
480
|
+
disableChat: { control: { type: 'boolean' } },
|
|
481
|
+
simulateConversation: { control: { type: 'boolean' } },
|
|
482
|
+
message: { control: { type: 'text' } },
|
|
483
|
+
placeholder: { control: { type: 'text' } },
|
|
484
|
+
defaultMessage: { control: { type: 'text' } },
|
|
485
|
+
maxLength: { control: { type: 'number' } }
|
|
486
|
+
};
|
|
534
487
|
StandardChat.parameters = {
|
|
535
488
|
layout: 'fullscreen'
|
|
536
489
|
};
|