@burdenoff/microfe-devportal 2026.1113.1 → 2026.1113.2
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/DevportalRoot.js +65 -119
- package/dist/devportal/DevportalRoot.js.map +1 -1
- package/dist/devportal/components/AppCard.js +4 -4
- package/dist/devportal/components/DeveloperSettingsHub.d.ts +6 -0
- package/dist/devportal/components/DeveloperSettingsHub.js +59 -0
- package/dist/devportal/components/DeveloperSettingsHub.js.map +1 -0
- package/dist/devportal/components/SectionNav.d.ts +1 -1
- package/dist/devportal/components/SectionNav.js +60 -36
- package/dist/devportal/components/SectionNav.js.map +1 -1
- package/dist/devportal/pages/AnalyticsDashboardPage.js +186 -179
- package/dist/devportal/pages/AnalyticsDashboardPage.js.map +1 -1
- package/dist/devportal/pages/ApiKeysPage.js +113 -111
- package/dist/devportal/pages/ApiKeysPage.js.map +1 -1
- package/dist/devportal/pages/AppLogsPage.js +80 -84
- package/dist/devportal/pages/AppLogsPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationDetailPage.js +529 -504
- package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationsPage.js +68 -67
- package/dist/devportal/pages/ApplicationsPage.js.map +1 -1
- package/dist/devportal/pages/CreateApiKeyPage.js +163 -166
- package/dist/devportal/pages/CreateApiKeyPage.js.map +1 -1
- package/dist/devportal/pages/CreateOAuthClientPage.js +134 -130
- package/dist/devportal/pages/CreateOAuthClientPage.js.map +1 -1
- package/dist/devportal/pages/DelegationsPage.js +11 -11
- package/dist/devportal/pages/DocumentationPage.js +100 -94
- package/dist/devportal/pages/DocumentationPage.js.map +1 -1
- package/dist/devportal/pages/EditApplicationPage.js +379 -377
- package/dist/devportal/pages/EditApplicationPage.js.map +1 -1
- package/dist/devportal/pages/InvitationDecisionPage.js +83 -79
- package/dist/devportal/pages/InvitationDecisionPage.js.map +1 -1
- package/dist/devportal/pages/OAuthClientDetailPage.js +76 -76
- package/dist/devportal/pages/OAuthClientDetailPage.js.map +1 -1
- package/dist/devportal/pages/OAuthClientsPage.js +126 -124
- package/dist/devportal/pages/OAuthClientsPage.js.map +1 -1
- package/dist/devportal/pages/OrganizationDetailPage.js +19 -19
- package/dist/devportal/pages/OrganizationMembersPage.js +223 -204
- package/dist/devportal/pages/OrganizationMembersPage.js.map +1 -1
- package/dist/devportal/pages/ResourcesPage.d.ts +6 -0
- package/dist/devportal/pages/ResourcesPage.js +171 -155
- package/dist/devportal/pages/ResourcesPage.js.map +1 -1
- package/dist/devportal/pages/SellerDashboardPage.js +13 -13
- package/dist/devportal/pages/SellerItemsPage.js +4 -4
- package/dist/devportal/pages/SettingsPage.js +330 -315
- package/dist/devportal/pages/SettingsPage.js.map +1 -1
- package/dist/devportal/pages/SetupPage.js +5 -5
- package/dist/devportal/pages/WebhookDetailPage.js +6 -6
- package/dist/devportal/pages/WebhooksPage.js +39 -39
- package/dist/devportal/pages/WebhooksPage.js.map +1 -1
- package/dist/devportal/utils/appDetailTabs.d.ts +73 -0
- package/dist/devportal/utils/appDetailTabs.js +62 -0
- package/dist/devportal/utils/appDetailTabs.js.map +1 -0
- package/dist/devportal/utils/developerNav.d.ts +39 -0
- package/dist/devportal/utils/developerNav.js +304 -0
- package/dist/devportal/utils/developerNav.js.map +1 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditApplicationPage.js","names":["_Fragment","APP_TYPE_OPTIONS","APP_TYPE_LABELS","value","label","BASE_VISIBILITY_OPTIONS","WORKFLOW_VISIBILITY_OPTIONS","mapToApplication","data","EditApplicationPage","useDevportal","useParams","useI18n","platformProducts","useProducts","canUpdate","useDevportalPermission","DEVPORTAL_PERMISSIONS","canDelete","tr","t","key","fallback","isSubmitting","setIsSubmitting","useState","errors","setErrors","showDeleteDialog","setShowDeleteDialog","showDeprecateDialog","setShowDeprecateDialog","showDeactivateDialog","setShowDeactivateDialog","hasChanges","setHasChanges","showSecret","setShowSecret","isRotating","setIsRotating","rotatedSecret","setRotatedSecret","copiedSecret","setCopiedSecret","queryError","useGetApplicationQuery","appId","updateApplication","useUpdateApplicationMutation","deleteApplication","useDeleteApplicationMutation","deactivateApp","useDeactivateAppMutation","rotateSigningSecret","useRotateApplicationSigningSecretMutation","showRotateDialog","setShowRotateDialog","app","name","reg","formData","setFormData","compatibleProducts","setCompatibleProducts","compatibility","products","handleNavigate","basePath","path","handleChange","prev","field","handleRotateSecret","newSecret","handleCopySecret","secret","validateForm","newErrors","handleSubmit","err","handleDelete","nativeNotify","handleDeprecate","handleDeactivate","loading","LoadingState","PageLayout","AlertCircle","EmptyState","AppWindow","canSubmitForReview","canDeprecate","canDeactivate","PermissionGuard","StatusBadge","AlertTriangle","PageSection","InputField","TextareaField","MarkdownEditor","SelectField","appCategoryOptionsFor","TagInput","tags","keywords","MultiSelectCombobox","p","next","displaySecret","masked","v","jsx","EyeOff","Eye","Check","Copy","RefreshCw","CheckboxField","Send","item","Fragment","Save","Archive","Power","Trash2","ConfirmDialog"],"sources":["../../../src/devportal/pages/EditApplicationPage.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { useState, useEffect } from \"react\";\nimport { useI18n } from \"@burdenoff/fe-libs/shared/providers/shell/I18nProvider\";\nimport { useParams } from \"react-router\";\nimport {\n Save,\n Trash2,\n AlertTriangle,\n Archive,\n Send,\n AlertCircle,\n AppWindow,\n Power,\n Check,\n Copy,\n Eye,\n EyeOff,\n RefreshCw,\n} from \"lucide-react\";\nimport { appCategoryOptionsFor } from \"../constants/appCategories\";\nimport { PageLayout, PageSection } from \"../components/PageLayout\";\nimport {\n InputField,\n TextareaField,\n SelectField,\n TagInput,\n CheckboxField,\n} from \"../components/FormField\";\nimport { MarkdownEditor } from \"../components/MarkdownEditor\";\nimport { MultiSelectCombobox } from \"../components/MultiSelectCombobox\";\nimport { StatusBadge } from \"../components/StatusBadge\";\nimport { ConfirmDialog } from \"../components/ConfirmDialog\";\nimport { LoadingState } from \"../components/LoadingState\";\nimport { EmptyState } from \"../components/EmptyState\";\nimport { useDevportal } from \"../providers/DevportalProvider\";\nimport { nativeImpact, nativeNotify } from \"../../utils/nativeBridge\";\nimport { PermissionGuard } from \"../components\";\nimport { DEVPORTAL_PERMISSIONS } from \"../constants/permissions\";\nimport { useDevportalPermission } from \"../hooks/usePermission\";\nimport { useProducts } from \"../hooks\";\nimport type { Application, AppType, AppVisibility, AppStatus } from \"../types\";\nimport { APP_TYPE_LABELS } from \"../utils/constants\";\nimport {\n useGetApplicationQuery,\n useUpdateApplicationMutation,\n useDeleteApplicationMutation,\n useDeactivateAppMutation,\n useRotateApplicationSigningSecretMutation,\n} from \"../../generated/global-operations\";\n\ninterface EditApplicationFormData {\n name: string;\n slug: string;\n shortDescription: string;\n description: string;\n appType: AppType;\n visibility: AppVisibility;\n category: string;\n tags: string[];\n keywords: string[];\n websiteUrl: string;\n documentationUrl: string;\n supportUrl: string;\n privacyPolicyUrl: string;\n termsOfServiceUrl: string;\n githubUrl: string;\n oauthAuthUrl: string;\n oauthRevokeUrl: string;\n requiresApproval: boolean;\n}\n\ninterface FormErrors {\n name?: string;\n slug?: string;\n shortDescription?: string;\n appType?: string;\n category?: string;\n}\n\nconst APP_TYPE_OPTIONS = Object.entries(APP_TYPE_LABELS).map(\n ([value, label]) => ({\n value,\n label,\n }),\n);\n\nconst BASE_VISIBILITY_OPTIONS = [\n { value: \"PUBLIC\", label: \"Public — listed in the marketplace after review\" },\n { value: \"PRIVATE\", label: \"Private — only you (the creator) can see it\" },\n { value: \"INTERNAL\", label: \"Internal — visible to your entire dev org\" },\n];\n\nconst WORKFLOW_VISIBILITY_OPTIONS = [\n ...BASE_VISIBILITY_OPTIONS,\n {\n value: \"UNLISTED\",\n label: \"Unlisted — shareable via link, not listed in store\",\n },\n];\n\n/**\n * Helper to safely map GraphQL response to Application type\n */\nfunction mapToApplication(\n data: NonNullable<\n ReturnType<typeof useGetApplicationQuery>[\"data\"]\n >[\"application\"],\n): Application | null {\n if (!data) return null;\n return {\n id: data.id,\n name: data.name,\n slug: data.slug,\n shortDescription: data.shortDescription || undefined,\n description: data.description || undefined,\n appType: data.appType,\n status: data.status,\n visibility: data.visibility,\n tenantId: data.tenantId,\n developerId: data.developerId,\n developerOrganizationId: data.developerOrganizationId || undefined,\n category: data.category || undefined,\n tags: data.tags || [],\n keywords: data.keywords || [],\n iconUrl: data.iconUrl || undefined,\n websiteUrl: data.websiteUrl || undefined,\n documentationUrl: data.documentationUrl || undefined,\n supportUrl: data.supportUrl || undefined,\n privacyPolicyUrl: data.privacyPolicyUrl || undefined,\n termsOfServiceUrl: data.termsOfServiceUrl || undefined,\n githubUrl: data.githubUrl || undefined,\n pricingType: data.pricingType || undefined,\n installCount: data.installCount,\n activeInstallCount: data.activeInstallCount,\n averageRating: data.averageRating ?? undefined,\n reviewCount: data.reviewCount,\n submittedAt: data.submittedAt || undefined,\n publishedAt: data.publishedAt || undefined,\n lastReviewedAt: data.lastReviewedAt || undefined,\n reviewStatus: data.reviewStatus,\n reviewNotes: data.reviewNotes || undefined,\n reviewedBy: data.reviewedBy || undefined,\n isFeatured: data.isFeatured,\n isVerified: data.isVerified,\n requiresApproval: data.requiresApproval,\n oauthAuthUrl: data.oauthAuthUrl || undefined,\n oauthRevokeUrl: data.oauthRevokeUrl || undefined,\n createdAt: data.createdAt,\n updatedAt: data.updatedAt,\n };\n}\n\n/**\n * Edit application page — wired to real GraphQL mutations.\n */\nexport const EditApplicationPage: FC = () => {\n const { navigate, basePath } = useDevportal();\n const { appId } = useParams<{ appId: string }>();\n const { t } = useI18n();\n const { products: platformProducts } = useProducts();\n const { allowed: canUpdate } = useDevportalPermission(\n DEVPORTAL_PERMISSIONS.APP_UPDATE,\n );\n const { allowed: canDelete } = useDevportalPermission(\n DEVPORTAL_PERMISSIONS.APP_DELETE,\n );\n const tr = (key: string, fallback: string): string => {\n const value = t(key);\n return value === key ? fallback : value;\n };\n const [isSubmitting, setIsSubmitting] = useState(false);\n const [errors, setErrors] = useState<FormErrors>({});\n const [showDeleteDialog, setShowDeleteDialog] = useState(false);\n const [showDeprecateDialog, setShowDeprecateDialog] = useState(false);\n const [showDeactivateDialog, setShowDeactivateDialog] = useState(false);\n const [hasChanges, setHasChanges] = useState(false);\n const [showSecret, setShowSecret] = useState(false);\n const [isRotating, setIsRotating] = useState(false);\n const [rotatedSecret, setRotatedSecret] = useState<string | null>(null);\n const [copiedSecret, setCopiedSecret] = useState(false);\n\n // ---------------------------------------------------------------------------\n // GraphQL queries & mutations\n // ---------------------------------------------------------------------------\n const {\n data,\n loading,\n error: queryError,\n refetch,\n } = useGetApplicationQuery({\n variables: { id: appId! },\n skip: !appId,\n });\n\n const [updateApplication] = useUpdateApplicationMutation();\n const [deleteApplication] = useDeleteApplicationMutation();\n const [deactivateApp] = useDeactivateAppMutation();\n const [rotateSigningSecret] = useRotateApplicationSigningSecretMutation();\n // Rotating breaks every integration using the current secret, so it confirms first.\n const [showRotateDialog, setShowRotateDialog] = useState(false);\n\n // ---------------------------------------------------------------------------\n // Derive application from query data\n // ---------------------------------------------------------------------------\n const app = mapToApplication(data?.application);\n\n useEffect(() => {\n const name = app?.name;\n if (!appId || !name) return;\n const reg = (\n window as unknown as {\n __breadcrumbRegistry?: {\n register: (id: string, name: string) => void;\n unregister: (id: string) => void;\n };\n }\n ).__breadcrumbRegistry;\n reg?.register(appId, name);\n return () => reg?.unregister(appId);\n }, [appId, app?.name]);\n\n // ---------------------------------------------------------------------------\n // Form state — initialised from fetched app once available\n // ---------------------------------------------------------------------------\n const [formData, setFormData] = useState<EditApplicationFormData>({\n name: \"\",\n slug: \"\",\n shortDescription: \"\",\n description: \"\",\n appType: \"WEB_APP\",\n visibility: \"PUBLIC\",\n category: \"\",\n tags: [],\n keywords: [],\n websiteUrl: \"\",\n documentationUrl: \"\",\n supportUrl: \"\",\n privacyPolicyUrl: \"\",\n termsOfServiceUrl: \"\",\n githubUrl: \"\",\n oauthAuthUrl: \"\",\n oauthRevokeUrl: \"\",\n requiresApproval: false,\n });\n const [compatibleProducts, setCompatibleProducts] = useState<string[]>([]);\n\n useEffect(() => {\n if (app) {\n setFormData({\n name: app.name,\n slug: app.slug,\n shortDescription: app.shortDescription || \"\",\n description: app.description || \"\",\n appType: app.appType,\n visibility: app.visibility,\n category: app.category || \"\",\n tags: app.tags,\n keywords: app.keywords,\n websiteUrl: app.websiteUrl || \"\",\n documentationUrl: app.documentationUrl || \"\",\n supportUrl: app.supportUrl || \"\",\n privacyPolicyUrl: app.privacyPolicyUrl || \"\",\n termsOfServiceUrl: app.termsOfServiceUrl || \"\",\n githubUrl: app.githubUrl || \"\",\n oauthAuthUrl: app.oauthAuthUrl || \"\",\n oauthRevokeUrl: app.oauthRevokeUrl || \"\",\n requiresApproval: app.requiresApproval,\n });\n // Load compatibleProducts from manifest.compatibility.products\n // Note: mapToApplication doesn't copy manifest, so read from raw query data directly.\n const manifest = data?.application?.manifest as\n Record<string, unknown> | null | undefined;\n const compatibility = manifest?.compatibility as\n Record<string, unknown> | undefined;\n const products = Array.isArray(compatibility?.products)\n ? (compatibility.products as string[])\n : [];\n setCompatibleProducts(products);\n setHasChanges(false);\n }\n // Re-sync form when the underlying application data changes (e.g. after\n // a refetch triggered by a mutation). We intentionally depend on\n // `data?.application` rather than the derived `app` object so that the\n // effect fires when the query cache updates.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [data?.application]);\n\n // ---------------------------------------------------------------------------\n // Handlers\n // ---------------------------------------------------------------------------\n const handleNavigate = (path: string) => {\n navigate?.(`${basePath}${path}`);\n };\n\n const handleChange = (\n field: keyof EditApplicationFormData,\n value: string | string[] | boolean,\n ) => {\n setFormData((prev) => ({ ...prev, [field]: value }));\n setHasChanges(true);\n if (errors[field as keyof FormErrors]) {\n setErrors((prev) => ({ ...prev, [field]: undefined }));\n }\n };\n\n const handleRotateSecret = async () => {\n if (!appId) return;\n setIsRotating(true);\n try {\n const result = await rotateSigningSecret({ variables: { id: appId } });\n const newSecret =\n result.data?.rotateApplicationSigningSecret?.signingSecret;\n if (newSecret) {\n setRotatedSecret(newSecret);\n setShowSecret(true);\n }\n } catch {\n nativeNotify(\"error\");\n } finally {\n setIsRotating(false);\n }\n };\n\n const handleCopySecret = async (secret: string) => {\n await navigator.clipboard.writeText(secret);\n setCopiedSecret(true);\n setTimeout(() => setCopiedSecret(false), 2000);\n };\n\n const validateForm = (): boolean => {\n const newErrors: FormErrors = {};\n\n if (!formData.name.trim()) {\n newErrors.name = tr(\n \"devportal.appNameRequired\",\n \"Application name is required\",\n );\n } else if (formData.name.length < 3) {\n newErrors.name = tr(\n \"devportal.appNameMinLength\",\n \"Name must be at least 3 characters\",\n );\n } else if (formData.name.length > 100) {\n newErrors.name = tr(\n \"devportal.appNameMaxLength\",\n \"Name must be less than 100 characters\",\n );\n }\n\n if (!formData.slug.trim()) {\n newErrors.slug = tr(\"devportal.slugRequired\", \"Slug is required\");\n } else if (!/^[a-z0-9-]+$/.test(formData.slug)) {\n newErrors.slug = tr(\n \"devportal.slugInvalidChars\",\n \"Slug can only contain lowercase letters, numbers, and hyphens\",\n );\n }\n\n if (!formData.shortDescription.trim()) {\n newErrors.shortDescription = tr(\n \"devportal.shortDescriptionRequired\",\n \"Short description is required\",\n );\n } else if (formData.shortDescription.length > 200) {\n newErrors.shortDescription = tr(\n \"devportal.shortDescriptionMaxLength\",\n \"Short description must be less than 200 characters\",\n );\n }\n\n if (!formData.appType) {\n newErrors.appType = tr(\n \"devportal.appTypeRequired\",\n \"Application type is required\",\n );\n }\n\n if (!formData.category) {\n newErrors.category = tr(\n \"devportal.categoryRequired\",\n \"Category is required\",\n );\n }\n\n setErrors(newErrors);\n return Object.keys(newErrors).length === 0;\n };\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n\n if (!validateForm() || !app) {\n return;\n }\n\n setIsSubmitting(true);\n\n try {\n await updateApplication({\n variables: {\n id: app.id,\n input: {\n name: formData.name,\n shortDescription: formData.shortDescription,\n description: formData.description,\n appType: formData.appType,\n visibility: formData.visibility,\n category: formData.category,\n tags: formData.tags,\n keywords: formData.keywords,\n websiteUrl: formData.websiteUrl || null,\n documentationUrl: formData.documentationUrl || null,\n supportUrl: formData.supportUrl || null,\n privacyPolicyUrl: formData.privacyPolicyUrl || null,\n termsOfServiceUrl: formData.termsOfServiceUrl || null,\n githubUrl: formData.githubUrl || null,\n oauthAuthUrl: formData.oauthAuthUrl || null,\n oauthRevokeUrl: formData.oauthRevokeUrl || null,\n compatibleProducts,\n },\n },\n });\n setHasChanges(false);\n } catch (err) {\n console.error(\"Failed to update application:\", err);\n } finally {\n setIsSubmitting(false);\n }\n };\n\n const handleDelete = async () => {\n if (!app) return;\n void nativeImpact(\"medium\");\n try {\n await deleteApplication({\n variables: { id: app.id },\n });\n void nativeNotify(\"success\");\n handleNavigate(\"/apps\");\n } catch (err) {\n void nativeNotify(\"error\");\n console.error(\"Failed to delete application:\", err);\n }\n };\n\n const handleDeprecate = async () => {\n if (!app) return;\n try {\n // Deprecate is modelled as a status transition via update. The backend\n // treats a visibility change to PRIVATE + status mutation or a dedicated\n // deprecation endpoint. Here we use submitApplication with a status note\n // as the deprecate action since there is no separate `deprecateApplication`\n // mutation. If a dedicated mutation is added later, swap it in here.\n await updateApplication({\n variables: {\n id: app.id,\n input: {\n visibility: \"PRIVATE\",\n },\n },\n });\n setShowDeprecateDialog(false);\n } catch (err) {\n console.error(\"Failed to deprecate application:\", err);\n }\n };\n\n const handleDeactivate = async () => {\n if (!app) return;\n try {\n await deactivateApp({\n variables: { id: app.id },\n });\n setShowDeactivateDialog(false);\n handleNavigate(\"/apps\");\n } catch (err) {\n console.error(\"Failed to deactivate application:\", err);\n }\n };\n\n // ---------------------------------------------------------------------------\n // Loading / Error / Not-found states\n // ---------------------------------------------------------------------------\n if (loading) {\n return (\n <LoadingState\n message={tr(\"devportal.loadingApplication\", \"Loading application...\")}\n />\n );\n }\n\n if (queryError) {\n return (\n <PageLayout\n title={tr(\"devportal.error\", \"Error\")}\n backLink={`${basePath}/apps`}\n backLabel={tr(\"devportal.backToApplications\", \"Back to Applications\")}\n >\n <div className=\"flex flex-col items-center justify-center py-12 text-center\">\n <AlertCircle size={48} className=\"text-status-error-text mb-4\" />\n <h3 className=\"text-lg font-semibold mb-2\">\n {tr(\n \"devportal.failedToLoadApplication\",\n \"Failed to load application\",\n )}\n </h3>\n <p className=\"text-sm text-text-secondary\">{queryError.message}</p>\n </div>\n </PageLayout>\n );\n }\n\n if (!app) {\n return (\n <PageLayout\n title={tr(\"devportal.notFound\", \"Not Found\")}\n backLink={`${basePath}/apps`}\n backLabel={tr(\"devportal.backToApplications\", \"Back to Applications\")}\n >\n <EmptyState\n illustration=\"empty-generic\"\n icon={<AppWindow size={48} />}\n title={tr(\"devportal.applicationNotFound\", \"Application not found\")}\n description={tr(\n \"devportal.applicationNotFoundDescription\",\n \"The application you're looking for doesn't exist or you don't have access to it.\",\n )}\n />\n </PageLayout>\n );\n }\n\n // ---------------------------------------------------------------------------\n // Derived flags\n // ---------------------------------------------------------------------------\n const canSubmitForReview =\n app.status === \"DRAFT\" || app.status === \"REJECTED\";\n const canDeprecate = app.status === \"PUBLISHED\";\n const canDeactivate = app.status === \"ACTIVE\" || app.status === \"PUBLISHED\";\n\n // ---------------------------------------------------------------------------\n // Render\n // ---------------------------------------------------------------------------\n return (\n <PermissionGuard authOnly>\n <PageLayout\n title={`${tr(\"devportal.editAppTitlePrefix\", \"Edit:\")} ${app.name}`}\n description={tr(\n \"devportal.editAppDescription\",\n \"Update your application settings\",\n )}\n purpose={tr(\n \"devportal.editAppPurpose\",\n \"Change how this app appears and behaves — its name, description, classification, links, and lifecycle settings. Use the danger zone at the bottom to deprecate or delete it when it is retired.\",\n )}\n backLink={`${basePath}/apps/${app.id}`}\n backLabel={tr(\"devportal.backToApplication\", \"Back to Application\")}\n actions={\n <div className=\"flex items-center gap-2\">\n <StatusBadge status={app.status} type=\"app\" />\n </div>\n }\n >\n <form onSubmit={handleSubmit} className=\"space-y-8 max-w-3xl\">\n {/* Status banner for published apps */}\n {app.status === \"PUBLISHED\" && (\n <div className=\"rounded-lg border border-border-subtle bg-status-warning-bg-subtle p-4 flex gap-3\">\n <AlertTriangle\n size={20}\n className=\"text-status-warning-text flex-shrink-0 mt-0.5\"\n />\n <div className=\"text-sm text-status-warning-text\">\n <p className=\"font-medium\">\n {tr(\n \"devportal.appIsPublished\",\n \"This application is published\",\n )}\n </p>\n <p className=\"mt-1 text-status-warning-text\">\n {tr(\n \"devportal.publishedAppChangesWarning\",\n \"Changes to published apps may require re-review. Major changes will put the app back into review status.\",\n )}\n </p>\n </div>\n </div>\n )}\n\n {/* Basic Information */}\n <PageSection\n title={tr(\"devportal.basicInformation\", \"Basic Information\")}\n description={tr(\n \"devportal.basicInformationDescription\",\n \"Core details about your application\",\n )}\n >\n <div className=\"space-y-4\">\n <InputField\n label={tr(\"devportal.applicationName\", \"Application Name\")}\n value={formData.name}\n onChange={(e) => handleChange(\"name\", e.target.value)}\n placeholder={tr(\n \"devportal.applicationNamePlaceholder\",\n \"My Awesome App\",\n )}\n required\n error={errors.name}\n />\n\n <InputField\n label={tr(\"devportal.slug\", \"Slug\")}\n value={formData.slug}\n onChange={(e) =>\n handleChange(\"slug\", e.target.value.toLowerCase())\n }\n placeholder={tr(\"devportal.slugPlaceholder\", \"my-awesome-app\")}\n required\n error={errors.slug}\n hint={tr(\n \"devportal.slugChangeWarning\",\n \"Changing the slug may break existing integrations\",\n )}\n />\n\n <TextareaField\n label={tr(\"devportal.shortDescription\", \"Short Description\")}\n value={formData.shortDescription}\n onChange={(e) =>\n handleChange(\"shortDescription\", e.target.value)\n }\n placeholder={tr(\n \"devportal.shortDescriptionPlaceholder\",\n \"A brief description of what your app does\",\n )}\n required\n error={errors.shortDescription}\n hint={`${formData.shortDescription.length}/200 ${tr(\"devportal.characters\", \"characters\")}`}\n rows={2}\n />\n\n <MarkdownEditor\n label={tr(\"devportal.fullDescription\", \"Full Description\")}\n value={formData.description}\n onChange={(value) => handleChange(\"description\", value)}\n placeholder={tr(\n \"devportal.fullDescriptionPlaceholder\",\n \"Detailed description of your application, features, and use cases...\",\n )}\n rows={6}\n hint={tr(\n \"devportal.markdownSupported\",\n \"Markdown formatting is supported\",\n )}\n />\n </div>\n </PageSection>\n\n {/* Classification */}\n <PageSection\n title={tr(\"devportal.classification\", \"Classification\")}\n description={tr(\n \"devportal.classificationDescription\",\n \"Categorize your application\",\n )}\n >\n <div className=\"grid gap-4 sm:grid-cols-2\">\n <SelectField\n label={tr(\"devportal.applicationType\", \"Application Type\")}\n value={formData.appType}\n onChange={(e) => handleChange(\"appType\", e.target.value)}\n options={APP_TYPE_OPTIONS}\n required\n error={errors.appType}\n />\n\n <SelectField\n label={tr(\"devportal.category\", \"Category\")}\n value={formData.category}\n onChange={(e) => handleChange(\"category\", e.target.value)}\n options={appCategoryOptionsFor(app?.category)}\n required\n error={errors.category}\n />\n\n <SelectField\n label={tr(\"devportal.visibility\", \"Visibility\")}\n value={formData.visibility}\n onChange={(e) =>\n handleChange(\"visibility\", e.target.value as AppVisibility)\n }\n options={\n app?.appType === \"WORKFLOW\"\n ? WORKFLOW_VISIBILITY_OPTIONS\n : BASE_VISIBILITY_OPTIONS\n }\n hint={\n formData.visibility === \"PUBLIC\"\n ? tr(\n \"devportal.visibilityHintPublic\",\n \"Listed in the marketplace after review approval — anyone can discover and install it\",\n )\n : formData.visibility === \"UNLISTED\"\n ? tr(\n \"devportal.visibilityHintUnlisted\",\n \"Not in the store, but accessible via a direct link. You can still submit for marketplace review\",\n )\n : formData.visibility === \"INTERNAL\"\n ? tr(\n \"devportal.visibilityHintInternal\",\n \"Visible to all members of your developer organization — no one outside can access it\",\n )\n : tr(\n \"devportal.visibilityHintPrivate\",\n \"Only you (the creator) can see this — other org members cannot access it\",\n )\n }\n />\n </div>\n\n <TagInput\n label={tr(\"devportal.tags\", \"Tags\")}\n value={formData.tags}\n onChange={(tags) => handleChange(\"tags\", tags)}\n placeholder={tr(\n \"devportal.addTagsPlaceholder\",\n \"Add tags (press Enter)\",\n )}\n />\n\n <TagInput\n label={tr(\"devportal.keywords\", \"Keywords\")}\n value={formData.keywords}\n onChange={(keywords) => handleChange(\"keywords\", keywords)}\n placeholder={tr(\n \"devportal.addKeywordsPlaceholder\",\n \"Add keywords (press Enter)\",\n )}\n />\n\n {/* Compatible Products — NODE and WORKFLOW only */}\n {(formData.appType === \"NODE\" ||\n formData.appType === \"WORKFLOW\") && (\n <div className=\"space-y-2\">\n <label className=\"block text-sm font-medium text-text-primary\">\n Compatible Products\n </label>\n <p className=\"text-xs text-text-secondary\">\n Select which products this {formData.appType.toLowerCase()}{\" \"}\n works with. Users will see it in those products' node\n stores.\n </p>\n <MultiSelectCombobox\n options={platformProducts.map((p) => ({\n value: p.slug,\n label: p.name,\n }))}\n selected={compatibleProducts}\n onChange={(next) => {\n setCompatibleProducts(next);\n setHasChanges(true);\n }}\n placeholder=\"Select products…\"\n searchPlaceholder=\"Search products…\"\n />\n </div>\n )}\n </PageSection>\n\n {/* URLs */}\n <PageSection\n title={tr(\"devportal.links\", \"Links\")}\n description={tr(\n \"devportal.linksDescription\",\n \"External resources for your application\",\n )}\n >\n <div className=\"grid gap-4 sm:grid-cols-2\">\n <InputField\n label={tr(\"devportal.websiteUrl\", \"Website URL\")}\n type=\"url\"\n value={formData.websiteUrl}\n onChange={(e) => handleChange(\"websiteUrl\", e.target.value)}\n placeholder={tr(\n \"devportal.websiteUrlPlaceholder\",\n \"https://example.com\",\n )}\n />\n\n <InputField\n label={tr(\"devportal.documentationUrl\", \"Documentation URL\")}\n type=\"url\"\n value={formData.documentationUrl}\n onChange={(e) =>\n handleChange(\"documentationUrl\", e.target.value)\n }\n placeholder={tr(\n \"devportal.documentationUrlPlaceholder\",\n \"https://docs.example.com\",\n )}\n />\n\n <InputField\n label={tr(\"devportal.supportUrl\", \"Support URL\")}\n type=\"url\"\n value={formData.supportUrl}\n onChange={(e) => handleChange(\"supportUrl\", e.target.value)}\n placeholder={tr(\n \"devportal.supportUrlPlaceholder\",\n \"https://support.example.com\",\n )}\n />\n\n <InputField\n label={tr(\"devportal.githubUrl\", \"GitHub URL\")}\n type=\"url\"\n value={formData.githubUrl}\n onChange={(e) => handleChange(\"githubUrl\", e.target.value)}\n placeholder={tr(\n \"devportal.githubUrlPlaceholder\",\n \"https://github.com/org/repo\",\n )}\n />\n\n <InputField\n label={tr(\"devportal.privacyPolicyUrl\", \"Privacy Policy URL\")}\n type=\"url\"\n value={formData.privacyPolicyUrl}\n onChange={(e) =>\n handleChange(\"privacyPolicyUrl\", e.target.value)\n }\n placeholder={tr(\n \"devportal.privacyPolicyUrlPlaceholder\",\n \"https://example.com/privacy\",\n )}\n />\n\n <InputField\n label={tr(\n \"devportal.termsOfServiceUrl\",\n \"Terms of Service URL\",\n )}\n type=\"url\"\n value={formData.termsOfServiceUrl}\n onChange={(e) =>\n handleChange(\"termsOfServiceUrl\", e.target.value)\n }\n placeholder={tr(\n \"devportal.termsOfServiceUrlPlaceholder\",\n \"https://example.com/terms\",\n )}\n />\n </div>\n </PageSection>\n\n {/* Integration Setup — INTEGRATION / API_INTEGRATION only */}\n {(formData.appType === \"INTEGRATION\" ||\n formData.appType === \"API_INTEGRATION\") && (\n <PageSection\n title=\"Integration Setup\"\n 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.\"\n >\n <div className=\"space-y-4\">\n <InputField\n label=\"Post-install Callback URL\"\n type=\"url\"\n value={formData.oauthAuthUrl}\n onChange={(e) => handleChange(\"oauthAuthUrl\", e.target.value)}\n placeholder=\"https://yourapp.com/callback\"\n hint=\"Users land here after install with ?installation_id=xxx appended\"\n />\n <InputField\n label=\"Revoke URL\"\n type=\"url\"\n value={formData.oauthRevokeUrl}\n onChange={(e) =>\n handleChange(\"oauthRevokeUrl\", e.target.value)\n }\n placeholder=\"https://yourapp.com/oauth/revoke\"\n hint=\"We POST to this URL when a user uninstalls your integration\"\n />\n {/* Signing secret — read-only, rotate-only */}\n {(() => {\n const displaySecret =\n rotatedSecret ?? data?.application?.signingSecret;\n const masked = \"boff_sk_\" + \"•\".repeat(32);\n return (\n <div className=\"space-y-1.5\">\n <label className=\"block text-sm font-medium text-text-primary\">\n Signing Secret\n </label>\n <p className=\"text-xs text-text-secondary\">\n Use this secret to authenticate{\" \"}\n <code className=\"font-mono text-xs bg-bg-sunken px-1 py-0.5 rounded\">\n verifyInstallation\n </code>{\" \"}\n calls from your integration server. Store it securely —\n it is only shown immediately after generation or\n rotation.\n </p>\n {displaySecret ? (\n <div className=\"flex items-center gap-2\">\n <div className=\"flex-1 flex items-center gap-0 rounded-md border border-border-default bg-bg-sunken overflow-hidden\">\n <code className=\"flex-1 px-3 py-2 text-xs font-mono text-text-primary truncate\">\n {showSecret ? displaySecret : masked}\n </code>\n <button\n type=\"button\"\n onClick={() => setShowSecret((v) => !v)}\n className=\"px-2 py-2 text-text-secondary hover:text-text-primary border-l border-border-default\"\n title={showSecret ? \"Hide\" : \"Reveal\"}\n >\n {showSecret ? (\n <EyeOff size={14} />\n ) : (\n <Eye size={14} />\n )}\n </button>\n <button\n type=\"button\"\n onClick={() => handleCopySecret(displaySecret)}\n className=\"px-2 py-2 text-text-secondary hover:text-text-primary border-l border-border-default\"\n title=\"Copy to clipboard\"\n >\n {copiedSecret ? (\n <Check size={14} className=\"text-green-500\" />\n ) : (\n <Copy size={14} />\n )}\n </button>\n </div>\n <button\n type=\"button\"\n onClick={() => setShowRotateDialog(true)}\n disabled={isRotating}\n className=\"flex items-center gap-1.5 px-3 py-2 text-xs rounded-md border border-border-default bg-bg-default text-text-primary hover:bg-bg-subtle disabled:opacity-50\"\n title=\"Rotate signing secret\"\n >\n <RefreshCw\n size={12}\n className={isRotating ? \"animate-spin\" : \"\"}\n />\n Rotate\n </button>\n </div>\n ) : (\n <button\n type=\"button\"\n onClick={handleRotateSecret}\n disabled={isRotating}\n className=\"flex items-center gap-1.5 px-3 py-2 text-xs rounded-md border border-border-default bg-bg-default text-text-primary hover:bg-bg-subtle disabled:opacity-50\"\n >\n <RefreshCw\n size={12}\n className={isRotating ? \"animate-spin\" : \"\"}\n />\n Generate Signing Secret\n </button>\n )}\n {rotatedSecret && (\n <p className=\"text-xs text-amber-600 dark:text-amber-400\">\n New secret generated. Copy it now — the old secret is\n already invalidated.\n </p>\n )}\n </div>\n );\n })()}\n </div>\n </PageSection>\n )}\n\n {/* Settings */}\n <PageSection\n title={tr(\"devportal.settings\", \"Settings\")}\n description={tr(\n \"devportal.settingsDescription\",\n \"Additional configuration options\",\n )}\n >\n <div className=\"space-y-4\">\n <CheckboxField\n label={tr(\n \"devportal.requireWorkspaceAdminApproval\",\n \"Require workspace admin approval\",\n )}\n description={tr(\n \"devportal.requireWorkspaceAdminApprovalDescription\",\n \"When enabled, workspace admins must approve installations before users can access this app\",\n )}\n checked={formData.requiresApproval}\n onChange={(e) =>\n handleChange(\"requiresApproval\", e.target.checked)\n }\n />\n </div>\n </PageSection>\n\n {/* Submission readiness checklist */}\n {canSubmitForReview && (\n <div className=\"rounded-lg border border-border-subtle bg-bg-sunken p-4 space-y-2\">\n <p className=\"text-sm font-medium text-text-primary flex items-center gap-2\">\n <Send size={14} />\n {tr(\"devportal.submissionChecklist\", \"Submission Checklist\")}\n </p>\n {[\n {\n label: tr(\"devportal.checkName\", \"Name set\"),\n ok: !!formData.name.trim(),\n },\n {\n label: tr(\n \"devportal.checkShortDesc\",\n \"Short description set\",\n ),\n ok: !!formData.shortDescription.trim(),\n },\n {\n label: tr(\n \"devportal.checkFullDesc\",\n \"Full description added\",\n ),\n ok: !!formData.description.trim(),\n },\n {\n label: tr(\"devportal.checkCategory\", \"Category selected\"),\n ok: !!formData.category,\n },\n {\n label: tr(\n \"devportal.checkVisibility\",\n \"Visibility set to Public or Unlisted\",\n ),\n ok:\n !!formData.visibility && formData.visibility !== \"PRIVATE\",\n },\n {\n label: tr(\"devportal.checkSaved\", \"All changes saved\"),\n ok: !hasChanges,\n },\n ...(app?.appType === \"NODE\" || app?.appType === \"WORKFLOW\"\n ? [\n {\n label: tr(\n \"devportal.checkVersion\",\n \"At least one version uploaded\",\n ),\n ok: (data?.application?.versions?.totalCount ?? 0) > 0,\n },\n ]\n : []),\n ].map((item) => (\n <div\n key={item.label}\n className=\"flex items-center gap-2 text-sm\"\n >\n {item.ok ? (\n <span className=\"text-status-success-text\">✓</span>\n ) : (\n <span className=\"text-status-error-text\">✗</span>\n )}\n <span\n className={\n item.ok\n ? \"text-text-secondary line-through\"\n : \"text-text-primary\"\n }\n >\n {item.label}\n </span>\n </div>\n ))}\n </div>\n )}\n\n {/* Actions */}\n <div className=\"flex flex-col gap-4 border-t pt-6\">\n {/* Primary actions */}\n <div className=\"flex items-center justify-end\">\n <button\n type=\"submit\"\n disabled={isSubmitting || !hasChanges || !canUpdate}\n aria-disabled={!canUpdate}\n 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\"\n >\n {isSubmitting ? (\n <>\n <span className=\"h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent\" />\n {tr(\"devportal.saving\", \"Saving...\")}\n </>\n ) : (\n <>\n <Save size={16} />\n {tr(\"devportal.saveChanges\", \"Save Changes\")}\n </>\n )}\n </button>\n </div>\n\n {/* Danger zone */}\n <div className=\"rounded-lg border border-border-subtle bg-status-error-bg-subtle p-4\">\n <h3 className=\"text-sm font-medium text-status-error-text\">\n {tr(\"devportal.dangerZone\", \"Danger Zone\")}\n </h3>\n <p className=\"mt-1 text-sm text-status-error-text\">\n {tr(\n \"devportal.dangerZoneWarning\",\n \"These actions are irreversible. Please proceed with caution.\",\n )}\n </p>\n <div className=\"mt-4 flex gap-3\">\n {canDeprecate && (\n <button\n type=\"button\"\n onClick={() => setShowDeprecateDialog(true)}\n className=\"inline-flex items-center gap-2 rounded-md border border-accent-orange bg-bg-surface px-3 py-1.5 text-sm font-medium text-accent-orange hover:bg-accent-orange-subtle transition-colors\"\n >\n <Archive size={14} />\n {tr(\"devportal.deprecateApp\", \"Deprecate App\")}\n </button>\n )}\n {canDeactivate && (\n <button\n type=\"button\"\n onClick={() => setShowDeactivateDialog(true)}\n className=\"inline-flex items-center gap-2 rounded-md border border-accent-orange bg-bg-surface px-3 py-1.5 text-sm font-medium text-accent-orange hover:bg-accent-orange-subtle transition-colors\"\n >\n <Power size={14} />\n {tr(\"devportal.deactivateApp\", \"Deactivate App\")}\n </button>\n )}\n <button\n type=\"button\"\n onClick={() => setShowDeleteDialog(true)}\n disabled={!canDelete}\n aria-disabled={!canDelete}\n className=\"inline-flex items-center gap-2 rounded-md border border-status-error-bg bg-bg-surface px-3 py-1.5 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle transition-colors disabled:opacity-50\"\n >\n <Trash2 size={14} />\n {tr(\"devportal.deleteApp\", \"Delete App\")}\n </button>\n </div>\n </div>\n </div>\n </form>\n\n {/* Rotate signing secret confirmation dialog */}\n <ConfirmDialog\n open={showRotateDialog}\n onOpenChange={setShowRotateDialog}\n title={tr(\"devportal.rotateSigningSecret\", \"Rotate signing secret\")}\n description={tr(\n \"devportal.rotateSigningSecretConfirm\",\n \"A new signing secret is created and the current one stops working straight away. Update every integration that verifies this app's signatures first, or they will start failing.\",\n )}\n confirmLabel={tr(\"devportal.rotateSecret\", \"Rotate secret\")}\n variant=\"warning\"\n onConfirm={async () => {\n await handleRotateSecret();\n setShowRotateDialog(false);\n }}\n />\n\n {/* Delete confirmation dialog */}\n <ConfirmDialog\n open={showDeleteDialog}\n onOpenChange={setShowDeleteDialog}\n title={tr(\"devportal.deleteApplication\", \"Delete Application\")}\n description={tr(\n \"devportal.deleteApplicationConfirm\",\n `Are you sure you want to delete \"${app.name}\"? This action cannot be undone. All OAuth clients, API keys, webhooks, and analytics data will be permanently deleted.`,\n )}\n confirmLabel={tr(\"devportal.deleteApplication\", \"Delete Application\")}\n variant=\"destructive\"\n onConfirm={handleDelete}\n />\n\n {/* Deprecate confirmation dialog */}\n <ConfirmDialog\n open={showDeprecateDialog}\n onOpenChange={setShowDeprecateDialog}\n title={tr(\"devportal.deprecateApplication\", \"Deprecate Application\")}\n description={tr(\n \"devportal.deprecateApplicationConfirm\",\n `Are you sure you want to deprecate \"${app.name}\"? Existing users will still be able to use the app, but it will no longer be visible in the marketplace and new installations will be disabled.`,\n )}\n confirmLabel={tr(\n \"devportal.deprecateApplication\",\n \"Deprecate Application\",\n )}\n variant=\"warning\"\n onConfirm={handleDeprecate}\n />\n\n {/* Deactivate confirmation dialog */}\n <ConfirmDialog\n open={showDeactivateDialog}\n onOpenChange={setShowDeactivateDialog}\n title={tr(\n \"devportal.deactivateApplication\",\n \"Deactivate Application\",\n )}\n description={tr(\n \"devportal.deactivateApplicationConfirm\",\n `Are you sure you want to deactivate \"${app.name}\"? This will revoke all active tokens and disable the app from the auth-svc layer. The app will no longer be able to authenticate or act on behalf of users.`,\n )}\n confirmLabel={tr(\n \"devportal.deactivateApplication\",\n \"Deactivate Application\",\n )}\n variant=\"destructive\"\n onConfirm={handleDeactivate}\n />\n </PageLayout>\n </PermissionGuard>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA+EA,IAAMC,KAAmB,OAAO,QAAQC,CAAe,CAAC,CAAC,KACtD,CAACC,GAAOC,QAAY;CACnB;CACA;AACF,EACF,GAEMC,IAA0B;CAC9B;EAAE,OAAO;EAAU,OAAO;CAAkD;CAC5E;EAAE,OAAO;EAAW,OAAO;CAA8C;CACzE;EAAE,OAAO;EAAY,OAAO;CAA4C;AAC1E,GAEMC,KAA8B,CAClC,GAAGD,GACH;CACE,OAAO;CACP,OAAO;AACT,CACF;AAKA,SAASE,GACP,GAGoB;CAEpB,OADKC,IACE;EACL,IAAIA,EAAK;EACT,MAAMA,EAAK;EACX,MAAMA,EAAK;EACX,kBAAkBA,EAAK,oBAAoB,KAAA;EAC3C,aAAaA,EAAK,eAAe,KAAA;EACjC,SAASA,EAA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"EditApplicationPage.js","names":["_Fragment","APP_TYPE_OPTIONS","APP_TYPE_LABELS","value","label","BASE_VISIBILITY_OPTIONS","WORKFLOW_VISIBILITY_OPTIONS","mapToApplication","data","EditApplicationPage","useDevportal","useParams","useI18n","platformProducts","useProducts","canUpdate","useDevportalPermission","DEVPORTAL_PERMISSIONS","canDelete","tr","t","key","fallback","isSubmitting","setIsSubmitting","useState","errors","setErrors","showDeleteDialog","setShowDeleteDialog","showDeprecateDialog","setShowDeprecateDialog","showDeactivateDialog","setShowDeactivateDialog","hasChanges","setHasChanges","showSecret","setShowSecret","isRotating","setIsRotating","rotatedSecret","setRotatedSecret","copiedSecret","setCopiedSecret","queryError","useGetApplicationQuery","appId","updateApplication","useUpdateApplicationMutation","deleteApplication","useDeleteApplicationMutation","deactivateApp","useDeactivateAppMutation","deactivateApplication","useDeactivateApplicationMutation","isFluidgrids","useIsFluidgridsVariant","trParams","useTr","rotateSigningSecret","useRotateApplicationSigningSecretMutation","showRotateDialog","setShowRotateDialog","app","name","reg","formData","setFormData","compatibleProducts","setCompatibleProducts","compatibility","products","handleNavigate","basePath","path","handleChange","prev","field","handleRotateSecret","newSecret","handleCopySecret","secret","validateForm","newErrors","handleSubmit","err","handleDelete","nativeNotify","handleDeprecate","handleDeactivate","loading","LoadingState","PageLayout","AlertCircle","EmptyState","AppWindow","canSubmitForReview","canDeprecate","canDeactivate","PermissionGuard","StatusBadge","AlertTriangle","PageSection","InputField","TextareaField","MarkdownEditor","SelectField","appCategoryOptionsFor","TagInput","tags","keywords","MultiSelectCombobox","p","next","displaySecret","masked","v","jsx","EyeOff","Eye","Check","Copy","RefreshCw","CheckboxField","Send","item","Fragment","Save","DEACTIVATE_COPY","Archive","Power","Trash2","ConfirmDialog"],"sources":["../../../src/devportal/pages/EditApplicationPage.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { useState, useEffect } from \"react\";\nimport { useI18n } from \"@burdenoff/fe-libs/shared/providers/shell/I18nProvider\";\nimport { useParams } from \"react-router\";\nimport {\n Save,\n Trash2,\n AlertTriangle,\n Archive,\n Send,\n AlertCircle,\n AppWindow,\n Power,\n Check,\n Copy,\n Eye,\n EyeOff,\n RefreshCw,\n} from \"lucide-react\";\nimport { appCategoryOptionsFor } from \"../constants/appCategories\";\nimport { PageLayout, PageSection } from \"../components/PageLayout\";\nimport {\n InputField,\n TextareaField,\n SelectField,\n TagInput,\n CheckboxField,\n} from \"../components/FormField\";\nimport { MarkdownEditor } from \"../components/MarkdownEditor\";\nimport { MultiSelectCombobox } from \"../components/MultiSelectCombobox\";\nimport { StatusBadge } from \"../components/StatusBadge\";\nimport { ConfirmDialog } from \"../components/ConfirmDialog\";\nimport { LoadingState } from \"../components/LoadingState\";\nimport { EmptyState } from \"../components/EmptyState\";\nimport {\n useDevportal,\n useIsFluidgridsVariant,\n} from \"../providers/DevportalProvider\";\nimport { useTr } from \"../utils/i18n\";\nimport { DEACTIVATE_COPY } from \"../utils/appDetailTabs\";\nimport { nativeImpact, nativeNotify } from \"../../utils/nativeBridge\";\nimport { PermissionGuard } from \"../components\";\nimport { DEVPORTAL_PERMISSIONS } from \"../constants/permissions\";\nimport { useDevportalPermission } from \"../hooks/usePermission\";\nimport { useProducts } from \"../hooks\";\nimport type { Application, AppType, AppVisibility, AppStatus } from \"../types\";\nimport { APP_TYPE_LABELS } from \"../utils/constants\";\nimport {\n useGetApplicationQuery,\n useUpdateApplicationMutation,\n useDeleteApplicationMutation,\n useDeactivateAppMutation,\n useDeactivateApplicationMutation,\n useRotateApplicationSigningSecretMutation,\n} from \"../../generated/global-operations\";\n\ninterface EditApplicationFormData {\n name: string;\n slug: string;\n shortDescription: string;\n description: string;\n appType: AppType;\n visibility: AppVisibility;\n category: string;\n tags: string[];\n keywords: string[];\n websiteUrl: string;\n documentationUrl: string;\n supportUrl: string;\n privacyPolicyUrl: string;\n termsOfServiceUrl: string;\n githubUrl: string;\n oauthAuthUrl: string;\n oauthRevokeUrl: string;\n requiresApproval: boolean;\n}\n\ninterface FormErrors {\n name?: string;\n slug?: string;\n shortDescription?: string;\n appType?: string;\n category?: string;\n}\n\nconst APP_TYPE_OPTIONS = Object.entries(APP_TYPE_LABELS).map(\n ([value, label]) => ({\n value,\n label,\n }),\n);\n\nconst BASE_VISIBILITY_OPTIONS = [\n { value: \"PUBLIC\", label: \"Public — listed in the marketplace after review\" },\n { value: \"PRIVATE\", label: \"Private — only you (the creator) can see it\" },\n { value: \"INTERNAL\", label: \"Internal — visible to your entire dev org\" },\n];\n\nconst WORKFLOW_VISIBILITY_OPTIONS = [\n ...BASE_VISIBILITY_OPTIONS,\n {\n value: \"UNLISTED\",\n label: \"Unlisted — shareable via link, not listed in store\",\n },\n];\n\n/**\n * Helper to safely map GraphQL response to Application type\n */\nfunction mapToApplication(\n data: NonNullable<\n ReturnType<typeof useGetApplicationQuery>[\"data\"]\n >[\"application\"],\n): Application | null {\n if (!data) return null;\n return {\n id: data.id,\n name: data.name,\n slug: data.slug,\n shortDescription: data.shortDescription || undefined,\n description: data.description || undefined,\n appType: data.appType,\n status: data.status,\n visibility: data.visibility,\n tenantId: data.tenantId,\n developerId: data.developerId,\n developerOrganizationId: data.developerOrganizationId || undefined,\n category: data.category || undefined,\n tags: data.tags || [],\n keywords: data.keywords || [],\n iconUrl: data.iconUrl || undefined,\n websiteUrl: data.websiteUrl || undefined,\n documentationUrl: data.documentationUrl || undefined,\n supportUrl: data.supportUrl || undefined,\n privacyPolicyUrl: data.privacyPolicyUrl || undefined,\n termsOfServiceUrl: data.termsOfServiceUrl || undefined,\n githubUrl: data.githubUrl || undefined,\n pricingType: data.pricingType || undefined,\n installCount: data.installCount,\n activeInstallCount: data.activeInstallCount,\n averageRating: data.averageRating ?? undefined,\n reviewCount: data.reviewCount,\n submittedAt: data.submittedAt || undefined,\n publishedAt: data.publishedAt || undefined,\n lastReviewedAt: data.lastReviewedAt || undefined,\n reviewStatus: data.reviewStatus,\n reviewNotes: data.reviewNotes || undefined,\n reviewedBy: data.reviewedBy || undefined,\n isFeatured: data.isFeatured,\n isVerified: data.isVerified,\n requiresApproval: data.requiresApproval,\n oauthAuthUrl: data.oauthAuthUrl || undefined,\n oauthRevokeUrl: data.oauthRevokeUrl || undefined,\n createdAt: data.createdAt,\n updatedAt: data.updatedAt,\n };\n}\n\n/**\n * Edit application page — wired to real GraphQL mutations.\n */\nexport const EditApplicationPage: FC = () => {\n const { navigate, basePath } = useDevportal();\n const { appId } = useParams<{ appId: string }>();\n const { t } = useI18n();\n const { products: platformProducts } = useProducts();\n const { allowed: canUpdate } = useDevportalPermission(\n DEVPORTAL_PERMISSIONS.APP_UPDATE,\n );\n const { allowed: canDelete } = useDevportalPermission(\n DEVPORTAL_PERMISSIONS.APP_DELETE,\n );\n const tr = (key: string, fallback: string): string => {\n const value = t(key);\n return value === key ? fallback : value;\n };\n const [isSubmitting, setIsSubmitting] = useState(false);\n const [errors, setErrors] = useState<FormErrors>({});\n const [showDeleteDialog, setShowDeleteDialog] = useState(false);\n const [showDeprecateDialog, setShowDeprecateDialog] = useState(false);\n const [showDeactivateDialog, setShowDeactivateDialog] = useState(false);\n const [hasChanges, setHasChanges] = useState(false);\n const [showSecret, setShowSecret] = useState(false);\n const [isRotating, setIsRotating] = useState(false);\n const [rotatedSecret, setRotatedSecret] = useState<string | null>(null);\n const [copiedSecret, setCopiedSecret] = useState(false);\n\n // ---------------------------------------------------------------------------\n // GraphQL queries & mutations\n // ---------------------------------------------------------------------------\n const {\n data,\n loading,\n error: queryError,\n refetch,\n } = useGetApplicationQuery({\n variables: { id: appId! },\n skip: !appId,\n });\n\n const [updateApplication] = useUpdateApplicationMutation();\n const [deleteApplication] = useDeleteApplicationMutation();\n const [deactivateApp] = useDeactivateAppMutation();\n const [deactivateApplication] = useDeactivateApplicationMutation();\n const isFluidgrids = useIsFluidgridsVariant();\n const trParams = useTr();\n const [rotateSigningSecret] = useRotateApplicationSigningSecretMutation();\n // Rotating breaks every integration using the current secret, so it confirms first.\n const [showRotateDialog, setShowRotateDialog] = useState(false);\n\n // ---------------------------------------------------------------------------\n // Derive application from query data\n // ---------------------------------------------------------------------------\n const app = mapToApplication(data?.application);\n\n useEffect(() => {\n const name = app?.name;\n if (!appId || !name) return;\n const reg = (\n window as unknown as {\n __breadcrumbRegistry?: {\n register: (id: string, name: string) => void;\n unregister: (id: string) => void;\n };\n }\n ).__breadcrumbRegistry;\n reg?.register(appId, name);\n return () => reg?.unregister(appId);\n }, [appId, app?.name]);\n\n // ---------------------------------------------------------------------------\n // Form state — initialised from fetched app once available\n // ---------------------------------------------------------------------------\n const [formData, setFormData] = useState<EditApplicationFormData>({\n name: \"\",\n slug: \"\",\n shortDescription: \"\",\n description: \"\",\n appType: \"WEB_APP\",\n visibility: \"PUBLIC\",\n category: \"\",\n tags: [],\n keywords: [],\n websiteUrl: \"\",\n documentationUrl: \"\",\n supportUrl: \"\",\n privacyPolicyUrl: \"\",\n termsOfServiceUrl: \"\",\n githubUrl: \"\",\n oauthAuthUrl: \"\",\n oauthRevokeUrl: \"\",\n requiresApproval: false,\n });\n const [compatibleProducts, setCompatibleProducts] = useState<string[]>([]);\n\n useEffect(() => {\n if (app) {\n setFormData({\n name: app.name,\n slug: app.slug,\n shortDescription: app.shortDescription || \"\",\n description: app.description || \"\",\n appType: app.appType,\n visibility: app.visibility,\n category: app.category || \"\",\n tags: app.tags,\n keywords: app.keywords,\n websiteUrl: app.websiteUrl || \"\",\n documentationUrl: app.documentationUrl || \"\",\n supportUrl: app.supportUrl || \"\",\n privacyPolicyUrl: app.privacyPolicyUrl || \"\",\n termsOfServiceUrl: app.termsOfServiceUrl || \"\",\n githubUrl: app.githubUrl || \"\",\n oauthAuthUrl: app.oauthAuthUrl || \"\",\n oauthRevokeUrl: app.oauthRevokeUrl || \"\",\n requiresApproval: app.requiresApproval,\n });\n // Load compatibleProducts from manifest.compatibility.products\n // Note: mapToApplication doesn't copy manifest, so read from raw query data directly.\n const manifest = data?.application?.manifest as\n Record<string, unknown> | null | undefined;\n const compatibility = manifest?.compatibility as\n Record<string, unknown> | undefined;\n const products = Array.isArray(compatibility?.products)\n ? (compatibility.products as string[])\n : [];\n setCompatibleProducts(products);\n setHasChanges(false);\n }\n // Re-sync form when the underlying application data changes (e.g. after\n // a refetch triggered by a mutation). We intentionally depend on\n // `data?.application` rather than the derived `app` object so that the\n // effect fires when the query cache updates.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [data?.application]);\n\n // ---------------------------------------------------------------------------\n // Handlers\n // ---------------------------------------------------------------------------\n const handleNavigate = (path: string) => {\n navigate?.(`${basePath}${path}`);\n };\n\n const handleChange = (\n field: keyof EditApplicationFormData,\n value: string | string[] | boolean,\n ) => {\n setFormData((prev) => ({ ...prev, [field]: value }));\n setHasChanges(true);\n if (errors[field as keyof FormErrors]) {\n setErrors((prev) => ({ ...prev, [field]: undefined }));\n }\n };\n\n const handleRotateSecret = async () => {\n if (!appId) return;\n setIsRotating(true);\n try {\n const result = await rotateSigningSecret({ variables: { id: appId } });\n const newSecret =\n result.data?.rotateApplicationSigningSecret?.signingSecret;\n if (newSecret) {\n setRotatedSecret(newSecret);\n setShowSecret(true);\n }\n } catch {\n nativeNotify(\"error\");\n } finally {\n setIsRotating(false);\n }\n };\n\n const handleCopySecret = async (secret: string) => {\n await navigator.clipboard.writeText(secret);\n setCopiedSecret(true);\n setTimeout(() => setCopiedSecret(false), 2000);\n };\n\n const validateForm = (): boolean => {\n const newErrors: FormErrors = {};\n\n if (!formData.name.trim()) {\n newErrors.name = tr(\n \"devportal.appNameRequired\",\n \"Application name is required\",\n );\n } else if (formData.name.length < 3) {\n newErrors.name = tr(\n \"devportal.appNameMinLength\",\n \"Name must be at least 3 characters\",\n );\n } else if (formData.name.length > 100) {\n newErrors.name = tr(\n \"devportal.appNameMaxLength\",\n \"Name must be less than 100 characters\",\n );\n }\n\n if (!formData.slug.trim()) {\n newErrors.slug = tr(\"devportal.slugRequired\", \"Slug is required\");\n } else if (!/^[a-z0-9-]+$/.test(formData.slug)) {\n newErrors.slug = tr(\n \"devportal.slugInvalidChars\",\n \"Slug can only contain lowercase letters, numbers, and hyphens\",\n );\n }\n\n if (!formData.shortDescription.trim()) {\n newErrors.shortDescription = tr(\n \"devportal.shortDescriptionRequired\",\n \"Short description is required\",\n );\n } else if (formData.shortDescription.length > 200) {\n newErrors.shortDescription = tr(\n \"devportal.shortDescriptionMaxLength\",\n \"Short description must be less than 200 characters\",\n );\n }\n\n if (!formData.appType) {\n newErrors.appType = tr(\n \"devportal.appTypeRequired\",\n \"Application type is required\",\n );\n }\n\n if (!formData.category) {\n newErrors.category = tr(\n \"devportal.categoryRequired\",\n \"Category is required\",\n );\n }\n\n setErrors(newErrors);\n return Object.keys(newErrors).length === 0;\n };\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n\n if (!validateForm() || !app) {\n return;\n }\n\n setIsSubmitting(true);\n\n try {\n await updateApplication({\n variables: {\n id: app.id,\n input: {\n name: formData.name,\n shortDescription: formData.shortDescription,\n description: formData.description,\n appType: formData.appType,\n visibility: formData.visibility,\n category: formData.category,\n tags: formData.tags,\n keywords: formData.keywords,\n websiteUrl: formData.websiteUrl || null,\n documentationUrl: formData.documentationUrl || null,\n supportUrl: formData.supportUrl || null,\n privacyPolicyUrl: formData.privacyPolicyUrl || null,\n termsOfServiceUrl: formData.termsOfServiceUrl || null,\n githubUrl: formData.githubUrl || null,\n oauthAuthUrl: formData.oauthAuthUrl || null,\n oauthRevokeUrl: formData.oauthRevokeUrl || null,\n compatibleProducts,\n },\n },\n });\n setHasChanges(false);\n } catch (err) {\n console.error(\"Failed to update application:\", err);\n } finally {\n setIsSubmitting(false);\n }\n };\n\n const handleDelete = async () => {\n if (!app) return;\n void nativeImpact(\"medium\");\n try {\n await deleteApplication({\n variables: { id: app.id },\n });\n void nativeNotify(\"success\");\n handleNavigate(\"/apps\");\n } catch (err) {\n void nativeNotify(\"error\");\n console.error(\"Failed to delete application:\", err);\n }\n };\n\n const handleDeprecate = async () => {\n if (!app) return;\n try {\n // Deprecate is modelled as a status transition via update. The backend\n // treats a visibility change to PRIVATE + status mutation or a dedicated\n // deprecation endpoint. Here we use submitApplication with a status note\n // as the deprecate action since there is no separate `deprecateApplication`\n // mutation. If a dedicated mutation is added later, swap it in here.\n await updateApplication({\n variables: {\n id: app.id,\n input: {\n visibility: \"PRIVATE\",\n },\n },\n });\n setShowDeprecateDialog(false);\n } catch (err) {\n console.error(\"Failed to deprecate application:\", err);\n }\n };\n\n const handleDeactivate = async () => {\n if (!app) return;\n try {\n if (isFluidgrids) {\n // Same mutation as App detail: marks the app INACTIVE, switches off its\n // auth app and delists it. (deactivateApp is the auth-svc mutation and\n // takes the auth app id, not this application's id.)\n await deactivateApplication({ variables: { id: app.id } });\n } else {\n await deactivateApp({\n variables: { id: app.id },\n });\n }\n setShowDeactivateDialog(false);\n handleNavigate(\"/apps\");\n } catch (err) {\n console.error(\"Failed to deactivate application:\", err);\n }\n };\n\n // ---------------------------------------------------------------------------\n // Loading / Error / Not-found states\n // ---------------------------------------------------------------------------\n if (loading) {\n return (\n <LoadingState\n message={tr(\"devportal.loadingApplication\", \"Loading application...\")}\n />\n );\n }\n\n if (queryError) {\n return (\n <PageLayout\n title={tr(\"devportal.error\", \"Error\")}\n backLink={`${basePath}/apps`}\n backLabel={tr(\"devportal.backToApplications\", \"Back to Applications\")}\n >\n <div className=\"flex flex-col items-center justify-center py-12 text-center\">\n <AlertCircle size={48} className=\"text-status-error-text mb-4\" />\n <h3 className=\"text-lg font-semibold mb-2\">\n {tr(\n \"devportal.failedToLoadApplication\",\n \"Failed to load application\",\n )}\n </h3>\n <p className=\"text-sm text-text-secondary\">{queryError.message}</p>\n </div>\n </PageLayout>\n );\n }\n\n if (!app) {\n return (\n <PageLayout\n title={tr(\"devportal.notFound\", \"Not Found\")}\n backLink={`${basePath}/apps`}\n backLabel={tr(\"devportal.backToApplications\", \"Back to Applications\")}\n >\n <EmptyState\n illustration=\"empty-generic\"\n icon={<AppWindow size={48} />}\n title={tr(\"devportal.applicationNotFound\", \"Application not found\")}\n description={tr(\n \"devportal.applicationNotFoundDescription\",\n \"The application you're looking for doesn't exist or you don't have access to it.\",\n )}\n />\n </PageLayout>\n );\n }\n\n // ---------------------------------------------------------------------------\n // Derived flags\n // ---------------------------------------------------------------------------\n const canSubmitForReview =\n app.status === \"DRAFT\" || app.status === \"REJECTED\";\n const canDeprecate = app.status === \"PUBLISHED\";\n const canDeactivate = app.status === \"ACTIVE\" || app.status === \"PUBLISHED\";\n\n // ---------------------------------------------------------------------------\n // Render\n // ---------------------------------------------------------------------------\n return (\n <PermissionGuard authOnly>\n <PageLayout\n title={`${tr(\"devportal.editAppTitlePrefix\", \"Edit:\")} ${app.name}`}\n description={tr(\n \"devportal.editAppDescription\",\n \"Update your application settings\",\n )}\n purpose={tr(\n \"devportal.editAppPurpose\",\n \"Change how this app appears and behaves — its name, description, classification, links, and lifecycle settings. Use the danger zone at the bottom to deprecate or delete it when it is retired.\",\n )}\n backLink={`${basePath}/apps/${app.id}`}\n backLabel={tr(\"devportal.backToApplication\", \"Back to Application\")}\n actions={\n <div className=\"flex items-center gap-2\">\n <StatusBadge status={app.status} type=\"app\" />\n </div>\n }\n >\n <form onSubmit={handleSubmit} className=\"space-y-8 max-w-3xl\">\n {/* Status banner for published apps */}\n {app.status === \"PUBLISHED\" && (\n <div className=\"rounded-lg border border-border-subtle bg-status-warning-bg-subtle p-4 flex gap-3\">\n <AlertTriangle\n size={20}\n className=\"text-status-warning-text flex-shrink-0 mt-0.5\"\n />\n <div className=\"text-sm text-status-warning-text\">\n <p className=\"font-medium\">\n {tr(\n \"devportal.appIsPublished\",\n \"This application is published\",\n )}\n </p>\n <p className=\"mt-1 text-status-warning-text\">\n {tr(\n \"devportal.publishedAppChangesWarning\",\n \"Changes to published apps may require re-review. Major changes will put the app back into review status.\",\n )}\n </p>\n </div>\n </div>\n )}\n\n {/* Basic Information */}\n <PageSection\n title={tr(\"devportal.basicInformation\", \"Basic Information\")}\n description={tr(\n \"devportal.basicInformationDescription\",\n \"Core details about your application\",\n )}\n >\n <div className=\"space-y-4\">\n <InputField\n label={tr(\"devportal.applicationName\", \"Application Name\")}\n value={formData.name}\n onChange={(e) => handleChange(\"name\", e.target.value)}\n placeholder={tr(\n \"devportal.applicationNamePlaceholder\",\n \"My Awesome App\",\n )}\n required\n error={errors.name}\n />\n\n <InputField\n label={tr(\"devportal.slug\", \"Slug\")}\n value={formData.slug}\n onChange={(e) =>\n handleChange(\"slug\", e.target.value.toLowerCase())\n }\n placeholder={tr(\"devportal.slugPlaceholder\", \"my-awesome-app\")}\n required\n error={errors.slug}\n hint={tr(\n \"devportal.slugChangeWarning\",\n \"Changing the slug may break existing integrations\",\n )}\n />\n\n <TextareaField\n label={tr(\"devportal.shortDescription\", \"Short Description\")}\n value={formData.shortDescription}\n onChange={(e) =>\n handleChange(\"shortDescription\", e.target.value)\n }\n placeholder={tr(\n \"devportal.shortDescriptionPlaceholder\",\n \"A brief description of what your app does\",\n )}\n required\n error={errors.shortDescription}\n hint={`${formData.shortDescription.length}/200 ${tr(\"devportal.characters\", \"characters\")}`}\n rows={2}\n />\n\n <MarkdownEditor\n label={tr(\"devportal.fullDescription\", \"Full Description\")}\n value={formData.description}\n onChange={(value) => handleChange(\"description\", value)}\n placeholder={tr(\n \"devportal.fullDescriptionPlaceholder\",\n \"Detailed description of your application, features, and use cases...\",\n )}\n rows={6}\n hint={tr(\n \"devportal.markdownSupported\",\n \"Markdown formatting is supported\",\n )}\n />\n </div>\n </PageSection>\n\n {/* Classification */}\n <PageSection\n title={tr(\"devportal.classification\", \"Classification\")}\n description={tr(\n \"devportal.classificationDescription\",\n \"Categorize your application\",\n )}\n >\n <div className=\"grid gap-4 sm:grid-cols-2\">\n <SelectField\n label={tr(\"devportal.applicationType\", \"Application Type\")}\n value={formData.appType}\n onChange={(e) => handleChange(\"appType\", e.target.value)}\n options={APP_TYPE_OPTIONS}\n required\n error={errors.appType}\n />\n\n <SelectField\n label={tr(\"devportal.category\", \"Category\")}\n value={formData.category}\n onChange={(e) => handleChange(\"category\", e.target.value)}\n options={appCategoryOptionsFor(app?.category)}\n required\n error={errors.category}\n />\n\n <SelectField\n label={tr(\"devportal.visibility\", \"Visibility\")}\n value={formData.visibility}\n onChange={(e) =>\n handleChange(\"visibility\", e.target.value as AppVisibility)\n }\n options={\n app?.appType === \"WORKFLOW\"\n ? WORKFLOW_VISIBILITY_OPTIONS\n : BASE_VISIBILITY_OPTIONS\n }\n hint={\n formData.visibility === \"PUBLIC\"\n ? tr(\n \"devportal.visibilityHintPublic\",\n \"Listed in the marketplace after review approval — anyone can discover and install it\",\n )\n : formData.visibility === \"UNLISTED\"\n ? tr(\n \"devportal.visibilityHintUnlisted\",\n \"Not in the store, but accessible via a direct link. You can still submit for marketplace review\",\n )\n : formData.visibility === \"INTERNAL\"\n ? tr(\n \"devportal.visibilityHintInternal\",\n \"Visible to all members of your developer organization — no one outside can access it\",\n )\n : tr(\n \"devportal.visibilityHintPrivate\",\n \"Only you (the creator) can see this — other org members cannot access it\",\n )\n }\n />\n </div>\n\n <TagInput\n label={tr(\"devportal.tags\", \"Tags\")}\n value={formData.tags}\n onChange={(tags) => handleChange(\"tags\", tags)}\n placeholder={tr(\n \"devportal.addTagsPlaceholder\",\n \"Add tags (press Enter)\",\n )}\n />\n\n <TagInput\n label={tr(\"devportal.keywords\", \"Keywords\")}\n value={formData.keywords}\n onChange={(keywords) => handleChange(\"keywords\", keywords)}\n placeholder={tr(\n \"devportal.addKeywordsPlaceholder\",\n \"Add keywords (press Enter)\",\n )}\n />\n\n {/* Compatible Products — NODE and WORKFLOW only */}\n {(formData.appType === \"NODE\" ||\n formData.appType === \"WORKFLOW\") && (\n <div className=\"space-y-2\">\n <label className=\"block text-sm font-medium text-text-primary\">\n Compatible Products\n </label>\n <p className=\"text-xs text-text-secondary\">\n Select which products this {formData.appType.toLowerCase()}{\" \"}\n works with. Users will see it in those products' node\n stores.\n </p>\n <MultiSelectCombobox\n options={platformProducts.map((p) => ({\n value: p.slug,\n label: p.name,\n }))}\n selected={compatibleProducts}\n onChange={(next) => {\n setCompatibleProducts(next);\n setHasChanges(true);\n }}\n placeholder=\"Select products…\"\n searchPlaceholder=\"Search products…\"\n />\n </div>\n )}\n </PageSection>\n\n {/* URLs */}\n <PageSection\n title={tr(\"devportal.links\", \"Links\")}\n description={tr(\n \"devportal.linksDescription\",\n \"External resources for your application\",\n )}\n >\n <div className=\"grid gap-4 sm:grid-cols-2\">\n <InputField\n label={tr(\"devportal.websiteUrl\", \"Website URL\")}\n type=\"url\"\n value={formData.websiteUrl}\n onChange={(e) => handleChange(\"websiteUrl\", e.target.value)}\n placeholder={tr(\n \"devportal.websiteUrlPlaceholder\",\n \"https://example.com\",\n )}\n />\n\n <InputField\n label={tr(\"devportal.documentationUrl\", \"Documentation URL\")}\n type=\"url\"\n value={formData.documentationUrl}\n onChange={(e) =>\n handleChange(\"documentationUrl\", e.target.value)\n }\n placeholder={tr(\n \"devportal.documentationUrlPlaceholder\",\n \"https://docs.example.com\",\n )}\n />\n\n <InputField\n label={tr(\"devportal.supportUrl\", \"Support URL\")}\n type=\"url\"\n value={formData.supportUrl}\n onChange={(e) => handleChange(\"supportUrl\", e.target.value)}\n placeholder={tr(\n \"devportal.supportUrlPlaceholder\",\n \"https://support.example.com\",\n )}\n />\n\n <InputField\n label={tr(\"devportal.githubUrl\", \"GitHub URL\")}\n type=\"url\"\n value={formData.githubUrl}\n onChange={(e) => handleChange(\"githubUrl\", e.target.value)}\n placeholder={tr(\n \"devportal.githubUrlPlaceholder\",\n \"https://github.com/org/repo\",\n )}\n />\n\n <InputField\n label={tr(\"devportal.privacyPolicyUrl\", \"Privacy Policy URL\")}\n type=\"url\"\n value={formData.privacyPolicyUrl}\n onChange={(e) =>\n handleChange(\"privacyPolicyUrl\", e.target.value)\n }\n placeholder={tr(\n \"devportal.privacyPolicyUrlPlaceholder\",\n \"https://example.com/privacy\",\n )}\n />\n\n <InputField\n label={tr(\n \"devportal.termsOfServiceUrl\",\n \"Terms of Service URL\",\n )}\n type=\"url\"\n value={formData.termsOfServiceUrl}\n onChange={(e) =>\n handleChange(\"termsOfServiceUrl\", e.target.value)\n }\n placeholder={tr(\n \"devportal.termsOfServiceUrlPlaceholder\",\n \"https://example.com/terms\",\n )}\n />\n </div>\n </PageSection>\n\n {/* Integration Setup — INTEGRATION / API_INTEGRATION only */}\n {(formData.appType === \"INTEGRATION\" ||\n formData.appType === \"API_INTEGRATION\") && (\n <PageSection\n title=\"Integration Setup\"\n 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.\"\n >\n <div className=\"space-y-4\">\n <InputField\n label=\"Post-install Callback URL\"\n type=\"url\"\n value={formData.oauthAuthUrl}\n onChange={(e) => handleChange(\"oauthAuthUrl\", e.target.value)}\n placeholder=\"https://yourapp.com/callback\"\n hint=\"Users land here after install with ?installation_id=xxx appended\"\n />\n <InputField\n label=\"Revoke URL\"\n type=\"url\"\n value={formData.oauthRevokeUrl}\n onChange={(e) =>\n handleChange(\"oauthRevokeUrl\", e.target.value)\n }\n placeholder=\"https://yourapp.com/oauth/revoke\"\n hint=\"We POST to this URL when a user uninstalls your integration\"\n />\n {/* Signing secret — read-only, rotate-only */}\n {(() => {\n const displaySecret =\n rotatedSecret ?? data?.application?.signingSecret;\n const masked = \"boff_sk_\" + \"•\".repeat(32);\n return (\n <div className=\"space-y-1.5\">\n <label className=\"block text-sm font-medium text-text-primary\">\n Signing Secret\n </label>\n <p className=\"text-xs text-text-secondary\">\n Use this secret to authenticate{\" \"}\n <code className=\"font-mono text-xs bg-bg-sunken px-1 py-0.5 rounded\">\n verifyInstallation\n </code>{\" \"}\n calls from your integration server. Store it securely —\n it is only shown immediately after generation or\n rotation.\n </p>\n {displaySecret ? (\n <div className=\"flex items-center gap-2\">\n <div className=\"flex-1 flex items-center gap-0 rounded-md border border-border-default bg-bg-sunken overflow-hidden\">\n <code className=\"flex-1 px-3 py-2 text-xs font-mono text-text-primary truncate\">\n {showSecret ? displaySecret : masked}\n </code>\n <button\n type=\"button\"\n onClick={() => setShowSecret((v) => !v)}\n className=\"px-2 py-2 text-text-secondary hover:text-text-primary border-l border-border-default\"\n title={showSecret ? \"Hide\" : \"Reveal\"}\n >\n {showSecret ? (\n <EyeOff size={14} />\n ) : (\n <Eye size={14} />\n )}\n </button>\n <button\n type=\"button\"\n onClick={() => handleCopySecret(displaySecret)}\n className=\"px-2 py-2 text-text-secondary hover:text-text-primary border-l border-border-default\"\n title=\"Copy to clipboard\"\n >\n {copiedSecret ? (\n <Check size={14} className=\"text-green-500\" />\n ) : (\n <Copy size={14} />\n )}\n </button>\n </div>\n <button\n type=\"button\"\n onClick={() => setShowRotateDialog(true)}\n disabled={isRotating}\n className=\"flex items-center gap-1.5 px-3 py-2 text-xs rounded-md border border-border-default bg-bg-default text-text-primary hover:bg-bg-subtle disabled:opacity-50\"\n title=\"Rotate signing secret\"\n >\n <RefreshCw\n size={12}\n className={isRotating ? \"animate-spin\" : \"\"}\n />\n Rotate\n </button>\n </div>\n ) : (\n <button\n type=\"button\"\n onClick={handleRotateSecret}\n disabled={isRotating}\n className=\"flex items-center gap-1.5 px-3 py-2 text-xs rounded-md border border-border-default bg-bg-default text-text-primary hover:bg-bg-subtle disabled:opacity-50\"\n >\n <RefreshCw\n size={12}\n className={isRotating ? \"animate-spin\" : \"\"}\n />\n Generate Signing Secret\n </button>\n )}\n {rotatedSecret && (\n <p className=\"text-xs text-amber-600 dark:text-amber-400\">\n New secret generated. Copy it now — the old secret is\n already invalidated.\n </p>\n )}\n </div>\n );\n })()}\n </div>\n </PageSection>\n )}\n\n {/* Settings */}\n <PageSection\n title={tr(\"devportal.settings\", \"Settings\")}\n description={tr(\n \"devportal.settingsDescription\",\n \"Additional configuration options\",\n )}\n >\n <div className=\"space-y-4\">\n <CheckboxField\n label={tr(\n \"devportal.requireWorkspaceAdminApproval\",\n \"Require workspace admin approval\",\n )}\n description={tr(\n \"devportal.requireWorkspaceAdminApprovalDescription\",\n \"When enabled, workspace admins must approve installations before users can access this app\",\n )}\n checked={formData.requiresApproval}\n onChange={(e) =>\n handleChange(\"requiresApproval\", e.target.checked)\n }\n />\n </div>\n </PageSection>\n\n {/* Submission readiness checklist */}\n {canSubmitForReview && (\n <div className=\"rounded-lg border border-border-subtle bg-bg-sunken p-4 space-y-2\">\n <p className=\"text-sm font-medium text-text-primary flex items-center gap-2\">\n <Send size={14} />\n {tr(\"devportal.submissionChecklist\", \"Submission Checklist\")}\n </p>\n {[\n {\n label: tr(\"devportal.checkName\", \"Name set\"),\n ok: !!formData.name.trim(),\n },\n {\n label: tr(\n \"devportal.checkShortDesc\",\n \"Short description set\",\n ),\n ok: !!formData.shortDescription.trim(),\n },\n {\n label: tr(\n \"devportal.checkFullDesc\",\n \"Full description added\",\n ),\n ok: !!formData.description.trim(),\n },\n {\n label: tr(\"devportal.checkCategory\", \"Category selected\"),\n ok: !!formData.category,\n },\n {\n label: tr(\n \"devportal.checkVisibility\",\n \"Visibility set to Public or Unlisted\",\n ),\n ok:\n !!formData.visibility && formData.visibility !== \"PRIVATE\",\n },\n {\n label: tr(\"devportal.checkSaved\", \"All changes saved\"),\n ok: !hasChanges,\n },\n ...(app?.appType === \"NODE\" || app?.appType === \"WORKFLOW\"\n ? [\n {\n label: tr(\n \"devportal.checkVersion\",\n \"At least one version uploaded\",\n ),\n ok: (data?.application?.versions?.totalCount ?? 0) > 0,\n },\n ]\n : []),\n ].map((item) => (\n <div\n key={item.label}\n className=\"flex items-center gap-2 text-sm\"\n >\n {item.ok ? (\n <span className=\"text-status-success-text\">✓</span>\n ) : (\n <span className=\"text-status-error-text\">✗</span>\n )}\n <span\n className={\n item.ok\n ? \"text-text-secondary line-through\"\n : \"text-text-primary\"\n }\n >\n {item.label}\n </span>\n </div>\n ))}\n </div>\n )}\n\n {/* Actions */}\n <div className=\"flex flex-col gap-4 border-t pt-6\">\n {/* Primary actions */}\n <div className=\"flex items-center justify-end\">\n <button\n type=\"submit\"\n disabled={isSubmitting || !hasChanges || !canUpdate}\n aria-disabled={!canUpdate}\n 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\"\n >\n {isSubmitting ? (\n <>\n <span className=\"h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent\" />\n {tr(\"devportal.saving\", \"Saving...\")}\n </>\n ) : (\n <>\n <Save size={16} />\n {tr(\"devportal.saveChanges\", \"Save Changes\")}\n </>\n )}\n </button>\n </div>\n\n {/* Danger zone */}\n <div className=\"rounded-lg border border-border-subtle bg-status-error-bg-subtle p-4\">\n <h3 className=\"text-sm font-medium text-status-error-text\">\n {tr(\"devportal.dangerZone\", \"Danger Zone\")}\n </h3>\n <p className=\"mt-1 text-sm text-status-error-text\">\n {isFluidgrids\n ? trParams(\n DEACTIVATE_COPY.dangerZone.key,\n DEACTIVATE_COPY.dangerZone.fallback,\n )\n : tr(\n \"devportal.dangerZoneWarning\",\n \"These actions are irreversible. Please proceed with caution.\",\n )}\n </p>\n <div className=\"mt-4 flex gap-3\">\n {canDeprecate && (\n <button\n type=\"button\"\n onClick={() => setShowDeprecateDialog(true)}\n className=\"inline-flex items-center gap-2 rounded-md border border-accent-orange bg-bg-surface px-3 py-1.5 text-sm font-medium text-accent-orange hover:bg-accent-orange-subtle transition-colors\"\n >\n <Archive size={14} />\n {tr(\"devportal.deprecateApp\", \"Deprecate App\")}\n </button>\n )}\n {canDeactivate && (\n <button\n type=\"button\"\n onClick={() => setShowDeactivateDialog(true)}\n className=\"inline-flex items-center gap-2 rounded-md border border-accent-orange bg-bg-surface px-3 py-1.5 text-sm font-medium text-accent-orange hover:bg-accent-orange-subtle transition-colors\"\n >\n <Power size={14} />\n {isFluidgrids\n ? trParams(\n DEACTIVATE_COPY.action.key,\n DEACTIVATE_COPY.action.fallback,\n )\n : tr(\"devportal.deactivateApp\", \"Deactivate App\")}\n </button>\n )}\n <button\n type=\"button\"\n onClick={() => setShowDeleteDialog(true)}\n disabled={!canDelete}\n aria-disabled={!canDelete}\n className=\"inline-flex items-center gap-2 rounded-md border border-status-error-bg bg-bg-surface px-3 py-1.5 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle transition-colors disabled:opacity-50\"\n >\n <Trash2 size={14} />\n {tr(\"devportal.deleteApp\", \"Delete App\")}\n </button>\n </div>\n </div>\n </div>\n </form>\n\n {/* Rotate signing secret confirmation dialog */}\n <ConfirmDialog\n open={showRotateDialog}\n onOpenChange={setShowRotateDialog}\n title={tr(\"devportal.rotateSigningSecret\", \"Rotate signing secret\")}\n description={tr(\n \"devportal.rotateSigningSecretConfirm\",\n \"A new signing secret is created and the current one stops working straight away. Update every integration that verifies this app's signatures first, or they will start failing.\",\n )}\n confirmLabel={tr(\"devportal.rotateSecret\", \"Rotate secret\")}\n variant=\"warning\"\n onConfirm={async () => {\n await handleRotateSecret();\n setShowRotateDialog(false);\n }}\n />\n\n {/* Delete confirmation dialog */}\n <ConfirmDialog\n open={showDeleteDialog}\n onOpenChange={setShowDeleteDialog}\n title={tr(\"devportal.deleteApplication\", \"Delete Application\")}\n description={tr(\n \"devportal.deleteApplicationConfirm\",\n `Are you sure you want to delete \"${app.name}\"? This action cannot be undone. All OAuth clients, API keys, webhooks, and analytics data will be permanently deleted.`,\n )}\n confirmLabel={tr(\"devportal.deleteApplication\", \"Delete Application\")}\n variant=\"destructive\"\n onConfirm={handleDelete}\n />\n\n {/* Deprecate confirmation dialog */}\n <ConfirmDialog\n open={showDeprecateDialog}\n onOpenChange={setShowDeprecateDialog}\n title={tr(\"devportal.deprecateApplication\", \"Deprecate Application\")}\n description={tr(\n \"devportal.deprecateApplicationConfirm\",\n `Are you sure you want to deprecate \"${app.name}\"? Existing users will still be able to use the app, but it will no longer be visible in the marketplace and new installations will be disabled.`,\n )}\n confirmLabel={tr(\n \"devportal.deprecateApplication\",\n \"Deprecate Application\",\n )}\n variant=\"warning\"\n onConfirm={handleDeprecate}\n />\n\n {/* Deactivate confirmation dialog */}\n <ConfirmDialog\n open={showDeactivateDialog}\n onOpenChange={setShowDeactivateDialog}\n title={\n isFluidgrids\n ? trParams(\n DEACTIVATE_COPY.title.key,\n DEACTIVATE_COPY.title.fallback,\n )\n : tr(\"devportal.deactivateApplication\", \"Deactivate Application\")\n }\n description={\n isFluidgrids\n ? trParams(\n DEACTIVATE_COPY.description.key,\n DEACTIVATE_COPY.description.fallback,\n { name: app.name },\n )\n : tr(\n \"devportal.deactivateApplicationConfirm\",\n `Are you sure you want to deactivate \"${app.name}\"? This will revoke all active tokens and disable the app from the auth-svc layer. The app will no longer be able to authenticate or act on behalf of users.`,\n )\n }\n confirmLabel={\n isFluidgrids\n ? trParams(\n DEACTIVATE_COPY.action.key,\n DEACTIVATE_COPY.action.fallback,\n )\n : tr(\"devportal.deactivateApplication\", \"Deactivate Application\")\n }\n variant=\"destructive\"\n onConfirm={handleDeactivate}\n />\n </PageLayout>\n </PermissionGuard>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAqFA,IAAMC,KAAmB,OAAO,QAAQC,CAAe,CAAC,CAAC,KACtD,CAACC,GAAOC,QAAY;CACnB;CACA;AACF,EACF,GAEMC,IAA0B;CAC9B;EAAE,OAAO;EAAU,OAAO;CAAkD;CAC5E;EAAE,OAAO;EAAW,OAAO;CAA8C;CACzE;EAAE,OAAO;EAAY,OAAO;CAA4C;AAC1E,GAEMC,KAA8B,CAClC,GAAGD,GACH;CACE,OAAO;CACP,OAAO;AACT,CACF;AAKA,SAASE,GACP,GAGoB;CAEpB,OADKC,IACE;EACL,IAAIA,EAAK;EACT,MAAMA,EAAK;EACX,MAAMA,EAAK;EACX,kBAAkBA,EAAK,oBAAoB,KAAA;EAC3C,aAAaA,EAAK,eAAe,KAAA;EACjC,SAASA,EAAK;EACd,QAAQA,EAAK;EACb,YAAYA,EAAK;EACjB,UAAUA,EAAK;EACf,aAAaA,EAAK;EAClB,yBAAyBA,EAAK,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N,cAAcC;KACd,OACEsB,IACIE,EACEuE,EAAgB,MAAM,KACtBA,EAAgB,MAAM,QACxB,IACA7G,EAAG,mCAAmC,wBAAwB;KAEpE,aACEoC,IACIE,EACEuE,EAAgB,YAAY,KAC5BA,EAAgB,YAAY,UAC5B,EAAE,MAAMjE,EAAI,KAAK,CACnB,IACA5C,EACE,0CACA,wCAAwC4C,EAAI,KAAK,6JACnD;KAEN,cACER,IACIE,EACEuE,EAAgB,OAAO,KACvBA,EAAgB,OAAO,QACzB,IACA7G,EAAG,mCAAmC,wBAAwB;KAEpE,SAAQ;KACR,WAAWsE;IACZ,CAAA;GACS;;CACG,CAAA;AAErB"}
|
|
@@ -1,141 +1,145 @@
|
|
|
1
1
|
import { PageLayout as e, PageSection as t } from "../components/PageLayout.js";
|
|
2
2
|
import { EmptyState as n } from "../components/EmptyState.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useDevportal as r } from "../providers/DevportalProvider.js";
|
|
4
|
+
import { useAcceptInvitationMutation as i, useGetInvitationByTokenQuery as a, useRejectInvitationMutation as o } from "../../generated/global-operations.js";
|
|
5
5
|
import "../hooks/index.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { useTr as s } from "../utils/i18n.js";
|
|
7
|
+
import { CheckCircle as c, Loader2 as l, Mail as u, Shield as d, XCircle as f } from "lucide-react";
|
|
8
|
+
import { useParams as p } from "react-router";
|
|
9
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
9
10
|
// src/devportal/pages/InvitationDecisionPage.tsx
|
|
10
|
-
var
|
|
11
|
-
let { token:
|
|
12
|
-
variables: { token:
|
|
13
|
-
skip: !
|
|
11
|
+
var g = () => {
|
|
12
|
+
let { token: g } = p(), _ = s(), { navigate: v, basePath: y } = r(), { data: b, loading: x, error: S } = a({
|
|
13
|
+
variables: { token: g ?? "" },
|
|
14
|
+
skip: !g,
|
|
14
15
|
fetchPolicy: "cache-and-network"
|
|
15
|
-
}), [
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
return
|
|
21
|
-
title:
|
|
22
|
-
children: /* @__PURE__ */
|
|
16
|
+
}), [C, { loading: w, data: T }] = i(), [E, { loading: D, data: O }] = o(), k = b?.developerOrgInvitationByToken, A = T?.acceptDeveloperOrgInvitation, j = O?.rejectDeveloperOrgInvitation, M = async () => {
|
|
17
|
+
g && await C({ variables: { token: g } });
|
|
18
|
+
}, N = async () => {
|
|
19
|
+
g && await E({ variables: { token: g } });
|
|
20
|
+
}, P = _("devportal.invitation.title", "Developer Team Invitation");
|
|
21
|
+
return x && !k ? /* @__PURE__ */ m(e, {
|
|
22
|
+
title: P,
|
|
23
|
+
children: /* @__PURE__ */ m("div", {
|
|
23
24
|
className: "flex items-center justify-center py-16 text-text-secondary",
|
|
24
|
-
children: /* @__PURE__ */
|
|
25
|
+
children: /* @__PURE__ */ m(l, { className: "h-8 w-8 animate-spin" })
|
|
25
26
|
})
|
|
26
|
-
}) :
|
|
27
|
-
title:
|
|
28
|
-
children: /* @__PURE__ */
|
|
29
|
-
icon: /* @__PURE__ */
|
|
27
|
+
}) : S || !k ? /* @__PURE__ */ m(e, {
|
|
28
|
+
title: P,
|
|
29
|
+
children: /* @__PURE__ */ m(n, {
|
|
30
|
+
icon: /* @__PURE__ */ m(f, {
|
|
30
31
|
size: 32,
|
|
31
32
|
className: "text-status-error-text"
|
|
32
33
|
}),
|
|
33
|
-
title: "Invitation not available",
|
|
34
|
-
description:
|
|
34
|
+
title: _("devportal.invitation.unavailableTitle", "Invitation not available"),
|
|
35
|
+
description: S?.message || _("devportal.invitation.unavailableDescription", "This invitation is invalid, expired, or not available to your signed-in account.")
|
|
35
36
|
})
|
|
36
|
-
}) :
|
|
37
|
-
title: "Invitation accepted",
|
|
38
|
-
children: /* @__PURE__ */
|
|
39
|
-
icon: /* @__PURE__ */
|
|
37
|
+
}) : A ? /* @__PURE__ */ m(e, {
|
|
38
|
+
title: _("devportal.invitation.acceptedTitle", "Invitation accepted"),
|
|
39
|
+
children: /* @__PURE__ */ m(n, {
|
|
40
|
+
icon: /* @__PURE__ */ m(c, {
|
|
40
41
|
size: 32,
|
|
41
42
|
className: "text-status-success-text"
|
|
42
43
|
}),
|
|
43
|
-
title: "You joined the developer organization",
|
|
44
|
-
description:
|
|
45
|
-
|
|
44
|
+
title: _("devportal.invitation.joinedTitle", "You joined the developer organization"),
|
|
45
|
+
description: _("devportal.invitation.joinedDescription", "You now have {{role}} access to {{organization}}.", {
|
|
46
|
+
role: k.role.toLowerCase(),
|
|
47
|
+
organization: k.organization.name
|
|
48
|
+
}),
|
|
49
|
+
action: /* @__PURE__ */ m("button", {
|
|
46
50
|
type: "button",
|
|
47
|
-
onClick: () =>
|
|
51
|
+
onClick: () => v?.(`${y}/organizations/${k.organization.id}`),
|
|
48
52
|
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",
|
|
49
|
-
children: "Open organization"
|
|
53
|
+
children: _("devportal.invitation.openOrganization", "Open organization")
|
|
50
54
|
})
|
|
51
55
|
})
|
|
52
|
-
}) :
|
|
53
|
-
title: "Invitation declined",
|
|
54
|
-
children: /* @__PURE__ */
|
|
55
|
-
icon: /* @__PURE__ */
|
|
56
|
+
}) : j ? /* @__PURE__ */ m(e, {
|
|
57
|
+
title: _("devportal.invitation.declinedTitle", "Invitation declined"),
|
|
58
|
+
children: /* @__PURE__ */ m(n, {
|
|
59
|
+
icon: /* @__PURE__ */ m(f, {
|
|
56
60
|
size: 32,
|
|
57
61
|
className: "text-status-warning-text"
|
|
58
62
|
}),
|
|
59
|
-
title: "Invitation declined",
|
|
60
|
-
description:
|
|
61
|
-
action: /* @__PURE__ */
|
|
63
|
+
title: _("devportal.invitation.declinedTitle", "Invitation declined"),
|
|
64
|
+
description: _("devportal.invitation.declinedDescription", "You declined the invitation to join {{organization}}.", { organization: k.organization.name }),
|
|
65
|
+
action: /* @__PURE__ */ m("button", {
|
|
62
66
|
type: "button",
|
|
63
|
-
onClick: () =>
|
|
67
|
+
onClick: () => v?.(`${y}`),
|
|
64
68
|
className: "inline-flex items-center gap-2 rounded-md border border-border-seam px-4 py-2 text-sm font-medium hover:bg-bg-sunken",
|
|
65
|
-
children: "Return to Devportal"
|
|
69
|
+
children: _("devportal.invitation.returnToDevportal", "Return to Devportal")
|
|
66
70
|
})
|
|
67
71
|
})
|
|
68
|
-
}) : /* @__PURE__ */
|
|
69
|
-
title:
|
|
70
|
-
description: "Review your invitation to join a developer organization",
|
|
71
|
-
children: /* @__PURE__ */
|
|
72
|
+
}) : /* @__PURE__ */ m(e, {
|
|
73
|
+
title: P,
|
|
74
|
+
description: _("devportal.invitation.reviewDescription", "Review your invitation to join a developer organization"),
|
|
75
|
+
children: /* @__PURE__ */ h("div", {
|
|
72
76
|
className: "mx-auto max-w-2xl space-y-6",
|
|
73
|
-
children: [/* @__PURE__ */
|
|
74
|
-
title: "Invitation details",
|
|
75
|
-
children: /* @__PURE__ */
|
|
77
|
+
children: [/* @__PURE__ */ m(t, {
|
|
78
|
+
title: _("devportal.invitation.detailsTitle", "Invitation details"),
|
|
79
|
+
children: /* @__PURE__ */ h("div", {
|
|
76
80
|
className: "rounded-card border border-border-seam bg-bg-surface p-6 space-y-4",
|
|
77
81
|
children: [
|
|
78
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
|
|
79
83
|
className: "text-sm text-text-secondary",
|
|
80
|
-
children: "Organization"
|
|
81
|
-
}), /* @__PURE__ */
|
|
84
|
+
children: _("devportal.invitation.organization", "Organization")
|
|
85
|
+
}), /* @__PURE__ */ m("p", {
|
|
82
86
|
className: "text-lg font-semibold text-text-primary",
|
|
83
|
-
children:
|
|
87
|
+
children: k.organization.name
|
|
84
88
|
})] }),
|
|
85
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ h("div", {
|
|
86
90
|
className: "grid gap-4 sm:grid-cols-2",
|
|
87
|
-
children: [/* @__PURE__ */
|
|
91
|
+
children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
|
|
88
92
|
className: "text-sm text-text-secondary",
|
|
89
|
-
children: "Invited email"
|
|
90
|
-
}), /* @__PURE__ */
|
|
93
|
+
children: _("devportal.invitation.invitedEmail", "Invited email")
|
|
94
|
+
}), /* @__PURE__ */ h("p", {
|
|
91
95
|
className: "flex items-center gap-2 text-text-primary",
|
|
92
|
-
children: [/* @__PURE__ */
|
|
93
|
-
})] }), /* @__PURE__ */
|
|
96
|
+
children: [/* @__PURE__ */ m(u, { size: 14 }), k.invitedEmail]
|
|
97
|
+
})] }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
|
|
94
98
|
className: "text-sm text-text-secondary",
|
|
95
|
-
children: "Role"
|
|
96
|
-
}), /* @__PURE__ */
|
|
99
|
+
children: _("devportal.invitation.role", "Role")
|
|
100
|
+
}), /* @__PURE__ */ h("p", {
|
|
97
101
|
className: "flex items-center gap-2 text-text-primary",
|
|
98
|
-
children: [/* @__PURE__ */
|
|
102
|
+
children: [/* @__PURE__ */ m(d, { size: 14 }), k.role]
|
|
99
103
|
})] })]
|
|
100
104
|
}),
|
|
101
|
-
|
|
105
|
+
k.message ? /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
|
|
102
106
|
className: "text-sm text-text-secondary",
|
|
103
|
-
children: "Message"
|
|
104
|
-
}), /* @__PURE__ */
|
|
107
|
+
children: _("devportal.invitation.message", "Message")
|
|
108
|
+
}), /* @__PURE__ */ m("p", {
|
|
105
109
|
className: "rounded-md bg-bg-sunken px-3 py-2 text-sm text-text-primary whitespace-pre-line",
|
|
106
|
-
children:
|
|
110
|
+
children: k.message
|
|
107
111
|
})] }) : null,
|
|
108
112
|
/* @__PURE__ */ m("p", {
|
|
109
113
|
className: "text-xs text-text-secondary",
|
|
110
|
-
children:
|
|
114
|
+
children: _("devportal.invitation.expiresOn", "Expires on {{date}}", { date: new Date(k.expiresAt).toLocaleString() })
|
|
111
115
|
})
|
|
112
116
|
]
|
|
113
117
|
})
|
|
114
|
-
}), /* @__PURE__ */
|
|
118
|
+
}), /* @__PURE__ */ h("div", {
|
|
115
119
|
className: "flex flex-wrap gap-3 justify-end",
|
|
116
|
-
children: [/* @__PURE__ */
|
|
120
|
+
children: [/* @__PURE__ */ h("button", {
|
|
117
121
|
type: "button",
|
|
118
|
-
onClick: () => void
|
|
119
|
-
disabled:
|
|
122
|
+
onClick: () => void N(),
|
|
123
|
+
disabled: w || D,
|
|
120
124
|
className: "inline-flex items-center gap-2 rounded-md border border-border-seam px-4 py-2 text-sm font-medium hover:bg-bg-sunken disabled:opacity-50",
|
|
121
|
-
children: [
|
|
125
|
+
children: [D ? /* @__PURE__ */ m(l, {
|
|
122
126
|
size: 14,
|
|
123
127
|
className: "animate-spin"
|
|
124
|
-
}) : null, "Decline"]
|
|
125
|
-
}), /* @__PURE__ */
|
|
128
|
+
}) : null, _("devportal.invitation.decline", "Decline")]
|
|
129
|
+
}), /* @__PURE__ */ h("button", {
|
|
126
130
|
type: "button",
|
|
127
|
-
onClick: () => void
|
|
128
|
-
disabled:
|
|
131
|
+
onClick: () => void M(),
|
|
132
|
+
disabled: w || D,
|
|
129
133
|
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 disabled:opacity-50",
|
|
130
|
-
children: [
|
|
134
|
+
children: [w ? /* @__PURE__ */ m(l, {
|
|
131
135
|
size: 14,
|
|
132
136
|
className: "animate-spin"
|
|
133
|
-
}) : null, "Accept invitation"]
|
|
137
|
+
}) : null, _("devportal.invitation.accept", "Accept invitation")]
|
|
134
138
|
})]
|
|
135
139
|
})]
|
|
136
140
|
})
|
|
137
141
|
});
|
|
138
142
|
};
|
|
139
|
-
export {
|
|
143
|
+
export { g as InvitationDecisionPage };
|
|
140
144
|
|
|
141
145
|
//# sourceMappingURL=InvitationDecisionPage.js.map
|