@vancone/console-component 0.1.1-beta.8 → 0.1.1-beta.9

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vancone/console-component",
3
3
  "private": false,
4
- "version": "0.1.1-beta.8",
4
+ "version": "0.1.1-beta.9",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "packages/dist/**"
@@ -33,7 +33,7 @@ import { ElMessage as lt, ElMessageBox as Co } from "element-plus";
33
33
  import { Search as Dt, ArrowRight as ko, Check as Oo, Refresh as Rt, QuestionFilled as xo, Download as Eo, ArrowDown as $o } from "@element-plus/icons-vue";
34
34
  import { createI18n as Io, useI18n as Je } from "vue-i18n";
35
35
  import { cloneDeep as Te } from "lodash";
36
- const he = (e, t) => {
36
+ const _e = (e, t) => {
37
37
  const o = e.__vccOpts || e;
38
38
  for (const [n, s] of t)
39
39
  o[n] = s;
@@ -42,12 +42,12 @@ const he = (e, t) => {
42
42
  function Ao(e, t) {
43
43
  return p(), M("div", No);
44
44
  }
45
- const Vo = /* @__PURE__ */ he(Po, [["render", Ao], ["__scopeId", "data-v-07bd45d2"]]), me = So.create({
45
+ const Vo = /* @__PURE__ */ _e(Po, [["render", Ao], ["__scopeId", "data-v-07bd45d2"]]), he = So.create({
46
46
  timeout: 2 * 60 * 1e3,
47
47
  withCredentials: !0
48
48
  });
49
- me.interceptors.request.use((e) => e);
50
- me.interceptors.response.use((e) => {
49
+ he.interceptors.request.use((e) => e);
50
+ he.interceptors.response.use((e) => {
51
51
  const { headers: t, method: o } = e.config, { code: n, message: s } = e.data, { "No-Success-Message": r } = t, l = o !== "get";
52
52
  return n === 0 ? (l && !r && lt({
53
53
  message: s,
@@ -79,16 +79,16 @@ const Ft = () => {
79
79
  return e.includes("beta") || e.includes("localhost") ? "passport.beta.vancone.com" : "passport.vancone.com";
80
80
  }, Gt = Ft();
81
81
  function Mo() {
82
- return me.get(`//${Gt}/api/passport/service/v1/account`);
82
+ return he.get(`//${Gt}/api/passport/service/v1/account`);
83
83
  }
84
84
  function Uo() {
85
- return me.delete(`//${Gt}/api/passport/service/v1/login`);
85
+ return he.delete(`//${Gt}/api/passport/service/v1/login`);
86
86
  }
87
87
  function To() {
88
- return me.get("https://console.vancone.com/api/console/app-group?pageSize=1000");
88
+ return he.get("https://console.vancone.com/api/console/app-group?pageSize=1000");
89
89
  }
90
90
  function Do() {
91
- return me.get("https://console.vancone.com/api/console/app?pageSize=1000");
91
+ return he.get("https://console.vancone.com/api/console/app?pageSize=1000");
92
92
  }
93
93
  const Ro = {
94
94
  xmlns: "http://www.w3.org/2000/svg",
@@ -221,7 +221,7 @@ const Ho = { render: Bo }, Jo = { class: "app-catalog-wrapper" }, Wo = { class:
221
221
  ]);
222
222
  };
223
223
  }
224
- }), tn = /* @__PURE__ */ he(en, [["__scopeId", "data-v-ef746334"]]), on = {
224
+ }), tn = /* @__PURE__ */ _e(en, [["__scopeId", "data-v-ef746334"]]), on = {
225
225
  common: {
226
226
  header: {
227
227
  product: "Products",
@@ -585,7 +585,7 @@ const _n = { render: hn }, gn = { class: "header" }, bn = { class: "title" }, vn
585
585
  ], 64);
586
586
  };
587
587
  }
588
- }), Lt = /* @__PURE__ */ he(xn, [["__scopeId", "data-v-6fc40dbc"]]), En = {
588
+ }), Lt = /* @__PURE__ */ _e(xn, [["__scopeId", "data-v-6fc40dbc"]]), En = {
589
589
  class: "menu-icon-wrapper",
590
590
  style: { "margin-left": "3px" }
591
591
  }, $n = { class: "menu-icon-wrapper" }, In = /* @__PURE__ */ ve({
@@ -641,7 +641,7 @@ const _n = { render: hn }, gn = { class: "header" }, bn = { class: "title" }, vn
641
641
  }, 8, ["index"]));
642
642
  };
643
643
  }
