@maxax/ui 1.0.7 → 1.0.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.
Files changed (60) hide show
  1. package/dist/components/basic-button-group/components/ButtonGroupItem.vue.d.ts.map +1 -1
  2. package/dist/components/basic-edit-batch/components/EditBatchItem.vue.d.ts.map +1 -1
  3. package/dist/components/basic-form/components/FormItem.vue.d.ts.map +1 -1
  4. package/dist/components/basic-json-viewer/BasicJsonViewer.d.ts +331 -0
  5. package/dist/components/basic-json-viewer/BasicJsonViewer.d.ts.map +1 -0
  6. package/dist/components/basic-json-viewer/components/Brackets.d.ts +24 -0
  7. package/dist/components/basic-json-viewer/components/Brackets.d.ts.map +1 -0
  8. package/dist/components/basic-json-viewer/components/Carets.d.ts +24 -0
  9. package/dist/components/basic-json-viewer/components/Carets.d.ts.map +1 -0
  10. package/dist/components/basic-json-viewer/components/CheckController.d.ts +34 -0
  11. package/dist/components/basic-json-viewer/components/CheckController.d.ts.map +1 -0
  12. package/dist/components/basic-json-viewer/components/TreeNode.d.ts +362 -0
  13. package/dist/components/basic-json-viewer/components/TreeNode.d.ts.map +1 -0
  14. package/dist/components/basic-json-viewer/context.d.ts +6 -0
  15. package/dist/components/basic-json-viewer/context.d.ts.map +1 -0
  16. package/dist/components/basic-json-viewer/hooks/useClipboard.d.ts +4 -0
  17. package/dist/components/basic-json-viewer/hooks/useClipboard.d.ts.map +1 -0
  18. package/dist/components/basic-json-viewer/hooks/useError.d.ts +8 -0
  19. package/dist/components/basic-json-viewer/hooks/useError.d.ts.map +1 -0
  20. package/dist/components/basic-json-viewer/index.d.ts +7 -0
  21. package/dist/components/basic-json-viewer/index.d.ts.map +1 -0
  22. package/dist/components/basic-json-viewer/interface.d.ts +377 -0
  23. package/dist/components/basic-json-viewer/interface.d.ts.map +1 -0
  24. package/dist/components/basic-json-viewer/utils/index.d.ts +8 -0
  25. package/dist/components/basic-json-viewer/utils/index.d.ts.map +1 -0
  26. package/dist/components/basic-trigger-button/BasicTriggerButton.vue.d.ts +13 -0
  27. package/dist/components/basic-trigger-button/BasicTriggerButton.vue.d.ts.map +1 -0
  28. package/dist/components/basic-trigger-button/context.d.ts +6 -0
  29. package/dist/components/basic-trigger-button/context.d.ts.map +1 -0
  30. package/dist/components/basic-trigger-button/index.d.ts +7 -0
  31. package/dist/components/basic-trigger-button/index.d.ts.map +1 -0
  32. package/dist/components/basic-trigger-button/interface.d.ts +47 -0
  33. package/dist/components/basic-trigger-button/interface.d.ts.map +1 -0
  34. package/dist/components/index.d.ts +2 -0
  35. package/dist/components/index.d.ts.map +1 -1
  36. package/dist/expose/index.d.ts +2 -0
  37. package/dist/expose/index.d.ts.map +1 -0
  38. package/dist/expose/operation-button.d.ts +24 -0
  39. package/dist/expose/operation-button.d.ts.map +1 -0
  40. package/dist/index.cjs +1364 -107
  41. package/dist/index.cjs.map +1 -1
  42. package/dist/index.d.ts +1 -0
  43. package/dist/index.d.ts.map +1 -1
  44. package/dist/index.mjs +1391 -134
  45. package/dist/index.mjs.map +1 -1
  46. package/dist/locale/lang/en.d.ts.map +1 -1
  47. package/dist/locale/lang/zh-cn.d.ts.map +1 -1
  48. package/dist/locales.cjs +2 -1
  49. package/dist/locales.cjs.map +1 -1
  50. package/dist/locales.mjs +2 -1
  51. package/dist/locales.mjs.map +1 -1
  52. package/dist/{utils-dGhmZ9rs.cjs → utils-D_olU8qE.cjs} +2 -1
  53. package/dist/utils-D_olU8qE.cjs.map +1 -0
  54. package/dist/{utils-B_OywAVi.js → utils-JnUSPc85.js} +2 -1
  55. package/dist/utils-JnUSPc85.js.map +1 -0
  56. package/package.json +4 -4
  57. package/dist/components/naive-ui.d.ts +0 -5
  58. package/dist/components/naive-ui.d.ts.map +0 -1
  59. package/dist/utils-B_OywAVi.js.map +0 -1
  60. package/dist/utils-dGhmZ9rs.cjs.map +0 -1
package/dist/index.cjs CHANGED
@@ -4,7 +4,7 @@ const utils = require("@maxax/utils");
4
4
  const vue = require("vue");
5
5
  const naiveUi = require("naive-ui");
6
6
  const lodashEs = require("lodash-es");
7
- const utils$1 = require("./utils-dGhmZ9rs.cjs");
7
+ const utils$1 = require("./utils-D_olU8qE.cjs");
8
8
  const hooks = require("@maxax/hooks");
9
9
  const dateFns = require("date-fns");
10
10
  const dayjs = require("dayjs");
@@ -2304,7 +2304,7 @@ const Icon = vue.defineComponent((props, { emit }) => {
2304
2304
  emits: ["load"]
2305
2305
  });
2306
2306
  const _hoisted_1$c = ["xlink:href"];
2307
- const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
2307
+ const _sfc_main$O = /* @__PURE__ */ vue.defineComponent({
2308
2308
  __name: "BasicSvgIcon",
2309
2309
  props: {
2310
2310
  icon: {},
@@ -2350,8 +2350,8 @@ const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
2350
2350
  };
2351
2351
  }
2352
2352
  });
2353
- const XBasicSvgIcon = utils.withInstall(_sfc_main$N);
2354
- const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
2353
+ const XBasicSvgIcon = utils.withInstall(_sfc_main$O);
2354
+ const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
2355
2355
  __name: "BasicArrow",
2356
2356
  props: {
2357
2357
  expand: { type: Boolean },
@@ -2383,8 +2383,8 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
2383
2383
  };
2384
2384
  }
2385
2385
  });
2386
- const XBasicArrow = utils.withInstall(_sfc_main$M);
2387
- const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
2386
+ const XBasicArrow = utils.withInstall(_sfc_main$N);
2387
+ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
2388
2388
  __name: "BasicButton",
2389
2389
  props: {
2390
2390
  size: {},
@@ -2439,7 +2439,7 @@ const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
2439
2439
  };
2440
2440
  }
2441
2441
  });
2442
- const XBasicButton = utils.withInstall(_sfc_main$L);
2442
+ const XBasicButton = utils.withInstall(_sfc_main$M);
2443
2443
  !!(process.env.NODE_ENV !== "production") ? Object.freeze({}) : {};
2444
2444
  !!(process.env.NODE_ENV !== "production") ? Object.freeze([]) : [];
2445
2445
  const hasOwnProperty = Object.prototype.hasOwnProperty;
@@ -2660,7 +2660,7 @@ const basicMessageBoxProps = {
2660
2660
  default: ""
2661
2661
  }
2662
2662
  };
2663
- const _sfc_main$K = vue.defineComponent({
2663
+ const _sfc_main$L = vue.defineComponent({
2664
2664
  components: {
2665
2665
  NButton: naiveUi.NButton,
2666
2666
  NInput: naiveUi.NInput,
@@ -3068,7 +3068,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
3068
3068
  _: 3
3069
3069
  });
3070
3070
  }
3071
- const MessageBoxConstructor = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$2]]);
3071
+ const MessageBoxConstructor = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$2]]);
3072
3072
  const messageInstance = /* @__PURE__ */ new Map();
3073
3073
  const getAppendToElement = (props) => {
3074
3074
  let appendTo = document.body;
@@ -3197,7 +3197,7 @@ const XBasicMessageBox = $MessageBox;
3197
3197
  function _isSlot$3(s) {
3198
3198
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
3199
3199
  }
3200
- const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
3200
+ const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
3201
3201
  name: "ButtonGroupItem",
3202
3202
  props: {
3203
3203
  schema: {
@@ -3550,7 +3550,7 @@ function useButtonGroupSchema({ getProps, schemaRef }) {
3550
3550
  });
3551
3551
  return { getSchema };
3552
3552
  }
3553
- const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
3553
+ const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
3554
3554
  __name: "BasicButtonGroup",
3555
3555
  props: {
3556
3556
  showReturnButton: { type: Boolean },
@@ -3631,7 +3631,7 @@ const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
3631
3631
  return (_ctx, _cache) => {
3632
3632
  return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({ class: vue.unref(getWrapperClass) }, getBindValue.value), [
3633
3633
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(getSchema), (schema) => {
3634
- return vue.openBlock(), vue.createBlock(_sfc_main$J, {
3634
+ return vue.openBlock(), vue.createBlock(_sfc_main$K, {
3635
3635
  key: schema.field,
3636
3636
  schema,
3637
3637
  "button-group-action-type": buttonGroupActionType,
@@ -3652,9 +3652,9 @@ const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
3652
3652
  };
3653
3653
  }
3654
3654
  });
3655
- const XBasicButtonGroup = utils.withInstall(_sfc_main$I);
3655
+ const XBasicButtonGroup = utils.withInstall(_sfc_main$J);
3656
3656
  const _hoisted_1$a = ["title"];
3657
- const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
3657
+ const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
3658
3658
  __name: "BasicText",
3659
3659
  props: {
3660
3660
  icon: { default: "" },
@@ -3692,7 +3692,7 @@ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
3692
3692
  class: vue.normalizeClass(basicTextClass.value),
3693
3693
  title: vue.unref(utils.isString)(vue.unref(mergedValueRef)) ? vue.unref(mergedValueRef) : void 0
3694
3694
  }, [
3695
- __props.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$N, {
3695
+ __props.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$O, {
3696
3696
  key: 0,
3697
3697
  icon: __props.icon,
3698
3698
  class: vue.normalizeClass(__props.iconClass),
@@ -3705,8 +3705,8 @@ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
3705
3705
  };
3706
3706
  }
3707
3707
  });
3708
- const XBasicText = utils.withInstall(_sfc_main$H);
3709
- const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
3708
+ const XBasicText = utils.withInstall(_sfc_main$I);
3709
+ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
3710
3710
  __name: "BasicCard",
3711
3711
  props: {
3712
3712
  title: {},
@@ -3745,8 +3745,8 @@ const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
3745
3745
  };
3746
3746
  }
3747
3747
  });
3748
- const XBasicCard = utils.withInstall(_sfc_main$G);
3749
- const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
3748
+ const XBasicCard = utils.withInstall(_sfc_main$H);
3749
+ const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
3750
3750
  ...{
3751
3751
  inheritAttrs: false
3752
3752
  },
@@ -3851,7 +3851,7 @@ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
3851
3851
  }
3852
3852
  });
3853
3853
  const basicCascaderProps = {};
3854
- const XBasicCascader = utils.withInstall(_sfc_main$F);
3854
+ const XBasicCascader = utils.withInstall(_sfc_main$G);
3855
3855
  const basicCheckboxGroupKey = Symbol("basic-checkbox-group");
3856
3856
  const createBasicCheckboxGroupContext = (props) => {
3857
3857
  return vue.provide(basicCheckboxGroupKey, props);
@@ -3872,7 +3872,7 @@ const IconCheck = /* @__PURE__ */ vue.defineComponent({
3872
3872
  }, null)]);
3873
3873
  }
3874
3874
  });
