aibox-custom-component-packages 0.0.7 → 0.0.8

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 (182) hide show
  1. package/es/AddOrEditSupplierDialog.mjs +309 -259
  2. package/es/ApplicationTypeTag.mjs +14 -14
  3. package/es/AuthSection.mjs +11 -11
  4. package/es/AutoShowTooltip.mjs +1 -1
  5. package/es/AvailableRangePreview.mjs +1 -1
  6. package/es/AvailableRangeSetting.mjs +9 -5
  7. package/es/CodeView.mjs +1 -1
  8. package/es/CommonTagsList.mjs +5 -5
  9. package/es/CreateMcpForm.mjs +13 -12
  10. package/es/CustomSidebar.mjs +159 -154
  11. package/es/CustomTitle.mjs +1 -1
  12. package/es/CustomToggle.mjs +131 -77
  13. package/es/DocSyncSelect.mjs +2661 -0
  14. package/es/FileDisplay.mjs +2 -4
  15. package/es/FilePreview.mjs +16 -16
  16. package/es/FileUploader.mjs +71 -74
  17. package/es/Logo.mjs +72 -0
  18. package/es/McpFormDialog.mjs +1 -1
  19. package/es/McpParamsSet.mjs +34 -34
  20. package/es/MdEditor.mjs +2 -2
  21. package/es/PageContainer.mjs +438 -216
  22. package/es/ParameterTable.mjs +23 -21
  23. package/es/PublishRecord.mjs +58 -57
  24. package/es/RadioGroup.mjs +1 -1
  25. package/es/SourcePublish.mjs +95 -93
  26. package/es/Table.mjs +2 -2
  27. package/es/assets/AddOrEditSupplierDialog.css +1 -1
  28. package/es/assets/AiboxTable.css +1 -1
  29. package/es/assets/ApplicationTypeTag.css +1 -1
  30. package/es/assets/AuthSection.css +1 -1
  31. package/es/assets/AutoShowTooltip.css +1 -1
  32. package/es/assets/CommonTagsList.css +1 -1
  33. package/es/assets/CreateMcpForm.css +1 -1
  34. package/es/assets/CustomSidebar.css +1 -1
  35. package/es/assets/CustomToggle.css +1 -1
  36. package/es/assets/DocSyncSelect.css +1 -0
  37. package/es/assets/FilePreview.css +1 -1
  38. package/es/assets/Logo.css +1 -0
  39. package/es/assets/McpParamsSet.css +1 -1
  40. package/es/assets/MdEditor.css +1 -1
  41. package/es/assets/PageContainer.css +1 -1
  42. package/es/assets/ParameterTable.css +1 -1
  43. package/es/assets/PublishRecord.css +1 -1
  44. package/es/assets/RadioGroup.css +1 -1
  45. package/es/assets/SourcePublish.css +1 -1
  46. package/es/assets/index.css +1 -1
  47. package/es/assets/index2.css +1 -1
  48. package/es/assets/index3.css +1 -1
  49. package/es/assets/index4.css +1 -1
  50. package/es/assets/layout.css +1 -1
  51. package/es/chunks/{BackBar.B5Er8ZdJ.js → AiboxTable.CF4T_OCu.js} +122 -122
  52. package/es/chunks/enums.WrpwbF4w.js +14 -0
  53. package/es/chunks/index.BDd6hHiU.js +172 -0
  54. package/es/chunks/{index.CLyfh6p1.js → index.CF_YHLP5.js} +16 -16
  55. package/es/chunks/index.DdD1VsH1.js +396 -0
  56. package/es/chunks/index.Dx-mCS4E.js +1298 -0
  57. package/es/chunks/layout.CygCXa6s.js +26 -0
  58. package/es/chunks/{usePreview.C36fNlVd.js → usePreview.BHvXwaNi.js} +82 -78
  59. package/es/index.mjs +409 -325
  60. package/index.css +1 -1
  61. package/lib/AddOrEditSupplierDialog.js +1 -1
  62. package/lib/ApplicationTypeTag.js +1 -1
  63. package/lib/AuthSection.js +1 -1
  64. package/lib/AutoShowTooltip.js +1 -1
  65. package/lib/AvailableRangePreview.js +1 -1
  66. package/lib/AvailableRangeSetting.js +1 -1
  67. package/lib/CodeView.js +1 -1
  68. package/lib/CommonTagsList.js +1 -1
  69. package/lib/CreateMcpForm.js +1 -1
  70. package/lib/CustomSidebar.js +1 -1
  71. package/lib/CustomTitle.js +1 -1
  72. package/lib/CustomToggle.js +1 -1
  73. package/lib/DocSyncSelect.js +2 -0
  74. package/lib/FileDisplay.js +1 -1
  75. package/lib/FilePreview.js +1 -1
  76. package/lib/FileUploader.js +1 -1
  77. package/lib/Logo.js +1 -0
  78. package/lib/McpFormDialog.js +1 -1
  79. package/lib/McpParamsSet.js +1 -1
  80. package/lib/MdEditor.js +1 -1
  81. package/lib/PageContainer.js +1 -1
  82. package/lib/ParameterTable.js +1 -1
  83. package/lib/PublishRecord.js +2 -2
  84. package/lib/RadioGroup.js +1 -1
  85. package/lib/SourcePublish.js +1 -1
  86. package/lib/Table.js +1 -1
  87. package/lib/assets/AddOrEditSupplierDialog.css +1 -1
  88. package/lib/assets/AiboxTable.css +1 -1
  89. package/lib/assets/ApplicationTypeTag.css +1 -1
  90. package/lib/assets/AuthSection.css +1 -1
  91. package/lib/assets/AutoShowTooltip.css +1 -1
  92. package/lib/assets/CommonTagsList.css +1 -1
  93. package/lib/assets/CreateMcpForm.css +1 -1
  94. package/lib/assets/CustomSidebar.css +1 -1
  95. package/lib/assets/CustomToggle.css +1 -1
  96. package/lib/assets/DocSyncSelect.css +1 -0
  97. package/lib/assets/FilePreview.css +1 -1
  98. package/lib/assets/Logo.css +1 -0
  99. package/lib/assets/McpParamsSet.css +1 -1
  100. package/lib/assets/MdEditor.css +1 -1
  101. package/lib/assets/PageContainer.css +1 -1
  102. package/lib/assets/ParameterTable.css +1 -1
  103. package/lib/assets/PublishRecord.css +1 -1
  104. package/lib/assets/RadioGroup.css +1 -1
  105. package/lib/assets/SourcePublish.css +1 -1
  106. package/lib/assets/index.css +1 -1
  107. package/lib/assets/index2.css +1 -1
  108. package/lib/assets/index3.css +1 -1
  109. package/lib/assets/index4.css +1 -1
  110. package/lib/assets/layout.css +1 -1
  111. package/lib/chunks/AiboxTable.CJOPGJtU.js +1 -0
  112. package/lib/chunks/enums.DpU2er5r.js +1 -0
  113. package/lib/chunks/index.BNivYbtq.js +1 -0
  114. package/lib/chunks/{index.DME62Yfo.js → index.B_keI1Aq.js} +1 -1
  115. package/lib/chunks/index.C7aZx6RG.js +6 -0
  116. package/lib/chunks/index.CJFk1R2u.js +59 -0
  117. package/lib/chunks/layout.DbBSbLgm.js +1 -0
  118. package/lib/chunks/usePreview.BojIDW7Z.js +1 -0
  119. package/lib/index.js +2 -1
  120. package/package.json +2 -2
  121. package/es/ExampleComponent.mjs +0 -35
  122. package/es/assets/BackBar.css +0 -1
  123. package/es/assets/ExampleComponent.css +0 -1
  124. package/es/chunks/BackBar.Bc2NIuzk.js +0 -645
  125. package/es/chunks/BackBar.Cv1wxUcM.js +0 -645
  126. package/es/chunks/BackBar.DJV4JaUM.js +0 -645
  127. package/es/chunks/config.8htFF04x.js +0 -325
  128. package/es/chunks/config.BPp4hMBq.js +0 -325
  129. package/es/chunks/config.BU21Gda2.js +0 -49
  130. package/es/chunks/config.BzCGum_W.js +0 -49
  131. package/es/chunks/config.CFWGjEdA.js +0 -49
  132. package/es/chunks/config.CfWAdyUH.js +0 -325
  133. package/es/chunks/config.DTMcCH58.js +0 -325
  134. package/es/chunks/config.DqhQdkz7.js +0 -325
  135. package/es/chunks/enums.CfSBDD6u.js +0 -83
  136. package/es/chunks/enums.DuBbLcd-.js +0 -83
  137. package/es/chunks/i18n.DmqkiK-h.js +0 -444
  138. package/es/chunks/i18n.Vhq-tZPw.js +0 -94
  139. package/es/chunks/i18n.ro9yz7rE.js +0 -94
  140. package/es/chunks/index.BSA3IKSF.js +0 -111
  141. package/es/chunks/index.CgbxJCEU.js +0 -265
  142. package/es/chunks/index.CuDwuRO7.js +0 -265
  143. package/es/chunks/index.DB0ayMv8.js +0 -257
  144. package/es/chunks/index.DWR4lc30.js +0 -203
  145. package/es/chunks/index.GuEzdh6b.js +0 -257
  146. package/es/chunks/index.aMb6IVQD.js +0 -257
  147. package/es/chunks/index.ml5i7aB5.js +0 -257
  148. package/es/chunks/index.s-YxIOfq.js +0 -301
  149. package/es/chunks/index.uOZzvHrF.js +0 -135
  150. package/es/chunks/publish.BCb7nCo9.js +0 -50
  151. package/es/chunks/publish.D6friivo.js +0 -50
  152. package/es/chunks/publish.Dqzn7qEl.js +0 -50
  153. package/es/i18n.mjs +0 -17
  154. package/lib/ExampleComponent.js +0 -1
  155. package/lib/assets/BackBar.css +0 -1
  156. package/lib/assets/ExampleComponent.css +0 -1
  157. package/lib/chunks/BackBar.C8Xrc6qW.js +0 -1
  158. package/lib/chunks/BackBar.CZsNxoX1.js +0 -1
  159. package/lib/chunks/BackBar.s5_vN6jt.js +0 -1
  160. package/lib/chunks/config.B0XKkp1w.js +0 -1
  161. package/lib/chunks/config.BCAuBVxV.js +0 -1
  162. package/lib/chunks/config.Bs7sh3aP.js +0 -1
  163. package/lib/chunks/config.C1w4hgfw.js +0 -1
  164. package/lib/chunks/config.ClERt2RF.js +0 -1
  165. package/lib/chunks/enums.Dmq4PdUc.js +0 -1
  166. package/lib/chunks/i18n.CL5L6nx6.js +0 -1
  167. package/lib/chunks/i18n.aAXi5igh.js +0 -1
  168. package/lib/chunks/index.BNqTEn3K.js +0 -1
  169. package/lib/chunks/index.BZcSlgOO.js +0 -1
  170. package/lib/chunks/index.Bk-RwmaH.js +0 -1
  171. package/lib/chunks/index.BsN4urmi.js +0 -1
  172. package/lib/chunks/index.D7wBInWr.js +0 -1
  173. package/lib/chunks/index.DWohILMv.js +0 -1
  174. package/lib/chunks/index.LK2ulXTE.js +0 -1
  175. package/lib/chunks/index.qDAoOzk9.js +0 -1
  176. package/lib/chunks/index.s8vGOJKG.js +0 -1
  177. package/lib/chunks/publish.Bw1acrSu.js +0 -1
  178. package/lib/chunks/publish.CA1uSVnm.js +0 -1
  179. package/lib/chunks/usePreview.E5SeS2uw.js +0 -1
  180. package/lib/i18n.js +0 -1
  181. /package/es/assets/{index6.css → legacy.css} +0 -0
  182. /package/lib/assets/{index6.css → legacy.css} +0 -0
