@pega/cosmos-react-demos 6.6.0 → 6.6.2
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/package.json +7 -7
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.d.ts +0 -3
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.d.ts.map +0 -1
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.js +0 -15
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.mocks.js.map +0 -1
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts +0 -19
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.d.ts.map +0 -1
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.jsx +0 -297
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.stories.jsx.map +0 -1
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.styles.d.ts +0 -5
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.styles.d.ts.map +0 -1
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.styles.js +0 -15
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.styles.js.map +0 -1
- package/jsx/condition-builder/ConditionBuilder/props.mock.d.ts +0 -6
- package/jsx/condition-builder/ConditionBuilder/props.mock.d.ts.map +0 -1
- package/jsx/condition-builder/ConditionBuilder/props.mock.js +0 -229
- package/jsx/condition-builder/ConditionBuilder/props.mock.js.map +0 -1
- package/jsx/condition-builder/ConditionInput/ConditionInput.stories.d.ts +0 -10
- package/jsx/condition-builder/ConditionInput/ConditionInput.stories.d.ts.map +0 -1
- package/jsx/condition-builder/ConditionInput/ConditionInput.stories.jsx +0 -40
- package/jsx/condition-builder/ConditionInput/ConditionInput.stories.jsx.map +0 -1
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.mocks.d.ts +0 -4
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.mocks.d.ts.map +0 -1
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.mocks.js +0 -233
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.mocks.js.map +0 -1
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.stories.d.ts +0 -8
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.stories.d.ts.map +0 -1
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.stories.jsx +0 -31
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.stories.jsx.map +0 -1
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.styles.d.ts +0 -9
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.styles.d.ts.map +0 -1
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.styles.js +0 -35
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.styles.js.map +0 -1
- package/jsx/core/AIButton/AIButton.mocks.d.ts +0 -22
- package/jsx/core/AIButton/AIButton.mocks.d.ts.map +0 -1
- package/jsx/core/AIButton/AIButton.mocks.js +0 -136
- package/jsx/core/AIButton/AIButton.mocks.js.map +0 -1
- package/jsx/core/AIButton/AIButton.stories.d.ts +0 -23
- package/jsx/core/AIButton/AIButton.stories.d.ts.map +0 -1
- package/jsx/core/AIButton/AIButton.stories.jsx +0 -306
- package/jsx/core/AIButton/AIButton.stories.jsx.map +0 -1
- package/jsx/core/AdditionalInfo/AdditionalInfo.stories.d.ts +0 -9
- package/jsx/core/AdditionalInfo/AdditionalInfo.stories.d.ts.map +0 -1
- package/jsx/core/AdditionalInfo/AdditionalInfo.stories.jsx +0 -25
- package/jsx/core/AdditionalInfo/AdditionalInfo.stories.jsx.map +0 -1
- package/jsx/core/AppShell/AppShell.mocks.d.ts +0 -15
- package/jsx/core/AppShell/AppShell.mocks.d.ts.map +0 -1
- package/jsx/core/AppShell/AppShell.mocks.jsx +0 -132
- package/jsx/core/AppShell/AppShell.mocks.jsx.map +0 -1
- package/jsx/core/AppShell/AppShell.stories.d.ts +0 -39
- package/jsx/core/AppShell/AppShell.stories.d.ts.map +0 -1
- package/jsx/core/AppShell/AppShell.stories.jsx +0 -266
- package/jsx/core/AppShell/AppShell.stories.jsx.map +0 -1
- package/jsx/core/AppShell/AppShell.styles.d.ts +0 -2
- package/jsx/core/AppShell/AppShell.styles.d.ts.map +0 -1
- package/jsx/core/AppShell/AppShell.styles.js +0 -5
- package/jsx/core/AppShell/AppShell.styles.js.map +0 -1
- package/jsx/core/Avatar/Avatar.stories.d.ts +0 -15
- package/jsx/core/Avatar/Avatar.stories.d.ts.map +0 -1
- package/jsx/core/Avatar/Avatar.stories.jsx +0 -75
- package/jsx/core/Avatar/Avatar.stories.jsx.map +0 -1
- package/jsx/core/Backdrop/Backdrop.stories.d.ts +0 -7
- package/jsx/core/Backdrop/Backdrop.stories.d.ts.map +0 -1
- package/jsx/core/Backdrop/Backdrop.stories.jsx +0 -43
- package/jsx/core/Backdrop/Backdrop.stories.jsx.map +0 -1
- package/jsx/core/Badges/Alert.stories.d.ts +0 -6
- package/jsx/core/Badges/Alert.stories.d.ts.map +0 -1
- package/jsx/core/Badges/Alert.stories.jsx +0 -15
- package/jsx/core/Badges/Alert.stories.jsx.map +0 -1
- package/jsx/core/Badges/Count.stories.d.ts +0 -6
- package/jsx/core/Badges/Count.stories.d.ts.map +0 -1
- package/jsx/core/Badges/Count.stories.jsx +0 -20
- package/jsx/core/Badges/Count.stories.jsx.map +0 -1
- package/jsx/core/Badges/Keyboard.stories.d.ts +0 -6
- package/jsx/core/Badges/Keyboard.stories.d.ts.map +0 -1
- package/jsx/core/Badges/Keyboard.stories.jsx +0 -17
- package/jsx/core/Badges/Keyboard.stories.jsx.map +0 -1
- package/jsx/core/Badges/Selection.stories.d.ts +0 -5
- package/jsx/core/Badges/Selection.stories.d.ts.map +0 -1
- package/jsx/core/Badges/Selection.stories.jsx +0 -9
- package/jsx/core/Badges/Selection.stories.jsx.map +0 -1
- package/jsx/core/Badges/Status.stories.d.ts +0 -11
- package/jsx/core/Badges/Status.stories.d.ts.map +0 -1
- package/jsx/core/Badges/Status.stories.jsx +0 -43
- package/jsx/core/Badges/Status.stories.jsx.map +0 -1
- package/jsx/core/Badges/Tag.stories.d.ts +0 -5
- package/jsx/core/Badges/Tag.stories.d.ts.map +0 -1
- package/jsx/core/Badges/Tag.stories.jsx +0 -9
- package/jsx/core/Badges/Tag.stories.jsx.map +0 -1
- package/jsx/core/Banner/Banner.mocks.d.ts +0 -18
- package/jsx/core/Banner/Banner.mocks.d.ts.map +0 -1
- package/jsx/core/Banner/Banner.mocks.jsx +0 -41
- package/jsx/core/Banner/Banner.mocks.jsx.map +0 -1
- package/jsx/core/Banner/Banner.stories.d.ts +0 -18
- package/jsx/core/Banner/Banner.stories.d.ts.map +0 -1
- package/jsx/core/Banner/Banner.stories.jsx +0 -156
- package/jsx/core/Banner/Banner.stories.jsx.map +0 -1
- package/jsx/core/Boolean/BooleanDisplay.stories.d.ts +0 -6
- package/jsx/core/Boolean/BooleanDisplay.stories.d.ts.map +0 -1
- package/jsx/core/Boolean/BooleanDisplay.stories.jsx +0 -19
- package/jsx/core/Boolean/BooleanDisplay.stories.jsx.map +0 -1
- package/jsx/core/Breadcrumbs/Breadcrumbs.mocks.d.ts +0 -2
- package/jsx/core/Breadcrumbs/Breadcrumbs.mocks.d.ts.map +0 -1
- package/jsx/core/Breadcrumbs/Breadcrumbs.mocks.js +0 -8
- package/jsx/core/Breadcrumbs/Breadcrumbs.mocks.js.map +0 -1
- package/jsx/core/Breadcrumbs/Breadcrumbs.stories.d.ts +0 -11
- package/jsx/core/Breadcrumbs/Breadcrumbs.stories.d.ts.map +0 -1
- package/jsx/core/Breadcrumbs/Breadcrumbs.stories.jsx +0 -69
- package/jsx/core/Breadcrumbs/Breadcrumbs.stories.jsx.map +0 -1
- package/jsx/core/Breadcrumbs/Breadcrumbs.styles.d.ts +0 -2
- package/jsx/core/Breadcrumbs/Breadcrumbs.styles.d.ts.map +0 -1
- package/jsx/core/Breadcrumbs/Breadcrumbs.styles.js +0 -12
- package/jsx/core/Breadcrumbs/Breadcrumbs.styles.js.map +0 -1
- package/jsx/core/Button/Button.stories.d.ts +0 -18
- package/jsx/core/Button/Button.stories.d.ts.map +0 -1
- package/jsx/core/Button/Button.stories.jsx +0 -119
- package/jsx/core/Button/Button.stories.jsx.map +0 -1
- package/jsx/core/Card/Card.stories.d.ts +0 -12
- package/jsx/core/Card/Card.stories.d.ts.map +0 -1
- package/jsx/core/Card/Card.stories.jsx +0 -85
- package/jsx/core/Card/Card.stories.jsx.map +0 -1
- package/jsx/core/Card/Card.styles.d.ts +0 -2
- package/jsx/core/Card/Card.styles.d.ts.map +0 -1
- package/jsx/core/Card/Card.styles.js +0 -5
- package/jsx/core/Card/Card.styles.js.map +0 -1
- package/jsx/core/Checkbox/Checkbox.stories.d.ts +0 -23
- package/jsx/core/Checkbox/Checkbox.stories.d.ts.map +0 -1
- package/jsx/core/Checkbox/Checkbox.stories.jsx +0 -100
- package/jsx/core/Checkbox/Checkbox.stories.jsx.map +0 -1
- package/jsx/core/CheckboxGroup/CheckboxGroup.stories.d.ts +0 -11
- package/jsx/core/CheckboxGroup/CheckboxGroup.stories.d.ts.map +0 -1
- package/jsx/core/CheckboxGroup/CheckboxGroup.stories.jsx +0 -99
- package/jsx/core/CheckboxGroup/CheckboxGroup.stories.jsx.map +0 -1
- package/jsx/core/CheckboxGroup/CheckboxGroup.styles.d.ts +0 -4
- package/jsx/core/CheckboxGroup/CheckboxGroup.styles.d.ts.map +0 -1
- package/jsx/core/CheckboxGroup/CheckboxGroup.styles.js +0 -9
- package/jsx/core/CheckboxGroup/CheckboxGroup.styles.js.map +0 -1
- package/jsx/core/ColorPicker/ColorPicker.stories.d.ts +0 -10
- package/jsx/core/ColorPicker/ColorPicker.stories.d.ts.map +0 -1
- package/jsx/core/ColorPicker/ColorPicker.stories.jsx +0 -89
- package/jsx/core/ColorPicker/ColorPicker.stories.jsx.map +0 -1
- package/jsx/core/ColorPicker/ColorPicker.styles.d.ts +0 -4
- package/jsx/core/ColorPicker/ColorPicker.styles.d.ts.map +0 -1
- package/jsx/core/ColorPicker/ColorPicker.styles.js +0 -11
- package/jsx/core/ColorPicker/ColorPicker.styles.js.map +0 -1
- package/jsx/core/ComboBox/ComboBox.mocks.d.ts +0 -26
- package/jsx/core/ComboBox/ComboBox.mocks.d.ts.map +0 -1
- package/jsx/core/ComboBox/ComboBox.mocks.jsx +0 -58
- package/jsx/core/ComboBox/ComboBox.mocks.jsx.map +0 -1
- package/jsx/core/ComboBox/ComboBox.stories.d.ts +0 -24
- package/jsx/core/ComboBox/ComboBox.stories.d.ts.map +0 -1
- package/jsx/core/ComboBox/ComboBox.stories.jsx +0 -369
- package/jsx/core/ComboBox/ComboBox.stories.jsx.map +0 -1
- package/jsx/core/CompositeInput/CompositeInput.mocks.d.ts +0 -8
- package/jsx/core/CompositeInput/CompositeInput.mocks.d.ts.map +0 -1
- package/jsx/core/CompositeInput/CompositeInput.mocks.jsx +0 -8
- package/jsx/core/CompositeInput/CompositeInput.mocks.jsx.map +0 -1
- package/jsx/core/CompositeInput/CompositeInput.stories.d.ts +0 -9
- package/jsx/core/CompositeInput/CompositeInput.stories.d.ts.map +0 -1
- package/jsx/core/CompositeInput/CompositeInput.stories.jsx +0 -52
- package/jsx/core/CompositeInput/CompositeInput.stories.jsx.map +0 -1
- package/jsx/core/Configuration/Configuration.mocks.d.ts +0 -7
- package/jsx/core/Configuration/Configuration.mocks.d.ts.map +0 -1
- package/jsx/core/Configuration/Configuration.mocks.jsx +0 -9
- package/jsx/core/Configuration/Configuration.mocks.jsx.map +0 -1
- package/jsx/core/Configuration/Configuration.stories.d.ts +0 -25
- package/jsx/core/Configuration/Configuration.stories.d.ts.map +0 -1
- package/jsx/core/Configuration/Configuration.stories.jsx +0 -196
- package/jsx/core/Configuration/Configuration.stories.jsx.map +0 -1
- package/jsx/core/Configuration/Configuration.styles.d.ts +0 -6
- package/jsx/core/Configuration/Configuration.styles.d.ts.map +0 -1
- package/jsx/core/Configuration/Configuration.styles.js +0 -12
- package/jsx/core/Configuration/Configuration.styles.js.map +0 -1
- package/jsx/core/CreditCard/CreditCard.stories.d.ts +0 -14
- package/jsx/core/CreditCard/CreditCard.stories.d.ts.map +0 -1
- package/jsx/core/CreditCard/CreditCard.stories.jsx +0 -50
- package/jsx/core/CreditCard/CreditCard.stories.jsx.map +0 -1
- package/jsx/core/Currency/Currency.stories.d.ts +0 -19
- package/jsx/core/Currency/Currency.stories.d.ts.map +0 -1
- package/jsx/core/Currency/Currency.stories.jsx +0 -105
- package/jsx/core/Currency/Currency.stories.jsx.map +0 -1
- package/jsx/core/DangerButton/DangerButton.stories.d.ts +0 -6
- package/jsx/core/DangerButton/DangerButton.stories.d.ts.map +0 -1
- package/jsx/core/DangerButton/DangerButton.stories.jsx +0 -17
- package/jsx/core/DangerButton/DangerButton.stories.jsx.map +0 -1
- package/jsx/core/DateTime/DateTime.stories.d.ts +0 -51
- package/jsx/core/DateTime/DateTime.stories.d.ts.map +0 -1
- package/jsx/core/DateTime/DateTime.stories.jsx +0 -291
- package/jsx/core/DateTime/DateTime.stories.jsx.map +0 -1
- package/jsx/core/DateTime/DateTimeDisplay.stories.d.ts +0 -7
- package/jsx/core/DateTime/DateTimeDisplay.stories.d.ts.map +0 -1
- package/jsx/core/DateTime/DateTimeDisplay.stories.jsx +0 -54
- package/jsx/core/DateTime/DateTimeDisplay.stories.jsx.map +0 -1
- package/jsx/core/DateTime/DateTimePicker.stories.d.ts +0 -7
- package/jsx/core/DateTime/DateTimePicker.stories.d.ts.map +0 -1
- package/jsx/core/DateTime/DateTimePicker.stories.jsx +0 -34
- package/jsx/core/DateTime/DateTimePicker.stories.jsx.map +0 -1
- package/jsx/core/Dialog/Dialog.stories.d.ts +0 -7
- package/jsx/core/Dialog/Dialog.stories.d.ts.map +0 -1
- package/jsx/core/Dialog/Dialog.stories.jsx +0 -15
- package/jsx/core/Dialog/Dialog.stories.jsx.map +0 -1
- package/jsx/core/Dialog/FormDialog.mocks.d.ts +0 -27
- package/jsx/core/Dialog/FormDialog.mocks.d.ts.map +0 -1
- package/jsx/core/Dialog/FormDialog.mocks.jsx +0 -194
- package/jsx/core/Dialog/FormDialog.mocks.jsx.map +0 -1
- package/jsx/core/Dialog/InfoDialog.mocks.d.ts +0 -4
- package/jsx/core/Dialog/InfoDialog.mocks.d.ts.map +0 -1
- package/jsx/core/Dialog/InfoDialog.mocks.jsx +0 -64
- package/jsx/core/Dialog/InfoDialog.mocks.jsx.map +0 -1
- package/jsx/core/Drawer/Drawer.stories.d.ts +0 -7
- package/jsx/core/Drawer/Drawer.stories.d.ts.map +0 -1
- package/jsx/core/Drawer/Drawer.stories.jsx +0 -98
- package/jsx/core/Drawer/Drawer.stories.jsx.map +0 -1
- package/jsx/core/Drawer/Drawer.styles.d.ts +0 -2
- package/jsx/core/Drawer/Drawer.styles.d.ts.map +0 -1
- package/jsx/core/Drawer/Drawer.styles.js +0 -11
- package/jsx/core/Drawer/Drawer.styles.js.map +0 -1
- package/jsx/core/Email/EmailDisplay.stories.d.ts +0 -6
- package/jsx/core/Email/EmailDisplay.stories.d.ts.map +0 -1
- package/jsx/core/Email/EmailDisplay.stories.jsx +0 -19
- package/jsx/core/Email/EmailDisplay.stories.jsx.map +0 -1
- package/jsx/core/EmojiPicker/EmojiPicker.stories.d.ts +0 -8
- package/jsx/core/EmojiPicker/EmojiPicker.stories.d.ts.map +0 -1
- package/jsx/core/EmojiPicker/EmojiPicker.stories.jsx +0 -53
- package/jsx/core/EmojiPicker/EmojiPicker.stories.jsx.map +0 -1
- package/jsx/core/EmptyState/EmptyState.stories.d.ts +0 -6
- package/jsx/core/EmptyState/EmptyState.stories.d.ts.map +0 -1
- package/jsx/core/EmptyState/EmptyState.stories.jsx +0 -18
- package/jsx/core/EmptyState/EmptyState.stories.jsx.map +0 -1
- package/jsx/core/ErrorState/ErrorState.stories.d.ts +0 -9
- package/jsx/core/ErrorState/ErrorState.stories.d.ts.map +0 -1
- package/jsx/core/ErrorState/ErrorState.stories.jsx +0 -20
- package/jsx/core/ErrorState/ErrorState.stories.jsx.map +0 -1
- package/jsx/core/ExpandCollapse/ExpandCollapse.stories.d.ts +0 -7
- package/jsx/core/ExpandCollapse/ExpandCollapse.stories.d.ts.map +0 -1
- package/jsx/core/ExpandCollapse/ExpandCollapse.stories.jsx +0 -73
- package/jsx/core/ExpandCollapse/ExpandCollapse.stories.jsx.map +0 -1
- package/jsx/core/ExpandCollapse/ExpandCollapse.styles.d.ts +0 -4
- package/jsx/core/ExpandCollapse/ExpandCollapse.styles.d.ts.map +0 -1
- package/jsx/core/ExpandCollapse/ExpandCollapse.styles.js +0 -17
- package/jsx/core/ExpandCollapse/ExpandCollapse.styles.js.map +0 -1
- package/jsx/core/FieldGroup/FieldGroup.stories.d.ts +0 -20
- package/jsx/core/FieldGroup/FieldGroup.stories.d.ts.map +0 -1
- package/jsx/core/FieldGroup/FieldGroup.stories.jsx +0 -93
- package/jsx/core/FieldGroup/FieldGroup.stories.jsx.map +0 -1
- package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts +0 -25
- package/jsx/core/FieldGroup/FieldGroupList.mocks.d.ts.map +0 -1
- package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx +0 -109
- package/jsx/core/FieldGroup/FieldGroupList.mocks.jsx.map +0 -1
- package/jsx/core/FieldGroup/FieldGroupList.stories.d.ts +0 -12
- package/jsx/core/FieldGroup/FieldGroupList.stories.d.ts.map +0 -1
- package/jsx/core/FieldGroup/FieldGroupList.stories.jsx +0 -134
- package/jsx/core/FieldGroup/FieldGroupList.stories.jsx.map +0 -1
- package/jsx/core/FieldValueList/FieldValueList.mocks.d.ts +0 -20
- package/jsx/core/FieldValueList/FieldValueList.mocks.d.ts.map +0 -1
- package/jsx/core/FieldValueList/FieldValueList.mocks.jsx +0 -54
- package/jsx/core/FieldValueList/FieldValueList.mocks.jsx.map +0 -1
- package/jsx/core/FieldValueList/FieldValueList.stories.d.ts +0 -11
- package/jsx/core/FieldValueList/FieldValueList.stories.d.ts.map +0 -1
- package/jsx/core/FieldValueList/FieldValueList.stories.jsx +0 -37
- package/jsx/core/FieldValueList/FieldValueList.stories.jsx.map +0 -1
- package/jsx/core/FieldValueList/FieldValueList.styles.d.ts +0 -2
- package/jsx/core/FieldValueList/FieldValueList.styles.d.ts.map +0 -1
- package/jsx/core/FieldValueList/FieldValueList.styles.js +0 -8
- package/jsx/core/FieldValueList/FieldValueList.styles.js.map +0 -1
- package/jsx/core/File/FileDisplay.stories.d.ts +0 -20
- package/jsx/core/File/FileDisplay.stories.d.ts.map +0 -1
- package/jsx/core/File/FileDisplay.stories.jsx +0 -140
- package/jsx/core/File/FileDisplay.stories.jsx.map +0 -1
- package/jsx/core/File/FileInput.stories.d.ts +0 -10
- package/jsx/core/File/FileInput.stories.d.ts.map +0 -1
- package/jsx/core/File/FileInput.stories.jsx +0 -103
- package/jsx/core/File/FileInput.stories.jsx.map +0 -1
- package/jsx/core/File/FileService.mock.d.ts +0 -28
- package/jsx/core/File/FileService.mock.d.ts.map +0 -1
- package/jsx/core/File/FileService.mock.jsx +0 -139
- package/jsx/core/File/FileService.mock.jsx.map +0 -1
- package/jsx/core/File/MockFileInput.d.ts +0 -6
- package/jsx/core/File/MockFileInput.d.ts.map +0 -1
- package/jsx/core/File/MockFileInput.jsx +0 -24
- package/jsx/core/File/MockFileInput.jsx.map +0 -1
- package/jsx/core/Flex/Flex.styles.d.ts +0 -10
- package/jsx/core/Flex/Flex.styles.d.ts.map +0 -1
- package/jsx/core/Flex/Flex.styles.js +0 -41
- package/jsx/core/Flex/Flex.styles.js.map +0 -1
- package/jsx/core/Flex/FlexContainer.stories.d.ts +0 -21
- package/jsx/core/Flex/FlexContainer.stories.d.ts.map +0 -1
- package/jsx/core/Flex/FlexContainer.stories.jsx +0 -164
- package/jsx/core/Flex/FlexContainer.stories.jsx.map +0 -1
- package/jsx/core/Flex/FlexItem.stories.d.ts +0 -13
- package/jsx/core/Flex/FlexItem.stories.d.ts.map +0 -1
- package/jsx/core/Flex/FlexItem.stories.jsx +0 -71
- package/jsx/core/Flex/FlexItem.stories.jsx.map +0 -1
- package/jsx/core/Form/Form.mocks.d.ts +0 -14
- package/jsx/core/Form/Form.mocks.d.ts.map +0 -1
- package/jsx/core/Form/Form.mocks.jsx +0 -265
- package/jsx/core/Form/Form.mocks.jsx.map +0 -1
- package/jsx/core/Form/Form.stories.d.ts +0 -25
- package/jsx/core/Form/Form.stories.d.ts.map +0 -1
- package/jsx/core/Form/Form.stories.jsx +0 -106
- package/jsx/core/Form/Form.stories.jsx.map +0 -1
- package/jsx/core/Grid/Grid.styles.d.ts +0 -6
- package/jsx/core/Grid/Grid.styles.d.ts.map +0 -1
- package/jsx/core/Grid/Grid.styles.js +0 -36
- package/jsx/core/Grid/Grid.styles.js.map +0 -1
- package/jsx/core/Grid/GridContainer.stories.d.ts +0 -23
- package/jsx/core/Grid/GridContainer.stories.d.ts.map +0 -1
- package/jsx/core/Grid/GridContainer.stories.jsx +0 -168
- package/jsx/core/Grid/GridContainer.stories.jsx.map +0 -1
- package/jsx/core/Grid/GridItem.stories.d.ts +0 -12
- package/jsx/core/Grid/GridItem.stories.d.ts.map +0 -1
- package/jsx/core/Grid/GridItem.stories.jsx +0 -74
- package/jsx/core/Grid/GridItem.stories.jsx.map +0 -1
- package/jsx/core/HTML/HTML.stories.d.ts +0 -6
- package/jsx/core/HTML/HTML.stories.d.ts.map +0 -1
- package/jsx/core/HTML/HTML.stories.jsx +0 -13
- package/jsx/core/HTML/HTML.stories.jsx.map +0 -1
- package/jsx/core/Icon/Icon.mocks.d.ts +0 -26
- package/jsx/core/Icon/Icon.mocks.d.ts.map +0 -1
- package/jsx/core/Icon/Icon.mocks.jsx +0 -32
- package/jsx/core/Icon/Icon.mocks.jsx.map +0 -1
- package/jsx/core/Icon/Icon.stories.d.ts +0 -21
- package/jsx/core/Icon/Icon.stories.d.ts.map +0 -1
- package/jsx/core/Icon/Icon.stories.jsx +0 -112
- package/jsx/core/Icon/Icon.stories.jsx.map +0 -1
- package/jsx/core/Icon/Icon.styles.d.ts +0 -4
- package/jsx/core/Icon/Icon.styles.d.ts.map +0 -1
- package/jsx/core/Icon/Icon.styles.js +0 -25
- package/jsx/core/Icon/Icon.styles.js.map +0 -1
- package/jsx/core/IconPicker/IconPicker.stories.d.ts +0 -6
- package/jsx/core/IconPicker/IconPicker.stories.d.ts.map +0 -1
- package/jsx/core/IconPicker/IconPicker.stories.jsx +0 -35
- package/jsx/core/IconPicker/IconPicker.stories.jsx.map +0 -1
- package/jsx/core/Image/Image.stories.d.ts +0 -5
- package/jsx/core/Image/Image.stories.d.ts.map +0 -1
- package/jsx/core/Image/Image.stories.jsx +0 -9
- package/jsx/core/Image/Image.stories.jsx.map +0 -1
- package/jsx/core/Input/Input.stories.d.ts +0 -20
- package/jsx/core/Input/Input.stories.d.ts.map +0 -1
- package/jsx/core/Input/Input.stories.jsx +0 -159
- package/jsx/core/Input/Input.stories.jsx.map +0 -1
- package/jsx/core/Label/Label.stories.d.ts +0 -10
- package/jsx/core/Label/Label.stories.d.ts.map +0 -1
- package/jsx/core/Label/Label.stories.jsx +0 -33
- package/jsx/core/Label/Label.stories.jsx.map +0 -1
- package/jsx/core/Lightbox/Lightbox.mocks.d.ts +0 -22
- package/jsx/core/Lightbox/Lightbox.mocks.d.ts.map +0 -1
- package/jsx/core/Lightbox/Lightbox.mocks.js +0 -97
- package/jsx/core/Lightbox/Lightbox.mocks.js.map +0 -1
- package/jsx/core/Lightbox/Lightbox.stories.d.ts +0 -10
- package/jsx/core/Lightbox/Lightbox.stories.d.ts.map +0 -1
- package/jsx/core/Lightbox/Lightbox.stories.jsx +0 -70
- package/jsx/core/Lightbox/Lightbox.stories.jsx.map +0 -1
- package/jsx/core/Link/Link.stories.d.ts +0 -13
- package/jsx/core/Link/Link.stories.d.ts.map +0 -1
- package/jsx/core/Link/Link.stories.jsx +0 -43
- package/jsx/core/Link/Link.stories.jsx.map +0 -1
- package/jsx/core/List/CommaSeparatedList.stories.d.ts +0 -6
- package/jsx/core/List/CommaSeparatedList.stories.d.ts.map +0 -1
- package/jsx/core/List/CommaSeparatedList.stories.jsx +0 -31
- package/jsx/core/List/CommaSeparatedList.stories.jsx.map +0 -1
- package/jsx/core/List/OrderedList.stories.d.ts +0 -10
- package/jsx/core/List/OrderedList.stories.d.ts.map +0 -1
- package/jsx/core/List/OrderedList.stories.jsx +0 -38
- package/jsx/core/List/OrderedList.stories.jsx.map +0 -1
- package/jsx/core/List/UnorderedList.stories.d.ts +0 -10
- package/jsx/core/List/UnorderedList.stories.d.ts.map +0 -1
- package/jsx/core/List/UnorderedList.stories.jsx +0 -38
- package/jsx/core/List/UnorderedList.stories.jsx.map +0 -1
- package/jsx/core/ListToolbar/ListToolbar.mocks.d.ts +0 -9
- package/jsx/core/ListToolbar/ListToolbar.mocks.d.ts.map +0 -1
- package/jsx/core/ListToolbar/ListToolbar.mocks.jsx +0 -58
- package/jsx/core/ListToolbar/ListToolbar.mocks.jsx.map +0 -1
- package/jsx/core/ListToolbar/ListToolbar.stories.d.ts +0 -17
- package/jsx/core/ListToolbar/ListToolbar.stories.d.ts.map +0 -1
- package/jsx/core/ListToolbar/ListToolbar.stories.jsx +0 -141
- package/jsx/core/ListToolbar/ListToolbar.stories.jsx.map +0 -1
- package/jsx/core/LiveLog/LiveLog.mocks.d.ts +0 -5
- package/jsx/core/LiveLog/LiveLog.mocks.d.ts.map +0 -1
- package/jsx/core/LiveLog/LiveLog.mocks.jsx +0 -47
- package/jsx/core/LiveLog/LiveLog.mocks.jsx.map +0 -1
- package/jsx/core/LiveLog/LiveLog.stories.d.ts +0 -9
- package/jsx/core/LiveLog/LiveLog.stories.d.ts.map +0 -1
- package/jsx/core/LiveLog/LiveLog.stories.jsx +0 -19
- package/jsx/core/LiveLog/LiveLog.stories.jsx.map +0 -1
- package/jsx/core/Location/Location.stories.d.ts +0 -15
- package/jsx/core/Location/Location.stories.d.ts.map +0 -1
- package/jsx/core/Location/Location.stories.jsx +0 -142
- package/jsx/core/Location/Location.stories.jsx.map +0 -1
- package/jsx/core/Location/locationTestUtils.d.ts +0 -3
- package/jsx/core/Location/locationTestUtils.d.ts.map +0 -1
- package/jsx/core/Location/locationTestUtils.js +0 -29
- package/jsx/core/Location/locationTestUtils.js.map +0 -1
- package/jsx/core/Menu/Menu.mocks.d.ts +0 -4
- package/jsx/core/Menu/Menu.mocks.d.ts.map +0 -1
- package/jsx/core/Menu/Menu.mocks.js +0 -179
- package/jsx/core/Menu/Menu.mocks.js.map +0 -1
- package/jsx/core/Menu/Menu.stories.d.ts +0 -18
- package/jsx/core/Menu/Menu.stories.d.ts.map +0 -1
- package/jsx/core/Menu/Menu.stories.jsx +0 -196
- package/jsx/core/Menu/Menu.stories.jsx.map +0 -1
- package/jsx/core/Menu/Menu.styles.d.ts +0 -2
- package/jsx/core/Menu/Menu.styles.d.ts.map +0 -1
- package/jsx/core/Menu/Menu.styles.js +0 -6
- package/jsx/core/Menu/Menu.styles.js.map +0 -1
- package/jsx/core/MenuButton/MenuButton.stories.d.ts +0 -16
- package/jsx/core/MenuButton/MenuButton.stories.d.ts.map +0 -1
- package/jsx/core/MenuButton/MenuButton.stories.jsx +0 -188
- package/jsx/core/MenuButton/MenuButton.stories.jsx.map +0 -1
- package/jsx/core/MetaList/MetaList.stories.d.ts +0 -9
- package/jsx/core/MetaList/MetaList.stories.d.ts.map +0 -1
- package/jsx/core/MetaList/MetaList.stories.jsx +0 -24
- package/jsx/core/MetaList/MetaList.stories.jsx.map +0 -1
- package/jsx/core/Modal/Modal.mocks.d.ts +0 -4
- package/jsx/core/Modal/Modal.mocks.d.ts.map +0 -1
- package/jsx/core/Modal/Modal.mocks.jsx +0 -44
- package/jsx/core/Modal/Modal.mocks.jsx.map +0 -1
- package/jsx/core/Modal/Modal.stories.d.ts +0 -36
- package/jsx/core/Modal/Modal.stories.d.ts.map +0 -1
- package/jsx/core/Modal/Modal.stories.jsx +0 -332
- package/jsx/core/Modal/Modal.stories.jsx.map +0 -1
- package/jsx/core/MultiStepForm/MultiStepForm.mocks.d.ts +0 -70
- package/jsx/core/MultiStepForm/MultiStepForm.mocks.d.ts.map +0 -1
- package/jsx/core/MultiStepForm/MultiStepForm.mocks.jsx +0 -401
- package/jsx/core/MultiStepForm/MultiStepForm.mocks.jsx.map +0 -1
- package/jsx/core/MultiStepForm/MultiStepForm.stories.d.ts +0 -7
- package/jsx/core/MultiStepForm/MultiStepForm.stories.d.ts.map +0 -1
- package/jsx/core/MultiStepForm/MultiStepForm.stories.jsx +0 -133
- package/jsx/core/MultiStepForm/MultiStepForm.stories.jsx.map +0 -1
- package/jsx/core/NoValue/NoValue.stories.d.ts +0 -6
- package/jsx/core/NoValue/NoValue.stories.d.ts.map +0 -1
- package/jsx/core/NoValue/NoValue.stories.jsx +0 -30
- package/jsx/core/NoValue/NoValue.stories.jsx.map +0 -1
- package/jsx/core/Number/Number.stories.d.ts +0 -19
- package/jsx/core/Number/Number.stories.d.ts.map +0 -1
- package/jsx/core/Number/Number.stories.jsx +0 -303
- package/jsx/core/Number/Number.stories.jsx.map +0 -1
- package/jsx/core/PageTemplates/PageTemplates.mocks.d.ts +0 -3
- package/jsx/core/PageTemplates/PageTemplates.mocks.d.ts.map +0 -1
- package/jsx/core/PageTemplates/PageTemplates.mocks.js +0 -10
- package/jsx/core/PageTemplates/PageTemplates.mocks.js.map +0 -1
- package/jsx/core/PageTemplates/PageTemplates.stories.d.ts +0 -33
- package/jsx/core/PageTemplates/PageTemplates.stories.d.ts.map +0 -1
- package/jsx/core/PageTemplates/PageTemplates.stories.jsx +0 -287
- package/jsx/core/PageTemplates/PageTemplates.stories.jsx.map +0 -1
- package/jsx/core/PageTemplates/PageTemplates.styles.d.ts +0 -5
- package/jsx/core/PageTemplates/PageTemplates.styles.d.ts.map +0 -1
- package/jsx/core/PageTemplates/PageTemplates.styles.js +0 -40
- package/jsx/core/PageTemplates/PageTemplates.styles.js.map +0 -1
- package/jsx/core/Pagination/Pagination.stories.d.ts +0 -6
- package/jsx/core/Pagination/Pagination.stories.d.ts.map +0 -1
- package/jsx/core/Pagination/Pagination.stories.jsx +0 -19
- package/jsx/core/Pagination/Pagination.stories.jsx.map +0 -1
- package/jsx/core/Paragraph/ParagraphDisplay.stories.d.ts +0 -6
- package/jsx/core/Paragraph/ParagraphDisplay.stories.d.ts.map +0 -1
- package/jsx/core/Paragraph/ParagraphDisplay.stories.jsx +0 -15
- package/jsx/core/Paragraph/ParagraphDisplay.stories.jsx.map +0 -1
- package/jsx/core/Phone/Phone.stories.d.ts +0 -13
- package/jsx/core/Phone/Phone.stories.d.ts.map +0 -1
- package/jsx/core/Phone/Phone.stories.jsx +0 -52
- package/jsx/core/Phone/Phone.stories.jsx.map +0 -1
- package/jsx/core/Popover/Popover.mocks.d.ts +0 -9
- package/jsx/core/Popover/Popover.mocks.d.ts.map +0 -1
- package/jsx/core/Popover/Popover.mocks.jsx +0 -114
- package/jsx/core/Popover/Popover.mocks.jsx.map +0 -1
- package/jsx/core/Popover/Popover.stories.d.ts +0 -13
- package/jsx/core/Popover/Popover.stories.d.ts.map +0 -1
- package/jsx/core/Popover/Popover.stories.jsx +0 -209
- package/jsx/core/Popover/Popover.stories.jsx.map +0 -1
- package/jsx/core/Progress/Progress.mocks.d.ts +0 -2
- package/jsx/core/Progress/Progress.mocks.d.ts.map +0 -1
- package/jsx/core/Progress/Progress.mocks.js +0 -2
- package/jsx/core/Progress/Progress.mocks.js.map +0 -1
- package/jsx/core/Progress/Progress.stories.d.ts +0 -16
- package/jsx/core/Progress/Progress.stories.d.ts.map +0 -1
- package/jsx/core/Progress/Progress.stories.jsx +0 -124
- package/jsx/core/Progress/Progress.stories.jsx.map +0 -1
- package/jsx/core/Progress/Progress.styles.d.ts +0 -2
- package/jsx/core/Progress/Progress.styles.d.ts.map +0 -1
- package/jsx/core/Progress/Progress.styles.js +0 -14
- package/jsx/core/Progress/Progress.styles.js.map +0 -1
- package/jsx/core/QRCode/QRCode.stories.d.ts +0 -9
- package/jsx/core/QRCode/QRCode.stories.d.ts.map +0 -1
- package/jsx/core/QRCode/QRCode.stories.jsx +0 -17
- package/jsx/core/QRCode/QRCode.stories.jsx.map +0 -1
- package/jsx/core/RadioButton/RadioButton.stories.d.ts +0 -23
- package/jsx/core/RadioButton/RadioButton.stories.d.ts.map +0 -1
- package/jsx/core/RadioButton/RadioButton.stories.jsx +0 -95
- package/jsx/core/RadioButton/RadioButton.stories.jsx.map +0 -1
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.stories.d.ts +0 -12
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.stories.d.ts.map +0 -1
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.stories.jsx +0 -101
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.stories.jsx.map +0 -1
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.styles.d.ts +0 -4
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.styles.d.ts.map +0 -1
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.styles.js +0 -9
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.styles.js.map +0 -1
- package/jsx/core/Rating/Rating.stories.d.ts +0 -13
- package/jsx/core/Rating/Rating.stories.d.ts.map +0 -1
- package/jsx/core/Rating/Rating.stories.jsx +0 -39
- package/jsx/core/Rating/Rating.stories.jsx.map +0 -1
- package/jsx/core/SearchInput/SearchInput.mocks.d.ts +0 -12
- package/jsx/core/SearchInput/SearchInput.mocks.d.ts.map +0 -1
- package/jsx/core/SearchInput/SearchInput.mocks.js +0 -25
- package/jsx/core/SearchInput/SearchInput.mocks.js.map +0 -1
- package/jsx/core/SearchInput/SearchInput.stories.d.ts +0 -7
- package/jsx/core/SearchInput/SearchInput.stories.d.ts.map +0 -1
- package/jsx/core/SearchInput/SearchInput.stories.jsx +0 -44
- package/jsx/core/SearchInput/SearchInput.stories.jsx.map +0 -1
- package/jsx/core/Select/Select.stories.d.ts +0 -18
- package/jsx/core/Select/Select.stories.d.ts.map +0 -1
- package/jsx/core/Select/Select.stories.jsx +0 -83
- package/jsx/core/Select/Select.stories.jsx.map +0 -1
- package/jsx/core/Sentiment/Sentiment.stories.d.ts +0 -20
- package/jsx/core/Sentiment/Sentiment.stories.d.ts.map +0 -1
- package/jsx/core/Sentiment/Sentiment.stories.jsx +0 -71
- package/jsx/core/Sentiment/Sentiment.stories.jsx.map +0 -1
- package/jsx/core/SkipLinks/SkipLinks.stories.d.ts +0 -6
- package/jsx/core/SkipLinks/SkipLinks.stories.d.ts.map +0 -1
- package/jsx/core/SkipLinks/SkipLinks.stories.jsx +0 -29
- package/jsx/core/SkipLinks/SkipLinks.stories.jsx.map +0 -1
- package/jsx/core/SkipLinks/SkipLinks.styles.d.ts +0 -2
- package/jsx/core/SkipLinks/SkipLinks.styles.d.ts.map +0 -1
- package/jsx/core/SkipLinks/SkipLinks.styles.js +0 -16
- package/jsx/core/SkipLinks/SkipLinks.styles.js.map +0 -1
- package/jsx/core/Slider/Slider.stories.d.ts +0 -13
- package/jsx/core/Slider/Slider.stories.d.ts.map +0 -1
- package/jsx/core/Slider/Slider.stories.jsx +0 -78
- package/jsx/core/Slider/Slider.stories.jsx.map +0 -1
- package/jsx/core/SummaryItem/SummaryItem.stories.d.ts +0 -11
- package/jsx/core/SummaryItem/SummaryItem.stories.d.ts.map +0 -1
- package/jsx/core/SummaryItem/SummaryItem.stories.jsx +0 -36
- package/jsx/core/SummaryItem/SummaryItem.stories.jsx.map +0 -1
- package/jsx/core/SummaryList/SummaryList.mocks.d.ts +0 -20
- package/jsx/core/SummaryList/SummaryList.mocks.d.ts.map +0 -1
- package/jsx/core/SummaryList/SummaryList.mocks.jsx +0 -48
- package/jsx/core/SummaryList/SummaryList.mocks.jsx.map +0 -1
- package/jsx/core/SummaryList/SummaryList.stories.d.ts +0 -13
- package/jsx/core/SummaryList/SummaryList.stories.d.ts.map +0 -1
- package/jsx/core/SummaryList/SummaryList.stories.jsx +0 -131
- package/jsx/core/SummaryList/SummaryList.stories.jsx.map +0 -1
- package/jsx/core/SummaryList/mockUsers.d.ts +0 -16
- package/jsx/core/SummaryList/mockUsers.d.ts.map +0 -1
- package/jsx/core/SummaryList/mockUsers.js +0 -904
- package/jsx/core/SummaryList/mockUsers.js.map +0 -1
- package/jsx/core/Switch/Switch.stories.d.ts +0 -14
- package/jsx/core/Switch/Switch.stories.d.ts.map +0 -1
- package/jsx/core/Switch/Switch.stories.jsx +0 -60
- package/jsx/core/Switch/Switch.stories.jsx.map +0 -1
- package/jsx/core/Switch/Switch.styles.d.ts +0 -2
- package/jsx/core/Switch/Switch.styles.d.ts.map +0 -1
- package/jsx/core/Switch/Switch.styles.js +0 -13
- package/jsx/core/Switch/Switch.styles.js.map +0 -1
- package/jsx/core/Table/Table.mocks.d.ts +0 -25
- package/jsx/core/Table/Table.mocks.d.ts.map +0 -1
- package/jsx/core/Table/Table.mocks.jsx +0 -166
- package/jsx/core/Table/Table.mocks.jsx.map +0 -1
- package/jsx/core/Table/Table.stories.d.ts +0 -39
- package/jsx/core/Table/Table.stories.d.ts.map +0 -1
- package/jsx/core/Table/Table.stories.jsx +0 -178
- package/jsx/core/Table/Table.stories.jsx.map +0 -1
- package/jsx/core/Table/Table.styles.d.ts +0 -4
- package/jsx/core/Table/Table.styles.d.ts.map +0 -1
- package/jsx/core/Table/Table.styles.js +0 -9
- package/jsx/core/Table/Table.styles.js.map +0 -1
- package/jsx/core/Tabs/Tabs.stories.d.ts +0 -9
- package/jsx/core/Tabs/Tabs.stories.d.ts.map +0 -1
- package/jsx/core/Tabs/Tabs.stories.jsx +0 -59
- package/jsx/core/Tabs/Tabs.stories.jsx.map +0 -1
- package/jsx/core/Text/Text.stories.d.ts +0 -25
- package/jsx/core/Text/Text.stories.d.ts.map +0 -1
- package/jsx/core/Text/Text.stories.jsx +0 -134
- package/jsx/core/Text/Text.stories.jsx.map +0 -1
- package/jsx/core/TextArea/TextArea.stories.d.ts +0 -14
- package/jsx/core/TextArea/TextArea.stories.d.ts.map +0 -1
- package/jsx/core/TextArea/TextArea.stories.jsx +0 -71
- package/jsx/core/TextArea/TextArea.stories.jsx.map +0 -1
- package/jsx/core/Toaster/Toaster.stories.d.ts +0 -5
- package/jsx/core/Toaster/Toaster.stories.d.ts.map +0 -1
- package/jsx/core/Toaster/Toaster.stories.jsx +0 -27
- package/jsx/core/Toaster/Toaster.stories.jsx.map +0 -1
- package/jsx/core/Tooltip/Tooltip.stories.d.ts +0 -11
- package/jsx/core/Tooltip/Tooltip.stories.d.ts.map +0 -1
- package/jsx/core/Tooltip/Tooltip.stories.jsx +0 -66
- package/jsx/core/Tooltip/Tooltip.stories.jsx.map +0 -1
- package/jsx/core/Tooltip/Tooltip.styles.d.ts +0 -2
- package/jsx/core/Tooltip/Tooltip.styles.d.ts.map +0 -1
- package/jsx/core/Tooltip/Tooltip.styles.js +0 -23
- package/jsx/core/Tooltip/Tooltip.styles.js.map +0 -1
- package/jsx/core/Tree/Tree.mocks.d.ts +0 -2
- package/jsx/core/Tree/Tree.mocks.d.ts.map +0 -1
- package/jsx/core/Tree/Tree.mocks.js +0 -20
- package/jsx/core/Tree/Tree.mocks.js.map +0 -1
- package/jsx/core/Tree/Tree.stories.d.ts +0 -7
- package/jsx/core/Tree/Tree.stories.d.ts.map +0 -1
- package/jsx/core/Tree/Tree.stories.jsx +0 -95
- package/jsx/core/Tree/Tree.stories.jsx.map +0 -1
- package/jsx/core/Tree/Tree.styles.d.ts +0 -3
- package/jsx/core/Tree/Tree.styles.d.ts.map +0 -1
- package/jsx/core/Tree/Tree.styles.js +0 -10
- package/jsx/core/Tree/Tree.styles.js.map +0 -1
- package/jsx/core/URL/URL.stories.d.ts +0 -6
- package/jsx/core/URL/URL.stories.d.ts.map +0 -1
- package/jsx/core/URL/URL.stories.jsx +0 -17
- package/jsx/core/URL/URL.stories.jsx.map +0 -1
- package/jsx/dnd/DragDropList/DragDropList.mocks.d.ts +0 -15
- package/jsx/dnd/DragDropList/DragDropList.mocks.d.ts.map +0 -1
- package/jsx/dnd/DragDropList/DragDropList.mocks.jsx +0 -33
- package/jsx/dnd/DragDropList/DragDropList.mocks.jsx.map +0 -1
- package/jsx/dnd/DragDropList/DragDropList.stories.d.ts +0 -10
- package/jsx/dnd/DragDropList/DragDropList.stories.d.ts.map +0 -1
- package/jsx/dnd/DragDropList/DragDropList.stories.jsx +0 -55
- package/jsx/dnd/DragDropList/DragDropList.stories.jsx.map +0 -1
- package/jsx/dnd/DragDropList/DragDropList.styles.d.ts +0 -6
- package/jsx/dnd/DragDropList/DragDropList.styles.d.ts.map +0 -1
- package/jsx/dnd/DragDropList/DragDropList.styles.js +0 -32
- package/jsx/dnd/DragDropList/DragDropList.styles.js.map +0 -1
- package/jsx/dnd/StandardDragDropList/Demo.d.ts +0 -7
- package/jsx/dnd/StandardDragDropList/Demo.d.ts.map +0 -1
- package/jsx/dnd/StandardDragDropList/Demo.jsx +0 -156
- package/jsx/dnd/StandardDragDropList/Demo.jsx.map +0 -1
- package/jsx/dnd/StandardDragDropList/GroupConfig.d.ts +0 -10
- package/jsx/dnd/StandardDragDropList/GroupConfig.d.ts.map +0 -1
- package/jsx/dnd/StandardDragDropList/GroupConfig.jsx +0 -26
- package/jsx/dnd/StandardDragDropList/GroupConfig.jsx.map +0 -1
- package/jsx/dnd/StandardDragDropList/ItemConfig.d.ts +0 -12
- package/jsx/dnd/StandardDragDropList/ItemConfig.d.ts.map +0 -1
- package/jsx/dnd/StandardDragDropList/ItemConfig.jsx +0 -21
- package/jsx/dnd/StandardDragDropList/ItemConfig.jsx.map +0 -1
- package/jsx/dnd/StandardDragDropList/Popover.d.ts +0 -14
- package/jsx/dnd/StandardDragDropList/Popover.d.ts.map +0 -1
- package/jsx/dnd/StandardDragDropList/Popover.jsx +0 -51
- package/jsx/dnd/StandardDragDropList/Popover.jsx.map +0 -1
- package/jsx/dnd/StandardDragDropList/SelectionMenu.d.ts +0 -16
- package/jsx/dnd/StandardDragDropList/SelectionMenu.d.ts.map +0 -1
- package/jsx/dnd/StandardDragDropList/SelectionMenu.jsx +0 -104
- package/jsx/dnd/StandardDragDropList/SelectionMenu.jsx.map +0 -1
- package/jsx/dnd/StandardDragDropList/StandardDragDropList.stories.d.ts +0 -5
- package/jsx/dnd/StandardDragDropList/StandardDragDropList.stories.d.ts.map +0 -1
- package/jsx/dnd/StandardDragDropList/StandardDragDropList.stories.jsx +0 -15
- package/jsx/dnd/StandardDragDropList/StandardDragDropList.stories.jsx.map +0 -1
- package/jsx/dnd/StandardDragDropList/mockData.d.ts +0 -26
- package/jsx/dnd/StandardDragDropList/mockData.d.ts.map +0 -1
- package/jsx/dnd/StandardDragDropList/mockData.js +0 -77
- package/jsx/dnd/StandardDragDropList/mockData.js.map +0 -1
- package/jsx/rte/DynamicContentEditor/DynamicContentEditor.stories.d.ts +0 -8
- package/jsx/rte/DynamicContentEditor/DynamicContentEditor.stories.d.ts.map +0 -1
- package/jsx/rte/DynamicContentEditor/DynamicContentEditor.stories.jsx +0 -103
- package/jsx/rte/DynamicContentEditor/DynamicContentEditor.stories.jsx.map +0 -1
- package/jsx/rte/DynamicContentEditor/FieldSelector.d.ts +0 -11
- package/jsx/rte/DynamicContentEditor/FieldSelector.d.ts.map +0 -1
- package/jsx/rte/DynamicContentEditor/FieldSelector.jsx +0 -82
- package/jsx/rte/DynamicContentEditor/FieldSelector.jsx.map +0 -1
- package/jsx/rte/Editor/Editor.mocks.d.ts +0 -329
- package/jsx/rte/Editor/Editor.mocks.d.ts.map +0 -1
- package/jsx/rte/Editor/Editor.mocks.jsx +0 -22
- package/jsx/rte/Editor/Editor.mocks.jsx.map +0 -1
- package/jsx/rte/Editor/Editor.stories.d.ts +0 -14
- package/jsx/rte/Editor/Editor.stories.d.ts.map +0 -1
- package/jsx/rte/Editor/Editor.stories.jsx +0 -159
- package/jsx/rte/Editor/Editor.stories.jsx.map +0 -1
- package/jsx/rte/RichTextEditor/RichTextEditor.mocks.d.ts +0 -3
- package/jsx/rte/RichTextEditor/RichTextEditor.mocks.d.ts.map +0 -1
- package/jsx/rte/RichTextEditor/RichTextEditor.mocks.jsx +0 -34
- package/jsx/rte/RichTextEditor/RichTextEditor.mocks.jsx.map +0 -1
- package/jsx/rte/RichTextEditor/RichTextEditor.stories.d.ts +0 -7
- package/jsx/rte/RichTextEditor/RichTextEditor.stories.d.ts.map +0 -1
- package/jsx/rte/RichTextEditor/RichTextEditor.stories.jsx +0 -108
- package/jsx/rte/RichTextEditor/RichTextEditor.stories.jsx.map +0 -1
- package/jsx/rte/RichTextEditor/RichTextViewer.stories.d.ts +0 -13
- package/jsx/rte/RichTextEditor/RichTextViewer.stories.d.ts.map +0 -1
- package/jsx/rte/RichTextEditor/RichTextViewer.stories.jsx +0 -151
- package/jsx/rte/RichTextEditor/RichTextViewer.stories.jsx.map +0 -1
- package/jsx/social/Chat/Chat.mocks.d.ts +0 -52
- package/jsx/social/Chat/Chat.mocks.d.ts.map +0 -1
- package/jsx/social/Chat/Chat.mocks.js +0 -767
- package/jsx/social/Chat/Chat.mocks.js.map +0 -1
- package/jsx/social/Chat/Chat.stories.d.ts +0 -55
- package/jsx/social/Chat/Chat.stories.d.ts.map +0 -1
- package/jsx/social/Chat/Chat.stories.jsx +0 -678
- package/jsx/social/Chat/Chat.stories.jsx.map +0 -1
- package/jsx/social/Email/Email.mocks.d.ts +0 -352
- package/jsx/social/Email/Email.mocks.d.ts.map +0 -1
- package/jsx/social/Email/Email.mocks.jsx +0 -1215
- package/jsx/social/Email/Email.mocks.jsx.map +0 -1
- package/jsx/social/Email/Email.stories.d.ts +0 -83
- package/jsx/social/Email/Email.stories.d.ts.map +0 -1
- package/jsx/social/Email/Email.stories.jsx +0 -1219
- package/jsx/social/Email/Email.stories.jsx.map +0 -1
- package/jsx/social/Email/Email.styles.d.ts +0 -3
- package/jsx/social/Email/Email.styles.d.ts.map +0 -1
- package/jsx/social/Email/Email.styles.js +0 -11
- package/jsx/social/Email/Email.styles.js.map +0 -1
- package/jsx/social/Feed/Feed.mocks.d.ts +0 -53
- package/jsx/social/Feed/Feed.mocks.d.ts.map +0 -1
- package/jsx/social/Feed/Feed.mocks.jsx +0 -412
- package/jsx/social/Feed/Feed.mocks.jsx.map +0 -1
- package/jsx/social/Feed/Feed.stories.d.ts +0 -11
- package/jsx/social/Feed/Feed.stories.d.ts.map +0 -1
- package/jsx/social/Feed/Feed.stories.jsx +0 -222
- package/jsx/social/Feed/Feed.stories.jsx.map +0 -1
- package/jsx/social/Feed/FeedNewPost.mocks.d.ts +0 -8
- package/jsx/social/Feed/FeedNewPost.mocks.d.ts.map +0 -1
- package/jsx/social/Feed/FeedNewPost.mocks.jsx +0 -29
- package/jsx/social/Feed/FeedNewPost.mocks.jsx.map +0 -1
- package/jsx/social/Feed/FeedPost.mocks.d.ts +0 -4
- package/jsx/social/Feed/FeedPost.mocks.d.ts.map +0 -1
- package/jsx/social/Feed/FeedPost.mocks.jsx +0 -182
- package/jsx/social/Feed/FeedPost.mocks.jsx.map +0 -1
- package/jsx/social/Feed/FeedReply.mocks.d.ts +0 -13
- package/jsx/social/Feed/FeedReply.mocks.d.ts.map +0 -1
- package/jsx/social/Feed/FeedReply.mocks.jsx +0 -83
- package/jsx/social/Feed/FeedReply.mocks.jsx.map +0 -1
- package/jsx/work/AppAnnouncement/AppAnnouncement.stories.d.ts +0 -6
- package/jsx/work/AppAnnouncement/AppAnnouncement.stories.d.ts.map +0 -1
- package/jsx/work/AppAnnouncement/AppAnnouncement.stories.jsx +0 -30
- package/jsx/work/AppAnnouncement/AppAnnouncement.stories.jsx.map +0 -1
- package/jsx/work/Article/Article.mocks.d.ts +0 -18
- package/jsx/work/Article/Article.mocks.d.ts.map +0 -1
- package/jsx/work/Article/Article.mocks.js +0 -18
- package/jsx/work/Article/Article.mocks.js.map +0 -1
- package/jsx/work/Article/Article.stories.d.ts +0 -18
- package/jsx/work/Article/Article.stories.d.ts.map +0 -1
- package/jsx/work/Article/Article.stories.jsx +0 -243
- package/jsx/work/Article/Article.stories.jsx.map +0 -1
- package/jsx/work/ArticleList/ArticleBuddy.stories.d.ts +0 -12
- package/jsx/work/ArticleList/ArticleBuddy.stories.d.ts.map +0 -1
- package/jsx/work/ArticleList/ArticleBuddy.stories.jsx +0 -87
- package/jsx/work/ArticleList/ArticleBuddy.stories.jsx.map +0 -1
- package/jsx/work/ArticleList/ArticleList.mocks.d.ts +0 -222
- package/jsx/work/ArticleList/ArticleList.mocks.d.ts.map +0 -1
- package/jsx/work/ArticleList/ArticleList.mocks.js +0 -490
- package/jsx/work/ArticleList/ArticleList.mocks.js.map +0 -1
- package/jsx/work/ArticleList/ArticleList.stories.d.ts +0 -15
- package/jsx/work/ArticleList/ArticleList.stories.d.ts.map +0 -1
- package/jsx/work/ArticleList/ArticleList.stories.jsx +0 -517
- package/jsx/work/ArticleList/ArticleList.stories.jsx.map +0 -1
- package/jsx/work/Assignments/Assignments.stories.d.ts +0 -11
- package/jsx/work/Assignments/Assignments.stories.d.ts.map +0 -1
- package/jsx/work/Assignments/Assignments.stories.jsx +0 -64
- package/jsx/work/Assignments/Assignments.stories.jsx.map +0 -1
- package/jsx/work/CaseView/Attachments.mocks.d.ts +0 -3
- package/jsx/work/CaseView/Attachments.mocks.d.ts.map +0 -1
- package/jsx/work/CaseView/Attachments.mocks.jsx +0 -397
- package/jsx/work/CaseView/Attachments.mocks.jsx.map +0 -1
- package/jsx/work/CaseView/CaseView.mocks.d.ts +0 -117
- package/jsx/work/CaseView/CaseView.mocks.d.ts.map +0 -1
- package/jsx/work/CaseView/CaseView.mocks.jsx +0 -642
- package/jsx/work/CaseView/CaseView.mocks.jsx.map +0 -1
- package/jsx/work/CaseView/CaseView.stories.d.ts +0 -6
- package/jsx/work/CaseView/CaseView.stories.d.ts.map +0 -1
- package/jsx/work/CaseView/CaseView.stories.jsx +0 -57
- package/jsx/work/CaseView/CaseView.stories.jsx.map +0 -1
- package/jsx/work/CaseView/Details.mocks.d.ts +0 -3
- package/jsx/work/CaseView/Details.mocks.d.ts.map +0 -1
- package/jsx/work/CaseView/Details.mocks.jsx +0 -21
- package/jsx/work/CaseView/Details.mocks.jsx.map +0 -1
- package/jsx/work/CaseView/Pulse.mocks.d.ts +0 -7
- package/jsx/work/CaseView/Pulse.mocks.d.ts.map +0 -1
- package/jsx/work/CaseView/Pulse.mocks.jsx +0 -35
- package/jsx/work/CaseView/Pulse.mocks.jsx.map +0 -1
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.mocks.d.ts +0 -45
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.mocks.d.ts.map +0 -1
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.mocks.jsx +0 -166
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.mocks.jsx.map +0 -1
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts +0 -5
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts.map +0 -1
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.jsx +0 -24
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.jsx.map +0 -1
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.styles.d.ts +0 -4
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.styles.d.ts.map +0 -1
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.styles.js +0 -11
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.styles.js.map +0 -1
- package/jsx/work/Confirmation/Confirmation.stories.d.ts +0 -13
- package/jsx/work/Confirmation/Confirmation.stories.d.ts.map +0 -1
- package/jsx/work/Confirmation/Confirmation.stories.jsx +0 -39
- package/jsx/work/Confirmation/Confirmation.stories.jsx.map +0 -1
- package/jsx/work/Confirmation/Confirmation.styles.d.ts +0 -2
- package/jsx/work/Confirmation/Confirmation.styles.d.ts.map +0 -1
- package/jsx/work/Confirmation/Confirmation.styles.js +0 -7
- package/jsx/work/Confirmation/Confirmation.styles.js.map +0 -1
- package/jsx/work/Details/Details.stories.d.ts +0 -10
- package/jsx/work/Details/Details.stories.d.ts.map +0 -1
- package/jsx/work/Details/Details.stories.jsx +0 -109
- package/jsx/work/Details/Details.stories.jsx.map +0 -1
- package/jsx/work/DetailsV2/DetailsV2.stories.d.ts +0 -10
- package/jsx/work/DetailsV2/DetailsV2.stories.d.ts.map +0 -1
- package/jsx/work/DetailsV2/DetailsV2.stories.jsx +0 -215
- package/jsx/work/DetailsV2/DetailsV2.stories.jsx.map +0 -1
- package/jsx/work/Glimpse/Glimpse.stories.d.ts +0 -5
- package/jsx/work/Glimpse/Glimpse.stories.d.ts.map +0 -1
- package/jsx/work/Glimpse/Glimpse.stories.jsx +0 -42
- package/jsx/work/Glimpse/Glimpse.stories.jsx.map +0 -1
- package/jsx/work/IntelligentGuidance/IntelligentGuidance.stories.d.ts +0 -5
- package/jsx/work/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +0 -1
- package/jsx/work/IntelligentGuidance/IntelligentGuidance.stories.jsx +0 -115
- package/jsx/work/IntelligentGuidance/IntelligentGuidance.stories.jsx.map +0 -1
- package/jsx/work/InteractionNotification/InteractionNotification.stories.d.ts +0 -13
- package/jsx/work/InteractionNotification/InteractionNotification.stories.d.ts.map +0 -1
- package/jsx/work/InteractionNotification/InteractionNotification.stories.jsx +0 -56
- package/jsx/work/InteractionNotification/InteractionNotification.stories.jsx.map +0 -1
- package/jsx/work/Predictions/Predictions.mocks.d.ts +0 -3
- package/jsx/work/Predictions/Predictions.mocks.d.ts.map +0 -1
- package/jsx/work/Predictions/Predictions.mocks.jsx +0 -18
- package/jsx/work/Predictions/Predictions.mocks.jsx.map +0 -1
- package/jsx/work/Predictions/Predictions.stories.d.ts +0 -5
- package/jsx/work/Predictions/Predictions.stories.d.ts.map +0 -1
- package/jsx/work/Predictions/Predictions.stories.jsx +0 -53
- package/jsx/work/Predictions/Predictions.stories.jsx.map +0 -1
- package/jsx/work/SearchResults/SearchResults.mocks.d.ts +0 -14
- package/jsx/work/SearchResults/SearchResults.mocks.d.ts.map +0 -1
- package/jsx/work/SearchResults/SearchResults.mocks.jsx +0 -97
- package/jsx/work/SearchResults/SearchResults.mocks.jsx.map +0 -1
- package/jsx/work/SearchResults/SearchResults.stories.d.ts +0 -9
- package/jsx/work/SearchResults/SearchResults.stories.d.ts.map +0 -1
- package/jsx/work/SearchResults/SearchResults.stories.jsx +0 -242
- package/jsx/work/SearchResults/SearchResults.stories.jsx.map +0 -1
- package/jsx/work/SearchResults/SearchResults.styles.d.ts +0 -5
- package/jsx/work/SearchResults/SearchResults.styles.d.ts.map +0 -1
- package/jsx/work/SearchResults/SearchResults.styles.js +0 -12
- package/jsx/work/SearchResults/SearchResults.styles.js.map +0 -1
- package/jsx/work/Stages/Stages.mocks.d.ts +0 -14
- package/jsx/work/Stages/Stages.mocks.d.ts.map +0 -1
- package/jsx/work/Stages/Stages.mocks.jsx +0 -40
- package/jsx/work/Stages/Stages.mocks.jsx.map +0 -1
- package/jsx/work/Stages/Stages.stories.d.ts +0 -11
- package/jsx/work/Stages/Stages.stories.d.ts.map +0 -1
- package/jsx/work/Stages/Stages.stories.jsx +0 -45
- package/jsx/work/Stages/Stages.stories.jsx.map +0 -1
- package/jsx/work/Stakeholders/Stakeholders.mocks.d.ts +0 -17
- package/jsx/work/Stakeholders/Stakeholders.mocks.d.ts.map +0 -1
- package/jsx/work/Stakeholders/Stakeholders.mocks.jsx +0 -36
- package/jsx/work/Stakeholders/Stakeholders.mocks.jsx.map +0 -1
- package/jsx/work/Stakeholders/Stakeholders.stories.d.ts +0 -8
- package/jsx/work/Stakeholders/Stakeholders.stories.d.ts.map +0 -1
- package/jsx/work/Stakeholders/Stakeholders.stories.jsx +0 -99
- package/jsx/work/Stakeholders/Stakeholders.stories.jsx.map +0 -1
- package/jsx/work/Tags/Tags.mocks.d.ts +0 -3
- package/jsx/work/Tags/Tags.mocks.d.ts.map +0 -1
- package/jsx/work/Tags/Tags.mocks.js +0 -76
- package/jsx/work/Tags/Tags.mocks.js.map +0 -1
- package/jsx/work/Tags/Tags.stories.d.ts +0 -10
- package/jsx/work/Tags/Tags.stories.d.ts.map +0 -1
- package/jsx/work/Tags/Tags.stories.jsx +0 -66
- package/jsx/work/Tags/Tags.stories.jsx.map +0 -1
- package/jsx/work/Tasks/TaskList.stories.d.ts +0 -5
- package/jsx/work/Tasks/TaskList.stories.d.ts.map +0 -1
- package/jsx/work/Tasks/TaskList.stories.jsx +0 -19
- package/jsx/work/Tasks/TaskList.stories.jsx.map +0 -1
- package/jsx/work/Tasks/Tasks.mocks.d.ts +0 -22
- package/jsx/work/Tasks/Tasks.mocks.d.ts.map +0 -1
- package/jsx/work/Tasks/Tasks.mocks.js +0 -51
- package/jsx/work/Tasks/Tasks.mocks.js.map +0 -1
- package/jsx/work/Tasks/Tasks.stories.d.ts +0 -15
- package/jsx/work/Tasks/Tasks.stories.d.ts.map +0 -1
- package/jsx/work/Tasks/Tasks.stories.jsx +0 -79
- package/jsx/work/Tasks/Tasks.stories.jsx.map +0 -1
- package/jsx/work/Timeline/Timeline.mocks.d.ts +0 -3
- package/jsx/work/Timeline/Timeline.mocks.d.ts.map +0 -1
- package/jsx/work/Timeline/Timeline.mocks.jsx +0 -144
- package/jsx/work/Timeline/Timeline.mocks.jsx.map +0 -1
- package/jsx/work/Timeline/Timeline.stories.d.ts +0 -11
- package/jsx/work/Timeline/Timeline.stories.d.ts.map +0 -1
- package/jsx/work/Timeline/Timeline.stories.jsx +0 -78
- package/jsx/work/Timeline/Timeline.stories.jsx.map +0 -1
- package/jsx/wss/AppShell/AppShell.mocks.d.ts +0 -24
- package/jsx/wss/AppShell/AppShell.mocks.d.ts.map +0 -1
- package/jsx/wss/AppShell/AppShell.mocks.jsx +0 -64
- package/jsx/wss/AppShell/AppShell.mocks.jsx.map +0 -1
- package/jsx/wss/AppShell/AppShell.stories.d.ts +0 -19
- package/jsx/wss/AppShell/AppShell.stories.d.ts.map +0 -1
- package/jsx/wss/AppShell/AppShell.stories.jsx +0 -96
- package/jsx/wss/AppShell/AppShell.stories.jsx.map +0 -1
- package/jsx/wss/AppShell/AppShell.styles.d.ts +0 -2
- package/jsx/wss/AppShell/AppShell.styles.d.ts.map +0 -1
- package/jsx/wss/AppShell/AppShell.styles.js +0 -5
- package/jsx/wss/AppShell/AppShell.styles.js.map +0 -1
- package/jsx/wss/CaseView/CaseView.mocks.d.ts +0 -13
- package/jsx/wss/CaseView/CaseView.mocks.d.ts.map +0 -1
- package/jsx/wss/CaseView/CaseView.mocks.jsx +0 -34
- package/jsx/wss/CaseView/CaseView.mocks.jsx.map +0 -1
- package/jsx/wss/CaseView/CaseView.stories.d.ts +0 -12
- package/jsx/wss/CaseView/CaseView.stories.d.ts.map +0 -1
- package/jsx/wss/CaseView/CaseView.stories.jsx +0 -74
- package/jsx/wss/CaseView/CaseView.stories.jsx.map +0 -1
- package/jsx/wss/PageTemplates/PageTemplates.stories.d.ts +0 -15
- package/jsx/wss/PageTemplates/PageTemplates.stories.d.ts.map +0 -1
- package/jsx/wss/PageTemplates/PageTemplates.stories.jsx +0 -41
- package/jsx/wss/PageTemplates/PageTemplates.stories.jsx.map +0 -1
- package/jsx/wss/QuickCreate/QuickCreate.stories.d.ts +0 -11
- package/jsx/wss/QuickCreate/QuickCreate.stories.d.ts.map +0 -1
- package/jsx/wss/QuickCreate/QuickCreate.stories.jsx +0 -28
- package/jsx/wss/QuickCreate/QuickCreate.stories.jsx.map +0 -1
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import { useCallback, useMemo, useState } from 'react';
|
|
2
|
-
import { StandardDragDropList, DragDropManager } from '@pega/cosmos-react-dnd';
|
|
3
|
-
import { Button, Flex, Icon, useElement } from '@pega/cosmos-react-core';
|
|
4
|
-
import { contentTypes, mockQuery, mockFields, mockGroups, mockViews } from './mockData';
|
|
5
|
-
import ItemConfig from './ItemConfig';
|
|
6
|
-
import SelectionMenu from './SelectionMenu';
|
|
7
|
-
export default ({ items }) => {
|
|
8
|
-
const [mockRawItems, setMockRawItems] = useState(items);
|
|
9
|
-
const [configItemId, setConfigItemId] = useState(null);
|
|
10
|
-
const [configTarget, setConfigTarget] = useElement(null);
|
|
11
|
-
const [selectionMenuTarget, setSelectionMenuTarget] = useElement(null);
|
|
12
|
-
const [selectionConstraint, setSelectionConstraint] = useState();
|
|
13
|
-
const [addToItemId, setAddToItemId] = useState(null);
|
|
14
|
-
const [errors, setErrors] = useState([]);
|
|
15
|
-
const onAddContent = useCallback(async (selected) => {
|
|
16
|
-
setSelectionMenuTarget(null);
|
|
17
|
-
setSelectionConstraint(undefined);
|
|
18
|
-
if (selected.length === 0)
|
|
19
|
-
return;
|
|
20
|
-
const addedItems = await mockQuery({ id: selected.map(({ id }) => id) });
|
|
21
|
-
setMockRawItems(cur => {
|
|
22
|
-
if (addToItemId) {
|
|
23
|
-
return cur.map(item => {
|
|
24
|
-
if (item.id === addToItemId && item.items) {
|
|
25
|
-
return {
|
|
26
|
-
...item,
|
|
27
|
-
items: [
|
|
28
|
-
...item.items,
|
|
29
|
-
...addedItems.map(nestedItem => ({
|
|
30
|
-
...nestedItem,
|
|
31
|
-
id: `${addToItemId}:${nestedItem.id}`
|
|
32
|
-
}))
|
|
33
|
-
]
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
return item;
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
return [...cur, ...addedItems.filter(newItem => !cur.find(({ id }) => id === newItem.id))];
|
|
40
|
-
});
|
|
41
|
-
}, [addToItemId, setSelectionMenuTarget]);
|
|
42
|
-
const onItemConfigure = useCallback((id, e) => {
|
|
43
|
-
setConfigTarget(e.currentTarget);
|
|
44
|
-
setConfigItemId(id);
|
|
45
|
-
}, [setConfigTarget]);
|
|
46
|
-
const onItemRemove = useCallback((id) => {
|
|
47
|
-
setMockRawItems(cur => cur.filter(rawItem => {
|
|
48
|
-
if (rawItem.id === id)
|
|
49
|
-
return false;
|
|
50
|
-
if (rawItem.items && rawItem.items.find(ri => ri.id === id)) {
|
|
51
|
-
rawItem.items = rawItem.items.filter(ri => ri.id !== id);
|
|
52
|
-
}
|
|
53
|
-
return true;
|
|
54
|
-
}));
|
|
55
|
-
}, []);
|
|
56
|
-
const onAddToGroup = useCallback((groupId, e) => {
|
|
57
|
-
setAddToItemId(groupId);
|
|
58
|
-
setSelectionMenuTarget(e.currentTarget);
|
|
59
|
-
setSelectionConstraint({ types: ['Field'] });
|
|
60
|
-
}, [setSelectionMenuTarget]);
|
|
61
|
-
const showSelectionMenu = useCallback((e) => {
|
|
62
|
-
setSelectionMenuTarget(e.currentTarget);
|
|
63
|
-
}, [setSelectionMenuTarget]);
|
|
64
|
-
const onChange = useCallback(updatedItems => {
|
|
65
|
-
setMockRawItems(cur => {
|
|
66
|
-
const findRawItem = (id) => {
|
|
67
|
-
for (let i = 0; i < cur.length; i += 1) {
|
|
68
|
-
if (cur[i].id === id)
|
|
69
|
-
return cur[i];
|
|
70
|
-
if (cur[i].items) {
|
|
71
|
-
const subItem = cur[i].items.find(s => s.id === id);
|
|
72
|
-
if (subItem)
|
|
73
|
-
return subItem;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
return [...mockFields, ...mockViews, ...mockGroups].find(rawItem => rawItem.id === id);
|
|
77
|
-
};
|
|
78
|
-
return updatedItems.map(item => {
|
|
79
|
-
const rawItem = findRawItem(item.id);
|
|
80
|
-
if (item.items) {
|
|
81
|
-
const rawSubItems = item.items.map(subItem => {
|
|
82
|
-
return findRawItem(subItem.id);
|
|
83
|
-
});
|
|
84
|
-
return { ...rawItem, items: rawSubItems };
|
|
85
|
-
}
|
|
86
|
-
return rawItem;
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
}, []);
|
|
90
|
-
const createListItems = useCallback((mci, onATG) => {
|
|
91
|
-
return mci.map(rawItem => {
|
|
92
|
-
const itemError = errors?.find(error => error.rawItemId === rawItem.id);
|
|
93
|
-
const primary = rawItem.type === 'View'
|
|
94
|
-
? {
|
|
95
|
-
text: rawItem.label,
|
|
96
|
-
href: '/some-url',
|
|
97
|
-
onClick: (e) => {
|
|
98
|
-
e.preventDefault();
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
: rawItem.label;
|
|
102
|
-
const baseItem = {
|
|
103
|
-
...rawItem,
|
|
104
|
-
primary,
|
|
105
|
-
secondary: rawItem.subType ?? rawItem.type,
|
|
106
|
-
status: itemError ? { type: 'error', message: itemError.message } : undefined,
|
|
107
|
-
onConfigure: onItemConfigure,
|
|
108
|
-
onRemove: onItemRemove,
|
|
109
|
-
items: undefined
|
|
110
|
-
};
|
|
111
|
-
return rawItem.type === 'Group'
|
|
112
|
-
? {
|
|
113
|
-
...baseItem,
|
|
114
|
-
items: rawItem.items ? createListItems(rawItem.items, onATG) : [],
|
|
115
|
-
accept: 'Field',
|
|
116
|
-
onAddTo: onATG
|
|
117
|
-
}
|
|
118
|
-
: baseItem;
|
|
119
|
-
});
|
|
120
|
-
}, [errors, onItemConfigure, onItemRemove]);
|
|
121
|
-
const itemsToRender = useMemo(() => {
|
|
122
|
-
return createListItems(mockRawItems, onAddToGroup);
|
|
123
|
-
}, [mockRawItems, onAddToGroup, createListItems]);
|
|
124
|
-
return (<>
|
|
125
|
-
<DragDropManager>
|
|
126
|
-
{useMemo(() => (<StandardDragDropList accept={[...contentTypes, 'Field', 'View', 'Group']} heading='Mock view' items={itemsToRender} onChange={onChange} footer={<Button onClick={showSelectionMenu} variant='link'>
|
|
127
|
-
<Flex container={{ inline: true, alignItems: 'center', gap: 1 }}>
|
|
128
|
-
<Icon name='plus'/>
|
|
129
|
-
<span>Add</span>
|
|
130
|
-
</Flex>
|
|
131
|
-
</Button>}/>), [itemsToRender, showSelectionMenu, onChange])}
|
|
132
|
-
</DragDropManager>
|
|
133
|
-
{configTarget && configItemId && (<ItemConfig itemId={configItemId} target={configTarget} onCancel={() => {
|
|
134
|
-
setConfigTarget(null);
|
|
135
|
-
setConfigItemId(null);
|
|
136
|
-
setErrors(currentErrors => {
|
|
137
|
-
const currentItemError = currentErrors?.find(err => err.rawItemId === configItemId);
|
|
138
|
-
return currentItemError
|
|
139
|
-
? currentErrors.filter(err => err.rawItemId !== configItemId)
|
|
140
|
-
: [
|
|
141
|
-
...currentErrors,
|
|
142
|
-
{ rawItemId: configItemId, message: 'Misconfiguration detected' }
|
|
143
|
-
];
|
|
144
|
-
});
|
|
145
|
-
}} onSubmit={() => {
|
|
146
|
-
setConfigTarget(null);
|
|
147
|
-
setConfigItemId(null);
|
|
148
|
-
}}/>)}
|
|
149
|
-
{selectionMenuTarget && (<SelectionMenu target={selectionMenuTarget} constraint={selectionConstraint} onCancel={() => {
|
|
150
|
-
setSelectionMenuTarget(null);
|
|
151
|
-
setAddToItemId(null);
|
|
152
|
-
setSelectionConstraint(undefined);
|
|
153
|
-
}} onSubmit={onAddContent}/>)}
|
|
154
|
-
</>);
|
|
155
|
-
};
|
|
156
|
-
//# sourceMappingURL=Demo.jsx.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Demo.jsx","sourceRoot":"","sources":["../../../src/dnd/StandardDragDropList/Demo.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAK/E,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAGzE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAExF,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAO5C,eAAe,CAAC,EAAE,KAAK,EAAiC,EAAe,EAAE;IAEvE,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAgB,KAAK,CAAC,CAAC;IAEvE,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAA2B,IAAI,CAAC,CAAC;I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BAAsB,CAAC,SAAS,CAAC,CAAC;YACpC,CAAC,CAAC,CACF,QAAQ,CAAC,CAAC,YAAY,CAAC,EACvB,CACH,CACH;IAAA,GAAG,CACJ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useCallback, useMemo, useState } from 'react';\nimport type { MouseEvent } from 'react';\n\nimport { StandardDragDropList, DragDropManager } from '@pega/cosmos-react-dnd';\nimport type {\n StandardDragDropListItemProps,\n StandardDragDropListProps\n} from '@pega/cosmos-react-dnd';\nimport { Button, Flex, Icon, useElement } from '@pega/cosmos-react-core';\nimport type { MultiSelectInputProps } from '@pega/cosmos-react-core/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types';\n\nimport { contentTypes, mockQuery, mockFields, mockGroups, mockViews } from './mockData';\nimport type { MockRawItem } from './mockData';\nimport ItemConfig from './ItemConfig';\nimport SelectionMenu from './SelectionMenu';\nimport type { SelectionMenuProps } from './SelectionMenu';\n\ninterface StandardDragDropListDemoProps {\n items: MockRawItem[];\n}\n\nexport default ({ items }: StandardDragDropListDemoProps): JSX.Element => {\n // The state of the list's content is maintained here and the raw item objects are transformed below prior to render.\n const [mockRawItems, setMockRawItems] = useState<MockRawItem[]>(items);\n\n const [configItemId, setConfigItemId] = useState<MockRawItem['id'] | null>(null);\n\n const [configTarget, setConfigTarget] = useElement(null);\n\n const [selectionMenuTarget, setSelectionMenuTarget] = useElement(null);\n\n const [selectionConstraint, setSelectionConstraint] =\n useState<SelectionMenuProps['constraint']>();\n\n const [addToItemId, setAddToItemId] = useState<MockRawItem['id'] | null>(null);\n\n const [errors, setErrors] = useState<{ rawItemId: MockRawItem['id']; message: string }[]>([]);\n\n const onAddContent = useCallback(\n async (selected: NonNullable<MultiSelectInputProps['selected']>) => {\n setSelectionMenuTarget(null);\n setSelectionConstraint(undefined);\n\n if (selected.length === 0) return;\n\n const addedItems = await mockQuery({ id: selected.map(({ id }) => id) });\n\n setMockRawItems(cur => {\n if (addToItemId) {\n return cur.map(item => {\n if (item.id === addToItemId && item.items) {\n return {\n ...item,\n items: [\n ...item.items,\n ...addedItems.map(nestedItem => ({\n ...nestedItem,\n id: `${addToItemId}:${nestedItem.id}`\n }))\n ]\n };\n }\n return item;\n });\n }\n\n return [...cur, ...addedItems.filter(newItem => !cur.find(({ id }) => id === newItem.id))];\n });\n },\n [addToItemId, setSelectionMenuTarget]\n );\n\n const onItemConfigure = useCallback(\n (id: StandardDragDropListItemProps['id'], e: MouseEvent<HTMLButtonElement>) => {\n setConfigTarget(e.currentTarget);\n setConfigItemId(id);\n },\n [setConfigTarget]\n );\n\n const onItemRemove = useCallback((id: StandardDragDropListItemProps['id']) => {\n setMockRawItems(cur =>\n cur.filter(rawItem => {\n if (rawItem.id === id) return false;\n // See if it's there before setting a new array instance.\n if (rawItem.items && rawItem.items.find(ri => ri.id === id)) {\n rawItem.items = rawItem.items.filter(ri => ri.id !== id);\n }\n return true;\n })\n );\n }, []);\n\n const onAddToGroup = useCallback(\n (groupId: StandardDragDropListItemProps['id'], e: MouseEvent<Element>) => {\n setAddToItemId(groupId);\n setSelectionMenuTarget(e.currentTarget);\n setSelectionConstraint({ types: ['Field'] });\n },\n [setSelectionMenuTarget]\n );\n\n const showSelectionMenu = useCallback(\n (e: MouseEvent<HTMLButtonElement>) => {\n setSelectionMenuTarget(e.currentTarget);\n },\n [setSelectionMenuTarget]\n );\n\n const onChange: StandardDragDropListProps['onChange'] = useCallback(updatedItems => {\n setMockRawItems(cur => {\n const findRawItem = (id: string) => {\n for (let i = 0; i < cur.length; i += 1) {\n if (cur[i].id === id) return cur[i];\n\n if (cur[i].items) {\n const subItem = cur[i].items!.find(s => s.id === id);\n if (subItem) return subItem;\n }\n }\n\n return [...mockFields, ...mockViews, ...mockGroups].find(rawItem => rawItem.id === id)!;\n };\n\n return updatedItems.map(item => {\n const rawItem = findRawItem(item.id);\n\n if (item.items) {\n const rawSubItems = item.items.map(subItem => {\n return findRawItem(subItem.id);\n });\n\n return { ...rawItem, items: rawSubItems };\n }\n\n return rawItem;\n });\n });\n }, []);\n\n const createListItems = useCallback(\n (mci: MockRawItem[], onATG: typeof onAddToGroup): StandardDragDropListProps['items'] => {\n return mci.map(rawItem => {\n const itemError = errors?.find(error => error.rawItemId === rawItem.id);\n\n const primary =\n rawItem.type === 'View'\n ? {\n text: rawItem.label,\n href: '/some-url',\n onClick: (e: MouseEvent) => {\n e.preventDefault();\n // Navigate or present a dialog/panel for clicked item...\n }\n }\n : rawItem.label;\n\n const baseItem: StandardDragDropListItemProps = {\n // type property is being spread in via the mock content item.\n ...rawItem,\n primary,\n secondary: rawItem.subType ?? rawItem.type,\n status: itemError ? { type: 'error', message: itemError.message } : undefined,\n onConfigure: onItemConfigure,\n onRemove: onItemRemove,\n items: undefined\n };\n\n return rawItem.type === 'Group'\n ? {\n ...baseItem,\n items: rawItem.items ? createListItems(rawItem.items, onATG) : [],\n accept: 'Field',\n onAddTo: onATG\n }\n : baseItem;\n });\n },\n [errors, onItemConfigure, onItemRemove]\n );\n\n // Here we transform MockRawItems -> StandardDragDropListProps['items']\n const itemsToRender: StandardDragDropListProps['items'] = useMemo(() => {\n return createListItems(mockRawItems, onAddToGroup);\n }, [mockRawItems, onAddToGroup, createListItems]);\n\n return (\n <>\n <DragDropManager>\n {useMemo(\n () => (\n <StandardDragDropList\n accept={[...contentTypes, 'Field', 'View', 'Group']}\n heading='Mock view'\n items={itemsToRender}\n onChange={onChange}\n footer={\n <Button onClick={showSelectionMenu} variant='link'>\n <Flex container={{ inline: true, alignItems: 'center', gap: 1 }}>\n <Icon name='plus' />\n <span>Add</span>\n </Flex>\n </Button>\n }\n />\n ),\n [itemsToRender, showSelectionMenu, onChange]\n )}\n </DragDropManager>\n {configTarget && configItemId && (\n <ItemConfig\n itemId={configItemId}\n target={configTarget}\n onCancel={() => {\n setConfigTarget(null);\n setConfigItemId(null);\n setErrors(currentErrors => {\n const currentItemError = currentErrors?.find(err => err.rawItemId === configItemId);\n\n return currentItemError\n ? currentErrors.filter(err => err.rawItemId !== configItemId)\n : [\n ...currentErrors,\n { rawItemId: configItemId, message: 'Misconfiguration detected' }\n ];\n });\n }}\n onSubmit={() => {\n setConfigTarget(null);\n setConfigItemId(null);\n }}\n />\n )}\n {selectionMenuTarget && (\n <SelectionMenu\n target={selectionMenuTarget}\n constraint={selectionConstraint}\n onCancel={() => {\n setSelectionMenuTarget(null);\n setAddToItemId(null);\n setSelectionConstraint(undefined);\n }}\n onSubmit={onAddContent}\n />\n )}\n </>\n );\n};\n"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { PopoverProps } from '@pega/cosmos-react-core';
|
|
3
|
-
interface ItemConfigProps {
|
|
4
|
-
target: NonNullable<PopoverProps['target']>;
|
|
5
|
-
onCancel: () => void;
|
|
6
|
-
onSubmit: () => void;
|
|
7
|
-
}
|
|
8
|
-
declare const GroupConfig: ({ target, onCancel, onSubmit }: ItemConfigProps) => import("react").JSX.Element;
|
|
9
|
-
export default GroupConfig;
|
|
10
|
-
//# sourceMappingURL=GroupConfig.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GroupConfig.d.ts","sourceRoot":"","sources":["../../../src/dnd/StandardDragDropList/GroupConfig.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAI5D,UAAU,eAAe;IACvB,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC5C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAWD,QAAA,MAAM,WAAW,mCAAoC,eAAe,gCAenE,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Flex, Input, Select, Option } from '@pega/cosmos-react-core';
|
|
2
|
-
import Popover from './Popover';
|
|
3
|
-
const comparisionTypes = [
|
|
4
|
-
'Integer',
|
|
5
|
-
'Decimal',
|
|
6
|
-
'Currency',
|
|
7
|
-
'Date & time',
|
|
8
|
-
'Date only',
|
|
9
|
-
'Time only'
|
|
10
|
-
];
|
|
11
|
-
const GroupConfig = ({ target, onCancel, onSubmit }) => {
|
|
12
|
-
return (<Popover target={target} heading='Create Group' onCancel={onCancel} onSubmit={onSubmit}>
|
|
13
|
-
<Flex container={{ direction: 'column', gap: 2 }}>
|
|
14
|
-
<Input label='Heading' required/>
|
|
15
|
-
<Select label='Allowed types'>
|
|
16
|
-
<Option value='All'>All</Option>
|
|
17
|
-
{comparisionTypes.map(type => {
|
|
18
|
-
return <Option value={type}>{type}</Option>;
|
|
19
|
-
})}
|
|
20
|
-
</Select>
|
|
21
|
-
<div>Etc...</div>
|
|
22
|
-
</Flex>
|
|
23
|
-
</Popover>);
|
|
24
|
-
};
|
|
25
|
-
export default GroupConfig;
|
|
26
|
-
//# sourceMappingURL=GroupConfig.jsx.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GroupConfig.jsx","sourceRoot":"","sources":["../../../src/dnd/StandardDragDropList/GroupConfig.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAGtE,OAAO,OAAO,MAAM,WAAW,CAAC;AAQhC,MAAM,gBAAgB,GAAG;IACvB,SAAS;IACT,SAAS;IACT,UAAU;IACV,aAAa;IACb,WAAW;IACX,WAAW;CACZ,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAmB,EAAE,EAAE;IACtE,OAAO,CACL,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACrF;MAAA,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAC/C;QAAA,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,EAC/B;QAAA,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,CAC3B;UAAA,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,CAC/B;UAAA,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YAC3B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;QAC9C,CAAC,CAAC,CACJ;QAAA,EAAE,MAAM,CACR;QAAA,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAClB;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,OAAO,CAAC,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { Flex, Input, Select, Option } from '@pega/cosmos-react-core';\nimport type { PopoverProps } from '@pega/cosmos-react-core';\n\nimport Popover from './Popover';\n\ninterface ItemConfigProps {\n target: NonNullable<PopoverProps['target']>;\n onCancel: () => void;\n onSubmit: () => void;\n}\n\nconst comparisionTypes = [\n 'Integer',\n 'Decimal',\n 'Currency',\n 'Date & time',\n 'Date only',\n 'Time only'\n];\n\nconst GroupConfig = ({ target, onCancel, onSubmit }: ItemConfigProps) => {\n return (\n <Popover target={target} heading='Create Group' onCancel={onCancel} onSubmit={onSubmit}>\n <Flex container={{ direction: 'column', gap: 2 }}>\n <Input label='Heading' required />\n <Select label='Allowed types'>\n <Option value='All'>All</Option>\n {comparisionTypes.map(type => {\n return <Option value={type}>{type}</Option>;\n })}\n </Select>\n <div>Etc...</div>\n </Flex>\n </Popover>\n );\n};\n\nexport default GroupConfig;\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { PopoverProps } from '@pega/cosmos-react-core';
|
|
3
|
-
import type { MockRawItem } from './mockData';
|
|
4
|
-
interface ItemConfigProps {
|
|
5
|
-
itemId: MockRawItem['id'];
|
|
6
|
-
target: NonNullable<PopoverProps['target']>;
|
|
7
|
-
onCancel: () => void;
|
|
8
|
-
onSubmit: () => void;
|
|
9
|
-
}
|
|
10
|
-
declare const ItemConfig: ({ itemId, target, onCancel, onSubmit }: ItemConfigProps) => import("react").JSX.Element;
|
|
11
|
-
export default ItemConfig;
|
|
12
|
-
//# sourceMappingURL=ItemConfig.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ItemConfig.d.ts","sourceRoot":"","sources":["../../../src/dnd/StandardDragDropList/ItemConfig.tsx"],"names":[],"mappings":";AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAI5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,UAAU,eAAe;IACvB,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;IAC1B,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC5C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,QAAA,MAAM,UAAU,2CAA4C,eAAe,gCAwB1E,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from 'react';
|
|
2
|
-
import { useI18n } from '@pega/cosmos-react-core';
|
|
3
|
-
import Popover from './Popover';
|
|
4
|
-
import { mockQuery } from './mockData';
|
|
5
|
-
const ItemConfig = ({ itemId, target, onCancel, onSubmit }) => {
|
|
6
|
-
const [item, setItem] = useState(null);
|
|
7
|
-
const [loading, setLoading] = useState(true);
|
|
8
|
-
const t = useI18n();
|
|
9
|
-
useEffect(() => {
|
|
10
|
-
(async () => {
|
|
11
|
-
const [ci] = await mockQuery({ id: itemId, delay: 500 });
|
|
12
|
-
setItem(ci);
|
|
13
|
-
setLoading(false);
|
|
14
|
-
})();
|
|
15
|
-
}, []);
|
|
16
|
-
return (<Popover loading={loading} target={target} heading={!loading && item ? item.label : t('loading')} onCancel={onCancel} onSubmit={onSubmit}>
|
|
17
|
-
<div style={{ margin: 'auto' }}>Configuration for {item?.label}...</div>
|
|
18
|
-
</Popover>);
|
|
19
|
-
};
|
|
20
|
-
export default ItemConfig;
|
|
21
|
-
//# sourceMappingURL=ItemConfig.jsx.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ItemConfig.jsx","sourceRoot":"","sources":["../../../src/dnd/StandardDragDropList/ItemConfig.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAGlD,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAUvC,MAAM,UAAU,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAmB,EAAE,EAAE;IAC7E,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAqB,IAAI,CAAC,CAAC;IAC3D,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC7C,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IAEpB,SAAS,CAAC,GAAG,EAAE;QACb,CAAC,KAAK,IAAI,EAAE;YACV,MAAM,CAAC,EAAE,CAAC,GAAG,MAAM,SAAS,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;YACzD,OAAO,CAAC,EAAE,CAAC,CAAC;YACZ,UAAU,CAAC,KAAK,CAAC,CAAC;QACpB,CAAC,CAAC,EAAE,CAAC;IACP,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,CAAC,OAAO,CACN,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,OAAO,CAAC,CAAC,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CACtD,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAEnB;MAAA,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,kBAAkB,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,EAAE,GAAG,CACzE;IAAA,EAAE,OAAO,CAAC,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import { useEffect, useState } from 'react';\n\nimport { useI18n } from '@pega/cosmos-react-core';\nimport type { PopoverProps } from '@pega/cosmos-react-core';\n\nimport Popover from './Popover';\nimport { mockQuery } from './mockData';\nimport type { MockRawItem } from './mockData';\n\ninterface ItemConfigProps {\n itemId: MockRawItem['id'];\n target: NonNullable<PopoverProps['target']>;\n onCancel: () => void;\n onSubmit: () => void;\n}\n\nconst ItemConfig = ({ itemId, target, onCancel, onSubmit }: ItemConfigProps) => {\n const [item, setItem] = useState<MockRawItem | null>(null);\n const [loading, setLoading] = useState(true);\n const t = useI18n();\n\n useEffect(() => {\n (async () => {\n const [ci] = await mockQuery({ id: itemId, delay: 500 });\n setItem(ci);\n setLoading(false);\n })();\n }, []);\n\n return (\n <Popover\n loading={loading}\n target={target}\n heading={!loading && item ? item.label : t('loading')}\n onCancel={onCancel}\n onSubmit={onSubmit}\n >\n <div style={{ margin: 'auto' }}>Configuration for {item?.label}...</div>\n </Popover>\n );\n};\n\nexport default ItemConfig;\n"]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import type { PopoverProps as CorePopoverProps } from '@pega/cosmos-react-core';
|
|
3
|
-
type PopoverProps = {
|
|
4
|
-
target: NonNullable<CorePopoverProps['target']>;
|
|
5
|
-
loading?: boolean;
|
|
6
|
-
heading: string;
|
|
7
|
-
children?: ReactNode;
|
|
8
|
-
displayHeading?: boolean;
|
|
9
|
-
onCancel: () => void;
|
|
10
|
-
onSubmit: () => void;
|
|
11
|
-
};
|
|
12
|
-
declare const Popover: ({ loading, heading, target, children, displayHeading, onCancel, onSubmit }: PopoverProps) => import("react").JSX.Element;
|
|
13
|
-
export default Popover;
|
|
14
|
-
//# sourceMappingURL=Popover.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/dnd/StandardDragDropList/Popover.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAoBvC,OAAO,KAAK,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhF,KAAK,YAAY,GAAG;IAClB,MAAM,EAAE,WAAW,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC;IAChD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAaF,QAAA,MAAM,OAAO,+EAQV,YAAY,gCAyDd,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { useRef, useEffect, useMemo } from 'react';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
import { Popover as CorePopover, Flex, Button, Text, useI18n, useEscape, useOuterEvent, CardHeader, CardFooter, CardContent, Progress, useFocusTrap, useUID, getFocusables, VisuallyHiddenText } from '@pega/cosmos-react-core';
|
|
4
|
-
const StyledContent = styled(CardContent) `
|
|
5
|
-
overflow: auto;
|
|
6
|
-
`;
|
|
7
|
-
const StyledPopover = styled(CorePopover) `
|
|
8
|
-
position: relative;
|
|
9
|
-
width: min(100vh, 60ch);
|
|
10
|
-
min-height: 6rem;
|
|
11
|
-
max-height: calc(100vh - 2rem);
|
|
12
|
-
`;
|
|
13
|
-
const Popover = ({ loading, heading, target, children, displayHeading = true, onCancel, onSubmit }) => {
|
|
14
|
-
const t = useI18n();
|
|
15
|
-
const headingId = useUID();
|
|
16
|
-
const ref = useRef(null);
|
|
17
|
-
useOuterEvent('mousedown', [ref], onCancel);
|
|
18
|
-
useEscape(onCancel);
|
|
19
|
-
useFocusTrap(ref);
|
|
20
|
-
useEffect(() => {
|
|
21
|
-
getFocusables(ref)[0]?.focus();
|
|
22
|
-
}, []);
|
|
23
|
-
const header = useMemo(() => {
|
|
24
|
-
if (loading)
|
|
25
|
-
return;
|
|
26
|
-
const h2 = (<Text variant='h2' id={headingId}>
|
|
27
|
-
{displayHeading ? heading : <VisuallyHiddenText>{heading}</VisuallyHiddenText>}
|
|
28
|
-
</Text>);
|
|
29
|
-
return displayHeading ? <CardHeader>{h2}</CardHeader> : h2;
|
|
30
|
-
}, [loading, heading, headingId, displayHeading]);
|
|
31
|
-
return (<Flex role='dialog' aria-labelledby={headingId} container={{ direction: 'column' }} as={StyledPopover} target={target} arrow ref={ref}>
|
|
32
|
-
{header}
|
|
33
|
-
|
|
34
|
-
<Flex item={{ grow: 1 }} as={StyledContent}>
|
|
35
|
-
{!loading && children}
|
|
36
|
-
</Flex>
|
|
37
|
-
|
|
38
|
-
{!loading && (<CardFooter container={{ justify: 'between' }}>
|
|
39
|
-
<Button autoFocus onClick={onCancel}>
|
|
40
|
-
{t('cancel')}
|
|
41
|
-
</Button>
|
|
42
|
-
<Button variant='primary' onClick={onSubmit}>
|
|
43
|
-
{t('submit')}
|
|
44
|
-
</Button>
|
|
45
|
-
</CardFooter>)}
|
|
46
|
-
|
|
47
|
-
{loading && <Progress placement='local' message={t('loading')}/>}
|
|
48
|
-
</Flex>);
|
|
49
|
-
};
|
|
50
|
-
export default Popover;
|
|
51
|
-
//# sourceMappingURL=Popover.jsx.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.jsx","sourceRoot":"","sources":["../../../src/dnd/StandardDragDropList/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EACL,OAAO,IAAI,WAAW,EACtB,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,OAAO,EACP,SAAS,EACT,aAAa,EACb,UAAU,EACV,UAAU,EACV,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,aAAa,EACb,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAajC,MAAM,aAAa,GAAG,MAAM,CAAC,WAAW,CAAC,CAAA;;CAExC,CAAC;AAEF,MAAM,aAAa,GAAG,MAAM,CAAC,WAAW,CAAC,CAAA;;;;;CAKxC,CAAC;AAEF,MAAM,OAAO,GAAG,CAAC,EACf,OAAO,EACP,OAAO,EACP,MAAM,EACN,QAAQ,EACR,cAAc,GAAG,IAAI,EACrB,QAAQ,EACR,QAAQ,EACK,EAAE,EAAE;IACjB,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IACpB,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC;IAC3B,MAAM,GAAG,GAAG,MAAM,CAAc,IAAI,CAAC,CAAC;IAEtC,aAAa,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,EAAE,QAAQ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AQ,CACvB;MAAA,EAAE,IAAI,CAEN;;MAAA,CAAC,CAAC,OAAO,IAAI,CACX,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAC5C;UAAA,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAClC;YAAA,CAAC,CAAC,CAAC,QAAQ,CAAC,CACd;UAAA,EAAE,MAAM,CACR;UAAA,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAC1C;YAAA,CAAC,CAAC,CAAC,QAAQ,CAAC,CACd;UAAA,EAAE,MAAM,CACV;QAAA,EAAE,UAAU,CAAC,CACd,CAED;;MAAA,CAAC,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,EAAG,CACnE;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC","sourcesContent":["import { useRef, useEffect, useMemo } from 'react';\nimport type { ReactNode } from 'react';\nimport styled from 'styled-components';\n\nimport {\n Popover as CorePopover,\n Flex,\n Button,\n Text,\n useI18n,\n useEscape,\n useOuterEvent,\n CardHeader,\n CardFooter,\n CardContent,\n Progress,\n useFocusTrap,\n useUID,\n getFocusables,\n VisuallyHiddenText\n} from '@pega/cosmos-react-core';\nimport type { PopoverProps as CorePopoverProps } from '@pega/cosmos-react-core';\n\ntype PopoverProps = {\n target: NonNullable<CorePopoverProps['target']>;\n loading?: boolean;\n heading: string;\n children?: ReactNode;\n displayHeading?: boolean;\n onCancel: () => void;\n onSubmit: () => void;\n};\n\nconst StyledContent = styled(CardContent)`\n overflow: auto;\n`;\n\nconst StyledPopover = styled(CorePopover)`\n position: relative;\n width: min(100vh, 60ch);\n min-height: 6rem;\n max-height: calc(100vh - 2rem);\n`;\n\nconst Popover = ({\n loading,\n heading,\n target,\n children,\n displayHeading = true,\n onCancel,\n onSubmit\n}: PopoverProps) => {\n const t = useI18n();\n const headingId = useUID();\n const ref = useRef<HTMLElement>(null);\n\n useOuterEvent('mousedown', [ref], onCancel);\n\n useEscape(onCancel);\n\n useFocusTrap(ref);\n\n useEffect(() => {\n getFocusables(ref)[0]?.focus();\n }, []);\n\n const header = useMemo(() => {\n if (loading) return;\n\n const h2 = (\n <Text variant='h2' id={headingId}>\n {displayHeading ? heading : <VisuallyHiddenText>{heading}</VisuallyHiddenText>}\n </Text>\n );\n\n return displayHeading ? <CardHeader>{h2}</CardHeader> : h2;\n }, [loading, heading, headingId, displayHeading]);\n\n return (\n <Flex\n role='dialog'\n aria-labelledby={headingId}\n container={{ direction: 'column' }}\n as={StyledPopover}\n target={target}\n arrow\n ref={ref}\n >\n {header}\n\n <Flex item={{ grow: 1 }} as={StyledContent}>\n {!loading && children}\n </Flex>\n\n {!loading && (\n <CardFooter container={{ justify: 'between' }}>\n <Button autoFocus onClick={onCancel}>\n {t('cancel')}\n </Button>\n <Button variant='primary' onClick={onSubmit}>\n {t('submit')}\n </Button>\n </CardFooter>\n )}\n\n {loading && <Progress placement='local' message={t('loading')} />}\n </Flex>\n );\n};\n\nexport default Popover;\n"]}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { PopoverProps } from '@pega/cosmos-react-core';
|
|
3
|
-
import type { MultiSelectInputProps } from '@pega/cosmos-react-core/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types';
|
|
4
|
-
import type { ContentType, FieldType } from './mockData';
|
|
5
|
-
export interface SelectionMenuProps {
|
|
6
|
-
target: NonNullable<PopoverProps['target']>;
|
|
7
|
-
constraint?: {
|
|
8
|
-
types?: ContentType[];
|
|
9
|
-
subTypes?: FieldType[];
|
|
10
|
-
};
|
|
11
|
-
onCancel: () => void;
|
|
12
|
-
onSubmit: (selected: NonNullable<MultiSelectInputProps['selected']>) => void;
|
|
13
|
-
}
|
|
14
|
-
declare const SelectionMenu: ({ target, constraint, onCancel: onClose, onSubmit }: SelectionMenuProps) => import("react").JSX.Element;
|
|
15
|
-
export default SelectionMenu;
|
|
16
|
-
//# sourceMappingURL=SelectionMenu.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SelectionMenu.d.ts","sourceRoot":"","sources":["../../../src/dnd/StandardDragDropList/SelectionMenu.tsx"],"names":[],"mappings":";AAYA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE3E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yFAAyF,CAAC;AAGrI,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAGzD,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC5C,UAAU,CAAC,EAAE;QACX,KAAK,CAAC,EAAE,WAAW,EAAE,CAAC;QACtB,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAC;KACxB,CAAC;IACF,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC,KAAK,IAAI,CAAC;CAC9E;AAeD,QAAA,MAAM,aAAa,wDAAyD,kBAAkB,gCAwI7F,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { useCallback, useState } from 'react';
|
|
2
|
-
import styled, { css } from 'styled-components';
|
|
3
|
-
import { defaultThemeProp, Flex, Menu, menuHelpers, useElement, useI18n } from '@pega/cosmos-react-core';
|
|
4
|
-
import MultiSelectInput from '@pega/cosmos-react-core/lib/components/ComboBox/MultiSelectInput/MultiSelectInput';
|
|
5
|
-
import { mockQuery } from './mockData';
|
|
6
|
-
import Popover from './Popover';
|
|
7
|
-
const StyledSelectionMenu = styled(Menu)(({ theme }) => {
|
|
8
|
-
return css `
|
|
9
|
-
margin-inline: calc(-2 * ${theme.base.spacing});
|
|
10
|
-
`;
|
|
11
|
-
});
|
|
12
|
-
StyledSelectionMenu.defaultProps = defaultThemeProp;
|
|
13
|
-
const rootMenuItems = [
|
|
14
|
-
{ id: 'fields', primary: 'Fields', items: [] },
|
|
15
|
-
{ id: 'views', primary: 'Views', items: [] }
|
|
16
|
-
];
|
|
17
|
-
const SelectionMenu = ({ target, constraint, onCancel: onClose, onSubmit }) => {
|
|
18
|
-
const t = useI18n();
|
|
19
|
-
const [loading, setLoading] = useState(false);
|
|
20
|
-
const [filterValue, setFilterValue] = useState('');
|
|
21
|
-
const [inputEl, setInputEl] = useElement(null);
|
|
22
|
-
const [menuItems, setMenuItems] = useState(() => {
|
|
23
|
-
if (constraint?.types) {
|
|
24
|
-
const constrainedTypes = [];
|
|
25
|
-
if (constraint.types.includes('Field')) {
|
|
26
|
-
constrainedTypes.push(rootMenuItems[0]);
|
|
27
|
-
}
|
|
28
|
-
if (constraint.types.includes('View')) {
|
|
29
|
-
constrainedTypes.push(rootMenuItems[1]);
|
|
30
|
-
}
|
|
31
|
-
return constrainedTypes;
|
|
32
|
-
}
|
|
33
|
-
return rootMenuItems;
|
|
34
|
-
});
|
|
35
|
-
const [selected, setSelected] = useState(() => []);
|
|
36
|
-
const onItemExpand = useCallback(async (id) => {
|
|
37
|
-
const expandedItem = menuHelpers.getItem(menuItems, id);
|
|
38
|
-
if (!expandedItem || (expandedItem.items && expandedItem.items.length > 0)) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
setLoading(true);
|
|
42
|
-
const subItems = await mockQuery({
|
|
43
|
-
type: id === 'fields' ? 'Field' : 'View',
|
|
44
|
-
delay: 1000
|
|
45
|
-
});
|
|
46
|
-
const newMenuItems = menuHelpers.mapItem(menuItems, id, item => {
|
|
47
|
-
return {
|
|
48
|
-
...item,
|
|
49
|
-
items: subItems.map(subItem => ({
|
|
50
|
-
id: subItem.id,
|
|
51
|
-
primary: subItem.label,
|
|
52
|
-
selected: !!selected.find(s => s.id === subItem.id)
|
|
53
|
-
}))
|
|
54
|
-
};
|
|
55
|
-
});
|
|
56
|
-
setMenuItems(newMenuItems);
|
|
57
|
-
setLoading(false);
|
|
58
|
-
}, [menuItems, selected]);
|
|
59
|
-
const onFilter = useCallback(async (e) => {
|
|
60
|
-
const val = e.currentTarget.value;
|
|
61
|
-
setFilterValue(val);
|
|
62
|
-
if (val) {
|
|
63
|
-
setLoading(true);
|
|
64
|
-
setMenuItems([]);
|
|
65
|
-
const matchedItems = await mockQuery({
|
|
66
|
-
filter: val,
|
|
67
|
-
delay: 1000
|
|
68
|
-
});
|
|
69
|
-
setMenuItems(matchedItems.map(matchedItem => {
|
|
70
|
-
return {
|
|
71
|
-
id: matchedItem.id,
|
|
72
|
-
primary: matchedItem.label,
|
|
73
|
-
secondary: [matchedItem.subType ?? matchedItem.type],
|
|
74
|
-
selected: !!selected.find(s => s.id === matchedItem.id)
|
|
75
|
-
};
|
|
76
|
-
}));
|
|
77
|
-
setLoading(false);
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
setMenuItems(rootMenuItems);
|
|
81
|
-
}, []);
|
|
82
|
-
const onItemClick = useCallback((id) => {
|
|
83
|
-
setSelected(cur => {
|
|
84
|
-
if (cur.find(s => s.id === id)) {
|
|
85
|
-
return cur.filter(sel => sel.id !== id);
|
|
86
|
-
}
|
|
87
|
-
return [
|
|
88
|
-
...cur,
|
|
89
|
-
{ id, text: menuHelpers.getItem(menuItems, id).primary }
|
|
90
|
-
];
|
|
91
|
-
});
|
|
92
|
-
setMenuItems(cur => menuHelpers.toggleSelected(cur, id));
|
|
93
|
-
}, [menuItems]);
|
|
94
|
-
return (<Popover target={target} heading='Content selection' onCancel={onClose} onSubmit={() => {
|
|
95
|
-
onSubmit(selected);
|
|
96
|
-
}}>
|
|
97
|
-
<Flex container={{ direction: 'column', gap: 2, pad: [1, 0] }}>
|
|
98
|
-
<MultiSelectInput ref={setInputEl} placeholder={t('search_placeholder_default')} value={filterValue} selected={selected} onChange={onFilter} onRemove={onItemClick}/>
|
|
99
|
-
<StyledSelectionMenu focusControlEl={inputEl ?? undefined} mode='multi-select' items={menuItems} scrollAt={10} loading={loading} onItemClick={onItemClick} onItemExpand={onItemExpand}/>
|
|
100
|
-
</Flex>
|
|
101
|
-
</Popover>);
|
|
102
|
-
};
|
|
103
|
-
export default SelectionMenu;
|
|
104
|
-
//# sourceMappingURL=SelectionMenu.jsx.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SelectionMenu.jsx","sourceRoot":"","sources":["../../../src/dnd/StandardDragDropList/SelectionMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE9C,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,gBAAgB,EAChB,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,UAAU,EACV,OAAO,EACR,MAAM,yBAAyB,CAAC;AAEjC,OAAO,gBAAgB,MAAM,mFAAmF,CAAC;AAGjH,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,OAAO,MAAM,WAAW,CAAC;AAYhC,MAAM,mBAAmB,GAAgB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAClE,OAAO,GAAG,CAAA;+BACmB,KAAK,CAAC,IAAI,CAAC,OAAO;GAC9C,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,mBAAmB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEpD,MAAM,aAAa,GAAoB;IACrC,EAAE,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE;IAC9C,EAAE,EAAE,EA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CACL,CAAC,OAAO,CACN,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,OAAO,CAAC,mBAAmB,CAC3B,QAAQ,CAAC,CAAC,OAAO,CAAC,CAClB,QAAQ,CAAC,CAAC,GAAG,EAAE;YACb,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACrB,CAAC,CAAC,CAEF;MAAA,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAC5D;QAAA,CAAC,gBAAgB,CACf,GAAG,CAAC,CAAC,UAAU,CAAC,CAChB,WAAW,CAAC,CAAC,CAAC,CAAC,4BAA4B,CAAC,CAAC,CAC7C,KAAK,CAAC,CAAC,WAAW,CAAC,CACnB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,QAAQ,CAAC,CAAC,WAAW,CAAC,EAExB;QAAA,CAAC,mBAAmB,CAClB,cAAc,CAAC,CAAC,OAAO,IAAI,SAAS,CAAC,CACrC,IAAI,CAAC,cAAc,CACnB,KAAK,CAAC,CAAC,SAAS,CAAC,CACjB,QAAQ,CAAC,CAAC,EAAE,CAAC,CACb,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,YAAY,CAAC,CAAC,YAAY,CAAC,EAE/B;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,OAAO,CAAC,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import { useCallback, useState } from 'react';\nimport type { ChangeEvent } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n defaultThemeProp,\n Flex,\n Menu,\n menuHelpers,\n useElement,\n useI18n\n} from '@pega/cosmos-react-core';\nimport type { MenuItemProps, PopoverProps } from '@pega/cosmos-react-core';\nimport MultiSelectInput from '@pega/cosmos-react-core/lib/components/ComboBox/MultiSelectInput/MultiSelectInput';\nimport type { MultiSelectInputProps } from '@pega/cosmos-react-core/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types';\n\nimport { mockQuery } from './mockData';\nimport type { ContentType, FieldType } from './mockData';\nimport Popover from './Popover';\n\nexport interface SelectionMenuProps {\n target: NonNullable<PopoverProps['target']>;\n constraint?: {\n types?: ContentType[];\n subTypes?: FieldType[];\n };\n onCancel: () => void;\n onSubmit: (selected: NonNullable<MultiSelectInputProps['selected']>) => void;\n}\n\nconst StyledSelectionMenu: typeof Menu = styled(Menu)(({ theme }) => {\n return css`\n margin-inline: calc(-2 * ${theme.base.spacing});\n `;\n});\n\nStyledSelectionMenu.defaultProps = defaultThemeProp;\n\nconst rootMenuItems: MenuItemProps[] = [\n { id: 'fields', primary: 'Fields', items: [] },\n { id: 'views', primary: 'Views', items: [] }\n];\n\nconst SelectionMenu = ({ target, constraint, onCancel: onClose, onSubmit }: SelectionMenuProps) => {\n const t = useI18n();\n const [loading, setLoading] = useState(false);\n const [filterValue, setFilterValue] = useState('');\n const [inputEl, setInputEl] = useElement<HTMLElement>(null);\n\n const [menuItems, setMenuItems] = useState<MenuItemProps[]>(() => {\n if (constraint?.types) {\n const constrainedTypes = [];\n if (constraint.types.includes('Field')) {\n constrainedTypes.push(rootMenuItems[0]);\n }\n if (constraint.types.includes('View')) {\n constrainedTypes.push(rootMenuItems[1]);\n }\n\n return constrainedTypes;\n }\n\n return rootMenuItems;\n });\n\n const [selected, setSelected] = useState<NonNullable<MultiSelectInputProps['selected']>>(\n () => []\n );\n\n const onItemExpand = useCallback(\n async (id: MenuItemProps['id']) => {\n const expandedItem = menuHelpers.getItem(menuItems, id);\n if (!expandedItem || (expandedItem.items && expandedItem.items.length > 0)) {\n return;\n }\n\n setLoading(true);\n\n const subItems = await mockQuery({\n type: id === 'fields' ? 'Field' : 'View',\n delay: 1000\n });\n\n const newMenuItems = menuHelpers.mapItem(menuItems, id, item => {\n return {\n ...item,\n items: subItems.map(subItem => ({\n id: subItem.id,\n primary: subItem.label,\n selected: !!selected.find(s => s.id === subItem.id)\n }))\n };\n });\n\n setMenuItems(newMenuItems as MenuItemProps[]);\n setLoading(false);\n },\n [menuItems, selected]\n );\n\n const onFilter = useCallback(async (e: ChangeEvent<HTMLInputElement>) => {\n const val = e.currentTarget.value;\n setFilterValue(val);\n\n if (val) {\n setLoading(true);\n setMenuItems([]);\n\n const matchedItems = await mockQuery({\n filter: val,\n delay: 1000\n });\n\n setMenuItems(\n matchedItems.map(matchedItem => {\n return {\n id: matchedItem.id,\n primary: matchedItem.label,\n secondary: [matchedItem.subType ?? matchedItem.type],\n selected: !!selected.find(s => s.id === matchedItem.id)\n };\n })\n );\n\n setLoading(false);\n return;\n }\n\n setMenuItems(rootMenuItems);\n }, []);\n\n const onItemClick = useCallback(\n (id: MenuItemProps['id']) => {\n setSelected(cur => {\n if (cur.find(s => s.id === id)) {\n return cur.filter(sel => sel.id !== id);\n }\n\n return [\n ...cur,\n { id, text: (menuHelpers.getItem(menuItems, id) as MenuItemProps).primary }\n ];\n });\n\n setMenuItems(cur => menuHelpers.toggleSelected(cur, id) as MenuItemProps[]);\n },\n [menuItems]\n );\n\n return (\n <Popover\n target={target}\n heading='Content selection'\n onCancel={onClose}\n onSubmit={() => {\n onSubmit(selected);\n }}\n >\n <Flex container={{ direction: 'column', gap: 2, pad: [1, 0] }}>\n <MultiSelectInput\n ref={setInputEl}\n placeholder={t('search_placeholder_default')}\n value={filterValue}\n selected={selected}\n onChange={onFilter}\n onRemove={onItemClick}\n />\n <StyledSelectionMenu\n focusControlEl={inputEl ?? undefined}\n mode='multi-select'\n items={menuItems}\n scrollAt={10}\n loading={loading}\n onItemClick={onItemClick}\n onItemExpand={onItemExpand}\n />\n </Flex>\n </Popover>\n );\n};\n\nexport default SelectionMenu;\n"]}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { StoryFn } from '@storybook/react';
|
|
2
|
-
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
|
|
3
|
-
export default _default;
|
|
4
|
-
export declare const StandardDragDropListDemo: StoryFn;
|
|
5
|
-
//# sourceMappingURL=StandardDragDropList.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StandardDragDropList.stories.d.ts","sourceRoot":"","sources":["../../../src/dnd/StandardDragDropList/StandardDragDropList.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,OAAO,EAAE,MAAM,kBAAkB,CAAC;;AAQtD,wBAGU;AAEV,eAAO,MAAM,wBAAwB,EAAE,OAWtC,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { StandardDragDropList } from '@pega/cosmos-react-dnd';
|
|
2
|
-
import { Flex } from '@pega/cosmos-react-core';
|
|
3
|
-
import StandardListDemoComp from './Demo';
|
|
4
|
-
import { mockFields, mockViews, mockGroups } from './mockData';
|
|
5
|
-
export default {
|
|
6
|
-
title: 'DnD/StandardDragDropList',
|
|
7
|
-
component: StandardDragDropList
|
|
8
|
-
};
|
|
9
|
-
export const StandardDragDropListDemo = () => {
|
|
10
|
-
return (<Flex container={{ direction: 'column', gap: 2 }}>
|
|
11
|
-
<StandardListDemoComp items={[...mockFields.slice(0, 3), ...mockViews.slice(0, 2), mockGroups[0]]}/>
|
|
12
|
-
<StandardListDemoComp items={[...mockFields.slice(3, 6), ...mockViews.slice(2, 4), mockGroups[1], mockGroups[2]]}/>
|
|
13
|
-
</Flex>);
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=StandardDragDropList.stories.jsx.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StandardDragDropList.stories.jsx","sourceRoot":"","sources":["../../../src/dnd/StandardDragDropList/StandardDragDropList.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAE/C,OAAO,oBAAoB,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE/D,eAAe;IACb,KAAK,EAAE,0BAA0B;IACjC,SAAS,EAAE,oBAAoB;CACxB,CAAC;AAEV,MAAM,CAAC,MAAM,wBAAwB,GAAY,GAAG,EAAE;IACpD,OAAO,CACL,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAC/C;MAAA,CAAC,oBAAoB,CACnB,KAAK,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,EAE9E;MAAA,CAAC,oBAAoB,CACnB,KAAK,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,EAE/F;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\n\nimport { StandardDragDropList } from '@pega/cosmos-react-dnd';\nimport { Flex } from '@pega/cosmos-react-core';\n\nimport StandardListDemoComp from './Demo';\nimport { mockFields, mockViews, mockGroups } from './mockData';\n\nexport default {\n title: 'DnD/StandardDragDropList',\n component: StandardDragDropList\n} as Meta;\n\nexport const StandardDragDropListDemo: StoryFn = () => {\n return (\n <Flex container={{ direction: 'column', gap: 2 }}>\n <StandardListDemoComp\n items={[...mockFields.slice(0, 3), ...mockViews.slice(0, 2), mockGroups[0]]}\n />\n <StandardListDemoComp\n items={[...mockFields.slice(3, 6), ...mockViews.slice(2, 4), mockGroups[1], mockGroups[2]]}\n />\n </Flex>\n );\n};\n"]}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export type ContentType = 'Field' | 'View' | 'Group';
|
|
2
|
-
export type FieldType = (typeof fieldTypes)[number];
|
|
3
|
-
export interface MockRawItem {
|
|
4
|
-
id: string;
|
|
5
|
-
label: string;
|
|
6
|
-
type: ContentType;
|
|
7
|
-
subType?: FieldType;
|
|
8
|
-
items?: MockRawItem[];
|
|
9
|
-
}
|
|
10
|
-
export interface MockQueryParams {
|
|
11
|
-
id?: MockRawItem['id'] | MockRawItem['id'][];
|
|
12
|
-
filter?: string;
|
|
13
|
-
type?: ContentType;
|
|
14
|
-
subType?: FieldType;
|
|
15
|
-
limit?: number;
|
|
16
|
-
offset?: number;
|
|
17
|
-
delay?: number;
|
|
18
|
-
}
|
|
19
|
-
declare const fieldTypes: readonly ["Text (single line)", "Text (paragraph)", "Integer", "Decimal", "Currency", "Boolean", "Date & time", "Date only", "Time only", "Email", "Phone", "URL", "Picklist"];
|
|
20
|
-
export declare const contentTypes: readonly ["Text (single line)", "Text (paragraph)", "Integer", "Decimal", "Currency", "Boolean", "Date & time", "Date only", "Time only", "Email", "Phone", "URL", "Picklist", "View", "Group"];
|
|
21
|
-
export declare const mockFields: MockRawItem[];
|
|
22
|
-
export declare const mockViews: MockRawItem[];
|
|
23
|
-
export declare const mockGroups: MockRawItem[];
|
|
24
|
-
export declare const mockQuery: ({ id, filter, type, subType, limit, offset, delay }?: MockQueryParams) => Promise<MockRawItem[]>;
|
|
25
|
-
export {};
|
|
26
|
-
//# sourceMappingURL=mockData.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mockData.d.ts","sourceRoot":"","sources":["../../../src/dnd/StandardDragDropList/mockData.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;AACrD,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAGpD,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,WAAW,EAAE,CAAC;CACvB;AAGD,MAAM,WAAW,eAAe;IAC9B,EAAE,CAAC,EAAE,WAAW,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAQD,QAAA,MAAM,UAAU,gLAcN,CAAC;AAEX,eAAO,MAAM,YAAY,iMAA4C,CAAC;AAEtE,eAAO,MAAM,UAAU,EAAE,WAAW,EAOlC,CAAC;AAEH,eAAO,MAAM,SAAS,EAAE,WAAW,EAMjC,CAAC;AAEH,eAAO,MAAM,UAAU,EAAE,WAAW,EAOlC,CAAC;AAGH,eAAO,MAAM,SAAS,yDAQnB,eAAe,KAAQ,QAAQ,WAAW,EAAE,CAiC9C,CAAC"}
|