3875
- const _sfc_main$E = vue.defineComponent({
3875
+ const _sfc_main$F = vue.defineComponent({
3876
3876
  name: "IconHover",
3877
3877
  props: {
3878
3878
  disabled: {
@@ -3900,7 +3900,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
3900
3900
  vue.renderSlot(_ctx.$slots, "default")
3901
3901
  ], 2);
3902
3902
  }
3903
- const IconHover = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$1]]);
3903
+ const IconHover = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$1]]);
3904
3904
  const basicCheckboxProps = {
3905
3905
  /**
3906
3906
  * @zh 绑定值
@@ -4815,7 +4815,7 @@ function useTransition(source, options = {}) {
4815
4815
  });
4816
4816
  return vue.computed(() => vue.toValue(options.disabled) ? sourceVal() : outputRef.value);
4817
4817
  }
4818
- const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
4818
+ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
4819
4819
  __name: "BasicCountTo",
4820
4820
  props: {
4821
4821
  startValue: { default: 0 },
@@ -4876,8 +4876,8 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
4876
4876
  };
4877
4877
  }
4878
4878
  });
4879
- const XBasicCountTo = utils.withInstall(_sfc_main$D);
4880
- const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
4879
+ const XBasicCountTo = utils.withInstall(_sfc_main$E);
4880
+ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
4881
4881
  __name: "BasicDatePicker",
4882
4882
  props: {
4883
4883
  disabled: { type: Boolean, default: false },
@@ -4937,7 +4937,7 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
4937
4937
  };
4938
4938
  }
4939
4939
  });
4940
- const XBasicDatePicker = utils.withInstall(_sfc_main$C);
4940
+ const XBasicDatePicker = utils.withInstall(_sfc_main$D);
4941
4941
  const basicDragVerifyProps = {
4942
4942
  value: {
4943
4943
  type: Boolean,
@@ -4984,7 +4984,7 @@ const basicDragVerifyProps = {
4984
4984
  default: () => ({})
4985
4985
  }
4986
4986
  };
4987
- const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
4987
+ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
4988
4988
  name: "BasicDragVerify",
4989
4989
  props: basicDragVerifyProps,
4990
4990
  emits: ["success", "update:value", "change", "start", "move", "end"],
@@ -5287,7 +5287,7 @@ const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
5287
5287
  };
5288
5288
  }
5289
5289
  });
5290
- const XBasicDragVerify = utils.withInstall(_sfc_main$B);
5290
+ const XBasicDragVerify = utils.withInstall(_sfc_main$C);
5291
5291
  const basicHelpProps = {
5292
5292
  /**
5293
5293
  * Whether to display the serial number
@@ -5303,7 +5303,7 @@ const basicHelpProps = {
5303
5303
  default: ""
5304
5304
  }
5305
5305
  };
5306
- const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
5306
+ const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
5307
5307
  name: "BasicHelp",
5308
5308
  components: {
5309
5309
  XBasicSvgIcon
@@ -5349,8 +5349,8 @@ const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
5349
5349
  });
5350
5350
  }
5351
5351
  });
5352
- const XBasicHelp = utils.withInstall(_sfc_main$A);
5353
- const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
5352
+ const XBasicHelp = utils.withInstall(_sfc_main$B);
5353
+ const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
5354
5354
  __name: "BasicTitle",
5355
5355
  props: {
5356
5356
  helpMessage: {},
@@ -5393,12 +5393,12 @@ const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
5393
5393
  };
5394
5394
  }
5395
5395
  });
5396
- const XBasicTitle = utils.withInstall(_sfc_main$z);
5396
+ const XBasicTitle = utils.withInstall(_sfc_main$A);
5397
5397
  const _hoisted_1$9 = {
5398
5398
  key: 0,
5399
5399
  class: "footer-wrapper"
5400
5400
  };
5401
- const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
5401
+ const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
5402
5402
  __name: "BasicDrawer",
5403
5403
  props: {
5404
5404
  showCancelBtn: { type: Boolean, default: true },
@@ -5572,7 +5572,7 @@ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
5572
5572
  };
5573
5573
  }
5574
5574
  });
5575
- const XBasicDrawer = utils.withInstall(_sfc_main$y);
5575
+ const XBasicDrawer = utils.withInstall(_sfc_main$z);
5576
5576
  const basicEditBatchKey = Symbol("basic-edit-batch");
5577
5577
  const createBasicEditBatchContext = (props) => {
5578
5578
  return vue.provide(basicEditBatchKey, props);
@@ -5581,7 +5581,7 @@ const useBasicEditBatchContext = () => {
5581
5581
  return vue.inject(basicEditBatchKey);
5582
5582
  };
5583
5583
  const _hoisted_1$8 = ["disabled"];
5584
- const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
5584
+ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
5585
5585
  __name: "EditBatchAction",
5586
5586
  props: {
5587
5587
  disabled: { type: Boolean, default: false },
@@ -5641,7 +5641,7 @@ const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
5641
5641
  };
5642
5642
  }
5643
5643
  });
5644
- const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
5644
+ const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
5645
5645
  __name: "BasicHidden",
5646
5646
  props: {
5647
5647
  value: {},
@@ -5668,7 +5668,7 @@ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
5668
5668
  };
5669
5669
  }
5670
5670
  });
5671
- const XBasicHidden = utils.withInstall(_sfc_main$w);
5671
+ const XBasicHidden = utils.withInstall(_sfc_main$x);
5672
5672
  const basicRadioGroupKey = Symbol("basic-radio-group");
5673
5673
  const createBasicRadioGroupContext = (props) => {
5674
5674
  return vue.provide(basicRadioGroupKey, props);
@@ -5936,7 +5936,7 @@ const BasicRadioGroup = /* @__PURE__ */ vue.defineComponent({
5936
5936
  }
5937
5937
  });
5938
5938
  const XBasicRadioGroup = utils.withInstall(BasicRadioGroup);
5939
- const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
5939
+ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
5940
5940
  ...{
5941
5941
  inheritAttrs: false
5942
5942
  },
@@ -6055,7 +6055,7 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
6055
6055
  }
6056
6056
  });
6057
6057
  const basicSelectProps = {};
6058
- const XBasicSelect = utils.withInstall(_sfc_main$v);
6058
+ const XBasicSelect = utils.withInstall(_sfc_main$w);
6059
6059
  const componentMap$1 = /* @__PURE__ */ new Map();
6060
6060
  componentMap$1.set("Input", naiveUi.NInput);
6061
6061
  componentMap$1.set("InputNumber", naiveUi.NInputNumber);
@@ -6134,7 +6134,7 @@ function isComponentEditBatchSchema(schema) {
6134
6134
  function _isSlot$1(s) {
6135
6135
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
6136
6136
  }
6137
- const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
6137
+ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
6138
6138
  name: "BasicEditBatchItem",
6139
6139
  components: {
6140
6140
  XBasicHelp
@@ -6872,7 +6872,7 @@ function useEditBatchValues({ getProps, defaultValueRef, getSchema, formModel })
6872
6872
  }
6873
6873
  return { handleFormValues, initDefault };
6874
6874
  }
6875
- const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
6875
+ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
6876
6876
  __name: "BasicEditBatch",
6877
6877
  props: {
6878
6878
  name: {},
@@ -7002,7 +7002,7 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
7002
7002
  options: vue.unref(getOptions)
7003
7003
  }, null, 8, ["value", "options"])
7004
7004
  ], 2),
7005
- schemaItemRef.value ? (vue.openBlock(), vue.createBlock(_sfc_main$u, {
7005
+ schemaItemRef.value ? (vue.openBlock(), vue.createBlock(_sfc_main$v, {
7006
7006
  key: 0,
7007
7007
  schema: schemaItemRef.value,
7008
7008
  "edit-batch-props": getProps.value,
@@ -7019,7 +7019,7 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
7019
7019
  };
7020
7020
  })
7021
7021
  ]), 1032, ["schema", "edit-batch-props", "all-default-values", "form-model"])) : vue.createCommentVNode("", true),
