@burdenoff/microfe-devportal 2026.915.6 → 2026.915.7
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/devportal/components/RegisterPickupLocationModal.d.ts.map +1 -1
- package/dist/devportal/components/RegisterPickupLocationModal.js +3 -1
- package/dist/devportal/components/RegisterPickupLocationModal.js.map +1 -1
- package/dist/devportal/components/ReportOrderIssueModal.d.ts.map +1 -1
- package/dist/devportal/components/ReportOrderIssueModal.js.map +1 -1
- package/dist/devportal/pages/CreateOrganizationPage.d.ts.map +1 -1
- package/dist/devportal/pages/CreateOrganizationPage.js +236 -160
- package/dist/devportal/pages/CreateOrganizationPage.js.map +1 -1
- package/dist/devportal/pages/OrganizationDetailPage.d.ts.map +1 -1
- package/dist/devportal/pages/OrganizationDetailPage.js +330 -316
- package/dist/devportal/pages/OrganizationDetailPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -6,34 +6,35 @@ import { orgSectionPath as i, useIsSellerSection as ee } from "../hooks/useIsSel
|
|
|
6
6
|
import { useCreateBillingAccountMutation as te, useCreateOrganizationMutation as a, useCreateSellerOrganizationMutation as o, useGetBillingAccountsByOrgQuery as s, useLinkDevOrgBillingAccountMutation as c } from "../../generated/global-operations.js";
|
|
7
7
|
import { PageLayout as l, PageSection as u } from "../components/PageLayout.js";
|
|
8
8
|
import { InputField as d, TextareaField as f } from "../components/FormField.js";
|
|
9
|
-
import {
|
|
9
|
+
import { RegisterPickupLocationModal as p } from "../components/RegisterPickupLocationModal.js";
|
|
10
|
+
import { PermissionGuard as m } from "../components/PermissionGuard.js";
|
|
10
11
|
import "../components/index.js";
|
|
11
|
-
import { capitalizeCarrierName as
|
|
12
|
+
import { capitalizeCarrierName as h, useCarrierPickupLocations as g } from "../hooks/useCarrierPickupLocations.js";
|
|
12
13
|
import "../hooks/index.js";
|
|
13
|
-
import { useEffect as
|
|
14
|
-
import { Building2 as
|
|
15
|
-
import { Fragment as
|
|
14
|
+
import { useEffect as ne, useMemo as re, useState as _ } from "react";
|
|
15
|
+
import { Building2 as ie, Check as v, Link2 as ae, Loader2 as y, Trash2 as b, X as x } from "lucide-react";
|
|
16
|
+
import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
16
17
|
//#region src/devportal/pages/CreateOrganizationPage.tsx
|
|
17
|
-
var
|
|
18
|
-
let { navigate:
|
|
18
|
+
var T = () => {
|
|
19
|
+
let { navigate: T, basePath: E, currentUser: oe, tenantId: se, setActiveOrgId: ce, setActivePhysicalOrgId: le } = e(), D = ee(), O = t(), [k, A] = _({}), [j] = a(), [M] = o(), [N] = te(), [P] = c(), F = r(), [I, L] = _("idle"), R = I !== "idle", [z, B] = _("auto"), [V, H] = _(null), { data: U, loading: W } = s({
|
|
19
20
|
fetchPolicy: "cache-and-network",
|
|
20
|
-
context: { headers: { "x-org-id":
|
|
21
|
-
}),
|
|
22
|
-
|
|
23
|
-
if (!(
|
|
24
|
-
if (
|
|
25
|
-
|
|
21
|
+
context: { headers: { "x-org-id": se ?? "" } }
|
|
22
|
+
}), G = re(() => U?.getBillingAccountsByOrg ?? [], [U]);
|
|
23
|
+
ne(() => {
|
|
24
|
+
if (!(z !== "existing" || W)) {
|
|
25
|
+
if (G.length === 0) {
|
|
26
|
+
B("auto");
|
|
26
27
|
return;
|
|
27
28
|
}
|
|
28
|
-
|
|
29
|
+
V || H(G.find((e) => e.isDefault)?.id ?? G[0]?.id ?? null);
|
|
29
30
|
}
|
|
30
31
|
}, [
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
z,
|
|
33
|
+
W,
|
|
34
|
+
G,
|
|
35
|
+
V
|
|
35
36
|
]);
|
|
36
|
-
let [
|
|
37
|
+
let [K, q] = _({
|
|
37
38
|
name: "",
|
|
38
39
|
slug: "",
|
|
39
40
|
description: "",
|
|
@@ -41,220 +42,295 @@ var D = () => {
|
|
|
41
42
|
contactEmail: "",
|
|
42
43
|
supportEmail: "",
|
|
43
44
|
pickupPostalCode: ""
|
|
44
|
-
}), { locations:
|
|
45
|
-
|
|
46
|
-
},
|
|
45
|
+
}), { locations: J, refetch: Y } = g(), [X, Z] = _(!1), Q = (e) => {
|
|
46
|
+
T?.(`${E}${e}`);
|
|
47
|
+
}, ue = (e) => e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, ""), de = (e) => {
|
|
47
48
|
let t = e.target.value;
|
|
48
|
-
|
|
49
|
+
q((e) => ({
|
|
49
50
|
...e,
|
|
50
51
|
name: t,
|
|
51
|
-
slug: e.slug ||
|
|
52
|
-
})),
|
|
52
|
+
slug: e.slug || ue(t)
|
|
53
|
+
})), k.name && A((e) => ({
|
|
53
54
|
...e,
|
|
54
55
|
name: void 0
|
|
55
56
|
}));
|
|
56
57
|
}, $ = (e, t) => {
|
|
57
|
-
|
|
58
|
+
q((n) => ({
|
|
58
59
|
...n,
|
|
59
60
|
[e]: t
|
|
60
|
-
})),
|
|
61
|
+
})), k[e] && A((t) => ({
|
|
61
62
|
...t,
|
|
62
63
|
[e]: void 0
|
|
63
64
|
}));
|
|
64
|
-
},
|
|
65
|
+
}, fe = () => {
|
|
65
66
|
let e = {};
|
|
66
|
-
return
|
|
67
|
+
return K.name.trim() ? K.name.length < 2 ? e.name = O("devportal.orgNameTooShort", "Name must be at least 2 characters") : K.name.length > 100 && (e.name = O("devportal.nameTooLong", "Name must be less than 100 characters")) : e.name = O("devportal.orgNameRequired", "Organization name is required"), K.slug.trim() ? /^[a-z0-9-]+$/.test(K.slug) || (e.slug = O("devportal.slugInvalid", "Slug can only contain lowercase letters, numbers, and hyphens")) : e.slug = O("devportal.slugRequired", "Slug is required"), K.contactEmail && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(K.contactEmail) && (e.contactEmail = O("devportal.invalidEmailAddress", "Invalid email address")), K.supportEmail && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(K.supportEmail) && (e.supportEmail = O("devportal.invalidEmailAddress", "Invalid email address")), A(e), Object.keys(e).length === 0;
|
|
67
68
|
};
|
|
68
|
-
return /* @__PURE__ */
|
|
69
|
+
return /* @__PURE__ */ C(m, {
|
|
69
70
|
authOnly: !0,
|
|
70
|
-
children: /* @__PURE__ */
|
|
71
|
-
title:
|
|
72
|
-
description:
|
|
73
|
-
purpose:
|
|
74
|
-
backLink: `${
|
|
75
|
-
backLabel:
|
|
76
|
-
children: /* @__PURE__ */
|
|
71
|
+
children: /* @__PURE__ */ C(l, {
|
|
72
|
+
title: O("devportal.createOrganization", "Create Organization"),
|
|
73
|
+
description: D ? O("devportal.createSellerOrganizationDescription", "Set up a seller organization to start selling physical products") : O("devportal.createOrganizationDescription", "Set up a developer organization to collaborate with your team"),
|
|
74
|
+
purpose: D ? O("devportal.createSellerOrganizationPurpose", "A seller organization is the shared owner of your physical listings, orders, and revenue. Create one here — you can invite members and complete legal/tax details afterwards.") : O("devportal.createOrganizationPurpose", "An organization is the shared owner of your apps, members, and revenue. Create one here so your team works under a single identity — pick a name and tier now; you can invite members and verify it afterwards."),
|
|
75
|
+
backLink: `${E}${i(D)}`,
|
|
76
|
+
backLabel: O("devportal.backToOrganizations", "Back to Organizations"),
|
|
77
|
+
children: /* @__PURE__ */ w("form", {
|
|
77
78
|
onSubmit: async (e) => {
|
|
78
|
-
if (e.preventDefault(),
|
|
79
|
-
|
|
79
|
+
if (e.preventDefault(), fe()) {
|
|
80
|
+
L("creating-org");
|
|
80
81
|
try {
|
|
81
82
|
let e = {
|
|
82
|
-
name:
|
|
83
|
-
slug:
|
|
84
|
-
description:
|
|
85
|
-
websiteUrl:
|
|
86
|
-
contactEmail:
|
|
87
|
-
supportEmail:
|
|
88
|
-
pickupPostalCode:
|
|
89
|
-
}, t =
|
|
83
|
+
name: K.name,
|
|
84
|
+
slug: K.slug || void 0,
|
|
85
|
+
description: K.description || void 0,
|
|
86
|
+
websiteUrl: K.websiteUrl || void 0,
|
|
87
|
+
contactEmail: K.contactEmail || void 0,
|
|
88
|
+
supportEmail: K.supportEmail || void 0,
|
|
89
|
+
pickupPostalCode: D && K.pickupPostalCode.trim() || void 0
|
|
90
|
+
}, t = D ? (await M({ variables: { input: e } })).data?.createSellerOrganization?.id : (await j({ variables: { input: e } })).data?.createDeveloperOrganization?.id;
|
|
90
91
|
if (!t) {
|
|
91
|
-
|
|
92
|
+
L("idle");
|
|
92
93
|
return;
|
|
93
94
|
}
|
|
94
|
-
if (
|
|
95
|
+
if (F.emit("devportal.org.created", {
|
|
95
96
|
organizationId: t,
|
|
96
|
-
name:
|
|
97
|
-
}),
|
|
98
|
-
|
|
97
|
+
name: K.name
|
|
98
|
+
}), D ? le(t) : ce(t), z === "existing" && V) {
|
|
99
|
+
L("linking-billing");
|
|
99
100
|
try {
|
|
100
|
-
await
|
|
101
|
+
await P({ variables: {
|
|
101
102
|
organizationId: t,
|
|
102
|
-
billingAccountId:
|
|
103
|
+
billingAccountId: V
|
|
103
104
|
} });
|
|
104
105
|
} catch {}
|
|
105
106
|
} else {
|
|
106
|
-
|
|
107
|
+
L("setting-up-billing");
|
|
107
108
|
try {
|
|
108
|
-
let e = (await
|
|
109
|
-
name:
|
|
110
|
-
email:
|
|
109
|
+
let e = (await N({ variables: { input: {
|
|
110
|
+
name: K.name,
|
|
111
|
+
email: oe?.email ?? ""
|
|
111
112
|
} } })).data?.createBillingAccount?.id;
|
|
112
|
-
e && await
|
|
113
|
+
e && await P({ variables: {
|
|
113
114
|
organizationId: t,
|
|
114
115
|
billingAccountId: e
|
|
115
116
|
} });
|
|
116
117
|
} catch {}
|
|
117
118
|
}
|
|
118
|
-
|
|
119
|
+
L("redirecting"), Q(i(D, t));
|
|
119
120
|
} catch (e) {
|
|
120
|
-
console.error("Failed to create organization:", e),
|
|
121
|
+
console.error("Failed to create organization:", e), L("idle");
|
|
121
122
|
}
|
|
122
123
|
}
|
|
123
124
|
},
|
|
124
125
|
className: "space-y-8 max-w-3xl",
|
|
125
126
|
children: [
|
|
126
|
-
/* @__PURE__ */
|
|
127
|
-
title:
|
|
128
|
-
description:
|
|
129
|
-
children: /* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ C(u, {
|
|
128
|
+
title: O("devportal.organizationDetails", "Organization Details"),
|
|
129
|
+
description: O("devportal.organizationDetailsDescription", "Basic information about your organization"),
|
|
130
|
+
children: /* @__PURE__ */ w("div", {
|
|
130
131
|
className: "space-y-4",
|
|
131
132
|
children: [
|
|
132
|
-
/* @__PURE__ */
|
|
133
|
-
label:
|
|
134
|
-
value:
|
|
135
|
-
onChange:
|
|
136
|
-
placeholder:
|
|
133
|
+
/* @__PURE__ */ C(d, {
|
|
134
|
+
label: O("devportal.organizationName", "Organization Name"),
|
|
135
|
+
value: K.name,
|
|
136
|
+
onChange: de,
|
|
137
|
+
placeholder: O("devportal.organizationNamePlaceholder", "Acme Development"),
|
|
137
138
|
required: !0,
|
|
138
|
-
error:
|
|
139
|
-
hint:
|
|
139
|
+
error: k.name,
|
|
140
|
+
hint: O("devportal.organizationNameHint", "Your organization's display name")
|
|
140
141
|
}),
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
label:
|
|
143
|
-
value:
|
|
142
|
+
/* @__PURE__ */ C(d, {
|
|
143
|
+
label: O("devportal.slug", "Slug"),
|
|
144
|
+
value: K.slug,
|
|
144
145
|
onChange: (e) => $("slug", e.target.value.toLowerCase()),
|
|
145
|
-
placeholder:
|
|
146
|
+
placeholder: O("devportal.orgSlugPlaceholder", "acme-dev"),
|
|
146
147
|
required: !0,
|
|
147
|
-
error:
|
|
148
|
-
hint:
|
|
148
|
+
error: k.slug,
|
|
149
|
+
hint: O("devportal.slugHint", "URL-friendly identifier (auto-generated from name)")
|
|
149
150
|
}),
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
-
label:
|
|
152
|
-
value:
|
|
151
|
+
/* @__PURE__ */ C(f, {
|
|
152
|
+
label: O("devportal.description", "Description"),
|
|
153
|
+
value: K.description,
|
|
153
154
|
onChange: (e) => $("description", e.target.value),
|
|
154
|
-
placeholder:
|
|
155
|
+
placeholder: O("devportal.orgDescriptionPlaceholder", "Tell us about your organization..."),
|
|
155
156
|
rows: 3
|
|
156
157
|
}),
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
label:
|
|
158
|
+
/* @__PURE__ */ C(d, {
|
|
159
|
+
label: O("devportal.websiteUrl", "Website URL"),
|
|
159
160
|
type: "url",
|
|
160
|
-
value:
|
|
161
|
+
value: K.websiteUrl,
|
|
161
162
|
onChange: (e) => $("websiteUrl", e.target.value),
|
|
162
163
|
placeholder: "https://example.com"
|
|
163
164
|
}),
|
|
164
|
-
|
|
165
|
-
let e =
|
|
166
|
-
return /* @__PURE__ */
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
165
|
+
D && (() => {
|
|
166
|
+
let e = K.pickupPostalCode.trim(), t = J.find((t) => t.postalCode === e), n = J.length > 0;
|
|
167
|
+
return /* @__PURE__ */ w("div", {
|
|
168
|
+
className: "space-y-3",
|
|
169
|
+
children: [
|
|
170
|
+
/* @__PURE__ */ C("p", {
|
|
171
|
+
className: "text-sm font-medium",
|
|
172
|
+
children: O("devportal.pickupPostalCode", "Pickup address (optional)")
|
|
173
|
+
}),
|
|
174
|
+
e.length === 0 ? /* @__PURE__ */ w("div", {
|
|
175
|
+
className: "rounded-md border border-border-seam bg-bg-sunken p-4",
|
|
176
|
+
children: [/* @__PURE__ */ C("p", {
|
|
177
|
+
className: "text-sm font-medium",
|
|
178
|
+
children: O("devportal.noPickupAddress", "No pickup address set up yet")
|
|
179
|
+
}), /* @__PURE__ */ C("p", {
|
|
180
|
+
className: "mt-1 text-sm text-text-secondary",
|
|
181
|
+
children: O("devportal.pickupPostalCodeHint", "The real address your physical orders ship from — used to quote real carrier shipping rates and register with our shipping carrier, free of charge. You can skip this now and set it up later from organization settings.")
|
|
182
|
+
})]
|
|
183
|
+
}) : t ? /* @__PURE__ */ w("div", {
|
|
184
|
+
className: "rounded-md border border-status-success-border bg-status-success-bg-subtle p-4",
|
|
185
|
+
children: [/* @__PURE__ */ C("p", {
|
|
186
|
+
className: "text-sm font-medium text-status-success-text",
|
|
187
|
+
children: O("devportal.pickupAddressRegistered", "Pickup address registered — ready for automated shipping")
|
|
188
|
+
}), /* @__PURE__ */ w("p", {
|
|
189
|
+
className: "mt-1 text-sm text-text-secondary",
|
|
190
|
+
children: [
|
|
191
|
+
t.label,
|
|
192
|
+
" ·",
|
|
193
|
+
" ",
|
|
194
|
+
t.postalCode,
|
|
195
|
+
" ·",
|
|
196
|
+
" ",
|
|
197
|
+
h(t.carrier)
|
|
198
|
+
]
|
|
199
|
+
})]
|
|
200
|
+
}) : n ? /* @__PURE__ */ w("div", {
|
|
201
|
+
className: "rounded-md border border-status-error-border bg-status-error-bg-subtle p-4",
|
|
202
|
+
children: [/* @__PURE__ */ C("p", {
|
|
203
|
+
className: "text-sm font-medium text-status-error-text",
|
|
204
|
+
children: O("devportal.pickupAddressNotRegistered", "Pickup address not registered")
|
|
205
|
+
}), /* @__PURE__ */ w("p", {
|
|
206
|
+
className: "mt-1 text-sm text-text-secondary",
|
|
207
|
+
children: [
|
|
208
|
+
O("devportal.pickupAddressNotRegisteredHint", "Your saved pincode isn't registered with our shipping carrier yet — physical orders can't auto-ship until it's added."),
|
|
209
|
+
" ",
|
|
210
|
+
"(",
|
|
211
|
+
e,
|
|
212
|
+
")"
|
|
213
|
+
]
|
|
214
|
+
})]
|
|
215
|
+
}) : /* @__PURE__ */ w("div", {
|
|
216
|
+
className: "rounded-md border border-border-seam bg-bg-sunken p-4",
|
|
217
|
+
children: [/* @__PURE__ */ C("p", {
|
|
218
|
+
className: "text-sm font-medium",
|
|
219
|
+
children: e
|
|
220
|
+
}), /* @__PURE__ */ C("p", {
|
|
221
|
+
className: "mt-1 text-sm text-text-secondary",
|
|
222
|
+
children: O("devportal.pickupAddressStatusUnavailable", "Couldn't check registration status right now.")
|
|
223
|
+
})]
|
|
224
|
+
}),
|
|
225
|
+
/* @__PURE__ */ w("div", {
|
|
226
|
+
className: "flex items-center gap-4",
|
|
227
|
+
children: [/* @__PURE__ */ C("button", {
|
|
228
|
+
type: "button",
|
|
229
|
+
onClick: () => Z(!0),
|
|
230
|
+
className: "text-sm font-medium text-action-primary-text hover:underline",
|
|
231
|
+
children: e.length === 0 ? O("devportal.setUpPickupAddressCta", "Set up pickup address") : t ? O("devportal.changePickupAddressCta", "Change pickup address") : O("devportal.registerPickupAddressCta", "Register this address with Shiprocket")
|
|
232
|
+
}), e.length > 0 && /* @__PURE__ */ w("button", {
|
|
233
|
+
type: "button",
|
|
234
|
+
onClick: () => $("pickupPostalCode", ""),
|
|
235
|
+
className: "flex items-center gap-1.5 text-sm text-status-error-text hover:underline",
|
|
236
|
+
children: [/* @__PURE__ */ C(b, { className: "h-3.5 w-3.5" }), O("devportal.removePickupAddressCta", "Remove pickup address")]
|
|
237
|
+
})]
|
|
238
|
+
}),
|
|
239
|
+
X && /* @__PURE__ */ C(p, {
|
|
240
|
+
open: X,
|
|
241
|
+
onOpenChange: Z,
|
|
242
|
+
initialPostalCode: e,
|
|
243
|
+
carrier: "shiprocket",
|
|
244
|
+
onRegistered: (e) => {
|
|
245
|
+
$("pickupPostalCode", e), Y();
|
|
246
|
+
}
|
|
247
|
+
})
|
|
248
|
+
]
|
|
173
249
|
});
|
|
174
250
|
})(),
|
|
175
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ w("div", {
|
|
176
252
|
className: "grid gap-4 sm:grid-cols-2",
|
|
177
|
-
children: [/* @__PURE__ */
|
|
178
|
-
label:
|
|
253
|
+
children: [/* @__PURE__ */ C(d, {
|
|
254
|
+
label: O("devportal.contactEmail", "Contact Email"),
|
|
179
255
|
type: "email",
|
|
180
|
-
value:
|
|
256
|
+
value: K.contactEmail,
|
|
181
257
|
onChange: (e) => $("contactEmail", e.target.value),
|
|
182
258
|
placeholder: "contact@example.com",
|
|
183
|
-
error:
|
|
184
|
-
}), /* @__PURE__ */
|
|
185
|
-
label:
|
|
259
|
+
error: k.contactEmail
|
|
260
|
+
}), /* @__PURE__ */ C(d, {
|
|
261
|
+
label: O("devportal.supportEmail", "Support Email"),
|
|
186
262
|
type: "email",
|
|
187
|
-
value:
|
|
263
|
+
value: K.supportEmail,
|
|
188
264
|
onChange: (e) => $("supportEmail", e.target.value),
|
|
189
265
|
placeholder: "support@example.com",
|
|
190
|
-
error:
|
|
266
|
+
error: k.supportEmail
|
|
191
267
|
})]
|
|
192
268
|
})
|
|
193
269
|
]
|
|
194
270
|
})
|
|
195
271
|
}),
|
|
196
|
-
/* @__PURE__ */
|
|
197
|
-
title:
|
|
198
|
-
description:
|
|
199
|
-
children: /* @__PURE__ */
|
|
272
|
+
/* @__PURE__ */ C(u, {
|
|
273
|
+
title: O("devportal.billingAccount", "Billing Account"),
|
|
274
|
+
description: O("devportal.billingAccountSectionDescription", "Revenue from sales will be credited here. You can change this anytime from the Revenue page."),
|
|
275
|
+
children: /* @__PURE__ */ w("div", {
|
|
200
276
|
className: "space-y-3",
|
|
201
277
|
children: [
|
|
202
|
-
/* @__PURE__ */
|
|
278
|
+
/* @__PURE__ */ w("button", {
|
|
203
279
|
type: "button",
|
|
204
|
-
onClick: () =>
|
|
205
|
-
disabled:
|
|
206
|
-
className: n("flex w-full items-start gap-3 rounded-lg border px-4 py-3 text-left transition-colors disabled:cursor-not-allowed disabled:opacity-50",
|
|
207
|
-
children: [/* @__PURE__ */
|
|
280
|
+
onClick: () => B("auto"),
|
|
281
|
+
disabled: R,
|
|
282
|
+
className: n("flex w-full items-start gap-3 rounded-lg border px-4 py-3 text-left transition-colors disabled:cursor-not-allowed disabled:opacity-50", z === "auto" ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:bg-bg-sunken"),
|
|
283
|
+
children: [/* @__PURE__ */ C(v, {
|
|
208
284
|
size: 16,
|
|
209
|
-
className: n("mt-0.5 flex-shrink-0",
|
|
210
|
-
}), /* @__PURE__ */
|
|
285
|
+
className: n("mt-0.5 flex-shrink-0", z === "auto" ? "opacity-100 text-primary" : "opacity-0")
|
|
286
|
+
}), /* @__PURE__ */ w("div", {
|
|
211
287
|
className: "flex-1 min-w-0",
|
|
212
|
-
children: [/* @__PURE__ */
|
|
288
|
+
children: [/* @__PURE__ */ C("p", {
|
|
213
289
|
className: "text-sm font-medium",
|
|
214
|
-
children:
|
|
215
|
-
}), /* @__PURE__ */
|
|
290
|
+
children: O("devportal.billingAutoCreate", "Create a new billing account automatically")
|
|
291
|
+
}), /* @__PURE__ */ C("p", {
|
|
216
292
|
className: "mt-0.5 text-xs text-text-secondary",
|
|
217
|
-
children:
|
|
293
|
+
children: O("devportal.billingAutoCreateHint", "We'll set one up using your organization name and account email. You can complete legal and tax details for payouts later in Organization Settings.")
|
|
218
294
|
})]
|
|
219
295
|
})]
|
|
220
296
|
}),
|
|
221
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ w("button", {
|
|
222
298
|
type: "button",
|
|
223
|
-
onClick: () =>
|
|
224
|
-
disabled:
|
|
225
|
-
className: n("flex w-full items-start gap-3 rounded-lg border px-4 py-3 text-left transition-colors disabled:cursor-not-allowed disabled:opacity-50",
|
|
226
|
-
children: [/* @__PURE__ */
|
|
299
|
+
onClick: () => B("existing"),
|
|
300
|
+
disabled: R || !W && G.length === 0,
|
|
301
|
+
className: n("flex w-full items-start gap-3 rounded-lg border px-4 py-3 text-left transition-colors disabled:cursor-not-allowed disabled:opacity-50", z === "existing" ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:bg-bg-sunken"),
|
|
302
|
+
children: [/* @__PURE__ */ C(v, {
|
|
227
303
|
size: 16,
|
|
228
|
-
className: n("mt-0.5 flex-shrink-0",
|
|
229
|
-
}), /* @__PURE__ */
|
|
304
|
+
className: n("mt-0.5 flex-shrink-0", z === "existing" ? "opacity-100 text-primary" : "opacity-0")
|
|
305
|
+
}), /* @__PURE__ */ w("div", {
|
|
230
306
|
className: "flex-1 min-w-0",
|
|
231
|
-
children: [/* @__PURE__ */
|
|
307
|
+
children: [/* @__PURE__ */ w("p", {
|
|
232
308
|
className: "flex items-center gap-1.5 text-sm font-medium",
|
|
233
|
-
children: [/* @__PURE__ */
|
|
234
|
-
}), /* @__PURE__ */
|
|
309
|
+
children: [/* @__PURE__ */ C(ae, { size: 14 }), O("devportal.billingLinkExisting", "Link an existing billing account")]
|
|
310
|
+
}), /* @__PURE__ */ C("p", {
|
|
235
311
|
className: "mt-0.5 text-xs text-text-secondary",
|
|
236
|
-
children:
|
|
312
|
+
children: W ? O("devportal.billingAccountsLoading", "Loading your billing accounts...") : G.length === 0 ? O("devportal.noBillingAccountsYet", "You don't have any billing accounts yet — create one from account billing settings first.") : O("devportal.billingAccountsAvailable", "{{count}} billing account(s) available to link", { count: G.length })
|
|
237
313
|
})]
|
|
238
314
|
})]
|
|
239
315
|
}),
|
|
240
|
-
|
|
316
|
+
z === "existing" && G.length > 0 && /* @__PURE__ */ C("div", {
|
|
241
317
|
className: "ml-8 space-y-2",
|
|
242
|
-
children:
|
|
318
|
+
children: G.map((e) => /* @__PURE__ */ w("button", {
|
|
243
319
|
type: "button",
|
|
244
|
-
disabled:
|
|
245
|
-
onClick: () =>
|
|
246
|
-
className: n("flex w-full items-center gap-3 rounded-md border px-3 py-2 text-left text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-50",
|
|
247
|
-
children: [/* @__PURE__ */
|
|
320
|
+
disabled: R,
|
|
321
|
+
onClick: () => H(e.id ?? null),
|
|
322
|
+
className: n("flex w-full items-center gap-3 rounded-md border px-3 py-2 text-left text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-50", V === e.id ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:bg-bg-sunken"),
|
|
323
|
+
children: [/* @__PURE__ */ C(v, {
|
|
248
324
|
size: 14,
|
|
249
|
-
className: n("flex-shrink-0",
|
|
250
|
-
}), /* @__PURE__ */
|
|
325
|
+
className: n("flex-shrink-0", V === e.id ? "opacity-100 text-primary" : "opacity-0")
|
|
326
|
+
}), /* @__PURE__ */ w("div", {
|
|
251
327
|
className: "min-w-0 flex-1",
|
|
252
|
-
children: [/* @__PURE__ */
|
|
328
|
+
children: [/* @__PURE__ */ C("p", {
|
|
253
329
|
className: "truncate font-medium",
|
|
254
330
|
children: e.name
|
|
255
|
-
}), e.isDefault && /* @__PURE__ */
|
|
331
|
+
}), e.isDefault && /* @__PURE__ */ C("p", {
|
|
256
332
|
className: "text-xs text-text-secondary",
|
|
257
|
-
children:
|
|
333
|
+
children: O("devportal.revenue.defaultAccount", "Default")
|
|
258
334
|
})]
|
|
259
335
|
})]
|
|
260
336
|
}, e.id))
|
|
@@ -262,39 +338,39 @@ var D = () => {
|
|
|
262
338
|
]
|
|
263
339
|
})
|
|
264
340
|
}),
|
|
265
|
-
|
|
341
|
+
R && /* @__PURE__ */ w("div", {
|
|
266
342
|
className: "flex items-center gap-2 rounded-lg border border-border-subtle bg-bg-sunken px-4 py-3 text-sm text-text-secondary",
|
|
267
343
|
children: [
|
|
268
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ C(y, {
|
|
269
345
|
size: 16,
|
|
270
346
|
className: "flex-shrink-0 animate-spin text-primary"
|
|
271
347
|
}),
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
348
|
+
I === "creating-org" && O("devportal.creatingOrgStatus", "Creating your organization..."),
|
|
349
|
+
I === "setting-up-billing" && O("devportal.settingUpBillingStatus", "Setting up your billing account..."),
|
|
350
|
+
I === "linking-billing" && O("devportal.linkingBillingStatus", "Linking your billing account..."),
|
|
351
|
+
I === "redirecting" && O("devportal.redirectingStatus", "All set — redirecting...")
|
|
276
352
|
]
|
|
277
353
|
}),
|
|
278
|
-
/* @__PURE__ */
|
|
354
|
+
/* @__PURE__ */ w("div", {
|
|
279
355
|
className: "flex items-center justify-end gap-3 border-t pt-6",
|
|
280
|
-
children: [/* @__PURE__ */
|
|
356
|
+
children: [/* @__PURE__ */ w("button", {
|
|
281
357
|
type: "button",
|
|
282
358
|
onClick: () => {
|
|
283
|
-
Q(i(
|
|
359
|
+
Q(i(D));
|
|
284
360
|
},
|
|
285
|
-
disabled:
|
|
361
|
+
disabled: R,
|
|
286
362
|
className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-bg-sunken transition-colors disabled:opacity-50",
|
|
287
|
-
children: [/* @__PURE__ */
|
|
288
|
-
}), /* @__PURE__ */
|
|
363
|
+
children: [/* @__PURE__ */ C(x, { size: 16 }), O("devportal.cancel", "Cancel")]
|
|
364
|
+
}), /* @__PURE__ */ C("button", {
|
|
289
365
|
type: "submit",
|
|
290
|
-
disabled:
|
|
366
|
+
disabled: R,
|
|
291
367
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
|
|
292
|
-
children:
|
|
293
|
-
/* @__PURE__ */
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
(
|
|
297
|
-
] }) : /* @__PURE__ */
|
|
368
|
+
children: R ? /* @__PURE__ */ w(S, { children: [
|
|
369
|
+
/* @__PURE__ */ C("span", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }),
|
|
370
|
+
I === "setting-up-billing" && O("devportal.settingUpBilling", "Setting up billing..."),
|
|
371
|
+
I === "linking-billing" && O("devportal.linkingBilling", "Linking billing..."),
|
|
372
|
+
(I === "creating-org" || I === "redirecting") && O("devportal.creating", "Creating...")
|
|
373
|
+
] }) : /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(ie, { size: 16 }), O("devportal.createOrganization", "Create Organization")] })
|
|
298
374
|
})]
|
|
299
375
|
})
|
|
300
376
|
]
|
|
@@ -303,6 +379,6 @@ var D = () => {
|
|
|
303
379
|
});
|
|
304
380
|
};
|
|
305
381
|
//#endregion
|
|
306
|
-
export {
|
|
382
|
+
export { T as CreateOrganizationPage };
|
|
307
383
|
|
|
308
384
|
//# sourceMappingURL=CreateOrganizationPage.js.map
|