@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,65 @@
|
|
|
1
|
+
import { CurrencyDisplay, DateTimeDisplay, URLDisplay, BooleanDisplay, FieldGroup, FieldValueList, Link } from '@pega/cosmos-react-core';
|
|
2
|
+
import { Details } from '@pega/cosmos-react-work';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Work/Details',
|
|
5
|
+
component: Details
|
|
6
|
+
};
|
|
7
|
+
export const DetailsDemo = () => {
|
|
8
|
+
return (<Details highlightedFields={[
|
|
9
|
+
{
|
|
10
|
+
id: '1',
|
|
11
|
+
name: 'Statement balance',
|
|
12
|
+
value: <CurrencyDisplay value='1,289.00' currencyISOCode='USD'/>
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
id: '2',
|
|
16
|
+
name: 'Total balance',
|
|
17
|
+
value: <CurrencyDisplay value='35,667.00' currencyISOCode='USD'/>
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: '3',
|
|
21
|
+
name: 'Available credit',
|
|
22
|
+
value: <CurrencyDisplay value='5,813.00' currencyISOCode='USD'/>
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: '4',
|
|
26
|
+
name: 'Payment due date',
|
|
27
|
+
value: <DateTimeDisplay value={Date.now()} variant='datetime' format='long'/>
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: '5',
|
|
31
|
+
name: 'Available benefits',
|
|
32
|
+
value: (<URLDisplay value='https://www.google.com/' displayText='View benefits' variant='link'/>)
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: '6',
|
|
36
|
+
name: 'Platinum member',
|
|
37
|
+
value: <BooleanDisplay value/>
|
|
38
|
+
}
|
|
39
|
+
]} regions={[
|
|
40
|
+
<FieldGroup name='Personal'>
|
|
41
|
+
<FieldValueList fields={[
|
|
42
|
+
{ name: 'Home address', value: '12 Higgins Bottom Way, Carnell, NH, 02133' },
|
|
43
|
+
{ name: 'Primary phone', value: '(617) 374-9637' },
|
|
44
|
+
{
|
|
45
|
+
name: 'Primary email',
|
|
46
|
+
value: <Link href='mailto:joe.smith@example.com'>joe.smith@example.com</Link>
|
|
47
|
+
}
|
|
48
|
+
]}/>
|
|
49
|
+
</FieldGroup>,
|
|
50
|
+
<FieldGroup name='Work'>
|
|
51
|
+
<FieldValueList fields={[
|
|
52
|
+
{
|
|
53
|
+
name: 'Work address',
|
|
54
|
+
value: '1 Monolith Business Parkway, Milltown, NH, 02333'
|
|
55
|
+
},
|
|
56
|
+
{ name: 'Work phone', value: '(800) 374-2200' },
|
|
57
|
+
{
|
|
58
|
+
name: 'Work email',
|
|
59
|
+
value: <Link href='mailto:jane.smith@example.com'>jane.smith@example.com</Link>
|
|
60
|
+
}
|
|
61
|
+
]}/>
|
|
62
|
+
</FieldGroup>
|
|
63
|
+
]}/>);
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=Details.stories.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Details.stories.jsx","sourceRoot":"","sources":["../../../src/work/Details/Details.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,eAAe,EACf,eAAe,EACf,UAAU,EACV,cAAc,EACd,UAAU,EACV,cAAc,EACd,IAAI,EACL,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAElD,eAAe;IACb,KAAK,EAAE,cAAc;IACrB,SAAS,EAAE,OAAO;CACX,CAAC;AAEV,MAAM,CAAC,MAAM,WAAW,GAAU,GAAG,EAAE;IACrC,OAAO,CACL,CAAC,OAAO,CACN,iBAAiB,CAAC,CAAC;YACjB;gBACE,EAAE,EAAE,GAAG;gBACP,IAAI,EAAE,mBAAmB;gBACzB,KAAK,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,KAAK,EAAG;aAClE;YACD;gBACE,EAAE,EAAE,GAAG;gBACP,IAAI,EAAE,eAAe;gBACrB,KAAK,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,eAAe,CAAC,KAAK,EAAG;aACnE;YACD;gBACE,EAAE,EAAE,GAAG;gBACP,IAAI,EAAE,kBAAkB;gBACxB,KAAK,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,KAAK,EAAG;aAClE;YACD;gBACE,EAAE,EAAE,GAAG;gBACP,IAAI,EAAE,kBAAkB;gBACxB,KAAK,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,EAAG;aAC/E;YACD;gBACE,EAAE,EAAE,GAAG;gBACP,IAAI,EAAE,oBAAoB;gBAC1B,KAAK,EAAE,CACL,CAAC,UAAU,CACT,KAAK,CAAC,yBAAyB,CAC/B,WAAW,CAAC,eAAe,CAC3B,OAAO,CAAC,MAAM,EACd,CACH;aACF;YACD;gBACE,EAAE,EAAE,GAAG;gBACP,IAAI,EAAE,iBAAiB;gBACvB,KAAK,EAAE,CAAC,cAAc,CAAC,KAAK,EAAG;aAChC;SACF,CAAC,CACF,OAAO,CAAC,CAAC;YACP,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CACzB;UAAA,CAAC,cAAc,CACb,MAAM,CAAC,CAAC;oBACN,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,2CAA2C,EAAE;oBAC5E,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,gBAAgB,EAAE;oBAClD;wBACE,IAAI,EAAE,eAAe;wBACrB,KAAK,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,8BAA8B,CAAC,qBAAqB,EAAE,IAAI,CAAC;qBAC9E;iBACF,CAAC,EAEN;QAAA,EAAE,UAAU,CAAC;YACb,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CACrB;UAAA,CAAC,cAAc,CACb,MAAM,CAAC,CAAC;oBACN;wBACE,IAAI,EAAE,cAAc;wBACpB,KAAK,EAAE,kDAAkD;qBAC1D;oBACD,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,gBAAgB,EAAE;oBAC/C;wBACE,IAAI,EAAE,YAAY;wBAClB,KAAK,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,+BAA+B,CAAC,sBAAsB,EAAE,IAAI,CAAC;qBAChF;iBACF,CAAC,EAEN;QAAA,EAAE,UAAU,CAAC;SACd,CAAC,EACF,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport {\n CurrencyDisplay,\n DateTimeDisplay,\n URLDisplay,\n BooleanDisplay,\n FieldGroup,\n FieldValueList,\n Link\n} from '@pega/cosmos-react-core';\nimport { Details } from '@pega/cosmos-react-work';\n\nexport default {\n title: 'Work/Details',\n component: Details\n} as Meta;\n\nexport const DetailsDemo: Story = () => {\n return (\n <Details\n highlightedFields={[\n {\n id: '1',\n name: 'Statement balance',\n value: <CurrencyDisplay value='1,289.00' currencyISOCode='USD' />\n },\n {\n id: '2',\n name: 'Total balance',\n value: <CurrencyDisplay value='35,667.00' currencyISOCode='USD' />\n },\n {\n id: '3',\n name: 'Available credit',\n value: <CurrencyDisplay value='5,813.00' currencyISOCode='USD' />\n },\n {\n id: '4',\n name: 'Payment due date',\n value: <DateTimeDisplay value={Date.now()} variant='datetime' format='long' />\n },\n {\n id: '5',\n name: 'Available benefits',\n value: (\n <URLDisplay\n value='https://www.google.com/'\n displayText='View benefits'\n variant='link'\n />\n )\n },\n {\n id: '6',\n name: 'Platinum member',\n value: <BooleanDisplay value />\n }\n ]}\n regions={[\n <FieldGroup name='Personal'>\n <FieldValueList\n fields={[\n { name: 'Home address', value: '12 Higgins Bottom Way, Carnell, NH, 02133' },\n { name: 'Primary phone', value: '(617) 374-9637' },\n {\n name: 'Primary email',\n value: <Link href='mailto:joe.smith@example.com'>joe.smith@example.com</Link>\n }\n ]}\n />\n </FieldGroup>,\n <FieldGroup name='Work'>\n <FieldValueList\n fields={[\n {\n name: 'Work address',\n value: '1 Monolith Business Parkway, Milltown, NH, 02333'\n },\n { name: 'Work phone', value: '(800) 374-2200' },\n {\n name: 'Work email',\n value: <Link href='mailto:jane.smith@example.com'>jane.smith@example.com</Link>\n }\n ]}\n />\n </FieldGroup>\n ]}\n />\n );\n};\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/react';
|
|
2
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
3
|
+
export default _default;
|
|
4
|
+
interface GlimpseStoryProps {
|
|
5
|
+
showSecondary?: boolean;
|
|
6
|
+
showVisual?: boolean;
|
|
7
|
+
showFields?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const GlimpseDemo: Story<GlimpseStoryProps>;
|
|
10
|
+
//# sourceMappingURL=Glimpse.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Glimpse.stories.d.ts","sourceRoot":"","sources":["../../../src/work/Glimpse/Glimpse.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;;AAK/C,wBAIU;AAEV,UAAU,iBAAiB;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,iBAAiB,CA6BhD,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Avatar, EmailDisplay, PhoneDisplay } from '@pega/cosmos-react-core';
|
|
2
|
+
import { Glimpse } from '@pega/cosmos-react-work';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Work/Glimpse',
|
|
5
|
+
component: Glimpse,
|
|
6
|
+
parameters: { layout: 'centered' }
|
|
7
|
+
};
|
|
8
|
+
export const GlimpseDemo = (args) => {
|
|
9
|
+
const fields = [
|
|
10
|
+
{
|
|
11
|
+
name: 'Project',
|
|
12
|
+
value: 'Cosmos Demo'
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
name: 'Phone number',
|
|
16
|
+
value: <PhoneDisplay value='(111) 111-1111'/>
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'Email',
|
|
20
|
+
value: <EmailDisplay value='turnc@example.com'/>
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'Reports to',
|
|
24
|
+
value: 'Helen Bush'
|
|
25
|
+
}
|
|
26
|
+
];
|
|
27
|
+
return (<Glimpse id='turnc' primary='Cindy Turner' secondary={args.showSecondary ? ['Lead Engineer'] : undefined} visual={args.showVisual ? <Avatar size='l' name='Cindy Turner'/> : undefined} fields={args.showFields ? fields : undefined}/>);
|
|
28
|
+
};
|
|
29
|
+
GlimpseDemo.args = {
|
|
30
|
+
showSecondary: true,
|
|
31
|
+
showVisual: true,
|
|
32
|
+
showFields: true
|
|
33
|
+
};
|
|
34
|
+
GlimpseDemo.argTypes = {
|
|
35
|
+
showSecondary: { control: { type: 'boolean' } },
|
|
36
|
+
showVisual: { control: { type: 'boolean' } },
|
|
37
|
+
showFields: { control: { type: 'boolean' } }
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=Glimpse.stories.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Glimpse.stories.jsx","sourceRoot":"","sources":["../../../src/work/Glimpse/Glimpse.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAuB,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAClG,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAElD,eAAe;IACb,KAAK,EAAE,cAAc;IACrB,SAAS,EAAE,OAAO;IAClB,UAAU,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE;CAC3B,CAAC;AAQV,MAAM,CAAC,MAAM,WAAW,GAA6B,CAAC,IAAuB,EAAE,EAAE;IAC/E,MAAM,MAAM,GAAkC;QAC5C;YACE,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,aAAa;SACrB;QACD;YACE,IAAI,EAAE,cAAc;YACpB,KAAK,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,gBAAgB,EAAG;SAC/C;QACD;YACE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,mBAAmB,EAAG;SAClD;QACD;YACE,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE,YAAY;SACpB;KACF,CAAC;IAEF,OAAO,CACL,CAAC,OAAO,CACN,EAAE,CAAC,OAAO,CACV,OAAO,CAAC,cAAc,CACtB,SAAS,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAC9D,MAAM,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,EAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAC9E,MAAM,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,EAC7C,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,WAAW,CAAC,IAAI,GAAG;IACjB,aAAa,EAAE,IAAI;IACnB,UAAU,EAAE,IAAI;IAChB,UAAU,EAAE,IAAI;CACjB,CAAC;AAEF,WAAW,CAAC,QAAQ,GAAG;IACrB,aAAa,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC/C,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC5C,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;CAC7C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Avatar, EmailDisplay, FieldValueListProps, PhoneDisplay } from '@pega/cosmos-react-core';\nimport { Glimpse } from '@pega/cosmos-react-work';\n\nexport default {\n title: 'Work/Glimpse',\n component: Glimpse,\n parameters: { layout: 'centered' }\n} as Meta;\n\ninterface GlimpseStoryProps {\n showSecondary?: boolean;\n showVisual?: boolean;\n showFields?: boolean;\n}\n\nexport const GlimpseDemo: Story<GlimpseStoryProps> = (args: GlimpseStoryProps) => {\n const fields: FieldValueListProps['fields'] = [\n {\n name: 'Project',\n value: 'Cosmos Demo'\n },\n {\n name: 'Phone number',\n value: <PhoneDisplay value='(111) 111-1111' />\n },\n {\n name: 'Email',\n value: <EmailDisplay value='turnc@example.com' />\n },\n {\n name: 'Reports to',\n value: 'Helen Bush'\n }\n ];\n\n return (\n <Glimpse\n id='turnc'\n primary='Cindy Turner'\n secondary={args.showSecondary ? ['Lead Engineer'] : undefined}\n visual={args.showVisual ? <Avatar size='l' name='Cindy Turner' /> : undefined}\n fields={args.showFields ? fields : undefined}\n />\n );\n};\n\nGlimpseDemo.args = {\n showSecondary: true,\n showVisual: true,\n showFields: true\n};\n\nGlimpseDemo.argTypes = {\n showSecondary: { control: { type: 'boolean' } },\n showVisual: { control: { type: 'boolean' } },\n showFields: { control: { type: 'boolean' } }\n};\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { OmitStrict } from '@pega/cosmos-react-core';
|
|
3
|
+
import { SearchResultProps, SearchResultsProps } from '@pega/cosmos-react-work';
|
|
4
|
+
declare type ResultMeta = OmitStrict<SearchResultProps, 'link'>;
|
|
5
|
+
export declare const getInitialResults: (setPreview: Dispatch<SetStateAction<ResultMeta | undefined>>, setPreviewTabId: Dispatch<SetStateAction<string | undefined>>) => SearchResultProps[];
|
|
6
|
+
export declare const initialFilters: SearchResultsProps['filters'];
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=SearchResults.mocks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchResults.mocks.d.ts","sourceRoot":"","sources":["../../../src/work/SearchResults/SearchResults.mocks.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAU,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAKhF,aAAK,UAAU,GAAG,UAAU,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;AAiBxD,eAAO,MAAM,iBAAiB,eAChB,SAAS,eAAe,UAAU,GAAG,SAAS,CAAC,CAAC,mBAC3C,SAAS,eAAe,MAAM,GAAG,SAAS,CAAC,CAAC,KAC5D,iBAAiB,EA4CnB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,kBAAkB,CAAC,SAAS,CAqCxD,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { Status } from '@pega/cosmos-react-core';
|
|
2
|
+
const description = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec semper, arcu eu sodales accumsan, ante purus fermentum dolor, ac convallis urna nisl eget lectus. Vivamus ut neque et turpis posuere pharetra imperdiet id augue. Nullam porta venenatis pharetra. Donec hendrerit, dolor eleifend vulputate tristique, dui dolor consequat ante, a vestibulum mi neque in purus.';
|
|
3
|
+
const getResultLink = (result, setPreview, setPreviewTabId) => {
|
|
4
|
+
return {
|
|
5
|
+
href: `projects/${result.id}`,
|
|
6
|
+
previewable: true,
|
|
7
|
+
onPreview: () => {
|
|
8
|
+
setPreview(result);
|
|
9
|
+
setPreviewTabId(`summary-${result.id}`);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export const getInitialResults = (setPreview, setPreviewTabId) => {
|
|
14
|
+
return [
|
|
15
|
+
{
|
|
16
|
+
id: 'PROJ-300',
|
|
17
|
+
title: 'The Art of Building Beautiful Demos',
|
|
18
|
+
description,
|
|
19
|
+
meta: ['Completed', 'Low priority', new Date('01/01/21')]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: 'PROJ-123',
|
|
23
|
+
title: 'Be Single Minded',
|
|
24
|
+
description,
|
|
25
|
+
meta: ['Blocked', 'Medium priority', new Date('12/31/20')]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: 'PROJ-456',
|
|
29
|
+
title: 'Differentiate Yourself and Attract More Attention Sales and Profits',
|
|
30
|
+
description,
|
|
31
|
+
meta: ['Pending', 'High priority', new Date('12/01/20')]
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: 'PROJ-789',
|
|
35
|
+
title: 'Importance of the Custom Test',
|
|
36
|
+
description,
|
|
37
|
+
meta: ['Completed', 'Medium priority', new Date('01/01/21 08:00:00')]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
id: 'PROJ-100',
|
|
41
|
+
title: 'Improve Your Business Cards and Enhance Your Sales',
|
|
42
|
+
description,
|
|
43
|
+
meta: ['Ready', 'High priority', new Date('12/31/20')]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: 'PROJ-200',
|
|
47
|
+
title: 'How to Write Better Advertising',
|
|
48
|
+
description,
|
|
49
|
+
meta: ['Ready', 'Low priority', new Date('12/25/20')]
|
|
50
|
+
}
|
|
51
|
+
].map(result => {
|
|
52
|
+
return {
|
|
53
|
+
...result,
|
|
54
|
+
link: getResultLink(result, setPreview, setPreviewTabId)
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
export const initialFilters = [
|
|
59
|
+
{
|
|
60
|
+
type: 'select',
|
|
61
|
+
name: 'Status',
|
|
62
|
+
items: [
|
|
63
|
+
{
|
|
64
|
+
id: 'blocked',
|
|
65
|
+
label: <Status variant='urgent'>Blocked</Status>,
|
|
66
|
+
checked: false,
|
|
67
|
+
name: 'Blocked'
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: 'pending',
|
|
71
|
+
label: <Status variant='pending'>Pending</Status>,
|
|
72
|
+
checked: false,
|
|
73
|
+
name: 'Pending'
|
|
74
|
+
},
|
|
75
|
+
{ id: 'ready', label: <Status variant='info'>Ready</Status>, checked: false, name: 'Ready' },
|
|
76
|
+
{
|
|
77
|
+
id: 'completed',
|
|
78
|
+
label: <Status variant='success'>Completed</Status>,
|
|
79
|
+
checked: false,
|
|
80
|
+
name: 'Completed'
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
type: 'select',
|
|
86
|
+
selectType: 'single-select',
|
|
87
|
+
name: 'Last updated',
|
|
88
|
+
items: [
|
|
89
|
+
{ id: 'today', label: 'Today', checked: false, name: 'Today' },
|
|
90
|
+
{ id: 'yesterday', label: 'Yesterday', checked: false, name: 'Yesterday' },
|
|
91
|
+
{ id: '7-days', label: 'Last 7 days', checked: false, name: 'Last 7 days' },
|
|
92
|
+
{ id: '30-days', label: 'Last 30 days', checked: false, name: 'Last 30 days' }
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
];
|
|
96
|
+
//# sourceMappingURL=SearchResults.mocks.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchResults.mocks.jsx","sourceRoot":"","sources":["../../../src/work/SearchResults/SearchResults.mocks.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAc,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAG7D,MAAM,WAAW,GACf,kXAAkX,CAAC;AAIrX,MAAM,aAAa,GAAG,CACpB,MAAkB,EAClB,UAA4D,EAC5D,eAA6D,EAC7D,EAAE;IACF,OAAO;QACL,IAAI,EAAE,YAAY,MAAM,CAAC,EAAE,EAAE;QAC7B,WAAW,EAAE,IAAI;QACjB,SAAS,EAAE,GAAG,EAAE;YACd,UAAU,CAAC,MAAM,CAAC,CAAC;YACnB,eAAe,CAAC,WAAW,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;QAC1C,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,UAA4D,EAC5D,eAA6D,EACxC,EAAE;IACvB,OAAO;QACL;YACE,EAAE,EAAE,UAAU;YACd,KAAK,EAAE,qCAAqC;YAC5C,WAAW;YACX,IAAI,EAAE,CAAC,WAAW,EAAE,cAAc,EAAE,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC;SAC1D;QACD;YACE,EAAE,EAAE,UAAU;YACd,KAAK,EAAE,kBAAkB;YACzB,WAAW;YACX,IAAI,EAAE,CAAC,SAAS,EAAE,iBAAiB,EAAE,IAAI,IA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AAC;gBACjD,OAAO,EAAE,KAAK;gBACd,IAAI,EAAE,SAAS;aAChB;YACD,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE;YAC5F;gBACE,EAAE,EAAE,WAAW;gBACf,KAAK,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC;gBACnD,OAAO,EAAE,KAAK;gBACd,IAAI,EAAE,WAAW;aAClB;SACF;KACF;IACD;QACE,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,eAAe;QAC3B,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE;YACL,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE;YAC9D,EAAE,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE;YAC1E,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,aAAa,EAAE;YAC3E,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE;SAC/E;KACF;CACF,CAAC","sourcesContent":["import { Dispatch, SetStateAction } from 'react';\n\nimport { OmitStrict, Status } from '@pega/cosmos-react-core';\nimport { SearchResultProps, SearchResultsProps } from '@pega/cosmos-react-work';\n\nconst description =\n 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec semper, arcu eu sodales accumsan, ante purus fermentum dolor, ac convallis urna nisl eget lectus. Vivamus ut neque et turpis posuere pharetra imperdiet id augue. Nullam porta venenatis pharetra. Donec hendrerit, dolor eleifend vulputate tristique, dui dolor consequat ante, a vestibulum mi neque in purus.';\n\ntype ResultMeta = OmitStrict<SearchResultProps, 'link'>;\n\nconst getResultLink = (\n result: ResultMeta,\n setPreview: Dispatch<SetStateAction<ResultMeta | undefined>>,\n setPreviewTabId: Dispatch<SetStateAction<string | undefined>>\n) => {\n return {\n href: `projects/${result.id}`,\n previewable: true,\n onPreview: () => {\n setPreview(result);\n setPreviewTabId(`summary-${result.id}`);\n }\n };\n};\n\nexport const getInitialResults = (\n setPreview: Dispatch<SetStateAction<ResultMeta | undefined>>,\n setPreviewTabId: Dispatch<SetStateAction<string | undefined>>\n): SearchResultProps[] => {\n return [\n {\n id: 'PROJ-300',\n title: 'The Art of Building Beautiful Demos',\n description,\n meta: ['Completed', 'Low priority', new Date('01/01/21')]\n },\n {\n id: 'PROJ-123',\n title: 'Be Single Minded',\n description,\n meta: ['Blocked', 'Medium priority', new Date('12/31/20')]\n },\n {\n id: 'PROJ-456',\n title: 'Differentiate Yourself and Attract More Attention Sales and Profits',\n description,\n meta: ['Pending', 'High priority', new Date('12/01/20')]\n },\n {\n id: 'PROJ-789',\n title: 'Importance of the Custom Test',\n description,\n meta: ['Completed', 'Medium priority', new Date('01/01/21 08:00:00')]\n },\n {\n id: 'PROJ-100',\n title: 'Improve Your Business Cards and Enhance Your Sales',\n description,\n meta: ['Ready', 'High priority', new Date('12/31/20')]\n },\n {\n id: 'PROJ-200',\n title: 'How to Write Better Advertising',\n description,\n meta: ['Ready', 'Low priority', new Date('12/25/20')]\n }\n ].map(result => {\n return {\n ...result,\n link: getResultLink(result, setPreview, setPreviewTabId)\n };\n });\n};\n\nexport const initialFilters: SearchResultsProps['filters'] = [\n {\n type: 'select',\n name: 'Status',\n items: [\n {\n id: 'blocked',\n label: <Status variant='urgent'>Blocked</Status>,\n checked: false,\n name: 'Blocked'\n },\n {\n id: 'pending',\n label: <Status variant='pending'>Pending</Status>,\n checked: false,\n name: 'Pending'\n },\n { id: 'ready', label: <Status variant='info'>Ready</Status>, checked: false, name: 'Ready' },\n {\n id: 'completed',\n label: <Status variant='success'>Completed</Status>,\n checked: false,\n name: 'Completed'\n }\n ]\n },\n {\n type: 'select',\n selectType: 'single-select',\n name: 'Last updated',\n items: [\n { id: 'today', label: 'Today', checked: false, name: 'Today' },\n { id: 'yesterday', label: 'Yesterday', checked: false, name: 'Yesterday' },\n { id: '7-days', label: 'Last 7 days', checked: false, name: 'Last 7 days' },\n { id: '30-days', label: 'Last 30 days', checked: false, name: 'Last 30 days' }\n ]\n }\n];\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/react';
|
|
2
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
3
|
+
export default _default;
|
|
4
|
+
interface SearchResultsStoryProps {
|
|
5
|
+
withAppShell?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const SearchResultsDemo: Story<SearchResultsStoryProps>;
|
|
8
|
+
//# sourceMappingURL=SearchResults.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchResults.stories.d.ts","sourceRoot":"","sources":["../../../src/work/SearchResults/SearchResults.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;;AAuB/C,wBAMU;AAIV,UAAU,uBAAuB;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAiBD,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,uBAAuB,CA6O5D,CAAC"}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { useEffect, useState, useMemo } from 'react';
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
import { Status, OneColumnPage, Text, Flex, defaultThemeProp } from '@pega/cosmos-react-core';
|
|
4
|
+
import { CasePreview, SearchResults } from '@pega/cosmos-react-work';
|
|
5
|
+
import { AppShellDemo } from '@pega/cosmos-react-demos/lib/core/AppShell/AppShell.stories';
|
|
6
|
+
import { getInitialResults, initialFilters } from './SearchResults.mocks';
|
|
7
|
+
export default {
|
|
8
|
+
title: 'Work/SearchResults',
|
|
9
|
+
component: SearchResults,
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: 'fullscreen'
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
const ColoredText = styled.span(({ colorVariant, theme: { base: { palette } } }) => {
|
|
15
|
+
return css `
|
|
16
|
+
color: ${palette[colorVariant]};
|
|
17
|
+
`;
|
|
18
|
+
});
|
|
19
|
+
ColoredText.defaultProps = defaultThemeProp;
|
|
20
|
+
export const SearchResultsDemo = (args) => {
|
|
21
|
+
const [preview, setPreview] = useState();
|
|
22
|
+
const [previewTabId, setPreviewTabId] = useState();
|
|
23
|
+
const initialResults = useMemo(() => getInitialResults(setPreview, setPreviewTabId), []);
|
|
24
|
+
const [results, setResults] = useState(initialResults);
|
|
25
|
+
const [filters, setFilters] = useState(initialFilters);
|
|
26
|
+
const [search, setSearch] = useState('');
|
|
27
|
+
const [limit, setLimit] = useState(2);
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
const activeFilters = filters.flatMap(group => {
|
|
30
|
+
if (group.type === 'select') {
|
|
31
|
+
return group.items.flatMap(item => {
|
|
32
|
+
if (item.checked) {
|
|
33
|
+
return {
|
|
34
|
+
id: item.id,
|
|
35
|
+
name: item.name,
|
|
36
|
+
groupName: group.name
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
return [];
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
return [];
|
|
43
|
+
});
|
|
44
|
+
if (activeFilters.length > 0 || search !== '') {
|
|
45
|
+
setResults(() => {
|
|
46
|
+
const filteredResults = initialResults.filter(result => {
|
|
47
|
+
const statusFilterActive = activeFilters.findIndex(x => x.groupName === 'Status') !== -1;
|
|
48
|
+
const lastUpdatedFilterActive = activeFilters.findIndex(x => x.groupName === 'Last updated') !== -1;
|
|
49
|
+
let matchesStatusFilter = !statusFilterActive;
|
|
50
|
+
let matchesLastUpdatedFilter = !lastUpdatedFilterActive;
|
|
51
|
+
activeFilters.forEach(filter => {
|
|
52
|
+
result.meta?.forEach(tag => {
|
|
53
|
+
if (tag) {
|
|
54
|
+
if (!matchesStatusFilter && filter.groupName === 'Status' && tag === filter.name) {
|
|
55
|
+
matchesStatusFilter = true;
|
|
56
|
+
}
|
|
57
|
+
if (!matchesLastUpdatedFilter &&
|
|
58
|
+
filter.groupName === 'Last updated' &&
|
|
59
|
+
typeof tag === 'string' &&
|
|
60
|
+
((filter.name === 'Today' && Date.parse(tag) >= Date.parse('01/01/21')) ||
|
|
61
|
+
(filter.name === 'Yesterday' && Date.parse(tag) >= Date.parse('12/31/20')) ||
|
|
62
|
+
(filter.name === 'Last 7 days' && Date.parse(tag) >= Date.parse('12/25/20')) ||
|
|
63
|
+
(filter.name === 'Last 30 days' && Date.parse(tag) >= Date.parse('12/01/20')))) {
|
|
64
|
+
matchesLastUpdatedFilter = true;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
return matchesStatusFilter && matchesLastUpdatedFilter;
|
|
70
|
+
});
|
|
71
|
+
return filteredResults.filter(result => {
|
|
72
|
+
if (result &&
|
|
73
|
+
(result.description?.toLowerCase().includes(search.toLowerCase()) ||
|
|
74
|
+
result.title.toLowerCase().includes(search.toLowerCase()) ||
|
|
75
|
+
result.id.toLowerCase().includes(search.toLowerCase()))) {
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
return false;
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
setResults([]);
|
|
84
|
+
}
|
|
85
|
+
}, [search, filters]);
|
|
86
|
+
const handleFilterChange = (changeEvent) => {
|
|
87
|
+
setFilters(curr => {
|
|
88
|
+
return curr.map(filter => {
|
|
89
|
+
const newFilter = { ...filter };
|
|
90
|
+
if (newFilter.name === changeEvent.name &&
|
|
91
|
+
changeEvent.type === 'select' &&
|
|
92
|
+
newFilter.type === 'select') {
|
|
93
|
+
newFilter.items = newFilter.items.map(item => {
|
|
94
|
+
const newItem = { ...item };
|
|
95
|
+
if (item.id === changeEvent.value.id)
|
|
96
|
+
newItem.checked = changeEvent.value.checked;
|
|
97
|
+
else if (newFilter.selectType === 'single-select')
|
|
98
|
+
newItem.checked = false;
|
|
99
|
+
return newItem;
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
return newFilter;
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
const clearAllFilters = () => {
|
|
107
|
+
setFilters(curr => {
|
|
108
|
+
return curr.map(filter => {
|
|
109
|
+
if (filter.type === 'select') {
|
|
110
|
+
filter.items = filter.items.map(item => {
|
|
111
|
+
item.checked = false;
|
|
112
|
+
return item;
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
return filter;
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
};
|
|
119
|
+
const handleClearFilter = (filterName) => {
|
|
120
|
+
setFilters(curr => {
|
|
121
|
+
return curr.map(filter => {
|
|
122
|
+
if (filter.name === filterName && filter.type === 'select') {
|
|
123
|
+
filter.items = filter.items.map(item => {
|
|
124
|
+
item.checked = false;
|
|
125
|
+
return item;
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
return filter;
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
};
|
|
132
|
+
const handleShowMore = () => {
|
|
133
|
+
if (limit < results.length)
|
|
134
|
+
setLimit(curr => curr + 2);
|
|
135
|
+
};
|
|
136
|
+
const renderForDisplay = (resultsToDisplay) => {
|
|
137
|
+
return resultsToDisplay.map(result => {
|
|
138
|
+
if (result.meta) {
|
|
139
|
+
const metaValues = [...result.meta];
|
|
140
|
+
const renderedMeta = metaValues.map(item => {
|
|
141
|
+
if (!Number.isNaN(Date.parse(item))) {
|
|
142
|
+
if (Date.parse(item) >= Date.parse('12/01/20') &&
|
|
143
|
+
Date.parse(item) < Date.parse('12/25/20'))
|
|
144
|
+
return 'Updated 1 month ago';
|
|
145
|
+
if (Date.parse(item) >= Date.parse('12/25/20') &&
|
|
146
|
+
Date.parse(item) < Date.parse('12/31/20'))
|
|
147
|
+
return 'Updated 1 week ago';
|
|
148
|
+
if (Date.parse(item) >= Date.parse('12/31/20') &&
|
|
149
|
+
Date.parse(item) < Date.parse('01/01/21'))
|
|
150
|
+
return 'Updated yesterday';
|
|
151
|
+
if (Date.parse(item) >= Date.parse('01/01/21') &&
|
|
152
|
+
Date.parse(item) < Date.parse('01/01/21 07:00:00'))
|
|
153
|
+
return 'Updated today';
|
|
154
|
+
return 'Updated just now';
|
|
155
|
+
}
|
|
156
|
+
switch (item) {
|
|
157
|
+
case 'Completed':
|
|
158
|
+
return <Status variant='success'>Completed</Status>;
|
|
159
|
+
case 'Ready':
|
|
160
|
+
return <Status variant='info'>Ready</Status>;
|
|
161
|
+
case 'Pending':
|
|
162
|
+
return <Status variant='pending'>Pending</Status>;
|
|
163
|
+
case 'Blocked':
|
|
164
|
+
return <Status variant='urgent'>Blocked</Status>;
|
|
165
|
+
case 'Low priority':
|
|
166
|
+
return <Text variant='secondary'>Low priority</Text>;
|
|
167
|
+
case 'Medium priority':
|
|
168
|
+
return (<Text as={ColoredText} colorVariant='warn' variant='secondary'>
|
|
169
|
+
Medium priority
|
|
170
|
+
</Text>);
|
|
171
|
+
case 'High priority':
|
|
172
|
+
return (<Text as={ColoredText} colorVariant='urgent' variant='secondary'>
|
|
173
|
+
High priority
|
|
174
|
+
</Text>);
|
|
175
|
+
default:
|
|
176
|
+
return item;
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
return { ...result, meta: renderedMeta };
|
|
180
|
+
}
|
|
181
|
+
return result;
|
|
182
|
+
});
|
|
183
|
+
};
|
|
184
|
+
const searchResults = (<>
|
|
185
|
+
<OneColumnPage title='Search results' a={<SearchResults results={limit < results.length
|
|
186
|
+
? renderForDisplay(results.slice(0, limit))
|
|
187
|
+
: renderForDisplay(results)} searchInputProps={{ value: search, onSearchChange: setSearch }} count={results.length} filters={filters} onFilterChange={handleFilterChange} onClearAllFilters={clearAllFilters} onClearFilter={handleClearFilter} onShowMore={limit < results.length ? handleShowMore : undefined}/>}/>
|
|
188
|
+
|
|
189
|
+
<CasePreview open={!!preview} caseId={preview?.id || ''} heading={preview?.title || ''} tabs={{
|
|
190
|
+
items: [],
|
|
191
|
+
currentTabId: previewTabId || '',
|
|
192
|
+
onClick: (id) => setPreviewTabId(id)
|
|
193
|
+
}} followed summary={preview && <Flex container={{ pad: 2 }}>{preview.description}</Flex>} onBeforeClose={() => {
|
|
194
|
+
setPreview(undefined);
|
|
195
|
+
}}/>
|
|
196
|
+
</>);
|
|
197
|
+
return args.withAppShell ? <AppShellDemo appHeader main={searchResults}/> : searchResults;
|
|
198
|
+
};
|
|
199
|
+
SearchResultsDemo.args = {
|
|
200
|
+
withAppShell: false
|
|
201
|
+
};
|
|
202
|
+
SearchResultsDemo.argTypes = {
|
|
203
|
+
withAppShell: { control: { type: 'boolean' } }
|
|
204
|
+
};
|
|
205
|
+
//# sourceMappingURL=SearchResults.stories.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchResults.stories.jsx","sourceRoot":"","sources":["../../../src/work/SearchResults/SearchResults.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,MAAM,EAEN,aAAa,EACb,IAAI,EACJ,IAAI,EACJ,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,WAAW,EACX,aAAa,EAId,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,6DAA6D,CAAC;AAE3F,OAAO,E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import { Meta, Story } from '@storybook/react';\nimport { useEffect, useState, useMemo } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n Status,\n OmitStrict,\n OneColumnPage,\n Text,\n Flex,\n defaultThemeProp\n} from '@pega/cosmos-react-core';\nimport {\n CasePreview,\n SearchResults,\n SearchResultsProps,\n FilterEvent,\n SearchResultProps\n} from '@pega/cosmos-react-work';\nimport { AppShellDemo } from '@pega/cosmos-react-demos/lib/core/AppShell/AppShell.stories';\n\nimport { getInitialResults, initialFilters } from './SearchResults.mocks';\n\nexport default {\n title: 'Work/SearchResults',\n component: SearchResults,\n parameters: {\n layout: 'fullscreen'\n }\n} as Meta;\n\ntype ResultMeta = OmitStrict<SearchResultProps, 'link'>;\n\ninterface SearchResultsStoryProps {\n withAppShell?: boolean;\n}\n\nconst ColoredText = styled.span<{ colorVariant: 'warn' | 'urgent' }>(\n ({\n colorVariant,\n theme: {\n base: { palette }\n }\n }) => {\n return css`\n color: ${palette[colorVariant]};\n `;\n }\n);\n\nColoredText.defaultProps = defaultThemeProp;\n\nexport const SearchResultsDemo: Story<SearchResultsStoryProps> = (\n args: SearchResultsStoryProps\n) => {\n const [preview, setPreview] = useState<undefined | ResultMeta>();\n const [previewTabId, setPreviewTabId] = useState<undefined | string>();\n const initialResults = useMemo(() => getInitialResults(setPreview, setPreviewTabId), []);\n const [results, setResults] = useState(initialResults);\n const [filters, setFilters] = useState(initialFilters);\n const [search, setSearch] = useState('');\n const [limit, setLimit] = useState(2);\n\n useEffect(() => {\n const activeFilters = filters.flatMap(group => {\n if (group.type === 'select') {\n return group.items.flatMap(item => {\n if (item.checked) {\n return {\n id: item.id,\n name: item.name,\n groupName: group.name\n };\n }\n return [];\n });\n }\n return [];\n });\n\n if (activeFilters.length > 0 || search !== '') {\n setResults(() => {\n const filteredResults = initialResults.filter(result => {\n const statusFilterActive = activeFilters.findIndex(x => x.groupName === 'Status') !== -1;\n const lastUpdatedFilterActive =\n activeFilters.findIndex(x => x.groupName === 'Last updated') !== -1;\n\n let matchesStatusFilter = !statusFilterActive;\n let matchesLastUpdatedFilter = !lastUpdatedFilterActive;\n\n activeFilters.forEach(filter => {\n result.meta?.forEach(tag => {\n if (tag) {\n if (!matchesStatusFilter && filter.groupName === 'Status' && tag === filter.name) {\n matchesStatusFilter = true;\n }\n if (\n !matchesLastUpdatedFilter &&\n filter.groupName === 'Last updated' &&\n typeof tag === 'string' &&\n ((filter.name === 'Today' && Date.parse(tag) >= Date.parse('01/01/21')) ||\n (filter.name === 'Yesterday' && Date.parse(tag) >= Date.parse('12/31/20')) ||\n (filter.name === 'Last 7 days' && Date.parse(tag) >= Date.parse('12/25/20')) ||\n (filter.name === 'Last 30 days' && Date.parse(tag) >= Date.parse('12/01/20')))\n ) {\n matchesLastUpdatedFilter = true;\n }\n }\n });\n });\n\n return matchesStatusFilter && matchesLastUpdatedFilter;\n });\n\n return filteredResults.filter(result => {\n if (\n result &&\n (result.description?.toLowerCase().includes(search.toLowerCase()) ||\n result.title.toLowerCase().includes(search.toLowerCase()) ||\n result.id.toLowerCase().includes(search.toLowerCase()))\n ) {\n return true;\n }\n\n return false;\n });\n });\n } else {\n setResults([]);\n }\n }, [search, filters]);\n\n const handleFilterChange = (changeEvent: FilterEvent) => {\n setFilters(curr => {\n return curr.map(filter => {\n const newFilter = { ...filter };\n if (\n newFilter.name === changeEvent.name &&\n changeEvent.type === 'select' &&\n newFilter.type === 'select'\n ) {\n newFilter.items = newFilter.items.map(item => {\n const newItem = { ...item };\n if (item.id === changeEvent.value.id) newItem.checked = changeEvent.value.checked;\n else if (newFilter.selectType === 'single-select') newItem.checked = false;\n return newItem;\n });\n }\n return newFilter;\n });\n });\n };\n\n const clearAllFilters = () => {\n setFilters(curr => {\n return curr.map(filter => {\n if (filter.type === 'select') {\n filter.items = filter.items.map(item => {\n item.checked = false;\n return item;\n });\n }\n return filter;\n });\n });\n };\n\n const handleClearFilter = (filterName: string) => {\n setFilters(curr => {\n return curr.map(filter => {\n if (filter.name === filterName && filter.type === 'select') {\n filter.items = filter.items.map(item => {\n item.checked = false;\n return item;\n });\n }\n return filter;\n });\n });\n };\n\n const handleShowMore = () => {\n if (limit < results.length) setLimit(curr => curr + 2);\n };\n\n const renderForDisplay = (\n resultsToDisplay: SearchResultsProps['results']\n ): SearchResultsProps['results'] => {\n return resultsToDisplay.map(result => {\n if (result.meta) {\n const metaValues = [...result.meta];\n const renderedMeta = metaValues.map(item => {\n if (!Number.isNaN(Date.parse(item as string))) {\n if (\n Date.parse(item as string) >= Date.parse('12/01/20') &&\n Date.parse(item as string) < Date.parse('12/25/20')\n )\n return 'Updated 1 month ago';\n if (\n Date.parse(item as string) >= Date.parse('12/25/20') &&\n Date.parse(item as string) < Date.parse('12/31/20')\n )\n return 'Updated 1 week ago';\n if (\n Date.parse(item as string) >= Date.parse('12/31/20') &&\n Date.parse(item as string) < Date.parse('01/01/21')\n )\n return 'Updated yesterday';\n if (\n Date.parse(item as string) >= Date.parse('01/01/21') &&\n Date.parse(item as string) < Date.parse('01/01/21 07:00:00')\n )\n return 'Updated today';\n return 'Updated just now';\n }\n switch (item) {\n case 'Completed':\n return <Status variant='success'>Completed</Status>;\n case 'Ready':\n return <Status variant='info'>Ready</Status>;\n case 'Pending':\n return <Status variant='pending'>Pending</Status>;\n case 'Blocked':\n return <Status variant='urgent'>Blocked</Status>;\n case 'Low priority':\n return <Text variant='secondary'>Low priority</Text>;\n case 'Medium priority':\n return (\n <Text as={ColoredText} colorVariant='warn' variant='secondary'>\n Medium priority\n </Text>\n );\n case 'High priority':\n return (\n <Text as={ColoredText} colorVariant='urgent' variant='secondary'>\n High priority\n </Text>\n );\n default:\n return item;\n }\n });\n return { ...result, meta: renderedMeta };\n }\n return result;\n });\n };\n\n const searchResults = (\n <>\n <OneColumnPage\n title='Search results'\n a={\n <SearchResults\n results={\n limit < results.length\n ? renderForDisplay(results.slice(0, limit))\n : renderForDisplay(results)\n }\n searchInputProps={{ value: search, onSearchChange: setSearch }}\n count={results.length}\n filters={filters}\n onFilterChange={handleFilterChange}\n onClearAllFilters={clearAllFilters}\n onClearFilter={handleClearFilter}\n onShowMore={limit < results.length ? handleShowMore : undefined}\n />\n }\n />\n\n <CasePreview\n open={!!preview}\n caseId={preview?.id || ''}\n heading={preview?.title || ''}\n tabs={{\n items: [],\n currentTabId: previewTabId || '',\n onClick: (id: string) => setPreviewTabId(id)\n }}\n followed\n summary={preview && <Flex container={{ pad: 2 }}>{preview.description}</Flex>}\n onBeforeClose={() => {\n setPreview(undefined);\n }}\n />\n </>\n );\n\n return args.withAppShell ? <AppShellDemo appHeader main={searchResults} /> : searchResults;\n};\n\nSearchResultsDemo.args = {\n withAppShell: false\n};\n\nSearchResultsDemo.argTypes = {\n withAppShell: { control: { type: 'boolean' } }\n};\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/react';
|
|
2
|
+
import { StagesProps } from '@pega/cosmos-react-work';
|
|
3
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
interface StagesStoryProps {
|
|
6
|
+
caseTitle?: StagesProps['caseTitle'];
|
|
7
|
+
numberOfStages?: number;
|
|
8
|
+
currentStage?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const StagesDemo: Story<StagesStoryProps>;
|
|
11
|
+
//# sourceMappingURL=Stages.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stages.stories.d.ts","sourceRoot":"","sources":["../../../src/work/Stages/Stages.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAU,WAAW,EAAE,MAAM,yBAAyB,CAAC;;AAE9D,wBAMU;AAEV,UAAU,gBAAgB;IACxB,SAAS,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IACrC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,gBAAgB,CAsD9C,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Link } from '@pega/cosmos-react-core';
|
|
2
|
+
import { Stages } from '@pega/cosmos-react-work';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Work/Stages',
|
|
5
|
+
component: Stages,
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: 'centered'
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
export const StagesDemo = (args) => {
|
|
11
|
+
const stageNames = ['Initial', 'Plan', 'Development', 'Accessibility', 'Review'];
|
|
12
|
+
const stepNames = [
|
|
13
|
+
'First step',
|
|
14
|
+
'Second step that contains much more text to demonstrate overflow handling',
|
|
15
|
+
<Link href='https://www.pega.com' target='_blank'>
|
|
16
|
+
Steps can be links as well
|
|
17
|
+
</Link>
|
|
18
|
+
];
|
|
19
|
+
const dateValue = new Date();
|
|
20
|
+
const isComplete = (currentStageIndex, stageIndex, index) => {
|
|
21
|
+
if (stageIndex < currentStageIndex)
|
|
22
|
+
return true;
|
|
23
|
+
if (stageIndex === currentStageIndex && index === 0)
|
|
24
|
+
return true;
|
|
25
|
+
return false;
|
|
26
|
+
};
|
|
27
|
+
const getSteps = (currentStageIndex, stageIndex) => {
|
|
28
|
+
return stepNames.map((_, i) => {
|
|
29
|
+
return {
|
|
30
|
+
name: stepNames[i],
|
|
31
|
+
complete: isComplete(currentStageIndex, stageIndex, i),
|
|
32
|
+
id: `${i + 1}`
|
|
33
|
+
};
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
const getStages = (numberOfStages, current = 0) => {
|
|
37
|
+
return Array.from({ length: numberOfStages || 0 }).map((_, i) => {
|
|
38
|
+
let stageName = '';
|
|
39
|
+
if (i <= 4)
|
|
40
|
+
stageName = stageNames[i];
|
|
41
|
+
else
|
|
42
|
+
stageName = `Stage ${i + 1}`;
|
|
43
|
+
return {
|
|
44
|
+
name: stageName,
|
|
45
|
+
id: `stage-${i + 1}`,
|
|
46
|
+
date: dateValue.setDate(dateValue.getDate() - ((numberOfStages || i) - i)),
|
|
47
|
+
required: true,
|
|
48
|
+
complete: i + 1 < current,
|
|
49
|
+
steps: getSteps(current - 1, i)
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
return (<Stages stages={getStages(args.numberOfStages, args.currentStage)} current={`stage-${args.currentStage}`} caseTitle={args.caseTitle}/>);
|
|
54
|
+
};
|
|
55
|
+
StagesDemo.args = {
|
|
56
|
+
caseTitle: 'Demo',
|
|
57
|
+
numberOfStages: 6,
|
|
58
|
+
currentStage: 3
|
|
59
|
+
};
|
|
60
|
+
StagesDemo.argTypes = {
|
|
61
|
+
caseTitle: { control: { type: 'text' } },
|
|
62
|
+
numberOfStages: { control: { type: 'number' } },
|
|
63
|
+
currentStage: { control: { type: 'number' } }
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=Stages.stories.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stages.stories.jsx","sourceRoot":"","sources":["../../../src/work/Stages/Stages.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAe,MAAM,yBAAyB,CAAC;AAE9D,eAAe;IACb,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,MAAM;IACjB,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;KACnB;CACM,CAAC;AAQV,MAAM,CAAC,MAAM,UAAU,GAA4B,CAAC,IAAsB,EAAE,EAAE;IAC5E,MAAM,UAAU,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,QAAQ,CAAC,CAAC;IAEjF,MAAM,SAAS,GAAG;QAChB,YAAY;QACZ,2EAA2E;QAC3E,CAAC,IAAI,CAAC,IAAI,CAAC,sBAAsB,CA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C,OAAO,CAAC,SAAS,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,cAAc,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;gBAC1E,QAAQ,EAAE,IAAI;gBACd,QAAQ,EAAE,CAAC,GAAG,CAAC,GAAG,OAAO;gBACzB,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,CAAC,EAAE,CAAC,CAAC;aAChC,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,MAAM,CACL,MAAM,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,CAC1D,OAAO,CAAC,CAAC,SAAS,IAAI,CAAC,YAAY,EAAE,CAAC,CACtC,SAAS,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,EAC1B,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,UAAU,CAAC,IAAI,GAAG;IAChB,SAAS,EAAE,MAAM;IACjB,cAAc,EAAE,CAAC;IACjB,YAAY,EAAE,CAAC;CAChB,CAAC;AAEF,UAAU,CAAC,QAAQ,GAAG;IACpB,SAAS,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACxC,cAAc,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IAC/C,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;CAC9C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\n\nimport { Link } from '@pega/cosmos-react-core';\nimport { Stages, StagesProps } from '@pega/cosmos-react-work';\n\nexport default {\n title: 'Work/Stages',\n component: Stages,\n parameters: {\n layout: 'centered'\n }\n} as Meta;\n\ninterface StagesStoryProps {\n caseTitle?: StagesProps['caseTitle'];\n numberOfStages?: number;\n currentStage?: number;\n}\n\nexport const StagesDemo: Story<StagesStoryProps> = (args: StagesStoryProps) => {\n const stageNames = ['Initial', 'Plan', 'Development', 'Accessibility', 'Review'];\n\n const stepNames = [\n 'First step',\n 'Second step that contains much more text to demonstrate overflow handling',\n <Link href='https://www.pega.com' target='_blank'>\n Steps can be links as well\n </Link>\n ] as const;\n\n const dateValue = new Date();\n\n const isComplete = (currentStageIndex: number, stageIndex: number, index: number) => {\n if (stageIndex < currentStageIndex) return true;\n if (stageIndex === currentStageIndex && index === 0) return true;\n return false;\n };\n\n const getSteps = (currentStageIndex: number, stageIndex: number) => {\n return stepNames.map((_, i) => {\n return {\n name: stepNames[i],\n complete: isComplete(currentStageIndex, stageIndex, i),\n id: `${i + 1}`\n };\n });\n };\n\n const getStages = (numberOfStages?: number, current = 0) => {\n return Array.from({ length: numberOfStages || 0 }).map((_, i) => {\n let stageName = '';\n\n if (i <= 4) stageName = stageNames[i];\n else stageName = `Stage ${i + 1}`;\n\n return {\n name: stageName,\n id: `stage-${i + 1}`,\n date: dateValue.setDate(dateValue.getDate() - ((numberOfStages || i) - i)),\n required: true,\n complete: i + 1 < current,\n steps: getSteps(current - 1, i)\n };\n });\n };\n\n return (\n <Stages\n stages={getStages(args.numberOfStages, args.currentStage)}\n current={`stage-${args.currentStage}`}\n caseTitle={args.caseTitle}\n />\n );\n};\n\nStagesDemo.args = {\n caseTitle: 'Demo',\n numberOfStages: 6,\n currentStage: 3\n};\n\nStagesDemo.argTypes = {\n caseTitle: { control: { type: 'text' } },\n numberOfStages: { control: { type: 'number' } },\n currentStage: { control: { type: 'number' } }\n};\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { StakeholdersProps } from '@pega/cosmos-react-work';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import("react").FunctionComponent<StakeholdersProps & import("@pega/cosmos-react-core").ForwardProps>;
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
|
8
|
+
export declare const StakeHoldersDemo: () => JSX.Element;
|
|
9
|
+
//# sourceMappingURL=Stakeholders.stories.d.ts.map
|