@pega/cosmos-react-demos 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +185 -0
- package/lib/build/AppHeader/AppHeader.stories.d.ts +8 -0
- package/lib/build/AppHeader/AppHeader.stories.d.ts.map +1 -0
- package/lib/build/AppHeader/AppHeader.stories.jsx +65 -0
- package/lib/build/AppHeader/AppHeader.stories.jsx.map +1 -0
- package/lib/build/AppShell/AppShell.mocks.d.ts +50 -0
- package/lib/build/AppShell/AppShell.mocks.d.ts.map +1 -0
- package/lib/build/AppShell/AppShell.mocks.js +503 -0
- package/lib/build/AppShell/AppShell.mocks.js.map +1 -0
- package/lib/build/AppShell/AppShell.stories.d.ts +12 -0
- package/lib/build/AppShell/AppShell.stories.d.ts.map +1 -0
- package/lib/build/AppShell/AppShell.stories.jsx +194 -0
- package/lib/build/AppShell/AppShell.stories.jsx.map +1 -0
- package/lib/build/FlowModeller/AddNodeUtils.mocks.d.ts +45 -0
- package/lib/build/FlowModeller/AddNodeUtils.mocks.d.ts.map +1 -0
- package/lib/build/FlowModeller/AddNodeUtils.mocks.js +291 -0
- package/lib/build/FlowModeller/AddNodeUtils.mocks.js.map +1 -0
- package/lib/build/FlowModeller/FlowModeller.mocks.d.ts +9 -0
- package/lib/build/FlowModeller/FlowModeller.mocks.d.ts.map +1 -0
- package/lib/build/FlowModeller/FlowModeller.mocks.js +411 -0
- package/lib/build/FlowModeller/FlowModeller.mocks.js.map +1 -0
- package/lib/build/FlowModeller/FlowModeller.stories.d.ts +12 -0
- package/lib/build/FlowModeller/FlowModeller.stories.d.ts.map +1 -0
- package/lib/build/FlowModeller/FlowModeller.stories.jsx +214 -0
- package/lib/build/FlowModeller/FlowModeller.stories.jsx.map +1 -0
- package/lib/build/LifeCycle/LifeCycle.mocks.d.ts +201 -0
- package/lib/build/LifeCycle/LifeCycle.mocks.d.ts.map +1 -0
- package/lib/build/LifeCycle/LifeCycle.mocks.js +1128 -0
- package/lib/build/LifeCycle/LifeCycle.mocks.js.map +1 -0
- package/lib/build/LifeCycle/LifeCycle.stories.d.ts +11 -0
- package/lib/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -0
- package/lib/build/LifeCycle/LifeCycle.stories.jsx +491 -0
- package/lib/build/LifeCycle/LifeCycle.stories.jsx.map +1 -0
- package/lib/build/LifeCycle/utils.d.ts +65 -0
- package/lib/build/LifeCycle/utils.d.ts.map +1 -0
- package/lib/build/LifeCycle/utils.js +218 -0
- package/lib/build/LifeCycle/utils.js.map +1 -0
- package/lib/build/PageTemplates/GalleryPage.stories.d.ts +12 -0
- package/lib/build/PageTemplates/GalleryPage.stories.d.ts.map +1 -0
- package/lib/build/PageTemplates/GalleryPage.stories.jsx +126 -0
- package/lib/build/PageTemplates/GalleryPage.stories.jsx.map +1 -0
- package/lib/build/PageTemplates/PageTemplates.stories.d.ts +26 -0
- package/lib/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -0
- package/lib/build/PageTemplates/PageTemplates.stories.jsx +434 -0
- package/lib/build/PageTemplates/PageTemplates.stories.jsx.map +1 -0
- package/lib/build/Workbench/Workbench.mocks.d.ts +9 -0
- package/lib/build/Workbench/Workbench.mocks.d.ts.map +1 -0
- package/lib/build/Workbench/Workbench.mocks.js +67 -0
- package/lib/build/Workbench/Workbench.mocks.js.map +1 -0
- package/lib/build/Workbench/Workbench.stories.d.ts +10 -0
- package/lib/build/Workbench/Workbench.stories.d.ts.map +1 -0
- package/lib/build/Workbench/Workbench.stories.jsx +124 -0
- package/lib/build/Workbench/Workbench.stories.jsx.map +1 -0
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts +10 -0
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts.map +1 -0
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.jsx +263 -0
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.jsx.map +1 -0
- package/lib/condition-builder/ConditionBuilder/props.mock.d.ts +6 -0
- package/lib/condition-builder/ConditionBuilder/props.mock.d.ts.map +1 -0
- package/lib/condition-builder/ConditionBuilder/props.mock.js +113 -0
- package/lib/condition-builder/ConditionBuilder/props.mock.js.map +1 -0
- package/lib/core/AppShell/AppShell.mocks.d.ts +15 -0
- package/lib/core/AppShell/AppShell.mocks.d.ts.map +1 -0
- package/lib/core/AppShell/AppShell.mocks.jsx +147 -0
- package/lib/core/AppShell/AppShell.mocks.jsx.map +1 -0
- package/lib/core/AppShell/AppShell.stories.d.ts +31 -0
- package/lib/core/AppShell/AppShell.stories.d.ts.map +1 -0
- package/lib/core/AppShell/AppShell.stories.jsx +222 -0
- package/lib/core/AppShell/AppShell.stories.jsx.map +1 -0
- package/lib/core/AppShell/AppShell.styles.d.ts +2 -0
- package/lib/core/AppShell/AppShell.styles.d.ts.map +1 -0
- package/lib/core/AppShell/AppShell.styles.js +5 -0
- package/lib/core/AppShell/AppShell.styles.js.map +1 -0
- package/lib/core/Avatar/Avatar.stories.d.ts +10 -0
- package/lib/core/Avatar/Avatar.stories.d.ts.map +1 -0
- package/lib/core/Avatar/Avatar.stories.jsx +50 -0
- package/lib/core/Avatar/Avatar.stories.jsx.map +1 -0
- package/lib/core/Backdrop/Backdrop.stories.d.ts +7 -0
- package/lib/core/Backdrop/Backdrop.stories.d.ts.map +1 -0
- package/lib/core/Backdrop/Backdrop.stories.jsx +43 -0
- package/lib/core/Backdrop/Backdrop.stories.jsx.map +1 -0
- package/lib/core/Badges/Alert.stories.d.ts +6 -0
- package/lib/core/Badges/Alert.stories.d.ts.map +1 -0
- package/lib/core/Badges/Alert.stories.jsx +15 -0
- package/lib/core/Badges/Alert.stories.jsx.map +1 -0
- package/lib/core/Badges/Count.stories.d.ts +6 -0
- package/lib/core/Badges/Count.stories.d.ts.map +1 -0
- package/lib/core/Badges/Count.stories.jsx +20 -0
- package/lib/core/Badges/Count.stories.jsx.map +1 -0
- package/lib/core/Badges/Selection.stories.d.ts +6 -0
- package/lib/core/Badges/Selection.stories.d.ts.map +1 -0
- package/lib/core/Badges/Selection.stories.jsx +9 -0
- package/lib/core/Badges/Selection.stories.jsx.map +1 -0
- package/lib/core/Badges/Status.stories.d.ts +6 -0
- package/lib/core/Badges/Status.stories.d.ts.map +1 -0
- package/lib/core/Badges/Status.stories.jsx +18 -0
- package/lib/core/Badges/Status.stories.jsx.map +1 -0
- package/lib/core/Badges/Tag.stories.d.ts +6 -0
- package/lib/core/Badges/Tag.stories.d.ts.map +1 -0
- package/lib/core/Badges/Tag.stories.jsx +9 -0
- package/lib/core/Badges/Tag.stories.jsx.map +1 -0
- package/lib/core/Banner/Banner.stories.d.ts +22 -0
- package/lib/core/Banner/Banner.stories.d.ts.map +1 -0
- package/lib/core/Banner/Banner.stories.jsx +125 -0
- package/lib/core/Banner/Banner.stories.jsx.map +1 -0
- package/lib/core/Boolean/BooleanDisplay.stories.d.ts +6 -0
- package/lib/core/Boolean/BooleanDisplay.stories.d.ts.map +1 -0
- package/lib/core/Boolean/BooleanDisplay.stories.jsx +19 -0
- package/lib/core/Boolean/BooleanDisplay.stories.jsx.map +1 -0
- package/lib/core/Breadcrumbs/Breadcrumbs.stories.d.ts +7 -0
- package/lib/core/Breadcrumbs/Breadcrumbs.stories.d.ts.map +1 -0
- package/lib/core/Breadcrumbs/Breadcrumbs.stories.jsx +29 -0
- package/lib/core/Breadcrumbs/Breadcrumbs.stories.jsx.map +1 -0
- package/lib/core/Breadcrumbs/Breadcrumbs.styles.d.ts +2 -0
- package/lib/core/Breadcrumbs/Breadcrumbs.styles.d.ts.map +1 -0
- package/lib/core/Breadcrumbs/Breadcrumbs.styles.js +12 -0
- package/lib/core/Breadcrumbs/Breadcrumbs.styles.js.map +1 -0
- package/lib/core/Button/Button.stories.d.ts +12 -0
- package/lib/core/Button/Button.stories.d.ts.map +1 -0
- package/lib/core/Button/Button.stories.jsx +103 -0
- package/lib/core/Button/Button.stories.jsx.map +1 -0
- package/lib/core/Card/Card.stories.d.ts +8 -0
- package/lib/core/Card/Card.stories.d.ts.map +1 -0
- package/lib/core/Card/Card.stories.jsx +55 -0
- package/lib/core/Card/Card.stories.jsx.map +1 -0
- package/lib/core/Card/Card.styles.d.ts +2 -0
- package/lib/core/Card/Card.styles.d.ts.map +1 -0
- package/lib/core/Card/Card.styles.js +5 -0
- package/lib/core/Card/Card.styles.js.map +1 -0
- package/lib/core/Checkbox/Checkbox.stories.d.ts +7 -0
- package/lib/core/Checkbox/Checkbox.stories.d.ts.map +1 -0
- package/lib/core/Checkbox/Checkbox.stories.jsx +28 -0
- package/lib/core/Checkbox/Checkbox.stories.jsx.map +1 -0
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.d.ts +7 -0
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.d.ts.map +1 -0
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.jsx +60 -0
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.jsx.map +1 -0
- package/lib/core/CheckboxGroup/CheckboxGroup.styles.d.ts +4 -0
- package/lib/core/CheckboxGroup/CheckboxGroup.styles.d.ts.map +1 -0
- package/lib/core/CheckboxGroup/CheckboxGroup.styles.js +9 -0
- package/lib/core/CheckboxGroup/CheckboxGroup.styles.js.map +1 -0
- package/lib/core/ColorPicker/ColorPicker.stories.d.ts +8 -0
- package/lib/core/ColorPicker/ColorPicker.stories.d.ts.map +1 -0
- package/lib/core/ColorPicker/ColorPicker.stories.jsx +91 -0
- package/lib/core/ColorPicker/ColorPicker.stories.jsx.map +1 -0
- package/lib/core/ComboBox/ComboBox.mocks.d.ts +24 -0
- package/lib/core/ComboBox/ComboBox.mocks.d.ts.map +1 -0
- package/lib/core/ComboBox/ComboBox.mocks.js +54 -0
- package/lib/core/ComboBox/ComboBox.mocks.js.map +1 -0
- package/lib/core/ComboBox/ComboBox.stories.d.ts +21 -0
- package/lib/core/ComboBox/ComboBox.stories.d.ts.map +1 -0
- package/lib/core/ComboBox/ComboBox.stories.jsx +323 -0
- package/lib/core/ComboBox/ComboBox.stories.jsx.map +1 -0
- package/lib/core/Configuration/Configuration.stories.d.ts +10 -0
- package/lib/core/Configuration/Configuration.stories.d.ts.map +1 -0
- package/lib/core/Configuration/Configuration.stories.jsx +125 -0
- package/lib/core/Configuration/Configuration.stories.jsx.map +1 -0
- package/lib/core/Currency/Currency.stories.d.ts +11 -0
- package/lib/core/Currency/Currency.stories.d.ts.map +1 -0
- package/lib/core/Currency/Currency.stories.jsx +65 -0
- package/lib/core/Currency/Currency.stories.jsx.map +1 -0
- package/lib/core/DateTime/DateTime.stories.d.ts +20 -0
- package/lib/core/DateTime/DateTime.stories.d.ts.map +1 -0
- package/lib/core/DateTime/DateTime.stories.jsx +127 -0
- package/lib/core/DateTime/DateTime.stories.jsx.map +1 -0
- package/lib/core/DateTime/DateTimeDisplay.stories.d.ts +7 -0
- package/lib/core/DateTime/DateTimeDisplay.stories.d.ts.map +1 -0
- package/lib/core/DateTime/DateTimeDisplay.stories.jsx +46 -0
- package/lib/core/DateTime/DateTimeDisplay.stories.jsx.map +1 -0
- package/lib/core/DateTime/DateTimePicker.stories.d.ts +7 -0
- package/lib/core/DateTime/DateTimePicker.stories.d.ts.map +1 -0
- package/lib/core/DateTime/DateTimePicker.stories.jsx +34 -0
- package/lib/core/DateTime/DateTimePicker.stories.jsx.map +1 -0
- package/lib/core/Drawer/Drawer.stories.d.ts +7 -0
- package/lib/core/Drawer/Drawer.stories.d.ts.map +1 -0
- package/lib/core/Drawer/Drawer.stories.jsx +98 -0
- package/lib/core/Drawer/Drawer.stories.jsx.map +1 -0
- package/lib/core/Drawer/Drawer.styles.d.ts +2 -0
- package/lib/core/Drawer/Drawer.styles.d.ts.map +1 -0
- package/lib/core/Drawer/Drawer.styles.js +11 -0
- package/lib/core/Drawer/Drawer.styles.js.map +1 -0
- package/lib/core/Email/EmailDisplay.stories.d.ts +6 -0
- package/lib/core/Email/EmailDisplay.stories.d.ts.map +1 -0
- package/lib/core/Email/EmailDisplay.stories.jsx +19 -0
- package/lib/core/Email/EmailDisplay.stories.jsx.map +1 -0
- package/lib/core/EmojiPicker/EmojiPicker.stories.d.ts +8 -0
- package/lib/core/EmojiPicker/EmojiPicker.stories.d.ts.map +1 -0
- package/lib/core/EmojiPicker/EmojiPicker.stories.jsx +52 -0
- package/lib/core/EmojiPicker/EmojiPicker.stories.jsx.map +1 -0
- package/lib/core/EmptyState/EmptyState.stories.d.ts +6 -0
- package/lib/core/EmptyState/EmptyState.stories.d.ts.map +1 -0
- package/lib/core/EmptyState/EmptyState.stories.jsx +18 -0
- package/lib/core/EmptyState/EmptyState.stories.jsx.map +1 -0
- package/lib/core/ErrorState/ErrorState.stories.d.ts +9 -0
- package/lib/core/ErrorState/ErrorState.stories.d.ts.map +1 -0
- package/lib/core/ErrorState/ErrorState.stories.jsx +20 -0
- package/lib/core/ErrorState/ErrorState.stories.jsx.map +1 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.stories.d.ts +7 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.stories.d.ts.map +1 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.stories.jsx +73 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.stories.jsx.map +1 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.styles.d.ts +4 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.styles.d.ts.map +1 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.styles.js +12 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.styles.js.map +1 -0
- package/lib/core/FieldGroup/FieldGroup.stories.d.ts +11 -0
- package/lib/core/FieldGroup/FieldGroup.stories.d.ts.map +1 -0
- package/lib/core/FieldGroup/FieldGroup.stories.jsx +52 -0
- package/lib/core/FieldGroup/FieldGroup.stories.jsx.map +1 -0
- package/lib/core/FieldGroup/FieldGroupList.stories.d.ts +10 -0
- package/lib/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -0
- package/lib/core/FieldGroup/FieldGroupList.stories.jsx +183 -0
- package/lib/core/FieldGroup/FieldGroupList.stories.jsx.map +1 -0
- package/lib/core/FieldValueList/FieldValueList.stories.d.ts +10 -0
- package/lib/core/FieldValueList/FieldValueList.stories.d.ts.map +1 -0
- package/lib/core/FieldValueList/FieldValueList.stories.jsx +54 -0
- package/lib/core/FieldValueList/FieldValueList.stories.jsx.map +1 -0
- package/lib/core/File/FileDisplay.stories.d.ts +13 -0
- package/lib/core/File/FileDisplay.stories.d.ts.map +1 -0
- package/lib/core/File/FileDisplay.stories.jsx +100 -0
- package/lib/core/File/FileDisplay.stories.jsx.map +1 -0
- package/lib/core/File/FileInput.stories.d.ts +9 -0
- package/lib/core/File/FileInput.stories.d.ts.map +1 -0
- package/lib/core/File/FileInput.stories.jsx +76 -0
- package/lib/core/File/FileInput.stories.jsx.map +1 -0
- package/lib/core/Flex/Flex.styles.d.ts +10 -0
- package/lib/core/Flex/Flex.styles.d.ts.map +1 -0
- package/lib/core/Flex/Flex.styles.js +41 -0
- package/lib/core/Flex/Flex.styles.js.map +1 -0
- package/lib/core/Flex/FlexContainer.stories.d.ts +20 -0
- package/lib/core/Flex/FlexContainer.stories.d.ts.map +1 -0
- package/lib/core/Flex/FlexContainer.stories.jsx +151 -0
- package/lib/core/Flex/FlexContainer.stories.jsx.map +1 -0
- package/lib/core/Flex/FlexItem.stories.d.ts +13 -0
- package/lib/core/Flex/FlexItem.stories.d.ts.map +1 -0
- package/lib/core/Flex/FlexItem.stories.jsx +71 -0
- package/lib/core/Flex/FlexItem.stories.jsx.map +1 -0
- package/lib/core/Form/Form.stories.d.ts +21 -0
- package/lib/core/Form/Form.stories.d.ts.map +1 -0
- package/lib/core/Form/Form.stories.jsx +196 -0
- package/lib/core/Form/Form.stories.jsx.map +1 -0
- package/lib/core/Grid/Grid.styles.d.ts +6 -0
- package/lib/core/Grid/Grid.styles.d.ts.map +1 -0
- package/lib/core/Grid/Grid.styles.js +36 -0
- package/lib/core/Grid/Grid.styles.js.map +1 -0
- package/lib/core/Grid/GridContainer.stories.d.ts +23 -0
- package/lib/core/Grid/GridContainer.stories.d.ts.map +1 -0
- package/lib/core/Grid/GridContainer.stories.jsx +161 -0
- package/lib/core/Grid/GridContainer.stories.jsx.map +1 -0
- package/lib/core/Grid/GridItem.stories.d.ts +13 -0
- package/lib/core/Grid/GridItem.stories.d.ts.map +1 -0
- package/lib/core/Grid/GridItem.stories.jsx +74 -0
- package/lib/core/Grid/GridItem.stories.jsx.map +1 -0
- package/lib/core/Icon/Icon.stories.d.ts +8 -0
- package/lib/core/Icon/Icon.stories.d.ts.map +1 -0
- package/lib/core/Icon/Icon.stories.jsx +84 -0
- package/lib/core/Icon/Icon.stories.jsx.map +1 -0
- package/lib/core/IconPicker/IconPicker.stories.d.ts +6 -0
- package/lib/core/IconPicker/IconPicker.stories.d.ts.map +1 -0
- package/lib/core/IconPicker/IconPicker.stories.jsx +39 -0
- package/lib/core/IconPicker/IconPicker.stories.jsx.map +1 -0
- package/lib/core/Image/Image.stories.d.ts +6 -0
- package/lib/core/Image/Image.stories.d.ts.map +1 -0
- package/lib/core/Image/Image.stories.jsx +9 -0
- package/lib/core/Image/Image.stories.jsx.map +1 -0
- package/lib/core/Input/Input.stories.d.ts +9 -0
- package/lib/core/Input/Input.stories.d.ts.map +1 -0
- package/lib/core/Input/Input.stories.jsx +44 -0
- package/lib/core/Input/Input.stories.jsx.map +1 -0
- package/lib/core/Label/Label.stories.d.ts +6 -0
- package/lib/core/Label/Label.stories.d.ts.map +1 -0
- package/lib/core/Label/Label.stories.jsx +15 -0
- package/lib/core/Label/Label.stories.jsx.map +1 -0
- package/lib/core/Lightbox/Lightbox.stories.d.ts +9 -0
- package/lib/core/Lightbox/Lightbox.stories.d.ts.map +1 -0
- package/lib/core/Lightbox/Lightbox.stories.jsx +106 -0
- package/lib/core/Lightbox/Lightbox.stories.jsx.map +1 -0
- package/lib/core/Link/Link.stories.d.ts +8 -0
- package/lib/core/Link/Link.stories.d.ts.map +1 -0
- package/lib/core/Link/Link.stories.jsx +32 -0
- package/lib/core/Link/Link.stories.jsx.map +1 -0
- package/lib/core/List/CommaSeparatedList.stories.d.ts +6 -0
- package/lib/core/List/CommaSeparatedList.stories.d.ts.map +1 -0
- package/lib/core/List/CommaSeparatedList.stories.jsx +33 -0
- package/lib/core/List/CommaSeparatedList.stories.jsx.map +1 -0
- package/lib/core/List/OrderedList.stories.d.ts +10 -0
- package/lib/core/List/OrderedList.stories.d.ts.map +1 -0
- package/lib/core/List/OrderedList.stories.jsx +38 -0
- package/lib/core/List/OrderedList.stories.jsx.map +1 -0
- package/lib/core/List/UnorderedList.stories.d.ts +10 -0
- package/lib/core/List/UnorderedList.stories.d.ts.map +1 -0
- package/lib/core/List/UnorderedList.stories.jsx +38 -0
- package/lib/core/List/UnorderedList.stories.jsx.map +1 -0
- package/lib/core/Location/Location.stories.d.ts +12 -0
- package/lib/core/Location/Location.stories.d.ts.map +1 -0
- package/lib/core/Location/Location.stories.jsx +130 -0
- package/lib/core/Location/Location.stories.jsx.map +1 -0
- package/lib/core/Menu/Menu.mocks.d.ts +4 -0
- package/lib/core/Menu/Menu.mocks.d.ts.map +1 -0
- package/lib/core/Menu/Menu.mocks.js +179 -0
- package/lib/core/Menu/Menu.mocks.js.map +1 -0
- package/lib/core/Menu/Menu.stories.d.ts +17 -0
- package/lib/core/Menu/Menu.stories.d.ts.map +1 -0
- package/lib/core/Menu/Menu.stories.jsx +166 -0
- package/lib/core/Menu/Menu.stories.jsx.map +1 -0
- package/lib/core/Menu/Menu.styles.d.ts +2 -0
- package/lib/core/Menu/Menu.styles.d.ts.map +1 -0
- package/lib/core/Menu/Menu.styles.js +6 -0
- package/lib/core/Menu/Menu.styles.js.map +1 -0
- package/lib/core/MenuButton/MenuButton.stories.d.ts +15 -0
- package/lib/core/MenuButton/MenuButton.stories.d.ts.map +1 -0
- package/lib/core/MenuButton/MenuButton.stories.jsx +188 -0
- package/lib/core/MenuButton/MenuButton.stories.jsx.map +1 -0
- package/lib/core/MetaList/MetaList.stories.d.ts +9 -0
- package/lib/core/MetaList/MetaList.stories.d.ts.map +1 -0
- package/lib/core/MetaList/MetaList.stories.jsx +24 -0
- package/lib/core/MetaList/MetaList.stories.jsx.map +1 -0
- package/lib/core/Modal/Modal.mocks.d.ts +4 -0
- package/lib/core/Modal/Modal.mocks.d.ts.map +1 -0
- package/lib/core/Modal/Modal.mocks.jsx +44 -0
- package/lib/core/Modal/Modal.mocks.jsx.map +1 -0
- package/lib/core/Modal/Modal.stories.d.ts +20 -0
- package/lib/core/Modal/Modal.stories.d.ts.map +1 -0
- package/lib/core/Modal/Modal.stories.jsx +305 -0
- package/lib/core/Modal/Modal.stories.jsx.map +1 -0
- package/lib/core/MultiStep/MultiStep.stories.d.ts +6 -0
- package/lib/core/MultiStep/MultiStep.stories.d.ts.map +1 -0
- package/lib/core/MultiStep/MultiStep.stories.jsx +56 -0
- package/lib/core/MultiStep/MultiStep.stories.jsx.map +1 -0
- package/lib/core/Number/Number.stories.d.ts +13 -0
- package/lib/core/Number/Number.stories.d.ts.map +1 -0
- package/lib/core/Number/Number.stories.jsx +110 -0
- package/lib/core/Number/Number.stories.jsx.map +1 -0
- package/lib/core/PageTemplates/PageTemplates.mocks.d.ts +3 -0
- package/lib/core/PageTemplates/PageTemplates.mocks.d.ts.map +1 -0
- package/lib/core/PageTemplates/PageTemplates.mocks.js +10 -0
- package/lib/core/PageTemplates/PageTemplates.mocks.js.map +1 -0
- package/lib/core/PageTemplates/PageTemplates.stories.d.ts +28 -0
- package/lib/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -0
- package/lib/core/PageTemplates/PageTemplates.stories.jsx +233 -0
- package/lib/core/PageTemplates/PageTemplates.stories.jsx.map +1 -0
- package/lib/core/PageTemplates/PageTemplates.styles.d.ts +4 -0
- package/lib/core/PageTemplates/PageTemplates.styles.d.ts.map +1 -0
- package/lib/core/PageTemplates/PageTemplates.styles.js +31 -0
- package/lib/core/PageTemplates/PageTemplates.styles.js.map +1 -0
- package/lib/core/Pagination/Pagination.stories.d.ts +6 -0
- package/lib/core/Pagination/Pagination.stories.d.ts.map +1 -0
- package/lib/core/Pagination/Pagination.stories.jsx +19 -0
- package/lib/core/Pagination/Pagination.stories.jsx.map +1 -0
- package/lib/core/Paragraph/ParagraphDisplay.stories.d.ts +6 -0
- package/lib/core/Paragraph/ParagraphDisplay.stories.d.ts.map +1 -0
- package/lib/core/Paragraph/ParagraphDisplay.stories.jsx +12 -0
- package/lib/core/Paragraph/ParagraphDisplay.stories.jsx.map +1 -0
- package/lib/core/Phone/Phone.stories.d.ts +7 -0
- package/lib/core/Phone/Phone.stories.d.ts.map +1 -0
- package/lib/core/Phone/Phone.stories.jsx +42 -0
- package/lib/core/Phone/Phone.stories.jsx.map +1 -0
- package/lib/core/Popover/Popover.stories.d.ts +8 -0
- package/lib/core/Popover/Popover.stories.d.ts.map +1 -0
- package/lib/core/Popover/Popover.stories.jsx +184 -0
- package/lib/core/Popover/Popover.stories.jsx.map +1 -0
- package/lib/core/Progress/Progress.stories.d.ts +7 -0
- package/lib/core/Progress/Progress.stories.d.ts.map +1 -0
- package/lib/core/Progress/Progress.stories.jsx +71 -0
- package/lib/core/Progress/Progress.stories.jsx.map +1 -0
- package/lib/core/Progress/Progress.styles.d.ts +2 -0
- package/lib/core/Progress/Progress.styles.d.ts.map +1 -0
- package/lib/core/Progress/Progress.styles.js +13 -0
- package/lib/core/Progress/Progress.styles.js.map +1 -0
- package/lib/core/RadioButton/RadioButton.stories.d.ts +7 -0
- package/lib/core/RadioButton/RadioButton.stories.d.ts.map +1 -0
- package/lib/core/RadioButton/RadioButton.stories.jsx +26 -0
- package/lib/core/RadioButton/RadioButton.stories.jsx.map +1 -0
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.d.ts +7 -0
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.d.ts.map +1 -0
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.jsx +62 -0
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.jsx.map +1 -0
- package/lib/core/RadioButtonGroup/RadioButtonGroup.styles.d.ts +4 -0
- package/lib/core/RadioButtonGroup/RadioButtonGroup.styles.d.ts.map +1 -0
- package/lib/core/RadioButtonGroup/RadioButtonGroup.styles.js +9 -0
- package/lib/core/RadioButtonGroup/RadioButtonGroup.styles.js.map +1 -0
- package/lib/core/Rating/Rating.stories.d.ts +6 -0
- package/lib/core/Rating/Rating.stories.d.ts.map +1 -0
- package/lib/core/Rating/Rating.stories.jsx +21 -0
- package/lib/core/Rating/Rating.stories.jsx.map +1 -0
- package/lib/core/SearchInput/SearchInput.stories.d.ts +6 -0
- package/lib/core/SearchInput/SearchInput.stories.d.ts.map +1 -0
- package/lib/core/SearchInput/SearchInput.stories.jsx +15 -0
- package/lib/core/SearchInput/SearchInput.stories.jsx.map +1 -0
- package/lib/core/Select/Select.stories.d.ts +9 -0
- package/lib/core/Select/Select.stories.d.ts.map +1 -0
- package/lib/core/Select/Select.stories.jsx +42 -0
- package/lib/core/Select/Select.stories.jsx.map +1 -0
- package/lib/core/Sentiment/Sentiment.stories.d.ts +14 -0
- package/lib/core/Sentiment/Sentiment.stories.d.ts.map +1 -0
- package/lib/core/Sentiment/Sentiment.stories.jsx +39 -0
- package/lib/core/Sentiment/Sentiment.stories.jsx.map +1 -0
- package/lib/core/Slider/Slider.stories.d.ts +11 -0
- package/lib/core/Slider/Slider.stories.d.ts.map +1 -0
- package/lib/core/Slider/Slider.stories.jsx +58 -0
- package/lib/core/Slider/Slider.stories.jsx.map +1 -0
- package/lib/core/SummaryItem/SummaryItem.stories.d.ts +11 -0
- package/lib/core/SummaryItem/SummaryItem.stories.d.ts.map +1 -0
- package/lib/core/SummaryItem/SummaryItem.stories.jsx +36 -0
- package/lib/core/SummaryItem/SummaryItem.stories.jsx.map +1 -0
- package/lib/core/SummaryList/SummaryList.mocks.d.ts +32 -0
- package/lib/core/SummaryList/SummaryList.mocks.d.ts.map +1 -0
- package/lib/core/SummaryList/SummaryList.mocks.jsx +35 -0
- package/lib/core/SummaryList/SummaryList.mocks.jsx.map +1 -0
- package/lib/core/SummaryList/SummaryList.stories.d.ts +13 -0
- package/lib/core/SummaryList/SummaryList.stories.d.ts.map +1 -0
- package/lib/core/SummaryList/SummaryList.stories.jsx +131 -0
- package/lib/core/SummaryList/SummaryList.stories.jsx.map +1 -0
- package/lib/core/Switch/Switch.stories.d.ts +7 -0
- package/lib/core/Switch/Switch.stories.d.ts.map +1 -0
- package/lib/core/Switch/Switch.stories.jsx +26 -0
- package/lib/core/Switch/Switch.stories.jsx.map +1 -0
- package/lib/core/Switch/Switch.styles.d.ts +2 -0
- package/lib/core/Switch/Switch.styles.d.ts.map +1 -0
- package/lib/core/Switch/Switch.styles.js +13 -0
- package/lib/core/Switch/Switch.styles.js.map +1 -0
- package/lib/core/Table/Table.mocks.d.ts +19 -0
- package/lib/core/Table/Table.mocks.d.ts.map +1 -0
- package/lib/core/Table/Table.mocks.jsx +32 -0
- package/lib/core/Table/Table.mocks.jsx.map +1 -0
- package/lib/core/Table/Table.stories.d.ts +14 -0
- package/lib/core/Table/Table.stories.d.ts.map +1 -0
- package/lib/core/Table/Table.stories.jsx +58 -0
- package/lib/core/Table/Table.stories.jsx.map +1 -0
- package/lib/core/Table/Table.styles.d.ts +4 -0
- package/lib/core/Table/Table.styles.d.ts.map +1 -0
- package/lib/core/Table/Table.styles.js +9 -0
- package/lib/core/Table/Table.styles.js.map +1 -0
- package/lib/core/Tabs/Tabs.stories.d.ts +7 -0
- package/lib/core/Tabs/Tabs.stories.d.ts.map +1 -0
- package/lib/core/Tabs/Tabs.stories.jsx +59 -0
- package/lib/core/Tabs/Tabs.stories.jsx.map +1 -0
- package/lib/core/Text/Text.stories.d.ts +6 -0
- package/lib/core/Text/Text.stories.d.ts.map +1 -0
- package/lib/core/Text/Text.stories.jsx +22 -0
- package/lib/core/Text/Text.stories.jsx.map +1 -0
- package/lib/core/TextArea/TextArea.stories.d.ts +6 -0
- package/lib/core/TextArea/TextArea.stories.d.ts.map +1 -0
- package/lib/core/TextArea/TextArea.stories.jsx +43 -0
- package/lib/core/TextArea/TextArea.stories.jsx.map +1 -0
- package/lib/core/Toaster/Toaster.stories.d.ts +6 -0
- package/lib/core/Toaster/Toaster.stories.d.ts.map +1 -0
- package/lib/core/Toaster/Toaster.stories.jsx +17 -0
- package/lib/core/Toaster/Toaster.stories.jsx.map +1 -0
- package/lib/core/Tooltip/Tooltip.stories.d.ts +8 -0
- package/lib/core/Tooltip/Tooltip.stories.d.ts.map +1 -0
- package/lib/core/Tooltip/Tooltip.stories.jsx +18 -0
- package/lib/core/Tooltip/Tooltip.stories.jsx.map +1 -0
- package/lib/core/Tree/Tree.mocks.d.ts +2 -0
- package/lib/core/Tree/Tree.mocks.d.ts.map +1 -0
- package/lib/core/Tree/Tree.mocks.js +20 -0
- package/lib/core/Tree/Tree.mocks.js.map +1 -0
- package/lib/core/Tree/Tree.stories.d.ts +8 -0
- package/lib/core/Tree/Tree.stories.d.ts.map +1 -0
- package/lib/core/Tree/Tree.stories.jsx +89 -0
- package/lib/core/Tree/Tree.stories.jsx.map +1 -0
- package/lib/core/Tree/Tree.styles.d.ts +3 -0
- package/lib/core/Tree/Tree.styles.d.ts.map +1 -0
- package/lib/core/Tree/Tree.styles.js +10 -0
- package/lib/core/Tree/Tree.styles.js.map +1 -0
- package/lib/core/URL/URL.stories.d.ts +6 -0
- package/lib/core/URL/URL.stories.d.ts.map +1 -0
- package/lib/core/URL/URL.stories.jsx +17 -0
- package/lib/core/URL/URL.stories.jsx.map +1 -0
- package/lib/cs/Article/Article.mocks.d.ts +14 -0
- package/lib/cs/Article/Article.mocks.d.ts.map +1 -0
- package/lib/cs/Article/Article.mocks.js +14 -0
- package/lib/cs/Article/Article.mocks.js.map +1 -0
- package/lib/cs/Article/Article.stories.d.ts +15 -0
- package/lib/cs/Article/Article.stories.d.ts.map +1 -0
- package/lib/cs/Article/Article.stories.jsx +126 -0
- package/lib/cs/Article/Article.stories.jsx.map +1 -0
- package/lib/cs/ArticleList/ArticleList.mocks.d.ts +21 -0
- package/lib/cs/ArticleList/ArticleList.mocks.d.ts.map +1 -0
- package/lib/cs/ArticleList/ArticleList.mocks.js +102 -0
- package/lib/cs/ArticleList/ArticleList.mocks.js.map +1 -0
- package/lib/cs/ArticleList/ArticleList.stories.d.ts +16 -0
- package/lib/cs/ArticleList/ArticleList.stories.d.ts.map +1 -0
- package/lib/cs/ArticleList/ArticleList.stories.jsx +110 -0
- package/lib/cs/ArticleList/ArticleList.stories.jsx.map +1 -0
- package/lib/cs/CSCaseView/CSAppShell.stories.d.ts +45 -0
- package/lib/cs/CSCaseView/CSAppShell.stories.d.ts.map +1 -0
- package/lib/cs/CSCaseView/CSAppShell.stories.jsx +275 -0
- package/lib/cs/CSCaseView/CSAppShell.stories.jsx.map +1 -0
- package/lib/cs/CSCaseView/CSCaseView.mocks.d.ts +57 -0
- package/lib/cs/CSCaseView/CSCaseView.mocks.d.ts.map +1 -0
- package/lib/cs/CSCaseView/CSCaseView.mocks.js +224 -0
- package/lib/cs/CSCaseView/CSCaseView.mocks.js.map +1 -0
- package/lib/cs/CallControlPanel/CallControlPanel.mocks.d.ts +16 -0
- package/lib/cs/CallControlPanel/CallControlPanel.mocks.d.ts.map +1 -0
- package/lib/cs/CallControlPanel/CallControlPanel.mocks.js +110 -0
- package/lib/cs/CallControlPanel/CallControlPanel.mocks.js.map +1 -0
- package/lib/cs/CallControlPanel/CallControlPanel.stories.d.ts +13 -0
- package/lib/cs/CallControlPanel/CallControlPanel.stories.d.ts.map +1 -0
- package/lib/cs/CallControlPanel/CallControlPanel.stories.jsx +188 -0
- package/lib/cs/CallControlPanel/CallControlPanel.stories.jsx.map +1 -0
- package/lib/cs/DialPad/DialPad.stories.d.ts +9 -0
- package/lib/cs/DialPad/DialPad.stories.d.ts.map +1 -0
- package/lib/cs/DialPad/DialPad.stories.jsx +18 -0
- package/lib/cs/DialPad/DialPad.stories.jsx.map +1 -0
- package/lib/cs/DialPad/DialPadKeyboardData.mock.d.ts +11 -0
- package/lib/cs/DialPad/DialPadKeyboardData.mock.d.ts.map +1 -0
- package/lib/cs/DialPad/DialPadKeyboardData.mock.js +20 -0
- package/lib/cs/DialPad/DialPadKeyboardData.mock.js.map +1 -0
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts +13 -0
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -0
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx +356 -0
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx.map +1 -0
- package/lib/cs/InteractionNotification/InteractionNotification.stories.d.ts +8 -0
- package/lib/cs/InteractionNotification/InteractionNotification.stories.d.ts.map +1 -0
- package/lib/cs/InteractionNotification/InteractionNotification.stories.jsx +32 -0
- package/lib/cs/InteractionNotification/InteractionNotification.stories.jsx.map +1 -0
- package/lib/cs/InteractionTimer/InteractionTimer.stories.d.ts +14 -0
- package/lib/cs/InteractionTimer/InteractionTimer.stories.d.ts.map +1 -0
- package/lib/cs/InteractionTimer/InteractionTimer.stories.jsx +85 -0
- package/lib/cs/InteractionTimer/InteractionTimer.stories.jsx.map +1 -0
- package/lib/cs/TaskManager/TaskManager.mocks.d.ts +13 -0
- package/lib/cs/TaskManager/TaskManager.mocks.d.ts.map +1 -0
- package/lib/cs/TaskManager/TaskManager.mocks.js +140 -0
- package/lib/cs/TaskManager/TaskManager.mocks.js.map +1 -0
- package/lib/cs/TaskManager/TaskManager.stories.d.ts +8 -0
- package/lib/cs/TaskManager/TaskManager.stories.d.ts.map +1 -0
- package/lib/cs/TaskManager/TaskManager.stories.jsx +314 -0
- package/lib/cs/TaskManager/TaskManager.stories.jsx.map +1 -0
- package/lib/dnd/DragDropList/DragDropList.stories.d.ts +11 -0
- package/lib/dnd/DragDropList/DragDropList.stories.d.ts.map +1 -0
- package/lib/dnd/DragDropList/DragDropList.stories.jsx +119 -0
- package/lib/dnd/DragDropList/DragDropList.stories.jsx.map +1 -0
- package/lib/rte/RichTextEditor/RichTextEditor.mocks.d.ts +3 -0
- package/lib/rte/RichTextEditor/RichTextEditor.mocks.d.ts.map +1 -0
- package/lib/rte/RichTextEditor/RichTextEditor.mocks.jsx +34 -0
- package/lib/rte/RichTextEditor/RichTextEditor.mocks.jsx.map +1 -0
- package/lib/rte/RichTextEditor/RichTextEditor.stories.d.ts +10 -0
- package/lib/rte/RichTextEditor/RichTextEditor.stories.d.ts.map +1 -0
- package/lib/rte/RichTextEditor/RichTextEditor.stories.jsx +145 -0
- package/lib/rte/RichTextEditor/RichTextEditor.stories.jsx.map +1 -0
- package/lib/rte/RichTextEditor/RichTextViewer.stories.d.ts +7 -0
- package/lib/rte/RichTextEditor/RichTextViewer.stories.d.ts.map +1 -0
- package/lib/rte/RichTextEditor/RichTextViewer.stories.jsx +62 -0
- package/lib/rte/RichTextEditor/RichTextViewer.stories.jsx.map +1 -0
- package/lib/social/Chat/Chat.mocks.d.ts +385 -0
- package/lib/social/Chat/Chat.mocks.d.ts.map +1 -0
- package/lib/social/Chat/Chat.mocks.js +648 -0
- package/lib/social/Chat/Chat.mocks.js.map +1 -0
- package/lib/social/Chat/Chat.stories.d.ts +25 -0
- package/lib/social/Chat/Chat.stories.d.ts.map +1 -0
- package/lib/social/Chat/Chat.stories.jsx +537 -0
- package/lib/social/Chat/Chat.stories.jsx.map +1 -0
- package/lib/social/Chat/RepeatingView.stories.d.ts +20 -0
- package/lib/social/Chat/RepeatingView.stories.d.ts.map +1 -0
- package/lib/social/Chat/RepeatingView.stories.jsx +90 -0
- package/lib/social/Chat/RepeatingView.stories.jsx.map +1 -0
- package/lib/social/Email/Email.mocks.d.ts +87 -0
- package/lib/social/Email/Email.mocks.d.ts.map +1 -0
- package/lib/social/Email/Email.mocks.jsx +349 -0
- package/lib/social/Email/Email.mocks.jsx.map +1 -0
- package/lib/social/Email/Email.stories.d.ts +28 -0
- package/lib/social/Email/Email.stories.d.ts.map +1 -0
- package/lib/social/Email/Email.stories.jsx +798 -0
- package/lib/social/Email/Email.stories.jsx.map +1 -0
- package/lib/social/Feed/Feed.mocks.d.ts +52 -0
- package/lib/social/Feed/Feed.mocks.d.ts.map +1 -0
- package/lib/social/Feed/Feed.mocks.jsx +315 -0
- package/lib/social/Feed/Feed.mocks.jsx.map +1 -0
- package/lib/social/Feed/Feed.stories.d.ts +15 -0
- package/lib/social/Feed/Feed.stories.d.ts.map +1 -0
- package/lib/social/Feed/Feed.stories.jsx +146 -0
- package/lib/social/Feed/Feed.stories.jsx.map +1 -0
- package/lib/social/Feed/FeedNewPost.stories.d.ts +17 -0
- package/lib/social/Feed/FeedNewPost.stories.d.ts.map +1 -0
- package/lib/social/Feed/FeedNewPost.stories.jsx +80 -0
- package/lib/social/Feed/FeedNewPost.stories.jsx.map +1 -0
- package/lib/social/Feed/FeedPost.stories.d.ts +9 -0
- package/lib/social/Feed/FeedPost.stories.d.ts.map +1 -0
- package/lib/social/Feed/FeedPost.stories.jsx +248 -0
- package/lib/social/Feed/FeedPost.stories.jsx.map +1 -0
- package/lib/social/Feed/FeedReply.stories.d.ts +16 -0
- package/lib/social/Feed/FeedReply.stories.d.ts.map +1 -0
- package/lib/social/Feed/FeedReply.stories.jsx +99 -0
- package/lib/social/Feed/FeedReply.stories.jsx.map +1 -0
- package/lib/social/Feed/FeedReplyInput.stories.d.ts +15 -0
- package/lib/social/Feed/FeedReplyInput.stories.d.ts.map +1 -0
- package/lib/social/Feed/FeedReplyInput.stories.jsx +59 -0
- package/lib/social/Feed/FeedReplyInput.stories.jsx.map +1 -0
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.d.ts +6 -0
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.d.ts.map +1 -0
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.jsx +30 -0
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.jsx.map +1 -0
- package/lib/work/CaseView/Attachments.mocks.d.ts +3 -0
- package/lib/work/CaseView/Attachments.mocks.d.ts.map +1 -0
- package/lib/work/CaseView/Attachments.mocks.jsx +388 -0
- package/lib/work/CaseView/Attachments.mocks.jsx.map +1 -0
- package/lib/work/CaseView/CaseView.mocks.d.ts +11 -0
- package/lib/work/CaseView/CaseView.mocks.d.ts.map +1 -0
- package/lib/work/CaseView/CaseView.mocks.jsx +126 -0
- package/lib/work/CaseView/CaseView.mocks.jsx.map +1 -0
- package/lib/work/CaseView/CaseView.stories.d.ts +34 -0
- package/lib/work/CaseView/CaseView.stories.d.ts.map +1 -0
- package/lib/work/CaseView/CaseView.stories.jsx +264 -0
- package/lib/work/CaseView/CaseView.stories.jsx.map +1 -0
- package/lib/work/CaseView/Details.mocks.d.ts +3 -0
- package/lib/work/CaseView/Details.mocks.d.ts.map +1 -0
- package/lib/work/CaseView/Details.mocks.jsx +21 -0
- package/lib/work/CaseView/Details.mocks.jsx.map +1 -0
- package/lib/work/CaseView/FileService.mock.d.ts +28 -0
- package/lib/work/CaseView/FileService.mock.d.ts.map +1 -0
- package/lib/work/CaseView/FileService.mock.jsx +139 -0
- package/lib/work/CaseView/FileService.mock.jsx.map +1 -0
- package/lib/work/CaseView/MobileCaseView.stories.d.ts +11 -0
- package/lib/work/CaseView/MobileCaseView.stories.d.ts.map +1 -0
- package/lib/work/CaseView/MobileCaseView.stories.jsx +27 -0
- package/lib/work/CaseView/MobileCaseView.stories.jsx.map +1 -0
- package/lib/work/CaseView/Pulse.mocks.d.ts +6 -0
- package/lib/work/CaseView/Pulse.mocks.d.ts.map +1 -0
- package/lib/work/CaseView/Pulse.mocks.jsx +35 -0
- package/lib/work/CaseView/Pulse.mocks.jsx.map +1 -0
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts +10 -0
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts.map +1 -0
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.jsx +195 -0
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.jsx.map +1 -0
- package/lib/work/Confirmation/Confirmation.stories.d.ts +9 -0
- package/lib/work/Confirmation/Confirmation.stories.d.ts.map +1 -0
- package/lib/work/Confirmation/Confirmation.stories.jsx +17 -0
- package/lib/work/Confirmation/Confirmation.stories.jsx.map +1 -0
- package/lib/work/Details/Details.stories.d.ts +5 -0
- package/lib/work/Details/Details.stories.d.ts.map +1 -0
- package/lib/work/Details/Details.stories.jsx +65 -0
- package/lib/work/Details/Details.stories.jsx.map +1 -0
- package/lib/work/Glimpse/Glimpse.stories.d.ts +10 -0
- package/lib/work/Glimpse/Glimpse.stories.d.ts.map +1 -0
- package/lib/work/Glimpse/Glimpse.stories.jsx +39 -0
- package/lib/work/Glimpse/Glimpse.stories.jsx.map +1 -0
- package/lib/work/SearchResults/SearchResults.mocks.d.ts +8 -0
- package/lib/work/SearchResults/SearchResults.mocks.d.ts.map +1 -0
- package/lib/work/SearchResults/SearchResults.mocks.jsx +96 -0
- package/lib/work/SearchResults/SearchResults.mocks.jsx.map +1 -0
- package/lib/work/SearchResults/SearchResults.stories.d.ts +8 -0
- package/lib/work/SearchResults/SearchResults.stories.d.ts.map +1 -0
- package/lib/work/SearchResults/SearchResults.stories.jsx +205 -0
- package/lib/work/SearchResults/SearchResults.stories.jsx.map +1 -0
- package/lib/work/Stages/Stages.stories.d.ts +11 -0
- package/lib/work/Stages/Stages.stories.d.ts.map +1 -0
- package/lib/work/Stages/Stages.stories.jsx +65 -0
- package/lib/work/Stages/Stages.stories.jsx.map +1 -0
- package/lib/work/Stakeholders/Stakeholders.stories.d.ts +9 -0
- package/lib/work/Stakeholders/Stakeholders.stories.d.ts.map +1 -0
- package/lib/work/Stakeholders/Stakeholders.stories.jsx +118 -0
- package/lib/work/Stakeholders/Stakeholders.stories.jsx.map +1 -0
- package/lib/work/Tags/Tags.mocks.d.ts +3 -0
- package/lib/work/Tags/Tags.mocks.d.ts.map +1 -0
- package/lib/work/Tags/Tags.mocks.js +76 -0
- package/lib/work/Tags/Tags.mocks.js.map +1 -0
- package/lib/work/Tags/Tags.stories.d.ts +10 -0
- package/lib/work/Tags/Tags.stories.d.ts.map +1 -0
- package/lib/work/Tags/Tags.stories.jsx +61 -0
- package/lib/work/Tags/Tags.stories.jsx.map +1 -0
- package/lib/work/Tasks/TaskList.stories.d.ts +5 -0
- package/lib/work/Tasks/TaskList.stories.d.ts.map +1 -0
- package/lib/work/Tasks/TaskList.stories.jsx +17 -0
- package/lib/work/Tasks/TaskList.stories.jsx.map +1 -0
- package/lib/work/Tasks/Tasks.stories.d.ts +9 -0
- package/lib/work/Tasks/Tasks.stories.d.ts.map +1 -0
- package/lib/work/Tasks/Tasks.stories.jsx +101 -0
- package/lib/work/Tasks/Tasks.stories.jsx.map +1 -0
- package/lib/work/Timeline/Timeline.mocks.d.ts +3 -0
- package/lib/work/Timeline/Timeline.mocks.d.ts.map +1 -0
- package/lib/work/Timeline/Timeline.mocks.jsx +129 -0
- package/lib/work/Timeline/Timeline.mocks.jsx.map +1 -0
- package/lib/work/Timeline/Timeline.stories.d.ts +7 -0
- package/lib/work/Timeline/Timeline.stories.d.ts.map +1 -0
- package/lib/work/Timeline/Timeline.stories.jsx +43 -0
- package/lib/work/Timeline/Timeline.stories.jsx.map +1 -0
- package/package.json +47 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
export const TaskPickerMockData = {
|
|
2
|
+
tasks: [
|
|
3
|
+
{
|
|
4
|
+
id: '1',
|
|
5
|
+
primary: 'Frequently performed',
|
|
6
|
+
selected: false,
|
|
7
|
+
items: [
|
|
8
|
+
{
|
|
9
|
+
id: '1-1',
|
|
10
|
+
primary: 'Address change',
|
|
11
|
+
fields: [
|
|
12
|
+
'Address line 1',
|
|
13
|
+
'Address line 2',
|
|
14
|
+
'Country',
|
|
15
|
+
'City',
|
|
16
|
+
'State',
|
|
17
|
+
'Postal code',
|
|
18
|
+
'Phone',
|
|
19
|
+
'Cell',
|
|
20
|
+
'FAX',
|
|
21
|
+
'Email'
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: '1-2',
|
|
26
|
+
primary: 'Make payment',
|
|
27
|
+
fields: ['Account number', 'Amount', 'Comments']
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: '2',
|
|
33
|
+
primary: 'Account',
|
|
34
|
+
selected: false,
|
|
35
|
+
items: [
|
|
36
|
+
{
|
|
37
|
+
id: '2-1',
|
|
38
|
+
primary: 'Address change',
|
|
39
|
+
fields: [
|
|
40
|
+
'Address line 1',
|
|
41
|
+
'Address line 2',
|
|
42
|
+
'Country',
|
|
43
|
+
'City',
|
|
44
|
+
'State',
|
|
45
|
+
'Postal code',
|
|
46
|
+
'Phone',
|
|
47
|
+
'Cell',
|
|
48
|
+
'FAX',
|
|
49
|
+
'Email'
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
id: '2-2',
|
|
54
|
+
primary: 'Close account',
|
|
55
|
+
fields: ['Reason', 'Comments']
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: '3',
|
|
61
|
+
primary: 'Contact',
|
|
62
|
+
selected: false,
|
|
63
|
+
items: [
|
|
64
|
+
{
|
|
65
|
+
id: '3-1',
|
|
66
|
+
primary: 'Modify account links',
|
|
67
|
+
fields: ['Customer name', 'Account number', 'Contact number', 'Email', 'Account link']
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: '3-2',
|
|
71
|
+
primary: 'Update contact profile',
|
|
72
|
+
fields: ['Customer ID', 'New contact number', 'New email', 'Other comments']
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: '4',
|
|
78
|
+
primary: 'Sales and offers',
|
|
79
|
+
selected: false,
|
|
80
|
+
items: [
|
|
81
|
+
{
|
|
82
|
+
id: '4-1',
|
|
83
|
+
primary: 'Create lead',
|
|
84
|
+
fields: [
|
|
85
|
+
'Stage',
|
|
86
|
+
'Phone',
|
|
87
|
+
'Email',
|
|
88
|
+
'Territory',
|
|
89
|
+
'First name',
|
|
90
|
+
'Last name',
|
|
91
|
+
'Owner',
|
|
92
|
+
'Rating',
|
|
93
|
+
'Mobile'
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: '4-2',
|
|
98
|
+
primary: 'Create opportunity',
|
|
99
|
+
fields: [
|
|
100
|
+
'Amount',
|
|
101
|
+
'Close date',
|
|
102
|
+
'Probability',
|
|
103
|
+
'Owner',
|
|
104
|
+
'Name',
|
|
105
|
+
'Territory',
|
|
106
|
+
'Short name',
|
|
107
|
+
'Primary contact',
|
|
108
|
+
'Forecast category',
|
|
109
|
+
'Stage',
|
|
110
|
+
'Source',
|
|
111
|
+
'Must win'
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
id: '5',
|
|
118
|
+
primary: 'General',
|
|
119
|
+
selected: false,
|
|
120
|
+
items: [
|
|
121
|
+
{
|
|
122
|
+
id: '5-1',
|
|
123
|
+
primary: 'File a complaint',
|
|
124
|
+
fields: ['Individual Name', 'Identification number', 'Name', 'Issue', 'Severity']
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
id: '5-2',
|
|
128
|
+
primary: 'Schedule activity',
|
|
129
|
+
fields: ['Activity name', 'Time', 'Date', 'Target completion date and time']
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
id: '5-3',
|
|
133
|
+
primary: 'Send correspondence',
|
|
134
|
+
fields: ['From', 'To', 'Subject', 'Correspondence body', 'Signature']
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
};
|
|
140
|
+
//# sourceMappingURL=TaskManager.mocks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskManager.mocks.js","sourceRoot":"","sources":["../../../src/cs/TaskManager/TaskManager.mocks.ts"],"names":[],"mapp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["export const TaskPickerMockData = {\n tasks: [\n {\n id: '1',\n primary: 'Frequently performed',\n selected: false,\n items: [\n {\n id: '1-1',\n primary: 'Address change',\n fields: [\n 'Address line 1',\n 'Address line 2',\n 'Country',\n 'City',\n 'State',\n 'Postal code',\n 'Phone',\n 'Cell',\n 'FAX',\n 'Email'\n ]\n },\n {\n id: '1-2',\n primary: 'Make payment',\n fields: ['Account number', 'Amount', 'Comments']\n }\n ]\n },\n {\n id: '2',\n primary: 'Account',\n selected: false,\n items: [\n {\n id: '2-1',\n primary: 'Address change',\n fields: [\n 'Address line 1',\n 'Address line 2',\n 'Country',\n 'City',\n 'State',\n 'Postal code',\n 'Phone',\n 'Cell',\n 'FAX',\n 'Email'\n ]\n },\n {\n id: '2-2',\n primary: 'Close account',\n fields: ['Reason', 'Comments']\n }\n ]\n },\n {\n id: '3',\n primary: 'Contact',\n selected: false,\n items: [\n {\n id: '3-1',\n primary: 'Modify account links',\n fields: ['Customer name', 'Account number', 'Contact number', 'Email', 'Account link']\n },\n {\n id: '3-2',\n primary: 'Update contact profile',\n fields: ['Customer ID', 'New contact number', 'New email', 'Other comments']\n }\n ]\n },\n {\n id: '4',\n primary: 'Sales and offers',\n selected: false,\n items: [\n {\n id: '4-1',\n primary: 'Create lead',\n fields: [\n 'Stage',\n 'Phone',\n 'Email',\n 'Territory',\n 'First name',\n 'Last name',\n 'Owner',\n 'Rating',\n 'Mobile'\n ]\n },\n {\n id: '4-2',\n primary: 'Create opportunity',\n fields: [\n 'Amount',\n 'Close date',\n 'Probability',\n 'Owner',\n 'Name',\n 'Territory',\n 'Short name',\n 'Primary contact',\n 'Forecast category',\n 'Stage',\n 'Source',\n 'Must win'\n ]\n }\n ]\n },\n {\n id: '5',\n primary: 'General',\n selected: false,\n items: [\n {\n id: '5-1',\n primary: 'File a complaint',\n fields: ['Individual Name', 'Identification number', 'Name', 'Issue', 'Severity']\n },\n {\n id: '5-2',\n primary: 'Schedule activity',\n fields: ['Activity name', 'Time', 'Date', 'Target completion date and time']\n },\n {\n id: '5-3',\n primary: 'Send correspondence',\n fields: ['From', 'To', 'Subject', 'Correspondence body', 'Signature']\n }\n ]\n }\n ]\n};\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import("react").FunctionComponent<import("@pega/cosmos-react-cs").TaskManagerProps & import("@pega/cosmos-react-core").ForwardProps>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const TaskManagerDemo: () => JSX.Element;
|
|
8
|
+
//# sourceMappingURL=TaskManager.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskManager.stories.d.ts","sourceRoot":"","sources":["../../../src/cs/TaskManager/TaskManager.stories.tsx"],"names":[],"mappings":";;;;;AAwBA,wBAGE;AAQF,eAAO,MAAM,eAAe,mBA0W3B,CAAC"}
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
import { useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { action } from '@storybook/addon-actions';
|
|
3
|
+
import { array, number, boolean } from '@storybook/addon-knobs';
|
|
4
|
+
import { Button, createUID, DateInput, DateTimeInput, Form, Grid, Input, MenuButton, Text, TimeInput } from '@pega/cosmos-react-core';
|
|
5
|
+
import { Timeline } from '@pega/cosmos-react-work';
|
|
6
|
+
import { TaskManager, TaskView } from '@pega/cosmos-react-cs';
|
|
7
|
+
import { activity } from '@pega/cosmos-react-demos/lib/work/Timeline/Timeline.mocks';
|
|
8
|
+
import { TaskPickerMockData } from './TaskManager.mocks';
|
|
9
|
+
export default {
|
|
10
|
+
title: 'Customer Service/TaskManager',
|
|
11
|
+
component: TaskManager
|
|
12
|
+
};
|
|
13
|
+
const WRAP_UP_TASK_ID = createUID();
|
|
14
|
+
const TaskPickerData = TaskPickerMockData;
|
|
15
|
+
export const TaskManagerDemo = () => {
|
|
16
|
+
const [serviceTasks, setServiceTasks] = useState([]);
|
|
17
|
+
const [isWrapUpTabVisible, setIsWrapUpTabVisible] = useState(false);
|
|
18
|
+
const formActionsElemRef = useRef(null);
|
|
19
|
+
const taskManagerRef = useRef(null);
|
|
20
|
+
const [activeTaskId, setActiveTaskId] = useState(undefined);
|
|
21
|
+
const addTaskButtonRef = useRef(null);
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
if (formActionsElemRef.current) {
|
|
24
|
+
formActionsElemRef.current.focus();
|
|
25
|
+
formActionsElemRef.current.scrollIntoView(false);
|
|
26
|
+
}
|
|
27
|
+
else if (addTaskButtonRef.current) {
|
|
28
|
+
addTaskButtonRef.current.scrollIntoView(false);
|
|
29
|
+
}
|
|
30
|
+
}, [activeTaskId]);
|
|
31
|
+
const switchTab = (taskList, taskId) => {
|
|
32
|
+
const taskIndex = taskList.findIndex(task => {
|
|
33
|
+
return task.id === taskId;
|
|
34
|
+
});
|
|
35
|
+
let nextTaskId = '';
|
|
36
|
+
if (taskIndex >= 0 && taskIndex < taskList.length - 1) {
|
|
37
|
+
nextTaskId = taskList[taskIndex + 1].id;
|
|
38
|
+
setActiveTaskId(nextTaskId);
|
|
39
|
+
}
|
|
40
|
+
else if (taskIndex === taskList.length - 1 && taskList.length > 1) {
|
|
41
|
+
setActiveTaskId(taskList[0].id);
|
|
42
|
+
}
|
|
43
|
+
else
|
|
44
|
+
setActiveTaskId(undefined);
|
|
45
|
+
};
|
|
46
|
+
const performTaskAction = (taskId, taskAction) => {
|
|
47
|
+
if (taskId === WRAP_UP_TASK_ID) {
|
|
48
|
+
if (taskAction === 'cancel') {
|
|
49
|
+
setServiceTasks(prevTasks => {
|
|
50
|
+
return prevTasks
|
|
51
|
+
.filter(task => task.variant !== 'queued')
|
|
52
|
+
.map(task => {
|
|
53
|
+
if (task.variant !== 'resolved') {
|
|
54
|
+
return {
|
|
55
|
+
...task,
|
|
56
|
+
variant: 'cancelled',
|
|
57
|
+
status: {
|
|
58
|
+
variant: 'urgent',
|
|
59
|
+
text: 'Resolve Rejected'
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
return task;
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
setActiveTaskId(undefined);
|
|
67
|
+
}
|
|
68
|
+
else if (taskAction === 'submit') {
|
|
69
|
+
setServiceTasks(prevTasks => {
|
|
70
|
+
return prevTasks
|
|
71
|
+
.filter(task => task.variant !== 'queued')
|
|
72
|
+
.map(task => {
|
|
73
|
+
if (task.variant !== 'cancelled') {
|
|
74
|
+
return {
|
|
75
|
+
...task,
|
|
76
|
+
variant: 'resolved',
|
|
77
|
+
status: {
|
|
78
|
+
variant: 'info',
|
|
79
|
+
text: 'Resolve Completed'
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
return task;
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
setActiveTaskId(undefined);
|
|
87
|
+
}
|
|
88
|
+
else if (taskAction === 'launch') {
|
|
89
|
+
setActiveTaskId(WRAP_UP_TASK_ID);
|
|
90
|
+
setIsWrapUpTabVisible(true);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
else if (taskAction === 'launch') {
|
|
94
|
+
setActiveTaskId(taskId);
|
|
95
|
+
setServiceTasks(prevTasks => {
|
|
96
|
+
return prevTasks.map(task => {
|
|
97
|
+
if (task.id === taskId) {
|
|
98
|
+
const variant = task.variant === 'queued' ? 'in-progress' : task.variant;
|
|
99
|
+
return {
|
|
100
|
+
...task,
|
|
101
|
+
icon: 'clipboard',
|
|
102
|
+
variant,
|
|
103
|
+
status: {
|
|
104
|
+
variant: (variant === 'in-progress'
|
|
105
|
+
? 'pending'
|
|
106
|
+
: task.status?.variant) || 'info',
|
|
107
|
+
text: (variant === 'in-progress' ? 'In progress' : task.status?.text) || ''
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
return task;
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
else if (taskAction === 'cancel') {
|
|
116
|
+
switchTab(serviceTasks, taskId);
|
|
117
|
+
const taskIndex = serviceTasks.findIndex(task => {
|
|
118
|
+
return task.id === taskId;
|
|
119
|
+
});
|
|
120
|
+
const nextTaskId = taskIndex >= 0 && taskIndex < serviceTasks.length - 1 && serviceTasks[taskIndex + 1].id;
|
|
121
|
+
setServiceTasks(prevTasks => {
|
|
122
|
+
return prevTasks.map(task => {
|
|
123
|
+
if (task.id === taskId && task.variant !== 'resolved' && task.variant !== 'cancelled') {
|
|
124
|
+
return {
|
|
125
|
+
...task,
|
|
126
|
+
icon: 'check',
|
|
127
|
+
variant: 'cancelled',
|
|
128
|
+
status: {
|
|
129
|
+
variant: 'urgent',
|
|
130
|
+
text: 'Resolve Rejected'
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
if (task.id === nextTaskId &&
|
|
135
|
+
task.variant !== 'resolved' &&
|
|
136
|
+
task.variant !== 'cancelled') {
|
|
137
|
+
const variant = task.variant === 'queued' ? 'in-progress' : task.variant;
|
|
138
|
+
return {
|
|
139
|
+
...task,
|
|
140
|
+
icon: 'clipboard',
|
|
141
|
+
variant,
|
|
142
|
+
status: {
|
|
143
|
+
variant: 'pending',
|
|
144
|
+
text: 'In Progress'
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
return task;
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
else if (taskAction === 'submit') {
|
|
153
|
+
switchTab(serviceTasks, taskId);
|
|
154
|
+
const taskIndex = serviceTasks.findIndex(task => {
|
|
155
|
+
return task.id === taskId;
|
|
156
|
+
});
|
|
157
|
+
const nextTaskId = taskIndex >= 0 && taskIndex < serviceTasks.length - 1 && serviceTasks[taskIndex + 1].id;
|
|
158
|
+
setServiceTasks(prevTasks => {
|
|
159
|
+
return prevTasks.map(task => {
|
|
160
|
+
if (task.id === taskId && task.variant !== 'resolved' && task.variant !== 'cancelled') {
|
|
161
|
+
return {
|
|
162
|
+
...task,
|
|
163
|
+
icon: 'check',
|
|
164
|
+
variant: 'resolved',
|
|
165
|
+
status: {
|
|
166
|
+
variant: 'info',
|
|
167
|
+
text: 'Resolve Completed'
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
if (task.id === nextTaskId &&
|
|
172
|
+
task.variant !== 'resolved' &&
|
|
173
|
+
task.variant !== 'cancelled') {
|
|
174
|
+
const variant = task.variant === 'queued' ? 'in-progress' : task.variant;
|
|
175
|
+
return {
|
|
176
|
+
...task,
|
|
177
|
+
icon: 'clipboard',
|
|
178
|
+
variant,
|
|
179
|
+
status: {
|
|
180
|
+
variant: 'pending',
|
|
181
|
+
text: 'In Progress'
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
return task;
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
else if (taskAction === 'dismiss') {
|
|
190
|
+
setServiceTasks(prevTasks => {
|
|
191
|
+
return prevTasks.filter(task => task.id !== taskId);
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
const renderTasks = (selections) => {
|
|
196
|
+
const newTasks = selections.map((selection, i) => {
|
|
197
|
+
const taskId = createUID();
|
|
198
|
+
if (i === 0) {
|
|
199
|
+
return {
|
|
200
|
+
id: taskId,
|
|
201
|
+
icon: 'nothing',
|
|
202
|
+
name: selection.primary,
|
|
203
|
+
variant: 'in-progress',
|
|
204
|
+
status: {
|
|
205
|
+
variant: 'pending',
|
|
206
|
+
text: 'In Progress'
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
return {
|
|
211
|
+
id: taskId,
|
|
212
|
+
icon: 'clipboard',
|
|
213
|
+
name: selection.primary,
|
|
214
|
+
variant: 'queued',
|
|
215
|
+
status: {
|
|
216
|
+
variant: 'success',
|
|
217
|
+
text: 'Queued'
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
});
|
|
221
|
+
setServiceTasks(prevTasks => {
|
|
222
|
+
return [...newTasks, ...prevTasks];
|
|
223
|
+
});
|
|
224
|
+
if (newTasks.length > 0) {
|
|
225
|
+
performTaskAction(newTasks[0].id, 'launch');
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
const taskName = serviceTasks.find(task => task.id === activeTaskId)?.name ?? '';
|
|
229
|
+
const taskFields = TaskPickerData.tasks
|
|
230
|
+
.flatMap(task => task.items ?? [])
|
|
231
|
+
.find(({ primary }) => primary === taskName)?.fields ?? [];
|
|
232
|
+
const formElements = taskFields.map((field, i) => {
|
|
233
|
+
const lowerFieldName = field.toLocaleLowerCase();
|
|
234
|
+
if (lowerFieldName.includes('date') && lowerFieldName.includes('time')) {
|
|
235
|
+
return <DateTimeInput label={field} key={i}/>;
|
|
236
|
+
}
|
|
237
|
+
if (lowerFieldName.includes('date')) {
|
|
238
|
+
return <DateInput label={field} key={i}/>;
|
|
239
|
+
}
|
|
240
|
+
if (lowerFieldName.includes('time')) {
|
|
241
|
+
return <TimeInput label={field} key={i}/>;
|
|
242
|
+
}
|
|
243
|
+
return <Input label={field} key={i}/>;
|
|
244
|
+
});
|
|
245
|
+
const formFields = formElements.length <= 3 ? (<>{formElements}</>) : (<Grid container={{
|
|
246
|
+
cols: 'repeat(2, 1fr)',
|
|
247
|
+
colGap: number('colGap', 2),
|
|
248
|
+
rowGap: number('rowGap', 2)
|
|
249
|
+
}}>
|
|
250
|
+
{formElements}
|
|
251
|
+
</Grid>);
|
|
252
|
+
const serviceTasksEmpty = boolean('Tasks empty', false);
|
|
253
|
+
return (<TaskManager ref={taskManagerRef} tasks={serviceTasksEmpty
|
|
254
|
+
? []
|
|
255
|
+
: serviceTasks.map(task => {
|
|
256
|
+
if (task.id === activeTaskId) {
|
|
257
|
+
return {
|
|
258
|
+
...task,
|
|
259
|
+
active: true
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
return task;
|
|
263
|
+
})} emptyText='No tasks added' banner={{
|
|
264
|
+
icon: 'headset',
|
|
265
|
+
content: 'Hi Ms. Ventura, I see that you are interested in changing your monthly due date, is that correct ?'
|
|
266
|
+
}} onTaskLaunch={(id) => {
|
|
267
|
+
performTaskAction(id, 'launch');
|
|
268
|
+
}} onTaskDismiss={(id) => {
|
|
269
|
+
performTaskAction(id, 'dismiss');
|
|
270
|
+
}} addTask={{
|
|
271
|
+
items: TaskPickerMockData.tasks,
|
|
272
|
+
onAdd: renderTasks
|
|
273
|
+
}} wrapUp={{
|
|
274
|
+
onWrapUp: () => {
|
|
275
|
+
performTaskAction(WRAP_UP_TASK_ID, 'launch');
|
|
276
|
+
},
|
|
277
|
+
active: activeTaskId === WRAP_UP_TASK_ID,
|
|
278
|
+
showTab: isWrapUpTabVisible
|
|
279
|
+
}} main={<TaskView header={<Text variant='h2'>
|
|
280
|
+
{activeTaskId === WRAP_UP_TASK_ID
|
|
281
|
+
? 'Wrap up'
|
|
282
|
+
: serviceTasks.find(task => task.id === activeTaskId)?.name}
|
|
283
|
+
</Text>} actions={<MenuButton ref={formActionsElemRef} menu={{
|
|
284
|
+
items: array('actions', [
|
|
285
|
+
'Option Number 1',
|
|
286
|
+
'Option Number 2',
|
|
287
|
+
'Option Number 3'
|
|
288
|
+
]).map(name => ({
|
|
289
|
+
primary: name,
|
|
290
|
+
id: name,
|
|
291
|
+
onClick: action(`Clicked ${name}`)
|
|
292
|
+
}))
|
|
293
|
+
}} text='Actions'/>}>
|
|
294
|
+
<Form id='forming' actions={<>
|
|
295
|
+
<Button name='Cancel' onClick={() => {
|
|
296
|
+
performTaskAction(activeTaskId, 'cancel');
|
|
297
|
+
}}>
|
|
298
|
+
Cancel
|
|
299
|
+
</Button>
|
|
300
|
+
<div>
|
|
301
|
+
<Button name='Submit' variant='primary' onClick={() => {
|
|
302
|
+
performTaskAction(activeTaskId, 'submit');
|
|
303
|
+
}}>
|
|
304
|
+
Submit
|
|
305
|
+
</Button>
|
|
306
|
+
</div>
|
|
307
|
+
</>}>
|
|
308
|
+
<Grid container={{ rowGap: 2 }}>
|
|
309
|
+
{activeTaskId === WRAP_UP_TASK_ID ? (<Timeline activity={activity} currentTime={new Date()}/>) : (formFields)}
|
|
310
|
+
</Grid>
|
|
311
|
+
</Form>
|
|
312
|
+
</TaskView>}/>);
|
|
313
|
+
};
|
|
314
|
+
//# sourceMappingURL=TaskManager.stories.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskManager.stories.jsx","sourceRoot":"","sources":["../../../src/cs/TaskManager/TaskManager.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEhE,OAAO,EACL,MAAM,EACN,SAAS,EACT,SAAS,EACT,aAAa,EACb,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,UAAU,EAGV,IAAI,EACJ,SAAS,EACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAa,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,2DAA2D,CAAC;AAErF,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,eAAe;IACb,KAAK,EAAE,8BAA8B;IACrC,SAAS,EAAE,WAAW;CACvB,CAAC;AAEF,MAAM,eAAe,GAAG,SAAS,EAAE,CAAC;AAIpC,MAAM,cAAc,GAAG,kBAAkB,CAAC;AAE1C,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE;IAClC,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,Q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,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAC7B;cAAA,CAAC,YAAY,KAAK,eAAe,CAAC,CAAC,CAAC,CAClC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,EAAG,CAC1D,CAAC,CAAC,CAAC,CACF,UAAU,CACX,CACH;YAAA,EAAE,IAAI,CACR;UAAA,EAAE,IAAI,CACR;QAAA,EAAE,QAAQ,CAAC,CACZ,EACD,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useEffect, useRef, useState } from 'react';\nimport { action } from '@storybook/addon-actions';\nimport { array, number, boolean } from '@storybook/addon-knobs';\n\nimport {\n Button,\n createUID,\n DateInput,\n DateTimeInput,\n Form,\n Grid,\n Input,\n MenuButton,\n MenuItemProps,\n StatusProps,\n Text,\n TimeInput\n} from '@pega/cosmos-react-core';\nimport { Timeline } from '@pega/cosmos-react-work';\nimport { TaskManager, TaskView, TaskProps } from '@pega/cosmos-react-cs';\nimport { activity } from '@pega/cosmos-react-demos/lib/work/Timeline/Timeline.mocks';\n\nimport { TaskPickerMockData } from './TaskManager.mocks';\n\nexport default {\n title: 'Customer Service/TaskManager',\n component: TaskManager\n};\n\nconst WRAP_UP_TASK_ID = createUID();\n\ntype TaskActions = 'cancel' | 'launch' | 'dismiss' | 'submit';\n\nconst TaskPickerData = TaskPickerMockData;\n\nexport const TaskManagerDemo = () => {\n const [serviceTasks, setServiceTasks] = useState<TaskProps[]>([]);\n const [isWrapUpTabVisible, setIsWrapUpTabVisible] = useState<boolean>(false);\n\n const formActionsElemRef = useRef<HTMLButtonElement>(null);\n const taskManagerRef = useRef<HTMLDivElement>(null);\n const [activeTaskId, setActiveTaskId] = useState<string | undefined>(undefined);\n const addTaskButtonRef = useRef<HTMLButtonElement>(null);\n\n useEffect(() => {\n if (formActionsElemRef.current) {\n formActionsElemRef.current.focus();\n formActionsElemRef.current.scrollIntoView(false);\n } else if (addTaskButtonRef.current) {\n addTaskButtonRef.current.scrollIntoView(false);\n }\n }, [activeTaskId]);\n\n const switchTab = (taskList: TaskProps[], taskId?: TaskProps['id']) => {\n const taskIndex = taskList.findIndex(task => {\n return task.id === taskId;\n });\n let nextTaskId = '';\n if (taskIndex >= 0 && taskIndex < taskList.length - 1) {\n nextTaskId = taskList[taskIndex + 1].id;\n setActiveTaskId(nextTaskId);\n } else if (taskIndex === taskList.length - 1 && taskList.length > 1) {\n setActiveTaskId(taskList[0].id);\n } else setActiveTaskId(undefined);\n };\n\n const performTaskAction = (taskId: string | undefined, taskAction: TaskActions) => {\n if (taskId === WRAP_UP_TASK_ID) {\n if (taskAction === 'cancel') {\n setServiceTasks(prevTasks => {\n return prevTasks\n .filter(task => task.variant !== 'queued')\n .map(task => {\n if (task.variant !== 'resolved') {\n return {\n ...task,\n variant: 'cancelled',\n status: {\n variant: 'urgent' as StatusProps['variant'],\n text: 'Resolve Rejected'\n }\n };\n }\n return task;\n });\n });\n setActiveTaskId(undefined);\n } else if (taskAction === 'submit') {\n setServiceTasks(prevTasks => {\n return prevTasks\n .filter(task => task.variant !== 'queued')\n .map(task => {\n if (task.variant !== 'cancelled') {\n return {\n ...task,\n variant: 'resolved',\n status: {\n variant: 'info' as StatusProps['variant'],\n text: 'Resolve Completed'\n }\n };\n }\n return task;\n });\n });\n setActiveTaskId(undefined);\n } else if (taskAction === 'launch') {\n setActiveTaskId(WRAP_UP_TASK_ID);\n setIsWrapUpTabVisible(true);\n }\n } else if (taskAction === 'launch') {\n setActiveTaskId(taskId);\n setServiceTasks(prevTasks => {\n return prevTasks.map(task => {\n if (task.id === taskId) {\n const variant = task.variant === 'queued' ? 'in-progress' : task.variant;\n return {\n ...task,\n icon: 'clipboard',\n variant,\n status: {\n variant:\n (variant === 'in-progress'\n ? ('pending' as StatusProps['variant'])\n : task.status?.variant) || ('info' as StatusProps['variant']),\n text: (variant === 'in-progress' ? 'In progress' : task.status?.text) || ''\n }\n };\n }\n return task;\n });\n });\n } else if (taskAction === 'cancel') {\n switchTab(serviceTasks, taskId);\n const taskIndex = serviceTasks.findIndex(task => {\n return task.id === taskId;\n });\n const nextTaskId =\n taskIndex >= 0 && taskIndex < serviceTasks.length - 1 && serviceTasks[taskIndex + 1].id;\n setServiceTasks(prevTasks => {\n return prevTasks.map(task => {\n if (task.id === taskId && task.variant !== 'resolved' && task.variant !== 'cancelled') {\n return {\n ...task,\n icon: 'check',\n variant: 'cancelled',\n status: {\n variant: 'urgent' as StatusProps['variant'],\n text: 'Resolve Rejected'\n }\n };\n }\n if (\n task.id === nextTaskId &&\n task.variant !== 'resolved' &&\n task.variant !== 'cancelled'\n ) {\n const variant = task.variant === 'queued' ? 'in-progress' : task.variant;\n return {\n ...task,\n icon: 'clipboard',\n variant,\n status: {\n variant: 'pending' as StatusProps['variant'],\n text: 'In Progress'\n }\n };\n }\n\n return task;\n });\n });\n } else if (taskAction === 'submit') {\n switchTab(serviceTasks, taskId);\n const taskIndex = serviceTasks.findIndex(task => {\n return task.id === taskId;\n });\n const nextTaskId =\n taskIndex >= 0 && taskIndex < serviceTasks.length - 1 && serviceTasks[taskIndex + 1].id;\n setServiceTasks(prevTasks => {\n return prevTasks.map(task => {\n if (task.id === taskId && task.variant !== 'resolved' && task.variant !== 'cancelled') {\n return {\n ...task,\n icon: 'check',\n variant: 'resolved',\n status: {\n variant: 'info' as StatusProps['variant'],\n text: 'Resolve Completed'\n }\n };\n }\n if (\n task.id === nextTaskId &&\n task.variant !== 'resolved' &&\n task.variant !== 'cancelled'\n ) {\n const variant = task.variant === 'queued' ? 'in-progress' : task.variant;\n return {\n ...task,\n icon: 'clipboard',\n variant,\n status: {\n variant: 'pending' as StatusProps['variant'],\n text: 'In Progress'\n }\n };\n }\n\n return task;\n });\n });\n } else if (taskAction === 'dismiss') {\n setServiceTasks(prevTasks => {\n return prevTasks.filter(task => task.id !== taskId);\n });\n }\n };\n\n const renderTasks = (selections: MenuItemProps[]) => {\n const newTasks = selections.map((selection, i) => {\n const taskId = createUID();\n if (i === 0) {\n return {\n id: taskId,\n icon: 'nothing',\n name: selection.primary,\n variant: 'in-progress' as TaskProps['variant'],\n status: {\n variant: 'pending' as StatusProps['variant'],\n text: 'In Progress'\n }\n };\n }\n return {\n id: taskId,\n icon: 'clipboard',\n name: selection.primary,\n variant: 'queued' as TaskProps['variant'],\n status: {\n variant: 'success' as StatusProps['variant'],\n text: 'Queued'\n }\n };\n });\n setServiceTasks(prevTasks => {\n return [...newTasks, ...prevTasks];\n });\n if (newTasks.length > 0) {\n performTaskAction(newTasks[0].id, 'launch');\n }\n };\n const taskName = serviceTasks.find(task => task.id === activeTaskId)?.name ?? '';\n\n /* Preparing form fields from added task */\n\n const taskFields =\n TaskPickerData.tasks\n .flatMap(task => task.items ?? [])\n .find(({ primary }) => primary === taskName)?.fields ?? [];\n\n const formElements = taskFields.map((field, i) => {\n const lowerFieldName = field.toLocaleLowerCase();\n if (lowerFieldName.includes('date') && lowerFieldName.includes('time')) {\n /* eslint-disable react/no-array-index-key */\n return <DateTimeInput label={field} key={i} />;\n }\n if (lowerFieldName.includes('date')) {\n return <DateInput label={field} key={i} />;\n }\n if (lowerFieldName.includes('time')) {\n return <TimeInput label={field} key={i} />;\n }\n return <Input label={field} key={i} />;\n /* eslint-enable react/no-array-index-key */\n });\n\n const formFields =\n formElements.length <= 3 ? (\n <>{formElements}</>\n ) : (\n <Grid\n container={{\n cols: 'repeat(2, 1fr)',\n colGap: number('colGap', 2),\n rowGap: number('rowGap', 2)\n }}\n >\n {formElements}\n </Grid>\n );\n\n const serviceTasksEmpty = boolean('Tasks empty', false);\n return (\n <TaskManager\n ref={taskManagerRef}\n tasks={\n serviceTasksEmpty\n ? []\n : serviceTasks.map(task => {\n if (task.id === activeTaskId) {\n return {\n ...task,\n active: true\n };\n }\n return task;\n })\n }\n emptyText='No tasks added'\n banner={{\n icon: 'headset',\n content:\n 'Hi Ms. Ventura, I see that you are interested in changing your monthly due date, is that correct ?'\n }}\n onTaskLaunch={(id: string) => {\n performTaskAction(id, 'launch');\n }}\n onTaskDismiss={(id: string) => {\n performTaskAction(id, 'dismiss');\n }}\n addTask={{\n items: TaskPickerMockData.tasks,\n onAdd: renderTasks\n }}\n wrapUp={{\n onWrapUp: () => {\n performTaskAction(WRAP_UP_TASK_ID, 'launch');\n },\n active: activeTaskId === WRAP_UP_TASK_ID,\n showTab: isWrapUpTabVisible\n }}\n main={\n <TaskView\n header={\n <Text variant='h2'>\n {activeTaskId === WRAP_UP_TASK_ID\n ? 'Wrap up'\n : serviceTasks.find(task => task.id === activeTaskId)?.name}\n </Text>\n }\n actions={\n <MenuButton\n ref={formActionsElemRef}\n menu={{\n items: array('actions', [\n 'Option Number 1',\n 'Option Number 2',\n 'Option Number 3'\n ]).map(name => ({\n primary: name,\n id: name,\n onClick: action(`Clicked ${name}`)\n }))\n }}\n text='Actions'\n />\n }\n >\n <Form\n id='forming'\n actions={\n <>\n <Button\n name='Cancel'\n onClick={() => {\n performTaskAction(activeTaskId, 'cancel');\n }}\n >\n Cancel\n </Button>\n <div>\n <Button\n name='Submit'\n variant='primary'\n onClick={() => {\n performTaskAction(activeTaskId, 'submit');\n }}\n >\n Submit\n </Button>\n </div>\n </>\n }\n >\n <Grid container={{ rowGap: 2 }}>\n {activeTaskId === WRAP_UP_TASK_ID ? (\n <Timeline activity={activity} currentTime={new Date()} />\n ) : (\n formFields\n )}\n </Grid>\n </Form>\n </TaskView>\n }\n />\n );\n};\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: <T extends object = object>({ accept, items, itemRenderer: ItemRenderer, emptyRenderer: EmptyRenderer, onChange, pullMode, pushMode, as: Component, ...restProps }: import("@pega/cosmos-react-dnd").DragDropListProps<T> & import("@pega/cosmos-react-core").ForwardProps) => JSX.Element;
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
export declare const DragDropListDemo: () => JSX.Element;
|
|
11
|
+
//# sourceMappingURL=DragDropList.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DragDropList.stories.d.ts","sourceRoot":"","sources":["../../../src/dnd/DragDropList/DragDropList.stories.tsx"],"names":[],"mappings":";;;;;;;;AAcA,wBAME;AAiHF,eAAO,MAAM,gBAAgB,mBAgE5B,CAAC"}
|