@burdenoff/microfe-product 2026.624.2 → 2026.625.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.
- package/dist/product/pages/ContentPageViewPage.js +25 -24
- package/dist/product/pages/ContentPageViewPage.js.map +1 -1
- package/dist/product/pages/ProductCatalogPage.js +69 -64
- package/dist/product/pages/ProductCatalogPage.js.map +1 -1
- package/dist/product/pages/ProductViewPage.js +91 -86
- package/dist/product/pages/ProductViewPage.js.map +1 -1
- package/dist/product-management/modules/content-pages/components/ContentPageForm.js +7 -7
- package/dist/product-management/modules/content-pages/components/ContentPageForm.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPageCreatePage.js +2 -2
- package/dist/product-management/modules/content-pages/pages/ContentPageCreatePage.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js +243 -230
- package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPageEditPage.js +2 -2
- package/dist/product-management/modules/content-pages/pages/ContentPageEditPage.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js +293 -277
- package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.js +1 -1
- package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js +2 -2
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js +158 -148
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.js +2 -2
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js +98 -81
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js.map +1 -1
- package/dist/product-management/modules/press-kit/components/PressKitAssetForm.js +4 -4
- package/dist/product-management/modules/press-kit/components/PressKitAssetForm.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitCreatePage.js +2 -2
- package/dist/product-management/modules/press-kit/pages/PressKitCreatePage.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js +109 -99
- package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitEditPage.js +2 -2
- package/dist/product-management/modules/press-kit/pages/PressKitEditPage.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitListPage.js +252 -236
- package/dist/product-management/modules/press-kit/pages/PressKitListPage.js.map +1 -1
- package/dist/product-management/modules/products/components/ProductForm.js +8 -8
- package/dist/product-management/modules/products/components/ProductForm.js.map +1 -1
- package/dist/product-management/modules/products/components/ProductPlans.js +4 -4
- package/dist/product-management/modules/products/components/ProductPlans.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductCreatePage.js +2 -2
- package/dist/product-management/modules/products/pages/ProductCreatePage.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductDetailPage.js +408 -395
- package/dist/product-management/modules/products/pages/ProductDetailPage.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductEditPage.js +2 -2
- package/dist/product-management/modules/products/pages/ProductEditPage.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductsListPage.js +301 -281
- package/dist/product-management/modules/products/pages/ProductsListPage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/components/ShortcutForm.js +3 -3
- package/dist/product-management/modules/shortcuts/components/ShortcutForm.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutCreatePage.js +2 -2
- package/dist/product-management/modules/shortcuts/pages/ShortcutCreatePage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js +221 -218
- package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutEditPage.js +2 -2
- package/dist/product-management/modules/shortcuts/pages/ShortcutEditPage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js +260 -241
- package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js.map +1 -1
- package/dist/product-management/shared/components/AuditHistoryTab.js +1 -1
- package/dist/product-management/shared/components/AuditHistoryTab.js.map +1 -1
- package/dist/product-management/shared/components/feedback/EmptyState.js +2 -20
- package/dist/product-management/shared/hooks/useConfirmDialog.js +44 -0
- package/dist/product-management/shared/hooks/useConfirmDialog.js.map +1 -0
- package/package.json +2 -2
- package/dist/product-management/shared/components/feedback/EmptyState.js.map +0 -1
|
@@ -3,273 +3,276 @@ import { useProductConsole as t } from "../../../providers/ProductConsoleProvide
|
|
|
3
3
|
import { LoadingState as n } from "../../../shared/components/feedback/LoadingState.js";
|
|
4
4
|
import { ErrorState as r } from "../../../shared/components/feedback/ErrorState.js";
|
|
5
5
|
import { nativeConfirm as i, nativeImpact as a, nativeNotify as o } from "../../../../utils/nativeBridge.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
6
|
+
import { useConfirmDialog as s } from "../../../shared/hooks/useConfirmDialog.js";
|
|
7
|
+
import { useDeleteShortcut as c, useShortcut as l, useToggleShortcut as u } from "../hooks/useShortcuts.js";
|
|
8
|
+
import { ShortcutCategoryBadge as d } from "../components/ShortcutCategoryBadge.js";
|
|
9
|
+
import { ShortcutKeyBadge as f } from "../components/ShortcutKeyBadge.js";
|
|
10
|
+
import { ArrowLeft as p, SquarePen as m, ToggleLeft as h, ToggleRight as g, Trash2 as _ } from "lucide-react";
|
|
11
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
11
12
|
import { useParams as b } from "react-router-dom";
|
|
13
|
+
import { CTAOverflowMenu as x, GradientText as S } from "@burdenoff/fe-libs/ui";
|
|
12
14
|
//#region src/product-management/modules/shortcuts/pages/ShortcutDetailPage.tsx
|
|
13
|
-
function
|
|
14
|
-
let { id:
|
|
15
|
-
|
|
15
|
+
function C() {
|
|
16
|
+
let { id: C } = b(), { navigate: w, basePath: T = "/products" } = t(), E = e(), { confirm: D, ConfirmDialog: O } = s(), k = C || "", { shortcut: A, loading: j, error: M, refetch: N } = l(k), { deleteShortcut: P, loading: F } = c(), { toggleShortcut: I, loading: L } = u(), R = async () => {
|
|
17
|
+
a("medium");
|
|
18
|
+
let e = E("shortcuts.confirmDelete", "Are you sure you want to delete this shortcut?"), t = await i({
|
|
19
|
+
title: "Delete shortcut",
|
|
20
|
+
message: e,
|
|
21
|
+
okButtonTitle: "Delete",
|
|
22
|
+
cancelButtonTitle: "Cancel"
|
|
23
|
+
});
|
|
24
|
+
if (t === null ? await D({
|
|
25
|
+
title: "Delete shortcut",
|
|
26
|
+
message: e,
|
|
27
|
+
okButtonTitle: "Delete",
|
|
28
|
+
cancelButtonTitle: "Cancel",
|
|
29
|
+
destructive: !0
|
|
30
|
+
}) : t) try {
|
|
31
|
+
await P(k), o("success"), w(`${T}/shortcuts`);
|
|
32
|
+
} catch (e) {
|
|
33
|
+
o("error"), console.error("Failed to delete shortcut:", e);
|
|
34
|
+
}
|
|
35
|
+
}, z = async () => {
|
|
36
|
+
if (A) {
|
|
37
|
+
a("medium");
|
|
38
|
+
try {
|
|
39
|
+
await I(k, !A.isEnabled), N();
|
|
40
|
+
} catch (e) {
|
|
41
|
+
o("error"), console.error("Failed to toggle shortcut:", e);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
return j ? /* @__PURE__ */ v("div", {
|
|
16
46
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
17
|
-
children: /* @__PURE__ */ v(n, { message:
|
|
18
|
-
}) :
|
|
47
|
+
children: /* @__PURE__ */ v(n, { message: E("shortcuts.loadingShortcut", "Loading shortcut...") })
|
|
48
|
+
}) : M ? /* @__PURE__ */ v("div", {
|
|
19
49
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
20
50
|
children: /* @__PURE__ */ v(r, {
|
|
21
|
-
message:
|
|
51
|
+
message: M.message,
|
|
22
52
|
action: {
|
|
23
|
-
label:
|
|
24
|
-
onClick: () =>
|
|
53
|
+
label: E("productCommon.retry", "Retry"),
|
|
54
|
+
onClick: () => N()
|
|
25
55
|
}
|
|
26
56
|
})
|
|
27
|
-
}) :
|
|
57
|
+
}) : A ? /* @__PURE__ */ y("div", {
|
|
28
58
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6 animate-in fade-in duration-200",
|
|
29
|
-
children: [
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
className: "flex items-start justify-between",
|
|
38
|
-
children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y("div", {
|
|
39
|
-
className: "flex items-center gap-3 mb-2",
|
|
40
|
-
children: [/* @__PURE__ */ v("h1", {
|
|
41
|
-
className: "text-3xl font-bold text-text-primary",
|
|
42
|
-
children: E.label
|
|
43
|
-
}), /* @__PURE__ */ v(u, { category: E.category })]
|
|
59
|
+
children: [
|
|
60
|
+
/* @__PURE__ */ y("div", {
|
|
61
|
+
className: "mb-6",
|
|
62
|
+
children: [/* @__PURE__ */ y("button", {
|
|
63
|
+
type: "button",
|
|
64
|
+
onClick: () => w(`${T}/shortcuts`),
|
|
65
|
+
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 ",
|
|
66
|
+
children: [/* @__PURE__ */ v(p, { size: 18 }), E("shortcuts.backToShortcuts", "Back to Shortcuts")]
|
|
44
67
|
}), /* @__PURE__ */ y("div", {
|
|
45
|
-
className: "flex items-
|
|
46
|
-
children: [/* @__PURE__ */
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
children:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
children: [
|
|
59
|
-
/* @__PURE__ */ v("button", {
|
|
60
|
-
type: "button",
|
|
61
|
-
onClick: async () => {
|
|
62
|
-
if (E) {
|
|
63
|
-
a("medium");
|
|
64
|
-
try {
|
|
65
|
-
await M(T, !E.isEnabled), k();
|
|
66
|
-
} catch (e) {
|
|
67
|
-
o("error"), console.error("Failed to toggle shortcut:", e);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
disabled: N,
|
|
68
|
+
className: "flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4",
|
|
69
|
+
children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y("div", {
|
|
70
|
+
className: "flex flex-wrap items-center gap-3 mb-2",
|
|
71
|
+
children: [/* @__PURE__ */ v("h1", {
|
|
72
|
+
className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary",
|
|
73
|
+
children: /* @__PURE__ */ v(S, { children: A.label })
|
|
74
|
+
}), /* @__PURE__ */ v(d, { category: A.category })]
|
|
75
|
+
}), /* @__PURE__ */ y("div", {
|
|
76
|
+
className: "flex items-center gap-3",
|
|
77
|
+
children: [/* @__PURE__ */ v(f, {
|
|
78
|
+
shortcutKey: A.shortcutKey,
|
|
79
|
+
isSequence: A.isSequence
|
|
80
|
+
}), /* @__PURE__ */ y("span", {
|
|
72
81
|
className: `
|
|
73
|
-
inline-flex items-center gap-
|
|
74
|
-
|
|
75
|
-
transition-all duration-200
|
|
76
|
-
font-medium
|
|
77
|
-
disabled:opacity-50
|
|
78
|
-
${E.isEnabled ? "bg-surface text-text-primary border border-default hover:bg-bg-sunken" : "bg-[var(--color-status-success-subtle)] text-[var(--color-status-success)] border border-[var(--color-status-success)] hover:bg-[var(--color-status-success)] hover:text-white"}
|
|
82
|
+
inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-xs font-medium
|
|
83
|
+
${A.isEnabled ? "bg-[var(--color-status-success-subtle)] text-[var(--color-status-success)]" : "bg-bg-sunken text-text-tertiary"}
|
|
79
84
|
`,
|
|
80
|
-
children:
|
|
81
|
-
})
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
let e = w("shortcuts.confirmDelete", "Are you sure you want to delete this shortcut?"), t = await i({
|
|
93
|
-
title: "Delete shortcut",
|
|
94
|
-
message: e,
|
|
95
|
-
okButtonTitle: "Delete",
|
|
96
|
-
cancelButtonTitle: "Cancel"
|
|
97
|
-
});
|
|
98
|
-
if (t === null ? window.confirm(e) : t) try {
|
|
99
|
-
await A(T), o("success"), S(`${C}/shortcuts`);
|
|
100
|
-
} catch (e) {
|
|
101
|
-
o("error"), console.error("Failed to delete shortcut:", e);
|
|
102
|
-
}
|
|
85
|
+
children: [A.isEnabled && /* @__PURE__ */ v("span", { className: "size-1.5 rounded-full bg-[var(--color-status-success)] motion-safe:animate-vc-glow-pulse" }), A.isEnabled ? E("shortcuts.enabled", "Enabled") : E("shortcuts.disabled", "Disabled")]
|
|
86
|
+
})]
|
|
87
|
+
})] }), /* @__PURE__ */ v(x, {
|
|
88
|
+
primary: {
|
|
89
|
+
label: E("shortcuts.edit", "Edit"),
|
|
90
|
+
onSelect: () => w(`${T}/shortcuts/${k}/edit`),
|
|
91
|
+
icon: /* @__PURE__ */ v(m, { className: "size-4" })
|
|
92
|
+
},
|
|
93
|
+
actions: [{
|
|
94
|
+
label: A.isEnabled ? E("shortcuts.disable", "Disable") : E("shortcuts.enable", "Enable"),
|
|
95
|
+
onSelect: () => {
|
|
96
|
+
z();
|
|
103
97
|
},
|
|
104
|
-
disabled:
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
className: "text-lg font-semibold text-text-primary mb-4",
|
|
117
|
-
children: w("shortcuts.shortcutDetails", "Shortcut Details")
|
|
118
|
-
}), /* @__PURE__ */ y("dl", {
|
|
119
|
-
className: "space-y-4",
|
|
120
|
-
children: [
|
|
121
|
-
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
|
|
122
|
-
className: "text-sm font-medium text-text-secondary",
|
|
123
|
-
children: w("shortcuts.label", "Label")
|
|
124
|
-
}), /* @__PURE__ */ v("dd", {
|
|
125
|
-
className: "text-text-primary mt-1",
|
|
126
|
-
children: E.label
|
|
127
|
-
})] }),
|
|
128
|
-
E.description && /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
|
|
129
|
-
className: "text-sm font-medium text-text-secondary",
|
|
130
|
-
children: w("shortcuts.description", "Description")
|
|
131
|
-
}), /* @__PURE__ */ v("dd", {
|
|
132
|
-
className: "text-text-primary mt-1",
|
|
133
|
-
children: E.description
|
|
134
|
-
})] }),
|
|
135
|
-
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
|
|
136
|
-
className: "text-sm font-medium text-text-secondary",
|
|
137
|
-
children: w("shortcuts.shortcutKey", "Shortcut Key")
|
|
138
|
-
}), /* @__PURE__ */ v("dd", {
|
|
139
|
-
className: "mt-1",
|
|
140
|
-
children: /* @__PURE__ */ v(d, {
|
|
141
|
-
shortcutKey: E.shortcutKey,
|
|
142
|
-
isSequence: E.isSequence
|
|
143
|
-
})
|
|
144
|
-
})] }),
|
|
145
|
-
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
|
|
146
|
-
className: "text-sm font-medium text-text-secondary",
|
|
147
|
-
children: w("shortcuts.eventName", "Event Name")
|
|
148
|
-
}), /* @__PURE__ */ v("dd", {
|
|
149
|
-
className: "mt-1",
|
|
150
|
-
children: /* @__PURE__ */ v("code", {
|
|
151
|
-
className: "text-sm text-text-secondary bg-bg-sunken px-2 py-1 rounded font-mono",
|
|
152
|
-
children: E.eventName
|
|
153
|
-
})
|
|
154
|
-
})] }),
|
|
155
|
-
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
|
|
156
|
-
className: "text-sm font-medium text-text-secondary",
|
|
157
|
-
children: w("shortcuts.category", "Category")
|
|
158
|
-
}), /* @__PURE__ */ v("dd", {
|
|
159
|
-
className: "mt-1",
|
|
160
|
-
children: /* @__PURE__ */ v(u, { category: E.category })
|
|
161
|
-
})] }),
|
|
162
|
-
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
|
|
163
|
-
className: "text-sm font-medium text-text-secondary",
|
|
164
|
-
children: w("shortcuts.product", "Product")
|
|
165
|
-
}), /* @__PURE__ */ v("dd", {
|
|
166
|
-
className: "text-text-primary mt-1",
|
|
167
|
-
children: E.product?.name || /* @__PURE__ */ v("span", {
|
|
168
|
-
className: "text-text-tertiary italic",
|
|
169
|
-
children: w("shortcuts.globalAllProducts", "Global (All Products)")
|
|
170
|
-
})
|
|
171
|
-
})] }),
|
|
172
|
-
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
|
|
173
|
-
className: "text-sm font-medium text-text-secondary",
|
|
174
|
-
children: w("shortcuts.type", "Type")
|
|
175
|
-
}), /* @__PURE__ */ v("dd", {
|
|
176
|
-
className: "text-text-primary mt-1",
|
|
177
|
-
children: E.isSequence ? w("shortcuts.keySequence", "Key Sequence") : w("shortcuts.keyCombination", "Key Combination")
|
|
178
|
-
})] }),
|
|
179
|
-
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
|
|
180
|
-
className: "text-sm font-medium text-text-secondary",
|
|
181
|
-
children: w("shortcuts.sortOrder", "Sort Order")
|
|
182
|
-
}), /* @__PURE__ */ v("dd", {
|
|
183
|
-
className: "text-text-primary mt-1",
|
|
184
|
-
children: E.sortOrder
|
|
185
|
-
})] })
|
|
186
|
-
]
|
|
98
|
+
disabled: L,
|
|
99
|
+
icon: A.isEnabled ? /* @__PURE__ */ v(h, { className: "size-4" }) : /* @__PURE__ */ v(g, { className: "size-4" })
|
|
100
|
+
}, {
|
|
101
|
+
label: E("shortcuts.delete", "Delete"),
|
|
102
|
+
onSelect: () => {
|
|
103
|
+
R();
|
|
104
|
+
},
|
|
105
|
+
intent: "destructive",
|
|
106
|
+
disabled: F,
|
|
107
|
+
icon: /* @__PURE__ */ v(_, { className: "size-4" })
|
|
108
|
+
}]
|
|
109
|
+
})]
|
|
187
110
|
})]
|
|
188
|
-
}),
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
111
|
+
}),
|
|
112
|
+
/* @__PURE__ */ y("div", {
|
|
113
|
+
className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
|
|
114
|
+
children: [/* @__PURE__ */ y("div", {
|
|
115
|
+
className: "bg-bg-surface bg-accent-wash border border-border-seam rounded-card shadow-elevation-1 p-6",
|
|
116
|
+
children: [/* @__PURE__ */ v("h2", {
|
|
192
117
|
className: "text-lg font-semibold text-text-primary mb-4",
|
|
193
|
-
children:
|
|
194
|
-
}),
|
|
195
|
-
/* @__PURE__ */ y("dl", {
|
|
118
|
+
children: E("shortcuts.shortcutDetails", "Shortcut Details")
|
|
119
|
+
}), /* @__PURE__ */ y("dl", {
|
|
196
120
|
className: "space-y-4",
|
|
197
121
|
children: [
|
|
198
122
|
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
|
|
199
123
|
className: "text-sm font-medium text-text-secondary",
|
|
200
|
-
children:
|
|
124
|
+
children: E("shortcuts.label", "Label")
|
|
125
|
+
}), /* @__PURE__ */ v("dd", {
|
|
126
|
+
className: "text-text-primary mt-1",
|
|
127
|
+
children: A.label
|
|
128
|
+
})] }),
|
|
129
|
+
A.description && /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
|
|
130
|
+
className: "text-sm font-medium text-text-secondary",
|
|
131
|
+
children: E("shortcuts.description", "Description")
|
|
132
|
+
}), /* @__PURE__ */ v("dd", {
|
|
133
|
+
className: "text-text-primary mt-1",
|
|
134
|
+
children: A.description
|
|
135
|
+
})] }),
|
|
136
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
|
|
137
|
+
className: "text-sm font-medium text-text-secondary",
|
|
138
|
+
children: E("shortcuts.shortcutKey", "Shortcut Key")
|
|
201
139
|
}), /* @__PURE__ */ v("dd", {
|
|
202
140
|
className: "mt-1",
|
|
203
|
-
children: /* @__PURE__ */ v(
|
|
204
|
-
shortcutKey:
|
|
205
|
-
isSequence:
|
|
141
|
+
children: /* @__PURE__ */ v(f, {
|
|
142
|
+
shortcutKey: A.shortcutKey,
|
|
143
|
+
isSequence: A.isSequence
|
|
206
144
|
})
|
|
207
145
|
})] }),
|
|
208
146
|
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
|
|
209
147
|
className: "text-sm font-medium text-text-secondary",
|
|
210
|
-
children:
|
|
148
|
+
children: E("shortcuts.eventName", "Event Name")
|
|
211
149
|
}), /* @__PURE__ */ v("dd", {
|
|
212
150
|
className: "mt-1",
|
|
213
|
-
children:
|
|
214
|
-
className: "text-text-
|
|
215
|
-
children:
|
|
151
|
+
children: /* @__PURE__ */ v("code", {
|
|
152
|
+
className: "text-sm text-text-secondary bg-bg-sunken px-2 py-1 rounded font-mono",
|
|
153
|
+
children: A.eventName
|
|
216
154
|
})
|
|
217
155
|
})] }),
|
|
218
156
|
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
|
|
219
157
|
className: "text-sm font-medium text-text-secondary",
|
|
220
|
-
children:
|
|
158
|
+
children: E("shortcuts.category", "Category")
|
|
221
159
|
}), /* @__PURE__ */ v("dd", {
|
|
222
160
|
className: "mt-1",
|
|
223
|
-
children:
|
|
161
|
+
children: /* @__PURE__ */ v(d, { category: A.category })
|
|
162
|
+
})] }),
|
|
163
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
|
|
164
|
+
className: "text-sm font-medium text-text-secondary",
|
|
165
|
+
children: E("shortcuts.product", "Product")
|
|
166
|
+
}), /* @__PURE__ */ v("dd", {
|
|
167
|
+
className: "text-text-primary mt-1",
|
|
168
|
+
children: A.product?.name || /* @__PURE__ */ v("span", {
|
|
224
169
|
className: "text-text-tertiary italic",
|
|
225
|
-
children:
|
|
170
|
+
children: E("shortcuts.globalAllProducts", "Global (All Products)")
|
|
226
171
|
})
|
|
172
|
+
})] }),
|
|
173
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
|
|
174
|
+
className: "text-sm font-medium text-text-secondary",
|
|
175
|
+
children: E("shortcuts.type", "Type")
|
|
176
|
+
}), /* @__PURE__ */ v("dd", {
|
|
177
|
+
className: "text-text-primary mt-1",
|
|
178
|
+
children: A.isSequence ? E("shortcuts.keySequence", "Key Sequence") : E("shortcuts.keyCombination", "Key Combination")
|
|
179
|
+
})] }),
|
|
180
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
|
|
181
|
+
className: "text-sm font-medium text-text-secondary",
|
|
182
|
+
children: E("shortcuts.sortOrder", "Sort Order")
|
|
183
|
+
}), /* @__PURE__ */ v("dd", {
|
|
184
|
+
className: "text-text-primary mt-1",
|
|
185
|
+
children: A.sortOrder
|
|
227
186
|
})] })
|
|
228
187
|
]
|
|
229
|
-
})
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
188
|
+
})]
|
|
189
|
+
}), /* @__PURE__ */ y("div", {
|
|
190
|
+
className: "bg-bg-surface bg-accent-wash border border-border-seam rounded-card shadow-elevation-1 p-6",
|
|
191
|
+
children: [
|
|
192
|
+
/* @__PURE__ */ v("h2", {
|
|
193
|
+
className: "text-lg font-semibold text-text-primary mb-4",
|
|
194
|
+
children: E("shortcuts.platformKeys", "Platform Keys")
|
|
195
|
+
}),
|
|
196
|
+
/* @__PURE__ */ y("dl", {
|
|
197
|
+
className: "space-y-4",
|
|
198
|
+
children: [
|
|
199
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
|
|
200
|
+
className: "text-sm font-medium text-text-secondary",
|
|
201
|
+
children: E("shortcuts.defaultKey", "Default Key")
|
|
242
202
|
}), /* @__PURE__ */ v("dd", {
|
|
243
|
-
className: "
|
|
244
|
-
children:
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
203
|
+
className: "mt-1",
|
|
204
|
+
children: /* @__PURE__ */ v(f, {
|
|
205
|
+
shortcutKey: A.shortcutKey,
|
|
206
|
+
isSequence: A.isSequence
|
|
207
|
+
})
|
|
208
|
+
})] }),
|
|
209
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
|
|
210
|
+
className: "text-sm font-medium text-text-secondary",
|
|
211
|
+
children: E("shortcuts.macKey", "Mac Key")
|
|
212
|
+
}), /* @__PURE__ */ v("dd", {
|
|
213
|
+
className: "mt-1",
|
|
214
|
+
children: A.macKey ? /* @__PURE__ */ v(f, { shortcutKey: A.macKey }) : /* @__PURE__ */ v("span", {
|
|
215
|
+
className: "text-text-tertiary italic",
|
|
216
|
+
children: E("shortcuts.sameAsDefault", "Same as default")
|
|
217
|
+
})
|
|
218
|
+
})] }),
|
|
219
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
|
|
220
|
+
className: "text-sm font-medium text-text-secondary",
|
|
221
|
+
children: E("shortcuts.windowsLinuxKey", "Windows/Linux Key")
|
|
251
222
|
}), /* @__PURE__ */ v("dd", {
|
|
252
|
-
className: "
|
|
253
|
-
children:
|
|
223
|
+
className: "mt-1",
|
|
224
|
+
children: A.windowsKey ? /* @__PURE__ */ v(f, { shortcutKey: A.windowsKey }) : /* @__PURE__ */ v("span", {
|
|
225
|
+
className: "text-text-tertiary italic",
|
|
226
|
+
children: E("shortcuts.sameAsDefault", "Same as default")
|
|
227
|
+
})
|
|
228
|
+
})] })
|
|
229
|
+
]
|
|
230
|
+
}),
|
|
231
|
+
/* @__PURE__ */ y("div", {
|
|
232
|
+
className: "mt-6 pt-4 border-t border-border-seam",
|
|
233
|
+
children: [/* @__PURE__ */ v("h3", {
|
|
234
|
+
className: "text-sm font-semibold text-text-secondary mb-3",
|
|
235
|
+
children: E("shortcuts.timestamps", "Timestamps")
|
|
236
|
+
}), /* @__PURE__ */ y("dl", {
|
|
237
|
+
className: "space-y-2 text-sm",
|
|
238
|
+
children: [/* @__PURE__ */ y("div", {
|
|
239
|
+
className: "flex justify-between",
|
|
240
|
+
children: [/* @__PURE__ */ v("dt", {
|
|
241
|
+
className: "text-text-tertiary",
|
|
242
|
+
children: E("shortcuts.created", "Created")
|
|
243
|
+
}), /* @__PURE__ */ v("dd", {
|
|
244
|
+
className: "text-text-primary",
|
|
245
|
+
children: new Date(A.createdAt).toLocaleString()
|
|
246
|
+
})]
|
|
247
|
+
}), /* @__PURE__ */ y("div", {
|
|
248
|
+
className: "flex justify-between",
|
|
249
|
+
children: [/* @__PURE__ */ v("dt", {
|
|
250
|
+
className: "text-text-tertiary",
|
|
251
|
+
children: E("shortcuts.updated", "Updated")
|
|
252
|
+
}), /* @__PURE__ */ v("dd", {
|
|
253
|
+
className: "text-text-primary",
|
|
254
|
+
children: new Date(A.updatedAt).toLocaleString()
|
|
255
|
+
})]
|
|
254
256
|
})]
|
|
255
257
|
})]
|
|
256
|
-
})
|
|
257
|
-
|
|
258
|
-
]
|
|
259
|
-
})
|
|
260
|
-
|
|
258
|
+
})
|
|
259
|
+
]
|
|
260
|
+
})]
|
|
261
|
+
}),
|
|
262
|
+
O
|
|
263
|
+
]
|
|
261
264
|
}) : /* @__PURE__ */ v("div", {
|
|
262
265
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
263
266
|
children: /* @__PURE__ */ v(r, {
|
|
264
|
-
message:
|
|
267
|
+
message: E("shortcuts.shortcutNotFound", "Shortcut not found"),
|
|
265
268
|
action: {
|
|
266
|
-
label:
|
|
267
|
-
onClick: () =>
|
|
269
|
+
label: E("shortcuts.goBack", "Go Back"),
|
|
270
|
+
onClick: () => w(`${T}/shortcuts`)
|
|
268
271
|
}
|
|
269
272
|
})
|
|
270
273
|
});
|
|
271
274
|
}
|
|
272
275
|
//#endregion
|
|
273
|
-
export {
|
|
276
|
+
export { C as ShortcutDetailPage };
|
|
274
277
|
|
|
275
278
|
//# sourceMappingURL=ShortcutDetailPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShortcutDetailPage.js","names":[],"sources":["../../../../../src/product-management/modules/shortcuts/pages/ShortcutDetailPage.tsx"],"sourcesContent":["import { useParams } from 'react-router-dom';\nimport { ArrowLeft, SquarePen, Trash2, ToggleLeft, ToggleRight } from 'lucide-react';\nimport { useTr } from '../../../shared/hooks/useTr';\nimport { useProductConsole } from '../../../providers/ProductConsoleProvider';\nimport { useShortcut, useDeleteShortcut, useToggleShortcut } from '../hooks/useShortcuts';\nimport { ShortcutCategoryBadge } from '../components/ShortcutCategoryBadge';\nimport { ShortcutKeyBadge } from '../components/ShortcutKeyBadge';\nimport { LoadingState } from '../../../shared/components/feedback/LoadingState';\nimport { ErrorState } from '../../../shared/components/feedback/ErrorState';\nimport { nativeConfirm, nativeImpact, nativeNotify } from '../../../../utils/nativeBridge';\n\nexport function ShortcutDetailPage() {\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, error, refetch } = useShortcut(shortcutId);\n const { deleteShortcut, loading: deleteLoading } = useDeleteShortcut();\n const { toggleShortcut, loading: toggleLoading } = useToggleShortcut();\n\n const handleDelete = async () => {\n void nativeImpact('medium');\n const message = tr('shortcuts.confirmDelete', 'Are you sure you want to delete this shortcut?');\n const native = await nativeConfirm({\n title: 'Delete shortcut',\n message,\n okButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n });\n const ok = native === null ? window.confirm(message) : native;\n if (!ok) return;\n\n try {\n await deleteShortcut(shortcutId);\n void nativeNotify('success');\n navigate(`${basePath}/shortcuts`);\n } catch (error) {\n void nativeNotify('error');\n console.error('Failed to delete shortcut:', error);\n }\n };\n\n const handleToggle = async () => {\n if (!shortcut) return;\n void nativeImpact('medium');\n\n try {\n await toggleShortcut(shortcutId, !shortcut.isEnabled);\n refetch();\n } catch (error) {\n void nativeNotify('error');\n console.error('Failed to toggle shortcut:', error);\n }\n };\n\n if (loading) {\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 (error) {\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6\">\n <ErrorState\n message={error.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`)}\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.backToShortcuts', 'Back to Shortcuts')}\n </button>\n\n <div className=\"flex items-start justify-between\">\n <div>\n <div className=\"flex items-center gap-3 mb-2\">\n <h1 className=\"text-3xl font-bold text-text-primary\">{shortcut.label}</h1>\n <ShortcutCategoryBadge category={shortcut.category} />\n </div>\n <div className=\"flex items-center gap-3\">\n <ShortcutKeyBadge\n shortcutKey={shortcut.shortcutKey}\n isSequence={shortcut.isSequence}\n />\n <span\n className={`\n inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium\n ${\n shortcut.isEnabled\n ? 'bg-[var(--color-status-success-subtle)] text-[var(--color-status-success)]'\n : 'bg-bg-sunken text-text-tertiary'\n }\n `}\n >\n {shortcut.isEnabled\n ? tr('shortcuts.enabled', 'Enabled')\n : tr('shortcuts.disabled', 'Disabled')}\n </span>\n </div>\n </div>\n\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={handleToggle}\n disabled={toggleLoading}\n className={`\n inline-flex items-center gap-2 px-4 py-2\n rounded-lg\n transition-all duration-200\n font-medium\n disabled:opacity-50\n ${\n shortcut.isEnabled\n ? 'bg-surface text-text-primary border border-default hover:bg-bg-sunken'\n : 'bg-[var(--color-status-success-subtle)] text-[var(--color-status-success)] border border-[var(--color-status-success)] hover:bg-[var(--color-status-success)] hover:text-white'\n }\n `}\n >\n {shortcut.isEnabled ? (\n <>\n <ToggleLeft size={18} />\n {tr('shortcuts.disable', 'Disable')}\n </>\n ) : (\n <>\n <ToggleRight size={18} />\n {tr('shortcuts.enable', 'Enable')}\n </>\n )}\n </button>\n\n <button\n type=\"button\"\n onClick={() => navigate(`${basePath}/shortcuts/${shortcutId}/edit`)}\n className=\"\n inline-flex items-center gap-2 px-4 py-2\n bg-[var(--color-action-primary-bg)]\n text-[var(--color-action-primary-text)]\n rounded-lg\n hover:opacity-90\n transition-all duration-200\n font-medium\n \"\n >\n <SquarePen size={18} />\n {tr('shortcuts.edit', 'Edit')}\n </button>\n\n <button\n type=\"button\"\n onClick={handleDelete}\n disabled={deleteLoading}\n className=\"\n inline-flex items-center gap-2 px-4 py-2\n bg-[var(--color-status-error-subtle)]\n text-[var(--color-status-error)]\n border border-[var(--color-status-error)]\n rounded-lg\n hover:bg-[var(--color-status-error)] hover:text-white\n transition-all duration-200\n font-medium\n disabled:opacity-50\n \"\n >\n <Trash2 size={18} />\n {tr('shortcuts.delete', 'Delete')}\n </button>\n </div>\n </div>\n </div>\n\n {/* Details Grid */}\n <div className=\"grid grid-cols-1 lg:grid-cols-2 gap-6\">\n {/* Main Info Card */}\n <div className=\"bg-surface border border-default rounded-lg shadow-[var(--shadow-elevation-1)] p-6\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">\n {tr('shortcuts.shortcutDetails', 'Shortcut Details')}\n </h2>\n\n <dl className=\"space-y-4\">\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('shortcuts.label', 'Label')}\n </dt>\n <dd className=\"text-text-primary mt-1\">{shortcut.label}</dd>\n </div>\n\n {shortcut.description && (\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('shortcuts.description', 'Description')}\n </dt>\n <dd className=\"text-text-primary mt-1\">{shortcut.description}</dd>\n </div>\n )}\n\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('shortcuts.shortcutKey', 'Shortcut Key')}\n </dt>\n <dd className=\"mt-1\">\n <ShortcutKeyBadge\n shortcutKey={shortcut.shortcutKey}\n isSequence={shortcut.isSequence}\n />\n </dd>\n </div>\n\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('shortcuts.eventName', 'Event Name')}\n </dt>\n <dd className=\"mt-1\">\n <code className=\"text-sm text-text-secondary bg-bg-sunken px-2 py-1 rounded font-mono\">\n {shortcut.eventName}\n </code>\n </dd>\n </div>\n\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('shortcuts.category', 'Category')}\n </dt>\n <dd className=\"mt-1\">\n <ShortcutCategoryBadge category={shortcut.category} />\n </dd>\n </div>\n\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('shortcuts.product', 'Product')}\n </dt>\n <dd className=\"text-text-primary mt-1\">\n {shortcut.product?.name || (\n <span className=\"text-text-tertiary italic\">\n {tr('shortcuts.globalAllProducts', 'Global (All Products)')}\n </span>\n )}\n </dd>\n </div>\n\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('shortcuts.type', 'Type')}\n </dt>\n <dd className=\"text-text-primary mt-1\">\n {shortcut.isSequence\n ? tr('shortcuts.keySequence', 'Key Sequence')\n : tr('shortcuts.keyCombination', 'Key Combination')}\n </dd>\n </div>\n\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('shortcuts.sortOrder', 'Sort Order')}\n </dt>\n <dd className=\"text-text-primary mt-1\">{shortcut.sortOrder}</dd>\n </div>\n </dl>\n </div>\n\n {/* Platform-Specific Keys Card */}\n <div className=\"bg-surface border border-default rounded-lg shadow-[var(--shadow-elevation-1)] p-6\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">\n {tr('shortcuts.platformKeys', 'Platform Keys')}\n </h2>\n\n <dl className=\"space-y-4\">\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('shortcuts.defaultKey', 'Default Key')}\n </dt>\n <dd className=\"mt-1\">\n <ShortcutKeyBadge\n shortcutKey={shortcut.shortcutKey}\n isSequence={shortcut.isSequence}\n />\n </dd>\n </div>\n\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('shortcuts.macKey', 'Mac Key')}\n </dt>\n <dd className=\"mt-1\">\n {shortcut.macKey ? (\n <ShortcutKeyBadge shortcutKey={shortcut.macKey} />\n ) : (\n <span className=\"text-text-tertiary italic\">\n {tr('shortcuts.sameAsDefault', 'Same as default')}\n </span>\n )}\n </dd>\n </div>\n\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('shortcuts.windowsLinuxKey', 'Windows/Linux Key')}\n </dt>\n <dd className=\"mt-1\">\n {shortcut.windowsKey ? (\n <ShortcutKeyBadge shortcutKey={shortcut.windowsKey} />\n ) : (\n <span className=\"text-text-tertiary italic\">\n {tr('shortcuts.sameAsDefault', 'Same as default')}\n </span>\n )}\n </dd>\n </div>\n </dl>\n\n <div className=\"mt-6 pt-4 border-t border-default\">\n <h3 className=\"text-sm font-semibold text-text-secondary mb-3\">\n {tr('shortcuts.timestamps', 'Timestamps')}\n </h3>\n <dl className=\"space-y-2 text-sm\">\n <div className=\"flex justify-between\">\n <dt className=\"text-text-tertiary\">{tr('shortcuts.created', 'Created')}</dt>\n <dd className=\"text-text-primary\">\n {new Date(shortcut.createdAt).toLocaleString()}\n </dd>\n </div>\n <div className=\"flex justify-between\">\n <dt className=\"text-text-tertiary\">{tr('shortcuts.updated', 'Updated')}</dt>\n <dd className=\"text-text-primary\">\n {new Date(shortcut.updatedAt).toLocaleString()}\n </dd>\n </div>\n </dl>\n </div>\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAWA,SAAgB,IAAqB;CACnC,IAAM,EAAE,UAAO,GAA2B,EACpC,EAAE,aAAU,cAAW,gBAAgB,GAAmB,EAC1D,IAAK,GAAO,EACZ,IAAa,KAAM,IAEnB,EAAE,aAAU,YAAS,UAAO,eAAY,EAAY,EAAW,EAC/D,EAAE,mBAAgB,SAAS,MAAkB,GAAmB,EAChE,EAAE,mBAAgB,SAAS,MAAkB,GAAmB;AAyEtE,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,EAAM;GACf,QAAQ;IACN,OAAO,EAAG,uBAAuB,QAAQ;IACzC,eAAe,GAAS;IACzB;GACD,CAAA;EACE,CAAA,GAIL,IAeH,kBAAC,OAAD;EAAK,WAAU;YAAf,CAEE,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,UAAD;IACE,MAAK;IACL,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AsB,EAAG,qBAAqB,UAAU;SAAM,CAAA,EAC5E,kBAAC,MAAD;SAAI,WAAU;mBACX,IAAI,KAAK,EAAS,UAAU,CAAC,gBAAgB;SAC3C,CAAA,CACD;WACN,kBAAC,OAAD;QAAK,WAAU;kBAAf,CACE,kBAAC,MAAD;SAAI,WAAU;mBAAsB,EAAG,qBAAqB,UAAU;SAAM,CAAA,EAC5E,kBAAC,MAAD;SAAI,WAAU;mBACX,IAAI,KAAK,EAAS,UAAU,CAAC,gBAAgB;SAC3C,CAAA,CACD;UACH;SACD;;KACF;MACF;KACF;MAlSJ,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"}
|
|
1
|
+
{"version":3,"file":"ShortcutDetailPage.js","names":[],"sources":["../../../../../src/product-management/modules/shortcuts/pages/ShortcutDetailPage.tsx"],"sourcesContent":["import { useParams } from 'react-router-dom';\nimport { ArrowLeft, SquarePen, Trash2, ToggleLeft, ToggleRight } from 'lucide-react';\nimport { CTAOverflowMenu, GradientText } from '@burdenoff/fe-libs/ui';\nimport { useTr } from '../../../shared/hooks/useTr';\nimport { useProductConsole } from '../../../providers/ProductConsoleProvider';\nimport { useShortcut, useDeleteShortcut, useToggleShortcut } from '../hooks/useShortcuts';\nimport { ShortcutCategoryBadge } from '../components/ShortcutCategoryBadge';\nimport { ShortcutKeyBadge } from '../components/ShortcutKeyBadge';\nimport { LoadingState } from '../../../shared/components/feedback/LoadingState';\nimport { ErrorState } from '../../../shared/components/feedback/ErrorState';\nimport { nativeConfirm, nativeImpact, nativeNotify } from '../../../../utils/nativeBridge';\nimport { useConfirmDialog } from '../../../shared/hooks/useConfirmDialog';\n\nexport function ShortcutDetailPage() {\n const { id } = useParams<{ id: string }>();\n const { navigate, basePath = '/products' } = useProductConsole();\n const tr = useTr();\n const { confirm, ConfirmDialog } = useConfirmDialog();\n const shortcutId = id || '';\n\n const { shortcut, loading, error, refetch } = useShortcut(shortcutId);\n const { deleteShortcut, loading: deleteLoading } = useDeleteShortcut();\n const { toggleShortcut, loading: toggleLoading } = useToggleShortcut();\n\n const handleDelete = async () => {\n void nativeImpact('medium');\n const message = tr('shortcuts.confirmDelete', 'Are you sure you want to delete this shortcut?');\n const native = await nativeConfirm({\n title: 'Delete shortcut',\n message,\n okButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n });\n const ok =\n native === null\n ? await confirm({\n title: 'Delete shortcut',\n message,\n okButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n destructive: true,\n })\n : native;\n if (!ok) return;\n\n try {\n await deleteShortcut(shortcutId);\n void nativeNotify('success');\n navigate(`${basePath}/shortcuts`);\n } catch (error) {\n void nativeNotify('error');\n console.error('Failed to delete shortcut:', error);\n }\n };\n\n const handleToggle = async () => {\n if (!shortcut) return;\n void nativeImpact('medium');\n\n try {\n await toggleShortcut(shortcutId, !shortcut.isEnabled);\n refetch();\n } catch (error) {\n void nativeNotify('error');\n console.error('Failed to toggle shortcut:', error);\n }\n };\n\n if (loading) {\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 (error) {\n return (\n <div className=\"min-h-full bg-[var(--color-bg-canvas)] p-6\">\n <ErrorState\n message={error.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`)}\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.backToShortcuts', 'Back to Shortcuts')}\n </button>\n\n <div className=\"flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4\">\n <div>\n <div className=\"flex flex-wrap items-center gap-3 mb-2\">\n <h1 className=\"text-2xl md:text-3xl font-semibold tracking-tight text-text-primary\">\n <GradientText>{shortcut.label}</GradientText>\n </h1>\n <ShortcutCategoryBadge category={shortcut.category} />\n </div>\n <div className=\"flex items-center gap-3\">\n <ShortcutKeyBadge\n shortcutKey={shortcut.shortcutKey}\n isSequence={shortcut.isSequence}\n />\n <span\n className={`\n inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-xs font-medium\n ${\n shortcut.isEnabled\n ? 'bg-[var(--color-status-success-subtle)] text-[var(--color-status-success)]'\n : 'bg-bg-sunken text-text-tertiary'\n }\n `}\n >\n {shortcut.isEnabled && (\n <span className=\"size-1.5 rounded-full bg-[var(--color-status-success)] motion-safe:animate-vc-glow-pulse\" />\n )}\n {shortcut.isEnabled\n ? tr('shortcuts.enabled', 'Enabled')\n : tr('shortcuts.disabled', 'Disabled')}\n </span>\n </div>\n </div>\n\n <CTAOverflowMenu\n primary={{\n label: tr('shortcuts.edit', 'Edit'),\n onSelect: () => navigate(`${basePath}/shortcuts/${shortcutId}/edit`),\n icon: <SquarePen className=\"size-4\" />,\n }}\n actions={[\n {\n label: shortcut.isEnabled\n ? tr('shortcuts.disable', 'Disable')\n : tr('shortcuts.enable', 'Enable'),\n onSelect: () => {\n void handleToggle();\n },\n disabled: toggleLoading,\n icon: shortcut.isEnabled ? (\n <ToggleLeft className=\"size-4\" />\n ) : (\n <ToggleRight className=\"size-4\" />\n ),\n },\n {\n label: tr('shortcuts.delete', 'Delete'),\n onSelect: () => {\n void handleDelete();\n },\n intent: 'destructive',\n disabled: deleteLoading,\n icon: <Trash2 className=\"size-4\" />,\n },\n ]}\n />\n </div>\n </div>\n\n {/* Details Grid */}\n <div className=\"grid grid-cols-1 lg:grid-cols-2 gap-6\">\n {/* Main Info Card */}\n <div className=\"bg-bg-surface bg-accent-wash border border-border-seam rounded-card shadow-elevation-1 p-6\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">\n {tr('shortcuts.shortcutDetails', 'Shortcut Details')}\n </h2>\n\n <dl className=\"space-y-4\">\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('shortcuts.label', 'Label')}\n </dt>\n <dd className=\"text-text-primary mt-1\">{shortcut.label}</dd>\n </div>\n\n {shortcut.description && (\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('shortcuts.description', 'Description')}\n </dt>\n <dd className=\"text-text-primary mt-1\">{shortcut.description}</dd>\n </div>\n )}\n\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('shortcuts.shortcutKey', 'Shortcut Key')}\n </dt>\n <dd className=\"mt-1\">\n <ShortcutKeyBadge\n shortcutKey={shortcut.shortcutKey}\n isSequence={shortcut.isSequence}\n />\n </dd>\n </div>\n\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('shortcuts.eventName', 'Event Name')}\n </dt>\n <dd className=\"mt-1\">\n <code className=\"text-sm text-text-secondary bg-bg-sunken px-2 py-1 rounded font-mono\">\n {shortcut.eventName}\n </code>\n </dd>\n </div>\n\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('shortcuts.category', 'Category')}\n </dt>\n <dd className=\"mt-1\">\n <ShortcutCategoryBadge category={shortcut.category} />\n </dd>\n </div>\n\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('shortcuts.product', 'Product')}\n </dt>\n <dd className=\"text-text-primary mt-1\">\n {shortcut.product?.name || (\n <span className=\"text-text-tertiary italic\">\n {tr('shortcuts.globalAllProducts', 'Global (All Products)')}\n </span>\n )}\n </dd>\n </div>\n\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('shortcuts.type', 'Type')}\n </dt>\n <dd className=\"text-text-primary mt-1\">\n {shortcut.isSequence\n ? tr('shortcuts.keySequence', 'Key Sequence')\n : tr('shortcuts.keyCombination', 'Key Combination')}\n </dd>\n </div>\n\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('shortcuts.sortOrder', 'Sort Order')}\n </dt>\n <dd className=\"text-text-primary mt-1\">{shortcut.sortOrder}</dd>\n </div>\n </dl>\n </div>\n\n {/* Platform-Specific Keys Card */}\n <div className=\"bg-bg-surface bg-accent-wash border border-border-seam rounded-card shadow-elevation-1 p-6\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">\n {tr('shortcuts.platformKeys', 'Platform Keys')}\n </h2>\n\n <dl className=\"space-y-4\">\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('shortcuts.defaultKey', 'Default Key')}\n </dt>\n <dd className=\"mt-1\">\n <ShortcutKeyBadge\n shortcutKey={shortcut.shortcutKey}\n isSequence={shortcut.isSequence}\n />\n </dd>\n </div>\n\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('shortcuts.macKey', 'Mac Key')}\n </dt>\n <dd className=\"mt-1\">\n {shortcut.macKey ? (\n <ShortcutKeyBadge shortcutKey={shortcut.macKey} />\n ) : (\n <span className=\"text-text-tertiary italic\">\n {tr('shortcuts.sameAsDefault', 'Same as default')}\n </span>\n )}\n </dd>\n </div>\n\n <div>\n <dt className=\"text-sm font-medium text-text-secondary\">\n {tr('shortcuts.windowsLinuxKey', 'Windows/Linux Key')}\n </dt>\n <dd className=\"mt-1\">\n {shortcut.windowsKey ? (\n <ShortcutKeyBadge shortcutKey={shortcut.windowsKey} />\n ) : (\n <span className=\"text-text-tertiary italic\">\n {tr('shortcuts.sameAsDefault', 'Same as default')}\n </span>\n )}\n </dd>\n </div>\n </dl>\n\n <div className=\"mt-6 pt-4 border-t border-border-seam\">\n <h3 className=\"text-sm font-semibold text-text-secondary mb-3\">\n {tr('shortcuts.timestamps', 'Timestamps')}\n </h3>\n <dl className=\"space-y-2 text-sm\">\n <div className=\"flex justify-between\">\n <dt className=\"text-text-tertiary\">{tr('shortcuts.created', 'Created')}</dt>\n <dd className=\"text-text-primary\">\n {new Date(shortcut.createdAt).toLocaleString()}\n </dd>\n </div>\n <div className=\"flex justify-between\">\n <dt className=\"text-text-tertiary\">{tr('shortcuts.updated', 'Updated')}</dt>\n <dd className=\"text-text-primary\">\n {new Date(shortcut.updatedAt).toLocaleString()}\n </dd>\n </div>\n </dl>\n </div>\n </div>\n </div>\n {ConfirmDialog}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAaA,SAAgB,IAAqB;CACnC,IAAM,EAAE,UAAO,GAA2B,EACpC,EAAE,aAAU,cAAW,gBAAgB,GAAmB,EAC1D,IAAK,GAAO,EACZ,EAAE,YAAS,qBAAkB,GAAkB,EAC/C,IAAa,KAAM,IAEnB,EAAE,aAAU,YAAS,UAAO,eAAY,EAAY,EAAW,EAC/D,EAAE,mBAAgB,SAAS,MAAkB,GAAmB,EAChE,EAAE,mBAAgB,SAAS,MAAkB,GAAmB,EAEhE,IAAe,YAAY;AAC1B,IAAa,SAAS;EAC3B,IAAM,IAAU,EAAG,2BAA2B,iDAAiD,EACzF,IAAS,MAAM,EAAc;GACjC,OAAO;GACP;GACA,eAAe;GACf,mBAAmB;GACpB,CAAC;AAEA,YAAW,OACP,MAAM,EAAQ;GACZ,OAAO;GACP;GACA,eAAe;GACf,mBAAmB;GACnB,aAAa;GACd,CAAC,GACF,EAGN,KAAI;AAGF,GAFA,MAAM,EAAe,EAAW,EAC3B,EAAa,UAAU,EAC5B,EAAS,GAAG,EAAS,YAAY;WAC1B,GAAO;AAEd,GADK,EAAa,QAAQ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UAAI,WAAU;oBAAsB,EAAG,qBAAqB,UAAU;UAAM,CAAA,EAC5E,kBAAC,MAAD;UAAI,WAAU;oBACX,IAAI,KAAK,EAAS,UAAU,CAAC,gBAAgB;UAC3C,CAAA,CACD;YACN,kBAAC,OAAD;SAAK,WAAU;mBAAf,CACE,kBAAC,MAAD;UAAI,WAAU;oBAAsB,EAAG,qBAAqB,UAAU;UAAM,CAAA,EAC5E,kBAAC,MAAD;UAAI,WAAU;oBACX,IAAI,KAAK,EAAS,UAAU,CAAC,gBAAgB;UAC3C,CAAA,CACD;WACH;UACD;;MACF;OACF;;GACL;GACG;MApQJ,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"}
|
|
@@ -35,7 +35,7 @@ function d() {
|
|
|
35
35
|
children: [/* @__PURE__ */ c(s, { size: 18 }), m("shortcuts.backToShortcut", "Back to Shortcut")]
|
|
36
36
|
}),
|
|
37
37
|
/* @__PURE__ */ c("h1", {
|
|
38
|
-
className: "text-3xl font-
|
|
38
|
+
className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary mb-2",
|
|
39
39
|
children: m("shortcuts.editKeyboardShortcut", "Edit Keyboard Shortcut")
|
|
40
40
|
}),
|
|
41
41
|
/* @__PURE__ */ c("p", {
|
|
@@ -52,7 +52,7 @@ function d() {
|
|
|
52
52
|
})
|
|
53
53
|
}),
|
|
54
54
|
/* @__PURE__ */ c("div", {
|
|
55
|
-
className: "bg-surface border border-
|
|
55
|
+
className: "bg-bg-surface bg-accent-wash border border-border-seam rounded-card shadow-elevation-1 p-6 max-w-2xl",
|
|
56
56
|
children: /* @__PURE__ */ c(o, {
|
|
57
57
|
shortcut: g,
|
|
58
58
|
onSubmit: async (e) => {
|