@atlaskit/media-picker 66.4.0 → 66.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/media-picker
2
2
 
3
+ ## 66.4.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#92007](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/92007) [`85525725cb0d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/85525725cb0d) - Migrated to the new button component
8
+
9
+ ## 66.4.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#88717](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/88717) [`d92770eae702`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d92770eae702) - Adding internal eslint opt outs for a new rule `@atlaskit/design-system/no-direct-use-of-web-platform-drag-and-drop`.
14
+
3
15
  ## 66.4.0
4
16
 
5
17
  ### Minor Changes
@@ -42,9 +42,12 @@ var DropzoneBase = exports.DropzoneBase = /*#__PURE__*/function (_LocalUploadCom
42
42
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "uiActive", false);
43
43
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "addContainerListeners", function () {
44
44
  var container = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this.getContainer();
45
+ // TODO: migrate this file to Pragmatic drag and drop
46
+ /* eslint-disable @atlaskit/design-system/no-direct-use-of-web-platform-drag-and-drop */
45
47
  container.addEventListener('dragover', _this.onDragOver, false);
46
48
  container.addEventListener('dragleave', _this.onDragLeave, false);
47
49
  container.addEventListener('drop', _this.onFileDropped);
50
+ /* eslint-enable @atlaskit/design-system/no-direct-use-of-web-platform-drag-and-drop */
48
51
  });
