@declarion/react 0.34.0 → 0.35.1

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 (40) hide show
  1. package/README.md +1 -1
  2. package/dist-lib/{ActionRunner-UGGvGypS.js → ActionRunner-Bkkb_YMa.js} +1176 -1287
  3. package/dist-lib/{DraggableChildrenTable-CljdYXd_.js → DraggableChildrenTable-TNni9y0Q.js} +39 -39
  4. package/dist-lib/{Grid-5Y_iPqNW.js → Grid-DOtBLx3n.js} +2 -2
  5. package/dist-lib/{JsonEditor-KelPV-OQ.js → JsonEditor-DoNmyrYd.js} +2 -2
  6. package/dist-lib/{LayoutRenderer-CoTMmvNW.js → LayoutRenderer-CMuVgKev.js} +407 -405
  7. package/dist-lib/{MarkdownRenderer-unbncYEV.js → MarkdownRenderer-DWOlvx8k.js} +1 -1
  8. package/dist-lib/{MonacoJson-DVjwsaBK.js → MonacoJson-BfpzZ1iT.js} +1 -1
  9. package/dist-lib/{RefreshControl-oeKhCjEC.js → RefreshControl-CgU8mNEp.js} +92 -94
  10. package/dist-lib/{SmartDetailPage.impl-Caxd97q6.js → SmartDetailPage.impl-Bjl7EFzU.js} +321 -318
  11. package/dist-lib/{SmartRecordListPage.impl-BF_ieDc2.js → SmartRecordListPage.impl-D2eE-g5J.js} +248 -248
  12. package/dist-lib/assets/OFL-Inter.txt +93 -0
  13. package/dist-lib/assets/OFL-JetBrainsMono.txt +93 -0
  14. package/dist-lib/assets/inter-latin-ext-wght-normal.woff2 +0 -0
  15. package/dist-lib/assets/inter-latin-wght-normal.woff2 +0 -0
  16. package/dist-lib/assets/jetbrains-mono-latin-ext-wght-normal.woff2 +0 -0
  17. package/dist-lib/assets/jetbrains-mono-latin-wght-normal.woff2 +0 -0
  18. package/dist-lib/components/fields/cells/factories/host-icons.d.ts +9 -1
  19. package/dist-lib/components/layout/TopBar.d.ts +2 -1
  20. package/dist-lib/components/pages/list/DataCell.d.ts +1 -2
  21. package/dist-lib/components/primitives/Btn.d.ts +1 -1
  22. package/dist-lib/declarion-react.css +1 -1
  23. package/dist-lib/embed/theme.d.ts +8 -8
  24. package/dist-lib/hooks/useBrandingChrome.d.ts +28 -2
  25. package/dist-lib/hooks/useResponsiveMode.d.ts +17 -1
  26. package/dist-lib/index.js +1971 -1936
  27. package/dist-lib/lib/brand-tokens.d.ts +43 -0
  28. package/dist-lib/lib/html-state.d.ts +11 -0
  29. package/dist-lib/lib/versionTracker.d.ts +6 -0
  30. package/dist-lib/{registry-DnPK3Msj.js → registry-GTwsJEYp.js} +1425 -1299
  31. package/dist-lib/stores/page-state.d.ts +1 -1
  32. package/dist-lib/stores/preferences.d.ts +37 -0
  33. package/dist-lib/testing.js +25 -25
  34. package/dist-lib/types/api.d.ts +96 -16
  35. package/dist-lib/types/schema.d.ts +15 -0
  36. package/dist-lib/{useProperties-CgRhBh0k.js → useProperties-oNGJ7HwM.js} +41 -41
  37. package/dist-lib/{value-GmL5BVFm.js → value-DNs5L0Ad.js} +97 -97
  38. package/dist-lib/vite/fingerprint-plugin.d.ts +1 -1
  39. package/package.json +17 -16
  40. package/dist-lib/stores/appearance.d.ts +0 -37
@@ -6,7 +6,7 @@ import type { QueryClient, QueryKey } from "@tanstack/react-query";
6
6
  export declare const DEFAULT_PAGE_STATE_TTL_MS: number;
