@atlaskit/media-viewer 54.6.5 → 54.7.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 +21 -0
- package/dist/cjs/analytics/events/operational/previewTooLarge.js +29 -0
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/cjs/analytics/ufoExperiences.js +1 -1
- package/dist/cjs/content.js +6 -4
- package/dist/cjs/download.js +6 -5
- package/dist/cjs/errorMessage.js +31 -6
- package/dist/cjs/header.js +24 -19
- package/dist/cjs/item-viewer.js +5 -5
- package/dist/cjs/list.js +2 -2
- package/dist/cjs/loading.js +2 -2
- package/dist/cjs/media-viewer.js +2 -2
- package/dist/cjs/navigation.js +6 -5
- package/dist/cjs/viewers/archiveSidebar/archive-sidebar-folder-entry.js +2 -2
- package/dist/cjs/viewers/archiveSidebar/archive.js +9 -7
- package/dist/cjs/viewers/archiveSidebar/styleWrappers.js +2 -2
- package/dist/cjs/viewers/audio.js +2 -2
- package/dist/cjs/viewers/base-viewer.js +2 -2
- package/dist/cjs/viewers/codeViewer/index.js +4 -3
- package/dist/cjs/viewers/doc/passwordInput.js +6 -6
- package/dist/cjs/viewers/image/index.js +2 -2
- package/dist/cjs/viewers/image/interactive-img.js +14 -10
- package/dist/cjs/viewers/svg/index.js +9 -7
- package/dist/cjs/viewers/svg/utils.js +3 -3
- package/dist/cjs/viewers/video.js +4 -3
- package/dist/cjs/zoomControls.js +8 -6
- package/dist/es2019/analytics/events/operational/previewTooLarge.js +24 -0
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/analytics/ufoExperiences.js +1 -1
- package/dist/es2019/content.js +3 -1
- package/dist/es2019/download.js +2 -1
- package/dist/es2019/errorMessage.js +26 -2
- package/dist/es2019/header.js +7 -2
- package/dist/es2019/item-viewer.js +2 -2
- package/dist/es2019/list.js +1 -1
- package/dist/es2019/loading.js +1 -1
- package/dist/es2019/media-viewer.js +1 -1
- package/dist/es2019/navigation.js +2 -2
- package/dist/es2019/viewers/archiveSidebar/archive-sidebar-folder-entry.js +1 -1
- package/dist/es2019/viewers/archiveSidebar/archive.js +4 -2
- package/dist/es2019/viewers/archiveSidebar/styleWrappers.js +1 -1
- package/dist/es2019/viewers/audio.js +1 -1
- package/dist/es2019/viewers/base-viewer.js +1 -1
- package/dist/es2019/viewers/codeViewer/index.js +2 -1
- package/dist/es2019/viewers/doc/passwordInput.js +1 -1
- package/dist/es2019/viewers/image/index.js +1 -1
- package/dist/es2019/viewers/image/interactive-img.js +5 -1
- package/dist/es2019/viewers/svg/index.js +3 -1
- package/dist/es2019/viewers/svg/utils.js +1 -1
- package/dist/es2019/viewers/video.js +2 -1
- package/dist/es2019/zoomControls.js +3 -2
- package/dist/esm/analytics/events/operational/previewTooLarge.js +23 -0
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/analytics/ufoExperiences.js +1 -1
- package/dist/esm/content.js +3 -1
- package/dist/esm/download.js +2 -1
- package/dist/esm/errorMessage.js +27 -2
- package/dist/esm/header.js +7 -2
- package/dist/esm/item-viewer.js +2 -2
- package/dist/esm/list.js +1 -1
- package/dist/esm/loading.js +1 -1
- package/dist/esm/media-viewer.js +1 -1
- package/dist/esm/navigation.js +2 -2
- package/dist/esm/viewers/archiveSidebar/archive-sidebar-folder-entry.js +1 -1
- package/dist/esm/viewers/archiveSidebar/archive.js +4 -2
- package/dist/esm/viewers/archiveSidebar/styleWrappers.js +1 -1
- package/dist/esm/viewers/audio.js +1 -1
- package/dist/esm/viewers/base-viewer.js +1 -1
- package/dist/esm/viewers/codeViewer/index.js +2 -1
- package/dist/esm/viewers/doc/passwordInput.js +1 -1
- package/dist/esm/viewers/image/index.js +1 -1
- package/dist/esm/viewers/image/interactive-img.js +5 -1
- package/dist/esm/viewers/svg/index.js +3 -1
- package/dist/esm/viewers/svg/utils.js +1 -1
- package/dist/esm/viewers/video.js +2 -1
- package/dist/esm/zoomControls.js +3 -2
- package/dist/types/analytics/events/index.d.ts +2 -1
- package/dist/types/analytics/events/operational/_mediaFile.d.ts +1 -1
- package/dist/types/analytics/events/operational/previewTooLarge.d.ts +9 -0
- package/dist/types/content.d.ts +1 -1
- package/dist/types/errorMessage.d.ts +4 -1
- package/dist/types/item-viewer.d.ts +1 -1
- package/dist/types/list.d.ts +1 -1
- package/dist/types/viewers/audio.d.ts +1 -1
- package/dist/types/viewers/image/interactive-img.d.ts +2 -1
- package/dist/types/viewers/svg/utils.d.ts +2 -1
- package/dist/types/viewers/video.d.ts +1 -1
- package/example-helpers/MainWrapper.tsx +1 -1
- package/package.json +9 -6
|
@@ -20,7 +20,8 @@ var _errors = require("../../errors");
|
|
|
20
20
|
var _loading = require("../../loading");
|
|
21
21
|
var _baseViewer = require("../base-viewer");
|
|
22
22
|
var _util = require("./util");
|
|
23
|
-
var
|
|
23
|
+
var _getLanguageType = require("@atlaskit/media-ui/getLanguageType");
|
|
24
|
+
var _getExtension = require("@atlaskit/media-ui/getExtension");
|
|
24
25
|
var _msgParser = require("./msg-parser");
|
|
25
26
|
var _CodeRendererAdvanced = require("./CodeRendererAdvanced/CodeRendererAdvanced");
|
|
26
27
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
@@ -82,7 +83,7 @@ var CodeViewer = exports.CodeViewer = /*#__PURE__*/function (_BaseViewer) {
|
|
|
82
83
|
});
|
|
83
84
|
case 4:
|
|
84
85
|
response = _context.sent;
|
|
85
|
-
ext = (0,
|
|
86
|
+
ext = (0, _getExtension.getExtension)(item.name); // Pass through EmailViewer logic
|
|
86
87
|
if (!(ext === 'msg')) {
|
|
87
88
|
_context.next = 8;
|
|
88
89
|
break;
|
|
@@ -167,7 +168,7 @@ var CodeViewer = exports.CodeViewer = /*#__PURE__*/function (_BaseViewer) {
|
|
|
167
168
|
key: "getCodeLanguage",
|
|
168
169
|
value: function getCodeLanguage(item) {
|
|
169
170
|
if (!(0, _mediaClient.isErrorFileState)(item)) {
|
|
170
|
-
return (0,
|
|
171
|
+
return (0, _getLanguageType.getLanguageType)(item.name, item.mimeType);
|
|
171
172
|
}
|
|
172
173
|
return _util.DEFAULT_LANGUAGE;
|
|
173
174
|
}
|
|
@@ -19,7 +19,7 @@ var _lockLocked = _interopRequireDefault(require("@atlaskit/icon/core/lock-locke
|
|
|
19
19
|
var _form = _interopRequireDefault(require("@atlaskit/form/form"));
|
|
20
20
|
var _field = _interopRequireDefault(require("@atlaskit/form/field"));
|
|
21
21
|
var _reactIntl = require("react-intl");
|
|
22
|
-
var
|
|
22
|
+
var _messages = require("@atlaskit/media-ui/messages");
|
|
23
23
|
var _primitives = require("@atlaskit/primitives");
|
|
24
24
|
var _statusError = _interopRequireDefault(require("@atlaskit/icon/core/status-error"));
|
|
25
25
|
var _heading = _interopRequireDefault(require("@atlaskit/heading/heading"));
|
|
@@ -83,7 +83,7 @@ var PasswordInput = exports.PasswordInput = function PasswordInput(_ref) {
|
|
|
83
83
|
}, /*#__PURE__*/React.createElement(_heading.default, {
|
|
84
84
|
as: "h1",
|
|
85
85
|
size: "medium"
|
|
86
|
-
}, /*#__PURE__*/React.createElement(_reactIntl.FormattedMessage,
|
|
86
|
+
}, /*#__PURE__*/React.createElement(_reactIntl.FormattedMessage, _messages.messages.password_protected_pdf)))), /*#__PURE__*/React.createElement(_field.default, {
|
|
87
87
|
name: "password",
|
|
88
88
|
defaultValue: "",
|
|
89
89
|
isRequired: true
|
|
@@ -93,8 +93,8 @@ var PasswordInput = exports.PasswordInput = function PasswordInput(_ref) {
|
|
|
93
93
|
xcss: inputStyle
|
|
94
94
|
}, /*#__PURE__*/React.createElement(_textField.default, (0, _extends2.default)({}, fieldProps, {
|
|
95
95
|
type: "password",
|
|
96
|
-
"aria-label": intl.formatMessage(
|
|
97
|
-
placeholder: intl.formatMessage(
|
|
96
|
+
"aria-label": intl.formatMessage(_messages.messages.password),
|
|
97
|
+
placeholder: intl.formatMessage(_messages.messages.enter_password),
|
|
98
98
|
ref: passwordInputRef,
|
|
99
99
|
"aria-describedby": formError ? "".concat(fieldProps.id, "-error") : undefined,
|
|
100
100
|
onChange: function onChange(value) {
|
|
@@ -113,13 +113,13 @@ var PasswordInput = exports.PasswordInput = function PasswordInput(_ref) {
|
|
|
113
113
|
className: (0, _runtime.ax)(["_19pkidpf _18u01b66"])
|
|
114
114
|
}, /*#__PURE__*/React.createElement(_primitives.Text, {
|
|
115
115
|
as: "p"
|
|
116
|
-
}, /*#__PURE__*/React.createElement(_reactIntl.FormattedMessage,
|
|
116
|
+
}, /*#__PURE__*/React.createElement(_reactIntl.FormattedMessage, _messages.messages.incorrect_password)))));
|
|
117
117
|
}), /*#__PURE__*/React.createElement(_primitives.Box, {
|
|
118
118
|
xcss: footerStyles
|
|
119
119
|
}, /*#__PURE__*/React.createElement(_button.default, {
|
|
120
120
|
appearance: "primary",
|
|
121
121
|
type: "submit",
|
|
122
122
|
isLoading: submitting
|
|
123
|
-
}, /*#__PURE__*/React.createElement(_reactIntl.FormattedMessage,
|
|
123
|
+
}, /*#__PURE__*/React.createElement(_reactIntl.FormattedMessage, _messages.messages.submit))));
|
|
124
124
|
});
|
|
125
125
|
};
|
|
@@ -16,7 +16,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
16
16
|
var _react = _interopRequireDefault(require("react"));
|
|
17
17
|
var _mediaClient = require("@atlaskit/media-client");
|
|
18
18
|
var _mediaCommon = require("@atlaskit/media-common");
|
|
19
|
-
var
|
|
19
|
+
var _getOrientation = require("@atlaskit/media-ui/imageMetaData/getOrientation");
|
|
20
20
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
21
21
|
var _domain = require("../../domain");
|
|
22
22
|
var _errors = require("../../errors");
|
|
@@ -109,7 +109,7 @@ var ImageViewer = exports.ImageViewer = /*#__PURE__*/function (_BaseViewer) {
|
|
|
109
109
|
break;
|
|
110
110
|
}
|
|
111
111
|
_context.next = 8;
|
|
112
|
-
return (0,
|
|
112
|
+
return (0, _getOrientation.getOrientation)(value);
|
|
113
113
|
case 8:
|
|
114
114
|
orientation = _context.sent;
|
|
115
115
|
objectUrl = URL.createObjectURL(value);
|
|
@@ -13,7 +13,11 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
13
13
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
15
|
var _react = _interopRequireDefault(require("react"));
|
|
16
|
-
var
|
|
16
|
+
var _camera = require("@atlaskit/media-ui/camera/camera");
|
|
17
|
+
var _getCssFromImageOrientation = require("@atlaskit/media-ui/imageMetaData/getCssFromImageOrientation");
|
|
18
|
+
var _classNames = require("@atlaskit/media-ui/classNames");
|
|
19
|
+
var _rectangle = require("@atlaskit/media-ui/rectangle");
|
|
20
|
+
var _vector = require("@atlaskit/media-ui/vector2");
|
|
17
21
|
var _mediaCommon = require("@atlaskit/media-common");
|
|
18
22
|
var _constants = require("@atlaskit/media-client/constants");
|
|
19
23
|
var _withAnalyticsEvents = _interopRequireDefault(require("@atlaskit/analytics-next/withAnalyticsEvents"));
|
|
@@ -35,12 +39,12 @@ function zoomLevelAfterResize(newCamera, oldCamera, oldZoomLevel) {
|
|
|
35
39
|
var clientRectangle = function clientRectangle(el) {
|
|
36
40
|
var clientWidth = el.clientWidth,
|
|
37
41
|
clientHeight = el.clientHeight;
|
|
38
|
-
return new
|
|
42
|
+
return new _rectangle.Rectangle(clientWidth, clientHeight);
|
|
39
43
|
};
|
|
40
44
|
var naturalSizeRectangle = function naturalSizeRectangle(el) {
|
|
41
45
|
var naturalWidth = el.naturalWidth,
|
|
42
46
|
naturalHeight = el.naturalHeight;
|
|
43
|
-
return new
|
|
47
|
+
return new _rectangle.Rectangle(naturalWidth, naturalHeight);
|
|
44
48
|
};
|
|
45
49
|
var initialState = {
|
|
46
50
|
zoomLevel: new _zoomLevel.ZoomLevel(1),
|
|
@@ -48,7 +52,7 @@ var initialState = {
|
|
|
48
52
|
isHDActivating: false,
|
|
49
53
|
isHDAvailable: false,
|
|
50
54
|
isDragging: false,
|
|
51
|
-
cursorPos: new
|
|
55
|
+
cursorPos: new _vector.Vector2(0, 0),
|
|
52
56
|
hasBeenLoadedOnce: false
|
|
53
57
|
};
|
|
54
58
|
var InteractiveImgComponent = exports.InteractiveImgComponent = /*#__PURE__*/function (_React$Component) {
|
|
@@ -89,7 +93,7 @@ var InteractiveImgComponent = exports.InteractiveImgComponent = /*#__PURE__*/fun
|
|
|
89
93
|
}
|
|
90
94
|
var viewport = clientRectangle(_this.wrapper);
|
|
91
95
|
var originalImgRect = naturalSizeRectangle(ev.currentTarget);
|
|
92
|
-
var camera = new
|
|
96
|
+
var camera = new _camera.Camera(viewport, originalImgRect);
|
|
93
97
|
var newZoomLevel;
|
|
94
98
|
if (hasBeenLoadedOnce && currentCamera) {
|
|
95
99
|
/* This is not first time image is loading. Likely due to new (HD) image is loaded.
|
|
@@ -149,7 +153,7 @@ var InteractiveImgComponent = exports.InteractiveImgComponent = /*#__PURE__*/fun
|
|
|
149
153
|
}
|
|
150
154
|
var scrollLeft = wrapper.scrollLeft,
|
|
151
155
|
scrollTop = wrapper.scrollTop;
|
|
152
|
-
var prevOffset = new
|
|
156
|
+
var prevOffset = new _vector.Vector2(scrollLeft, scrollTop);
|
|
153
157
|
var _this$state3 = _this.state,
|
|
154
158
|
prevZoomLevel = _this$state3.zoomLevel,
|
|
155
159
|
prevIsHDActive = _this$state3.isHDActive,
|
|
@@ -175,7 +179,7 @@ var InteractiveImgComponent = exports.InteractiveImgComponent = /*#__PURE__*/fun
|
|
|
175
179
|
ev.preventDefault();
|
|
176
180
|
_this.setState({
|
|
177
181
|
isDragging: true,
|
|
178
|
-
cursorPos: new
|
|
182
|
+
cursorPos: new _vector.Vector2(ev.screenX, ev.screenY)
|
|
179
183
|
});
|
|
180
184
|
});
|
|
181
185
|
(0, _defineProperty2.default)(_this, "stopDragging", function (ev) {
|
|
@@ -186,7 +190,7 @@ var InteractiveImgComponent = exports.InteractiveImgComponent = /*#__PURE__*/fun
|
|
|
186
190
|
});
|
|
187
191
|
(0, _defineProperty2.default)(_this, "panImage", function (ev) {
|
|
188
192
|
if (_this.state.isDragging && _this.wrapper) {
|
|
189
|
-
var cursorPos = new
|
|
193
|
+
var cursorPos = new _vector.Vector2(ev.screenX, ev.screenY);
|
|
190
194
|
var delta = _this.state.cursorPos.sub(cursorPos);
|
|
191
195
|
_this.setState({
|
|
192
196
|
cursorPos: cursorPos
|
|
@@ -227,7 +231,7 @@ var InteractiveImgComponent = exports.InteractiveImgComponent = /*#__PURE__*/fun
|
|
|
227
231
|
/*#__PURE__*/
|
|
228
232
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
229
233
|
_react.default.createElement(_styleWrappers.HDIconGroupWrapper, {
|
|
230
|
-
className:
|
|
234
|
+
className: _classNames.hideControlsClassName
|
|
231
235
|
}, isHDActivating ? /*#__PURE__*/_react.default.createElement(_spinner.default, {
|
|
232
236
|
appearance: "invert"
|
|
233
237
|
}) : undefined, isHDActive ? /*#__PURE__*/_react.default.createElement(_videoHdFilled.default, {
|
|
@@ -265,7 +269,7 @@ var InteractiveImgComponent = exports.InteractiveImgComponent = /*#__PURE__*/fun
|
|
|
265
269
|
overflow: 'hidden'
|
|
266
270
|
};
|
|
267
271
|
if (orientation) {
|
|
268
|
-
imgStyle.transform = (0,
|
|
272
|
+
imgStyle.transform = (0, _getCssFromImageOrientation.getCssFromImageOrientation)(orientation);
|
|
269
273
|
}
|
|
270
274
|
var srcToDisplay = isHDAvailable && isHDActive && originalBinaryImageSrc ? originalBinaryImageSrc : src;
|
|
271
275
|
return /*#__PURE__*/_react.default.createElement(_styleWrappers.ImageWrapper, {
|
|
@@ -8,7 +8,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.SvgViewer = void 0;
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var
|
|
11
|
+
var _camera = require("@atlaskit/media-ui/camera/camera");
|
|
12
|
+
var _messages = require("@atlaskit/media-ui/messages");
|
|
13
|
+
var _vector = require("@atlaskit/media-ui/vector2");
|
|
12
14
|
var _mediaCommon = require("@atlaskit/media-common");
|
|
13
15
|
var _withAnalyticsEvents = _interopRequireDefault(require("@atlaskit/analytics-next/withAnalyticsEvents"));
|
|
14
16
|
var _styleWrappers = require("../../styleWrappers");
|
|
@@ -36,7 +38,7 @@ var SvgViewerBase = function SvgViewerBase(_ref) {
|
|
|
36
38
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
37
39
|
isDragging = _useState4[0],
|
|
38
40
|
setIsDragging = _useState4[1];
|
|
39
|
-
var _useState5 = (0, _react.useState)(new
|
|
41
|
+
var _useState5 = (0, _react.useState)(new _vector.Vector2(0, 0)),
|
|
40
42
|
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
41
43
|
cursorPos = _useState6[0],
|
|
42
44
|
setCursorPos = _useState6[1];
|
|
@@ -62,7 +64,7 @@ var SvgViewerBase = function SvgViewerBase(_ref) {
|
|
|
62
64
|
}, [camera, zoomLevel]);
|
|
63
65
|
var panImage = (0, _react.useCallback)(function (ev) {
|
|
64
66
|
if (isDragging && wrapperRef.current) {
|
|
65
|
-
var newCursorPos = new
|
|
67
|
+
var newCursorPos = new _vector.Vector2(ev.screenX, ev.screenY);
|
|
66
68
|
var delta = cursorPos.sub(newCursorPos);
|
|
67
69
|
setCursorPos(newCursorPos);
|
|
68
70
|
wrapperRef.current.scrollLeft += delta.x;
|
|
@@ -90,7 +92,7 @@ var SvgViewerBase = function SvgViewerBase(_ref) {
|
|
|
90
92
|
}
|
|
91
93
|
var viewport = (0, _utils.clientRectangle)(wrapperRef.current);
|
|
92
94
|
var originalImgRect = (0, _utils.naturalSizeRectangle)(ev.currentTarget);
|
|
93
|
-
var newCamera = new
|
|
95
|
+
var newCamera = new _camera.Camera(viewport, originalImgRect);
|
|
94
96
|
var newZoomLevel = new _zoomLevel.ZoomLevel(newCamera.scaleDownToFit);
|
|
95
97
|
setCamera(newCamera);
|
|
96
98
|
setZoomLevel(newZoomLevel);
|
|
@@ -111,7 +113,7 @@ var SvgViewerBase = function SvgViewerBase(_ref) {
|
|
|
111
113
|
ev.stopPropagation();
|
|
112
114
|
ev.preventDefault();
|
|
113
115
|
setIsDragging(true);
|
|
114
|
-
setCursorPos(new
|
|
116
|
+
setCursorPos(new _vector.Vector2(ev.screenX, ev.screenY));
|
|
115
117
|
};
|
|
116
118
|
var onZoomChange = function onZoomChange(nextZoomLevel) {
|
|
117
119
|
var wrapper = wrapperRef.current;
|
|
@@ -120,7 +122,7 @@ var SvgViewerBase = function SvgViewerBase(_ref) {
|
|
|
120
122
|
}
|
|
121
123
|
var scrollLeft = wrapper.scrollLeft,
|
|
122
124
|
scrollTop = wrapper.scrollTop;
|
|
123
|
-
var prevOffset = new
|
|
125
|
+
var prevOffset = new _vector.Vector2(scrollLeft, scrollTop);
|
|
124
126
|
var prevZoomLevel = zoomLevel;
|
|
125
127
|
setZoomLevel(nextZoomLevel);
|
|
126
128
|
var _camera$scaledOffset = camera.scaledOffset(prevOffset, prevZoomLevel.value, nextZoomLevel.value),
|
|
@@ -166,7 +168,7 @@ var SvgViewerBase = function SvgViewerBase(_ref) {
|
|
|
166
168
|
isHidden: isHidden
|
|
167
169
|
}, /*#__PURE__*/_react.default.createElement(_mediaSvg.default, {
|
|
168
170
|
testId: 'media-viewer-svg',
|
|
169
|
-
alt: intl.formatMessage(
|
|
171
|
+
alt: intl.formatMessage(_messages.messages.svg_base_alt),
|
|
170
172
|
identifier: identifier,
|
|
171
173
|
dimensions: imgDimensions
|
|
172
174
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
@@ -5,12 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.naturalSizeRectangle = exports.clientRectangle = void 0;
|
|
7
7
|
exports.zoomLevelAfterResize = zoomLevelAfterResize;
|
|
8
|
-
var
|
|
8
|
+
var _rectangle = require("@atlaskit/media-ui/rectangle");
|
|
9
9
|
var _zoomLevel = require("../../domain/zoomLevel");
|
|
10
10
|
var clientRectangle = exports.clientRectangle = function clientRectangle(el) {
|
|
11
11
|
var clientWidth = el.clientWidth,
|
|
12
12
|
clientHeight = el.clientHeight;
|
|
13
|
-
return new
|
|
13
|
+
return new _rectangle.Rectangle(clientWidth, clientHeight);
|
|
14
14
|
};
|
|
15
15
|
var naturalSizeRectangle = exports.naturalSizeRectangle = function naturalSizeRectangle(el) {
|
|
16
16
|
// Firefox & Safari can't always read the "natural" dimensions correctly.
|
|
@@ -19,7 +19,7 @@ var naturalSizeRectangle = exports.naturalSizeRectangle = function naturalSizeRe
|
|
|
19
19
|
naturalHeight = el.naturalHeight,
|
|
20
20
|
width = el.width,
|
|
21
21
|
height = el.height;
|
|
22
|
-
return new
|
|
22
|
+
return new _rectangle.Rectangle(naturalWidth || width, naturalHeight || height);
|
|
23
23
|
};
|
|
24
24
|
function zoomLevelAfterResize(newCamera, oldCamera, oldZoomLevel) {
|
|
25
25
|
var isImgScaledToFit = oldZoomLevel.value === oldCamera.scaleDownToFit;
|
|
@@ -15,7 +15,8 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
15
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
16
|
var _react = _interopRequireDefault(require("react"));
|
|
17
17
|
var _mediaClient = require("@atlaskit/media-client");
|
|
18
|
-
var
|
|
18
|
+
var _customMediaPlayer = require("@atlaskit/media-ui/customMediaPlayer");
|
|
19
|
+
var _mediaPlayer = require("@atlaskit/media-ui/mediaPlayer");
|
|
19
20
|
var _domain = require("../domain");
|
|
20
21
|
var _errors = require("../errors");
|
|
21
22
|
var _styleWrappers = require("../styleWrappers");
|
|
@@ -91,7 +92,7 @@ var VideoViewer = exports.VideoViewer = /*#__PURE__*/function (_BaseViewer) {
|
|
|
91
92
|
var hdAvailable = isHDAvailable(item);
|
|
92
93
|
return useCustomVideoPlayer ? /*#__PURE__*/_react.default.createElement(_styleWrappers.CustomVideoPlayerWrapper, {
|
|
93
94
|
"data-testid": "media-viewer-video-content"
|
|
94
|
-
}, (0, _mediaClient.isFileIdentifier)(identifier) && (0, _fg.fg)('platform_media_video_captions') ? /*#__PURE__*/_react.default.createElement(
|
|
95
|
+
}, (0, _mediaClient.isFileIdentifier)(identifier) && (0, _fg.fg)('platform_media_video_captions') ? /*#__PURE__*/_react.default.createElement(_mediaPlayer.MediaPlayer, {
|
|
95
96
|
identifier: identifier,
|
|
96
97
|
type: "video",
|
|
97
98
|
isAutoPlay: isAutoPlay,
|
|
@@ -107,7 +108,7 @@ var VideoViewer = exports.VideoViewer = /*#__PURE__*/function (_BaseViewer) {
|
|
|
107
108
|
lastWatchTimeConfig: {
|
|
108
109
|
contentId: item.id
|
|
109
110
|
}
|
|
110
|
-
}) : /*#__PURE__*/_react.default.createElement(
|
|
111
|
+
}) : /*#__PURE__*/_react.default.createElement(_customMediaPlayer.CustomMediaPlayer, {
|
|
111
112
|
type: "video",
|
|
112
113
|
isAutoPlay: isAutoPlay,
|
|
113
114
|
showControls: showControls,
|
package/dist/cjs/zoomControls.js
CHANGED
|
@@ -13,7 +13,8 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
13
13
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
15
|
var _react = _interopRequireWildcard(require("react"));
|
|
16
|
-
var
|
|
16
|
+
var _classNames = require("@atlaskit/media-ui/classNames");
|
|
17
|
+
var _MediaButton = _interopRequireDefault(require("@atlaskit/media-ui/MediaButton"));
|
|
17
18
|
var _zoomOut = _interopRequireDefault(require("@atlaskit/icon/core/zoom-out"));
|
|
18
19
|
var _zoomIn = _interopRequireDefault(require("@atlaskit/icon/core/zoom-in"));
|
|
19
20
|
var _styleWrappers = require("./styleWrappers");
|
|
@@ -22,6 +23,7 @@ var _analytics = require("./analytics/");
|
|
|
22
23
|
var _zoomInButtonClicked = require("./analytics/events/ui/zoomInButtonClicked");
|
|
23
24
|
var _zoomOutButtonClicked = require("./analytics/events/ui/zoomOutButtonClicked");
|
|
24
25
|
var _reactIntl = require("react-intl");
|
|
26
|
+
var _messages = require("@atlaskit/media-ui/messages");
|
|
25
27
|
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); }
|
|
26
28
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
27
29
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
@@ -69,22 +71,22 @@ var ZoomControlsBase = exports.ZoomControlsBase = /*#__PURE__*/function (_Compon
|
|
|
69
71
|
/*#__PURE__*/
|
|
70
72
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
71
73
|
_react.default.createElement(_styleWrappers.ZoomWrapper, {
|
|
72
|
-
className:
|
|
73
|
-
}, /*#__PURE__*/_react.default.createElement(_styleWrappers.ZoomCenterControls, null, /*#__PURE__*/_react.default.createElement(
|
|
74
|
+
className: _classNames.hideControlsClassName
|
|
75
|
+
}, /*#__PURE__*/_react.default.createElement(_styleWrappers.ZoomCenterControls, null, /*#__PURE__*/_react.default.createElement(_MediaButton.default, {
|
|
74
76
|
isDisabled: !zoomLevel.canZoomOut,
|
|
75
77
|
onClick: this.zoomOut,
|
|
76
78
|
iconBefore: /*#__PURE__*/_react.default.createElement(_zoomOut.default, {
|
|
77
79
|
color: "currentColor",
|
|
78
80
|
spacing: "spacious",
|
|
79
|
-
label: formatMessage(
|
|
81
|
+
label: formatMessage(_messages.messages.zoom_out)
|
|
80
82
|
})
|
|
81
|
-
}), /*#__PURE__*/_react.default.createElement(
|
|
83
|
+
}), /*#__PURE__*/_react.default.createElement(_MediaButton.default, {
|
|
82
84
|
isDisabled: !zoomLevel.canZoomIn,
|
|
83
85
|
onClick: this.zoomIn,
|
|
84
86
|
iconBefore: /*#__PURE__*/_react.default.createElement(_zoomIn.default, {
|
|
85
87
|
color: "currentColor",
|
|
86
88
|
spacing: "spacious",
|
|
87
|
-
label: formatMessage(
|
|
89
|
+
label: formatMessage(_messages.messages.zoom_in)
|
|
88
90
|
})
|
|
89
91
|
})), /*#__PURE__*/_react.default.createElement(_styleWrappers.ZoomRightControls, null, children, /*#__PURE__*/_react.default.createElement(_styleWrappers.ZoomLevelIndicator, null, zoomLevel.asPercentage)))
|
|
90
92
|
);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { getFileAttributes } from '../..';
|
|
2
|
+
import { getPrimaryErrorReason } from '../../../errors';
|
|
3
|
+
export const createPreviewTooLargeEvent = (error, fileState) => {
|
|
4
|
+
const {
|
|
5
|
+
fileId,
|
|
6
|
+
fileMediatype,
|
|
7
|
+
fileMimetype,
|
|
8
|
+
fileSize
|
|
9
|
+
} = getFileAttributes(fileState);
|
|
10
|
+
return {
|
|
11
|
+
eventType: 'operational',
|
|
12
|
+
actionSubject: 'mediaFile',
|
|
13
|
+
action: 'previewTooLarge',
|
|
14
|
+
attributes: {
|
|
15
|
+
failReason: getPrimaryErrorReason(error),
|
|
16
|
+
fileAttributes: {
|
|
17
|
+
fileId,
|
|
18
|
+
fileMediatype,
|
|
19
|
+
fileMimetype,
|
|
20
|
+
fileSize
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ANALYTICS_MEDIA_CHANNEL, sanitiseAnalyticsPayload } from '@atlaskit/media-common/analytics';
|
|
2
2
|
const componentName = 'mediaViewer';
|
|
3
3
|
const packageName = "@atlaskit/media-viewer";
|
|
4
|
-
const packageVersion = "54.6.
|
|
4
|
+
const packageVersion = "54.6.6";
|
|
5
5
|
export { packageName, packageVersion, componentName, componentName as component };
|
|
6
6
|
export function getFileAttributes(fileState) {
|
|
7
7
|
if (!fileState) {
|
|
@@ -4,7 +4,7 @@ import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
|
4
4
|
import { getFeatureFlagKeysAllProducts } from '@atlaskit/media-common';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
6
6
|
const packageName = "@atlaskit/media-viewer";
|
|
7
|
-
const packageVersion = "54.6.
|
|
7
|
+
const packageVersion = "54.6.6";
|
|
8
8
|
let ufoExperience;
|
|
9
9
|
const getExperience = () => {
|
|
10
10
|
if (!ufoExperience) {
|
package/dist/es2019/content.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Component } from 'react';
|
|
3
3
|
import CrossIcon from '@atlaskit/icon/core/cross';
|
|
4
|
-
import
|
|
4
|
+
import MediaButton from '@atlaskit/media-ui/MediaButton';
|
|
5
|
+
import { hideControlsClassName } from '@atlaskit/media-ui/classNames';
|
|
6
|
+
import { InactivityDetector } from '@atlaskit/media-ui/inactivityDetector';
|
|
5
7
|
import { CloseButtonWrapper, ContentWrapper } from './styleWrappers';
|
|
6
8
|
export class Content extends Component {
|
|
7
9
|
/*
|
package/dist/es2019/download.js
CHANGED
|
@@ -2,7 +2,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
3
3
|
import DownloadIcon from '@atlaskit/icon/core/download';
|
|
4
4
|
import { isErrorFileState, isExternalImageIdentifier } from '@atlaskit/media-client';
|
|
5
|
-
import
|
|
5
|
+
import MediaButton from '@atlaskit/media-ui/MediaButton';
|
|
6
|
+
import { messages } from '@atlaskit/media-ui/messages';
|
|
6
7
|
import React, { useCallback, useState } from 'react';
|
|
7
8
|
import { FormattedMessage, useIntl } from 'react-intl';
|
|
8
9
|
import { createDownloadButtonClickedEvent } from './analytics/events/ui/downloadButtonClicked';
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { FormattedMessage, injectIntl } from 'react-intl';
|
|
4
|
-
import { messages as i18nMessages } from '@atlaskit/media-ui';
|
|
4
|
+
import { messages as i18nMessages } from '@atlaskit/media-ui/messages';
|
|
5
5
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
7
|
import { ErrorMessageWrapper, ErrorImage } from './styleWrappers';
|
|
7
8
|
import { errorLoadingFile } from './error-images';
|
|
8
9
|
import { fireAnalytics } from './analytics';
|
|
9
10
|
import { getPrimaryErrorReason, getSecondaryErrorReason } from './errors';
|
|
10
11
|
import { createLoadFailedEvent } from './analytics/events/operational/loadFailed';
|
|
11
12
|
import { createPreviewUnsupportedEvent } from './analytics/events/operational/previewUnsupported';
|
|
13
|
+
import { createPreviewTooLargeEvent } from './analytics/events/operational/previewTooLarge';
|
|
12
14
|
import { failMediaFileUfoExperience } from './analytics/ufoExperiences';
|
|
13
15
|
const errorLoadingFileImage = formatMessage => /*#__PURE__*/React.createElement(ErrorImage, {
|
|
14
16
|
src: errorLoadingFile,
|
|
@@ -38,6 +40,17 @@ export class ErrorMessage extends React.Component {
|
|
|
38
40
|
messages: [i18nMessages.unsupported_file_format, i18nMessages.archive_format_not_supported]
|
|
39
41
|
};
|
|
40
42
|
}
|
|
43
|
+
|
|
44
|
+
// Code/text files (in the main viewer or inside a ZIP archive) over the
|
|
45
|
+
// CodeViewer's 10MB limit aren't a load failure - the file is simply too
|
|
46
|
+
// large for this viewer to preview. Show a dedicated "File is too large to
|
|
47
|
+
// preview" heading instead of the generic "Something went wrong" copy.
|
|
48
|
+
if (ErrorMessage.isPreviewTooLarge(error) && fg('platform_media_too_large_preview_state')) {
|
|
49
|
+
return {
|
|
50
|
+
icon: errorLoadingFileImage(formatMessage),
|
|
51
|
+
messages: [i18nMessages.file_too_large_to_preview, i18nMessages.file_too_large_description]
|
|
52
|
+
};
|
|
53
|
+
}
|
|
41
54
|
const errorInfo = {
|
|
42
55
|
icon: errorLoadingFileImage(formatMessage),
|
|
43
56
|
messages: [i18nMessages.something_went_wrong, i18nMessages.couldnt_generate_preview]
|
|
@@ -83,8 +96,18 @@ export class ErrorMessage extends React.Component {
|
|
|
83
96
|
static isPreviewUnsupported(error) {
|
|
84
97
|
return ErrorMessage.previewUnsupportedReasons.includes(getPrimaryErrorReason(error));
|
|
85
98
|
}
|
|
99
|
+
|
|
100
|
+
// Error reasons that mean the file exceeds the size limit supported by the
|
|
101
|
+
// browser-based viewer (not a load failure). These are reported as the
|
|
102
|
+
// informational, non-SLI `previewTooLarge` metric instead of `loadFailed`.
|
|
103
|
+
|
|
104
|
+
static isPreviewTooLarge(error) {
|
|
105
|
+
return ErrorMessage.previewTooLargeReasons.includes(getPrimaryErrorReason(error));
|
|
106
|
+
}
|
|
86
107
|
static getEventPayload(error, fileId, fileState, traceContext) {
|
|
87
|
-
if (fileState && ErrorMessage.
|
|
108
|
+
if (fileState && ErrorMessage.isPreviewTooLarge(error) && fg('platform_media_too_large_preview_state')) {
|
|
109
|
+
return createPreviewTooLargeEvent(error, fileState);
|
|
110
|
+
} else if (fileState && ErrorMessage.isPreviewUnsupported(error)) {
|
|
88
111
|
// this is not an SLI (load failure), its just a useful metric for files
|
|
89
112
|
// whose format the browser-based viewer can't preview.
|
|
90
113
|
return createPreviewUnsupportedEvent(fileState);
|
|
@@ -107,5 +130,6 @@ export class ErrorMessage extends React.Component {
|
|
|
107
130
|
|
|
108
131
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
109
132
|
_defineProperty(ErrorMessage, "previewUnsupportedReasons", ['unsupported', 'imageviewer-unsupported-mime']);
|
|
133
|
+
_defineProperty(ErrorMessage, "previewTooLargeReasons", ['codeviewer-file-size-exceeds', 'archiveviewer-codeviewer-file-size-exceeds']);
|
|
110
134
|
const ErroMsg = withAnalyticsEvents()(injectIntl(ErrorMessage));
|
|
111
135
|
export default ErroMsg;
|
package/dist/es2019/header.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from 'react';
|
|
2
2
|
import { isExternalImageIdentifier, isErrorFileState, toCommonMediaClientError } from '@atlaskit/media-client';
|
|
3
|
-
import { hideControlsClassName
|
|
4
|
-
import {
|
|
3
|
+
import { hideControlsClassName } from '@atlaskit/media-ui/classNames';
|
|
4
|
+
import { messages } from '@atlaskit/media-ui/messages';
|
|
5
|
+
import { toHumanReadableMediaSize } from '@atlaskit/media-ui/humanReadableSize';
|
|
6
|
+
import MediaButton from '@atlaskit/media-ui/MediaButton';
|
|
7
|
+
import { getLanguageType } from '@atlaskit/media-ui/getLanguageType';
|
|
8
|
+
import { getExtension } from '@atlaskit/media-ui/getExtension';
|
|
9
|
+
import { isCodeViewerItem } from '@atlaskit/media-ui/isCodeViewerItem';
|
|
5
10
|
import { isZipMimeType } from '@atlaskit/media-common/isZipMimeType';
|
|
6
11
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
7
12
|
import { FormattedMessage, injectIntl } from 'react-intl';
|
|
@@ -4,8 +4,8 @@ import Loadable from 'react-loadable';
|
|
|
4
4
|
import { isExternalImageIdentifier, isFileIdentifier, toCommonMediaClientError } from '@atlaskit/media-client';
|
|
5
5
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
6
6
|
import { FormattedMessage } from 'react-intl';
|
|
7
|
-
import { messages } from '@atlaskit/media-ui';
|
|
8
|
-
import { isCodeViewerItem } from '@atlaskit/media-ui/
|
|
7
|
+
import { messages } from '@atlaskit/media-ui/messages';
|
|
8
|
+
import { isCodeViewerItem } from '@atlaskit/media-ui/isCodeViewerItem';
|
|
9
9
|
import { useFileState } from '@atlaskit/media-client-react/use-file-state';
|
|
10
10
|
import { useMediaClient } from '@atlaskit/media-client-react/use-media-client';
|
|
11
11
|
import { Outcome } from './domain';
|
package/dist/es2019/list.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState, useRef } from 'react';
|
|
2
|
-
import { hideControlsClassName } from '@atlaskit/media-ui';
|
|
2
|
+
import { hideControlsClassName } from '@atlaskit/media-ui/classNames';
|
|
3
3
|
import { ItemViewer } from './item-viewer';
|
|
4
4
|
import { HeaderWrapper, ListWrapper } from './styleWrappers';
|
|
5
5
|
import { Navigation } from './navigation';
|
package/dist/es2019/loading.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import AkSpinner from '@atlaskit/spinner/spinner';
|
|
3
|
-
import { messages } from '@atlaskit/media-ui';
|
|
3
|
+
import { messages } from '@atlaskit/media-ui/messages';
|
|
4
4
|
import { useIntl } from 'react-intl';
|
|
5
5
|
export const Spinner = ({}) => {
|
|
6
6
|
const intl = useIntl();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useState, useLayoutEffect, useRef } from 'react';
|
|
3
3
|
import { IntlProvider, injectIntl } from 'react-intl';
|
|
4
|
-
import { Shortcut } from '@atlaskit/media-ui';
|
|
4
|
+
import { Shortcut } from '@atlaskit/media-ui/shortcut';
|
|
5
5
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
6
6
|
import { fireAnalytics } from './analytics';
|
|
7
7
|
import { createModalEvent } from './analytics/events/screen/modal';
|
|
@@ -3,8 +3,8 @@ import React from 'react';
|
|
|
3
3
|
import { Component } from 'react';
|
|
4
4
|
import ArrowLeftCircleIcon from '@atlaskit/icon/core/chevron-left';
|
|
5
5
|
import ArrowRightCircleIcon from '@atlaskit/icon/core/chevron-right';
|
|
6
|
-
import { hideControlsClassName } from '@atlaskit/media-ui';
|
|
7
|
-
import { Shortcut } from '@atlaskit/media-ui';
|
|
6
|
+
import { hideControlsClassName } from '@atlaskit/media-ui/classNames';
|
|
7
|
+
import { Shortcut } from '@atlaskit/media-ui/shortcut';
|
|
8
8
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
10
10
|
import { ArrowsWrapper, RightWrapper, LeftWrapper, Arrow } from './styleWrappers';
|
|
@@ -8,7 +8,7 @@ import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
|
8
8
|
import { ArchiveSidebarFolderWrapper, ArchiveSidebarFileEntryWrapper, SidebarItemWrapper } from './styleWrappers';
|
|
9
9
|
import { getMediaTypeFromFilename, isMacPrivateFile, rejectAfter } from '../../utils';
|
|
10
10
|
import { CustomButtonItem } from './custom-button-item';
|
|
11
|
-
import { messages } from '@atlaskit/media-ui';
|
|
11
|
+
import { messages } from '@atlaskit/media-ui/messages';
|
|
12
12
|
import { ArchiveDownloadButton } from './archive-download-button';
|
|
13
13
|
import { injectIntl } from 'react-intl';
|
|
14
14
|
class ArchiveSidebarFolderEntryBase extends React.Component {
|
|
@@ -5,8 +5,10 @@ import { unzip, HTTPRangeReader } from 'unzipit';
|
|
|
5
5
|
import { FormattedMessage } from 'react-intl';
|
|
6
6
|
import { isErrorFileState } from '@atlaskit/media-client';
|
|
7
7
|
import { isZipMimeType } from '@atlaskit/media-common/isZipMimeType';
|
|
8
|
-
import { CustomMediaPlayer
|
|
9
|
-
import {
|
|
8
|
+
import { CustomMediaPlayer } from '@atlaskit/media-ui/customMediaPlayer';
|
|
9
|
+
import { messages } from '@atlaskit/media-ui/messages';
|
|
10
|
+
import { getLanguageType } from '@atlaskit/media-ui/getLanguageType';
|
|
11
|
+
import { isCodeViewerItem } from '@atlaskit/media-ui/isCodeViewerItem';
|
|
10
12
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
11
13
|
import { Outcome } from '../../domain';
|
|
12
14
|
import { CustomVideoPlayerWrapper, AudioPlayer, CustomAudioPlayerWrapper, DefaultCoverWrapper, ListWrapper } from '../../styleWrappers';
|
|
@@ -7,7 +7,7 @@ import { forwardRef } from 'react';
|
|
|
7
7
|
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
9
9
|
import { useIntl } from 'react-intl';
|
|
10
|
-
import { messages } from '@atlaskit/media-ui';
|
|
10
|
+
import { messages } from '@atlaskit/media-ui/messages';
|
|
11
11
|
export const ARCHIVE_SIDE_BAR_WIDTH = 300;
|
|
12
12
|
const archiveItemViewerWrapperStyles = null;
|
|
13
13
|
const archiveSideBarStyles = null;
|
|
@@ -7,7 +7,7 @@ import { MediaViewerError } from '../errors';
|
|
|
7
7
|
import { AudioPlayer, AudioCover, Audio, DefaultCoverWrapper, CustomAudioPlayerWrapper } from '../styleWrappers';
|
|
8
8
|
import { BaseViewer } from './base-viewer';
|
|
9
9
|
import { isIE } from '../utils/isIE';
|
|
10
|
-
import { CustomMediaPlayer } from '@atlaskit/media-ui';
|
|
10
|
+
import { CustomMediaPlayer } from '@atlaskit/media-ui/customMediaPlayer';
|
|
11
11
|
import { getObjectUrlFromFileState } from '../utils/getObjectUrlFromFileState';
|
|
12
12
|
const defaultCover = /*#__PURE__*/React.createElement(DefaultCoverWrapper, null, /*#__PURE__*/React.createElement(AudioIcon, {
|
|
13
13
|
label: "cover",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React, { Fragment } from 'react';
|
|
3
3
|
import { FormattedMessage } from 'react-intl';
|
|
4
|
-
import { messages } from '@atlaskit/media-ui';
|
|
4
|
+
import { messages } from '@atlaskit/media-ui/messages';
|
|
5
5
|
import deepEqual from 'deep-equal';
|
|
6
6
|
import { globalMediaEventEmitter } from '@atlaskit/media-client';
|
|
7
7
|
import ErrorMessage from '../errorMessage';
|
|
@@ -5,7 +5,8 @@ import { MediaViewerError } from '../../errors';
|
|
|
5
5
|
import { Spinner } from '../../loading';
|
|
6
6
|
import { BaseViewer } from '../base-viewer';
|
|
7
7
|
import { DEFAULT_LANGUAGE, normaliseLineBreaks } from './util';
|
|
8
|
-
import { getLanguageType
|
|
8
|
+
import { getLanguageType } from '@atlaskit/media-ui/getLanguageType';
|
|
9
|
+
import { getExtension } from '@atlaskit/media-ui/getExtension';
|
|
9
10
|
import { msgToText } from './msg-parser';
|
|
10
11
|
import { CodeRendererAdvanced } from './CodeRendererAdvanced/CodeRendererAdvanced';
|
|
11
12
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
@@ -10,7 +10,7 @@ import LockIcon from '@atlaskit/icon/core/lock-locked';
|
|
|
10
10
|
import Form from '@atlaskit/form/form';
|
|
11
11
|
import Field from '@atlaskit/form/field';
|
|
12
12
|
import { FormattedMessage, useIntl } from 'react-intl';
|
|
13
|
-
import { messages } from '@atlaskit/media-ui';
|
|
13
|
+
import { messages } from '@atlaskit/media-ui/messages';
|
|
14
14
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
15
15
|
import { xcss, Box, Flex, Text } from '@atlaskit/primitives';
|
|
16
16
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|