@rebilly/revel 13.1.6 → 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 CHANGED
@@ -1,5 +1,5 @@
1
- ## 13.1.6 (2026-10-13)
1
+ ## 13.1.7 (2026-10-15)
2
2
 
3
3
  ### Bug Fixes
4
4
 
5
- - **recomm, revel:** list Files API image types on logo dropzones ([#28942](https://github.com/Rebilly/rebilly/pull/28942))
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(validate: Voidable<ValidationState>): {
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 n(e) {
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 e && (typeof e == "string" ? t.push(e) : Array.isArray(e) ? t.push(...e.reduce((e, t) => (typeof t == "string" ? e.push(t) : typeof t == "object" && "$message" in t && e.push(n(t)), e), [])) : typeof e == "object" && "$errors" in e && t.push(...e.$errors.map((e) => n(e)))), t;
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(() => e && typeof e == "object" && "$invalid" in e && "$dirty" in e ? e.$invalid && e.$dirty : t.value.length > 0)
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: n, isInvalid: r } = _S(t.validate);
7644
- return (i, a) => z(r) && t.showValidateMessages ? (D(!0), s(e, { key: 0 }, M(z(n), (e, t) => (D(), s("span", {
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(() => {
@@ -9392,7 +9395,7 @@ var cw = { class: "r-file-dropzone-fields" }, lw = { class: "r-file-dropzone-hea
9392
9395
  },
9393
9396
  emits: ["update:modelValue"],
9394
9397
  setup(t, { emit: n }) {
9395
- 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({
9396
9399
  dropzoneHighlight: !1,
9397
9400
  invalidFiles: []
9398
9401
  }), g = i({
@@ -9829,7 +9832,7 @@ var Ow = /*#__PURE__*/ ww(Tw, [["render", Dw]]), kw = ["for"], Aw = [
9829
9832
  "right-icon-click"
9830
9833
  ],
9831
9834
  setup(t, { expose: n, emit: r }) {
9832
- 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(() => {
9833
9836
  let e = {};
9834
9837
  return l.leftIcon && (e["r-has-icon-left"] = !0), (l.rightIcon || l.password) && (e["r-has-icon-right"] = !0), e;
9835
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)`);
@@ -10484,7 +10487,7 @@ var Ow = /*#__PURE__*/ ww(Tw, [["render", Dw]]), kw = ["for"], Aw = [
10484
10487
  },
10485
10488
  emits: ["update:modelValue"],
10486
10489
  setup(t, { emit: n }) {
10487
- 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(() => ({
10488
10491
  "r-is-disabled": r.disabled,
10489
10492
  "r-is-checked": m.value
10490
10493
  })), m = i(() => r.value !== null && r.modelValue === r.value);
@@ -10947,7 +10950,7 @@ var kT = (e) => e.reduce((e, t) => [...e, ...t.options || []], []), AT = (e) =>
10947
10950
  "select"
10948
10951
  ],
10949
10952
  setup(e) {
10950
- 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);
10951
10954
  return {
10952
10955
  searchElement: t,
10953
10956
  tagsElement: n,
@@ -11561,7 +11564,7 @@ var $T = /*#__PURE__*/ ww(jT, [["render", QT]]), eE = f({
11561
11564
  U(() => JSON.stringify(e.to), () => {
11562
11565
  d.value = e.to;
11563
11566
  });
11564
- 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(() => {
11565
11568
  if (r) return r.value.find(({ tabId: e }) => e === _.value)?.isActive;
11566
11569
  }), y = i(() => `tabpanel-${g.value}`), b = i(() => e.lazy ?? a?.value ?? !0), x = A(e.active);
11567
11570
  U(v, (e) => {