@web-utils/form-ui 1.0.0-beta47 → 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.
- package/chunks/{C9dGL28n.mjs → 6yfBZFOB.mjs} +2 -2
- package/chunks/B-zqRAXo.mjs +69 -0
- package/chunks/{CXvGoZKJ.mjs → B1IPSTA6.mjs} +2 -2
- package/chunks/B3pkJUCx2.mjs +146 -0
- package/chunks/{Ct5bDJ50.mjs → B9gA65rt2.mjs} +3 -3
- package/chunks/{C1AgOUe_.mjs → BA2KEptL.mjs} +2 -2
- package/chunks/BRRcYOud.mjs +613 -0
- package/chunks/{Bm5eiSmT.mjs → BUGCiCnl.mjs} +11 -7
- package/chunks/{DiJyms_r.mjs → BbSPWDDZ.mjs} +2 -2
- package/chunks/{BH_JJ8Xh.mjs → BfxDxIg0.mjs} +2 -2
- package/chunks/{C3Uo82-I.mjs → BqWvBF14.mjs} +3 -3
- package/chunks/BsZgAJX_2.mjs +81 -0
- package/chunks/{DXYgAmil.mjs → BtcjAHE6.mjs} +2 -2
- package/chunks/{DhtHh0jk.mjs → ByHz4mmh.mjs} +2 -2
- package/chunks/C-D7jeLT2.mjs +568 -0
- package/chunks/{BufIRDd0.mjs → C2zgFLYO.mjs} +1 -1
- package/chunks/{XCGWTz41.mjs → CAd1zK9Q.mjs} +2 -2
- package/chunks/{CSyJ-vEx.mjs → CJdkjadi.mjs} +1 -1
- package/chunks/{CFOGMFgo.mjs → CabldOLo.mjs} +17 -10
- package/chunks/{Bd1UFJic.mjs → Cln3RBAD.mjs} +21 -21
- package/chunks/{CTKmEf2M.mjs → CqoVAnxC2.mjs} +2 -2
- package/chunks/{DF9fJMQS.mjs → CuAoMR3n.mjs} +3 -3
- package/chunks/{XqRTtFfp.mjs → CxTg0r4n.mjs} +1 -1
- package/chunks/{pdwFQpA8.mjs → D0Zg2CV0.mjs} +3 -3
- package/chunks/{BsCS7SB5.mjs → DA7oGHSX.mjs} +2 -2
- package/chunks/DOZRzqlo.mjs +37 -0
- package/chunks/{Cj59E77g.mjs → D_qiRmiE.mjs} +5 -5
- package/chunks/{cmuHpsX6.mjs → DcTVYqeJ.mjs} +29 -25
- package/chunks/{B3ajWLh3.mjs → Dkd5BC98.mjs} +2 -2
- package/chunks/{ChmDDqoZ2.mjs → GI8krYU82.mjs} +1 -1
- package/chunks/{D8UVq1t1.mjs → V2p-PCpL.mjs} +6 -6
- package/chunks/{taicx2sd.mjs → bFbPPcdq.mjs} +2 -2
- package/chunks/{TvNHGVAP.mjs → eae6huQB.mjs} +2 -2
- package/chunks/gCeDFHo1.mjs +32 -0
- package/chunks/{BvA0aMEE.mjs → gLPy4Sus.mjs} +1 -1
- package/chunks/{o6VhYAN52.mjs → hzaYr6Ud2.mjs} +2 -2
- package/chunks/{CqTcEefA.mjs → pIzhYsBe.mjs} +2 -2
- package/chunks/{CWfUPCtS.mjs → vXQf89tS.mjs} +274 -273
- package/chunks/{BWBHzD5N.mjs → wXeqV-_7.mjs} +2 -2
- package/confirm-button/index.d.ts +2 -0
- package/confirm-button/index.mjs +1 -1
- package/confirmable/index.d.ts +2 -0
- package/confirmable/index.mjs +1 -1
- package/dict-render/index.d.ts +28 -0
- package/dict-render/index.mjs +2 -0
- package/editable-tree/index.mjs +1 -1
- package/element-dialog/index.d.ts +2 -2
- package/element-dialog/index.mjs +1 -1
- package/{resize-observer → element-resize-observer}/index.mjs +3 -3
- package/form-button/index.d.ts +2 -0
- package/form-cascader/index.d.ts +3 -3
- package/form-cascader/index.mjs +1 -1
- package/form-checkbox/index.mjs +1 -1
- package/form-checkbox-group/index.mjs +2 -0
- package/form-date-picker/index.mjs +1 -1
- package/form-holder/index.mjs +1 -1
- package/form-image/index.mjs +1 -1
- package/form-input/index.mjs +1 -1
- package/form-input-cron-expression/index.mjs +1 -1
- package/form-input-email/index.mjs +1 -1
- package/form-input-id-card/index.mjs +1 -1
- package/form-input-number/index.mjs +1 -1
- package/form-input-phone-number/index.mjs +1 -1
- package/form-input-tag/index.mjs +1 -1
- package/form-input-time/index.mjs +1 -1
- package/form-item-group/index.mjs +1 -1
- package/form-item-x/index.mjs +1 -1
- package/form-radio-group/index.d.ts +1 -1
- package/form-radio-group/index.mjs +1 -1
- package/form-rate/index.mjs +1 -1
- package/form-row/index.mjs +1 -1
- package/form-select/index.d.ts +1 -1
- package/form-select/index.mjs +1 -1
- package/form-slider/index.mjs +1 -1
- package/form-switch/index.mjs +1 -1
- package/form-table/index.d.ts +269 -0
- package/form-table/index.mjs +2 -0
- package/form-table-plus/index.d.ts +266 -0
- package/form-table-plus/index.mjs +2 -0
- package/form-text/index.mjs +1 -1
- package/form-textarea/index.mjs +1 -1
- package/form-time-select/index.mjs +1 -1
- package/helper/dictionary.mjs +7 -7
- package/iframe-window/index.mjs +1 -1
- package/index.css +1 -1
- package/index.d.ts +8 -3
- package/index.mjs +55 -50
- package/package.json +1 -1
- package/pageable-table/index.d.ts +7 -7
- package/pageable-table/index.mjs +1 -1
- package/sub-table/index.d.ts +100 -0
- package/sub-table/index.mjs +472 -0
- package/sub-table/style.css +1 -0
- package/sub-table-plus/index.d.ts +97 -0
- package/sub-table-plus/index.mjs +2 -0
- package/sub-table-plus/style.css +1 -0
- package/table-column/index.mjs +1 -1
- package/table-column-def/index.d.ts +18 -8
- package/table-column-def/index.mjs +1 -1
- package/table-view/index.mjs +107 -106
- package/toolbar/index.mjs +1 -1
- package/toolbar-button/index.d.ts +2 -2
- package/toolbar-button/index.mjs +1 -1
- package/vue-cron/index.mjs +1 -1
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +52 -51
- package/year-calendar/index.mjs +1 -1
- package/chunks/CLPSCSsy.mjs +0 -603
- package/chunks/CuG2Q-PM.mjs +0 -100
- package/form-check-box-group/index.mjs +0 -2
- package/chunks/{Ds_Tpa_M.mjs → BBERmTup.mjs} +0 -0
- package/chunks/{B1MSrc6f.mjs → CkOD-_VV.mjs} +0 -0
- package/chunks/{DDmQcNm6.mjs → DOP3aBxf.mjs} +0 -0
- package/chunks/{DJe97Fgi.mjs → hlha6Bhc.mjs} +0 -0
- package/{resize-observer → element-resize-observer}/index.d.ts +0 -0
- package/{resize-observer → element-resize-observer}/style.css +0 -0
- package/{form-check-box-group → form-checkbox-group}/index.d.ts +1 -1
- /package/{form-check-box-group → form-checkbox-group}/style.css +0 -0
package/x-input-tag/index.mjs
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { t as e } from "../chunks/
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
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:
|
|
13
|
+
from: S,
|
|
13
14
|
default: ""
|
|
14
15
|
},
|
|
15
16
|
elFormItem: {
|
|
16
|
-
from:
|
|
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
|
|
71
|
-
let e = this.arrayMode ? this.modelValue || [] :
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
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 =
|
|
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 = "",
|
|
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
|
|
119
|
-
if (n)
|
|
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 ?
|
|
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 ?
|
|
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),
|
|
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(
|
|
162
|
-
let
|
|
163
|
-
return
|
|
164
|
-
|
|
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: !
|
|
169
|
-
onClose: (n) =>
|
|
169
|
+
closable: !f.inputDisabled,
|
|
170
|
+
onClose: (n) => f.handleClose(e, t)
|
|
170
171
|
}, {
|
|
171
|
-
default:
|
|
172
|
+
default: v(() => [d(g(e.name || e), 1)]),
|
|
172
173
|
_: 2
|
|
173
|
-
}, 1032, ["closable", "onClose"]))), 128)) :
|
|
174
|
-
|
|
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:
|
|
178
|
-
"onUpdate:modelValue": [
|
|
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
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
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:
|
|
188
|
+
onBlur: f.onInputBlur
|
|
188
189
|
}, null, 8, [
|
|
189
190
|
"modelValue",
|
|
190
191
|
"onUpdate:modelValue",
|
|
191
192
|
"onKeyup",
|
|
192
193
|
"onBlur"
|
|
193
|
-
])), [[
|
|
194
|
-
!
|
|
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:
|
|
199
|
+
onClick: f.showInput
|
|
199
200
|
}, {
|
|
200
|
-
default:
|
|
201
|
+
default: v(() => [...n[3] || (n[3] = [d(" + 添加 ", -1)])]),
|
|
201
202
|
_: 1
|
|
202
|
-
}, 8, ["onClick"])), [[
|
|
203
|
-
|
|
204
|
-
|
|
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":
|
|
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:
|
|
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:
|
|
218
|
-
onMouseenter: (e) =>
|
|
219
|
-
onClick: (t) =>
|
|
220
|
-
},
|
|
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"])) :
|
|
223
|
+
}, 8, ["virtual-ref"])) : c("v-if", !0)
|
|
223
224
|
]);
|
|
224
225
|
}
|
|
225
|
-
var F = /* @__PURE__ */
|
|
226
|
+
var F = /* @__PURE__ */ t(O, [["render", P]]);
|
|
226
227
|
//#endregion
|
|
227
228
|
export { F as default };
|
package/year-calendar/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../chunks/
|
|
1
|
+
import { t as e } from "../chunks/GI8krYU82.mjs";
|
|
2
2
|
export { e as default };
|