@atlaskit/media-viewer 48.3.2 → 48.3.3
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 +7 -0
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/cjs/analytics/ufoExperiences.js +1 -1
- package/dist/cjs/viewers/doc/pdfPasswordInput.js +50 -23
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/analytics/ufoExperiences.js +1 -1
- package/dist/es2019/viewers/doc/pdfPasswordInput.js +49 -23
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/analytics/ufoExperiences.js +1 -1
- package/dist/esm/viewers/doc/pdfPasswordInput.js +50 -24
- package/dist/types/viewers/doc/pdfPasswordInput.d.ts +2 -2
- package/dist/types-ts4.5/viewers/doc/pdfPasswordInput.d.ts +2 -2
- package/package.json +2 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/media-viewer
|
|
2
2
|
|
|
3
|
+
## 48.3.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#78097](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/78097) [`85166d42ab97`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/85166d42ab97) - Update PDF password form UI styling and messages
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 48.3.2
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -10,7 +10,7 @@ exports.packageVersion = exports.packageName = void 0;
|
|
|
10
10
|
var _mediaCommon = require("@atlaskit/media-common");
|
|
11
11
|
var componentName = exports.component = exports.componentName = 'mediaViewer';
|
|
12
12
|
var packageName = exports.packageName = "@atlaskit/media-viewer";
|
|
13
|
-
var packageVersion = exports.packageVersion = "48.3.
|
|
13
|
+
var packageVersion = exports.packageVersion = "48.3.3";
|
|
14
14
|
function getFileAttributes(fileState) {
|
|
15
15
|
if (!fileState) {
|
|
16
16
|
return {
|
|
@@ -12,7 +12,7 @@ var _mediaCommon = require("@atlaskit/media-common");
|
|
|
12
12
|
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; }
|
|
13
13
|
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; }
|
|
14
14
|
var packageName = "@atlaskit/media-viewer";
|
|
15
|
-
var packageVersion = "48.3.
|
|
15
|
+
var packageVersion = "48.3.3";
|
|
16
16
|
var ufoExperience;
|
|
17
17
|
var getExperience = function getExperience() {
|
|
18
18
|
if (!ufoExperience) {
|
|
@@ -8,21 +8,41 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.PDFPasswordInput = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
-
var _react =
|
|
11
|
+
var _react = require("react");
|
|
12
12
|
var _loadingButton = _interopRequireDefault(require("@atlaskit/button/loading-button"));
|
|
13
13
|
var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
|
|
14
14
|
var _lock = _interopRequireDefault(require("@atlaskit/icon/glyph/lock"));
|
|
15
15
|
var _form = _interopRequireWildcard(require("@atlaskit/form"));
|
|
16
16
|
var _reactIntlNext = require("react-intl-next");
|
|
17
17
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
18
|
-
var _heading = _interopRequireDefault(require("@atlaskit/heading"));
|
|
19
18
|
var _primitives = require("@atlaskit/primitives");
|
|
19
|
+
var _react2 = require("@emotion/react");
|
|
20
|
+
var _error = _interopRequireDefault(require("@atlaskit/icon/glyph/error"));
|
|
20
21
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
|
+
/**@jsx jsx */
|
|
24
|
+
|
|
25
|
+
var COLOR_SHADE = '#b6c2cf';
|
|
26
|
+
var headingStyle = (0, _react2.css)({
|
|
27
|
+
fontSize: '14px',
|
|
28
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
29
|
+
color: COLOR_SHADE
|
|
30
|
+
});
|
|
31
|
+
var errorMessageWrapperStyle = (0, _react2.css)({
|
|
32
|
+
marginTop: "var(--ds-space-050, 4px)",
|
|
33
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
34
|
+
color: '#FD9891',
|
|
35
|
+
fontSize: '12px',
|
|
36
|
+
display: 'flex'
|
|
37
|
+
});
|
|
38
|
+
var errorMessageStyle = (0, _react2.css)({
|
|
39
|
+
marginTop: '0px',
|
|
40
|
+
marginLeft: "var(--ds-space-050, 4px)"
|
|
41
|
+
});
|
|
22
42
|
var headerStyles = (0, _primitives.xcss)({
|
|
23
43
|
textAlign: 'center',
|
|
24
|
-
marginTop: 'space.
|
|
25
|
-
marginBottom: 'space.
|
|
44
|
+
marginTop: 'space.200',
|
|
45
|
+
marginBottom: 'space.200'
|
|
26
46
|
});
|
|
27
47
|
var inputStyle = (0, _primitives.xcss)({
|
|
28
48
|
width: '330px'
|
|
@@ -54,47 +74,54 @@ var PDFPasswordInput = exports.PDFPasswordInput = function PDFPasswordInput(_ref
|
|
|
54
74
|
(_passwordInputRef$cur = passwordInputRef.current) === null || _passwordInputRef$cur === void 0 || _passwordInputRef$cur.focus();
|
|
55
75
|
}
|
|
56
76
|
}, [hasPasswordError]);
|
|
57
|
-
return
|
|
77
|
+
return (0, _react2.jsx)(_form.default, {
|
|
58
78
|
onSubmit: onSubmit
|
|
59
79
|
}, function (_ref2) {
|
|
60
80
|
var formProps = _ref2.formProps,
|
|
61
81
|
submitting = _ref2.submitting;
|
|
62
|
-
return
|
|
63
|
-
justifyContent: "center"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
label: "forbidden-lock-icon",
|
|
82
|
+
return (0, _react2.jsx)("form", formProps, (0, _react2.jsx)(_primitives.Flex, {
|
|
83
|
+
justifyContent: "center"
|
|
84
|
+
}, (0, _react2.jsx)(_lock.default, {
|
|
85
|
+
label: "",
|
|
67
86
|
size: "xlarge",
|
|
68
|
-
primaryColor:
|
|
69
|
-
})),
|
|
87
|
+
primaryColor: COLOR_SHADE
|
|
88
|
+
})), (0, _react2.jsx)(_primitives.Box, {
|
|
70
89
|
xcss: headerStyles
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _mediaUi.messages.password_protected_pdf))), /*#__PURE__*/_react.default.createElement(_form.Field, {
|
|
90
|
+
}, (0, _react2.jsx)("h1", {
|
|
91
|
+
css: headingStyle
|
|
92
|
+
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _mediaUi.messages.password_protected_pdf))), (0, _react2.jsx)(_form.Field, {
|
|
75
93
|
"aria-required": true,
|
|
76
94
|
name: "password",
|
|
77
|
-
label: "Password",
|
|
78
95
|
isRequired: true
|
|
79
96
|
}, function (_ref3) {
|
|
80
97
|
var fieldProps = _ref3.fieldProps;
|
|
81
|
-
return
|
|
98
|
+
return (0, _react2.jsx)(_primitives.Box, {
|
|
82
99
|
xcss: inputStyle
|
|
83
|
-
},
|
|
100
|
+
}, (0, _react2.jsx)(_textfield.default, (0, _extends2.default)({}, fieldProps, {
|
|
84
101
|
type: "password",
|
|
102
|
+
"aria-label": intl.formatMessage(_mediaUi.messages.password),
|
|
85
103
|
placeholder: intl.formatMessage(_mediaUi.messages.enter_password),
|
|
86
104
|
ref: passwordInputRef,
|
|
87
105
|
onChange: function onChange(value) {
|
|
88
106
|
fieldProps.onChange(value);
|
|
89
107
|
setFormError(false);
|
|
90
108
|
}
|
|
91
|
-
})), formError &&
|
|
92
|
-
|
|
109
|
+
})), formError && (0, _react2.jsx)("div", {
|
|
110
|
+
css: errorMessageWrapperStyle,
|
|
111
|
+
id: "".concat(fieldProps.id, "-error"),
|
|
112
|
+
"aria-live": "polite"
|
|
113
|
+
}, (0, _react2.jsx)(_error.default, {
|
|
114
|
+
size: "small",
|
|
115
|
+
label: ""
|
|
116
|
+
}), (0, _react2.jsx)("p", {
|
|
117
|
+
css: errorMessageStyle
|
|
118
|
+
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _mediaUi.messages.incorrect_password))));
|
|
119
|
+
}), (0, _react2.jsx)(_primitives.Box, {
|
|
93
120
|
xcss: footerStyles
|
|
94
|
-
},
|
|
121
|
+
}, (0, _react2.jsx)(_loadingButton.default, {
|
|
95
122
|
appearance: "primary",
|
|
96
123
|
type: "submit",
|
|
97
124
|
isLoading: submitting
|
|
98
|
-
},
|
|
125
|
+
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _mediaUi.messages.submit))));
|
|
99
126
|
});
|
|
100
127
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ANALYTICS_MEDIA_CHANNEL } from '@atlaskit/media-common';
|
|
2
2
|
const componentName = 'mediaViewer';
|
|
3
3
|
const packageName = "@atlaskit/media-viewer";
|
|
4
|
-
const packageVersion = "48.3.
|
|
4
|
+
const packageVersion = "48.3.3";
|
|
5
5
|
export { packageName, packageVersion, componentName, componentName as component };
|
|
6
6
|
export function getFileAttributes(fileState) {
|
|
7
7
|
if (!fileState) {
|
|
@@ -2,7 +2,7 @@ import { UFOExperience, ExperiencePerformanceTypes, ExperienceTypes } from '@atl
|
|
|
2
2
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
3
3
|
import { getFeatureFlagKeysAllProducts } from '@atlaskit/media-common';
|
|
4
4
|
const packageName = "@atlaskit/media-viewer";
|
|
5
|
-
const packageVersion = "48.3.
|
|
5
|
+
const packageVersion = "48.3.3";
|
|
6
6
|
let ufoExperience;
|
|
7
7
|
const getExperience = () => {
|
|
8
8
|
if (!ufoExperience) {
|
|
@@ -1,17 +1,36 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
|
|
2
|
+
/**@jsx jsx */
|
|
3
|
+
import { useEffect, useRef, useState } from 'react';
|
|
3
4
|
import LoadingButton from '@atlaskit/button/loading-button';
|
|
4
5
|
import TextField from '@atlaskit/textfield';
|
|
5
6
|
import LockIcon from '@atlaskit/icon/glyph/lock';
|
|
6
|
-
import Form, {
|
|
7
|
+
import Form, { Field } from '@atlaskit/form';
|
|
7
8
|
import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
8
9
|
import { messages } from '@atlaskit/media-ui';
|
|
9
|
-
import Heading from '@atlaskit/heading';
|
|
10
10
|
import { xcss, Box, Flex } from '@atlaskit/primitives';
|
|
11
|
+
import { jsx, css } from '@emotion/react';
|
|
12
|
+
import ErrorIcon from '@atlaskit/icon/glyph/error';
|
|
13
|
+
const COLOR_SHADE = '#b6c2cf';
|
|
14
|
+
const headingStyle = css({
|
|
15
|
+
fontSize: '14px',
|
|
16
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
17
|
+
color: COLOR_SHADE
|
|
18
|
+
});
|
|
19
|
+
const errorMessageWrapperStyle = css({
|
|
20
|
+
marginTop: "var(--ds-space-050, 4px)",
|
|
21
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
22
|
+
color: '#FD9891',
|
|
23
|
+
fontSize: '12px',
|
|
24
|
+
display: 'flex'
|
|
25
|
+
});
|
|
26
|
+
const errorMessageStyle = css({
|
|
27
|
+
marginTop: '0px',
|
|
28
|
+
marginLeft: "var(--ds-space-050, 4px)"
|
|
29
|
+
});
|
|
11
30
|
const headerStyles = xcss({
|
|
12
31
|
textAlign: 'center',
|
|
13
|
-
marginTop: 'space.
|
|
14
|
-
marginBottom: 'space.
|
|
32
|
+
marginTop: 'space.200',
|
|
33
|
+
marginBottom: 'space.200'
|
|
15
34
|
});
|
|
16
35
|
const inputStyle = xcss({
|
|
17
36
|
width: '330px'
|
|
@@ -41,45 +60,52 @@ export const PDFPasswordInput = ({
|
|
|
41
60
|
(_passwordInputRef$cur = passwordInputRef.current) === null || _passwordInputRef$cur === void 0 ? void 0 : _passwordInputRef$cur.focus();
|
|
42
61
|
}
|
|
43
62
|
}, [hasPasswordError]);
|
|
44
|
-
return
|
|
63
|
+
return jsx(Form, {
|
|
45
64
|
onSubmit: onSubmit
|
|
46
65
|
}, ({
|
|
47
66
|
formProps,
|
|
48
67
|
submitting
|
|
49
|
-
}) =>
|
|
50
|
-
justifyContent: "center"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
label: "forbidden-lock-icon",
|
|
68
|
+
}) => jsx("form", formProps, jsx(Flex, {
|
|
69
|
+
justifyContent: "center"
|
|
70
|
+
}, jsx(LockIcon, {
|
|
71
|
+
label: "",
|
|
54
72
|
size: "xlarge",
|
|
55
|
-
primaryColor:
|
|
56
|
-
})),
|
|
73
|
+
primaryColor: COLOR_SHADE
|
|
74
|
+
})), jsx(Box, {
|
|
57
75
|
xcss: headerStyles
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.password_protected_pdf))), /*#__PURE__*/React.createElement(Field, {
|
|
76
|
+
}, jsx("h1", {
|
|
77
|
+
css: headingStyle
|
|
78
|
+
}, jsx(FormattedMessage, messages.password_protected_pdf))), jsx(Field, {
|
|
62
79
|
"aria-required": true,
|
|
63
80
|
name: "password",
|
|
64
|
-
label: "Password",
|
|
65
81
|
isRequired: true
|
|
66
82
|
}, ({
|
|
67
83
|
fieldProps
|
|
68
|
-
}) =>
|
|
84
|
+
}) => jsx(Box, {
|
|
69
85
|
xcss: inputStyle
|
|
70
|
-
},
|
|
86
|
+
}, jsx(TextField, _extends({}, fieldProps, {
|
|
71
87
|
type: "password",
|
|
88
|
+
"aria-label": intl.formatMessage(messages.password),
|
|
72
89
|
placeholder: intl.formatMessage(messages.enter_password),
|
|
73
90
|
ref: passwordInputRef,
|
|
74
91
|
onChange: value => {
|
|
75
92
|
fieldProps.onChange(value);
|
|
76
93
|
setFormError(false);
|
|
77
94
|
}
|
|
78
|
-
})), formError &&
|
|
95
|
+
})), formError && jsx("div", {
|
|
96
|
+
css: errorMessageWrapperStyle,
|
|
97
|
+
id: `${fieldProps.id}-error`,
|
|
98
|
+
"aria-live": "polite"
|
|
99
|
+
}, jsx(ErrorIcon, {
|
|
100
|
+
size: "small",
|
|
101
|
+
label: ""
|
|
102
|
+
}), jsx("p", {
|
|
103
|
+
css: errorMessageStyle
|
|
104
|
+
}, jsx(FormattedMessage, messages.incorrect_password))))), jsx(Box, {
|
|
79
105
|
xcss: footerStyles
|
|
80
|
-
},
|
|
106
|
+
}, jsx(LoadingButton, {
|
|
81
107
|
appearance: "primary",
|
|
82
108
|
type: "submit",
|
|
83
109
|
isLoading: submitting
|
|
84
|
-
},
|
|
110
|
+
}, jsx(FormattedMessage, messages.submit)))));
|
|
85
111
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ANALYTICS_MEDIA_CHANNEL } from '@atlaskit/media-common';
|
|
2
2
|
var componentName = 'mediaViewer';
|
|
3
3
|
var packageName = "@atlaskit/media-viewer";
|
|
4
|
-
var packageVersion = "48.3.
|
|
4
|
+
var packageVersion = "48.3.3";
|
|
5
5
|
export { packageName, packageVersion, componentName, componentName as component };
|
|
6
6
|
export function getFileAttributes(fileState) {
|
|
7
7
|
if (!fileState) {
|
|
@@ -5,7 +5,7 @@ import { UFOExperience, ExperiencePerformanceTypes, ExperienceTypes } from '@atl
|
|
|
5
5
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
6
6
|
import { getFeatureFlagKeysAllProducts } from '@atlaskit/media-common';
|
|
7
7
|
var packageName = "@atlaskit/media-viewer";
|
|
8
|
-
var packageVersion = "48.3.
|
|
8
|
+
var packageVersion = "48.3.3";
|
|
9
9
|
var ufoExperience;
|
|
10
10
|
var getExperience = function getExperience() {
|
|
11
11
|
if (!ufoExperience) {
|
|
@@ -1,18 +1,37 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
|
|
3
|
+
/**@jsx jsx */
|
|
4
|
+
import { useEffect, useRef, useState } from 'react';
|
|
4
5
|
import LoadingButton from '@atlaskit/button/loading-button';
|
|
5
6
|
import TextField from '@atlaskit/textfield';
|
|
6
7
|
import LockIcon from '@atlaskit/icon/glyph/lock';
|
|
7
|
-
import Form, {
|
|
8
|
+
import Form, { Field } from '@atlaskit/form';
|
|
8
9
|
import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
9
10
|
import { messages } from '@atlaskit/media-ui';
|
|
10
|
-
import Heading from '@atlaskit/heading';
|
|
11
11
|
import { xcss, Box, Flex } from '@atlaskit/primitives';
|
|
12
|
+
import { jsx, css } from '@emotion/react';
|
|
13
|
+
import ErrorIcon from '@atlaskit/icon/glyph/error';
|
|
14
|
+
var COLOR_SHADE = '#b6c2cf';
|
|
15
|
+
var headingStyle = css({
|
|
16
|
+
fontSize: '14px',
|
|
17
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
18
|
+
color: COLOR_SHADE
|
|
19
|
+
});
|
|
20
|
+
var errorMessageWrapperStyle = css({
|
|
21
|
+
marginTop: "var(--ds-space-050, 4px)",
|
|
22
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
23
|
+
color: '#FD9891',
|
|
24
|
+
fontSize: '12px',
|
|
25
|
+
display: 'flex'
|
|
26
|
+
});
|
|
27
|
+
var errorMessageStyle = css({
|
|
28
|
+
marginTop: '0px',
|
|
29
|
+
marginLeft: "var(--ds-space-050, 4px)"
|
|
30
|
+
});
|
|
12
31
|
var headerStyles = xcss({
|
|
13
32
|
textAlign: 'center',
|
|
14
|
-
marginTop: 'space.
|
|
15
|
-
marginBottom: 'space.
|
|
33
|
+
marginTop: 'space.200',
|
|
34
|
+
marginBottom: 'space.200'
|
|
16
35
|
});
|
|
17
36
|
var inputStyle = xcss({
|
|
18
37
|
width: '330px'
|
|
@@ -44,47 +63,54 @@ export var PDFPasswordInput = function PDFPasswordInput(_ref) {
|
|
|
44
63
|
(_passwordInputRef$cur = passwordInputRef.current) === null || _passwordInputRef$cur === void 0 || _passwordInputRef$cur.focus();
|
|
45
64
|
}
|
|
46
65
|
}, [hasPasswordError]);
|
|
47
|
-
return
|
|
66
|
+
return jsx(Form, {
|
|
48
67
|
onSubmit: onSubmit
|
|
49
68
|
}, function (_ref2) {
|
|
50
69
|
var formProps = _ref2.formProps,
|
|
51
70
|
submitting = _ref2.submitting;
|
|
52
|
-
return
|
|
53
|
-
justifyContent: "center"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
label: "forbidden-lock-icon",
|
|
71
|
+
return jsx("form", formProps, jsx(Flex, {
|
|
72
|
+
justifyContent: "center"
|
|
73
|
+
}, jsx(LockIcon, {
|
|
74
|
+
label: "",
|
|
57
75
|
size: "xlarge",
|
|
58
|
-
primaryColor:
|
|
59
|
-
})),
|
|
76
|
+
primaryColor: COLOR_SHADE
|
|
77
|
+
})), jsx(Box, {
|
|
60
78
|
xcss: headerStyles
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.password_protected_pdf))), /*#__PURE__*/React.createElement(Field, {
|
|
79
|
+
}, jsx("h1", {
|
|
80
|
+
css: headingStyle
|
|
81
|
+
}, jsx(FormattedMessage, messages.password_protected_pdf))), jsx(Field, {
|
|
65
82
|
"aria-required": true,
|
|
66
83
|
name: "password",
|
|
67
|
-
label: "Password",
|
|
68
84
|
isRequired: true
|
|
69
85
|
}, function (_ref3) {
|
|
70
86
|
var fieldProps = _ref3.fieldProps;
|
|
71
|
-
return
|
|
87
|
+
return jsx(Box, {
|
|
72
88
|
xcss: inputStyle
|
|
73
|
-
},
|
|
89
|
+
}, jsx(TextField, _extends({}, fieldProps, {
|
|
74
90
|
type: "password",
|
|
91
|
+
"aria-label": intl.formatMessage(messages.password),
|
|
75
92
|
placeholder: intl.formatMessage(messages.enter_password),
|
|
76
93
|
ref: passwordInputRef,
|
|
77
94
|
onChange: function onChange(value) {
|
|
78
95
|
fieldProps.onChange(value);
|
|
79
96
|
setFormError(false);
|
|
80
97
|
}
|
|
81
|
-
})), formError &&
|
|
82
|
-
|
|
98
|
+
})), formError && jsx("div", {
|
|
99
|
+
css: errorMessageWrapperStyle,
|
|
100
|
+
id: "".concat(fieldProps.id, "-error"),
|
|
101
|
+
"aria-live": "polite"
|
|
102
|
+
}, jsx(ErrorIcon, {
|
|
103
|
+
size: "small",
|
|
104
|
+
label: ""
|
|
105
|
+
}), jsx("p", {
|
|
106
|
+
css: errorMessageStyle
|
|
107
|
+
}, jsx(FormattedMessage, messages.incorrect_password))));
|
|
108
|
+
}), jsx(Box, {
|
|
83
109
|
xcss: footerStyles
|
|
84
|
-
},
|
|
110
|
+
}, jsx(LoadingButton, {
|
|
85
111
|
appearance: "primary",
|
|
86
112
|
type: "submit",
|
|
87
113
|
isLoading: submitting
|
|
88
|
-
},
|
|
114
|
+
}, jsx(FormattedMessage, messages.submit))));
|
|
89
115
|
});
|
|
90
116
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { OnSubmitHandler } from '@atlaskit/form';
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
3
|
interface PDFPasswordInputProps {
|
|
4
4
|
onSubmit: OnSubmitHandler<{
|
|
5
5
|
password: string;
|
|
@@ -7,5 +7,5 @@ interface PDFPasswordInputProps {
|
|
|
7
7
|
hasPasswordError?: boolean;
|
|
8
8
|
onRender?: () => void;
|
|
9
9
|
}
|
|
10
|
-
export declare const PDFPasswordInput: ({ onSubmit, hasPasswordError, onRender, }: PDFPasswordInputProps) => JSX.Element;
|
|
10
|
+
export declare const PDFPasswordInput: ({ onSubmit, hasPasswordError, onRender, }: PDFPasswordInputProps) => jsx.JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { OnSubmitHandler } from '@atlaskit/form';
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
3
|
interface PDFPasswordInputProps {
|
|
4
4
|
onSubmit: OnSubmitHandler<{
|
|
5
5
|
password: string;
|
|
@@ -7,5 +7,5 @@ interface PDFPasswordInputProps {
|
|
|
7
7
|
hasPasswordError?: boolean;
|
|
8
8
|
onRender?: () => void;
|
|
9
9
|
}
|
|
10
|
-
export declare const PDFPasswordInput: ({ onSubmit, hasPasswordError, onRender, }: PDFPasswordInputProps) => JSX.Element;
|
|
10
|
+
export declare const PDFPasswordInput: ({ onSubmit, hasPasswordError, onRender, }: PDFPasswordInputProps) => jsx.JSX.Element;
|
|
11
11
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-viewer",
|
|
3
|
-
"version": "48.3.
|
|
3
|
+
"version": "48.3.3",
|
|
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/"
|
|
@@ -39,13 +39,12 @@
|
|
|
39
39
|
"@atlaskit/button": "^17.6.0",
|
|
40
40
|
"@atlaskit/code": "^15.1.0",
|
|
41
41
|
"@atlaskit/form": "^9.0.3",
|
|
42
|
-
"@atlaskit/heading": "^1.6.0",
|
|
43
42
|
"@atlaskit/icon": "^22.1.0",
|
|
44
43
|
"@atlaskit/icon-file-type": "^6.4.0",
|
|
45
44
|
"@atlaskit/media-client": "^26.2.0",
|
|
46
45
|
"@atlaskit/media-client-react": "^2.0.0",
|
|
47
46
|
"@atlaskit/media-common": "^11.0.0",
|
|
48
|
-
"@atlaskit/media-ui": "^25.
|
|
47
|
+
"@atlaskit/media-ui": "^25.4.0",
|
|
49
48
|
"@atlaskit/platform-feature-flags": "^0.2.4",
|
|
50
49
|
"@atlaskit/primitives": "^4.0.0",
|
|
51
50
|
"@atlaskit/side-navigation": "^3.0.0",
|