@@ -1,10 +1,74 @@
1
- import { computed as T, createElementBlock as c, openBlock as o, Fragment as x, createVNode as w, renderList as N, createBlock as i, unref as n, withCtx as s, createTextVNode as z, toDisplayString as m, createElementVNode as h, normalizeClass as D, ref as H, createCommentVNode as B, renderSlot as b, createSlots as W, normalizeStyle as le, withModifiers as te } from "vue";
1
+ import { createElementBlock as c, openBlock as o, normalizeStyle as le, createElementVNode as h, renderSlot as b, createCommentVNode as B, createVNode as w, unref as n, withModifiers as te, withCtx as s, toDisplayString as m, computed as T, Fragment as _, renderList as N, createBlock as i, createTextVNode as A, normalizeClass as z, ref as H, createSlots as W } from "vue";
2
+ import { useRouter as ae } from "vue-router";
3
+ import { IconZuo as oe, IconTip as ne, IconMore as se } from "color-message-aibox-vue";
4
+ import { ElIcon as D, ElTooltip as re, ElButton as L, ElDropdown as de, ElDropdownMenu as ie, ElDropdownItem as ce, ElTable as ue, ElTableColumn as f, ElEmpty as he, ElPagination as pe } from "element-plus";
2
5
  import { u as I } from "./i18n.k9Q_HVMs.js";
