@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,111 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
3
|
+
import { action } from '@storybook/addon-actions';
|
|
4
|
+
import { createStringMatcher } from '@pega/cosmos-react-core';
|
|
5
|
+
import { Stakeholders } from '@pega/cosmos-react-work';
|
|
6
|
+
import { AddAndEditForm, mockNetworkReq, mockRoles, useMockStakeholders } from './Stakeholders.mocks';
|
|
7
|
+
export default {
|
|
8
|
+
title: 'Work/Stakeholders',
|
|
9
|
+
component: Stakeholders
|
|
10
|
+
};
|
|
11
|
+
export const StakeHoldersDemo = () => {
|
|
12
|
+
const [loading, setLoading] = useState(true);
|
|
13
|
+
const [mode, setMode] = useState();
|
|
14
|
+
const [editing, setEditing] = useState(null);
|
|
15
|
+
const [formLoading, setFormLoading] = useState(false);
|
|
16
|
+
const [viewAllLoading, setViewAllLoading] = useState(false);
|
|
17
|
+
const [viewAllSearchValue, setViewAllSearchValue] = useState('');
|
|
18
|
+
// Grab some mock data...
|
|
19
|
+
const [mockStakeholders, setMockStakeholders] = useMockStakeholders(() => {
|
|
20
|
+
setLoading(false);
|
|
21
|
+
});
|
|
22
|
+
const [editData, setEditData] = useState();
|
|
23
|
+
// Merges built-in available actions with stakeholder objects.
|
|
24
|
+
const addActions = useCallback((items) => {
|
|
25
|
+
return items.map(stakeholder => {
|
|
26
|
+
return {
|
|
27
|
+
...stakeholder,
|
|
28
|
+
onEdit: () => {
|
|
29
|
+
setFormLoading(true);
|
|
30
|
+
setEditing(stakeholder.id);
|
|
31
|
+
setEditData(mockStakeholders.find(ms => ms.id === stakeholder.id)?.data);
|
|
32
|
+
mockNetworkReq().then(() => setFormLoading(false));
|
|
33
|
+
},
|
|
34
|
+
onRemove: () => {
|
|
35
|
+
setMockStakeholders(cur => cur.filter(({ id }) => id !== stakeholder.id));
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
});
|
|
39
|
+
}, [mockStakeholders]);
|
|
40
|
+
const form = useMemo(() => {
|
|
41
|
+
return {
|
|
42
|
+
// Set this to true when fetching view metadata for the form or during submit validation.
|
|
43
|
+
loading: formLoading,
|
|
44
|
+
// Represents "available" roles for a stakeholder. Set to undefined when choosing not to present them as options.
|
|
45
|
+
roles: mode === 'add' ? mockRoles : undefined,
|
|
46
|
+
// Represents the current role of a stakeholder if they have one. When undefined the first role in the roles array with be selected in the UI.
|
|
47
|
+
currentRole: editing ? mockStakeholders.find(({ id }) => id === editing)?.role : undefined,
|
|
48
|
+
/**
|
|
49
|
+
* A function that will be invoked by React's createElement. If only a simple function is needed then an inline arrow is ok.
|
|
50
|
+
* If local state(hooks) is desired best to define a stable component definition outside of the parent component's function body.
|
|
51
|
+
*/
|
|
52
|
+
renderer: AddAndEditForm,
|
|
53
|
+
rendererProps: editData,
|
|
54
|
+
onSubmit: ({ selectedRoleName, closeForm }) => {
|
|
55
|
+
setFormLoading(true);
|
|
56
|
+
action(`The selected role is: ${selectedRoleName}`);
|
|
57
|
+
// Create or update the stakeholder resource.
|
|
58
|
+
mockNetworkReq().then(closeForm);
|
|
59
|
+
},
|
|
60
|
+
onDismiss: ({ closeForm }) => {
|
|
61
|
+
closeForm();
|
|
62
|
+
},
|
|
63
|
+
onAfterClose: () => {
|
|
64
|
+
// Clean up loading state when the form is closed.
|
|
65
|
+
setFormLoading(false);
|
|
66
|
+
setEditing(null);
|
|
67
|
+
setEditData(undefined);
|
|
68
|
+
setMode(undefined);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
}, [mode, formLoading, mockRoles, editing, editData]);
|
|
72
|
+
const viewAll = useMemo(() => {
|
|
73
|
+
let viewAllItems = mockStakeholders;
|
|
74
|
+
// When the user has entered a search value we can filter the array or api request.
|
|
75
|
+
if (viewAllSearchValue) {
|
|
76
|
+
// For client side searches cosmos offers utils such as createStringMatcher for creating RegExp with params.
|
|
77
|
+
const filterRegex = createStringMatcher(viewAllSearchValue, 'boundary');
|
|
78
|
+
// Asserting as string since, in this demo, primary is a string. But type is a non nullable ReactNode.
|
|
79
|
+
viewAllItems = mockStakeholders.filter(({ primary }) => filterRegex.test(primary));
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
// Set this to true when fetching data for the view all modal.
|
|
83
|
+
loading: viewAllLoading,
|
|
84
|
+
// Even when loading is true this must be an array, empty or not.
|
|
85
|
+
items: addActions(viewAllItems),
|
|
86
|
+
// The search string will be handed back as the arg, pass a state setter and filter off of that.
|
|
87
|
+
onSearch: setViewAllSearchValue,
|
|
88
|
+
onAfterClose: () => {
|
|
89
|
+
// Clean up loading state when the modal is closed.
|
|
90
|
+
if (viewAllLoading)
|
|
91
|
+
setViewAllLoading(false);
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
}, [viewAllLoading, mockStakeholders, viewAllSearchValue, addActions]);
|
|
95
|
+
useEffect(() => {
|
|
96
|
+
// Orchestrate based on mode state if needed.
|
|
97
|
+
}, [mode]);
|
|
98
|
+
useEffect(() => {
|
|
99
|
+
// Orchestrate based on editing state if needed.
|
|
100
|
+
}, [editing]);
|
|
101
|
+
return (_jsx(Stakeholders, { loading: loading, items: useMemo(() => addActions(mockStakeholders.slice(0, 3)), [addActions, mockStakeholders]), count: loading ? undefined : mockStakeholders.length, onAddNew: () => {
|
|
102
|
+
setMode('add');
|
|
103
|
+
setFormLoading(true);
|
|
104
|
+
mockNetworkReq().then(() => setFormLoading(false));
|
|
105
|
+
}, form: form, onViewAll: () => {
|
|
106
|
+
setMode('viewAll');
|
|
107
|
+
setViewAllLoading(true);
|
|
108
|
+
mockNetworkReq().then(() => setViewAllLoading(false));
|
|
109
|
+
}, viewAll: viewAll }, void 0));
|
|
110
|
+
};
|
|
111
|
+
//# sourceMappingURL=Stakeholders.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stakeholders.stories.js","sourceRoot":"","sources":["../../../src/work/Stakeholders/Stakeholders.stories.tsx"],"names":[],"mappings":";A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AAC;YAC/C,CAAC;SACF,CAAC;IACJ,CAAC,EAAE,CAAC,cAAc,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,UAAU,CAAC,CAAC,CAAC;IAEvE,SAAS,CAAC,GAAG,EAAE;QACb,6CAA6C;IAC/C,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEX,SAAS,CAAC,GAAG,EAAE;QACb,gDAAgD;IAClD,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,OAAO,CACL,KAAC,YAAY,IACX,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,OAAO,CACZ,GAAG,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAC9C,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAC/B,EACD,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,gBAAgB,CAAC,MAAM,EACpD,QAAQ,EAAE,GAAG,EAAE;YACb,OAAO,CAAC,KAAK,CAAC,CAAC;YACf,cAAc,CAAC,IAAI,CAAC,CAAC;YACrB,cAAc,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;QACrD,CAAC,EACD,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,GAAG,EAAE;YACd,OAAO,CAAC,SAAS,CAAC,CAAC;YACnB,iBAAiB,CAAC,IAAI,CAAC,CAAC;YACxB,cAAc,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC;QACxD,CAAC,EACD,OAAO,EAAE,OAAO,WAChB,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useCallback, useEffect, useMemo, useState } from 'react';\nimport { action } from '@storybook/addon-actions';\nimport { Meta } from '@storybook/react';\n\nimport { createStringMatcher } from '@pega/cosmos-react-core';\nimport { Stakeholders, StakeholdersProps, Stakeholder } from '@pega/cosmos-react-work';\n\nimport {\n AddAndEditForm,\n mockNetworkReq,\n mockRoles,\n useMockStakeholders\n} from './Stakeholders.mocks';\n\nexport default {\n title: 'Work/Stakeholders',\n component: Stakeholders\n} as Meta;\n\nexport const StakeHoldersDemo = () => {\n const [loading, setLoading] = useState(true);\n const [mode, setMode] = useState<undefined | 'add' | 'viewAll'>();\n const [editing, setEditing] = useState<Stakeholder['id'] | null>(null);\n const [formLoading, setFormLoading] = useState(false);\n const [viewAllLoading, setViewAllLoading] = useState(false);\n const [viewAllSearchValue, setViewAllSearchValue] = useState('');\n\n // Grab some mock data...\n const [mockStakeholders, setMockStakeholders] = useMockStakeholders(() => {\n setLoading(false);\n });\n\n const [editData, setEditData] = useState<\n StakeholdersProps['form']['rendererProps'] | undefined\n >();\n\n // Merges built-in available actions with stakeholder objects.\n const addActions = useCallback(\n (items: Stakeholder[]) => {\n return items.map(stakeholder => {\n return {\n ...stakeholder,\n onEdit: () => {\n setFormLoading(true);\n setEditing(stakeholder.id);\n setEditData(mockStakeholders.find(ms => ms.id === stakeholder.id)?.data);\n mockNetworkReq().then(() => setFormLoading(false));\n },\n onRemove: () => {\n setMockStakeholders(cur => cur.filter(({ id }) => id !== stakeholder.id));\n }\n };\n });\n },\n [mockStakeholders]\n );\n\n const form: StakeholdersProps['form'] = useMemo(() => {\n return {\n // Set this to true when fetching view metadata for the form or during submit validation.\n loading: formLoading,\n // Represents \"available\" roles for a stakeholder. Set to undefined when choosing not to present them as options.\n roles: mode === 'add' ? mockRoles : undefined,\n // Represents the current role of a stakeholder if they have one. When undefined the first role in the roles array with be selected in the UI.\n currentRole: editing ? mockStakeholders.find(({ id }) => id === editing)?.role : undefined,\n /**\n * A function that will be invoked by React's createElement. If only a simple function is needed then an inline arrow is ok.\n * If local state(hooks) is desired best to define a stable component definition outside of the parent component's function body.\n */\n renderer: AddAndEditForm,\n rendererProps: editData,\n onSubmit: ({ selectedRoleName, closeForm }) => {\n setFormLoading(true);\n action(`The selected role is: ${selectedRoleName}`);\n // Create or update the stakeholder resource.\n mockNetworkReq().then(closeForm);\n },\n onDismiss: ({ closeForm }) => {\n closeForm();\n },\n onAfterClose: () => {\n // Clean up loading state when the form is closed.\n setFormLoading(false);\n setEditing(null);\n setEditData(undefined);\n setMode(undefined);\n }\n };\n }, [mode, formLoading, mockRoles, editing, editData]);\n\n const viewAll: StakeholdersProps['viewAll'] = useMemo(() => {\n let viewAllItems = mockStakeholders;\n\n // When the user has entered a search value we can filter the array or api request.\n if (viewAllSearchValue) {\n // For client side searches cosmos offers utils such as createStringMatcher for creating RegExp with params.\n const filterRegex = createStringMatcher(viewAllSearchValue, 'boundary');\n // Asserting as string since, in this demo, primary is a string. But type is a non nullable ReactNode.\n viewAllItems = mockStakeholders.filter(({ primary }) => filterRegex.test(primary as string));\n }\n\n return {\n // Set this to true when fetching data for the view all modal.\n loading: viewAllLoading,\n // Even when loading is true this must be an array, empty or not.\n items: addActions(viewAllItems),\n // The search string will be handed back as the arg, pass a state setter and filter off of that.\n onSearch: setViewAllSearchValue,\n onAfterClose: () => {\n // Clean up loading state when the modal is closed.\n if (viewAllLoading) setViewAllLoading(false);\n }\n };\n }, [viewAllLoading, mockStakeholders, viewAllSearchValue, addActions]);\n\n useEffect(() => {\n // Orchestrate based on mode state if needed.\n }, [mode]);\n\n useEffect(() => {\n // Orchestrate based on editing state if needed.\n }, [editing]);\n\n return (\n <Stakeholders\n loading={loading}\n items={useMemo(\n () => addActions(mockStakeholders.slice(0, 3)),\n [addActions, mockStakeholders]\n )}\n count={loading ? undefined : mockStakeholders.length}\n onAddNew={() => {\n setMode('add');\n setFormLoading(true);\n mockNetworkReq().then(() => setFormLoading(false));\n }}\n form={form}\n onViewAll={() => {\n setMode('viewAll');\n setViewAllLoading(true);\n mockNetworkReq().then(() => setViewAllLoading(false));\n }}\n viewAll={viewAll}\n />\n );\n};\n"]}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { Tags } from '@pega/cosmos-react-work';
|
|
4
|
+
import { addNewMockTag, getMockAvailableTags } from './Tags.mocks';
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Work/Tags',
|
|
7
|
+
component: Tags
|
|
8
|
+
};
|
|
9
|
+
export const TagsDemo = (args) => {
|
|
10
|
+
const [loading, setLoading] = useState(true);
|
|
11
|
+
const [availableTags, setAvailableTags] = useState();
|
|
12
|
+
const [filterValue, setFilterValue] = useState('');
|
|
13
|
+
const [tags, setTags] = useState([
|
|
14
|
+
'Pega',
|
|
15
|
+
'Cosmos',
|
|
16
|
+
'Design_system',
|
|
17
|
+
'animal',
|
|
18
|
+
'bread',
|
|
19
|
+
'hour',
|
|
20
|
+
'music',
|
|
21
|
+
'paint',
|
|
22
|
+
'space',
|
|
23
|
+
'weather'
|
|
24
|
+
]);
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
const allTags = getMockAvailableTags();
|
|
27
|
+
setAvailableTags(filterValue ? allTags?.filter(tag => tag.startsWith(filterValue)) : []);
|
|
28
|
+
}, [filterValue]);
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
setTimeout(() => {
|
|
31
|
+
setLoading(false);
|
|
32
|
+
}, 1000);
|
|
33
|
+
}, []);
|
|
34
|
+
const handleEditTags = (selectedTags) => {
|
|
35
|
+
return new Promise((resolve, reject) => {
|
|
36
|
+
if (args.editError) {
|
|
37
|
+
reject(new Error(args.editError));
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
setTags(selectedTags.map(tag => {
|
|
41
|
+
if (tag.newTag) {
|
|
42
|
+
addNewMockTag(tag.text);
|
|
43
|
+
}
|
|
44
|
+
return tag.text;
|
|
45
|
+
}));
|
|
46
|
+
resolve();
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
return (_jsx(Tags, { tags: tags, availableTags: availableTags, loading: loading, error: args.displayRetry ? { message: args.error, onRetry: () => { } } : args.error, onSearch: (query) => setFilterValue(query), onEditTags: handleEditTags }, void 0));
|
|
51
|
+
};
|
|
52
|
+
TagsDemo.args = {
|
|
53
|
+
error: '',
|
|
54
|
+
displayRetry: false,
|
|
55
|
+
editError: ''
|
|
56
|
+
};
|
|
57
|
+
TagsDemo.argTypes = {
|
|
58
|
+
error: { control: { type: 'text' } },
|
|
59
|
+
displayRetry: { control: { type: 'boolean' } },
|
|
60
|
+
editError: { control: { type: 'text' } }
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=Tags.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tags.stories.js","sourceRoot":"","sources":["../../../src/work/Tags/Tags.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,IAAI,EAA0B,MAAM,yBAAyB,CAAC;AAEvE,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEnE,eAAe;IACb,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,IAAI;CACR,CAAC;AAQV,MAAM,CAAC,MAAM,QAAQ,GAA0B,CAAC,IAAoB,EAAE,EAAE;IACtE,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC7C,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,EAA8B,CAAC;IACjF,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACnD,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAoB;QAClD,MAAM;QACN,QAAQ;QACR,eAAe;QACf,QAAQ;QACR,OAAO;QACP,MAAM;QACN,OAAO;QACP,OAAO;QACP,OAAO;QACP,SAAS;KACV,CAAC,CAAC;IAEH,SA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IAAI,CAAC,KAAK,EAClF,QAAQ,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,EAClD,UAAU,EAAE,cAAc,WAC1B,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,QAAQ,CAAC,IAAI,GAAG;IACd,KAAK,EAAE,EAAE;IACT,YAAY,EAAE,KAAK;IACnB,SAAS,EAAE,EAAE;CACd,CAAC;AAEF,QAAQ,CAAC,QAAQ,GAAG;IAClB,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACpC,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC9C,SAAS,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CACzC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useEffect, useState } from 'react';\n\nimport { Tags, SelectedTag, TagsProps } from '@pega/cosmos-react-work';\n\nimport { addNewMockTag, getMockAvailableTags } from './Tags.mocks';\n\nexport default {\n title: 'Work/Tags',\n component: Tags\n} as Meta;\n\ninterface TagsStoryProps {\n error?: string;\n displayRetry?: boolean;\n editError?: string;\n}\n\nexport const TagsDemo: Story<TagsStoryProps> = (args: TagsStoryProps) => {\n const [loading, setLoading] = useState(true);\n const [availableTags, setAvailableTags] = useState<TagsProps['availableTags']>();\n const [filterValue, setFilterValue] = useState('');\n const [tags, setTags] = useState<TagsProps['tags']>([\n 'Pega',\n 'Cosmos',\n 'Design_system',\n 'animal',\n 'bread',\n 'hour',\n 'music',\n 'paint',\n 'space',\n 'weather'\n ]);\n\n useEffect(() => {\n const allTags = getMockAvailableTags();\n setAvailableTags(filterValue ? allTags?.filter(tag => tag.startsWith(filterValue)) : []);\n }, [filterValue]);\n\n useEffect(() => {\n setTimeout(() => {\n setLoading(false);\n }, 1000);\n }, []);\n\n const handleEditTags = (selectedTags: SelectedTag[]) => {\n return new Promise<void>((resolve, reject) => {\n if (args.editError) {\n reject(new Error(args.editError));\n } else {\n setTags(\n selectedTags.map(tag => {\n if (tag.newTag) {\n addNewMockTag(tag.text);\n }\n return tag.text;\n })\n );\n resolve();\n }\n });\n };\n\n return (\n <Tags\n tags={tags}\n availableTags={availableTags}\n loading={loading}\n error={args.displayRetry ? { message: args.error, onRetry: () => {} } : args.error}\n onSearch={(query: string) => setFilterValue(query)}\n onEditTags={handleEditTags}\n />\n );\n};\n\nTagsDemo.args = {\n error: '',\n displayRetry: false,\n editError: ''\n};\n\nTagsDemo.argTypes = {\n error: { control: { type: 'text' } },\n displayRetry: { control: { type: 'boolean' } },\n editError: { control: { type: 'text' } }\n};\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { MetaList, Avatar } from '@pega/cosmos-react-core';
|
|
3
|
+
import { TaskList } from '@pega/cosmos-react-work';
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Work/TaskList',
|
|
6
|
+
component: TaskList
|
|
7
|
+
};
|
|
8
|
+
export const TaskListDemo = () => {
|
|
9
|
+
const items = [
|
|
10
|
+
{
|
|
11
|
+
name: 'Send references',
|
|
12
|
+
meta: _jsx(MetaList, { items: [' Due in 1d', 'Priority 95'] }, void 0),
|
|
13
|
+
avatar: _jsx(Avatar, { name: 'James Gregory' }, void 0)
|
|
14
|
+
}
|
|
15
|
+
];
|
|
16
|
+
return _jsx(TaskList, { items: items }, void 0);
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=TaskList.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskList.stories.js","sourceRoot":"","sources":["../../../src/work/Tasks/TaskList.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAiB,MAAM,yBAAyB,CAAC;AAElE,eAAe;IACb,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,QAAQ;CACZ,CAAC;AAEV,MAAM,CAAC,MAAM,YAAY,GAAU,GAAG,EAAE;IACtC,MAAM,KAAK,GAAoB;QAC7B;YACE,IAAI,EAAE,iBAAiB;YACvB,IAAI,EAAE,KAAC,QAAQ,IAAC,KAAK,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC,WAAI;YACxD,MAAM,EAAE,KAAC,MAAM,IAAC,IAAI,EAAC,eAAe,WAAG;SACxC;KACF,CAAC;IAEF,OAAO,KAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,WAAI,CAAC;AACpC,CAAC,CAAC","sourcesContent":["import { Story, Meta } from '@storybook/react';\n\nimport { MetaList, Avatar } from '@pega/cosmos-react-core';\nimport { TaskList, TaskItemProps } from '@pega/cosmos-react-work';\n\nexport default {\n title: 'Work/TaskList',\n component: TaskList\n} as Meta;\n\nexport const TaskListDemo: Story = () => {\n const items: TaskItemProps[] = [\n {\n name: 'Send references',\n meta: <MetaList items={[' Due in 1d', 'Priority 95']} />,\n avatar: <Avatar name='James Gregory' />\n }\n ];\n\n return <TaskList items={items} />;\n};\n"]}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, useState } from 'react';
|
|
3
|
+
import { Avatar, Button, MenuButton, MetaList, Text, Form, Input, TextArea, RadioCheckGroup, RadioButton, Checkbox, DateInput, NumberInput, FileInput, menuHelpers, Status, Link, DateTimeDisplay, EmptyState } from '@pega/cosmos-react-core';
|
|
4
|
+
import { Tasks } from '@pega/cosmos-react-work';
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Work/Tasks',
|
|
7
|
+
component: Tasks
|
|
8
|
+
};
|
|
9
|
+
export const TasksDemo = (args) => {
|
|
10
|
+
const [isLimited, setIsLimited] = useState(true);
|
|
11
|
+
const [hasOpenTask, setHasOpenTask] = useState(false);
|
|
12
|
+
const DemoTaskForm = ({ onSubmit, onCancel }) => {
|
|
13
|
+
return (_jsxs(Form, { actions: _jsxs(_Fragment, { children: [_jsx(Button, { onClick: onCancel, children: "Cancel" }, void 0), _jsx(Button, { variant: 'primary', onClick: onSubmit, children: "Submit" }, void 0)] }, void 0), children: [_jsx(Input, { label: 'Text field 1', required: true }, void 0), _jsx(Input, { label: 'Text field 2' }, void 0), _jsx(NumberInput, { label: 'Number field' }, void 0), _jsx(Checkbox, { label: 'Boolean field', required: true }, void 0), _jsxs(RadioCheckGroup, { label: 'Picklist options', name: 'picklist-1', children: [_jsx(RadioButton, { label: 'option 1', defaultChecked: true }, void 0), _jsx(RadioButton, { label: 'option 2' }, void 0), _jsx(RadioButton, { label: 'option 3' }, void 0)] }, void 0), _jsx(TextArea, { label: 'Text paragraph field', required: true }, void 0), _jsx(FileInput, { label: 'File field' }, void 0), _jsx(DateInput, { label: 'Datetime field' }, void 0)] }, void 0));
|
|
14
|
+
};
|
|
15
|
+
const [workGroups, setWorkGroups] = useState(() => {
|
|
16
|
+
return Array.from({ length: 10 }, (_, i) => {
|
|
17
|
+
return {
|
|
18
|
+
id: `${i + 1}`,
|
|
19
|
+
primary: `Workgroup ${i + 1}`,
|
|
20
|
+
count: Math.floor(Math.random() * 10),
|
|
21
|
+
selected: i === 0,
|
|
22
|
+
visual: _jsx(Avatar, { size: 'l', name: `Team ${i + 1}` }, void 0)
|
|
23
|
+
};
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
const activeGroup = useMemo(() => menuHelpers.getSelected(workGroups)[0], [workGroups]);
|
|
27
|
+
const activeGroupTaskCount = activeGroup?.count ?? 0;
|
|
28
|
+
const groupSelection = useMemo(() => {
|
|
29
|
+
return (_jsx(MenuButton, { variant: 'text', text: activeGroup.primary, menu: {
|
|
30
|
+
mode: 'single-select',
|
|
31
|
+
items: workGroups,
|
|
32
|
+
onItemClick: id => {
|
|
33
|
+
setWorkGroups(currentWorkGroups => {
|
|
34
|
+
return menuHelpers.mapTree(currentWorkGroups, group => {
|
|
35
|
+
if (id === group.id || group.selected) {
|
|
36
|
+
return { ...group, selected: id === group.id };
|
|
37
|
+
}
|
|
38
|
+
return group;
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
} }, void 0));
|
|
43
|
+
}, [activeGroup.primary]);
|
|
44
|
+
const taskArray = useMemo(() => Array.from({ length: isLimited ? Math.min(3, activeGroupTaskCount) : activeGroupTaskCount }, (_, i) => {
|
|
45
|
+
const dueIn = 86400000 * i;
|
|
46
|
+
let status = 'info';
|
|
47
|
+
if (i === 0) {
|
|
48
|
+
status = 'urgent';
|
|
49
|
+
}
|
|
50
|
+
else if (i === 1) {
|
|
51
|
+
status = 'warn';
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
name: `Task ${i + 1}`,
|
|
55
|
+
meta: (_jsx(MetaList, { items: [
|
|
56
|
+
_jsx(Status, { variant: status, children: status }, void 0),
|
|
57
|
+
_jsxs(Text, { variant: 'secondary', children: ["Due ", _jsx(DateTimeDisplay, { variant: 'relative', value: Date.now() + dueIn }, void 0)] }, void 0),
|
|
58
|
+
_jsx(Link, { href: '#demo', children: "Parent case link" }, void 0)
|
|
59
|
+
] }, void 0)),
|
|
60
|
+
actions: (_jsx(Button, { onClick: () => {
|
|
61
|
+
setHasOpenTask(true);
|
|
62
|
+
}, children: "Go" }, void 0)),
|
|
63
|
+
content: hasOpenTask ? (_jsx(DemoTaskForm, { onSubmit: () => {
|
|
64
|
+
setHasOpenTask(false);
|
|
65
|
+
}, onCancel: () => {
|
|
66
|
+
setHasOpenTask(false);
|
|
67
|
+
} }, void 0)) : null
|
|
68
|
+
};
|
|
69
|
+
}), [isLimited, activeGroup, hasOpenTask]);
|
|
70
|
+
return (_jsx(Tasks, { headerText: args.headerText || 'Tasks', count: activeGroupTaskCount, items: taskArray, headerVisual: activeGroup ? _jsx(Avatar, { size: 'l', name: activeGroup.primary }, void 0) : undefined, headerSecondary: groupSelection, emptyPlaceholder: _jsx(EmptyState, {}, void 0), onExpandToggle: () => {
|
|
71
|
+
setIsLimited(cur => !cur);
|
|
72
|
+
} }, void 0));
|
|
73
|
+
};
|
|
74
|
+
TasksDemo.args = {
|
|
75
|
+
headerText: 'Tasks'
|
|
76
|
+
};
|
|
77
|
+
TasksDemo.argTypes = {
|
|
78
|
+
headerText: { control: { type: 'text' } }
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=Tasks.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tasks.stories.js","sourceRoot":"","sources":["../../../src/work/Tasks/Tasks.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EACL,MAAM,EACN,MAAM,EACN,UAAU,EAEV,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,eAAe,EACf,WAAW,EACX,QAAQ,EACR,SAAS,EACT,WAAW,EACX,SAAS,EACT,WAAW,EACX,MAAM,EACN,IAAI,EACJ,eAAe,EAEf,UAAU,EACX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,KAAK,EAA6B,MAAM,yBAAyB,CAAC;AAE3E,eAAe;IACb,KAAK,EAAE,YAAY;IACnB,SAAS,EAAE,KAAK;CACT,CAAC;AAMV,MAAM,CAAC,MAAM,SAAS,GAA2B,CAAC,IAAqB,EAAE,EAAE;IACzE,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IACjD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEtD,MAAM,YAAY,GAAG,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAkD,EAAE,EAAE;QAC9F,OAAO,CACL,MAAC,IAAI,IACH,OAAO,EACL,8BACE,KAAC,MAAM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,EAC3B,KAAK,EAAE,SAAS,EAChB,YAAY,EAAE,WAAW,CAAC,CAAC,CAAC,KAAC,MAAM,IAAC,IAAI,EAAC,GAAG,EAAC,IAAI,EAAE,WAAW,CAAC,OAAO,WAAI,CAAC,CAAC,CAAC,SAAS,EACtF,eAAe,EAAE,cAAc,EAC/B,gBAAgB,EAAE,KAAC,UAAU,aAAG,EAChC,cAAc,EAAE,GAAG,EAAE;YACnB,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;QAC5B,CAAC,WACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,CAAC,IAAI,GAAG;IACf,UAAU,EAAE,OAAO;CACpB,CAAC;AAEF,SAAS,CAAC,QAAQ,GAAG;IACnB,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CAC1C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useMemo, useState } from 'react';\n\nimport {\n Avatar,\n Button,\n MenuButton,\n MenuProps,\n MetaList,\n Text,\n Form,\n Input,\n TextArea,\n RadioCheckGroup,\n RadioButton,\n Checkbox,\n DateInput,\n NumberInput,\n FileInput,\n menuHelpers,\n Status,\n Link,\n DateTimeDisplay,\n StatusProps,\n EmptyState\n} from '@pega/cosmos-react-core';\nimport { Tasks, TasksProps, TaskItemProps } from '@pega/cosmos-react-work';\n\nexport default {\n title: 'Work/Tasks',\n component: Tasks\n} as Meta;\n\ninterface TasksStoryProps {\n headerText?: TasksProps['headerText'];\n}\n\nexport const TasksDemo: Story<TasksStoryProps> = (args: TasksStoryProps) => {\n const [isLimited, setIsLimited] = useState(true);\n const [hasOpenTask, setHasOpenTask] = useState(false);\n\n const DemoTaskForm = ({ onSubmit, onCancel }: { onSubmit: () => void; onCancel: () => void }) => {\n return (\n <Form\n actions={\n <>\n <Button onClick={onCancel}>Cancel</Button>\n <Button variant='primary' onClick={onSubmit}>\n Submit\n </Button>\n </>\n }\n >\n <Input label='Text field 1' required />\n <Input label='Text field 2' />\n <NumberInput label='Number field' />\n <Checkbox label='Boolean field' required />\n <RadioCheckGroup label='Picklist options' name='picklist-1'>\n <RadioButton label='option 1' defaultChecked />\n <RadioButton label='option 2' />\n <RadioButton label='option 3' />\n </RadioCheckGroup>\n <TextArea label='Text paragraph field' required />\n <FileInput label='File field' />\n <DateInput label='Datetime field' />\n </Form>\n );\n };\n\n const [workGroups, setWorkGroups] = useState<MenuProps['items']>(() => {\n return Array.from({ length: 10 }, (_, i) => {\n return {\n id: `${i + 1}`,\n primary: `Workgroup ${i + 1}`,\n count: Math.floor(Math.random() * 10),\n selected: i === 0,\n visual: <Avatar size='l' name={`Team ${i + 1}`} />\n };\n });\n });\n\n const activeGroup = useMemo(() => menuHelpers.getSelected(workGroups)[0], [workGroups]);\n const activeGroupTaskCount = activeGroup?.count ?? 0;\n\n const groupSelection = useMemo(() => {\n return (\n <MenuButton\n variant='text'\n text={activeGroup.primary}\n menu={{\n mode: 'single-select',\n items: workGroups,\n onItemClick: id => {\n setWorkGroups(currentWorkGroups => {\n return menuHelpers.mapTree(currentWorkGroups, group => {\n if (id === group.id || group.selected) {\n return { ...group, selected: id === group.id };\n }\n\n return group;\n });\n });\n }\n }}\n />\n );\n }, [activeGroup.primary]);\n\n const taskArray: TaskItemProps[] = useMemo(\n () =>\n Array.from(\n { length: isLimited ? Math.min(3, activeGroupTaskCount) : activeGroupTaskCount },\n (_, i) => {\n const dueIn = 86400000 * i;\n let status: StatusProps['variant'] = 'info';\n\n if (i === 0) {\n status = 'urgent';\n } else if (i === 1) {\n status = 'warn';\n }\n\n return {\n name: `Task ${i + 1}`,\n meta: (\n <MetaList\n items={[\n <Status variant={status}>{status}</Status>,\n <Text variant='secondary'>\n Due <DateTimeDisplay variant='relative' value={Date.now() + dueIn} />\n </Text>,\n <Link href='#demo'>Parent case link</Link>\n ]}\n />\n ),\n actions: (\n <Button\n onClick={() => {\n setHasOpenTask(true);\n }}\n >\n Go\n </Button>\n ),\n content: hasOpenTask ? (\n <DemoTaskForm\n onSubmit={() => {\n setHasOpenTask(false);\n }}\n onCancel={() => {\n setHasOpenTask(false);\n }}\n />\n ) : null\n };\n }\n ),\n [isLimited, activeGroup, hasOpenTask]\n );\n\n return (\n <Tasks\n headerText={args.headerText || 'Tasks'}\n count={activeGroupTaskCount}\n items={taskArray}\n headerVisual={activeGroup ? <Avatar size='l' name={activeGroup.primary} /> : undefined}\n headerSecondary={groupSelection}\n emptyPlaceholder={<EmptyState />}\n onExpandToggle={() => {\n setIsLimited(cur => !cur);\n }}\n />\n );\n};\n\nTasksDemo.args = {\n headerText: 'Tasks'\n};\n\nTasksDemo.argTypes = {\n headerText: { control: { type: 'text' } }\n};\n"]}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Link, Text } from '@pega/cosmos-react-core';
|
|
3
|
+
export const activity = [
|
|
4
|
+
{
|
|
5
|
+
id: '1',
|
|
6
|
+
date: Date.UTC(2025, 2, 20, 19, 28, 22),
|
|
7
|
+
title: 'Email blast: "Buy today"',
|
|
8
|
+
icon: 'bell-off-solid'
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
id: '2',
|
|
12
|
+
date: Date.UTC(2025, 2, 20, 18, 6, 22),
|
|
13
|
+
title: 'Confirm eligibility',
|
|
14
|
+
icon: 'circle-stacked-mixed'
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
id: '3',
|
|
18
|
+
date: Date.UTC(2021, 1, 20, 13, 20, 22),
|
|
19
|
+
title: 'Sent over request',
|
|
20
|
+
icon: 'bulb-solid',
|
|
21
|
+
status: { variant: 'success', children: 'Good' },
|
|
22
|
+
content: [
|
|
23
|
+
{ id: '31', name: 'Date range', value: _jsx(Text, { children: "Jan 1, 2021 - May 3, 2021" }, void 0) },
|
|
24
|
+
{
|
|
25
|
+
id: '32',
|
|
26
|
+
name: "What's next",
|
|
27
|
+
value: (_jsx(Text, { children: "We will fulfill your request within 3 business days. You will receive your statement copy via mail at 23 Main St. Boston, MA." }, void 0))
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: '4',
|
|
33
|
+
date: Date.UTC(2021, 1, 20, 13, 19, 22),
|
|
34
|
+
title: 'Fulfill customer request for last month’s billing statement',
|
|
35
|
+
icon: 'layers',
|
|
36
|
+
status: { variant: 'pending', children: 'Wait' },
|
|
37
|
+
content: [
|
|
38
|
+
{ id: '41', name: 'Date range', value: _jsx(Text, { children: "Jan 1, 2021 - May 3, 2021" }, void 0) },
|
|
39
|
+
{
|
|
40
|
+
id: '42',
|
|
41
|
+
name: "What's next",
|
|
42
|
+
value: (_jsx(Text, { children: "We will fulfill your request within 3 business days. You will receive your statement copy via mail at 23 Main St. Boston, MA." }, void 0))
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: '5',
|
|
48
|
+
date: Date.UTC(2021, 1, 20, 0, 1, 22),
|
|
49
|
+
title: (_jsx(Link, { href: 'https://community.pega.com/support', target: '_blank', children: "Visit Pega support for assistance" }, void 0))
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: '6',
|
|
53
|
+
date: Date.UTC(2021, 1, 19, 13, 20, 22),
|
|
54
|
+
title: 'Sent over request',
|
|
55
|
+
icon: 'bulb-solid',
|
|
56
|
+
status: { variant: 'success', children: 'Good' },
|
|
57
|
+
content: [
|
|
58
|
+
{ id: '61', name: 'Date range', value: _jsx(Text, { children: "Jan 1, 2021 - May 3, 2021" }, void 0) },
|
|
59
|
+
{
|
|
60
|
+
id: '62',
|
|
61
|
+
name: "What's next",
|
|
62
|
+
value: (_jsx(Text, { children: "We will fulfill your request within 3 business days. You will receive your statement copy via mail at 23 Main St. Boston, MA." }, void 0))
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
id: '7',
|
|
68
|
+
date: Date.UTC(2021, 1, 17, 36, 20, 22),
|
|
69
|
+
title: 'Initial claim received',
|
|
70
|
+
status: { variant: 'pending', children: 'Wait' }
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: '8',
|
|
74
|
+
date: Date.UTC(2020, 2, 20, 19, 28, 22),
|
|
75
|
+
title: 'Email blast: "Best Offer"',
|
|
76
|
+
icon: 'bell-off-solid'
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: '9',
|
|
80
|
+
date: Date.UTC(2022, 7, 10, 18, 6, 22),
|
|
81
|
+
title: 'Confirm eligibility',
|
|
82
|
+
icon: 'circle-stacked-mixed'
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
id: '10',
|
|
86
|
+
date: Date.UTC(2021, 6, 10, 13, 20, 22),
|
|
87
|
+
title: 'Update plat',
|
|
88
|
+
icon: 'bulb-solid',
|
|
89
|
+
status: { variant: 'success', children: 'Good' }
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
id: '11',
|
|
93
|
+
date: Date.UTC(2020, 12, 15, 13, 19, 22),
|
|
94
|
+
title: 'Balance inquiry',
|
|
95
|
+
icon: 'phone-solid',
|
|
96
|
+
status: { variant: 'pending', children: 'Wait' }
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: '12',
|
|
100
|
+
date: Date.UTC(2022, 6, 18, 0, 1, 22),
|
|
101
|
+
title: (_jsx(Link, { href: 'https://www.pega.com', target: '_blank', children: "Visit Pega" }, void 0))
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
id: '13',
|
|
105
|
+
date: Date.UTC(2023, 2, 10, 9, 26, 22),
|
|
106
|
+
title: 'Review customer bill',
|
|
107
|
+
status: { variant: 'pending', children: 'Wait' }
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
id: '14',
|
|
111
|
+
date: Date.UTC(2020, 1, 12, 10, 25, 48),
|
|
112
|
+
title: 'Receive customer bill',
|
|
113
|
+
icon: 'layers',
|
|
114
|
+
status: { variant: 'success', children: 'Good' }
|
|
115
|
+
}
|
|
116
|
+
];
|
|
117
|
+
//# sourceMappingURL=Timeline.mocks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Timeline.mocks.js","sourceRoot":"","sources":["../../../src/work/Timeline/Timeline.mocks.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAGrD,MAAM,CAAC,MAAM,QAAQ,GAA8B;IACjD;QACE,EAAE,EAAE,GAAG;QACP,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;QACvC,KAAK,EAAE,0BAA0B;QACjC,IAAI,EAAE,gBAAgB;KACvB;IACD;QACE,EAAE,EAAE,GAAG;QACP,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;QACtC,KAAK,EAAE,qBAAqB;QAC5B,IAAI,EAAE,sBAAsB;KAC7B;IACD;QACE,EAAE,EAAE,GAAG;QACP,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;QACvC,KAAK,EAAE,mBAAmB;QAC1B,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE;QAChD,OAAO,EAAE;YACP,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,KAAC,IAAI,oDAAiC,EAAE;YAC/E;gBACE,EAAE,EAAE,IAAI;gBACR,IAAI,EAAE,aAAa;gBACnB,KAAK,EAAE,CACL,KAAC,I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D;QACE,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,KAAK,EAAE,CACL,KAAC,IAAI,IAAC,IAAI,EAAC,sBAAsB,EAAC,MAAM,EAAC,QAAQ,mCAE1C,CACR;KACF;IACD;QACE,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC;QACtC,KAAK,EAAE,sBAAsB;QAC7B,MAAM,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE;KACjD;IACD;QACE,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;QACvC,KAAK,EAAE,uBAAuB;QAC9B,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE;KACjD;CACF,CAAC","sourcesContent":["import { Link, Text } from '@pega/cosmos-react-core';\nimport { TimelineProps } from '@pega/cosmos-react-work';\n\nexport const activity: TimelineProps['activity'] = [\n {\n id: '1',\n date: Date.UTC(2025, 2, 20, 19, 28, 22),\n title: 'Email blast: \"Buy today\"',\n icon: 'bell-off-solid'\n },\n {\n id: '2',\n date: Date.UTC(2025, 2, 20, 18, 6, 22),\n title: 'Confirm eligibility',\n icon: 'circle-stacked-mixed'\n },\n {\n id: '3',\n date: Date.UTC(2021, 1, 20, 13, 20, 22),\n title: 'Sent over request',\n icon: 'bulb-solid',\n status: { variant: 'success', children: 'Good' },\n content: [\n { id: '31', name: 'Date range', value: <Text>Jan 1, 2021 - May 3, 2021</Text> },\n {\n id: '32',\n name: \"What's next\",\n value: (\n <Text>\n We will fulfill your request within 3 business days. You will receive your statement\n copy via mail at 23 Main St. Boston, MA.\n </Text>\n )\n }\n ]\n },\n {\n id: '4',\n date: Date.UTC(2021, 1, 20, 13, 19, 22),\n title: 'Fulfill customer request for last month’s billing statement',\n icon: 'layers',\n status: { variant: 'pending', children: 'Wait' },\n content: [\n { id: '41', name: 'Date range', value: <Text>Jan 1, 2021 - May 3, 2021</Text> },\n {\n id: '42',\n name: \"What's next\",\n value: (\n <Text>\n We will fulfill your request within 3 business days. You will receive your statement\n copy via mail at 23 Main St. Boston, MA.\n </Text>\n )\n }\n ]\n },\n {\n id: '5',\n date: Date.UTC(2021, 1, 20, 0, 1, 22),\n title: (\n <Link href='https://community.pega.com/support' target='_blank'>\n Visit Pega support for assistance\n </Link>\n )\n },\n {\n id: '6',\n date: Date.UTC(2021, 1, 19, 13, 20, 22),\n title: 'Sent over request',\n icon: 'bulb-solid',\n status: { variant: 'success', children: 'Good' },\n content: [\n { id: '61', name: 'Date range', value: <Text>Jan 1, 2021 - May 3, 2021</Text> },\n {\n id: '62',\n name: \"What's next\",\n value: (\n <Text>\n We will fulfill your request within 3 business days. You will receive your statement\n copy via mail at 23 Main St. Boston, MA.\n </Text>\n )\n }\n ]\n },\n {\n id: '7',\n date: Date.UTC(2021, 1, 17, 36, 20, 22),\n title: 'Initial claim received',\n status: { variant: 'pending', children: 'Wait' }\n },\n {\n id: '8',\n date: Date.UTC(2020, 2, 20, 19, 28, 22),\n title: 'Email blast: \"Best Offer\"',\n icon: 'bell-off-solid'\n },\n {\n id: '9',\n date: Date.UTC(2022, 7, 10, 18, 6, 22),\n title: 'Confirm eligibility',\n icon: 'circle-stacked-mixed'\n },\n {\n id: '10',\n date: Date.UTC(2021, 6, 10, 13, 20, 22),\n title: 'Update plat',\n icon: 'bulb-solid',\n status: { variant: 'success', children: 'Good' }\n },\n {\n id: '11',\n date: Date.UTC(2020, 12, 15, 13, 19, 22),\n title: 'Balance inquiry',\n icon: 'phone-solid',\n status: { variant: 'pending', children: 'Wait' }\n },\n {\n id: '12',\n date: Date.UTC(2022, 6, 18, 0, 1, 22),\n title: (\n <Link href='https://www.pega.com' target='_blank'>\n Visit Pega\n </Link>\n )\n },\n {\n id: '13',\n date: Date.UTC(2023, 2, 10, 9, 26, 22),\n title: 'Review customer bill',\n status: { variant: 'pending', children: 'Wait' }\n },\n {\n id: '14',\n date: Date.UTC(2020, 1, 12, 10, 25, 48),\n title: 'Receive customer bill',\n icon: 'layers',\n status: { variant: 'success', children: 'Good' }\n }\n];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Timeline.stories.d.ts","sourceRoot":"","sources":["../../../src/work/Timeline/Timeline.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAY,aAAa,EAAE,MAAM,yBAAyB,CAAC;;AAIlE,wBAGU;
|
|
1
|
+
{"version":3,"file":"Timeline.stories.d.ts","sourceRoot":"","sources":["../../../src/work/Timeline/Timeline.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAY,aAAa,EAAE,MAAM,yBAAyB,CAAC;;AAIlE,wBAGU;AAEV,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,UAAU,CAAC,aAAa,EAAE,UAAU,GAAG,aAAa,CAAC,CA6CrF,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useState } from 'react';
|
|
3
|
+
import { Timeline } from '@pega/cosmos-react-work';
|
|
4
|
+
import { activity } from './Timeline.mocks';
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Work/Timeline',
|
|
7
|
+
component: Timeline
|
|
8
|
+
};
|
|
9
|
+
export const TimelineDemo = (args) => {
|
|
10
|
+
const INITIAL_CHUNK_SIZE = 7;
|
|
11
|
+
const APPEND_CHUNK_SIZE = 3;
|
|
12
|
+
const [loading, setLoading] = useState(false);
|
|
13
|
+
const [hasMore, setHasMore] = useState(true);
|
|
14
|
+
const [items, setItems] = useState(() => activity.slice(0, INITIAL_CHUNK_SIZE));
|
|
15
|
+
const loadMore = useCallback(() => {
|
|
16
|
+
if (!loading) {
|
|
17
|
+
setLoading(true);
|
|
18
|
+
setTimeout(() => {
|
|
19
|
+
setLoading(false);
|
|
20
|
+
setItems(prevItems => {
|
|
21
|
+
const previousItemsLength = prevItems.length;
|
|
22
|
+
const newItems = activity.slice(previousItemsLength, previousItemsLength + APPEND_CHUNK_SIZE);
|
|
23
|
+
if (newItems.length === 0) {
|
|
24
|
+
setHasMore(false);
|
|
25
|
+
}
|
|
26
|
+
return [...prevItems, ...newItems];
|
|
27
|
+
});
|
|
28
|
+
}, 2000);
|
|
29
|
+
}
|
|
30
|
+
}, [loading]);
|
|
31
|
+
return (_jsx(Timeline, { activity: items, currentTime: new Date(), sortOrder: args.sortOrder, groupBy: args.groupBy, loading: loading, loadMore: hasMore ? loadMore : undefined }, void 0));
|
|
32
|
+
};
|
|
33
|
+
TimelineDemo.args = {
|
|
34
|
+
sortOrder: 'descending',
|
|
35
|
+
groupBy: 'date'
|
|
36
|
+
};
|
|
37
|
+
TimelineDemo.argTypes = {
|
|
38
|
+
sortOrder: { options: ['ascending', 'descending'], control: { type: 'select' } },
|
|
39
|
+
groupBy: {
|
|
40
|
+
options: ['date', 'monthyear', 'quarteryear', 'year', 'none'],
|
|
41
|
+
control: { type: 'select' }
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=Timeline.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Timeline.stories.js","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AC,GAAG,SAAS,EAAE,GAAG,QAAQ,CAAC,CAAC;gBACrC,CAAC,CAAC,CAAC;YACL,CAAC,EAAE,IAAI,CAAC,CAAC;SACV;IACH,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,OAAO,CACL,KAAC,QAAQ,IACP,QAAQ,EAAE,KAAK,EACf,WAAW,EAAE,IAAI,IAAI,EAAE,EACvB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,WACxC,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,YAAY,CAAC,IAAI,GAAG;IAClB,SAAS,EAAE,YAAY;IACvB,OAAO,EAAE,MAAM;CAChB,CAAC;AAEF,YAAY,CAAC,QAAQ,GAAG;IACtB,SAAS,EAAE,EAAE,OAAO,EAAE,CAAC,WAAW,EAAE,YAAY,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IAChF,OAAO,EAAE;QACP,OAAO,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,CAAC;QAC7D,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC5B;CACF,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useCallback, useState } from 'react';\n\nimport { OmitStrict } from '@pega/cosmos-react-core';\nimport { Timeline, TimelineProps } from '@pega/cosmos-react-work';\n\nimport { activity } from './Timeline.mocks';\n\nexport default {\n title: 'Work/Timeline',\n component: Timeline\n} as Meta;\n\nexport const TimelineDemo: Story<OmitStrict<TimelineProps, 'activity' | 'currentTime'>> = (\n args: OmitStrict<TimelineProps, 'activity' | 'currentTime'>\n) => {\n const INITIAL_CHUNK_SIZE = 7;\n const APPEND_CHUNK_SIZE = 3;\n\n const [loading, setLoading] = useState(false);\n const [hasMore, setHasMore] = useState(true);\n const [items, setItems] = useState<TimelineProps['activity']>(() =>\n activity.slice(0, INITIAL_CHUNK_SIZE)\n );\n\n const loadMore = useCallback(() => {\n if (!loading) {\n setLoading(true);\n setTimeout(() => {\n setLoading(false);\n\n setItems(prevItems => {\n const previousItemsLength = prevItems.length;\n const newItems = activity.slice(\n previousItemsLength,\n previousItemsLength + APPEND_CHUNK_SIZE\n );\n\n if (newItems.length === 0) {\n setHasMore(false);\n }\n\n return [...prevItems, ...newItems];\n });\n }, 2000);\n }\n }, [loading]);\n\n return (\n <Timeline\n activity={items}\n currentTime={new Date()}\n sortOrder={args.sortOrder}\n groupBy={args.groupBy}\n loading={loading}\n loadMore={hasMore ? loadMore : undefined}\n />\n );\n};\n\nTimelineDemo.args = {\n sortOrder: 'descending',\n groupBy: 'date'\n};\n\nTimelineDemo.argTypes = {\n sortOrder: { options: ['ascending', 'descending'], control: { type: 'select' } },\n groupBy: {\n options: ['date', 'monthyear', 'quarteryear', 'year', 'none'],\n control: { type: 'select' }\n }\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/cosmos-react-demos",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.3",
|
|
4
4
|
"author": "Pegasystems",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"repository": {
|
|
@@ -12,26 +12,28 @@
|
|
|
12
12
|
"types": "lib/index.d.ts",
|
|
13
13
|
"files": [
|
|
14
14
|
"LICENSE",
|
|
15
|
-
"lib"
|
|
15
|
+
"lib",
|
|
16
|
+
"jsx"
|
|
16
17
|
],
|
|
17
18
|
"sideEffects": false,
|
|
18
19
|
"scripts": {
|
|
19
20
|
"build": "tsc -b"
|
|
20
21
|
},
|
|
21
22
|
"dependencies": {
|
|
22
|
-
"@pega/cosmos-react-build": "2.
|
|
23
|
-
"@pega/cosmos-react-condition-builder": "2.
|
|
24
|
-
"@pega/cosmos-react-core": "2.
|
|
25
|
-
"@pega/cosmos-react-cs": "2.
|
|
26
|
-
"@pega/cosmos-react-dnd": "2.
|
|
27
|
-
"@pega/cosmos-react-rte": "2.
|
|
28
|
-
"@pega/cosmos-react-social": "2.
|
|
29
|
-
"@pega/cosmos-react-work": "2.
|
|
23
|
+
"@pega/cosmos-react-build": "2.1.3",
|
|
24
|
+
"@pega/cosmos-react-condition-builder": "2.1.3",
|
|
25
|
+
"@pega/cosmos-react-core": "2.1.3",
|
|
26
|
+
"@pega/cosmos-react-cs": "2.1.3",
|
|
27
|
+
"@pega/cosmos-react-dnd": "2.1.3",
|
|
28
|
+
"@pega/cosmos-react-rte": "2.1.3",
|
|
29
|
+
"@pega/cosmos-react-social": "2.1.3",
|
|
30
|
+
"@pega/cosmos-react-work": "2.1.3",
|
|
30
31
|
"emoji-mart": "^3.0.1",
|
|
31
32
|
"polished": "^4.1.0",
|
|
32
33
|
"react": "^16.14.0 || ^17.0.0",
|
|
33
34
|
"react-dom": "^16.14.0 || ^17.0.0",
|
|
34
|
-
"styled-components": "^5.2.0"
|
|
35
|
+
"styled-components": "^5.2.0",
|
|
36
|
+
"tinymce": "^5.10.2"
|
|
35
37
|
},
|
|
36
38
|
"devDependencies": {
|
|
37
39
|
"@storybook/addon-a11y": "^6.4.8",
|