magtool 1.5.46 → 1.5.48

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.
@@ -1,6 +1,10 @@
1
- import { a as p } from "../vendor.js";
1
+ import { a as u } from "../vendor.js";
2
2
  import { defineAsyncComponent as n } from "vue";
3
- class c {
3
+ import S from "markdown-it";
4
+ import x from "echarts";
5
+ import g from "bignumber.js";
6
+ import c from "moment";
7
+ class _ {
4
8
  constructor() {
5
9
  this.appRegistrationStatus = /* @__PURE__ */ new WeakMap(), this.loadedComponents = /* @__PURE__ */ new Map(), this.loadingPromises = /* @__PURE__ */ new Map();
6
10
  }
@@ -8,7 +12,8 @@ class c {
8
12
  if (this.appRegistrationStatus.has(e))
9
13
  return console.warn("Components already registered for this app instance"), !1;
10
14
  try {
11
- return (await Promise.resolve().then(() => l)).default(e), this.appRegistrationStatus.set(e, {
15
+ const t = await Promise.resolve().then(() => y);
16
+ return await Promise.resolve().then(() => M), t.default(e), this.appRegistrationStatus.set(e, {
12
17
  registeredAt: /* @__PURE__ */ new Date(),
13
18
  components: Object.keys(await this.getAllComponentNames())
14
19
  }), !0;
@@ -43,10 +48,10 @@ class c {
43
48
  }
44
49
  async _loadComponent(e) {
45
50
  try {
46
- 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));
51
+ return n(() => u(/* @__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
52
  } catch {
48
53
  try {
49
- 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));
54
+ return n(() => u(/* @__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
55
  } catch {
51
56
  throw new Error(`Component ${e} not found in Mvc or Super directories`);
52
57
  }
@@ -54,9 +59,9 @@ class c {
54
59
  }
55
60
  async getAllComponentNames() {
56
61
  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
- (u) => u.match(/Mvc\/(\S*)\/index.vue/)[1]
62
+ (p) => p.match(/Mvc\/(\S*)\/index.vue/)[1]
58
63
  ), 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
- (u) => u.match(/Super\/(\S*)\/index.vue/)[1]
64
+ (p) => p.match(/Super\/(\S*)\/index.vue/)[1]
60
65
  );
61
66
  return [...t, ...o];
62
67
  }
@@ -97,26 +102,45 @@ class c {
97
102
  this.appRegistrationStatus = /* @__PURE__ */ new WeakMap(), this.loadedComponents.clear(), this.loadingPromises.clear();
98
103
  }
99
104
  }
100
- const h = new c(), 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 = {};
105
+ const P = new _(), 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") }), v = {};
101
106
  for (const i in s) {
102
107
  const e = i.match(/Mvc\/(\S*)\/index.vue/)[1];
103
- m[e] = n(s[i]);
108
+ v[e] = n(s[i]);
104
109
  }
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") }), v = {};
110
+ 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") }), l = {};
106
111
  for (const i in a) {
107
112
  const e = i.match(/Super\/(\S*)\/index.vue/)[1];
108
- v[e] = n(a[i]);
113
+ l[e] = n(a[i]);
109
114
  }
110
115
  const d = {
111
- ...m,
112
- ...v
113
- }, x = (i) => {
116
+ ...v,
117
+ ...l
118
+ }, h = (i) => {
114
119
  for (let e in d)
115
120
  i.component(e, d[e]);
116
- }, l = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
121
+ }, y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
117
122
  __proto__: null,
118
- default: x
123
+ default: h
124
+ }, Symbol.toStringTag, { value: "Module" }));
125
+ window.$md = S;
126
+ window.$ecs = x;
127
+ window.$bn = g;
128
+ const m = localStorage.getItem("lang");
129
+ m && m.includes("cn") && c.locale("zh-cn", {
130
+ months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split(
131
+ "_"
132
+ ),
133
+ monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split(
134
+ "_"
135
+ ),
136
+ weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
137
+ weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"),
138
+ weekdaysMin: "日_一_二_三_四_五_六".split("_")
139
+ });
140
+ window.$m = c;
141
+ const M = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
142
+ __proto__: null
119
143
  }, Symbol.toStringTag, { value: "Module" }));
120
144
  export {
121
- h as c
145
+ P as c
122
146
  };
package/dist/vendor.js CHANGED
@@ -1,62 +1,38 @@
1
- import { d as m } from "./util.js";
2
- import { d as c } from "./directive.js";
3
- import { p as u } from "./store.js";
1
+ import { d as n } from "./util.js";
2
+ import { d as a } from "./directive.js";
3
+ import { p as c } from "./store.js";
4
4
  /* empty css */
5
5
  import "./cpt/component.js";
6
- const h = (e, t, r) => {
7
- const o = e[t];
8
- return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((n, l) => {
6
+ const d = (t, r, o) => {
7
+ const e = t[r];
8
+ return e ? typeof e == "function" ? e() : Promise.resolve(e) : new Promise((i, s) => {
9
9
  (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
10
- l.bind(
10
+ s.bind(
11
11
  null,
12
12
  new Error(
13
- "Unknown variable dynamic import: " + t + (t.split("/").length !== r ? ". Note that variables only represent file names one level deep." : "")
13
+ "Unknown variable dynamic import: " + r + (r.split("/").length !== o ? ". Note that variables only represent file names one level deep." : "")
14
14
  )
15
15
  )
16
16
  );
17
17
  });
18
- };
19
- let i, s, a, _;
20
- const M = (e, t) => {
21
- e.use(m).use(c);
22
- let r;
23
- if (t.storeChips)
18
+ }, v = (t, r) => {
19
+ t.use(n).use(a);
20
+ let o;
21
+ if (r.storeChips)
24
22
  try {
25
- const { store: o, pinia: n } = u(t.storeChips);
26
- r = o, e.provide("store", o).use(n);
23
+ const { store: e, pinia: i } = c(r.storeChips);
24
+ o = e, t.provide("store", e).use(i);
27
25
  } catch {
28
26
  throw new Error("RangeError: Maximum call stack size exceeded");
29
27
  }
30
- };
31
- window.$m = async () => {
32
- if (!i) {
33
- i = (await import("moment")).default;
34
- const t = localStorage.getItem("lang");
35
- t && t.includes("cn") && i.locale("zh-cn", {
36
- months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split(
37
- "_"
38
- ),
39
- monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split(
40
- "_"
41
- ),
42
- weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
43
- weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"),
44
- weekdaysMin: "日_一_二_三_四_五_六".split("_")
45
- });
46
- }
47
- return i;
48
- };
49
- window.$md = async () => (s || (s = (await import("markdown-it")).default), s);
50
- window.$ecs = async () => (a || (a = (await import("echarts")).default), a);
51
- window.$bn = async () => (_ || (_ = (await import("bignumber.js")).default), _);
52
- const k = (e, t) => {
53
- const r = e.__vccOpts || e;
54
- for (const [o, n] of t)
55
- r[o] = n;
56
- return r;
28
+ }, _ = (t, r) => {
29
+ const o = t.__vccOpts || t;
30
+ for (const [e, i] of r)
31
+ o[e] = i;
32
+ return o;
57
33
  };
58
34
  export {
59
- k as _,
60
- h as a,
61
- M as i
35
+ _,
36
+ d as a,
37
+ v as i
62
38
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "magtool",
3
3
  "packageManager": "yarn@4.4.1",
4
- "version": "1.5.46",
4
+ "version": "1.5.48",
5
5
  "author": "matt avis",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",