@burdenoff/microfe-devportal 2026.915.6 → 2026.915.8
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 +15 -15
- package/dist/devportal/components/RegisterPickupLocationModal.d.ts.map +1 -1
- package/dist/devportal/components/RegisterPickupLocationModal.js +13 -10
- 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/hooks/useOrganizationPickupAddresses.d.ts +31 -0
- package/dist/devportal/hooks/useOrganizationPickupAddresses.d.ts.map +1 -0
- package/dist/devportal/hooks/useOrganizationPickupAddresses.js +34 -0
- package/dist/devportal/hooks/useOrganizationPickupAddresses.js.map +1 -0
- package/dist/devportal/pages/CreateOrganizationPage.d.ts.map +1 -1
- package/dist/devportal/pages/CreateOrganizationPage.js +155 -165
- 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 +526 -473
- package/dist/devportal/pages/OrganizationDetailPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,259 +2,249 @@ import { useDevportal as e } from "../providers/DevportalProvider.js";
|
|
|
2
2
|
import { useTr as t } from "../utils/i18n.js";
|
|
3
3
|
import { cn as n } from "../utils/cn.js";
|
|
4
4
|
import { useDevportalEventBus as r } from "../events/index.js";
|
|
5
|
-
import { orgSectionPath as i, useIsSellerSection as
|
|
6
|
-
import { useCreateBillingAccountMutation as
|
|
7
|
-
import { PageLayout as
|
|
8
|
-
import { InputField as
|
|
9
|
-
import { PermissionGuard as
|
|
5
|
+
import { orgSectionPath as i, useIsSellerSection as a } from "../hooks/useIsSellerSection.js";
|
|
6
|
+
import { useCreateBillingAccountMutation as o, useCreateOrganizationMutation as s, useCreateSellerOrganizationMutation as c, useGetBillingAccountsByOrgQuery as l, useLinkDevOrgBillingAccountMutation as u } from "../../generated/global-operations.js";
|
|
7
|
+
import { PageLayout as d, PageSection as f } from "../components/PageLayout.js";
|
|
8
|
+
import { InputField as p, TextareaField as m } from "../components/FormField.js";
|
|
9
|
+
import { PermissionGuard as h } from "../components/PermissionGuard.js";
|
|
10
10
|
import "../components/index.js";
|
|
11
|
-
import { capitalizeCarrierName as m, useCarrierPickupLocations as h } from "../hooks/useCarrierPickupLocations.js";
|
|
12
11
|
import "../hooks/index.js";
|
|
13
12
|
import { useEffect as g, useMemo as _, useState as v } from "react";
|
|
14
|
-
import { Building2 as y, Check as b, Link2 as x, Loader2 as S, X as
|
|
15
|
-
import { Fragment as
|
|
13
|
+
import { Building2 as y, Check as b, Link2 as x, Loader2 as S, X as ee } from "lucide-react";
|
|
14
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
16
15
|
//#region src/devportal/pages/CreateOrganizationPage.tsx
|
|
17
|
-
var
|
|
18
|
-
let { navigate:
|
|
16
|
+
var E = () => {
|
|
17
|
+
let { navigate: E, basePath: D, currentUser: O, tenantId: k, setActiveOrgId: A, setActivePhysicalOrgId: te } = e(), j = a(), M = t(), [N, P] = v({}), [F] = s(), [I] = c(), [L] = o(), [R] = u(), z = r(), [B, V] = v("idle"), H = B !== "idle", [U, W] = v("auto"), [G, K] = v(null), { data: q, loading: J } = l({
|
|
19
18
|
fetchPolicy: "cache-and-network",
|
|
20
|
-
context: { headers: { "x-org-id":
|
|
21
|
-
}),
|
|
19
|
+
context: { headers: { "x-org-id": k ?? "" } }
|
|
20
|
+
}), Y = _(() => q?.getBillingAccountsByOrg ?? [], [q]);
|
|
22
21
|
g(() => {
|
|
23
|
-
if (!(
|
|
24
|
-
if (
|
|
25
|
-
|
|
22
|
+
if (!(U !== "existing" || J)) {
|
|
23
|
+
if (Y.length === 0) {
|
|
24
|
+
W("auto");
|
|
26
25
|
return;
|
|
27
26
|
}
|
|
28
|
-
|
|
27
|
+
G || K(Y.find((e) => e.isDefault)?.id ?? Y[0]?.id ?? null);
|
|
29
28
|
}
|
|
30
29
|
}, [
|
|
31
|
-
|
|
32
|
-
q,
|
|
30
|
+
U,
|
|
33
31
|
J,
|
|
34
|
-
|
|
32
|
+
Y,
|
|
33
|
+
G
|
|
35
34
|
]);
|
|
36
|
-
let [
|
|
35
|
+
let [X, Z] = v({
|
|
37
36
|
name: "",
|
|
38
37
|
slug: "",
|
|
39
38
|
description: "",
|
|
40
39
|
websiteUrl: "",
|
|
41
40
|
contactEmail: "",
|
|
42
|
-
supportEmail: ""
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}, ae = (e) => e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, ""), oe = (e) => {
|
|
41
|
+
supportEmail: ""
|
|
42
|
+
}), Q = (e) => {
|
|
43
|
+
E?.(`${D}${e}`);
|
|
44
|
+
}, ne = (e) => e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, ""), re = (e) => {
|
|
47
45
|
let t = e.target.value;
|
|
48
|
-
|
|
46
|
+
Z((e) => ({
|
|
49
47
|
...e,
|
|
50
48
|
name: t,
|
|
51
|
-
slug: e.slug ||
|
|
52
|
-
})),
|
|
49
|
+
slug: e.slug || ne(t)
|
|
50
|
+
})), N.name && P((e) => ({
|
|
53
51
|
...e,
|
|
54
52
|
name: void 0
|
|
55
53
|
}));
|
|
56
54
|
}, $ = (e, t) => {
|
|
57
|
-
|
|
55
|
+
Z((n) => ({
|
|
58
56
|
...n,
|
|
59
57
|
[e]: t
|
|
60
|
-
})),
|
|
58
|
+
})), N[e] && P((t) => ({
|
|
61
59
|
...t,
|
|
62
60
|
[e]: void 0
|
|
63
61
|
}));
|
|
64
|
-
},
|
|
62
|
+
}, ie = () => {
|
|
65
63
|
let e = {};
|
|
66
|
-
return
|
|
64
|
+
return X.name.trim() ? X.name.length < 2 ? e.name = M("devportal.orgNameTooShort", "Name must be at least 2 characters") : X.name.length > 100 && (e.name = M("devportal.nameTooLong", "Name must be less than 100 characters")) : e.name = M("devportal.orgNameRequired", "Organization name is required"), X.slug.trim() ? /^[a-z0-9-]+$/.test(X.slug) || (e.slug = M("devportal.slugInvalid", "Slug can only contain lowercase letters, numbers, and hyphens")) : e.slug = M("devportal.slugRequired", "Slug is required"), X.contactEmail && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(X.contactEmail) && (e.contactEmail = M("devportal.invalidEmailAddress", "Invalid email address")), X.supportEmail && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(X.supportEmail) && (e.supportEmail = M("devportal.invalidEmailAddress", "Invalid email address")), P(e), Object.keys(e).length === 0;
|
|
67
65
|
};
|
|
68
|
-
return /* @__PURE__ */
|
|
66
|
+
return /* @__PURE__ */ w(h, {
|
|
69
67
|
authOnly: !0,
|
|
70
|
-
children: /* @__PURE__ */
|
|
71
|
-
title:
|
|
72
|
-
description:
|
|
73
|
-
purpose:
|
|
74
|
-
backLink: `${
|
|
75
|
-
backLabel:
|
|
76
|
-
children: /* @__PURE__ */
|
|
68
|
+
children: /* @__PURE__ */ w(d, {
|
|
69
|
+
title: M("devportal.createOrganization", "Create Organization"),
|
|
70
|
+
description: j ? M("devportal.createSellerOrganizationDescription", "Set up a seller organization to start selling physical products") : M("devportal.createOrganizationDescription", "Set up a developer organization to collaborate with your team"),
|
|
71
|
+
purpose: j ? M("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.") : M("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."),
|
|
72
|
+
backLink: `${D}${i(j)}`,
|
|
73
|
+
backLabel: M("devportal.backToOrganizations", "Back to Organizations"),
|
|
74
|
+
children: /* @__PURE__ */ T("form", {
|
|
77
75
|
onSubmit: async (e) => {
|
|
78
|
-
if (e.preventDefault(),
|
|
79
|
-
|
|
76
|
+
if (e.preventDefault(), ie()) {
|
|
77
|
+
V("creating-org");
|
|
80
78
|
try {
|
|
81
79
|
let e = {
|
|
82
|
-
name:
|
|
83
|
-
slug:
|
|
84
|
-
description:
|
|
85
|
-
websiteUrl:
|
|
86
|
-
contactEmail:
|
|
87
|
-
supportEmail:
|
|
88
|
-
|
|
89
|
-
}, t = A ? (await F({ variables: { input: e } })).data?.createSellerOrganization?.id : (await P({ variables: { input: e } })).data?.createDeveloperOrganization?.id;
|
|
80
|
+
name: X.name,
|
|
81
|
+
slug: X.slug || void 0,
|
|
82
|
+
description: X.description || void 0,
|
|
83
|
+
websiteUrl: X.websiteUrl || void 0,
|
|
84
|
+
contactEmail: X.contactEmail || void 0,
|
|
85
|
+
supportEmail: X.supportEmail || void 0
|
|
86
|
+
}, t = j ? (await I({ variables: { input: e } })).data?.createSellerOrganization?.id : (await F({ variables: { input: e } })).data?.createDeveloperOrganization?.id;
|
|
90
87
|
if (!t) {
|
|
91
|
-
|
|
88
|
+
V("idle");
|
|
92
89
|
return;
|
|
93
90
|
}
|
|
94
|
-
if (
|
|
91
|
+
if (z.emit("devportal.org.created", {
|
|
95
92
|
organizationId: t,
|
|
96
|
-
name:
|
|
97
|
-
}),
|
|
98
|
-
|
|
93
|
+
name: X.name
|
|
94
|
+
}), j ? te(t) : A(t), U === "existing" && G) {
|
|
95
|
+
V("linking-billing");
|
|
99
96
|
try {
|
|
100
|
-
await
|
|
97
|
+
await R({ variables: {
|
|
101
98
|
organizationId: t,
|
|
102
|
-
billingAccountId:
|
|
99
|
+
billingAccountId: G
|
|
103
100
|
} });
|
|
104
101
|
} catch {}
|
|
105
102
|
} else {
|
|
106
|
-
|
|
103
|
+
V("setting-up-billing");
|
|
107
104
|
try {
|
|
108
|
-
let e = (await
|
|
109
|
-
name:
|
|
110
|
-
email:
|
|
105
|
+
let e = (await L({ variables: { input: {
|
|
106
|
+
name: X.name,
|
|
107
|
+
email: O?.email ?? ""
|
|
111
108
|
} } })).data?.createBillingAccount?.id;
|
|
112
|
-
e && await
|
|
109
|
+
e && await R({ variables: {
|
|
113
110
|
organizationId: t,
|
|
114
111
|
billingAccountId: e
|
|
115
112
|
} });
|
|
116
113
|
} catch {}
|
|
117
114
|
}
|
|
118
|
-
|
|
115
|
+
V("redirecting"), Q(i(j, t));
|
|
119
116
|
} catch (e) {
|
|
120
|
-
console.error("Failed to create organization:", e),
|
|
117
|
+
console.error("Failed to create organization:", e), V("idle");
|
|
121
118
|
}
|
|
122
119
|
}
|
|
123
120
|
},
|
|
124
121
|
className: "space-y-8 max-w-3xl",
|
|
125
122
|
children: [
|
|
126
|
-
/* @__PURE__ */
|
|
127
|
-
title:
|
|
128
|
-
description:
|
|
129
|
-
children: /* @__PURE__ */
|
|
123
|
+
/* @__PURE__ */ w(f, {
|
|
124
|
+
title: M("devportal.organizationDetails", "Organization Details"),
|
|
125
|
+
description: M("devportal.organizationDetailsDescription", "Basic information about your organization"),
|
|
126
|
+
children: /* @__PURE__ */ T("div", {
|
|
130
127
|
className: "space-y-4",
|
|
131
128
|
children: [
|
|
132
|
-
/* @__PURE__ */
|
|
133
|
-
label:
|
|
134
|
-
value:
|
|
135
|
-
onChange:
|
|
136
|
-
placeholder:
|
|
129
|
+
/* @__PURE__ */ w(p, {
|
|
130
|
+
label: M("devportal.organizationName", "Organization Name"),
|
|
131
|
+
value: X.name,
|
|
132
|
+
onChange: re,
|
|
133
|
+
placeholder: M("devportal.organizationNamePlaceholder", "Acme Development"),
|
|
137
134
|
required: !0,
|
|
138
|
-
error:
|
|
139
|
-
hint:
|
|
135
|
+
error: N.name,
|
|
136
|
+
hint: M("devportal.organizationNameHint", "Your organization's display name")
|
|
140
137
|
}),
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
label:
|
|
143
|
-
value:
|
|
138
|
+
/* @__PURE__ */ w(p, {
|
|
139
|
+
label: M("devportal.slug", "Slug"),
|
|
140
|
+
value: X.slug,
|
|
144
141
|
onChange: (e) => $("slug", e.target.value.toLowerCase()),
|
|
145
|
-
placeholder:
|
|
142
|
+
placeholder: M("devportal.orgSlugPlaceholder", "acme-dev"),
|
|
146
143
|
required: !0,
|
|
147
|
-
error:
|
|
148
|
-
hint:
|
|
144
|
+
error: N.slug,
|
|
145
|
+
hint: M("devportal.slugHint", "URL-friendly identifier (auto-generated from name)")
|
|
149
146
|
}),
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
-
label:
|
|
152
|
-
value:
|
|
147
|
+
/* @__PURE__ */ w(m, {
|
|
148
|
+
label: M("devportal.description", "Description"),
|
|
149
|
+
value: X.description,
|
|
153
150
|
onChange: (e) => $("description", e.target.value),
|
|
154
|
-
placeholder:
|
|
151
|
+
placeholder: M("devportal.orgDescriptionPlaceholder", "Tell us about your organization..."),
|
|
155
152
|
rows: 3
|
|
156
153
|
}),
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
label:
|
|
154
|
+
/* @__PURE__ */ w(p, {
|
|
155
|
+
label: M("devportal.websiteUrl", "Website URL"),
|
|
159
156
|
type: "url",
|
|
160
|
-
value:
|
|
157
|
+
value: X.websiteUrl,
|
|
161
158
|
onChange: (e) => $("websiteUrl", e.target.value),
|
|
162
159
|
placeholder: "https://example.com"
|
|
163
160
|
}),
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
onChange: (e) => $("pickupPostalCode", e.target.value),
|
|
170
|
-
placeholder: "560001",
|
|
171
|
-
error: t ? void 0 : n,
|
|
172
|
-
hint: t ? n : j("devportal.pickupPostalCodeHint", "The postal code your physical orders actually ship from — used to quote real carrier shipping rates. You can skip this now and set it later from organization settings.")
|
|
173
|
-
});
|
|
174
|
-
})(),
|
|
175
|
-
/* @__PURE__ */ E("div", {
|
|
161
|
+
j && /* @__PURE__ */ w("p", {
|
|
162
|
+
className: "rounded-md border border-border-seam bg-bg-sunken p-4 text-sm text-text-secondary",
|
|
163
|
+
children: M("devportal.pickupAddressDeferredHint", "You can add and register your real pickup address — and add more than one — right after creating your organization, from its Settings tab.")
|
|
164
|
+
}),
|
|
165
|
+
/* @__PURE__ */ T("div", {
|
|
176
166
|
className: "grid gap-4 sm:grid-cols-2",
|
|
177
|
-
children: [/* @__PURE__ */
|
|
178
|
-
label:
|
|
167
|
+
children: [/* @__PURE__ */ w(p, {
|
|
168
|
+
label: M("devportal.contactEmail", "Contact Email"),
|
|
179
169
|
type: "email",
|
|
180
|
-
value:
|
|
170
|
+
value: X.contactEmail,
|
|
181
171
|
onChange: (e) => $("contactEmail", e.target.value),
|
|
182
172
|
placeholder: "contact@example.com",
|
|
183
|
-
error:
|
|
184
|
-
}), /* @__PURE__ */
|
|
185
|
-
label:
|
|
173
|
+
error: N.contactEmail
|
|
174
|
+
}), /* @__PURE__ */ w(p, {
|
|
175
|
+
label: M("devportal.supportEmail", "Support Email"),
|
|
186
176
|
type: "email",
|
|
187
|
-
value:
|
|
177
|
+
value: X.supportEmail,
|
|
188
178
|
onChange: (e) => $("supportEmail", e.target.value),
|
|
189
179
|
placeholder: "support@example.com",
|
|
190
|
-
error:
|
|
180
|
+
error: N.supportEmail
|
|
191
181
|
})]
|
|
192
182
|
})
|
|
193
183
|
]
|
|
194
184
|
})
|
|
195
185
|
}),
|
|
196
|
-
/* @__PURE__ */
|
|
197
|
-
title:
|
|
198
|
-
description:
|
|
199
|
-
children: /* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ w(f, {
|
|
187
|
+
title: M("devportal.billingAccount", "Billing Account"),
|
|
188
|
+
description: M("devportal.billingAccountSectionDescription", "Revenue from sales will be credited here. You can change this anytime from the Revenue page."),
|
|
189
|
+
children: /* @__PURE__ */ T("div", {
|
|
200
190
|
className: "space-y-3",
|
|
201
191
|
children: [
|
|
202
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ T("button", {
|
|
203
193
|
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__ */
|
|
194
|
+
onClick: () => W("auto"),
|
|
195
|
+
disabled: H,
|
|
196
|
+
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", U === "auto" ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:bg-bg-sunken"),
|
|
197
|
+
children: [/* @__PURE__ */ w(b, {
|
|
208
198
|
size: 16,
|
|
209
|
-
className: n("mt-0.5 flex-shrink-0",
|
|
210
|
-
}), /* @__PURE__ */
|
|
199
|
+
className: n("mt-0.5 flex-shrink-0", U === "auto" ? "opacity-100 text-primary" : "opacity-0")
|
|
200
|
+
}), /* @__PURE__ */ T("div", {
|
|
211
201
|
className: "flex-1 min-w-0",
|
|
212
|
-
children: [/* @__PURE__ */
|
|
202
|
+
children: [/* @__PURE__ */ w("p", {
|
|
213
203
|
className: "text-sm font-medium",
|
|
214
|
-
children:
|
|
215
|
-
}), /* @__PURE__ */
|
|
204
|
+
children: M("devportal.billingAutoCreate", "Create a new billing account automatically")
|
|
205
|
+
}), /* @__PURE__ */ w("p", {
|
|
216
206
|
className: "mt-0.5 text-xs text-text-secondary",
|
|
217
|
-
children:
|
|
207
|
+
children: M("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
208
|
})]
|
|
219
209
|
})]
|
|
220
210
|
}),
|
|
221
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ T("button", {
|
|
222
212
|
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__ */
|
|
213
|
+
onClick: () => W("existing"),
|
|
214
|
+
disabled: H || !J && Y.length === 0,
|
|
215
|
+
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", U === "existing" ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:bg-bg-sunken"),
|
|
216
|
+
children: [/* @__PURE__ */ w(b, {
|
|
227
217
|
size: 16,
|
|
228
|
-
className: n("mt-0.5 flex-shrink-0",
|
|
229
|
-
}), /* @__PURE__ */
|
|
218
|
+
className: n("mt-0.5 flex-shrink-0", U === "existing" ? "opacity-100 text-primary" : "opacity-0")
|
|
219
|
+
}), /* @__PURE__ */ T("div", {
|
|
230
220
|
className: "flex-1 min-w-0",
|
|
231
|
-
children: [/* @__PURE__ */
|
|
221
|
+
children: [/* @__PURE__ */ T("p", {
|
|
232
222
|
className: "flex items-center gap-1.5 text-sm font-medium",
|
|
233
|
-
children: [/* @__PURE__ */
|
|
234
|
-
}), /* @__PURE__ */
|
|
223
|
+
children: [/* @__PURE__ */ w(x, { size: 14 }), M("devportal.billingLinkExisting", "Link an existing billing account")]
|
|
224
|
+
}), /* @__PURE__ */ w("p", {
|
|
235
225
|
className: "mt-0.5 text-xs text-text-secondary",
|
|
236
|
-
children:
|
|
226
|
+
children: J ? M("devportal.billingAccountsLoading", "Loading your billing accounts...") : Y.length === 0 ? M("devportal.noBillingAccountsYet", "You don't have any billing accounts yet — create one from account billing settings first.") : M("devportal.billingAccountsAvailable", "{{count}} billing account(s) available to link", { count: Y.length })
|
|
237
227
|
})]
|
|
238
228
|
})]
|
|
239
229
|
}),
|
|
240
|
-
|
|
230
|
+
U === "existing" && Y.length > 0 && /* @__PURE__ */ w("div", {
|
|
241
231
|
className: "ml-8 space-y-2",
|
|
242
|
-
children:
|
|
232
|
+
children: Y.map((e) => /* @__PURE__ */ T("button", {
|
|
243
233
|
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__ */
|
|
234
|
+
disabled: H,
|
|
235
|
+
onClick: () => K(e.id ?? null),
|
|
236
|
+
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", G === e.id ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:bg-bg-sunken"),
|
|
237
|
+
children: [/* @__PURE__ */ w(b, {
|
|
248
238
|
size: 14,
|
|
249
|
-
className: n("flex-shrink-0",
|
|
250
|
-
}), /* @__PURE__ */
|
|
239
|
+
className: n("flex-shrink-0", G === e.id ? "opacity-100 text-primary" : "opacity-0")
|
|
240
|
+
}), /* @__PURE__ */ T("div", {
|
|
251
241
|
className: "min-w-0 flex-1",
|
|
252
|
-
children: [/* @__PURE__ */
|
|
242
|
+
children: [/* @__PURE__ */ w("p", {
|
|
253
243
|
className: "truncate font-medium",
|
|
254
244
|
children: e.name
|
|
255
|
-
}), e.isDefault && /* @__PURE__ */
|
|
245
|
+
}), e.isDefault && /* @__PURE__ */ w("p", {
|
|
256
246
|
className: "text-xs text-text-secondary",
|
|
257
|
-
children:
|
|
247
|
+
children: M("devportal.revenue.defaultAccount", "Default")
|
|
258
248
|
})]
|
|
259
249
|
})]
|
|
260
250
|
}, e.id))
|
|
@@ -262,39 +252,39 @@ var D = () => {
|
|
|
262
252
|
]
|
|
263
253
|
})
|
|
264
254
|
}),
|
|
265
|
-
|
|
255
|
+
H && /* @__PURE__ */ T("div", {
|
|
266
256
|
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
257
|
children: [
|
|
268
|
-
/* @__PURE__ */
|
|
258
|
+
/* @__PURE__ */ w(S, {
|
|
269
259
|
size: 16,
|
|
270
260
|
className: "flex-shrink-0 animate-spin text-primary"
|
|
271
261
|
}),
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
262
|
+
B === "creating-org" && M("devportal.creatingOrgStatus", "Creating your organization..."),
|
|
263
|
+
B === "setting-up-billing" && M("devportal.settingUpBillingStatus", "Setting up your billing account..."),
|
|
264
|
+
B === "linking-billing" && M("devportal.linkingBillingStatus", "Linking your billing account..."),
|
|
265
|
+
B === "redirecting" && M("devportal.redirectingStatus", "All set — redirecting...")
|
|
276
266
|
]
|
|
277
267
|
}),
|
|
278
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ T("div", {
|
|
279
269
|
className: "flex items-center justify-end gap-3 border-t pt-6",
|
|
280
|
-
children: [/* @__PURE__ */
|
|
270
|
+
children: [/* @__PURE__ */ T("button", {
|
|
281
271
|
type: "button",
|
|
282
272
|
onClick: () => {
|
|
283
|
-
Q(i(
|
|
273
|
+
Q(i(j));
|
|
284
274
|
},
|
|
285
|
-
disabled:
|
|
275
|
+
disabled: H,
|
|
286
276
|
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__ */
|
|
277
|
+
children: [/* @__PURE__ */ w(ee, { size: 16 }), M("devportal.cancel", "Cancel")]
|
|
278
|
+
}), /* @__PURE__ */ w("button", {
|
|
289
279
|
type: "submit",
|
|
290
|
-
disabled:
|
|
280
|
+
disabled: H,
|
|
291
281
|
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__ */
|
|
282
|
+
children: H ? /* @__PURE__ */ T(C, { children: [
|
|
283
|
+
/* @__PURE__ */ w("span", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }),
|
|
284
|
+
B === "setting-up-billing" && M("devportal.settingUpBilling", "Setting up billing..."),
|
|
285
|
+
B === "linking-billing" && M("devportal.linkingBilling", "Linking billing..."),
|
|
286
|
+
(B === "creating-org" || B === "redirecting") && M("devportal.creating", "Creating...")
|
|
287
|
+
] }) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(y, { size: 16 }), M("devportal.createOrganization", "Create Organization")] })
|
|
298
288
|
})]
|
|
299
289
|
})
|
|
300
290
|
]
|
|
@@ -303,6 +293,6 @@ var D = () => {
|
|
|
303
293
|
});
|
|
304
294
|
};
|
|
305
295
|
//#endregion
|
|
306
|
-
export {
|
|
296
|
+
export { E as CreateOrganizationPage };
|
|
307
297
|
|
|
308
298
|
//# sourceMappingURL=CreateOrganizationPage.js.map
|