@burdenoff/microfe-product 2026.624.2 → 2026.624.3
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-management/modules/content-pages/pages/ContentPageDetailPage.js +241 -230
- package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js +292 -281
- package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js +143 -135
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js +25 -12
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js +94 -86
- package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitListPage.js +249 -238
- package/dist/product-management/modules/press-kit/pages/PressKitListPage.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductDetailPage.js +406 -395
- package/dist/product-management/modules/products/pages/ProductDetailPage.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductsListPage.js +285 -274
- package/dist/product-management/modules/products/pages/ProductsListPage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js +235 -224
- package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js +260 -244
- package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js.map +1 -1
- package/dist/product-management/shared/hooks/useConfirmDialog.js +44 -0
- package/dist/product-management/shared/hooks/useConfirmDialog.js.map +1 -0
- package/package.json +1 -1
|
@@ -4,296 +4,312 @@ import { LoadingState as n } from "../../../shared/components/feedback/LoadingSt
|
|
|
4
4
|
import { ErrorState as r } from "../../../shared/components/feedback/ErrorState.js";
|
|
5
5
|
import { SearchInput as i } from "../../../shared/components/input/SearchInput.js";
|
|
6
6
|
import { nativeConfirm as a, nativeImpact as o, nativeNotify as s } from "../../../../utils/nativeBridge.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
7
|
+
import { useConfirmDialog as c } from "../../../shared/hooks/useConfirmDialog.js";
|
|
8
|
+
import { useDebounced as l } from "../../../shared/hooks/useDebounced.js";
|
|
9
|
+
import { useDeleteShortcut as u, useSeedDefaultShortcuts as d, useShortcuts as f, useToggleShortcut as p } from "../hooks/useShortcuts.js";
|
|
10
|
+
import { ShortcutCategories as m } from "../types/index.js";
|
|
11
|
+
import { ShortcutCategoryBadge as h } from "../components/ShortcutCategoryBadge.js";
|
|
12
|
+
import { ShortcutKeyBadge as g } from "../components/ShortcutKeyBadge.js";
|
|
13
|
+
import { useState as _ } from "react";
|
|
14
|
+
import { Eye as v, Plus as y, RefreshCw as b, Sparkles as x, SquarePen as S, ToggleLeft as C, ToggleRight as w, Trash2 as T } from "lucide-react";
|
|
15
|
+
import { jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
16
|
+
import { PermissionGate as O } from "@burdenoff/fe-libs/shared/components";
|
|
16
17
|
//#region src/product-management/modules/shortcuts/pages/ShortcutsListPage.tsx
|
|
17
|
-
function
|
|
18
|
-
let { navigate:
|
|
19
|
-
...
|
|
20
|
-
search:
|
|
21
|
-
}, { limit: 50 }), { deleteShortcut:
|
|
18
|
+
function k() {
|
|
19
|
+
let { navigate: k, basePath: A = "/products" } = t(), j = e(), { confirm: M, ConfirmDialog: N } = c(), [P, F] = _(""), I = l(P, 300), [L, R] = _({}), { shortcuts: z, loading: B, error: V, refetch: H } = f({
|
|
20
|
+
...L,
|
|
21
|
+
search: I || void 0
|
|
22
|
+
}, { limit: 50 }), { deleteShortcut: U, loading: W } = u(), { toggleShortcut: G, loading: K } = p(), { seedDefaultShortcuts: q, loading: J } = d(), Y = async (e) => {
|
|
22
23
|
o("medium");
|
|
23
|
-
let t =
|
|
24
|
+
let t = j("shortcuts.confirmDelete", "Are you sure you want to delete this shortcut?"), n = await a({
|
|
24
25
|
title: "Delete shortcut",
|
|
25
26
|
message: t,
|
|
26
27
|
okButtonTitle: "Delete",
|
|
27
28
|
cancelButtonTitle: "Cancel"
|
|
28
29
|
});
|
|
29
|
-
if (n === null ?
|
|
30
|
-
|
|
30
|
+
if (n === null ? await M({
|
|
31
|
+
title: "Delete shortcut",
|
|
32
|
+
message: t,
|
|
33
|
+
okButtonTitle: "Delete",
|
|
34
|
+
cancelButtonTitle: "Cancel",
|
|
35
|
+
destructive: !0
|
|
36
|
+
}) : n) try {
|
|
37
|
+
await U(e), s("success"), H();
|
|
31
38
|
} catch (e) {
|
|
32
39
|
s("error"), console.error("Failed to delete shortcut:", e);
|
|
33
40
|
}
|
|
34
|
-
},
|
|
41
|
+
}, X = async (e, t) => {
|
|
35
42
|
o("medium");
|
|
36
43
|
try {
|
|
37
|
-
await
|
|
44
|
+
await G(e, !t), H();
|
|
38
45
|
} catch (e) {
|
|
39
46
|
s("error"), console.error("Failed to toggle shortcut:", e);
|
|
40
47
|
}
|
|
41
|
-
},
|
|
48
|
+
}, Z = async () => {
|
|
42
49
|
o("light");
|
|
43
|
-
let e =
|
|
50
|
+
let e = j("shortcuts.confirmSeedDefaults", "This will create default global shortcuts. Continue?"), t = await a({
|
|
44
51
|
title: "Seed defaults",
|
|
45
52
|
message: e,
|
|
46
53
|
okButtonTitle: "Continue",
|
|
47
54
|
cancelButtonTitle: "Cancel"
|
|
48
55
|
});
|
|
49
|
-
if (t === null ?
|
|
50
|
-
|
|
51
|
-
|
|
56
|
+
if (t === null ? await M({
|
|
57
|
+
title: "Seed defaults",
|
|
58
|
+
message: e,
|
|
59
|
+
okButtonTitle: "Continue",
|
|
60
|
+
cancelButtonTitle: "Cancel"
|
|
61
|
+
}) : t) try {
|
|
62
|
+
let e = (await q()).data?.seedDefaultShortcuts || 0;
|
|
63
|
+
s("success"), alert(`Created ${e} default shortcuts.`), H();
|
|
52
64
|
} catch (e) {
|
|
53
65
|
s("error"), console.error("Failed to seed shortcuts:", e);
|
|
54
66
|
}
|
|
55
67
|
};
|
|
56
|
-
return /* @__PURE__ */
|
|
68
|
+
return /* @__PURE__ */ D("div", {
|
|
57
69
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6 animate-in fade-in duration-200",
|
|
58
|
-
children: [
|
|
59
|
-
|
|
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
|
-
/* @__PURE__ */ E("select", {
|
|
96
|
-
value: P.category || "",
|
|
97
|
-
onChange: (e) => F({
|
|
98
|
-
...P,
|
|
99
|
-
category: e.target.value || void 0
|
|
100
|
-
}),
|
|
101
|
-
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 ",
|
|
102
|
-
children: [/* @__PURE__ */ T("option", {
|
|
103
|
-
value: "",
|
|
104
|
-
children: A("shortcuts.allCategories", "All Categories")
|
|
105
|
-
}), Object.values(p).map((e) => /* @__PURE__ */ T("option", {
|
|
106
|
-
value: e,
|
|
107
|
-
children: e
|
|
108
|
-
}, e))]
|
|
109
|
-
}),
|
|
110
|
-
/* @__PURE__ */ E("select", {
|
|
111
|
-
value: P.isEnabled === void 0 || P.isEnabled === null ? "" : P.isEnabled.toString(),
|
|
112
|
-
onChange: (e) => F({
|
|
113
|
-
...P,
|
|
114
|
-
isEnabled: e.target.value === "" ? void 0 : e.target.value === "true"
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ D("div", {
|
|
72
|
+
className: "mb-6",
|
|
73
|
+
children: [/* @__PURE__ */ D("div", {
|
|
74
|
+
className: "flex items-center justify-between mb-4",
|
|
75
|
+
children: [/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("h1", {
|
|
76
|
+
className: "text-3xl font-bold text-text-primary mb-2",
|
|
77
|
+
children: j("shortcuts.title", "Keyboard Shortcuts")
|
|
78
|
+
}), /* @__PURE__ */ E("p", {
|
|
79
|
+
className: "text-text-secondary",
|
|
80
|
+
children: j("shortcuts.subtitle", "Manage keyboard shortcuts across all Burdenoff products")
|
|
81
|
+
})] }), /* @__PURE__ */ E(O, {
|
|
82
|
+
role: "super_admin",
|
|
83
|
+
children: /* @__PURE__ */ D("div", {
|
|
84
|
+
className: "flex items-center gap-2",
|
|
85
|
+
children: [/* @__PURE__ */ D("button", {
|
|
86
|
+
type: "button",
|
|
87
|
+
onClick: Z,
|
|
88
|
+
disabled: J,
|
|
89
|
+
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 font-medium\n disabled:opacity-50\n ",
|
|
90
|
+
children: [/* @__PURE__ */ E(x, { size: 18 }), j("shortcuts.seedDefaults", "Seed Defaults")]
|
|
91
|
+
}), /* @__PURE__ */ D("button", {
|
|
92
|
+
type: "button",
|
|
93
|
+
onClick: () => k(`${A}/shortcuts/new`),
|
|
94
|
+
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 ",
|
|
95
|
+
children: [/* @__PURE__ */ E(y, { size: 20 }), j("shortcuts.createShortcut", "Create Shortcut")]
|
|
96
|
+
})]
|
|
97
|
+
})
|
|
98
|
+
})]
|
|
99
|
+
}), /* @__PURE__ */ D("div", {
|
|
100
|
+
className: "flex gap-4",
|
|
101
|
+
children: [
|
|
102
|
+
/* @__PURE__ */ E(i, {
|
|
103
|
+
value: P,
|
|
104
|
+
onChange: F,
|
|
105
|
+
placeholder: j("shortcuts.searchPlaceholder", "Search shortcuts..."),
|
|
106
|
+
className: "flex-1"
|
|
115
107
|
}),
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}),
|
|
122
|
-
/* @__PURE__ */ T("option", {
|
|
123
|
-
value: "true",
|
|
124
|
-
children: A("shortcuts.enabled", "Enabled")
|
|
108
|
+
/* @__PURE__ */ D("select", {
|
|
109
|
+
value: L.category || "",
|
|
110
|
+
onChange: (e) => R({
|
|
111
|
+
...L,
|
|
112
|
+
category: e.target.value || void 0
|
|
125
113
|
}),
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
onClick: () => z(),
|
|
135
|
-
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 ",
|
|
136
|
-
children: /* @__PURE__ */ T(y, { size: 18 })
|
|
137
|
-
})
|
|
138
|
-
]
|
|
139
|
-
})]
|
|
140
|
-
}), R ? /* @__PURE__ */ T(r, {
|
|
141
|
-
message: R.message,
|
|
142
|
-
action: {
|
|
143
|
-
label: A("productCommon.retry", "Retry"),
|
|
144
|
-
onClick: () => z()
|
|
145
|
-
}
|
|
146
|
-
}) : L && I.length === 0 ? /* @__PURE__ */ T(n, { message: A("shortcuts.loadingShortcuts", "Loading keyboard shortcuts...") }) : I.length === 0 ? /* @__PURE__ */ E("div", {
|
|
147
|
-
className: "bg-surface border border-default rounded-lg p-12 text-center animate-in fade-in duration-200",
|
|
148
|
-
children: [/* @__PURE__ */ T("p", {
|
|
149
|
-
className: "text-text-secondary mb-4",
|
|
150
|
-
children: A("shortcuts.noShortcutsFound", "No keyboard shortcuts found")
|
|
151
|
-
}), /* @__PURE__ */ E("div", {
|
|
152
|
-
className: "flex items-center justify-center gap-3",
|
|
153
|
-
children: [/* @__PURE__ */ E("button", {
|
|
154
|
-
type: "button",
|
|
155
|
-
onClick: J,
|
|
156
|
-
disabled: G,
|
|
157
|
-
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 font-medium\n ",
|
|
158
|
-
children: [/* @__PURE__ */ T(b, { size: 18 }), A("shortcuts.seedDefaults", "Seed Defaults")]
|
|
159
|
-
}), /* @__PURE__ */ E("button", {
|
|
160
|
-
type: "button",
|
|
161
|
-
onClick: () => O(`${k}/shortcuts/new`),
|
|
162
|
-
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 ",
|
|
163
|
-
children: [/* @__PURE__ */ T(v, { size: 20 }), A("shortcuts.createShortcut", "Create Shortcut")]
|
|
164
|
-
})]
|
|
165
|
-
})]
|
|
166
|
-
}) : /* @__PURE__ */ T("div", {
|
|
167
|
-
className: "bg-surface border border-default rounded-lg shadow-[var(--shadow-elevation-1)] overflow-hidden",
|
|
168
|
-
children: /* @__PURE__ */ E("table", {
|
|
169
|
-
className: "w-full",
|
|
170
|
-
children: [/* @__PURE__ */ T("thead", {
|
|
171
|
-
className: "bg-bg-sunken border-b border-default",
|
|
172
|
-
children: /* @__PURE__ */ E("tr", { children: [
|
|
173
|
-
/* @__PURE__ */ T("th", {
|
|
174
|
-
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
175
|
-
children: A("shortcuts.columnShortcut", "Shortcut")
|
|
176
|
-
}),
|
|
177
|
-
/* @__PURE__ */ T("th", {
|
|
178
|
-
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
179
|
-
children: A("shortcuts.columnLabel", "Label")
|
|
180
|
-
}),
|
|
181
|
-
/* @__PURE__ */ T("th", {
|
|
182
|
-
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
183
|
-
children: A("shortcuts.columnCategory", "Category")
|
|
184
|
-
}),
|
|
185
|
-
/* @__PURE__ */ T("th", {
|
|
186
|
-
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
187
|
-
children: A("shortcuts.columnEvent", "Event")
|
|
188
|
-
}),
|
|
189
|
-
/* @__PURE__ */ T("th", {
|
|
190
|
-
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
191
|
-
children: A("shortcuts.columnProduct", "Product")
|
|
114
|
+
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 ",
|
|
115
|
+
children: [/* @__PURE__ */ E("option", {
|
|
116
|
+
value: "",
|
|
117
|
+
children: j("shortcuts.allCategories", "All Categories")
|
|
118
|
+
}), Object.values(m).map((e) => /* @__PURE__ */ E("option", {
|
|
119
|
+
value: e,
|
|
120
|
+
children: e
|
|
121
|
+
}, e))]
|
|
192
122
|
}),
|
|
193
|
-
/* @__PURE__ */
|
|
194
|
-
|
|
195
|
-
|
|
123
|
+
/* @__PURE__ */ D("select", {
|
|
124
|
+
value: L.isEnabled === void 0 || L.isEnabled === null ? "" : L.isEnabled.toString(),
|
|
125
|
+
onChange: (e) => R({
|
|
126
|
+
...L,
|
|
127
|
+
isEnabled: e.target.value === "" ? void 0 : e.target.value === "true"
|
|
128
|
+
}),
|
|
129
|
+
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 ",
|
|
130
|
+
children: [
|
|
131
|
+
/* @__PURE__ */ E("option", {
|
|
132
|
+
value: "",
|
|
133
|
+
children: j("shortcuts.allStatus", "All Status")
|
|
134
|
+
}),
|
|
135
|
+
/* @__PURE__ */ E("option", {
|
|
136
|
+
value: "true",
|
|
137
|
+
children: j("shortcuts.enabled", "Enabled")
|
|
138
|
+
}),
|
|
139
|
+
/* @__PURE__ */ E("option", {
|
|
140
|
+
value: "false",
|
|
141
|
+
children: j("shortcuts.disabled", "Disabled")
|
|
142
|
+
})
|
|
143
|
+
]
|
|
196
144
|
}),
|
|
197
|
-
/* @__PURE__ */
|
|
198
|
-
|
|
199
|
-
|
|
145
|
+
/* @__PURE__ */ E("button", {
|
|
146
|
+
type: "button",
|
|
147
|
+
onClick: () => H(),
|
|
148
|
+
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 ",
|
|
149
|
+
children: /* @__PURE__ */ E(b, { size: 18 })
|
|
200
150
|
})
|
|
201
|
-
]
|
|
202
|
-
})
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
151
|
+
]
|
|
152
|
+
})]
|
|
153
|
+
}),
|
|
154
|
+
V ? /* @__PURE__ */ E(r, {
|
|
155
|
+
message: V.message,
|
|
156
|
+
action: {
|
|
157
|
+
label: j("productCommon.retry", "Retry"),
|
|
158
|
+
onClick: () => H()
|
|
159
|
+
}
|
|
160
|
+
}) : B && z.length === 0 ? /* @__PURE__ */ E(n, { message: j("shortcuts.loadingShortcuts", "Loading keyboard shortcuts...") }) : z.length === 0 ? /* @__PURE__ */ D("div", {
|
|
161
|
+
className: "bg-surface border border-default rounded-lg p-12 text-center animate-in fade-in duration-200",
|
|
162
|
+
children: [/* @__PURE__ */ E("p", {
|
|
163
|
+
className: "text-text-secondary mb-4",
|
|
164
|
+
children: j("shortcuts.noShortcutsFound", "No keyboard shortcuts found")
|
|
165
|
+
}), /* @__PURE__ */ D("div", {
|
|
166
|
+
className: "flex items-center justify-center gap-3",
|
|
167
|
+
children: [/* @__PURE__ */ D("button", {
|
|
168
|
+
type: "button",
|
|
169
|
+
onClick: Z,
|
|
170
|
+
disabled: J,
|
|
171
|
+
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 font-medium\n ",
|
|
172
|
+
children: [/* @__PURE__ */ E(x, { size: 18 }), j("shortcuts.seedDefaults", "Seed Defaults")]
|
|
173
|
+
}), /* @__PURE__ */ D("button", {
|
|
174
|
+
type: "button",
|
|
175
|
+
onClick: () => k(`${A}/shortcuts/new`),
|
|
176
|
+
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 ",
|
|
177
|
+
children: [/* @__PURE__ */ E(y, { size: 20 }), j("shortcuts.createShortcut", "Create Shortcut")]
|
|
178
|
+
})]
|
|
179
|
+
})]
|
|
180
|
+
}) : /* @__PURE__ */ E("div", {
|
|
181
|
+
className: "bg-surface border border-default rounded-lg shadow-[var(--shadow-elevation-1)] overflow-hidden",
|
|
182
|
+
children: /* @__PURE__ */ D("table", {
|
|
183
|
+
className: "w-full",
|
|
184
|
+
children: [/* @__PURE__ */ E("thead", {
|
|
185
|
+
className: "bg-bg-sunken border-b border-default",
|
|
186
|
+
children: /* @__PURE__ */ D("tr", { children: [
|
|
187
|
+
/* @__PURE__ */ E("th", {
|
|
188
|
+
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
189
|
+
children: j("shortcuts.columnShortcut", "Shortcut")
|
|
213
190
|
}),
|
|
214
|
-
/* @__PURE__ */
|
|
215
|
-
className: "px-6 py-
|
|
216
|
-
children:
|
|
217
|
-
className: "font-medium text-text-primary",
|
|
218
|
-
children: e.label
|
|
219
|
-
}), e.description && /* @__PURE__ */ T("p", {
|
|
220
|
-
className: "text-sm text-text-tertiary line-clamp-1",
|
|
221
|
-
children: e.description
|
|
222
|
-
})] })
|
|
191
|
+
/* @__PURE__ */ E("th", {
|
|
192
|
+
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
193
|
+
children: j("shortcuts.columnLabel", "Label")
|
|
223
194
|
}),
|
|
224
|
-
/* @__PURE__ */
|
|
225
|
-
className: "px-6 py-
|
|
226
|
-
children:
|
|
195
|
+
/* @__PURE__ */ E("th", {
|
|
196
|
+
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
197
|
+
children: j("shortcuts.columnCategory", "Category")
|
|
227
198
|
}),
|
|
228
|
-
/* @__PURE__ */
|
|
229
|
-
className: "px-6 py-
|
|
230
|
-
children:
|
|
231
|
-
className: "text-sm text-text-secondary bg-bg-sunken px-1.5 py-0.5 rounded font-mono",
|
|
232
|
-
children: e.eventName
|
|
233
|
-
})
|
|
199
|
+
/* @__PURE__ */ E("th", {
|
|
200
|
+
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
201
|
+
children: j("shortcuts.columnEvent", "Event")
|
|
234
202
|
}),
|
|
235
|
-
/* @__PURE__ */
|
|
236
|
-
className: "px-6 py-
|
|
237
|
-
children:
|
|
238
|
-
className: "text-sm text-text-primary",
|
|
239
|
-
children: e.product?.name || /* @__PURE__ */ T("span", {
|
|
240
|
-
className: "text-text-tertiary italic",
|
|
241
|
-
children: A("shortcuts.global", "Global")
|
|
242
|
-
})
|
|
243
|
-
})
|
|
203
|
+
/* @__PURE__ */ E("th", {
|
|
204
|
+
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
205
|
+
children: j("shortcuts.columnProduct", "Product")
|
|
244
206
|
}),
|
|
245
|
-
/* @__PURE__ */
|
|
246
|
-
className: "px-6 py-
|
|
247
|
-
children:
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
207
|
+
/* @__PURE__ */ E("th", {
|
|
208
|
+
className: "text-center px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
209
|
+
children: j("shortcuts.columnEnabled", "Enabled")
|
|
210
|
+
}),
|
|
211
|
+
/* @__PURE__ */ E("th", {
|
|
212
|
+
className: "text-right px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
213
|
+
children: j("shortcuts.columnActions", "Actions")
|
|
214
|
+
})
|
|
215
|
+
] })
|
|
216
|
+
}), /* @__PURE__ */ E("tbody", {
|
|
217
|
+
className: "divide-y divide-[var(--color-border-default)]",
|
|
218
|
+
children: z.map((e) => /* @__PURE__ */ D("tr", {
|
|
219
|
+
className: "hover:bg-bg-sunken transition-all duration-200",
|
|
220
|
+
children: [
|
|
221
|
+
/* @__PURE__ */ E("td", {
|
|
222
|
+
className: "px-6 py-4",
|
|
223
|
+
children: /* @__PURE__ */ E(g, {
|
|
224
|
+
shortcutKey: e.shortcutKey,
|
|
225
|
+
isSequence: e.isSequence
|
|
226
|
+
})
|
|
227
|
+
}),
|
|
228
|
+
/* @__PURE__ */ E("td", {
|
|
229
|
+
className: "px-6 py-4",
|
|
230
|
+
children: /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
|
|
231
|
+
className: "font-medium text-text-primary",
|
|
232
|
+
children: e.label
|
|
233
|
+
}), e.description && /* @__PURE__ */ E("p", {
|
|
234
|
+
className: "text-sm text-text-tertiary line-clamp-1",
|
|
235
|
+
children: e.description
|
|
236
|
+
})] })
|
|
237
|
+
}),
|
|
238
|
+
/* @__PURE__ */ E("td", {
|
|
239
|
+
className: "px-6 py-4",
|
|
240
|
+
children: /* @__PURE__ */ E(h, { category: e.category })
|
|
241
|
+
}),
|
|
242
|
+
/* @__PURE__ */ E("td", {
|
|
243
|
+
className: "px-6 py-4",
|
|
244
|
+
children: /* @__PURE__ */ E("code", {
|
|
245
|
+
className: "text-sm text-text-secondary bg-bg-sunken px-1.5 py-0.5 rounded font-mono",
|
|
246
|
+
children: e.eventName
|
|
247
|
+
})
|
|
248
|
+
}),
|
|
249
|
+
/* @__PURE__ */ E("td", {
|
|
250
|
+
className: "px-6 py-4",
|
|
251
|
+
children: /* @__PURE__ */ E("span", {
|
|
252
|
+
className: "text-sm text-text-primary",
|
|
253
|
+
children: e.product?.name || /* @__PURE__ */ E("span", {
|
|
254
|
+
className: "text-text-tertiary italic",
|
|
255
|
+
children: j("shortcuts.global", "Global")
|
|
256
|
+
})
|
|
257
|
+
})
|
|
258
|
+
}),
|
|
259
|
+
/* @__PURE__ */ E("td", {
|
|
260
|
+
className: "px-6 py-4 text-center",
|
|
261
|
+
children: /* @__PURE__ */ E("button", {
|
|
262
|
+
type: "button",
|
|
263
|
+
onClick: () => X(e.id, e.isEnabled),
|
|
264
|
+
disabled: K,
|
|
265
|
+
className: `
|
|
252
266
|
p-1 rounded-lg transition-all duration-200
|
|
253
267
|
${e.isEnabled ? "text-[var(--color-status-success)] hover:bg-[var(--color-status-success-subtle)]" : "text-text-tertiary hover:bg-bg-sunken"}
|
|
254
268
|
disabled:opacity-50
|
|
255
269
|
`,
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
type: "button",
|
|
266
|
-
onClick: () => O(`${k}/shortcuts/${e.id}`),
|
|
267
|
-
className: "p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200",
|
|
268
|
-
title: A("shortcuts.viewDetails", "View details"),
|
|
269
|
-
children: /* @__PURE__ */ T(_, { size: 18 })
|
|
270
|
-
}), /* @__PURE__ */ E(D, {
|
|
271
|
-
role: "super_admin",
|
|
272
|
-
children: [/* @__PURE__ */ T("button", {
|
|
270
|
+
title: e.isEnabled ? j("shortcuts.disable", "Disable") : j("shortcuts.enable", "Enable"),
|
|
271
|
+
children: e.isEnabled ? /* @__PURE__ */ E(w, { size: 24 }) : /* @__PURE__ */ E(C, { size: 24 })
|
|
272
|
+
})
|
|
273
|
+
}),
|
|
274
|
+
/* @__PURE__ */ E("td", {
|
|
275
|
+
className: "px-6 py-4",
|
|
276
|
+
children: /* @__PURE__ */ D("div", {
|
|
277
|
+
className: "flex items-center justify-end gap-2",
|
|
278
|
+
children: [/* @__PURE__ */ E("button", {
|
|
273
279
|
type: "button",
|
|
274
|
-
onClick: () =>
|
|
280
|
+
onClick: () => k(`${A}/shortcuts/${e.id}`),
|
|
275
281
|
className: "p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200",
|
|
276
|
-
title:
|
|
277
|
-
children: /* @__PURE__ */
|
|
278
|
-
}), /* @__PURE__ */
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
282
|
+
title: j("shortcuts.viewDetails", "View details"),
|
|
283
|
+
children: /* @__PURE__ */ E(v, { size: 18 })
|
|
284
|
+
}), /* @__PURE__ */ D(O, {
|
|
285
|
+
role: "super_admin",
|
|
286
|
+
children: [/* @__PURE__ */ E("button", {
|
|
287
|
+
type: "button",
|
|
288
|
+
onClick: () => k(`${A}/shortcuts/${e.id}/edit`),
|
|
289
|
+
className: "p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200",
|
|
290
|
+
title: j("shortcuts.edit", "Edit"),
|
|
291
|
+
children: /* @__PURE__ */ E(S, { size: 18 })
|
|
292
|
+
}), /* @__PURE__ */ E("button", {
|
|
293
|
+
type: "button",
|
|
294
|
+
onClick: () => Y(e.id),
|
|
295
|
+
disabled: W,
|
|
296
|
+
className: "p-2 rounded-lg text-[var(--color-status-error)] hover:bg-[var(--color-status-error-subtle)] transition-all duration-200 disabled:opacity-50",
|
|
297
|
+
title: j("shortcuts.delete", "Delete"),
|
|
298
|
+
children: /* @__PURE__ */ E(T, { size: 18 })
|
|
299
|
+
})]
|
|
285
300
|
})]
|
|
286
|
-
})
|
|
301
|
+
})
|
|
287
302
|
})
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
}
|
|
291
|
-
})
|
|
292
|
-
})
|
|
293
|
-
|
|
303
|
+
]
|
|
304
|
+
}, e.id))
|
|
305
|
+
})]
|
|
306
|
+
})
|
|
307
|
+
}),
|
|
308
|
+
N
|
|
309
|
+
]
|
|
294
310
|
});
|
|
295
311
|
}
|
|
296
312
|
//#endregion
|
|
297
|
-
export {
|
|
313
|
+
export { k as ShortcutsListPage };
|
|
298
314
|
|
|
299
315
|
//# sourceMappingURL=ShortcutsListPage.js.map
|