@burdenoff/microfe-product 2026.625.1 → 2026.626.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.
Files changed (51) hide show
  1. package/dist/product/pages/ContentPageViewPage.js +40 -36
  2. package/dist/product/pages/ContentPageViewPage.js.map +1 -1
  3. package/dist/product/pages/ProductCatalogPage.js +71 -63
  4. package/dist/product/pages/ProductCatalogPage.js.map +1 -1
  5. package/dist/product/pages/ProductViewPage.js +218 -181
  6. package/dist/product/pages/ProductViewPage.js.map +1 -1
  7. package/dist/product-management/modules/content-pages/pages/ContentPageCreatePage.js +27 -25
  8. package/dist/product-management/modules/content-pages/pages/ContentPageCreatePage.js.map +1 -1
  9. package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js +99 -72
  10. package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js.map +1 -1
  11. package/dist/product-management/modules/content-pages/pages/ContentPageEditPage.js +32 -30
  12. package/dist/product-management/modules/content-pages/pages/ContentPageEditPage.js.map +1 -1
  13. package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js +96 -91
  14. package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js.map +1 -1
  15. package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js +25 -23
  16. package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js.map +1 -1
  17. package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js +136 -111
  18. package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js.map +1 -1
  19. package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.js +35 -33
  20. package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.js.map +1 -1
  21. package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js +130 -126
  22. package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js.map +1 -1
  23. package/dist/product-management/modules/press-kit/pages/PressKitCreatePage.js +27 -25
  24. package/dist/product-management/modules/press-kit/pages/PressKitCreatePage.js.map +1 -1
  25. package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js +95 -70
  26. package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js.map +1 -1
  27. package/dist/product-management/modules/press-kit/pages/PressKitEditPage.js +32 -30
  28. package/dist/product-management/modules/press-kit/pages/PressKitEditPage.js.map +1 -1
  29. package/dist/product-management/modules/press-kit/pages/PressKitListPage.js +63 -58
  30. package/dist/product-management/modules/press-kit/pages/PressKitListPage.js.map +1 -1
  31. package/dist/product-management/modules/products/components/ProductPlans.js +132 -143
  32. package/dist/product-management/modules/products/components/ProductPlans.js.map +1 -1
  33. package/dist/product-management/modules/products/pages/ProductCreatePage.js +27 -25
  34. package/dist/product-management/modules/products/pages/ProductCreatePage.js.map +1 -1
  35. package/dist/product-management/modules/products/pages/ProductDetailPage.js +142 -114
  36. package/dist/product-management/modules/products/pages/ProductDetailPage.js.map +1 -1
  37. package/dist/product-management/modules/products/pages/ProductEditPage.js +31 -29
  38. package/dist/product-management/modules/products/pages/ProductEditPage.js.map +1 -1
  39. package/dist/product-management/modules/products/pages/ProductsListPage.js +218 -210
  40. package/dist/product-management/modules/products/pages/ProductsListPage.js.map +1 -1
  41. package/dist/product-management/modules/shortcuts/pages/ShortcutCreatePage.js +27 -22
  42. package/dist/product-management/modules/shortcuts/pages/ShortcutCreatePage.js.map +1 -1
  43. package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js +156 -129
  44. package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js.map +1 -1
  45. package/dist/product-management/modules/shortcuts/pages/ShortcutEditPage.js +30 -25
  46. package/dist/product-management/modules/shortcuts/pages/ShortcutEditPage.js.map +1 -1
  47. package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js +140 -132
  48. package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js.map +1 -1
  49. package/dist/product-management/shared/components/AuditHistoryTab.js +18 -16
  50. package/dist/product-management/shared/components/AuditHistoryTab.js.map +1 -1
  51. package/package.json +2 -2
@@ -1,19 +1,20 @@
1
1
  import { useTr as e } from "../../../shared/hooks/useTr.js";
2
2
  import { useCallback as t, useEffect as n, useState as r } from "react";
3
- import { Check as i, DollarSign as a, Edit as o, List as s, Loader2 as c, Plus as l, ToggleLeft as ee, ToggleRight as te } from "lucide-react";
4
- import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
5
- import { graphqlFetch as p } from "@burdenoff/fe-libs/shared/graphql/fetch";
3
+ import { Check as i, DollarSign as a, Edit as o, List as s, Loader2 as c, Plus as ee, ToggleLeft as l, ToggleRight as u } from "lucide-react";
4
+ import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
5
+ import { IllustratedEmptyState as m } from "@burdenoff/fe-libs/ui";
6
+ import { graphqlFetch as h } from "@burdenoff/fe-libs/shared/graphql/fetch";
6
7
  //#region src/product-management/modules/products/components/ProductPlans.tsx
