@burdenoff/microfe-devportal 2026.611.2 → 2026.616.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/devportal/components/SectionNav.js +105 -41
  2. package/dist/devportal/components/SectionNav.js.map +1 -1
  3. package/dist/devportal/hooks/useGraphQL.js +1 -1
  4. package/dist/devportal/pages/AdminReviewPage.js +36 -36
  5. package/dist/devportal/pages/AnalyticsDashboardPage.js +150 -150
  6. package/dist/devportal/pages/AnalyticsDashboardPage.js.map +1 -1
  7. package/dist/devportal/pages/ApiKeysPage.js +184 -172
  8. package/dist/devportal/pages/ApiKeysPage.js.map +1 -1
  9. package/dist/devportal/pages/AppLogsPage.js +9 -9
  10. package/dist/devportal/pages/ApplicationDetailPage.js +414 -414
  11. package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
  12. package/dist/devportal/pages/ApplicationVersionsPage.js +44 -44
  13. package/dist/devportal/pages/ApplicationVersionsPage.js.map +1 -1
  14. package/dist/devportal/pages/ApplicationsPage.js +118 -118
  15. package/dist/devportal/pages/ApplicationsPage.js.map +1 -1
  16. package/dist/devportal/pages/CreateApiKeyPage.js +20 -20
  17. package/dist/devportal/pages/CreateApplicationPage.js +46 -66
  18. package/dist/devportal/pages/CreateApplicationPage.js.map +1 -1
  19. package/dist/devportal/pages/CreateOAuthClientPage.js +20 -20
  20. package/dist/devportal/pages/CreateOrganizationPage.js +125 -442
  21. package/dist/devportal/pages/CreateOrganizationPage.js.map +1 -1
  22. package/dist/devportal/pages/CreateWebhookPage.js +25 -25
  23. package/dist/devportal/pages/DashboardPage.js +160 -145
  24. package/dist/devportal/pages/DashboardPage.js.map +1 -1
  25. package/dist/devportal/pages/DelegationsPage.js +22 -22
  26. package/dist/devportal/pages/EditApplicationPage.js +297 -317
  27. package/dist/devportal/pages/EditApplicationPage.js.map +1 -1
  28. package/dist/devportal/pages/ListingPreviewPage.js +9 -9
  29. package/dist/devportal/pages/OAuthClientDetailPage.js +17 -17
  30. package/dist/devportal/pages/OAuthClientsPage.js +16 -16
  31. package/dist/devportal/pages/OrganizationDetailPage.js +78 -78
  32. package/dist/devportal/pages/OrganizationMembersPage.js +260 -260
  33. package/dist/devportal/pages/OrganizationMembersPage.js.map +1 -1
  34. package/dist/devportal/pages/OrganizationsPage.js +18 -18
  35. package/dist/devportal/pages/PublishPage.js +16 -16
  36. package/dist/devportal/pages/PublisherProfilePage.js +156 -146
  37. package/dist/devportal/pages/PublisherProfilePage.js.map +1 -1
  38. package/dist/devportal/pages/RevenueDashboardPage.js +512 -362
  39. package/dist/devportal/pages/RevenueDashboardPage.js.map +1 -1
  40. package/dist/devportal/pages/SettingsPage.js +17 -17
  41. package/dist/devportal/pages/SetupPage.js +99 -99
  42. package/dist/devportal/pages/SetupPage.js.map +1 -1
  43. package/dist/devportal/pages/WebhookDetailPage.js +143 -143
  44. package/dist/devportal/pages/WebhookDetailPage.js.map +1 -1
  45. package/dist/devportal/pages/WebhooksPage.js +140 -140
  46. package/dist/devportal/pages/WebhooksPage.js.map +1 -1
  47. package/dist/devportal/providers/DevportalProvider.js +46 -33
  48. package/dist/devportal/providers/DevportalProvider.js.map +1 -1
  49. package/dist/generated/global-operations.js +69 -55
  50. package/dist/generated/global-operations.js.map +1 -1
  51. package/package.json +1 -1
@@ -1,508 +1,191 @@
1
1
  import { useDevportal as e } from "../providers/DevportalProvider.js";
