@atlaskit/editor-extension-dropbox 8.1.2 → 8.1.4
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 +12 -0
- package/dist/cjs/enable-dropbox.js +4 -4
- package/dist/cjs/manifest.js +32 -32
- package/dist/esm/enable-dropbox.js +4 -4
- package/dist/esm/manifest.js +31 -31
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -13,11 +13,11 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
13
13
|
// eslint-disable-next-line require-await
|
|
14
14
|
var _default = exports.default = /*#__PURE__*/function () {
|
|
15
15
|
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(appKey) {
|
|
16
|
-
return _regenerator.default.wrap(function
|
|
16
|
+
return _regenerator.default.wrap(function (_context) {
|
|
17
17
|
while (1) switch (_context.prev = _context.next) {
|
|
18
18
|
case 0:
|
|
19
19
|
if (window.Dropbox) {
|
|
20
|
-
_context.next =
|
|
20
|
+
_context.next = 1;
|
|
21
21
|
break;
|
|
22
22
|
}
|
|
23
23
|
return _context.abrupt("return", Promise.resolve().then(function () {
|
|
@@ -25,10 +25,10 @@ var _default = exports.default = /*#__PURE__*/function () {
|
|
|
25
25
|
}).then(function () {
|
|
26
26
|
window.Dropbox.appKey = appKey;
|
|
27
27
|
}));
|
|
28
|
-
case
|
|
28
|
+
case 1:
|
|
29
29
|
window.Dropbox.appKey = appKey;
|
|
30
30
|
return _context.abrupt("return", Promise.resolve());
|
|
31
|
-
case
|
|
31
|
+
case 2:
|
|
32
32
|
case "end":
|
|
33
33
|
return _context.stop();
|
|
34
34
|
}
|
package/dist/cjs/manifest.js
CHANGED
|
@@ -15,31 +15,31 @@ var _builders = require("@atlaskit/adf-utils/builders");
|
|
|
15
15
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
16
16
|
var _enableDropbox = _interopRequireDefault(require("./enable-dropbox"));
|
|
17
17
|
var _constants = require("./constants");
|
|
18
|
-
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
|
|
18
|
+
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 _t3 in e) "default" !== _t3 && {}.hasOwnProperty.call(e, _t3) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t3)) && (i.get || i.set) ? o(f, _t3, i) : f[_t3] = e[_t3]); return f; })(e, t); }
|
|
19
19
|
function pickFromDropbox(_x, _x2) {
|
|
20
20
|
return _pickFromDropbox.apply(this, arguments);
|
|
21
21
|
}
|
|
22
22
|
function _pickFromDropbox() {
|
|
23
23
|
_pickFromDropbox = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(appKey, canMountinIframe) {
|
|
24
|
-
var popupMountPoint, root, Modal, files, node, newNodes;
|
|
25
|
-
return _regenerator.default.wrap(function
|
|
24
|
+
var popupMountPoint, root, Modal, files, node, newNodes, _t2;
|
|
25
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
26
26
|
while (1) switch (_context2.prev = _context2.next) {
|
|
27
27
|
case 0:
|
|
28
|
-
_context2.next =
|
|
28
|
+
_context2.next = 1;
|
|
29
29
|
return (0, _enableDropbox.default)(appKey);
|
|
30
|
-
case
|
|
30
|
+
case 1:
|
|
31
31
|
root = null; // BC - as of 2020-01-21 this does not work, as no dropbox app we have is authorised
|
|
32
32
|
// to iframe in the picker - we are currently waiting for permissions.
|
|
33
33
|
// To test the picker, comment out the render call, and the `iframe` and `winowName` options
|
|
34
34
|
if (!canMountinIframe) {
|
|
35
|
-
_context2.next =
|
|
35
|
+
_context2.next = 3;
|
|
36
36
|
break;
|
|
37
37
|
}
|
|
38
|
-
_context2.next =
|
|
38
|
+
_context2.next = 2;
|
|
39
39
|
return Promise.resolve().then(function () {
|
|
40
40
|
return _interopRequireWildcard(require('./modal'));
|
|
41
41
|
});
|
|
42
|
-
case
|
|
42
|
+
case 2:
|
|
43
43
|
Modal = _context2.sent;
|
|
44
44
|
// The decision has been made to simply append our modal to the body
|
|
45
45
|
// Using the passed in popupMountPoint has the potential to cause
|
|
@@ -64,9 +64,9 @@ function _pickFromDropbox() {
|
|
|
64
64
|
onClose: function onClose() {}
|
|
65
65
|
}), popupMountPoint);
|
|
66
66
|
}
|
|
67
|
-
case
|
|
68
|
-
_context2.prev =
|
|
69
|
-
_context2.next =
|
|
67
|
+
case 3:
|
|
68
|
+
_context2.prev = 3;
|
|
69
|
+
_context2.next = 4;
|
|
70
70
|
return new Promise(function (resolve, reject) {
|
|
71
71
|
window.Dropbox.choose({
|
|
72
72
|
iframe: canMountinIframe,
|
|
@@ -75,13 +75,13 @@ function _pickFromDropbox() {
|
|
|
75
75
|
cancel: reject
|
|
76
76
|
});
|
|
77
77
|
});
|
|
78
|
-
case
|
|
78
|
+
case 4:
|
|
79
79
|
files = _context2.sent;
|
|
80
|
-
_context2.next =
|
|
80
|
+
_context2.next = 6;
|
|
81
81
|
break;
|
|
82
|
-
case
|
|
83
|
-
_context2.prev =
|
|
84
|
-
|
|
82
|
+
case 5:
|
|
83
|
+
_context2.prev = 5;
|
|
84
|
+
_t2 = _context2["catch"](3);
|
|
85
85
|
if ((0, _expValEquals.expValEquals)('platform_editor_react19_migration', 'isEnabled', true)) {
|
|
86
86
|
if (root) {
|
|
87
87
|
root.unmount();
|
|
@@ -90,9 +90,9 @@ function _pickFromDropbox() {
|
|
|
90
90
|
_reactDom.default.unmountComponentAtNode(popupMountPoint);
|
|
91
91
|
}
|
|
92
92
|
return _context2.abrupt("return");
|
|
93
|
-
case
|
|
93
|
+
case 6:
|
|
94
94
|
if (files.length) {
|
|
95
|
-
_context2.next =
|
|
95
|
+
_context2.next = 7;
|
|
96
96
|
break;
|
|
97
97
|
}
|
|
98
98
|
if ((0, _expValEquals.expValEquals)('platform_editor_react19_migration', 'isEnabled', true)) {
|
|
@@ -103,7 +103,7 @@ function _pickFromDropbox() {
|
|
|
103
103
|
_reactDom.default.unmountComponentAtNode(popupMountPoint);
|
|
104
104
|
}
|
|
105
105
|
return _context2.abrupt("return");
|
|
106
|
-
case
|
|
106
|
+
case 7:
|
|
107
107
|
newNodes = files.map(function (file) {
|
|
108
108
|
return (0, _builders.inlineCard)({
|
|
109
109
|
url: file.link
|
|
@@ -127,11 +127,11 @@ function _pickFromDropbox() {
|
|
|
127
127
|
_reactDom.default.unmountComponentAtNode(popupMountPoint);
|
|
128
128
|
}
|
|
129
129
|
return _context2.abrupt("return", node);
|
|
130
|
-
case
|
|
130
|
+
case 8:
|
|
131
131
|
case "end":
|
|
132
132
|
return _context2.stop();
|
|
133
133
|
}
|
|
134
|
-
}, _callee2, null, [[
|
|
134
|
+
}, _callee2, null, [[3, 5]]);
|
|
135
135
|
}));
|
|
136
136
|
return _pickFromDropbox.apply(this, arguments);
|
|
137
137
|
}
|
|
@@ -174,31 +174,31 @@ var manifestFunction = function manifestFunction(_ref) {
|
|
|
174
174
|
// eslint-disable-next-line no-async-promise-executor
|
|
175
175
|
new Promise( /*#__PURE__*/function () {
|
|
176
176
|
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(resolve, reject) {
|
|
177
|
-
var newNode;
|
|
178
|
-
return _regenerator.default.wrap(function
|
|
177
|
+
var newNode, _t;
|
|
178
|
+
return _regenerator.default.wrap(function (_context) {
|
|
179
179
|
while (1) switch (_context.prev = _context.next) {
|
|
180
180
|
case 0:
|
|
181
181
|
_context.prev = 0;
|
|
182
|
-
_context.next =
|
|
182
|
+
_context.next = 1;
|
|
183
183
|
return pickFromDropbox(appKey, canMountinIframe);
|
|
184
|
-
case
|
|
184
|
+
case 1:
|
|
185
185
|
newNode = _context.sent;
|
|
186
186
|
if (!newNode) {
|
|
187
187
|
reject();
|
|
188
188
|
} else {
|
|
189
189
|
resolve(newNode);
|
|
190
190
|
}
|
|
191
|
-
_context.next =
|
|
191
|
+
_context.next = 3;
|
|
192
192
|
break;
|
|
193
|
-
case
|
|
194
|
-
_context.prev =
|
|
195
|
-
|
|
196
|
-
reject(
|
|
197
|
-
case
|
|
193
|
+
case 2:
|
|
194
|
+
_context.prev = 2;
|
|
195
|
+
_t = _context["catch"](0);
|
|
196
|
+
reject(_t);
|
|
197
|
+
case 3:
|
|
198
198
|
case "end":
|
|
199
199
|
return _context.stop();
|
|
200
200
|
}
|
|
201
|
-
}, _callee, null, [[0,
|
|
201
|
+
}, _callee, null, [[0, 2]]);
|
|
202
202
|
}));
|
|
203
203
|
return function (_x3, _x4) {
|
|
204
204
|
return _ref2.apply(this, arguments);
|
|
@@ -4,20 +4,20 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
4
4
|
// eslint-disable-next-line require-await
|
|
5
5
|
export default ( /*#__PURE__*/(function () {
|
|
6
6
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(appKey) {
|
|
7
|
-
return _regeneratorRuntime.wrap(function
|
|
7
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
8
8
|
while (1) switch (_context.prev = _context.next) {
|
|
9
9
|
case 0:
|
|
10
10
|
if (window.Dropbox) {
|
|
11
|
-
_context.next =
|
|
11
|
+
_context.next = 1;
|
|
12
12
|
break;
|
|
13
13
|
}
|
|
14
14
|
return _context.abrupt("return", import('./dropboxscript').then(function () {
|
|
15
15
|
window.Dropbox.appKey = appKey;
|
|
16
16
|
}));
|
|
17
|
-
case
|
|
17
|
+
case 1:
|
|
18
18
|
window.Dropbox.appKey = appKey;
|
|
19
19
|
return _context.abrupt("return", Promise.resolve());
|
|
20
|
-
case
|
|
20
|
+
case 2:
|
|
21
21
|
case "end":
|
|
22
22
|
return _context.stop();
|
|
23
23
|
}
|
package/dist/esm/manifest.js
CHANGED
|
@@ -12,23 +12,23 @@ function pickFromDropbox(_x, _x2) {
|
|
|
12
12
|
}
|
|
13
13
|
function _pickFromDropbox() {
|
|
14
14
|
_pickFromDropbox = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(appKey, canMountinIframe) {
|
|
15
|
-
var popupMountPoint, root, Modal, files, node, newNodes;
|
|
16
|
-
return _regeneratorRuntime.wrap(function
|
|
15
|
+
var popupMountPoint, root, Modal, files, node, newNodes, _t2;
|
|
16
|
+
return _regeneratorRuntime.wrap(function (_context2) {
|
|
17
17
|
while (1) switch (_context2.prev = _context2.next) {
|
|
18
18
|
case 0:
|
|
19
|
-
_context2.next =
|
|
19
|
+
_context2.next = 1;
|
|
20
20
|
return enableDropbox(appKey);
|
|
21
|
-
case
|
|
21
|
+
case 1:
|
|
22
22
|
root = null; // BC - as of 2020-01-21 this does not work, as no dropbox app we have is authorised
|
|
23
23
|
// to iframe in the picker - we are currently waiting for permissions.
|
|
24
24
|
// To test the picker, comment out the render call, and the `iframe` and `winowName` options
|
|
25
25
|
if (!canMountinIframe) {
|
|
26
|
-
_context2.next =
|
|
26
|
+
_context2.next = 3;
|
|
27
27
|
break;
|
|
28
28
|
}
|
|
29
|
-
_context2.next =
|
|
29
|
+
_context2.next = 2;
|
|
30
30
|
return import('./modal');
|
|
31
|
-
case
|
|
31
|
+
case 2:
|
|
32
32
|
Modal = _context2.sent;
|
|
33
33
|
// The decision has been made to simply append our modal to the body
|
|
34
34
|
// Using the passed in popupMountPoint has the potential to cause
|
|
@@ -53,9 +53,9 @@ function _pickFromDropbox() {
|
|
|
53
53
|
onClose: function onClose() {}
|
|
54
54
|
}), popupMountPoint);
|
|
55
55
|
}
|
|
56
|
-
case
|
|
57
|
-
_context2.prev =
|
|
58
|
-
_context2.next =
|
|
56
|
+
case 3:
|
|
57
|
+
_context2.prev = 3;
|
|
58
|
+
_context2.next = 4;
|
|
59
59
|
return new Promise(function (resolve, reject) {
|
|
60
60
|
window.Dropbox.choose({
|
|
61
61
|
iframe: canMountinIframe,
|
|
@@ -64,13 +64,13 @@ function _pickFromDropbox() {
|
|
|
64
64
|
cancel: reject
|
|
65
65
|
});
|
|
66
66
|
});
|
|
67
|
-
case
|
|
67
|
+
case 4:
|
|
68
68
|
files = _context2.sent;
|
|
69
|
-
_context2.next =
|
|
69
|
+
_context2.next = 6;
|
|
70
70
|
break;
|
|
71
|
-
case
|
|
72
|
-
_context2.prev =
|
|
73
|
-
|
|
71
|
+
case 5:
|
|
72
|
+
_context2.prev = 5;
|
|
73
|
+
_t2 = _context2["catch"](3);
|
|
74
74
|
if (expValEquals('platform_editor_react19_migration', 'isEnabled', true)) {
|
|
75
75
|
if (root) {
|
|
76
76
|
root.unmount();
|
|
@@ -79,9 +79,9 @@ function _pickFromDropbox() {
|
|
|
79
79
|
ReactDOM.unmountComponentAtNode(popupMountPoint);
|
|
80
80
|
}
|
|
81
81
|
return _context2.abrupt("return");
|
|
82
|
-
case
|
|
82
|
+
case 6:
|
|
83
83
|
if (files.length) {
|
|
84
|
-
_context2.next =
|
|
84
|
+
_context2.next = 7;
|
|
85
85
|
break;
|
|
86
86
|
}
|
|
87
87
|
if (expValEquals('platform_editor_react19_migration', 'isEnabled', true)) {
|
|
@@ -92,7 +92,7 @@ function _pickFromDropbox() {
|
|
|
92
92
|
ReactDOM.unmountComponentAtNode(popupMountPoint);
|
|
93
93
|
}
|
|
94
94
|
return _context2.abrupt("return");
|
|
95
|
-
case
|
|
95
|
+
case 7:
|
|
96
96
|
newNodes = files.map(function (file) {
|
|
97
97
|
return inlineCard({
|
|
98
98
|
url: file.link
|
|
@@ -116,11 +116,11 @@ function _pickFromDropbox() {
|
|
|
116
116
|
ReactDOM.unmountComponentAtNode(popupMountPoint);
|
|
117
117
|
}
|
|
118
118
|
return _context2.abrupt("return", node);
|
|
119
|
-
case
|
|
119
|
+
case 8:
|
|
120
120
|
case "end":
|
|
121
121
|
return _context2.stop();
|
|
122
122
|
}
|
|
123
|
-
}, _callee2, null, [[
|
|
123
|
+
}, _callee2, null, [[3, 5]]);
|
|
124
124
|
}));
|
|
125
125
|
return _pickFromDropbox.apply(this, arguments);
|
|
126
126
|
}
|
|
@@ -157,31 +157,31 @@ var manifestFunction = function manifestFunction(_ref) {
|
|
|
157
157
|
// eslint-disable-next-line no-async-promise-executor
|
|
158
158
|
new Promise( /*#__PURE__*/function () {
|
|
159
159
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(resolve, reject) {
|
|
160
|
-
var newNode;
|
|
161
|
-
return _regeneratorRuntime.wrap(function
|
|
160
|
+
var newNode, _t;
|
|
161
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
162
162
|
while (1) switch (_context.prev = _context.next) {
|
|
163
163
|
case 0:
|
|
164
164
|
_context.prev = 0;
|
|
165
|
-
_context.next =
|
|
165
|
+
_context.next = 1;
|
|
166
166
|
return pickFromDropbox(appKey, canMountinIframe);
|
|
167
|
-
case
|
|
167
|
+
case 1:
|
|
168
168
|
newNode = _context.sent;
|
|
169
169
|
if (!newNode) {
|
|
170
170
|
reject();
|
|
171
171
|
} else {
|
|
172
172
|
resolve(newNode);
|
|
173
173
|
}
|
|
174
|
-
_context.next =
|
|
174
|
+
_context.next = 3;
|
|
175
175
|
break;
|
|
176
|
-
case
|
|
177
|
-
_context.prev =
|
|
178
|
-
|
|
179
|
-
reject(
|
|
180
|
-
case
|
|
176
|
+
case 2:
|
|
177
|
+
_context.prev = 2;
|
|
178
|
+
_t = _context["catch"](0);
|
|
179
|
+
reject(_t);
|
|
180
|
+
case 3:
|
|
181
181
|
case "end":
|
|
182
182
|
return _context.stop();
|
|
183
183
|
}
|
|
184
|
-
}, _callee, null, [[0,
|
|
184
|
+
}, _callee, null, [[0, 2]]);
|
|
185
185
|
}));
|
|
186
186
|
return function (_x3, _x4) {
|
|
187
187
|
return _ref2.apply(this, arguments);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-extension-dropbox",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.4",
|
|
4
4
|
"description": "A an atlassian editor extension to add a native dropbox picker",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -38,20 +38,20 @@
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@atlaskit/adf-utils": "^19.
|
|
41
|
+
"@atlaskit/adf-utils": "^19.32.0",
|
|
42
42
|
"@atlaskit/button": "^23.11.0",
|
|
43
43
|
"@atlaskit/heading": "^5.4.0",
|
|
44
44
|
"@atlaskit/modal-dialog": "^15.2.0",
|
|
45
45
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
46
46
|
"@atlaskit/primitives": "^19.0.0",
|
|
47
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
48
|
-
"@atlaskit/tokens": "^13.
|
|
47
|
+
"@atlaskit/tmp-editor-statsig": "^85.0.0",
|
|
48
|
+
"@atlaskit/tokens": "^13.1.0",
|
|
49
49
|
"@babel/runtime": "^7.0.0",
|
|
50
50
|
"@compiled/react": "^0.20.0",
|
|
51
51
|
"@emotion/react": "^11.7.1"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@atlaskit/editor-common": "^114.
|
|
54
|
+
"@atlaskit/editor-common": "^114.50.0",
|
|
55
55
|
"react": "^18.2.0",
|
|
56
56
|
"react-dom": "^18.2.0"
|
|
57
57
|
},
|