3
- import { IconMore as ae, IconZuo as oe, IconTip as ne } from "color-message-aibox-vue";
4
- import { ElButton as L, ElDropdown as se, ElIcon as A, ElDropdownMenu as re, ElDropdownItem as de, ElTable as ie, ElTableColumn as f, ElEmpty as ce, ElPagination as ue, ElTooltip as he } from "element-plus";
5
6
  import { _ as F } from "./_plugin-vue_export-helper.CHgC5LLL.js";
6
- import { useRouter as pe } from "vue-router";
7
- import '../assets/BackBar.css';const fe = { class: "table-btns" }, be = { class: "btn-box" }, we = {
7
+ import '../assets/AiboxTable.css';const fe = { class: "back-bar__icon" }, be = {
8
+ key: 0,
9
+ class: "back-bar__title"
10
+ }, we = {
11
+ key: 1,
12
+ class: "back-bar__tip"
13
+ }, Ve = {
14
+ __name: "BackBar",
15
+ props: {
16
+ goBackFn: {
17
+ type: Function,
18
+ default: null
19
+ },
20
+ backBarStyle: {
21
+ type: String,
22
+ default: "#fff"
23
+ },
24
+ title: {
25
+ type: String,
26
+ default: ""
27
+ },
28
+ tipContent: {
29
+ type: String,
30
+ default: ""
31
+ }
32
+ },
33
+ setup(a) {
34
+ const k = a, $ = ae(), r = () => {
35
+ k.goBackFn ? k.goBackFn() : $.back();
36
+ };
37
+ return (y, C) => (o(), c("div", {
38
+ class: "back-bar",
39
+ style: le({ "background-color": a.backBarStyle })
40
+ }, [
41
+ h("div", fe, [
42
+ w(n(D), {
43
+ onClick: te(r, ["stop"])
44
+ }, {
45
+ default: s(() => [
46
+ w(n(oe))
47
+ ]),
48
+ _: 1
49
+ })
50
+ ]),
51
+ b(y.$slots, "default"),
52
+ a.title ? (o(), c("div", be, m(a.title), 1)) : B("", !0),
53
+ a.tipContent ? (o(), c("div", we, [
54
+ w(n(re), {
55
+ content: a.tipContent,
56
+ placement: "right"
57
+ }, {
58
+ default: s(() => [
59
+ w(n(D), { size: "14" }, {
60
+ default: s(() => [
61
+ w(n(ne))
62
+ ]),
63
+ _: 1
64
+ })
65
+ ]),
66
+ _: 1
67
+ }, 8, ["content"])
68
+ ])) : B("", !0)
69
+ ], 4));
70
+ }
71
+ }, ye = { class: "table-btns" }, ge = { class: "btn-box" }, ke = {
8
72
  __name: "TableBtns",
9
73
  props: {
10
74
  config: {
@@ -27,45 +91,45 @@ import '../assets/BackBar.css';const fe = { class: "table-btns" }, be = { class:
27
91
  }
28
92
  },
29
93
  setup(a) {
30
- const k = a, { t: $ } = I(), r = (p, _) => {
31
- p && p(_);
94
+ const k = a, { t: $ } = I(), r = (p, x) => {
95
+ p && p(x);
32
96
  }, y = T(() => k.config.filter((p) => {
33
- const _ = p.permission !== void 0 ? p.permission : !0;
97
+ const x = p.permission !== void 0 ? p.permission : !0;
34
98
  let d = !0;
35
- return p.dataPermission && (d = p.dataPermission), _ && d;
99
+ return p.dataPermission && (d = p.dataPermission), x && d;
36
100
  })), C = T(() => ({
37
101
  show: y.value.slice(0, k.showNums),
38
102
  hide: y.value.slice(k.showNums)
39
103
  }));
40
- return (p, _) => (o(), c("div", fe, [
41
- y.value.length > a.showNums ? (o(), c(x, { key: 0 }, [
42
- (o(!0), c(x, null, N(C.value.show, (d, v) => (o(), i(n(L), {
104
+ return (p, x) => (o(), c("div", ye, [
105
+ y.value.length > a.showNums ? (o(), c(_, { key: 0 }, [
106
+ (o(!0), c(_, null, N(C.value.show, (d, v) => (o(), i(n(L), {
43
107
  key: v,
44
108
  type: "primary",
45
109
  link: "",
46
110
  onClick: (M) => r(d.fn, d.row)
47
111
  }, {
48
112
  default: s(() => [
49
- z(m(d.label), 1)
113
+ A(m(d.label), 1)
50
114
  ]),
51
115
  _: 2
52
116
  }, 1032, ["onClick"]))), 128)),
53
- w(n(se), {
117
+ w(n(de), {
54
118
  "popper-class": "custom-dropdown",
55
119
  trigger: "click"
56
120
  }, {
57
121
  dropdown: s(() => [
58
- w(n(re), { style: { padding: "14px 0" } }, {
122
+ w(n(ie), { style: { padding: "14px 0" } }, {
59
123
  default: s(() => [
60
- (o(!0), c(x, null, N(C.value.hide, (d, v) => (o(), i(n(de), {
124
+ (o(!0), c(_, null, N(C.value.hide, (d, v) => (o(), i(n(ce), {
61
125
  key: v,
62
- class: D({
126
+ class: z({
63
127
  "is-delete": d.label === n($)("COMMON_BUTTON.DELETE_TEXT") || d.label === n($)("COMMON_BUTTON.DISABLE_TEXT") || d.isDanger
64
128
  }),
65
129
  onClick: (M) => r(d.fn, d.row)
66
130
  }, {
67
131
  default: s(() => [
68
- z(m(d.label), 1)
132
+ A(m(d.label), 1)
69
133
  ]),
70
134
  _: 2
71
135
  }, 1032, ["class", "onClick"]))), 128))
@@ -74,10 +138,10 @@ import '../assets/BackBar.css';const fe = { class: "table-btns" }, be = { class:
74
138
  })
75
139
  ]),
76
140
  default: s(() => [
77
- h("div", be, [
78
- w(n(A), { style: { "font-size": "20px", color: "#999" } }, {
141
+ h("div", ge, [
142
+ w(n(D), { style: { "font-size": "20px", color: "#999" } }, {
79
143
  default: s(() => [
80
- w(n(ae))
144
+ w(n(se))
81
145
  ]),
82
146
  _: 1
83
147
  })
@@ -85,26 +149,26 @@ import '../assets/BackBar.css';const fe = { class: "table-btns" }, be = { class:
85
149
  ]),
86
150
  _: 1
87
151
  })
88
- ], 64)) : (o(!0), c(x, { key: 1 }, N(y.value, (d, v) => (o(), i(n(L), {
152
+ ], 64)) : (o(!0), c(_, { key: 1 }, N(y.value, (d, v) => (o(), i(n(L), {
89
153
  type: "primary",
90
154
  link: "",
91
155
  key: v,
92
156
  onClick: (M) => r(d.fn, d.row)
93
157
  }, {
94
158
  default: s(() => [
95
- z(m(d.label), 1)
159
+ A(m(d.label), 1)
96
160
  ]),
97
161
  _: 2
98
162
  }, 1032, ["onClick"]))), 128))
99
163
  ]));
100
164
  }
101
- }, ye = /* @__PURE__ */ F(we, [["__scopeId", "data-v-a15d8f7e"]]), ge = {
165
+ }, Ce = /* @__PURE__ */ F(ke, [["__scopeId", "data-v-552341e3"]]), xe = {
102
166
  key: 0,
103
167
  class: "aibox-table__handle"
104
- }, ke = { class: "handle-left" }, Ce = { class: "handle-right" }, _e = { class: "aibox-table__content" }, xe = { key: 0 }, ve = { class: "aibox-table__slot-wrapper" }, Se = { class: "aibox-table__slot-wrapper" }, Te = ["innerHTML"], me = ["innerHTML"], $e = { class: "aibox-table__slot-wrapper" }, Be = ["onClick"], Ne = { class: "aibox-table__slot-wrapper" }, Me = ["onClick"], Ee = { class: "aibox-table__slot-wrapper" }, ze = { class: "flex items-center" }, De = { class: "aibox-table__slot-wrapper" }, Ae = {
168
+ }, _e = { class: "handle-left" }, ve = { class: "handle-right" }, Se = { class: "aibox-table__content" }, Te = { key: 0 }, me = { class: "aibox-table__slot-wrapper" }, $e = { class: "aibox-table__slot-wrapper" }, Be = ["innerHTML"], Ne = ["innerHTML"], Me = { class: "aibox-table__slot-wrapper" }, Ee = ["onClick"], Ae = { class: "aibox-table__slot-wrapper" }, ze = ["onClick"], De = { class: "aibox-table__slot-wrapper" }, Oe = { class: "flex items-center" }, Pe = { class: "aibox-table__slot-wrapper" }, Re = {
105
169
  key: 0,
106
170
  class: "aibox-table__slot-wrapper"
107
- }, Oe = {
171
+ }, He = {
108
172
  __name: "AiboxTable",
109
173
  props: {
110
174
  columns: {
@@ -229,7 +293,7 @@ import '../assets/BackBar.css';const fe = { class: "table-btns" }, be = { class:
229
293
  "onRowClick"
230
294
  ],
231
295
  setup(a, { expose: k, emit: $ }) {
232
- const r = a, { t: y } = I(), C = H(null), p = H([]), _ = T(() => typeof r.total == "string" ? Number(r.total) : r.total), d = T(() => r.showChangeSize ? "total, sizes, prev, pager, next, jumper" : "total, prev, pager, next, jumper"), v = T(() => _.value > 10 && r.hasPage), M = T(() => r.columns?.find?.((u) => u?.type === "selection")?.selectable || O), j = T(() => {
296
+ const r = a, { t: y } = I(), C = H(null), p = H([]), x = T(() => typeof r.total == "string" ? Number(r.total) : r.total), d = T(() => r.showChangeSize ? "total, sizes, prev, pager, next, jumper" : "total, prev, pager, next, jumper"), v = T(() => x.value > 10 && r.hasPage), M = T(() => r.columns?.find?.((u) => u?.type === "selection")?.selectable || O), j = T(() => {
233
297
  const t = r.data || [];
234
298
  if (!t.length) return !1;
235
299
  const u = M.value;
@@ -269,21 +333,21 @@ import '../assets/BackBar.css';const fe = { class: "table-btns" }, be = { class:
269
333
  handleToggleRowSelection: E,
270
334
  clearSort: Y
271
335
  }), (t, u) => (o(), c("div", {
272
- class: D([{
336
+ class: z([{
273
337
  "row-click-style": a.isCanRowClick,
274
338
  "no-pagination": !v.value
275
339
  }, "aibox-table"])
276
340
  }, [
277
- a.hasHeaderHandle ? (o(), c("div", ge, [
278
- h("div", ke, [
341
+ a.hasHeaderHandle ? (o(), c("div", xe, [
342
+ h("div", _e, [
279
343
  b(t.$slots, "handleLeft", {}, void 0, !0)
280
344
  ]),
281
- h("div", Ce, [
345
+ h("div", ve, [
282
346
  b(t.$slots, "handleRight", {}, void 0, !0)
283
347
  ])
284
348
  ])) : B("", !0),
285
- h("div", _e, [
286
- w(n(ie), {
349
+ h("div", Se, [
350
+ w(n(ue), {
287
351
  ref_key: "aiboxTable",
288
352
  ref: C,
289
353
  "element-loading-text": n(y)("COMMON_DATA.LOADING_SUFFIX"),
@@ -310,16 +374,16 @@ import '../assets/BackBar.css';const fe = { class: "table-btns" }, be = { class:
310
374
  "default-expand-all": a.defaultExpandAll
311
375
  }, {
312
376
  empty: s(() => [
313
- a.isCustomEmpty ? (o(), c("div", Ae, [
377
+ a.isCustomEmpty ? (o(), c("div", Re, [
314
378
  b(t.$slots, "customEmpty", {}, void 0, !0)
315
- ])) : (o(), i(n(ce), {
379
+ ])) : (o(), i(n(he), {
316
380
  key: 1,
317
381
  description: n(y)("COMMON_DATA.EMPTY"),
318
382
  "image-size": 80
319
383
  }, null, 8, ["description"]))
320
384
  ]),
321
385
  default: s(() => [
322
- (o(!0), c(x, null, N(a.columns, (e) => (o(), c(x, null, [
386
+ (o(!0), c(_, null, N(a.columns, (e) => (o(), c(_, null, [
323
387
  e.type === "selection" ? (o(), i(n(f), {
324
388
  key: e.type,
325
389
  type: "selection",
@@ -335,7 +399,7 @@ import '../assets/BackBar.css';const fe = { class: "table-btns" }, be = { class:
335
399
  width: e.width || "100px"
336
400
  }, {
337
401
  default: s((l) => [
338
- a.isLoading ? B("", !0) : (o(), c("span", xe, m((a.pages.page - 1) * a.pages.size + l.$index + 1), 1))
402
+ a.isLoading ? B("", !0) : (o(), c("span", Te, m((a.pages.page - 1) * a.pages.size + l.$index + 1), 1))
339
403
  ]),
340
404
  _: 1
341
405
  }, 8, ["label", "width"])) : e.slot ? (o(), i(n(f), {
@@ -352,7 +416,7 @@ import '../assets/BackBar.css';const fe = { class: "table-btns" }, be = { class:
352
416
  "show-overflow-tooltip": e.showOverflowTooltip
353
417
  }, W({
354
418
  default: s((l) => [
355
- h("div", Se, [
419
+ h("div", $e, [
356
420
  b(t.$slots, e.slot, {
357
421
  row: l.row,
358
422
  index: l.$index,
@@ -365,7 +429,7 @@ import '../assets/BackBar.css';const fe = { class: "table-btns" }, be = { class:
365
429
  e.headerSlot ? {
366
430
  name: "header",
367
431
  fn: s(() => [
368
- h("div", ve, [
432
+ h("div", me, [
369
433
  b(t.$slots, e.headerSlot, {
370
434
  item: e,
371
435
  minWidth: e.minWidth
@@ -388,7 +452,7 @@ import '../assets/BackBar.css';const fe = { class: "table-btns" }, be = { class:
388
452
  default: s((l) => [
389
453
  h("span", {
390
454
  innerHTML: e.callback && e.callback(l.row)
391
- }, null, 8, Te)
455
+ }, null, 8, Be)
392
456
  ]),
393
457
  _: 2
394
458
  }, 1032, ["align", "prop", "label", "width", "min-width", "fixed", "sortable"])) : e.type === "multistage" ? (o(), i(n(f), {
@@ -402,7 +466,7 @@ import '../assets/BackBar.css';const fe = { class: "table-btns" }, be = { class:
402
466
  "header-align": e.headerAlign || "left"
403
467
  }, {
404
468
  default: s(() => [
405
- (o(!0), c(x, null, N(e.children, (l) => (o(), c(x, null, [
469
+ (o(!0), c(_, null, N(e.children, (l) => (o(), c(_, null, [
406
470
  l.callback ? (o(), i(n(f), {
407
471
  key: l.callback,
408
472
  prop: l.prop,
@@ -413,7 +477,7 @@ import '../assets/BackBar.css';const fe = { class: "table-btns" }, be = { class:
413
477
  default: s((S) => [
414
478
  h("span", {
415
479
  innerHTML: l.callback && l.callback(S.row)
416
- }, null, 8, me)
480
+ }, null, 8, Ne)
417
481
  ]),
418
482
  _: 2
419
483
  }, 1032, ["prop", "label", "min-width"])) : l.slot ? (o(), i(n(f), {
@@ -423,7 +487,7 @@ import '../assets/BackBar.css';const fe = { class: "table-btns" }, be = { class:
423
487
  label: l.label
424
488
  }, {
425
489
  default: s((S) => [
426
- h("div", $e, [
490
+ h("div", Me, [
427
491
  b(t.$slots, l.slot, {
428
492
  row: S.row,
429
493
  column: S.column,
@@ -443,10 +507,10 @@ import '../assets/BackBar.css';const fe = { class: "table-btns" }, be = { class:
443
507
  h("span", {
444
508
  onClick: () => l.headerClick({ parent: e.label, ...l }),
445
509
  style: { color: "#5b9bd1", cursor: "pointer" }
446
- }, m(l.label), 9, Be)
510
+ }, m(l.label), 9, Ee)
447
511
  ]),
448
512
  default: s((S) => [
449
- h("div", Ne, [
513
+ h("div", Ae, [
450
514
  b(t.$slots, "custom", {
451
515
  data: {
452
516
  col: { parent: e.label, ...l },
@@ -480,10 +544,10 @@ import '../assets/BackBar.css';const fe = { class: "table-btns" }, be = { class:
480
544
  h("span", {
481
545
  onClick: () => e.headerClick({ parent: "", ...e }),
482
546
  style: { color: "#5b9bd1", cursor: "pointer" }
483
- }, m(e.label), 9, Me)
547
+ }, m(e.label), 9, ze)
484
548
  ]),
485
549
  default: s((l) => [
486
- h("div", Ee, [
550
+ h("div", De, [
487
551
  b(t.$slots, "custom", {
488
552
  data: {
489
553
  col: { parent: "", ...e },
@@ -501,11 +565,11 @@ import '../assets/BackBar.css';const fe = { class: "table-btns" }, be = { class:
501
565
  fixed: "right"
502
566
  }, {
503
567
  default: s((l) => [
504
- h("div", ze, [
568
+ h("div", Oe, [
505
569
  b(t.$slots, "goto", {
506
570
  row: l.row
507
571
  }, void 0, !0),
508
- e?.config?.(l.row)?.length ? (o(), i(ye, {
572
+ e?.config?.(l.row)?.length ? (o(), i(Ce, {
509
573
  key: 0,
510
574
  "show-nums": a.showHandleNums,
511
575
  config: e.config(l.row, l.$index),
@@ -520,7 +584,7 @@ import '../assets/BackBar.css';const fe = { class: "table-btns" }, be = { class:
520
584
  width: e.width
521
585
  }, {
522
586
  default: s((l) => [
523
- h("div", De, [
587
+ h("div", Pe, [
524
588
  b(t.$slots, "expand", {
525
589
  row: l.row,
526
590
  column: l.column
@@ -555,16 +619,16 @@ import '../assets/BackBar.css';const fe = { class: "table-btns" }, be = { class:
555
619
  _: 3
556
620
  }, 8, ["element-loading-text", "tree-props", "header-row-class-name", "data", "border", "height", "default-sort", "span-method", "expand-row-keys", "show-summary", "summary-method", "default-expand-all"])
557
621
  ]),
558
- _.value > 10 && a.hasPage ? (o(), c("div", {
622
+ x.value > 10 && a.hasPage ? (o(), c("div", {
559
623
  key: 1,
560
- class: D([a.isPagePostion ? "aibox-table__pages" : "aibox-table__page"])
624
+ class: z([a.isPagePostion ? "aibox-table__pages" : "aibox-table__page"])
561
625
  }, [
562
- w(n(ue), {
626
+ w(n(pe), {
563
627
  layout: d.value,
564
628
  "current-page": a.pages.page,
565
629
  "page-sizes": [10, 20, 50, 100],
566
630
  "page-size": a.pages.size,
567
- total: _.value,
631
+ total: x.value,
568
632
  "pager-count": a.pagerCount,
569
633
  size: a.size,
570
634
  onSizeChange: G,
@@ -573,73 +637,9 @@ import '../assets/BackBar.css';const fe = { class: "table-btns" }, be = { class:
573
637
  ], 2)) : B("", !0)
574
638
  ], 2));
575
639
  }
576
- }, Ve = /* @__PURE__ */ F(Oe, [["__scopeId", "data-v-1e856800"]]), Pe = { class: "back-bar__icon" }, Re = {
577
- key: 0,
578
- class: "back-bar__title"
579
- }, He = {
580
- key: 1,
581
- class: "back-bar__tip"
582
- }, Xe = {
583
- __name: "BackBar",
584
- props: {
585
- goBackFn: {
586
- type: Function,
587
- default: null
588
- },
589
- backBarStyle: {
590
- type: String,
591
- default: "#fff"
592
- },
593
- title: {
594
- type: String,
595
- default: ""
596
- },
597
- tipContent: {
598
- type: String,
599
- default: ""
600
- }
601
- },
602
- setup(a) {
603
- const k = a, $ = pe(), r = () => {
604
- k.goBackFn ? k.goBackFn() : $.back();
605
- };
606
- return (y, C) => (o(), c("div", {
607
- class: "back-bar",
608
- style: le({ "background-color": a.backBarStyle })
609
- }, [
610
- h("div", Pe, [
611
- w(n(A), {
612
- onClick: te(r, ["stop"])
613
- }, {
614
- default: s(() => [
615
- w(n(oe))
616
- ]),
617
- _: 1
618
- })
619
- ]),
620
- b(y.$slots, "default"),
621
- a.title ? (o(), c("div", Re, m(a.title), 1)) : B("", !0),
622
- a.tipContent ? (o(), c("div", He, [
623
- w(n(he), {
624
- content: a.tipContent,
625
- placement: "right"
626
- }, {
627
- default: s(() => [
628
- w(n(A), { size: "14" }, {
629
- default: s(() => [
630
- w(n(ne))
631
- ]),
632
- _: 1
633
- })
634
- ]),
635
- _: 1
636
- }, 8, ["content"])
637
- ])) : B("", !0)
638
- ], 4));
639
- }
640
- };
640
+ }, Xe = /* @__PURE__ */ F(He, [["__scopeId", "data-v-1d0bcb93"]]);
641
641
  export {
642
- ye as T,
643
- Ve as _,
644
- Xe as a
642
+ Xe as A,
643
+ Ce as T,
644
+ Ve as _
645
645
  };
@@ -0,0 +1,14 @@
1
+ import "color-star-custom-components";
2
+ const a = {
3
+ 卡片: "Card",
4
+ 按钮: "Button",
5
+ 面板: "Panel",
6
+ 自定义: "Custom"
7
+ }, o = {
8
+ page: 1,
9
+ size: 10
10
+ };
11
+ export {
12
+ a as U,
13
+ o as p
14
+ };
@@ -0,0 +1,172 @@
1
+ import { ref as w, shallowRef as O, watch as B, onMounted as k, createElementBlock as A, openBlock as m, normalizeClass as N, createBlock as I, createCommentVNode as M, createVNode as u, unref as s, withCtx as y } from "vue";
2
+ import { ElMessage as g, ElIcon as P, ElScrollbar as b } from "element-plus";
3
+ import { Codemirror as L } from "vue-codemirror";
4
+ import { EditorView as h } from "@codemirror/view";
5
+ import { json as x } from "@codemirror/lang-json";
6
+ import { oneDark as V } from "@codemirror/theme-one-dark";
7
+ import { codeFolding as _ } from "@codemirror/language";
8
+ import { IconCopy1 as R } from "color-message-aibox-vue";
9
+ import { u as T } from "./i18n.k9Q_HVMs.js";
10
+ import F from "copy-to-clipboard";
11
+ import { _ as j } from "./_plugin-vue_export-helper.CHgC5LLL.js";
12
+ import '../assets/index.css';const D = () => {
13
+ const { t: a } = T();
14
+ return {
15
+ copyText: (l) => {
16
+ F(l) ? g({
17
+ message: a("MESSAGE_REMIND.COPY_SUCCESS"),
18
+ type: "success"
19
+ }) : g({
20
+ message: a("COMMON_STORE_LIBRARY.LABEL_COPY_FAIL"),
21
+ type: "error"
22
+ });
23
+ }
24
+ };
25
+ }, J = {
26
+ __name: "index",
27
+ props: {
28
+ code: {
29
+ type: String,
30
+ default: ""
31
+ },
32
+ language: {
33
+ type: String,
34
+ default: "json"
35
+ },
36
+ customExpandDepth: {
37
+ type: Number,
38
+ default: 1 / 0
39
+ },
40
+ sort: {
41
+ type: Boolean,
42
+ default: !0
43
+ },
44
+ noPadding: {
45
+ type: Boolean,
46
+ default: !1
47
+ },
48
+ theme: {
49
+ type: String,
50
+ default: "light"
51
+ },
52
+ showLength: {
53
+ type: Boolean,
54
+ default: !1
55
+ },
56
+ maxHeight: {
57
+ type: String,
58
+ default: "calc(100% - 125px)"
59
+ },
60
+ showCopy: {
61
+ type: Boolean,
62
+ default: !1
63
+ },
64
+ // 是否自定义折叠
65
+ enableFolding: {
66
+ type: Boolean,
67
+ default: !1
68
+ }
69
+ },
70
+ setup(a) {
71
+ const { copyText: d } = D(), l = a, i = w(""), p = {
72
+ json: () => x()
73
+ }, C = () => {
74
+ const r = l.language.toLowerCase();
75
+ return p[r] ? p[r]() : x();
76
+ }, f = O([]), E = (r) => {
77
+ const t = r.trim(), n = (o) => {
78
+ try {
79
+ return JSON.parse(o);
80
+ } catch {
81
+ return null;
82
+ }
83
+ };
84
+ let e = null;
85
+ if ((t.startsWith("{") || t.startsWith("[")) && (e = n(t)), !e) {
86
+ const o = `{${t.replace(/,\s*$/, "")}}`;
87
+ e = n(o);
88
+ }
89
+ if (e && typeof e == "object" && !Array.isArray(e)) {
90
+ const o = e.role;
91
+ if (o) return "role: " + o;
92
+ }
93
+ return "";
94
+ }, S = () => {
95
+ const r = [
96
+ C(),
97
+ h.editable.of(!1),
98
+ // 只读模式
99
+ h.lineWrapping
100
+ // 自动换行
101
+ ];
102
+ l.enableFolding && r.push(
103
+ // 配置代码折叠,自定义折叠后的显示内容
104
+ _({
105
+ preparePlaceholder: (t, n) => {
106
+ try {
107
+ const e = t.doc.sliceString(n.from, n.to);
108
+ return E(e);
109
+ } catch (e) {
110
+ return console.error("Error getting fold preview:", e), "...";
111
+ }
112
+ },
113
+ placeholderDOM: (t, n, e) => {
114
+ const o = document.createElement("span");
115
+ return o.className = "cm-foldPlaceholder", o.onclick = n, o.style.cursor = "pointer", o.style.color = "#888", o.style.padding = "0 4px", o.style.borderRadius = "3px", o.textContent = e ? `${e}...` : "...", o;
116
+ }
117
+ })
118
+ ), l.theme === "dark" && r.push(V), f.value = r;
119
+ }, v = (r) => {
120
+ try {
121
+ const t = JSON.parse(r);
122
+ if (l.sort && typeof t == "object" && t !== null) {
123
+ const n = (e) => Array.isArray(e) ? e.map(n) : typeof e == "object" && e !== null ? Object.keys(e).sort().reduce((o, c) => (o[c] = n(e[c]), o), {}) : e;
124
+ return JSON.stringify(n(t), null, 2);
125
+ }
126
+ return JSON.stringify(t, null, 2);
127
+ } catch {
128
+ return r;
129
+ }
130
+ };
131
+ return B(
132
+ () => l.code,
133
+ (r) => {
134
+ l.language === "json" ? i.value = v(r) : i.value = r;
135
+ },
136
+ { immediate: !0 }
137
+ ), k(() => {
138
+ S();
139
+ }), (r, t) => (m(), A("div", {
140
+ class: N(["code-viewer", { "no-padding": a.noPadding, dark: a.theme === "dark" }])
141
+ }, [
142
+ a.showCopy ? (m(), I(s(P), {
143
+ key: 0,
144
+ onClick: t[0] || (t[0] = (n) => s(d)(a.code)),
145
+ class: "code-viewer__copy",
146
+ color: "#96A0AB",
147
+ size: "18px"
148
+ }, {
149
+ default: y(() => [
150
+ u(s(R))
151
+ ]),
152
+ _: 1
153
+ })) : M("", !0),
154
+ u(s(b), { "max-height": a.maxHeight }, {
155
+ default: y(() => [
156
+ u(s(L), {
157
+ modelValue: i.value,
158
+ "onUpdate:modelValue": t[1] || (t[1] = (n) => i.value = n),
159
+ style: { height: "100%", minHeight: "100px" },
160
+ extensions: f.value,
161
+ disabled: !0
162
+ }, null, 8, ["modelValue", "extensions"])
163
+ ]),
164
+ _: 1
165
+ }, 8, ["max-height"])
166
+ ], 2));
167
+ }
168
+ }, Z = /* @__PURE__ */ j(J, [["__scopeId", "data-v-011cdc70"]]);
169
+ export {
170
+ Z as C,
171
+ D as u
172
+ };