@burdenoff/microfe-product 2026.625.1 → 2026.626.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/product/pages/ContentPageViewPage.js +40 -36
- package/dist/product/pages/ContentPageViewPage.js.map +1 -1
- package/dist/product/pages/ProductCatalogPage.js +71 -63
- package/dist/product/pages/ProductCatalogPage.js.map +1 -1
- package/dist/product/pages/ProductViewPage.js +218 -181
- package/dist/product/pages/ProductViewPage.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPageCreatePage.js +27 -25
- package/dist/product-management/modules/content-pages/pages/ContentPageCreatePage.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js +99 -72
- package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPageEditPage.js +32 -30
- package/dist/product-management/modules/content-pages/pages/ContentPageEditPage.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js +96 -91
- package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js +25 -23
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js +136 -111
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.js +35 -33
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js +130 -126
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitCreatePage.js +27 -25
- package/dist/product-management/modules/press-kit/pages/PressKitCreatePage.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js +95 -70
- package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitEditPage.js +32 -30
- package/dist/product-management/modules/press-kit/pages/PressKitEditPage.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitListPage.js +63 -58
- package/dist/product-management/modules/press-kit/pages/PressKitListPage.js.map +1 -1
- package/dist/product-management/modules/products/components/ProductPlans.js +132 -143
- package/dist/product-management/modules/products/components/ProductPlans.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductCreatePage.js +27 -25
- package/dist/product-management/modules/products/pages/ProductCreatePage.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductDetailPage.js +142 -114
- package/dist/product-management/modules/products/pages/ProductDetailPage.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductEditPage.js +31 -29
- package/dist/product-management/modules/products/pages/ProductEditPage.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductsListPage.js +218 -210
- package/dist/product-management/modules/products/pages/ProductsListPage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutCreatePage.js +27 -22
- package/dist/product-management/modules/shortcuts/pages/ShortcutCreatePage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js +156 -129
- package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutEditPage.js +30 -25
- package/dist/product-management/modules/shortcuts/pages/ShortcutEditPage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js +140 -132
- package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js.map +1 -1
- package/dist/product-management/shared/components/AuditHistoryTab.js +18 -16
- package/dist/product-management/shared/components/AuditHistoryTab.js.map +1 -1
- package/package.json +2 -2
|
@@ -7,22 +7,23 @@ import { ShortcutForm as o } from "../components/ShortcutForm.js";
|
|
|
7
7
|
import { ArrowLeft as s } from "lucide-react";
|
|
8
8
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
9
9
|
import { useParams as u } from "react-router-dom";
|
|
10
|
+
import { EmphasisPanel as d, PagePurpose as f } from "@burdenoff/fe-libs/ui";
|
|
10
11
|
//#region src/product-management/modules/shortcuts/pages/ShortcutEditPage.tsx
|
|
11
|
-
function
|
|
12
|
-
let { id:
|
|
13
|
-
return
|
|
12
|
+
function p() {
|
|
13
|
+
let { id: p } = u(), { navigate: m, basePath: h = "/products" } = t(), g = e(), _ = p || "", { shortcut: v, loading: y, error: b, refetch: x } = i(_), { updateShortcut: S, loading: C, error: w } = a();
|
|
14
|
+
return y ? /* @__PURE__ */ c("div", {
|
|
14
15
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
15
|
-
children: /* @__PURE__ */ c(n, { message:
|
|
16
|
-
}) :
|
|
16
|
+
children: /* @__PURE__ */ c(n, { message: g("shortcuts.loadingShortcut", "Loading shortcut...") })
|
|
17
|
+
}) : b ? /* @__PURE__ */ c("div", {
|
|
17
18
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
18
19
|
children: /* @__PURE__ */ c(r, {
|
|
19
|
-
message:
|
|
20
|
+
message: b.message,
|
|
20
21
|
action: {
|
|
21
|
-
label:
|
|
22
|
-
onClick: () =>
|
|
22
|
+
label: g("productCommon.retry", "Retry"),
|
|
23
|
+
onClick: () => x()
|
|
23
24
|
}
|
|
24
25
|
})
|
|
25
|
-
}) :
|
|
26
|
+
}) : v ? /* @__PURE__ */ l("div", {
|
|
26
27
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6 animate-in fade-in duration-200",
|
|
27
28
|
children: [
|
|
28
29
|
/* @__PURE__ */ l("div", {
|
|
@@ -30,57 +31,61 @@ function d() {
|
|
|
30
31
|
children: [
|
|
31
32
|
/* @__PURE__ */ l("button", {
|
|
32
33
|
type: "button",
|
|
33
|
-
onClick: () =>
|
|
34
|
+
onClick: () => m(`${h}/shortcuts/${_}`),
|
|
34
35
|
className: "\n inline-flex items-center gap-2 mb-4\n text-text-secondary\n hover:text-text-primary\n transition-colors duration-200\n ",
|
|
35
|
-
children: [/* @__PURE__ */ c(s, { size: 18 }),
|
|
36
|
+
children: [/* @__PURE__ */ c(s, { size: 18 }), g("shortcuts.backToShortcut", "Back to Shortcut")]
|
|
36
37
|
}),
|
|
37
38
|
/* @__PURE__ */ c("h1", {
|
|
38
39
|
className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary mb-2",
|
|
39
|
-
children:
|
|
40
|
+
children: g("shortcuts.editKeyboardShortcut", "Edit Keyboard Shortcut")
|
|
40
41
|
}),
|
|
41
42
|
/* @__PURE__ */ c("p", {
|
|
42
43
|
className: "text-text-secondary",
|
|
43
|
-
children:
|
|
44
|
+
children: g("shortcuts.editShortcutSubtitle", "Update the keyboard shortcut configuration")
|
|
45
|
+
}),
|
|
46
|
+
/* @__PURE__ */ c(f, {
|
|
47
|
+
className: "mt-3 max-w-2xl",
|
|
48
|
+
children: g("shortcuts.editPurpose", "Adjust this shortcut — rebind its keys, change the event it fires, update per-platform variants, or move it to a different category. Changes apply across the products that use this shortcut.")
|
|
44
49
|
})
|
|
45
50
|
]
|
|
46
51
|
}),
|
|
47
|
-
|
|
52
|
+
w && /* @__PURE__ */ c("div", {
|
|
48
53
|
className: "mb-6 p-4 bg-[var(--color-status-error-subtle)] border border-[var(--color-status-error)] rounded-lg",
|
|
49
54
|
children: /* @__PURE__ */ c("p", {
|
|
50
55
|
className: "text-[var(--color-status-error)]",
|
|
51
|
-
children:
|
|
56
|
+
children: w.message
|
|
52
57
|
})
|
|
53
58
|
}),
|
|
54
|
-
/* @__PURE__ */ c(
|
|
55
|
-
className: "
|
|
59
|
+
/* @__PURE__ */ c(d, {
|
|
60
|
+
className: "max-w-2xl",
|
|
56
61
|
children: /* @__PURE__ */ c(o, {
|
|
57
|
-
shortcut:
|
|
62
|
+
shortcut: v,
|
|
58
63
|
onSubmit: async (e) => {
|
|
59
64
|
try {
|
|
60
|
-
await
|
|
65
|
+
await S(_, e), m(`${h}/shortcuts/${_}`);
|
|
61
66
|
} catch (e) {
|
|
62
67
|
console.error("Failed to update shortcut:", e);
|
|
63
68
|
}
|
|
64
69
|
},
|
|
65
70
|
onCancel: () => {
|
|
66
|
-
|
|
71
|
+
m(`${h}/shortcuts/${_}`);
|
|
67
72
|
},
|
|
68
|
-
loading:
|
|
73
|
+
loading: C
|
|
69
74
|
})
|
|
70
75
|
})
|
|
71
76
|
]
|
|
72
77
|
}) : /* @__PURE__ */ c("div", {
|
|
73
78
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
74
79
|
children: /* @__PURE__ */ c(r, {
|
|
75
|
-
message:
|
|
80
|
+
message: g("shortcuts.shortcutNotFound", "Shortcut not found"),
|
|
76
81
|
action: {
|
|
77
|
-
label:
|
|
78
|
-
onClick: () =>
|
|
82
|
+
label: g("shortcuts.goBack", "Go Back"),
|
|
83
|
+
onClick: () => m(`${h}/shortcuts`)
|
|
79
84
|
}
|
|
80
85
|
})
|
|
81
86
|
});
|
|
82
87
|
}
|
|
83
88
|
//#endregion
|
|
84
|
-
export {
|
|
89
|
+
export { p as ShortcutEditPage };
|
|
85
90
|
|
|
86
91
|
//# sourceMappingURL=ShortcutEditPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShortcutEditPage.js","names":[],"sources":["../../../../../src/product-management/modules/shortcuts/pages/ShortcutEditPage.tsx"],"sourcesContent":["import { useParams } from 'react-router-dom';\nimport { ArrowLeft } from 'lucide-react';\nimport { useTr } from '../../../shared/hooks/useTr';\nimport { useProductConsole } from '../../../providers/ProductConsoleProvider';\nimport { useShortcut, useUpdateShortcut } from '../hooks/useShortcuts';\nimport { ShortcutForm } from '../components/ShortcutForm';\nimport { LoadingState } from '../../../shared/components/feedback/LoadingState';\nimport { ErrorState } from '../../../shared/components/feedback/ErrorState';\nimport type { UpdateKeyboardShortcutInput } from '../types';\n\nexport function ShortcutEditPage() {\n const { id } = useParams<{ id: string }>();\n const { navigate, basePath = '/products' } = useProductConsole();\n const tr = useTr();\n const shortcutId = id || '';\n\n const { shortcut, loading: fetchLoading, error: fetchError, refetch } = useShortcut(shortcutId);\n const { updateShortcut, loading: updateLoading, error: updateError } = useUpdateShortcut();\n\n const handleSubmit = async (data: UpdateKeyboardShortcutInput) => {\n try {\n await updateShortcut(shortcutId, data);\n navigate(`${basePath}/shortcuts/${shortcutId}`);\n } catch (error) {\n console.error('Failed to update shortcut:', error);\n }\n };\n\n const handleCancel = () => {\n navigate(`${basePath}/shortcuts/${shortcutId}`);\n };\n\n if (fetchLoading) {\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6\">\n <LoadingState message={tr('shortcuts.loadingShortcut', 'Loading shortcut...')} />\n </div>\n );\n }\n\n if (fetchError) {\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6\">\n <ErrorState\n message={fetchError.message}\n action={{\n label: tr('productCommon.retry', 'Retry'),\n onClick: () => refetch(),\n }}\n />\n </div>\n );\n }\n\n if (!shortcut) {\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6\">\n <ErrorState\n message={tr('shortcuts.shortcutNotFound', 'Shortcut not found')}\n action={{\n label: tr('shortcuts.goBack', 'Go Back'),\n onClick: () => navigate(`${basePath}/shortcuts`),\n }}\n />\n </div>\n );\n }\n\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6 animate-in fade-in duration-200\">\n {/* Page Header */}\n <div className=\"mb-6\">\n <button\n type=\"button\"\n onClick={() => navigate(`${basePath}/shortcuts/${shortcutId}`)}\n className=\"\n inline-flex items-center gap-2 mb-4\n text-text-secondary\n hover:text-text-primary\n transition-colors duration-200\n \"\n >\n <ArrowLeft size={18} />\n {tr('shortcuts.backToShortcut', 'Back to Shortcut')}\n </button>\n\n <h1 className=\"text-2xl md:text-3xl font-semibold tracking-tight text-text-primary mb-2\">\n {tr('shortcuts.editKeyboardShortcut', 'Edit Keyboard Shortcut')}\n </h1>\n <p className=\"text-text-secondary\">\n {tr('shortcuts.editShortcutSubtitle', 'Update the keyboard shortcut configuration')}\n </p>\n </div>\n\n {/* Error Message */}\n {updateError && (\n <div className=\"mb-6 p-4 bg-[var(--color-status-error-subtle)] border border-[var(--color-status-error)] rounded-lg\">\n <p className=\"text-[var(--color-status-error)]\">{updateError.message}</p>\n </div>\n )}\n\n {/* Form Card */}\n <
|
|
1
|
+
{"version":3,"file":"ShortcutEditPage.js","names":[],"sources":["../../../../../src/product-management/modules/shortcuts/pages/ShortcutEditPage.tsx"],"sourcesContent":["import { useParams } from 'react-router-dom';\nimport { ArrowLeft } from 'lucide-react';\nimport { EmphasisPanel, PagePurpose } from '@burdenoff/fe-libs/ui';\nimport { useTr } from '../../../shared/hooks/useTr';\nimport { useProductConsole } from '../../../providers/ProductConsoleProvider';\nimport { useShortcut, useUpdateShortcut } from '../hooks/useShortcuts';\nimport { ShortcutForm } from '../components/ShortcutForm';\nimport { LoadingState } from '../../../shared/components/feedback/LoadingState';\nimport { ErrorState } from '../../../shared/components/feedback/ErrorState';\nimport type { UpdateKeyboardShortcutInput } from '../types';\n\nexport function ShortcutEditPage() {\n const { id } = useParams<{ id: string }>();\n const { navigate, basePath = '/products' } = useProductConsole();\n const tr = useTr();\n const shortcutId = id || '';\n\n const { shortcut, loading: fetchLoading, error: fetchError, refetch } = useShortcut(shortcutId);\n const { updateShortcut, loading: updateLoading, error: updateError } = useUpdateShortcut();\n\n const handleSubmit = async (data: UpdateKeyboardShortcutInput) => {\n try {\n await updateShortcut(shortcutId, data);\n navigate(`${basePath}/shortcuts/${shortcutId}`);\n } catch (error) {\n console.error('Failed to update shortcut:', error);\n }\n };\n\n const handleCancel = () => {\n navigate(`${basePath}/shortcuts/${shortcutId}`);\n };\n\n if (fetchLoading) {\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6\">\n <LoadingState message={tr('shortcuts.loadingShortcut', 'Loading shortcut...')} />\n </div>\n );\n }\n\n if (fetchError) {\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6\">\n <ErrorState\n message={fetchError.message}\n action={{\n label: tr('productCommon.retry', 'Retry'),\n onClick: () => refetch(),\n }}\n />\n </div>\n );\n }\n\n if (!shortcut) {\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6\">\n <ErrorState\n message={tr('shortcuts.shortcutNotFound', 'Shortcut not found')}\n action={{\n label: tr('shortcuts.goBack', 'Go Back'),\n onClick: () => navigate(`${basePath}/shortcuts`),\n }}\n />\n </div>\n );\n }\n\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6 animate-in fade-in duration-200\">\n {/* Page Header */}\n <div className=\"mb-6\">\n <button\n type=\"button\"\n onClick={() => navigate(`${basePath}/shortcuts/${shortcutId}`)}\n className=\"\n inline-flex items-center gap-2 mb-4\n text-text-secondary\n hover:text-text-primary\n transition-colors duration-200\n \"\n >\n <ArrowLeft size={18} />\n {tr('shortcuts.backToShortcut', 'Back to Shortcut')}\n </button>\n\n <h1 className=\"text-2xl md:text-3xl font-semibold tracking-tight text-text-primary mb-2\">\n {tr('shortcuts.editKeyboardShortcut', 'Edit Keyboard Shortcut')}\n </h1>\n <p className=\"text-text-secondary\">\n {tr('shortcuts.editShortcutSubtitle', 'Update the keyboard shortcut configuration')}\n </p>\n\n <PagePurpose className=\"mt-3 max-w-2xl\">\n {tr(\n 'shortcuts.editPurpose',\n 'Adjust this shortcut — rebind its keys, change the event it fires, update per-platform variants, or move it to a different category. Changes apply across the products that use this shortcut.'\n )}\n </PagePurpose>\n </div>\n\n {/* Error Message */}\n {updateError && (\n <div className=\"mb-6 p-4 bg-[var(--color-status-error-subtle)] border border-[var(--color-status-error)] rounded-lg\">\n <p className=\"text-[var(--color-status-error)]\">{updateError.message}</p>\n </div>\n )}\n\n {/* Form Card */}\n <EmphasisPanel className=\"max-w-2xl\">\n <ShortcutForm\n shortcut={shortcut}\n onSubmit={handleSubmit}\n onCancel={handleCancel}\n loading={updateLoading}\n />\n </EmphasisPanel>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;AAWA,SAAgB,IAAmB;CACjC,IAAM,EAAE,UAAO,GAA2B,EACpC,EAAE,aAAU,cAAW,gBAAgB,GAAmB,EAC1D,IAAK,GAAO,EACZ,IAAa,KAAM,IAEnB,EAAE,aAAU,SAAS,GAAc,OAAO,GAAY,eAAY,EAAY,EAAW,EACzF,EAAE,mBAAgB,SAAS,GAAe,OAAO,MAAgB,GAAmB;AAmD1F,QApCI,IAEA,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,GAAD,EAAc,SAAS,EAAG,6BAA6B,sBAAsB,EAAI,CAAA;EAC7E,CAAA,GAIN,IAEA,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,GAAD;GACE,SAAS,EAAW;GACpB,QAAQ;IACN,OAAO,EAAG,uBAAuB,QAAQ;IACzC,eAAe,GAAS;IACzB;GACD,CAAA;EACE,CAAA,GAIL,IAeH,kBAAC,OAAD;EAAK,WAAU;YAAf;GAEE,kBAAC,OAAD;IAAK,WAAU;cAAf;KACE,kBAAC,UAAD;MACE,MAAK;MACL,eAAe,EAAS,GAAG,EAAS,aAAa,IAAa;MAC9D,WAAU;gBAHZ,CAUE,kBAAC,GAAD,EAAW,MAAM,IAAM,CAAA,EACtB,EAAG,4BAA4B,mBAAmB,CAC5C;;KAET,kBAAC,MAAD;MAAI,WAAU;gBACX,EAAG,kCAAkC,yBAAyB;MAC5D,CAAA;KACL,kBAAC,KAAD;MAAG,WAAU;gBACV,EAAG,kCAAkC,6CAA6C;MACjF,CAAA;KAEJ,kBAAC,GAAD;MAAa,WAAU;gBACpB,EACC,yBACA,iMACD;MACW,CAAA;KACV;;GAGL,KACC,kBAAC,OAAD;IAAK,WAAU;cACb,kBAAC,KAAD;KAAG,WAAU;eAAoC,EAAY;KAAY,CAAA;IACrE,CAAA;GAIR,kBAAC,GAAD;IAAe,WAAU;cACvB,kBAAC,GAAD;KACY;KACV,UAAU,OA7FU,MAAsC;AAChE,UAAI;AAEF,OADA,MAAM,EAAe,GAAY,EAAK,EACtC,EAAS,GAAG,EAAS,aAAa,IAAa;eACxC,GAAO;AACd,eAAQ,MAAM,8BAA8B,EAAM;;;KAyF9C,gBArFmB;AACzB,QAAS,GAAG,EAAS,aAAa,IAAa;;KAqFzC,SAAS;KACT,CAAA;IACY,CAAA;GACZ;MA7DJ,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,GAAD;GACE,SAAS,EAAG,8BAA8B,qBAAqB;GAC/D,QAAQ;IACN,OAAO,EAAG,oBAAoB,UAAU;IACxC,eAAe,EAAS,GAAG,EAAS,YAAY;IACjD;GACD,CAAA;EACE,CAAA"}
|
|
@@ -11,16 +11,16 @@ import { ShortcutCategories as p } from "../types/index.js";
|
|
|
11
11
|
import { ShortcutCategoryBadge as m } from "../components/ShortcutCategoryBadge.js";
|
|
12
12
|
import { ShortcutKeyBadge as h } from "../components/ShortcutKeyBadge.js";
|
|
13
13
|
import { useState as g } from "react";
|
|
14
|
-
import { Eye as _, Plus as v, RefreshCw as
|
|
15
|
-
import { jsx as
|
|
16
|
-
import { PermissionGate as
|
|
17
|
-
import { Button as
|
|
14
|
+
import { Eye as _, Plus as v, RefreshCw as te, Sparkles as y, SquarePen as b, ToggleLeft as x, ToggleRight as S, Trash2 as C } from "lucide-react";
|
|
15
|
+
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
16
|
+
import { PermissionGate as E } from "@burdenoff/fe-libs/shared/components";
|
|
17
|
+
import { Button as D, CTAOverflowMenu as O, GlassCard as k, GradientText as A, IllustratedEmptyState as j, PagePurpose as M } from "@burdenoff/fe-libs/ui";
|
|
18
18
|
//#region src/product-management/modules/shortcuts/pages/ShortcutsListPage.tsx
|
|
19
19
|
function N() {
|
|
20
20
|
let { navigate: N, basePath: P = "/products" } = t(), F = e(), { confirm: I, ConfirmDialog: L } = s(), [R, z] = g(""), B = c(R, 300), [V, H] = g({}), { shortcuts: U, loading: W, error: G, refetch: K } = d({
|
|
21
21
|
...V,
|
|
22
22
|
search: B || void 0
|
|
23
|
-
}, { limit: 50 }), { deleteShortcut: q, loading: J } = l(), { toggleShortcut: Y, loading: X } = f(), { seedDefaultShortcuts: Z, loading: Q } = u(),
|
|
23
|
+
}, { limit: 50 }), { deleteShortcut: q, loading: J } = l(), { toggleShortcut: Y, loading: X } = f(), { seedDefaultShortcuts: Z, loading: Q } = u(), ne = async (e) => {
|
|
24
24
|
a("medium");
|
|
25
25
|
let t = F("shortcuts.confirmDelete", "Are you sure you want to delete this shortcut?"), n = await i({
|
|
26
26
|
title: "Delete shortcut",
|
|
@@ -39,7 +39,7 @@ function N() {
|
|
|
39
39
|
} catch (e) {
|
|
40
40
|
o("error"), console.error("Failed to delete shortcut:", e);
|
|
41
41
|
}
|
|
42
|
-
},
|
|
42
|
+
}, re = async (e, t) => {
|
|
43
43
|
a("medium");
|
|
44
44
|
try {
|
|
45
45
|
await Y(e, !t), K();
|
|
@@ -66,204 +66,212 @@ function N() {
|
|
|
66
66
|
o("error"), console.error("Failed to seed shortcuts:", e);
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
|
-
return /* @__PURE__ */
|
|
69
|
+
return /* @__PURE__ */ T("div", {
|
|
70
70
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6 animate-in fade-in duration-200",
|
|
71
71
|
children: [
|
|
72
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ T("div", {
|
|
73
73
|
className: "mb-6",
|
|
74
|
-
children: [
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
actions: [{
|
|
91
|
-
label: F("shortcuts.seedDefaults", "Seed Defaults"),
|
|
92
|
-
onSelect: () => {
|
|
93
|
-
$();
|
|
74
|
+
children: [
|
|
75
|
+
/* @__PURE__ */ T("div", {
|
|
76
|
+
className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4",
|
|
77
|
+
children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h1", {
|
|
78
|
+
className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary mb-2",
|
|
79
|
+
children: /* @__PURE__ */ w(A, { children: F("shortcuts.title", "Keyboard Shortcuts") })
|
|
80
|
+
}), /* @__PURE__ */ w("p", {
|
|
81
|
+
className: "text-text-secondary",
|
|
82
|
+
children: F("shortcuts.subtitle", "Manage keyboard shortcuts across all Burdenoff products")
|
|
83
|
+
})] }), /* @__PURE__ */ w(E, {
|
|
84
|
+
role: "super_admin",
|
|
85
|
+
children: /* @__PURE__ */ w(O, {
|
|
86
|
+
primary: {
|
|
87
|
+
label: F("shortcuts.createShortcut", "Create Shortcut"),
|
|
88
|
+
onSelect: () => N(`${P}/shortcuts/new`),
|
|
89
|
+
icon: /* @__PURE__ */ w(v, { className: "size-4" })
|
|
94
90
|
},
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
children: F("shortcuts.allCategories", "All Categories")
|
|
119
|
-
}), Object.values(p).map((e) => /* @__PURE__ */ T("option", {
|
|
120
|
-
value: e,
|
|
121
|
-
children: e
|
|
122
|
-
}, e))]
|
|
123
|
-
}),
|
|
124
|
-
/* @__PURE__ */ E("select", {
|
|
125
|
-
value: V.isEnabled === void 0 || V.isEnabled === null ? "" : V.isEnabled.toString(),
|
|
126
|
-
onChange: (e) => H({
|
|
127
|
-
...V,
|
|
128
|
-
isEnabled: e.target.value === "" ? void 0 : e.target.value === "true"
|
|
91
|
+
actions: [{
|
|
92
|
+
label: F("shortcuts.seedDefaults", "Seed Defaults"),
|
|
93
|
+
onSelect: () => {
|
|
94
|
+
$();
|
|
95
|
+
},
|
|
96
|
+
disabled: Q,
|
|
97
|
+
icon: /* @__PURE__ */ w(y, { className: "size-4" })
|
|
98
|
+
}]
|
|
99
|
+
})
|
|
100
|
+
})]
|
|
101
|
+
}),
|
|
102
|
+
/* @__PURE__ */ w(M, {
|
|
103
|
+
className: "mb-4",
|
|
104
|
+
children: F("shortcuts.purpose", "Keyboard shortcuts map a key combination to an in-app event so power users can move fast. Define product-specific or global shortcuts, enable or disable them on the fly, and use \"Seed Defaults\" to load the standard set in one click.")
|
|
105
|
+
}),
|
|
106
|
+
/* @__PURE__ */ T("div", {
|
|
107
|
+
className: "flex gap-4",
|
|
108
|
+
children: [
|
|
109
|
+
/* @__PURE__ */ w(r, {
|
|
110
|
+
value: R,
|
|
111
|
+
onChange: z,
|
|
112
|
+
placeholder: F("shortcuts.searchPlaceholder", "Search shortcuts..."),
|
|
113
|
+
className: "flex-1"
|
|
129
114
|
}),
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
115
|
+
/* @__PURE__ */ T("select", {
|
|
116
|
+
value: V.category || "",
|
|
117
|
+
onChange: (e) => H({
|
|
118
|
+
...V,
|
|
119
|
+
category: e.target.value || void 0
|
|
135
120
|
}),
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
121
|
+
className: "\n px-4 py-2\n bg-surface\n border border-default\n rounded-lg\n text-text-primary\n focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)]\n transition-all duration-200\n ",
|
|
122
|
+
children: [/* @__PURE__ */ w("option", {
|
|
123
|
+
value: "",
|
|
124
|
+
children: F("shortcuts.allCategories", "All Categories")
|
|
125
|
+
}), Object.values(p).map((e) => /* @__PURE__ */ w("option", {
|
|
126
|
+
value: e,
|
|
127
|
+
children: e
|
|
128
|
+
}, e))]
|
|
129
|
+
}),
|
|
130
|
+
/* @__PURE__ */ T("select", {
|
|
131
|
+
value: V.isEnabled === void 0 || V.isEnabled === null ? "" : V.isEnabled.toString(),
|
|
132
|
+
onChange: (e) => H({
|
|
133
|
+
...V,
|
|
134
|
+
isEnabled: e.target.value === "" ? void 0 : e.target.value === "true"
|
|
139
135
|
}),
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
136
|
+
className: "\n px-4 py-2\n bg-surface\n border border-default\n rounded-lg\n text-text-primary\n focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)]\n transition-all duration-200\n ",
|
|
137
|
+
children: [
|
|
138
|
+
/* @__PURE__ */ w("option", {
|
|
139
|
+
value: "",
|
|
140
|
+
children: F("shortcuts.allStatus", "All Status")
|
|
141
|
+
}),
|
|
142
|
+
/* @__PURE__ */ w("option", {
|
|
143
|
+
value: "true",
|
|
144
|
+
children: F("shortcuts.enabled", "Enabled")
|
|
145
|
+
}),
|
|
146
|
+
/* @__PURE__ */ w("option", {
|
|
147
|
+
value: "false",
|
|
148
|
+
children: F("shortcuts.disabled", "Disabled")
|
|
149
|
+
})
|
|
150
|
+
]
|
|
151
|
+
}),
|
|
152
|
+
/* @__PURE__ */ w("button", {
|
|
153
|
+
type: "button",
|
|
154
|
+
onClick: () => K(),
|
|
155
|
+
className: "\n inline-flex items-center gap-2 px-4 py-2\n bg-surface\n text-text-primary\n border border-default\n rounded-lg\n hover:bg-bg-sunken\n transition-all duration-200\n ",
|
|
156
|
+
children: /* @__PURE__ */ w(te, { size: 18 })
|
|
157
|
+
})
|
|
158
|
+
]
|
|
159
|
+
})
|
|
160
|
+
]
|
|
154
161
|
}),
|
|
155
|
-
G ? /* @__PURE__ */
|
|
162
|
+
G ? /* @__PURE__ */ w(ee, {
|
|
156
163
|
message: G.message,
|
|
157
164
|
action: {
|
|
158
165
|
label: F("productCommon.retry", "Retry"),
|
|
159
166
|
onClick: () => K()
|
|
160
167
|
}
|
|
161
|
-
}) : W && U.length === 0 ? /* @__PURE__ */
|
|
168
|
+
}) : W && U.length === 0 ? /* @__PURE__ */ w(n, { message: F("shortcuts.loadingShortcuts", "Loading keyboard shortcuts...") }) : U.length === 0 ? /* @__PURE__ */ w(k, {
|
|
162
169
|
treatment: "insight",
|
|
163
170
|
className: "animate-in fade-in duration-200",
|
|
164
|
-
children: /* @__PURE__ */
|
|
171
|
+
children: /* @__PURE__ */ w(j, {
|
|
165
172
|
illustration: R || V.category || V.isEnabled !== void 0 ? "empty-search" : "empty-data",
|
|
166
173
|
title: F("shortcuts.noShortcutsFound", "No keyboard shortcuts found"),
|
|
167
|
-
action: /* @__PURE__ */
|
|
174
|
+
action: /* @__PURE__ */ T("div", {
|
|
168
175
|
className: "flex flex-wrap items-center justify-center gap-3",
|
|
169
|
-
children: [/* @__PURE__ */
|
|
176
|
+
children: [/* @__PURE__ */ T(D, {
|
|
170
177
|
type: "button",
|
|
171
178
|
variant: "outline",
|
|
172
179
|
onClick: $,
|
|
173
180
|
disabled: Q,
|
|
174
|
-
children: [/* @__PURE__ */
|
|
175
|
-
}), /* @__PURE__ */
|
|
181
|
+
children: [/* @__PURE__ */ w(y, { className: "size-4" }), F("shortcuts.seedDefaults", "Seed Defaults")]
|
|
182
|
+
}), /* @__PURE__ */ T(D, {
|
|
176
183
|
type: "button",
|
|
177
184
|
onClick: () => N(`${P}/shortcuts/new`),
|
|
178
|
-
children: [/* @__PURE__ */
|
|
185
|
+
children: [/* @__PURE__ */ w(v, { className: "size-4" }), F("shortcuts.createShortcut", "Create Shortcut")]
|
|
179
186
|
})]
|
|
180
187
|
})
|
|
181
188
|
})
|
|
182
|
-
}) : /* @__PURE__ */
|
|
183
|
-
treatment: "
|
|
189
|
+
}) : /* @__PURE__ */ w(k, {
|
|
190
|
+
treatment: "glass",
|
|
191
|
+
glow: !0,
|
|
184
192
|
className: "overflow-hidden p-0",
|
|
185
|
-
children: /* @__PURE__ */
|
|
193
|
+
children: /* @__PURE__ */ T("table", {
|
|
186
194
|
className: "w-full",
|
|
187
|
-
children: [/* @__PURE__ */
|
|
195
|
+
children: [/* @__PURE__ */ w("thead", {
|
|
188
196
|
className: "bg-bg-sunken/60 border-b border-border-seam",
|
|
189
|
-
children: /* @__PURE__ */
|
|
190
|
-
/* @__PURE__ */
|
|
197
|
+
children: /* @__PURE__ */ T("tr", { children: [
|
|
198
|
+
/* @__PURE__ */ w("th", {
|
|
191
199
|
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
192
200
|
children: F("shortcuts.columnShortcut", "Shortcut")
|
|
193
201
|
}),
|
|
194
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ w("th", {
|
|
195
203
|
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
196
204
|
children: F("shortcuts.columnLabel", "Label")
|
|
197
205
|
}),
|
|
198
|
-
/* @__PURE__ */
|
|
206
|
+
/* @__PURE__ */ w("th", {
|
|
199
207
|
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
200
208
|
children: F("shortcuts.columnCategory", "Category")
|
|
201
209
|
}),
|
|
202
|
-
/* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ w("th", {
|
|
203
211
|
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
204
212
|
children: F("shortcuts.columnEvent", "Event")
|
|
205
213
|
}),
|
|
206
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ w("th", {
|
|
207
215
|
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
208
216
|
children: F("shortcuts.columnProduct", "Product")
|
|
209
217
|
}),
|
|
210
|
-
/* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ w("th", {
|
|
211
219
|
className: "text-center px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
212
220
|
children: F("shortcuts.columnEnabled", "Enabled")
|
|
213
221
|
}),
|
|
214
|
-
/* @__PURE__ */
|
|
222
|
+
/* @__PURE__ */ w("th", {
|
|
215
223
|
className: "text-right px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
216
224
|
children: F("shortcuts.columnActions", "Actions")
|
|
217
225
|
})
|
|
218
226
|
] })
|
|
219
|
-
}), /* @__PURE__ */
|
|
227
|
+
}), /* @__PURE__ */ w("tbody", {
|
|
220
228
|
className: "divide-y divide-border-seam",
|
|
221
|
-
children: U.map((e) => /* @__PURE__ */
|
|
229
|
+
children: U.map((e) => /* @__PURE__ */ T("tr", {
|
|
222
230
|
className: "hover:bg-bg-sunken/70 transition-colors duration-200",
|
|
223
231
|
children: [
|
|
224
|
-
/* @__PURE__ */
|
|
232
|
+
/* @__PURE__ */ w("td", {
|
|
225
233
|
className: "px-6 py-4",
|
|
226
|
-
children: /* @__PURE__ */
|
|
234
|
+
children: /* @__PURE__ */ w(h, {
|
|
227
235
|
shortcutKey: e.shortcutKey,
|
|
228
236
|
isSequence: e.isSequence
|
|
229
237
|
})
|
|
230
238
|
}),
|
|
231
|
-
/* @__PURE__ */
|
|
239
|
+
/* @__PURE__ */ w("td", {
|
|
232
240
|
className: "px-6 py-4",
|
|
233
|
-
children: /* @__PURE__ */
|
|
241
|
+
children: /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
234
242
|
className: "font-medium text-text-primary",
|
|
235
243
|
children: e.label
|
|
236
|
-
}), e.description && /* @__PURE__ */
|
|
244
|
+
}), e.description && /* @__PURE__ */ w("p", {
|
|
237
245
|
className: "text-sm text-text-tertiary line-clamp-1",
|
|
238
246
|
children: e.description
|
|
239
247
|
})] })
|
|
240
248
|
}),
|
|
241
|
-
/* @__PURE__ */
|
|
249
|
+
/* @__PURE__ */ w("td", {
|
|
242
250
|
className: "px-6 py-4",
|
|
243
|
-
children: /* @__PURE__ */
|
|
251
|
+
children: /* @__PURE__ */ w(m, { category: e.category })
|
|
244
252
|
}),
|
|
245
|
-
/* @__PURE__ */
|
|
253
|
+
/* @__PURE__ */ w("td", {
|
|
246
254
|
className: "px-6 py-4",
|
|
247
|
-
children: /* @__PURE__ */
|
|
255
|
+
children: /* @__PURE__ */ w("code", {
|
|
248
256
|
className: "text-sm text-text-secondary bg-bg-sunken px-1.5 py-0.5 rounded font-mono",
|
|
249
257
|
children: e.eventName
|
|
250
258
|
})
|
|
251
259
|
}),
|
|
252
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ w("td", {
|
|
253
261
|
className: "px-6 py-4",
|
|
254
|
-
children: /* @__PURE__ */
|
|
262
|
+
children: /* @__PURE__ */ w("span", {
|
|
255
263
|
className: "text-sm text-text-primary",
|
|
256
|
-
children: e.product?.name || /* @__PURE__ */
|
|
264
|
+
children: e.product?.name || /* @__PURE__ */ w("span", {
|
|
257
265
|
className: "text-text-tertiary italic",
|
|
258
266
|
children: F("shortcuts.global", "Global")
|
|
259
267
|
})
|
|
260
268
|
})
|
|
261
269
|
}),
|
|
262
|
-
/* @__PURE__ */
|
|
270
|
+
/* @__PURE__ */ w("td", {
|
|
263
271
|
className: "px-6 py-4 text-center",
|
|
264
|
-
children: /* @__PURE__ */
|
|
272
|
+
children: /* @__PURE__ */ w("button", {
|
|
265
273
|
type: "button",
|
|
266
|
-
onClick: () =>
|
|
274
|
+
onClick: () => re(e.id, e.isEnabled),
|
|
267
275
|
disabled: X,
|
|
268
276
|
className: `
|
|
269
277
|
p-1 rounded-lg transition-all duration-200
|
|
@@ -271,34 +279,34 @@ function N() {
|
|
|
271
279
|
disabled:opacity-50
|
|
272
280
|
`,
|
|
273
281
|
title: e.isEnabled ? F("shortcuts.disable", "Disable") : F("shortcuts.enable", "Enable"),
|
|
274
|
-
children: e.isEnabled ? /* @__PURE__ */
|
|
282
|
+
children: e.isEnabled ? /* @__PURE__ */ w(S, { size: 24 }) : /* @__PURE__ */ w(x, { size: 24 })
|
|
275
283
|
})
|
|
276
284
|
}),
|
|
277
|
-
/* @__PURE__ */
|
|
285
|
+
/* @__PURE__ */ w("td", {
|
|
278
286
|
className: "px-6 py-4",
|
|
279
|
-
children: /* @__PURE__ */
|
|
287
|
+
children: /* @__PURE__ */ T("div", {
|
|
280
288
|
className: "flex items-center justify-end gap-2",
|
|
281
|
-
children: [/* @__PURE__ */
|
|
289
|
+
children: [/* @__PURE__ */ w("button", {
|
|
282
290
|
type: "button",
|
|
283
291
|
onClick: () => N(`${P}/shortcuts/${e.id}`),
|
|
284
292
|
className: "p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200",
|
|
285
293
|
title: F("shortcuts.viewDetails", "View details"),
|
|
286
|
-
children: /* @__PURE__ */
|
|
287
|
-
}), /* @__PURE__ */ E
|
|
294
|
+
children: /* @__PURE__ */ w(_, { size: 18 })
|
|
295
|
+
}), /* @__PURE__ */ T(E, {
|
|
288
296
|
role: "super_admin",
|
|
289
|
-
children: [/* @__PURE__ */
|
|
297
|
+
children: [/* @__PURE__ */ w("button", {
|
|
290
298
|
type: "button",
|
|
291
299
|
onClick: () => N(`${P}/shortcuts/${e.id}/edit`),
|
|
292
300
|
className: "p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200",
|
|
293
301
|
title: F("shortcuts.edit", "Edit"),
|
|
294
|
-
children: /* @__PURE__ */
|
|
295
|
-
}), /* @__PURE__ */
|
|
302
|
+
children: /* @__PURE__ */ w(b, { size: 18 })
|
|
303
|
+
}), /* @__PURE__ */ w("button", {
|
|
296
304
|
type: "button",
|
|
297
|
-
onClick: () =>
|
|
305
|
+
onClick: () => ne(e.id),
|
|
298
306
|
disabled: J,
|
|
299
307
|
className: "p-2 rounded-lg text-[var(--color-status-error)] hover:bg-[var(--color-status-error-subtle)] transition-all duration-200 disabled:opacity-50",
|
|
300
308
|
title: F("shortcuts.delete", "Delete"),
|
|
301
|
-
children: /* @__PURE__ */
|
|
309
|
+
children: /* @__PURE__ */ w(C, { size: 18 })
|
|
302
310
|
})]
|
|
303
311
|
})]
|
|
304
312
|
})
|