7
7
  /** Hard upper bound on retained-page entries. Bounds total memory and is the
8
8
  * ONLY bound in embed mode, which has no tab-close signal at all. Generous
9
- * relative to `ui_tabs_max_open` (a user rarely revisits more than this many
9
+ * relative to `preferences.tabs_max_open` (a user rarely revisits more than this many
10
10
  * distinct URLs within one TTL window); the least-recently-active entry is
11
11
  * evicted first when the cap is exceeded. */
12
12
  export declare const PAGE_STATE_MAX_ENTRIES = 64;
@@ -0,0 +1,37 @@
1
+ import type { BrandingPreferences } from "../types/api";
2
+ export type ColorScheme = "light" | "dark";
3
+ export type AccentId = "violet" | "blue" | "teal" | "amber" | "rose";
4
+ export type Density = "compact" | "comfortable" | "cozy";
5
+ export type SidebarMode = "wide" | "collapsed";
6
+ export type TabsPosition = "top" | "bottom";
7
+ export type AiSurface = "command" | "panel" | "both" | "off";
8
+ export type ToastPosition = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
9
+ export interface Preferences {
10
+ colorScheme: ColorScheme;
11
+ accent: AccentId;
12
+ density: Density;
13
+ sidebar: SidebarMode;
14
+ tabsPosition: TabsPosition;
15
+ tabsMaxOpen: number;
16
+ /** When false, tabs are not persisted across reloads. */
17
+ tabsPersist: boolean;
18
+ radius: number;
19
+ zebra: boolean;
20
+ aiSurface: AiSurface;
21
+ /** Where toasts appear. Read by <Toaster> in app.tsx. */
22
+ toastPosition: ToastPosition;
23
+ }
24
+ export declare function applyPreferences(p: Preferences): void;
25
+ interface PreferencesState extends Preferences {
26
+ set: <K extends keyof Preferences>(key: K, value: Preferences[K]) => void;
27
+ setMany: (patch: Partial<Preferences>) => void;
28
+ /** Apply the deployment's defaults from `branding.preferences`. ONLY fills
29
+ * keys the user has not already changed this session, so a branding
30
+ * refetch never clobbers a toggle the user just clicked. */
31
+ hydrateFromBranding: (preferences: BrandingPreferences | undefined) => void;
32
+ /** Forget every session choice and return to the deployment's defaults —
33
+ * the same state a fresh page load resolves, reproduced on demand. */
34
+ resetToDefaults: (preferences: BrandingPreferences | undefined) => void;
35
+ }
36
+ export declare const usePreferencesStore: import("zustand").UseBoundStore<import("zustand").StoreApi<PreferencesState>>;
37
+ export {};
@@ -1,4 +1,4 @@
1
- import { In as e, _t as t, at as n, ft as r, mt as i, pt as a, t as o } from "./ActionRunner-UGGvGypS.js";
1
+ import { Fn as e, dt as t, ft as n, ht as r, rt as i, t as a, ut as o } from "./ActionRunner-Bkkb_YMa.js";
2
2
  import { useState as s } from "react";
3
3
  import { MemoryRouter as c } from "react-router-dom";
4
4
  import { QueryClient as l, QueryClientProvider as u } from "@tanstack/react-query";
@@ -59,7 +59,7 @@ function x() {
59
59
  code: "test",
60
60
  name: "Test",
61
61
  role: "admin"
62
- }, n = {
62
+ }, t = {
63
63
  id: "test-user",
64
64
  email: "test@example.com",
65
65
  display_name: "Test User",
@@ -70,7 +70,7 @@ function x() {
70
70
  created_at: "2026-01-01T00:00:00Z",
71
71
  updated_at: "2026-01-01T00:00:00Z"
72
72
  };
73
- t.getState().setUser(n, e);
73
+ r.getState().setUser(t, e);
74
74
  }
