@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
|
@@ -4,11 +4,10 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.performPostRequest = exports.performGetRequest = exports.getSearchUrl = exports.getInvocationUrl = exports.
|
|
7
|
+
exports.performPostRequest = exports.performGetRequest = exports.getSearchUrl = exports.getInvocationUrl = exports.extractCloudIdAndProductFromSite = void 0;
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
|
-
var _stackResolver = require("./stack-resolver");
|
|
12
11
|
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
12
|
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) { (0, _defineProperty2.default)(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
13
|
/**
|
|
@@ -53,46 +52,40 @@ var extractCloudIdAndProductFromSite = exports.extractCloudIdAndProductFromSite
|
|
|
53
52
|
*
|
|
54
53
|
*/
|
|
55
54
|
var getSearchUrl = exports.getSearchUrl = /*#__PURE__*/function () {
|
|
56
|
-
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(
|
|
57
|
-
var _extractCloudIdAndPro, product, cloudId
|
|
55
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(site) {
|
|
56
|
+
var _extractCloudIdAndPro, product, cloudId;
|
|
58
57
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
59
58
|
while (1) switch (_context.prev = _context.next) {
|
|
60
59
|
case 0:
|
|
61
|
-
_extractCloudIdAndPro = extractCloudIdAndProductFromSite(site), product = _extractCloudIdAndPro.product, cloudId = _extractCloudIdAndPro.cloudId;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
return _context.abrupt("return", "/gateway/api/automation/internal-api/".concat(product, "/").concat(cloudId, "/").concat(automationStack, "/rest/v1/rules/manual/search"));
|
|
67
|
-
case 5:
|
|
60
|
+
_extractCloudIdAndPro = extractCloudIdAndProductFromSite(site), product = _extractCloudIdAndPro.product, cloudId = _extractCloudIdAndPro.cloudId; // TODO in the unified API, GET requests as according to Atlassian API standards will destructure the whole query into
|
|
61
|
+
// query parameters as part of the URL. For now, this is considered a POST request instead and thus the query is used
|
|
62
|
+
// later on as the request body.
|
|
63
|
+
return _context.abrupt("return", "/gateway/api/automation/public/".concat(product, "/").concat(cloudId, "/rest/v1/rule/manual/search"));
|
|
64
|
+
case 2:
|
|
68
65
|
case "end":
|
|
69
66
|
return _context.stop();
|
|
70
67
|
}
|
|
71
68
|
}, _callee);
|
|
72
69
|
}));
|
|
73
|
-
return function getSearchUrl(_x
|
|
70
|
+
return function getSearchUrl(_x) {
|
|
74
71
|
return _ref.apply(this, arguments);
|
|
75
72
|
};
|
|
76
73
|
}();
|
|
77
74
|
var getInvocationUrl = exports.getInvocationUrl = /*#__PURE__*/function () {
|
|
78
|
-
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(
|
|
79
|
-
var _extractCloudIdAndPro2, product, cloudId
|
|
75
|
+
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(site, ruleId) {
|
|
76
|
+
var _extractCloudIdAndPro2, product, cloudId;
|
|
80
77
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
81
78
|
while (1) switch (_context2.prev = _context2.next) {
|
|
82
79
|
case 0:
|
|
83
80
|
_extractCloudIdAndPro2 = extractCloudIdAndProductFromSite(site), product = _extractCloudIdAndPro2.product, cloudId = _extractCloudIdAndPro2.cloudId;
|
|
84
|
-
_context2.
|
|
85
|
-
|
|
86
|
-
case 3:
|
|
87
|
-
automationStack = _context2.sent;
|
|
88
|
-
return _context2.abrupt("return", "/gateway/api/automation/internal-api/".concat(product, "/").concat(cloudId, "/").concat(automationStack, "/rest/v1/rules/manual/invocation/").concat(ruleId));
|
|
89
|
-
case 5:
|
|
81
|
+
return _context2.abrupt("return", "/gateway/api/automation/public/".concat(product, "/").concat(cloudId, "/rest/v1/rule/manual/").concat(ruleId, "/invocation"));
|
|
82
|
+
case 2:
|
|
90
83
|
case "end":
|
|
91
84
|
return _context2.stop();
|
|
92
85
|
}
|
|
93
86
|
}, _callee2);
|
|
94
87
|
}));
|
|
95
|
-
return function getInvocationUrl(
|
|
88
|
+
return function getInvocationUrl(_x2, _x3) {
|
|
96
89
|
return _ref2.apply(this, arguments);
|
|
97
90
|
};
|
|
98
91
|
}();
|
|
@@ -100,30 +93,27 @@ var DEFAULT_HEADER = {
|
|
|
100
93
|
'Content-Type': 'application/json'
|
|
101
94
|
};
|
|
102
95
|
var _performRequest = /*#__PURE__*/function () {
|
|
103
|
-
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(url, method) {
|
|
104
|
-
var
|
|
105
|
-
response,
|
|
106
|
-
_args3 = arguments;
|
|
96
|
+
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(url, method, options) {
|
|
97
|
+
var response;
|
|
107
98
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
108
99
|
while (1) switch (_context3.prev = _context3.next) {
|
|
109
100
|
case 0:
|
|
110
|
-
|
|
101
|
+
_context3.next = 2;
|
|
102
|
+
return fetch(url, _objectSpread(_objectSpread({
|
|
111
103
|
headers: DEFAULT_HEADER
|
|
112
|
-
}
|
|
113
|
-
_context3.next = 3;
|
|
114
|
-
return fetch(url, _objectSpread(_objectSpread({}, options), {}, {
|
|
104
|
+
}, options), {}, {
|
|
115
105
|
method: method
|
|
116
106
|
}));
|
|
117
|
-
case
|
|
107
|
+
case 2:
|
|
118
108
|
response = _context3.sent;
|
|
119
109
|
return _context3.abrupt("return", response.json());
|
|
120
|
-
case
|
|
110
|
+
case 4:
|
|
121
111
|
case "end":
|
|
122
112
|
return _context3.stop();
|
|
123
113
|
}
|
|
124
114
|
}, _callee3);
|
|
125
115
|
}));
|
|
126
|
-
return function _performRequest(
|
|
116
|
+
return function _performRequest(_x4, _x5, _x6) {
|
|
127
117
|
return _ref3.apply(this, arguments);
|
|
128
118
|
};
|
|
129
119
|
}();
|
|
@@ -139,7 +129,7 @@ var performGetRequest = exports.performGetRequest = /*#__PURE__*/function () {
|
|
|
139
129
|
}
|
|
140
130
|
}, _callee4);
|
|
141
131
|
}));
|
|
142
|
-
return function performGetRequest(
|
|
132
|
+
return function performGetRequest(_x7, _x8) {
|
|
143
133
|
return _ref4.apply(this, arguments);
|
|
144
134
|
};
|
|
145
135
|
}();
|
|
@@ -155,29 +145,7 @@ var performPostRequest = exports.performPostRequest = /*#__PURE__*/function () {
|
|
|
155
145
|
}
|
|
156
146
|
}, _callee5);
|
|
157
147
|
}));
|
|
158
|
-
return function performPostRequest(
|
|
148
|
+
return function performPostRequest(_x9, _x10) {
|
|
159
149
|
return _ref5.apply(this, arguments);
|
|
160
150
|
};
|
|
161
|
-
}();
|
|
162
|
-
|
|
163
|
-
// TODO this will need to be expanded to resolve the correct product URL, too.
|
|
164
|
-
// TODO for instance this will need to support Alerts UI URL resolution in the
|
|
165
|
-
// TODO short term
|
|
166
|
-
var getBaseAutomationUrl = exports.getBaseAutomationUrl = function getBaseAutomationUrl(_ref6) {
|
|
167
|
-
var projectKey = _ref6.projectKey,
|
|
168
|
-
projectType = _ref6.projectType,
|
|
169
|
-
isSimplified = _ref6.isSimplified;
|
|
170
|
-
/**
|
|
171
|
-
* Confusing mapping of urls here.
|
|
172
|
-
* Classic Projects - always under /automate
|
|
173
|
-
* Next Gen Projects - under /automation for all project types except JSD
|
|
174
|
-
*/
|
|
175
|
-
switch (projectType) {
|
|
176
|
-
case 'service_desk':
|
|
177
|
-
return "/jira/servicedesk/projects/".concat(projectKey, "/settings/automate");
|
|
178
|
-
case 'business':
|
|
179
|
-
return "/jira/core/projects/".concat(projectKey, "/settings/").concat(isSimplified ? 'automation' : 'automate');
|
|
180
|
-
default:
|
|
181
|
-
return "/jira/software/".concat(isSimplified ? '' : 'c/', "projects/").concat(projectKey, "/settings/").concat(isSimplified ? 'automation' : 'automate');
|
|
182
|
-
}
|
|
183
|
-
};
|
|
151
|
+
}();
|
|
@@ -9,24 +9,6 @@ Object.defineProperty(exports, "extractCloudIdAndProductFromSite", {
|
|
|
9
9
|
return _api.extractCloudIdAndProductFromSite;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
Object.defineProperty(exports, "getAutomationStack", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _stackResolver.getAutomationStack;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "getAutomationStackFromLocalStorage", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function get() {
|
|
21
|
-
return _stackResolver.getAutomationStackFromLocalStorage;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "getBaseAutomationUrl", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function get() {
|
|
27
|
-
return _api.getBaseAutomationUrl;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
12
|
Object.defineProperty(exports, "getInvocationUrl", {
|
|
31
13
|
enumerable: true,
|
|
32
14
|
get: function get() {
|
|
@@ -51,5 +33,4 @@ Object.defineProperty(exports, "performPostRequest", {
|
|
|
51
33
|
return _api.performPostRequest;
|
|
52
34
|
}
|
|
53
35
|
});
|
|
54
|
-
var _api = require("./api");
|
|
55
|
-
var _stackResolver = require("./stack-resolver");
|
|
36
|
+
var _api = require("./api");
|
|
@@ -9,12 +9,6 @@ Object.defineProperty(exports, "ManualRulesContainer", {
|
|
|
9
9
|
return _main.ManualRulesContainer;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
Object.defineProperty(exports, "getBaseAutomationUrl", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _utils.getBaseAutomationUrl;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
12
|
Object.defineProperty(exports, "invokeManuallyTriggeredRule", {
|
|
19
13
|
enumerable: true,
|
|
20
14
|
get: function get() {
|
|
@@ -34,5 +28,4 @@ Object.defineProperty(exports, "useManualRules", {
|
|
|
34
28
|
}
|
|
35
29
|
});
|
|
36
30
|
var _services = require("./services");
|
|
37
|
-
var _utils = require("./common/utils");
|
|
38
31
|
var _main = require("./main");
|
|
@@ -22,11 +22,10 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
22
22
|
/**
|
|
23
23
|
* React hook that implements the fetch and invoke actions for manual triggers.
|
|
24
24
|
* Can be used standalone or in the HOC provided below.
|
|
25
|
-
* @param env - The environment to retrieve rules from
|
|
26
25
|
* @param site - The site to filter on. We map this to just a cloudId to resolve the manual rules API path
|
|
27
26
|
* @param query - Query object containing filter props (container, object(s))
|
|
28
27
|
*/
|
|
29
|
-
var useManualRules = exports.useManualRules = function useManualRules(
|
|
28
|
+
var useManualRules = exports.useManualRules = function useManualRules(site, query) {
|
|
30
29
|
var _useState = (0, _react.useState)(false),
|
|
31
30
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
32
31
|
initialised = _useState2[0],
|
|
@@ -54,7 +53,7 @@ var useManualRules = exports.useManualRules = function useManualRules(env, site,
|
|
|
54
53
|
setInitialised(false);
|
|
55
54
|
_context.prev = 1;
|
|
56
55
|
_context.next = 4;
|
|
57
|
-
return (0, _services.searchManuallyTriggeredRules)(
|
|
56
|
+
return (0, _services.searchManuallyTriggeredRules)(site, query);
|
|
58
57
|
case 4:
|
|
59
58
|
fetchedRules = _context.sent;
|
|
60
59
|
setError(null);
|
|
@@ -98,11 +97,10 @@ var useManualRules = exports.useManualRules = function useManualRules(env, site,
|
|
|
98
97
|
* should not care about this, only how to trigger invocation and understand
|
|
99
98
|
* the invocation lifecycle.
|
|
100
99
|
*
|
|
101
|
-
* @param props -
|
|
100
|
+
* @param props - cloudId, projectId, children
|
|
102
101
|
*/
|
|
103
102
|
var ManualRulesContainer = exports.ManualRulesContainer = function ManualRulesContainer(props) {
|
|
104
|
-
var
|
|
105
|
-
site = props.site,
|
|
103
|
+
var site = props.site,
|
|
106
104
|
query = props.query,
|
|
107
105
|
children = props.children,
|
|
108
106
|
onInputsModalOpened = props.onInputsModalOpened,
|
|
@@ -112,7 +110,7 @@ var ManualRulesContainer = exports.ManualRulesContainer = function ManualRulesCo
|
|
|
112
110
|
onRuleInvocationFailure = props.onRuleInvocationFailure,
|
|
113
111
|
onRuleInvocationLifecycleDone = props.onRuleInvocationLifecycleDone;
|
|
114
112
|
// Initial data loading state
|
|
115
|
-
var _useManualRules = useManualRules(
|
|
113
|
+
var _useManualRules = useManualRules(site, query),
|
|
116
114
|
_useManualRules2 = (0, _slicedToArray2.default)(_useManualRules, 4),
|
|
117
115
|
triggerFetch = _useManualRules2[0],
|
|
118
116
|
initialised = _useManualRules2[1],
|
|
@@ -178,7 +176,7 @@ var ManualRulesContainer = exports.ManualRulesContainer = function ManualRulesCo
|
|
|
178
176
|
onRuleInvocationLifecycleStarted(ruleId, objects, userInputs);
|
|
179
177
|
}
|
|
180
178
|
_context2.next = 7;
|
|
181
|
-
return (0, _services.invokeManuallyTriggeredRule)(
|
|
179
|
+
return (0, _services.invokeManuallyTriggeredRule)(site, ruleId, objects, userInputs);
|
|
182
180
|
case 7:
|
|
183
181
|
response = _context2.sent;
|
|
184
182
|
_failedObjects = getFailedObjects(response);
|
|
@@ -13,18 +13,18 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
13
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) { (0, _defineProperty2.default)(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
14
|
/**
|
|
15
15
|
* Manual trigger rules API fetch. Fetches a list of manually triggered rules according to the context provided
|
|
16
|
-
* in
|
|
17
|
-
* @param
|
|
16
|
+
* in query.
|
|
17
|
+
* @param site - the site ARI to fetch the rules against
|
|
18
18
|
* @param query - the workspace/container/objects to fetch rules against
|
|
19
19
|
*/
|
|
20
20
|
var searchManuallyTriggeredRules = exports.searchManuallyTriggeredRules = /*#__PURE__*/function () {
|
|
21
|
-
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(
|
|
21
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(site, query) {
|
|
22
22
|
var url, response;
|
|
23
23
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
24
24
|
while (1) switch (_context.prev = _context.next) {
|
|
25
25
|
case 0:
|
|
26
26
|
_context.next = 2;
|
|
27
|
-
return (0, _utils.getSearchUrl)(
|
|
27
|
+
return (0, _utils.getSearchUrl)(site);
|
|
28
28
|
case 2:
|
|
29
29
|
url = _context.sent;
|
|
30
30
|
_context.next = 5;
|
|
@@ -33,7 +33,7 @@ var searchManuallyTriggeredRules = exports.searchManuallyTriggeredRules = /*#__P
|
|
|
33
33
|
});
|
|
34
34
|
case 5:
|
|
35
35
|
response = _context.sent;
|
|
36
|
-
return _context.abrupt("return", response.reduce(function (acc, _ref2) {
|
|
36
|
+
return _context.abrupt("return", response.data.reduce(function (acc, _ref2) {
|
|
37
37
|
var id = _ref2.id,
|
|
38
38
|
name = _ref2.name,
|
|
39
39
|
ruleScope = _ref2.ruleScope,
|
|
@@ -51,27 +51,26 @@ var searchManuallyTriggeredRules = exports.searchManuallyTriggeredRules = /*#__P
|
|
|
51
51
|
}
|
|
52
52
|
}, _callee);
|
|
53
53
|
}));
|
|
54
|
-
return function searchManuallyTriggeredRules(_x, _x2
|
|
54
|
+
return function searchManuallyTriggeredRules(_x, _x2) {
|
|
55
55
|
return _ref.apply(this, arguments);
|
|
56
56
|
};
|
|
57
57
|
}();
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
60
|
* Invoke a manually triggered rule via the API.
|
|
61
|
-
* @param env - the environment to use when invoking the rule
|
|
62
61
|
* @param cloudId - the site the rule belongs to
|
|
63
62
|
* @param ruleId - the identifier of the rule you want to invoke
|
|
64
63
|
* @param objects - the list of objects you wish to create an automation event for.
|
|
65
64
|
* @param userInputs - the optional user inputs if this manual trigger requires them
|
|
66
65
|
*/
|
|
67
66
|
var invokeManuallyTriggeredRule = exports.invokeManuallyTriggeredRule = /*#__PURE__*/function () {
|
|
68
|
-
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(
|
|
67
|
+
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(site, ruleId, objects, userInputs) {
|
|
69
68
|
var url, bodyRaw;
|
|
70
69
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
71
70
|
while (1) switch (_context2.prev = _context2.next) {
|
|
72
71
|
case 0:
|
|
73
72
|
_context2.next = 2;
|
|
74
|
-
return (0, _utils.getInvocationUrl)(
|
|
73
|
+
return (0, _utils.getInvocationUrl)(site, ruleId);
|
|
75
74
|
case 2:
|
|
76
75
|
url = _context2.sent;
|
|
77
76
|
bodyRaw = {
|
|
@@ -89,7 +88,7 @@ var invokeManuallyTriggeredRule = exports.invokeManuallyTriggeredRule = /*#__PUR
|
|
|
89
88
|
}
|
|
90
89
|
}, _callee2);
|
|
91
90
|
}));
|
|
92
|
-
return function invokeManuallyTriggeredRule(_x4, _x5, _x6
|
|
91
|
+
return function invokeManuallyTriggeredRule(_x3, _x4, _x5, _x6) {
|
|
93
92
|
return _ref3.apply(this, arguments);
|
|
94
93
|
};
|
|
95
94
|
}();
|
|
@@ -17,8 +17,7 @@ var _header = require("./sub-components/header");
|
|
|
17
17
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
18
18
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
19
19
|
var AutomationModal = exports.AutomationModal = function AutomationModal(_ref) {
|
|
20
|
-
var
|
|
21
|
-
baseAutomationUrl = _ref.baseAutomationUrl,
|
|
20
|
+
var baseAutomationUrl = _ref.baseAutomationUrl,
|
|
22
21
|
siteAri = _ref.siteAri,
|
|
23
22
|
objectAri = _ref.objectAri,
|
|
24
23
|
canManageAutomation = _ref.canManageAutomation,
|
|
@@ -44,7 +43,6 @@ var AutomationModal = exports.AutomationModal = function AutomationModal(_ref) {
|
|
|
44
43
|
}).fire();
|
|
45
44
|
}, [createAnalyticsEvent, analyticsSource]);
|
|
46
45
|
return /*#__PURE__*/_react.default.createElement(_menuContext.AutomationMenuContextContainer, {
|
|
47
|
-
environment: environment,
|
|
48
46
|
baseAutomationUrl: baseAutomationUrl,
|
|
49
47
|
objectAri: objectAri,
|
|
50
48
|
siteAri: siteAri,
|
|
@@ -33,8 +33,7 @@ var useAutomationMenu = exports.useAutomationMenu = function useAutomationMenu()
|
|
|
33
33
|
return context;
|
|
34
34
|
};
|
|
35
35
|
var AutomationMenuContextContainer = exports.AutomationMenuContextContainer = function AutomationMenuContextContainer(_ref2) {
|
|
36
|
-
var
|
|
37
|
-
baseAutomationUrl = _ref2.baseAutomationUrl,
|
|
36
|
+
var baseAutomationUrl = _ref2.baseAutomationUrl,
|
|
38
37
|
analyticsSource = _ref2.analyticsSource,
|
|
39
38
|
objectAri = _ref2.objectAri,
|
|
40
39
|
siteAri = _ref2.siteAri,
|
|
@@ -46,7 +45,6 @@ var AutomationMenuContextContainer = exports.AutomationMenuContextContainer = fu
|
|
|
46
45
|
onRuleInvocationFailure = _ref2.onRuleInvocationFailure,
|
|
47
46
|
onRuleInvocationLifecycleDone = _ref2.onRuleInvocationLifecycleDone;
|
|
48
47
|
return /*#__PURE__*/_react.default.createElement(_manualTriggersContainer.ManualRulesContainer, {
|
|
49
|
-
env: environment,
|
|
50
48
|
site: siteAri,
|
|
51
49
|
query: {
|
|
52
50
|
objects: [objectAri]
|
|
@@ -15,7 +15,6 @@ var _action = _interopRequireDefault(require("../action"));
|
|
|
15
15
|
var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
|
|
16
16
|
var _constants = require("../../../../../constants");
|
|
17
17
|
var _messages = require("../../../../../messages");
|
|
18
|
-
var _linkProvider = require("@atlaskit/link-provider");
|
|
19
18
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
20
19
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
20
|
var AutomationModal = /*#__PURE__*/(0, _react.lazy)(function () {
|
|
@@ -30,16 +29,13 @@ var handleAutomationActionClose = function handleAutomationActionClose(setIsModa
|
|
|
30
29
|
setIsModalOpen(false);
|
|
31
30
|
};
|
|
32
31
|
var AutomationAction = function AutomationAction(props) {
|
|
33
|
-
var
|
|
32
|
+
var _context$actions;
|
|
34
33
|
var _useState = (0, _react.useState)(false),
|
|
35
34
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
36
35
|
isModalOpen = _useState2[0],
|
|
37
36
|
setIsModalOpen = _useState2[1];
|
|
38
37
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
39
38
|
formatMessage = _useIntl.formatMessage;
|
|
40
|
-
var smartLinkContext = (0, _linkProvider.useSmartLinkContext)();
|
|
41
|
-
var connections = smartLinkContext.connections;
|
|
42
|
-
var environment = (_ref = connections.client.envKey) !== null && _ref !== void 0 ? _ref : 'prod';
|
|
43
39
|
var context = (0, _flexibleUiContext.useFlexibleUiContext)();
|
|
44
40
|
var automationActionData = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[_constants.ActionName.AutomationAction];
|
|
45
41
|
if (!automationActionData) {
|
|
@@ -83,7 +79,6 @@ var AutomationAction = function AutomationAction(props) {
|
|
|
83
79
|
_react.default.createElement(_react.Suspense, {
|
|
84
80
|
fallback: false
|
|
85
81
|
}, /*#__PURE__*/_react.default.createElement(AutomationModal, {
|
|
86
|
-
environment: environment,
|
|
87
82
|
baseAutomationUrl: baseAutomationUrl,
|
|
88
83
|
objectAri: objectAri,
|
|
89
84
|
siteAri: siteAri,
|
|
@@ -14,7 +14,9 @@ var UnfollowGlyph = function UnfollowGlyph(props) {
|
|
|
14
14
|
height: "16",
|
|
15
15
|
viewBox: "0 0 16 16",
|
|
16
16
|
"data-testid": props['data-testid'],
|
|
17
|
-
"aria-label": props['aria-label']
|
|
17
|
+
"aria-label": props['aria-label']
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
19
|
+
,
|
|
18
20
|
className: props.className,
|
|
19
21
|
role: "presentation",
|
|
20
22
|
xmlns: "http://www.w3.org/2000/svg"
|
|
@@ -129,7 +129,9 @@ var ActionGroup = function ActionGroup(_ref) {
|
|
|
129
129
|
return null;
|
|
130
130
|
}, [appearance, isMoreThenTwoItems, isOpen, onActionItemClick, onOpenChange, renderableActionItems, size, ui === null || ui === void 0 ? void 0 : ui.zIndex, visibleButtonsNum]);
|
|
131
131
|
return renderableActionItems.length > 0 ? (0, _react2.jsx)("div", {
|
|
132
|
-
css: styles
|
|
132
|
+
css: styles
|
|
133
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
134
|
+
,
|
|
133
135
|
className: "actions-button-group",
|
|
134
136
|
"data-action-open": isOpen
|
|
135
137
|
}, (0, _react2.jsx)(_buttonGroup.default, null, actionButtons, moreActionDropdown)) : null;
|
|
@@ -69,6 +69,7 @@ var TitleBlockErroredView = function TitleBlockErroredView(_ref) {
|
|
|
69
69
|
direction: _constants.SmartLinkDirection.Horizontal,
|
|
70
70
|
align: _constants.SmartLinkAlignment.Right
|
|
71
71
|
}, (0, _react2.jsx)("span", {
|
|
72
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
72
73
|
className: hasAction ? 'has-action' : '',
|
|
73
74
|
css: getMessageStyles(size, hasAction),
|
|
74
75
|
onClick: onClick,
|
|
@@ -40,13 +40,16 @@ var MotionWrapper = exports.MotionWrapper = function MotionWrapper(_ref) {
|
|
|
40
40
|
style: {
|
|
41
41
|
height: height,
|
|
42
42
|
minHeight: minHeight,
|
|
43
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
43
44
|
lineHeight: 0,
|
|
45
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
44
46
|
overflow: 'hidden',
|
|
45
47
|
// a fit for purpose state variable to control when the 'visible' styles should be appled
|
|
46
48
|
opacity: height > 0 ? 1 : 0,
|
|
47
49
|
// we only want to transition opacity and height when the error message is initially shown
|
|
48
50
|
// not if its to be shown on mount
|
|
49
51
|
transitionProperty: showTransition ? transition : 'none',
|
|
52
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
50
53
|
transitionDuration: '0.3s'
|
|
51
54
|
},
|
|
52
55
|
ref: ref
|
|
@@ -56,6 +56,7 @@ var LayeredLink = function LayeredLink(_ref) {
|
|
|
56
56
|
url = _ref.url;
|
|
57
57
|
var onMouseDown = (0, _useLinkClicked.useMouseDownEvent)();
|
|
58
58
|
return (0, _react2.jsx)("a", {
|
|
59
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
59
60
|
className: "layered-link",
|
|
60
61
|
css: styles,
|
|
61
62
|
"data-testid": "".concat(testId, "-layered-link"),
|
|
@@ -44,7 +44,9 @@ var Lozenge = function Lozenge(_ref) {
|
|
|
44
44
|
text: text,
|
|
45
45
|
zIndex: ui === null || ui === void 0 ? void 0 : ui.zIndex
|
|
46
46
|
}) : (0, _react2.jsx)(_lozenge.default, {
|
|
47
|
-
appearance: appearance
|
|
47
|
+
appearance: appearance
|
|
48
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
49
|
+
,
|
|
48
50
|
style: style,
|
|
49
51
|
testId: "".concat(testId, "-lozenge")
|
|
50
52
|
}, text);
|
|
@@ -55,6 +55,7 @@ var ConnectedAIPrismContainer = function ConnectedAIPrismContainer(_ref) {
|
|
|
55
55
|
setShowPrism(status === 'loading');
|
|
56
56
|
}, [status]);
|
|
57
57
|
var container = (0, _react.jsx)("div", (0, _extends2.default)({
|
|
58
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
58
59
|
className: _HoverCardContent.hoverCardClassName,
|
|
59
60
|
css: [_styled.HoverCardContainer, !isAIEnabled ? _styled.popupContainerStyles : undefined],
|
|
60
61
|
"data-testid": testId
|
|
@@ -79,6 +80,7 @@ var ContentContainer = function ContentContainer(_ref2) {
|
|
|
79
80
|
}, props), children);
|
|
80
81
|
}
|
|
81
82
|
return (0, _react.jsx)("div", (0, _extends2.default)({
|
|
83
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
82
84
|
className: _HoverCardContent.hoverCardClassName,
|
|
83
85
|
css: _styled.HoverCardContainer,
|
|
84
86
|
"data-testid": testId
|
|
@@ -51,7 +51,9 @@ var Frame = exports.Frame = /*#__PURE__*/(0, _react.forwardRef)(function (props,
|
|
|
51
51
|
onClick: handleClick,
|
|
52
52
|
onMouseDown: handleMouseDown,
|
|
53
53
|
onKeyPress: handleKeyPress,
|
|
54
|
-
"data-testid": testId
|
|
54
|
+
"data-testid": testId
|
|
55
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
56
|
+
,
|
|
55
57
|
className: className,
|
|
56
58
|
ref: ref,
|
|
57
59
|
isHovered: isHovered
|
|
@@ -48,7 +48,9 @@ var Shimmer = exports.Shimmer = function Shimmer(_ref) {
|
|
|
48
48
|
width: 14,
|
|
49
49
|
height: 14,
|
|
50
50
|
borderRadius: 2,
|
|
51
|
-
testId: testId
|
|
51
|
+
testId: testId
|
|
52
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
53
|
+
,
|
|
52
54
|
style: skeletonCustomStyles
|
|
53
55
|
});
|
|
54
56
|
};
|
|
@@ -74,7 +74,9 @@ var IconAndTitleLayout = exports.IconAndTitleLayout = /*#__PURE__*/function (_Re
|
|
|
74
74
|
}
|
|
75
75
|
return /*#__PURE__*/_react.default.createElement(_reactRenderImage.default, {
|
|
76
76
|
src: url,
|
|
77
|
-
loaded: /*#__PURE__*/_react.default.createElement(_Icon.Icon
|
|
77
|
+
loaded: /*#__PURE__*/_react.default.createElement(_Icon.Icon
|
|
78
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
79
|
+
, {
|
|
78
80
|
className: "smart-link-icon",
|
|
79
81
|
src: url,
|
|
80
82
|
"data-testid": "".concat(testId, "-image")
|
|
@@ -125,22 +127,30 @@ var IconAndTitleLayout = exports.IconAndTitleLayout = /*#__PURE__*/function (_Re
|
|
|
125
127
|
rightSide = _this$props2.rightSide,
|
|
126
128
|
_this$props2$testId = _this$props2.testId,
|
|
127
129
|
testId = _this$props2$testId === void 0 ? 'inline-card-icon-and-title' : _this$props2$testId;
|
|
128
|
-
var titlePart = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styled.IconPositionWrapper, null, children || /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styled.IconEmptyWrapper, null), this.renderIcon(testId))), /*#__PURE__*/_react.default.createElement(_styled.TitleWrapper
|
|
130
|
+
var titlePart = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styled.IconPositionWrapper, null, children || /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styled.IconEmptyWrapper, null), this.renderIcon(testId))), /*#__PURE__*/_react.default.createElement(_styled.TitleWrapper
|
|
131
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
132
|
+
, {
|
|
129
133
|
style: {
|
|
130
134
|
color: titleTextColor
|
|
131
|
-
}
|
|
135
|
+
}
|
|
136
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
137
|
+
,
|
|
132
138
|
className: _styled.TitleWrapperClassName
|
|
133
139
|
}, title));
|
|
134
|
-
return
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
140
|
+
return (
|
|
141
|
+
/*#__PURE__*/
|
|
142
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
143
|
+
_react.default.createElement(_styled.IconTitleWrapper, {
|
|
144
|
+
style: {
|
|
145
|
+
color: titleColor
|
|
146
|
+
},
|
|
147
|
+
"data-testid": testId
|
|
148
|
+
}, link ? /*#__PURE__*/_react.default.createElement(_styled2.LinkAppearance, {
|
|
149
|
+
href: link,
|
|
150
|
+
onClick: this.handleClick,
|
|
151
|
+
onKeyPress: this.handleKeyPress
|
|
152
|
+
}, titlePart) : titlePart, rightSide ? /*#__PURE__*/_react.default.createElement(_styled2.NoLinkAppearance, null, rightSide) : null)
|
|
153
|
+
);
|
|
144
154
|
}
|
|
145
155
|
}]);
|
|
146
156
|
return IconAndTitleLayout;
|
|
@@ -35,7 +35,9 @@ var InlineCardResolvedView = exports.InlineCardResolvedView = /*#__PURE__*/funct
|
|
|
35
35
|
var appearance = lozenge.appearance || 'default';
|
|
36
36
|
return /*#__PURE__*/_react.default.createElement(_styled.LozengeWrapper, null, /*#__PURE__*/_react.default.createElement(_lozenge.default, {
|
|
37
37
|
testId: "inline-card-resolved-view-lozenge",
|
|
38
|
-
appearance: appearance
|
|
38
|
+
appearance: appearance
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
40
|
+
,
|
|
39
41
|
style: lozenge.style,
|
|
40
42
|
isBold: lozenge.isBold
|
|
41
43
|
}, lozenge.text));
|
|
@@ -17,7 +17,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
|
|
|
17
17
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
18
18
|
var PACKAGE_DATA = {
|
|
19
19
|
packageName: "@atlaskit/smart-card",
|
|
20
|
-
packageVersion: "27.
|
|
20
|
+
packageVersion: "27.2.0",
|
|
21
21
|
componentName: 'linkUrl'
|
|
22
22
|
};
|
|
23
23
|
var Link = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -6,22 +6,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _react =
|
|
9
|
+
var _react = require("@emotion/react");
|
|
10
10
|
var _reactIntlNext = require("react-intl-next");
|
|
11
11
|
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
12
12
|
var _modalDialog = _interopRequireWildcard(require("@atlaskit/modal-dialog"));
|
|
13
13
|
var _messages = require("../../../messages");
|
|
14
14
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
15
15
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
|
-
|
|
16
|
+
/** @jsx jsx */
|
|
17
|
+
|
|
18
|
+
var RelatedLinksBaseModal = function RelatedLinksBaseModal(_ref) {
|
|
17
19
|
var onClose = _ref.onClose,
|
|
18
20
|
showModal = _ref.showModal,
|
|
19
21
|
children = _ref.children;
|
|
20
|
-
return
|
|
21
|
-
onClose: onClose
|
|
22
|
-
|
|
22
|
+
return (0, _react.jsx)(_modalDialog.ModalTransition, null, showModal && (0, _react.jsx)(_modalDialog.default, {
|
|
23
|
+
onClose: onClose,
|
|
24
|
+
width: "small"
|
|
25
|
+
}, (0, _react.jsx)(_modalDialog.ModalHeader, null, (0, _react.jsx)(_modalDialog.ModalTitle, null, (0, _react.jsx)(_reactIntlNext.FormattedMessage, _messages.messages.related_links_modal_title))), (0, _react.jsx)(_modalDialog.ModalBody, null, children), (0, _react.jsx)(_modalDialog.ModalFooter, null, (0, _react.jsx)(_new.default, {
|
|
23
26
|
appearance: "primary",
|
|
24
27
|
onClick: onClose
|
|
25
|
-
},
|
|
28
|
+
}, (0, _react.jsx)(_reactIntlNext.FormattedMessage, _messages.messages.close)))));
|
|
26
29
|
};
|
|
27
|
-
var _default = exports.default =
|
|
30
|
+
var _default = exports.default = RelatedLinksBaseModal;
|