@burdenoff/microfe-devportal 2026.720.7 → 2026.724.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/devportal/components/ConfirmDialog.d.ts.map +1 -1
- package/dist/devportal/components/ConfirmDialog.js +12 -14
- package/dist/devportal/components/ConfirmDialog.js.map +1 -1
- package/dist/devportal/pages/ApplicationDetailPage.js +2 -2
- package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
- package/dist/devportal/pages/CreateApplicationPage.d.ts.map +1 -1
- package/dist/devportal/pages/CreateApplicationPage.js +189 -188
- package/dist/devportal/pages/CreateApplicationPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,16 +3,16 @@ import { cn as t } from "../utils/cn.js";
|
|
|
3
3
|
import { useDevportalEventBus as n } from "../events/index.js";
|
|
4
4
|
import { useCreateApplicationMutation as r, useGetMyOrganizationsQuery as i } from "../../generated/global-operations.js";
|
|
5
5
|
import { PageLayout as a, PageSection as o } from "../components/PageLayout.js";
|
|
6
|
-
import { InputField as s, SelectField as c
|
|
7
|
-
import { PermissionGuard as
|
|
8
|
-
import { MarkdownEditor as
|
|
6
|
+
import { InputField as s, SelectField as c } from "../components/FormField.js";
|
|
7
|
+
import { PermissionGuard as l } from "../components/PermissionGuard.js";
|
|
8
|
+
import { MarkdownEditor as u } from "../components/MarkdownEditor.js";
|
|
9
9
|
import "../components/index.js";
|
|
10
|
-
import { useRef as
|
|
11
|
-
import { useI18n as
|
|
12
|
-
import { ArrowLeft as
|
|
13
|
-
import { Fragment as
|
|
10
|
+
import { useRef as ee, useState as d } from "react";
|
|
11
|
+
import { useI18n as te } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
12
|
+
import { ArrowLeft as f, Box as p, Check as m, ChevronRight as h, GitFork as g, Info as _, Loader2 as v, Puzzle as y, Save as b, X as x } from "lucide-react";
|
|
13
|
+
import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
14
14
|
//#region src/devportal/pages/CreateApplicationPage.tsx
|
|
15
|
-
var
|
|
15
|
+
var T = [
|
|
16
16
|
{
|
|
17
17
|
id: "auth",
|
|
18
18
|
label: "Authentication",
|
|
@@ -84,10 +84,10 @@ var E = [
|
|
|
84
84
|
description: "Access control configuration"
|
|
85
85
|
}
|
|
86
86
|
];
|
|
87
|
-
function
|
|
88
|
-
return Object.fromEntries(
|
|
87
|
+
function E() {
|
|
88
|
+
return Object.fromEntries(T.map((e) => [e.id, "none"]));
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function D(e) {
|
|
91
91
|
return Object.entries(e).filter(([, e]) => e !== "none").map(([e, t]) => ({
|
|
92
92
|
resource: e,
|
|
93
93
|
level: t
|
|
@@ -138,34 +138,34 @@ var O = [
|
|
|
138
138
|
value: "trigger",
|
|
139
139
|
label: "Triggers"
|
|
140
140
|
}
|
|
141
|
-
], j = ({ icon: e, title: n, description: r, bullets: i, selected: a, onClick: o }) => /* @__PURE__ */
|
|
141
|
+
], j = ({ icon: e, title: n, description: r, bullets: i, selected: a, onClick: o }) => /* @__PURE__ */ w("button", {
|
|
142
142
|
type: "button",
|
|
143
143
|
onClick: o,
|
|
144
144
|
className: t("relative flex flex-col gap-3 rounded-xl border-2 p-6 text-left transition-all hover:border-primary/50 hover:shadow-sm", a ? "border-primary bg-action-primary-bg/5 shadow-sm" : "border-border-subtle bg-bg-surface"),
|
|
145
145
|
children: [
|
|
146
|
-
a && /* @__PURE__ */
|
|
146
|
+
a && /* @__PURE__ */ C("span", {
|
|
147
147
|
className: "absolute top-4 right-4 flex h-5 w-5 items-center justify-center rounded-full bg-action-primary-bg text-action-primary-text",
|
|
148
|
-
children: /* @__PURE__ */
|
|
148
|
+
children: /* @__PURE__ */ C(m, { size: 12 })
|
|
149
149
|
}),
|
|
150
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ C("div", {
|
|
151
151
|
className: "flex h-10 w-10 items-center justify-center rounded-lg bg-bg-sunken",
|
|
152
|
-
children: /* @__PURE__ */
|
|
152
|
+
children: /* @__PURE__ */ C(e, {
|
|
153
153
|
size: 22,
|
|
154
154
|
className: "text-text-primary"
|
|
155
155
|
})
|
|
156
156
|
}),
|
|
157
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
|
|
158
158
|
className: "font-semibold text-text-primary",
|
|
159
159
|
children: n
|
|
160
|
-
}), /* @__PURE__ */
|
|
160
|
+
}), /* @__PURE__ */ C("p", {
|
|
161
161
|
className: "mt-1 text-sm text-text-secondary",
|
|
162
162
|
children: r
|
|
163
163
|
})] }),
|
|
164
|
-
/* @__PURE__ */
|
|
164
|
+
/* @__PURE__ */ C("ul", {
|
|
165
165
|
className: "mt-1 space-y-1",
|
|
166
|
-
children: i.map((e) => /* @__PURE__ */
|
|
166
|
+
children: i.map((e) => /* @__PURE__ */ w("li", {
|
|
167
167
|
className: "flex items-center gap-2 text-xs text-text-secondary",
|
|
168
|
-
children: [/* @__PURE__ */
|
|
168
|
+
children: [/* @__PURE__ */ C(h, {
|
|
169
169
|
size: 12,
|
|
170
170
|
className: "flex-shrink-0 text-primary"
|
|
171
171
|
}), e]
|
|
@@ -182,35 +182,35 @@ var O = [
|
|
|
182
182
|
read: "Read",
|
|
183
183
|
write: "Read & Write"
|
|
184
184
|
};
|
|
185
|
-
return /* @__PURE__ */
|
|
185
|
+
return /* @__PURE__ */ C("div", {
|
|
186
186
|
className: "overflow-x-auto rounded-lg border border-border-subtle",
|
|
187
|
-
children: /* @__PURE__ */
|
|
187
|
+
children: /* @__PURE__ */ w("table", {
|
|
188
188
|
className: "w-full text-sm",
|
|
189
|
-
children: [/* @__PURE__ */
|
|
189
|
+
children: [/* @__PURE__ */ C("thead", { children: /* @__PURE__ */ w("tr", {
|
|
190
190
|
className: "border-b border-border-subtle bg-bg-sunken/50",
|
|
191
|
-
children: [/* @__PURE__ */
|
|
191
|
+
children: [/* @__PURE__ */ C("th", {
|
|
192
192
|
className: "px-4 py-3 text-left font-medium text-text-secondary w-1/2",
|
|
193
193
|
children: "Resource"
|
|
194
|
-
}), n.map((e) => /* @__PURE__ */
|
|
194
|
+
}), n.map((e) => /* @__PURE__ */ C("th", {
|
|
195
195
|
className: "px-4 py-3 text-center font-medium text-text-secondary",
|
|
196
196
|
children: r[e]
|
|
197
197
|
}, e))]
|
|
198
|
-
}) }), /* @__PURE__ */
|
|
198
|
+
}) }), /* @__PURE__ */ C("tbody", {
|
|
199
199
|
className: "divide-y divide-border",
|
|
200
|
-
children:
|
|
200
|
+
children: T.map((r) => /* @__PURE__ */ w("tr", {
|
|
201
201
|
className: "hover:bg-bg-sunken/30 transition-colors",
|
|
202
|
-
children: [/* @__PURE__ */
|
|
202
|
+
children: [/* @__PURE__ */ w("td", {
|
|
203
203
|
className: "px-4 py-3",
|
|
204
|
-
children: [/* @__PURE__ */
|
|
204
|
+
children: [/* @__PURE__ */ C("p", {
|
|
205
205
|
className: "font-medium text-text-primary",
|
|
206
206
|
children: r.label
|
|
207
|
-
}), /* @__PURE__ */
|
|
207
|
+
}), /* @__PURE__ */ C("p", {
|
|
208
208
|
className: "text-xs text-text-secondary",
|
|
209
209
|
children: r.description
|
|
210
210
|
})]
|
|
211
|
-
}), n.map((n) => /* @__PURE__ */
|
|
211
|
+
}), n.map((n) => /* @__PURE__ */ C("td", {
|
|
212
212
|
className: "px-4 py-3 text-center",
|
|
213
|
-
children: /* @__PURE__ */
|
|
213
|
+
children: /* @__PURE__ */ C("input", {
|
|
214
214
|
type: "radio",
|
|
215
215
|
name: `permission-${r.id}`,
|
|
216
216
|
value: n,
|
|
@@ -223,7 +223,7 @@ var O = [
|
|
|
223
223
|
})]
|
|
224
224
|
})
|
|
225
225
|
});
|
|
226
|
-
},
|
|
226
|
+
}, ne = [
|
|
227
227
|
{
|
|
228
228
|
value: "fluidgrids",
|
|
229
229
|
label: "FluidGrids"
|
|
@@ -240,18 +240,18 @@ var O = [
|
|
|
240
240
|
value: "botlit",
|
|
241
241
|
label: "Botlit"
|
|
242
242
|
}
|
|
243
|
-
],
|
|
244
|
-
let { navigate:
|
|
243
|
+
], N = () => {
|
|
244
|
+
let { navigate: h, basePath: T, activeOrgId: N } = e(), { t: re } = te(), ie = (e, t) => {
|
|
245
245
|
let n = re(e);
|
|
246
246
|
return n === e ? t : n;
|
|
247
|
-
}, ae = n(), [
|
|
247
|
+
}, ae = n(), [P, F] = d(null), [I, L] = d([]), [R, z] = d(E()), B = ee(!1), [V, H] = d({
|
|
248
248
|
name: "",
|
|
249
249
|
slug: "",
|
|
250
250
|
shortDescription: "",
|
|
251
251
|
description: "",
|
|
252
252
|
category: "",
|
|
253
253
|
visibility: "PUBLIC",
|
|
254
|
-
developerOrganizationId:
|
|
254
|
+
developerOrganizationId: N ?? "",
|
|
255
255
|
websiteUrl: "",
|
|
256
256
|
githubUrl: "",
|
|
257
257
|
documentationUrl: "",
|
|
@@ -259,108 +259,108 @@ var O = [
|
|
|
259
259
|
oauthAuthUrl: "",
|
|
260
260
|
oauthTokenUrl: "",
|
|
261
261
|
oauthRevokeUrl: ""
|
|
262
|
-
}), [
|
|
262
|
+
}), [U, W] = d({}), [G, { loading: K }] = r(), { data: q } = i({ fetchPolicy: "cache-and-network" }), J = [{
|
|
263
263
|
value: "",
|
|
264
264
|
label: "No organization (personal)"
|
|
265
|
-
}, ...(
|
|
265
|
+
}, ...(q?.myDeveloperOrganizations ?? []).map((e) => ({
|
|
266
266
|
value: e.id,
|
|
267
267
|
label: e.name
|
|
268
|
-
}))], Y = (e) =>
|
|
268
|
+
}))], Y = (e) => h?.(`${T}${e}`), oe = (e) => e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, ""), se = (e) => {
|
|
269
269
|
let t = e.target.value;
|
|
270
|
-
|
|
270
|
+
H((e) => ({
|
|
271
271
|
...e,
|
|
272
272
|
name: t,
|
|
273
|
-
slug:
|
|
274
|
-
})),
|
|
273
|
+
slug: B.current ? e.slug : oe(t)
|
|
274
|
+
})), U.name && W((e) => ({
|
|
275
275
|
...e,
|
|
276
276
|
name: void 0
|
|
277
277
|
}));
|
|
278
|
-
},
|
|
279
|
-
|
|
278
|
+
}, ce = (e) => {
|
|
279
|
+
B.current = !0;
|
|
280
280
|
let t = e.target.value.toLowerCase().replace(/[^a-z0-9-]/g, "");
|
|
281
|
-
|
|
281
|
+
H((e) => ({
|
|
282
282
|
...e,
|
|
283
283
|
slug: t
|
|
284
|
-
})),
|
|
284
|
+
})), U.slug && W((e) => ({
|
|
285
285
|
...e,
|
|
286
286
|
slug: void 0
|
|
287
287
|
}));
|
|
288
288
|
}, X = (e, t) => {
|
|
289
|
-
|
|
289
|
+
H((n) => ({
|
|
290
290
|
...n,
|
|
291
291
|
[e]: t
|
|
292
|
-
})), (
|
|
292
|
+
})), (U[e] || U._submit) && W((t) => ({
|
|
293
293
|
...t,
|
|
294
294
|
[e]: void 0,
|
|
295
295
|
_submit: void 0
|
|
296
296
|
}));
|
|
297
297
|
}, Z = (e, t) => {
|
|
298
|
-
|
|
298
|
+
z((n) => ({
|
|
299
299
|
...n,
|
|
300
300
|
[e]: t
|
|
301
301
|
}));
|
|
302
|
-
},
|
|
302
|
+
}, le = () => {
|
|
303
303
|
let e = {};
|
|
304
|
-
return
|
|
305
|
-
}, Q = () =>
|
|
306
|
-
if (e.preventDefault(), !
|
|
307
|
-
let t =
|
|
304
|
+
return V.name.trim() ? V.name.length < 3 ? e.name = "Name must be at least 3 characters" : V.name.length > 100 && (e.name = "Name must be less than 100 characters") : e.name = "Name is required", V.slug.trim() ? /^[a-z0-9-]+$/.test(V.slug) || (e.slug = "Slug can only contain lowercase letters, numbers, and hyphens") : e.slug = "Slug is required", V.shortDescription.trim() ? V.shortDescription.length > 200 && (e.shortDescription = "Short description must be less than 200 characters") : e.shortDescription = "Short description is required", V.category || (e.category = "Category is required"), P !== "app" && I.length === 0 && (e.compatibleProducts = "Select at least one compatible product so users can find this in the right store"), W(e), Object.keys(e).length === 0;
|
|
305
|
+
}, Q = () => P === "node" ? "NODE" : P === "workflow" ? "WORKFLOW" : "API_INTEGRATION", ue = async (e) => {
|
|
306
|
+
if (e.preventDefault(), !le() || !P) return;
|
|
307
|
+
let t = P === "app" ? { permissions: D(R) } : null;
|
|
308
308
|
try {
|
|
309
|
-
let e = await
|
|
310
|
-
name:
|
|
311
|
-
slug:
|
|
312
|
-
shortDescription:
|
|
313
|
-
description:
|
|
314
|
-
category:
|
|
309
|
+
let e = await G({ variables: { input: {
|
|
310
|
+
name: V.name,
|
|
311
|
+
slug: V.slug || void 0,
|
|
312
|
+
shortDescription: V.shortDescription || void 0,
|
|
313
|
+
description: V.description || void 0,
|
|
314
|
+
category: V.category || void 0,
|
|
315
315
|
appType: Q(),
|
|
316
|
-
visibility:
|
|
317
|
-
developerOrganizationId:
|
|
318
|
-
websiteUrl:
|
|
319
|
-
githubUrl:
|
|
320
|
-
documentationUrl:
|
|
321
|
-
supportUrl:
|
|
316
|
+
visibility: V.visibility,
|
|
317
|
+
developerOrganizationId: V.developerOrganizationId || void 0,
|
|
318
|
+
websiteUrl: V.websiteUrl || void 0,
|
|
319
|
+
githubUrl: V.githubUrl || void 0,
|
|
320
|
+
documentationUrl: V.documentationUrl || void 0,
|
|
321
|
+
supportUrl: V.supportUrl || void 0,
|
|
322
322
|
manifest: t ?? void 0,
|
|
323
|
-
compatibleProducts:
|
|
324
|
-
...
|
|
325
|
-
oauthAuthUrl:
|
|
326
|
-
oauthTokenUrl:
|
|
327
|
-
oauthRevokeUrl:
|
|
323
|
+
compatibleProducts: I.length > 0 ? I : void 0,
|
|
324
|
+
...P === "app" && {
|
|
325
|
+
oauthAuthUrl: V.oauthAuthUrl || void 0,
|
|
326
|
+
oauthTokenUrl: V.oauthTokenUrl || void 0,
|
|
327
|
+
oauthRevokeUrl: V.oauthRevokeUrl || void 0
|
|
328
328
|
}
|
|
329
329
|
} } });
|
|
330
330
|
e.data?.createApplication?.id && (ae.emit("devportal.app.created", {
|
|
331
331
|
appId: e.data.createApplication.id,
|
|
332
|
-
name:
|
|
332
|
+
name: V.name,
|
|
333
333
|
appType: Q(),
|
|
334
|
-
organizationId:
|
|
334
|
+
organizationId: V.developerOrganizationId || null
|
|
335
335
|
}), Y(`/apps/${e.data.createApplication.id}`));
|
|
336
336
|
} catch (e) {
|
|
337
337
|
let t = [];
|
|
338
338
|
e && typeof e == "object" && "graphQLErrors" in e && Array.isArray(e.graphQLErrors) && e.graphQLErrors.forEach((e) => t.push(e.message)), e instanceof Error && t.push(e.message);
|
|
339
339
|
let n = t.join(" ").toLowerCase();
|
|
340
|
-
n.includes("slug") || n.includes("already exist") || n.includes("unique") || n.includes("conflict") || n.includes("duplicate") ?
|
|
340
|
+
n.includes("slug") || n.includes("already exist") || n.includes("unique") || n.includes("conflict") || n.includes("duplicate") ? W((e) => ({
|
|
341
341
|
...e,
|
|
342
342
|
slug: "This slug is already taken — choose a different one"
|
|
343
|
-
})) :
|
|
343
|
+
})) : W((e) => ({
|
|
344
344
|
...e,
|
|
345
345
|
_submit: t[0] ?? "Something went wrong. Please try again."
|
|
346
346
|
}));
|
|
347
347
|
}
|
|
348
348
|
};
|
|
349
|
-
if (!
|
|
349
|
+
if (!P) return /* @__PURE__ */ C(l, {
|
|
350
350
|
authOnly: !0,
|
|
351
|
-
children: /* @__PURE__ */
|
|
351
|
+
children: /* @__PURE__ */ C(a, {
|
|
352
352
|
title: "What do you want to build?",
|
|
353
353
|
description: "Choose a builder type to get started",
|
|
354
354
|
purpose: "Pick the kind of integration you are creating — a standard app, a Node package, or a workflow. Your choice sets up the right defaults (credentials, permissions, and where it can be installed) so you only fill in what that type actually needs.",
|
|
355
|
-
backLink: `${
|
|
355
|
+
backLink: `${T}/apps`,
|
|
356
356
|
backLabel: "Back to Applications",
|
|
357
|
-
children: /* @__PURE__ */
|
|
357
|
+
children: /* @__PURE__ */ w("div", {
|
|
358
358
|
className: "max-w-3xl space-y-6",
|
|
359
|
-
children: [/* @__PURE__ */
|
|
359
|
+
children: [/* @__PURE__ */ w("div", {
|
|
360
360
|
className: "grid gap-4 sm:grid-cols-3",
|
|
361
361
|
children: [
|
|
362
|
-
/* @__PURE__ */
|
|
363
|
-
icon:
|
|
362
|
+
/* @__PURE__ */ C(j, {
|
|
363
|
+
icon: p,
|
|
364
364
|
title: "App",
|
|
365
365
|
description: "Build integrations that connect your service to the platform using OAuth tokens.",
|
|
366
366
|
bullets: [
|
|
@@ -369,11 +369,11 @@ var O = [
|
|
|
369
369
|
"Webhook events",
|
|
370
370
|
"Publish to app store"
|
|
371
371
|
],
|
|
372
|
-
selected:
|
|
373
|
-
onClick: () =>
|
|
372
|
+
selected: P === "app",
|
|
373
|
+
onClick: () => F("app")
|
|
374
374
|
}),
|
|
375
|
-
/* @__PURE__ */
|
|
376
|
-
icon:
|
|
375
|
+
/* @__PURE__ */ C(j, {
|
|
376
|
+
icon: y,
|
|
377
377
|
title: "Node",
|
|
378
378
|
description: "Build custom FluidGrids nodes that users can drag into their visual workflows.",
|
|
379
379
|
bullets: [
|
|
@@ -382,11 +382,11 @@ var O = [
|
|
|
382
382
|
"Versioned releases",
|
|
383
383
|
"Publish to node store"
|
|
384
384
|
],
|
|
385
|
-
selected:
|
|
386
|
-
onClick: () =>
|
|
385
|
+
selected: P === "node",
|
|
386
|
+
onClick: () => F("node")
|
|
387
387
|
}),
|
|
388
|
-
/* @__PURE__ */
|
|
389
|
-
icon:
|
|
388
|
+
/* @__PURE__ */ C(j, {
|
|
389
|
+
icon: g,
|
|
390
390
|
title: "Workflow",
|
|
391
391
|
description: "Build reusable automation workflows that users can import and customize.",
|
|
392
392
|
bullets: [
|
|
@@ -395,137 +395,138 @@ var O = [
|
|
|
395
395
|
"Versioned releases",
|
|
396
396
|
"Publish to workflow store"
|
|
397
397
|
],
|
|
398
|
-
selected:
|
|
399
|
-
onClick: () =>
|
|
398
|
+
selected: P === "workflow",
|
|
399
|
+
onClick: () => F("workflow")
|
|
400
400
|
})
|
|
401
401
|
]
|
|
402
|
-
}), /* @__PURE__ */
|
|
402
|
+
}), /* @__PURE__ */ w("div", {
|
|
403
403
|
className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-4 flex gap-3 text-sm text-text-secondary",
|
|
404
|
-
children: [/* @__PURE__ */
|
|
404
|
+
children: [/* @__PURE__ */ C(_, {
|
|
405
405
|
size: 16,
|
|
406
406
|
className: "flex-shrink-0 mt-0.5"
|
|
407
|
-
}), /* @__PURE__ */
|
|
407
|
+
}), /* @__PURE__ */ C("p", { children: "Apps use OAuth to interact with platform data. Nodes and Workflows are packaged files you upload after creation." })]
|
|
408
408
|
})]
|
|
409
409
|
})
|
|
410
410
|
})
|
|
411
411
|
});
|
|
412
|
-
let $ =
|
|
413
|
-
return /* @__PURE__ */
|
|
412
|
+
let $ = P === "app" ? "App" : P === "node" ? "Node" : "Workflow", de = C(P === "app" ? p : P === "node" ? y : g, { size: 16 });
|
|
413
|
+
return /* @__PURE__ */ C(l, {
|
|
414
414
|
authOnly: !0,
|
|
415
|
-
children: /* @__PURE__ */
|
|
415
|
+
children: /* @__PURE__ */ C(a, {
|
|
416
416
|
title: `Create ${$}`,
|
|
417
|
-
description:
|
|
418
|
-
purpose:
|
|
419
|
-
backLink: `${
|
|
417
|
+
description: P === "app" ? "Register a new app integration with OAuth permissions" : P === "node" ? "Register a new FluidGrids node package" : "Register a new reusable automation workflow",
|
|
418
|
+
purpose: P === "workflow" ? "Give your workflow a name and description. Once created you can upload your workflow definition in the Versions tab, then publish it to the store or generate a shareable public link." : P === "node" ? "Give your node a name and description. Once created you can upload your ZIP bundle and manifest in the Versions tab, then publish it to the node store when it is ready for users." : "Give your integration a name, description, and the permissions it will request. Once created you will get credentials and can configure webhooks, then publish it to the marketplace when it is ready for users.",
|
|
419
|
+
backLink: `${T}/apps`,
|
|
420
420
|
backLabel: "Back to Applications",
|
|
421
|
-
children: /* @__PURE__ */
|
|
422
|
-
onSubmit:
|
|
421
|
+
children: /* @__PURE__ */ w("form", {
|
|
422
|
+
onSubmit: ue,
|
|
423
423
|
className: "space-y-8 max-w-3xl",
|
|
424
424
|
children: [
|
|
425
|
-
/* @__PURE__ */
|
|
425
|
+
/* @__PURE__ */ w("div", {
|
|
426
426
|
className: "flex items-center gap-3",
|
|
427
|
-
children: [/* @__PURE__ */
|
|
427
|
+
children: [/* @__PURE__ */ w("button", {
|
|
428
428
|
type: "button",
|
|
429
|
-
onClick: () =>
|
|
429
|
+
onClick: () => F(null),
|
|
430
430
|
className: "flex items-center gap-1.5 text-sm text-text-secondary hover:text-text-primary transition-colors",
|
|
431
|
-
children: [/* @__PURE__ */
|
|
432
|
-
}), /* @__PURE__ */
|
|
431
|
+
children: [/* @__PURE__ */ C(f, { size: 14 }), "Change type"]
|
|
432
|
+
}), /* @__PURE__ */ w("span", {
|
|
433
433
|
className: "flex items-center gap-1.5 rounded-full border border-border-subtle bg-bg-sunken px-3 py-1 text-xs font-medium",
|
|
434
|
-
children: [
|
|
434
|
+
children: [de, $]
|
|
435
435
|
})]
|
|
436
436
|
}),
|
|
437
|
-
/* @__PURE__ */
|
|
437
|
+
/* @__PURE__ */ C(o, {
|
|
438
438
|
title: "Basic Information",
|
|
439
439
|
description: "Core details about your application",
|
|
440
|
-
children: /* @__PURE__ */
|
|
440
|
+
children: /* @__PURE__ */ w("div", {
|
|
441
441
|
className: "space-y-4",
|
|
442
442
|
children: [
|
|
443
|
-
/* @__PURE__ */
|
|
443
|
+
/* @__PURE__ */ C(s, {
|
|
444
444
|
label: "Name",
|
|
445
|
-
value:
|
|
446
|
-
onChange:
|
|
447
|
-
placeholder:
|
|
445
|
+
value: V.name,
|
|
446
|
+
onChange: se,
|
|
447
|
+
placeholder: P === "app" ? "My Integration" : P === "node" ? "HTTP Request" : "Onboarding Flow",
|
|
448
448
|
required: !0,
|
|
449
|
-
error:
|
|
449
|
+
error: U.name
|
|
450
450
|
}),
|
|
451
|
-
/* @__PURE__ */
|
|
451
|
+
/* @__PURE__ */ C(s, {
|
|
452
452
|
label: "Slug",
|
|
453
|
-
value:
|
|
454
|
-
onChange:
|
|
453
|
+
value: V.slug,
|
|
454
|
+
onChange: ce,
|
|
455
455
|
placeholder: "my-integration",
|
|
456
456
|
required: !0,
|
|
457
|
-
error:
|
|
458
|
-
hint:
|
|
457
|
+
error: U.slug,
|
|
458
|
+
hint: B.current ? "Only lowercase letters, numbers, and hyphens" : "Auto-generated from name — edit to customise"
|
|
459
459
|
}),
|
|
460
|
-
/* @__PURE__ */
|
|
460
|
+
/* @__PURE__ */ C(u, {
|
|
461
461
|
label: "Short Description",
|
|
462
|
-
value:
|
|
463
|
-
onChange: (e) => X("shortDescription", e
|
|
462
|
+
value: V.shortDescription,
|
|
463
|
+
onChange: (e) => X("shortDescription", e),
|
|
464
464
|
placeholder: "Briefly describe what this does",
|
|
465
465
|
required: !0,
|
|
466
|
-
error:
|
|
467
|
-
hint: `${
|
|
468
|
-
rows: 2
|
|
466
|
+
error: U.shortDescription,
|
|
467
|
+
hint: `${V.shortDescription.length}/200 characters`,
|
|
468
|
+
rows: 2,
|
|
469
|
+
maxLength: 200
|
|
469
470
|
}),
|
|
470
|
-
/* @__PURE__ */
|
|
471
|
+
/* @__PURE__ */ w("div", {
|
|
471
472
|
className: "grid gap-4 sm:grid-cols-2",
|
|
472
|
-
children: [/* @__PURE__ */
|
|
473
|
+
children: [/* @__PURE__ */ C(c, {
|
|
473
474
|
label: "Category",
|
|
474
|
-
value:
|
|
475
|
+
value: V.category,
|
|
475
476
|
onChange: (e) => X("category", e.target.value),
|
|
476
477
|
options: A,
|
|
477
478
|
placeholder: "Select a category…",
|
|
478
479
|
required: !0,
|
|
479
|
-
error:
|
|
480
|
+
error: U.category,
|
|
480
481
|
hint: "Helps users discover your item in the store"
|
|
481
|
-
}), /* @__PURE__ */
|
|
482
|
+
}), /* @__PURE__ */ C(c, {
|
|
482
483
|
label: "Visibility",
|
|
483
|
-
value:
|
|
484
|
+
value: V.visibility,
|
|
484
485
|
onChange: (e) => X("visibility", e.target.value),
|
|
485
|
-
options:
|
|
486
|
+
options: P === "workflow" ? k : O,
|
|
486
487
|
required: !0,
|
|
487
|
-
hint:
|
|
488
|
+
hint: V.visibility === "PUBLIC" ? "Listed in the marketplace after review approval — anyone can discover and install it" : V.visibility === "UNLISTED" ? "Not in the store, but share with anyone via a direct link. You can still submit for marketplace review later" : V.visibility === "INTERNAL" ? "Visible to all members of your developer organization — no one outside can access it" : "Only you (the creator) can see this — other org members cannot access it"
|
|
488
489
|
})]
|
|
489
490
|
}),
|
|
490
|
-
|
|
491
|
+
P !== "app" && /* @__PURE__ */ w("div", {
|
|
491
492
|
className: "space-y-2",
|
|
492
493
|
children: [
|
|
493
|
-
/* @__PURE__ */
|
|
494
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ w("label", {
|
|
494
495
|
className: "block text-sm font-medium text-text-primary",
|
|
495
|
-
children: ["Compatible Products", /* @__PURE__ */
|
|
496
|
+
children: ["Compatible Products", /* @__PURE__ */ C("span", {
|
|
496
497
|
className: "text-status-error-text ml-1",
|
|
497
498
|
children: "*"
|
|
498
499
|
})]
|
|
499
|
-
}), /* @__PURE__ */
|
|
500
|
+
}), /* @__PURE__ */ w("p", {
|
|
500
501
|
className: "text-xs text-text-secondary mt-0.5",
|
|
501
502
|
children: [
|
|
502
503
|
"Select which products this ",
|
|
503
|
-
|
|
504
|
+
P,
|
|
504
505
|
" works with. Users will see it in those products' node stores."
|
|
505
506
|
]
|
|
506
507
|
})] }),
|
|
507
|
-
/* @__PURE__ */
|
|
508
|
+
/* @__PURE__ */ C("div", {
|
|
508
509
|
className: "flex flex-wrap gap-3",
|
|
509
|
-
children:
|
|
510
|
-
let n =
|
|
511
|
-
return /* @__PURE__ */
|
|
512
|
-
className: t("flex items-center gap-2 cursor-pointer rounded-md border px-3 py-2 text-sm transition-colors", n ? "border-primary bg-primary/10 text-text-primary" : "border-border-subtle hover:border-border text-text-secondary hover:text-text-primary",
|
|
510
|
+
children: ne.map((e) => {
|
|
511
|
+
let n = I.includes(e.value);
|
|
512
|
+
return /* @__PURE__ */ w("label", {
|
|
513
|
+
className: t("flex items-center gap-2 cursor-pointer rounded-md border px-3 py-2 text-sm transition-colors", n ? "border-primary bg-primary/10 text-text-primary" : "border-border-subtle hover:border-border text-text-secondary hover:text-text-primary", U.compatibleProducts && !n && "border-status-error-bg/50"),
|
|
513
514
|
children: [
|
|
514
|
-
/* @__PURE__ */
|
|
515
|
+
/* @__PURE__ */ C("input", {
|
|
515
516
|
type: "checkbox",
|
|
516
517
|
className: "sr-only",
|
|
517
518
|
checked: n,
|
|
518
519
|
onChange: () => {
|
|
519
|
-
|
|
520
|
+
L((t) => {
|
|
520
521
|
let r = n ? t.filter((t) => t !== e.value) : [...t, e.value];
|
|
521
|
-
return r.length > 0 &&
|
|
522
|
+
return r.length > 0 && W((e) => ({
|
|
522
523
|
...e,
|
|
523
524
|
compatibleProducts: void 0
|
|
524
525
|
})), r;
|
|
525
526
|
});
|
|
526
527
|
}
|
|
527
528
|
}),
|
|
528
|
-
n && /* @__PURE__ */
|
|
529
|
+
n && /* @__PURE__ */ C(m, {
|
|
529
530
|
size: 14,
|
|
530
531
|
className: "text-primary flex-shrink-0"
|
|
531
532
|
}),
|
|
@@ -534,15 +535,15 @@ var O = [
|
|
|
534
535
|
}, e.value);
|
|
535
536
|
})
|
|
536
537
|
}),
|
|
537
|
-
|
|
538
|
+
U.compatibleProducts && /* @__PURE__ */ C("p", {
|
|
538
539
|
className: "text-xs text-status-error-text",
|
|
539
|
-
children:
|
|
540
|
+
children: U.compatibleProducts
|
|
540
541
|
})
|
|
541
542
|
]
|
|
542
543
|
}),
|
|
543
|
-
/* @__PURE__ */
|
|
544
|
+
/* @__PURE__ */ C(u, {
|
|
544
545
|
label: "Full Description",
|
|
545
|
-
value:
|
|
546
|
+
value: V.description,
|
|
546
547
|
onChange: (e) => X("description", e),
|
|
547
548
|
placeholder: "Detailed description, features, and use cases...",
|
|
548
549
|
rows: 5,
|
|
@@ -551,89 +552,89 @@ var O = [
|
|
|
551
552
|
]
|
|
552
553
|
})
|
|
553
554
|
}),
|
|
554
|
-
J.length > 2 && /* @__PURE__ */
|
|
555
|
+
J.length > 2 && /* @__PURE__ */ C(o, {
|
|
555
556
|
title: "Organization",
|
|
556
557
|
description: "Which developer organization owns this?",
|
|
557
|
-
children: /* @__PURE__ */
|
|
558
|
+
children: /* @__PURE__ */ C(c, {
|
|
558
559
|
label: "Developer Organization",
|
|
559
|
-
value:
|
|
560
|
+
value: V.developerOrganizationId,
|
|
560
561
|
onChange: (e) => X("developerOrganizationId", e.target.value),
|
|
561
562
|
options: J
|
|
562
563
|
})
|
|
563
564
|
}),
|
|
564
|
-
|
|
565
|
+
P === "app" && /* @__PURE__ */ w(o, {
|
|
565
566
|
title: "Permissions",
|
|
566
567
|
description: "Choose what data your app can access. Users will see these permissions when authorizing your app — like GitHub Apps.",
|
|
567
|
-
children: [/* @__PURE__ */
|
|
568
|
-
permissions:
|
|
568
|
+
children: [/* @__PURE__ */ C(M, {
|
|
569
|
+
permissions: R,
|
|
569
570
|
onChange: Z
|
|
570
|
-
}), /* @__PURE__ */
|
|
571
|
+
}), /* @__PURE__ */ w("div", {
|
|
571
572
|
className: "mt-3 flex gap-2 rounded-lg border border-border-subtle bg-bg-sunken/30 p-3 text-xs text-text-secondary",
|
|
572
|
-
children: [/* @__PURE__ */
|
|
573
|
+
children: [/* @__PURE__ */ C(_, {
|
|
573
574
|
size: 14,
|
|
574
575
|
className: "flex-shrink-0 mt-0.5"
|
|
575
|
-
}), /* @__PURE__ */
|
|
576
|
+
}), /* @__PURE__ */ w("span", { children: [/* @__PURE__ */ C("strong", { children: "Read & Write" }), " implies Read. Select only what your app genuinely needs — fewer permissions build more user trust."] })]
|
|
576
577
|
})]
|
|
577
578
|
}),
|
|
578
|
-
|
|
579
|
+
P === "app" && /* @__PURE__ */ C(o, {
|
|
579
580
|
title: "Integration Setup",
|
|
580
581
|
description: "Configure the endpoints for your integration. After a user installs, we redirect them to your callback URL so your server can complete the connection.",
|
|
581
|
-
children: /* @__PURE__ */
|
|
582
|
+
children: /* @__PURE__ */ w("div", {
|
|
582
583
|
className: "space-y-4",
|
|
583
|
-
children: [/* @__PURE__ */
|
|
584
|
+
children: [/* @__PURE__ */ C(s, {
|
|
584
585
|
label: "Post-install Callback URL",
|
|
585
586
|
type: "url",
|
|
586
|
-
value:
|
|
587
|
+
value: V.oauthAuthUrl,
|
|
587
588
|
onChange: (e) => X("oauthAuthUrl", e.target.value),
|
|
588
589
|
placeholder: "https://yourapp.com/callback",
|
|
589
590
|
hint: "Users land here after install with ?installation_id=xxx appended"
|
|
590
|
-
}), /* @__PURE__ */
|
|
591
|
+
}), /* @__PURE__ */ C(s, {
|
|
591
592
|
label: "Revoke URL",
|
|
592
593
|
type: "url",
|
|
593
|
-
value:
|
|
594
|
+
value: V.oauthRevokeUrl,
|
|
594
595
|
onChange: (e) => X("oauthRevokeUrl", e.target.value),
|
|
595
596
|
placeholder: "https://yourapp.com/oauth/revoke",
|
|
596
597
|
hint: "We POST to this URL when a user uninstalls your integration"
|
|
597
598
|
})]
|
|
598
599
|
})
|
|
599
600
|
}),
|
|
600
|
-
|
|
601
|
+
P !== "app" && /* @__PURE__ */ w("div", {
|
|
601
602
|
className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-4 flex gap-3 text-sm text-text-secondary",
|
|
602
|
-
children: [/* @__PURE__ */
|
|
603
|
+
children: [/* @__PURE__ */ C(_, {
|
|
603
604
|
size: 16,
|
|
604
605
|
className: "flex-shrink-0 mt-0.5"
|
|
605
|
-
}), /* @__PURE__ */
|
|
606
|
+
}), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
|
|
606
607
|
className: "font-medium text-text-primary",
|
|
607
608
|
children: "File uploads"
|
|
608
|
-
}), /* @__PURE__ */
|
|
609
|
+
}), /* @__PURE__ */ C("p", {
|
|
609
610
|
className: "mt-1",
|
|
610
|
-
children:
|
|
611
|
+
children: P === "node" ? "After creating your Node, go to the Versions tab to upload your ZIP bundle and manifest.json." : "After creating your Workflow, go to the Versions tab to upload your manifest and workflow JSON definition."
|
|
611
612
|
})] })]
|
|
612
613
|
}),
|
|
613
|
-
|
|
614
|
+
U._submit && /* @__PURE__ */ w("div", {
|
|
614
615
|
className: "flex items-start gap-3 rounded-lg border border-status-error-bg bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
|
|
615
|
-
children: [/* @__PURE__ */
|
|
616
|
+
children: [/* @__PURE__ */ C(_, {
|
|
616
617
|
size: 16,
|
|
617
618
|
className: "flex-shrink-0 mt-0.5"
|
|
618
|
-
}), /* @__PURE__ */
|
|
619
|
+
}), /* @__PURE__ */ C("span", { children: U._submit })]
|
|
619
620
|
}),
|
|
620
|
-
/* @__PURE__ */
|
|
621
|
+
/* @__PURE__ */ w("div", {
|
|
621
622
|
className: "flex items-center justify-end gap-3 border-t pt-6",
|
|
622
|
-
children: [/* @__PURE__ */
|
|
623
|
+
children: [/* @__PURE__ */ w("button", {
|
|
623
624
|
type: "button",
|
|
624
625
|
onClick: () => Y("/apps"),
|
|
625
|
-
disabled:
|
|
626
|
+
disabled: K,
|
|
626
627
|
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",
|
|
627
|
-
children: [/* @__PURE__ */
|
|
628
|
-
}), /* @__PURE__ */
|
|
628
|
+
children: [/* @__PURE__ */ C(x, { size: 16 }), ie("devportal.cancel", "Cancel")]
|
|
629
|
+
}), /* @__PURE__ */ C("button", {
|
|
629
630
|
type: "submit",
|
|
630
|
-
disabled:
|
|
631
|
+
disabled: K,
|
|
631
632
|
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",
|
|
632
|
-
children:
|
|
633
|
+
children: K ? /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(v, {
|
|
633
634
|
size: 16,
|
|
634
635
|
className: "animate-spin"
|
|
635
|
-
}), "Creating…"] }) : /* @__PURE__ */
|
|
636
|
-
/* @__PURE__ */
|
|
636
|
+
}), "Creating…"] }) : /* @__PURE__ */ w(S, { children: [
|
|
637
|
+
/* @__PURE__ */ C(b, { size: 16 }),
|
|
637
638
|
"Create ",
|
|
638
639
|
$
|
|
639
640
|
] })
|
|
@@ -645,6 +646,6 @@ var O = [
|
|
|
645
646
|
});
|
|
646
647
|
};
|
|
647
648
|
//#endregion
|
|
648
|
-
export {
|
|
649
|
+
export { N as CreateApplicationPage };
|
|
649
650
|
|
|
650
651
|
//# sourceMappingURL=CreateApplicationPage.js.map
|