magtool 1.5.47 → 1.5.49

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,9 +1,10 @@
1
- import { a as p } from "../vendor.js";
1
+ import { a as s } from "../vendor.js";
2
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 {
3
+ import S from "markdown-it";
4
+ import * as x from "echarts";
5
+ import g from "bignumber.js";
6
+ import c from "moment";
7
+ class _ {
7
8
  constructor() {
8
9
  this.appRegistrationStatus = /* @__PURE__ */ new WeakMap(), this.loadedComponents = /* @__PURE__ */ new Map(), this.loadingPromises = /* @__PURE__ */ new Map();
9
10
  }
@@ -11,8 +12,8 @@ class S {
11
12
  if (this.appRegistrationStatus.has(e))
12
13
  return console.warn("Components already registered for this app instance"), !1;
13
14
  try {
14
- const t = await Promise.resolve().then(() => h);
15
- return await Promise.resolve().then(() => A), t.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, {
16
17
  registeredAt: /* @__PURE__ */ new Date(),
17
18
  components: Object.keys(await this.getAllComponentNames())
18
19
  }), !0;
@@ -47,10 +48,10 @@ class S {
47
48
  }
48
49
  async _loadComponent(e) {
49
50
  try {
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));
51
+ return n(() => 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") }), `./Mvc/${e}/index.vue`, 4));
51
52
  } catch {
52
53
  try {
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));
54
+ return n(() => s(/* @__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
55
  } catch {
55
56
  throw new Error(`Component ${e} not found in Mvc or Super directories`);
56
57
  }
@@ -58,9 +59,9 @@ class S {
58
59
  }
59
60
  async getAllComponentNames() {
60
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(
61
- (u) => u.match(/Mvc\/(\S*)\/index.vue/)[1]
62
+ (p) => p.match(/Mvc\/(\S*)\/index.vue/)[1]
62
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(
63
- (u) => u.match(/Super\/(\S*)\/index.vue/)[1]
64
+ (p) => p.match(/Super\/(\S*)\/index.vue/)[1]
64
65
  );
65
66
  return [...t, ...o];
66
67
  }
@@ -101,32 +102,45 @@ class S {
101
102
  this.appRegistrationStatus = /* @__PURE__ */ new WeakMap(), this.loadedComponents.clear(), this.loadingPromises.clear();
102
103
  }
103
104
  }
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 = {};
105
- for (const i in s) {
105
+ const O = new _(), 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") }), v = {};
106
+ for (const i in u) {
106
107
  const e = i.match(/Mvc\/(\S*)\/index.vue/)[1];
107
- m[e] = n(s[i]);
108
+ v[e] = n(u[i]);
108
109
  }
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 = {};
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 = {};
110
111
  for (const i in a) {
111
112
  const e = i.match(/Super\/(\S*)\/index.vue/)[1];
112
- c[e] = n(a[i]);
113
+ l[e] = n(a[i]);
113
114
  }
114
115
  const d = {
115
- ...m,
116
- ...c
117
- }, g = (i) => {
116
+ ...v,
117
+ ...l
118
+ }, h = (i) => {
118
119
  for (let e in d)
119
120
  i.component(e, d[e]);
120
- }, h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
121
+ }, y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
121
122
  __proto__: null,
122
- default: g
123
+ default: h
123
124
  }, 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({
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({
128
142
  __proto__: null
129
143
  }, Symbol.toStringTag, { value: "Module" }));
130
144
  export {
131
- b as c
145
+ O as c
132
146
  };
package/dist/vendor.js CHANGED
@@ -1,59 +1,38 @@
1
- import { d as i } from "./util.js";
1
+ import { d as n } from "./util.js";
2
2
  import { d as a } from "./directive.js";
3
- import { p as l } from "./store.js";
3
+ import { p as c } from "./store.js";
4
4
  /* empty css */
5
5
  import "./cpt/component.js";
6
- const f = (o, e, r) => {
7
- const t = o[e];
8
- return t ? typeof t == "function" ? t() : Promise.resolve(t) : new Promise((_, n) => {
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
- n.bind(
10
+ s.bind(
11
11
  null,
12
12
  new Error(
13
- "Unknown variable dynamic import: " + e + (e.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 s;
20
- const w = (o, e) => {
21
- o.use(i).use(a);
22
- let r;
23
- if (e.storeChips)
18
+ }, v = (t, r) => {
19
+ t.use(n).use(a);
20
+ let o;
21
+ if (r.storeChips)
24
22
  try {
25
- const { store: t, pinia: _ } = l(e.storeChips);
26
- r = t, o.provide("store", t).use(_);
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 (!s) {
33
- s = (await import("moment")).default;
34
- const e = localStorage.getItem("lang");
35
- e && e.includes("cn") && s.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 s;
48
- };
49
- const y = (o, e) => {
50
- const r = o.__vccOpts || o;
51
- for (const [t, _] of e)
52
- r[t] = _;
53
- 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;
54
33
  };
55
34
  export {
56
- y as _,
57
- f as a,
58
- w as i
35
+ _,
36
+ d as a,
37
+ v as i
59
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.47",
4
+ "version": "1.5.49",
5
5
  "author": "matt avis",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",