@web-utils/form-ui 1.0.0-beta46 → 1.0.0-beta48

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 (119) hide show
  1. package/chunks/{C9dGL28n.mjs → 6yfBZFOB.mjs} +2 -2
  2. package/chunks/B-zqRAXo.mjs +69 -0
  3. package/chunks/{CXvGoZKJ.mjs → B1IPSTA6.mjs} +2 -2
  4. package/chunks/B3pkJUCx2.mjs +146 -0
  5. package/chunks/{Ct5bDJ50.mjs → B9gA65rt2.mjs} +3 -3
  6. package/chunks/{C1AgOUe_.mjs → BA2KEptL.mjs} +2 -2
  7. package/chunks/BRRcYOud.mjs +613 -0
  8. package/chunks/{Bm5eiSmT.mjs → BUGCiCnl.mjs} +11 -7
  9. package/chunks/{DiJyms_r.mjs → BbSPWDDZ.mjs} +2 -2
  10. package/chunks/{BH_JJ8Xh.mjs → BfxDxIg0.mjs} +2 -2
  11. package/chunks/{C3Uo82-I.mjs → BqWvBF14.mjs} +3 -3
  12. package/chunks/BsZgAJX_2.mjs +81 -0
  13. package/chunks/{DXYgAmil.mjs → BtcjAHE6.mjs} +2 -2
  14. package/chunks/{DhtHh0jk.mjs → ByHz4mmh.mjs} +2 -2
  15. package/chunks/C-D7jeLT2.mjs +568 -0
  16. package/chunks/{BufIRDd0.mjs → C2zgFLYO.mjs} +1 -1
  17. package/chunks/{XCGWTz41.mjs → CAd1zK9Q.mjs} +2 -2
  18. package/chunks/{CSyJ-vEx.mjs → CJdkjadi.mjs} +1 -1
  19. package/chunks/{CFOGMFgo.mjs → CabldOLo.mjs} +17 -10
  20. package/chunks/{Bd1UFJic.mjs → Cln3RBAD.mjs} +21 -21
  21. package/chunks/{CTKmEf2M.mjs → CqoVAnxC2.mjs} +2 -2
  22. package/chunks/{DF9fJMQS.mjs → CuAoMR3n.mjs} +3 -3
  23. package/chunks/{XqRTtFfp.mjs → CxTg0r4n.mjs} +1 -1
  24. package/chunks/{pdwFQpA8.mjs → D0Zg2CV0.mjs} +3 -3
  25. package/chunks/{BsCS7SB5.mjs → DA7oGHSX.mjs} +2 -2
  26. package/chunks/DOZRzqlo.mjs +37 -0
  27. package/chunks/{Cj59E77g.mjs → D_qiRmiE.mjs} +5 -5
  28. package/chunks/{cmuHpsX6.mjs → DcTVYqeJ.mjs} +29 -25
  29. package/chunks/{B3ajWLh3.mjs → Dkd5BC98.mjs} +2 -2
  30. package/chunks/{ChmDDqoZ2.mjs → GI8krYU82.mjs} +1 -1
  31. package/chunks/{D8UVq1t1.mjs → V2p-PCpL.mjs} +6 -6
  32. package/chunks/{taicx2sd.mjs → bFbPPcdq.mjs} +2 -2
  33. package/chunks/{TvNHGVAP.mjs → eae6huQB.mjs} +2 -2
  34. package/chunks/gCeDFHo1.mjs +32 -0
  35. package/chunks/{Cab-ZjRx.mjs → gLPy4Sus.mjs} +3 -3
  36. package/chunks/{o6VhYAN52.mjs → hzaYr6Ud2.mjs} +2 -2
  37. package/chunks/{CqTcEefA.mjs → pIzhYsBe.mjs} +2 -2
  38. package/chunks/{CWfUPCtS.mjs → vXQf89tS.mjs} +274 -273
  39. package/chunks/{BWBHzD5N.mjs → wXeqV-_7.mjs} +2 -2
  40. package/confirm-button/index.d.ts +2 -0
  41. package/confirm-button/index.mjs +1 -1
  42. package/confirmable/index.d.ts +2 -0
  43. package/confirmable/index.mjs +1 -1
  44. package/dict-render/index.d.ts +28 -0
  45. package/dict-render/index.mjs +2 -0
  46. package/editable-tree/index.mjs +1 -1
  47. package/element-dialog/index.d.ts +2 -2
  48. package/element-dialog/index.mjs +1 -1
  49. package/{resize-observer → element-resize-observer}/index.mjs +3 -3
  50. package/form-button/index.d.ts +2 -0
  51. package/form-card/index.mjs +2 -2
  52. package/form-cascader/index.d.ts +3 -3
  53. package/form-cascader/index.mjs +1 -1
  54. package/form-checkbox/index.mjs +1 -1
  55. package/form-checkbox-group/index.mjs +2 -0
  56. package/form-date-picker/index.mjs +1 -1
  57. package/form-holder/index.mjs +1 -1
  58. package/form-image/index.mjs +1 -1
  59. package/form-input/index.mjs +1 -1
  60. package/form-input-cron-expression/index.mjs +1 -1
  61. package/form-input-email/index.mjs +1 -1
  62. package/form-input-id-card/index.mjs +1 -1
  63. package/form-input-number/index.mjs +1 -1
  64. package/form-input-phone-number/index.mjs +1 -1
  65. package/form-input-tag/index.mjs +1 -1
  66. package/form-input-time/index.mjs +1 -1
  67. package/form-item-group/index.mjs +1 -1
  68. package/form-item-x/index.mjs +1 -1
  69. package/form-radio-group/index.d.ts +1 -1
  70. package/form-radio-group/index.mjs +1 -1
  71. package/form-rate/index.mjs +1 -1
  72. package/form-row/index.mjs +1 -1
  73. package/form-select/index.d.ts +1 -1
  74. package/form-select/index.mjs +1 -1
  75. package/form-slider/index.mjs +1 -1
  76. package/form-switch/index.mjs +1 -1
  77. package/form-table/index.d.ts +269 -0
  78. package/form-table/index.mjs +2 -0
  79. package/form-table-plus/index.d.ts +266 -0
  80. package/form-table-plus/index.mjs +2 -0
  81. package/form-text/index.mjs +1 -1
  82. package/form-textarea/index.mjs +1 -1
  83. package/form-time-select/index.mjs +1 -1
  84. package/helper/dictionary.mjs +7 -7
  85. package/iframe-window/index.mjs +1 -1
  86. package/index.css +1 -1
  87. package/index.d.ts +8 -3
  88. package/index.mjs +55 -50
  89. package/package.json +1 -1
  90. package/pageable-table/index.d.ts +7 -7
  91. package/pageable-table/index.mjs +1 -1
  92. package/sub-table/index.d.ts +100 -0
  93. package/sub-table/index.mjs +472 -0
  94. package/sub-table/style.css +1 -0
  95. package/sub-table-plus/index.d.ts +97 -0
  96. package/sub-table-plus/index.mjs +2 -0
  97. package/sub-table-plus/style.css +1 -0
  98. package/table-column/index.mjs +1 -1
  99. package/table-column-def/index.d.ts +18 -8
  100. package/table-column-def/index.mjs +3 -3
  101. package/table-view/index.mjs +107 -106
  102. package/toolbar/index.mjs +1 -1
  103. package/toolbar-button/index.d.ts +2 -2
  104. package/toolbar-button/index.mjs +1 -1
  105. package/vue-cron/index.mjs +1 -1
  106. package/web-types.json +1 -1
  107. package/x-input-tag/index.mjs +52 -51
  108. package/year-calendar/index.mjs +1 -1
  109. package/chunks/CLPSCSsy.mjs +0 -603
  110. package/chunks/CuG2Q-PM.mjs +0 -100
  111. package/form-check-box-group/index.mjs +0 -2
  112. package/chunks/{Ds_Tpa_M.mjs → BBERmTup.mjs} +0 -0
  113. package/chunks/{B1MSrc6f.mjs → CkOD-_VV.mjs} +0 -0
  114. package/chunks/{DDmQcNm6.mjs → DOP3aBxf.mjs} +0 -0
  115. package/chunks/{DJe97Fgi.mjs → hlha6Bhc.mjs} +0 -0
  116. package/{resize-observer → element-resize-observer}/index.d.ts +0 -0
  117. package/{resize-observer → element-resize-observer}/style.css +0 -0
  118. package/{form-check-box-group → form-checkbox-group}/index.d.ts +1 -1
  119. /package/{form-check-box-group → form-checkbox-group}/style.css +0 -0
