@pega/cosmos-react-demos 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +185 -0
- package/lib/build/AppHeader/AppHeader.stories.d.ts +8 -0
- package/lib/build/AppHeader/AppHeader.stories.d.ts.map +1 -0
- package/lib/build/AppHeader/AppHeader.stories.jsx +65 -0
- package/lib/build/AppHeader/AppHeader.stories.jsx.map +1 -0
- package/lib/build/AppShell/AppShell.mocks.d.ts +50 -0
- package/lib/build/AppShell/AppShell.mocks.d.ts.map +1 -0
- package/lib/build/AppShell/AppShell.mocks.js +503 -0
- package/lib/build/AppShell/AppShell.mocks.js.map +1 -0
- package/lib/build/AppShell/AppShell.stories.d.ts +12 -0
- package/lib/build/AppShell/AppShell.stories.d.ts.map +1 -0
- package/lib/build/AppShell/AppShell.stories.jsx +194 -0
- package/lib/build/AppShell/AppShell.stories.jsx.map +1 -0
- package/lib/build/FlowModeller/AddNodeUtils.mocks.d.ts +45 -0
- package/lib/build/FlowModeller/AddNodeUtils.mocks.d.ts.map +1 -0
- package/lib/build/FlowModeller/AddNodeUtils.mocks.js +291 -0
- package/lib/build/FlowModeller/AddNodeUtils.mocks.js.map +1 -0
- package/lib/build/FlowModeller/FlowModeller.mocks.d.ts +9 -0
- package/lib/build/FlowModeller/FlowModeller.mocks.d.ts.map +1 -0
- package/lib/build/FlowModeller/FlowModeller.mocks.js +411 -0
- package/lib/build/FlowModeller/FlowModeller.mocks.js.map +1 -0
- package/lib/build/FlowModeller/FlowModeller.stories.d.ts +12 -0
- package/lib/build/FlowModeller/FlowModeller.stories.d.ts.map +1 -0
- package/lib/build/FlowModeller/FlowModeller.stories.jsx +214 -0
- package/lib/build/FlowModeller/FlowModeller.stories.jsx.map +1 -0
- package/lib/build/LifeCycle/LifeCycle.mocks.d.ts +201 -0
- package/lib/build/LifeCycle/LifeCycle.mocks.d.ts.map +1 -0
- package/lib/build/LifeCycle/LifeCycle.mocks.js +1128 -0
- package/lib/build/LifeCycle/LifeCycle.mocks.js.map +1 -0
- package/lib/build/LifeCycle/LifeCycle.stories.d.ts +11 -0
- package/lib/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -0
- package/lib/build/LifeCycle/LifeCycle.stories.jsx +491 -0
- package/lib/build/LifeCycle/LifeCycle.stories.jsx.map +1 -0
- package/lib/build/LifeCycle/utils.d.ts +65 -0
- package/lib/build/LifeCycle/utils.d.ts.map +1 -0
- package/lib/build/LifeCycle/utils.js +218 -0
- package/lib/build/LifeCycle/utils.js.map +1 -0
- package/lib/build/PageTemplates/GalleryPage.stories.d.ts +12 -0
- package/lib/build/PageTemplates/GalleryPage.stories.d.ts.map +1 -0
- package/lib/build/PageTemplates/GalleryPage.stories.jsx +126 -0
- package/lib/build/PageTemplates/GalleryPage.stories.jsx.map +1 -0
- package/lib/build/PageTemplates/PageTemplates.stories.d.ts +26 -0
- package/lib/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -0
- package/lib/build/PageTemplates/PageTemplates.stories.jsx +434 -0
- package/lib/build/PageTemplates/PageTemplates.stories.jsx.map +1 -0
- package/lib/build/Workbench/Workbench.mocks.d.ts +9 -0
- package/lib/build/Workbench/Workbench.mocks.d.ts.map +1 -0
- package/lib/build/Workbench/Workbench.mocks.js +67 -0
- package/lib/build/Workbench/Workbench.mocks.js.map +1 -0
- package/lib/build/Workbench/Workbench.stories.d.ts +10 -0
- package/lib/build/Workbench/Workbench.stories.d.ts.map +1 -0
- package/lib/build/Workbench/Workbench.stories.jsx +124 -0
- package/lib/build/Workbench/Workbench.stories.jsx.map +1 -0
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts +10 -0
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts.map +1 -0
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.jsx +263 -0
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.jsx.map +1 -0
- package/lib/condition-builder/ConditionBuilder/props.mock.d.ts +6 -0
- package/lib/condition-builder/ConditionBuilder/props.mock.d.ts.map +1 -0
- package/lib/condition-builder/ConditionBuilder/props.mock.js +113 -0
- package/lib/condition-builder/ConditionBuilder/props.mock.js.map +1 -0
- package/lib/core/AppShell/AppShell.mocks.d.ts +15 -0
- package/lib/core/AppShell/AppShell.mocks.d.ts.map +1 -0
- package/lib/core/AppShell/AppShell.mocks.jsx +147 -0
- package/lib/core/AppShell/AppShell.mocks.jsx.map +1 -0
- package/lib/core/AppShell/AppShell.stories.d.ts +31 -0
- package/lib/core/AppShell/AppShell.stories.d.ts.map +1 -0
- package/lib/core/AppShell/AppShell.stories.jsx +222 -0
- package/lib/core/AppShell/AppShell.stories.jsx.map +1 -0
- package/lib/core/AppShell/AppShell.styles.d.ts +2 -0
- package/lib/core/AppShell/AppShell.styles.d.ts.map +1 -0
- package/lib/core/AppShell/AppShell.styles.js +5 -0
- package/lib/core/AppShell/AppShell.styles.js.map +1 -0
- package/lib/core/Avatar/Avatar.stories.d.ts +10 -0
- package/lib/core/Avatar/Avatar.stories.d.ts.map +1 -0
- package/lib/core/Avatar/Avatar.stories.jsx +50 -0
- package/lib/core/Avatar/Avatar.stories.jsx.map +1 -0
- package/lib/core/Backdrop/Backdrop.stories.d.ts +7 -0
- package/lib/core/Backdrop/Backdrop.stories.d.ts.map +1 -0
- package/lib/core/Backdrop/Backdrop.stories.jsx +43 -0
- package/lib/core/Backdrop/Backdrop.stories.jsx.map +1 -0
- package/lib/core/Badges/Alert.stories.d.ts +6 -0
- package/lib/core/Badges/Alert.stories.d.ts.map +1 -0
- package/lib/core/Badges/Alert.stories.jsx +15 -0
- package/lib/core/Badges/Alert.stories.jsx.map +1 -0
- package/lib/core/Badges/Count.stories.d.ts +6 -0
- package/lib/core/Badges/Count.stories.d.ts.map +1 -0
- package/lib/core/Badges/Count.stories.jsx +20 -0
- package/lib/core/Badges/Count.stories.jsx.map +1 -0
- package/lib/core/Badges/Selection.stories.d.ts +6 -0
- package/lib/core/Badges/Selection.stories.d.ts.map +1 -0
- package/lib/core/Badges/Selection.stories.jsx +9 -0
- package/lib/core/Badges/Selection.stories.jsx.map +1 -0
- package/lib/core/Badges/Status.stories.d.ts +6 -0
- package/lib/core/Badges/Status.stories.d.ts.map +1 -0
- package/lib/core/Badges/Status.stories.jsx +18 -0
- package/lib/core/Badges/Status.stories.jsx.map +1 -0
- package/lib/core/Badges/Tag.stories.d.ts +6 -0
- package/lib/core/Badges/Tag.stories.d.ts.map +1 -0
- package/lib/core/Badges/Tag.stories.jsx +9 -0
- package/lib/core/Badges/Tag.stories.jsx.map +1 -0
- package/lib/core/Banner/Banner.stories.d.ts +22 -0
- package/lib/core/Banner/Banner.stories.d.ts.map +1 -0
- package/lib/core/Banner/Banner.stories.jsx +125 -0
- package/lib/core/Banner/Banner.stories.jsx.map +1 -0
- package/lib/core/Boolean/BooleanDisplay.stories.d.ts +6 -0
- package/lib/core/Boolean/BooleanDisplay.stories.d.ts.map +1 -0
- package/lib/core/Boolean/BooleanDisplay.stories.jsx +19 -0
- package/lib/core/Boolean/BooleanDisplay.stories.jsx.map +1 -0
- package/lib/core/Breadcrumbs/Breadcrumbs.stories.d.ts +7 -0
- package/lib/core/Breadcrumbs/Breadcrumbs.stories.d.ts.map +1 -0
- package/lib/core/Breadcrumbs/Breadcrumbs.stories.jsx +29 -0
- package/lib/core/Breadcrumbs/Breadcrumbs.stories.jsx.map +1 -0
- package/lib/core/Breadcrumbs/Breadcrumbs.styles.d.ts +2 -0
- package/lib/core/Breadcrumbs/Breadcrumbs.styles.d.ts.map +1 -0
- package/lib/core/Breadcrumbs/Breadcrumbs.styles.js +12 -0
- package/lib/core/Breadcrumbs/Breadcrumbs.styles.js.map +1 -0
- package/lib/core/Button/Button.stories.d.ts +12 -0
- package/lib/core/Button/Button.stories.d.ts.map +1 -0
- package/lib/core/Button/Button.stories.jsx +103 -0
- package/lib/core/Button/Button.stories.jsx.map +1 -0
- package/lib/core/Card/Card.stories.d.ts +8 -0
- package/lib/core/Card/Card.stories.d.ts.map +1 -0
- package/lib/core/Card/Card.stories.jsx +55 -0
- package/lib/core/Card/Card.stories.jsx.map +1 -0
- package/lib/core/Card/Card.styles.d.ts +2 -0
- package/lib/core/Card/Card.styles.d.ts.map +1 -0
- package/lib/core/Card/Card.styles.js +5 -0
- package/lib/core/Card/Card.styles.js.map +1 -0
- package/lib/core/Checkbox/Checkbox.stories.d.ts +7 -0
- package/lib/core/Checkbox/Checkbox.stories.d.ts.map +1 -0
- package/lib/core/Checkbox/Checkbox.stories.jsx +28 -0
- package/lib/core/Checkbox/Checkbox.stories.jsx.map +1 -0
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.d.ts +7 -0
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.d.ts.map +1 -0
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.jsx +60 -0
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.jsx.map +1 -0
- package/lib/core/CheckboxGroup/CheckboxGroup.styles.d.ts +4 -0
- package/lib/core/CheckboxGroup/CheckboxGroup.styles.d.ts.map +1 -0
- package/lib/core/CheckboxGroup/CheckboxGroup.styles.js +9 -0
- package/lib/core/CheckboxGroup/CheckboxGroup.styles.js.map +1 -0
- package/lib/core/ColorPicker/ColorPicker.stories.d.ts +8 -0
- package/lib/core/ColorPicker/ColorPicker.stories.d.ts.map +1 -0
- package/lib/core/ColorPicker/ColorPicker.stories.jsx +91 -0
- package/lib/core/ColorPicker/ColorPicker.stories.jsx.map +1 -0
- package/lib/core/ComboBox/ComboBox.mocks.d.ts +24 -0
- package/lib/core/ComboBox/ComboBox.mocks.d.ts.map +1 -0
- package/lib/core/ComboBox/ComboBox.mocks.js +54 -0
- package/lib/core/ComboBox/ComboBox.mocks.js.map +1 -0
- package/lib/core/ComboBox/ComboBox.stories.d.ts +21 -0
- package/lib/core/ComboBox/ComboBox.stories.d.ts.map +1 -0
- package/lib/core/ComboBox/ComboBox.stories.jsx +323 -0
- package/lib/core/ComboBox/ComboBox.stories.jsx.map +1 -0
- package/lib/core/Configuration/Configuration.stories.d.ts +10 -0
- package/lib/core/Configuration/Configuration.stories.d.ts.map +1 -0
- package/lib/core/Configuration/Configuration.stories.jsx +125 -0
- package/lib/core/Configuration/Configuration.stories.jsx.map +1 -0
- package/lib/core/Currency/Currency.stories.d.ts +11 -0
- package/lib/core/Currency/Currency.stories.d.ts.map +1 -0
- package/lib/core/Currency/Currency.stories.jsx +65 -0
- package/lib/core/Currency/Currency.stories.jsx.map +1 -0
- package/lib/core/DateTime/DateTime.stories.d.ts +20 -0
- package/lib/core/DateTime/DateTime.stories.d.ts.map +1 -0
- package/lib/core/DateTime/DateTime.stories.jsx +127 -0
- package/lib/core/DateTime/DateTime.stories.jsx.map +1 -0
- package/lib/core/DateTime/DateTimeDisplay.stories.d.ts +7 -0
- package/lib/core/DateTime/DateTimeDisplay.stories.d.ts.map +1 -0
- package/lib/core/DateTime/DateTimeDisplay.stories.jsx +46 -0
- package/lib/core/DateTime/DateTimeDisplay.stories.jsx.map +1 -0
- package/lib/core/DateTime/DateTimePicker.stories.d.ts +7 -0
- package/lib/core/DateTime/DateTimePicker.stories.d.ts.map +1 -0
- package/lib/core/DateTime/DateTimePicker.stories.jsx +34 -0
- package/lib/core/DateTime/DateTimePicker.stories.jsx.map +1 -0
- package/lib/core/Drawer/Drawer.stories.d.ts +7 -0
- package/lib/core/Drawer/Drawer.stories.d.ts.map +1 -0
- package/lib/core/Drawer/Drawer.stories.jsx +98 -0
- package/lib/core/Drawer/Drawer.stories.jsx.map +1 -0
- package/lib/core/Drawer/Drawer.styles.d.ts +2 -0
- package/lib/core/Drawer/Drawer.styles.d.ts.map +1 -0
- package/lib/core/Drawer/Drawer.styles.js +11 -0
- package/lib/core/Drawer/Drawer.styles.js.map +1 -0
- package/lib/core/Email/EmailDisplay.stories.d.ts +6 -0
- package/lib/core/Email/EmailDisplay.stories.d.ts.map +1 -0
- package/lib/core/Email/EmailDisplay.stories.jsx +19 -0
- package/lib/core/Email/EmailDisplay.stories.jsx.map +1 -0
- package/lib/core/EmojiPicker/EmojiPicker.stories.d.ts +8 -0
- package/lib/core/EmojiPicker/EmojiPicker.stories.d.ts.map +1 -0
- package/lib/core/EmojiPicker/EmojiPicker.stories.jsx +52 -0
- package/lib/core/EmojiPicker/EmojiPicker.stories.jsx.map +1 -0
- package/lib/core/EmptyState/EmptyState.stories.d.ts +6 -0
- package/lib/core/EmptyState/EmptyState.stories.d.ts.map +1 -0
- package/lib/core/EmptyState/EmptyState.stories.jsx +18 -0
- package/lib/core/EmptyState/EmptyState.stories.jsx.map +1 -0
- package/lib/core/ErrorState/ErrorState.stories.d.ts +9 -0
- package/lib/core/ErrorState/ErrorState.stories.d.ts.map +1 -0
- package/lib/core/ErrorState/ErrorState.stories.jsx +20 -0
- package/lib/core/ErrorState/ErrorState.stories.jsx.map +1 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.stories.d.ts +7 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.stories.d.ts.map +1 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.stories.jsx +73 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.stories.jsx.map +1 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.styles.d.ts +4 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.styles.d.ts.map +1 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.styles.js +12 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.styles.js.map +1 -0
- package/lib/core/FieldGroup/FieldGroup.stories.d.ts +11 -0
- package/lib/core/FieldGroup/FieldGroup.stories.d.ts.map +1 -0
- package/lib/core/FieldGroup/FieldGroup.stories.jsx +52 -0
- package/lib/core/FieldGroup/FieldGroup.stories.jsx.map +1 -0
- package/lib/core/FieldGroup/FieldGroupList.stories.d.ts +10 -0
- package/lib/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -0
- package/lib/core/FieldGroup/FieldGroupList.stories.jsx +183 -0
- package/lib/core/FieldGroup/FieldGroupList.stories.jsx.map +1 -0
- package/lib/core/FieldValueList/FieldValueList.stories.d.ts +10 -0
- package/lib/core/FieldValueList/FieldValueList.stories.d.ts.map +1 -0
- package/lib/core/FieldValueList/FieldValueList.stories.jsx +54 -0
- package/lib/core/FieldValueList/FieldValueList.stories.jsx.map +1 -0
- package/lib/core/File/FileDisplay.stories.d.ts +13 -0
- package/lib/core/File/FileDisplay.stories.d.ts.map +1 -0
- package/lib/core/File/FileDisplay.stories.jsx +100 -0
- package/lib/core/File/FileDisplay.stories.jsx.map +1 -0
- package/lib/core/File/FileInput.stories.d.ts +9 -0
- package/lib/core/File/FileInput.stories.d.ts.map +1 -0
- package/lib/core/File/FileInput.stories.jsx +76 -0
- package/lib/core/File/FileInput.stories.jsx.map +1 -0
- package/lib/core/Flex/Flex.styles.d.ts +10 -0
- package/lib/core/Flex/Flex.styles.d.ts.map +1 -0
- package/lib/core/Flex/Flex.styles.js +41 -0
- package/lib/core/Flex/Flex.styles.js.map +1 -0
- package/lib/core/Flex/FlexContainer.stories.d.ts +20 -0
- package/lib/core/Flex/FlexContainer.stories.d.ts.map +1 -0
- package/lib/core/Flex/FlexContainer.stories.jsx +151 -0
- package/lib/core/Flex/FlexContainer.stories.jsx.map +1 -0
- package/lib/core/Flex/FlexItem.stories.d.ts +13 -0
- package/lib/core/Flex/FlexItem.stories.d.ts.map +1 -0
- package/lib/core/Flex/FlexItem.stories.jsx +71 -0
- package/lib/core/Flex/FlexItem.stories.jsx.map +1 -0
- package/lib/core/Form/Form.stories.d.ts +21 -0
- package/lib/core/Form/Form.stories.d.ts.map +1 -0
- package/lib/core/Form/Form.stories.jsx +196 -0
- package/lib/core/Form/Form.stories.jsx.map +1 -0
- package/lib/core/Grid/Grid.styles.d.ts +6 -0
- package/lib/core/Grid/Grid.styles.d.ts.map +1 -0
- package/lib/core/Grid/Grid.styles.js +36 -0
- package/lib/core/Grid/Grid.styles.js.map +1 -0
- package/lib/core/Grid/GridContainer.stories.d.ts +23 -0
- package/lib/core/Grid/GridContainer.stories.d.ts.map +1 -0
- package/lib/core/Grid/GridContainer.stories.jsx +161 -0
- package/lib/core/Grid/GridContainer.stories.jsx.map +1 -0
- package/lib/core/Grid/GridItem.stories.d.ts +13 -0
- package/lib/core/Grid/GridItem.stories.d.ts.map +1 -0
- package/lib/core/Grid/GridItem.stories.jsx +74 -0
- package/lib/core/Grid/GridItem.stories.jsx.map +1 -0
- package/lib/core/Icon/Icon.stories.d.ts +8 -0
- package/lib/core/Icon/Icon.stories.d.ts.map +1 -0
- package/lib/core/Icon/Icon.stories.jsx +84 -0
- package/lib/core/Icon/Icon.stories.jsx.map +1 -0
- package/lib/core/IconPicker/IconPicker.stories.d.ts +6 -0
- package/lib/core/IconPicker/IconPicker.stories.d.ts.map +1 -0
- package/lib/core/IconPicker/IconPicker.stories.jsx +39 -0
- package/lib/core/IconPicker/IconPicker.stories.jsx.map +1 -0
- package/lib/core/Image/Image.stories.d.ts +6 -0
- package/lib/core/Image/Image.stories.d.ts.map +1 -0
- package/lib/core/Image/Image.stories.jsx +9 -0
- package/lib/core/Image/Image.stories.jsx.map +1 -0
- package/lib/core/Input/Input.stories.d.ts +9 -0
- package/lib/core/Input/Input.stories.d.ts.map +1 -0
- package/lib/core/Input/Input.stories.jsx +44 -0
- package/lib/core/Input/Input.stories.jsx.map +1 -0
- package/lib/core/Label/Label.stories.d.ts +6 -0
- package/lib/core/Label/Label.stories.d.ts.map +1 -0
- package/lib/core/Label/Label.stories.jsx +15 -0
- package/lib/core/Label/Label.stories.jsx.map +1 -0
- package/lib/core/Lightbox/Lightbox.stories.d.ts +9 -0
- package/lib/core/Lightbox/Lightbox.stories.d.ts.map +1 -0
- package/lib/core/Lightbox/Lightbox.stories.jsx +106 -0
- package/lib/core/Lightbox/Lightbox.stories.jsx.map +1 -0
- package/lib/core/Link/Link.stories.d.ts +8 -0
- package/lib/core/Link/Link.stories.d.ts.map +1 -0
- package/lib/core/Link/Link.stories.jsx +32 -0
- package/lib/core/Link/Link.stories.jsx.map +1 -0
- package/lib/core/List/CommaSeparatedList.stories.d.ts +6 -0
- package/lib/core/List/CommaSeparatedList.stories.d.ts.map +1 -0
- package/lib/core/List/CommaSeparatedList.stories.jsx +33 -0
- package/lib/core/List/CommaSeparatedList.stories.jsx.map +1 -0
- package/lib/core/List/OrderedList.stories.d.ts +10 -0
- package/lib/core/List/OrderedList.stories.d.ts.map +1 -0
- package/lib/core/List/OrderedList.stories.jsx +38 -0
- package/lib/core/List/OrderedList.stories.jsx.map +1 -0
- package/lib/core/List/UnorderedList.stories.d.ts +10 -0
- package/lib/core/List/UnorderedList.stories.d.ts.map +1 -0
- package/lib/core/List/UnorderedList.stories.jsx +38 -0
- package/lib/core/List/UnorderedList.stories.jsx.map +1 -0
- package/lib/core/Location/Location.stories.d.ts +12 -0
- package/lib/core/Location/Location.stories.d.ts.map +1 -0
- package/lib/core/Location/Location.stories.jsx +130 -0
- package/lib/core/Location/Location.stories.jsx.map +1 -0
- package/lib/core/Menu/Menu.mocks.d.ts +4 -0
- package/lib/core/Menu/Menu.mocks.d.ts.map +1 -0
- package/lib/core/Menu/Menu.mocks.js +179 -0
- package/lib/core/Menu/Menu.mocks.js.map +1 -0
- package/lib/core/Menu/Menu.stories.d.ts +17 -0
- package/lib/core/Menu/Menu.stories.d.ts.map +1 -0
- package/lib/core/Menu/Menu.stories.jsx +166 -0
- package/lib/core/Menu/Menu.stories.jsx.map +1 -0
- package/lib/core/Menu/Menu.styles.d.ts +2 -0
- package/lib/core/Menu/Menu.styles.d.ts.map +1 -0
- package/lib/core/Menu/Menu.styles.js +6 -0
- package/lib/core/Menu/Menu.styles.js.map +1 -0
- package/lib/core/MenuButton/MenuButton.stories.d.ts +15 -0
- package/lib/core/MenuButton/MenuButton.stories.d.ts.map +1 -0
- package/lib/core/MenuButton/MenuButton.stories.jsx +188 -0
- package/lib/core/MenuButton/MenuButton.stories.jsx.map +1 -0
- package/lib/core/MetaList/MetaList.stories.d.ts +9 -0
- package/lib/core/MetaList/MetaList.stories.d.ts.map +1 -0
- package/lib/core/MetaList/MetaList.stories.jsx +24 -0
- package/lib/core/MetaList/MetaList.stories.jsx.map +1 -0
- package/lib/core/Modal/Modal.mocks.d.ts +4 -0
- package/lib/core/Modal/Modal.mocks.d.ts.map +1 -0
- package/lib/core/Modal/Modal.mocks.jsx +44 -0
- package/lib/core/Modal/Modal.mocks.jsx.map +1 -0
- package/lib/core/Modal/Modal.stories.d.ts +20 -0
- package/lib/core/Modal/Modal.stories.d.ts.map +1 -0
- package/lib/core/Modal/Modal.stories.jsx +305 -0
- package/lib/core/Modal/Modal.stories.jsx.map +1 -0
- package/lib/core/MultiStep/MultiStep.stories.d.ts +6 -0
- package/lib/core/MultiStep/MultiStep.stories.d.ts.map +1 -0
- package/lib/core/MultiStep/MultiStep.stories.jsx +56 -0
- package/lib/core/MultiStep/MultiStep.stories.jsx.map +1 -0
- package/lib/core/Number/Number.stories.d.ts +13 -0
- package/lib/core/Number/Number.stories.d.ts.map +1 -0
- package/lib/core/Number/Number.stories.jsx +110 -0
- package/lib/core/Number/Number.stories.jsx.map +1 -0
- package/lib/core/PageTemplates/PageTemplates.mocks.d.ts +3 -0
- package/lib/core/PageTemplates/PageTemplates.mocks.d.ts.map +1 -0
- package/lib/core/PageTemplates/PageTemplates.mocks.js +10 -0
- package/lib/core/PageTemplates/PageTemplates.mocks.js.map +1 -0
- package/lib/core/PageTemplates/PageTemplates.stories.d.ts +28 -0
- package/lib/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -0
- package/lib/core/PageTemplates/PageTemplates.stories.jsx +233 -0
- package/lib/core/PageTemplates/PageTemplates.stories.jsx.map +1 -0
- package/lib/core/PageTemplates/PageTemplates.styles.d.ts +4 -0
- package/lib/core/PageTemplates/PageTemplates.styles.d.ts.map +1 -0
- package/lib/core/PageTemplates/PageTemplates.styles.js +31 -0
- package/lib/core/PageTemplates/PageTemplates.styles.js.map +1 -0
- package/lib/core/Pagination/Pagination.stories.d.ts +6 -0
- package/lib/core/Pagination/Pagination.stories.d.ts.map +1 -0
- package/lib/core/Pagination/Pagination.stories.jsx +19 -0
- package/lib/core/Pagination/Pagination.stories.jsx.map +1 -0
- package/lib/core/Paragraph/ParagraphDisplay.stories.d.ts +6 -0
- package/lib/core/Paragraph/ParagraphDisplay.stories.d.ts.map +1 -0
- package/lib/core/Paragraph/ParagraphDisplay.stories.jsx +12 -0
- package/lib/core/Paragraph/ParagraphDisplay.stories.jsx.map +1 -0
- package/lib/core/Phone/Phone.stories.d.ts +7 -0
- package/lib/core/Phone/Phone.stories.d.ts.map +1 -0
- package/lib/core/Phone/Phone.stories.jsx +42 -0
- package/lib/core/Phone/Phone.stories.jsx.map +1 -0
- package/lib/core/Popover/Popover.stories.d.ts +8 -0
- package/lib/core/Popover/Popover.stories.d.ts.map +1 -0
- package/lib/core/Popover/Popover.stories.jsx +184 -0
- package/lib/core/Popover/Popover.stories.jsx.map +1 -0
- package/lib/core/Progress/Progress.stories.d.ts +7 -0
- package/lib/core/Progress/Progress.stories.d.ts.map +1 -0
- package/lib/core/Progress/Progress.stories.jsx +71 -0
- package/lib/core/Progress/Progress.stories.jsx.map +1 -0
- package/lib/core/Progress/Progress.styles.d.ts +2 -0
- package/lib/core/Progress/Progress.styles.d.ts.map +1 -0
- package/lib/core/Progress/Progress.styles.js +13 -0
- package/lib/core/Progress/Progress.styles.js.map +1 -0
- package/lib/core/RadioButton/RadioButton.stories.d.ts +7 -0
- package/lib/core/RadioButton/RadioButton.stories.d.ts.map +1 -0
- package/lib/core/RadioButton/RadioButton.stories.jsx +26 -0
- package/lib/core/RadioButton/RadioButton.stories.jsx.map +1 -0
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.d.ts +7 -0
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.d.ts.map +1 -0
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.jsx +62 -0
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.jsx.map +1 -0
- package/lib/core/RadioButtonGroup/RadioButtonGroup.styles.d.ts +4 -0
- package/lib/core/RadioButtonGroup/RadioButtonGroup.styles.d.ts.map +1 -0
- package/lib/core/RadioButtonGroup/RadioButtonGroup.styles.js +9 -0
- package/lib/core/RadioButtonGroup/RadioButtonGroup.styles.js.map +1 -0
- package/lib/core/Rating/Rating.stories.d.ts +6 -0
- package/lib/core/Rating/Rating.stories.d.ts.map +1 -0
- package/lib/core/Rating/Rating.stories.jsx +21 -0
- package/lib/core/Rating/Rating.stories.jsx.map +1 -0
- package/lib/core/SearchInput/SearchInput.stories.d.ts +6 -0
- package/lib/core/SearchInput/SearchInput.stories.d.ts.map +1 -0
- package/lib/core/SearchInput/SearchInput.stories.jsx +15 -0
- package/lib/core/SearchInput/SearchInput.stories.jsx.map +1 -0
- package/lib/core/Select/Select.stories.d.ts +9 -0
- package/lib/core/Select/Select.stories.d.ts.map +1 -0
- package/lib/core/Select/Select.stories.jsx +42 -0
- package/lib/core/Select/Select.stories.jsx.map +1 -0
- package/lib/core/Sentiment/Sentiment.stories.d.ts +14 -0
- package/lib/core/Sentiment/Sentiment.stories.d.ts.map +1 -0
- package/lib/core/Sentiment/Sentiment.stories.jsx +39 -0
- package/lib/core/Sentiment/Sentiment.stories.jsx.map +1 -0
- package/lib/core/Slider/Slider.stories.d.ts +11 -0
- package/lib/core/Slider/Slider.stories.d.ts.map +1 -0
- package/lib/core/Slider/Slider.stories.jsx +58 -0
- package/lib/core/Slider/Slider.stories.jsx.map +1 -0
- package/lib/core/SummaryItem/SummaryItem.stories.d.ts +11 -0
- package/lib/core/SummaryItem/SummaryItem.stories.d.ts.map +1 -0
- package/lib/core/SummaryItem/SummaryItem.stories.jsx +36 -0
- package/lib/core/SummaryItem/SummaryItem.stories.jsx.map +1 -0
- package/lib/core/SummaryList/SummaryList.mocks.d.ts +32 -0
- package/lib/core/SummaryList/SummaryList.mocks.d.ts.map +1 -0
- package/lib/core/SummaryList/SummaryList.mocks.jsx +35 -0
- package/lib/core/SummaryList/SummaryList.mocks.jsx.map +1 -0
- package/lib/core/SummaryList/SummaryList.stories.d.ts +13 -0
- package/lib/core/SummaryList/SummaryList.stories.d.ts.map +1 -0
- package/lib/core/SummaryList/SummaryList.stories.jsx +131 -0
- package/lib/core/SummaryList/SummaryList.stories.jsx.map +1 -0
- package/lib/core/Switch/Switch.stories.d.ts +7 -0
- package/lib/core/Switch/Switch.stories.d.ts.map +1 -0
- package/lib/core/Switch/Switch.stories.jsx +26 -0
- package/lib/core/Switch/Switch.stories.jsx.map +1 -0
- package/lib/core/Switch/Switch.styles.d.ts +2 -0
- package/lib/core/Switch/Switch.styles.d.ts.map +1 -0
- package/lib/core/Switch/Switch.styles.js +13 -0
- package/lib/core/Switch/Switch.styles.js.map +1 -0
- package/lib/core/Table/Table.mocks.d.ts +19 -0
- package/lib/core/Table/Table.mocks.d.ts.map +1 -0
- package/lib/core/Table/Table.mocks.jsx +32 -0
- package/lib/core/Table/Table.mocks.jsx.map +1 -0
- package/lib/core/Table/Table.stories.d.ts +14 -0
- package/lib/core/Table/Table.stories.d.ts.map +1 -0
- package/lib/core/Table/Table.stories.jsx +58 -0
- package/lib/core/Table/Table.stories.jsx.map +1 -0
- package/lib/core/Table/Table.styles.d.ts +4 -0
- package/lib/core/Table/Table.styles.d.ts.map +1 -0
- package/lib/core/Table/Table.styles.js +9 -0
- package/lib/core/Table/Table.styles.js.map +1 -0
- package/lib/core/Tabs/Tabs.stories.d.ts +7 -0
- package/lib/core/Tabs/Tabs.stories.d.ts.map +1 -0
- package/lib/core/Tabs/Tabs.stories.jsx +59 -0
- package/lib/core/Tabs/Tabs.stories.jsx.map +1 -0
- package/lib/core/Text/Text.stories.d.ts +6 -0
- package/lib/core/Text/Text.stories.d.ts.map +1 -0
- package/lib/core/Text/Text.stories.jsx +22 -0
- package/lib/core/Text/Text.stories.jsx.map +1 -0
- package/lib/core/TextArea/TextArea.stories.d.ts +6 -0
- package/lib/core/TextArea/TextArea.stories.d.ts.map +1 -0
- package/lib/core/TextArea/TextArea.stories.jsx +43 -0
- package/lib/core/TextArea/TextArea.stories.jsx.map +1 -0
- package/lib/core/Toaster/Toaster.stories.d.ts +6 -0
- package/lib/core/Toaster/Toaster.stories.d.ts.map +1 -0
- package/lib/core/Toaster/Toaster.stories.jsx +17 -0
- package/lib/core/Toaster/Toaster.stories.jsx.map +1 -0
- package/lib/core/Tooltip/Tooltip.stories.d.ts +8 -0
- package/lib/core/Tooltip/Tooltip.stories.d.ts.map +1 -0
- package/lib/core/Tooltip/Tooltip.stories.jsx +18 -0
- package/lib/core/Tooltip/Tooltip.stories.jsx.map +1 -0
- package/lib/core/Tree/Tree.mocks.d.ts +2 -0
- package/lib/core/Tree/Tree.mocks.d.ts.map +1 -0
- package/lib/core/Tree/Tree.mocks.js +20 -0
- package/lib/core/Tree/Tree.mocks.js.map +1 -0
- package/lib/core/Tree/Tree.stories.d.ts +8 -0
- package/lib/core/Tree/Tree.stories.d.ts.map +1 -0
- package/lib/core/Tree/Tree.stories.jsx +89 -0
- package/lib/core/Tree/Tree.stories.jsx.map +1 -0
- package/lib/core/Tree/Tree.styles.d.ts +3 -0
- package/lib/core/Tree/Tree.styles.d.ts.map +1 -0
- package/lib/core/Tree/Tree.styles.js +10 -0
- package/lib/core/Tree/Tree.styles.js.map +1 -0
- package/lib/core/URL/URL.stories.d.ts +6 -0
- package/lib/core/URL/URL.stories.d.ts.map +1 -0
- package/lib/core/URL/URL.stories.jsx +17 -0
- package/lib/core/URL/URL.stories.jsx.map +1 -0
- package/lib/cs/Article/Article.mocks.d.ts +14 -0
- package/lib/cs/Article/Article.mocks.d.ts.map +1 -0
- package/lib/cs/Article/Article.mocks.js +14 -0
- package/lib/cs/Article/Article.mocks.js.map +1 -0
- package/lib/cs/Article/Article.stories.d.ts +15 -0
- package/lib/cs/Article/Article.stories.d.ts.map +1 -0
- package/lib/cs/Article/Article.stories.jsx +126 -0
- package/lib/cs/Article/Article.stories.jsx.map +1 -0
- package/lib/cs/ArticleList/ArticleList.mocks.d.ts +21 -0
- package/lib/cs/ArticleList/ArticleList.mocks.d.ts.map +1 -0
- package/lib/cs/ArticleList/ArticleList.mocks.js +102 -0
- package/lib/cs/ArticleList/ArticleList.mocks.js.map +1 -0
- package/lib/cs/ArticleList/ArticleList.stories.d.ts +16 -0
- package/lib/cs/ArticleList/ArticleList.stories.d.ts.map +1 -0
- package/lib/cs/ArticleList/ArticleList.stories.jsx +110 -0
- package/lib/cs/ArticleList/ArticleList.stories.jsx.map +1 -0
- package/lib/cs/CSCaseView/CSAppShell.stories.d.ts +45 -0
- package/lib/cs/CSCaseView/CSAppShell.stories.d.ts.map +1 -0
- package/lib/cs/CSCaseView/CSAppShell.stories.jsx +275 -0
- package/lib/cs/CSCaseView/CSAppShell.stories.jsx.map +1 -0
- package/lib/cs/CSCaseView/CSCaseView.mocks.d.ts +57 -0
- package/lib/cs/CSCaseView/CSCaseView.mocks.d.ts.map +1 -0
- package/lib/cs/CSCaseView/CSCaseView.mocks.js +224 -0
- package/lib/cs/CSCaseView/CSCaseView.mocks.js.map +1 -0
- package/lib/cs/CallControlPanel/CallControlPanel.mocks.d.ts +16 -0
- package/lib/cs/CallControlPanel/CallControlPanel.mocks.d.ts.map +1 -0
- package/lib/cs/CallControlPanel/CallControlPanel.mocks.js +110 -0
- package/lib/cs/CallControlPanel/CallControlPanel.mocks.js.map +1 -0
- package/lib/cs/CallControlPanel/CallControlPanel.stories.d.ts +13 -0
- package/lib/cs/CallControlPanel/CallControlPanel.stories.d.ts.map +1 -0
- package/lib/cs/CallControlPanel/CallControlPanel.stories.jsx +188 -0
- package/lib/cs/CallControlPanel/CallControlPanel.stories.jsx.map +1 -0
- package/lib/cs/DialPad/DialPad.stories.d.ts +9 -0
- package/lib/cs/DialPad/DialPad.stories.d.ts.map +1 -0
- package/lib/cs/DialPad/DialPad.stories.jsx +18 -0
- package/lib/cs/DialPad/DialPad.stories.jsx.map +1 -0
- package/lib/cs/DialPad/DialPadKeyboardData.mock.d.ts +11 -0
- package/lib/cs/DialPad/DialPadKeyboardData.mock.d.ts.map +1 -0
- package/lib/cs/DialPad/DialPadKeyboardData.mock.js +20 -0
- package/lib/cs/DialPad/DialPadKeyboardData.mock.js.map +1 -0
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts +13 -0
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -0
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx +356 -0
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx.map +1 -0
- package/lib/cs/InteractionNotification/InteractionNotification.stories.d.ts +8 -0
- package/lib/cs/InteractionNotification/InteractionNotification.stories.d.ts.map +1 -0
- package/lib/cs/InteractionNotification/InteractionNotification.stories.jsx +32 -0
- package/lib/cs/InteractionNotification/InteractionNotification.stories.jsx.map +1 -0
- package/lib/cs/InteractionTimer/InteractionTimer.stories.d.ts +14 -0
- package/lib/cs/InteractionTimer/InteractionTimer.stories.d.ts.map +1 -0
- package/lib/cs/InteractionTimer/InteractionTimer.stories.jsx +85 -0
- package/lib/cs/InteractionTimer/InteractionTimer.stories.jsx.map +1 -0
- package/lib/cs/TaskManager/TaskManager.mocks.d.ts +13 -0
- package/lib/cs/TaskManager/TaskManager.mocks.d.ts.map +1 -0
- package/lib/cs/TaskManager/TaskManager.mocks.js +140 -0
- package/lib/cs/TaskManager/TaskManager.mocks.js.map +1 -0
- package/lib/cs/TaskManager/TaskManager.stories.d.ts +8 -0
- package/lib/cs/TaskManager/TaskManager.stories.d.ts.map +1 -0
- package/lib/cs/TaskManager/TaskManager.stories.jsx +314 -0
- package/lib/cs/TaskManager/TaskManager.stories.jsx.map +1 -0
- package/lib/dnd/DragDropList/DragDropList.stories.d.ts +11 -0
- package/lib/dnd/DragDropList/DragDropList.stories.d.ts.map +1 -0
- package/lib/dnd/DragDropList/DragDropList.stories.jsx +119 -0
- package/lib/dnd/DragDropList/DragDropList.stories.jsx.map +1 -0
- package/lib/rte/RichTextEditor/RichTextEditor.mocks.d.ts +3 -0
- package/lib/rte/RichTextEditor/RichTextEditor.mocks.d.ts.map +1 -0
- package/lib/rte/RichTextEditor/RichTextEditor.mocks.jsx +34 -0
- package/lib/rte/RichTextEditor/RichTextEditor.mocks.jsx.map +1 -0
- package/lib/rte/RichTextEditor/RichTextEditor.stories.d.ts +10 -0
- package/lib/rte/RichTextEditor/RichTextEditor.stories.d.ts.map +1 -0
- package/lib/rte/RichTextEditor/RichTextEditor.stories.jsx +145 -0
- package/lib/rte/RichTextEditor/RichTextEditor.stories.jsx.map +1 -0
- package/lib/rte/RichTextEditor/RichTextViewer.stories.d.ts +7 -0
- package/lib/rte/RichTextEditor/RichTextViewer.stories.d.ts.map +1 -0
- package/lib/rte/RichTextEditor/RichTextViewer.stories.jsx +62 -0
- package/lib/rte/RichTextEditor/RichTextViewer.stories.jsx.map +1 -0
- package/lib/social/Chat/Chat.mocks.d.ts +385 -0
- package/lib/social/Chat/Chat.mocks.d.ts.map +1 -0
- package/lib/social/Chat/Chat.mocks.js +648 -0
- package/lib/social/Chat/Chat.mocks.js.map +1 -0
- package/lib/social/Chat/Chat.stories.d.ts +25 -0
- package/lib/social/Chat/Chat.stories.d.ts.map +1 -0
- package/lib/social/Chat/Chat.stories.jsx +537 -0
- package/lib/social/Chat/Chat.stories.jsx.map +1 -0
- package/lib/social/Chat/RepeatingView.stories.d.ts +20 -0
- package/lib/social/Chat/RepeatingView.stories.d.ts.map +1 -0
- package/lib/social/Chat/RepeatingView.stories.jsx +90 -0
- package/lib/social/Chat/RepeatingView.stories.jsx.map +1 -0
- package/lib/social/Email/Email.mocks.d.ts +87 -0
- package/lib/social/Email/Email.mocks.d.ts.map +1 -0
- package/lib/social/Email/Email.mocks.jsx +349 -0
- package/lib/social/Email/Email.mocks.jsx.map +1 -0
- package/lib/social/Email/Email.stories.d.ts +28 -0
- package/lib/social/Email/Email.stories.d.ts.map +1 -0
- package/lib/social/Email/Email.stories.jsx +798 -0
- package/lib/social/Email/Email.stories.jsx.map +1 -0
- package/lib/social/Feed/Feed.mocks.d.ts +52 -0
- package/lib/social/Feed/Feed.mocks.d.ts.map +1 -0
- package/lib/social/Feed/Feed.mocks.jsx +315 -0
- package/lib/social/Feed/Feed.mocks.jsx.map +1 -0
- package/lib/social/Feed/Feed.stories.d.ts +15 -0
- package/lib/social/Feed/Feed.stories.d.ts.map +1 -0
- package/lib/social/Feed/Feed.stories.jsx +146 -0
- package/lib/social/Feed/Feed.stories.jsx.map +1 -0
- package/lib/social/Feed/FeedNewPost.stories.d.ts +17 -0
- package/lib/social/Feed/FeedNewPost.stories.d.ts.map +1 -0
- package/lib/social/Feed/FeedNewPost.stories.jsx +80 -0
- package/lib/social/Feed/FeedNewPost.stories.jsx.map +1 -0
- package/lib/social/Feed/FeedPost.stories.d.ts +9 -0
- package/lib/social/Feed/FeedPost.stories.d.ts.map +1 -0
- package/lib/social/Feed/FeedPost.stories.jsx +248 -0
- package/lib/social/Feed/FeedPost.stories.jsx.map +1 -0
- package/lib/social/Feed/FeedReply.stories.d.ts +16 -0
- package/lib/social/Feed/FeedReply.stories.d.ts.map +1 -0
- package/lib/social/Feed/FeedReply.stories.jsx +99 -0
- package/lib/social/Feed/FeedReply.stories.jsx.map +1 -0
- package/lib/social/Feed/FeedReplyInput.stories.d.ts +15 -0
- package/lib/social/Feed/FeedReplyInput.stories.d.ts.map +1 -0
- package/lib/social/Feed/FeedReplyInput.stories.jsx +59 -0
- package/lib/social/Feed/FeedReplyInput.stories.jsx.map +1 -0
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.d.ts +6 -0
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.d.ts.map +1 -0
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.jsx +30 -0
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.jsx.map +1 -0
- package/lib/work/CaseView/Attachments.mocks.d.ts +3 -0
- package/lib/work/CaseView/Attachments.mocks.d.ts.map +1 -0
- package/lib/work/CaseView/Attachments.mocks.jsx +388 -0
- package/lib/work/CaseView/Attachments.mocks.jsx.map +1 -0
- package/lib/work/CaseView/CaseView.mocks.d.ts +11 -0
- package/lib/work/CaseView/CaseView.mocks.d.ts.map +1 -0
- package/lib/work/CaseView/CaseView.mocks.jsx +126 -0
- package/lib/work/CaseView/CaseView.mocks.jsx.map +1 -0
- package/lib/work/CaseView/CaseView.stories.d.ts +34 -0
- package/lib/work/CaseView/CaseView.stories.d.ts.map +1 -0
- package/lib/work/CaseView/CaseView.stories.jsx +264 -0
- package/lib/work/CaseView/CaseView.stories.jsx.map +1 -0
- package/lib/work/CaseView/Details.mocks.d.ts +3 -0
- package/lib/work/CaseView/Details.mocks.d.ts.map +1 -0
- package/lib/work/CaseView/Details.mocks.jsx +21 -0
- package/lib/work/CaseView/Details.mocks.jsx.map +1 -0
- package/lib/work/CaseView/FileService.mock.d.ts +28 -0
- package/lib/work/CaseView/FileService.mock.d.ts.map +1 -0
- package/lib/work/CaseView/FileService.mock.jsx +139 -0
- package/lib/work/CaseView/FileService.mock.jsx.map +1 -0
- package/lib/work/CaseView/MobileCaseView.stories.d.ts +11 -0
- package/lib/work/CaseView/MobileCaseView.stories.d.ts.map +1 -0
- package/lib/work/CaseView/MobileCaseView.stories.jsx +27 -0
- package/lib/work/CaseView/MobileCaseView.stories.jsx.map +1 -0
- package/lib/work/CaseView/Pulse.mocks.d.ts +6 -0
- package/lib/work/CaseView/Pulse.mocks.d.ts.map +1 -0
- package/lib/work/CaseView/Pulse.mocks.jsx +35 -0
- package/lib/work/CaseView/Pulse.mocks.jsx.map +1 -0
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts +10 -0
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts.map +1 -0
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.jsx +195 -0
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.jsx.map +1 -0
- package/lib/work/Confirmation/Confirmation.stories.d.ts +9 -0
- package/lib/work/Confirmation/Confirmation.stories.d.ts.map +1 -0
- package/lib/work/Confirmation/Confirmation.stories.jsx +17 -0
- package/lib/work/Confirmation/Confirmation.stories.jsx.map +1 -0
- package/lib/work/Details/Details.stories.d.ts +5 -0
- package/lib/work/Details/Details.stories.d.ts.map +1 -0
- package/lib/work/Details/Details.stories.jsx +65 -0
- package/lib/work/Details/Details.stories.jsx.map +1 -0
- package/lib/work/Glimpse/Glimpse.stories.d.ts +10 -0
- package/lib/work/Glimpse/Glimpse.stories.d.ts.map +1 -0
- package/lib/work/Glimpse/Glimpse.stories.jsx +39 -0
- package/lib/work/Glimpse/Glimpse.stories.jsx.map +1 -0
- package/lib/work/SearchResults/SearchResults.mocks.d.ts +8 -0
- package/lib/work/SearchResults/SearchResults.mocks.d.ts.map +1 -0
- package/lib/work/SearchResults/SearchResults.mocks.jsx +96 -0
- package/lib/work/SearchResults/SearchResults.mocks.jsx.map +1 -0
- package/lib/work/SearchResults/SearchResults.stories.d.ts +8 -0
- package/lib/work/SearchResults/SearchResults.stories.d.ts.map +1 -0
- package/lib/work/SearchResults/SearchResults.stories.jsx +205 -0
- package/lib/work/SearchResults/SearchResults.stories.jsx.map +1 -0
- package/lib/work/Stages/Stages.stories.d.ts +11 -0
- package/lib/work/Stages/Stages.stories.d.ts.map +1 -0
- package/lib/work/Stages/Stages.stories.jsx +65 -0
- package/lib/work/Stages/Stages.stories.jsx.map +1 -0
- package/lib/work/Stakeholders/Stakeholders.stories.d.ts +9 -0
- package/lib/work/Stakeholders/Stakeholders.stories.d.ts.map +1 -0
- package/lib/work/Stakeholders/Stakeholders.stories.jsx +118 -0
- package/lib/work/Stakeholders/Stakeholders.stories.jsx.map +1 -0
- package/lib/work/Tags/Tags.mocks.d.ts +3 -0
- package/lib/work/Tags/Tags.mocks.d.ts.map +1 -0
- package/lib/work/Tags/Tags.mocks.js +76 -0
- package/lib/work/Tags/Tags.mocks.js.map +1 -0
- package/lib/work/Tags/Tags.stories.d.ts +10 -0
- package/lib/work/Tags/Tags.stories.d.ts.map +1 -0
- package/lib/work/Tags/Tags.stories.jsx +61 -0
- package/lib/work/Tags/Tags.stories.jsx.map +1 -0
- package/lib/work/Tasks/TaskList.stories.d.ts +5 -0
- package/lib/work/Tasks/TaskList.stories.d.ts.map +1 -0
- package/lib/work/Tasks/TaskList.stories.jsx +17 -0
- package/lib/work/Tasks/TaskList.stories.jsx.map +1 -0
- package/lib/work/Tasks/Tasks.stories.d.ts +9 -0
- package/lib/work/Tasks/Tasks.stories.d.ts.map +1 -0
- package/lib/work/Tasks/Tasks.stories.jsx +101 -0
- package/lib/work/Tasks/Tasks.stories.jsx.map +1 -0
- package/lib/work/Timeline/Timeline.mocks.d.ts +3 -0
- package/lib/work/Timeline/Timeline.mocks.d.ts.map +1 -0
- package/lib/work/Timeline/Timeline.mocks.jsx +129 -0
- package/lib/work/Timeline/Timeline.mocks.jsx.map +1 -0
- package/lib/work/Timeline/Timeline.stories.d.ts +7 -0
- package/lib/work/Timeline/Timeline.stories.d.ts.map +1 -0
- package/lib/work/Timeline/Timeline.stories.jsx +43 -0
- package/lib/work/Timeline/Timeline.stories.jsx.map +1 -0
- package/package.json +47 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Card, FieldGroup, Text, Flex, CardHeader } from '@pega/cosmos-react-core';
|
|
2
|
+
import { DetailsDemo } from '@pega/cosmos-react-demos/lib/work/Details/Details.stories';
|
|
3
|
+
export const Details = () => {
|
|
4
|
+
return (<Card>
|
|
5
|
+
<CardHeader>
|
|
6
|
+
<Text variant='h2'>Details</Text>
|
|
7
|
+
</CardHeader>
|
|
8
|
+
|
|
9
|
+
<Flex container={{ direction: 'column', pad: [1, 2, 2], gap: 2 }}>
|
|
10
|
+
<FieldGroup name='Description'>
|
|
11
|
+
<Text as='p'>
|
|
12
|
+
This case is presented as a demonstration of the feature set and capabilities of the
|
|
13
|
+
Cosmos design system and the case management UX. All of the data within this demo is
|
|
14
|
+
mock data and it is not meant to represent any actual user data.
|
|
15
|
+
</Text>
|
|
16
|
+
</FieldGroup>
|
|
17
|
+
<DetailsDemo />
|
|
18
|
+
</Flex>
|
|
19
|
+
</Card>);
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=Details.mocks.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Details.mocks.jsx","sourceRoot":"","sources":["../../../src/work/CaseView/Details.mocks.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,2DAA2D,CAAC;AAExF,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,EAAE;IAC1B,OAAO,CACL,CAAC,IAAI,CACH;MAAA,CAAC,UAAU,CACT;QAAA,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAClC;MAAA,EAAE,UAAU,CAEZ;;MAAA,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAC/D;QAAA,CAAC,UAAU,CAAC,IAAI,CAAC,aAAa,CAC5B;UAAA,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CACV;;;;UAGF,EAAE,IAAI,CACR;QAAA,EAAE,UAAU,CACZ;QAAA,CAAC,WAAW,CAAC,AAAD,EACd;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Card, FieldGroup, Text, Flex, CardHeader } from '@pega/cosmos-react-core';\nimport { DetailsDemo } from '@pega/cosmos-react-demos/lib/work/Details/Details.stories';\n\nexport const Details = () => {\n return (\n <Card>\n <CardHeader>\n <Text variant='h2'>Details</Text>\n </CardHeader>\n\n <Flex container={{ direction: 'column', pad: [1, 2, 2], gap: 2 }}>\n <FieldGroup name='Description'>\n <Text as='p'>\n This case is presented as a demonstration of the feature set and capabilities of the\n Cosmos design system and the case management UX. All of the data within this demo is\n mock data and it is not meant to represent any actual user data.\n </Text>\n </FieldGroup>\n <DetailsDemo />\n </Flex>\n </Card>\n );\n};\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ReactNode, FunctionComponent, Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { FileUploadItemProps } from '@pega/cosmos-react-core';
|
|
3
|
+
export interface MockFileAttachmentResource {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
category: string;
|
|
7
|
+
thumbnail?: string;
|
|
8
|
+
createDate?: number;
|
|
9
|
+
modifiedDate?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface MockFileUploadItem extends Pick<MockFileAttachmentResource, 'id' | 'category'>, FileUploadItemProps {
|
|
12
|
+
File: File;
|
|
13
|
+
}
|
|
14
|
+
export interface FileServiceContextValue {
|
|
15
|
+
files: (MockFileAttachmentResource | MockFileUploadItem)[];
|
|
16
|
+
setFiles: Dispatch<SetStateAction<FileServiceContextValue['files']>>;
|
|
17
|
+
attachFile: (file: MockFileUploadItem) => void;
|
|
18
|
+
cancelFile: (id: MockFileAttachmentResource['id']) => void;
|
|
19
|
+
deleteFile: (id: MockFileAttachmentResource['id']) => void;
|
|
20
|
+
}
|
|
21
|
+
export declare const FileServiceContext: import("react").Context<FileServiceContextValue>;
|
|
22
|
+
export declare const mockCategories: ('HR' | 'Marketing' | 'Sales' | 'Accounting' | 'Engineering')[];
|
|
23
|
+
export declare const mockAttachmentListRequest: () => Promise<MockFileAttachmentResource[]>;
|
|
24
|
+
declare const Provider: FunctionComponent<{
|
|
25
|
+
children: ReactNode;
|
|
26
|
+
}>;
|
|
27
|
+
export default Provider;
|
|
28
|
+
//# sourceMappingURL=FileService.mock.d.ts.map
|
|
@@ -0,0 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+BhF,CAAC;AAKF,QAAA,MAAM,QAAQ,EAAE,iBAAiB,CAAC;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,CAwFxD,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { createContext, useState, useCallback, useMemo } from 'react';
|
|
2
|
+
import { createUID, hasProp, useAfterInitialEffect } from '@pega/cosmos-react-core';
|
|
3
|
+
export const FileServiceContext = createContext({
|
|
4
|
+
files: [],
|
|
5
|
+
setFiles: () => { },
|
|
6
|
+
attachFile: () => { },
|
|
7
|
+
cancelFile: () => { },
|
|
8
|
+
deleteFile: () => { }
|
|
9
|
+
});
|
|
10
|
+
const uploadsInProgress = {};
|
|
11
|
+
const postFile = ({ file, onLoadStart, onProgress, onLoad }) => {
|
|
12
|
+
const xhr = new XMLHttpRequest();
|
|
13
|
+
const fd = new FormData();
|
|
14
|
+
uploadsInProgress[file.id] = xhr;
|
|
15
|
+
xhr.upload.onloadstart = () => {
|
|
16
|
+
onLoadStart(file, 0);
|
|
17
|
+
};
|
|
18
|
+
xhr.upload.onprogress = ({ lengthComputable, loaded, total }) => {
|
|
19
|
+
if (lengthComputable) {
|
|
20
|
+
onProgress(file, (loaded / total) * 100);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
xhr.upload.onload = () => {
|
|
24
|
+
onLoad(file);
|
|
25
|
+
};
|
|
26
|
+
xhr.open('POST', 'http://cosmos.eng.pega.com/attachments');
|
|
27
|
+
xhr.setRequestHeader('Content-Type', 'multipart/form-data');
|
|
28
|
+
fd.append('attachments', file.File);
|
|
29
|
+
xhr.send(fd);
|
|
30
|
+
return xhr;
|
|
31
|
+
};
|
|
32
|
+
const getMockPriorDate = (h) => {
|
|
33
|
+
const d = new Date();
|
|
34
|
+
return d.setHours(d.getHours() - h);
|
|
35
|
+
};
|
|
36
|
+
export const mockCategories = [
|
|
37
|
+
'HR',
|
|
38
|
+
'Marketing',
|
|
39
|
+
'Sales',
|
|
40
|
+
'Accounting',
|
|
41
|
+
'Engineering'
|
|
42
|
+
];
|
|
43
|
+
export const mockAttachmentListRequest = () => {
|
|
44
|
+
return new Promise(resolve => {
|
|
45
|
+
setTimeout(() => {
|
|
46
|
+
resolve([
|
|
47
|
+
{
|
|
48
|
+
id: createUID(),
|
|
49
|
+
name: 'File.doc',
|
|
50
|
+
category: mockCategories[0],
|
|
51
|
+
createDate: getMockPriorDate(1)
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
id: createUID(),
|
|
55
|
+
name: 'File.ppt',
|
|
56
|
+
category: mockCategories[1],
|
|
57
|
+
createDate: getMockPriorDate(4)
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: createUID(),
|
|
61
|
+
name: 'File.xls',
|
|
62
|
+
category: mockCategories[2],
|
|
63
|
+
createDate: getMockPriorDate(30)
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: createUID(),
|
|
67
|
+
name: 'emptyFile',
|
|
68
|
+
category: '',
|
|
69
|
+
createDate: getMockPriorDate(144)
|
|
70
|
+
}
|
|
71
|
+
]);
|
|
72
|
+
}, 1000);
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
const Provider = ({ children }) => {
|
|
76
|
+
const [files, setFiles] = useState([]);
|
|
77
|
+
const attachFile = useCallback((file) => {
|
|
78
|
+
if (files.some(f => f.id === file.id))
|
|
79
|
+
return;
|
|
80
|
+
setFiles(current => [file, ...current]);
|
|
81
|
+
}, [files]);
|
|
82
|
+
const cancelFile = useCallback((id) => {
|
|
83
|
+
if (uploadsInProgress[id]) {
|
|
84
|
+
uploadsInProgress[id].abort();
|
|
85
|
+
delete uploadsInProgress[id];
|
|
86
|
+
}
|
|
87
|
+
setFiles(current => current.filter(f => f.id !== id));
|
|
88
|
+
}, [uploadsInProgress]);
|
|
89
|
+
const deleteFile = useCallback(async (id) => {
|
|
90
|
+
const file = files.find(f => f.id === id);
|
|
91
|
+
fetch(`http://cosmos.eng.pega.com/attachments/${file.id}`, { method: 'DELETE' }).then(() => {
|
|
92
|
+
setFiles(current => current.filter(f => f.id !== file.id));
|
|
93
|
+
});
|
|
94
|
+
}, [files]);
|
|
95
|
+
const setProgress = useCallback((file, progress) => {
|
|
96
|
+
setFiles(current => current.map(f => {
|
|
97
|
+
if (file.id === f.id) {
|
|
98
|
+
f.progress = progress;
|
|
99
|
+
}
|
|
100
|
+
return f;
|
|
101
|
+
}));
|
|
102
|
+
}, []);
|
|
103
|
+
useAfterInitialEffect(() => {
|
|
104
|
+
files.forEach(file => {
|
|
105
|
+
if (!hasProp(file, 'File') || typeof file.progress === 'number')
|
|
106
|
+
return;
|
|
107
|
+
postFile({
|
|
108
|
+
file,
|
|
109
|
+
onLoadStart: setProgress,
|
|
110
|
+
onProgress: setProgress,
|
|
111
|
+
onLoad(loadedFile) {
|
|
112
|
+
delete uploadsInProgress[loadedFile.id];
|
|
113
|
+
setFiles(cur => {
|
|
114
|
+
return cur.map(f => {
|
|
115
|
+
if (f.id === loadedFile.id) {
|
|
116
|
+
return {
|
|
117
|
+
...loadedFile,
|
|
118
|
+
id: createUID(),
|
|
119
|
+
createDate: Date.now()
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
return f;
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
}, [files.length, setProgress]);
|
|
129
|
+
const value = useMemo(() => ({
|
|
130
|
+
files,
|
|
131
|
+
setFiles,
|
|
132
|
+
attachFile,
|
|
133
|
+
cancelFile,
|
|
134
|
+
deleteFile
|
|
135
|
+
}), [files, attachFile, cancelFile, deleteFile]);
|
|
136
|
+
return <FileServiceContext.Provider value={value}>{children}</FileServiceContext.Provider>;
|
|
137
|
+
};
|
|
138
|
+
export default Provider;
|
|
139
|
+
//# sourceMappingURL=FileService.mock.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileService.mock.jsx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ACjB,IAAI,CAAC,CAAC,EAAE,KAAK,UAAU,CAAC,EAAE,EAAE;gCAC1B,OAAO;oCACL,GAAG,UAAU;oCACb,EAAE,EAAE,SAAS,EAAE;oCACf,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE;iCACvB,CAAC;6BACH;4BAED,OAAO,CAAC,CAAC;wBACX,CAAC,CAAC,CAAC;oBACL,CAAC,CAAC,CAAC;gBACL,CAAC;aACF,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;IAEhC,MAAM,KAAK,GAA4B,OAAO,CAC5C,GAAG,EAAE,CAAC,CAAC;QACL,KAAK;QACL,QAAQ;QACR,UAAU;QACV,UAAU;QACV,UAAU;KACX,CAAC,EACF,CAAC,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,CAC5C,CAAC;IAEF,OAAO,CAAC,kBAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;AAC7F,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import {\n createContext,\n ReactNode,\n useState,\n FunctionComponent,\n useCallback,\n useMemo,\n Dispatch,\n SetStateAction\n} from 'react';\n\nimport {\n createUID,\n FileUploadItemProps,\n hasProp,\n useAfterInitialEffect\n} from '@pega/cosmos-react-core';\n\n// -----------------------------------------------------------------------------\n// MockFileResourceObject\n// -----------------------------------------------------------------------------\nexport interface MockFileAttachmentResource {\n id: string;\n name: string;\n category: string;\n thumbnail?: string;\n createDate?: number;\n modifiedDate?: number;\n}\n\n// -----------------------------------------------------------------------------\n// MockFileSelectionObject\n// -----------------------------------------------------------------------------\nexport interface MockFileUploadItem\n extends Pick<MockFileAttachmentResource, 'id' | 'category'>,\n FileUploadItemProps {\n File: File;\n}\n\n// -----------------------------------------------------------------------------\n// FileServiceContextValue\n// -----------------------------------------------------------------------------\nexport interface FileServiceContextValue {\n files: (MockFileAttachmentResource | MockFileUploadItem)[];\n setFiles: Dispatch<SetStateAction<FileServiceContextValue['files']>>;\n attachFile: (file: MockFileUploadItem) => void;\n cancelFile: (id: MockFileAttachmentResource['id']) => void;\n deleteFile: (id: MockFileAttachmentResource['id']) => void;\n}\n\n// -----------------------------------------------------------------------------\n// FileServiceContext\n// -----------------------------------------------------------------------------\nexport const FileServiceContext = createContext<FileServiceContextValue>({\n files: [],\n setFiles: () => {},\n attachFile: () => {},\n cancelFile: () => {},\n deleteFile: () => {}\n});\n\n// -----------------------------------------------------------------------------\n// FilePostArg\n// -----------------------------------------------------------------------------\ninterface FilePostArg {\n file: MockFileUploadItem;\n onLoadStart: (file: MockFileUploadItem, progress: number) => void;\n onProgress: (file: MockFileUploadItem, progress: number) => void;\n onLoad: (file: MockFileUploadItem) => void;\n}\n\n// -----------------------------------------------------------------------------\n// uploadsInProgress\n// -----------------------------------------------------------------------------\nconst uploadsInProgress: Record<string, XMLHttpRequest> = {};\n\n// -----------------------------------------------------------------------------\n// postFile\n// -----------------------------------------------------------------------------\nconst postFile = ({ file, onLoadStart, onProgress, onLoad }: FilePostArg) => {\n const xhr = new XMLHttpRequest();\n const fd = new FormData();\n\n uploadsInProgress[file.id] = xhr;\n\n xhr.upload.onloadstart = () => {\n onLoadStart(file, 0);\n };\n\n xhr.upload.onprogress = ({ lengthComputable, loaded, total }) => {\n if (lengthComputable) {\n onProgress(file, (loaded / total) * 100);\n }\n };\n\n xhr.upload.onload = () => {\n onLoad(file);\n };\n\n // This is a mock api used to demo upload progress\n xhr.open('POST', 'http://cosmos.eng.pega.com/attachments');\n xhr.setRequestHeader('Content-Type', 'multipart/form-data');\n fd.append('attachments', file.File);\n xhr.send(fd);\n\n return xhr;\n};\n\n// Mock date generator\nconst getMockPriorDate = (h: number) => {\n const d = new Date();\n return d.setHours(d.getHours() - h);\n};\n\nexport const mockCategories: ('HR' | 'Marketing' | 'Sales' | 'Accounting' | 'Engineering')[] = [\n 'HR',\n 'Marketing',\n 'Sales',\n 'Accounting',\n 'Engineering'\n];\n\nexport const mockAttachmentListRequest = (): Promise<MockFileAttachmentResource[]> => {\n return new Promise(resolve => {\n setTimeout(() => {\n resolve([\n {\n id: createUID(),\n name: 'File.doc',\n category: mockCategories[0],\n createDate: getMockPriorDate(1)\n },\n {\n id: createUID(),\n name: 'File.ppt',\n category: mockCategories[1],\n createDate: getMockPriorDate(4)\n },\n {\n id: createUID(),\n name: 'File.xls',\n category: mockCategories[2],\n createDate: getMockPriorDate(30)\n },\n {\n id: createUID(),\n name: 'emptyFile',\n category: '',\n createDate: getMockPriorDate(144)\n }\n ]);\n }, 1000);\n });\n};\n\n// -----------------------------------------------------------------------------\n// Provider\n// -----------------------------------------------------------------------------\nconst Provider: FunctionComponent<{ children: ReactNode }> = ({ children }) => {\n const [files, setFiles] = useState<FileServiceContextValue['files']>([]);\n\n const attachFile = useCallback(\n (file: MockFileUploadItem) => {\n if (files.some(f => f.id === file.id)) return;\n setFiles(current => [file, ...current]);\n },\n [files]\n );\n\n // Remove a file from the state array\n const cancelFile = useCallback(\n (id: MockFileUploadItem['id']) => {\n if (uploadsInProgress[id]) {\n uploadsInProgress[id].abort();\n delete uploadsInProgress[id];\n }\n setFiles(current => current.filter(f => f.id !== id));\n },\n [uploadsInProgress]\n );\n\n // Mock an api request and remove a file from the state array\n const deleteFile = useCallback(\n async (id: MockFileUploadItem['id']) => {\n const file = files.find(f => f.id === id) as MockFileAttachmentResource;\n fetch(`http://cosmos.eng.pega.com/attachments/${file.id}`, { method: 'DELETE' }).then(() => {\n setFiles(current => current.filter(f => f.id !== file.id));\n });\n },\n [files]\n );\n\n const setProgress = useCallback((file: MockFileUploadItem, progress?: number) => {\n setFiles(current =>\n current.map(f => {\n if (file.id === f.id) {\n (f as MockFileUploadItem).progress = progress;\n }\n return f;\n })\n );\n }, []);\n\n useAfterInitialEffect(() => {\n files.forEach(file => {\n // Return if we have a mock attachment resource object or a File object that is currently uploading.\n if (!hasProp(file, 'File') || typeof file.progress === 'number') return;\n\n // For each File in the array, not uploaded yet, make a POST to the mock service.\n postFile({\n file,\n onLoadStart: setProgress,\n onProgress: setProgress,\n onLoad(loadedFile) {\n delete uploadsInProgress[loadedFile.id];\n\n setFiles(cur => {\n return cur.map(f => {\n if (f.id === loadedFile.id) {\n return {\n ...loadedFile,\n id: createUID(),\n createDate: Date.now()\n };\n }\n\n return f;\n });\n });\n }\n });\n });\n }, [files.length, setProgress]);\n\n const value: FileServiceContextValue = useMemo(\n () => ({\n files,\n setFiles,\n attachFile,\n cancelFile,\n deleteFile\n }),\n [files, attachFile, cancelFile, deleteFile]\n );\n\n return <FileServiceContext.Provider value={value}>{children}</FileServiceContext.Provider>;\n};\n\nexport default Provider;\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import("react").FC<import("@pega/cosmos-react-core").ForwardProps & import("@pega/cosmos-react-work").MobileCaseViewProps>;
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
export declare const MobileCaseViewDemo: () => JSX.Element;
|
|
11
|
+
//# sourceMappingURL=MobileCaseView.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MobileCaseView.stories.d.ts","sourceRoot":"","sources":["../../../src/work/CaseView/MobileCaseView.stories.tsx"],"names":[],"mappings":";;;;;;;;AAIA,wBAME;AAEF,eAAO,MAAM,kBAAkB,mBAyB9B,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { useState, useCallback } from 'react';
|
|
2
|
+
import { MobileCaseView } from '@pega/cosmos-react-work';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Work/CaseView/Mobile',
|
|
5
|
+
component: MobileCaseView,
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: 'fullscreen'
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
export const MobileCaseViewDemo = () => {
|
|
11
|
+
const tabs = Array.from({ length: 2 }, (undef, i) => {
|
|
12
|
+
const key = `${i + 1}`;
|
|
13
|
+
return { name: `Hello tab ${key}`, id: key };
|
|
14
|
+
});
|
|
15
|
+
const [currentTabId, setCurrentTabId] = useState(tabs[0].id);
|
|
16
|
+
const [tabContent, setTabContent] = useState(tabs[0].name);
|
|
17
|
+
const onTabClick = useCallback((id) => {
|
|
18
|
+
setCurrentTabId(id);
|
|
19
|
+
setTabContent(tabs.find(tab => tab.id === id)?.name ?? '');
|
|
20
|
+
}, []);
|
|
21
|
+
return (<MobileCaseView title='Mobile Case View Story' tabs={{
|
|
22
|
+
tabs,
|
|
23
|
+
onTabClick,
|
|
24
|
+
currentTabId
|
|
25
|
+
}} tabContent={<div style={{ padding: '2.5rem' }}>{tabContent}</div>}/>);
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=MobileCaseView.stories.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MobileCaseView.stories.jsx","sourceRoot":"","sources":["../../../src/work/CaseView/MobileCaseView.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,eAAe;IACb,KAAK,EAAE,sBAAsB;IAC7B,SAAS,EAAE,cAAc;IACzB,UAAU,EAAE;QACV,MAAM,EAAE,YAAY;KACrB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACrC,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE;QAClD,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;QACvB,OAAO,EAAE,IAAI,EAAE,aAAa,GAAG,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC;IAC/C,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC7D,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAE3D,MAAM,UAAU,GAAG,WAAW,CAAC,CAAC,EAAU,EAAE,EAAE;QAC5C,eAAe,CAAC,EAAE,CAAC,CAAC;QACpB,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IAC7D,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,CAAC,cAAc,CACb,KAAK,CAAC,wBAAwB,CAC9B,IAAI,CAAC,CAAC;YACJ,IAAI;YACJ,UAAU;YACV,YAAY;SACb,CAAC,CACF,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,EAAE,GAAG,CAAC,CAAC,EAClE,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useState, useCallback } from 'react';\n\nimport { MobileCaseView } from '@pega/cosmos-react-work';\n\nexport default {\n title: 'Work/CaseView/Mobile',\n component: MobileCaseView,\n parameters: {\n layout: 'fullscreen'\n }\n};\n\nexport const MobileCaseViewDemo = () => {\n const tabs = Array.from({ length: 2 }, (undef, i) => {\n const key = `${i + 1}`;\n return { name: `Hello tab ${key}`, id: key };\n });\n\n const [currentTabId, setCurrentTabId] = useState(tabs[0].id);\n const [tabContent, setTabContent] = useState(tabs[0].name);\n\n const onTabClick = useCallback((id: string) => {\n setCurrentTabId(id);\n setTabContent(tabs.find(tab => tab.id === id)?.name ?? '');\n }, []);\n\n return (\n <MobileCaseView\n title='Mobile Case View Story'\n tabs={{\n tabs,\n onTabClick,\n currentTabId\n }}\n tabContent={<div style={{ padding: '2.5rem' }}>{tabContent}</div>}\n />\n );\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pulse.mocks.d.ts","sourceRoot":"","sources":["../../../src/work/CaseView/Pulse.mocks.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAK/C,eAAO,MAAM,SAAS;;iBAiDrB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { useMemo, useState } from 'react';
|
|
2
|
+
import { Tabs, TabPanel, Flex, Table, Card, CardContent } from '@pega/cosmos-react-core';
|
|
3
|
+
import { FeedDemo } from '@pega/cosmos-react-demos/lib/social/Feed/Feed.stories';
|
|
4
|
+
const msInHour = 60 * 60 * 1000;
|
|
5
|
+
export const PulseMock = ({ markdownMap }) => {
|
|
6
|
+
const [currentTab, setCurrentTab] = useState('pulse');
|
|
7
|
+
const historyData = useMemo(() => Array.from({ length: 37 }, (_, i) => {
|
|
8
|
+
return {
|
|
9
|
+
id: i,
|
|
10
|
+
date: new Date(Date.now() - i * 24 * msInHour + Math.random() * 2 * msInHour - msInHour).toLocaleString(),
|
|
11
|
+
description: `Description for history item ${i + 1}`,
|
|
12
|
+
performedBy: 'Cosmos Operator'
|
|
13
|
+
};
|
|
14
|
+
}), []);
|
|
15
|
+
return (<Flex container={{ direction: 'column', gap: 2 }}>
|
|
16
|
+
<Tabs tabs={[
|
|
17
|
+
{ id: 'pulse', name: 'Pulse' },
|
|
18
|
+
{ id: 'history', name: 'History' }
|
|
19
|
+
]} currentTabId={currentTab} onTabClick={setCurrentTab}/>
|
|
20
|
+
|
|
21
|
+
<TabPanel tabId={currentTab}>
|
|
22
|
+
{currentTab === 'pulse' && <FeedDemo markdownMap={markdownMap}/>}
|
|
23
|
+
{currentTab === 'history' && (<Card>
|
|
24
|
+
<CardContent>
|
|
25
|
+
<Table title='History' data={historyData} columns={[
|
|
26
|
+
{ renderer: 'date', label: 'Date' },
|
|
27
|
+
{ renderer: 'description', label: 'Description' },
|
|
28
|
+
{ renderer: 'performedBy', label: 'Performed By' }
|
|
29
|
+
]}/>
|
|
30
|
+
</CardContent>
|
|
31
|
+
</Card>)}
|
|
32
|
+
</TabPanel>
|
|
33
|
+
</Flex>);
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=Pulse.mocks.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pulse.mocks.jsx","sourceRoot":"","sources":["../../../src/work/CaseView/Pulse.mocks.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEzF,OAAO,EAAE,QAAQ,EAAE,MAAM,uDAAuD,CAAC;AAEjF,MAAM,QAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEhC,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EAAE,WAAW,EAA2B,EAAE,EAAE;IACpE,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;IAEtD,MAAM,WAAW,GAAG,OAAO,CACzB,GAAG,EAAE,CACH,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAClC,OAAO;YACL,EAAE,EAAE,CAAC;YACL,IAAI,EAAE,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,EAAE,WAAW,CACf;UAAA,EAAE,IAAI,CAAC,CACR,CACH;MAAA,EAAE,QAAQ,CACZ;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useMemo, useState } from 'react';\n\nimport { Tabs, TabPanel, Flex, Table, Card, CardContent } from '@pega/cosmos-react-core';\nimport { MDMap } from '@pega/cosmos-react-rte';\nimport { FeedDemo } from '@pega/cosmos-react-demos/lib/social/Feed/Feed.stories';\n\nconst msInHour = 60 * 60 * 1000;\n\nexport const PulseMock = ({ markdownMap }: { markdownMap?: MDMap }) => {\n const [currentTab, setCurrentTab] = useState('pulse');\n\n const historyData = useMemo(\n () =>\n Array.from({ length: 37 }, (_, i) => {\n return {\n id: i,\n date: new Date(\n Date.now() - i * 24 * msInHour + Math.random() * 2 * msInHour - msInHour\n ).toLocaleString(),\n description: `Description for history item ${i + 1}`,\n performedBy: 'Cosmos Operator'\n };\n }),\n []\n );\n\n return (\n <Flex container={{ direction: 'column', gap: 2 }}>\n <Tabs\n tabs={[\n { id: 'pulse', name: 'Pulse' },\n { id: 'history', name: 'History' }\n ]}\n currentTabId={currentTab}\n onTabClick={setCurrentTab}\n />\n\n <TabPanel tabId={currentTab}>\n {currentTab === 'pulse' && <FeedDemo markdownMap={markdownMap} />}\n {currentTab === 'history' && (\n <Card>\n <CardContent>\n <Table\n title='History'\n data={historyData}\n columns={[\n { renderer: 'date', label: 'Date' },\n { renderer: 'description', label: 'Description' },\n { renderer: 'performedBy', label: 'Performed By' }\n ]}\n />\n </CardContent>\n </Card>\n )}\n </TabPanel>\n </Flex>\n );\n};\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
parameters: {
|
|
5
|
+
layout: string;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
|
9
|
+
export declare const ConfigurableLayoutInPageRegions: () => JSX.Element;
|
|
10
|
+
//# sourceMappingURL=ConfigurableLayout.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigurableLayout.stories.d.ts","sourceRoot":"","sources":["../../../src/work/ConfigurableLayout/ConfigurableLayout.stories.tsx"],"names":[],"mappings":";;;;;;;AAWA,wBAKE;AAqLF,eAAO,MAAM,+BAA+B,mBAgC3C,CAAC"}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { useRef } from 'react';
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
import { Flex, NarrowWidePage } from '@pega/cosmos-react-core';
|
|
4
|
+
import { ConfigurableLayout, useTrackWrappedRegions } from '@pega/cosmos-react-work';
|
|
5
|
+
import { AppShellDemo as AppShell } from '@pega/cosmos-react-demos/lib/core/AppShell/AppShell.stories';
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Work/ConfigurableLayout',
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'fullscreen'
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
const StyledPlaceholder = styled.div(({ verticalPadding }) => {
|
|
13
|
+
return css `
|
|
14
|
+
background: white;
|
|
15
|
+
border: 0.0625rem black dashed;
|
|
16
|
+
text-align: center;
|
|
17
|
+
min-height: 100%;
|
|
18
|
+
padding: ${`${verticalPadding}rem`} 0;
|
|
19
|
+
`;
|
|
20
|
+
});
|
|
21
|
+
const Placeholder = ({ text }) => {
|
|
22
|
+
const props = {
|
|
23
|
+
verticalPadding: Math.floor(Math.random() * (4 - 1 + 1)) + 1
|
|
24
|
+
};
|
|
25
|
+
return (<Flex as={StyledPlaceholder} container={{ direction: 'column', justify: 'center' }} {...props}>
|
|
26
|
+
<p>{text}</p>
|
|
27
|
+
</Flex>);
|
|
28
|
+
};
|
|
29
|
+
const regionAItems = [
|
|
30
|
+
{
|
|
31
|
+
id: 'a0',
|
|
32
|
+
content: <Placeholder text='A0'/>,
|
|
33
|
+
layoutConfig: {
|
|
34
|
+
width: '1/4',
|
|
35
|
+
minWidth: 150
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: 'a1',
|
|
40
|
+
content: <Placeholder text='A1'/>,
|
|
41
|
+
layoutConfig: {
|
|
42
|
+
width: '1/4',
|
|
43
|
+
minWidth: 150
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: 'a2',
|
|
48
|
+
content: <Placeholder text='A2'/>,
|
|
49
|
+
layoutConfig: {
|
|
50
|
+
width: '1/4',
|
|
51
|
+
minWidth: 150
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: 'a3',
|
|
56
|
+
content: <Placeholder text='A3'/>,
|
|
57
|
+
layoutConfig: {
|
|
58
|
+
width: '1/4',
|
|
59
|
+
minWidth: 150
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
id: 'a4',
|
|
64
|
+
content: <Placeholder text='A4'/>,
|
|
65
|
+
layoutConfig: {
|
|
66
|
+
width: '3/4'
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: 'a5',
|
|
71
|
+
content: <Placeholder text='A5'/>,
|
|
72
|
+
layoutConfig: {
|
|
73
|
+
width: '1/4',
|
|
74
|
+
minWidth: 150
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
id: 'a6',
|
|
79
|
+
content: <Placeholder text='A6'/>,
|
|
80
|
+
layoutConfig: {
|
|
81
|
+
width: '1/3'
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
id: 'a7',
|
|
86
|
+
content: <Placeholder text='A7'/>,
|
|
87
|
+
layoutConfig: {
|
|
88
|
+
width: '2/3'
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
];
|
|
92
|
+
const regionBItems = [
|
|
93
|
+
{
|
|
94
|
+
id: 'b0',
|
|
95
|
+
content: <Placeholder text='B0'/>,
|
|
96
|
+
layoutConfig: {
|
|
97
|
+
width: '1/4',
|
|
98
|
+
minWidth: 150
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
id: 'b1',
|
|
103
|
+
content: <Placeholder text='B1'/>,
|
|
104
|
+
layoutConfig: {
|
|
105
|
+
width: '1/4',
|
|
106
|
+
minWidth: 150
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
id: 'b2',
|
|
111
|
+
content: <Placeholder text='B2'/>,
|
|
112
|
+
layoutConfig: {
|
|
113
|
+
width: '1/4',
|
|
114
|
+
minWidth: 150
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
id: 'b3',
|
|
119
|
+
content: <Placeholder text='B3'/>,
|
|
120
|
+
layoutConfig: {
|
|
121
|
+
width: '1/4',
|
|
122
|
+
minWidth: 150
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
id: 'b4',
|
|
127
|
+
content: <Placeholder text='B4'/>,
|
|
128
|
+
layoutConfig: {
|
|
129
|
+
width: '1/2'
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
id: 'b5',
|
|
134
|
+
content: <Placeholder text='B5'/>,
|
|
135
|
+
layoutConfig: {
|
|
136
|
+
width: '1/2'
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
id: 'b6',
|
|
141
|
+
content: <Placeholder text='B6'/>,
|
|
142
|
+
layoutConfig: {
|
|
143
|
+
width: 'full'
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
id: 'b7',
|
|
148
|
+
content: <Placeholder text='B7'/>,
|
|
149
|
+
layoutConfig: {
|
|
150
|
+
width: '1/3'
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
id: 'b8',
|
|
155
|
+
content: <Placeholder text='B8'/>,
|
|
156
|
+
layoutConfig: {
|
|
157
|
+
width: '2/3'
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
id: 'b9',
|
|
162
|
+
content: <Placeholder text='B9'/>,
|
|
163
|
+
layoutConfig: {
|
|
164
|
+
width: '3/4'
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
id: 'b10',
|
|
169
|
+
content: <Placeholder text='B10'/>,
|
|
170
|
+
layoutConfig: {
|
|
171
|
+
width: '1/4'
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
id: 'b11',
|
|
176
|
+
content: <Placeholder text='B11'/>,
|
|
177
|
+
layoutConfig: {
|
|
178
|
+
width: '1/4',
|
|
179
|
+
minWidth: 330,
|
|
180
|
+
fillAvailable: false
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
];
|
|
184
|
+
export const ConfigurableLayoutInPageRegions = () => {
|
|
185
|
+
const regionElArray = useRef(new Array(2).fill(null));
|
|
186
|
+
const { containerRef, regionWrappedStates } = useTrackWrappedRegions(regionElArray.current);
|
|
187
|
+
return (<AppShell main={<NarrowWidePage regionsRef={containerRef} a={<ConfigurableLayout ref={(el) => {
|
|
188
|
+
if (el)
|
|
189
|
+
regionElArray.current[0] = el;
|
|
190
|
+
}} arrangement={{ size: 'narrow', hasWrapped: regionWrappedStates[0] }} items={regionAItems}/>} b={<ConfigurableLayout ref={(el) => {
|
|
191
|
+
if (el)
|
|
192
|
+
regionElArray.current[1] = el;
|
|
193
|
+
}} arrangement={{ size: 'main', hasWrapped: regionWrappedStates[1] }} items={regionBItems}/>} title='Configurable Layout in Narrow Wide Page'/>}/>);
|
|
194
|
+
};
|
|
195
|
+
//# sourceMappingURL=ConfigurableLayout.stories.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigurableLayout.stories.jsx","sourceRoot":"","sources":["../../../src/work/Con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C,CAAC,YAAgD,CAAC,EACxD,CACH,CACD,CAAC,CAAC,CACA,CAAC,kBAAkB,CACjB,GAAG,CAAC,CAAC,CAAC,EAAe,EAAE,EAAE;oBACvB,IAAI,EAAE;wBAAE,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;gBACxC,CAAC,CAAC,CACF,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,mBAAmB,CAAC,CAAC,CAAC,EAAE,CAAC,CAClE,KAAK,CAAC,CAAC,YAAgD,CAAC,EACxD,CACH,CACD,KAAK,CAAC,yCAAyC,EAC/C,CACH,EACD,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useRef } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Flex, NarrowWidePage } from '@pega/cosmos-react-core';\nimport {\n ConfigurableLayout,\n ConfigurableLayoutProps,\n useTrackWrappedRegions\n} from '@pega/cosmos-react-work';\nimport { AppShellDemo as AppShell } from '@pega/cosmos-react-demos/lib/core/AppShell/AppShell.stories';\n\nexport default {\n title: 'Work/ConfigurableLayout',\n parameters: {\n layout: 'fullscreen'\n }\n};\n\nconst StyledPlaceholder = styled.div(({ verticalPadding }: { verticalPadding: number }) => {\n return css`\n background: white;\n border: 0.0625rem black dashed;\n text-align: center;\n min-height: 100%;\n padding: ${`${verticalPadding}rem`} 0;\n `;\n});\n\nconst Placeholder = ({ text }: { text: string }) => {\n const props = {\n verticalPadding: Math.floor(Math.random() * (4 - 1 + 1)) + 1\n };\n\n return (\n <Flex as={StyledPlaceholder} container={{ direction: 'column', justify: 'center' }} {...props}>\n <p>{text}</p>\n </Flex>\n );\n};\n\nconst regionAItems = [\n {\n id: 'a0',\n content: <Placeholder text='A0' />,\n layoutConfig: {\n width: '1/4',\n minWidth: 150\n }\n },\n {\n id: 'a1',\n content: <Placeholder text='A1' />,\n layoutConfig: {\n width: '1/4',\n minWidth: 150\n }\n },\n {\n id: 'a2',\n content: <Placeholder text='A2' />,\n layoutConfig: {\n width: '1/4',\n minWidth: 150\n }\n },\n {\n id: 'a3',\n content: <Placeholder text='A3' />,\n layoutConfig: {\n width: '1/4',\n minWidth: 150\n }\n },\n {\n id: 'a4',\n content: <Placeholder text='A4' />,\n layoutConfig: {\n width: '3/4'\n }\n },\n {\n id: 'a5',\n content: <Placeholder text='A5' />,\n layoutConfig: {\n width: '1/4',\n minWidth: 150\n }\n },\n {\n id: 'a6',\n content: <Placeholder text='A6' />,\n layoutConfig: {\n width: '1/3'\n }\n },\n {\n id: 'a7',\n content: <Placeholder text='A7' />,\n layoutConfig: {\n width: '2/3'\n }\n }\n];\n\nconst regionBItems = [\n {\n id: 'b0',\n content: <Placeholder text='B0' />,\n layoutConfig: {\n width: '1/4',\n minWidth: 150\n }\n },\n {\n id: 'b1',\n content: <Placeholder text='B1' />,\n layoutConfig: {\n width: '1/4',\n minWidth: 150\n }\n },\n {\n id: 'b2',\n content: <Placeholder text='B2' />,\n layoutConfig: {\n width: '1/4',\n minWidth: 150\n }\n },\n {\n id: 'b3',\n content: <Placeholder text='B3' />,\n layoutConfig: {\n width: '1/4',\n minWidth: 150\n }\n },\n {\n id: 'b4',\n content: <Placeholder text='B4' />,\n layoutConfig: {\n width: '1/2'\n }\n },\n {\n id: 'b5',\n content: <Placeholder text='B5' />,\n layoutConfig: {\n width: '1/2'\n }\n },\n {\n id: 'b6',\n content: <Placeholder text='B6' />,\n layoutConfig: {\n width: 'full'\n }\n },\n {\n id: 'b7',\n content: <Placeholder text='B7' />,\n layoutConfig: {\n width: '1/3'\n }\n },\n {\n id: 'b8',\n content: <Placeholder text='B8' />,\n layoutConfig: {\n width: '2/3'\n }\n },\n {\n id: 'b9',\n content: <Placeholder text='B9' />,\n layoutConfig: {\n width: '3/4'\n }\n },\n {\n id: 'b10',\n content: <Placeholder text='B10' />,\n layoutConfig: {\n width: '1/4'\n }\n },\n {\n id: 'b11',\n content: <Placeholder text='B11' />,\n layoutConfig: {\n width: '1/4',\n minWidth: 330,\n fillAvailable: false\n }\n }\n];\n\nexport const ConfigurableLayoutInPageRegions = () => {\n const regionElArray = useRef(new Array(2).fill(null));\n const { containerRef, regionWrappedStates } = useTrackWrappedRegions(regionElArray.current);\n\n return (\n <AppShell\n main={\n <NarrowWidePage\n regionsRef={containerRef}\n a={\n <ConfigurableLayout\n ref={(el: HTMLElement) => {\n if (el) regionElArray.current[0] = el;\n }}\n arrangement={{ size: 'narrow', hasWrapped: regionWrappedStates[0] }}\n items={regionAItems as ConfigurableLayoutProps['items']}\n />\n }\n b={\n <ConfigurableLayout\n ref={(el: HTMLElement) => {\n if (el) regionElArray.current[1] = el;\n }}\n arrangement={{ size: 'main', hasWrapped: regionWrappedStates[1] }}\n items={regionBItems as ConfigurableLayoutProps['items']}\n />\n }\n title='Configurable Layout in Narrow Wide Page'\n />\n }\n />\n );\n};\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/react';
|
|
2
|
+
import { ConfirmationProps } from '@pega/cosmos-react-work';
|
|
3
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
interface ConfirmationStoryProps {
|
|
6
|
+
title?: ConfirmationProps['title'];
|
|
7
|
+
}
|
|
8
|
+
export declare const ConfirmationDemo: Story<ConfirmationStoryProps>;
|
|
9
|
+
//# sourceMappingURL=Confirmation.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Confirmation.stories.d.ts","sourceRoot":"","sources":["../../../src/work/Confirmation/Confirmation.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAgB,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;;AAI1E,wBAGU;AAEV,UAAU,sBAAsB;IAC9B,KAAK,CAAC,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;CACpC;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,sBAAsB,CAS1D,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Confirmation } from '@pega/cosmos-react-work';
|
|
2
|
+
import { FieldValueListDemo } from '@pega/cosmos-react-demos/lib/core/FieldValueList/FieldValueList.stories';
|
|
3
|
+
import { TaskListDemo } from '@pega/cosmos-react-demos/lib/work/Tasks/TaskList.stories';
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Work/Confirmation',
|
|
6
|
+
component: Confirmation
|
|
7
|
+
};
|
|
8
|
+
export const ConfirmationDemo = ({ title }) => {
|
|
9
|
+
return (<Confirmation title={title || 'US-13371337 confirmation'} details={<FieldValueListDemo name='Name' value='Value' fields={[]}/>} whatsNext={['A little bit of this', 'A little bit of that']} tasks={<TaskListDemo />}/>);
|
|
10
|
+
};
|
|
11
|
+
ConfirmationDemo.args = {
|
|
12
|
+
title: 'US-13371337 confirmation'
|
|
13
|
+
};
|
|
14
|
+
ConfirmationDemo.argTypes = {
|
|
15
|
+
title: { control: { type: 'text' } }
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=Confirmation.stories.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Confirmation.stories.jsx","sourceRoot":"","sources":["../../../src/work/Confirmation/Confirmation.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAqB,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,yEAAyE,CAAC;AAC7G,OAAO,EAAE,YAAY,EAAE,MAAM,0DAA0D,CAAC;AAExF,eAAe;IACb,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,YAAY;CAChB,CAAC;AAMV,MAAM,CAAC,MAAM,gBAAgB,GAAkC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC3E,OAAO,CACL,CAAC,YAAY,CACX,KAAK,CAAC,CAAC,KAAK,IAAI,0BAA0B,CAAC,CAC3C,OAAO,CAAC,CAAC,CAAC,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAG,CAAC,CACtE,SAAS,CAAC,CAAC,CAAC,sBAAsB,EAAE,sBAAsB,CAAC,CAAC,CAC5D,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,AAAD,EAAG,CAAC,EACxB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,gBAAgB,CAAC,IAAI,GAAG;IACtB,KAAK,EAAE,0BAA0B;CAClC,CAAC;AAEF,gBAAgB,CAAC,QAAQ,GAAG;IAC1B,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CACrC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Confirmation, ConfirmationProps } from '@pega/cosmos-react-work';\nimport { FieldValueListDemo } from '@pega/cosmos-react-demos/lib/core/FieldValueList/FieldValueList.stories';\nimport { TaskListDemo } from '@pega/cosmos-react-demos/lib/work/Tasks/TaskList.stories';\n\nexport default {\n title: 'Work/Confirmation',\n component: Confirmation\n} as Meta;\n\ninterface ConfirmationStoryProps {\n title?: ConfirmationProps['title'];\n}\n\nexport const ConfirmationDemo: Story<ConfirmationStoryProps> = ({ title }) => {\n return (\n <Confirmation\n title={title || 'US-13371337 confirmation'}\n details={<FieldValueListDemo name='Name' value='Value' fields={[]} />}\n whatsNext={['A little bit of this', 'A little bit of that']}\n tasks={<TaskListDemo />}\n />\n );\n};\n\nConfirmationDemo.args = {\n title: 'US-13371337 confirmation'\n};\n\nConfirmationDemo.argTypes = {\n title: { control: { type: 'text' } }\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Details.stories.d.ts","sourceRoot":"","sources":["../../../src/work/Details/Details.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;;AAa/C,wBAGU;AAEV,eAAO,MAAM,WAAW,EAAE,KAwEzB,CAAC"}
|