magtool 1.5.45 → 1.5.47
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/cpt/component.js +29 -19
- package/dist/vendor.js +26 -29
- package/package.json +1 -1
package/dist/cpt/component.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { a as p } from "../vendor.js";
|
|
2
|
-
import { defineAsyncComponent as
|
|
3
|
-
|
|
2
|
+
import { defineAsyncComponent as n } from "vue";
|
|
3
|
+
import v from "markdown-it";
|
|
4
|
+
import l from "echarts";
|
|
5
|
+
import x from "bignumber.js";
|
|
6
|
+
class S {
|
|
4
7
|
constructor() {
|
|
5
8
|
this.appRegistrationStatus = /* @__PURE__ */ new WeakMap(), this.loadedComponents = /* @__PURE__ */ new Map(), this.loadingPromises = /* @__PURE__ */ new Map();
|
|
6
9
|
}
|
|
@@ -8,7 +11,8 @@ class c {
|
|
|
8
11
|
if (this.appRegistrationStatus.has(e))
|
|
9
12
|
return console.warn("Components already registered for this app instance"), !1;
|
|
10
13
|
try {
|
|
11
|
-
|
|
14
|
+
const t = await Promise.resolve().then(() => h);
|
|
15
|
+
return await Promise.resolve().then(() => A), t.default(e), this.appRegistrationStatus.set(e, {
|
|
12
16
|
registeredAt: /* @__PURE__ */ new Date(),
|
|
13
17
|
components: Object.keys(await this.getAllComponentNames())
|
|
14
18
|
}), !0;
|
|
@@ -21,7 +25,7 @@ class c {
|
|
|
21
25
|
return console.warn("componentNames should be a non-empty array"), !1;
|
|
22
26
|
try {
|
|
23
27
|
for (const r of t)
|
|
24
|
-
await this.
|
|
28
|
+
await this.regist1(e, r);
|
|
25
29
|
return !0;
|
|
26
30
|
} catch (r) {
|
|
27
31
|
return console.error("Failed to register specific components:", r), !1;
|
|
@@ -35,18 +39,18 @@ class c {
|
|
|
35
39
|
return await this.loadingPromises.get(t), e.component(t, this.loadedComponents.get(t)), !0;
|
|
36
40
|
const r = this._loadComponent(t);
|
|
37
41
|
this.loadingPromises.set(t, r);
|
|
38
|
-
const
|
|
39
|
-
return this.loadedComponents.set(t,
|
|
42
|
+
const o = await r;
|
|
43
|
+
return this.loadedComponents.set(t, o), e.component(t, o), this.loadingPromises.delete(t), !0;
|
|
40
44
|
} catch (r) {
|
|
41
45
|
return console.warn(`Failed to load component ${t}:`, r), !1;
|
|
42
46
|
}
|
|
43
47
|
}
|
|
44
48
|
async _loadComponent(e) {
|
|
45
49
|
try {
|
|
46
|
-
return
|
|
50
|
+
return n(() => p(/* @__PURE__ */ Object.assign({ "./Mvc/Card/index.vue": () => import("./Card.js"), "./Mvc/Icon/index.vue": () => import("./Icon.js"), "./Mvc/Image/index.vue": () => import("./Image.js"), "./Mvc/Input/index.vue": () => import("./Input.js"), "./Mvc/Nodata/index.vue": () => import("./Nodata.js"), "./Mvc/Page/index.vue": () => import("./Page.js"), "./Mvc/Textarea/index.vue": () => import("./Textarea.js") }), `./Mvc/${e}/index.vue`, 4));
|
|
47
51
|
} catch {
|
|
48
52
|
try {
|
|
49
|
-
return
|
|
53
|
+
return n(() => p(/* @__PURE__ */ Object.assign({ "./Super/AiApp/index.vue": () => import("./AiApp.js"), "./Super/AiOrg/index.vue": () => import("./AiOrg.js"), "./Super/AsaAdGroup/index.vue": () => import("./AsaAdGroup.js"), "./Super/AsaApp/index.vue": () => import("./AsaApp.js"), "./Super/AsaCampaign/index.vue": () => import("./AsaCampaign.js"), "./Super/AsaOrg/index.vue": () => import("./AsaOrg.js"), "./Super/Country/index.vue": () => import("./Country.js"), "./Super/CountryItem/index.vue": () => import("./CountryItem.js"), "./Super/DatePicker/index.vue": () => import("./DatePicker.js"), "./Super/EChart/index.vue": () => import("./EChart.js"), "./Super/Form/index.vue": () => import("./Form.js"), "./Super/MultipleSelect/index.vue": () => import("./MultipleSelect.js"), "./Super/Org/index.vue": () => import("./Org.js"), "./Super/StatusItem/index.vue": () => import("./StatusItem.js"), "./Super/StatusSelect/index.vue": () => import("./StatusSelect.js"), "./Super/Table/index.vue": () => import("./Table.js"), "./Super/Timezone/index.vue": () => import("./Timezone.js") }), `./Super/${e}/index.vue`, 4));
|
|
50
54
|
} catch {
|
|
51
55
|
throw new Error(`Component ${e} not found in Mvc or Super directories`);
|
|
52
56
|
}
|
|
@@ -55,10 +59,10 @@ class c {
|
|
|
55
59
|
async getAllComponentNames() {
|
|
56
60
|
const t = Object.keys(/* @__PURE__ */ Object.assign({ "./Mvc/Card/index.vue": () => import("./Card.js"), "./Mvc/Icon/index.vue": () => import("./Icon.js"), "./Mvc/Image/index.vue": () => import("./Image.js"), "./Mvc/Input/index.vue": () => import("./Input.js"), "./Mvc/Nodata/index.vue": () => import("./Nodata.js"), "./Mvc/Page/index.vue": () => import("./Page.js"), "./Mvc/Textarea/index.vue": () => import("./Textarea.js") })).map(
|
|
57
61
|
(u) => u.match(/Mvc\/(\S*)\/index.vue/)[1]
|
|
58
|
-
),
|
|
62
|
+
), o = Object.keys(/* @__PURE__ */ Object.assign({ "./Super/AiApp/index.vue": () => import("./AiApp.js"), "./Super/AiOrg/index.vue": () => import("./AiOrg.js"), "./Super/AsaAdGroup/index.vue": () => import("./AsaAdGroup.js"), "./Super/AsaApp/index.vue": () => import("./AsaApp.js"), "./Super/AsaCampaign/index.vue": () => import("./AsaCampaign.js"), "./Super/AsaOrg/index.vue": () => import("./AsaOrg.js"), "./Super/Country/index.vue": () => import("./Country.js"), "./Super/CountryItem/index.vue": () => import("./CountryItem.js"), "./Super/DatePicker/index.vue": () => import("./DatePicker.js"), "./Super/EChart/index.vue": () => import("./EChart.js"), "./Super/Form/index.vue": () => import("./Form.js"), "./Super/MultipleSelect/index.vue": () => import("./MultipleSelect.js"), "./Super/Org/index.vue": () => import("./Org.js"), "./Super/StatusItem/index.vue": () => import("./StatusItem.js"), "./Super/StatusSelect/index.vue": () => import("./StatusSelect.js"), "./Super/Table/index.vue": () => import("./Table.js"), "./Super/Timezone/index.vue": () => import("./Timezone.js") })).map(
|
|
59
63
|
(u) => u.match(/Super\/(\S*)\/index.vue/)[1]
|
|
60
64
|
);
|
|
61
|
-
return [...t, ...
|
|
65
|
+
return [...t, ...o];
|
|
62
66
|
}
|
|
63
67
|
/**
|
|
64
68
|
* 检查应用实例的注册状态
|
|
@@ -97,26 +101,32 @@ class c {
|
|
|
97
101
|
this.appRegistrationStatus = /* @__PURE__ */ new WeakMap(), this.loadedComponents.clear(), this.loadingPromises.clear();
|
|
98
102
|
}
|
|
99
103
|
}
|
|
100
|
-
const
|
|
104
|
+
const b = new S(), s = /* @__PURE__ */ Object.assign({ "./Mvc/Card/index.vue": () => import("./Card.js"), "./Mvc/Icon/index.vue": () => import("./Icon.js"), "./Mvc/Image/index.vue": () => import("./Image.js"), "./Mvc/Input/index.vue": () => import("./Input.js"), "./Mvc/Nodata/index.vue": () => import("./Nodata.js"), "./Mvc/Page/index.vue": () => import("./Page.js"), "./Mvc/Textarea/index.vue": () => import("./Textarea.js") }), m = {};
|
|
101
105
|
for (const i in s) {
|
|
102
106
|
const e = i.match(/Mvc\/(\S*)\/index.vue/)[1];
|
|
103
|
-
m[e] =
|
|
107
|
+
m[e] = n(s[i]);
|
|
104
108
|
}
|
|
105
|
-
const a = /* @__PURE__ */ Object.assign({ "./Super/AiApp/index.vue": () => import("./AiApp.js"), "./Super/AiOrg/index.vue": () => import("./AiOrg.js"), "./Super/AsaAdGroup/index.vue": () => import("./AsaAdGroup.js"), "./Super/AsaApp/index.vue": () => import("./AsaApp.js"), "./Super/AsaCampaign/index.vue": () => import("./AsaCampaign.js"), "./Super/AsaOrg/index.vue": () => import("./AsaOrg.js"), "./Super/Country/index.vue": () => import("./Country.js"), "./Super/CountryItem/index.vue": () => import("./CountryItem.js"), "./Super/DatePicker/index.vue": () => import("./DatePicker.js"), "./Super/EChart/index.vue": () => import("./EChart.js"), "./Super/Form/index.vue": () => import("./Form.js"), "./Super/MultipleSelect/index.vue": () => import("./MultipleSelect.js"), "./Super/Org/index.vue": () => import("./Org.js"), "./Super/StatusItem/index.vue": () => import("./StatusItem.js"), "./Super/StatusSelect/index.vue": () => import("./StatusSelect.js"), "./Super/Table/index.vue": () => import("./Table.js"), "./Super/Timezone/index.vue": () => import("./Timezone.js") }),
|
|
109
|
+
const a = /* @__PURE__ */ Object.assign({ "./Super/AiApp/index.vue": () => import("./AiApp.js"), "./Super/AiOrg/index.vue": () => import("./AiOrg.js"), "./Super/AsaAdGroup/index.vue": () => import("./AsaAdGroup.js"), "./Super/AsaApp/index.vue": () => import("./AsaApp.js"), "./Super/AsaCampaign/index.vue": () => import("./AsaCampaign.js"), "./Super/AsaOrg/index.vue": () => import("./AsaOrg.js"), "./Super/Country/index.vue": () => import("./Country.js"), "./Super/CountryItem/index.vue": () => import("./CountryItem.js"), "./Super/DatePicker/index.vue": () => import("./DatePicker.js"), "./Super/EChart/index.vue": () => import("./EChart.js"), "./Super/Form/index.vue": () => import("./Form.js"), "./Super/MultipleSelect/index.vue": () => import("./MultipleSelect.js"), "./Super/Org/index.vue": () => import("./Org.js"), "./Super/StatusItem/index.vue": () => import("./StatusItem.js"), "./Super/StatusSelect/index.vue": () => import("./StatusSelect.js"), "./Super/Table/index.vue": () => import("./Table.js"), "./Super/Timezone/index.vue": () => import("./Timezone.js") }), c = {};
|
|
106
110
|
for (const i in a) {
|
|
107
111
|
const e = i.match(/Super\/(\S*)\/index.vue/)[1];
|
|
108
|
-
|
|
112
|
+
c[e] = n(a[i]);
|
|
109
113
|
}
|
|
110
114
|
const d = {
|
|
111
115
|
...m,
|
|
112
|
-
...
|
|
113
|
-
},
|
|
116
|
+
...c
|
|
117
|
+
}, g = (i) => {
|
|
114
118
|
for (let e in d)
|
|
115
119
|
i.component(e, d[e]);
|
|
116
|
-
},
|
|
120
|
+
}, h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
117
121
|
__proto__: null,
|
|
118
|
-
default:
|
|
122
|
+
default: g
|
|
123
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
124
|
+
window.$md = v;
|
|
125
|
+
window.$ecs = l;
|
|
126
|
+
window.$bn = x;
|
|
127
|
+
const A = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
128
|
+
__proto__: null
|
|
119
129
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
120
130
|
export {
|
|
121
|
-
|
|
131
|
+
b as c
|
|
122
132
|
};
|
package/dist/vendor.js
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { d as
|
|
2
|
-
import { d as
|
|
3
|
-
import { p as
|
|
1
|
+
import { d as i } from "./util.js";
|
|
2
|
+
import { d as a } from "./directive.js";
|
|
3
|
+
import { p as l } from "./store.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
import "./cpt/component.js";
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
return
|
|
6
|
+
const f = (o, e, r) => {
|
|
7
|
+
const t = o[e];
|
|
8
|
+
return t ? typeof t == "function" ? t() : Promise.resolve(t) : new Promise((_, n) => {
|
|
9
9
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
|
|
10
|
-
|
|
10
|
+
n.bind(
|
|
11
11
|
null,
|
|
12
12
|
new Error(
|
|
13
|
-
"Unknown variable dynamic import: " +
|
|
13
|
+
"Unknown variable dynamic import: " + e + (e.split("/").length !== r ? ". Note that variables only represent file names one level deep." : "")
|
|
14
14
|
)
|
|
15
15
|
)
|
|
16
16
|
);
|
|
17
17
|
});
|
|
18
18
|
};
|
|
19
|
-
let
|
|
20
|
-
const
|
|
21
|
-
|
|
19
|
+
let s;
|
|
20
|
+
const w = (o, e) => {
|
|
21
|
+
o.use(i).use(a);
|
|
22
22
|
let r;
|
|
23
|
-
if (
|
|
23
|
+
if (e.storeChips)
|
|
24
24
|
try {
|
|
25
|
-
const { store:
|
|
26
|
-
r =
|
|
25
|
+
const { store: t, pinia: _ } = l(e.storeChips);
|
|
26
|
+
r = t, o.provide("store", t).use(_);
|
|
27
27
|
} catch {
|
|
28
28
|
throw new Error("RangeError: Maximum call stack size exceeded");
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
window.$m = async () => {
|
|
32
|
-
if (!
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
|
|
32
|
+
if (!s) {
|
|
33
|
+
s = (await import("moment")).default;
|
|
34
|
+
const e = localStorage.getItem("lang");
|
|
35
|
+
e && e.includes("cn") && s.locale("zh-cn", {
|
|
36
36
|
months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split(
|
|
37
37
|
"_"
|
|
38
38
|
),
|
|
@@ -44,19 +44,16 @@ window.$m = async () => {
|
|
|
44
44
|
weekdaysMin: "日_一_二_三_四_五_六".split("_")
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
return
|
|
47
|
+
return s;
|
|
48
48
|
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
const r = e.__vccOpts || e;
|
|
54
|
-
for (const [o, n] of t)
|
|
55
|
-
r[o] = n;
|
|
49
|
+
const y = (o, e) => {
|
|
50
|
+
const r = o.__vccOpts || o;
|
|
51
|
+
for (const [t, _] of e)
|
|
52
|
+
r[t] = _;
|
|
56
53
|
return r;
|
|
57
54
|
};
|
|
58
55
|
export {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
y as _,
|
|
57
|
+
f as a,
|
|
58
|
+
w as i
|
|
62
59
|
};
|