@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.
Files changed (90) hide show
  1. package/dist-lib/app.js +28 -28
  2. package/dist-lib/components/actions/ActionButton.js +86 -85
  3. package/dist-lib/components/actions/ActionResultDialog.impl.js +47 -47
  4. package/dist-lib/components/actions/ActionRunner.js +47 -47
  5. package/dist-lib/components/actions/ObjectActionBar.js +9 -9
  6. package/dist-lib/components/actions/RowActionsKebab.js +19 -19
  7. package/dist-lib/components/agents/AgentChatPanel.impl.js +53 -53
  8. package/dist-lib/components/chrome/AssociationTabs.js +21 -21
  9. package/dist-lib/components/chrome/RecordHeader.js +33 -40
  10. package/dist-lib/components/detail-layout/AssociatedBlock.js +387 -381
  11. package/dist-lib/components/detail-layout/ChildrenBlock.js +12 -13
  12. package/dist-lib/components/detail-layout/ChildrenTimeline.js +198 -198
  13. package/dist-lib/components/detail-layout/DraggableChildrenTable.js +114 -114
  14. package/dist-lib/components/detail-layout/EditableChildrenTable.js +160 -160
  15. package/dist-lib/components/detail-layout/EvidenceBlock.js +20 -21
  16. package/dist-lib/components/detail-layout/PropertiesBlock.js +45 -39
  17. package/dist-lib/components/detail-layout/QuickAddForm.js +9 -9
  18. package/dist-lib/components/detail-layout/TimelineComposer.js +87 -89
  19. package/dist-lib/components/detail-layout/widgets/EntityScorecardWidget.js +100 -99
  20. package/dist-lib/components/fields/FileReferenceField.js +9 -9
  21. package/dist-lib/components/fields/StructureField.js +57 -47
  22. package/dist-lib/components/fields/TimestampField.js +59 -54
  23. package/dist-lib/components/fields/cells/factories/money.js +14 -23
  24. package/dist-lib/components/fields/cells/factories/nextRun.js +1 -1
  25. package/dist-lib/components/fields/cells/factories/text.js +18 -3
  26. package/dist-lib/components/fields/cells/factories/timestamp.js +24 -12
  27. package/dist-lib/components/file-widgets/DocumentCard.js +108 -106
  28. package/dist-lib/components/layout/Layout.js +306 -361
  29. package/dist-lib/components/layout/Rail.js +42 -41
  30. package/dist-lib/components/layout/Sidebar.js +132 -117
  31. package/dist-lib/components/layout/TabStrip.js +116 -115
  32. package/dist-lib/components/layout/TenantChip.js +47 -54
  33. package/dist-lib/components/layout/TopBar.js +108 -105
  34. package/dist-lib/components/list/InlineEditCell.js +23 -23
  35. package/dist-lib/components/list/QuickPeek.js +65 -66
  36. package/dist-lib/components/pages/DocumentsMenu.js +42 -42
  37. package/dist-lib/components/pages/ExportMenu.js +25 -25
  38. package/dist-lib/components/pages/RecordDocumentsPanel.js +35 -35
  39. package/dist-lib/components/pages/RecordNotesPanel.js +94 -93
  40. package/dist-lib/components/pages/SmartDetailPage.impl.js +421 -417
  41. package/dist-lib/components/pages/SmartListPage.impl.js +293 -295
  42. package/dist-lib/components/pages/SmartRecordListPage.impl.js +310 -310
  43. package/dist-lib/components/pages/auth/AuthShell.js +73 -73
  44. package/dist-lib/components/pages/auth/SignIn.js +32 -32
  45. package/dist-lib/components/pages/auth/SignUp.impl.js +3 -3
  46. package/dist-lib/components/pages/auth/SignUpCode.js +9 -9
  47. package/dist-lib/components/pages/list/ListFloatbar.js +12 -12
  48. package/dist-lib/components/pages/list/ListHeader.js +19 -19
  49. package/dist-lib/components/pages/list/ListNoRows.js +15 -15
  50. package/dist-lib/components/pages/list/ListToolbar.js +145 -145
  51. package/dist-lib/components/pages/list/useActiveView.js +14 -5
  52. package/dist-lib/components/pages/list/useListQuery.js +121 -81
  53. package/dist-lib/components/pages/list/useListRowInteraction.js +70 -70
  54. package/dist-lib/components/pages/list/useRowMenu.js +7 -7
  55. package/dist-lib/components/pages/profile/Preferences.impl.js +81 -78
  56. package/dist-lib/components/pages/profile/Profile.impl.js +191 -189
  57. package/dist-lib/components/pages/tenant-params/TenantParamsPage.impl.js +166 -158
  58. package/dist-lib/components/shared/ChangePasswordDialog.impl.js +23 -23
  59. package/dist-lib/components/shared/MarkdownRenderer.js +9 -9
  60. package/dist-lib/hooks/useAuth.js +11 -11
  61. package/dist-lib/hooks/useBranding.js +4 -4
  62. package/dist-lib/hooks/useDisplayTimeZone.js +8 -0
  63. package/dist-lib/hooks/useFollowAgentOpen.js +24 -24
  64. package/dist-lib/hooks/useImpersonation.js +6 -6
  65. package/dist-lib/hooks/useMutations.js +23 -23
  66. package/dist-lib/hooks/useObjectStatus.js +5 -5
  67. package/dist-lib/hooks/useParams.js +59 -51
  68. package/dist-lib/hooks/useProperties.js +8 -8
  69. package/dist-lib/hooks/useRowTenant.js +18 -6
  70. package/dist-lib/hooks/useText.js +9 -7
  71. package/dist-lib/hooks/useUiPreferences.js +71 -0
  72. package/dist-lib/index.d.ts +22 -6
  73. package/dist-lib/index.js +127 -126
  74. package/dist-lib/lib/actions.js +116 -84
  75. package/dist-lib/lib/child-config.js +10 -1
  76. package/dist-lib/lib/format-count.js +16 -1
  77. package/dist-lib/lib/language.js +23 -21
  78. package/dist-lib/lib/money-text.js +29 -0
  79. package/dist-lib/lib/profile.js +4 -0
  80. package/dist-lib/lib/role-label.js +8 -0
  81. package/dist-lib/lib/schema-routing.js +34 -14
  82. package/dist-lib/lib/shortcut.js +10 -0
  83. package/dist-lib/lib/timestamp.js +93 -31
  84. package/dist-lib/stores/auth.js +9 -8
  85. package/dist-lib/stores/preferences.js +56 -17
  86. package/dist-lib/testing.d.ts +1 -1
  87. package/dist-lib/testing.js +25 -28
  88. package/dist-lib/types/schema.js +33 -27
  89. package/dist-lib/{useResponsiveMode-D3SKz5z4.d.ts → useResponsiveMode-9_eJT18k.d.ts} +5 -5
  90. package/package.json +1 -1
