@nivaro/react 0.3.10 → 0.3.11
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/dist/full.css +1 -1
- package/dist/hooks/useNivaroForm.js +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +34 -3
- package/dist/shared/components/CollectionBrowserView.js +1546 -1477
- package/dist/shared/components/ItemEditForm.js +4332 -4195
- package/dist/shared/components/PageRenderer.js +512 -465
- package/dist/shared/components/QueryStatStrip.js +74 -70
- package/dist/shared/components/ReportView.js +818 -827
- package/dist/shared/components/SheetHeaderBody.js +16 -14
- package/dist/shared/components/item-edit/CatalogPickerField.js +1029 -933
- package/dist/shared/components/item-edit/FieldRenderer.js +161 -156
- package/dist/shared/components/item-edit/FieldRow.js +20 -19
- package/dist/shared/components/item-edit/FilePickerField.js +52 -40
- package/dist/shared/components/item-edit/GroupSection.js +221 -221
- package/dist/shared/components/item-edit/InlineGridField.js +41 -41
- package/dist/shared/components/item-edit/InlineTableField.js +2249 -2238
- package/dist/shared/components/item-edit/M2MCombobox.js +46 -44
- package/dist/shared/components/item-edit/NestedRelationEditor.js +11 -11
- package/dist/shared/components/item-edit/QuickPicker.js +263 -216
- package/dist/shared/components/item-edit/RelationCombobox.js +285 -245
- package/dist/shared/components/item-edit/RichTextEditorImpl.js +42 -32
- package/dist/shared/components/item-edit/RowHistorySheet.js +130 -134
- package/dist/shared/components/item-edit/SummaryPanel.js +305 -279
- package/dist/shared/components/item-edit/helpers.js +133 -134
- package/dist/shared/components/item-edit/line-qty.js +57 -0
- package/dist/shared/components/item-edit/option-disambiguate.js +53 -0
- package/dist/shared/components/panels/AddendumLinesDiff.js +87 -90
- package/dist/shared/components/panels/CommentPanel.js +350 -315
- package/dist/shared/components/panels/ItemLockBanner.js +297 -230
- package/dist/shared/components/panels/PipelinePanel.js +719 -701
- package/dist/shared/components/queue/QueueQuickFilters.js +43 -41
- package/dist/shared/components/queue/QueueWorklist.js +1005 -935
- package/dist/shared/components/widgets/ReviewListWidget.js +99 -93
- package/dist/shared/lib/obligation-banner.js +14 -13
- package/dist/shared/lib/obligation-reason-text.js +13 -0
- package/dist/shared/lib/query-filter-seed.js +34 -11
- package/dist/shared/lib/sanitize-html.js +24 -15
- package/dist/shared/lib/sheet-def.js +38 -22
- package/dist/shared/lib/unique-options.js +10 -0
- package/dist/shared/lib/utils.js +57 -43
- package/dist/shared/lib/validation-rules.js +58 -34
- package/package.json +1 -1
|
@@ -1,27 +1,43 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
query_slug: a.header.query_slug,
|
|
7
|
-
params: a.header.params ?? {}
|
|
8
|
-
}),
|
|
9
|
-
stats: a.header.stats,
|
|
10
|
-
...a.header.as_of ? { asOf: a.header.as_of } : {}
|
|
11
|
-
} : null, e = Number.isInteger(a.initial_tab) ? a.initial_tab : 0, i = e >= 0 && e < l.length ? e : 0;
|
|
12
|
-
return { resolvedTabs: l, header: t, initialTab: i };
|
|
1
|
+
function c(n, o, r = "all") {
|
|
2
|
+
return n.replace(/\{\{\s*([\w.]+)\s*\}\}/g, (i, e) => {
|
|
3
|
+
const t = o == null ? void 0 : o[e];
|
|
4
|
+
return t == null || t === "" ? r : String(t).split(",").filter(Boolean).join(", ");
|
|
5
|
+
});
|
|
13
6
|
}
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
function b(n, o) {
|
|
8
|
+
const i = (n.tabs ?? (n.config ? [{ label: "View", config: n.config }] : [])).map((a) => {
|
|
9
|
+
if (a.matrix) return { label: a.label, matrix: a.matrix };
|
|
10
|
+
const s = o(a.config ?? {}), u = s.params;
|
|
11
|
+
return { label: a.label, config: s, ...a.note ? { note: c(a.note, u) } : {} };
|
|
12
|
+
});
|
|
13
|
+
let e = null;
|
|
14
|
+
if (n.header) {
|
|
15
|
+
const a = o({
|
|
16
|
+
query_slug: n.header.query_slug,
|
|
17
|
+
params: n.header.params ?? {}
|
|
18
|
+
}), s = a.params;
|
|
19
|
+
e = {
|
|
20
|
+
config: a,
|
|
21
|
+
stats: n.header.stats,
|
|
22
|
+
...n.header.as_of ? { asOf: n.header.as_of } : {},
|
|
23
|
+
...n.header.note ? { note: c(n.header.note, s) } : {}
|
|
24
|
+
};
|
|
21
25
|
}
|
|
22
|
-
|
|
26
|
+
const t = Number.isInteger(n.initial_tab) ? n.initial_tab : 0, l = t >= 0 && t < i.length ? t : 0;
|
|
27
|
+
return { resolvedTabs: i, header: e, initialTab: l };
|
|
28
|
+
}
|
|
29
|
+
function g(n, o) {
|
|
30
|
+
let r = null;
|
|
31
|
+
for (const i of n) {
|
|
32
|
+
const e = i[o];
|
|
33
|
+
if (e == null || e === "") continue;
|
|
34
|
+
const t = e instanceof Date ? e : String(e), l = new Date(t).getTime();
|
|
35
|
+
Number.isNaN(l) || (!r || l > r.at) && (r = { at: l, raw: t });
|
|
36
|
+
}
|
|
37
|
+
return (r == null ? void 0 : r.raw) ?? null;
|
|
23
38
|
}
|
|
24
39
|
export {
|
|
25
|
-
c as
|
|
26
|
-
|
|
40
|
+
c as fillSheetNote,
|
|
41
|
+
g as latestAsOf,
|
|
42
|
+
b as resolveSheetDef
|
|
27
43
|
};
|
package/dist/shared/lib/utils.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { clsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { twMerge as
|
|
4
|
-
import { serverNow as
|
|
5
|
-
function
|
|
6
|
-
return
|
|
1
|
+
import { clsx as d } from "clsx";
|
|
2
|
+
import * as h from "lucide-react";
|
|
3
|
+
import { twMerge as D } from "tailwind-merge";
|
|
4
|
+
import { serverNow as N } from "./server-clock.js";
|
|
5
|
+
function M(...t) {
|
|
6
|
+
return D(d(t));
|
|
7
7
|
}
|
|
8
8
|
let a = null;
|
|
9
|
-
function
|
|
9
|
+
function I(t) {
|
|
10
10
|
if (t)
|
|
11
11
|
try {
|
|
12
12
|
new Intl.DateTimeFormat("en-US", { timeZone: t });
|
|
@@ -15,10 +15,17 @@ function N(t) {
|
|
|
15
15
|
}
|
|
16
16
|
a = t;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function L() {
|
|
19
19
|
return a;
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
const g = /* @__PURE__ */ new Set(["1899-12-30", "1900-01-01"]);
|
|
22
|
+
function m(t) {
|
|
23
|
+
if (t == null || t === "") return !1;
|
|
24
|
+
const e = t instanceof Date ? Number.isNaN(t.getTime()) ? "" : t.toISOString() : String(t);
|
|
25
|
+
return g.has(e.slice(0, 10));
|
|
26
|
+
}
|
|
27
|
+
function _(t, e) {
|
|
28
|
+
if (m(t)) return "";
|
|
22
29
|
const n = typeof t == "string" ? t.match(/^(\d{4})-(\d{2})-(\d{2})(?:T00:00:00(?:\.000)?Z)?$/) : null, r = n ? new Date(Number(n[1]), Number(n[2]) - 1, Number(n[3])) : new Date(t);
|
|
23
30
|
return new Intl.DateTimeFormat("en-US", {
|
|
24
31
|
month: "short",
|
|
@@ -30,7 +37,12 @@ function $(t, e) {
|
|
|
30
37
|
...e
|
|
31
38
|
}).format(r);
|
|
32
39
|
}
|
|
33
|
-
function
|
|
40
|
+
function b(t) {
|
|
41
|
+
if (m(t)) return "";
|
|
42
|
+
const e = t instanceof Date ? null : String(t), n = e == null ? void 0 : e.match(/^(\d{4})-(\d{2})-(\d{2})(?:[T ]00:00:00(?:\.0+)?(?:Z|[+-]00:?00)?)?$/), r = n ? new Date(Number(n[1]), Number(n[2]) - 1, Number(n[3])) : t instanceof Date ? t : new Date(String(t));
|
|
43
|
+
return Number.isNaN(r.getTime()) ? String(t) : (n && r.setFullYear(Number(n[1])), r.toLocaleDateString());
|
|
44
|
+
}
|
|
45
|
+
function S(t) {
|
|
34
46
|
return new Intl.DateTimeFormat("en-US", {
|
|
35
47
|
...a ? { timeZone: a } : {},
|
|
36
48
|
month: "short",
|
|
@@ -40,11 +52,11 @@ function p(t) {
|
|
|
40
52
|
minute: "2-digit"
|
|
41
53
|
}).format(new Date(t));
|
|
42
54
|
}
|
|
43
|
-
let
|
|
55
|
+
let f = "relative", u = "en-US", l = !1;
|
|
44
56
|
function x(t) {
|
|
45
|
-
|
|
57
|
+
f = t === "exact" ? "exact" : "relative";
|
|
46
58
|
}
|
|
47
|
-
function
|
|
59
|
+
function U(t) {
|
|
48
60
|
if (t != null && t.locale)
|
|
49
61
|
try {
|
|
50
62
|
new Intl.NumberFormat(t.locale), u = t.locale;
|
|
@@ -60,7 +72,7 @@ function y(t, e) {
|
|
|
60
72
|
const r = t.toLowerCase();
|
|
61
73
|
return n.split(/\s+/).every((o) => r.includes(o));
|
|
62
74
|
}
|
|
63
|
-
function
|
|
75
|
+
function E(t) {
|
|
64
76
|
if (t == null || Number.isNaN(t)) return "—";
|
|
65
77
|
const e = Math.max(0, t);
|
|
66
78
|
if (e < 1) return `${Math.max(1, Math.round(e * 60))}m`;
|
|
@@ -74,65 +86,67 @@ function L(t) {
|
|
|
74
86
|
const r = Math.floor(n / 30), o = Math.round(n - r * 30);
|
|
75
87
|
return o > 0 ? `${r}mo ${o}d` : `${r}mo`;
|
|
76
88
|
}
|
|
77
|
-
function
|
|
78
|
-
if (
|
|
79
|
-
const e = new Date(t), n =
|
|
89
|
+
function C(t) {
|
|
90
|
+
if (f === "exact") return S(t);
|
|
91
|
+
const e = new Date(t), n = N() - e.getTime(), r = Math.floor(n / 6e4);
|
|
80
92
|
if (r < 1) return "just now";
|
|
81
93
|
if (r < 60) return `${r}m ago`;
|
|
82
94
|
const o = Math.floor(r / 60);
|
|
83
95
|
if (o < 24) return `${o}h ago`;
|
|
84
96
|
const i = Math.floor(o / 24);
|
|
85
|
-
return i < 7 ? `${i}d ago` :
|
|
97
|
+
return i < 7 ? `${i}d ago` : _(e);
|
|
86
98
|
}
|
|
87
99
|
function T(t) {
|
|
88
100
|
return t.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
|
|
89
101
|
}
|
|
90
|
-
const
|
|
102
|
+
const s = {
|
|
91
103
|
_and: [
|
|
92
104
|
{ is_redacted: { _eq: !1 } },
|
|
93
105
|
{ _or: [{ status: { _neq: "suspended" } }, { status: { _null: !0 } }] }
|
|
94
106
|
]
|
|
95
|
-
},
|
|
96
|
-
_and: [...
|
|
107
|
+
}, $ = {
|
|
108
|
+
_and: [...s._and, { account_kind: { _null: !0 } }]
|
|
97
109
|
};
|
|
98
|
-
function
|
|
99
|
-
return t ?
|
|
110
|
+
function O(t) {
|
|
111
|
+
return t ? s : $;
|
|
100
112
|
}
|
|
101
|
-
function
|
|
113
|
+
function A(t) {
|
|
102
114
|
const e = String(t ?? "");
|
|
103
115
|
return e.startsWith("$t:") ? T(e.slice(3).replace(/-/g, "_")) : e;
|
|
104
116
|
}
|
|
105
|
-
function
|
|
117
|
+
function R(t) {
|
|
106
118
|
return t == null ? "—" : l && Math.abs(t) >= 1e4 ? new Intl.NumberFormat(u, {
|
|
107
119
|
notation: "compact",
|
|
108
120
|
maximumFractionDigits: 1
|
|
109
121
|
}).format(t) : t.toLocaleString(u);
|
|
110
122
|
}
|
|
111
|
-
function
|
|
123
|
+
function Z(t) {
|
|
112
124
|
return t == null ? "—" : t < 1024 ? `${t} B` : t < 1024 * 1024 ? `${(t / 1024).toFixed(1)} KB` : t < 1024 * 1024 * 1024 ? `${(t / (1024 * 1024)).toFixed(1)} MB` : `${(t / (1024 * 1024 * 1024)).toFixed(2)} GB`;
|
|
113
125
|
}
|
|
114
|
-
function
|
|
126
|
+
function B(t) {
|
|
115
127
|
if (!t) return null;
|
|
116
128
|
const e = t.split("-").map((n) => n.charAt(0).toUpperCase() + n.slice(1)).join("");
|
|
117
|
-
return
|
|
129
|
+
return h[e];
|
|
118
130
|
}
|
|
119
131
|
export {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
132
|
+
s as ACTIVE_USER_OPTION_FILTER,
|
|
133
|
+
$ as PEOPLE_USER_OPTION_FILTER,
|
|
134
|
+
A as choiceLabel,
|
|
135
|
+
M as cn,
|
|
136
|
+
_ as formatDate,
|
|
137
|
+
S as formatDateTime,
|
|
138
|
+
Z as formatFileSize,
|
|
139
|
+
R as formatNumber,
|
|
140
|
+
C as formatRelative,
|
|
141
|
+
L as getDisplayTimezone,
|
|
142
|
+
E as humanHours,
|
|
143
|
+
m as isNullDate,
|
|
131
144
|
y as matchesAllTokens,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
145
|
+
B as resolveCollectionIcon,
|
|
146
|
+
I as setDisplayTimezone,
|
|
147
|
+
U as setNumberFormat,
|
|
135
148
|
x as setTimeDisplay,
|
|
136
149
|
T as titleCase,
|
|
137
|
-
|
|
150
|
+
b as toLocalDateString,
|
|
151
|
+
O as userOptionFilter
|
|
138
152
|
};
|
|
@@ -1,92 +1,116 @@
|
|
|
1
|
-
function
|
|
1
|
+
function l(t) {
|
|
2
2
|
return t == null || t === "" || Array.isArray(t) && t.length === 0;
|
|
3
3
|
}
|
|
4
|
-
function
|
|
4
|
+
function c(t) {
|
|
5
5
|
if (t == null || t === "") return null;
|
|
6
6
|
const n = new Date(String(t));
|
|
7
7
|
if (Number.isNaN(n.getTime())) return null;
|
|
8
|
-
const
|
|
9
|
-
return Math.round((
|
|
8
|
+
const r = /* @__PURE__ */ new Date(), s = Date.UTC(n.getFullYear(), n.getMonth(), n.getDate()), e = Date.UTC(r.getFullYear(), r.getMonth(), r.getDate());
|
|
9
|
+
return Math.round((s - e) / 864e5);
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function d(t) {
|
|
12
12
|
const n = String(t ?? "").trim();
|
|
13
13
|
if (!n) return { stored: null, display: "", valid: !0 };
|
|
14
|
-
const
|
|
15
|
-
if (
|
|
16
|
-
const e =
|
|
14
|
+
const r = n.startsWith("+"), s = n.replace(/\D/g, "");
|
|
15
|
+
if (s.length === 0) return { stored: null, display: n, valid: !1 };
|
|
16
|
+
const e = s.length === 10 && !r ? s : s.length === 11 && s.startsWith("1") ? s.slice(1) : null;
|
|
17
17
|
return e ? {
|
|
18
18
|
stored: `+1${e}`,
|
|
19
19
|
display: `+1 (${e.slice(0, 3)}) ${e.slice(3, 6)}-${e.slice(6)}`,
|
|
20
20
|
valid: !0
|
|
21
|
-
} :
|
|
21
|
+
} : r && s.length >= 8 && s.length <= 15 ? { stored: `+${s}`, display: `+${s}`, valid: !0 } : { stored: r ? `+${s}` : s, display: n, valid: !1 };
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
const n =
|
|
23
|
+
function y(t) {
|
|
24
|
+
const n = d(t);
|
|
25
25
|
return n.valid && n.stored ? n.display : String(t ?? "");
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function f(t, n, r) {
|
|
28
28
|
switch (n) {
|
|
29
29
|
case "null":
|
|
30
|
-
return
|
|
30
|
+
return l(t);
|
|
31
31
|
case "nnull":
|
|
32
|
-
return !
|
|
32
|
+
return !l(t);
|
|
33
33
|
case "neq":
|
|
34
|
-
return String(t ?? "") !== String(
|
|
34
|
+
return String(t ?? "") !== String(r ?? "");
|
|
35
35
|
case "in":
|
|
36
|
-
return (Array.isArray(
|
|
36
|
+
return (Array.isArray(r) ? r : String(r ?? "").split(",")).some((e) => String(e).trim() === String(t ?? ""));
|
|
37
37
|
default:
|
|
38
|
-
return String(t ?? "") === String(
|
|
38
|
+
return String(t ?? "") === String(r ?? "");
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function m(t, n) {
|
|
42
|
+
const r = (i) => typeof i == "number" ? i : typeof i == "string" && /^\s*-?(\d+\.?\d*|\.\d+)\s*$/.test(i) ? Number(i) : null, s = r(t), e = r(n);
|
|
43
|
+
if (s !== null && e !== null && Number.isFinite(s) && Number.isFinite(e)) return s - e;
|
|
44
|
+
const u = (i) => i instanceof Date ? Number.isNaN(i.getTime()) ? null : i.toISOString().slice(0, 10) : typeof i == "string" && /^\d{4}-\d{2}-\d{2}/.test(i) ? i.slice(0, 10) : null, o = u(t), a = u(n);
|
|
45
|
+
return o === null || a === null ? null : o < a ? -1 : o > a ? 1 : 0;
|
|
46
|
+
}
|
|
47
|
+
function g(t, n, r, s, e, u) {
|
|
48
|
+
if (!r || !s) return null;
|
|
49
|
+
const o = s[r];
|
|
50
|
+
if (l(n) || l(o)) return null;
|
|
51
|
+
const a = m(n, o);
|
|
52
|
+
if (a === null) return null;
|
|
53
|
+
const i = r.replace(/_/g, " ");
|
|
54
|
+
return t === "gte_field" && a < 0 ? u ?? `${e} must be on or after ${i}` : t === "lte_field" && a > 0 ? u ?? `${e} must be on or before ${i}` : null;
|
|
55
|
+
}
|
|
56
|
+
function $(t, n, r, s) {
|
|
42
57
|
if (t.type === "required_if") {
|
|
43
58
|
const e = t.field;
|
|
44
|
-
return !e || !
|
|
59
|
+
return !e || !s || !f(s[e], String(t.op ?? "eq"), t.value) ? null : l(n) ? t.message ?? `${r} is required when ${e} matches this condition` : null;
|
|
45
60
|
}
|
|
46
|
-
if (
|
|
61
|
+
if (t.type === "gte_field" || t.type === "lte_field")
|
|
62
|
+
return g(
|
|
63
|
+
t.type,
|
|
64
|
+
n,
|
|
65
|
+
t.field,
|
|
66
|
+
s,
|
|
67
|
+
r,
|
|
68
|
+
t.message
|
|
69
|
+
);
|
|
70
|
+
if (l(n) && t.type !== "required") return null;
|
|
47
71
|
switch (t.type) {
|
|
48
72
|
case "required":
|
|
49
|
-
return
|
|
73
|
+
return l(n) ? t.message ?? `${r} is required` : null;
|
|
50
74
|
case "min": {
|
|
51
75
|
const e = Number(t.value);
|
|
52
|
-
return typeof n == "number" && n < e ? t.message ?? `${
|
|
76
|
+
return typeof n == "number" && n < e ? t.message ?? `${r} must be at least ${e}` : typeof n == "string" && n.length < e ? t.message ?? `${r} must be at least ${e} characters` : null;
|
|
53
77
|
}
|
|
54
78
|
case "max": {
|
|
55
79
|
const e = Number(t.value);
|
|
56
|
-
return typeof n == "number" && n > e ? t.message ?? `${
|
|
80
|
+
return typeof n == "number" && n > e ? t.message ?? `${r} must be at most ${e}` : typeof n == "string" && n.length > e ? t.message ?? `${r} must be at most ${e} characters` : null;
|
|
57
81
|
}
|
|
58
82
|
case "regex":
|
|
59
83
|
try {
|
|
60
|
-
return new RegExp(String(t.value)).test(String(n)) ? null : t.message ?? `${
|
|
84
|
+
return new RegExp(String(t.value)).test(String(n)) ? null : t.message ?? `${r} is invalid`;
|
|
61
85
|
} catch {
|
|
62
86
|
return null;
|
|
63
87
|
}
|
|
64
88
|
case "email":
|
|
65
|
-
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(n)) ? null : t.message ?? `${
|
|
89
|
+
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(n)) ? null : t.message ?? `${r} must be a valid email`;
|
|
66
90
|
case "phone":
|
|
67
|
-
return
|
|
91
|
+
return d(n).valid ? null : t.message ?? `${r} must be a valid phone number`;
|
|
68
92
|
case "url":
|
|
69
93
|
try {
|
|
70
94
|
return new URL(String(n)), null;
|
|
71
95
|
} catch {
|
|
72
|
-
return t.message ?? `${
|
|
96
|
+
return t.message ?? `${r} must be a valid URL`;
|
|
73
97
|
}
|
|
74
98
|
// Date must be at least N calendar days from today (e.g. delivery-date
|
|
75
99
|
// minimums). max_days_from_today caps how far out a date may be.
|
|
76
100
|
case "min_days_from_today": {
|
|
77
|
-
const e =
|
|
78
|
-
return e === null || Number.isNaN(
|
|
101
|
+
const e = c(n), u = Number(t.value);
|
|
102
|
+
return e === null || Number.isNaN(u) || e >= u ? null : t.message ?? `${r} must be at least ${u} days from today`;
|
|
79
103
|
}
|
|
80
104
|
case "max_days_from_today": {
|
|
81
|
-
const e =
|
|
82
|
-
return e === null || Number.isNaN(
|
|
105
|
+
const e = c(n), u = Number(t.value);
|
|
106
|
+
return e === null || Number.isNaN(u) || e <= u ? null : t.message ?? `${r} must be within ${u} days of today`;
|
|
83
107
|
}
|
|
84
108
|
default:
|
|
85
109
|
return null;
|
|
86
110
|
}
|
|
87
111
|
}
|
|
88
112
|
export {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
113
|
+
$ as applyValidationRule,
|
|
114
|
+
y as formatPhone,
|
|
115
|
+
d as normalizePhone
|
|
92
116
|
};
|