magtool 1.5.44 → 1.5.46

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,14 +1,14 @@
1
- import { a as u } from "../vendor.js";
2
- import { defineAsyncComponent as o } from "vue";
3
- class v {
1
+ import { a as p } from "../vendor.js";
2
+ import { defineAsyncComponent as n } from "vue";
3
+ class c {
4
4
  constructor() {
5
5
  this.appRegistrationStatus = /* @__PURE__ */ new WeakMap(), this.loadedComponents = /* @__PURE__ */ new Map(), this.loadingPromises = /* @__PURE__ */ new Map();
6
6
  }
7
- async registerAllComponents(e) {
7
+ async regist(e) {
8
8
  if (this.appRegistrationStatus.has(e))
9
9
  return console.warn("Components already registered for this app instance"), !1;
10
10
  try {
11
- return (await Promise.resolve().then(() => x)).default(e), this.appRegistrationStatus.set(e, {
11
+ return (await Promise.resolve().then(() => l)).default(e), this.appRegistrationStatus.set(e, {
12
12
  registeredAt: /* @__PURE__ */ new Date(),
13
13
  components: Object.keys(await this.getAllComponentNames())
14
14
  }), !0;
@@ -16,18 +16,18 @@ class v {
16
16
  return console.error("Failed to register all components:", t), !1;
17
17
  }
18
18
  }
19
- async registerSpecificComponents(e, t) {
19
+ async regist2(e, t) {
20
20
  if (!Array.isArray(t) || t.length === 0)
21
21
  return console.warn("componentNames should be a non-empty array"), !1;
22
22
  try {
23
23
  for (const r of t)
24
- await this.registerSingleComponent(e, r);
24
+ await this.regist1(e, r);
25
25
  return !0;
26
26
  } catch (r) {
27
27
  return console.error("Failed to register specific components:", r), !1;
28
28
  }
29
29
  }
30
- async registerSingleComponent(e, t) {
30
+ async regist1(e, t) {
31
31
  try {
32
32
  if (this.loadedComponents.has(t))
33
33
  return e.component(t, this.loadedComponents.get(t)), !0;
@@ -35,18 +35,18 @@ class v {
35
35
  return await this.loadingPromises.get(t), e.component(t, this.loadedComponents.get(t)), !0;
36
36
  const r = this._loadComponent(t);
37
37
  this.loadingPromises.set(t, r);
38
- const n = await r;
39
- return this.loadedComponents.set(t, n), e.component(t, n), this.loadingPromises.delete(t), !0;
38
+ const o = await r;
39
+ return this.loadedComponents.set(t, o), e.component(t, o), this.loadingPromises.delete(t), !0;
40
40
  } catch (r) {
41
41
  return console.warn(`Failed to load component ${t}:`, r), !1;
42
42
  }
43
43
  }
44
44
  async _loadComponent(e) {
45
45
  try {
46
- return o(() => 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));
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));
47
47
  } catch {
48
48
  try {
49
- return o(() => 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));
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));
50
50
  } catch {
51
51
  throw new Error(`Component ${e} not found in Mvc or Super directories`);
52
52
  }
@@ -54,11 +54,11 @@ class v {
54
54
  }
55
55
  async getAllComponentNames() {
56
56
  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
- (p) => p.match(/Mvc\/(\S*)\/index.vue/)[1]
58
- ), n = 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
- (p) => p.match(/Super\/(\S*)\/index.vue/)[1]
57
+ (u) => u.match(/Mvc\/(\S*)\/index.vue/)[1]
58
+ ), 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]
60
60
  );
61
- return [...t, ...n];
61
+ return [...t, ...o];
62
62
  }
63
63
  /**
64
64
  * 检查应用实例的注册状态
@@ -97,25 +97,25 @@ class v {
97
97
  this.appRegistrationStatus = /* @__PURE__ */ new WeakMap(), this.loadedComponents.clear(), this.loadingPromises.clear();
98
98
  }
99
99
  }
100
- const h = new v(), 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 = {};
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 = {};
101
101
  for (const i in s) {
102
102
  const e = i.match(/Mvc\/(\S*)\/index.vue/)[1];
103
- m[e] = o(s[i]);
103
+ m[e] = n(s[i]);
104
104
  }
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") }), c = {};
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 = {};
106
106
  for (const i in a) {
107
107
  const e = i.match(/Super\/(\S*)\/index.vue/)[1];
108
- c[e] = o(a[i]);
108
+ v[e] = n(a[i]);
109
109
  }
110
110
  const d = {
111
111
  ...m,
112
- ...c
113
- }, l = (i) => {
112
+ ...v
113
+ }, x = (i) => {
114
114
  for (let e in d)
115
115
  i.component(e, d[e]);
116
- }, x = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
116
+ }, l = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
117
117
  __proto__: null,
118
- default: l
118
+ default: x
119
119
  }, Symbol.toStringTag, { value: "Module" }));
120
120
  export {
121
121
  h as c
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.44",
4
+ "version": "1.5.46",
5
5
  "author": "matt avis",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",