@atlaskit/smart-card 38.11.0 → 38.12.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.
Files changed (54) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/utils/analytics/analytics.js +1 -1
  3. package/dist/cjs/view/FlexibleCard/components/elements/comment-count-element/index.js +18 -2
  4. package/dist/cjs/view/FlexibleCard/components/elements/modified-on-element/index.js +17 -2
  5. package/dist/cjs/view/FlexibleCard/components/elements/owned-by-element/index.js +17 -2
  6. package/dist/cjs/view/FlexibleCard/components/elements/owned-by-group-element/index.js +17 -2
  7. package/dist/cjs/view/FlexibleCard/components/elements/react-count-element/index.js +17 -2
  8. package/dist/cjs/view/FlexibleCard/external.js +14 -5
  9. package/dist/cjs/view/LinkUrl/index.js +1 -1
  10. package/dist/es2019/extractors/action/extract-invoke-copy-link-action.js +1 -1
  11. package/dist/es2019/extractors/action/extract-invoke-download-action.js +2 -2
  12. package/dist/es2019/extractors/action/extract-invoke-preview-action.js +1 -1
  13. package/dist/es2019/extractors/common/primitives/extractSummary.js +2 -2
  14. package/dist/es2019/extractors/flexible/actions/extract-view-related-links-action.js +1 -1
  15. package/dist/es2019/extractors/flexible/index.js +1 -1
  16. package/dist/es2019/utils/analytics/analytics.js +1 -1
  17. package/dist/es2019/view/FlexibleCard/components/elements/comment-count-element/index.js +15 -2
  18. package/dist/es2019/view/FlexibleCard/components/elements/modified-on-element/index.js +14 -2
  19. package/dist/es2019/view/FlexibleCard/components/elements/owned-by-element/index.js +14 -2
  20. package/dist/es2019/view/FlexibleCard/components/elements/owned-by-group-element/index.js +14 -2
  21. package/dist/es2019/view/FlexibleCard/components/elements/react-count-element/index.js +14 -2
  22. package/dist/es2019/view/FlexibleCard/external.js +16 -5
  23. package/dist/es2019/view/LinkUrl/index.js +1 -1
  24. package/dist/esm/extractors/action/extract-invoke-copy-link-action.js +1 -1
  25. package/dist/esm/extractors/action/extract-invoke-download-action.js +2 -2
  26. package/dist/esm/extractors/action/extract-invoke-preview-action.js +1 -1
  27. package/dist/esm/extractors/common/primitives/extractSummary.js +2 -2
  28. package/dist/esm/extractors/flexible/actions/extract-view-related-links-action.js +1 -1
  29. package/dist/esm/extractors/flexible/index.js +1 -1
  30. package/dist/esm/utils/analytics/analytics.js +1 -1
  31. package/dist/esm/view/FlexibleCard/components/elements/comment-count-element/index.js +16 -2
  32. package/dist/esm/view/FlexibleCard/components/elements/modified-on-element/index.js +15 -2
  33. package/dist/esm/view/FlexibleCard/components/elements/owned-by-element/index.js +15 -2
  34. package/dist/esm/view/FlexibleCard/components/elements/owned-by-group-element/index.js +15 -2
  35. package/dist/esm/view/FlexibleCard/components/elements/react-count-element/index.js +15 -2
  36. package/dist/esm/view/FlexibleCard/external.js +14 -5
  37. package/dist/esm/view/LinkUrl/index.js +1 -1
  38. package/dist/types/__fixtures__/document-entity.d.ts +1 -1
  39. package/dist/types/extractors/common/primitives/extractSummary.d.ts +1 -1
  40. package/dist/types/view/FlexibleCard/components/elements/comment-count-element/index.d.ts +3 -1
  41. package/dist/types/view/FlexibleCard/components/elements/modified-on-element/index.d.ts +3 -1
  42. package/dist/types/view/FlexibleCard/components/elements/owned-by-element/index.d.ts +3 -1
  43. package/dist/types/view/FlexibleCard/components/elements/owned-by-group-element/index.d.ts +3 -1
  44. package/dist/types/view/FlexibleCard/components/elements/react-count-element/index.d.ts +3 -1
  45. package/dist/types/view/FlexibleCard/external.d.ts +7 -6
  46. package/dist/types-ts4.5/__fixtures__/document-entity.d.ts +1 -1
  47. package/dist/types-ts4.5/extractors/common/primitives/extractSummary.d.ts +1 -1
  48. package/dist/types-ts4.5/view/FlexibleCard/components/elements/comment-count-element/index.d.ts +3 -1
  49. package/dist/types-ts4.5/view/FlexibleCard/components/elements/modified-on-element/index.d.ts +3 -1
  50. package/dist/types-ts4.5/view/FlexibleCard/components/elements/owned-by-element/index.d.ts +3 -1
  51. package/dist/types-ts4.5/view/FlexibleCard/components/elements/owned-by-group-element/index.d.ts +3 -1
  52. package/dist/types-ts4.5/view/FlexibleCard/components/elements/react-count-element/index.d.ts +3 -1
  53. package/dist/types-ts4.5/view/FlexibleCard/external.d.ts +7 -6
  54. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 38.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#173028](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/173028)
