@topol.io/editor-react 0.0.2 → 0.0.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.
|
@@ -9,29 +9,29 @@ var Z = { exports: {} }, F = {};
|
|
|
9
9
|
* This source code is licensed under the MIT license found in the
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
|
-
var
|
|
12
|
+
var _e;
|
|
13
13
|
function fr() {
|
|
14
|
-
return
|
|
15
|
-
var
|
|
14
|
+
return _e || (_e = 1, process.env.NODE_ENV !== "production" && function() {
|
|
15
|
+
var t = Oe, u = Symbol.for("react.element"), g = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), f = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), j = Symbol.for("react.provider"), _ = Symbol.for("react.context"), h = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), E = Symbol.for("react.suspense_list"), R = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), B = Symbol.for("react.offscreen"), Q = Symbol.iterator, ke = "@@iterator";
|
|
16
16
|
function xe(e) {
|
|
17
17
|
if (e === null || typeof e != "object")
|
|
18
18
|
return null;
|
|
19
19
|
var r = Q && e[Q] || e[ke];
|
|
20
20
|
return typeof r == "function" ? r : null;
|
|
21
21
|
}
|
|
22
|
-
var O =
|
|
22
|
+
var O = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
23
23
|
function p(e) {
|
|
24
24
|
{
|
|
25
|
-
for (var r = arguments.length,
|
|
26
|
-
|
|
27
|
-
je("error", e,
|
|
25
|
+
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), o = 1; o < r; o++)
|
|
26
|
+
n[o - 1] = arguments[o];
|
|
27
|
+
je("error", e, n);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
function je(e, r,
|
|
30
|
+
function je(e, r, n) {
|
|
31
31
|
{
|
|
32
32
|
var o = O.ReactDebugCurrentFrame, s = o.getStackAddendum();
|
|
33
|
-
s !== "" && (r += "%s",
|
|
34
|
-
var c =
|
|
33
|
+
s !== "" && (r += "%s", n = n.concat([s]));
|
|
34
|
+
var c = n.map(function(l) {
|
|
35
35
|
return String(l);
|
|
36
36
|
});
|
|
37
37
|
c.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, c);
|
|
@@ -40,23 +40,23 @@ function fr() {
|
|
|
40
40
|
var Ae = !1, De = !1, Fe = !1, Ie = !1, Be = !1, ee;
|
|
41
41
|
ee = Symbol.for("react.module.reference");
|
|
42
42
|
function Me(e) {
|
|
43
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
43
|
+
return !!(typeof e == "string" || typeof e == "function" || e === a || e === y || Be || e === f || e === C || e === E || Ie || e === B || Ae || De || Fe || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === R || e.$$typeof === j || e.$$typeof === _ || e.$$typeof === h || // This needs to include all possible module reference object
|
|
44
44
|
// types supported by any Flight configuration anywhere since
|
|
45
45
|
// we don't know which Flight build this will end up being used
|
|
46
46
|
// with.
|
|
47
47
|
e.$$typeof === ee || e.getModuleId !== void 0));
|
|
48
48
|
}
|
|
49
|
-
function Le(e, r,
|
|
49
|
+
function Le(e, r, n) {
|
|
50
50
|
var o = e.displayName;
|
|
51
51
|
if (o)
|
|
52
52
|
return o;
|
|
53
53
|
var s = r.displayName || r.name || "";
|
|
54
|
-
return s !== "" ?
|
|
54
|
+
return s !== "" ? n + "(" + s + ")" : n;
|
|
55
55
|
}
|
|
56
56
|
function re(e) {
|
|
57
57
|
return e.displayName || "Context";
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function T(e) {
|
|
60
60
|
if (e == null)
|
|
61
61
|
return null;
|
|
62
62
|
if (typeof e.tag == "number" && p("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
@@ -64,36 +64,36 @@ function fr() {
|
|
|
64
64
|
if (typeof e == "string")
|
|
65
65
|
return e;
|
|
66
66
|
switch (e) {
|
|
67
|
-
case
|
|
67
|
+
case a:
|
|
68
68
|
return "Fragment";
|
|
69
69
|
case g:
|
|
70
70
|
return "Portal";
|
|
71
|
-
case
|
|
71
|
+
case y:
|
|
72
72
|
return "Profiler";
|
|
73
73
|
case f:
|
|
74
74
|
return "StrictMode";
|
|
75
75
|
case C:
|
|
76
76
|
return "Suspense";
|
|
77
|
-
case
|
|
77
|
+
case E:
|
|
78
78
|
return "SuspenseList";
|
|
79
79
|
}
|
|
80
80
|
if (typeof e == "object")
|
|
81
81
|
switch (e.$$typeof) {
|
|
82
|
-
case
|
|
82
|
+
case _:
|
|
83
83
|
var r = e;
|
|
84
84
|
return re(r) + ".Consumer";
|
|
85
85
|
case j:
|
|
86
|
-
var
|
|
87
|
-
return re(
|
|
86
|
+
var n = e;
|
|
87
|
+
return re(n._context) + ".Provider";
|
|
88
88
|
case h:
|
|
89
89
|
return Le(e, e.render, "ForwardRef");
|
|
90
90
|
case R:
|
|
91
91
|
var o = e.displayName || null;
|
|
92
|
-
return o !== null ? o :
|
|
92
|
+
return o !== null ? o : T(e.type) || "Memo";
|
|
93
93
|
case P: {
|
|
94
94
|
var s = e, c = s._payload, l = s._init;
|
|
95
95
|
try {
|
|
96
|
-
return
|
|
96
|
+
return T(l(c));
|
|
97
97
|
} catch {
|
|
98
98
|
return null;
|
|
99
99
|
}
|
|
@@ -164,7 +164,7 @@ function fr() {
|
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
var N = O.ReactCurrentDispatcher, U;
|
|
167
|
-
function M(e, r,
|
|
167
|
+
function M(e, r, n) {
|
|
168
168
|
{
|
|
169
169
|
if (U === void 0)
|
|
170
170
|
try {
|
|
@@ -186,9 +186,9 @@ function fr() {
|
|
|
186
186
|
if (!e || V)
|
|
187
187
|
return "";
|
|
188
188
|
{
|
|
189
|
-
var
|
|
190
|
-
if (
|
|
191
|
-
return
|
|
189
|
+
var n = L.get(e);
|
|
190
|
+
if (n !== void 0)
|
|
191
|
+
return n;
|
|
192
192
|
}
|
|
193
193
|
var o;
|
|
194
194
|
V = !0;
|
|
@@ -208,40 +208,40 @@ function fr() {
|
|
|
208
208
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
209
209
|
try {
|
|
210
210
|
Reflect.construct(l, []);
|
|
211
|
-
} catch (
|
|
212
|
-
o =
|
|
211
|
+
} catch (w) {
|
|
212
|
+
o = w;
|
|
213
213
|
}
|
|
214
214
|
Reflect.construct(e, [], l);
|
|
215
215
|
} else {
|
|
216
216
|
try {
|
|
217
217
|
l.call();
|
|
218
|
-
} catch (
|
|
219
|
-
o =
|
|
218
|
+
} catch (w) {
|
|
219
|
+
o = w;
|
|
220
220
|
}
|
|
221
221
|
e.call(l.prototype);
|
|
222
222
|
}
|
|
223
223
|
} else {
|
|
224
224
|
try {
|
|
225
225
|
throw Error();
|
|
226
|
-
} catch (
|
|
227
|
-
o =
|
|
226
|
+
} catch (w) {
|
|
227
|
+
o = w;
|
|
228
228
|
}
|
|
229
229
|
e();
|
|
230
230
|
}
|
|
231
|
-
} catch (
|
|
232
|
-
if (
|
|
233
|
-
for (var
|
|
231
|
+
} catch (w) {
|
|
232
|
+
if (w && o && typeof w.stack == "string") {
|
|
233
|
+
for (var i = w.stack.split(`
|
|
234
234
|
`), m = o.stack.split(`
|
|
235
|
-
`), d =
|
|
235
|
+
`), d = i.length - 1, v = m.length - 1; d >= 1 && v >= 0 && i[d] !== m[v]; )
|
|
236
236
|
v--;
|
|
237
237
|
for (; d >= 1 && v >= 0; d--, v--)
|
|
238
|
-
if (
|
|
238
|
+
if (i[d] !== m[v]) {
|
|
239
239
|
if (d !== 1 || v !== 1)
|
|
240
240
|
do
|
|
241
|
-
if (d--, v--, v < 0 ||
|
|
242
|
-
var
|
|
243
|
-
` +
|
|
244
|
-
return e.displayName &&
|
|
241
|
+
if (d--, v--, v < 0 || i[d] !== m[v]) {
|
|
242
|
+
var b = `
|
|
243
|
+
` + i[d].replace(" at new ", " at ");
|
|
244
|
+
return e.displayName && b.includes("<anonymous>") && (b = b.replace("<anonymous>", e.displayName)), typeof e == "function" && L.set(e, b), b;
|
|
245
245
|
}
|
|
246
246
|
while (d >= 1 && v >= 0);
|
|
247
247
|
break;
|
|
@@ -250,17 +250,17 @@ function fr() {
|
|
|
250
250
|
} finally {
|
|
251
251
|
V = !1, N.current = c, We(), Error.prepareStackTrace = s;
|
|
252
252
|
}
|
|
253
|
-
var x = e ? e.displayName || e.name : "",
|
|
254
|
-
return typeof e == "function" && L.set(e,
|
|
253
|
+
var x = e ? e.displayName || e.name : "", we = x ? M(x) : "";
|
|
254
|
+
return typeof e == "function" && L.set(e, we), we;
|
|
255
255
|
}
|
|
256
|
-
function Ne(e, r,
|
|
256
|
+
function Ne(e, r, n) {
|
|
257
257
|
return ce(e, !1);
|
|
258
258
|
}
|
|
259
259
|
function Ue(e) {
|
|
260
260
|
var r = e.prototype;
|
|
261
261
|
return !!(r && r.isReactComponent);
|
|
262
262
|
}
|
|
263
|
-
function $(e, r,
|
|
263
|
+
function $(e, r, n) {
|
|
264
264
|
if (e == null)
|
|
265
265
|
return "";
|
|
266
266
|
if (typeof e == "function")
|
|
@@ -270,7 +270,7 @@ function fr() {
|
|
|
270
270
|
switch (e) {
|
|
271
271
|
case C:
|
|
272
272
|
return M("Suspense");
|
|
273
|
-
case
|
|
273
|
+
case E:
|
|
274
274
|
return M("SuspenseList");
|
|
275
275
|
}
|
|
276
276
|
if (typeof e == "object")
|
|
@@ -278,11 +278,11 @@ function fr() {
|
|
|
278
278
|
case h:
|
|
279
279
|
return Ne(e.render);
|
|
280
280
|
case R:
|
|
281
|
-
return $(e.type, r,
|
|
281
|
+
return $(e.type, r, n);
|
|
282
282
|
case P: {
|
|
283
283
|
var o = e, s = o._payload, c = o._init;
|
|
284
284
|
try {
|
|
285
|
-
return $(c(s), r,
|
|
285
|
+
return $(c(s), r, n);
|
|
286
286
|
} catch {
|
|
287
287
|
}
|
|
288
288
|
}
|
|
@@ -292,27 +292,27 @@ function fr() {
|
|
|
292
292
|
var W = Object.prototype.hasOwnProperty, fe = {}, de = O.ReactDebugCurrentFrame;
|
|
293
293
|
function Y(e) {
|
|
294
294
|
if (e) {
|
|
295
|
-
var r = e._owner,
|
|
296
|
-
de.setExtraStackFrame(
|
|
295
|
+
var r = e._owner, n = $(e.type, e._source, r ? r.type : null);
|
|
296
|
+
de.setExtraStackFrame(n);
|
|
297
297
|
} else
|
|
298
298
|
de.setExtraStackFrame(null);
|
|
299
299
|
}
|
|
300
|
-
function Ve(e, r,
|
|
300
|
+
function Ve(e, r, n, o, s) {
|
|
301
301
|
{
|
|
302
302
|
var c = Function.call.bind(W);
|
|
303
303
|
for (var l in e)
|
|
304
304
|
if (c(e, l)) {
|
|
305
|
-
var
|
|
305
|
+
var i = void 0;
|
|
306
306
|
try {
|
|
307
307
|
if (typeof e[l] != "function") {
|
|
308
|
-
var m = Error((o || "React class") + ": " +
|
|
308
|
+
var m = Error((o || "React class") + ": " + n + " type `" + l + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[l] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
309
309
|
throw m.name = "Invariant Violation", m;
|
|
310
310
|
}
|
|
311
|
-
|
|
311
|
+
i = e[l](r, l, o, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
312
312
|
} catch (d) {
|
|
313
|
-
|
|
313
|
+
i = d;
|
|
314
314
|
}
|
|
315
|
-
|
|
315
|
+
i && !(i instanceof Error) && (Y(s), p("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", o || "React class", n, l, typeof i), Y(null)), i instanceof Error && !(i.message in fe) && (fe[i.message] = !0, Y(s), p("Failed %s type: %s", n, i.message), Y(null));
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
}
|
|
@@ -322,8 +322,8 @@ function fr() {
|
|
|
322
322
|
}
|
|
323
323
|
function qe(e) {
|
|
324
324
|
{
|
|
325
|
-
var r = typeof Symbol == "function" && Symbol.toStringTag,
|
|
326
|
-
return
|
|
325
|
+
var r = typeof Symbol == "function" && Symbol.toStringTag, n = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
326
|
+
return n;
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
function Je(e) {
|
|
@@ -365,65 +365,65 @@ function fr() {
|
|
|
365
365
|
}
|
|
366
366
|
function Xe(e, r) {
|
|
367
367
|
if (typeof e.ref == "string" && D.current && r && D.current.stateNode !== r) {
|
|
368
|
-
var
|
|
369
|
-
q[
|
|
368
|
+
var n = T(D.current.type);
|
|
369
|
+
q[n] || (p('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', T(D.current.type), e.ref), q[n] = !0);
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
372
|
function Ze(e, r) {
|
|
373
373
|
{
|
|
374
|
-
var
|
|
374
|
+
var n = function() {
|
|
375
375
|
he || (he = !0, p("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
376
376
|
};
|
|
377
|
-
|
|
378
|
-
get:
|
|
377
|
+
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
378
|
+
get: n,
|
|
379
379
|
configurable: !0
|
|
380
380
|
});
|
|
381
381
|
}
|
|
382
382
|
}
|
|
383
383
|
function Qe(e, r) {
|
|
384
384
|
{
|
|
385
|
-
var
|
|
385
|
+
var n = function() {
|
|
386
386
|
pe || (pe = !0, p("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
387
387
|
};
|
|
388
|
-
|
|
389
|
-
get:
|
|
388
|
+
n.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
389
|
+
get: n,
|
|
390
390
|
configurable: !0
|
|
391
391
|
});
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
|
-
var er = function(e, r,
|
|
395
|
-
var
|
|
394
|
+
var er = function(e, r, n, o, s, c, l) {
|
|
395
|
+
var i = {
|
|
396
396
|
// This tag allows us to uniquely identify this as a React Element
|
|
397
397
|
$$typeof: u,
|
|
398
398
|
// Built-in properties that belong on the element
|
|
399
399
|
type: e,
|
|
400
400
|
key: r,
|
|
401
|
-
ref:
|
|
401
|
+
ref: n,
|
|
402
402
|
props: l,
|
|
403
403
|
// Record the component responsible for creating this element.
|
|
404
404
|
_owner: c
|
|
405
405
|
};
|
|
406
|
-
return
|
|
406
|
+
return i._store = {}, Object.defineProperty(i._store, "validated", {
|
|
407
407
|
configurable: !1,
|
|
408
408
|
enumerable: !1,
|
|
409
409
|
writable: !0,
|
|
410
410
|
value: !1
|
|
411
|
-
}), Object.defineProperty(
|
|
411
|
+
}), Object.defineProperty(i, "_self", {
|
|
412
412
|
configurable: !1,
|
|
413
413
|
enumerable: !1,
|
|
414
414
|
writable: !1,
|
|
415
415
|
value: o
|
|
416
|
-
}), Object.defineProperty(
|
|
416
|
+
}), Object.defineProperty(i, "_source", {
|
|
417
417
|
configurable: !1,
|
|
418
418
|
enumerable: !1,
|
|
419
419
|
writable: !1,
|
|
420
420
|
value: s
|
|
421
|
-
}), Object.freeze && (Object.freeze(
|
|
421
|
+
}), Object.freeze && (Object.freeze(i.props), Object.freeze(i)), i;
|
|
422
422
|
};
|
|
423
|
-
function rr(e, r,
|
|
423
|
+
function rr(e, r, n, o, s) {
|
|
424
424
|
{
|
|
425
|
-
var c, l = {},
|
|
426
|
-
|
|
425
|
+
var c, l = {}, i = null, m = null;
|
|
426
|
+
n !== void 0 && (ge(n), i = "" + n), Ke(r) && (ge(r.key), i = "" + r.key), He(r) && (m = r.ref, Xe(r, s));
|
|
427
427
|
for (c in r)
|
|
428
428
|
W.call(r, c) && !Ge.hasOwnProperty(c) && (l[c] = r[c]);
|
|
429
429
|
if (e && e.defaultProps) {
|
|
@@ -431,18 +431,18 @@ function fr() {
|
|
|
431
431
|
for (c in d)
|
|
432
432
|
l[c] === void 0 && (l[c] = d[c]);
|
|
433
433
|
}
|
|
434
|
-
if (
|
|
434
|
+
if (i || m) {
|
|
435
435
|
var v = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
436
|
-
|
|
436
|
+
i && Ze(l, v), m && Qe(l, v);
|
|
437
437
|
}
|
|
438
|
-
return er(e,
|
|
438
|
+
return er(e, i, m, s, o, D.current, l);
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
441
|
var J = O.ReactCurrentOwner, me = O.ReactDebugCurrentFrame;
|
|
442
442
|
function k(e) {
|
|
443
443
|
if (e) {
|
|
444
|
-
var r = e._owner,
|
|
445
|
-
me.setExtraStackFrame(
|
|
444
|
+
var r = e._owner, n = $(e.type, e._source, r ? r.type : null);
|
|
445
|
+
me.setExtraStackFrame(n);
|
|
446
446
|
} else
|
|
447
447
|
me.setExtraStackFrame(null);
|
|
448
448
|
}
|
|
@@ -451,10 +451,10 @@ function fr() {
|
|
|
451
451
|
function H(e) {
|
|
452
452
|
return typeof e == "object" && e !== null && e.$$typeof === u;
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function Ee() {
|
|
455
455
|
{
|
|
456
456
|
if (J.current) {
|
|
457
|
-
var e =
|
|
457
|
+
var e = T(J.current.type);
|
|
458
458
|
if (e)
|
|
459
459
|
return `
|
|
460
460
|
|
|
@@ -466,38 +466,38 @@ Check the render method of \`` + e + "`.";
|
|
|
466
466
|
function tr(e) {
|
|
467
467
|
{
|
|
468
468
|
if (e !== void 0) {
|
|
469
|
-
var r = e.fileName.replace(/^.*[\\\/]/, ""),
|
|
469
|
+
var r = e.fileName.replace(/^.*[\\\/]/, ""), n = e.lineNumber;
|
|
470
470
|
return `
|
|
471
471
|
|
|
472
|
-
Check your code at ` + r + ":" +
|
|
472
|
+
Check your code at ` + r + ":" + n + ".";
|
|
473
473
|
}
|
|
474
474
|
return "";
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
var
|
|
477
|
+
var be = {};
|
|
478
478
|
function nr(e) {
|
|
479
479
|
{
|
|
480
|
-
var r =
|
|
480
|
+
var r = Ee();
|
|
481
481
|
if (!r) {
|
|
482
|
-
var
|
|
483
|
-
|
|
482
|
+
var n = typeof e == "string" ? e : e.displayName || e.name;
|
|
483
|
+
n && (r = `
|
|
484
484
|
|
|
485
|
-
Check the top-level render call using <` +
|
|
485
|
+
Check the top-level render call using <` + n + ">.");
|
|
486
486
|
}
|
|
487
487
|
return r;
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function ye(e, r) {
|
|
491
491
|
{
|
|
492
492
|
if (!e._store || e._store.validated || e.key != null)
|
|
493
493
|
return;
|
|
494
494
|
e._store.validated = !0;
|
|
495
|
-
var
|
|
496
|
-
if (
|
|
495
|
+
var n = nr(r);
|
|
496
|
+
if (be[n])
|
|
497
497
|
return;
|
|
498
|
-
|
|
498
|
+
be[n] = !0;
|
|
499
499
|
var o = "";
|
|
500
|
-
e && e._owner && e._owner !== J.current && (o = " It was passed a child from " +
|
|
500
|
+
e && e._owner && e._owner !== J.current && (o = " It was passed a child from " + T(e._owner.type) + "."), k(e), p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, o), k(null);
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
503
|
function Re(e, r) {
|
|
@@ -505,9 +505,9 @@ Check the top-level render call using <` + t + ">.");
|
|
|
505
505
|
if (typeof e != "object")
|
|
506
506
|
return;
|
|
507
507
|
if (z(e))
|
|
508
|
-
for (var
|
|
509
|
-
var o = e[
|
|
510
|
-
H(o) &&
|
|
508
|
+
for (var n = 0; n < e.length; n++) {
|
|
509
|
+
var o = e[n];
|
|
510
|
+
H(o) && ye(o, r);
|
|
511
511
|
}
|
|
512
512
|
else if (H(e))
|
|
513
513
|
e._store && (e._store.validated = !0);
|
|
@@ -515,7 +515,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
515
515
|
var s = xe(e);
|
|
516
516
|
if (typeof s == "function" && s !== e.entries)
|
|
517
517
|
for (var c = s.call(e), l; !(l = c.next()).done; )
|
|
518
|
-
H(l.value) &&
|
|
518
|
+
H(l.value) && ye(l.value, r);
|
|
519
519
|
}
|
|
520
520
|
}
|
|
521
521
|
}
|
|
@@ -524,21 +524,21 @@ Check the top-level render call using <` + t + ">.");
|
|
|
524
524
|
var r = e.type;
|
|
525
525
|
if (r == null || typeof r == "string")
|
|
526
526
|
return;
|
|
527
|
-
var
|
|
527
|
+
var n;
|
|
528
528
|
if (typeof r == "function")
|
|
529
|
-
|
|
529
|
+
n = r.propTypes;
|
|
530
530
|
else if (typeof r == "object" && (r.$$typeof === h || // Note: Memo only checks outer props here.
|
|
531
531
|
// Inner props are checked in the reconciler.
|
|
532
532
|
r.$$typeof === R))
|
|
533
|
-
|
|
533
|
+
n = r.propTypes;
|
|
534
534
|
else
|
|
535
535
|
return;
|
|
536
|
-
if (
|
|
537
|
-
var o =
|
|
538
|
-
Ve(
|
|
536
|
+
if (n) {
|
|
537
|
+
var o = T(r);
|
|
538
|
+
Ve(n, e.props, "prop", o, e);
|
|
539
539
|
} else if (r.PropTypes !== void 0 && !G) {
|
|
540
540
|
G = !0;
|
|
541
|
-
var s =
|
|
541
|
+
var s = T(r);
|
|
542
542
|
p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", s || "Unknown");
|
|
543
543
|
}
|
|
544
544
|
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
@@ -546,8 +546,8 @@ Check the top-level render call using <` + t + ">.");
|
|
|
546
546
|
}
|
|
547
547
|
function ar(e) {
|
|
548
548
|
{
|
|
549
|
-
for (var r = Object.keys(e.props),
|
|
550
|
-
var o = r[
|
|
549
|
+
for (var r = Object.keys(e.props), n = 0; n < r.length; n++) {
|
|
550
|
+
var o = r[n];
|
|
551
551
|
if (o !== "children" && o !== "key") {
|
|
552
552
|
k(e), p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", o), k(null);
|
|
553
553
|
break;
|
|
@@ -556,44 +556,44 @@ Check the top-level render call using <` + t + ">.");
|
|
|
556
556
|
e.ref !== null && (k(e), p("Invalid attribute `ref` supplied to `React.Fragment`."), k(null));
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
function
|
|
559
|
+
function Te(e, r, n, o, s, c) {
|
|
560
560
|
{
|
|
561
561
|
var l = Me(e);
|
|
562
562
|
if (!l) {
|
|
563
|
-
var
|
|
564
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
563
|
+
var i = "";
|
|
564
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (i += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
565
565
|
var m = tr(s);
|
|
566
|
-
m ?
|
|
566
|
+
m ? i += m : i += Ee();
|
|
567
567
|
var d;
|
|
568
|
-
e === null ? d = "null" : z(e) ? d = "array" : e !== void 0 && e.$$typeof === u ? (d = "<" + (
|
|
568
|
+
e === null ? d = "null" : z(e) ? d = "array" : e !== void 0 && e.$$typeof === u ? (d = "<" + (T(e.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : d = typeof e, p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", d, i);
|
|
569
569
|
}
|
|
570
|
-
var v = rr(e, r,
|
|
570
|
+
var v = rr(e, r, n, s, c);
|
|
571
571
|
if (v == null)
|
|
572
572
|
return v;
|
|
573
573
|
if (l) {
|
|
574
|
-
var
|
|
575
|
-
if (
|
|
574
|
+
var b = r.children;
|
|
575
|
+
if (b !== void 0)
|
|
576
576
|
if (o)
|
|
577
|
-
if (z(
|
|
578
|
-
for (var x = 0; x <
|
|
579
|
-
Re(
|
|
580
|
-
Object.freeze && Object.freeze(
|
|
577
|
+
if (z(b)) {
|
|
578
|
+
for (var x = 0; x < b.length; x++)
|
|
579
|
+
Re(b[x], e);
|
|
580
|
+
Object.freeze && Object.freeze(b);
|
|
581
581
|
} else
|
|
582
582
|
p("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
583
583
|
else
|
|
584
|
-
Re(
|
|
584
|
+
Re(b, e);
|
|
585
585
|
}
|
|
586
|
-
return e ===
|
|
586
|
+
return e === a ? ar(v) : or(v), v;
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
|
-
function ir(e, r,
|
|
590
|
-
return
|
|
589
|
+
function ir(e, r, n) {
|
|
590
|
+
return Te(e, r, n, !0);
|
|
591
591
|
}
|
|
592
|
-
function lr(e, r,
|
|
593
|
-
return
|
|
592
|
+
function lr(e, r, n) {
|
|
593
|
+
return Te(e, r, n, !1);
|
|
594
594
|
}
|
|
595
595
|
var ur = lr, sr = ir;
|
|
596
|
-
F.Fragment =
|
|
596
|
+
F.Fragment = a, F.jsx = ur, F.jsxs = sr;
|
|
597
597
|
}()), F;
|
|
598
598
|
}
|
|
599
599
|
var I = {};
|
|
@@ -611,70 +611,70 @@ function dr() {
|
|
|
611
611
|
if (Pe)
|
|
612
612
|
return I;
|
|
613
613
|
Pe = 1;
|
|
614
|
-
var
|
|
615
|
-
function j(
|
|
616
|
-
var
|
|
614
|
+
var t = Oe, u = Symbol.for("react.element"), g = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, f = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, y = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
615
|
+
function j(_, h, C) {
|
|
616
|
+
var E, R = {}, P = null, B = null;
|
|
617
617
|
C !== void 0 && (P = "" + C), h.key !== void 0 && (P = "" + h.key), h.ref !== void 0 && (B = h.ref);
|
|
618
|
-
for (
|
|
619
|
-
|
|
620
|
-
if (
|
|
621
|
-
for (
|
|
622
|
-
R[
|
|
623
|
-
return { $$typeof: u, type:
|
|
618
|
+
for (E in h)
|
|
619
|
+
a.call(h, E) && !y.hasOwnProperty(E) && (R[E] = h[E]);
|
|
620
|
+
if (_ && _.defaultProps)
|
|
621
|
+
for (E in h = _.defaultProps, h)
|
|
622
|
+
R[E] === void 0 && (R[E] = h[E]);
|
|
623
|
+
return { $$typeof: u, type: _, key: P, ref: B, props: R, _owner: f.current };
|
|
624
624
|
}
|
|
625
625
|
return I.Fragment = g, I.jsx = j, I.jsxs = j, I;
|
|
626
626
|
}
|
|
627
627
|
process.env.NODE_ENV === "production" ? Z.exports = dr() : Z.exports = fr();
|
|
628
628
|
var vr = Z.exports;
|
|
629
|
-
function gr(
|
|
630
|
-
return
|
|
629
|
+
function gr(t) {
|
|
630
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
631
631
|
}
|
|
632
|
-
var hr = function(
|
|
633
|
-
var
|
|
632
|
+
var hr = function(t, u, g) {
|
|
633
|
+
var a = document.head || document.getElementsByTagName("head")[0], f = document.createElement("script");
|
|
634
634
|
typeof u == "function" && (g = u, u = {}), u = u || {}, g = g || function() {
|
|
635
|
-
}, f.type = u.type || "text/javascript", f.charset = u.charset || "utf8", f.async = "async" in u ? !!u.async : !0, f.src =
|
|
636
|
-
var
|
|
637
|
-
|
|
635
|
+
}, f.type = u.type || "text/javascript", f.charset = u.charset || "utf8", f.async = "async" in u ? !!u.async : !0, f.src = t, u.attrs && pr(f, u.attrs), u.text && (f.text = "" + u.text);
|
|
636
|
+
var y = "onload" in f ? Se : mr;
|
|
637
|
+
y(f, g), f.onload || Se(f, g), a.appendChild(f);
|
|
638
638
|
};
|
|
639
|
-
function pr(
|
|
639
|
+
function pr(t, u) {
|
|
640
640
|
for (var g in u)
|
|
641
|
-
|
|
641
|
+
t.setAttribute(g, u[g]);
|
|
642
642
|
}
|
|
643
|
-
function Se(
|
|
644
|
-
|
|
645
|
-
this.onerror = this.onload = null, u(null,
|
|
646
|
-
},
|
|
647
|
-
this.onerror = this.onload = null, u(new Error("Failed to load " + this.src),
|
|
643
|
+
function Se(t, u) {
|
|
644
|
+
t.onload = function() {
|
|
645
|
+
this.onerror = this.onload = null, u(null, t);
|
|
646
|
+
}, t.onerror = function() {
|
|
647
|
+
this.onerror = this.onload = null, u(new Error("Failed to load " + this.src), t);
|
|
648
648
|
};
|
|
649
649
|
}
|
|
650
|
-
function mr(
|
|
651
|
-
|
|
652
|
-
this.readyState != "complete" && this.readyState != "loaded" || (this.onreadystatechange = null, u(null,
|
|
650
|
+
function mr(t, u) {
|
|
651
|
+
t.onreadystatechange = function() {
|
|
652
|
+
this.readyState != "complete" && this.readyState != "loaded" || (this.onreadystatechange = null, u(null, t));
|
|
653
653
|
};
|
|
654
654
|
}
|
|
655
|
-
const
|
|
656
|
-
function
|
|
657
|
-
switch (
|
|
655
|
+
const Er = /* @__PURE__ */ gr(hr), br = "https://d5aoblv5p04cg.cloudfront.net/editor-3/loader/build.js", yr = "https://d5aoblv5p04cg.cloudfront.net/develop/loader/build.js", Rr = "https://d5aoblv5p04cg.cloudfront.net/staging/loader/build.js";
|
|
656
|
+
function Tr(t = "production") {
|
|
657
|
+
switch (t) {
|
|
658
658
|
case "dev":
|
|
659
|
-
return
|
|
659
|
+
return yr;
|
|
660
660
|
case "staging":
|
|
661
661
|
return Rr;
|
|
662
662
|
default:
|
|
663
|
-
return
|
|
663
|
+
return br;
|
|
664
664
|
}
|
|
665
665
|
}
|
|
666
666
|
const Ce = {
|
|
667
|
-
init: (
|
|
668
|
-
const f =
|
|
669
|
-
|
|
670
|
-
|
|
667
|
+
init: (t, u) => new Promise((g, a) => {
|
|
668
|
+
const f = Tr(u == null ? void 0 : u.stage);
|
|
669
|
+
Er(f, (y) => {
|
|
670
|
+
y !== null && a(y), window.TopolPlugin.init(t), g(!0);
|
|
671
671
|
});
|
|
672
672
|
}),
|
|
673
673
|
save: () => {
|
|
674
674
|
window.TopolPlugin.save();
|
|
675
675
|
},
|
|
676
|
-
load: (
|
|
677
|
-
window.TopolPlugin.load(
|
|
676
|
+
load: (t) => {
|
|
677
|
+
window.TopolPlugin.load(t);
|
|
678
678
|
},
|
|
679
679
|
togglePreview: () => {
|
|
680
680
|
window.TopolPlugin.togglePreview();
|
|
@@ -682,8 +682,8 @@ const Ce = {
|
|
|
682
682
|
togglePreviewSize: () => {
|
|
683
683
|
window.TopolPlugin.togglePreviewSize();
|
|
684
684
|
},
|
|
685
|
-
chooseFile: (
|
|
686
|
-
window.TopolPlugin.chooseFile(
|
|
685
|
+
chooseFile: (t) => {
|
|
686
|
+
window.TopolPlugin.chooseFile(t);
|
|
687
687
|
},
|
|
688
688
|
undo: () => {
|
|
689
689
|
window.TopolPlugin.undo();
|
|
@@ -691,11 +691,11 @@ const Ce = {
|
|
|
691
691
|
redo: () => {
|
|
692
692
|
window.TopolPlugin.redo();
|
|
693
693
|
},
|
|
694
|
-
setSavedBlocks: (
|
|
695
|
-
window.TopolPlugin.setSavedBlocks(
|
|
694
|
+
setSavedBlocks: (t) => {
|
|
695
|
+
window.TopolPlugin.setSavedBlocks(t);
|
|
696
696
|
},
|
|
697
|
-
createNotification: (
|
|
698
|
-
window.TopolPlugin.createNotification(
|
|
697
|
+
createNotification: (t) => {
|
|
698
|
+
window.TopolPlugin.createNotification(t);
|
|
699
699
|
},
|
|
700
700
|
changeEmailToMobile: () => {
|
|
701
701
|
window.TopolPlugin.changeEmailToMobile();
|
|
@@ -709,69 +709,75 @@ const Ce = {
|
|
|
709
709
|
destroy: () => {
|
|
710
710
|
window.TopolPlugin.destroy();
|
|
711
711
|
},
|
|
712
|
-
setPreviewHTML: (
|
|
713
|
-
window.TopolPlugin.setPreviewHTML(
|
|
712
|
+
setPreviewHTML: (t) => {
|
|
713
|
+
window.TopolPlugin.setPreviewHTML(t);
|
|
714
714
|
},
|
|
715
|
-
setActiveMembers: (
|
|
716
|
-
window.TopolPlugin.setActiveMembers(
|
|
715
|
+
setActiveMembers: (t) => {
|
|
716
|
+
window.TopolPlugin.setActiveMembers(t);
|
|
717
717
|
},
|
|
718
|
-
updateCustomBlockContent: (
|
|
719
|
-
window.TopolPlugin.updateCustomBlockContent(
|
|
718
|
+
updateCustomBlockContent: (t) => {
|
|
719
|
+
window.TopolPlugin.updateCustomBlockContent(t);
|
|
720
720
|
}
|
|
721
|
-
},
|
|
721
|
+
}, wr = "editor";
|
|
722
722
|
let K = !1, X = !1;
|
|
723
|
-
function Pr(
|
|
723
|
+
function Pr(t) {
|
|
724
724
|
const u = () => {
|
|
725
725
|
const g = {
|
|
726
|
-
onSave(
|
|
727
|
-
|
|
726
|
+
onSave(a, f) {
|
|
727
|
+
t.onSave !== void 0 && t.onSave(a, f);
|
|
728
728
|
},
|
|
729
|
-
onSaveAndClose(
|
|
730
|
-
|
|
729
|
+
onSaveAndClose(a, f) {
|
|
730
|
+
t.onSaveAndClose !== void 0 && t.onSaveAndClose(a, f);
|
|
731
731
|
},
|
|
732
|
-
onTestSend(
|
|
733
|
-
|
|
732
|
+
onTestSend(a, f, y) {
|
|
733
|
+
t.onTestSend !== void 0 && t.onTestSend(a, f, y);
|
|
734
734
|
},
|
|
735
735
|
onOpenFileManager() {
|
|
736
|
-
|
|
736
|
+
t.onOpenFileManager !== void 0 && t.onOpenFileManager();
|
|
737
737
|
},
|
|
738
738
|
onLoaded() {
|
|
739
|
-
|
|
739
|
+
t.onLoaded !== void 0 && t.onLoaded();
|
|
740
740
|
},
|
|
741
|
-
onBlockSave(
|
|
742
|
-
|
|
741
|
+
onBlockSave(a) {
|
|
742
|
+
t.onBlockSave !== void 0 && t.onBlockSave(a);
|
|
743
743
|
},
|
|
744
|
-
onBlockRemove(
|
|
745
|
-
|
|
744
|
+
onBlockRemove(a) {
|
|
745
|
+
t.onBlockRemove !== void 0 && t.onBlockRemove(a);
|
|
746
746
|
},
|
|
747
|
-
onBlockEdit(
|
|
748
|
-
|
|
747
|
+
onBlockEdit(a) {
|
|
748
|
+
t.onBlockEdit !== void 0 && t.onBlockEdit(a);
|
|
749
749
|
},
|
|
750
750
|
onInit() {
|
|
751
|
-
|
|
751
|
+
t.onInit !== void 0 && t.onInit(), K = !1, X = !0;
|
|
752
|
+
},
|
|
753
|
+
onUndoChange(a) {
|
|
754
|
+
t.onUndoChange !== void 0 && t.onUndoChange(a);
|
|
755
|
+
},
|
|
756
|
+
onRedoChange(a) {
|
|
757
|
+
t.onRedoChange !== void 0 && t.onRedoChange(a);
|
|
752
758
|
},
|
|
753
|
-
|
|
754
|
-
|
|
759
|
+
onPreview(a) {
|
|
760
|
+
t.onPreview !== void 0 && t.onPreview(a);
|
|
755
761
|
},
|
|
756
|
-
|
|
757
|
-
|
|
762
|
+
onAlert(a) {
|
|
763
|
+
t.onAlert !== void 0 && t.onAlert(a);
|
|
758
764
|
},
|
|
759
|
-
|
|
760
|
-
|
|
765
|
+
onOpenCustomBlockDialog(a) {
|
|
766
|
+
t.onOpenCustomBlockDialog !== void 0 && t.onOpenCustomBlockDialog(a);
|
|
761
767
|
},
|
|
762
|
-
|
|
763
|
-
|
|
768
|
+
onTemplateRename(a) {
|
|
769
|
+
t.onTemplateRename !== void 0 && t.onTemplateRename(a);
|
|
764
770
|
},
|
|
765
|
-
|
|
766
|
-
|
|
771
|
+
updateTestingEmailAddresses(a) {
|
|
772
|
+
t.updateTestingEmailAddresses !== void 0 && t.updateTestingEmailAddresses(a);
|
|
767
773
|
}
|
|
768
774
|
};
|
|
769
|
-
return { id: "#" +
|
|
775
|
+
return { id: "#" + wr, ...t.options, callbacks: { ...g } };
|
|
770
776
|
};
|
|
771
777
|
return cr(() => (K || (async () => {
|
|
772
778
|
K = !0;
|
|
773
|
-
const
|
|
774
|
-
await Ce.init(
|
|
779
|
+
const a = u();
|
|
780
|
+
await Ce.init(a, { stage: t.stage || "production" });
|
|
775
781
|
})(), () => {
|
|
776
782
|
X && (Ce.destroy(), X = !1);
|
|
777
783
|
}), []), /* @__PURE__ */ vr.jsx(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(w,P){typeof exports=="object"&&typeof module<"u"?P(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],P):(w=typeof globalThis<"u"?globalThis:w||self,P(w["topol-editor-react"]={},w.React))})(this,function(w,P){"use strict";var $={exports:{}},D={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.development.js
|
|
4
4
|
*
|
|
@@ -6,17 +6,17 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var te;function je(){return te||(te=1,process.env.NODE_ENV!=="production"&&function(){var
|
|
10
|
-
`+H+e}}var K=!1,Y;{var tr=typeof WeakMap=="function"?WeakMap:Map;Y=new tr}function
|
|
9
|
+
*/var te;function je(){return te||(te=1,process.env.NODE_ENV!=="production"&&function(){var t=P,l=Symbol.for("react.element"),g=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),I=Symbol.for("react.provider"),S=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),L=Symbol.for("react.offscreen"),ae=Symbol.iterator,$e="@@iterator";function ze(e){if(e===null||typeof e!="object")return null;var r=ae&&e[ae]||e[$e];return typeof r=="function"?r:null}var j=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function p(e){{for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];Je("error",e,n)}}function Je(e,r,n){{var o=j.ReactDebugCurrentFrame,s=o.getStackAddendum();s!==""&&(r+="%s",n=n.concat([s]));var c=n.map(function(u){return String(u)});c.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,c)}}var qe=!1,Ge=!1,He=!1,Ke=!1,Xe=!1,ie;ie=Symbol.for("react.module.reference");function Ze(e){return!!(typeof e=="string"||typeof e=="function"||e===a||e===E||Xe||e===f||e===k||e===y||Ke||e===L||qe||Ge||He||typeof e=="object"&&e!==null&&(e.$$typeof===C||e.$$typeof===R||e.$$typeof===I||e.$$typeof===S||e.$$typeof===h||e.$$typeof===ie||e.getModuleId!==void 0))}function Qe(e,r,n){var o=e.displayName;if(o)return o;var s=r.displayName||r.name||"";return s!==""?n+"("+s+")":n}function ue(e){return e.displayName||"Context"}function T(e){if(e==null)return null;if(typeof e.tag=="number"&&p("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case a:return"Fragment";case g:return"Portal";case E:return"Profiler";case f:return"StrictMode";case k:return"Suspense";case y:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case S:var r=e;return ue(r)+".Consumer";case I:var n=e;return ue(n._context)+".Provider";case h:return Qe(e,e.render,"ForwardRef");case R:var o=e.displayName||null;return o!==null?o:T(e.type)||"Memo";case C:{var s=e,c=s._payload,u=s._init;try{return T(u(c))}catch{return null}}}return null}var O=Object.assign,M=0,le,se,ce,fe,de,ve,ge;function he(){}he.__reactDisabledLog=!0;function er(){{if(M===0){le=console.log,se=console.info,ce=console.warn,fe=console.error,de=console.group,ve=console.groupCollapsed,ge=console.groupEnd;var e={configurable:!0,enumerable:!0,value:he,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}M++}}function rr(){{if(M--,M===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:O({},e,{value:le}),info:O({},e,{value:se}),warn:O({},e,{value:ce}),error:O({},e,{value:fe}),group:O({},e,{value:de}),groupCollapsed:O({},e,{value:ve}),groupEnd:O({},e,{value:ge})})}M<0&&p("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var G=j.ReactCurrentDispatcher,H;function W(e,r,n){{if(H===void 0)try{throw Error()}catch(s){var o=s.stack.trim().match(/\n( *(at )?)/);H=o&&o[1]||""}return`
|
|
10
|
+
`+H+e}}var K=!1,Y;{var tr=typeof WeakMap=="function"?WeakMap:Map;Y=new tr}function pe(e,r){if(!e||K)return"";{var n=Y.get(e);if(n!==void 0)return n}var o;K=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var c;c=G.current,G.current=null,er();try{if(r){var u=function(){throw Error()};if(Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(_){o=_}Reflect.construct(e,[],u)}else{try{u.call()}catch(_){o=_}e.call(u.prototype)}}else{try{throw Error()}catch(_){o=_}e()}}catch(_){if(_&&o&&typeof _.stack=="string"){for(var i=_.stack.split(`
|
|
11
11
|
`),m=o.stack.split(`
|
|
12
|
-
`),d=
|
|
13
|
-
`+
|
|
12
|
+
`),d=i.length-1,v=m.length-1;d>=1&&v>=0&&i[d]!==m[v];)v--;for(;d>=1&&v>=0;d--,v--)if(i[d]!==m[v]){if(d!==1||v!==1)do if(d--,v--,v<0||i[d]!==m[v]){var b=`
|
|
13
|
+
`+i[d].replace(" at new "," at ");return e.displayName&&b.includes("<anonymous>")&&(b=b.replace("<anonymous>",e.displayName)),typeof e=="function"&&Y.set(e,b),b}while(d>=1&&v>=0);break}}}finally{K=!1,G.current=c,rr(),Error.prepareStackTrace=s}var A=e?e.displayName||e.name:"",ke=A?W(A):"";return typeof e=="function"&&Y.set(e,ke),ke}function nr(e,r,n){return pe(e,!1)}function or(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function N(e,r,n){if(e==null)return"";if(typeof e=="function")return pe(e,or(e));if(typeof e=="string")return W(e);switch(e){case k:return W("Suspense");case y:return W("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case h:return nr(e.render);case R:return N(e.type,r,n);case C:{var o=e,s=o._payload,c=o._init;try{return N(c(s),r,n)}catch{}}}return""}var U=Object.prototype.hasOwnProperty,me={},ye=j.ReactDebugCurrentFrame;function V(e){if(e){var r=e._owner,n=N(e.type,e._source,r?r.type:null);ye.setExtraStackFrame(n)}else ye.setExtraStackFrame(null)}function ar(e,r,n,o,s){{var c=Function.call.bind(U);for(var u in e)if(c(e,u)){var i=void 0;try{if(typeof e[u]!="function"){var m=Error((o||"React class")+": "+n+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}i=e[u](r,u,o,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(d){i=d}i&&!(i instanceof Error)&&(V(s),p("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",o||"React class",n,u,typeof i),V(null)),i instanceof Error&&!(i.message in me)&&(me[i.message]=!0,V(s),p("Failed %s type: %s",n,i.message),V(null))}}}var ir=Array.isArray;function X(e){return ir(e)}function ur(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,n=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n}}function lr(e){try{return be(e),!1}catch{return!0}}function be(e){return""+e}function Ee(e){if(lr(e))return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ur(e)),be(e)}var B=j.ReactCurrentOwner,sr={key:!0,ref:!0,__self:!0,__source:!0},Re,Te,Z;Z={};function cr(e){if(U.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function fr(e){if(U.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function dr(e,r){if(typeof e.ref=="string"&&B.current&&r&&B.current.stateNode!==r){var n=T(B.current.type);Z[n]||(p('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',T(B.current.type),e.ref),Z[n]=!0)}}function vr(e,r){{var n=function(){Re||(Re=!0,p("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}}function gr(e,r){{var n=function(){Te||(Te=!0,p("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}}var hr=function(e,r,n,o,s,c,u){var i={$$typeof:l,type:e,key:r,ref:n,props:u,_owner:c};return i._store={},Object.defineProperty(i._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(i,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(i,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(i.props),Object.freeze(i)),i};function pr(e,r,n,o,s){{var c,u={},i=null,m=null;n!==void 0&&(Ee(n),i=""+n),fr(r)&&(Ee(r.key),i=""+r.key),cr(r)&&(m=r.ref,dr(r,s));for(c in r)U.call(r,c)&&!sr.hasOwnProperty(c)&&(u[c]=r[c]);if(e&&e.defaultProps){var d=e.defaultProps;for(c in d)u[c]===void 0&&(u[c]=d[c])}if(i||m){var v=typeof e=="function"?e.displayName||e.name||"Unknown":e;i&&vr(u,v),m&&gr(u,v)}return hr(e,i,m,s,o,B.current,u)}}var Q=j.ReactCurrentOwner,_e=j.ReactDebugCurrentFrame;function x(e){if(e){var r=e._owner,n=N(e.type,e._source,r?r.type:null);_e.setExtraStackFrame(n)}else _e.setExtraStackFrame(null)}var ee;ee=!1;function re(e){return typeof e=="object"&&e!==null&&e.$$typeof===l}function we(){{if(Q.current){var e=T(Q.current.type);if(e)return`
|
|
14
14
|
|
|
15
|
-
Check the render method of \``+e+"`."}return""}}function mr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),
|
|
15
|
+
Check the render method of \``+e+"`."}return""}}function mr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),n=e.lineNumber;return`
|
|
16
16
|
|
|
17
|
-
Check your code at `+r+":"+
|
|
17
|
+
Check your code at `+r+":"+n+"."}return""}}var Pe={};function yr(e){{var r=we();if(!r){var n=typeof e=="string"?e:e.displayName||e.name;n&&(r=`
|
|
18
18
|
|
|
19
|
-
Check the top-level render call using <`+
|
|
19
|
+
Check the top-level render call using <`+n+">.")}return r}}function Se(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var n=yr(r);if(Pe[n])return;Pe[n]=!0;var o="";e&&e._owner&&e._owner!==Q.current&&(o=" It was passed a child from "+T(e._owner.type)+"."),x(e),p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,o),x(null)}}function Ce(e,r){{if(typeof e!="object")return;if(X(e))for(var n=0;n<e.length;n++){var o=e[n];re(o)&&Se(o,r)}else if(re(e))e._store&&(e._store.validated=!0);else if(e){var s=ze(e);if(typeof s=="function"&&s!==e.entries)for(var c=s.call(e),u;!(u=c.next()).done;)re(u.value)&&Se(u.value,r)}}}function br(e){{var r=e.type;if(r==null||typeof r=="string")return;var n;if(typeof r=="function")n=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===h||r.$$typeof===R))n=r.propTypes;else return;if(n){var o=T(r);ar(n,e.props,"prop",o,e)}else if(r.PropTypes!==void 0&&!ee){ee=!0;var s=T(r);p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",s||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Er(e){{for(var r=Object.keys(e.props),n=0;n<r.length;n++){var o=r[n];if(o!=="children"&&o!=="key"){x(e),p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",o),x(null);break}}e.ref!==null&&(x(e),p("Invalid attribute `ref` supplied to `React.Fragment`."),x(null))}}function Oe(e,r,n,o,s,c){{var u=Ze(e);if(!u){var i="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(i+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var m=mr(s);m?i+=m:i+=we();var d;e===null?d="null":X(e)?d="array":e!==void 0&&e.$$typeof===l?(d="<"+(T(e.type)||"Unknown")+" />",i=" Did you accidentally export a JSX literal instead of a component?"):d=typeof e,p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",d,i)}var v=pr(e,r,n,s,c);if(v==null)return v;if(u){var b=r.children;if(b!==void 0)if(o)if(X(b)){for(var A=0;A<b.length;A++)Ce(b[A],e);Object.freeze&&Object.freeze(b)}else p("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ce(b,e)}return e===a?Er(v):br(v),v}}function Rr(e,r,n){return Oe(e,r,n,!0)}function Tr(e,r,n){return Oe(e,r,n,!1)}var _r=Tr,wr=Rr;D.Fragment=a,D.jsx=_r,D.jsxs=wr}()),D}var F={};/**
|
|
20
20
|
* @license React
|
|
21
21
|
* react-jsx-runtime.production.min.js
|
|
22
22
|
*
|
|
@@ -24,4 +24,4 @@ Check the top-level render call using <`+t+">.")}return r}}function Se(e,r){{if(
|
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the MIT license found in the
|
|
26
26
|
* LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/var ne;function xe(){if(ne)return F;ne=1;var
|
|
27
|
+
*/var ne;function xe(){if(ne)return F;ne=1;var t=P,l=Symbol.for("react.element"),g=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,f=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,E={key:!0,ref:!0,__self:!0,__source:!0};function I(S,h,k){var y,R={},C=null,L=null;k!==void 0&&(C=""+k),h.key!==void 0&&(C=""+h.key),h.ref!==void 0&&(L=h.ref);for(y in h)a.call(h,y)&&!E.hasOwnProperty(y)&&(R[y]=h[y]);if(S&&S.defaultProps)for(y in h=S.defaultProps,h)R[y]===void 0&&(R[y]=h[y]);return{$$typeof:l,type:S,key:C,ref:L,props:R,_owner:f.current}}return F.Fragment=g,F.jsx=I,F.jsxs=I,F}process.env.NODE_ENV==="production"?$.exports=xe():$.exports=je();var Ae=$.exports;function De(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Fe=function(t,l,g){var a=document.head||document.getElementsByTagName("head")[0],f=document.createElement("script");typeof l=="function"&&(g=l,l={}),l=l||{},g=g||function(){},f.type=l.type||"text/javascript",f.charset=l.charset||"utf8",f.async="async"in l?!!l.async:!0,f.src=t,l.attrs&&Ie(f,l.attrs),l.text&&(f.text=""+l.text);var E="onload"in f?oe:Me;E(f,g),f.onload||oe(f,g),a.appendChild(f)};function Ie(t,l){for(var g in l)t.setAttribute(g,l[g])}function oe(t,l){t.onload=function(){this.onerror=this.onload=null,l(null,t)},t.onerror=function(){this.onerror=this.onload=null,l(new Error("Failed to load "+this.src),t)}}function Me(t,l){t.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,l(null,t))}}const Be=De(Fe),Le="https://d5aoblv5p04cg.cloudfront.net/editor-3/loader/build.js",We="https://d5aoblv5p04cg.cloudfront.net/develop/loader/build.js",Ye="https://d5aoblv5p04cg.cloudfront.net/staging/loader/build.js";function Ne(t="production"){switch(t){case"dev":return We;case"staging":return Ye;default:return Le}}const z={init:(t,l)=>new Promise((g,a)=>{const f=Ne(l==null?void 0:l.stage);Be(f,E=>{E!==null&&a(E),window.TopolPlugin.init(t),g(!0)})}),save:()=>{window.TopolPlugin.save()},load:t=>{window.TopolPlugin.load(t)},togglePreview:()=>{window.TopolPlugin.togglePreview()},togglePreviewSize:()=>{window.TopolPlugin.togglePreviewSize()},chooseFile:t=>{window.TopolPlugin.chooseFile(t)},undo:()=>{window.TopolPlugin.undo()},redo:()=>{window.TopolPlugin.redo()},setSavedBlocks:t=>{window.TopolPlugin.setSavedBlocks(t)},createNotification:t=>{window.TopolPlugin.createNotification(t)},changeEmailToMobile:()=>{window.TopolPlugin.changeEmailToMobile()},changeEmailToDesktop:()=>{window.TopolPlugin.changeEmailToDesktop()},toggleBlocksAndStructuresVisibility:()=>{window.TopolPlugin.toggleBlocksAndStructuresVisibility()},destroy:()=>{window.TopolPlugin.destroy()},setPreviewHTML:t=>{window.TopolPlugin.setPreviewHTML(t)},setActiveMembers:t=>{window.TopolPlugin.setActiveMembers(t)},updateCustomBlockContent:t=>{window.TopolPlugin.updateCustomBlockContent(t)}},Ue="editor";let J=!1,q=!1;function Ve(t){const l=()=>{const g={onSave(a,f){t.onSave!==void 0&&t.onSave(a,f)},onSaveAndClose(a,f){t.onSaveAndClose!==void 0&&t.onSaveAndClose(a,f)},onTestSend(a,f,E){t.onTestSend!==void 0&&t.onTestSend(a,f,E)},onOpenFileManager(){t.onOpenFileManager!==void 0&&t.onOpenFileManager()},onLoaded(){t.onLoaded!==void 0&&t.onLoaded()},onBlockSave(a){t.onBlockSave!==void 0&&t.onBlockSave(a)},onBlockRemove(a){t.onBlockRemove!==void 0&&t.onBlockRemove(a)},onBlockEdit(a){t.onBlockEdit!==void 0&&t.onBlockEdit(a)},onInit(){t.onInit!==void 0&&t.onInit(),J=!1,q=!0},onUndoChange(a){t.onUndoChange!==void 0&&t.onUndoChange(a)},onRedoChange(a){t.onRedoChange!==void 0&&t.onRedoChange(a)},onPreview(a){t.onPreview!==void 0&&t.onPreview(a)},onAlert(a){t.onAlert!==void 0&&t.onAlert(a)},onOpenCustomBlockDialog(a){t.onOpenCustomBlockDialog!==void 0&&t.onOpenCustomBlockDialog(a)},onTemplateRename(a){t.onTemplateRename!==void 0&&t.onTemplateRename(a)},updateTestingEmailAddresses(a){t.updateTestingEmailAddresses!==void 0&&t.updateTestingEmailAddresses(a)}};return{id:"#"+Ue,...t.options,callbacks:{...g}}};return P.useEffect(()=>(J||(async()=>{J=!0;const a=l();await z.init(a,{stage:t.stage||"production"})})(),()=>{q&&(z.destroy(),q=!1)}),[]),Ae.jsx("div",{id:"editor",style:{position:"absolute",height:"100vh",width:"100%"}})}w.TopolPlugin=z,w.default=Ve,Object.defineProperties(w,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -17,6 +17,8 @@ type TopolEditorProps = {
|
|
|
17
17
|
onPreview?(html: unknown): void;
|
|
18
18
|
onAlert?(notification: INotification): void;
|
|
19
19
|
onOpenCustomBlockDialog?(blockContent: unknown): void;
|
|
20
|
+
onTemplateRename?(title: string): void;
|
|
21
|
+
updateTestingEmailAddresses?(emails: string[]): void;
|
|
20
22
|
};
|
|
21
23
|
export default function TopolEditor(props: TopolEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
22
24
|
export type { IReactTopolOptions, INotification, ISavedBlock };
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"email-react",
|
|
12
12
|
"email templates"
|
|
13
13
|
],
|
|
14
|
-
"version": "0.0.
|
|
14
|
+
"version": "0.0.4",
|
|
15
15
|
"author": "Topol.io",
|
|
16
16
|
"homepage": "https://topol.io",
|
|
17
17
|
"license": "Apache-2.0",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@topol.io/editor": "0.0.
|
|
33
|
+
"@topol.io/editor": "0.0.4"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/node": "^20.7.0",
|