@burdenoff/microfe-assethandler 2026.827.1 → 2026.830.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;
|
|
1
|
+
{"version":3,"file":"AssetHandlerRoot.d.ts","sourceRoot":"","sources":["../../src/assethandler/AssetHandlerRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAmBhC,OAAO,KAAK,EAAE,qBAAqB,EAAW,MAAM,SAAS,CAAC;AAG9D,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CA+KtD,CAAC"}
|
|
@@ -2,156 +2,163 @@ import { AssetHandlerProvider as e } from "./providers/AssetHandlerProvider.js";
|
|
|
2
2
|
import { joinPath as t } from "./utils/navigation.js";
|
|
3
3
|
import { AssetHandlerRoutes as n } from "./AssetHandlerRoutes.js";
|
|
4
4
|
import { useEffect as r } from "react";
|
|
5
|
-
import { BellRing as i,
|
|
6
|
-
import { jsx as
|
|
7
|
-
import { FeatureFlagProvider as
|
|
5
|
+
import { BellRing as i, BookOpen as a, Boxes as o, BrainCircuit as s, Cpu as c, KeyRound as l, Leaf as u, Network as d, Radar as f, ScanLine as p, ShieldCheck as m } from "lucide-react";
|
|
6
|
+
import { jsx as h } from "react/jsx-runtime";
|
|
7
|
+
import { FeatureFlagProvider as g } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
8
8
|
//#region src/assethandler/AssetHandlerRoot.tsx
|
|
9
|
-
var
|
|
10
|
-
let { registerNavItems:
|
|
9
|
+
var _ = (_) => {
|
|
10
|
+
let { registerNavItems: v, registerFooterItems: y, basePath: b = "/", brandLabel: x = "AssetHandler", terminology: S, hiddenCategoryIds: C } = _, w = S?.assets || "Assets";
|
|
11
11
|
return r(() => {
|
|
12
|
-
if (!
|
|
13
|
-
let e = new Set(
|
|
12
|
+
if (!v) return;
|
|
13
|
+
let e = new Set(C ?? []), n = (t) => e.has(t.replace(/^assethandler-/, "")), r = {
|
|
14
14
|
id: "assethandler",
|
|
15
|
-
label:
|
|
16
|
-
path:
|
|
17
|
-
icon: /* @__PURE__ */
|
|
15
|
+
label: x,
|
|
16
|
+
path: b,
|
|
17
|
+
icon: /* @__PURE__ */ h(o, { size: 20 }),
|
|
18
18
|
order: 82,
|
|
19
19
|
group: "products",
|
|
20
20
|
children: [
|
|
21
21
|
{
|
|
22
22
|
id: "assethandler-dashboard",
|
|
23
23
|
label: "Dashboard",
|
|
24
|
-
path:
|
|
24
|
+
path: b,
|
|
25
25
|
order: 0
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
id: "assethandler-assets",
|
|
29
|
-
label:
|
|
30
|
-
path: t(
|
|
29
|
+
label: w,
|
|
30
|
+
path: t(b, "assets/asset-list"),
|
|
31
31
|
order: 1
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
id: "assethandler-physical-audits",
|
|
35
35
|
label: "Physical Audits",
|
|
36
|
-
path: t(
|
|
37
|
-
icon: /* @__PURE__ */
|
|
36
|
+
path: t(b, "assets/physical-audits"),
|
|
37
|
+
icon: /* @__PURE__ */ h(p, { size: 16 }),
|
|
38
38
|
order: 2
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
id: "assethandler-operations",
|
|
42
42
|
label: "Operations",
|
|
43
|
-
path: t(
|
|
43
|
+
path: t(b, "operations/operations-hub"),
|
|
44
44
|
order: 3
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
id: "assethandler-itil",
|
|
48
48
|
label: "ITIL",
|
|
49
|
-
path: t(
|
|
49
|
+
path: t(b, "itil/itilhub"),
|
|
50
50
|
order: 3
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
id: "assethandler-finance",
|
|
54
54
|
label: "Finance",
|
|
55
|
-
path: t(
|
|
55
|
+
path: t(b, "finance/finance-hub"),
|
|
56
56
|
order: 4
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
id: "assethandler-deadline-alerts",
|
|
60
60
|
label: "Deadline Alerts",
|
|
61
|
-
path: t(
|
|
62
|
-
icon: /* @__PURE__ */
|
|
61
|
+
path: t(b, "analytics/deadline-alerts"),
|
|
62
|
+
icon: /* @__PURE__ */ h(i, { size: 16 }),
|
|
63
63
|
order: 5
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
id: "assethandler-security",
|
|
67
67
|
label: "Security",
|
|
68
|
-
path: t(
|
|
68
|
+
path: t(b, "security/security-hub"),
|
|
69
69
|
order: 7
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
72
|
id: "assethandler-iot",
|
|
73
73
|
label: "IoT Devices",
|
|
74
|
-
path: t(
|
|
75
|
-
icon: /* @__PURE__ */
|
|
74
|
+
path: t(b, "advanced/iot-devices"),
|
|
75
|
+
icon: /* @__PURE__ */ h(c, { size: 16 }),
|
|
76
76
|
order: 10
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
79
|
id: "assethandler-digital-twin",
|
|
80
80
|
label: "Digital Twin",
|
|
81
|
-
path: t(
|
|
82
|
-
icon: /* @__PURE__ */
|
|
81
|
+
path: t(b, "advanced/digital-twin"),
|
|
82
|
+
icon: /* @__PURE__ */ h(o, { size: 16 }),
|
|
83
83
|
order: 11
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
86
|
id: "assethandler-sam",
|
|
87
87
|
label: "SAM",
|
|
88
|
-
path: t(
|
|
89
|
-
icon: /* @__PURE__ */
|
|
88
|
+
path: t(b, "advanced/sam-licenses"),
|
|
89
|
+
icon: /* @__PURE__ */ h(l, { size: 16 }),
|
|
90
90
|
order: 12
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
93
|
id: "assethandler-cmdb",
|
|
94
94
|
label: "CMDB",
|
|
95
|
-
path: t(
|
|
96
|
-
icon: /* @__PURE__ */
|
|
95
|
+
path: t(b, "advanced/cmdb-browser"),
|
|
96
|
+
icon: /* @__PURE__ */ h(d, { size: 16 }),
|
|
97
97
|
order: 13
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
id: "assethandler-discovery",
|
|
101
101
|
label: "Discovery",
|
|
102
|
-
path: t(
|
|
103
|
-
icon: /* @__PURE__ */
|
|
102
|
+
path: t(b, "advanced/discovery-jobs"),
|
|
103
|
+
icon: /* @__PURE__ */ h(f, { size: 16 }),
|
|
104
104
|
order: 14
|
|
105
105
|
},
|
|
106
106
|
{
|
|
107
107
|
id: "assethandler-provenance",
|
|
108
108
|
label: "Provenance",
|
|
109
|
-
path: t(
|
|
110
|
-
icon: /* @__PURE__ */ m
|
|
109
|
+
path: t(b, "advanced/provenance"),
|
|
110
|
+
icon: /* @__PURE__ */ h(m, { size: 16 }),
|
|
111
111
|
order: 15
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
114
|
id: "assethandler-esg",
|
|
115
115
|
label: "ESG",
|
|
116
|
-
path: t(
|
|
117
|
-
icon: /* @__PURE__ */
|
|
116
|
+
path: t(b, "advanced/esg-dashboard"),
|
|
117
|
+
icon: /* @__PURE__ */ h(u, { size: 16 }),
|
|
118
118
|
order: 16
|
|
119
119
|
},
|
|
120
|
+
{
|
|
121
|
+
id: "assethandler-knowledge-base",
|
|
122
|
+
label: "Knowledge Base",
|
|
123
|
+
path: t(b, "advanced/knowledge-base"),
|
|
124
|
+
icon: /* @__PURE__ */ h(a, { size: 16 }),
|
|
125
|
+
order: 17
|
|
126
|
+
},
|
|
120
127
|
{
|
|
121
128
|
id: "assethandler-ai",
|
|
122
129
|
label: "AI Predictions",
|
|
123
|
-
path: t(
|
|
124
|
-
icon: /* @__PURE__ */
|
|
125
|
-
order:
|
|
130
|
+
path: t(b, "advanced/ai-predictions"),
|
|
131
|
+
icon: /* @__PURE__ */ h(s, { size: 16 }),
|
|
132
|
+
order: 18
|
|
126
133
|
}
|
|
127
134
|
]
|
|
128
135
|
};
|
|
129
|
-
return r.children &&= r.children.filter((e) => !n(e.id)),
|
|
136
|
+
return r.children &&= r.children.filter((e) => !n(e.id)), v(r);
|
|
130
137
|
}, [
|
|
131
|
-
y,
|
|
132
|
-
_,
|
|
133
138
|
b,
|
|
134
|
-
|
|
135
|
-
|
|
139
|
+
v,
|
|
140
|
+
x,
|
|
141
|
+
w,
|
|
142
|
+
C
|
|
136
143
|
]), r(() => {
|
|
137
|
-
if (
|
|
144
|
+
if (y) return y([{
|
|
138
145
|
id: "assethandler-status",
|
|
139
|
-
label: `${
|
|
146
|
+
label: `${x} Live`,
|
|
140
147
|
type: "status",
|
|
141
148
|
section: "left",
|
|
142
149
|
order: 10
|
|
143
150
|
}]);
|
|
144
|
-
}, [
|
|
151
|
+
}, [y, x]), /* @__PURE__ */ h(g, {
|
|
145
152
|
workspaceId: null,
|
|
146
153
|
gateway: "global",
|
|
147
154
|
defaultEnabled: !0,
|
|
148
|
-
children: /* @__PURE__ */
|
|
149
|
-
...
|
|
150
|
-
children: /* @__PURE__ */
|
|
155
|
+
children: /* @__PURE__ */ h(e, {
|
|
156
|
+
..._,
|
|
157
|
+
children: /* @__PURE__ */ h(n, {})
|
|
151
158
|
})
|
|
152
159
|
});
|
|
153
160
|
};
|
|
154
161
|
//#endregion
|
|
155
|
-
export {
|
|
162
|
+
export { _ as AssetHandlerRoot };
|
|
156
163
|
|
|
157
164
|
//# sourceMappingURL=AssetHandlerRoot.js.map
|
|
@@ -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 BellRing,\n Boxes,\n Cpu,\n KeyRound,\n Leaf,\n Network,\n Radar,\n ScanLine,\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-physical-audits',\n label: 'Physical Audits',\n path: joinPath(basePath, 'assets/physical-audits'),\n icon: <ScanLine size={16} />,\n order: 2,\n },\n {\n id: 'assethandler-operations',\n label: 'Operations',\n path: joinPath(basePath, 'operations/operations-hub'),\n order: 3,\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-deadline-alerts',\n label: 'Deadline Alerts',\n path: joinPath(basePath, 'analytics/deadline-alerts'),\n icon: <BellRing size={16} />,\n order: 5,\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:
|
|
1
|
+
{"version":3,"file":"AssetHandlerRoot.js","names":[],"sources":["../../src/assethandler/AssetHandlerRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useEffect } from 'react';\nimport {\n BookOpen,\n BrainCircuit,\n BellRing,\n Boxes,\n Cpu,\n KeyRound,\n Leaf,\n Network,\n Radar,\n ScanLine,\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-physical-audits',\n label: 'Physical Audits',\n path: joinPath(basePath, 'assets/physical-audits'),\n icon: <ScanLine size={16} />,\n order: 2,\n },\n {\n id: 'assethandler-operations',\n label: 'Operations',\n path: joinPath(basePath, 'operations/operations-hub'),\n order: 3,\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-deadline-alerts',\n label: 'Deadline Alerts',\n path: joinPath(basePath, 'analytics/deadline-alerts'),\n icon: <BellRing size={16} />,\n order: 5,\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-knowledge-base',\n label: 'Knowledge Base',\n path: joinPath(basePath, 'advanced/knowledge-base'),\n icon: <BookOpen size={16} />,\n order: 17,\n },\n {\n id: 'assethandler-ai',\n label: 'AI Predictions',\n path: joinPath(basePath, 'advanced/ai-predictions'),\n icon: <BrainCircuit size={16} />,\n order: 18,\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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J,OAAO,GAAG,EAAW;GACrB,MAAM;GACN,SAAS;GACT,OAAO;EACT,CACF,CAAC;CACH,GAAG,CAAC,GAAqB,CAAU,CAAC,GAGlC,kBAAC,GAAD;EAAqB,aAAa;EAAM,SAAQ;EAAS,gBAAgB;YACvE,kBAAC,GAAD;GAAsB,GAAI;aACxB,kBAAC,GAAD,CAAqB,CAAA;EACD,CAAA;CACH,CAAA;AAEzB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useTr — translation hook with fallback semantics.
|
|
3
|
+
*
|
|
4
|
+
* Wraps `useI18n().t()` so that when a key has no translation (i.e. the
|
|
5
|
+
* provider returns the key itself), the caller's English fallback is used
|
|
6
|
+
* instead. This keeps consumer call sites consistent and avoids leaking
|
|
7
|
+
* untranslated keys into the UI.
|
|
8
|
+
*
|
|
9
|
+
* Supports optional interpolation params using `{{key}}` placeholders.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* const tr = useTr();
|
|
13
|
+
* return <h1>{tr('assethandler.dashboard.title', 'Dashboard')}</h1>;
|
|
14
|
+
* return <p>{tr('assethandler.delete.confirm', 'Delete {{count}} items?', { count: 5 })}</p>;
|
|
15
|
+
*/
|
|
16
|
+
export declare function useTr(): (key: string, fallback: string, params?: Record<string, string | number>) => string;
|
|
17
|
+
//# sourceMappingURL=useTr.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTr.d.ts","sourceRoot":"","sources":["../../../src/assethandler/hooks/useTr.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,KAAK,IAAI,CACvB,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KACrC,MAAM,CAcV"}
|