@nivaro/react 0.3.57 → 0.3.59
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/components/fields/RelationField.js +110 -80
- package/dist/full.css +1 -1
- package/dist/hooks/useRelationOptions.js +1 -0
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +37 -2
- package/dist/index.js +523 -520
- package/dist/shared/components/CollectionBrowserView.js +2693 -2619
- package/dist/shared/components/DataTable.js +538 -495
- package/dist/shared/components/ItemEditForm.js +4559 -4386
- package/dist/shared/components/PageRenderer.js +537 -508
- package/dist/shared/components/ProfileView.js +716 -715
- package/dist/shared/components/QueryTable.js +74 -74
- package/dist/shared/components/RecordReadView.js +367 -364
- package/dist/shared/components/ReportView.js +64 -39
- package/dist/shared/components/WidgetSlot.js +543 -520
- package/dist/shared/components/alerts/AlertManagerView.js +324 -317
- package/dist/shared/components/alerts/types.js +37 -14
- package/dist/shared/components/cbv/row-focus.js +19 -0
- package/dist/shared/components/help-videos/HelpVideoPlayer.js +152 -147
- package/dist/shared/components/integrations/console/SignalCard.js +59 -59
- package/dist/shared/components/integrations/console/tone.js +52 -30
- package/dist/shared/components/item-edit/CatalogPickerField.js +525 -505
- package/dist/shared/components/item-edit/FieldRenderer.js +22 -20
- package/dist/shared/components/item-edit/FieldRow.js +175 -173
- package/dist/shared/components/item-edit/GridBulkEditDialog.js +55 -54
- package/dist/shared/components/item-edit/InlineTableField.js +2487 -2442
- package/dist/shared/components/item-edit/M2MCombobox.js +321 -295
- package/dist/shared/components/item-edit/MidairCollisionDialog.js +1 -1
- package/dist/shared/components/item-edit/PlanGrid.js +973 -894
- package/dist/shared/components/item-edit/QuickCreateButton.js +335 -106
- package/dist/shared/components/item-edit/RecordLiveSync.js +77 -75
- package/dist/shared/components/item-edit/RelationCombobox.js +452 -335
- package/dist/shared/components/item-edit/RelationGroupedCombobox.js +262 -141
- package/dist/shared/components/item-edit/SummaryPanel.js +385 -358
- package/dist/shared/components/item-edit/duplicate-rehearsal.js +47 -0
- package/dist/shared/components/item-edit/line-midair.js +82 -75
- package/dist/shared/components/item-edit/option-disambiguate.js +44 -32
- package/dist/shared/components/item-edit/related-missing.js +45 -0
- package/dist/shared/components/item-edit/save-outcome.js +9 -7
- package/dist/shared/components/notifications/NotificationRulesEditor.js +130 -123
- package/dist/shared/components/panels/AccessDeniedPanel.js +52 -48
- package/dist/shared/components/panels/ItemLockBanner.js +213 -211
- package/dist/shared/components/panels/PipelinePanel.js +1140 -1053
- package/dist/shared/components/panels/RecordIntegrityBanner.js +114 -86
- package/dist/shared/components/panels/RevisionsPanel.js +316 -299
- package/dist/shared/components/panels/TaskPanel.js +265 -249
- package/dist/shared/components/panels/landing-state.js +27 -0
- package/dist/shared/components/pipeline/PipelineEditorView.js +110 -92
- package/dist/shared/components/profile/AiMemoryCard.js +12 -10
- package/dist/shared/components/queue/OwnerAvatars.js +80 -41
- package/dist/shared/components/queue/QueueQuickFilters.js +52 -52
- package/dist/shared/components/queue/QueueWorklist.js +1050 -1026
- package/dist/shared/components/queue/group-sums.js +27 -0
- package/dist/shared/components/queue/live-state-aspect.js +9 -5
- package/dist/shared/components/widgets/ReviewListWidget.js +175 -154
- package/dist/shared/lib/back-closes.js +25 -0
- package/dist/shared/lib/display-prefs.js +60 -52
- package/dist/shared/lib/draft-store.js +71 -48
- package/dist/shared/lib/expression.js +53 -53
- package/dist/shared/lib/form-usage-beacon.js +7 -7
- package/dist/shared/lib/list-page-memory.js +63 -0
- package/dist/shared/lib/live.js +44 -44
- package/dist/shared/lib/money-input.js +45 -0
- package/dist/shared/lib/own-writes.js +76 -28
- package/dist/shared/lib/request-gate.js +110 -109
- package/dist/shared/lib/sanitize-html.js +10 -6
- package/dist/shared/lib/staged-row-labels.js +18 -0
- package/dist/shared/lib/validation-rules.js +34 -19
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ import { resolveOptionFilterTokens as oe } from "../../lib/option-filter-tokens.
|
|
|
8
8
|
import { counterOf as Xe } from "../../lib/placement-behaviour.js";
|
|
9
9
|
import { choiceLabel as Ze } from "../../lib/utils.js";
|
|
10
10
|
import { Badge as Ce } from "../ui/badge.js";
|
|
11
|
-
import { Input as
|
|
11
|
+
import { Input as B } from "../ui/input.js";
|
|
12
12
|
import { Label as Oe } from "../ui/label.js";
|
|
13
13
|
import { NumberDraftInput as et } from "../ui/number-draft-input.js";
|
|
14
14
|
import { SimpleSelect as tt } from "../ui/SimpleSelect.js";
|
|
@@ -19,7 +19,7 @@ import { columnMaxLength as pe } from "./column-length.js";
|
|
|
19
19
|
import { useFieldAffordances as nt } from "./FieldAffordances.js";
|
|
20
20
|
import { ProgressField as ne, RatingScaleField as ie, DurationReadOnly as it, ChecklistReadOnly as at, ColorPackField as ae, PhoneField as le, EmailField as lt, AddressAutocompleteField as st } from "./FieldPack.js";
|
|
21
21
|
import { FilePickerField as ct, FileM2MField as dt } from "./FilePickerField.js";
|
|
22
|
-
import { formatDisplayValue as
|
|
22
|
+
import { formatDisplayValue as L } from "./GroupSection.js";
|
|
23
23
|
import { parseJson as f, toLocalDatetime as ut } from "./helpers.js";
|
|
24
24
|
import { InlineGridField as mt } from "./InlineGridField.js";
|
|
25
25
|
import { InlineTableField as pt } from "./InlineTableField.js";
|
|
@@ -86,13 +86,13 @@ function ye(m, e) {
|
|
|
86
86
|
onBlur: (c) => d(c.target.value)
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function Lt({
|
|
90
90
|
value: m,
|
|
91
91
|
commit: e,
|
|
92
92
|
...n
|
|
93
93
|
}) {
|
|
94
94
|
const a = ye(m, e);
|
|
95
|
-
return /* @__PURE__ */ i(
|
|
95
|
+
return /* @__PURE__ */ i(B, { ...n, ...a });
|
|
96
96
|
}
|
|
97
97
|
function ue({
|
|
98
98
|
value: m,
|
|
@@ -171,7 +171,8 @@ const br = Ke(function({
|
|
|
171
171
|
disabled: e.readonly,
|
|
172
172
|
placeholder: e.placeholder ?? void 0,
|
|
173
173
|
extraFilter: _,
|
|
174
|
-
pinned:
|
|
174
|
+
pinned: $,
|
|
175
|
+
narrowedBy: u
|
|
175
176
|
}
|
|
176
177
|
);
|
|
177
178
|
}
|
|
@@ -212,6 +213,7 @@ const br = Ke(function({
|
|
|
212
213
|
{
|
|
213
214
|
targetCollection: k.one_collection,
|
|
214
215
|
config: w,
|
|
216
|
+
value: n,
|
|
215
217
|
onCreated: (y) => a(y)
|
|
216
218
|
}
|
|
217
219
|
),
|
|
@@ -302,7 +304,7 @@ const br = Ke(function({
|
|
|
302
304
|
title: String(n)
|
|
303
305
|
}),
|
|
304
306
|
className: "text-left text-sm text-slate-700 underline decoration-slate-300 decoration-dotted underline-offset-2 hover:text-[#172940] hover:decoration-nvr-cyan dark:text-slate-200 dark:hover:text-nvr-cyan",
|
|
305
|
-
children:
|
|
307
|
+
children: L(n, e)
|
|
306
308
|
}
|
|
307
309
|
) });
|
|
308
310
|
}
|
|
@@ -310,16 +312,16 @@ const br = Ke(function({
|
|
|
310
312
|
if (r && Number.isFinite(Number(r.live))) {
|
|
311
313
|
const l = Number(r.original), t = Number(r.live) - (Number.isFinite(l) ? l : 0), x = Math.round(t * 100) / 100;
|
|
312
314
|
return /* @__PURE__ */ h("div", { className: "flex min-h-[36px] flex-wrap items-center gap-x-2 gap-y-0.5", children: [
|
|
313
|
-
/* @__PURE__ */ i("span", { className: "text-sm text-slate-400 line-through tabular-nums", children:
|
|
315
|
+
/* @__PURE__ */ i("span", { className: "text-sm text-slate-400 line-through tabular-nums", children: L(r.original, e) }),
|
|
314
316
|
/* @__PURE__ */ i("span", { className: "text-slate-300", "aria-hidden": !0, children: "→" }),
|
|
315
|
-
/* @__PURE__ */ i("span", { className: "text-sm font-medium tabular-nums", children:
|
|
317
|
+
/* @__PURE__ */ i("span", { className: "text-sm font-medium tabular-nums", children: L(r.live, e) }),
|
|
316
318
|
x !== 0 && /* @__PURE__ */ h(
|
|
317
319
|
"span",
|
|
318
320
|
{
|
|
319
321
|
className: `rounded px-1.5 py-px text-[11px] font-medium tabular-nums ${x > 0 ? "bg-emerald-50 text-emerald-700 dark:bg-emerald-900/20 dark:text-emerald-400" : "bg-red-50 text-red-700 dark:bg-red-900/20 dark:text-red-400"}`,
|
|
320
322
|
children: [
|
|
321
323
|
x > 0 ? "+" : "−",
|
|
322
|
-
|
|
324
|
+
L(Math.abs(x), e)
|
|
323
325
|
]
|
|
324
326
|
}
|
|
325
327
|
)
|
|
@@ -335,7 +337,7 @@ const br = Ke(function({
|
|
|
335
337
|
if (s === "color")
|
|
336
338
|
return /* @__PURE__ */ i(ae, { field: e, value: n, onChange: a, readOnly: !0 });
|
|
337
339
|
if (s === "phone") return /* @__PURE__ */ i(le, { value: n, onChange: a, readOnly: !0 });
|
|
338
|
-
const o = n == null ? /* @__PURE__ */ i("span", { className: "text-muted-foreground italic text-sm", children: "—" }) : typeof n == "boolean" ? /* @__PURE__ */ i(Ce, { variant: n ? "default" : "secondary", children: n ? "Yes" : "No" }) : /* @__PURE__ */ i("span", { className: "text-sm tabular-nums", children:
|
|
340
|
+
const o = n == null ? /* @__PURE__ */ i("span", { className: "text-muted-foreground italic text-sm", children: "—" }) : typeof n == "boolean" ? /* @__PURE__ */ i(Ce, { variant: n ? "default" : "secondary", children: n ? "Yes" : "No" }) : /* @__PURE__ */ i("span", { className: "text-sm tabular-nums", children: L(n, e) });
|
|
339
341
|
return /* @__PURE__ */ i("div", { className: "min-h-[36px] flex items-center", children: o });
|
|
340
342
|
}
|
|
341
343
|
const g = n == null ? "" : String(n);
|
|
@@ -349,7 +351,7 @@ const br = Ke(function({
|
|
|
349
351
|
if ((r == null ? void 0 : r.date_mode) === "date") {
|
|
350
352
|
const o = ce(e);
|
|
351
353
|
return /* @__PURE__ */ i(
|
|
352
|
-
|
|
354
|
+
B,
|
|
353
355
|
{
|
|
354
356
|
type: "date",
|
|
355
357
|
value: g.slice(0, 10),
|
|
@@ -361,7 +363,7 @@ const br = Ke(function({
|
|
|
361
363
|
);
|
|
362
364
|
}
|
|
363
365
|
return /* @__PURE__ */ i(
|
|
364
|
-
|
|
366
|
+
B,
|
|
365
367
|
{
|
|
366
368
|
type: "datetime-local",
|
|
367
369
|
value: ut(n),
|
|
@@ -374,7 +376,7 @@ const br = Ke(function({
|
|
|
374
376
|
const r = ((Q = f(e.options)) == null ? void 0 : Q.countdown) === !0, o = ce(e);
|
|
375
377
|
return /* @__PURE__ */ h("div", { className: "flex items-center", children: [
|
|
376
378
|
/* @__PURE__ */ i(
|
|
377
|
-
|
|
379
|
+
B,
|
|
378
380
|
{
|
|
379
381
|
type: "date",
|
|
380
382
|
value: g.slice(0, 10),
|
|
@@ -525,7 +527,7 @@ const br = Ke(function({
|
|
|
525
527
|
} catch {
|
|
526
528
|
return {};
|
|
527
529
|
}
|
|
528
|
-
})() : e.options ?? {}, x = t.layout_id ?? null, w = !!t.show_row_revisions, y = !!t.row_comments, q = t.allow_revision_restore !== !1, be = t.save_mode ?? "immediate", xe = !!t.show_line_numbers, he = t.enable_reorder !== !1, ge = Array.isArray(t.parent_cascades) ? t.parent_cascades : void 0, ve = Array.isArray(t.row_rules) ? t.row_rules : void 0, we = Array.isArray(t.column_presets) ? t.column_presets : void 0, Ne = typeof t.default_preset == "string" && t.default_preset ? t.default_preset : void 0, ke = Array.isArray(t.drawer_relations) ? t.drawer_relations : void 0, Fe = Array.isArray(t.parent_context_fields) ? t.parent_context_fields : void 0, Ae = Array.isArray(t.unique_by) ? t.unique_by : void 0, Re = typeof t.sort_field == "string" && t.sort_field ? t.sort_field : void 0, Se = t.sort_dir === "desc" ? "desc" : "asc", je = t.freeze_first_column === !0, Ie = typeof t.section_group_by == "string" && t.section_group_by.includes(".") ? t.section_group_by : void 0, De = t.row_filter && typeof t.row_filter == "object" ? t.row_filter : void 0, Me = t.allocate_drawer && typeof t.allocate_drawer == "object" ? t.allocate_drawer : void 0, Pe = t.auto_allocate && typeof t.auto_allocate == "object" ? t.auto_allocate : void 0,
|
|
530
|
+
})() : e.options ?? {}, x = t.layout_id ?? null, w = !!t.show_row_revisions, y = !!t.row_comments, q = t.allow_revision_restore !== !1, be = t.save_mode ?? "immediate", xe = !!t.show_line_numbers, he = t.enable_reorder !== !1, ge = Array.isArray(t.parent_cascades) ? t.parent_cascades : void 0, ve = Array.isArray(t.row_rules) ? t.row_rules : void 0, we = Array.isArray(t.column_presets) ? t.column_presets : void 0, Ne = typeof t.default_preset == "string" && t.default_preset ? t.default_preset : void 0, ke = Array.isArray(t.drawer_relations) ? t.drawer_relations : void 0, Fe = Array.isArray(t.parent_context_fields) ? t.parent_context_fields : void 0, Ae = Array.isArray(t.unique_by) ? t.unique_by : void 0, Re = typeof t.sort_field == "string" && t.sort_field ? t.sort_field : void 0, Se = t.sort_dir === "desc" ? "desc" : "asc", je = t.freeze_first_column === !0, Ie = typeof t.section_group_by == "string" && t.section_group_by.includes(".") ? t.section_group_by : void 0, De = t.row_filter && typeof t.row_filter == "object" ? t.row_filter : void 0, Me = t.allocate_drawer && typeof t.allocate_drawer == "object" ? t.allocate_drawer : void 0, Pe = t.auto_allocate && typeof t.auto_allocate == "object" ? t.auto_allocate : void 0, Le = Array.isArray(t.row_bulk_actions) ? t.row_bulk_actions : void 0, Be = typeof t.upload_template == "string" && t.upload_template ? t.upload_template : void 0, Ee = t.row_match_panel ?? void 0, Te = t.row_defaults && typeof t.row_defaults == "object" ? t.row_defaults : void 0, qe = t.submission_errors === !0 ? {} : t.submission_errors && typeof t.submission_errors == "object" ? t.submission_errors : void 0, R = t.membership_set;
|
|
529
531
|
if (R != null && R.key_field && (R != null && R.value_field))
|
|
530
532
|
return /* @__PURE__ */ i(
|
|
531
533
|
bt,
|
|
@@ -599,8 +601,8 @@ const br = Ke(function({
|
|
|
599
601
|
rowDefaults: Te,
|
|
600
602
|
allocateDrawer: Me,
|
|
601
603
|
autoAllocate: Pe,
|
|
602
|
-
rowBulkActions:
|
|
603
|
-
uploadTemplate:
|
|
604
|
+
rowBulkActions: Le,
|
|
605
|
+
uploadTemplate: Be,
|
|
604
606
|
rowMatchPanel: Ee,
|
|
605
607
|
lineSla: t.line_sla ?? null,
|
|
606
608
|
editorMode: t.editor_mode === "split" ? "split" : "drawer",
|
|
@@ -684,7 +686,7 @@ const br = Ke(function({
|
|
|
684
686
|
}
|
|
685
687
|
);
|
|
686
688
|
if (s === "tags")
|
|
687
|
-
return /* @__PURE__ */ i(
|
|
689
|
+
return /* @__PURE__ */ i(Bt, { field: e, value: n, onChange: a });
|
|
688
690
|
if (s === "select-dropdown" || s === "radio-buttons") {
|
|
689
691
|
const r = (() => {
|
|
690
692
|
const o = f(e.options);
|
|
@@ -711,7 +713,7 @@ const br = Ke(function({
|
|
|
711
713
|
const o = f(e.validation_rules), l = Array.isArray(o) ? o.find((t) => (t == null ? void 0 : t.type) === "max") : null;
|
|
712
714
|
return l && Number.isFinite(Number(l.value)) ? Number(l.value) : _e;
|
|
713
715
|
})(), Y = T ? /* @__PURE__ */ i(
|
|
714
|
-
|
|
716
|
+
B,
|
|
715
717
|
{
|
|
716
718
|
value: se(T, g).display,
|
|
717
719
|
onChange: (r) => {
|
|
@@ -721,7 +723,7 @@ const br = Ke(function({
|
|
|
721
723
|
placeholder: e.placeholder ?? T ?? void 0
|
|
722
724
|
}
|
|
723
725
|
) : /* @__PURE__ */ i(
|
|
724
|
-
|
|
726
|
+
Lt,
|
|
725
727
|
{
|
|
726
728
|
maxLength: de(e),
|
|
727
729
|
value: g,
|
|
@@ -748,7 +750,7 @@ const br = Ke(function({
|
|
|
748
750
|
}
|
|
749
751
|
return Y;
|
|
750
752
|
});
|
|
751
|
-
function
|
|
753
|
+
function Bt({
|
|
752
754
|
field: m,
|
|
753
755
|
value: e,
|
|
754
756
|
onChange: n
|