@burdenoff/microfe-product 2026.624.1 → 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.
Files changed (63) hide show
  1. package/dist/product/pages/ContentPageViewPage.js +1 -1
  2. package/dist/product/pages/ContentPageViewPage.js.map +1 -1
  3. package/dist/product/pages/ProductCatalogPage.js +2 -2
  4. package/dist/product/pages/ProductCatalogPage.js.map +1 -1
  5. package/dist/product/pages/ProductViewPage.js +1 -1
  6. package/dist/product/pages/ProductViewPage.js.map +1 -1
  7. package/dist/product-management/modules/content-pages/components/ContentPageForm.js +2 -2
  8. package/dist/product-management/modules/content-pages/components/ContentPageForm.js.map +1 -1
  9. package/dist/product-management/modules/content-pages/pages/ContentPageCreatePage.js +1 -1
  10. package/dist/product-management/modules/content-pages/pages/ContentPageCreatePage.js.map +1 -1
  11. package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js +242 -231
  12. package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js.map +1 -1
  13. package/dist/product-management/modules/content-pages/pages/ContentPageEditPage.js +1 -1
  14. package/dist/product-management/modules/content-pages/pages/ContentPageEditPage.js.map +1 -1
  15. package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js +293 -282
  16. package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js.map +1 -1
  17. package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.js +1 -1
  18. package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.js.map +1 -1
  19. package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js +1 -1
  20. package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js.map +1 -1
  21. package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js +144 -136
  22. package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js.map +1 -1
  23. package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.js +1 -1
  24. package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.js.map +1 -1
  25. package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js +188 -204
  26. package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js.map +1 -1
  27. package/dist/product-management/modules/press-kit/components/PressKitAssetForm.js +1 -1
  28. package/dist/product-management/modules/press-kit/components/PressKitAssetForm.js.map +1 -1
  29. package/dist/product-management/modules/press-kit/pages/PressKitCreatePage.js +1 -1
  30. package/dist/product-management/modules/press-kit/pages/PressKitCreatePage.js.map +1 -1
  31. package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js +95 -87
  32. package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js.map +1 -1
  33. package/dist/product-management/modules/press-kit/pages/PressKitEditPage.js +1 -1
  34. package/dist/product-management/modules/press-kit/pages/PressKitEditPage.js.map +1 -1
  35. package/dist/product-management/modules/press-kit/pages/PressKitListPage.js +250 -239
  36. package/dist/product-management/modules/press-kit/pages/PressKitListPage.js.map +1 -1
  37. package/dist/product-management/modules/products/components/ProductForm.js +1 -1
  38. package/dist/product-management/modules/products/components/ProductForm.js.map +1 -1
  39. package/dist/product-management/modules/products/pages/ProductCreatePage.js +1 -1
  40. package/dist/product-management/modules/products/pages/ProductCreatePage.js.map +1 -1
  41. package/dist/product-management/modules/products/pages/ProductDetailPage.js +407 -396
  42. package/dist/product-management/modules/products/pages/ProductDetailPage.js.map +1 -1
  43. package/dist/product-management/modules/products/pages/ProductEditPage.js +1 -1
  44. package/dist/product-management/modules/products/pages/ProductEditPage.js.map +1 -1
  45. package/dist/product-management/modules/products/pages/ProductsListPage.js +286 -275
  46. package/dist/product-management/modules/products/pages/ProductsListPage.js.map +1 -1
  47. package/dist/product-management/modules/shortcuts/components/ShortcutForm.js +1 -1
  48. package/dist/product-management/modules/shortcuts/components/ShortcutForm.js.map +1 -1
  49. package/dist/product-management/modules/shortcuts/pages/ShortcutCreatePage.js +1 -1
  50. package/dist/product-management/modules/shortcuts/pages/ShortcutCreatePage.js.map +1 -1
  51. package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js +236 -225
  52. package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js.map +1 -1
  53. package/dist/product-management/modules/shortcuts/pages/ShortcutEditPage.js +1 -1
  54. package/dist/product-management/modules/shortcuts/pages/ShortcutEditPage.js.map +1 -1
  55. package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js +261 -245
  56. package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js.map +1 -1
  57. package/dist/product-management/shared/components/feedback/ErrorState.js +1 -1
  58. package/dist/product-management/shared/components/feedback/ErrorState.js.map +1 -1
  59. package/dist/product-management/shared/components/feedback/LoadingState.js +1 -1
  60. package/dist/product-management/shared/components/feedback/LoadingState.js.map +1 -1
  61. package/dist/product-management/shared/hooks/useConfirmDialog.js +44 -0
  62. package/dist/product-management/shared/hooks/useConfirmDialog.js.map +1 -0
  63. 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 { useDebounced as c } from "../../../shared/hooks/useDebounced.js";
