@atlaskit/media-ui 28.3.4 → 28.4.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,17 @@
1
1
  # @atlaskit/media-ui
2
2
 
3
+ ## 28.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#175834](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/175834)
8
+ [`f10fd5e7fb66f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f10fd5e7fb66f) -
9
+ Enable Delete API for captions
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 28.3.4
4
16
 
5
17
  ### Patch Changes
@@ -16,7 +16,7 @@ var CustomMediaPlayerBase = exports.CustomMediaPlayerBase = function CustomMedia
16
16
  return (0, _platformFeatureFlags.fg)('platform_media_compiled') ? /*#__PURE__*/_react.default.createElement(_indexCompiled.CustomMediaPlayerBase, props) : /*#__PURE__*/_react.default.createElement(_indexEmotion.CustomMediaPlayerBase, props);
17
17
  };
18
18
  var packageName = "@atlaskit/media-ui";
19
- var packageVersion = "28.3.3";
19
+ var packageVersion = "28.3.4";
20
20
 
21
21
  // @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
22
22
  var CustomMediaPlayer = exports.CustomMediaPlayer = (0, _mediaCommon.withMediaAnalyticsContext)({
@@ -17,30 +17,36 @@ function ApiFeedback(_ref) {
17
17
  successDescription = _ref.successDescription,
18
18
  errorDescription = _ref.errorDescription,
19
19
  intl = _ref.intl;
20
+ var flag;
21
+ if (notificationType === 'success') {
22
+ flag = /*#__PURE__*/_react.default.createElement(_flag.AutoDismissFlag, {
23
+ id: 'success',
24
+ icon: /*#__PURE__*/_react.default.createElement(_successCheckCircle.default, {
25
+ label: "Success",
26
+ color: "var(--ds-icon-success, #22A06B)",
27
+ LEGACY_size: "medium",
28
+ spacing: "spacious"
29
+ }),
30
+ key: 'success',
31
+ title: intl.formatMessage(_messages.messages.success),
32
+ description: successDescription
33
+ });
34
+ } else if (notificationType === 'error') {
35
+ flag = /*#__PURE__*/_react.default.createElement(_flag.AutoDismissFlag, {
36
+ id: 'error',
37
+ icon: /*#__PURE__*/_react.default.createElement(_error.default, {
38
+ label: "Error",
39
+ color: "var(--ds-icon-danger, #C9372C)",
40
+ LEGACY_size: "medium",
41
+ spacing: "spacious"
42
+ }),
43
+ key: 'error',
44
+ title: intl.formatMessage(_messages.messages.error),
45
+ description: errorDescription
46
+ });
47
+ }
20
48
  return /*#__PURE__*/_react.default.createElement(_flag.FlagGroup, {
21
49
  onDismissed: onDismissed
22
- }, notificationType === 'success' ? /*#__PURE__*/_react.default.createElement(_flag.AutoDismissFlag, {
23
- id: 'success',
24
- icon: /*#__PURE__*/_react.default.createElement(_successCheckCircle.default, {
25
- label: "Success",
26
- color: "var(--ds-icon-success, #22A06B)",
27
- LEGACY_size: "medium",
28
- spacing: "spacious"
29
- }),
30
- key: 'success',
31
- title: intl.formatMessage(_messages.messages.success),
32
- description: successDescription
33
- }) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null), notificationType === 'error' ? /*#__PURE__*/_react.default.createElement(_flag.AutoDismissFlag, {
34
- id: 'error',
35
- icon: /*#__PURE__*/_react.default.createElement(_error.default, {
36
- label: "Error",
37
- color: "var(--ds-icon-danger, #C9372C)",
38
- LEGACY_size: "medium",
39
- spacing: "spacious"
40
- }),
41
- key: 'error',
42
- title: intl.formatMessage(_messages.messages.error),
43
- description: errorDescription
44
- }) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null));
50
+ }, flag);
45
51
  }
46
52
  var _default = exports.default = (0, _reactIntlNext.injectIntl)(ApiFeedback);
@@ -13,7 +13,7 @@ var _mediaPlayerBase = require("./mediaPlayerBase");
13
13
  var _useTextTracks = require("./useTextTracks");
14
14
  var _analyticsNext = require("@atlaskit/analytics-next");
15
15
  var packageName = "@atlaskit/media-ui";
16
- var packageVersion = "28.3.3";
16
+ var packageVersion = "28.3.4";
17
17
  var MediaPlayerWihtoutContext = exports.MediaPlayerWihtoutContext = function MediaPlayerWihtoutContext(props) {
18
18
  var _useAnalyticsEvents = (0, _analyticsNext.useAnalyticsEvents)(),
19
19
  createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
@@ -89,6 +89,8 @@ var useTextTracks = exports.useTextTracks = function useTextTracks(fileState, me
89
89
  }
90
90
  });
91
91
  });
92
+ } else {
93
+ setTextTracks(undefined);
92
94
  }
93
95
  }, [fileState, collectionName, mediaClient]);
94
96
  return textTracks;
@@ -7,7 +7,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
7
7
  import { withMediaAnalyticsContext } from '@atlaskit/media-common';
8
8
  export const CustomMediaPlayerBase = props => fg('platform_media_compiled') ? /*#__PURE__*/React.createElement(CompiledCustomMediaPlayerBase, props) : /*#__PURE__*/React.createElement(EmotionCustomMediaPlayerBase, props);
9
9
  const packageName = "@atlaskit/media-ui";
10
- const packageVersion = "28.3.3";
10
+ const packageVersion = "28.3.4";
11
11
 
12
12
  // @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
13
13
  export const CustomMediaPlayer = withMediaAnalyticsContext({
@@ -11,30 +11,36 @@ function ApiFeedback({
11
11
  errorDescription,
12
12
  intl
13
13
  }) {
14
+ let flag;
15
+ if (notificationType === 'success') {
16
+ flag = /*#__PURE__*/React.createElement(AutoDismissFlag, {
17
+ id: 'success',
18
+ icon: /*#__PURE__*/React.createElement(SuccessIcon, {
19
+ label: "Success",
20
+ color: "var(--ds-icon-success, #22A06B)",
21
+ LEGACY_size: "medium",
22
+ spacing: "spacious"
23
+ }),
24
+ key: 'success',
25
+ title: intl.formatMessage(messages.success),
26
+ description: successDescription
27
+ });
28
+ } else if (notificationType === 'error') {
29
+ flag = /*#__PURE__*/React.createElement(AutoDismissFlag, {
30
+ id: 'error',
31
+ icon: /*#__PURE__*/React.createElement(ErrorIcon, {
32
+ label: "Error",
33
+ color: "var(--ds-icon-danger, #C9372C)",
34
+ LEGACY_size: "medium",
35
+ spacing: "spacious"
36
+ }),
37
+ key: 'error',
38
+ title: intl.formatMessage(messages.error),
39
+ description: errorDescription
40
+ });
41
+ }
14
42
  return /*#__PURE__*/React.createElement(FlagGroup, {
15
43
  onDismissed: onDismissed
16
- }, notificationType === 'success' ? /*#__PURE__*/React.createElement(AutoDismissFlag, {
17
- id: 'success',
18
- icon: /*#__PURE__*/React.createElement(SuccessIcon, {
19
- label: "Success",
20
- color: "var(--ds-icon-success, #22A06B)",
21
- LEGACY_size: "medium",
22
- spacing: "spacious"
23
- }),
24
- key: 'success',
25
- title: intl.formatMessage(messages.success),
26
- description: successDescription
27
- }) : /*#__PURE__*/React.createElement(React.Fragment, null), notificationType === 'error' ? /*#__PURE__*/React.createElement(AutoDismissFlag, {
28
- id: 'error',
29
- icon: /*#__PURE__*/React.createElement(ErrorIcon, {
30
- label: "Error",
31
- color: "var(--ds-icon-danger, #C9372C)",
32
- LEGACY_size: "medium",
33
- spacing: "spacious"
34
- }),
35
- key: 'error',
36
- title: intl.formatMessage(messages.error),
37
- description: errorDescription
38
- }) : /*#__PURE__*/React.createElement(React.Fragment, null));
44
+ }, flag);
39
45
  }
40
46
  export default injectIntl(ApiFeedback);
@@ -6,7 +6,7 @@ import { MediaPlayerBase } from './mediaPlayerBase';
6
6
  import { useTextTracks } from './useTextTracks';
7
7
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
8
8
  const packageName = "@atlaskit/media-ui";
9
- const packageVersion = "28.3.3";
9
+ const packageVersion = "28.3.4";
10
10
  export const MediaPlayerWihtoutContext = props => {
11
11
  const {
12
12
  createAnalyticsEvent
@@ -53,6 +53,8 @@ export const useTextTracks = (fileState, mediaClient, collectionName) => {
53
53
  }
54
54
  });
55
55
  });
56
+ } else {
57
+ setTextTracks(undefined);
56
58
  }
57
59
  }, [fileState, collectionName, mediaClient]);
58
60
  return textTracks;
@@ -9,7 +9,7 @@ export var CustomMediaPlayerBase = function CustomMediaPlayerBase(props) {
9
9
  return fg('platform_media_compiled') ? /*#__PURE__*/React.createElement(CompiledCustomMediaPlayerBase, props) : /*#__PURE__*/React.createElement(EmotionCustomMediaPlayerBase, props);
10
10
  };
11
11
  var packageName = "@atlaskit/media-ui";
12
- var packageVersion = "28.3.3";
12
+ var packageVersion = "28.3.4";
13
13
 
14
14
  // @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
15
15
  export var CustomMediaPlayer = withMediaAnalyticsContext({
@@ -10,30 +10,36 @@ function ApiFeedback(_ref) {
10
10
  successDescription = _ref.successDescription,
11
11
  errorDescription = _ref.errorDescription,
12
12
  intl = _ref.intl;
13
+ var flag;
14
+ if (notificationType === 'success') {
15
+ flag = /*#__PURE__*/React.createElement(AutoDismissFlag, {
16
+ id: 'success',
17
+ icon: /*#__PURE__*/React.createElement(SuccessIcon, {
18
+ label: "Success",
19
+ color: "var(--ds-icon-success, #22A06B)",
20
+ LEGACY_size: "medium",
21
+ spacing: "spacious"
22
+ }),
23
+ key: 'success',
24
+ title: intl.formatMessage(messages.success),
25
+ description: successDescription
26
+ });
27
+ } else if (notificationType === 'error') {
28
+ flag = /*#__PURE__*/React.createElement(AutoDismissFlag, {
29
+ id: 'error',
30
+ icon: /*#__PURE__*/React.createElement(ErrorIcon, {
31
+ label: "Error",
32
+ color: "var(--ds-icon-danger, #C9372C)",
33
+ LEGACY_size: "medium",
34
+ spacing: "spacious"
35
+ }),
36
+ key: 'error',
37
+ title: intl.formatMessage(messages.error),
38
+ description: errorDescription
39
+ });
40
+ }
13
41
  return /*#__PURE__*/React.createElement(FlagGroup, {
14
42
  onDismissed: onDismissed
15
- }, notificationType === 'success' ? /*#__PURE__*/React.createElement(AutoDismissFlag, {
16
- id: 'success',
17
- icon: /*#__PURE__*/React.createElement(SuccessIcon, {
18
- label: "Success",
19
- color: "var(--ds-icon-success, #22A06B)",
20
- LEGACY_size: "medium",
21
- spacing: "spacious"
22
- }),
23
- key: 'success',
24
- title: intl.formatMessage(messages.success),
25
- description: successDescription
26
- }) : /*#__PURE__*/React.createElement(React.Fragment, null), notificationType === 'error' ? /*#__PURE__*/React.createElement(AutoDismissFlag, {
27
- id: 'error',
28
- icon: /*#__PURE__*/React.createElement(ErrorIcon, {
29
- label: "Error",
30
- color: "var(--ds-icon-danger, #C9372C)",
31
- LEGACY_size: "medium",
32
- spacing: "spacious"
33
- }),
34
- key: 'error',
35
- title: intl.formatMessage(messages.error),
36
- description: errorDescription
37
- }) : /*#__PURE__*/React.createElement(React.Fragment, null));
43
+ }, flag);
38
44
  }
39
45
  export default injectIntl(ApiFeedback);
@@ -6,7 +6,7 @@ import { MediaPlayerBase } from './mediaPlayerBase';
6
6
  import { useTextTracks } from './useTextTracks';
7
7
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
8
8
  var packageName = "@atlaskit/media-ui";
9
- var packageVersion = "28.3.3";
9
+ var packageVersion = "28.3.4";
10
10
  export var MediaPlayerWihtoutContext = function MediaPlayerWihtoutContext(props) {
11
11
  var _useAnalyticsEvents = useAnalyticsEvents(),
12
12
  createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
@@ -82,6 +82,8 @@ export var useTextTracks = function useTextTracks(fileState, mediaClient, collec
82
82
  }
83
83
  });
84
84
  });
85
+ } else {
86
+ setTextTracks(undefined);
85
87
  }
86
88
  }, [fileState, collectionName, mediaClient]);
87
89
  return textTracks;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-ui",
3
- "version": "28.3.4",
3
+ "version": "28.4.0",
4
4
  "description": "Includes common components and utilities used by other media packages",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -36,7 +36,7 @@
36
36
  "@atlaskit/icon-lab": "^5.0.0",
37
37
  "@atlaskit/legacy-custom-icons": "^0.22.0",
38
38
  "@atlaskit/locale": "^3.0.0",
39
- "@atlaskit/media-client": "^34.0.0",
39
+ "@atlaskit/media-client": "^34.1.0",
40
40
  "@atlaskit/media-client-react": "^4.1.0",
41
41
  "@atlaskit/media-common": "^12.2.0",
42
42
  "@atlaskit/media-state": "^1.6.0",