2
2
  import { useDevportalEventBus as t } from "../events/index.js";
3
- import { PageLayout as n, PageSection as r } from "../components/PageLayout.js";
4
- import { InputField as i, SelectField as a, TextareaField as o } from "../components/FormField.js";
5
- import { useCreateBillingAccountMutation as s, useCreateOrganizationMutation as c, useLinkDevOrgBillingAccountMutation as l } from "../../generated/global-operations.js";
6
- import { PermissionGuard as u } from "../components/PermissionGuard.js";
3
+ import { useCreateBillingAccountMutation as n, useCreateOrganizationMutation as r, useLinkDevOrgBillingAccountMutation as i } from "../../generated/global-operations.js";
4
+ import { PageLayout as a, PageSection as o } from "../components/PageLayout.js";
5
+ import { InputField as s, TextareaField as c } from "../components/FormField.js";
6
+ import { PermissionGuard as l } from "../components/PermissionGuard.js";
7
7
  import "../components/index.js";
8
- import { DEVPORTAL_PERMISSIONS as d } from "../constants/permissions.js";
8
+ import { DEVPORTAL_PERMISSIONS as u } from "../constants/permissions.js";
9
9
  import "../hooks/index.js";
10
- import { useState as f } from "react";
11
- import { useI18n as p } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
12
- import { Building2 as m, Info as h, X as g } from "lucide-react";
13
- import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
10
+ import { useState as d } from "react";
11
+ import { useI18n as f } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
12
+ import { Building2 as p, Info as m, X as h } from "lucide-react";
13
+ import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
14
14
  //#region src/devportal/pages/CreateOrganizationPage.tsx
