@nuwatop/code-canvas-runtime 0.1.2 → 0.1.3
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/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +399 -427
- package/dist/index.esm.js.map +1 -1
- package/package.json +8 -7
- package/LICENSE +0 -21
package/dist/index.esm.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var z = (
|
|
4
|
-
import * as
|
|
5
|
-
import {
|
|
1
|
+
var le = Object.defineProperty;
|
|
2
|
+
var se = (t, e, r) => e in t ? le(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var z = (t, e, r) => se(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
+
import * as ie from "@nuwatop/code-canvas-core";
|
|
5
|
+
import { parseAction as ce, useAndStore as g, getCoreConfig as w, useStoreByName as de } from "@nuwatop/code-canvas-core";
|
|
6
6
|
export * from "@nuwatop/code-canvas-core";
|
|
7
|
-
import { jsx as
|
|
8
|
-
import P, { useState as
|
|
9
|
-
import { Spin as
|
|
10
|
-
import { create as
|
|
11
|
-
import { produce as
|
|
12
|
-
import { createRoot as
|
|
13
|
-
function
|
|
14
|
-
return
|
|
7
|
+
import { jsx as a, jsxs as T, Fragment as ue } from "react/jsx-runtime";
|
|
8
|
+
import P, { useState as V, useEffect as fe, useMemo as S, Suspense as L } from "react";
|
|
9
|
+
import { Spin as F, ConfigProvider as G, message as pe, Modal as me, Drawer as he } from "antd";
|
|
10
|
+
import { create as ye } from "zustand";
|
|
11
|
+
import { produce as ge } from "immer";
|
|
12
|
+
import { createRoot as J } from "react-dom/client";
|
|
13
|
+
function be(t) {
|
|
14
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
15
15
|
}
|
|
16
|
-
var
|
|
17
|
-
(function(
|
|
18
|
-
function
|
|
16
|
+
var A = {}, X = { exports: {} };
|
|
17
|
+
(function(t) {
|
|
18
|
+
function e(r) {
|
|
19
19
|
return r && r.__esModule ? r : {
|
|
20
20
|
default: r
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
})(
|
|
25
|
-
var
|
|
26
|
-
Object.defineProperty(
|
|
23
|
+
t.exports = e, t.exports.__esModule = !0, t.exports.default = t.exports;
|
|
24
|
+
})(X);
|
|
25
|
+
var I = X.exports, D = {};
|
|
26
|
+
Object.defineProperty(D, "__esModule", {
|
|
27
27
|
value: !0
|
|
28
28
|
});
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
D.default = void 0;
|
|
30
|
+
const ve = {
|
|
31
31
|
// Options
|
|
32
32
|
items_per_page: "条/页",
|
|
33
33
|
jump_to: "跳至",
|
|
@@ -42,99 +42,70 @@ var _e = {
|
|
|
42
42
|
next_3: "向后 3 页",
|
|
43
43
|
page_size: "页码"
|
|
44
44
|
};
|
|
45
|
-
|
|
46
|
-
var
|
|
47
|
-
(
|
|
48
|
-
function t(r) {
|
|
49
|
-
"@babel/helpers - typeof";
|
|
50
|
-
return e.exports = t = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
|
|
51
|
-
return typeof n;
|
|
52
|
-
} : function(n) {
|
|
53
|
-
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
|
54
|
-
}, e.exports.__esModule = !0, e.exports.default = e.exports, t(r);
|
|
55
|
-
}
|
|
56
|
-
e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
|
|
57
|
-
})(Z);
|
|
58
|
-
var ee = Z.exports, te = { exports: {} };
|
|
59
|
-
(function(e) {
|
|
60
|
-
var t = ee.default;
|
|
61
|
-
function r(n, a) {
|
|
62
|
-
if (t(n) != "object" || !n) return n;
|
|
63
|
-
var o = n[Symbol.toPrimitive];
|
|
64
|
-
if (o !== void 0) {
|
|
65
|
-
var l = o.call(n, a || "default");
|
|
66
|
-
if (t(l) != "object") return l;
|
|
67
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
68
|
-
}
|
|
69
|
-
return (a === "string" ? String : Number)(n);
|
|
70
|
-
}
|
|
71
|
-
e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
|
|
72
|
-
})(te);
|
|
73
|
-
var $e = te.exports;
|
|
74
|
-
(function(e) {
|
|
75
|
-
var t = ee.default, r = $e;
|
|
76
|
-
function n(a) {
|
|
77
|
-
var o = r(a, "string");
|
|
78
|
-
return t(o) == "symbol" ? o : o + "";
|
|
79
|
-
}
|
|
80
|
-
e.exports = n, e.exports.__esModule = !0, e.exports.default = e.exports;
|
|
81
|
-
})(X);
|
|
82
|
-
var Pe = X.exports;
|
|
83
|
-
(function(e) {
|
|
84
|
-
var t = Pe;
|
|
85
|
-
function r(n, a, o) {
|
|
86
|
-
return (a = t(a)) in n ? Object.defineProperty(n, a, {
|
|
87
|
-
value: o,
|
|
88
|
-
enumerable: !0,
|
|
89
|
-
configurable: !0,
|
|
90
|
-
writable: !0
|
|
91
|
-
}) : n[a] = o, n;
|
|
92
|
-
}
|
|
93
|
-
e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
|
|
94
|
-
})(K);
|
|
95
|
-
var Se = K.exports;
|
|
96
|
-
(function(e) {
|
|
97
|
-
var t = Se;
|
|
98
|
-
function r(a, o) {
|
|
99
|
-
var l = Object.keys(a);
|
|
100
|
-
if (Object.getOwnPropertySymbols) {
|
|
101
|
-
var i = Object.getOwnPropertySymbols(a);
|
|
102
|
-
o && (i = i.filter(function(d) {
|
|
103
|
-
return Object.getOwnPropertyDescriptor(a, d).enumerable;
|
|
104
|
-
})), l.push.apply(l, i);
|
|
105
|
-
}
|
|
106
|
-
return l;
|
|
107
|
-
}
|
|
108
|
-
function n(a) {
|
|
109
|
-
for (var o = 1; o < arguments.length; o++) {
|
|
110
|
-
var l = arguments[o] != null ? arguments[o] : {};
|
|
111
|
-
o % 2 ? r(Object(l), !0).forEach(function(i) {
|
|
112
|
-
t(a, i, l[i]);
|
|
113
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(l)) : r(Object(l)).forEach(function(i) {
|
|
114
|
-
Object.defineProperty(a, i, Object.getOwnPropertyDescriptor(l, i));
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
return a;
|
|
118
|
-
}
|
|
119
|
-
e.exports = n, e.exports.__esModule = !0, e.exports.default = e.exports;
|
|
120
|
-
})(J);
|
|
121
|
-
var je = J.exports, k = {};
|
|
122
|
-
Object.defineProperty(k, "__esModule", {
|
|
45
|
+
D.default = ve;
|
|
46
|
+
var N = {}, _ = {}, M = {}, R = {};
|
|
47
|
+
Object.defineProperty(R, "__esModule", {
|
|
123
48
|
value: !0
|
|
124
49
|
});
|
|
125
|
-
|
|
126
|
-
|
|
50
|
+
R.commonLocale = void 0;
|
|
51
|
+
R.commonLocale = {
|
|
127
52
|
yearFormat: "YYYY",
|
|
128
53
|
dayFormat: "D",
|
|
129
54
|
cellMeridiemFormat: "A",
|
|
130
55
|
monthBeforeYear: !0
|
|
131
56
|
};
|
|
132
|
-
|
|
133
|
-
Object.defineProperty(N, "__esModule", {
|
|
57
|
+
Object.defineProperty(M, "__esModule", {
|
|
134
58
|
value: !0
|
|
135
59
|
});
|
|
136
|
-
|
|
137
|
-
var
|
|
60
|
+
M.default = void 0;
|
|
61
|
+
var Ce = R;
|
|
62
|
+
function C(t) {
|
|
63
|
+
"@babel/helpers - typeof";
|
|
64
|
+
return C = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
65
|
+
return typeof e;
|
|
66
|
+
} : function(e) {
|
|
67
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
68
|
+
}, C(t);
|
|
69
|
+
}
|
|
70
|
+
function Q(t, e) {
|
|
71
|
+
var r = Object.keys(t);
|
|
72
|
+
if (Object.getOwnPropertySymbols) {
|
|
73
|
+
var n = Object.getOwnPropertySymbols(t);
|
|
74
|
+
e && (n = n.filter(function(s) {
|
|
75
|
+
return Object.getOwnPropertyDescriptor(t, s).enumerable;
|
|
76
|
+
})), r.push.apply(r, n);
|
|
77
|
+
}
|
|
78
|
+
return r;
|
|
79
|
+
}
|
|
80
|
+
function B(t) {
|
|
81
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
82
|
+
var r = arguments[e] != null ? arguments[e] : {};
|
|
83
|
+
e % 2 ? Q(Object(r), !0).forEach(function(n) {
|
|
84
|
+
we(t, n, r[n]);
|
|
85
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Q(Object(r)).forEach(function(n) {
|
|
86
|
+
Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
return t;
|
|
90
|
+
}
|
|
91
|
+
function we(t, e, r) {
|
|
92
|
+
return e = _e(e), e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t;
|
|
93
|
+
}
|
|
94
|
+
function _e(t) {
|
|
95
|
+
var e = $e(t, "string");
|
|
96
|
+
return C(e) == "symbol" ? e : String(e);
|
|
97
|
+
}
|
|
98
|
+
function $e(t, e) {
|
|
99
|
+
if (C(t) != "object" || !t) return t;
|
|
100
|
+
var r = t[Symbol.toPrimitive];
|
|
101
|
+
if (r !== void 0) {
|
|
102
|
+
var n = r.call(t, e);
|
|
103
|
+
if (C(n) != "object") return n;
|
|
104
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
105
|
+
}
|
|
106
|
+
return (e === "string" ? String : Number)(t);
|
|
107
|
+
}
|
|
108
|
+
var xe = B(B({}, Ce.commonLocale), {}, {
|
|
138
109
|
locale: "zh_CN",
|
|
139
110
|
today: "今天",
|
|
140
111
|
now: "此刻",
|
|
@@ -162,25 +133,25 @@ var V = Oe(je), Me = k, Ae = (0, V.default)((0, V.default)({}, Me.commonLocale),
|
|
|
162
133
|
cellDateFormat: "D",
|
|
163
134
|
monthBeforeYear: !1
|
|
164
135
|
});
|
|
165
|
-
|
|
166
|
-
var
|
|
167
|
-
Object.defineProperty(
|
|
136
|
+
M.default = xe;
|
|
137
|
+
var $ = {};
|
|
138
|
+
Object.defineProperty($, "__esModule", {
|
|
168
139
|
value: !0
|
|
169
140
|
});
|
|
170
|
-
|
|
171
|
-
const
|
|
141
|
+
$.default = void 0;
|
|
142
|
+
const Se = {
|
|
172
143
|
placeholder: "请选择时间",
|
|
173
144
|
rangePlaceholder: ["开始时间", "结束时间"]
|
|
174
145
|
};
|
|
175
|
-
|
|
176
|
-
var
|
|
177
|
-
Object.defineProperty(
|
|
146
|
+
$.default = Se;
|
|
147
|
+
var Z = I.default;
|
|
148
|
+
Object.defineProperty(_, "__esModule", {
|
|
178
149
|
value: !0
|
|
179
150
|
});
|
|
180
|
-
|
|
181
|
-
var
|
|
182
|
-
const
|
|
183
|
-
lang:
|
|
151
|
+
_.default = void 0;
|
|
152
|
+
var Pe = Z(M), Oe = Z($);
|
|
153
|
+
const K = {
|
|
154
|
+
lang: {
|
|
184
155
|
placeholder: "请选择日期",
|
|
185
156
|
yearPlaceholder: "请选择年份",
|
|
186
157
|
quarterPlaceholder: "请选择季度",
|
|
@@ -190,35 +161,39 @@ const ne = {
|
|
|
190
161
|
rangeYearPlaceholder: ["开始年份", "结束年份"],
|
|
191
162
|
rangeMonthPlaceholder: ["开始月份", "结束月份"],
|
|
192
163
|
rangeQuarterPlaceholder: ["开始季度", "结束季度"],
|
|
193
|
-
rangeWeekPlaceholder: ["开始周", "结束周"]
|
|
194
|
-
|
|
195
|
-
|
|
164
|
+
rangeWeekPlaceholder: ["开始周", "结束周"],
|
|
165
|
+
...Pe.default
|
|
166
|
+
},
|
|
167
|
+
timePickerLocale: {
|
|
168
|
+
...Oe.default
|
|
169
|
+
}
|
|
196
170
|
};
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
var
|
|
200
|
-
Object.defineProperty(
|
|
171
|
+
K.lang.ok = "确定";
|
|
172
|
+
_.default = K;
|
|
173
|
+
var je = I.default;
|
|
174
|
+
Object.defineProperty(N, "__esModule", {
|
|
201
175
|
value: !0
|
|
202
176
|
});
|
|
203
|
-
|
|
204
|
-
var
|
|
205
|
-
|
|
206
|
-
var
|
|
207
|
-
Object.defineProperty(
|
|
177
|
+
N.default = void 0;
|
|
178
|
+
var Ae = je(_);
|
|
179
|
+
N.default = Ae.default;
|
|
180
|
+
var k = I.default;
|
|
181
|
+
Object.defineProperty(A, "__esModule", {
|
|
208
182
|
value: !0
|
|
209
183
|
});
|
|
210
|
-
|
|
211
|
-
var
|
|
212
|
-
const
|
|
184
|
+
A.default = void 0;
|
|
185
|
+
var De = k(D), Ne = k(N), Me = k(_), Re = k($);
|
|
186
|
+
const p = "${label}不是一个有效的${type}", ke = {
|
|
213
187
|
locale: "zh-cn",
|
|
214
|
-
Pagination:
|
|
215
|
-
DatePicker:
|
|
216
|
-
TimePicker:
|
|
217
|
-
Calendar:
|
|
188
|
+
Pagination: De.default,
|
|
189
|
+
DatePicker: Me.default,
|
|
190
|
+
TimePicker: Re.default,
|
|
191
|
+
Calendar: Ne.default,
|
|
218
192
|
// locales for all components
|
|
219
193
|
global: {
|
|
220
194
|
placeholder: "请选择",
|
|
221
|
-
close: "关闭"
|
|
195
|
+
close: "关闭",
|
|
196
|
+
sortable: "可排序"
|
|
222
197
|
},
|
|
223
198
|
Table: {
|
|
224
199
|
filterTitle: "筛选",
|
|
@@ -299,19 +274,19 @@ const f = "${label}不是一个有效的${type}", Fe = {
|
|
|
299
274
|
invalid: "${label}是一个无效日期"
|
|
300
275
|
},
|
|
301
276
|
types: {
|
|
302
|
-
string:
|
|
303
|
-
method:
|
|
304
|
-
array:
|
|
305
|
-
object:
|
|
306
|
-
number:
|
|
307
|
-
date:
|
|
308
|
-
boolean:
|
|
309
|
-
integer:
|
|
310
|
-
float:
|
|
311
|
-
regexp:
|
|
312
|
-
email:
|
|
313
|
-
url:
|
|
314
|
-
hex:
|
|
277
|
+
string: p,
|
|
278
|
+
method: p,
|
|
279
|
+
array: p,
|
|
280
|
+
object: p,
|
|
281
|
+
number: p,
|
|
282
|
+
date: p,
|
|
283
|
+
boolean: p,
|
|
284
|
+
integer: p,
|
|
285
|
+
float: p,
|
|
286
|
+
regexp: p,
|
|
287
|
+
email: p,
|
|
288
|
+
url: p,
|
|
289
|
+
hex: p
|
|
315
290
|
},
|
|
316
291
|
string: {
|
|
317
292
|
len: "${label}须为${len}个字符",
|
|
@@ -336,9 +311,6 @@ const f = "${label}不是一个有效的${type}", Fe = {
|
|
|
336
311
|
}
|
|
337
312
|
}
|
|
338
313
|
},
|
|
339
|
-
Image: {
|
|
340
|
-
preview: "预览"
|
|
341
|
-
},
|
|
342
314
|
QRCode: {
|
|
343
315
|
expired: "二维码过期",
|
|
344
316
|
refresh: "点击刷新",
|
|
@@ -351,184 +323,184 @@ const f = "${label}不是一个有效的${type}", Fe = {
|
|
|
351
323
|
gradientColor: "渐变色"
|
|
352
324
|
}
|
|
353
325
|
};
|
|
354
|
-
|
|
355
|
-
var
|
|
356
|
-
const
|
|
357
|
-
const
|
|
358
|
-
Object.keys(
|
|
359
|
-
if (
|
|
360
|
-
const r =
|
|
361
|
-
m.set(r, e
|
|
326
|
+
A.default = ke;
|
|
327
|
+
var ze = A;
|
|
328
|
+
const Y = /* @__PURE__ */ be(ze), m = /* @__PURE__ */ new Map(), Te = () => {
|
|
329
|
+
const t = ie;
|
|
330
|
+
Object.keys(t).forEach((e) => {
|
|
331
|
+
if (e.startsWith("And") && typeof t[e] == "function") {
|
|
332
|
+
const r = e.toLowerCase().replace("and", "and-");
|
|
333
|
+
m.set(r, t[e]), m.set(e, t[e]);
|
|
362
334
|
}
|
|
363
335
|
});
|
|
364
336
|
};
|
|
365
|
-
|
|
366
|
-
const
|
|
367
|
-
m.set(
|
|
368
|
-
},
|
|
369
|
-
let
|
|
370
|
-
return
|
|
371
|
-
},
|
|
372
|
-
register:
|
|
373
|
-
get:
|
|
374
|
-
getAll:
|
|
375
|
-
has: (
|
|
376
|
-
},
|
|
337
|
+
Te();
|
|
338
|
+
const Ee = (t, e) => {
|
|
339
|
+
m.set(t, e), m.set(t.toLowerCase(), e);
|
|
340
|
+
}, q = (t) => {
|
|
341
|
+
let e = m.get(t);
|
|
342
|
+
return e || (e = m.get(t.toLowerCase()), e) || !t.startsWith("And") && (e = m.get(`And${t}`), e) || t.startsWith("and-") || (e = m.get(`and-${t.toLowerCase()}`)), e;
|
|
343
|
+
}, Le = () => Array.from(m.keys()), ft = {
|
|
344
|
+
register: Ee,
|
|
345
|
+
get: q,
|
|
346
|
+
getAll: Le,
|
|
347
|
+
has: (t) => m.has(t) || m.has(t.toLowerCase())
|
|
348
|
+
}, Fe = (t) => {
|
|
377
349
|
try {
|
|
378
|
-
const
|
|
379
|
-
return
|
|
380
|
-
} catch (
|
|
381
|
-
throw new Error(`Failed to parse page config: ${
|
|
350
|
+
const e = JSON.parse(t);
|
|
351
|
+
return Ie(e);
|
|
352
|
+
} catch (e) {
|
|
353
|
+
throw new Error(`Failed to parse page config: ${e}`);
|
|
382
354
|
}
|
|
383
|
-
},
|
|
384
|
-
if (!
|
|
355
|
+
}, Ie = (t) => {
|
|
356
|
+
if (!t)
|
|
385
357
|
throw new Error("Page config is empty");
|
|
386
|
-
return
|
|
387
|
-
id:
|
|
388
|
-
title:
|
|
389
|
-
style:
|
|
390
|
-
components:
|
|
391
|
-
dataSets:
|
|
392
|
-
actions:
|
|
393
|
-
} :
|
|
394
|
-
},
|
|
358
|
+
return t.html || t.components ? {
|
|
359
|
+
id: t.id,
|
|
360
|
+
title: t.title,
|
|
361
|
+
style: t.style,
|
|
362
|
+
components: E(t.components || []),
|
|
363
|
+
dataSets: t.dataSets || {},
|
|
364
|
+
actions: t.actions || {}
|
|
365
|
+
} : t;
|
|
366
|
+
}, E = (t) => Array.isArray(t) ? t.map((e) => {
|
|
395
367
|
var r;
|
|
396
|
-
return
|
|
397
|
-
id: ((r =
|
|
398
|
-
type:
|
|
399
|
-
props: { ...
|
|
400
|
-
children:
|
|
401
|
-
style:
|
|
368
|
+
return e.tagName || e["data-gjs-type"] ? {
|
|
369
|
+
id: ((r = e.attributes) == null ? void 0 : r.id) || e.id,
|
|
370
|
+
type: e["data-gjs-type"] || e.tagName || "div",
|
|
371
|
+
props: { ...e.attributes },
|
|
372
|
+
children: e.components ? E(e.components) : void 0,
|
|
373
|
+
style: e.style
|
|
402
374
|
} : {
|
|
403
|
-
id:
|
|
404
|
-
type:
|
|
405
|
-
props:
|
|
406
|
-
children:
|
|
407
|
-
style:
|
|
375
|
+
id: e.id,
|
|
376
|
+
type: e.type,
|
|
377
|
+
props: e.props || {},
|
|
378
|
+
children: e.children ? E(e.children) : void 0,
|
|
379
|
+
style: e.style
|
|
408
380
|
};
|
|
409
|
-
}) : [],
|
|
410
|
-
pageConfig:
|
|
411
|
-
sessionId:
|
|
381
|
+
}) : [], Ye = F, qe = G, pt = ({
|
|
382
|
+
pageConfig: t,
|
|
383
|
+
sessionId: e = `runtime_${Date.now()}`,
|
|
412
384
|
develop: r = !1,
|
|
413
385
|
theme: n,
|
|
414
|
-
loading:
|
|
415
|
-
onError:
|
|
386
|
+
loading: s = !1,
|
|
387
|
+
onError: l
|
|
416
388
|
}) => {
|
|
417
|
-
const [
|
|
418
|
-
|
|
389
|
+
const [o, d] = V(null), [c, f] = V(null);
|
|
390
|
+
fe(() => {
|
|
419
391
|
try {
|
|
420
|
-
const
|
|
421
|
-
i
|
|
422
|
-
} catch (
|
|
423
|
-
const u =
|
|
424
|
-
|
|
392
|
+
const i = typeof t == "string" ? Fe(t) : t;
|
|
393
|
+
d(i), f(null);
|
|
394
|
+
} catch (i) {
|
|
395
|
+
const u = i instanceof Error ? i : new Error(String(i));
|
|
396
|
+
f(u), l == null || l(u);
|
|
425
397
|
}
|
|
426
|
-
}, [
|
|
427
|
-
const h = (
|
|
428
|
-
var
|
|
429
|
-
const
|
|
430
|
-
if (!
|
|
431
|
-
return r ? /* @__PURE__ */
|
|
398
|
+
}, [t, l]);
|
|
399
|
+
const h = (i, u) => {
|
|
400
|
+
var H;
|
|
401
|
+
const b = q(i.type);
|
|
402
|
+
if (!b)
|
|
403
|
+
return r ? /* @__PURE__ */ T("div", { style: { padding: 8, background: "#fff1f0", border: "1px solid #ffa39e", borderRadius: 4 }, children: [
|
|
432
404
|
"未知组件: ",
|
|
433
|
-
|
|
434
|
-
] },
|
|
435
|
-
const
|
|
436
|
-
...
|
|
437
|
-
id:
|
|
438
|
-
sessionId:
|
|
405
|
+
i.type
|
|
406
|
+
] }, i.id || u) : (console.warn(`Unknown component type: ${i.type}`), null);
|
|
407
|
+
const v = {
|
|
408
|
+
...i.props,
|
|
409
|
+
id: i.id,
|
|
410
|
+
sessionId: e,
|
|
439
411
|
develop: r,
|
|
440
|
-
key:
|
|
441
|
-
},
|
|
442
|
-
return P.createElement(
|
|
443
|
-
}, y =
|
|
444
|
-
/* @__PURE__ */
|
|
445
|
-
/* @__PURE__ */
|
|
446
|
-
] }) :
|
|
447
|
-
return /* @__PURE__ */
|
|
448
|
-
},
|
|
449
|
-
const
|
|
450
|
-
return
|
|
451
|
-
},
|
|
452
|
-
|
|
412
|
+
key: i.id || u
|
|
413
|
+
}, ne = (H = i.children) == null ? void 0 : H.map((oe, ae) => h(oe, ae));
|
|
414
|
+
return P.createElement(b, v, ne);
|
|
415
|
+
}, y = S(() => s ? /* @__PURE__ */ a("div", { style: { display: "flex", justifyContent: "center", alignItems: "center", minHeight: 200 }, children: /* @__PURE__ */ a(Ye, { size: "large" }) }) : c ? /* @__PURE__ */ T("div", { style: { padding: 24, background: "#fff2f0", border: "1px solid #ffccc7", borderRadius: 8 }, children: [
|
|
416
|
+
/* @__PURE__ */ a("h3", { style: { color: "#cf1322" }, children: "渲染错误" }),
|
|
417
|
+
/* @__PURE__ */ a("p", { children: c.message })
|
|
418
|
+
] }) : o ? /* @__PURE__ */ a("div", { className: "runtime-container", style: o.style, children: o.components.map((i, u) => h(i, u)) }) : null, [s, c, o, e, r]);
|
|
419
|
+
return /* @__PURE__ */ a(qe, { locale: Y, theme: n, children: y });
|
|
420
|
+
}, Ue = (t) => (e, r, n) => (n.setState = (s, l, ...o) => {
|
|
421
|
+
const d = typeof s == "function" ? ge(s) : s;
|
|
422
|
+
return e(d, l, ...o);
|
|
423
|
+
}, t(n.setState, r, n)), We = Ue, mt = ye()(
|
|
424
|
+
We((t) => ({
|
|
453
425
|
currentPageId: null,
|
|
454
426
|
pageConfigs: {},
|
|
455
427
|
loading: !1,
|
|
456
428
|
error: null,
|
|
457
|
-
setCurrentPage: (
|
|
458
|
-
r.currentPageId =
|
|
429
|
+
setCurrentPage: (e) => t((r) => {
|
|
430
|
+
r.currentPageId = e;
|
|
459
431
|
}),
|
|
460
|
-
setPageConfig: (
|
|
461
|
-
n.pageConfigs[
|
|
432
|
+
setPageConfig: (e, r) => t((n) => {
|
|
433
|
+
n.pageConfigs[e] = r;
|
|
462
434
|
}),
|
|
463
|
-
setLoading: (
|
|
464
|
-
r.loading =
|
|
435
|
+
setLoading: (e) => t((r) => {
|
|
436
|
+
r.loading = e;
|
|
465
437
|
}),
|
|
466
|
-
setError: (
|
|
467
|
-
r.error =
|
|
438
|
+
setError: (e) => t((r) => {
|
|
439
|
+
r.error = e;
|
|
468
440
|
}),
|
|
469
|
-
clearCache: () =>
|
|
470
|
-
|
|
441
|
+
clearCache: () => t((e) => {
|
|
442
|
+
e.pageConfigs = {};
|
|
471
443
|
})
|
|
472
444
|
}))
|
|
473
|
-
),
|
|
474
|
-
|
|
475
|
-
},
|
|
476
|
-
const { actionName: r, arg: n } =
|
|
477
|
-
if (
|
|
478
|
-
return
|
|
479
|
-
const
|
|
480
|
-
return
|
|
445
|
+
), U = /* @__PURE__ */ new Map(), x = (t, e) => {
|
|
446
|
+
U.set(t, e);
|
|
447
|
+
}, He = async (t, e) => {
|
|
448
|
+
const { actionName: r, arg: n } = ce(t, e.value), s = U.get(r);
|
|
449
|
+
if (s)
|
|
450
|
+
return s(e, n);
|
|
451
|
+
const l = g.getState().addCommand;
|
|
452
|
+
return l(e.sessionId, {
|
|
481
453
|
actionName: r,
|
|
482
454
|
arg: n,
|
|
483
455
|
timestamp: Date.now()
|
|
484
456
|
}), { actionName: r, arg: n };
|
|
485
457
|
};
|
|
486
|
-
|
|
487
|
-
const { setDataSet: r } =
|
|
488
|
-
|
|
458
|
+
x("setDataSet", (t, e) => {
|
|
459
|
+
const { setDataSet: r } = g.getState();
|
|
460
|
+
e != null && e.dataSet && (e == null ? void 0 : e.field) !== void 0 && r(e.dataSet, e.field, e.value);
|
|
489
461
|
});
|
|
490
|
-
|
|
491
|
-
typeof window < "u" && (
|
|
462
|
+
x("navigate", (t, e) => {
|
|
463
|
+
typeof window < "u" && (e != null && e.url) && (e.target === "_blank" ? window.open(e.url, "_blank") : window.location.href = e.url);
|
|
492
464
|
});
|
|
493
|
-
|
|
494
|
-
typeof window < "u" && window.alert((
|
|
465
|
+
x("alert", (t, e) => {
|
|
466
|
+
typeof window < "u" && window.alert((e == null ? void 0 : e.message) || e);
|
|
495
467
|
});
|
|
496
|
-
|
|
468
|
+
x("console", (t, e) => {
|
|
497
469
|
});
|
|
498
|
-
const
|
|
499
|
-
execute:
|
|
500
|
-
register:
|
|
501
|
-
hasHandler: (
|
|
502
|
-
},
|
|
503
|
-
componentName:
|
|
504
|
-
componentProps:
|
|
470
|
+
const ht = {
|
|
471
|
+
execute: He,
|
|
472
|
+
register: x,
|
|
473
|
+
hasHandler: (t) => U.has(t)
|
|
474
|
+
}, Ve = F, yt = ({
|
|
475
|
+
componentName: t,
|
|
476
|
+
componentProps: e = {},
|
|
505
477
|
storePropsKey: r,
|
|
506
478
|
sessionId: n,
|
|
507
|
-
loadingFallback:
|
|
508
|
-
notFoundFallback:
|
|
509
|
-
onError:
|
|
479
|
+
loadingFallback: s,
|
|
480
|
+
notFoundFallback: l,
|
|
481
|
+
onError: o
|
|
510
482
|
}) => {
|
|
511
|
-
const
|
|
483
|
+
const d = g((i) => {
|
|
512
484
|
if (!r) return null;
|
|
513
|
-
const
|
|
514
|
-
return
|
|
515
|
-
}),
|
|
516
|
-
if (!r || !
|
|
485
|
+
const b = r.split(".")[0];
|
|
486
|
+
return i.dataSets[b];
|
|
487
|
+
}), c = S(() => {
|
|
488
|
+
if (!r || !d) return {};
|
|
517
489
|
const u = r.split(".")[1];
|
|
518
|
-
return u ?
|
|
519
|
-
}, [r,
|
|
520
|
-
...
|
|
521
|
-
...
|
|
490
|
+
return u ? d[u] || {} : d;
|
|
491
|
+
}, [r, d]), f = S(() => ({
|
|
492
|
+
...c,
|
|
493
|
+
...e,
|
|
522
494
|
sessionId: n
|
|
523
|
-
}), [
|
|
495
|
+
}), [c, e, n]), h = S(() => {
|
|
524
496
|
try {
|
|
525
|
-
return
|
|
526
|
-
} catch (
|
|
527
|
-
const u =
|
|
528
|
-
return
|
|
497
|
+
return q(t);
|
|
498
|
+
} catch (i) {
|
|
499
|
+
const u = i instanceof Error ? i : new Error(String(i));
|
|
500
|
+
return o == null || o(u), null;
|
|
529
501
|
}
|
|
530
|
-
}, [
|
|
531
|
-
return h ? /* @__PURE__ */
|
|
502
|
+
}, [t, o]), y = /* @__PURE__ */ a("div", { style: { display: "flex", justifyContent: "center", padding: 24 }, children: /* @__PURE__ */ a(Ve, {}) });
|
|
503
|
+
return h ? /* @__PURE__ */ a(L, { fallback: s || y, children: /* @__PURE__ */ a(h, { ...f }) }) : l ? /* @__PURE__ */ a(ue, { children: l }) : /* @__PURE__ */ T("div", { style: {
|
|
532
504
|
padding: 16,
|
|
533
505
|
background: "#fff7e6",
|
|
534
506
|
border: "1px solid #ffd591",
|
|
@@ -537,10 +509,10 @@ const Ct = {
|
|
|
537
509
|
color: "#d46b08"
|
|
538
510
|
}, children: [
|
|
539
511
|
"组件未找到: ",
|
|
540
|
-
|
|
512
|
+
t
|
|
541
513
|
] });
|
|
542
|
-
},
|
|
543
|
-
class
|
|
514
|
+
}, Qe = he, Be = me, O = F, ee = G;
|
|
515
|
+
class Ge {
|
|
544
516
|
constructor() {
|
|
545
517
|
z(this, "drawers", /* @__PURE__ */ new Map());
|
|
546
518
|
z(this, "isSetup", !1);
|
|
@@ -548,22 +520,22 @@ class tt {
|
|
|
548
520
|
/**
|
|
549
521
|
* 添加 Drawer 实例
|
|
550
522
|
*/
|
|
551
|
-
add(
|
|
552
|
-
this.drawers.set(
|
|
523
|
+
add(e) {
|
|
524
|
+
this.drawers.set(e.id, e), this.setupGlobalCleanup();
|
|
553
525
|
}
|
|
554
526
|
/**
|
|
555
527
|
* 移除 Drawer 实例
|
|
556
528
|
*/
|
|
557
|
-
remove(
|
|
558
|
-
this.drawers.delete(
|
|
529
|
+
remove(e) {
|
|
530
|
+
this.drawers.delete(e);
|
|
559
531
|
}
|
|
560
532
|
/**
|
|
561
533
|
* 清理所有 Drawer
|
|
562
534
|
*/
|
|
563
535
|
cleanupAll() {
|
|
564
|
-
this.drawers.forEach((
|
|
536
|
+
this.drawers.forEach((e) => {
|
|
565
537
|
try {
|
|
566
|
-
|
|
538
|
+
e.cleanup();
|
|
567
539
|
} catch (r) {
|
|
568
540
|
console.error("Failed to cleanup drawer:", r);
|
|
569
541
|
}
|
|
@@ -581,20 +553,20 @@ class tt {
|
|
|
581
553
|
setupGlobalCleanup() {
|
|
582
554
|
this.isSetup || typeof window > "u" || (this.isSetup = !0, window.addEventListener("beforeunload", () => {
|
|
583
555
|
this.cleanupAll();
|
|
584
|
-
})
|
|
556
|
+
}));
|
|
585
557
|
}
|
|
586
558
|
}
|
|
587
|
-
const j = new
|
|
588
|
-
const [n,
|
|
559
|
+
const j = new Ge(), te = () => `drawer-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, Je = ({ options: t, onClose: e, Component: r }) => {
|
|
560
|
+
const [n, s] = P.useState(!0), l = w(), o = () => {
|
|
589
561
|
var y;
|
|
590
|
-
|
|
591
|
-
|
|
562
|
+
s(!1), (y = t.onClose) == null || y.call(t), setTimeout(() => {
|
|
563
|
+
e();
|
|
592
564
|
}, 300);
|
|
593
|
-
}, { component:
|
|
594
|
-
return /* @__PURE__ */
|
|
565
|
+
}, { component: d, componentName: c, componentProps: f, ...h } = t;
|
|
566
|
+
return /* @__PURE__ */ a(ee, { locale: Y, theme: l.theme, children: /* @__PURE__ */ a(Qe, { ...h, open: n, onClose: o, destroyOnClose: !0, children: r ? /* @__PURE__ */ a(
|
|
595
567
|
L,
|
|
596
568
|
{
|
|
597
|
-
fallback: /* @__PURE__ */
|
|
569
|
+
fallback: /* @__PURE__ */ a(
|
|
598
570
|
"div",
|
|
599
571
|
{
|
|
600
572
|
style: {
|
|
@@ -602,12 +574,12 @@ const j = new tt(), ae = () => `drawer-${Date.now()}-${Math.random().toString(36
|
|
|
602
574
|
justifyContent: "center",
|
|
603
575
|
padding: 40
|
|
604
576
|
},
|
|
605
|
-
children: /* @__PURE__ */
|
|
577
|
+
children: /* @__PURE__ */ a(O, {})
|
|
606
578
|
}
|
|
607
579
|
),
|
|
608
|
-
children: /* @__PURE__ */
|
|
580
|
+
children: /* @__PURE__ */ a(r, { ...f || {}, onClose: o })
|
|
609
581
|
}
|
|
610
|
-
) : /* @__PURE__ */
|
|
582
|
+
) : /* @__PURE__ */ a(
|
|
611
583
|
"div",
|
|
612
584
|
{
|
|
613
585
|
style: {
|
|
@@ -616,41 +588,41 @@ const j = new tt(), ae = () => `drawer-${Date.now()}-${Math.random().toString(36
|
|
|
616
588
|
alignItems: "center",
|
|
617
589
|
height: "100%"
|
|
618
590
|
},
|
|
619
|
-
children: /* @__PURE__ */
|
|
591
|
+
children: /* @__PURE__ */ a(O, { tip: "加载中..." })
|
|
620
592
|
}
|
|
621
593
|
) }) });
|
|
622
|
-
},
|
|
623
|
-
const [n,
|
|
624
|
-
var
|
|
625
|
-
|
|
626
|
-
|
|
594
|
+
}, Xe = ({ options: t, onClose: e, Component: r }) => {
|
|
595
|
+
const [n, s] = P.useState(!0), [l, o] = P.useState(!1), d = w(), c = () => {
|
|
596
|
+
var v;
|
|
597
|
+
s(!1), (v = t.onClose) == null || v.call(t), setTimeout(() => {
|
|
598
|
+
e();
|
|
627
599
|
}, 300);
|
|
628
|
-
},
|
|
629
|
-
if (
|
|
630
|
-
|
|
600
|
+
}, f = async () => {
|
|
601
|
+
if (t.onOk) {
|
|
602
|
+
o(!0);
|
|
631
603
|
try {
|
|
632
|
-
await
|
|
633
|
-
} catch (
|
|
634
|
-
console.error("Modal onOk error:",
|
|
604
|
+
await t.onOk(), c();
|
|
605
|
+
} catch (v) {
|
|
606
|
+
console.error("Modal onOk error:", v);
|
|
635
607
|
} finally {
|
|
636
|
-
|
|
608
|
+
o(!1);
|
|
637
609
|
}
|
|
638
610
|
} else
|
|
639
|
-
|
|
640
|
-
}, { component: h, componentName: y, componentProps:
|
|
641
|
-
return /* @__PURE__ */
|
|
642
|
-
|
|
611
|
+
c();
|
|
612
|
+
}, { component: h, componentName: y, componentProps: i, onOk: u, ...b } = t;
|
|
613
|
+
return /* @__PURE__ */ a(ee, { locale: Y, theme: d.theme, children: /* @__PURE__ */ a(
|
|
614
|
+
Be,
|
|
643
615
|
{
|
|
644
|
-
...
|
|
616
|
+
...b,
|
|
645
617
|
open: n,
|
|
646
|
-
onCancel:
|
|
647
|
-
onOk:
|
|
648
|
-
confirmLoading:
|
|
618
|
+
onCancel: c,
|
|
619
|
+
onOk: f,
|
|
620
|
+
confirmLoading: l,
|
|
649
621
|
destroyOnClose: !0,
|
|
650
|
-
children: r ? /* @__PURE__ */
|
|
622
|
+
children: r ? /* @__PURE__ */ a(
|
|
651
623
|
L,
|
|
652
624
|
{
|
|
653
|
-
fallback: /* @__PURE__ */
|
|
625
|
+
fallback: /* @__PURE__ */ a(
|
|
654
626
|
"div",
|
|
655
627
|
{
|
|
656
628
|
style: {
|
|
@@ -658,12 +630,12 @@ const j = new tt(), ae = () => `drawer-${Date.now()}-${Math.random().toString(36
|
|
|
658
630
|
justifyContent: "center",
|
|
659
631
|
padding: 40
|
|
660
632
|
},
|
|
661
|
-
children: /* @__PURE__ */
|
|
633
|
+
children: /* @__PURE__ */ a(O, {})
|
|
662
634
|
}
|
|
663
635
|
),
|
|
664
|
-
children: /* @__PURE__ */
|
|
636
|
+
children: /* @__PURE__ */ a(r, { ...i || {}, onClose: c })
|
|
665
637
|
}
|
|
666
|
-
) : /* @__PURE__ */
|
|
638
|
+
) : /* @__PURE__ */ a(
|
|
667
639
|
"div",
|
|
668
640
|
{
|
|
669
641
|
style: {
|
|
@@ -672,148 +644,148 @@ const j = new tt(), ae = () => `drawer-${Date.now()}-${Math.random().toString(36
|
|
|
672
644
|
alignItems: "center",
|
|
673
645
|
minHeight: 100
|
|
674
646
|
},
|
|
675
|
-
children: /* @__PURE__ */
|
|
647
|
+
children: /* @__PURE__ */ a(O, { tip: "加载中..." })
|
|
676
648
|
}
|
|
677
649
|
)
|
|
678
650
|
}
|
|
679
651
|
) });
|
|
680
652
|
};
|
|
681
|
-
function
|
|
682
|
-
const
|
|
683
|
-
r.setAttribute("data-drawer-container", "true"), r.setAttribute("data-drawer-id",
|
|
684
|
-
const n =
|
|
685
|
-
var
|
|
653
|
+
function Ze(t) {
|
|
654
|
+
const e = te(), r = document.createElement("div");
|
|
655
|
+
r.setAttribute("data-drawer-container", "true"), r.setAttribute("data-drawer-id", e), document.body.appendChild(r);
|
|
656
|
+
const n = J(r), s = () => {
|
|
657
|
+
var o;
|
|
686
658
|
try {
|
|
687
|
-
j.remove(
|
|
688
|
-
} catch (
|
|
689
|
-
console.error("Drawer cleanup failed:",
|
|
659
|
+
j.remove(e), n.unmount(), r.remove(), (o = t.afterClose) == null || o.call(t);
|
|
660
|
+
} catch (d) {
|
|
661
|
+
console.error("Drawer cleanup failed:", d);
|
|
690
662
|
}
|
|
691
663
|
};
|
|
692
|
-
j.add({ id:
|
|
693
|
-
let
|
|
694
|
-
if (!
|
|
695
|
-
const
|
|
696
|
-
|
|
664
|
+
j.add({ id: e, root: n, mountNode: r, cleanup: s });
|
|
665
|
+
let l = t.component || null;
|
|
666
|
+
if (!l && t.componentName) {
|
|
667
|
+
const o = w();
|
|
668
|
+
o.componentResolver ? l = o.componentResolver(t.componentName) : console.warn(
|
|
697
669
|
"[UIUtils.showDrawer] componentResolver not configured. Cannot resolve component:",
|
|
698
|
-
|
|
670
|
+
t.componentName
|
|
699
671
|
);
|
|
700
672
|
}
|
|
701
673
|
return n.render(
|
|
702
|
-
/* @__PURE__ */
|
|
703
|
-
),
|
|
674
|
+
/* @__PURE__ */ a(Je, { options: t, onClose: s, Component: l })
|
|
675
|
+
), s;
|
|
704
676
|
}
|
|
705
|
-
function
|
|
706
|
-
const
|
|
707
|
-
r.setAttribute("data-modal-container", "true"), r.setAttribute("data-modal-id",
|
|
708
|
-
const n =
|
|
677
|
+
function Ke(t) {
|
|
678
|
+
const e = te(), r = document.createElement("div");
|
|
679
|
+
r.setAttribute("data-modal-container", "true"), r.setAttribute("data-modal-id", e), document.body.appendChild(r);
|
|
680
|
+
const n = J(r), s = () => {
|
|
709
681
|
try {
|
|
710
682
|
n.unmount(), r.remove();
|
|
711
|
-
} catch (
|
|
712
|
-
console.error("Modal cleanup failed:",
|
|
683
|
+
} catch (o) {
|
|
684
|
+
console.error("Modal cleanup failed:", o);
|
|
713
685
|
}
|
|
714
686
|
};
|
|
715
|
-
let
|
|
716
|
-
if (!
|
|
717
|
-
const
|
|
718
|
-
|
|
687
|
+
let l = t.component || null;
|
|
688
|
+
if (!l && t.componentName) {
|
|
689
|
+
const o = w();
|
|
690
|
+
o.componentResolver ? l = o.componentResolver(t.componentName) : console.warn(
|
|
719
691
|
"[UIUtils.showModal] componentResolver not configured. Cannot resolve component:",
|
|
720
|
-
|
|
692
|
+
t.componentName
|
|
721
693
|
);
|
|
722
694
|
}
|
|
723
695
|
return n.render(
|
|
724
|
-
/* @__PURE__ */
|
|
725
|
-
),
|
|
696
|
+
/* @__PURE__ */ a(Xe, { options: t, onClose: s, Component: l })
|
|
697
|
+
), s;
|
|
726
698
|
}
|
|
727
|
-
function
|
|
699
|
+
function et() {
|
|
728
700
|
j.cleanupAll();
|
|
729
701
|
}
|
|
730
|
-
function
|
|
702
|
+
function tt() {
|
|
731
703
|
return j.count;
|
|
732
704
|
}
|
|
733
|
-
function
|
|
734
|
-
|
|
705
|
+
function rt(t, e, r, n) {
|
|
706
|
+
pe[t](e, r, n);
|
|
735
707
|
}
|
|
736
|
-
const
|
|
737
|
-
showDrawer:
|
|
738
|
-
showModal:
|
|
739
|
-
cleanupAllDrawers:
|
|
740
|
-
getDrawerCount:
|
|
741
|
-
msg:
|
|
742
|
-
},
|
|
743
|
-
|
|
744
|
-
},
|
|
745
|
-
|
|
746
|
-
},
|
|
747
|
-
r ? r(
|
|
748
|
-
typeof n[
|
|
749
|
-
`Action "${
|
|
708
|
+
const gt = {
|
|
709
|
+
showDrawer: Ze,
|
|
710
|
+
showModal: Ke,
|
|
711
|
+
cleanupAllDrawers: et,
|
|
712
|
+
getDrawerCount: tt,
|
|
713
|
+
msg: rt
|
|
714
|
+
}, W = { module: "Module1" }, re = { router: void 0 }, bt = (t) => {
|
|
715
|
+
W.module = t;
|
|
716
|
+
}, vt = (t) => {
|
|
717
|
+
re.router = t;
|
|
718
|
+
}, nt = (t, e, r) => {
|
|
719
|
+
r ? r(W.module).then((n) => {
|
|
720
|
+
typeof n[t] == "function" ? n[t](e) : console.error(
|
|
721
|
+
`Action "${t}" does not exist on the module.`
|
|
750
722
|
);
|
|
751
723
|
}).catch((n) => {
|
|
752
|
-
console.error(`Failed to execute action:${
|
|
724
|
+
console.error(`Failed to execute action:${t}`, n);
|
|
753
725
|
}) : console.warn(
|
|
754
726
|
"Module loader not configured. Please provide moduleLoader in initRuntime options."
|
|
755
727
|
);
|
|
756
|
-
},
|
|
757
|
-
const { sessionId:
|
|
758
|
-
let
|
|
759
|
-
return
|
|
760
|
-
const
|
|
761
|
-
if (
|
|
762
|
-
|
|
728
|
+
}, Ct = (t) => {
|
|
729
|
+
const { sessionId: e = "default", utils: r, moduleLoader: n } = t || {}, s = w();
|
|
730
|
+
let l = 0;
|
|
731
|
+
return g.subscribe((d) => {
|
|
732
|
+
const c = d.commandQueues[e] ?? [];
|
|
733
|
+
if (c.length <= l) {
|
|
734
|
+
l = c.length;
|
|
763
735
|
return;
|
|
764
736
|
}
|
|
765
|
-
const
|
|
766
|
-
!
|
|
767
|
-
|
|
737
|
+
const f = c[c.length - 1];
|
|
738
|
+
!f || typeof f.actionName != "string" || (l = c.length, g.getState().popCommand(e), nt(
|
|
739
|
+
f.actionName,
|
|
768
740
|
{
|
|
769
|
-
...
|
|
770
|
-
moduleName:
|
|
741
|
+
...f.arg,
|
|
742
|
+
moduleName: W.module,
|
|
771
743
|
ctx: {
|
|
772
744
|
utils: r,
|
|
773
|
-
useStoreByName:
|
|
774
|
-
defHttp:
|
|
745
|
+
useStoreByName: de,
|
|
746
|
+
defHttp: s.request,
|
|
775
747
|
useValidateWatchStore: void 0,
|
|
776
|
-
router:
|
|
748
|
+
router: re.router
|
|
777
749
|
}
|
|
778
750
|
},
|
|
779
751
|
n
|
|
780
752
|
));
|
|
781
753
|
});
|
|
782
754
|
};
|
|
783
|
-
function
|
|
784
|
-
return
|
|
785
|
-
(
|
|
755
|
+
function wt(t) {
|
|
756
|
+
return t && typeof t == "object" ? Object.values(t).some(
|
|
757
|
+
(e) => typeof e == "string" && e.trim().length > 0
|
|
786
758
|
) : !1;
|
|
787
759
|
}
|
|
788
|
-
function
|
|
789
|
-
|
|
790
|
-
...
|
|
760
|
+
function _t(t, e) {
|
|
761
|
+
g.getState().addCommand(t, {
|
|
762
|
+
...e,
|
|
791
763
|
timestamp: Date.now()
|
|
792
764
|
});
|
|
793
765
|
}
|
|
794
|
-
function
|
|
795
|
-
return
|
|
766
|
+
function $t(t, e) {
|
|
767
|
+
return g.getState().getValidateResults(t, e) ?? {};
|
|
796
768
|
}
|
|
797
769
|
export {
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
770
|
+
ht as ActionExecutor,
|
|
771
|
+
ft as ComponentRegistry,
|
|
772
|
+
yt as DynamicContainer,
|
|
773
|
+
pt as RuntimeRenderer,
|
|
774
|
+
gt as UIUtils,
|
|
775
|
+
_t as addCommand,
|
|
776
|
+
et as cleanupAllDrawers,
|
|
777
|
+
q as getComponent,
|
|
778
|
+
tt as getDrawerCount,
|
|
779
|
+
$t as getValidateResults,
|
|
780
|
+
Ct as initRuntime,
|
|
781
|
+
rt as msg,
|
|
782
|
+
Fe as parsePageConfig,
|
|
783
|
+
Ee as registerComponent,
|
|
784
|
+
vt as setRoute,
|
|
785
|
+
Ze as showDrawer,
|
|
786
|
+
Ke as showModal,
|
|
787
|
+
bt as useModule,
|
|
788
|
+
mt as useRuntimeStore,
|
|
789
|
+
wt as validateFailed
|
|
818
790
|
};
|
|
819
791
|
//# sourceMappingURL=index.esm.js.map
|