@atlaskit/smart-card 27.0.0 → 27.2.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 +23 -0
- package/dist/cjs/extractors/flexible/extract-state.js +1 -2
- package/dist/cjs/messages.js +17 -2
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/components/ActionIcon.js +22 -14
- package/dist/cjs/view/BlockCard/components/Content.js +3 -1
- package/dist/cjs/view/BlockCard/components/ContentFooter.js +3 -1
- package/dist/cjs/view/BlockCard/components/ContentHeader.js +3 -1
- package/dist/cjs/view/BlockCard/components/Frame.js +6 -2
- package/dist/cjs/view/BlockCard/components/Link.js +3 -1
- package/dist/cjs/view/BlockCard/components/Name.js +3 -1
- package/dist/cjs/view/BlockCard/components/Provider.js +1 -0
- package/dist/cjs/view/BlockCard/views/ErroredView.js +3 -1
- package/dist/cjs/view/BlockCard/views/ForbiddenView.js +6 -2
- package/dist/cjs/view/BlockCard/views/NotFoundView.js +3 -1
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +6 -2
- package/dist/cjs/view/BlockCard/views/ResolvingView.js +3 -1
- package/dist/cjs/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +2 -0
- package/dist/cjs/view/CardWithUrl/component-lazy/LazyLazilyRenderCard.js +3 -1
- package/dist/cjs/view/CardWithUrl/component-lazy/LoadingCardLink.js +3 -1
- package/dist/cjs/view/EmbedCard/components/ExpandedFrame.js +41 -29
- package/dist/cjs/view/EmbedCard/components/ImageIcon.js +3 -1
- package/dist/cjs/view/EmbedModal/components/link-info/index.js +11 -8
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/mocks.js +57 -55
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/api.js +25 -57
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/index.js +1 -20
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/index.js +0 -7
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/main.js +6 -8
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/services/index.js +9 -10
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/main.js +1 -3
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/menu-context/main.js +1 -3
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/index.js +1 -6
- package/dist/cjs/view/FlexibleCard/components/actions/follow-action/unfollow-icon/index.js +3 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +3 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/common/motion-wrapper/index.js +3 -0
- package/dist/cjs/view/FlexibleCard/components/container/layered-link/index.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/index.js +3 -1
- package/dist/cjs/view/HoverCard/components/ContentContainer.js +2 -0
- package/dist/cjs/view/InlineCard/Frame/index.js +3 -1
- package/dist/cjs/view/InlineCard/Icon.js +3 -1
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.js +23 -13
- package/dist/cjs/view/InlineCard/ResolvedView/index.js +3 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/RelatedLinksModal/components/RelatedLinksBaseModal.js +10 -7
- package/dist/cjs/view/RelatedLinksModal/components/related-link-item/index.js +56 -0
- package/dist/cjs/view/RelatedLinksModal/components/related-links-list/index.js +41 -0
- package/dist/cjs/view/RelatedLinksModal/views/resolved/index.js +31 -0
- package/dist/cjs/view/RelatedLinksModal/views/resolved/types.js +1 -0
- package/dist/cjs/view/common/Byline.js +3 -1
- package/dist/cjs/view/common/Icon.js +3 -1
- package/dist/cjs/view/common/MetadataList.js +3 -1
- package/dist/es2019/extractors/flexible/extract-state.js +1 -2
- package/dist/es2019/messages.js +17 -2
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/components/ActionIcon.js +22 -14
- package/dist/es2019/view/BlockCard/components/Content.js +3 -1
- package/dist/es2019/view/BlockCard/components/ContentFooter.js +3 -1
- package/dist/es2019/view/BlockCard/components/ContentHeader.js +3 -1
- package/dist/es2019/view/BlockCard/components/Frame.js +6 -2
- package/dist/es2019/view/BlockCard/components/Link.js +3 -1
- package/dist/es2019/view/BlockCard/components/Name.js +3 -1
- package/dist/es2019/view/BlockCard/components/Provider.js +1 -0
- package/dist/es2019/view/BlockCard/views/ErroredView.js +3 -1
- package/dist/es2019/view/BlockCard/views/ForbiddenView.js +6 -2
- package/dist/es2019/view/BlockCard/views/NotFoundView.js +3 -1
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +6 -2
- package/dist/es2019/view/BlockCard/views/ResolvingView.js +3 -1
- package/dist/es2019/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +2 -0
- package/dist/es2019/view/CardWithUrl/component-lazy/LazyLazilyRenderCard.js +3 -1
- package/dist/es2019/view/CardWithUrl/component-lazy/LoadingCardLink.js +3 -1
- package/dist/es2019/view/EmbedCard/components/ExpandedFrame.js +14 -4
- package/dist/es2019/view/EmbedCard/components/ImageIcon.js +3 -1
- package/dist/es2019/view/EmbedModal/components/link-info/index.js +11 -8
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/mocks.js +57 -55
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/api.js +6 -34
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/index.js +1 -2
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/index.js +0 -1
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/main.js +5 -7
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/services/index.js +7 -8
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/main.js +0 -2
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/menu-context/main.js +0 -2
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/index.js +1 -8
- package/dist/es2019/view/FlexibleCard/components/actions/follow-action/unfollow-icon/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/common/motion-wrapper/index.js +3 -0
- package/dist/es2019/view/FlexibleCard/components/container/layered-link/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/index.js +3 -1
- package/dist/es2019/view/HoverCard/components/ContentContainer.js +2 -0
- package/dist/es2019/view/InlineCard/Frame/index.js +3 -1
- package/dist/es2019/view/InlineCard/Icon.js +3 -1
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/index.js +23 -13
- package/dist/es2019/view/InlineCard/ResolvedView/index.js +3 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/RelatedLinksModal/components/RelatedLinksBaseModal.js +10 -7
- package/dist/es2019/view/RelatedLinksModal/components/related-link-item/index.js +50 -0
- package/dist/es2019/view/RelatedLinksModal/components/related-links-list/index.js +33 -0
- package/dist/es2019/view/RelatedLinksModal/views/resolved/index.js +23 -0
- package/dist/es2019/view/RelatedLinksModal/views/resolved/types.js +0 -0
- package/dist/es2019/view/common/Byline.js +3 -1
- package/dist/es2019/view/common/Icon.js +3 -1
- package/dist/es2019/view/common/MetadataList.js +3 -1
- package/dist/esm/extractors/flexible/extract-state.js +1 -2
- package/dist/esm/messages.js +17 -2
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/components/ActionIcon.js +22 -14
- package/dist/esm/view/BlockCard/components/Content.js +3 -1
- package/dist/esm/view/BlockCard/components/ContentFooter.js +3 -1
- package/dist/esm/view/BlockCard/components/ContentHeader.js +3 -1
- package/dist/esm/view/BlockCard/components/Frame.js +6 -2
- package/dist/esm/view/BlockCard/components/Link.js +3 -1
- package/dist/esm/view/BlockCard/components/Name.js +3 -1
- package/dist/esm/view/BlockCard/components/Provider.js +1 -0
- package/dist/esm/view/BlockCard/views/ErroredView.js +3 -1
- package/dist/esm/view/BlockCard/views/ForbiddenView.js +6 -2
- package/dist/esm/view/BlockCard/views/NotFoundView.js +3 -1
- package/dist/esm/view/BlockCard/views/ResolvedView.js +6 -2
- package/dist/esm/view/BlockCard/views/ResolvingView.js +3 -1
- package/dist/esm/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +2 -0
- package/dist/esm/view/CardWithUrl/component-lazy/LazyLazilyRenderCard.js +3 -1
- package/dist/esm/view/CardWithUrl/component-lazy/LoadingCardLink.js +3 -1
- package/dist/esm/view/EmbedCard/components/ExpandedFrame.js +41 -29
- package/dist/esm/view/EmbedCard/components/ImageIcon.js +3 -1
- package/dist/esm/view/EmbedModal/components/link-info/index.js +11 -8
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/mocks.js +57 -55
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/api.js +24 -57
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/index.js +1 -2
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/index.js +0 -1
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/main.js +6 -8
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/services/index.js +9 -10
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/main.js +1 -3
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/menu-context/main.js +1 -3
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/index.js +1 -6
- package/dist/esm/view/FlexibleCard/components/actions/follow-action/unfollow-icon/index.js +3 -1
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +3 -1
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/common/motion-wrapper/index.js +3 -0
- package/dist/esm/view/FlexibleCard/components/container/layered-link/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/index.js +3 -1
- package/dist/esm/view/HoverCard/components/ContentContainer.js +2 -0
- package/dist/esm/view/InlineCard/Frame/index.js +3 -1
- package/dist/esm/view/InlineCard/Icon.js +3 -1
- package/dist/esm/view/InlineCard/IconAndTitleLayout/index.js +23 -13
- package/dist/esm/view/InlineCard/ResolvedView/index.js +3 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/RelatedLinksModal/components/RelatedLinksBaseModal.js +10 -7
- package/dist/esm/view/RelatedLinksModal/components/related-link-item/index.js +49 -0
- package/dist/esm/view/RelatedLinksModal/components/related-links-list/index.js +34 -0
- package/dist/esm/view/RelatedLinksModal/views/resolved/index.js +24 -0
- package/dist/esm/view/RelatedLinksModal/views/resolved/types.js +0 -0
- package/dist/esm/view/common/Byline.js +3 -1
- package/dist/esm/view/common/Icon.js +3 -1
- package/dist/esm/view/common/MetadataList.js +3 -1
- package/dist/types/messages.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/types.d.ts +7 -5
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/api.d.ts +3 -8
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/index.d.ts +1 -2
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/index.d.ts +0 -1
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/main.d.ts +3 -5
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/services/index.d.ts +5 -6
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/main.d.ts +1 -3
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/menu-context/main.d.ts +1 -3
- package/dist/types/view/RelatedLinksModal/components/RelatedLinksBaseModal.d.ts +5 -4
- package/dist/types/view/RelatedLinksModal/components/related-link-item/index.d.ts +5 -0
- package/dist/types/view/RelatedLinksModal/components/related-links-list/index.d.ts +5 -0
- package/dist/types/view/RelatedLinksModal/components/types.d.ts +16 -0
- package/dist/types/view/RelatedLinksModal/views/resolved/index.d.ts +5 -0
- package/dist/types/view/RelatedLinksModal/views/resolved/types.d.ts +4 -0
- package/dist/types-ts4.5/messages.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/types.d.ts +7 -5
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/api.d.ts +3 -8
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/index.d.ts +1 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/index.d.ts +0 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/main.d.ts +3 -5
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/services/index.d.ts +5 -6
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/main.d.ts +1 -3
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/menu-context/main.d.ts +1 -3
- package/dist/types-ts4.5/view/RelatedLinksModal/components/RelatedLinksBaseModal.d.ts +5 -4
- package/dist/types-ts4.5/view/RelatedLinksModal/components/related-link-item/index.d.ts +5 -0
- package/dist/types-ts4.5/view/RelatedLinksModal/components/related-links-list/index.d.ts +5 -0
- package/dist/types-ts4.5/view/RelatedLinksModal/components/types.d.ts +16 -0
- package/dist/types-ts4.5/view/RelatedLinksModal/views/resolved/index.d.ts +5 -0
- package/dist/types-ts4.5/view/RelatedLinksModal/views/resolved/types.d.ts +4 -0
- package/package.json +3 -6
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/stack-resolver.js +0 -138
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/stack-resolver.js +0 -51
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/stack-resolver.js +0 -131
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/stack-resolver.d.ts +0 -3
- package/dist/types/view/RelatedLinksModal/types.d.ts +0 -6
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/stack-resolver.d.ts +0 -3
- package/dist/types-ts4.5/view/RelatedLinksModal/types.d.ts +0 -6
- /package/dist/cjs/view/RelatedLinksModal/{types.js → components/types.js} +0 -0
- /package/dist/es2019/view/RelatedLinksModal/{types.js → components/types.js} +0 -0
- /package/dist/esm/view/RelatedLinksModal/{types.js → components/types.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 27.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#104135](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/104135)
|
|
8
|
+
[`c78fc8b1e424`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c78fc8b1e424) -
|
|
9
|
+
[ux] FF clean up for ActionOptions disabled within Jira
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#103703](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/103703)
|
|
14
|
+
[`84a7f7c6ea21`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/84a7f7c6ea21) -
|
|
15
|
+
EDM-9887: add resolved view for related-links-modal which renders items in a list for incoming
|
|
16
|
+
and outgoing links
|
|
17
|
+
|
|
18
|
+
## 27.1.0
|
|
19
|
+
|
|
20
|
+
### Minor Changes
|
|
21
|
+
|
|
22
|
+
- [#103506](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/103506)
|
|
23
|
+
[`651f63e757d1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/651f63e757d1) -
|
|
24
|
+
Converted to the public api for manual triggers in the automation action.
|
|
25
|
+
|
|
3
26
|
## 27.0.0
|
|
4
27
|
|
|
5
28
|
### Major Changes
|
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _lozenge = require("../common/lozenge");
|
|
10
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
10
|
var _helpers = require("../../state/helpers");
|
|
12
11
|
var _extractServerAction = _interopRequireDefault(require("./extract-server-action"));
|
|
13
12
|
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
@@ -65,7 +64,7 @@ var extractState = function extractState(response, actionOptions, id) {
|
|
|
65
64
|
if (!lozenge) {
|
|
66
65
|
return;
|
|
67
66
|
}
|
|
68
|
-
if (!(0, _canShowAction.canShowAction)(_types.CardAction.ChangeStatusAction, actionOptions)
|
|
67
|
+
if (!(0, _canShowAction.canShowAction)(_types.CardAction.ChangeStatusAction, actionOptions)) {
|
|
69
68
|
return lozenge;
|
|
70
69
|
}
|
|
71
70
|
var action = extractAction(response, id);
|
package/dist/cjs/messages.js
CHANGED
|
@@ -706,8 +706,8 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
|
706
706
|
defaultMessage: 'An error occurred',
|
|
707
707
|
description: 'A generic error message to the user'
|
|
708
708
|
},
|
|
709
|
-
|
|
710
|
-
id: 'fabric.linking.related_links_modal_title
|
|
709
|
+
related_links_modal_title: {
|
|
710
|
+
id: 'fabric.linking.related_links_modal_title',
|
|
711
711
|
defaultMessage: 'Recent Links',
|
|
712
712
|
description: 'Shown as the title for the related links modal'
|
|
713
713
|
},
|
|
@@ -715,5 +715,20 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
|
715
715
|
id: 'fabric.linking.related_links_view_related_urls.nonfinal',
|
|
716
716
|
defaultMessage: 'View recent links...',
|
|
717
717
|
description: 'Action to view related links to the given resource'
|
|
718
|
+
},
|
|
719
|
+
related_links_found_in: {
|
|
720
|
+
id: 'fabric.linking.related_links_found_in',
|
|
721
|
+
defaultMessage: 'Found In',
|
|
722
|
+
description: 'Informs the user of the resources are found in the given url'
|
|
723
|
+
},
|
|
724
|
+
related_links_not_found: {
|
|
725
|
+
id: 'fabric.linking.related_links_not_found',
|
|
726
|
+
defaultMessage: 'We didn\'t find any links to show here.',
|
|
727
|
+
description: 'Informs the user that there are no related resources for the given url'
|
|
728
|
+
},
|
|
729
|
+
related_links_includes_links_to: {
|
|
730
|
+
id: 'fabric.linking.related_links_includes_links_to',
|
|
731
|
+
defaultMessage: 'Includes Links To',
|
|
732
|
+
description: 'Informs the user of the resources the url links to'
|
|
718
733
|
}
|
|
719
734
|
});
|
|
@@ -22,7 +22,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
22
22
|
var context = exports.context = {
|
|
23
23
|
componentName: 'smart-cards',
|
|
24
24
|
packageName: "@atlaskit/smart-card",
|
|
25
|
-
packageVersion: "27.
|
|
25
|
+
packageVersion: "27.2.0"
|
|
26
26
|
};
|
|
27
27
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
28
28
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -28,20 +28,28 @@ var ActionIcon = exports.ActionIcon = function ActionIcon(_ref) {
|
|
|
28
28
|
case 'loading':
|
|
29
29
|
return null;
|
|
30
30
|
case 'success':
|
|
31
|
-
return
|
|
32
|
-
|
|
33
|
-
style
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
return (
|
|
32
|
+
/*#__PURE__*/
|
|
33
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
34
|
+
_react.default.createElement("div", {
|
|
35
|
+
"data-testid": "check-icon",
|
|
36
|
+
style: spinnerStyles
|
|
37
|
+
}, /*#__PURE__*/_react.default.createElement(_check.default, {
|
|
38
|
+
size: "small",
|
|
39
|
+
label: "check"
|
|
40
|
+
}))
|
|
41
|
+
);
|
|
38
42
|
case 'failure':
|
|
39
|
-
return
|
|
40
|
-
|
|
41
|
-
style
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
return (
|
|
44
|
+
/*#__PURE__*/
|
|
45
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
46
|
+
_react.default.createElement("div", {
|
|
47
|
+
"data-testid": "cross-icon",
|
|
48
|
+
style: spinnerStyles
|
|
49
|
+
}, /*#__PURE__*/_react.default.createElement(_cross.default, {
|
|
50
|
+
size: "small",
|
|
51
|
+
label: "check"
|
|
52
|
+
}))
|
|
53
|
+
);
|
|
46
54
|
}
|
|
47
55
|
};
|
|
@@ -28,7 +28,9 @@ var Content = exports.Content = function Content(_ref) {
|
|
|
28
28
|
justifyContent: isCompact ? 'unset' : ['unset', 'space-between'],
|
|
29
29
|
flexGrow: 1
|
|
30
30
|
}),
|
|
31
|
-
"data-trello-do-not-use-override": "block-card-content"
|
|
31
|
+
"data-trello-do-not-use-override": "block-card-content"
|
|
32
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
33
|
+
,
|
|
32
34
|
className: blockCardContentClassName
|
|
33
35
|
}, children);
|
|
34
36
|
};
|
|
@@ -22,7 +22,9 @@ var ContentFooter = exports.ContentFooter = function ContentFooter(_ref) {
|
|
|
22
22
|
alignItems: ['unset', 'center'],
|
|
23
23
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
24
24
|
marginTop: [(0, _utils.gs)(1), (0, _utils.gs)(1.5)]
|
|
25
|
-
})
|
|
25
|
+
})
|
|
26
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
27
|
+
,
|
|
26
28
|
className: contentFooterClassName
|
|
27
29
|
}, children);
|
|
28
30
|
};
|
|
@@ -32,7 +32,9 @@ var ContentHeader = exports.ContentHeader = function ContentHeader(_ref) {
|
|
|
32
32
|
// due to HTML its unwrapping behaviour on paste.
|
|
33
33
|
MozUserSelect: 'none'
|
|
34
34
|
},
|
|
35
|
-
"data-trello-do-not-use-override": "block-card-content-header"
|
|
35
|
+
"data-trello-do-not-use-override": "block-card-content-header"
|
|
36
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
37
|
+
,
|
|
36
38
|
className: blockCardContentHeaderClassName
|
|
37
39
|
}, children);
|
|
38
40
|
};
|
|
@@ -47,7 +47,9 @@ var ExpandedFrame = exports.ExpandedFrame = function ExpandedFrame(_ref) {
|
|
|
47
47
|
overflow: 'hidden',
|
|
48
48
|
boxShadow: "var(--ds-shadow-raised, ".concat("0 1px 1px ".concat(_colors.N50A, ", 0 0 1px 1px ").concat(_colors.N40A), ")")
|
|
49
49
|
})),
|
|
50
|
-
"data-testid": testId
|
|
50
|
+
"data-testid": testId
|
|
51
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
52
|
+
,
|
|
51
53
|
className: className,
|
|
52
54
|
"data-trello-do-not-use-override": testId
|
|
53
55
|
}, children);
|
|
@@ -74,7 +76,9 @@ var CompactFrame = exports.CompactFrame = function CompactFrame(_ref2) {
|
|
|
74
76
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
75
77
|
padding: ["0px ".concat((0, _utils.gs)(1)), '0']
|
|
76
78
|
})),
|
|
77
|
-
"data-testid": testId
|
|
79
|
+
"data-testid": testId
|
|
80
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
81
|
+
,
|
|
78
82
|
className: className
|
|
79
83
|
}, children);
|
|
80
84
|
};
|
|
@@ -14,7 +14,9 @@ var Link = exports.Link = function Link(_ref) {
|
|
|
14
14
|
testId = _ref$testId === void 0 ? 'block-card' : _ref$testId,
|
|
15
15
|
className = _ref.className;
|
|
16
16
|
return (0, _react.jsx)("span", {
|
|
17
|
-
"data-testid": "".concat(testId, "-link")
|
|
17
|
+
"data-testid": "".concat(testId, "-link")
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
19
|
+
,
|
|
18
20
|
className: className,
|
|
19
21
|
css: {
|
|
20
22
|
color: "var(--ds-link, ".concat(_colors.B400, ")"),
|
|
@@ -41,7 +41,9 @@ var Name = exports.Name = function Name(_ref) {
|
|
|
41
41
|
maxHeight: (0, _utils.gs)(6)
|
|
42
42
|
},
|
|
43
43
|
"data-testid": testId,
|
|
44
|
-
"data-trello-do-not-use-override": "block-card-content-header-name"
|
|
44
|
+
"data-trello-do-not-use-override": "block-card-content-header-name"
|
|
45
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
46
|
+
,
|
|
45
47
|
className: blockCardContentHeaderNameClassName
|
|
46
48
|
}, name);
|
|
47
49
|
};
|
|
@@ -15,6 +15,7 @@ var Provider = exports.Provider = function Provider(_ref) {
|
|
|
15
15
|
var iconToRender = icon || null;
|
|
16
16
|
if (typeof icon === 'string') {
|
|
17
17
|
iconToRender = (0, _react.jsx)("img", {
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
18
19
|
className: "smart-link-icon",
|
|
19
20
|
css: {
|
|
20
21
|
height: (0, _utils.gs)(1.5),
|
|
@@ -52,7 +52,9 @@ var ErroredView = exports.ErroredView = function ErroredView(_ref) {
|
|
|
52
52
|
}, [onRetry]);
|
|
53
53
|
return (0, _react.jsx)(_Frame.Frame, {
|
|
54
54
|
isSelected: isSelected,
|
|
55
|
-
testId: testId
|
|
55
|
+
testId: testId
|
|
56
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
57
|
+
,
|
|
56
58
|
className: blockCardErroredViewClassName,
|
|
57
59
|
isFluidHeight: true,
|
|
58
60
|
inheritDimensions: inheritDimensions
|
|
@@ -69,7 +69,9 @@ var ForbiddenView = exports.ForbiddenView = function ForbiddenView(_ref) {
|
|
|
69
69
|
var items = action !== undefined && !(buttonDisabled !== null && buttonDisabled !== void 0 ? buttonDisabled : false) ? [].concat((0, _toConsumableArray2.default)(actions), [action]) : actions;
|
|
70
70
|
return (0, _react.jsx)(_Frame.Frame, {
|
|
71
71
|
isSelected: isSelected,
|
|
72
|
-
testId: testId
|
|
72
|
+
testId: testId
|
|
73
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
74
|
+
,
|
|
73
75
|
className: blockCardForbiddenViewClassName,
|
|
74
76
|
isFluidHeight: true
|
|
75
77
|
}, (0, _react.jsx)(_Content.Content, {
|
|
@@ -79,7 +81,9 @@ var ForbiddenView = exports.ForbiddenView = function ForbiddenView(_ref) {
|
|
|
79
81
|
link: link
|
|
80
82
|
}, (0, _react.jsx)(_Link.Link, {
|
|
81
83
|
url: link,
|
|
82
|
-
testId: testId
|
|
84
|
+
testId: testId
|
|
85
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
86
|
+
,
|
|
83
87
|
className: blockCardForbiddenViewLinkClassName
|
|
84
88
|
})), (0, _react.jsx)(_Byline.Byline, null, (0, _react.jsx)(_UnresolvedText.UnresolvedText, {
|
|
85
89
|
icon: (0, _react.jsx)(_lockFilled.default, {
|
|
@@ -49,7 +49,9 @@ var NotFoundView = exports.NotFoundView = function NotFoundView(_ref) {
|
|
|
49
49
|
};
|
|
50
50
|
return (0, _react.jsx)(_Frame.Frame, {
|
|
51
51
|
isSelected: isSelected,
|
|
52
|
-
testId: testId
|
|
52
|
+
testId: testId
|
|
53
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
54
|
+
,
|
|
53
55
|
className: blockCardNotFoundViewClassName,
|
|
54
56
|
isFluidHeight: true
|
|
55
57
|
}, (0, _react.jsx)(_Content.Content, {
|
|
@@ -83,7 +83,9 @@ var ResolvedView = exports.ResolvedView = function ResolvedView(_ref) {
|
|
|
83
83
|
items: details
|
|
84
84
|
}) : undefined;
|
|
85
85
|
var resolvedByline = (0, _react.jsx)(_Byline.Byline, {
|
|
86
|
-
testId: testId ? "".concat(testId, "-by") : undefined
|
|
86
|
+
testId: testId ? "".concat(testId, "-by") : undefined
|
|
87
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
88
|
+
,
|
|
87
89
|
className: blockCardResolvedViewByClassName
|
|
88
90
|
}, byline);
|
|
89
91
|
var handleClick = function handleClick(event) {
|
|
@@ -92,7 +94,9 @@ var ResolvedView = exports.ResolvedView = function ResolvedView(_ref) {
|
|
|
92
94
|
var hasActions = actions.length > 0;
|
|
93
95
|
return (0, _react.jsx)(_Frame.Frame, {
|
|
94
96
|
isSelected: isSelected,
|
|
95
|
-
testId: testId
|
|
97
|
+
testId: testId
|
|
98
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
99
|
+
,
|
|
96
100
|
className: blockCardResolvedViewClassName
|
|
97
101
|
}, (0, _react.jsx)(_Content.Content, null, (0, _react.jsx)("div", null, (0, _react.jsx)("div", {
|
|
98
102
|
css: styles
|
|
@@ -32,7 +32,9 @@ var ResolvingView = exports.ResolvingView = function ResolvingView(_ref) {
|
|
|
32
32
|
inheritDimensions: inheritDimensions,
|
|
33
33
|
compact: true,
|
|
34
34
|
isSelected: isSelected,
|
|
35
|
-
testId: testId
|
|
35
|
+
testId: testId
|
|
36
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
37
|
+
,
|
|
36
38
|
className: blockCardResolvingViewClassName
|
|
37
39
|
}, (0, _react.jsx)(_documentFilled.default, {
|
|
38
40
|
size: "small",
|
|
@@ -58,6 +58,8 @@ function LazyIntersectionObserverCard(props) {
|
|
|
58
58
|
var content = isIntersecting ? /*#__PURE__*/_react.default.createElement(_component.CardWithUrlContent, props) : /*#__PURE__*/_react.default.createElement(ComponentObserver, {
|
|
59
59
|
ref: ref
|
|
60
60
|
}, /*#__PURE__*/_react.default.createElement(_LoadingCardLink.LoadingCardLink, props));
|
|
61
|
+
|
|
62
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
61
63
|
return /*#__PURE__*/_react.default.createElement(Component, {
|
|
62
64
|
className: "loader-wrapper"
|
|
63
65
|
}, content);
|
|
@@ -24,7 +24,9 @@ function LazyLazilyRenderCard(props) {
|
|
|
24
24
|
});
|
|
25
25
|
return /*#__PURE__*/_react.default.createElement(_reactLazilyRender.default, {
|
|
26
26
|
offset: offset,
|
|
27
|
-
component: appearance === 'inline' ? 'span' : 'div'
|
|
27
|
+
component: appearance === 'inline' ? 'span' : 'div'
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
29
|
+
,
|
|
28
30
|
className: "loader-wrapper",
|
|
29
31
|
placeholder: /*#__PURE__*/_react.default.createElement(_LoadingCardLink.LoadingCardLink, props),
|
|
30
32
|
scrollContainer: container,
|
|
@@ -17,7 +17,9 @@ var LoadingCardLink = exports.LoadingCardLink = function LoadingCardLink(_ref) {
|
|
|
17
17
|
testId: 'lazy-render-placeholder',
|
|
18
18
|
"data-trello-do-not-use-override": "lazy-render-placeholder-trello",
|
|
19
19
|
isSelected: isSelected,
|
|
20
|
-
link: url
|
|
20
|
+
link: url
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
22
|
+
,
|
|
21
23
|
className: _LazyFallback.loadingPlaceholderClassName,
|
|
22
24
|
placeholder: placeholder
|
|
23
25
|
});
|
|
@@ -38,35 +38,43 @@ var ExpandedFrame = exports.ExpandedFrame = function ExpandedFrame(_ref) {
|
|
|
38
38
|
var handleMouseDown = (0, _useLinkClicked.useMouseDownEvent)();
|
|
39
39
|
var isFixEmbedCardBlurEnabled = (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.fix-embed-card-blurring') ? true : false;
|
|
40
40
|
var renderHeaderOld = function renderHeaderOld() {
|
|
41
|
-
return
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
41
|
+
return (
|
|
42
|
+
/*#__PURE__*/
|
|
43
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
44
|
+
_react.default.createElement(_styled.Header, {
|
|
45
|
+
className: "embed-header",
|
|
46
|
+
frameStyle: frameStyle
|
|
47
|
+
}, /*#__PURE__*/_react.default.createElement(_styled.IconWrapper, {
|
|
48
|
+
isPlaceholder: isPlaceholder
|
|
49
|
+
}, !isPlaceholder && icon), /*#__PURE__*/_react.default.createElement(_styled.TextWrapper, {
|
|
50
|
+
isPlaceholder: isPlaceholder
|
|
51
|
+
}, !isPlaceholder && /*#__PURE__*/_react.default.createElement("a", {
|
|
52
|
+
href: href,
|
|
53
|
+
onClick: handleClick,
|
|
54
|
+
onMouseDown: handleMouseDown
|
|
55
|
+
}, text)))
|
|
56
|
+
);
|
|
53
57
|
};
|
|
54
58
|
var renderHeader = function renderHeader() {
|
|
55
|
-
return
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
59
|
+
return (
|
|
60
|
+
/*#__PURE__*/
|
|
61
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
62
|
+
_react.default.createElement(_styled.Header, {
|
|
63
|
+
className: "embed-header",
|
|
64
|
+
frameStyle: frameStyle
|
|
65
|
+
}, /*#__PURE__*/_react.default.createElement(_styled.IconWrapper, {
|
|
66
|
+
isPlaceholder: isPlaceholder
|
|
67
|
+
}, !isPlaceholder && icon), /*#__PURE__*/_react.default.createElement(_styled.TooltipWrapper, null, /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
68
|
+
content: text,
|
|
69
|
+
hideTooltipOnMouseDown: true
|
|
70
|
+
}, /*#__PURE__*/_react.default.createElement(_styled.TextWrapper, {
|
|
71
|
+
isPlaceholder: isPlaceholder
|
|
72
|
+
}, !isPlaceholder && /*#__PURE__*/_react.default.createElement("a", {
|
|
73
|
+
href: href,
|
|
74
|
+
onClick: handleClick,
|
|
75
|
+
onMouseDown: handleMouseDown
|
|
76
|
+
}, text)))))
|
|
77
|
+
);
|
|
70
78
|
};
|
|
71
79
|
var renderContent = function renderContent() {
|
|
72
80
|
return /*#__PURE__*/_react.default.createElement(_styled.Content, {
|
|
@@ -78,7 +86,9 @@ var ExpandedFrame = exports.ExpandedFrame = function ExpandedFrame(_ref) {
|
|
|
78
86
|
}, children);
|
|
79
87
|
};
|
|
80
88
|
if (!isPlaceholder && href) {
|
|
81
|
-
return /*#__PURE__*/_react.default.createElement(_styled.LinkWrapper
|
|
89
|
+
return /*#__PURE__*/_react.default.createElement(_styled.LinkWrapper
|
|
90
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
91
|
+
, {
|
|
82
92
|
className: _styled.className,
|
|
83
93
|
isInteractive: isInteractive(),
|
|
84
94
|
isSelected: isSelected,
|
|
@@ -93,7 +103,9 @@ var ExpandedFrame = exports.ExpandedFrame = function ExpandedFrame(_ref) {
|
|
|
93
103
|
inheritDimensions: inheritDimensions
|
|
94
104
|
}, (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.enable-embed-card-header-tooltip_g9saw') ? renderHeader() : renderHeaderOld(), renderContent());
|
|
95
105
|
} else {
|
|
96
|
-
return /*#__PURE__*/_react.default.createElement(_styled.Wrapper
|
|
106
|
+
return /*#__PURE__*/_react.default.createElement(_styled.Wrapper
|
|
107
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
108
|
+
, {
|
|
97
109
|
className: _styled.className,
|
|
98
110
|
isInteractive: isInteractive(),
|
|
99
111
|
isSelected: isSelected,
|
|
@@ -23,7 +23,9 @@ var ImageIcon = exports.ImageIcon = function ImageIcon(_ref) {
|
|
|
23
23
|
return /*#__PURE__*/_react.default.createElement(_reactRenderImage.default, {
|
|
24
24
|
src: src,
|
|
25
25
|
loading: defaultIcon,
|
|
26
|
-
loaded: /*#__PURE__*/_react.default.createElement(_styled.Image
|
|
26
|
+
loaded: /*#__PURE__*/_react.default.createElement(_styled.Image
|
|
27
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
28
|
+
, {
|
|
27
29
|
className: "smart-link-icon",
|
|
28
30
|
src: src,
|
|
29
31
|
alt: alt,
|
|
@@ -68,14 +68,17 @@ var LinkInfo = function LinkInfo(_ref) {
|
|
|
68
68
|
}) : (0, _react.jsx)(_vidFullScreenOn.default, {
|
|
69
69
|
label: message.defaultMessage
|
|
70
70
|
});
|
|
71
|
-
return (
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
71
|
+
return (
|
|
72
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
73
|
+
(0, _react.jsx)("span", {
|
|
74
|
+
className: "smart-link-resize-button"
|
|
75
|
+
}, (0, _react.jsx)(_linkInfoButton.default, {
|
|
76
|
+
content: (0, _react.jsx)(_reactIntlNext.FormattedMessage, message),
|
|
77
|
+
icon: icon,
|
|
78
|
+
onClick: onResizeButtonClick,
|
|
79
|
+
testId: "".concat(testId, "-resize")
|
|
80
|
+
}))
|
|
81
|
+
);
|
|
79
82
|
}, [onResizeButtonClick, size, testId]);
|
|
80
83
|
return (0, _react.jsx)("div", {
|
|
81
84
|
css: _styled.containerStyles
|
|
@@ -12,64 +12,66 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
12
12
|
var mockScope = {
|
|
13
13
|
resources: []
|
|
14
14
|
};
|
|
15
|
-
var mockRules = exports.mockRules =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
id: 1,
|
|
22
|
-
name: 'Test rule 1 (has inputs)',
|
|
23
|
-
ruleScope: mockScope,
|
|
24
|
-
userInputs: [{
|
|
25
|
-
defaultValue: '',
|
|
26
|
-
displayName: 'Test user input',
|
|
27
|
-
inputType: _types.UserInputType.TEXT,
|
|
28
|
-
required: false,
|
|
29
|
-
variableName: 'testUserInput'
|
|
30
|
-
}]
|
|
31
|
-
}, {
|
|
32
|
-
id: 2,
|
|
33
|
-
name: 'Test rule 2 (has multiple inputs)',
|
|
34
|
-
ruleScope: mockScope,
|
|
35
|
-
userInputs: [{
|
|
36
|
-
defaultValue: '',
|
|
37
|
-
displayName: 'Text user input',
|
|
38
|
-
inputType: _types.UserInputType.TEXT,
|
|
39
|
-
required: false,
|
|
40
|
-
variableName: 'textUserInput'
|
|
41
|
-
}, {
|
|
42
|
-
defaultValue: '',
|
|
43
|
-
displayName: 'Number user input',
|
|
44
|
-
inputType: _types.UserInputType.NUMBER,
|
|
45
|
-
required: false,
|
|
46
|
-
variableName: 'numberUserInput'
|
|
15
|
+
var mockRules = exports.mockRules = {
|
|
16
|
+
data: [{
|
|
17
|
+
id: 0,
|
|
18
|
+
name: 'Test rule 0 (no inputs)',
|
|
19
|
+
ruleScope: mockScope,
|
|
20
|
+
userInputs: []
|
|
47
21
|
}, {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
22
|
+
id: 1,
|
|
23
|
+
name: 'Test rule 1 (has inputs)',
|
|
24
|
+
ruleScope: mockScope,
|
|
25
|
+
userInputs: [{
|
|
26
|
+
defaultValue: '',
|
|
27
|
+
displayName: 'Test user input',
|
|
28
|
+
inputType: _types.UserInputType.TEXT,
|
|
29
|
+
required: false,
|
|
30
|
+
variableName: 'testUserInput'
|
|
31
|
+
}]
|
|
53
32
|
}, {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
33
|
+
id: 2,
|
|
34
|
+
name: 'Test rule 2 (has multiple inputs)',
|
|
35
|
+
ruleScope: mockScope,
|
|
36
|
+
userInputs: [{
|
|
37
|
+
defaultValue: '',
|
|
38
|
+
displayName: 'Text user input',
|
|
39
|
+
inputType: _types.UserInputType.TEXT,
|
|
40
|
+
required: false,
|
|
41
|
+
variableName: 'textUserInput'
|
|
42
|
+
}, {
|
|
43
|
+
defaultValue: '',
|
|
44
|
+
displayName: 'Number user input',
|
|
45
|
+
inputType: _types.UserInputType.NUMBER,
|
|
46
|
+
required: false,
|
|
47
|
+
variableName: 'numberUserInput'
|
|
48
|
+
}, {
|
|
49
|
+
defaultValue: true,
|
|
50
|
+
displayName: 'Boolean user input',
|
|
51
|
+
inputType: _types.UserInputType.BOOLEAN,
|
|
52
|
+
required: false,
|
|
53
|
+
variableName: 'booleanUserInput'
|
|
54
|
+
}, {
|
|
55
|
+
defaultValue: [''],
|
|
56
|
+
displayName: 'Dropdown user input',
|
|
57
|
+
inputType: _types.UserInputType.DROPDOWN,
|
|
58
|
+
required: false,
|
|
59
|
+
variableName: 'dropdownUserInput'
|
|
60
|
+
}, {
|
|
61
|
+
defaultValue: '',
|
|
62
|
+
displayName: 'Paragraph user input',
|
|
63
|
+
inputType: _types.UserInputType.PARAGRAPH,
|
|
64
|
+
required: false,
|
|
65
|
+
variableName: 'paragraphUserInput'
|
|
66
|
+
}]
|
|
65
67
|
}]
|
|
66
|
-
}
|
|
67
|
-
var mockTransformedRules = exports.mockTransformedRules = [_objectSpread(_objectSpread({}, mockRules[0]), {}, {
|
|
68
|
-
userInputPrompts: mockRules[0].userInputs
|
|
69
|
-
}), _objectSpread(_objectSpread({}, mockRules[1]), {}, {
|
|
70
|
-
userInputPrompts: mockRules[1].userInputs
|
|
71
|
-
}), _objectSpread(_objectSpread({}, mockRules[2]), {}, {
|
|
72
|
-
userInputPrompts: mockRules[2].userInputs
|
|
68
|
+
};
|
|
69
|
+
var mockTransformedRules = exports.mockTransformedRules = [_objectSpread(_objectSpread({}, mockRules.data[0]), {}, {
|
|
70
|
+
userInputPrompts: mockRules.data[0].userInputs
|
|
71
|
+
}), _objectSpread(_objectSpread({}, mockRules.data[1]), {}, {
|
|
72
|
+
userInputPrompts: mockRules.data[1].userInputs
|
|
73
|
+
}), _objectSpread(_objectSpread({}, mockRules.data[2]), {}, {
|
|
74
|
+
userInputPrompts: mockRules.data[2].userInputs
|
|
73
75
|
})];
|
|
74
76
|
var mockInvocationResponse = exports.mockInvocationResponse = {
|
|
75
77
|
'TEST-1': 'SUCCESS'
|