7022
- vue.createVNode(_sfc_main$x, vue.normalizeProps(vue.guardReactiveProps(getEditBatchActionBindProps.value)), vue.createSlots({ _: 2 }, [
7022
+ vue.createVNode(_sfc_main$y, vue.normalizeProps(vue.guardReactiveProps(getEditBatchActionBindProps.value)), vue.createSlots({ _: 2 }, [
7023
7023
  vue.renderList(["resetBefore", "submitBefore", "submitAfter"], (item) => {
7024
7024
  return {
7025
7025
  name: item,
@@ -7033,7 +7033,7 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
7033
7033
  };
7034
7034
  }
7035
7035
  });
7036
- const XBasicEditBatch = utils.withInstall(_sfc_main$t);
7036
+ const XBasicEditBatch = utils.withInstall(_sfc_main$u);
7037
7037
  const basicFontIconProps = {
7038
7038
  icon: {
7039
7039
  type: String,
@@ -7084,7 +7084,7 @@ const createBasicFormContext = (props) => {
7084
7084
  const useBasicFormContext = () => {
7085
7085
  return vue.inject(basicFormKey);
7086
7086
  };
7087
- const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
7087
+ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
7088
7088
  __name: "FormAction",
7089
7089
  props: {
7090
7090
  showActionButtonGroup: { type: Boolean, default: true },
@@ -7224,7 +7224,7 @@ const basicScrollTextProps = {
7224
7224
  default: ""
7225
7225
  }
7226
7226
  };
7227
- const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
7227
+ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
7228
7228
  name: "BasicScrollText",
7229
7229
  props: basicScrollTextProps,
7230
7230
  setup(props, {
@@ -7286,7 +7286,7 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
7286
7286
  }, [content()]) : null])]);
7287
7287
  }
7288
7288
  });
7289
- const XBasicScrollText = utils.withInstall(_sfc_main$r);
7289
+ const XBasicScrollText = utils.withInstall(_sfc_main$s);
7290
7290
  const componentMap = /* @__PURE__ */ new Map();
7291
7291
  componentMap.set("Input", naiveUi.NInput);
7292
7292
  componentMap.set("InputNumber", naiveUi.NInputNumber);
@@ -7385,7 +7385,7 @@ function isComponentFormSchema(schema) {
7385
7385
  function _isSlot(s) {
7386
7386
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
7387
7387
  }
7388
- const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
7388
+ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
7389
7389
  name: "BasicFormItem",
7390
7390
  components: {
7391
7391
  XBasicHelp,
@@ -8485,7 +8485,7 @@ function useFormValues({ getProps, defaultValueRef, getSchema, formModel }) {
8485
8485
  }
8486
8486
  return { handleFormValues, initDefault };
8487
8487
  }
8488
- const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
8488
+ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
8489
8489
  __name: "BasicForm",
8490
8490
  props: {
8491
8491
  card: { type: Boolean, default: false },
@@ -8676,7 +8676,7 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
8676
8676
  default: vue.withCtx(() => [
8677
8677
  vue.renderSlot(_ctx.$slots, "formHeader"),
8678
8678
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(getSchema), (schema) => {
8679
- return vue.openBlock(), vue.createBlock(_sfc_main$q, {
8679
+ return vue.openBlock(), vue.createBlock(_sfc_main$r, {
8680
8680
  key: schema.field,
8681
8681
  "is-advanced": vue.unref(fieldsIsAdvancedMap)[schema.field],
8682
8682
  "form-action-type": formActionType,
@@ -8696,7 +8696,7 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
8696
8696
  })
8697
8697
  ]), 1032, ["is-advanced", "schema", "form-props", "all-default-values", "form-model"]);
8698
8698
  }), 128)),
8699
- vue.createVNode(_sfc_main$s, vue.mergeProps(getFormActionBindProps.value, { onToggleAdvanced: vue.unref(handleToggleAdvanced) }), vue.createSlots({ _: 2 }, [
8699
+ vue.createVNode(_sfc_main$t, vue.mergeProps(getFormActionBindProps.value, { onToggleAdvanced: vue.unref(handleToggleAdvanced) }), vue.createSlots({ _: 2 }, [
8700
8700
  vue.renderList(["resetBefore", "submitBefore", "advanceBefore", "advanceAfter"], (item) => {
8701
8701
  return {
8702
8702
  name: item,
@@ -8717,8 +8717,8 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
8717
8717
  };
8718
8718
  }
8719
8719
  });
8720
- const XBasicForm = utils.withInstall(_sfc_main$p);
8721
- const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
8720
+ const XBasicForm = utils.withInstall(_sfc_main$q);
8721
+ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
8722
8722
  __name: "BasicGradientTitle",
8723
8723
  props: {
8724
8724
  text: {}
@@ -8751,7 +8751,7 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
8751
8751
  }
8752
8752
  });
8753
8753
  const basicGradientTitleProps = {};
8754
- const XBasicGradientTitle = utils.withInstall(_sfc_main$o);
8754
+ const XBasicGradientTitle = utils.withInstall(_sfc_main$p);
8755
8755
  const basicIconOnlineProps = {
8756
8756
  icon: {
8757
8757
  type: String,
@@ -12650,7 +12650,7 @@ const IconJson = {
12650
12650
  };
12651
12651
  const _hoisted_1$7 = { class: "panel-icon-list" };
12652
12652
  const _hoisted_2$3 = ["title", "onClick"];
12653
- const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
12653
+ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
12654
12654
  __name: "BasicIconPicker",
12655
12655
  props: {
12656
12656
  disabled: { type: Boolean },
@@ -12880,7 +12880,1122 @@ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
12880
12880
  };
12881
12881
  }
12882
12882
  });
12883
- const XBasicIconPicker = utils.withInstall(_sfc_main$n);
12883
+ const XBasicIconPicker = utils.withInstall(_sfc_main$o);
12884
+ function useClipboard() {
12885
+ const copied = vue.ref(false);
12886
+ const copy = async (source) => {
12887
+ try {
12888
+ await navigator.clipboard.writeText(source);
12889
+ copied.value = true;
12890
+ setTimeout(() => {
12891
+ copied.value = false;
12892
+ }, 300);
12893
+ } catch (err) {
12894
+ console.error("[vue-json-pretty] Copy failed: ", err);
12895
+ }
12896
+ };
12897
+ return {
12898
+ copy
12899
+ };
12900
+ }
12901
+ const treeNodePropsPass$1 = {
12902
+ // JSONLike data.
12903
+ data: {
12904
+ type: [String, Number, Boolean, Array, Object],
12905
+ default: null
12906
+ },
12907
+ // Data root path.
12908
+ rootPath: {
12909
+ type: String,
12910
+ default: "root"
12911
+ },
12912
+ indent: {
12913
+ type: Number,
12914
+ default: 2
12915
+ },
12916
+ // Whether to display the length of (array|object).
12917
+ showLength: {
12918
+ type: Boolean,
12919
+ default: false
12920
+ },
12921
+ // Whether the key name uses double quotes.
12922
+ showDoubleQuotes: {
12923
+ type: Boolean,
12924
+ default: true
12925
+ },
12926
+ // Custom render for key.
12927
+ renderNodeKey: Function,
12928
+ // Custom render for value.
12929
+ renderNodeValue: Function,
12930
+ // Custom render for node actions.
12931
+ renderNodeActions: {
12932
+ type: [Boolean, Function],
12933
+ default: void 0
12934
+ },
12935
+ // Define the selection method supported by the data level, which is not available by default.
12936
+ selectableType: String,
12937
+ // Whether to display the selection control.
12938
+ showSelectController: {
12939
+ type: Boolean,
12940
+ default: false
12941
+ },
12942
+ // Whether to display the data level connection.
12943
+ showLine: {
12944
+ type: Boolean,
12945
+ default: true
12946
+ },
12947
+ showLineNumber: {
12948
+ type: Boolean,
12949
+ default: false
12950
+ },
12951
+ // Whether to trigger selection when clicking on the node.
12952
+ selectOnClickNode: {
12953
+ type: Boolean,
12954
+ default: true
12955
+ },
12956
+ // When using the selectableType, define whether current path/content is enabled.
12957
+ nodeSelectable: {
12958
+ type: Function,
12959
+ default: () => true
12960
+ },
12961
+ // Highlight current node when selected.
12962
+ highlightSelectedNode: {
12963
+ type: Boolean,
12964
+ default: true
12965
+ },
12966
+ showIcon: {
12967
+ type: Boolean,
12968
+ default: false
12969
+ },
12970
+ theme: {
12971
+ type: String,
12972
+ default: "light"
12973
+ },
12974
+ showKeyValueSpace: {
12975
+ type: Boolean,
12976
+ default: true
12977
+ },
12978
+ editable: {
12979
+ type: Boolean,
12980
+ default: false
12981
+ },
12982
+ editableTrigger: {
12983
+ type: String,
12984
+ default: "click"
12985
+ },
12986
+ onNodeClick: {
12987
+ type: Function
12988
+ },
12989
+ onNodeMouseover: {
12990
+ type: Function
12991
+ },
12992
+ onBracketsClick: {
12993
+ type: Function
12994
+ },
12995
+ onIconClick: {
12996
+ type: Function
12997
+ },
12998
+ onValueChange: {
12999
+ type: Function
13000
+ }
13001
+ };
13002
+ const treeNodeProps = {
13003
+ ...treeNodePropsPass$1,
13004
+ // Current node data.
13005
+ node: {
13006
+ type: Object,
13007
+ required: true
13008
+ },
13009
+ // Whether the current node is collapsed.
13010
+ collapsed: Boolean,
13011
+ // Whether the current node is checked(When using the selection function).
13012
+ checked: Boolean,
13013
+ style: {
13014
+ type: Object,
13015
+ default: void 0
13016
+ },
13017
+ onSelectedChange: {
13018
+ type: Function,
13019
+ default: void 0
13020
+ }
13021
+ };
13022
+ const basicJsonViewerProps = {
13023
+ ...treeNodePropsPass$1,
13024
+ collapsedNodeLength: {
13025
+ type: Number,
13026
+ default: Infinity
13027
+ },
13028
+ // Define the depth of the tree, nodes greater than this depth will not be expanded.
13029
+ deep: {
13030
+ type: Number,
13031
+ default: Infinity
13032
+ },
13033
+ pathCollapsible: {
13034
+ type: Function,
13035
+ default: () => false
13036
+ },
13037
+ // Whether to use virtual scroll, usually applied to big data.
13038
+ virtual: {
13039
+ type: Boolean,
13040
+ default: false
13041
+ },
13042
+ // When using virtual scroll, set the height of tree.
13043
+ height: {
13044
+ type: Number,
13045
+ default: 400
13046
+ },
13047
+ // When using virtual scroll without dynamicHeight, define the height of each row.
13048
+ itemHeight: {
13049
+ type: Number,
13050
+ default: 20
13051
+ },
13052
+ // Enable dynamic row heights for virtual scroll.
13053
+ dynamicHeight: {
13054
+ type: Boolean,
13055
+ default: true
13056
+ },
13057
+ // When there is a selection function, define the selected path.
13058
+ // For multiple selections, it is an array ['root.a','root.b'], for single selection, it is a string of 'root.a'.
13059
+ selectedValue: {
13060
+ type: [String, Array],
13061
+ default: () => ""
13062
+ },
13063
+ // Collapsed control.
13064
+ collapsedOnClickBrackets: {
13065
+ type: Boolean,
13066
+ default: true
13067
+ },
13068
+ style: {
13069
+ type: Object,
13070
+ default: void 0
13071
+ },
13072
+ onSelectedChange: {
13073
+ type: Function,
13074
+ default: void 0
13075
+ },
13076
+ theme: {
13077
+ type: String,
13078
+ default: "light"
13079
+ }
13080
+ };
13081
+ function emitError(message) {
13082
+ throw new Error(`[VueJSONPretty] ${message}`);
13083
+ }
13084
+ function getDataType(value) {
13085
+ return Object.prototype.toString.call(value).slice(8, -1).toLowerCase();
13086
+ }
13087
+ function jsonFlatten(data, path = "root", level = 0, options) {
13088
+ const { key: key2, index: index2, type = "content", showComma = false, length = 1 } = options || {};
13089
+ const dataType = getDataType(data);
13090
+ if (dataType === "array") {
13091
+ const inner = arrFlat(
13092
+ data.map(
13093
+ (item, idx, arr) => jsonFlatten(item, `${path}[${idx}]`, level + 1, {
13094
+ index: idx,
13095
+ showComma: idx !== arr.length - 1,
13096
+ length,
13097
+ type
13098
+ })
13099
+ )
13100
+ );
13101
+ return [
13102
+ jsonFlatten("[", path, level, {
13103
+ showComma: false,
13104
+ key: key2,
13105
+ length: data.length,
13106
+ type: "arrayStart"
13107
+ })[0]
13108
+ ].concat(
13109
+ inner,
13110
+ jsonFlatten("]", path, level, {
13111
+ showComma,
13112
+ length: data.length,
13113
+ type: "arrayEnd"
13114
+ })[0]
13115
+ );
13116
+ } else if (dataType === "object") {
13117
+ const keys = Object.keys(data);
13118
+ const inner = arrFlat(
13119
+ keys.map(
13120
+ (objKey, idx, arr) => jsonFlatten(data[objKey], /^[a-zA-Z_]\w*$/.test(objKey) ? `${path}.${objKey}` : `${path}["${objKey}"]`, level + 1, {
13121
+ key: objKey,
13122
+ showComma: idx !== arr.length - 1,
13123
+ length,
13124
+ type
13125
+ })
13126
+ )
13127
+ );
13128
+ return [
13129
+ jsonFlatten("{", path, level, {
13130
+ showComma: false,
13131
+ key: key2,
13132
+ index: index2,
13133
+ length: keys.length,
13134
+ type: "objectStart"
13135
+ })[0]
13136
+ ].concat(inner, jsonFlatten("}", path, level, { showComma, length: keys.length, type: "objectEnd" })[0]);
13137
+ }
13138
+ return [
13139
+ {
13140
+ content: data,
13141
+ level,
13142
+ key: key2,
13143
+ index: index2,
13144
+ path,
13145
+ showComma,
13146
+ length,
13147
+ type
13148
+ }
13149
+ ];
13150
+ }
13151
+ function arrFlat(arr) {
13152
+ if (typeof Array.prototype.flat === "function") {
13153
+ return arr.flat();
13154
+ }
13155
+ const stack = [...arr];
13156
+ const result = [];
13157
+ while (stack.length) {
13158
+ const first = stack.shift();
13159
+ if (Array.isArray(first)) {
13160
+ stack.unshift(...first);
13161
+ } else {
13162
+ result.push(first);
13163
+ }
13164
+ }
13165
+ return result;
13166
+ }
13167
+ function cloneDeep(source, hash = /* @__PURE__ */ new WeakMap()) {
13168
+ if (source === null || source === void 0) return source;
13169
+ if (source instanceof Date) return new Date(source);
13170
+ if (source instanceof RegExp) return new RegExp(source);
13171
+ if (typeof source !== "object") return source;
13172
+ if (hash.get(source)) return hash.get(source);
13173
+ if (Array.isArray(source)) {
13174
+ const output2 = source.map((item) => cloneDeep(item, hash));
13175
+ hash.set(source, output2);
13176
+ return output2;
13177
+ }
13178
+ const output = {};
13179
+ for (const key2 in source) {
13180
+ output[key2] = cloneDeep(source[key2], hash);
13181
+ }
13182
+ hash.set(source, output);
13183
+ return output;
13184
+ }
13185
+ function stringToAutoType(source) {
13186
+ let value;
13187
+ if (source === "null") value = null;
13188
+ else if (source === "undefined") value = void 0;
13189
+ else if (source === "true") value = true;
13190
+ else if (source === "false") value = false;
13191
+ else if (source[0] + source[source.length - 1] === '""' || source[0] + source[source.length - 1] === "''") {
13192
+ value = source.slice(1, -1);
13193
+ } else if (typeof Number(source) === "number" && !isNaN(Number(source)) || source === "NaN") {
13194
+ value = Number(source);
13195
+ } else {
13196
+ value = source;
13197
+ }
13198
+ return value;
13199
+ }
13200
+ const Brackets = /* @__PURE__ */ vue.defineComponent({
13201
+ name: "JsonBrackets",
13202
+ props: {
13203
+ data: {
13204
+ required: true,
13205
+ type: String
13206
+ },
13207
+ onClick: {
13208
+ type: Function,
13209
+ default: void 0
13210
+ }
13211
+ },
13212
+ render() {
13213
+ const {
13214
+ data
13215
+ } = this;
13216
+ const {
13217
+ onClick
13218
+ } = this;
13219
+ return vue.createVNode("span", {
13220
+ "class": "vjs-tree-brackets",
13221
+ "onClick": onClick
13222
+ }, [data]);
13223
+ }
13224
+ });
13225
+ const Carets = /* @__PURE__ */ vue.defineComponent({
13226
+ name: "JsonCarets",
13227
+ props: {
13228
+ nodeType: {
13229
+ required: true,
13230
+ type: String
13231
+ },
13232
+ onClick: {
13233
+ type: Function,
13234
+ default: void 0
13235
+ }
13236
+ },
13237
+ render() {
13238
+ const {
13239
+ nodeType
13240
+ } = this;
13241
+ const {
13242
+ onClick
13243
+ } = this;
13244
+ const isOpen = nodeType === "objectStart" || nodeType === "arrayStart";
13245
+ const isClose = nodeType === "objectCollapsed" || nodeType === "arrayCollapsed";
13246
+ if (!isOpen && !isClose) return null;
13247
+ return vue.createVNode("span", {
13248
+ "class": `vjs-carets vjs-carets-${isOpen ? "open" : "close"}`,
13249
+ "onClick": onClick
13250
+ }, [vue.createVNode("svg", {
13251
+ "viewBox": "0 0 24 24",
13252
+ "width": "1em",
13253
+ "height": "1em",
13254
+ "fill": "currentColor",
13255
+ "aria-hidden": "true",
13256
+ "focusable": "false",
13257
+ "data-icon": "caret-down"
13258
+ }, [vue.createVNode("path", {
13259
+ "fill": "currentColor",
13260
+ "d": "m12 13.171l4.95-4.95l1.414 1.415L12 16L5.636 9.636L7.05 8.222z"
13261
+ }, null)])]);
13262
+ }
13263
+ });
13264
+ const CheckController = /* @__PURE__ */ vue.defineComponent({
13265
+ props: {
13266
+ checked: {
13267
+ type: Boolean,
13268
+ default: false
13269
+ },
13270
+ isMultiple: Boolean,
13271
+ onChange: {
13272
+ type: Function,
13273
+ default: void 0
13274
+ }
13275
+ },
13276
+ emits: ["change", "update:modelValue"],
13277
+ setup(props, {
13278
+ emit
13279
+ }) {
13280
+ const uiType = vue.computed(() => props.isMultiple ? "checkbox" : "radio");
13281
+ const model = vue.computed({
13282
+ get: () => props.checked,
13283
+ set: (val) => emit("update:modelValue", val)
13284
+ });
13285
+ return {
13286
+ uiType,
13287
+ model
13288
+ };
13289
+ },
13290
+ render() {
13291
+ const {
13292
+ uiType,
13293
+ model,
13294
+ $emit
13295
+ } = this;
13296
+ return vue.createVNode("label", {
13297
+ "class": ["vjs-check-controller", model ? "is-checked" : ""],
13298
+ "onClick": (e) => e.stopPropagation()
13299
+ }, [vue.createVNode("span", {
13300
+ "class": `vjs-check-controller-inner is-${uiType}`
13301
+ }, null), vue.createVNode("input", {
13302
+ "checked": model,
13303
+ "class": `vjs-check-controller-original is-${uiType}`,
13304
+ "type": uiType,
13305
+ "onChange": () => $emit("change", model)
13306
+ }, null)]);
13307
+ }
13308
+ });
13309
+ const treeNodePropsPass = {
13310
+ // JSONLike data.
13311
+ data: {
13312
+ type: [String, Number, Boolean, Array, Object],
13313
+ default: null
13314
+ },
13315
+ // Data root path.
13316
+ rootPath: {
13317
+ type: String,
13318
+ default: "root"
13319
+ },
13320
+ indent: {
13321
+ type: Number,
13322
+ default: 2
13323
+ },
13324
+ // Whether to display the length of (array|object).
13325
+ showLength: {
13326
+ type: Boolean,
13327
+ default: false
13328
+ },
13329
+ // Whether the key name uses double quotes.
13330
+ showDoubleQuotes: {
13331
+ type: Boolean,
13332
+ default: true
13333
+ },
13334
+ // Custom render for key.
13335
+ renderNodeKey: Function,
13336
+ // Custom render for value.
13337
+ renderNodeValue: Function,
13338
+ // Custom render for node actions.
13339
+ renderNodeActions: {
13340
+ type: [Boolean, Function],
13341
+ default: void 0
13342
+ },
13343
+ // Define the selection method supported by the data level, which is not available by default.
13344
+ selectableType: String,
13345
+ // Whether to display the selection control.
13346
+ showSelectController: {
13347
+ type: Boolean,
13348
+ default: false
13349
+ },
13350
+ // Whether to display the data level connection.
13351
+ showLine: {
13352
+ type: Boolean,
13353
+ default: true
13354
+ },
13355
+ showLineNumber: {
13356
+ type: Boolean,
13357
+ default: false
13358
+ },
13359
+ // Whether to trigger selection when clicking on the node.
13360
+ selectOnClickNode: {
13361
+ type: Boolean,
13362
+ default: true
13363
+ },
13364
+ // When using the selectableType, define whether current path/content is enabled.
13365
+ nodeSelectable: {
13366
+ type: Function,
13367
+ default: () => true
13368
+ },
13369
+ // Highlight current node when selected.
13370
+ highlightSelectedNode: {
13371
+ type: Boolean,
13372
+ default: true
13373
+ },
13374
+ showIcon: {
13375
+ type: Boolean,
13376
+ default: false
13377
+ },
13378
+ theme: {
13379
+ type: String,
13380
+ default: "light"
13381
+ },
13382
+ showKeyValueSpace: {
13383
+ type: Boolean,
13384
+ default: true
13385
+ },
13386
+ editable: {
13387
+ type: Boolean,
13388
+ default: false
13389
+ },
13390
+ editableTrigger: {
13391
+ type: String,
13392
+ default: "click"
13393
+ },
13394
+ onNodeClick: {
13395
+ type: Function
13396
+ },
13397
+ onNodeMouseover: {
13398
+ type: Function
13399
+ },
13400
+ onBracketsClick: {
13401
+ type: Function
13402
+ },
13403
+ onIconClick: {
13404
+ type: Function
13405
+ },
13406
+ onValueChange: {
13407
+ type: Function
13408
+ }
13409
+ };
13410
+ const TreeNode$1 = /* @__PURE__ */ vue.defineComponent({
13411
+ name: "TreeNode",
13412
+ props: treeNodeProps,
13413
+ emits: ["nodeClick", "nodeMouseover", "bracketsClick", "iconClick", "selectedChange", "valueChange"],
13414
+ setup(props, {
13415
+ emit
13416
+ }) {
13417
+ const dataType = vue.computed(() => getDataType(props.node.content));
13418
+ const valueClass = vue.computed(() => `vjs-value vjs-value-${dataType.value}`);
13419
+ const prettyKey = vue.computed(() => props.showDoubleQuotes ? `"${props.node.key}"` : props.node.key);
13420
+ const renderKey = () => {
13421
+ const render2 = props.renderNodeKey;
13422
+ return render2 ? render2({
13423
+ node: props.node,
13424
+ defaultKey: prettyKey.value || ""
13425
+ }) : prettyKey.value;
13426
+ };
13427
+ const isMultiple = vue.computed(() => props.selectableType === "multiple");
13428
+ const isSingle = vue.computed(() => props.selectableType === "single");
13429
+ const selectable = vue.computed(() => props.nodeSelectable(props.node) && (isMultiple.value || isSingle.value));
13430
+ const state = vue.reactive({
13431
+ editing: false
13432
+ });
13433
+ const handleInputChange = (e) => {
13434
+ var _a;
13435
+ const source = (_a = e.target) == null ? void 0 : _a.value;
13436
+ const value = stringToAutoType(source);
13437
+ emit("valueChange", value, props.node.path);
13438
+ };
13439
+ const defaultValue = vue.computed(() => {
13440
+ var _a;
13441
+ let value = (_a = props.node) == null ? void 0 : _a.content;
13442
+ if (value === null) {
13443
+ value = "null";
13444
+ } else if (value === void 0) {
13445
+ value = "undefined";
13446
+ }
13447
+ return dataType.value === "string" ? `"${value}"` : `${value}`;
13448
+ });
13449
+ const renderValue = () => {
13450
+ const render2 = props.renderNodeValue;
13451
+ return render2 ? render2({
13452
+ node: props.node,
13453
+ defaultValue: defaultValue.value
13454
+ }) : defaultValue.value;
13455
+ };
13456
+ const handleBracketsClick = () => {
13457
+ emit("bracketsClick", !props.collapsed, props.node);
13458
+ };
13459
+ const handleIconClick = () => {
13460
+ emit("iconClick", !props.collapsed, props.node);
13461
+ };
13462
+ const handleSelectedChange = () => {
13463
+ emit("selectedChange", props.node);
13464
+ };
13465
+ const handleNodeClick = () => {
13466
+ emit("nodeClick", props.node);
13467
+ if (selectable.value && props.selectOnClickNode) {
13468
+ emit("selectedChange", props.node);
13469
+ }
13470
+ };
13471
+ const handleNodeMouseover = () => {
13472
+ emit("nodeMouseover", props.node);
13473
+ };
13474
+ const handleValueEdit = (e) => {
13475
+ if (!props.editable) return;
13476
+ if (!state.editing) {
13477
+ state.editing = true;
13478
+ const handle = (innerE) => {
13479
+ var _a;
13480
+ if (innerE.target !== e.target && ((_a = innerE.target) == null ? void 0 : _a.parentElement) !== e.target) {
13481
+ state.editing = false;
13482
+ document.removeEventListener("click", handle);
13483
+ }
13484
+ };
13485
+ document.removeEventListener("click", handle);
13486
+ document.addEventListener("click", handle);
13487
+ }
13488
+ };
13489
+ const {
13490
+ copy
13491
+ } = useClipboard();
13492
+ const handleCopy = () => {
13493
+ const {
13494
+ key: key2,
13495
+ path
13496
+ } = props.node;
13497
+ const rootPath = props.rootPath;
13498
+ const content = new Function("data", `return data${path.slice(rootPath.length)}`)(props.data);
13499
+ const copiedData = JSON.stringify(key2 ? {
13500
+ [key2]: content
13501
+ } : content, null, 2);
13502
+ copy(copiedData);
13503
+ };
13504
+ const renderNodeActions = () => {
13505
+ const render2 = props.renderNodeActions;
13506
+ if (!render2) return null;
13507
+ const defaultActions = {
13508
+ copy: handleCopy
13509
+ };
13510
+ return typeof render2 === "function" ? render2({
13511
+ node: props.node,
13512
+ defaultActions
13513
+ }) : vue.createVNode("span", {
13514
+ "onClick": handleCopy,
13515
+ "class": "vjs-tree-node-actions-item"
13516
+ }, [vue.createTextVNode("copy")]);
13517
+ };
13518
+ return () => {
13519
+ const {
13520
+ node
13521
+ } = props;
13522
+ return vue.createVNode("div", {
13523
+ "class": {
13524
+ "vjs-tree-node": true,
13525
+ "has-selector": props.showSelectController,
13526
+ "has-carets": props.showIcon,
13527
+ "is-highlight": props.highlightSelectedNode && props.checked,
13528
+ dark: props.theme === "dark"
13529
+ },
13530
+ "onClick": handleNodeClick,
13531
+ "onMouseover": handleNodeMouseover,
13532
+ "style": props.style
13533
+ }, [props.showLineNumber && vue.createVNode("span", {
13534
+ "class": "vjs-node-index"
13535
+ }, [node.id + 1]), props.showSelectController && selectable.value && node.type !== "objectEnd" && node.type !== "arrayEnd" && vue.createVNode(CheckController, {
13536
+ "isMultiple": isMultiple.value,
13537
+ "checked": props.checked,
13538
+ "onChange": handleSelectedChange
13539
+ }, null), vue.createVNode("div", {
13540
+ "class": "vjs-indent"
13541
+ }, [Array.from(Array(node.level)).map((item, index2) => vue.createVNode("div", {
13542
+ "key": index2,
13543
+ "class": {
13544
+ "vjs-indent-unit": true,
13545
+ "has-line": props.showLine
13546
+ }
13547
+ }, [Array.from(Array(props.indent)).map(() => vue.createVNode(vue.Fragment, null, [vue.createTextVNode(" ")]))])), props.showIcon && vue.createVNode(Carets, {
13548
+ "nodeType": node.type,
13549
+ "onClick": handleIconClick
13550
+ }, null)]), node.key && vue.createVNode("span", {
13551
+ "class": "vjs-key"
13552
+ }, [renderKey(), vue.createVNode("span", {
13553
+ "class": "vjs-colon"
13554
+ }, [`:${props.showKeyValueSpace ? " " : ""}`])]), vue.createVNode("span", null, [node.type !== "content" && node.content ? vue.createVNode(Brackets, {
13555
+ "data": node.content.toString(),
13556
+ "onClick": handleBracketsClick
13557
+ }, null) : vue.createVNode("span", {
13558
+ "class": valueClass.value,
13559
+ "onClick": props.editable && (!props.editableTrigger || props.editableTrigger === "click") ? handleValueEdit : void 0,
13560
+ "onDblclick": props.editable && props.editableTrigger === "dblclick" ? handleValueEdit : void 0
13561
+ }, [props.editable && state.editing ? vue.createVNode("input", {
13562
+ "value": defaultValue.value,
13563
+ "onChange": handleInputChange,
13564
+ "style": {
13565
+ padding: "3px 8px",
13566
+ border: "1px solid #eee",
13567
+ boxShadow: "none",
13568
+ boxSizing: "border-box",
13569
+ borderRadius: 5,
13570
+ fontFamily: "inherit"
13571
+ }
13572
+ }, null) : renderValue()]), node.showComma && vue.createVNode("span", null, [","]), props.showLength && props.collapsed && vue.createVNode("span", {
13573
+ "class": "vjs-comment"
13574
+ }, [vue.createTextVNode(" // "), node.length, vue.createTextVNode(" items ")])]), props.renderNodeActions && vue.createVNode("span", {
13575
+ "class": "vjs-tree-node-actions"
13576
+ }, [renderNodeActions()])]);
13577
+ };
13578
+ }
13579
+ });
13580
+ const BasicJsonViewer = /* @__PURE__ */ vue.defineComponent({
13581
+ name: "JsonTree",
13582
+ props: {
13583
+ ...treeNodePropsPass,
13584
+ collapsedNodeLength: {
13585
+ type: Number,
13586
+ default: Infinity
13587
+ },
13588
+ // Define the depth of the tree, nodes greater than this depth will not be expanded.
13589
+ deep: {
13590
+ type: Number,
13591
+ default: Infinity
13592
+ },
13593
+ pathCollapsible: {
13594
+ type: Function,
13595
+ default: () => false
13596
+ },
13597
+ // Whether to use virtual scroll, usually applied to big data.
13598
+ virtual: {
13599
+ type: Boolean,
13600
+ default: false
13601
+ },
13602
+ // When using virtual scroll, set the height of tree.
13603
+ height: {
13604
+ type: Number,
13605
+ default: 400
13606
+ },
13607
+ // When using virtual scroll without dynamicHeight, define the height of each row.
13608
+ itemHeight: {
13609
+ type: Number,
13610
+ default: 20
13611
+ },
13612
+ // Enable dynamic row heights for virtual scroll.
13613
+ dynamicHeight: {
13614
+ type: Boolean,
13615
+ default: true
13616
+ },
13617
+ // When there is a selection function, define the selected path.
13618
+ // For multiple selections, it is an array ['root.a','root.b'], for single selection, it is a string of 'root.a'.
13619
+ selectedValue: {
13620
+ type: [String, Array],
13621
+ default: () => ""
13622
+ },
13623
+ // Collapsed control.
13624
+ collapsedOnClickBrackets: {
13625
+ type: Boolean,
13626
+ default: true
13627
+ },
13628
+ style: {
13629
+ type: Object,
13630
+ default: void 0
13631
+ },
13632
+ onSelectedChange: {
13633
+ type: Function,
13634
+ default: void 0
13635
+ },
13636
+ theme: {
13637
+ type: String,
13638
+ default: "light"
13639
+ }
13640
+ },
13641
+ emits: ["nodeClick", "nodeMouseover", "bracketsClick", "iconClick", "selectedChange", "update:selectedValue", "update:data"],
13642
+ setup(props, {
13643
+ emit,
13644
+ slots
13645
+ }) {
13646
+ const {
13647
+ b
13648
+ } = useNamespace("basic-json-viewer");
13649
+ const treeRef = vue.ref();
13650
+ const originFlatData = vue.computed(() => jsonFlatten(props.data, props.rootPath));
13651
+ const initHiddenPaths = (deep, collapsedNodeLength) => {
13652
+ return originFlatData.value.reduce((acc, item) => {
13653
+ var _a;
13654
+ const doCollapse = item.level >= deep || item.length >= collapsedNodeLength;
13655
+ const pathComparison = (_a = props.pathCollapsible) == null ? void 0 : _a.call(props, item);
13656
+ if ((item.type === "objectStart" || item.type === "arrayStart") && (doCollapse || pathComparison)) {
13657
+ return {
13658
+ ...acc,
13659
+ [item.path]: 1
13660
+ };
13661
+ }
13662
+ return acc;
13663
+ }, {});
13664
+ };
13665
+ const state = vue.reactive({
13666
+ translateY: 0,
13667
+ visibleData: null,
13668
+ hiddenPaths: initHiddenPaths(props.deep, props.collapsedNodeLength),
13669
+ startIndex: 0,
13670
+ endIndex: 0
13671
+ });
13672
+ let heights = [];
13673
+ let offsets = [];
13674
+ let totalHeight = 0;
13675
+ const rowRefs = {};
13676
+ const OVERSCAN_COUNT = 5;
13677
+ const initDynamicHeights = (length) => {
13678
+ heights = Array(length).fill(0).map(() => props.itemHeight || 20);
13679
+ offsets = new Array(length + 1);
13680
+ offsets[0] = 0;
13681
+ for (let i = 0; i < length; i++) {
13682
+ offsets[i + 1] = offsets[i] + heights[i];
13683
+ }
13684
+ totalHeight = offsets[length] || 0;
13685
+ };
13686
+ const recomputeOffsetsFrom = (start) => {
13687
+ const length = heights.length;
13688
+ if (start < 0) start = 0;
13689
+ if (start > length) start = length;
13690
+ for (let i = start; i < length; i++) {
13691
+ offsets[i + 1] = offsets[i] + heights[i];
13692
+ }
13693
+ totalHeight = offsets[length] || 0;
13694
+ };
13695
+ const setRowRef = (index2, el) => {
13696
+ if (el) {
13697
+ rowRefs[index2] = el;
13698
+ } else {
13699
+ delete rowRefs[index2];
13700
+ }
13701
+ };
13702
+ const lowerBound = (arr, target) => {
13703
+ let lo = 0;
13704
+ let hi = arr.length - 1;
13705
+ while (lo < hi) {
13706
+ const mid = lo + hi >>> 1;
13707
+ if (arr[mid] < target) lo = mid + 1;
13708
+ else hi = mid;
13709
+ }
13710
+ return lo;
13711
+ };
13712
+ const findStartIndexByScrollTop = (scrollTop) => {
13713
+ const i = lowerBound(offsets, scrollTop + 1e-4);
13714
+ return Math.max(0, Math.min(i - 1, heights.length - 1));
13715
+ };
13716
+ const findEndIndexByViewport = (scrollTop, viewportHeight) => {
13717
+ const target = scrollTop + viewportHeight;
13718
+ const i = lowerBound(offsets, target);
13719
+ return Math.max(0, Math.min(i + 1, heights.length));
13720
+ };
13721
+ const flatData = vue.computed(() => {
13722
+ let startHiddenItem = null;
13723
+ const data = [];
13724
+ const length = originFlatData.value.length;
13725
+ for (let i = 0; i < length; i++) {
13726
+ const cur = originFlatData.value[i];
13727
+ const item = {
13728
+ ...cur,
13729
+ id: i
13730
+ };
13731
+ const isHidden = state.hiddenPaths[item.path];
13732
+ if (startHiddenItem && startHiddenItem.path === item.path) {
13733
+ const isObject2 = startHiddenItem.type === "objectStart";
13734
+ const mergeItem = {
13735
+ ...item,
13736
+ ...startHiddenItem,
13737
+ showComma: item.showComma,
13738
+ content: isObject2 ? "{...}" : "[...]",
13739
+ type: isObject2 ? "objectCollapsed" : "arrayCollapsed"
13740
+ };
13741
+ startHiddenItem = null;
13742
+ data.push(mergeItem);
13743
+ } else if (isHidden && !startHiddenItem) {
13744
+ startHiddenItem = item;
13745
+ continue;
13746
+ } else {
13747
+ if (startHiddenItem) continue;
13748
+ else data.push(item);
13749
+ }
13750
+ }
13751
+ return data;
13752
+ });
13753
+ const selectedPaths = vue.computed(() => {
13754
+ const value = props.selectedValue;
13755
+ if (value && props.selectableType === "multiple" && Array.isArray(value)) {
13756
+ return value;
13757
+ }
13758
+ return [value];
13759
+ });
13760
+ const propsErrorMessage = vue.computed(() => {
13761
+ const error = props.selectableType && !props.selectOnClickNode && !props.showSelectController;
13762
+ return error ? "When selectableType is not null, selectOnClickNode and showSelectController cannot be false at the same time, because this will cause the selection to fail." : "";
13763
+ });
13764
+ const listHeight = vue.computed(() => {
13765
+ if (props.dynamicHeight) {
13766
+ return totalHeight || 0;
13767
+ }
13768
+ return flatData.value.length * props.itemHeight;
13769
+ });
13770
+ const updateVisibleData = () => {
13771
+ var _a;
13772
+ const flatDataValue = flatData.value;
13773
+ if (!flatDataValue) return;
13774
+ if (props.virtual) {
13775
+ const scrollTop = ((_a = treeRef.value) == null ? void 0 : _a.scrollTop) || 0;
13776
+ if (props.dynamicHeight) {
13777
+ if (heights.length !== flatDataValue.length) {
13778
+ initDynamicHeights(flatDataValue.length);
13779
+ }
13780
+ const start = findStartIndexByScrollTop(scrollTop);
13781
+ const endNoOverscan = findEndIndexByViewport(scrollTop, props.height);
13782
+ const startWithOverscan = Math.max(0, start - OVERSCAN_COUNT);
13783
+ const endWithOverscan = Math.min(flatDataValue.length, endNoOverscan + OVERSCAN_COUNT);
13784
+ state.startIndex = startWithOverscan;
13785
+ state.endIndex = endWithOverscan;
13786
+ state.translateY = offsets[startWithOverscan] || 0;
13787
+ state.visibleData = flatDataValue.slice(startWithOverscan, endWithOverscan);
13788
+ vue.nextTick().then(() => {
13789
+ let changed = false;
13790
+ for (let i = state.startIndex; i < state.endIndex; i++) {
13791
+ const el = rowRefs[i];
13792
+ if (!el) continue;
13793
+ const h = el.offsetHeight;
13794
+ if (h && heights[i] !== h) {
13795
+ heights[i] = h;
13796
+ offsets[i + 1] = offsets[i] + heights[i];
13797
+ recomputeOffsetsFrom(i + 1);
13798
+ changed = true;
13799
+ }
13800
+ }
13801
+ if (changed) {
13802
+ updateVisibleData();
13803
+ }
13804
+ });
13805
+ } else {
13806
+ const visibleCount = props.height / props.itemHeight;
13807
+ const scrollCount = Math.floor(scrollTop / props.itemHeight);
13808
+ let start = scrollCount < 0 ? 0 : scrollCount + visibleCount > flatDataValue.length ? flatDataValue.length - visibleCount : scrollCount;
13809
+ if (start < 0) {
13810
+ start = 0;
13811
+ }
13812
+ const end = start + visibleCount;
13813
+ state.translateY = start * props.itemHeight;
13814
+ state.startIndex = start;
13815
+ state.endIndex = end;
13816
+ state.visibleData = flatDataValue.slice(start, end);
13817
+ }
13818
+ } else {
13819
+ state.translateY = 0;
13820
+ state.startIndex = 0;
13821
+ state.endIndex = flatDataValue.length;
13822
+ state.visibleData = flatDataValue;
13823
+ }
13824
+ };
13825
+ let rafId = null;
13826
+ const handleTreeScroll = () => {
13827
+ if (rafId) {
13828
+ cancelAnimationFrame(rafId);
13829
+ }
13830
+ rafId = requestAnimationFrame(() => {
13831
+ updateVisibleData();
13832
+ });
13833
+ };
13834
+ const handleSelectedChange = ({
13835
+ path
13836
+ }) => {
13837
+ const type = props.selectableType;
13838
+ if (type === "multiple") {
13839
+ const index2 = selectedPaths.value.findIndex((item) => item === path);
13840
+ const newVal = [...selectedPaths.value];
13841
+ if (index2 !== -1) {
13842
+ newVal.splice(index2, 1);
13843
+ } else {
13844
+ newVal.push(path);
13845
+ }
13846
+ emit("update:selectedValue", newVal);
13847
+ emit("selectedChange", newVal, [...selectedPaths.value]);
13848
+ } else if (type === "single") {
13849
+ if (selectedPaths.value[0] !== path) {
13850
+ const [oldVal] = selectedPaths.value;
13851
+ const newVal = path;
13852
+ emit("update:selectedValue", newVal);
13853
+ emit("selectedChange", newVal, oldVal);
13854
+ }
13855
+ }
13856
+ };
13857
+ const handleNodeClick = (node) => {
13858
+ emit("nodeClick", node);
13859
+ };
13860
+ const handleNodeMouseover = (node) => {
13861
+ emit("nodeMouseover", node);
13862
+ };
13863
+ const updateCollapsedPaths = (collapsed, path) => {
13864
+ if (collapsed) {
13865
+ state.hiddenPaths = {
13866
+ ...state.hiddenPaths,
13867
+ [path]: 1
13868
+ };
13869
+ } else {
13870
+ const newPaths = {
13871
+ ...state.hiddenPaths
13872
+ };
13873
+ delete newPaths[path];
13874
+ state.hiddenPaths = newPaths;
13875
+ }
13876
+ };
13877
+ const handleBracketsClick = (collapsed, node) => {
13878
+ if (props.collapsedOnClickBrackets) {
13879
+ updateCollapsedPaths(collapsed, node.path);
13880
+ }
13881
+ emit("bracketsClick", collapsed, node);
13882
+ };
13883
+ const handleIconClick = (collapsed, node) => {
13884
+ updateCollapsedPaths(collapsed, node.path);
13885
+ emit("iconClick", collapsed, node);
13886
+ };
13887
+ const handleValueChange = (value, path) => {
13888
+ const newData = cloneDeep(props.data);
13889
+ const rootPath = props.rootPath;
13890
+ new Function("data", "val", `data${path.slice(rootPath.length)}=val`)(newData, value);
13891
+ emit("update:data", newData);
13892
+ };
13893
+ vue.watchEffect(() => {
13894
+ if (propsErrorMessage.value) {
13895
+ emitError(propsErrorMessage.value);
13896
+ }
13897
+ });
13898
+ vue.watchEffect(() => {
13899
+ if (flatData.value) {
13900
+ if (props.virtual && props.dynamicHeight) {
13901
+ if (heights.length !== flatData.value.length) {
13902
+ initDynamicHeights(flatData.value.length);
13903
+ }
13904
+ }
13905
+ updateVisibleData();
13906
+ }
13907
+ });
13908
+ vue.watch(() => [props.dynamicHeight, props.itemHeight, originFlatData.value.length], () => {
13909
+ if (props.virtual && props.dynamicHeight) {
13910
+ initDynamicHeights(flatData.value.length);
13911
+ vue.nextTick(updateVisibleData);
13912
+ }
13913
+ });
13914
+ vue.watch(() => props.deep, (val) => {
13915
+ if (val) state.hiddenPaths = initHiddenPaths(val, props.collapsedNodeLength);
13916
+ });
13917
+ vue.watch(() => props.collapsedNodeLength, (val) => {
13918
+ if (val) state.hiddenPaths = initHiddenPaths(props.deep, val);
13919
+ });
13920
+ return () => {
13921
+ var _a, _b, _c, _d, _e;
13922
+ const renderNodeKey = (_a = props.renderNodeKey) != null ? _a : slots.renderNodeKey;
13923
+ const renderNodeValue = (_b = props.renderNodeValue) != null ? _b : slots.renderNodeValue;
13924
+ const renderNodeActions = (_d = (_c = props.renderNodeActions) != null ? _c : slots.renderNodeActions) != null ? _d : false;
13925
+ const nodeContent = (_e = state.visibleData) == null ? void 0 : _e.map((item, localIndex) => {
13926
+ const globalIndex = state.startIndex + localIndex;
13927
+ return vue.createVNode("div", {
13928
+ "key": item.id,
13929
+ "ref": (el) => setRowRef(globalIndex, el || null)
13930
+ }, [vue.createVNode(TreeNode$1, {
13931
+ "data": props.data,
13932
+ "rootPath": props.rootPath,
13933
+ "indent": props.indent,
13934
+ "node": item,
13935
+ "collapsed": !!state.hiddenPaths[item.path],
13936
+ "theme": props.theme,
13937
+ "showDoubleQuotes": props.showDoubleQuotes,
13938
+ "showLength": props.showLength,
13939
+ "checked": selectedPaths.value.includes(item.path),
13940
+ "selectableType": props.selectableType,
13941
+ "showLine": props.showLine,
13942
+ "showLineNumber": props.showLineNumber,
13943
+ "showSelectController": props.showSelectController,
13944
+ "selectOnClickNode": props.selectOnClickNode,
13945
+ "nodeSelectable": props.nodeSelectable,
13946
+ "highlightSelectedNode": props.highlightSelectedNode,
13947
+ "editable": props.editable,
13948
+ "editableTrigger": props.editableTrigger,
13949
+ "showIcon": props.showIcon,
13950
+ "showKeyValueSpace": props.showKeyValueSpace,
13951
+ "renderNodeKey": renderNodeKey,
13952
+ "renderNodeValue": renderNodeValue,
13953
+ "renderNodeActions": renderNodeActions,
13954
+ "onNodeClick": handleNodeClick,
13955
+ "onNodeMouseover": handleNodeMouseover,
13956
+ "onBracketsClick": handleBracketsClick,
13957
+ "onIconClick": handleIconClick,
13958
+ "onSelectedChange": handleSelectedChange,
13959
+ "onValueChange": handleValueChange,
13960
+ "class": props.dynamicHeight ? "dynamic-height" : void 0,
13961
+ "style": props.dynamicHeight ? {} : props.itemHeight && props.itemHeight !== 20 ? {
13962
+ lineHeight: `${props.itemHeight}px`
13963
+ } : {}
13964
+ }, null)]);
13965
+ });
13966
+ return vue.createVNode("div", {
13967
+ "ref": treeRef,
13968
+ "class": {
13969
+ [b()]: true,
13970
+ "vjs-tree": true,
13971
+ "is-virtual": props.virtual,
13972
+ dark: props.theme === "dark"
13973
+ },
13974
+ "onScroll": props.virtual ? handleTreeScroll : void 0,
13975
+ "style": props.showLineNumber ? {
13976
+ paddingLeft: `${Number(originFlatData.value.length.toString().length) * 12}px`,
13977
+ ...props.style
13978
+ } : props.style
13979
+ }, [props.virtual ? vue.createVNode("div", {
13980
+ "class": "vjs-tree-list",
13981
+ "style": {
13982
+ height: `${props.height}px`
13983
+ }
13984
+ }, [vue.createVNode("div", {
13985
+ "class": "vjs-tree-list-holder",
13986
+ "style": {
13987
+ height: `${listHeight.value}px`
13988
+ }
13989
+ }, [vue.createVNode("div", {
13990
+ "class": "vjs-tree-list-holder-inner",
13991
+ "style": {
13992
+ transform: `translateY(${state.translateY}px)`
13993
+ }
13994
+ }, [nodeContent])])]) : nodeContent]);
13995
+ };
13996
+ }
13997
+ });
13998
+ const XBasicJsonViewer = utils.withInstall(BasicJsonViewer);
12884
13999
  const ROW_KEY$1 = "_MAX_ROW_KEY";
12885
14000
  const PAGE_SIZE_OPTIONS$1 = [10, 50, 80, 100];
12886
14001
  const PAGE_SIZE$1 = 10;
@@ -13210,7 +14325,7 @@ function usePagination$1(propsRef) {
13210
14325
  }
13211
14326
  return { getPagination, getPaginationInfo, setShowPagination, getShowPagination, setPagination };
13212
14327
  }
13213
- const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
14328
+ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
13214
14329
  __name: "BasicListPage",
13215
14330
  props: {
13216
14331
  listClassName: {},
@@ -13379,7 +14494,7 @@ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
13379
14494
  };
13380
14495
  }
13381
14496
  });
