@pega/cosmos-react-demos 2.1.5 → 3.0.0-dev.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/jsx/build/AppHeader/AppHeader.stories.d.ts +2 -1
- package/jsx/build/AppHeader/AppHeader.stories.d.ts.map +1 -1
- package/jsx/build/AppHeader/AppHeader.stories.jsx +46 -13
- package/jsx/build/AppHeader/AppHeader.stories.jsx.map +1 -1
- package/jsx/build/AppShell/AppShell.stories.d.ts +2 -1
- package/jsx/build/AppShell/AppShell.stories.d.ts.map +1 -1
- package/jsx/build/AppShell/AppShell.stories.jsx +46 -13
- package/jsx/build/AppShell/AppShell.stories.jsx.map +1 -1
- package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts +6 -0
- package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts.map +1 -0
- package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.jsx +64 -0
- package/jsx/build/DynamicContentEditor/DynamicContentEditor.stories.jsx.map +1 -0
- package/jsx/build/DynamicContentEditor/FieldSelector.d.ts +11 -0
- package/jsx/build/DynamicContentEditor/FieldSelector.d.ts.map +1 -0
- package/jsx/build/DynamicContentEditor/FieldSelector.jsx +80 -0
- package/jsx/build/DynamicContentEditor/FieldSelector.jsx.map +1 -0
- package/jsx/build/ItemLibrary/LibraryPicker.mocks.d.ts +7 -0
- package/jsx/build/ItemLibrary/LibraryPicker.mocks.d.ts.map +1 -0
- package/jsx/build/ItemLibrary/LibraryPicker.mocks.js +50 -0
- package/jsx/build/ItemLibrary/LibraryPicker.mocks.js.map +1 -0
- package/jsx/build/ItemLibrary/LibraryPicker.stories.d.ts +9 -0
- package/jsx/build/ItemLibrary/LibraryPicker.stories.d.ts.map +1 -0
- package/jsx/build/ItemLibrary/LibraryPicker.stories.jsx +45 -0
- package/jsx/build/ItemLibrary/LibraryPicker.stories.jsx.map +1 -0
- package/jsx/build/LifeCycle/LifeCycle.mocks.js +1 -1
- package/jsx/build/LifeCycle/LifeCycle.mocks.js.map +1 -1
- package/jsx/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -1
- package/jsx/build/LifeCycle/LifeCycle.stories.jsx +52 -34
- package/jsx/build/LifeCycle/LifeCycle.stories.jsx.map +1 -1
- package/jsx/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/jsx/build/PageTemplates/PageTemplates.stories.jsx +6 -10
- package/jsx/build/PageTemplates/PageTemplates.stories.jsx.map +1 -1
- package/jsx/build/Workbench/Workbench.stories.d.ts.map +1 -1
- package/jsx/build/Workbench/Workbench.stories.jsx +11 -13
- package/jsx/build/Workbench/Workbench.stories.jsx.map +1 -1
- package/jsx/core/AppShell/AppShell.stories.d.ts +5 -0
- package/jsx/core/AppShell/AppShell.stories.d.ts.map +1 -1
- package/jsx/core/AppShell/AppShell.stories.jsx +25 -1
- package/jsx/core/AppShell/AppShell.stories.jsx.map +1 -1
- package/jsx/core/Avatar/Avatar.stories.d.ts +5 -0
- package/jsx/core/Avatar/Avatar.stories.d.ts.map +1 -1
- package/jsx/core/Avatar/Avatar.stories.jsx +32 -5
- package/jsx/core/Avatar/Avatar.stories.jsx.map +1 -1
- package/jsx/core/Badges/Status.stories.d.ts +5 -0
- package/jsx/core/Badges/Status.stories.d.ts.map +1 -1
- package/jsx/core/Badges/Status.stories.jsx +25 -1
- package/jsx/core/Badges/Status.stories.jsx.map +1 -1
- package/jsx/core/Banner/Banner.stories.d.ts +5 -1
- package/jsx/core/Banner/Banner.stories.d.ts.map +1 -1
- package/jsx/core/Banner/Banner.stories.jsx +24 -3
- package/jsx/core/Banner/Banner.stories.jsx.map +1 -1
- package/jsx/core/Button/Button.stories.d.ts +8 -0
- package/jsx/core/Button/Button.stories.d.ts.map +1 -1
- package/jsx/core/Button/Button.stories.jsx +30 -1
- package/jsx/core/Button/Button.stories.jsx.map +1 -1
- package/jsx/core/Card/Card.stories.d.ts +5 -0
- package/jsx/core/Card/Card.stories.d.ts.map +1 -1
- package/jsx/core/Card/Card.stories.jsx +30 -1
- package/jsx/core/Card/Card.stories.jsx.map +1 -1
- package/jsx/core/Checkbox/Checkbox.stories.d.ts +12 -0
- package/jsx/core/Checkbox/Checkbox.stories.d.ts.map +1 -1
- package/jsx/core/Checkbox/Checkbox.stories.jsx +54 -1
- package/jsx/core/Checkbox/Checkbox.stories.jsx.map +1 -1
- package/jsx/core/Configuration/Configuration.stories.d.ts +17 -0
- package/jsx/core/Configuration/Configuration.stories.d.ts.map +1 -1
- package/jsx/core/Configuration/Configuration.stories.jsx +94 -3
- package/jsx/core/Configuration/Configuration.stories.jsx.map +1 -1
- package/jsx/core/Currency/Currency.stories.d.ts +5 -2
- package/jsx/core/Currency/Currency.stories.d.ts.map +1 -1
- package/jsx/core/Currency/Currency.stories.jsx +30 -12
- package/jsx/core/Currency/Currency.stories.jsx.map +1 -1
- package/jsx/core/File/FileInput.stories.d.ts.map +1 -1
- package/jsx/core/File/FileInput.stories.jsx +1 -1
- package/jsx/core/File/FileInput.stories.jsx.map +1 -1
- package/jsx/core/Form/Form.mocks.d.ts.map +1 -1
- package/jsx/core/Form/Form.mocks.jsx +2 -2
- package/jsx/core/Form/Form.mocks.jsx.map +1 -1
- package/jsx/core/Form/Form.stories.d.ts +10 -0
- package/jsx/core/Form/Form.stories.d.ts.map +1 -1
- package/jsx/core/Form/Form.stories.jsx +42 -2
- package/jsx/core/Form/Form.stories.jsx.map +1 -1
- package/jsx/core/Input/Input.stories.d.ts +9 -0
- package/jsx/core/Input/Input.stories.d.ts.map +1 -1
- package/jsx/core/Input/Input.stories.jsx +40 -1
- package/jsx/core/Input/Input.stories.jsx.map +1 -1
- package/jsx/core/Label/Label.stories.d.ts +4 -0
- package/jsx/core/Label/Label.stories.d.ts.map +1 -1
- package/jsx/core/Label/Label.stories.jsx +18 -1
- package/jsx/core/Label/Label.stories.jsx.map +1 -1
- package/jsx/core/Modal/Modal.mocks.d.ts.map +1 -1
- package/jsx/core/Modal/Modal.mocks.jsx +3 -3
- package/jsx/core/Modal/Modal.mocks.jsx.map +1 -1
- package/jsx/core/Modal/Modal.stories.d.ts.map +1 -1
- package/jsx/core/Modal/Modal.stories.jsx +29 -43
- package/jsx/core/Modal/Modal.stories.jsx.map +1 -1
- package/jsx/core/Number/Number.stories.d.ts +3 -3
- package/jsx/core/Number/Number.stories.d.ts.map +1 -1
- package/jsx/core/Number/Number.stories.jsx +14 -13
- package/jsx/core/Number/Number.stories.jsx.map +1 -1
- package/jsx/core/PageTemplates/PageTemplates.stories.d.ts +5 -3
- package/jsx/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/jsx/core/PageTemplates/PageTemplates.stories.jsx +106 -30
- package/jsx/core/PageTemplates/PageTemplates.stories.jsx.map +1 -1
- package/jsx/core/Progress/Progress.stories.d.ts +4 -0
- package/jsx/core/Progress/Progress.stories.d.ts.map +1 -1
- package/jsx/core/Progress/Progress.stories.jsx +22 -1
- package/jsx/core/Progress/Progress.stories.jsx.map +1 -1
- package/jsx/core/RadioButton/RadioButton.stories.d.ts +12 -0
- package/jsx/core/RadioButton/RadioButton.stories.d.ts.map +1 -1
- package/jsx/core/RadioButton/RadioButton.stories.jsx +53 -1
- package/jsx/core/RadioButton/RadioButton.stories.jsx.map +1 -1
- package/jsx/core/Rating/Rating.stories.d.ts +4 -0
- package/jsx/core/Rating/Rating.stories.d.ts.map +1 -1
- package/jsx/core/Rating/Rating.stories.jsx +18 -1
- package/jsx/core/Rating/Rating.stories.jsx.map +1 -1
- package/jsx/core/SearchInput/SearchInput.stories.d.ts +4 -0
- package/jsx/core/SearchInput/SearchInput.stories.d.ts.map +1 -1
- package/jsx/core/SearchInput/SearchInput.stories.jsx +18 -1
- package/jsx/core/SearchInput/SearchInput.stories.jsx.map +1 -1
- package/jsx/core/Select/Select.stories.d.ts +8 -0
- package/jsx/core/Select/Select.stories.d.ts.map +1 -1
- package/jsx/core/Select/Select.stories.jsx +35 -1
- package/jsx/core/Select/Select.stories.jsx.map +1 -1
- package/jsx/core/Sentiment/Sentiment.stories.d.ts +6 -0
- package/jsx/core/Sentiment/Sentiment.stories.d.ts.map +1 -1
- package/jsx/core/Sentiment/Sentiment.stories.jsx +32 -1
- package/jsx/core/Sentiment/Sentiment.stories.jsx.map +1 -1
- package/jsx/core/Switch/Switch.stories.d.ts +7 -0
- package/jsx/core/Switch/Switch.stories.d.ts.map +1 -1
- package/jsx/core/Switch/Switch.stories.jsx +34 -1
- package/jsx/core/Switch/Switch.stories.jsx.map +1 -1
- package/jsx/core/Table/Table.mocks.d.ts +6 -0
- package/jsx/core/Table/Table.mocks.d.ts.map +1 -1
- package/jsx/core/Table/Table.mocks.jsx +134 -0
- package/jsx/core/Table/Table.mocks.jsx.map +1 -1
- package/jsx/core/Table/Table.stories.d.ts +25 -0
- package/jsx/core/Table/Table.stories.d.ts.map +1 -1
- package/jsx/core/Table/Table.stories.jsx +120 -1
- package/jsx/core/Table/Table.stories.jsx.map +1 -1
- package/jsx/core/Tabs/Tabs.stories.d.ts +5 -0
- package/jsx/core/Tabs/Tabs.stories.d.ts.map +1 -1
- package/jsx/core/Tabs/Tabs.stories.jsx +39 -1
- package/jsx/core/Tabs/Tabs.stories.jsx.map +1 -1
- package/jsx/core/Text/Text.stories.d.ts +19 -0
- package/jsx/core/Text/Text.stories.d.ts.map +1 -1
- package/jsx/core/Text/Text.stories.jsx +112 -1
- package/jsx/core/Text/Text.stories.jsx.map +1 -1
- package/jsx/core/TextArea/TextArea.stories.d.ts +5 -0
- package/jsx/core/TextArea/TextArea.stories.d.ts.map +1 -1
- package/jsx/core/TextArea/TextArea.stories.jsx +22 -1
- package/jsx/core/TextArea/TextArea.stories.jsx.map +1 -1
- package/jsx/core/Toaster/Toaster.stories.jsx +17 -12
- package/jsx/core/Toaster/Toaster.stories.jsx.map +1 -1
- package/jsx/core/Tooltip/Tooltip.stories.d.ts +6 -0
- package/jsx/core/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/jsx/core/Tooltip/Tooltip.stories.jsx +28 -1
- package/jsx/core/Tooltip/Tooltip.stories.jsx.map +1 -1
- package/jsx/cs/CSCaseView/CSAppShell.stories.d.ts +1 -1
- package/jsx/cs/CSCaseView/CSAppShell.stories.d.ts.map +1 -1
- package/jsx/cs/CSCaseView/CSAppShell.stories.jsx +10 -10
- package/jsx/cs/CSCaseView/CSAppShell.stories.jsx.map +1 -1
- package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -1
- package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx +20 -18
- package/jsx/cs/IntelligentGuidance/IntelligentGuidance.stories.jsx.map +1 -1
- package/jsx/cs/TaskManager/TaskManager.mocks.d.ts +1 -2
- package/jsx/cs/TaskManager/TaskManager.mocks.d.ts.map +1 -1
- package/jsx/cs/TaskManager/TaskManager.mocks.js +5 -10
- package/jsx/cs/TaskManager/TaskManager.mocks.js.map +1 -1
- package/jsx/cs/TaskManager/TaskManager.stories.d.ts +8 -3
- package/jsx/cs/TaskManager/TaskManager.stories.d.ts.map +1 -1
- package/jsx/cs/TaskManager/TaskManager.stories.jsx +165 -133
- package/jsx/cs/TaskManager/TaskManager.stories.jsx.map +1 -1
- package/jsx/rte/Editor/Editor.stories.jsx +1 -1
- package/jsx/rte/Editor/Editor.stories.jsx.map +1 -1
- package/jsx/social/Email/Email.mocks.d.ts +20 -4
- package/jsx/social/Email/Email.mocks.d.ts.map +1 -1
- package/jsx/social/Email/{Email.mocks.jsx → Email.mocks.js} +50 -4
- package/jsx/social/Email/Email.mocks.js.map +1 -0
- package/jsx/social/Email/Email.stories.d.ts +1 -1
- package/jsx/social/Email/Email.stories.d.ts.map +1 -1
- package/jsx/social/Email/Email.stories.jsx +64 -22
- package/jsx/social/Email/Email.stories.jsx.map +1 -1
- package/jsx/social/Feed/Feed.stories.d.ts.map +1 -1
- package/jsx/social/Feed/Feed.stories.jsx +1 -1
- package/jsx/social/Feed/Feed.stories.jsx.map +1 -1
- package/jsx/work/CaseView/CaseView.mocks.d.ts.map +1 -1
- package/jsx/work/CaseView/CaseView.mocks.jsx +1 -1
- package/jsx/work/CaseView/CaseView.mocks.jsx.map +1 -1
- package/jsx/work/CaseView/CaseView.stories.d.ts.map +1 -1
- package/jsx/work/CaseView/CaseView.stories.jsx +7 -7
- package/jsx/work/CaseView/CaseView.stories.jsx.map +1 -1
- package/jsx/work/CaseView/Details.mocks.d.ts.map +1 -1
- package/jsx/work/CaseView/Details.mocks.jsx +1 -1
- package/jsx/work/CaseView/Details.mocks.jsx.map +1 -1
- package/jsx/work/CaseView/Pulse.mocks.d.ts.map +1 -1
- package/jsx/work/CaseView/Pulse.mocks.jsx +1 -1
- package/jsx/work/CaseView/Pulse.mocks.jsx.map +1 -1
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts.map +1 -1
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.jsx +1 -1
- package/jsx/work/ConfigurableLayout/ConfigurableLayout.stories.jsx.map +1 -1
- package/jsx/work/Confirmation/Confirmation.stories.d.ts.map +1 -1
- package/jsx/work/Confirmation/Confirmation.stories.jsx +2 -2
- package/jsx/work/Confirmation/Confirmation.stories.jsx.map +1 -1
- package/jsx/work/Details/Details.stories.d.ts.map +1 -1
- package/jsx/work/Details/Details.stories.jsx +21 -16
- package/jsx/work/Details/Details.stories.jsx.map +1 -1
- package/jsx/work/SearchResults/SearchResults.stories.d.ts.map +1 -1
- package/jsx/work/SearchResults/SearchResults.stories.jsx +1 -1
- package/jsx/work/SearchResults/SearchResults.stories.jsx.map +1 -1
- package/jsx/work/Stakeholders/Stakeholders.mocks.d.ts.map +1 -1
- package/jsx/work/Stakeholders/Stakeholders.mocks.jsx +2 -2
- package/jsx/work/Stakeholders/Stakeholders.mocks.jsx.map +1 -1
- package/lib/build/AppHeader/AppHeader.stories.d.ts +2 -1
- package/lib/build/AppHeader/AppHeader.stories.d.ts.map +1 -1
- package/lib/build/AppHeader/AppHeader.stories.js +46 -13
- package/lib/build/AppHeader/AppHeader.stories.js.map +1 -1
- package/lib/build/AppShell/AppShell.stories.d.ts +2 -1
- package/lib/build/AppShell/AppShell.stories.d.ts.map +1 -1
- package/lib/build/AppShell/AppShell.stories.js +46 -13
- package/lib/build/AppShell/AppShell.stories.js.map +1 -1
- package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts +6 -0
- package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.d.ts.map +1 -0
- package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.js +48 -0
- package/lib/build/DynamicContentEditor/DynamicContentEditor.stories.js.map +1 -0
- package/lib/build/DynamicContentEditor/FieldSelector.d.ts +14 -0
- package/lib/build/DynamicContentEditor/FieldSelector.d.ts.map +1 -0
- package/lib/build/DynamicContentEditor/FieldSelector.js +81 -0
- package/lib/build/DynamicContentEditor/FieldSelector.js.map +1 -0
- package/lib/build/ItemLibrary/LibraryPicker.mocks.d.ts +7 -0
- package/lib/build/ItemLibrary/LibraryPicker.mocks.d.ts.map +1 -0
- package/lib/build/ItemLibrary/LibraryPicker.mocks.js +50 -0
- package/lib/build/ItemLibrary/LibraryPicker.mocks.js.map +1 -0
- package/lib/build/ItemLibrary/LibraryPicker.stories.d.ts +9 -0
- package/lib/build/ItemLibrary/LibraryPicker.stories.d.ts.map +1 -0
- package/lib/build/ItemLibrary/LibraryPicker.stories.js +40 -0
- package/lib/build/ItemLibrary/LibraryPicker.stories.js.map +1 -0
- package/lib/build/LifeCycle/LifeCycle.mocks.js +1 -1
- package/lib/build/LifeCycle/LifeCycle.mocks.js.map +1 -1
- package/lib/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -1
- package/lib/build/LifeCycle/LifeCycle.stories.js +52 -48
- package/lib/build/LifeCycle/LifeCycle.stories.js.map +1 -1
- package/lib/build/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/lib/build/PageTemplates/PageTemplates.stories.js +6 -6
- package/lib/build/PageTemplates/PageTemplates.stories.js.map +1 -1
- package/lib/build/Workbench/Workbench.stories.d.ts.map +1 -1
- package/lib/build/Workbench/Workbench.stories.js +16 -18
- package/lib/build/Workbench/Workbench.stories.js.map +1 -1
- package/lib/core/AppShell/AppShell.stories.d.ts +5 -0
- package/lib/core/AppShell/AppShell.stories.d.ts.map +1 -1
- package/lib/core/AppShell/AppShell.stories.js +23 -1
- package/lib/core/AppShell/AppShell.stories.js.map +1 -1
- package/lib/core/Avatar/Avatar.stories.d.ts +5 -0
- package/lib/core/Avatar/Avatar.stories.d.ts.map +1 -1
- package/lib/core/Avatar/Avatar.stories.js +30 -5
- package/lib/core/Avatar/Avatar.stories.js.map +1 -1
- package/lib/core/Badges/Status.stories.d.ts +5 -0
- package/lib/core/Badges/Status.stories.d.ts.map +1 -1
- package/lib/core/Badges/Status.stories.js +23 -1
- package/lib/core/Badges/Status.stories.js.map +1 -1
- package/lib/core/Banner/Banner.stories.d.ts +5 -1
- package/lib/core/Banner/Banner.stories.d.ts.map +1 -1
- package/lib/core/Banner/Banner.stories.js +20 -3
- package/lib/core/Banner/Banner.stories.js.map +1 -1
- package/lib/core/Button/Button.stories.d.ts +8 -0
- package/lib/core/Button/Button.stories.d.ts.map +1 -1
- package/lib/core/Button/Button.stories.js +28 -1
- package/lib/core/Button/Button.stories.js.map +1 -1
- package/lib/core/Card/Card.stories.d.ts +5 -0
- package/lib/core/Card/Card.stories.d.ts.map +1 -1
- package/lib/core/Card/Card.stories.js +19 -1
- package/lib/core/Card/Card.stories.js.map +1 -1
- package/lib/core/Checkbox/Checkbox.stories.d.ts +12 -0
- package/lib/core/Checkbox/Checkbox.stories.d.ts.map +1 -1
- package/lib/core/Checkbox/Checkbox.stories.js +52 -1
- package/lib/core/Checkbox/Checkbox.stories.js.map +1 -1
- package/lib/core/Configuration/Configuration.stories.d.ts +17 -0
- package/lib/core/Configuration/Configuration.stories.d.ts.map +1 -1
- package/lib/core/Configuration/Configuration.stories.js +62 -3
- package/lib/core/Configuration/Configuration.stories.js.map +1 -1
- package/lib/core/Currency/Currency.stories.d.ts +5 -2
- package/lib/core/Currency/Currency.stories.d.ts.map +1 -1
- package/lib/core/Currency/Currency.stories.js +30 -12
- package/lib/core/Currency/Currency.stories.js.map +1 -1
- package/lib/core/File/FileInput.stories.d.ts.map +1 -1
- package/lib/core/File/FileInput.stories.js +1 -1
- package/lib/core/File/FileInput.stories.js.map +1 -1
- package/lib/core/Form/Form.mocks.d.ts.map +1 -1
- package/lib/core/Form/Form.mocks.js +2 -2
- package/lib/core/Form/Form.mocks.js.map +1 -1
- package/lib/core/Form/Form.stories.d.ts +10 -0
- package/lib/core/Form/Form.stories.d.ts.map +1 -1
- package/lib/core/Form/Form.stories.js +40 -2
- package/lib/core/Form/Form.stories.js.map +1 -1
- package/lib/core/Input/Input.stories.d.ts +9 -0
- package/lib/core/Input/Input.stories.d.ts.map +1 -1
- package/lib/core/Input/Input.stories.js +38 -1
- package/lib/core/Input/Input.stories.js.map +1 -1
- package/lib/core/Label/Label.stories.d.ts +4 -0
- package/lib/core/Label/Label.stories.d.ts.map +1 -1
- package/lib/core/Label/Label.stories.js +16 -1
- package/lib/core/Label/Label.stories.js.map +1 -1
- package/lib/core/Modal/Modal.mocks.d.ts.map +1 -1
- package/lib/core/Modal/Modal.mocks.js +3 -3
- package/lib/core/Modal/Modal.mocks.js.map +1 -1
- package/lib/core/Modal/Modal.stories.d.ts.map +1 -1
- package/lib/core/Modal/Modal.stories.js +14 -14
- package/lib/core/Modal/Modal.stories.js.map +1 -1
- package/lib/core/Number/Number.stories.d.ts +3 -3
- package/lib/core/Number/Number.stories.d.ts.map +1 -1
- package/lib/core/Number/Number.stories.js +14 -13
- package/lib/core/Number/Number.stories.js.map +1 -1
- package/lib/core/PageTemplates/PageTemplates.stories.d.ts +5 -3
- package/lib/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/lib/core/PageTemplates/PageTemplates.stories.js +95 -27
- package/lib/core/PageTemplates/PageTemplates.stories.js.map +1 -1
- package/lib/core/Progress/Progress.stories.d.ts +4 -0
- package/lib/core/Progress/Progress.stories.d.ts.map +1 -1
- package/lib/core/Progress/Progress.stories.js +18 -1
- package/lib/core/Progress/Progress.stories.js.map +1 -1
- package/lib/core/RadioButton/RadioButton.stories.d.ts +12 -0
- package/lib/core/RadioButton/RadioButton.stories.d.ts.map +1 -1
- package/lib/core/RadioButton/RadioButton.stories.js +51 -1
- package/lib/core/RadioButton/RadioButton.stories.js.map +1 -1
- package/lib/core/Rating/Rating.stories.d.ts +4 -0
- package/lib/core/Rating/Rating.stories.d.ts.map +1 -1
- package/lib/core/Rating/Rating.stories.js +16 -1
- package/lib/core/Rating/Rating.stories.js.map +1 -1
- package/lib/core/SearchInput/SearchInput.stories.d.ts +4 -0
- package/lib/core/SearchInput/SearchInput.stories.d.ts.map +1 -1
- package/lib/core/SearchInput/SearchInput.stories.js +16 -1
- package/lib/core/SearchInput/SearchInput.stories.js.map +1 -1
- package/lib/core/Select/Select.stories.d.ts +8 -0
- package/lib/core/Select/Select.stories.d.ts.map +1 -1
- package/lib/core/Select/Select.stories.js +28 -1
- package/lib/core/Select/Select.stories.js.map +1 -1
- package/lib/core/Sentiment/Sentiment.stories.d.ts +6 -0
- package/lib/core/Sentiment/Sentiment.stories.d.ts.map +1 -1
- package/lib/core/Sentiment/Sentiment.stories.js +29 -2
- package/lib/core/Sentiment/Sentiment.stories.js.map +1 -1
- package/lib/core/Switch/Switch.stories.d.ts +7 -0
- package/lib/core/Switch/Switch.stories.d.ts.map +1 -1
- package/lib/core/Switch/Switch.stories.js +32 -1
- package/lib/core/Switch/Switch.stories.js.map +1 -1
- package/lib/core/Table/Table.mocks.d.ts +6 -0
- package/lib/core/Table/Table.mocks.d.ts.map +1 -1
- package/lib/core/Table/Table.mocks.js +134 -0
- package/lib/core/Table/Table.mocks.js.map +1 -1
- package/lib/core/Table/Table.stories.d.ts +25 -0
- package/lib/core/Table/Table.stories.d.ts.map +1 -1
- package/lib/core/Table/Table.stories.js +113 -1
- package/lib/core/Table/Table.stories.js.map +1 -1
- package/lib/core/Tabs/Tabs.stories.d.ts +5 -0
- package/lib/core/Tabs/Tabs.stories.d.ts.map +1 -1
- package/lib/core/Tabs/Tabs.stories.js +30 -1
- package/lib/core/Tabs/Tabs.stories.js.map +1 -1
- package/lib/core/Text/Text.stories.d.ts +19 -0
- package/lib/core/Text/Text.stories.d.ts.map +1 -1
- package/lib/core/Text/Text.stories.js +102 -2
- package/lib/core/Text/Text.stories.js.map +1 -1
- package/lib/core/TextArea/TextArea.stories.d.ts +5 -0
- package/lib/core/TextArea/TextArea.stories.d.ts.map +1 -1
- package/lib/core/TextArea/TextArea.stories.js +20 -1
- package/lib/core/TextArea/TextArea.stories.js.map +1 -1
- package/lib/core/Toaster/Toaster.stories.js +15 -19
- package/lib/core/Toaster/Toaster.stories.js.map +1 -1
- package/lib/core/Tooltip/Tooltip.stories.d.ts +6 -0
- package/lib/core/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/lib/core/Tooltip/Tooltip.stories.js +20 -1
- package/lib/core/Tooltip/Tooltip.stories.js.map +1 -1
- package/lib/cs/CSCaseView/CSAppShell.stories.d.ts +1 -1
- package/lib/cs/CSCaseView/CSAppShell.stories.d.ts.map +1 -1
- package/lib/cs/CSCaseView/CSAppShell.stories.js +10 -10
- package/lib/cs/CSCaseView/CSAppShell.stories.js.map +1 -1
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.d.ts.map +1 -1
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js +20 -18
- package/lib/cs/IntelligentGuidance/IntelligentGuidance.stories.js.map +1 -1
- package/lib/cs/TaskManager/TaskManager.mocks.d.ts +1 -2
- package/lib/cs/TaskManager/TaskManager.mocks.d.ts.map +1 -1
- package/lib/cs/TaskManager/TaskManager.mocks.js +5 -10
- package/lib/cs/TaskManager/TaskManager.mocks.js.map +1 -1
- package/lib/cs/TaskManager/TaskManager.stories.d.ts +8 -3
- package/lib/cs/TaskManager/TaskManager.stories.d.ts.map +1 -1
- package/lib/cs/TaskManager/TaskManager.stories.js +143 -120
- package/lib/cs/TaskManager/TaskManager.stories.js.map +1 -1
- package/lib/rte/Editor/Editor.stories.js +1 -1
- package/lib/rte/Editor/Editor.stories.js.map +1 -1
- package/lib/social/Email/Email.mocks.d.ts +20 -4
- package/lib/social/Email/Email.mocks.d.ts.map +1 -1
- package/lib/social/Email/Email.mocks.js +49 -4
- package/lib/social/Email/Email.mocks.js.map +1 -1
- package/lib/social/Email/Email.stories.d.ts +1 -1
- package/lib/social/Email/Email.stories.d.ts.map +1 -1
- package/lib/social/Email/Email.stories.js +47 -22
- package/lib/social/Email/Email.stories.js.map +1 -1
- package/lib/social/Feed/Feed.stories.d.ts.map +1 -1
- package/lib/social/Feed/Feed.stories.js +1 -1
- package/lib/social/Feed/Feed.stories.js.map +1 -1
- package/lib/work/CaseView/CaseView.mocks.d.ts.map +1 -1
- package/lib/work/CaseView/CaseView.mocks.js +1 -1
- package/lib/work/CaseView/CaseView.mocks.js.map +1 -1
- package/lib/work/CaseView/CaseView.stories.d.ts.map +1 -1
- package/lib/work/CaseView/CaseView.stories.js +7 -7
- package/lib/work/CaseView/CaseView.stories.js.map +1 -1
- package/lib/work/CaseView/Details.mocks.d.ts.map +1 -1
- package/lib/work/CaseView/Details.mocks.js +1 -1
- package/lib/work/CaseView/Details.mocks.js.map +1 -1
- package/lib/work/CaseView/Pulse.mocks.d.ts.map +1 -1
- package/lib/work/CaseView/Pulse.mocks.js +1 -1
- package/lib/work/CaseView/Pulse.mocks.js.map +1 -1
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.d.ts.map +1 -1
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.js +1 -1
- package/lib/work/ConfigurableLayout/ConfigurableLayout.stories.js.map +1 -1
- package/lib/work/Confirmation/Confirmation.stories.d.ts.map +1 -1
- package/lib/work/Confirmation/Confirmation.stories.js +2 -2
- package/lib/work/Confirmation/Confirmation.stories.js.map +1 -1
- package/lib/work/Details/Details.stories.d.ts.map +1 -1
- package/lib/work/Details/Details.stories.js +56 -53
- package/lib/work/Details/Details.stories.js.map +1 -1
- package/lib/work/SearchResults/SearchResults.stories.d.ts.map +1 -1
- package/lib/work/SearchResults/SearchResults.stories.js +1 -1
- package/lib/work/SearchResults/SearchResults.stories.js.map +1 -1
- package/lib/work/Stakeholders/Stakeholders.mocks.d.ts.map +1 -1
- package/lib/work/Stakeholders/Stakeholders.mocks.js +2 -2
- package/lib/work/Stakeholders/Stakeholders.mocks.js.map +1 -1
- package/package.json +16 -16
- package/jsx/social/Email/Email.mocks.jsx.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Editor.stories.js","sourceRoot":"","sources":["../../../src/rte/Editor/Editor.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAGlD,OAAO,EACL,MAAM,EACN,IAAI,EACJ,WAAW,EACX,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,QAAQ,EACT,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAe,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAE7D,eAAe;IACb,KAAK,EAAE,YAAY;IACnB,SAAS,EAAE,MAAM;CACV,CAAC;AAEV,MAAM,KAAK,GAAG,kBAAkB,CAAC;AAEjC,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,MAAM,SAAS,GAAG,MAAM,CAAc,IAAI,CAAC,CAAC;IAE5C,MAAM,YAAY,GAAG,CAAC,KAAW,EAAE,EAAU,EAAE,EAAE;QAC/C,MAAM,GAAG,GAAG,GAAG,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QACvC,SAAS,CAAC,OAAO,EAAE,WAAW,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,IAAI,EAAE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EAAE,GAAG,EAAE,CAAC,EAAE,aAC9C,MAAC,IAAI,eACH,KAAC,WAAW,cACV,KAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,WAAI,WACrD,EACd,KAAC,UAAU,cACT,KAAC,MAAM,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,oDAE3D,WACE,YACR,EACP,KAAC,MAAM,IACL,YAAY,EAAE,IAAI,EAClB,YAAY,EAAE,YAAY,EAC1B,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,CAAC,gBAAgB,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,CAAC,WAC3F,YACG,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta } from '@storybook/react';\nimport { useState, useRef } from 'react';\nimport ReactDOM from 'react-dom';\nimport { action } from '@storybook/addon-actions';\nimport { Editor as TinymceEditor } from 'tinymce';\n\nimport {\n Button,\n Card,\n CardContent,\n CardFooter,\n Flex,\n Text,\n TextArea\n} from '@pega/cosmos-react-core';\nimport { EditorState, Editor } from '@pega/cosmos-react-rte';\n\nexport default {\n title: 'RTE/Editor',\n component: Editor\n} as Meta;\n\nconst label = 'Form field label';\n\nexport const EditorDemo = () => {\n const editorRef = useRef<EditorState>(null);\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n editorRef.current?.appendImage({ src, alt: image.name }, id);\n };\n\n return (\n <Editor\n ref={editorRef}\n label={label}\n toolbar={['inline-styling', 'lists', 'indentation', 'images', 'links']}\n onFocus={action('Editor focused')}\n onBlur={action('Editor blurred')}\n onImageAdded={onImageAdded}\n defaultValue='<body><p>Hi mom <a href=\"https://google.com\">link</a></p></body>'\n />\n );\n};\n\nexport const EmptyEditorDemo = () => {\n const editorRef = useRef<EditorState>(null);\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n editorRef.current?.appendImage({ src, alt: image.name }, id);\n };\n\n return (\n <Editor\n ref={editorRef}\n label={label}\n toolbar={['inline-styling', 'lists', 'indentation', 'images', 'links']}\n onImageAdded={onImageAdded}\n onFocus={action('Editor has focus')}\n onBlur={action('Editor has blurred')}\n placeholder='Type some stuff in here'\n />\n );\n};\n\nexport const ReadonlyFormField = () => {\n return (\n <Editor\n label={label}\n readOnly\n defaultValue={`<article class=\"main-page-content\" lang=\"en-US\"><h1>HTML: HyperText Markup Language</h1><div><p><strong>HTML</strong> (HyperText Markup Language) is the most basic building block of the Web. It defines the meaning and structure of web content. Other technologies besides HTML are generally used to describe a web page's appearance/presentation (<a href=\"/en-US/docs/Web/CSS\">CSS</a>) or functionality/behavior (<a href=\"/en-US/docs/Web/JavaScript\">JavaScript</a>).</p>\n <p>\"Hypertext\" refers to links that connect web pages to one another, either within a single website or between websites. Links are a fundamental aspect of the Web. By uploading content to the Internet and linking it to pages created by other people, you become an active participant in the World Wide Web.</p>\n <p>HTML uses \"markup\" to annotate text, images, and other content for display in a Web browser. HTML markup includes special \"elements\" such as <a href=\"/en-US/docs/Web/HTML/Element/head\"><code><head></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/title\"><code><title></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/body\"><code><body></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/header\"><code><header></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/footer\"><code><footer></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/article\"><code><article></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/section\"><code><section></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/p\"><code><p></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/div\"><code><div></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/span\"><code><span></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/img\"><code><img></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/aside\"><code><aside></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/audio\"><code><audio></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/canvas\"><code><canvas></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/datalist\"><code><datalist></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/details\"><code><details></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/embed\"><code><embed></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/nav\"><code><nav></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/output\"><code><output></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/progress\"><code><progress></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/video\"><code><video></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/ul\"><code><ul></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/ol\"><code><ol></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/li\"><code><li></code></a> and many others.</p>\n <p>An HTML element is set off from other text in a document by \"tags\", which consist of the element name surrounded by \"<code><</code>\" and \"<code>></code>\". The name of an element inside a tag is case insensitive. That is, it can be written in uppercase, lowercase, or a mixture. For example, the <code><title></code> tag can be written as <code><Title></code>, <code><TITLE></code>, or in any other way.</p>\n\n <div id=\"on-github\" class=\"on-github\"><h3>Found a problem with this page?</h3><ul><li><a href=\"https://github.com/mdn/content/edit/main/files/en-us/web/html/index.md\" title=\"You're going to need to sign in to GitHub first (Opens in a new tab)\" target=\"_blank\" rel=\"noopener noreferrer\">Edit on <b>GitHub</b></a></li><li><a href=\"https://github.com/mdn/content/blob/main/files/en-us/web/html/index.md\" title=\"Folder: en-us/web/html (Opens in a new tab)\" target=\"_blank\" rel=\"noopener noreferrer\">Source on <b>GitHub</b></a></li><li><a href=\"https://github.com/mdn/content/issues/new?body=MDN+URL%3A+https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FHTML%0A%0A%23%23%23%23+What+information+was+incorrect%2C+unhelpful%2C+or+incomplete%3F%0A%0A%0A%23%23%23%23+Specific+section+or+headline%3F%0A%0A%0A%23%23%23%23+What+did+you+expect+to+see%3F%0A%0A%0A%23%23%23%23+Did+you+test+this%3F+If+so%2C+how%3F%0A%0A%0A%3C%21--+Do+not+make+changes+below+this+line+--%3E%0A%3Cdetails%3E%0A%3Csummary%3EMDN+Content+page+report+details%3C%2Fsummary%3E%0A%0A*+Folder%3A+%60en-us%2Fweb%2Fhtml%60%0A*+MDN+URL%3A+https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FHTML%0A*+GitHub+URL%3A+https%3A%2F%2Fgithub.com%2Fmdn%2Fcontent%2Fblob%2Fmain%2Ffiles%2Fen-us%2Fweb%2Fhtml%2Findex.md%0A*+Last+commit%3A+https%3A%2F%2Fgithub.com%2Fmdn%2Fcontent%2Fcommit%2F775662998e66813a612e3ff27e02f2ada867bc17%0A*+Document+last+modified%3A+2021-10-03T00%3A01%3A51.000Z%0A%0A%3C%2Fdetails%3E&title=Issue+with+%22HTML%3A+HyperText+Markup+Language%22%3A+%28short+summary+here+please%29&labels=needs-triage%2CContent%3AHTML\" title=\"This will take you to https://github.com/mdn/content to file a new issue\" target=\"_blank\" rel=\"noopener noreferrer\">Report a problem with this content on <b>GitHub</b></a></li><li>Want to fix the problem yourself? See <a href=\"https://github.com/mdn/content/blob/main/README.md\" target=\"_blank\" rel=\"noopener noreferrer\">our Contribution guide</a>.</li></ul></div>\n `}\n />\n );\n};\n\nconst PegaCustom = ({ children }: { children: string }) => {\n return (\n <p\n style={{ color: 'blue', textTransform: 'uppercase' }}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{ __html: children }}\n />\n );\n};\n\nclass PegaCustomElement extends HTMLElement {\n removeElements() {\n while (this.firstChild) {\n this.removeChild(this.firstChild);\n }\n }\n\n connectedCallback() {\n const inner = this.innerHTML;\n this.removeElements();\n const mountPoint = document.createElement('span');\n this.appendChild(mountPoint);\n ReactDOM.render(<PegaCustom>{inner}</PegaCustom>, mountPoint);\n }\n}\n\nexport const CustomComponentDemo = () => {\n const editorRef = useRef<EditorState>(null);\n const [editor, setEditor] = useState({} as TinymceEditor);\n\n const onCustomAction = () => {\n editor.insertContent('<pega-custom>Inserted from toolbar</pega-custom>');\n };\n\n return (\n <Editor\n ref={editorRef}\n label={label}\n toolbar={['inline-styling', 'lists', 'indentation', 'links', 'images']}\n defaultValue='<body><p>Hi mom <a href=\"https://google.com\">link</a></p><pega-custom>Hello from custom element.</pega-custom><p>hi</p></body>'\n customComponents={[{ customElement: PegaCustomElement, name: 'pega-custom' }]}\n customActions={[\n {\n icon: 'pega',\n text: 'Insert a custom element',\n onMouseDown: () => {\n onCustomAction();\n }\n }\n ]}\n onInit={initializedEditor => {\n setEditor(initializedEditor);\n }}\n />\n );\n};\n\nexport const RichTextEditorWithLogs = () => {\n const editorRef = useRef<EditorState>(null);\n const [content, setContent] = useState<string | undefined>();\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n editorRef.current?.appendImage({ src, alt: image.name }, id);\n };\n\n const showContent = (type: 'html' | 'plain_text' | 'rich_text') => {\n if (type === 'html') setContent(editorRef.current?.getHtml());\n else if (type === 'plain_text') setContent(editorRef.current?.getPlainText());\n else if (type === 'rich_text') setContent(editorRef.current?.getRichText());\n };\n\n return (\n <Flex container={{ direction: 'column', gap: 2 }}>\n <Editor\n ref={editorRef}\n toolbar={['inline-styling', 'headers', 'tables', 'links', 'images', 'lists', 'indentation']}\n onImageAdded={onImageAdded}\n label='Rich text editor with logs'\n info='Click on the buttons below to show the different formatted outputs of the RTE'\n />\n\n <Flex container={{ gap: 1 }}>\n <Button onClick={() => showContent('html')}>Show HTML</Button>\n <Button onClick={() => showContent('plain_text')}>Show plain text</Button>\n <Button onClick={() => showContent('rich_text')}>Show rich text</Button>\n </Flex>\n\n <Text>{content}</Text>\n </Flex>\n );\n};\n\nexport const RichTextEditorHtmlParsingDemo = () => {\n const [html, setHtml] = useState('<p>Hello world!</p>');\n const rteRef = useRef<EditorState>(null);\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n rteRef.current?.appendImage({ src, alt: image.name }, id);\n };\n\n return (\n <Flex container={{ direction: 'column', gap: 2 }}>\n <Card>\n <CardContent>\n <TextArea value={html} onChange={e => setHtml(e.target.value)} />\n </CardContent>\n <CardFooter>\n <Button onClick={() => rteRef.current?.insertHtml(html.trim(), true)}>\n Overwrite RTE with new HTML\n </Button>\n </CardFooter>\n </Card>\n <Editor\n defaultValue={html}\n onImageAdded={onImageAdded}\n ref={rteRef}\n label={label}\n toolbar={['inline-styling', 'headers', 'tables', 'links', 'images', 'lists', 'indentation']}\n />\n </Flex>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"Editor.stories.js","sourceRoot":"","sources":["../../../src/rte/Editor/Editor.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAGlD,OAAO,EACL,MAAM,EACN,IAAI,EACJ,WAAW,EACX,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,QAAQ,EACT,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAe,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAE7D,eAAe;IACb,KAAK,EAAE,YAAY;IACnB,SAAS,EAAE,MAAM;CACV,CAAC;AAEV,MAAM,KAAK,GAAG,kBAAkB,CAAC;AAEjC,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,MAAM,SAAS,GAAG,MAAM,CAAc,IAAI,CAAC,CAAC;IAE5C,MAAM,YAAY,GAAG,CAAC,KAAW,EAAE,EAAU,EA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C,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;IAC5D,CAAC,CAAC;IAEF,OAAO,CACL,MAAC,IAAI,IAAC,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,aAC9C,MAAC,IAAI,eACH,KAAC,WAAW,cACV,KAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,WAAI,WACrD,EACd,KAAC,UAAU,cACT,KAAC,MAAM,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,oDAE3D,WACE,YACR,EACP,KAAC,MAAM,IACL,YAAY,EAAE,IAAI,EAClB,YAAY,EAAE,YAAY,EAC1B,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,CAAC,gBAAgB,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,CAAC,WAC3F,YACG,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Meta } from '@storybook/react';\nimport { useState, useRef } from 'react';\nimport ReactDOM from 'react-dom';\nimport { action } from '@storybook/addon-actions';\nimport { Editor as TinymceEditor } from 'tinymce';\n\nimport {\n Button,\n Card,\n CardContent,\n CardFooter,\n Flex,\n Text,\n TextArea\n} from '@pega/cosmos-react-core';\nimport { EditorState, Editor } from '@pega/cosmos-react-rte';\n\nexport default {\n title: 'RTE/Editor',\n component: Editor\n} as Meta;\n\nconst label = 'Form field label';\n\nexport const EditorDemo = () => {\n const editorRef = useRef<EditorState>(null);\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n editorRef.current?.appendImage({ src, alt: image.name }, id);\n };\n\n return (\n <Editor\n ref={editorRef}\n label={label}\n toolbar={['inline-styling', 'lists', 'indentation', 'images', 'links']}\n onFocus={action('Editor focused')}\n onBlur={action('Editor blurred')}\n onImageAdded={onImageAdded}\n defaultValue='<body><p>Hi mom <a href=\"https://google.com\">link</a></p></body>'\n />\n );\n};\n\nexport const EmptyEditorDemo = () => {\n const editorRef = useRef<EditorState>(null);\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n editorRef.current?.appendImage({ src, alt: image.name }, id);\n };\n\n return (\n <Editor\n ref={editorRef}\n label={label}\n toolbar={['inline-styling', 'lists', 'indentation', 'images', 'links']}\n onImageAdded={onImageAdded}\n onFocus={action('Editor has focus')}\n onBlur={action('Editor has blurred')}\n placeholder='Type some stuff in here'\n />\n );\n};\n\nexport const ReadonlyFormField = () => {\n return (\n <Editor\n label={label}\n readOnly\n defaultValue={`<article class=\"main-page-content\" lang=\"en-US\"><h1>HTML: HyperText Markup Language</h1><div><p><strong>HTML</strong> (HyperText Markup Language) is the most basic building block of the Web. It defines the meaning and structure of web content. Other technologies besides HTML are generally used to describe a web page's appearance/presentation (<a href=\"/en-US/docs/Web/CSS\">CSS</a>) or functionality/behavior (<a href=\"/en-US/docs/Web/JavaScript\">JavaScript</a>).</p>\n <p>\"Hypertext\" refers to links that connect web pages to one another, either within a single website or between websites. Links are a fundamental aspect of the Web. By uploading content to the Internet and linking it to pages created by other people, you become an active participant in the World Wide Web.</p>\n <p>HTML uses \"markup\" to annotate text, images, and other content for display in a Web browser. HTML markup includes special \"elements\" such as <a href=\"/en-US/docs/Web/HTML/Element/head\"><code><head></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/title\"><code><title></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/body\"><code><body></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/header\"><code><header></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/footer\"><code><footer></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/article\"><code><article></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/section\"><code><section></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/p\"><code><p></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/div\"><code><div></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/span\"><code><span></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/img\"><code><img></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/aside\"><code><aside></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/audio\"><code><audio></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/canvas\"><code><canvas></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/datalist\"><code><datalist></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/details\"><code><details></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/embed\"><code><embed></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/nav\"><code><nav></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/output\"><code><output></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/progress\"><code><progress></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/video\"><code><video></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/ul\"><code><ul></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/ol\"><code><ol></code></a>, <a href=\"/en-US/docs/Web/HTML/Element/li\"><code><li></code></a> and many others.</p>\n <p>An HTML element is set off from other text in a document by \"tags\", which consist of the element name surrounded by \"<code><</code>\" and \"<code>></code>\". The name of an element inside a tag is case insensitive. That is, it can be written in uppercase, lowercase, or a mixture. For example, the <code><title></code> tag can be written as <code><Title></code>, <code><TITLE></code>, or in any other way.</p>\n\n <div id=\"on-github\" class=\"on-github\"><h3>Found a problem with this page?</h3><ul><li><a href=\"https://github.com/mdn/content/edit/main/files/en-us/web/html/index.md\" title=\"You're going to need to sign in to GitHub first (Opens in a new tab)\" target=\"_blank\" rel=\"noopener noreferrer\">Edit on <b>GitHub</b></a></li><li><a href=\"https://github.com/mdn/content/blob/main/files/en-us/web/html/index.md\" title=\"Folder: en-us/web/html (Opens in a new tab)\" target=\"_blank\" rel=\"noopener noreferrer\">Source on <b>GitHub</b></a></li><li><a href=\"https://github.com/mdn/content/issues/new?body=MDN+URL%3A+https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FHTML%0A%0A%23%23%23%23+What+information+was+incorrect%2C+unhelpful%2C+or+incomplete%3F%0A%0A%0A%23%23%23%23+Specific+section+or+headline%3F%0A%0A%0A%23%23%23%23+What+did+you+expect+to+see%3F%0A%0A%0A%23%23%23%23+Did+you+test+this%3F+If+so%2C+how%3F%0A%0A%0A%3C%21--+Do+not+make+changes+below+this+line+--%3E%0A%3Cdetails%3E%0A%3Csummary%3EMDN+Content+page+report+details%3C%2Fsummary%3E%0A%0A*+Folder%3A+%60en-us%2Fweb%2Fhtml%60%0A*+MDN+URL%3A+https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FHTML%0A*+GitHub+URL%3A+https%3A%2F%2Fgithub.com%2Fmdn%2Fcontent%2Fblob%2Fmain%2Ffiles%2Fen-us%2Fweb%2Fhtml%2Findex.md%0A*+Last+commit%3A+https%3A%2F%2Fgithub.com%2Fmdn%2Fcontent%2Fcommit%2F775662998e66813a612e3ff27e02f2ada867bc17%0A*+Document+last+modified%3A+2021-10-03T00%3A01%3A51.000Z%0A%0A%3C%2Fdetails%3E&title=Issue+with+%22HTML%3A+HyperText+Markup+Language%22%3A+%28short+summary+here+please%29&labels=needs-triage%2CContent%3AHTML\" title=\"This will take you to https://github.com/mdn/content to file a new issue\" target=\"_blank\" rel=\"noopener noreferrer\">Report a problem with this content on <b>GitHub</b></a></li><li>Want to fix the problem yourself? See <a href=\"https://github.com/mdn/content/blob/main/README.md\" target=\"_blank\" rel=\"noopener noreferrer\">our Contribution guide</a>.</li></ul></div>\n `}\n />\n );\n};\n\nconst PegaCustom = ({ children }: { children: string }) => {\n return (\n <p\n style={{ color: 'blue', textTransform: 'uppercase' }}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{ __html: children }}\n />\n );\n};\n\nclass PegaCustomElement extends HTMLElement {\n removeElements() {\n while (this.firstChild) {\n this.removeChild(this.firstChild);\n }\n }\n\n connectedCallback() {\n const inner = this.innerHTML;\n this.removeElements();\n const mountPoint = document.createElement('span');\n this.appendChild(mountPoint);\n ReactDOM.render(<PegaCustom>{inner}</PegaCustom>, mountPoint);\n }\n}\n\nexport const CustomComponentDemo = () => {\n const editorRef = useRef<EditorState>(null);\n const [editor, setEditor] = useState({} as TinymceEditor);\n\n const onCustomAction = () => {\n editor.insertContent('<pega-custom>Inserted from toolbar</pega-custom>');\n };\n\n return (\n <Editor\n ref={editorRef}\n label={label}\n toolbar={['inline-styling', 'lists', 'indentation', 'links', 'images']}\n defaultValue='<body><p>Hi mom <a href=\"https://google.com\">link</a></p><p>hi <pega-custom>Hello from custom element.</pega-custom></p></body>'\n customComponents={[{ customElement: PegaCustomElement, name: 'pega-custom' }]}\n customActions={[\n {\n icon: 'pega',\n text: 'Insert a custom element',\n onMouseDown: () => {\n onCustomAction();\n }\n }\n ]}\n onInit={initializedEditor => {\n setEditor(initializedEditor);\n }}\n />\n );\n};\n\nexport const RichTextEditorWithLogs = () => {\n const editorRef = useRef<EditorState>(null);\n const [content, setContent] = useState<string | undefined>();\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n editorRef.current?.appendImage({ src, alt: image.name }, id);\n };\n\n const showContent = (type: 'html' | 'plain_text' | 'rich_text') => {\n if (type === 'html') setContent(editorRef.current?.getHtml());\n else if (type === 'plain_text') setContent(editorRef.current?.getPlainText());\n else if (type === 'rich_text') setContent(editorRef.current?.getRichText());\n };\n\n return (\n <Flex container={{ direction: 'column', gap: 2 }}>\n <Editor\n ref={editorRef}\n toolbar={['inline-styling', 'headers', 'tables', 'links', 'images', 'lists', 'indentation']}\n onImageAdded={onImageAdded}\n label='Rich text editor with logs'\n info='Click on the buttons below to show the different formatted outputs of the RTE'\n />\n\n <Flex container={{ gap: 1 }}>\n <Button onClick={() => showContent('html')}>Show HTML</Button>\n <Button onClick={() => showContent('plain_text')}>Show plain text</Button>\n <Button onClick={() => showContent('rich_text')}>Show rich text</Button>\n </Flex>\n\n <Text>{content}</Text>\n </Flex>\n );\n};\n\nexport const RichTextEditorHtmlParsingDemo = () => {\n const [html, setHtml] = useState('<p>Hello world!</p>');\n const rteRef = useRef<EditorState>(null);\n\n const onImageAdded = (image: File, id: string) => {\n const src = URL.createObjectURL(image);\n rteRef.current?.appendImage({ src, alt: image.name }, id);\n };\n\n return (\n <Flex container={{ direction: 'column', gap: 2 }}>\n <Card>\n <CardContent>\n <TextArea value={html} onChange={e => setHtml(e.target.value)} />\n </CardContent>\n <CardFooter>\n <Button onClick={() => rteRef.current?.insertHtml(html.trim(), true)}>\n Overwrite RTE with new HTML\n </Button>\n </CardFooter>\n </Card>\n <Editor\n defaultValue={html}\n onImageAdded={onImageAdded}\n ref={rteRef}\n label={label}\n toolbar={['inline-styling', 'headers', 'tables', 'links', 'images', 'lists', 'indentation']}\n />\n </Flex>\n );\n};\n"]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
import { EmailComposerProps,
|
|
3
|
-
export declare const emailBodyContent
|
|
1
|
+
import { FieldValueListProps } from '@pega/cosmos-react-core';
|
|
2
|
+
import { EmailComposerProps, EntityListProps } from '@pega/cosmos-react-social';
|
|
3
|
+
export declare const emailBodyContent = "<div>Hi, <br /> <br /><div>Can you please change my address in the SSN.</div> <br /> <br />Regards, <br />Sara Davis </div>";
|
|
4
4
|
export declare const emailAttachments: EmailComposerProps['attachments'];
|
|
5
5
|
export declare const participants: EmailComposerProps['participants'];
|
|
6
6
|
export declare const toParticipants: string[];
|
|
7
7
|
export declare const ccParticipants: string[];
|
|
8
8
|
export declare const bccParticipants: string[];
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const EntityListMockData: EntityListProps['content'];
|
|
10
10
|
export declare const EmailMockData: {
|
|
11
11
|
emails: {
|
|
12
12
|
'Sara Davis': {
|
|
@@ -84,4 +84,20 @@ export declare const EmailMockData: {
|
|
|
84
84
|
content: string;
|
|
85
85
|
}[];
|
|
86
86
|
};
|
|
87
|
+
export declare const viewAnalysisEmailHeaderMock: FieldValueListProps['fields'];
|
|
88
|
+
export declare const topicListMock: ({
|
|
89
|
+
id: string;
|
|
90
|
+
primary: string;
|
|
91
|
+
secondary: {
|
|
92
|
+
indicator: string;
|
|
93
|
+
value: string;
|
|
94
|
+
};
|
|
95
|
+
} | {
|
|
96
|
+
id: string;
|
|
97
|
+
primary: string;
|
|
98
|
+
secondary: {
|
|
99
|
+
indicator: string;
|
|
100
|
+
value?: undefined;
|
|
101
|
+
};
|
|
102
|
+
})[];
|
|
87
103
|
//# sourceMappingURL=Email.mocks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Email.mocks.d.ts","sourceRoot":"","sources":["../../../src/social/Email/Email.mocks.
|
|
1
|
+
{"version":3,"file":"Email.mocks.d.ts","sourceRoot":"","sources":["../../../src/social/Email/Email.mocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAa,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE3F,eAAO,MAAM,gBAAgB,gIACkG,CAAC;AAEhI,eAAO,MAAM,gBAAgB,EAAE,kBAAkB,CAAC,aAAa,CAS9D,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,kBAAkB,CAAC,cAAc,CAgC3D,CAAC;AAEF,eAAO,MAAM,cAAc,UAEiC,CAAC;AAC7D,eAAO,MAAM,cAAc,UAEiC,CAAC;AAC7D,eAAO,MAAM,eAAe,UAEgC,CAAC;AAE7D,eAAO,MAAM,kBAAkB,EAAE,eAAe,CAAC,SAAS,CAsLzD,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8GzB,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,mBAAmB,CAAC,QAAQ,CAarE,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;IAgCzB,CAAC"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { RichTextViewer } from '@pega/cosmos-react-rte';
|
|
3
|
-
export const emailBodyContent = (_jsx(RichTextViewer, { content: '<div>Hi, <br /> <br /><div>Can you please change my address in the SSN.</div> <br /> <br />Regards, <br />Sara Davis </div>', type: 'html' }, void 0));
|
|
1
|
+
export const emailBodyContent = '<div>Hi, <br /> <br /><div>Can you please change my address in the SSN.</div> <br /> <br />Regards, <br />Sara Davis </div>';
|
|
4
2
|
export const emailAttachments = [
|
|
5
3
|
{
|
|
6
4
|
name: 'Policy.doc',
|
|
@@ -53,7 +51,7 @@ export const ccParticipants = participants
|
|
|
53
51
|
export const bccParticipants = participants
|
|
54
52
|
.slice(4, 9)
|
|
55
53
|
.map((participant) => participant.emailAddress);
|
|
56
|
-
export const
|
|
54
|
+
export const EntityListMockData = [
|
|
57
55
|
{
|
|
58
56
|
name: 'Ticket number',
|
|
59
57
|
value: [
|
|
@@ -347,4 +345,51 @@ export const EmailMockData = {
|
|
|
347
345
|
}
|
|
348
346
|
]
|
|
349
347
|
};
|
|
348
|
+
export const viewAnalysisEmailHeaderMock = [
|
|
349
|
+
{
|
|
350
|
+
name: 'Sender email',
|
|
351
|
+
value: 'robert.stanton@hotmail.com'
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
name: 'Sender name',
|
|
355
|
+
value: 'Robert stanton'
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
name: 'Subject',
|
|
359
|
+
value: 'I have a quick question on travel'
|
|
360
|
+
}
|
|
361
|
+
];
|
|
362
|
+
export const topicListMock = [
|
|
363
|
+
{
|
|
364
|
+
id: '1',
|
|
365
|
+
primary: 'Missing ticket',
|
|
366
|
+
secondary: {
|
|
367
|
+
indicator: 'Confidence',
|
|
368
|
+
value: '50%'
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
id: '2',
|
|
373
|
+
primary: 'Missing baggage',
|
|
374
|
+
secondary: {
|
|
375
|
+
indicator: 'Confidence',
|
|
376
|
+
value: '80%'
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
id: '3',
|
|
381
|
+
primary: 'Ticket booking',
|
|
382
|
+
secondary: {
|
|
383
|
+
indicator: 'Confidence',
|
|
384
|
+
value: '30%'
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
id: '4',
|
|
389
|
+
primary: 'Language',
|
|
390
|
+
secondary: {
|
|
391
|
+
indicator: 'Confidence'
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
];
|
|
350
395
|
//# sourceMappingURL=Email.mocks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Email.mocks.js","sourceRoot":"","sources":["../../../src/social/Email/Email.mocks.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,KAAC,cAAc,IACb,OAAO,EAAC,6HAA6H,EACrI,IAAI,EAAC,MAAM,WACX,CACH,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAsC;IACjE;QACE,IAAI,EAAE,YAAY;QAClB,QAAQ,EAAE,GAAG;KACd;IACD;QACE,IAAI,EAAE,UAAU;QAChB,SAAS,EAAE,iDAAiD;KAC7D;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAuC;IAC9D,EAAE,YAAY,EAAE,wBAAwB,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,Q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,OAAO,EAAE,iCAAiC;SAC3C;QACD;YACE,EAAE,EAAE,cAAc;YAClB,KAAK,EAAE,cAAc;YACrB,OAAO,EAAE,cAAc;SACxB;KACF;CACF,CAAC","sourcesContent":["import { RichTextViewer } from '@pega/cosmos-react-rte';\nimport { EmailComposerProps, EmailUser, ViewAnalysisProps } from '@pega/cosmos-react-social';\n\nexport const emailBodyContent = (\n <RichTextViewer\n content='<div>Hi, <br /> <br /><div>Can you please change my address in the SSN.</div> <br /> <br />Regards, <br />Sara Davis </div>'\n type='html'\n />\n);\n\nexport const emailAttachments: EmailComposerProps['attachments'] = [\n {\n name: 'Policy.doc',\n progress: 100\n },\n {\n name: 'E-Ticket',\n thumbnail: 'https://pbs.twimg.com/media/ENNN5PAXkAE-hag.jpg'\n }\n];\n\nexport const participants: EmailComposerProps['participants'] = [\n { emailAddress: 'Vernon.Lee@example.com', fullName: 'Vernon Lee', shortName: 'Vernon' },\n { emailAddress: 'Eula.Morales@example.com', fullName: 'Eula Morales', shortName: 'Eula' },\n { emailAddress: 'Paul.Smith@example.com', fullName: 'Paul Smith', shortName: 'Paul' },\n { emailAddress: 'Frank.Walker@example.com', fullName: 'Frank Walker', shortName: 'Frank' },\n { emailAddress: 'Edward.Green@example.com', fullName: 'Edward Green', shortName: 'Edward' },\n { emailAddress: 'John.Smith@example.com', fullName: 'John Smith', shortName: 'John' },\n { emailAddress: 'Olivia.Cockburn@example.com', fullName: 'Olivia Cockburn', shortName: 'Olivia' },\n { emailAddress: 'Peter.Hernandez@example.com', fullName: 'Peter Hernandez', shortName: 'Peter' },\n { emailAddress: 'Helena.Johnson@example.com', fullName: 'Helena Johnson', shortName: 'Helena' },\n {\n emailAddress: 'Katheryn.Hudson@example.com',\n fullName: 'Katheryn Hudson',\n shortName: 'Katheryn'\n },\n { emailAddress: 'Mia.Hershel@example.com', fullName: 'Mia Hershel', shortName: 'Mia' },\n { emailAddress: 'Ann.Mitchell@example.com', fullName: 'Ann Mitchell', shortName: 'Ann' },\n { emailAddress: 'Rafael.Bottom@example.com', fullName: 'Rafael Bottom', shortName: 'Rafael' },\n {\n emailAddress: 'Christopher.Gatsby@example.com',\n fullName: 'Christopher Gatsby',\n shortName: 'Christopher'\n },\n { emailAddress: 'Julianne.Moore@example.com', fullName: 'Julianne Moore', shortName: 'Julianne' },\n { emailAddress: 'Emily.Stone@example.com', fullName: 'Emily Stone', shortName: 'Emily' },\n { emailAddress: 'Richard.Wiles@example.com', fullName: 'Richard Wiles', shortName: 'Richard' },\n { emailAddress: 'Ella.Connor@example.com', fullName: 'Ella Connor', shortName: 'Ella' },\n { emailAddress: 'Robyn.Fenton@example.com', fullName: 'Robyn Fenton', shortName: 'Robyn' },\n { emailAddress: 'Lucille.Hale@example.com', fullName: 'Lucille Hale', shortName: 'Lucille' },\n { emailAddress: 'Angelina.Pitt@example.com', fullName: 'Angelina Pitt', shortName: 'Angelina' },\n { emailAddress: 'Tanya.Robinson@example.com', fullName: 'Tanya Robinson', shortName: 'Tanya' },\n { emailAddress: 'Laura.Horowitz@example.com', fullName: 'Laura Horowitz', shortName: 'Laura' }\n];\n\nexport const toParticipants = participants\n .slice(1, 3)\n .map((participant: EmailUser) => participant.emailAddress);\nexport const ccParticipants = participants\n .slice(9, 11)\n .map((participant: EmailUser) => participant.emailAddress);\nexport const bccParticipants = participants\n .slice(4, 9)\n .map((participant: EmailUser) => participant.emailAddress);\n\nexport const ViewAnalysisMockData: ViewAnalysisProps['content'] = [\n {\n name: 'Ticket number',\n value: [\n {\n id: '1',\n entity: {\n value: '7546383',\n type: 'system',\n name: 'Ticket number',\n variant: 3\n }\n },\n {\n id: '2',\n entity: {\n value: '7546383',\n type: 'system',\n name: 'Ticket number',\n variant: 3,\n icon: 'paper-clip'\n }\n }\n ]\n },\n {\n name: 'Name',\n value: [\n {\n id: '1',\n entity: {\n value: 'Robert stanton',\n type: 'system',\n name: 'Name',\n variant: 1\n }\n },\n {\n id: '2',\n entity: {\n value: 'Sara Davis',\n type: 'system',\n name: 'Name',\n variant: 1\n }\n },\n {\n id: '3',\n entity: {\n value: 'Cindy',\n type: 'system',\n name: 'Name',\n variant: 1\n }\n },\n {\n id: '4',\n entity: {\n value: 'Dean',\n type: 'system',\n name: 'Name',\n variant: 1\n }\n },\n {\n id: '5',\n entity: {\n value: 'Joe Stevens',\n type: 'system',\n name: 'Name',\n variant: 1\n }\n }\n ]\n },\n {\n name: 'Email',\n value: [\n {\n id: '1',\n entity: {\n value: 'robert.stanton@example.com',\n type: 'system',\n name: 'Email',\n variant: 2\n }\n },\n {\n id: '2',\n entity: {\n value: 'robert.stanton@example.com',\n type: 'system',\n name: 'Email',\n variant: 2,\n icon: 'paper-clip'\n }\n },\n {\n id: '3',\n entity: {\n value: 'cindy.turner@example.com',\n type: 'system',\n name: 'Email',\n variant: 2\n }\n },\n {\n id: '4',\n entity: {\n value: 'dean.thomas@example.com',\n type: 'system',\n name: 'Email',\n variant: 2\n }\n },\n {\n id: '5',\n entity: {\n value: 'joe.stevens@example.com',\n type: 'system',\n name: 'Email',\n variant: 2\n }\n }\n ]\n },\n {\n name: 'Date',\n value: [\n {\n id: '1',\n entity: {\n value: 'Dec 5,2021 9.05 AM',\n type: 'system',\n name: 'Date',\n variant: 4\n }\n }\n ]\n },\n {\n name: 'Flight Number',\n value: [\n {\n id: '1',\n entity: {\n value: 'FL-JK-403',\n type: 'system',\n name: 'Flight Number',\n variant: 5\n }\n }\n ]\n },\n {\n name: 'Address',\n value: [\n {\n id: '1',\n entity: {\n value: 'Nagercoil,Hyderabad',\n type: 'system',\n name: 'Address',\n variant: 15\n }\n }\n ]\n },\n {\n name: 'Location',\n value: [\n {\n id: '1',\n entity: {\n value: 'Hyderabad',\n type: 'system',\n name: 'Location',\n variant: 8\n }\n }\n ]\n }\n];\n\nexport const EmailMockData = {\n emails: {\n 'Sara Davis': {\n fullName: 'Sara Davis',\n shortName: 'Sara',\n emailAddress: 'saraConnor@example.com'\n },\n 'John Brown': {\n fullName: 'John Brown',\n shortName: 'John',\n emailAddress: 'john@example.com'\n },\n 'Hugh Phillips': {\n fullName: 'Hugh Phillips',\n shortName: 'Hugh',\n emailAddress: 'Hugh@example.com'\n },\n 'Laura Stevens': {\n fullName: 'Laura Stevens',\n shortName: 'Laura',\n emailAddress: 'laurastevens@example.com',\n avatarProps: {\n icon: 'headset'\n }\n },\n 'Joe Stevens': {\n fullName: 'Joe Stevens',\n shortName: 'Joe',\n emailAddress: 'Joe@example.com'\n },\n 'Adam Gillchrist': {\n fullName: 'Adam Gillchrist',\n shortName: 'Adam',\n emailAddress: 'adam@example.com'\n },\n 'John Paul': {\n fullName: 'John, Paul',\n shortName: 'Paul',\n emailAddress: 'John.Paul@example.com'\n },\n 'Oran Jacob': {\n fullName: 'Oran, Jacob',\n shortName: 'Jacob',\n emailAddress: 'jacob@example.com'\n },\n 'Tyson Mike': {\n fullName: 'Tyson, Mike',\n shortName: 'Mike',\n emailAddress: 'mike@example.com'\n },\n 'John Cent': {\n fullName: 'John, Cent',\n shortName: 'John',\n emailAddress: 'John.cena@example.com'\n },\n 'Mystery Rey': {\n fullName: 'Mystery, Rey',\n shortName: 'Rey',\n emailAddress: 'rey619@example.com'\n },\n 'Anton, Randy': {\n fullName: 'Anton, Randy',\n shortName: 'Randy',\n emailAddress: 'Randy.ortan@example.com'\n }\n },\n suggestedReplies: [\n {\n id: 'thank-you',\n title: 'Thank you',\n content: 'Thank you'\n },\n {\n id: 'clarification',\n title: 'Clarification',\n content: 'Can you please provide more clarification'\n },\n {\n id: 'apologies',\n title: 'Apologies',\n content: 'Apologies for the inconvenience'\n },\n {\n id: 'we_will_help',\n title: 'We will help',\n content: 'We will help'\n }\n ],\n emailBodyTemplates: [\n {\n id: 'thank-you',\n title: 'Thank you',\n content: 'Thank you'\n },\n {\n id: 'clarification',\n title: 'Clarification',\n content: 'Can you please provide more clarification'\n },\n {\n id: 'apologies',\n title: 'Apologies',\n content: 'Apologies for the inconvenience'\n },\n {\n id: 'we_will_help',\n title: 'We will help',\n content: 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;KACF;IACD;QACE,EAAE,EAAE,GAAG;QACP,OAAO,EAAE,UAAU;QACnB,SAAS,EAAE;YACT,SAAS,EAAE,YAAY;SACxB;KACF;CACF,CAAC","sourcesContent":["import { FieldValueListProps } from '@pega/cosmos-react-core';\nimport { EmailComposerProps, EmailUser, EntityListProps } from '@pega/cosmos-react-social';\n\nexport const emailBodyContent =\n '<div>Hi, <br /> <br /><div>Can you please change my address in the SSN.</div> <br /> <br />Regards, <br />Sara Davis </div>';\n\nexport const emailAttachments: EmailComposerProps['attachments'] = [\n {\n name: 'Policy.doc',\n progress: 100\n },\n {\n name: 'E-Ticket',\n thumbnail: 'https://pbs.twimg.com/media/ENNN5PAXkAE-hag.jpg'\n }\n];\n\nexport const participants: EmailComposerProps['participants'] = [\n { emailAddress: 'Vernon.Lee@example.com', fullName: 'Vernon Lee', shortName: 'Vernon' },\n { emailAddress: 'Eula.Morales@example.com', fullName: 'Eula Morales', shortName: 'Eula' },\n { emailAddress: 'Paul.Smith@example.com', fullName: 'Paul Smith', shortName: 'Paul' },\n { emailAddress: 'Frank.Walker@example.com', fullName: 'Frank Walker', shortName: 'Frank' },\n { emailAddress: 'Edward.Green@example.com', fullName: 'Edward Green', shortName: 'Edward' },\n { emailAddress: 'John.Smith@example.com', fullName: 'John Smith', shortName: 'John' },\n { emailAddress: 'Olivia.Cockburn@example.com', fullName: 'Olivia Cockburn', shortName: 'Olivia' },\n { emailAddress: 'Peter.Hernandez@example.com', fullName: 'Peter Hernandez', shortName: 'Peter' },\n { emailAddress: 'Helena.Johnson@example.com', fullName: 'Helena Johnson', shortName: 'Helena' },\n {\n emailAddress: 'Katheryn.Hudson@example.com',\n fullName: 'Katheryn Hudson',\n shortName: 'Katheryn'\n },\n { emailAddress: 'Mia.Hershel@example.com', fullName: 'Mia Hershel', shortName: 'Mia' },\n { emailAddress: 'Ann.Mitchell@example.com', fullName: 'Ann Mitchell', shortName: 'Ann' },\n { emailAddress: 'Rafael.Bottom@example.com', fullName: 'Rafael Bottom', shortName: 'Rafael' },\n {\n emailAddress: 'Christopher.Gatsby@example.com',\n fullName: 'Christopher Gatsby',\n shortName: 'Christopher'\n },\n { emailAddress: 'Julianne.Moore@example.com', fullName: 'Julianne Moore', shortName: 'Julianne' },\n { emailAddress: 'Emily.Stone@example.com', fullName: 'Emily Stone', shortName: 'Emily' },\n { emailAddress: 'Richard.Wiles@example.com', fullName: 'Richard Wiles', shortName: 'Richard' },\n { emailAddress: 'Ella.Connor@example.com', fullName: 'Ella Connor', shortName: 'Ella' },\n { emailAddress: 'Robyn.Fenton@example.com', fullName: 'Robyn Fenton', shortName: 'Robyn' },\n { emailAddress: 'Lucille.Hale@example.com', fullName: 'Lucille Hale', shortName: 'Lucille' },\n { emailAddress: 'Angelina.Pitt@example.com', fullName: 'Angelina Pitt', shortName: 'Angelina' },\n { emailAddress: 'Tanya.Robinson@example.com', fullName: 'Tanya Robinson', shortName: 'Tanya' },\n { emailAddress: 'Laura.Horowitz@example.com', fullName: 'Laura Horowitz', shortName: 'Laura' }\n];\n\nexport const toParticipants = participants\n .slice(1, 3)\n .map((participant: EmailUser) => participant.emailAddress);\nexport const ccParticipants = participants\n .slice(9, 11)\n .map((participant: EmailUser) => participant.emailAddress);\nexport const bccParticipants = participants\n .slice(4, 9)\n .map((participant: EmailUser) => participant.emailAddress);\n\nexport const EntityListMockData: EntityListProps['content'] = [\n {\n name: 'Ticket number',\n value: [\n {\n id: '1',\n entity: {\n value: '7546383',\n type: 'system',\n name: 'Ticket number',\n variant: 3\n }\n },\n {\n id: '2',\n entity: {\n value: '7546383',\n type: 'system',\n name: 'Ticket number',\n variant: 3,\n icon: 'paper-clip'\n }\n }\n ]\n },\n {\n name: 'Name',\n value: [\n {\n id: '1',\n entity: {\n value: 'Robert stanton',\n type: 'system',\n name: 'Name',\n variant: 1\n }\n },\n {\n id: '2',\n entity: {\n value: 'Sara Davis',\n type: 'system',\n name: 'Name',\n variant: 1\n }\n },\n {\n id: '3',\n entity: {\n value: 'Cindy',\n type: 'system',\n name: 'Name',\n variant: 1\n }\n },\n {\n id: '4',\n entity: {\n value: 'Dean',\n type: 'system',\n name: 'Name',\n variant: 1\n }\n },\n {\n id: '5',\n entity: {\n value: 'Joe Stevens',\n type: 'system',\n name: 'Name',\n variant: 1\n }\n }\n ]\n },\n {\n name: 'Email',\n value: [\n {\n id: '1',\n entity: {\n value: 'robert.stanton@example.com',\n type: 'system',\n name: 'Email',\n variant: 2\n }\n },\n {\n id: '2',\n entity: {\n value: 'robert.stanton@example.com',\n type: 'system',\n name: 'Email',\n variant: 2,\n icon: 'paper-clip'\n }\n },\n {\n id: '3',\n entity: {\n value: 'cindy.turner@example.com',\n type: 'system',\n name: 'Email',\n variant: 2\n }\n },\n {\n id: '4',\n entity: {\n value: 'dean.thomas@example.com',\n type: 'system',\n name: 'Email',\n variant: 2\n }\n },\n {\n id: '5',\n entity: {\n value: 'joe.stevens@example.com',\n type: 'system',\n name: 'Email',\n variant: 2\n }\n }\n ]\n },\n {\n name: 'Date',\n value: [\n {\n id: '1',\n entity: {\n value: 'Dec 5,2021 9.05 AM',\n type: 'system',\n name: 'Date',\n variant: 4\n }\n }\n ]\n },\n {\n name: 'Flight Number',\n value: [\n {\n id: '1',\n entity: {\n value: 'FL-JK-403',\n type: 'system',\n name: 'Flight Number',\n variant: 5\n }\n }\n ]\n },\n {\n name: 'Address',\n value: [\n {\n id: '1',\n entity: {\n value: 'Nagercoil,Hyderabad',\n type: 'system',\n name: 'Address',\n variant: 15\n }\n }\n ]\n },\n {\n name: 'Location',\n value: [\n {\n id: '1',\n entity: {\n value: 'Hyderabad',\n type: 'system',\n name: 'Location',\n variant: 8\n }\n }\n ]\n }\n];\n\nexport const EmailMockData = {\n emails: {\n 'Sara Davis': {\n fullName: 'Sara Davis',\n shortName: 'Sara',\n emailAddress: 'saraConnor@example.com'\n },\n 'John Brown': {\n fullName: 'John Brown',\n shortName: 'John',\n emailAddress: 'john@example.com'\n },\n 'Hugh Phillips': {\n fullName: 'Hugh Phillips',\n shortName: 'Hugh',\n emailAddress: 'Hugh@example.com'\n },\n 'Laura Stevens': {\n fullName: 'Laura Stevens',\n shortName: 'Laura',\n emailAddress: 'laurastevens@example.com',\n avatarProps: {\n icon: 'headset'\n }\n },\n 'Joe Stevens': {\n fullName: 'Joe Stevens',\n shortName: 'Joe',\n emailAddress: 'Joe@example.com'\n },\n 'Adam Gillchrist': {\n fullName: 'Adam Gillchrist',\n shortName: 'Adam',\n emailAddress: 'adam@example.com'\n },\n 'John Paul': {\n fullName: 'John, Paul',\n shortName: 'Paul',\n emailAddress: 'John.Paul@example.com'\n },\n 'Oran Jacob': {\n fullName: 'Oran, Jacob',\n shortName: 'Jacob',\n emailAddress: 'jacob@example.com'\n },\n 'Tyson Mike': {\n fullName: 'Tyson, Mike',\n shortName: 'Mike',\n emailAddress: 'mike@example.com'\n },\n 'John Cent': {\n fullName: 'John, Cent',\n shortName: 'John',\n emailAddress: 'John.cena@example.com'\n },\n 'Mystery Rey': {\n fullName: 'Mystery, Rey',\n shortName: 'Rey',\n emailAddress: 'rey619@example.com'\n },\n 'Anton, Randy': {\n fullName: 'Anton, Randy',\n shortName: 'Randy',\n emailAddress: 'Randy.ortan@example.com'\n }\n },\n suggestedReplies: [\n {\n id: 'thank-you',\n title: 'Thank you',\n content: 'Thank you'\n },\n {\n id: 'clarification',\n title: 'Clarification',\n content: 'Can you please provide more clarification'\n },\n {\n id: 'apologies',\n title: 'Apologies',\n content: 'Apologies for the inconvenience'\n },\n {\n id: 'we_will_help',\n title: 'We will help',\n content: 'We will help'\n }\n ],\n emailBodyTemplates: [\n {\n id: 'thank-you',\n title: 'Thank you',\n content: 'Thank you'\n },\n {\n id: 'clarification',\n title: 'Clarification',\n content: 'Can you please provide more clarification'\n },\n {\n id: 'apologies',\n title: 'Apologies',\n content: 'Apologies for the inconvenience'\n },\n {\n id: 'we_will_help',\n title: 'We will help',\n content: 'We will help'\n }\n ]\n};\n\nexport const viewAnalysisEmailHeaderMock: FieldValueListProps['fields'] = [\n {\n name: 'Sender email',\n value: 'robert.stanton@hotmail.com'\n },\n {\n name: 'Sender name',\n value: 'Robert stanton'\n },\n {\n name: 'Subject',\n value: 'I have a quick question on travel'\n }\n];\n\nexport const topicListMock = [\n {\n id: '1',\n primary: 'Missing ticket',\n secondary: {\n indicator: 'Confidence',\n value: '50%'\n }\n },\n {\n id: '2',\n primary: 'Missing baggage',\n secondary: {\n indicator: 'Confidence',\n value: '80%'\n }\n },\n {\n id: '3',\n primary: 'Ticket booking',\n secondary: {\n indicator: 'Confidence',\n value: '30%'\n }\n },\n {\n id: '4',\n primary: 'Language',\n secondary: {\n indicator: 'Confidence'\n }\n }\n];\n"]}
|
|
@@ -6,7 +6,7 @@ declare const _default: {
|
|
|
6
6
|
};
|
|
7
7
|
export default _default;
|
|
8
8
|
export declare const email: () => JSX.Element;
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const ViewAnalysis: () => JSX.Element;
|
|
10
10
|
export declare const emailEntities: () => JSX.Element;
|
|
11
11
|
export declare const emailConversation: () => JSX.Element;
|
|
12
12
|
export declare const EmailComposerDemo: () => JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Email.stories.d.ts","sourceRoot":"","sources":["../../../src/social/Email/Email.stories.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Email.stories.d.ts","sourceRoot":"","sources":["../../../src/social/Email/Email.stories.tsx"],"names":[],"mappings":";AAgCA,OAAO,EASL,UAAU,EAIX,MAAM,2BAA2B,CAAC;;;;;AAiBnC,wBAGE;AAwOF,eAAO,MAAM,KAAK,mBA4CjB,CAAC;AAMF,eAAO,MAAM,YAAY,mBAqCxB,CAAC;AAYF,eAAO,MAAM,aAAa,mBAyFzB,CAAC;AAaF,eAAO,MAAM,iBAAiB,mBA2C7B,CAAC;AAaF,eAAO,MAAM,iBAAiB,mBAmF7B,CAAC;AAYF,eAAO,MAAM,SAAS;;;;;;;CA0NrB,CAAC;AAqBF,eAAO,MAAM,oBAAoB,mBA8BhC,CAAC;AAgPF,eAAO,MAAM,oBAAoB;;;;;CAyDhC,CAAC"}
|
|
@@ -3,11 +3,10 @@ import { useState, useRef, useContext, createRef } from 'react';
|
|
|
3
3
|
import { action } from '@storybook/addon-actions';
|
|
4
4
|
import { array, boolean } from '@storybook/addon-knobs';
|
|
5
5
|
import styled, { css } from 'styled-components';
|
|
6
|
-
import { Card, CardContent, createUID, MenuButton, Icon, registerIcon, hasProp, Flex, Button, ModalManagerContext, Modal, menuHelpers, defaultThemeProp } from '@pega/cosmos-react-core';
|
|
6
|
+
import { Card, CardContent, createUID, MenuButton, Icon, registerIcon, hasProp, Flex, Button, ModalManagerContext, Modal, menuHelpers, defaultThemeProp, CardHeader, Text, SummaryList, Grid, FieldValueList, StyledLabel } from '@pega/cosmos-react-core';
|
|
7
7
|
import * as filterIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/filter.icon';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { bccParticipants, ccParticipants, emailBodyContent, participants, toParticipants, emailAttachments, ViewAnalysisMockData, EmailMockData } from './Email.mocks';
|
|
8
|
+
import { Email, EmailConversation, EmailComposer, EmailShell, EmailSummaryItem, EmailSummaryList, EntityList } from '@pega/cosmos-react-social';
|
|
9
|
+
import { bccParticipants, ccParticipants, emailBodyContent, participants, toParticipants, emailAttachments, EntityListMockData, EmailMockData, viewAnalysisEmailHeaderMock, topicListMock } from './Email.mocks';
|
|
11
10
|
registerIcon(filterIcon);
|
|
12
11
|
export default {
|
|
13
12
|
title: 'Social/Email',
|
|
@@ -19,6 +18,12 @@ const handleExternalEntry = (filterValue) => {
|
|
|
19
18
|
const matched = filterValue.match(pattern);
|
|
20
19
|
return !!matched?.input;
|
|
21
20
|
};
|
|
21
|
+
const templates = mockEmailBodyTemplates.map(({ id, title }) => {
|
|
22
|
+
return {
|
|
23
|
+
id,
|
|
24
|
+
title
|
|
25
|
+
};
|
|
26
|
+
});
|
|
22
27
|
const baseComposerProps = {
|
|
23
28
|
participants,
|
|
24
29
|
externalValidator: handleExternalEntry,
|
|
@@ -33,7 +38,7 @@ const baseComposerProps = {
|
|
|
33
38
|
onCancel: () => {
|
|
34
39
|
action('cancelled email composing');
|
|
35
40
|
},
|
|
36
|
-
templates
|
|
41
|
+
templates
|
|
37
42
|
};
|
|
38
43
|
var LaunchAction;
|
|
39
44
|
(function (LaunchAction) {
|
|
@@ -82,34 +87,37 @@ const emailActions = (_jsx(MenuButton, { text: 'Email actions', variant: 'simple
|
|
|
82
87
|
}
|
|
83
88
|
]
|
|
84
89
|
} }, void 0));
|
|
85
|
-
const emailDemoActions = (create, subject) => {
|
|
90
|
+
const emailDemoActions = (create, subject, onTemplateChange) => {
|
|
86
91
|
const id = createUID();
|
|
87
92
|
return (_jsx(MenuButton, { text: 'Email actions', variant: 'simple', icon: 'more', iconOnly: true, menu: {
|
|
88
93
|
items: [
|
|
89
94
|
{
|
|
90
|
-
id,
|
|
95
|
+
id: createUID(),
|
|
91
96
|
primary: 'Reply',
|
|
92
97
|
onClick: () => launchEmailComposer(id, LaunchAction.REPLY, {
|
|
93
98
|
...baseComposerProps,
|
|
99
|
+
onTemplateChange,
|
|
94
100
|
responseType: 'reply',
|
|
95
101
|
subject: `Re-${subject}` || ''
|
|
96
102
|
}, create)
|
|
97
103
|
},
|
|
98
104
|
{
|
|
99
|
-
id,
|
|
105
|
+
id: createUID(),
|
|
100
106
|
primary: 'Reply all',
|
|
101
107
|
onClick: () => launchEmailComposer(id, LaunchAction.REPLYALL, {
|
|
102
108
|
...baseComposerProps,
|
|
109
|
+
onTemplateChange,
|
|
103
110
|
responseType: 'replyAll',
|
|
104
111
|
cc: [],
|
|
105
112
|
subject: `Re-${subject}` || ''
|
|
106
113
|
}, create)
|
|
107
114
|
},
|
|
108
115
|
{
|
|
109
|
-
id,
|
|
116
|
+
id: createUID(),
|
|
110
117
|
primary: 'Forward',
|
|
111
118
|
onClick: () => launchEmailComposer(id, LaunchAction.FORWARD, {
|
|
112
119
|
...baseComposerProps,
|
|
120
|
+
onTemplateChange,
|
|
113
121
|
responseType: 'forward',
|
|
114
122
|
subject: `Fw-${subject}` || ''
|
|
115
123
|
}, create)
|
|
@@ -178,13 +186,19 @@ export const email = () => {
|
|
|
178
186
|
const StyledViewAnalysis = styled.div `
|
|
179
187
|
width: 18rem;
|
|
180
188
|
`;
|
|
181
|
-
export const
|
|
182
|
-
const content = ViewAnalysisMockData;
|
|
189
|
+
export const ViewAnalysis = () => {
|
|
183
190
|
const headerProps = {
|
|
184
191
|
icon: 'list-number',
|
|
185
192
|
text: 'Entities'
|
|
186
193
|
};
|
|
187
|
-
|
|
194
|
+
const itemsToRender = topicListMock.map(items => {
|
|
195
|
+
return {
|
|
196
|
+
...items,
|
|
197
|
+
primary: _jsx(StyledLabel, { children: items.primary }, void 0),
|
|
198
|
+
secondary: (_jsxs(Flex, { container: { direction: 'row', justify: 'between' }, children: [_jsx(Text, { variant: 'primary', children: items.secondary.indicator }, void 0), _jsx(StyledLabel, { children: items.secondary.value }, void 0)] }, void 0))
|
|
199
|
+
};
|
|
200
|
+
});
|
|
201
|
+
return (_jsx(StyledViewAnalysis, { children: _jsxs(Grid, { container: { rowGap: 2 }, children: [_jsx(EntityList, { header: headerProps, content: EntityListMockData }, void 0), _jsxs(Card, { children: [_jsxs(CardHeader, { container: { alignItems: 'center', gap: 1 }, children: [_jsx(Icon, { name: 'document-doc' }, void 0), _jsx(Text, { variant: 'h3', children: "Email header" }, void 0)] }, void 0), _jsx(CardContent, { children: _jsx(FieldValueList, { fields: viewAnalysisEmailHeaderMock, variant: 'stacked' }, void 0) }, void 0)] }, void 0), _jsx(SummaryList, { name: 'Topics', icon: 'headline', items: itemsToRender, noItemsText: 'No items' }, void 0)] }, void 0) }, void 0));
|
|
188
202
|
};
|
|
189
203
|
/*
|
|
190
204
|
______ _ _ ______ _ _ _ _
|
|
@@ -279,7 +293,7 @@ export const emailConversation = () => {
|
|
|
279
293
|
cc: [mockEmails['Adam Gillchrist'], mockEmails['John Paul']],
|
|
280
294
|
bcc: [mockEmails['Anton, Randy'], mockEmails['Hugh Phillips']],
|
|
281
295
|
to: [mockEmails['Sara Davis'], mockEmails['John Brown'], mockEmails['Joe Stevens']],
|
|
282
|
-
body:
|
|
296
|
+
body: '<div> Hi, <br /> <br /> <div>Sure.. Here is your E-Ticket !! </div> <br /><br /> Regards, <br /> Laura Stevens </div>',
|
|
283
297
|
unRead: true,
|
|
284
298
|
onReply: action('On reply'),
|
|
285
299
|
onForward: action('On forward'),
|
|
@@ -294,7 +308,7 @@ export const emailConversation = () => {
|
|
|
294
308
|
cc: [mockEmails['Adam Gillchrist'], mockEmails['John Paul']],
|
|
295
309
|
bcc: [mockEmails['Anton, Randy'], mockEmails['Hugh Phillips']],
|
|
296
310
|
to: [mockEmails['Laura Stevens'], mockEmails['John Brown'], mockEmails['Joe Stevens']],
|
|
297
|
-
body:
|
|
311
|
+
body: '<div> Hi, <br /> <br /> <div>I’m still at the airport, I need help now!! </div> <br /><br /> Regards, <br /> Sara Davis </div>',
|
|
298
312
|
onReply: action('On reply'),
|
|
299
313
|
onForward: action('On forward'),
|
|
300
314
|
onSuggestionClick: action('On Suggested reply clicked'),
|
|
@@ -316,11 +330,15 @@ export const emailConversation = () => {
|
|
|
316
330
|
export const EmailComposerDemo = () => {
|
|
317
331
|
const fileUploadInputRef = useRef(null);
|
|
318
332
|
const [attachments, setAttachments] = useState(emailAttachments);
|
|
333
|
+
const onTemplateChange = id => {
|
|
334
|
+
const selectedTemplate = mockEmailBodyTemplates.find(template => template.id === id);
|
|
335
|
+
return selectedTemplate?.content;
|
|
336
|
+
};
|
|
319
337
|
return (_jsx(Card, { style: { width: '30rem' }, children: _jsxs(CardContent, { children: [_jsx(EmailComposer, { onSend: action('On Send'), onCancel: action('On cancel'), externalValidator: handleExternalEntry, participants: participants, to: {
|
|
320
338
|
reply: [participants[7].emailAddress],
|
|
321
339
|
replyAll: toParticipants,
|
|
322
340
|
forward: []
|
|
323
|
-
}, cc: ccParticipants, bcc: bccParticipants, responseType: 'reply', subject: 'Request: Pause service', templates:
|
|
341
|
+
}, cc: ccParticipants, bcc: bccParticipants, responseType: 'reply', subject: 'Request: Pause service', templates: templates, onTemplateChange: onTemplateChange, bodyContent: 'Hi, Hope you are doing well', onImageAdded: action('On Image added'), attachments: attachments.map(attachment => {
|
|
324
342
|
return {
|
|
325
343
|
...attachment,
|
|
326
344
|
onDelete: name => {
|
|
@@ -363,6 +381,10 @@ export const EmailComposerDemo = () => {
|
|
|
363
381
|
|
|
364
382
|
*/
|
|
365
383
|
export const EmailDemo = ({ hideSuggestions }) => {
|
|
384
|
+
const onTemplateChange = id => {
|
|
385
|
+
const selectedTemplate = mockEmailBodyTemplates.find(template => template.id === id);
|
|
386
|
+
return selectedTemplate?.content;
|
|
387
|
+
};
|
|
366
388
|
const actions = array('Actions', ['Transfer', 'End conversation']).map(name => ({
|
|
367
389
|
primary: name,
|
|
368
390
|
id: name,
|
|
@@ -375,7 +397,7 @@ export const EmailDemo = ({ hideSuggestions }) => {
|
|
|
375
397
|
timeStamp: '2021-01-05T09:12',
|
|
376
398
|
from: participants[0],
|
|
377
399
|
to: participants.slice(0, 2),
|
|
378
|
-
body:
|
|
400
|
+
body: '<div>Hi, <br /> <br /><div>Your address change request is approved.</div> <br /> <br />Regards, <br />Laura Stevens </div>',
|
|
379
401
|
unRead: true,
|
|
380
402
|
subject: 'Pause service',
|
|
381
403
|
suggestions: hideSuggestions ? undefined : mockSuggestedReplies,
|
|
@@ -408,12 +430,13 @@ export const EmailDemo = ({ hideSuggestions }) => {
|
|
|
408
430
|
subject: 'Pause service'
|
|
409
431
|
}
|
|
410
432
|
].map(emailData => {
|
|
411
|
-
const emailActionItems = emailDemoActions(create, emailData.subject);
|
|
433
|
+
const emailActionItems = emailDemoActions(create, emailData.subject, onTemplateChange);
|
|
412
434
|
return {
|
|
413
435
|
...emailData,
|
|
414
436
|
onReply: id => {
|
|
415
437
|
launchEmailComposer(id, LaunchAction.REPLY, {
|
|
416
438
|
...baseComposerProps,
|
|
439
|
+
onTemplateChange,
|
|
417
440
|
externalValidator: handleExternalEntry,
|
|
418
441
|
responseType: 'reply',
|
|
419
442
|
subject: `Re-${emailData.subject}` || ''
|
|
@@ -422,6 +445,7 @@ export const EmailDemo = ({ hideSuggestions }) => {
|
|
|
422
445
|
onForward: id => {
|
|
423
446
|
launchEmailComposer(id, LaunchAction.FORWARD, {
|
|
424
447
|
...baseComposerProps,
|
|
448
|
+
onTemplateChange,
|
|
425
449
|
externalValidator: handleExternalEntry,
|
|
426
450
|
responseType: 'forward',
|
|
427
451
|
subject: `Fw-${emailData.subject}` || ''
|
|
@@ -433,9 +457,10 @@ export const EmailDemo = ({ hideSuggestions }) => {
|
|
|
433
457
|
...baseComposerProps,
|
|
434
458
|
externalValidator: handleExternalEntry,
|
|
435
459
|
responseType: 'reply',
|
|
460
|
+
onTemplateChange,
|
|
436
461
|
subject: suggestion?.title || '',
|
|
437
462
|
bodyContent: suggestion ? suggestion.content : '',
|
|
438
|
-
|
|
463
|
+
defaultTemplateId: suggestion?.id
|
|
439
464
|
}, create);
|
|
440
465
|
},
|
|
441
466
|
actions: emailActionItems,
|
|
@@ -459,7 +484,7 @@ export const EmailDemo = ({ hideSuggestions }) => {
|
|
|
459
484
|
to: [mockEmails['Mystery Rey'], ...emailsData[0].to],
|
|
460
485
|
cc: [mockEmails['Adam Gillchrist']],
|
|
461
486
|
bcc: [mockEmails['Anton, Randy'], mockEmails['Hugh Phillips']],
|
|
462
|
-
body:
|
|
487
|
+
body: '<div>Hi, <br /> <br /><div>Sure, Our executive will come and check your connection in 24hrs. </div> <br />Regards, <br />Hugh Phillips </div>'
|
|
463
488
|
},
|
|
464
489
|
{
|
|
465
490
|
...emailsData[1],
|
|
@@ -467,7 +492,7 @@ export const EmailDemo = ({ hideSuggestions }) => {
|
|
|
467
492
|
timeStamp: '2021-01-02T14:16',
|
|
468
493
|
from: mockEmails['Mystery Rey'],
|
|
469
494
|
to: [mockEmails['Hugh Phillips']],
|
|
470
|
-
body:
|
|
495
|
+
body: '<div>Hi, <br /> <br /><div>Can you fix my internet connection. </div> <br /> <br />Regards, <br />Rey Mystery </div>'
|
|
471
496
|
}
|
|
472
497
|
],
|
|
473
498
|
[
|
|
@@ -477,7 +502,7 @@ export const EmailDemo = ({ hideSuggestions }) => {
|
|
|
477
502
|
timeStamp: '2020-12-05T18:18',
|
|
478
503
|
from: mockEmails['Laura Stevens'],
|
|
479
504
|
to: [mockEmails['Sara Davis']],
|
|
480
|
-
body:
|
|
505
|
+
body: '<div>Hi, <br /> <br /><div>Sure, Our executive will call you shortly. </div> <br /> <br />Regards, <br />Laura Stevens </div>',
|
|
481
506
|
sentiment: {
|
|
482
507
|
variant: 'positive'
|
|
483
508
|
}
|
|
@@ -488,7 +513,7 @@ export const EmailDemo = ({ hideSuggestions }) => {
|
|
|
488
513
|
timeStamp: '2021-01-04T08:30',
|
|
489
514
|
from: mockEmails['Sara Davis'],
|
|
490
515
|
to: [mockEmails['Laura Stevens']],
|
|
491
|
-
body:
|
|
516
|
+
body: '<div>Hi, <br /> <br /><div>Can you show please explain your new mobile plans. </div> <br /> <br />Regards, <br />Sara Davis </div>'
|
|
492
517
|
}
|
|
493
518
|
]
|
|
494
519
|
].map((emails, i) => {
|