@pega/cosmos-react-demos 8.0.0-build.9.0 → 8.0.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/BackgroundPicker/BackgroundPicker.stories.d.ts +9 -0
- package/jsx/build/BackgroundPicker/BackgroundPicker.stories.d.ts.map +1 -0
- package/jsx/build/BackgroundPicker/BackgroundPicker.stories.jsx +42 -0
- package/jsx/build/BackgroundPicker/BackgroundPicker.stories.jsx.map +1 -0
- package/jsx/build/DynamicInput/DynamicInput.stories.d.ts +2 -2
- package/jsx/build/DynamicInput/DynamicInput.stories.d.ts.map +1 -1
- package/jsx/build/DynamicInput/DynamicInput.stories.jsx +37 -13
- package/jsx/build/DynamicInput/DynamicInput.stories.jsx.map +1 -1
- package/jsx/build/Expression/Expression.mocks.d.ts +11 -0
- package/jsx/build/Expression/Expression.mocks.d.ts.map +1 -0
- package/jsx/build/Expression/Expression.mocks.js +41 -0
- package/jsx/build/Expression/Expression.mocks.js.map +1 -0
- package/jsx/build/Expression/Expression.stories.d.ts +18 -0
- package/jsx/build/Expression/Expression.stories.d.ts.map +1 -0
- package/jsx/build/Expression/Expression.stories.jsx +57 -0
- package/jsx/build/Expression/Expression.stories.jsx.map +1 -0
- package/jsx/build/Expression/useMockExpression.d.ts +96 -0
- package/jsx/build/Expression/useMockExpression.d.ts.map +1 -0
- package/jsx/build/Expression/useMockExpression.js +321 -0
- package/jsx/build/Expression/useMockExpression.js.map +1 -0
- package/jsx/build/ExpressionBuilder/ExpressionBuilder.mocks.d.ts +59 -0
- package/jsx/build/ExpressionBuilder/ExpressionBuilder.mocks.d.ts.map +1 -0
- package/jsx/build/ExpressionBuilder/ExpressionBuilder.mocks.js +568 -0
- package/jsx/build/ExpressionBuilder/ExpressionBuilder.mocks.js.map +1 -0
- package/jsx/build/FieldReference/FieldReference.mocks.d.ts.map +1 -1
- package/jsx/build/FieldReference/FieldReference.mocks.js +7 -2
- package/jsx/build/FieldReference/FieldReference.mocks.js.map +1 -1
- package/jsx/build/IconTile/IconTile.mocks.d.ts +8 -0
- package/jsx/build/IconTile/IconTile.mocks.d.ts.map +1 -0
- package/jsx/build/IconTile/IconTile.mocks.js +247 -0
- package/jsx/build/IconTile/IconTile.mocks.js.map +1 -0
- package/jsx/build/IconTile/IconTile.stories.d.ts +11 -0
- package/jsx/build/IconTile/IconTile.stories.d.ts.map +1 -0
- package/jsx/build/IconTile/IconTile.stories.jsx +29 -0
- package/jsx/build/IconTile/IconTile.stories.jsx.map +1 -0
- package/jsx/build/ItemLibrary/LibraryPicker.mocks.d.ts +3 -0
- package/jsx/build/ItemLibrary/LibraryPicker.mocks.d.ts.map +1 -0
- package/jsx/build/ItemLibrary/LibraryPicker.mocks.js +40 -0
- package/jsx/build/ItemLibrary/LibraryPicker.mocks.js.map +1 -0
- package/jsx/build/ItemLibrary/LibraryPicker.stories.d.ts +5 -0
- package/jsx/build/ItemLibrary/LibraryPicker.stories.d.ts.map +1 -0
- package/jsx/build/ItemLibrary/LibraryPicker.stories.jsx +32 -0
- package/jsx/build/ItemLibrary/LibraryPicker.stories.jsx.map +1 -0
- package/jsx/build/LifeCycle/LifeCycle.mocks.d.ts +382 -0
- package/jsx/build/LifeCycle/LifeCycle.mocks.d.ts.map +1 -0
- package/jsx/build/LifeCycle/LifeCycle.mocks.js +1652 -0
- package/jsx/build/LifeCycle/LifeCycle.mocks.js.map +1 -0
- package/jsx/build/LifeCycle/LifeCycle.stories.d.ts +23 -0
- package/jsx/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -0
- package/jsx/build/LifeCycle/LifeCycle.stories.jsx +1115 -0
- package/jsx/build/LifeCycle/LifeCycle.stories.jsx.map +1 -0
- package/jsx/build/LifeCycle/LifeCycle.styles.d.ts +5 -0
- package/jsx/build/LifeCycle/LifeCycle.styles.d.ts.map +1 -0
- package/jsx/build/LifeCycle/LifeCycle.styles.js +9 -0
- package/jsx/build/LifeCycle/LifeCycle.styles.js.map +1 -0
- package/jsx/build/LifeCycle/LifeCycleTest.mocks.d.ts +18 -0
- package/jsx/build/LifeCycle/LifeCycleTest.mocks.d.ts.map +1 -0
- package/jsx/build/LifeCycle/LifeCycleTest.mocks.js +5998 -0
- package/jsx/build/LifeCycle/LifeCycleTest.mocks.js.map +1 -0
- package/jsx/build/LifeCycle/utils.d.ts +123 -0
- package/jsx/build/LifeCycle/utils.d.ts.map +1 -0
- package/jsx/build/LifeCycle/utils.js +304 -0
- package/jsx/build/LifeCycle/utils.js.map +1 -0
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.styles.d.ts +1 -1
- package/jsx/condition-builder/ConditionBuilder/ConditionBuilder.styles.d.ts.map +1 -1
- package/jsx/condition-builder/ConditionBuilder/props.mock.d.ts.map +1 -1
- package/jsx/condition-builder/ConditionBuilder/props.mock.js +9 -1
- package/jsx/condition-builder/ConditionBuilder/props.mock.js.map +1 -1
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.mocks.d.ts +2 -2
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.mocks.d.ts.map +1 -1
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.mocks.js +50 -5
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.mocks.js.map +1 -1
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.stories.d.ts.map +1 -1
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.stories.jsx.map +1 -1
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.styles.d.ts +2 -2
- package/jsx/condition-builder/PromotedFilters/PromotedFilters.styles.d.ts.map +1 -1
- package/jsx/core/AppShell/AppShell.stories.d.ts +3 -3
- package/jsx/core/AppShell/AppShell.stories.d.ts.map +1 -1
- package/jsx/core/AppShell/AppShell.stories.jsx.map +1 -1
- package/jsx/core/Banner/Banner.mocks.d.ts +4 -1
- package/jsx/core/Banner/Banner.mocks.d.ts.map +1 -1
- package/jsx/core/Banner/Banner.mocks.jsx.map +1 -1
- package/jsx/core/Banner/Banner.stories.d.ts +1 -1
- package/jsx/core/Banner/Banner.stories.d.ts.map +1 -1
- package/jsx/core/Banner/Banner.stories.jsx +20 -7
- package/jsx/core/Banner/Banner.stories.jsx.map +1 -1
- package/jsx/core/Button/Button.stories.d.ts +0 -1
- package/jsx/core/Button/Button.stories.d.ts.map +1 -1
- package/jsx/core/Button/Button.stories.jsx +0 -13
- package/jsx/core/Button/Button.stories.jsx.map +1 -1
- package/jsx/core/Checkbox/Checkbox.stories.d.ts +11 -2
- package/jsx/core/Checkbox/Checkbox.stories.d.ts.map +1 -1
- package/jsx/core/Checkbox/Checkbox.stories.jsx +68 -8
- package/jsx/core/Checkbox/Checkbox.stories.jsx.map +1 -1
- package/jsx/core/CheckboxGroup/CheckboxGroup.stories.d.ts +10 -1
- package/jsx/core/CheckboxGroup/CheckboxGroup.stories.d.ts.map +1 -1
- package/jsx/core/CheckboxGroup/CheckboxGroup.stories.jsx +91 -38
- package/jsx/core/CheckboxGroup/CheckboxGroup.stories.jsx.map +1 -1
- package/jsx/core/CheckboxGroup/CheckboxGroup.styles.d.ts +2 -2
- package/jsx/core/CheckboxGroup/CheckboxGroup.styles.d.ts.map +1 -1
- package/jsx/core/DateTime/DateTimeDisplay.stories.jsx +1 -1
- package/jsx/core/DateTime/DateTimeDisplay.stories.jsx.map +1 -1
- package/jsx/core/File/FileDisplay.stories.d.ts +1 -0
- package/jsx/core/File/FileDisplay.stories.d.ts.map +1 -1
- package/jsx/core/File/FileDisplay.stories.jsx +5 -3
- package/jsx/core/File/FileDisplay.stories.jsx.map +1 -1
- package/jsx/core/Fullscreen/Fullscreen.styles.d.ts +1 -1
- package/jsx/core/Fullscreen/Fullscreen.styles.d.ts.map +1 -1
- package/jsx/core/Icon/Icon.stories.d.ts.map +1 -1
- package/jsx/core/Icon/Icon.stories.jsx +4 -4
- package/jsx/core/Icon/Icon.stories.jsx.map +1 -1
- package/jsx/core/IconPicker/IconPicker.mocks.d.ts +1 -1
- package/jsx/core/IconPicker/IconPicker.mocks.d.ts.map +1 -1
- package/jsx/core/IconPicker/IconPicker.stories.d.ts.map +1 -1
- package/jsx/core/IconPicker/IconPicker.stories.jsx +1 -1
- package/jsx/core/IconPicker/IconPicker.stories.jsx.map +1 -1
- package/jsx/core/ListToolbar/ListToolbar.stories.d.ts +1 -0
- package/jsx/core/ListToolbar/ListToolbar.stories.d.ts.map +1 -1
- package/jsx/core/ListToolbar/ListToolbar.stories.jsx +20 -2
- package/jsx/core/ListToolbar/ListToolbar.stories.jsx.map +1 -1
- package/jsx/core/Location/locationTestUtils.d.ts.map +1 -1
- package/jsx/core/Location/locationTestUtils.js +1 -0
- package/jsx/core/Location/locationTestUtils.js.map +1 -1
- package/jsx/core/Menu/Menu.stories.d.ts.map +1 -1
- package/jsx/core/Menu/Menu.stories.jsx +10 -1
- package/jsx/core/Menu/Menu.stories.jsx.map +1 -1
- package/jsx/core/MultiStepForm/MultiStepForm.mocks.d.ts +15 -16
- package/jsx/core/MultiStepForm/MultiStepForm.mocks.d.ts.map +1 -1
- package/jsx/core/MultiStepForm/MultiStepForm.mocks.jsx +5 -7
- package/jsx/core/MultiStepForm/MultiStepForm.mocks.jsx.map +1 -1
- package/jsx/core/PageTemplates/GridLayout.mocks.d.ts +42 -0
- package/jsx/core/PageTemplates/GridLayout.mocks.d.ts.map +1 -0
- package/jsx/core/PageTemplates/GridLayout.mocks.jsx +152 -0
- package/jsx/core/PageTemplates/GridLayout.mocks.jsx.map +1 -0
- package/jsx/core/PageTemplates/GridLayout.stories.d.ts +6 -0
- package/jsx/core/PageTemplates/GridLayout.stories.d.ts.map +1 -0
- package/jsx/core/PageTemplates/GridLayout.stories.jsx +81 -0
- package/jsx/core/PageTemplates/GridLayout.stories.jsx.map +1 -0
- package/jsx/core/PageTemplates/PageTemplates.stories.d.ts +2 -0
- package/jsx/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/jsx/core/PageTemplates/PageTemplates.stories.jsx +48 -2
- package/jsx/core/PageTemplates/PageTemplates.stories.jsx.map +1 -1
- package/jsx/core/PageTemplates/PageTemplates.styles.d.ts +2 -0
- package/jsx/core/PageTemplates/PageTemplates.styles.d.ts.map +1 -1
- package/jsx/core/PageTemplates/PageTemplates.styles.js +9 -0
- package/jsx/core/PageTemplates/PageTemplates.styles.js.map +1 -1
- package/jsx/core/RadioButton/RadioButton.stories.d.ts +11 -2
- package/jsx/core/RadioButton/RadioButton.stories.d.ts.map +1 -1
- package/jsx/core/RadioButton/RadioButton.stories.jsx +61 -4
- package/jsx/core/RadioButton/RadioButton.stories.jsx.map +1 -1
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.stories.d.ts +11 -2
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.stories.d.ts.map +1 -1
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.stories.jsx +203 -48
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.stories.jsx.map +1 -1
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.styles.d.ts +2 -2
- package/jsx/core/RadioButtonGroup/RadioButtonGroup.styles.d.ts.map +1 -1
- package/jsx/core/Select/Select.stories.jsx +8 -8
- package/jsx/core/Select/Select.stories.jsx.map +1 -1
- package/jsx/core/SelectionCard/SelectionCard.stories.d.ts +15 -0
- package/jsx/core/SelectionCard/SelectionCard.stories.d.ts.map +1 -0
- package/jsx/core/SelectionCard/SelectionCard.stories.jsx +76 -0
- package/jsx/core/SelectionCard/SelectionCard.stories.jsx.map +1 -0
- package/jsx/core/Tabs/Tabs.stories.d.ts +1 -0
- package/jsx/core/Tabs/Tabs.stories.d.ts.map +1 -1
- package/jsx/core/Tabs/Tabs.stories.jsx +20 -11
- package/jsx/core/Tabs/Tabs.stories.jsx.map +1 -1
- package/jsx/dnd/DragDropList/DragDropList.styles.d.ts +1 -1
- package/jsx/dnd/DragDropList/DragDropList.styles.d.ts.map +1 -1
- package/jsx/dnd/DragDropList/DragDropList.styles.js.map +1 -1
- package/jsx/dnd/StandardDragDropList/Demo.d.ts +5 -1
- package/jsx/dnd/StandardDragDropList/Demo.d.ts.map +1 -1
- package/jsx/dnd/StandardDragDropList/Demo.jsx +21 -3
- package/jsx/dnd/StandardDragDropList/Demo.jsx.map +1 -1
- package/jsx/dnd/StandardDragDropList/StandardDragDropList.stories.d.ts +3 -2
- package/jsx/dnd/StandardDragDropList/StandardDragDropList.stories.d.ts.map +1 -1
- package/jsx/dnd/StandardDragDropList/StandardDragDropList.stories.jsx +8 -4
- package/jsx/dnd/StandardDragDropList/StandardDragDropList.stories.jsx.map +1 -1
- package/jsx/dnd/StandardDragDropList/mockData.d.ts.map +1 -1
- package/jsx/dnd/StandardDragDropList/mockData.js +1 -0
- package/jsx/dnd/StandardDragDropList/mockData.js.map +1 -1
- package/jsx/rte/Editor/Editor.stories.d.ts +1 -0
- package/jsx/rte/Editor/Editor.stories.d.ts.map +1 -1
- package/jsx/rte/Editor/Editor.stories.jsx +10 -0
- package/jsx/rte/Editor/Editor.stories.jsx.map +1 -1
- package/jsx/social/Chat/Chat.mocks.d.ts.map +1 -1
- package/jsx/social/Chat/Chat.mocks.js +12 -2
- package/jsx/social/Chat/Chat.mocks.js.map +1 -1
- package/jsx/social/Chat/Chat.stories.d.ts +2 -0
- package/jsx/social/Chat/Chat.stories.d.ts.map +1 -1
- package/jsx/social/Chat/Chat.stories.jsx +11 -5
- package/jsx/social/Chat/Chat.stories.jsx.map +1 -1
- package/jsx/social/Email/Email.mocks.d.ts.map +1 -1
- package/jsx/social/Email/Email.mocks.jsx +7 -0
- package/jsx/social/Email/Email.mocks.jsx.map +1 -1
- package/jsx/social/Email/Email.stories.d.ts.map +1 -1
- package/jsx/social/Email/Email.stories.jsx +123 -11
- package/jsx/social/Email/Email.stories.jsx.map +1 -1
- package/jsx/social/Feed/Feed.mocks.d.ts +40 -18
- package/jsx/social/Feed/Feed.mocks.d.ts.map +1 -1
- package/jsx/social/Feed/Feed.mocks.jsx +132 -42
- package/jsx/social/Feed/Feed.mocks.jsx.map +1 -1
- package/jsx/social/Feed/Feed.stories.d.ts +6 -1
- package/jsx/social/Feed/Feed.stories.d.ts.map +1 -1
- package/jsx/social/Feed/Feed.stories.jsx +82 -19
- package/jsx/social/Feed/Feed.stories.jsx.map +1 -1
- package/jsx/social/Feed/FeedNewPost.mocks.d.ts +7 -3
- package/jsx/social/Feed/FeedNewPost.mocks.d.ts.map +1 -1
- package/jsx/social/Feed/FeedNewPost.mocks.jsx +154 -23
- package/jsx/social/Feed/FeedNewPost.mocks.jsx.map +1 -1
- package/jsx/social/Feed/FeedPost.mocks.d.ts +1 -1
- package/jsx/social/Feed/FeedPost.mocks.d.ts.map +1 -1
- package/jsx/social/Feed/FeedPost.mocks.jsx +248 -43
- package/jsx/social/Feed/FeedPost.mocks.jsx.map +1 -1
- package/jsx/social/Feed/FeedReply.mocks.d.ts.map +1 -1
- package/jsx/social/Feed/FeedReply.mocks.jsx +45 -9
- package/jsx/social/Feed/FeedReply.mocks.jsx.map +1 -1
- package/jsx/social/Feed/LogActivityPostType.mocks.d.ts +21 -0
- package/jsx/social/Feed/LogActivityPostType.mocks.d.ts.map +1 -0
- package/jsx/social/Feed/LogActivityPostType.mocks.jsx +145 -0
- package/jsx/social/Feed/LogActivityPostType.mocks.jsx.map +1 -0
- package/jsx/social/OpenGraphPreview/OpenGraphPreview.mocks.d.ts +28 -0
- package/jsx/social/OpenGraphPreview/OpenGraphPreview.mocks.d.ts.map +1 -0
- package/jsx/social/OpenGraphPreview/OpenGraphPreview.mocks.js +28 -0
- package/jsx/social/OpenGraphPreview/OpenGraphPreview.mocks.js.map +1 -0
- package/jsx/social/OpenGraphPreview/OpenGraphPreview.stories.d.ts +9 -0
- package/jsx/social/OpenGraphPreview/OpenGraphPreview.stories.d.ts.map +1 -0
- package/jsx/social/OpenGraphPreview/OpenGraphPreview.stories.jsx +27 -0
- package/jsx/social/OpenGraphPreview/OpenGraphPreview.stories.jsx.map +1 -0
- package/jsx/work/Article/Article.stories.d.ts.map +1 -1
- package/jsx/work/Article/Article.stories.jsx +15 -12
- package/jsx/work/Article/Article.stories.jsx.map +1 -1
- package/jsx/work/ArticleList/ArticleBuddy.stories.d.ts.map +1 -1
- package/jsx/work/ArticleList/ArticleBuddy.stories.jsx +31 -7
- package/jsx/work/ArticleList/ArticleBuddy.stories.jsx.map +1 -1
- package/jsx/work/ArticleList/ArticleList.mocks.d.ts +6 -4
- package/jsx/work/ArticleList/ArticleList.mocks.d.ts.map +1 -1
- package/jsx/work/ArticleList/ArticleList.mocks.js +75 -53
- package/jsx/work/ArticleList/ArticleList.mocks.js.map +1 -1
- package/jsx/work/ArticleList/ArticleList.stories.d.ts.map +1 -1
- package/jsx/work/ArticleList/ArticleList.stories.jsx +62 -38
- package/jsx/work/ArticleList/ArticleList.stories.jsx.map +1 -1
- package/jsx/work/CaseHierarchy/CaseHierarchy.stories.d.ts +14 -0
- package/jsx/work/CaseHierarchy/CaseHierarchy.stories.d.ts.map +1 -0
- package/jsx/work/CaseHierarchy/CaseHierarchy.stories.jsx +123 -0
- package/jsx/work/CaseHierarchy/CaseHierarchy.stories.jsx.map +1 -0
- package/jsx/work/CaseView/Attachments.mocks.jsx.map +1 -1
- package/jsx/work/CaseView/CaseView.mocks.d.ts +34 -6
- package/jsx/work/CaseView/CaseView.mocks.d.ts.map +1 -1
- package/jsx/work/CaseView/CaseView.mocks.jsx +107 -28
- 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 +11 -5
- package/jsx/work/CaseView/CaseView.stories.jsx.map +1 -1
- package/jsx/work/Details/Details.stories.d.ts +1 -0
- package/jsx/work/Details/Details.stories.d.ts.map +1 -1
- package/jsx/work/Details/Details.stories.jsx +6 -4
- package/jsx/work/Details/Details.stories.jsx.map +1 -1
- package/jsx/work/GenAICoach/GenAICoach.mocks.d.ts +16 -4
- package/jsx/work/GenAICoach/GenAICoach.mocks.d.ts.map +1 -1
- package/jsx/work/GenAICoach/GenAICoach.mocks.js +142 -13
- package/jsx/work/GenAICoach/GenAICoach.mocks.js.map +1 -1
- package/jsx/work/GenAICoach/GenAICoach.stories.d.ts +10 -1
- package/jsx/work/GenAICoach/GenAICoach.stories.d.ts.map +1 -1
- package/jsx/work/GenAICoach/GenAICoach.stories.jsx +260 -51
- package/jsx/work/GenAICoach/GenAICoach.stories.jsx.map +1 -1
- package/jsx/work/GenAICoach/useGenAICoach.d.ts.map +1 -1
- package/jsx/work/GenAICoach/useGenAICoach.js +103 -34
- package/jsx/work/GenAICoach/useGenAICoach.js.map +1 -1
- package/jsx/work/HierarchicalAssignments/HierarchicalAssignments.mock.d.ts.map +1 -1
- package/jsx/work/HierarchicalAssignments/HierarchicalAssignments.mock.jsx +39 -16
- package/jsx/work/HierarchicalAssignments/HierarchicalAssignments.mock.jsx.map +1 -1
- package/jsx/work/HierarchicalAssignments/HierarchicalAssignments.stories.d.ts +1 -0
- package/jsx/work/HierarchicalAssignments/HierarchicalAssignments.stories.d.ts.map +1 -1
- package/jsx/work/HierarchicalAssignments/HierarchicalAssignments.stories.jsx +4 -1
- package/jsx/work/HierarchicalAssignments/HierarchicalAssignments.stories.jsx.map +1 -1
- package/jsx/work/SearchResults/SearchResults.mocks.d.ts +6 -2
- package/jsx/work/SearchResults/SearchResults.mocks.d.ts.map +1 -1
- package/jsx/work/SearchResults/SearchResults.mocks.jsx.map +1 -1
- package/jsx/work/SearchResults/SearchResults.stories.d.ts.map +1 -1
- package/jsx/work/SearchResults/SearchResults.stories.jsx.map +1 -1
- package/jsx/work/Stages/Stages.mocks.jsx +1 -1
- package/jsx/work/Stages/Stages.mocks.jsx.map +1 -1
- package/jsx/work/Stakeholders/Stakeholders.mocks.d.ts +1 -1
- package/jsx/work/Stakeholders/Stakeholders.mocks.d.ts.map +1 -1
- package/jsx/work/Stakeholders/Stakeholders.mocks.jsx +3 -3
- package/jsx/work/Stakeholders/Stakeholders.mocks.jsx.map +1 -1
- package/jsx/work/Stakeholders/Stakeholders.stories.d.ts +1 -0
- package/jsx/work/Stakeholders/Stakeholders.stories.d.ts.map +1 -1
- package/jsx/work/Stakeholders/Stakeholders.stories.jsx +31 -7
- package/jsx/work/Stakeholders/Stakeholders.stories.jsx.map +1 -1
- package/jsx/work/Timeline/Timeline.mocks.d.ts.map +1 -1
- package/jsx/work/Timeline/Timeline.mocks.jsx +1 -0
- package/jsx/work/Timeline/Timeline.mocks.jsx.map +1 -1
- package/jsx/work/UtilitiesLayout/UtilitiesLayout.stories.d.ts +0 -1
- package/jsx/work/UtilitiesLayout/UtilitiesLayout.stories.d.ts.map +1 -1
- package/jsx/work/UtilitiesLayout/UtilitiesLayout.stories.jsx +0 -3
- package/jsx/work/UtilitiesLayout/UtilitiesLayout.stories.jsx.map +1 -1
- package/jsx/wss/AppShell/AppShell.mocks.d.ts +2 -1
- package/jsx/wss/AppShell/AppShell.mocks.d.ts.map +1 -1
- package/jsx/wss/AppShell/AppShell.mocks.jsx +1 -1
- package/jsx/wss/AppShell/AppShell.mocks.jsx.map +1 -1
- package/jsx/wss/AppShell/AppShell.stories.d.ts +1 -0
- package/jsx/wss/AppShell/AppShell.stories.d.ts.map +1 -1
- package/jsx/wss/AppShell/AppShell.stories.jsx +5 -3
- package/jsx/wss/AppShell/AppShell.stories.jsx.map +1 -1
- package/jsx/wss/AppShell/AppShell.styles.d.ts +3 -1
- package/jsx/wss/AppShell/AppShell.styles.d.ts.map +1 -1
- package/jsx/wss/AppShell/AppShell.styles.js +11 -4
- package/jsx/wss/AppShell/AppShell.styles.js.map +1 -1
- package/jsx/wss/CaseView/CaseView.mocks.d.ts +5 -0
- package/jsx/wss/CaseView/CaseView.mocks.d.ts.map +1 -1
- package/jsx/wss/CaseView/CaseView.mocks.jsx +55 -1
- package/jsx/wss/CaseView/CaseView.mocks.jsx.map +1 -1
- package/jsx/wss/CaseView/CaseView.stories.d.ts +1 -0
- package/jsx/wss/CaseView/CaseView.stories.d.ts.map +1 -1
- package/jsx/wss/CaseView/CaseView.stories.jsx +6 -3
- package/jsx/wss/CaseView/CaseView.stories.jsx.map +1 -1
- package/lib/build/BackgroundPicker/BackgroundPicker.stories.d.ts +9 -0
- package/lib/build/BackgroundPicker/BackgroundPicker.stories.d.ts.map +1 -0
- package/lib/build/BackgroundPicker/BackgroundPicker.stories.js +43 -0
- package/lib/build/BackgroundPicker/BackgroundPicker.stories.js.map +1 -0
- package/lib/build/DynamicInput/DynamicInput.stories.d.ts +2 -2
- package/lib/build/DynamicInput/DynamicInput.stories.d.ts.map +1 -1
- package/lib/build/DynamicInput/DynamicInput.stories.js +37 -14
- package/lib/build/DynamicInput/DynamicInput.stories.js.map +1 -1
- package/lib/build/Expression/Expression.mocks.d.ts +11 -0
- package/lib/build/Expression/Expression.mocks.d.ts.map +1 -0
- package/lib/build/Expression/Expression.mocks.js +41 -0
- package/lib/build/Expression/Expression.mocks.js.map +1 -0
- package/lib/build/Expression/Expression.stories.d.ts +18 -0
- package/lib/build/Expression/Expression.stories.d.ts.map +1 -0
- package/lib/build/Expression/Expression.stories.js +58 -0
- package/lib/build/Expression/Expression.stories.js.map +1 -0
- package/lib/build/Expression/useMockExpression.d.ts +96 -0
- package/lib/build/Expression/useMockExpression.d.ts.map +1 -0
- package/lib/build/Expression/useMockExpression.js +321 -0
- package/lib/build/Expression/useMockExpression.js.map +1 -0
- package/lib/build/ExpressionBuilder/ExpressionBuilder.mocks.d.ts +59 -0
- package/lib/build/ExpressionBuilder/ExpressionBuilder.mocks.d.ts.map +1 -0
- package/lib/build/ExpressionBuilder/ExpressionBuilder.mocks.js +568 -0
- package/lib/build/ExpressionBuilder/ExpressionBuilder.mocks.js.map +1 -0
- package/lib/build/FieldReference/FieldReference.mocks.d.ts.map +1 -1
- package/lib/build/FieldReference/FieldReference.mocks.js +7 -2
- package/lib/build/FieldReference/FieldReference.mocks.js.map +1 -1
- package/lib/build/IconTile/IconTile.mocks.d.ts +8 -0
- package/lib/build/IconTile/IconTile.mocks.d.ts.map +1 -0
- package/lib/build/IconTile/IconTile.mocks.js +247 -0
- package/lib/build/IconTile/IconTile.mocks.js.map +1 -0
- package/lib/build/IconTile/IconTile.stories.d.ts +11 -0
- package/lib/build/IconTile/IconTile.stories.d.ts.map +1 -0
- package/lib/build/IconTile/IconTile.stories.js +30 -0
- package/lib/build/IconTile/IconTile.stories.js.map +1 -0
- package/lib/build/ItemLibrary/LibraryPicker.mocks.d.ts +3 -0
- package/lib/build/ItemLibrary/LibraryPicker.mocks.d.ts.map +1 -0
- package/lib/build/ItemLibrary/LibraryPicker.mocks.js +40 -0
- package/lib/build/ItemLibrary/LibraryPicker.mocks.js.map +1 -0
- package/lib/build/ItemLibrary/LibraryPicker.stories.d.ts +5 -0
- package/lib/build/ItemLibrary/LibraryPicker.stories.d.ts.map +1 -0
- package/lib/build/ItemLibrary/LibraryPicker.stories.js +29 -0
- package/lib/build/ItemLibrary/LibraryPicker.stories.js.map +1 -0
- package/lib/build/LifeCycle/LifeCycle.mocks.d.ts +382 -0
- package/lib/build/LifeCycle/LifeCycle.mocks.d.ts.map +1 -0
- package/lib/build/LifeCycle/LifeCycle.mocks.js +1653 -0
- package/lib/build/LifeCycle/LifeCycle.mocks.js.map +1 -0
- package/lib/build/LifeCycle/LifeCycle.stories.d.ts +23 -0
- package/lib/build/LifeCycle/LifeCycle.stories.d.ts.map +1 -0
- package/lib/build/LifeCycle/LifeCycle.stories.js +1307 -0
- package/lib/build/LifeCycle/LifeCycle.stories.js.map +1 -0
- package/lib/build/LifeCycle/LifeCycle.styles.d.ts +5 -0
- package/lib/build/LifeCycle/LifeCycle.styles.d.ts.map +1 -0
- package/lib/build/LifeCycle/LifeCycle.styles.js +9 -0
- package/lib/build/LifeCycle/LifeCycle.styles.js.map +1 -0
- package/lib/build/LifeCycle/LifeCycleTest.mocks.d.ts +18 -0
- package/lib/build/LifeCycle/LifeCycleTest.mocks.d.ts.map +1 -0
- package/lib/build/LifeCycle/LifeCycleTest.mocks.js +5998 -0
- package/lib/build/LifeCycle/LifeCycleTest.mocks.js.map +1 -0
- package/lib/build/LifeCycle/utils.d.ts +123 -0
- package/lib/build/LifeCycle/utils.d.ts.map +1 -0
- package/lib/build/LifeCycle/utils.js +304 -0
- package/lib/build/LifeCycle/utils.js.map +1 -0
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.styles.d.ts +1 -1
- package/lib/condition-builder/ConditionBuilder/ConditionBuilder.styles.d.ts.map +1 -1
- package/lib/condition-builder/ConditionBuilder/props.mock.d.ts.map +1 -1
- package/lib/condition-builder/ConditionBuilder/props.mock.js +9 -1
- package/lib/condition-builder/ConditionBuilder/props.mock.js.map +1 -1
- package/lib/condition-builder/PromotedFilters/PromotedFilters.mocks.d.ts +2 -2
- package/lib/condition-builder/PromotedFilters/PromotedFilters.mocks.d.ts.map +1 -1
- package/lib/condition-builder/PromotedFilters/PromotedFilters.mocks.js +50 -5
- package/lib/condition-builder/PromotedFilters/PromotedFilters.mocks.js.map +1 -1
- package/lib/condition-builder/PromotedFilters/PromotedFilters.stories.d.ts.map +1 -1
- package/lib/condition-builder/PromotedFilters/PromotedFilters.stories.js.map +1 -1
- package/lib/condition-builder/PromotedFilters/PromotedFilters.styles.d.ts +2 -2
- package/lib/condition-builder/PromotedFilters/PromotedFilters.styles.d.ts.map +1 -1
- package/lib/core/AppShell/AppShell.mocks.d.ts +2 -2
- package/lib/core/AppShell/AppShell.mocks.d.ts.map +1 -1
- package/lib/core/AppShell/AppShell.stories.d.ts +3 -3
- package/lib/core/AppShell/AppShell.stories.d.ts.map +1 -1
- package/lib/core/AppShell/AppShell.stories.js.map +1 -1
- package/lib/core/Banner/Banner.mocks.d.ts +5 -2
- package/lib/core/Banner/Banner.mocks.d.ts.map +1 -1
- package/lib/core/Banner/Banner.mocks.js.map +1 -1
- package/lib/core/Banner/Banner.stories.d.ts +1 -1
- package/lib/core/Banner/Banner.stories.d.ts.map +1 -1
- package/lib/core/Banner/Banner.stories.js +20 -7
- package/lib/core/Banner/Banner.stories.js.map +1 -1
- package/lib/core/Button/Button.stories.d.ts +0 -1
- package/lib/core/Button/Button.stories.d.ts.map +1 -1
- package/lib/core/Button/Button.stories.js +0 -11
- package/lib/core/Button/Button.stories.js.map +1 -1
- package/lib/core/Checkbox/Checkbox.stories.d.ts +11 -2
- package/lib/core/Checkbox/Checkbox.stories.d.ts.map +1 -1
- package/lib/core/Checkbox/Checkbox.stories.js +68 -10
- package/lib/core/Checkbox/Checkbox.stories.js.map +1 -1
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.d.ts +10 -1
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.d.ts.map +1 -1
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.js +89 -18
- package/lib/core/CheckboxGroup/CheckboxGroup.stories.js.map +1 -1
- package/lib/core/CheckboxGroup/CheckboxGroup.styles.d.ts +2 -2
- package/lib/core/CheckboxGroup/CheckboxGroup.styles.d.ts.map +1 -1
- package/lib/core/ComboBox/ComboBox.mocks.d.ts +1 -1
- package/lib/core/ComboBox/ComboBox.mocks.d.ts.map +1 -1
- package/lib/core/CompositeInput/CompositeInput.mocks.d.ts +1 -1
- package/lib/core/CompositeInput/CompositeInput.mocks.d.ts.map +1 -1
- package/lib/core/Configuration/Configuration.mocks.d.ts +1 -1
- package/lib/core/Configuration/Configuration.mocks.d.ts.map +1 -1
- package/lib/core/DateTime/DateTimeDisplay.stories.js +1 -1
- package/lib/core/DateTime/DateTimeDisplay.stories.js.map +1 -1
- package/lib/core/Dialog/FormDialog.mocks.d.ts +2 -2
- package/lib/core/Dialog/FormDialog.mocks.d.ts.map +1 -1
- package/lib/core/Dialog/InfoDialog.mocks.d.ts +2 -2
- package/lib/core/Dialog/InfoDialog.mocks.d.ts.map +1 -1
- package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts +3 -3
- package/lib/core/FieldGroup/FieldGroupList.mocks.d.ts.map +1 -1
- package/lib/core/FieldValueList/FieldValueList.mocks.d.ts +1 -1
- package/lib/core/File/FileDisplay.stories.d.ts +1 -0
- package/lib/core/File/FileDisplay.stories.d.ts.map +1 -1
- package/lib/core/File/FileDisplay.stories.js +5 -3
- package/lib/core/File/FileDisplay.stories.js.map +1 -1
- package/lib/core/Form/Form.mocks.d.ts +2 -2
- package/lib/core/Form/Form.mocks.d.ts.map +1 -1
- package/lib/core/Fullscreen/Fullscreen.styles.d.ts +1 -1
- package/lib/core/Fullscreen/Fullscreen.styles.d.ts.map +1 -1
- package/lib/core/Icon/Icon.stories.d.ts.map +1 -1
- package/lib/core/Icon/Icon.stories.js +4 -4
- package/lib/core/Icon/Icon.stories.js.map +1 -1
- package/lib/core/IconPicker/IconPicker.mocks.d.ts +1 -1
- package/lib/core/IconPicker/IconPicker.mocks.d.ts.map +1 -1
- package/lib/core/IconPicker/IconPicker.stories.d.ts.map +1 -1
- package/lib/core/IconPicker/IconPicker.stories.js +1 -1
- package/lib/core/IconPicker/IconPicker.stories.js.map +1 -1
- package/lib/core/ListToolbar/ListToolbar.mocks.d.ts +2 -2
- package/lib/core/ListToolbar/ListToolbar.mocks.d.ts.map +1 -1
- package/lib/core/ListToolbar/ListToolbar.stories.d.ts +1 -0
- package/lib/core/ListToolbar/ListToolbar.stories.d.ts.map +1 -1
- package/lib/core/ListToolbar/ListToolbar.stories.js +10 -2
- package/lib/core/ListToolbar/ListToolbar.stories.js.map +1 -1
- package/lib/core/LiveLog/LiveLog.mocks.d.ts +1 -1
- package/lib/core/LiveLog/LiveLog.mocks.d.ts.map +1 -1
- package/lib/core/Location/Location.mocks.d.ts +1 -1
- package/lib/core/Location/Location.mocks.d.ts.map +1 -1
- package/lib/core/Location/locationTestUtils.d.ts.map +1 -1
- package/lib/core/Location/locationTestUtils.js +1 -0
- package/lib/core/Location/locationTestUtils.js.map +1 -1
- package/lib/core/Menu/Menu.stories.d.ts.map +1 -1
- package/lib/core/Menu/Menu.stories.js +10 -1
- package/lib/core/Menu/Menu.stories.js.map +1 -1
- package/lib/core/Modal/Modal.mocks.d.ts +8 -8
- package/lib/core/Modal/Modal.mocks.d.ts.map +1 -1
- package/lib/core/MultiStepForm/MultiStepForm.mocks.d.ts +20 -21
- package/lib/core/MultiStepForm/MultiStepForm.mocks.d.ts.map +1 -1
- package/lib/core/MultiStepForm/MultiStepForm.mocks.js +5 -7
- package/lib/core/MultiStepForm/MultiStepForm.mocks.js.map +1 -1
- package/lib/core/PageTemplates/GridLayout.mocks.d.ts +42 -0
- package/lib/core/PageTemplates/GridLayout.mocks.d.ts.map +1 -0
- package/lib/core/PageTemplates/GridLayout.mocks.js +131 -0
- package/lib/core/PageTemplates/GridLayout.mocks.js.map +1 -0
- package/lib/core/PageTemplates/GridLayout.stories.d.ts +6 -0
- package/lib/core/PageTemplates/GridLayout.stories.d.ts.map +1 -0
- package/lib/core/PageTemplates/GridLayout.stories.js +54 -0
- package/lib/core/PageTemplates/GridLayout.stories.js.map +1 -0
- package/lib/core/PageTemplates/PageTemplates.stories.d.ts +2 -0
- package/lib/core/PageTemplates/PageTemplates.stories.d.ts.map +1 -1
- package/lib/core/PageTemplates/PageTemplates.stories.js +41 -2
- package/lib/core/PageTemplates/PageTemplates.stories.js.map +1 -1
- package/lib/core/PageTemplates/PageTemplates.styles.d.ts +2 -0
- package/lib/core/PageTemplates/PageTemplates.styles.d.ts.map +1 -1
- package/lib/core/PageTemplates/PageTemplates.styles.js +9 -0
- package/lib/core/PageTemplates/PageTemplates.styles.js.map +1 -1
- package/lib/core/Popover/Popover.mocks.d.ts +1 -1
- package/lib/core/Popover/Popover.mocks.d.ts.map +1 -1
- package/lib/core/RadioButton/RadioButton.stories.d.ts +11 -2
- package/lib/core/RadioButton/RadioButton.stories.d.ts.map +1 -1
- package/lib/core/RadioButton/RadioButton.stories.js +61 -4
- package/lib/core/RadioButton/RadioButton.stories.js.map +1 -1
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.d.ts +11 -2
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.d.ts.map +1 -1
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.js +196 -21
- package/lib/core/RadioButtonGroup/RadioButtonGroup.stories.js.map +1 -1
- package/lib/core/RadioButtonGroup/RadioButtonGroup.styles.d.ts +2 -2
- package/lib/core/RadioButtonGroup/RadioButtonGroup.styles.d.ts.map +1 -1
- package/lib/core/Select/Select.stories.js +2 -2
- package/lib/core/Select/Select.stories.js.map +1 -1
- package/lib/core/SelectionCard/SelectionCard.stories.d.ts +15 -0
- package/lib/core/SelectionCard/SelectionCard.stories.d.ts.map +1 -0
- package/lib/core/SelectionCard/SelectionCard.stories.js +77 -0
- package/lib/core/SelectionCard/SelectionCard.stories.js.map +1 -0
- package/lib/core/Table/Table.mocks.d.ts +1 -1
- package/lib/core/Tabs/Tabs.mocks.d.ts +1 -1
- package/lib/core/Tabs/Tabs.mocks.d.ts.map +1 -1
- package/lib/core/Tabs/Tabs.stories.d.ts +1 -0
- package/lib/core/Tabs/Tabs.stories.d.ts.map +1 -1
- package/lib/core/Tabs/Tabs.stories.js +12 -6
- package/lib/core/Tabs/Tabs.stories.js.map +1 -1
- package/lib/dnd/DragDropList/DragDropList.mocks.d.ts +2 -2
- package/lib/dnd/DragDropList/DragDropList.mocks.d.ts.map +1 -1
- package/lib/dnd/DragDropList/DragDropList.styles.d.ts +1 -1
- package/lib/dnd/DragDropList/DragDropList.styles.d.ts.map +1 -1
- package/lib/dnd/DragDropList/DragDropList.styles.js.map +1 -1
- package/lib/dnd/StandardDragDropList/Demo.d.ts +5 -1
- package/lib/dnd/StandardDragDropList/Demo.d.ts.map +1 -1
- package/lib/dnd/StandardDragDropList/Demo.js +21 -3
- package/lib/dnd/StandardDragDropList/Demo.js.map +1 -1
- package/lib/dnd/StandardDragDropList/GroupConfig.d.ts +1 -1
- package/lib/dnd/StandardDragDropList/GroupConfig.d.ts.map +1 -1
- package/lib/dnd/StandardDragDropList/ItemConfig.d.ts +1 -1
- package/lib/dnd/StandardDragDropList/ItemConfig.d.ts.map +1 -1
- package/lib/dnd/StandardDragDropList/Popover.d.ts +1 -1
- package/lib/dnd/StandardDragDropList/Popover.d.ts.map +1 -1
- package/lib/dnd/StandardDragDropList/SelectionMenu.d.ts +1 -1
- package/lib/dnd/StandardDragDropList/SelectionMenu.d.ts.map +1 -1
- package/lib/dnd/StandardDragDropList/StandardDragDropList.stories.d.ts +3 -2
- package/lib/dnd/StandardDragDropList/StandardDragDropList.stories.d.ts.map +1 -1
- package/lib/dnd/StandardDragDropList/StandardDragDropList.stories.js +7 -3
- package/lib/dnd/StandardDragDropList/StandardDragDropList.stories.js.map +1 -1
- package/lib/dnd/StandardDragDropList/mockData.d.ts.map +1 -1
- package/lib/dnd/StandardDragDropList/mockData.js +1 -0
- package/lib/dnd/StandardDragDropList/mockData.js.map +1 -1
- package/lib/rte/Editor/Editor.stories.d.ts +1 -0
- package/lib/rte/Editor/Editor.stories.d.ts.map +1 -1
- package/lib/rte/Editor/Editor.stories.js +8 -1
- package/lib/rte/Editor/Editor.stories.js.map +1 -1
- package/lib/social/Chat/Chat.mocks.d.ts.map +1 -1
- package/lib/social/Chat/Chat.mocks.js +12 -2
- package/lib/social/Chat/Chat.mocks.js.map +1 -1
- package/lib/social/Chat/Chat.stories.d.ts +2 -0
- package/lib/social/Chat/Chat.stories.d.ts.map +1 -1
- package/lib/social/Chat/Chat.stories.js +11 -5
- package/lib/social/Chat/Chat.stories.js.map +1 -1
- package/lib/social/Email/Email.mocks.d.ts +1 -1
- package/lib/social/Email/Email.mocks.d.ts.map +1 -1
- package/lib/social/Email/Email.mocks.js +7 -0
- package/lib/social/Email/Email.mocks.js.map +1 -1
- package/lib/social/Email/Email.stories.d.ts.map +1 -1
- package/lib/social/Email/Email.stories.js +123 -11
- package/lib/social/Email/Email.stories.js.map +1 -1
- package/lib/social/Feed/Feed.mocks.d.ts +42 -20
- package/lib/social/Feed/Feed.mocks.d.ts.map +1 -1
- package/lib/social/Feed/Feed.mocks.js +125 -38
- package/lib/social/Feed/Feed.mocks.js.map +1 -1
- package/lib/social/Feed/Feed.stories.d.ts +6 -1
- package/lib/social/Feed/Feed.stories.d.ts.map +1 -1
- package/lib/social/Feed/Feed.stories.js +81 -18
- package/lib/social/Feed/Feed.stories.js.map +1 -1
- package/lib/social/Feed/FeedNewPost.mocks.d.ts +7 -3
- package/lib/social/Feed/FeedNewPost.mocks.d.ts.map +1 -1
- package/lib/social/Feed/FeedNewPost.mocks.js +156 -24
- package/lib/social/Feed/FeedNewPost.mocks.js.map +1 -1
- package/lib/social/Feed/FeedPost.mocks.d.ts +1 -1
- package/lib/social/Feed/FeedPost.mocks.d.ts.map +1 -1
- package/lib/social/Feed/FeedPost.mocks.js +247 -42
- package/lib/social/Feed/FeedPost.mocks.js.map +1 -1
- package/lib/social/Feed/FeedReply.mocks.d.ts +1 -1
- package/lib/social/Feed/FeedReply.mocks.d.ts.map +1 -1
- package/lib/social/Feed/FeedReply.mocks.js +45 -9
- package/lib/social/Feed/FeedReply.mocks.js.map +1 -1
- package/lib/social/Feed/LogActivityPostType.mocks.d.ts +21 -0
- package/lib/social/Feed/LogActivityPostType.mocks.d.ts.map +1 -0
- package/lib/social/Feed/LogActivityPostType.mocks.js +133 -0
- package/lib/social/Feed/LogActivityPostType.mocks.js.map +1 -0
- package/lib/social/OpenGraphPreview/OpenGraphPreview.mocks.d.ts +28 -0
- package/lib/social/OpenGraphPreview/OpenGraphPreview.mocks.d.ts.map +1 -0
- package/lib/social/OpenGraphPreview/OpenGraphPreview.mocks.js +28 -0
- package/lib/social/OpenGraphPreview/OpenGraphPreview.mocks.js.map +1 -0
- package/lib/social/OpenGraphPreview/OpenGraphPreview.stories.d.ts +9 -0
- package/lib/social/OpenGraphPreview/OpenGraphPreview.stories.d.ts.map +1 -0
- package/lib/social/OpenGraphPreview/OpenGraphPreview.stories.js +22 -0
- package/lib/social/OpenGraphPreview/OpenGraphPreview.stories.js.map +1 -0
- package/lib/work/Article/Article.stories.d.ts.map +1 -1
- package/lib/work/Article/Article.stories.js +15 -12
- package/lib/work/Article/Article.stories.js.map +1 -1
- package/lib/work/ArticleList/ArticleBuddy.stories.d.ts.map +1 -1
- package/lib/work/ArticleList/ArticleBuddy.stories.js +31 -7
- package/lib/work/ArticleList/ArticleBuddy.stories.js.map +1 -1
- package/lib/work/ArticleList/ArticleList.mocks.d.ts +6 -4
- package/lib/work/ArticleList/ArticleList.mocks.d.ts.map +1 -1
- package/lib/work/ArticleList/ArticleList.mocks.js +75 -53
- package/lib/work/ArticleList/ArticleList.mocks.js.map +1 -1
- package/lib/work/ArticleList/ArticleList.stories.d.ts.map +1 -1
- package/lib/work/ArticleList/ArticleList.stories.js +62 -38
- package/lib/work/ArticleList/ArticleList.stories.js.map +1 -1
- package/lib/work/CaseHierarchy/CaseHierarchy.stories.d.ts +14 -0
- package/lib/work/CaseHierarchy/CaseHierarchy.stories.d.ts.map +1 -0
- package/lib/work/CaseHierarchy/CaseHierarchy.stories.js +126 -0
- package/lib/work/CaseHierarchy/CaseHierarchy.stories.js.map +1 -0
- package/lib/work/CaseView/Attachments.mocks.d.ts +1 -1
- package/lib/work/CaseView/Attachments.mocks.d.ts.map +1 -1
- package/lib/work/CaseView/Attachments.mocks.js.map +1 -1
- package/lib/work/CaseView/CaseView.mocks.d.ts +40 -12
- package/lib/work/CaseView/CaseView.mocks.d.ts.map +1 -1
- package/lib/work/CaseView/CaseView.mocks.js +107 -29
- 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 +11 -5
- package/lib/work/CaseView/CaseView.stories.js.map +1 -1
- package/lib/work/CaseView/Details.mocks.d.ts +1 -1
- package/lib/work/CaseView/Details.mocks.d.ts.map +1 -1
- package/lib/work/CaseView/Pulse.mocks.d.ts +1 -1
- package/lib/work/CaseView/Pulse.mocks.d.ts.map +1 -1
- package/lib/work/ConfigurableLayout/ConfigurableLayout.mocks.d.ts +6 -6
- package/lib/work/ConfigurableLayout/ConfigurableLayout.mocks.d.ts.map +1 -1
- package/lib/work/Details/Details.stories.d.ts +1 -0
- package/lib/work/Details/Details.stories.d.ts.map +1 -1
- package/lib/work/Details/Details.stories.js +6 -4
- package/lib/work/Details/Details.stories.js.map +1 -1
- package/lib/work/GenAICoach/GenAICoach.mocks.d.ts +16 -4
- package/lib/work/GenAICoach/GenAICoach.mocks.d.ts.map +1 -1
- package/lib/work/GenAICoach/GenAICoach.mocks.js +142 -13
- package/lib/work/GenAICoach/GenAICoach.mocks.js.map +1 -1
- package/lib/work/GenAICoach/GenAICoach.stories.d.ts +10 -1
- package/lib/work/GenAICoach/GenAICoach.stories.d.ts.map +1 -1
- package/lib/work/GenAICoach/GenAICoach.stories.js +259 -50
- package/lib/work/GenAICoach/GenAICoach.stories.js.map +1 -1
- package/lib/work/GenAICoach/useGenAICoach.d.ts.map +1 -1
- package/lib/work/GenAICoach/useGenAICoach.js +103 -34
- package/lib/work/GenAICoach/useGenAICoach.js.map +1 -1
- package/lib/work/HierarchicalAssignments/HierarchicalAssignments.mock.d.ts +4 -4
- package/lib/work/HierarchicalAssignments/HierarchicalAssignments.mock.d.ts.map +1 -1
- package/lib/work/HierarchicalAssignments/HierarchicalAssignments.mock.js +39 -16
- package/lib/work/HierarchicalAssignments/HierarchicalAssignments.mock.js.map +1 -1
- package/lib/work/HierarchicalAssignments/HierarchicalAssignments.stories.d.ts +1 -0
- package/lib/work/HierarchicalAssignments/HierarchicalAssignments.stories.d.ts.map +1 -1
- package/lib/work/HierarchicalAssignments/HierarchicalAssignments.stories.js +4 -1
- package/lib/work/HierarchicalAssignments/HierarchicalAssignments.stories.js.map +1 -1
- package/lib/work/Predictions/Predictions.mocks.d.ts +1 -1
- package/lib/work/Predictions/Predictions.mocks.d.ts.map +1 -1
- package/lib/work/SearchResults/SearchResults.mocks.d.ts +6 -2
- package/lib/work/SearchResults/SearchResults.mocks.d.ts.map +1 -1
- package/lib/work/SearchResults/SearchResults.mocks.js.map +1 -1
- package/lib/work/SearchResults/SearchResults.stories.d.ts.map +1 -1
- package/lib/work/SearchResults/SearchResults.stories.js.map +1 -1
- package/lib/work/Stages/Stages.mocks.d.ts +1 -1
- package/lib/work/Stages/Stages.mocks.js +1 -1
- package/lib/work/Stages/Stages.mocks.js.map +1 -1
- package/lib/work/Stakeholders/Stakeholders.mocks.d.ts +2 -2
- package/lib/work/Stakeholders/Stakeholders.mocks.d.ts.map +1 -1
- package/lib/work/Stakeholders/Stakeholders.mocks.js +3 -3
- package/lib/work/Stakeholders/Stakeholders.mocks.js.map +1 -1
- package/lib/work/Stakeholders/Stakeholders.stories.d.ts +1 -0
- package/lib/work/Stakeholders/Stakeholders.stories.d.ts.map +1 -1
- package/lib/work/Stakeholders/Stakeholders.stories.js +32 -7
- package/lib/work/Stakeholders/Stakeholders.stories.js.map +1 -1
- package/lib/work/Timeline/Timeline.mocks.d.ts.map +1 -1
- package/lib/work/Timeline/Timeline.mocks.js +1 -0
- package/lib/work/Timeline/Timeline.mocks.js.map +1 -1
- package/lib/work/UtilitiesLayout/UtilitiesLayout.stories.d.ts +0 -1
- package/lib/work/UtilitiesLayout/UtilitiesLayout.stories.d.ts.map +1 -1
- package/lib/work/UtilitiesLayout/UtilitiesLayout.stories.js +0 -3
- package/lib/work/UtilitiesLayout/UtilitiesLayout.stories.js.map +1 -1
- package/lib/wss/AppShell/AppShell.mocks.d.ts +5 -4
- package/lib/wss/AppShell/AppShell.mocks.d.ts.map +1 -1
- package/lib/wss/AppShell/AppShell.mocks.js +1 -1
- package/lib/wss/AppShell/AppShell.mocks.js.map +1 -1
- package/lib/wss/AppShell/AppShell.stories.d.ts +1 -0
- package/lib/wss/AppShell/AppShell.stories.d.ts.map +1 -1
- package/lib/wss/AppShell/AppShell.stories.js +5 -3
- package/lib/wss/AppShell/AppShell.stories.js.map +1 -1
- package/lib/wss/AppShell/AppShell.styles.d.ts +3 -1
- package/lib/wss/AppShell/AppShell.styles.d.ts.map +1 -1
- package/lib/wss/AppShell/AppShell.styles.js +11 -4
- package/lib/wss/AppShell/AppShell.styles.js.map +1 -1
- package/lib/wss/CaseView/CaseView.mocks.d.ts +6 -1
- package/lib/wss/CaseView/CaseView.mocks.d.ts.map +1 -1
- package/lib/wss/CaseView/CaseView.mocks.js +55 -1
- package/lib/wss/CaseView/CaseView.mocks.js.map +1 -1
- package/lib/wss/CaseView/CaseView.stories.d.ts +1 -0
- package/lib/wss/CaseView/CaseView.stories.d.ts.map +1 -1
- package/lib/wss/CaseView/CaseView.stories.js +6 -3
- package/lib/wss/CaseView/CaseView.stories.js.map +1 -1
- package/package.json +13 -13
- 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 -85
- package/jsx/work/Timeline/Timeline.stories.jsx.map +0 -1
- package/lib/work/Timeline/Timeline.stories.d.ts +0 -11
- package/lib/work/Timeline/Timeline.stories.d.ts.map +0 -1
- package/lib/work/Timeline/Timeline.stories.js +0 -79
- package/lib/work/Timeline/Timeline.stories.js.map +0 -1
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
import { useState, useMemo, useRef, useEffect, useCallback, Component } from 'react';
|
|
2
|
+
import { action } from '@storybook/addon-actions';
|
|
3
|
+
import { menuHelpers, useEvent, debounce } from '@pega/cosmos-react-core';
|
|
4
|
+
import { items, getFilterRegex, suggestedRuleType, getSuggestedFunction, getScopeFromPosition, inLineErrorsMocks, suggestedFields } from '../ExpressionBuilder/ExpressionBuilder.mocks';
|
|
5
|
+
import { mockSuggestionList } from './Expression.mocks';
|
|
6
|
+
const inputParamChange = 'Input param change';
|
|
7
|
+
export default function useMockExpression({ inLineError = 'single', showExpressionBuilderErrorBanner, expShowErrors }) {
|
|
8
|
+
const [showModal, setShowModal] = useState(false);
|
|
9
|
+
const [selectedId, setSelectedId] = useState();
|
|
10
|
+
const [showSuggestions, setShowSuggestions] = useState(false);
|
|
11
|
+
const [suggestionList, setSuggestionList] = useState([]);
|
|
12
|
+
const [inputValue, setInputValue] = useState('');
|
|
13
|
+
const [expBuilderInputValue, setExpBuilderInputValue] = useState('');
|
|
14
|
+
const [expressionItems, setExpressionItems] = useState([]);
|
|
15
|
+
const [expressionDetails, setExpressionDetails] = useState({});
|
|
16
|
+
const [isExpBuilderLoading, setIsExpBuilderLoading] = useState(false);
|
|
17
|
+
const [searchFilter, setSearchFilter] = useState('');
|
|
18
|
+
const [searchValue, setSearchValue] = useState('');
|
|
19
|
+
const filterRegex = useMemo(() => getFilterRegex(searchValue), [searchValue]);
|
|
20
|
+
const [errors, setErrors] = useState('');
|
|
21
|
+
const handle = useRef(null);
|
|
22
|
+
const expressionRef = useRef(null);
|
|
23
|
+
const [loading, setLoading] = useState(false);
|
|
24
|
+
const [inLineErrors, setInLineErrors] = useState();
|
|
25
|
+
const [expBuilderErrorBanner, setExpBuilderErrorBanner] = useState();
|
|
26
|
+
const [expressionDetailsValues, setExpressionDetailsValues] = useState({});
|
|
27
|
+
const detailsFilter = (location, filterValue) => location.find(field => field.value.toLowerCase().includes(filterValue));
|
|
28
|
+
const openExpBuilderModal = async () => {
|
|
29
|
+
setShowModal(true);
|
|
30
|
+
};
|
|
31
|
+
async function mockApiCall() {
|
|
32
|
+
return new Promise(resolve => {
|
|
33
|
+
setTimeout(() => {
|
|
34
|
+
resolve();
|
|
35
|
+
}, 1000);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
if (showModal) {
|
|
40
|
+
setIsExpBuilderLoading(true);
|
|
41
|
+
mockApiCall().then(() => {
|
|
42
|
+
setExpressionItems(items);
|
|
43
|
+
setIsExpBuilderLoading(false);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}, [showModal, items]);
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
if (inLineErrorsMocks?.length && inLineError && expShowErrors) {
|
|
49
|
+
const inLineErrorList = inLineErrorsMocks.slice(0, inLineError === 'single' ? 1 : inLineErrorsMocks.length);
|
|
50
|
+
setInLineErrors(inLineErrorList);
|
|
51
|
+
const messages = [];
|
|
52
|
+
inLineErrorList.forEach(item => messages.push(...item.messages));
|
|
53
|
+
setErrors(messages.join(', '));
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
setInLineErrors([]);
|
|
57
|
+
setErrors('');
|
|
58
|
+
}
|
|
59
|
+
}, [inLineError, expShowErrors]);
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
if (inLineErrorsMocks?.length && showExpressionBuilderErrorBanner) {
|
|
62
|
+
const messages = [];
|
|
63
|
+
inLineErrorsMocks.forEach(item => messages.push(...item.messages));
|
|
64
|
+
setExpBuilderErrorBanner({
|
|
65
|
+
variant: 'urgent',
|
|
66
|
+
messages,
|
|
67
|
+
onDismiss: () => {
|
|
68
|
+
setExpBuilderErrorBanner(undefined);
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
setExpBuilderErrorBanner(undefined);
|
|
74
|
+
}
|
|
75
|
+
}, [showExpressionBuilderErrorBanner]);
|
|
76
|
+
useEffect(() => {
|
|
77
|
+
const lowerSearchFilter = searchFilter.toLowerCase();
|
|
78
|
+
const lowerSearchValue = searchValue.toLowerCase();
|
|
79
|
+
const filteredItems = items.filter(item => {
|
|
80
|
+
return (item.type.toLowerCase().includes(lowerSearchFilter === 'all' ? '' : lowerSearchFilter) &&
|
|
81
|
+
(item.primary.toLowerCase().includes(lowerSearchValue) ||
|
|
82
|
+
detailsFilter(item.details.primary, lowerSearchValue) ||
|
|
83
|
+
detailsFilter(item.details.output, lowerSearchValue)));
|
|
84
|
+
});
|
|
85
|
+
const matchedItems = filteredItems.map(item => {
|
|
86
|
+
if (item.primary.toLowerCase().includes(lowerSearchValue)) {
|
|
87
|
+
return item;
|
|
88
|
+
}
|
|
89
|
+
let matchedField;
|
|
90
|
+
const primaryField = detailsFilter(item.details.primary, lowerSearchValue);
|
|
91
|
+
if (primaryField) {
|
|
92
|
+
matchedField = primaryField;
|
|
93
|
+
}
|
|
94
|
+
const outputField = detailsFilter(item.details.output, lowerSearchValue);
|
|
95
|
+
if (outputField && !primaryField) {
|
|
96
|
+
matchedField = outputField;
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
...item,
|
|
100
|
+
matchedField: { name: matchedField?.field, value: matchedField?.value }
|
|
101
|
+
};
|
|
102
|
+
});
|
|
103
|
+
setExpressionItems(matchedItems);
|
|
104
|
+
}, [searchValue, searchFilter]);
|
|
105
|
+
useEffect(() => {
|
|
106
|
+
if (showModal) {
|
|
107
|
+
setExpBuilderInputValue(handle.current?.getExpression() ?? '');
|
|
108
|
+
}
|
|
109
|
+
}, [showModal]);
|
|
110
|
+
const onInputParamChange = (id, field, value) => {
|
|
111
|
+
action(inputParamChange)(id, field, value);
|
|
112
|
+
};
|
|
113
|
+
const expressionSubmitHandler = useCallback(({ close }) => {
|
|
114
|
+
if (!errors && !expBuilderErrorBanner) {
|
|
115
|
+
setShowModal(false);
|
|
116
|
+
setInputValue(expBuilderInputValue);
|
|
117
|
+
close();
|
|
118
|
+
}
|
|
119
|
+
}, [errors, expBuilderErrorBanner, expBuilderInputValue]);
|
|
120
|
+
const expressionCancelHandler = ({ close }) => {
|
|
121
|
+
setShowModal(false);
|
|
122
|
+
close?.();
|
|
123
|
+
};
|
|
124
|
+
const expBuilderFilterChangeHandler = (value) => {
|
|
125
|
+
setSearchFilter(value);
|
|
126
|
+
};
|
|
127
|
+
const expBuilderSearchChangeHandler = (value) => {
|
|
128
|
+
setSearchValue(value);
|
|
129
|
+
};
|
|
130
|
+
const onItemAdd = (id, addExpression) => {
|
|
131
|
+
const item = items.find(instance => instance.id === id);
|
|
132
|
+
if (!item) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
if (item.type.toLowerCase() === 'field') {
|
|
136
|
+
addExpression(item.expression);
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
addExpression(`${item.expression.slice(0, item.expression.length - 1)}${expressionDetailsValues[item.id]
|
|
140
|
+
? Object.keys(expressionDetailsValues[item.id])
|
|
141
|
+
.map(field => `${expressionDetailsValues[item.id][field]}`)
|
|
142
|
+
.join(', ')
|
|
143
|
+
: ''})`);
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
const onItemExpand = (id) => {
|
|
147
|
+
action('onItemExpand')(id);
|
|
148
|
+
const itemDetails = expressionItems.find(item => item.id === id)?.details;
|
|
149
|
+
const fieldValueMapper = ({ field, value }) => {
|
|
150
|
+
return {
|
|
151
|
+
id: `${id}-${field}`,
|
|
152
|
+
name: field,
|
|
153
|
+
value
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
if (itemDetails) {
|
|
157
|
+
const primary = itemDetails.primary.map(fieldValueMapper);
|
|
158
|
+
const outputParams = itemDetails.output?.map(fieldValueMapper);
|
|
159
|
+
const inputParams = itemDetails.input?.map(({ id: fieldId, field, type }) => {
|
|
160
|
+
const inputParam = {
|
|
161
|
+
id: `${id}-${fieldId}`,
|
|
162
|
+
renderer: Component,
|
|
163
|
+
rendererProps: {
|
|
164
|
+
label: field,
|
|
165
|
+
onChange: (e) => onInputParamChange(id, fieldId, e.target.value),
|
|
166
|
+
type: type
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
return inputParam;
|
|
170
|
+
});
|
|
171
|
+
setExpressionDetails((prev) => {
|
|
172
|
+
return {
|
|
173
|
+
...prev,
|
|
174
|
+
[id]: {
|
|
175
|
+
primary,
|
|
176
|
+
outputParams,
|
|
177
|
+
inputParams
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
const onItemCollapse = (id) => {
|
|
184
|
+
action('onItemCollapse')(id);
|
|
185
|
+
setTimeout(() => {
|
|
186
|
+
setExpressionDetails((prev) => {
|
|
187
|
+
const newExpressionDetails = { ...prev };
|
|
188
|
+
delete newExpressionDetails[id];
|
|
189
|
+
return newExpressionDetails;
|
|
190
|
+
});
|
|
191
|
+
}, 500);
|
|
192
|
+
setExpressionDetailsValues(prev => {
|
|
193
|
+
const newValues = { ...prev };
|
|
194
|
+
delete newValues[id];
|
|
195
|
+
return newValues;
|
|
196
|
+
});
|
|
197
|
+
};
|
|
198
|
+
const expressionChangeHandler = useRef(debounce(expression => {
|
|
199
|
+
if (expression.includes('undefined')) {
|
|
200
|
+
setErrors('Correct the invalid expression, expression cannot contain "undefined" ');
|
|
201
|
+
}
|
|
202
|
+
else {
|
|
203
|
+
setExpBuilderInputValue(expression);
|
|
204
|
+
setErrors('');
|
|
205
|
+
}
|
|
206
|
+
}, 600)).current;
|
|
207
|
+
const fetchSuggestions = (autoCompleteTrigger, cursorPosition) => {
|
|
208
|
+
action('cursorPosition')(cursorPosition);
|
|
209
|
+
if (autoCompleteTrigger === '@') {
|
|
210
|
+
setLoading(true);
|
|
211
|
+
return new Promise(resolve => {
|
|
212
|
+
setTimeout(() => {
|
|
213
|
+
setLoading(false);
|
|
214
|
+
resolve(suggestedRuleType);
|
|
215
|
+
}, 1000);
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
if (autoCompleteTrigger === ':') {
|
|
219
|
+
const scope = getScopeFromPosition(cursorPosition, autoCompleteTrigger, handle.current?.getExpression() ?? '').split('@')[0];
|
|
220
|
+
const suggestedFunctions = getSuggestedFunction(scope);
|
|
221
|
+
setLoading(true);
|
|
222
|
+
return new Promise(resolve => {
|
|
223
|
+
setTimeout(() => {
|
|
224
|
+
setLoading(false);
|
|
225
|
+
resolve(suggestedFunctions);
|
|
226
|
+
}, 1000);
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
setLoading(true);
|
|
230
|
+
return new Promise(resolve => {
|
|
231
|
+
setTimeout(() => {
|
|
232
|
+
setLoading(false);
|
|
233
|
+
resolve(suggestedFields);
|
|
234
|
+
}, 1000);
|
|
235
|
+
});
|
|
236
|
+
};
|
|
237
|
+
const suggestionItemClickHandler = (id) => {
|
|
238
|
+
let valueSelected = suggestionList?.find(item => item.id === id)?.key || '';
|
|
239
|
+
valueSelected = !inputValue.endsWith('.')
|
|
240
|
+
? `${inputValue}.${valueSelected}`
|
|
241
|
+
: `${inputValue}${valueSelected}`;
|
|
242
|
+
setSelectedId(id);
|
|
243
|
+
setInputValue(valueSelected);
|
|
244
|
+
setShowSuggestions(false);
|
|
245
|
+
setSuggestionList([]);
|
|
246
|
+
};
|
|
247
|
+
const suggestionItemsToRender = useMemo(() => {
|
|
248
|
+
let newItems = suggestionList;
|
|
249
|
+
newItems = menuHelpers.mapTree(newItems, item => ({
|
|
250
|
+
...item,
|
|
251
|
+
selected: selectedId ? selectedId === item.id : undefined
|
|
252
|
+
}));
|
|
253
|
+
return newItems;
|
|
254
|
+
}, [suggestionList, selectedId]);
|
|
255
|
+
const inputKeydownHandler = async (e) => {
|
|
256
|
+
if ((e.key === '.' || e.key === 'ArrowDown') && !showSuggestions) {
|
|
257
|
+
setSuggestionList([]);
|
|
258
|
+
await mockApiCall().then(() => {
|
|
259
|
+
setSuggestionList(mockSuggestionList);
|
|
260
|
+
setShowSuggestions(true);
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
else if (showSuggestions && e.key === 'Escape') {
|
|
264
|
+
setSelectedId(undefined);
|
|
265
|
+
setShowSuggestions(false);
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
const inputChangeHandler = (e) => {
|
|
269
|
+
setInputValue(e.target.value);
|
|
270
|
+
setSelectedId(undefined);
|
|
271
|
+
};
|
|
272
|
+
const handleClickOutside = (event) => {
|
|
273
|
+
if (expressionRef.current?.getPopOverRef() &&
|
|
274
|
+
event.target instanceof Node &&
|
|
275
|
+
!expressionRef.current.getPopOverRef()?.contains(event.target)) {
|
|
276
|
+
setShowSuggestions(false);
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
useEvent('click', handleClickOutside);
|
|
280
|
+
const resetExpression = () => {
|
|
281
|
+
setInputValue('');
|
|
282
|
+
};
|
|
283
|
+
return {
|
|
284
|
+
showExpBuilderModal: showModal,
|
|
285
|
+
setShowExpBuilderModal: setShowModal,
|
|
286
|
+
openExpBuilderModal,
|
|
287
|
+
showSuggestions,
|
|
288
|
+
suggestionList,
|
|
289
|
+
inputValue,
|
|
290
|
+
expBuilderInputValue,
|
|
291
|
+
expressionItems,
|
|
292
|
+
expressionDetails,
|
|
293
|
+
isExpBuilderLoading,
|
|
294
|
+
searchFilter,
|
|
295
|
+
setSearchFilter,
|
|
296
|
+
filterRegex,
|
|
297
|
+
searchValue,
|
|
298
|
+
setSearchValue,
|
|
299
|
+
errors,
|
|
300
|
+
handle,
|
|
301
|
+
expressionRef,
|
|
302
|
+
loading,
|
|
303
|
+
inLineErrors,
|
|
304
|
+
expBuilderErrorBanner,
|
|
305
|
+
expressionSubmitHandler,
|
|
306
|
+
expressionCancelHandler,
|
|
307
|
+
onItemAdd,
|
|
308
|
+
onItemExpand,
|
|
309
|
+
onItemCollapse,
|
|
310
|
+
expressionChangeHandler,
|
|
311
|
+
fetchSuggestions,
|
|
312
|
+
suggestionItemsToRender,
|
|
313
|
+
inputKeydownHandler,
|
|
314
|
+
inputChangeHandler,
|
|
315
|
+
expBuilderFilterChangeHandler,
|
|
316
|
+
expBuilderSearchChangeHandler,
|
|
317
|
+
suggestionItemClickHandler,
|
|
318
|
+
resetExpression
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
//# sourceMappingURL=useMockExpression.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMockExpression.js","sourceRoot":"","sources":["../../../src/build/Expression/useMockExpression.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,OAAO,EACP,MAAM,EACN,SAAS,EACT,WAAW,EAEX,SAAS,EACV,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAa1E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AAC,SAAS,CAAC,CAAC;IAC3B,CAAC,CAAC;IAEF,MAAM,kBAAkB,GAAG,CAAC,KAAY,EAAE,EAAE;QAC1C,IACE,aAAa,CAAC,OAAO,EAAE,aAAa,EAAE;YACtC,KAAK,CAAC,MAAM,YAAY,IAAI;YAC5B,CAAC,aAAa,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,EAC9D,CAAC;YACD,kBAAkB,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC,CAAC;IAEF,QAAQ,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC;IAEtC,MAAM,eAAe,GAAG,GAAG,EAAE;QAC3B,aAAa,CAAC,EAAE,CAAC,CAAC;IACpB,CAAC,CAAC;IAEF,OAAO;QACL,mBAAmB,EAAE,SAAS;QAC9B,sBAAsB,EAAE,YAAY;QACpC,mBAAmB;QACnB,eAAe;QACf,cAAc;QACd,UAAU;QACV,oBAAoB;QACpB,eAAe;QACf,iBAAiB;QACjB,mBAAmB;QACnB,YAAY;QACZ,eAAe;QACf,WAAW;QACX,WAAW;QACX,cAAc;QACd,MAAM;QACN,MAAM;QACN,aAAa;QACb,OAAO;QACP,YAAY;QACZ,qBAAqB;QACrB,uBAAuB;QACvB,uBAAuB;QACvB,SAAS;QACT,YAAY;QACZ,cAAc;QACd,uBAAuB;QACvB,gBAAgB;QAChB,uBAAuB;QACvB,mBAAmB;QACnB,kBAAkB;QAClB,6BAA6B;QAC7B,6BAA6B;QAC7B,0BAA0B;QAC1B,eAAe;KAChB,CAAC;AACJ,CAAC","sourcesContent":["import {\n useState,\n useMemo,\n useRef,\n useEffect,\n useCallback,\n type ChangeEvent,\n Component\n} from 'react';\nimport { action } from '@storybook/addon-actions';\n\nimport { menuHelpers, useEvent, debounce } from '@pega/cosmos-react-core';\nimport type { InputProps, ForwardProps, MenuItemProps } from '@pega/cosmos-react-core';\nimport type {\n ExpressionBuilderWrapperProps,\n ExpressionRefInterface,\n ExpressionItemProps,\n ExpressionBuilderProps,\n HandleValue,\n InputParams,\n AutoCompleteTriggerChar,\n CursorPosition\n} from '@pega/cosmos-react-build';\n\nimport {\n items,\n getFilterRegex,\n suggestedRuleType,\n getSuggestedFunction,\n getScopeFromPosition,\n inLineErrorsMocks,\n suggestedFields\n} from '../ExpressionBuilder/ExpressionBuilder.mocks';\n\nimport { mockSuggestionList } from './Expression.mocks';\n\nconst inputParamChange = 'Input param change';\n\nexport default function useMockExpression({\n inLineError = 'single',\n showExpressionBuilderErrorBanner,\n expShowErrors\n}: {\n inLineError?: string;\n showExpressionBuilderErrorBanner?: boolean;\n expShowErrors?: boolean;\n}) {\n type SuggestionItemProps = MenuItemProps & { key?: string };\n const [showModal, setShowModal] = useState(false);\n const [selectedId, setSelectedId] = useState<MenuItemProps['id']>();\n const [showSuggestions, setShowSuggestions] = useState(false);\n const [suggestionList, setSuggestionList] = useState<SuggestionItemProps[]>([]);\n const [inputValue, setInputValue] = useState('');\n const [expBuilderInputValue, setExpBuilderInputValue] = useState('');\n const [expressionItems, setExpressionItems] = useState<typeof items>([]);\n const [expressionDetails, setExpressionDetails] = useState<\n ExpressionBuilderProps['list']['details']\n >({});\n const [isExpBuilderLoading, setIsExpBuilderLoading] = useState(false);\n const [searchFilter, setSearchFilter] = useState('');\n const [searchValue, setSearchValue] = useState('');\n const filterRegex = useMemo(() => getFilterRegex(searchValue), [searchValue]);\n const [errors, setErrors] = useState('');\n const handle = useRef<HandleValue>(null);\n const expressionRef = useRef<ExpressionRefInterface>(null);\n const [loading, setLoading] = useState(false);\n const [inLineErrors, setInLineErrors] = useState<ExpressionBuilderWrapperProps['inLineErrors']>();\n const [expBuilderErrorBanner, setExpBuilderErrorBanner] =\n useState<ExpressionBuilderWrapperProps['expBuilderErrorBanner']>();\n const [expressionDetailsValues, setExpressionDetailsValues] = useState<{\n [id: string]: {\n [field: string]: any;\n };\n }>({});\n\n const detailsFilter = (location: { field: string; value: string }[], filterValue: string) =>\n location.find(field => field.value.toLowerCase().includes(filterValue));\n\n const openExpBuilderModal = async () => {\n setShowModal(true);\n };\n\n async function mockApiCall() {\n return new Promise<void>(resolve => {\n setTimeout(() => {\n resolve();\n }, 1000);\n });\n }\n\n useEffect(() => {\n if (showModal) {\n setIsExpBuilderLoading(true);\n mockApiCall().then(() => {\n setExpressionItems(items);\n setIsExpBuilderLoading(false);\n });\n }\n }, [showModal, items]);\n\n useEffect(() => {\n if (inLineErrorsMocks?.length && inLineError && expShowErrors) {\n const inLineErrorList = inLineErrorsMocks.slice(\n 0,\n inLineError === 'single' ? 1 : inLineErrorsMocks.length\n );\n setInLineErrors(inLineErrorList);\n const messages: string[] = [];\n inLineErrorList.forEach(item => messages.push(...item.messages));\n setErrors(messages.join(', '));\n } else {\n setInLineErrors([]);\n setErrors('');\n }\n }, [inLineError, expShowErrors]);\n\n useEffect(() => {\n if (inLineErrorsMocks?.length && showExpressionBuilderErrorBanner) {\n const messages: string[] = [];\n inLineErrorsMocks.forEach(item => messages.push(...item.messages));\n setExpBuilderErrorBanner({\n variant: 'urgent',\n messages,\n onDismiss: () => {\n setExpBuilderErrorBanner(undefined);\n }\n });\n } else {\n setExpBuilderErrorBanner(undefined);\n }\n }, [showExpressionBuilderErrorBanner]);\n\n useEffect(() => {\n const lowerSearchFilter = searchFilter.toLowerCase();\n const lowerSearchValue = searchValue.toLowerCase();\n const filteredItems = items.filter(item => {\n return (\n item.type.toLowerCase().includes(lowerSearchFilter === 'all' ? '' : lowerSearchFilter) &&\n (item.primary.toLowerCase().includes(lowerSearchValue) ||\n detailsFilter(item.details.primary, lowerSearchValue) ||\n detailsFilter(item.details.output, lowerSearchValue))\n );\n });\n\n const matchedItems = filteredItems.map(item => {\n if (item.primary.toLowerCase().includes(lowerSearchValue)) {\n return item;\n }\n\n let matchedField;\n\n const primaryField = detailsFilter(item.details.primary, lowerSearchValue);\n if (primaryField) {\n matchedField = primaryField;\n }\n\n const outputField = detailsFilter(item.details.output, lowerSearchValue);\n if (outputField && !primaryField) {\n matchedField = outputField;\n }\n\n return {\n ...item,\n matchedField: { name: matchedField?.field, value: matchedField?.value }\n };\n });\n\n setExpressionItems(matchedItems);\n }, [searchValue, searchFilter]);\n\n useEffect(() => {\n if (showModal) {\n setExpBuilderInputValue(handle.current?.getExpression() ?? '');\n }\n }, [showModal]);\n\n const onInputParamChange = (id: string, field: string, value: any) => {\n action(inputParamChange)(id, field, value);\n };\n\n const expressionSubmitHandler = useCallback(\n ({ close }: { close: () => void }) => {\n if (!errors && !expBuilderErrorBanner) {\n setShowModal(false);\n setInputValue(expBuilderInputValue);\n close();\n }\n },\n [errors, expBuilderErrorBanner, expBuilderInputValue]\n );\n\n const expressionCancelHandler = ({ close }: { close?: () => void }) => {\n setShowModal(false);\n close?.();\n };\n\n const expBuilderFilterChangeHandler = (value: string) => {\n setSearchFilter(value);\n };\n\n const expBuilderSearchChangeHandler = (value: string) => {\n setSearchValue(value);\n };\n\n const onItemAdd = (\n id: ExpressionItemProps['id'],\n addExpression: (expression: string) => void\n ) => {\n const item = items.find(instance => instance.id === id);\n if (!item) {\n return;\n }\n if (item.type.toLowerCase() === 'field') {\n addExpression(item.expression);\n } else {\n addExpression(\n `${item.expression.slice(0, item.expression.length - 1)}${\n expressionDetailsValues[item.id]\n ? Object.keys(expressionDetailsValues[item.id])\n .map(field => `${expressionDetailsValues[item.id][field]}`)\n .join(', ')\n : ''\n })`\n );\n }\n };\n\n const onItemExpand = (id: string) => {\n action('onItemExpand')(id);\n const itemDetails = expressionItems.find(item => item.id === id)?.details;\n\n const fieldValueMapper = ({ field, value }: { field: string; value: string }) => {\n return {\n id: `${id}-${field}`,\n name: field,\n value\n };\n };\n\n if (itemDetails) {\n const primary = itemDetails.primary.map(fieldValueMapper);\n\n const outputParams = itemDetails.output?.map(fieldValueMapper);\n\n const inputParams = itemDetails.input?.map(({ id: fieldId, field, type }) => {\n const inputParam: InputParams<InputProps & ForwardProps> = {\n id: `${id}-${fieldId}`,\n renderer: Component,\n rendererProps: {\n label: field,\n onChange: (e: ChangeEvent<HTMLInputElement>) =>\n onInputParamChange(id, fieldId, e.target.value),\n type: type as InputProps['type']\n }\n };\n return inputParam;\n });\n\n setExpressionDetails((prev: ExpressionBuilderProps['list']['details']) => {\n return {\n ...prev,\n [id]: {\n primary,\n outputParams,\n inputParams\n }\n };\n });\n }\n };\n\n const onItemCollapse = (id: string) => {\n action('onItemCollapse')(id);\n setTimeout(() => {\n setExpressionDetails((prev: ExpressionBuilderProps['list']['details']) => {\n const newExpressionDetails = { ...prev };\n delete newExpressionDetails[id];\n return newExpressionDetails;\n });\n }, 500);\n\n setExpressionDetailsValues(prev => {\n const newValues = { ...prev };\n delete newValues[id];\n return newValues;\n });\n };\n\n const expressionChangeHandler = useRef(\n debounce(expression => {\n if (expression.includes('undefined')) {\n setErrors('Correct the invalid expression, expression cannot contain \"undefined\" ');\n } else {\n setExpBuilderInputValue(expression);\n setErrors('');\n }\n }, 600)\n ).current;\n\n const fetchSuggestions: ExpressionBuilderProps['fetchSuggestions'] = (\n autoCompleteTrigger: AutoCompleteTriggerChar,\n cursorPosition: CursorPosition\n ) => {\n action('cursorPosition')(cursorPosition);\n if (autoCompleteTrigger === '@') {\n setLoading(true);\n return new Promise(resolve => {\n setTimeout(() => {\n setLoading(false);\n resolve(suggestedRuleType);\n }, 1000);\n });\n }\n if (autoCompleteTrigger === ':') {\n const scope = getScopeFromPosition(\n cursorPosition,\n autoCompleteTrigger,\n handle.current?.getExpression() ?? ''\n ).split('@')[0];\n const suggestedFunctions = getSuggestedFunction(scope);\n\n setLoading(true);\n return new Promise(resolve => {\n setTimeout(() => {\n setLoading(false);\n resolve(suggestedFunctions);\n }, 1000);\n });\n }\n setLoading(true);\n return new Promise(resolve => {\n setTimeout(() => {\n setLoading(false);\n resolve(suggestedFields);\n }, 1000);\n });\n };\n\n const suggestionItemClickHandler = (id: MenuItemProps['id']) => {\n let valueSelected = suggestionList?.find(item => item.id === id)?.key || '';\n valueSelected = !inputValue.endsWith('.')\n ? `${inputValue}.${valueSelected}`\n : `${inputValue}${valueSelected}`;\n setSelectedId(id);\n setInputValue(valueSelected);\n setShowSuggestions(false);\n setSuggestionList([]);\n };\n\n const suggestionItemsToRender = useMemo(() => {\n let newItems = suggestionList;\n newItems = menuHelpers.mapTree(newItems, item => ({\n ...item,\n selected: selectedId ? selectedId === item.id : undefined\n })) as MenuItemProps[];\n return newItems;\n }, [suggestionList, selectedId]);\n\n const inputKeydownHandler = async (e: React.KeyboardEvent<HTMLInputElement>) => {\n if ((e.key === '.' || e.key === 'ArrowDown') && !showSuggestions) {\n setSuggestionList([]);\n await mockApiCall().then(() => {\n setSuggestionList(mockSuggestionList);\n setShowSuggestions(true);\n });\n } else if (showSuggestions && e.key === 'Escape') {\n setSelectedId(undefined);\n setShowSuggestions(false);\n }\n };\n\n const inputChangeHandler = (e: React.ChangeEvent<HTMLInputElement>) => {\n setInputValue(e.target.value);\n setSelectedId(undefined);\n };\n\n const handleClickOutside = (event: Event) => {\n if (\n expressionRef.current?.getPopOverRef() &&\n event.target instanceof Node &&\n !expressionRef.current.getPopOverRef()?.contains(event.target)\n ) {\n setShowSuggestions(false);\n }\n };\n\n useEvent('click', handleClickOutside);\n\n const resetExpression = () => {\n setInputValue('');\n };\n\n return {\n showExpBuilderModal: showModal,\n setShowExpBuilderModal: setShowModal,\n openExpBuilderModal,\n showSuggestions,\n suggestionList,\n inputValue,\n expBuilderInputValue,\n expressionItems,\n expressionDetails,\n isExpBuilderLoading,\n searchFilter,\n setSearchFilter,\n filterRegex,\n searchValue,\n setSearchValue,\n errors,\n handle,\n expressionRef,\n loading,\n inLineErrors,\n expBuilderErrorBanner,\n expressionSubmitHandler,\n expressionCancelHandler,\n onItemAdd,\n onItemExpand,\n onItemCollapse,\n expressionChangeHandler,\n fetchSuggestions,\n suggestionItemsToRender,\n inputKeydownHandler,\n inputChangeHandler,\n expBuilderFilterChangeHandler,\n expBuilderSearchChangeHandler,\n suggestionItemClickHandler,\n resetExpression\n };\n}\n"]}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { AutoCompleteTriggerChar, CursorPosition, ExpressionBuilderProps } from '@pega/cosmos-react-build';
|
|
2
|
+
export declare const getFilterRegex: (inputValue: string) => RegExp;
|
|
3
|
+
export declare const errors = "Error message 1. Some unrealistic error message. Server unreachable. Check your network connection and try again";
|
|
4
|
+
export declare const items: ({
|
|
5
|
+
id: string;
|
|
6
|
+
testId: string;
|
|
7
|
+
primary: string;
|
|
8
|
+
type: string;
|
|
9
|
+
expression: string;
|
|
10
|
+
details: {
|
|
11
|
+
primary: {
|
|
12
|
+
field: string;
|
|
13
|
+
value: string;
|
|
14
|
+
}[];
|
|
15
|
+
output: {
|
|
16
|
+
field: string;
|
|
17
|
+
value: string;
|
|
18
|
+
}[];
|
|
19
|
+
input: {
|
|
20
|
+
id: string;
|
|
21
|
+
field: string;
|
|
22
|
+
type: string;
|
|
23
|
+
}[];
|
|
24
|
+
};
|
|
25
|
+
} | {
|
|
26
|
+
id: string;
|
|
27
|
+
testId: string;
|
|
28
|
+
primary: string;
|
|
29
|
+
type: string;
|
|
30
|
+
expression: string;
|
|
31
|
+
details: {
|
|
32
|
+
primary: {
|
|
33
|
+
field: string;
|
|
34
|
+
value: string;
|
|
35
|
+
}[];
|
|
36
|
+
output: {
|
|
37
|
+
field: string;
|
|
38
|
+
value: string;
|
|
39
|
+
}[];
|
|
40
|
+
input?: undefined;
|
|
41
|
+
};
|
|
42
|
+
})[];
|
|
43
|
+
export declare const suggestedFields: {
|
|
44
|
+
primary: string;
|
|
45
|
+
id: string;
|
|
46
|
+
secondary: string[];
|
|
47
|
+
}[];
|
|
48
|
+
export declare const getScopeFromPosition: (cursorPosition: CursorPosition, autoCompleteTrigger: AutoCompleteTriggerChar, value: string) => string;
|
|
49
|
+
export declare const getSuggestedFunction: (scope: string) => {
|
|
50
|
+
primary: string;
|
|
51
|
+
id: string;
|
|
52
|
+
secondary: string[];
|
|
53
|
+
}[];
|
|
54
|
+
export declare const suggestedRuleType: {
|
|
55
|
+
primary: string;
|
|
56
|
+
id: string;
|
|
57
|
+
}[];
|
|
58
|
+
export declare const inLineErrorsMocks: ExpressionBuilderProps['inLineErrors'];
|
|
59
|
+
//# sourceMappingURL=ExpressionBuilder.mocks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpressionBuilder.mocks.d.ts","sourceRoot":"","sources":["../../../src/build/ExpressionBuilder/ExpressionBuilder.mocks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,uBAAuB,EACvB,cAAc,EACd,sBAAsB,EACvB,MAAM,0BAA0B,CAAC;AAElC,eAAO,MAAM,cAAc,eAAgB,MAAM,WAEhD,CAAC;AAEF,eAAO,MAAM,MAAM,qHACiG,CAAC;AAErH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA8ejB,CAAC;AAEF,eAAO,MAAM,eAAe;;;;GAMvB,CAAC;AAEN,eAAO,MAAM,oBAAoB,mBACf,cAAc,uBACT,uBAAuB,SACrC,MAAM,KACZ,MAuBF,CAAC;AAEF,eAAO,MAAM,oBAAoB,UAAW,MAAM;;;;GAyBjD,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;GAK7B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,sBAAsB,CAAC,cAAc,CAWpE,CAAC"}
|