@burdenoff/microfe-product 2026.626.2 → 2026.720.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 +42 -43
- package/dist/product/pages/ContentPageViewPage.js.map +1 -1
- package/dist/product/pages/ProductViewPage.js +88 -87
- package/dist/product/pages/ProductViewPage.js.map +1 -1
- package/dist/product-management/modules/content-pages/components/ContentPageForm.js +341 -473
- package/dist/product-management/modules/content-pages/components/ContentPageForm.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js +8 -10
- package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.js +201 -168
- package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.js.map +1 -1
- package/dist/product-management/modules/feature-flags/hooks/useFeatureFlags.js +1 -0
- package/dist/product-management/modules/feature-flags/hooks/useFeatureFlags.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js +37 -34
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js +183 -138
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js.map +1 -1
- package/dist/product-management/modules/press-kit/components/PressKitAssetForm.js +250 -252
- package/dist/product-management/modules/press-kit/components/PressKitAssetForm.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js +72 -72
- package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js.map +1 -1
- package/dist/product-management/modules/products/components/ProductForm.js +490 -492
- package/dist/product-management/modules/products/components/ProductForm.js.map +1 -1
- package/dist/product-management/modules/products/hooks/useProducts.js +20 -7
- package/dist/product-management/modules/products/hooks/useProducts.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductDetailPage.js +130 -129
- package/dist/product-management/modules/products/pages/ProductDetailPage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/components/ShortcutForm.js +195 -203
- package/dist/product-management/modules/shortcuts/components/ShortcutForm.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js +88 -87
- package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js.map +1 -1
- package/dist/shared/components/MarkdownEditor.js +161 -0
- package/dist/shared/components/MarkdownEditor.js.map +1 -0
- package/dist/shared/components/index.js +1 -0
- package/package.json +2 -2
- package/dist/node_modules/dompurify/dist/purify.es.js +0 -555
- package/dist/node_modules/dompurify/dist/purify.es.js.map +0 -1
- package/dist/shared/utils/renderMarkdown.js +0 -8
- package/dist/shared/utils/renderMarkdown.js.map +0 -1
|
@@ -1,389 +1,381 @@
|
|
|
1
1
|
import { useTr as e } from "../../../shared/hooks/useTr.js";
|
|
2
2
|
import { useProducts as t } from "../../products/hooks/useProducts.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { MarkdownEditor as n } from "../../../../shared/components/MarkdownEditor.js";
|
|
4
|
+
import { ZodError as r } from "../../../../node_modules/zod/v4/classic/errors.js";
|
|
5
|
+
import { ShortcutCategories as i } from "../types/index.js";
|
|
6
|
+
import { createShortcutSchema as a, updateShortcutSchema as o } from "../schemas/index.js";
|
|
7
|
+
import { useEffect as s, useState as c } from "react";
|
|
8
|
+
import { Loader2 as l } from "lucide-react";
|
|
9
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
9
10
|
//#region src/product-management/modules/shortcuts/components/ShortcutForm.tsx
|
|
10
|
-
function
|
|
11
|
-
let
|
|
12
|
-
productId:
|
|
13
|
-
shortcutKey:
|
|
14
|
-
eventName:
|
|
15
|
-
category:
|
|
16
|
-
label:
|
|
17
|
-
description:
|
|
18
|
-
macKey:
|
|
19
|
-
windowsKey:
|
|
20
|
-
isEnabled:
|
|
21
|
-
isSequence:
|
|
22
|
-
sortOrder:
|
|
23
|
-
}), [
|
|
24
|
-
|
|
25
|
-
let e =
|
|
26
|
-
e && !t ?
|
|
11
|
+
function f({ shortcut: f, onSubmit: p, onCancel: m, loading: h }) {
|
|
12
|
+
let g = e(), { products: _ } = t({}, { limit: 100 }), [v, y] = c({
|
|
13
|
+
productId: f?.productId || "",
|
|
14
|
+
shortcutKey: f?.shortcutKey || "",
|
|
15
|
+
eventName: f?.eventName || "",
|
|
16
|
+
category: f?.category || i.NAVIGATION,
|
|
17
|
+
label: f?.label || "",
|
|
18
|
+
description: f?.description || "",
|
|
19
|
+
macKey: f?.macKey || "",
|
|
20
|
+
windowsKey: f?.windowsKey || "",
|
|
21
|
+
isEnabled: f?.isEnabled ?? !0,
|
|
22
|
+
isSequence: f?.isSequence ?? !1,
|
|
23
|
+
sortOrder: f?.sortOrder ?? 0
|
|
24
|
+
}), [b, x] = c({});
|
|
25
|
+
s(() => {
|
|
26
|
+
let e = v.shortcutKey.includes(" "), t = v.shortcutKey.includes("+");
|
|
27
|
+
e && !t ? y((e) => ({
|
|
27
28
|
...e,
|
|
28
29
|
isSequence: !0
|
|
29
|
-
})) : t && !e &&
|
|
30
|
+
})) : t && !e && y((e) => ({
|
|
30
31
|
...e,
|
|
31
32
|
isSequence: !1
|
|
32
33
|
}));
|
|
33
|
-
}, [
|
|
34
|
-
let
|
|
34
|
+
}, [v.shortcutKey]);
|
|
35
|
+
let S = () => {
|
|
35
36
|
try {
|
|
36
|
-
return (
|
|
37
|
+
return (f ? o : a).parse(v), x({}), !0;
|
|
37
38
|
} catch (e) {
|
|
38
|
-
if (e instanceof
|
|
39
|
+
if (e instanceof r) {
|
|
39
40
|
let t = {};
|
|
40
41
|
e.issues.forEach((e) => {
|
|
41
42
|
let n = e.path.join(".");
|
|
42
43
|
t[n] = e.message;
|
|
43
|
-
}),
|
|
44
|
+
}), x(t);
|
|
44
45
|
}
|
|
45
46
|
return !1;
|
|
46
47
|
}
|
|
47
|
-
},
|
|
48
|
-
e.preventDefault(),
|
|
49
|
-
shortcutKey:
|
|
50
|
-
eventName:
|
|
51
|
-
category:
|
|
52
|
-
label:
|
|
53
|
-
description:
|
|
54
|
-
macKey:
|
|
55
|
-
windowsKey:
|
|
56
|
-
isEnabled:
|
|
57
|
-
isSequence:
|
|
58
|
-
sortOrder:
|
|
48
|
+
}, C = async (e) => {
|
|
49
|
+
e.preventDefault(), S() && await p(f ? {
|
|
50
|
+
shortcutKey: v.shortcutKey === f.shortcutKey ? void 0 : v.shortcutKey,
|
|
51
|
+
eventName: v.eventName === f.eventName ? void 0 : v.eventName,
|
|
52
|
+
category: v.category === f.category ? void 0 : v.category,
|
|
53
|
+
label: v.label === f.label ? void 0 : v.label,
|
|
54
|
+
description: v.description === (f.description || "") ? void 0 : v.description || void 0,
|
|
55
|
+
macKey: v.macKey === (f.macKey || "") ? void 0 : v.macKey || void 0,
|
|
56
|
+
windowsKey: v.windowsKey === (f.windowsKey || "") ? void 0 : v.windowsKey || void 0,
|
|
57
|
+
isEnabled: v.isEnabled === f.isEnabled ? void 0 : v.isEnabled,
|
|
58
|
+
isSequence: v.isSequence === f.isSequence ? void 0 : v.isSequence,
|
|
59
|
+
sortOrder: v.sortOrder === f.sortOrder ? void 0 : v.sortOrder
|
|
59
60
|
} : {
|
|
60
|
-
productId:
|
|
61
|
-
shortcutKey:
|
|
62
|
-
eventName:
|
|
63
|
-
category:
|
|
64
|
-
label:
|
|
65
|
-
description:
|
|
66
|
-
macKey:
|
|
67
|
-
windowsKey:
|
|
68
|
-
isEnabled:
|
|
69
|
-
isSequence:
|
|
70
|
-
sortOrder:
|
|
61
|
+
productId: v.productId || void 0,
|
|
62
|
+
shortcutKey: v.shortcutKey,
|
|
63
|
+
eventName: v.eventName,
|
|
64
|
+
category: v.category,
|
|
65
|
+
label: v.label,
|
|
66
|
+
description: v.description || void 0,
|
|
67
|
+
macKey: v.macKey || void 0,
|
|
68
|
+
windowsKey: v.windowsKey || void 0,
|
|
69
|
+
isEnabled: v.isEnabled,
|
|
70
|
+
isSequence: v.isSequence,
|
|
71
|
+
sortOrder: v.sortOrder
|
|
71
72
|
});
|
|
72
|
-
},
|
|
73
|
-
return /* @__PURE__ */
|
|
74
|
-
onSubmit:
|
|
73
|
+
}, w = "\n w-full px-3 py-2\n bg-surface\n border border-default\n rounded-lg\n text-text-primary\n placeholder:text-text-tertiary\n focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)]\n disabled:bg-bg-sunken disabled:cursor-not-allowed\n transition-all duration-200\n ";
|
|
74
|
+
return /* @__PURE__ */ d("form", {
|
|
75
|
+
onSubmit: C,
|
|
75
76
|
className: "space-y-6 animate-in fade-in duration-200",
|
|
76
77
|
children: [
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ d("div", {
|
|
78
79
|
className: "space-y-4",
|
|
79
80
|
children: [
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ u("h3", {
|
|
81
82
|
className: "text-sm font-semibold text-text-secondary uppercase tracking-wider",
|
|
82
|
-
children:
|
|
83
|
+
children: g("shortcuts.basicInformation", "Basic Information")
|
|
83
84
|
}),
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
/* @__PURE__ */
|
|
85
|
+
/* @__PURE__ */ d("div", { children: [
|
|
86
|
+
/* @__PURE__ */ u("label", {
|
|
86
87
|
htmlFor: "productId",
|
|
87
88
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
88
|
-
children:
|
|
89
|
+
children: g("shortcuts.product", "Product")
|
|
89
90
|
}),
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ d("select", {
|
|
91
92
|
id: "productId",
|
|
92
|
-
value:
|
|
93
|
-
onChange: (e) =>
|
|
94
|
-
...
|
|
93
|
+
value: v.productId,
|
|
94
|
+
onChange: (e) => y({
|
|
95
|
+
...v,
|
|
95
96
|
productId: e.target.value
|
|
96
97
|
}),
|
|
97
|
-
className:
|
|
98
|
-
disabled:
|
|
99
|
-
children: [/* @__PURE__ */
|
|
98
|
+
className: w,
|
|
99
|
+
disabled: h || !!f,
|
|
100
|
+
children: [/* @__PURE__ */ u("option", {
|
|
100
101
|
value: "",
|
|
101
|
-
children:
|
|
102
|
-
}),
|
|
102
|
+
children: g("shortcuts.globalAllProducts", "Global (All Products)")
|
|
103
|
+
}), _.map((e) => /* @__PURE__ */ u("option", {
|
|
103
104
|
value: e.id,
|
|
104
105
|
children: e.name
|
|
105
106
|
}, e.id))]
|
|
106
107
|
}),
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
+
/* @__PURE__ */ u("p", {
|
|
108
109
|
className: "text-xs text-text-tertiary mt-1",
|
|
109
|
-
children:
|
|
110
|
+
children: g("shortcuts.globalShortcutHint", "Leave empty for global shortcuts that work across all products.")
|
|
110
111
|
})
|
|
111
112
|
] }),
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ d("div", { children: [
|
|
114
|
+
/* @__PURE__ */ d("label", {
|
|
114
115
|
htmlFor: "label",
|
|
115
116
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
116
117
|
children: [
|
|
117
|
-
|
|
118
|
+
g("shortcuts.label", "Label"),
|
|
118
119
|
" ",
|
|
119
|
-
/* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ u("span", {
|
|
120
121
|
className: "text-[var(--color-status-error)]",
|
|
121
122
|
children: "*"
|
|
122
123
|
})
|
|
123
124
|
]
|
|
124
125
|
}),
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
+
/* @__PURE__ */ u("input", {
|
|
126
127
|
id: "label",
|
|
127
128
|
type: "text",
|
|
128
|
-
value:
|
|
129
|
-
onChange: (e) =>
|
|
130
|
-
...
|
|
129
|
+
value: v.label,
|
|
130
|
+
onChange: (e) => y({
|
|
131
|
+
...v,
|
|
131
132
|
label: e.target.value
|
|
132
133
|
}),
|
|
133
|
-
className:
|
|
134
|
+
className: w,
|
|
134
135
|
placeholder: "e.g., Go to Home",
|
|
135
|
-
disabled:
|
|
136
|
+
disabled: h,
|
|
136
137
|
required: !0
|
|
137
138
|
}),
|
|
138
|
-
|
|
139
|
+
b.label && /* @__PURE__ */ u("p", {
|
|
139
140
|
className: "text-sm text-[var(--color-status-error)] mt-1",
|
|
140
|
-
children:
|
|
141
|
+
children: b.label
|
|
141
142
|
})
|
|
142
143
|
] }),
|
|
143
|
-
/* @__PURE__ */
|
|
144
|
-
/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ d("div", { children: [
|
|
145
|
+
/* @__PURE__ */ d("label", {
|
|
145
146
|
htmlFor: "shortcutKey",
|
|
146
147
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
147
148
|
children: [
|
|
148
|
-
|
|
149
|
+
g("shortcuts.shortcutKey", "Shortcut Key"),
|
|
149
150
|
" ",
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
+
/* @__PURE__ */ u("span", {
|
|
151
152
|
className: "text-[var(--color-status-error)]",
|
|
152
153
|
children: "*"
|
|
153
154
|
})
|
|
154
155
|
]
|
|
155
156
|
}),
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ u("input", {
|
|
157
158
|
id: "shortcutKey",
|
|
158
159
|
type: "text",
|
|
159
|
-
value:
|
|
160
|
-
onChange: (e) =>
|
|
161
|
-
...
|
|
160
|
+
value: v.shortcutKey,
|
|
161
|
+
onChange: (e) => y({
|
|
162
|
+
...v,
|
|
162
163
|
shortcutKey: e.target.value
|
|
163
164
|
}),
|
|
164
|
-
className:
|
|
165
|
+
className: w,
|
|
165
166
|
placeholder: "e.g., g h or Cmd+K",
|
|
166
|
-
disabled:
|
|
167
|
+
disabled: h,
|
|
167
168
|
required: !0
|
|
168
169
|
}),
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ u("p", {
|
|
170
171
|
className: "text-xs text-text-tertiary mt-1",
|
|
171
|
-
children:
|
|
172
|
+
children: g("shortcuts.shortcutKeyHint", "Use space for sequences (g h), use + for modifiers (Cmd+K, Ctrl+Shift+P)")
|
|
172
173
|
}),
|
|
173
|
-
|
|
174
|
+
b.shortcutKey && /* @__PURE__ */ u("p", {
|
|
174
175
|
className: "text-sm text-[var(--color-status-error)] mt-1",
|
|
175
|
-
children:
|
|
176
|
+
children: b.shortcutKey
|
|
176
177
|
})
|
|
177
178
|
] }),
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ d("div", { children: [
|
|
180
|
+
/* @__PURE__ */ d("label", {
|
|
180
181
|
htmlFor: "eventName",
|
|
181
182
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
182
183
|
children: [
|
|
183
|
-
|
|
184
|
+
g("shortcuts.eventName", "Event Name"),
|
|
184
185
|
" ",
|
|
185
|
-
/* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ u("span", {
|
|
186
187
|
className: "text-[var(--color-status-error)]",
|
|
187
188
|
children: "*"
|
|
188
189
|
})
|
|
189
190
|
]
|
|
190
191
|
}),
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ u("input", {
|
|
192
193
|
id: "eventName",
|
|
193
194
|
type: "text",
|
|
194
|
-
value:
|
|
195
|
-
onChange: (e) =>
|
|
196
|
-
...
|
|
195
|
+
value: v.eventName,
|
|
196
|
+
onChange: (e) => y({
|
|
197
|
+
...v,
|
|
197
198
|
eventName: e.target.value
|
|
198
199
|
}),
|
|
199
|
-
className:
|
|
200
|
+
className: w,
|
|
200
201
|
placeholder: "e.g., navigate:home",
|
|
201
|
-
disabled:
|
|
202
|
+
disabled: h,
|
|
202
203
|
required: !0
|
|
203
204
|
}),
|
|
204
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ u("p", {
|
|
205
206
|
className: "text-xs text-text-tertiary mt-1",
|
|
206
|
-
children:
|
|
207
|
+
children: g("shortcuts.eventNameHint", "The event name to emit when this shortcut is triggered.")
|
|
207
208
|
}),
|
|
208
|
-
|
|
209
|
+
b.eventName && /* @__PURE__ */ u("p", {
|
|
209
210
|
className: "text-sm text-[var(--color-status-error)] mt-1",
|
|
210
|
-
children:
|
|
211
|
+
children: b.eventName
|
|
211
212
|
})
|
|
212
213
|
] }),
|
|
213
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("label", {
|
|
214
215
|
htmlFor: "category",
|
|
215
216
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
216
217
|
children: [
|
|
217
|
-
|
|
218
|
+
g("shortcuts.category", "Category"),
|
|
218
219
|
" ",
|
|
219
|
-
/* @__PURE__ */
|
|
220
|
+
/* @__PURE__ */ u("span", {
|
|
220
221
|
className: "text-[var(--color-status-error)]",
|
|
221
222
|
children: "*"
|
|
222
223
|
})
|
|
223
224
|
]
|
|
224
|
-
}), /* @__PURE__ */
|
|
225
|
+
}), /* @__PURE__ */ u("select", {
|
|
225
226
|
id: "category",
|
|
226
|
-
value:
|
|
227
|
-
onChange: (e) =>
|
|
228
|
-
...
|
|
227
|
+
value: v.category,
|
|
228
|
+
onChange: (e) => y({
|
|
229
|
+
...v,
|
|
229
230
|
category: e.target.value
|
|
230
231
|
}),
|
|
231
|
-
className:
|
|
232
|
-
disabled:
|
|
233
|
-
children: Object.values(
|
|
232
|
+
className: w,
|
|
233
|
+
disabled: h,
|
|
234
|
+
children: Object.values(i).map((e) => /* @__PURE__ */ u("option", {
|
|
234
235
|
value: e,
|
|
235
236
|
children: e
|
|
236
237
|
}, e))
|
|
237
238
|
})] }),
|
|
238
|
-
/* @__PURE__ */ u(
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
id: "description",
|
|
246
|
-
value: _.description,
|
|
247
|
-
onChange: (e) => v({
|
|
248
|
-
..._,
|
|
249
|
-
description: e.target.value
|
|
250
|
-
}),
|
|
251
|
-
rows: 2,
|
|
252
|
-
className: C,
|
|
253
|
-
placeholder: h("shortcuts.descriptionPlaceholder", "Enter a description for this shortcut"),
|
|
254
|
-
disabled: m
|
|
239
|
+
/* @__PURE__ */ u(n, {
|
|
240
|
+
id: "description",
|
|
241
|
+
label: g("shortcuts.description", "Description"),
|
|
242
|
+
value: v.description,
|
|
243
|
+
onChange: (e) => y({
|
|
244
|
+
...v,
|
|
245
|
+
description: e
|
|
255
246
|
}),
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
247
|
+
placeholder: g("shortcuts.descriptionPlaceholder", "Enter a description for this shortcut"),
|
|
248
|
+
disabled: h,
|
|
249
|
+
error: b.description,
|
|
250
|
+
rows: 3,
|
|
251
|
+
minHeight: 90
|
|
252
|
+
})
|
|
261
253
|
]
|
|
262
254
|
}),
|
|
263
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ d("div", {
|
|
264
256
|
className: "space-y-4 pt-4 border-t border-border-seam",
|
|
265
|
-
children: [/* @__PURE__ */
|
|
257
|
+
children: [/* @__PURE__ */ u("h3", {
|
|
266
258
|
className: "text-sm font-semibold text-text-secondary uppercase tracking-wider",
|
|
267
|
-
children:
|
|
268
|
-
}), /* @__PURE__ */
|
|
259
|
+
children: g("shortcuts.platformSpecificKeys", "Platform-Specific Keys (Optional)")
|
|
260
|
+
}), /* @__PURE__ */ d("div", {
|
|
269
261
|
className: "grid grid-cols-2 gap-4",
|
|
270
|
-
children: [/* @__PURE__ */
|
|
262
|
+
children: [/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
|
|
271
263
|
htmlFor: "macKey",
|
|
272
264
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
273
|
-
children:
|
|
274
|
-
}), /* @__PURE__ */
|
|
265
|
+
children: g("shortcuts.macKeyOverride", "Mac Key Override")
|
|
266
|
+
}), /* @__PURE__ */ u("input", {
|
|
275
267
|
id: "macKey",
|
|
276
268
|
type: "text",
|
|
277
|
-
value:
|
|
278
|
-
onChange: (e) =>
|
|
279
|
-
...
|
|
269
|
+
value: v.macKey,
|
|
270
|
+
onChange: (e) => y({
|
|
271
|
+
...v,
|
|
280
272
|
macKey: e.target.value
|
|
281
273
|
}),
|
|
282
|
-
className:
|
|
274
|
+
className: w,
|
|
283
275
|
placeholder: "e.g., Cmd+K",
|
|
284
|
-
disabled:
|
|
285
|
-
})] }), /* @__PURE__ */
|
|
276
|
+
disabled: h
|
|
277
|
+
})] }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
|
|
286
278
|
htmlFor: "windowsKey",
|
|
287
279
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
288
|
-
children:
|
|
289
|
-
}), /* @__PURE__ */
|
|
280
|
+
children: g("shortcuts.windowsKeyOverride", "Windows Key Override")
|
|
281
|
+
}), /* @__PURE__ */ u("input", {
|
|
290
282
|
id: "windowsKey",
|
|
291
283
|
type: "text",
|
|
292
|
-
value:
|
|
293
|
-
onChange: (e) =>
|
|
294
|
-
...
|
|
284
|
+
value: v.windowsKey,
|
|
285
|
+
onChange: (e) => y({
|
|
286
|
+
...v,
|
|
295
287
|
windowsKey: e.target.value
|
|
296
288
|
}),
|
|
297
|
-
className:
|
|
289
|
+
className: w,
|
|
298
290
|
placeholder: "e.g., Ctrl+K",
|
|
299
|
-
disabled:
|
|
291
|
+
disabled: h
|
|
300
292
|
})] })]
|
|
301
293
|
})]
|
|
302
294
|
}),
|
|
303
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ d("div", {
|
|
304
296
|
className: "space-y-4 pt-4 border-t border-border-seam",
|
|
305
297
|
children: [
|
|
306
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ u("h3", {
|
|
307
299
|
className: "text-sm font-semibold text-text-secondary uppercase tracking-wider",
|
|
308
|
-
children:
|
|
300
|
+
children: g("shortcuts.options", "Options")
|
|
309
301
|
}),
|
|
310
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ d("div", {
|
|
311
303
|
className: "flex items-center gap-6",
|
|
312
|
-
children: [/* @__PURE__ */
|
|
304
|
+
children: [/* @__PURE__ */ d("label", {
|
|
313
305
|
className: "flex items-center gap-2 cursor-pointer",
|
|
314
|
-
children: [/* @__PURE__ */
|
|
306
|
+
children: [/* @__PURE__ */ u("input", {
|
|
315
307
|
type: "checkbox",
|
|
316
|
-
checked:
|
|
317
|
-
onChange: (e) =>
|
|
318
|
-
...
|
|
308
|
+
checked: v.isEnabled,
|
|
309
|
+
onChange: (e) => y({
|
|
310
|
+
...v,
|
|
319
311
|
isEnabled: e.target.checked
|
|
320
312
|
}),
|
|
321
313
|
className: "size-4 rounded border-default text-[var(--color-action-primary-bg)] focus:ring-[var(--color-border-focus)]",
|
|
322
|
-
disabled:
|
|
323
|
-
}), /* @__PURE__ */
|
|
314
|
+
disabled: h
|
|
315
|
+
}), /* @__PURE__ */ u("span", {
|
|
324
316
|
className: "text-sm text-text-primary",
|
|
325
|
-
children:
|
|
317
|
+
children: g("shortcuts.enabled", "Enabled")
|
|
326
318
|
})]
|
|
327
|
-
}), /* @__PURE__ */
|
|
319
|
+
}), /* @__PURE__ */ d("label", {
|
|
328
320
|
className: "flex items-center gap-2 cursor-pointer",
|
|
329
|
-
children: [/* @__PURE__ */
|
|
321
|
+
children: [/* @__PURE__ */ u("input", {
|
|
330
322
|
type: "checkbox",
|
|
331
|
-
checked:
|
|
332
|
-
onChange: (e) =>
|
|
333
|
-
...
|
|
323
|
+
checked: v.isSequence,
|
|
324
|
+
onChange: (e) => y({
|
|
325
|
+
...v,
|
|
334
326
|
isSequence: e.target.checked
|
|
335
327
|
}),
|
|
336
328
|
className: "size-4 rounded border-default text-[var(--color-action-primary-bg)] focus:ring-[var(--color-border-focus)]",
|
|
337
|
-
disabled:
|
|
338
|
-
}), /* @__PURE__ */
|
|
329
|
+
disabled: h
|
|
330
|
+
}), /* @__PURE__ */ u("span", {
|
|
339
331
|
className: "text-sm text-text-primary",
|
|
340
|
-
children:
|
|
332
|
+
children: g("shortcuts.keySequence", "Key Sequence")
|
|
341
333
|
})]
|
|
342
334
|
})]
|
|
343
335
|
}),
|
|
344
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ d("div", {
|
|
345
337
|
className: "w-32",
|
|
346
|
-
children: [/* @__PURE__ */
|
|
338
|
+
children: [/* @__PURE__ */ u("label", {
|
|
347
339
|
htmlFor: "sortOrder",
|
|
348
340
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
349
|
-
children:
|
|
350
|
-
}), /* @__PURE__ */
|
|
341
|
+
children: g("shortcuts.sortOrder", "Sort Order")
|
|
342
|
+
}), /* @__PURE__ */ u("input", {
|
|
351
343
|
id: "sortOrder",
|
|
352
344
|
type: "number",
|
|
353
345
|
min: 0,
|
|
354
|
-
value:
|
|
355
|
-
onChange: (e) =>
|
|
356
|
-
...
|
|
346
|
+
value: v.sortOrder,
|
|
347
|
+
onChange: (e) => y({
|
|
348
|
+
...v,
|
|
357
349
|
sortOrder: parseInt(e.target.value) || 0
|
|
358
350
|
}),
|
|
359
|
-
className:
|
|
360
|
-
disabled:
|
|
351
|
+
className: w,
|
|
352
|
+
disabled: h
|
|
361
353
|
})]
|
|
362
354
|
})
|
|
363
355
|
]
|
|
364
356
|
}),
|
|
365
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ d("div", {
|
|
366
358
|
className: "flex gap-3 pt-4 border-t border-border-seam",
|
|
367
|
-
children: [/* @__PURE__ */
|
|
359
|
+
children: [/* @__PURE__ */ d("button", {
|
|
368
360
|
type: "submit",
|
|
369
|
-
disabled:
|
|
361
|
+
disabled: h,
|
|
370
362
|
className: "\n inline-flex items-center gap-2 px-6 py-2.5\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 disabled:opacity-50 disabled:cursor-not-allowed\n ",
|
|
371
|
-
children: [
|
|
363
|
+
children: [h && /* @__PURE__ */ u(l, {
|
|
372
364
|
size: 16,
|
|
373
365
|
className: "animate-spin"
|
|
374
|
-
}),
|
|
375
|
-
}), /* @__PURE__ */
|
|
366
|
+
}), f ? g("shortcuts.updateShortcut", "Update Shortcut") : g("shortcuts.createShortcut", "Create Shortcut")]
|
|
367
|
+
}), /* @__PURE__ */ u("button", {
|
|
376
368
|
type: "button",
|
|
377
|
-
onClick:
|
|
378
|
-
disabled:
|
|
369
|
+
onClick: m,
|
|
370
|
+
disabled: h,
|
|
379
371
|
className: "\n px-6 py-2.5\n bg-transparent\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 disabled:cursor-not-allowed\n ",
|
|
380
|
-
children:
|
|
372
|
+
children: g("productCommon.cancel", "Cancel")
|
|
381
373
|
})]
|
|
382
374
|
})
|
|
383
375
|
]
|
|
384
376
|
});
|
|
385
377
|
}
|
|
386
378
|
//#endregion
|
|
387
|
-
export {
|
|
379
|
+
export { f as ShortcutForm };
|
|
388
380
|
|
|
389
381
|
//# sourceMappingURL=ShortcutForm.js.map
|