@nivaro/react 0.1.241 → 0.1.242
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/index.js +357 -342
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { QueryClientContext as JN, QueryClient as HN, QueryClientProvider as YN,
|
|
|
3
3
|
import * as Sr from "react";
|
|
4
4
|
import hi, { createContext as Aa, useContext as ca, useState as S, useCallback as ln, useSyncExternalStore as XN, useEffect as Le, useMemo as we, useRef as Qe, Fragment as La, useLayoutEffect as Wc, useId as Tp, memo as Cv } from "react";
|
|
5
5
|
import * as $v from "lucide-react";
|
|
6
|
-
import { RefreshCw as Ki, ChevronDown as $n, Check as _n, X as Zt, LayoutGrid as vf, Bell as ks, BellRing as mo, Clock as Hl, ChartColumn as ZN, History as Vl, FlaskConical as Mx, Activity as sb, Plus as En, Gauge as qv, Users as Xo, Lock as bo, Pencil as Jl, Trash2 as ia, Siren as Dx, Minus as u0, Search as Qr, ChevronsUpDown as zi, ArrowRight as us, KeyRound as m0, Braces as lb, Loader2 as Wt, Copy as Ql,
|
|
6
|
+
import { RefreshCw as Ki, ChevronDown as $n, Check as _n, X as Zt, LayoutGrid as vf, Bell as ks, BellRing as mo, Clock as Hl, ChartColumn as ZN, History as Vl, FlaskConical as Mx, Activity as sb, Plus as En, Gauge as qv, Users as Xo, Lock as bo, Pencil as Jl, Trash2 as ia, Siren as Dx, Minus as u0, Search as Qr, ChevronsUpDown as zi, ArrowRight as us, KeyRound as m0, Braces as lb, Loader2 as Wt, Copy as Ql, AlertCircle as Ii, AlertTriangle as ga, Upload as xo, MessageSquareWarning as ew, RotateCcw as ol, MessageSquare as Qc, SmilePlus as ib, Link2 as Mc, Unlink as tw, ListChecks as em, SquarePen as nw, Rows3 as tm, PanelBottomOpen as rw, ChevronRight as da, GripVertical as Dc, FileUp as kf, GripHorizontal as aw, Star as Jo, MapPin as Nf, Download as Zo, File as wf, FileVideo as sw, FileAudio as lw, FileText as fp, FileSpreadsheet as ob, FileCode as iw, Sparkles as Ho, MoreVertical as ow, MoreHorizontal as gm, Clipboard as Fv, Calendar as dw, Paperclip as Cc, Folder as cw, Phone as jp, Mail as Pc, UserCheck as Tv, UserPlus as db, User as Ap, Zap as p0, Power as uw, Filter as Vc, Sliders as mw, Settings as h0, Pause as pw, Play as cb, HelpCircle as jv, Info as Jc, Flag as hw, Bookmark as Av, Heart as fw, Unlock as bw, EyeOff as xw, Eye as ed, Send as f0, Save as Op, Edit2 as gw, Edit as yw, XCircle as vw, CheckCircle as kw, Share2 as Nw, Link as Ov, ExternalLink as vo, ArrowUpRight as Lv, ArrowDown as ww, ArrowUp as _w, ArrowLeft as Bd, Sigma as b0, SlidersHorizontal as Rv, Building2 as Ev, MessageCircle as ub, Bold as Sw, Italic as Cw, UnderlineIcon as $w, Strikethrough as qw, Heading1 as Fw, Heading2 as Tw, Heading3 as jw, List as Aw, ListOrdered as Ow, Quote as Lw, Code as Rw, Link2Off as Mv, FileSymlink as Dv, ChevronLeft as po, ChevronsLeft as Ew, ChevronsRight as Mw, FileDiff as mb, ClipboardPlus as Pv, CheckCircle2 as Dw, Clock3 as Pw, Code2 as Kw, Satellite as Px, LockOpen as Kx, CopyPlus as Iw, GitBranch as sh, CalendarClock as x0, GitCompareArrows as zw, ClipboardList as Uw, GitFork as _f, Network as Bw, Wrench as Kv, ShieldAlert as Ww, UploadCloud as Qw, Wand2 as Sf, BookOpen as Vw, FileDown as Ix, RotateCw as bp, Map as Jw, Rows2 as Iv, BellOff as Lp, Pin as nm, Hash as Cf, PlayCircle as Hw, LogOut as zv, Video as Yw, CheckCheck as pb, Inbox as rm, ChevronUp as Uv, FileBarChart as Gw, Undo2 as Bv, UserRound as Rp, Camera as am, ShieldCheck as Xw, ServerCrash as Zw, Compass as e5, Ban as g0, ScrollText as t5, BarChart3 as n5, AlarmClock as zx, WifiOff as r5, Users2 as sm, PlugZap as a5, Flame as s5, Rows4 as l5, PanelLeftClose as i5, Settings2 as Wv, Table as o5, StickyNote as d5, TrendingUp as c5, TrendingDown as u5 } from "lucide-react";
|
|
7
7
|
import { readItems as Md, readMyScopes as Qv, listNotificationSubscriptions as m5, deleteNotificationSubscription as p5, listImportTemplates as h5, setMyDelegate as f5, readUser as Vv, readUserCard as b5, updateUser as Ux, saveMyScopeDefaults as x5, markNotificationRead as Jv, readUnreadNotificationCount as g5, listNotifications as y5, markNotificationsRead as v5, markAllNotificationsRead as k5, readReportWidgetData as Rm, listReportAlerts as N5, createReportAlert as w5, toggleReportAlert as _5, deleteReportAlert as S5, readReportAlertLog as C5, resolveReportAlert as $5, readReportFilterOptions as q5, executeCustomQuery as F5, saveReportFilterPreset as Bx, listReportFilterPresets as T5, deleteReportFilterPreset as j5, readReport as A5, aiReportFilters as O5, endSessionRecording as Wx, sessionRecordingEnabled as L5, appendSessionRecordingEvents as Qx, startSessionRecording as Vx } from "@nivaro/sdk";
|
|
8
8
|
import { clsx as R5 } from "clsx";
|
|
9
9
|
import { twMerge as E5 } from "tailwind-merge";
|
|
@@ -5048,6 +5048,205 @@ function $1(t, n, a) {
|
|
|
5048
5048
|
var s;
|
|
5049
5049
|
(s = Uu.get(t)) == null || s(n, a);
|
|
5050
5050
|
}
|
|
5051
|
+
function n2(t) {
|
|
5052
|
+
return t.row != null && t.column ? `Row ${t.row} · ${t.column}` : t.row != null ? `Row ${t.row}` : t.column ? t.column : null;
|
|
5053
|
+
}
|
|
5054
|
+
function Rf({
|
|
5055
|
+
issues: t,
|
|
5056
|
+
onDismiss: n
|
|
5057
|
+
}) {
|
|
5058
|
+
if (t.length === 0) return null;
|
|
5059
|
+
const a = t.some((s) => s.severity === "error");
|
|
5060
|
+
return /* @__PURE__ */ r(
|
|
5061
|
+
"div",
|
|
5062
|
+
{
|
|
5063
|
+
className: Q(
|
|
5064
|
+
"rounded-lg border p-3",
|
|
5065
|
+
a ? "border-red-200 bg-red-50 dark:border-red-500/30 dark:bg-red-500/10" : "border-amber-200 bg-amber-50 dark:border-amber-500/30 dark:bg-amber-500/10"
|
|
5066
|
+
),
|
|
5067
|
+
children: [
|
|
5068
|
+
/* @__PURE__ */ r("div", { className: "mb-2 flex items-center justify-between gap-2", children: [
|
|
5069
|
+
/* @__PURE__ */ e(
|
|
5070
|
+
"p",
|
|
5071
|
+
{
|
|
5072
|
+
className: Q(
|
|
5073
|
+
"text-[11px] font-semibold uppercase tracking-wide",
|
|
5074
|
+
a ? "text-red-700 dark:text-red-400" : "text-amber-700 dark:text-amber-400"
|
|
5075
|
+
),
|
|
5076
|
+
children: a ? "Import errors" : "Import warnings"
|
|
5077
|
+
}
|
|
5078
|
+
),
|
|
5079
|
+
!a && n && /* @__PURE__ */ e(
|
|
5080
|
+
st,
|
|
5081
|
+
{
|
|
5082
|
+
type: "button",
|
|
5083
|
+
variant: "ghost",
|
|
5084
|
+
size: "sm",
|
|
5085
|
+
className: "h-6 px-2 text-[11px]",
|
|
5086
|
+
onClick: n,
|
|
5087
|
+
children: "Dismiss"
|
|
5088
|
+
}
|
|
5089
|
+
)
|
|
5090
|
+
] }),
|
|
5091
|
+
/* @__PURE__ */ e("ul", { className: "space-y-1.5", children: t.map((s, l) => {
|
|
5092
|
+
const i = n2(s), o = `${s.rule}-${s.row ?? ""}-${s.column ?? ""}-${l}`;
|
|
5093
|
+
return /* @__PURE__ */ r("li", { className: "flex items-start gap-2 text-[12px]", children: [
|
|
5094
|
+
s.severity === "error" ? /* @__PURE__ */ e(Ii, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-red-500" }) : /* @__PURE__ */ e(ga, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-amber-500" }),
|
|
5095
|
+
/* @__PURE__ */ r(
|
|
5096
|
+
"span",
|
|
5097
|
+
{
|
|
5098
|
+
className: a ? "text-red-700 dark:text-red-300" : "text-amber-700 dark:text-amber-300",
|
|
5099
|
+
children: [
|
|
5100
|
+
i && /* @__PURE__ */ r("span", { className: "font-medium", children: [
|
|
5101
|
+
i,
|
|
5102
|
+
" · "
|
|
5103
|
+
] }),
|
|
5104
|
+
s.message
|
|
5105
|
+
]
|
|
5106
|
+
}
|
|
5107
|
+
)
|
|
5108
|
+
] }, o);
|
|
5109
|
+
}) })
|
|
5110
|
+
]
|
|
5111
|
+
}
|
|
5112
|
+
);
|
|
5113
|
+
}
|
|
5114
|
+
function r2(t) {
|
|
5115
|
+
const n = new Set(t.flatMap((a) => a.file_types));
|
|
5116
|
+
return Array.from(n).map((a) => `.${a}`).join(",");
|
|
5117
|
+
}
|
|
5118
|
+
function dm({
|
|
5119
|
+
collection: t,
|
|
5120
|
+
templateFilter: n,
|
|
5121
|
+
getLabel: a,
|
|
5122
|
+
onParsed: s,
|
|
5123
|
+
compact: l = !1
|
|
5124
|
+
}) {
|
|
5125
|
+
var _;
|
|
5126
|
+
const i = ze(), o = Qe(null), d = Qe(null), [u, c] = S(!1), [m, p] = S(null), h = m != null, [f, v] = S(null), { data: x } = me({
|
|
5127
|
+
queryKey: ["import-templates", t],
|
|
5128
|
+
queryFn: () => i.request(h5(t))
|
|
5129
|
+
}), g = (x == null ? void 0 : x.data) ?? [], b = n ? g.filter(n) : g;
|
|
5130
|
+
if (b.length === 0) return null;
|
|
5131
|
+
function y(w) {
|
|
5132
|
+
var j;
|
|
5133
|
+
d.current = w, v(null), c(!1), (j = o.current) == null || j.click();
|
|
5134
|
+
}
|
|
5135
|
+
async function $(w) {
|
|
5136
|
+
var q, M;
|
|
5137
|
+
const j = (q = w.target.files) == null ? void 0 : q[0], F = d.current;
|
|
5138
|
+
if (w.target.value = "", !(!j || !F)) {
|
|
5139
|
+
p(j.name), v(null);
|
|
5140
|
+
try {
|
|
5141
|
+
const L = await i.importParse(F.id, j);
|
|
5142
|
+
s(L, F);
|
|
5143
|
+
} catch (L) {
|
|
5144
|
+
const E = L;
|
|
5145
|
+
(M = E.issues) != null && M.length ? v(E) : Me.error(E.message || "Import parse failed", { duration: 8e3 });
|
|
5146
|
+
} finally {
|
|
5147
|
+
p(null);
|
|
5148
|
+
}
|
|
5149
|
+
}
|
|
5150
|
+
}
|
|
5151
|
+
const C = (w) => a ? a(w) : w.button_label, T = b[0] ? (_ = C(b[0])) == null ? void 0 : _.trim() : void 0, N = T && b.every((w) => C(w) === C(b[0])) ? T : null, k = h ? /* @__PURE__ */ r(ht, { children: [
|
|
5152
|
+
/* @__PURE__ */ e(Wt, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
5153
|
+
" Importing…"
|
|
5154
|
+
] }) : /* @__PURE__ */ r(ht, { children: [
|
|
5155
|
+
/* @__PURE__ */ e(xo, { className: "h-3.5 w-3.5" }),
|
|
5156
|
+
" ",
|
|
5157
|
+
N ?? "Import from file"
|
|
5158
|
+
] });
|
|
5159
|
+
return /* @__PURE__ */ r("div", { className: "flex flex-col gap-2", children: [
|
|
5160
|
+
/* @__PURE__ */ e(
|
|
5161
|
+
"input",
|
|
5162
|
+
{
|
|
5163
|
+
ref: o,
|
|
5164
|
+
type: "file",
|
|
5165
|
+
className: "hidden",
|
|
5166
|
+
accept: r2(b),
|
|
5167
|
+
onChange: $
|
|
5168
|
+
}
|
|
5169
|
+
),
|
|
5170
|
+
b.length === 1 ? l ? /* @__PURE__ */ e(
|
|
5171
|
+
"button",
|
|
5172
|
+
{
|
|
5173
|
+
type: "button",
|
|
5174
|
+
disabled: h,
|
|
5175
|
+
onClick: () => y(b[0]),
|
|
5176
|
+
className: "inline-flex h-6 items-center gap-1 rounded border border-slate-200 px-2.5 text-[11px] text-slate-600 transition-colors hover:border-slate-400 hover:text-slate-800 disabled:opacity-50 dark:border-border dark:text-slate-300",
|
|
5177
|
+
children: k
|
|
5178
|
+
}
|
|
5179
|
+
) : /* @__PURE__ */ e(
|
|
5180
|
+
st,
|
|
5181
|
+
{
|
|
5182
|
+
type: "button",
|
|
5183
|
+
variant: "outline",
|
|
5184
|
+
size: "sm",
|
|
5185
|
+
disabled: h,
|
|
5186
|
+
onClick: () => y(b[0]),
|
|
5187
|
+
children: k
|
|
5188
|
+
}
|
|
5189
|
+
) : /* @__PURE__ */ r(nr, { open: u, onOpenChange: c, children: [
|
|
5190
|
+
/* @__PURE__ */ e(ar, { asChild: !0, children: l ? /* @__PURE__ */ e(
|
|
5191
|
+
"button",
|
|
5192
|
+
{
|
|
5193
|
+
type: "button",
|
|
5194
|
+
disabled: h,
|
|
5195
|
+
className: "inline-flex h-6 items-center gap-1 rounded border border-slate-200 px-2.5 text-[11px] text-slate-600 transition-colors hover:border-slate-400 hover:text-slate-800 disabled:opacity-50 dark:border-border dark:text-slate-300",
|
|
5196
|
+
children: k
|
|
5197
|
+
}
|
|
5198
|
+
) : /* @__PURE__ */ e(st, { type: "button", variant: "outline", size: "sm", disabled: h, children: k }) }),
|
|
5199
|
+
/* @__PURE__ */ e(Zn, { className: "w-[220px] p-0", align: "start", children: /* @__PURE__ */ r(Ns, { children: [
|
|
5200
|
+
/* @__PURE__ */ e(Ls, { placeholder: "Search templates…", className: "h-8 text-[12px]" }),
|
|
5201
|
+
/* @__PURE__ */ r(ws, { children: [
|
|
5202
|
+
/* @__PURE__ */ e(Rs, { children: "No template found." }),
|
|
5203
|
+
b.map((w) => /* @__PURE__ */ e(
|
|
5204
|
+
Na,
|
|
5205
|
+
{
|
|
5206
|
+
value: w.name,
|
|
5207
|
+
onSelect: () => y(w),
|
|
5208
|
+
children: w.name
|
|
5209
|
+
},
|
|
5210
|
+
w.id
|
|
5211
|
+
))
|
|
5212
|
+
] })
|
|
5213
|
+
] }) })
|
|
5214
|
+
] }),
|
|
5215
|
+
(f == null ? void 0 : f.issues) && zr(
|
|
5216
|
+
/* @__PURE__ */ e(
|
|
5217
|
+
"div",
|
|
5218
|
+
{
|
|
5219
|
+
className: "fixed inset-0 z-[80] flex items-center justify-center bg-black/40 p-4",
|
|
5220
|
+
onClick: () => v(null),
|
|
5221
|
+
children: /* @__PURE__ */ r(
|
|
5222
|
+
"div",
|
|
5223
|
+
{
|
|
5224
|
+
className: "max-h-[70vh] w-full max-w-[520px] overflow-y-auto rounded-lg border border-slate-200 bg-white p-4 shadow-xl dark:border-border dark:bg-card",
|
|
5225
|
+
onClick: (w) => w.stopPropagation(),
|
|
5226
|
+
children: [
|
|
5227
|
+
/* @__PURE__ */ e("p", { className: "mb-2 text-[13px] font-semibold text-red-600 dark:text-red-400", children: f.message || "Import parse failed" }),
|
|
5228
|
+
/* @__PURE__ */ e(Rf, { issues: f.issues }),
|
|
5229
|
+
/* @__PURE__ */ e("div", { className: "mt-3 flex justify-end", children: /* @__PURE__ */ e(st, { type: "button", variant: "outline", size: "sm", onClick: () => v(null), children: "Close" }) })
|
|
5230
|
+
]
|
|
5231
|
+
}
|
|
5232
|
+
)
|
|
5233
|
+
}
|
|
5234
|
+
),
|
|
5235
|
+
document.body
|
|
5236
|
+
),
|
|
5237
|
+
h && zr(
|
|
5238
|
+
/* @__PURE__ */ e("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/40", children: /* @__PURE__ */ r("div", { className: "flex items-center gap-3 rounded-lg border bg-background px-5 py-4 shadow-lg", children: [
|
|
5239
|
+
/* @__PURE__ */ e(Wt, { className: "h-5 w-5 animate-spin text-muted-foreground" }),
|
|
5240
|
+
/* @__PURE__ */ r("div", { className: "text-[13px]", children: [
|
|
5241
|
+
"Processing ",
|
|
5242
|
+
/* @__PURE__ */ e("span", { className: "font-medium", children: m }),
|
|
5243
|
+
"…"
|
|
5244
|
+
] })
|
|
5245
|
+
] }) }),
|
|
5246
|
+
document.body
|
|
5247
|
+
)
|
|
5248
|
+
] });
|
|
5249
|
+
}
|
|
5051
5250
|
function cr(t, n) {
|
|
5052
5251
|
return t ? t.replace(/\{\{([^}]+)\}\}/g, (a, s) => {
|
|
5053
5252
|
const l = s.trim().split(".");
|
|
@@ -5165,7 +5364,7 @@ function iL(t, n, a) {
|
|
|
5165
5364
|
}
|
|
5166
5365
|
return f;
|
|
5167
5366
|
}
|
|
5168
|
-
function
|
|
5367
|
+
function a2({
|
|
5169
5368
|
cascadeRules: t,
|
|
5170
5369
|
cascadeFilter: n,
|
|
5171
5370
|
currentValue: a,
|
|
@@ -5229,7 +5428,7 @@ function Bu(t, n) {
|
|
|
5229
5428
|
const a = Nr(t), s = (a == null ? void 0 : a.col_span) ?? 0, l = [3, 4, 6, 12].includes(s) ? s : 12;
|
|
5230
5429
|
return n < 480 ? 12 : n < 800 ? l <= 6 ? 6 : 12 : l;
|
|
5231
5430
|
}
|
|
5232
|
-
function
|
|
5431
|
+
function s2(t) {
|
|
5233
5432
|
if (!t) return "";
|
|
5234
5433
|
try {
|
|
5235
5434
|
return new Date(String(t)).toISOString().slice(0, 16);
|
|
@@ -5368,11 +5567,11 @@ function wm({
|
|
|
5368
5567
|
);
|
|
5369
5568
|
}
|
|
5370
5569
|
let _m = 1;
|
|
5371
|
-
function
|
|
5570
|
+
function l2(t) {
|
|
5372
5571
|
const n = Number(t);
|
|
5373
5572
|
_m = Number.isFinite(n) && n >= 1 && n <= 12 ? n : 1;
|
|
5374
5573
|
}
|
|
5375
|
-
function
|
|
5574
|
+
function i2() {
|
|
5376
5575
|
return _m;
|
|
5377
5576
|
}
|
|
5378
5577
|
function j1(t, n = _m) {
|
|
@@ -5383,7 +5582,7 @@ function A1(t, n = _m) {
|
|
|
5383
5582
|
const a = (t.getMonth() + 1 - n + 12) % 12;
|
|
5384
5583
|
return Math.floor(a / 3) + 1;
|
|
5385
5584
|
}
|
|
5386
|
-
function
|
|
5585
|
+
function o2(t, n = _m) {
|
|
5387
5586
|
return `FY${j1(t, n)}-Q${A1(t, n)}`;
|
|
5388
5587
|
}
|
|
5389
5588
|
const eg = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\[\d+\])*/;
|
|
@@ -5392,7 +5591,7 @@ class oo extends Error {
|
|
|
5392
5591
|
super(n), this.at = a;
|
|
5393
5592
|
}
|
|
5394
5593
|
}
|
|
5395
|
-
function
|
|
5594
|
+
function d2(t) {
|
|
5396
5595
|
const n = [];
|
|
5397
5596
|
let a = 0;
|
|
5398
5597
|
for (; a < t.length; ) {
|
|
@@ -5443,7 +5642,7 @@ function i2(t) {
|
|
|
5443
5642
|
}
|
|
5444
5643
|
return n.push({ t: "end", at: t.length }), n;
|
|
5445
5644
|
}
|
|
5446
|
-
const
|
|
5645
|
+
const c2 = {
|
|
5447
5646
|
"||": 1,
|
|
5448
5647
|
"&&": 2,
|
|
5449
5648
|
"==": 3,
|
|
@@ -5460,7 +5659,7 @@ const o2 = {
|
|
|
5460
5659
|
function Sb(t) {
|
|
5461
5660
|
let n;
|
|
5462
5661
|
try {
|
|
5463
|
-
n =
|
|
5662
|
+
n = d2(t);
|
|
5464
5663
|
} catch (c) {
|
|
5465
5664
|
return c instanceof oo ? { ok: !1, error: c.message, position: c.at } : { ok: !1, error: "Could not read the expression", position: 0 };
|
|
5466
5665
|
}
|
|
@@ -5476,7 +5675,7 @@ function Sb(t) {
|
|
|
5476
5675
|
for (; ; ) {
|
|
5477
5676
|
const p = s();
|
|
5478
5677
|
if (p.t !== "op") break;
|
|
5479
|
-
const h =
|
|
5678
|
+
const h = c2[p.v];
|
|
5480
5679
|
if (h === void 0 || h < c) break;
|
|
5481
5680
|
a++;
|
|
5482
5681
|
const f = o(h + 1);
|
|
@@ -5543,7 +5742,7 @@ function Sb(t) {
|
|
|
5543
5742
|
return c instanceof i ? { ok: !1, error: c.message, position: c.at } : { ok: !1, error: "Could not parse the expression", position: 0 };
|
|
5544
5743
|
}
|
|
5545
5744
|
}
|
|
5546
|
-
function
|
|
5745
|
+
function u2(t, n) {
|
|
5547
5746
|
if (t && typeof t == "object" && n in t)
|
|
5548
5747
|
return t[n];
|
|
5549
5748
|
let a = t;
|
|
@@ -5571,10 +5770,10 @@ function uu(t) {
|
|
|
5571
5770
|
}
|
|
5572
5771
|
return null;
|
|
5573
5772
|
}
|
|
5574
|
-
function
|
|
5773
|
+
function m2(t) {
|
|
5575
5774
|
return t == null || t === "";
|
|
5576
5775
|
}
|
|
5577
|
-
function
|
|
5776
|
+
function p2(t, n, a = {}) {
|
|
5578
5777
|
const s = a.missing ?? "zero";
|
|
5579
5778
|
function l(c) {
|
|
5580
5779
|
const m = i(c), p = uu(m);
|
|
@@ -5592,9 +5791,9 @@ function u2(t, n, a = {}) {
|
|
|
5592
5791
|
return null;
|
|
5593
5792
|
case "token": {
|
|
5594
5793
|
const m = n(c.path);
|
|
5595
|
-
if (
|
|
5794
|
+
if (m2(m)) {
|
|
5596
5795
|
if (/^[A-Z][A-Z0-9_]*$/.test(c.path)) {
|
|
5597
|
-
const p =
|
|
5796
|
+
const p = g2(c.path);
|
|
5598
5797
|
if (p !== null) return p;
|
|
5599
5798
|
}
|
|
5600
5799
|
return null;
|
|
@@ -5605,7 +5804,7 @@ function u2(t, n, a = {}) {
|
|
|
5605
5804
|
const m = c.name.toLowerCase();
|
|
5606
5805
|
if (m === "networkdays" && c.args.length >= 2) {
|
|
5607
5806
|
const p = hh(i(c.args[0])), h = hh(i(c.args[1]));
|
|
5608
|
-
return !p || !h ? null :
|
|
5807
|
+
return !p || !h ? null : b2(p, h);
|
|
5609
5808
|
}
|
|
5610
5809
|
if (m === "abs" && c.args.length === 1) {
|
|
5611
5810
|
const p = l(c.args[0]);
|
|
@@ -5682,18 +5881,18 @@ function u2(t, n, a = {}) {
|
|
|
5682
5881
|
function T0(t, n, a = {}) {
|
|
5683
5882
|
const s = Sb(t);
|
|
5684
5883
|
if (!s.ok) return null;
|
|
5685
|
-
const l = typeof n == "function" ? n : (i) =>
|
|
5686
|
-
return
|
|
5884
|
+
const l = typeof n == "function" ? n : (i) => u2(n, i);
|
|
5885
|
+
return p2(s.ast, l, a);
|
|
5687
5886
|
}
|
|
5688
5887
|
function Ei(t, n, a = {}) {
|
|
5689
5888
|
const s = T0(t, n, a);
|
|
5690
5889
|
return typeof s == "number" ? Number.isFinite(s) ? s : null : typeof s == "boolean" ? s ? 1 : 0 : null;
|
|
5691
5890
|
}
|
|
5692
|
-
function
|
|
5891
|
+
function h2(t, n, a = {}) {
|
|
5693
5892
|
const s = T0(t, n, a);
|
|
5694
5893
|
return s === null ? !1 : typeof s == "boolean" ? s : typeof s == "number" ? s !== 0 : s !== "";
|
|
5695
5894
|
}
|
|
5696
|
-
function
|
|
5895
|
+
function f2(t, n) {
|
|
5697
5896
|
if (!t.trim())
|
|
5698
5897
|
return { ok: !1, error: "Expression is empty", position: 0, tokens: [], unknownTokens: [] };
|
|
5699
5898
|
const a = Sb(t);
|
|
@@ -5719,7 +5918,7 @@ function hh(t) {
|
|
|
5719
5918
|
const n = t.length === 10 ? /* @__PURE__ */ new Date(`${t}T00:00:00`) : new Date(t);
|
|
5720
5919
|
return Number.isNaN(n.getTime()) ? null : n;
|
|
5721
5920
|
}
|
|
5722
|
-
function
|
|
5921
|
+
function b2(t, n) {
|
|
5723
5922
|
const a = n.getTime() >= t.getTime() ? 1 : -1;
|
|
5724
5923
|
let [s, l] = a === 1 ? [t, n] : [n, t];
|
|
5725
5924
|
s = new Date(s.getFullYear(), s.getMonth(), s.getDate()), l = new Date(l.getFullYear(), l.getMonth(), l.getDate());
|
|
@@ -5732,212 +5931,13 @@ function h2(t, n) {
|
|
|
5732
5931
|
return i * a;
|
|
5733
5932
|
}
|
|
5734
5933
|
let O1 = {};
|
|
5735
|
-
function
|
|
5934
|
+
function x2(t) {
|
|
5736
5935
|
O1 = t && typeof t == "object" ? t : {};
|
|
5737
5936
|
}
|
|
5738
|
-
function
|
|
5937
|
+
function g2(t) {
|
|
5739
5938
|
const n = O1[t];
|
|
5740
5939
|
return Number.isFinite(n) ? n : null;
|
|
5741
5940
|
}
|
|
5742
|
-
function x2(t) {
|
|
5743
|
-
return t.row != null && t.column ? `Row ${t.row} · ${t.column}` : t.row != null ? `Row ${t.row}` : t.column ? t.column : null;
|
|
5744
|
-
}
|
|
5745
|
-
function Rf({
|
|
5746
|
-
issues: t,
|
|
5747
|
-
onDismiss: n
|
|
5748
|
-
}) {
|
|
5749
|
-
if (t.length === 0) return null;
|
|
5750
|
-
const a = t.some((s) => s.severity === "error");
|
|
5751
|
-
return /* @__PURE__ */ r(
|
|
5752
|
-
"div",
|
|
5753
|
-
{
|
|
5754
|
-
className: Q(
|
|
5755
|
-
"rounded-lg border p-3",
|
|
5756
|
-
a ? "border-red-200 bg-red-50 dark:border-red-500/30 dark:bg-red-500/10" : "border-amber-200 bg-amber-50 dark:border-amber-500/30 dark:bg-amber-500/10"
|
|
5757
|
-
),
|
|
5758
|
-
children: [
|
|
5759
|
-
/* @__PURE__ */ r("div", { className: "mb-2 flex items-center justify-between gap-2", children: [
|
|
5760
|
-
/* @__PURE__ */ e(
|
|
5761
|
-
"p",
|
|
5762
|
-
{
|
|
5763
|
-
className: Q(
|
|
5764
|
-
"text-[11px] font-semibold uppercase tracking-wide",
|
|
5765
|
-
a ? "text-red-700 dark:text-red-400" : "text-amber-700 dark:text-amber-400"
|
|
5766
|
-
),
|
|
5767
|
-
children: a ? "Import errors" : "Import warnings"
|
|
5768
|
-
}
|
|
5769
|
-
),
|
|
5770
|
-
!a && n && /* @__PURE__ */ e(
|
|
5771
|
-
st,
|
|
5772
|
-
{
|
|
5773
|
-
type: "button",
|
|
5774
|
-
variant: "ghost",
|
|
5775
|
-
size: "sm",
|
|
5776
|
-
className: "h-6 px-2 text-[11px]",
|
|
5777
|
-
onClick: n,
|
|
5778
|
-
children: "Dismiss"
|
|
5779
|
-
}
|
|
5780
|
-
)
|
|
5781
|
-
] }),
|
|
5782
|
-
/* @__PURE__ */ e("ul", { className: "space-y-1.5", children: t.map((s, l) => {
|
|
5783
|
-
const i = x2(s), o = `${s.rule}-${s.row ?? ""}-${s.column ?? ""}-${l}`;
|
|
5784
|
-
return /* @__PURE__ */ r("li", { className: "flex items-start gap-2 text-[12px]", children: [
|
|
5785
|
-
s.severity === "error" ? /* @__PURE__ */ e(Ii, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-red-500" }) : /* @__PURE__ */ e(ga, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-amber-500" }),
|
|
5786
|
-
/* @__PURE__ */ r(
|
|
5787
|
-
"span",
|
|
5788
|
-
{
|
|
5789
|
-
className: a ? "text-red-700 dark:text-red-300" : "text-amber-700 dark:text-amber-300",
|
|
5790
|
-
children: [
|
|
5791
|
-
i && /* @__PURE__ */ r("span", { className: "font-medium", children: [
|
|
5792
|
-
i,
|
|
5793
|
-
" · "
|
|
5794
|
-
] }),
|
|
5795
|
-
s.message
|
|
5796
|
-
]
|
|
5797
|
-
}
|
|
5798
|
-
)
|
|
5799
|
-
] }, o);
|
|
5800
|
-
}) })
|
|
5801
|
-
]
|
|
5802
|
-
}
|
|
5803
|
-
);
|
|
5804
|
-
}
|
|
5805
|
-
function g2(t) {
|
|
5806
|
-
const n = new Set(t.flatMap((a) => a.file_types));
|
|
5807
|
-
return Array.from(n).map((a) => `.${a}`).join(",");
|
|
5808
|
-
}
|
|
5809
|
-
function dm({
|
|
5810
|
-
collection: t,
|
|
5811
|
-
templateFilter: n,
|
|
5812
|
-
getLabel: a,
|
|
5813
|
-
onParsed: s,
|
|
5814
|
-
compact: l = !1
|
|
5815
|
-
}) {
|
|
5816
|
-
var _;
|
|
5817
|
-
const i = ze(), o = Qe(null), d = Qe(null), [u, c] = S(!1), [m, p] = S(null), h = m != null, [f, v] = S(null), { data: x } = me({
|
|
5818
|
-
queryKey: ["import-templates", t],
|
|
5819
|
-
queryFn: () => i.request(h5(t))
|
|
5820
|
-
}), g = (x == null ? void 0 : x.data) ?? [], b = n ? g.filter(n) : g;
|
|
5821
|
-
if (b.length === 0) return null;
|
|
5822
|
-
function y(w) {
|
|
5823
|
-
var j;
|
|
5824
|
-
d.current = w, v(null), c(!1), (j = o.current) == null || j.click();
|
|
5825
|
-
}
|
|
5826
|
-
async function $(w) {
|
|
5827
|
-
var q, M;
|
|
5828
|
-
const j = (q = w.target.files) == null ? void 0 : q[0], F = d.current;
|
|
5829
|
-
if (w.target.value = "", !(!j || !F)) {
|
|
5830
|
-
p(j.name), v(null);
|
|
5831
|
-
try {
|
|
5832
|
-
const L = await i.importParse(F.id, j);
|
|
5833
|
-
s(L, F);
|
|
5834
|
-
} catch (L) {
|
|
5835
|
-
const E = L;
|
|
5836
|
-
(M = E.issues) != null && M.length ? v(E) : Me.error(E.message || "Import parse failed", { duration: 8e3 });
|
|
5837
|
-
} finally {
|
|
5838
|
-
p(null);
|
|
5839
|
-
}
|
|
5840
|
-
}
|
|
5841
|
-
}
|
|
5842
|
-
const C = (w) => a ? a(w) : w.button_label, T = b[0] ? (_ = C(b[0])) == null ? void 0 : _.trim() : void 0, N = T && b.every((w) => C(w) === C(b[0])) ? T : null, k = h ? /* @__PURE__ */ r(ht, { children: [
|
|
5843
|
-
/* @__PURE__ */ e(Wt, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
5844
|
-
" Importing…"
|
|
5845
|
-
] }) : /* @__PURE__ */ r(ht, { children: [
|
|
5846
|
-
/* @__PURE__ */ e(xo, { className: "h-3.5 w-3.5" }),
|
|
5847
|
-
" ",
|
|
5848
|
-
N ?? "Import from file"
|
|
5849
|
-
] });
|
|
5850
|
-
return /* @__PURE__ */ r("div", { className: "flex flex-col gap-2", children: [
|
|
5851
|
-
/* @__PURE__ */ e(
|
|
5852
|
-
"input",
|
|
5853
|
-
{
|
|
5854
|
-
ref: o,
|
|
5855
|
-
type: "file",
|
|
5856
|
-
className: "hidden",
|
|
5857
|
-
accept: g2(b),
|
|
5858
|
-
onChange: $
|
|
5859
|
-
}
|
|
5860
|
-
),
|
|
5861
|
-
b.length === 1 ? l ? /* @__PURE__ */ e(
|
|
5862
|
-
"button",
|
|
5863
|
-
{
|
|
5864
|
-
type: "button",
|
|
5865
|
-
disabled: h,
|
|
5866
|
-
onClick: () => y(b[0]),
|
|
5867
|
-
className: "inline-flex h-6 items-center gap-1 rounded border border-slate-200 px-2.5 text-[11px] text-slate-600 transition-colors hover:border-slate-400 hover:text-slate-800 disabled:opacity-50 dark:border-border dark:text-slate-300",
|
|
5868
|
-
children: k
|
|
5869
|
-
}
|
|
5870
|
-
) : /* @__PURE__ */ e(
|
|
5871
|
-
st,
|
|
5872
|
-
{
|
|
5873
|
-
type: "button",
|
|
5874
|
-
variant: "outline",
|
|
5875
|
-
size: "sm",
|
|
5876
|
-
disabled: h,
|
|
5877
|
-
onClick: () => y(b[0]),
|
|
5878
|
-
children: k
|
|
5879
|
-
}
|
|
5880
|
-
) : /* @__PURE__ */ r(nr, { open: u, onOpenChange: c, children: [
|
|
5881
|
-
/* @__PURE__ */ e(ar, { asChild: !0, children: l ? /* @__PURE__ */ e(
|
|
5882
|
-
"button",
|
|
5883
|
-
{
|
|
5884
|
-
type: "button",
|
|
5885
|
-
disabled: h,
|
|
5886
|
-
className: "inline-flex h-6 items-center gap-1 rounded border border-slate-200 px-2.5 text-[11px] text-slate-600 transition-colors hover:border-slate-400 hover:text-slate-800 disabled:opacity-50 dark:border-border dark:text-slate-300",
|
|
5887
|
-
children: k
|
|
5888
|
-
}
|
|
5889
|
-
) : /* @__PURE__ */ e(st, { type: "button", variant: "outline", size: "sm", disabled: h, children: k }) }),
|
|
5890
|
-
/* @__PURE__ */ e(Zn, { className: "w-[220px] p-0", align: "start", children: /* @__PURE__ */ r(Ns, { children: [
|
|
5891
|
-
/* @__PURE__ */ e(Ls, { placeholder: "Search templates…", className: "h-8 text-[12px]" }),
|
|
5892
|
-
/* @__PURE__ */ r(ws, { children: [
|
|
5893
|
-
/* @__PURE__ */ e(Rs, { children: "No template found." }),
|
|
5894
|
-
b.map((w) => /* @__PURE__ */ e(
|
|
5895
|
-
Na,
|
|
5896
|
-
{
|
|
5897
|
-
value: w.name,
|
|
5898
|
-
onSelect: () => y(w),
|
|
5899
|
-
children: w.name
|
|
5900
|
-
},
|
|
5901
|
-
w.id
|
|
5902
|
-
))
|
|
5903
|
-
] })
|
|
5904
|
-
] }) })
|
|
5905
|
-
] }),
|
|
5906
|
-
(f == null ? void 0 : f.issues) && zr(
|
|
5907
|
-
/* @__PURE__ */ e(
|
|
5908
|
-
"div",
|
|
5909
|
-
{
|
|
5910
|
-
className: "fixed inset-0 z-[80] flex items-center justify-center bg-black/40 p-4",
|
|
5911
|
-
onClick: () => v(null),
|
|
5912
|
-
children: /* @__PURE__ */ r(
|
|
5913
|
-
"div",
|
|
5914
|
-
{
|
|
5915
|
-
className: "max-h-[70vh] w-full max-w-[520px] overflow-y-auto rounded-lg border border-slate-200 bg-white p-4 shadow-xl dark:border-border dark:bg-card",
|
|
5916
|
-
onClick: (w) => w.stopPropagation(),
|
|
5917
|
-
children: [
|
|
5918
|
-
/* @__PURE__ */ e("p", { className: "mb-2 text-[13px] font-semibold text-red-600 dark:text-red-400", children: f.message || "Import parse failed" }),
|
|
5919
|
-
/* @__PURE__ */ e(Rf, { issues: f.issues }),
|
|
5920
|
-
/* @__PURE__ */ e("div", { className: "mt-3 flex justify-end", children: /* @__PURE__ */ e(st, { type: "button", variant: "outline", size: "sm", onClick: () => v(null), children: "Close" }) })
|
|
5921
|
-
]
|
|
5922
|
-
}
|
|
5923
|
-
)
|
|
5924
|
-
}
|
|
5925
|
-
),
|
|
5926
|
-
document.body
|
|
5927
|
-
),
|
|
5928
|
-
h && zr(
|
|
5929
|
-
/* @__PURE__ */ e("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/40", children: /* @__PURE__ */ r("div", { className: "flex items-center gap-3 rounded-lg border bg-background px-5 py-4 shadow-lg", children: [
|
|
5930
|
-
/* @__PURE__ */ e(Wt, { className: "h-5 w-5 animate-spin text-muted-foreground" }),
|
|
5931
|
-
/* @__PURE__ */ r("div", { className: "text-[13px]", children: [
|
|
5932
|
-
"Processing ",
|
|
5933
|
-
/* @__PURE__ */ e("span", { className: "font-medium", children: m }),
|
|
5934
|
-
"…"
|
|
5935
|
-
] })
|
|
5936
|
-
] }) }),
|
|
5937
|
-
document.body
|
|
5938
|
-
)
|
|
5939
|
-
] });
|
|
5940
|
-
}
|
|
5941
5941
|
const wo = Wa.Root, y2 = Wa.Trigger, v2 = Wa.Portal, L1 = Sr.forwardRef(({ className: t, ...n }, a) => /* @__PURE__ */ e(
|
|
5942
5942
|
Wa.Overlay,
|
|
5943
5943
|
{
|
|
@@ -8739,7 +8739,7 @@ function J2({
|
|
|
8739
8739
|
let $ = 0, C = 0;
|
|
8740
8740
|
for (const T of n) {
|
|
8741
8741
|
const N = { ...T, __agg__: y(T.id) };
|
|
8742
|
-
if (t.guard && !
|
|
8742
|
+
if (t.guard && !h2(t.guard, N)) {
|
|
8743
8743
|
C++;
|
|
8744
8744
|
continue;
|
|
8745
8745
|
}
|
|
@@ -13820,7 +13820,10 @@ function Z2({
|
|
|
13820
13820
|
type: "button",
|
|
13821
13821
|
onClick: () => _ && $1(_, xe, F),
|
|
13822
13822
|
title: "View stock & planning detail",
|
|
13823
|
-
className: Q(
|
|
13823
|
+
className: Q(
|
|
13824
|
+
xt,
|
|
13825
|
+
"text-left underline decoration-slate-300 decoration-1 underline-offset-2 hover:text-[#009abe] hover:decoration-[#009abe] dark:decoration-slate-600"
|
|
13826
|
+
),
|
|
13824
13827
|
children: ct
|
|
13825
13828
|
}
|
|
13826
13829
|
) : /* @__PURE__ */ e("span", { className: xt, children: ct }), Dt = (xe) => {
|
|
@@ -14110,7 +14113,8 @@ function Z2({
|
|
|
14110
14113
|
var ct;
|
|
14111
14114
|
return ((ct = c == null ? void 0 : c.fieldLabels) == null ? void 0 : ct[xe]) ?? Pt(xe);
|
|
14112
14115
|
}).join(", "),
|
|
14113
|
-
"
|
|
14116
|
+
" ",
|
|
14117
|
+
"to browse by category"
|
|
14114
14118
|
] }),
|
|
14115
14119
|
M.length === 0 && K && /* @__PURE__ */ r("div", { className: "flex items-center justify-center gap-2 py-6 text-slate-400", children: [
|
|
14116
14120
|
/* @__PURE__ */ e(Wt, { className: "h-4 w-4 animate-spin" }),
|
|
@@ -14319,108 +14323,120 @@ function Z2({
|
|
|
14319
14323
|
In && "opacity-60"
|
|
14320
14324
|
),
|
|
14321
14325
|
children: [
|
|
14322
|
-
/* @__PURE__ */ r(
|
|
14323
|
-
|
|
14324
|
-
|
|
14325
|
-
|
|
14326
|
-
|
|
14327
|
-
|
|
14328
|
-
|
|
14329
|
-
|
|
14330
|
-
|
|
14331
|
-
|
|
14332
|
-
|
|
14333
|
-
|
|
14334
|
-
|
|
14335
|
-
|
|
14336
|
-
|
|
14337
|
-
{
|
|
14338
|
-
className: "min-w-0 flex-1 truncate text-slate-600 dark:text-slate-300",
|
|
14339
|
-
title: String(Gt(Qt(jt.key), ct.field) ?? ""),
|
|
14340
|
-
children: Nn(Gt(Qt(jt.key), ct.field), void 0)
|
|
14341
|
-
}
|
|
14342
|
-
),
|
|
14343
|
-
!ct && /* @__PURE__ */ e("span", { className: "flex-1" }),
|
|
14344
|
-
xt.map((un) => {
|
|
14345
|
-
const hr = Gt(Qt(jt.key), un.field);
|
|
14346
|
-
return hr == null || hr === "" ? null : /* @__PURE__ */ e(
|
|
14347
|
-
"span",
|
|
14348
|
-
{
|
|
14349
|
-
className: "shrink-0 rounded bg-slate-100 px-1.5 py-0.5 text-[10.5px] font-medium text-slate-600 dark:bg-muted dark:text-slate-300",
|
|
14350
|
-
children: String(hr)
|
|
14351
|
-
},
|
|
14352
|
-
un.field
|
|
14353
|
-
);
|
|
14354
|
-
}),
|
|
14355
|
-
zn.map(
|
|
14356
|
-
(un) => {
|
|
14357
|
-
var hr;
|
|
14358
|
-
return p.includes(un) && !i ? /* @__PURE__ */ e(
|
|
14359
|
-
"input",
|
|
14326
|
+
/* @__PURE__ */ r(
|
|
14327
|
+
"div",
|
|
14328
|
+
{
|
|
14329
|
+
className: Q(
|
|
14330
|
+
"flex items-center gap-2",
|
|
14331
|
+
In && "line-through decoration-slate-400"
|
|
14332
|
+
),
|
|
14333
|
+
children: [
|
|
14334
|
+
We(
|
|
14335
|
+
jt.key,
|
|
14336
|
+
Dt(jt.key),
|
|
14337
|
+
"shrink-0 font-semibold text-slate-800 dark:text-slate-100"
|
|
14338
|
+
),
|
|
14339
|
+
sr && /* @__PURE__ */ e(
|
|
14340
|
+
"span",
|
|
14360
14341
|
{
|
|
14361
|
-
|
|
14362
|
-
|
|
14363
|
-
|
|
14364
|
-
|
|
14365
|
-
|
|
14366
|
-
|
|
14367
|
-
|
|
14368
|
-
|
|
14369
|
-
className: "h-7 w-20 shrink-0 rounded border border-slate-200 bg-white px-2 text-right text-[12px] outline-none focus:border-nvr-cyan dark:border-border dark:bg-background"
|
|
14370
|
-
},
|
|
14371
|
-
`${jt.key}:${un}:${String(jt.row[un] ?? "")}`
|
|
14372
|
-
) : /* @__PURE__ */ e(
|
|
14342
|
+
className: "shrink-0",
|
|
14343
|
+
"data-tip": `This line was in the failed submission
|
|
14344
|
+
${sr}`,
|
|
14345
|
+
"data-submission-error": !0,
|
|
14346
|
+
children: /* @__PURE__ */ e(Ii, { className: "h-3.5 w-3.5 text-red-500", strokeWidth: 2 })
|
|
14347
|
+
}
|
|
14348
|
+
),
|
|
14349
|
+
ct && /* @__PURE__ */ e(
|
|
14373
14350
|
"span",
|
|
14374
14351
|
{
|
|
14375
|
-
className: "w-
|
|
14376
|
-
|
|
14377
|
-
|
|
14378
|
-
un
|
|
14379
|
-
);
|
|
14380
|
-
}
|
|
14381
|
-
),
|
|
14382
|
-
/* @__PURE__ */ r("span", { className: "inline-flex w-20 shrink-0 items-center justify-end gap-1", children: [
|
|
14383
|
-
T.has(jt.key) && /* @__PURE__ */ e(Wt, { className: "h-3 w-3 animate-spin text-slate-400" }),
|
|
14384
|
-
ur(jt.key, Qt(jt.key))
|
|
14385
|
-
] }),
|
|
14386
|
-
Dn.map((un) => {
|
|
14387
|
-
var Ea, Gn;
|
|
14388
|
-
const hr = jt.row[un], mr = hr != null && hr !== "" ? hr : il(((Ea = l.compute_fields) == null ? void 0 : Ea[un]) ?? "", jt.row);
|
|
14389
|
-
return /* @__PURE__ */ e(
|
|
14390
|
-
"span",
|
|
14391
|
-
{
|
|
14392
|
-
className: "w-20 shrink-0 text-right tabular-nums text-slate-600 dark:text-slate-300",
|
|
14393
|
-
children: Nn(mr, (Gn = l.field_formats) == null ? void 0 : Gn[un])
|
|
14394
|
-
},
|
|
14395
|
-
un
|
|
14396
|
-
);
|
|
14397
|
-
}),
|
|
14398
|
-
!i && In && /* @__PURE__ */ e(
|
|
14399
|
-
"button",
|
|
14400
|
-
{
|
|
14401
|
-
type: "button",
|
|
14402
|
-
onClick: () => u == null ? void 0 : u.cancelPendingDelete(t, n, er),
|
|
14403
|
-
className: "shrink-0 rounded px-1.5 py-0.5 text-[11px] font-medium text-nvr-navy underline dark:text-nvr-cyan",
|
|
14404
|
-
children: "Undo"
|
|
14405
|
-
}
|
|
14406
|
-
),
|
|
14407
|
-
!i && !In && /* @__PURE__ */ e(
|
|
14408
|
-
"button",
|
|
14409
|
-
{
|
|
14410
|
-
type: "button",
|
|
14411
|
-
title: "Remove (applies on Save)",
|
|
14412
|
-
onClick: () => {
|
|
14413
|
-
if (!h && u && er != null) {
|
|
14414
|
-
u.queueDelete(t, n, er);
|
|
14415
|
-
return;
|
|
14352
|
+
className: "min-w-0 flex-1 truncate text-slate-600 dark:text-slate-300",
|
|
14353
|
+
title: String(Gt(Qt(jt.key), ct.field) ?? ""),
|
|
14354
|
+
children: Nn(Gt(Qt(jt.key), ct.field), void 0)
|
|
14416
14355
|
}
|
|
14417
|
-
|
|
14418
|
-
},
|
|
14419
|
-
|
|
14420
|
-
|
|
14421
|
-
|
|
14422
|
-
|
|
14423
|
-
|
|
14356
|
+
),
|
|
14357
|
+
!ct && /* @__PURE__ */ e("span", { className: "flex-1" }),
|
|
14358
|
+
xt.map((un) => {
|
|
14359
|
+
const hr = Gt(Qt(jt.key), un.field);
|
|
14360
|
+
return hr == null || hr === "" ? null : /* @__PURE__ */ e(
|
|
14361
|
+
"span",
|
|
14362
|
+
{
|
|
14363
|
+
className: "shrink-0 rounded bg-slate-100 px-1.5 py-0.5 text-[10.5px] font-medium text-slate-600 dark:bg-muted dark:text-slate-300",
|
|
14364
|
+
children: String(hr)
|
|
14365
|
+
},
|
|
14366
|
+
un.field
|
|
14367
|
+
);
|
|
14368
|
+
}),
|
|
14369
|
+
zn.map(
|
|
14370
|
+
(un) => {
|
|
14371
|
+
var hr;
|
|
14372
|
+
return p.includes(un) && !i ? /* @__PURE__ */ e(
|
|
14373
|
+
"input",
|
|
14374
|
+
{
|
|
14375
|
+
type: "number",
|
|
14376
|
+
min: 0,
|
|
14377
|
+
step: "any",
|
|
14378
|
+
defaultValue: jt.row[un] == null ? "" : String(jt.row[un]),
|
|
14379
|
+
onBlur: (mr) => void sn(jt.key, un, mr.target.value),
|
|
14380
|
+
onKeyDown: (mr) => {
|
|
14381
|
+
mr.key === "Enter" && mr.currentTarget.blur();
|
|
14382
|
+
},
|
|
14383
|
+
className: "h-7 w-20 shrink-0 rounded border border-slate-200 bg-white px-2 text-right text-[12px] outline-none focus:border-nvr-cyan dark:border-border dark:bg-background"
|
|
14384
|
+
},
|
|
14385
|
+
`${jt.key}:${un}:${String(jt.row[un] ?? "")}`
|
|
14386
|
+
) : /* @__PURE__ */ e(
|
|
14387
|
+
"span",
|
|
14388
|
+
{
|
|
14389
|
+
className: "w-20 shrink-0 text-right tabular-nums text-slate-600 dark:text-slate-300",
|
|
14390
|
+
children: Nn(jt.row[un], (hr = l.field_formats) == null ? void 0 : hr[un])
|
|
14391
|
+
},
|
|
14392
|
+
un
|
|
14393
|
+
);
|
|
14394
|
+
}
|
|
14395
|
+
),
|
|
14396
|
+
/* @__PURE__ */ r("span", { className: "inline-flex w-20 shrink-0 items-center justify-end gap-1", children: [
|
|
14397
|
+
T.has(jt.key) && /* @__PURE__ */ e(Wt, { className: "h-3 w-3 animate-spin text-slate-400" }),
|
|
14398
|
+
ur(jt.key, Qt(jt.key))
|
|
14399
|
+
] }),
|
|
14400
|
+
Dn.map((un) => {
|
|
14401
|
+
var Ea, Gn;
|
|
14402
|
+
const hr = jt.row[un], mr = hr != null && hr !== "" ? hr : il(((Ea = l.compute_fields) == null ? void 0 : Ea[un]) ?? "", jt.row);
|
|
14403
|
+
return /* @__PURE__ */ e(
|
|
14404
|
+
"span",
|
|
14405
|
+
{
|
|
14406
|
+
className: "w-20 shrink-0 text-right tabular-nums text-slate-600 dark:text-slate-300",
|
|
14407
|
+
children: Nn(mr, (Gn = l.field_formats) == null ? void 0 : Gn[un])
|
|
14408
|
+
},
|
|
14409
|
+
un
|
|
14410
|
+
);
|
|
14411
|
+
}),
|
|
14412
|
+
!i && In && /* @__PURE__ */ e(
|
|
14413
|
+
"button",
|
|
14414
|
+
{
|
|
14415
|
+
type: "button",
|
|
14416
|
+
onClick: () => u == null ? void 0 : u.cancelPendingDelete(t, n, er),
|
|
14417
|
+
className: "shrink-0 rounded px-1.5 py-0.5 text-[11px] font-medium text-nvr-navy underline dark:text-nvr-cyan",
|
|
14418
|
+
children: "Undo"
|
|
14419
|
+
}
|
|
14420
|
+
),
|
|
14421
|
+
!i && !In && /* @__PURE__ */ e(
|
|
14422
|
+
"button",
|
|
14423
|
+
{
|
|
14424
|
+
type: "button",
|
|
14425
|
+
title: "Remove (applies on Save)",
|
|
14426
|
+
onClick: () => {
|
|
14427
|
+
if (!h && u && er != null) {
|
|
14428
|
+
u.queueDelete(t, n, er);
|
|
14429
|
+
return;
|
|
14430
|
+
}
|
|
14431
|
+
Ut(jt.key, "0", {});
|
|
14432
|
+
},
|
|
14433
|
+
className: "w-6 shrink-0 rounded p-0.5 text-slate-300 transition-colors hover:text-red-500",
|
|
14434
|
+
children: /* @__PURE__ */ e(Zt, { className: "mx-auto h-3.5 w-3.5" })
|
|
14435
|
+
}
|
|
14436
|
+
)
|
|
14437
|
+
]
|
|
14438
|
+
}
|
|
14439
|
+
),
|
|
14424
14440
|
(At.length > 0 || Ue.length > 0 || Ye.length > 0) && /* @__PURE__ */ r("div", { className: "mt-1 flex flex-wrap items-baseline gap-x-4 gap-y-0.5 pl-0.5 text-[11px]", children: [
|
|
14425
14441
|
At.map((un) => /* @__PURE__ */ r("span", { className: "whitespace-nowrap", children: [
|
|
14426
14442
|
/* @__PURE__ */ e("span", { className: "text-slate-500 dark:text-muted-foreground", children: un.label ?? Pt(un.field.split(".")[0]) }),
|
|
@@ -14446,7 +14462,8 @@ function Z2({
|
|
|
14446
14462
|
Ne,
|
|
14447
14463
|
" is ",
|
|
14448
14464
|
Nn(Ln.available, "number"),
|
|
14449
|
-
" —
|
|
14465
|
+
" —",
|
|
14466
|
+
" ",
|
|
14450
14467
|
Nn(Ln.qty, "number"),
|
|
14451
14468
|
" requested"
|
|
14452
14469
|
] }),
|
|
@@ -14865,9 +14882,7 @@ function nS({
|
|
|
14865
14882
|
},
|
|
14866
14883
|
re
|
|
14867
14884
|
);
|
|
14868
|
-
}, P = (m == null ? void 0 : m.closest('[role="dialog"]')) ?? document.body, Y = h.trim() ? F.filter(
|
|
14869
|
-
(W) => c1(`${q(W)} ${M(W)} ${L(W)}`, h)
|
|
14870
|
-
) : F;
|
|
14885
|
+
}, P = (m == null ? void 0 : m.closest('[role="dialog"]')) ?? document.body, Y = h.trim() ? F.filter((W) => c1(`${q(W)} ${M(W)} ${L(W)}`, h)) : F;
|
|
14871
14886
|
return zr(
|
|
14872
14887
|
/* @__PURE__ */ r("div", { className: "fixed inset-0 z-[125]", role: "presentation", children: [
|
|
14873
14888
|
/* @__PURE__ */ e(
|
|
@@ -15258,14 +15273,14 @@ function oS({
|
|
|
15258
15273
|
value: t,
|
|
15259
15274
|
onChange: n
|
|
15260
15275
|
}) {
|
|
15261
|
-
const a = typeof t == "string" ? t.match(/^FY(\d{4})-Q([1-4])$/) : null, s = a ? Number(a[1]) : (/* @__PURE__ */ new Date()).getFullYear(), l = a ? Number(a[2]) : 1, i = (u, c) => n(`FY${u}-Q${c}`), o = Array.from({ length: 8 }, (u, c) => (/* @__PURE__ */ new Date()).getFullYear() - 3 + c), d =
|
|
15276
|
+
const a = typeof t == "string" ? t.match(/^FY(\d{4})-Q([1-4])$/) : null, s = a ? Number(a[1]) : (/* @__PURE__ */ new Date()).getFullYear(), l = a ? Number(a[2]) : 1, i = (u, c) => n(`FY${u}-Q${c}`), o = Array.from({ length: 8 }, (u, c) => (/* @__PURE__ */ new Date()).getFullYear() - 3 + c), d = o2(/* @__PURE__ */ new Date());
|
|
15262
15277
|
return /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: [
|
|
15263
15278
|
/* @__PURE__ */ e(
|
|
15264
15279
|
"button",
|
|
15265
15280
|
{
|
|
15266
15281
|
type: "button",
|
|
15267
15282
|
onClick: () => n(d),
|
|
15268
|
-
"data-tip": `Set to the current period (fiscal year starts month ${
|
|
15283
|
+
"data-tip": `Set to the current period (fiscal year starts month ${i2()})`,
|
|
15269
15284
|
className: t === d ? "rounded-md bg-nvr-cyan/10 px-2 py-1.5 text-[11.5px] font-semibold text-nvr-navy dark:text-nvr-cyan" : "rounded-md border border-slate-200 px-2 py-1.5 text-[11.5px] text-slate-500 hover:bg-muted dark:border-border",
|
|
15270
15285
|
children: "Now"
|
|
15271
15286
|
}
|
|
@@ -20636,7 +20651,7 @@ function _c({
|
|
|
20636
20651
|
children: [
|
|
20637
20652
|
F,
|
|
20638
20653
|
K.length > 0 && /* @__PURE__ */ e(
|
|
20639
|
-
|
|
20654
|
+
a2,
|
|
20640
20655
|
{
|
|
20641
20656
|
cascadeRules: K,
|
|
20642
20657
|
cascadeFilter: _e,
|
|
@@ -24192,7 +24207,7 @@ function Wl({
|
|
|
24192
24207
|
Yt,
|
|
24193
24208
|
{
|
|
24194
24209
|
type: "datetime-local",
|
|
24195
|
-
value:
|
|
24210
|
+
value: s2(n),
|
|
24196
24211
|
onChange: (P) => a(P.target.value ? new Date(P.target.value).toISOString() : null),
|
|
24197
24212
|
placeholder: t.placeholder ?? void 0
|
|
24198
24213
|
}
|
|
@@ -42120,10 +42135,10 @@ ${le.join(`
|
|
|
42120
42135
|
if (U) {
|
|
42121
42136
|
try {
|
|
42122
42137
|
const G = U.formula_constants ? JSON.parse(U.formula_constants) : null;
|
|
42123
|
-
G && typeof G == "object" &&
|
|
42138
|
+
G && typeof G == "object" && x2(G);
|
|
42124
42139
|
} catch {
|
|
42125
42140
|
}
|
|
42126
|
-
|
|
42141
|
+
l2(U.fiscal_year_start_month);
|
|
42127
42142
|
}
|
|
42128
42143
|
}).catch(() => {
|
|
42129
42144
|
zh = !1;
|
|
@@ -57184,7 +57199,7 @@ function CL({
|
|
|
57184
57199
|
}
|
|
57185
57200
|
}
|
|
57186
57201
|
}, b = Qe(null), y = Qe(null), [$, C] = S(!1), [T, N] = S(""), k = we(() => a.map((M) => M.field), [a]), _ = we(
|
|
57187
|
-
() => t.trim() ?
|
|
57202
|
+
() => t.trim() ? f2(t, k) : null,
|
|
57188
57203
|
[t, k]
|
|
57189
57204
|
), w = we(() => {
|
|
57190
57205
|
if (!s || !(_ != null && _.ok)) return null;
|
|
@@ -86266,7 +86281,7 @@ export {
|
|
|
86266
86281
|
Mf as dmRoom,
|
|
86267
86282
|
vm as effectiveScopeSeedIds,
|
|
86268
86283
|
G5 as encodePrefill,
|
|
86269
|
-
|
|
86284
|
+
h2 as evaluateBoolean,
|
|
86270
86285
|
T0 as evaluateExpression,
|
|
86271
86286
|
Ei as evaluateNumeric,
|
|
86272
86287
|
ny as extSlotKey,
|
|
@@ -86275,7 +86290,7 @@ export {
|
|
|
86275
86290
|
qc as fieldDrilldownConfig,
|
|
86276
86291
|
Yf as filterDefLabel,
|
|
86277
86292
|
q6 as filterValueDisplay,
|
|
86278
|
-
|
|
86293
|
+
o2 as fiscalPeriodOf,
|
|
86279
86294
|
A1 as fiscalQuarterOf,
|
|
86280
86295
|
j1 as fiscalYearOf,
|
|
86281
86296
|
td as formatDate,
|
|
@@ -86286,16 +86301,16 @@ export {
|
|
|
86286
86301
|
Tr as formatRelative,
|
|
86287
86302
|
l6 as formatStatusExpiry,
|
|
86288
86303
|
gp as formatValue,
|
|
86289
|
-
|
|
86304
|
+
g2 as formulaConstant,
|
|
86290
86305
|
Gx as getApiUpdate,
|
|
86291
86306
|
Z_ as getFieldInterface,
|
|
86292
|
-
|
|
86307
|
+
i2 as getFiscalStartMonth,
|
|
86293
86308
|
m$ as getLayoutSlot,
|
|
86294
86309
|
DS as getMentionQuery,
|
|
86295
86310
|
kk as idleState,
|
|
86296
86311
|
aL as listFieldInterfaces,
|
|
86297
86312
|
Qd as matchScopeDimension,
|
|
86298
|
-
|
|
86313
|
+
b2 as networkdaysBetween,
|
|
86299
86314
|
pO as normalizeFieldType,
|
|
86300
86315
|
Ll as numericIntlOptions,
|
|
86301
86316
|
sL as onFieldInterfacesChange,
|
|
@@ -86321,8 +86336,8 @@ export {
|
|
|
86321
86336
|
bm as runNotificationTarget,
|
|
86322
86337
|
iL as seedQuickPickerSteps,
|
|
86323
86338
|
f_ as setDisplayTimezone,
|
|
86324
|
-
|
|
86325
|
-
|
|
86339
|
+
l2 as setFiscalStartMonth,
|
|
86340
|
+
x2 as setFormulaConstants,
|
|
86326
86341
|
eL as setNumberFormat,
|
|
86327
86342
|
ZO as setTimeDisplay,
|
|
86328
86343
|
MS as splitMessageTokens,
|
|
@@ -86390,5 +86405,5 @@ export {
|
|
|
86390
86405
|
cL as useUnreadChirp,
|
|
86391
86406
|
X1 as useUserSearch,
|
|
86392
86407
|
YL as useWatchFields,
|
|
86393
|
-
|
|
86408
|
+
f2 as validateExpression
|
|
86394
86409
|
};
|