@atlaskit/media-card 74.1.3 → 74.1.4
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 +6 -0
- package/classnames/package.json +8 -1
- package/dist/cjs/root/card/index.js +1 -1
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/cjs/utils/viewportDetector.js +22 -4
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/root/card/index.js +1 -1
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/es2019/utils/viewportDetector.js +22 -4
- package/dist/es2019/version.json +1 -1
- package/dist/esm/root/card/index.js +1 -1
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/dist/esm/utils/viewportDetector.js +22 -4
- package/dist/esm/version.json +1 -1
- package/in-product/package.json +8 -1
- package/package.json +2 -2
- package/types/package.json +8 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/media-card
|
|
2
2
|
|
|
3
|
+
## 74.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`80a1ca7b589`](https://bitbucket.org/atlassian/atlassian-frontend/commits/80a1ca7b589) - Fix compatility issue of Intersection Observer API in old browser versions
|
|
8
|
+
|
|
3
9
|
## 74.1.3
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/classnames/package.json
CHANGED
|
@@ -4,5 +4,12 @@
|
|
|
4
4
|
"module": "../dist/esm/classnames.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/classnames.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/classnames.d.ts"
|
|
7
|
+
"types": "../dist/types/classnames.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
">=4.0 <4.3": {
|
|
10
|
+
"*": [
|
|
11
|
+
"../dist/types-ts4.0/classnames.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
8
15
|
}
|
|
@@ -90,7 +90,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
90
90
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
91
91
|
|
|
92
92
|
var packageName = "@atlaskit/media-card";
|
|
93
|
-
var packageVersion = "74.1.
|
|
93
|
+
var packageVersion = "74.1.4";
|
|
94
94
|
|
|
95
95
|
var CardBase = /*#__PURE__*/function (_Component) {
|
|
96
96
|
(0, _inherits2.default)(CardBase, _Component);
|
|
@@ -22,7 +22,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
22
22
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23
23
|
|
|
24
24
|
var packageName = "@atlaskit/media-card";
|
|
25
|
-
var packageVersion = "74.1.
|
|
25
|
+
var packageVersion = "74.1.4";
|
|
26
26
|
var concurrentExperience;
|
|
27
27
|
|
|
28
28
|
var getExperience = function getExperience(id) {
|
|
@@ -53,10 +53,28 @@ var ViewportObserver = function ViewportObserver(_ref) {
|
|
|
53
53
|
cardEl = _ref.cardEl,
|
|
54
54
|
children = _ref.children;
|
|
55
55
|
(0, _react.useEffect)(function () {
|
|
56
|
-
var intersectionObserver
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
var intersectionObserver;
|
|
57
|
+
|
|
58
|
+
try {
|
|
59
|
+
intersectionObserver = new IntersectionObserver(createIntersectionObserverCallback(onVisible), {
|
|
60
|
+
root: (0, _document.default)(),
|
|
61
|
+
rootMargin: "".concat(ABS_VIEWPORT_ANCHOR_OFFSET_TOP, "px")
|
|
62
|
+
});
|
|
63
|
+
} catch (error) {
|
|
64
|
+
var _error$message;
|
|
65
|
+
|
|
66
|
+
var errorMessage = "Failed to construct 'IntersectionObserver': member root is not of type Element";
|
|
67
|
+
|
|
68
|
+
if ((_error$message = error.message) !== null && _error$message !== void 0 && _error$message.includes(errorMessage)) {
|
|
69
|
+
intersectionObserver = new IntersectionObserver(createIntersectionObserverCallback(onVisible), {
|
|
70
|
+
root: null,
|
|
71
|
+
rootMargin: "".concat(ABS_VIEWPORT_ANCHOR_OFFSET_TOP, "px")
|
|
72
|
+
});
|
|
73
|
+
} else {
|
|
74
|
+
throw error;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
60
78
|
cardEl && intersectionObserver.observe(cardEl);
|
|
61
79
|
return function () {
|
|
62
80
|
intersectionObserver.disconnect();
|
package/dist/cjs/version.json
CHANGED
|
@@ -25,7 +25,7 @@ import { getMediaCardCursor } from '../../utils/getMediaCardCursor';
|
|
|
25
25
|
import { completeUfoExperience, startUfoExperience } from '../../utils/ufoExperiences';
|
|
26
26
|
import { generateUniqueId } from '../../utils/generateUniqueId';
|
|
27
27
|
const packageName = "@atlaskit/media-card";
|
|
28
|
-
const packageVersion = "74.1.
|
|
28
|
+
const packageVersion = "74.1.4";
|
|
29
29
|
export class CardBase extends Component {
|
|
30
30
|
// An internalOccurrenceKey is a randomly generated value to differentiate various instances
|
|
31
31
|
// of Cards regardless of whether it shares the same file (either internal or external)
|
|
@@ -3,7 +3,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata, LOGGED_FEATURE_FLAG_KE
|
|
|
3
3
|
import { MediaCardError } from '../errors';
|
|
4
4
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
5
5
|
const packageName = "@atlaskit/media-card";
|
|
6
|
-
const packageVersion = "74.1.
|
|
6
|
+
const packageVersion = "74.1.4";
|
|
7
7
|
let concurrentExperience;
|
|
8
8
|
|
|
9
9
|
const getExperience = id => {
|
|
@@ -18,10 +18,28 @@ const ViewportObserver = ({
|
|
|
18
18
|
children
|
|
19
19
|
}) => {
|
|
20
20
|
useEffect(() => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
let intersectionObserver;
|
|
22
|
+
|
|
23
|
+
try {
|
|
24
|
+
intersectionObserver = new IntersectionObserver(createIntersectionObserverCallback(onVisible), {
|
|
25
|
+
root: getDocument(),
|
|
26
|
+
rootMargin: `${ABS_VIEWPORT_ANCHOR_OFFSET_TOP}px`
|
|
27
|
+
});
|
|
28
|
+
} catch (error) {
|
|
29
|
+
var _error$message;
|
|
30
|
+
|
|
31
|
+
const errorMessage = "Failed to construct 'IntersectionObserver': member root is not of type Element";
|
|
32
|
+
|
|
33
|
+
if ((_error$message = error.message) !== null && _error$message !== void 0 && _error$message.includes(errorMessage)) {
|
|
34
|
+
intersectionObserver = new IntersectionObserver(createIntersectionObserverCallback(onVisible), {
|
|
35
|
+
root: null,
|
|
36
|
+
rootMargin: `${ABS_VIEWPORT_ANCHOR_OFFSET_TOP}px`
|
|
37
|
+
});
|
|
38
|
+
} else {
|
|
39
|
+
throw error;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
25
43
|
cardEl && intersectionObserver.observe(cardEl);
|
|
26
44
|
return () => {
|
|
27
45
|
intersectionObserver.disconnect();
|
package/dist/es2019/version.json
CHANGED
|
@@ -43,7 +43,7 @@ import { getMediaCardCursor } from '../../utils/getMediaCardCursor';
|
|
|
43
43
|
import { completeUfoExperience, startUfoExperience } from '../../utils/ufoExperiences';
|
|
44
44
|
import { generateUniqueId } from '../../utils/generateUniqueId';
|
|
45
45
|
var packageName = "@atlaskit/media-card";
|
|
46
|
-
var packageVersion = "74.1.
|
|
46
|
+
var packageVersion = "74.1.4";
|
|
47
47
|
export var CardBase = /*#__PURE__*/function (_Component) {
|
|
48
48
|
_inherits(CardBase, _Component);
|
|
49
49
|
|
|
@@ -9,7 +9,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata, LOGGED_FEATURE_FLAG_KE
|
|
|
9
9
|
import { MediaCardError } from '../errors';
|
|
10
10
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
11
11
|
var packageName = "@atlaskit/media-card";
|
|
12
|
-
var packageVersion = "74.1.
|
|
12
|
+
var packageVersion = "74.1.4";
|
|
13
13
|
var concurrentExperience;
|
|
14
14
|
|
|
15
15
|
var getExperience = function getExperience(id) {
|
|
@@ -36,10 +36,28 @@ var ViewportObserver = function ViewportObserver(_ref) {
|
|
|
36
36
|
cardEl = _ref.cardEl,
|
|
37
37
|
children = _ref.children;
|
|
38
38
|
useEffect(function () {
|
|
39
|
-
var intersectionObserver
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
var intersectionObserver;
|
|
40
|
+
|
|
41
|
+
try {
|
|
42
|
+
intersectionObserver = new IntersectionObserver(createIntersectionObserverCallback(onVisible), {
|
|
43
|
+
root: getDocument(),
|
|
44
|
+
rootMargin: "".concat(ABS_VIEWPORT_ANCHOR_OFFSET_TOP, "px")
|
|
45
|
+
});
|
|
46
|
+
} catch (error) {
|
|
47
|
+
var _error$message;
|
|
48
|
+
|
|
49
|
+
var errorMessage = "Failed to construct 'IntersectionObserver': member root is not of type Element";
|
|
50
|
+
|
|
51
|
+
if ((_error$message = error.message) !== null && _error$message !== void 0 && _error$message.includes(errorMessage)) {
|
|
52
|
+
intersectionObserver = new IntersectionObserver(createIntersectionObserverCallback(onVisible), {
|
|
53
|
+
root: null,
|
|
54
|
+
rootMargin: "".concat(ABS_VIEWPORT_ANCHOR_OFFSET_TOP, "px")
|
|
55
|
+
});
|
|
56
|
+
} else {
|
|
57
|
+
throw error;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
43
61
|
cardEl && intersectionObserver.observe(cardEl);
|
|
44
62
|
return function () {
|
|
45
63
|
intersectionObserver.disconnect();
|
package/dist/esm/version.json
CHANGED
package/in-product/package.json
CHANGED
|
@@ -4,5 +4,12 @@
|
|
|
4
4
|
"module": "../dist/esm/in-product.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/in-product.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/in-product.d.ts"
|
|
7
|
+
"types": "../dist/types/in-product.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
">=4.0 <4.3": {
|
|
10
|
+
"*": [
|
|
11
|
+
"../dist/types-ts4.0/in-product.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
8
15
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-card",
|
|
3
|
-
"version": "74.1.
|
|
3
|
+
"version": "74.1.4",
|
|
4
4
|
"description": "Includes all media card related components, CardView, CardViewSmall, Card...",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
33
33
|
"@atlaskit/dropdown-menu": "^11.5.0",
|
|
34
|
-
"@atlaskit/editor-shared-styles": "^2.
|
|
34
|
+
"@atlaskit/editor-shared-styles": "^2.2.0",
|
|
35
35
|
"@atlaskit/icon": "^21.10.0",
|
|
36
36
|
"@atlaskit/in-product-testing": "^0.1.0",
|
|
37
37
|
"@atlaskit/media-client": "^17.1.0",
|
package/types/package.json
CHANGED
|
@@ -4,5 +4,12 @@
|
|
|
4
4
|
"module": "../dist/esm/types.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/types.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/types.d.ts"
|
|
7
|
+
"types": "../dist/types/types.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
">=4.0 <4.3": {
|
|
10
|
+
"*": [
|
|
11
|
+
"../dist/types-ts4.0/types.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
8
15
|
}
|