@declarion/react 0.86.0 → 0.88.0
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-lib/app.js +28 -28
- package/dist-lib/components/actions/ActionButton.js +86 -85
- package/dist-lib/components/actions/ActionResultDialog.impl.js +47 -47
- package/dist-lib/components/actions/ActionRunner.js +47 -47
- package/dist-lib/components/actions/ObjectActionBar.js +9 -9
- package/dist-lib/components/actions/RowActionsKebab.js +19 -19
- package/dist-lib/components/agents/AgentChatPanel.impl.js +53 -53
- package/dist-lib/components/chrome/AssociationTabs.js +21 -21
- package/dist-lib/components/chrome/RecordHeader.js +33 -40
- package/dist-lib/components/detail-layout/AssociatedBlock.js +387 -381
- package/dist-lib/components/detail-layout/ChildrenBlock.js +12 -13
- package/dist-lib/components/detail-layout/ChildrenTimeline.js +198 -198
- package/dist-lib/components/detail-layout/DraggableChildrenTable.js +114 -114
- package/dist-lib/components/detail-layout/EditableChildrenTable.js +160 -160
- package/dist-lib/components/detail-layout/EvidenceBlock.js +20 -21
- package/dist-lib/components/detail-layout/PropertiesBlock.js +45 -39
- package/dist-lib/components/detail-layout/QuickAddForm.js +9 -9
- package/dist-lib/components/detail-layout/TimelineComposer.js +87 -89
- package/dist-lib/components/detail-layout/widgets/EntityScorecardWidget.js +100 -99
- package/dist-lib/components/fields/FileReferenceField.js +9 -9
- package/dist-lib/components/fields/StructureField.js +57 -47
- package/dist-lib/components/fields/TimestampField.js +59 -54
- package/dist-lib/components/fields/cells/factories/money.js +14 -23
- package/dist-lib/components/fields/cells/factories/nextRun.js +1 -1
- package/dist-lib/components/fields/cells/factories/text.js +18 -3
- package/dist-lib/components/fields/cells/factories/timestamp.js +24 -12
- package/dist-lib/components/file-widgets/DocumentCard.js +108 -106
- package/dist-lib/components/layout/Layout.js +306 -361
- package/dist-lib/components/layout/Rail.js +42 -41
- package/dist-lib/components/layout/Sidebar.js +132 -117
- package/dist-lib/components/layout/TabStrip.js +116 -115
- package/dist-lib/components/layout/TenantChip.js +47 -54
- package/dist-lib/components/layout/TopBar.js +108 -105
- package/dist-lib/components/list/InlineEditCell.js +23 -23
- package/dist-lib/components/list/QuickPeek.js +65 -66
- package/dist-lib/components/pages/DocumentsMenu.js +42 -42
- package/dist-lib/components/pages/ExportMenu.js +25 -25
- package/dist-lib/components/pages/RecordDocumentsPanel.js +35 -35
- package/dist-lib/components/pages/RecordNotesPanel.js +94 -93
- package/dist-lib/components/pages/SmartDetailPage.impl.js +421 -417
- package/dist-lib/components/pages/SmartListPage.impl.js +293 -295
- package/dist-lib/components/pages/SmartRecordListPage.impl.js +310 -310
- package/dist-lib/components/pages/auth/AuthShell.js +73 -73
- package/dist-lib/components/pages/auth/SignIn.js +32 -32
- package/dist-lib/components/pages/auth/SignUp.impl.js +3 -3
- package/dist-lib/components/pages/auth/SignUpCode.js +9 -9
- package/dist-lib/components/pages/list/ListFloatbar.js +12 -12
- package/dist-lib/components/pages/list/ListHeader.js +19 -19
- package/dist-lib/components/pages/list/ListNoRows.js +15 -15
- package/dist-lib/components/pages/list/ListToolbar.js +145 -145
- package/dist-lib/components/pages/list/useActiveView.js +14 -5
- package/dist-lib/components/pages/list/useListQuery.js +121 -81
- package/dist-lib/components/pages/list/useListRowInteraction.js +70 -70
- package/dist-lib/components/pages/list/useRowMenu.js +7 -7
- package/dist-lib/components/pages/profile/Preferences.impl.js +81 -78
- package/dist-lib/components/pages/profile/Profile.impl.js +191 -189
- package/dist-lib/components/pages/tenant-params/TenantParamsPage.impl.js +166 -158
- package/dist-lib/components/shared/ChangePasswordDialog.impl.js +23 -23
- package/dist-lib/components/shared/MarkdownRenderer.js +9 -9
- package/dist-lib/hooks/useAuth.js +11 -11
- package/dist-lib/hooks/useBranding.js +4 -4
- package/dist-lib/hooks/useDisplayTimeZone.js +8 -0
- package/dist-lib/hooks/useFollowAgentOpen.js +24 -24
- package/dist-lib/hooks/useImpersonation.js +6 -6
- package/dist-lib/hooks/useMutations.js +23 -23
- package/dist-lib/hooks/useObjectStatus.js +5 -5
- package/dist-lib/hooks/useParams.js +59 -51
- package/dist-lib/hooks/useProperties.js +8 -8
- package/dist-lib/hooks/useRowTenant.js +18 -6
- package/dist-lib/hooks/useText.js +9 -7
- package/dist-lib/hooks/useUiPreferences.js +71 -0
- package/dist-lib/index.d.ts +22 -6
- package/dist-lib/index.js +127 -126
- package/dist-lib/lib/actions.js +116 -84
- package/dist-lib/lib/child-config.js +10 -1
- package/dist-lib/lib/format-count.js +16 -1
- package/dist-lib/lib/language.js +23 -21
- package/dist-lib/lib/money-text.js +29 -0
- package/dist-lib/lib/profile.js +4 -0
- package/dist-lib/lib/role-label.js +8 -0
- package/dist-lib/lib/schema-routing.js +34 -14
- package/dist-lib/lib/shortcut.js +10 -0
- package/dist-lib/lib/timestamp.js +93 -31
- package/dist-lib/stores/auth.js +9 -8
- package/dist-lib/stores/preferences.js +56 -17
- package/dist-lib/testing.d.ts +1 -1
- package/dist-lib/testing.js +25 -28
- package/dist-lib/types/schema.js +33 -27
- package/dist-lib/{useResponsiveMode-D3SKz5z4.d.ts → useResponsiveMode-9_eJT18k.d.ts} +5 -5
- package/package.json +1 -1
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { propertyToField as e } from "../../types/schema.js";
|
|
2
2
|
import { useText as t } from "../../hooks/useText.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { SectionCard as n } from "../primitives/SectionCard.js";
|
|
4
|
+
import { ClassifiedFieldLocked as r } from "../primitives/ClassifiedFieldLocked.js";
|
|
5
|
+
import { classificationTier as i, fieldAccessInfo as a } from "../../lib/field-classification.js";
|
|
6
|
+
import { renderField as o } from "../fields/index.js";
|
|
7
|
+
import { FieldRow as s, FieldsGrid as c, SPAN_FIELD_TYPES as l } from "./FieldRow.js";
|
|
8
|
+
import { useCallback as u, useEffect as d, useRef as f } from "react";
|
|
9
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
9
10
|
//#region src/components/detail-layout/PropertiesBlock.tsx
|
|
10
|
-
var
|
|
11
|
+
var m = /* @__PURE__ */ new Set([
|
|
11
12
|
"string",
|
|
12
13
|
"text",
|
|
13
14
|
"int",
|
|
@@ -15,52 +16,57 @@ var p = /* @__PURE__ */ new Set([
|
|
|
15
16
|
"decimal",
|
|
16
17
|
"email",
|
|
17
18
|
"url"
|
|
18
|
-
]),
|
|
19
|
-
function
|
|
20
|
-
let { entity:
|
|
21
|
-
if (
|
|
22
|
-
let
|
|
23
|
-
|
|
19
|
+
]), h = 500;
|
|
20
|
+
function g({ node: r, ctx: i }) {
|
|
21
|
+
let { entity: a, objectProperties: o, onSetProperty: s, isNew: l, mode: u, refs: d } = i, f = t(), m = a.properties ?? {};
|
|
22
|
+
if (l) return null;
|
|
23
|
+
let h = r.properties === !0 || r.properties, g = h === !0 ? Object.entries(m).sort(([e], [t]) => e.localeCompare(t)) : h.filter((e) => m[e] != null).map((e) => [e, m[e]]);
|
|
24
|
+
if (g.length === 0) return null;
|
|
25
|
+
let v = /* @__PURE__ */ p(c, {
|
|
24
26
|
columns: 2,
|
|
25
|
-
children:
|
|
26
|
-
let
|
|
27
|
-
return /* @__PURE__ */
|
|
27
|
+
children: g.map(([t, n]) => {
|
|
28
|
+
let r = o?.find((e) => e.property_code === t), c = e(n), l = n.readonly || !s ? "display" : u;
|
|
29
|
+
return /* @__PURE__ */ p(_, {
|
|
28
30
|
propCode: t,
|
|
29
|
-
prop:
|
|
30
|
-
field:
|
|
31
|
-
value:
|
|
32
|
-
mode:
|
|
33
|
-
onSetProperty:
|
|
34
|
-
refs:
|
|
35
|
-
entity:
|
|
36
|
-
schema:
|
|
31
|
+
prop: n,
|
|
32
|
+
field: c,
|
|
33
|
+
value: r?.value,
|
|
34
|
+
mode: l,
|
|
35
|
+
onSetProperty: s,
|
|
36
|
+
refs: d,
|
|
37
|
+
entity: a,
|
|
38
|
+
schema: i.schema
|
|
37
39
|
}, t);
|
|
38
40
|
})
|
|
39
41
|
});
|
|
42
|
+
return i.withinCard ? v : /* @__PURE__ */ p(n, {
|
|
43
|
+
title: f("record.properties", "Properties"),
|
|
44
|
+
children: v
|
|
45
|
+
});
|
|
40
46
|
}
|
|
41
|
-
function
|
|
42
|
-
let S = t(), C =
|
|
43
|
-
|
|
47
|
+
function _({ propCode: e, prop: n, field: c, value: g, mode: _, onSetProperty: v, refs: y, entity: b, schema: x }) {
|
|
48
|
+
let S = t(), C = f(null);
|
|
49
|
+
d(() => () => {
|
|
44
50
|
C.current && clearTimeout(C.current);
|
|
45
51
|
}, []);
|
|
46
|
-
let w =
|
|
47
|
-
v && (
|
|
52
|
+
let w = u((t) => {
|
|
53
|
+
v && (m.has(n.type) ? (C.current && clearTimeout(C.current), C.current = setTimeout(() => v(e, t), h)) : v(e, t));
|
|
48
54
|
}, [
|
|
49
55
|
e,
|
|
50
|
-
|
|
56
|
+
n.type,
|
|
51
57
|
v
|
|
52
|
-
]), T =
|
|
53
|
-
return /* @__PURE__ */
|
|
54
|
-
label: S(
|
|
58
|
+
]), T = a(b, e), E = T?.read === "denied", D = T?.write === "denied", O = _ === "display" ? E : D || E, k = _ === "edit" && D ? "display" : _;
|
|
59
|
+
return /* @__PURE__ */ p(s, {
|
|
60
|
+
label: S(n.display?.name ?? n.name),
|
|
55
61
|
mode: k,
|
|
56
|
-
span:
|
|
57
|
-
children: O ? /* @__PURE__ */
|
|
62
|
+
span: l.has(n.type),
|
|
63
|
+
children: O ? /* @__PURE__ */ p(r, {
|
|
58
64
|
tier: T.classification,
|
|
59
|
-
tierDef:
|
|
65
|
+
tierDef: i(x, b, e),
|
|
60
66
|
requiredPermission: T?.required_permission,
|
|
61
67
|
variant: k === "edit" ? "input" : "value"
|
|
62
|
-
}) :
|
|
63
|
-
field:
|
|
68
|
+
}) : o({
|
|
69
|
+
field: c,
|
|
64
70
|
fieldName: e,
|
|
65
71
|
value: g,
|
|
66
72
|
mode: k,
|
|
@@ -71,4 +77,4 @@ function g({ propCode: e, prop: s, field: h, value: g, mode: _, onSetProperty: v
|
|
|
71
77
|
});
|
|
72
78
|
}
|
|
73
79
|
//#endregion
|
|
74
|
-
export {
|
|
80
|
+
export { g as PropertiesBlock };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { fieldDisplayName as e } from "../../types/schema.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { failureTitle as t } from "../../lib/failure.js";
|
|
3
|
+
import { Icon as n } from "../primitives/Icons.js";
|
|
4
|
+
import { Btn as r } from "../primitives/Btn.js";
|
|
5
|
+
import { useText as i } from "../../hooks/useText.js";
|
|
6
|
+
import { useResponsiveMode as a } from "../../hooks/useResponsiveMode.js";
|
|
7
7
|
import { renderField as o } from "../fields/index.js";
|
|
8
8
|
import { useQuickAdd as s } from "./useQuickAdd.js";
|
|
9
9
|
import { useId as c } from "react";
|
|
10
10
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
11
11
|
//#region src/components/detail-layout/QuickAddForm.tsx
|
|
12
12
|
function d({ config: d, parentEntity: f, parentId: p, schema: m }) {
|
|
13
|
-
let h =
|
|
13
|
+
let h = i(), g = i("errors"), { values: _, quickAdd: v, childEntity: y, isPending: b, error: x, isReady: S, handleSubmit: C, handleFieldChange: w } = s(d, f, p, m), T = a(), E = c();
|
|
14
14
|
return !v || v.fields.length === 0 || !y ? null : /* @__PURE__ */ u("form", {
|
|
15
15
|
onSubmit: C,
|
|
16
16
|
style: {
|
|
@@ -56,11 +56,11 @@ function d({ config: d, parentEntity: f, parentId: p, schema: m }) {
|
|
|
56
56
|
})]
|
|
57
57
|
}, t);
|
|
58
58
|
}),
|
|
59
|
-
/* @__PURE__ */ l(
|
|
59
|
+
/* @__PURE__ */ l(r, {
|
|
60
60
|
type: "submit",
|
|
61
61
|
kind: "primary",
|
|
62
62
|
size: T.isPhone ? "md" : "sm",
|
|
63
|
-
icon: /* @__PURE__ */ l(
|
|
63
|
+
icon: /* @__PURE__ */ l(n.plus, { size: 12 }),
|
|
64
64
|
disabled: b || !S,
|
|
65
65
|
style: T.isPhone ? { alignSelf: "flex-end" } : void 0,
|
|
66
66
|
children: h("record.related.add", "Add")
|
|
@@ -72,7 +72,7 @@ function d({ config: d, parentEntity: f, parentId: p, schema: m }) {
|
|
|
72
72
|
alignSelf: "flex-end",
|
|
73
73
|
marginBottom: 4
|
|
74
74
|
},
|
|
75
|
-
children:
|
|
75
|
+
children: t(g, x)
|
|
76
76
|
})
|
|
77
77
|
]
|
|
78
78
|
});
|
|
@@ -1,99 +1,100 @@
|
|
|
1
1
|
import { textWithNodes as e } from "../../lib/language.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
2
|
+
import { failureTitle as t } from "../../lib/failure.js";
|
|
3
|
+
import { Icon as n } from "../primitives/Icons.js";
|
|
4
|
+
import { Btn as r } from "../primitives/Btn.js";
|
|
5
|
+
import { useText as i } from "../../hooks/useText.js";
|
|
6
|
+
import { shortcutLabel as a } from "../../lib/shortcut.js";
|
|
7
|
+
import { renderField as o } from "../fields/index.js";
|
|
8
|
+
import { registerFieldRegion as s } from "../../lib/field-regions.js";
|
|
9
|
+
import { useQuickAdd as c } from "./useQuickAdd.js";
|
|
10
|
+
import { useCallback as l, useEffect as u, useMemo as d, useRef as f, useState as p } from "react";
|
|
11
|
+
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
11
12
|
//#region src/components/detail-layout/TimelineComposer.tsx
|
|
12
|
-
var
|
|
13
|
-
function
|
|
14
|
-
let { values:
|
|
15
|
-
|
|
16
|
-
let e =
|
|
13
|
+
var _ = "quick_entry", v = 100, y = 240, b = 800, x = 80;
|
|
14
|
+
function S({ config: S, parentEntity: C, parentId: w, schema: T }) {
|
|
15
|
+
let { values: E, quickAdd: D, childEntity: O, isPending: k, error: A, isReady: j, handleSubmit: M, handleFieldChange: N } = c(S, C, w, T), P = i(), F = i("errors"), [I, L] = p(y), R = f(null), z = f(null), [B, V] = p(b);
|
|
16
|
+
u(() => {
|
|
17
|
+
let e = z.current?.parentElement;
|
|
17
18
|
if (!e) return;
|
|
18
19
|
let t = () => {
|
|
19
|
-
let t = Math.max(
|
|
20
|
-
|
|
20
|
+
let t = Math.max(v, e.clientHeight - x);
|
|
21
|
+
V(Math.min(b, t));
|
|
21
22
|
};
|
|
22
23
|
t();
|
|
23
24
|
let n = new ResizeObserver(t);
|
|
24
25
|
return n.observe(e), () => n.disconnect();
|
|
25
|
-
}, []),
|
|
26
|
-
|
|
27
|
-
}, [
|
|
28
|
-
let
|
|
29
|
-
|
|
30
|
-
let
|
|
31
|
-
|
|
32
|
-
let
|
|
33
|
-
getField: (e) =>
|
|
26
|
+
}, []), u(() => {
|
|
27
|
+
L((e) => Math.min(e, B));
|
|
28
|
+
}, [B]);
|
|
29
|
+
let H = f(E);
|
|
30
|
+
H.current = E;
|
|
31
|
+
let U = f(N);
|
|
32
|
+
U.current = N;
|
|
33
|
+
let W = f({}), G = d(() => ({
|
|
34
|
+
getField: (e) => H.current[e],
|
|
34
35
|
setField: (e, t) => {
|
|
35
|
-
|
|
36
|
+
U.current(e, t);
|
|
36
37
|
},
|
|
37
38
|
focusField: (e) => {
|
|
38
|
-
let t =
|
|
39
|
+
let t = W.current[e];
|
|
39
40
|
t && (t.querySelector("textarea, input, select, [contenteditable]") ?? t).focus();
|
|
40
41
|
}
|
|
41
42
|
}), []);
|
|
42
|
-
|
|
43
|
-
let
|
|
44
|
-
e.preventDefault(),
|
|
43
|
+
u(() => s(_, G), [G]);
|
|
44
|
+
let K = l((e) => {
|
|
45
|
+
e.preventDefault(), R.current = {
|
|
45
46
|
startY: e.clientY,
|
|
46
|
-
startHeight:
|
|
47
|
+
startHeight: I
|
|
47
48
|
};
|
|
48
49
|
let t = (e) => {
|
|
49
|
-
if (!
|
|
50
|
-
let t =
|
|
51
|
-
|
|
50
|
+
if (!R.current) return;
|
|
51
|
+
let t = R.current.startY - e.clientY, n = Math.min(B, Math.max(v, R.current.startHeight + t));
|
|
52
|
+
L(n);
|
|
52
53
|
}, n = () => {
|
|
53
|
-
|
|
54
|
+
R.current = null, document.removeEventListener("mousemove", t), document.removeEventListener("mouseup", n);
|
|
54
55
|
};
|
|
55
56
|
document.addEventListener("mousemove", t), document.addEventListener("mouseup", n);
|
|
56
|
-
}, [
|
|
57
|
-
if (!
|
|
58
|
-
let
|
|
59
|
-
let t =
|
|
57
|
+
}, [I, B]);
|
|
58
|
+
if (!D || D.fields.length === 0 || !O) return null;
|
|
59
|
+
let q = D.fields.find((e) => {
|
|
60
|
+
let t = O.fields.get(e);
|
|
60
61
|
return t && (t.type === "text" || t.type === "string");
|
|
61
|
-
}),
|
|
62
|
-
for (let e of
|
|
63
|
-
if (e ===
|
|
64
|
-
let t =
|
|
65
|
-
t && (t.type === "enum" ?
|
|
62
|
+
}), J = [], Y = [];
|
|
63
|
+
for (let e of D.fields) {
|
|
64
|
+
if (e === q) continue;
|
|
65
|
+
let t = O.fields.get(e);
|
|
66
|
+
t && (t.type === "enum" ? J.push(e) : Y.push(e));
|
|
66
67
|
}
|
|
67
|
-
let
|
|
68
|
-
let t =
|
|
69
|
-
return t ? /* @__PURE__ */
|
|
68
|
+
let X = (e) => {
|
|
69
|
+
let t = O.fields.get(e);
|
|
70
|
+
return t ? /* @__PURE__ */ h("div", {
|
|
70
71
|
ref: (t) => {
|
|
71
|
-
|
|
72
|
+
W.current[e] = t;
|
|
72
73
|
},
|
|
73
|
-
children:
|
|
74
|
+
children: o({
|
|
74
75
|
field: t,
|
|
75
76
|
fieldName: e,
|
|
76
|
-
value:
|
|
77
|
+
value: E[e] ?? "",
|
|
77
78
|
mode: "edit",
|
|
78
|
-
onChange: (t) =>
|
|
79
|
-
record:
|
|
80
|
-
t:
|
|
79
|
+
onChange: (t) => N(e, t),
|
|
80
|
+
record: E,
|
|
81
|
+
t: P
|
|
81
82
|
})
|
|
82
83
|
}, e) : null;
|
|
83
84
|
};
|
|
84
|
-
return /* @__PURE__ */
|
|
85
|
-
ref:
|
|
85
|
+
return /* @__PURE__ */ g("div", {
|
|
86
|
+
ref: z,
|
|
86
87
|
style: {
|
|
87
88
|
flexShrink: 0,
|
|
88
89
|
borderTop: "1px solid var(--divider)",
|
|
89
90
|
background: "var(--surface)",
|
|
90
91
|
display: "flex",
|
|
91
92
|
flexDirection: "column",
|
|
92
|
-
height: `${
|
|
93
|
+
height: `${I}px`
|
|
93
94
|
},
|
|
94
|
-
children: [/* @__PURE__ */
|
|
95
|
-
onMouseDown:
|
|
96
|
-
title:
|
|
95
|
+
children: [/* @__PURE__ */ h("div", {
|
|
96
|
+
onMouseDown: K,
|
|
97
|
+
title: P("record.layout.drag_to_resize", "Drag to resize"),
|
|
97
98
|
style: {
|
|
98
99
|
height: 12,
|
|
99
100
|
cursor: "row-resize",
|
|
@@ -102,14 +103,14 @@ function x({ config: x, parentEntity: S, parentId: C, schema: w }) {
|
|
|
102
103
|
justifyContent: "center",
|
|
103
104
|
flexShrink: 0
|
|
104
105
|
},
|
|
105
|
-
children: /* @__PURE__ */
|
|
106
|
+
children: /* @__PURE__ */ h("div", { style: {
|
|
106
107
|
width: 56,
|
|
107
108
|
height: 3,
|
|
108
109
|
borderRadius: 999,
|
|
109
110
|
background: "var(--border)"
|
|
110
111
|
} })
|
|
111
|
-
}), /* @__PURE__ */
|
|
112
|
-
onSubmit:
|
|
112
|
+
}), /* @__PURE__ */ g("form", {
|
|
113
|
+
onSubmit: M,
|
|
113
114
|
onKeyDown: (e) => {
|
|
114
115
|
(e.metaKey || e.ctrlKey) && e.key === "Enter" && (e.preventDefault(), e.currentTarget.requestSubmit());
|
|
115
116
|
},
|
|
@@ -122,7 +123,7 @@ function x({ config: x, parentEntity: S, parentId: C, schema: w }) {
|
|
|
122
123
|
padding: "0 12px 8px"
|
|
123
124
|
},
|
|
124
125
|
children: [
|
|
125
|
-
|
|
126
|
+
J.length > 0 && /* @__PURE__ */ h("div", {
|
|
126
127
|
style: {
|
|
127
128
|
display: "flex",
|
|
128
129
|
flexWrap: "wrap",
|
|
@@ -130,29 +131,29 @@ function x({ config: x, parentEntity: S, parentId: C, schema: w }) {
|
|
|
130
131
|
gap: 6,
|
|
131
132
|
flexShrink: 0
|
|
132
133
|
},
|
|
133
|
-
children:
|
|
134
|
+
children: J.map(X)
|
|
134
135
|
}),
|
|
135
|
-
|
|
136
|
+
q && O.fields.get(q) && /* @__PURE__ */ h("div", {
|
|
136
137
|
style: {
|
|
137
138
|
flex: 1,
|
|
138
139
|
minHeight: 0,
|
|
139
140
|
display: "flex"
|
|
140
141
|
},
|
|
141
142
|
ref: (e) => {
|
|
142
|
-
|
|
143
|
+
W.current[q] = e;
|
|
143
144
|
},
|
|
144
|
-
children:
|
|
145
|
-
field:
|
|
146
|
-
fieldName:
|
|
147
|
-
value:
|
|
145
|
+
children: o({
|
|
146
|
+
field: O.fields.get(q),
|
|
147
|
+
fieldName: q,
|
|
148
|
+
value: E[q] ?? "",
|
|
148
149
|
mode: "edit",
|
|
149
|
-
onChange: (e) =>
|
|
150
|
-
record:
|
|
150
|
+
onChange: (e) => N(q, e),
|
|
151
|
+
record: E,
|
|
151
152
|
fill: !0,
|
|
152
|
-
t:
|
|
153
|
+
t: P
|
|
153
154
|
})
|
|
154
155
|
}),
|
|
155
|
-
/* @__PURE__ */
|
|
156
|
+
/* @__PURE__ */ g("div", {
|
|
156
157
|
style: {
|
|
157
158
|
display: "flex",
|
|
158
159
|
flexWrap: "wrap",
|
|
@@ -160,46 +161,43 @@ function x({ config: x, parentEntity: S, parentId: C, schema: w }) {
|
|
|
160
161
|
gap: 6,
|
|
161
162
|
flexShrink: 0
|
|
162
163
|
},
|
|
163
|
-
children: [
|
|
164
|
+
children: [Y.map(X), /* @__PURE__ */ g("div", {
|
|
164
165
|
style: {
|
|
165
166
|
marginLeft: "auto",
|
|
166
167
|
display: "flex",
|
|
167
168
|
alignItems: "center",
|
|
168
169
|
gap: 8
|
|
169
170
|
},
|
|
170
|
-
children: [/* @__PURE__ */
|
|
171
|
+
children: [/* @__PURE__ */ h("span", {
|
|
171
172
|
style: {
|
|
172
173
|
fontSize: 10.5,
|
|
173
174
|
color: "var(--text-4)"
|
|
174
175
|
},
|
|
175
|
-
children: e(
|
|
176
|
+
children: e(P("record.related.shortcut_to_add", "{keys} to add"), { keys: /* @__PURE__ */ h(m, { children: /* @__PURE__ */ h("span", {
|
|
176
177
|
className: "mono",
|
|
177
|
-
children: "
|
|
178
|
-
})
|
|
179
|
-
|
|
180
|
-
children: "↵"
|
|
181
|
-
})] }) })
|
|
182
|
-
}), /* @__PURE__ */ m(n, {
|
|
178
|
+
children: a("↵")
|
|
179
|
+
}) }) })
|
|
180
|
+
}), /* @__PURE__ */ h(r, {
|
|
183
181
|
type: "submit",
|
|
184
182
|
kind: "primary",
|
|
185
|
-
icon: /* @__PURE__ */
|
|
186
|
-
disabled:
|
|
187
|
-
children:
|
|
183
|
+
icon: /* @__PURE__ */ h(n.plus, { size: 13 }),
|
|
184
|
+
disabled: k || !j,
|
|
185
|
+
children: P("record.related.add", "Add")
|
|
188
186
|
})]
|
|
189
187
|
})]
|
|
190
188
|
}),
|
|
191
|
-
|
|
189
|
+
A != null && /* @__PURE__ */ h("p", {
|
|
192
190
|
style: {
|
|
193
191
|
fontSize: 11,
|
|
194
192
|
color: "var(--danger)",
|
|
195
193
|
margin: 0,
|
|
196
194
|
flexShrink: 0
|
|
197
195
|
},
|
|
198
|
-
children:
|
|
196
|
+
children: t(F, A)
|
|
199
197
|
})
|
|
200
198
|
]
|
|
201
199
|
})]
|
|
202
200
|
});
|
|
203
201
|
}
|
|
204
202
|
//#endregion
|
|
205
|
-
export {
|
|
203
|
+
export { S as TimelineComposer };
|