@@ -1,26 +1,25 @@
1
- import { textWithNodes as e } from "../../../lib/language.js";
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 { BRANDING_PARAM_CODE as s } from "../../../lib/branding.js";
9
- import { useBranding as c } from "../../../hooks/useBranding.js";
10
- import { usePreferencesStore as l } from "../../../stores/preferences.js";
11
- import { cn as u } from "../../../lib/utils.js";
12
- import { PageHeader as d } from "../../chrome/PageHeader.js";
13
- import { FieldRow as f, FieldsGrid as p } from "../../detail-layout/FieldRow.js";
14
- import { PageShell as m } from "../../chrome/PageShell.js";
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
- ], v = [
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
- ], y = "px", b = [
38
+ ], v = "px", y = [
40
39
  [
41
40
  "profile.preferences.shortcut.command_palette",
42
41
  "Command palette",
43
- "⌘ K"
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
- "⌘ B"
52
+ c("B")
54
53
  ],
55
54
  [
56
55
  "profile.preferences.shortcut.close_tab",
57
56
  "Close current tab",
58
- "⌘ W"
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 x() {
72
- let x = l((e) => e.colorScheme), C = l((e) => e.accent), w = l((e) => e.density), T = l((e) => e.radius), E = l((e) => e.zebra), D = l((e) => e.set), O = l((e) => e.resetToDefaults), { branding: k } = c(), A = i();
73
- return /* @__PURE__ */ g(m, {
74
- header: /* @__PURE__ */ h(d, {
75
- title: A("profile.preferences", "Preferences"),
76
- actions: /* @__PURE__ */ h(n, {
77
- icon: /* @__PURE__ */ h(t.refresh, { size: 13 }),
78
- onClick: () => O(k?.preferences),
79
- children: A("profile.preferences.reset", "Reset to defaults")
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__ */ h(a, {
83
- title: A("profile.preferences.appearance", "Appearance"),
84
- icon: /* @__PURE__ */ h(t.moon, { size: 14 }),
85
- footer: e(A("profile.preferences.subtitle", "These settings apply for this session; a reload returns to your workspace defaults, which admins set through the {parameter} parameter."), { parameter: /* @__PURE__ */ h("span", {
86
- className: "mono",
87
- children: s
88
- }) }),
89
- children: /* @__PURE__ */ g(p, { children: [
90
- /* @__PURE__ */ h(f, {
91
- label: A("profile.preferences.theme", "Theme"),
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__ */ h(f, {
100
- label: A("profile.preferences.accent", "Accent color"),
101
- hint: A("profile.preferences.accent_hint", "Your personal accent across the app"),
102
- children: /* @__PURE__ */ h(S, { children: _.map((e) => /* @__PURE__ */ h("button", {
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": x,
106
- onClick: () => D("accent", e),
107
- "aria-label": A(`profile.preferences.accent.${e}`, `Accent ${e}`),
108
- "aria-pressed": C === e,
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: u("size-6 cursor-pointer rounded-md border-2", C === e ? "border-foreground" : "border-transparent")
111
+ className: l("size-6 cursor-pointer rounded-md border-2", b === e ? "border-foreground" : "border-transparent")
111
112
  }, e)) })
112
113
  }),
113
- /* @__PURE__ */ h(f, {
114
- label: A("profile.preferences.density", "Density"),
115
- hint: A("profile.preferences.density_hint", "Compact saves space; cozy is easier on the eyes"),
116
- children: /* @__PURE__ */ h(S, { children: v.map(([e, t, r]) => /* @__PURE__ */ h(n, {
117
- kind: w === e ? "primary" : "default",
118
- "aria-pressed": w === e,
119
- onClick: () => D("density", e),
120
- children: A(t, r)
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__ */ h(f, {
124
- label: A("profile.preferences.radius", "Border radius"),
125
- children: /* @__PURE__ */ g(S, { children: [/* @__PURE__ */ h("input", {
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: T,
130
- onChange: (e) => D("radius", Number(e.target.value)),
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__ */ g("span", {
135
+ }), /* @__PURE__ */ h("span", {
133
136
  className: "mono num text-xs text-muted-foreground",
134
- children: [T, y]
137
+ children: [C, v]
135
138
  })] })
136
139
  }),
137
- /* @__PURE__ */ h(f, {
138
- label: A("profile.preferences.zebra", "Zebra rows"),
140
+ /* @__PURE__ */ m(d, {
141
+ label: D("profile.preferences.zebra", "Zebra rows"),
139
142
  labelId: "preferences-zebra",
140
- hint: A("profile.preferences.zebra_hint", "Alternating row backgrounds on tables"),
141
- children: /* @__PURE__ */ h(o, {
142
- value: E,
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) => D("zebra", e)
147
+ onChange: (e) => k("zebra", e)
145
148
  })
146
149
  })
147
150
  ] })
148
- }), /* @__PURE__ */ h(a, {
149
- title: A("profile.preferences.keyboard", "Keyboard"),
150
- icon: /* @__PURE__ */ h(t.command, { size: 14 }),
151
- children: /* @__PURE__ */ h(p, { children: b.map(([e, t, n]) => /* @__PURE__ */ h(f, {
152
- label: A(e, t),
153
- children: /* @__PURE__ */ h(r, { children: n })
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 S({ children: e }) {
159
- return /* @__PURE__ */ h("div", {
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 { x as Preferences };
168
+ export { b as Preferences };