@burdenoff/microfe-product 2026.626.2 → 2026.715.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-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/products/hooks/useProducts.js +20 -7
- package/dist/product-management/modules/products/hooks/useProducts.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,166 +1,167 @@
|
|
|
1
1
|
import { useTr as e } from "../../../shared/hooks/useTr.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
2
|
+
import { useProducts as t } from "../../products/hooks/useProducts.js";
|
|
3
|
+
import { TagInput as n } from "../../../shared/components/input/TagInput.js";
|
|
4
|
+
import { ZodError as r } from "../../../../node_modules/zod/v4/classic/errors.js";
|
|
5
|
+
import { createFeatureFlagSchema as i, updateFeatureFlagSchema as a } from "../schemas/index.js";
|
|
6
|
+
import { useState as o } from "react";
|
|
7
|
+
import { Save as s, X as c } from "lucide-react";
|
|
8
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
9
|
//#region src/product-management/modules/feature-flags/components/FeatureFlagForm.tsx
|
|
9
|
-
var
|
|
10
|
-
let
|
|
11
|
-
key:
|
|
12
|
-
name:
|
|
13
|
-
description:
|
|
14
|
-
flagType:
|
|
15
|
-
defaultValue:
|
|
16
|
-
category:
|
|
17
|
-
previewable:
|
|
18
|
-
productId:
|
|
19
|
-
status:
|
|
20
|
-
}), [
|
|
10
|
+
var d = ({ featureFlag: d, onSubmit: f, onCancel: p, loading: m = !1, defaultProductId: h }) => {
|
|
11
|
+
let { products: g, loading: _ } = t(void 0, { limit: 200 }), v = !!d, y = e(), [b, x] = o({
|
|
12
|
+
key: d?.key || "",
|
|
13
|
+
name: d?.name || "",
|
|
14
|
+
description: d?.description || "",
|
|
15
|
+
flagType: d?.flagType || "BOOLEAN",
|
|
16
|
+
defaultValue: d?.defaultValue == null ? "false" : typeof d.defaultValue == "object" ? JSON.stringify(d.defaultValue, null, 2) : String(d.defaultValue),
|
|
17
|
+
category: d?.category || "",
|
|
18
|
+
previewable: d?.previewable ?? !1,
|
|
19
|
+
productId: d?.productId || h || "",
|
|
20
|
+
status: d?.status || "ACTIVE"
|
|
21
|
+
}), [S, C] = o(d?.tags ?? []), [w, T] = o({}), E = () => {
|
|
21
22
|
try {
|
|
22
|
-
(
|
|
23
|
+
(v ? a : i).parse(b);
|
|
23
24
|
let e = {};
|
|
24
|
-
if (
|
|
25
|
-
let t = Number(
|
|
26
|
-
(
|
|
27
|
-
} else if (
|
|
28
|
-
JSON.parse(
|
|
25
|
+
if (b.flagType === "NUMBER") {
|
|
26
|
+
let t = Number(b.defaultValue);
|
|
27
|
+
(b.defaultValue.trim() === "" || Number.isNaN(t)) && (e.defaultValue = "Default value must be a valid number");
|
|
28
|
+
} else if (b.flagType === "JSON") try {
|
|
29
|
+
JSON.parse(b.defaultValue);
|
|
29
30
|
} catch {
|
|
30
31
|
e.defaultValue = "Default value must be valid JSON";
|
|
31
32
|
}
|
|
32
|
-
return Object.keys(e).length > 0 ? (
|
|
33
|
+
return Object.keys(e).length > 0 ? (T(e), !1) : (T({}), !0);
|
|
33
34
|
} catch (e) {
|
|
34
|
-
if (e instanceof
|
|
35
|
+
if (e instanceof r) {
|
|
35
36
|
let t = {};
|
|
36
37
|
e.issues.forEach((e) => {
|
|
37
38
|
t[e.path.join(".")] = e.message;
|
|
38
|
-
}),
|
|
39
|
+
}), T(t);
|
|
39
40
|
}
|
|
40
41
|
return !1;
|
|
41
42
|
}
|
|
42
|
-
},
|
|
43
|
-
if (e.preventDefault(), !
|
|
43
|
+
}, D = async (e) => {
|
|
44
|
+
if (e.preventDefault(), !E()) return;
|
|
44
45
|
let t = (e, t) => t === "BOOLEAN" ? e === "true" : t === "NUMBER" ? Number(e) : t === "JSON" ? JSON.parse(e) : e;
|
|
45
|
-
if (
|
|
46
|
+
if (v) {
|
|
46
47
|
let e = {};
|
|
47
|
-
|
|
48
|
-
let n =
|
|
49
|
-
|
|
50
|
-
} else await
|
|
51
|
-
key:
|
|
52
|
-
name:
|
|
53
|
-
description:
|
|
54
|
-
flagType:
|
|
55
|
-
defaultValue: t(
|
|
56
|
-
category:
|
|
57
|
-
previewable:
|
|
58
|
-
productId:
|
|
59
|
-
tags:
|
|
48
|
+
b.name !== d.name && (e.name = b.name), b.description !== (d.description || "") && (e.description = b.description || void 0), b.flagType !== d.flagType && (e.flagType = b.flagType);
|
|
49
|
+
let n = d.defaultValue == null ? "false" : typeof d.defaultValue == "object" ? JSON.stringify(d.defaultValue, null, 2) : String(d.defaultValue);
|
|
50
|
+
b.defaultValue !== n && (e.defaultValue = t(b.defaultValue, b.flagType)), b.category !== (d.category || "") && (e.category = b.category || void 0), b.previewable !== d.previewable && (e.previewable = b.previewable), b.productId !== (d.productId || "") && (e.productId = b.productId || void 0), b.status !== d.status && (e.status = b.status), e.tags = S, await f(e);
|
|
51
|
+
} else await f({
|
|
52
|
+
key: b.key,
|
|
53
|
+
name: b.name,
|
|
54
|
+
description: b.description || void 0,
|
|
55
|
+
flagType: b.flagType,
|
|
56
|
+
defaultValue: t(b.defaultValue, b.flagType),
|
|
57
|
+
category: b.category || void 0,
|
|
58
|
+
previewable: b.previewable,
|
|
59
|
+
productId: b.productId || void 0,
|
|
60
|
+
tags: S
|
|
60
61
|
});
|
|
61
|
-
},
|
|
62
|
-
return /* @__PURE__ */
|
|
63
|
-
onSubmit:
|
|
62
|
+
}, O = "w-full px-3 py-2 bg-surface border border-default rounded-lg\n text-text-primary 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 transition-all duration-200", k = "w-full px-3 py-2 bg-surface border border-default rounded-lg\n text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)]\n disabled:bg-bg-sunken disabled:cursor-not-allowed transition-all duration-200";
|
|
63
|
+
return /* @__PURE__ */ u("form", {
|
|
64
|
+
onSubmit: D,
|
|
64
65
|
className: "space-y-6 animate-in fade-in duration-200",
|
|
65
66
|
children: [
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ u("div", {
|
|
67
68
|
className: "space-y-4",
|
|
68
69
|
children: [
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ l("h3", {
|
|
70
71
|
className: "text-sm font-semibold text-text-secondary uppercase tracking-wider",
|
|
71
|
-
children:
|
|
72
|
+
children: y("featureFlags.basicInformation", "Basic Information")
|
|
72
73
|
}),
|
|
73
|
-
!
|
|
74
|
-
/* @__PURE__ */
|
|
74
|
+
!v && /* @__PURE__ */ u("div", { children: [
|
|
75
|
+
/* @__PURE__ */ u("label", {
|
|
75
76
|
htmlFor: "key",
|
|
76
77
|
className: "block text-sm font-medium text-text-secondary mb-1",
|
|
77
|
-
children: [
|
|
78
|
+
children: [y("featureFlags.flagKey", "Flag Key"), " *"]
|
|
78
79
|
}),
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ l("input", {
|
|
80
81
|
id: "key",
|
|
81
82
|
type: "text",
|
|
82
|
-
value:
|
|
83
|
-
onChange: (e) =>
|
|
84
|
-
...
|
|
83
|
+
value: b.key,
|
|
84
|
+
onChange: (e) => x({
|
|
85
|
+
...b,
|
|
85
86
|
key: e.target.value
|
|
86
87
|
}),
|
|
87
|
-
className:
|
|
88
|
+
className: O,
|
|
88
89
|
placeholder: "e.g. calendar.recurring-events",
|
|
89
|
-
disabled:
|
|
90
|
+
disabled: m
|
|
90
91
|
}),
|
|
91
|
-
|
|
92
|
+
w.key && /* @__PURE__ */ l("p", {
|
|
92
93
|
className: "text-sm text-[var(--color-status-error)] mt-1",
|
|
93
|
-
children:
|
|
94
|
+
children: w.key
|
|
94
95
|
}),
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ l("p", {
|
|
96
97
|
className: "text-xs text-text-tertiary mt-1",
|
|
97
|
-
children:
|
|
98
|
+
children: y("featureFlags.flagKeyHint", "Lowercase alphanumeric, separated by dots or hyphens. Cannot be changed after creation.")
|
|
98
99
|
})
|
|
99
100
|
] }),
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ u("div", { children: [
|
|
102
|
+
/* @__PURE__ */ l("label", {
|
|
102
103
|
htmlFor: "name",
|
|
103
104
|
className: "block text-sm font-medium text-text-secondary mb-1",
|
|
104
105
|
children: "Display Name *"
|
|
105
106
|
}),
|
|
106
|
-
/* @__PURE__ */
|
|
107
|
+
/* @__PURE__ */ l("input", {
|
|
107
108
|
id: "name",
|
|
108
109
|
type: "text",
|
|
109
|
-
value:
|
|
110
|
-
onChange: (e) =>
|
|
111
|
-
...
|
|
110
|
+
value: b.name,
|
|
111
|
+
onChange: (e) => x({
|
|
112
|
+
...b,
|
|
112
113
|
name: e.target.value
|
|
113
114
|
}),
|
|
114
|
-
className:
|
|
115
|
+
className: O,
|
|
115
116
|
placeholder: "e.g. Recurring Calendar Events",
|
|
116
|
-
disabled:
|
|
117
|
+
disabled: m
|
|
117
118
|
}),
|
|
118
|
-
|
|
119
|
+
w.name && /* @__PURE__ */ l("p", {
|
|
119
120
|
className: "text-sm text-[var(--color-status-error)] mt-1",
|
|
120
|
-
children:
|
|
121
|
+
children: w.name
|
|
121
122
|
})
|
|
122
123
|
] }),
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ u("div", { children: [
|
|
125
|
+
/* @__PURE__ */ l("label", {
|
|
125
126
|
htmlFor: "description",
|
|
126
127
|
className: "block text-sm font-medium text-text-secondary mb-1",
|
|
127
|
-
children:
|
|
128
|
+
children: y("featureFlags.description", "Description")
|
|
128
129
|
}),
|
|
129
|
-
/* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ l("textarea", {
|
|
130
131
|
id: "description",
|
|
131
|
-
value:
|
|
132
|
-
onChange: (e) =>
|
|
133
|
-
...
|
|
132
|
+
value: b.description,
|
|
133
|
+
onChange: (e) => x({
|
|
134
|
+
...b,
|
|
134
135
|
description: e.target.value
|
|
135
136
|
}),
|
|
136
|
-
className: `${
|
|
137
|
+
className: `${O} resize-none`,
|
|
137
138
|
rows: 3,
|
|
138
|
-
placeholder:
|
|
139
|
-
disabled:
|
|
139
|
+
placeholder: y("featureFlags.descriptionPlaceholder", "Describe what this feature flag controls..."),
|
|
140
|
+
disabled: m
|
|
140
141
|
}),
|
|
141
|
-
|
|
142
|
+
w.description && /* @__PURE__ */ l("p", {
|
|
142
143
|
className: "text-sm text-[var(--color-status-error)] mt-1",
|
|
143
|
-
children:
|
|
144
|
+
children: w.description
|
|
144
145
|
})
|
|
145
146
|
] })
|
|
146
147
|
]
|
|
147
148
|
}),
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ u("div", {
|
|
149
150
|
className: "space-y-4",
|
|
150
151
|
children: [
|
|
151
|
-
/* @__PURE__ */
|
|
152
|
+
/* @__PURE__ */ l("h3", {
|
|
152
153
|
className: "text-sm font-semibold text-text-secondary uppercase tracking-wider",
|
|
153
|
-
children:
|
|
154
|
+
children: y("featureFlags.configuration", "Configuration")
|
|
154
155
|
}),
|
|
155
|
-
/* @__PURE__ */
|
|
156
|
+
/* @__PURE__ */ u("div", {
|
|
156
157
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
157
|
-
children: [/* @__PURE__ */
|
|
158
|
+
children: [/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
|
|
158
159
|
htmlFor: "flagType",
|
|
159
160
|
className: "block text-sm font-medium text-text-secondary mb-1",
|
|
160
|
-
children:
|
|
161
|
-
}), /* @__PURE__ */
|
|
161
|
+
children: y("featureFlags.flagType", "Flag Type")
|
|
162
|
+
}), /* @__PURE__ */ u("select", {
|
|
162
163
|
id: "flagType",
|
|
163
|
-
value:
|
|
164
|
+
value: b.flagType,
|
|
164
165
|
onChange: (e) => {
|
|
165
166
|
let t = e.target.value, n = {
|
|
166
167
|
BOOLEAN: "false",
|
|
@@ -168,180 +169,212 @@ var u = ({ featureFlag: u, onSubmit: d, onCancel: f, loading: p = !1 }) => {
|
|
|
168
169
|
NUMBER: "0",
|
|
169
170
|
JSON: "{}"
|
|
170
171
|
};
|
|
171
|
-
|
|
172
|
-
...
|
|
172
|
+
x({
|
|
173
|
+
...b,
|
|
173
174
|
flagType: t,
|
|
174
175
|
defaultValue: n[t] ?? ""
|
|
175
176
|
});
|
|
176
177
|
},
|
|
177
|
-
className:
|
|
178
|
-
disabled:
|
|
178
|
+
className: k,
|
|
179
|
+
disabled: m,
|
|
179
180
|
children: [
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ l("option", {
|
|
181
182
|
value: "BOOLEAN",
|
|
182
183
|
children: "Boolean"
|
|
183
184
|
}),
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ l("option", {
|
|
185
186
|
value: "STRING",
|
|
186
187
|
children: "String"
|
|
187
188
|
}),
|
|
188
|
-
/* @__PURE__ */
|
|
189
|
+
/* @__PURE__ */ l("option", {
|
|
189
190
|
value: "NUMBER",
|
|
190
191
|
children: "Number"
|
|
191
192
|
}),
|
|
192
|
-
/* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ l("option", {
|
|
193
194
|
value: "JSON",
|
|
194
195
|
children: "JSON"
|
|
195
196
|
})
|
|
196
197
|
]
|
|
197
|
-
})] }), /* @__PURE__ */
|
|
198
|
-
/* @__PURE__ */
|
|
198
|
+
})] }), /* @__PURE__ */ u("div", { children: [
|
|
199
|
+
/* @__PURE__ */ l("label", {
|
|
199
200
|
htmlFor: "category",
|
|
200
201
|
className: "block text-sm font-medium text-text-secondary mb-1",
|
|
201
|
-
children:
|
|
202
|
+
children: y("featureFlags.category", "Category")
|
|
202
203
|
}),
|
|
203
|
-
/* @__PURE__ */
|
|
204
|
+
/* @__PURE__ */ l("input", {
|
|
204
205
|
id: "category",
|
|
205
206
|
type: "text",
|
|
206
|
-
value:
|
|
207
|
-
onChange: (e) =>
|
|
208
|
-
...
|
|
207
|
+
value: b.category,
|
|
208
|
+
onChange: (e) => x({
|
|
209
|
+
...b,
|
|
209
210
|
category: e.target.value
|
|
210
211
|
}),
|
|
211
|
-
className:
|
|
212
|
+
className: O,
|
|
212
213
|
placeholder: "e.g. calendar, files, billing",
|
|
213
|
-
disabled:
|
|
214
|
+
disabled: m
|
|
214
215
|
}),
|
|
215
|
-
|
|
216
|
+
w.category && /* @__PURE__ */ l("p", {
|
|
216
217
|
className: "text-sm text-[var(--color-status-error)] mt-1",
|
|
217
|
-
children:
|
|
218
|
+
children: w.category
|
|
218
219
|
})
|
|
219
220
|
] })]
|
|
220
221
|
}),
|
|
221
|
-
/* @__PURE__ */
|
|
222
|
-
/* @__PURE__ */
|
|
222
|
+
/* @__PURE__ */ u("div", { children: [
|
|
223
|
+
/* @__PURE__ */ l("label", {
|
|
224
|
+
htmlFor: "productId",
|
|
225
|
+
className: "block text-sm font-medium text-text-secondary mb-1",
|
|
226
|
+
children: y("featureFlags.product", "Product")
|
|
227
|
+
}),
|
|
228
|
+
/* @__PURE__ */ u("select", {
|
|
229
|
+
id: "productId",
|
|
230
|
+
value: b.productId,
|
|
231
|
+
onChange: (e) => x({
|
|
232
|
+
...b,
|
|
233
|
+
productId: e.target.value
|
|
234
|
+
}),
|
|
235
|
+
className: k,
|
|
236
|
+
disabled: m || _,
|
|
237
|
+
children: [/* @__PURE__ */ l("option", {
|
|
238
|
+
value: "",
|
|
239
|
+
children: y("featureFlags.platformAllProducts", "Platform (all products)")
|
|
240
|
+
}), g.map((e) => /* @__PURE__ */ l("option", {
|
|
241
|
+
value: e.id,
|
|
242
|
+
children: e.name
|
|
243
|
+
}, e.id))]
|
|
244
|
+
}),
|
|
245
|
+
w.productId && /* @__PURE__ */ l("p", {
|
|
246
|
+
className: "text-sm text-[var(--color-status-error)] mt-1",
|
|
247
|
+
children: w.productId
|
|
248
|
+
}),
|
|
249
|
+
/* @__PURE__ */ l("p", {
|
|
250
|
+
className: "text-xs text-text-tertiary mt-1",
|
|
251
|
+
children: y("featureFlags.productHint", "Scope this flag to a single product, or leave as Platform to make it available across all products.")
|
|
252
|
+
})
|
|
253
|
+
] }),
|
|
254
|
+
/* @__PURE__ */ u("div", { children: [
|
|
255
|
+
/* @__PURE__ */ l("label", {
|
|
223
256
|
htmlFor: "defaultValue",
|
|
224
257
|
className: "block text-sm font-medium text-text-secondary mb-1",
|
|
225
258
|
children: "Default Value"
|
|
226
259
|
}),
|
|
227
|
-
|
|
260
|
+
b.flagType === "BOOLEAN" ? /* @__PURE__ */ u("select", {
|
|
228
261
|
id: "defaultValue",
|
|
229
|
-
value:
|
|
230
|
-
onChange: (e) =>
|
|
231
|
-
...
|
|
262
|
+
value: b.defaultValue,
|
|
263
|
+
onChange: (e) => x({
|
|
264
|
+
...b,
|
|
232
265
|
defaultValue: e.target.value
|
|
233
266
|
}),
|
|
234
|
-
className:
|
|
235
|
-
disabled:
|
|
236
|
-
children: [/* @__PURE__ */
|
|
267
|
+
className: k,
|
|
268
|
+
disabled: m,
|
|
269
|
+
children: [/* @__PURE__ */ l("option", {
|
|
237
270
|
value: "false",
|
|
238
271
|
children: "false (off by default)"
|
|
239
|
-
}), /* @__PURE__ */
|
|
272
|
+
}), /* @__PURE__ */ l("option", {
|
|
240
273
|
value: "true",
|
|
241
274
|
children: "true (on by default)"
|
|
242
275
|
})]
|
|
243
|
-
}) : /* @__PURE__ */
|
|
276
|
+
}) : /* @__PURE__ */ l("input", {
|
|
244
277
|
id: "defaultValue",
|
|
245
278
|
type: "text",
|
|
246
|
-
value:
|
|
247
|
-
onChange: (e) =>
|
|
248
|
-
...
|
|
279
|
+
value: b.defaultValue,
|
|
280
|
+
onChange: (e) => x({
|
|
281
|
+
...b,
|
|
249
282
|
defaultValue: e.target.value
|
|
250
283
|
}),
|
|
251
|
-
className:
|
|
252
|
-
placeholder:
|
|
253
|
-
disabled:
|
|
284
|
+
className: O,
|
|
285
|
+
placeholder: b.flagType === "NUMBER" ? "e.g. 10" : b.flagType === "JSON" ? "e.g. {\"key\": \"value\"}" : "e.g. variant-a",
|
|
286
|
+
disabled: m
|
|
254
287
|
}),
|
|
255
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ u("p", {
|
|
256
289
|
className: "text-xs text-text-tertiary mt-1",
|
|
257
|
-
children: ["The value returned when no workspace override or user preference exists.",
|
|
290
|
+
children: ["The value returned when no workspace override or user preference exists.", b.previewable && " For preview features, set to \"false\" so users must opt in."]
|
|
258
291
|
})
|
|
259
292
|
] }),
|
|
260
|
-
|
|
293
|
+
v && /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
|
|
261
294
|
htmlFor: "status",
|
|
262
295
|
className: "block text-sm font-medium text-text-secondary mb-1",
|
|
263
|
-
children:
|
|
264
|
-
}), /* @__PURE__ */
|
|
296
|
+
children: y("featureFlags.status", "Status")
|
|
297
|
+
}), /* @__PURE__ */ u("select", {
|
|
265
298
|
id: "status",
|
|
266
|
-
value:
|
|
267
|
-
onChange: (e) =>
|
|
268
|
-
...
|
|
299
|
+
value: b.status,
|
|
300
|
+
onChange: (e) => x({
|
|
301
|
+
...b,
|
|
269
302
|
status: e.target.value
|
|
270
303
|
}),
|
|
271
|
-
className:
|
|
272
|
-
disabled:
|
|
273
|
-
children: [/* @__PURE__ */
|
|
304
|
+
className: k,
|
|
305
|
+
disabled: m,
|
|
306
|
+
children: [/* @__PURE__ */ l("option", {
|
|
274
307
|
value: "ACTIVE",
|
|
275
308
|
children: "Active"
|
|
276
|
-
}), /* @__PURE__ */
|
|
309
|
+
}), /* @__PURE__ */ l("option", {
|
|
277
310
|
value: "ARCHIVED",
|
|
278
311
|
children: "Archived"
|
|
279
312
|
})]
|
|
280
313
|
})] }),
|
|
281
|
-
/* @__PURE__ */
|
|
314
|
+
/* @__PURE__ */ u("div", {
|
|
282
315
|
className: "flex items-center gap-3",
|
|
283
316
|
children: [
|
|
284
|
-
/* @__PURE__ */
|
|
317
|
+
/* @__PURE__ */ l("input", {
|
|
285
318
|
id: "previewable",
|
|
286
319
|
type: "checkbox",
|
|
287
|
-
checked:
|
|
288
|
-
onChange: (e) =>
|
|
289
|
-
...
|
|
320
|
+
checked: b.previewable,
|
|
321
|
+
onChange: (e) => x({
|
|
322
|
+
...b,
|
|
290
323
|
previewable: e.target.checked
|
|
291
324
|
}),
|
|
292
325
|
className: "size-4 rounded border-default text-[var(--color-action-primary-bg)] focus:ring-[var(--color-border-focus)]",
|
|
293
|
-
disabled:
|
|
326
|
+
disabled: m
|
|
294
327
|
}),
|
|
295
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ l("label", {
|
|
296
329
|
htmlFor: "previewable",
|
|
297
330
|
className: "text-sm font-medium text-text-primary",
|
|
298
|
-
children:
|
|
331
|
+
children: y("featureFlags.allowUserPreviewOptIn", "Allow user preview opt-in")
|
|
299
332
|
}),
|
|
300
|
-
/* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ l("span", {
|
|
301
334
|
className: "text-xs text-text-tertiary",
|
|
302
|
-
children:
|
|
335
|
+
children: y("featureFlags.previewOptInHint", "Users can opt-in to try this feature before it is fully rolled out")
|
|
303
336
|
})
|
|
304
337
|
]
|
|
305
338
|
})
|
|
306
339
|
]
|
|
307
340
|
}),
|
|
308
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ u("div", {
|
|
309
342
|
className: "space-y-2",
|
|
310
343
|
children: [
|
|
311
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ l("h3", {
|
|
312
345
|
className: "text-sm font-semibold text-text-secondary uppercase tracking-wider",
|
|
313
|
-
children:
|
|
346
|
+
children: y("featureFlags.tags", "Tags")
|
|
314
347
|
}),
|
|
315
|
-
/* @__PURE__ */
|
|
316
|
-
value:
|
|
317
|
-
onChange:
|
|
318
|
-
disabled:
|
|
348
|
+
/* @__PURE__ */ l(n, {
|
|
349
|
+
value: S,
|
|
350
|
+
onChange: C,
|
|
351
|
+
disabled: m
|
|
319
352
|
}),
|
|
320
|
-
/* @__PURE__ */
|
|
353
|
+
/* @__PURE__ */ l("p", {
|
|
321
354
|
className: "text-xs text-text-tertiary",
|
|
322
|
-
children:
|
|
355
|
+
children: y("featureFlags.tagsHint", "Press Enter or comma to add a tag.")
|
|
323
356
|
})
|
|
324
357
|
]
|
|
325
358
|
}),
|
|
326
|
-
/* @__PURE__ */
|
|
359
|
+
/* @__PURE__ */ u("div", {
|
|
327
360
|
className: "flex items-center justify-end gap-3 pt-4 border-t border-border-seam",
|
|
328
|
-
children: [/* @__PURE__ */
|
|
361
|
+
children: [/* @__PURE__ */ u("button", {
|
|
329
362
|
type: "button",
|
|
330
|
-
onClick:
|
|
331
|
-
disabled:
|
|
363
|
+
onClick: p,
|
|
364
|
+
disabled: m,
|
|
332
365
|
className: "inline-flex items-center gap-2 px-4 py-2 bg-surface text-text-primary border border-default rounded-lg hover:bg-bg-sunken disabled:opacity-50 transition-all duration-200",
|
|
333
|
-
children: [/* @__PURE__ */ c
|
|
334
|
-
}), /* @__PURE__ */
|
|
366
|
+
children: [/* @__PURE__ */ l(c, { size: 18 }), y("productCommon.cancel", "Cancel")]
|
|
367
|
+
}), /* @__PURE__ */ u("button", {
|
|
335
368
|
type: "submit",
|
|
336
|
-
disabled:
|
|
369
|
+
disabled: m,
|
|
337
370
|
className: "inline-flex items-center gap-2 px-4 py-2 bg-[var(--color-action-primary-bg)] text-[var(--color-action-primary-text)] rounded-lg hover:opacity-90 disabled:opacity-50 transition-all duration-200",
|
|
338
|
-
children: [/* @__PURE__ */
|
|
371
|
+
children: [/* @__PURE__ */ l(s, { size: 18 }), m ? y("featureFlags.saving", "Saving...") : v ? y("featureFlags.updateFlag", "Update Flag") : y("featureFlags.createFlag", "Create Flag")]
|
|
339
372
|
})]
|
|
340
373
|
})
|
|
341
374
|
]
|
|
342
375
|
});
|
|
343
376
|
};
|
|
344
377
|
//#endregion
|
|
345
|
-
export {
|
|
378
|
+
export { d as FeatureFlagForm };
|
|
346
379
|
|
|
347
380
|
//# sourceMappingURL=FeatureFlagForm.js.map
|