75
75
  function S(e) {
76
76
  if (e === void 0) return { rows: [] };
@@ -86,10 +86,10 @@ function S(e) {
86
86
  return e;
87
87
  }
88
88
  function C(e) {
89
- let t = e.entityData ?? {};
90
- i((e, n) => {
91
- let r = t[e], i = S(r), a = i.meta?.per_page ?? 50, o = i.meta?.total ?? i.rows.length;
92
- return n.count === "only" ? {
89
+ let r = e.entityData ?? {};
90
+ n((e, t) => {
91
+ let n = r[e], i = S(n), a = i.meta?.per_page ?? 50, o = i.meta?.total ?? i.rows.length;
92
+ return t.count === "only" ? {
93
93
  data: [],
94
94
  meta: {
95
95
  page: 1,
@@ -108,24 +108,24 @@ function C(e) {
108
108
  ...i.refs === void 0 ? {} : { $refs: i.refs }
109
109
  };
110
110
  });
111
- let o = e.entityItems ?? {}, s = e.entityItemResponses ?? {};
112
- a((e, t) => {
113
- let r = typeof t == "string" ? t : n(t), i = s[e]?.[r];
114
- if (i instanceof Error) throw i;
115
- if (i !== void 0) return i;
116
- let a = o[e]?.[r];
117
- if (a instanceof Error) throw a;
118
- return { data: a };
111
+ let a = e.entityItems ?? {}, s = e.entityItemResponses ?? {};
112
+ t((e, t) => {
113
+ let n = typeof t == "string" ? t : i(t), r = s[e]?.[n];
114
+ if (r instanceof Error) throw r;
115
+ if (r !== void 0) return r;
116
+ let o = a[e]?.[n];
117
+ if (o instanceof Error) throw o;
118
+ return { data: o };
119
119
  });
120
120
  let c = e.actionResults ?? {};
121
- r(async (e, t) => {
121
+ o(async (e, t) => {
122
122
  if (!(e in c)) throw Error(`renderWithDeclarion: no action result registered for "${e}" (seed it via actionResults)`);
123
123
  let n = c[e];
124
124
  return b(typeof n == "function" ? await n(t) : n);
125
125
  });
126
126
  }
127
127
  function w() {
128
- i(null), a(null), r(null), t.setState({
128
+ n(null), t(null), o(null), r.setState({
129
129
  user: null,
130
130
  isAuthenticated: !1,
131
131
  activeTenant: null,
@@ -142,32 +142,32 @@ function T(t, n = {}) {
142
142
  client: r,
143
143
  children: [/* @__PURE__ */ f(c, {
144
144
  initialEntries: [n.route ?? "/"],
145
- children: /* @__PURE__ */ f(o, { children: t })
145
+ children: /* @__PURE__ */ f(a, { children: t })
146
146
  }), /* @__PURE__ */ f(d, {})]
147
- }), a = m(n.viewport ? /* @__PURE__ */ f(e, {
147
+ }), o = m(n.viewport ? /* @__PURE__ */ f(e, {
148
148
  viewportOverride: n.viewport,
149
149
  children: i
150
150
  }) : i);
151
- return Object.assign(a, { queryClient: r });
151
+ return Object.assign(o, { queryClient: r });
152
152
  }
153
- function E({ children: e, authenticated: n = !0, ...r }) {
153
+ function E({ children: e, authenticated: t = !0, ...n }) {
154
154
  let [i] = s(() => {
155
155
  let e = new l({ defaultOptions: { queries: {
156
156
  retry: !1,
157
157
  gcTime: Infinity
158
158
  } } });
159
- return n ? (x(), e.setQueryData(["schema", !0], r.schema ?? h())) : t.setState({
159
+ return t ? (x(), e.setQueryData(["schema", !0], n.schema ?? h())) : r.setState({
160
160
  user: null,
161
161
  isAuthenticated: !1,
162
162
  activeTenant: null,
163
163
  tenants: []
164
- }), C(r), e;
164
+ }), C(n), e;
165
165
  });
166
166
  return /* @__PURE__ */ p(u, {
167
167
  client: i,
168
168
  children: [/* @__PURE__ */ f(c, {
169
- initialEntries: [r.route ?? "/"],
170
- children: /* @__PURE__ */ f(o, { children: e })
169
+ initialEntries: [n.route ?? "/"],
170
+ children: /* @__PURE__ */ f(a, { children: e })
171
171
  }), /* @__PURE__ */ f(d, {})]
172
172
  });
173
173
  }
@@ -165,7 +165,6 @@ export interface BrandingIdentity {
165
165
  app_name?: string;
166
166
  app_logo?: string;
167
167
  app_initial?: string;
168
- accent_color?: string;
169
168
  ai_name?: string;
170
169
  wordmark?: string;
171
170
  version_label?: string;
@@ -177,43 +176,122 @@ export interface BrandingIdentity {
177
176
  workspace_domain?: string;
178
177
  legal_links?: PublicLegalLinks;
179
178
  }
179
+ /**
180
+ * Fourteen brand colors, each named EXACTLY after the CSS custom property it
181
+ * writes, with underscores hyphenated: `surface_2` writes `--surface-2`. A
182
+ * developer who set a field in YAML reaches the same token from their own
183
+ * stylesheet without a lookup table. `branding.colorFields.test.ts` enforces
184
+ * the mapping against the YAML structure, across languages.
185
+ *
186
+ * The shades that hang off these (`--accent-soft`, `--accent-ring`,
187
+ * `--row-selected-bg`) are DERIVED from them and are not settable here: a
188
+ * designer picks an accent, and the tints follow. A brand that wants a bespoke
189
+ * tint sets the custom property in `theme.css_url`, with a plain rule and no
190
+ * `!important`.
191
+ */
180
192
  export interface BrandingThemeColors {
181
- accent?: string;
182
- accent_hover?: string;
183
- accent_soft?: string;
184
- primary?: string;
185
- primary_hover?: string;
186
- sidebar?: string;
187
- rail?: string;
193
+ background?: string;
188
194
  surface?: string;
189
195
  surface_2?: string;
190
- background?: string;
196
+ surface_3?: string;
191
197
  text?: string;
192
- text_muted?: string;
198
+ text_2?: string;
199
+ text_3?: string;
193
200
  border?: string;
201
+ divider?: string;
202
+ accent?: string;
203
+ accent_hover?: string;
204
+ accent_foreground?: string;
205
+ sidebar?: string;
206
+ rail?: string;
207
+ }
208
+ /**
209
+ * Page-title typography. Scheme-independent: a title is the same size in light
210
+ * and dark. Each field is named after the CSS custom property it writes:
211
+ * `page_title_size` writes `--page-title-size`.
212
+ *
213
+ * Three surfaces render an `<h1>` page title at three sizes the designer chose
214
+ * (list 20px, record 19px, page 18px). Declaring `page_title_size` overrides all
215
+ * three at once; omitting it leaves each on its own designed default.
216
+ */
217
+ export interface BrandingTypography {
218
+ /** e.g. "15px". Overrides every page title's size. */
219
+ page_title_size?: string;
220
+ /** e.g. "22.5px" or "1.5". Overrides every page title's line height. */
221
+ page_title_line_height?: string;
222
+ }
223
+ /**
224
+ * Brand colors keyed by color scheme. A scheme may be omitted entirely, or any
225
+ * field within it omitted; the platform's own token for that scheme applies. A
226
+ * value is NEVER copied from the other scheme - that is the bug this shape
227
+ * exists to make impossible.
228
+ */
229
+ export interface BrandingThemeColorSchemes {
230
+ light?: BrandingThemeColors;
231
+ dark?: BrandingThemeColors;
194
232
  }
195
233
  export interface BrandingTheme {
196
234
  css_url?: string;
197
235
  font_sans?: string;
198
236
  font_mono?: string;
199
- radius?: string;
200
- density?: string;
201
- colors?: BrandingThemeColors;
237
+ typography?: BrandingTypography;
238
+ colors?: BrandingThemeColorSchemes;
239
+ }
240
+ /**
241
+ * The deployment's DEFAULTS for the controls the Preferences screen renders,
242
+ * and the single durable source of preference state (Decision 33: the browser
243
+ * stores nothing). A user's toggle holds for the SPA session and resets to
244
+ * these on reload.
245
+ *
246
+ * Wire shape is snake_case because it is YAML. `stores/preferences.ts` owns the
247
+ * single translation into the camelCase store; add a field here and there, or
248
+ * it will load, validate, and do nothing.
249
+ */
250
+ export interface BrandingPreferences {
251
+ color_scheme?: "light" | "dark";
252
+ accent?: "violet" | "blue" | "teal" | "amber" | "rose";
253
+ density?: "compact" | "comfortable" | "cozy";
254
+ sidebar?: "wide" | "collapsed";
255
+ tabs_position?: "top" | "bottom";
256
+ tabs_max_open?: number;
257
+ tabs_persist?: boolean;
258
+ radius?: number;
259
+ zebra_rows?: boolean;
260
+ ai_surface?: "command" | "panel" | "both" | "off";
261
+ toast_position?: "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
202
262
  }
263
+ /**
264
+ * Per-surface chrome flags - mirrors the YAML `branding_surface_flags`
265
+ * structure exactly. Kept distinct from {@link BrandingShellFlags}: the two
266
+ * are different YAML structures, and conflating them let a caller ask a
267
+ * surface for a shell flag that could never be set there.
268
+ */
203
269
  export interface BrandingSurfaceFlags {
204
270
  show_title?: boolean;
205
- show_breadcrumbs?: boolean;
206
271
  show_actions?: boolean;
207
272
  show_count?: boolean;
208
- show_sidebar?: boolean;
273
+ }
274
+ /** Shell chrome flags - mirrors the YAML `branding_chrome_shell` structure. */
275
+ export interface BrandingShellFlags {
209
276
  show_topbar?: boolean;
210
277
  show_rail?: boolean;
278
+ show_sidebar?: boolean;
211
279
  show_tabs?: boolean;
280
+ show_breadcrumbs?: boolean;
212
281
  show_tenant_switcher?: boolean;
282
+ show_command_palette?: boolean;
283
+ show_theme_toggle?: boolean;
213
284
  }
285
+ /**
286
+ * The device class the SDK renders for. `auto` derives it from the measured
287
+ * width, which is what the platform has always done and what a deployment that
288
+ * declares nothing keeps.
289
+ */
290
+ export type BrandingViewport = "auto" | "phone" | "tablet" | "desktop";
214
291
  export interface BrandingChrome {
215
292
  full?: {
216
- shell?: BrandingSurfaceFlags;
293
+ viewport?: BrandingViewport;
294
+ shell?: BrandingShellFlags;
217
295
  surfaces?: {
218
296
  list?: BrandingSurfaceFlags;
219
297
  detail?: BrandingSurfaceFlags;
@@ -222,6 +300,7 @@ export interface BrandingChrome {
222
300
  };
223
301
  };
224
302
  embed?: {
303
+ viewport?: BrandingViewport;
225
304
  surfaces?: {
226
305
  list?: BrandingSurfaceFlags;
227
306
  detail?: BrandingSurfaceFlags;
@@ -234,6 +313,7 @@ export interface BrandingChrome {
234
313
  export interface PublicBranding {
235
314
  identity?: BrandingIdentity;
236
315
  theme?: BrandingTheme;
316
+ preferences?: BrandingPreferences;
237
317
  chrome?: BrandingChrome;
238
318
  }
239
319
  /**
@@ -4,6 +4,20 @@ import type { IconDef } from "../stores/icon-registry";
4
4
  export { OrderedMap };
5
5
  export type { IconDef };
6
6
  export type LocalizedString = Record<string, string>;
7
+ /**
8
+ * Where a `url` cell fetches an unknown host's site icon from.
9
+ *
10
+ * This is an outbound-request policy, not a visual style:
11
+ * google — one request per rendered hostname to www.google.com.
12
+ * direct — /favicon.ico from the site's own origin.
13
+ * none — no request at all; render the globe placeholder.
14
+ *
15
+ * Declared per column by `field.display.favicon_source`, and nowhere else -
16
+ * there is no parameter (plan 2026-07-09 Decision 23). Absent = `google`,
17
+ * today's rendered default. Mirrors `validFaviconSources` in
18
+ * golang/internal/engine/types_field_display.go.
19
+ */
20
+ export type FaviconSource = "google" | "direct" | "none";
7
21
  /**
8
22
  * Per-entity empty-state copy declared in the manifest under
9
23
  * `display.empty_state`. Title and Body are localized; LearnMoreURL is a
@@ -111,6 +125,7 @@ export interface EntityField {
111
125
  currency?: string;
112
126
  currency_field?: string;
113
127
  currency_display?: "symbol" | "narrow_symbol" | "code" | "name";
128
+ favicon_source?: FaviconSource;
114
129
  };
115
130
  values?: Array<{
116
131
  code: string;
@@ -1,5 +1,5 @@
1
- import { Mt as e, Qt as t, V as n, Z as r, jt as i, ln as a, ot as o, yn as s } from "./ActionRunner-UGGvGypS.js";
2
- import { vt as c } from "./registry-DnPK3Msj.js";
1
+ import { At as e, V as t, Z as n, Zt as r, cn as i, it as a, kt as o, vn as s } from "./ActionRunner-Bkkb_YMa.js";
2
+ import { vt as c } from "./registry-GTwsJEYp.js";
3
3
  import { useEffect as l, useMemo as u } from "react";
4
4
  import { useSearchParams as d } from "react-router-dom";
5
5
  import { useInfiniteQuery as f, useMutation as p, useQueryClient as m } from "@tanstack/react-query";
@@ -48,23 +48,23 @@ var b = class {
48
48
  }
49
49
  async get(e) {
50
50
  let t = new URLSearchParams(typeof e == "string" ? { id: e } : e);
51
- return _((await i(`/api/data/${this.entity}?${t.toString()}`)).data);
51
+ return _((await o(`/api/data/${this.entity}?${t.toString()}`)).data);
52
52
  }
53
53
  async list(e = {}) {
54
- let n, r = !1;
54
+ let t, n = !1;
55
55
  try {
56
- n = await i(y(this.entity, e));
57
- } catch (a) {
58
- if (e.after && t(a)) {
59
- let { after: t, ...a } = e;
60
- n = await i(y(this.entity, a)), r = !0;
61
- } else throw a;
56
+ t = await o(y(this.entity, e));
57
+ } catch (i) {
58
+ if (e.after && r(i)) {
59
+ let { after: r, ...i } = e;
60
+ t = await o(y(this.entity, i)), n = !0;
61
+ } else throw i;
62
62
  }
63
- return this.refs.merge(n.$refs), {
64
- data: n.data.map((e) => _(e)),
65
- meta: n.meta,
63
+ return this.refs.merge(t.$refs), {
64
+ data: t.data.map((e) => _(e)),
65
+ meta: t.meta,
66
66
  $refs: this.refs.all(),
67
- reset: r
67
+ reset: n
68
68
  };
69
69
  }
70
70
  async create(e) {
@@ -109,7 +109,7 @@ var b = class {
109
109
  await this.deleteMany([e]);
110
110
  }
111
111
  async deleteMany(e) {
112
- return e.length === 0 ? { count: 0 } : { count: (await o(`${this.entity}.__delete`, {
112
+ return e.length === 0 ? { count: 0 } : { count: (await a(`${this.entity}.__delete`, {
113
113
  object_ids: e,
114
114
  entity: this.entity
115
115
  })).object_count ?? e.length };
@@ -118,7 +118,7 @@ var b = class {
118
118
  await this.restoreMany([e]);
119
119
  }
120
120
  async restoreMany(e) {
121
- return e.length === 0 ? { count: 0 } : { count: (await o(`${this.entity}.__restore`, {
121
+ return e.length === 0 ? { count: 0 } : { count: (await a(`${this.entity}.__restore`, {
122
122
  object_ids: e,
123
123
  entity: this.entity
124
124
  })).object_count ?? e.length };
@@ -233,39 +233,39 @@ function O(e, t, n) {
233
233
  //#endregion
234
234
  //#region src/hooks/useTabSearchMirror.ts
235
235
  function k(e) {
236
- let t = r(), [n] = d();
236
+ let t = n(), [r] = d();
237
237
  l(() => {
238
238
  if (!e || t.enabled) return;
239
- let r = c.getState(), i = r.findTabByPathname(e);
240
- i && r.updateTabSearch(i.id, n.toString());
239
+ let n = c.getState(), i = n.findTabByPathname(e);
240
+ i && n.updateTabSearch(i.id, r.toString());
241
241
  }, [
242
- n,
242
+ r,
243
243
  e,
244
244
  t.enabled
245
245
  ]);
246
246
  }
247
247
  //#endregion
248
248
  //#region src/hooks/useRegisterScreenTab.ts
249
- function A(e, t, n, i) {
250
- let a = r();
249
+ function A(e, t, r, i) {
250
+ let a = n();
251
251
  l(() => {
252
252
  !e || a.enabled || c.getState().openTab({
253
253
  pathname: e,
254
254
  search: i,
255
255
  title: t,
256
- icon: n,
256
+ icon: r,
257
257
  closable: !0
258
258
  });
259
259
  }, [
260
260
  e,
261
261
  t,
262
- n,
262
+ r,
263
263
  a.enabled
264
264
  ]);
265
265
  }
266
266
  function j(e, t, n) {
267
- let r = e?.route, i = t ? a(e?.display?.name) || a(t.display.name_plural) : "", o = e?.display?.icon || t?.display.icon;
268
- A(t ? r : void 0, i, o, n);
267
+ let r = e?.route, a = t ? i(e?.display?.name) || i(t.display.name_plural) : "", o = e?.display?.icon || t?.display.icon;
268
+ A(t ? r : void 0, a, o, n);
269
269
  }
270
270
  //#endregion
271
271
  //#region src/lib/filters.ts
@@ -374,36 +374,36 @@ function V(e, t) {
374
374
  //#endregion
375
375
  //#region src/api/status.ts
376
376
  async function H(e, t, n, r, i) {
377
- let a = {
377
+ let o = {
378
378
  status_group_code: n,
379
379
  status_code: r
380
380
  };
381
- i != null && (a.note = i);
382
- let s = (await o(`${e}.__update`, {
381
+ i != null && (o.note = i);
382
+ let s = (await a(`${e}.__update`, {
383
383
  object_ids: [t],
384
384
  entity: e,
385
- fields: { $statuses: [a] }
385
+ fields: { $statuses: [o] }
386
386
  })).result?.rows?.[0]?.$statuses ?? [];
387
387
  return s.find((e) => e.group_code === n) ?? s[0];
388
388
  }
389
389
  //#endregion
390
390
  //#region src/hooks/useObjectStatus.ts
391
- function U(e, t) {
391
+ function U(e, n) {
392
392
  let r = m();
393
393
  return p({
394
- mutationFn: ({ groupCode: n, statusCode: r, note: i }) => H(e, t, n, r, i),
394
+ mutationFn: ({ groupCode: t, statusCode: r, note: i }) => H(e, n, t, r, i),
395
395
  onSuccess: () => {
396
396
  r.invalidateQueries({ queryKey: ["entity-item", e] });
397
397
  },
398
398
  onError: (e) => {
399
- n.error(e.message);
399
+ t.error(e.message);
400
400
  }
401
401
  });
402
402
  }
403
403
  //#endregion
404
404
  //#region src/api/properties.ts
405
405
  async function W(e, t, n, r) {
406
- let i = (await o(`${e}.__update`, {
406
+ let i = (await a(`${e}.__update`, {
407
407
  object_ids: [t],
408
408
  entity: e,
409
409
  fields: { $properties: [{
@@ -414,7 +414,7 @@ async function W(e, t, n, r) {
414
414
  return i.find((e) => e.property_code === n) ?? i[0];
415
415
  }
416
416
  async function G(e, t, n) {
417
- await o(`${e}.__update`, {
417
+ await a(`${e}.__update`, {
418
418
  object_ids: [t],
419
419
  entity: e,
420
420
  fields: { $properties: [{
@@ -425,27 +425,27 @@ async function G(e, t, n) {
425
425
  }
426
426
  //#endregion
427
427
  //#region src/hooks/useProperties.ts
428
- function K(e, t) {
428
+ function K(e, n) {
429
429
  let r = m();
430
430
  return p({
431
- mutationFn: ({ propertyCode: n, value: r }) => W(e, t, n, r),
431
+ mutationFn: ({ propertyCode: t, value: r }) => W(e, n, t, r),
432
432
  onSuccess: () => {
433
433
  r.invalidateQueries({ queryKey: ["entity-item", e] });
434
434
  },
435
435
  onError: (e) => {
436
- n.error(e.message);
436
+ t.error(e.message);
437
437
  }
438
438
  });
439
439
  }
440
- function q(e, t) {
440
+ function q(e, n) {
441
441
  let r = m();
442
442
  return p({
443
- mutationFn: (n) => G(e, t, n),
443
+ mutationFn: (t) => G(e, n, t),
444
444
  onSuccess: () => {
445
445
  r.invalidateQueries({ queryKey: ["entity-item", e] });
446
446
  },
447
447
  onError: (e) => {
448
- n.error(e.message);
448
+ t.error(e.message);
449
449
  }
450
450
  });
451
451
  }