@burdenoff/microfe-security 2026.828.1 → 2026.830.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -1
- package/dist/security/SecurityAdminRoot.js +9 -8
- package/dist/security/SecurityAdminRoot.js.map +1 -1
- package/dist/security/SecurityRoot.js +9 -8
- package/dist/security/SecurityRoot.js.map +1 -1
- package/dist/security/SecurityRootBase.js +35 -33
- package/dist/security/SecurityRootBase.js.map +1 -1
- package/dist/security/SecurityUserRoot.js +9 -8
- package/dist/security/SecurityUserRoot.js.map +1 -1
- package/dist/security/components/ActivityTimeline.js +83 -66
- package/dist/security/components/ActivityTimeline.js.map +1 -1
- package/dist/security/components/BulkActionBar.js +40 -41
- package/dist/security/components/BulkActionBar.js.map +1 -1
- package/dist/security/components/ConfirmDialog.js +37 -33
- package/dist/security/components/ConfirmDialog.js.map +1 -1
- package/dist/security/components/CopyButton.js +29 -28
- package/dist/security/components/CopyButton.js.map +1 -1
- package/dist/security/components/ExportDialog.js +81 -80
- package/dist/security/components/ExportDialog.js.map +1 -1
- package/dist/security/components/ImportWizard.js +122 -125
- package/dist/security/components/ImportWizard.js.map +1 -1
- package/dist/security/components/PasswordGenerator.js +71 -66
- package/dist/security/components/PasswordGenerator.js.map +1 -1
- package/dist/security/components/RotationStatusBadge.js +18 -17
- package/dist/security/components/RotationStatusBadge.js.map +1 -1
- package/dist/security/components/SecretFormFields.js +143 -134
- package/dist/security/components/SecretFormFields.js.map +1 -1
- package/dist/security/components/SecretRow.js +30 -31
- package/dist/security/components/SecretRow.js.map +1 -1
- package/dist/security/components/SecretShareDialog.js +208 -195
- package/dist/security/components/SecretShareDialog.js.map +1 -1
- package/dist/security/components/SecretValueDisplay.js +45 -44
- package/dist/security/components/SecretValueDisplay.js.map +1 -1
- package/dist/security/components/SecurityPermissionGuard.js +8 -9
- package/dist/security/components/SecurityPermissionGuard.js.map +1 -1
- package/dist/security/components/SecurityScoreCard.js +42 -37
- package/dist/security/components/SecurityScoreCard.js.map +1 -1
- package/dist/security/components/VaultCard.js +32 -33
- package/dist/security/components/VaultCard.js.map +1 -1
- package/dist/security/components/VaultFormFields.js +101 -97
- package/dist/security/components/VaultFormFields.js.map +1 -1
- package/dist/security/components/VaultShareDialog.js +40 -42
- package/dist/security/components/VaultShareDialog.js.map +1 -1
- package/dist/security/config/navigation.js +20 -20
- package/dist/security/config/navigation.js.map +1 -1
- package/dist/security/constants/providers.js +10 -5
- package/dist/security/constants/providers.js.map +1 -1
- package/dist/security/constants/secretTypes.js +16 -8
- package/dist/security/constants/secretTypes.js.map +1 -1
- package/dist/security/hooks/useTr.js +14 -0
- package/dist/security/hooks/useTr.js.map +1 -0
- package/dist/security/index.js +1 -0
- package/dist/security/pages/AccessReviewPage.js +85 -84
- package/dist/security/pages/AccessReviewPage.js.map +1 -1
- package/dist/security/pages/AuditLogPage.js +98 -97
- package/dist/security/pages/AuditLogPage.js.map +1 -1
- package/dist/security/pages/ImportExportPage.js +21 -22
- package/dist/security/pages/ImportExportPage.js.map +1 -1
- package/dist/security/pages/ProviderDetailPage.js +164 -155
- package/dist/security/pages/ProviderDetailPage.js.map +1 -1
- package/dist/security/pages/ProvidersPage.js +89 -92
- package/dist/security/pages/ProvidersPage.js.map +1 -1
- package/dist/security/pages/SecretCreatePage.js +70 -71
- package/dist/security/pages/SecretCreatePage.js.map +1 -1
- package/dist/security/pages/SecretDetailPage.js +250 -251
- package/dist/security/pages/SecretDetailPage.js.map +1 -1
- package/dist/security/pages/SecurityDashboardPage.js +53 -54
- package/dist/security/pages/SecurityDashboardPage.js.map +1 -1
- package/dist/security/pages/SharedWithMePage.js +27 -28
- package/dist/security/pages/SharedWithMePage.js.map +1 -1
- package/dist/security/pages/VaultCreatePage.js +49 -50
- package/dist/security/pages/VaultCreatePage.js.map +1 -1
- package/dist/security/pages/VaultDetailPage.js +130 -131
- package/dist/security/pages/VaultDetailPage.js.map +1 -1
- package/dist/security/pages/VaultLandingPage.js +39 -38
- package/dist/security/pages/VaultLandingPage.js.map +1 -1
- package/dist/security/pages/VaultSettingsPage.js +198 -199
- package/dist/security/pages/VaultSettingsPage.js.map +1 -1
- package/dist/security/pages/VaultShareViewer.js +78 -80
- package/dist/security/pages/VaultShareViewer.js.map +1 -1
- package/dist/security/pages/VaultsDashboardPage.js +97 -98
- package/dist/security/pages/VaultsDashboardPage.js.map +1 -1
- package/dist/security/translations/en.js +756 -0
- package/dist/security/translations/en.js.map +1 -0
- package/package.json +1 -1
- package/dist/security/utils/i18n.js +0 -9
- package/dist/security/utils/i18n.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -4,5 +4,6 @@ import { SecurityRoot as n } from "./security/SecurityRoot.js";
|
|
|
4
4
|
import { SecurityUserRoot as r } from "./security/SecurityUserRoot.js";
|
|
5
5
|
import { SecurityAdminRoot as i } from "./security/SecurityAdminRoot.js";
|
|
6
6
|
import { VaultShareViewer as a } from "./security/pages/VaultShareViewer.js";
|
|
7
|
+
import { securityEnTranslations as o } from "./security/translations/en.js";
|
|
7
8
|
import "./security/index.js";
|
|
8
|
-
export { i as SecurityAdminRoot, n as SecurityRoot, r as SecurityUserRoot, a as VaultShareViewer, e as useSecurity, t as useSecurityStore };
|
|
9
|
+
export { i as SecurityAdminRoot, n as SecurityRoot, r as SecurityUserRoot, a as VaultShareViewer, o as securityEnTranslations, e as useSecurity, t as useSecurityStore };
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { useTr as e } from "./hooks/useTr.js";
|
|
2
|
+
import { SecurityRootBase as t } from "./SecurityRootBase.js";
|
|
3
|
+
import { SecurityAdminRoutes as n } from "./routes/SecurityAdminRoutes.js";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
4
5
|
//#region src/security/SecurityAdminRoot.tsx
|
|
5
|
-
var
|
|
6
|
+
var i = /* @__PURE__ */ r(n, {}), a = (n) => /* @__PURE__ */ r(t, {
|
|
6
7
|
mode: "admin",
|
|
7
|
-
routes:
|
|
8
|
-
footerLabel: "Security Admin",
|
|
9
|
-
...
|
|
8
|
+
routes: i,
|
|
9
|
+
footerLabel: e()("security.footer.statusAdmin", "Security Admin"),
|
|
10
|
+
...n
|
|
10
11
|
});
|
|
11
12
|
//#endregion
|
|
12
|
-
export {
|
|
13
|
+
export { a as SecurityAdminRoot };
|
|
13
14
|
|
|
14
15
|
//# sourceMappingURL=SecurityAdminRoot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecurityAdminRoot.js","names":[],"sources":["../../src/security/SecurityAdminRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport type { SecurityAdminRootProps } from './types';\nimport { SecurityRootBase } from './SecurityRootBase';\nimport { SecurityAdminRoutes } from './routes/SecurityAdminRoutes';\n\nconst routesElement = <SecurityAdminRoutes />;\n\n/**\n * Admin-facing root component for the Security microfrontend.\n *\n * Renders governance/oversight pages (audit, dashboard, access review,\n * providers, import/export) plus vault management for administrative inspection.\n * Used by admin-app.\n *\n * @example\n * ```tsx\n * import { SecurityAdminRoot } from '@burdenoff/micro-fe/security';\n *\n * <SecurityAdminRoot basePath=\"/security\" {...contentMfeProps} />\n * ```\n */\nexport const SecurityAdminRoot: FC<SecurityAdminRootProps> = (props) => (\n
|
|
1
|
+
{"version":3,"file":"SecurityAdminRoot.js","names":[],"sources":["../../src/security/SecurityAdminRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useTr } from './hooks/useTr';\nimport type { SecurityAdminRootProps } from './types';\nimport { SecurityRootBase } from './SecurityRootBase';\nimport { SecurityAdminRoutes } from './routes/SecurityAdminRoutes';\n\nconst routesElement = <SecurityAdminRoutes />;\n\n/**\n * Admin-facing root component for the Security microfrontend.\n *\n * Renders governance/oversight pages (audit, dashboard, access review,\n * providers, import/export) plus vault management for administrative inspection.\n * Used by admin-app.\n *\n * @example\n * ```tsx\n * import { SecurityAdminRoot } from '@burdenoff/micro-fe/security';\n *\n * <SecurityAdminRoot basePath=\"/security\" {...contentMfeProps} />\n * ```\n */\nexport const SecurityAdminRoot: FC<SecurityAdminRootProps> = (props) => {\n const tr = useTr();\n return (\n <SecurityRootBase\n mode=\"admin\"\n routes={routesElement}\n footerLabel={tr('security.footer.statusAdmin', 'Security Admin')}\n {...props}\n />\n );\n};\n"],"mappings":";;;;;AAMA,IAAM,IAAgB,kBAAC,GAAD,EAAuB,CAAA,EAgBhC,KAAiD,MAG1D,kBAAC,GAAD;CACE,MAAK;CACL,QAAQ;CACR,aALO,GAAO,CAKE,+BAA+B,iBAAiB;CAChE,GAAI;CACJ,CAAA"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { useTr as e } from "./hooks/useTr.js";
|
|
2
|
+
import { SecurityRootBase as t } from "./SecurityRootBase.js";
|
|
3
|
+
import { SecurityRoutes as n } from "./routes/SecurityRoutes.js";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
4
5
|
//#region src/security/SecurityRoot.tsx
|
|
5
|
-
var
|
|
6
|
+
var i = /* @__PURE__ */ r(n, {}), a = (n) => /* @__PURE__ */ r(t, {
|
|
6
7
|
mode: "all",
|
|
7
|
-
routes:
|
|
8
|
-
footerLabel: "Security Ready",
|
|
9
|
-
...
|
|
8
|
+
routes: i,
|
|
9
|
+
footerLabel: e()("security.footer.statusReady", "Security Ready"),
|
|
10
|
+
...n
|
|
10
11
|
});
|
|
11
12
|
//#endregion
|
|
12
|
-
export {
|
|
13
|
+
export { a as SecurityRoot };
|
|
13
14
|
|
|
14
15
|
//# sourceMappingURL=SecurityRoot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecurityRoot.js","names":[],"sources":["../../src/security/SecurityRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport type { SecurityRootProps } from './types';\nimport { SecurityRootBase } from './SecurityRootBase';\nimport { SecurityRoutes } from './routes/SecurityRoutes';\n\nconst routesElement = <SecurityRoutes />;\n\n/**\n * Root component for the Security microfrontend (backward-compatible, all routes).\n *\n * Renders all pages (user operational + admin governance).\n * Kept for backward compatibility with existing consumers.\n *\n * @example\n * ```tsx\n * import { SecurityRoot } from '@burdenoff/micro-fe/security';\n *\n * <SecurityRoot basePath=\"/security\" {...props} />\n * ```\n */\nexport const SecurityRoot: FC<SecurityRootProps> = (props) => (\n
|
|
1
|
+
{"version":3,"file":"SecurityRoot.js","names":[],"sources":["../../src/security/SecurityRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useTr } from './hooks/useTr';\nimport type { SecurityRootProps } from './types';\nimport { SecurityRootBase } from './SecurityRootBase';\nimport { SecurityRoutes } from './routes/SecurityRoutes';\n\nconst routesElement = <SecurityRoutes />;\n\n/**\n * Root component for the Security microfrontend (backward-compatible, all routes).\n *\n * Renders all pages (user operational + admin governance).\n * Kept for backward compatibility with existing consumers.\n *\n * @example\n * ```tsx\n * import { SecurityRoot } from '@burdenoff/micro-fe/security';\n *\n * <SecurityRoot basePath=\"/security\" {...props} />\n * ```\n */\nexport const SecurityRoot: FC<SecurityRootProps> = (props) => {\n const tr = useTr();\n return (\n <SecurityRootBase\n mode=\"all\"\n routes={routesElement}\n footerLabel={tr('security.footer.statusReady', 'Security Ready')}\n {...props}\n />\n );\n};\n"],"mappings":";;;;;AAMA,IAAM,IAAgB,kBAAC,GAAD,EAAkB,CAAA,EAe3B,KAAuC,MAGhD,kBAAC,GAAD;CACE,MAAK;CACL,QAAQ;CACR,aALO,GAAO,CAKE,+BAA+B,iBAAiB;CAChE,GAAI;CACJ,CAAA"}
|
|
@@ -1,56 +1,58 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { useTr as e } from "./hooks/useTr.js";
|
|
2
|
+
import { SecurityProvider as t } from "./providers/SecurityProvider.js";
|
|
3
|
+
import { SECURITY_FEATURE_FLAGS as n } from "./constants/featureFlags.js";
|
|
4
|
+
import { getNavigationConfig as r } from "./config/navigation.js";
|
|
5
|
+
import { useEffect as i, useMemo as a } from "react";
|
|
6
|
+
import { ErrorBoundary as o } from "@burdenoff/fe-libs/shared/components";
|
|
7
|
+
import { FeatureFlagProvider as s } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
8
|
+
import { useFeatureFlag as c } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
9
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
9
10
|
//#region src/security/SecurityRootBase.tsx
|
|
10
|
-
var
|
|
11
|
-
let { registerNavItems:
|
|
12
|
-
let e =
|
|
13
|
-
if (
|
|
11
|
+
var u = ({ mode: o, routes: s, footerLabel: u, ...d }) => {
|
|
12
|
+
let { registerNavItems: f, registerFooterItems: p, basePath: m = "/" } = d, h = c(n.PROVIDERS_EXPERIMENTAL, !1), g = e(), _ = a(() => {
|
|
13
|
+
let e = r(m, o, g);
|
|
14
|
+
if (h || !e.children) return e;
|
|
14
15
|
let t = (e) => e.filter((e) => e.id !== "security-providers");
|
|
15
16
|
return {
|
|
16
17
|
...e,
|
|
17
18
|
children: t(e.children)
|
|
18
19
|
};
|
|
19
20
|
}, [
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
m,
|
|
22
|
+
o,
|
|
23
|
+
h,
|
|
24
|
+
g
|
|
23
25
|
]);
|
|
24
|
-
return
|
|
25
|
-
if (
|
|
26
|
-
}, [
|
|
27
|
-
if (
|
|
26
|
+
return i(() => {
|
|
27
|
+
if (f) return f(_);
|
|
28
|
+
}, [f, _]), i(() => {
|
|
29
|
+
if (p) return p([{
|
|
28
30
|
id: "security-status",
|
|
29
|
-
label:
|
|
31
|
+
label: u,
|
|
30
32
|
type: "status",
|
|
31
33
|
order: 10,
|
|
32
34
|
section: "left"
|
|
33
35
|
}]);
|
|
34
|
-
}, [
|
|
35
|
-
...
|
|
36
|
-
children:
|
|
36
|
+
}, [p, u]), /* @__PURE__ */ l(t, {
|
|
37
|
+
...d,
|
|
38
|
+
children: s
|
|
37
39
|
});
|
|
38
|
-
},
|
|
39
|
-
let { workspaceId:
|
|
40
|
-
return /* @__PURE__ */
|
|
41
|
-
fallback: /* @__PURE__ */
|
|
40
|
+
}, d = (t) => {
|
|
41
|
+
let { workspaceId: n, mode: r } = t;
|
|
42
|
+
return /* @__PURE__ */ l(o, {
|
|
43
|
+
fallback: /* @__PURE__ */ l("div", {
|
|
42
44
|
className: "p-6 text-center text-text-secondary",
|
|
43
|
-
children: "Something went wrong loading this module. Please refresh the page."
|
|
45
|
+
children: e()("security.errorBoundary.message", "Something went wrong loading this module. Please refresh the page.")
|
|
44
46
|
}),
|
|
45
|
-
children: /* @__PURE__ */
|
|
46
|
-
workspaceId:
|
|
47
|
+
children: /* @__PURE__ */ l(s, {
|
|
48
|
+
workspaceId: n ?? null,
|
|
47
49
|
gateway: "workspace",
|
|
48
|
-
defaultEnabled:
|
|
49
|
-
children: /* @__PURE__ */
|
|
50
|
+
defaultEnabled: r === "user",
|
|
51
|
+
children: /* @__PURE__ */ l(u, { ...t })
|
|
50
52
|
})
|
|
51
53
|
});
|
|
52
54
|
};
|
|
53
55
|
//#endregion
|
|
54
|
-
export {
|
|
56
|
+
export { d as SecurityRootBase };
|
|
55
57
|
|
|
56
58
|
//# sourceMappingURL=SecurityRootBase.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecurityRootBase.js","names":[],"sources":["../../src/security/SecurityRootBase.tsx"],"sourcesContent":["import type { FC, ReactNode } from 'react';\nimport { useEffect, useMemo } from 'react';\nimport { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { useFeatureFlag } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { SecurityProvider } from './providers/SecurityProvider';\nimport type { NavItem, SecurityRootProps, SecurityMode } from './types';\nimport { SECURITY_FEATURE_FLAGS } from './constants/featureFlags';\nimport { getNavigationConfig } from './config/navigation';\n\ninterface SecurityRootBaseProps extends SecurityRootProps {\n mode: SecurityMode;\n routes: ReactNode;\n footerLabel: string;\n}\n\n/**\n * Inner component — runs *inside* `<FeatureFlagProvider>` so `useFeatureFlag`\n * always has a parent provider to read from. Prior to the split, the hook was\n * called above the provider, which threw in dev/test entry paths that didn't\n * have a shell-level feature-flag provider mounted above the MFE.\n */\nconst SecurityRootBaseWithFeatureFlags: FC<SecurityRootBaseProps> = ({\n mode,\n routes,\n footerLabel,\n ...props\n}) => {\n const { registerNavItems, registerFooterItems, basePath = '/' } = props;\n const providersEnabled = useFeatureFlag(SECURITY_FEATURE_FLAGS.PROVIDERS_EXPERIMENTAL, false);\n\n // Strip the Providers child when the flag is off — otherwise admins see a\n // clickable nav link that silently redirects to the security home.\n const filteredNavItem = useMemo(() => {\n const navItem = getNavigationConfig(basePath, mode);\n if (providersEnabled || !navItem.children) return navItem;\n const filterProviders = (items: NavItem[]): NavItem[] =>\n items.filter((c) => c.id !== 'security-providers');\n return { ...navItem, children: filterProviders(navItem.children) };\n }, [basePath, mode, providersEnabled]);\n\n useEffect(() => {\n if (!registerNavItems) return;\n const cleanup = registerNavItems(filteredNavItem);\n return cleanup;\n }, [registerNavItems, filteredNavItem]);\n\n useEffect(() => {\n if (!registerFooterItems) return;\n\n const footerItems = [\n {\n id: 'security-status',\n label: footerLabel,\n type: 'status' as const,\n order: 10,\n section: 'left' as const,\n },\n ];\n\n const cleanup = registerFooterItems(footerItems);\n return cleanup;\n }, [registerFooterItems, footerLabel]);\n\n return <SecurityProvider {...props}>{routes}</SecurityProvider>;\n};\n\n/**\n * Shared base for all Security root components.\n * Handles provider setup, nav/footer registration, and error boundary wrapping.\n *\n * Split into outer (ErrorBoundary + FeatureFlagProvider) and inner\n * (SecurityRootBaseWithFeatureFlags consumes useFeatureFlag) so the hook\n * always runs inside a provider — see comment on the inner component.\n */\nexport const SecurityRootBase: FC<SecurityRootBaseProps> = (props) => {\n const { workspaceId, mode } = props;\n return (\n <ErrorBoundary\n fallback={\n <div className=\"p-6 text-center text-text-secondary\">\n Something went wrong loading this module. Please refresh the page
|
|
1
|
+
{"version":3,"file":"SecurityRootBase.js","names":[],"sources":["../../src/security/SecurityRootBase.tsx"],"sourcesContent":["import type { FC, ReactNode } from 'react';\nimport { useEffect, useMemo } from 'react';\nimport { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { useFeatureFlag } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { SecurityProvider } from './providers/SecurityProvider';\nimport { useTr } from './hooks/useTr';\nimport type { NavItem, SecurityRootProps, SecurityMode } from './types';\nimport { SECURITY_FEATURE_FLAGS } from './constants/featureFlags';\nimport { getNavigationConfig } from './config/navigation';\n\ninterface SecurityRootBaseProps extends SecurityRootProps {\n mode: SecurityMode;\n routes: ReactNode;\n footerLabel: string;\n}\n\n/**\n * Inner component — runs *inside* `<FeatureFlagProvider>` so `useFeatureFlag`\n * always has a parent provider to read from. Prior to the split, the hook was\n * called above the provider, which threw in dev/test entry paths that didn't\n * have a shell-level feature-flag provider mounted above the MFE.\n */\nconst SecurityRootBaseWithFeatureFlags: FC<SecurityRootBaseProps> = ({\n mode,\n routes,\n footerLabel,\n ...props\n}) => {\n const { registerNavItems, registerFooterItems, basePath = '/' } = props;\n const providersEnabled = useFeatureFlag(SECURITY_FEATURE_FLAGS.PROVIDERS_EXPERIMENTAL, false);\n const tr = useTr();\n\n // Strip the Providers child when the flag is off — otherwise admins see a\n // clickable nav link that silently redirects to the security home.\n const filteredNavItem = useMemo(() => {\n const navItem = getNavigationConfig(basePath, mode, tr);\n if (providersEnabled || !navItem.children) return navItem;\n const filterProviders = (items: NavItem[]): NavItem[] =>\n items.filter((c) => c.id !== 'security-providers');\n return { ...navItem, children: filterProviders(navItem.children) };\n }, [basePath, mode, providersEnabled, tr]);\n\n useEffect(() => {\n if (!registerNavItems) return;\n const cleanup = registerNavItems(filteredNavItem);\n return cleanup;\n }, [registerNavItems, filteredNavItem]);\n\n useEffect(() => {\n if (!registerFooterItems) return;\n\n const footerItems = [\n {\n id: 'security-status',\n label: footerLabel,\n type: 'status' as const,\n order: 10,\n section: 'left' as const,\n },\n ];\n\n const cleanup = registerFooterItems(footerItems);\n return cleanup;\n }, [registerFooterItems, footerLabel]);\n\n return <SecurityProvider {...props}>{routes}</SecurityProvider>;\n};\n\n/**\n * Shared base for all Security root components.\n * Handles provider setup, nav/footer registration, and error boundary wrapping.\n *\n * Split into outer (ErrorBoundary + FeatureFlagProvider) and inner\n * (SecurityRootBaseWithFeatureFlags consumes useFeatureFlag) so the hook\n * always runs inside a provider — see comment on the inner component.\n */\nexport const SecurityRootBase: FC<SecurityRootBaseProps> = (props) => {\n const { workspaceId, mode } = props;\n const tr = useTr();\n return (\n <ErrorBoundary\n fallback={\n <div className=\"p-6 text-center text-text-secondary\">\n {tr(\n 'security.errorBoundary.message',\n 'Something went wrong loading this module. Please refresh the page.'\n )}\n </div>\n }\n >\n <FeatureFlagProvider\n workspaceId={workspaceId ?? null}\n gateway=\"workspace\"\n defaultEnabled={mode === 'user'}\n >\n <SecurityRootBaseWithFeatureFlags {...props} />\n </FeatureFlagProvider>\n </ErrorBoundary>\n );\n};\n"],"mappings":";;;;;;;;;;AAuBA,IAAM,KAA+D,EACnE,SACA,WACA,gBACA,GAAG,QACC;CACJ,IAAM,EAAE,qBAAkB,wBAAqB,cAAW,QAAQ,GAC5D,IAAmB,EAAe,EAAuB,wBAAwB,GAAM,EACvF,IAAK,GAAO,EAIZ,IAAkB,QAAc;EACpC,IAAM,IAAU,EAAoB,GAAU,GAAM,EAAG;AACvD,MAAI,KAAoB,CAAC,EAAQ,SAAU,QAAO;EAClD,IAAM,KAAmB,MACvB,EAAM,QAAQ,MAAM,EAAE,OAAO,qBAAqB;AACpD,SAAO;GAAE,GAAG;GAAS,UAAU,EAAgB,EAAQ,SAAS;GAAE;IACjE;EAAC;EAAU;EAAM;EAAkB;EAAG,CAAC;AAyB1C,QAvBA,QAAgB;AACT,QAEL,QADgB,EAAiB,EAAgB;IAEhD,CAAC,GAAkB,EAAgB,CAAC,EAEvC,QAAgB;AACT,QAaL,QADgB,EAVI,CAClB;GACE,IAAI;GACJ,OAAO;GACP,MAAM;GACN,OAAO;GACP,SAAS;GACV,CACF,CAE+C;IAE/C,CAAC,GAAqB,EAAY,CAAC,EAE/B,kBAAC,GAAD;EAAkB,GAAI;YAAQ;EAA0B,CAAA;GAWpD,KAA+C,MAAU;CACpE,IAAM,EAAE,gBAAa,YAAS;AAE9B,QACE,kBAAC,GAAD;EACE,UACE,kBAAC,OAAD;GAAK,WAAU;aAJV,GAAO,CAMR,kCACA,qEACD;GACG,CAAA;YAGR,kBAAC,GAAD;GACE,aAAa,KAAe;GAC5B,SAAQ;GACR,gBAAgB,MAAS;aAEzB,kBAAC,GAAD,EAAkC,GAAI,GAAS,CAAA;GAC3B,CAAA;EACR,CAAA"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { useTr as e } from "./hooks/useTr.js";
|
|
2
|
+
import { SecurityRootBase as t } from "./SecurityRootBase.js";
|
|
3
|
+
import { SecurityUserRoutes as n } from "./routes/SecurityUserRoutes.js";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
4
5
|
//#region src/security/SecurityUserRoot.tsx
|
|
5
|
-
var
|
|
6
|
+
var i = /* @__PURE__ */ r(n, {}), a = (n) => /* @__PURE__ */ r(t, {
|
|
6
7
|
mode: "user",
|
|
7
|
-
routes:
|
|
8
|
-
footerLabel: "Security Ready",
|
|
9
|
-
...
|
|
8
|
+
routes: i,
|
|
9
|
+
footerLabel: e()("security.footer.statusReady", "Security Ready"),
|
|
10
|
+
...n
|
|
10
11
|
});
|
|
11
12
|
//#endregion
|
|
12
|
-
export {
|
|
13
|
+
export { a as SecurityUserRoot };
|
|
13
14
|
|
|
14
15
|
//# sourceMappingURL=SecurityUserRoot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecurityUserRoot.js","names":[],"sources":["../../src/security/SecurityUserRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport type { SecurityUserRootProps } from './types';\nimport { SecurityRootBase } from './SecurityRootBase';\nimport { SecurityUserRoutes } from './routes/SecurityUserRoutes';\n\nconst routesElement = <SecurityUserRoutes />;\n\n/**\n * User-facing root component for the Security microfrontend.\n *\n * Renders only vault/secret operational pages (CRUD).\n * Used by product app shells (vibecontrols-app, bigconsole, etc.).\n *\n * @example\n * ```tsx\n * import { SecurityUserRoot } from '@burdenoff/micro-fe/security';\n *\n * <SecurityUserRoot basePath=\"/security\" {...workspaceBaseProps} />\n * ```\n */\nexport const SecurityUserRoot: FC<SecurityUserRootProps> = (props) => (\n
|
|
1
|
+
{"version":3,"file":"SecurityUserRoot.js","names":[],"sources":["../../src/security/SecurityUserRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useTr } from './hooks/useTr';\nimport type { SecurityUserRootProps } from './types';\nimport { SecurityRootBase } from './SecurityRootBase';\nimport { SecurityUserRoutes } from './routes/SecurityUserRoutes';\n\nconst routesElement = <SecurityUserRoutes />;\n\n/**\n * User-facing root component for the Security microfrontend.\n *\n * Renders only vault/secret operational pages (CRUD).\n * Used by product app shells (vibecontrols-app, bigconsole, etc.).\n *\n * @example\n * ```tsx\n * import { SecurityUserRoot } from '@burdenoff/micro-fe/security';\n *\n * <SecurityUserRoot basePath=\"/security\" {...workspaceBaseProps} />\n * ```\n */\nexport const SecurityUserRoot: FC<SecurityUserRootProps> = (props) => {\n const tr = useTr();\n return (\n <SecurityRootBase\n mode=\"user\"\n routes={routesElement}\n footerLabel={tr('security.footer.statusReady', 'Security Ready')}\n {...props}\n />\n );\n};\n"],"mappings":";;;;;AAMA,IAAM,IAAgB,kBAAC,GAAD,EAAsB,CAAA,EAe/B,KAA+C,MAGxD,kBAAC,GAAD;CACE,MAAK;CACL,QAAQ;CACR,aALO,GAAO,CAKE,+BAA+B,iBAAiB;CAChE,GAAI;CACJ,CAAA"}
|
|
@@ -1,109 +1,126 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { useTr as e } from "../hooks/useTr.js";
|
|
2
|
+
import { cn as t } from "../utils/cn.js";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import { Activity as i, Edit2 as a, Eye as o, Lock as s, Plus as c, RefreshCw as l, Trash2 as u, Unlock as d, UserMinus as f, UserPlus as p } from "lucide-react";
|
|
4
5
|
//#region src/security/components/ActivityTimeline.tsx
|
|
5
|
-
var
|
|
6
|
+
var m = {
|
|
6
7
|
"vault.created": {
|
|
7
|
-
icon:
|
|
8
|
+
icon: c,
|
|
8
9
|
color: "text-status-success-text bg-status-success-bg-subtle"
|
|
9
10
|
},
|
|
10
11
|
"vault.updated": {
|
|
11
|
-
icon:
|
|
12
|
+
icon: a,
|
|
12
13
|
color: "text-status-info-text bg-status-info-bg-subtle"
|
|
13
14
|
},
|
|
14
15
|
"vault.deleted": {
|
|
15
|
-
icon:
|
|
16
|
+
icon: u,
|
|
16
17
|
color: "text-status-error-text bg-status-error-bg-subtle"
|
|
17
18
|
},
|
|
18
19
|
"vault.locked": {
|
|
19
|
-
icon:
|
|
20
|
+
icon: s,
|
|
20
21
|
color: "text-status-warning-text bg-status-warning-bg-subtle"
|
|
21
22
|
},
|
|
22
23
|
"vault.unlocked": {
|
|
23
|
-
icon:
|
|
24
|
+
icon: d,
|
|
24
25
|
color: "text-status-success-text bg-status-success-bg-subtle"
|
|
25
26
|
},
|
|
26
27
|
"secret.created": {
|
|
27
|
-
icon:
|
|
28
|
+
icon: c,
|
|
28
29
|
color: "text-status-success-text bg-status-success-bg-subtle"
|
|
29
30
|
},
|
|
30
31
|
"secret.updated": {
|
|
31
|
-
icon:
|
|
32
|
+
icon: a,
|
|
32
33
|
color: "text-status-info-text bg-status-info-bg-subtle"
|
|
33
34
|
},
|
|
34
35
|
"secret.deleted": {
|
|
35
|
-
icon:
|
|
36
|
+
icon: u,
|
|
36
37
|
color: "text-status-error-text bg-status-error-bg-subtle"
|
|
37
38
|
},
|
|
38
39
|
"secret.accessed": {
|
|
39
|
-
icon:
|
|
40
|
+
icon: o,
|
|
40
41
|
color: "text-accent-purple bg-accent-purple-subtle"
|
|
41
42
|
},
|
|
42
43
|
"secret.rotated": {
|
|
43
|
-
icon:
|
|
44
|
+
icon: l,
|
|
44
45
|
color: "text-accent-cyan bg-accent-cyan-subtle"
|
|
45
46
|
},
|
|
46
47
|
"member.added": {
|
|
47
|
-
icon:
|
|
48
|
+
icon: p,
|
|
48
49
|
color: "text-status-success-text bg-status-success-bg-subtle"
|
|
49
50
|
},
|
|
50
51
|
"member.removed": {
|
|
51
|
-
icon:
|
|
52
|
+
icon: f,
|
|
52
53
|
color: "text-status-error-text bg-status-error-bg-subtle"
|
|
53
54
|
}
|
|
54
55
|
};
|
|
55
|
-
function
|
|
56
|
-
let
|
|
57
|
-
return
|
|
56
|
+
function h(e, t) {
|
|
57
|
+
let n = /* @__PURE__ */ new Date(), r = new Date(e), i = n.getTime() - r.getTime(), a = Math.floor(i / 6e4), o = Math.floor(a / 60), s = Math.floor(o / 24);
|
|
58
|
+
return a < 1 ? t("security.activityTimeline.justNow", "just now") : a < 60 ? t("security.activityTimeline.minutesAgo", "{{count}}m ago", { count: a }) : o < 24 ? t("security.activityTimeline.hoursAgo", "{{count}}h ago", { count: o }) : s < 7 ? t("security.activityTimeline.daysAgo", "{{count}}d ago", { count: s }) : r.toLocaleDateString();
|
|
58
59
|
}
|
|
59
|
-
var
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
60
|
+
var g = (e) => ({
|
|
61
|
+
"vault.created": "activityTimeline.action.vaultCreated",
|
|
62
|
+
"vault.updated": "activityTimeline.action.vaultUpdated",
|
|
63
|
+
"vault.deleted": "activityTimeline.action.vaultDeleted",
|
|
64
|
+
"vault.locked": "activityTimeline.action.vaultLocked",
|
|
65
|
+
"vault.unlocked": "activityTimeline.action.vaultUnlocked",
|
|
66
|
+
"secret.created": "activityTimeline.action.secretCreated",
|
|
67
|
+
"secret.updated": "activityTimeline.action.secretUpdated",
|
|
68
|
+
"secret.deleted": "activityTimeline.action.secretDeleted",
|
|
69
|
+
"secret.accessed": "activityTimeline.action.secretAccessed",
|
|
70
|
+
"secret.rotated": "activityTimeline.action.secretRotated",
|
|
71
|
+
"member.added": "activityTimeline.action.memberAdded",
|
|
72
|
+
"member.removed": "activityTimeline.action.memberRemoved"
|
|
73
|
+
})[e] ?? e, _ = ({ entries: a, className: o }) => {
|
|
74
|
+
let s = e();
|
|
75
|
+
return /* @__PURE__ */ r("div", {
|
|
76
|
+
className: t("relative", o),
|
|
77
|
+
children: [/* @__PURE__ */ n("div", { className: "absolute left-4 top-2 bottom-2 w-px bg-border" }), /* @__PURE__ */ n("div", {
|
|
78
|
+
className: "space-y-4",
|
|
79
|
+
children: a.map((e) => {
|
|
80
|
+
let a = e.action, o = m[a] ?? {
|
|
81
|
+
icon: i,
|
|
82
|
+
color: "text-text-secondary bg-bg-sunken"
|
|
83
|
+
}, c = o.icon, l = g(a);
|
|
84
|
+
return /* @__PURE__ */ r("div", {
|
|
85
|
+
className: "relative flex items-start gap-3 pl-1",
|
|
86
|
+
children: [/* @__PURE__ */ n("div", {
|
|
87
|
+
className: t("relative z-10 p-1.5 rounded-full shrink-0", o.color),
|
|
88
|
+
children: /* @__PURE__ */ n(c, { className: "size-3" })
|
|
89
|
+
}), /* @__PURE__ */ r("div", {
|
|
90
|
+
className: "flex-1 min-w-0 pt-0.5",
|
|
91
|
+
children: [/* @__PURE__ */ r("p", {
|
|
92
|
+
className: "text-sm text-text-primary",
|
|
93
|
+
children: [
|
|
94
|
+
/* @__PURE__ */ n("span", {
|
|
95
|
+
className: "font-medium",
|
|
96
|
+
children: e.actorId
|
|
97
|
+
}),
|
|
98
|
+
" ",
|
|
99
|
+
/* @__PURE__ */ n("span", {
|
|
100
|
+
className: "text-text-secondary",
|
|
101
|
+
children: s(`security.${l}`, a.replace(".", " "))
|
|
102
|
+
}),
|
|
103
|
+
e.entityId ? /* @__PURE__ */ r("span", {
|
|
104
|
+
className: "font-medium",
|
|
105
|
+
children: [
|
|
106
|
+
" ",
|
|
107
|
+
e.entityType ? String(e.entityType) : s("security.activityTimeline.resource", "resource"),
|
|
108
|
+
":",
|
|
109
|
+
String(e.entityId)
|
|
110
|
+
]
|
|
111
|
+
}) : null
|
|
112
|
+
]
|
|
113
|
+
}), /* @__PURE__ */ n("p", {
|
|
114
|
+
className: "text-xs text-text-secondary mt-0.5",
|
|
115
|
+
children: h(e.timestamp, s)
|
|
116
|
+
})]
|
|
100
117
|
})]
|
|
101
|
-
})
|
|
102
|
-
}
|
|
103
|
-
})
|
|
104
|
-
})
|
|
105
|
-
}
|
|
118
|
+
}, e.id);
|
|
119
|
+
})
|
|
120
|
+
})]
|
|
121
|
+
});
|
|
122
|
+
};
|
|
106
123
|
//#endregion
|
|
107
|
-
export {
|
|
124
|
+
export { _ as ActivityTimeline };
|
|
108
125
|
|
|
109
126
|
//# sourceMappingURL=ActivityTimeline.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActivityTimeline.js","names":[],"sources":["../../../src/security/components/ActivityTimeline.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport {\n Lock,\n Unlock,\n Plus,\n Edit2,\n Trash2,\n Eye,\n RefreshCw,\n UserPlus,\n UserMinus,\n Activity,\n} from 'lucide-react';\nimport { cn } from '../utils/cn';\n\ninterface ActivityTimelineProps {\n entries: Array<Record<string, unknown>>;\n className?: string;\n}\n\nconst actionIconMap: Record<string, { icon: typeof Activity; color: string }> = {\n 'vault.created': { icon: Plus, color: 'text-status-success-text bg-status-success-bg-subtle' },\n 'vault.updated': { icon: Edit2, color: 'text-status-info-text bg-status-info-bg-subtle' },\n 'vault.deleted': { icon: Trash2, color: 'text-status-error-text bg-status-error-bg-subtle' },\n 'vault.locked': { icon: Lock, color: 'text-status-warning-text bg-status-warning-bg-subtle' },\n 'vault.unlocked': { icon: Unlock, color: 'text-status-success-text bg-status-success-bg-subtle' },\n 'secret.created': { icon: Plus, color: 'text-status-success-text bg-status-success-bg-subtle' },\n 'secret.updated': { icon: Edit2, color: 'text-status-info-text bg-status-info-bg-subtle' },\n 'secret.deleted': { icon: Trash2, color: 'text-status-error-text bg-status-error-bg-subtle' },\n 'secret.accessed': { icon: Eye, color: 'text-accent-purple bg-accent-purple-subtle' },\n 'secret.rotated': { icon: RefreshCw, color: 'text-accent-cyan bg-accent-cyan-subtle' },\n 'member.added': { icon: UserPlus, color: 'text-status-success-text bg-status-success-bg-subtle' },\n 'member.removed': { icon: UserMinus, color: 'text-status-error-text bg-status-error-bg-subtle' },\n};\n\nfunction formatRelativeTime(dateStr: string): string {\n const now = new Date();\n const date = new Date(dateStr);\n const diffMs = now.getTime() - date.getTime();\n const diffMins = Math.floor(diffMs / 60000);\n const diffHours = Math.floor(diffMins / 60);\n const diffDays = Math.floor(diffHours / 24);\n\n if (diffMins < 1) return 'just now';\n if (diffMins < 60)
|
|
1
|
+
{"version":3,"file":"ActivityTimeline.js","names":[],"sources":["../../../src/security/components/ActivityTimeline.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport {\n Lock,\n Unlock,\n Plus,\n Edit2,\n Trash2,\n Eye,\n RefreshCw,\n UserPlus,\n UserMinus,\n Activity,\n} from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { useTr } from '../hooks/useTr';\n\ninterface ActivityTimelineProps {\n entries: Array<Record<string, unknown>>;\n className?: string;\n}\n\nconst actionIconMap: Record<string, { icon: typeof Activity; color: string }> = {\n 'vault.created': { icon: Plus, color: 'text-status-success-text bg-status-success-bg-subtle' },\n 'vault.updated': { icon: Edit2, color: 'text-status-info-text bg-status-info-bg-subtle' },\n 'vault.deleted': { icon: Trash2, color: 'text-status-error-text bg-status-error-bg-subtle' },\n 'vault.locked': { icon: Lock, color: 'text-status-warning-text bg-status-warning-bg-subtle' },\n 'vault.unlocked': { icon: Unlock, color: 'text-status-success-text bg-status-success-bg-subtle' },\n 'secret.created': { icon: Plus, color: 'text-status-success-text bg-status-success-bg-subtle' },\n 'secret.updated': { icon: Edit2, color: 'text-status-info-text bg-status-info-bg-subtle' },\n 'secret.deleted': { icon: Trash2, color: 'text-status-error-text bg-status-error-bg-subtle' },\n 'secret.accessed': { icon: Eye, color: 'text-accent-purple bg-accent-purple-subtle' },\n 'secret.rotated': { icon: RefreshCw, color: 'text-accent-cyan bg-accent-cyan-subtle' },\n 'member.added': { icon: UserPlus, color: 'text-status-success-text bg-status-success-bg-subtle' },\n 'member.removed': { icon: UserMinus, color: 'text-status-error-text bg-status-error-bg-subtle' },\n};\n\nfunction formatRelativeTime(dateStr: string, tr: ReturnType<typeof useTr>): string {\n const now = new Date();\n const date = new Date(dateStr);\n const diffMs = now.getTime() - date.getTime();\n const diffMins = Math.floor(diffMs / 60000);\n const diffHours = Math.floor(diffMins / 60);\n const diffDays = Math.floor(diffHours / 24);\n\n if (diffMins < 1) return tr('security.activityTimeline.justNow', 'just now');\n if (diffMins < 60)\n return tr('security.activityTimeline.minutesAgo', '{{count}}m ago', { count: diffMins });\n if (diffHours < 24)\n return tr('security.activityTimeline.hoursAgo', '{{count}}h ago', { count: diffHours });\n if (diffDays < 7)\n return tr('security.activityTimeline.daysAgo', '{{count}}d ago', { count: diffDays });\n return date.toLocaleDateString();\n}\n\nconst actionTranslationKey = (action: string): string => {\n const map: Record<string, string> = {\n 'vault.created': 'activityTimeline.action.vaultCreated',\n 'vault.updated': 'activityTimeline.action.vaultUpdated',\n 'vault.deleted': 'activityTimeline.action.vaultDeleted',\n 'vault.locked': 'activityTimeline.action.vaultLocked',\n 'vault.unlocked': 'activityTimeline.action.vaultUnlocked',\n 'secret.created': 'activityTimeline.action.secretCreated',\n 'secret.updated': 'activityTimeline.action.secretUpdated',\n 'secret.deleted': 'activityTimeline.action.secretDeleted',\n 'secret.accessed': 'activityTimeline.action.secretAccessed',\n 'secret.rotated': 'activityTimeline.action.secretRotated',\n 'member.added': 'activityTimeline.action.memberAdded',\n 'member.removed': 'activityTimeline.action.memberRemoved',\n };\n return map[action] ?? action;\n};\n\n/**\n * Vertical timeline of recent audit activity events.\n */\nexport const ActivityTimeline: FC<ActivityTimelineProps> = ({ entries, className }) => {\n const tr = useTr();\n\n return (\n <div className={cn('relative', className)}>\n {/* Vertical line */}\n <div className=\"absolute left-4 top-2 bottom-2 w-px bg-border\" />\n\n <div className=\"space-y-4\">\n {entries.map((entry) => {\n const action = entry.action as string;\n const config = actionIconMap[action] ?? {\n icon: Activity,\n color: 'text-text-secondary bg-bg-sunken',\n };\n const Icon = config.icon;\n const actionKey = actionTranslationKey(action);\n\n return (\n <div key={entry.id as string} className=\"relative flex items-start gap-3 pl-1\">\n {/* Timeline dot */}\n <div className={cn('relative z-10 p-1.5 rounded-full shrink-0', config.color)}>\n <Icon className=\"size-3\" />\n </div>\n\n {/* Content */}\n <div className=\"flex-1 min-w-0 pt-0.5\">\n <p className=\"text-sm text-text-primary\">\n <span className=\"font-medium\">{entry.actorId as string}</span>{' '}\n <span className=\"text-text-secondary\">\n {tr(`security.${actionKey}`, action.replace('.', ' '))}\n </span>\n {entry.entityId ? (\n <span className=\"font-medium\">\n {' '}\n {entry.entityType\n ? String(entry.entityType)\n : tr('security.activityTimeline.resource', 'resource')}\n :{String(entry.entityId)}\n </span>\n ) : null}\n </p>\n <p className=\"text-xs text-text-secondary mt-0.5\">\n {formatRelativeTime(entry.timestamp as string, tr)}\n </p>\n </div>\n </div>\n );\n })}\n </div>\n </div>\n );\n};\n"],"mappings":"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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { useTr as e } from "../hooks/useTr.js";
|
|
2
|
+
import { cn as t } from "../utils/cn.js";
|
|
3
|
+
import { Badge as n, Button as r } from "./ui.js";
|
|
4
4
|
import { ConfirmDialog as i } from "./ConfirmDialog.js";
|
|
5
5
|
import { useSecurityEventEmitter as a } from "../hooks/useSecurityEventEmitter.js";
|
|
6
6
|
import { useSecurityStore as o } from "../store/securityStore.js";
|
|
@@ -9,87 +9,86 @@ import { useState as c } from "react";
|
|
|
9
9
|
import { usePermission as l } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
10
10
|
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
11
11
|
import { FolderInput as p, Loader2 as m, Tag as h, Trash2 as g, X as _ } from "lucide-react";
|
|
12
|
-
import { useI18n as v } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
13
12
|
//#region src/security/components/BulkActionBar.tsx
|
|
14
|
-
var
|
|
15
|
-
let
|
|
16
|
-
return
|
|
17
|
-
className:
|
|
13
|
+
var v = ({ vaultId: v, className: y }) => {
|
|
14
|
+
let b = e(), x = o((e) => e.selectedSecretIds.length), S = o((e) => e.clearSecretSelection), { bulkDeleteSecrets: C, bulkMoveSecrets: w, bulkLabelSecrets: T, loading: E } = s(), { emit: D } = a(), O = l("secret:delete"), k = l("secret:update"), [A, j] = c(!1);
|
|
15
|
+
return x === 0 ? null : /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ f("div", {
|
|
16
|
+
className: t("flex items-center justify-between gap-3 px-4 py-3 rounded-lg", "bg-action-primary-bg/5 border border-primary/20", "animate-in slide-in-from-bottom-2 duration-200", y),
|
|
18
17
|
children: [/* @__PURE__ */ f("div", {
|
|
19
18
|
className: "flex items-center gap-2",
|
|
20
|
-
children: [/* @__PURE__ */ d(
|
|
19
|
+
children: [/* @__PURE__ */ d(n, {
|
|
21
20
|
variant: "default",
|
|
22
|
-
children:
|
|
21
|
+
children: b("security.bulkActionBar.selected", "{{count}} selected", { count: x })
|
|
23
22
|
}), /* @__PURE__ */ d("button", {
|
|
24
23
|
type: "button",
|
|
25
|
-
onClick:
|
|
24
|
+
onClick: S,
|
|
26
25
|
className: "p-1 rounded hover:bg-accent text-text-secondary",
|
|
27
|
-
title:
|
|
28
|
-
"aria-label":
|
|
26
|
+
title: b("security.bulkActionBar.clearSelection", "Clear selection"),
|
|
27
|
+
"aria-label": b("security.bulkActionBar.clearSelection", "Clear selection"),
|
|
29
28
|
children: /* @__PURE__ */ d(_, { className: "size-4" })
|
|
30
29
|
})]
|
|
31
30
|
}), /* @__PURE__ */ f("div", {
|
|
32
31
|
className: "flex items-center gap-2",
|
|
33
32
|
children: [
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
E && /* @__PURE__ */ d(m, { className: "size-4 animate-spin text-text-secondary" }),
|
|
34
|
+
k && /* @__PURE__ */ f(r, {
|
|
36
35
|
variant: "outline",
|
|
37
36
|
size: "sm",
|
|
38
|
-
disabled:
|
|
37
|
+
disabled: E,
|
|
39
38
|
onClick: () => {
|
|
40
|
-
let e = prompt(
|
|
39
|
+
let e = prompt(b("security.bulkActionBar.labelPrompt", "Enter label to apply:"));
|
|
41
40
|
if (e) {
|
|
42
41
|
let t = o.getState().selectedSecretIds;
|
|
43
|
-
|
|
42
|
+
T(t, e), S();
|
|
44
43
|
}
|
|
45
44
|
},
|
|
46
|
-
children: [/* @__PURE__ */ d(h, { className: "size-3.5" }),
|
|
45
|
+
children: [/* @__PURE__ */ d(h, { className: "size-3.5" }), b("security.bulkActionBar.label", "Label")]
|
|
47
46
|
}),
|
|
48
|
-
|
|
47
|
+
k && /* @__PURE__ */ f(r, {
|
|
49
48
|
variant: "outline",
|
|
50
49
|
size: "sm",
|
|
51
|
-
disabled:
|
|
50
|
+
disabled: E,
|
|
52
51
|
onClick: () => {
|
|
53
|
-
let e = prompt(
|
|
52
|
+
let e = prompt(b("security.bulkActionBar.movePrompt", "Enter target vault ID:"));
|
|
54
53
|
if (e) {
|
|
55
54
|
let t = o.getState().selectedSecretIds;
|
|
56
|
-
|
|
55
|
+
w(t, e), t.forEach((e) => D("secret.updated", {
|
|
57
56
|
secretId: e,
|
|
58
|
-
vaultId:
|
|
59
|
-
})),
|
|
57
|
+
vaultId: v
|
|
58
|
+
})), S();
|
|
60
59
|
}
|
|
61
60
|
},
|
|
62
|
-
children: [/* @__PURE__ */ d(p, { className: "size-3.5" }),
|
|
61
|
+
children: [/* @__PURE__ */ d(p, { className: "size-3.5" }), b("security.bulkActionBar.move", "Move")]
|
|
63
62
|
}),
|
|
64
|
-
|
|
63
|
+
O && /* @__PURE__ */ f(r, {
|
|
65
64
|
variant: "destructive",
|
|
66
65
|
size: "sm",
|
|
67
|
-
disabled:
|
|
68
|
-
onClick: () =>
|
|
69
|
-
children: [/* @__PURE__ */ d(g, { className: "size-3.5" }),
|
|
66
|
+
disabled: E,
|
|
67
|
+
onClick: () => j(!0),
|
|
68
|
+
children: [/* @__PURE__ */ d(g, { className: "size-3.5" }), b("security.bulkActionBar.delete", "Delete")]
|
|
70
69
|
})
|
|
71
70
|
]
|
|
72
71
|
})]
|
|
73
72
|
}), /* @__PURE__ */ d(i, {
|
|
74
|
-
isOpen:
|
|
75
|
-
onClose: () =>
|
|
73
|
+
isOpen: A,
|
|
74
|
+
onClose: () => j(!1),
|
|
76
75
|
onConfirm: async () => {
|
|
77
76
|
let e = o.getState().selectedSecretIds;
|
|
78
|
-
await
|
|
77
|
+
await C(e), e.forEach((e) => D("secret.deleted", {
|
|
79
78
|
secretId: e,
|
|
80
|
-
vaultId:
|
|
81
|
-
})),
|
|
79
|
+
vaultId: v
|
|
80
|
+
})), j(!1), S();
|
|
82
81
|
},
|
|
83
|
-
title:
|
|
84
|
-
description:
|
|
85
|
-
count:
|
|
86
|
-
suffix:
|
|
82
|
+
title: b("security.bulkActionBar.deleteConfirm.title", "Delete Selected Secrets"),
|
|
83
|
+
description: b("security.bulkActionBar.deleteConfirm.description", "Are you sure you want to delete {{count}} selected secret{{suffix}}? This action cannot be undone.", {
|
|
84
|
+
count: x,
|
|
85
|
+
suffix: x === 1 ? "" : "s"
|
|
87
86
|
}),
|
|
88
|
-
confirmLabel:
|
|
87
|
+
confirmLabel: b("security.bulkActionBar.deleteConfirm.confirm", "Delete All"),
|
|
89
88
|
variant: "destructive"
|
|
90
89
|
})] });
|
|
91
90
|
};
|
|
92
91
|
//#endregion
|
|
93
|
-
export {
|
|
92
|
+
export { v as BulkActionBar };
|
|
94
93
|
|
|
95
94
|
//# sourceMappingURL=BulkActionBar.js.map
|