@morghulis/core 1.0.24 → 1.0.26

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.
@@ -559,6 +559,7 @@ function Tc(e) {
559
559
  open: s
560
560
  } = $c(e);
561
561
  return X(r, () => {
562
+ console.log(r);
562
563
  const i = JSON.parse(r.value), u = i.tag;
563
564
  if (u === "batch")
564
565
  n(i);
@@ -2518,10 +2519,14 @@ function zo() {
2518
2519
  return { getAxiosInstance: o, loading: n };
2519
2520
  }
2520
2521
  function up() {
2522
+ const { open: e, status: t } = vt("connection");
2523
+ return { open: e, status: t };
2524
+ }
2525
+ function cp() {
2521
2526
  const { container: e } = vt("channel-hub");
2522
2527
  return { container: e };
2523
2528
  }
2524
- function cp(e) {
2529
+ function dp(e) {
2525
2530
  const t = ue(e) ? e : x(e), { mount: n, unmount: o } = vt("channel-hub"), l = x();
2526
2531
  X(t, (u, c) => {
2527
2532
  c && o(c), l.value = n(u);
@@ -2541,10 +2546,6 @@ function cp(e) {
2541
2546
  }
2542
2547
  return { execute: i, config: t, loading: a, payload: s };
2543
2548
  }
2544
- function dp() {
2545
- const { open: e, status: t } = vt("connection");
2546
- return { open: e, status: t };
2547
- }
2548
2549
  class Pe {
2549
2550
  includes;
2550
2551
  excludes;
@@ -3119,7 +3120,7 @@ function vp(e) {
3119
3120
  loading: l,
3120
3121
  payload: r,
3121
3122
  execute: a
3122
- } = cp(o);
3123
+ } = dp(o);
3123
3124
  function s(i, u) {
3124
3125
  a({
3125
3126
  db: n.value,
@@ -15627,28 +15628,29 @@ const _v = /* @__PURE__ */ R({
15627
15628
  setup(e, { emit: t }) {
15628
15629
  const n = t, o = e, l = O({
15629
15630
  get: () => o.modelValue,
15630
- set: (u) => n("update:modelValue", u)
15631
- }), r = O(() => o.selection.length === 1 && o.view.allow_insert && !o.selection[0].isLeaf);
15632
- function a(u) {
15633
- const c = o.selection.map((d) => d.id);
15634
- o.rest.switch_nodes(c, u);
15635
- }
15636
- function s() {
15631
+ set: (i) => n("update:modelValue", i)
15632
+ });
15633
+ O(() => o.view.allow_insert);
15634
+ function r(i) {
15637
15635
  const u = o.selection.map((c) => c.id);
15638
- o.rest.delete_many(u);
15636
+ o.rest.switch_nodes(u, i);
15639
15637
  }
15640
- const i = O(() => {
15641
- const u = [...new Set(o.selection.map((c) => c.isLeaf))];
15642
- if (u.length === 0)
15638
+ function a() {
15639
+ const i = o.selection.map((u) => u.id);
15640
+ o.rest.delete_many(i);
15641
+ }
15642
+ const s = O(() => {
15643
+ const i = [...new Set(o.selection.map((u) => u.isLeaf))];
15644
+ if (i.length === 0)
15643
15645
  return {
15644
15646
  leaf: !0,
15645
15647
  folder: !0
15646
15648
  };
15647
- if (u.length === 1) {
15648
- const c = u[0];
15649
+ if (i.length === 1) {
15650
+ const u = i[0];
15649
15651
  return {
15650
- leaf: c,
15651
- folder: !c
15652
+ leaf: u,
15653
+ folder: !u
15652
15654
  };
15653
15655
  } else
15654
15656
  return {
@@ -15656,11 +15658,11 @@ const _v = /* @__PURE__ */ R({
15656
15658
  folder: !1
15657
15659
  };
15658
15660
  });
15659
- return (u, c) => {
15660
- const d = w("el-input"), v = w("el-popover"), g = w("el-space");
15661
- return y(), k(g, null, {
15661
+ return (i, u) => {
15662
+ const c = w("el-input"), d = w("el-popover"), v = w("el-space");
15663
+ return y(), k(v, null, {
15662
15664
  default: f(() => [
15663
- m(v, null, {
15665
+ m(d, null, {
15664
15666
  reference: f(() => [
15665
15667
  m(_(q), {
15666
15668
  class: "pointer",
@@ -15669,9 +15671,9 @@ const _v = /* @__PURE__ */ R({
15669
15671
  }, null, 8, ["type"])
15670
15672
  ]),
15671
15673
  default: f(() => [
15672
- m(d, {
15674
+ m(c, {
15673
15675
  modelValue: l.value,
15674
- "onUpdate:modelValue": c[0] || (c[0] = (p) => l.value = p),
15676
+ "onUpdate:modelValue": u[0] || (u[0] = (g) => l.value = g),
15675
15677
  clearable: ""
15676
15678
  }, null, 8, ["modelValue"])
15677
15679
  ]),
@@ -15679,36 +15681,35 @@ const _v = /* @__PURE__ */ R({
15679
15681
  }),
15680
15682
  e.view.allow_insert ? (y(), k(_(W), {
15681
15683
  key: 0,
15682
- disabled: !r.value,
15683
15684
  title: "添加",
15684
15685
  icon: "plus-square",
15685
- onClick: c[1] || (c[1] = (p) => n("batch"))
15686
- }, null, 8, ["disabled"])) : K("", !0),
15686
+ onClick: u[1] || (u[1] = (g) => n("batch"))
15687
+ })) : K("", !0),
15687
15688
  e.view.allow_remove ? (y(), k(_(W), {
15688
15689
  key: 1,
15689
15690
  disabled: !e.selection.length,
15690
15691
  title: "删除",
15691
15692
  icon: "trash",
15692
- onClick: s
15693
+ onClick: a
15693
15694
  }, null, 8, ["disabled"])) : K("", !0),
15694
15695
  e.view.allow_edit ? (y(), k(_(W), {
15695
15696
  key: 2,
15696
- disabled: i.value.leaf,
15697
+ disabled: s.value.leaf,
15697
15698
  title: "切换为叶子",
15698
15699
  icon: "leaf",
15699
- onClick: c[2] || (c[2] = (p) => a(!0))
15700
+ onClick: u[2] || (u[2] = (g) => r(!0))
15700
15701
  }, null, 8, ["disabled"])) : K("", !0),
15701
15702
  e.view.allow_edit ? (y(), k(_(W), {
15702
15703
  key: 3,
15703
- disabled: i.value.folder,
15704
+ disabled: s.value.folder,
15704
15705
  title: "切换为分支",
15705
15706
  icon: "folder",
15706
- onClick: c[3] || (c[3] = (p) => a(!1))
15707
+ onClick: u[3] || (u[3] = (g) => r(!1))
15707
15708
  }, null, 8, ["disabled"])) : K("", !0),
15708
15709
  m(_(W), {
15709
15710
  title: "表格查看",
15710
15711
  icon: "table",
15711
- onClick: c[4] || (c[4] = (p) => n("table"))
15712
+ onClick: u[4] || (u[4] = (g) => n("table"))
15712
15713
  })
15713
15714
  ]),
15714
15715
  _: 1
@@ -19957,7 +19958,7 @@ const Bh = /* @__PURE__ */ R({
19957
19958
  }), Kh = { style: { margin: "3px 0" } }, Yh = /* @__PURE__ */ R({
19958
19959
  __name: "MChannelHub",
19959
19960
  setup(e) {
19960
- const { container: t } = up();
19961
+ const { container: t } = cp();
19961
19962
  return (n, o) => {
19962
19963
  const l = w("el-table-column"), r = w("el-text"), a = w("el-tooltip"), s = w("el-divider"), i = w("el-tag"), u = w("el-space"), c = w("el-table");
19963
19964
  return y(), k(c, {
@@ -20577,7 +20578,7 @@ const Bh = /* @__PURE__ */ R({
20577
20578
  title: {}
20578
20579
  },
20579
20580
  setup(e) {
20580
- const { open: t, status: n } = dp();
20581
+ const { open: t, status: n } = up();
20581
20582
  return (o, l) => {
20582
20583
  const r = w("el-button");
20583
20584
  return _(n) === "CONNECTED" ? (y(), k(o_, { key: 0 }, {
@@ -22021,10 +22022,10 @@ export {
22021
22022
  ut as jwt,
22022
22023
  Us as useAdminSize,
22023
22024
  Bt as useAoa,
22024
- cp as useChannel,
22025
- up as useChannelContainer,
22025
+ dp as useChannel,
22026
+ cp as useChannelContainer,
22026
22027
  wp as useCondition,
22027
- dp as useConnection,
22028
+ up as useConnection,
22028
22029
  _e as useDao,
22029
22030
  Nr as useData,
22030
22031
  yp as useEditableTableModel,