@rebilly/revel 13.1.5 → 13.1.7
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/CHANGELOG.md +2 -2
- package/dist/composables/use-validate.d.ts +1 -1
- package/dist/revel.mjs +21 -14
- package/dist/revel.umd.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
## 13.1.
|
|
1
|
+
## 13.1.7 (2026-10-15)
|
|
2
2
|
|
|
3
3
|
### Bug Fixes
|
|
4
4
|
|
|
5
|
-
- **
|
|
5
|
+
- **revel:** update validation state when the validate prop changes ([#29183](https://github.com/Rebilly/rebilly/pull/29183))
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ValidationState } from '../types';
|
|
2
|
-
export declare function useValidate(
|
|
2
|
+
export declare function useValidate(getValidate: () => Voidable<ValidationState>): {
|
|
3
3
|
validateErrorMessages: import("vue").ComputedRef<string[]>;
|
|
4
4
|
isInvalid: import("vue").ComputedRef<boolean>;
|
|
5
5
|
};
|
package/dist/revel.mjs
CHANGED
|
@@ -7074,15 +7074,18 @@ var $x = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", eS
|
|
|
7074
7074
|
//#region src/composables/use-validate.ts
|
|
7075
7075
|
function _S(e) {
|
|
7076
7076
|
let t = i(() => {
|
|
7077
|
-
let t = [];
|
|
7078
|
-
function
|
|
7077
|
+
let t = e(), n = [];
|
|
7078
|
+
function r(e) {
|
|
7079
7079
|
return typeof e.$message == "string" ? e.$message : e.$message.value;
|
|
7080
7080
|
}
|
|
7081
|
-
return
|
|
7081
|
+
return t && (typeof t == "string" ? n.push(t) : Array.isArray(t) ? n.push(...t.reduce((e, t) => (typeof t == "string" ? e.push(t) : typeof t == "object" && "$message" in t && e.push(r(t)), e), [])) : typeof t == "object" && "$errors" in t && n.push(...t.$errors.map((e) => r(e)))), n;
|
|
7082
7082
|
});
|
|
7083
7083
|
return {
|
|
7084
7084
|
validateErrorMessages: t,
|
|
7085
|
-
isInvalid: i(() =>
|
|
7085
|
+
isInvalid: i(() => {
|
|
7086
|
+
let n = e();
|
|
7087
|
+
return n && typeof n == "object" && "$invalid" in n && "$dirty" in n ? n.$invalid && n.$dirty : t.value.length > 0;
|
|
7088
|
+
})
|
|
7086
7089
|
};
|
|
7087
7090
|
}
|
|
7088
7091
|
//#endregion
|
|
@@ -7123,7 +7126,7 @@ var vS = ["aria-checked"], yS = ["for"], bS = [
|
|
|
7123
7126
|
},
|
|
7124
7127
|
emits: ["update:modelValue"],
|
|
7125
7128
|
setup(e, { emit: t }) {
|
|
7126
|
-
let n = e, r = t, { isInvalid: a } = _S(n.validate), l = i(() => n.fuzzy ? !0 : n.modelValue === null ? !1 : Array.isArray(n.modelValue) ? n.modelValue.includes(n.value.toString()) : n.modelValue === n.value), f = i(() => n.fuzzy ? "dash-l" : "check-s"), p = () => {
|
|
7129
|
+
let n = e, r = t, { isInvalid: a } = _S(() => n.validate), l = i(() => n.fuzzy ? !0 : n.modelValue === null ? !1 : Array.isArray(n.modelValue) ? n.modelValue.includes(n.value.toString()) : n.modelValue === n.value), f = i(() => n.fuzzy ? "dash-l" : "check-s"), p = () => {
|
|
7127
7130
|
if (!Array.isArray(n.modelValue)) return !l.value;
|
|
7128
7131
|
let e = n.modelValue.slice();
|
|
7129
7132
|
return Array.isArray(e) ? (l.value ? e.splice(n.modelValue.indexOf(n.value.toString()), 1) : e.push(n.value.toString()), e) : !l.value;
|
|
@@ -7640,8 +7643,8 @@ var vS = ["aria-checked"], yS = ["for"], bS = [
|
|
|
7640
7643
|
}
|
|
7641
7644
|
},
|
|
7642
7645
|
setup(t) {
|
|
7643
|
-
let { validateErrorMessages:
|
|
7644
|
-
return (
|
|
7646
|
+
let n = t, { validateErrorMessages: r, isInvalid: i } = _S(() => n.validate);
|
|
7647
|
+
return (n, a) => z(i) && t.showValidateMessages ? (D(!0), s(e, { key: 0 }, M(z(r), (e, t) => (D(), s("span", {
|
|
7645
7648
|
key: t,
|
|
7646
7649
|
class: "r-field-caption-error"
|
|
7647
7650
|
}, I(e), 1))), 128)) : o("", !0);
|
|
@@ -7700,7 +7703,7 @@ var vS = ["aria-checked"], yS = ["for"], bS = [
|
|
|
7700
7703
|
},
|
|
7701
7704
|
emits: ["update:modelValue"],
|
|
7702
7705
|
setup(e, { emit: t }) {
|
|
7703
|
-
let n = e, r = t, { isInvalid: c } = _S(n.validate), l = i(() => n.type === "range"), u = i(() => {
|
|
7706
|
+
let n = e, r = t, { isInvalid: c } = _S(() => n.validate), l = i(() => n.type === "range"), u = i(() => {
|
|
7704
7707
|
let e = {
|
|
7705
7708
|
id: n.id,
|
|
7706
7709
|
name: n.id,
|
|
@@ -9080,7 +9083,7 @@ var VC = {
|
|
|
9080
9083
|
}), E(() => {
|
|
9081
9084
|
window.removeEventListener("resize", g);
|
|
9082
9085
|
});
|
|
9083
|
-
let { isInvalid: _ } = _S(r.validate), v = RC({
|
|
9086
|
+
let { isInvalid: _ } = _S(() => r.validate), v = RC({
|
|
9084
9087
|
timezone: r.timezone,
|
|
9085
9088
|
showTimePicker: r.showTimePicker
|
|
9086
9089
|
}), y = i(() => r.columns === void 0 ? m.value ? 1 : 2 : r.columns), x = i(() => {
|
|
@@ -9317,6 +9320,10 @@ function ow(e) {
|
|
|
9317
9320
|
"image/*": "All image types",
|
|
9318
9321
|
"video/*": "All video types",
|
|
9319
9322
|
"audio/*": "All audio types",
|
|
9323
|
+
"image/jpeg": "JPEG",
|
|
9324
|
+
"image/png": "PNG",
|
|
9325
|
+
"image/gif": "GIF",
|
|
9326
|
+
"image/webp": "WEBP",
|
|
9320
9327
|
"application/pdf": "PDF",
|
|
9321
9328
|
"application/zip": "ZIP",
|
|
9322
9329
|
"application/msword": "DOC",
|
|
@@ -9388,7 +9395,7 @@ var cw = { class: "r-file-dropzone-fields" }, lw = { class: "r-file-dropzone-hea
|
|
|
9388
9395
|
},
|
|
9389
9396
|
emits: ["update:modelValue"],
|
|
9390
9397
|
setup(t, { emit: n }) {
|
|
9391
|
-
let r = t, l = n, f = ae("file-input"), { validateErrorMessages: p, isInvalid: m } = _S(r.validate), h = k({
|
|
9398
|
+
let r = t, l = n, f = ae("file-input"), { validateErrorMessages: p, isInvalid: m } = _S(() => r.validate), h = k({
|
|
9392
9399
|
dropzoneHighlight: !1,
|
|
9393
9400
|
invalidFiles: []
|
|
9394
9401
|
}), g = i({
|
|
@@ -9825,7 +9832,7 @@ var Ow = /*#__PURE__*/ ww(Tw, [["render", Dw]]), kw = ["for"], Aw = [
|
|
|
9825
9832
|
"right-icon-click"
|
|
9826
9833
|
],
|
|
9827
9834
|
setup(t, { expose: n, emit: r }) {
|
|
9828
|
-
let l = t, f = r, p = ie(), m = A(null), h = A(null), { isInvalid: g } = _S(l.validate), _ = A(!1), x = i(() => !l.multiline && (l.leftIcon || l.rightIcon || l.leftLabel || l.rightLabel || l.password || p["right-button"])), S = i(() => {
|
|
9835
|
+
let l = t, f = r, p = ie(), m = A(null), h = A(null), { isInvalid: g } = _S(() => l.validate), _ = A(!1), x = i(() => !l.multiline && (l.leftIcon || l.rightIcon || l.leftLabel || l.rightLabel || l.password || p["right-button"])), S = i(() => {
|
|
9829
9836
|
let e = {};
|
|
9830
9837
|
return l.leftIcon && (e["r-has-icon-left"] = !0), (l.rightIcon || l.password) && (e["r-has-icon-right"] = !0), e;
|
|
9831
9838
|
}), C = i(() => l.password ? "password" : l.numeric ? "number" : "text"), w = i(() => l.autoComplete || `new-${l.name}`), E = i(() => `(${(l.modelValue ? Number(l.maxLength) - String(l.modelValue).length : Number(l.maxLength)).toLocaleString("en-US")} characters left)`);
|
|
@@ -10480,7 +10487,7 @@ var Ow = /*#__PURE__*/ ww(Tw, [["render", Dw]]), kw = ["for"], Aw = [
|
|
|
10480
10487
|
},
|
|
10481
10488
|
emits: ["update:modelValue"],
|
|
10482
10489
|
setup(t, { emit: n }) {
|
|
10483
|
-
let r = t, a = n, { isInvalid: l } = _S(r.validate), f = i(() => ({ "r-is-error": l.value })), p = i(() => ({
|
|
10490
|
+
let r = t, a = n, { isInvalid: l } = _S(() => r.validate), f = i(() => ({ "r-is-error": l.value })), p = i(() => ({
|
|
10484
10491
|
"r-is-disabled": r.disabled,
|
|
10485
10492
|
"r-is-checked": m.value
|
|
10486
10493
|
})), m = i(() => r.value !== null && r.modelValue === r.value);
|
|
@@ -10943,7 +10950,7 @@ var kT = (e) => e.reduce((e, t) => [...e, ...t.options || []], []), AT = (e) =>
|
|
|
10943
10950
|
"select"
|
|
10944
10951
|
],
|
|
10945
10952
|
setup(e) {
|
|
10946
|
-
let t = A(null), n = A(null), r = A(null), { isInvalid: i } = _S(e.validate);
|
|
10953
|
+
let t = A(null), n = A(null), r = A(null), { isInvalid: i } = _S(() => e.validate);
|
|
10947
10954
|
return {
|
|
10948
10955
|
searchElement: t,
|
|
10949
10956
|
tagsElement: n,
|
|
@@ -11557,7 +11564,7 @@ var $T = /*#__PURE__*/ ww(jT, [["render", QT]]), eE = f({
|
|
|
11557
11564
|
U(() => JSON.stringify(e.to), () => {
|
|
11558
11565
|
d.value = e.to;
|
|
11559
11566
|
});
|
|
11560
|
-
let f = e.validate.map((e) => _S(e)), p = i(() => f.map((e) => e.validateErrorMessages.value).reduce((e, t) => e.concat(t), [])), m = i(() => f.some((e) => e.isInvalid.value)), g = i(() => s.value || eS()), _ = i(() => `tab-${g.value}`), v = i(() => {
|
|
11567
|
+
let f = e.validate.map((e) => _S(() => e)), p = i(() => f.map((e) => e.validateErrorMessages.value).reduce((e, t) => e.concat(t), [])), m = i(() => f.some((e) => e.isInvalid.value)), g = i(() => s.value || eS()), _ = i(() => `tab-${g.value}`), v = i(() => {
|
|
11561
11568
|
if (r) return r.value.find(({ tabId: e }) => e === _.value)?.isActive;
|
|
11562
11569
|
}), y = i(() => `tabpanel-${g.value}`), b = i(() => e.lazy ?? a?.value ?? !0), x = A(e.active);
|
|
11563
11570
|
U(v, (e) => {
|