@atlaskit/editor-extension-dropbox 0.3.6 → 0.3.8
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 +13 -0
- package/dist/cjs/dropboxscript.js +404 -573
- package/dist/cjs/enable-dropbox.js +16 -30
- package/dist/cjs/icons/DropboxIcon.js +0 -5
- package/dist/cjs/index.js +0 -2
- package/dist/cjs/manifest.js +105 -148
- package/dist/cjs/modal.js +8 -28
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/dropboxscript.js +401 -529
- package/dist/es2019/manifest.js +9 -29
- package/dist/es2019/modal.js +0 -5
- package/dist/es2019/version.json +1 -1
- package/dist/esm/dropboxscript.js +404 -571
- package/dist/esm/enable-dropbox.js +14 -20
- package/dist/esm/manifest.js +103 -141
- package/dist/esm/modal.js +7 -16
- package/dist/esm/version.json +1 -1
- package/package.json +7 -5
- package/report.api.md +14 -0
|
@@ -17,7 +17,6 @@ Please reach out to the Editor team if you need more information
|
|
|
17
17
|
for (var n in o) e[n] = o[n];
|
|
18
18
|
}(window, function (e) {
|
|
19
19
|
var o = {};
|
|
20
|
-
|
|
21
20
|
function n(t) {
|
|
22
21
|
if (o[t]) return o[t].exports;
|
|
23
22
|
var r = o[t] = {
|
|
@@ -27,7 +26,6 @@ Please reach out to the Editor team if you need more information
|
|
|
27
26
|
};
|
|
28
27
|
return e[t].call(r.exports, r, r.exports, n), r.l = !0, r.exports;
|
|
29
28
|
}
|
|
30
|
-
|
|
31
29
|
return n.m = e, n.c = o, n.d = function (e, o, t) {
|
|
32
30
|
n.o(e, o) || Object.defineProperty(e, o, {
|
|
33
31
|
enumerable: !0,
|
|
@@ -64,37 +62,32 @@ Please reach out to the Editor team if you need more information
|
|
|
64
62
|
"use strict";
|
|
65
63
|
|
|
66
64
|
var t,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
|
|
65
|
+
r = this && this.__assign || function () {
|
|
66
|
+
return (r = Object.assign || function (e) {
|
|
67
|
+
for (var o, n = 1, t = arguments.length; n < t; n++) for (var r in o = arguments[n]) Object.prototype.hasOwnProperty.call(o, r) && (e[r] = o[r]);
|
|
68
|
+
return e;
|
|
69
|
+
}).apply(this, arguments);
|
|
70
|
+
};
|
|
75
71
|
function i(e, o, n) {
|
|
76
72
|
return e + (-1 === e.indexOf("?") ? "?" : "&") + o + "=" + n;
|
|
77
73
|
}
|
|
78
|
-
|
|
79
74
|
function s(e) {
|
|
80
75
|
return i(e, "version", encodeURIComponent(Dropbox.VERSION));
|
|
81
76
|
}
|
|
82
|
-
|
|
83
77
|
function a(e, o) {
|
|
84
78
|
var n = encodeURIComponent(window.location.protocol + "//" + window.location.host),
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
79
|
+
t = encodeURIComponent(Dropbox.appKey),
|
|
80
|
+
r = encodeURIComponent(e.linkType || ""),
|
|
81
|
+
a = encodeURIComponent(e._trigger || "js"),
|
|
82
|
+
c = Boolean(e.multiselect),
|
|
83
|
+
l = encodeURIComponent(d(e.extensions, "join", function (e) {
|
|
84
|
+
return e.join(" ");
|
|
85
|
+
}) || ""),
|
|
86
|
+
u = Boolean(e.folderselect);
|
|
93
87
|
o = Boolean(o);
|
|
94
88
|
var p = Dropbox.baseUrl + "/chooser?origin=" + n + "&app_key=" + t + "&link_type=" + r + "&trigger=" + a + "&multiselect=" + c + "&extensions=" + l + "&folderselect=" + u + "&iframe=" + o;
|
|
95
89
|
return void 0 !== e.fileselect && (p = i(p, "fileselect", Boolean(e.fileselect))), void 0 !== e.sizeLimit && (p = i(p, "size_limit", e.sizeLimit)), null != e.initialNavigation && (null != e.initialNavigation.mode && (p = i(p, "initial_navigation_mode", encodeURIComponent(e.initialNavigation.mode))), null != e.initialNavigation.role && (p = i(p, "initial_navigation_role", encodeURIComponent(e.initialNavigation.role))), e.initialNavigation.cursor && (p = i(p, "initial_navigation_cursor", encodeURIComponent(e.initialNavigation.cursor)))), null != e.initialViewType && (p = i(p, "initial_view_type", encodeURIComponent(e.initialViewType))), null != e.fields && (p = i(p, "fields", encodeURIComponent("function" == typeof e.fields.join ? e.fields.join(" ") : void 0))), !1 === e.showSignOut && (p = i(p, "show_sign_out", "false")), null !== e.initialNavigationPath && (p = i(p, "initial_navigation_path", encodeURIComponent(e.initialNavigationPath))), s(p);
|
|
96
90
|
}
|
|
97
|
-
|
|
98
91
|
function c(e) {
|
|
99
92
|
var n = {
|
|
100
93
|
options: r({}, e, {
|
|
@@ -108,22 +101,18 @@ Please reach out to the Editor team if you need more information
|
|
|
108
101
|
};
|
|
109
102
|
return o.currentChooserSession = n, n;
|
|
110
103
|
}
|
|
111
|
-
|
|
112
104
|
function l(e) {
|
|
113
105
|
var o = document.createElement("iframe");
|
|
114
106
|
return o.src = "about:blank", o._postAction = e, o.name = "dropbox-dropins", o.style.display = "block", o.style.backgroundColor = "white", o.style.border = "none", o;
|
|
115
107
|
}
|
|
116
|
-
|
|
117
108
|
function u(e, o) {
|
|
118
109
|
var n,
|
|
119
|
-
|
|
120
|
-
|
|
110
|
+
r = encodeURIComponent(Dropbox.appKey),
|
|
111
|
+
i = Dropbox.baseUrl + "/dropins/job_status?job=" + o + "&app_key=" + r;
|
|
121
112
|
i = s(i);
|
|
122
|
-
|
|
123
113
|
var a = function (o) {
|
|
124
114
|
"COMPLETE" === o.status ? ("function" == typeof e.progress && e.progress(1), "function" == typeof e.success && e.success()) : "PENDING" === o.status || "DOWNLOADING" === o.status ? (null != o.progress && "function" == typeof e.progress && e.progress(o.progress / 100), setTimeout(n, 1500)) : "FAILED" === o.status && "function" == typeof e.error && e.error(o.error);
|
|
125
115
|
};
|
|
126
|
-
|
|
127
116
|
if ("withCredentials" in new XMLHttpRequest()) n = function () {
|
|
128
117
|
var o = new XMLHttpRequest();
|
|
129
118
|
return o.onload = function () {
|
|
@@ -133,7 +122,6 @@ Please reach out to the Editor team if you need more information
|
|
|
133
122
|
}, o.open("GET", i, !0), o.send();
|
|
134
123
|
};else if (Dropbox.disableJSONP) {
|
|
135
124
|
if ("undefined" == typeof XDomainRequest || null === XDomainRequest || "https:" !== document.location.protocol) throw new Error("Unable to find suitable means of cross domain communication");
|
|
136
|
-
|
|
137
125
|
n = function () {
|
|
138
126
|
var o = new XDomainRequest();
|
|
139
127
|
return o.onload = function () {
|
|
@@ -144,12 +132,10 @@ Please reach out to the Editor team if you need more information
|
|
|
144
132
|
};
|
|
145
133
|
} else n = function () {
|
|
146
134
|
var o = "DropboxJsonpCallback" + t++,
|
|
147
|
-
|
|
148
|
-
|
|
135
|
+
n = !1;
|
|
149
136
|
window[o] = function (e) {
|
|
150
137
|
return n = !0, a(e);
|
|
151
138
|
};
|
|
152
|
-
|
|
153
139
|
var r = document.createElement("script");
|
|
154
140
|
return r.src = i + "&callback=" + o, r.onreadystatechange = function () {
|
|
155
141
|
if ("loaded" === r.readyState) return n || "function" == typeof e.error && e.error(), null != r.parentNode ? r.parentNode.removeChild(r) : void 0;
|
|
@@ -157,11 +143,9 @@ Please reach out to the Editor team if you need more information
|
|
|
157
143
|
};
|
|
158
144
|
return "function" == typeof e.progress && e.progress(0), n();
|
|
159
145
|
}
|
|
160
|
-
|
|
161
146
|
function p(e, n, t) {
|
|
162
147
|
var r,
|
|
163
|
-
|
|
164
|
-
|
|
148
|
+
i = JSON.parse(e.data);
|
|
165
149
|
switch (r = null != o.ieframe && t._popup ? o.ieframe.contentWindow : e.source, void 0 !== i.sequence_number && r.postMessage(JSON.stringify({
|
|
166
150
|
method: "ack",
|
|
167
151
|
sequence_number: i.sequence_number
|
|
@@ -171,11 +155,9 @@ Please reach out to the Editor team if you need more information
|
|
|
171
155
|
method: "origin"
|
|
172
156
|
}), Dropbox.baseUrl);
|
|
173
157
|
break;
|
|
174
|
-
|
|
175
158
|
case "ready":
|
|
176
159
|
if (null != t.files) {
|
|
177
160
|
var s = void 0;
|
|
178
|
-
|
|
179
161
|
if (t._fetch_url_on_save) {
|
|
180
162
|
for (var a = [], c = 0; c < t.files.length; c++) {
|
|
181
163
|
var l = t.files[c];
|
|
@@ -183,7 +165,6 @@ Please reach out to the Editor team if you need more information
|
|
|
183
165
|
filename: l.filename
|
|
184
166
|
});
|
|
185
167
|
}
|
|
186
|
-
|
|
187
168
|
s = JSON.stringify({
|
|
188
169
|
method: "files_with_callback",
|
|
189
170
|
params: a
|
|
@@ -192,7 +173,6 @@ Please reach out to the Editor team if you need more information
|
|
|
192
173
|
method: "files",
|
|
193
174
|
params: t.files
|
|
194
175
|
});
|
|
195
|
-
|
|
196
176
|
if (r.postMessage(s, Dropbox.baseUrl), null != t._ews_auth_token) {
|
|
197
177
|
var p = JSON.stringify({
|
|
198
178
|
method: "ews_auth_token",
|
|
@@ -203,45 +183,35 @@ Please reach out to the Editor team if you need more information
|
|
|
203
183
|
r.postMessage(p, Dropbox.baseUrl);
|
|
204
184
|
}
|
|
205
185
|
}
|
|
206
|
-
|
|
207
186
|
"function" == typeof t.ready && t.ready();
|
|
208
187
|
break;
|
|
209
|
-
|
|
210
188
|
case "files_selected":
|
|
211
189
|
case "files_saved":
|
|
212
190
|
"function" == typeof n && n(), "function" == typeof t.success && t.success(i.params, o.last_navigation);
|
|
213
191
|
break;
|
|
214
|
-
|
|
215
192
|
case "cursor_changed":
|
|
216
193
|
o.last_navigation = {
|
|
217
194
|
cursor: i.params
|
|
218
195
|
};
|
|
219
196
|
break;
|
|
220
|
-
|
|
221
197
|
case "progress":
|
|
222
198
|
"function" == typeof t.progress && t.progress(i.params);
|
|
223
199
|
break;
|
|
224
|
-
|
|
225
200
|
case "close_dialog":
|
|
226
201
|
"function" == typeof n && n(), "function" == typeof t.cancel && t.cancel(o.last_navigation);
|
|
227
202
|
break;
|
|
228
|
-
|
|
229
203
|
case "resize":
|
|
230
204
|
"function" == typeof t.resize && t.resize(i.params);
|
|
231
205
|
break;
|
|
232
|
-
|
|
233
206
|
case "error":
|
|
234
207
|
"function" == typeof t.error && t.error(i.params);
|
|
235
208
|
break;
|
|
236
|
-
|
|
237
209
|
case "error_and_close":
|
|
238
210
|
"function" == typeof n && n(), "function" == typeof t.error && t.error(i.params);
|
|
239
211
|
break;
|
|
240
|
-
|
|
241
212
|
case "job_id":
|
|
242
213
|
"function" == typeof n && n(), u(t, i.params);
|
|
243
214
|
break;
|
|
244
|
-
|
|
245
215
|
case "save_callback":
|
|
246
216
|
!function (e, o, n) {
|
|
247
217
|
if (e._fetch_url_on_save) {
|
|
@@ -260,16 +230,13 @@ Please reach out to the Editor team if you need more information
|
|
|
260
230
|
}
|
|
261
231
|
}(t, i.params);
|
|
262
232
|
break;
|
|
263
|
-
|
|
264
233
|
case "_debug_log":
|
|
265
234
|
"undefined" != typeof console && null !== console && console.log(i.params.msg);
|
|
266
235
|
}
|
|
267
236
|
}
|
|
268
|
-
|
|
269
237
|
function d(e, o, n) {
|
|
270
238
|
return void 0 !== e && null !== e && "function" == typeof e[o] ? n(e, o) : void 0;
|
|
271
239
|
}
|
|
272
|
-
|
|
273
240
|
Object.defineProperty(o, "__esModule", {
|
|
274
241
|
value: !0
|
|
275
242
|
}), null == window.Dropbox && (window.Dropbox = {}), o.popupDimensionsString = function (e, o) {
|
|
@@ -278,7 +245,7 @@ Please reach out to the Editor team if you need more information
|
|
|
278
245
|
/\bTrident\b/.test(navigator.userAgent) && null != document.body && null == o.ieframe && (o.ieframe = document.createElement("iframe"), o.ieframe.setAttribute("id", "dropbox_xcomm"), o.ieframe.setAttribute("src", Dropbox.baseUrl + "/static/api/1/xcomm.html"), o.ieframe.style.display = "none", document.body.appendChild(o.ieframe));
|
|
279
246
|
}, o.createChooserSession = c, o.createWidgetElement = l, o.handleJobId = u, o.handleMessageEvent = p, o.saverUrl = function (e) {
|
|
280
247
|
var o = encodeURIComponent(window.location.protocol + "//" + window.location.host),
|
|
281
|
-
|
|
248
|
+
n = encodeURIComponent(Dropbox.appKey);
|
|
282
249
|
return e = Boolean(e), s(Dropbox.baseUrl + "/saver?origin=" + o + "&app_key=" + n + "&iframe=" + e);
|
|
283
250
|
}, o.__guardMethod__ = d, o.__guard__ = function (e, o) {
|
|
284
251
|
return void 0 !== e && null !== e ? o(e) : void 0;
|
|
@@ -293,7 +260,7 @@ Please reach out to the Editor team if you need more information
|
|
|
293
260
|
e.removeEventListener ? e.removeEventListener(o, n, !1) : e.detachEvent("on" + o, n);
|
|
294
261
|
}, Dropbox.createChooserWidget = function (e) {
|
|
295
262
|
var o = c(e),
|
|
296
|
-
|
|
263
|
+
n = l(a(o.options, !0));
|
|
297
264
|
return n._handler = function (e) {
|
|
298
265
|
e.source === n.contentWindow && e.origin === Dropbox.baseUrl && p(e, null, o.options);
|
|
299
266
|
}, Dropbox.addListener(window, "message", n._handler), n;
|
|
@@ -309,37 +276,31 @@ Please reach out to the Editor team if you need more information
|
|
|
309
276
|
value: !0
|
|
310
277
|
});
|
|
311
278
|
var t = n(0),
|
|
312
|
-
|
|
279
|
+
r = ["text", "documents", "images", "video", "audio"];
|
|
313
280
|
o.genericDropins = {
|
|
314
281
|
init: function () {}
|
|
315
282
|
};
|
|
316
|
-
|
|
317
283
|
var i = function (e) {
|
|
318
284
|
return e;
|
|
319
285
|
};
|
|
320
|
-
|
|
321
286
|
function s(e, o) {
|
|
322
287
|
null != o ? o.innerHTML = "" : (o = document.createElement("a")).href = "#", o.className += " dropbox-dropin-btn", Dropbox.isBrowserSupported() ? o.className += " dropbox-dropin-default" : o.className += " dropbox-dropin-disabled";
|
|
323
288
|
var n = document.createElement("span");
|
|
324
289
|
return n.className = "dropin-btn-status", o.appendChild(n), e = document.createTextNode(e), o.appendChild(e), o;
|
|
325
290
|
}
|
|
326
|
-
|
|
327
291
|
function a(e) {
|
|
328
292
|
return e.replace(/\/+$/g, "").split("/").pop();
|
|
329
293
|
}
|
|
330
|
-
|
|
331
294
|
function c(e) {
|
|
332
295
|
var o = document.createElement("a");
|
|
333
296
|
return o.href = e, a(o.pathname);
|
|
334
297
|
}
|
|
335
|
-
|
|
336
298
|
o.createDropinButton = s, o.filenameFromPath = a, o.initModule = function () {
|
|
337
299
|
t.initModule(), null == Dropbox.appKey && (Dropbox.appKey = t.__guard__(document.getElementById("dropboxjs"), function (e) {
|
|
338
300
|
return e.getAttribute("data-app-key");
|
|
339
301
|
})), Dropbox.init = function (e) {
|
|
340
302
|
null != e.translation_function && (i = e.translation_function), null != e.appKey && (Dropbox.appKey = e.appKey);
|
|
341
303
|
};
|
|
342
|
-
|
|
343
304
|
var e = function (e) {
|
|
344
305
|
var o, n, t;
|
|
345
306
|
if ("string" == typeof e[0]) t = e.shift(), o = "string" == typeof e[0] ? e.shift() : c(t), (n = e.shift() || {}).files = [{
|
|
@@ -348,12 +309,10 @@ Please reach out to the Editor team if you need more information
|
|
|
348
309
|
}];else {
|
|
349
310
|
if (null == (n = e.shift())) throw new Error("Missing arguments. See documentation.");
|
|
350
311
|
if ((null == n.files || !n.files.length) && "function" != typeof n.files) throw new Error("Missing files. See documentation.");
|
|
351
|
-
|
|
352
312
|
if (null != n.fetch_urls_fn) {
|
|
353
313
|
if ("function" != typeof n.fetch_urls_fn) throw new Error("fetch_urls_fn must be a function if supplied. See documentation.");
|
|
354
314
|
n._fetch_url_on_save = !0;
|
|
355
315
|
}
|
|
356
|
-
|
|
357
316
|
for (var r = 0; r < n.files.length; r++) {
|
|
358
317
|
var i = n.files[r];
|
|
359
318
|
if ("function" == typeof i.url && (n._fetch_url_on_save = !0, n.fetch_urls_fn = i.url, i.url = null, r > 0)) throw new Error("Old style url as callback is only supported for single files.");
|
|
@@ -362,108 +321,93 @@ Please reach out to the Editor team if you need more information
|
|
|
362
321
|
}
|
|
363
322
|
return n;
|
|
364
323
|
};
|
|
365
|
-
|
|
366
324
|
Dropbox.save = function () {
|
|
367
325
|
for (var o = [], r = 0; r < arguments.length; r++) o[r] = arguments[r];
|
|
368
|
-
|
|
369
326
|
var s = e(o);
|
|
370
|
-
|
|
371
327
|
if (Dropbox.isBrowserSupported()) {
|
|
372
328
|
if (s._popup = !0, "object" != typeof s.files || !s.files.length) throw new Error("The object passed in must have a 'files' property that contains a list of objects. See documentation.");
|
|
373
329
|
if (s.iframe && !s.windowName) throw new Error("Dropbox.save does not yet support creating its own iframe. windowName must be provided when the iframe option is present.");
|
|
374
|
-
|
|
375
330
|
for (var a = 0, c = s.files; a < c.length; a++) {
|
|
376
331
|
var l = c[a];
|
|
377
|
-
|
|
378
332
|
if (s._fetch_url_on_save) {
|
|
379
333
|
if (s.fetch_urls_fn) {
|
|
380
334
|
if (null != l.url) throw new Error("You passed in a 'fetch_urls_fn' option to specify the file URLs. Don't include individual URLs in each file objects.");
|
|
381
335
|
} else if ("function" != typeof l.url) throw new Error("File urls should be all urls, or a single file with function. See documentation.");
|
|
382
336
|
} else if ("string" != typeof l.url) throw new Error("File urls to download incorrectly configured. Each file must have a url. See documentation.");
|
|
383
337
|
}
|
|
384
|
-
|
|
385
338
|
var u = t.popupDimensionsString(735, 670);
|
|
386
339
|
return n(t.saverUrl(s.iframe), u, s).window;
|
|
387
340
|
}
|
|
388
|
-
|
|
389
341
|
alert(i("Your browser does not support the Dropbox Saver"));
|
|
390
342
|
};
|
|
391
|
-
|
|
392
343
|
var n = function (e, o, n) {
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
344
|
+
var r = function () {
|
|
345
|
+
a.closed || (a.close(), a.postMessage(JSON.stringify({
|
|
346
|
+
method: "close"
|
|
347
|
+
}), Dropbox.baseUrl)), Dropbox.removeListener(window, "message", i), clearInterval(c);
|
|
348
|
+
},
|
|
398
349
|
i = function (e) {
|
|
399
|
-
|
|
400
|
-
|
|
350
|
+
e.source !== a && e.source !== (void 0 !== t.ieframe && null !== t.ieframe ? t.ieframe.contentWindow : void 0) || t.handleMessageEvent(e, r, n);
|
|
351
|
+
},
|
|
401
352
|
s = n.iframe ? "" : o + ",resizable,scrollbars",
|
|
402
353
|
a = window.open(e, n.windowName || "dropbox", s);
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
l = function (e) {
|
|
442
|
-
if (Dropbox.isBrowserSupported()) {
|
|
443
|
-
var o,
|
|
354
|
+
if (!a) throw new Error("Failed to open/load the window. Dropbox.choose and Dropbox.save should only be called from within a user-triggered event handler such as a tap or click event.");
|
|
355
|
+
a.focus();
|
|
356
|
+
var c = setInterval(function () {
|
|
357
|
+
(function () {
|
|
358
|
+
try {
|
|
359
|
+
return a.closed;
|
|
360
|
+
} catch (e) {}
|
|
361
|
+
})() && (r(), "function" == typeof n.cancel && n.cancel(t.last_navigation));
|
|
362
|
+
}, 100);
|
|
363
|
+
return Dropbox.addListener(window, "message", i), {
|
|
364
|
+
window: a,
|
|
365
|
+
onClose: r
|
|
366
|
+
};
|
|
367
|
+
},
|
|
368
|
+
a = function (e) {
|
|
369
|
+
null == e.success && t.__guardMethod__(console, "warn", function (e) {
|
|
370
|
+
return e.warn("You must provide a success callback to the Chooser to see the files that the user selects");
|
|
371
|
+
}), void 0 === e.fileselect || Boolean(e.fileselect) || Boolean(e.folderselect) || t.__guardMethod__(console, "error", function (e) {
|
|
372
|
+
return e.error("You must enable either fileselect or folderselect on the Chooser so the user can select something");
|
|
373
|
+
});
|
|
374
|
+
var o = function () {
|
|
375
|
+
return t.__guardMethod__(console, "warn", function (e) {
|
|
376
|
+
return e.warn("The provided list of extensions or file types is not valid. See Chooser documentation: https://www.dropbox.com/developers/dropins/chooser/js");
|
|
377
|
+
}), t.__guardMethod__(console, "warn", function (e) {
|
|
378
|
+
return e.warn("Available file types are: " + r.join(", "));
|
|
379
|
+
}), delete e.extensions;
|
|
380
|
+
};
|
|
381
|
+
if (null != e.extensions && null != Array.isArray) if (Array.isArray(e.extensions)) for (var n = 0, i = e.extensions; n < i.length; n++) {
|
|
382
|
+
var s = i[n];
|
|
383
|
+
s.match(/^\.[\.\w$#&+@!()\-'`_~]+$/) || -1 !== r.indexOf(s) || o();
|
|
384
|
+
} else o();
|
|
385
|
+
return void 0 !== e.sizeLimit && "number" != typeof e.sizeLimit && e.sizeLimit <= 0 && t.__guardMethod__(console, "error", function (e) {
|
|
386
|
+
return e.error("The sizeLimit option, if provided, must be a positive number");
|
|
387
|
+
}), e;
|
|
388
|
+
},
|
|
389
|
+
l = function (e) {
|
|
390
|
+
if (Dropbox.isBrowserSupported()) {
|
|
391
|
+
var o,
|
|
444
392
|
r,
|
|
445
393
|
s = t.createChooserSession(e);
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
}
|
|
464
|
-
} else alert(i("Your browser does not support the Dropbox Chooser"));
|
|
465
|
-
};
|
|
466
|
-
|
|
394
|
+
if (e.iframe && !e.windowName) {
|
|
395
|
+
var a = (o = t.chooserUrl(e, !0), (r = document.createElement("iframe")).src = o, r.style.display = "block", r.style.backgroundColor = "white", r.style.border = "none", r);
|
|
396
|
+
a.style.width = "735px", a.style.height = "552px", a.style.margin = "125px auto 0 auto", a.style.border = "1px solid #ACACAC", a.style.boxShadow = "rgba(0, 0, 0, .2) 0px 4px 16px";
|
|
397
|
+
var c = document.createElement("div");
|
|
398
|
+
c.style.position = "fixed", c.style.left = c.style.right = c.style.top = c.style.bottom = "0", c.style.zIndex = "1000", c.style.backgroundColor = "rgba(160, 160, 160, 0.2)", c.appendChild(a), document.body.appendChild(c);
|
|
399
|
+
var l = function (e) {
|
|
400
|
+
e.source === a.contentWindow && (s.onClose = function () {
|
|
401
|
+
document.body.removeChild(c), Dropbox.removeListener(window, "message", l);
|
|
402
|
+
}, t.handleMessageEvent(e, s.onClose, s.options));
|
|
403
|
+
};
|
|
404
|
+
Dropbox.addListener(window, "message", l);
|
|
405
|
+
} else {
|
|
406
|
+
var u = t.popupDimensionsString(735, 552);
|
|
407
|
+
s.onClose = n(t.chooserUrl(s.options, s.options.iframe), u, s.options).onClose;
|
|
408
|
+
}
|
|
409
|
+
} else alert(i("Your browser does not support the Dropbox Chooser"));
|
|
410
|
+
};
|
|
467
411
|
Dropbox.choose = function (e) {
|
|
468
412
|
null == e && (e = {}), e = a(e), l(e);
|
|
469
413
|
}, Dropbox.cancelChooser = function () {
|
|
@@ -471,10 +415,8 @@ Please reach out to the Editor team if you need more information
|
|
|
471
415
|
}, Dropbox.isBrowserSupported = function () {
|
|
472
416
|
var e = function () {
|
|
473
417
|
for (var e = 0, o = [/IEMobile\/(7|8|9|10)\./, /BB10;/, /CriOS/]; e < o.length; e++) if (o[e].test(navigator.userAgent)) return !1;
|
|
474
|
-
|
|
475
418
|
return "undefined" != typeof JSON && null !== JSON && null != window.postMessage && null != window.addEventListener && !/MSIE [7-9]/.test(navigator.userAgent);
|
|
476
419
|
}();
|
|
477
|
-
|
|
478
420
|
return Dropbox.isBrowserSupported = function () {
|
|
479
421
|
return e;
|
|
480
422
|
}, e;
|
|
@@ -499,9 +441,8 @@ Please reach out to the Editor team if you need more information
|
|
|
499
441
|
}), o;
|
|
500
442
|
}, Dropbox.createSaveButton = function () {
|
|
501
443
|
for (var o = [], n = 0; n < arguments.length; n++) o[n] = arguments[n];
|
|
502
|
-
|
|
503
444
|
var t = e(o),
|
|
504
|
-
|
|
445
|
+
r = o.shift();
|
|
505
446
|
return r = s(i("Save to Dropbox"), r), Dropbox.addListener(r, "click", function (e) {
|
|
506
447
|
if (e.preventDefault(), r.className.indexOf("dropbox-dropin-error") >= 0 || r.className.indexOf("dropbox-dropin-default") >= 0 || r.className.indexOf("dropbox-dropin-disabled") >= 0) {
|
|
507
448
|
var o = ("function" == typeof t.files ? t.files() : void 0) || t.files;
|
|
@@ -524,20 +465,16 @@ Please reach out to the Editor team if you need more information
|
|
|
524
465
|
}
|
|
525
466
|
}), r;
|
|
526
467
|
};
|
|
527
|
-
|
|
528
468
|
var u = function (e, o) {
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
469
|
+
return " background: " + e + ";\n background: -moz-linear-gradient(top, " + e + " 0%, " + o + " 100%);\n background: -webkit-linear-gradient(top, " + e + " 0%, " + o + " 100%);\n background: linear-gradient(to bottom, " + e + " 0%, " + o + " 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='" + e + "', endColorstr='" + o + "',GradientType=0); ";
|
|
470
|
+
},
|
|
471
|
+
p = document.createElement("style");
|
|
533
472
|
p.type = "text/css";
|
|
534
473
|
var d = ' @-webkit-keyframes rotate {\n from { -webkit-transform: rotate(0deg); }\n to { -webkit-transform: rotate(360deg); }\n }\n\n @keyframes rotate {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n\n .dropbox-dropin-btn, .dropbox-dropin-btn:link, .dropbox-dropin-btn:hover {\n display: inline-block;\n height: 14px;\n font-family: "Lucida Grande", "Segoe UI", "Tahoma", "Helvetica Neue", "Helvetica", sans-serif;\n font-size: 11px;\n font-weight: 600;\n color: #636363;\n text-decoration: none;\n padding: 1px 7px 5px 3px;\n border: 1px solid #ebebeb;\n border-radius: 2px;\n border-bottom-color: #d4d4d4;\n ' + u("#fcfcfc", "#f5f5f5") + "\n }\n\n .dropbox-dropin-default:hover, .dropbox-dropin-error:hover {\n border-color: #dedede;\n border-bottom-color: #cacaca;\n " + u("#fdfdfd", "#f5f5f5") + "\n }\n\n .dropbox-dropin-default:active, .dropbox-dropin-error:active {\n border-color: #d1d1d1;\n box-shadow: inset 0 1px 1px rgba(0,0,0,0.1);\n }\n\n .dropbox-dropin-btn .dropin-btn-status {\n display: inline-block;\n width: 15px;\n height: 14px;\n vertical-align: bottom;\n margin: 0 5px 0 2px;\n background: transparent url('" + Dropbox.baseUrl + "/static/images/widgets/dbx-saver-status.png') no-repeat;\n position: relative;\n top: 2px;\n }\n\n .dropbox-dropin-default .dropin-btn-status {\n background-position: 0px 0px;\n }\n\n .dropbox-dropin-progress .dropin-btn-status {\n width: 18px;\n margin: 0 4px 0 0;\n background: url('" + Dropbox.baseUrl + "/static/images/widgets/dbx-progress.png') no-repeat center center;\n -webkit-animation-name: rotate;\n -webkit-animation-duration: 1.7s;\n -webkit-animation-iteration-count: infinite;\n -webkit-animation-timing-function: linear;\n animation-name: rotate;\n animation-duration: 1.7s;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n }\n\n .dropbox-dropin-success .dropin-btn-status {\n background-position: -15px 0px;\n }\n\n .dropbox-dropin-disabled {\n background: #e0e0e0;\n border: 1px #dadada solid;\n border-bottom: 1px solid #ccc;\n box-shadow: none;\n }\n\n .dropbox-dropin-disabled .dropin-btn-status {\n background-position: -30px 0px;\n }\n\n .dropbox-dropin-error .dropin-btn-status {\n background-position: -45px 0px;\n }\n\n @media only screen and (-webkit-min-device-pixel-ratio: 1.4) {\n .dropbox-dropin-btn .dropin-btn-status {\n background-image: url('" + Dropbox.baseUrl + "/static/images/widgets/dbx-saver-status-2x.png');\n background-size: 60px 14px;\n -webkit-background-size: 60px 14px;\n }\n\n .dropbox-dropin-progress .dropin-btn-status {\n background: url('" + Dropbox.baseUrl + "/static/images/widgets/dbx-progress-2x.png') no-repeat center center;\n background-size: 20px 20px;\n -webkit-background-size: 20px 20px;\n }\n }\n\n .dropbox-saver:hover, .dropbox-chooser:hover {\n text-decoration: none;\n cursor: pointer;\n }\n\n .dropbox-chooser, .dropbox-dropin-btn {\n line-height: 11px !important;\n text-decoration: none !important;\n box-sizing: content-box !important;\n -webkit-box-sizing: content-box !important;\n -moz-box-sizing: content-box !important;\n }\n ";
|
|
535
474
|
p.styleSheet ? p.styleSheet.cssText = d : p.textContent = d, document.getElementsByTagName("head")[0].appendChild(p), setTimeout(t.createIEFrame, 0);
|
|
536
|
-
|
|
537
475
|
var f = function () {
|
|
538
476
|
document.removeEventListener ? document.removeEventListener("DOMContentLoaded", f, !1) : document.detachEvent && document.detachEvent("onreadystatechange", f), t.createIEFrame(), o.genericDropins.init();
|
|
539
477
|
};
|
|
540
|
-
|
|
541
478
|
"interactive" === document.readyState || "complete" === document.readyState ? setTimeout(f, 0) : document.addEventListener ? document.addEventListener("DOMContentLoaded", f, !1) : document.attachEvent("onreadystatechange", f);
|
|
542
479
|
};
|
|
543
480
|
}, function (e, o, n) {
|
|
@@ -546,204 +483,177 @@ Please reach out to the Editor team if you need more information
|
|
|
546
483
|
Object.defineProperty(o, "__esModule", {
|
|
547
484
|
value: !0
|
|
548
485
|
});
|
|
549
|
-
|
|
550
486
|
var t = window.location.protocol + "//" + window.location.host,
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
return e.validateOnError = function (e) {
|
|
559
|
-
if (e && "function" != typeof e) throw new Error("onError must be a function");
|
|
560
|
-
}, e.prototype.setOnError = function (o) {
|
|
561
|
-
e.validateOnError(o), this.options.onError = o;
|
|
562
|
-
}, e.prototype.hasOnCloseDialogMessage = function () {
|
|
563
|
-
return void 0 !== this.onCloseDialogMessage;
|
|
564
|
-
}, e.prototype.setOnCloseDialogMessage = function (e) {
|
|
565
|
-
if ("function" != typeof e) throw new Error("onCloseDialogMessage must be a function");
|
|
566
|
-
this.onCloseDialogMessage = e;
|
|
567
|
-
}, e.prototype.sendState = function () {
|
|
568
|
-
this.sendMessage({
|
|
569
|
-
method: "state",
|
|
570
|
-
params: this.state
|
|
571
|
-
});
|
|
572
|
-
}, e.prototype.url = function () {
|
|
573
|
-
var e = [{
|
|
574
|
-
key: "app_key",
|
|
575
|
-
value: this.options.appKey
|
|
576
|
-
}, {
|
|
577
|
-
key: "origin",
|
|
578
|
-
value: this.origin
|
|
579
|
-
}].concat(this.urlParams()).map(function (e) {
|
|
580
|
-
return encodeURIComponent(e.key) + "=" + encodeURIComponent(e.value);
|
|
581
|
-
}).join("&");
|
|
582
|
-
return {
|
|
583
|
-
pathname: this.urlPathname(),
|
|
584
|
-
search: "?" + e
|
|
585
|
-
};
|
|
586
|
-
}, e.prototype.windowDimensions = function () {
|
|
587
|
-
return {
|
|
588
|
-
width: 735,
|
|
589
|
-
height: 552
|
|
590
|
-
};
|
|
591
|
-
}, e.prototype.handleMessage = function (e) {
|
|
592
|
-
switch (void 0 !== e.sequenceNumber && this.sendMessage({
|
|
593
|
-
method: "ack",
|
|
594
|
-
sequenceNumber: e.sequenceNumber
|
|
595
|
-
}), e.method) {
|
|
596
|
-
case "origin_request":
|
|
597
|
-
this.sendMessage({
|
|
598
|
-
method: "origin"
|
|
599
|
-
});
|
|
600
|
-
break;
|
|
601
|
-
|
|
602
|
-
case "ready":
|
|
603
|
-
this.sendState();
|
|
604
|
-
break;
|
|
605
|
-
|
|
606
|
-
case "error":
|
|
607
|
-
this.options.onError && this.options.onError(e.params);
|
|
608
|
-
break;
|
|
609
|
-
|
|
610
|
-
case "close_dialog":
|
|
611
|
-
this.onCloseDialogMessage && this.onCloseDialogMessage(), this.onCloseDialogMessage = void 0;
|
|
487
|
+
r = function () {
|
|
488
|
+
function e(o) {
|
|
489
|
+
if (this.origin = t, this.sendMessage = function (e) {}, this.state = {}, this.options = o, !this.options) throw new Error("options must be provided");
|
|
490
|
+
if (!this.options.appKey) throw new Error("appKey must be provided");
|
|
491
|
+
e.validateOnError(this.options.onError);
|
|
612
492
|
}
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
493
|
+
return e.validateOnError = function (e) {
|
|
494
|
+
if (e && "function" != typeof e) throw new Error("onError must be a function");
|
|
495
|
+
}, e.prototype.setOnError = function (o) {
|
|
496
|
+
e.validateOnError(o), this.options.onError = o;
|
|
497
|
+
}, e.prototype.hasOnCloseDialogMessage = function () {
|
|
498
|
+
return void 0 !== this.onCloseDialogMessage;
|
|
499
|
+
}, e.prototype.setOnCloseDialogMessage = function (e) {
|
|
500
|
+
if ("function" != typeof e) throw new Error("onCloseDialogMessage must be a function");
|
|
501
|
+
this.onCloseDialogMessage = e;
|
|
502
|
+
}, e.prototype.sendState = function () {
|
|
503
|
+
this.sendMessage({
|
|
504
|
+
method: "state",
|
|
505
|
+
params: this.state
|
|
506
|
+
});
|
|
507
|
+
}, e.prototype.url = function () {
|
|
508
|
+
var e = [{
|
|
509
|
+
key: "app_key",
|
|
510
|
+
value: this.options.appKey
|
|
511
|
+
}, {
|
|
512
|
+
key: "origin",
|
|
513
|
+
value: this.origin
|
|
514
|
+
}].concat(this.urlParams()).map(function (e) {
|
|
515
|
+
return encodeURIComponent(e.key) + "=" + encodeURIComponent(e.value);
|
|
516
|
+
}).join("&");
|
|
517
|
+
return {
|
|
518
|
+
pathname: this.urlPathname(),
|
|
519
|
+
search: "?" + e
|
|
520
|
+
};
|
|
521
|
+
}, e.prototype.windowDimensions = function () {
|
|
522
|
+
return {
|
|
523
|
+
width: 735,
|
|
524
|
+
height: 552
|
|
525
|
+
};
|
|
526
|
+
}, e.prototype.handleMessage = function (e) {
|
|
527
|
+
switch (void 0 !== e.sequenceNumber && this.sendMessage({
|
|
528
|
+
method: "ack",
|
|
529
|
+
sequenceNumber: e.sequenceNumber
|
|
530
|
+
}), e.method) {
|
|
531
|
+
case "origin_request":
|
|
532
|
+
this.sendMessage({
|
|
533
|
+
method: "origin"
|
|
534
|
+
});
|
|
535
|
+
break;
|
|
536
|
+
case "ready":
|
|
537
|
+
this.sendState();
|
|
538
|
+
break;
|
|
539
|
+
case "error":
|
|
540
|
+
this.options.onError && this.options.onError(e.params);
|
|
541
|
+
break;
|
|
542
|
+
case "close_dialog":
|
|
543
|
+
this.onCloseDialogMessage && this.onCloseDialogMessage(), this.onCloseDialogMessage = void 0;
|
|
544
|
+
}
|
|
545
|
+
}, e;
|
|
546
|
+
}();
|
|
616
547
|
o.Dropin = r;
|
|
617
548
|
}, function (e, o, n) {
|
|
618
549
|
"use strict";
|
|
619
550
|
|
|
620
551
|
var t,
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
});
|
|
552
|
+
r = this && this.__extends || (t = function (e, o) {
|
|
553
|
+
return (t = Object.setPrototypeOf || {
|
|
554
|
+
__proto__: []
|
|
555
|
+
} instanceof Array && function (e, o) {
|
|
556
|
+
e.__proto__ = o;
|
|
557
|
+
} || function (e, o) {
|
|
558
|
+
for (var n in o) o.hasOwnProperty(n) && (e[n] = o[n]);
|
|
559
|
+
})(e, o);
|
|
560
|
+
}, function (e, o) {
|
|
561
|
+
function n() {
|
|
562
|
+
this.constructor = e;
|
|
563
|
+
}
|
|
564
|
+
t(e, o), e.prototype = null === o ? Object.create(o) : (n.prototype = o.prototype, new n());
|
|
565
|
+
});
|
|
636
566
|
Object.defineProperty(o, "__esModule", {
|
|
637
567
|
value: !0
|
|
638
568
|
});
|
|
639
|
-
|
|
640
569
|
var i = "https://www.dropbox.com/developers/dropins/chooser/js",
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
if ("string" != typeof r || !r.match(/^\.[\.\w$#&+@!()\-'`_~]+$/) && -1 === s.indexOf(r)) throw new Error("The provided list of extensions or file types is not valid. See Chooser documentation: " + i + ". Available file types are: " + s.join(", "));
|
|
570
|
+
s = ["text", "documents", "images", "video", "audio"],
|
|
571
|
+
a = function (e) {
|
|
572
|
+
function o(o) {
|
|
573
|
+
var n = e.call(this, o) || this;
|
|
574
|
+
return n.validateOptions = function () {
|
|
575
|
+
var e = function (e, o) {
|
|
576
|
+
if (void 0 !== n.options[e] && typeof n.options[e] !== o) throw new Error("The " + e + " option, if provided, must have type " + o);
|
|
577
|
+
};
|
|
578
|
+
if (e("linkType", "string"), e("_trigger", "string"), void 0 !== n.options.extensions) {
|
|
579
|
+
if (!(n.options.extensions instanceof Array)) throw new Error("The extensions option, if provided, must be an array");
|
|
580
|
+
for (var o = 0, t = n.options.extensions; o < t.length; o++) {
|
|
581
|
+
var r = t[o];
|
|
582
|
+
if ("string" != typeof r || !r.match(/^\.[\.\w$#&+@!()\-'`_~]+$/) && -1 === s.indexOf(r)) throw new Error("The provided list of extensions or file types is not valid. See Chooser documentation: " + i + ". Available file types are: " + s.join(", "));
|
|
583
|
+
}
|
|
656
584
|
}
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
if (
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
if (e("showSignOut", "boolean"), e("version", "string"), e("cl", "string"), "function" != typeof n.options.onSuccess) throw new Error("You must provide a success callback to the Chooser to see the files that the user selects");
|
|
676
|
-
e("onReady", "function"), e("onCancel", "function"), e("onError", "function"), e("onResize", "function");
|
|
677
|
-
}, n.validateOptions(), n;
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
return r(o, e), o.prototype.urlParams = function () {
|
|
681
|
-
var e = [],
|
|
585
|
+
if (e("multiselect", "boolean"), e("iframe", "boolean"), e("folderselect", "boolean"), e("fileselect", "boolean"), void 0 !== n.options.fileselect && !n.options.fileselect && !n.options.folderselect) throw new Error("You must enable either fileselect or folderselect on the Chooser so the user can select something");
|
|
586
|
+
if (e("sizeLimit", "number"), void 0 !== n.options.sizeLimit && n.options.sizeLimit <= 0) throw new Error("The sizeLimit option, if provided, must be a positive number");
|
|
587
|
+
var a = n.options.initialNavigation;
|
|
588
|
+
if (void 0 !== a) {
|
|
589
|
+
if (void 0 !== a.mode && "string" != typeof a.mode) throw new Error("The initialNavigation.mode option, if provided, must be a string");
|
|
590
|
+
if (void 0 !== a.role && "string" != typeof a.role) throw new Error("The initialNavigation.role option, if provided, must be a string");
|
|
591
|
+
if (void 0 !== a.cursor && "string" != typeof a.cursor) throw new Error("The initialNavigation.cursor option, if provided, must be a string");
|
|
592
|
+
}
|
|
593
|
+
if (e("initialViewType", "string"), void 0 !== n.options.fields) {
|
|
594
|
+
if (!(n.options.fields instanceof Array)) throw new Error("The fields option, if provided, must be an array");
|
|
595
|
+
for (var c = 0, l = n.options.fields; c < l.length; c++) if ("string" != typeof l[c]) throw new Error("The fields option, if provided, must be an array of strings");
|
|
596
|
+
}
|
|
597
|
+
if (e("showSignOut", "boolean"), e("version", "string"), e("cl", "string"), "function" != typeof n.options.onSuccess) throw new Error("You must provide a success callback to the Chooser to see the files that the user selects");
|
|
598
|
+
e("onReady", "function"), e("onCancel", "function"), e("onError", "function"), e("onResize", "function");
|
|
599
|
+
}, n.validateOptions(), n;
|
|
600
|
+
}
|
|
601
|
+
return r(o, e), o.prototype.urlParams = function () {
|
|
602
|
+
var e = [],
|
|
682
603
|
o = function (o, n) {
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
};
|
|
688
|
-
|
|
689
|
-
return o("link_type", this.options.linkType), e.push({
|
|
690
|
-
key: "trigger",
|
|
691
|
-
value: this.options._trigger || "js"
|
|
692
|
-
}), void 0 !== this.options.extensions && e.push({
|
|
693
|
-
key: "extensions",
|
|
694
|
-
value: this.options.extensions.join(" ")
|
|
695
|
-
}), o("multiselect", this.options.multiselect), o("iframe", this.options.iframe), o("folderselect", this.options.folderselect), o("fileselect", this.options.fileselect), o("size_limit", this.options.sizeLimit), void 0 !== this.options.initialNavigation && (o("initial_navigation_mode", this.options.initialNavigation.mode), o("initial_navigation_role", this.options.initialNavigation.role), o("initial_navigation_cursor", this.options.initialNavigation.cursor)), o("initial_view_type", this.options.initialViewType), void 0 !== this.options.fields && e.push({
|
|
696
|
-
key: "fields",
|
|
697
|
-
value: this.options.fields.join(" ")
|
|
698
|
-
}), o("show_sign_out", this.options.showSignOut), o("version", this.options.version), o("cl", this.options.cl), e;
|
|
699
|
-
}, o.prototype.urlPathname = function () {
|
|
700
|
-
return "/chooser";
|
|
701
|
-
}, o.prototype.close = function () {
|
|
702
|
-
"function" == typeof this.onCloseDialogMessage && this.onCloseDialogMessage();
|
|
703
|
-
}, o.prototype.handleMessage = function (o) {
|
|
704
|
-
switch (e.prototype.handleMessage.call(this, o), o.method) {
|
|
705
|
-
case "ready":
|
|
706
|
-
void 0 !== this.options.onReady && this.options.onReady();
|
|
707
|
-
break;
|
|
708
|
-
|
|
709
|
-
case "files_selected":
|
|
710
|
-
this.close(), this.options.onSuccess(o.params, this.lastNavigation);
|
|
711
|
-
break;
|
|
712
|
-
|
|
713
|
-
case "cursor_changed":
|
|
714
|
-
this.lastNavigation = {
|
|
715
|
-
cursor: o.params
|
|
604
|
+
void 0 !== n && e.push({
|
|
605
|
+
key: o,
|
|
606
|
+
value: "" + n
|
|
607
|
+
});
|
|
716
608
|
};
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
609
|
+
return o("link_type", this.options.linkType), e.push({
|
|
610
|
+
key: "trigger",
|
|
611
|
+
value: this.options._trigger || "js"
|
|
612
|
+
}), void 0 !== this.options.extensions && e.push({
|
|
613
|
+
key: "extensions",
|
|
614
|
+
value: this.options.extensions.join(" ")
|
|
615
|
+
}), o("multiselect", this.options.multiselect), o("iframe", this.options.iframe), o("folderselect", this.options.folderselect), o("fileselect", this.options.fileselect), o("size_limit", this.options.sizeLimit), void 0 !== this.options.initialNavigation && (o("initial_navigation_mode", this.options.initialNavigation.mode), o("initial_navigation_role", this.options.initialNavigation.role), o("initial_navigation_cursor", this.options.initialNavigation.cursor)), o("initial_view_type", this.options.initialViewType), void 0 !== this.options.fields && e.push({
|
|
616
|
+
key: "fields",
|
|
617
|
+
value: this.options.fields.join(" ")
|
|
618
|
+
}), o("show_sign_out", this.options.showSignOut), o("version", this.options.version), o("cl", this.options.cl), e;
|
|
619
|
+
}, o.prototype.urlPathname = function () {
|
|
620
|
+
return "/chooser";
|
|
621
|
+
}, o.prototype.close = function () {
|
|
622
|
+
"function" == typeof this.onCloseDialogMessage && this.onCloseDialogMessage();
|
|
623
|
+
}, o.prototype.handleMessage = function (o) {
|
|
624
|
+
switch (e.prototype.handleMessage.call(this, o), o.method) {
|
|
625
|
+
case "ready":
|
|
626
|
+
void 0 !== this.options.onReady && this.options.onReady();
|
|
627
|
+
break;
|
|
628
|
+
case "files_selected":
|
|
629
|
+
this.close(), this.options.onSuccess(o.params, this.lastNavigation);
|
|
630
|
+
break;
|
|
631
|
+
case "cursor_changed":
|
|
632
|
+
this.lastNavigation = {
|
|
633
|
+
cursor: o.params
|
|
634
|
+
};
|
|
635
|
+
break;
|
|
636
|
+
case "close_dialog":
|
|
637
|
+
void 0 !== this.options.onCancel && this.options.onCancel(this.lastNavigation);
|
|
638
|
+
break;
|
|
639
|
+
case "resize":
|
|
640
|
+
void 0 !== this.options.onResize && this.options.onResize(o.params);
|
|
641
|
+
break;
|
|
642
|
+
case "error":
|
|
643
|
+
this.close();
|
|
644
|
+
break;
|
|
645
|
+
case "_debug_log":
|
|
646
|
+
void 0 !== console && null !== console && console.log(o.params.msg);
|
|
647
|
+
}
|
|
648
|
+
}, o;
|
|
649
|
+
}(n(2).Dropin);
|
|
737
650
|
o.BaseChooser = a;
|
|
738
|
-
|
|
739
651
|
var c = function (e) {
|
|
740
652
|
function o(o) {
|
|
741
653
|
return e.call(this, o) || this;
|
|
742
654
|
}
|
|
743
|
-
|
|
744
655
|
return r(o, e), o;
|
|
745
656
|
}(a);
|
|
746
|
-
|
|
747
657
|
o.Chooser = c;
|
|
748
658
|
},,, function (e, o, n) {
|
|
749
659
|
"use strict";
|
|
@@ -758,12 +668,11 @@ Please reach out to the Editor team if you need more information
|
|
|
758
668
|
value: !0
|
|
759
669
|
});
|
|
760
670
|
var t = n(8),
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
671
|
+
r = n(1),
|
|
672
|
+
i = n(3),
|
|
673
|
+
s = n(10),
|
|
674
|
+
a = n(11),
|
|
675
|
+
c = n(12);
|
|
767
676
|
o.initModule = function () {
|
|
768
677
|
r.initModule(), Dropbox.VERSION = "2";
|
|
769
678
|
var e = new t.BrowserEnvironment();
|
|
@@ -792,117 +701,104 @@ Please reach out to the Editor team if you need more information
|
|
|
792
701
|
value: !0
|
|
793
702
|
});
|
|
794
703
|
var t = n(9);
|
|
795
|
-
|
|
796
704
|
function r(e) {
|
|
797
705
|
return function () {
|
|
798
706
|
for (var o = 0, n = e; o < n.length; o++) (0, n[o])();
|
|
799
707
|
};
|
|
800
708
|
}
|
|
801
|
-
|
|
802
709
|
o.TARGET_ORIGIN = "https://www.dropbox.com";
|
|
803
|
-
|
|
804
710
|
var i = function () {},
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
var a = n.url(),
|
|
711
|
+
s = function () {
|
|
712
|
+
function e() {
|
|
713
|
+
var e = this;
|
|
714
|
+
this.activeDropins = [], this.deleteActiveDropin = function (o) {
|
|
715
|
+
return function () {
|
|
716
|
+
var n = e.activeDropins.indexOf(o);
|
|
717
|
+
-1 !== n && e.activeDropins.splice(n, 1);
|
|
718
|
+
};
|
|
719
|
+
}, this.openWindow = function (n) {
|
|
720
|
+
e.throwIfAlreadyActive(n);
|
|
721
|
+
var s = r([]);
|
|
722
|
+
try {
|
|
723
|
+
var a = n.url(),
|
|
819
724
|
c = "" + o.TARGET_ORIGIN + a.pathname + a.search,
|
|
820
725
|
l = t.PopupEnvironment.open(c, n.windowDimensions(), function () {
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
726
|
+
s();
|
|
727
|
+
});
|
|
728
|
+
s = r([l.stopInterval, s]);
|
|
729
|
+
var u = e.attach(n, l.messagingWindow);
|
|
730
|
+
s = r([function () {
|
|
731
|
+
n.sendMessage({
|
|
732
|
+
method: "close"
|
|
733
|
+
});
|
|
734
|
+
}, s = r([u, s])]);
|
|
735
|
+
var p = {
|
|
736
|
+
dropin: n,
|
|
737
|
+
cleanup: i
|
|
738
|
+
};
|
|
739
|
+
e.activeDropins.push(p), s = r([e.deleteActiveDropin(p), s]), n.hasOnCloseDialogMessage() || n.setOnCloseDialogMessage(s), p.cleanup = s;
|
|
740
|
+
} catch (e) {
|
|
741
|
+
throw s(), e;
|
|
742
|
+
}
|
|
743
|
+
};
|
|
744
|
+
}
|
|
745
|
+
return e.prototype.mount = function (e, n) {
|
|
746
|
+
if (!e) throw new Error("Dropbox component must be provided");
|
|
747
|
+
if (!n) throw new Error("Container element must be provided");
|
|
748
|
+
this.throwIfAlreadyActive(e);
|
|
749
|
+
var t = r([]);
|
|
750
|
+
try {
|
|
751
|
+
var s = this.createIframe();
|
|
752
|
+
t = r([this.attach(e, function () {
|
|
753
|
+
if (!s.contentWindow) throw new Error("iframe does not contain a contentWindow");
|
|
754
|
+
return s.contentWindow;
|
|
755
|
+
}), t]);
|
|
756
|
+
var a = e.url();
|
|
757
|
+
s.src = "" + o.TARGET_ORIGIN + a.pathname + a.search + "&iframe=true", n.appendChild(s), t = r([function () {
|
|
758
|
+
n.removeChild(s);
|
|
759
|
+
}, t]);
|
|
760
|
+
var c = {
|
|
761
|
+
dropin: e,
|
|
832
762
|
cleanup: i
|
|
833
763
|
};
|
|
834
|
-
|
|
764
|
+
this.activeDropins.push(c), t = r([this.deleteActiveDropin(c), t]), e.hasOnCloseDialogMessage() || e.setOnCloseDialogMessage(t), c.cleanup = t;
|
|
835
765
|
} catch (e) {
|
|
836
|
-
throw
|
|
837
|
-
}
|
|
838
|
-
};
|
|
839
|
-
}
|
|
840
|
-
|
|
841
|
-
return e.prototype.mount = function (e, n) {
|
|
842
|
-
if (!e) throw new Error("Dropbox component must be provided");
|
|
843
|
-
if (!n) throw new Error("Container element must be provided");
|
|
844
|
-
this.throwIfAlreadyActive(e);
|
|
845
|
-
var t = r([]);
|
|
846
|
-
|
|
847
|
-
try {
|
|
848
|
-
var s = this.createIframe();
|
|
849
|
-
t = r([this.attach(e, function () {
|
|
850
|
-
if (!s.contentWindow) throw new Error("iframe does not contain a contentWindow");
|
|
851
|
-
return s.contentWindow;
|
|
852
|
-
}), t]);
|
|
853
|
-
var a = e.url();
|
|
854
|
-
s.src = "" + o.TARGET_ORIGIN + a.pathname + a.search + "&iframe=true", n.appendChild(s), t = r([function () {
|
|
855
|
-
n.removeChild(s);
|
|
856
|
-
}, t]);
|
|
857
|
-
var c = {
|
|
858
|
-
dropin: e,
|
|
859
|
-
cleanup: i
|
|
860
|
-
};
|
|
861
|
-
this.activeDropins.push(c), t = r([this.deleteActiveDropin(c), t]), e.hasOnCloseDialogMessage() || e.setOnCloseDialogMessage(t), c.cleanup = t;
|
|
862
|
-
} catch (e) {
|
|
863
|
-
throw t(), e;
|
|
864
|
-
}
|
|
865
|
-
}, e.prototype.remove = function (e) {
|
|
866
|
-
if (!e) throw new Error("Dropbox component must be provided");
|
|
867
|
-
|
|
868
|
-
for (var o = 0, n = this.activeDropins; o < n.length; o++) {
|
|
869
|
-
var t = n[o];
|
|
870
|
-
|
|
871
|
-
if (t.dropin === e) {
|
|
872
|
-
t.cleanup();
|
|
873
|
-
break;
|
|
766
|
+
throw t(), e;
|
|
874
767
|
}
|
|
875
|
-
}
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
var t = function (t) {
|
|
884
|
-
if (t.source === n() && t.origin === o.TARGET_ORIGIN) {
|
|
885
|
-
var r, i;
|
|
886
|
-
|
|
887
|
-
try {
|
|
888
|
-
r = JSON.parse(t.data);
|
|
889
|
-
} catch (e) {
|
|
890
|
-
return;
|
|
768
|
+
}, e.prototype.remove = function (e) {
|
|
769
|
+
if (!e) throw new Error("Dropbox component must be provided");
|
|
770
|
+
for (var o = 0, n = this.activeDropins; o < n.length; o++) {
|
|
771
|
+
var t = n[o];
|
|
772
|
+
if (t.dropin === e) {
|
|
773
|
+
t.cleanup();
|
|
774
|
+
break;
|
|
891
775
|
}
|
|
892
|
-
|
|
893
|
-
"object" == typeof (i = r) && "string" == typeof i.method && e.handleMessage(r);
|
|
894
776
|
}
|
|
895
|
-
}
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
e.sendMessage =
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
777
|
+
}, e.prototype.throwIfAlreadyActive = function (e) {
|
|
778
|
+
for (var o = 0, n = this.activeDropins; o < n.length; o++) if (n[o].dropin === e) throw new Error("Component is already in use");
|
|
779
|
+
}, e.prototype.attach = function (e, n) {
|
|
780
|
+
e.sendMessage = function (e) {
|
|
781
|
+
n().postMessage(JSON.stringify(e), o.TARGET_ORIGIN);
|
|
782
|
+
};
|
|
783
|
+
var t = function (t) {
|
|
784
|
+
if (t.source === n() && t.origin === o.TARGET_ORIGIN) {
|
|
785
|
+
var r, i;
|
|
786
|
+
try {
|
|
787
|
+
r = JSON.parse(t.data);
|
|
788
|
+
} catch (e) {
|
|
789
|
+
return;
|
|
790
|
+
}
|
|
791
|
+
"object" == typeof (i = r) && "string" == typeof i.method && e.handleMessage(r);
|
|
792
|
+
}
|
|
793
|
+
};
|
|
794
|
+
return window.addEventListener("message", t), function () {
|
|
795
|
+
e.sendMessage = i, window.removeEventListener("message", t);
|
|
796
|
+
};
|
|
797
|
+
}, e.prototype.createIframe = function () {
|
|
798
|
+
var e = window.document.createElement("iframe");
|
|
799
|
+
return e.style.height = "100%", e.style.width = "100%", e.style.border = "none", e;
|
|
800
|
+
}, e;
|
|
801
|
+
}();
|
|
906
802
|
o.BrowserEnvironment = s;
|
|
907
803
|
}, function (e, o, n) {
|
|
908
804
|
"use strict";
|
|
@@ -910,64 +806,57 @@ Please reach out to the Editor team if you need more information
|
|
|
910
806
|
Object.defineProperty(o, "__esModule", {
|
|
911
807
|
value: !0
|
|
912
808
|
});
|
|
913
|
-
|
|
914
809
|
var t = n(0),
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
}
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
return e.open = function (o, n, r) {
|
|
934
|
-
var i = t.popupDimensionsString(n.width, n.height) + ",resizable,scrollbars",
|
|
810
|
+
r = function () {
|
|
811
|
+
function e(e, o) {
|
|
812
|
+
var n = this;
|
|
813
|
+
this.popupWindow = e, this.onClose = o, this.stopInterval = function () {
|
|
814
|
+
clearInterval(n.intervalId);
|
|
815
|
+
}, this.isWindowClosedByUser = function () {
|
|
816
|
+
try {
|
|
817
|
+
return n.popupWindow.closed;
|
|
818
|
+
} catch (e) {}
|
|
819
|
+
return !1;
|
|
820
|
+
}, this.messagingWindow = function () {
|
|
821
|
+
return void 0 !== t.ieframe && null !== t.ieframe ? t.ieframe.contentWindow : n.popupWindow;
|
|
822
|
+
}, this.handleInterval = function () {
|
|
823
|
+
n.isWindowClosedByUser() && (n.onClose(), n.stopInterval());
|
|
824
|
+
}, this.intervalId = setInterval(this.handleInterval, 100);
|
|
825
|
+
}
|
|
826
|
+
return e.open = function (o, n, r) {
|
|
827
|
+
var i = t.popupDimensionsString(n.width, n.height) + ",resizable,scrollbars",
|
|
935
828
|
s = window.open(o, "_blank", i);
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
829
|
+
if (null === s) throw new Error("Failed to open the window. Dropbox popups may only be attached to a user-triggered event handler such as a tap or click event.");
|
|
830
|
+
return s.focus(), new e(s, r);
|
|
831
|
+
}, e;
|
|
832
|
+
}();
|
|
941
833
|
o.PopupEnvironment = r;
|
|
942
834
|
}, function (e, o, n) {
|
|
943
835
|
"use strict";
|
|
944
836
|
|
|
945
837
|
var t,
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
});
|
|
838
|
+
r = this && this.__extends || (t = function (e, o) {
|
|
839
|
+
return (t = Object.setPrototypeOf || {
|
|
840
|
+
__proto__: []
|
|
841
|
+
} instanceof Array && function (e, o) {
|
|
842
|
+
e.__proto__ = o;
|
|
843
|
+
} || function (e, o) {
|
|
844
|
+
for (var n in o) o.hasOwnProperty(n) && (e[n] = o[n]);
|
|
845
|
+
})(e, o);
|
|
846
|
+
}, function (e, o) {
|
|
847
|
+
function n() {
|
|
848
|
+
this.constructor = e;
|
|
849
|
+
}
|
|
850
|
+
t(e, o), e.prototype = null === o ? Object.create(o) : (n.prototype = o.prototype, new n());
|
|
851
|
+
});
|
|
961
852
|
Object.defineProperty(o, "__esModule", {
|
|
962
853
|
value: !0
|
|
963
854
|
});
|
|
964
|
-
|
|
965
855
|
var i = function (e) {
|
|
966
856
|
function o(o) {
|
|
967
857
|
var n = e.call(this, o) || this;
|
|
968
858
|
return n.validateNoOptionLinkType(), n;
|
|
969
859
|
}
|
|
970
|
-
|
|
971
860
|
return r(o, e), o.prototype.validateNoOptionLinkType = function () {
|
|
972
861
|
if (void 0 !== this.options.linkType) throw new Error("The ZoomChooser SDK does not accept a linkType.");
|
|
973
862
|
}, o.prototype.urlParams = function () {
|
|
@@ -978,39 +867,34 @@ Please reach out to the Editor team if you need more information
|
|
|
978
867
|
}), o;
|
|
979
868
|
}, o;
|
|
980
869
|
}(n(3).BaseChooser);
|
|
981
|
-
|
|
982
870
|
o.ZoomChooser = i;
|
|
983
871
|
}, function (e, o, n) {
|
|
984
872
|
"use strict";
|
|
985
873
|
|
|
986
874
|
var t,
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
i =
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
}).apply(this, arguments);
|
|
1008
|
-
};
|
|
1009
|
-
|
|
875
|
+
r = this && this.__extends || (t = function (e, o) {
|
|
876
|
+
return (t = Object.setPrototypeOf || {
|
|
877
|
+
__proto__: []
|
|
878
|
+
} instanceof Array && function (e, o) {
|
|
879
|
+
e.__proto__ = o;
|
|
880
|
+
} || function (e, o) {
|
|
881
|
+
for (var n in o) o.hasOwnProperty(n) && (e[n] = o[n]);
|
|
882
|
+
})(e, o);
|
|
883
|
+
}, function (e, o) {
|
|
884
|
+
function n() {
|
|
885
|
+
this.constructor = e;
|
|
886
|
+
}
|
|
887
|
+
t(e, o), e.prototype = null === o ? Object.create(o) : (n.prototype = o.prototype, new n());
|
|
888
|
+
}),
|
|
889
|
+
i = this && this.__assign || function () {
|
|
890
|
+
return (i = Object.assign || function (e) {
|
|
891
|
+
for (var o, n = 1, t = arguments.length; n < t; n++) for (var r in o = arguments[n]) Object.prototype.hasOwnProperty.call(o, r) && (e[r] = o[r]);
|
|
892
|
+
return e;
|
|
893
|
+
}).apply(this, arguments);
|
|
894
|
+
};
|
|
1010
895
|
Object.defineProperty(o, "__esModule", {
|
|
1011
896
|
value: !0
|
|
1012
897
|
});
|
|
1013
|
-
|
|
1014
898
|
var s = function (e) {
|
|
1015
899
|
function o(n) {
|
|
1016
900
|
var t = e.call(this, n) || this;
|
|
@@ -1019,7 +903,6 @@ Please reach out to the Editor team if you need more information
|
|
|
1019
903
|
initialFolderSelection: t.options.initialFolderSelection
|
|
1020
904
|
}, t.onSuccess = t.options.onSuccess, t.onCancel = t.options.onCancel, t;
|
|
1021
905
|
}
|
|
1022
|
-
|
|
1023
906
|
return r(o, e), o.validateOnSuccess = function (e) {
|
|
1024
907
|
if (e && "function" != typeof e) throw new Error("onSuccess must be a function");
|
|
1025
908
|
}, o.validateOnCancel = function (e) {
|
|
@@ -1039,7 +922,6 @@ Please reach out to the Editor team if you need more information
|
|
|
1039
922
|
case "success":
|
|
1040
923
|
this.onSuccess && this.onSuccess();
|
|
1041
924
|
break;
|
|
1042
|
-
|
|
1043
925
|
case "cancel":
|
|
1044
926
|
this.onCancel && this.onCancel();
|
|
1045
927
|
}
|
|
@@ -1057,39 +939,34 @@ Please reach out to the Editor team if you need more information
|
|
|
1057
939
|
o.validateOnCancel(e), this.onCancel = e;
|
|
1058
940
|
}, o;
|
|
1059
941
|
}(n(2).Dropin);
|
|
1060
|
-
|
|
1061
942
|
o.Mover = s;
|
|
1062
943
|
}, function (e, o, n) {
|
|
1063
944
|
"use strict";
|
|
1064
945
|
|
|
1065
946
|
var t,
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
i =
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
}).apply(this, arguments);
|
|
1087
|
-
};
|
|
1088
|
-
|
|
947
|
+
r = this && this.__extends || (t = function (e, o) {
|
|
948
|
+
return (t = Object.setPrototypeOf || {
|
|
949
|
+
__proto__: []
|
|
950
|
+
} instanceof Array && function (e, o) {
|
|
951
|
+
e.__proto__ = o;
|
|
952
|
+
} || function (e, o) {
|
|
953
|
+
for (var n in o) o.hasOwnProperty(n) && (e[n] = o[n]);
|
|
954
|
+
})(e, o);
|
|
955
|
+
}, function (e, o) {
|
|
956
|
+
function n() {
|
|
957
|
+
this.constructor = e;
|
|
958
|
+
}
|
|
959
|
+
t(e, o), e.prototype = null === o ? Object.create(o) : (n.prototype = o.prototype, new n());
|
|
960
|
+
}),
|
|
961
|
+
i = this && this.__assign || function () {
|
|
962
|
+
return (i = Object.assign || function (e) {
|
|
963
|
+
for (var o, n = 1, t = arguments.length; n < t; n++) for (var r in o = arguments[n]) Object.prototype.hasOwnProperty.call(o, r) && (e[r] = o[r]);
|
|
964
|
+
return e;
|
|
965
|
+
}).apply(this, arguments);
|
|
966
|
+
};
|
|
1089
967
|
Object.defineProperty(o, "__esModule", {
|
|
1090
968
|
value: !0
|
|
1091
969
|
});
|
|
1092
|
-
|
|
1093
970
|
var s = function (e) {
|
|
1094
971
|
function o(o) {
|
|
1095
972
|
void 0 === o && (o = {});
|
|
@@ -1103,7 +980,6 @@ Please reach out to the Editor team if you need more information
|
|
|
1103
980
|
openLinksWithSDK: !!n.options.onOpenLink
|
|
1104
981
|
}, n;
|
|
1105
982
|
}
|
|
1106
|
-
|
|
1107
983
|
return r(o, e), o.prototype.urlPathname = function () {
|
|
1108
984
|
return "/dropins/previewer";
|
|
1109
985
|
}, o.prototype.urlParams = function () {
|
|
@@ -1131,15 +1007,12 @@ Please reach out to the Editor team if you need more information
|
|
|
1131
1007
|
view: n
|
|
1132
1008
|
}), this.options.onViewChange && this.options.onViewChange(n);
|
|
1133
1009
|
break;
|
|
1134
|
-
|
|
1135
1010
|
case "open_link":
|
|
1136
1011
|
this.options.onOpenLink && this.options.onOpenLink(o.params.link);
|
|
1137
1012
|
break;
|
|
1138
|
-
|
|
1139
1013
|
case "update_size":
|
|
1140
1014
|
this.options.onSizeChanged && this.options.onSizeChanged(o.params);
|
|
1141
1015
|
break;
|
|
1142
|
-
|
|
1143
1016
|
default:
|
|
1144
1017
|
e.prototype.handleMessage.call(this, o);
|
|
1145
1018
|
}
|
|
@@ -1161,7 +1034,6 @@ Please reach out to the Editor team if you need more information
|
|
|
1161
1034
|
}), this.sendState();
|
|
1162
1035
|
}, o;
|
|
1163
1036
|
}(n(2).Dropin);
|
|
1164
|
-
|
|
1165
1037
|
o.Previewer = s;
|
|
1166
1038
|
}]));
|
|
1167
1039
|
export default {};
|