@pega/cosmos-react-demos 2.0.0 → 2.1.3
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 +8 -0
- package/jsx/build/AppHeader/AppHeader.stories.d.ts.map +1 -0
- package/{lib → jsx}/build/AppHeader/AppHeader.stories.jsx +0 -0
- package/{lib → jsx}/build/AppHeader/AppHeader.stories.jsx.map +0 -0
- package/jsx/build/AppShell/AppShell.mocks.d.ts +50 -0
- package/jsx/build/AppShell/AppShell.mocks.d.ts.map +1 -0
- package/jsx/build/AppShell/AppShell.mocks.js +503 -0
- package/jsx/build/AppShell/AppShell.mocks.js.map +1 -0
- package/jsx/build/AppShell/AppShell.stories.d.ts +12 -0
- package/jsx/build/AppShell/AppShell.stories.d.ts.map +1 -0
- package/jsx/build/AppShell/AppShell.stories.jsx +194 -0
- package/jsx/build/AppShell/AppShell.stories.jsx.map +1 -0
- package/jsx/build/FlowModeller/AddNodeUtils.mocks.d.ts +45 -0
- package/jsx/build/FlowModeller/AddNodeUtils.mocks.d.ts.map +1 -0
- package/jsx/build/FlowModeller/AddNodeUtils.mocks.js +291 -0
- package/jsx/build/FlowModeller/AddNodeUtils.mocks.js.map +1 -0
- package/jsx/build/FlowModeller/FlowModeller.mocks.d.ts +9 -0
- package/jsx/build/FlowModeller/FlowModeller.mocks.d.ts.map +1 -0
- package/jsx/build/FlowModeller/FlowModeller.mocks.js +411 -0
- package/jsx/build/FlowModeller/FlowModeller.mocks.js.map +1 -0
- package/jsx/build/FlowModeller/FlowModeller.stories.d.ts +12 -0
- package/jsx/build/FlowModeller/FlowModeller.stories.d.ts.map +1 -0
- package/{lib → jsx}/build/FlowModeller/FlowModeller.stories.jsx +0 -0
- package/{lib → jsx}/build/FlowModeller/FlowModeller.stories.jsx.map +0 -0
- package/jsx/build/LifeCycle/LifeCycle.mocks.d.ts +201 -0
- package/jsx/build/LifeCycle/LifeCycle.mocks.d.ts.map +1 -0
- package/jsx/build/LifeCycle/LifeCycle.mocks.js +1128 -0
- package/jsx/build/LifeCycle/LifeCycle.mocks.js.map +1 -0
- package/jsx/build/LifeCycle/LifeCycle.stories.d.ts +11 -0
- package/jsx/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -0
- package/{lib → jsx}/build/LifeCycle/LifeCycle.stories.jsx +0 -0
- package/{lib → jsx}/build/LifeCycle/LifeCycle.stories.jsx.map +0 -0
- package/jsx/build/LifeCycle/utils.d.ts +65 -0
- package/jsx/build/LifeCycle/utils.d.ts.map +1 -0
- package/jsx/build/LifeCycle/utils.js +218 -0
- package/jsx/build/LifeCycle/utils.js.map +1 -0
- package/jsx/build/PageTemplates/GalleryPage.stories.d.ts +12 -0
- package/jsx/build/PageTemplates/GalleryPage.stories.d.ts.map +1 -0
- package/{lib → jsx}/build/PageTemplates/GalleryPage.stories.jsx +0 -0
- package/{lib → jsx}/build/PageTemplates/GalleryPage.stories.jsx.map +0 -0
- package/jsx/build/PageTemplates/PageTemplates.stories.d.ts +26 -0
- package/jsx/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -0
- package/{lib → jsx}/build/PageTemplates/PageTemplates.stories.jsx +0 -0
- package/{lib → jsx}/build/PageTemplates/PageTemplates.stories.jsx.map +0 -0
- package/jsx/build/Workbench/Workbench.mocks.d.ts +9 -0
- package/jsx/build/Workbench/Workbench.mocks.d.ts.map +1 -0
- package/jsx/build/Workbench/Workbench.mocks.js +67 -0
- package/jsx/build/Workbench/Workbench.mocks.js.map +1 -0
- package/jsx/build/Workbench/Workbench.stories.d.ts +10 -0
- package/jsx/build/Workbench/Workbench.stories.d.ts.map +1 -0
- package/{lib → jsx}/build/Workbench/Workbench.stories.jsx +0 -0
- package/{lib → jsx}/build/Workbench/Workbench.stories.jsx.map +0 -0
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts +10 -0
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts.map +1 -0
- package/{lib → jsx}/condition-builder/ConditionBuilder/ConditionBuilder.stories.jsx +0 -0
- package/{lib → jsx}/condition-builder/ConditionBuilder/ConditionBuilder.stories.jsx.map +0 -0
- package/jsx/condition-builder/ConditionBuilder/props.mock.d.ts +6 -0
- package/jsx/condition-builder/ConditionBuilder/props.mock.d.ts.map +1 -0
- package/jsx/condition-builder/ConditionBuilder/props.mock.js +113 -0
- package/jsx/condition-builder/ConditionBuilder/props.mock.js.map +1 -0
- package/jsx/core/AppShell/AppShell.mocks.d.ts +15 -0
- package/jsx/core/AppShell/AppShell.mocks.d.ts.map +1 -0
- package/{lib → jsx}/core/AppShell/AppShell.mocks.jsx +0 -0
- package/{lib → jsx}/core/AppShell/AppShell.mocks.jsx.map +0 -0
- package/jsx/core/AppShell/AppShell.stories.d.ts +31 -0
- package/jsx/core/AppShell/AppShell.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/AppShell/AppShell.stories.jsx +0 -0
- package/{lib → jsx}/core/AppShell/AppShell.stories.jsx.map +0 -0
- package/jsx/core/AppShell/AppShell.styles.d.ts +2 -0
- package/jsx/core/AppShell/AppShell.styles.d.ts.map +1 -0
- package/jsx/core/AppShell/AppShell.styles.js +5 -0
- package/jsx/core/AppShell/AppShell.styles.js.map +1 -0
- package/jsx/core/Avatar/Avatar.stories.d.ts +10 -0
- package/jsx/core/Avatar/Avatar.stories.d.ts.map +1 -0
- package/jsx/core/Avatar/Avatar.stories.jsx +50 -0
- package/jsx/core/Avatar/Avatar.stories.jsx.map +1 -0
- package/jsx/core/Backdrop/Backdrop.stories.d.ts +7 -0
- package/jsx/core/Backdrop/Backdrop.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Backdrop/Backdrop.stories.jsx +0 -0
- package/{lib → jsx}/core/Backdrop/Backdrop.stories.jsx.map +0 -0
- package/jsx/core/Badges/Alert.stories.d.ts +6 -0
- package/jsx/core/Badges/Alert.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Badges/Alert.stories.jsx +0 -0
- package/{lib → jsx}/core/Badges/Alert.stories.jsx.map +0 -0
- package/jsx/core/Badges/Count.stories.d.ts +6 -0
- package/jsx/core/Badges/Count.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Badges/Count.stories.jsx +0 -0
- package/{lib → jsx}/core/Badges/Count.stories.jsx.map +0 -0
- package/jsx/core/Badges/Selection.stories.d.ts +6 -0
- package/jsx/core/Badges/Selection.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Badges/Selection.stories.jsx +0 -0
- package/{lib → jsx}/core/Badges/Selection.stories.jsx.map +0 -0
- package/jsx/core/Badges/Status.stories.d.ts +6 -0
- package/jsx/core/Badges/Status.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Badges/Status.stories.jsx +0 -0
- package/{lib → jsx}/core/Badges/Status.stories.jsx.map +0 -0
- package/jsx/core/Badges/Tag.stories.d.ts +6 -0
- package/jsx/core/Badges/Tag.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Badges/Tag.stories.jsx +0 -0
- package/{lib → jsx}/core/Badges/Tag.stories.jsx.map +0 -0
- 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 +22 -0
- package/jsx/core/Banner/Banner.stories.d.ts.map +1 -0
- package/jsx/core/Banner/Banner.stories.jsx +87 -0
- package/jsx/core/Banner/Banner.stories.jsx.map +1 -0
- package/jsx/core/Boolean/BooleanDisplay.stories.d.ts +6 -0
- package/jsx/core/Boolean/BooleanDisplay.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Boolean/BooleanDisplay.stories.jsx +0 -0
- package/{lib → jsx}/core/Boolean/BooleanDisplay.stories.jsx.map +0 -0
- package/jsx/core/Breadcrumbs/Breadcrumbs.stories.d.ts +7 -0
- package/jsx/core/Breadcrumbs/Breadcrumbs.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Breadcrumbs/Breadcrumbs.stories.jsx +0 -0
- package/{lib → jsx}/core/Breadcrumbs/Breadcrumbs.stories.jsx.map +0 -0
- package/jsx/core/Breadcrumbs/Breadcrumbs.styles.d.ts +2 -0
- package/jsx/core/Breadcrumbs/Breadcrumbs.styles.d.ts.map +1 -0
- package/jsx/core/Breadcrumbs/Breadcrumbs.styles.js +12 -0
- package/jsx/core/Breadcrumbs/Breadcrumbs.styles.js.map +1 -0
- package/jsx/core/Button/Button.stories.d.ts +12 -0
- package/jsx/core/Button/Button.stories.d.ts.map +1 -0
- package/jsx/core/Button/Button.stories.jsx +103 -0
- package/jsx/core/Button/Button.stories.jsx.map +1 -0
- package/jsx/core/Card/Card.stories.d.ts +8 -0
- package/jsx/core/Card/Card.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Card/Card.stories.jsx +0 -0
- package/{lib → jsx}/core/Card/Card.stories.jsx.map +0 -0
- package/jsx/core/Card/Card.styles.d.ts +2 -0
- package/jsx/core/Card/Card.styles.d.ts.map +1 -0
- package/jsx/core/Card/Card.styles.js +5 -0
- package/jsx/core/Card/Card.styles.js.map +1 -0
- package/jsx/core/Checkbox/Checkbox.stories.d.ts +7 -0
- package/jsx/core/Checkbox/Checkbox.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Checkbox/Checkbox.stories.jsx +0 -0
- package/{lib → jsx}/core/Checkbox/Checkbox.stories.jsx.map +0 -0
- package/jsx/core/CheckboxGroup/CheckboxGroup.stories.d.ts +7 -0
- package/jsx/core/CheckboxGroup/CheckboxGroup.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/CheckboxGroup/CheckboxGroup.stories.jsx +0 -0
- package/{lib → jsx}/core/CheckboxGroup/CheckboxGroup.stories.jsx.map +0 -0
- package/jsx/core/CheckboxGroup/CheckboxGroup.styles.d.ts +4 -0
- package/jsx/core/CheckboxGroup/CheckboxGroup.styles.d.ts.map +1 -0
- package/jsx/core/CheckboxGroup/CheckboxGroup.styles.js +9 -0
- package/jsx/core/CheckboxGroup/CheckboxGroup.styles.js.map +1 -0
- package/jsx/core/ColorPicker/ColorPicker.stories.d.ts +8 -0
- package/jsx/core/ColorPicker/ColorPicker.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/ColorPicker/ColorPicker.stories.jsx +0 -0
- package/{lib → jsx}/core/ColorPicker/ColorPicker.stories.jsx.map +0 -0
- package/jsx/core/ComboBox/ComboBox.mocks.d.ts +24 -0
- package/jsx/core/ComboBox/ComboBox.mocks.d.ts.map +1 -0
- package/jsx/core/ComboBox/ComboBox.mocks.js +54 -0
- package/jsx/core/ComboBox/ComboBox.mocks.js.map +1 -0
- package/jsx/core/ComboBox/ComboBox.stories.d.ts +21 -0
- package/jsx/core/ComboBox/ComboBox.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/ComboBox/ComboBox.stories.jsx +0 -0
- package/{lib → jsx}/core/ComboBox/ComboBox.stories.jsx.map +0 -0
- package/jsx/core/Configuration/Configuration.stories.d.ts +10 -0
- package/jsx/core/Configuration/Configuration.stories.d.ts.map +1 -0
- package/jsx/core/Configuration/Configuration.stories.jsx +125 -0
- package/jsx/core/Configuration/Configuration.stories.jsx.map +1 -0
- package/jsx/core/Currency/Currency.stories.d.ts +11 -0
- package/jsx/core/Currency/Currency.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Currency/Currency.stories.jsx +0 -0
- package/{lib → jsx}/core/Currency/Currency.stories.jsx.map +0 -0
- package/jsx/core/DateTime/DateTime.stories.d.ts +20 -0
- package/jsx/core/DateTime/DateTime.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/DateTime/DateTime.stories.jsx +0 -0
- package/{lib → jsx}/core/DateTime/DateTime.stories.jsx.map +0 -0
- package/jsx/core/DateTime/DateTimeDisplay.stories.d.ts +7 -0
- package/jsx/core/DateTime/DateTimeDisplay.stories.d.ts.map +1 -0
- package/jsx/core/DateTime/DateTimeDisplay.stories.jsx +47 -0
- package/jsx/core/DateTime/DateTimeDisplay.stories.jsx.map +1 -0
- package/jsx/core/DateTime/DateTimePicker.stories.d.ts +7 -0
- package/jsx/core/DateTime/DateTimePicker.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/DateTime/DateTimePicker.stories.jsx +0 -0
- package/{lib → jsx}/core/DateTime/DateTimePicker.stories.jsx.map +0 -0
- package/jsx/core/Drawer/Drawer.stories.d.ts +7 -0
- package/jsx/core/Drawer/Drawer.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Drawer/Drawer.stories.jsx +0 -0
- package/{lib → jsx}/core/Drawer/Drawer.stories.jsx.map +0 -0
- package/jsx/core/Drawer/Drawer.styles.d.ts +2 -0
- package/jsx/core/Drawer/Drawer.styles.d.ts.map +1 -0
- package/jsx/core/Drawer/Drawer.styles.js +11 -0
- package/jsx/core/Drawer/Drawer.styles.js.map +1 -0
- package/jsx/core/Email/EmailDisplay.stories.d.ts +6 -0
- package/jsx/core/Email/EmailDisplay.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Email/EmailDisplay.stories.jsx +0 -0
- package/{lib → jsx}/core/Email/EmailDisplay.stories.jsx.map +0 -0
- package/jsx/core/EmojiPicker/EmojiPicker.stories.d.ts +8 -0
- package/jsx/core/EmojiPicker/EmojiPicker.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/EmojiPicker/EmojiPicker.stories.jsx +0 -0
- package/{lib → jsx}/core/EmojiPicker/EmojiPicker.stories.jsx.map +0 -0
- package/jsx/core/EmptyState/EmptyState.stories.d.ts +6 -0
- package/jsx/core/EmptyState/EmptyState.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/EmptyState/EmptyState.stories.jsx +0 -0
- package/{lib → jsx}/core/EmptyState/EmptyState.stories.jsx.map +0 -0
- package/jsx/core/ErrorState/ErrorState.stories.d.ts +9 -0
- package/jsx/core/ErrorState/ErrorState.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/ErrorState/ErrorState.stories.jsx +0 -0
- package/{lib → jsx}/core/ErrorState/ErrorState.stories.jsx.map +0 -0
- package/jsx/core/ExpandCollapse/ExpandCollapse.stories.d.ts +7 -0
- package/jsx/core/ExpandCollapse/ExpandCollapse.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/ExpandCollapse/ExpandCollapse.stories.jsx +0 -0
- package/{lib → jsx}/core/ExpandCollapse/ExpandCollapse.stories.jsx.map +0 -0
- package/jsx/core/ExpandCollapse/ExpandCollapse.styles.d.ts +4 -0
- package/jsx/core/ExpandCollapse/ExpandCollapse.styles.d.ts.map +1 -0
- package/jsx/core/ExpandCollapse/ExpandCollapse.styles.js +17 -0
- package/jsx/core/ExpandCollapse/ExpandCollapse.styles.js.map +1 -0
- package/jsx/core/FieldGroup/FieldGroup.stories.d.ts +11 -0
- package/jsx/core/FieldGroup/FieldGroup.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/FieldGroup/FieldGroup.stories.jsx +0 -0
- package/{lib → jsx}/core/FieldGroup/FieldGroup.stories.jsx.map +0 -0
- 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 +10 -0
- package/jsx/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -0
- package/jsx/core/FieldGroup/FieldGroupList.stories.jsx +150 -0
- package/jsx/core/FieldGroup/FieldGroupList.stories.jsx.map +1 -0
- package/jsx/core/FieldValueList/FieldValueList.stories.d.ts +10 -0
- package/jsx/core/FieldValueList/FieldValueList.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/FieldValueList/FieldValueList.stories.jsx +0 -0
- package/{lib → jsx}/core/FieldValueList/FieldValueList.stories.jsx.map +0 -0
- package/jsx/core/File/FileDisplay.stories.d.ts +20 -0
- package/jsx/core/File/FileDisplay.stories.d.ts.map +1 -0
- package/jsx/core/File/FileDisplay.stories.jsx +135 -0
- package/jsx/core/File/FileDisplay.stories.jsx.map +1 -0
- package/jsx/core/File/FileInput.stories.d.ts +9 -0
- package/jsx/core/File/FileInput.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/File/FileInput.stories.jsx +0 -0
- package/{lib → jsx}/core/File/FileInput.stories.jsx.map +0 -0
- package/jsx/core/Flex/Flex.styles.d.ts +10 -0
- package/jsx/core/Flex/Flex.styles.d.ts.map +1 -0
- package/jsx/core/Flex/Flex.styles.js +41 -0
- package/jsx/core/Flex/Flex.styles.js.map +1 -0
- package/jsx/core/Flex/FlexContainer.stories.d.ts +22 -0
- package/jsx/core/Flex/FlexContainer.stories.d.ts.map +1 -0
- package/jsx/core/Flex/FlexContainer.stories.jsx +164 -0
- package/jsx/core/Flex/FlexContainer.stories.jsx.map +1 -0
- package/jsx/core/Flex/FlexItem.stories.d.ts +13 -0
- package/jsx/core/Flex/FlexItem.stories.d.ts.map +1 -0
- package/jsx/core/Flex/FlexItem.stories.jsx +71 -0
- package/jsx/core/Flex/FlexItem.stories.jsx.map +1 -0
- 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 +14 -0
- package/jsx/core/Form/Form.stories.d.ts.map +1 -0
- package/jsx/core/Form/Form.stories.jsx +62 -0
- package/jsx/core/Form/Form.stories.jsx.map +1 -0
- package/jsx/core/Grid/Grid.styles.d.ts +6 -0
- package/jsx/core/Grid/Grid.styles.d.ts.map +1 -0
- package/jsx/core/Grid/Grid.styles.js +36 -0
- package/jsx/core/Grid/Grid.styles.js.map +1 -0
- package/jsx/core/Grid/GridContainer.stories.d.ts +24 -0
- package/jsx/core/Grid/GridContainer.stories.d.ts.map +1 -0
- package/jsx/core/Grid/GridContainer.stories.jsx +168 -0
- package/jsx/core/Grid/GridContainer.stories.jsx.map +1 -0
- package/jsx/core/Grid/GridItem.stories.d.ts +13 -0
- package/jsx/core/Grid/GridItem.stories.d.ts.map +1 -0
- package/jsx/core/Grid/GridItem.stories.jsx +74 -0
- package/jsx/core/Grid/GridItem.stories.jsx.map +1 -0
- 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 +9 -0
- package/jsx/core/Icon/Icon.stories.d.ts.map +1 -0
- package/jsx/core/Icon/Icon.stories.jsx +90 -0
- package/jsx/core/Icon/Icon.stories.jsx.map +1 -0
- package/jsx/core/IconPicker/IconPicker.stories.d.ts +6 -0
- package/jsx/core/IconPicker/IconPicker.stories.d.ts.map +1 -0
- package/jsx/core/IconPicker/IconPicker.stories.jsx +38 -0
- package/jsx/core/IconPicker/IconPicker.stories.jsx.map +1 -0
- package/jsx/core/Image/Image.stories.d.ts +6 -0
- package/jsx/core/Image/Image.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Image/Image.stories.jsx +0 -0
- package/{lib → jsx}/core/Image/Image.stories.jsx.map +0 -0
- package/jsx/core/Input/Input.stories.d.ts +9 -0
- package/jsx/core/Input/Input.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Input/Input.stories.jsx +0 -0
- package/{lib → jsx}/core/Input/Input.stories.jsx.map +0 -0
- package/jsx/core/Label/Label.stories.d.ts +6 -0
- package/jsx/core/Label/Label.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Label/Label.stories.jsx +0 -0
- package/{lib → jsx}/core/Label/Label.stories.jsx.map +0 -0
- 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 +10 -0
- package/jsx/core/Lightbox/Lightbox.stories.d.ts.map +1 -0
- package/jsx/core/Lightbox/Lightbox.stories.jsx +55 -0
- package/jsx/core/Lightbox/Lightbox.stories.jsx.map +1 -0
- package/jsx/core/Link/Link.stories.d.ts +18 -0
- package/jsx/core/Link/Link.stories.d.ts.map +1 -0
- package/jsx/core/Link/Link.stories.jsx +49 -0
- package/jsx/core/Link/Link.stories.jsx.map +1 -0
- package/jsx/core/List/CommaSeparatedList.stories.d.ts +6 -0
- package/jsx/core/List/CommaSeparatedList.stories.d.ts.map +1 -0
- package/jsx/core/List/CommaSeparatedList.stories.jsx +31 -0
- package/jsx/core/List/CommaSeparatedList.stories.jsx.map +1 -0
- package/jsx/core/List/OrderedList.stories.d.ts +10 -0
- package/jsx/core/List/OrderedList.stories.d.ts.map +1 -0
- package/jsx/core/List/OrderedList.stories.jsx +38 -0
- package/jsx/core/List/OrderedList.stories.jsx.map +1 -0
- package/jsx/core/List/UnorderedList.stories.d.ts +10 -0
- package/jsx/core/List/UnorderedList.stories.d.ts.map +1 -0
- package/jsx/core/List/UnorderedList.stories.jsx +38 -0
- package/jsx/core/List/UnorderedList.stories.jsx.map +1 -0
- package/jsx/core/Location/Location.stories.d.ts +12 -0
- package/jsx/core/Location/Location.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Location/Location.stories.jsx +0 -0
- package/{lib → jsx}/core/Location/Location.stories.jsx.map +0 -0
- package/jsx/core/Menu/Menu.mocks.d.ts +4 -0
- package/jsx/core/Menu/Menu.mocks.d.ts.map +1 -0
- package/jsx/core/Menu/Menu.mocks.js +179 -0
- package/jsx/core/Menu/Menu.mocks.js.map +1 -0
- package/jsx/core/Menu/Menu.stories.d.ts +16 -0
- package/jsx/core/Menu/Menu.stories.d.ts.map +1 -0
- package/jsx/core/Menu/Menu.stories.jsx +164 -0
- package/jsx/core/Menu/Menu.stories.jsx.map +1 -0
- package/jsx/core/Menu/Menu.styles.d.ts +2 -0
- package/jsx/core/Menu/Menu.styles.d.ts.map +1 -0
- package/jsx/core/Menu/Menu.styles.js +6 -0
- package/jsx/core/Menu/Menu.styles.js.map +1 -0
- package/jsx/core/MenuButton/MenuButton.stories.d.ts +15 -0
- package/jsx/core/MenuButton/MenuButton.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/MenuButton/MenuButton.stories.jsx +0 -0
- package/{lib → jsx}/core/MenuButton/MenuButton.stories.jsx.map +0 -0
- package/jsx/core/MetaList/MetaList.stories.d.ts +9 -0
- package/jsx/core/MetaList/MetaList.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/MetaList/MetaList.stories.jsx +0 -0
- package/{lib → jsx}/core/MetaList/MetaList.stories.jsx.map +0 -0
- package/jsx/core/Modal/Modal.mocks.d.ts +4 -0
- package/jsx/core/Modal/Modal.mocks.d.ts.map +1 -0
- package/jsx/core/Modal/Modal.mocks.jsx +44 -0
- package/jsx/core/Modal/Modal.mocks.jsx.map +1 -0
- package/jsx/core/Modal/Modal.stories.d.ts +20 -0
- package/jsx/core/Modal/Modal.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Modal/Modal.stories.jsx +0 -0
- package/{lib → jsx}/core/Modal/Modal.stories.jsx.map +0 -0
- package/jsx/core/MultiStep/MultiStep.stories.d.ts +6 -0
- package/jsx/core/MultiStep/MultiStep.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/MultiStep/MultiStep.stories.jsx +0 -0
- package/{lib → jsx}/core/MultiStep/MultiStep.stories.jsx.map +0 -0
- package/jsx/core/Number/Number.stories.d.ts +13 -0
- package/jsx/core/Number/Number.stories.d.ts.map +1 -0
- package/jsx/core/Number/Number.stories.jsx +110 -0
- package/jsx/core/Number/Number.stories.jsx.map +1 -0
- package/jsx/core/PageTemplates/PageTemplates.mocks.d.ts +3 -0
- package/jsx/core/PageTemplates/PageTemplates.mocks.d.ts.map +1 -0
- package/jsx/core/PageTemplates/PageTemplates.mocks.js +10 -0
- package/jsx/core/PageTemplates/PageTemplates.mocks.js.map +1 -0
- package/jsx/core/PageTemplates/PageTemplates.stories.d.ts +31 -0
- package/jsx/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -0
- package/jsx/core/PageTemplates/PageTemplates.stories.jsx +233 -0
- package/jsx/core/PageTemplates/PageTemplates.stories.jsx.map +1 -0
- package/jsx/core/PageTemplates/PageTemplates.styles.d.ts +4 -0
- package/jsx/core/PageTemplates/PageTemplates.styles.d.ts.map +1 -0
- package/jsx/core/PageTemplates/PageTemplates.styles.js +31 -0
- package/jsx/core/PageTemplates/PageTemplates.styles.js.map +1 -0
- package/jsx/core/Pagination/Pagination.stories.d.ts +6 -0
- package/jsx/core/Pagination/Pagination.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Pagination/Pagination.stories.jsx +0 -0
- package/{lib → jsx}/core/Pagination/Pagination.stories.jsx.map +0 -0
- package/jsx/core/Paragraph/ParagraphDisplay.stories.d.ts +6 -0
- package/jsx/core/Paragraph/ParagraphDisplay.stories.d.ts.map +1 -0
- package/jsx/core/Paragraph/ParagraphDisplay.stories.jsx +15 -0
- package/jsx/core/Paragraph/ParagraphDisplay.stories.jsx.map +1 -0
- package/jsx/core/Phone/Phone.stories.d.ts +7 -0
- package/jsx/core/Phone/Phone.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Phone/Phone.stories.jsx +0 -0
- package/{lib → jsx}/core/Phone/Phone.stories.jsx.map +0 -0
- package/jsx/core/Popover/Popover.stories.d.ts +7 -0
- package/jsx/core/Popover/Popover.stories.d.ts.map +1 -0
- package/jsx/core/Popover/Popover.stories.jsx +182 -0
- package/jsx/core/Popover/Popover.stories.jsx.map +1 -0
- package/jsx/core/Progress/Progress.stories.d.ts +7 -0
- package/jsx/core/Progress/Progress.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Progress/Progress.stories.jsx +0 -0
- package/{lib → jsx}/core/Progress/Progress.stories.jsx.map +0 -0
- package/jsx/core/Progress/Progress.styles.d.ts +2 -0
- package/jsx/core/Progress/Progress.styles.d.ts.map +1 -0
- package/jsx/core/Progress/Progress.styles.js +13 -0
- package/jsx/core/Progress/Progress.styles.js.map +1 -0
- package/jsx/core/RadioButton/RadioButton.stories.d.ts +7 -0
- package/jsx/core/RadioButton/RadioButton.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/RadioButton/RadioButton.stories.jsx +0 -0
- package/{lib → jsx}/core/RadioButton/RadioButton.stories.jsx.map +0 -0
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.stories.d.ts +7 -0
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/RadioButtonGroup/RadioButtonGroup.stories.jsx +0 -0
- package/{lib → jsx}/core/RadioButtonGroup/RadioButtonGroup.stories.jsx.map +0 -0
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.styles.d.ts +4 -0
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.styles.d.ts.map +1 -0
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.styles.js +9 -0
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.styles.js.map +1 -0
- package/jsx/core/Rating/Rating.stories.d.ts +9 -0
- package/jsx/core/Rating/Rating.stories.d.ts.map +1 -0
- package/jsx/core/Rating/Rating.stories.jsx +21 -0
- package/jsx/core/Rating/Rating.stories.jsx.map +1 -0
- package/jsx/core/SearchInput/SearchInput.stories.d.ts +6 -0
- package/jsx/core/SearchInput/SearchInput.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/SearchInput/SearchInput.stories.jsx +0 -0
- package/{lib → jsx}/core/SearchInput/SearchInput.stories.jsx.map +0 -0
- package/jsx/core/Select/Select.stories.d.ts +9 -0
- package/jsx/core/Select/Select.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Select/Select.stories.jsx +0 -0
- package/{lib → jsx}/core/Select/Select.stories.jsx.map +0 -0
- package/jsx/core/Sentiment/Sentiment.stories.d.ts +14 -0
- package/jsx/core/Sentiment/Sentiment.stories.d.ts.map +1 -0
- package/jsx/core/Sentiment/Sentiment.stories.jsx +39 -0
- package/jsx/core/Sentiment/Sentiment.stories.jsx.map +1 -0
- package/jsx/core/Slider/Slider.stories.d.ts +11 -0
- package/jsx/core/Slider/Slider.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Slider/Slider.stories.jsx +0 -0
- package/{lib → jsx}/core/Slider/Slider.stories.jsx.map +0 -0
- package/jsx/core/SummaryItem/SummaryItem.stories.d.ts +11 -0
- package/jsx/core/SummaryItem/SummaryItem.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/SummaryItem/SummaryItem.stories.jsx +0 -0
- package/{lib → jsx}/core/SummaryItem/SummaryItem.stories.jsx.map +0 -0
- package/jsx/core/SummaryList/SummaryList.mocks.d.ts +32 -0
- package/jsx/core/SummaryList/SummaryList.mocks.d.ts.map +1 -0
- package/{lib → jsx}/core/SummaryList/SummaryList.mocks.jsx +0 -0
- package/{lib → jsx}/core/SummaryList/SummaryList.mocks.jsx.map +0 -0
- package/jsx/core/SummaryList/SummaryList.stories.d.ts +13 -0
- package/jsx/core/SummaryList/SummaryList.stories.d.ts.map +1 -0
- package/jsx/core/SummaryList/SummaryList.stories.jsx +131 -0
- package/jsx/core/SummaryList/SummaryList.stories.jsx.map +1 -0
- package/jsx/core/Switch/Switch.stories.d.ts +7 -0
- package/jsx/core/Switch/Switch.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Switch/Switch.stories.jsx +0 -0
- package/{lib → jsx}/core/Switch/Switch.stories.jsx.map +0 -0
- package/jsx/core/Switch/Switch.styles.d.ts +2 -0
- package/jsx/core/Switch/Switch.styles.d.ts.map +1 -0
- package/jsx/core/Switch/Switch.styles.js +13 -0
- package/jsx/core/Switch/Switch.styles.js.map +1 -0
- package/jsx/core/Table/Table.mocks.d.ts +19 -0
- package/jsx/core/Table/Table.mocks.d.ts.map +1 -0
- package/{lib → jsx}/core/Table/Table.mocks.jsx +0 -0
- package/{lib → jsx}/core/Table/Table.mocks.jsx.map +0 -0
- package/jsx/core/Table/Table.stories.d.ts +14 -0
- package/jsx/core/Table/Table.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Table/Table.stories.jsx +0 -0
- package/{lib → jsx}/core/Table/Table.stories.jsx.map +0 -0
- package/jsx/core/Table/Table.styles.d.ts +4 -0
- package/jsx/core/Table/Table.styles.d.ts.map +1 -0
- package/jsx/core/Table/Table.styles.js +9 -0
- package/jsx/core/Table/Table.styles.js.map +1 -0
- package/jsx/core/Tabs/Tabs.stories.d.ts +7 -0
- package/jsx/core/Tabs/Tabs.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Tabs/Tabs.stories.jsx +0 -0
- package/{lib → jsx}/core/Tabs/Tabs.stories.jsx.map +0 -0
- package/jsx/core/Text/Text.stories.d.ts +6 -0
- package/jsx/core/Text/Text.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Text/Text.stories.jsx +0 -0
- package/{lib → jsx}/core/Text/Text.stories.jsx.map +0 -0
- package/jsx/core/TextArea/TextArea.stories.d.ts +6 -0
- package/jsx/core/TextArea/TextArea.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/TextArea/TextArea.stories.jsx +0 -0
- package/{lib → jsx}/core/TextArea/TextArea.stories.jsx.map +0 -0
- package/jsx/core/Toaster/Toaster.stories.d.ts +6 -0
- package/jsx/core/Toaster/Toaster.stories.d.ts.map +1 -0
- package/jsx/core/Toaster/Toaster.stories.jsx +22 -0
- package/jsx/core/Toaster/Toaster.stories.jsx.map +1 -0
- package/jsx/core/Tooltip/Tooltip.stories.d.ts +8 -0
- package/jsx/core/Tooltip/Tooltip.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Tooltip/Tooltip.stories.jsx +0 -0
- package/{lib → jsx}/core/Tooltip/Tooltip.stories.jsx.map +0 -0
- package/jsx/core/Tree/Tree.mocks.d.ts +2 -0
- package/jsx/core/Tree/Tree.mocks.d.ts.map +1 -0
- package/jsx/core/Tree/Tree.mocks.js +20 -0
- package/jsx/core/Tree/Tree.mocks.js.map +1 -0
- package/jsx/core/Tree/Tree.stories.d.ts +8 -0
- package/jsx/core/Tree/Tree.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Tree/Tree.stories.jsx +0 -0
- package/{lib → jsx}/core/Tree/Tree.stories.jsx.map +0 -0
- package/jsx/core/Tree/Tree.styles.d.ts +3 -0
- package/jsx/core/Tree/Tree.styles.d.ts.map +1 -0
- package/jsx/core/Tree/Tree.styles.js +10 -0
- package/jsx/core/Tree/Tree.styles.js.map +1 -0
- package/jsx/core/URL/URL.stories.d.ts +6 -0
- package/jsx/core/URL/URL.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/URL/URL.stories.jsx +0 -0
- package/{lib → jsx}/core/URL/URL.stories.jsx.map +0 -0
- package/jsx/cs/Article/Article.mocks.d.ts +14 -0
- package/jsx/cs/Article/Article.mocks.d.ts.map +1 -0
- package/jsx/cs/Article/Article.mocks.js +14 -0
- package/jsx/cs/Article/Article.mocks.js.map +1 -0
- package/jsx/cs/Article/Article.stories.d.ts +15 -0
- package/jsx/cs/Article/Article.stories.d.ts.map +1 -0
- package/{lib → jsx}/cs/Article/Article.stories.jsx +0 -0
- package/{lib → jsx}/cs/Article/Article.stories.jsx.map +0 -0
- package/jsx/cs/ArticleList/ArticleList.mocks.d.ts +21 -0
- package/jsx/cs/ArticleList/ArticleList.mocks.d.ts.map +1 -0
- package/jsx/cs/ArticleList/ArticleList.mocks.js +102 -0
- package/jsx/cs/ArticleList/ArticleList.mocks.js.map +1 -0
- package/jsx/cs/ArticleList/ArticleList.stories.d.ts +16 -0
- package/jsx/cs/ArticleList/ArticleList.stories.d.ts.map +1 -0
- package/{lib → jsx}/cs/ArticleList/ArticleList.stories.jsx +0 -0
- package/{lib → jsx}/cs/ArticleList/ArticleList.stories.jsx.map +0 -0
- package/jsx/cs/CSCaseView/CSAppShell.stories.d.ts +45 -0
- package/jsx/cs/CSCaseView/CSAppShell.stories.d.ts.map +1 -0
- package/{lib → jsx}/cs/CSCaseView/CSAppShell.stories.jsx +0 -0
- package/{lib → jsx}/cs/CSCaseView/CSAppShell.stories.jsx.map +0 -0
- package/jsx/cs/CSCaseView/CSCaseView.mocks.d.ts +57 -0
- package/jsx/cs/CSCaseView/CSCaseView.mocks.d.ts.map +1 -0
- package/jsx/cs/CSCaseView/CSCaseView.mocks.js +224 -0
- package/jsx/cs/CSCaseView/CSCaseView.mocks.js.map +1 -0
- package/jsx/cs/CallControlPanel/CallControlPanel.mocks.d.ts +16 -0
- package/jsx/cs/CallControlPanel/CallControlPanel.mocks.d.ts.map +1 -0
- package/jsx/cs/CallControlPanel/CallControlPanel.mocks.js +110 -0
- package/jsx/cs/CallControlPanel/CallControlPanel.mocks.js.map +1 -0
- package/jsx/cs/CallControlPanel/CallControlPanel.stories.d.ts +13 -0
- package/jsx/cs/CallControlPanel/CallControlPanel.stories.d.ts.map +1 -0
- package/{lib → jsx}/cs/CallControlPanel/CallControlPanel.stories.jsx +0 -0
- package/{lib → jsx}/cs/CallControlPanel/CallControlPanel.stories.jsx.map +0 -0
- package/jsx/cs/DialPad/DialPad.stories.d.ts +9 -0
- package/jsx/cs/DialPad/DialPad.stories.d.ts.map +1 -0
- package/{lib → jsx}/cs/DialPad/DialPad.stories.jsx +0 -0
- package/{lib → jsx}/cs/DialPad/DialPad.stories.jsx.map +0 -0
- package/jsx/cs/DialPad/DialPadKeyboardData.mock.d.ts +11 -0
- package/jsx/cs/DialPad/DialPadKeyboardData.mock.d.ts.map +1 -0
- package/jsx/cs/DialPad/DialPadKeyboardData.mock.js +20 -0
- package/jsx/cs/DialPad/DialPadKeyboardData.mock.js.map +1 -0
- package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts +13 -0
- package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -0
- package/{lib → jsx}/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx +0 -0
- package/{lib → jsx}/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx.map +0 -0
- package/jsx/cs/InteractionNotification/InteractionNotification.stories.d.ts +8 -0
- package/jsx/cs/InteractionNotification/InteractionNotification.stories.d.ts.map +1 -0
- package/{lib → jsx}/cs/InteractionNotification/InteractionNotification.stories.jsx +0 -0
- package/{lib → jsx}/cs/InteractionNotification/InteractionNotification.stories.jsx.map +0 -0
- package/jsx/cs/InteractionTimer/InteractionTimer.stories.d.ts +14 -0
- package/jsx/cs/InteractionTimer/InteractionTimer.stories.d.ts.map +1 -0
- package/{lib → jsx}/cs/InteractionTimer/InteractionTimer.stories.jsx +0 -0
- package/{lib → jsx}/cs/InteractionTimer/InteractionTimer.stories.jsx.map +0 -0
- package/jsx/cs/TaskManager/TaskManager.mocks.d.ts +13 -0
- package/jsx/cs/TaskManager/TaskManager.mocks.d.ts.map +1 -0
- package/jsx/cs/TaskManager/TaskManager.mocks.js +140 -0
- package/jsx/cs/TaskManager/TaskManager.mocks.js.map +1 -0
- package/jsx/cs/TaskManager/TaskManager.stories.d.ts +8 -0
- package/jsx/cs/TaskManager/TaskManager.stories.d.ts.map +1 -0
- package/{lib → jsx}/cs/TaskManager/TaskManager.stories.jsx +0 -0
- package/{lib → jsx}/cs/TaskManager/TaskManager.stories.jsx.map +0 -0
- package/jsx/dnd/DragDropList/DragDropList.stories.d.ts +11 -0
- package/jsx/dnd/DragDropList/DragDropList.stories.d.ts.map +1 -0
- package/{lib → jsx}/dnd/DragDropList/DragDropList.stories.jsx +0 -0
- package/{lib → jsx}/dnd/DragDropList/DragDropList.stories.jsx.map +0 -0
- package/jsx/rte/Editor/Editor.stories.d.ts +11 -0
- package/jsx/rte/Editor/Editor.stories.d.ts.map +1 -0
- package/jsx/rte/Editor/Editor.stories.jsx +119 -0
- package/jsx/rte/Editor/Editor.stories.jsx.map +1 -0
- package/jsx/rte/RichTextEditor/RichTextEditor.mocks.d.ts +3 -0
- package/jsx/rte/RichTextEditor/RichTextEditor.mocks.d.ts.map +1 -0
- package/{lib → jsx}/rte/RichTextEditor/RichTextEditor.mocks.jsx +0 -0
- package/{lib → jsx}/rte/RichTextEditor/RichTextEditor.mocks.jsx.map +0 -0
- package/jsx/rte/RichTextEditor/RichTextEditor.stories.d.ts +10 -0
- package/jsx/rte/RichTextEditor/RichTextEditor.stories.d.ts.map +1 -0
- package/jsx/rte/RichTextEditor/RichTextEditor.stories.jsx +145 -0
- package/jsx/rte/RichTextEditor/RichTextEditor.stories.jsx.map +1 -0
- package/jsx/rte/RichTextEditor/RichTextViewer.stories.d.ts +8 -0
- package/jsx/rte/RichTextEditor/RichTextViewer.stories.d.ts.map +1 -0
- package/jsx/rte/RichTextEditor/RichTextViewer.stories.jsx +79 -0
- package/jsx/rte/RichTextEditor/RichTextViewer.stories.jsx.map +1 -0
- package/jsx/social/Chat/Chat.mocks.d.ts +385 -0
- package/jsx/social/Chat/Chat.mocks.d.ts.map +1 -0
- package/jsx/social/Chat/Chat.mocks.js +648 -0
- package/jsx/social/Chat/Chat.mocks.js.map +1 -0
- package/jsx/social/Chat/Chat.stories.d.ts +34 -0
- package/jsx/social/Chat/Chat.stories.d.ts.map +1 -0
- package/jsx/social/Chat/Chat.stories.jsx +490 -0
- package/jsx/social/Chat/Chat.stories.jsx.map +1 -0
- package/jsx/social/Chat/RepeatingView.stories.d.ts +20 -0
- package/jsx/social/Chat/RepeatingView.stories.d.ts.map +1 -0
- package/{lib → jsx}/social/Chat/RepeatingView.stories.jsx +0 -0
- package/{lib → jsx}/social/Chat/RepeatingView.stories.jsx.map +0 -0
- package/jsx/social/Email/Email.mocks.d.ts +87 -0
- package/jsx/social/Email/Email.mocks.d.ts.map +1 -0
- package/{lib → jsx}/social/Email/Email.mocks.jsx +0 -0
- package/{lib → jsx}/social/Email/Email.mocks.jsx.map +0 -0
- package/jsx/social/Email/Email.stories.d.ts +28 -0
- package/jsx/social/Email/Email.stories.d.ts.map +1 -0
- package/{lib → jsx}/social/Email/Email.stories.jsx +0 -0
- package/{lib → jsx}/social/Email/Email.stories.jsx.map +0 -0
- package/jsx/social/Feed/Feed.mocks.d.ts +52 -0
- package/jsx/social/Feed/Feed.mocks.d.ts.map +1 -0
- package/{lib → jsx}/social/Feed/Feed.mocks.jsx +0 -0
- package/{lib → jsx}/social/Feed/Feed.mocks.jsx.map +0 -0
- package/jsx/social/Feed/Feed.stories.d.ts +15 -0
- package/jsx/social/Feed/Feed.stories.d.ts.map +1 -0
- package/{lib → jsx}/social/Feed/Feed.stories.jsx +0 -0
- package/{lib → jsx}/social/Feed/Feed.stories.jsx.map +0 -0
- package/jsx/social/Feed/FeedNewPost.stories.d.ts +17 -0
- package/jsx/social/Feed/FeedNewPost.stories.d.ts.map +1 -0
- package/jsx/social/Feed/FeedNewPost.stories.jsx +80 -0
- package/jsx/social/Feed/FeedNewPost.stories.jsx.map +1 -0
- package/jsx/social/Feed/FeedPost.stories.d.ts +9 -0
- package/jsx/social/Feed/FeedPost.stories.d.ts.map +1 -0
- package/jsx/social/Feed/FeedPost.stories.jsx +248 -0
- package/jsx/social/Feed/FeedPost.stories.jsx.map +1 -0
- package/jsx/social/Feed/FeedReply.stories.d.ts +16 -0
- package/jsx/social/Feed/FeedReply.stories.d.ts.map +1 -0
- package/{lib → jsx}/social/Feed/FeedReply.stories.jsx +0 -0
- package/{lib → jsx}/social/Feed/FeedReply.stories.jsx.map +0 -0
- package/jsx/social/Feed/FeedReplyInput.stories.d.ts +15 -0
- package/jsx/social/Feed/FeedReplyInput.stories.d.ts.map +1 -0
- package/{lib → jsx}/social/Feed/FeedReplyInput.stories.jsx +0 -0
- package/{lib → jsx}/social/Feed/FeedReplyInput.stories.jsx.map +0 -0
- package/jsx/work/AppAnnouncement/AppAnnouncement.stories.d.ts +6 -0
- package/jsx/work/AppAnnouncement/AppAnnouncement.stories.d.ts.map +1 -0
- package/jsx/work/AppAnnouncement/AppAnnouncement.stories.jsx +29 -0
- package/jsx/work/AppAnnouncement/AppAnnouncement.stories.jsx.map +1 -0
- package/jsx/work/CaseView/Attachments.mocks.d.ts +3 -0
- package/jsx/work/CaseView/Attachments.mocks.d.ts.map +1 -0
- package/{lib → jsx}/work/CaseView/Attachments.mocks.jsx +0 -0
- package/{lib → jsx}/work/CaseView/Attachments.mocks.jsx.map +0 -0
- package/jsx/work/CaseView/CaseView.mocks.d.ts +11 -0
- package/jsx/work/CaseView/CaseView.mocks.d.ts.map +1 -0
- package/{lib → jsx}/work/CaseView/CaseView.mocks.jsx +0 -0
- package/{lib → jsx}/work/CaseView/CaseView.mocks.jsx.map +0 -0
- package/jsx/work/CaseView/CaseView.stories.d.ts +34 -0
- package/jsx/work/CaseView/CaseView.stories.d.ts.map +1 -0
- package/{lib → jsx}/work/CaseView/CaseView.stories.jsx +0 -0
- package/{lib → jsx}/work/CaseView/CaseView.stories.jsx.map +0 -0
- package/jsx/work/CaseView/Details.mocks.d.ts +3 -0
- package/jsx/work/CaseView/Details.mocks.d.ts.map +1 -0
- package/{lib → jsx}/work/CaseView/Details.mocks.jsx +0 -0
- package/{lib → jsx}/work/CaseView/Details.mocks.jsx.map +0 -0
- package/jsx/work/CaseView/FileService.mock.d.ts +28 -0
- package/jsx/work/CaseView/FileService.mock.d.ts.map +1 -0
- package/jsx/work/CaseView/FileService.mock.jsx +143 -0
- package/jsx/work/CaseView/FileService.mock.jsx.map +1 -0
- package/jsx/work/CaseView/MobileCaseView.stories.d.ts +11 -0
- package/jsx/work/CaseView/MobileCaseView.stories.d.ts.map +1 -0
- package/{lib → jsx}/work/CaseView/MobileCaseView.stories.jsx +0 -0
- package/{lib → jsx}/work/CaseView/MobileCaseView.stories.jsx.map +0 -0
- package/jsx/work/CaseView/Pulse.mocks.d.ts +6 -0
- package/jsx/work/CaseView/Pulse.mocks.d.ts.map +1 -0
- package/{lib → jsx}/work/CaseView/Pulse.mocks.jsx +0 -0
- package/{lib → jsx}/work/CaseView/Pulse.mocks.jsx.map +0 -0
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts +10 -0
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts.map +1 -0
- package/{lib → jsx}/work/ConfigurableLayout/ConfigurableLayout.stories.jsx +0 -0
- package/{lib → jsx}/work/ConfigurableLayout/ConfigurableLayout.stories.jsx.map +0 -0
- package/jsx/work/Confirmation/Confirmation.stories.d.ts +9 -0
- package/jsx/work/Confirmation/Confirmation.stories.d.ts.map +1 -0
- package/jsx/work/Confirmation/Confirmation.stories.jsx +28 -0
- package/jsx/work/Confirmation/Confirmation.stories.jsx.map +1 -0
- 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.d.ts +5 -0
- package/jsx/work/Details/Details.stories.d.ts.map +1 -0
- package/{lib → jsx}/work/Details/Details.stories.jsx +0 -0
- package/{lib → jsx}/work/Details/Details.stories.jsx.map +0 -0
- package/jsx/work/Glimpse/Glimpse.stories.d.ts +10 -0
- package/jsx/work/Glimpse/Glimpse.stories.d.ts.map +1 -0
- package/{lib → jsx}/work/Glimpse/Glimpse.stories.jsx +0 -0
- package/{lib → jsx}/work/Glimpse/Glimpse.stories.jsx.map +0 -0
- package/jsx/work/SearchResults/SearchResults.mocks.d.ts +8 -0
- package/jsx/work/SearchResults/SearchResults.mocks.d.ts.map +1 -0
- package/{lib → jsx}/work/SearchResults/SearchResults.mocks.jsx +0 -0
- package/{lib → jsx}/work/SearchResults/SearchResults.mocks.jsx.map +0 -0
- package/jsx/work/SearchResults/SearchResults.stories.d.ts +8 -0
- package/jsx/work/SearchResults/SearchResults.stories.d.ts.map +1 -0
- package/jsx/work/SearchResults/SearchResults.stories.jsx +199 -0
- package/jsx/work/SearchResults/SearchResults.stories.jsx.map +1 -0
- 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/Stages/Stages.stories.d.ts +11 -0
- package/jsx/work/Stages/Stages.stories.d.ts.map +1 -0
- package/{lib → jsx}/work/Stages/Stages.stories.jsx +0 -0
- package/{lib → jsx}/work/Stages/Stages.stories.jsx.map +0 -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 +6 -0
- package/jsx/work/Stakeholders/Stakeholders.stories.d.ts.map +1 -0
- package/jsx/work/Stakeholders/Stakeholders.stories.jsx +90 -0
- package/jsx/work/Stakeholders/Stakeholders.stories.jsx.map +1 -0
- package/jsx/work/Tags/Tags.mocks.d.ts +3 -0
- package/jsx/work/Tags/Tags.mocks.d.ts.map +1 -0
- package/jsx/work/Tags/Tags.mocks.js +76 -0
- package/jsx/work/Tags/Tags.mocks.js.map +1 -0
- package/jsx/work/Tags/Tags.stories.d.ts +10 -0
- package/jsx/work/Tags/Tags.stories.d.ts.map +1 -0
- package/{lib → jsx}/work/Tags/Tags.stories.jsx +0 -0
- package/{lib → jsx}/work/Tags/Tags.stories.jsx.map +0 -0
- package/jsx/work/Tasks/TaskList.stories.d.ts +5 -0
- package/jsx/work/Tasks/TaskList.stories.d.ts.map +1 -0
- package/{lib → jsx}/work/Tasks/TaskList.stories.jsx +0 -0
- package/{lib → jsx}/work/Tasks/TaskList.stories.jsx.map +0 -0
- package/jsx/work/Tasks/Tasks.stories.d.ts +9 -0
- package/jsx/work/Tasks/Tasks.stories.d.ts.map +1 -0
- package/{lib → jsx}/work/Tasks/Tasks.stories.jsx +0 -0
- package/{lib → jsx}/work/Tasks/Tasks.stories.jsx.map +0 -0
- package/jsx/work/Timeline/Timeline.mocks.d.ts +3 -0
- package/jsx/work/Timeline/Timeline.mocks.d.ts.map +1 -0
- package/{lib → jsx}/work/Timeline/Timeline.mocks.jsx +0 -0
- package/{lib → jsx}/work/Timeline/Timeline.mocks.jsx.map +0 -0
- package/jsx/work/Timeline/Timeline.stories.d.ts +7 -0
- package/jsx/work/Timeline/Timeline.stories.d.ts.map +1 -0
- package/jsx/work/Timeline/Timeline.stories.jsx +43 -0
- package/jsx/work/Timeline/Timeline.stories.jsx.map +1 -0
- package/lib/build/AppHeader/AppHeader.stories.js +66 -0
- package/lib/build/AppHeader/AppHeader.stories.js.map +1 -0
- package/lib/build/AppShell/AppShell.stories.d.ts.map +1 -1
- package/lib/build/AppShell/AppShell.stories.js +192 -0
- package/lib/build/AppShell/AppShell.stories.js.map +1 -0
- package/lib/build/FlowModeller/AddNodeUtils.mocks.js +1 -1
- package/lib/build/FlowModeller/AddNodeUtils.mocks.js.map +1 -1
- package/lib/build/FlowModeller/FlowModeller.stories.js +197 -0
- package/lib/build/FlowModeller/FlowModeller.stories.js.map +1 -0
- package/lib/build/LifeCycle/LifeCycle.stories.js +511 -0
- package/lib/build/LifeCycle/LifeCycle.stories.js.map +1 -0
- package/lib/build/PageTemplates/GalleryPage.stories.js +127 -0
- package/lib/build/PageTemplates/GalleryPage.stories.js.map +1 -0
- package/lib/build/PageTemplates/PageTemplates.stories.js +388 -0
- package/lib/build/PageTemplates/PageTemplates.stories.js.map +1 -0
- package/lib/build/Workbench/Workbench.stories.js +114 -0
- package/lib/build/Workbench/Workbench.stories.js.map +1 -0
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.js +166 -0
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.js.map +1 -0
- package/lib/core/AppShell/AppShell.mocks.js +142 -0
- package/lib/core/AppShell/AppShell.mocks.js.map +1 -0
- package/lib/core/AppShell/AppShell.stories.d.ts +2 -0
- package/lib/core/AppShell/AppShell.stories.d.ts.map +1 -1
- package/lib/core/AppShell/AppShell.stories.js +191 -0
- package/lib/core/AppShell/AppShell.stories.js.map +1 -0
- package/lib/core/Avatar/Avatar.stories.d.ts.map +1 -1
- package/lib/core/Avatar/Avatar.stories.js +51 -0
- package/lib/core/Avatar/Avatar.stories.js.map +1 -0
- package/lib/core/Backdrop/Backdrop.stories.js +26 -0
- package/lib/core/Backdrop/Backdrop.stories.js.map +1 -0
- package/lib/core/Badges/Alert.stories.js +16 -0
- package/lib/core/Badges/Alert.stories.js.map +1 -0
- package/lib/core/Badges/Count.stories.js +21 -0
- package/lib/core/Badges/Count.stories.js.map +1 -0
- package/lib/core/Badges/Selection.stories.js +10 -0
- package/lib/core/Badges/Selection.stories.js.map +1 -0
- package/lib/core/Badges/Status.stories.js +19 -0
- package/lib/core/Badges/Status.stories.js.map +1 -0
- package/lib/core/Badges/Tag.stories.js +10 -0
- package/lib/core/Badges/Tag.stories.js.map +1 -0
- 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.map +1 -1
- package/lib/core/Banner/Banner.stories.js +81 -0
- package/lib/core/Banner/Banner.stories.js.map +1 -0
- package/lib/core/Boolean/BooleanDisplay.stories.js +20 -0
- package/lib/core/Boolean/BooleanDisplay.stories.js.map +1 -0
- package/lib/core/Breadcrumbs/Breadcrumbs.stories.js +28 -0
- package/lib/core/Breadcrumbs/Breadcrumbs.stories.js.map +1 -0
- package/lib/core/Button/Button.stories.d.ts.map +1 -1
- package/lib/core/Button/Button.stories.js +64 -0
- package/lib/core/Button/Button.stories.js.map +1 -0
- package/lib/core/Card/Card.stories.js +32 -0
- package/lib/core/Card/Card.stories.js.map +1 -0
- package/lib/core/Checkbox/Checkbox.stories.js +29 -0
- package/lib/core/Checkbox/Checkbox.stories.js.map +1 -0
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.js +32 -0
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.js.map +1 -0
- package/lib/core/ColorPicker/ColorPicker.stories.js +76 -0
- package/lib/core/ColorPicker/ColorPicker.stories.js.map +1 -0
- package/lib/core/ComboBox/ComboBox.stories.d.ts +10 -0
- package/lib/core/ComboBox/ComboBox.stories.d.ts.map +1 -1
- package/lib/core/ComboBox/ComboBox.stories.js +376 -0
- package/lib/core/ComboBox/ComboBox.stories.js.map +1 -0
- package/lib/core/Configuration/Configuration.stories.js +75 -0
- package/lib/core/Configuration/Configuration.stories.js.map +1 -0
- package/lib/core/Currency/Currency.stories.js +66 -0
- package/lib/core/Currency/Currency.stories.js.map +1 -0
- package/lib/core/DateTime/DateTime.stories.js +128 -0
- package/lib/core/DateTime/DateTime.stories.js.map +1 -0
- package/lib/core/DateTime/DateTimeDisplay.stories.js +48 -0
- package/lib/core/DateTime/DateTimeDisplay.stories.js.map +1 -0
- package/lib/core/DateTime/DateTimePicker.stories.js +35 -0
- package/lib/core/DateTime/DateTimePicker.stories.js.map +1 -0
- package/lib/core/Drawer/Drawer.stories.js +71 -0
- package/lib/core/Drawer/Drawer.stories.js.map +1 -0
- package/lib/core/Email/EmailDisplay.stories.js +20 -0
- package/lib/core/Email/EmailDisplay.stories.js.map +1 -0
- package/lib/core/EmojiPicker/EmojiPicker.stories.js +42 -0
- package/lib/core/EmojiPicker/EmojiPicker.stories.js.map +1 -0
- package/lib/core/EmptyState/EmptyState.stories.js +19 -0
- package/lib/core/EmptyState/EmptyState.stories.js.map +1 -0
- package/lib/core/ErrorState/ErrorState.stories.js +21 -0
- package/lib/core/ErrorState/ErrorState.stories.js.map +1 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.stories.js +28 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.stories.js.map +1 -0
- 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/FieldGroup.stories.js +22 -0
- package/lib/core/FieldGroup/FieldGroup.stories.js.map +1 -0
- 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 +106 -0
- package/lib/core/FieldGroup/FieldGroupList.stories.js.map +1 -0
- package/lib/core/FieldValueList/FieldValueList.stories.js +51 -0
- package/lib/core/FieldValueList/FieldValueList.stories.js.map +1 -0
- 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 +126 -0
- package/lib/core/File/FileDisplay.stories.js.map +1 -0
- package/lib/core/File/FileInput.stories.js +78 -0
- package/lib/core/File/FileInput.stories.js.map +1 -0
- 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 +82 -0
- package/lib/core/Flex/FlexContainer.stories.js.map +1 -0
- package/lib/core/Flex/FlexItem.stories.js +41 -0
- package/lib/core/Flex/FlexItem.stories.js.map +1 -0
- 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 +0 -7
- package/lib/core/Form/Form.stories.d.ts.map +1 -1
- package/lib/core/Form/Form.stories.js +52 -0
- package/lib/core/Form/Form.stories.js.map +1 -0
- 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 +115 -0
- package/lib/core/Grid/GridContainer.stories.js.map +1 -0
- 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 +36 -0
- package/lib/core/Grid/GridItem.stories.js.map +1 -0
- 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 +82 -0
- package/lib/core/Icon/Icon.stories.js.map +1 -0
- package/lib/core/IconPicker/IconPicker.stories.d.ts.map +1 -1
- package/lib/core/IconPicker/IconPicker.stories.js +39 -0
- package/lib/core/IconPicker/IconPicker.stories.js.map +1 -0
- package/lib/core/Image/Image.stories.js +10 -0
- package/lib/core/Image/Image.stories.js.map +1 -0
- package/lib/core/Input/Input.stories.js +45 -0
- package/lib/core/Input/Input.stories.js.map +1 -0
- package/lib/core/Label/Label.stories.js +16 -0
- package/lib/core/Label/Label.stories.js.map +1 -0
- 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 +51 -0
- package/lib/core/Lightbox/Lightbox.stories.js.map +1 -0
- 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 +30 -0
- package/lib/core/Link/Link.stories.js.map +1 -0
- package/lib/core/List/CommaSeparatedList.stories.d.ts.map +1 -1
- package/lib/core/List/CommaSeparatedList.stories.js +32 -0
- package/lib/core/List/CommaSeparatedList.stories.js.map +1 -0
- package/lib/core/List/OrderedList.stories.d.ts.map +1 -1
- package/lib/core/List/OrderedList.stories.js +39 -0
- package/lib/core/List/OrderedList.stories.js.map +1 -0
- package/lib/core/List/UnorderedList.stories.d.ts.map +1 -1
- package/lib/core/List/UnorderedList.stories.js +39 -0
- package/lib/core/List/UnorderedList.stories.js.map +1 -0
- package/lib/core/Location/Location.stories.js +123 -0
- package/lib/core/Location/Location.stories.js.map +1 -0
- package/lib/core/Menu/Menu.stories.d.ts +0 -1
- package/lib/core/Menu/Menu.stories.d.ts.map +1 -1
- package/lib/core/Menu/Menu.stories.js +148 -0
- package/lib/core/Menu/Menu.stories.js.map +1 -0
- package/lib/core/MenuButton/MenuButton.stories.js +185 -0
- package/lib/core/MenuButton/MenuButton.stories.js.map +1 -0
- package/lib/core/MetaList/MetaList.stories.js +20 -0
- package/lib/core/MetaList/MetaList.stories.js.map +1 -0
- package/lib/core/Modal/Modal.mocks.js +36 -0
- package/lib/core/Modal/Modal.mocks.js.map +1 -0
- package/lib/core/Modal/Modal.stories.js +232 -0
- package/lib/core/Modal/Modal.stories.js.map +1 -0
- package/lib/core/MultiStep/MultiStep.stories.js +36 -0
- package/lib/core/MultiStep/MultiStep.stories.js.map +1 -0
- package/lib/core/Number/Number.stories.js +111 -0
- package/lib/core/Number/Number.stories.js.map +1 -0
- 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 +226 -0
- package/lib/core/PageTemplates/PageTemplates.stories.js.map +1 -0
- package/lib/core/Pagination/Pagination.stories.js +20 -0
- package/lib/core/Pagination/Pagination.stories.js.map +1 -0
- package/lib/core/Paragraph/ParagraphDisplay.stories.js +16 -0
- package/lib/core/Paragraph/ParagraphDisplay.stories.js.map +1 -0
- package/lib/core/Phone/Phone.stories.js +43 -0
- package/lib/core/Phone/Phone.stories.js.map +1 -0
- 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 +95 -0
- package/lib/core/Popover/Popover.stories.js.map +1 -0
- package/lib/core/Progress/Progress.stories.js +64 -0
- package/lib/core/Progress/Progress.stories.js.map +1 -0
- package/lib/core/RadioButton/RadioButton.stories.js +27 -0
- package/lib/core/RadioButton/RadioButton.stories.js.map +1 -0
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.js +34 -0
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.js.map +1 -0
- package/lib/core/Rating/Rating.stories.d.ts +4 -1
- package/lib/core/Rating/Rating.stories.d.ts.map +1 -1
- package/lib/core/Rating/Rating.stories.js +22 -0
- package/lib/core/Rating/Rating.stories.js.map +1 -0
- package/lib/core/SearchInput/SearchInput.stories.js +16 -0
- package/lib/core/SearchInput/SearchInput.stories.js.map +1 -0
- package/lib/core/Select/Select.stories.js +38 -0
- package/lib/core/Select/Select.stories.js.map +1 -0
- package/lib/core/Sentiment/Sentiment.stories.d.ts.map +1 -1
- package/lib/core/Sentiment/Sentiment.stories.js +40 -0
- package/lib/core/Sentiment/Sentiment.stories.js.map +1 -0
- package/lib/core/Slider/Slider.stories.js +59 -0
- package/lib/core/Slider/Slider.stories.js.map +1 -0
- package/lib/core/SummaryItem/SummaryItem.stories.js +32 -0
- package/lib/core/SummaryItem/SummaryItem.stories.js.map +1 -0
- package/lib/core/SummaryList/SummaryList.mocks.js +34 -0
- package/lib/core/SummaryList/SummaryList.mocks.js.map +1 -0
- package/lib/core/SummaryList/SummaryList.stories.js +126 -0
- package/lib/core/SummaryList/SummaryList.stories.js.map +1 -0
- package/lib/core/Switch/Switch.stories.js +25 -0
- package/lib/core/Switch/Switch.stories.js.map +1 -0
- package/lib/core/Table/Table.mocks.js +30 -0
- package/lib/core/Table/Table.mocks.js.map +1 -0
- package/lib/core/Table/Table.stories.js +54 -0
- package/lib/core/Table/Table.stories.js.map +1 -0
- package/lib/core/Tabs/Tabs.stories.js +42 -0
- package/lib/core/Tabs/Tabs.stories.js.map +1 -0
- package/lib/core/Text/Text.stories.js +21 -0
- package/lib/core/Text/Text.stories.js.map +1 -0
- package/lib/core/TextArea/TextArea.stories.js +44 -0
- package/lib/core/TextArea/TextArea.stories.js.map +1 -0
- package/lib/core/Toaster/Toaster.stories.d.ts.map +1 -1
- package/lib/core/Toaster/Toaster.stories.js +30 -0
- package/lib/core/Toaster/Toaster.stories.js.map +1 -0
- package/lib/core/Tooltip/Tooltip.stories.js +11 -0
- package/lib/core/Tooltip/Tooltip.stories.js.map +1 -0
- package/lib/core/Tree/Tree.mocks.js +2 -0
- package/lib/core/Tree/Tree.mocks.js.map +1 -1
- package/lib/core/Tree/Tree.stories.js +85 -0
- package/lib/core/Tree/Tree.stories.js.map +1 -0
- package/lib/core/URL/URL.stories.js +18 -0
- package/lib/core/URL/URL.stories.js.map +1 -0
- package/lib/cs/Article/Article.stories.js +85 -0
- package/lib/cs/Article/Article.stories.js.map +1 -0
- package/lib/cs/ArticleList/ArticleList.stories.js +83 -0
- package/lib/cs/ArticleList/ArticleList.stories.js.map +1 -0
- package/lib/cs/CSCaseView/CSAppShell.stories.js +240 -0
- package/lib/cs/CSCaseView/CSAppShell.stories.js.map +1 -0
- package/lib/cs/CallControlPanel/CallControlPanel.stories.js +193 -0
- package/lib/cs/CallControlPanel/CallControlPanel.stories.js.map +1 -0
- package/lib/cs/DialPad/DialPad.stories.js +17 -0
- package/lib/cs/DialPad/DialPad.stories.js.map +1 -0
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js +335 -0
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js.map +1 -0
- package/lib/cs/InteractionNotification/InteractionNotification.stories.js +31 -0
- package/lib/cs/InteractionNotification/InteractionNotification.stories.js.map +1 -0
- package/lib/cs/InteractionTimer/InteractionTimer.stories.js +86 -0
- package/lib/cs/InteractionTimer/InteractionTimer.stories.js.map +1 -0
- package/lib/cs/TaskManager/TaskManager.stories.js +299 -0
- package/lib/cs/TaskManager/TaskManager.stories.js.map +1 -0
- package/lib/dnd/DragDropList/DragDropList.stories.js +113 -0
- package/lib/dnd/DragDropList/DragDropList.stories.js.map +1 -0
- package/lib/rte/Editor/Editor.stories.d.ts +11 -0
- package/lib/rte/Editor/Editor.stories.d.ts.map +1 -0
- package/lib/rte/Editor/Editor.stories.js +100 -0
- package/lib/rte/Editor/Editor.stories.js.map +1 -0
- package/lib/rte/RichTextEditor/RichTextEditor.mocks.js +36 -0
- package/lib/rte/RichTextEditor/RichTextEditor.mocks.js.map +1 -0
- package/lib/rte/RichTextEditor/RichTextEditor.stories.js +114 -0
- package/lib/rte/RichTextEditor/RichTextEditor.stories.js.map +1 -0
- 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 +66 -0
- package/lib/rte/RichTextEditor/RichTextViewer.stories.js.map +1 -0
- package/lib/social/Chat/Chat.stories.d.ts +51 -22
- package/lib/social/Chat/Chat.stories.d.ts.map +1 -1
- package/lib/social/Chat/Chat.stories.js +435 -0
- package/lib/social/Chat/Chat.stories.js.map +1 -0
- package/lib/social/Chat/RepeatingView.stories.js +89 -0
- package/lib/social/Chat/RepeatingView.stories.js.map +1 -0
- package/lib/social/Email/Email.mocks.js +350 -0
- package/lib/social/Email/Email.mocks.js.map +1 -0
- package/lib/social/Email/Email.stories.js +845 -0
- package/lib/social/Email/Email.stories.js.map +1 -0
- package/lib/social/Feed/Feed.mocks.js +307 -0
- package/lib/social/Feed/Feed.mocks.js.map +1 -0
- package/lib/social/Feed/Feed.stories.js +145 -0
- package/lib/social/Feed/Feed.stories.js.map +1 -0
- package/lib/social/Feed/FeedNewPost.stories.js +82 -0
- package/lib/social/Feed/FeedNewPost.stories.js.map +1 -0
- package/lib/social/Feed/FeedPost.stories.js +239 -0
- package/lib/social/Feed/FeedPost.stories.js.map +1 -0
- package/lib/social/Feed/FeedReply.stories.js +95 -0
- package/lib/social/Feed/FeedReply.stories.js.map +1 -0
- package/lib/social/Feed/FeedReplyInput.stories.js +60 -0
- package/lib/social/Feed/FeedReplyInput.stories.js.map +1 -0
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.d.ts.map +1 -1
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.js +30 -0
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.js.map +1 -0
- package/lib/work/CaseView/Attachments.mocks.js +373 -0
- package/lib/work/CaseView/Attachments.mocks.js.map +1 -0
- package/lib/work/CaseView/CaseView.mocks.js +116 -0
- package/lib/work/CaseView/CaseView.mocks.js.map +1 -0
- package/lib/work/CaseView/CaseView.stories.js +276 -0
- package/lib/work/CaseView/CaseView.stories.js.map +1 -0
- package/lib/work/CaseView/Details.mocks.js +7 -0
- package/lib/work/CaseView/Details.mocks.js.map +1 -0
- package/lib/work/CaseView/FileService.mock.d.ts.map +1 -1
- package/lib/work/CaseView/FileService.mock.js +162 -0
- package/lib/work/CaseView/FileService.mock.js.map +1 -0
- package/lib/work/CaseView/MobileCaseView.stories.js +28 -0
- package/lib/work/CaseView/MobileCaseView.stories.js.map +1 -0
- package/lib/work/CaseView/Pulse.mocks.js +25 -0
- package/lib/work/CaseView/Pulse.mocks.js.map +1 -0
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.js +194 -0
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.js.map +1 -0
- 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 +26 -0
- package/lib/work/Confirmation/Confirmation.stories.js.map +1 -0
- 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 +62 -0
- package/lib/work/Details/Details.stories.js.map +1 -0
- package/lib/work/Glimpse/Glimpse.stories.js +40 -0
- package/lib/work/Glimpse/Glimpse.stories.js.map +1 -0
- package/lib/work/SearchResults/SearchResults.mocks.js +97 -0
- package/lib/work/SearchResults/SearchResults.mocks.js.map +1 -0
- package/lib/work/SearchResults/SearchResults.stories.d.ts.map +1 -1
- package/lib/work/SearchResults/SearchResults.stories.js +192 -0
- package/lib/work/SearchResults/SearchResults.stories.js.map +1 -0
- 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/Stages/Stages.stories.js +64 -0
- package/lib/work/Stages/Stages.stories.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 +111 -0
- package/lib/work/Stakeholders/Stakeholders.stories.js.map +1 -0
- package/lib/work/Tags/Tags.stories.js +62 -0
- package/lib/work/Tags/Tags.stories.js.map +1 -0
- package/lib/work/Tasks/TaskList.stories.js +18 -0
- package/lib/work/Tasks/TaskList.stories.js.map +1 -0
- package/lib/work/Tasks/Tasks.stories.js +80 -0
- package/lib/work/Tasks/Tasks.stories.js.map +1 -0
- package/lib/work/Timeline/Timeline.mocks.js +117 -0
- package/lib/work/Timeline/Timeline.mocks.js.map +1 -0
- package/lib/work/Timeline/Timeline.stories.d.ts.map +1 -1
- package/lib/work/Timeline/Timeline.stories.js +44 -0
- package/lib/work/Timeline/Timeline.stories.js.map +1 -0
- package/package.json +13 -11
- package/lib/build/AppShell/AppShell.stories.jsx +0 -194
- package/lib/build/AppShell/AppShell.stories.jsx.map +0 -1
- package/lib/core/Avatar/Avatar.stories.jsx +0 -50
- package/lib/core/Avatar/Avatar.stories.jsx.map +0 -1
- package/lib/core/Banner/Banner.stories.jsx +0 -125
- package/lib/core/Banner/Banner.stories.jsx.map +0 -1
- package/lib/core/Button/Button.stories.jsx +0 -103
- package/lib/core/Button/Button.stories.jsx.map +0 -1
- package/lib/core/Configuration/Configuration.stories.jsx +0 -125
- package/lib/core/Configuration/Configuration.stories.jsx.map +0 -1
- package/lib/core/DateTime/DateTimeDisplay.stories.jsx +0 -46
- package/lib/core/DateTime/DateTimeDisplay.stories.jsx.map +0 -1
- package/lib/core/FieldGroup/FieldGroupList.stories.jsx +0 -183
- package/lib/core/FieldGroup/FieldGroupList.stories.jsx.map +0 -1
- package/lib/core/File/FileDisplay.stories.jsx +0 -100
- package/lib/core/File/FileDisplay.stories.jsx.map +0 -1
- package/lib/core/Flex/FlexContainer.stories.jsx +0 -151
- package/lib/core/Flex/FlexContainer.stories.jsx.map +0 -1
- package/lib/core/Flex/FlexItem.stories.jsx +0 -71
- package/lib/core/Flex/FlexItem.stories.jsx.map +0 -1
- package/lib/core/Form/Form.stories.jsx +0 -196
- package/lib/core/Form/Form.stories.jsx.map +0 -1
- package/lib/core/Grid/GridContainer.stories.jsx +0 -161
- package/lib/core/Grid/GridContainer.stories.jsx.map +0 -1
- package/lib/core/Grid/GridItem.stories.jsx +0 -74
- package/lib/core/Grid/GridItem.stories.jsx.map +0 -1
- package/lib/core/Icon/Icon.stories.jsx +0 -84
- package/lib/core/Icon/Icon.stories.jsx.map +0 -1
- package/lib/core/IconPicker/IconPicker.stories.jsx +0 -39
- package/lib/core/IconPicker/IconPicker.stories.jsx.map +0 -1
- package/lib/core/Lightbox/Lightbox.stories.jsx +0 -106
- package/lib/core/Lightbox/Lightbox.stories.jsx.map +0 -1
- package/lib/core/Link/Link.stories.jsx +0 -32
- package/lib/core/Link/Link.stories.jsx.map +0 -1
- package/lib/core/List/CommaSeparatedList.stories.jsx +0 -33
- package/lib/core/List/CommaSeparatedList.stories.jsx.map +0 -1
- package/lib/core/List/OrderedList.stories.jsx +0 -38
- package/lib/core/List/OrderedList.stories.jsx.map +0 -1
- package/lib/core/List/UnorderedList.stories.jsx +0 -38
- package/lib/core/List/UnorderedList.stories.jsx.map +0 -1
- package/lib/core/Menu/Menu.stories.jsx +0 -166
- package/lib/core/Menu/Menu.stories.jsx.map +0 -1
- package/lib/core/Modal/Modal.mocks.jsx +0 -44
- package/lib/core/Modal/Modal.mocks.jsx.map +0 -1
- package/lib/core/Number/Number.stories.jsx +0 -110
- package/lib/core/Number/Number.stories.jsx.map +0 -1
- package/lib/core/PageTemplates/PageTemplates.stories.jsx +0 -233
- package/lib/core/PageTemplates/PageTemplates.stories.jsx.map +0 -1
- package/lib/core/Paragraph/ParagraphDisplay.stories.jsx +0 -12
- package/lib/core/Paragraph/ParagraphDisplay.stories.jsx.map +0 -1
- package/lib/core/Popover/Popover.stories.jsx +0 -184
- package/lib/core/Popover/Popover.stories.jsx.map +0 -1
- package/lib/core/Rating/Rating.stories.jsx +0 -21
- package/lib/core/Rating/Rating.stories.jsx.map +0 -1
- package/lib/core/Sentiment/Sentiment.stories.jsx +0 -39
- package/lib/core/Sentiment/Sentiment.stories.jsx.map +0 -1
- package/lib/core/SummaryList/SummaryList.stories.jsx +0 -131
- package/lib/core/SummaryList/SummaryList.stories.jsx.map +0 -1
- package/lib/core/Toaster/Toaster.stories.jsx +0 -17
- package/lib/core/Toaster/Toaster.stories.jsx.map +0 -1
- package/lib/rte/RichTextEditor/RichTextEditor.stories.jsx +0 -145
- package/lib/rte/RichTextEditor/RichTextEditor.stories.jsx.map +0 -1
- package/lib/rte/RichTextEditor/RichTextViewer.stories.jsx +0 -62
- package/lib/rte/RichTextEditor/RichTextViewer.stories.jsx.map +0 -1
- package/lib/social/Chat/Chat.stories.jsx +0 -537
- package/lib/social/Chat/Chat.stories.jsx.map +0 -1
- package/lib/social/Feed/FeedNewPost.stories.jsx +0 -80
- package/lib/social/Feed/FeedNewPost.stories.jsx.map +0 -1
- package/lib/social/Feed/FeedPost.stories.jsx +0 -248
- package/lib/social/Feed/FeedPost.stories.jsx.map +0 -1
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.jsx +0 -30
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.jsx.map +0 -1
- package/lib/work/CaseView/FileService.mock.jsx +0 -139
- package/lib/work/CaseView/FileService.mock.jsx.map +0 -1
- package/lib/work/Confirmation/Confirmation.stories.jsx +0 -17
- package/lib/work/Confirmation/Confirmation.stories.jsx.map +0 -1
- package/lib/work/SearchResults/SearchResults.stories.jsx +0 -205
- package/lib/work/SearchResults/SearchResults.stories.jsx.map +0 -1
- package/lib/work/Stakeholders/Stakeholders.stories.jsx +0 -118
- package/lib/work/Stakeholders/Stakeholders.stories.jsx.map +0 -1
- package/lib/work/Timeline/Timeline.stories.jsx +0 -43
- package/lib/work/Timeline/Timeline.stories.jsx.map +0 -1
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { action } from '@storybook/addon-actions';
|
|
4
|
+
import { ComboBox, Flex, FormField, Icon, Link, MenuButton, Pagination, SearchInput, Select, Option, Text, menuHelpers, registerIcon } from '@pega/cosmos-react-core';
|
|
5
|
+
import * as thumbsUpSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/thumbs-up-solid.icon';
|
|
6
|
+
import * as thumbsDownSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/thumbs-down-solid.icon';
|
|
7
|
+
import * as helpIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/help.icon';
|
|
8
|
+
import { ArticleList, ArticleSummary, ArticleListHeader } from '@pega/cosmos-react-cs';
|
|
9
|
+
import { ArticleListMockData } from './ArticleList.mocks';
|
|
10
|
+
export default {
|
|
11
|
+
title: 'Customer Service/ArticleList',
|
|
12
|
+
component: ArticleList,
|
|
13
|
+
subcomponents: { ArticleSummary, ArticleListHeader },
|
|
14
|
+
parameters: {
|
|
15
|
+
layout: 'fullscreen'
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
registerIcon(thumbsUpSolidIcon, thumbsDownSolidIcon, helpIcon);
|
|
19
|
+
export const FirstArticleList = () => {
|
|
20
|
+
const [query, setQuery] = useState('');
|
|
21
|
+
const [currentPage, setCurrentPage] = useState(1);
|
|
22
|
+
const [categoryFilter, setCategoryFilter] = useState(undefined);
|
|
23
|
+
const [categoriesList, setCategoriesList] = useState(ArticleListMockData.categoriesList.map(({ id, name, level, category }) => {
|
|
24
|
+
return {
|
|
25
|
+
id,
|
|
26
|
+
primary: name,
|
|
27
|
+
secondary: [level, category],
|
|
28
|
+
selected: false
|
|
29
|
+
};
|
|
30
|
+
}));
|
|
31
|
+
const handleArticleLinkClick = (event) => {
|
|
32
|
+
event.preventDefault();
|
|
33
|
+
};
|
|
34
|
+
const ALHeader = {
|
|
35
|
+
icon: _jsx(Icon, { name: 'help' }, void 0),
|
|
36
|
+
headerText: 'Knowledge articles',
|
|
37
|
+
primary: {
|
|
38
|
+
search: (_jsx(SearchInput, { value: query, onChange: (event) => setQuery(event.target.value), onSearchChange: action('Search query'), onSearchSubmit: action('Search submit'), placeholder: 'Search\u2026' }, void 0)),
|
|
39
|
+
actions: [
|
|
40
|
+
{ text: 'Option Number 1', id: '1a' },
|
|
41
|
+
{ text: 'Option Number 2', id: '2a' }
|
|
42
|
+
],
|
|
43
|
+
followedFilter: (_jsx(Flex, { container: { gap: 1 }, children: _jsx(MenuButton, { variant: 'simple', menu: {
|
|
44
|
+
items: [
|
|
45
|
+
{
|
|
46
|
+
primary: 'Filter 1',
|
|
47
|
+
id: 'f1a'
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
primary: 'Filter 2',
|
|
51
|
+
id: 'f2a'
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}, icon: 'filter', text: 'filter', iconOnly: true }, void 0) }, void 0))
|
|
55
|
+
},
|
|
56
|
+
secondary: (_jsxs(_Fragment, { children: [_jsx(FormField, { label: 'Category', children: _jsx(ComboBox, { selected: { items: categoryFilter }, placeholder: 'Filter by category', menu: {
|
|
57
|
+
items: categoriesList,
|
|
58
|
+
onItemClick: id => {
|
|
59
|
+
const newList = menuHelpers.selectItem(categoriesList, id, 'single-select');
|
|
60
|
+
const { primary: itemText } = menuHelpers.getSelected(newList)[0];
|
|
61
|
+
setCategoriesList(newList);
|
|
62
|
+
setCategoryFilter({ text: itemText, id });
|
|
63
|
+
}
|
|
64
|
+
} }, void 0) }, void 0), _jsx(Select, { label: 'Sort by', children: ArticleListMockData.sortByOptions.map(opt => (_jsx(Option, { children: opt }, opt))) }, void 0)] }, void 0))
|
|
65
|
+
};
|
|
66
|
+
return (_jsx("div", { style: {
|
|
67
|
+
width: '31.25rem',
|
|
68
|
+
maxHeight: '100vh'
|
|
69
|
+
}, children: _jsx(ArticleList, { skeletonize: false, header: _jsx(ArticleListHeader, { icon: ALHeader.icon, headerText: ALHeader.headerText, primary: ALHeader.primary, secondary: ALHeader.secondary, onSubmit: action('Filter details submitted') }, void 0), footer: _jsx(Flex, { container: { alignItems: 'center', justify: 'end' }, item: { grow: 1 }, children: _jsx(Pagination, { total: 70, pageNumber: currentPage, onPageChange: pageNumber => {
|
|
70
|
+
setCurrentPage(pageNumber);
|
|
71
|
+
} }, void 0) }, void 0), children: ArticleListMockData.articleList.map((dataItem, id) => {
|
|
72
|
+
return (_jsx(ArticleSummary, { header: _jsx(Link, { href: 'design.pega.com', "data-article-id": dataItem.articleId, onClick: handleArticleLinkClick, children: dataItem.header }, void 0), content: _jsx(Text, { children: dataItem.abstract }, void 0), articleID: `article-${id}`, meta: [
|
|
73
|
+
_jsx(Text, { children: dataItem.meta.category }, void 0),
|
|
74
|
+
dataItem.meta.publishedDate,
|
|
75
|
+
_jsxs(Flex, { container: { gap: 2, alignItems: 'center' }, children: [_jsxs(Flex, { container: { gap: 1, alignItems: 'center' }, children: [_jsx(Icon, { name: 'thumbs-up-solid' }, void 0), _jsxs(Text, { children: ["(", dataItem.meta.likes, ")"] }, void 0)] }, void 0), _jsxs(Flex, { container: { gap: 1, alignItems: 'center' }, children: [_jsx(Icon, { name: 'thumbs-down-solid' }, void 0), _jsxs(Text, { children: ["(", dataItem.meta.disLikes, ")"] }, void 0)] }, void 0)] }, void 0)
|
|
76
|
+
] }, id.toString()));
|
|
77
|
+
}) }, void 0) }, void 0));
|
|
78
|
+
};
|
|
79
|
+
export const ArticleListWithSkeleton = () => (_jsx("div", { style: {
|
|
80
|
+
maxWidth: '31.25rem',
|
|
81
|
+
maxHeight: '100vh'
|
|
82
|
+
}, children: _jsx(ArticleList, { skeletonize: true }, void 0) }, void 0));
|
|
83
|
+
//# sourceMappingURL=ArticleList.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArticleList.stories.js","source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AI,oBAAG,QAAQ,CAAC,IAAI,CAAC,QAAQ,iBAAS,YAClC,YACF;qBACR,IAzBI,EAAE,CAAC,QAAQ,EAAE,CA0BlB,CACH,CAAC;YACJ,CAAC,CAAC,WACU,WACV,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,EAAE,CAAC,CAC3C,cACE,KAAK,EAAE;QACL,QAAQ,EAAE,UAAU;QACpB,SAAS,EAAE,OAAO;KACnB,YAED,KAAC,WAAW,IAAC,WAAW,iBAAG,WACvB,CACP,CAAC","sourcesContent":["import { useState, MouseEvent, SetStateAction } from 'react';\nimport { action } from '@storybook/addon-actions';\n\nimport {\n ComboBox,\n Flex,\n FormField,\n Icon,\n Link,\n MenuButton,\n Pagination,\n SearchInput,\n Select,\n Option,\n Text,\n menuHelpers,\n MenuProps,\n registerIcon\n} from '@pega/cosmos-react-core';\nimport * as thumbsUpSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/thumbs-up-solid.icon';\nimport * as thumbsDownSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/thumbs-down-solid.icon';\nimport * as helpIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/help.icon';\nimport { ArticleList, ArticleSummary, ArticleListHeader } from '@pega/cosmos-react-cs';\n\nimport { ArticleListMockData } from './ArticleList.mocks';\n\nexport default {\n title: 'Customer Service/ArticleList',\n component: ArticleList,\n subcomponents: { ArticleSummary, ArticleListHeader },\n parameters: {\n layout: 'fullscreen'\n }\n};\n\nregisterIcon(thumbsUpSolidIcon, thumbsDownSolidIcon, helpIcon);\n\nexport const FirstArticleList = () => {\n const [query, setQuery] = useState('');\n const [currentPage, setCurrentPage] = useState(1);\n const [categoryFilter, setCategoryFilter] = useState<{ id: string; text: string } | undefined>(\n undefined\n );\n const [categoriesList, setCategoriesList] = useState<MenuProps['items']>(\n ArticleListMockData.categoriesList.map(({ id, name, level, category }) => {\n return {\n id,\n primary: name,\n secondary: [level, category],\n selected: false\n };\n })\n );\n\n const handleArticleLinkClick = (event: MouseEvent) => {\n event.preventDefault();\n };\n\n const ALHeader = {\n icon: <Icon name='help' />,\n headerText: 'Knowledge articles',\n primary: {\n search: (\n <SearchInput\n value={query}\n onChange={(event: { target: { value: SetStateAction<string> } }) =>\n setQuery(event.target.value)\n }\n onSearchChange={action('Search query')}\n onSearchSubmit={action('Search submit')}\n placeholder='Search…'\n />\n ),\n actions: [\n { text: 'Option Number 1', id: '1a' },\n { text: 'Option Number 2', id: '2a' }\n ],\n followedFilter: (\n <Flex container={{ gap: 1 }}>\n <MenuButton\n variant='simple'\n menu={{\n items: [\n {\n primary: 'Filter 1',\n id: 'f1a'\n },\n {\n primary: 'Filter 2',\n id: 'f2a'\n }\n ]\n }}\n icon='filter'\n text='filter'\n iconOnly\n />\n </Flex>\n )\n },\n secondary: (\n <>\n <FormField label='Category'>\n <ComboBox\n selected={{ items: categoryFilter }}\n placeholder='Filter by category'\n menu={{\n items: categoriesList,\n onItemClick: id => {\n const newList = menuHelpers.selectItem(categoriesList, id, 'single-select');\n const { primary: itemText } = menuHelpers.getSelected(newList)[0];\n setCategoriesList(newList);\n setCategoryFilter({ text: itemText, id });\n }\n }}\n />\n </FormField>\n <Select label='Sort by'>\n {ArticleListMockData.sortByOptions.map(opt => (\n <Option key={opt}>{opt}</Option>\n ))}\n </Select>\n </>\n )\n };\n return (\n <div\n style={{\n width: '31.25rem',\n maxHeight: '100vh'\n }}\n >\n <ArticleList\n skeletonize={false}\n header={\n <ArticleListHeader\n icon={ALHeader.icon}\n headerText={ALHeader.headerText}\n primary={ALHeader.primary}\n secondary={ALHeader.secondary}\n onSubmit={action('Filter details submitted')}\n />\n }\n footer={\n <Flex container={{ alignItems: 'center', justify: 'end' }} item={{ grow: 1 }}>\n <Pagination\n total={70}\n pageNumber={currentPage}\n onPageChange={pageNumber => {\n setCurrentPage(pageNumber);\n }}\n />\n </Flex>\n }\n >\n {ArticleListMockData.articleList.map((dataItem, id) => {\n return (\n <ArticleSummary\n key={id.toString()}\n header={\n <Link\n href='design.pega.com'\n data-article-id={dataItem.articleId}\n onClick={handleArticleLinkClick}\n >\n {dataItem.header}\n </Link>\n }\n content={<Text>{dataItem.abstract}</Text>}\n articleID={`article-${id}`}\n meta={[\n <Text>{dataItem.meta.category}</Text>,\n dataItem.meta.publishedDate,\n <Flex container={{ gap: 2, alignItems: 'center' }}>\n <Flex container={{ gap: 1, alignItems: 'center' }}>\n <Icon name='thumbs-up-solid' />\n <Text>({dataItem.meta.likes})</Text>\n </Flex>\n <Flex container={{ gap: 1, alignItems: 'center' }}>\n <Icon name='thumbs-down-solid' />\n <Text>({dataItem.meta.disLikes})</Text>\n </Flex>\n </Flex>\n ]}\n />\n );\n })}\n </ArticleList>\n </div>\n );\n};\n\nexport const ArticleListWithSkeleton = () => (\n <div\n style={{\n maxWidth: '31.25rem',\n maxHeight: '100vh'\n }}\n >\n <ArticleList skeletonize />\n </div>\n);\n"]}
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { action } from '@storybook/addon-actions';
|
|
4
|
+
import { createUID, Status, TwoColumnPage, Icon, registerIcon, Button, Form, Flex, Input, Select, Option, Banner } from '@pega/cosmos-react-core';
|
|
5
|
+
import * as chatSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/chat-solid.icon';
|
|
6
|
+
import { CallControlPanelIcon } from '@pega/cosmos-react-cs';
|
|
7
|
+
import { AppShellDemo } from '@pega/cosmos-react-demos/lib/core/AppShell/AppShell.stories';
|
|
8
|
+
import { CaseViewDemo } from '@pega/cosmos-react-demos/lib/work/CaseView/CaseView.stories';
|
|
9
|
+
import { TasksDemo } from '@pega/cosmos-react-demos/lib/work/Tasks/Tasks.stories';
|
|
10
|
+
import { FeedDemo } from '@pega/cosmos-react-demos/lib/social/Feed/Feed.stories';
|
|
11
|
+
import { EmailDemo } from '@pega/cosmos-react-demos/lib/social/Email/Email.stories';
|
|
12
|
+
import { StandardChat } from '@pega/cosmos-react-demos/lib/social/Chat/Chat.stories';
|
|
13
|
+
import { TaskManagerDemo as TaskManagerStory } from '@pega/cosmos-react-demos/lib/cs/TaskManager/TaskManager.stories';
|
|
14
|
+
import { InteractionTimerDemo as InteractionTimerStory } from '@pega/cosmos-react-demos/lib/cs/InteractionTimer/InteractionTimer.stories';
|
|
15
|
+
import { CallControlPanelDemo } from '@pega/cosmos-react-demos/lib/cs/CallControlPanel/CallControlPanel.stories';
|
|
16
|
+
import { userStatusOptions } from '@pega/cosmos-react-demos/lib/cs/CallControlPanel/CallControlPanel.mocks';
|
|
17
|
+
import { AppShellMockData } from './CSCaseView.mocks';
|
|
18
|
+
registerIcon(chatSolidIcon);
|
|
19
|
+
export default {
|
|
20
|
+
title: 'Customer Service/CS App Shell',
|
|
21
|
+
parameters: {
|
|
22
|
+
layout: 'fullscreen'
|
|
23
|
+
},
|
|
24
|
+
args: {
|
|
25
|
+
isDraggable: true,
|
|
26
|
+
hasInteractionNotifications: true,
|
|
27
|
+
enableSla: true
|
|
28
|
+
},
|
|
29
|
+
argTypes: {
|
|
30
|
+
isDraggable: { control: { type: 'boolean' } },
|
|
31
|
+
hasInteractionNotifications: { control: { type: 'boolean' } },
|
|
32
|
+
enableSla: { control: { type: 'boolean' } }
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
const CallLoginForm = ({ ctiLinkOptions, onLogin }) => {
|
|
36
|
+
const [agentId, setAgentId] = useState('');
|
|
37
|
+
const [password, setPassword] = useState('');
|
|
38
|
+
const [extension, setExtension] = useState('');
|
|
39
|
+
const [ctiLinkId, setCTILinkId] = useState(Object.keys(ctiLinkOptions)[0]);
|
|
40
|
+
const [errorMessage, setErrorMessage] = useState();
|
|
41
|
+
const canSubmit = agentId && password && ctiLinkId && extension;
|
|
42
|
+
const actions = (_jsxs(_Fragment, { children: [_jsx(Button, { name: 'cancel', variant: 'secondary', children: "Cancel" }, void 0), _jsx(Button, { name: 'submit', type: 'submit', variant: 'primary', disabled: !canSubmit, onClick: (e) => {
|
|
43
|
+
e.preventDefault();
|
|
44
|
+
onLogin(ctiLinkId, agentId, password).then(setErrorMessage);
|
|
45
|
+
}, children: "Login" }, void 0)] }, void 0));
|
|
46
|
+
return (_jsxs(Form, { actions: actions, banners: errorMessage ? _jsx(Banner, { id: 'error', variant: 'urgent', messages: [errorMessage] }, void 0) : undefined, children: [_jsx(Select, { required: true, label: 'CTI link', onChange: e => setCTILinkId(e.target.value), children: Object.entries(ctiLinkOptions).map(([id, label]) => (_jsx(Option, { value: id, children: label }, void 0))) }, void 0), _jsx(Input, { required: true, label: 'Agent ID', value: agentId, onChange: (e) => setAgentId(e.target.value) }, void 0), _jsx(Input, { type: 'password', required: true, label: 'Password', value: password, onChange: (e) => setPassword(e.target.value) }, void 0), _jsx(Input, { required: true, label: 'Extension', value: extension, onChange: (e) => setExtension(e.target.value) }, void 0)] }, void 0));
|
|
47
|
+
};
|
|
48
|
+
export const CSAppShell = (args) => {
|
|
49
|
+
const CaseData = AppShellMockData;
|
|
50
|
+
const home = _jsx(TwoColumnPage, { a: _jsx(FeedDemo, {}, void 0), b: _jsx(TasksDemo, {}, void 0), title: 'Welcome, Sara Davis' }, void 0);
|
|
51
|
+
const [mainContent, setMainContent] = useState(home);
|
|
52
|
+
const [caseID, setCaseID] = useState(1001);
|
|
53
|
+
const [agentStatus, setAgentStatus] = useState(userStatusOptions[0]);
|
|
54
|
+
const [callPanelVisible, setCallPanelVisible] = useState(false);
|
|
55
|
+
const [cases, setCases] = useState([]);
|
|
56
|
+
const [links, setLinks] = useState([
|
|
57
|
+
{
|
|
58
|
+
id: '01',
|
|
59
|
+
name: 'Home',
|
|
60
|
+
href: '#home',
|
|
61
|
+
icon: 'home-solid'
|
|
62
|
+
}
|
|
63
|
+
]);
|
|
64
|
+
const tabs = [
|
|
65
|
+
{ name: 'Customer notes', id: 'Pulse' },
|
|
66
|
+
{ name: 'Accounts', id: 'Accounts' }
|
|
67
|
+
];
|
|
68
|
+
const demoActions = [
|
|
69
|
+
{
|
|
70
|
+
text: 'Change stage',
|
|
71
|
+
id: createUID(),
|
|
72
|
+
onClick: action('Clicked on change stage')
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
text: 'Wrap up',
|
|
76
|
+
id: createUID(),
|
|
77
|
+
onClick: action('Clicked on Wrap up')
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
text: 'Exit interaction',
|
|
81
|
+
id: createUID(),
|
|
82
|
+
onClick: action('Clicked on exit interaction')
|
|
83
|
+
}
|
|
84
|
+
];
|
|
85
|
+
const RenderCaseView = (name) => {
|
|
86
|
+
if (name) {
|
|
87
|
+
const { caseId, heading, primaryFields, secondaryFields: secondaryField } = CaseData[name];
|
|
88
|
+
const secondaryFields = secondaryField.map((field) => {
|
|
89
|
+
if (field.name === 'Status') {
|
|
90
|
+
return { ...field, value: _jsx(Status, { variant: 'success', children: field.value }, void 0) };
|
|
91
|
+
}
|
|
92
|
+
return field;
|
|
93
|
+
});
|
|
94
|
+
let persistentUtility;
|
|
95
|
+
if (name === 'Mail Interaction') {
|
|
96
|
+
persistentUtility = {
|
|
97
|
+
content: _jsx(EmailDemo, { hideSuggestions: true }, void 0),
|
|
98
|
+
title: 'Email'
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
else if (name === 'Chat Interaction') {
|
|
102
|
+
persistentUtility = {
|
|
103
|
+
content: _jsx(StandardChat, { chatWidth: '100%' }, void 0),
|
|
104
|
+
title: 'Chat'
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
setMainContent(_jsx(CaseViewDemo, { caseId: caseId, heading: heading, parentCases: [], actions: demoActions, primaryFields: primaryFields, secondaryFields: secondaryFields, tabs: tabs, stages: false, tasksWidget: _jsx(TaskManagerStory, {}, void 0), persistentUtility: persistentUtility, showUtilities: false, showFollowedIcon: false, defaultCollapsedUtilities: true }, void 0));
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
const setActiveItem = (key) => {
|
|
111
|
+
setCases((prevCases = []) => {
|
|
112
|
+
return prevCases.map(caseItem => {
|
|
113
|
+
return { ...caseItem, active: caseItem.id === key };
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
setLinks((prevLinks = []) => {
|
|
117
|
+
return prevLinks.map(link => {
|
|
118
|
+
return {
|
|
119
|
+
...link,
|
|
120
|
+
active: link.name === key
|
|
121
|
+
};
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
const createInteraction = (createLink) => {
|
|
126
|
+
const { primary, secondary, icon, customerName } = createLink;
|
|
127
|
+
const key = createUID();
|
|
128
|
+
const createdAt = new Date().getTime();
|
|
129
|
+
const newCase = {
|
|
130
|
+
visual: (_jsx(InteractionTimerStory, { createdAt: createdAt, icon: icon, showTimer: args.enableSla, hasNotifications: args.hasInteractionNotifications, meta: args.enableSla ? '0:00' : createLink.meta }, void 0)),
|
|
131
|
+
primary: customerName || 'Unknown customer',
|
|
132
|
+
secondary,
|
|
133
|
+
createdAt,
|
|
134
|
+
id: key,
|
|
135
|
+
active: true,
|
|
136
|
+
onClick: () => {
|
|
137
|
+
setActiveItem(key);
|
|
138
|
+
RenderCaseView(primary);
|
|
139
|
+
},
|
|
140
|
+
onDismiss: (e) => {
|
|
141
|
+
setActiveItem('Home');
|
|
142
|
+
e.stopPropagation();
|
|
143
|
+
setCases((prevCases = []) => prevCases.filter(caseItem => caseItem.id !== key));
|
|
144
|
+
setMainContent(home);
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
setCases((prevCases = []) => [...prevCases, newCase]);
|
|
148
|
+
setActiveItem(key);
|
|
149
|
+
setCaseID(caseID + 1);
|
|
150
|
+
RenderCaseView(primary);
|
|
151
|
+
};
|
|
152
|
+
const createLinks = [
|
|
153
|
+
{
|
|
154
|
+
primary: 'Phone Interaction',
|
|
155
|
+
secondary: 'Received 20s ago',
|
|
156
|
+
icon: 'phone-solid',
|
|
157
|
+
meta: 'FH',
|
|
158
|
+
customerName: 'Ginger Ventura'
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
primary: 'Chat Interaction',
|
|
162
|
+
secondary: 'Sent 2h ago',
|
|
163
|
+
icon: 'chat-solid',
|
|
164
|
+
meta: 'SC',
|
|
165
|
+
customerName: 'Sara Davis'
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
primary: 'Mail Interaction',
|
|
169
|
+
secondary: 'Received 20s ago',
|
|
170
|
+
icon: 'mail-solid',
|
|
171
|
+
meta: 'JB',
|
|
172
|
+
customerName: 'John Brown'
|
|
173
|
+
}
|
|
174
|
+
].map(item => {
|
|
175
|
+
const { primary, icon } = item;
|
|
176
|
+
return {
|
|
177
|
+
name: primary,
|
|
178
|
+
icon,
|
|
179
|
+
href: '',
|
|
180
|
+
onClick: () => {
|
|
181
|
+
createInteraction(item);
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
});
|
|
185
|
+
useEffect(() => {
|
|
186
|
+
createInteraction({
|
|
187
|
+
primary: 'Phone Interaction',
|
|
188
|
+
secondary: 'Received 20s ago',
|
|
189
|
+
icon: 'phone-solid',
|
|
190
|
+
meta: 'GV',
|
|
191
|
+
customerName: 'Ginger Ventura'
|
|
192
|
+
});
|
|
193
|
+
}, []);
|
|
194
|
+
const actions = (_jsxs(_Fragment, { children: [_jsx(Button, { name: 'Cancel', variant: 'secondary', onClick: (e) => {
|
|
195
|
+
action('Click')(`${e.currentTarget.name}:${e.type}`);
|
|
196
|
+
}, children: "Cancel" }, void 0), _jsx(Button, { name: 'Submit', type: 'submit', variant: 'primary', children: "Log in" }, void 0)] }, void 0));
|
|
197
|
+
const chatSettings = (_jsx(Flex, { container: { direction: 'column', gap: 2, pad: 2 }, item: { grow: 1 }, children: _jsxs(Form, { actions: actions, children: [_jsx(Input, { name: 'agentId', label: 'Agent Id', autoComplete: 'off' }, void 0), _jsx(Input, { name: 'password', type: 'password', label: 'Password', autoComplete: 'off' }, void 0), _jsxs(Select, { label: 'Make me', children: [_jsx(Option, { children: "Available" }, void 0), _jsx(Option, { children: "Unavailable" }, void 0)] }, void 0)] }, void 0) }, void 0));
|
|
198
|
+
const utils = [
|
|
199
|
+
{
|
|
200
|
+
name: 'Chat settings',
|
|
201
|
+
visual: _jsx(Icon, { name: 'chat-solid' }, void 0),
|
|
202
|
+
drawerView: chatSettings,
|
|
203
|
+
drawerHeader: 'Pega Chat Log In'
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
name: 'Call panel',
|
|
207
|
+
visual: (_jsx(CallControlPanelIcon, { status: agentStatus.status, label: agentStatus.label, variant: 'icon', panelVisible: callPanelVisible }, void 0)),
|
|
208
|
+
...(agentStatus.status === 'offline'
|
|
209
|
+
? {
|
|
210
|
+
drawerView: (_jsx(Flex, { container: { direction: 'column', gap: 2, pad: 2 }, item: { grow: 1 }, children: _jsx(CallLoginForm, { ctiLinkOptions: {
|
|
211
|
+
valid: 'It will be accepted',
|
|
212
|
+
invalid: 'This will raise an error'
|
|
213
|
+
}, onLogin: ctiLink => {
|
|
214
|
+
if (ctiLink === 'invalid')
|
|
215
|
+
return Promise.resolve('Login incorrect');
|
|
216
|
+
setAgentStatus(userStatusOptions[1]);
|
|
217
|
+
setCallPanelVisible(true);
|
|
218
|
+
return Promise.resolve(undefined);
|
|
219
|
+
} }, void 0) }, void 0)),
|
|
220
|
+
drawerHeader: 'Pega Call Log In'
|
|
221
|
+
}
|
|
222
|
+
: {
|
|
223
|
+
onClick: () => setCallPanelVisible(isVisible => !isVisible)
|
|
224
|
+
})
|
|
225
|
+
}
|
|
226
|
+
];
|
|
227
|
+
const appInfo = {
|
|
228
|
+
href: 'https://www.pega.com/',
|
|
229
|
+
imageSrc: 'https://www.clipartmax.com/png/middle/345-3454195_account-executive-civilian-pega-logo-png.png',
|
|
230
|
+
fullImageSrc: 'Full Image Source',
|
|
231
|
+
appName: 'CS AppShell'
|
|
232
|
+
};
|
|
233
|
+
return (_jsxs(_Fragment, { children: [_jsx(AppShellDemo, { main: mainContent, appInfo: appInfo, cases: cases, createLinks: createLinks, caseLinks: links, utils: utils, onLinkClick: (name) => {
|
|
234
|
+
if (name === 'Home') {
|
|
235
|
+
setMainContent(home);
|
|
236
|
+
}
|
|
237
|
+
setActiveItem(name);
|
|
238
|
+
} }, void 0), callPanelVisible && (_jsx(CallControlPanelDemo, { status: agentStatus.id, onStatusChange: setAgentStatus, isDraggable: args.isDraggable }, void 0))] }, void 0));
|
|
239
|
+
};
|
|
240
|
+
//# sourceMappingURL=CSAppShell.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CSAppShell.stories.js","sourceRoot":"","sources":["../../../src/cs/CSCaseView/CSAppShell.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAA8C,MAAM,OAAO,CAAC;AACxF,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAGlD,OAAO,EAEL,SAAS,EACT,MAAM,EACN,aAAa,EACb,IAAI,EACJ,YAAY,EACZ,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,MAAM,EACN,MAAM,EACN,MAAM,EACP,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,aAAa,MAAM,mEAAmE,CAAC;AACnG,OAAO,EAAE,oBAAoB,EAAgC,MAAM,uBAAuB,CAAC;AAC3F,OAAO,EAAE,YAAY,EAAE,MAAM,6DAA6D,CAAC;AAC3F,OAAO,EAAE,YAAY,EAAE,MAAM,6DAA6D,CAAC;AAC3F,OAAO,EAAE,SAAS,EAAE,MAAM,uDAAuD,CAAC;AAClF,OAAO,EAAE,QAAQ,EAAE,MAAM,uDAAuD,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,yDAAyD,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,uDAA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tB,CAAC,WACD,EACD,gBAAgB,IAAI,CACnB,KAAC,oBAAoB,IACnB,MAAM,EAAE,WAAW,CAAC,EAAE,EACtB,cAAc,EAAE,cAAc,EAC9B,WAAW,EAAE,IAAI,CAAC,WAAW,WAC7B,CACH,YACA,CACJ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useEffect, useState, MouseEvent, ChangeEvent, FunctionComponent } from 'react';\nimport { action } from '@storybook/addon-actions';\nimport { Story } from '@storybook/react';\n\nimport {\n AppShellProps,\n createUID,\n Status,\n TwoColumnPage,\n Icon,\n registerIcon,\n Button,\n Form,\n Flex,\n Input,\n Select,\n Option,\n Banner\n} from '@pega/cosmos-react-core';\nimport * as chatSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/chat-solid.icon';\nimport { CallControlPanelIcon, UserAvailabilityStatusOption } from '@pega/cosmos-react-cs';\nimport { AppShellDemo } from '@pega/cosmos-react-demos/lib/core/AppShell/AppShell.stories';\nimport { CaseViewDemo } from '@pega/cosmos-react-demos/lib/work/CaseView/CaseView.stories';\nimport { TasksDemo } from '@pega/cosmos-react-demos/lib/work/Tasks/Tasks.stories';\nimport { FeedDemo } from '@pega/cosmos-react-demos/lib/social/Feed/Feed.stories';\nimport { EmailDemo } from '@pega/cosmos-react-demos/lib/social/Email/Email.stories';\nimport { StandardChat } from '@pega/cosmos-react-demos/lib/social/Chat/Chat.stories';\nimport { TaskManagerDemo as TaskManagerStory } from '@pega/cosmos-react-demos/lib/cs/TaskManager/TaskManager.stories';\nimport {\n InteractionTimerDemo as InteractionTimerStory,\n InteractionTimerStoryProps\n} from '@pega/cosmos-react-demos/lib/cs/InteractionTimer/InteractionTimer.stories';\nimport { CallControlPanelDemo } from '@pega/cosmos-react-demos/lib/cs/CallControlPanel/CallControlPanel.stories';\nimport { userStatusOptions } from '@pega/cosmos-react-demos/lib/cs/CallControlPanel/CallControlPanel.mocks';\n\nimport { AppShellMockData } from './CSCaseView.mocks';\n\nregisterIcon(chatSolidIcon);\n\nexport default {\n title: 'Customer Service/CS App Shell',\n parameters: {\n layout: 'fullscreen'\n },\n args: {\n isDraggable: true,\n hasInteractionNotifications: true,\n enableSla: true\n },\n argTypes: {\n isDraggable: { control: { type: 'boolean' } },\n hasInteractionNotifications: { control: { type: 'boolean' } },\n enableSla: { control: { type: 'boolean' } }\n }\n};\n\nexport type LoginError = string;\n\nexport interface LoginFormProps {\n ctiLinkOptions: { [key: string]: string };\n onLogin: (\n ctiLinkId: keyof LoginFormProps['ctiLinkOptions'],\n agentId: string,\n password: string\n ) => Promise<LoginError | undefined>;\n}\n\nconst CallLoginForm: FunctionComponent<LoginFormProps> = ({\n ctiLinkOptions,\n onLogin\n}: LoginFormProps) => {\n const [agentId, setAgentId] = useState<string>('');\n const [password, setPassword] = useState<string>('');\n const [extension, setExtension] = useState<string>('');\n const [ctiLinkId, setCTILinkId] = useState<string>(Object.keys(ctiLinkOptions)[0]);\n const [errorMessage, setErrorMessage] = useState<string>();\n\n const canSubmit = agentId && password && ctiLinkId && extension;\n\n const actions = (\n <>\n <Button name='cancel' variant='secondary'>\n Cancel\n </Button>\n <Button\n name='submit'\n type='submit'\n variant='primary'\n disabled={!canSubmit}\n onClick={(e: MouseEvent) => {\n e.preventDefault();\n onLogin(ctiLinkId!, agentId, password).then(setErrorMessage);\n }}\n >\n Login\n </Button>\n </>\n );\n\n return (\n <Form\n actions={actions}\n banners={\n errorMessage ? <Banner id='error' variant='urgent' messages={[errorMessage]} /> : undefined\n }\n >\n <Select required label='CTI link' onChange={e => setCTILinkId(e.target.value)}>\n {Object.entries(ctiLinkOptions).map(([id, label]) => (\n <Option value={id}>{label}</Option>\n ))}\n </Select>\n <Input\n required\n label='Agent ID'\n value={agentId}\n onChange={(e: ChangeEvent<HTMLInputElement>) => setAgentId(e.target.value)}\n />\n <Input\n type='password'\n required\n label='Password'\n value={password}\n onChange={(e: ChangeEvent<HTMLInputElement>) => setPassword(e.target.value)}\n />\n <Input\n required\n label='Extension'\n value={extension}\n onChange={(e: ChangeEvent<HTMLInputElement>) => setExtension(e.target.value)}\n />\n </Form>\n );\n};\ninterface CSAppShellProps {\n isDraggable?: boolean;\n hasInteractionNotifications?: InteractionTimerStoryProps['hasNotifications'];\n enableSla?: InteractionTimerStoryProps['showTimer'];\n}\n\nexport const CSAppShell: Story<CSAppShellProps> = (args: CSAppShellProps) => {\n const CaseData = AppShellMockData as any;\n\n const home = <TwoColumnPage a={<FeedDemo />} b={<TasksDemo />} title='Welcome, Sara Davis' />;\n\n const [mainContent, setMainContent] = useState(home);\n const [caseID, setCaseID] = useState(1001);\n const [agentStatus, setAgentStatus] = useState<UserAvailabilityStatusOption>(\n userStatusOptions[0] as UserAvailabilityStatusOption\n );\n const [callPanelVisible, setCallPanelVisible] = useState(false);\n const [cases, setCases] = useState<AppShellProps['cases']>([]);\n const [links, setLinks] = useState<AppShellProps['links']>([\n {\n id: '01',\n name: 'Home',\n href: '#home',\n icon: 'home-solid'\n }\n ]);\n\n const tabs = [\n { name: 'Customer notes', id: 'Pulse' },\n { name: 'Accounts', id: 'Accounts' }\n ];\n\n const demoActions = [\n {\n text: 'Change stage',\n id: createUID(),\n onClick: action('Clicked on change stage')\n },\n {\n text: 'Wrap up',\n id: createUID(),\n onClick: action('Clicked on Wrap up')\n },\n {\n text: 'Exit interaction',\n id: createUID(),\n onClick: action('Clicked on exit interaction')\n }\n ];\n\n const RenderCaseView = (name: string) => {\n if (name) {\n const { caseId, heading, primaryFields, secondaryFields: secondaryField } = CaseData[name];\n const secondaryFields = secondaryField.map((field: any) => {\n if (field.name === 'Status') {\n return { ...field, value: <Status variant='success'>{field.value}</Status> };\n }\n return field;\n });\n let persistentUtility;\n if (name === 'Mail Interaction') {\n persistentUtility = {\n content: <EmailDemo hideSuggestions />,\n title: 'Email'\n };\n } else if (name === 'Chat Interaction') {\n persistentUtility = {\n content: <StandardChat chatWidth='100%' />,\n title: 'Chat'\n };\n }\n setMainContent(\n <CaseViewDemo\n caseId={caseId}\n heading={heading}\n parentCases={[]}\n actions={demoActions}\n primaryFields={primaryFields}\n secondaryFields={secondaryFields}\n tabs={tabs}\n stages={false}\n tasksWidget={<TaskManagerStory />}\n persistentUtility={persistentUtility}\n showUtilities={false}\n showFollowedIcon={false}\n defaultCollapsedUtilities\n />\n );\n }\n };\n\n const setActiveItem = (key: string) => {\n setCases((prevCases = []) => {\n return prevCases.map(caseItem => {\n return { ...caseItem, active: caseItem.id === key };\n });\n });\n setLinks((prevLinks = []) => {\n return prevLinks.map(link => {\n return {\n ...link,\n active: link.name === key\n };\n });\n });\n };\n\n const createInteraction = (createLink: {\n primary: string;\n secondary?: string;\n icon: string;\n meta: string;\n customerName?: string;\n }) => {\n const { primary, secondary, icon, customerName } = createLink;\n const key: string = createUID();\n const createdAt = new Date().getTime();\n const newCase = {\n visual: (\n <InteractionTimerStory\n createdAt={createdAt}\n icon={icon as string}\n showTimer={args.enableSla}\n hasNotifications={args.hasInteractionNotifications}\n meta={args.enableSla ? '0:00' : createLink.meta}\n />\n ),\n primary: customerName || 'Unknown customer',\n secondary,\n createdAt,\n id: key,\n active: true,\n onClick: () => {\n setActiveItem(key);\n RenderCaseView(primary);\n },\n onDismiss: (e: any) => {\n setActiveItem('Home');\n e.stopPropagation();\n setCases((prevCases = []) => prevCases.filter(caseItem => caseItem.id !== key));\n setMainContent(home);\n }\n };\n setCases((prevCases = []) => [...prevCases, newCase]);\n setActiveItem(key);\n setCaseID(caseID + 1);\n RenderCaseView(primary);\n };\n\n const createLinks = [\n {\n primary: 'Phone Interaction',\n secondary: 'Received 20s ago',\n icon: 'phone-solid',\n meta: 'FH',\n customerName: 'Ginger Ventura'\n },\n {\n primary: 'Chat Interaction',\n secondary: 'Sent 2h ago',\n icon: 'chat-solid',\n meta: 'SC',\n customerName: 'Sara Davis'\n },\n {\n primary: 'Mail Interaction',\n secondary: 'Received 20s ago',\n icon: 'mail-solid',\n meta: 'JB',\n customerName: 'John Brown'\n }\n ].map(item => {\n const { primary, icon } = item;\n return {\n name: primary,\n icon,\n href: '',\n onClick: () => {\n createInteraction(item);\n }\n };\n });\n\n useEffect(() => {\n createInteraction({\n primary: 'Phone Interaction',\n secondary: 'Received 20s ago',\n icon: 'phone-solid',\n meta: 'GV',\n customerName: 'Ginger Ventura'\n });\n }, []);\n const actions = (\n <>\n <Button\n name='Cancel'\n variant='secondary'\n onClick={(e: MouseEvent<HTMLButtonElement>) => {\n action('Click')(`${e.currentTarget.name}:${e.type}`);\n }}\n >\n Cancel\n </Button>\n <Button name='Submit' type='submit' variant='primary'>\n Log in\n </Button>\n </>\n );\n const chatSettings = (\n <Flex container={{ direction: 'column', gap: 2, pad: 2 }} item={{ grow: 1 }}>\n <Form actions={actions}>\n <Input name='agentId' label='Agent Id' autoComplete='off' />\n\n <Input name='password' type='password' label='Password' autoComplete='off' />\n <Select label='Make me'>\n <Option>Available</Option>\n <Option>Unavailable</Option>\n </Select>\n </Form>\n </Flex>\n );\n\n const utils = [\n {\n name: 'Chat settings',\n visual: <Icon name='chat-solid' />,\n drawerView: chatSettings,\n drawerHeader: 'Pega Chat Log In'\n },\n {\n name: 'Call panel',\n visual: (\n <CallControlPanelIcon\n status={agentStatus.status}\n label={agentStatus.label}\n variant='icon'\n panelVisible={callPanelVisible}\n />\n ),\n ...(agentStatus.status === 'offline'\n ? {\n drawerView: (\n <Flex container={{ direction: 'column', gap: 2, pad: 2 }} item={{ grow: 1 }}>\n <CallLoginForm\n ctiLinkOptions={{\n valid: 'It will be accepted',\n invalid: 'This will raise an error'\n }}\n onLogin={ctiLink => {\n if (ctiLink === 'invalid') return Promise.resolve('Login incorrect');\n setAgentStatus(userStatusOptions[1] as UserAvailabilityStatusOption);\n setCallPanelVisible(true);\n return Promise.resolve(undefined);\n }}\n />\n </Flex>\n ),\n drawerHeader: 'Pega Call Log In'\n }\n : {\n onClick: () => setCallPanelVisible(isVisible => !isVisible)\n })\n }\n ];\n\n const appInfo = {\n href: 'https://www.pega.com/',\n imageSrc:\n 'https://www.clipartmax.com/png/middle/345-3454195_account-executive-civilian-pega-logo-png.png',\n fullImageSrc: 'Full Image Source',\n appName: 'CS AppShell'\n };\n\n return (\n <>\n <AppShellDemo\n main={mainContent}\n appInfo={appInfo}\n cases={cases}\n createLinks={createLinks}\n caseLinks={links}\n utils={utils}\n onLinkClick={(name: string) => {\n if (name === 'Home') {\n setMainContent(home);\n }\n setActiveItem(name);\n }}\n />\n {callPanelVisible && (\n <CallControlPanelDemo\n status={agentStatus.id}\n onStatusChange={setAgentStatus}\n isDraggable={args.isDraggable}\n />\n )}\n </>\n );\n};\n"]}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { array, text } from '@storybook/addon-knobs';
|
|
3
|
+
import { action } from '@storybook/addon-actions';
|
|
4
|
+
import { useRef, useState } from 'react';
|
|
5
|
+
import { createUID } from '@pega/cosmos-react-core';
|
|
6
|
+
import { CallControlPanel, CalleePicker } from '@pega/cosmos-react-cs';
|
|
7
|
+
import { contactsList, transferReasons, userStatusOptions } from './CallControlPanel.mocks';
|
|
8
|
+
export default {
|
|
9
|
+
title: 'Customer Service/CallControlPanel',
|
|
10
|
+
component: CallControlPanel,
|
|
11
|
+
args: {
|
|
12
|
+
isDraggable: true
|
|
13
|
+
},
|
|
14
|
+
argTypes: {
|
|
15
|
+
isDraggable: { control: { type: 'boolean' } }
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
export const CallControlPanelDemo = (args) => {
|
|
19
|
+
const [currentStatus, setCurrentStatus] = useState(args.status || 'available');
|
|
20
|
+
const inStatusSince = useRef(Date.now());
|
|
21
|
+
const [calls, setCalls] = useState([]);
|
|
22
|
+
const slaConfig = array('SLA timeouts', ['30', '50']).map(Number);
|
|
23
|
+
const [contacts, setContacts] = useState(contactsList);
|
|
24
|
+
const [error, setError] = useState();
|
|
25
|
+
const callsList = useRef(calls);
|
|
26
|
+
callsList.current = calls;
|
|
27
|
+
const onPauseToggle = (id) => {
|
|
28
|
+
const activeCallIndex = callsList.current.findIndex((call) => call.id === id);
|
|
29
|
+
const activeCall = callsList.current[activeCallIndex];
|
|
30
|
+
callsList.current.splice(activeCallIndex, 1, {
|
|
31
|
+
...activeCall,
|
|
32
|
+
onHoldSince: activeCall.onHoldSince === undefined ? Date.now() : undefined
|
|
33
|
+
});
|
|
34
|
+
setCalls([...callsList.current]);
|
|
35
|
+
};
|
|
36
|
+
const onMuteToggle = (id) => {
|
|
37
|
+
const activeCallIndex = callsList.current.findIndex((call) => call.id === id);
|
|
38
|
+
const activeCall = callsList.current[activeCallIndex];
|
|
39
|
+
callsList.current.splice(activeCallIndex, 1, {
|
|
40
|
+
...activeCall,
|
|
41
|
+
muted: !activeCall.muted
|
|
42
|
+
});
|
|
43
|
+
setCalls([...callsList.current]);
|
|
44
|
+
};
|
|
45
|
+
const onMergeCall = (id) => {
|
|
46
|
+
const activeCall = callsList.current.find((call) => call.id === id);
|
|
47
|
+
if (!activeCall)
|
|
48
|
+
return;
|
|
49
|
+
callsList.current.splice(0, 1, {
|
|
50
|
+
...callsList.current[0],
|
|
51
|
+
participants: [...callsList.current[0].participants, ...activeCall.participants],
|
|
52
|
+
onHoldSince: undefined
|
|
53
|
+
});
|
|
54
|
+
setCalls([...callsList.current.filter(callId => callId.id !== id)]);
|
|
55
|
+
};
|
|
56
|
+
const onEndCall = (id) => {
|
|
57
|
+
const newList = callsList.current.filter(item => item.id !== id);
|
|
58
|
+
setCalls(newList);
|
|
59
|
+
};
|
|
60
|
+
const onConsultAction = (id, phoneNumber) => {
|
|
61
|
+
const caller = contactsList.find(person => person.phoneNumber === phoneNumber);
|
|
62
|
+
const consultCall = {
|
|
63
|
+
id: createUID(),
|
|
64
|
+
startedAt: Date.now(),
|
|
65
|
+
onMergeCall,
|
|
66
|
+
transferOptions: transferReasons,
|
|
67
|
+
muted: false,
|
|
68
|
+
onMuteToggle,
|
|
69
|
+
onPauseToggle,
|
|
70
|
+
participants: [
|
|
71
|
+
{
|
|
72
|
+
name: caller?.primary || '',
|
|
73
|
+
info: caller?.secondary || '',
|
|
74
|
+
id: caller?.primary || '',
|
|
75
|
+
onEndCall: (callId, participantId) => {
|
|
76
|
+
// find consult call
|
|
77
|
+
const callIndex = callsList.current.findIndex(call => call.id === consultCall.id);
|
|
78
|
+
// end consult call if still exists
|
|
79
|
+
if (callIndex !== -1)
|
|
80
|
+
onEndCall(callId);
|
|
81
|
+
else {
|
|
82
|
+
const activeCallIndex = callsList.current.findIndex(call => call.id === callId);
|
|
83
|
+
const activeCall = callsList.current[activeCallIndex];
|
|
84
|
+
callsList.current.splice(activeCallIndex, 1, {
|
|
85
|
+
...activeCall,
|
|
86
|
+
participants: [
|
|
87
|
+
...activeCall.participants.filter(participant => participant.id === participantId)
|
|
88
|
+
]
|
|
89
|
+
});
|
|
90
|
+
setCalls([...callsList.current]);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
};
|
|
96
|
+
const updatedCalls = callsList.current.map((call) => {
|
|
97
|
+
return { ...call, onHoldSince: Date.now() };
|
|
98
|
+
});
|
|
99
|
+
updatedCalls.push(consultCall);
|
|
100
|
+
setCalls(updatedCalls);
|
|
101
|
+
};
|
|
102
|
+
const onConferenceAction = (id, phoneNumber) => {
|
|
103
|
+
const caller = contactsList.find(person => person.phoneNumber === phoneNumber);
|
|
104
|
+
const conferenceCall = {
|
|
105
|
+
id: createUID(),
|
|
106
|
+
startedAt: Date.now(),
|
|
107
|
+
onMergeCall,
|
|
108
|
+
transferOptions: transferReasons,
|
|
109
|
+
muted: false,
|
|
110
|
+
onMuteToggle,
|
|
111
|
+
onPauseToggle,
|
|
112
|
+
participants: [
|
|
113
|
+
{
|
|
114
|
+
name: caller?.primary || '',
|
|
115
|
+
info: caller?.secondary || '',
|
|
116
|
+
id: caller?.primary || '',
|
|
117
|
+
onEndCall: (callId, participantId) => {
|
|
118
|
+
// find conference call
|
|
119
|
+
const callIndex = callsList.current.findIndex(call => call.id === conferenceCall.id);
|
|
120
|
+
// end conference call if still exists
|
|
121
|
+
if (callIndex !== -1)
|
|
122
|
+
onEndCall(callId);
|
|
123
|
+
else {
|
|
124
|
+
const activeCallIndex = callsList.current.findIndex(call => call.id === callId);
|
|
125
|
+
const activeCall = callsList.current[activeCallIndex];
|
|
126
|
+
callsList.current.splice(activeCallIndex, 1, {
|
|
127
|
+
...activeCall,
|
|
128
|
+
participants: [
|
|
129
|
+
...activeCall.participants.filter(participant => participant.id === participantId)
|
|
130
|
+
]
|
|
131
|
+
});
|
|
132
|
+
setCalls([...callsList.current]);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
};
|
|
138
|
+
callsList.current.splice(0, 1, {
|
|
139
|
+
...callsList.current[0],
|
|
140
|
+
participants: [...callsList.current[0].participants, ...conferenceCall.participants],
|
|
141
|
+
onHoldSince: undefined
|
|
142
|
+
});
|
|
143
|
+
setCalls([...callsList.current.filter(callId => callId.id !== conferenceCall.id)]);
|
|
144
|
+
};
|
|
145
|
+
return (_jsx(CallControlPanel, { heading: text('Heading', 'Agent Smith'), statusOptions: userStatusOptions, status: currentStatus, inStatusSince: inStatusSince.current, onStatusChange: value => {
|
|
146
|
+
if (value === 'reconnecting') {
|
|
147
|
+
setError('You cannot set this status');
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
setCurrentStatus(value);
|
|
151
|
+
args.onStatusChange?.(userStatusOptions.find(s => s.id === value));
|
|
152
|
+
}, message: error, calls: calls, draggable: args.isDraggable, onAddCall: (phoneNumber) => {
|
|
153
|
+
const call = {
|
|
154
|
+
id: createUID(),
|
|
155
|
+
startedAt: Date.now(),
|
|
156
|
+
slaConfig,
|
|
157
|
+
onConsultAction,
|
|
158
|
+
onConferenceAction,
|
|
159
|
+
transferOptions: transferReasons,
|
|
160
|
+
onTransferAction: (id, data) => {
|
|
161
|
+
action('onTransferAction')(id, data);
|
|
162
|
+
onEndCall(id);
|
|
163
|
+
},
|
|
164
|
+
muted: false,
|
|
165
|
+
onMuteToggle,
|
|
166
|
+
onPauseToggle,
|
|
167
|
+
onDTMFPress: action('onDTMFPress'),
|
|
168
|
+
participants: [
|
|
169
|
+
{
|
|
170
|
+
id: contactsList.find(person => person.phoneNumber === phoneNumber)?.primary || '',
|
|
171
|
+
name: contactsList.find(person => person.phoneNumber === phoneNumber)?.primary ||
|
|
172
|
+
'Unknown',
|
|
173
|
+
onEndCall: () => onEndCall(call.id)
|
|
174
|
+
}
|
|
175
|
+
]
|
|
176
|
+
};
|
|
177
|
+
setCalls([call]);
|
|
178
|
+
setCurrentStatus('not_available');
|
|
179
|
+
}, contactsList: contacts, onFavoriteToggle: (phoneNumber, favorite) => {
|
|
180
|
+
const element = contacts.find(item => item.phoneNumber === phoneNumber);
|
|
181
|
+
element.favorite = !favorite;
|
|
182
|
+
setContacts([...contacts]);
|
|
183
|
+
} }, void 0));
|
|
184
|
+
};
|
|
185
|
+
export const NewCallDemo = () => {
|
|
186
|
+
const [items, setItems] = useState(contactsList);
|
|
187
|
+
return (_jsx(CalleePicker, { heading: 'New call', contactsList: contactsList, onFavoriteToggle: (phoneNumber, favorite) => {
|
|
188
|
+
const element = items.find(item => item.phoneNumber === phoneNumber);
|
|
189
|
+
element.favorite = !favorite;
|
|
190
|
+
setItems([...items]);
|
|
191
|
+
}, onCall: phoneNumber => action('onCall')(phoneNumber) }, void 0));
|
|
192
|
+
};
|
|
193
|
+
//# sourceMappingURL=CallControlPanel.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CallControlPanel.stories.js","sourceRoot":"","sources":["../../../src/cs/CallControlPanel/CallControlPanel.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAA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AAY,EAC1B,gBAAgB,EAAE,CAAC,WAAmB,EAAE,QAAiB,EAAE,EAAE;YAC3D,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,KAAK,WAAW,CAAC,CAAC;YACrE,OAAQ,CAAC,QAAQ,GAAG,CAAC,QAAQ,CAAC;YAC9B,QAAQ,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;QACvB,CAAC,EACD,MAAM,EAAE,WAAW,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,WACpD,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { array, text } from '@storybook/addon-knobs';\nimport { action } from '@storybook/addon-actions';\nimport { useRef, useState } from 'react';\nimport { Meta, Story } from '@storybook/react';\n\nimport { createUID } from '@pega/cosmos-react-core';\nimport {\n CallControlPanel,\n CalleePicker,\n CallProps,\n UserAvailabilityStatusOption\n} from '@pega/cosmos-react-cs';\n\nimport { contactsList, transferReasons, userStatusOptions } from './CallControlPanel.mocks';\n\nexport default {\n title: 'Customer Service/CallControlPanel',\n component: CallControlPanel,\n args: {\n isDraggable: true\n },\n argTypes: {\n isDraggable: { control: { type: 'boolean' } }\n }\n} as Meta;\n\ninterface CallControlPanelStoryProps {\n isDraggable?: boolean;\n status?: UserAvailabilityStatusOption['id'];\n onStatusChange?: (newStatus: UserAvailabilityStatusOption) => void;\n}\n\nexport const CallControlPanelDemo: Story<CallControlPanelStoryProps> = (\n args: CallControlPanelStoryProps\n) => {\n const [currentStatus, setCurrentStatus] = useState<UserAvailabilityStatusOption['id']>(\n args.status || 'available'\n );\n const inStatusSince = useRef(Date.now());\n const [calls, setCalls] = useState<CallProps[]>([]);\n const slaConfig = array('SLA timeouts', ['30', '50']).map(Number);\n const [contacts, setContacts] = useState(contactsList);\n const [error, setError] = useState<string>();\n const callsList = useRef(calls);\n callsList.current = calls;\n\n const onPauseToggle = (id: string) => {\n const activeCallIndex = callsList.current.findIndex((call: CallProps) => call.id === id);\n const activeCall = callsList.current[activeCallIndex];\n callsList.current.splice(activeCallIndex, 1, {\n ...activeCall,\n onHoldSince: activeCall.onHoldSince === undefined ? Date.now() : undefined\n });\n setCalls([...callsList.current]);\n };\n\n const onMuteToggle = (id: string) => {\n const activeCallIndex = callsList.current.findIndex((call: CallProps) => call.id === id);\n const activeCall = callsList.current[activeCallIndex];\n callsList.current.splice(activeCallIndex, 1, {\n ...activeCall,\n muted: !activeCall.muted\n });\n setCalls([...callsList.current]);\n };\n\n const onMergeCall = (id: string) => {\n const activeCall = callsList.current.find((call: CallProps) => call.id === id);\n if (!activeCall) return;\n callsList.current.splice(0, 1, {\n ...callsList.current[0],\n participants: [...callsList.current[0].participants, ...activeCall.participants],\n onHoldSince: undefined\n });\n setCalls([...callsList.current.filter(callId => callId.id !== id)]);\n };\n\n const onEndCall = (id: CallProps['id']) => {\n const newList = callsList.current.filter(item => item.id !== id);\n setCalls(newList);\n };\n\n const onConsultAction = (id: string, phoneNumber: string) => {\n const caller = contactsList.find(person => person.phoneNumber === phoneNumber);\n const consultCall: CallProps = {\n id: createUID(),\n startedAt: Date.now(),\n onMergeCall,\n transferOptions: transferReasons,\n muted: false,\n onMuteToggle,\n onPauseToggle,\n participants: [\n {\n name: caller?.primary || '',\n info: caller?.secondary || '',\n id: caller?.primary || '',\n onEndCall: (callId, participantId) => {\n // find consult call\n const callIndex = callsList.current.findIndex(call => call.id === consultCall.id);\n // end consult call if still exists\n if (callIndex !== -1) onEndCall(callId);\n else {\n const activeCallIndex = callsList.current.findIndex(call => call.id === callId);\n const activeCall = callsList.current[activeCallIndex];\n callsList.current.splice(activeCallIndex, 1, {\n ...activeCall,\n participants: [\n ...activeCall.participants.filter(participant => participant.id === participantId)\n ]\n });\n setCalls([...callsList.current]);\n }\n }\n }\n ]\n };\n const updatedCalls: CallProps[] = callsList.current.map((call: CallProps) => {\n return { ...call, onHoldSince: Date.now() };\n });\n updatedCalls.push(consultCall);\n setCalls(updatedCalls);\n };\n\n const onConferenceAction = (id: string, phoneNumber: string) => {\n const caller = contactsList.find(person => person.phoneNumber === phoneNumber);\n const conferenceCall: CallProps = {\n id: createUID(),\n startedAt: Date.now(),\n onMergeCall,\n transferOptions: transferReasons,\n muted: false,\n onMuteToggle,\n onPauseToggle,\n participants: [\n {\n name: caller?.primary || '',\n info: caller?.secondary || '',\n id: caller?.primary || '',\n onEndCall: (callId, participantId) => {\n // find conference call\n const callIndex = callsList.current.findIndex(call => call.id === conferenceCall.id);\n // end conference call if still exists\n if (callIndex !== -1) onEndCall(callId);\n else {\n const activeCallIndex = callsList.current.findIndex(call => call.id === callId);\n const activeCall = callsList.current[activeCallIndex];\n callsList.current.splice(activeCallIndex, 1, {\n ...activeCall,\n participants: [\n ...activeCall.participants.filter(participant => participant.id === participantId)\n ]\n });\n setCalls([...callsList.current]);\n }\n }\n }\n ]\n };\n\n callsList.current.splice(0, 1, {\n ...callsList.current[0],\n participants: [...callsList.current[0].participants, ...conferenceCall.participants],\n onHoldSince: undefined\n });\n setCalls([...callsList.current.filter(callId => callId.id !== conferenceCall.id)]);\n };\n\n return (\n <CallControlPanel\n heading={text('Heading', 'Agent Smith')}\n statusOptions={userStatusOptions as UserAvailabilityStatusOption[]}\n status={currentStatus}\n inStatusSince={inStatusSince.current}\n onStatusChange={value => {\n if (value === 'reconnecting') {\n setError('You cannot set this status');\n return;\n }\n setCurrentStatus(value);\n args.onStatusChange?.(\n userStatusOptions.find(s => s.id === value) as UserAvailabilityStatusOption\n );\n }}\n message={error}\n calls={calls}\n draggable={args.isDraggable}\n onAddCall={(phoneNumber: string) => {\n const call: CallProps = {\n id: createUID(),\n startedAt: Date.now(),\n slaConfig,\n onConsultAction,\n onConferenceAction,\n transferOptions: transferReasons,\n onTransferAction: (id, data) => {\n action('onTransferAction')(id, data);\n onEndCall(id);\n },\n muted: false,\n onMuteToggle,\n onPauseToggle,\n onDTMFPress: action('onDTMFPress'),\n participants: [\n {\n id: contactsList.find(person => person.phoneNumber === phoneNumber)?.primary || '',\n name:\n contactsList.find(person => person.phoneNumber === phoneNumber)?.primary ||\n 'Unknown',\n onEndCall: () => onEndCall(call.id)\n }\n ]\n };\n setCalls([call]);\n setCurrentStatus('not_available');\n }}\n contactsList={contacts}\n onFavoriteToggle={(phoneNumber: string, favorite: boolean) => {\n const element = contacts.find(item => item.phoneNumber === phoneNumber);\n element!.favorite = !favorite;\n setContacts([...contacts]);\n }}\n />\n );\n};\n\nexport const NewCallDemo = () => {\n const [items, setItems] = useState(contactsList);\n return (\n <CalleePicker\n heading='New call'\n contactsList={contactsList}\n onFavoriteToggle={(phoneNumber: string, favorite: boolean) => {\n const element = items.find(item => item.phoneNumber === phoneNumber);\n element!.favorite = !favorite;\n setItems([...items]);\n }}\n onCall={phoneNumber => action('onCall')(phoneNumber)}\n />\n );\n};\n"]}
|