@burdenoff/microfe-assethandler 2026.710.1 → 2026.713.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.
@@ -1 +1 @@
1
- {"version":3,"file":"AssetHandlerRoot.d.ts","sourceRoot":"","sources":["../../src/assethandler/AssetHandlerRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAgBhC,OAAO,KAAK,EAAE,qBAAqB,EAAW,MAAM,SAAS,CAAC;AAG9D,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAyItD,CAAC"}
1
+ {"version":3,"file":"AssetHandlerRoot.d.ts","sourceRoot":"","sources":["../../src/assethandler/AssetHandlerRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAgBhC,OAAO,KAAK,EAAE,qBAAqB,EAAW,MAAM,SAAS,CAAC;AAG9D,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CA0JtD,CAAC"}
@@ -7,11 +7,12 @@ import { jsx as f } from "react/jsx-runtime";
7
7
  import { FeatureFlagProvider as p } from "@burdenoff/fe-libs/shared/feature-flags";
8
8
  //#region src/assethandler/AssetHandlerRoot.tsx
9
9
  var m = (m) => {
10
- let { registerNavItems: h, registerFooterItems: g, basePath: _ = "/" } = m;
10
+ let { registerNavItems: h, registerFooterItems: g, basePath: _ = "/", brandLabel: v = "AssetHandler", terminology: y, hiddenCategoryIds: b } = m, x = y?.assets || "Assets";
11
11
  return r(() => {
12
- if (h) return h({
12
+ if (!h) return;
13
+ let e = new Set(b ?? []), n = (t) => e.has(t.replace(/^assethandler-/, "")), r = {
13
14
  id: "assethandler",
14
- label: "AssetHandler",
15
+ label: v,
15
16
  path: _,
16
17
  icon: /* @__PURE__ */ f(i, { size: 20 }),
17
18
  order: 82,
@@ -25,7 +26,7 @@ var m = (m) => {
25
26
  },
26
27
  {
27
28
  id: "assethandler-assets",
28
- label: "Assets",
29
+ label: x,
29
30
  path: t(_, "assets/asset-list"),
30
31
  order: 1
31
32
  },
@@ -110,16 +111,23 @@ var m = (m) => {
110
111
  order: 17
111
112
  }
112
113
  ]
113
- });
114
- }, [_, h]), r(() => {
114
+ };
115
+ return r.children &&= r.children.filter((e) => !n(e.id)), h(r);
116
+ }, [
117
+ _,
118
+ h,
119
+ v,
120
+ x,
121
+ b
122
+ ]), r(() => {
115
123
  if (g) return g([{
116
124
  id: "assethandler-status",
117
- label: "AssetHandler Live",
125
+ label: `${v} Live`,
118
126
  type: "status",
119
127
  section: "left",
120
128
  order: 10
121
129
  }]);
122
- }, [g]), /* @__PURE__ */ f(p, {
130
+ }, [g, v]), /* @__PURE__ */ f(p, {
123
131
  workspaceId: null,
124
132
  gateway: "global",
125
133
  defaultEnabled: !0,
@@ -1 +1 @@
1
- {"version":3,"file":"AssetHandlerRoot.js","names":[],"sources":["../../src/assethandler/AssetHandlerRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useEffect } from 'react';\nimport {\n BrainCircuit,\n Boxes,\n Cpu,\n KeyRound,\n Leaf,\n Network,\n Radar,\n ShieldCheck,\n} from 'lucide-react';\n\nimport { AssetHandlerRoutes } from './AssetHandlerRoutes';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { AssetHandlerProvider } from './providers/AssetHandlerProvider';\nimport type { AssetHandlerRootProps, NavItem } from './types';\nimport { joinPath } from './utils/navigation';\n\nexport const AssetHandlerRoot: FC<AssetHandlerRootProps> = (props) => {\n const { registerNavItems, registerFooterItems, basePath = '/' } = props;\n\n useEffect(() => {\n if (!registerNavItems) {\n return;\n }\n\n const navItem: NavItem = {\n id: 'assethandler',\n label: 'AssetHandler',\n path: basePath,\n icon: <Boxes size={20} />,\n order: 82,\n group: 'products',\n children: [\n {\n id: 'assethandler-dashboard',\n label: 'Dashboard',\n path: basePath,\n order: 0,\n },\n {\n id: 'assethandler-assets',\n label: 'Assets',\n path: joinPath(basePath, 'assets/asset-list'),\n order: 1,\n },\n {\n id: 'assethandler-operations',\n label: 'Operations',\n path: joinPath(basePath, 'operations/operations-hub'),\n order: 2,\n },\n {\n id: 'assethandler-itil',\n label: 'ITIL',\n path: joinPath(basePath, 'itil/itilhub'),\n order: 3,\n },\n {\n id: 'assethandler-finance',\n label: 'Finance',\n path: joinPath(basePath, 'finance/finance-hub'),\n order: 4,\n },\n {\n id: 'assethandler-security',\n label: 'Security',\n path: joinPath(basePath, 'security/security-hub'),\n order: 7,\n },\n {\n id: 'assethandler-iot',\n label: 'IoT Devices',\n path: joinPath(basePath, 'advanced/iot-devices'),\n icon: <Cpu size={16} />,\n order: 10,\n },\n {\n id: 'assethandler-digital-twin',\n label: 'Digital Twin',\n path: joinPath(basePath, 'advanced/digital-twin'),\n icon: <Boxes size={16} />,\n order: 11,\n },\n {\n id: 'assethandler-sam',\n label: 'SAM',\n path: joinPath(basePath, 'advanced/sam-licenses'),\n icon: <KeyRound size={16} />,\n order: 12,\n },\n {\n id: 'assethandler-cmdb',\n label: 'CMDB',\n path: joinPath(basePath, 'advanced/cmdb-browser'),\n icon: <Network size={16} />,\n order: 13,\n },\n {\n id: 'assethandler-discovery',\n label: 'Discovery',\n path: joinPath(basePath, 'advanced/discovery-jobs'),\n icon: <Radar size={16} />,\n order: 14,\n },\n {\n id: 'assethandler-provenance',\n label: 'Provenance',\n path: joinPath(basePath, 'advanced/provenance'),\n icon: <ShieldCheck size={16} />,\n order: 15,\n },\n {\n id: 'assethandler-esg',\n label: 'ESG',\n path: joinPath(basePath, 'advanced/esg-dashboard'),\n icon: <Leaf size={16} />,\n order: 16,\n },\n {\n id: 'assethandler-ai',\n label: 'AI Predictions',\n path: joinPath(basePath, 'advanced/ai-predictions'),\n icon: <BrainCircuit size={16} />,\n order: 17,\n },\n ],\n };\n\n return registerNavItems(navItem);\n }, [basePath, registerNavItems]);\n\n useEffect(() => {\n if (!registerFooterItems) {\n return;\n }\n\n return registerFooterItems([\n {\n id: 'assethandler-status',\n label: 'AssetHandler Live',\n type: 'status',\n section: 'left',\n order: 10,\n },\n ]);\n }, [registerFooterItems]);\n\n return (\n <FeatureFlagProvider workspaceId={null} gateway=\"global\" defaultEnabled={true}>\n <AssetHandlerProvider {...props}>\n <AssetHandlerRoutes />\n </AssetHandlerProvider>\n </FeatureFlagProvider>\n );\n};\n"],"mappings":";;;;;;;;AAmBA,IAAa,KAA+C,MAAU;CACpE,IAAM,EAAE,qBAAkB,wBAAqB,cAAW,QAAQ;AAiIlE,QA/HA,QAAgB;AACT,QA2GL,QAAO,EAvGkB;GACvB,IAAI;GACJ,OAAO;GACP,MAAM;GACN,MAAM,kBAAC,GAAD,EAAO,MAAM,IAAM,CAAA;GACzB,OAAO;GACP,OAAO;GACP,UAAU;IACR;KACE,IAAI;KACJ,OAAO;KACP,MAAM;KACN,OAAO;KACR;IACD;KACE,IAAI;KACJ,OAAO;KACP,MAAM,EAAS,GAAU,oBAAoB;KAC7C,OAAO;KACR;IACD;KACE,IAAI;KACJ,OAAO;KACP,MAAM,EAAS,GAAU,4BAA4B;KACrD,OAAO;KACR;IACD;KACE,IAAI;KACJ,OAAO;KACP,MAAM,EAAS,GAAU,eAAe;KACxC,OAAO;KACR;IACD;KACE,IAAI;KACJ,OAAO;KACP,MAAM,EAAS,GAAU,sBAAsB;KAC/C,OAAO;KACR;IACD;KACE,IAAI;KACJ,OAAO;KACP,MAAM,EAAS,GAAU,wBAAwB;KACjD,OAAO;KACR;IACD;KACE,IAAI;KACJ,OAAO;KACP,MAAM,EAAS,GAAU,uBAAuB;KAChD,MAAM,kBAAC,GAAD,EAAK,MAAM,IAAM,CAAA;KACvB,OAAO;KACR;IACD;KACE,IAAI;KACJ,OAAO;KACP,MAAM,EAAS,GAAU,wBAAwB;KACjD,MAAM,kBAAC,GAAD,EAAO,MAAM,IAAM,CAAA;KACzB,OAAO;KACR;IACD;KACE,IAAI;KACJ,OAAO;KACP,MAAM,EAAS,GAAU,wBAAwB;KACjD,MAAM,kBAAC,GAAD,EAAU,MAAM,IAAM,CAAA;KAC5B,OAAO;KACR;IACD;KACE,IAAI;KACJ,OAAO;KACP,MAAM,EAAS,GAAU,wBAAwB;KACjD,MAAM,kBAAC,GAAD,EAAS,MAAM,IAAM,CAAA;KAC3B,OAAO;KACR;IACD;KACE,IAAI;KACJ,OAAO;KACP,MAAM,EAAS,GAAU,0BAA0B;KACnD,MAAM,kBAAC,GAAD,EAAO,MAAM,IAAM,CAAA;KACzB,OAAO;KACR;IACD;KACE,IAAI;KACJ,OAAO;KACP,MAAM,EAAS,GAAU,sBAAsB;KAC/C,MAAM,kBAAC,GAAD,EAAa,MAAM,IAAM,CAAA;KAC/B,OAAO;KACR;IACD;KACE,IAAI;KACJ,OAAO;KACP,MAAM,EAAS,GAAU,yBAAyB;KAClD,MAAM,kBAAC,GAAD,EAAM,MAAM,IAAM,CAAA;KACxB,OAAO;KACR;IACD;KACE,IAAI;KACJ,OAAO;KACP,MAAM,EAAS,GAAU,0BAA0B;KACnD,MAAM,kBAAC,GAAD,EAAc,MAAM,IAAM,CAAA;KAChC,OAAO;KACR;IACF;GACF,CAE+B;IAC/B,CAAC,GAAU,EAAiB,CAAC,EAEhC,QAAgB;AACT,QAIL,QAAO,EAAoB,CACzB;GACE,IAAI;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,OAAO;GACR,CACF,CAAC;IACD,CAAC,EAAoB,CAAC,EAGvB,kBAAC,GAAD;EAAqB,aAAa;EAAM,SAAQ;EAAS,gBAAgB;YACvE,kBAAC,GAAD;GAAsB,GAAI;aACxB,kBAAC,GAAD,EAAsB,CAAA;GACD,CAAA;EACH,CAAA"}
1
+ {"version":3,"file":"AssetHandlerRoot.js","names":[],"sources":["../../src/assethandler/AssetHandlerRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useEffect } from 'react';\nimport {\n BrainCircuit,\n Boxes,\n Cpu,\n KeyRound,\n Leaf,\n Network,\n Radar,\n ShieldCheck,\n} from 'lucide-react';\n\nimport { AssetHandlerRoutes } from './AssetHandlerRoutes';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { AssetHandlerProvider } from './providers/AssetHandlerProvider';\nimport type { AssetHandlerRootProps, NavItem } from './types';\nimport { joinPath } from './utils/navigation';\n\nexport const AssetHandlerRoot: FC<AssetHandlerRootProps> = (props) => {\n const {\n registerNavItems,\n registerFooterItems,\n basePath = '/',\n brandLabel = 'AssetHandler',\n terminology,\n hiddenCategoryIds,\n } = props;\n const assetsLabel = terminology?.assets || 'Assets';\n\n useEffect(() => {\n if (!registerNavItems) {\n return;\n }\n\n // Consumers can hide advanced (IT-specific) nav children by passing their\n // id with the \"assethandler-\" prefix stripped, e.g. \"digital-twin\".\n const hidden = new Set(hiddenCategoryIds ?? []);\n const isHidden = (id: string) => hidden.has(id.replace(/^assethandler-/, ''));\n\n const navItem: NavItem = {\n id: 'assethandler',\n label: brandLabel,\n path: basePath,\n icon: <Boxes size={20} />,\n order: 82,\n group: 'products',\n children: [\n {\n id: 'assethandler-dashboard',\n label: 'Dashboard',\n path: basePath,\n order: 0,\n },\n {\n id: 'assethandler-assets',\n label: assetsLabel,\n path: joinPath(basePath, 'assets/asset-list'),\n order: 1,\n },\n {\n id: 'assethandler-operations',\n label: 'Operations',\n path: joinPath(basePath, 'operations/operations-hub'),\n order: 2,\n },\n {\n id: 'assethandler-itil',\n label: 'ITIL',\n path: joinPath(basePath, 'itil/itilhub'),\n order: 3,\n },\n {\n id: 'assethandler-finance',\n label: 'Finance',\n path: joinPath(basePath, 'finance/finance-hub'),\n order: 4,\n },\n {\n id: 'assethandler-security',\n label: 'Security',\n path: joinPath(basePath, 'security/security-hub'),\n order: 7,\n },\n {\n id: 'assethandler-iot',\n label: 'IoT Devices',\n path: joinPath(basePath, 'advanced/iot-devices'),\n icon: <Cpu size={16} />,\n order: 10,\n },\n {\n id: 'assethandler-digital-twin',\n label: 'Digital Twin',\n path: joinPath(basePath, 'advanced/digital-twin'),\n icon: <Boxes size={16} />,\n order: 11,\n },\n {\n id: 'assethandler-sam',\n label: 'SAM',\n path: joinPath(basePath, 'advanced/sam-licenses'),\n icon: <KeyRound size={16} />,\n order: 12,\n },\n {\n id: 'assethandler-cmdb',\n label: 'CMDB',\n path: joinPath(basePath, 'advanced/cmdb-browser'),\n icon: <Network size={16} />,\n order: 13,\n },\n {\n id: 'assethandler-discovery',\n label: 'Discovery',\n path: joinPath(basePath, 'advanced/discovery-jobs'),\n icon: <Radar size={16} />,\n order: 14,\n },\n {\n id: 'assethandler-provenance',\n label: 'Provenance',\n path: joinPath(basePath, 'advanced/provenance'),\n icon: <ShieldCheck size={16} />,\n order: 15,\n },\n {\n id: 'assethandler-esg',\n label: 'ESG',\n path: joinPath(basePath, 'advanced/esg-dashboard'),\n icon: <Leaf size={16} />,\n order: 16,\n },\n {\n id: 'assethandler-ai',\n label: 'AI Predictions',\n path: joinPath(basePath, 'advanced/ai-predictions'),\n icon: <BrainCircuit size={16} />,\n order: 17,\n },\n ],\n };\n\n if (navItem.children) {\n navItem.children = navItem.children.filter((child) => !isHidden(child.id));\n }\n\n return registerNavItems(navItem);\n }, [basePath, registerNavItems, brandLabel, assetsLabel, hiddenCategoryIds]);\n\n useEffect(() => {\n if (!registerFooterItems) {\n return;\n }\n\n return registerFooterItems([\n {\n id: 'assethandler-status',\n label: `${brandLabel} Live`,\n type: 'status',\n section: 'left',\n order: 10,\n },\n ]);\n }, [registerFooterItems, brandLabel]);\n\n return (\n <FeatureFlagProvider workspaceId={null} gateway=\"global\" defaultEnabled={true}>\n <AssetHandlerProvider {...props}>\n <AssetHandlerRoutes />\n </AssetHandlerProvider>\n </FeatureFlagProvider>\n );\n};\n"],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"file":"AssetsAssetCategoriesPage.d.ts","sourceRoot":"","sources":["../../../src/assethandler/pages/AssetsAssetCategoriesPage.tsx"],"names":[],"mappings":"AAwGA,wBAAgB,yBAAyB,gCA8UxC"}
1
+ {"version":3,"file":"AssetsAssetCategoriesPage.d.ts","sourceRoot":"","sources":["../../../src/assethandler/pages/AssetsAssetCategoriesPage.tsx"],"names":[],"mappings":"AAyGA,wBAAgB,yBAAyB,gCAyVxC"}
@@ -1,26 +1,27 @@
1
1
  import { useAssetHandlerStore as e } from "../store/assethandlerStore.js";
2
- import { useAssetHandlerNavigate as t } from "../hooks/useAssetHandlerNavigate.js";
3
- import { notify as n } from "../utils/toast.js";
4
- import { formatCompact as r, formatCurrencyCompact as i } from "../components/charts/chartTheme.js";
5
- import { BarsChart as a } from "../components/charts/BarsChart.js";
6
- import { StatTile as o } from "../components/StatTile.js";
7
- import { ChartCard as s } from "../components/ChartCard.js";
2
+ import { useAssetTerminology as t, useHiddenCategoryIds as n } from "../providers/AssetHandlerProvider.js";
3
+ import { useAssetHandlerNavigate as r } from "../hooks/useAssetHandlerNavigate.js";
4
+ import { notify as i } from "../utils/toast.js";
5
+ import { formatCompact as a, formatCurrencyCompact as o } from "../components/charts/chartTheme.js";
6
+ import { BarsChart as s } from "../components/charts/BarsChart.js";
7
+ import { StatTile as c } from "../components/StatTile.js";
8
+ import { ChartCard as l } from "../components/ChartCard.js";
8
9
  import "../components/index.js";
9
- import { useMemo as c, useState as l } from "react";
10
- import { ArrowUpDown as u, Box as d, Code as f, Copy as p, ExternalLink as m, Layers as h, Monitor as g, MoreHorizontal as _, Server as v, Truck as y, Wifi as b, Wrench as x } from "lucide-react";
11
- import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
12
- import { Badge as T, Button as E, DropdownMenu as D, DropdownMenuContent as O, DropdownMenuItem as k, DropdownMenuTrigger as A, GlassCard as j, GradientText as M, IllustratedEmptyState as N, PagePurpose as P } from "@burdenoff/fe-libs/ui";
10
+ import { useMemo as u, useState as d } from "react";
11
+ import { ArrowUpDown as f, Box as p, Code as m, Copy as h, ExternalLink as g, Layers as _, Monitor as v, MoreHorizontal as y, Server as b, Truck as x, Wifi as S, Wrench as C } from "lucide-react";
12
+ import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
13
+ import { Badge as D, Button as O, DropdownMenu as k, DropdownMenuContent as A, DropdownMenuItem as j, DropdownMenuTrigger as M, GlassCard as N, GradientText as P, IllustratedEmptyState as F, PagePurpose as I } from "@burdenoff/fe-libs/ui";
13
14
  //#region src/assethandler/pages/AssetsAssetCategoriesPage.tsx
14
- var F = {
15
- electronics: /* @__PURE__ */ C(g, { className: "h-5 w-5" }),
16
- it_hardware: /* @__PURE__ */ C(g, { className: "h-5 w-5" }),
17
- furniture: /* @__PURE__ */ C(d, { className: "h-5 w-5" }),
18
- vehicles: /* @__PURE__ */ C(y, { className: "h-5 w-5" }),
19
- equipment: /* @__PURE__ */ C(x, { className: "h-5 w-5" }),
20
- software: /* @__PURE__ */ C(f, { className: "h-5 w-5" }),
21
- networking: /* @__PURE__ */ C(b, { className: "h-5 w-5" }),
22
- servers: /* @__PURE__ */ C(v, { className: "h-5 w-5" })
23
- }, I = {
15
+ var L = {
16
+ electronics: /* @__PURE__ */ T(v, { className: "h-5 w-5" }),
17
+ it_hardware: /* @__PURE__ */ T(v, { className: "h-5 w-5" }),
18
+ furniture: /* @__PURE__ */ T(p, { className: "h-5 w-5" }),
19
+ vehicles: /* @__PURE__ */ T(x, { className: "h-5 w-5" }),
20
+ equipment: /* @__PURE__ */ T(C, { className: "h-5 w-5" }),
21
+ software: /* @__PURE__ */ T(m, { className: "h-5 w-5" }),
22
+ networking: /* @__PURE__ */ T(S, { className: "h-5 w-5" }),
23
+ servers: /* @__PURE__ */ T(b, { className: "h-5 w-5" })
24
+ }, R = {
24
25
  electronics: "bg-status-info-bg-subtle text-status-info-text",
25
26
  it_hardware: "bg-status-info-bg-subtle text-status-info-text",
26
27
  furniture: "bg-status-warning-bg-subtle text-status-warning-text",
@@ -29,20 +30,20 @@ var F = {
29
30
  software: "bg-action-primary-bg/10 text-action-primary-bg",
30
31
  networking: "bg-status-info-bg-subtle text-status-info-text",
31
32
  servers: "bg-status-error-bg-subtle text-status-error-text"
32
- }, L = [
33
+ }, z = [
33
34
  "bg-status-info-bg-subtle text-status-info-text",
34
35
  "bg-status-success-bg-subtle text-status-success-text",
35
36
  "bg-status-warning-bg-subtle text-status-warning-text",
36
37
  "bg-status-error-bg-subtle text-status-error-text",
37
38
  "bg-action-primary-bg/10 text-action-primary-bg"
38
39
  ];
39
- function R(e) {
40
- if (I[e]) return I[e];
40
+ function B(e) {
41
+ if (R[e]) return R[e];
41
42
  let t = 0;
42
43
  for (let n = 0; n < e.length; n += 1) t = t * 31 + e.charCodeAt(n) >>> 0;
43
- return L[t % L.length];
44
+ return z[t % z.length];
44
45
  }
45
- var z = [
46
+ var V = [
46
47
  {
47
48
  key: "active",
48
49
  label: "Active",
@@ -68,17 +69,17 @@ var z = [
68
69
  label: "Disposed",
69
70
  varName: "var(--color-text-muted)"
70
71
  }
71
- ], B = {
72
+ ], H = {
72
73
  excellent: 5,
73
74
  good: 4,
74
75
  fair: 3,
75
76
  poor: 2,
76
77
  damaged: 1
77
- }, V = (e) => `$${e.toLocaleString()}`;
78
- function H() {
79
- let f = t(), { assets: g } = e(), [v, y] = l("count"), [b, x] = l("count"), I = c(() => {
78
+ }, U = (e) => `$${e.toLocaleString()}`;
79
+ function W() {
80
+ let m = r(), v = t(), b = n(), { assets: x } = e(), S = u(() => x.filter((e) => !b.has(e.category)), [x, b]), [C, R] = d("count"), [z, W] = d("count"), G = u(() => {
80
81
  let e = {};
81
- for (let t of g) {
82
+ for (let t of S) {
82
83
  e[t.category] || (e[t.category] = {
83
84
  key: t.category,
84
85
  count: 0,
@@ -93,165 +94,171 @@ function H() {
93
94
  for (let t of Object.values(e)) {
94
95
  let e = 0, n = 0;
95
96
  for (let [r, i] of Object.entries(t.conditions)) {
96
- let t = B[r];
97
+ let t = H[r];
97
98
  t && (e += t * i, n += i);
98
99
  }
99
100
  t.avgCondition = n > 0 ? e / n : 0;
100
101
  }
101
102
  return Object.values(e).sort((e, t) => t.count - e.count);
102
- }, [g]), L = g.length, H = c(() => g.reduce((e, t) => e + (t.currentValue ?? t.purchaseValue ?? 0), 0), [g]), U = c(() => I.map((e) => ({
103
+ }, [S]), K = S.length, q = u(() => S.reduce((e, t) => e + (t.currentValue ?? t.purchaseValue ?? 0), 0), [S]), J = u(() => G.map((e) => ({
103
104
  category: e.key.replace(/_/g, " "),
104
105
  count: e.count,
105
106
  value: e.totalValue
106
- })), [I]), W = c(() => [...I].sort((e, t) => b === "count" ? t.count - e.count : t.totalValue - e.totalValue), [I, b]), G = (e) => {
107
- navigator.clipboard?.writeText(e), n.success("Category copied", `"${e.replace(/_/g, " ")}" copied to clipboard.`);
107
+ })), [G]), Y = u(() => [...G].sort((e, t) => z === "count" ? t.count - e.count : t.totalValue - e.totalValue), [G, z]), X = (e) => {
108
+ navigator.clipboard?.writeText(e), i.success("Category copied", `"${e.replace(/_/g, " ")}" copied to clipboard.`);
108
109
  };
109
- return /* @__PURE__ */ w("div", {
110
+ return /* @__PURE__ */ E("div", {
110
111
  className: "space-y-6 p-4 sm:p-6",
111
112
  children: [
112
- /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("h1", {
113
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("h1", {
113
114
  className: "text-2xl font-bold",
114
- children: /* @__PURE__ */ C(M, { children: "Asset Categories" })
115
- }), /* @__PURE__ */ w("p", {
115
+ children: /* @__PURE__ */ E(P, { children: [v.asset, " Categories"] })
116
+ }), /* @__PURE__ */ E("p", {
116
117
  className: "text-sm text-text-secondary",
117
118
  children: [
118
- I.length,
119
+ G.length,
119
120
  " categories · ",
120
- L,
121
- " total assets"
121
+ K,
122
+ " total",
123
+ " ",
124
+ v.assets.toLowerCase()
122
125
  ]
123
126
  })] }),
124
- /* @__PURE__ */ C(P, { children: "Group and compare your assets by category to see where value and volume are concentrated. Each card rolls up how many assets you hold, their total book value and a proportional status mix — so you can plan procurement and replacements by category, not one asset at a time." }),
125
- I.length === 0 ? /* @__PURE__ */ C(N, {
127
+ /* @__PURE__ */ T(I, { children: "Group and compare your assets by category to see where value and volume are concentrated. Each card rolls up how many assets you hold, their total book value and a proportional status mix — so you can plan procurement and replacements by category, not one asset at a time." }),
128
+ G.length === 0 ? /* @__PURE__ */ T(F, {
126
129
  illustration: "empty-data",
127
130
  title: "No categories yet",
128
- description: "Add assets and they will be grouped into categories here automatically."
129
- }) : /* @__PURE__ */ w(S, { children: [
130
- /* @__PURE__ */ w("div", {
131
+ description: `Add ${v.assets.toLowerCase()} and they will be grouped into categories here automatically.`
132
+ }) : /* @__PURE__ */ E(w, { children: [
133
+ /* @__PURE__ */ E("div", {
131
134
  className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3",
132
135
  children: [
133
- /* @__PURE__ */ C(o, {
136
+ /* @__PURE__ */ T(c, {
134
137
  label: "Categories",
135
- value: I.length,
136
- format: r,
137
- icon: h,
138
+ value: G.length,
139
+ format: a,
140
+ icon: _,
138
141
  hero: !0
139
142
  }),
140
- /* @__PURE__ */ C(o, {
141
- label: "Assets tracked",
142
- value: L,
143
- format: r,
144
- icon: d
143
+ /* @__PURE__ */ T(c, {
144
+ label: `${v.assets} tracked`,
145
+ value: K,
146
+ format: a,
147
+ icon: p
145
148
  }),
146
- /* @__PURE__ */ C(o, {
149
+ /* @__PURE__ */ T(c, {
147
150
  label: "Total book value",
148
- value: H,
149
- format: i("USD"),
150
- icon: d
151
+ value: q,
152
+ format: o("USD"),
153
+ icon: p
151
154
  })
152
155
  ]
153
156
  }),
154
- /* @__PURE__ */ C("div", {
157
+ /* @__PURE__ */ T("div", {
155
158
  className: "grid gap-4 md:grid-cols-2 lg:grid-cols-3",
156
- children: I.map((e, t) => {
157
- let n = L > 0 ? Math.round(e.count / L * 100) : 0, r = z.filter((t) => (e.statuses[t.key] || 0) > 0);
158
- return /* @__PURE__ */ C(j, {
159
+ children: G.map((e, t) => {
160
+ let n = K > 0 ? Math.round(e.count / K * 100) : 0, r = V.filter((t) => (e.statuses[t.key] || 0) > 0);
161
+ return /* @__PURE__ */ T(N, {
159
162
  treatment: t === 0 ? "glass" : "plain",
160
163
  glow: t === 0,
161
164
  className: "border-border-seam",
162
- children: /* @__PURE__ */ w("div", {
165
+ children: /* @__PURE__ */ E("div", {
163
166
  className: "space-y-4 p-5",
164
167
  children: [
165
- /* @__PURE__ */ w("div", {
168
+ /* @__PURE__ */ E("div", {
166
169
  className: "flex items-start justify-between gap-2",
167
- children: [/* @__PURE__ */ w("div", {
170
+ children: [/* @__PURE__ */ E("div", {
168
171
  className: "flex min-w-0 items-center gap-3",
169
- children: [/* @__PURE__ */ C("div", {
170
- className: `shrink-0 rounded-lg p-2 ${R(e.key)}`,
171
- children: F[e.key] || /* @__PURE__ */ C(d, { className: "h-5 w-5" })
172
- }), /* @__PURE__ */ w("div", {
172
+ children: [/* @__PURE__ */ T("div", {
173
+ className: `shrink-0 rounded-lg p-2 ${B(e.key)}`,
174
+ children: L[e.key] || /* @__PURE__ */ T(p, { className: "h-5 w-5" })
175
+ }), /* @__PURE__ */ E("div", {
173
176
  className: "min-w-0",
174
- children: [/* @__PURE__ */ C("p", {
177
+ children: [/* @__PURE__ */ T("p", {
175
178
  className: "truncate text-base font-semibold capitalize",
176
179
  children: e.key.replace(/_/g, " ")
177
- }), /* @__PURE__ */ w(T, {
180
+ }), /* @__PURE__ */ E(D, {
178
181
  variant: "outline",
179
182
  className: "mt-0.5 text-xs",
180
183
  children: [n, "% of estate"]
181
184
  })]
182
185
  })]
183
- }), /* @__PURE__ */ w(D, { children: [/* @__PURE__ */ C(A, {
186
+ }), /* @__PURE__ */ E(k, { children: [/* @__PURE__ */ T(M, {
184
187
  asChild: !0,
185
- children: /* @__PURE__ */ C(E, {
188
+ children: /* @__PURE__ */ T(O, {
186
189
  variant: "ghost",
187
190
  size: "icon",
188
191
  className: "h-8 w-8 shrink-0",
189
192
  "aria-label": `Actions for ${e.key.replace(/_/g, " ")}`,
190
- children: /* @__PURE__ */ C(_, { className: "h-4 w-4" })
193
+ children: /* @__PURE__ */ T(y, { className: "h-4 w-4" })
191
194
  })
192
- }), /* @__PURE__ */ w(O, {
195
+ }), /* @__PURE__ */ E(A, {
193
196
  align: "end",
194
- children: [/* @__PURE__ */ w(k, {
195
- onClick: () => f("/assets/asset-list"),
196
- children: [/* @__PURE__ */ C(m, { className: "mr-2 h-4 w-4" }), "View assets"]
197
- }), /* @__PURE__ */ w(k, {
198
- onClick: () => G(e.key),
199
- children: [/* @__PURE__ */ C(p, { className: "mr-2 h-4 w-4" }), "Copy category ID"]
197
+ children: [/* @__PURE__ */ E(j, {
198
+ onClick: () => m("/assets/asset-list"),
199
+ children: [
200
+ /* @__PURE__ */ T(g, { className: "mr-2 h-4 w-4" }),
201
+ "View ",
202
+ v.assets.toLowerCase()
203
+ ]
204
+ }), /* @__PURE__ */ E(j, {
205
+ onClick: () => X(e.key),
206
+ children: [/* @__PURE__ */ T(h, { className: "mr-2 h-4 w-4" }), "Copy category ID"]
200
207
  })]
201
208
  })] })]
202
209
  }),
203
- /* @__PURE__ */ w("div", {
210
+ /* @__PURE__ */ E("div", {
204
211
  className: "flex flex-wrap items-end justify-between gap-3",
205
- children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
212
+ children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("p", {
206
213
  className: "text-xs text-text-secondary",
207
- children: "Asset count"
208
- }), /* @__PURE__ */ C("p", {
214
+ children: [v.asset, " count"]
215
+ }), /* @__PURE__ */ T("p", {
209
216
  className: "text-2xl font-bold tabular-nums",
210
217
  children: e.count
211
- })] }), /* @__PURE__ */ w("div", {
218
+ })] }), /* @__PURE__ */ E("div", {
212
219
  className: "text-right",
213
- children: [/* @__PURE__ */ C("p", {
220
+ children: [/* @__PURE__ */ T("p", {
214
221
  className: "text-xs text-text-secondary",
215
222
  children: "Total value"
216
- }), /* @__PURE__ */ C("p", {
223
+ }), /* @__PURE__ */ T("p", {
217
224
  className: "text-2xl font-bold tabular-nums",
218
- children: i("USD")(e.totalValue)
225
+ children: o("USD")(e.totalValue)
219
226
  })]
220
227
  })]
221
228
  }),
222
- /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("div", {
229
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("div", {
223
230
  className: "flex h-2.5 w-full overflow-hidden rounded-full bg-bg-sunken",
224
231
  role: "img",
225
232
  "aria-label": r.map((t) => `${t.label}: ${e.statuses[t.key]}`).join(", "),
226
- children: r.map((t) => /* @__PURE__ */ C("div", { style: {
233
+ children: r.map((t) => /* @__PURE__ */ T("div", { style: {
227
234
  width: `${(e.statuses[t.key] || 0) / e.count * 100}%`,
228
235
  backgroundColor: t.varName
229
236
  } }, t.key))
230
- }), /* @__PURE__ */ C("div", {
237
+ }), /* @__PURE__ */ T("div", {
231
238
  className: "mt-2 flex flex-wrap gap-x-3 gap-y-1",
232
- children: r.map((t) => /* @__PURE__ */ w("span", {
239
+ children: r.map((t) => /* @__PURE__ */ E("span", {
233
240
  className: "inline-flex items-center gap-1.5 text-xs text-text-secondary",
234
241
  children: [
235
- /* @__PURE__ */ C("span", {
242
+ /* @__PURE__ */ T("span", {
236
243
  className: "h-2.5 w-2.5 rounded-[3px]",
237
244
  style: { backgroundColor: t.varName }
238
245
  }),
239
246
  t.label,
240
- /* @__PURE__ */ C("span", {
247
+ /* @__PURE__ */ T("span", {
241
248
  className: "tabular-nums text-text-muted",
242
249
  children: e.statuses[t.key]
243
250
  })
244
251
  ]
245
252
  }, t.key))
246
253
  })] }),
247
- /* @__PURE__ */ w("div", {
254
+ /* @__PURE__ */ E("div", {
248
255
  className: "flex items-center justify-between border-t border-border-seam pt-3 text-sm",
249
- children: [/* @__PURE__ */ C("span", {
256
+ children: [/* @__PURE__ */ T("span", {
250
257
  className: "text-text-secondary",
251
258
  children: "Avg. condition"
252
- }), /* @__PURE__ */ w("span", {
259
+ }), /* @__PURE__ */ E("span", {
253
260
  className: "font-semibold tabular-nums",
254
- children: [e.avgCondition > 0 ? e.avgCondition.toFixed(1) : "—", /* @__PURE__ */ C("span", {
261
+ children: [e.avgCondition > 0 ? e.avgCondition.toFixed(1) : "—", /* @__PURE__ */ T("span", {
255
262
  className: "text-xs font-normal text-text-muted",
256
263
  children: " / 5"
257
264
  })]
@@ -262,92 +269,92 @@ function H() {
262
269
  }, e.key);
263
270
  })
264
271
  }),
265
- /* @__PURE__ */ C(s, {
272
+ /* @__PURE__ */ T(l, {
266
273
  title: "Category comparison",
267
- subtitle: v === "count" ? "Assets per category" : "Book value per category",
268
- actions: /* @__PURE__ */ w("div", {
274
+ subtitle: C === "count" ? `${v.assets} per category` : "Book value per category",
275
+ actions: /* @__PURE__ */ E("div", {
269
276
  className: "flex gap-1 rounded-md border border-border-seam p-0.5",
270
- children: [/* @__PURE__ */ C(E, {
271
- variant: v === "count" ? "default" : "ghost",
277
+ children: [/* @__PURE__ */ T(O, {
278
+ variant: C === "count" ? "default" : "ghost",
272
279
  size: "sm",
273
280
  className: "h-7 px-2 text-xs",
274
- onClick: () => y("count"),
281
+ onClick: () => R("count"),
275
282
  children: "Count"
276
- }), /* @__PURE__ */ C(E, {
277
- variant: v === "value" ? "default" : "ghost",
283
+ }), /* @__PURE__ */ T(O, {
284
+ variant: C === "value" ? "default" : "ghost",
278
285
  size: "sm",
279
286
  className: "h-7 px-2 text-xs",
280
- onClick: () => y("value"),
287
+ onClick: () => R("value"),
281
288
  children: "Value"
282
289
  })]
283
290
  }),
284
- children: /* @__PURE__ */ C(a, {
285
- data: U,
291
+ children: /* @__PURE__ */ T(s, {
292
+ data: J,
286
293
  xKey: "category",
287
294
  orientation: "horizontal",
288
- height: Math.max(200, U.length * 44),
295
+ height: Math.max(200, J.length * 44),
289
296
  categoryWidth: 120,
290
- valueFormat: v === "value" ? i("USD") : r,
297
+ valueFormat: C === "value" ? o("USD") : a,
291
298
  series: [{
292
- key: v,
293
- label: v === "count" ? "Assets" : "Book value"
299
+ key: C,
300
+ label: C === "count" ? v.assets : "Book value"
294
301
  }]
295
302
  })
296
303
  }),
297
- /* @__PURE__ */ C(s, {
304
+ /* @__PURE__ */ T(l, {
298
305
  title: "Category summary",
299
306
  subtitle: "Sortable roll-up across every category",
300
- icon: h,
301
- children: /* @__PURE__ */ C("div", {
307
+ icon: _,
308
+ children: /* @__PURE__ */ T("div", {
302
309
  className: "overflow-x-auto",
303
- children: /* @__PURE__ */ w("table", {
310
+ children: /* @__PURE__ */ E("table", {
304
311
  className: "w-full min-w-[520px] text-sm",
305
- children: [/* @__PURE__ */ C("thead", { children: /* @__PURE__ */ w("tr", {
312
+ children: [/* @__PURE__ */ T("thead", { children: /* @__PURE__ */ E("tr", {
306
313
  className: "border-b border-border-seam text-left text-text-secondary",
307
314
  children: [
308
- /* @__PURE__ */ C("th", {
315
+ /* @__PURE__ */ T("th", {
309
316
  className: "py-2 pr-4 font-medium",
310
317
  children: "Category"
311
318
  }),
312
- /* @__PURE__ */ C("th", {
319
+ /* @__PURE__ */ T("th", {
313
320
  className: "py-2 pr-4 font-medium",
314
- children: /* @__PURE__ */ w("button", {
321
+ children: /* @__PURE__ */ E("button", {
315
322
  type: "button",
316
323
  className: "inline-flex items-center gap-1 hover:text-text-primary",
317
- onClick: () => x("count"),
318
- children: ["Count", /* @__PURE__ */ C(u, { className: `h-3 w-3 ${b === "count" ? "text-action-primary-bg" : ""}` })]
324
+ onClick: () => W("count"),
325
+ children: ["Count", /* @__PURE__ */ T(f, { className: `h-3 w-3 ${z === "count" ? "text-action-primary-bg" : ""}` })]
319
326
  })
320
327
  }),
321
- /* @__PURE__ */ C("th", {
328
+ /* @__PURE__ */ T("th", {
322
329
  className: "py-2 pr-4 font-medium",
323
- children: /* @__PURE__ */ w("button", {
330
+ children: /* @__PURE__ */ E("button", {
324
331
  type: "button",
325
332
  className: "inline-flex items-center gap-1 hover:text-text-primary",
326
- onClick: () => x("value"),
327
- children: ["Value", /* @__PURE__ */ C(u, { className: `h-3 w-3 ${b === "value" ? "text-action-primary-bg" : ""}` })]
333
+ onClick: () => W("value"),
334
+ children: ["Value", /* @__PURE__ */ T(f, { className: `h-3 w-3 ${z === "value" ? "text-action-primary-bg" : ""}` })]
328
335
  })
329
336
  }),
330
- /* @__PURE__ */ C("th", {
337
+ /* @__PURE__ */ T("th", {
331
338
  className: "py-2 font-medium",
332
339
  children: "Avg. condition"
333
340
  })
334
341
  ]
335
- }) }), /* @__PURE__ */ C("tbody", { children: W.map((e) => /* @__PURE__ */ w("tr", {
342
+ }) }), /* @__PURE__ */ T("tbody", { children: Y.map((e) => /* @__PURE__ */ E("tr", {
336
343
  className: "border-b border-border-seam/60 last:border-0",
337
344
  children: [
338
- /* @__PURE__ */ C("td", {
345
+ /* @__PURE__ */ T("td", {
339
346
  className: "py-2.5 pr-4 font-medium capitalize",
340
347
  children: e.key.replace(/_/g, " ")
341
348
  }),
342
- /* @__PURE__ */ C("td", {
349
+ /* @__PURE__ */ T("td", {
343
350
  className: "py-2.5 pr-4 tabular-nums",
344
351
  children: e.count
345
352
  }),
346
- /* @__PURE__ */ C("td", {
353
+ /* @__PURE__ */ T("td", {
347
354
  className: "py-2.5 pr-4 tabular-nums",
348
- children: V(e.totalValue)
355
+ children: U(e.totalValue)
349
356
  }),
350
- /* @__PURE__ */ C("td", {
357
+ /* @__PURE__ */ T("td", {
351
358
  className: "py-2.5 tabular-nums",
352
359
  children: e.avgCondition > 0 ? e.avgCondition.toFixed(1) : "—"
353
360
  })
@@ -361,6 +368,6 @@ function H() {
361
368
  });
362
369
  }
363
370
  //#endregion
364
- export { H as AssetsAssetCategoriesPage };
371
+ export { W as AssetsAssetCategoriesPage };
365
372
 
366
373
  //# sourceMappingURL=AssetsAssetCategoriesPage.js.map