13382
- const XBasicListPage = utils.withInstall(_sfc_main$m);
14497
+ const XBasicListPage = utils.withInstall(_sfc_main$n);
13383
14498
  function createLoadingComponent(options) {
13384
14499
  let afterLeaveTimer;
13385
14500
  const afterLeaveFlag = vue.ref(false);
@@ -13648,7 +14763,7 @@ const XBasicLoading = {
13648
14763
  directive: vLoading,
13649
14764
  service: Loading
13650
14765
  };
13651
- const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
14766
+ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
13652
14767
  __name: "BasicModal",
13653
14768
  props: {
13654
14769
  width: {},
@@ -13800,12 +14915,12 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
13800
14915
  }
13801
14916
  });
13802
14917
  const basicModalProps = {};
13803
- const XBasicModal = utils.withInstall(_sfc_main$l);
14918
+ const XBasicModal = utils.withInstall(_sfc_main$m);
13804
14919
  const _hoisted_1$6 = ["id"];
13805
14920
  const _hoisted_2$2 = ["textContent"];
13806
14921
  const _hoisted_3 = { key: 0 };
13807
14922
  const _hoisted_4 = ["innerHTML"];
13808
- const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
14923
+ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
13809
14924
  __name: "BasicNotification",
13810
14925
  props: {
13811
14926
  customClass: { default: "" },
@@ -13992,7 +15107,7 @@ const notify = (options, context) => {
13992
15107
  appendTo = document.body;
13993
15108
  }
13994
15109
  const container = document.createElement("div");
13995
- const vm = vue.createVNode(_sfc_main$k, props, utils.isFunction(props.message) ? props.message : vue.isVNode(props.message) ? () => props.message : null);
15110
+ const vm = vue.createVNode(_sfc_main$l, props, utils.isFunction(props.message) ? props.message : vue.isVNode(props.message) ? () => props.message : null);
13996
15111
  vm.appContext = utils.isUndefined(context) ? notify._context : context;
13997
15112
  vm.props.onDestroy = () => {
13998
15113
  vue.render(null, container);
@@ -14050,7 +15165,7 @@ notify.closeAll = closeAll;
14050
15165
  notify._context = null;
14051
15166
  const $Notification = notify;
14052
15167
  const XBasicNotification = $Notification;
14053
- const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
15168
+ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
14054
15169
  __name: "BasicPage",
14055
15170
  props: {
14056
15171
  title: {},
@@ -14150,8 +15265,8 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
14150
15265
  };
14151
15266
  }
14152
15267
  });
