@nivaro/react 0.3.100 → 0.3.101
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/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +46 -3
- package/dist/index.js +623 -620
- package/dist/shared/components/ActivityEntry.js +5 -5
- package/dist/shared/components/ItemEditForm.js +2708 -2704
- package/dist/shared/components/JobsTray.js +74 -63
- package/dist/shared/components/NotificationBell.js +80 -73
- package/dist/shared/components/TipLayer.js +56 -41
- package/dist/shared/components/integrations/console/SignalCard.js +40 -40
- package/dist/shared/components/integrations/console/drill/SubmissionDrill.js +95 -73
- package/dist/shared/components/integrations/console/drill/status.js +23 -18
- package/dist/shared/components/item-edit/RecordInsights.js +86 -86
- package/dist/shared/components/item-edit/header-path-preview.js +46 -34
- package/dist/shared/components/notifications/DeliveryChips.js +1 -2
- package/dist/shared/components/panels/BackgroundMove.js +152 -85
- package/dist/shared/components/panels/PipelinePanel.js +602 -594
- package/dist/shared/components/profile/ActivityFeedCard.js +322 -0
- package/dist/shared/components/profile/DayTimeline.js +145 -140
- package/dist/shared/components/profile/PersonAccess.js +679 -383
- package/dist/shared/components/profile/PersonActivity.js +404 -427
- package/dist/shared/components/profile/PersonDidPanel.js +248 -134
- package/dist/shared/components/profile/PersonProfile.js +33 -32
- package/dist/shared/components/profile/journey-view.js +166 -0
- package/dist/shared/lib/activity-sentence.js +319 -236
- package/dist/shared/lib/jobs-tray.js +60 -41
- package/dist/shared/lib/move-failure.js +16 -6
- package/dist/shared/lib/obligation-banner.js +16 -16
- package/dist/shared/lib/partner-failure.js +44 -32
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
function
|
|
1
|
+
function q(e) {
|
|
2
2
|
const n = i(e.collection_label) || "related rows", t = i(e.row_label), r = t ? `${n} · ${t}` : n;
|
|
3
3
|
if (e.verb === "added") return `added ${r}`;
|
|
4
4
|
if (e.verb === "removed") return `removed ${r}`;
|
|
5
5
|
const o = (e.changes ?? []).filter((s) => s && i(s.label)).map((s) => `${i(s.label)} ${i(s.from) || "—"} → ${i(s.to) || "—"}`);
|
|
6
6
|
return o.length ? `changed ${r}: ${o.join(", ")}` : `changed ${r}`;
|
|
7
7
|
}
|
|
8
|
-
const
|
|
8
|
+
const w = "a record you can't see", J = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, U = {
|
|
9
9
|
ai: "AI",
|
|
10
10
|
api: "API",
|
|
11
11
|
csv: "CSV",
|
|
@@ -29,33 +29,33 @@ const x = "a record you can't see", Y = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0
|
|
|
29
29
|
function i(e) {
|
|
30
30
|
return e == null ? "" : String(e).trim();
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function oe(e) {
|
|
33
33
|
return i(e).toUpperCase();
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function E(e) {
|
|
36
36
|
return e.split(/[\s_.:-]+/).map((n) => n.trim()).filter(Boolean);
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function z(e) {
|
|
39
39
|
const n = e.toLowerCase();
|
|
40
|
-
return
|
|
40
|
+
return U[n] ?? n;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
const n =
|
|
42
|
+
function V(e) {
|
|
43
|
+
const n = E(e).map(z).join(" ");
|
|
44
44
|
return n ? n.charAt(0).toUpperCase() + n.slice(1) : "";
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
return
|
|
46
|
+
function O(e) {
|
|
47
|
+
return E(e).map((n) => U[n.toLowerCase()] ?? n.charAt(0).toUpperCase() + n.slice(1).toLowerCase()).join(" ");
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function K(e) {
|
|
50
50
|
return /ies$/i.test(e) ? e.replace(/ies$/i, (n) => n === "IES" ? "Y" : "y") : /(ss|us|is)$/i.test(e) ? e : /(x|ch|sh|ss|us)es$/i.test(e) ? e.replace(/es$/i, "") : /s$/i.test(e) && e.length > 1 ? e.slice(0, -1) : e;
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function M(e) {
|
|
53
53
|
return /[^aeiou]y$/i.test(e) ? e.replace(/y$/i, (n) => n === "Y" ? "IES" : "ies") : /(s|x|z|ch|sh)$/i.test(e) && !/^[A-Z0-9]+$/.test(e) ? `${e}es` : `${e}s`;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function _(e) {
|
|
56
56
|
return e.split(" ").map((n) => /[A-Z][^ ]*[A-Z]/.test(n) ? n : n.toLowerCase()).join(" ");
|
|
57
57
|
}
|
|
58
|
-
const
|
|
58
|
+
const ie = {
|
|
59
59
|
nivaro_activity: "Activity entry",
|
|
60
60
|
nivaro_api_keys: "API key",
|
|
61
61
|
nivaro_approval_chains: "Approval chain",
|
|
@@ -80,40 +80,40 @@ const X = {
|
|
|
80
80
|
nivaro_webhooks: "Webhook",
|
|
81
81
|
nivaro_workflow_templates: "Pipeline"
|
|
82
82
|
};
|
|
83
|
-
function
|
|
84
|
-
var
|
|
83
|
+
function b(e, n) {
|
|
84
|
+
var l;
|
|
85
85
|
const t = i(e);
|
|
86
86
|
if (!t) return { singular: "Record", plural: "Records" };
|
|
87
|
-
const r = (
|
|
88
|
-
if (
|
|
89
|
-
const
|
|
90
|
-
return { singular:
|
|
87
|
+
const r = (l = n == null ? void 0 : n.collections) == null ? void 0 : l[t], o = typeof r == "string" ? { plural: r } : r ?? {}, s = i(o.plural), a = i(o.singular);
|
|
88
|
+
if (a || s) {
|
|
89
|
+
const p = a || A(s, K), $ = s && s !== p ? s : A(p, M);
|
|
90
|
+
return { singular: p, plural: $ };
|
|
91
91
|
}
|
|
92
|
-
const
|
|
93
|
-
if (
|
|
94
|
-
const
|
|
95
|
-
return { singular: d, plural:
|
|
92
|
+
const c = ie[t];
|
|
93
|
+
if (c) return { singular: c, plural: c === "Settings" ? c : A(c, M) };
|
|
94
|
+
const u = O(t.replace(/^(nivaro|directus)_/, "")) || "Record", d = A(u, K);
|
|
95
|
+
return { singular: d, plural: A(d, M) };
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function A(e, n) {
|
|
98
98
|
const t = e.split(" ");
|
|
99
99
|
return t[t.length - 1] = n(t[t.length - 1] ?? ""), t.join(" ");
|
|
100
100
|
}
|
|
101
|
-
function
|
|
102
|
-
const { singular: r, plural: o } =
|
|
103
|
-
return `${e} ${
|
|
101
|
+
function R(e, n, t) {
|
|
102
|
+
const { singular: r, plural: o } = b(n, t);
|
|
103
|
+
return `${e} ${_(e === 1 ? r : o)}`;
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
const t = e.user ?? e.user_id ?? null, r = t ?
|
|
105
|
+
function se(e, n) {
|
|
106
|
+
const t = e.user ?? e.user_id ?? null, r = t ? L(t, n) : null;
|
|
107
107
|
if (r) return r;
|
|
108
108
|
const o = [i(e.first_name), i(e.last_name)].filter(Boolean).join(" ");
|
|
109
109
|
return o || (i(e.user_email) ? i(e.user_email) : null);
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function L(e, n) {
|
|
112
112
|
if (!e || !(n != null && n.users)) return null;
|
|
113
113
|
const t = n.users;
|
|
114
|
-
return i(t[e] ?? t[
|
|
114
|
+
return i(t[e] ?? t[oe(e)] ?? t[i(e).toLowerCase()]) || null;
|
|
115
115
|
}
|
|
116
|
-
const
|
|
116
|
+
const ae = /* @__PURE__ */ new Set([
|
|
117
117
|
"person",
|
|
118
118
|
"view_as",
|
|
119
119
|
"api_key",
|
|
@@ -123,7 +123,7 @@ const ne = /* @__PURE__ */ new Set([
|
|
|
123
123
|
"cron",
|
|
124
124
|
"system"
|
|
125
125
|
]);
|
|
126
|
-
function
|
|
126
|
+
function ce(e) {
|
|
127
127
|
if (e == null || e === "") return null;
|
|
128
128
|
let n = e;
|
|
129
129
|
if (typeof e == "string")
|
|
@@ -134,15 +134,15 @@ function te(e) {
|
|
|
134
134
|
}
|
|
135
135
|
if (!n || typeof n != "object") return null;
|
|
136
136
|
const t = n, r = i(t.kind);
|
|
137
|
-
return
|
|
137
|
+
return ae.has(r) ? {
|
|
138
138
|
kind: r,
|
|
139
139
|
id: t.id == null ? null : String(t.id),
|
|
140
140
|
name: t.name == null ? null : String(t.name),
|
|
141
141
|
on_behalf_of: t.on_behalf_of == null ? null : String(t.on_behalf_of)
|
|
142
142
|
} : null;
|
|
143
143
|
}
|
|
144
|
-
function
|
|
145
|
-
const n =
|
|
144
|
+
function W(e) {
|
|
145
|
+
const n = ce(e.actor);
|
|
146
146
|
if (n) return n;
|
|
147
147
|
const t = e.user ?? e.user_id ?? null;
|
|
148
148
|
if (i(e.mcp_conn) || i(e.via_app) || i(e.via_agent))
|
|
@@ -163,23 +163,23 @@ function D(e) {
|
|
|
163
163
|
};
|
|
164
164
|
const o = i(e.chain_parent), s = /^(cron|import_run|flow_run):(.+)$/.exec(o);
|
|
165
165
|
if (s) {
|
|
166
|
-
const
|
|
167
|
-
return { kind:
|
|
166
|
+
const c = s[1] === "cron" ? "cron" : s[1] === "import_run" ? "import" : "flow";
|
|
167
|
+
return { kind: c, id: s[2], name: c === "cron" ? s[2] : null, on_behalf_of: t };
|
|
168
168
|
}
|
|
169
|
-
const
|
|
170
|
-
return
|
|
169
|
+
const a = /^import:([^:]+)/i.exec(i(e.comment));
|
|
170
|
+
return a ? { kind: "import", id: a[1], name: a[1], on_behalf_of: t } : i(e.origin) === "import" ? { kind: "import", id: null, name: null, on_behalf_of: t } : t ? { kind: "person", id: t, name: null, on_behalf_of: null } : {
|
|
171
171
|
kind: "system",
|
|
172
172
|
id: null,
|
|
173
173
|
name: i(e.origin) === "integration" ? "An integration" : null
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
|
-
function
|
|
177
|
-
const t =
|
|
176
|
+
function G(e, n) {
|
|
177
|
+
const t = W(e), r = se(e, n), o = L(t.on_behalf_of, n) ?? r;
|
|
178
178
|
switch (t.kind) {
|
|
179
179
|
case "person":
|
|
180
180
|
return r ?? "Someone";
|
|
181
181
|
case "view_as":
|
|
182
|
-
return `${(
|
|
182
|
+
return `${(L(t.id, n) ?? i(t.name) ?? "") || "An administrator"} as ${o ?? "someone"}`;
|
|
183
183
|
case "api_key":
|
|
184
184
|
return `API key “${i(t.name) || (t.id ? `#${t.id}` : "unnamed")}”`;
|
|
185
185
|
case "mcp": {
|
|
@@ -196,66 +196,66 @@ function J(e, n) {
|
|
|
196
196
|
return i(t.name) || "System";
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function I(e, n, t) {
|
|
200
200
|
const r = i(n);
|
|
201
201
|
if (!r || !i(e)) return null;
|
|
202
|
-
const o = `${e}:${r}`, s = t == null ? void 0 : t.records, { singular:
|
|
202
|
+
const o = `${e}:${r}`, s = t == null ? void 0 : t.records, { singular: a } = b(e, t);
|
|
203
203
|
if (s && o in s) {
|
|
204
|
-
const
|
|
205
|
-
if (
|
|
206
|
-
const
|
|
207
|
-
return
|
|
204
|
+
const c = s[o];
|
|
205
|
+
if (c == null) return w;
|
|
206
|
+
const u = i(c);
|
|
207
|
+
return u ? u.toLowerCase().startsWith(a.toLowerCase()) ? u : `${a} ${u}` : a;
|
|
208
208
|
}
|
|
209
|
-
return
|
|
209
|
+
return J.test(r) ? `a ${_(a)}` : `${a} ${r}`;
|
|
210
210
|
}
|
|
211
|
-
function
|
|
211
|
+
function F(e, n, t) {
|
|
212
212
|
var o;
|
|
213
213
|
const r = (o = t == null ? void 0 : t.fields) == null ? void 0 : o[`${e ?? ""}.${n}`];
|
|
214
|
-
return i(r) ||
|
|
214
|
+
return i(r) || O(n);
|
|
215
215
|
}
|
|
216
|
-
function
|
|
217
|
-
const r = [...new Set(n)].map((o) =>
|
|
216
|
+
function P(e, n, t) {
|
|
217
|
+
const r = [...new Set(n)].map((o) => F(e, o, t));
|
|
218
218
|
return r.length === 0 ? "" : r.length === 1 ? r[0] : r.length <= 3 ? `${r.slice(0, -1).join(", ")} and ${r[r.length - 1]}` : `${r.slice(0, 2).join(", ")} and ${r.length - 2} other fields`;
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function ue(e) {
|
|
221
221
|
const n = String(e ?? "");
|
|
222
|
-
return n.startsWith("$t:") ?
|
|
222
|
+
return n.startsWith("$t:") ? O(n.slice(3).replace(/-/g, "_")) : n;
|
|
223
223
|
}
|
|
224
|
-
const
|
|
225
|
-
function
|
|
226
|
-
var
|
|
224
|
+
const de = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/, le = /^\d{4}-\d{2}-\d{2}$/;
|
|
225
|
+
function H(e, n, t, r) {
|
|
226
|
+
var a, c;
|
|
227
227
|
if (t == null || t === "") return "empty";
|
|
228
228
|
if (typeof t == "boolean") return t ? "Yes" : "No";
|
|
229
229
|
if (typeof t == "object")
|
|
230
230
|
return Array.isArray(t) ? `${t.length} items` : "a new value";
|
|
231
|
-
const o = String(t), s = (
|
|
232
|
-
if (s) return
|
|
233
|
-
if (
|
|
234
|
-
if (
|
|
235
|
-
const
|
|
236
|
-
if (!Number.isNaN(
|
|
231
|
+
const o = String(t), s = (c = (a = r == null ? void 0 : r.choices) == null ? void 0 : a[`${e ?? ""}.${n}`]) == null ? void 0 : c[o];
|
|
232
|
+
if (s) return ue(s);
|
|
233
|
+
if (le.test(o)) return o;
|
|
234
|
+
if (de.test(o)) {
|
|
235
|
+
const u = new Date(o);
|
|
236
|
+
if (!Number.isNaN(u.getTime()))
|
|
237
237
|
try {
|
|
238
|
-
return
|
|
238
|
+
return u.toLocaleString(void 0, {
|
|
239
239
|
dateStyle: "medium",
|
|
240
240
|
timeStyle: "short",
|
|
241
241
|
...r != null && r.timeZone ? { timeZone: r.timeZone } : {}
|
|
242
242
|
});
|
|
243
243
|
} catch {
|
|
244
|
-
return
|
|
244
|
+
return u.toLocaleString();
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
247
|
return o.length > 60 ? `${o.slice(0, 57)}…` : o;
|
|
248
248
|
}
|
|
249
|
-
function
|
|
249
|
+
function Q(e, n, t, r) {
|
|
250
250
|
var s;
|
|
251
251
|
const o = `${e ?? ""}.${n}`;
|
|
252
252
|
return !(!(r != null && r.fields) || !(o in r.fields) || (s = r.links) != null && s[o] || t != null && typeof t == "object");
|
|
253
253
|
}
|
|
254
|
-
function
|
|
254
|
+
function Z(e) {
|
|
255
255
|
var n, t;
|
|
256
256
|
return (n = e.changes) != null && n.length ? e.changes.map((r) => r.field) : (t = e.changed_fields) != null && t.length ? e.changed_fields : e.delta && typeof e.delta == "object" ? Object.keys(e.delta) : [];
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function B(e) {
|
|
259
259
|
const n = { from: null, to: null, via: null, note: null, auto: !1 };
|
|
260
260
|
let t = i(e);
|
|
261
261
|
if (!t) return n;
|
|
@@ -267,14 +267,14 @@ function z(e) {
|
|
|
267
267
|
const s = /^bulk:\s*(.+?)\s*→\s*(.+)$/i.exec(t);
|
|
268
268
|
if (s)
|
|
269
269
|
return n.via = s[1], n.to = s[2], n;
|
|
270
|
-
const
|
|
271
|
-
if (
|
|
272
|
-
const
|
|
273
|
-
n.from =
|
|
270
|
+
const a = /^(.*?)\s*→\s*(.+?)(?:\s+via\s+(.+))?$/.exec(t);
|
|
271
|
+
if (a) {
|
|
272
|
+
const c = i(a[1]);
|
|
273
|
+
n.from = c && c !== "Start" ? c : null, n.to = i(a[2]) || null, n.via = i(a[3]) || null;
|
|
274
274
|
}
|
|
275
275
|
return n;
|
|
276
276
|
}
|
|
277
|
-
const
|
|
277
|
+
const y = {
|
|
278
278
|
ack: "acknowledged",
|
|
279
279
|
acknowledge: "acknowledged",
|
|
280
280
|
acquire: "took",
|
|
@@ -395,7 +395,7 @@ const A = {
|
|
|
395
395
|
updated: "updated",
|
|
396
396
|
upload: "uploaded",
|
|
397
397
|
view: "viewed"
|
|
398
|
-
},
|
|
398
|
+
}, pe = /* @__PURE__ */ new Set([
|
|
399
399
|
"add",
|
|
400
400
|
"build",
|
|
401
401
|
"create",
|
|
@@ -410,73 +410,141 @@ const A = {
|
|
|
410
410
|
"schedule",
|
|
411
411
|
"upload"
|
|
412
412
|
]);
|
|
413
|
-
function
|
|
414
|
-
const n =
|
|
413
|
+
function X(e) {
|
|
414
|
+
const n = E(e).map((a) => a.toLowerCase());
|
|
415
415
|
if (n.length === 0) return { verb: null, past: null, noun: "" };
|
|
416
416
|
const t = n[n.length - 1];
|
|
417
417
|
let r = -1;
|
|
418
|
-
if (
|
|
419
|
-
else if (
|
|
420
|
-
else for (let
|
|
421
|
-
if (r < 0) return { verb: null, past: null, noun: n.map(
|
|
418
|
+
if (y[t]) r = n.length - 1;
|
|
419
|
+
else if (y[n[0]]) r = 0;
|
|
420
|
+
else for (let a = n.length - 1; a >= 0; a--) y[n[a]] && (r = a);
|
|
421
|
+
if (r < 0) return { verb: null, past: null, noun: n.map(z).join(" ") };
|
|
422
422
|
const o = n[r], s = [...n.slice(0, r), ...n.slice(r + 1)];
|
|
423
|
-
return { verb: o, past:
|
|
423
|
+
return { verb: o, past: y[o], noun: s.map(z).join(" ") };
|
|
424
424
|
}
|
|
425
|
-
function
|
|
426
|
-
return n ? /s$/.test(n) && !/ss$/.test(n) ? n : e &&
|
|
425
|
+
function fe(e, n) {
|
|
426
|
+
return n ? /s$/.test(n) && !/ss$/.test(n) ? n : e && pe.has(e) ? `${/^[aeiou]/i.test(n) ? "an" : "a"} ${n}` : `the ${n}` : "";
|
|
427
427
|
}
|
|
428
|
-
function
|
|
428
|
+
function me(e) {
|
|
429
429
|
const n = /(\d[\d,]*)\s+rows?/i.exec(e), t = /^\s*(csv|xlsx|json|pdf|xml)\b/i.exec(e);
|
|
430
430
|
return {
|
|
431
431
|
rows: n ? Number(n[1].replace(/,/g, "")) : null,
|
|
432
|
-
format: t ?
|
|
432
|
+
format: t ? U[t[1].toLowerCase()] ?? t[1].toUpperCase() : null
|
|
433
433
|
};
|
|
434
434
|
}
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
435
|
+
function S(e, n) {
|
|
436
|
+
var r;
|
|
437
|
+
const t = `${i(e.collection)}:${i(e.item)}`;
|
|
438
|
+
return ((r = n == null ? void 0 : n.junctions) == null ? void 0 : r[t]) ?? null;
|
|
439
|
+
}
|
|
440
|
+
function ee(e) {
|
|
441
|
+
return `${/^[aeiou]/i.test(e) ? "an" : "a"} ${e}`;
|
|
442
|
+
}
|
|
443
|
+
function ne(e, n) {
|
|
444
|
+
const t = `a ${_(b(e.parent_collection, n).singular)} record`;
|
|
445
|
+
if (!i(e.parent_id)) return t;
|
|
446
|
+
const r = I(e.parent_collection, e.parent_id, n);
|
|
447
|
+
return !r || r === w ? t : r;
|
|
448
|
+
}
|
|
449
|
+
function D(e) {
|
|
450
|
+
const n = i(e.value);
|
|
451
|
+
return n ? `${e.noun} ${n}` : ee(e.noun);
|
|
452
|
+
}
|
|
453
|
+
function te(e, n, t) {
|
|
454
|
+
const r = ne(n, t);
|
|
455
|
+
return e === "create" ? `added ${D(n)} to ${r}` : e === "delete" ? `removed ${D(n)} from ${r}` : `updated ${D(n)} on ${r}`;
|
|
456
|
+
}
|
|
457
|
+
function $e(e, n) {
|
|
458
|
+
var l;
|
|
459
|
+
const t = e.map((p) => ({ e: p, j: S(p, n) }));
|
|
460
|
+
if (t.length === 0 || t.some((p) => !p.j)) return null;
|
|
461
|
+
const r = new Set(t.map((p) => i(p.j.parent_id)).filter(Boolean)), o = new Set(t.map((p) => p.j.parent_collection));
|
|
462
|
+
if (r.size > 1 || o.size > 1) return null;
|
|
463
|
+
const s = ((l = t.find((p) => i(p.j.parent_id))) == null ? void 0 : l.j) ?? t[0].j, a = /* @__PURE__ */ new Map();
|
|
464
|
+
for (const { e: p, j: $ } of [...t].reverse()) {
|
|
465
|
+
const h = a.get($.noun) ?? { removed: [], added: [], updated: [] }, v = i($.value), g = i(p.action);
|
|
466
|
+
g === "delete" ? h.removed.push(v) : g === "create" ? h.added.push(v) : h.updated.push(v), a.set($.noun, h);
|
|
467
|
+
}
|
|
468
|
+
const c = (p, $) => $ ? `${p} ${$}` : ee(p), u = [], d = [];
|
|
469
|
+
for (const [p, $] of a) {
|
|
470
|
+
if ($.removed.length === 1 && $.added.length === 1 && $.updated.length === 0) {
|
|
471
|
+
u.push({ noun: p, from: $.removed[0], to: $.added[0] });
|
|
472
|
+
continue;
|
|
473
|
+
}
|
|
474
|
+
for (const h of $.removed) d.push(`removed ${c(p, h)}`);
|
|
475
|
+
for (const h of $.added) d.push(`added ${c(p, h)}`);
|
|
476
|
+
for (const h of $.updated) d.push(`updated ${c(p, h)}`);
|
|
477
|
+
}
|
|
478
|
+
return { parent: ne(s, n), pairs: u, rest: d };
|
|
479
|
+
}
|
|
480
|
+
function he(e) {
|
|
481
|
+
return e.from && e.to ? `${e.noun} ${e.from} → ${e.to}` : e.to ? `${e.noun} set to ${e.to}` : `changed ${e.noun}`;
|
|
482
|
+
}
|
|
483
|
+
function ge(e, n) {
|
|
484
|
+
const t = $e(e, n);
|
|
485
|
+
if (!t) return null;
|
|
486
|
+
const { parent: r, pairs: o, rest: s } = t;
|
|
487
|
+
if (s.length === 0 && o.length === 1) {
|
|
488
|
+
const a = o[0];
|
|
489
|
+
return a.from && a.to ? `changed ${a.noun} on ${r}: ${a.from} → ${a.to}` : a.to ? `changed ${a.noun} on ${r} to ${a.to}` : `changed ${a.noun} on ${r}`;
|
|
490
|
+
}
|
|
491
|
+
if (o.length === 0 && s.length === 1) {
|
|
492
|
+
const a = e[0];
|
|
493
|
+
return te(i(a.action), S(a, n), n);
|
|
494
|
+
}
|
|
495
|
+
return `changed ${r}: ${[...o.map(he), ...s].join("; ")}`;
|
|
496
|
+
}
|
|
497
|
+
const Y = /* @__PURE__ */ new Set(["transition", "pipeline-transition"]);
|
|
498
|
+
function Ae(e) {
|
|
499
|
+
const n = i(e).toLowerCase();
|
|
500
|
+
return /approv/.test(n) ? "Approved" : /reject/.test(n) ? "Rejected" : /declin/.test(n) ? "Declined" : /send.?back|return/.test(n) ? "Sent back" : /submit/.test(n) ? "Submitted" : /cancel/.test(n) ? "Cancelled" : "Moved";
|
|
501
|
+
}
|
|
502
|
+
function ve(e, n) {
|
|
503
|
+
var $, h, v, g, x;
|
|
504
|
+
const t = i(e.action), r = e.collection ?? null, o = I(r, e.item, n), s = b(r, n), a = `${/^[aeiou]/i.test(s.singular) ? "an" : "a"} ${_(s.singular)}`, c = i(e.comment), u = o ? ` on ${o}` : "", d = S(e, n);
|
|
505
|
+
if (d && (t === "create" || t === "delete" || t === "update"))
|
|
506
|
+
return te(t, d, n);
|
|
439
507
|
if ((($ = e.event) == null ? void 0 : $.kind) === "start") {
|
|
440
|
-
const
|
|
441
|
-
return `started ${o ?? "the pipeline"}${
|
|
508
|
+
const f = i(e.event.to_label);
|
|
509
|
+
return `started ${o ?? "the pipeline"}${f ? ` in ${f}` : ""}`;
|
|
442
510
|
}
|
|
443
|
-
if (((h = e.event) == null ? void 0 : h.kind) === "transition" ||
|
|
444
|
-
const
|
|
511
|
+
if (((h = e.event) == null ? void 0 : h.kind) === "transition" || Y.has(t)) {
|
|
512
|
+
const f = e.event ? {
|
|
445
513
|
from: i(e.event.from_label) || null,
|
|
446
514
|
to: i(e.event.to_label) || null,
|
|
447
515
|
via: i(e.event.transition_label) || null
|
|
448
|
-
} :
|
|
449
|
-
return
|
|
516
|
+
} : B(c), m = (v = e.event) != null && v.addendum ? `Addendum “${i(e.event.addendum.title) || "Untitled"}”` : o ?? "a record";
|
|
517
|
+
return f.from && f.to ? `moved ${m} from ${f.from} to ${f.to}` : f.to ? `moved ${m} to ${f.to}` : f.via ? `ran “${f.via}” on ${m}` : `moved ${m}`;
|
|
450
518
|
}
|
|
451
519
|
switch (t) {
|
|
452
520
|
case "create":
|
|
453
521
|
case "o2m-create":
|
|
454
|
-
return t === "o2m-create" ? e.o2m ? `${
|
|
522
|
+
return t === "o2m-create" ? e.o2m ? `${q(e.o2m)}${u}` : `added related rows${u}` : r === "nivaro_settings" ? "saved the settings" : `created ${o ?? a}`;
|
|
455
523
|
case "update":
|
|
456
524
|
case "o2m-update": {
|
|
457
525
|
if (t === "o2m-update")
|
|
458
|
-
return e.o2m ? `${
|
|
459
|
-
const
|
|
526
|
+
return e.o2m ? `${q(e.o2m)}${u}` : `changed related rows${u}`;
|
|
527
|
+
const f = Z(e);
|
|
460
528
|
if (r === "nivaro_settings")
|
|
461
|
-
return
|
|
462
|
-
if (r === "nivaro_approval_instances" && ((
|
|
463
|
-
const
|
|
464
|
-
return `${(
|
|
529
|
+
return f.length ? `changed the ${P(r, f, n)} setting${f.length === 1 ? "" : "s"}` : "changed the settings";
|
|
530
|
+
if (r === "nivaro_approval_instances" && ((g = e.why) != null && g.approval)) {
|
|
531
|
+
const m = e.why.approval, k = I(m.collection, m.item, n);
|
|
532
|
+
return `${(y[i(m.decision).toLowerCase()] ?? i(m.decision).toLowerCase()) || "decided on"} ${k ?? o ?? "an approval"}${m.chain ? ` (${m.chain})` : ""}`;
|
|
465
533
|
}
|
|
466
|
-
if (
|
|
467
|
-
const
|
|
468
|
-
return
|
|
534
|
+
if (f.length) {
|
|
535
|
+
const m = ((x = e.changes) == null ? void 0 : x.length) === 1 ? e.changes[0] : null;
|
|
536
|
+
return m && "value" in m && Q(r, m.field, m.value, n) ? `set ${F(r, m.field, n)} to ${H(r, m.field, m.value, n)}${u}` : `changed ${P(r, f, n)}${u}`;
|
|
469
537
|
}
|
|
470
|
-
return `updated ${o ??
|
|
538
|
+
return `updated ${o ?? a}`;
|
|
471
539
|
}
|
|
472
540
|
case "delete":
|
|
473
541
|
case "o2m-delete":
|
|
474
|
-
return t === "o2m-delete" ? e.o2m ? `${
|
|
542
|
+
return t === "o2m-delete" ? e.o2m ? `${q(e.o2m)}${u}` : `removed related rows${u}` : `deleted ${o ?? a}`;
|
|
475
543
|
case "restore":
|
|
476
|
-
return `restored ${o ??
|
|
544
|
+
return `restored ${o ?? a}`;
|
|
477
545
|
case "pipeline-start": {
|
|
478
|
-
const
|
|
479
|
-
return `started ${o ?? "the pipeline"}${
|
|
546
|
+
const f = /initial state:\s*(.+)$/i.exec(c);
|
|
547
|
+
return `started ${o ?? "the pipeline"}${f ? ` in ${f[1]}` : ""}`;
|
|
480
548
|
}
|
|
481
549
|
case "login":
|
|
482
550
|
return "signed in";
|
|
@@ -485,55 +553,55 @@ function ue(e, n) {
|
|
|
485
553
|
case "login-refused":
|
|
486
554
|
return "was refused sign-in";
|
|
487
555
|
case "export": {
|
|
488
|
-
const
|
|
489
|
-
return `exported ${
|
|
556
|
+
const f = me(c);
|
|
557
|
+
return `exported ${f.rows != null ? R(f.rows, r, n) : _(s.plural)}${f.format ? ` to ${f.format}` : ""}`;
|
|
490
558
|
}
|
|
491
559
|
case "masquerade-start":
|
|
492
|
-
return `started viewing as ${
|
|
560
|
+
return `started viewing as ${C(e, n, c)}`;
|
|
493
561
|
case "masquerade-stop":
|
|
494
|
-
return `stopped viewing as ${
|
|
562
|
+
return `stopped viewing as ${C(e, n, c)}`;
|
|
495
563
|
case "token.generate":
|
|
496
|
-
return `generated a static token for ${
|
|
564
|
+
return `generated a static token for ${C(e, n, "")}`;
|
|
497
565
|
case "token.revoke":
|
|
498
|
-
return `revoked the static token of ${
|
|
566
|
+
return `revoked the static token of ${C(e, n, "")}`;
|
|
499
567
|
case "api_key_created":
|
|
500
|
-
return `created ${o && o !==
|
|
568
|
+
return `created ${o && o !== w ? o : "an API key"}`;
|
|
501
569
|
case "api_key_revoked":
|
|
502
|
-
return `revoked ${o && o !==
|
|
570
|
+
return `revoked ${o && o !== w ? o : "an API key"}`;
|
|
503
571
|
case "api_key_deleted":
|
|
504
|
-
return `deleted ${o && o !==
|
|
572
|
+
return `deleted ${o && o !== w ? o : "an API key"}`;
|
|
505
573
|
case "api_key_simulate":
|
|
506
|
-
return `tested requests as ${o && o !==
|
|
574
|
+
return `tested requests as ${o && o !== w ? o : "an API key"}`;
|
|
507
575
|
case "set_role":
|
|
508
|
-
return `changed the role of ${
|
|
576
|
+
return `changed the role of ${C(e, n, "")}`;
|
|
509
577
|
case "bulk-write":
|
|
510
578
|
case "bulk-action-execute": {
|
|
511
|
-
const
|
|
512
|
-
return
|
|
579
|
+
const f = /(\d+)\s+(?:item|row)/i.exec(c), m = f ? R(Number(f[1]), r, n) : _(s.plural), k = t === "bulk-action-execute" ? /^(.+?)\s*\([^)]*\)\s+on\s/.exec(c) : null;
|
|
580
|
+
return k ? `ran “${k[1]}” on ${m}` : `changed ${m} in bulk`;
|
|
513
581
|
}
|
|
514
582
|
case "import-create":
|
|
515
583
|
case "import-queue":
|
|
516
|
-
return `started an import into ${
|
|
584
|
+
return `started an import into ${_(s.plural)}`;
|
|
517
585
|
case "import-complete":
|
|
518
|
-
return `finished an import into ${
|
|
586
|
+
return `finished an import into ${_(s.plural)}${c ? ` (${c})` : ""}`;
|
|
519
587
|
case "import-failed":
|
|
520
|
-
return `had an import into ${
|
|
588
|
+
return `had an import into ${_(s.plural)} fail`;
|
|
521
589
|
case "comment":
|
|
522
|
-
return `commented${
|
|
590
|
+
return `commented${u}`;
|
|
523
591
|
case "file-download": {
|
|
524
|
-
let
|
|
592
|
+
let f = "", m = !1;
|
|
525
593
|
try {
|
|
526
|
-
const
|
|
527
|
-
|
|
594
|
+
const T = JSON.parse(c);
|
|
595
|
+
f = typeof T.name == "string" ? T.name : "", m = T.kind === "open";
|
|
528
596
|
} catch {
|
|
529
597
|
}
|
|
530
|
-
const
|
|
531
|
-
return `${
|
|
598
|
+
const k = f ? `“${f}”` : "a file";
|
|
599
|
+
return `${m ? "opened" : "downloaded"} ${k}${r === "nivaro_files" ? "" : u}`;
|
|
532
600
|
}
|
|
533
601
|
case "picker-exclude":
|
|
534
|
-
return `hid ${o ??
|
|
602
|
+
return `hid ${o ?? a} from pickers`;
|
|
535
603
|
case "picker-include":
|
|
536
|
-
return `showed ${o ??
|
|
604
|
+
return `showed ${o ?? a} in pickers again`;
|
|
537
605
|
case "ai-brief":
|
|
538
606
|
return "asked the assistant for a brief";
|
|
539
607
|
case "config-epoch":
|
|
@@ -543,116 +611,125 @@ function ue(e, n) {
|
|
|
543
611
|
case "config-snapshot-export":
|
|
544
612
|
return "downloaded a configuration snapshot";
|
|
545
613
|
}
|
|
546
|
-
if (!t) return `did something${
|
|
547
|
-
const
|
|
548
|
-
return /settings$/.test(
|
|
614
|
+
if (!t) return `did something${u}`;
|
|
615
|
+
const l = X(t);
|
|
616
|
+
return /settings$/.test(l.noun) && !l.verb ? `changed the ${l.noun}` : l.past ? o && l.noun && _(s.singular).toLowerCase().includes(l.noun.toLowerCase()) ? `${l.past} ${o}` : l.noun ? `${l.past} ${fe(l.verb, l.noun)}${u}` : `${l.past} ${o ?? "something"}` : `recorded “${V(t)}”${u}`;
|
|
549
617
|
}
|
|
550
|
-
function
|
|
551
|
-
const r = i(e.item), o =
|
|
618
|
+
function C(e, n, t) {
|
|
619
|
+
const r = i(e.item), o = L(r, n) ?? (t || null);
|
|
552
620
|
if (o) return o;
|
|
553
|
-
const s = e.collection === "nivaro_users" ?
|
|
554
|
-
return s && !
|
|
621
|
+
const s = e.collection === "nivaro_users" ? I(e.collection, e.item, n) : null;
|
|
622
|
+
return s && !J.test(r) ? s : "someone";
|
|
555
623
|
}
|
|
556
|
-
function
|
|
557
|
-
return `${
|
|
624
|
+
function _e(e, n) {
|
|
625
|
+
return `${G(e, n)} ${ve(e, n)}`;
|
|
558
626
|
}
|
|
559
|
-
function
|
|
560
|
-
var
|
|
627
|
+
function Ce(e) {
|
|
628
|
+
var c, u, d, l;
|
|
561
629
|
const n = i(e.action), t = i(e.comment);
|
|
562
|
-
let r = i((
|
|
563
|
-
!o &&
|
|
564
|
-
const s = (
|
|
565
|
-
return { reason: r, note: o, approval:
|
|
630
|
+
let r = i((c = e.why) == null ? void 0 : c.reason) || null, o = i((u = e.why) == null ? void 0 : u.note) || null;
|
|
631
|
+
!o && Y.has(n) && !e.event && (o = B(t).note), !o && ((d = e.event) == null ? void 0 : d.kind) === "transition" && t && (o = t), !r && (n === "create" || n === "update" || n === "delete") && t && !/^import:/i.test(t) && (r = t);
|
|
632
|
+
const s = (l = e.why) == null ? void 0 : l.approval, a = s ? `${O(i(s.decision)) || "Decided"}${s.chain ? ` · ${s.chain}` : ""}${s.step != null && s.step !== "" ? ` · step ${s.step}` : ""}${i(s.comment) ? ` — “${i(s.comment)}”` : ""}` : null;
|
|
633
|
+
return { reason: r, note: o, approval: a };
|
|
566
634
|
}
|
|
567
|
-
const
|
|
568
|
-
function
|
|
635
|
+
const ke = 6e4, we = 5e3;
|
|
636
|
+
function j(e) {
|
|
569
637
|
return e.timestamp ? new Date(e.timestamp).getTime() : Number.NaN;
|
|
570
638
|
}
|
|
571
|
-
function
|
|
572
|
-
const n =
|
|
639
|
+
function N(e) {
|
|
640
|
+
const n = W(e);
|
|
573
641
|
return `${n.kind}|${i(n.id)}|${i(e.user ?? e.user_id).toUpperCase()}`;
|
|
574
642
|
}
|
|
575
|
-
function
|
|
643
|
+
function Se(e) {
|
|
576
644
|
const n = i(e.action);
|
|
577
645
|
return !i(e.item) && (n.startsWith("bulk-") || n === "import-complete");
|
|
578
646
|
}
|
|
579
|
-
function
|
|
580
|
-
const t = n.windowMs ??
|
|
581
|
-
for (const
|
|
582
|
-
const
|
|
583
|
-
if (
|
|
584
|
-
const
|
|
585
|
-
if (
|
|
586
|
-
|
|
647
|
+
function ye(e, n = {}) {
|
|
648
|
+
const t = n.windowMs ?? ke, r = [], o = (s, a) => s.parent_collection === a.parent_collection && (!i(s.parent_id) || !i(a.parent_id) || i(s.parent_id) === i(a.parent_id));
|
|
649
|
+
for (const s of e) {
|
|
650
|
+
const a = r[r.length - 1], c = a == null ? void 0 : a.entries[a.entries.length - 1], u = i(s.group_key);
|
|
651
|
+
if (a && c && n.labels) {
|
|
652
|
+
const d = S(s, n.labels), l = S(c, n.labels);
|
|
653
|
+
if (d && l && a.entries.every((p) => S(p, n.labels)) && o(d, l) && N(s) === N(c) && Math.abs(j(c) - j(s)) <= we) {
|
|
654
|
+
a.entries.push(s), a.by !== "group_key" && (a.by = "time");
|
|
587
655
|
continue;
|
|
588
656
|
}
|
|
589
|
-
|
|
590
|
-
|
|
657
|
+
}
|
|
658
|
+
if (a && c) {
|
|
659
|
+
const d = i(c.group_key);
|
|
660
|
+
if (u && u === d) {
|
|
661
|
+
a.entries.push(s), a.by = "group_key";
|
|
662
|
+
continue;
|
|
663
|
+
}
|
|
664
|
+
if (!u && !d && a.by !== "group_key" && i(s.action) === i(c.action) && i(s.collection) === i(c.collection) && i(s.collection) !== "" && N(s) === N(c) && Math.abs(j(c) - j(s)) <= t) {
|
|
665
|
+
a.entries.push(s), a.by = "time";
|
|
591
666
|
continue;
|
|
592
667
|
}
|
|
593
668
|
}
|
|
594
|
-
r.push({ key: `${
|
|
669
|
+
r.push({ key: `${u || "e"}:${s.id ?? r.length}`, entries: [s], by: null });
|
|
595
670
|
}
|
|
596
671
|
return r;
|
|
597
672
|
}
|
|
598
|
-
function
|
|
673
|
+
function Ie(e, n) {
|
|
599
674
|
if (e.length === 0) return "";
|
|
600
|
-
const t = e.filter((
|
|
601
|
-
if (t.length <= 1) return
|
|
602
|
-
const o =
|
|
603
|
-
|
|
675
|
+
const t = e.filter((g) => !Se(g)), r = t[0] ?? e[0];
|
|
676
|
+
if (t.length <= 1) return _e(r, n);
|
|
677
|
+
const o = G(r, n), s = ge(t, n);
|
|
678
|
+
if (s) return `${o} ${s}`;
|
|
679
|
+
const c = new Set(t.map((g) => i(g.collection))).size === 1 ? r.collection ?? null : null, u = new Set(t.map((g) => i(g.item))), d = u.size > 1 ? u.size : t.length, l = c ? u.size === 1 && i(r.item) ? I(c, r.item, n) ?? R(d, c, n) : R(d, c, n) : `${d} records`, p = u.size === 1 && t.length > 1 ? ` ${t.length} times` : "", $ = new Set(
|
|
680
|
+
t.map((g) => Y.has(i(g.action)) ? "transition" : i(g.action))
|
|
604
681
|
);
|
|
605
|
-
if ($.size !== 1) return `${o} made ${t.length} changes to ${
|
|
682
|
+
if ($.size !== 1) return `${o} made ${t.length} changes to ${l}`;
|
|
606
683
|
const h = [...$][0];
|
|
607
684
|
if (h === "transition") {
|
|
608
|
-
const
|
|
609
|
-
t.map((
|
|
610
|
-
var
|
|
611
|
-
return i(((
|
|
685
|
+
const g = new Set(
|
|
686
|
+
t.map((f) => {
|
|
687
|
+
var m;
|
|
688
|
+
return i(((m = f.event) == null ? void 0 : m.to_label) ?? B(f.comment).to);
|
|
612
689
|
})
|
|
613
|
-
),
|
|
614
|
-
return `${o} moved ${
|
|
690
|
+
), x = g.size === 1 ? [...g][0] : "";
|
|
691
|
+
return `${o} moved ${l}${x ? ` to ${x}` : ""}${p}`;
|
|
615
692
|
}
|
|
616
693
|
if (h === "update") {
|
|
617
|
-
const
|
|
618
|
-
return `${o} updated ${
|
|
694
|
+
const g = xe(t, c, n);
|
|
695
|
+
return `${o} updated ${l}${p}${g ? `: ${g}` : ""}`;
|
|
619
696
|
}
|
|
620
|
-
if (h === "create") return `${o} created ${
|
|
621
|
-
if (h === "delete") return `${o} deleted ${
|
|
622
|
-
if (h === "picker-exclude") return `${o} hid ${
|
|
623
|
-
if (h === "picker-include") return `${o} showed ${
|
|
624
|
-
const v =
|
|
625
|
-
return v.past ? `${o} ${v.past} ${
|
|
626
|
-
}
|
|
627
|
-
function
|
|
628
|
-
var
|
|
629
|
-
const r = ((
|
|
697
|
+
if (h === "create") return `${o} created ${l}`;
|
|
698
|
+
if (h === "delete") return `${o} deleted ${l}`;
|
|
699
|
+
if (h === "picker-exclude") return `${o} hid ${l} from pickers${p}`;
|
|
700
|
+
if (h === "picker-include") return `${o} showed ${l} in pickers again${p}`;
|
|
701
|
+
const v = X(h);
|
|
702
|
+
return v.past ? `${o} ${v.past} ${l}${v.noun && !_(b(c, n).plural).toLowerCase().includes(v.noun) ? ` (${v.noun})` : ""}${p}` : `${o} recorded “${V(h)}” on ${l}`;
|
|
703
|
+
}
|
|
704
|
+
function xe(e, n, t) {
|
|
705
|
+
var c;
|
|
706
|
+
const r = ((c = e[0]) == null ? void 0 : c.changes) ?? null;
|
|
630
707
|
if (!(r != null && r.length)) {
|
|
631
|
-
const
|
|
632
|
-
return
|
|
708
|
+
const u = e.map((d) => Z(d).sort().join(","));
|
|
709
|
+
return u[0] && u.every((d) => d === u[0]) ? P(n, u[0].split(","), t) : "";
|
|
633
710
|
}
|
|
634
|
-
const o = (
|
|
635
|
-
if (e.every((
|
|
711
|
+
const o = (u) => JSON.stringify((u.changes ?? []).map((d) => [d.field, d.value ?? null]).sort());
|
|
712
|
+
if (e.every((u) => o(u) === o(e[0])) && r.length <= 2 && r.every((u) => Q(n, u.field, u.value, t)))
|
|
636
713
|
return r.map(
|
|
637
|
-
(
|
|
714
|
+
(u) => `${F(n, u.field, t)} → ${H(n, u.field, u.value, t)}`
|
|
638
715
|
).join(", ");
|
|
639
|
-
const
|
|
640
|
-
return
|
|
641
|
-
}
|
|
642
|
-
function
|
|
643
|
-
var
|
|
644
|
-
const n = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set(), s = (
|
|
645
|
-
const d = i(
|
|
646
|
-
!d || !
|
|
716
|
+
const a = new Set(e.flatMap((u) => (u.changes ?? []).map((d) => d.field)));
|
|
717
|
+
return P(n, [...a], t);
|
|
718
|
+
}
|
|
719
|
+
function be(e) {
|
|
720
|
+
var a;
|
|
721
|
+
const n = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set(), s = (c, u) => {
|
|
722
|
+
const d = i(c), l = i(u);
|
|
723
|
+
!d || !l || (o.add(d), d === "nivaro_users" && t.add(l), n.set(`${d}:${l}`, { collection: d, id: l }));
|
|
647
724
|
};
|
|
648
|
-
for (const
|
|
649
|
-
const
|
|
650
|
-
|
|
651
|
-
const d =
|
|
652
|
-
d.kind === "view_as" && d.id && t.add(d.id), d.on_behalf_of && t.add(d.on_behalf_of), i(
|
|
653
|
-
for (const
|
|
654
|
-
const
|
|
655
|
-
|
|
725
|
+
for (const c of e) {
|
|
726
|
+
const u = i(c.user ?? c.user_id);
|
|
727
|
+
u && t.add(u);
|
|
728
|
+
const d = W(c);
|
|
729
|
+
d.kind === "view_as" && d.id && t.add(d.id), d.on_behalf_of && t.add(d.on_behalf_of), i(c.collection) && o.add(i(c.collection)), s(c.collection, c.item), (a = c.why) != null && a.approval && s(c.why.approval.collection, c.why.approval.item);
|
|
730
|
+
for (const l of Z(c)) {
|
|
731
|
+
const p = i(c.collection);
|
|
732
|
+
p && r.set(`${p}.${l}`, { collection: p, field: l });
|
|
656
733
|
}
|
|
657
734
|
}
|
|
658
735
|
return {
|
|
@@ -663,27 +740,33 @@ function ge(e) {
|
|
|
663
740
|
};
|
|
664
741
|
}
|
|
665
742
|
export {
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
b as
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
743
|
+
ke as BURST_WINDOW_MS,
|
|
744
|
+
w as HIDDEN_RECORD,
|
|
745
|
+
we as LINK_WRITE_WINDOW_MS,
|
|
746
|
+
X as actionParts,
|
|
747
|
+
be as activityLabelRefs,
|
|
748
|
+
ve as activityPredicate,
|
|
749
|
+
Ce as activityWhy,
|
|
750
|
+
G as actorName,
|
|
751
|
+
W as actorOf,
|
|
752
|
+
ue as choiceText,
|
|
753
|
+
b as collectionNouns,
|
|
754
|
+
R as countNoun,
|
|
755
|
+
F as fieldLabel,
|
|
756
|
+
P as fieldList,
|
|
757
|
+
ye as groupActivity,
|
|
758
|
+
S as junctionOf,
|
|
759
|
+
$e as linkChanges,
|
|
760
|
+
ge as linkGroupPredicate,
|
|
761
|
+
he as linkPairText,
|
|
762
|
+
q as o2mSentence,
|
|
763
|
+
ce as parseActor,
|
|
764
|
+
B as parseTransitionComment,
|
|
765
|
+
V as readableTitle,
|
|
766
|
+
I as recordPhrase,
|
|
767
|
+
Ie as renderActivityGroupSentence,
|
|
768
|
+
_e as renderActivitySentence,
|
|
769
|
+
Ae as transitionVerb,
|
|
770
|
+
Q as valueShowable,
|
|
771
|
+
H as valueText
|
|
689
772
|
};
|