@atlaskit/media-viewer 54.5.49 → 54.6.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 +26 -0
- package/dist/cjs/analytics/events/operational/loadSucceeded.js +2 -2
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/cjs/analytics/ufoExperiences.js +9 -8
- package/dist/cjs/components/media-viewer.js +6 -5
- package/dist/cjs/components/portal.js +1 -1
- package/dist/cjs/download.js +5 -5
- package/dist/cjs/errorMessage.js +2 -2
- package/dist/cjs/header.js +6 -5
- package/dist/cjs/item-viewer.js +14 -13
- package/dist/cjs/loading.js +1 -1
- package/dist/cjs/media-viewer.js +2 -2
- package/dist/cjs/navigation.js +5 -5
- package/dist/cjs/styleWrappers.js +1 -1
- package/dist/cjs/viewers/archiveSidebar/archive-download-button.js +2 -2
- package/dist/cjs/viewers/archiveSidebar/archive-sidebar-folder-entry.js +2 -2
- package/dist/cjs/viewers/archiveSidebar/archive.js +5 -5
- package/dist/cjs/viewers/archiveSidebar/custom-button-item.js +2 -2
- package/dist/cjs/viewers/codeViewer/codeViewerRenderer-compiled.js +2 -2
- package/dist/cjs/viewers/codeViewer/index.js +2 -2
- package/dist/cjs/viewers/doc/doc-viewer.js +7 -6
- package/dist/cjs/viewers/doc/index.js +2 -2
- package/dist/cjs/viewers/doc/passwordInput.js +8 -7
- package/dist/cjs/viewers/image/index.js +3 -3
- package/dist/cjs/viewers/image/interactive-img.js +3 -3
- package/dist/cjs/viewers/svg/index.js +3 -3
- package/dist/cjs/viewers/video.js +5 -5
- package/dist/cjs/zoomControls.js +2 -2
- package/dist/es2019/analytics/events/operational/loadSucceeded.js +1 -1
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/analytics/ufoExperiences.js +4 -3
- package/dist/es2019/components/media-viewer.js +3 -2
- package/dist/es2019/components/portal.js +1 -1
- package/dist/es2019/download.js +2 -2
- package/dist/es2019/errorMessage.js +1 -1
- package/dist/es2019/header.js +3 -2
- package/dist/es2019/item-viewer.js +4 -3
- 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/styleWrappers.js +1 -1
- package/dist/es2019/viewers/archiveSidebar/archive-download-button.js +1 -1
- package/dist/es2019/viewers/archiveSidebar/archive-sidebar-folder-entry.js +1 -1
- package/dist/es2019/viewers/archiveSidebar/archive.js +2 -2
- package/dist/es2019/viewers/archiveSidebar/custom-button-item.js +1 -1
- package/dist/es2019/viewers/codeViewer/codeViewerRenderer-compiled.js +1 -1
- package/dist/es2019/viewers/codeViewer/index.js +1 -1
- package/dist/es2019/viewers/doc/doc-viewer.js +4 -3
- package/dist/es2019/viewers/doc/index.js +1 -1
- package/dist/es2019/viewers/doc/passwordInput.js +5 -4
- package/dist/es2019/viewers/image/index.js +1 -1
- package/dist/es2019/viewers/image/interactive-img.js +2 -2
- package/dist/es2019/viewers/svg/index.js +2 -2
- package/dist/es2019/viewers/video.js +1 -1
- package/dist/es2019/zoomControls.js +1 -1
- package/dist/esm/analytics/events/operational/loadSucceeded.js +1 -1
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/analytics/ufoExperiences.js +4 -3
- package/dist/esm/components/media-viewer.js +3 -2
- package/dist/esm/components/portal.js +1 -1
- package/dist/esm/download.js +2 -2
- package/dist/esm/errorMessage.js +1 -1
- package/dist/esm/header.js +3 -2
- package/dist/esm/item-viewer.js +4 -3
- 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/styleWrappers.js +1 -1
- package/dist/esm/viewers/archiveSidebar/archive-download-button.js +1 -1
- package/dist/esm/viewers/archiveSidebar/archive-sidebar-folder-entry.js +1 -1
- package/dist/esm/viewers/archiveSidebar/archive.js +2 -2
- package/dist/esm/viewers/archiveSidebar/custom-button-item.js +1 -1
- package/dist/esm/viewers/codeViewer/codeViewerRenderer-compiled.js +1 -1
- package/dist/esm/viewers/codeViewer/index.js +1 -1
- package/dist/esm/viewers/doc/doc-viewer.js +4 -3
- package/dist/esm/viewers/doc/index.js +1 -1
- package/dist/esm/viewers/doc/passwordInput.js +5 -4
- package/dist/esm/viewers/image/index.js +1 -1
- package/dist/esm/viewers/image/interactive-img.js +2 -2
- package/dist/esm/viewers/svg/index.js +2 -2
- package/dist/esm/viewers/video.js +1 -1
- package/dist/esm/zoomControls.js +1 -1
- package/dist/types/analytics/index.d.ts +1 -1
- package/dist/types/components/types.d.ts +1 -1
- package/dist/types/errorMessage.d.ts +1 -1
- package/dist/types/item-viewer.d.ts +1 -1
- package/dist/types/navigation.d.ts +1 -1
- package/dist/types/viewers/archiveSidebar/archive.d.ts +1 -1
- package/dist/types/viewers/archiveSidebar/custom-button-item.d.ts +1 -1
- package/dist/types/viewers/codeViewer/codeViewerRenderer-compiled.d.ts +1 -1
- package/dist/types/viewers/codeViewer/codeViewerRenderer.d.ts +1 -1
- package/dist/types/viewers/doc/passwordInput.d.ts +1 -1
- package/dist/types/viewers/image/interactive-img.d.ts +1 -1
- package/dist/types/viewers/svg/index.d.ts +1 -1
- package/dist/types/zoomControls.d.ts +1 -1
- package/example-helpers/svg/toggle.tsx +1 -1
- package/example-helpers/svg/uploader.ts +1 -1
- package/package.json +28 -25
package/dist/esm/download.js
CHANGED
|
@@ -4,7 +4,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
5
|
var _excluded = ["analyticspayload", "onClick", "tooltip"];
|
|
6
6
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
7
|
-
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
7
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
8
8
|
import DownloadIcon from '@atlaskit/icon/core/download';
|
|
9
9
|
import { isErrorFileState, isExternalImageIdentifier } from '@atlaskit/media-client';
|
|
10
10
|
import { MediaButton, messages } from '@atlaskit/media-ui';
|
|
@@ -17,7 +17,7 @@ import { createFailedPreviewDownloadButtonClickedEvent } from './analytics/event
|
|
|
17
17
|
import { DownloadButtonWrapper } from './styleWrappers';
|
|
18
18
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
19
19
|
import { MediaViewerError } from './errors';
|
|
20
|
-
import Tooltip from '@atlaskit/tooltip';
|
|
20
|
+
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
21
21
|
import { AbuseModal } from '@atlaskit/media-ui/abuseModal';
|
|
22
22
|
var downloadIcon = /*#__PURE__*/React.createElement(DownloadIcon, {
|
|
23
23
|
color: "currentColor",
|
package/dist/esm/errorMessage.js
CHANGED
|
@@ -11,7 +11,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import { FormattedMessage, injectIntl } from 'react-intl';
|
|
13
13
|
import { messages as i18nMessages } from '@atlaskit/media-ui';
|
|
14
|
-
import
|
|
14
|
+
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
15
15
|
import { ErrorMessageWrapper, ErrorImage } from './styleWrappers';
|
|
16
16
|
import { errorLoadingFile } from './error-images';
|
|
17
17
|
import { fireAnalytics } from './analytics';
|
package/dist/esm/header.js
CHANGED
|
@@ -4,12 +4,13 @@ import { isExternalImageIdentifier, isErrorFileState, toCommonMediaClientError }
|
|
|
4
4
|
import { hideControlsClassName, messages, toHumanReadableMediaSize, MediaButton } from '@atlaskit/media-ui';
|
|
5
5
|
import { getLanguageType, getExtension, isCodeViewerItem } from '@atlaskit/media-ui/codeViewer';
|
|
6
6
|
import { isZipMimeType } from '@atlaskit/media-common/isZipMimeType';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
8
|
import { FormattedMessage, injectIntl } from 'react-intl';
|
|
9
9
|
import { Outcome } from './domain';
|
|
10
10
|
import { Header as HeaderWrapper, LeftHeader, RightHeader, MetadataWrapper, MetadataSubText, MedatadataTextWrapper, MetadataIconWrapper, MetadataFileName, FormattedMessageWrapper } from './styleWrappers';
|
|
11
11
|
import { ToolbarDownloadButton, DisabledToolbarDownloadButton } from './download';
|
|
12
|
-
import { useFileState
|
|
12
|
+
import { useFileState } from '@atlaskit/media-client-react/use-file-state';
|
|
13
|
+
import { useMediaClient } from '@atlaskit/media-client-react/use-media-client';
|
|
13
14
|
import { MimeTypeIcon } from '@atlaskit/media-ui/mime-type-icon';
|
|
14
15
|
import { getFormat } from './viewers/codeViewer/util';
|
|
15
16
|
import { MediaViewerError } from './errors';
|
package/dist/esm/item-viewer.js
CHANGED
|
@@ -7,19 +7,20 @@ import { Text } from '@atlaskit/primitives/compiled';
|
|
|
7
7
|
import { FormattedMessage } from 'react-intl';
|
|
8
8
|
import { messages } from '@atlaskit/media-ui';
|
|
9
9
|
import { isCodeViewerItem } from '@atlaskit/media-ui/codeViewer';
|
|
10
|
-
import { useFileState
|
|
10
|
+
import { useFileState } from '@atlaskit/media-client-react/use-file-state';
|
|
11
|
+
import { useMediaClient } from '@atlaskit/media-client-react/use-media-client';
|
|
11
12
|
import { Outcome } from './domain';
|
|
12
13
|
import { Spinner } from './loading';
|
|
13
14
|
import ErrorMessage from './errorMessage';
|
|
14
15
|
import { MediaViewerError } from './errors';
|
|
15
16
|
import { ErrorViewDownloadButton } from './download';
|
|
16
|
-
import
|
|
17
|
+
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
17
18
|
import { createCommencedEvent } from './analytics/events/operational/commenced';
|
|
18
19
|
import { createLoadSucceededEvent } from './analytics/events/operational/loadSucceeded';
|
|
19
20
|
import { fireAnalytics, getFileAttributes } from './analytics';
|
|
20
21
|
import { InteractiveImg } from './viewers/image/interactive-img';
|
|
21
22
|
import ArchiveViewerLoader from './viewers/archiveSidebar/archiveViewerLoader';
|
|
22
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
23
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
23
24
|
import { startMediaFileUfoExperience, succeedMediaFileUfoExperience } from './analytics/ufoExperiences';
|
|
24
25
|
import { CustomViewer } from './viewers/customViewer/customViewer';
|
|
25
26
|
function loadImageViewer() {
|
package/dist/esm/loading.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectDestructuringEmpty from "@babel/runtime/helpers/objectDestructuringEmpty";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import AkSpinner from '@atlaskit/spinner';
|
|
3
|
+
import AkSpinner from '@atlaskit/spinner/spinner';
|
|
4
4
|
import { messages } from '@atlaskit/media-ui';
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
6
|
export var Spinner = function Spinner(_ref) {
|
package/dist/esm/media-viewer.js
CHANGED
|
@@ -3,7 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
3
3
|
import React, { useState, useLayoutEffect, useRef } from 'react';
|
|
4
4
|
import { IntlProvider, injectIntl } from 'react-intl';
|
|
5
5
|
import { Shortcut } from '@atlaskit/media-ui';
|
|
6
|
-
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
6
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
7
7
|
import { fireAnalytics } from './analytics';
|
|
8
8
|
import { createModalEvent } from './analytics/events/screen/modal';
|
|
9
9
|
import { createClosedEvent } from './analytics/events/ui/closed';
|
package/dist/esm/navigation.js
CHANGED
|
@@ -12,8 +12,8 @@ import ArrowLeftCircleIcon from '@atlaskit/icon/core/chevron-left';
|
|
|
12
12
|
import ArrowRightCircleIcon from '@atlaskit/icon/core/chevron-right';
|
|
13
13
|
import { hideControlsClassName } from '@atlaskit/media-ui';
|
|
14
14
|
import { Shortcut } from '@atlaskit/media-ui';
|
|
15
|
-
import
|
|
16
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
|
+
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
16
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
17
17
|
import { ArrowsWrapper, RightWrapper, LeftWrapper, Arrow } from './styleWrappers';
|
|
18
18
|
import { getSelectedIndex } from './utils';
|
|
19
19
|
import { createNavigatedEvent } from './analytics/events/ui/navigated';
|
|
@@ -15,7 +15,7 @@ import { TouchScrollable } from 'react-scrolllock';
|
|
|
15
15
|
import { useMergeRefs } from 'use-callback-ref';
|
|
16
16
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
17
17
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
18
|
-
import Heading from '@atlaskit/heading';
|
|
18
|
+
import Heading from '@atlaskit/heading/heading';
|
|
19
19
|
var blanketStyles = null;
|
|
20
20
|
var headerWrapperStyles = null;
|
|
21
21
|
var archiveHeaderWrapperStyles = null;
|
|
@@ -3,7 +3,7 @@ import React, { useState } from 'react';
|
|
|
3
3
|
import DownloadIcon from '@atlaskit/icon/core/download';
|
|
4
4
|
import { ArchiveDownloadButtonWrapper, DisabledArchiveDownloadButtonWrapper } from './styleWrappers';
|
|
5
5
|
import { AbuseModal } from '@atlaskit/media-ui/abuseModal';
|
|
6
|
-
import Tooltip from '@atlaskit/tooltip';
|
|
6
|
+
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
7
7
|
export var ArchiveDownloadButton = function ArchiveDownloadButton(_ref) {
|
|
8
8
|
var downloadFn = _ref.downloadFn,
|
|
9
9
|
shouldRenderAbuseModal = _ref.shouldRenderAbuseModal,
|
|
@@ -13,7 +13,7 @@ import Folder24Icon from '@atlaskit/icon-file-type/glyph/folder/24';
|
|
|
13
13
|
import { downloadUrl } from '@atlaskit/media-common';
|
|
14
14
|
import { MediaTypeIcon } from '@atlaskit/media-ui/media-type-icon';
|
|
15
15
|
import { globalMediaEventEmitter } from '@atlaskit/media-client';
|
|
16
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
17
17
|
import { ArchiveSidebarFolderWrapper, ArchiveSidebarFileEntryWrapper, SidebarItemWrapper } from './styleWrappers';
|
|
18
18
|
import { getMediaTypeFromFilename, isMacPrivateFile, rejectAfter } from '../../utils';
|
|
19
19
|
import { CustomButtonItem } from './custom-button-item';
|
|
@@ -30,7 +30,7 @@ import ArchiveSidebarRenderer from './archive-sidebar-renderer';
|
|
|
30
30
|
import { getMediaTypeFromFilename, getMimeTypeFromFilename, rejectAfter } from '../../utils';
|
|
31
31
|
import { Spinner } from '../../loading';
|
|
32
32
|
import { ENCRYPTED_ENTRY_ERROR_MESSAGE } from './consts';
|
|
33
|
-
import
|
|
33
|
+
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
34
34
|
import { fireAnalytics } from '../../analytics';
|
|
35
35
|
import { ArchiveViewerError, buildVideoErrorDiagnostics, isMediaViewerError } from '../../errors';
|
|
36
36
|
import { createZipEntryLoadSucceededEvent } from '../../analytics/events/operational/zipEntryLoadSucceeded';
|
|
@@ -40,7 +40,7 @@ import { CodeViewRenderer } from '../codeViewer/codeViewerRenderer';
|
|
|
40
40
|
import { DEFAULT_LANGUAGE } from '../codeViewer/util';
|
|
41
41
|
import { MAX_FILE_SIZE_SUPPORTED_BY_CODEVIEWER } from '../../item-viewer';
|
|
42
42
|
import { NativePdfViewer } from './nativePdfViewer';
|
|
43
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
43
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
44
44
|
export var getArchiveEntriesFromFileState = /*#__PURE__*/function () {
|
|
45
45
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(fileState, mediaClient, collectionName) {
|
|
46
46
|
var url, reader, archive;
|
|
@@ -6,7 +6,7 @@ import "./custom-button-item.compiled.css";
|
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { ax, ix } from "@compiled/react/runtime";
|
|
8
8
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
9
|
-
import { ButtonItem } from '@atlaskit/side-navigation';
|
|
9
|
+
import { ButtonItem } from '@atlaskit/side-navigation/button-item';
|
|
10
10
|
var itemStyles = null;
|
|
11
11
|
export function CustomButtonItem(_ref) {
|
|
12
12
|
var children = _ref.children,
|
|
@@ -17,7 +17,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
17
17
|
import { Component, forwardRef } from 'react';
|
|
18
18
|
import { Outcome } from '../../domain';
|
|
19
19
|
import { Spinner } from '../../loading';
|
|
20
|
-
import CodeBlock from '@atlaskit/code/block';
|
|
20
|
+
import CodeBlock from '@atlaskit/code/code-block';
|
|
21
21
|
import ErrorMessage from '../../errorMessage';
|
|
22
22
|
import { MediaViewerError } from '../../errors';
|
|
23
23
|
import { lineCount } from './util';
|
|
@@ -17,7 +17,7 @@ import { DEFAULT_LANGUAGE, normaliseLineBreaks } from './util';
|
|
|
17
17
|
import { getLanguageType, getExtension } from '@atlaskit/media-ui/codeViewer';
|
|
18
18
|
import { msgToText } from './msg-parser';
|
|
19
19
|
import { CodeRendererAdvanced } from './CodeRendererAdvanced/CodeRendererAdvanced';
|
|
20
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
21
21
|
var moduleLoader = function moduleLoader() {
|
|
22
22
|
return import( /* webpackChunkName: "@atlaskit-internal_media-code-viewer" */'./codeViewerRenderer');
|
|
23
23
|
};
|
|
@@ -9,14 +9,15 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
9
9
|
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; }
|
|
10
10
|
import React, { useReducer } from 'react';
|
|
11
11
|
import { isCommonMediaClientError } from '@atlaskit/media-client';
|
|
12
|
-
import { DOCUMENT_SCROLL_ROOT_ID
|
|
12
|
+
import { DOCUMENT_SCROLL_ROOT_ID } from '@atlaskit/media-document-viewer/get-document-root';
|
|
13
|
+
import { DocumentViewer } from '@atlaskit/media-document-viewer/document-viewer';
|
|
13
14
|
import { useStaticCallback } from '@atlaskit/media-common';
|
|
14
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
15
16
|
import { MediaViewerError } from '../../errors';
|
|
16
17
|
import { ZoomControls } from '../../zoomControls';
|
|
17
18
|
import { ZoomLevel } from '../../domain/zoomLevel';
|
|
18
19
|
import { PasswordInput } from './passwordInput';
|
|
19
|
-
import Spinner from '@atlaskit/spinner';
|
|
20
|
+
import Spinner from '@atlaskit/spinner/spinner';
|
|
20
21
|
import { isExcelFile } from '@atlaskit/media-common/mediaTypeUtils';
|
|
21
22
|
var initialState = {
|
|
22
23
|
isMissingPassword: false,
|
|
@@ -13,7 +13,7 @@ import { Outcome } from '../../domain';
|
|
|
13
13
|
import { BaseViewer } from '../base-viewer';
|
|
14
14
|
import { ZoomLevel } from '../../domain/zoomLevel';
|
|
15
15
|
import { DocViewer as DocViewerComponent } from './doc-viewer';
|
|
16
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
17
17
|
export var DocViewer = /*#__PURE__*/function (_BaseViewer) {
|
|
18
18
|
function DocViewer() {
|
|
19
19
|
var _this;
|
|
@@ -5,17 +5,18 @@ import "./passwordInput.compiled.css";
|
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { ax, ix } from "@compiled/react/runtime";
|
|
7
7
|
import { useEffect, useRef, useState } from 'react';
|
|
8
|
-
import Button from '@atlaskit/button/
|
|
9
|
-
import TextField from '@atlaskit/textfield';
|
|
8
|
+
import Button from '@atlaskit/button/default/button';
|
|
9
|
+
import TextField from '@atlaskit/textfield/text-field';
|
|
10
10
|
import LockIcon from '@atlaskit/icon/core/lock-locked';
|
|
11
|
-
import Form
|
|
11
|
+
import Form from '@atlaskit/form/form';
|
|
12
|
+
import Field from '@atlaskit/form/field';
|
|
12
13
|
import { FormattedMessage, useIntl } from 'react-intl';
|
|
13
14
|
import { messages } from '@atlaskit/media-ui';
|
|
14
15
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
15
16
|
import { xcss, Box, Flex, Text } from '@atlaskit/primitives';
|
|
16
17
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
17
18
|
import ErrorIcon from '@atlaskit/icon/core/status-error';
|
|
18
|
-
import Heading from '@atlaskit/heading';
|
|
19
|
+
import Heading from '@atlaskit/heading/heading';
|
|
19
20
|
var COLOR_SHADE = '#b6c2cf';
|
|
20
21
|
var ERROR_COLOR = '#FD9891';
|
|
21
22
|
var headingStyle = null;
|
|
@@ -12,7 +12,7 @@ import React from 'react';
|
|
|
12
12
|
import { isImageRepresentationReady, isErrorFileState, addFileAttrsToUrl } from '@atlaskit/media-client';
|
|
13
13
|
import { isImageMimeTypeSupportedByBrowser } from '@atlaskit/media-common';
|
|
14
14
|
import { getOrientation } from '@atlaskit/media-ui';
|
|
15
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
16
16
|
import { Outcome } from '../../domain';
|
|
17
17
|
import { buildImgErrorDiagnostics, MediaViewerError } from '../../errors';
|
|
18
18
|
import { InteractiveImg } from './interactive-img';
|
|
@@ -10,10 +10,10 @@ import React from 'react';
|
|
|
10
10
|
import { Camera, getCssFromImageOrientation, hideControlsClassName, Rectangle, Vector2 } from '@atlaskit/media-ui';
|
|
11
11
|
import { ANALYTICS_MEDIA_CHANNEL } from '@atlaskit/media-common';
|
|
12
12
|
import { MAX_RESOLUTION } from '@atlaskit/media-client/constants';
|
|
13
|
-
import
|
|
13
|
+
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
14
14
|
import VideoHdIcon from '@atlaskit/icon-lab/core/video-hd';
|
|
15
15
|
import VideoHdFilledIcon from '@atlaskit/icon-lab/core/video-hd-filled';
|
|
16
|
-
import Spinner from '@atlaskit/spinner';
|
|
16
|
+
import Spinner from '@atlaskit/spinner/spinner';
|
|
17
17
|
import { BaselineExtend, HDIconGroupWrapper, ImageWrapper, Img } from '../../styleWrappers';
|
|
18
18
|
import { ZoomLevel } from '../../domain/zoomLevel';
|
|
19
19
|
import { closeOnDirectClick } from '../../utils/closeOnDirectClick';
|
|
@@ -2,12 +2,12 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
2
2
|
import React, { useState, useRef, useEffect, useCallback, useLayoutEffect } from 'react';
|
|
3
3
|
import { Camera, messages, Vector2 } from '@atlaskit/media-ui';
|
|
4
4
|
import { ANALYTICS_MEDIA_CHANNEL } from '@atlaskit/media-common';
|
|
5
|
-
import
|
|
5
|
+
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
6
6
|
import { BaselineExtend } from '../../styleWrappers';
|
|
7
7
|
import { ZoomLevel } from '../../domain/zoomLevel';
|
|
8
8
|
import { ZoomControls } from '../../zoomControls';
|
|
9
9
|
import { createClosedEvent } from '../../analytics/events/ui/closed';
|
|
10
|
-
import MediaSvg from '@atlaskit/media-svg';
|
|
10
|
+
import MediaSvg from '@atlaskit/media-svg/media-svg';
|
|
11
11
|
import { MediaViewerError } from '../../errors';
|
|
12
12
|
import { clientRectangle, naturalSizeRectangle, zoomLevelAfterResize } from './utils';
|
|
13
13
|
import { ImageWrapper } from './ImageWrapper';
|
|
@@ -17,7 +17,7 @@ import { Video, CustomVideoPlayerWrapper } from '../styleWrappers';
|
|
|
17
17
|
import { isIE } from '../utils/isIE';
|
|
18
18
|
import { BaseViewer } from './base-viewer';
|
|
19
19
|
import { getObjectUrlFromFileState } from '../utils/getObjectUrlFromFileState';
|
|
20
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
21
21
|
var hdArtifact = 'video_1280.mp4';
|
|
22
22
|
var sdArtifact = 'video_640.mp4';
|
|
23
23
|
export var VideoViewer = /*#__PURE__*/function (_BaseViewer) {
|
package/dist/esm/zoomControls.js
CHANGED
|
@@ -12,7 +12,7 @@ import { hideControlsClassName, MediaButton } from '@atlaskit/media-ui';
|
|
|
12
12
|
import ZoomOutIcon from '@atlaskit/icon/core/zoom-out';
|
|
13
13
|
import ZoomInIcon from '@atlaskit/icon/core/zoom-in';
|
|
14
14
|
import { ZoomWrapper, ZoomCenterControls, ZoomRightControls, ZoomLevelIndicator } from './styleWrappers';
|
|
15
|
-
import
|
|
15
|
+
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
16
16
|
import { fireAnalytics } from './analytics/';
|
|
17
17
|
import { createZoomInButtonClickEvent } from './analytics/events/ui/zoomInButtonClicked';
|
|
18
18
|
import { createZoomOutButtonClickedEvent } from './analytics/events/ui/zoomOutButtonClicked';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type FileState, type RequestMetadata } from '@atlaskit/media-client';
|
|
2
2
|
import { type FileAttributes, type WithFileAttributes, type FailureAttributes, type WithTraceContext } from '@atlaskit/media-common/analytics';
|
|
3
|
-
import {
|
|
3
|
+
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
|
|
4
4
|
import type { ProcessingFailReason } from '@atlaskit/media-state/file-state';
|
|
5
5
|
import { type PrimaryErrorReason } from '../errors';
|
|
6
6
|
import { type MediaViewerEventPayload } from './events';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Identifier, type MediaClient } from '@atlaskit/media-client';
|
|
2
|
-
import type { WithMediaClientConfigProps } from '@atlaskit/media-client-react';
|
|
2
|
+
import type { WithMediaClientConfigProps } from '@atlaskit/media-client-react/with-media-client';
|
|
3
3
|
import { type MediaFeatureFlags } from '@atlaskit/media-common';
|
|
4
4
|
import { type ReactNode } from 'react';
|
|
5
5
|
import { type ViewerOptionsProps } from '../viewerOptions';
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { type ReactNode } from 'react';
|
|
3
3
|
import { type MessageDescriptor, type WrappedComponentProps } from 'react-intl';
|
|
4
4
|
import { type FileState } from '@atlaskit/media-client';
|
|
5
|
-
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
5
|
+
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
6
6
|
import { type PrimaryErrorReason, type SecondaryErrorReason, type MediaViewerError } from './errors';
|
|
7
7
|
import { type LoadFailedEventPayload } from './analytics/events/operational/loadFailed';
|
|
8
8
|
import { type PreviewUnsupportedEventPayload } from './analytics/events/operational/previewUnsupported';
|
|
@@ -3,7 +3,7 @@ import { type FileState, type Identifier } from '@atlaskit/media-client';
|
|
|
3
3
|
import { type WithShowControlMethodProp } from '@atlaskit/media-ui';
|
|
4
4
|
import { Outcome } from './domain';
|
|
5
5
|
import { MediaViewerError } from './errors';
|
|
6
|
-
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
6
|
+
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
7
7
|
import { type MediaFeatureFlags, type MediaTraceContext } from '@atlaskit/media-common';
|
|
8
8
|
import { type ViewerOptionsProps } from './viewerOptions';
|
|
9
9
|
export type Props = Readonly<{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Component } from 'react';
|
|
3
3
|
import { type Identifier } from '@atlaskit/media-client';
|
|
4
|
-
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
4
|
+
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
5
5
|
export type NavigationDirection = 'prev' | 'next';
|
|
6
6
|
export type NavigationProps = Readonly<{
|
|
7
7
|
items: Identifier[];
|
|
@@ -4,7 +4,7 @@ import { type MediaClient, type FileState } from '@atlaskit/media-client';
|
|
|
4
4
|
import { Outcome } from '../../domain';
|
|
5
5
|
import { BaseViewer } from '../base-viewer';
|
|
6
6
|
import { type ArchiveViewerProps } from './types';
|
|
7
|
-
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
7
|
+
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
8
8
|
import { ArchiveViewerError } from '../../errors';
|
|
9
9
|
export type Props = ArchiveViewerProps & WithAnalyticsEventsProps;
|
|
10
10
|
export type Content = {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ButtonItemProps } from '@atlaskit/menu/types';
|
|
2
2
|
export declare function CustomButtonItem({ children, onClick, ...rest }: ButtonItemProps): JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ForwardRefExoticComponent, type ReactNode, type RefAttributes, Component } from 'react';
|
|
2
2
|
import { type ErrorFileState, type FileState } from '@atlaskit/media-client';
|
|
3
3
|
import { Outcome } from '../../domain';
|
|
4
|
-
import type { SupportedLanguages } from '@atlaskit/code/
|
|
4
|
+
import type { SupportedLanguages } from '@atlaskit/code/constants';
|
|
5
5
|
import { MediaViewerError } from '../../errors';
|
|
6
6
|
export declare const CodeViewWrapper: ForwardRefExoticComponent<{
|
|
7
7
|
children: ReactNode;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { type ReactNode } from 'react';
|
|
2
2
|
import { type ErrorFileState, type FileState } from '@atlaskit/media-client';
|
|
3
3
|
import { type Outcome } from '../../domain';
|
|
4
|
-
import type { SupportedLanguages } from '@atlaskit/code/
|
|
4
|
+
import type { SupportedLanguages } from '@atlaskit/code/constants';
|
|
5
5
|
import { type MediaViewerError } from '../../errors';
|
|
6
6
|
export declare const CodeViewWrapper: (props: {
|
|
7
7
|
children: ReactNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Camera, Vector2 } from '@atlaskit/media-ui';
|
|
3
|
-
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
3
|
+
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
4
4
|
import { ZoomLevel } from '../../domain/zoomLevel';
|
|
5
5
|
export declare function zoomLevelAfterResize(newCamera: Camera, oldCamera: Camera, oldZoomLevel: ZoomLevel): ZoomLevel;
|
|
6
6
|
export interface Props extends WithAnalyticsEventsProps {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type MediaTraceContext } from '@atlaskit/media-common';
|
|
3
3
|
import { type FileIdentifier } from '@atlaskit/media-client';
|
|
4
|
-
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
4
|
+
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
5
5
|
import { MediaViewerError } from '../../errors';
|
|
6
6
|
export interface SvgViewerProps extends WithAnalyticsEventsProps {
|
|
7
7
|
identifier: FileIdentifier;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Component } from 'react';
|
|
3
3
|
import { type ZoomLevel } from './domain/zoomLevel';
|
|
4
|
-
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
4
|
+
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
5
5
|
import { type WrappedComponentProps } from 'react-intl';
|
|
6
6
|
export type ZoomControlsProps = React.PropsWithChildren<Readonly<{
|
|
7
7
|
onChange: (newZoomLevel: ZoomLevel) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
|
|
3
|
-
import { Label } from '@atlaskit/form';
|
|
3
|
+
import { Label } from '@atlaskit/form/label/default';
|
|
4
4
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
5
5
|
import Toggle from '@atlaskit/toggle';
|
|
6
6
|
import { cssMap } from '@atlaskit/css';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type SyntheticEvent, useState } from 'react';
|
|
2
2
|
|
|
3
3
|
import { type FileIdentifier } from '@atlaskit/media-client';
|
|
4
|
-
import { getMediaClient } from '@atlaskit/media-client-react';
|
|
4
|
+
import { getMediaClient } from '@atlaskit/media-client-react/get-media-client';
|
|
5
5
|
import { type MediaClientConfig } from '@atlaskit/media-client';
|
|
6
6
|
|
|
7
7
|
export const useSvgUploader = (
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-viewer",
|
|
3
|
-
"version": "54.
|
|
3
|
+
"version": "54.6.0",
|
|
4
4
|
"description": "MediaViewer is Atlassian's powerful solution for viewing files on the web. It's both powerful and extendable yet easy-to-integrate",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,32 +31,33 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@atlaskit/analytics-next": "^12.3.0",
|
|
34
|
-
"@atlaskit/button": "^25.
|
|
35
|
-
"@atlaskit/code": "^19.
|
|
34
|
+
"@atlaskit/button": "^25.2.0",
|
|
35
|
+
"@atlaskit/code": "^19.1.0",
|
|
36
36
|
"@atlaskit/css": "^1.0.0",
|
|
37
|
-
"@atlaskit/form": "^17.
|
|
38
|
-
"@atlaskit/heading": "^7.
|
|
39
|
-
"@atlaskit/icon": "^37.
|
|
40
|
-
"@atlaskit/icon-file-type": "^8.
|
|
41
|
-
"@atlaskit/icon-lab": "^7.
|
|
42
|
-
"@atlaskit/media-client": "^37.
|
|
43
|
-
"@atlaskit/media-client-react": "^6.
|
|
44
|
-
"@atlaskit/media-common": "^14.
|
|
45
|
-
"@atlaskit/media-document-viewer": "^2.
|
|
37
|
+
"@atlaskit/form": "^17.1.0",
|
|
38
|
+
"@atlaskit/heading": "^7.1.0",
|
|
39
|
+
"@atlaskit/icon": "^37.5.0",
|
|
40
|
+
"@atlaskit/icon-file-type": "^8.2.0",
|
|
41
|
+
"@atlaskit/icon-lab": "^7.7.0",
|
|
42
|
+
"@atlaskit/media-client": "^37.5.0",
|
|
43
|
+
"@atlaskit/media-client-react": "^6.2.0",
|
|
44
|
+
"@atlaskit/media-common": "^14.5.0",
|
|
45
|
+
"@atlaskit/media-document-viewer": "^2.1.0",
|
|
46
46
|
"@atlaskit/media-state": "^3.1.0",
|
|
47
|
-
"@atlaskit/media-svg": "^3.
|
|
48
|
-
"@atlaskit/media-ui": "^30.
|
|
47
|
+
"@atlaskit/media-svg": "^3.2.0",
|
|
48
|
+
"@atlaskit/media-ui": "^30.12.0",
|
|
49
|
+
"@atlaskit/menu": "^10.1.0",
|
|
49
50
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
50
|
-
"@atlaskit/portal": "^6.
|
|
51
|
-
"@atlaskit/primitives": "^22.
|
|
51
|
+
"@atlaskit/portal": "^6.3.0",
|
|
52
|
+
"@atlaskit/primitives": "^22.4.0",
|
|
52
53
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
53
|
-
"@atlaskit/side-navigation": "^13.
|
|
54
|
-
"@atlaskit/spinner": "^20.
|
|
55
|
-
"@atlaskit/textfield": "^10.
|
|
56
|
-
"@atlaskit/theme": "^28.
|
|
57
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
58
|
-
"@atlaskit/tokens": "^16.
|
|
59
|
-
"@atlaskit/tooltip": "^24.
|
|
54
|
+
"@atlaskit/side-navigation": "^13.2.0",
|
|
55
|
+
"@atlaskit/spinner": "^20.3.0",
|
|
56
|
+
"@atlaskit/textfield": "^10.1.0",
|
|
57
|
+
"@atlaskit/theme": "^28.1.0",
|
|
58
|
+
"@atlaskit/tmp-editor-statsig": "^157.0.0",
|
|
59
|
+
"@atlaskit/tokens": "^16.8.0",
|
|
60
|
+
"@atlaskit/tooltip": "^24.2.0",
|
|
60
61
|
"@atlaskit/ufo": "^1.0.0",
|
|
61
62
|
"@babel/runtime": "^7.0.0",
|
|
62
63
|
"@codemirror/language": "6.10.8",
|
|
@@ -89,9 +90,11 @@
|
|
|
89
90
|
"@atlaskit/media-core": "^38.0.0",
|
|
90
91
|
"@atlaskit/media-integration-test-helpers": "workspace:^",
|
|
91
92
|
"@atlaskit/media-test-data": "^4.0.0",
|
|
92
|
-
"@atlaskit/media-test-helpers": "^42.
|
|
93
|
+
"@atlaskit/media-test-helpers": "^42.3.0",
|
|
94
|
+
"@atlaskit/modal-dialog": "^16.5.0",
|
|
95
|
+
"@atlaskit/select": "^22.8.0",
|
|
93
96
|
"@atlaskit/ssr": "workspace:^",
|
|
94
|
-
"@atlaskit/toggle": "^17.
|
|
97
|
+
"@atlaskit/toggle": "^17.2.0",
|
|
95
98
|
"@atlassian/a11y-jest-testing": "^0.16.0",
|
|
96
99
|
"@atlassian/feature-flags-test-utils": "^1.2.0",
|
|
97
100
|
"@atlassian/testing-library": "^0.11.0",
|