@morghulis/core 1.0.47 → 1.0.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.
@@ -1796,20 +1796,20 @@ var xc = Object.create, qa = Object.defineProperty, Cc = Object.getOwnPropertyDe
1796
1796
  if (typeof y != "string")
1797
1797
  return "";
1798
1798
  if (typeof E == "string" && (T = E), q = r.en, Q = a.en, typeof E == "object") {
1799
- $ = E.maintainCase || !1, F = E.custom && typeof E.custom == "object" ? E.custom : F, U = +E.truncate > 1 && E.truncate || !1, A = E.uric || !1, R = E.uricNoSlash || !1, B = E.mark || !1, V = !(E.symbols === !1 || E.lang === !1), T = E.separator || T, A && (pe += i), R && (pe += u), B && (pe += c), q = E.lang && r[E.lang] && V ? r[E.lang] : V ? r.en : {}, Q = E.lang && a[E.lang] ? a[E.lang] : E.lang === !1 || E.lang === !0 ? {} : a.en, E.titleCase && typeof E.titleCase.length == "number" && Array.prototype.toString.call(E.titleCase) ? (E.titleCase.forEach(function(me) {
1800
- F[me + ""] = me + "";
1801
- }), P = !0) : P = !!E.titleCase, E.custom && typeof E.custom.length == "number" && Array.prototype.toString.call(E.custom) && E.custom.forEach(function(me) {
1802
- F[me + ""] = me + "";
1803
- }), Object.keys(F).forEach(function(me) {
1799
+ $ = E.maintainCase || !1, F = E.custom && typeof E.custom == "object" ? E.custom : F, U = +E.truncate > 1 && E.truncate || !1, A = E.uric || !1, R = E.uricNoSlash || !1, B = E.mark || !1, V = !(E.symbols === !1 || E.lang === !1), T = E.separator || T, A && (pe += i), R && (pe += u), B && (pe += c), q = E.lang && r[E.lang] && V ? r[E.lang] : V ? r.en : {}, Q = E.lang && a[E.lang] ? a[E.lang] : E.lang === !1 || E.lang === !0 ? {} : a.en, E.titleCase && typeof E.titleCase.length == "number" && Array.prototype.toString.call(E.titleCase) ? (E.titleCase.forEach(function(_e) {
1800
+ F[_e + ""] = _e + "";
1801
+ }), P = !0) : P = !!E.titleCase, E.custom && typeof E.custom.length == "number" && Array.prototype.toString.call(E.custom) && E.custom.forEach(function(_e) {
1802
+ F[_e + ""] = _e + "";
1803
+ }), Object.keys(F).forEach(function(_e) {
1804
1804
  var He;
1805
- me.length > 1 ? He = new RegExp("\\b" + g(me) + "\\b", "gi") : He = new RegExp(g(me), "gi"), y = y.replace(He, F[me]);
1805
+ _e.length > 1 ? He = new RegExp("\\b" + g(_e) + "\\b", "gi") : He = new RegExp(g(_e), "gi"), y = y.replace(He, F[_e]);
1806
1806
  });
1807
1807
  for (G in F)
1808
1808
  pe += G;
1809
1809
  }
1810
1810
  for (pe += T, pe = g(pe), y = y.replace(/(^\s+|\s+$)/g, ""), oe = !1, Ne = !1, ne = 0, ae = y.length; ne < ae; ne++)
1811
1811
  G = y[ne], p(G, F) ? oe = !1 : Q[G] ? (G = oe && Q[G].match(/[A-Za-z0-9]/) ? " " + Q[G] : Q[G], oe = !1) : G in o ? (ne + 1 < ae && l.indexOf(y[ne + 1]) >= 0 ? (C += G, G = "") : Ne === !0 ? (G = s[C] + o[G], C = "") : G = oe && o[G].match(/[A-Za-z0-9]/) ? " " + o[G] : o[G], oe = !1, Ne = !1) : G in s ? (C += G, G = "", ne === ae - 1 && (G = s[C]), Ne = !0) : /* process symbol chars */ q[G] && !(A && i.indexOf(G) !== -1) && !(R && u.indexOf(G) !== -1) ? (G = oe || D.substr(-1).match(/[A-Za-z0-9]/) ? T + q[G] : q[G], G += y[ne + 1] !== void 0 && y[ne + 1].match(/[A-Za-z0-9]/) ? T : "", oe = !0) : (Ne === !0 ? (G = s[C] + G, C = "", Ne = !1) : oe && (/[A-Za-z0-9]/.test(G) || D.substr(-1).match(/A-Za-z0-9]/)) && (G = " " + G), oe = !1), D += G.replace(new RegExp("[^\\w\\s" + pe + "_-]", "g"), T);
1812
- return P && (D = D.replace(/(\w)(\S*)/g, function(me, He, st) {
1812
+ return P && (D = D.replace(/(\w)(\S*)/g, function(_e, He, st) {
1813
1813
  var vt = He.toUpperCase() + (st !== null ? st : "");
1814
1814
  return Object.keys(F).indexOf(vt.toLowerCase()) < 0 ? vt : vt.toLowerCase();
1815
1815
  })), D = D.replace(/\s+/g, T).replace(new RegExp("\\" + T + "+", "g"), T).replace(new RegExp("(^\\" + T + "+|\\" + T + "+$)", "g"), ""), U && D.length > U && (de = D.charAt(U) === T, D = D.slice(0, U), de || (D = D.slice(0, D.lastIndexOf(T)))), !$ && !P && (D = D.toLowerCase()), D;
@@ -3653,7 +3653,7 @@ function cp(e, t, n, o) {
3653
3653
  }, 4e4);
3654
3654
  }
3655
3655
  }
3656
- function _e(e, t) {
3656
+ function ge(e, t) {
3657
3657
  const n = "🍍 " + e;
3658
3658
  typeof __VUE_DEVTOOLS_TOAST__ == "function" ? __VUE_DEVTOOLS_TOAST__(n, t) : t === "error" ? console.error(n) : t === "warn" ? console.warn(n) : console.log(n);
3659
3659
  }
@@ -3662,29 +3662,29 @@ function No(e) {
3662
3662
  }
3663
3663
  function Cs() {
3664
3664
  if (!("clipboard" in navigator))
3665
- return _e("Your browser doesn't support the Clipboard API", "error"), !0;
3665
+ return ge("Your browser doesn't support the Clipboard API", "error"), !0;
3666
3666
  }
3667
3667
  function Os(e) {
3668
- return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (_e('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
3668
+ return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (ge('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
3669
3669
  }
3670
3670
  async function dp(e) {
3671
3671
  if (!Cs())
3672
3672
  try {
3673
- await navigator.clipboard.writeText(JSON.stringify(e.state.value)), _e("Global state copied to clipboard.");
3673
+ await navigator.clipboard.writeText(JSON.stringify(e.state.value)), ge("Global state copied to clipboard.");
3674
3674
  } catch (t) {
3675
3675
  if (Os(t))
3676
3676
  return;
3677
- _e("Failed to serialize the state. Check the console for more details.", "error"), console.error(t);
3677
+ ge("Failed to serialize the state. Check the console for more details.", "error"), console.error(t);
3678
3678
  }
3679
3679
  }
3680
3680
  async function pp(e) {
3681
3681
  if (!Cs())
3682
3682
  try {
3683
- Ss(e, JSON.parse(await navigator.clipboard.readText())), _e("Global state pasted from clipboard.");
3683
+ Ss(e, JSON.parse(await navigator.clipboard.readText())), ge("Global state pasted from clipboard.");
3684
3684
  } catch (t) {
3685
3685
  if (Os(t))
3686
3686
  return;
3687
- _e("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(t);
3687
+ ge("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(t);
3688
3688
  }
3689
3689
  }
3690
3690
  async function fp(e) {
@@ -3693,7 +3693,7 @@ async function fp(e) {
3693
3693
  type: "text/plain;charset=utf-8"
3694
3694
  }), "pinia-state.json");
3695
3695
  } catch (t) {
3696
- _e("Failed to export the state as JSON. Check the console for more details.", "error"), console.error(t);
3696
+ ge("Failed to export the state as JSON. Check the console for more details.", "error"), console.error(t);
3697
3697
  }
3698
3698
  }
3699
3699
  let Ke;
@@ -3718,9 +3718,9 @@ async function _p(e) {
3718
3718
  if (!n)
3719
3719
  return;
3720
3720
  const { text: o, file: l } = n;
3721
- Ss(e, JSON.parse(o)), _e(`Global state imported from "${l.name}".`);
3721
+ Ss(e, JSON.parse(o)), ge(`Global state imported from "${l.name}".`);
3722
3722
  } catch (t) {
3723
- _e("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(t);
3723
+ ge("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(t);
3724
3724
  }
3725
3725
  }
3726
3726
  function Ss(e, t) {
@@ -3819,7 +3819,7 @@ function wp(e, t) {
3819
3819
  componentStateTypes: vn,
3820
3820
  app: e
3821
3821
  }, (n) => {
3822
- typeof n.now != "function" && _e("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), n.addTimelineLayer({
3822
+ typeof n.now != "function" && ge("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), n.addTimelineLayer({
3823
3823
  id: rt,
3824
3824
  label: "Pinia 🍍",
3825
3825
  color: 15064968
@@ -3864,7 +3864,7 @@ function wp(e, t) {
3864
3864
  tooltip: 'Reset the state (with "$reset")',
3865
3865
  action: (o) => {
3866
3866
  const l = t._s.get(o);
3867
- l ? typeof l.$reset != "function" ? _e(`Cannot reset "${o}" store because it doesn't have a "$reset" method implemented.`, "warn") : (l.$reset(), _e(`Store "${o}" reset.`)) : _e(`Cannot reset "${o}" store because it wasn't found.`, "warn");
3867
+ l ? typeof l.$reset != "function" ? ge(`Cannot reset "${o}" store because it doesn't have a "$reset" method implemented.`, "warn") : (l.$reset(), ge(`Store "${o}" reset.`)) : ge(`Cannot reset "${o}" store because it wasn't found.`, "warn");
3868
3868
  }
3869
3869
  }
3870
3870
  ]
@@ -3923,7 +3923,7 @@ function wp(e, t) {
3923
3923
  if (o.app === e && o.inspectorId === ye) {
3924
3924
  const l = o.nodeId === hn ? t : t._s.get(o.nodeId);
3925
3925
  if (!l)
3926
- return _e(`store "${o.nodeId}" not found`, "error");
3926
+ return ge(`store "${o.nodeId}" not found`, "error");
3927
3927
  const { path: s } = o;
3928
3928
  No(l) ? s.unshift("state") : (s.length !== 1 || !l._customProperties.has(s[0]) || s[0] in l.$state) && s.unshift("$state"), kt = !1, o.set(l, s, o.state.value), kt = !0;
3929
3929
  }
@@ -3931,10 +3931,10 @@ function wp(e, t) {
3931
3931
  if (o.type.startsWith("🍍")) {
3932
3932
  const l = o.type.replace(/^🍍\s*/, ""), s = t._s.get(l);
3933
3933
  if (!s)
3934
- return _e(`store "${l}" not found`, "error");
3934
+ return ge(`store "${l}" not found`, "error");
3935
3935
  const { path: a } = o;
3936
3936
  if (a[0] !== "state")
3937
- return _e(`Invalid path for store "${l}":
3937
+ return ge(`Invalid path for store "${l}":
3938
3938
  ${a}
3939
3939
  Only state can be modified.`);
3940
3940
  a[0] = "$state", kt = !1, o.set(s, a, o.state.value), kt = !0;
@@ -4068,8 +4068,8 @@ function kp(e, t) {
4068
4068
  });
4069
4069
  const { $dispose: s } = t;
4070
4070
  t.$dispose = () => {
4071
- s(), n.notifyComponentUpdate(), n.sendInspectorTree(ye), n.sendInspectorState(ye), n.getSettings().logStoreChanges && _e(`Disposed "${t.$id}" store 🗑`);
4072
- }, n.notifyComponentUpdate(), n.sendInspectorTree(ye), n.sendInspectorState(ye), n.getSettings().logStoreChanges && _e(`"${t.$id}" store installed 🆕`);
4071
+ s(), n.notifyComponentUpdate(), n.sendInspectorTree(ye), n.sendInspectorState(ye), n.getSettings().logStoreChanges && ge(`Disposed "${t.$id}" store 🗑`);
4072
+ }, n.notifyComponentUpdate(), n.sendInspectorTree(ye), n.sendInspectorState(ye), n.getSettings().logStoreChanges && ge(`"${t.$id}" store installed 🆕`);
4073
4073
  });
4074
4074
  }
4075
4075
  let Vs = 0, Ze;
@@ -5956,8 +5956,8 @@ const er = (e) => {
5956
5956
  method: "POST",
5957
5957
  body: E,
5958
5958
  duplex: "half"
5959
- }), me;
5960
- if (N.isFormData(E) && (me = pe.headers.get("content-type")) && P.setContentType(me), pe.body) {
5959
+ }), _e;
5960
+ if (N.isFormData(E) && (_e = pe.headers.get("content-type")) && P.setContentType(_e), pe.body) {
5961
5961
  const [He, st] = va(
5962
5962
  de,
5963
5963
  Cn(ya(F))
@@ -5983,8 +5983,8 @@ const er = (e) => {
5983
5983
  ["status", "statusText", "headers"].forEach((vt) => {
5984
5984
  pe[vt] = ae[vt];
5985
5985
  });
5986
- const me = N.toFiniteNumber(ae.headers.get("content-length")), [He, st] = V && va(
5987
- me,
5986
+ const _e = N.toFiniteNumber(ae.headers.get("content-length")), [He, st] = V && va(
5987
+ _e,
5988
5988
  Cn(ya(V), !0)
5989
5989
  ) || [];
5990
5990
  ae = new o(
@@ -5996,8 +5996,8 @@ const er = (e) => {
5996
5996
  }
5997
5997
  $ = $ || "text";
5998
5998
  let Ne = await d[N.findKey(d, $) || "text"](ae, p);
5999
- return !oe && Q && Q(), await new Promise((pe, me) => {
6000
- Zs(pe, me, {
5999
+ return !oe && Q && Q(), await new Promise((pe, _e) => {
6000
+ Zs(pe, _e, {
6001
6001
  data: Ne,
6002
6002
  headers: Ce.from(ae.headers),
6003
6003
  status: ae.status,
@@ -6853,7 +6853,7 @@ class Pe {
6853
6853
  }
6854
6854
  };
6855
6855
  }
6856
- class ge {
6856
+ class me {
6857
6857
  $db;
6858
6858
  $entity;
6859
6859
  $code;
@@ -6978,7 +6978,7 @@ function km(e = {}) {
6978
6978
  const t = {};
6979
6979
  for (const n in e) {
6980
6980
  const o = e[n];
6981
- t[n] = new ge(o);
6981
+ t[n] = new me(o);
6982
6982
  }
6983
6983
  return t;
6984
6984
  }
@@ -6989,7 +6989,7 @@ class cr {
6989
6989
  }
6990
6990
  parse(t) {
6991
6991
  const { domain: n, prop: o, not_null: l, tool: s } = this.field, a = t[o];
6992
- return a == null ? l ? this.parseNull() : this.parseDefault(a) : ge.DOMAINS.linkage.includes(n) ? this.parseLinkage(t) : ge.DOMAINS.multiple.includes(n) ? this.parseMultiple(t) : ["boolean", "switch"].includes(s) ? this.parseBoolean(a) : ["number"].includes(s) ? this.parseNumber(a) : ["date"].includes(s) ? n === "DateTimeField" ? this.parseDateTime(a) : this.parseDate(a) : ["time"].includes(s) ? this.parseTime(a) : ["timerange"].includes(s) ? this.parseTimeRange(a) : ["daterange"].includes(s) ? this.parseDateRange(a) : ["dates"].includes(s) ? this.parseDates(a) : ["set"].includes(s) ? this.parseSet(a) : ["color"].includes(s) ? this.parseColor(a) : ["file"].includes(s) ? this.parseFile(a) : this.parseDefault(a);
6992
+ return a == null ? l ? this.parseNull() : this.parseDefault(a) : me.DOMAINS.linkage.includes(n) ? this.parseLinkage(t) : me.DOMAINS.multiple.includes(n) ? this.parseMultiple(t) : ["boolean", "switch"].includes(s) ? this.parseBoolean(a) : ["number"].includes(s) ? this.parseNumber(a) : ["date"].includes(s) ? n === "DateTimeField" ? this.parseDateTime(a) : this.parseDate(a) : ["time"].includes(s) ? this.parseTime(a) : ["timerange"].includes(s) ? this.parseTimeRange(a) : ["daterange"].includes(s) ? this.parseDateRange(a) : ["dates"].includes(s) ? this.parseDates(a) : ["set"].includes(s) ? this.parseSet(a) : ["color"].includes(s) ? this.parseColor(a) : ["file"].includes(s) ? this.parseFile(a) : this.parseDefault(a);
6993
6993
  }
6994
6994
  parseNull() {
6995
6995
  return {
@@ -7130,10 +7130,10 @@ function Ae(e) {
7130
7130
  });
7131
7131
  const p = u.map((v) => _.map((y) => {
7132
7132
  const E = d[y] || {}, T = E.domain;
7133
- if (ge.DOMAINS.multiple.includes(T)) {
7133
+ if (me.DOMAINS.multiple.includes(T)) {
7134
7134
  const D = `${y}_set`, C = v[D], { label: V } = E.refer;
7135
7135
  return C.map((F) => F[V]).join(";");
7136
- } else if (ge.DOMAINS.referred.includes(T)) {
7136
+ } else if (me.DOMAINS.referred.includes(T)) {
7137
7137
  const D = y.replace("_id", ""), C = v[D], { label: V } = E.refer;
7138
7138
  return C ? C[V] : null;
7139
7139
  } else return T === "JSONField" ? JSON.stringify(v[y]) : v[y];
@@ -7196,7 +7196,7 @@ function Ae(e) {
7196
7196
  edit_on_table: !0,
7197
7197
  format: { set: g, multiple: p }
7198
7198
  };
7199
- return new ge(C);
7199
+ return new me(C);
7200
7200
  }
7201
7201
  return { setEnable: n, toBean: l, toAoa: s, parse: r, fromMode: i, parseRow: a };
7202
7202
  }
@@ -7492,7 +7492,7 @@ function qo(e = {}) {
7492
7492
  u = u.slice(0, -`__${p}`.length), gr.includes(p) ? (_ = !0, g = p.slice(1)) : hr.includes(p) ? (_ = !0, g = p.slice(0, -1)) : vr.includes(p) && (g = p);
7493
7493
  else if (c instanceof Array) {
7494
7494
  const v = (d[u] || {}).domain;
7495
- ge.DOMAINS.multiple.includes(v || "") && (g = "in");
7495
+ me.DOMAINS.multiple.includes(v || "") && (g = "in");
7496
7496
  }
7497
7497
  return new jo(i, u, c, g, _);
7498
7498
  }
@@ -10574,7 +10574,7 @@ function Mm(e) {
10574
10574
  a.value[_] = t.value.item[_];
10575
10575
  }
10576
10576
  function d(_, g, p) {
10577
- const { prop: v, domain: y, not_null: E } = _, T = Sn(g[v]), D = Sn(p[v]), C = Dn(T) ? !1 : T == null, V = (t.value.keys?.length || 0) > 1, F = ge.DOMAINS.multiple.includes(y) || V ? !1 : C && E, $ = !Ie(D, T);
10577
+ const { prop: v, domain: y, not_null: E } = _, T = Sn(g[v]), D = Sn(p[v]), C = Dn(T) ? !1 : T == null, V = (t.value.keys?.length || 0) > 1, F = me.DOMAINS.multiple.includes(y) || V ? !1 : C && E, $ = !Ie(D, T);
10578
10578
  return { prop: v, invalid: F, value: T, changed: $ };
10579
10579
  }
10580
10580
  return { fields: n, bean: a, $disabled: o, mapping: r, row: l, data: u, reset: c, invalid: i };
@@ -13511,10 +13511,49 @@ const Or = /* @__PURE__ */ I({
13511
13511
  }), j_ = /* @__PURE__ */ I({
13512
13512
  __name: "UploadDictionary",
13513
13513
  props: {
13514
- frame: {}
13514
+ frame: {},
13515
+ view: {}
13515
13516
  },
13516
13517
  setup(e) {
13517
- return (t, n) => z(e.frame);
13518
+ const t = e, n = x(Object.keys(t.frame)[0]), o = O(() => {
13519
+ const s = t.view.$fields;
13520
+ return Object.keys(t.frame).map((a) => {
13521
+ const r = s[a], { prop: i, label: u } = r || {};
13522
+ return { label: u, value: i };
13523
+ });
13524
+ }), l = O(() => t.frame[n.value] || []);
13525
+ return (s, a) => {
13526
+ const r = w("el-segmented"), i = w("el-table-column"), u = w("el-table"), c = w("el-card");
13527
+ return b(), k(c, null, {
13528
+ header: f(() => [
13529
+ m(r, {
13530
+ modelValue: n.value,
13531
+ "onUpdate:modelValue": a[0] || (a[0] = (d) => n.value = d),
13532
+ options: o.value
13533
+ }, null, 8, ["modelValue", "options"])
13534
+ ]),
13535
+ default: f(() => [
13536
+ m(u, {
13537
+ data: l.value,
13538
+ "header-cell-class-name": "m-table-header-cell",
13539
+ border: ""
13540
+ }, {
13541
+ default: f(() => [
13542
+ m(i, {
13543
+ prop: "value",
13544
+ label: "ID"
13545
+ }),
13546
+ m(i, {
13547
+ prop: "label",
13548
+ label: "值"
13549
+ })
13550
+ ]),
13551
+ _: 1
13552
+ }, 8, ["data"])
13553
+ ]),
13554
+ _: 1
13555
+ });
13556
+ };
13518
13557
  }
13519
13558
  }), q_ = /* @__PURE__ */ I({
13520
13559
  __name: "UploadTableCell",
@@ -13870,10 +13909,12 @@ function W_(e) {
13870
13909
  useKey: !1
13871
13910
  }), { post: o, loading: l } = at(), s = x({});
13872
13911
  J(t, () => {
13873
- const { $db: y, $entity: E, $code: T } = t.value.view;
13874
- o("valar/upload_frame", { db: y, entity: E, code: T }).then((C) => s.value = C);
13875
- }, { deep: !0, immediate: !0 }), J(() => [n.value, s.value], () => {
13876
- });
13912
+ const y = Object.values(t.value.view.$fields).filter((E) => {
13913
+ const { allow_upload: T, domain: D, refer: C } = E;
13914
+ return T ? me.DOMAINS.referred.includes(D) : !1;
13915
+ }).map((E) => [E.prop, E.refer]);
13916
+ o("valar/upload_frame", Object.fromEntries(y)).then((E) => s.value = E);
13917
+ }, { deep: !0, immediate: !0 });
13877
13918
  const { fromMode: a } = Ae(t.value.view), r = O(() => {
13878
13919
  const { $modes: y, $fields: E } = t.value.view, T = [];
13879
13920
  return (n.value.hasId || n.value.isUpdate) && T.push(a(y.id)), n.value.hasSort && T.push(a(y.sort)), Object.values(E).filter((D) => {
@@ -13881,8 +13922,8 @@ function W_(e) {
13881
13922
  return $ && P;
13882
13923
  }).forEach((D) => {
13883
13924
  let { domain: C, prop: V, label: F, not_null: $, format: P } = D;
13884
- if (ge.DOMAINS.referred) {
13885
- const U = ge.DOMAINS.multiple.includes(C), A = n.value.useKey ? "value" : "label", R = (s.value[V] || []).map((q) => [q[A], q[A]]), B = Object.fromEntries(R);
13925
+ if (me.DOMAINS.referred) {
13926
+ const U = me.DOMAINS.multiple.includes(C), A = n.value.useKey ? "value" : "label", R = (s.value[V] || []).map((q) => [q[A], q[A]]), B = Object.fromEntries(R);
13886
13927
  T.push(a({ prop: V, label: F, domain: C, not_null: $, multiple: U, set: B }));
13887
13928
  } else {
13888
13929
  const { set: U, multiple: A } = P;
@@ -14316,7 +14357,10 @@ const G_ = /* @__PURE__ */ I({
14316
14357
  title: "外键对照表"
14317
14358
  }, {
14318
14359
  default: f(() => [
14319
- m(h(j_), { frame: h(v) }, null, 8, ["frame"])
14360
+ m(h(j_), {
14361
+ frame: h(v),
14362
+ view: e.view
14363
+ }, null, 8, ["frame", "view"])
14320
14364
  ]),
14321
14365
  _: 1
14322
14366
  }, 512)
@@ -14446,7 +14490,7 @@ const G_ = /* @__PURE__ */ I({
14446
14490
  },
14447
14491
  setup(e) {
14448
14492
  const t = e, n = x(), o = x("name"), l = O(() => {
14449
- const r = Object.values(t.view.$fields).filter((i) => ge.DOMAINS.editable.includes(i.domain)).map((i) => [i.prop, i.name]);
14493
+ const r = Object.values(t.view.$fields).filter((i) => me.DOMAINS.editable.includes(i.domain)).map((i) => [i.prop, i.name]);
14450
14494
  return Object.fromEntries(r);
14451
14495
  });
14452
14496
  function s(r) {
@@ -14845,7 +14889,7 @@ const G_ = /* @__PURE__ */ I({
14845
14889
  const n = t, o = e, l = O(() => {
14846
14890
  const [g, p] = Object.entries(o.search.orders)[0] || ["sort", -1];
14847
14891
  return { prop: g, dir: p };
14848
- }), s = O(() => [.../* @__PURE__ */ new Set([...Object.keys(o.finder.includes), ...Object.keys(o.finder.excludes)])]), a = O(() => s.value.includes(o.field.prop)), r = O(() => Object.keys(o.core).includes(o.field.prop)), i = O(() => l.value.prop === o.field.prop ? "primary" : "info"), u = O(() => l.value.prop !== o.field.prop ? "sort" : l.value.dir == 1 ? "sort-asc" : "sort-desc"), c = ge.DOMAINS.orderable, d = (g) => !r.value && n("lookup", g, o.field), _ = () => {
14892
+ }), s = O(() => [.../* @__PURE__ */ new Set([...Object.keys(o.finder.includes), ...Object.keys(o.finder.excludes)])]), a = O(() => s.value.includes(o.field.prop)), r = O(() => Object.keys(o.core).includes(o.field.prop)), i = O(() => l.value.prop === o.field.prop ? "primary" : "info"), u = O(() => l.value.prop !== o.field.prop ? "sort" : l.value.dir == 1 ? "sort-asc" : "sort-desc"), c = me.DOMAINS.orderable, d = (g) => !r.value && n("lookup", g, o.field), _ = () => {
14849
14893
  const g = l.value.prop !== o.field.prop ? [o.field.prop, 1] : l.value.dir == 1 ? [o.field.prop, -1] : ["sort", -1], p = Object.fromEntries([g]);
14850
14894
  o.rest.order(p);
14851
14895
  };
@@ -16053,7 +16097,7 @@ const Eg = /* @__PURE__ */ I({
16053
16097
  setup(e, { expose: t, emit: n }) {
16054
16098
  const o = n, l = e, s = x(), a = x(), r = x(), { fromMode: i } = Ae(), u = O(() => l), c = O(() => l.labelKey || "name"), d = O(() => {
16055
16099
  const { $fields: F, $modes: $ } = l.view, P = c.value, U = F[P], A = l.view.$modes[P];
16056
- return U || (A ? i(A) : new ge());
16100
+ return U || (A ? i(A) : new me());
16057
16101
  }), _ = x("");
16058
16102
  J(_, (F) => s.value.filter(F));
16059
16103
  const {
@@ -17524,7 +17568,7 @@ class Ir {
17524
17568
  }
17525
17569
  isRefer() {
17526
17570
  const { tool: t, domain: n } = this.field;
17527
- return ge.DOMAINS.referred.includes(n) ? !0 : n === "CharField" ? ["select", "cascade", "tree", "auto"].includes(t) : !1;
17571
+ return me.DOMAINS.referred.includes(n) ? !0 : n === "CharField" ? ["select", "cascade", "tree", "auto"].includes(t) : !1;
17528
17572
  }
17529
17573
  }
17530
17574
  const Yg = /* @__PURE__ */ I({
@@ -18268,10 +18312,10 @@ const Yg = /* @__PURE__ */ I({
18268
18312
  entity: n.field.domain !== "CharField",
18269
18313
  multiple: !(n.field.domain === "CharField" && n.field.tool === "set"),
18270
18314
  all: !o.value.entity,
18271
- value: ge.DOMAINS.referred.includes(n.field.domain),
18315
+ value: me.DOMAINS.referred.includes(n.field.domain),
18272
18316
  tree: !(n.field.refer.isTree && ["tree", "cascade"].includes(n.field.tool || ""))
18273
18317
  })), _ = O(
18274
- () => Object.values(l.value?.$modes || {}).filter(({ domain: g }) => !ge.DOMAINS.referred.includes(g || "")).map(({ prop: g, label: p }) => ({ value: g, label: p, display: g }))
18318
+ () => Object.values(l.value?.$modes || {}).filter(({ domain: g }) => !me.DOMAINS.referred.includes(g || "")).map(({ prop: g, label: p }) => ({ value: g, label: p, display: g }))
18275
18319
  );
18276
18320
  return (g, p) => {
18277
18321
  const v = w("el-form-item"), y = w("el-col"), E = w("el-checkbox"), T = w("el-option"), D = w("el-select"), C = w("el-row");
@@ -18456,7 +18500,7 @@ const Yg = /* @__PURE__ */ I({
18456
18500
  label: "工具",
18457
18501
  value: "tool",
18458
18502
  convert(_) {
18459
- _.$fields.tool.disabled = ge.DOMAINS.referred.includes(c) && !d;
18503
+ _.$fields.tool.disabled = me.DOMAINS.referred.includes(c) && !d;
18460
18504
  }
18461
18505
  },
18462
18506
  { label: "图表", value: "table" },
@@ -21582,7 +21626,7 @@ const Xh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
21582
21626
  MShrink: Cr,
21583
21627
  MUpload: Sr,
21584
21628
  MWrap: Go,
21585
- MetaField: ge,
21629
+ MetaField: me,
21586
21630
  MetaFormat: Pe,
21587
21631
  MetaPopover: Qo,
21588
21632
  MetaRefer: ur,
@@ -21652,7 +21696,7 @@ export {
21652
21696
  Cr as MShrink,
21653
21697
  Sr as MUpload,
21654
21698
  Go as MWrap,
21655
- ge as MetaField,
21699
+ me as MetaField,
21656
21700
  Pe as MetaFormat,
21657
21701
  Qo as MetaPopover,
21658
21702
  ur as MetaRefer,