@nuwatop/code-canvas-runtime 0.1.0
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/LICENSE +21 -0
- package/dist/RunCommonUtils.d.ts +13 -0
- package/dist/Running.d.ts +10 -0
- package/dist/UIUtils.d.ts +83 -0
- package/dist/index.cjs.js +31 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.esm.js +1462 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/run/ActionExecutor.d.ts +27 -0
- package/dist/run/ComponentRegistry.d.ts +24 -0
- package/dist/run/DynamicContainer.d.ts +52 -0
- package/dist/run/RuntimeRenderer.d.ts +23 -0
- package/dist/run/configParser.d.ts +39 -0
- package/dist/run/useRuntimeStore.d.ts +19 -0
- package/package.json +51 -0
|
@@ -0,0 +1,1462 @@
|
|
|
1
|
+
var et = Object.defineProperty;
|
|
2
|
+
var rt = (r, t, o) => t in r ? et(r, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : r[t] = o;
|
|
3
|
+
var we = (r, t, o) => rt(r, typeof t != "symbol" ? t + "" : t, o);
|
|
4
|
+
import * as tt from "@nuwatop/code-canvas-core";
|
|
5
|
+
import { useAndStore as F, parseAction as nt, getCoreConfig as B, useStoreByName as ot } from "@nuwatop/code-canvas-core";
|
|
6
|
+
export * from "@nuwatop/code-canvas-core";
|
|
7
|
+
import Y, { useState as tr, useEffect as at, useMemo as re, Suspense as je } from "react";
|
|
8
|
+
import { Spin as Pe, ConfigProvider as sr, message as it, Drawer as st, Modal as lt } from "antd";
|
|
9
|
+
import { create as ut } from "zustand";
|
|
10
|
+
import { produce as ct } from "immer";
|
|
11
|
+
import ft from "react-dom";
|
|
12
|
+
function dt(r) {
|
|
13
|
+
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
14
|
+
}
|
|
15
|
+
var Re = { exports: {} }, V = {};
|
|
16
|
+
/**
|
|
17
|
+
* @license React
|
|
18
|
+
* react-jsx-runtime.production.min.js
|
|
19
|
+
*
|
|
20
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
21
|
+
*
|
|
22
|
+
* This source code is licensed under the MIT license found in the
|
|
23
|
+
* LICENSE file in the root directory of this source tree.
|
|
24
|
+
*/
|
|
25
|
+
var nr;
|
|
26
|
+
function pt() {
|
|
27
|
+
if (nr) return V;
|
|
28
|
+
nr = 1;
|
|
29
|
+
var r = Y, t = Symbol.for("react.element"), o = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, l = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
30
|
+
function u(v, f, x) {
|
|
31
|
+
var b, E = {}, m = null, w = null;
|
|
32
|
+
x !== void 0 && (m = "" + x), f.key !== void 0 && (m = "" + f.key), f.ref !== void 0 && (w = f.ref);
|
|
33
|
+
for (b in f) i.call(f, b) && !s.hasOwnProperty(b) && (E[b] = f[b]);
|
|
34
|
+
if (v && v.defaultProps) for (b in f = v.defaultProps, f) E[b] === void 0 && (E[b] = f[b]);
|
|
35
|
+
return { $$typeof: t, type: v, key: m, ref: w, props: E, _owner: l.current };
|
|
36
|
+
}
|
|
37
|
+
return V.Fragment = o, V.jsx = u, V.jsxs = u, V;
|
|
38
|
+
}
|
|
39
|
+
var q = {};
|
|
40
|
+
/**
|
|
41
|
+
* @license React
|
|
42
|
+
* react-jsx-runtime.development.js
|
|
43
|
+
*
|
|
44
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
45
|
+
*
|
|
46
|
+
* This source code is licensed under the MIT license found in the
|
|
47
|
+
* LICENSE file in the root directory of this source tree.
|
|
48
|
+
*/
|
|
49
|
+
var or;
|
|
50
|
+
function vt() {
|
|
51
|
+
return or || (or = 1, process.env.NODE_ENV !== "production" && function() {
|
|
52
|
+
var r = Y, t = Symbol.for("react.element"), o = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), l = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), v = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), x = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), w = Symbol.for("react.offscreen"), k = Symbol.iterator, A = "@@iterator";
|
|
53
|
+
function de(e) {
|
|
54
|
+
if (e === null || typeof e != "object")
|
|
55
|
+
return null;
|
|
56
|
+
var n = k && e[k] || e[A];
|
|
57
|
+
return typeof n == "function" ? n : null;
|
|
58
|
+
}
|
|
59
|
+
var D = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
60
|
+
function R(e) {
|
|
61
|
+
{
|
|
62
|
+
for (var n = arguments.length, a = new Array(n > 1 ? n - 1 : 0), c = 1; c < n; c++)
|
|
63
|
+
a[c - 1] = arguments[c];
|
|
64
|
+
pe("error", e, a);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function pe(e, n, a) {
|
|
68
|
+
{
|
|
69
|
+
var c = D.ReactDebugCurrentFrame, h = c.getStackAddendum();
|
|
70
|
+
h !== "" && (n += "%s", a = a.concat([h]));
|
|
71
|
+
var g = a.map(function(p) {
|
|
72
|
+
return String(p);
|
|
73
|
+
});
|
|
74
|
+
g.unshift("Warning: " + n), Function.prototype.apply.call(console[e], console, g);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
var _r = !1, xr = !1, Cr = !1, wr = !1, Rr = !1, ke;
|
|
78
|
+
ke = Symbol.for("react.module.reference");
|
|
79
|
+
function Er(e) {
|
|
80
|
+
return !!(typeof e == "string" || typeof e == "function" || e === i || e === s || Rr || e === l || e === x || e === b || wr || e === w || _r || xr || Cr || typeof e == "object" && e !== null && (e.$$typeof === m || e.$$typeof === E || e.$$typeof === u || e.$$typeof === v || e.$$typeof === f || // This needs to include all possible module reference object
|
|
81
|
+
// types supported by any Flight configuration anywhere since
|
|
82
|
+
// we don't know which Flight build this will end up being used
|
|
83
|
+
// with.
|
|
84
|
+
e.$$typeof === ke || e.getModuleId !== void 0));
|
|
85
|
+
}
|
|
86
|
+
function jr(e, n, a) {
|
|
87
|
+
var c = e.displayName;
|
|
88
|
+
if (c)
|
|
89
|
+
return c;
|
|
90
|
+
var h = n.displayName || n.name || "";
|
|
91
|
+
return h !== "" ? a + "(" + h + ")" : a;
|
|
92
|
+
}
|
|
93
|
+
function De(e) {
|
|
94
|
+
return e.displayName || "Context";
|
|
95
|
+
}
|
|
96
|
+
function $(e) {
|
|
97
|
+
if (e == null)
|
|
98
|
+
return null;
|
|
99
|
+
if (typeof e.tag == "number" && R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
100
|
+
return e.displayName || e.name || null;
|
|
101
|
+
if (typeof e == "string")
|
|
102
|
+
return e;
|
|
103
|
+
switch (e) {
|
|
104
|
+
case i:
|
|
105
|
+
return "Fragment";
|
|
106
|
+
case o:
|
|
107
|
+
return "Portal";
|
|
108
|
+
case s:
|
|
109
|
+
return "Profiler";
|
|
110
|
+
case l:
|
|
111
|
+
return "StrictMode";
|
|
112
|
+
case x:
|
|
113
|
+
return "Suspense";
|
|
114
|
+
case b:
|
|
115
|
+
return "SuspenseList";
|
|
116
|
+
}
|
|
117
|
+
if (typeof e == "object")
|
|
118
|
+
switch (e.$$typeof) {
|
|
119
|
+
case v:
|
|
120
|
+
var n = e;
|
|
121
|
+
return De(n) + ".Consumer";
|
|
122
|
+
case u:
|
|
123
|
+
var a = e;
|
|
124
|
+
return De(a._context) + ".Provider";
|
|
125
|
+
case f:
|
|
126
|
+
return jr(e, e.render, "ForwardRef");
|
|
127
|
+
case E:
|
|
128
|
+
var c = e.displayName || null;
|
|
129
|
+
return c !== null ? c : $(e.type) || "Memo";
|
|
130
|
+
case m: {
|
|
131
|
+
var h = e, g = h._payload, p = h._init;
|
|
132
|
+
try {
|
|
133
|
+
return $(p(g));
|
|
134
|
+
} catch {
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
var M = Object.assign, W = 0, Ae, Me, Ne, Fe, Ie, Le, Ye;
|
|
142
|
+
function We() {
|
|
143
|
+
}
|
|
144
|
+
We.__reactDisabledLog = !0;
|
|
145
|
+
function Pr() {
|
|
146
|
+
{
|
|
147
|
+
if (W === 0) {
|
|
148
|
+
Ae = console.log, Me = console.info, Ne = console.warn, Fe = console.error, Ie = console.group, Le = console.groupCollapsed, Ye = console.groupEnd;
|
|
149
|
+
var e = {
|
|
150
|
+
configurable: !0,
|
|
151
|
+
enumerable: !0,
|
|
152
|
+
value: We,
|
|
153
|
+
writable: !0
|
|
154
|
+
};
|
|
155
|
+
Object.defineProperties(console, {
|
|
156
|
+
info: e,
|
|
157
|
+
log: e,
|
|
158
|
+
warn: e,
|
|
159
|
+
error: e,
|
|
160
|
+
group: e,
|
|
161
|
+
groupCollapsed: e,
|
|
162
|
+
groupEnd: e
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
W++;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
function Sr() {
|
|
169
|
+
{
|
|
170
|
+
if (W--, W === 0) {
|
|
171
|
+
var e = {
|
|
172
|
+
configurable: !0,
|
|
173
|
+
enumerable: !0,
|
|
174
|
+
writable: !0
|
|
175
|
+
};
|
|
176
|
+
Object.defineProperties(console, {
|
|
177
|
+
log: M({}, e, {
|
|
178
|
+
value: Ae
|
|
179
|
+
}),
|
|
180
|
+
info: M({}, e, {
|
|
181
|
+
value: Me
|
|
182
|
+
}),
|
|
183
|
+
warn: M({}, e, {
|
|
184
|
+
value: Ne
|
|
185
|
+
}),
|
|
186
|
+
error: M({}, e, {
|
|
187
|
+
value: Fe
|
|
188
|
+
}),
|
|
189
|
+
group: M({}, e, {
|
|
190
|
+
value: Ie
|
|
191
|
+
}),
|
|
192
|
+
groupCollapsed: M({}, e, {
|
|
193
|
+
value: Le
|
|
194
|
+
}),
|
|
195
|
+
groupEnd: M({}, e, {
|
|
196
|
+
value: Ye
|
|
197
|
+
})
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
W < 0 && R("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
var ve = D.ReactCurrentDispatcher, me;
|
|
204
|
+
function G(e, n, a) {
|
|
205
|
+
{
|
|
206
|
+
if (me === void 0)
|
|
207
|
+
try {
|
|
208
|
+
throw Error();
|
|
209
|
+
} catch (h) {
|
|
210
|
+
var c = h.stack.trim().match(/\n( *(at )?)/);
|
|
211
|
+
me = c && c[1] || "";
|
|
212
|
+
}
|
|
213
|
+
return `
|
|
214
|
+
` + me + e;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
var ye = !1, X;
|
|
218
|
+
{
|
|
219
|
+
var Or = typeof WeakMap == "function" ? WeakMap : Map;
|
|
220
|
+
X = new Or();
|
|
221
|
+
}
|
|
222
|
+
function Ue(e, n) {
|
|
223
|
+
if (!e || ye)
|
|
224
|
+
return "";
|
|
225
|
+
{
|
|
226
|
+
var a = X.get(e);
|
|
227
|
+
if (a !== void 0)
|
|
228
|
+
return a;
|
|
229
|
+
}
|
|
230
|
+
var c;
|
|
231
|
+
ye = !0;
|
|
232
|
+
var h = Error.prepareStackTrace;
|
|
233
|
+
Error.prepareStackTrace = void 0;
|
|
234
|
+
var g;
|
|
235
|
+
g = ve.current, ve.current = null, Pr();
|
|
236
|
+
try {
|
|
237
|
+
if (n) {
|
|
238
|
+
var p = function() {
|
|
239
|
+
throw Error();
|
|
240
|
+
};
|
|
241
|
+
if (Object.defineProperty(p.prototype, "props", {
|
|
242
|
+
set: function() {
|
|
243
|
+
throw Error();
|
|
244
|
+
}
|
|
245
|
+
}), typeof Reflect == "object" && Reflect.construct) {
|
|
246
|
+
try {
|
|
247
|
+
Reflect.construct(p, []);
|
|
248
|
+
} catch (P) {
|
|
249
|
+
c = P;
|
|
250
|
+
}
|
|
251
|
+
Reflect.construct(e, [], p);
|
|
252
|
+
} else {
|
|
253
|
+
try {
|
|
254
|
+
p.call();
|
|
255
|
+
} catch (P) {
|
|
256
|
+
c = P;
|
|
257
|
+
}
|
|
258
|
+
e.call(p.prototype);
|
|
259
|
+
}
|
|
260
|
+
} else {
|
|
261
|
+
try {
|
|
262
|
+
throw Error();
|
|
263
|
+
} catch (P) {
|
|
264
|
+
c = P;
|
|
265
|
+
}
|
|
266
|
+
e();
|
|
267
|
+
}
|
|
268
|
+
} catch (P) {
|
|
269
|
+
if (P && c && typeof P.stack == "string") {
|
|
270
|
+
for (var d = P.stack.split(`
|
|
271
|
+
`), j = c.stack.split(`
|
|
272
|
+
`), _ = d.length - 1, C = j.length - 1; _ >= 1 && C >= 0 && d[_] !== j[C]; )
|
|
273
|
+
C--;
|
|
274
|
+
for (; _ >= 1 && C >= 0; _--, C--)
|
|
275
|
+
if (d[_] !== j[C]) {
|
|
276
|
+
if (_ !== 1 || C !== 1)
|
|
277
|
+
do
|
|
278
|
+
if (_--, C--, C < 0 || d[_] !== j[C]) {
|
|
279
|
+
var O = `
|
|
280
|
+
` + d[_].replace(" at new ", " at ");
|
|
281
|
+
return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" && X.set(e, O), O;
|
|
282
|
+
}
|
|
283
|
+
while (_ >= 1 && C >= 0);
|
|
284
|
+
break;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
} finally {
|
|
288
|
+
ye = !1, ve.current = g, Sr(), Error.prepareStackTrace = h;
|
|
289
|
+
}
|
|
290
|
+
var L = e ? e.displayName || e.name : "", N = L ? G(L) : "";
|
|
291
|
+
return typeof e == "function" && X.set(e, N), N;
|
|
292
|
+
}
|
|
293
|
+
function Tr(e, n, a) {
|
|
294
|
+
return Ue(e, !1);
|
|
295
|
+
}
|
|
296
|
+
function $r(e) {
|
|
297
|
+
var n = e.prototype;
|
|
298
|
+
return !!(n && n.isReactComponent);
|
|
299
|
+
}
|
|
300
|
+
function Q(e, n, a) {
|
|
301
|
+
if (e == null)
|
|
302
|
+
return "";
|
|
303
|
+
if (typeof e == "function")
|
|
304
|
+
return Ue(e, $r(e));
|
|
305
|
+
if (typeof e == "string")
|
|
306
|
+
return G(e);
|
|
307
|
+
switch (e) {
|
|
308
|
+
case x:
|
|
309
|
+
return G("Suspense");
|
|
310
|
+
case b:
|
|
311
|
+
return G("SuspenseList");
|
|
312
|
+
}
|
|
313
|
+
if (typeof e == "object")
|
|
314
|
+
switch (e.$$typeof) {
|
|
315
|
+
case f:
|
|
316
|
+
return Tr(e.render);
|
|
317
|
+
case E:
|
|
318
|
+
return Q(e.type, n, a);
|
|
319
|
+
case m: {
|
|
320
|
+
var c = e, h = c._payload, g = c._init;
|
|
321
|
+
try {
|
|
322
|
+
return Q(g(h), n, a);
|
|
323
|
+
} catch {
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
return "";
|
|
328
|
+
}
|
|
329
|
+
var U = Object.prototype.hasOwnProperty, ze = {}, Ve = D.ReactDebugCurrentFrame;
|
|
330
|
+
function Z(e) {
|
|
331
|
+
if (e) {
|
|
332
|
+
var n = e._owner, a = Q(e.type, e._source, n ? n.type : null);
|
|
333
|
+
Ve.setExtraStackFrame(a);
|
|
334
|
+
} else
|
|
335
|
+
Ve.setExtraStackFrame(null);
|
|
336
|
+
}
|
|
337
|
+
function kr(e, n, a, c, h) {
|
|
338
|
+
{
|
|
339
|
+
var g = Function.call.bind(U);
|
|
340
|
+
for (var p in e)
|
|
341
|
+
if (g(e, p)) {
|
|
342
|
+
var d = void 0;
|
|
343
|
+
try {
|
|
344
|
+
if (typeof e[p] != "function") {
|
|
345
|
+
var j = Error((c || "React class") + ": " + a + " type `" + p + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[p] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
346
|
+
throw j.name = "Invariant Violation", j;
|
|
347
|
+
}
|
|
348
|
+
d = e[p](n, p, c, a, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
349
|
+
} catch (_) {
|
|
350
|
+
d = _;
|
|
351
|
+
}
|
|
352
|
+
d && !(d instanceof Error) && (Z(h), R("%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).", c || "React class", a, p, typeof d), Z(null)), d instanceof Error && !(d.message in ze) && (ze[d.message] = !0, Z(h), R("Failed %s type: %s", a, d.message), Z(null));
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
var Dr = Array.isArray;
|
|
357
|
+
function he(e) {
|
|
358
|
+
return Dr(e);
|
|
359
|
+
}
|
|
360
|
+
function Ar(e) {
|
|
361
|
+
{
|
|
362
|
+
var n = typeof Symbol == "function" && Symbol.toStringTag, a = n && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
363
|
+
return a;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
function Mr(e) {
|
|
367
|
+
try {
|
|
368
|
+
return qe(e), !1;
|
|
369
|
+
} catch {
|
|
370
|
+
return !0;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
function qe(e) {
|
|
374
|
+
return "" + e;
|
|
375
|
+
}
|
|
376
|
+
function Be(e) {
|
|
377
|
+
if (Mr(e))
|
|
378
|
+
return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ar(e)), qe(e);
|
|
379
|
+
}
|
|
380
|
+
var z = D.ReactCurrentOwner, Nr = {
|
|
381
|
+
key: !0,
|
|
382
|
+
ref: !0,
|
|
383
|
+
__self: !0,
|
|
384
|
+
__source: !0
|
|
385
|
+
}, Je, He, ge;
|
|
386
|
+
ge = {};
|
|
387
|
+
function Fr(e) {
|
|
388
|
+
if (U.call(e, "ref")) {
|
|
389
|
+
var n = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
390
|
+
if (n && n.isReactWarning)
|
|
391
|
+
return !1;
|
|
392
|
+
}
|
|
393
|
+
return e.ref !== void 0;
|
|
394
|
+
}
|
|
395
|
+
function Ir(e) {
|
|
396
|
+
if (U.call(e, "key")) {
|
|
397
|
+
var n = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
398
|
+
if (n && n.isReactWarning)
|
|
399
|
+
return !1;
|
|
400
|
+
}
|
|
401
|
+
return e.key !== void 0;
|
|
402
|
+
}
|
|
403
|
+
function Lr(e, n) {
|
|
404
|
+
if (typeof e.ref == "string" && z.current && n && z.current.stateNode !== n) {
|
|
405
|
+
var a = $(z.current.type);
|
|
406
|
+
ge[a] || (R('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', $(z.current.type), e.ref), ge[a] = !0);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
function Yr(e, n) {
|
|
410
|
+
{
|
|
411
|
+
var a = function() {
|
|
412
|
+
Je || (Je = !0, R("%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)", n));
|
|
413
|
+
};
|
|
414
|
+
a.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
415
|
+
get: a,
|
|
416
|
+
configurable: !0
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
function Wr(e, n) {
|
|
421
|
+
{
|
|
422
|
+
var a = function() {
|
|
423
|
+
He || (He = !0, R("%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)", n));
|
|
424
|
+
};
|
|
425
|
+
a.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
426
|
+
get: a,
|
|
427
|
+
configurable: !0
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
var Ur = function(e, n, a, c, h, g, p) {
|
|
432
|
+
var d = {
|
|
433
|
+
// This tag allows us to uniquely identify this as a React Element
|
|
434
|
+
$$typeof: t,
|
|
435
|
+
// Built-in properties that belong on the element
|
|
436
|
+
type: e,
|
|
437
|
+
key: n,
|
|
438
|
+
ref: a,
|
|
439
|
+
props: p,
|
|
440
|
+
// Record the component responsible for creating this element.
|
|
441
|
+
_owner: g
|
|
442
|
+
};
|
|
443
|
+
return d._store = {}, Object.defineProperty(d._store, "validated", {
|
|
444
|
+
configurable: !1,
|
|
445
|
+
enumerable: !1,
|
|
446
|
+
writable: !0,
|
|
447
|
+
value: !1
|
|
448
|
+
}), Object.defineProperty(d, "_self", {
|
|
449
|
+
configurable: !1,
|
|
450
|
+
enumerable: !1,
|
|
451
|
+
writable: !1,
|
|
452
|
+
value: c
|
|
453
|
+
}), Object.defineProperty(d, "_source", {
|
|
454
|
+
configurable: !1,
|
|
455
|
+
enumerable: !1,
|
|
456
|
+
writable: !1,
|
|
457
|
+
value: h
|
|
458
|
+
}), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d;
|
|
459
|
+
};
|
|
460
|
+
function zr(e, n, a, c, h) {
|
|
461
|
+
{
|
|
462
|
+
var g, p = {}, d = null, j = null;
|
|
463
|
+
a !== void 0 && (Be(a), d = "" + a), Ir(n) && (Be(n.key), d = "" + n.key), Fr(n) && (j = n.ref, Lr(n, h));
|
|
464
|
+
for (g in n)
|
|
465
|
+
U.call(n, g) && !Nr.hasOwnProperty(g) && (p[g] = n[g]);
|
|
466
|
+
if (e && e.defaultProps) {
|
|
467
|
+
var _ = e.defaultProps;
|
|
468
|
+
for (g in _)
|
|
469
|
+
p[g] === void 0 && (p[g] = _[g]);
|
|
470
|
+
}
|
|
471
|
+
if (d || j) {
|
|
472
|
+
var C = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
473
|
+
d && Yr(p, C), j && Wr(p, C);
|
|
474
|
+
}
|
|
475
|
+
return Ur(e, d, j, h, c, z.current, p);
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
var be = D.ReactCurrentOwner, Ke = D.ReactDebugCurrentFrame;
|
|
479
|
+
function I(e) {
|
|
480
|
+
if (e) {
|
|
481
|
+
var n = e._owner, a = Q(e.type, e._source, n ? n.type : null);
|
|
482
|
+
Ke.setExtraStackFrame(a);
|
|
483
|
+
} else
|
|
484
|
+
Ke.setExtraStackFrame(null);
|
|
485
|
+
}
|
|
486
|
+
var _e;
|
|
487
|
+
_e = !1;
|
|
488
|
+
function xe(e) {
|
|
489
|
+
return typeof e == "object" && e !== null && e.$$typeof === t;
|
|
490
|
+
}
|
|
491
|
+
function Ge() {
|
|
492
|
+
{
|
|
493
|
+
if (be.current) {
|
|
494
|
+
var e = $(be.current.type);
|
|
495
|
+
if (e)
|
|
496
|
+
return `
|
|
497
|
+
|
|
498
|
+
Check the render method of \`` + e + "`.";
|
|
499
|
+
}
|
|
500
|
+
return "";
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
function Vr(e) {
|
|
504
|
+
return "";
|
|
505
|
+
}
|
|
506
|
+
var Xe = {};
|
|
507
|
+
function qr(e) {
|
|
508
|
+
{
|
|
509
|
+
var n = Ge();
|
|
510
|
+
if (!n) {
|
|
511
|
+
var a = typeof e == "string" ? e : e.displayName || e.name;
|
|
512
|
+
a && (n = `
|
|
513
|
+
|
|
514
|
+
Check the top-level render call using <` + a + ">.");
|
|
515
|
+
}
|
|
516
|
+
return n;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
function Qe(e, n) {
|
|
520
|
+
{
|
|
521
|
+
if (!e._store || e._store.validated || e.key != null)
|
|
522
|
+
return;
|
|
523
|
+
e._store.validated = !0;
|
|
524
|
+
var a = qr(n);
|
|
525
|
+
if (Xe[a])
|
|
526
|
+
return;
|
|
527
|
+
Xe[a] = !0;
|
|
528
|
+
var c = "";
|
|
529
|
+
e && e._owner && e._owner !== be.current && (c = " It was passed a child from " + $(e._owner.type) + "."), I(e), R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', a, c), I(null);
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
function Ze(e, n) {
|
|
533
|
+
{
|
|
534
|
+
if (typeof e != "object")
|
|
535
|
+
return;
|
|
536
|
+
if (he(e))
|
|
537
|
+
for (var a = 0; a < e.length; a++) {
|
|
538
|
+
var c = e[a];
|
|
539
|
+
xe(c) && Qe(c, n);
|
|
540
|
+
}
|
|
541
|
+
else if (xe(e))
|
|
542
|
+
e._store && (e._store.validated = !0);
|
|
543
|
+
else if (e) {
|
|
544
|
+
var h = de(e);
|
|
545
|
+
if (typeof h == "function" && h !== e.entries)
|
|
546
|
+
for (var g = h.call(e), p; !(p = g.next()).done; )
|
|
547
|
+
xe(p.value) && Qe(p.value, n);
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
function Br(e) {
|
|
552
|
+
{
|
|
553
|
+
var n = e.type;
|
|
554
|
+
if (n == null || typeof n == "string")
|
|
555
|
+
return;
|
|
556
|
+
var a;
|
|
557
|
+
if (typeof n == "function")
|
|
558
|
+
a = n.propTypes;
|
|
559
|
+
else if (typeof n == "object" && (n.$$typeof === f || // Note: Memo only checks outer props here.
|
|
560
|
+
// Inner props are checked in the reconciler.
|
|
561
|
+
n.$$typeof === E))
|
|
562
|
+
a = n.propTypes;
|
|
563
|
+
else
|
|
564
|
+
return;
|
|
565
|
+
if (a) {
|
|
566
|
+
var c = $(n);
|
|
567
|
+
kr(a, e.props, "prop", c, e);
|
|
568
|
+
} else if (n.PropTypes !== void 0 && !_e) {
|
|
569
|
+
_e = !0;
|
|
570
|
+
var h = $(n);
|
|
571
|
+
R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", h || "Unknown");
|
|
572
|
+
}
|
|
573
|
+
typeof n.getDefaultProps == "function" && !n.getDefaultProps.isReactClassApproved && R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
function Jr(e) {
|
|
577
|
+
{
|
|
578
|
+
for (var n = Object.keys(e.props), a = 0; a < n.length; a++) {
|
|
579
|
+
var c = n[a];
|
|
580
|
+
if (c !== "children" && c !== "key") {
|
|
581
|
+
I(e), R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", c), I(null);
|
|
582
|
+
break;
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
e.ref !== null && (I(e), R("Invalid attribute `ref` supplied to `React.Fragment`."), I(null));
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
var er = {};
|
|
589
|
+
function rr(e, n, a, c, h, g) {
|
|
590
|
+
{
|
|
591
|
+
var p = Er(e);
|
|
592
|
+
if (!p) {
|
|
593
|
+
var d = "";
|
|
594
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (d += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
595
|
+
var j = Vr();
|
|
596
|
+
j ? d += j : d += Ge();
|
|
597
|
+
var _;
|
|
598
|
+
e === null ? _ = "null" : he(e) ? _ = "array" : e !== void 0 && e.$$typeof === t ? (_ = "<" + ($(e.type) || "Unknown") + " />", d = " Did you accidentally export a JSX literal instead of a component?") : _ = typeof e, R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", _, d);
|
|
599
|
+
}
|
|
600
|
+
var C = zr(e, n, a, h, g);
|
|
601
|
+
if (C == null)
|
|
602
|
+
return C;
|
|
603
|
+
if (p) {
|
|
604
|
+
var O = n.children;
|
|
605
|
+
if (O !== void 0)
|
|
606
|
+
if (c)
|
|
607
|
+
if (he(O)) {
|
|
608
|
+
for (var L = 0; L < O.length; L++)
|
|
609
|
+
Ze(O[L], e);
|
|
610
|
+
Object.freeze && Object.freeze(O);
|
|
611
|
+
} else
|
|
612
|
+
R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
613
|
+
else
|
|
614
|
+
Ze(O, e);
|
|
615
|
+
}
|
|
616
|
+
if (U.call(n, "key")) {
|
|
617
|
+
var N = $(e), P = Object.keys(n).filter(function(Zr) {
|
|
618
|
+
return Zr !== "key";
|
|
619
|
+
}), Ce = P.length > 0 ? "{key: someKey, " + P.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
620
|
+
if (!er[N + Ce]) {
|
|
621
|
+
var Qr = P.length > 0 ? "{" + P.join(": ..., ") + ": ...}" : "{}";
|
|
622
|
+
R(`A props object containing a "key" prop is being spread into JSX:
|
|
623
|
+
let props = %s;
|
|
624
|
+
<%s {...props} />
|
|
625
|
+
React keys must be passed directly to JSX without using spread:
|
|
626
|
+
let props = %s;
|
|
627
|
+
<%s key={someKey} {...props} />`, Ce, N, Qr, N), er[N + Ce] = !0;
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
return e === i ? Jr(C) : Br(C), C;
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
function Hr(e, n, a) {
|
|
634
|
+
return rr(e, n, a, !0);
|
|
635
|
+
}
|
|
636
|
+
function Kr(e, n, a) {
|
|
637
|
+
return rr(e, n, a, !1);
|
|
638
|
+
}
|
|
639
|
+
var Gr = Kr, Xr = Hr;
|
|
640
|
+
q.Fragment = i, q.jsx = Gr, q.jsxs = Xr;
|
|
641
|
+
}()), q;
|
|
642
|
+
}
|
|
643
|
+
process.env.NODE_ENV === "production" ? Re.exports = pt() : Re.exports = vt();
|
|
644
|
+
var y = Re.exports, ae = {}, lr = { exports: {} };
|
|
645
|
+
(function(r) {
|
|
646
|
+
function t(o) {
|
|
647
|
+
return o && o.__esModule ? o : {
|
|
648
|
+
default: o
|
|
649
|
+
};
|
|
650
|
+
}
|
|
651
|
+
r.exports = t, r.exports.__esModule = !0, r.exports.default = r.exports;
|
|
652
|
+
})(lr);
|
|
653
|
+
var ie = lr.exports, se = {};
|
|
654
|
+
Object.defineProperty(se, "__esModule", {
|
|
655
|
+
value: !0
|
|
656
|
+
});
|
|
657
|
+
se.default = void 0;
|
|
658
|
+
var mt = {
|
|
659
|
+
// Options
|
|
660
|
+
items_per_page: "条/页",
|
|
661
|
+
jump_to: "跳至",
|
|
662
|
+
jump_to_confirm: "确定",
|
|
663
|
+
page: "页",
|
|
664
|
+
// Pagination
|
|
665
|
+
prev_page: "上一页",
|
|
666
|
+
next_page: "下一页",
|
|
667
|
+
prev_5: "向前 5 页",
|
|
668
|
+
next_5: "向后 5 页",
|
|
669
|
+
prev_3: "向前 3 页",
|
|
670
|
+
next_3: "向后 3 页",
|
|
671
|
+
page_size: "页码"
|
|
672
|
+
};
|
|
673
|
+
se.default = mt;
|
|
674
|
+
var le = {}, J = {}, ue = {}, ur = { exports: {} }, cr = { exports: {} }, fr = { exports: {} }, dr = { exports: {} };
|
|
675
|
+
(function(r) {
|
|
676
|
+
function t(o) {
|
|
677
|
+
"@babel/helpers - typeof";
|
|
678
|
+
return r.exports = t = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(i) {
|
|
679
|
+
return typeof i;
|
|
680
|
+
} : function(i) {
|
|
681
|
+
return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i;
|
|
682
|
+
}, r.exports.__esModule = !0, r.exports.default = r.exports, t(o);
|
|
683
|
+
}
|
|
684
|
+
r.exports = t, r.exports.__esModule = !0, r.exports.default = r.exports;
|
|
685
|
+
})(dr);
|
|
686
|
+
var pr = dr.exports, vr = { exports: {} };
|
|
687
|
+
(function(r) {
|
|
688
|
+
var t = pr.default;
|
|
689
|
+
function o(i, l) {
|
|
690
|
+
if (t(i) != "object" || !i) return i;
|
|
691
|
+
var s = i[Symbol.toPrimitive];
|
|
692
|
+
if (s !== void 0) {
|
|
693
|
+
var u = s.call(i, l || "default");
|
|
694
|
+
if (t(u) != "object") return u;
|
|
695
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
696
|
+
}
|
|
697
|
+
return (l === "string" ? String : Number)(i);
|
|
698
|
+
}
|
|
699
|
+
r.exports = o, r.exports.__esModule = !0, r.exports.default = r.exports;
|
|
700
|
+
})(vr);
|
|
701
|
+
var yt = vr.exports;
|
|
702
|
+
(function(r) {
|
|
703
|
+
var t = pr.default, o = yt;
|
|
704
|
+
function i(l) {
|
|
705
|
+
var s = o(l, "string");
|
|
706
|
+
return t(s) == "symbol" ? s : s + "";
|
|
707
|
+
}
|
|
708
|
+
r.exports = i, r.exports.__esModule = !0, r.exports.default = r.exports;
|
|
709
|
+
})(fr);
|
|
710
|
+
var ht = fr.exports;
|
|
711
|
+
(function(r) {
|
|
712
|
+
var t = ht;
|
|
713
|
+
function o(i, l, s) {
|
|
714
|
+
return (l = t(l)) in i ? Object.defineProperty(i, l, {
|
|
715
|
+
value: s,
|
|
716
|
+
enumerable: !0,
|
|
717
|
+
configurable: !0,
|
|
718
|
+
writable: !0
|
|
719
|
+
}) : i[l] = s, i;
|
|
720
|
+
}
|
|
721
|
+
r.exports = o, r.exports.__esModule = !0, r.exports.default = r.exports;
|
|
722
|
+
})(cr);
|
|
723
|
+
var gt = cr.exports;
|
|
724
|
+
(function(r) {
|
|
725
|
+
var t = gt;
|
|
726
|
+
function o(l, s) {
|
|
727
|
+
var u = Object.keys(l);
|
|
728
|
+
if (Object.getOwnPropertySymbols) {
|
|
729
|
+
var v = Object.getOwnPropertySymbols(l);
|
|
730
|
+
s && (v = v.filter(function(f) {
|
|
731
|
+
return Object.getOwnPropertyDescriptor(l, f).enumerable;
|
|
732
|
+
})), u.push.apply(u, v);
|
|
733
|
+
}
|
|
734
|
+
return u;
|
|
735
|
+
}
|
|
736
|
+
function i(l) {
|
|
737
|
+
for (var s = 1; s < arguments.length; s++) {
|
|
738
|
+
var u = arguments[s] != null ? arguments[s] : {};
|
|
739
|
+
s % 2 ? o(Object(u), !0).forEach(function(v) {
|
|
740
|
+
t(l, v, u[v]);
|
|
741
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(l, Object.getOwnPropertyDescriptors(u)) : o(Object(u)).forEach(function(v) {
|
|
742
|
+
Object.defineProperty(l, v, Object.getOwnPropertyDescriptor(u, v));
|
|
743
|
+
});
|
|
744
|
+
}
|
|
745
|
+
return l;
|
|
746
|
+
}
|
|
747
|
+
r.exports = i, r.exports.__esModule = !0, r.exports.default = r.exports;
|
|
748
|
+
})(ur);
|
|
749
|
+
var bt = ur.exports, ce = {};
|
|
750
|
+
Object.defineProperty(ce, "__esModule", {
|
|
751
|
+
value: !0
|
|
752
|
+
});
|
|
753
|
+
ce.commonLocale = void 0;
|
|
754
|
+
ce.commonLocale = {
|
|
755
|
+
yearFormat: "YYYY",
|
|
756
|
+
dayFormat: "D",
|
|
757
|
+
cellMeridiemFormat: "A",
|
|
758
|
+
monthBeforeYear: !0
|
|
759
|
+
};
|
|
760
|
+
var _t = ie.default;
|
|
761
|
+
Object.defineProperty(ue, "__esModule", {
|
|
762
|
+
value: !0
|
|
763
|
+
});
|
|
764
|
+
ue.default = void 0;
|
|
765
|
+
var ar = _t(bt), xt = ce, Ct = (0, ar.default)((0, ar.default)({}, xt.commonLocale), {}, {
|
|
766
|
+
locale: "zh_CN",
|
|
767
|
+
today: "今天",
|
|
768
|
+
now: "此刻",
|
|
769
|
+
backToToday: "返回今天",
|
|
770
|
+
ok: "确定",
|
|
771
|
+
timeSelect: "选择时间",
|
|
772
|
+
dateSelect: "选择日期",
|
|
773
|
+
weekSelect: "选择周",
|
|
774
|
+
clear: "清除",
|
|
775
|
+
week: "周",
|
|
776
|
+
month: "月",
|
|
777
|
+
year: "年",
|
|
778
|
+
previousMonth: "上个月 (翻页上键)",
|
|
779
|
+
nextMonth: "下个月 (翻页下键)",
|
|
780
|
+
monthSelect: "选择月份",
|
|
781
|
+
yearSelect: "选择年份",
|
|
782
|
+
decadeSelect: "选择年代",
|
|
783
|
+
previousYear: "上一年 (Control键加左方向键)",
|
|
784
|
+
nextYear: "下一年 (Control键加右方向键)",
|
|
785
|
+
previousDecade: "上一年代",
|
|
786
|
+
nextDecade: "下一年代",
|
|
787
|
+
previousCentury: "上一世纪",
|
|
788
|
+
nextCentury: "下一世纪",
|
|
789
|
+
yearFormat: "YYYY年",
|
|
790
|
+
cellDateFormat: "D",
|
|
791
|
+
monthBeforeYear: !1
|
|
792
|
+
});
|
|
793
|
+
ue.default = Ct;
|
|
794
|
+
var H = {};
|
|
795
|
+
Object.defineProperty(H, "__esModule", {
|
|
796
|
+
value: !0
|
|
797
|
+
});
|
|
798
|
+
H.default = void 0;
|
|
799
|
+
const wt = {
|
|
800
|
+
placeholder: "请选择时间",
|
|
801
|
+
rangePlaceholder: ["开始时间", "结束时间"]
|
|
802
|
+
};
|
|
803
|
+
H.default = wt;
|
|
804
|
+
var mr = ie.default;
|
|
805
|
+
Object.defineProperty(J, "__esModule", {
|
|
806
|
+
value: !0
|
|
807
|
+
});
|
|
808
|
+
J.default = void 0;
|
|
809
|
+
var Rt = mr(ue), Et = mr(H);
|
|
810
|
+
const yr = {
|
|
811
|
+
lang: Object.assign({
|
|
812
|
+
placeholder: "请选择日期",
|
|
813
|
+
yearPlaceholder: "请选择年份",
|
|
814
|
+
quarterPlaceholder: "请选择季度",
|
|
815
|
+
monthPlaceholder: "请选择月份",
|
|
816
|
+
weekPlaceholder: "请选择周",
|
|
817
|
+
rangePlaceholder: ["开始日期", "结束日期"],
|
|
818
|
+
rangeYearPlaceholder: ["开始年份", "结束年份"],
|
|
819
|
+
rangeMonthPlaceholder: ["开始月份", "结束月份"],
|
|
820
|
+
rangeQuarterPlaceholder: ["开始季度", "结束季度"],
|
|
821
|
+
rangeWeekPlaceholder: ["开始周", "结束周"]
|
|
822
|
+
}, Rt.default),
|
|
823
|
+
timePickerLocale: Object.assign({}, Et.default)
|
|
824
|
+
};
|
|
825
|
+
yr.lang.ok = "确定";
|
|
826
|
+
J.default = yr;
|
|
827
|
+
var jt = ie.default;
|
|
828
|
+
Object.defineProperty(le, "__esModule", {
|
|
829
|
+
value: !0
|
|
830
|
+
});
|
|
831
|
+
le.default = void 0;
|
|
832
|
+
var Pt = jt(J);
|
|
833
|
+
le.default = Pt.default;
|
|
834
|
+
var fe = ie.default;
|
|
835
|
+
Object.defineProperty(ae, "__esModule", {
|
|
836
|
+
value: !0
|
|
837
|
+
});
|
|
838
|
+
ae.default = void 0;
|
|
839
|
+
var St = fe(se), Ot = fe(le), Tt = fe(J), $t = fe(H);
|
|
840
|
+
const S = "${label}不是一个有效的${type}", kt = {
|
|
841
|
+
locale: "zh-cn",
|
|
842
|
+
Pagination: St.default,
|
|
843
|
+
DatePicker: Tt.default,
|
|
844
|
+
TimePicker: $t.default,
|
|
845
|
+
Calendar: Ot.default,
|
|
846
|
+
// locales for all components
|
|
847
|
+
global: {
|
|
848
|
+
placeholder: "请选择",
|
|
849
|
+
close: "关闭"
|
|
850
|
+
},
|
|
851
|
+
Table: {
|
|
852
|
+
filterTitle: "筛选",
|
|
853
|
+
filterConfirm: "确定",
|
|
854
|
+
filterReset: "重置",
|
|
855
|
+
filterEmptyText: "无筛选项",
|
|
856
|
+
filterCheckAll: "全选",
|
|
857
|
+
filterSearchPlaceholder: "在筛选项中搜索",
|
|
858
|
+
emptyText: "暂无数据",
|
|
859
|
+
selectAll: "全选当页",
|
|
860
|
+
selectInvert: "反选当页",
|
|
861
|
+
selectNone: "清空所有",
|
|
862
|
+
selectionAll: "全选所有",
|
|
863
|
+
sortTitle: "排序",
|
|
864
|
+
expand: "展开行",
|
|
865
|
+
collapse: "关闭行",
|
|
866
|
+
triggerDesc: "点击降序",
|
|
867
|
+
triggerAsc: "点击升序",
|
|
868
|
+
cancelSort: "取消排序"
|
|
869
|
+
},
|
|
870
|
+
Modal: {
|
|
871
|
+
okText: "确定",
|
|
872
|
+
cancelText: "取消",
|
|
873
|
+
justOkText: "知道了"
|
|
874
|
+
},
|
|
875
|
+
Tour: {
|
|
876
|
+
Next: "下一步",
|
|
877
|
+
Previous: "上一步",
|
|
878
|
+
Finish: "结束导览"
|
|
879
|
+
},
|
|
880
|
+
Popconfirm: {
|
|
881
|
+
cancelText: "取消",
|
|
882
|
+
okText: "确定"
|
|
883
|
+
},
|
|
884
|
+
Transfer: {
|
|
885
|
+
titles: ["", ""],
|
|
886
|
+
searchPlaceholder: "请输入搜索内容",
|
|
887
|
+
itemUnit: "项",
|
|
888
|
+
itemsUnit: "项",
|
|
889
|
+
remove: "删除",
|
|
890
|
+
selectCurrent: "全选当页",
|
|
891
|
+
removeCurrent: "删除当页",
|
|
892
|
+
selectAll: "全选所有",
|
|
893
|
+
deselectAll: "取消全选",
|
|
894
|
+
removeAll: "删除全部",
|
|
895
|
+
selectInvert: "反选当页"
|
|
896
|
+
},
|
|
897
|
+
Upload: {
|
|
898
|
+
uploading: "文件上传中",
|
|
899
|
+
removeFile: "删除文件",
|
|
900
|
+
uploadError: "上传错误",
|
|
901
|
+
previewFile: "预览文件",
|
|
902
|
+
downloadFile: "下载文件"
|
|
903
|
+
},
|
|
904
|
+
Empty: {
|
|
905
|
+
description: "暂无数据"
|
|
906
|
+
},
|
|
907
|
+
Icon: {
|
|
908
|
+
icon: "图标"
|
|
909
|
+
},
|
|
910
|
+
Text: {
|
|
911
|
+
edit: "编辑",
|
|
912
|
+
copy: "复制",
|
|
913
|
+
copied: "复制成功",
|
|
914
|
+
expand: "展开",
|
|
915
|
+
collapse: "收起"
|
|
916
|
+
},
|
|
917
|
+
Form: {
|
|
918
|
+
optional: "(可选)",
|
|
919
|
+
defaultValidateMessages: {
|
|
920
|
+
default: "字段验证错误${label}",
|
|
921
|
+
required: "请输入${label}",
|
|
922
|
+
enum: "${label}必须是其中一个[${enum}]",
|
|
923
|
+
whitespace: "${label}不能为空字符",
|
|
924
|
+
date: {
|
|
925
|
+
format: "${label}日期格式无效",
|
|
926
|
+
parse: "${label}不能转换为日期",
|
|
927
|
+
invalid: "${label}是一个无效日期"
|
|
928
|
+
},
|
|
929
|
+
types: {
|
|
930
|
+
string: S,
|
|
931
|
+
method: S,
|
|
932
|
+
array: S,
|
|
933
|
+
object: S,
|
|
934
|
+
number: S,
|
|
935
|
+
date: S,
|
|
936
|
+
boolean: S,
|
|
937
|
+
integer: S,
|
|
938
|
+
float: S,
|
|
939
|
+
regexp: S,
|
|
940
|
+
email: S,
|
|
941
|
+
url: S,
|
|
942
|
+
hex: S
|
|
943
|
+
},
|
|
944
|
+
string: {
|
|
945
|
+
len: "${label}须为${len}个字符",
|
|
946
|
+
min: "${label}最少${min}个字符",
|
|
947
|
+
max: "${label}最多${max}个字符",
|
|
948
|
+
range: "${label}须在${min}-${max}字符之间"
|
|
949
|
+
},
|
|
950
|
+
number: {
|
|
951
|
+
len: "${label}必须等于${len}",
|
|
952
|
+
min: "${label}最小值为${min}",
|
|
953
|
+
max: "${label}最大值为${max}",
|
|
954
|
+
range: "${label}须在${min}-${max}之间"
|
|
955
|
+
},
|
|
956
|
+
array: {
|
|
957
|
+
len: "须为${len}个${label}",
|
|
958
|
+
min: "最少${min}个${label}",
|
|
959
|
+
max: "最多${max}个${label}",
|
|
960
|
+
range: "${label}数量须在${min}-${max}之间"
|
|
961
|
+
},
|
|
962
|
+
pattern: {
|
|
963
|
+
mismatch: "${label}与模式不匹配${pattern}"
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
},
|
|
967
|
+
Image: {
|
|
968
|
+
preview: "预览"
|
|
969
|
+
},
|
|
970
|
+
QRCode: {
|
|
971
|
+
expired: "二维码过期",
|
|
972
|
+
refresh: "点击刷新",
|
|
973
|
+
scanned: "已扫描"
|
|
974
|
+
},
|
|
975
|
+
ColorPicker: {
|
|
976
|
+
presetEmpty: "暂无",
|
|
977
|
+
transparent: "无色",
|
|
978
|
+
singleColor: "单色",
|
|
979
|
+
gradientColor: "渐变色"
|
|
980
|
+
}
|
|
981
|
+
};
|
|
982
|
+
ae.default = kt;
|
|
983
|
+
var Dt = ae;
|
|
984
|
+
const Se = /* @__PURE__ */ dt(Dt), T = /* @__PURE__ */ new Map(), At = () => {
|
|
985
|
+
const r = tt;
|
|
986
|
+
Object.keys(r).forEach((t) => {
|
|
987
|
+
if (t.startsWith("And") && typeof r[t] == "function") {
|
|
988
|
+
const o = t.toLowerCase().replace("and", "and-");
|
|
989
|
+
T.set(o, r[t]), T.set(t, r[t]);
|
|
990
|
+
}
|
|
991
|
+
});
|
|
992
|
+
};
|
|
993
|
+
At();
|
|
994
|
+
const Mt = (r, t) => {
|
|
995
|
+
T.set(r, t), T.set(r.toLowerCase(), t);
|
|
996
|
+
}, Oe = (r) => {
|
|
997
|
+
let t = T.get(r);
|
|
998
|
+
return t || (t = T.get(r.toLowerCase()), t) || !r.startsWith("And") && (t = T.get(`And${r}`), t) || r.startsWith("and-") || (t = T.get(`and-${r.toLowerCase()}`)), t;
|
|
999
|
+
}, Nt = () => Array.from(T.keys()), cn = {
|
|
1000
|
+
register: Mt,
|
|
1001
|
+
get: Oe,
|
|
1002
|
+
getAll: Nt,
|
|
1003
|
+
has: (r) => T.has(r) || T.has(r.toLowerCase())
|
|
1004
|
+
}, Ft = (r) => {
|
|
1005
|
+
try {
|
|
1006
|
+
const t = JSON.parse(r);
|
|
1007
|
+
return It(t);
|
|
1008
|
+
} catch (t) {
|
|
1009
|
+
throw new Error(`Failed to parse page config: ${t}`);
|
|
1010
|
+
}
|
|
1011
|
+
}, It = (r) => {
|
|
1012
|
+
if (!r)
|
|
1013
|
+
throw new Error("Page config is empty");
|
|
1014
|
+
return r.html || r.components ? {
|
|
1015
|
+
id: r.id,
|
|
1016
|
+
title: r.title,
|
|
1017
|
+
style: r.style,
|
|
1018
|
+
components: Ee(r.components || []),
|
|
1019
|
+
dataSets: r.dataSets || {},
|
|
1020
|
+
actions: r.actions || {}
|
|
1021
|
+
} : r;
|
|
1022
|
+
}, Ee = (r) => Array.isArray(r) ? r.map((t) => {
|
|
1023
|
+
var o;
|
|
1024
|
+
return t.tagName || t["data-gjs-type"] ? {
|
|
1025
|
+
id: ((o = t.attributes) == null ? void 0 : o.id) || t.id,
|
|
1026
|
+
type: t["data-gjs-type"] || t.tagName || "div",
|
|
1027
|
+
props: { ...t.attributes },
|
|
1028
|
+
children: t.components ? Ee(t.components) : void 0,
|
|
1029
|
+
style: t.style
|
|
1030
|
+
} : {
|
|
1031
|
+
id: t.id,
|
|
1032
|
+
type: t.type,
|
|
1033
|
+
props: t.props || {},
|
|
1034
|
+
children: t.children ? Ee(t.children) : void 0,
|
|
1035
|
+
style: t.style
|
|
1036
|
+
};
|
|
1037
|
+
}) : [], Lt = Pe, Yt = sr, fn = ({
|
|
1038
|
+
pageConfig: r,
|
|
1039
|
+
sessionId: t = `runtime_${Date.now()}`,
|
|
1040
|
+
develop: o = !1,
|
|
1041
|
+
theme: i,
|
|
1042
|
+
loading: l = !1,
|
|
1043
|
+
onError: s
|
|
1044
|
+
}) => {
|
|
1045
|
+
const [u, v] = tr(null), [f, x] = tr(null);
|
|
1046
|
+
at(() => {
|
|
1047
|
+
try {
|
|
1048
|
+
const m = typeof r == "string" ? Ft(r) : r;
|
|
1049
|
+
v(m), x(null);
|
|
1050
|
+
} catch (m) {
|
|
1051
|
+
const w = m instanceof Error ? m : new Error(String(m));
|
|
1052
|
+
x(w), s == null || s(w);
|
|
1053
|
+
}
|
|
1054
|
+
}, [r, s]);
|
|
1055
|
+
const b = (m, w) => {
|
|
1056
|
+
var D;
|
|
1057
|
+
const k = Oe(m.type);
|
|
1058
|
+
if (!k)
|
|
1059
|
+
return o ? /* @__PURE__ */ y.jsxs("div", { style: { padding: 8, background: "#fff1f0", border: "1px solid #ffa39e", borderRadius: 4 }, children: [
|
|
1060
|
+
"未知组件: ",
|
|
1061
|
+
m.type
|
|
1062
|
+
] }, m.id || w) : (console.warn(`Unknown component type: ${m.type}`), null);
|
|
1063
|
+
const A = {
|
|
1064
|
+
...m.props,
|
|
1065
|
+
id: m.id,
|
|
1066
|
+
sessionId: t,
|
|
1067
|
+
develop: o,
|
|
1068
|
+
key: m.id || w
|
|
1069
|
+
}, de = (D = m.children) == null ? void 0 : D.map((R, pe) => b(R, pe));
|
|
1070
|
+
return Y.createElement(k, A, de);
|
|
1071
|
+
}, E = re(() => l ? /* @__PURE__ */ y.jsx("div", { style: { display: "flex", justifyContent: "center", alignItems: "center", minHeight: 200 }, children: /* @__PURE__ */ y.jsx(Lt, { size: "large" }) }) : f ? /* @__PURE__ */ y.jsxs("div", { style: { padding: 24, background: "#fff2f0", border: "1px solid #ffccc7", borderRadius: 8 }, children: [
|
|
1072
|
+
/* @__PURE__ */ y.jsx("h3", { style: { color: "#cf1322" }, children: "渲染错误" }),
|
|
1073
|
+
/* @__PURE__ */ y.jsx("p", { children: f.message })
|
|
1074
|
+
] }) : u ? /* @__PURE__ */ y.jsx("div", { className: "runtime-container", style: u.style, children: u.components.map((m, w) => b(m, w)) }) : null, [l, f, u, t, o]);
|
|
1075
|
+
return /* @__PURE__ */ y.jsx(Yt, { locale: Se, theme: i, children: E });
|
|
1076
|
+
}, Wt = (r) => (t, o, i) => (i.setState = (l, s, ...u) => {
|
|
1077
|
+
const v = typeof l == "function" ? ct(l) : l;
|
|
1078
|
+
return t(v, s, ...u);
|
|
1079
|
+
}, r(i.setState, o, i)), Ut = Wt, dn = ut()(
|
|
1080
|
+
Ut((r) => ({
|
|
1081
|
+
currentPageId: null,
|
|
1082
|
+
pageConfigs: {},
|
|
1083
|
+
loading: !1,
|
|
1084
|
+
error: null,
|
|
1085
|
+
setCurrentPage: (t) => r((o) => {
|
|
1086
|
+
o.currentPageId = t;
|
|
1087
|
+
}),
|
|
1088
|
+
setPageConfig: (t, o) => r((i) => {
|
|
1089
|
+
i.pageConfigs[t] = o;
|
|
1090
|
+
}),
|
|
1091
|
+
setLoading: (t) => r((o) => {
|
|
1092
|
+
o.loading = t;
|
|
1093
|
+
}),
|
|
1094
|
+
setError: (t) => r((o) => {
|
|
1095
|
+
o.error = t;
|
|
1096
|
+
}),
|
|
1097
|
+
clearCache: () => r((t) => {
|
|
1098
|
+
t.pageConfigs = {};
|
|
1099
|
+
})
|
|
1100
|
+
}))
|
|
1101
|
+
), Te = /* @__PURE__ */ new Map(), K = (r, t) => {
|
|
1102
|
+
Te.set(r, t);
|
|
1103
|
+
}, zt = async (r, t) => {
|
|
1104
|
+
const { actionName: o, arg: i } = nt(r, t.value), l = Te.get(o);
|
|
1105
|
+
if (l)
|
|
1106
|
+
return l(t, i);
|
|
1107
|
+
const s = F.getState().addCommand;
|
|
1108
|
+
return s(t.sessionId, {
|
|
1109
|
+
actionName: o,
|
|
1110
|
+
arg: i,
|
|
1111
|
+
timestamp: Date.now()
|
|
1112
|
+
}), { actionName: o, arg: i };
|
|
1113
|
+
};
|
|
1114
|
+
K("setDataSet", (r, t) => {
|
|
1115
|
+
const { setDataSet: o } = F.getState();
|
|
1116
|
+
t != null && t.dataSet && (t == null ? void 0 : t.field) !== void 0 && o(t.dataSet, t.field, t.value);
|
|
1117
|
+
});
|
|
1118
|
+
K("navigate", (r, t) => {
|
|
1119
|
+
typeof window < "u" && (t != null && t.url) && (t.target === "_blank" ? window.open(t.url, "_blank") : window.location.href = t.url);
|
|
1120
|
+
});
|
|
1121
|
+
K("alert", (r, t) => {
|
|
1122
|
+
typeof window < "u" && window.alert((t == null ? void 0 : t.message) || t);
|
|
1123
|
+
});
|
|
1124
|
+
K("console", (r, t) => {
|
|
1125
|
+
});
|
|
1126
|
+
const pn = {
|
|
1127
|
+
execute: zt,
|
|
1128
|
+
register: K,
|
|
1129
|
+
hasHandler: (r) => Te.has(r)
|
|
1130
|
+
}, Vt = Pe, vn = ({
|
|
1131
|
+
componentName: r,
|
|
1132
|
+
componentProps: t = {},
|
|
1133
|
+
storePropsKey: o,
|
|
1134
|
+
sessionId: i,
|
|
1135
|
+
loadingFallback: l,
|
|
1136
|
+
notFoundFallback: s,
|
|
1137
|
+
onError: u
|
|
1138
|
+
}) => {
|
|
1139
|
+
const v = F((m) => {
|
|
1140
|
+
if (!o) return null;
|
|
1141
|
+
const k = o.split(".")[0];
|
|
1142
|
+
return m.dataSets[k];
|
|
1143
|
+
}), f = re(() => {
|
|
1144
|
+
if (!o || !v) return {};
|
|
1145
|
+
const w = o.split(".")[1];
|
|
1146
|
+
return w ? v[w] || {} : v;
|
|
1147
|
+
}, [o, v]), x = re(() => ({
|
|
1148
|
+
...f,
|
|
1149
|
+
...t,
|
|
1150
|
+
sessionId: i
|
|
1151
|
+
}), [f, t, i]), b = re(() => {
|
|
1152
|
+
try {
|
|
1153
|
+
return Oe(r);
|
|
1154
|
+
} catch (m) {
|
|
1155
|
+
const w = m instanceof Error ? m : new Error(String(m));
|
|
1156
|
+
return u == null || u(w), null;
|
|
1157
|
+
}
|
|
1158
|
+
}, [r, u]), E = /* @__PURE__ */ y.jsx("div", { style: { display: "flex", justifyContent: "center", padding: 24 }, children: /* @__PURE__ */ y.jsx(Vt, {}) });
|
|
1159
|
+
return b ? /* @__PURE__ */ y.jsx(je, { fallback: l || E, children: /* @__PURE__ */ y.jsx(b, { ...x }) }) : s ? /* @__PURE__ */ y.jsx(y.Fragment, { children: s }) : /* @__PURE__ */ y.jsxs("div", { style: {
|
|
1160
|
+
padding: 16,
|
|
1161
|
+
background: "#fff7e6",
|
|
1162
|
+
border: "1px solid #ffd591",
|
|
1163
|
+
borderRadius: 4,
|
|
1164
|
+
textAlign: "center",
|
|
1165
|
+
color: "#d46b08"
|
|
1166
|
+
}, children: [
|
|
1167
|
+
"组件未找到: ",
|
|
1168
|
+
r
|
|
1169
|
+
] });
|
|
1170
|
+
};
|
|
1171
|
+
var te, ee = ft;
|
|
1172
|
+
if (process.env.NODE_ENV === "production")
|
|
1173
|
+
te = ee.createRoot, ee.hydrateRoot;
|
|
1174
|
+
else {
|
|
1175
|
+
var ir = ee.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
1176
|
+
te = function(r, t) {
|
|
1177
|
+
ir.usingClientEntryPoint = !0;
|
|
1178
|
+
try {
|
|
1179
|
+
return ee.createRoot(r, t);
|
|
1180
|
+
} finally {
|
|
1181
|
+
ir.usingClientEntryPoint = !1;
|
|
1182
|
+
}
|
|
1183
|
+
};
|
|
1184
|
+
}
|
|
1185
|
+
const qt = st, Bt = lt, ne = Pe, hr = sr;
|
|
1186
|
+
class Jt {
|
|
1187
|
+
constructor() {
|
|
1188
|
+
we(this, "drawers", /* @__PURE__ */ new Map());
|
|
1189
|
+
we(this, "isSetup", !1);
|
|
1190
|
+
}
|
|
1191
|
+
/**
|
|
1192
|
+
* 添加 Drawer 实例
|
|
1193
|
+
*/
|
|
1194
|
+
add(t) {
|
|
1195
|
+
this.drawers.set(t.id, t), this.setupGlobalCleanup();
|
|
1196
|
+
}
|
|
1197
|
+
/**
|
|
1198
|
+
* 移除 Drawer 实例
|
|
1199
|
+
*/
|
|
1200
|
+
remove(t) {
|
|
1201
|
+
this.drawers.delete(t);
|
|
1202
|
+
}
|
|
1203
|
+
/**
|
|
1204
|
+
* 清理所有 Drawer
|
|
1205
|
+
*/
|
|
1206
|
+
cleanupAll() {
|
|
1207
|
+
this.drawers.forEach((t) => {
|
|
1208
|
+
try {
|
|
1209
|
+
t.cleanup();
|
|
1210
|
+
} catch (o) {
|
|
1211
|
+
console.error("Failed to cleanup drawer:", o);
|
|
1212
|
+
}
|
|
1213
|
+
}), this.drawers.clear();
|
|
1214
|
+
}
|
|
1215
|
+
/**
|
|
1216
|
+
* 获取当前打开的 Drawer 数量
|
|
1217
|
+
*/
|
|
1218
|
+
get count() {
|
|
1219
|
+
return this.drawers.size;
|
|
1220
|
+
}
|
|
1221
|
+
/**
|
|
1222
|
+
* 设置全局清理监听
|
|
1223
|
+
*/
|
|
1224
|
+
setupGlobalCleanup() {
|
|
1225
|
+
this.isSetup || typeof window > "u" || (this.isSetup = !0, window.addEventListener("beforeunload", () => {
|
|
1226
|
+
this.cleanupAll();
|
|
1227
|
+
}), typeof import.meta < "u");
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
const oe = new Jt(), gr = () => `drawer-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, Ht = ({ options: r, onClose: t, Component: o }) => {
|
|
1231
|
+
const [i, l] = Y.useState(!0), s = B(), u = () => {
|
|
1232
|
+
var E;
|
|
1233
|
+
l(!1), (E = r.onClose) == null || E.call(r), setTimeout(() => {
|
|
1234
|
+
t();
|
|
1235
|
+
}, 300);
|
|
1236
|
+
}, { component: v, componentName: f, componentProps: x, ...b } = r;
|
|
1237
|
+
return /* @__PURE__ */ y.jsx(hr, { locale: Se, theme: s.theme, children: /* @__PURE__ */ y.jsx(qt, { ...b, open: i, onClose: u, destroyOnClose: !0, children: o ? /* @__PURE__ */ y.jsx(
|
|
1238
|
+
je,
|
|
1239
|
+
{
|
|
1240
|
+
fallback: /* @__PURE__ */ y.jsx(
|
|
1241
|
+
"div",
|
|
1242
|
+
{
|
|
1243
|
+
style: {
|
|
1244
|
+
display: "flex",
|
|
1245
|
+
justifyContent: "center",
|
|
1246
|
+
padding: 40
|
|
1247
|
+
},
|
|
1248
|
+
children: /* @__PURE__ */ y.jsx(ne, {})
|
|
1249
|
+
}
|
|
1250
|
+
),
|
|
1251
|
+
children: /* @__PURE__ */ y.jsx(o, { ...x || {}, onClose: u })
|
|
1252
|
+
}
|
|
1253
|
+
) : /* @__PURE__ */ y.jsx(
|
|
1254
|
+
"div",
|
|
1255
|
+
{
|
|
1256
|
+
style: {
|
|
1257
|
+
display: "flex",
|
|
1258
|
+
justifyContent: "center",
|
|
1259
|
+
alignItems: "center",
|
|
1260
|
+
height: "100%"
|
|
1261
|
+
},
|
|
1262
|
+
children: /* @__PURE__ */ y.jsx(ne, { tip: "加载中..." })
|
|
1263
|
+
}
|
|
1264
|
+
) }) });
|
|
1265
|
+
}, Kt = ({ options: r, onClose: t, Component: o }) => {
|
|
1266
|
+
const [i, l] = Y.useState(!0), [s, u] = Y.useState(!1), v = B(), f = () => {
|
|
1267
|
+
var A;
|
|
1268
|
+
l(!1), (A = r.onClose) == null || A.call(r), setTimeout(() => {
|
|
1269
|
+
t();
|
|
1270
|
+
}, 300);
|
|
1271
|
+
}, x = async () => {
|
|
1272
|
+
if (r.onOk) {
|
|
1273
|
+
u(!0);
|
|
1274
|
+
try {
|
|
1275
|
+
await r.onOk(), f();
|
|
1276
|
+
} catch (A) {
|
|
1277
|
+
console.error("Modal onOk error:", A);
|
|
1278
|
+
} finally {
|
|
1279
|
+
u(!1);
|
|
1280
|
+
}
|
|
1281
|
+
} else
|
|
1282
|
+
f();
|
|
1283
|
+
}, { component: b, componentName: E, componentProps: m, onOk: w, ...k } = r;
|
|
1284
|
+
return /* @__PURE__ */ y.jsx(hr, { locale: Se, theme: v.theme, children: /* @__PURE__ */ y.jsx(
|
|
1285
|
+
Bt,
|
|
1286
|
+
{
|
|
1287
|
+
...k,
|
|
1288
|
+
open: i,
|
|
1289
|
+
onCancel: f,
|
|
1290
|
+
onOk: x,
|
|
1291
|
+
confirmLoading: s,
|
|
1292
|
+
destroyOnClose: !0,
|
|
1293
|
+
children: o ? /* @__PURE__ */ y.jsx(
|
|
1294
|
+
je,
|
|
1295
|
+
{
|
|
1296
|
+
fallback: /* @__PURE__ */ y.jsx(
|
|
1297
|
+
"div",
|
|
1298
|
+
{
|
|
1299
|
+
style: {
|
|
1300
|
+
display: "flex",
|
|
1301
|
+
justifyContent: "center",
|
|
1302
|
+
padding: 40
|
|
1303
|
+
},
|
|
1304
|
+
children: /* @__PURE__ */ y.jsx(ne, {})
|
|
1305
|
+
}
|
|
1306
|
+
),
|
|
1307
|
+
children: /* @__PURE__ */ y.jsx(o, { ...m || {}, onClose: f })
|
|
1308
|
+
}
|
|
1309
|
+
) : /* @__PURE__ */ y.jsx(
|
|
1310
|
+
"div",
|
|
1311
|
+
{
|
|
1312
|
+
style: {
|
|
1313
|
+
display: "flex",
|
|
1314
|
+
justifyContent: "center",
|
|
1315
|
+
alignItems: "center",
|
|
1316
|
+
minHeight: 100
|
|
1317
|
+
},
|
|
1318
|
+
children: /* @__PURE__ */ y.jsx(ne, { tip: "加载中..." })
|
|
1319
|
+
}
|
|
1320
|
+
)
|
|
1321
|
+
}
|
|
1322
|
+
) });
|
|
1323
|
+
};
|
|
1324
|
+
function Gt(r) {
|
|
1325
|
+
const t = gr(), o = document.createElement("div");
|
|
1326
|
+
o.setAttribute("data-drawer-container", "true"), o.setAttribute("data-drawer-id", t), document.body.appendChild(o);
|
|
1327
|
+
const i = te(o), l = () => {
|
|
1328
|
+
var u;
|
|
1329
|
+
try {
|
|
1330
|
+
oe.remove(t), i.unmount(), o.remove(), (u = r.afterClose) == null || u.call(r);
|
|
1331
|
+
} catch (v) {
|
|
1332
|
+
console.error("Drawer cleanup failed:", v);
|
|
1333
|
+
}
|
|
1334
|
+
};
|
|
1335
|
+
oe.add({ id: t, root: i, mountNode: o, cleanup: l });
|
|
1336
|
+
let s = r.component || null;
|
|
1337
|
+
if (!s && r.componentName) {
|
|
1338
|
+
const u = B();
|
|
1339
|
+
u.componentResolver ? s = u.componentResolver(r.componentName) : console.warn(
|
|
1340
|
+
"[UIUtils.showDrawer] componentResolver not configured. Cannot resolve component:",
|
|
1341
|
+
r.componentName
|
|
1342
|
+
);
|
|
1343
|
+
}
|
|
1344
|
+
return i.render(
|
|
1345
|
+
/* @__PURE__ */ y.jsx(Ht, { options: r, onClose: l, Component: s })
|
|
1346
|
+
), l;
|
|
1347
|
+
}
|
|
1348
|
+
function Xt(r) {
|
|
1349
|
+
const t = gr(), o = document.createElement("div");
|
|
1350
|
+
o.setAttribute("data-modal-container", "true"), o.setAttribute("data-modal-id", t), document.body.appendChild(o);
|
|
1351
|
+
const i = te(o), l = () => {
|
|
1352
|
+
try {
|
|
1353
|
+
i.unmount(), o.remove();
|
|
1354
|
+
} catch (u) {
|
|
1355
|
+
console.error("Modal cleanup failed:", u);
|
|
1356
|
+
}
|
|
1357
|
+
};
|
|
1358
|
+
let s = r.component || null;
|
|
1359
|
+
if (!s && r.componentName) {
|
|
1360
|
+
const u = B();
|
|
1361
|
+
u.componentResolver ? s = u.componentResolver(r.componentName) : console.warn(
|
|
1362
|
+
"[UIUtils.showModal] componentResolver not configured. Cannot resolve component:",
|
|
1363
|
+
r.componentName
|
|
1364
|
+
);
|
|
1365
|
+
}
|
|
1366
|
+
return i.render(
|
|
1367
|
+
/* @__PURE__ */ y.jsx(Kt, { options: r, onClose: l, Component: s })
|
|
1368
|
+
), l;
|
|
1369
|
+
}
|
|
1370
|
+
function Qt() {
|
|
1371
|
+
oe.cleanupAll();
|
|
1372
|
+
}
|
|
1373
|
+
function Zt() {
|
|
1374
|
+
return oe.count;
|
|
1375
|
+
}
|
|
1376
|
+
function en(r, t, o, i) {
|
|
1377
|
+
it[r](t, o, i);
|
|
1378
|
+
}
|
|
1379
|
+
const mn = {
|
|
1380
|
+
showDrawer: Gt,
|
|
1381
|
+
showModal: Xt,
|
|
1382
|
+
cleanupAllDrawers: Qt,
|
|
1383
|
+
getDrawerCount: Zt,
|
|
1384
|
+
msg: en
|
|
1385
|
+
}, $e = { module: "Module1" }, br = { router: void 0 }, yn = (r) => {
|
|
1386
|
+
$e.module = r;
|
|
1387
|
+
}, hn = (r) => {
|
|
1388
|
+
br.router = r;
|
|
1389
|
+
}, rn = (r, t, o) => {
|
|
1390
|
+
o ? o($e.module).then((i) => {
|
|
1391
|
+
typeof i[r] == "function" ? i[r](t) : console.error(
|
|
1392
|
+
`Action "${r}" does not exist on the module.`
|
|
1393
|
+
);
|
|
1394
|
+
}).catch((i) => {
|
|
1395
|
+
console.error(`Failed to execute action:${r}`, i);
|
|
1396
|
+
}) : console.warn(
|
|
1397
|
+
"Module loader not configured. Please provide moduleLoader in initRuntime options."
|
|
1398
|
+
);
|
|
1399
|
+
}, gn = (r) => {
|
|
1400
|
+
const { sessionId: t = "default", utils: o, moduleLoader: i } = r || {}, l = B();
|
|
1401
|
+
let s = 0;
|
|
1402
|
+
return F.subscribe((v) => {
|
|
1403
|
+
const f = v.commandQueues[t] ?? [];
|
|
1404
|
+
if (f.length <= s) {
|
|
1405
|
+
s = f.length;
|
|
1406
|
+
return;
|
|
1407
|
+
}
|
|
1408
|
+
const x = f[f.length - 1];
|
|
1409
|
+
!x || typeof x.actionName != "string" || (s = f.length, F.getState().popCommand(t), rn(
|
|
1410
|
+
x.actionName,
|
|
1411
|
+
{
|
|
1412
|
+
...x.arg,
|
|
1413
|
+
moduleName: $e.module,
|
|
1414
|
+
ctx: {
|
|
1415
|
+
utils: o,
|
|
1416
|
+
useStoreByName: ot,
|
|
1417
|
+
defHttp: l.request,
|
|
1418
|
+
useValidateWatchStore: void 0,
|
|
1419
|
+
router: br.router
|
|
1420
|
+
}
|
|
1421
|
+
},
|
|
1422
|
+
i
|
|
1423
|
+
));
|
|
1424
|
+
});
|
|
1425
|
+
};
|
|
1426
|
+
function bn(r) {
|
|
1427
|
+
return r && typeof r == "object" ? Object.values(r).some(
|
|
1428
|
+
(t) => typeof t == "string" && t.trim().length > 0
|
|
1429
|
+
) : !1;
|
|
1430
|
+
}
|
|
1431
|
+
function _n(r, t) {
|
|
1432
|
+
F.getState().addCommand(r, {
|
|
1433
|
+
...t,
|
|
1434
|
+
timestamp: Date.now()
|
|
1435
|
+
});
|
|
1436
|
+
}
|
|
1437
|
+
function xn(r, t) {
|
|
1438
|
+
return F.getState().getValidateResults(r, t) ?? {};
|
|
1439
|
+
}
|
|
1440
|
+
export {
|
|
1441
|
+
pn as ActionExecutor,
|
|
1442
|
+
cn as ComponentRegistry,
|
|
1443
|
+
vn as DynamicContainer,
|
|
1444
|
+
fn as RuntimeRenderer,
|
|
1445
|
+
mn as UIUtils,
|
|
1446
|
+
_n as addCommand,
|
|
1447
|
+
Qt as cleanupAllDrawers,
|
|
1448
|
+
Oe as getComponent,
|
|
1449
|
+
Zt as getDrawerCount,
|
|
1450
|
+
xn as getValidateResults,
|
|
1451
|
+
gn as initRuntime,
|
|
1452
|
+
en as msg,
|
|
1453
|
+
Ft as parsePageConfig,
|
|
1454
|
+
Mt as registerComponent,
|
|
1455
|
+
hn as setRoute,
|
|
1456
|
+
Gt as showDrawer,
|
|
1457
|
+
Xt as showModal,
|
|
1458
|
+
yn as useModule,
|
|
1459
|
+
dn as useRuntimeStore,
|
|
1460
|
+
bn as validateFailed
|
|
1461
|
+
};
|
|
1462
|
+
//# sourceMappingURL=index.esm.js.map
|