@@ -1,19 +1,20 @@
1
- import { t as e } from "../chunks/B1MSrc6f.mjs";
2
- import { isArray as t, isDef as n, isPlainObject as r, scrollIntoView as i } from "@web-utils/core";
3
- import { Fragment as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, nextTick as d, normalizeClass as f, openBlock as p, renderList as m, toDisplayString as h, vShow as g, withCtx as _, withDirectives as v, withKeys as y } from "vue";
4
- import { ElMessage as b, formContextKey as x, formItemContextKey as S } from "element-plus";
5
- import { ElButton as C, ElInput as w, ElPopover as T, ElTag as E } from "element-plus/es";
1
+ import { t as e } from "../chunks/CxTg0r4n.mjs";
2
+ import { t } from "../chunks/CkOD-_VV.mjs";
3
+ import { isArray as n, isDef as r, isPlainObject as i, scrollIntoView as a } from "@web-utils/core";
4
+ import { Fragment as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, nextTick as f, normalizeClass as p, openBlock as m, renderList as h, toDisplayString as g, vShow as _, withCtx as v, withDirectives as y, withKeys as b } from "vue";
5
+ import { ElMessage as x, formContextKey as S, formItemContextKey as C } from "element-plus";
6
+ import { ElInput as w, ElPopover as T, ElTag as E } from "element-plus/es";
6
7
  import { debounce as D } from "lodash-es";
