@atlaskit/smart-card 19.0.0 → 19.0.3
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 +18 -0
- package/dist/cjs/constants.js +4 -4
- package/dist/cjs/messages.js +16 -6
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +6 -2
- package/dist/cjs/view/CardWithUrl/component-lazy/LazyLazilyRenderCard.js +15 -2
- package/dist/cjs/view/CardWithUrl/loader.js +5 -7
- package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/block/index.js +3 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/index.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/metadata-block/index.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/index.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/snippet-block/index.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.js +2 -1
- package/dist/cjs/view/FlexibleCard/components/container/index.js +19 -6
- package/dist/cjs/view/FlexibleCard/components/container/layered-link/index.js +5 -0
- package/dist/cjs/view/FlexibleCard/components/elements/avatar-group/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/elements/date-time/index.js +34 -12
- package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/elements/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/elements/link/index.js +3 -3
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/elements/media/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/elements/text/index.js +2 -2
- package/dist/es2019/constants.js +4 -4
- package/dist/es2019/messages.js +16 -6
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +6 -3
- package/dist/es2019/view/CardWithUrl/component-lazy/LazyLazilyRenderCard.js +8 -2
- package/dist/es2019/view/CardWithUrl/loader.js +5 -7
- package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/block/index.js +3 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/metadata-block/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/snippet-block/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/index.js +2 -1
- package/dist/es2019/view/FlexibleCard/components/container/index.js +19 -6
- package/dist/es2019/view/FlexibleCard/components/container/layered-link/index.js +5 -0
- package/dist/es2019/view/FlexibleCard/components/elements/avatar-group/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/elements/badge/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/elements/date-time/index.js +35 -13
- package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/elements/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/elements/link/index.js +3 -3
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/elements/media/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/elements/text/index.js +2 -2
- package/dist/esm/constants.js +4 -4
- package/dist/esm/messages.js +16 -6
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +6 -3
- package/dist/esm/view/CardWithUrl/component-lazy/LazyLazilyRenderCard.js +8 -2
- package/dist/esm/view/CardWithUrl/loader.js +5 -7
- package/dist/esm/view/FlexibleCard/components/actions/action/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/block/index.js +3 -2
- package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/footer-block/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/metadata-block/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/snippet-block/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/index.js +2 -1
- package/dist/esm/view/FlexibleCard/components/container/index.js +19 -6
- package/dist/esm/view/FlexibleCard/components/container/layered-link/index.js +5 -0
- package/dist/esm/view/FlexibleCard/components/elements/avatar-group/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/elements/badge/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/elements/date-time/index.js +34 -12
- package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/elements/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/elements/link/index.js +3 -3
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/elements/media/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/elements/text/index.js +2 -2
- package/dist/types/constants.d.ts +4 -4
- package/dist/types/messages.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/action/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/actions/action/types.d.ts +43 -0
- package/dist/types/view/FlexibleCard/components/blocks/action-group/index.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/blocks/action-group/types.d.ts +25 -0
- package/dist/types/view/FlexibleCard/components/blocks/block/index.d.ts +3 -2
- package/dist/types/view/FlexibleCard/components/blocks/element-group/index.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/blocks/footer-block/index.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/blocks/footer-block/types.d.ts +8 -2
- package/dist/types/view/FlexibleCard/components/blocks/metadata-block/index.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/blocks/metadata-block/types.d.ts +22 -2
- package/dist/types/view/FlexibleCard/components/blocks/preview-block/index.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/blocks/snippet-block/index.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/blocks/snippet-block/types.d.ts +6 -2
- package/dist/types/view/FlexibleCard/components/blocks/title-block/index.d.ts +2 -1
- package/dist/types/view/FlexibleCard/components/blocks/title-block/types.d.ts +63 -13
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +68 -2
- package/dist/types/view/FlexibleCard/components/common/loading-skeleton/types.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/container/index.d.ts +5 -1
- package/dist/types/view/FlexibleCard/components/container/layered-link/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/container/types.d.ts +20 -10
- package/dist/types/view/FlexibleCard/components/elements/avatar-group/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/elements/avatar-group/types.d.ts +12 -0
- package/dist/types/view/FlexibleCard/components/elements/badge/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/elements/badge/types.d.ts +10 -0
- package/dist/types/view/FlexibleCard/components/elements/date-time/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/elements/date-time/types.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/icon/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/elements/icon/types.d.ts +16 -3
- package/dist/types/view/FlexibleCard/components/elements/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/elements/link/index.d.ts +3 -3
- package/dist/types/view/FlexibleCard/components/elements/link/types.d.ts +21 -1
- package/dist/types/view/FlexibleCard/components/elements/lozenge/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/elements/lozenge/types.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/media/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/elements/media/types.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/text/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/elements/text/types.d.ts +10 -0
- package/dist/types/view/FlexibleCard/components/elements/types.d.ts +11 -0
- package/dist/types/view/FlexibleCard/components/types.d.ts +1 -0
- package/dist/types/view/FlexibleCard/types.d.ts +71 -1
- package/dist/types/view/__mocks__/intersection-observer.d.ts +3 -0
- package/docs-helpers/flexible-ui-action-item.tsx +6 -0
- package/docs-helpers/flexible-ui-actions-prop.tsx +6 -0
- package/docs-helpers/flexible-ui-element-item.tsx +6 -0
- package/docs-helpers/flexible-ui-prop.tsx +6 -0
- package/docs-helpers/flexible-ui.tsx +28 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 19.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`cae40e59c49`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cae40e59c49) - Show relative date for dates less then 7 days away (flexible ui)
|
|
8
|
+
|
|
9
|
+
## 19.0.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`f3026520fc6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f3026520fc6) - Fix long tti times for UFO smart-link-rendered experience
|
|
14
|
+
|
|
15
|
+
## 19.0.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`49f905e71e5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/49f905e71e5) - Flexible UI: Add API document and update prop types.
|
|
20
|
+
|
|
3
21
|
## 19.0.0
|
|
4
22
|
|
|
5
23
|
### Major Changes
|
package/dist/cjs/constants.js
CHANGED
|
@@ -132,9 +132,6 @@ exports.ElementName = ElementName;
|
|
|
132
132
|
ElementName["AuthorGroup"] = "AuthorGroup";
|
|
133
133
|
ElementName["CollaboratorGroup"] = "CollaboratorGroup";
|
|
134
134
|
ElementName["CommentCount"] = "CommentCount";
|
|
135
|
-
ElementName["ViewCount"] = "ViewCount";
|
|
136
|
-
ElementName["ReactCount"] = "ReactCount";
|
|
137
|
-
ElementName["VoteCount"] = "VoteCount";
|
|
138
135
|
ElementName["CreatedBy"] = "CreatedBy";
|
|
139
136
|
ElementName["CreatedOn"] = "CreatedOn";
|
|
140
137
|
ElementName["LinkIcon"] = "LinkIcon";
|
|
@@ -143,11 +140,14 @@ exports.ElementName = ElementName;
|
|
|
143
140
|
ElementName["Preview"] = "Preview";
|
|
144
141
|
ElementName["Priority"] = "Priority";
|
|
145
142
|
ElementName["ProgrammingLanguage"] = "ProgrammingLanguage";
|
|
143
|
+
ElementName["Provider"] = "Provider";
|
|
144
|
+
ElementName["ReactCount"] = "ReactCount";
|
|
146
145
|
ElementName["Snippet"] = "Snippet";
|
|
147
146
|
ElementName["State"] = "State";
|
|
148
147
|
ElementName["SubscriberCount"] = "SubscriberCount";
|
|
149
148
|
ElementName["Title"] = "Title";
|
|
150
|
-
ElementName["
|
|
149
|
+
ElementName["ViewCount"] = "ViewCount";
|
|
150
|
+
ElementName["VoteCount"] = "VoteCount";
|
|
151
151
|
})(ElementName || (exports.ElementName = ElementName = {}));
|
|
152
152
|
|
|
153
153
|
var ActionName;
|
package/dist/cjs/messages.js
CHANGED
|
@@ -33,10 +33,15 @@ var messages = (0, _reactIntlNext.defineMessages)({
|
|
|
33
33
|
defaultMessage: 'Created by {context}',
|
|
34
34
|
description: 'Indicates the person or entity that created the resource.'
|
|
35
35
|
},
|
|
36
|
-
|
|
37
|
-
id: 'fabric.linking.
|
|
36
|
+
created_on_relative: {
|
|
37
|
+
id: 'fabric.linking.create_on_relative',
|
|
38
38
|
defaultMessage: 'Created {context}',
|
|
39
|
-
description: 'Indicated when entity was created'
|
|
39
|
+
description: 'Indicated when entity was created (relative form)'
|
|
40
|
+
},
|
|
41
|
+
created_on_absolute: {
|
|
42
|
+
id: 'fabric.linking.create_on_absolute',
|
|
43
|
+
defaultMessage: 'Created on {context}',
|
|
44
|
+
description: 'Indicated when entity was created (absolute form)'
|
|
40
45
|
},
|
|
41
46
|
delete: {
|
|
42
47
|
id: 'fabric.linking.delete',
|
|
@@ -53,10 +58,15 @@ var messages = (0, _reactIntlNext.defineMessages)({
|
|
|
53
58
|
defaultMessage: 'Modified by {context}',
|
|
54
59
|
description: 'Indicates the person or entity that modified the resource.'
|
|
55
60
|
},
|
|
56
|
-
|
|
57
|
-
id: 'fabric.linking.
|
|
61
|
+
modified_on_relative: {
|
|
62
|
+
id: 'fabric.linking.modified_on_relative',
|
|
58
63
|
defaultMessage: 'Updated {context}',
|
|
59
|
-
description: 'Indicated when entity was modified'
|
|
64
|
+
description: 'Indicated when entity was modified (relative form)'
|
|
65
|
+
},
|
|
66
|
+
modified_on_absolute: {
|
|
67
|
+
id: 'fabric.linking.modified_on_absolute',
|
|
68
|
+
defaultMessage: 'Updated on {context}',
|
|
69
|
+
description: 'Indicated when entity was modified (absolute form)'
|
|
60
70
|
},
|
|
61
71
|
priority_blocker: {
|
|
62
72
|
id: 'fabric.linking.priority_blocker',
|
package/dist/cjs/version.json
CHANGED
|
@@ -21,6 +21,8 @@ var _component = require("../component");
|
|
|
21
21
|
|
|
22
22
|
var _LazyFallback = require("./LazyFallback");
|
|
23
23
|
|
|
24
|
+
var _ufoExperiences = require("../../../state/analytics/ufoExperiences");
|
|
25
|
+
|
|
24
26
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
27
|
|
|
26
28
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -39,7 +41,8 @@ function LazyIntersectionObserverCard(props) {
|
|
|
39
41
|
|
|
40
42
|
var showActions = props.showActions,
|
|
41
43
|
appearance = props.appearance,
|
|
42
|
-
url = props.url
|
|
44
|
+
url = props.url,
|
|
45
|
+
id = props.id;
|
|
43
46
|
var prefetch = (0, _state.usePrefetch)(url);
|
|
44
47
|
var Component = appearance === 'inline' ? 'span' : 'div';
|
|
45
48
|
var ComponentObserver = Component;
|
|
@@ -49,12 +52,13 @@ function LazyIntersectionObserverCard(props) {
|
|
|
49
52
|
});
|
|
50
53
|
|
|
51
54
|
if (isVisible) {
|
|
55
|
+
(0, _ufoExperiences.startUfoExperience)('smart-link-rendered', id);
|
|
52
56
|
setIsIntersecting(true);
|
|
53
57
|
observer.disconnect();
|
|
54
58
|
} else {
|
|
55
59
|
prefetch();
|
|
56
60
|
}
|
|
57
|
-
}, [prefetch]);
|
|
61
|
+
}, [prefetch, id]);
|
|
58
62
|
var onRef = (0, _react.useCallback)(function (element) {
|
|
59
63
|
if (!element) {
|
|
60
64
|
return;
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
5
7
|
Object.defineProperty(exports, "__esModule", {
|
|
6
8
|
value: true
|
|
7
9
|
});
|
|
@@ -9,7 +11,7 @@ exports.LazyLazilyRenderCard = LazyLazilyRenderCard;
|
|
|
9
11
|
|
|
10
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
13
|
|
|
12
|
-
var _react =
|
|
14
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
13
15
|
|
|
14
16
|
var _reactLazilyRender = _interopRequireDefault(require("react-lazily-render"));
|
|
15
17
|
|
|
@@ -17,11 +19,22 @@ var _component = require("../component");
|
|
|
17
19
|
|
|
18
20
|
var _LazyFallback = require("./LazyFallback");
|
|
19
21
|
|
|
22
|
+
var _ufoExperiences = require("../../../state/analytics/ufoExperiences");
|
|
23
|
+
|
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
+
|
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
+
|
|
20
28
|
function LazyLazilyRenderCard(props) {
|
|
21
29
|
var appearance = props.appearance,
|
|
22
30
|
container = props.container,
|
|
23
|
-
showActions = props.showActions
|
|
31
|
+
showActions = props.showActions,
|
|
32
|
+
id = props.id;
|
|
24
33
|
var offset = Math.ceil(window.innerHeight / 4);
|
|
34
|
+
(0, _react.useState)(function () {
|
|
35
|
+
// Start of experience when intersectionObserver is not supported.
|
|
36
|
+
(0, _ufoExperiences.startUfoExperience)('smart-link-rendered', id);
|
|
37
|
+
});
|
|
25
38
|
return /*#__PURE__*/_react.default.createElement(_reactLazilyRender.default, {
|
|
26
39
|
offset: offset,
|
|
27
40
|
component: appearance === 'inline' ? 'span' : 'div',
|
|
@@ -40,13 +40,8 @@ function CardWithURLRenderer(props) {
|
|
|
40
40
|
return (0, _uuid.default)();
|
|
41
41
|
}),
|
|
42
42
|
_useState2 = (0, _slicedToArray2.default)(_useState, 1),
|
|
43
|
-
id = _useState2[0];
|
|
43
|
+
id = _useState2[0];
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
(0, _react.useState)(function () {
|
|
47
|
-
// We want to start timing of render event only once and right at the start
|
|
48
|
-
(0, _ufoExperiences.startUfoExperience)('smart-link-rendered', id);
|
|
49
|
-
});
|
|
50
45
|
(0, _react.useEffect)(function () {
|
|
51
46
|
// ComponentWillUnmount
|
|
52
47
|
return function () {
|
|
@@ -96,7 +91,10 @@ function CardWithURLRenderer(props) {
|
|
|
96
91
|
else {
|
|
97
92
|
var errorInfo = {
|
|
98
93
|
componentStack: componentStack
|
|
99
|
-
};
|
|
94
|
+
}; // Start and fail the smart-link-rendered experience. If it has already
|
|
95
|
+
// been started nothing happens.
|
|
96
|
+
|
|
97
|
+
(0, _ufoExperiences.startUfoExperience)('smart-link-rendered', id);
|
|
100
98
|
(0, _ufoExperiences.failUfoExperience)('smart-link-rendered', id);
|
|
101
99
|
(0, _ufoExperiences.failUfoExperience)('smart-link-authenticated', id);
|
|
102
100
|
dispatchAnalytics((0, _analytics.uiRenderFailedEvent)(appearance, error, errorInfo));
|
|
@@ -75,8 +75,8 @@ var ActionIcon = function ActionIcon(_ref) {
|
|
|
75
75
|
|
|
76
76
|
var sizeToSpacing = (_sizeToSpacing = {}, (0, _defineProperty2.default)(_sizeToSpacing, _constants.SmartLinkSize.Small, 'none'), (0, _defineProperty2.default)(_sizeToSpacing, _constants.SmartLinkSize.Medium, 'compact'), (0, _defineProperty2.default)(_sizeToSpacing, _constants.SmartLinkSize.Large, 'compact'), (0, _defineProperty2.default)(_sizeToSpacing, _constants.SmartLinkSize.XLarge, 'default'), _sizeToSpacing);
|
|
77
77
|
/**
|
|
78
|
-
*
|
|
79
|
-
* @
|
|
78
|
+
* A base action that can be triggered with an on click.
|
|
79
|
+
* @internal
|
|
80
80
|
* @param {ActionProps} ActionProps - The props necessary for the Action.
|
|
81
81
|
* @see DeleteAction
|
|
82
82
|
* @see EditAction
|
|
@@ -39,6 +39,7 @@ var styles = (0, _core.css)(_templateObject || (_templateObject = (0, _taggedTem
|
|
|
39
39
|
/**
|
|
40
40
|
* Creates a group of Action components. Accepts an array of Actions, in addition to some styling
|
|
41
41
|
* preferences.
|
|
42
|
+
* @internal
|
|
42
43
|
* @param {ActionGroupProps} ActionGroupProps
|
|
43
44
|
* @see Action
|
|
44
45
|
*/
|
|
@@ -23,8 +23,9 @@ var getBlockStyles = function getBlockStyles(direction, size) {
|
|
|
23
23
|
return (0, _core.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", "\n justify-content: flex-start;\n [data-separator] + [data-separator]:before {\n content: '\u2022';\n margin-right: ", "rem;\n }\n"])), (0, _utils.getBaseStyles)(direction, size), (0, _utils.getGapSize)(size));
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
|
-
* A block represents a collection of elements and actions that are arranged
|
|
27
|
-
* All elements and actions should be contained within a Block.
|
|
26
|
+
* A block represents a collection of elements and actions that are arranged
|
|
27
|
+
* in a row. All elements and actions should be contained within a Block.
|
|
28
|
+
* @internal
|
|
28
29
|
* @param {ActionGroupProps} ActionGroupProps
|
|
29
30
|
* @see Action
|
|
30
31
|
*/
|
|
@@ -36,6 +36,7 @@ var getElementGroupStyles = function getElementGroupStyles(direction, size, alig
|
|
|
36
36
|
/**
|
|
37
37
|
* Creates a group of Action components. Accepts an array of Actions, in addition to some styling
|
|
38
38
|
* preferences.
|
|
39
|
+
* @internal
|
|
39
40
|
* @param {ActionGroupProps} ActionGroupProps
|
|
40
41
|
* @see Action
|
|
41
42
|
*/
|
|
@@ -24,6 +24,7 @@ var _actionGroup = _interopRequireDefault(require("../action-group"));
|
|
|
24
24
|
/**
|
|
25
25
|
* Represents a FooterBlock, designed to contain elements and actions that should appear
|
|
26
26
|
* at the bottom of a link card.
|
|
27
|
+
* @public
|
|
27
28
|
* @param {FooterBlockProps} FooterBlockProps
|
|
28
29
|
* @see Block
|
|
29
30
|
*/
|
|
@@ -77,6 +77,7 @@ var getMaxLines = function getMaxLines(maxLines) {
|
|
|
77
77
|
/**
|
|
78
78
|
* Represents a MetadataBlock, designed to contain groups of metadata in the form of elements.
|
|
79
79
|
* Accepts an array of elements to be shown either primary (left hand side) or secondary (right hand side).
|
|
80
|
+
* @public
|
|
80
81
|
* @param {MetadataBlockProps} MetadataBlockProps
|
|
81
82
|
* @see Block
|
|
82
83
|
*/
|
|
@@ -66,10 +66,11 @@ var getTitleBlockViewComponent = function getTitleBlockViewComponent(status) {
|
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
68
|
/**
|
|
69
|
-
* Represents a TitleBlock, which is the foundation of
|
|
69
|
+
* Represents a TitleBlock, which is the foundation of Flexible UI.
|
|
70
70
|
* This contains an icon, the link, and any associated metadata and actions in one block.
|
|
71
71
|
* The TitleBlock will also render differently given the state of the smart link.
|
|
72
72
|
* This can be found in the corresponding Resolving, Resolved and Errored views.
|
|
73
|
+
* @public
|
|
73
74
|
* @param {TitleBlockProps} TitleBlockProps
|
|
74
75
|
* @see Block
|
|
75
76
|
* @see TitleBlockResolvingView
|
|
@@ -79,12 +79,21 @@ var renderChildren = function renderChildren(children, containerSize, containerT
|
|
|
79
79
|
return _react.default.Children.map(children, function (child) {
|
|
80
80
|
if ( /*#__PURE__*/_react.default.isValidElement(child) && (0, _flexible.isFlexibleUiBlock)(child)) {
|
|
81
81
|
var blockSize = child.props.size;
|
|
82
|
+
var size = blockSize || containerSize;
|
|
83
|
+
|
|
84
|
+
if ((0, _flexible.isFlexibleUiTitleBlock)(child)) {
|
|
85
|
+
return /*#__PURE__*/_react.default.cloneElement(child, {
|
|
86
|
+
onClick: onClick,
|
|
87
|
+
retry: retry,
|
|
88
|
+
size: size,
|
|
89
|
+
status: status,
|
|
90
|
+
theme: containerTheme
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
82
94
|
return /*#__PURE__*/_react.default.cloneElement(child, {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
size: blockSize || containerSize,
|
|
86
|
-
status: status,
|
|
87
|
-
theme: containerTheme
|
|
95
|
+
size: size,
|
|
96
|
+
status: status
|
|
88
97
|
});
|
|
89
98
|
}
|
|
90
99
|
});
|
|
@@ -118,7 +127,11 @@ var getLayeredLink = function getLayeredLink(testId, context, children) {
|
|
|
118
127
|
});
|
|
119
128
|
};
|
|
120
129
|
/**
|
|
121
|
-
*
|
|
130
|
+
* A container is a hidden component that build the Flexible Smart Link.
|
|
131
|
+
* All of the Flexible UI components are wrapped inside the container.
|
|
132
|
+
* It inherits the ui props from Card component and applies the custom styling
|
|
133
|
+
* accordingly.
|
|
134
|
+
* @internal
|
|
122
135
|
* @see Block
|
|
123
136
|
*/
|
|
124
137
|
|
|
@@ -16,6 +16,11 @@ var _core = require("@emotion/core");
|
|
|
16
16
|
var _templateObject;
|
|
17
17
|
|
|
18
18
|
var styles = (0, _core.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n // Stretch the invisible link over the whole of the post.\n // Hide the link\u2019s text.\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n overflow-x: hidden;\n text-indent: 100%;\n white-space: nowrap;\n\n // Needs a heightened specificity to trump other anchor.\n // Stack it under all other links in the post text.\n a&.layered-link {\n position: absolute;\n z-index: 0;\n }\n\n // When hovering over the layered link, any hidden action buttons inside\n // the Container should become visible.\n // As actions resides inside blocks and layered link is expected to be\n // on the same level of blocks. That makes the blocks, e.g. TitleBlock,\n // its sibling. Using general sibling combinator here to apply styling to\n // all the siblings of layered link.\n // The general sibling combinator (~) separates two selectors and matches all\n // iterations of the second element, that are following the first element\n // (though not necessarily immediately), and are children of the same parent\n // element.\n &:hover ~ * {\n .actions-button-group {\n opacity: 1;\n }\n }\n"])));
|
|
19
|
+
/**
|
|
20
|
+
* An anchor component to cover the entire container creating a clickable area.
|
|
21
|
+
* @internal
|
|
22
|
+
* @see `clickableContainer`
|
|
23
|
+
*/
|
|
19
24
|
|
|
20
25
|
var LayeredLink = function LayeredLink(_ref) {
|
|
21
26
|
var target = _ref.target,
|
|
@@ -35,8 +35,8 @@ var getStyles = function getStyles(size) {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
39
|
-
* @
|
|
38
|
+
* A base element that displays a group of avatars.
|
|
39
|
+
* @internal
|
|
40
40
|
* @param {AvatarGroupProps} AvatarGroupProps - The props necessary for the AvatarGroup.
|
|
41
41
|
* @see AuthorGroup
|
|
42
42
|
* @see CollaboratorGroup
|
|
@@ -65,8 +65,8 @@ var renderImageIcon = function renderImageIcon(url, testId) {
|
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
/**
|
|
68
|
-
*
|
|
69
|
-
* @
|
|
68
|
+
* A base element that displays some text with an associated icon.
|
|
69
|
+
* @internal
|
|
70
70
|
* @param {BadgeProps} BadgeProps - The props necessary for the Badge.
|
|
71
71
|
* @see CommentCount
|
|
72
72
|
* @see ViewCount
|
|
@@ -29,12 +29,18 @@ var _templateObject;
|
|
|
29
29
|
|
|
30
30
|
var styles = (0, _core.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n font-size: 0.75rem;\n line-height: 1rem;\n ", "\n"])), _token.tokens.text, (0, _utils.getTruncateStyles)(1));
|
|
31
31
|
var typeToDescriptorMap = {
|
|
32
|
-
created:
|
|
33
|
-
|
|
32
|
+
created: {
|
|
33
|
+
relative: _messages.messages.created_on_relative,
|
|
34
|
+
absolute: _messages.messages.created_on_absolute
|
|
35
|
+
},
|
|
36
|
+
modified: {
|
|
37
|
+
relative: _messages.messages.modified_on_relative,
|
|
38
|
+
absolute: _messages.messages.modified_on_absolute
|
|
39
|
+
}
|
|
34
40
|
};
|
|
35
41
|
/**
|
|
36
|
-
*
|
|
37
|
-
* @
|
|
42
|
+
* A base element that displays an ISO Timestamp in text.
|
|
43
|
+
* @internal
|
|
38
44
|
* @param {DateTimeProps} DateTimeProps - The props necessary for the DateTime element.
|
|
39
45
|
* @see CreatedOn
|
|
40
46
|
* @see ModifiedOn
|
|
@@ -48,25 +54,41 @@ var DateTime = function DateTime(_ref) {
|
|
|
48
54
|
testId = _ref$testId === void 0 ? 'smart-element-date-time' : _ref$testId;
|
|
49
55
|
|
|
50
56
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
51
|
-
formatRelativeTime = _useIntl.formatRelativeTime
|
|
57
|
+
formatRelativeTime = _useIntl.formatRelativeTime,
|
|
58
|
+
formatDate = _useIntl.formatDate;
|
|
52
59
|
|
|
53
60
|
if (!type || !date) {
|
|
54
61
|
return null;
|
|
55
62
|
}
|
|
56
63
|
|
|
57
|
-
var
|
|
58
|
-
|
|
59
|
-
|
|
64
|
+
var isLongerThenWeek = Math.abs(date.getTime() - Date.now()) > 1000 * 60 * 60 * 24 * 7;
|
|
65
|
+
var context;
|
|
66
|
+
var typeVariant;
|
|
67
|
+
|
|
68
|
+
if (isLongerThenWeek) {
|
|
69
|
+
typeVariant = 'absolute';
|
|
70
|
+
context = formatDate(date, {
|
|
71
|
+
month: 'long',
|
|
72
|
+
day: 'numeric',
|
|
73
|
+
year: 'numeric'
|
|
74
|
+
});
|
|
75
|
+
} else {
|
|
76
|
+
var _selectUnit = (0, _intlUtils.selectUnit)(date, Date.now()),
|
|
77
|
+
value = _selectUnit.value,
|
|
78
|
+
unit = _selectUnit.unit;
|
|
79
|
+
|
|
80
|
+
typeVariant = 'relative';
|
|
81
|
+
context = formatRelativeTime(value, unit, {
|
|
82
|
+
numeric: 'auto'
|
|
83
|
+
});
|
|
84
|
+
}
|
|
60
85
|
|
|
61
|
-
var context = formatRelativeTime(value, unit, {
|
|
62
|
-
numeric: 'auto'
|
|
63
|
-
});
|
|
64
86
|
return (0, _core.jsx)("span", {
|
|
65
87
|
css: [styles, overrideCss],
|
|
66
88
|
"data-separator": true,
|
|
67
89
|
"data-smart-element-date-time": true,
|
|
68
90
|
"data-testid": testId
|
|
69
|
-
}, (0, _core.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, typeToDescriptorMap[type], {
|
|
91
|
+
}, (0, _core.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, typeToDescriptorMap[type][typeVariant], {
|
|
70
92
|
values: {
|
|
71
93
|
context: context
|
|
72
94
|
}
|
|
@@ -77,8 +77,8 @@ var renderImageIcon = function renderImageIcon(defaultIcon, icon, url, testId) {
|
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
79
|
/**
|
|
80
|
-
*
|
|
81
|
-
* @
|
|
80
|
+
* A base element that displays an Icon or favicon.
|
|
81
|
+
* @internal
|
|
82
82
|
* @param {IconProps} IconProps - The props necessary for the Icon element.
|
|
83
83
|
* @see LinkIcon
|
|
84
84
|
*/
|
|
@@ -14,12 +14,12 @@ var _constants = require("../../../../constants");
|
|
|
14
14
|
// createElement and renderElementItems
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* An AvatarGroup element using the data from AuthorGroup in the Flexible UI Context.
|
|
18
18
|
* @see AvatarGroup
|
|
19
19
|
*/
|
|
20
20
|
var AuthorGroup = (0, _utils.createElement)(_constants.ElementName.AuthorGroup);
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* An AvatarGroup element using the data from CollaboratorGroup in the Flexible UI Context.
|
|
23
23
|
* @see AvatarGroup
|
|
24
24
|
*/
|
|
25
25
|
|
|
@@ -63,9 +63,9 @@ var getMaxLines = function getMaxLines(maxLines) {
|
|
|
63
63
|
return maxLines;
|
|
64
64
|
};
|
|
65
65
|
/**
|
|
66
|
-
*
|
|
67
|
-
* @
|
|
68
|
-
* @param {LinkProps} LinkProps - The props necessary for the
|
|
66
|
+
* A base element that represent an anchor.
|
|
67
|
+
* @internal
|
|
68
|
+
* @param {LinkProps} LinkProps - The props necessary for the Link element.
|
|
69
69
|
* @see LinkIcon
|
|
70
70
|
*/
|
|
71
71
|
|
|
@@ -19,8 +19,8 @@ var _templateObject;
|
|
|
19
19
|
|
|
20
20
|
var styles = (0, _core.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n line-height: inherit;\n"])));
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
23
|
-
* @
|
|
22
|
+
* A base element that displays a Lozenge.
|
|
23
|
+
* @internal
|
|
24
24
|
* @param {LozengeProps} LozengeProps - The props necessary for the Lozenge element.
|
|
25
25
|
* @see State
|
|
26
26
|
*/
|
|
@@ -29,8 +29,8 @@ var _templateObject;
|
|
|
29
29
|
*/
|
|
30
30
|
var styles = (0, _core.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n aspect-ratio: 16 / 9;\n display: flex;\n width: 100%;\n\n // fallback\n @supports not (aspect-ratio: auto) {\n padding-top: 56.25%; // 16:9 ratio (9 / 16 = 0.5625)\n height: 0;\n position: relative;\n overflow: hidden;\n }\n\n > img {\n min-height: 100%;\n min-width: 100%;\n max-height: 100%;\n max-width: 100%;\n object-fit: cover;\n object-position: center center;\n\n // fallback\n @supports not (aspect-ratio: auto) {\n position: absolute;\n transform: translate(-50%, -50%);\n left: 50%;\n top: 50%;\n width: auto;\n height: auto;\n }\n }\n"])));
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
33
|
-
* @
|
|
32
|
+
* A base element that displays a Media.
|
|
33
|
+
* @internal
|
|
34
34
|
* @param {MediaProps} MediaProps - The props necessary for the Media element.
|
|
35
35
|
* @see Preview
|
|
36
36
|
*/
|
|
@@ -23,8 +23,8 @@ var getStyles = function getStyles(maxLines) {
|
|
|
23
23
|
return (0, _core.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n font-size: 0.75rem;\n line-height: 1rem;\n ", "\n"])), _token.tokens.text, (0, _utils.getTruncateStyles)(maxLines));
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
27
|
-
* @
|
|
26
|
+
* A base element that displays some Text.
|
|
27
|
+
* @internal
|
|
28
28
|
* @param {TextProps} TextProps - The props necessary for the Text element.
|
|
29
29
|
* @see Title
|
|
30
30
|
*/
|
package/dist/es2019/constants.js
CHANGED
|
@@ -109,9 +109,6 @@ export let ElementName;
|
|
|
109
109
|
ElementName["AuthorGroup"] = "AuthorGroup";
|
|
110
110
|
ElementName["CollaboratorGroup"] = "CollaboratorGroup";
|
|
111
111
|
ElementName["CommentCount"] = "CommentCount";
|
|
112
|
-
ElementName["ViewCount"] = "ViewCount";
|
|
113
|
-
ElementName["ReactCount"] = "ReactCount";
|
|
114
|
-
ElementName["VoteCount"] = "VoteCount";
|
|
115
112
|
ElementName["CreatedBy"] = "CreatedBy";
|
|
116
113
|
ElementName["CreatedOn"] = "CreatedOn";
|
|
117
114
|
ElementName["LinkIcon"] = "LinkIcon";
|
|
@@ -120,11 +117,14 @@ export let ElementName;
|
|
|
120
117
|
ElementName["Preview"] = "Preview";
|
|
121
118
|
ElementName["Priority"] = "Priority";
|
|
122
119
|
ElementName["ProgrammingLanguage"] = "ProgrammingLanguage";
|
|
120
|
+
ElementName["Provider"] = "Provider";
|
|
121
|
+
ElementName["ReactCount"] = "ReactCount";
|
|
123
122
|
ElementName["Snippet"] = "Snippet";
|
|
124
123
|
ElementName["State"] = "State";
|
|
125
124
|
ElementName["SubscriberCount"] = "SubscriberCount";
|
|
126
125
|
ElementName["Title"] = "Title";
|
|
127
|
-
ElementName["
|
|
126
|
+
ElementName["ViewCount"] = "ViewCount";
|
|
127
|
+
ElementName["VoteCount"] = "VoteCount";
|
|
128
128
|
})(ElementName || (ElementName = {}));
|
|
129
129
|
|
|
130
130
|
export let ActionName;
|
package/dist/es2019/messages.js
CHANGED
|
@@ -25,10 +25,15 @@ export const messages = defineMessages({
|
|
|
25
25
|
defaultMessage: 'Created by {context}',
|
|
26
26
|
description: 'Indicates the person or entity that created the resource.'
|
|
27
27
|
},
|
|
28
|
-
|
|
29
|
-
id: 'fabric.linking.
|
|
28
|
+
created_on_relative: {
|
|
29
|
+
id: 'fabric.linking.create_on_relative',
|
|
30
30
|
defaultMessage: 'Created {context}',
|
|
31
|
-
description: 'Indicated when entity was created'
|
|
31
|
+
description: 'Indicated when entity was created (relative form)'
|
|
32
|
+
},
|
|
33
|
+
created_on_absolute: {
|
|
34
|
+
id: 'fabric.linking.create_on_absolute',
|
|
35
|
+
defaultMessage: 'Created on {context}',
|
|
36
|
+
description: 'Indicated when entity was created (absolute form)'
|
|
32
37
|
},
|
|
33
38
|
delete: {
|
|
34
39
|
id: 'fabric.linking.delete',
|
|
@@ -45,10 +50,15 @@ export const messages = defineMessages({
|
|
|
45
50
|
defaultMessage: 'Modified by {context}',
|
|
46
51
|
description: 'Indicates the person or entity that modified the resource.'
|
|
47
52
|
},
|
|
48
|
-
|
|
49
|
-
id: 'fabric.linking.
|
|
53
|
+
modified_on_relative: {
|
|
54
|
+
id: 'fabric.linking.modified_on_relative',
|
|
50
55
|
defaultMessage: 'Updated {context}',
|
|
51
|
-
description: 'Indicated when entity was modified'
|
|
56
|
+
description: 'Indicated when entity was modified (relative form)'
|
|
57
|
+
},
|
|
58
|
+
modified_on_absolute: {
|
|
59
|
+
id: 'fabric.linking.modified_on_absolute',
|
|
60
|
+
defaultMessage: 'Updated on {context}',
|
|
61
|
+
description: 'Indicated when entity was modified (absolute form)'
|
|
52
62
|
},
|
|
53
63
|
priority_blocker: {
|
|
54
64
|
id: 'fabric.linking.priority_blocker',
|
package/dist/es2019/version.json
CHANGED
|
@@ -2,7 +2,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React, { useCallback, useState } from 'react';
|
|
3
3
|
import { usePrefetch } from '../../../state';
|
|
4
4
|
import { CardWithUrlContent } from '../component';
|
|
5
|
-
import { LoadingCardLink } from './LazyFallback';
|
|
5
|
+
import { LoadingCardLink } from './LazyFallback';
|
|
6
|
+
import { startUfoExperience } from '../../../state/analytics/ufoExperiences'; // This property enables the intersection observer to be run once the
|
|
6
7
|
// HTML element being observed is within `X` px of the target container it is
|
|
7
8
|
// being compared to. Since the default container is the `document`, we set this
|
|
8
9
|
// up to check once a Smart Link is within `X` px from the bottom of the viewport.
|
|
@@ -13,7 +14,8 @@ export function LazyIntersectionObserverCard(props) {
|
|
|
13
14
|
const {
|
|
14
15
|
showActions,
|
|
15
16
|
appearance,
|
|
16
|
-
url
|
|
17
|
+
url,
|
|
18
|
+
id
|
|
17
19
|
} = props;
|
|
18
20
|
const prefetch = usePrefetch(url);
|
|
19
21
|
const Component = appearance === 'inline' ? 'span' : 'div';
|
|
@@ -22,12 +24,13 @@ export function LazyIntersectionObserverCard(props) {
|
|
|
22
24
|
const isVisible = entries.some(entry => entry.isIntersecting);
|
|
23
25
|
|
|
24
26
|
if (isVisible) {
|
|
27
|
+
startUfoExperience('smart-link-rendered', id);
|
|
25
28
|
setIsIntersecting(true);
|
|
26
29
|
observer.disconnect();
|
|
27
30
|
} else {
|
|
28
31
|
prefetch();
|
|
29
32
|
}
|
|
30
|
-
}, [prefetch]);
|
|
33
|
+
}, [prefetch, id]);
|
|
31
34
|
const onRef = useCallback(element => {
|
|
32
35
|
if (!element) {
|
|
33
36
|
return;
|