644
- }), Pn = /* @__PURE__ */ he(In, [["__scopeId", "data-v-99da7c39"]]), be = A({}), Nn = {}, kt = A([]);
644
+ }), Pn = /* @__PURE__ */ _e(In, [["__scopeId", "data-v-99da7c39"]]), me = A({}), Nn = {}, kt = A([]);
645
645
  var jt = !1;
646
646
  function Qe(e, t, o) {
647
647
  return Array.isArray(e) ? (e.length = Math.max(e.length, t), e.splice(t, 1, o), o) : (e[t] = o, o);
@@ -926,7 +926,7 @@ function Kt(e, t) {
926
926
  n ? Object.assign(n, t[o]) : e.state.value[o] = t[o];
927
927
  }
928
928
  }
929
- function ge(e) {
929
+ function be(e) {
930
930
  return {
931
931
  _custom: {
932
932
  display: e
@@ -986,8 +986,8 @@ function Qn(e) {
986
986
  operations: [],
987
987
  newValue: {}
988
988
  }) : {
989
- operation: ge(e.type),
990
- key: ge(e.key),
989
+ operation: be(e.type),
990
+ key: be(e.key),
991
991
  oldValue: e.oldValue,
992
992
  newValue: e.newValue
993
993
  } : {};
@@ -1171,8 +1171,8 @@ function es(e, t) {
1171
1171
  title: "🛫 " + i,
1172
1172
  subtitle: "start",
1173
1173
  data: {
1174
- store: ge(t.$id),
1175
- action: ge(i),
1174
+ store: be(t.$id),
1175
+ action: be(i),
1176
1176
  args: d
1177
1177
  },
1178
1178
  groupId: w
@@ -1185,8 +1185,8 @@ function es(e, t) {
1185
1185
  title: "🛬 " + i,
1186
1186
  subtitle: "end",
1187
1187
  data: {
1188
- store: ge(t.$id),
1189
- action: ge(i),
1188
+ store: be(t.$id),
1189
+ action: be(i),
1190
1190
  args: d,
1191
1191
  result: y
1192
1192
  },
@@ -1202,8 +1202,8 @@ function es(e, t) {
1202
1202
  title: "💥 " + i,
1203
1203
  subtitle: "end",
1204
1204
  data: {
1205
- store: ge(t.$id),
1206
- action: ge(i),
1205
+ store: be(t.$id),
1206
+ action: be(i),
1207
1207
  args: d,
1208
1208
  error: y
1209
1209
  },
@@ -1233,7 +1233,7 @@ function es(e, t) {
1233
1233
  const d = {
1234
1234
  time: n(),
1235
1235
  title: Kn(a),
1236
- data: Xn({ store: ge(t.$id) }, Qn(l)),
1236
+ data: Xn({ store: be(t.$id) }, Qn(l)),
1237
1237
  groupId: Oe
1238
1238
  };
1239
1239
  a === ye.patchFunction ? d.subtitle = "⤵️" : a === ye.patchObject ? d.subtitle = "🧩" : l && !Array.isArray(l) && (d.subtitle = l.type), l && (d.data["rawEvent(s)"] = {
@@ -1257,8 +1257,8 @@ function es(e, t) {
1257
1257
  title: "🔥 " + t.$id,
1258
1258
  subtitle: "HMR update",
1259
1259
  data: {
1260
- store: ge(t.$id),
1261
- info: ge("HMR update")
1260
+ store: be(t.$id),
1261
+ info: be("HMR update")
1262
1262
  }
1263
1263
  }
1264
1264
  }), o.notifyComponentUpdate(), o.sendInspectorTree(le), o.sendInspectorState(le);
@@ -1856,7 +1856,7 @@ const ro = /* @__PURE__ */ as("console", {
1856
1856
  ])) : z("", !0);
1857
1857
  };
1858
1858
  }
1859
- }), ao = /* @__PURE__ */ he(bs, [["__scopeId", "data-v-c70ca2ba"]]), vs = { class: "container" }, ys = /* @__PURE__ */ ve({
1859
+ }), ao = /* @__PURE__ */ _e(bs, [["__scopeId", "data-v-c70ca2ba"]]), vs = { class: "container" }, ys = /* @__PURE__ */ ve({
1860
1860
  __name: "ConsoleApp",
1861
1861
  props: {
1862
1862
  title: {},
@@ -1928,12 +1928,12 @@ function Es(e, t) {
1928
1928
  ])
1929
1929
  ]);
1930
1930
  }
1931
- const $s = /* @__PURE__ */ he(ks, [["render", Es], ["__scopeId", "data-v-0155b361"]]), Is = {};
1931
+ const $s = /* @__PURE__ */ _e(ks, [["render", Es], ["__scopeId", "data-v-0155b361"]]), Is = {};
1932
1932
  function Ps(e, t) {
1933
1933
  const o = k("router-view");
1934
1934
  return p(), N(o);
1935
1935
  }
1936
- const Ns = /* @__PURE__ */ he(Is, [["render", Ps]]), As = { class: "card-wrapper" }, Vs = ["onClick"], Ms = { class: "card-inner-wrapper" }, Us = { class: "card-title" }, Ts = { class: "icon" }, Ds = /* @__PURE__ */ ve({
1936
+ const Ns = /* @__PURE__ */ _e(Is, [["render", Ps]]), As = { class: "card-wrapper" }, Vs = ["onClick"], Ms = { class: "card-inner-wrapper" }, Us = { class: "card-title" }, Ts = { class: "icon" }, Ds = /* @__PURE__ */ ve({
1937
1937
  __name: "TabCard",
1938
1938
  props: {
1939
1939
  cards: {},
@@ -1996,17 +1996,17 @@ const Ns = /* @__PURE__ */ he(Is, [["render", Ps]]), As = { class: "card-wrapper
1996
1996
  ], 10, Vs))), 256))
1997
1997
  ]));
