@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,192 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { action } from '@storybook/addon-actions';
|
|
4
|
+
import { Text, treeHelpers, TabbedPage as TabbedPageComp } from '@pega/cosmos-react-core';
|
|
5
|
+
import { AppShell } from '@pega/cosmos-react-build';
|
|
6
|
+
import { appExplorerMenuList, branchesMenuList, contents, recordMenuList, treeList } from './AppShell.mocks';
|
|
7
|
+
export default {
|
|
8
|
+
title: 'Build/AppShell',
|
|
9
|
+
component: AppShell,
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: 'fullscreen'
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
const getPath = (args) => {
|
|
15
|
+
const { showBreadcrumbs, pageContent: { data: { pageTitle, breadcrumbsPath } } } = args;
|
|
16
|
+
if (showBreadcrumbs) {
|
|
17
|
+
const path = pageTitle === 'Overview' ? 'Home' : breadcrumbsPath;
|
|
18
|
+
return path
|
|
19
|
+
? path.split(',').map((crumb, i) => {
|
|
20
|
+
// FIXME: https://stackoverflow.com/questions/63616486/property-replaceall-does-not-exist-on-type-string
|
|
21
|
+
return {
|
|
22
|
+
id: crumb,
|
|
23
|
+
primary: crumb,
|
|
24
|
+
href: i < 3 ? `#${crumb.replace(/\s/g, '-')}` : undefined
|
|
25
|
+
};
|
|
26
|
+
})
|
|
27
|
+
: [];
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
const TabbedPage = (args) => {
|
|
31
|
+
const [currentTabId, setCurrentTabId] = useState('1');
|
|
32
|
+
const [content, setContent] = useState('Tab 1 content');
|
|
33
|
+
const { pageContent, showBreadcrumbs } = args;
|
|
34
|
+
return (_jsx(TabbedPageComp, { a: _jsx(Text, { variant: 'h1', as: 'div', children: content }, void 0), path: getPath({ showBreadcrumbs, pageContent }), title: pageContent.data.pageTitle, tabs: {
|
|
35
|
+
tabs: pageContent.data.tabs.map((name, i) => {
|
|
36
|
+
const id = `${i + 1}`;
|
|
37
|
+
return { id, name };
|
|
38
|
+
}),
|
|
39
|
+
type: 'horizontal',
|
|
40
|
+
currentTabId,
|
|
41
|
+
onTabClick: id => {
|
|
42
|
+
setCurrentTabId(id);
|
|
43
|
+
setContent(`Tab ${id} content`);
|
|
44
|
+
}
|
|
45
|
+
} }, void 0));
|
|
46
|
+
};
|
|
47
|
+
export const AppShellDemo = (args) => {
|
|
48
|
+
const [currentNodeId, setCurrentNodeId] = useState('60');
|
|
49
|
+
const [allNodes, setAllNodes] = useState(treeHelpers.expandTo(appExplorerMenuList, currentNodeId));
|
|
50
|
+
const [currentDrawer, setCurrentDrawer] = useState('explorer');
|
|
51
|
+
const [currentUtil, setCurrentUtil] = useState('explorer');
|
|
52
|
+
const [pageContent, setPageContent] = useState(contents[0]);
|
|
53
|
+
const onNodeClick = (nodeId, activeDrawerId) => {
|
|
54
|
+
const clickedNode = treeHelpers.getNode(allNodes, nodeId);
|
|
55
|
+
if (!clickedNode?.nodes) {
|
|
56
|
+
setCurrentUtil(activeDrawerId);
|
|
57
|
+
setCurrentNodeId(nodeId);
|
|
58
|
+
setPageContent(contents.find(content => content.id === clickedNode?.id));
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
setAllNodes(tree => treeHelpers.mapNode(tree, nodeId, node => {
|
|
62
|
+
return {
|
|
63
|
+
...node,
|
|
64
|
+
expanded: !node.expanded
|
|
65
|
+
};
|
|
66
|
+
}));
|
|
67
|
+
};
|
|
68
|
+
const appHeader = {
|
|
69
|
+
brand: {
|
|
70
|
+
name: 'AppStudioX'
|
|
71
|
+
},
|
|
72
|
+
utils: {
|
|
73
|
+
avatar: { name: 'Alan' },
|
|
74
|
+
search: {
|
|
75
|
+
placeholder: 'Search anything, anywhere…'
|
|
76
|
+
},
|
|
77
|
+
branchName: 'test',
|
|
78
|
+
actions: [
|
|
79
|
+
{
|
|
80
|
+
primary: 'Switch branch',
|
|
81
|
+
id: 'switchbranch',
|
|
82
|
+
onClick: () => action('Clicked switchbranch')()
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
primary: 'Create branch',
|
|
86
|
+
id: 'createbranch',
|
|
87
|
+
onClick: () => action('Clicked createbranch')()
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
onPreviewClick: args.showPreview ? args.onPreviewClick : undefined
|
|
91
|
+
},
|
|
92
|
+
links: [
|
|
93
|
+
{
|
|
94
|
+
id: '1',
|
|
95
|
+
name: 'Applications',
|
|
96
|
+
onClick: () => action('Clicked Applications')()
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: '2',
|
|
100
|
+
name: 'Shared resources',
|
|
101
|
+
onClick: () => action('Clicked Shared resources')()
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
id: '3',
|
|
105
|
+
name: 'Teams',
|
|
106
|
+
onClick: () => action('Clicked Teams')()
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
id: '4',
|
|
110
|
+
name: 'AI & Analytics',
|
|
111
|
+
onClick: () => action('Clicked AI & Analytics')()
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
id: '5',
|
|
115
|
+
name: 'Deploy',
|
|
116
|
+
onClick: () => action('Clicked Deploy')()
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
};
|
|
120
|
+
return (_jsx(_Fragment, { children: _jsx(AppShell, { main: _jsx(TabbedPage, { ...{ ...args, pageContent } }, void 0), appHeader: appHeader, hideNav: args.hideNavigation, appInfo: {
|
|
121
|
+
text: 'U+ Desk',
|
|
122
|
+
visual: {
|
|
123
|
+
icon: {
|
|
124
|
+
name: 'phone-in-solid',
|
|
125
|
+
bgColor: '#0ac7c8'
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}, navigation: {
|
|
129
|
+
nodes: allNodes,
|
|
130
|
+
currentNodeId,
|
|
131
|
+
onNodeClick: id => {
|
|
132
|
+
onNodeClick(id, currentDrawer);
|
|
133
|
+
}
|
|
134
|
+
}, utils: {
|
|
135
|
+
onItemClick: id => {
|
|
136
|
+
setCurrentDrawer(id);
|
|
137
|
+
if (id === 'explorer') {
|
|
138
|
+
const appExploreTree = currentNodeId
|
|
139
|
+
? treeHelpers.expandTo(appExplorerMenuList, currentNodeId)
|
|
140
|
+
: appExplorerMenuList;
|
|
141
|
+
setAllNodes(appExploreTree);
|
|
142
|
+
}
|
|
143
|
+
if (id === 'branches') {
|
|
144
|
+
const branchTree = currentNodeId
|
|
145
|
+
? treeHelpers.expandTo(branchesMenuList, currentNodeId)
|
|
146
|
+
: branchesMenuList;
|
|
147
|
+
setAllNodes(branchTree);
|
|
148
|
+
}
|
|
149
|
+
if (id === 'records') {
|
|
150
|
+
const recordTree = currentNodeId
|
|
151
|
+
? treeHelpers.expandTo(recordMenuList, currentNodeId)
|
|
152
|
+
: recordMenuList;
|
|
153
|
+
setAllNodes(recordTree);
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
currentItemId: currentUtil,
|
|
157
|
+
items: [
|
|
158
|
+
{
|
|
159
|
+
label: 'App Explorer',
|
|
160
|
+
id: 'explorer'
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
label: 'Branches',
|
|
164
|
+
id: 'branches'
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
label: 'Records',
|
|
168
|
+
id: 'records'
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
drawer: {
|
|
172
|
+
onBeforeClose: () => {
|
|
173
|
+
setCurrentDrawer('');
|
|
174
|
+
setAllNodes(currentNodeId ? treeHelpers.expandTo(treeList, currentNodeId) : treeList);
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
devMode: true
|
|
178
|
+
} }, void 0) }, void 0));
|
|
179
|
+
};
|
|
180
|
+
AppShellDemo.args = {
|
|
181
|
+
hideNavigation: false,
|
|
182
|
+
showBreadcrumbs: true,
|
|
183
|
+
showPreview: true,
|
|
184
|
+
onPreviewClick: action('Clicked preview button')
|
|
185
|
+
};
|
|
186
|
+
AppShellDemo.argTypes = {
|
|
187
|
+
hideNavigation: { control: { type: 'boolean' } },
|
|
188
|
+
showBreadcrumbs: { control: { type: 'boolean' } },
|
|
189
|
+
showPreview: { control: { type: 'boolean' } },
|
|
190
|
+
onPreviewClick: { table: { disable: true } }
|
|
191
|
+
};
|
|
192
|
+
//# sourceMappingURL=AppShell.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppShell.stories.js","sourceRoot":"","sources":["../../../src/build/AppShell/AppShell.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAc,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,OAAO,EACL,IAAI,EAEJ,WAAW,EACX,UAAU,IAAI,cAAc,EAC7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,QAAQ,EACR,cAAc,EACd,QAAQ,EACT,MAAM,kBAAkB,CAAC;AAE1B,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,QAAQ;IACnB,UAAU,EAAE;QACV,MAAM,EAAE,YAAY;KACrB;CACM,CAAC;AAkBV,MAAM,OAAO,GAAG,CACd,IAAqF,EACrF,EAAE;IACF,MAAM,EACJ,eAAe,EACf,WAAW,EAAE,EACX,IAAI,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,EACrC,EACF,GAAG,IAAI,CAAC;IAET,IAAI,eAAe,EAAE;QACnB,MAAM,IAAI,GAAG,SAAS,KAAK,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC;QACjE,OAAO,IAAI;YACT,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,KAAa,EAAE,CAAC,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AC,UAAU,CAAC,CAAC;qBACzB;gBACH,CAAC;gBACD,aAAa,EAAE,WAAW;gBAC1B,KAAK,EAAE;oBACL;wBACE,KAAK,EAAE,cAAc;wBACrB,EAAE,EAAE,UAAU;qBACf;oBACD;wBACE,KAAK,EAAE,UAAU;wBACjB,EAAE,EAAE,UAAU;qBACf;oBACD;wBACE,KAAK,EAAE,SAAS;wBAChB,EAAE,EAAE,SAAS;qBACd;iBACF;gBACD,MAAM,EAAE;oBACN,aAAa,EAAE,GAAG,EAAE;wBAClB,gBAAgB,CAAC,EAAE,CAAC,CAAC;wBACrB,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;oBACxF,CAAC;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,WACD,WACD,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,YAAY,CAAC,IAAI,GAAG;IAClB,cAAc,EAAE,KAAK;IACrB,eAAe,EAAE,IAAI;IACrB,WAAW,EAAE,IAAI;IACjB,cAAc,EAAE,MAAM,CAAC,wBAAwB,CAAC;CACjD,CAAC;AAEF,YAAY,CAAC,QAAQ,GAAG;IACtB,cAAc,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAChD,eAAe,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IACjD,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC7C,cAAc,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;CAC7C,CAAC","sourcesContent":["import { useState, MouseEvent } from 'react';\nimport { Meta, Story } from '@storybook/react';\nimport { action } from '@storybook/addon-actions';\n\nimport {\n Text,\n StandardTreeProps,\n treeHelpers,\n TabbedPage as TabbedPageComp\n} from '@pega/cosmos-react-core';\nimport { AppShell } from '@pega/cosmos-react-build';\n\nimport {\n appExplorerMenuList,\n branchesMenuList,\n contents,\n recordMenuList,\n treeList\n} from './AppShell.mocks';\n\nexport default {\n title: 'Build/AppShell',\n component: AppShell,\n parameters: {\n layout: 'fullscreen'\n }\n} as Meta;\n\nexport interface AppShellStoryProps {\n hideNavigation: boolean;\n showBreadcrumbs: boolean;\n showPreview: boolean;\n onPreviewClick: (e: MouseEvent<HTMLButtonElement>) => void;\n}\n\ninterface PageContentProps {\n id: string;\n data: {\n pageTitle: string;\n breadcrumbsPath: string;\n tabs: string[];\n };\n}\n\nconst getPath = (\n args: Pick<AppShellStoryProps, 'showBreadcrumbs'> & { pageContent: PageContentProps }\n) => {\n const {\n showBreadcrumbs,\n pageContent: {\n data: { pageTitle, breadcrumbsPath }\n }\n } = args;\n\n if (showBreadcrumbs) {\n const path = pageTitle === 'Overview' ? 'Home' : breadcrumbsPath;\n return path\n ? path.split(',').map((crumb: string, i) => {\n // FIXME: https://stackoverflow.com/questions/63616486/property-replaceall-does-not-exist-on-type-string\n return {\n id: crumb,\n primary: crumb,\n href: i < 3 ? `#${(crumb as any).replace(/\\s/g, '-')}` : undefined\n };\n })\n : [];\n }\n};\n\nconst TabbedPage: Story<AppShellStoryProps & { pageContent: PageContentProps }> = (\n args: AppShellStoryProps & { pageContent: PageContentProps }\n) => {\n const [currentTabId, setCurrentTabId] = useState('1');\n const [content, setContent] = useState('Tab 1 content');\n const { pageContent, showBreadcrumbs } = args;\n\n return (\n <TabbedPageComp\n a={\n <Text variant='h1' as='div'>\n {content}\n </Text>\n }\n path={getPath({ showBreadcrumbs, pageContent })}\n title={pageContent.data.pageTitle}\n tabs={{\n tabs: pageContent.data.tabs.map((name, i) => {\n const id = `${i + 1}`;\n return { id, name };\n }),\n type: 'horizontal',\n currentTabId,\n onTabClick: id => {\n setCurrentTabId(id);\n setContent(`Tab ${id} content`);\n }\n }}\n />\n );\n};\n\nexport const AppShellDemo: Story<AppShellStoryProps> = (args: AppShellStoryProps) => {\n const [currentNodeId, setCurrentNodeId] = useState<string>('60');\n const [allNodes, setAllNodes] = useState<StandardTreeProps['nodes']>(\n treeHelpers.expandTo(appExplorerMenuList, currentNodeId)\n );\n const [currentDrawer, setCurrentDrawer] = useState('explorer');\n const [currentUtil, setCurrentUtil] = useState('explorer');\n const [pageContent, setPageContent] = useState<PageContentProps>(contents[0]);\n\n const onNodeClick = (nodeId: string, activeDrawerId: string) => {\n const clickedNode = treeHelpers.getNode(allNodes, nodeId);\n\n if (!clickedNode?.nodes) {\n setCurrentUtil(activeDrawerId);\n setCurrentNodeId(nodeId);\n setPageContent(contents.find(content => content.id === clickedNode?.id)!);\n return;\n }\n\n setAllNodes(tree =>\n treeHelpers.mapNode(tree, nodeId, node => {\n return {\n ...node,\n expanded: !node.expanded\n };\n })\n );\n };\n\n const appHeader = {\n brand: {\n name: 'AppStudioX'\n },\n utils: {\n avatar: { name: 'Alan' },\n search: {\n placeholder: 'Search anything, anywhere…'\n },\n branchName: 'test',\n actions: [\n {\n primary: 'Switch branch',\n id: 'switchbranch',\n onClick: () => action('Clicked switchbranch')()\n },\n {\n primary: 'Create branch',\n id: 'createbranch',\n onClick: () => action('Clicked createbranch')()\n }\n ],\n onPreviewClick: args.showPreview ? args.onPreviewClick : undefined\n },\n links: [\n {\n id: '1',\n name: 'Applications',\n onClick: () => action('Clicked Applications')()\n },\n {\n id: '2',\n name: 'Shared resources',\n onClick: () => action('Clicked Shared resources')()\n },\n {\n id: '3',\n name: 'Teams',\n onClick: () => action('Clicked Teams')()\n },\n {\n id: '4',\n name: 'AI & Analytics',\n onClick: () => action('Clicked AI & Analytics')()\n },\n {\n id: '5',\n name: 'Deploy',\n onClick: () => action('Clicked Deploy')()\n }\n ]\n };\n\n return (\n <>\n <AppShell\n main={<TabbedPage {...{ ...args, pageContent }} />}\n appHeader={appHeader}\n hideNav={args.hideNavigation}\n appInfo={{\n text: 'U+ Desk',\n visual: {\n icon: {\n name: 'phone-in-solid',\n bgColor: '#0ac7c8'\n }\n }\n }}\n navigation={{\n nodes: allNodes,\n currentNodeId,\n onNodeClick: id => {\n onNodeClick(id, currentDrawer);\n }\n }}\n utils={{\n onItemClick: id => {\n setCurrentDrawer(id);\n if (id === 'explorer') {\n const appExploreTree = currentNodeId\n ? treeHelpers.expandTo(appExplorerMenuList, currentNodeId)\n : appExplorerMenuList;\n setAllNodes(appExploreTree);\n }\n\n if (id === 'branches') {\n const branchTree = currentNodeId\n ? treeHelpers.expandTo(branchesMenuList, currentNodeId)\n : branchesMenuList;\n setAllNodes(branchTree);\n }\n\n if (id === 'records') {\n const recordTree = currentNodeId\n ? treeHelpers.expandTo(recordMenuList, currentNodeId)\n : recordMenuList;\n setAllNodes(recordTree);\n }\n },\n currentItemId: currentUtil,\n items: [\n {\n label: 'App Explorer',\n id: 'explorer'\n },\n {\n label: 'Branches',\n id: 'branches'\n },\n {\n label: 'Records',\n id: 'records'\n }\n ],\n drawer: {\n onBeforeClose: () => {\n setCurrentDrawer('');\n setAllNodes(currentNodeId ? treeHelpers.expandTo(treeList, currentNodeId) : treeList);\n }\n },\n devMode: true\n }}\n />\n </>\n );\n};\n\nAppShellDemo.args = {\n hideNavigation: false,\n showBreadcrumbs: true,\n showPreview: true,\n onPreviewClick: action('Clicked preview button')\n};\n\nAppShellDemo.argTypes = {\n hideNavigation: { control: { type: 'boolean' } },\n showBreadcrumbs: { control: { type: 'boolean' } },\n showPreview: { control: { type: 'boolean' } },\n onPreviewClick: { table: { disable: true } }\n};\n"]}
|
|
@@ -158,7 +158,7 @@ const graphData1 = {
|
|
|
158
158
|
const onGetNewNode = metaData => {
|
|
159
159
|
return {
|
|
160
160
|
...nodeDefaults,
|
|
161
|
-
id: `ph-n-${metaData.refId.join('_')}`
|
|
161
|
+
id: `ph-n-${metaData.refId.join('_')}` // ${createUID()}`
|
|
162
162
|
};
|
|
163
163
|
};
|
|
164
164
|
const onGetNewConnector = (fromNodeId, toNodeId, metaData) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddNodeUtils.mocks.js","sourceRoot":"","sources":["../../../src/build/FlowModeller/AddNodeUtils.mocks.ts"],"names":[],"mappings":"AAOA,MAAM,YAAY,GAAG;IACnB,QAAQ,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;IACxB,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;CACtC,CAAC;AAEF,MAAM,iBAAiB,GAAG;IACxB,MAAM,EAAE,EAAE;CACX,CAAC;AAEF,MAAM,UAAU,GAAyD;IACvE,KAAK,EAAE;QACL;YACE,GAAG,YAAY;YACf,EAAE,EAAE,KAAK;SACV;QACD;YACE,GAAG,YAAY;YACf,EAAE,EAAE,KAAK;SACV;QACD;YACE,GAAG,YAAY;YACf,EAAE,EAAE,KAAK;SACV;QACD;YACE,GAAG,YAAY;YACf,EAAE,EAAE,KAAK;SACV;QACD;YACE,GAAG,YAAY;YACf,EAAE,EAAE,KAAK;SACV;QACD;YACE,GAAG,YAAY;YACf,EAAE,EAAE,KAAK;SACV;QACD;YACE,GAAG,YAAY;YACf,EAAE,EAAE,KAAK;SACV;QACD;YACE,GAAG,YAAY;YACf,EAAE,EAAE,KAAK;SACV;QACD;YACE,GAAG,YAAY;YACf,EAAE,EAAE,KAAK;SACV;QACD;YACE,GAAG,YAAY;YACf,EAAE,EAAE,KAAK;SACV;QACD;YACE,GAAG,YAAY;YACf,EAAE,EAAE,KAAK;SACV;QACD;YACE,GAAG,YAAY;YACf,EAAE,EAAE,KAAK;SACV;KACF;IACD,UAAU,EAAE;QACV;YACE,GAAG,iBAAiB;YACpB,EAAE,EAAE,SAAS;YACb,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;QACD;YACE,GAAG,iBAAiB;YACpB,EAAE,EAAE,SAAS;YACb,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB;QACD;YAC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AAc,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;SACvC;QACD;YACE,MAAM,EAAE,EAAE;YACV,EAAE,EAAE,sCAAsC;YAC1C,UAAU,EAAE,sCAAsC;YAClD,QAAQ,EAAE,sDAAsD;YAChE,cAAc,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;SAC7D;QACD;YACE,MAAM,EAAE,EAAE;YACV,EAAE,EAAE,sBAAsB;YAC1B,UAAU,EAAE,sBAAsB;YAClC,QAAQ,EAAE,sDAAsD;YAChE,cAAc,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;SACvC;QACD;YACE,MAAM,EAAE,EAAE;YACV,EAAE,EAAE,sDAAsD;YAC1D,UAAU,EAAE,sDAAsD;YAClE,QAAQ,EAAE,KAAK;YACf,cAAc,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;SACnF;KACF;CACF,CAAC;AAEF,MAAM,iBAAiB,GAAG;IACxB,UAAU;IACV,YAAY;IACZ,iBAAiB;IACjB,MAAM;CACP,CAAC;AAEF,eAAe,iBAAiB,CAAC","sourcesContent":["import {\n AddNodeHandlerParams,\n RendererConnectorProps,\n RendererNodeProps,\n GraphData\n} from '@pega/cosmos-react-build';\n\nconst nodeDefaults = {\n position: { x: 0, y: 0 },\n dimensions: { width: 20, height: 20 }\n};\n\nconst connectorDefaults = {\n points: []\n};\n\nconst graphData1: GraphData<RendererNodeProps, RendererConnectorProps> = {\n nodes: [\n {\n ...nodeDefaults,\n id: '100'\n },\n {\n ...nodeDefaults,\n id: '101'\n },\n {\n ...nodeDefaults,\n id: '102'\n },\n {\n ...nodeDefaults,\n id: '103'\n },\n {\n ...nodeDefaults,\n id: '104'\n },\n {\n ...nodeDefaults,\n id: '105'\n },\n {\n ...nodeDefaults,\n id: '106'\n },\n {\n ...nodeDefaults,\n id: '107'\n },\n {\n ...nodeDefaults,\n id: '108'\n },\n {\n ...nodeDefaults,\n id: '109'\n },\n {\n ...nodeDefaults,\n id: '110'\n },\n {\n ...nodeDefaults,\n id: '111'\n }\n ],\n connectors: [\n {\n ...connectorDefaults,\n id: '100-101',\n fromNodeId: '100',\n toNodeId: '101'\n },\n {\n ...connectorDefaults,\n id: '101-102',\n fromNodeId: '101',\n toNodeId: '102'\n },\n {\n ...connectorDefaults,\n id: '101-103',\n fromNodeId: '101',\n toNodeId: '103'\n },\n {\n ...connectorDefaults,\n id: '102-104',\n fromNodeId: '102',\n toNodeId: '104'\n },\n {\n ...connectorDefaults,\n id: '102-105',\n fromNodeId: '102',\n toNodeId: '105'\n },\n {\n ...connectorDefaults,\n id: '102-106',\n fromNodeId: '102',\n toNodeId: '106'\n },\n {\n ...connectorDefaults,\n id: '103-107',\n fromNodeId: '103',\n toNodeId: '107'\n },\n {\n ...connectorDefaults,\n id: '103-108',\n fromNodeId: '103',\n toNodeId: '108'\n },\n {\n ...connectorDefaults,\n id: '104-109',\n fromNodeId: '104',\n toNodeId: '109'\n },\n {\n ...connectorDefaults,\n id: '104-110',\n fromNodeId: '104',\n toNodeId: '110'\n },\n {\n ...connectorDefaults,\n id: '105-111',\n fromNodeId: '105',\n toNodeId: '111'\n },\n {\n ...connectorDefaults,\n id: '106-111',\n fromNodeId: '106',\n toNodeId: '111'\n },\n {\n ...connectorDefaults,\n id: '107-111',\n fromNodeId: '107',\n toNodeId: '111'\n },\n {\n ...connectorDefaults,\n id: '108-111',\n fromNodeId: '108',\n toNodeId: '111'\n },\n {\n ...connectorDefaults,\n id: '109-111',\n fromNodeId: '109',\n toNodeId: '111'\n },\n {\n ...connectorDefaults,\n id: '110-111',\n fromNodeId: '110',\n toNodeId: '111'\n }\n ]\n};\n\nconst onGetNewNode: (metaData: AddNodeHandlerParams) => RendererNodeProps = metaData => {\n return {\n ...nodeDefaults,\n id: `ph-n-${(metaData.refId as string[]).join('_')}` // ${createUID()}`\n };\n};\n\nconst onGetNewConnector: (\n fromNodeId: string,\n toNodeId: string,\n metaData: AddNodeHandlerParams\n) => RendererConnectorProps = (fromNodeId, toNodeId, metaData) => {\n return {\n ...connectorDefaults,\n id: `ph-c-${(metaData.refId as string[]).join('_')}`, // ${createUID()}`\n fromNodeId,\n toNodeId\n };\n};\n\nconst result = {\n nodes: [\n { ...nodeDefaults, id: '100' },\n { ...nodeDefaults, id: '101' },\n { ...nodeDefaults, id: '102' },\n { ...nodeDefaults, id: '103' },\n { ...nodeDefaults, id: '104' },\n { ...nodeDefaults, id: '105' },\n { ...nodeDefaults, id: '106' },\n { ...nodeDefaults, id: '107' },\n { ...nodeDefaults, id: '108' },\n { ...nodeDefaults, id: '109' },\n { ...nodeDefaults, id: '110' },\n { ...nodeDefaults, id: '111' },\n {\n ...nodeDefaults,\n id: 'ph-n-109-111_110-111',\n realConnectors: ['109-111', '110-111']\n },\n {\n ...nodeDefaults,\n id: 'ph-n-109-111_110-111_105-111_106-111',\n realConnectors: ['109-111', '110-111', '105-111', '106-111']\n },\n {\n ...nodeDefaults,\n id: 'ph-n-107-111_108-111',\n realConnectors: ['107-111', '108-111']\n },\n {\n ...nodeDefaults,\n id: 'ph-n-109-111_110-111_105-111_106-111_107-111_108-111',\n realConnectors: ['109-111', '110-111', '105-111', '106-111', '107-111', '108-111']\n }\n ],\n connectors: [\n { points: [], id: '100-101', fromNodeId: '100', toNodeId: '101' },\n { points: [], id: '101-102', fromNodeId: '101', toNodeId: '102' },\n { points: [], id: '101-103', fromNodeId: '101', toNodeId: '103' },\n { points: [], id: '102-104', fromNodeId: '102', toNodeId: '104' },\n { points: [], id: '102-105', fromNodeId: '102', toNodeId: '105' },\n { points: [], id: '102-106', fromNodeId: '102', toNodeId: '106' },\n { points: [], id: '103-107', fromNodeId: '103', toNodeId: '107' },\n { points: [], id: '103-108', fromNodeId: '103', toNodeId: '108' },\n { points: [], id: '104-109', fromNodeId: '104', toNodeId: '109' },\n { points: [], id: '104-110', fromNodeId: '104', toNodeId: '110' },\n {\n points: [],\n id: '105-111',\n fromNodeId: '105',\n toNodeId: 'ph-n-109-111_110-111_105-111_106-111'\n },\n {\n points: [],\n id: '106-111',\n fromNodeId: '106',\n toNodeId: 'ph-n-109-111_110-111_105-111_106-111'\n },\n {\n points: [],\n id: '107-111',\n fromNodeId: '107',\n toNodeId: 'ph-n-107-111_108-111'\n },\n {\n points: [],\n id: '108-111',\n fromNodeId: '108',\n toNodeId: 'ph-n-107-111_108-111'\n },\n {\n points: [],\n id: '109-111',\n fromNodeId: '109',\n toNodeId: 'ph-n-109-111_110-111'\n },\n {\n points: [],\n id: '110-111',\n fromNodeId: '110',\n toNodeId: 'ph-n-109-111_110-111'\n },\n {\n points: [],\n id: 'ph-c-109-111_110-111',\n fromNodeId: 'ph-n-109-111_110-111',\n toNodeId: 'ph-n-109-111_110-111_105-111_106-111',\n realConnectors: ['109-111', '110-111']\n },\n {\n points: [],\n id: 'ph-c-109-111_110-111_105-111_106-111',\n fromNodeId: 'ph-n-109-111_110-111_105-111_106-111',\n toNodeId: 'ph-n-109-111_110-111_105-111_106-111_107-111_108-111',\n realConnectors: ['109-111', '110-111', '105-111', '106-111']\n },\n {\n points: [],\n id: 'ph-c-107-111_108-111',\n fromNodeId: 'ph-n-107-111_108-111',\n toNodeId: 'ph-n-109-111_110-111_105-111_106-111_107-111_108-111',\n realConnectors: ['107-111', '108-111']\n },\n {\n points: [],\n id: 'ph-c-109-111_110-111_105-111_106-111_107-111_108-111',\n fromNodeId: 'ph-n-109-111_110-111_105-111_106-111_107-111_108-111',\n toNodeId: '111',\n realConnectors: ['109-111', '110-111', '105-111', '106-111', '107-111', '108-111']\n }\n ]\n};\n\nconst AddNodeUtilsMocks = {\n graphData1,\n onGetNewNode,\n onGetNewConnector,\n result\n};\n\nexport default AddNodeUtilsMocks;\n"]}
|
|
1
|
+
{"version":3,"file":"AddNodeUtils.mocks.js","sourceRoot":"","sources":["../../../src/build/FlowModeller/AddNodeUtils.mocks.ts"],"names":[],"mappings":"AAOA,MAAM,Y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sCAAsC;YAClD,QAAQ,EAAE,sDAAsD;YAChE,cAAc,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;SAC7D;QACD;YACE,MAAM,EAAE,EAAE;YACV,EAAE,EAAE,sBAAsB;YAC1B,UAAU,EAAE,sBAAsB;YAClC,QAAQ,EAAE,sDAAsD;YAChE,cAAc,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;SACvC;QACD;YACE,MAAM,EAAE,EAAE;YACV,EAAE,EAAE,sDAAsD;YAC1D,UAAU,EAAE,sDAAsD;YAClE,QAAQ,EAAE,KAAK;YACf,cAAc,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;SACnF;KACF;CACF,CAAC;AAEF,MAAM,iBAAiB,GAAG;IACxB,UAAU;IACV,YAAY;IACZ,iBAAiB;IACjB,MAAM;CACP,CAAC;AAEF,eAAe,iBAAiB,CAAC","sourcesContent":["import {\n AddNodeHandlerParams,\n RendererConnectorProps,\n RendererNodeProps,\n GraphData\n} from '@pega/cosmos-react-build';\n\nconst nodeDefaults = {\n position: { x: 0, y: 0 },\n dimensions: { width: 20, height: 20 }\n};\n\nconst connectorDefaults = {\n points: []\n};\n\nconst graphData1: GraphData<RendererNodeProps, RendererConnectorProps> = {\n nodes: [\n {\n ...nodeDefaults,\n id: '100'\n },\n {\n ...nodeDefaults,\n id: '101'\n },\n {\n ...nodeDefaults,\n id: '102'\n },\n {\n ...nodeDefaults,\n id: '103'\n },\n {\n ...nodeDefaults,\n id: '104'\n },\n {\n ...nodeDefaults,\n id: '105'\n },\n {\n ...nodeDefaults,\n id: '106'\n },\n {\n ...nodeDefaults,\n id: '107'\n },\n {\n ...nodeDefaults,\n id: '108'\n },\n {\n ...nodeDefaults,\n id: '109'\n },\n {\n ...nodeDefaults,\n id: '110'\n },\n {\n ...nodeDefaults,\n id: '111'\n }\n ],\n connectors: [\n {\n ...connectorDefaults,\n id: '100-101',\n fromNodeId: '100',\n toNodeId: '101'\n },\n {\n ...connectorDefaults,\n id: '101-102',\n fromNodeId: '101',\n toNodeId: '102'\n },\n {\n ...connectorDefaults,\n id: '101-103',\n fromNodeId: '101',\n toNodeId: '103'\n },\n {\n ...connectorDefaults,\n id: '102-104',\n fromNodeId: '102',\n toNodeId: '104'\n },\n {\n ...connectorDefaults,\n id: '102-105',\n fromNodeId: '102',\n toNodeId: '105'\n },\n {\n ...connectorDefaults,\n id: '102-106',\n fromNodeId: '102',\n toNodeId: '106'\n },\n {\n ...connectorDefaults,\n id: '103-107',\n fromNodeId: '103',\n toNodeId: '107'\n },\n {\n ...connectorDefaults,\n id: '103-108',\n fromNodeId: '103',\n toNodeId: '108'\n },\n {\n ...connectorDefaults,\n id: '104-109',\n fromNodeId: '104',\n toNodeId: '109'\n },\n {\n ...connectorDefaults,\n id: '104-110',\n fromNodeId: '104',\n toNodeId: '110'\n },\n {\n ...connectorDefaults,\n id: '105-111',\n fromNodeId: '105',\n toNodeId: '111'\n },\n {\n ...connectorDefaults,\n id: '106-111',\n fromNodeId: '106',\n toNodeId: '111'\n },\n {\n ...connectorDefaults,\n id: '107-111',\n fromNodeId: '107',\n toNodeId: '111'\n },\n {\n ...connectorDefaults,\n id: '108-111',\n fromNodeId: '108',\n toNodeId: '111'\n },\n {\n ...connectorDefaults,\n id: '109-111',\n fromNodeId: '109',\n toNodeId: '111'\n },\n {\n ...connectorDefaults,\n id: '110-111',\n fromNodeId: '110',\n toNodeId: '111'\n }\n ]\n};\n\nconst onGetNewNode: (metaData: AddNodeHandlerParams) => RendererNodeProps = metaData => {\n return {\n ...nodeDefaults,\n id: `ph-n-${(metaData.refId as string[]).join('_')}` // ${createUID()}`\n };\n};\n\nconst onGetNewConnector: (\n fromNodeId: string,\n toNodeId: string,\n metaData: AddNodeHandlerParams\n) => RendererConnectorProps = (fromNodeId, toNodeId, metaData) => {\n return {\n ...connectorDefaults,\n id: `ph-c-${(metaData.refId as string[]).join('_')}`, // ${createUID()}`\n fromNodeId,\n toNodeId\n };\n};\n\nconst result = {\n nodes: [\n { ...nodeDefaults, id: '100' },\n { ...nodeDefaults, id: '101' },\n { ...nodeDefaults, id: '102' },\n { ...nodeDefaults, id: '103' },\n { ...nodeDefaults, id: '104' },\n { ...nodeDefaults, id: '105' },\n { ...nodeDefaults, id: '106' },\n { ...nodeDefaults, id: '107' },\n { ...nodeDefaults, id: '108' },\n { ...nodeDefaults, id: '109' },\n { ...nodeDefaults, id: '110' },\n { ...nodeDefaults, id: '111' },\n {\n ...nodeDefaults,\n id: 'ph-n-109-111_110-111',\n realConnectors: ['109-111', '110-111']\n },\n {\n ...nodeDefaults,\n id: 'ph-n-109-111_110-111_105-111_106-111',\n realConnectors: ['109-111', '110-111', '105-111', '106-111']\n },\n {\n ...nodeDefaults,\n id: 'ph-n-107-111_108-111',\n realConnectors: ['107-111', '108-111']\n },\n {\n ...nodeDefaults,\n id: 'ph-n-109-111_110-111_105-111_106-111_107-111_108-111',\n realConnectors: ['109-111', '110-111', '105-111', '106-111', '107-111', '108-111']\n }\n ],\n connectors: [\n { points: [], id: '100-101', fromNodeId: '100', toNodeId: '101' },\n { points: [], id: '101-102', fromNodeId: '101', toNodeId: '102' },\n { points: [], id: '101-103', fromNodeId: '101', toNodeId: '103' },\n { points: [], id: '102-104', fromNodeId: '102', toNodeId: '104' },\n { points: [], id: '102-105', fromNodeId: '102', toNodeId: '105' },\n { points: [], id: '102-106', fromNodeId: '102', toNodeId: '106' },\n { points: [], id: '103-107', fromNodeId: '103', toNodeId: '107' },\n { points: [], id: '103-108', fromNodeId: '103', toNodeId: '108' },\n { points: [], id: '104-109', fromNodeId: '104', toNodeId: '109' },\n { points: [], id: '104-110', fromNodeId: '104', toNodeId: '110' },\n {\n points: [],\n id: '105-111',\n fromNodeId: '105',\n toNodeId: 'ph-n-109-111_110-111_105-111_106-111'\n },\n {\n points: [],\n id: '106-111',\n fromNodeId: '106',\n toNodeId: 'ph-n-109-111_110-111_105-111_106-111'\n },\n {\n points: [],\n id: '107-111',\n fromNodeId: '107',\n toNodeId: 'ph-n-107-111_108-111'\n },\n {\n points: [],\n id: '108-111',\n fromNodeId: '108',\n toNodeId: 'ph-n-107-111_108-111'\n },\n {\n points: [],\n id: '109-111',\n fromNodeId: '109',\n toNodeId: 'ph-n-109-111_110-111'\n },\n {\n points: [],\n id: '110-111',\n fromNodeId: '110',\n toNodeId: 'ph-n-109-111_110-111'\n },\n {\n points: [],\n id: 'ph-c-109-111_110-111',\n fromNodeId: 'ph-n-109-111_110-111',\n toNodeId: 'ph-n-109-111_110-111_105-111_106-111',\n realConnectors: ['109-111', '110-111']\n },\n {\n points: [],\n id: 'ph-c-109-111_110-111_105-111_106-111',\n fromNodeId: 'ph-n-109-111_110-111_105-111_106-111',\n toNodeId: 'ph-n-109-111_110-111_105-111_106-111_107-111_108-111',\n realConnectors: ['109-111', '110-111', '105-111', '106-111']\n },\n {\n points: [],\n id: 'ph-c-107-111_108-111',\n fromNodeId: 'ph-n-107-111_108-111',\n toNodeId: 'ph-n-109-111_110-111_105-111_106-111_107-111_108-111',\n realConnectors: ['107-111', '108-111']\n },\n {\n points: [],\n id: 'ph-c-109-111_110-111_105-111_106-111_107-111_108-111',\n fromNodeId: 'ph-n-109-111_110-111_105-111_106-111_107-111_108-111',\n toNodeId: '111',\n realConnectors: ['109-111', '110-111', '105-111', '106-111', '107-111', '108-111']\n }\n ]\n};\n\nconst AddNodeUtilsMocks = {\n graphData1,\n onGetNewNode,\n onGetNewConnector,\n result\n};\n\nexport default AddNodeUtilsMocks;\n"]}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useContext, useState, useEffect } from 'react';
|
|
3
|
+
import { action } from '@storybook/addon-actions';
|
|
4
|
+
import styled, { css } from 'styled-components';
|
|
5
|
+
import { ModalManagerContext, Modal, Input, Table, Text, Button, Icon, Flex } from '@pega/cosmos-react-core';
|
|
6
|
+
import { FlowModeller, DirectedGraph, FlowModellerHelper } from '@pega/cosmos-react-build';
|
|
7
|
+
import { nodeLibrary, nodeActions, exampleCRMNodesData, exampleCRMConnectorsData, emptyNodesData, emptyConnectorsData } from './FlowModeller.mocks';
|
|
8
|
+
export default {
|
|
9
|
+
title: 'Build/FlowModeller',
|
|
10
|
+
component: FlowModeller,
|
|
11
|
+
parameters: {
|
|
12
|
+
layout: 'fullscreen'
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
const StyledWrapper = styled.div(() => {
|
|
16
|
+
return css `
|
|
17
|
+
height: 100vh;
|
|
18
|
+
overflow: auto;
|
|
19
|
+
`;
|
|
20
|
+
});
|
|
21
|
+
const DELETE_ACTION_ID = 'action-1';
|
|
22
|
+
const DecisionTable = ({ updatedData, connectors, onDeleteRow, onAddRow, node, update }) => {
|
|
23
|
+
const [tableData, setTableData] = useState(connectors);
|
|
24
|
+
const message = 'Please delete the nodes in the connector manually and delete this connector again';
|
|
25
|
+
const { create } = useContext(ModalManagerContext);
|
|
26
|
+
const onAddCondition = () => {
|
|
27
|
+
const label = 'otherwise';
|
|
28
|
+
const updatedGraphData = FlowModellerHelper.addBranch(updatedData, node.id, label);
|
|
29
|
+
const graph = new DirectedGraph(updatedGraphData);
|
|
30
|
+
const outConnectors = graph.getOutConnectors(node.id);
|
|
31
|
+
update({
|
|
32
|
+
node,
|
|
33
|
+
connectors: outConnectors,
|
|
34
|
+
updatedData: updatedGraphData
|
|
35
|
+
});
|
|
36
|
+
onAddRow(updatedGraphData);
|
|
37
|
+
};
|
|
38
|
+
const onDeleteCondition = (connector) => {
|
|
39
|
+
const updatedGraphData = FlowModellerHelper.deleteConnector(updatedData, connector);
|
|
40
|
+
if (updatedGraphData) {
|
|
41
|
+
const updatedGraph = new DirectedGraph(updatedGraphData);
|
|
42
|
+
const updatedOutConnectors = updatedGraph.getOutConnectors(node.id);
|
|
43
|
+
update({
|
|
44
|
+
node,
|
|
45
|
+
connectors: updatedOutConnectors,
|
|
46
|
+
updatedData: updatedGraphData
|
|
47
|
+
});
|
|
48
|
+
onDeleteRow(updatedGraphData);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
create(() => {
|
|
52
|
+
return (_jsx(Modal, { heading: 'Confirm', children: _jsx(Text, { children: message }, void 0) }, void 0));
|
|
53
|
+
}, { center: true });
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
const columns = [
|
|
57
|
+
{
|
|
58
|
+
renderer: connector => _jsx(Input, { value: connector.label, readOnly: true }, void 0),
|
|
59
|
+
label: 'Outcome'
|
|
60
|
+
},
|
|
61
|
+
{ renderer: () => _jsx(Text, { children: "No value" }, void 0), label: 'Decision output' },
|
|
62
|
+
{
|
|
63
|
+
renderer: connector => {
|
|
64
|
+
return (_jsx(_Fragment, { children: _jsx(Button, { variant: 'simple', label: 'Delete', disabled: tableData.length < 3, icon: true, onClick: () => {
|
|
65
|
+
onDeleteCondition(connector);
|
|
66
|
+
}, children: _jsx(Icon, { name: 'trash' }, void 0) }, void 0) }, void 0));
|
|
67
|
+
},
|
|
68
|
+
label: 'Action'
|
|
69
|
+
}
|
|
70
|
+
];
|
|
71
|
+
useEffect(() => {
|
|
72
|
+
setTableData(connectors);
|
|
73
|
+
}, [connectors]);
|
|
74
|
+
return (_jsxs(_Fragment, { children: [_jsx(Table, { title: 'Decision outcomes', hoverHighlight: true, data: tableData, columns: columns }, void 0), _jsx(Flex, { container: { pad: [1, 0] }, children: _jsx(Button, { variant: 'simple', onClick: onAddCondition, children: "Add Condition" }, void 0) }, void 0)] }, void 0));
|
|
75
|
+
};
|
|
76
|
+
export const EmptyFlowChartView = () => {
|
|
77
|
+
const [graphData, setGraphData] = useState({
|
|
78
|
+
nodes: emptyNodesData,
|
|
79
|
+
connectors: emptyConnectorsData
|
|
80
|
+
});
|
|
81
|
+
const { create } = useContext(ModalManagerContext);
|
|
82
|
+
const onTableActionClick = (updatedData) => {
|
|
83
|
+
setGraphData(updatedData);
|
|
84
|
+
};
|
|
85
|
+
const LaunchPropertyModal = ({ node, connectors, updatedData }) => {
|
|
86
|
+
const { ModalContext } = useContext(ModalManagerContext);
|
|
87
|
+
const { update } = useContext(ModalContext);
|
|
88
|
+
return (_jsxs(Modal, { heading: node.label, children: [_jsx(Input, { label: 'Description', defaultValue: node.description }, void 0), connectors.length > 1 && (_jsx(DecisionTable, { updatedData: updatedData, connectors: connectors, onDeleteRow: (data) => {
|
|
89
|
+
onTableActionClick(data);
|
|
90
|
+
}, node: node, onAddRow: (data) => {
|
|
91
|
+
onTableActionClick(data);
|
|
92
|
+
}, update: update }, void 0))] }, void 0));
|
|
93
|
+
};
|
|
94
|
+
const onNodeActionClick = (params) => {
|
|
95
|
+
if (params.actionId === DELETE_ACTION_ID) {
|
|
96
|
+
const modifiedGraph = FlowModellerHelper.deleteNode(graphData, params.nodeId);
|
|
97
|
+
if (modifiedGraph) {
|
|
98
|
+
setGraphData(modifiedGraph);
|
|
99
|
+
}
|
|
100
|
+
else if (!modifiedGraph) {
|
|
101
|
+
// eslint-disable-next-line no-alert
|
|
102
|
+
alert('Deletion of this node is not supported ');
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
else if (params.actionId === 'action-2') {
|
|
106
|
+
action(`ressigned ${params.nodeId}`)();
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
// eslint-disable-next-line no-console
|
|
110
|
+
console.warn(`Unknown action ${params.actionId}`);
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
const addNode = (nodeType, metaData) => {
|
|
114
|
+
const UpdatedData = FlowModellerHelper.addNode({
|
|
115
|
+
nodeType,
|
|
116
|
+
graphData,
|
|
117
|
+
metaData
|
|
118
|
+
});
|
|
119
|
+
if (UpdatedData) {
|
|
120
|
+
const newGraphData = UpdatedData;
|
|
121
|
+
setGraphData(newGraphData);
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
const selectNode = (nodeId) => {
|
|
125
|
+
const graph = new DirectedGraph(graphData);
|
|
126
|
+
const node = graph.getNode(nodeId);
|
|
127
|
+
const outConnectors = graph.getOutConnectors(nodeId);
|
|
128
|
+
// LaunchPropertyModal(node, outConnectors, graphData);
|
|
129
|
+
create(LaunchPropertyModal, {
|
|
130
|
+
node,
|
|
131
|
+
connectors: outConnectors,
|
|
132
|
+
updatedData: graphData
|
|
133
|
+
});
|
|
134
|
+
};
|
|
135
|
+
return (_jsx(StyledWrapper, { children: _jsx(FlowModeller, { graphData: graphData, nodeLibrary: nodeLibrary, onNodeAdd: addNode, onNodeClick: selectNode, actions: nodeActions, onNodeActionClick: onNodeActionClick }, void 0) }, void 0));
|
|
136
|
+
};
|
|
137
|
+
export const CRMFlowChartView = () => {
|
|
138
|
+
const [graphData, setGraphData] = useState({
|
|
139
|
+
nodes: exampleCRMNodesData,
|
|
140
|
+
connectors: exampleCRMConnectorsData
|
|
141
|
+
});
|
|
142
|
+
const { create } = useContext(ModalManagerContext);
|
|
143
|
+
const onTableActionClick = (updatedData) => {
|
|
144
|
+
setGraphData(updatedData);
|
|
145
|
+
};
|
|
146
|
+
const LaunchPropertyModal = ({ node, connectors, updatedData }) => {
|
|
147
|
+
const { ModalContext } = useContext(ModalManagerContext);
|
|
148
|
+
const { update } = useContext(ModalContext);
|
|
149
|
+
return (_jsxs(Modal, { heading: node.label, children: [_jsx(Input, { label: 'Description', defaultValue: node.description }, void 0), connectors.length > 1 && (_jsx(DecisionTable, { updatedData: updatedData, connectors: connectors, onDeleteRow: (data) => {
|
|
150
|
+
onTableActionClick(data);
|
|
151
|
+
}, node: node, onAddRow: (data) => {
|
|
152
|
+
onTableActionClick(data);
|
|
153
|
+
}, update: update }, void 0))] }, void 0));
|
|
154
|
+
};
|
|
155
|
+
const onNodeActionClick = (params) => {
|
|
156
|
+
if (params.actionId === DELETE_ACTION_ID) {
|
|
157
|
+
const modifiedGraph = FlowModellerHelper.deleteNode(graphData, params.nodeId);
|
|
158
|
+
if (modifiedGraph) {
|
|
159
|
+
setGraphData(modifiedGraph);
|
|
160
|
+
}
|
|
161
|
+
else if (!modifiedGraph) {
|
|
162
|
+
// eslint-disable-next-line no-alert
|
|
163
|
+
alert('Deletion of this node is not supported ');
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
else if (params.actionId === 'action-2') {
|
|
167
|
+
action(`ressigned ${params.nodeId}`)();
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
// eslint-disable-next-line no-console
|
|
171
|
+
console.warn(`Unknown action ${params.actionId}`);
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
const addNode = (nodeType, metaData) => {
|
|
175
|
+
const UpdatedData = FlowModellerHelper.addNode({
|
|
176
|
+
nodeType,
|
|
177
|
+
graphData,
|
|
178
|
+
metaData
|
|
179
|
+
});
|
|
180
|
+
if (UpdatedData) {
|
|
181
|
+
const newGraphData = UpdatedData;
|
|
182
|
+
setGraphData(newGraphData);
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
const selectNode = (nodeId) => {
|
|
186
|
+
const graph = new DirectedGraph(graphData);
|
|
187
|
+
const node = graph.getNode(nodeId);
|
|
188
|
+
const outConnectors = graph.getOutConnectors(nodeId);
|
|
189
|
+
create(LaunchPropertyModal, {
|
|
190
|
+
node,
|
|
191
|
+
connectors: outConnectors,
|
|
192
|
+
updatedData: graphData
|
|
193
|
+
});
|
|
194
|
+
};
|
|
195
|
+
return (_jsx(StyledWrapper, { children: _jsx(FlowModeller, { graphData: graphData, nodeLibrary: nodeLibrary, onNodeAdd: addNode, onNodeClick: selectNode, actions: nodeActions, onNodeActionClick: onNodeActionClick }, void 0) }, void 0));
|
|
196
|
+
};
|
|
197
|
+
//# sourceMappingURL=FlowModeller.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlowModeller.stories.js","sourceRoot":"","sources":["../../../src/build/FlowModeller/FlowModeller.stories.tsx"],"names":[],"mappings":";A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,CAAC,CAAC","sourcesContent":["import { useContext, useState, useEffect } from 'react';\nimport { action } from '@storybook/addon-actions';\nimport styled, { css } from 'styled-components';\n\nimport {\n ModalManagerContext,\n Modal,\n Input,\n Table,\n ColumnProps,\n Text,\n Button,\n Icon,\n Flex,\n ModalMethods\n} from '@pega/cosmos-react-core';\nimport {\n FlowModeller,\n ActionParams,\n NodeProps,\n NodeType,\n DirectedGraph,\n GraphData,\n ConnectorProps,\n FlowModellerHelper,\n AddNodeHandlerParams\n} from '@pega/cosmos-react-build';\n\nimport {\n nodeLibrary,\n nodeActions,\n exampleCRMNodesData,\n exampleCRMConnectorsData,\n emptyNodesData,\n emptyConnectorsData\n} from './FlowModeller.mocks';\n\nexport default {\n title: 'Build/FlowModeller',\n component: FlowModeller,\n parameters: {\n layout: 'fullscreen'\n }\n};\n\nconst StyledWrapper = styled.div(() => {\n return css`\n height: 100vh;\n overflow: auto;\n `;\n});\n\ninterface NodeDataType {\n nodes: NodeProps[];\n connectors: ConnectorProps[];\n}\n\nconst DELETE_ACTION_ID = 'action-1';\n\ninterface ModalProps {\n updatedData: NodeDataType;\n connectors: ConnectorProps[];\n node: NodeProps;\n}\n\ninterface DecisionTableProps extends ModalProps {\n onDeleteRow: (data: NodeDataType) => void;\n onAddRow: (data: NodeDataType) => void;\n update: ModalMethods['update'];\n}\nconst DecisionTable = ({\n updatedData,\n connectors,\n onDeleteRow,\n onAddRow,\n node,\n update\n}: DecisionTableProps) => {\n const [tableData, setTableData] = useState<ConnectorProps[]>(connectors);\n const message =\n 'Please delete the nodes in the connector manually and delete this connector again';\n const { create } = useContext(ModalManagerContext);\n\n const onAddCondition = () => {\n const label = 'otherwise';\n const updatedGraphData = FlowModellerHelper.addBranch(updatedData, node.id, label);\n const graph = new DirectedGraph(updatedGraphData);\n const outConnectors = graph.getOutConnectors(node.id);\n update({\n node,\n connectors: outConnectors,\n updatedData: updatedGraphData\n });\n onAddRow(updatedGraphData);\n };\n\n const onDeleteCondition = (connector: ConnectorProps) => {\n const updatedGraphData = FlowModellerHelper.deleteConnector(updatedData, connector);\n if (updatedGraphData) {\n const updatedGraph = new DirectedGraph(updatedGraphData);\n const updatedOutConnectors = updatedGraph.getOutConnectors(node.id);\n update({\n node,\n connectors: updatedOutConnectors,\n updatedData: updatedGraphData\n });\n onDeleteRow(updatedGraphData);\n } else {\n create(\n () => {\n return (\n <Modal heading='Confirm'>\n <Text>{message}</Text>\n </Modal>\n );\n },\n { center: true }\n );\n }\n };\n\n const columns: ColumnProps<ConnectorProps>[] = [\n {\n renderer: connector => <Input value={connector.label} readOnly />,\n label: 'Outcome'\n },\n { renderer: () => <Text>No value</Text>, label: 'Decision output' },\n {\n renderer: connector => {\n return (\n <>\n <Button\n variant='simple'\n label='Delete'\n disabled={tableData.length < 3}\n icon\n onClick={() => {\n onDeleteCondition(connector);\n }}\n >\n <Icon name='trash' />\n </Button>\n </>\n );\n },\n label: 'Action'\n }\n ];\n\n useEffect(() => {\n setTableData(connectors);\n }, [connectors]);\n\n return (\n <>\n <Table title='Decision outcomes' hoverHighlight data={tableData} columns={columns} />\n <Flex container={{ pad: [1, 0] }}>\n <Button variant='simple' onClick={onAddCondition}>\n Add Condition\n </Button>\n </Flex>\n </>\n );\n};\n\nexport const EmptyFlowChartView = () => {\n const [graphData, setGraphData] = useState<NodeDataType>({\n nodes: emptyNodesData,\n connectors: emptyConnectorsData\n });\n const { create } = useContext(ModalManagerContext);\n\n const onTableActionClick = (updatedData: NodeDataType) => {\n setGraphData(updatedData);\n };\n const LaunchPropertyModal = ({ node, connectors, updatedData }: ModalProps) => {\n const { ModalContext } = useContext(ModalManagerContext);\n const { update } = useContext(ModalContext);\n return (\n <Modal heading={node.label}>\n <Input label='Description' defaultValue={node.description} />\n {connectors.length > 1 && (\n <DecisionTable\n updatedData={updatedData}\n connectors={connectors}\n onDeleteRow={(data: NodeDataType) => {\n onTableActionClick(data);\n }}\n node={node}\n onAddRow={(data: NodeDataType) => {\n onTableActionClick(data);\n }}\n update={update}\n />\n )}\n </Modal>\n );\n };\n\n const onNodeActionClick = (params: ActionParams) => {\n if (params.actionId === DELETE_ACTION_ID) {\n const modifiedGraph = FlowModellerHelper.deleteNode(graphData, params.nodeId);\n\n if (modifiedGraph) {\n setGraphData(modifiedGraph);\n } else if (!modifiedGraph) {\n // eslint-disable-next-line no-alert\n alert('Deletion of this node is not supported ');\n }\n } else if (params.actionId === 'action-2') {\n action(`ressigned ${params.nodeId}`)();\n } else {\n // eslint-disable-next-line no-console\n console.warn(`Unknown action ${params.actionId}`);\n }\n };\n\n const addNode = (nodeType: NodeType, metaData: AddNodeHandlerParams) => {\n const UpdatedData = FlowModellerHelper.addNode({\n nodeType,\n graphData,\n metaData\n });\n if (UpdatedData) {\n const newGraphData: GraphData<NodeProps, ConnectorProps> = UpdatedData;\n setGraphData(newGraphData);\n }\n };\n\n const selectNode = (nodeId: NodeProps['id']) => {\n const graph = new DirectedGraph(graphData);\n const node = graph.getNode(nodeId);\n const outConnectors = graph.getOutConnectors(nodeId);\n // LaunchPropertyModal(node, outConnectors, graphData);\n create(LaunchPropertyModal, {\n node,\n connectors: outConnectors,\n updatedData: graphData\n });\n };\n\n return (\n <StyledWrapper>\n <FlowModeller\n graphData={graphData}\n nodeLibrary={nodeLibrary}\n onNodeAdd={addNode}\n onNodeClick={selectNode}\n actions={nodeActions}\n onNodeActionClick={onNodeActionClick}\n />\n </StyledWrapper>\n );\n};\n\nexport const CRMFlowChartView = () => {\n const [graphData, setGraphData] = useState<GraphData<NodeProps, ConnectorProps>>({\n nodes: exampleCRMNodesData,\n connectors: exampleCRMConnectorsData\n });\n const { create } = useContext(ModalManagerContext);\n\n const onTableActionClick = (updatedData: NodeDataType) => {\n setGraphData(updatedData);\n };\n\n const LaunchPropertyModal = ({ node, connectors, updatedData }: ModalProps) => {\n const { ModalContext } = useContext(ModalManagerContext);\n const { update } = useContext(ModalContext);\n return (\n <Modal heading={node.label}>\n <Input label='Description' defaultValue={node.description} />\n {connectors.length > 1 && (\n <DecisionTable\n updatedData={updatedData}\n connectors={connectors}\n onDeleteRow={(data: NodeDataType) => {\n onTableActionClick(data);\n }}\n node={node}\n onAddRow={(data: NodeDataType) => {\n onTableActionClick(data);\n }}\n update={update}\n />\n )}\n </Modal>\n );\n };\n\n const onNodeActionClick = (params: ActionParams) => {\n if (params.actionId === DELETE_ACTION_ID) {\n const modifiedGraph = FlowModellerHelper.deleteNode(graphData, params.nodeId);\n\n if (modifiedGraph) {\n setGraphData(modifiedGraph);\n } else if (!modifiedGraph) {\n // eslint-disable-next-line no-alert\n alert('Deletion of this node is not supported ');\n }\n } else if (params.actionId === 'action-2') {\n action(`ressigned ${params.nodeId}`)();\n } else {\n // eslint-disable-next-line no-console\n console.warn(`Unknown action ${params.actionId}`);\n }\n };\n\n const addNode = (nodeType: NodeType, metaData: AddNodeHandlerParams) => {\n const UpdatedData = FlowModellerHelper.addNode({\n nodeType,\n graphData,\n metaData\n });\n if (UpdatedData) {\n const newGraphData: GraphData<NodeProps, ConnectorProps> = UpdatedData;\n setGraphData(newGraphData);\n }\n };\n\n const selectNode = (nodeId: NodeProps['id']) => {\n const graph = new DirectedGraph(graphData);\n const node = graph.getNode(nodeId);\n const outConnectors = graph.getOutConnectors(nodeId);\n create(LaunchPropertyModal, {\n node,\n connectors: outConnectors,\n updatedData: graphData\n });\n };\n\n return (\n <StyledWrapper>\n <FlowModeller\n graphData={graphData}\n nodeLibrary={nodeLibrary}\n onNodeAdd={addNode}\n onNodeClick={selectNode}\n actions={nodeActions}\n onNodeActionClick={onNodeActionClick}\n />\n </StyledWrapper>\n );\n};\n"]}
|