epic-designer-gold 1.0.22 → 1.0.24

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.
Files changed (35) hide show
  1. package/dist/{attributeView-CDoPoMy8.js → attributeView-BBN4W9TM.js} +1 -1
  2. package/dist/{attributeView-DLHntIVU.cjs → attributeView-gzxLavkO.cjs} +1 -1
  3. package/dist/{index-C7iW9KWi.cjs → index-4GSgwHdx.cjs} +1 -1
  4. package/dist/index-5XsDINLZ.js +4 -0
  5. package/dist/{index-DNsJw-co.js → index-B7wRhLwc.js} +1 -1
  6. package/dist/{index-DfC1M40-.cjs → index-BAUyJdDp.cjs} +1 -1
  7. package/dist/{index-DWgZA-Xt.cjs → index-BBYobbqk.cjs} +1 -1
  8. package/dist/{index-C0J-aMmj.js → index-BUt-kkII.js} +1 -1
  9. package/dist/{index-BxQ1Bi2l.js → index-BokMTYeM.js} +1 -1
  10. package/dist/index-CDH3QO51.cjs +10 -0
  11. package/dist/{index-BgsV-cQ7.js → index-CItH08Va.js} +1 -1
  12. package/dist/{index-nn6_ml1n.cjs → index-CKI_3hdd.cjs} +1 -1
  13. package/dist/index-CNtDbtWP.js +43 -0
  14. package/dist/index-CSX7EJ3h.cjs +1 -0
  15. package/dist/{index-S1s5EyEX.cjs → index-ClvhnVWp.cjs} +1 -1
  16. package/dist/{index-DVF9HIIx.cjs → index-Cy4M38xz.cjs} +1 -1
  17. package/dist/{index-C1svXxFR.cjs → index-D50jfb6U.cjs} +1 -1
  18. package/dist/{index-tdTN310R.js → index-DrBumgPi.js} +1 -1
  19. package/dist/{index-DKq_URx5.js → index-hOLbkmql.js} +1 -1
  20. package/dist/{index-CquiCjYl.js → index-rQwg6K9E.js} +43 -40
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.js +1 -1
  23. package/dist/{selectPage-D4jGyEa2.js → selectPage-DU5m5Bop.js} +37 -34
  24. package/dist/selectPage-DoF_EREC.cjs +1 -0
  25. package/dist/style.css +1 -1
  26. package/dist/{styleView-DPlU1BR3.cjs → styleView-D3pbuMzI.cjs} +1 -1
  27. package/dist/{styleView-DxJ48VZG.js → styleView-DN0aAYgR.js} +1 -1
  28. package/dist/ui/elementPlus/index.cjs +1 -1
  29. package/dist/ui/elementPlus/index.js +1 -1
  30. package/package.json +1 -1
  31. package/dist/index-B8ZkPwJG.cjs +0 -10
  32. package/dist/index-BAcDYc8e.cjs +0 -1
  33. package/dist/index-DVXcAkg5.js +0 -35
  34. package/dist/index-OVAyGpn1.js +0 -4
  35. package/dist/selectPage-Dy9Qj-zX.cjs +0 -1
@@ -1,4 +1,4 @@
1
- import { ref as P, reactive as re, defineComponent as le, openBlock as H, createBlock as Y, unref as R, mergeProps as be, withCtx as T, renderSlot as K, getCurrentInstance as ue, inject as ne, watch as B, useAttrs as Re, provide as Z, shallowRef as Ue, computed as W, watchEffect as he, onUnmounted as $e, resolveComponent as Te, resolveDynamicComponent as Be, createVNode as Q, createCommentVNode as Ne, useSlots as Le, createElementBlock as Ee, Suspense as Fe, createElementVNode as k, Fragment as Je, renderList as ze, nextTick as ce, effectScope as He, isRef as Ke, getCurrentScope as Ze, onScopeDispose as We, onMounted as Ae, normalizeClass as Ge, toRaw as Ie } from "vue";
1
+ import { ref as P, reactive as re, defineComponent as le, openBlock as H, createBlock as Y, unref as U, mergeProps as be, withCtx as T, renderSlot as K, getCurrentInstance as ue, inject as ne, watch as B, useAttrs as Re, provide as Z, shallowRef as Ue, computed as W, watchEffect as he, onUnmounted as $e, resolveComponent as Te, resolveDynamicComponent as Be, createVNode as Q, createCommentVNode as Ne, useSlots as Le, createElementBlock as Ee, Suspense as Fe, createElementVNode as k, Fragment as Je, renderList as ze, nextTick as ce, effectScope as He, isRef as Ke, getCurrentScope as Ze, onScopeDispose as We, onMounted as Ae, normalizeClass as Ge, toRaw as Ie } from "vue";
2
2
  import { p as z, f as Qe, d as ae, a as G, b as Ve, c as Ye, E as j, l as se, g as qe, e as Xe } from "./pluginManager-BCnrHPYv.js";
3
3
  import { a as pe, u as Oe } from "./index-B1s67XDZ.js";
4
4
  import { a as _e } from "./axios-CXDYiOMX.js";
@@ -23,7 +23,7 @@ function Pe() {
23
23
  }