49
52
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "removeContainerListeners", function () {
50
53
  var container = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this.getContainer();
@@ -9,7 +9,7 @@ var _mediaClient = require("@atlaskit/media-client");
9
9
  // Component name will be prefixed with "media-picker-" in logs. Check ufoExperiences in utils files
10
10
 
11
11
  var packageName = "@atlaskit/media-picker";
12
- var packageVersion = "66.4.0";
12
+ var packageVersion = "66.4.2";
13
13
  function getPackageAttributes(componentName) {
14
14
  return {
15
15
  packageName: packageName,
@@ -12,7 +12,7 @@ var _mediaClient = require("@atlaskit/media-client");
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-picker";
15
- var packageVersion = "66.4.0";
15
+ var packageVersion = "66.4.2";
16
16
  var ufoExperience;
17
17
  var initExperience = function initExperience(id, componentName) {
18
18
  if (!ufoExperience) {
@@ -22,9 +22,12 @@ export class DropzoneBase extends LocalUploadComponentReact {
22
22
  super(props, COMPONENT_NAME);
23
23
  _defineProperty(this, "uiActive", false);
24
24
  _defineProperty(this, "addContainerListeners", (container = this.getContainer()) => {
25
+ // TODO: migrate this file to Pragmatic drag and drop
26
+ /* eslint-disable @atlaskit/design-system/no-direct-use-of-web-platform-drag-and-drop */
25
27
  container.addEventListener('dragover', this.onDragOver, false);
26
28
  container.addEventListener('dragleave', this.onDragLeave, false);
27
29
  container.addEventListener('drop', this.onFileDropped);
30
+ /* eslint-enable @atlaskit/design-system/no-direct-use-of-web-platform-drag-and-drop */
28
31
  });
29
32
  _defineProperty(this, "removeContainerListeners", (container = this.getContainer()) => {
30
33
  container.removeEventListener('dragover', this.onDragOver, false);
@@ -3,7 +3,7 @@ import { isRequestError } from '@atlaskit/media-client';
3
3
  // Component name will be prefixed with "media-picker-" in logs. Check ufoExperiences in utils files
4
4
 
5
5
  const packageName = "@atlaskit/media-picker";
6
- const packageVersion = "66.4.0";
6
+ const packageVersion = "66.4.2";
7
7
  export function getPackageAttributes(componentName) {
8
8
  return {
9
9
  packageName,
@@ -2,7 +2,7 @@ import { ConcurrentExperience, ExperiencePerformanceTypes, ExperienceTypes } fro
2
2
  import { getFeatureFlagKeysAllProducts } from '@atlaskit/media-common';
3
3
  import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
4
4
  const packageName = "@atlaskit/media-picker";
5
- const packageVersion = "66.4.0";
5
+ const packageVersion = "66.4.2";
6
6
  let ufoExperience;
7
7
  const initExperience = (id, componentName) => {
8
8
  if (!ufoExperience) {
@@ -35,9 +35,12 @@ export var DropzoneBase = /*#__PURE__*/function (_LocalUploadComponent) {
35
35
  _defineProperty(_assertThisInitialized(_this), "uiActive", false);
36
36
  _defineProperty(_assertThisInitialized(_this), "addContainerListeners", function () {
37
37
  var container = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this.getContainer();
38
+ // TODO: migrate this file to Pragmatic drag and drop
39
+ /* eslint-disable @atlaskit/design-system/no-direct-use-of-web-platform-drag-and-drop */
38
40
  container.addEventListener('dragover', _this.onDragOver, false);
39
41
  container.addEventListener('dragleave', _this.onDragLeave, false);
40
42
  container.addEventListener('drop', _this.onFileDropped);
43
+ /* eslint-enable @atlaskit/design-system/no-direct-use-of-web-platform-drag-and-drop */
41
44
  });
42
45
  _defineProperty(_assertThisInitialized(_this), "removeContainerListeners", function () {
43
46
  var container = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this.getContainer();
@@ -3,7 +3,7 @@ import { isRequestError } from '@atlaskit/media-client';
3
3
  // Component name will be prefixed with "media-picker-" in logs. Check ufoExperiences in utils files
4
4
 
5
5
  var packageName = "@atlaskit/media-picker";
6
- var packageVersion = "66.4.0";
6
+ var packageVersion = "66.4.2";
7
7
  export function getPackageAttributes(componentName) {
8
8
  return {
9
9
  packageName: packageName,
@@ -5,7 +5,7 @@ import { ConcurrentExperience, ExperiencePerformanceTypes, ExperienceTypes } fro
5
5
  import { getFeatureFlagKeysAllProducts } from '@atlaskit/media-common';
6
6
  import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
7
7
  var packageName = "@atlaskit/media-picker";
8
- var packageVersion = "66.4.0";
8
+ var packageVersion = "66.4.2";
9
9
  var ufoExperience;
10
10
  var initExperience = function initExperience(id, componentName) {
11
11
  if (!ufoExperience) {
@@ -6,85 +6,87 @@ interface DropzoneContainerProps {
6
6
  isActive: boolean;
7
7
  }
8
8
 
9
- export const popupContainerStyles = css`
10
- display: flex;
11
- flex-direction: column;
12
- overflow: scroll;
13
- `;
9
+ export const popupContainerStyles = css({
10
+ display: 'flex',
11
+ flexDirection: 'column',
12
+ overflow: 'scroll',
13
+ });
14
14
 
15
15
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
16
- export const popupHeaderStyles = css`
17
- border-bottom: 1px solid #ccc;
18
- margin-bottom: 15px;
19
- display: flex;
20
- align-items: center;
21
- padding: 30px 0;
22
-
23
- > * {
24
- margin-right: 15px;
25
- }
26
- `;
16
+ export const popupHeaderStyles = css({
17
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage -- needs to be converted to tokens
18
+ borderBottom: '1px solid #ccc',
19
+ marginBottom: '15px',
20
+ display: 'flex',
21
+ alignItems: 'center',
22
+ padding: '30px 0',
23
+ '> *': {
24
+ marginRight: '15px',
25
+ },
26
+ });
27
27
 
28
28
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
29
- export const previewImageWrapperStyles = css`
30
- position: relative;
31
- margin-right: 15px;
32
- `;
29
+ export const previewImageWrapperStyles = css({
30
+ position: 'relative',
31
+ marginRight: '15px',
32
+ });
33
33
 
34
34
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
35
- export const infoWrapperStyles = css`
36
- position: absolute;
37
- width: 160px;
38
- color: black;
39
- font-size: 12px;
40
- top: 120px;
41
- left: 0;
42
- text-align: center;
43
- `;
44
-
45
- export const dropzoneContainerStyles = ({
46
- isActive,
47
- }: DropzoneContainerProps) => css`
48
- width: 600px;
49
- min-height: 500px;
50
- border: 1px dashed transparent;
51
- ${isActive ? `border-color: gray;` : ''}
52
- `;
53
-
54
- export const dropzoneRootStyles = css`
55
- display: flex;
56
- `;
57
-
58
- export const dropzoneContentWrapperStyles = css`
59
- display: flex;
60
- min-height: 200px;
61
- `;
62
-
63
- export const previewsWrapperStyles = css`
64
- display: flex;
65
- flex-direction: column;
66
- overflow: visible;
67
- margin-left: ${token('space.250', '20px')};
68
- margin-bottom: ${token('space.250', '20px')};
69
- `;
70
-
71
- export const previewsTitleStyles = css`
72
- width: 100%;
73
- `;
74
-
75
- export const uploadPreviewsFlexRowStyles = css`
76
- display: flex;
77
- flex-direction: row;
78
- flex-wrap: wrap;
79
- `;
80
-
81
- export const dropzoneItemsInfoStyles = css`
82
- flex: 1;
83
- min-width: 600px;
84
- display: flex;
85
- align-items: center;
86
- flex-direction: column;
87
- `;
35
+ export const infoWrapperStyles = css({
36
+ position: 'absolute',
37
+ width: '160px',
38
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage -- needs to be converted to tokens
39
+ color: 'black',
40
+ fontSize: '12px',
41
+ top: '120px',
42
+ left: 0,
43
+ textAlign: 'center',
44
+ });
45
+
46
+ export const dropzoneContainerStyles = ({ isActive }: DropzoneContainerProps) =>
47
+ css(
48
+ {
49
+ width: '600px',
50
+ minHeight: '500px',
51
+ border: '1px dashed transparent',
52
+ },
53
+ isActive ? `border-color: gray;` : '',
54
+ );
55
+
56
+ export const dropzoneRootStyles = css({
57
+ display: 'flex',
58
+ });
59
+
60
+ export const dropzoneContentWrapperStyles = css({
61
+ display: 'flex',
62
+ minHeight: '200px',
63
+ });
64
+
65
+ export const previewsWrapperStyles = css({
66
+ display: 'flex',
67
+ flexDirection: 'column',
68
+ overflow: 'visible',
69
+ marginLeft: token('space.250', '20px'),
70
+ marginBottom: token('space.250', '20px'),
71
+ });
72
+
73
+ export const previewsTitleStyles = css({
74
+ width: '100%',
75
+ });
76
+
77
+ export const uploadPreviewsFlexRowStyles = css({
78
+ display: 'flex',
79
+ flexDirection: 'row',
80
+ flexWrap: 'wrap',
81
+ });
82
+
83
+ export const dropzoneItemsInfoStyles = css({
84
+ flex: 1,
85
+ minWidth: '600px',
86
+ display: 'flex',
87
+ alignItems: 'center',
88
+ flexDirection: 'column',
89
+ });
88
90
 
89
91
  interface ClipboardContainerProps {
90
92
  isWindowFocused: boolean;
@@ -93,39 +95,42 @@ interface ClipboardContainerProps {
93
95
  export const clipboardContainerStyles = ({
94
96
  isWindowFocused,
95
97
  }: // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
96
- ClipboardContainerProps) => css`
97
- padding: 10px;
98
- min-height: 400px;
99
-
100
- border: ${isWindowFocused ? `1px dashed gray` : `1px dashed transparent`};
101
- `;
98
+ ClipboardContainerProps) =>
99
+ css({
100
+ padding: '10px',
101
+ minHeight: '400px',
102
+ border: isWindowFocused ? `1px dashed gray` : `1px dashed transparent`,
103
+ });
102
104
 
103
105
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
104
- export const infoContainerStyles = css`
105
- position: absolute;
106
- top: 0;
107
- left: 0;
108
- margin: 0;
109
- border: 5px dashed #81ebff;
110
- box-shadow: 10px 10px 15px rgba(0, 0, 0, 0.3);
111
-
112
- .info {
113
- position: absolute;
114
- left: 0;
115
- bottom: -30px;
116
- background-color: black;
117
- opacity: 0.5;
118
- color: white;
119
- white-space: nowrap;
120
- }
121
-
122
- .close_button {
123
- position: absolute;
124
- top: 0;
125
- right: 0;
126
- }
127
- `;
128
-
106
+ export const infoContainerStyles = css({
107
+ position: 'absolute',
108
+ top: 0,
109
+ left: 0,
110
+ margin: 0,
111
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage -- needs to be converted to tokens
112
+ border: '5px dashed #81ebff',
113
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage -- needs to be converted to tokens
114
+ boxShadow: '10px 10px 15px rgba(0, 0, 0, 0.3)',
115
+ '.info': {
116
+ position: 'absolute',
117
+ left: 0,
118
+ bottom: '-30px',
119
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage -- needs to be converted to tokens
120
+ backgroundColor: 'black',
121
+ opacity: 0.5,
122
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage -- needs to be converted to tokens
123
+ color: 'white',
124
+ whiteSpace: 'nowrap',
125
+ },
126
+ '.close_button': {
127
+ position: 'absolute',
128
+ top: 0,
129
+ right: 0,
130
+ },
131
+ });
132
+
133
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
129
134
  export const pastedImageStyles = (style: PastedImageStyleType) => css`
130
135
  width: ${style.width ? `${style.width}px` : '100%'};
131
136
  ${style.height ? `height: ${style.height}px` : ''};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-picker",
3
- "version": "66.4.0",
3
+ "version": "66.4.2",
4
4
  "description": "Library for handling file uploads",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -34,15 +34,15 @@
34
34
  }
35
35
  },
36
36
  "dependencies": {
37
- "@atlaskit/analytics-next": "^9.2.0",
38
- "@atlaskit/flag": "^15.1.0",
37
+ "@atlaskit/analytics-next": "^9.3.0",
38
+ "@atlaskit/flag": "^15.4.0",
39
39
  "@atlaskit/icon": "^22.1.0",
40
- "@atlaskit/media-client": "^26.2.0",
40
+ "@atlaskit/media-client": "^26.3.0",
41
41
  "@atlaskit/media-client-react": "^2.0.0",
42
42
  "@atlaskit/media-common": "^11.1.0",
43
- "@atlaskit/media-ui": "^25.4.0",
43
+ "@atlaskit/media-ui": "^25.9.0",
44
44
  "@atlaskit/theme": "^12.7.0",
45
- "@atlaskit/tokens": "^1.42.0",
45
+ "@atlaskit/tokens": "^1.43.0",
46
46
  "@atlaskit/ufo": "^0.2.0",
47
47
  "@babel/runtime": "^7.0.0",
48
48
  "eventemitter2": "^4.1.0",
@@ -61,7 +61,7 @@
61
61
  "devDependencies": {
62
62
  "@atlaskit/analytics-listeners": "^8.9.0",
63
63
  "@atlaskit/analytics-namespaced-context": "^6.9.0",
64
- "@atlaskit/button": "^17.7.0",
64
+ "@atlaskit/button": "^17.14.0",
65
65
  "@atlaskit/media-core": "^34.2.0",
66
66
  "@atlaskit/media-test-helpers": "^33.0.0",
67
67
  "@atlaskit/ssr": "*",