14153
- const XBasicPage = utils.withInstall(_sfc_main$j);
14154
- const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
15268
+ const XBasicPage = utils.withInstall(_sfc_main$k);
15269
+ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
14155
15270
  __name: "BasicPanel",
14156
15271
  props: {
14157
15272
  title: {},
@@ -14188,7 +15303,7 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
14188
15303
  };
14189
15304
  }
14190
15305
  });
14191
- const XBasicPanel = utils.withInstall(_sfc_main$i);
15306
+ const XBasicPanel = utils.withInstall(_sfc_main$j);
14192
15307
  const regionJson = {
14193
15308
  "110000": "北京市",
14194
15309
  "110100": "市辖区",
@@ -18195,7 +19310,7 @@ const BasicRow = /* @__PURE__ */ vue.defineComponent({
18195
19310
  }
18196
19311
  });
18197
19312
  const XBasicRow = utils.withInstall(BasicRow);
18198
- const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
19313
+ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
18199
19314
  __name: "BasicSubPanel",
18200
19315
  props: {
18201
19316
  title: {}
@@ -18231,7 +19346,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
18231
19346
  }
18232
19347
  });
18233
19348
  const basicSubPanelProps = {};
18234
- const XBasicSubPanel = utils.withInstall(_sfc_main$h);
19349
+ const XBasicSubPanel = utils.withInstall(_sfc_main$i);
18235
19350
  const ROW_KEY = "_MAX_ROW_KEY";