24
24
  function h(p, D = !1) {
25
25
  const I = Object.entries(z.publicMethods).reduce(
26
- (C, [m, U]) => (C[m] = U.handler, C),
26
+ (C, [m, R]) => (C[m] = R.handler, C),
27
27
  {}
28
28
  );
29
29
  try {
@@ -179,7 +179,7 @@ const je = /* @__PURE__ */ le({
179
179
  const s = z.getComponent("form-item"), r = e, c = n, a = P(), w = () => {
180
180
  c("updateFormItemRef", a.value);
181
181
  };
182
- return (g, h) => r.hasFormItem ? (H(), Y(R(s), be({
182
+ return (g, h) => r.hasFormItem ? (H(), Y(U(s), be({
183
183
  key: 0,
184
184
  ref_key: "formItemRef",
185
185
  ref: a,
@@ -297,7 +297,7 @@ const je = /* @__PURE__ */ le({
297
297
  field: l
298
298
  };
299
299
  return $.children && delete $.children, $;
300
- }), U = W(() => {
300
+ }), R = W(() => {
301
301
  var $, u, _;
302
302
  const o = (($ = L.value) == null ? void 0 : $.bindModel) ?? "modelValue", l = {};
303
303
  return t.on && Object.keys(t.on).forEach((J) => {
@@ -308,12 +308,15 @@ const je = /* @__PURE__ */ le({
308
308
  }), {
309
309
  ...r,
310
310
  ...t.componentProps,
311
+ sourceDateUrl: r.sourceDateUrl,
311
312
  // 为了避免禁用对超链接输入框点击的影响
312
313
  disabled: r.componentSchema.type === "input" && r.componentSchema.componentProps && ((u = r.componentSchema.componentProps) != null && u.isLink) ? !1 : (h == null ? void 0 : h.value) || ((_ = t.componentProps) == null ? void 0 : _.disabled),
313
314
  bindModel: o,
314
315
  ...l
315
316
  };
316
- }), L = W(() => z.getComponentConfingByType(t.type) ?? null);
317
+ });
318
+ console.log("%c [ ]-324", "font-size:13px; background:pink; color:#bf2c9f;", R.value);
319
+ const L = W(() => z.getComponentConfingByType(t.type) ?? null);
317
320
  he(() => {
318
321
  c.value = r.modelValue ?? a[t.field ?? ""];
319
322
  }), B(
@@ -403,7 +406,7 @@ const je = /* @__PURE__ */ le({
403
406
  const $ = Te("ENode");
404
407
  return I.value && C.value ? (H(), Y(je, {
405
408
  key: 0,
406
- hasFormItem: R(t).noFormItem !== !0 && ((u = L.value) == null ? void 0 : u.defaultSchema.input),
409
+ hasFormItem: U(t).noFormItem !== !0 && ((u = L.value) == null ? void 0 : u.defaultSchema.input),
407
410
  formItemProps: m.value,
408
411
  onUpdateFormItemRef: p
409
412
  }, {
@@ -412,11 +415,11 @@ const je = /* @__PURE__ */ le({
412
415
  ref_key: "componentInstance",
413
416
  ref: E,
414
417
  onVnodeMounted: A,
415
- model: R(a)
416
- }, { ...U.value }, {
417
- [U.value.bindModel]: c.value,
418
- ["onUpdate:" + U.value.bindModel]: l[0] || (l[0] = (_) => c.value = _),
419
- [`onUpdate:${U.value.bindModel}` || ""]: i,
418
+ model: U(a)
419
+ }, { ...R.value }, {
420
+ [R.value.bindModel]: c.value,
421
+ ["onUpdate:" + R.value.bindModel]: l[0] || (l[0] = (_) => c.value = _),
422
+ [`onUpdate:${R.value.bindModel}` || ""]: i,
420
423
  "onUpdate:modelValueLabel": f,
421
424
  "onUpdate:dynamicId": F
422
425
  }), {
@@ -469,16 +472,16 @@ function tt() {
469
472
  var E, M;
470
473
  if (y && Object.keys(y).length) {
471
474
  let p = function(m) {
472
- let U = [];
475
+ let R = [];
473
476
  return m.forEach((L) => {
474
- L.children && (U = [...U, ...p(L.children)]), U.push(L);
475
- }), U;
477
+ L.children && (R = [...R, ...p(L.children)]), R.push(L);
478
+ }), R;
476
479
  }, I = function(m) {
477
480
  var L;
478
- let U = p((L = y == null ? void 0 : y.schemas[0]) == null ? void 0 : L.children);
481
+ let R = p((L = y == null ? void 0 : y.schemas[0]) == null ? void 0 : L.children);
479
482
  return Object.keys(m).forEach((A) => {
480
483
  var f, i, F, V, o, l, $;
481
- const v = U.find((u) => u.field === A), ee = ["datetimerange", "daterange", "monthrange", "dates"];
484
+ const v = R.find((u) => u.field === A), ee = ["datetimerange", "daterange", "monthrange", "dates"];
482
485
  if ((v && (v == null ? void 0 : v.type) === "checkbox" || (v == null ? void 0 : v.type) === "select" && ((f = v == null ? void 0 : v.componentProps) != null && f.multiple) || (v == null ? void 0 : v.type) === "cascader" && !((F = (i = v == null ? void 0 : v.componentProps) == null ? void 0 : i.props) != null && F.multiple) || (v == null ? void 0 : v.type) === "date" && ee.includes((V = v == null ? void 0 : v.componentProps) == null ? void 0 : V.type)) && typeof m[A] == "string")
483
486
  m[A] = (o = m[A]) == null ? void 0 : o.split(",");
484
487
  else if ((v == null ? void 0 : v.type) === "cascader" && (($ = (l = v == null ? void 0 : v.componentProps) == null ? void 0 : l.props) != null && $.multiple) && typeof m[A] == "string")
@@ -628,7 +631,7 @@ const nt = {
628
631
  )), V[o]++) : l.children && (l.children = m(l.children, i, F, V));
629
632
  }), V[o] = 0, i;
630
633
  }
631
- function U(f, i, F) {
634
+ function R(f, i, F) {
632
635
  let V = m(G(f), G(i));
633
636
  return {
634
637
  obj: C(f),
@@ -639,7 +642,7 @@ const nt = {
639
642
  let i = D(M.pageSchema.schemas[0].children);
640
643
  a.value = i.filter((l) => l.type === "card" && l.multiple);
641
644
  const F = I(M.pageSchema.schemas[0].children, f);
642
- let { obj: V, dataObj: o } = U(F, f, a.value);
645
+ let { obj: V, dataObj: o } = R(F, f, a.value);
643
646
  return f = o, M.pageSchema.schemas[0].children = V, Object.keys(f).forEach((l) => {
644
647
  var $, u, _, J, q, de, fe;
645
648
  if (l.indexOf("@") < 0) {
@@ -690,13 +693,13 @@ const nt = {
690
693
  setForms: S,
691
694
  validateAll: y,
692
695
  getFormInstance: E
693
- }), (f, i) => R(z).initialized.value ? (H(), Y(Fe, {
696
+ }), (f, i) => U(z).initialized.value ? (H(), Y(Fe, {
694
697
  key: 1,
695
698
  onResolve: ee
696
699
  }, {
697
700
  default: T(() => [
698
701
  k("div", ot, [
699
- (H(!0), Ee(Je, null, ze(p.schemas, (F, V) => (H(), Y(R(et), {
702
+ (H(!0), Ee(Je, null, ze(p.schemas, (F, V) => (H(), Y(U(et), {
700
703
  id: M.id,
701
704
  key: V,
702
705
  sourceDateUrl: M.sourceDateUrl,
@@ -706,7 +709,7 @@ const nt = {
706
709
  ]),
707
710
  fallback: T(() => [
708
711
  k("div", st, [
709
- Q(R(r))
712
+ Q(U(r))
710
713
  ])
711
714
  ]),
712
715
  _: 1
@@ -724,7 +727,7 @@ function lt(e) {
724
727
  return (...a) => (n += 1, r || (r = He(!0), s = r.run(() => e(...a))), xe(c), s);
725
728
  }
726
729
  function ie(e) {
727
- return typeof e == "function" ? e() : R(e);
730
+ return typeof e == "function" ? e() : U(e);
728
731
  }
729
732
  const at = typeof window < "u" && typeof document < "u";
730
733
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
@@ -1071,7 +1074,7 @@ const xt = { class: "min-w-750px rounded" }, It = { class: "h-full rounded" }, _
1071
1074
  }
1072
1075
  return n({
1073
1076
  handleOpen: d
1074
- }), (y, E) => (H(), Y(R(r), {
1077
+ }), (y, E) => (H(), Y(U(r), {
1075
1078
  modelValue: a.value,
1076
1079
  "onUpdate:modelValue": E[1] || (E[1] = (M) => a.value = M),
1077
1080
  title: "预览",
@@ -1083,13 +1086,13 @@ const xt = { class: "min-w-750px rounded" }, It = { class: "h-full rounded" }, _
1083
1086
  }, {
1084
1087
  default: T(() => [
1085
1088
  k("div", xt, [
1086
- (H(), Y(R(rt), {
1089
+ (H(), Y(U(rt), {
1087
1090
  key: O.value,
1088
1091
  ref_key: "kb",
1089
1092
  ref: N,
1090
- "page-schema": R(h)
1093
+ "page-schema": U(h)
1091
1094
  }, null, 8, ["page-schema"])),
1092
- Q(R(r), {
1095
+ Q(U(r), {
1093
1096
  modelValue: w.value,
1094
1097
  "onUpdate:modelValue": E[0] || (E[0] = (M) => w.value = M),
1095
1098
  title: "表单数据",
@@ -1100,7 +1103,7 @@ const xt = { class: "min-w-750px rounded" }, It = { class: "h-full rounded" }, _
1100
1103
  }, {
1101
1104
  default: T(() => [
1102
1105
  k("div", It, [
1103
- Q(R(s), {
1106
+ Q(U(s), {
1104
1107
  ref_key: "monacoEditorRef",
1105
1108
  ref: c,
1106
1109
  autoToggleTheme: "",
@@ -1143,7 +1146,7 @@ const xt = { class: "min-w-750px rounded" }, It = { class: "h-full rounded" }, _
1143
1146
  "updateSourceData"
1144
1147
  ],
1145
1148
  setup(e, { expose: n, emit: s }) {
1146
- const { t: r } = Oe(), c = se(() => import("./index-IGxCNti8.js")), a = se(() => import("./index-WkZdU_zw.js")), w = se(() => import("./index-DKq_URx5.js")), g = se(() => import("./index-Cln9MN7u.js")), h = se(() => import("./index-DgcFxYFp.js")), N = Pe(), O = ke(), t = e;
1149
+ const { t: r } = Oe(), c = se(() => import("./index-IGxCNti8.js")), a = se(() => import("./index-WkZdU_zw.js")), w = se(() => import("./index-hOLbkmql.js")), g = se(() => import("./index-Cln9MN7u.js")), h = se(() => import("./index-DgcFxYFp.js")), N = Pe(), O = ke(), t = e;
1147
1150
  let x = {
1148
1151
  schemas: [
1149
1152
  {
@@ -1250,7 +1253,7 @@ defineExpose({
1250
1253
  async function m(i = !1) {
1251
1254
  y.disableHover = i;
1252
1255
  }
1253
- function U(i) {
1256
+ function R(i) {
1254
1257
  ae(E, G(i));
1255
1258
  }
1256
1259
  function L() {
@@ -1270,11 +1273,11 @@ defineExpose({
1270
1273
  }
1271
1274
  return p(), n({
1272
1275
  revoke: O,
1273
- setData: U,
1276
+ setData: R,
1274
1277
  getData: L,
1275
1278
  reset: A,
1276
1279
  preview: f
1277
- }), (i, F) => R(z).initialized.value ? (H(), Y(Fe, {
1280
+ }), (i, F) => U(z).initialized.value ? (H(), Y(Fe, {
1278
1281
  key: 1,
1279
1282
  onResolve: C
1280
1283
  }, {
@@ -1282,7 +1285,7 @@ defineExpose({
1282
1285
  k("div", Nt, [
1283
1286
  k("div", Ft, [
1284
1287
  K(i.$slots, "header", {}, () => [
1285
- t.hiddenHeader ? Ne("", !0) : (H(), Y(R(c), {
1288
+ t.hiddenHeader ? Ne("", !0) : (H(), Y(U(c), {
1286
1289
  key: 0,
1287
1290
  onPreview: f,
1288
1291
  onSave: v
@@ -1312,9 +1315,9 @@ defineExpose({
1312
1315
  k("div", {
1313
1316
  class: Ge(["epic-split-view-container", { "hidden-header": i.hiddenHeader }])
1314
1317
  }, [
1315
- Q(R(a)),
1316
- Q(R(w)),
1317
- Q(R(g))
1318
+ Q(U(a)),
1319
+ Q(U(w)),
1320
+ Q(U(g))
1318
1321
  ], 2),
1319
1322
  Q(_t, {
1320
1323
  ref_key: "previewRef",
@@ -1324,14 +1327,14 @@ defineExpose({
1324
1327
  ]),
1325
1328
  fallback: T(() => [
1326
1329
  k("div", Vt, [
1327
- Q(R(h))
1330
+ Q(U(h))
1328
1331
  ])
1329
1332
  ]),
1330
1333
  _: 3
1331
1334
  })) : (H(), Ee("div", $t));
1332
1335
  }
1333
1336
  }), Pt = {
1334
- component: async () => await import("./index-DNsJw-co.js"),
1337
+ component: async () => await import("./index-B7wRhLwc.js"),
1335
1338
  defaultSchema: {
1336
1339
  label: "代码编辑器",
1337
1340
  type: "monacoEditor",
@@ -1381,7 +1384,7 @@ defineExpose({
1381
1384
  }
1382
1385
  }, { t: me } = Oe();
1383
1386
  function Mt(e) {
1384
- e.component("EInputSize", async () => await import("./index-Cx7gKpkD.js")), e.component("EColEditor", async () => await import("./index-CpTA2IRB.js")), e.component("EActionEditor", async () => await import("./index-C0J-aMmj.js")), e.component("ERuleEditor", async () => await import("./index-BgsV-cQ7.js")), e.component("EOptionsEditor", async () => await import("./index-tdTN310R.js")), e.component("ENode", async () => await import("./index-OVAyGpn1.js")), e.component("EDataSource", async () => await import("./index-B0OgKtuT.js")), e.component("EColumnEditor", async () => await import("./index-BxQ1Bi2l.js")), e.component("PaddingMarginControl", async () => await import("./index-CdnV7DS4.js")), e.component("ESourceDataSelect", async () => await import("./index-DVXcAkg5.js")), e.registerActivitybar({
1387
+ e.component("EInputSize", async () => await import("./index-Cx7gKpkD.js")), e.component("EColEditor", async () => await import("./index-CpTA2IRB.js")), e.component("EActionEditor", async () => await import("./index-BUt-kkII.js")), e.component("ERuleEditor", async () => await import("./index-CItH08Va.js")), e.component("EOptionsEditor", async () => await import("./index-DrBumgPi.js")), e.component("ENode", async () => await import("./index-5XsDINLZ.js")), e.component("EDataSource", async () => await import("./index-B0OgKtuT.js")), e.component("EColumnEditor", async () => await import("./index-BokMTYeM.js")), e.component("PaddingMarginControl", async () => await import("./index-CdnV7DS4.js")), e.component("ESourceDataSelect", async () => await import("./index-CNtDbtWP.js")), e.registerActivitybar({
1385
1388
  id: "component_view",
1386
1389
  title: me("component"),
1387
1390
  icon: "icon--epic--extension-outline",
@@ -1394,11 +1397,11 @@ function Mt(e) {
1394
1397
  }), e.registerRightSidebar({
1395
1398
  id: "attribute_view",
1396
1399
  title: me("attribute"),
1397
- component: async () => await import("./attributeView-CDoPoMy8.js")
1400
+ component: async () => await import("./attributeView-BBN4W9TM.js")
1398
1401
  }), e.registerRightSidebar({
1399
1402
  id: "style_view",
1400
1403
  title: me("style"),
1401
- component: async () => await import("./styleView-DxJ48VZG.js")
1404
+ component: async () => await import("./styleView-DN0aAYgR.js")
1402
1405
  }), e.registerRightSidebar({
1403
1406
  id: "event_view",
1404
1407
  title: "事件",
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-B8ZkPwJG.cjs"),e=require("./pluginManager-DWHAX8kP.cjs");exports.EBuilder=a._sfc_main$1;exports.EDesigner=a._sfc_main$2;exports.ENode=a._sfc_main;exports.debounce=a.debounce;exports.getDarkState=a.getDarkState;exports.initStore=a.initStore;exports.useDark=a.useDark;exports.useElementDrag=a.useElementDrag;exports.useElementZoom=a.useElementZoom;exports.useKeyPress=a.useKeyPress;exports.usePageManager=a.usePageManager;exports.useRevoke=a.useRevoke;exports.useStore=a.useStore;exports.useTheme=a.useTheme;exports.useTimedQuery=a.useTimedQuery;exports.EventBus=e.EventBus;exports.PluginManager=e.PluginManager;exports.capitalizeFirstLetter=e.capitalizeFirstLetter;exports.convertKFormData=e.convertKFormData;exports.deepClone=e.deepClone;exports.deepCompareAndModify=e.deepCompareAndModify;exports.deepEqual=e.deepEqual;exports.findSchemaById=e.findSchemaById;exports.findSchemaInfoById=e.findSchemaInfoById;exports.findSchemas=e.findSchemas;exports.generateNewSchema=e.generateNewSchema;exports.getFormFields=e.getFormFields;exports.getFormSchemas=e.getFormSchemas;exports.getMatchedById=e.getMatchedById;exports.getUUID=e.getUUID;exports.getValueByPath=e.getValueByPath;exports.loadAsyncComponent=e.loadAsyncComponent;exports.mapSchemas=e.mapSchemas;exports.pluginManager=e.pluginManager;exports.recursionConvertedNode=e.recursionConvertedNode;exports.setValueByPath=e.setValueByPath;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-CDH3QO51.cjs"),e=require("./pluginManager-DWHAX8kP.cjs");exports.EBuilder=a._sfc_main$1;exports.EDesigner=a._sfc_main$2;exports.ENode=a._sfc_main;exports.debounce=a.debounce;exports.getDarkState=a.getDarkState;exports.initStore=a.initStore;exports.useDark=a.useDark;exports.useElementDrag=a.useElementDrag;exports.useElementZoom=a.useElementZoom;exports.useKeyPress=a.useKeyPress;exports.usePageManager=a.usePageManager;exports.useRevoke=a.useRevoke;exports.useStore=a.useStore;exports.useTheme=a.useTheme;exports.useTimedQuery=a.useTimedQuery;exports.EventBus=e.EventBus;exports.PluginManager=e.PluginManager;exports.capitalizeFirstLetter=e.capitalizeFirstLetter;exports.convertKFormData=e.convertKFormData;exports.deepClone=e.deepClone;exports.deepCompareAndModify=e.deepCompareAndModify;exports.deepEqual=e.deepEqual;exports.findSchemaById=e.findSchemaById;exports.findSchemaInfoById=e.findSchemaInfoById;exports.findSchemas=e.findSchemas;exports.generateNewSchema=e.generateNewSchema;exports.getFormFields=e.getFormFields;exports.getFormSchemas=e.getFormSchemas;exports.getMatchedById=e.getMatchedById;exports.getUUID=e.getUUID;exports.getValueByPath=e.getValueByPath;exports.loadAsyncComponent=e.loadAsyncComponent;exports.mapSchemas=e.mapSchemas;exports.pluginManager=e.pluginManager;exports.recursionConvertedNode=e.recursionConvertedNode;exports.setValueByPath=e.setValueByPath;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { i as s, j as t, _ as r, f as o, o as n, p as d, n as m, c as u, e as i, m as g, k as c, l, u as h, h as p, a as f } from "./index-CquiCjYl.js";
1
+ import { i as s, j as t, _ as r, f as o, o as n, p as d, n as m, c as u, e as i, m as g, k as c, l, u as h, h as p, a as f } from "./index-rQwg6K9E.js";
2
2
  import { E as S, P as E, c as B, q as D, a as P, d as k, b as F, n as I, o as M, f as v, h as C, j as N, k as b, e as j, g as q, i as x, l as A, m as K, p as T, r as U, s as V } from "./pluginManager-BCnrHPYv.js";
3
3
  export {
4
4
  s as EBuilder,
@@ -1,5 +1,5 @@
1
- import { defineComponent as W, ref as u, watch as x, openBlock as _, createBlock as A, unref as F, withCtx as G, createElementBlock as Q, Fragment as X, renderList as Y, nextTick as ee } from "vue";
2
- import { a as q } from "./axios-CXDYiOMX.js";
1
+ import { defineComponent as W, ref as u, watch as j, openBlock as D, createBlock as A, unref as F, withCtx as G, createElementBlock as Q, Fragment as X, renderList as Y, nextTick as ee } from "vue";
2
+ import { a as U } from "./axios-CXDYiOMX.js";
3
3
  import { a as h } from "./index-B1s67XDZ.js";
4
4
  import { ElSelect as ae, ElOption as le } from "element-plus";
5
5
  import { _ as te } from "./_plugin-vue_export-helper-CHgC5LLL.js";
@@ -21,38 +21,40 @@ const oe = /* @__PURE__ */ W({
21
21
  sourceDateUrl: { type: String, default: "" }
22
22
  },
23
23
  emits: ["update:modelValue", "update:modelValueLabel"],
24
- setup(D, { emit: I }) {
25
- const O = `paginated-select-dropdown-${Math.random().toString(36).slice(2, 8)}`, a = D, P = I, v = u(a.modelValue);
26
- x(
24
+ setup(k, { emit: q }) {
25
+ const _ = `paginated-select-dropdown-${Math.random().toString(36).slice(2, 8)}`, a = k;
26
+ console.log("%c [ ]-37", "font-size:13px; background:pink; color:#bf2c9f;", a), console.log("%c [ ]-37", "font-size:13px; background:pink; color:#bf2c9f;", a.sourceDateUrl);
27
+ const O = q, v = u(a.modelValue);
28
+ j(
27
29
  () => a.modelValue,
28
30
  (e) => {
29
31
  v.value = e;
30
32
  }
31
- ), x(v, (e) => {
32
- P("update:modelValue", e);
33
+ ), j(v, (e) => {
34
+ O("update:modelValue", e);
33
35
  let l = n.value.find((t) => t.value === e);
34
- P("update:modelValueLabel", {
36
+ O("update:modelValueLabel", {
35
37
  label: l.label || a.defaultData.label,
36
38
  value: l.value || a.defaultData.value
37
39
  });
38
40
  });
39
- const n = u(a.defaultData && Object.keys(a.defaultData).length ? [a.defaultData] : []), s = u(!1), m = u(0), c = u(1), T = u(""), p = u(!1), i = u(null), f = u(null);
40
- function B() {
41
- n.value = [], m.value = 0, c.value = 1, p.value = !1;
41
+ const n = u(a.defaultData && Object.keys(a.defaultData).length ? [a.defaultData] : []), s = u(!1), p = u(0), c = u(1), z = u(""), m = u(!1), i = u(null), f = u(null);
42
+ function P() {
43
+ n.value = [], p.value = 0, c.value = 1, m.value = !1;
42
44
  }
43
45
  async function g() {
44
- var e, l, t, r, E, K, L, z, C, N;
45
- if (!(s.value || p.value)) {
46
+ var e, l, t, r, T, x, B, E, K, L;
47
+ if (!(s.value || m.value)) {
46
48
  s.value = !0;
47
49
  try {
48
- const d = await q({
50
+ const d = await U({
49
51
  url: o.value.url,
50
52
  method: o.value.method,
51
53
  data: o.value.body ? JSON.parse(o.value.body) : {},
52
54
  params: o.value.params ? {
53
55
  ...JSON.parse(o.value.params),
54
56
  [`${(l = (e = a == null ? void 0 : a.componentSchema) == null ? void 0 : e.componentProps) == null ? void 0 : l.pageKey}`]: c.value,
55
- [`${(r = (t = a == null ? void 0 : a.componentSchema) == null ? void 0 : t.componentProps) == null ? void 0 : r.searchKey}`]: T.value
57
+ [`${(r = (t = a == null ? void 0 : a.componentSchema) == null ? void 0 : t.componentProps) == null ? void 0 : r.searchKey}`]: z.value
56
58
  } : {},
57
59
  headers: {
58
60
  ...JSON.parse(o.value.headers),
@@ -64,16 +66,16 @@ const oe = /* @__PURE__ */ W({
64
66
  }
65
67
  });
66
68
  if (o.value && o.value.dataPath) {
67
- const Z = ((E = o.value) == null ? void 0 : E.dataPath.split(".")).reduce((w, V) => w[V], d.data), j = (K = o.value) == null ? void 0 : K.dataPath.split(".");
68
- j.pop();
69
- const R = j.reduce((w, V) => w[V], d.data);
70
- let k = b(Z, o.value.dataKey, o.value.dataValue);
71
- c.value === 1 ? n.value = k : n.value = n.value.concat(k), m.value = R[(z = (L = a == null ? void 0 : a.componentSchema) == null ? void 0 : L.componentProps) == null ? void 0 : z.pageTotalKey];
69
+ const Z = ((T = o.value) == null ? void 0 : T.dataPath.split(".")).reduce((w, V) => w[V], d.data), C = (x = o.value) == null ? void 0 : x.dataPath.split(".");
70
+ C.pop();
71
+ const R = C.reduce((w, V) => w[V], d.data);
72
+ let N = b(Z, o.value.dataKey, o.value.dataValue);
73
+ c.value === 1 ? n.value = N : n.value = n.value.concat(N), p.value = R[(E = (B = a == null ? void 0 : a.componentSchema) == null ? void 0 : B.componentProps) == null ? void 0 : E.pageTotalKey];
72
74
  } else {
73
75
  let S = b(d.data, o.value.dataKey, o.value.dataValue);
74
- c.value === 1 ? n.value = S : n.value = n.value.concat(S), m.value = d.data[(N = (C = a == null ? void 0 : a.componentSchema) == null ? void 0 : C.componentProps) == null ? void 0 : N.pageTotalKey];
76
+ c.value === 1 ? n.value = S : n.value = n.value.concat(S), p.value = d.data[(L = (K = a == null ? void 0 : a.componentSchema) == null ? void 0 : K.componentProps) == null ? void 0 : L.pageTotalKey];
75
77
  }
76
- n.value.length >= m.value && (p.value = !0);
78
+ n.value.length >= p.value && (m.value = !0);
77
79
  } catch (d) {
78
80
  console.error("fetch error:", d);
79
81
  } finally {
@@ -92,9 +94,10 @@ const oe = /* @__PURE__ */ W({
92
94
  value: r[t] + ""
93
95
  }) : [];
94
96
  }
95
- async function U() {
97
+ async function I() {
96
98
  var l, t;
97
- let e = await q({
99
+ console.log("%c [ ]-171", "font-size:13px; background:pink; color:#bf2c9f;", a.sourceDateUrl);
100
+ let e = await U({
98
101
  url: a.sourceDateUrl,
99
102
  method: "get",
100
103
  params: {
@@ -110,15 +113,15 @@ const oe = /* @__PURE__ */ W({
110
113
  });
111
114
  e.data.code === 200 && (o.value = e.data.data);
112
115
  }
113
- U();
116
+ I();
114
117
  function $(e) {
115
- T.value = e, c.value = 1, B(), g();
118
+ z.value = e, c.value = 1, P(), g();
116
119
  }
117
120
  function J(e) {
118
- e ? (B(), g(), ee(() => setTimeout(M, 0))) : H();
121
+ e ? (P(), g(), ee(() => setTimeout(M, 0))) : H();
119
122
  }
120
123
  function M() {
121
- const e = document.querySelector(`.${O} .el-select-dropdown__wrap`);
124
+ const e = document.querySelector(`.${_} .el-select-dropdown__wrap`);
122
125
  e ? (i.value = e, e.addEventListener("scroll", y)) : (f.value = new MutationObserver(() => {
123
126
  const l = document.querySelector(".paginated-select-dropdown .el-select-dropdown__wrap");
124
127
  l && (i.value = l, l.addEventListener("scroll", y), f.value.disconnect());
@@ -130,25 +133,25 @@ const oe = /* @__PURE__ */ W({
130
133
  }
131
134
  function y() {
132
135
  const e = i.value;
133
- if (!e || s.value || p.value) return;
136
+ if (!e || s.value || m.value) return;
134
137
  e.scrollTop + e.clientHeight >= e.scrollHeight - 10 && (c.value++, g());
135
138
  }
136
- return (e, l) => (_(), A(F(ae), {
139
+ return (e, l) => (D(), A(F(ae), {
137
140
  modelValue: v.value,
138
141
  "onUpdate:modelValue": l[0] || (l[0] = (t) => v.value = t),
139
142
  filterable: "",
140
143
  remote: "",
141
144
  clearable: "",
142
- placeholder: D.placeholder,
145
+ placeholder: k.placeholder,
143
146
  "remote-method": $,
144
147
  loading: s.value,
145
148
  teleported: !0,
146
149
  onVisibleChange: J,
147
- "popper-class": O,
150
+ "popper-class": _,
148
151
  style: { width: "100%" }
149
152
  }, {
150
153
  default: G(() => [
151
- (_(!0), Q(X, null, Y(n.value, (t) => (_(), A(F(le), {
154
+ (D(!0), Q(X, null, Y(n.value, (t) => (D(), A(F(le), {
152
155
  key: t.value,
153
156
  label: t.label,
154
157
  value: t.value
@@ -157,7 +160,7 @@ const oe = /* @__PURE__ */ W({
157
160
  _: 1
158
161
  }, 8, ["modelValue", "placeholder", "loading"]));
159
162
  }
160
- }), ie = /* @__PURE__ */ te(oe, [["__scopeId", "data-v-e1d8d544"]]);
163
+ }), ie = /* @__PURE__ */ te(oe, [["__scopeId", "data-v-20507400"]]);
161
164
  export {
162
165
  ie as default
163
166
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),j=require("./axios-tuVKNgv9.cjs"),h=require("./index-BoL2PSBk.cjs"),C=require("element-plus"),J=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Z=l.defineComponent({__name:"selectPage",props:{modelValue:[String,Number],placeholder:String,requestFn:{type:Function,default:()=>{}},valueKey:{type:String,default:"value"},labelKey:{type:String,default:"label"},pageSize:{type:Number,default:20},defaultData:{type:Object,default:()=>{}},componentSchema:{type:Object,default:()=>{}},sourceDateUrl:{type:String,default:""}},emits:["update:modelValue","update:modelValueLabel"],setup(k,{emit:N}){const D=`paginated-select-dropdown-${Math.random().toString(36).slice(2,8)}`,a=k;console.log("%c [ ]-37","font-size:13px; background:pink; color:#bf2c9f;",a),console.log("%c [ ]-37","font-size:13px; background:pink; color:#bf2c9f;",a.sourceDateUrl);const _=N,v=l.ref(a.modelValue);l.watch(()=>a.modelValue,e=>{v.value=e}),l.watch(v,e=>{_("update:modelValue",e);let t=r.value.find(o=>o.value===e);_("update:modelValueLabel",{label:t.label||a.defaultData.label,value:t.value||a.defaultData.value})});const r=l.ref(a.defaultData&&Object.keys(a.defaultData).length?[a.defaultData]:[]),d=l.ref(!1),p=l.ref(0),c=l.ref(1),x=l.ref(""),f=l.ref(!1),i=l.ref(null),m=l.ref(null);function O(){r.value=[],p.value=0,c.value=1,f.value=!1}async function g(){var e,t,o,u,P,B,T,z,q,E;if(!(d.value||f.value)){d.value=!0;try{const s=await j.axios({url:n.value.url,method:n.value.method,data:n.value.body?JSON.parse(n.value.body):{},params:n.value.params?{...JSON.parse(n.value.params),[`${(t=(e=a==null?void 0:a.componentSchema)==null?void 0:e.componentProps)==null?void 0:t.pageKey}`]:c.value,[`${(u=(o=a==null?void 0:a.componentSchema)==null?void 0:o.componentProps)==null?void 0:u.searchKey}`]:x.value}:{},headers:{...JSON.parse(n.value.headers),Authorization:"Bearer "+h.api.get("Admin-Token"),lang:h.api.get("saas-locale")||"zh-CN",zone:Intl.DateTimeFormat().resolvedOptions().timeZone}});if(n.value&&n.value.dataPath){const $=((P=n.value)==null?void 0:P.dataPath.split(".")).reduce((w,V)=>w[V],s.data),K=(B=n.value)==null?void 0:B.dataPath.split(".");K.pop();const H=K.reduce((w,V)=>w[V],s.data);let L=b($,n.value.dataKey,n.value.dataValue);c.value===1?r.value=L:r.value=r.value.concat(L),p.value=H[(z=(T=a==null?void 0:a.componentSchema)==null?void 0:T.componentProps)==null?void 0:z.pageTotalKey]}else{let S=b(s.data,n.value.dataKey,n.value.dataValue);c.value===1?r.value=S:r.value=r.value.concat(S),p.value=s.data[(E=(q=a==null?void 0:a.componentSchema)==null?void 0:q.componentProps)==null?void 0:E.pageTotalKey]}r.value.length>=p.value&&(f.value=!0)}catch(s){console.error("fetch error:",s)}finally{d.value=!1}}}const n=l.ref();function b(e,t,o){return e&&Object.prototype.toString.call(e)==="[object Array]"?e.map(u=>u.children&&u.children.length?{label:u[t],value:u[o]+"",children:b(u.children,t,o)}:{label:u[t],value:u[o]+""}):[]}async function A(){var t,o;console.log("%c [ ]-171","font-size:13px; background:pink; color:#bf2c9f;",a.sourceDateUrl);let e=await j.axios({url:a.sourceDateUrl,method:"get",params:{id:(o=(t=a==null?void 0:a.componentSchema)==null?void 0:t.componentProps)==null?void 0:o.dynamicId},headers:{Authorization:"Bearer "+h.api.get("Admin-Token"),lang:h.api.get("saas-locale")||"zh-CN",zone:Intl.DateTimeFormat().resolvedOptions().timeZone}});e.data.code===200&&(n.value=e.data.data)}A();function F(e){x.value=e,c.value=1,O(),g()}function U(e){e?(O(),g(),l.nextTick(()=>setTimeout(I,0))):M()}function I(){const e=document.querySelector(`.${D} .el-select-dropdown__wrap`);e?(i.value=e,e.addEventListener("scroll",y)):(m.value=new MutationObserver(()=>{const t=document.querySelector(".paginated-select-dropdown .el-select-dropdown__wrap");t&&(i.value=t,t.addEventListener("scroll",y),m.value.disconnect())}),m.value.observe(document.body,{childList:!0,subtree:!0}))}function M(){var e;i.value&&i.value.removeEventListener("scroll",y),(e=m.value)==null||e.disconnect()}function y(){const e=i.value;if(!e||d.value||f.value)return;e.scrollTop+e.clientHeight>=e.scrollHeight-10&&(c.value++,g())}return(e,t)=>(l.openBlock(),l.createBlock(l.unref(C.ElSelect),{modelValue:v.value,"onUpdate:modelValue":t[0]||(t[0]=o=>v.value=o),filterable:"",remote:"",clearable:"",placeholder:k.placeholder,"remote-method":F,loading:d.value,teleported:!0,onVisibleChange:U,"popper-class":D,style:{width:"100%"}},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.value,o=>(l.openBlock(),l.createBlock(l.unref(C.ElOption),{key:o.value,label:o.label,value:o.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","loading"]))}}),R=J._export_sfc(Z,[["__scopeId","data-v-20507400"]]);exports.default=R;