8
- import { useDeleteShortcut as l, useSeedDefaultShortcuts as u, useShortcuts as d, useToggleShortcut as f } from "../hooks/useShortcuts.js";
9
- import { ShortcutCategories as p } from "../types/index.js";
10
- import { ShortcutCategoryBadge as m } from "../components/ShortcutCategoryBadge.js";
11
- import { ShortcutKeyBadge as h } from "../components/ShortcutKeyBadge.js";
12
- import { useState as g } from "react";
13
- import { Eye as _, Plus as v, RefreshCw as y, Sparkles as b, SquarePen as x, ToggleLeft as S, ToggleRight as C, Trash2 as w } from "lucide-react";
14
- import { jsx as T, jsxs as E } from "react/jsx-runtime";
15
- import { PermissionGate as D } from "@burdenoff/fe-libs/shared/components";
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 O() {
18
- let { navigate: O, basePath: k = "/products" } = t(), A = e(), [j, M] = g(""), N = c(j, 300), [P, F] = g({}), { shortcuts: I, loading: L, error: R, refetch: z } = d({
19
- ...P,
20
- search: N || void 0
21
- }, { limit: 50 }), { deleteShortcut: B, loading: V } = l(), { toggleShortcut: H, loading: U } = f(), { seedDefaultShortcuts: W, loading: G } = u(), K = async (e) => {
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 = A("shortcuts.confirmDelete", "Are you sure you want to delete this shortcut?"), n = await a({
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 ? window.confirm(t) : n) try {
30
- await B(e), s("success"), z();
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
- }, q = async (e, t) => {
41
+ }, X = async (e, t) => {
35
42
  o("medium");
36
43
  try {
37
- await H(e, !t), z();
44
+ await G(e, !t), H();
38
45
  } catch (e) {
39
46
  s("error"), console.error("Failed to toggle shortcut:", e);
40
47
  }
41
- }, J = async () => {
48
+ }, Z = async () => {
42
49
  o("light");
43
- let e = A("shortcuts.confirmSeedDefaults", "This will create default global shortcuts. Continue?"), t = await a({
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 ? window.confirm(e) : t) try {
50
- let e = (await W()).data?.seedDefaultShortcuts || 0;
51
- s("success"), alert(`Created ${e} default shortcuts.`), z();
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__ */ E("div", {
57
- className: "min-h-full bg-[var(--color-bg-canvas)] p-6 animate-in fade-in duration-300",
58
- children: [/* @__PURE__ */ E("div", {
59
- className: "mb-6",
60
- children: [/* @__PURE__ */ E("div", {
61
- className: "flex items-center justify-between mb-4",
62
- children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("h1", {
63
- className: "text-3xl font-bold text-text-primary mb-2",
64
- children: A("shortcuts.title", "Keyboard Shortcuts")
65
- }), /* @__PURE__ */ T("p", {
66
- className: "text-text-secondary",
67
- children: A("shortcuts.subtitle", "Manage keyboard shortcuts across all Burdenoff products")
68
- })] }), /* @__PURE__ */ T(D, {
69
- role: "super_admin",
70
- children: /* @__PURE__ */ E("div", {
71
- className: "flex items-center gap-2",
72
- children: [/* @__PURE__ */ E("button", {
73
- type: "button",
74
- onClick: J,
75
- disabled: G,
76
- 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 ",
77
- children: [/* @__PURE__ */ T(b, { size: 18 }), A("shortcuts.seedDefaults", "Seed Defaults")]
78
- }), /* @__PURE__ */ E("button", {
79
- type: "button",
80
- onClick: () => O(`${k}/shortcuts/new`),
81
- 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 ",
82
- children: [/* @__PURE__ */ T(v, { size: 20 }), A("shortcuts.createShortcut", "Create Shortcut")]
83
- })]
84
- })
85
- })]
86
- }), /* @__PURE__ */ E("div", {
87
- className: "flex gap-4",
88
- children: [
89
- /* @__PURE__ */ T(i, {
90
- value: j,
91
- onChange: M,
92
- placeholder: A("shortcuts.searchPlaceholder", "Search shortcuts..."),
93
- className: "flex-1"
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"
68
+ return /* @__PURE__ */ D("div", {
69
+ className: "min-h-full bg-[var(--color-bg-canvas)] p-6 animate-in fade-in duration-200",
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
- 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 ",
117
- children: [
118
- /* @__PURE__ */ T("option", {
119
- value: "",
120
- children: A("shortcuts.allStatus", "All Status")
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
- /* @__PURE__ */ T("option", {
127
- value: "false",
128
- children: A("shortcuts.disabled", "Disabled")
129
- })
130
- ]
131
- }),
132
- /* @__PURE__ */ T("button", {
133
- type: "button",
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-300",
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__ */ T("th", {
194
- className: "text-center px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
195
- children: A("shortcuts.columnEnabled", "Enabled")
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__ */ T("th", {
198
- className: "text-right px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
199
- children: A("shortcuts.columnActions", "Actions")
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
- }), /* @__PURE__ */ T("tbody", {
203
- className: "divide-y divide-[var(--color-border-default)]",
204
- children: I.map((e) => /* @__PURE__ */ E("tr", {
205
- className: "hover:bg-bg-sunken transition-all duration-200",
206
- children: [
207
- /* @__PURE__ */ T("td", {
208
- className: "px-6 py-4",
209
- children: /* @__PURE__ */ T(h, {
210
- shortcutKey: e.shortcutKey,
211
- isSequence: e.isSequence
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__ */ T("td", {
215
- className: "px-6 py-4",
216
- children: /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
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__ */ T("td", {
225
- className: "px-6 py-4",
226
- children: /* @__PURE__ */ T(m, { category: e.category })
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__ */ T("td", {
229
- className: "px-6 py-4",
230
- children: /* @__PURE__ */ T("code", {
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__ */ T("td", {
236
- className: "px-6 py-4",
237
- children: /* @__PURE__ */ T("span", {
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__ */ T("td", {
246
- className: "px-6 py-4 text-center",
247
- children: /* @__PURE__ */ T("button", {
248
- type: "button",
249
- onClick: () => q(e.id, e.isEnabled),
250
- disabled: U,
251
- className: `
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
- title: e.isEnabled ? A("shortcuts.disable", "Disable") : A("shortcuts.enable", "Enable"),
257
- children: e.isEnabled ? /* @__PURE__ */ T(C, { size: 24 }) : /* @__PURE__ */ T(S, { size: 24 })
258
- })
259
- }),
260
- /* @__PURE__ */ T("td", {
261
- className: "px-6 py-4",
262
- children: /* @__PURE__ */ E("div", {
263
- className: "flex items-center justify-end gap-2",
264
- children: [/* @__PURE__ */ T("button", {
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: () => O(`${k}/shortcuts/${e.id}/edit`),
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: A("shortcuts.edit", "Edit"),
277
- children: /* @__PURE__ */ T(x, { size: 18 })
278
- }), /* @__PURE__ */ T("button", {
279
- type: "button",
280
- onClick: () => K(e.id),
281
- disabled: V,
282
- className: "p-2 rounded-lg text-[var(--color-status-error)] hover:bg-[var(--color-status-error-subtle)] transition-all duration-200 disabled:opacity-50",
283
- title: A("shortcuts.delete", "Delete"),
284
- children: /* @__PURE__ */ T(w, { size: 18 })
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
- }, e.id))
291
- })]
292
- })
293
- })]
303
+ ]
304
+ }, e.id))
305
+ })]
306
+ })
307
+ }),
308
+ N
309
+ ]
294
310
  });
295
311
  }
296
312
  //#endregion
297
- export { O as ShortcutsListPage };
313
+ export { k as ShortcutsListPage };
298
314
 
299
315
  //# sourceMappingURL=ShortcutsListPage.js.map