18236
19351
  const PAGE_SIZE_OPTIONS = [10, 50, 80, 100];
18237
19352
  const PAGE_SIZE = 10;
@@ -19099,7 +20214,7 @@ const setting = {
19099
20214
  })
19100
20215
  };
19101
20216
  const _hoisted_1$5 = { class: "max-table-selection-count" };
19102
- const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
20217
+ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
19103
20218
  __name: "BasicTable",
19104
20219
  props: /* @__PURE__ */ vue.mergeDefaults({
19105
20220
  layouts: {},
@@ -19553,8 +20668,8 @@ const vxeTableFormatter = {
19553
20668
  }
19554
20669
  };
19555
20670
  vxeTable.VxeUI.formats.mixin(vxeTableFormatter);
19556
- const XBasicTable = utils.withInstall(_sfc_main$g);
19557
- const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
20671
+ const XBasicTable = utils.withInstall(_sfc_main$h);
20672
+ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
19558
20673
  __name: "BasicTag",
19559
20674
  props: {
19560
20675
  tagType: { type: [Number, Boolean] },
@@ -19579,7 +20694,7 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
19579
20694
  };
19580
20695
  }
19581
20696
  });
19582
- const XBasicTag = utils.withInstall(_sfc_main$f);
20697
+ const XBasicTag = utils.withInstall(_sfc_main$g);
19583
20698
  const attrAccept = (file, acceptedFiles) => {
19584
20699
  if (file && acceptedFiles) {
19585
20700
  const acceptedFilesArray = Array.isArray(acceptedFiles) ? acceptedFiles : acceptedFiles.split(",");
@@ -21316,7 +22431,7 @@ const BasicUploadDragger = /* @__PURE__ */ vue.defineComponent({
21316
22431
  const XBasicUploadDragger = utils.withInstall(BasicUploadDragger);
21317
22432
  const _hoisted_1$4 = ["title"];
21318
22433
  const _hoisted_2$1 = ["title"];
21319
- const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
22434
+ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
21320
22435
  __name: "BasicViewBar",
21321
22436
  props: {
21322
22437
  fixed: { type: Boolean },
@@ -21428,8 +22543,8 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
21428
22543
  };
21429
22544
  }
21430
22545
  });
21431
- const XBasicViewBar = utils.withInstall(_sfc_main$e);
21432
- const _sfc_main$d = vue.defineComponent({
22546
+ const XBasicViewBar = utils.withInstall(_sfc_main$f);
22547
+ const _sfc_main$e = vue.defineComponent({
21433
22548
  name: "CLoadingIcon"
21434
22549
  });
21435
22550
  const _hoisted_1$3 = { viewBox: "0 0 50 50" };
@@ -21446,7 +22561,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
21446
22561
  }, null, -1)
21447
22562
  ])]);
