@atlaskit/smart-card 26.69.1 → 26.70.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/CHANGELOG.md +8 -0
- package/dist/cjs/extractors/flexible/actions/extract-automation-action.js +1 -1
- package/dist/cjs/messages.js +2 -2
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/messages.js +64 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/mocks.js +78 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.js +127 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/types.js +18 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/api.js +183 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/index.js +55 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/stack-resolver.js +138 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/index.js +38 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/main.js +249 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/boolean-prompt/main.js +28 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/main.js +136 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/number-prompt/main.js +59 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/paragraph-prompt/main.js +49 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/select-prompt/main.js +52 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/text-prompt/main.js +38 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/services/index.js +95 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/index.js +14 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/main.js +74 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/menu-context/index.js +18 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/menu-context/main.js +70 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/body/index.js +12 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/body/main.js +39 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/empty-state/empty-icon/index.js +136 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/empty-state/index.js +12 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/empty-state/main.js +93 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/error-state/error-icon/index.js +66 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/error-state/index.js +12 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/error-state/main.js +50 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/footer/index.js +12 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/footer/main.js +121 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/index.js +12 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/main.js +60 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/manual-trigger-icon/index.js +29 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/rule/index.js +12 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/rule/main.js +69 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/rule-list/index.js +12 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/rule-list/main.js +32 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/index.js +12 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/main.js +86 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/index.js +54 -12
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/extractors/flexible/actions/extract-automation-action.js +1 -1
- package/dist/es2019/messages.js +2 -2
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/messages.js +58 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/mocks.js +71 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.js +74 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/types.js +12 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/api.js +103 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/index.js +2 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/stack-resolver.js +51 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/index.js +3 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/main.js +156 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/boolean-prompt/main.js +23 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/main.js +126 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/number-prompt/main.js +52 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/paragraph-prompt/main.js +44 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/select-prompt/main.js +45 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/text-prompt/main.js +31 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/services/index.js +53 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/index.js +3 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/main.js +62 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/menu-context/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/menu-context/main.js +61 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/body/index.js +2 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/body/main.js +32 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/empty-state/empty-icon/index.js +127 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/empty-state/index.js +2 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/empty-state/main.js +89 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/error-state/error-icon/index.js +57 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/error-state/index.js +2 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/error-state/main.js +44 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/footer/index.js +2 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/footer/main.js +117 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/index.js +2 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/main.js +57 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/manual-trigger-icon/index.js +20 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/rule/index.js +2 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/rule/main.js +65 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/rule-list/index.js +2 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/rule-list/main.js +25 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/main.js +79 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/index.js +49 -11
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/extractors/flexible/actions/extract-automation-action.js +1 -1
- package/dist/esm/messages.js +2 -2
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/messages.js +58 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/mocks.js +71 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.js +118 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/types.js +12 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/api.js +177 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/index.js +2 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/stack-resolver.js +131 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/index.js +3 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/main.js +240 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/boolean-prompt/main.js +21 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/main.js +126 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/number-prompt/main.js +52 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/paragraph-prompt/main.js +42 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/select-prompt/main.js +45 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/text-prompt/main.js +31 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/services/index.js +89 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/index.js +3 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/main.js +64 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/menu-context/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/menu-context/main.js +61 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/body/index.js +2 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/body/main.js +30 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/empty-state/empty-icon/index.js +129 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/empty-state/index.js +2 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/empty-state/main.js +86 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/error-state/error-icon/index.js +59 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/error-state/index.js +2 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/error-state/main.js +43 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/footer/index.js +2 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/footer/main.js +114 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/index.js +2 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/main.js +53 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/manual-trigger-icon/index.js +22 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/rule/index.js +2 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/rule/main.js +62 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/rule-list/index.js +2 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/rule-list/main.js +25 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/main.js +80 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/index.js +51 -11
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/messages.d.ts +58 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/mocks.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.d.ts +27 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/types.d.ts +94 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/api.d.ts +31 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/index.d.ts +2 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/stack-resolver.d.ts +3 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/index.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/main.d.ts +52 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/boolean-prompt/main.d.ts +7 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/main.d.ts +11 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/number-prompt/main.d.ts +12 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/paragraph-prompt/main.d.ts +7 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/select-prompt/main.d.ts +7 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/text-prompt/main.d.ts +7 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/services/index.d.ts +17 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/index.d.ts +3 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/main.d.ts +17 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/menu-context/index.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/menu-context/main.d.ts +28 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/body/index.d.ts +2 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/body/main.d.ts +8 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/empty-state/empty-icon/index.d.ts +3 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/empty-state/index.d.ts +2 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/empty-state/main.d.ts +2 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/error-state/error-icon/index.d.ts +3 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/error-state/index.d.ts +2 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/error-state/main.d.ts +2 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/footer/index.d.ts +2 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/footer/main.d.ts +8 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/index.d.ts +2 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/main.d.ts +7 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/manual-trigger-icon/index.d.ts +3 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/rule/index.d.ts +2 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/rule/main.d.ts +9 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/rule-list/index.d.ts +2 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/rule-list/main.d.ts +8 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/index.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/main.d.ts +7 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/messages.d.ts +58 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/mocks.d.ts +6 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/test-utils.d.ts +27 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/types.d.ts +94 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/api.d.ts +31 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/index.d.ts +2 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/stack-resolver.d.ts +3 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/index.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/main.d.ts +52 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/boolean-prompt/main.d.ts +7 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/main.d.ts +11 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/number-prompt/main.d.ts +12 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/paragraph-prompt/main.d.ts +7 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/select-prompt/main.d.ts +7 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/text-prompt/main.d.ts +7 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/services/index.d.ts +17 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/index.d.ts +3 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/main.d.ts +17 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/menu-context/index.d.ts +1 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/menu-context/main.d.ts +28 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/body/index.d.ts +2 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/body/main.d.ts +8 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/empty-state/empty-icon/index.d.ts +3 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/empty-state/index.d.ts +2 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/empty-state/main.d.ts +2 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/error-state/error-icon/index.d.ts +3 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/error-state/index.d.ts +2 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/error-state/main.d.ts +2 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/footer/index.d.ts +2 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/footer/main.d.ts +8 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/index.d.ts +2 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/main.d.ts +7 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/manual-trigger-icon/index.d.ts +3 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/rule/index.d.ts +2 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/rule/main.d.ts +9 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/rule-list/index.d.ts +2 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/rule-list/main.d.ts +8 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/index.d.ts +1 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/main.d.ts +7 -0
- package/package.json +9 -2
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
3
|
+
import { ButtonItem } from '@atlaskit/menu';
|
|
4
|
+
import { Box, Stack, xcss } from '@atlaskit/primitives';
|
|
5
|
+
import Spinner from '@atlaskit/spinner';
|
|
6
|
+
import { useAutomationMenu } from '../../menu-context';
|
|
7
|
+
const ruleButtonStyle = xcss({
|
|
8
|
+
borderColor: 'color.border',
|
|
9
|
+
borderStyle: 'solid',
|
|
10
|
+
borderWidth: 'border.width',
|
|
11
|
+
borderRadius: 'border.radius'
|
|
12
|
+
});
|
|
13
|
+
const selectedRuleButtonStyle = xcss({
|
|
14
|
+
backgroundColor: 'color.background.accent.blue.subtlest',
|
|
15
|
+
borderColor: 'color.border.accent.blue',
|
|
16
|
+
borderStyle: 'solid',
|
|
17
|
+
borderWidth: 'border.width.outline',
|
|
18
|
+
borderRadius: 'border.radius'
|
|
19
|
+
});
|
|
20
|
+
const ruleNameStyle = xcss({
|
|
21
|
+
// Using this to increase the height of the button itself.
|
|
22
|
+
height: '28px'
|
|
23
|
+
});
|
|
24
|
+
export const AutomationModalRule = ({
|
|
25
|
+
rule,
|
|
26
|
+
selectedRule,
|
|
27
|
+
setSelectedRule
|
|
28
|
+
}) => {
|
|
29
|
+
const {
|
|
30
|
+
createAnalyticsEvent
|
|
31
|
+
} = useAnalyticsEvents();
|
|
32
|
+
const {
|
|
33
|
+
analyticsSource,
|
|
34
|
+
invokingRuleId
|
|
35
|
+
} = useAutomationMenu();
|
|
36
|
+
const isSelectedRule = (selectedRule === null || selectedRule === void 0 ? void 0 : selectedRule.id) === rule.id;
|
|
37
|
+
const isExecuting = rule.id === invokingRuleId;
|
|
38
|
+
const ruleOnClick = () => {
|
|
39
|
+
createAnalyticsEvent({
|
|
40
|
+
type: 'sendUIEvent',
|
|
41
|
+
data: {
|
|
42
|
+
action: 'clicked',
|
|
43
|
+
actionSubject: 'button',
|
|
44
|
+
actionSubjectId: 'selectManualTriggerAutomation',
|
|
45
|
+
source: analyticsSource,
|
|
46
|
+
attributes: {
|
|
47
|
+
ruleId: rule.id.toString()
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}).fire();
|
|
51
|
+
setSelectedRule(rule);
|
|
52
|
+
};
|
|
53
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
54
|
+
xcss: isSelectedRule ? selectedRuleButtonStyle : ruleButtonStyle
|
|
55
|
+
}, /*#__PURE__*/React.createElement(ButtonItem, {
|
|
56
|
+
isDisabled: !!invokingRuleId,
|
|
57
|
+
iconBefore: isExecuting ? /*#__PURE__*/React.createElement(Spinner, {
|
|
58
|
+
size: "small"
|
|
59
|
+
}) : null,
|
|
60
|
+
onClick: ruleOnClick
|
|
61
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
62
|
+
xcss: ruleNameStyle,
|
|
63
|
+
alignBlock: "center"
|
|
64
|
+
}, rule.name)));
|
|
65
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MenuGroup } from '@atlaskit/menu';
|
|
3
|
+
import { Stack } from '@atlaskit/primitives';
|
|
4
|
+
import { useAutomationMenu } from '../../menu-context';
|
|
5
|
+
import { AutomationModalEmptyState } from '../empty-state';
|
|
6
|
+
import { AutomationModalRule } from '../rule';
|
|
7
|
+
export const AutomationModalRuleList = ({
|
|
8
|
+
selectedRule,
|
|
9
|
+
setSelectedRule
|
|
10
|
+
}) => {
|
|
11
|
+
const {
|
|
12
|
+
rules
|
|
13
|
+
} = useAutomationMenu();
|
|
14
|
+
if (rules.length === 0) {
|
|
15
|
+
return /*#__PURE__*/React.createElement(AutomationModalEmptyState, null);
|
|
16
|
+
}
|
|
17
|
+
return /*#__PURE__*/React.createElement(MenuGroup, null, /*#__PURE__*/React.createElement(Stack, {
|
|
18
|
+
space: "space.050"
|
|
19
|
+
}, rules.map(rule => /*#__PURE__*/React.createElement(AutomationModalRule, {
|
|
20
|
+
key: `manual-rule-${rule.id}`,
|
|
21
|
+
rule: rule,
|
|
22
|
+
selectedRule: selectedRule,
|
|
23
|
+
setSelectedRule: setSelectedRule
|
|
24
|
+
}))));
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Skeleton } from './main';
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { keyframes, css } from '@emotion/react';
|
|
4
|
+
import { N20, N30 } from '@atlaskit/theme/colors';
|
|
5
|
+
const AutomationSkeletonContainer = css({
|
|
6
|
+
paddingBlock: "var(--ds-space-025, 2px)"
|
|
7
|
+
});
|
|
8
|
+
const SkeletonContainer = css({
|
|
9
|
+
marginBlock: "var(--ds-space-100, 8px)",
|
|
10
|
+
marginInline: "var(--ds-space-250, 20px)",
|
|
11
|
+
display: 'flex'
|
|
12
|
+
});
|
|
13
|
+
const SkeletonIcon = css({
|
|
14
|
+
width: "var(--ds-space-200, 16px)",
|
|
15
|
+
height: "var(--ds-space-200, 16px)",
|
|
16
|
+
display: 'inline-block',
|
|
17
|
+
borderRadius: "var(--ds-space-025, 2px)",
|
|
18
|
+
backgroundColor: 'currentColor',
|
|
19
|
+
border: `${"var(--ds-space-025, 2px)"} solid transparent`,
|
|
20
|
+
opacity: 0.15
|
|
21
|
+
});
|
|
22
|
+
const MenuIcon = css({
|
|
23
|
+
width: '24px',
|
|
24
|
+
height: '24px',
|
|
25
|
+
display: 'flex',
|
|
26
|
+
justifyContent: 'center',
|
|
27
|
+
alignItems: 'center'
|
|
28
|
+
});
|
|
29
|
+
const shimmer = keyframes({
|
|
30
|
+
'0%': {
|
|
31
|
+
backgroundPosition: '-300px 0'
|
|
32
|
+
},
|
|
33
|
+
'100%': {
|
|
34
|
+
backgroundPosition: '2000px 0'
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
const SkeletonText = css({
|
|
38
|
+
width: '85%',
|
|
39
|
+
height: "var(--ds-space-200, 16px)",
|
|
40
|
+
marginTop: "var(--ds-space-050, 4px)",
|
|
41
|
+
marginLeft: "var(--ds-space-150, 12px)",
|
|
42
|
+
animationDuration: '1s',
|
|
43
|
+
animationFillMode: 'forwards',
|
|
44
|
+
animationIterationCount: 'infinite',
|
|
45
|
+
animationName: shimmer,
|
|
46
|
+
animationTimingFunction: 'linear',
|
|
47
|
+
backgroundColor: `var(--ds-skeleton, ${N30})`,
|
|
48
|
+
backgroundImage: `linear-gradient(to right, ${`var(--ds-skeleton, ${N30})`} 10%, ${`var(--ds-skeleton-subtle, ${N20})`} 30%, ${`var(--ds-skeleton, ${N30})`} 50%)`,
|
|
49
|
+
backgroundRepeat: 'no-repeat'
|
|
50
|
+
});
|
|
51
|
+
const SkeletonLine = () => jsx("div", {
|
|
52
|
+
css: SkeletonContainer
|
|
53
|
+
}, jsx("div", {
|
|
54
|
+
css: MenuIcon
|
|
55
|
+
}, jsx("div", {
|
|
56
|
+
css: SkeletonIcon
|
|
57
|
+
})), jsx("div", {
|
|
58
|
+
css: SkeletonText
|
|
59
|
+
}));
|
|
60
|
+
const getSkeletonLines = lineCount => {
|
|
61
|
+
const skeletonLines = [];
|
|
62
|
+
for (let i = 0; i < lineCount; i++) {
|
|
63
|
+
skeletonLines.push(jsx(SkeletonLine, {
|
|
64
|
+
key: `skeleton-line-${i}`
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
return skeletonLines;
|
|
68
|
+
};
|
|
69
|
+
export const Skeleton = props => {
|
|
70
|
+
const {
|
|
71
|
+
lineCount = 5
|
|
72
|
+
} = props;
|
|
73
|
+
return (
|
|
74
|
+
// eslint-disable-next-line @atlaskit/design-system/use-primitives
|
|
75
|
+
jsx("div", {
|
|
76
|
+
css: AutomationSkeletonContainer
|
|
77
|
+
}, getSkeletonLines(lineCount))
|
|
78
|
+
);
|
|
79
|
+
};
|
|
@@ -1,33 +1,56 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React, { useState } from 'react';
|
|
2
|
+
import React, { useState, lazy, Suspense } from 'react';
|
|
3
3
|
import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
4
4
|
import AutomationManualTriggersGlyph from './manaul-triggers-icon';
|
|
5
5
|
import Action from '../action';
|
|
6
6
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
7
7
|
import { ActionName } from '../../../../../constants';
|
|
8
8
|
import { messages } from '../../../../../messages';
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
import { useSmartLinkContext } from '@atlaskit/link-provider';
|
|
10
|
+
const AutomationModal = /*#__PURE__*/lazy(() => import( /* webpackChunkName: "@atlaskit-internal_smart-card-automation-modal" */'./automation-manual-triggers/manual-triggers-modal'));
|
|
11
11
|
const handleAutomateActionClick = setIsModalOpen => {
|
|
12
12
|
setIsModalOpen(true);
|
|
13
13
|
};
|
|
14
|
+
const handleAutomationActionClose = setIsModalOpen => {
|
|
15
|
+
setIsModalOpen(false);
|
|
16
|
+
};
|
|
14
17
|
const AutomationAction = props => {
|
|
15
|
-
var _context$actions;
|
|
16
|
-
const [
|
|
18
|
+
var _ref, _context$actions;
|
|
19
|
+
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
17
20
|
const {
|
|
18
21
|
formatMessage
|
|
19
22
|
} = useIntl();
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
const smartLinkContext = useSmartLinkContext();
|
|
24
|
+
const {
|
|
25
|
+
connections
|
|
26
|
+
} = smartLinkContext;
|
|
27
|
+
const environment = (_ref = connections.client.envKey) !== null && _ref !== void 0 ? _ref : 'prod';
|
|
23
28
|
const context = useFlexibleUiContext();
|
|
24
|
-
const
|
|
25
|
-
if (!
|
|
29
|
+
const automationActionData = context === null || context === void 0 ? void 0 : (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.AutomationAction];
|
|
30
|
+
if (!automationActionData) {
|
|
26
31
|
return null;
|
|
27
32
|
}
|
|
33
|
+
const {
|
|
34
|
+
baseAutomationUrl,
|
|
35
|
+
objectName,
|
|
36
|
+
objectAri,
|
|
37
|
+
siteAri,
|
|
38
|
+
canManageAutomation,
|
|
39
|
+
analyticsSource,
|
|
40
|
+
modalTitle,
|
|
41
|
+
modalDescription
|
|
42
|
+
} = automationActionData;
|
|
28
43
|
const automationActionTitle = /*#__PURE__*/React.createElement(FormattedMessage, messages.automation_action_title);
|
|
29
44
|
const automationActionTooltip = /*#__PURE__*/React.createElement(FormattedMessage, messages.automation_action_tooltip);
|
|
30
45
|
const automationActionIconLabel = formatMessage(messages.automation_action_icon_label);
|
|
46
|
+
const automationModalTitle = /*#__PURE__*/React.createElement(FormattedMessage, modalTitle);
|
|
47
|
+
const automationModalDescription = /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, modalDescription, {
|
|
48
|
+
values: {
|
|
49
|
+
name: objectName,
|
|
50
|
+
b: chunks => /*#__PURE__*/React.createElement("strong", null, chunks),
|
|
51
|
+
br: /*#__PURE__*/React.createElement("br", null)
|
|
52
|
+
}
|
|
53
|
+
}));
|
|
31
54
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Action, _extends({
|
|
32
55
|
content: automationActionTitle,
|
|
33
56
|
icon: /*#__PURE__*/React.createElement(AutomationManualTriggersGlyph, {
|
|
@@ -35,8 +58,23 @@ const AutomationAction = props => {
|
|
|
35
58
|
}),
|
|
36
59
|
testId: "smart-action-automation-action",
|
|
37
60
|
tooltipMessage: automationActionTooltip
|
|
38
|
-
},
|
|
61
|
+
}, automationActionData, props, {
|
|
39
62
|
onClick: () => handleAutomateActionClick(setIsModalOpen)
|
|
63
|
+
})), isModalOpen &&
|
|
64
|
+
/*#__PURE__*/
|
|
65
|
+
// TODO skeleton modal fallback
|
|
66
|
+
React.createElement(Suspense, {
|
|
67
|
+
fallback: false
|
|
68
|
+
}, /*#__PURE__*/React.createElement(AutomationModal, {
|
|
69
|
+
environment: environment,
|
|
70
|
+
baseAutomationUrl: baseAutomationUrl,
|
|
71
|
+
objectAri: objectAri,
|
|
72
|
+
siteAri: siteAri,
|
|
73
|
+
canManageAutomation: canManageAutomation,
|
|
74
|
+
analyticsSource: analyticsSource,
|
|
75
|
+
modalTitle: automationModalTitle,
|
|
76
|
+
modalDescription: automationModalDescription,
|
|
77
|
+
onClose: () => handleAutomationActionClose(setIsModalOpen)
|
|
40
78
|
})));
|
|
41
79
|
};
|
|
42
80
|
export default AutomationAction;
|
|
@@ -7,7 +7,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
|
|
|
7
7
|
import LinkWarningModal from './LinkWarningModal';
|
|
8
8
|
const PACKAGE_DATA = {
|
|
9
9
|
packageName: "@atlaskit/smart-card",
|
|
10
|
-
packageVersion: "26.
|
|
10
|
+
packageVersion: "26.70.0",
|
|
11
11
|
componentName: 'linkUrl'
|
|
12
12
|
};
|
|
13
13
|
const Link = withLinkClickedEvent('a');
|
|
@@ -24,7 +24,7 @@ var getProductData = function getProductData(meta) {
|
|
|
24
24
|
return ProductData === null || ProductData === void 0 || (_ProductData$product = ProductData[product]) === null || _ProductData$product === void 0 ? void 0 : _ProductData$product[resourceType];
|
|
25
25
|
};
|
|
26
26
|
export var extractAutomationAction = function extractAutomationAction(response) {
|
|
27
|
-
if (!getBooleanFF('platform.linking-platfom.smart-card.confluence.page.automation-
|
|
27
|
+
if (!getBooleanFF('platform.linking-platfom.smart-card.confluence.page.automation-action_xcdoi') || !response.data) {
|
|
28
28
|
return undefined;
|
|
29
29
|
}
|
|
30
30
|
var data = response.data;
|
package/dist/esm/messages.js
CHANGED
|
@@ -67,7 +67,7 @@ export var messages = defineMessages({
|
|
|
67
67
|
},
|
|
68
68
|
automation_action_title: {
|
|
69
69
|
id: 'fabric.linking.automation-action.title',
|
|
70
|
-
defaultMessage: '
|
|
70
|
+
defaultMessage: 'View automation rules...',
|
|
71
71
|
description: 'The title of the button in a hover card to open an automation menu for a given SmartLink.'
|
|
72
72
|
},
|
|
73
73
|
automation_action_icon_label: {
|
|
@@ -77,7 +77,7 @@ export var messages = defineMessages({
|
|
|
77
77
|
},
|
|
78
78
|
automation_action_tooltip: {
|
|
79
79
|
id: 'fabric.linking.automation-action.tooltip',
|
|
80
|
-
defaultMessage: '
|
|
80
|
+
defaultMessage: 'Select an automation rule to run',
|
|
81
81
|
description: 'The tooltip for the automation action indicating that a button will open an automation modal.'
|
|
82
82
|
},
|
|
83
83
|
automation_action_confluence_page_modal_title: {
|
|
@@ -15,7 +15,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
15
15
|
export var context = {
|
|
16
16
|
componentName: 'smart-cards',
|
|
17
17
|
packageName: "@atlaskit/smart-card",
|
|
18
|
-
packageVersion: "26.
|
|
18
|
+
packageVersion: "26.70.0"
|
|
19
19
|
};
|
|
20
20
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
21
21
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
var messages = {
|
|
2
|
+
successFlag: {
|
|
3
|
+
id: 'automation-platform.common.success-flag',
|
|
4
|
+
defaultMessage: 'Your automation is in progress',
|
|
5
|
+
description: 'Text for a success flag when an automation rule has been triggered'
|
|
6
|
+
},
|
|
7
|
+
failureFlagTitle: {
|
|
8
|
+
id: 'automation-platform.common.failure-flag-title',
|
|
9
|
+
defaultMessage: 'Oops we ran into a problem',
|
|
10
|
+
description: 'Title for an error flag when an automation rule failed to be triggered'
|
|
11
|
+
},
|
|
12
|
+
failureFlagDescription: {
|
|
13
|
+
id: 'automation-platform.common.failure-flag-description',
|
|
14
|
+
defaultMessage: "There was a problem and we couldn't run the automation '{0}'",
|
|
15
|
+
description: 'Description for an error flag when an automation rule failed to be triggered'
|
|
16
|
+
},
|
|
17
|
+
partialFailureFlagDescription: {
|
|
18
|
+
id: 'automation-platform.common.partial-failure-flag-description',
|
|
19
|
+
defaultMessage: "Couldn't run the automation against issues {0}, please ensure you have permission to view these issues",
|
|
20
|
+
description: 'Description for an error flag when some issues failed to invoke because user does not have view permission'
|
|
21
|
+
},
|
|
22
|
+
errorInputMustNotBeEmpty: {
|
|
23
|
+
id: 'automation-platform.common.error-input-must-not-be-empty',
|
|
24
|
+
defaultMessage: 'Input must not be empty',
|
|
25
|
+
description: 'The error message to show the value of a required field is empty'
|
|
26
|
+
},
|
|
27
|
+
errorInputCharacterLimitReached: {
|
|
28
|
+
id: 'automation-platform.common.error-input-character-limit-reached',
|
|
29
|
+
defaultMessage: 'Provided value exceeds the character limit for the field.',
|
|
30
|
+
description: 'The error message to show that the character limit has been reached for the field'
|
|
31
|
+
},
|
|
32
|
+
inputRequiredForAction: {
|
|
33
|
+
id: 'automation-platform.common.input-required-for-action',
|
|
34
|
+
defaultMessage: 'Your input is required to complete this action',
|
|
35
|
+
description: 'The title of the modal for user inputs'
|
|
36
|
+
},
|
|
37
|
+
errorInputTypeIsNotSupported: {
|
|
38
|
+
id: 'automation-platform.common.error-input-type-is-not-supported',
|
|
39
|
+
defaultMessage: 'Input type not supported yet',
|
|
40
|
+
description: 'The error message to show when the type of user input is not recognised'
|
|
41
|
+
},
|
|
42
|
+
errorValueIsNotValidNumber: {
|
|
43
|
+
id: 'automation-platform.common.error-value-is-not-valid-number',
|
|
44
|
+
defaultMessage: 'The value is not a valid number',
|
|
45
|
+
description: 'The error message for when the type of user input is number but the value is not a valid number'
|
|
46
|
+
},
|
|
47
|
+
cancelButtonTitle: {
|
|
48
|
+
id: 'automation-platform.common.cancel-button-title',
|
|
49
|
+
defaultMessage: 'Cancel',
|
|
50
|
+
description: 'The cancel button title'
|
|
51
|
+
},
|
|
52
|
+
continueButtonTitle: {
|
|
53
|
+
id: 'automation-platform.common.continue-button-title',
|
|
54
|
+
defaultMessage: 'Continue',
|
|
55
|
+
description: 'The continue button title'
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
export default messages;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
import { UserInputType } from './types';
|
|
5
|
+
var mockScope = {
|
|
6
|
+
resources: []
|
|
7
|
+
};
|
|
8
|
+
export var mockRules = [{
|
|
9
|
+
id: 0,
|
|
10
|
+
name: 'Test rule 0 (no inputs)',
|
|
11
|
+
ruleScope: mockScope,
|
|
12
|
+
userInputs: []
|
|
13
|
+
}, {
|
|
14
|
+
id: 1,
|
|
15
|
+
name: 'Test rule 1 (has inputs)',
|
|
16
|
+
ruleScope: mockScope,
|
|
17
|
+
userInputs: [{
|
|
18
|
+
defaultValue: '',
|
|
19
|
+
displayName: 'Test user input',
|
|
20
|
+
inputType: UserInputType.TEXT,
|
|
21
|
+
required: false,
|
|
22
|
+
variableName: 'testUserInput'
|
|
23
|
+
}]
|
|
24
|
+
}, {
|
|
25
|
+
id: 2,
|
|
26
|
+
name: 'Test rule 2 (has multiple inputs)',
|
|
27
|
+
ruleScope: mockScope,
|
|
28
|
+
userInputs: [{
|
|
29
|
+
defaultValue: '',
|
|
30
|
+
displayName: 'Text user input',
|
|
31
|
+
inputType: UserInputType.TEXT,
|
|
32
|
+
required: false,
|
|
33
|
+
variableName: 'textUserInput'
|
|
34
|
+
}, {
|
|
35
|
+
defaultValue: '',
|
|
36
|
+
displayName: 'Number user input',
|
|
37
|
+
inputType: UserInputType.NUMBER,
|
|
38
|
+
required: false,
|
|
39
|
+
variableName: 'numberUserInput'
|
|
40
|
+
}, {
|
|
41
|
+
defaultValue: true,
|
|
42
|
+
displayName: 'Boolean user input',
|
|
43
|
+
inputType: UserInputType.BOOLEAN,
|
|
44
|
+
required: false,
|
|
45
|
+
variableName: 'booleanUserInput'
|
|
46
|
+
}, {
|
|
47
|
+
defaultValue: [''],
|
|
48
|
+
displayName: 'Dropdown user input',
|
|
49
|
+
inputType: UserInputType.DROPDOWN,
|
|
50
|
+
required: false,
|
|
51
|
+
variableName: 'dropdownUserInput'
|
|
52
|
+
}, {
|
|
53
|
+
defaultValue: '',
|
|
54
|
+
displayName: 'Paragraph user input',
|
|
55
|
+
inputType: UserInputType.PARAGRAPH,
|
|
56
|
+
required: false,
|
|
57
|
+
variableName: 'paragraphUserInput'
|
|
58
|
+
}]
|
|
59
|
+
}];
|
|
60
|
+
export var mockTransformedRules = [_objectSpread(_objectSpread({}, mockRules[0]), {}, {
|
|
61
|
+
userInputPrompts: mockRules[0].userInputs
|
|
62
|
+
}), _objectSpread(_objectSpread({}, mockRules[1]), {}, {
|
|
63
|
+
userInputPrompts: mockRules[1].userInputs
|
|
64
|
+
}), _objectSpread(_objectSpread({}, mockRules[2]), {}, {
|
|
65
|
+
userInputPrompts: mockRules[2].userInputs
|
|
66
|
+
})];
|
|
67
|
+
export var mockInvocationResponse = {
|
|
68
|
+
'TEST-1': 'SUCCESS'
|
|
69
|
+
};
|
|
70
|
+
export var mockGetUrl = 'https://test-api/get/rules';
|
|
71
|
+
export var mockInvokeUrl = 'https://test-api/invoke';
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
|
+
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
7
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
9
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
12
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
|
+
import React, { Component, Fragment } from 'react';
|
|
15
|
+
import { render } from '@testing-library/react';
|
|
16
|
+
import { DiProvider } from 'react-magnetic-di';
|
|
17
|
+
import { IntlProvider } from 'react-intl-next';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Creates a stubbed invocation API call for triggering rules. Will return
|
|
21
|
+
* the supplied invocation result for all objects the rule was called
|
|
22
|
+
* for.
|
|
23
|
+
*/
|
|
24
|
+
export var createStubInvokeManuallyTriggeredRule = function createStubInvokeManuallyTriggeredRule(stubbedInvocationResultForAllObjects, responseDelay) {
|
|
25
|
+
return /*#__PURE__*/function () {
|
|
26
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_env, _site, _ruleId, objects, _inputs) {
|
|
27
|
+
var response;
|
|
28
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
29
|
+
while (1) switch (_context.prev = _context.next) {
|
|
30
|
+
case 0:
|
|
31
|
+
response = objects.reduce(function (acc, current) {
|
|
32
|
+
return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, current, stubbedInvocationResultForAllObjects));
|
|
33
|
+
}, {});
|
|
34
|
+
return _context.abrupt("return", responseDelay ? new Promise(function (resolve) {
|
|
35
|
+
return setTimeout(resolve, responseDelay);
|
|
36
|
+
}) : Promise.resolve(response));
|
|
37
|
+
case 2:
|
|
38
|
+
case "end":
|
|
39
|
+
return _context.stop();
|
|
40
|
+
}
|
|
41
|
+
}, _callee);
|
|
42
|
+
}));
|
|
43
|
+
return function (_x, _x2, _x3, _x4, _x5) {
|
|
44
|
+
return _ref.apply(this, arguments);
|
|
45
|
+
};
|
|
46
|
+
}();
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Default stubbed invokeManuallyTriggeredRule call. Returns 'SUCCESS' for
|
|
51
|
+
* all objects the rule was called for.
|
|
52
|
+
*/
|
|
53
|
+
export var successStubInvokeManuallyTriggeredRule = createStubInvokeManuallyTriggeredRule('SUCCESS', 2000);
|
|
54
|
+
var Provider = function Provider(_ref2) {
|
|
55
|
+
var children = _ref2.children,
|
|
56
|
+
use = _ref2.use,
|
|
57
|
+
target = _ref2.target;
|
|
58
|
+
return /*#__PURE__*/React.createElement(IntlProvider, {
|
|
59
|
+
locale: "en"
|
|
60
|
+
}, /*#__PURE__*/React.createElement(DiProvider, {
|
|
61
|
+
use: use,
|
|
62
|
+
target: target
|
|
63
|
+
}, children));
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Render into a container which is appended to `document.body`.
|
|
68
|
+
*
|
|
69
|
+
* Includes `IntlProvider` wrapper
|
|
70
|
+
*
|
|
71
|
+
* @param node The React element to render
|
|
72
|
+
* @param dependencies List of React Magnetic DI dependencies to inject
|
|
73
|
+
* @param options React Testing Library options
|
|
74
|
+
*/
|
|
75
|
+
export var renderWithDi = function renderWithDi(node) {
|
|
76
|
+
var dependencies = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
77
|
+
var options = arguments.length > 2 ? arguments[2] : undefined;
|
|
78
|
+
return render(node, _objectSpread(_objectSpread({}, options), {}, {
|
|
79
|
+
wrapper: function wrapper(_ref3) {
|
|
80
|
+
var _options$wrapper;
|
|
81
|
+
var children = _ref3.children;
|
|
82
|
+
var CustomWrapper = (_options$wrapper = options === null || options === void 0 ? void 0 : options.wrapper) !== null && _options$wrapper !== void 0 ? _options$wrapper : Fragment;
|
|
83
|
+
return /*#__PURE__*/React.createElement(Provider, {
|
|
84
|
+
use: _toConsumableArray(dependencies),
|
|
85
|
+
target: options === null || options === void 0 ? void 0 : options.target
|
|
86
|
+
}, /*#__PURE__*/React.createElement(CustomWrapper, null, children));
|
|
87
|
+
}
|
|
88
|
+
}));
|
|
89
|
+
};
|
|
90
|
+
export var createGenericComponent = function createGenericComponent(displayName) {
|
|
91
|
+
var _class;
|
|
92
|
+
var renderChildren = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
93
|
+
var childrenParams = arguments.length > 2 ? arguments[2] : undefined;
|
|
94
|
+
return _class = /*#__PURE__*/function (_Component) {
|
|
95
|
+
_inherits(_class, _Component);
|
|
96
|
+
var _super = _createSuper(_class);
|
|
97
|
+
function _class() {
|
|
98
|
+
_classCallCheck(this, _class);
|
|
99
|
+
return _super.apply(this, arguments);
|
|
100
|
+
}
|
|
101
|
+
_createClass(_class, [{
|
|
102
|
+
key: "render",
|
|
103
|
+
value: function render() {
|
|
104
|
+
if (renderChildren && typeof this.props.children === 'function') {
|
|
105
|
+
if (childrenParams) {
|
|
106
|
+
return this.props.children(childrenParams);
|
|
107
|
+
}
|
|
108
|
+
return this.props.children();
|
|
109
|
+
}
|
|
110
|
+
if (renderChildren && this.props.children) {
|
|
111
|
+
return this.props.children;
|
|
112
|
+
}
|
|
113
|
+
return null;
|
|
114
|
+
}
|
|
115
|
+
}]);
|
|
116
|
+
return _class;
|
|
117
|
+
}(Component), _defineProperty(_class, "displayName", displayName), _class;
|
|
118
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export var UserInputType = /*#__PURE__*/function (UserInputType) {
|
|
2
|
+
UserInputType["NUMBER"] = "NUMBER";
|
|
3
|
+
UserInputType["TEXT"] = "TEXT";
|
|
4
|
+
UserInputType["BOOLEAN"] = "BOOLEAN";
|
|
5
|
+
UserInputType["DROPDOWN"] = "DROPDOWN";
|
|
6
|
+
UserInputType["PARAGRAPH"] = "PARAGRAPH";
|
|
7
|
+
return UserInputType;
|
|
8
|
+
}({});
|
|
9
|
+
export var CORE_PROJECT = 'business';
|
|
10
|
+
export var SOFTWARE_PROJECT = 'software';
|
|
11
|
+
export var SERVICE_DESK_PROJECT = 'service_desk';
|
|
12
|
+
export var PRODUCT_DISCOVERY_PROJECT = 'product_discovery';
|