@nivaro/react 0.3.41 → 0.3.42
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/LayoutForm.js +100 -98
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +644 -15
- package/dist/index.js +814 -775
- package/dist/shared/components/ActivityEntry.js +154 -0
- package/dist/shared/components/AudienceConfirmPanel.js +98 -0
- package/dist/shared/components/BackgroundRunOffer.js +43 -31
- package/dist/shared/components/BroadcastView.js +225 -204
- package/dist/shared/components/CollectionBrowserView.js +3924 -3584
- package/dist/shared/components/ConfigHistory.js +153 -0
- package/dist/shared/components/ConfigReadBack.js +65 -0
- package/dist/shared/components/DataTable.js +379 -346
- package/dist/shared/components/ForceReloadBanner.js +47 -40
- package/dist/shared/components/IdleReloadWatcher.js +69 -0
- package/dist/shared/components/ItemEditForm.js +4041 -3853
- package/dist/shared/components/MyWorkView.js +278 -213
- package/dist/shared/components/NotificationBell.js +130 -121
- package/dist/shared/components/ProfileView.js +776 -1003
- package/dist/shared/components/RecentRecordsRail.js +34 -16
- package/dist/shared/components/RecordReadView.js +500 -477
- package/dist/shared/components/Skeletons.js +199 -0
- package/dist/shared/components/SlowNotice.js +63 -0
- package/dist/shared/components/Term.js +23 -0
- package/dist/shared/components/WidgetSlot.js +350 -353
- package/dist/shared/components/access/PermissionSummary.js +106 -0
- package/dist/shared/components/bulk/BulkActionButtons.js +76 -73
- package/dist/shared/components/chat/ChatPanel.js +902 -886
- package/dist/shared/components/chat/MemberPaging.js +70 -0
- package/dist/shared/components/chat/RoomParts.js +147 -117
- package/dist/shared/components/chat/ScreenClip.js +73 -69
- package/dist/shared/components/chat/chat-core.js +449 -396
- package/dist/shared/components/chat/huddle/huddle-store.js +48 -43
- package/dist/shared/components/help-videos/api.js +2 -5
- package/dist/shared/components/help-videos/viewer/HelpVideoMatchChip.js +79 -0
- package/dist/shared/components/help-videos/viewer/matchChip.js +50 -0
- package/dist/shared/components/imports/CollectionImportPanel.js +139 -133
- package/dist/shared/components/imports/RunDetailSheet.js +222 -227
- package/dist/shared/components/integrations/console/ErrorExplanation.js +121 -0
- package/dist/shared/components/integrations/console/PartnerDetail.js +175 -174
- package/dist/shared/components/integrations/console/SubmissionRow.js +36 -34
- package/dist/shared/components/integrations/console/drill/SubmissionDrill.js +50 -48
- package/dist/shared/components/item-edit/FieldComments.js +212 -0
- package/dist/shared/components/item-edit/FieldRow.js +340 -336
- package/dist/shared/components/item-edit/RecordHeaderActions.js +23 -22
- package/dist/shared/components/item-edit/RelationCombobox.js +231 -222
- package/dist/shared/components/item-edit/RuleHiddenNotes.js +55 -0
- package/dist/shared/components/item-edit/field-comments-context.js +6 -0
- package/dist/shared/components/item-edit/field-sources.js +33 -0
- package/dist/shared/components/item-edit/rule-hidden.js +30 -0
- package/dist/shared/components/layout-editor/HistoryPanel.js +113 -96
- package/dist/shared/components/layout-editor/editors/cascade-filters.js +170 -145
- package/dist/shared/components/layout-editor/inspector/Breadcrumb.js +22 -18
- package/dist/shared/components/layout-editor/inspector/GroupInspector.js +177 -159
- package/dist/shared/components/layout-editor/inspector/PickerTab.js +35 -34
- package/dist/shared/components/layout-editor/inspector/RulesTab.js +124 -111
- package/dist/shared/components/layout-editor/inspector/kit.js +292 -277
- package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
- package/dist/shared/components/list/CopyListLinkButton.js +41 -0
- package/dist/shared/components/list/InlineEdit.js +363 -0
- package/dist/shared/components/notifications/NotificationCenterView.js +213 -181
- package/dist/shared/components/notifications/NotificationDetailBits.js +205 -82
- package/dist/shared/components/notifications/NotificationRulesEditor.js +515 -0
- package/dist/shared/components/notifications/TestMyRules.js +137 -0
- package/dist/shared/components/notifications/changes-lines.js +24 -0
- package/dist/shared/components/notifications/why-lines.js +64 -0
- package/dist/shared/components/panels/CommentPanel.js +316 -281
- package/dist/shared/components/panels/LegalHoldBanner.js +38 -0
- package/dist/shared/components/panels/PipelinePanel.js +201 -196
- package/dist/shared/components/panels/RevisionsPanel.js +496 -479
- package/dist/shared/components/pipeline/PipelineEditorView.js +1587 -1560
- package/dist/shared/components/pipeline/PipelineStateOwners.js +116 -103
- package/dist/shared/components/profile/PersonDidPanel.js +188 -0
- package/dist/shared/components/profile/PersonProfile.js +57 -52
- package/dist/shared/components/queue/QueueWorklist.js +1526 -1365
- package/dist/shared/hooks/useSlowReason.js +39 -0
- package/dist/shared/lib/activity-sentence.js +670 -0
- package/dist/shared/lib/config-sentences.js +418 -0
- package/dist/shared/lib/core-glossary.js +229 -0
- package/dist/shared/lib/error-hints.js +159 -0
- package/dist/shared/lib/error-message.js +105 -0
- package/dist/shared/lib/error-toast.js +22 -0
- package/dist/shared/lib/field-comments.js +25 -0
- package/dist/shared/lib/filter-sentence.js +261 -0
- package/dist/shared/lib/glossary.js +55 -48
- package/dist/shared/lib/idle-reload.js +138 -0
- package/dist/shared/lib/layout-resolve.js +42 -29
- package/dist/shared/lib/list-inline-edit.js +190 -0
- package/dist/shared/lib/list-link.js +147 -0
- package/dist/shared/lib/prefetch.js +259 -106
- package/dist/shared/lib/record-ref.js +72 -0
- package/dist/shared/lib/reload-holds.js +25 -0
- package/dist/shared/lib/safe-error.js +52 -24
- package/dist/shared/lib/skeleton-shapes.js +72 -0
- package/dist/shared/lib/slow-reason.js +63 -0
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ import { CascadeWriter as oe } from "../ai-rules/CascadeWriter.js";
|
|
|
7
7
|
import { CascadeFiltersEditor as te } from "../editors/cascade-filters.js";
|
|
8
8
|
import { editorQueryKeys as ie } from "../editors/editor-queries.js";
|
|
9
9
|
import { useFieldCtx as ne } from "./field-context.js";
|
|
10
|
-
import { useGlobalValue as
|
|
10
|
+
import { useGlobalValue as m, GlobalWriterContext as ae, Toggle as g, Setting as b, TextInput as re, Section as $, Choice as x } from "./kit.js";
|
|
11
11
|
import { asObject as de, asArray as se, relKindOf as ce, describeField as fe, withKey as F } from "./model.js";
|
|
12
12
|
import { PickerMisses as pe } from "./PickerMisses.js";
|
|
13
13
|
import { PickerPreview as ue } from "./PickerPreview.js";
|
|
@@ -47,32 +47,32 @@ function S(l) {
|
|
|
47
47
|
}
|
|
48
48
|
function Ne() {
|
|
49
49
|
var L;
|
|
50
|
-
const l = ne(), { info: o, ov: d, opts: a, env: s, globalOptions: r, globalDependency: q } = l,
|
|
50
|
+
const l = ne(), { info: o, ov: d, opts: a, env: s, globalOptions: r, globalDependency: q } = l, i = o.label, c = o.relKind === "M2O", u = o.relKind === "M2M", _ = o.iface === "relation-path" || o.isPath, N = o.iface === "file-image" || o.iface === "files-m2m", P = o.iface === "relation-grouped", h = de(d.drilldown), y = h.enabled ?? _, W = o.relatedCollection ?? (typeof r.path_target_collection == "string" ? r.path_target_collection : null), { data: D = [] } = ge(c || u || _ ? W : null), I = D.filter((e) => e.layout_type === "detail"), w = h.width == null ? "" : String(h.width), [G, T] = Z(w);
|
|
51
51
|
ee(() => {
|
|
52
52
|
T((e) => {
|
|
53
|
-
const
|
|
54
|
-
return (
|
|
53
|
+
const n = S(e);
|
|
54
|
+
return (n === null ? "" : String(n)) === w ? e : w;
|
|
55
55
|
});
|
|
56
56
|
}, [w]);
|
|
57
|
-
const R = S(G), k = (e,
|
|
57
|
+
const R = S(G), k = (e, n, f) => l.setOverride("drilldown", { ...h, enabled: y, ...e }, n, f), { data: Q = [] } = he(P ? o.relatedCollection : null), A = Q.filter(
|
|
58
58
|
(e) => e.many_collection === o.relatedCollection && e.many_field && !e.junction_field
|
|
59
|
-
).map((e) => ({ value: e.many_field, label: `${e.many_field} → ${e.one_collection}` })), B =
|
|
59
|
+
).map((e) => ({ value: e.many_field, label: `${e.many_field} → ${e.one_collection}` })), B = m(
|
|
60
60
|
"field.group_field",
|
|
61
61
|
typeof r.group_field == "string" ? r.group_field : ""
|
|
62
|
-
), U =
|
|
62
|
+
), U = m(
|
|
63
63
|
"field.option_field",
|
|
64
64
|
typeof r.option_field == "string" ? r.option_field : ""
|
|
65
65
|
), V = (L = le(ae)) == null ? void 0 : L.draft.dependency_config, v = se((V ?? q).cascade_filters), C = new Set(l.globals.map((e) => e.field));
|
|
66
66
|
for (const e of l.relations)
|
|
67
67
|
e.one_field && e.one_field !== "id" && e.one_collection === s.collection && C.add(e.one_field), e.many_field && e.many_collection === s.collection && C.add(e.many_field);
|
|
68
|
-
const M = [...C].filter((e) => e !== o.field).map((e) => ({ f: e, kind: ce(e, l.relations) })).filter((e) => e.kind === "M2O" || e.kind === "M2M").map(({ f: e, kind:
|
|
68
|
+
const M = [...C].filter((e) => e !== o.field).map((e) => ({ f: e, kind: ce(e, l.relations) })).filter((e) => e.kind === "M2O" || e.kind === "M2M").map(({ f: e, kind: n }) => {
|
|
69
69
|
const f = s.bundle.placements.find((X) => X.field === e) ?? null;
|
|
70
70
|
return {
|
|
71
71
|
field: e,
|
|
72
72
|
label: fe(e, l.globals, l.relations, f).label,
|
|
73
|
-
kind:
|
|
73
|
+
kind: n
|
|
74
74
|
};
|
|
75
|
-
}).sort((e,
|
|
75
|
+
}).sort((e, n) => e.label.localeCompare(n.label)), O = (e, n) => typeof r[e] == "boolean" ? r[e] : n, z = m("field.allow_upload", O("allow_upload", !0)), H = m("field.allow_pick", O("allow_pick", !0)), J = m("field.pending_save", O("pending_save", !1));
|
|
76
76
|
return /* @__PURE__ */ p("div", { className: "space-y-5", children: [
|
|
77
77
|
(c || u) && /* @__PURE__ */ p(Y, { children: [
|
|
78
78
|
/* @__PURE__ */ t(
|
|
@@ -85,12 +85,12 @@ function Ne() {
|
|
|
85
85
|
onChange: (e) => l.setOption(
|
|
86
86
|
"inline_relation",
|
|
87
87
|
e ? !0 : void 0,
|
|
88
|
-
e ? `Edit ${
|
|
88
|
+
e ? `Edit ${i} inline` : `Stop editing ${i} inline`
|
|
89
89
|
)
|
|
90
90
|
}
|
|
91
91
|
),
|
|
92
92
|
/* @__PURE__ */ t(
|
|
93
|
-
|
|
93
|
+
b,
|
|
94
94
|
{
|
|
95
95
|
k: "field.option_sort",
|
|
96
96
|
label: "Order of the options",
|
|
@@ -105,7 +105,7 @@ function Ne() {
|
|
|
105
105
|
onChange: (e) => l.setOption(
|
|
106
106
|
"option_sort",
|
|
107
107
|
e.trim() ? e : void 0,
|
|
108
|
-
`Change the order of ${
|
|
108
|
+
`Change the order of ${i} options`,
|
|
109
109
|
!0
|
|
110
110
|
)
|
|
111
111
|
}
|
|
@@ -124,7 +124,7 @@ function Ne() {
|
|
|
124
124
|
onChange: (e) => l.setOption(
|
|
125
125
|
"enforce_picker_rules",
|
|
126
126
|
e ? !0 : void 0,
|
|
127
|
-
e ? `Enforce the picker rules of ${
|
|
127
|
+
e ? `Enforce the picker rules of ${i}` : `Stop enforcing the picker rules of ${i}`
|
|
128
128
|
)
|
|
129
129
|
}
|
|
130
130
|
),
|
|
@@ -140,12 +140,12 @@ function Ne() {
|
|
|
140
140
|
checked: y,
|
|
141
141
|
onChange: (e) => k(
|
|
142
142
|
{ enabled: e },
|
|
143
|
-
e ? `Open ${
|
|
143
|
+
e ? `Open ${i} in a panel` : `Stop opening ${i} in a panel`
|
|
144
144
|
)
|
|
145
145
|
}
|
|
146
146
|
),
|
|
147
147
|
/* @__PURE__ */ t(
|
|
148
|
-
|
|
148
|
+
b,
|
|
149
149
|
{
|
|
150
150
|
k: "field.drilldown.layout_id",
|
|
151
151
|
label: "Panel layout",
|
|
@@ -160,13 +160,13 @@ function Ne() {
|
|
|
160
160
|
{ value: "", label: "The default detail view" },
|
|
161
161
|
...I.map((e) => ({ value: String(e.id), label: e.name }))
|
|
162
162
|
],
|
|
163
|
-
onChange: (e) => k({ layout_id: e ? Number(e) : null }, `Change the panel layout of ${
|
|
163
|
+
onChange: (e) => k({ layout_id: e ? Number(e) : null }, `Change the panel layout of ${i}`)
|
|
164
164
|
}
|
|
165
165
|
)
|
|
166
166
|
}
|
|
167
167
|
),
|
|
168
168
|
/* @__PURE__ */ p(
|
|
169
|
-
|
|
169
|
+
b,
|
|
170
170
|
{
|
|
171
171
|
k: "field.drilldown.width",
|
|
172
172
|
label: "Panel width",
|
|
@@ -181,8 +181,8 @@ function Ne() {
|
|
|
181
181
|
placeholder: "60%",
|
|
182
182
|
onChange: (e) => {
|
|
183
183
|
T(e.target.value);
|
|
184
|
-
const
|
|
185
|
-
|
|
184
|
+
const n = S(e.target.value);
|
|
185
|
+
n !== "invalid" && k({ width: n }, `Change the panel width of ${i}`, !0);
|
|
186
186
|
},
|
|
187
187
|
onBlur: () => s.flush(),
|
|
188
188
|
className: "h-7 w-full rounded-md border border-slate-200 bg-white px-2 font-mono text-[12px] focus:border-nvr-cyan focus:outline-none disabled:opacity-40 dark:border-border dark:bg-card"
|
|
@@ -195,7 +195,7 @@ function Ne() {
|
|
|
195
195
|
] }),
|
|
196
196
|
P && /* @__PURE__ */ p($, { title: "Grouped list", children: [
|
|
197
197
|
/* @__PURE__ */ t(
|
|
198
|
-
|
|
198
|
+
b,
|
|
199
199
|
{
|
|
200
200
|
k: "field.group_field",
|
|
201
201
|
label: "Group options by",
|
|
@@ -211,7 +211,7 @@ function Ne() {
|
|
|
211
211
|
"field.group_field",
|
|
212
212
|
"group_field",
|
|
213
213
|
e || void 0,
|
|
214
|
-
`Group the ${
|
|
214
|
+
`Group the ${i} options`,
|
|
215
215
|
e
|
|
216
216
|
)
|
|
217
217
|
}
|
|
@@ -219,7 +219,7 @@ function Ne() {
|
|
|
219
219
|
}
|
|
220
220
|
),
|
|
221
221
|
/* @__PURE__ */ t(
|
|
222
|
-
|
|
222
|
+
b,
|
|
223
223
|
{
|
|
224
224
|
k: "field.option_field",
|
|
225
225
|
label: "Option field",
|
|
@@ -235,7 +235,7 @@ function Ne() {
|
|
|
235
235
|
"field.option_field",
|
|
236
236
|
"option_field",
|
|
237
237
|
e || void 0,
|
|
238
|
-
`Change the ${
|
|
238
|
+
`Change the ${i} options`,
|
|
239
239
|
e
|
|
240
240
|
)
|
|
241
241
|
}
|
|
@@ -244,7 +244,7 @@ function Ne() {
|
|
|
244
244
|
)
|
|
245
245
|
] }),
|
|
246
246
|
(c || u) && /* @__PURE__ */ p(
|
|
247
|
-
|
|
247
|
+
b,
|
|
248
248
|
{
|
|
249
249
|
k: "field.cascade_filters",
|
|
250
250
|
label: "Narrow the options by another field",
|
|
@@ -257,14 +257,15 @@ function Ne() {
|
|
|
257
257
|
rules: v,
|
|
258
258
|
m2oFields: M,
|
|
259
259
|
relatedCollection: o.relatedCollection,
|
|
260
|
+
fieldLabel: i,
|
|
260
261
|
onChange: (e) => l.proposeGlobal(
|
|
261
262
|
"field.cascade_filters",
|
|
262
263
|
e,
|
|
263
|
-
`Change how ${
|
|
264
|
-
(
|
|
265
|
-
...
|
|
264
|
+
`Change how ${i} options are narrowed`,
|
|
265
|
+
(n) => ({
|
|
266
|
+
...n,
|
|
266
267
|
dependency_config: F(
|
|
267
|
-
|
|
268
|
+
n.dependency_config,
|
|
268
269
|
"cascade_filters",
|
|
269
270
|
e.length ? e : void 0
|
|
270
271
|
) ?? {}
|
|
@@ -282,7 +283,7 @@ function Ne() {
|
|
|
282
283
|
currentOptionFilter: r.option_filter && typeof r.option_filter == "object" && !Array.isArray(r.option_filter) ? r.option_filter : null,
|
|
283
284
|
parentFields: M.filter((e) => e.kind === "M2O").map((e) => e.field),
|
|
284
285
|
disabled: l.readOnly,
|
|
285
|
-
onApply: (e,
|
|
286
|
+
onApply: (e, n) => l.proposeGlobal("field.cascade_filters", e.rules, n, (f) => ({
|
|
286
287
|
...f,
|
|
287
288
|
dependency_config: F(
|
|
288
289
|
f.dependency_config,
|
|
@@ -309,7 +310,7 @@ function Ne() {
|
|
|
309
310
|
"field.allow_upload",
|
|
310
311
|
"allow_upload",
|
|
311
312
|
e,
|
|
312
|
-
e ? `Allow uploads to ${
|
|
313
|
+
e ? `Allow uploads to ${i}` : `Stop uploads to ${i}`
|
|
313
314
|
)
|
|
314
315
|
}
|
|
315
316
|
),
|
|
@@ -325,7 +326,7 @@ function Ne() {
|
|
|
325
326
|
"field.allow_pick",
|
|
326
327
|
"allow_pick",
|
|
327
328
|
e,
|
|
328
|
-
`Change file picking for ${
|
|
329
|
+
`Change file picking for ${i}`
|
|
329
330
|
)
|
|
330
331
|
}
|
|
331
332
|
),
|
|
@@ -341,14 +342,14 @@ function Ne() {
|
|
|
341
342
|
"field.pending_save",
|
|
342
343
|
"pending_save",
|
|
343
344
|
e || void 0,
|
|
344
|
-
`Change when ${
|
|
345
|
+
`Change when ${i} files save`,
|
|
345
346
|
e
|
|
346
347
|
)
|
|
347
348
|
}
|
|
348
349
|
)
|
|
349
350
|
] }),
|
|
350
351
|
!(c || u || _ || N) && /* @__PURE__ */ p("p", { className: "text-[12px] text-muted-foreground", children: [
|
|
351
|
-
|
|
352
|
+
i,
|
|
352
353
|
" is not a picker. Nothing to set here."
|
|
353
354
|
] })
|
|
354
355
|
] });
|