7
8
  //#region src/components/form/XInputTag.vue
8
9
  var O = {
9
10
  name: "XInputTag",
10
11
  inject: {
11
12
  elForm: {
12
- from: x,
13
+ from: S,
13
14
  default: ""
14
15
  },
15
16
  elFormItem: {
16
- from: S,
17
+ from: C,
17
18
  default: ""
18
19
  }
19
20
  },
@@ -67,8 +68,8 @@ var O = {
67
68
  id: null
68
69
  }) : this.modelValue : [];
69
70
  } else {
70
- var n;
71
- let e = this.arrayMode ? this.modelValue || [] : t(this.modelValue) ? this.modelValue : ((n = this.modelValue) == null ? void 0 : n.split(this.separator)) || [];
71
+ var t;
72
+ let e = this.arrayMode ? this.modelValue || [] : n(this.modelValue) ? this.modelValue : ((t = this.modelValue) == null ? void 0 : t.split(this.separator)) || [];
72
73
  return e.length && e[0] ? e.map((e) => this.objectMode ? {
73
74
  name: e,
74
75
  id: null
@@ -84,22 +85,22 @@ var O = {
84
85
  methods: {
85
86
  async showInput() {
86
87
  var e;
87
- this.inputVisible = !0, await d(), this.$refs.saveTagInput.$refs.input.focus(), (e = this.items) != null && e.length && (this.currentIndex = 0);
88
+ this.inputVisible = !0, await f(), this.$refs.saveTagInput.$refs.input.focus(), (e = this.items) != null && e.length && (this.currentIndex = 0);
88
89
  },
89
90
  handleClose(e) {
90
91
  let t = this.tags.filter((t) => t !== e);
91
92
  this.$emit("update:modelValue", this.arrayMode ? t : t.map((e) => e.name || e).join(this.separator));
92
93
  },
93
94
  async handleInputConfirm() {
94
- await d(), n(this.currentIndex) && this.items[this.currentIndex] ? await this.addTag(this.items[this.currentIndex]) : this.inputValue ? await this.addTag(this.inputValue) : await this.reset();
95
+ await f(), r(this.currentIndex) && this.items[this.currentIndex] ? await this.addTag(this.items[this.currentIndex]) : this.inputValue ? await this.addTag(this.inputValue) : await this.reset();
95
96
  },
96
97
  async reset() {
97
98
  var e;
98
- (e = this.$refs.popover) == null || e.hide(), await d(), this.inputVisible = !1, this.inputValue = "", this.currentIndex = null;
99
+ (e = this.$refs.popover) == null || e.hide(), await f(), this.inputVisible = !1, this.inputValue = "", this.currentIndex = null;
99
100
  },
100
101
  async addTag(e) {
101
102
  if (this.tags.length >= this.maxTag) {
102
- b.warning({
103
+ x.warning({
103
104
  message: `${this.type}已达上限!`,
104
105
  showClose: !0
105
106
  }), this.inputVisible = !1, this.inputValue = "";
@@ -107,24 +108,24 @@ var O = {
107
108
  }
108
109
  if (e) {
109
110
  var t;
110
- let n = r(e);
111
+ let n = i(e);
111
112
  if (this.tags.some((t) => (this.objectMode && t.name || t) === (n && e.name || e))) {
112
- this.inputVisible = !1, this.inputValue = "", b.warning({
113
+ this.inputVisible = !1, this.inputValue = "", x.warning({
113
114
  message: `${this.type}已存在!`,
114
115
  showClose: !0
115
116
  });
116
117
  return;
117
118
  }
118
- let i = [...this.tags];
119
- if (n) i.push(e);
119
+ let r = [...this.tags];
120
+ if (n) r.push(e);
120
121
  else {
121
122
  let t = this.items.find((t) => (t.name || t) === e);
122
- t ? i.push(t) : i.push(this.objectMode ? {
123
+ t ? r.push(t) : r.push(this.objectMode ? {
123
124
  id: null,
124
125
  name: e
125
126
  } : e);
126
127
  }
127
- this.$emit("update:modelValue", this.arrayMode ? i : i.map((e) => e.name || e).join(this.separator)), await this.$nextTick(), (t = this.elFormItem) == null || t.clearValidate();
128
+ this.$emit("update:modelValue", this.arrayMode ? r : r.map((e) => e.name || e).join(this.separator)), await this.$nextTick(), (t = this.elFormItem) == null || t.clearValidate();
128
129
  }
129
130
  await this.reset();
130
131
  },
@@ -141,7 +142,7 @@ var O = {
141
142
  },
142
143
  select(e) {
143
144
  var t;
144
- (t = this.items) != null && t.length && (e === 1 ? this.currentIndex > 0 ? this.currentIndex-- : this.currentIndex = this.items.length - 1 : e === 2 && (this.currentIndex < this.items.length - 1 ? this.currentIndex++ : this.currentIndex = 0), i(this.$refs.list, this.$refs.items[this.currentIndex]));
145
+ (t = this.items) != null && t.length && (e === 1 ? this.currentIndex > 0 ? this.currentIndex-- : this.currentIndex = this.items.length - 1 : e === 2 && (this.currentIndex < this.items.length - 1 ? this.currentIndex++ : this.currentIndex = 0), a(this.$refs.list, this.$refs.items[this.currentIndex]));
145
146
  }
146
147
  }
147
148
  }, k = { class: "x-input-tag" }, A = {
@@ -158,70 +159,70 @@ var O = {
158
159
  ref: "list",
159
160
  class: "dropdown-item-list"
160
161
  }, N = ["onMouseenter", "onClick"];
161
- function P(e, t, n, r, i, d) {
162
- let b = E, x = w, S = C, D = T;
163
- return p(), c("div", k, [
164
- d.tags && d.tags.length && d.tags[0] ? (p(!0), c(a, { key: 0 }, m(d.tags, (e, t) => (p(), o(b, {
162
+ function P(t, n, r, i, a, f) {
163
+ let x = E, S = w, C = e, D = T;
164
+ return m(), l("div", k, [
165
+ f.tags && f.tags.length && f.tags[0] ? (m(!0), l(o, { key: 0 }, h(f.tags, (e, t) => (m(), s(x, {
165
166
  key: e.id || e.name || e,
166
167
  size: "small",
167
168
  "disable-transitions": "",
168
- closable: !d.inputDisabled,
169
- onClose: (n) => d.handleClose(e, t)
169
+ closable: !f.inputDisabled,
170
+ onClose: (n) => f.handleClose(e, t)
170
171
  }, {
171
- default: _(() => [u(h(e.name || e), 1)]),
172
+ default: v(() => [d(g(e.name || e), 1)]),
172
173
  _: 2
173
- }, 1032, ["closable", "onClose"]))), 128)) : d.inputDisabled ? (p(), c("span", A, "无")) : s("v-if", !0),
174
- d.inputDisabled ? s("v-if", !0) : v((p(), o(x, {
174
+ }, 1032, ["closable", "onClose"]))), 128)) : f.inputDisabled ? (m(), l("span", A, "无")) : c("v-if", !0),
175
+ f.inputDisabled ? c("v-if", !0) : y((m(), s(S, {
175
176
  key: 2,
176
177
  ref: "saveTagInput",
177
- modelValue: i.inputValue,
178
- "onUpdate:modelValue": [t[0] || (t[0] = (e) => i.inputValue = e), d.tryQuery],
178
+ modelValue: a.inputValue,
179
+ "onUpdate:modelValue": [n[0] || (n[0] = (e) => a.inputValue = e), f.tryQuery],
179
180
  class: "input-new-tag",
180
181
  size: "small",
181
182
  onKeyup: [
182
- t[1] || (t[1] = y((e) => d.select(1), ["up"])),
183
- t[2] || (t[2] = y((e) => d.select(2), ["down"])),
184
- y(d.onInputBlur, ["esc"]),
185
- y(d.handleInputConfirm, ["enter"])
183
+ n[1] || (n[1] = b((e) => f.select(1), ["up"])),
184
+ n[2] || (n[2] = b((e) => f.select(2), ["down"])),
185
+ b(f.onInputBlur, ["esc"]),
186
+ b(f.handleInputConfirm, ["enter"])
186
187
  ],
187
- onBlur: d.onInputBlur
188
+ onBlur: f.onInputBlur
188
189
  }, null, 8, [
189
190
  "modelValue",
190
191
  "onUpdate:modelValue",
191
192
  "onKeyup",
192
193
  "onBlur"
193
- ])), [[g, i.inputVisible]]),
194
- !d.inputDisabled && !i.inputVisible ? v((p(), o(S, {
194
+ ])), [[_, a.inputVisible]]),
195
+ !f.inputDisabled && !a.inputVisible ? y((m(), s(C, {
195
196
  key: 3,
196
197
  class: "button-new-tag",
197
198
  size: "small",
198
- onClick: d.showInput
199
+ onClick: f.showInput
199
200
  }, {
200
- default: _(() => [...t[3] || (t[3] = [u(" + 添加 ", -1)])]),
201
+ default: v(() => [...n[3] || (n[3] = [d(" + 添加 ", -1)])]),
201
202
  _: 1
202
- }, 8, ["onClick"])), [[g, d.tags.length < i.maxTag]]) : s("v-if", !0),
203
- n.count ? (p(), c("span", j, h(d.tags.length && d.tags[0] ? d.tags.length : ""), 1)) : s("v-if", !0),
204
- n.query ? (p(), o(D, {
203
+ }, 8, ["onClick"])), [[_, f.tags.length < a.maxTag]]) : c("v-if", !0),
204
+ r.count ? (m(), l("span", j, g(f.tags.length && f.tags[0] ? f.tags.length : ""), 1)) : c("v-if", !0),
205
+ r.query ? (m(), s(D, {
205
206
  key: 5,
206
207
  ref: "popover",
207
- "virtual-ref": e.$refs.saveTagInput,
208
+ "virtual-ref": t.$refs.saveTagInput,
208
209
  placement: "bottom",
209
210
  width: "240",
210
211
  "popper-class": "dropdown-popup",
211
212
  trigger: "manual"
212
213
  }, {
213
- default: _(() => [l("ul", M, [(p(!0), c(a, null, m(i.items, (e, t) => (p(), c("li", {
214
+ default: v(() => [u("ul", M, [(m(!0), l(o, null, h(a.items, (e, t) => (m(), l("li", {
214
215
  ref_for: !0,
215
216
  ref: "items",
216
217
  key: e.id || e.name || e,
217
- class: f(["dropdown-item", { active: i.currentIndex === t }]),
218
- onMouseenter: (e) => i.currentIndex = t,
219
- onClick: (t) => d.onDropdownItemClick(e)
220
- }, h(e.name || e), 43, N))), 128))], 512)]),
218
+ class: p(["dropdown-item", { active: a.currentIndex === t }]),
219
+ onMouseenter: (e) => a.currentIndex = t,
220
+ onClick: (t) => f.onDropdownItemClick(e)
221
+ }, g(e.name || e), 43, N))), 128))], 512)]),
221
222
  _: 1
222
- }, 8, ["virtual-ref"])) : s("v-if", !0)
223
+ }, 8, ["virtual-ref"])) : c("v-if", !0)
223
224
  ]);
224
225
  }
225
- var F = /* @__PURE__ */ e(O, [["render", P]]);
226
+ var F = /* @__PURE__ */ t(O, [["render", P]]);
226
227
  //#endregion
227
228
  export { F as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/ChmDDqoZ2.mjs";
1
+ import { t as e } from "../chunks/GI8krYU82.mjs";
2
2
  export { e as default };