1998
1998
  }
1999
- }), lo = /* @__PURE__ */ he(Ds, [["__scopeId", "data-v-047a86e6"]]);
1999
+ }), lo = /* @__PURE__ */ _e(Ds, [["__scopeId", "data-v-047a86e6"]]);
2000
2000
  function xe(e, t, o) {
2001
2001
  switch (t) {
2002
2002
  case "POST":
2003
- return me.post(e, o);
2003
+ return he.post(e, o);
2004
2004
  case "PUT":
2005
- return me.put(e, o);
2005
+ return he.put(e, o);
2006
2006
  case "DELETE":
2007
- return me.delete(e + "/" + o);
2007
+ return he.delete(e + "/" + o);
2008
2008
  default:
2009
- return me.get(e, { params: o });
2009
+ return he.get(e, { params: o });
2010
2010
  }
2011
2011
  }
2012
2012
  const Be = (e) => {
@@ -2214,9 +2214,9 @@ const Be = (e) => {
2214
2214
  default: m(() => {
2215
2215
  var Y, H;
2216
2216
  return [
2217
- (p(!0), M(oe, null, de((H = (Y = h.formItemAttributes) == null ? void 0 : Y.selectAttributes) == null ? void 0 : H.options, (_e) => (p(), N(c, {
2218
- value: _e.value,
2219
- label: _e.label
2217
+ (p(!0), M(oe, null, de((H = (Y = h.formItemAttributes) == null ? void 0 : Y.selectAttributes) == null ? void 0 : H.options, (ge) => (p(), N(c, {
2218
+ value: ge.value,
2219
+ label: ge.label
2220
2220
  }, null, 8, ["value", "label"]))), 256))
2221
2221
  ];
2222
2222
  }),
@@ -2242,7 +2242,7 @@ const Be = (e) => {
2242
2242
  ]);
2243
2243
  };
2244
2244
  }
2245
- }), io = /* @__PURE__ */ he(Fs, [["__scopeId", "data-v-7508a43a"]]), Gs = { class: "console-dialog__body" }, Ls = {
2245
+ }), io = /* @__PURE__ */ _e(Fs, [["__scopeId", "data-v-7508a43a"]]), Gs = { class: "console-dialog__body" }, Ls = {
2246
2246
  key: 0,
2247
2247
  class: "process-view"
2248
2248
  }, js = { class: "operation-button-wrapper" }, co = /* @__PURE__ */ ve({
@@ -2443,7 +2443,7 @@ const Be = (e) => {
2443
2443
  (O = r.functions) == null || O.batchDelete(j.value);
2444
2444
  else {
2445
2445
  const T = j.value.map((X) => X.id);
2446
- me.delete(`${n.model.api}/${T.join(",")}`).then(({ data: X }) => {
2446
+ he.delete(`${n.model.api}/${T.join(",")}`).then(({ data: X }) => {
2447
2447
  X.code === 0 && (i.value = !1, E());
2448
2448
  });
2449
2449
  }
@@ -2612,11 +2612,11 @@ const Be = (e) => {
2612
2612
  width: "50"
2613
2613
  })),
2614
2614
  (p(!0), M(oe, null, de(J.value, (H) => {
2615
- var _e;
2615
+ var ge;
2616
2616
  return p(), N(ae, {
2617
2617
  prop: H.prop,
2618
2618
  label: h(H),
2619
- width: (_e = H.tableColumnAttributes) == null ? void 0 : _e.width,
2619
+ width: (ge = H.tableColumnAttributes) == null ? void 0 : ge.width,
2620
2620
  "show-overflow-tooltip": ""
2621
2621
  }, {
2622
2622
  default: m((Ee) => {
@@ -2663,7 +2663,7 @@ const Be = (e) => {
2663
2663
  link: "",
2664
2664
  type: "primary",
2665
2665
  class: "operation-button",
2666
- onClick: (_e) => F(H.$index, H.row)
2666
+ onClick: (ge) => F(H.$index, H.row)
2667
2667
  }, {
2668
2668
  default: m(() => [
2669
2669
  ee(D(C(o)("common.table.edit")), 1)
@@ -2672,7 +2672,7 @@ const Be = (e) => {
2672
2672
  }, 1032, ["onClick"])) : z("", !0),
2673
2673
  _(ue, {
2674
2674
  title: "Are you sure to delete this?",
2675
- onConfirm: (_e) => u(H.$index, H.row)
2675
+ onConfirm: (ge) => u(H.$index, H.row)
2676
2676
  }, {
2677
2677
  reference: m(() => [
2678
2678
  r.deletable !== !1 ? (p(), N(Q, {
@@ -2698,18 +2698,18 @@ const Be = (e) => {
2698
2698
  width: "120"
2699
2699
  }, {
2700
2700
  default: m((H) => [
2701
- (p(!0), M(oe, null, de(r.operations, (_e) => (p(), N(Q, {
2701
+ (p(!0), M(oe, null, de(r.operations, (ge) => (p(), N(Q, {
2702
2702
  class: "operation-button",
2703
2703
  link: "",
2704
2704
  type: "primary",
2705
- key: _e.label,
2705
+ key: ge.label,
2706
2706
  onClick: (Ee) => {
2707
2707
  var $e, Fe;
2708
- return ((Fe = ($e = _e.functions) == null ? void 0 : $e.click) == null ? void 0 : Fe.call($e, H.$index, H.row)) && E();
2708
+ return ((Fe = ($e = ge.functions) == null ? void 0 : $e.click) == null ? void 0 : Fe.call($e, H.$index, H.row)) && E();
2709
2709
  }
2710
2710
  }, {
2711
2711
  default: m(() => [
2712
- ee(D(S(_e, H)), 1)
2712
+ ee(D(S(ge, H)), 1)
2713
2713
  ]),
2714
2714
  _: 2
2715
2715
  }, 1032, ["onClick"]))), 128))
@@ -2746,7 +2746,7 @@ const Be = (e) => {
2746
2746
  ], 2);
2747
2747
  };
2748
2748
  }
2749
- }), st = /* @__PURE__ */ he(Js, [["__scopeId", "data-v-682537f9"]]), Ws = { class: "nav-bar" }, Ys = {
2749
+ }), st = /* @__PURE__ */ _e(Js, [["__scopeId", "data-v-682537f9"]]), Ws = { class: "nav-bar" }, Ys = {
2750
2750
  key: 0,
2751
2751
  class: "info-card-wrapper"
2752
2752
  }, Qs = { class: "icon-wrapper" }, Ks = { class: "info-wrapper" }, Xs = { class: "title-wrapper" }, Zs = { class: "tabs-wrapper" }, er = { class: "dialog-footer" }, tr = /* @__PURE__ */ ve({
@@ -2759,7 +2759,7 @@ const Be = (e) => {
2759
2759
  let q = [];
2760
2760
  Ce([
2761
2761
  () => n.currentRoute.value,
2762
- be
2762
+ me
2763
2763
  ], () => {
2764
2764
  g();
2765
2765
  }, {
@@ -2795,7 +2795,7 @@ const Be = (e) => {
2795
2795
  let h = (O = q[d.value].api) == null ? void 0 : O.replace("/select", "");
2796
2796
  h = h == null ? void 0 : h.substring(h.lastIndexOf("/"));
2797
2797
  const x = P.api + "/" + s.value + h, f = G.map((T) => T.id);
2798
- me.delete(`${x}/${f.join(",")}`).then(({ data: T }) => {
2798
+ he.delete(`${x}/${f.join(",")}`).then(({ data: T }) => {
2799
2799
  T.code === 0 && w.value.refresh();
2800
2800
  });
2801
2801
  }, v.operations = [
@@ -2819,18 +2819,18 @@ const Be = (e) => {
2819
2819
  var $, F, B;
2820
2820
  K.splice(0);
2821
2821
  const u = o.params.model;
2822
- if (be.value[u] === void 0) {
2822
+ if (me.value[u] === void 0) {
2823
2823
  console.warn("Detail page model not exist:", u);
2824
2824
  return;
2825
2825
  } else
2826
- console.debug("Detail page model found:", u, be.value[u]);
2826
+ console.debug("Detail page model found:", u, me.value[u]);
2827
2827
  Be(P);
2828
- const c = Te(be.value[u]);
2828
+ const c = Te(me.value[u]);
2829
2829
  Object.assign(P, c), L.value++, d.value = -1, V.value = "summary";
2830
2830
  const v = (F = ($ = P.pageConfig) == null ? void 0 : $.detailPage) == null ? void 0 : F.tabs;
2831
2831
  if (v)
2832
2832
  for (let G of v) {
2833
- const h = Te(be.value[G.modelKey]);
2833
+ const h = Te(me.value[G.modelKey]);
2834
2834
  if (K.push(h), G.type === "table") {
2835
2835
  h.tableConfig || (h.tableConfig = {});
2836
2836
  let x = h.tableConfig;
@@ -3084,7 +3084,7 @@ const Be = (e) => {
3084
3084
  ], 64);
3085
3085
  };
3086
3086
  }
3087
- }), or = /* @__PURE__ */ he(tr, [["__scopeId", "data-v-f9250724"]]), nr = { class: "page-title" }, sr = /* @__PURE__ */ ve({
3087
+ }), or = /* @__PURE__ */ _e(tr, [["__scopeId", "data-v-f9250724"]]), nr = { class: "page-title" }, sr = /* @__PURE__ */ ve({
3088
3088
  __name: "TablePage",
3089
3089
  setup(e) {
3090
3090
  const { t } = Je(), o = He(), n = rt(), s = A(), r = A([]), l = ce({
@@ -3095,7 +3095,7 @@ const Be = (e) => {
3095
3095
  var w, y, V, U, j;
3096
3096
  r.value = [], l.pageConfig && ((y = (w = l.pageConfig) == null ? void 0 : w.tablePage) != null && y.tabViewAttributes) && (r.value = (j = (U = (V = l.pageConfig) == null ? void 0 : V.tablePage) == null ? void 0 : U.tabViewAttributes) == null ? void 0 : j.map((R) => {
3097
3097
  let L;
3098
- return R.modelKey && be.value[R.modelKey] ? L = Te(be.value[R.modelKey]) : L = Te(l), R.queryParams && (L.tableConfig || (L.tableConfig = {}), L.tableConfig.queryParams = R.queryParams), R.fields && (L.fields = R.fields), R.modelKey && (L.breadcrumbRoute = l.route), {
3098
+ return R.modelKey && me.value[R.modelKey] ? L = Te(me.value[R.modelKey]) : L = Te(l), R.queryParams && (L.tableConfig || (L.tableConfig = {}), L.tableConfig.queryParams = R.queryParams), R.fields && (L.fields = R.fields), R.modelKey && (L.breadcrumbRoute = l.route), {
3099
3099
  key: R.key,
3100
3100
  label: R.label,
3101
3101
  icon: R.icon,
@@ -3106,19 +3106,19 @@ const Be = (e) => {
3106
3106
  }
3107
3107
  function d() {
3108
3108
  var V, U;
3109
- console.log("Init table page, loading model:", o.params.model), console.log("Current model list", be.value);
3109
+ console.log("Init table page, loading model:", o.params.model), console.log("Current model list", me.value);
3110
3110
  const w = o.params.model;
3111
- if (be.value[w] === void 0) {
3112
- console.warn("Model not found", w);
3111
+ if (me.value[w] === void 0) {
3112
+ console.warn("Model not found", w, me.value);
3113
3113
  return;
3114
3114
  }
3115
3115
  Be(l);
3116
- const y = Te(be.value[w]);
3116
+ const y = Te(me.value[w]);
3117
3117
  Object.assign(l, y), (U = (V = l.pageConfig) == null ? void 0 : V.tablePage) != null && U.tabViewAttributes || Object.assign(a, l), i();
3118
3118
  }
3119
3119
  return Ce([
3120
3120
  () => n.currentRoute.value,
3121
- be
3121
+ me
3122
3122
  ], () => {
3123
3123
  d();
3124
3124
  }, {
@@ -3152,7 +3152,7 @@ const Be = (e) => {
3152
3152
  ], 64);
3153
3153
  };
3154
3154
  }
3155
- }), rr = /* @__PURE__ */ he(sr, [["__scopeId", "data-v-d24124ee"]]), ar = [
3155
+ }), rr = /* @__PURE__ */ _e(sr, [["__scopeId", "data-v-ce635c5e"]]), ar = [
3156
3156
  Vo,
3157
3157
  ys,
3158
3158
  Lt,
@@ -3184,7 +3184,7 @@ export {
3184
3184
  on as en,
3185
3185
  ot as i18n,
3186
3186
  kt as menuList,
3187
- be as modelList,
3187
+ me as modelList,
3188
3188
  bt as pinia,
3189
3189
  nn as zh
3190
3190
  };