@declarion/react 0.87.0 → 0.89.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,26 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { usePreferencesStore as e } from "../../../stores/preferences.js";
|
|
2
2
|
import { Icon as t } from "../../primitives/Icons.js";
|
|
3
3
|
import { Btn as n } from "../../primitives/Btn.js";
|
|
4
4
|
import { Kbd as r } from "../../primitives/Kbd.js";
|
|
5
5
|
import { useText as i } from "../../../hooks/useText.js";
|
|
6
6
|
import { SectionCard as a } from "../../primitives/SectionCard.js";
|
|
7
7
|
import { BoolToggle as o } from "../../primitives/BoolToggle.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
8
|
+
import { useUiPreferences as s } from "../../../hooks/useUiPreferences.js";
|
|
9
|
+
import { shortcutLabel as c } from "../../../lib/shortcut.js";
|
|
10
|
+
import { cn as l } from "../../../lib/utils.js";
|
|
11
|
+
import { PageHeader as u } from "../../chrome/PageHeader.js";
|
|
12
|
+
import { FieldRow as d, FieldsGrid as f } from "../../detail-layout/FieldRow.js";
|
|
13
|
+
import { PageShell as p } from "../../chrome/PageShell.js";
|
|
14
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
16
15
|
//#region src/components/pages/profile/Preferences.impl.tsx
|
|
17
|
-
var
|
|
16
|
+
var g = [
|
|
18
17
|
"violet",
|
|
19
18
|
"blue",
|
|
20
19
|
"teal",
|
|
21
20
|
"amber",
|
|
22
21
|
"rose"
|
|
23
|
-
],
|
|
22
|
+
], _ = [
|
|
24
23
|
[
|
|
25
24
|
"compact",
|
|
26
25
|
"profile.preferences.density.compact",
|
|
@@ -36,26 +35,26 @@ var _ = [
|
|
|
36
35
|
"profile.preferences.density.cozy",
|
|
37
36
|
"Cozy"
|
|
38
37
|
]
|
|
39
|
-
],
|
|
38
|
+
], v = "px", y = [
|
|
40
39
|
[
|
|
41
40
|
"profile.preferences.shortcut.command_palette",
|
|
42
41
|
"Command palette",
|
|
43
|
-
"
|
|
42
|
+
c("K")
|
|
44
43
|
],
|
|
45
44
|
[
|
|
46
45
|
"profile.preferences.shortcut.assistant",
|
|
47
46
|
"Toggle AI assistant",
|
|
48
|
-
"
|
|
47
|
+
c("/")
|
|
49
48
|
],
|
|
50
49
|
[
|
|
51
50
|
"profile.preferences.shortcut.sidebar",
|
|
52
51
|
"Collapse sidebar",
|
|
53
|
-
"
|
|
52
|
+
c("B")
|
|
54
53
|
],
|
|
55
54
|
[
|
|
56
55
|
"profile.preferences.shortcut.close_tab",
|
|
57
56
|
"Close current tab",
|
|
58
|
-
"
|
|
57
|
+
c("W")
|
|
59
58
|
],
|
|
60
59
|
[
|
|
61
60
|
"profile.preferences.shortcut.search",
|
|
@@ -68,98 +67,102 @@ var _ = [
|
|
|
68
67
|
"Esc"
|
|
69
68
|
]
|
|
70
69
|
];
|
|
71
|
-
function
|
|
72
|
-
let
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
70
|
+
function b() {
|
|
71
|
+
let c = e((e) => e.colorScheme), b = e((e) => e.accent), S = e((e) => e.density), C = e((e) => e.radius), w = e((e) => e.zebra), T = e((e) => e.set), E = s(), D = i(), O = () => {
|
|
72
|
+
E.saveCurrent();
|
|
73
|
+
}, k = (e, t) => {
|
|
74
|
+
E.set(e, t);
|
|
75
|
+
};
|
|
76
|
+
return /* @__PURE__ */ h(p, {
|
|
77
|
+
header: /* @__PURE__ */ m(u, {
|
|
78
|
+
title: D("profile.preferences", "Preferences"),
|
|
79
|
+
actions: /* @__PURE__ */ m(n, {
|
|
80
|
+
icon: /* @__PURE__ */ m(t.refresh, { size: 13 }),
|
|
81
|
+
onClick: () => {
|
|
82
|
+
E.reset();
|
|
83
|
+
},
|
|
84
|
+
children: D("profile.preferences.reset", "Reset to defaults")
|
|
80
85
|
})
|
|
81
86
|
}),
|
|
82
|
-
children: [/* @__PURE__ */
|
|
83
|
-
title:
|
|
84
|
-
icon: /* @__PURE__ */
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
children: /* @__PURE__ */ h(S, { children: [["light", A("profile.preferences.theme.light", "Light")], ["dark", A("profile.preferences.theme.dark", "Dark")]].map(([e, t]) => /* @__PURE__ */ h(n, {
|
|
93
|
-
kind: x === e ? "primary" : "default",
|
|
94
|
-
"aria-pressed": x === e,
|
|
95
|
-
onClick: () => D("colorScheme", e),
|
|
87
|
+
children: [/* @__PURE__ */ m(a, {
|
|
88
|
+
title: D("profile.preferences.appearance", "Appearance"),
|
|
89
|
+
icon: /* @__PURE__ */ m(t.moon, { size: 14 }),
|
|
90
|
+
children: /* @__PURE__ */ h(f, { children: [
|
|
91
|
+
/* @__PURE__ */ m(d, {
|
|
92
|
+
label: D("profile.preferences.theme", "Theme"),
|
|
93
|
+
children: /* @__PURE__ */ m(x, { children: [["light", D("profile.preferences.theme.light", "Light")], ["dark", D("profile.preferences.theme.dark", "Dark")]].map(([e, t]) => /* @__PURE__ */ m(n, {
|
|
94
|
+
kind: c === e ? "primary" : "default",
|
|
95
|
+
"aria-pressed": c === e,
|
|
96
|
+
onClick: () => k("colorScheme", e),
|
|
96
97
|
children: t
|
|
97
98
|
}, e)) })
|
|
98
99
|
}),
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
label:
|
|
101
|
-
hint:
|
|
102
|
-
children: /* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ m(d, {
|
|
101
|
+
label: D("profile.preferences.accent", "Accent color"),
|
|
102
|
+
hint: D("profile.preferences.accent_hint", "Your personal accent across the app"),
|
|
103
|
+
children: /* @__PURE__ */ m(x, { children: g.map((e) => /* @__PURE__ */ m("button", {
|
|
103
104
|
type: "button",
|
|
104
105
|
"data-accent": e,
|
|
105
|
-
"data-color-scheme":
|
|
106
|
-
onClick: () =>
|
|
107
|
-
"aria-label":
|
|
108
|
-
"aria-pressed":
|
|
106
|
+
"data-color-scheme": c,
|
|
107
|
+
onClick: () => k("accent", e),
|
|
108
|
+
"aria-label": D(`profile.preferences.accent.${e}`, `Accent ${e}`),
|
|
109
|
+
"aria-pressed": b === e,
|
|
109
110
|
style: { background: "var(--accent)" },
|
|
110
|
-
className:
|
|
111
|
+
className: l("size-6 cursor-pointer rounded-md border-2", b === e ? "border-foreground" : "border-transparent")
|
|
111
112
|
}, e)) })
|
|
112
113
|
}),
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
-
label:
|
|
115
|
-
hint:
|
|
116
|
-
children: /* @__PURE__ */
|
|
117
|
-
kind:
|
|
118
|
-
"aria-pressed":
|
|
119
|
-
onClick: () =>
|
|
120
|
-
children:
|
|
114
|
+
/* @__PURE__ */ m(d, {
|
|
115
|
+
label: D("profile.preferences.density", "Density"),
|
|
116
|
+
hint: D("profile.preferences.density_hint", "Compact saves space; cozy is easier on the eyes"),
|
|
117
|
+
children: /* @__PURE__ */ m(x, { children: _.map(([e, t, r]) => /* @__PURE__ */ m(n, {
|
|
118
|
+
kind: S === e ? "primary" : "default",
|
|
119
|
+
"aria-pressed": S === e,
|
|
120
|
+
onClick: () => k("density", e),
|
|
121
|
+
children: D(t, r)
|
|
121
122
|
}, e)) })
|
|
122
123
|
}),
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
-
label:
|
|
125
|
-
children: /* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ m(d, {
|
|
125
|
+
label: D("profile.preferences.radius", "Border radius"),
|
|
126
|
+
children: /* @__PURE__ */ h(x, { children: [/* @__PURE__ */ m("input", {
|
|
126
127
|
type: "range",
|
|
127
128
|
min: 0,
|
|
128
129
|
max: 14,
|
|
129
|
-
value:
|
|
130
|
-
onChange: (e) =>
|
|
130
|
+
value: C,
|
|
131
|
+
onChange: (e) => T("radius", Number(e.target.value)),
|
|
132
|
+
onPointerUp: O,
|
|
133
|
+
onKeyUp: O,
|
|
131
134
|
className: "w-44"
|
|
132
|
-
}), /* @__PURE__ */
|
|
135
|
+
}), /* @__PURE__ */ h("span", {
|
|
133
136
|
className: "mono num text-xs text-muted-foreground",
|
|
134
|
-
children: [
|
|
137
|
+
children: [C, v]
|
|
135
138
|
})] })
|
|
136
139
|
}),
|
|
137
|
-
/* @__PURE__ */
|
|
138
|
-
label:
|
|
140
|
+
/* @__PURE__ */ m(d, {
|
|
141
|
+
label: D("profile.preferences.zebra", "Zebra rows"),
|
|
139
142
|
labelId: "preferences-zebra",
|
|
140
|
-
hint:
|
|
141
|
-
children: /* @__PURE__ */
|
|
142
|
-
value:
|
|
143
|
+
hint: D("profile.preferences.zebra_hint", "Alternating row backgrounds on tables"),
|
|
144
|
+
children: /* @__PURE__ */ m(o, {
|
|
145
|
+
value: w,
|
|
143
146
|
ariaLabelledby: "preferences-zebra",
|
|
144
|
-
onChange: (e) =>
|
|
147
|
+
onChange: (e) => k("zebra", e)
|
|
145
148
|
})
|
|
146
149
|
})
|
|
147
150
|
] })
|
|
148
|
-
}), /* @__PURE__ */
|
|
149
|
-
title:
|
|
150
|
-
icon: /* @__PURE__ */
|
|
151
|
-
children: /* @__PURE__ */
|
|
152
|
-
label:
|
|
153
|
-
children: /* @__PURE__ */
|
|
151
|
+
}), /* @__PURE__ */ m(a, {
|
|
152
|
+
title: D("profile.preferences.keyboard", "Keyboard"),
|
|
153
|
+
icon: /* @__PURE__ */ m(t.command, { size: 14 }),
|
|
154
|
+
children: /* @__PURE__ */ m(f, { children: y.map(([e, t, n]) => /* @__PURE__ */ m(d, {
|
|
155
|
+
label: D(e, t),
|
|
156
|
+
children: /* @__PURE__ */ m(r, { children: n })
|
|
154
157
|
}, e)) })
|
|
155
158
|
})]
|
|
156
159
|
});
|
|
157
160
|
}
|
|
158
|
-
function
|
|
159
|
-
return /* @__PURE__ */
|
|
161
|
+
function x({ children: e }) {
|
|
162
|
+
return /* @__PURE__ */ m("div", {
|
|
160
163
|
className: "flex flex-wrap items-center gap-1.5",
|
|
161
164
|
children: e
|
|
162
165
|
});
|
|
163
166
|
}
|
|
164
167
|
//#endregion
|
|
165
|
-
export {
|
|
168
|
+
export { b as Preferences };
|