@pega/cosmos-react-demos 2.0.0 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/jsx/build/AppHeader/AppHeader.stories.d.ts +8 -0
- package/jsx/build/AppHeader/AppHeader.stories.d.ts.map +1 -0
- package/{lib → jsx}/build/AppHeader/AppHeader.stories.jsx +0 -0
- package/{lib → jsx}/build/AppHeader/AppHeader.stories.jsx.map +0 -0
- package/jsx/build/AppShell/AppShell.mocks.d.ts +50 -0
- package/jsx/build/AppShell/AppShell.mocks.d.ts.map +1 -0
- package/jsx/build/AppShell/AppShell.mocks.js +503 -0
- package/jsx/build/AppShell/AppShell.mocks.js.map +1 -0
- package/jsx/build/AppShell/AppShell.stories.d.ts +12 -0
- package/jsx/build/AppShell/AppShell.stories.d.ts.map +1 -0
- package/jsx/build/AppShell/AppShell.stories.jsx +194 -0
- package/jsx/build/AppShell/AppShell.stories.jsx.map +1 -0
- package/jsx/build/FlowModeller/AddNodeUtils.mocks.d.ts +45 -0
- package/jsx/build/FlowModeller/AddNodeUtils.mocks.d.ts.map +1 -0
- package/jsx/build/FlowModeller/AddNodeUtils.mocks.js +291 -0
- package/jsx/build/FlowModeller/AddNodeUtils.mocks.js.map +1 -0
- package/jsx/build/FlowModeller/FlowModeller.mocks.d.ts +9 -0
- package/jsx/build/FlowModeller/FlowModeller.mocks.d.ts.map +1 -0
- package/jsx/build/FlowModeller/FlowModeller.mocks.js +411 -0
- package/jsx/build/FlowModeller/FlowModeller.mocks.js.map +1 -0
- package/jsx/build/FlowModeller/FlowModeller.stories.d.ts +12 -0
- package/jsx/build/FlowModeller/FlowModeller.stories.d.ts.map +1 -0
- package/{lib → jsx}/build/FlowModeller/FlowModeller.stories.jsx +0 -0
- package/{lib → jsx}/build/FlowModeller/FlowModeller.stories.jsx.map +0 -0
- package/jsx/build/LifeCycle/LifeCycle.mocks.d.ts +201 -0
- package/jsx/build/LifeCycle/LifeCycle.mocks.d.ts.map +1 -0
- package/jsx/build/LifeCycle/LifeCycle.mocks.js +1128 -0
- package/jsx/build/LifeCycle/LifeCycle.mocks.js.map +1 -0
- package/jsx/build/LifeCycle/LifeCycle.stories.d.ts +11 -0
- package/jsx/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -0
- package/{lib → jsx}/build/LifeCycle/LifeCycle.stories.jsx +0 -0
- package/{lib → jsx}/build/LifeCycle/LifeCycle.stories.jsx.map +0 -0
- package/jsx/build/LifeCycle/utils.d.ts +65 -0
- package/jsx/build/LifeCycle/utils.d.ts.map +1 -0
- package/jsx/build/LifeCycle/utils.js +218 -0
- package/jsx/build/LifeCycle/utils.js.map +1 -0
- package/jsx/build/PageTemplates/GalleryPage.stories.d.ts +12 -0
- package/jsx/build/PageTemplates/GalleryPage.stories.d.ts.map +1 -0
- package/{lib → jsx}/build/PageTemplates/GalleryPage.stories.jsx +0 -0
- package/{lib → jsx}/build/PageTemplates/GalleryPage.stories.jsx.map +0 -0
- package/jsx/build/PageTemplates/PageTemplates.stories.d.ts +26 -0
- package/jsx/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -0
- package/{lib → jsx}/build/PageTemplates/PageTemplates.stories.jsx +0 -0
- package/{lib → jsx}/build/PageTemplates/PageTemplates.stories.jsx.map +0 -0
- package/jsx/build/Workbench/Workbench.mocks.d.ts +9 -0
- package/jsx/build/Workbench/Workbench.mocks.d.ts.map +1 -0
- package/jsx/build/Workbench/Workbench.mocks.js +67 -0
- package/jsx/build/Workbench/Workbench.mocks.js.map +1 -0
- package/jsx/build/Workbench/Workbench.stories.d.ts +10 -0
- package/jsx/build/Workbench/Workbench.stories.d.ts.map +1 -0
- package/{lib → jsx}/build/Workbench/Workbench.stories.jsx +0 -0
- package/{lib → jsx}/build/Workbench/Workbench.stories.jsx.map +0 -0
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts +10 -0
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts.map +1 -0
- package/{lib → jsx}/condition-builder/ConditionBuilder/ConditionBuilder.stories.jsx +0 -0
- package/{lib → jsx}/condition-builder/ConditionBuilder/ConditionBuilder.stories.jsx.map +0 -0
- package/jsx/condition-builder/ConditionBuilder/props.mock.d.ts +6 -0
- package/jsx/condition-builder/ConditionBuilder/props.mock.d.ts.map +1 -0
- package/jsx/condition-builder/ConditionBuilder/props.mock.js +113 -0
- package/jsx/condition-builder/ConditionBuilder/props.mock.js.map +1 -0
- package/jsx/core/AppShell/AppShell.mocks.d.ts +15 -0
- package/jsx/core/AppShell/AppShell.mocks.d.ts.map +1 -0
- package/{lib → jsx}/core/AppShell/AppShell.mocks.jsx +0 -0
- package/{lib → jsx}/core/AppShell/AppShell.mocks.jsx.map +0 -0
- package/jsx/core/AppShell/AppShell.stories.d.ts +31 -0
- package/jsx/core/AppShell/AppShell.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/AppShell/AppShell.stories.jsx +0 -0
- package/{lib → jsx}/core/AppShell/AppShell.stories.jsx.map +0 -0
- package/jsx/core/AppShell/AppShell.styles.d.ts +2 -0
- package/jsx/core/AppShell/AppShell.styles.d.ts.map +1 -0
- package/jsx/core/AppShell/AppShell.styles.js +5 -0
- package/jsx/core/AppShell/AppShell.styles.js.map +1 -0
- package/jsx/core/Avatar/Avatar.stories.d.ts +10 -0
- package/jsx/core/Avatar/Avatar.stories.d.ts.map +1 -0
- package/jsx/core/Avatar/Avatar.stories.jsx +50 -0
- package/jsx/core/Avatar/Avatar.stories.jsx.map +1 -0
- package/jsx/core/Backdrop/Backdrop.stories.d.ts +7 -0
- package/jsx/core/Backdrop/Backdrop.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Backdrop/Backdrop.stories.jsx +0 -0
- package/{lib → jsx}/core/Backdrop/Backdrop.stories.jsx.map +0 -0
- package/jsx/core/Badges/Alert.stories.d.ts +6 -0
- package/jsx/core/Badges/Alert.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Badges/Alert.stories.jsx +0 -0
- package/{lib → jsx}/core/Badges/Alert.stories.jsx.map +0 -0
- package/jsx/core/Badges/Count.stories.d.ts +6 -0
- package/jsx/core/Badges/Count.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Badges/Count.stories.jsx +0 -0
- package/{lib → jsx}/core/Badges/Count.stories.jsx.map +0 -0
- package/jsx/core/Badges/Selection.stories.d.ts +6 -0
- package/jsx/core/Badges/Selection.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Badges/Selection.stories.jsx +0 -0
- package/{lib → jsx}/core/Badges/Selection.stories.jsx.map +0 -0
- package/jsx/core/Badges/Status.stories.d.ts +6 -0
- package/jsx/core/Badges/Status.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Badges/Status.stories.jsx +0 -0
- package/{lib → jsx}/core/Badges/Status.stories.jsx.map +0 -0
- package/jsx/core/Badges/Tag.stories.d.ts +6 -0
- package/jsx/core/Badges/Tag.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Badges/Tag.stories.jsx +0 -0
- package/{lib → jsx}/core/Badges/Tag.stories.jsx.map +0 -0
- package/jsx/core/Banner/Banner.mocks.d.ts +18 -0
- package/jsx/core/Banner/Banner.mocks.d.ts.map +1 -0
- package/jsx/core/Banner/Banner.mocks.jsx +41 -0
- package/jsx/core/Banner/Banner.mocks.jsx.map +1 -0
- package/jsx/core/Banner/Banner.stories.d.ts +22 -0
- package/jsx/core/Banner/Banner.stories.d.ts.map +1 -0
- package/jsx/core/Banner/Banner.stories.jsx +87 -0
- package/jsx/core/Banner/Banner.stories.jsx.map +1 -0
- package/jsx/core/Boolean/BooleanDisplay.stories.d.ts +6 -0
- package/jsx/core/Boolean/BooleanDisplay.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Boolean/BooleanDisplay.stories.jsx +0 -0
- package/{lib → jsx}/core/Boolean/BooleanDisplay.stories.jsx.map +0 -0
- package/jsx/core/Breadcrumbs/Breadcrumbs.stories.d.ts +7 -0
- package/jsx/core/Breadcrumbs/Breadcrumbs.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Breadcrumbs/Breadcrumbs.stories.jsx +0 -0
- package/{lib → jsx}/core/Breadcrumbs/Breadcrumbs.stories.jsx.map +0 -0
- package/jsx/core/Breadcrumbs/Breadcrumbs.styles.d.ts +2 -0
- package/jsx/core/Breadcrumbs/Breadcrumbs.styles.d.ts.map +1 -0
- package/jsx/core/Breadcrumbs/Breadcrumbs.styles.js +12 -0
- package/jsx/core/Breadcrumbs/Breadcrumbs.styles.js.map +1 -0
- package/jsx/core/Button/Button.stories.d.ts +12 -0
- package/jsx/core/Button/Button.stories.d.ts.map +1 -0
- package/jsx/core/Button/Button.stories.jsx +103 -0
- package/jsx/core/Button/Button.stories.jsx.map +1 -0
- package/jsx/core/Card/Card.stories.d.ts +8 -0
- package/jsx/core/Card/Card.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Card/Card.stories.jsx +0 -0
- package/{lib → jsx}/core/Card/Card.stories.jsx.map +0 -0
- package/jsx/core/Card/Card.styles.d.ts +2 -0
- package/jsx/core/Card/Card.styles.d.ts.map +1 -0
- package/jsx/core/Card/Card.styles.js +5 -0
- package/jsx/core/Card/Card.styles.js.map +1 -0
- package/jsx/core/Checkbox/Checkbox.stories.d.ts +7 -0
- package/jsx/core/Checkbox/Checkbox.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Checkbox/Checkbox.stories.jsx +0 -0
- package/{lib → jsx}/core/Checkbox/Checkbox.stories.jsx.map +0 -0
- package/jsx/core/CheckboxGroup/CheckboxGroup.stories.d.ts +7 -0
- package/jsx/core/CheckboxGroup/CheckboxGroup.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/CheckboxGroup/CheckboxGroup.stories.jsx +0 -0
- package/{lib → jsx}/core/CheckboxGroup/CheckboxGroup.stories.jsx.map +0 -0
- package/jsx/core/CheckboxGroup/CheckboxGroup.styles.d.ts +4 -0
- package/jsx/core/CheckboxGroup/CheckboxGroup.styles.d.ts.map +1 -0
- package/jsx/core/CheckboxGroup/CheckboxGroup.styles.js +9 -0
- package/jsx/core/CheckboxGroup/CheckboxGroup.styles.js.map +1 -0
- package/jsx/core/ColorPicker/ColorPicker.stories.d.ts +8 -0
- package/jsx/core/ColorPicker/ColorPicker.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/ColorPicker/ColorPicker.stories.jsx +0 -0
- package/{lib → jsx}/core/ColorPicker/ColorPicker.stories.jsx.map +0 -0
- package/jsx/core/ComboBox/ComboBox.mocks.d.ts +24 -0
- package/jsx/core/ComboBox/ComboBox.mocks.d.ts.map +1 -0
- package/jsx/core/ComboBox/ComboBox.mocks.js +54 -0
- package/jsx/core/ComboBox/ComboBox.mocks.js.map +1 -0
- package/jsx/core/ComboBox/ComboBox.stories.d.ts +21 -0
- package/jsx/core/ComboBox/ComboBox.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/ComboBox/ComboBox.stories.jsx +0 -0
- package/{lib → jsx}/core/ComboBox/ComboBox.stories.jsx.map +0 -0
- package/jsx/core/Configuration/Configuration.stories.d.ts +10 -0
- package/jsx/core/Configuration/Configuration.stories.d.ts.map +1 -0
- package/jsx/core/Configuration/Configuration.stories.jsx +125 -0
- package/jsx/core/Configuration/Configuration.stories.jsx.map +1 -0
- package/jsx/core/Currency/Currency.stories.d.ts +11 -0
- package/jsx/core/Currency/Currency.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Currency/Currency.stories.jsx +0 -0
- package/{lib → jsx}/core/Currency/Currency.stories.jsx.map +0 -0
- package/jsx/core/DateTime/DateTime.stories.d.ts +20 -0
- package/jsx/core/DateTime/DateTime.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/DateTime/DateTime.stories.jsx +0 -0
- package/{lib → jsx}/core/DateTime/DateTime.stories.jsx.map +0 -0
- package/jsx/core/DateTime/DateTimeDisplay.stories.d.ts +7 -0
- package/jsx/core/DateTime/DateTimeDisplay.stories.d.ts.map +1 -0
- package/jsx/core/DateTime/DateTimeDisplay.stories.jsx +47 -0
- package/jsx/core/DateTime/DateTimeDisplay.stories.jsx.map +1 -0
- package/jsx/core/DateTime/DateTimePicker.stories.d.ts +7 -0
- package/jsx/core/DateTime/DateTimePicker.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/DateTime/DateTimePicker.stories.jsx +0 -0
- package/{lib → jsx}/core/DateTime/DateTimePicker.stories.jsx.map +0 -0
- package/jsx/core/Drawer/Drawer.stories.d.ts +7 -0
- package/jsx/core/Drawer/Drawer.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Drawer/Drawer.stories.jsx +0 -0
- package/{lib → jsx}/core/Drawer/Drawer.stories.jsx.map +0 -0
- package/jsx/core/Drawer/Drawer.styles.d.ts +2 -0
- package/jsx/core/Drawer/Drawer.styles.d.ts.map +1 -0
- package/jsx/core/Drawer/Drawer.styles.js +11 -0
- package/jsx/core/Drawer/Drawer.styles.js.map +1 -0
- package/jsx/core/Email/EmailDisplay.stories.d.ts +6 -0
- package/jsx/core/Email/EmailDisplay.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Email/EmailDisplay.stories.jsx +0 -0
- package/{lib → jsx}/core/Email/EmailDisplay.stories.jsx.map +0 -0
- package/jsx/core/EmojiPicker/EmojiPicker.stories.d.ts +8 -0
- package/jsx/core/EmojiPicker/EmojiPicker.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/EmojiPicker/EmojiPicker.stories.jsx +0 -0
- package/{lib → jsx}/core/EmojiPicker/EmojiPicker.stories.jsx.map +0 -0
- package/jsx/core/EmptyState/EmptyState.stories.d.ts +6 -0
- package/jsx/core/EmptyState/EmptyState.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/EmptyState/EmptyState.stories.jsx +0 -0
- package/{lib → jsx}/core/EmptyState/EmptyState.stories.jsx.map +0 -0
- package/jsx/core/ErrorState/ErrorState.stories.d.ts +9 -0
- package/jsx/core/ErrorState/ErrorState.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/ErrorState/ErrorState.stories.jsx +0 -0
- package/{lib → jsx}/core/ErrorState/ErrorState.stories.jsx.map +0 -0
- package/jsx/core/ExpandCollapse/ExpandCollapse.stories.d.ts +7 -0
- package/jsx/core/ExpandCollapse/ExpandCollapse.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/ExpandCollapse/ExpandCollapse.stories.jsx +0 -0
- package/{lib → jsx}/core/ExpandCollapse/ExpandCollapse.stories.jsx.map +0 -0
- package/jsx/core/ExpandCollapse/ExpandCollapse.styles.d.ts +4 -0
- package/jsx/core/ExpandCollapse/ExpandCollapse.styles.d.ts.map +1 -0
- package/jsx/core/ExpandCollapse/ExpandCollapse.styles.js +17 -0
- package/jsx/core/ExpandCollapse/ExpandCollapse.styles.js.map +1 -0
- package/jsx/core/FieldGroup/FieldGroup.stories.d.ts +11 -0
- package/jsx/core/FieldGroup/FieldGroup.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/FieldGroup/FieldGroup.stories.jsx +0 -0
- package/{lib → jsx}/core/FieldGroup/FieldGroup.stories.jsx.map +0 -0
- package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts +21 -0
- package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -0
- package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx +36 -0
- package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx.map +1 -0
- package/jsx/core/FieldGroup/FieldGroupList.stories.d.ts +10 -0
- package/jsx/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -0
- package/jsx/core/FieldGroup/FieldGroupList.stories.jsx +150 -0
- package/jsx/core/FieldGroup/FieldGroupList.stories.jsx.map +1 -0
- package/jsx/core/FieldValueList/FieldValueList.stories.d.ts +10 -0
- package/jsx/core/FieldValueList/FieldValueList.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/FieldValueList/FieldValueList.stories.jsx +0 -0
- package/{lib → jsx}/core/FieldValueList/FieldValueList.stories.jsx.map +0 -0
- package/jsx/core/File/FileDisplay.stories.d.ts +20 -0
- package/jsx/core/File/FileDisplay.stories.d.ts.map +1 -0
- package/jsx/core/File/FileDisplay.stories.jsx +135 -0
- package/jsx/core/File/FileDisplay.stories.jsx.map +1 -0
- package/jsx/core/File/FileInput.stories.d.ts +9 -0
- package/jsx/core/File/FileInput.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/File/FileInput.stories.jsx +0 -0
- package/{lib → jsx}/core/File/FileInput.stories.jsx.map +0 -0
- package/jsx/core/Flex/Flex.styles.d.ts +10 -0
- package/jsx/core/Flex/Flex.styles.d.ts.map +1 -0
- package/jsx/core/Flex/Flex.styles.js +41 -0
- package/jsx/core/Flex/Flex.styles.js.map +1 -0
- package/jsx/core/Flex/FlexContainer.stories.d.ts +22 -0
- package/jsx/core/Flex/FlexContainer.stories.d.ts.map +1 -0
- package/jsx/core/Flex/FlexContainer.stories.jsx +164 -0
- package/jsx/core/Flex/FlexContainer.stories.jsx.map +1 -0
- package/jsx/core/Flex/FlexItem.stories.d.ts +13 -0
- package/jsx/core/Flex/FlexItem.stories.d.ts.map +1 -0
- package/jsx/core/Flex/FlexItem.stories.jsx +71 -0
- package/jsx/core/Flex/FlexItem.stories.jsx.map +1 -0
- package/jsx/core/Form/Form.mocks.d.ts +8 -0
- package/jsx/core/Form/Form.mocks.d.ts.map +1 -0
- package/jsx/core/Form/Form.mocks.jsx +138 -0
- package/jsx/core/Form/Form.mocks.jsx.map +1 -0
- package/jsx/core/Form/Form.stories.d.ts +14 -0
- package/jsx/core/Form/Form.stories.d.ts.map +1 -0
- package/jsx/core/Form/Form.stories.jsx +62 -0
- package/jsx/core/Form/Form.stories.jsx.map +1 -0
- package/jsx/core/Grid/Grid.styles.d.ts +6 -0
- package/jsx/core/Grid/Grid.styles.d.ts.map +1 -0
- package/jsx/core/Grid/Grid.styles.js +36 -0
- package/jsx/core/Grid/Grid.styles.js.map +1 -0
- package/jsx/core/Grid/GridContainer.stories.d.ts +24 -0
- package/jsx/core/Grid/GridContainer.stories.d.ts.map +1 -0
- package/jsx/core/Grid/GridContainer.stories.jsx +168 -0
- package/jsx/core/Grid/GridContainer.stories.jsx.map +1 -0
- package/jsx/core/Grid/GridItem.stories.d.ts +13 -0
- package/jsx/core/Grid/GridItem.stories.d.ts.map +1 -0
- package/jsx/core/Grid/GridItem.stories.jsx +74 -0
- package/jsx/core/Grid/GridItem.stories.jsx.map +1 -0
- package/jsx/core/Icon/Icon.mocks.d.ts +3 -0
- package/jsx/core/Icon/Icon.mocks.d.ts.map +1 -0
- package/jsx/core/Icon/Icon.mocks.jsx +9 -0
- package/jsx/core/Icon/Icon.mocks.jsx.map +1 -0
- package/jsx/core/Icon/Icon.stories.d.ts +9 -0
- package/jsx/core/Icon/Icon.stories.d.ts.map +1 -0
- package/jsx/core/Icon/Icon.stories.jsx +90 -0
- package/jsx/core/Icon/Icon.stories.jsx.map +1 -0
- package/jsx/core/IconPicker/IconPicker.stories.d.ts +6 -0
- package/jsx/core/IconPicker/IconPicker.stories.d.ts.map +1 -0
- package/jsx/core/IconPicker/IconPicker.stories.jsx +38 -0
- package/jsx/core/IconPicker/IconPicker.stories.jsx.map +1 -0
- package/jsx/core/Image/Image.stories.d.ts +6 -0
- package/jsx/core/Image/Image.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Image/Image.stories.jsx +0 -0
- package/{lib → jsx}/core/Image/Image.stories.jsx.map +0 -0
- package/jsx/core/Input/Input.stories.d.ts +9 -0
- package/jsx/core/Input/Input.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Input/Input.stories.jsx +0 -0
- package/{lib → jsx}/core/Input/Input.stories.jsx.map +0 -0
- package/jsx/core/Label/Label.stories.d.ts +6 -0
- package/jsx/core/Label/Label.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Label/Label.stories.jsx +0 -0
- package/{lib → jsx}/core/Label/Label.stories.jsx.map +0 -0
- package/jsx/core/Lightbox/Lightbox.mocks.d.ts +15 -0
- package/jsx/core/Lightbox/Lightbox.mocks.d.ts.map +1 -0
- package/jsx/core/Lightbox/Lightbox.mocks.js +59 -0
- package/jsx/core/Lightbox/Lightbox.mocks.js.map +1 -0
- package/jsx/core/Lightbox/Lightbox.stories.d.ts +10 -0
- package/jsx/core/Lightbox/Lightbox.stories.d.ts.map +1 -0
- package/jsx/core/Lightbox/Lightbox.stories.jsx +55 -0
- package/jsx/core/Lightbox/Lightbox.stories.jsx.map +1 -0
- package/jsx/core/Link/Link.stories.d.ts +18 -0
- package/jsx/core/Link/Link.stories.d.ts.map +1 -0
- package/jsx/core/Link/Link.stories.jsx +49 -0
- package/jsx/core/Link/Link.stories.jsx.map +1 -0
- package/jsx/core/List/CommaSeparatedList.stories.d.ts +6 -0
- package/jsx/core/List/CommaSeparatedList.stories.d.ts.map +1 -0
- package/jsx/core/List/CommaSeparatedList.stories.jsx +31 -0
- package/jsx/core/List/CommaSeparatedList.stories.jsx.map +1 -0
- package/jsx/core/List/OrderedList.stories.d.ts +10 -0
- package/jsx/core/List/OrderedList.stories.d.ts.map +1 -0
- package/jsx/core/List/OrderedList.stories.jsx +38 -0
- package/jsx/core/List/OrderedList.stories.jsx.map +1 -0
- package/jsx/core/List/UnorderedList.stories.d.ts +10 -0
- package/jsx/core/List/UnorderedList.stories.d.ts.map +1 -0
- package/jsx/core/List/UnorderedList.stories.jsx +38 -0
- package/jsx/core/List/UnorderedList.stories.jsx.map +1 -0
- package/jsx/core/Location/Location.stories.d.ts +12 -0
- package/jsx/core/Location/Location.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Location/Location.stories.jsx +0 -0
- package/{lib → jsx}/core/Location/Location.stories.jsx.map +0 -0
- package/jsx/core/Menu/Menu.mocks.d.ts +4 -0
- package/jsx/core/Menu/Menu.mocks.d.ts.map +1 -0
- package/jsx/core/Menu/Menu.mocks.js +179 -0
- package/jsx/core/Menu/Menu.mocks.js.map +1 -0
- package/jsx/core/Menu/Menu.stories.d.ts +16 -0
- package/jsx/core/Menu/Menu.stories.d.ts.map +1 -0
- package/jsx/core/Menu/Menu.stories.jsx +164 -0
- package/jsx/core/Menu/Menu.stories.jsx.map +1 -0
- package/jsx/core/Menu/Menu.styles.d.ts +2 -0
- package/jsx/core/Menu/Menu.styles.d.ts.map +1 -0
- package/jsx/core/Menu/Menu.styles.js +6 -0
- package/jsx/core/Menu/Menu.styles.js.map +1 -0
- package/jsx/core/MenuButton/MenuButton.stories.d.ts +15 -0
- package/jsx/core/MenuButton/MenuButton.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/MenuButton/MenuButton.stories.jsx +0 -0
- package/{lib → jsx}/core/MenuButton/MenuButton.stories.jsx.map +0 -0
- package/jsx/core/MetaList/MetaList.stories.d.ts +9 -0
- package/jsx/core/MetaList/MetaList.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/MetaList/MetaList.stories.jsx +0 -0
- package/{lib → jsx}/core/MetaList/MetaList.stories.jsx.map +0 -0
- package/jsx/core/Modal/Modal.mocks.d.ts +4 -0
- package/jsx/core/Modal/Modal.mocks.d.ts.map +1 -0
- package/jsx/core/Modal/Modal.mocks.jsx +44 -0
- package/jsx/core/Modal/Modal.mocks.jsx.map +1 -0
- package/jsx/core/Modal/Modal.stories.d.ts +20 -0
- package/jsx/core/Modal/Modal.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Modal/Modal.stories.jsx +0 -0
- package/{lib → jsx}/core/Modal/Modal.stories.jsx.map +0 -0
- package/jsx/core/MultiStep/MultiStep.stories.d.ts +6 -0
- package/jsx/core/MultiStep/MultiStep.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/MultiStep/MultiStep.stories.jsx +0 -0
- package/{lib → jsx}/core/MultiStep/MultiStep.stories.jsx.map +0 -0
- package/jsx/core/Number/Number.stories.d.ts +13 -0
- package/jsx/core/Number/Number.stories.d.ts.map +1 -0
- package/jsx/core/Number/Number.stories.jsx +110 -0
- package/jsx/core/Number/Number.stories.jsx.map +1 -0
- package/jsx/core/PageTemplates/PageTemplates.mocks.d.ts +3 -0
- package/jsx/core/PageTemplates/PageTemplates.mocks.d.ts.map +1 -0
- package/jsx/core/PageTemplates/PageTemplates.mocks.js +10 -0
- package/jsx/core/PageTemplates/PageTemplates.mocks.js.map +1 -0
- package/jsx/core/PageTemplates/PageTemplates.stories.d.ts +31 -0
- package/jsx/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -0
- package/jsx/core/PageTemplates/PageTemplates.stories.jsx +233 -0
- package/jsx/core/PageTemplates/PageTemplates.stories.jsx.map +1 -0
- package/jsx/core/PageTemplates/PageTemplates.styles.d.ts +4 -0
- package/jsx/core/PageTemplates/PageTemplates.styles.d.ts.map +1 -0
- package/jsx/core/PageTemplates/PageTemplates.styles.js +31 -0
- package/jsx/core/PageTemplates/PageTemplates.styles.js.map +1 -0
- package/jsx/core/Pagination/Pagination.stories.d.ts +6 -0
- package/jsx/core/Pagination/Pagination.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Pagination/Pagination.stories.jsx +0 -0
- package/{lib → jsx}/core/Pagination/Pagination.stories.jsx.map +0 -0
- package/jsx/core/Paragraph/ParagraphDisplay.stories.d.ts +6 -0
- package/jsx/core/Paragraph/ParagraphDisplay.stories.d.ts.map +1 -0
- package/jsx/core/Paragraph/ParagraphDisplay.stories.jsx +15 -0
- package/jsx/core/Paragraph/ParagraphDisplay.stories.jsx.map +1 -0
- package/jsx/core/Phone/Phone.stories.d.ts +7 -0
- package/jsx/core/Phone/Phone.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Phone/Phone.stories.jsx +0 -0
- package/{lib → jsx}/core/Phone/Phone.stories.jsx.map +0 -0
- package/jsx/core/Popover/Popover.stories.d.ts +7 -0
- package/jsx/core/Popover/Popover.stories.d.ts.map +1 -0
- package/jsx/core/Popover/Popover.stories.jsx +182 -0
- package/jsx/core/Popover/Popover.stories.jsx.map +1 -0
- package/jsx/core/Progress/Progress.stories.d.ts +7 -0
- package/jsx/core/Progress/Progress.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Progress/Progress.stories.jsx +0 -0
- package/{lib → jsx}/core/Progress/Progress.stories.jsx.map +0 -0
- package/jsx/core/Progress/Progress.styles.d.ts +2 -0
- package/jsx/core/Progress/Progress.styles.d.ts.map +1 -0
- package/jsx/core/Progress/Progress.styles.js +13 -0
- package/jsx/core/Progress/Progress.styles.js.map +1 -0
- package/jsx/core/RadioButton/RadioButton.stories.d.ts +7 -0
- package/jsx/core/RadioButton/RadioButton.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/RadioButton/RadioButton.stories.jsx +0 -0
- package/{lib → jsx}/core/RadioButton/RadioButton.stories.jsx.map +0 -0
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.stories.d.ts +7 -0
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/RadioButtonGroup/RadioButtonGroup.stories.jsx +0 -0
- package/{lib → jsx}/core/RadioButtonGroup/RadioButtonGroup.stories.jsx.map +0 -0
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.styles.d.ts +4 -0
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.styles.d.ts.map +1 -0
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.styles.js +9 -0
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.styles.js.map +1 -0
- package/jsx/core/Rating/Rating.stories.d.ts +9 -0
- package/jsx/core/Rating/Rating.stories.d.ts.map +1 -0
- package/jsx/core/Rating/Rating.stories.jsx +21 -0
- package/jsx/core/Rating/Rating.stories.jsx.map +1 -0
- package/jsx/core/SearchInput/SearchInput.stories.d.ts +6 -0
- package/jsx/core/SearchInput/SearchInput.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/SearchInput/SearchInput.stories.jsx +0 -0
- package/{lib → jsx}/core/SearchInput/SearchInput.stories.jsx.map +0 -0
- package/jsx/core/Select/Select.stories.d.ts +9 -0
- package/jsx/core/Select/Select.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Select/Select.stories.jsx +0 -0
- package/{lib → jsx}/core/Select/Select.stories.jsx.map +0 -0
- package/jsx/core/Sentiment/Sentiment.stories.d.ts +14 -0
- package/jsx/core/Sentiment/Sentiment.stories.d.ts.map +1 -0
- package/jsx/core/Sentiment/Sentiment.stories.jsx +39 -0
- package/jsx/core/Sentiment/Sentiment.stories.jsx.map +1 -0
- package/jsx/core/Slider/Slider.stories.d.ts +11 -0
- package/jsx/core/Slider/Slider.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Slider/Slider.stories.jsx +0 -0
- package/{lib → jsx}/core/Slider/Slider.stories.jsx.map +0 -0
- package/jsx/core/SummaryItem/SummaryItem.stories.d.ts +11 -0
- package/jsx/core/SummaryItem/SummaryItem.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/SummaryItem/SummaryItem.stories.jsx +0 -0
- package/{lib → jsx}/core/SummaryItem/SummaryItem.stories.jsx.map +0 -0
- package/jsx/core/SummaryList/SummaryList.mocks.d.ts +32 -0
- package/jsx/core/SummaryList/SummaryList.mocks.d.ts.map +1 -0
- package/{lib → jsx}/core/SummaryList/SummaryList.mocks.jsx +0 -0
- package/{lib → jsx}/core/SummaryList/SummaryList.mocks.jsx.map +0 -0
- package/jsx/core/SummaryList/SummaryList.stories.d.ts +13 -0
- package/jsx/core/SummaryList/SummaryList.stories.d.ts.map +1 -0
- package/jsx/core/SummaryList/SummaryList.stories.jsx +131 -0
- package/jsx/core/SummaryList/SummaryList.stories.jsx.map +1 -0
- package/jsx/core/Switch/Switch.stories.d.ts +7 -0
- package/jsx/core/Switch/Switch.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Switch/Switch.stories.jsx +0 -0
- package/{lib → jsx}/core/Switch/Switch.stories.jsx.map +0 -0
- package/jsx/core/Switch/Switch.styles.d.ts +2 -0
- package/jsx/core/Switch/Switch.styles.d.ts.map +1 -0
- package/jsx/core/Switch/Switch.styles.js +13 -0
- package/jsx/core/Switch/Switch.styles.js.map +1 -0
- package/jsx/core/Table/Table.mocks.d.ts +19 -0
- package/jsx/core/Table/Table.mocks.d.ts.map +1 -0
- package/{lib → jsx}/core/Table/Table.mocks.jsx +0 -0
- package/{lib → jsx}/core/Table/Table.mocks.jsx.map +0 -0
- package/jsx/core/Table/Table.stories.d.ts +14 -0
- package/jsx/core/Table/Table.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Table/Table.stories.jsx +0 -0
- package/{lib → jsx}/core/Table/Table.stories.jsx.map +0 -0
- package/jsx/core/Table/Table.styles.d.ts +4 -0
- package/jsx/core/Table/Table.styles.d.ts.map +1 -0
- package/jsx/core/Table/Table.styles.js +9 -0
- package/jsx/core/Table/Table.styles.js.map +1 -0
- package/jsx/core/Tabs/Tabs.stories.d.ts +7 -0
- package/jsx/core/Tabs/Tabs.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Tabs/Tabs.stories.jsx +0 -0
- package/{lib → jsx}/core/Tabs/Tabs.stories.jsx.map +0 -0
- package/jsx/core/Text/Text.stories.d.ts +6 -0
- package/jsx/core/Text/Text.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Text/Text.stories.jsx +0 -0
- package/{lib → jsx}/core/Text/Text.stories.jsx.map +0 -0
- package/jsx/core/TextArea/TextArea.stories.d.ts +6 -0
- package/jsx/core/TextArea/TextArea.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/TextArea/TextArea.stories.jsx +0 -0
- package/{lib → jsx}/core/TextArea/TextArea.stories.jsx.map +0 -0
- package/jsx/core/Toaster/Toaster.stories.d.ts +6 -0
- package/jsx/core/Toaster/Toaster.stories.d.ts.map +1 -0
- package/jsx/core/Toaster/Toaster.stories.jsx +22 -0
- package/jsx/core/Toaster/Toaster.stories.jsx.map +1 -0
- package/jsx/core/Tooltip/Tooltip.stories.d.ts +8 -0
- package/jsx/core/Tooltip/Tooltip.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Tooltip/Tooltip.stories.jsx +0 -0
- package/{lib → jsx}/core/Tooltip/Tooltip.stories.jsx.map +0 -0
- package/jsx/core/Tree/Tree.mocks.d.ts +2 -0
- package/jsx/core/Tree/Tree.mocks.d.ts.map +1 -0
- package/jsx/core/Tree/Tree.mocks.js +20 -0
- package/jsx/core/Tree/Tree.mocks.js.map +1 -0
- package/jsx/core/Tree/Tree.stories.d.ts +8 -0
- package/jsx/core/Tree/Tree.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/Tree/Tree.stories.jsx +0 -0
- package/{lib → jsx}/core/Tree/Tree.stories.jsx.map +0 -0
- package/jsx/core/Tree/Tree.styles.d.ts +3 -0
- package/jsx/core/Tree/Tree.styles.d.ts.map +1 -0
- package/jsx/core/Tree/Tree.styles.js +10 -0
- package/jsx/core/Tree/Tree.styles.js.map +1 -0
- package/jsx/core/URL/URL.stories.d.ts +6 -0
- package/jsx/core/URL/URL.stories.d.ts.map +1 -0
- package/{lib → jsx}/core/URL/URL.stories.jsx +0 -0
- package/{lib → jsx}/core/URL/URL.stories.jsx.map +0 -0
- package/jsx/cs/Article/Article.mocks.d.ts +14 -0
- package/jsx/cs/Article/Article.mocks.d.ts.map +1 -0
- package/jsx/cs/Article/Article.mocks.js +14 -0
- package/jsx/cs/Article/Article.mocks.js.map +1 -0
- package/jsx/cs/Article/Article.stories.d.ts +15 -0
- package/jsx/cs/Article/Article.stories.d.ts.map +1 -0
- package/{lib → jsx}/cs/Article/Article.stories.jsx +0 -0
- package/{lib → jsx}/cs/Article/Article.stories.jsx.map +0 -0
- package/jsx/cs/ArticleList/ArticleList.mocks.d.ts +21 -0
- package/jsx/cs/ArticleList/ArticleList.mocks.d.ts.map +1 -0
- package/jsx/cs/ArticleList/ArticleList.mocks.js +102 -0
- package/jsx/cs/ArticleList/ArticleList.mocks.js.map +1 -0
- package/jsx/cs/ArticleList/ArticleList.stories.d.ts +16 -0
- package/jsx/cs/ArticleList/ArticleList.stories.d.ts.map +1 -0
- package/{lib → jsx}/cs/ArticleList/ArticleList.stories.jsx +0 -0
- package/{lib → jsx}/cs/ArticleList/ArticleList.stories.jsx.map +0 -0
- package/jsx/cs/CSCaseView/CSAppShell.stories.d.ts +45 -0
- package/jsx/cs/CSCaseView/CSAppShell.stories.d.ts.map +1 -0
- package/{lib → jsx}/cs/CSCaseView/CSAppShell.stories.jsx +0 -0
- package/{lib → jsx}/cs/CSCaseView/CSAppShell.stories.jsx.map +0 -0
- package/jsx/cs/CSCaseView/CSCaseView.mocks.d.ts +57 -0
- package/jsx/cs/CSCaseView/CSCaseView.mocks.d.ts.map +1 -0
- package/jsx/cs/CSCaseView/CSCaseView.mocks.js +224 -0
- package/jsx/cs/CSCaseView/CSCaseView.mocks.js.map +1 -0
- package/jsx/cs/CallControlPanel/CallControlPanel.mocks.d.ts +16 -0
- package/jsx/cs/CallControlPanel/CallControlPanel.mocks.d.ts.map +1 -0
- package/jsx/cs/CallControlPanel/CallControlPanel.mocks.js +110 -0
- package/jsx/cs/CallControlPanel/CallControlPanel.mocks.js.map +1 -0
- package/jsx/cs/CallControlPanel/CallControlPanel.stories.d.ts +13 -0
- package/jsx/cs/CallControlPanel/CallControlPanel.stories.d.ts.map +1 -0
- package/{lib → jsx}/cs/CallControlPanel/CallControlPanel.stories.jsx +0 -0
- package/{lib → jsx}/cs/CallControlPanel/CallControlPanel.stories.jsx.map +0 -0
- package/jsx/cs/DialPad/DialPad.stories.d.ts +9 -0
- package/jsx/cs/DialPad/DialPad.stories.d.ts.map +1 -0
- package/{lib → jsx}/cs/DialPad/DialPad.stories.jsx +0 -0
- package/{lib → jsx}/cs/DialPad/DialPad.stories.jsx.map +0 -0
- package/jsx/cs/DialPad/DialPadKeyboardData.mock.d.ts +11 -0
- package/jsx/cs/DialPad/DialPadKeyboardData.mock.d.ts.map +1 -0
- package/jsx/cs/DialPad/DialPadKeyboardData.mock.js +20 -0
- package/jsx/cs/DialPad/DialPadKeyboardData.mock.js.map +1 -0
- package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts +13 -0
- package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -0
- package/{lib → jsx}/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx +0 -0
- package/{lib → jsx}/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx.map +0 -0
- package/jsx/cs/InteractionNotification/InteractionNotification.stories.d.ts +8 -0
- package/jsx/cs/InteractionNotification/InteractionNotification.stories.d.ts.map +1 -0
- package/{lib → jsx}/cs/InteractionNotification/InteractionNotification.stories.jsx +0 -0
- package/{lib → jsx}/cs/InteractionNotification/InteractionNotification.stories.jsx.map +0 -0
- package/jsx/cs/InteractionTimer/InteractionTimer.stories.d.ts +14 -0
- package/jsx/cs/InteractionTimer/InteractionTimer.stories.d.ts.map +1 -0
- package/{lib → jsx}/cs/InteractionTimer/InteractionTimer.stories.jsx +0 -0
- package/{lib → jsx}/cs/InteractionTimer/InteractionTimer.stories.jsx.map +0 -0
- package/jsx/cs/TaskManager/TaskManager.mocks.d.ts +13 -0
- package/jsx/cs/TaskManager/TaskManager.mocks.d.ts.map +1 -0
- package/jsx/cs/TaskManager/TaskManager.mocks.js +140 -0
- package/jsx/cs/TaskManager/TaskManager.mocks.js.map +1 -0
- package/jsx/cs/TaskManager/TaskManager.stories.d.ts +8 -0
- package/jsx/cs/TaskManager/TaskManager.stories.d.ts.map +1 -0
- package/{lib → jsx}/cs/TaskManager/TaskManager.stories.jsx +0 -0
- package/{lib → jsx}/cs/TaskManager/TaskManager.stories.jsx.map +0 -0
- package/jsx/dnd/DragDropList/DragDropList.stories.d.ts +11 -0
- package/jsx/dnd/DragDropList/DragDropList.stories.d.ts.map +1 -0
- package/{lib → jsx}/dnd/DragDropList/DragDropList.stories.jsx +0 -0
- package/{lib → jsx}/dnd/DragDropList/DragDropList.stories.jsx.map +0 -0
- package/jsx/rte/Editor/Editor.stories.d.ts +11 -0
- package/jsx/rte/Editor/Editor.stories.d.ts.map +1 -0
- package/jsx/rte/Editor/Editor.stories.jsx +119 -0
- package/jsx/rte/Editor/Editor.stories.jsx.map +1 -0
- package/jsx/rte/RichTextEditor/RichTextEditor.mocks.d.ts +3 -0
- package/jsx/rte/RichTextEditor/RichTextEditor.mocks.d.ts.map +1 -0
- package/{lib → jsx}/rte/RichTextEditor/RichTextEditor.mocks.jsx +0 -0
- package/{lib → jsx}/rte/RichTextEditor/RichTextEditor.mocks.jsx.map +0 -0
- package/jsx/rte/RichTextEditor/RichTextEditor.stories.d.ts +10 -0
- package/jsx/rte/RichTextEditor/RichTextEditor.stories.d.ts.map +1 -0
- package/jsx/rte/RichTextEditor/RichTextEditor.stories.jsx +145 -0
- package/jsx/rte/RichTextEditor/RichTextEditor.stories.jsx.map +1 -0
- package/jsx/rte/RichTextEditor/RichTextViewer.stories.d.ts +8 -0
- package/jsx/rte/RichTextEditor/RichTextViewer.stories.d.ts.map +1 -0
- package/jsx/rte/RichTextEditor/RichTextViewer.stories.jsx +79 -0
- package/jsx/rte/RichTextEditor/RichTextViewer.stories.jsx.map +1 -0
- package/jsx/social/Chat/Chat.mocks.d.ts +385 -0
- package/jsx/social/Chat/Chat.mocks.d.ts.map +1 -0
- package/jsx/social/Chat/Chat.mocks.js +648 -0
- package/jsx/social/Chat/Chat.mocks.js.map +1 -0
- package/jsx/social/Chat/Chat.stories.d.ts +34 -0
- package/jsx/social/Chat/Chat.stories.d.ts.map +1 -0
- package/jsx/social/Chat/Chat.stories.jsx +490 -0
- package/jsx/social/Chat/Chat.stories.jsx.map +1 -0
- package/jsx/social/Chat/RepeatingView.stories.d.ts +20 -0
- package/jsx/social/Chat/RepeatingView.stories.d.ts.map +1 -0
- package/{lib → jsx}/social/Chat/RepeatingView.stories.jsx +0 -0
- package/{lib → jsx}/social/Chat/RepeatingView.stories.jsx.map +0 -0
- package/jsx/social/Email/Email.mocks.d.ts +87 -0
- package/jsx/social/Email/Email.mocks.d.ts.map +1 -0
- package/{lib → jsx}/social/Email/Email.mocks.jsx +0 -0
- package/{lib → jsx}/social/Email/Email.mocks.jsx.map +0 -0
- package/jsx/social/Email/Email.stories.d.ts +28 -0
- package/jsx/social/Email/Email.stories.d.ts.map +1 -0
- package/{lib → jsx}/social/Email/Email.stories.jsx +0 -0
- package/{lib → jsx}/social/Email/Email.stories.jsx.map +0 -0
- package/jsx/social/Feed/Feed.mocks.d.ts +52 -0
- package/jsx/social/Feed/Feed.mocks.d.ts.map +1 -0
- package/{lib → jsx}/social/Feed/Feed.mocks.jsx +0 -0
- package/{lib → jsx}/social/Feed/Feed.mocks.jsx.map +0 -0
- package/jsx/social/Feed/Feed.stories.d.ts +15 -0
- package/jsx/social/Feed/Feed.stories.d.ts.map +1 -0
- package/{lib → jsx}/social/Feed/Feed.stories.jsx +0 -0
- package/{lib → jsx}/social/Feed/Feed.stories.jsx.map +0 -0
- package/jsx/social/Feed/FeedNewPost.stories.d.ts +17 -0
- package/jsx/social/Feed/FeedNewPost.stories.d.ts.map +1 -0
- package/jsx/social/Feed/FeedNewPost.stories.jsx +80 -0
- package/jsx/social/Feed/FeedNewPost.stories.jsx.map +1 -0
- package/jsx/social/Feed/FeedPost.stories.d.ts +9 -0
- package/jsx/social/Feed/FeedPost.stories.d.ts.map +1 -0
- package/jsx/social/Feed/FeedPost.stories.jsx +248 -0
- package/jsx/social/Feed/FeedPost.stories.jsx.map +1 -0
- package/jsx/social/Feed/FeedReply.stories.d.ts +16 -0
- package/jsx/social/Feed/FeedReply.stories.d.ts.map +1 -0
- package/{lib → jsx}/social/Feed/FeedReply.stories.jsx +0 -0
- package/{lib → jsx}/social/Feed/FeedReply.stories.jsx.map +0 -0
- package/jsx/social/Feed/FeedReplyInput.stories.d.ts +15 -0
- package/jsx/social/Feed/FeedReplyInput.stories.d.ts.map +1 -0
- package/{lib → jsx}/social/Feed/FeedReplyInput.stories.jsx +0 -0
- package/{lib → jsx}/social/Feed/FeedReplyInput.stories.jsx.map +0 -0
- package/jsx/work/AppAnnouncement/AppAnnouncement.stories.d.ts +6 -0
- package/jsx/work/AppAnnouncement/AppAnnouncement.stories.d.ts.map +1 -0
- package/jsx/work/AppAnnouncement/AppAnnouncement.stories.jsx +29 -0
- package/jsx/work/AppAnnouncement/AppAnnouncement.stories.jsx.map +1 -0
- package/jsx/work/CaseView/Attachments.mocks.d.ts +3 -0
- package/jsx/work/CaseView/Attachments.mocks.d.ts.map +1 -0
- package/{lib → jsx}/work/CaseView/Attachments.mocks.jsx +0 -0
- package/{lib → jsx}/work/CaseView/Attachments.mocks.jsx.map +0 -0
- package/jsx/work/CaseView/CaseView.mocks.d.ts +11 -0
- package/jsx/work/CaseView/CaseView.mocks.d.ts.map +1 -0
- package/{lib → jsx}/work/CaseView/CaseView.mocks.jsx +0 -0
- package/{lib → jsx}/work/CaseView/CaseView.mocks.jsx.map +0 -0
- package/jsx/work/CaseView/CaseView.stories.d.ts +34 -0
- package/jsx/work/CaseView/CaseView.stories.d.ts.map +1 -0
- package/{lib → jsx}/work/CaseView/CaseView.stories.jsx +0 -0
- package/{lib → jsx}/work/CaseView/CaseView.stories.jsx.map +0 -0
- package/jsx/work/CaseView/Details.mocks.d.ts +3 -0
- package/jsx/work/CaseView/Details.mocks.d.ts.map +1 -0
- package/{lib → jsx}/work/CaseView/Details.mocks.jsx +0 -0
- package/{lib → jsx}/work/CaseView/Details.mocks.jsx.map +0 -0
- package/jsx/work/CaseView/FileService.mock.d.ts +28 -0
- package/jsx/work/CaseView/FileService.mock.d.ts.map +1 -0
- package/jsx/work/CaseView/FileService.mock.jsx +143 -0
- package/jsx/work/CaseView/FileService.mock.jsx.map +1 -0
- package/jsx/work/CaseView/MobileCaseView.stories.d.ts +11 -0
- package/jsx/work/CaseView/MobileCaseView.stories.d.ts.map +1 -0
- package/{lib → jsx}/work/CaseView/MobileCaseView.stories.jsx +0 -0
- package/{lib → jsx}/work/CaseView/MobileCaseView.stories.jsx.map +0 -0
- package/jsx/work/CaseView/Pulse.mocks.d.ts +6 -0
- package/jsx/work/CaseView/Pulse.mocks.d.ts.map +1 -0
- package/{lib → jsx}/work/CaseView/Pulse.mocks.jsx +0 -0
- package/{lib → jsx}/work/CaseView/Pulse.mocks.jsx.map +0 -0
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts +10 -0
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts.map +1 -0
- package/{lib → jsx}/work/ConfigurableLayout/ConfigurableLayout.stories.jsx +0 -0
- package/{lib → jsx}/work/ConfigurableLayout/ConfigurableLayout.stories.jsx.map +0 -0
- package/jsx/work/Confirmation/Confirmation.stories.d.ts +9 -0
- package/jsx/work/Confirmation/Confirmation.stories.d.ts.map +1 -0
- package/jsx/work/Confirmation/Confirmation.stories.jsx +28 -0
- package/jsx/work/Confirmation/Confirmation.stories.jsx.map +1 -0
- package/jsx/work/Confirmation/Confirmation.styles.d.ts +2 -0
- package/jsx/work/Confirmation/Confirmation.styles.d.ts.map +1 -0
- package/jsx/work/Confirmation/Confirmation.styles.js +7 -0
- package/jsx/work/Confirmation/Confirmation.styles.js.map +1 -0
- package/jsx/work/Details/Details.stories.d.ts +5 -0
- package/jsx/work/Details/Details.stories.d.ts.map +1 -0
- package/{lib → jsx}/work/Details/Details.stories.jsx +0 -0
- package/{lib → jsx}/work/Details/Details.stories.jsx.map +0 -0
- package/jsx/work/Glimpse/Glimpse.stories.d.ts +10 -0
- package/jsx/work/Glimpse/Glimpse.stories.d.ts.map +1 -0
- package/{lib → jsx}/work/Glimpse/Glimpse.stories.jsx +0 -0
- package/{lib → jsx}/work/Glimpse/Glimpse.stories.jsx.map +0 -0
- package/jsx/work/SearchResults/SearchResults.mocks.d.ts +8 -0
- package/jsx/work/SearchResults/SearchResults.mocks.d.ts.map +1 -0
- package/{lib → jsx}/work/SearchResults/SearchResults.mocks.jsx +0 -0
- package/{lib → jsx}/work/SearchResults/SearchResults.mocks.jsx.map +0 -0
- package/jsx/work/SearchResults/SearchResults.stories.d.ts +8 -0
- package/jsx/work/SearchResults/SearchResults.stories.d.ts.map +1 -0
- package/jsx/work/SearchResults/SearchResults.stories.jsx +199 -0
- package/jsx/work/SearchResults/SearchResults.stories.jsx.map +1 -0
- package/jsx/work/SearchResults/SearchResults.styles.d.ts +5 -0
- package/jsx/work/SearchResults/SearchResults.styles.d.ts.map +1 -0
- package/jsx/work/SearchResults/SearchResults.styles.js +12 -0
- package/jsx/work/SearchResults/SearchResults.styles.js.map +1 -0
- package/jsx/work/Stages/Stages.stories.d.ts +11 -0
- package/jsx/work/Stages/Stages.stories.d.ts.map +1 -0
- package/{lib → jsx}/work/Stages/Stages.stories.jsx +0 -0
- package/{lib → jsx}/work/Stages/Stages.stories.jsx.map +0 -0
- package/jsx/work/Stakeholders/Stakeholders.mocks.d.ts +17 -0
- package/jsx/work/Stakeholders/Stakeholders.mocks.d.ts.map +1 -0
- package/jsx/work/Stakeholders/Stakeholders.mocks.jsx +32 -0
- package/jsx/work/Stakeholders/Stakeholders.mocks.jsx.map +1 -0
- package/jsx/work/Stakeholders/Stakeholders.stories.d.ts +6 -0
- package/jsx/work/Stakeholders/Stakeholders.stories.d.ts.map +1 -0
- package/jsx/work/Stakeholders/Stakeholders.stories.jsx +90 -0
- package/jsx/work/Stakeholders/Stakeholders.stories.jsx.map +1 -0
- package/jsx/work/Tags/Tags.mocks.d.ts +3 -0
- package/jsx/work/Tags/Tags.mocks.d.ts.map +1 -0
- package/jsx/work/Tags/Tags.mocks.js +76 -0
- package/jsx/work/Tags/Tags.mocks.js.map +1 -0
- package/jsx/work/Tags/Tags.stories.d.ts +10 -0
- package/jsx/work/Tags/Tags.stories.d.ts.map +1 -0
- package/{lib → jsx}/work/Tags/Tags.stories.jsx +0 -0
- package/{lib → jsx}/work/Tags/Tags.stories.jsx.map +0 -0
- package/jsx/work/Tasks/TaskList.stories.d.ts +5 -0
- package/jsx/work/Tasks/TaskList.stories.d.ts.map +1 -0
- package/{lib → jsx}/work/Tasks/TaskList.stories.jsx +0 -0
- package/{lib → jsx}/work/Tasks/TaskList.stories.jsx.map +0 -0
- package/jsx/work/Tasks/Tasks.stories.d.ts +9 -0
- package/jsx/work/Tasks/Tasks.stories.d.ts.map +1 -0
- package/{lib → jsx}/work/Tasks/Tasks.stories.jsx +0 -0
- package/{lib → jsx}/work/Tasks/Tasks.stories.jsx.map +0 -0
- package/jsx/work/Timeline/Timeline.mocks.d.ts +3 -0
- package/jsx/work/Timeline/Timeline.mocks.d.ts.map +1 -0
- package/{lib → jsx}/work/Timeline/Timeline.mocks.jsx +0 -0
- package/{lib → jsx}/work/Timeline/Timeline.mocks.jsx.map +0 -0
- package/jsx/work/Timeline/Timeline.stories.d.ts +7 -0
- package/jsx/work/Timeline/Timeline.stories.d.ts.map +1 -0
- package/jsx/work/Timeline/Timeline.stories.jsx +43 -0
- package/jsx/work/Timeline/Timeline.stories.jsx.map +1 -0
- package/lib/build/AppHeader/AppHeader.stories.js +66 -0
- package/lib/build/AppHeader/AppHeader.stories.js.map +1 -0
- package/lib/build/AppShell/AppShell.stories.d.ts.map +1 -1
- package/lib/build/AppShell/AppShell.stories.js +192 -0
- package/lib/build/AppShell/AppShell.stories.js.map +1 -0
- package/lib/build/FlowModeller/AddNodeUtils.mocks.js +1 -1
- package/lib/build/FlowModeller/AddNodeUtils.mocks.js.map +1 -1
- package/lib/build/FlowModeller/FlowModeller.stories.js +197 -0
- package/lib/build/FlowModeller/FlowModeller.stories.js.map +1 -0
- package/lib/build/LifeCycle/LifeCycle.stories.js +511 -0
- package/lib/build/LifeCycle/LifeCycle.stories.js.map +1 -0
- package/lib/build/PageTemplates/GalleryPage.stories.js +127 -0
- package/lib/build/PageTemplates/GalleryPage.stories.js.map +1 -0
- package/lib/build/PageTemplates/PageTemplates.stories.js +388 -0
- package/lib/build/PageTemplates/PageTemplates.stories.js.map +1 -0
- package/lib/build/Workbench/Workbench.stories.js +114 -0
- package/lib/build/Workbench/Workbench.stories.js.map +1 -0
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.js +166 -0
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.stories.js.map +1 -0
- package/lib/core/AppShell/AppShell.mocks.js +142 -0
- package/lib/core/AppShell/AppShell.mocks.js.map +1 -0
- package/lib/core/AppShell/AppShell.stories.d.ts +2 -0
- package/lib/core/AppShell/AppShell.stories.d.ts.map +1 -1
- package/lib/core/AppShell/AppShell.stories.js +191 -0
- package/lib/core/AppShell/AppShell.stories.js.map +1 -0
- package/lib/core/Avatar/Avatar.stories.d.ts.map +1 -1
- package/lib/core/Avatar/Avatar.stories.js +51 -0
- package/lib/core/Avatar/Avatar.stories.js.map +1 -0
- package/lib/core/Backdrop/Backdrop.stories.js +26 -0
- package/lib/core/Backdrop/Backdrop.stories.js.map +1 -0
- package/lib/core/Badges/Alert.stories.js +16 -0
- package/lib/core/Badges/Alert.stories.js.map +1 -0
- package/lib/core/Badges/Count.stories.js +21 -0
- package/lib/core/Badges/Count.stories.js.map +1 -0
- package/lib/core/Badges/Selection.stories.js +10 -0
- package/lib/core/Badges/Selection.stories.js.map +1 -0
- package/lib/core/Badges/Status.stories.js +19 -0
- package/lib/core/Badges/Status.stories.js.map +1 -0
- package/lib/core/Badges/Tag.stories.js +10 -0
- package/lib/core/Badges/Tag.stories.js.map +1 -0
- package/lib/core/Banner/Banner.mocks.d.ts +18 -0
- package/lib/core/Banner/Banner.mocks.d.ts.map +1 -0
- package/lib/core/Banner/Banner.mocks.js +36 -0
- package/lib/core/Banner/Banner.mocks.js.map +1 -0
- package/lib/core/Banner/Banner.stories.d.ts.map +1 -1
- package/lib/core/Banner/Banner.stories.js +81 -0
- package/lib/core/Banner/Banner.stories.js.map +1 -0
- package/lib/core/Boolean/BooleanDisplay.stories.js +20 -0
- package/lib/core/Boolean/BooleanDisplay.stories.js.map +1 -0
- package/lib/core/Breadcrumbs/Breadcrumbs.stories.js +28 -0
- package/lib/core/Breadcrumbs/Breadcrumbs.stories.js.map +1 -0
- package/lib/core/Button/Button.stories.d.ts.map +1 -1
- package/lib/core/Button/Button.stories.js +64 -0
- package/lib/core/Button/Button.stories.js.map +1 -0
- package/lib/core/Card/Card.stories.js +32 -0
- package/lib/core/Card/Card.stories.js.map +1 -0
- package/lib/core/Checkbox/Checkbox.stories.js +29 -0
- package/lib/core/Checkbox/Checkbox.stories.js.map +1 -0
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.js +32 -0
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.js.map +1 -0
- package/lib/core/ColorPicker/ColorPicker.stories.js +76 -0
- package/lib/core/ColorPicker/ColorPicker.stories.js.map +1 -0
- package/lib/core/ComboBox/ComboBox.stories.d.ts +10 -0
- package/lib/core/ComboBox/ComboBox.stories.d.ts.map +1 -1
- package/lib/core/ComboBox/ComboBox.stories.js +376 -0
- package/lib/core/ComboBox/ComboBox.stories.js.map +1 -0
- package/lib/core/Configuration/Configuration.stories.js +75 -0
- package/lib/core/Configuration/Configuration.stories.js.map +1 -0
- package/lib/core/Currency/Currency.stories.js +66 -0
- package/lib/core/Currency/Currency.stories.js.map +1 -0
- package/lib/core/DateTime/DateTime.stories.js +128 -0
- package/lib/core/DateTime/DateTime.stories.js.map +1 -0
- package/lib/core/DateTime/DateTimeDisplay.stories.js +48 -0
- package/lib/core/DateTime/DateTimeDisplay.stories.js.map +1 -0
- package/lib/core/DateTime/DateTimePicker.stories.js +35 -0
- package/lib/core/DateTime/DateTimePicker.stories.js.map +1 -0
- package/lib/core/Drawer/Drawer.stories.js +71 -0
- package/lib/core/Drawer/Drawer.stories.js.map +1 -0
- package/lib/core/Email/EmailDisplay.stories.js +20 -0
- package/lib/core/Email/EmailDisplay.stories.js.map +1 -0
- package/lib/core/EmojiPicker/EmojiPicker.stories.js +42 -0
- package/lib/core/EmojiPicker/EmojiPicker.stories.js.map +1 -0
- package/lib/core/EmptyState/EmptyState.stories.js +19 -0
- package/lib/core/EmptyState/EmptyState.stories.js.map +1 -0
- package/lib/core/ErrorState/ErrorState.stories.js +21 -0
- package/lib/core/ErrorState/ErrorState.stories.js.map +1 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.stories.js +28 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.stories.js.map +1 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.styles.d.ts.map +1 -1
- package/lib/core/ExpandCollapse/ExpandCollapse.styles.js +5 -0
- package/lib/core/ExpandCollapse/ExpandCollapse.styles.js.map +1 -1
- package/lib/core/FieldGroup/FieldGroup.stories.js +22 -0
- package/lib/core/FieldGroup/FieldGroup.stories.js.map +1 -0
- package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts +21 -0
- package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -0
- package/lib/core/FieldGroup/FieldGroupList.mocks.js +38 -0
- package/lib/core/FieldGroup/FieldGroupList.mocks.js.map +1 -0
- package/lib/core/FieldGroup/FieldGroupList.stories.d.ts.map +1 -1
- package/lib/core/FieldGroup/FieldGroupList.stories.js +106 -0
- package/lib/core/FieldGroup/FieldGroupList.stories.js.map +1 -0
- package/lib/core/FieldValueList/FieldValueList.stories.js +51 -0
- package/lib/core/FieldValueList/FieldValueList.stories.js.map +1 -0
- package/lib/core/File/FileDisplay.stories.d.ts +8 -1
- package/lib/core/File/FileDisplay.stories.d.ts.map +1 -1
- package/lib/core/File/FileDisplay.stories.js +126 -0
- package/lib/core/File/FileDisplay.stories.js.map +1 -0
- package/lib/core/File/FileInput.stories.js +78 -0
- package/lib/core/File/FileInput.stories.js.map +1 -0
- package/lib/core/Flex/Flex.styles.d.ts +2 -2
- package/lib/core/Flex/Flex.styles.d.ts.map +1 -1
- package/lib/core/Flex/Flex.styles.js +17 -17
- package/lib/core/Flex/Flex.styles.js.map +1 -1
- package/lib/core/Flex/FlexContainer.stories.d.ts +2 -0
- package/lib/core/Flex/FlexContainer.stories.d.ts.map +1 -1
- package/lib/core/Flex/FlexContainer.stories.js +82 -0
- package/lib/core/Flex/FlexContainer.stories.js.map +1 -0
- package/lib/core/Flex/FlexItem.stories.js +41 -0
- package/lib/core/Flex/FlexItem.stories.js.map +1 -0
- package/lib/core/Form/Form.mocks.d.ts +8 -0
- package/lib/core/Form/Form.mocks.d.ts.map +1 -0
- package/lib/core/Form/Form.mocks.js +97 -0
- package/lib/core/Form/Form.mocks.js.map +1 -0
- package/lib/core/Form/Form.stories.d.ts +0 -7
- package/lib/core/Form/Form.stories.d.ts.map +1 -1
- package/lib/core/Form/Form.stories.js +52 -0
- package/lib/core/Form/Form.stories.js.map +1 -0
- package/lib/core/Grid/Grid.styles.d.ts +2 -2
- package/lib/core/Grid/Grid.styles.d.ts.map +1 -1
- package/lib/core/Grid/Grid.styles.js +4 -4
- package/lib/core/Grid/Grid.styles.js.map +1 -1
- package/lib/core/Grid/GridContainer.stories.d.ts +6 -5
- package/lib/core/Grid/GridContainer.stories.d.ts.map +1 -1
- package/lib/core/Grid/GridContainer.stories.js +115 -0
- package/lib/core/Grid/GridContainer.stories.js.map +1 -0
- package/lib/core/Grid/GridItem.stories.d.ts +2 -2
- package/lib/core/Grid/GridItem.stories.d.ts.map +1 -1
- package/lib/core/Grid/GridItem.stories.js +36 -0
- package/lib/core/Grid/GridItem.stories.js.map +1 -0
- package/lib/core/Icon/Icon.mocks.d.ts +3 -0
- package/lib/core/Icon/Icon.mocks.d.ts.map +1 -0
- package/lib/core/Icon/Icon.mocks.js +10 -0
- package/lib/core/Icon/Icon.mocks.js.map +1 -0
- package/lib/core/Icon/Icon.stories.d.ts +1 -0
- package/lib/core/Icon/Icon.stories.d.ts.map +1 -1
- package/lib/core/Icon/Icon.stories.js +82 -0
- package/lib/core/Icon/Icon.stories.js.map +1 -0
- package/lib/core/IconPicker/IconPicker.stories.d.ts.map +1 -1
- package/lib/core/IconPicker/IconPicker.stories.js +39 -0
- package/lib/core/IconPicker/IconPicker.stories.js.map +1 -0
- package/lib/core/Image/Image.stories.js +10 -0
- package/lib/core/Image/Image.stories.js.map +1 -0
- package/lib/core/Input/Input.stories.js +45 -0
- package/lib/core/Input/Input.stories.js.map +1 -0
- package/lib/core/Label/Label.stories.js +16 -0
- package/lib/core/Label/Label.stories.js.map +1 -0
- package/lib/core/Lightbox/Lightbox.mocks.d.ts +15 -0
- package/lib/core/Lightbox/Lightbox.mocks.d.ts.map +1 -0
- package/lib/core/Lightbox/Lightbox.mocks.js +67 -0
- package/lib/core/Lightbox/Lightbox.mocks.js.map +1 -0
- package/lib/core/Lightbox/Lightbox.stories.d.ts +7 -6
- package/lib/core/Lightbox/Lightbox.stories.d.ts.map +1 -1
- package/lib/core/Lightbox/Lightbox.stories.js +51 -0
- package/lib/core/Lightbox/Lightbox.stories.js.map +1 -0
- package/lib/core/Link/Link.stories.d.ts +11 -1
- package/lib/core/Link/Link.stories.d.ts.map +1 -1
- package/lib/core/Link/Link.stories.js +30 -0
- package/lib/core/Link/Link.stories.js.map +1 -0
- package/lib/core/List/CommaSeparatedList.stories.d.ts.map +1 -1
- package/lib/core/List/CommaSeparatedList.stories.js +32 -0
- package/lib/core/List/CommaSeparatedList.stories.js.map +1 -0
- package/lib/core/List/OrderedList.stories.d.ts.map +1 -1
- package/lib/core/List/OrderedList.stories.js +39 -0
- package/lib/core/List/OrderedList.stories.js.map +1 -0
- package/lib/core/List/UnorderedList.stories.d.ts.map +1 -1
- package/lib/core/List/UnorderedList.stories.js +39 -0
- package/lib/core/List/UnorderedList.stories.js.map +1 -0
- package/lib/core/Location/Location.stories.js +123 -0
- package/lib/core/Location/Location.stories.js.map +1 -0
- package/lib/core/Menu/Menu.stories.d.ts +0 -1
- package/lib/core/Menu/Menu.stories.d.ts.map +1 -1
- package/lib/core/Menu/Menu.stories.js +148 -0
- package/lib/core/Menu/Menu.stories.js.map +1 -0
- package/lib/core/MenuButton/MenuButton.stories.js +185 -0
- package/lib/core/MenuButton/MenuButton.stories.js.map +1 -0
- package/lib/core/MetaList/MetaList.stories.js +20 -0
- package/lib/core/MetaList/MetaList.stories.js.map +1 -0
- package/lib/core/Modal/Modal.mocks.js +36 -0
- package/lib/core/Modal/Modal.mocks.js.map +1 -0
- package/lib/core/Modal/Modal.stories.js +232 -0
- package/lib/core/Modal/Modal.stories.js.map +1 -0
- package/lib/core/MultiStep/MultiStep.stories.js +36 -0
- package/lib/core/MultiStep/MultiStep.stories.js.map +1 -0
- package/lib/core/Number/Number.stories.js +111 -0
- package/lib/core/Number/Number.stories.js.map +1 -0
- package/lib/core/PageTemplates/PageTemplates.stories.d.ts +5 -2
- package/lib/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/lib/core/PageTemplates/PageTemplates.stories.js +226 -0
- package/lib/core/PageTemplates/PageTemplates.stories.js.map +1 -0
- package/lib/core/Pagination/Pagination.stories.js +20 -0
- package/lib/core/Pagination/Pagination.stories.js.map +1 -0
- package/lib/core/Paragraph/ParagraphDisplay.stories.js +16 -0
- package/lib/core/Paragraph/ParagraphDisplay.stories.js.map +1 -0
- package/lib/core/Phone/Phone.stories.js +43 -0
- package/lib/core/Phone/Phone.stories.js.map +1 -0
- package/lib/core/Popover/Popover.stories.d.ts +1 -2
- package/lib/core/Popover/Popover.stories.d.ts.map +1 -1
- package/lib/core/Popover/Popover.stories.js +95 -0
- package/lib/core/Popover/Popover.stories.js.map +1 -0
- package/lib/core/Progress/Progress.stories.js +64 -0
- package/lib/core/Progress/Progress.stories.js.map +1 -0
- package/lib/core/RadioButton/RadioButton.stories.js +27 -0
- package/lib/core/RadioButton/RadioButton.stories.js.map +1 -0
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.js +34 -0
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.js.map +1 -0
- package/lib/core/Rating/Rating.stories.d.ts +4 -1
- package/lib/core/Rating/Rating.stories.d.ts.map +1 -1
- package/lib/core/Rating/Rating.stories.js +22 -0
- package/lib/core/Rating/Rating.stories.js.map +1 -0
- package/lib/core/SearchInput/SearchInput.stories.js +16 -0
- package/lib/core/SearchInput/SearchInput.stories.js.map +1 -0
- package/lib/core/Select/Select.stories.js +38 -0
- package/lib/core/Select/Select.stories.js.map +1 -0
- package/lib/core/Sentiment/Sentiment.stories.d.ts.map +1 -1
- package/lib/core/Sentiment/Sentiment.stories.js +40 -0
- package/lib/core/Sentiment/Sentiment.stories.js.map +1 -0
- package/lib/core/Slider/Slider.stories.js +59 -0
- package/lib/core/Slider/Slider.stories.js.map +1 -0
- package/lib/core/SummaryItem/SummaryItem.stories.js +32 -0
- package/lib/core/SummaryItem/SummaryItem.stories.js.map +1 -0
- package/lib/core/SummaryList/SummaryList.mocks.js +34 -0
- package/lib/core/SummaryList/SummaryList.mocks.js.map +1 -0
- package/lib/core/SummaryList/SummaryList.stories.js +126 -0
- package/lib/core/SummaryList/SummaryList.stories.js.map +1 -0
- package/lib/core/Switch/Switch.stories.js +25 -0
- package/lib/core/Switch/Switch.stories.js.map +1 -0
- package/lib/core/Table/Table.mocks.js +30 -0
- package/lib/core/Table/Table.mocks.js.map +1 -0
- package/lib/core/Table/Table.stories.js +54 -0
- package/lib/core/Table/Table.stories.js.map +1 -0
- package/lib/core/Tabs/Tabs.stories.js +42 -0
- package/lib/core/Tabs/Tabs.stories.js.map +1 -0
- package/lib/core/Text/Text.stories.js +21 -0
- package/lib/core/Text/Text.stories.js.map +1 -0
- package/lib/core/TextArea/TextArea.stories.js +44 -0
- package/lib/core/TextArea/TextArea.stories.js.map +1 -0
- package/lib/core/Toaster/Toaster.stories.d.ts.map +1 -1
- package/lib/core/Toaster/Toaster.stories.js +30 -0
- package/lib/core/Toaster/Toaster.stories.js.map +1 -0
- package/lib/core/Tooltip/Tooltip.stories.js +11 -0
- package/lib/core/Tooltip/Tooltip.stories.js.map +1 -0
- package/lib/core/Tree/Tree.mocks.js +2 -0
- package/lib/core/Tree/Tree.mocks.js.map +1 -1
- package/lib/core/Tree/Tree.stories.js +85 -0
- package/lib/core/Tree/Tree.stories.js.map +1 -0
- package/lib/core/URL/URL.stories.js +18 -0
- package/lib/core/URL/URL.stories.js.map +1 -0
- package/lib/cs/Article/Article.stories.js +85 -0
- package/lib/cs/Article/Article.stories.js.map +1 -0
- package/lib/cs/ArticleList/ArticleList.stories.js +83 -0
- package/lib/cs/ArticleList/ArticleList.stories.js.map +1 -0
- package/lib/cs/CSCaseView/CSAppShell.stories.js +240 -0
- package/lib/cs/CSCaseView/CSAppShell.stories.js.map +1 -0
- package/lib/cs/CallControlPanel/CallControlPanel.stories.js +193 -0
- package/lib/cs/CallControlPanel/CallControlPanel.stories.js.map +1 -0
- package/lib/cs/DialPad/DialPad.stories.js +17 -0
- package/lib/cs/DialPad/DialPad.stories.js.map +1 -0
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js +335 -0
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js.map +1 -0
- package/lib/cs/InteractionNotification/InteractionNotification.stories.js +31 -0
- package/lib/cs/InteractionNotification/InteractionNotification.stories.js.map +1 -0
- package/lib/cs/InteractionTimer/InteractionTimer.stories.js +86 -0
- package/lib/cs/InteractionTimer/InteractionTimer.stories.js.map +1 -0
- package/lib/cs/TaskManager/TaskManager.stories.js +299 -0
- package/lib/cs/TaskManager/TaskManager.stories.js.map +1 -0
- package/lib/dnd/DragDropList/DragDropList.stories.js +113 -0
- package/lib/dnd/DragDropList/DragDropList.stories.js.map +1 -0
- package/lib/rte/Editor/Editor.stories.d.ts +11 -0
- package/lib/rte/Editor/Editor.stories.d.ts.map +1 -0
- package/lib/rte/Editor/Editor.stories.js +100 -0
- package/lib/rte/Editor/Editor.stories.js.map +1 -0
- package/lib/rte/RichTextEditor/RichTextEditor.mocks.js +36 -0
- package/lib/rte/RichTextEditor/RichTextEditor.mocks.js.map +1 -0
- package/lib/rte/RichTextEditor/RichTextEditor.stories.js +114 -0
- package/lib/rte/RichTextEditor/RichTextEditor.stories.js.map +1 -0
- package/lib/rte/RichTextEditor/RichTextViewer.stories.d.ts +1 -0
- package/lib/rte/RichTextEditor/RichTextViewer.stories.d.ts.map +1 -1
- package/lib/rte/RichTextEditor/RichTextViewer.stories.js +66 -0
- package/lib/rte/RichTextEditor/RichTextViewer.stories.js.map +1 -0
- package/lib/social/Chat/Chat.stories.d.ts +51 -22
- package/lib/social/Chat/Chat.stories.d.ts.map +1 -1
- package/lib/social/Chat/Chat.stories.js +435 -0
- package/lib/social/Chat/Chat.stories.js.map +1 -0
- package/lib/social/Chat/RepeatingView.stories.js +89 -0
- package/lib/social/Chat/RepeatingView.stories.js.map +1 -0
- package/lib/social/Email/Email.mocks.js +350 -0
- package/lib/social/Email/Email.mocks.js.map +1 -0
- package/lib/social/Email/Email.stories.js +845 -0
- package/lib/social/Email/Email.stories.js.map +1 -0
- package/lib/social/Feed/Feed.mocks.js +307 -0
- package/lib/social/Feed/Feed.mocks.js.map +1 -0
- package/lib/social/Feed/Feed.stories.js +145 -0
- package/lib/social/Feed/Feed.stories.js.map +1 -0
- package/lib/social/Feed/FeedNewPost.stories.js +82 -0
- package/lib/social/Feed/FeedNewPost.stories.js.map +1 -0
- package/lib/social/Feed/FeedPost.stories.js +239 -0
- package/lib/social/Feed/FeedPost.stories.js.map +1 -0
- package/lib/social/Feed/FeedReply.stories.js +95 -0
- package/lib/social/Feed/FeedReply.stories.js.map +1 -0
- package/lib/social/Feed/FeedReplyInput.stories.js +60 -0
- package/lib/social/Feed/FeedReplyInput.stories.js.map +1 -0
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.d.ts.map +1 -1
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.js +30 -0
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.js.map +1 -0
- package/lib/work/CaseView/Attachments.mocks.js +373 -0
- package/lib/work/CaseView/Attachments.mocks.js.map +1 -0
- package/lib/work/CaseView/CaseView.mocks.js +116 -0
- package/lib/work/CaseView/CaseView.mocks.js.map +1 -0
- package/lib/work/CaseView/CaseView.stories.js +276 -0
- package/lib/work/CaseView/CaseView.stories.js.map +1 -0
- package/lib/work/CaseView/Details.mocks.js +7 -0
- package/lib/work/CaseView/Details.mocks.js.map +1 -0
- package/lib/work/CaseView/FileService.mock.d.ts.map +1 -1
- package/lib/work/CaseView/FileService.mock.js +162 -0
- package/lib/work/CaseView/FileService.mock.js.map +1 -0
- package/lib/work/CaseView/MobileCaseView.stories.js +28 -0
- package/lib/work/CaseView/MobileCaseView.stories.js.map +1 -0
- package/lib/work/CaseView/Pulse.mocks.js +25 -0
- package/lib/work/CaseView/Pulse.mocks.js.map +1 -0
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.js +194 -0
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.js.map +1 -0
- package/lib/work/Confirmation/Confirmation.stories.d.ts +1 -1
- package/lib/work/Confirmation/Confirmation.stories.d.ts.map +1 -1
- package/lib/work/Confirmation/Confirmation.stories.js +26 -0
- package/lib/work/Confirmation/Confirmation.stories.js.map +1 -0
- package/lib/work/Confirmation/Confirmation.styles.d.ts +2 -0
- package/lib/work/Confirmation/Confirmation.styles.d.ts.map +1 -0
- package/lib/work/Confirmation/Confirmation.styles.js +7 -0
- package/lib/work/Confirmation/Confirmation.styles.js.map +1 -0
- package/lib/work/Details/Details.stories.js +62 -0
- package/lib/work/Details/Details.stories.js.map +1 -0
- package/lib/work/Glimpse/Glimpse.stories.js +40 -0
- package/lib/work/Glimpse/Glimpse.stories.js.map +1 -0
- package/lib/work/SearchResults/SearchResults.mocks.js +97 -0
- package/lib/work/SearchResults/SearchResults.mocks.js.map +1 -0
- package/lib/work/SearchResults/SearchResults.stories.d.ts.map +1 -1
- package/lib/work/SearchResults/SearchResults.stories.js +192 -0
- package/lib/work/SearchResults/SearchResults.stories.js.map +1 -0
- package/lib/work/SearchResults/SearchResults.styles.d.ts +5 -0
- package/lib/work/SearchResults/SearchResults.styles.d.ts.map +1 -0
- package/lib/work/SearchResults/SearchResults.styles.js +12 -0
- package/lib/work/SearchResults/SearchResults.styles.js.map +1 -0
- package/lib/work/Stages/Stages.stories.js +64 -0
- package/lib/work/Stages/Stages.stories.js.map +1 -0
- package/lib/work/Stakeholders/Stakeholders.mocks.d.ts +22 -0
- package/lib/work/Stakeholders/Stakeholders.mocks.d.ts.map +1 -0
- package/lib/work/Stakeholders/Stakeholders.mocks.js +36 -0
- package/lib/work/Stakeholders/Stakeholders.mocks.js.map +1 -0
- package/lib/work/Stakeholders/Stakeholders.stories.d.ts +2 -5
- package/lib/work/Stakeholders/Stakeholders.stories.d.ts.map +1 -1
- package/lib/work/Stakeholders/Stakeholders.stories.js +111 -0
- package/lib/work/Stakeholders/Stakeholders.stories.js.map +1 -0
- package/lib/work/Tags/Tags.stories.js +62 -0
- package/lib/work/Tags/Tags.stories.js.map +1 -0
- package/lib/work/Tasks/TaskList.stories.js +18 -0
- package/lib/work/Tasks/TaskList.stories.js.map +1 -0
- package/lib/work/Tasks/Tasks.stories.js +80 -0
- package/lib/work/Tasks/Tasks.stories.js.map +1 -0
- package/lib/work/Timeline/Timeline.mocks.js +117 -0
- package/lib/work/Timeline/Timeline.mocks.js.map +1 -0
- package/lib/work/Timeline/Timeline.stories.d.ts.map +1 -1
- package/lib/work/Timeline/Timeline.stories.js +44 -0
- package/lib/work/Timeline/Timeline.stories.js.map +1 -0
- package/package.json +13 -11
- package/lib/build/AppShell/AppShell.stories.jsx +0 -194
- package/lib/build/AppShell/AppShell.stories.jsx.map +0 -1
- package/lib/core/Avatar/Avatar.stories.jsx +0 -50
- package/lib/core/Avatar/Avatar.stories.jsx.map +0 -1
- package/lib/core/Banner/Banner.stories.jsx +0 -125
- package/lib/core/Banner/Banner.stories.jsx.map +0 -1
- package/lib/core/Button/Button.stories.jsx +0 -103
- package/lib/core/Button/Button.stories.jsx.map +0 -1
- package/lib/core/Configuration/Configuration.stories.jsx +0 -125
- package/lib/core/Configuration/Configuration.stories.jsx.map +0 -1
- package/lib/core/DateTime/DateTimeDisplay.stories.jsx +0 -46
- package/lib/core/DateTime/DateTimeDisplay.stories.jsx.map +0 -1
- package/lib/core/FieldGroup/FieldGroupList.stories.jsx +0 -183
- package/lib/core/FieldGroup/FieldGroupList.stories.jsx.map +0 -1
- package/lib/core/File/FileDisplay.stories.jsx +0 -100
- package/lib/core/File/FileDisplay.stories.jsx.map +0 -1
- package/lib/core/Flex/FlexContainer.stories.jsx +0 -151
- package/lib/core/Flex/FlexContainer.stories.jsx.map +0 -1
- package/lib/core/Flex/FlexItem.stories.jsx +0 -71
- package/lib/core/Flex/FlexItem.stories.jsx.map +0 -1
- package/lib/core/Form/Form.stories.jsx +0 -196
- package/lib/core/Form/Form.stories.jsx.map +0 -1
- package/lib/core/Grid/GridContainer.stories.jsx +0 -161
- package/lib/core/Grid/GridContainer.stories.jsx.map +0 -1
- package/lib/core/Grid/GridItem.stories.jsx +0 -74
- package/lib/core/Grid/GridItem.stories.jsx.map +0 -1
- package/lib/core/Icon/Icon.stories.jsx +0 -84
- package/lib/core/Icon/Icon.stories.jsx.map +0 -1
- package/lib/core/IconPicker/IconPicker.stories.jsx +0 -39
- package/lib/core/IconPicker/IconPicker.stories.jsx.map +0 -1
- package/lib/core/Lightbox/Lightbox.stories.jsx +0 -106
- package/lib/core/Lightbox/Lightbox.stories.jsx.map +0 -1
- package/lib/core/Link/Link.stories.jsx +0 -32
- package/lib/core/Link/Link.stories.jsx.map +0 -1
- package/lib/core/List/CommaSeparatedList.stories.jsx +0 -33
- package/lib/core/List/CommaSeparatedList.stories.jsx.map +0 -1
- package/lib/core/List/OrderedList.stories.jsx +0 -38
- package/lib/core/List/OrderedList.stories.jsx.map +0 -1
- package/lib/core/List/UnorderedList.stories.jsx +0 -38
- package/lib/core/List/UnorderedList.stories.jsx.map +0 -1
- package/lib/core/Menu/Menu.stories.jsx +0 -166
- package/lib/core/Menu/Menu.stories.jsx.map +0 -1
- package/lib/core/Modal/Modal.mocks.jsx +0 -44
- package/lib/core/Modal/Modal.mocks.jsx.map +0 -1
- package/lib/core/Number/Number.stories.jsx +0 -110
- package/lib/core/Number/Number.stories.jsx.map +0 -1
- package/lib/core/PageTemplates/PageTemplates.stories.jsx +0 -233
- package/lib/core/PageTemplates/PageTemplates.stories.jsx.map +0 -1
- package/lib/core/Paragraph/ParagraphDisplay.stories.jsx +0 -12
- package/lib/core/Paragraph/ParagraphDisplay.stories.jsx.map +0 -1
- package/lib/core/Popover/Popover.stories.jsx +0 -184
- package/lib/core/Popover/Popover.stories.jsx.map +0 -1
- package/lib/core/Rating/Rating.stories.jsx +0 -21
- package/lib/core/Rating/Rating.stories.jsx.map +0 -1
- package/lib/core/Sentiment/Sentiment.stories.jsx +0 -39
- package/lib/core/Sentiment/Sentiment.stories.jsx.map +0 -1
- package/lib/core/SummaryList/SummaryList.stories.jsx +0 -131
- package/lib/core/SummaryList/SummaryList.stories.jsx.map +0 -1
- package/lib/core/Toaster/Toaster.stories.jsx +0 -17
- package/lib/core/Toaster/Toaster.stories.jsx.map +0 -1
- package/lib/rte/RichTextEditor/RichTextEditor.stories.jsx +0 -145
- package/lib/rte/RichTextEditor/RichTextEditor.stories.jsx.map +0 -1
- package/lib/rte/RichTextEditor/RichTextViewer.stories.jsx +0 -62
- package/lib/rte/RichTextEditor/RichTextViewer.stories.jsx.map +0 -1
- package/lib/social/Chat/Chat.stories.jsx +0 -537
- package/lib/social/Chat/Chat.stories.jsx.map +0 -1
- package/lib/social/Feed/FeedNewPost.stories.jsx +0 -80
- package/lib/social/Feed/FeedNewPost.stories.jsx.map +0 -1
- package/lib/social/Feed/FeedPost.stories.jsx +0 -248
- package/lib/social/Feed/FeedPost.stories.jsx.map +0 -1
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.jsx +0 -30
- package/lib/work/AppAnnouncement/AppAnnouncement.stories.jsx.map +0 -1
- package/lib/work/CaseView/FileService.mock.jsx +0 -139
- package/lib/work/CaseView/FileService.mock.jsx.map +0 -1
- package/lib/work/Confirmation/Confirmation.stories.jsx +0 -17
- package/lib/work/Confirmation/Confirmation.stories.jsx.map +0 -1
- package/lib/work/SearchResults/SearchResults.stories.jsx +0 -205
- package/lib/work/SearchResults/SearchResults.stories.jsx.map +0 -1
- package/lib/work/Stakeholders/Stakeholders.stories.jsx +0 -118
- package/lib/work/Stakeholders/Stakeholders.stories.jsx.map +0 -1
- package/lib/work/Timeline/Timeline.stories.jsx +0 -43
- package/lib/work/Timeline/Timeline.stories.jsx.map +0 -1
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { createContext, useState, useCallback, useMemo } from 'react';
|
|
2
|
+
import { createUID, getKindFromMimeType, getMimeTypeFromFile, 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
|
+
const type = getKindFromMimeType(getMimeTypeFromFile(file.name) ?? '');
|
|
81
|
+
if (type === 'image' && file.thumbnail)
|
|
82
|
+
setFiles(current => [file, ...current]);
|
|
83
|
+
else
|
|
84
|
+
setFiles(current => [...current, file]);
|
|
85
|
+
}, [files]);
|
|
86
|
+
const cancelFile = useCallback((id) => {
|
|
87
|
+
if (uploadsInProgress[id]) {
|
|
88
|
+
uploadsInProgress[id].abort();
|
|
89
|
+
delete uploadsInProgress[id];
|
|
90
|
+
}
|
|
91
|
+
setFiles(current => current.filter(f => f.id !== id));
|
|
92
|
+
}, [uploadsInProgress]);
|
|
93
|
+
const deleteFile = useCallback(async (id) => {
|
|
94
|
+
const file = files.find(f => f.id === id);
|
|
95
|
+
fetch(`http://cosmos.eng.pega.com/attachments/${file.id}`, { method: 'DELETE' }).then(() => {
|
|
96
|
+
setFiles(current => current.filter(f => f.id !== file.id));
|
|
97
|
+
});
|
|
98
|
+
}, [files]);
|
|
99
|
+
const setProgress = useCallback((file, progress) => {
|
|
100
|
+
setFiles(current => current.map(f => {
|
|
101
|
+
if (file.id === f.id) {
|
|
102
|
+
f.progress = progress;
|
|
103
|
+
}
|
|
104
|
+
return f;
|
|
105
|
+
}));
|
|
106
|
+
}, []);
|
|
107
|
+
useAfterInitialEffect(() => {
|
|
108
|
+
files.forEach(file => {
|
|
109
|
+
if (!hasProp(file, 'File') || typeof file.progress === 'number')
|
|
110
|
+
return;
|
|
111
|
+
postFile({
|
|
112
|
+
file,
|
|
113
|
+
onLoadStart: setProgress,
|
|
114
|
+
onProgress: setProgress,
|
|
115
|
+
onLoad(loadedFile) {
|
|
116
|
+
delete uploadsInProgress[loadedFile.id];
|
|
117
|
+
setFiles(cur => {
|
|
118
|
+
return cur.map(f => {
|
|
119
|
+
if (f.id === loadedFile.id) {
|
|
120
|
+
return {
|
|
121
|
+
...loadedFile,
|
|
122
|
+
id: createUID(),
|
|
123
|
+
createDate: Date.now()
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
return f;
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
}, [files.length, setProgress]);
|
|
133
|
+
const value = useMemo(() => ({
|
|
134
|
+
files,
|
|
135
|
+
setFiles,
|
|
136
|
+
attachFile,
|
|
137
|
+
cancelFile,
|
|
138
|
+
deleteFile
|
|
139
|
+
}), [files, attachFile, cancelFile, deleteFile]);
|
|
140
|
+
return <FileServiceContext.Provider value={value}>{children}</FileServiceContext.Provider>;
|
|
141
|
+
};
|
|
142
|
+
export default Provider;
|
|
143
|
+
//# sourceMappingURL=FileService.mock.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"F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,KAAK,QAAQ;gBAAE,OAAO;YAGxE,QAAQ,CAAC;gBACP,IAAI;gBACJ,WAAW,EAAE,WAAW;gBACxB,UAAU,EAAE,WAAW;gBACvB,MAAM,CAAC,UAAU;oBACf,OAAO,iBAAiB,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;oBAExC,QAAQ,CAAC,GAAG,CAAC,EAAE;wBACb,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;4BACjB,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 getKindFromMimeType,\n getMimeTypeFromFile,\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\n const type = getKindFromMimeType(getMimeTypeFromFile(file.name) ?? '');\n if (type === 'image' && file.thumbnail) setFiles(current => [file, ...current]);\n else setFiles(current => [...current, file]);\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"}
|
|
File without changes
|
|
File without changes
|
|
@@ -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"}
|
|
File without changes
|
|
File without changes
|
|
@@ -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"}
|
|
File without changes
|
|
File without changes
|
|
@@ -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":"AACA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAgB,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;;AAM1E,wBAGU;AAEV,UAAU,sBAAsB;IAC9B,KAAK,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;CACnC;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,sBAAsB,CAuB1D,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { Button, Flex } from '@pega/cosmos-react-core';
|
|
3
|
+
import { Confirmation } from '@pega/cosmos-react-work';
|
|
4
|
+
import { FieldValueListDemo } from '@pega/cosmos-react-demos/lib/core/FieldValueList/FieldValueList.stories';
|
|
5
|
+
import { TaskListDemo } from '@pega/cosmos-react-demos/lib/work/Tasks/TaskList.stories';
|
|
6
|
+
import { StyledFlex } from './Confirmation.styles';
|
|
7
|
+
export default {
|
|
8
|
+
title: 'Work/Confirmation',
|
|
9
|
+
component: Confirmation
|
|
10
|
+
};
|
|
11
|
+
export const ConfirmationDemo = (args) => {
|
|
12
|
+
const [showConfirmation, setShowConfirmation] = useState(true);
|
|
13
|
+
return (<Flex as={StyledFlex} container={{ justify: 'center', alignItems: 'center' }}>
|
|
14
|
+
{showConfirmation && (<Confirmation title={args.title} details={<FieldValueListDemo name='Project' value='Pega Cosmos' fields={[]}/>} whatsNext={[
|
|
15
|
+
'Send references',
|
|
16
|
+
'Collect information on the case',
|
|
17
|
+
'Prepare a demonstration'
|
|
18
|
+
]} tasks={<TaskListDemo />} onClose={() => setShowConfirmation(false)}/>)}
|
|
19
|
+
{!showConfirmation && (<Button onClick={() => setShowConfirmation(true)}>Show confirmation</Button>)}
|
|
20
|
+
</Flex>);
|
|
21
|
+
};
|
|
22
|
+
ConfirmationDemo.args = {
|
|
23
|
+
title: 'US-1337 confirmation'
|
|
24
|
+
};
|
|
25
|
+
ConfirmationDemo.argTypes = {
|
|
26
|
+
title: { control: { type: 'text' } }
|
|
27
|
+
};
|
|
28
|
+
//# 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":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGjC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAqB,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,yEAAyE,CAAC;AAC7G,OAAO,EAAE,YAAY,EAAE,MAAM,0DAA0D,CAAC;AAExF,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,eAAe;IACb,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,YAAY;CAChB,CAAC;AAMV,MAAM,CAAC,MAAM,gBAAgB,GAAkC,CAAC,IAA4B,EAAE,EAAE;IAC9F,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE/D,OAAO,CACL,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,CAC3E;MAAA,CAAC,gBAAgB,IAAI,CACnB,CAAC,YAAY,CACX,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAClB,OAAO,CAAC,CAAC,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAG,CAAC,CAC/E,SAAS,CAAC,CAAC;gBACT,iBAAiB;gBACjB,iCAAiC;gBACjC,yBAAyB;aAC1B,CAAC,CACF,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,AAAD,EAAG,CAAC,CACxB,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,EAC1C,CACH,CACD;MAAA,CAAC,CAAC,gBAAgB,IAAI,CACpB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAC7E,CACH;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,gBAAgB,CAAC,IAAI,GAAG;IACtB,KAAK,EAAE,sBAAsB;CAC9B,CAAC;AAEF,gBAAgB,CAAC,QAAQ,GAAG;IAC1B,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CACrC,CAAC","sourcesContent":["import { useState } from 'react';\nimport { Meta, Story } from '@storybook/react';\n\nimport { Button, Flex } from '@pega/cosmos-react-core';\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\nimport { StyledFlex } from './Confirmation.styles';\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> = (args: ConfirmationStoryProps) => {\n const [showConfirmation, setShowConfirmation] = useState(true);\n\n return (\n <Flex as={StyledFlex} container={{ justify: 'center', alignItems: 'center' }}>\n {showConfirmation && (\n <Confirmation\n title={args.title}\n details={<FieldValueListDemo name='Project' value='Pega Cosmos' fields={[]} />}\n whatsNext={[\n 'Send references',\n 'Collect information on the case',\n 'Prepare a demonstration'\n ]}\n tasks={<TaskListDemo />}\n onClose={() => setShowConfirmation(false)}\n />\n )}\n {!showConfirmation && (\n <Button onClick={() => setShowConfirmation(true)}>Show confirmation</Button>\n )}\n </Flex>\n );\n};\n\nConfirmationDemo.args = {\n title: 'US-1337 confirmation'\n};\n\nConfirmationDemo.argTypes = {\n title: { control: { type: 'text' } }\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Confirmation.styles.d.ts","sourceRoot":"","sources":["../../../src/work/Confirmation/Confirmation.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,yGAItB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Confirmation.styles.js","sourceRoot":"","sources":["../../../src/work/Confirmation/Confirmation.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAInC,CAAC","sourcesContent":["import styled from 'styled-components';\n\nexport const StyledFlex = styled.div`\n article {\n width: 100%;\n }\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"}
|
|
File without changes
|
|
File without changes
|
|
@@ -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"}
|
|
File without changes
|
|
File without changes
|
|
@@ -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"}
|
|
File without changes
|
|
File without changes
|
|
@@ -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;;AAgB/C,wBAMU;AAIV,UAAU,uBAAuB;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,uBAAuB,CA8O5D,CAAC"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { useEffect, useState, useMemo } from 'react';
|
|
2
|
+
import { Status, OneColumnPage, Text, Flex } from '@pega/cosmos-react-core';
|
|
3
|
+
import { CasePreview, SearchResults } from '@pega/cosmos-react-work';
|
|
4
|
+
import { AppShellDemo } from '@pega/cosmos-react-demos/lib/core/AppShell/AppShell.stories';
|
|
5
|
+
import { getInitialResults, initialFilters } from './SearchResults.mocks';
|
|
6
|
+
import { ColoredText, StyledSearchResults } from './SearchResults.styles';
|
|
7
|
+
export default {
|
|
8
|
+
title: 'Work/SearchResults',
|
|
9
|
+
component: SearchResults,
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: 'fullscreen'
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
export const SearchResultsDemo = (args) => {
|
|
15
|
+
const [preview, setPreview] = useState();
|
|
16
|
+
const [previewTabId, setPreviewTabId] = useState();
|
|
17
|
+
const initialResults = useMemo(() => getInitialResults(setPreview, setPreviewTabId), []);
|
|
18
|
+
const [results, setResults] = useState(initialResults);
|
|
19
|
+
const [filters, setFilters] = useState(initialFilters);
|
|
20
|
+
const [search, setSearch] = useState('');
|
|
21
|
+
const [limit, setLimit] = useState(2);
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
const activeFilters = filters.flatMap(group => {
|
|
24
|
+
if (group.type === 'select') {
|
|
25
|
+
return group.items.flatMap(item => {
|
|
26
|
+
if (item.checked) {
|
|
27
|
+
return {
|
|
28
|
+
id: item.id,
|
|
29
|
+
name: item.name,
|
|
30
|
+
groupName: group.name
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
return [];
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
return [];
|
|
37
|
+
});
|
|
38
|
+
if (activeFilters.length > 0 || search !== '') {
|
|
39
|
+
setResults(() => {
|
|
40
|
+
const filteredResults = initialResults.filter(result => {
|
|
41
|
+
const statusFilterActive = activeFilters.findIndex(x => x.groupName === 'Status') !== -1;
|
|
42
|
+
const lastUpdatedFilterActive = activeFilters.findIndex(x => x.groupName === 'Last updated') !== -1;
|
|
43
|
+
let matchesStatusFilter = !statusFilterActive;
|
|
44
|
+
let matchesLastUpdatedFilter = !lastUpdatedFilterActive;
|
|
45
|
+
activeFilters.forEach(filter => {
|
|
46
|
+
result.meta?.forEach(tag => {
|
|
47
|
+
if (tag) {
|
|
48
|
+
if (!matchesStatusFilter && filter.groupName === 'Status' && tag === filter.name) {
|
|
49
|
+
matchesStatusFilter = true;
|
|
50
|
+
}
|
|
51
|
+
if (!matchesLastUpdatedFilter &&
|
|
52
|
+
filter.groupName === 'Last updated' &&
|
|
53
|
+
typeof tag === 'string' &&
|
|
54
|
+
((filter.name === 'Today' && Date.parse(tag) >= Date.parse('01/01/21')) ||
|
|
55
|
+
(filter.name === 'Yesterday' && Date.parse(tag) >= Date.parse('12/31/20')) ||
|
|
56
|
+
(filter.name === 'Last 7 days' && Date.parse(tag) >= Date.parse('12/25/20')) ||
|
|
57
|
+
(filter.name === 'Last 30 days' && Date.parse(tag) >= Date.parse('12/01/20')))) {
|
|
58
|
+
matchesLastUpdatedFilter = true;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
return matchesStatusFilter && matchesLastUpdatedFilter;
|
|
64
|
+
});
|
|
65
|
+
return filteredResults.filter(result => {
|
|
66
|
+
if (result &&
|
|
67
|
+
(result.description?.toLowerCase().includes(search.toLowerCase()) ||
|
|
68
|
+
result.title.toLowerCase().includes(search.toLowerCase()) ||
|
|
69
|
+
result.id.toLowerCase().includes(search.toLowerCase()))) {
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
return false;
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
setResults([]);
|
|
78
|
+
}
|
|
79
|
+
}, [search, filters]);
|
|
80
|
+
const handleFilterChange = (changeEvent) => {
|
|
81
|
+
setFilters(curr => {
|
|
82
|
+
return curr.map(filter => {
|
|
83
|
+
const newFilter = { ...filter };
|
|
84
|
+
if (newFilter.name === changeEvent.name &&
|
|
85
|
+
changeEvent.type === 'select' &&
|
|
86
|
+
newFilter.type === 'select') {
|
|
87
|
+
newFilter.items = newFilter.items.map(item => {
|
|
88
|
+
const newItem = { ...item };
|
|
89
|
+
if (item.id === changeEvent.value.id)
|
|
90
|
+
newItem.checked = changeEvent.value.checked;
|
|
91
|
+
else if (newFilter.selectType === 'single-select')
|
|
92
|
+
newItem.checked = false;
|
|
93
|
+
return newItem;
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
return newFilter;
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
const clearAllFilters = () => {
|
|
101
|
+
setFilters(curr => {
|
|
102
|
+
return curr.map(filter => {
|
|
103
|
+
if (filter.type === 'select') {
|
|
104
|
+
filter.items = filter.items.map(item => {
|
|
105
|
+
item.checked = false;
|
|
106
|
+
return item;
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
return filter;
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
const handleClearFilter = (filterName) => {
|
|
114
|
+
setFilters(curr => {
|
|
115
|
+
return curr.map(filter => {
|
|
116
|
+
if (filter.name === filterName && filter.type === 'select') {
|
|
117
|
+
filter.items = filter.items.map(item => {
|
|
118
|
+
item.checked = false;
|
|
119
|
+
return item;
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
return filter;
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
const handleShowMore = () => {
|
|
127
|
+
if (limit < results.length)
|
|
128
|
+
setLimit(curr => curr + 2);
|
|
129
|
+
};
|
|
130
|
+
const renderForDisplay = (resultsToDisplay) => {
|
|
131
|
+
return resultsToDisplay.map(result => {
|
|
132
|
+
if (result.meta) {
|
|
133
|
+
const metaValues = [...result.meta];
|
|
134
|
+
const renderedMeta = metaValues.map(item => {
|
|
135
|
+
if (!Number.isNaN(Date.parse(item))) {
|
|
136
|
+
if (Date.parse(item) >= Date.parse('12/01/20') &&
|
|
137
|
+
Date.parse(item) < Date.parse('12/25/20'))
|
|
138
|
+
return 'Updated 1 month ago';
|
|
139
|
+
if (Date.parse(item) >= Date.parse('12/25/20') &&
|
|
140
|
+
Date.parse(item) < Date.parse('12/31/20'))
|
|
141
|
+
return 'Updated 1 week ago';
|
|
142
|
+
if (Date.parse(item) >= Date.parse('12/31/20') &&
|
|
143
|
+
Date.parse(item) < Date.parse('01/01/21'))
|
|
144
|
+
return 'Updated yesterday';
|
|
145
|
+
if (Date.parse(item) >= Date.parse('01/01/21') &&
|
|
146
|
+
Date.parse(item) < Date.parse('01/01/21 07:00:00'))
|
|
147
|
+
return 'Updated today';
|
|
148
|
+
return 'Updated just now';
|
|
149
|
+
}
|
|
150
|
+
switch (item) {
|
|
151
|
+
case 'Completed':
|
|
152
|
+
return <Status variant='success'>Completed</Status>;
|
|
153
|
+
case 'Ready':
|
|
154
|
+
return <Status variant='info'>Ready</Status>;
|
|
155
|
+
case 'Pending':
|
|
156
|
+
return <Status variant='pending'>Pending</Status>;
|
|
157
|
+
case 'Blocked':
|
|
158
|
+
return <Status variant='urgent'>Blocked</Status>;
|
|
159
|
+
case 'Low priority':
|
|
160
|
+
return <Text variant='secondary'>Low priority</Text>;
|
|
161
|
+
case 'Medium priority':
|
|
162
|
+
return (<Text as={ColoredText} colorVariant='warn' variant='secondary'>
|
|
163
|
+
Medium priority
|
|
164
|
+
</Text>);
|
|
165
|
+
case 'High priority':
|
|
166
|
+
return (<Text as={ColoredText} colorVariant='urgent' variant='secondary'>
|
|
167
|
+
High priority
|
|
168
|
+
</Text>);
|
|
169
|
+
default:
|
|
170
|
+
return item;
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
return { ...result, meta: renderedMeta };
|
|
174
|
+
}
|
|
175
|
+
return result;
|
|
176
|
+
});
|
|
177
|
+
};
|
|
178
|
+
const searchResults = (<>
|
|
179
|
+
<OneColumnPage as={StyledSearchResults} title='Search results' a={<SearchResults results={limit < results.length
|
|
180
|
+
? renderForDisplay(results.slice(0, limit))
|
|
181
|
+
: renderForDisplay(results)} searchInputProps={{ value: search, onSearchChange: setSearch }} count={results.length} filters={filters} onFilterChange={handleFilterChange} onClearAllFilters={clearAllFilters} onClearFilter={handleClearFilter} onShowMore={limit < results.length ? handleShowMore : undefined}/>}/>
|
|
182
|
+
|
|
183
|
+
<CasePreview open={!!preview} caseId={preview?.id || ''} heading={preview?.title || ''} tabs={{
|
|
184
|
+
items: [],
|
|
185
|
+
currentTabId: previewTabId || '',
|
|
186
|
+
onClick: (id) => setPreviewTabId(id)
|
|
187
|
+
}} followed summary={preview && <Flex container={{ pad: 2 }}>{preview.description}</Flex>} onBeforeClose={() => {
|
|
188
|
+
setPreview(undefined);
|
|
189
|
+
}}/>
|
|
190
|
+
</>);
|
|
191
|
+
return args.withAppShell ? <AppShellDemo appHeader main={searchResults}/> : searchResults;
|
|
192
|
+
};
|
|
193
|
+
SearchResultsDemo.args = {
|
|
194
|
+
withAppShell: false
|
|
195
|
+
};
|
|
196
|
+
SearchResultsDemo.argTypes = {
|
|
197
|
+
withAppShell: { control: { type: 'boolean' } }
|
|
198
|
+
};
|
|
199
|
+
//# 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;AAErD,OAAO,EAAE,MAAM,EAAc,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AACxF,OAAO,EACL,WAAW,EACX,aAAa,EAId,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,6DAA6D,CAAC;AAE3F,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC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AC,WAAW,CACV,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAChB,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,CAC1B,OAAO,CAAC,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC,CAC9B,IAAI,CAAC,CAAC;YACJ,KAAK,EAAE,EAAE;YACT,YAAY,EAAE,YAAY,IAAI,EAAE;YAChC,OAAO,EAAE,CAAC,EAAU,EAAE,EAAE,CAAC,eAAe,CAAC,EAAE,CAAC;SAC7C,CAAC,CACF,QAAQ,CACR,OAAO,CAAC,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,CAAC,CAC9E,aAAa,CAAC,CAAC,GAAG,EAAE;YAClB,UAAU,CAAC,SAAS,CAAC,CAAC;QACxB,CAAC,CAAC,EAEN;IAAA,GAAG,CACJ,CAAC;IAEF,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,aAAa,CAAC,EAAG,CAAC,CAAC,CAAC,aAAa,CAAC;AAC7F,CAAC,CAAC;AAEF,iBAAiB,CAAC,IAAI,GAAG;IACvB,YAAY,EAAE,KAAK;CACpB,CAAC;AAEF,iBAAiB,CAAC,QAAQ,GAAG;IAC3B,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;CAC/C,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useEffect, useState, useMemo } from 'react';\n\nimport { Status, OmitStrict, OneColumnPage, Text, Flex } 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';\nimport { ColoredText, StyledSearchResults } from './SearchResults.styles';\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\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 as={StyledSearchResults}\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,5 @@
|
|
|
1
|
+
export declare const StyledSearchResults: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
|
+
export declare const ColoredText: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {
|
|
3
|
+
colorVariant: 'warn' | 'urgent';
|
|
4
|
+
}, never>;
|
|
5
|
+
//# sourceMappingURL=SearchResults.styles.d.ts.map
|