21448
22563
  }
21449
- const LoadingIcon = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render]]);
22564
+ const LoadingIcon = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render]]);
21450
22565
  var ignoreEnum = /* @__PURE__ */ ((ignoreEnum2) => {
21451
22566
  ignoreEnum2["none"] = "none";
21452
22567
  ignoreEnum2["parents"] = "parents";
@@ -21647,7 +22762,7 @@ const useTreeNodeCls = (props, dragoverRefs) => {
21647
22762
  };
21648
22763
  const _hoisted_1$2 = ["d", "stroke-width", "stroke", "stroke-dasharray"];
21649
22764
  const _hoisted_2 = ["draggable"];
21650
- const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
22765
+ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
21651
22766
  ...{
21652
22767
  name: "VTreeNode"
21653
22768
  },
@@ -21961,7 +23076,7 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
21961
23076
  };
21962
23077
  }
21963
23078
  });
21964
- const XTreeNode = utils.withInstall(_sfc_main$c);
23079
+ const XTreeNode = utils.withInstall(_sfc_main$d);
21965
23080
  const useExpandAnimation = (renderNodesRef, renderStartRef, props) => {
21966
23081
  const expandAnimationStart = vue.ref(false);
21967
23082
  const expandAnimationReady = vue.ref(false);
@@ -23411,7 +24526,7 @@ const pickReadonly = (obj, ...keys) => {
23411
24526
  });
23412
24527
  return picked;
23413
24528
  };
23414
- const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
24529
+ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
23415
24530
  ...{
23416
24531
  name: "VTree",
23417
24532
  inheritAttrs: false
@@ -23717,7 +24832,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
23717
24832
  });
23718
24833
  useIframeResize(updateRender);
23719
24834
  const treeNodePropKeys = ["titleField", "keyField", "checkable", "selectable", "unselectOnClick", "disableAll", "draggable", "droppable", "render", "nodeIndent", "showLine", "showLeftArrow", "showRightArrow"];
23720
- const treeNodeProps = vue.reactive(pickReadonly(vue.toRefs(props), ...treeNodePropKeys));
24835
+ const treeNodeProps2 = vue.reactive(pickReadonly(vue.toRefs(props), ...treeNodePropKeys));
23721
24836
  __expose({
23722
24837
  setData,
23723
24838
  setChecked,
@@ -23774,7 +24889,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
23774
24889
  style: vue.normalizeStyle({ height: `${vue.unref(topSpaceHeight)}px` })
23775
24890
  }, null, 4),
23776
24891
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(expandAnimation).ready.value ? vue.unref(expandAnimation).topNodes.value : vue.unref(renderNodes), (node) => {
23777
- return vue.openBlock(), vue.createBlock(vue.unref(XTreeNode), vue.mergeProps({ ref_for: true }, treeNodeProps, {
24892
+ return vue.openBlock(), vue.createBlock(vue.unref(XTreeNode), vue.mergeProps({ ref_for: true }, treeNodeProps2, {
23778
24893
  key: node[__props.keyField],
23779
24894
  data: node,
23780
24895
  "get-node": vue.unref(getNode),
@@ -23809,7 +24924,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
23809
24924
  class: vue.normalizeClass(vue.unref(transitionWrapperInnerCls))
23810
24925
  }, [
23811
24926
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(expandAnimation).middleNodes.value, (node) => {
23812
- return vue.openBlock(), vue.createBlock(vue.unref(XTreeNode), vue.mergeProps({ ref_for: true }, treeNodeProps, {
24927
+ return vue.openBlock(), vue.createBlock(vue.unref(XTreeNode), vue.mergeProps({ ref_for: true }, treeNodeProps2, {
23813
24928
  key: node[__props.keyField],
23814
24929
  data: node,
23815
24930
  "get-node": vue.unref(getNode),
@@ -23838,7 +24953,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
23838
24953
  _: 3
23839
24954
  }, 8, ["onAfterEnter", "onAfterLeave"]),
23840
24955
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(expandAnimation).bottomNodes.value, (node) => {
23841
- return vue.openBlock(), vue.createBlock(vue.unref(XTreeNode), vue.mergeProps({ ref_for: true }, treeNodeProps, {
24956
+ return vue.openBlock(), vue.createBlock(vue.unref(XTreeNode), vue.mergeProps({ ref_for: true }, treeNodeProps2, {
23842
24957
  key: node[__props.keyField],
23843
24958
  data: node,
23844
24959
  "get-node": vue.unref(getNode),
@@ -23900,7 +25015,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
23900
25015
  };
23901
25016
  }
23902
25017
  });
23903
- const XTree = utils.withInstall(_sfc_main$b);
25018
+ const XTree = utils.withInstall(_sfc_main$c);
23904
25019
  const useTreeSearchCls = (props, options) => {
23905
25020
  const { checkAllStatus, isShowingChecked } = options;
23906
25021
  const { b } = useNamespace("tree-search");
@@ -23986,7 +25101,7 @@ const DEFAULT_TREE_SEARCH_PROPS = {
23986
25101
  };
23987
25102
  const TREE_SEARCH_EVENTS = ["search", ...TREE_EVENTS];
23988
25103
  const _hoisted_1$1 = ["placeholder", "disabled"];
23989
- const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
25104
+ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
23990
25105
  ...{
23991
25106
  name: "VTreeSearch",
23992
25107
  inheritAttrs: false
@@ -24296,7 +25411,7 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
24296
25411
  };
24297
25412
  }
24298
25413
  });
24299
- const XTreeSearch = utils.withInstall(_sfc_main$a);
25414
+ const XTreeSearch = utils.withInstall(_sfc_main$b);
24300
25415
  const useTreeDropCls = (props, options) => {
24301
25416
  const { dropdownVisible, checkedCount, selectedTitle } = options;
24302
25417
  const { b } = useNamespace("tree-drop");
@@ -24368,7 +25483,7 @@ const DEFAULT_TREE_DROP_PROPS = {
24368
25483
  };
24369
25484
  const TREE_SEARCH_API_METHODS = [...TREE_API_METHODS, "clearKeyword", "getKeyword", "search"];
24370
25485
  const TREE_DROP_EVENTS = ["clear", "dropdown-visible-change", ...TREE_SEARCH_EVENTS];
24371
- const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
25486
+ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
24372
25487
  ...{
24373
25488
  name: "VTreeDrop",
24374
25489
  inheritAttrs: false
@@ -24733,7 +25848,7 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
24733
25848
  };
24734
25849
  }
24735
25850
  });
24736
- const XTreeDrop = utils.withInstall(_sfc_main$9);
25851
+ const XTreeDrop = utils.withInstall(_sfc_main$a);
24737
25852
  const components = [
24738
25853
  XConfigProvider,
24739
25854
  XBasicSvgIcon,
@@ -24758,8 +25873,8 @@ const components = [
24758
25873
  XBasicSubPanel,
24759
25874
  XBasicRow,
24760
25875
  XBasicCol,
25876
+ XBasicJsonViewer,
24761
25877
  XTree,
24762
- XTreeNode,
24763
25878
  XTreeSearch,
24764
25879
  XTreeDrop,
24765
25880
  XBasicViewBar,
@@ -24797,7 +25912,7 @@ const makeInstaller = (components2 = []) => {
24797
25912
  };
24798
25913
  };
24799
25914
  const installer = makeInstaller([...components]);
24800
- const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
25915
+ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
24801
25916
  __name: "BasicButtonCreate",
24802
25917
  emits: ["click"],
24803
25918
  setup(__props, { emit: __emit }) {
@@ -24822,7 +25937,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
24822
25937
  };
24823
25938
  }
24824
25939
  });
24825
- const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
25940
+ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
24826
25941
  __name: "BasicButtonDelete",
24827
25942
  emits: ["click"],
24828
25943
  setup(__props, { emit: __emit }) {
@@ -24847,7 +25962,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
24847
25962
  };
24848
25963
  }
24849
25964
  });
24850
- const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
25965
+ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
24851
25966
  __name: "BasicButtonEdit",
24852
25967
  emits: ["click"],
24853
25968
  setup(__props, { emit: __emit }) {
@@ -24872,7 +25987,7 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
24872
25987
  };
24873
25988
  }
24874
25989
  });
24875
- const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
25990
+ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
24876
25991
  __name: "BasicButtonExport",
24877
25992
  props: {
24878
25993
  href: {},
@@ -24924,7 +26039,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
24924
26039
  }
24925
26040
  });
24926
26041
  const _hoisted_1 = ["multiple", "name", "accept"];
24927
- const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
26042
+ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
24928
26043
  __name: "BasicButtonImport",
24929
26044
  props: {
24930
26045
  name: { default: "file" },
@@ -25015,8 +26130,8 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
25015
26130
  };
25016
26131
  }
