@atlaskit/media-card 79.9.2 → 79.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @atlaskit/media-card
2
2
 
3
+ ## 79.10.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`84bb4ddb6b05a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/84bb4ddb6b05a) -
8
+ Adding a suppressHydrationWarning prop
9
+
3
10
  ## 79.9.2
4
11
 
5
12
  ### Patch Changes
@@ -22,7 +22,7 @@ var _label = _interopRequireDefault(require("@atlaskit/react-ufo/label"));
22
22
  var _excluded = ["identifier"];
23
23
  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); }
24
24
  var packageName = "@atlaskit/media-card";
25
- var packageVersion = "0.0.0-development";
25
+ var packageVersion = "79.9.2";
26
26
  var CardBase = exports.CardBase = function CardBase(_ref) {
27
27
  var identifier = _ref.identifier,
28
28
  otherProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
@@ -87,7 +87,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
87
87
  }(_react.default.Component);
88
88
  (0, _defineProperty2.default)(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
89
89
  var packageName = "@atlaskit/media-card";
90
- var packageVersion = "0.0.0-development";
90
+ var packageVersion = "79.9.2";
91
91
 
92
92
  // @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
93
93
  var MediaCardAnalyticsErrorBoundary = (0, _mediaCommon.withMediaAnalyticsContext)({
@@ -10,6 +10,7 @@ var _reactIntlNext = require("react-intl-next");
10
10
  var _lockLockedLockFilled = _interopRequireDefault(require("@atlaskit/icon/core/migration/lock-locked--lock-filled"));
11
11
  var _truncateText = require("@atlaskit/media-ui/truncateText");
12
12
  var _formatDate = require("@atlaskit/media-ui/formatDate");
13
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
14
  var _titleBoxComponents = require("./titleBoxComponents");
14
15
  var placeholderText = ' ';
15
16
  var isValidTimestamp = function isValidTimestamp(timeStamp) {
@@ -33,6 +34,10 @@ var TitleBox = exports.TitleBox = (0, _reactIntlNext.injectIntl)(function (_ref)
33
34
  text: name !== null && name !== void 0 ? name : placeholderText
34
35
  })), /*#__PURE__*/_react.default.createElement(_titleBoxComponents.TitleBoxFooter, {
35
36
  hasIconOverlap: !!titleBoxIcon
37
+ // Suppressing it here because of a timezone mismatch in the createdAt text
38
+ // that can cause a late mutation in the attachments strip view
39
+ ,
40
+ suppressHydrationWarning: (0, _platformFeatureFlags.fg)('jfp-magma-fix-attachments-hydration-error') ? true : false
36
41
  }, createdAt !== undefined && isValidTimestamp(createdAt) ? (0, _formatDate.formatDate)(createdAt, (_intl$locale = intl === null || intl === void 0 ? void 0 : intl.locale) !== null && _intl$locale !== void 0 ? _intl$locale : 'en') : placeholderText), titleBoxIcon === 'LockFilledIcon' && /*#__PURE__*/_react.default.createElement(_titleBoxComponents.TitleBoxIcon, null, /*#__PURE__*/_react.default.createElement(_lockLockedLockFilled.default, {
37
42
  color: "currentColor",
38
43
  label: "",
@@ -59,9 +59,11 @@ var TitleBoxHeader = exports.TitleBoxHeader = function TitleBoxHeader(props) {
59
59
  TitleBoxHeader.displayName = 'FailedTitleBoxHeader';
60
60
  var titleBoxFooterStyles = null;
61
61
  var TitleBoxFooter = exports.TitleBoxFooter = function TitleBoxFooter(props) {
62
- var hasIconOverlap = props.hasIconOverlap;
62
+ var hasIconOverlap = props.hasIconOverlap,
63
+ suppressHydrationWarning = props.suppressHydrationWarning;
63
64
  return /*#__PURE__*/React.createElement("div", {
64
65
  id: "titleBoxFooter",
66
+ suppressHydrationWarning: suppressHydrationWarning,
65
67
  "data-testid": "title-box-footer"
66
68
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
67
69
  ,
@@ -116,7 +116,7 @@ var MediaInlineCardLoader = exports.default = /*#__PURE__*/function (_React$Pure
116
116
  ErrorBoundary = _this$state.ErrorBoundary;
117
117
  var analyticsContext = {
118
118
  packageVersion: "@atlaskit/media-card",
119
- packageName: "0.0.0-development",
119
+ packageName: "79.9.2",
120
120
  componentName: 'mediaInlineCard',
121
121
  component: 'mediaInlineCard'
122
122
  };
@@ -15,7 +15,7 @@ var _mediaClient = require("@atlaskit/media-client");
15
15
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
16
16
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
17
17
  var packageName = "@atlaskit/media-card";
18
- var packageVersion = "0.0.0-development";
18
+ var packageVersion = "79.9.2";
19
19
  var SAMPLE_RATE = 0.05;
20
20
  var concurrentExperience;
21
21
  var getExperience = function getExperience(id) {
@@ -11,7 +11,7 @@ import { useAnalyticsEvents } from '@atlaskit/analytics-next';
11
11
  import { fg } from '@atlaskit/platform-feature-flags';
12
12
  import UFOLabel from '@atlaskit/react-ufo/label';
13
13
  const packageName = "@atlaskit/media-card";
14
- const packageVersion = "0.0.0-development";
14
+ const packageVersion = "79.9.2";
15
15
  export const CardBase = ({
16
16
  identifier,
17
17
  ...otherProps
@@ -66,7 +66,7 @@ class WrappedMediaCardAnalyticsErrorBoundary extends React.Component {
66
66
  }
67
67
  _defineProperty(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
68
68
  const packageName = "@atlaskit/media-card";
69
- const packageVersion = "0.0.0-development";
69
+ const packageVersion = "79.9.2";
70
70
 
71
71
  // @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
72
72
  const MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
@@ -3,6 +3,7 @@ import { injectIntl } from 'react-intl-next';
3
3
  import LockFilledIcon from '@atlaskit/icon/core/migration/lock-locked--lock-filled';
4
4
  import { Truncate } from '@atlaskit/media-ui/truncateText';
5
5
  import { formatDate } from '@atlaskit/media-ui/formatDate';
6
+ import { fg } from '@atlaskit/platform-feature-flags';
6
7
  import { TitleBoxWrapper, TitleBoxFooter, TitleBoxHeader, TitleBoxIcon } from './titleBoxComponents';
7
8
  const placeholderText = ' ';
8
9
  const isValidTimestamp = timeStamp => new Date(timeStamp).getTime() > 0;
@@ -25,6 +26,10 @@ export const TitleBox = injectIntl(({
25
26
  text: name !== null && name !== void 0 ? name : placeholderText
26
27
  })), /*#__PURE__*/React.createElement(TitleBoxFooter, {
27
28
  hasIconOverlap: !!titleBoxIcon
29
+ // Suppressing it here because of a timezone mismatch in the createdAt text
30
+ // that can cause a late mutation in the attachments strip view
31
+ ,
32
+ suppressHydrationWarning: fg('jfp-magma-fix-attachments-hydration-error') ? true : false
28
33
  }, createdAt !== undefined && isValidTimestamp(createdAt) ? formatDate(createdAt, (_intl$locale = intl === null || intl === void 0 ? void 0 : intl.locale) !== null && _intl$locale !== void 0 ? _intl$locale : 'en') : placeholderText), titleBoxIcon === 'LockFilledIcon' && /*#__PURE__*/React.createElement(TitleBoxIcon, null, /*#__PURE__*/React.createElement(LockFilledIcon, {
29
34
  color: "currentColor",
30
35
  label: "",
@@ -57,10 +57,12 @@ TitleBoxHeader.displayName = 'FailedTitleBoxHeader';
57
57
  const titleBoxFooterStyles = null;
58
58
  export const TitleBoxFooter = props => {
59
59
  const {
60
- hasIconOverlap
60
+ hasIconOverlap,
61
+ suppressHydrationWarning
61
62
  } = props;
62
63
  return /*#__PURE__*/React.createElement("div", {
63
64
  id: "titleBoxFooter",
65
+ suppressHydrationWarning: suppressHydrationWarning,
64
66
  "data-testid": "title-box-footer"
65
67
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
66
68
  ,
@@ -37,7 +37,7 @@ export default class MediaInlineCardLoader extends React.PureComponent {
37
37
  } = this.state;
38
38
  const analyticsContext = {
39
39
  packageVersion: "@atlaskit/media-card",
40
- packageName: "0.0.0-development",
40
+ packageName: "79.9.2",
41
41
  componentName: 'mediaInlineCard',
42
42
  component: 'mediaInlineCard'
43
43
  };
@@ -5,7 +5,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
5
5
  import { MediaCardError } from '../errors';
6
6
  import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
7
7
  const packageName = "@atlaskit/media-card";
8
- const packageVersion = "0.0.0-development";
8
+ const packageVersion = "79.9.2";
9
9
  const SAMPLE_RATE = 0.05;
10
10
  let concurrentExperience;
11
11
  const getExperience = id => {
@@ -13,7 +13,7 @@ import { useAnalyticsEvents } from '@atlaskit/analytics-next';
13
13
  import { fg } from '@atlaskit/platform-feature-flags';
14
14
  import UFOLabel from '@atlaskit/react-ufo/label';
15
15
  var packageName = "@atlaskit/media-card";
16
- var packageVersion = "0.0.0-development";
16
+ var packageVersion = "79.9.2";
17
17
  export var CardBase = function CardBase(_ref) {
18
18
  var identifier = _ref.identifier,
19
19
  otherProps = _objectWithoutProperties(_ref, _excluded);
@@ -80,7 +80,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
80
80
  }(React.Component);
81
81
  _defineProperty(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
82
82
  var packageName = "@atlaskit/media-card";
83
- var packageVersion = "0.0.0-development";
83
+ var packageVersion = "79.9.2";
84
84
 
85
85
  // @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
86
86
  var MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
@@ -3,6 +3,7 @@ import { injectIntl } from 'react-intl-next';
3
3
  import LockFilledIcon from '@atlaskit/icon/core/migration/lock-locked--lock-filled';
4
4
  import { Truncate } from '@atlaskit/media-ui/truncateText';
5
5
  import { formatDate } from '@atlaskit/media-ui/formatDate';
6
+ import { fg } from '@atlaskit/platform-feature-flags';
6
7
  import { TitleBoxWrapper, TitleBoxFooter, TitleBoxHeader, TitleBoxIcon } from './titleBoxComponents';
7
8
  var placeholderText = ' ';
8
9
  var isValidTimestamp = function isValidTimestamp(timeStamp) {
@@ -26,6 +27,10 @@ export var TitleBox = injectIntl(function (_ref) {
26
27
  text: name !== null && name !== void 0 ? name : placeholderText
27
28
  })), /*#__PURE__*/React.createElement(TitleBoxFooter, {
28
29
  hasIconOverlap: !!titleBoxIcon
30
+ // Suppressing it here because of a timezone mismatch in the createdAt text
31
+ // that can cause a late mutation in the attachments strip view
32
+ ,
33
+ suppressHydrationWarning: fg('jfp-magma-fix-attachments-hydration-error') ? true : false
29
34
  }, createdAt !== undefined && isValidTimestamp(createdAt) ? formatDate(createdAt, (_intl$locale = intl === null || intl === void 0 ? void 0 : intl.locale) !== null && _intl$locale !== void 0 ? _intl$locale : 'en') : placeholderText), titleBoxIcon === 'LockFilledIcon' && /*#__PURE__*/React.createElement(TitleBoxIcon, null, /*#__PURE__*/React.createElement(LockFilledIcon, {
30
35
  color: "currentColor",
31
36
  label: "",
@@ -51,9 +51,11 @@ export var TitleBoxHeader = function TitleBoxHeader(props) {
51
51
  TitleBoxHeader.displayName = 'FailedTitleBoxHeader';
52
52
  var titleBoxFooterStyles = null;
53
53
  export var TitleBoxFooter = function TitleBoxFooter(props) {
54
- var hasIconOverlap = props.hasIconOverlap;
54
+ var hasIconOverlap = props.hasIconOverlap,
55
+ suppressHydrationWarning = props.suppressHydrationWarning;
55
56
  return /*#__PURE__*/React.createElement("div", {
56
57
  id: "titleBoxFooter",
58
+ suppressHydrationWarning: suppressHydrationWarning,
57
59
  "data-testid": "title-box-footer"
58
60
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
59
61
  ,
@@ -101,7 +101,7 @@ var MediaInlineCardLoader = /*#__PURE__*/function (_React$PureComponent) {
101
101
  ErrorBoundary = _this$state.ErrorBoundary;
102
102
  var analyticsContext = {
103
103
  packageVersion: "@atlaskit/media-card",
104
- packageName: "0.0.0-development",
104
+ packageName: "79.9.2",
105
105
  componentName: 'mediaInlineCard',
106
106
  component: 'mediaInlineCard'
107
107
  };
@@ -8,7 +8,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
8
8
  import { MediaCardError } from '../errors';
9
9
  import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
10
10
  var packageName = "@atlaskit/media-card";
11
- var packageVersion = "0.0.0-development";
11
+ var packageVersion = "79.9.2";
12
12
  var SAMPLE_RATE = 0.05;
13
13
  var concurrentExperience;
14
14
  var getExperience = function getExperience(id) {
@@ -20,6 +20,7 @@ export type TitleBoxWrapperProps = {
20
20
  };
21
21
  export type TitleBoxFooterProps = {
22
22
  hasIconOverlap: boolean;
23
+ suppressHydrationWarning?: boolean;
23
24
  children?: React.ReactNode;
24
25
  };
25
26
  export type TitleBoxHeaderProps = {
@@ -20,6 +20,7 @@ export type TitleBoxWrapperProps = {
20
20
  };
21
21
  export type TitleBoxFooterProps = {
22
22
  hasIconOverlap: boolean;
23
+ suppressHydrationWarning?: boolean;
23
24
  children?: React.ReactNode;
24
25
  };
25
26
  export type TitleBoxHeaderProps = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-card",
3
- "version": "79.9.2",
3
+ "version": "79.10.0",
4
4
  "description": "Includes all media card related components, CardView, CardViewSmall, Card...",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -71,7 +71,7 @@
71
71
  "@af/integration-testing": "workspace:^",
72
72
  "@atlaskit/analytics-listeners": "^9.1.0",
73
73
  "@atlaskit/analytics-namespaced-context": "^7.2.0",
74
- "@atlaskit/form": "^14.3.0",
74
+ "@atlaskit/form": "^14.4.0",
75
75
  "@atlaskit/inline-message": "^15.4.0",
76
76
  "@atlaskit/media-core": "^37.0.0",
77
77
  "@atlaskit/media-picker": "^70.1.0",
@@ -143,6 +143,9 @@
143
143
  },
144
144
  "media-perf-ratio-calc-fix": {
145
145
  "type": "boolean"
146
+ },
147
+ "jfp-magma-fix-attachments-hydration-error": {
148
+ "type": "boolean"
146
149
  }
147
150
  },
148
151
  "techstack": {