15
- var b = [
16
- {
17
- value: "FREE",
18
- label: "Free - Personal projects and testing"
19
- },
20
- {
21
- value: "DEVELOPER",
22
- label: "Developer - Small teams, 3 apps, 1M API calls/month"
23
- },
24
- {
25
- value: "PROFESSIONAL",
26
- label: "Professional - Growing teams, 10 apps, 10M API calls/month"
27
- },
28
- {
29
- value: "ENTERPRISE",
30
- label: "Enterprise - Large organizations, unlimited apps"
31
- }
32
- ], x = [
33
- {
34
- value: "individual",
35
- label: "Individual / Sole Proprietor"
36
- },
37
- {
38
- value: "llc",
39
- label: "Limited Liability Company (LLC)"
40
- },
41
- {
42
- value: "corporation",
43
- label: "Corporation"
44
- },
45
- {
46
- value: "partnership",
47
- label: "Partnership"
48
- },
49
- {
50
- value: "nonprofit",
51
- label: "Non-Profit Organization"
52
- },
53
- {
54
- value: "other",
55
- label: "Other"
56
- }
57
- ], S = [
58
- {
59
- value: "US",
60
- label: "United States"
61
- },
62
- {
63
- value: "GB",
64
- label: "United Kingdom"
65
- },
66
- {
67
- value: "CA",
68
- label: "Canada"
69
- },
70
- {
71
- value: "AU",
72
- label: "Australia"
73
- },
74
- {
75
- value: "DE",
76
- label: "Germany"
77
- },
78
- {
79
- value: "FR",
80
- label: "France"
81
- },
82
- {
83
- value: "IN",
84
- label: "India"
85
- },
86
- {
87
- value: "JP",
88
- label: "Japan"
89
- },
90
- {
91
- value: "SG",
92
- label: "Singapore"
93
- },
94
- {
95
- value: "NL",
96
- label: "Netherlands"
97
- }
98
- ], C = () => {
99
- let { navigate: C, basePath: w, currentUser: T } = e(), { t: E } = p(), D = (e, t) => {
100
- let n = E(e);
15
+ var y = () => {
16
+ let { navigate: y, basePath: b, currentUser: x } = e(), { t: S } = f(), C = (e, t) => {
17
+ let n = S(e);
101
18
  return n === e ? t : n;
102
- }, [O, k] = f({}), [A, j] = f("basic"), [M, { loading: N }] = c(), [P] = s(), [F] = l(), I = t(), [L, R] = f({
19
+ }, [w, T] = d({}), [E, { loading: D }] = r(), [O] = n(), [k] = i(), A = t(), [j, M] = d({
103
20
  name: "",
104
21
  slug: "",
105
22
  description: "",
106
- tier: "FREE",
107
23
  websiteUrl: "",
108
24
  contactEmail: "",
109
- supportEmail: "",
110
- legalEntityName: "",
111
- legalEntityType: "",
112
- taxId: "",
113
- taxCountry: "",
114
- streetAddress: "",
115
- city: "",
116
- state: "",
117
- postalCode: "",
118
- country: ""
119
- }), z = (e) => {
120
- C?.(`${w}${e}`);
121
- }, B = (e) => e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, ""), V = (e) => {
25
+ supportEmail: ""
26
+ }), N = (e) => {
27
+ y?.(`${b}${e}`);
28
+ }, P = (e) => e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, ""), F = (e) => {
122
29
  let t = e.target.value;
123
- R((e) => ({
30
+ M((e) => ({
124
31
  ...e,
125
32
  name: t,
126
- slug: e.slug || B(t)
127
- })), O.name && k((e) => ({
33
+ slug: e.slug || P(t)
34
+ })), w.name && T((e) => ({
128
35
  ...e,
129
36
  name: void 0
130
37
  }));
131
- }, H = (e, t) => {
132
- R((n) => ({
38
+ }, I = (e, t) => {
39
+ M((n) => ({
133
40
  ...n,
134
41
  [e]: t
135
- })), O[e] && k((t) => ({
42
+ })), w[e] && T((t) => ({
136
43
  ...t,
137
44
  [e]: void 0
138
45
  }));
139
- }, U = () => {
46
+ }, L = () => {
140
47
  let e = {};
141
- return L.name.trim() ? L.name.length < 2 ? e.name = D("devportal.orgNameTooShort", "Name must be at least 2 characters") : L.name.length > 100 && (e.name = D("devportal.nameTooLong", "Name must be less than 100 characters")) : e.name = D("devportal.orgNameRequired", "Organization name is required"), L.slug.trim() ? /^[a-z0-9-]+$/.test(L.slug) || (e.slug = D("devportal.slugInvalid", "Slug can only contain lowercase letters, numbers, and hyphens")) : e.slug = D("devportal.slugRequired", "Slug is required"), L.contactEmail && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(L.contactEmail) && (e.contactEmail = D("devportal.invalidEmailAddress", "Invalid email address")), L.supportEmail && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(L.supportEmail) && (e.supportEmail = D("devportal.invalidEmailAddress", "Invalid email address")), k(e), Object.keys(e).length === 0;
142
- }, W = () => {
143
- U() && j("billing");
144
- }, G = () => {
145
- j("basic");
146
- }, K = async (e) => {
147
- if (e.preventDefault(), !U()) {
148
- j("basic");
149
- return;
150
- }
151
- try {
152
- let e = L.streetAddress || L.city || L.state || L.postalCode || L.country ? {
153
- street: L.streetAddress || void 0,
154
- city: L.city || void 0,
155
- state: L.state || void 0,
156
- postalCode: L.postalCode || void 0,
157
- country: L.country || void 0
158
- } : void 0, t = (await M({ variables: { input: {
159
- name: L.name,
160
- slug: L.slug || void 0,
161
- description: L.description || void 0,
162
- websiteUrl: L.websiteUrl || void 0,
163
- contactEmail: L.contactEmail || void 0,
164
- supportEmail: L.supportEmail || void 0,
165
- legalEntityName: L.legalEntityName || void 0,
166
- legalEntityType: L.legalEntityType || void 0,
167
- legalAddress: e,
168
- metadata: L.tier === "FREE" ? void 0 : { tier: L.tier }
169
- } } })).data?.createDeveloperOrganization?.id;
170
- if (t) {
171
- I.emit("devportal.org.created", {
172
- organizationId: t,
173
- name: L.name
174
- });
175
- try {
176
- let e = (await P({ variables: { input: {
177
- name: L.name,
178
- email: T?.email ?? ""
179
- } } })).data?.createBillingAccount?.id;
180
- e && await F({ variables: {
181
- organizationId: t,
182
- billingAccountId: e
183
- } });
184
- } catch {}
185
- z(`/organizations/${t}`);
186
- }
187
- } catch (e) {
188
- console.error("Failed to create organization:", e);
189
- }
190
- }, q = () => {
191
- z("/organizations");
192
- }, J = {
193
- FREE: {
194
- apps: 1,
195
- apiCalls: "100K",
196
- storage: "1GB",
197
- members: 2,
198
- price: "Free"
199
- },
200
- DEVELOPER: {
201
- apps: 3,
202
- apiCalls: "1M",
203
- storage: "5GB",
204
- members: 5,
205
- price: "$29/mo"
206
- },
207
- PROFESSIONAL: {
208
- apps: 10,
209
- apiCalls: "10M",
210
- storage: "25GB",
211
- members: 15,
212
- price: "$99/mo"
213
- },
214
- ENTERPRISE: {
215
- apps: "Unlimited",
216
- apiCalls: "100M+",
217
- storage: "100GB+",
218
- members: "Unlimited",
219
- price: "Custom"
220
- }
48
+ return j.name.trim() ? j.name.length < 2 ? e.name = C("devportal.orgNameTooShort", "Name must be at least 2 characters") : j.name.length > 100 && (e.name = C("devportal.nameTooLong", "Name must be less than 100 characters")) : e.name = C("devportal.orgNameRequired", "Organization name is required"), j.slug.trim() ? /^[a-z0-9-]+$/.test(j.slug) || (e.slug = C("devportal.slugInvalid", "Slug can only contain lowercase letters, numbers, and hyphens")) : e.slug = C("devportal.slugRequired", "Slug is required"), j.contactEmail && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(j.contactEmail) && (e.contactEmail = C("devportal.invalidEmailAddress", "Invalid email address")), j.supportEmail && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(j.supportEmail) && (e.supportEmail = C("devportal.invalidEmailAddress", "Invalid email address")), T(e), Object.keys(e).length === 0;
221
49
  };
222
- return /* @__PURE__ */ v(u, {
223
- permission: d.ORG_CREATE,
224
- children: /* @__PURE__ */ y(n, {
225
- title: D("devportal.createOrganization", "Create Organization"),
226
- description: D("devportal.createOrganizationDescription", "Set up a developer organization to collaborate with your team"),
227
- backLink: `${w}/organizations`,
228
- backLabel: D("devportal.backToOrganizations", "Back to Organizations"),
229
- children: [/* @__PURE__ */ y("div", {
230
- className: "flex items-center gap-4 mb-8",
231
- children: [
232
- /* @__PURE__ */ y("div", {
233
- className: "flex items-center gap-2",
234
- children: [/* @__PURE__ */ v("div", {
235
- className: `flex h-8 w-8 items-center justify-center rounded-full text-sm font-medium ${A === "basic" ? "bg-primary text-primary-foreground" : "bg-primary/20 text-primary"}`,
236
- children: "1"
237
- }), /* @__PURE__ */ v("span", {
238
- className: `text-sm font-medium ${A === "basic" ? "text-foreground" : "text-muted-foreground"}`,
239
- children: D("devportal.basicInfo", "Basic Info")
240
- })]
241
- }),
242
- /* @__PURE__ */ v("div", { className: "h-px flex-1 bg-border" }),
243
- /* @__PURE__ */ y("div", {
244
- className: "flex items-center gap-2",
245
- children: [/* @__PURE__ */ v("div", {
246
- className: `flex h-8 w-8 items-center justify-center rounded-full text-sm font-medium ${A === "billing" ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground"}`,
247
- children: "2"
248
- }), /* @__PURE__ */ v("span", {
249
- className: `text-sm font-medium ${A === "billing" ? "text-foreground" : "text-muted-foreground"}`,
250
- children: D("devportal.billingAndLegal", "Billing & Legal")
251
- })]
252
- })
253
- ]
254
- }), /* @__PURE__ */ y("form", {
255
- onSubmit: K,
50
+ return /* @__PURE__ */ _(l, {
51
+ permission: u.ORG_CREATE,
52
+ children: /* @__PURE__ */ _(a, {
53
+ title: C("devportal.createOrganization", "Create Organization"),
54
+ description: C("devportal.createOrganizationDescription", "Set up a developer organization to collaborate with your team"),
55
+ backLink: `${b}/organizations`,
56
+ backLabel: C("devportal.backToOrganizations", "Back to Organizations"),
57
+ children: /* @__PURE__ */ v("form", {
58
+ onSubmit: async (e) => {
59
+ if (e.preventDefault(), L()) try {
60
+ let e = (await E({ variables: { input: {
61
+ name: j.name,
62
+ slug: j.slug || void 0,
63
+ description: j.description || void 0,
64
+ websiteUrl: j.websiteUrl || void 0,
65
+ contactEmail: j.contactEmail || void 0,
66
+ supportEmail: j.supportEmail || void 0
67
+ } } })).data?.createDeveloperOrganization?.id;
68
+ if (e) {
69
+ A.emit("devportal.org.created", {
70
+ organizationId: e,
71
+ name: j.name
72
+ });
73
+ try {
74
+ let t = (await O({ variables: { input: {
75
+ name: j.name,
76
+ email: x?.email ?? ""
77
+ } } })).data?.createBillingAccount?.id;
78
+ t && await k({ variables: {
79
+ organizationId: e,
80
+ billingAccountId: t
81
+ } });
82
+ } catch {}
83
+ N(`/organizations/${e}`);
84
+ }
85
+ } catch (e) {
86
+ console.error("Failed to create organization:", e);
87
+ }
88
+ },
256
89
  className: "space-y-8 max-w-3xl",
257
- children: [A === "basic" && /* @__PURE__ */ y(_, { children: [
258
- /* @__PURE__ */ v(r, {
259
- title: D("devportal.organizationDetails", "Organization Details"),
260
- description: D("devportal.organizationDetailsDescription", "Basic information about your organization"),
261
- children: /* @__PURE__ */ y("div", {
90
+ children: [
91
+ /* @__PURE__ */ _(o, {
92
+ title: C("devportal.organizationDetails", "Organization Details"),
93
+ description: C("devportal.organizationDetailsDescription", "Basic information about your organization"),
94
+ children: /* @__PURE__ */ v("div", {
262
95
  className: "space-y-4",
263
96
  children: [
264
- /* @__PURE__ */ v(i, {
265
- label: D("devportal.organizationName", "Organization Name"),
266
- value: L.name,
267
- onChange: V,
268
- placeholder: D("devportal.organizationNamePlaceholder", "Acme Development"),
97
+ /* @__PURE__ */ _(s, {
98
+ label: C("devportal.organizationName", "Organization Name"),
99
+ value: j.name,
100
+ onChange: F,
101
+ placeholder: C("devportal.organizationNamePlaceholder", "Acme Development"),
269
102
  required: !0,
270
- error: O.name,
271
- hint: D("devportal.organizationNameHint", "Your organization's display name")
103
+ error: w.name,
104
+ hint: C("devportal.organizationNameHint", "Your organization's display name")
272
105
  }),
273
- /* @__PURE__ */ v(i, {
274
- label: D("devportal.slug", "Slug"),
275
- value: L.slug,
276
- onChange: (e) => H("slug", e.target.value.toLowerCase()),
277
- placeholder: D("devportal.orgSlugPlaceholder", "acme-dev"),
106
+ /* @__PURE__ */ _(s, {
107
+ label: C("devportal.slug", "Slug"),
108
+ value: j.slug,
109
+ onChange: (e) => I("slug", e.target.value.toLowerCase()),
110
+ placeholder: C("devportal.orgSlugPlaceholder", "acme-dev"),
278
111
  required: !0,
279
- error: O.slug,
280
- hint: D("devportal.slugHint", "URL-friendly identifier (auto-generated from name)")
112
+ error: w.slug,
113
+ hint: C("devportal.slugHint", "URL-friendly identifier (auto-generated from name)")
281
114
  }),
282
- /* @__PURE__ */ v(o, {
283
- label: D("devportal.description", "Description"),
284
- value: L.description,
285
- onChange: (e) => H("description", e.target.value),
286
- placeholder: D("devportal.orgDescriptionPlaceholder", "Tell us about your organization..."),
115
+ /* @__PURE__ */ _(c, {
116
+ label: C("devportal.description", "Description"),
117
+ value: j.description,
118
+ onChange: (e) => I("description", e.target.value),
119
+ placeholder: C("devportal.orgDescriptionPlaceholder", "Tell us about your organization..."),
287
120
  rows: 3
288
121
  }),
289
- /* @__PURE__ */ v(i, {
290
- label: D("devportal.websiteUrl", "Website URL"),
122
+ /* @__PURE__ */ _(s, {
123
+ label: C("devportal.websiteUrl", "Website URL"),
291
124
  type: "url",
292
- value: L.websiteUrl,
293
- onChange: (e) => H("websiteUrl", e.target.value),
125
+ value: j.websiteUrl,
126
+ onChange: (e) => I("websiteUrl", e.target.value),
294
127
  placeholder: "https://example.com"
295
128
  }),
296
- /* @__PURE__ */ y("div", {
129
+ /* @__PURE__ */ v("div", {
297
130
  className: "grid gap-4 sm:grid-cols-2",
298
- children: [/* @__PURE__ */ v(i, {
299
- label: D("devportal.contactEmail", "Contact Email"),
131
+ children: [/* @__PURE__ */ _(s, {
132
+ label: C("devportal.contactEmail", "Contact Email"),
300
133
  type: "email",
301
- value: L.contactEmail,
302
- onChange: (e) => H("contactEmail", e.target.value),
134
+ value: j.contactEmail,
135
+ onChange: (e) => I("contactEmail", e.target.value),
303
136
  placeholder: "contact@example.com",
304
- error: O.contactEmail
305
- }), /* @__PURE__ */ v(i, {
306
- label: D("devportal.supportEmail", "Support Email"),
137
+ error: w.contactEmail
138
+ }), /* @__PURE__ */ _(s, {
139
+ label: C("devportal.supportEmail", "Support Email"),
307
140
  type: "email",
308
- value: L.supportEmail,
309
- onChange: (e) => H("supportEmail", e.target.value),
141
+ value: j.supportEmail,
142
+ onChange: (e) => I("supportEmail", e.target.value),
310
143
  placeholder: "support@example.com",
311
- error: O.supportEmail
144
+ error: w.supportEmail
312
145
  })]
313
146
  })
314
147
  ]
315
148
  })
316
149
  }),
317
- /* @__PURE__ */ v(r, {
318
- title: D("devportal.selectPlan", "Select Plan"),
319
- description: D("devportal.selectPlanDescription", "Choose a plan that fits your needs"),
320
- children: /* @__PURE__ */ v("div", {
321
- className: "grid gap-4 sm:grid-cols-2",
322
- children: b.map((e) => {
323
- let t = J[e.value], n = L.tier === e.value;
324
- return /* @__PURE__ */ y("button", {
325
- type: "button",
326
- onClick: () => H("tier", e.value),
327
- className: `rounded-lg border p-4 text-left transition-colors ${n ? "border-primary bg-primary/5 ring-2 ring-primary" : "hover:border-muted-foreground/50"}`,
328
- children: [/* @__PURE__ */ y("div", {
329
- className: "flex items-start justify-between",
330
- children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
331
- className: "font-medium",
332
- children: e.value
333
- }), /* @__PURE__ */ v("p", {
334
- className: "text-sm text-muted-foreground",
335
- children: t.price
336
- })] }), /* @__PURE__ */ v("div", {
337
- className: `h-4 w-4 rounded-full border-2 ${n ? "border-primary bg-primary" : "border-muted-foreground"}`,
338
- children: n && /* @__PURE__ */ v("div", {
339
- className: "h-full w-full flex items-center justify-center",
340
- children: /* @__PURE__ */ v("div", { className: "h-1.5 w-1.5 rounded-full bg-bg-surface" })
341
- })
342
- })]
343
- }), /* @__PURE__ */ y("div", {
344
- className: "mt-3 grid grid-cols-2 gap-2 text-xs text-muted-foreground",
345
- children: [
346
- /* @__PURE__ */ y("span", { children: [
347
- t.apps,
348
- " ",
349
- D("devportal.apps", "apps")
350
- ] }),
351
- /* @__PURE__ */ y("span", { children: [
352
- t.apiCalls,
353
- " ",
354
- D("devportal.apiCalls", "API calls")
355
- ] }),
356
- /* @__PURE__ */ y("span", { children: [
357
- t.storage,
358
- " ",
359
- D("devportal.storage", "storage")
360
- ] }),
361
- /* @__PURE__ */ y("span", { children: [
362
- t.members,
363
- " ",
364
- D("devportal.members", "members")
365
- ] })
366
- ]
367
- })]
368
- }, e.value);
369
- })
370
- })
371
- }),
372
- /* @__PURE__ */ y("div", {
373
- className: "flex items-center justify-end gap-3 border-t pt-6",
374
- children: [/* @__PURE__ */ y("button", {
375
- type: "button",
376
- onClick: q,
377
- className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors",
378
- children: [/* @__PURE__ */ v(g, { size: 16 }), D("devportal.cancel", "Cancel")]
379
- }), /* @__PURE__ */ v("button", {
380
- type: "button",
381
- onClick: W,
382
- className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors",
383
- children: D("devportal.continue", "Continue")
384
- })]
385
- })
386
- ] }), A === "billing" && /* @__PURE__ */ y(_, { children: [
387
- /* @__PURE__ */ v(r, {
388
- title: D("devportal.legalInformation", "Legal Information"),
389
- description: D("devportal.legalInformationDescription", "Required for payouts and compliance (optional for Free tier)"),
390
- children: /* @__PURE__ */ y("div", {
391
- className: "space-y-4",
392
- children: [
393
- /* @__PURE__ */ v(i, {
394
- label: D("devportal.legalEntityName", "Legal Entity Name"),
395
- value: L.legalEntityName,
396
- onChange: (e) => H("legalEntityName", e.target.value),
397
- placeholder: D("devportal.legalEntityNamePlaceholder", "Acme Inc."),
398
- hint: D("devportal.legalEntityNameHint", "Your registered business name")
399
- }),
400
- /* @__PURE__ */ y("div", {
401
- className: "grid gap-4 sm:grid-cols-2",
402
- children: [/* @__PURE__ */ v(a, {
403
- label: D("devportal.entityType", "Entity Type"),
404
- value: L.legalEntityType,
405
- onChange: (e) => H("legalEntityType", e.target.value),
406
- options: x,
407
- placeholder: D("devportal.selectEntityType", "Select entity type")
408
- }), /* @__PURE__ */ v(a, {
409
- label: D("devportal.taxCountry", "Tax Country"),
410
- value: L.taxCountry,
411
- onChange: (e) => H("taxCountry", e.target.value),
412
- options: S,
413
- placeholder: D("devportal.selectCountry", "Select country")
414
- })]
415
- }),
416
- /* @__PURE__ */ v(i, {
417
- label: D("devportal.taxIdVatNumber", "Tax ID / VAT Number"),
418
- value: L.taxId,
419
- onChange: (e) => H("taxId", e.target.value),
420
- placeholder: "XX-XXXXXXX",
421
- hint: D("devportal.taxIdHint", "Your business tax identification number")
422
- })
423
- ]
424
- })
425
- }),
426
- /* @__PURE__ */ v(r, {
427
- title: D("devportal.businessAddress", "Business Address"),
428
- description: D("devportal.businessAddressDescription", "Used for invoicing and legal documents"),
429
- children: /* @__PURE__ */ y("div", {
430
- className: "space-y-4",
431
- children: [
432
- /* @__PURE__ */ v(i, {
433
- label: D("devportal.streetAddress", "Street Address"),
434
- value: L.streetAddress,
435
- onChange: (e) => H("streetAddress", e.target.value),
436
- placeholder: D("devportal.streetAddressPlaceholder", "123 Main Street")
437
- }),
438
- /* @__PURE__ */ y("div", {
439
- className: "grid gap-4 sm:grid-cols-2",
440
- children: [/* @__PURE__ */ v(i, {
441
- label: D("devportal.city", "City"),
442
- value: L.city,
443
- onChange: (e) => H("city", e.target.value),
444
- placeholder: D("devportal.cityPlaceholder", "San Francisco")
445
- }), /* @__PURE__ */ v(i, {
446
- label: D("devportal.stateProvince", "State / Province"),
447
- value: L.state,
448
- onChange: (e) => H("state", e.target.value),
449
- placeholder: D("devportal.stateProvincePlaceholder", "California")
450
- })]
451
- }),
452
- /* @__PURE__ */ y("div", {
453
- className: "grid gap-4 sm:grid-cols-2",
454
- children: [/* @__PURE__ */ v(i, {
455
- label: D("devportal.postalCode", "Postal Code"),
456
- value: L.postalCode,
457
- onChange: (e) => H("postalCode", e.target.value),
458
- placeholder: D("devportal.postalCodePlaceholder", "94102")
459
- }), /* @__PURE__ */ v(a, {
460
- label: D("devportal.country", "Country"),
461
- value: L.country,
462
- onChange: (e) => H("country", e.target.value),
463
- options: S,
464
- placeholder: D("devportal.selectCountry", "Select country")
465
- })]
466
- })
467
- ]
468
- })
469
- }),
470
- /* @__PURE__ */ y("div", {
150
+ /* @__PURE__ */ v("div", {
471
151
  className: "rounded-lg border border-border-subtle bg-status-info-bg-subtle p-4 flex gap-3",
472
- children: [/* @__PURE__ */ v(h, {
152
+ children: [/* @__PURE__ */ _(m, {
473
153
  size: 20,
474
154
  className: "text-accent-blue flex-shrink-0 mt-0.5"
475
- }), /* @__PURE__ */ y("div", {
155
+ }), /* @__PURE__ */ v("div", {
476
156
  className: "text-sm text-status-info-text",
477
- children: [/* @__PURE__ */ v("p", {
157
+ children: [/* @__PURE__ */ _("p", {
478
158
  className: "font-medium",
479
- children: D("devportal.canAddLater", "You can add this later")
480
- }), /* @__PURE__ */ v("p", {
481
- className: "mt-1 text-status-info-text",
482
- children: D("devportal.legalInfoOptionalNote", "Legal and billing information is only required when you want to receive payouts from app sales or upgrade to a paid plan.")
159
+ children: C("devportal.billingAutoSetup", "A billing account will be automatically set up")
160
+ }), /* @__PURE__ */ _("p", {
161
+ className: "mt-1",
162
+ children: C("devportal.billingAutoSetupNote", "Revenue from app sales will be credited to it. You can complete legal and tax details for payouts later in Organization Settings.")
483
163
  })]
484
164
  })]
485
165
  }),
486
- /* @__PURE__ */ y("div", {
487
- className: "flex items-center justify-between border-t pt-6",
166
+ /* @__PURE__ */ v("div", {
167
+ className: "flex items-center justify-end gap-3 border-t pt-6",
488
168
  children: [/* @__PURE__ */ v("button", {
489
169
  type: "button",
490
- onClick: G,
491
- className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors",
492
- children: D("devportal.back", "Back")
493
- }), /* @__PURE__ */ v("button", {
170
+ onClick: () => {
171
+ N("/organizations");
172
+ },
173
+ disabled: D,
174
+ className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors disabled:opacity-50",
175
+ children: [/* @__PURE__ */ _(h, { size: 16 }), C("devportal.cancel", "Cancel")]
176
+ }), /* @__PURE__ */ _("button", {
494
177
  type: "submit",
495
- disabled: N,
178
+ disabled: D,
496
179
  className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
497
- children: N ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("span", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), D("devportal.creating", "Creating...")] }) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(m, { size: 16 }), D("devportal.createOrganization", "Create Organization")] })
180
+ children: D ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("span", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), C("devportal.creating", "Creating...")] }) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(p, { size: 16 }), C("devportal.createOrganization", "Create Organization")] })
498
181
  })]
499
182
  })
500
- ] })]
501
- })]
183
+ ]
184
+ })
502
185
  })
503
186
  });
504
187
  };
505
188
  //#endregion
506
- export { C as CreateOrganizationPage };
189
+ export { y as CreateOrganizationPage };
507
190
 
508
191
  //# sourceMappingURL=CreateOrganizationPage.js.map