@atlaskit/smart-card 45.19.5 → 45.19.6
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 +11 -0
- package/dist/cjs/state/hooks/use-resolve/index.js +7 -4
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-error/index.compiled.css +1 -0
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-error/index.js +1 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/state/hooks/use-resolve/index.js +6 -3
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-error/index.compiled.css +1 -0
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-error/index.js +1 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/state/hooks/use-resolve/index.js +7 -4
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-error/index.compiled.css +1 -0
- package/dist/esm/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-error/index.js +1 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 45.19.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`bcfe498b206d5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bcfe498b206d5) -
|
|
8
|
+
Adopt button and list-item motion tokens behind the use-pressable-motion rollout.
|
|
9
|
+
- [`fcd19110d28f7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fcd19110d28f7) -
|
|
10
|
+
Ensure block Smart Links bypass optimized inline cache responses when
|
|
11
|
+
platform_smartlink_inline_resolve_optimization is enabled.
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 45.19.5
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -28,24 +28,27 @@ var useResolve = function useResolve() {
|
|
|
28
28
|
handleResolvedLinkError = _useResponse.handleResolvedLinkError;
|
|
29
29
|
return (0, _react.useCallback)( /*#__PURE__*/function () {
|
|
30
30
|
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(params) {
|
|
31
|
-
var url, _params$isReloading, isReloading, _params$isMetadataReq, isMetadataRequest, _params$id, id, appearance, _ref2, details, hasData, shouldForceFetch, metadataStatus;
|
|
31
|
+
var url, _params$isReloading, isReloading, _params$isMetadataReq, isMetadataRequest, _params$id, id, appearance, isOptimizedBlockRequest, _ref2, details, hasData, shouldForceFetch, metadataStatus;
|
|
32
32
|
return _regenerator.default.wrap(function (_context) {
|
|
33
33
|
while (1) switch (_context.prev = _context.next) {
|
|
34
34
|
case 0:
|
|
35
35
|
url = params.url, _params$isReloading = params.isReloading, isReloading = _params$isReloading === void 0 ? false : _params$isReloading, _params$isMetadataReq = params.isMetadataRequest, isMetadataRequest = _params$isMetadataReq === void 0 ? false : _params$isMetadataReq, _params$id = params.id, id = _params$id === void 0 ? '' : _params$id, appearance = params.appearance;
|
|
36
|
+
isOptimizedBlockRequest = appearance === 'block' && (0, _fg.fg)('platform_smartlink_inline_resolve_optimization');
|
|
36
37
|
_ref2 = getState()[url] || {
|
|
37
38
|
status: _constants.SmartLinkStatus.Pending,
|
|
38
39
|
details: undefined
|
|
39
40
|
}, details = _ref2.details;
|
|
40
41
|
hasData = !!(details && details.data || (0, _isEntityPresent.isEntityPresent)(details));
|
|
41
|
-
if (!(isReloading || !hasData || isMetadataRequest)) {
|
|
42
|
+
if (!(isReloading || !hasData || isMetadataRequest || isOptimizedBlockRequest)) {
|
|
42
43
|
_context.next = 1;
|
|
43
44
|
break;
|
|
44
45
|
}
|
|
45
|
-
|
|
46
|
+
// A reduced inline response can populate the shared resolver cache before an initial
|
|
47
|
+
// block request completes, so every optimized block request must bypass that cache.
|
|
48
|
+
shouldForceFetch = isReloading || isOptimizedBlockRequest;
|
|
46
49
|
metadataStatus = appearance === 'inline' && !isMetadataRequest && (0, _fg.fg)('platform_smartlink_inline_resolve_optimization') ? 'pending' : undefined;
|
|
47
50
|
return _context.abrupt("return", connections.client.fetchData(url, shouldForceFetch, appearance).then(function (response) {
|
|
48
|
-
return handleResolvedLinkResponse(url, response,
|
|
51
|
+
return handleResolvedLinkResponse(url, response, shouldForceFetch, isMetadataRequest, metadataStatus);
|
|
49
52
|
}).catch(function (error) {
|
|
50
53
|
return handleResolvedLinkError(url, error, undefined, isMetadataRequest);
|
|
51
54
|
}));
|
|
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
11
11
|
var context = exports.context = {
|
|
12
12
|
componentName: 'smart-cards',
|
|
13
13
|
packageName: "@atlaskit/smart-card" || '',
|
|
14
|
-
packageVersion: "45.19.
|
|
14
|
+
packageVersion: "45.19.5" || ''
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
._11c81d4k{font:var(--ds-font-body-large,normal 400 1pc/24px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
3
3
|
._11c8fhey{font:var(--ds-font-body,normal 400 14px/20px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
4
4
|
._pqmefhey >div{font:var(--ds-font-body,normal 400 14px/20px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
5
|
+
._v564k6bl{transition:var(--ds-button-hovered,background-color border-color .15s cubic-bezier(.4,1,.6,1))}
|
|
5
6
|
._zulpu2gc{gap:var(--ds-space-100,8px)}
|
|
6
7
|
._14hp1wdt button{width:220px}
|
|
7
8
|
._18m915vq{overflow-y:hidden}
|
|
@@ -28,7 +28,7 @@ var styles = {
|
|
|
28
28
|
linkStyles: "_zulpu2gc _1reo15vq _18m915vq _11c8fhey _1e0c1txw _1ul9idpf _2lx2vrvc _4cvr1h6o _80omtlke _19pku2gc _18u0xy5q _otyrv77o",
|
|
29
29
|
textStylesBase: "_11c81d4k _1reo15vq _18m915vq _o5724jg8 _1e0ccj1k _1bto1l2s _1nmz1hna _sudp1e54",
|
|
30
30
|
dropdownItemGroupStyles: "_14hp1wdt _6pup1kw7 _1eo073ad",
|
|
31
|
-
openIssueInJiraStyles: "_11c8fhey _bfhk1j28 _1bah1e5h _1e0c1kw7 _syaz13af _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _9oik1r31 _1bnx8stv _jf4cnqa1 _30l312zz"
|
|
31
|
+
openIssueInJiraStyles: "_11c8fhey _v564k6bl _bfhk1j28 _1bah1e5h _1e0c1kw7 _syaz13af _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _9oik1r31 _1bnx8stv _jf4cnqa1 _30l312zz"
|
|
32
32
|
};
|
|
33
33
|
var LozengeActionError = function LozengeActionError(_ref) {
|
|
34
34
|
var errorMessage = _ref.errorMessage,
|
|
@@ -19,7 +19,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
19
19
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
20
20
|
var PACKAGE_DATA = {
|
|
21
21
|
packageName: "@atlaskit/smart-card",
|
|
22
|
-
packageVersion: "45.19.
|
|
22
|
+
packageVersion: "45.19.5",
|
|
23
23
|
componentName: 'linkUrl'
|
|
24
24
|
};
|
|
25
25
|
var LinkUrl = function LinkUrl(_ref) {
|
|
@@ -29,6 +29,7 @@ const useResolve = () => {
|
|
|
29
29
|
id = '',
|
|
30
30
|
appearance
|
|
31
31
|
} = params;
|
|
32
|
+
const isOptimizedBlockRequest = appearance === 'block' && fg('platform_smartlink_inline_resolve_optimization');
|
|
32
33
|
const {
|
|
33
34
|
details
|
|
34
35
|
} = getState()[url] || {
|
|
@@ -36,10 +37,12 @@ const useResolve = () => {
|
|
|
36
37
|
details: undefined
|
|
37
38
|
};
|
|
38
39
|
const hasData = !!(details && details.data || isEntityPresent(details));
|
|
39
|
-
if (isReloading || !hasData || isMetadataRequest) {
|
|
40
|
-
|
|
40
|
+
if (isReloading || !hasData || isMetadataRequest || isOptimizedBlockRequest) {
|
|
41
|
+
// A reduced inline response can populate the shared resolver cache before an initial
|
|
42
|
+
// block request completes, so every optimized block request must bypass that cache.
|
|
43
|
+
const shouldForceFetch = isReloading || isOptimizedBlockRequest;
|
|
41
44
|
const metadataStatus = appearance === 'inline' && !isMetadataRequest && fg('platform_smartlink_inline_resolve_optimization') ? 'pending' : undefined;
|
|
42
|
-
return connections.client.fetchData(url, shouldForceFetch, appearance).then(response => handleResolvedLinkResponse(url, response,
|
|
45
|
+
return connections.client.fetchData(url, shouldForceFetch, appearance).then(response => handleResolvedLinkResponse(url, response, shouldForceFetch, isMetadataRequest, metadataStatus)).catch(error => handleResolvedLinkError(url, error, undefined, isMetadataRequest));
|
|
43
46
|
} else {
|
|
44
47
|
addMetadataToExperience('smart-link-rendered', id, {
|
|
45
48
|
cached: true
|
|
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
2
2
|
export const context = {
|
|
3
3
|
componentName: 'smart-cards',
|
|
4
4
|
packageName: "@atlaskit/smart-card" || '',
|
|
5
|
-
packageVersion: "45.19.
|
|
5
|
+
packageVersion: "45.19.5" || ''
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
._11c81d4k{font:var(--ds-font-body-large,normal 400 1pc/24px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
3
3
|
._11c8fhey{font:var(--ds-font-body,normal 400 14px/20px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
4
4
|
._pqmefhey >div{font:var(--ds-font-body,normal 400 14px/20px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
5
|
+
._v564k6bl{transition:var(--ds-button-hovered,background-color border-color .15s cubic-bezier(.4,1,.6,1))}
|
|
5
6
|
._zulpu2gc{gap:var(--ds-space-100,8px)}
|
|
6
7
|
._14hp1wdt button{width:220px}
|
|
7
8
|
._18m915vq{overflow-y:hidden}
|
|
@@ -19,7 +19,7 @@ const styles = {
|
|
|
19
19
|
linkStyles: "_zulpu2gc _1reo15vq _18m915vq _11c8fhey _1e0c1txw _1ul9idpf _2lx2vrvc _4cvr1h6o _80omtlke _19pku2gc _18u0xy5q _otyrv77o",
|
|
20
20
|
textStylesBase: "_11c81d4k _1reo15vq _18m915vq _o5724jg8 _1e0ccj1k _1bto1l2s _1nmz1hna _sudp1e54",
|
|
21
21
|
dropdownItemGroupStyles: "_14hp1wdt _6pup1kw7 _1eo073ad",
|
|
22
|
-
openIssueInJiraStyles: "_11c8fhey _bfhk1j28 _1bah1e5h _1e0c1kw7 _syaz13af _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _9oik1r31 _1bnx8stv _jf4cnqa1 _30l312zz"
|
|
22
|
+
openIssueInJiraStyles: "_11c8fhey _v564k6bl _bfhk1j28 _1bah1e5h _1e0c1kw7 _syaz13af _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _9oik1r31 _1bnx8stv _jf4cnqa1 _30l312zz"
|
|
23
23
|
};
|
|
24
24
|
const LozengeActionError = ({
|
|
25
25
|
errorMessage,
|
|
@@ -9,7 +9,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
9
9
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
10
10
|
const PACKAGE_DATA = {
|
|
11
11
|
packageName: "@atlaskit/smart-card",
|
|
12
|
-
packageVersion: "45.19.
|
|
12
|
+
packageVersion: "45.19.5",
|
|
13
13
|
componentName: 'linkUrl'
|
|
14
14
|
};
|
|
15
15
|
const LinkUrl = ({
|
|
@@ -21,24 +21,27 @@ var useResolve = function useResolve() {
|
|
|
21
21
|
handleResolvedLinkError = _useResponse.handleResolvedLinkError;
|
|
22
22
|
return useCallback( /*#__PURE__*/function () {
|
|
23
23
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(params) {
|
|
24
|
-
var url, _params$isReloading, isReloading, _params$isMetadataReq, isMetadataRequest, _params$id, id, appearance, _ref2, details, hasData, shouldForceFetch, metadataStatus;
|
|
24
|
+
var url, _params$isReloading, isReloading, _params$isMetadataReq, isMetadataRequest, _params$id, id, appearance, isOptimizedBlockRequest, _ref2, details, hasData, shouldForceFetch, metadataStatus;
|
|
25
25
|
return _regeneratorRuntime.wrap(function (_context) {
|
|
26
26
|
while (1) switch (_context.prev = _context.next) {
|
|
27
27
|
case 0:
|
|
28
28
|
url = params.url, _params$isReloading = params.isReloading, isReloading = _params$isReloading === void 0 ? false : _params$isReloading, _params$isMetadataReq = params.isMetadataRequest, isMetadataRequest = _params$isMetadataReq === void 0 ? false : _params$isMetadataReq, _params$id = params.id, id = _params$id === void 0 ? '' : _params$id, appearance = params.appearance;
|
|
29
|
+
isOptimizedBlockRequest = appearance === 'block' && fg('platform_smartlink_inline_resolve_optimization');
|
|
29
30
|
_ref2 = getState()[url] || {
|
|
30
31
|
status: SmartLinkStatus.Pending,
|
|
31
32
|
details: undefined
|
|
32
33
|
}, details = _ref2.details;
|
|
33
34
|
hasData = !!(details && details.data || isEntityPresent(details));
|
|
34
|
-
if (!(isReloading || !hasData || isMetadataRequest)) {
|
|
35
|
+
if (!(isReloading || !hasData || isMetadataRequest || isOptimizedBlockRequest)) {
|
|
35
36
|
_context.next = 1;
|
|
36
37
|
break;
|
|
37
38
|
}
|
|
38
|
-
|
|
39
|
+
// A reduced inline response can populate the shared resolver cache before an initial
|
|
40
|
+
// block request completes, so every optimized block request must bypass that cache.
|
|
41
|
+
shouldForceFetch = isReloading || isOptimizedBlockRequest;
|
|
39
42
|
metadataStatus = appearance === 'inline' && !isMetadataRequest && fg('platform_smartlink_inline_resolve_optimization') ? 'pending' : undefined;
|
|
40
43
|
return _context.abrupt("return", connections.client.fetchData(url, shouldForceFetch, appearance).then(function (response) {
|
|
41
|
-
return handleResolvedLinkResponse(url, response,
|
|
44
|
+
return handleResolvedLinkResponse(url, response, shouldForceFetch, isMetadataRequest, metadataStatus);
|
|
42
45
|
}).catch(function (error) {
|
|
43
46
|
return handleResolvedLinkError(url, error, undefined, isMetadataRequest);
|
|
44
47
|
}));
|
|
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export var context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card" || '',
|
|
7
|
-
packageVersion: "45.19.
|
|
7
|
+
packageVersion: "45.19.5" || ''
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
._11c81d4k{font:var(--ds-font-body-large,normal 400 1pc/24px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
3
3
|
._11c8fhey{font:var(--ds-font-body,normal 400 14px/20px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
4
4
|
._pqmefhey >div{font:var(--ds-font-body,normal 400 14px/20px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
5
|
+
._v564k6bl{transition:var(--ds-button-hovered,background-color border-color .15s cubic-bezier(.4,1,.6,1))}
|
|
5
6
|
._zulpu2gc{gap:var(--ds-space-100,8px)}
|
|
6
7
|
._14hp1wdt button{width:220px}
|
|
7
8
|
._18m915vq{overflow-y:hidden}
|
|
@@ -19,7 +19,7 @@ var styles = {
|
|
|
19
19
|
linkStyles: "_zulpu2gc _1reo15vq _18m915vq _11c8fhey _1e0c1txw _1ul9idpf _2lx2vrvc _4cvr1h6o _80omtlke _19pku2gc _18u0xy5q _otyrv77o",
|
|
20
20
|
textStylesBase: "_11c81d4k _1reo15vq _18m915vq _o5724jg8 _1e0ccj1k _1bto1l2s _1nmz1hna _sudp1e54",
|
|
21
21
|
dropdownItemGroupStyles: "_14hp1wdt _6pup1kw7 _1eo073ad",
|
|
22
|
-
openIssueInJiraStyles: "_11c8fhey _bfhk1j28 _1bah1e5h _1e0c1kw7 _syaz13af _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _9oik1r31 _1bnx8stv _jf4cnqa1 _30l312zz"
|
|
22
|
+
openIssueInJiraStyles: "_11c8fhey _v564k6bl _bfhk1j28 _1bah1e5h _1e0c1kw7 _syaz13af _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _9oik1r31 _1bnx8stv _jf4cnqa1 _30l312zz"
|
|
23
23
|
};
|
|
24
24
|
var LozengeActionError = function LozengeActionError(_ref) {
|
|
25
25
|
var errorMessage = _ref.errorMessage,
|
|
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
12
12
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
13
13
|
var PACKAGE_DATA = {
|
|
14
14
|
packageName: "@atlaskit/smart-card",
|
|
15
|
-
packageVersion: "45.19.
|
|
15
|
+
packageVersion: "45.19.5",
|
|
16
16
|
componentName: 'linkUrl'
|
|
17
17
|
};
|
|
18
18
|
var LinkUrl = function LinkUrl(_ref) {
|