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