7
- var m = "\n query GetAllPlans {\n getAllPlans {\n id\n name\n price\n currency\n duration\n isActive\n productID\n features {\n id\n quotaId\n quota {\n id\n name\n limits\n }\n }\n createdAt\n }\n }\n", h = "\n query GetAllQuotas {\n getAllQuotas {\n id\n name\n limits\n }\n }\n", g = "\n mutation CreateQuota($input: createQuotaInput!) {\n createQuota(input: $input)\n }\n", _ = "\n mutation CreatePlan($input: createPlanInput!) {\n createPlan(input: $input)\n }\n", v = "\n mutation UpdatePlan($input: updatePlanInput!) {\n updatePlan(input: $input)\n }\n", y = "\n mutation TogglePlan($planID: ID!, $status: Boolean!) {\n togglePlan(planID: $planID, status: $status)\n }\n";
8
- function b({ productId: b, productName: ne, readOnly: x = !1 }) {
9
- let S = e(), [C, re] = r([]), [w, T] = r([]), [E, D] = r(!0), [O, k] = r(null), [A, j] = r(!1), [M, N] = r(null), [P, F] = r(!1), [I, L] = r(!1), [R, z] = r(""), [B, V] = r({
8
+ var g = "\n query GetAllPlans {\n getAllPlans {\n id\n name\n price\n currency\n duration\n isActive\n productID\n features {\n id\n quotaId\n quota {\n id\n name\n limits\n }\n }\n createdAt\n }\n }\n", _ = "\n query GetAllQuotas {\n getAllQuotas {\n id\n name\n limits\n }\n }\n", v = "\n mutation CreateQuota($input: createQuotaInput!) {\n createQuota(input: $input)\n }\n", y = "\n mutation CreatePlan($input: createPlanInput!) {\n createPlan(input: $input)\n }\n", te = "\n mutation UpdatePlan($input: updatePlanInput!) {\n updatePlan(input: $input)\n }\n", b = "\n mutation TogglePlan($planID: ID!, $status: Boolean!) {\n togglePlan(planID: $planID, status: $status)\n }\n";
9
+ function x({ productId: x, productName: ne, readOnly: S = !1 }) {
10
+ let C = e(), [w, T] = r([]), [E, re] = r([]), [ie, D] = r(!0), [O, k] = r(null), [A, j] = r(!1), [M, N] = r(null), [P, F] = r(!1), [I, L] = r(!1), [R, z] = r(""), [B, V] = r({
10
11
  name: "",
11
12
  price: "",
12
13
  currency: "USD",
13
14
  duration: "monthly",
14
15
  quotas: []
15
16
  }), H = t(async (e, t) => {
16
- let n = await p({
17
+ let n = await h({
17
18
  gateway: "global",
18
19
  query: e,
19
20
  variables: t
@@ -23,17 +24,17 @@ function b({ productId: b, productName: ne, readOnly: x = !1 }) {
23
24
  }, []), U = t(async () => {
24
25
  try {
25
26
  D(!0);
26
- let [e, t] = await Promise.all([H(m), H(h)]);
27
- re((e?.getAllPlans || []).filter((e) => e.productID === b)), T(t?.getAllQuotas || []), k(null);
27
+ let [e, t] = await Promise.all([H(g), H(_)]);
28
+ T((e?.getAllPlans || []).filter((e) => e.productID === x)), re(t?.getAllQuotas || []), k(null);
28
29
  } catch (e) {
29
- k(S("products.failedToLoadPlans", "Failed to load plans")), console.error("Failed to fetch plans:", e);
30
+ k(C("products.failedToLoadPlans", "Failed to load plans")), console.error("Failed to fetch plans:", e);
30
31
  } finally {
31
32
  D(!1);
32
33
  }
33
34
  }, [
34
- b,
35
+ x,
35
36
  H,
36
- S
37
+ C
37
38
  ]);
38
39
  n(() => {
39
40
  U();
@@ -49,29 +50,29 @@ function b({ productId: b, productName: ne, readOnly: x = !1 }) {
49
50
  }, G = async (e) => {
50
51
  e.preventDefault(), F(!0);
51
52
  try {
52
- M ? await H(v, { input: {
53
+ M ? await H(te, { input: {
53
54
  id: M.id,
54
55
  name: B.name,
55
56
  price: parseFloat(B.price),
56
57
  currency: B.currency,
57
58
  duration: B.duration,
58
59
  quotas: B.quotas
59
- } }) : await H(_, { input: {
60
+ } }) : await H(y, { input: {
60
61
  name: B.name,
61
62
  price: parseFloat(B.price),
62
63
  currency: B.currency,
63
64
  duration: B.duration,
64
- productId: b,
65
+ productId: x,
65
66
  quotas: B.quotas
66
67
  } }), W(), await U();
67
68
  } catch (e) {
68
- console.error("Failed to save plan:", e), k(S("products.failedToSavePlan", "Failed to save plan"));
69
+ console.error("Failed to save plan:", e), k(C("products.failedToSavePlan", "Failed to save plan"));
69
70
  } finally {
70
71
  F(!1);
71
72
  }
72
73
  }, K = async (e) => {
73
74
  try {
74
- await H(y, {
75
+ await H(b, {
75
76
  planID: e.id,
76
77
  status: !e.isActive
77
78
  }), await U();
@@ -91,53 +92,53 @@ function b({ productId: b, productName: ne, readOnly: x = !1 }) {
91
92
  }), j(!0);
92
93
  }, J = async () => {
93
94
  if (R.trim()) try {
94
- F(!0), await H(g, { input: {
95
+ F(!0), await H(v, { input: {
95
96
  name: R.trim(),
96
97
  quotaType: "PRODUCT_SPECIFIC",
97
98
  limits: {},
98
99
  reusable: !0
99
100
  } }), z(""), L(!1), await U();
100
101
  } catch (e) {
101
- console.error("Failed to create quota:", e), k(S("products.failedToCreateFeature", "Failed to create feature"));
102
+ console.error("Failed to create quota:", e), k(C("products.failedToCreateFeature", "Failed to create feature"));
102
103
  } finally {
103
104
  F(!1);
104
105
  }
105
106
  }, Y = (e) => {
106
107
  let t = e.toLowerCase();
107
108
  return t.includes("team") || t.includes("business") || t.includes("enterprise");
108
- }, X = C.filter((e) => !Y(e.name)), Z = C.filter((e) => Y(e.name)), ie = X.filter((e) => e.duration === "monthly"), ae = X.filter((e) => e.duration === "yearly"), [Q, $] = r("individual");
109
- return /* @__PURE__ */ f("div", {
109
+ }, X = w.filter((e) => !Y(e.name)), Z = w.filter((e) => Y(e.name)), ae = X.filter((e) => e.duration === "monthly"), oe = X.filter((e) => e.duration === "yearly"), [Q, $] = r("individual");
110
+ return /* @__PURE__ */ p("div", {
110
111
  className: "bg-bg-surface bg-accent-wash border border-border-seam rounded-card p-6 shadow-elevation-1 transition-[box-shadow,border-color] duration-200 hover:border-border-strong hover:shadow-[var(--shadow-pop)] lg:col-span-2",
111
112
  children: [
112
- /* @__PURE__ */ f("div", {
113
+ /* @__PURE__ */ p("div", {
113
114
  className: "flex items-center justify-between mb-4",
114
- children: [/* @__PURE__ */ f("h2", {
115
+ children: [/* @__PURE__ */ p("h2", {
115
116
  className: "text-lg font-semibold text-text-primary flex items-center gap-2",
116
- children: [/* @__PURE__ */ d(a, { size: 18 }), S("products.pricingPlans", "Pricing Plans")]
117
- }), !x && /* @__PURE__ */ f("button", {
117
+ children: [/* @__PURE__ */ f(a, { size: 18 }), C("products.pricingPlans", "Pricing Plans")]
118
+ }), !S && /* @__PURE__ */ p("button", {
118
119
  type: "button",
119
120
  onClick: () => {
120
121
  W(), j(!A);
121
122
  },
122
123
  className: "\n inline-flex items-center gap-1.5 px-3 py-1.5\n bg-[var(--color-bg-accent)] text-[var(--color-text-on-accent)]\n rounded-lg text-sm font-medium\n hover:opacity-90 transition-all duration-200\n ",
123
- children: [/* @__PURE__ */ d(l, { size: 14 }), S("products.addPlan", "Add Plan")]
124
+ children: [/* @__PURE__ */ f(ee, { size: 14 }), C("products.addPlan", "Add Plan")]
124
125
  })]
125
126
  }),
126
- A && !x && /* @__PURE__ */ f("form", {
127
+ A && !S && /* @__PURE__ */ p("form", {
127
128
  onSubmit: G,
128
129
  className: "mb-6 p-4 bg-bg-sunken rounded-lg border border-default",
129
130
  children: [
130
- /* @__PURE__ */ d("h3", {
131
+ /* @__PURE__ */ f("h3", {
131
132
  className: "text-sm font-semibold text-text-primary mb-3",
132
- children: M ? S("products.editPlan", "Edit Plan") : S("products.createNewPlan", "Create New Plan")
133
+ children: M ? C("products.editPlan", "Edit Plan") : C("products.createNewPlan", "Create New Plan")
133
134
  }),
134
- /* @__PURE__ */ f("div", {
135
+ /* @__PURE__ */ p("div", {
135
136
  className: "grid grid-cols-2 sm:grid-cols-4 gap-3",
136
137
  children: [
137
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("label", {
138
+ /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
138
139
  className: "block text-xs font-medium text-text-secondary mb-1",
139
- children: [S("products.planName", "Name"), " *"]
140
- }), /* @__PURE__ */ d("input", {
140
+ children: [C("products.planName", "Name"), " *"]
141
+ }), /* @__PURE__ */ f("input", {
141
142
  type: "text",
142
143
  value: B.name,
143
144
  onChange: (e) => V({
@@ -148,10 +149,10 @@ function b({ productId: b, productName: ne, readOnly: x = !1 }) {
148
149
  required: !0,
149
150
  className: "w-full px-3 py-2 text-sm rounded-md border border-default bg-surface text-text-primary"
150
151
  })] }),
151
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("label", {
152
+ /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
152
153
  className: "block text-xs font-medium text-text-secondary mb-1",
153
- children: [S("products.planPrice", "Price"), " *"]
154
- }), /* @__PURE__ */ d("input", {
154
+ children: [C("products.planPrice", "Price"), " *"]
155
+ }), /* @__PURE__ */ f("input", {
155
156
  type: "number",
156
157
  step: "0.01",
157
158
  min: "0",
@@ -164,28 +165,28 @@ function b({ productId: b, productName: ne, readOnly: x = !1 }) {
164
165
  required: !0,
165
166
  className: "w-full px-3 py-2 text-sm rounded-md border border-default bg-surface text-text-primary"
166
167
  })] }),
167
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("label", {
168
+ /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
168
169
  className: "block text-xs font-medium text-text-secondary mb-1",
169
- children: [S("products.planDuration", "Duration"), " *"]
170
- }), /* @__PURE__ */ f("select", {
170
+ children: [C("products.planDuration", "Duration"), " *"]
171
+ }), /* @__PURE__ */ p("select", {
171
172
  value: B.duration,
172
173
  onChange: (e) => V({
173
174
  ...B,
174
175
  duration: e.target.value
175
176
  }),
176
177
  className: "w-full px-3 py-2 text-sm rounded-md border border-default bg-surface text-text-primary",
177
- children: [/* @__PURE__ */ d("option", {
178
+ children: [/* @__PURE__ */ f("option", {
178
179
  value: "monthly",
179
- children: S("products.monthly", "Monthly")
180
- }), /* @__PURE__ */ d("option", {
180
+ children: C("products.monthly", "Monthly")
181
+ }), /* @__PURE__ */ f("option", {
181
182
  value: "yearly",
182
- children: S("products.yearly", "Yearly")
183
+ children: C("products.yearly", "Yearly")
183
184
  })]
184
185
  })] }),
185
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
186
+ /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
186
187
  className: "block text-xs font-medium text-text-secondary mb-1",
187
- children: S("products.currency", "Currency")
188
- }), /* @__PURE__ */ f("select", {
188
+ children: C("products.currency", "Currency")
189
+ }), /* @__PURE__ */ p("select", {
189
190
  value: B.currency,
190
191
  onChange: (e) => V({
191
192
  ...B,
@@ -193,19 +194,19 @@ function b({ productId: b, productName: ne, readOnly: x = !1 }) {
193
194
  }),
194
195
  className: "w-full px-3 py-2 text-sm rounded-md border border-default bg-surface text-text-primary",
195
196
  children: [
196
- /* @__PURE__ */ d("option", {
197
+ /* @__PURE__ */ f("option", {
197
198
  value: "USD",
198
199
  children: "USD"
199
200
  }),
200
- /* @__PURE__ */ d("option", {
201
+ /* @__PURE__ */ f("option", {
201
202
  value: "EUR",
202
203
  children: "EUR"
203
204
  }),
204
- /* @__PURE__ */ d("option", {
205
+ /* @__PURE__ */ f("option", {
205
206
  value: "GBP",
206
207
  children: "GBP"
207
208
  }),
208
- /* @__PURE__ */ d("option", {
209
+ /* @__PURE__ */ f("option", {
209
210
  value: "INR",
210
211
  children: "INR"
211
212
  })
@@ -213,19 +214,19 @@ function b({ productId: b, productName: ne, readOnly: x = !1 }) {
213
214
  })] })
214
215
  ]
215
216
  }),
216
- /* @__PURE__ */ f("div", {
217
+ /* @__PURE__ */ p("div", {
217
218
  className: "mt-3",
218
- children: [/* @__PURE__ */ f("label", {
219
+ children: [/* @__PURE__ */ p("label", {
219
220
  className: "block text-xs font-medium text-text-secondary mb-1",
220
- children: [/* @__PURE__ */ d(s, {
221
+ children: [/* @__PURE__ */ f(s, {
221
222
  size: 12,
222
223
  className: "inline mr-1"
223
- }), S("products.featuresQuotas", "Features / Quotas")]
224
- }), w.length > 0 ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", {
224
+ }), C("products.featuresQuotas", "Features / Quotas")]
225
+ }), E.length > 0 ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("div", {
225
226
  className: "space-y-1.5 max-h-32 overflow-y-auto",
226
- children: w.map((e) => /* @__PURE__ */ f("label", {
227
+ children: E.map((e) => /* @__PURE__ */ p("label", {
227
228
  className: "flex items-center gap-2 text-xs text-text-primary cursor-pointer hover:bg-bg-sunken/50 px-2 py-1 rounded",
228
- children: [/* @__PURE__ */ d("input", {
229
+ children: [/* @__PURE__ */ f("input", {
229
230
  type: "checkbox",
230
231
  checked: B.quotas.some((t) => t.quotaId === e.id),
231
232
  onChange: (t) => {
@@ -243,66 +244,66 @@ function b({ productId: b, productName: ne, readOnly: x = !1 }) {
243
244
  className: "rounded border-default"
244
245
  }), e.name]
245
246
  }, e.id))
246
- }), /* @__PURE__ */ f("div", {
247
+ }), /* @__PURE__ */ p("div", {
247
248
  className: "flex items-center gap-2 mt-2",
248
249
  children: [
249
- /* @__PURE__ */ f("p", {
250
+ /* @__PURE__ */ p("p", {
250
251
  className: "text-xs text-text-secondary",
251
252
  children: [
252
253
  B.quotas.length,
253
254
  " ",
254
- S("products.featuresSelected", "feature(s) selected")
255
+ C("products.featuresSelected", "feature(s) selected")
255
256
  ]
256
257
  }),
257
- /* @__PURE__ */ d("span", {
258
+ /* @__PURE__ */ f("span", {
258
259
  className: "text-xs text-text-secondary",
259
260
  children: "|"
260
261
  }),
261
- I ? /* @__PURE__ */ f("div", {
262
+ I ? /* @__PURE__ */ p("div", {
262
263
  className: "flex items-center gap-1.5",
263
264
  children: [
264
- /* @__PURE__ */ d("input", {
265
+ /* @__PURE__ */ f("input", {
265
266
  type: "text",
266
267
  value: R,
267
268
  onChange: (e) => z(e.target.value),
268
- placeholder: S("products.featureNamePlaceholder", "Feature name"),
269
+ placeholder: C("products.featureNamePlaceholder", "Feature name"),
269
270
  className: "px-2 py-1 text-xs rounded border border-default bg-surface text-text-primary w-36",
270
271
  onKeyDown: (e) => {
271
272
  e.key === "Enter" && (e.preventDefault(), J());
272
273
  }
273
274
  }),
274
- /* @__PURE__ */ d("button", {
275
+ /* @__PURE__ */ f("button", {
275
276
  type: "button",
276
277
  onClick: J,
277
278
  disabled: P || !R.trim(),
278
279
  className: "px-2 py-1 text-xs bg-[var(--color-bg-accent)] text-[var(--color-text-on-accent)] rounded hover:opacity-90 disabled:opacity-50",
279
- children: S("productCommon.add", "Add")
280
+ children: C("productCommon.add", "Add")
280
281
  }),
281
- /* @__PURE__ */ d("button", {
282
+ /* @__PURE__ */ f("button", {
282
283
  type: "button",
283
284
  onClick: () => {
284
285
  L(!1), z("");
285
286
  },
286
287
  className: "px-1.5 py-1 text-xs text-text-secondary hover:text-text-primary",
287
- children: S("productCommon.cancel", "Cancel")
288
+ children: C("productCommon.cancel", "Cancel")
288
289
  })
289
290
  ]
290
- }) : /* @__PURE__ */ d("button", {
291
+ }) : /* @__PURE__ */ f("button", {
291
292
  type: "button",
292
293
  onClick: () => L(!0),
293
294
  className: "text-xs text-[var(--color-action-primary-bg)] hover:underline",
294
- children: S("products.createNewFeature", "+ Create new feature")
295
+ children: C("products.createNewFeature", "+ Create new feature")
295
296
  })
296
297
  ]
297
- })] }) : /* @__PURE__ */ f("div", {
298
+ })] }) : /* @__PURE__ */ p("div", {
298
299
  className: "text-xs text-text-secondary",
299
300
  children: [
300
- S("products.noFeaturesCreated", "No features created yet."),
301
+ C("products.noFeaturesCreated", "No features created yet."),
301
302
  " ",
302
- I ? /* @__PURE__ */ f("div", {
303
+ I ? /* @__PURE__ */ p("div", {
303
304
  className: "flex items-center gap-1.5 mt-1.5",
304
305
  children: [
305
- /* @__PURE__ */ d("input", {
306
+ /* @__PURE__ */ f("input", {
306
307
  type: "text",
307
308
  value: R,
308
309
  onChange: (e) => z(e.target.value),
@@ -312,14 +313,14 @@ function b({ productId: b, productName: ne, readOnly: x = !1 }) {
312
313
  e.key === "Enter" && (e.preventDefault(), J());
313
314
  }
314
315
  }),
315
- /* @__PURE__ */ d("button", {
316
+ /* @__PURE__ */ f("button", {
316
317
  type: "button",
317
318
  onClick: J,
318
319
  disabled: P || !R.trim(),
319
320
  className: "px-2 py-1 text-xs bg-[var(--color-bg-accent)] text-[var(--color-text-on-accent)] rounded hover:opacity-90 disabled:opacity-50",
320
321
  children: "Add"
321
322
  }),
322
- /* @__PURE__ */ d("button", {
323
+ /* @__PURE__ */ f("button", {
323
324
  type: "button",
324
325
  onClick: () => {
325
326
  L(!1), z("");
@@ -328,68 +329,56 @@ function b({ productId: b, productName: ne, readOnly: x = !1 }) {
328
329
  children: "Cancel"
329
330
  })
330
331
  ]
331
- }) : /* @__PURE__ */ d("button", {
332
+ }) : /* @__PURE__ */ f("button", {
332
333
  type: "button",
333
334
  onClick: () => L(!0),
334
335
  className: "text-[var(--color-action-primary-bg)] hover:underline",
335
- children: S("products.createYourFirstFeature", "Create your first feature")
336
+ children: C("products.createYourFirstFeature", "Create your first feature")
336
337
  })
337
338
  ]
338
339
  })]
339
340
  }),
340
- /* @__PURE__ */ f("div", {
341
+ /* @__PURE__ */ p("div", {
341
342
  className: "flex gap-2 mt-3",
342
- children: [/* @__PURE__ */ f("button", {
343
+ children: [/* @__PURE__ */ p("button", {
343
344
  type: "submit",
344
345
  disabled: P,
345
346
  className: "\n inline-flex items-center gap-1.5 px-4 py-2\n bg-[var(--color-bg-accent)] text-[var(--color-text-on-accent)]\n rounded-md text-sm font-medium\n hover:opacity-90 transition-all duration-200\n disabled:opacity-50\n ",
346
- children: [P && /* @__PURE__ */ d(c, {
347
+ children: [P && /* @__PURE__ */ f(c, {
347
348
  size: 14,
348
349
  className: "animate-spin"
349
- }), M ? S("products.updatePlan", "Update Plan") : S("products.createPlan", "Create Plan")]
350
- }), /* @__PURE__ */ d("button", {
350
+ }), M ? C("products.updatePlan", "Update Plan") : C("products.createPlan", "Create Plan")]
351
+ }), /* @__PURE__ */ f("button", {
351
352
  type: "button",
352
353
  onClick: W,
353
354
  className: "px-4 py-2 text-sm text-text-secondary hover:text-text-primary transition-colors",
354
- children: S("productCommon.cancel", "Cancel")
355
+ children: C("productCommon.cancel", "Cancel")
355
356
  })]
356
357
  })
357
358
  ]
358
359
  }),
359
- O && /* @__PURE__ */ d("div", {
360
+ O && /* @__PURE__ */ f("div", {
360
361
  className: "mb-4 p-3 bg-[var(--color-status-error-subtle)] border border-[var(--color-status-error-border)] rounded-lg text-sm text-[var(--color-status-error)]",
361
362
  children: O
362
363
  }),
363
- E ? /* @__PURE__ */ f("div", {
364
+ ie ? /* @__PURE__ */ p("div", {
364
365
  className: "flex items-center justify-center py-8",
365
- children: [/* @__PURE__ */ d(c, {
366
+ children: [/* @__PURE__ */ f(c, {
366
367
  size: 20,
367
368
  className: "animate-spin text-text-secondary"
368
- }), /* @__PURE__ */ d("span", {
369
+ }), /* @__PURE__ */ f("span", {
369
370
  className: "ml-2 text-sm text-text-secondary",
370
- children: S("products.loadingPlans", "Loading plans...")
371
+ children: C("products.loadingPlans", "Loading plans...")
371
372
  })]
372
- }) : C.length === 0 ? /* @__PURE__ */ f("div", {
373
- className: "text-center py-8",
374
- children: [
375
- /* @__PURE__ */ d(a, {
376
- size: 32,
377
- className: "mx-auto mb-2 text-text-secondary opacity-50"
378
- }),
379
- /* @__PURE__ */ d("p", {
380
- className: "text-sm text-text-secondary",
381
- children: S("products.noPricingPlans", "No pricing plans yet")
382
- }),
383
- /* @__PURE__ */ d("p", {
384
- className: "text-xs text-text-secondary mt-1",
385
- children: S("products.clickAddPlan", "Click \"Add Plan\" to create your first plan")
386
- })
387
- ]
388
- }) : /* @__PURE__ */ f("div", {
373
+ }) : w.length === 0 ? /* @__PURE__ */ f(m, {
374
+ illustration: "empty-data",
375
+ title: C("products.noPricingPlans", "No pricing plans yet"),
376
+ description: C("products.clickAddPlan", "Click \"Add Plan\" to create your first plan")
377
+ }) : /* @__PURE__ */ p("div", {
389
378
  className: "space-y-6",
390
- children: [Z.length > 0 && /* @__PURE__ */ f("div", {
379
+ children: [Z.length > 0 && /* @__PURE__ */ p("div", {
391
380
  className: "flex gap-2 mb-2",
392
- children: [/* @__PURE__ */ f("button", {
381
+ children: [/* @__PURE__ */ p("button", {
393
382
  type: "button",
394
383
  onClick: () => $("individual"),
395
384
  className: `px-4 py-1.5 rounded-lg text-sm font-medium transition-all ${Q === "individual" ? "bg-[var(--color-action-primary-bg)] text-[var(--color-action-primary-text)]" : "bg-[var(--color-bg-muted)] text-text-secondary hover:text-text-primary"}`,
@@ -398,7 +387,7 @@ function b({ productId: b, productName: ne, readOnly: x = !1 }) {
398
387
  X.length,
399
388
  ")"
400
389
  ]
401
- }), /* @__PURE__ */ f("button", {
390
+ }), /* @__PURE__ */ p("button", {
402
391
  type: "button",
403
392
  onClick: () => $("enterprise"),
404
393
  className: `px-4 py-1.5 rounded-lg text-sm font-medium transition-all ${Q === "enterprise" ? "bg-[var(--color-action-primary-bg)] text-[var(--color-action-primary-text)]" : "bg-[var(--color-bg-muted)] text-text-secondary hover:text-text-primary"}`,
@@ -409,71 +398,71 @@ function b({ productId: b, productName: ne, readOnly: x = !1 }) {
409
398
  ]
410
399
  })]
411
400
  }), (Q === "individual" || Z.length === 0 ? [{
412
- label: S("products.monthlyPlans", "Monthly Plans"),
413
- plans: ie
414
- }, {
415
- label: S("products.yearlyPlans", "Yearly Plans"),
401
+ label: C("products.monthlyPlans", "Monthly Plans"),
416
402
  plans: ae
403
+ }, {
404
+ label: C("products.yearlyPlans", "Yearly Plans"),
405
+ plans: oe
417
406
  }] : [{
418
- label: S("products.enterprisePlans", "Enterprise Plans"),
407
+ label: C("products.enterprisePlans", "Enterprise Plans"),
419
408
  plans: Z
420
- }]).filter((e) => e.plans.length > 0).map((e) => /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("h3", {
409
+ }]).filter((e) => e.plans.length > 0).map((e) => /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("h3", {
421
410
  className: "text-xs font-semibold text-text-secondary uppercase tracking-wider mb-3",
422
411
  children: e.label
423
- }), /* @__PURE__ */ d("div", {
412
+ }), /* @__PURE__ */ f("div", {
424
413
  className: "grid grid-cols-1 md:grid-cols-3 gap-4",
425
414
  children: e.plans.sort((e, t) => e.price - t.price).map((e) => {
426
415
  let t = e.currency === "USD" ? "$" : e.currency === "EUR" ? "€" : e.currency === "GBP" ? "£" : "₹", n = e.name.toLowerCase().includes("professional") || e.name.toLowerCase().includes("pro");
427
- return /* @__PURE__ */ f("div", {
416
+ return /* @__PURE__ */ p("div", {
428
417
  className: `
429
418
  relative rounded-xl border p-5 transition-all duration-200
430
419
  ${e.isActive ? "border-default bg-surface hover:shadow-md" : "border-default bg-bg-sunken/30 opacity-60"}
431
420
  ${n ? "border-[var(--color-action-primary-bg)] ring-1 ring-[var(--color-action-primary-bg)]/20" : ""}
432
421
  `,
433
422
  children: [
434
- n && /* @__PURE__ */ d("span", {
423
+ n && /* @__PURE__ */ f("span", {
435
424
  className: "absolute -top-2.5 left-1/2 -translate-x-1/2 px-3 py-0.5 text-xs font-semibold bg-[var(--color-action-primary-bg)] text-[var(--color-action-primary-text)] rounded-full",
436
- children: S("products.popular", "Popular")
425
+ children: C("products.popular", "Popular")
437
426
  }),
438
- /* @__PURE__ */ f("div", {
427
+ /* @__PURE__ */ p("div", {
439
428
  className: "flex items-start justify-between mb-3",
440
- children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("h4", {
429
+ children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("h4", {
441
430
  className: "text-base font-semibold text-text-primary",
442
431
  children: e.name
443
- }), /* @__PURE__ */ d("span", {
432
+ }), /* @__PURE__ */ f("span", {
444
433
  className: `inline-flex items-center px-1.5 py-0.5 text-xs font-medium rounded-full mt-1 ${e.isActive ? "bg-[var(--color-status-success-subtle)] text-[var(--color-status-success)]" : "bg-bg-sunken text-text-secondary"}`,
445
- children: e.isActive ? S("products.statusActive", "Active") : S("products.statusInactive", "Inactive")
446
- })] }), !x && /* @__PURE__ */ f("div", {
434
+ children: e.isActive ? C("products.statusActive", "Active") : C("products.statusInactive", "Inactive")
435
+ })] }), !S && /* @__PURE__ */ p("div", {
447
436
  className: "flex items-center gap-0.5",
448
- children: [/* @__PURE__ */ d("button", {
437
+ children: [/* @__PURE__ */ f("button", {
449
438
  type: "button",
450
439
  onClick: () => K(e),
451
- title: e.isActive ? S("products.deactivate", "Deactivate") : S("products.activate", "Activate"),
440
+ title: e.isActive ? C("products.deactivate", "Deactivate") : C("products.activate", "Activate"),
452
441
  className: "p-1.5 rounded-lg hover:bg-bg-sunken transition-colors text-text-secondary hover:text-text-primary",
453
- children: e.isActive ? /* @__PURE__ */ d(te, {
442
+ children: e.isActive ? /* @__PURE__ */ f(u, {
454
443
  size: 16,
455
444
  className: "text-[var(--color-status-success)]"
456
- }) : /* @__PURE__ */ d(ee, { size: 16 })
457
- }), /* @__PURE__ */ d("button", {
445
+ }) : /* @__PURE__ */ f(l, { size: 16 })
446
+ }), /* @__PURE__ */ f("button", {
458
447
  type: "button",
459
448
  onClick: () => q(e),
460
- title: S("products.edit", "Edit"),
449
+ title: C("products.edit", "Edit"),
461
450
  className: "p-1.5 rounded-lg hover:bg-bg-sunken transition-colors text-text-secondary hover:text-text-primary",
462
- children: /* @__PURE__ */ d(o, { size: 14 })
451
+ children: /* @__PURE__ */ f(o, { size: 14 })
463
452
  })]
464
453
  })]
465
454
  }),
466
- /* @__PURE__ */ f("div", {
455
+ /* @__PURE__ */ p("div", {
467
456
  className: "mb-4",
468
- children: [/* @__PURE__ */ f("span", {
457
+ children: [/* @__PURE__ */ p("span", {
469
458
  className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary",
470
459
  children: [t, e.price]
471
- }), /* @__PURE__ */ f("span", {
460
+ }), /* @__PURE__ */ p("span", {
472
461
  className: "text-sm text-text-secondary ml-1",
473
462
  children: ["/", e.duration === "monthly" ? "month" : "year"]
474
463
  })]
475
464
  }),
476
- e.features && e.features.length > 0 ? /* @__PURE__ */ f("div", {
465
+ e.features && e.features.length > 0 ? /* @__PURE__ */ p("div", {
477
466
  className: "space-y-2 border-t border-border-seam pt-3",
478
467
  children: [e.features.slice(0, 6).map((e) => {
479
468
  let t = e.quota, n = e.quotaId;
@@ -481,14 +470,14 @@ function b({ productId: b, productName: ne, readOnly: x = !1 }) {
481
470
  let e = t.name.split("."), r = ((e.length >= 3 ? e[e.length - 2] : e[e.length - 1]) || t.name).replace(/[-_]/g, " ").replace(/\b\w/g, (e) => e.toUpperCase()), i = t.limits && typeof t.limits == "object" ? t.limits.value : null;
482
471
  n = typeof i == "number" ? `${i.toLocaleString()} ${r}` : r;
483
472
  }
484
- return /* @__PURE__ */ f("div", {
473
+ return /* @__PURE__ */ p("div", {
485
474
  className: "flex items-center gap-2 text-sm text-text-primary",
486
- children: [/* @__PURE__ */ d(i, {
475
+ children: [/* @__PURE__ */ f(i, {
487
476
  size: 14,
488
477
  className: "text-[var(--color-status-success)] flex-shrink-0"
489
- }), /* @__PURE__ */ d("span", { children: n })]
478
+ }), /* @__PURE__ */ f("span", { children: n })]
490
479
  }, e.id);
491
- }), e.features.length > 6 && /* @__PURE__ */ f("p", {
480
+ }), e.features.length > 6 && /* @__PURE__ */ p("p", {
492
481
  className: "text-xs text-text-secondary pl-5",
493
482
  children: [
494
483
  "+",
@@ -496,11 +485,11 @@ function b({ productId: b, productName: ne, readOnly: x = !1 }) {
496
485
  " more"
497
486
  ]
498
487
  })]
499
- }) : /* @__PURE__ */ d("div", {
488
+ }) : /* @__PURE__ */ f("div", {
500
489
  className: "border-t border-border-seam pt-3",
501
- children: /* @__PURE__ */ d("p", {
490
+ children: /* @__PURE__ */ f("p", {
502
491
  className: "text-xs text-text-secondary italic",
503
- children: S("products.noFeaturesAssigned", "No features assigned")
492
+ children: C("products.noFeaturesAssigned", "No features assigned")
504
493
  })
505
494
  })
506
495
  ]
@@ -512,6 +501,6 @@ function b({ productId: b, productName: ne, readOnly: x = !1 }) {
512
501
  });
513
502
  }
514
503
  //#endregion
515
- export { b as ProductPlans };
504
+ export { x as ProductPlans };
516
505
 
517
506
  //# sourceMappingURL=ProductPlans.js.map