@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,95 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { Avatar, CardContent, Popover, useUID } from '@pega/cosmos-react-core';
|
|
4
|
+
import { Feed, FeedReply, HashtagButtonConfig, MentionButtonConfig } from '@pega/cosmos-react-social';
|
|
5
|
+
import { Glimpse } from '@pega/cosmos-react-work';
|
|
6
|
+
import { generatedLikes, userMentions } from './Feed.mocks';
|
|
7
|
+
export default {
|
|
8
|
+
title: 'Social/Feed/FeedReply',
|
|
9
|
+
component: FeedReply
|
|
10
|
+
};
|
|
11
|
+
export const FeedReplyDemo = ({ fullname = 'Katie Smith', username = 'katie_smith', content, attachments, timeElapsed: time, userStatus, renderFeed = true }) => {
|
|
12
|
+
const defaultContent = attachments
|
|
13
|
+
? ''
|
|
14
|
+
: 'This reply mentions @deans:Seth DeAngelo:user: and also contains a tag! #cosmos:';
|
|
15
|
+
const key = useUID();
|
|
16
|
+
const [likes, setLikes] = useState([]);
|
|
17
|
+
const [liked, setLiked] = useState(false);
|
|
18
|
+
const [likeCount, setLikeCount] = useState(renderFeed ? generatedLikes.length : 0);
|
|
19
|
+
const [replyContent, setReplyContent] = useState(content || defaultContent);
|
|
20
|
+
const [edited, setEdited] = useState(false);
|
|
21
|
+
const [timeElapsed, setTimeElapsed] = useState(time || '3 days ago');
|
|
22
|
+
const [popoverOpen, setPopoverOpen] = useState(false);
|
|
23
|
+
const [popoverTarget, setPopoverTarget] = useState();
|
|
24
|
+
const [additionalLikeAdded, setAdditionalLikeAdded] = useState(false);
|
|
25
|
+
const getInitialLikes = () => {
|
|
26
|
+
if (likes.length)
|
|
27
|
+
return;
|
|
28
|
+
setLikes(renderFeed ? generatedLikes : []);
|
|
29
|
+
};
|
|
30
|
+
const generateNewLike = () => {
|
|
31
|
+
setTimeout(() => {
|
|
32
|
+
setLikes(oldLikes => [
|
|
33
|
+
...oldLikes,
|
|
34
|
+
{
|
|
35
|
+
primary: 'Generated Like',
|
|
36
|
+
secondary: ['This like was added after the onLoadMore callback triggered'],
|
|
37
|
+
visual: _jsx(Avatar, { size: 'l', name: 'Generated Like' }, void 0),
|
|
38
|
+
id: 'generatedLike'
|
|
39
|
+
}
|
|
40
|
+
]);
|
|
41
|
+
setAdditionalLikeAdded(true);
|
|
42
|
+
}, 1000);
|
|
43
|
+
};
|
|
44
|
+
const onMentionClick = ({ id, type }) => {
|
|
45
|
+
if (type === 'user') {
|
|
46
|
+
const user = userMentions.find(mention => mention.id === id);
|
|
47
|
+
if (user)
|
|
48
|
+
return _jsx(Glimpse, { ...user }, void 0);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const reply = (_jsxs(_Fragment, { children: [_jsx(FeedReply, { id: key, info: {
|
|
52
|
+
timeElapsed,
|
|
53
|
+
content: replyContent,
|
|
54
|
+
attachments,
|
|
55
|
+
username,
|
|
56
|
+
fullname,
|
|
57
|
+
fullnameLabel: `${fullname}'s Profile`,
|
|
58
|
+
liked,
|
|
59
|
+
userStatus
|
|
60
|
+
}, interactionInfo: {
|
|
61
|
+
likes,
|
|
62
|
+
likeCount: likeCount >= 10 ? likeCount + 1 : likeCount,
|
|
63
|
+
likeLabel: 'Like',
|
|
64
|
+
commentLabel: 'Comment'
|
|
65
|
+
}, maxContentHeight: 40, menuItems: [{ primary: 'Custom action', id: 'custom', onClick: () => { } }], onEditSubmit: ({ value }) => {
|
|
66
|
+
setReplyContent(value);
|
|
67
|
+
setEdited(true);
|
|
68
|
+
setTimeElapsed('Just now');
|
|
69
|
+
}, edited: edited, onCommentClick: () => { }, onLikeClick: ({ user }) => {
|
|
70
|
+
const userLikedIndex = likes.findIndex(x => x.id === user.id);
|
|
71
|
+
if (userLikedIndex !== -1) {
|
|
72
|
+
setLikes(oldLikes => {
|
|
73
|
+
const oldLikesArr = [...oldLikes];
|
|
74
|
+
oldLikesArr.splice(userLikedIndex, 1);
|
|
75
|
+
return oldLikesArr;
|
|
76
|
+
});
|
|
77
|
+
setLikeCount(curr => curr - 1);
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
setLikes(oldLikes => [user, ...oldLikes]);
|
|
81
|
+
setLikeCount(curr => curr + 1);
|
|
82
|
+
}
|
|
83
|
+
setLiked(curr => !curr);
|
|
84
|
+
}, onLikeCountInteraction: getInitialLikes, onLoadMoreLikes: !additionalLikeAdded ? generateNewLike : undefined, onUserClick: (_, clickEvent) => {
|
|
85
|
+
if (clickEvent) {
|
|
86
|
+
setPopoverTarget(clickEvent.target);
|
|
87
|
+
setPopoverOpen(curr => !curr);
|
|
88
|
+
}
|
|
89
|
+
} }, key), popoverTarget && (_jsx(Popover, { show: popoverOpen, target: popoverTarget, placement: 'bottom', portal: true, children: _jsx(CardContent, { children: fullname }, void 0) }, void 0))] }, void 0));
|
|
90
|
+
return renderFeed ? (_jsx(Feed, { onMentionClick: onMentionClick, interactionRenderers: [MentionButtonConfig, HashtagButtonConfig], userInfo: { username: 'demo_user', fullname: 'Demo User' }, posts: [reply] }, void 0)) : (reply);
|
|
91
|
+
};
|
|
92
|
+
export const FeedReplyWithPresence = () => {
|
|
93
|
+
return _jsx(FeedReplyDemo, { userStatus: 'active' }, void 0);
|
|
94
|
+
};
|
|
95
|
+
//# sourceMappingURL=FeedReply.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FeedReply.stories.js","sourceRoot":"","sources":["../../../src/social/Feed/FeedReply.stories.tsx"],"names":[],"mappings":"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","sourcesContent":["import { Meta } from '@storybook/react';\nimport { useState } from 'react';\n\nimport { Avatar, CardContent, Popover, SummaryListItem, useUID } from '@pega/cosmos-react-core';\nimport {\n Feed,\n FeedReply,\n FeedReplyProps,\n HashtagButtonConfig,\n MentionButtonConfig\n} from '@pega/cosmos-react-social';\nimport { Glimpse } from '@pega/cosmos-react-work';\n\nimport { generatedLikes, userMentions } from './Feed.mocks';\n\nexport default {\n title: 'Social/Feed/FeedReply',\n component: FeedReply\n} as Meta;\n\nexport const FeedReplyDemo = ({\n fullname = 'Katie Smith',\n username = 'katie_smith',\n content,\n attachments,\n timeElapsed: time,\n userStatus,\n renderFeed = true\n}: {\n fullname?: FeedReplyProps['info']['fullname'];\n username?: FeedReplyProps['info']['username'];\n content?: FeedReplyProps['info']['content'];\n attachments?: FeedReplyProps['info']['attachments'];\n timeElapsed?: FeedReplyProps['info']['timeElapsed'];\n userStatus?: FeedReplyProps['info']['userStatus'];\n renderFeed?: boolean;\n}) => {\n const defaultContent = attachments\n ? ''\n : 'This reply mentions @deans:Seth DeAngelo:user: and also contains a tag! #cosmos:';\n\n const key = useUID();\n const [likes, setLikes] = useState<SummaryListItem[]>([]);\n const [liked, setLiked] = useState(false);\n const [likeCount, setLikeCount] = useState(renderFeed ? generatedLikes.length : 0);\n const [replyContent, setReplyContent] = useState(content || defaultContent);\n const [edited, setEdited] = useState(false);\n const [timeElapsed, setTimeElapsed] = useState(time || '3 days ago');\n const [popoverOpen, setPopoverOpen] = useState(false);\n const [popoverTarget, setPopoverTarget] = useState<Element>();\n const [additionalLikeAdded, setAdditionalLikeAdded] = useState(false);\n\n const getInitialLikes = () => {\n if (likes.length) return;\n\n setLikes(renderFeed ? generatedLikes : []);\n };\n\n const generateNewLike = () => {\n setTimeout(() => {\n setLikes(oldLikes => [\n ...oldLikes,\n {\n primary: 'Generated Like',\n secondary: ['This like was added after the onLoadMore callback triggered'],\n visual: <Avatar size='l' name='Generated Like' />,\n id: 'generatedLike'\n }\n ]);\n setAdditionalLikeAdded(true);\n }, 1000);\n };\n\n const onMentionClick = ({ id, type }: { id: string; type: string }) => {\n if (type === 'user') {\n const user = userMentions.find(mention => mention.id === id);\n if (user) return <Glimpse {...user} />;\n }\n };\n\n const reply = (\n <>\n <FeedReply\n id={key}\n key={key}\n info={{\n timeElapsed,\n content: replyContent,\n attachments,\n username,\n fullname,\n fullnameLabel: `${fullname}'s Profile`,\n liked,\n userStatus\n }}\n interactionInfo={{\n likes,\n likeCount: likeCount >= 10 ? likeCount + 1 : likeCount,\n likeLabel: 'Like',\n commentLabel: 'Comment'\n }}\n maxContentHeight={40}\n menuItems={[{ primary: 'Custom action', id: 'custom', onClick: () => {} }]}\n onEditSubmit={({ value }) => {\n setReplyContent(value);\n setEdited(true);\n setTimeElapsed('Just now');\n }}\n edited={edited}\n onCommentClick={() => {}}\n onLikeClick={({ user }) => {\n const userLikedIndex = likes.findIndex(x => x.id === user.id);\n if (userLikedIndex !== -1) {\n setLikes(oldLikes => {\n const oldLikesArr = [...oldLikes];\n oldLikesArr.splice(userLikedIndex, 1);\n return oldLikesArr;\n });\n setLikeCount(curr => curr - 1);\n } else {\n setLikes(oldLikes => [user, ...oldLikes]);\n setLikeCount(curr => curr + 1);\n }\n setLiked(curr => !curr);\n }}\n onLikeCountInteraction={getInitialLikes}\n onLoadMoreLikes={!additionalLikeAdded ? generateNewLike : undefined}\n onUserClick={(_, clickEvent) => {\n if (clickEvent) {\n setPopoverTarget(clickEvent.target as Element);\n setPopoverOpen(curr => !curr);\n }\n }}\n />\n {popoverTarget && (\n <Popover show={popoverOpen} target={popoverTarget} placement='bottom' portal>\n <CardContent>{fullname}</CardContent>\n </Popover>\n )}\n </>\n );\n\n return renderFeed ? (\n <Feed\n onMentionClick={onMentionClick}\n interactionRenderers={[MentionButtonConfig, HashtagButtonConfig]}\n userInfo={{ username: 'demo_user', fullname: 'Demo User' }}\n posts={[reply]}\n />\n ) : (\n reply\n );\n};\n\nexport const FeedReplyWithPresence = () => {\n return <FeedReplyDemo userStatus='active' />;\n};\n"]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { useUID } from '@pega/cosmos-react-core';
|
|
4
|
+
import { Feed, FeedReplyInput } from '@pega/cosmos-react-social';
|
|
5
|
+
import { caseMentions, userMentions } from './Feed.mocks';
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Social/Feed/FeedReplyInput',
|
|
8
|
+
component: FeedReplyInput
|
|
9
|
+
};
|
|
10
|
+
export const FeedReplyInputDemo = ({ onSubmit, renderFeed = true }) => {
|
|
11
|
+
const key = useUID();
|
|
12
|
+
const [searchResults, setSearchResults] = useState([]);
|
|
13
|
+
const [attachments, setAttachments] = useState([]);
|
|
14
|
+
const onSearch = ({ type, search, mentionType }) => {
|
|
15
|
+
if (type === 'mention') {
|
|
16
|
+
const availableMentions = mentionType === 'case' ? caseMentions : userMentions;
|
|
17
|
+
const mentions = availableMentions
|
|
18
|
+
.filter((user) => {
|
|
19
|
+
const names = user.primary.toLowerCase().split(' ');
|
|
20
|
+
const searchWords = search.toLowerCase().split(' ');
|
|
21
|
+
return !!searchWords.every((word) => names.find((name) => name.startsWith(word)));
|
|
22
|
+
})
|
|
23
|
+
.map(({ id, primary, secondary, visual }) => {
|
|
24
|
+
return {
|
|
25
|
+
id,
|
|
26
|
+
primary,
|
|
27
|
+
secondary,
|
|
28
|
+
visual
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
setSearchResults(mentions);
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
setSearchResults(['cosmos', 'hashtag', 'pega']
|
|
35
|
+
.filter(tag => {
|
|
36
|
+
return tag.toLowerCase().includes(search.toLowerCase());
|
|
37
|
+
})
|
|
38
|
+
.map(tag => ({ id: tag, primary: tag })));
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
const onFilesAdded = (files) => {
|
|
42
|
+
files.forEach(file => {
|
|
43
|
+
if (file.type.split('/')[0] === 'image')
|
|
44
|
+
file.thumbnail = URL.createObjectURL(file);
|
|
45
|
+
file.onDelete = () => {
|
|
46
|
+
setAttachments(current => {
|
|
47
|
+
return current.filter(x => x.name !== file.name);
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
setAttachments(files);
|
|
52
|
+
};
|
|
53
|
+
const replyInput = (_jsx(FeedReplyInput, { id: key, commentLabel: 'Send Comment', attachments: attachments, placeholder: 'Add a comment', onFilesAdded: onFilesAdded, onSubmit: replyEvent => {
|
|
54
|
+
onSubmit?.(replyEvent);
|
|
55
|
+
setAttachments([]);
|
|
56
|
+
replyEvent.clear();
|
|
57
|
+
} }, void 0));
|
|
58
|
+
return renderFeed ? (_jsx(Feed, { searchTypes: ['user', 'case'], onDecoratorSearch: onSearch, searchResults: searchResults, userInfo: { username: 'demo_user', fullname: 'Demo User' }, posts: [replyInput] }, void 0)) : (replyInput);
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=FeedReplyInput.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FeedReplyInput.stories.js","sourceRoot":"","sources":["../../../src/social/Feed/FeedReplyInput.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAiB,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EACL,IAAI,EACJ,cAAc,EAGf,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE1D,eAAe;IACb,KAAK,EAAE,4BAA4B;IACnC,SAAS,EAAE,cAAc;CAClB,CAAC;AAEV,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EACjC,QAAQ,EACR,UAAU,GAAG,IAAI,EAIlB,EAAE,EAAE;IACH,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;IACrB,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAkB,EAAE,CAAC,CAAC;IACxE,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAkB,EAAE,CAAC,CAAC;IAEpE,MAAM,QAAQ,GAAG,CAAC,EAChB,IAAI,EACJ,MAAM,EACN,WAAW,EAKZ,EAAE,EAAE;QACH,IAAI,IAAI,KAAK,SAAS,EAAE;YACtB,MAAM,iBAAiB,GAAG,WAAW,KAAK,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC;YAE/E,MAAM,QAAQ,GAAoB,iBAAiB;iBAChD,MAAM,CAAC,CAAC,IAAkB,EAAE,EAAE;gBAC7B,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACpD,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACpD,OAAO,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,IAAY,EAAE,EAAE,CAC1C,KAAK,CAAC,IAAI,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CACpD,CAAC;YACJ,CAAC,CAAC;iBACD,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE;gBAC1C,OAAO;oBACL,EAAE;oBACF,OAAO;oBACP,SAAS;oBACT,MAAM;iBACP,CAAC;YACJ,CAAC,CAAC,CAAC;YACL,gBAAgB,CAAC,QAAQ,CAAC,CAAC;SAC5B;aAAM;YACL,gBAAgB,CACd,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC;iBAC1B,MAAM,CAAC,GAAG,CAAC,EAAE;gBACZ,OAAO,GAAG,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;YAC1D,CAAC,CAAC;iBACD,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,CAC3C,CAAC;SACH;IACH,CAAC,CAAC;IAEF,MAAM,YAAY,GAAG,CAAC,KAAsB,EAAE,EAAE;QAC9C,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACnB,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO;gBAAE,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;YAEpF,IAAI,CAAC,QAAQ,GAAG,GAAG,EAAE;gBACnB,cAAc,CAAC,OAAO,CAAC,EAAE;oBACvB,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC;gBACnD,CAAC,CAAC,CAAC;YACL,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,cAAc,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC,CAAC;IAEF,MAAM,UAAU,GAAG,CACjB,KAAC,cAAc,IACb,EAAE,EAAE,GAAG,EACP,YAAY,EAAC,cAAc,EAC3B,WAAW,EAAE,WAAW,EACxB,WAAW,EAAC,eAAe,EAC3B,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,UAAU,CAAC,EAAE;YACrB,QAAQ,EAAE,CAAC,UAAU,CAAC,CAAC;YACvB,cAAc,CAAC,EAAE,CAAC,CAAC;YACnB,UAAU,CAAC,KAAK,EAAE,CAAC;QACrB,CAAC,WACD,CACH,CAAC;IAEF,OAAO,UAAU,CAAC,CAAC,CAAC,CAClB,KAAC,IAAI,IACH,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7B,iBAAiB,EAAE,QAAQ,EAC3B,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,EAC1D,KAAK,EAAE,CAAC,UAAU,CAAC,WACnB,CACH,CAAC,CAAC,CAAC,CACF,UAAU,CACX,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta } from '@storybook/react';\nimport { useState } from 'react';\n\nimport { MenuItemProps, useUID } from '@pega/cosmos-react-core';\nimport {\n Feed,\n FeedReplyInput,\n FeedReplyInputProps,\n AttachedFiles\n} from '@pega/cosmos-react-social';\nimport { GlimpseProps } from '@pega/cosmos-react-work';\n\nimport { caseMentions, userMentions } from './Feed.mocks';\n\nexport default {\n title: 'Social/Feed/FeedReplyInput',\n component: FeedReplyInput\n} as Meta;\n\nexport const FeedReplyInputDemo = ({\n onSubmit,\n renderFeed = true\n}: {\n onSubmit?: FeedReplyInputProps['onSubmit'];\n renderFeed?: boolean;\n}) => {\n const key = useUID();\n const [searchResults, setSearchResults] = useState<MenuItemProps[]>([]);\n const [attachments, setAttachments] = useState<AttachedFiles[]>([]);\n\n const onSearch = ({\n type,\n search,\n mentionType\n }: {\n type: 'mention' | 'tag';\n search: string;\n mentionType: string;\n }) => {\n if (type === 'mention') {\n const availableMentions = mentionType === 'case' ? caseMentions : userMentions;\n\n const mentions: MenuItemProps[] = availableMentions\n .filter((user: GlimpseProps) => {\n const names = user.primary.toLowerCase().split(' ');\n const searchWords = search.toLowerCase().split(' ');\n return !!searchWords.every((word: string) =>\n names.find((name: string) => name.startsWith(word))\n );\n })\n .map(({ id, primary, secondary, visual }) => {\n return {\n id,\n primary,\n secondary,\n visual\n };\n });\n setSearchResults(mentions);\n } else {\n setSearchResults(\n ['cosmos', 'hashtag', 'pega']\n .filter(tag => {\n return tag.toLowerCase().includes(search.toLowerCase());\n })\n .map(tag => ({ id: tag, primary: tag }))\n );\n }\n };\n\n const onFilesAdded = (files: AttachedFiles[]) => {\n files.forEach(file => {\n if (file.type.split('/')[0] === 'image') file.thumbnail = URL.createObjectURL(file);\n\n file.onDelete = () => {\n setAttachments(current => {\n return current.filter(x => x.name !== file.name);\n });\n };\n });\n\n setAttachments(files);\n };\n\n const replyInput = (\n <FeedReplyInput\n id={key}\n commentLabel='Send Comment'\n attachments={attachments}\n placeholder='Add a comment'\n onFilesAdded={onFilesAdded}\n onSubmit={replyEvent => {\n onSubmit?.(replyEvent);\n setAttachments([]);\n replyEvent.clear();\n }}\n />\n );\n\n return renderFeed ? (\n <Feed\n searchTypes={['user', 'case']}\n onDecoratorSearch={onSearch}\n searchResults={searchResults}\n userInfo={{ username: 'demo_user', fullname: 'Demo User' }}\n posts={[replyInput]}\n />\n ) : (\n replyInput\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppAnnouncement.stories.d.ts","sourceRoot":"","sources":["../../../src/work/AppAnnouncement/AppAnnouncement.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAI/C,OAAO,EAAmB,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;;AAEhF,wBAGU;AAEV,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,oBAAoB,
|
|
1
|
+
{"version":3,"file":"AppAnnouncement.stories.d.ts","sourceRoot":"","sources":["../../../src/work/AppAnnouncement/AppAnnouncement.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAI/C,OAAO,EAAmB,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;;AAEhF,wBAGU;AAEV,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,oBAAoB,CAmB3D,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useContext } from 'react';
|
|
3
|
+
import { ToasterContext } from '@pega/cosmos-react-core';
|
|
4
|
+
import { AppAnnouncement } from '@pega/cosmos-react-work';
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Work/AppAnnouncement',
|
|
7
|
+
component: AppAnnouncement
|
|
8
|
+
};
|
|
9
|
+
export const AppAnnouncementDemo = (args) => {
|
|
10
|
+
const { push } = useContext(ToasterContext);
|
|
11
|
+
const details = [
|
|
12
|
+
'New React based UI rendering',
|
|
13
|
+
'Streamlined components for all business needs',
|
|
14
|
+
'Other improvements'
|
|
15
|
+
];
|
|
16
|
+
return (_jsx(AppAnnouncement, { heading: args.heading, description: args.description, details: details, whatsNewLink: args.whatsNewLink, image: args.image, onDismiss: () => push({ content: 'Dismissed AppAnnouncement' }) }, void 0));
|
|
17
|
+
};
|
|
18
|
+
AppAnnouncementDemo.args = {
|
|
19
|
+
heading: 'Pega Cosmos Design System',
|
|
20
|
+
description: 'We have launched a brand new experience to accelerate your workflow!',
|
|
21
|
+
whatsNewLink: 'https://www.pega.com',
|
|
22
|
+
image: 'https://www.pega.com/sites/default/files/styles/2560/public/media/images/2019-01/pega-logo_0.png'
|
|
23
|
+
};
|
|
24
|
+
AppAnnouncementDemo.argTypes = {
|
|
25
|
+
heading: { control: { type: 'text' } },
|
|
26
|
+
description: { control: { type: 'text' } },
|
|
27
|
+
whatsNewLink: { control: { type: 'text' } },
|
|
28
|
+
image: { control: { type: 'text' } }
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=AppAnnouncement.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppAnnouncement.stories.js","sourceRoot":"","sources":["../../../src/work/AppAnnouncement/AppAnnouncement.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAwB,MAAM,yBAAyB,CAAC;AAEhF,eAAe;IACb,KAAK,EAAE,sBAAsB;IAC7B,SAAS,EAAE,eAAe;CACnB,CAAC;AAEV,MAAM,CAAC,MAAM,mBAAmB,GAAgC,CAAC,IAA0B,EAAE,EAAE;IAC7F,MAAM,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAE5C,MAAM,OAAO,GAAG;QACd,8BAA8B;QAC9B,+CAA+C;QAC/C,oBAAoB;KACrB,CAAC;IAEF,OAAO,CACL,KAAC,eAAe,IACd,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,2BAA2B,EAAE,CAAC,WAC/D,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,mBAAmB,CAAC,IAAI,GAAG;IACzB,OAAO,EAAE,2BAA2B;IACpC,WAAW,EAAE,sEAAsE;IACnF,YAAY,EAAE,sBAAsB;IACpC,KAAK,EACH,kGAAkG;CACrG,CAAC;AAEF,mBAAmB,CAAC,QAAQ,GAAG;IAC7B,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACtC,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC1C,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAC3C,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;CACrC,CAAC","sourcesContent":["import { Meta, Story } from '@storybook/react';\nimport { useContext } from 'react';\n\nimport { ToasterContext } from '@pega/cosmos-react-core';\nimport { AppAnnouncement, AppAnnouncementProps } from '@pega/cosmos-react-work';\n\nexport default {\n title: 'Work/AppAnnouncement',\n component: AppAnnouncement\n} as Meta;\n\nexport const AppAnnouncementDemo: Story<AppAnnouncementProps> = (args: AppAnnouncementProps) => {\n const { push } = useContext(ToasterContext);\n\n const details = [\n 'New React based UI rendering',\n 'Streamlined components for all business needs',\n 'Other improvements'\n ];\n\n return (\n <AppAnnouncement\n heading={args.heading}\n description={args.description}\n details={details}\n whatsNewLink={args.whatsNewLink}\n image={args.image}\n onDismiss={() => push({ content: 'Dismissed AppAnnouncement' })}\n />\n );\n};\n\nAppAnnouncementDemo.args = {\n heading: 'Pega Cosmos Design System',\n description: 'We have launched a brand new experience to accelerate your workflow!',\n whatsNewLink: 'https://www.pega.com',\n image:\n 'https://www.pega.com/sites/default/files/styles/2560/public/media/images/2019-01/pega-logo_0.png'\n};\n\nAppAnnouncementDemo.argTypes = {\n heading: { control: { type: 'text' } },\n description: { control: { type: 'text' } },\n whatsNewLink: { control: { type: 'text' } },\n image: { control: { type: 'text' } }\n};\n"]}
|
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useCallback, useContext, useEffect, useRef, useMemo, forwardRef } from 'react';
|
|
3
|
+
import { Button, FileInput, FileVisual, Progress, Modal, ModalManagerContext, Text, ToasterContext, SummaryList, ViewAll, getKindFromMimeType, getMimeTypeFromFile, Popover, Flex, Input, ComboBox, createUID, useOuterEvent, hasProp, DateTimeDisplay, MetaList } from '@pega/cosmos-react-core';
|
|
4
|
+
import { FileServiceContext, mockAttachmentListRequest, mockCategories } from './FileService.mock';
|
|
5
|
+
// ---------------------------------------------------------------------------------------------------------------------
|
|
6
|
+
// getSummaryListItemProps
|
|
7
|
+
// ---------------------------------------------------------------------------------------------------------------------
|
|
8
|
+
const getSummaryListItemProps = ({ ref, file, editFile, cancelFile, deleteFile }) => {
|
|
9
|
+
let actions;
|
|
10
|
+
let visual;
|
|
11
|
+
if (hasProp(file, 'progress') && typeof file.progress === 'number' && file.progress < 100) {
|
|
12
|
+
visual = _jsx(Progress, { value: file.progress, placement: 'inline', variant: 'ring' }, void 0);
|
|
13
|
+
actions = [
|
|
14
|
+
{
|
|
15
|
+
id: 'Cancel',
|
|
16
|
+
text: 'Cancel',
|
|
17
|
+
icon: 'times',
|
|
18
|
+
onClick: () => {
|
|
19
|
+
cancelFile(file.id);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
];
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
visual = (_jsx(FileVisual, { type: getKindFromMimeType(getMimeTypeFromFile(file.name) ?? ''), thumbnail: file.thumbnail }, void 0));
|
|
26
|
+
actions = [
|
|
27
|
+
{
|
|
28
|
+
id: 'Edit',
|
|
29
|
+
text: 'Edit',
|
|
30
|
+
icon: 'pencil',
|
|
31
|
+
onClick: () => {
|
|
32
|
+
editFile?.(file);
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: 'Download',
|
|
37
|
+
text: 'Download',
|
|
38
|
+
icon: 'download',
|
|
39
|
+
onClick: () => { }
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: 'Delete',
|
|
43
|
+
text: 'Delete',
|
|
44
|
+
icon: 'trash',
|
|
45
|
+
onClick: () => {
|
|
46
|
+
deleteFile(file.id);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
];
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
ref,
|
|
53
|
+
id: file.id,
|
|
54
|
+
visual,
|
|
55
|
+
primary: file.name,
|
|
56
|
+
secondary: (_jsx(Text, { variant: 'secondary', children: hasProp(file, 'progress') && typeof file.progress === 'number' && file.progress < 100 ? (`Uploading…${Math.floor(file.progress)}%`) : (_jsx(MetaList, { items: [
|
|
57
|
+
file.category,
|
|
58
|
+
_jsxs(_Fragment, { children: ["Uploaded", ' ', _jsx(DateTimeDisplay, { variant: 'relative', value: file.createDate }, void 0)] }, void 0)
|
|
59
|
+
] }, void 0)) }, void 0)),
|
|
60
|
+
actions
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
const EditPopover = forwardRef(({ file, target, onSubmit, onCancel }, ref) => {
|
|
64
|
+
const [name, setName] = useState(file.name);
|
|
65
|
+
const [error, setError] = useState('');
|
|
66
|
+
const [categories, setCategories] = useState(() => {
|
|
67
|
+
return [
|
|
68
|
+
{ id: createUID(), primary: 'No category', selected: false },
|
|
69
|
+
...mockCategories.map(category => {
|
|
70
|
+
return {
|
|
71
|
+
id: createUID(),
|
|
72
|
+
primary: category,
|
|
73
|
+
selected: file.category === category
|
|
74
|
+
};
|
|
75
|
+
})
|
|
76
|
+
];
|
|
77
|
+
});
|
|
78
|
+
const selectedCategory = useMemo(() => {
|
|
79
|
+
const sc = categories.find(c => c.selected);
|
|
80
|
+
return sc
|
|
81
|
+
? {
|
|
82
|
+
items: {
|
|
83
|
+
id: sc.id,
|
|
84
|
+
text: sc.primary
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
: undefined;
|
|
88
|
+
}, [categories]);
|
|
89
|
+
return (
|
|
90
|
+
// Set an inline style ONLY until Popover width presets are available.
|
|
91
|
+
_jsx(Popover, { ref: ref, target: target, style: { width: '40ch' }, placement: 'bottom-start', children: _jsxs(Flex, { container: { direction: 'column', gap: 2, pad: 2 }, children: [_jsx(Text, { variant: 'h3', children: "Details" }, void 0), _jsxs(Flex, { container: { direction: 'column', gap: 2 }, children: [_jsx(Input, { label: 'Name', placeholder: 'Enter name\u2026', value: name, info: error, status: error ? 'error' : undefined, autoFocus: true, required: true, onChange: (e) => {
|
|
92
|
+
setName(e.target.value);
|
|
93
|
+
if (error && e.target.value) {
|
|
94
|
+
setError('');
|
|
95
|
+
}
|
|
96
|
+
}, onBlur: () => {
|
|
97
|
+
if (!name) {
|
|
98
|
+
setError('Name is required.');
|
|
99
|
+
}
|
|
100
|
+
} }, void 0), _jsx(ComboBox, { label: 'Category', placeholder: 'Choose\u2026', selected: selectedCategory, menu: {
|
|
101
|
+
mode: 'single-select',
|
|
102
|
+
items: categories,
|
|
103
|
+
onItemClick: id => {
|
|
104
|
+
setCategories(cur => {
|
|
105
|
+
return cur.map(category => {
|
|
106
|
+
return {
|
|
107
|
+
...category,
|
|
108
|
+
selected: category.id === id
|
|
109
|
+
};
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
} }, void 0)] }, void 0), _jsxs(Flex, { container: { justify: 'between' }, children: [_jsx(Button, { onClick: onCancel, children: "Cancel" }, void 0), _jsx(Button, { variant: 'primary', onClick: () => {
|
|
114
|
+
if (error)
|
|
115
|
+
return;
|
|
116
|
+
onSubmit({
|
|
117
|
+
name,
|
|
118
|
+
category: !selectedCategory || selectedCategory.items.text === 'No category'
|
|
119
|
+
? ''
|
|
120
|
+
: selectedCategory.items.text
|
|
121
|
+
});
|
|
122
|
+
}, children: "Submit" }, void 0)] }, void 0)] }, void 0) }, void 0));
|
|
123
|
+
});
|
|
124
|
+
const AttachmentsModal = ({ defaultMode }) => {
|
|
125
|
+
const [mode, setMode] = useState(defaultMode);
|
|
126
|
+
const { push: pushToaster } = useContext(ToasterContext);
|
|
127
|
+
const { ModalContext } = useContext(ModalManagerContext);
|
|
128
|
+
const { dismiss } = useContext(ModalContext);
|
|
129
|
+
const { files, setFiles, cancelFile, attachFile, deleteFile } = useContext(FileServiceContext);
|
|
130
|
+
const [search, setSearch] = useState('');
|
|
131
|
+
const [loading, setLoading] = useState(true);
|
|
132
|
+
const [newFiles, setNewFiles] = useState([]);
|
|
133
|
+
const attachSelected = useCallback(() => {
|
|
134
|
+
newFiles.forEach(attachFile);
|
|
135
|
+
dismiss();
|
|
136
|
+
}, [newFiles, attachFile]);
|
|
137
|
+
const listItemEls = useRef([]);
|
|
138
|
+
const [editFileIndex, setEditFileIndex] = useState(-1);
|
|
139
|
+
const editPopoverTargetLi = useMemo(() => {
|
|
140
|
+
return editFileIndex !== undefined ? listItemEls.current[editFileIndex] : undefined;
|
|
141
|
+
}, [editFileIndex, listItemEls]);
|
|
142
|
+
const menuButton = useMemo(() => editPopoverTargetLi
|
|
143
|
+
? editPopoverTargetLi.querySelector('button[aria-haspopup="menu"]')
|
|
144
|
+
: null, [editPopoverTargetLi]);
|
|
145
|
+
const handlePopoverClose = useCallback(() => {
|
|
146
|
+
if (!editPopoverTargetLi)
|
|
147
|
+
return;
|
|
148
|
+
setEditFileIndex(-1);
|
|
149
|
+
menuButton?.focus();
|
|
150
|
+
}, [menuButton, editPopoverTargetLi]);
|
|
151
|
+
const handleKeydown = useCallback((e) => {
|
|
152
|
+
if (e.key === 'Escape') {
|
|
153
|
+
setEditFileIndex(-1);
|
|
154
|
+
}
|
|
155
|
+
}, []);
|
|
156
|
+
const editPopoverRef = useRef(null);
|
|
157
|
+
// Using mousedown instead of click since drag selecting an input's value within the popover, then releasing outside the popover triggers outer click.
|
|
158
|
+
useOuterEvent('mousedown', [editPopoverRef], handlePopoverClose);
|
|
159
|
+
useEffect(() => {
|
|
160
|
+
if (mode === 'viewAll') {
|
|
161
|
+
const timeout = setTimeout(() => {
|
|
162
|
+
setLoading(false);
|
|
163
|
+
}, 1000);
|
|
164
|
+
return () => {
|
|
165
|
+
clearTimeout(timeout);
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
}, [mode]);
|
|
169
|
+
useEffect(() => {
|
|
170
|
+
if (!editPopoverTargetLi)
|
|
171
|
+
return;
|
|
172
|
+
document.addEventListener('keydown', handleKeydown);
|
|
173
|
+
return () => {
|
|
174
|
+
document.removeEventListener('keydown', handleKeydown);
|
|
175
|
+
};
|
|
176
|
+
}, [editPopoverTargetLi]);
|
|
177
|
+
useEffect(() => {
|
|
178
|
+
// Since the component is performing double duty we need to empty out ref elements from a prior render mode.
|
|
179
|
+
listItemEls.current = [];
|
|
180
|
+
}, [mode]);
|
|
181
|
+
const onFilesAdded = useCallback((newlyAddedFiles) => {
|
|
182
|
+
setNewFiles(current => [
|
|
183
|
+
...newlyAddedFiles.map((file, i) => {
|
|
184
|
+
const id = createUID();
|
|
185
|
+
return {
|
|
186
|
+
id,
|
|
187
|
+
name: file.name,
|
|
188
|
+
category: '',
|
|
189
|
+
File: file,
|
|
190
|
+
ref: (el) => {
|
|
191
|
+
listItemEls.current[i] = el;
|
|
192
|
+
},
|
|
193
|
+
onEdit: () => {
|
|
194
|
+
setEditFileIndex(i);
|
|
195
|
+
},
|
|
196
|
+
onCancel: () => {
|
|
197
|
+
setNewFiles(c => c.filter(f => f.id !== id));
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
}),
|
|
201
|
+
...current
|
|
202
|
+
]);
|
|
203
|
+
}, [files]);
|
|
204
|
+
// Actions for the modal
|
|
205
|
+
const actions = mode === 'addNew' ? (_jsxs(_Fragment, { children: [_jsx(Button, { onClick: dismiss, children: "Cancel" }, void 0), _jsx(Button, { type: 'submit', variant: 'primary',
|
|
206
|
+
// Normally this would trigger a submit event but we are preventing that in the Modal's onSubmit.
|
|
207
|
+
onClick: attachSelected, disabled: newFiles.length === 0, children: "Attach Files" }, void 0)] }, void 0)) : null;
|
|
208
|
+
// Content for the modal
|
|
209
|
+
const content = mode === 'addNew' ? (_jsx(FileInput, { multiple: true, label: 'Select files to attach', onFilesAdded: onFilesAdded, files: newFiles.map(f => ({ ...f, meta: f.category || undefined })) }, void 0)) : (_jsx(ViewAll, { loading: loading, items: (search ? files.filter(f => f.name.includes(search)) : files).map((file, i) => {
|
|
210
|
+
return getSummaryListItemProps({
|
|
211
|
+
ref: (el) => {
|
|
212
|
+
listItemEls.current[i] = el;
|
|
213
|
+
},
|
|
214
|
+
file,
|
|
215
|
+
editFile: () => {
|
|
216
|
+
setEditFileIndex(i);
|
|
217
|
+
},
|
|
218
|
+
cancelFile: id => {
|
|
219
|
+
const canceledFile = files.find(f => f.id === id);
|
|
220
|
+
cancelFile(id);
|
|
221
|
+
pushToaster({ content: `Cancelled attaching ${canceledFile.name}` });
|
|
222
|
+
},
|
|
223
|
+
deleteFile: async (id) => {
|
|
224
|
+
const deletedFile = files.find(f => f.id === id);
|
|
225
|
+
await deleteFile(id);
|
|
226
|
+
pushToaster({ content: `${deletedFile.name} deleted` });
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
}), actions: [
|
|
230
|
+
{
|
|
231
|
+
id: 'addNewFile',
|
|
232
|
+
text: 'Add files',
|
|
233
|
+
onClick: () => {
|
|
234
|
+
setMode('addNew');
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
id: 'addNewLink',
|
|
239
|
+
text: 'Add links',
|
|
240
|
+
onClick: () => {
|
|
241
|
+
setMode('addNew');
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
], searchInputProps: { onSearchChange: value => setSearch(value) } }, void 0));
|
|
245
|
+
return (_jsx(Modal, { as: mode === 'addNew' ? 'form' : undefined, heading: mode === 'addNew' ? 'Add attachments' : 'Attachments', actions: actions, onRequestDismiss: () => {
|
|
246
|
+
return !editPopoverTargetLi;
|
|
247
|
+
}, onSubmit: mode === 'addNew'
|
|
248
|
+
? (e) => {
|
|
249
|
+
e.preventDefault();
|
|
250
|
+
}
|
|
251
|
+
: undefined, children: _jsxs(_Fragment, { children: [content, editPopoverTargetLi && (_jsx(EditPopover, { ref: editPopoverRef, target: menuButton, file: mode === 'addNew' ? newFiles[editFileIndex] : files[editFileIndex], onCancel: handlePopoverClose, onSubmit: ({ name, category }) => {
|
|
252
|
+
handlePopoverClose();
|
|
253
|
+
// TS kept from easily consolidating like:
|
|
254
|
+
// const setter = mode === 'addNew' ? setNewFiles : setFiles;
|
|
255
|
+
// Could not avoid map's file param as "any".
|
|
256
|
+
if (mode === 'addNew') {
|
|
257
|
+
setNewFiles(cur => {
|
|
258
|
+
return cur.map((file, i) => {
|
|
259
|
+
if (i === editFileIndex) {
|
|
260
|
+
return {
|
|
261
|
+
...file,
|
|
262
|
+
name,
|
|
263
|
+
category
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
return file;
|
|
267
|
+
});
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
else {
|
|
271
|
+
setFiles(cur => cur.map((file, i) => {
|
|
272
|
+
if (i === editFileIndex) {
|
|
273
|
+
return {
|
|
274
|
+
...file,
|
|
275
|
+
name,
|
|
276
|
+
category
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
return file;
|
|
280
|
+
}));
|
|
281
|
+
}
|
|
282
|
+
} }, void 0))] }, void 0) }, void 0));
|
|
283
|
+
};
|
|
284
|
+
// ---------------------------------------------------------------------------------------------------------------------
|
|
285
|
+
// Attachments mock
|
|
286
|
+
// ---------------------------------------------------------------------------------------------------------------------
|
|
287
|
+
export const AttachmentsMock = () => {
|
|
288
|
+
const { push: pushToaster } = useContext(ToasterContext);
|
|
289
|
+
const { create: createModal } = useContext(ModalManagerContext);
|
|
290
|
+
const [loading, setLoading] = useState(true);
|
|
291
|
+
const { files, setFiles, cancelFile, deleteFile } = useContext(FileServiceContext);
|
|
292
|
+
const listItemEls = useRef([]);
|
|
293
|
+
const [editFileIndex, setEditFileIndex] = useState(-1);
|
|
294
|
+
const editPopoverTargetLi = useMemo(() => {
|
|
295
|
+
return editFileIndex !== undefined ? listItemEls.current[editFileIndex] : undefined;
|
|
296
|
+
}, [editFileIndex, listItemEls]);
|
|
297
|
+
const menuButton = useMemo(() => editPopoverTargetLi
|
|
298
|
+
? editPopoverTargetLi.querySelector('button[aria-haspopup="menu"]')
|
|
299
|
+
: null, [editPopoverTargetLi]);
|
|
300
|
+
const handlePopoverClose = useCallback(() => {
|
|
301
|
+
if (!editPopoverTargetLi)
|
|
302
|
+
return;
|
|
303
|
+
setEditFileIndex(-1);
|
|
304
|
+
menuButton?.focus();
|
|
305
|
+
}, [menuButton, editPopoverTargetLi]);
|
|
306
|
+
const handleKeydown = useCallback((e) => {
|
|
307
|
+
if (e.key === 'Escape') {
|
|
308
|
+
setEditFileIndex(-1);
|
|
309
|
+
}
|
|
310
|
+
}, []);
|
|
311
|
+
const editPopoverRef = useRef(null);
|
|
312
|
+
// Using mousedown instead of click since drag selecting an input's value within the popover, then releasing outside the popover triggers outer click.
|
|
313
|
+
useOuterEvent('mousedown', [editPopoverRef], handlePopoverClose);
|
|
314
|
+
useEffect(() => {
|
|
315
|
+
mockAttachmentListRequest().then(attachments => {
|
|
316
|
+
setLoading(false);
|
|
317
|
+
setFiles(attachments);
|
|
318
|
+
});
|
|
319
|
+
}, []);
|
|
320
|
+
useEffect(() => {
|
|
321
|
+
if (!editPopoverTargetLi)
|
|
322
|
+
return;
|
|
323
|
+
document.addEventListener('keydown', handleKeydown);
|
|
324
|
+
return () => {
|
|
325
|
+
document.removeEventListener('keydown', handleKeydown);
|
|
326
|
+
};
|
|
327
|
+
}, [editPopoverTargetLi]);
|
|
328
|
+
return (_jsxs(_Fragment, { children: [_jsx(SummaryList, { icon: 'paper-clip', name: 'Attachments', loading: loading, count: !loading && Array.isArray(files) ? files.length : undefined, actions: [
|
|
329
|
+
{
|
|
330
|
+
text: 'Add attachments',
|
|
331
|
+
id: 'addNew',
|
|
332
|
+
icon: 'plus',
|
|
333
|
+
onClick() {
|
|
334
|
+
createModal(AttachmentsModal, { defaultMode: 'addNew' });
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
], items: files.slice(0, 3).map((file, i) => {
|
|
338
|
+
return getSummaryListItemProps({
|
|
339
|
+
ref: (el) => {
|
|
340
|
+
listItemEls.current[i] = el;
|
|
341
|
+
},
|
|
342
|
+
file,
|
|
343
|
+
editFile: () => {
|
|
344
|
+
setEditFileIndex(i);
|
|
345
|
+
},
|
|
346
|
+
cancelFile: id => {
|
|
347
|
+
const canceledFile = files.find(f => f.id === id);
|
|
348
|
+
cancelFile(id);
|
|
349
|
+
pushToaster({ content: `Cancelled attaching ${canceledFile.name}` });
|
|
350
|
+
},
|
|
351
|
+
deleteFile: async (id) => {
|
|
352
|
+
const deletedFile = files.find(f => f.id === id);
|
|
353
|
+
await deleteFile(id);
|
|
354
|
+
pushToaster({ content: `${deletedFile.name} deleted` });
|
|
355
|
+
}
|
|
356
|
+
});
|
|
357
|
+
}), onViewAll: () => {
|
|
358
|
+
createModal(AttachmentsModal, { defaultMode: 'viewAll' });
|
|
359
|
+
} }, void 0), editPopoverTargetLi && (_jsx(EditPopover, { ref: editPopoverRef, target: menuButton, file: files[editFileIndex], onCancel: handlePopoverClose, onSubmit: ({ name, category }) => {
|
|
360
|
+
handlePopoverClose();
|
|
361
|
+
setFiles(cur => cur.map((file, i) => {
|
|
362
|
+
if (i === editFileIndex) {
|
|
363
|
+
return {
|
|
364
|
+
...file,
|
|
365
|
+
name,
|
|
366
|
+
category
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
return file;
|
|
370
|
+
}));
|
|
371
|
+
} }, void 0))] }, void 0));
|
|
372
|
+
};
|
|
373
|
+
//# sourceMappingURL=Attachments.mocks.js.map
|