@atlaskit/media-avatar-picker 26.3.14 → 26.3.15
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 +8 -0
- package/dist/cjs/image-cropper/index.js +1 -1
- package/dist/cjs/predefined-avatar-view/index.js +1 -1
- package/dist/es2019/image-cropper/index.js +1 -1
- package/dist/es2019/predefined-avatar-view/index.js +1 -1
- package/dist/esm/image-cropper/index.js +1 -1
- package/dist/esm/predefined-avatar-view/index.js +1 -1
- package/example-helpers/StatefulAvatarPickerDialog.tsx +7 -7
- package/example-helpers/viewport-debug.ts +5 -5
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/media-avatar-picker
|
|
2
2
|
|
|
3
|
+
## 26.3.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`7b2a6c98563cb`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7b2a6c98563cb) -
|
|
8
|
+
Icon entry point migration update
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 26.3.14
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -17,7 +17,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
17
17
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
18
18
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
19
19
|
var _react = _interopRequireWildcard(require("react"));
|
|
20
|
-
var _cross = _interopRequireDefault(require("@atlaskit/icon/core/
|
|
20
|
+
var _cross = _interopRequireDefault(require("@atlaskit/icon/core/cross"));
|
|
21
21
|
var _reactIntlNext = require("react-intl-next");
|
|
22
22
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
23
23
|
var _isImageRemote = require("./isImageRemote");
|
|
@@ -15,7 +15,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
15
15
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
16
16
|
var _reactIntlNext = require("react-intl-next");
|
|
17
17
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
18
|
-
var _arrowLeft = _interopRequireDefault(require("@atlaskit/icon/core/
|
|
18
|
+
var _arrowLeft = _interopRequireDefault(require("@atlaskit/icon/core/arrow-left"));
|
|
19
19
|
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
20
20
|
var _colors = require("@atlaskit/theme/colors");
|
|
21
21
|
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); }
|
|
@@ -5,7 +5,7 @@ import "./index.compiled.css";
|
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import { Component } from 'react';
|
|
8
|
-
import CrossIcon from '@atlaskit/icon/core/
|
|
8
|
+
import CrossIcon from '@atlaskit/icon/core/cross';
|
|
9
9
|
import { injectIntl } from 'react-intl-next';
|
|
10
10
|
import { messages, MediaImage } from '@atlaskit/media-ui';
|
|
11
11
|
import { isImageRemote } from './isImageRemote';
|
|
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
6
6
|
import { messages } from '@atlaskit/media-ui';
|
|
7
|
-
import ArrowLeftIcon from '@atlaskit/icon/core/
|
|
7
|
+
import ArrowLeftIcon from '@atlaskit/icon/core/arrow-left';
|
|
8
8
|
import Button from '@atlaskit/button/standard-button';
|
|
9
9
|
import { B200, B100 } from '@atlaskit/theme/colors';
|
|
10
10
|
import { forwardRef, useState } from 'react';
|
|
@@ -14,7 +14,7 @@ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstruct
|
|
|
14
14
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
15
15
|
import React from 'react';
|
|
16
16
|
import { Component } from 'react';
|
|
17
|
-
import CrossIcon from '@atlaskit/icon/core/
|
|
17
|
+
import CrossIcon from '@atlaskit/icon/core/cross';
|
|
18
18
|
import { injectIntl } from 'react-intl-next';
|
|
19
19
|
import { messages, MediaImage } from '@atlaskit/media-ui';
|
|
20
20
|
import { isImageRemote } from './isImageRemote';
|
|
@@ -8,7 +8,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
8
8
|
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; }
|
|
9
9
|
import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
10
10
|
import { messages } from '@atlaskit/media-ui';
|
|
11
|
-
import ArrowLeftIcon from '@atlaskit/icon/core/
|
|
11
|
+
import ArrowLeftIcon from '@atlaskit/icon/core/arrow-left';
|
|
12
12
|
import Button from '@atlaskit/button/standard-button';
|
|
13
13
|
import { B200, B100 } from '@atlaskit/theme/colors';
|
|
14
14
|
import { forwardRef, useState } from 'react';
|
|
@@ -65,24 +65,24 @@ export default class StatefulAvatarPickerDialog extends React.Component<
|
|
|
65
65
|
altText: '',
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
-
componentWillUnmount() {
|
|
68
|
+
componentWillUnmount(): void {
|
|
69
69
|
clearTimeout(this.timeoutId);
|
|
70
70
|
if (this.fileURL) {
|
|
71
71
|
URL.revokeObjectURL(this.fileURL);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
openPicker = () => {
|
|
75
|
+
openPicker = (): void => {
|
|
76
76
|
this.setState({ isOpen: true });
|
|
77
77
|
};
|
|
78
78
|
|
|
79
|
-
closePicker = () => {
|
|
79
|
+
closePicker = (): void => {
|
|
80
80
|
this.setState({ isOpen: false });
|
|
81
81
|
};
|
|
82
82
|
|
|
83
|
-
setIsLoading = () => this.setState({ isLoading: true });
|
|
83
|
+
setIsLoading = (): void => this.setState({ isLoading: true });
|
|
84
84
|
|
|
85
|
-
saveDataURI = (dataURI: any) => {
|
|
85
|
+
saveDataURI = (dataURI: any): void => {
|
|
86
86
|
// Fake "uploading" call by adding a delay
|
|
87
87
|
this.timeoutId = window.setTimeout(() => {
|
|
88
88
|
this.setState({
|
|
@@ -93,7 +93,7 @@ export default class StatefulAvatarPickerDialog extends React.Component<
|
|
|
93
93
|
}, 2000);
|
|
94
94
|
};
|
|
95
95
|
|
|
96
|
-
saveFileAndCrop = (file: File) => {
|
|
96
|
+
saveFileAndCrop = (file: File): void => {
|
|
97
97
|
// Fake "uploading" call by adding a delay
|
|
98
98
|
this.timeoutId = window.setTimeout(() => {
|
|
99
99
|
this.fileURL = URL.createObjectURL(file);
|
|
@@ -105,7 +105,7 @@ export default class StatefulAvatarPickerDialog extends React.Component<
|
|
|
105
105
|
}, 2000);
|
|
106
106
|
};
|
|
107
107
|
|
|
108
|
-
setAltText = (altText: string) => {
|
|
108
|
+
setAltText = (altText: string): void => {
|
|
109
109
|
this.setState({ altText });
|
|
110
110
|
};
|
|
111
111
|
|
|
@@ -33,7 +33,7 @@ export class ViewportDebugger {
|
|
|
33
33
|
this.pollForViewportChanges();
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
initCanvas() {
|
|
36
|
+
initCanvas(): void {
|
|
37
37
|
const { previewCanvas, navigationCanvasPos, previewCanvasPos, viewport } = this;
|
|
38
38
|
const { innerBounds } = viewport;
|
|
39
39
|
previewCanvas.width = innerBounds.width;
|
|
@@ -58,7 +58,7 @@ export class ViewportDebugger {
|
|
|
58
58
|
document.body.appendChild(this.previewCanvas);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
pollForViewportChanges = () => {
|
|
61
|
+
pollForViewportChanges = (): void => {
|
|
62
62
|
const viewport = this.viewport;
|
|
63
63
|
if (viewport.isEmpty) {
|
|
64
64
|
delete this.imageElement;
|
|
@@ -78,12 +78,12 @@ export class ViewportDebugger {
|
|
|
78
78
|
requestAnimationFrame(this.pollForViewportChanges);
|
|
79
79
|
};
|
|
80
80
|
|
|
81
|
-
render() {
|
|
81
|
+
render(): void {
|
|
82
82
|
this.renderNavigation();
|
|
83
83
|
this.renderPreview();
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
renderNavigation() {
|
|
86
|
+
renderNavigation(): void {
|
|
87
87
|
const { navigationCanvas } = this;
|
|
88
88
|
const { itemBounds, outerBounds, innerBounds } = this.viewport;
|
|
89
89
|
const ctx = navigationCanvas.getContext('2d');
|
|
@@ -119,7 +119,7 @@ export class ViewportDebugger {
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
renderPreview() {
|
|
122
|
+
renderPreview(): void {
|
|
123
123
|
const { previewCanvas, viewport, imageElement } = this;
|
|
124
124
|
const { outerBounds } = viewport;
|
|
125
125
|
previewCanvas.width = outerBounds.width;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-avatar-picker",
|
|
3
|
-
"version": "26.3.
|
|
3
|
+
"version": "26.3.15",
|
|
4
4
|
"description": "A component to select, drag and resize image avatars. It also provides a default list of predefined avatars.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@atlaskit/button": "^23.9.0",
|
|
35
35
|
"@atlaskit/css": "^0.19.0",
|
|
36
36
|
"@atlaskit/flag": "^17.7.0",
|
|
37
|
-
"@atlaskit/form": "^15.
|
|
37
|
+
"@atlaskit/form": "^15.2.0",
|
|
38
38
|
"@atlaskit/icon": "^29.3.0",
|
|
39
39
|
"@atlaskit/media-ui": "^28.7.0",
|
|
40
40
|
"@atlaskit/modal-dialog": "^14.9.0",
|