8
+ [`8350b887416f1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8350b887416f1) -
9
+ Add onRender callback to elements
10
+
3
11
  ## 38.11.0
4
12
 
5
13
  ### Minor Changes
@@ -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: "38.10.2"
14
+ packageVersion: "38.11.0"
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,22 +1,38 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.default = void 0;
8
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
- var _react = _interopRequireDefault(require("react"));
10
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
13
  var _constants = require("../../../../../constants");
11
14
  var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
12
15
  var _common = require("../common");
16
+ var _excluded = ["onRender"];
17
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
13
18
  var CommentCountElement = function CommentCountElement(props) {
14
19
  var _context$commentCount;
15
20
  var context = (0, _flexibleUiContext.useFlexibleUiContext)();
16
21
  var data = context ? (0, _common.toBadgeProps)((_context$commentCount = context.commentCount) === null || _context$commentCount === void 0 ? void 0 : _context$commentCount.toString()) : null;
22
+ var _ref = props || {},
23
+ onRender = _ref.onRender,
24
+ restProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
25
+
26
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
27
+ if ((0, _platformFeatureFlags.fg)('platform-linking-additional-flexible-element-props')) {
28
+ // eslint-disable-next-line react-hooks/rules-of-hooks
29
+ (0, _react.useEffect)(function () {
30
+ onRender === null || onRender === void 0 || onRender(!!data);
31
+ }, [data, onRender]);
32
+ }
17
33
  return data ? /*#__PURE__*/_react.default.createElement(_common.BaseBadgeElement, (0, _extends2.default)({
18
34
  icon: _constants.IconType.Comment
19
- }, data, props, {
35
+ }, data, restProps, {
20
36
  name: _constants.ElementName.CommentCount
21
37
  })) : null;
22
38
  };
@@ -1,19 +1,34 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.default = void 0;
8
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
- var _react = _interopRequireDefault(require("react"));
10
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
13
  var _constants = require("../../../../../constants");
11
14
  var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
12
15
  var _common = require("../common");
16
+ var _excluded = ["onRender"];
17
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
13
18
  var ModifiedOnElement = function ModifiedOnElement(props) {
14
19
  var context = (0, _flexibleUiContext.useFlexibleUiContext)();
15
20
  var data = context ? (0, _common.toDateTimeProps)('modified', context.modifiedOn) : null;
16
- return data ? /*#__PURE__*/_react.default.createElement(_common.BaseDateTimeElement, (0, _extends2.default)({}, data, props, {
21
+ var _ref = props || {},
22
+ onRender = _ref.onRender,
23
+ restProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
24
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
25
+ if ((0, _platformFeatureFlags.fg)('platform-linking-additional-flexible-element-props')) {
26
+ // eslint-disable-next-line react-hooks/rules-of-hooks
27
+ (0, _react.useEffect)(function () {
28
+ onRender === null || onRender === void 0 || onRender(!!data);
29
+ }, [data, onRender]);
30
+ }
31
+ return data ? /*#__PURE__*/_react.default.createElement(_common.BaseDateTimeElement, (0, _extends2.default)({}, data, restProps, {
17
32
  name: _constants.ElementName.ModifiedOn
18
33
  })) : null;
19
34
  };
@@ -1,20 +1,35 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.default = void 0;
8
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
- var _react = _interopRequireDefault(require("react"));
10
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
13
  var _constants = require("../../../../../constants");
11
14
  var _messages = require("../../../../../messages");
12
15
  var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
13
16
  var _common = require("../common");
17
+ var _excluded = ["onRender"];
18
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
14
19
  var OwnedByElement = function OwnedByElement(props) {
15
20
  var context = (0, _flexibleUiContext.useFlexibleUiContext)();
16
21
  var data = context ? (0, _common.toFormattedTextProps)(_messages.messages.owned_by, context.ownedBy) : null;
17
- return data ? /*#__PURE__*/_react.default.createElement(_common.BaseTextElement, (0, _extends2.default)({}, data, props, {
22
+ var _ref = props || {},
23
+ onRender = _ref.onRender,
24
+ restProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
25
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
26
+ if ((0, _platformFeatureFlags.fg)('platform-linking-additional-flexible-element-props')) {
27
+ // eslint-disable-next-line react-hooks/rules-of-hooks
28
+ (0, _react.useEffect)(function () {
29
+ onRender === null || onRender === void 0 || onRender(!!data);
30
+ }, [data, onRender]);
31
+ }
32
+ return data ? /*#__PURE__*/_react.default.createElement(_common.BaseTextElement, (0, _extends2.default)({}, data, restProps, {
18
33
  name: _constants.ElementName.OwnedBy
19
34
  })) : null;
20
35
  };
@@ -1,19 +1,34 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.default = void 0;
8
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
- var _react = _interopRequireDefault(require("react"));
10
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
13
  var _constants = require("../../../../../constants");
11
14
  var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
12
15
  var _common = require("../common");
16
+ var _excluded = ["onRender"];
17
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
13
18
  var OwnedByGroupElement = function OwnedByGroupElement(props) {
14
19
  var context = (0, _flexibleUiContext.useFlexibleUiContext)();
15
20
  var data = context ? (0, _common.toAvatarGroupProps)(context.ownedByGroup, false) : null;
16
- return data ? /*#__PURE__*/_react.default.createElement(_common.BaseAvatarGroupElement, (0, _extends2.default)({}, data, props, {
21
+ var _ref = props || {},
22
+ onRender = _ref.onRender,
23
+ restProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
24
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
25
+ if ((0, _platformFeatureFlags.fg)('platform-linking-additional-flexible-element-props')) {
26
+ // eslint-disable-next-line react-hooks/rules-of-hooks
27
+ (0, _react.useEffect)(function () {
28
+ onRender === null || onRender === void 0 || onRender(!!data);
29
+ }, [data, onRender]);
30
+ }
31
+ return data ? /*#__PURE__*/_react.default.createElement(_common.BaseAvatarGroupElement, (0, _extends2.default)({}, data, restProps, {
17
32
  name: _constants.ElementName.OwnedByGroup
18
33
  })) : null;
19
34
  };
@@ -1,22 +1,37 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.default = void 0;
8
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
- var _react = _interopRequireDefault(require("react"));
10
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
13
  var _constants = require("../../../../../constants");
11
14
  var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
12
15
  var _common = require("../common");
16
+ var _excluded = ["onRender"];
17
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
13
18
  var ReactCountElement = function ReactCountElement(props) {
14
19
  var _context$reactCount;
15
20
  var context = (0, _flexibleUiContext.useFlexibleUiContext)();
16
21
  var data = context ? (0, _common.toBadgeProps)((_context$reactCount = context.reactCount) === null || _context$reactCount === void 0 ? void 0 : _context$reactCount.toString()) : null;
22
+ var _ref = props || {},
23
+ onRender = _ref.onRender,
24
+ restProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
25
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
26
+ if ((0, _platformFeatureFlags.fg)('platform-linking-additional-flexible-element-props')) {
27
+ // eslint-disable-next-line react-hooks/rules-of-hooks
28
+ (0, _react.useEffect)(function () {
29
+ onRender === null || onRender === void 0 || onRender(!!data);
30
+ }, [data, onRender]);
31
+ }
17
32
  return data ? /*#__PURE__*/_react.default.createElement(_common.BaseBadgeElement, (0, _extends2.default)({
18
33
  icon: _constants.IconType.React
19
- }, data, props, {
34
+ }, data, restProps, {
20
35
  name: _constants.ElementName.ReactCount
21
36
  })) : null;
22
37
  };
@@ -42,7 +42,8 @@ var CollaboratorGroupElement = exports.CollaboratorGroupElement = function Colla
42
42
  var CommentCountElement = exports.CommentCountElement = function CommentCountElement(props) {
43
43
  if ((0, _platformFeatureFlags.fg)('platform-linking-additional-flexible-element-props')) {
44
44
  return /*#__PURE__*/_react.default.createElement(_elements.CommentCount, {
45
- color: props === null || props === void 0 ? void 0 : props.color
45
+ color: props === null || props === void 0 ? void 0 : props.color,
46
+ onRender: props === null || props === void 0 ? void 0 : props.onRender
46
47
  });
47
48
  }
48
49
  return /*#__PURE__*/_react.default.createElement(_elements.CommentCount, null);
@@ -78,7 +79,8 @@ var ModifiedOnElement = exports.ModifiedOnElement = function ModifiedOnElement(p
78
79
  if ((0, _platformFeatureFlags.fg)('platform-linking-additional-flexible-element-props')) {
79
80
  return /*#__PURE__*/_react.default.createElement(_elements.ModifiedOn, {
80
81
  hideDatePrefix: props === null || props === void 0 ? void 0 : props.hideDatePrefix,
81
- color: props === null || props === void 0 ? void 0 : props.color
82
+ color: props === null || props === void 0 ? void 0 : props.color,
83
+ onRender: props === null || props === void 0 ? void 0 : props.onRender
82
84
  });
83
85
  }
84
86
  return /*#__PURE__*/_react.default.createElement(_elements.ModifiedOn, null);
@@ -87,12 +89,18 @@ var OwnedByElement = exports.OwnedByElement = function OwnedByElement(props) {
87
89
  if ((0, _platformFeatureFlags.fg)('platform-linking-additional-flexible-element-props')) {
88
90
  return /*#__PURE__*/_react.default.createElement(_elements.OwnedBy, {
89
91
  hideFormat: props === null || props === void 0 ? void 0 : props.hideFormat,
90
- color: props === null || props === void 0 ? void 0 : props.color
92
+ color: props === null || props === void 0 ? void 0 : props.color,
93
+ onRender: props === null || props === void 0 ? void 0 : props.onRender
91
94
  });
92
95
  }
93
96
  return /*#__PURE__*/_react.default.createElement(_elements.OwnedBy, null);
94
97
  };
95
- var OwnedByGroupElement = exports.OwnedByGroupElement = function OwnedByGroupElement() {
98
+ var OwnedByGroupElement = exports.OwnedByGroupElement = function OwnedByGroupElement(props) {
99
+ if ((0, _platformFeatureFlags.fg)('platform-linking-additional-flexible-element-props')) {
100
+ return /*#__PURE__*/_react.default.createElement(_elements.OwnedByGroup, {
101
+ onRender: props === null || props === void 0 ? void 0 : props.onRender
102
+ });
103
+ }
96
104
  return /*#__PURE__*/_react.default.createElement(_elements.OwnedByGroup, null);
97
105
  };
98
106
  var PreviewElement = exports.PreviewElement = function PreviewElement(props) {
@@ -115,7 +123,8 @@ var ProviderElement = exports.ProviderElement = function ProviderElement() {
115
123
  var ReactCountElement = exports.ReactCountElement = function ReactCountElement(props) {
116
124
  if ((0, _platformFeatureFlags.fg)('platform-linking-additional-flexible-element-props')) {
117
125
  return /*#__PURE__*/_react.default.createElement(_elements.ReactCount, {
118
- color: props === null || props === void 0 ? void 0 : props.color
126
+ color: props === null || props === void 0 ? void 0 : props.color,
127
+ onRender: props === null || props === void 0 ? void 0 : props.onRender
119
128
  });
120
129
  }
121
130
  return /*#__PURE__*/_react.default.createElement(_elements.ReactCount, null);
@@ -20,7 +20,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
20
20
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
21
21
  var PACKAGE_DATA = {
22
22
  packageName: "@atlaskit/smart-card",
23
- packageVersion: "38.10.2",
23
+ packageVersion: "38.11.0",
24
24
  componentName: 'linkUrl'
25
25
  };
26
26
  var Anchor = (0, _click.withLinkClickedEvent)('a');
@@ -1,5 +1,5 @@
1
1
  import { extractLink, extractSmartLinkUrl } from '@atlaskit/link-extractors';
2
- import { fg } from "@atlaskit/platform-feature-flags";
2
+ import { fg } from '@atlaskit/platform-feature-flags';
3
3
  import { ActionName, CardAction } from '../../index';
4
4
  import { getDefinitionId, getExtensionKey, getResourceType } from '../../state/helpers';
5
5
  import { canShowAction } from '../../utils/actions/can-show-action';
@@ -1,5 +1,5 @@
1
- import { extractSmartLinkDownloadUrl } from "@atlaskit/link-extractors";
2
- import { fg } from "@atlaskit/platform-feature-flags";
1
+ import { extractSmartLinkDownloadUrl } from '@atlaskit/link-extractors';
2
+ import { fg } from '@atlaskit/platform-feature-flags';
3
3
  import { ActionName, CardAction } from '../../index';
4
4
  import { getDefinitionId, getExtensionKey, getResourceType } from '../../state/helpers';
5
5
  import { downloadUrl as download } from '../../utils';
@@ -1,5 +1,5 @@
1
1
  import { extractLink, extractPreview as extractPreviewData, extractProvider, extractSmartLinkEmbed, extractSmartLinkProvider, extractSmartLinkTitle, extractSmartLinkUrl, extractTitle } from '@atlaskit/link-extractors';
2
- import { fg } from "@atlaskit/platform-feature-flags";
2
+ import { fg } from '@atlaskit/platform-feature-flags';
3
3
  import { ActionName, CardAction } from '../../index';
4
4
  import { getExtensionKey } from '../../state/helpers';
5
5
  import { canShowAction } from '../../utils/actions/can-show-action';
@@ -1,5 +1,5 @@
1
- import { extractEntity, isEntityPresent } from "@atlaskit/link-extractors";
2
- import { fg } from "@atlaskit/platform-feature-flags";
1
+ import { extractEntity, isEntityPresent } from '@atlaskit/link-extractors';
2
+ import { fg } from '@atlaskit/platform-feature-flags';
3
3
 
4
4
  /**
5
5
  * Return link summary
@@ -1,5 +1,5 @@
1
1
  import { extractAri, extractSmartLinkAri } from '@atlaskit/link-extractors';
2
- import { fg } from "@atlaskit/platform-feature-flags";
2
+ import { fg } from '@atlaskit/platform-feature-flags';
3
3
  export const extractViewRelatedLinksAction = response => {
4
4
  var _response$meta, _response$meta$suppor;
5
5
  if (!(response !== null && response !== void 0 && (_response$meta = response.meta) !== null && _response$meta !== void 0 && (_response$meta$suppor = _response$meta.supportedFeature) !== null && _response$meta$suppor !== void 0 && _response$meta$suppor.includes('RelatedLinks'))) {
@@ -1,6 +1,6 @@
1
1
  import { extractPersonOwnedBy, extractSmartLinkAri, extractSmartLinkAuthorGroup, extractSmartLinkCreatedBy, extractSmartLinkCreatedOn, extractSmartLinkModifiedBy, extractSmartLinkModifiedOn, extractSmartLinkTitle, extractSmartLinkUrl, extractType } from '@atlaskit/link-extractors';
2
2
  import { fg } from '@atlaskit/platform-feature-flags';
3
- import { extractSmartLinkSummary } from "../common/primitives/extractSummary";
3
+ import { extractSmartLinkSummary } from '../common/primitives/extractSummary';
4
4
  import { extractFlexibleCardActions } from './actions';
5
5
  import { extractPersonsUpdatedBy } from './collaboratorGroup';
6
6
  import extractLinkTitle from './extract-link-title';
@@ -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: "38.10.2"
5
+ packageVersion: "38.11.0"
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,5 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import React from 'react';
2
+ import React, { useEffect } from 'react';
3
+ import { fg } from '@atlaskit/platform-feature-flags';
3
4
  import { ElementName, IconType } from '../../../../../constants';
4
5
  import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
5
6
  import { BaseBadgeElement, toBadgeProps } from '../common';
@@ -7,9 +8,21 @@ const CommentCountElement = props => {
7
8
  var _context$commentCount;
8
9
  const context = useFlexibleUiContext();
9
10
  const data = context ? toBadgeProps((_context$commentCount = context.commentCount) === null || _context$commentCount === void 0 ? void 0 : _context$commentCount.toString()) : null;
11
+ const {
12
+ onRender,
13
+ ...restProps
14
+ } = props || {};
15
+
16
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
17
+ if (fg('platform-linking-additional-flexible-element-props')) {
18
+ // eslint-disable-next-line react-hooks/rules-of-hooks
19
+ useEffect(() => {
20
+ onRender === null || onRender === void 0 ? void 0 : onRender(!!data);
21
+ }, [data, onRender]);
22
+ }
10
23
  return data ? /*#__PURE__*/React.createElement(BaseBadgeElement, _extends({
11
24
  icon: IconType.Comment
12
- }, data, props, {
25
+ }, data, restProps, {
13
26
  name: ElementName.CommentCount
14
27
  })) : null;
15
28
  };
@@ -1,12 +1,24 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import React from 'react';
2
+ import React, { useEffect } from 'react';
3
+ import { fg } from '@atlaskit/platform-feature-flags';
3
4
  import { ElementName } from '../../../../../constants';
4
5
  import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
5
6
  import { BaseDateTimeElement, toDateTimeProps } from '../common';
6
7
  const ModifiedOnElement = props => {
7
8
  const context = useFlexibleUiContext();
8
9
  const data = context ? toDateTimeProps('modified', context.modifiedOn) : null;
9
- return data ? /*#__PURE__*/React.createElement(BaseDateTimeElement, _extends({}, data, props, {
10
+ const {
11
+ onRender,
12
+ ...restProps
13
+ } = props || {};
14
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
15
+ if (fg('platform-linking-additional-flexible-element-props')) {
16
+ // eslint-disable-next-line react-hooks/rules-of-hooks
17
+ useEffect(() => {
18
+ onRender === null || onRender === void 0 ? void 0 : onRender(!!data);
19
+ }, [data, onRender]);
20
+ }
21
+ return data ? /*#__PURE__*/React.createElement(BaseDateTimeElement, _extends({}, data, restProps, {
10
22
  name: ElementName.ModifiedOn
11
23
  })) : null;
12
24
  };
@@ -1,5 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import React from 'react';
2
+ import React, { useEffect } from 'react';
3
+ import { fg } from '@atlaskit/platform-feature-flags';
3
4
  import { ElementName } from '../../../../../constants';
4
5
  import { messages } from '../../../../../messages';
5
6
  import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
@@ -7,7 +8,18 @@ import { BaseTextElement, toFormattedTextProps } from '../common';
7
8
  const OwnedByElement = props => {
8
9
  const context = useFlexibleUiContext();
9
10
  const data = context ? toFormattedTextProps(messages.owned_by, context.ownedBy) : null;
10
- return data ? /*#__PURE__*/React.createElement(BaseTextElement, _extends({}, data, props, {
11
+ const {
12
+ onRender,
13
+ ...restProps
14
+ } = props || {};
15
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
16
+ if (fg('platform-linking-additional-flexible-element-props')) {
17
+ // eslint-disable-next-line react-hooks/rules-of-hooks
18
+ useEffect(() => {
19
+ onRender === null || onRender === void 0 ? void 0 : onRender(!!data);
20
+ }, [data, onRender]);
21
+ }
22
+ return data ? /*#__PURE__*/React.createElement(BaseTextElement, _extends({}, data, restProps, {
11
23
  name: ElementName.OwnedBy
12
24
  })) : null;
13
25
  };
@@ -1,12 +1,24 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import React from 'react';
2
+ import React, { useEffect } from 'react';
3
+ import { fg } from '@atlaskit/platform-feature-flags';
3
4
  import { ElementName } from '../../../../../constants';
4
5
  import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
5
6
  import { BaseAvatarGroupElement, toAvatarGroupProps } from '../common';
6
7
  const OwnedByGroupElement = props => {
7
8
  const context = useFlexibleUiContext();
8
9
  const data = context ? toAvatarGroupProps(context.ownedByGroup, false) : null;
9
- return data ? /*#__PURE__*/React.createElement(BaseAvatarGroupElement, _extends({}, data, props, {
10
+ const {
11
+ onRender,
12
+ ...restProps
13
+ } = props || {};
14
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
15
+ if (fg('platform-linking-additional-flexible-element-props')) {
16
+ // eslint-disable-next-line react-hooks/rules-of-hooks
17
+ useEffect(() => {
18
+ onRender === null || onRender === void 0 ? void 0 : onRender(!!data);
19
+ }, [data, onRender]);
20
+ }
21
+ return data ? /*#__PURE__*/React.createElement(BaseAvatarGroupElement, _extends({}, data, restProps, {
10
22
  name: ElementName.OwnedByGroup
11
23
  })) : null;
12
24
  };
@@ -1,5 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import React from 'react';
2
+ import React, { useEffect } from 'react';
3
+ import { fg } from '@atlaskit/platform-feature-flags';
3
4
  import { ElementName, IconType } from '../../../../../constants';
4
5
  import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
5
6
  import { BaseBadgeElement, toBadgeProps } from '../common';
@@ -7,9 +8,20 @@ const ReactCountElement = props => {
7
8
  var _context$reactCount;
8
9
  const context = useFlexibleUiContext();
9
10
  const data = context ? toBadgeProps((_context$reactCount = context.reactCount) === null || _context$reactCount === void 0 ? void 0 : _context$reactCount.toString()) : null;
11
+ const {
12
+ onRender,
13
+ ...restProps
14
+ } = props || {};
15
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
16
+ if (fg('platform-linking-additional-flexible-element-props')) {
17
+ // eslint-disable-next-line react-hooks/rules-of-hooks
18
+ useEffect(() => {
19
+ onRender === null || onRender === void 0 ? void 0 : onRender(!!data);
20
+ }, [data, onRender]);
21
+ }
10
22
  return data ? /*#__PURE__*/React.createElement(BaseBadgeElement, _extends({
11
23
  icon: IconType.React
12
- }, data, props, {
24
+ }, data, restProps, {
13
25
  name: ElementName.ReactCount
14
26
  })) : null;
15
27
  };
@@ -23,7 +23,8 @@ export const CollaboratorGroupElement = () => /*#__PURE__*/React.createElement(C
23
23
  export const CommentCountElement = props => {
24
24
  if (fg('platform-linking-additional-flexible-element-props')) {
25
25
  return /*#__PURE__*/React.createElement(CommentCount, {
26
- color: props === null || props === void 0 ? void 0 : props.color
26
+ color: props === null || props === void 0 ? void 0 : props.color,
27
+ onRender: props === null || props === void 0 ? void 0 : props.onRender
27
28
  });
28
29
  }
29
30
  return /*#__PURE__*/React.createElement(CommentCount, null);
@@ -47,7 +48,8 @@ export const ModifiedOnElement = props => {
47
48
  if (fg('platform-linking-additional-flexible-element-props')) {
48
49
  return /*#__PURE__*/React.createElement(ModifiedOn, {
49
50
  hideDatePrefix: props === null || props === void 0 ? void 0 : props.hideDatePrefix,
50
- color: props === null || props === void 0 ? void 0 : props.color
51
+ color: props === null || props === void 0 ? void 0 : props.color,
52
+ onRender: props === null || props === void 0 ? void 0 : props.onRender
51
53
  });
52
54
  }
53
55
  return /*#__PURE__*/React.createElement(ModifiedOn, null);
@@ -56,12 +58,20 @@ export const OwnedByElement = props => {
56
58
  if (fg('platform-linking-additional-flexible-element-props')) {
57
59
  return /*#__PURE__*/React.createElement(OwnedBy, {
58
60
  hideFormat: props === null || props === void 0 ? void 0 : props.hideFormat,
59
- color: props === null || props === void 0 ? void 0 : props.color
61
+ color: props === null || props === void 0 ? void 0 : props.color,
62
+ onRender: props === null || props === void 0 ? void 0 : props.onRender
60
63
  });
61
64
  }
62
65
  return /*#__PURE__*/React.createElement(OwnedBy, null);
63
66
  };
64
- export const OwnedByGroupElement = () => /*#__PURE__*/React.createElement(OwnedByGroup, null);
67
+ export const OwnedByGroupElement = props => {
68
+ if (fg('platform-linking-additional-flexible-element-props')) {
69
+ return /*#__PURE__*/React.createElement(OwnedByGroup, {
70
+ onRender: props === null || props === void 0 ? void 0 : props.onRender
71
+ });
72
+ }
73
+ return /*#__PURE__*/React.createElement(OwnedByGroup, null);
74
+ };
65
75
  export const PreviewElement = props => {
66
76
  if (fg('platform-linking-additional-flexible-element-props')) {
67
77
  return /*#__PURE__*/React.createElement(Preview, {
@@ -76,7 +86,8 @@ export const ProviderElement = () => /*#__PURE__*/React.createElement(Provider,
76
86
  export const ReactCountElement = props => {
77
87
  if (fg('platform-linking-additional-flexible-element-props')) {
78
88
  return /*#__PURE__*/React.createElement(ReactCount, {
79
- color: props === null || props === void 0 ? void 0 : props.color
89
+ color: props === null || props === void 0 ? void 0 : props.color,
90
+ onRender: props === null || props === void 0 ? void 0 : props.onRender
80
91
  });
81
92
  }
82
93
  return /*#__PURE__*/React.createElement(ReactCount, null);
@@ -10,7 +10,7 @@ import LinkWarningModal from './LinkWarningModal';
10
10
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
11
11
  const PACKAGE_DATA = {
12
12
  packageName: "@atlaskit/smart-card",
13
- packageVersion: "38.10.2",
13
+ packageVersion: "38.11.0",
14
14
  componentName: 'linkUrl'
15
15
  };
16
16
  const Anchor = withLinkClickedEvent('a');
@@ -1,7 +1,7 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _regeneratorRuntime from "@babel/runtime/regenerator";
3
3
  import { extractLink, extractSmartLinkUrl } from '@atlaskit/link-extractors';
4
- import { fg } from "@atlaskit/platform-feature-flags";
4
+ import { fg } from '@atlaskit/platform-feature-flags';
5
5
  import { ActionName, CardAction } from '../../index';
6
6
  import { getDefinitionId, getExtensionKey, getResourceType } from '../../state/helpers';
7
7
  import { canShowAction } from '../../utils/actions/can-show-action';
@@ -1,7 +1,7 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _regeneratorRuntime from "@babel/runtime/regenerator";
3
- import { extractSmartLinkDownloadUrl } from "@atlaskit/link-extractors";
4
- import { fg } from "@atlaskit/platform-feature-flags";
3
+ import { extractSmartLinkDownloadUrl } from '@atlaskit/link-extractors';
4
+ import { fg } from '@atlaskit/platform-feature-flags';
5
5
  import { ActionName, CardAction } from '../../index';
6
6
  import { getDefinitionId, getExtensionKey, getResourceType } from '../../state/helpers';
7
7
  import { downloadUrl as download } from '../../utils';
@@ -1,7 +1,7 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _regeneratorRuntime from "@babel/runtime/regenerator";
3
3
  import { extractLink, extractPreview as extractPreviewData, extractProvider, extractSmartLinkEmbed, extractSmartLinkProvider, extractSmartLinkTitle, extractSmartLinkUrl, extractTitle } from '@atlaskit/link-extractors';
4
- import { fg } from "@atlaskit/platform-feature-flags";
4
+ import { fg } from '@atlaskit/platform-feature-flags';
5
5
  import { ActionName, CardAction } from '../../index';
6
6
  import { getExtensionKey } from '../../state/helpers';
7
7
  import { canShowAction } from '../../utils/actions/can-show-action';
@@ -1,5 +1,5 @@
1
- import { extractEntity, isEntityPresent } from "@atlaskit/link-extractors";
2
- import { fg } from "@atlaskit/platform-feature-flags";
1
+ import { extractEntity, isEntityPresent } from '@atlaskit/link-extractors';
2
+ import { fg } from '@atlaskit/platform-feature-flags';
3
3
 
4
4
  /**
5
5
  * Return link summary
@@ -1,5 +1,5 @@
1
1
  import { extractAri, extractSmartLinkAri } from '@atlaskit/link-extractors';
2
- import { fg } from "@atlaskit/platform-feature-flags";
2
+ import { fg } from '@atlaskit/platform-feature-flags';
3
3
  export var extractViewRelatedLinksAction = function extractViewRelatedLinksAction(response) {
4
4
  var _response$meta;
5
5
  if (!(response !== null && response !== void 0 && (_response$meta = response.meta) !== null && _response$meta !== void 0 && (_response$meta = _response$meta.supportedFeature) !== null && _response$meta !== void 0 && _response$meta.includes('RelatedLinks'))) {
@@ -5,7 +5,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
5
5
  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) { _defineProperty(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; }
6
6
  import { extractPersonOwnedBy, extractSmartLinkAri, extractSmartLinkAuthorGroup, extractSmartLinkCreatedBy, extractSmartLinkCreatedOn, extractSmartLinkModifiedBy, extractSmartLinkModifiedOn, extractSmartLinkTitle, extractSmartLinkUrl, extractType } from '@atlaskit/link-extractors';
7
7
  import { fg } from '@atlaskit/platform-feature-flags';
8
- import { extractSmartLinkSummary } from "../common/primitives/extractSummary";
8
+ import { extractSmartLinkSummary } from '../common/primitives/extractSummary';
9
9
  import { extractFlexibleCardActions } from './actions';
10
10
  import { extractPersonsUpdatedBy } from './collaboratorGroup';
11
11
  import extractLinkTitle from './extract-link-title';
@@ -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: "38.10.2"
7
+ packageVersion: "38.11.0"
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,5 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import React from 'react';
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["onRender"];
4
+ import React, { useEffect } from 'react';
5
+ import { fg } from '@atlaskit/platform-feature-flags';
3
6
  import { ElementName, IconType } from '../../../../../constants';
4
7
  import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
5
8
  import { BaseBadgeElement, toBadgeProps } from '../common';
@@ -7,9 +10,20 @@ var CommentCountElement = function CommentCountElement(props) {
7
10
  var _context$commentCount;
8
11
  var context = useFlexibleUiContext();
9
12
  var data = context ? toBadgeProps((_context$commentCount = context.commentCount) === null || _context$commentCount === void 0 ? void 0 : _context$commentCount.toString()) : null;
13
+ var _ref = props || {},
14
+ onRender = _ref.onRender,
15
+ restProps = _objectWithoutProperties(_ref, _excluded);
16
+
17
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
18
+ if (fg('platform-linking-additional-flexible-element-props')) {
19
+ // eslint-disable-next-line react-hooks/rules-of-hooks
20
+ useEffect(function () {
21
+ onRender === null || onRender === void 0 || onRender(!!data);
22
+ }, [data, onRender]);
23
+ }
10
24
  return data ? /*#__PURE__*/React.createElement(BaseBadgeElement, _extends({
11
25
  icon: IconType.Comment
12
- }, data, props, {
26
+ }, data, restProps, {
13
27
  name: ElementName.CommentCount
14
28
  })) : null;
15
29
  };
@@ -1,12 +1,25 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import React from 'react';
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["onRender"];
4
+ import React, { useEffect } from 'react';
5
+ import { fg } from '@atlaskit/platform-feature-flags';
3
6
  import { ElementName } from '../../../../../constants';
4
7
  import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
5
8
  import { BaseDateTimeElement, toDateTimeProps } from '../common';
6
9
  var ModifiedOnElement = function ModifiedOnElement(props) {
7
10
  var context = useFlexibleUiContext();
8
11
  var data = context ? toDateTimeProps('modified', context.modifiedOn) : null;
9
- return data ? /*#__PURE__*/React.createElement(BaseDateTimeElement, _extends({}, data, props, {
12
+ var _ref = props || {},
13
+ onRender = _ref.onRender,
14
+ restProps = _objectWithoutProperties(_ref, _excluded);
15
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
16
+ if (fg('platform-linking-additional-flexible-element-props')) {
17
+ // eslint-disable-next-line react-hooks/rules-of-hooks
18
+ useEffect(function () {
19
+ onRender === null || onRender === void 0 || onRender(!!data);
20
+ }, [data, onRender]);
21
+ }
22
+ return data ? /*#__PURE__*/React.createElement(BaseDateTimeElement, _extends({}, data, restProps, {
10
23
  name: ElementName.ModifiedOn
11
24
  })) : null;
12
25
  };
@@ -1,5 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import React from 'react';
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["onRender"];
4
+ import React, { useEffect } from 'react';
5
+ import { fg } from '@atlaskit/platform-feature-flags';
3
6
  import { ElementName } from '../../../../../constants';
4
7
  import { messages } from '../../../../../messages';
5
8
  import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
@@ -7,7 +10,17 @@ import { BaseTextElement, toFormattedTextProps } from '../common';
7
10
  var OwnedByElement = function OwnedByElement(props) {
8
11
  var context = useFlexibleUiContext();
9
12
  var data = context ? toFormattedTextProps(messages.owned_by, context.ownedBy) : null;
10
- return data ? /*#__PURE__*/React.createElement(BaseTextElement, _extends({}, data, props, {
13
+ var _ref = props || {},
14
+ onRender = _ref.onRender,
15
+ restProps = _objectWithoutProperties(_ref, _excluded);
16
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
17
+ if (fg('platform-linking-additional-flexible-element-props')) {
18
+ // eslint-disable-next-line react-hooks/rules-of-hooks
19
+ useEffect(function () {
20
+ onRender === null || onRender === void 0 || onRender(!!data);
21
+ }, [data, onRender]);
22
+ }
23
+ return data ? /*#__PURE__*/React.createElement(BaseTextElement, _extends({}, data, restProps, {
11
24
  name: ElementName.OwnedBy
12
25
  })) : null;
13
26
  };
@@ -1,12 +1,25 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import React from 'react';
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["onRender"];
4
+ import React, { useEffect } from 'react';
5
+ import { fg } from '@atlaskit/platform-feature-flags';
3
6
  import { ElementName } from '../../../../../constants';
4
7
  import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
5
8
  import { BaseAvatarGroupElement, toAvatarGroupProps } from '../common';
6
9
  var OwnedByGroupElement = function OwnedByGroupElement(props) {
7
10
  var context = useFlexibleUiContext();
8
11
  var data = context ? toAvatarGroupProps(context.ownedByGroup, false) : null;
9
- return data ? /*#__PURE__*/React.createElement(BaseAvatarGroupElement, _extends({}, data, props, {
12
+ var _ref = props || {},
13
+ onRender = _ref.onRender,
14
+ restProps = _objectWithoutProperties(_ref, _excluded);
15
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
16
+ if (fg('platform-linking-additional-flexible-element-props')) {
17
+ // eslint-disable-next-line react-hooks/rules-of-hooks
18
+ useEffect(function () {
19
+ onRender === null || onRender === void 0 || onRender(!!data);
20
+ }, [data, onRender]);
21
+ }
22
+ return data ? /*#__PURE__*/React.createElement(BaseAvatarGroupElement, _extends({}, data, restProps, {
10
23
  name: ElementName.OwnedByGroup
11
24
  })) : null;
12
25
  };
@@ -1,5 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import React from 'react';
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["onRender"];
4
+ import React, { useEffect } from 'react';
5
+ import { fg } from '@atlaskit/platform-feature-flags';
3
6
  import { ElementName, IconType } from '../../../../../constants';
4
7
  import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
5
8
  import { BaseBadgeElement, toBadgeProps } from '../common';
@@ -7,9 +10,19 @@ var ReactCountElement = function ReactCountElement(props) {
7
10
  var _context$reactCount;
8
11
  var context = useFlexibleUiContext();
9
12
  var data = context ? toBadgeProps((_context$reactCount = context.reactCount) === null || _context$reactCount === void 0 ? void 0 : _context$reactCount.toString()) : null;
13
+ var _ref = props || {},
14
+ onRender = _ref.onRender,
15
+ restProps = _objectWithoutProperties(_ref, _excluded);
16
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
17
+ if (fg('platform-linking-additional-flexible-element-props')) {
18
+ // eslint-disable-next-line react-hooks/rules-of-hooks
19
+ useEffect(function () {
20
+ onRender === null || onRender === void 0 || onRender(!!data);
21
+ }, [data, onRender]);
22
+ }
10
23
  return data ? /*#__PURE__*/React.createElement(BaseBadgeElement, _extends({
11
24
  icon: IconType.React
12
- }, data, props, {
25
+ }, data, restProps, {
13
26
  name: ElementName.ReactCount
14
27
  })) : null;
15
28
  };
@@ -35,7 +35,8 @@ export var CollaboratorGroupElement = function CollaboratorGroupElement() {
35
35
  export var CommentCountElement = function CommentCountElement(props) {
36
36
  if (fg('platform-linking-additional-flexible-element-props')) {
37
37
  return /*#__PURE__*/React.createElement(CommentCount, {
38
- color: props === null || props === void 0 ? void 0 : props.color
38
+ color: props === null || props === void 0 ? void 0 : props.color,
39
+ onRender: props === null || props === void 0 ? void 0 : props.onRender
39
40
  });
40
41
  }
41
42
  return /*#__PURE__*/React.createElement(CommentCount, null);
@@ -71,7 +72,8 @@ export var ModifiedOnElement = function ModifiedOnElement(props) {
71
72
  if (fg('platform-linking-additional-flexible-element-props')) {
72
73
  return /*#__PURE__*/React.createElement(ModifiedOn, {
73
74
  hideDatePrefix: props === null || props === void 0 ? void 0 : props.hideDatePrefix,
74
- color: props === null || props === void 0 ? void 0 : props.color
75
+ color: props === null || props === void 0 ? void 0 : props.color,
76
+ onRender: props === null || props === void 0 ? void 0 : props.onRender
75
77
  });
76
78
  }
77
79
  return /*#__PURE__*/React.createElement(ModifiedOn, null);
@@ -80,12 +82,18 @@ export var OwnedByElement = function OwnedByElement(props) {
80
82
  if (fg('platform-linking-additional-flexible-element-props')) {
81
83
  return /*#__PURE__*/React.createElement(OwnedBy, {
82
84
  hideFormat: props === null || props === void 0 ? void 0 : props.hideFormat,
83
- color: props === null || props === void 0 ? void 0 : props.color
85
+ color: props === null || props === void 0 ? void 0 : props.color,
86
+ onRender: props === null || props === void 0 ? void 0 : props.onRender
84
87
  });
85
88
  }
86
89
  return /*#__PURE__*/React.createElement(OwnedBy, null);
87
90
  };
88
- export var OwnedByGroupElement = function OwnedByGroupElement() {
91
+ export var OwnedByGroupElement = function OwnedByGroupElement(props) {
92
+ if (fg('platform-linking-additional-flexible-element-props')) {
93
+ return /*#__PURE__*/React.createElement(OwnedByGroup, {
94
+ onRender: props === null || props === void 0 ? void 0 : props.onRender
95
+ });
96
+ }
89
97
  return /*#__PURE__*/React.createElement(OwnedByGroup, null);
90
98
  };
91
99
  export var PreviewElement = function PreviewElement(props) {
@@ -108,7 +116,8 @@ export var ProviderElement = function ProviderElement() {
108
116
  export var ReactCountElement = function ReactCountElement(props) {
109
117
  if (fg('platform-linking-additional-flexible-element-props')) {
110
118
  return /*#__PURE__*/React.createElement(ReactCount, {
111
- color: props === null || props === void 0 ? void 0 : props.color
119
+ color: props === null || props === void 0 ? void 0 : props.color,
120
+ onRender: props === null || props === void 0 ? void 0 : props.onRender
112
121
  });
113
122
  }
114
123
  return /*#__PURE__*/React.createElement(ReactCount, null);
@@ -13,7 +13,7 @@ import LinkWarningModal from './LinkWarningModal';
13
13
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
14
14
  var PACKAGE_DATA = {
15
15
  packageName: "@atlaskit/smart-card",
16
- packageVersion: "38.10.2",
16
+ packageVersion: "38.11.0",
17
17
  componentName: 'linkUrl'
18
18
  };
19
19
  var Anchor = withLinkClickedEvent('a');
@@ -1,3 +1,3 @@
1
- import { SmartLinkResponse } from "@atlaskit/linking-types";
1
+ import { SmartLinkResponse } from '@atlaskit/linking-types';
2
2
  declare const _default: SmartLinkResponse;
3
3
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import { type JsonLd } from '@atlaskit/json-ld-types';
2
- import type { SmartLinkResponse } from "@atlaskit/linking-types";
2
+ import type { SmartLinkResponse } from '@atlaskit/linking-types';
3
3
  /**
4
4
  * Return link summary
5
5
  */
@@ -1,5 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { type BaseBadgeElementProps } from '../common';
3
- export type CommentCountElementProps = BaseBadgeElementProps;
3
+ export type CommentCountElementProps = BaseBadgeElementProps & {
4
+ onRender?: (hasData: boolean) => void;
5
+ };
4
6
  declare const CommentCountElement: (props: CommentCountElementProps) => JSX.Element | null;
5
7
  export default CommentCountElement;
@@ -1,5 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { type BaseDateTimeElementProps } from '../common';
3
- export type ModifiedOnProps = BaseDateTimeElementProps;
3
+ export type ModifiedOnProps = BaseDateTimeElementProps & {
4
+ onRender?: (hasData: boolean) => void;
5
+ };
4
6
  declare const ModifiedOnElement: (props: ModifiedOnProps) => JSX.Element | null;
5
7
  export default ModifiedOnElement;
@@ -1,5 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { type BaseTextElementProps } from '../common';
3
- export type OwnedByElementProps = BaseTextElementProps;
3
+ export type OwnedByElementProps = BaseTextElementProps & {
4
+ onRender?: (hasData: boolean) => void;
5
+ };
4
6
  declare const OwnedByElement: (props: OwnedByElementProps) => JSX.Element | null;
5
7
  export default OwnedByElement;
@@ -1,5 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { type BaseAvatarGroupElementProps } from '../common';
3
- export type OwnedByGroupElementProps = BaseAvatarGroupElementProps;
3
+ export type OwnedByGroupElementProps = BaseAvatarGroupElementProps & {
4
+ onRender?: (hasData: boolean) => void;
5
+ };
4
6
  declare const OwnedByGroupElement: (props: OwnedByGroupElementProps) => JSX.Element | null;
5
7
  export default OwnedByGroupElement;
@@ -1,5 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { type BaseBadgeElementProps } from '../common';
3
- export type ReactCountElementProps = BaseBadgeElementProps;
3
+ export type ReactCountElementProps = BaseBadgeElementProps & {
4
+ onRender?: (hasData: boolean) => void;
5
+ };
4
6
  declare const ReactCountElement: (props: ReactCountElementProps) => JSX.Element | null;
5
7
  export default ReactCountElement;
@@ -8,14 +8,14 @@
8
8
  */
9
9
  import React from 'react';
10
10
  import { Prettify } from '@atlaskit/linking-common';
11
- import { CommentCount, LinkIcon, ModifiedOn, OwnedBy, Preview, ReactCount, Snippet, Title } from './components/elements';
11
+ import { CommentCount, LinkIcon, ModifiedOn, OwnedBy, OwnedByGroup, Preview, ReactCount, Snippet, Title } from './components/elements';
12
12
  export declare const AssignedToElement: () => React.JSX.Element;
13
13
  export declare const AssignedToGroupElement: () => React.JSX.Element;
14
14
  export declare const AttachmentCountElement: () => React.JSX.Element;
15
15
  export declare const AuthorGroupElement: () => React.JSX.Element;
16
16
  export declare const ChecklistProgressElement: () => React.JSX.Element;
17
17
  export declare const CollaboratorGroupElement: () => React.JSX.Element;
18
- type CommentCountElementProps = Pick<React.ComponentProps<typeof CommentCount>, 'color'>;
18
+ type CommentCountElementProps = Pick<React.ComponentProps<typeof CommentCount>, 'color' | 'onRender'>;
19
19
  export declare const CommentCountElement: (props?: CommentCountElementProps) => React.JSX.Element;
20
20
  export declare const CreatedOnElement: () => React.JSX.Element;
21
21
  export declare const CreatedByElement: () => React.JSX.Element;
@@ -27,11 +27,12 @@ type LinkIconElementProps = Prettify<Pick<React.ComponentProps<typeof LinkIcon>,
27
27
  export declare const LinkIconElement: (props?: LinkIconElementProps) => React.JSX.Element;
28
28
  export declare const LocationElement: () => React.JSX.Element;
29
29
  export declare const ModifiedByElement: () => React.JSX.Element;
30
- type ModifiedOnElementProps = Pick<React.ComponentProps<typeof ModifiedOn>, 'hideDatePrefix' | 'color'>;
30
+ type ModifiedOnElementProps = Pick<React.ComponentProps<typeof ModifiedOn>, 'hideDatePrefix' | 'color' | 'onRender'>;
31
31
  export declare const ModifiedOnElement: (props?: ModifiedOnElementProps) => React.JSX.Element;
32
- type OwnedByElementProps = Pick<React.ComponentProps<typeof OwnedBy>, 'hideFormat' | 'color'>;
32
+ type OwnedByElementProps = Pick<React.ComponentProps<typeof OwnedBy>, 'hideFormat' | 'color' | 'onRender'>;
33
33
  export declare const OwnedByElement: (props?: OwnedByElementProps) => React.JSX.Element;
34
- export declare const OwnedByGroupElement: () => React.JSX.Element;
34
+ type OwnedByGroupElementProps = Pick<React.ComponentProps<typeof OwnedByGroup>, 'onRender'>;
35
+ export declare const OwnedByGroupElement: (props?: OwnedByGroupElementProps) => React.JSX.Element;
35
36
  type PreviewElementProps = {
36
37
  url?: React.ComponentProps<typeof Preview>['overrideUrl'];
37
38
  };
@@ -39,7 +40,7 @@ export declare const PreviewElement: (props?: PreviewElementProps) => React.JSX.
39
40
  export declare const PriorityElement: () => React.JSX.Element;
40
41
  export declare const ProgrammingLanguageElement: () => React.JSX.Element;
41
42
  export declare const ProviderElement: () => React.JSX.Element;
42
- type ReactCountElementProps = Pick<React.ComponentProps<typeof ReactCount>, 'color'>;
43
+ type ReactCountElementProps = Pick<React.ComponentProps<typeof ReactCount>, 'color' | 'onRender'>;
43
44
  export declare const ReactCountElement: (props?: ReactCountElementProps) => React.JSX.Element;
44
45
  export declare const ReadTimeElement: () => React.JSX.Element;
45
46
  export declare const SentOnElement: () => React.JSX.Element;
@@ -1,3 +1,3 @@
1
- import { SmartLinkResponse } from "@atlaskit/linking-types";
1
+ import { SmartLinkResponse } from '@atlaskit/linking-types';
2
2
  declare const _default: SmartLinkResponse;
3
3
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import { type JsonLd } from '@atlaskit/json-ld-types';
2
- import type { SmartLinkResponse } from "@atlaskit/linking-types";
2
+ import type { SmartLinkResponse } from '@atlaskit/linking-types';
3
3
  /**
4
4
  * Return link summary
5
5
  */
@@ -1,5 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { type BaseBadgeElementProps } from '../common';
3
- export type CommentCountElementProps = BaseBadgeElementProps;
3
+ export type CommentCountElementProps = BaseBadgeElementProps & {
4
+ onRender?: (hasData: boolean) => void;
5
+ };
4
6
  declare const CommentCountElement: (props: CommentCountElementProps) => JSX.Element | null;
5
7
  export default CommentCountElement;
@@ -1,5 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { type BaseDateTimeElementProps } from '../common';
3
- export type ModifiedOnProps = BaseDateTimeElementProps;
3
+ export type ModifiedOnProps = BaseDateTimeElementProps & {
4
+ onRender?: (hasData: boolean) => void;
5
+ };
4
6
  declare const ModifiedOnElement: (props: ModifiedOnProps) => JSX.Element | null;
5
7
  export default ModifiedOnElement;
@@ -1,5 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { type BaseTextElementProps } from '../common';
3
- export type OwnedByElementProps = BaseTextElementProps;
3
+ export type OwnedByElementProps = BaseTextElementProps & {
4
+ onRender?: (hasData: boolean) => void;
5
+ };
4
6
  declare const OwnedByElement: (props: OwnedByElementProps) => JSX.Element | null;
5
7
  export default OwnedByElement;
@@ -1,5 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { type BaseAvatarGroupElementProps } from '../common';
3
- export type OwnedByGroupElementProps = BaseAvatarGroupElementProps;
3
+ export type OwnedByGroupElementProps = BaseAvatarGroupElementProps & {
4
+ onRender?: (hasData: boolean) => void;
5
+ };
4
6
  declare const OwnedByGroupElement: (props: OwnedByGroupElementProps) => JSX.Element | null;
5
7
  export default OwnedByGroupElement;
@@ -1,5 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { type BaseBadgeElementProps } from '../common';
3
- export type ReactCountElementProps = BaseBadgeElementProps;
3
+ export type ReactCountElementProps = BaseBadgeElementProps & {
4
+ onRender?: (hasData: boolean) => void;
5
+ };
4
6
  declare const ReactCountElement: (props: ReactCountElementProps) => JSX.Element | null;
5
7
  export default ReactCountElement;
@@ -8,14 +8,14 @@
8
8
  */
9
9
  import React from 'react';
10
10
  import { Prettify } from '@atlaskit/linking-common';
11
- import { CommentCount, LinkIcon, ModifiedOn, OwnedBy, Preview, ReactCount, Snippet, Title } from './components/elements';
11
+ import { CommentCount, LinkIcon, ModifiedOn, OwnedBy, OwnedByGroup, Preview, ReactCount, Snippet, Title } from './components/elements';
12
12
  export declare const AssignedToElement: () => React.JSX.Element;
13
13
  export declare const AssignedToGroupElement: () => React.JSX.Element;
14
14
  export declare const AttachmentCountElement: () => React.JSX.Element;
15
15
  export declare const AuthorGroupElement: () => React.JSX.Element;
16
16
  export declare const ChecklistProgressElement: () => React.JSX.Element;
17
17
  export declare const CollaboratorGroupElement: () => React.JSX.Element;
18
- type CommentCountElementProps = Pick<React.ComponentProps<typeof CommentCount>, 'color'>;
18
+ type CommentCountElementProps = Pick<React.ComponentProps<typeof CommentCount>, 'color' | 'onRender'>;
19
19
  export declare const CommentCountElement: (props?: CommentCountElementProps) => React.JSX.Element;
20
20
  export declare const CreatedOnElement: () => React.JSX.Element;
21
21
  export declare const CreatedByElement: () => React.JSX.Element;
@@ -27,11 +27,12 @@ type LinkIconElementProps = Prettify<Pick<React.ComponentProps<typeof LinkIcon>,
27
27
  export declare const LinkIconElement: (props?: LinkIconElementProps) => React.JSX.Element;
28
28
  export declare const LocationElement: () => React.JSX.Element;
29
29
  export declare const ModifiedByElement: () => React.JSX.Element;
30
- type ModifiedOnElementProps = Pick<React.ComponentProps<typeof ModifiedOn>, 'hideDatePrefix' | 'color'>;
30
+ type ModifiedOnElementProps = Pick<React.ComponentProps<typeof ModifiedOn>, 'hideDatePrefix' | 'color' | 'onRender'>;
31
31
  export declare const ModifiedOnElement: (props?: ModifiedOnElementProps) => React.JSX.Element;
32
- type OwnedByElementProps = Pick<React.ComponentProps<typeof OwnedBy>, 'hideFormat' | 'color'>;
32
+ type OwnedByElementProps = Pick<React.ComponentProps<typeof OwnedBy>, 'hideFormat' | 'color' | 'onRender'>;
33
33
  export declare const OwnedByElement: (props?: OwnedByElementProps) => React.JSX.Element;
34
- export declare const OwnedByGroupElement: () => React.JSX.Element;
34
+ type OwnedByGroupElementProps = Pick<React.ComponentProps<typeof OwnedByGroup>, 'onRender'>;
35
+ export declare const OwnedByGroupElement: (props?: OwnedByGroupElementProps) => React.JSX.Element;
35
36
  type PreviewElementProps = {
36
37
  url?: React.ComponentProps<typeof Preview>['overrideUrl'];
37
38
  };
@@ -39,7 +40,7 @@ export declare const PreviewElement: (props?: PreviewElementProps) => React.JSX.
39
40
  export declare const PriorityElement: () => React.JSX.Element;
40
41
  export declare const ProgrammingLanguageElement: () => React.JSX.Element;
41
42
  export declare const ProviderElement: () => React.JSX.Element;
42
- type ReactCountElementProps = Pick<React.ComponentProps<typeof ReactCount>, 'color'>;
43
+ type ReactCountElementProps = Pick<React.ComponentProps<typeof ReactCount>, 'color' | 'onRender'>;
43
44
  export declare const ReactCountElement: (props?: ReactCountElementProps) => React.JSX.Element;
44
45
  export declare const ReadTimeElement: () => React.JSX.Element;
45
46
  export declare const SentOnElement: () => React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "38.11.0",
3
+ "version": "38.12.0",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"