25017
26132
  });
25018
- const BasicButtonImport = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-826acb65"]]);
25019
- const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
26133
+ const BasicButtonImport = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-826acb65"]]);
26134
+ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
25020
26135
  __name: "BasicButtonPrint",
25021
26136
  emits: ["click"],
25022
26137
  setup(__props, { emit: __emit }) {
@@ -25041,13 +26156,13 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
25041
26156
  };
25042
26157
  }
25043
26158
  });
25044
- const XBasicButtonCreate = utils.withInstall(_sfc_main$8);
25045
- const XBasicButtonEdit = utils.withInstall(_sfc_main$6);
25046
- const XBasicButtonDelete = utils.withInstall(_sfc_main$7);
25047
- const XBasicButtonExport = utils.withInstall(_sfc_main$5);
26159
+ const XBasicButtonCreate = utils.withInstall(_sfc_main$9);
26160
+ const XBasicButtonEdit = utils.withInstall(_sfc_main$7);
26161
+ const XBasicButtonDelete = utils.withInstall(_sfc_main$8);
26162
+ const XBasicButtonExport = utils.withInstall(_sfc_main$6);
25048
26163
  const XBasicButtonImport = utils.withInstall(BasicButtonImport);
25049
- const XBasicButtonPrint = utils.withInstall(_sfc_main$3);
25050
- const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
26164
+ const XBasicButtonPrint = utils.withInstall(_sfc_main$4);
26165
+ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
25051
26166
  __name: "BasicDrawerFooter",
25052
26167
  props: {
25053
26168
  showDeleteButton: { type: Boolean, default: false },
@@ -25124,8 +26239,8 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
25124
26239
  };
25125
26240
  }
25126
26241
  });
25127
- const XBasicDrawerFooter = utils.withInstall(_sfc_main$2);
25128
- const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
26242
+ const XBasicDrawerFooter = utils.withInstall(_sfc_main$3);
26243
+ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
25129
26244
  __name: "BasicMasterTrigger",
25130
26245
  props: {
25131
26246
  value: {},
@@ -25189,8 +26304,8 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
25189
26304
  };
25190
26305
  }
25191
26306
  });
25192
- const XBasicMasterTrigger = utils.withInstall(_sfc_main$1);
25193
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
26307
+ const XBasicMasterTrigger = utils.withInstall(_sfc_main$2);
26308
+ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
25194
26309
  __name: "BasicPanelPage",
25195
26310
  props: {
25196
26311
  autoContentHeight: { type: Boolean, default: true }
@@ -25261,7 +26376,142 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
25261
26376
  };
25262
26377
  }
25263
26378
  });
25264
- const XBasicPanelPage = utils.withInstall(_sfc_main);
26379
+ const XBasicPanelPage = utils.withInstall(_sfc_main$1);
26380
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
26381
+ __name: "BasicTriggerButton",
26382
+ props: {
26383
+ size: {},
26384
+ type: { default: "primary" },
26385
+ icon: {},
26386
+ color: {},
26387
+ textColor: {},
26388
+ text: { type: Boolean },
26389
+ block: { type: Boolean },
26390
+ loading: { type: Boolean },
26391
+ disabled: { type: Boolean },
26392
+ circle: { type: Boolean },
26393
+ ghost: { type: Boolean },
26394
+ round: { type: Boolean },
26395
+ secondary: { type: Boolean },
26396
+ tertiary: { type: Boolean },
26397
+ quaternary: { type: Boolean },
26398
+ strong: { type: Boolean },
26399
+ focusable: { type: Boolean },
26400
+ keyboard: { type: Boolean },
26401
+ tag: {},
26402
+ dashed: { type: Boolean },
26403
+ renderIcon: {},
26404
+ iconPlacement: {},
26405
+ attrType: {},
26406
+ bordered: { type: Boolean },
26407
+ onClick: {},
26408
+ nativeFocusBehavior: { type: Boolean },
26409
+ field: {},
26410
+ validate: {},
26411
+ confirm: {},
26412
+ cancel: {},
26413
+ message: {},
26414
+ messageBoxProps: {},
26415
+ buttonProps: {}
26416
+ },
26417
+ setup(__props) {
26418
+ const props = __props;
26419
+ const { b } = useNamespace("basic-trigger-button");
26420
+ const { t } = useLocale();
26421
+ function basicButtonHandler2() {
26422
+ var _a;
26423
+ if (props.message) {
26424
+ XBasicMessageBox.confirm(props.message, {
26425
+ type: "info",
26426
+ title: t("max.messagebox.alert"),
26427
+ confirmButtonText: t("max.button.confirm"),
26428
+ cancelButtonText: t("max.button.cancel"),
26429
+ ...props.messageBoxProps || {},
26430
+ callback: (action) => {
26431
+ var _a2, _b, _c;
26432
+ if (action === "confirm") {
26433
+ (_a2 = props.confirm) == null ? void 0 : _a2.call(props, { field: props.field, schema: props, type: "confirm" });
26434
+ } else if (action === "cancel") {
26435
+ (_b = props.cancel) == null ? void 0 : _b.call(props, { field: props.field, schema: props, type: "cancel" });
26436
+ } else {
26437
+ (_c = props.cancel) == null ? void 0 : _c.call(props, { field: props.field, schema: props, type: "close" });
26438
+ }
26439
+ }
26440
+ });
26441
+ } else {
26442
+ (_a = props.confirm) == null ? void 0 : _a.call(props, { field: props.field, schema: props, type: "confirm" });
26443
+ }
26444
+ }
26445
+ function onClickHandler() {
26446
+ if (!props.validate) {
26447
+ basicButtonHandler2();
26448
+ return;
26449
+ }
26450
+ const interceptor = props.validate({ field: props.field, schema: props });
26451
+ if (interceptor instanceof Promise) {
26452
+ interceptor.then((res) => {
26453
+ if (res) {
26454
+ basicButtonHandler2();
26455
+ }
26456
+ });
26457
+ } else if (interceptor) {
26458
+ basicButtonHandler2();
26459
+ }
26460
+ }
26461
+ return (_ctx, _cache) => {
26462
+ return vue.openBlock(), vue.createBlock(vue.unref(XBasicButton), vue.mergeProps(props, {
26463
+ class: vue.unref(b)(),
26464
+ onClick: onClickHandler
26465
+ }), {
26466
+ default: vue.withCtx(() => [
26467
+ vue.renderSlot(_ctx.$slots, "default")
26468
+ ]),
26469
+ _: 3
26470
+ }, 16, ["class"]);
26471
+ };
26472
+ }
26473
+ });
26474
+ const XBasicTriggerButton = utils.withInstall(_sfc_main);
26475
+ function basicButtonHandler(schema) {
26476
+ var _a;
26477
+ if (schema.message) {
26478
+ XBasicMessageBox.confirm(schema.message, {
26479
+ type: "info",
26480
+ title: "提示",
26481
+ confirmButtonText: "确定",
26482
+ cancelButtonText: "取消",
26483
+ ...schema.messageBoxProps || {},
26484
+ callback: (action) => {
26485
+ var _a2, _b, _c;
26486
+ if (action === "confirm") {
26487
+ (_a2 = schema.confirm) == null ? void 0 : _a2.call(schema, { field: schema.field, schema, type: "confirm" });
26488
+ } else if (action === "cancel") {
26489
+ (_b = schema.cancel) == null ? void 0 : _b.call(schema, { field: schema.field, schema, type: "cancel" });
26490
+ } else {
26491
+ (_c = schema.cancel) == null ? void 0 : _c.call(schema, { field: schema.field, schema, type: "close" });
26492
+ }
26493
+ }
26494
+ });
26495
+ } else {
26496
+ (_a = schema.confirm) == null ? void 0 : _a.call(schema, { field: schema.field, schema, type: "confirm" });
26497
+ }
26498
+ }
26499
+ function basicButtonClickTrigger(schema) {
26500
+ if (!schema.validate) {
26501
+ basicButtonHandler(schema);
26502
+ return;
26503
+ }
26504
+ const interceptor = schema.validate({ field: schema.field, schema });
26505
+ if (interceptor instanceof Promise) {
26506
+ interceptor.then((res) => {
26507
+ if (res) {
26508
+ basicButtonHandler(schema);
26509
+ }
26510
+ });
26511
+ } else if (interceptor) {
26512
+ basicButtonHandler(schema);
26513
+ }
26514
+ }
25265
26515
  const install = installer.install;
25266
26516
  Object.defineProperty(exports, "UIGlobal", {
25267
26517
  enumerable: true,
@@ -25324,6 +26574,7 @@ exports.XBasicHelp = XBasicHelp;
25324
26574
  exports.XBasicHidden = XBasicHidden;
25325
26575
  exports.XBasicIconOnline = XBasicIconOnline;
25326
26576
  exports.XBasicIconPicker = XBasicIconPicker;
26577
+ exports.XBasicJsonViewer = XBasicJsonViewer;
25327
26578
  exports.XBasicListPage = XBasicListPage;
25328
26579
  exports.XBasicLoading = XBasicLoading;
25329
26580
  exports.XBasicLoadingDirective = vLoading;
@@ -25348,6 +26599,7 @@ exports.XBasicTable = XBasicTable;
25348
26599
  exports.XBasicTag = XBasicTag;
25349
26600
  exports.XBasicText = XBasicText;
25350
26601
  exports.XBasicTitle = XBasicTitle;
26602
+ exports.XBasicTriggerButton = XBasicTriggerButton;
25351
26603
  exports.XBasicUpload = XBasicUpload;
25352
26604
  exports.XBasicUploadDragger = XBasicUploadDragger;
25353
26605
  exports.XBasicViewBar = XBasicViewBar;
@@ -25357,6 +26609,8 @@ exports.XTreeDrop = XTreeDrop;
25357
26609
  exports.XTreeNode = XTreeNode;
25358
26610
  exports.XTreeSearch = XTreeSearch;
25359
26611
  exports.ZINDEX_INJECTION_KEY = ZINDEX_INJECTION_KEY;
26612
+ exports.basicButtonClickTrigger = basicButtonClickTrigger;
26613
+ exports.basicButtonHandler = basicButtonHandler;
25360
26614
  exports.basicCascaderProps = basicCascaderProps;
25361
26615
  exports.basicCheckboxGroupProps = basicCheckboxGroupProps;
25362
26616
  exports.basicCheckboxProps = basicCheckboxProps;
@@ -25366,6 +26620,7 @@ exports.basicFontIconProps = basicFontIconProps;
25366
26620
  exports.basicGradientTitleProps = basicGradientTitleProps;
25367
26621
  exports.basicHelpProps = basicHelpProps;
25368
26622
  exports.basicIconOnlineProps = basicIconOnlineProps;
26623
+ exports.basicJsonViewerProps = basicJsonViewerProps;
25369
26624
  exports.basicMessageBoxProps = basicMessageBoxProps;
25370
26625
  exports.basicModalProps = basicModalProps;
25371
26626
  exports.basicRadioGroupProps = basicRadioGroupProps;
@@ -25388,6 +26643,8 @@ exports.provideGlobalConfig = provideGlobalConfig;
25388
26643
  exports.responsiveArray = responsiveArray;
25389
26644
  exports.setTableGlobalFormat = setTableGlobalFormat;
25390
26645
  exports.setVxeTableTheme = setVxeTableTheme;
26646
+ exports.treeNodeProps = treeNodeProps;
26647
+ exports.treeNodePropsPass = treeNodePropsPass$1;
25391
26648
  exports.useBasicDrawerModal = useBasicDrawerModal;
25392
26649
  exports.useComponentRegister = useComponentRegister;
25393
26650
  exports.useConfigProvider = useConfigProvider;