betterstart-cli 0.0.108 → 0.0.110
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/assets/adapters/next/templates/init/admin-globals.css +1 -1
- package/dist/assets/adapters/next/templates/init/components/layouts/{admin-sidebar-branding-rsc.tsx → admin-sidebar-branding.tsx} +1 -1
- package/dist/assets/adapters/next/templates/init/components/layouts/admin-sidebar.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/components/layouts/role-gate.tsx +14 -0
- package/dist/assets/adapters/next/templates/init/components/shared/media/edit-media-dialog-content.tsx +1 -0
- package/dist/assets/adapters/next/templates/init/components/shared/media/media-url-importer.tsx +89 -78
- package/dist/assets/adapters/next/templates/init/components/shared/search-input.tsx +5 -1
- package/dist/assets/adapters/next/templates/init/pages/account-layout.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/pages/{account-shell-rsc.tsx → account-shell.tsx} +1 -1
- package/dist/assets/adapters/next/templates/init/pages/{auth-gate-rsc.tsx → auth-gate.tsx} +1 -1
- package/dist/assets/adapters/next/templates/init/pages/authenticated-layout.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/pages/forgot-password-form.tsx +41 -36
- package/dist/assets/adapters/next/templates/init/pages/login-form.tsx +94 -70
- package/dist/assets/adapters/next/templates/init/pages/{login-page-rsc.tsx → login-page-content.tsx} +1 -1
- package/dist/assets/adapters/next/templates/init/pages/login-page.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/pages/profile/profile-form.tsx +7 -7
- package/dist/assets/adapters/next/templates/init/pages/profile/profile-page-content.tsx +31 -0
- package/dist/assets/adapters/next/templates/init/pages/profile/profile-page-skeleton.tsx +9 -0
- package/dist/assets/adapters/next/templates/init/pages/profile/profile-page.tsx +7 -27
- package/dist/assets/adapters/next/templates/init/pages/reset-password-form.tsx +86 -67
- package/dist/assets/adapters/next/templates/init/pages/settings/audit-log/audit-log-page.tsx +6 -5
- package/dist/assets/adapters/next/templates/init/pages/settings/forms/form-notifications-drawer.tsx +1 -0
- package/dist/assets/adapters/next/templates/init/pages/settings/forms/forms-settings-page.tsx +6 -5
- package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhook-endpoint-dialog.tsx +26 -8
- package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-logs-page.tsx +6 -5
- package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-page.tsx +6 -5
- package/dist/assets/adapters/next/templates/init/pages/users/change-password-dialog.tsx +8 -10
- package/dist/assets/adapters/next/templates/init/pages/users/create-user-dialog.tsx +8 -5
- package/dist/assets/adapters/next/templates/init/pages/users/delete-user-dialog.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/users/edit-role-dialog.tsx +76 -33
- package/dist/assets/shared-assets/react-admin/ui/input-group.tsx +6 -0
- package/dist/cli.js +337 -202
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -15031,15 +15031,13 @@ function generateDatabase(schema, dbDir, options = {}, relatedSchemas = /* @__PU
|
|
|
15031
15031
|
}
|
|
15032
15032
|
|
|
15033
15033
|
// adapters/next/templates/renderers/generators/edit-page.ts
|
|
15034
|
-
function
|
|
15034
|
+
function renderEditPageShellTemplate({
|
|
15035
15035
|
singular,
|
|
15036
|
-
|
|
15037
|
-
kebabName,
|
|
15038
|
-
camelSingular
|
|
15036
|
+
kebabSingular
|
|
15039
15037
|
}) {
|
|
15040
|
-
return `import
|
|
15041
|
-
import {
|
|
15042
|
-
import { ${singular}
|
|
15038
|
+
return `import * as React from 'react'
|
|
15039
|
+
import { Edit${singular}PageContent } from './edit-${kebabSingular}-page-content'
|
|
15040
|
+
import { Edit${singular}PageSkeleton } from './edit-${kebabSingular}-page-skeleton'
|
|
15043
15041
|
|
|
15044
15042
|
interface PageProps {
|
|
15045
15043
|
params: Promise<{
|
|
@@ -15047,7 +15045,26 @@ interface PageProps {
|
|
|
15047
15045
|
}>
|
|
15048
15046
|
}
|
|
15049
15047
|
|
|
15050
|
-
export default
|
|
15048
|
+
export default function Edit${singular}Page({ params }: PageProps) {
|
|
15049
|
+
return (
|
|
15050
|
+
<React.Suspense fallback={<Edit${singular}PageSkeleton />}>
|
|
15051
|
+
<Edit${singular}PageContent params={params} />
|
|
15052
|
+
</React.Suspense>
|
|
15053
|
+
)
|
|
15054
|
+
}
|
|
15055
|
+
`;
|
|
15056
|
+
}
|
|
15057
|
+
function renderEditPageContentTemplate({
|
|
15058
|
+
singular,
|
|
15059
|
+
actionImportPath,
|
|
15060
|
+
kebabName,
|
|
15061
|
+
camelSingular
|
|
15062
|
+
}) {
|
|
15063
|
+
return `import { notFound } from 'next/navigation'
|
|
15064
|
+
import { get${singular}ById } from '@admin/actions/${actionImportPath}'
|
|
15065
|
+
import { ${singular}Form } from '../../${kebabName}-form'
|
|
15066
|
+
|
|
15067
|
+
export async function Edit${singular}PageContent({ params }: { params: Promise<{ id: string }> }) {
|
|
15051
15068
|
const { id } = await params
|
|
15052
15069
|
const ${camelSingular} = await get${singular}ById(id)
|
|
15053
15070
|
|
|
@@ -15059,6 +15076,23 @@ export default async function Edit${singular}Page({ params }: PageProps) {
|
|
|
15059
15076
|
}
|
|
15060
15077
|
`;
|
|
15061
15078
|
}
|
|
15079
|
+
function renderEditPageFiles({
|
|
15080
|
+
singular,
|
|
15081
|
+
actionImportPath,
|
|
15082
|
+
kebabName,
|
|
15083
|
+
kebabSingular,
|
|
15084
|
+
camelSingular
|
|
15085
|
+
}) {
|
|
15086
|
+
return {
|
|
15087
|
+
page: renderEditPageShellTemplate({ singular, kebabSingular }),
|
|
15088
|
+
content: renderEditPageContentTemplate({
|
|
15089
|
+
singular,
|
|
15090
|
+
actionImportPath,
|
|
15091
|
+
kebabName,
|
|
15092
|
+
camelSingular
|
|
15093
|
+
})
|
|
15094
|
+
};
|
|
15095
|
+
}
|
|
15062
15096
|
|
|
15063
15097
|
// adapters/next/generators/edit-page.ts
|
|
15064
15098
|
function generateEditPage(schema, pagesDir, options = {}) {
|
|
@@ -15066,15 +15100,24 @@ function generateEditPage(schema, pagesDir, options = {}) {
|
|
|
15066
15100
|
const Singular = toPascalCase(singular);
|
|
15067
15101
|
const camelSingular = toCamelCase(singular);
|
|
15068
15102
|
const kebabName = toKebabCase(schema.name);
|
|
15103
|
+
const kebabSingular = toKebabCase(singular);
|
|
15069
15104
|
const actionImportPath = resolveSchemaActionImportPath(schema.name, options.outputNamespace);
|
|
15070
|
-
const
|
|
15105
|
+
const displayNouns = resolveDisplayNouns(schema);
|
|
15106
|
+
const { page, content } = renderEditPageFiles({
|
|
15071
15107
|
singular: Singular,
|
|
15072
15108
|
actionImportPath,
|
|
15073
15109
|
kebabName,
|
|
15110
|
+
kebabSingular,
|
|
15074
15111
|
camelSingular
|
|
15075
15112
|
});
|
|
15113
|
+
const skeleton = buildLoadingSkeletonSource(`Edit${Singular}PageSkeleton`, displayNouns.singular);
|
|
15114
|
+
const editDir = `${pagesDir}/${schema.name}/[id]/edit`;
|
|
15076
15115
|
return {
|
|
15077
|
-
files: [
|
|
15116
|
+
files: [
|
|
15117
|
+
createGeneratedFile(`${editDir}/page.tsx`, page),
|
|
15118
|
+
createGeneratedFile(`${editDir}/edit-${kebabSingular}-page-content.tsx`, content),
|
|
15119
|
+
createGeneratedFile(`${editDir}/edit-${kebabSingular}-page-skeleton.tsx`, skeleton)
|
|
15120
|
+
]
|
|
15078
15121
|
};
|
|
15079
15122
|
}
|
|
15080
15123
|
|
|
@@ -16117,9 +16160,11 @@ ${contentStateDestructure}
|
|
|
16117
16160
|
} = state
|
|
16118
16161
|
${contentSidebarVisibilityState}
|
|
16119
16162
|
return (
|
|
16120
|
-
<
|
|
16121
|
-
${
|
|
16122
|
-
|
|
16163
|
+
<Form {...form}>
|
|
16164
|
+
<form autoComplete="off" id="${schemaName}-form" onSubmit={form.handleSubmit((values) => onSubmit(values${hasDraftInitialData}), handleErrors)} ${topLevelTabsFieldClassName}>
|
|
16165
|
+
${formBodyJsx}
|
|
16166
|
+
</form>
|
|
16167
|
+
</Form>
|
|
16123
16168
|
)
|
|
16124
16169
|
}
|
|
16125
16170
|
`;
|
|
@@ -16345,7 +16390,7 @@ ${defaultValues}
|
|
|
16345
16390
|
|
|
16346
16391
|
const form = useForm<FormValues>({
|
|
16347
16392
|
resolver: standardSchemaResolver(formSchema),
|
|
16348
|
-
mode: '
|
|
16393
|
+
mode: 'onChange',
|
|
16349
16394
|
reValidateMode: 'onChange',
|
|
16350
16395
|
defaultValues
|
|
16351
16396
|
})
|
|
@@ -16522,16 +16567,12 @@ function renderFormTabContentDetailsTemplate({
|
|
|
16522
16567
|
contentComponentName
|
|
16523
16568
|
}) {
|
|
16524
16569
|
return ` <TabsContent value="${tabName}" className="h-full min-h-0 w-full flex-1">
|
|
16525
|
-
|
|
16526
|
-
<${contentComponentName} state={entityForm} tab="${tabName}" />
|
|
16527
|
-
</Form>
|
|
16570
|
+
<${contentComponentName} state={entityForm} tab="${tabName}" />
|
|
16528
16571
|
</TabsContent>`;
|
|
16529
16572
|
}
|
|
16530
16573
|
function renderEntityFormBody({ contentComponentName }) {
|
|
16531
16574
|
return ` <main className="w-full p-4 h-full">
|
|
16532
|
-
|
|
16533
|
-
<${contentComponentName} state={entityForm} />
|
|
16534
|
-
</Form>
|
|
16575
|
+
<${contentComponentName} state={entityForm} />
|
|
16535
16576
|
</main>`;
|
|
16536
16577
|
}
|
|
16537
16578
|
function renderEntityFormPage({
|
|
@@ -16557,7 +16598,6 @@ function renderEntityFormPage({
|
|
|
16557
16598
|
${showMetadataWidgetScrollThresholdImport}
|
|
16558
16599
|
${topLevelTabIconNamesLucide}
|
|
16559
16600
|
import { Button } from '@admin/components/ui/button'
|
|
16560
|
-
import { Form } from '@admin/components/ui/form'
|
|
16561
16601
|
${topLevelTabsFieldTabs}import { PageHeader } from '@admin/components/shared/page-header'${showMetadataWidgetEntityMetadataImport}
|
|
16562
16602
|
import type { ${singular} } from '@admin/actions/${actionImportPath}'
|
|
16563
16603
|
${showMetadataWidgetAdmin}
|
|
@@ -16718,7 +16758,8 @@ function buildEntityFormArtifacts({
|
|
|
16718
16758
|
});
|
|
16719
16759
|
const shellBody = topLevelTabsField ? topLevelTabsShell : defaultShellBody;
|
|
16720
16760
|
const topLevelTabComponentImports = topLevelTabComponents.map((spec) => `import { ${spec.componentName} } from './${spec.fileBaseName}'`).join("\n");
|
|
16721
|
-
const contentImports = topLevelTabsField ? `import
|
|
16761
|
+
const contentImports = topLevelTabsField ? `import { Form } from '@admin/components/ui/form'
|
|
16762
|
+
import type { TabValue, ${hookName} } from '${hookImportPath}'${topLevelTabComponentImports ? `
|
|
16722
16763
|
${topLevelTabComponentImports}` : ""}` : renderEntityFormContentRenderer({
|
|
16723
16764
|
kind: "renderFormContentLucideTemplate",
|
|
16724
16765
|
props: {
|
|
@@ -18705,6 +18746,7 @@ ${indent} ) : null}`;
|
|
|
18705
18746
|
function renderMultiSelectFieldActionButtonsSerializedValueTemplate({
|
|
18706
18747
|
indent,
|
|
18707
18748
|
fieldName,
|
|
18749
|
+
optionsId,
|
|
18708
18750
|
optionsDeclaration,
|
|
18709
18751
|
createState,
|
|
18710
18752
|
previewLimit,
|
|
@@ -18747,6 +18789,7 @@ ${indent} type="button"
|
|
|
18747
18789
|
${indent} variant="outline"
|
|
18748
18790
|
${indent} role="combobox"
|
|
18749
18791
|
${indent} aria-expanded={${openVar}}
|
|
18792
|
+
${indent} aria-controls="${optionsId}"
|
|
18750
18793
|
${indent} className={cn("w-full justify-between gap-2", {
|
|
18751
18794
|
${indent} "text-muted-foreground": selectedOptions.length === 0
|
|
18752
18795
|
${indent} })}
|
|
@@ -18788,7 +18831,7 @@ ${indent} </Button>
|
|
|
18788
18831
|
${indent} </FormControl>
|
|
18789
18832
|
${indent} }
|
|
18790
18833
|
${indent} />
|
|
18791
|
-
${indent} <PopoverContent className="w-(--anchor-width) p-0" align="start">
|
|
18834
|
+
${indent} <PopoverContent id="${optionsId}" className="w-(--anchor-width) p-0" align="start">
|
|
18792
18835
|
${indent} <Command>
|
|
18793
18836
|
${indent} ${searchInput}
|
|
18794
18837
|
${indent} <CommandList>
|
|
@@ -18858,6 +18901,7 @@ function renderMultiSelectField(field, indent, label, hintJSX, context) {
|
|
|
18858
18901
|
const placeholder = field.placeholder || `Select ${label.toLowerCase()}`;
|
|
18859
18902
|
const previewLimit = Math.max(1, Math.floor(field.previewLimit ?? 1));
|
|
18860
18903
|
const lowerLabel = label.toLowerCase();
|
|
18904
|
+
const optionsId = `${context.schemaName ? `${toKebabCase(singularize(context.schemaName))}-` : ""}${toKebabCase(field.name)}-options`;
|
|
18861
18905
|
const optionsDeclaration = isCreatable ? `const options = ${optionsVar}` : renderMultiSelectFieldRenderer({
|
|
18862
18906
|
kind: "renderMultiSelectFieldStaticOptionsTemplate",
|
|
18863
18907
|
props: {
|
|
@@ -18896,6 +18940,7 @@ ${indent} ${setSearchVar}('')` : "";
|
|
|
18896
18940
|
props: {
|
|
18897
18941
|
indent,
|
|
18898
18942
|
fieldName: field.name,
|
|
18943
|
+
optionsId,
|
|
18899
18944
|
optionsDeclaration,
|
|
18900
18945
|
createState,
|
|
18901
18946
|
previewLimit,
|
|
@@ -19210,6 +19255,7 @@ function buildEntityFormLayout({
|
|
|
19210
19255
|
(tabField) => generateFieldJSX2(tabField, `${cardFieldIndent} `, {
|
|
19211
19256
|
creatableSelectFieldNames,
|
|
19212
19257
|
defaultValueFromSourceNames,
|
|
19258
|
+
schemaName,
|
|
19213
19259
|
...childContext
|
|
19214
19260
|
})
|
|
19215
19261
|
).filter(Boolean).join("\n");
|
|
@@ -19256,6 +19302,7 @@ function buildEntityFormLayout({
|
|
|
19256
19302
|
return generateFieldJSX2(field, cardFieldIndent, {
|
|
19257
19303
|
creatableSelectFieldNames,
|
|
19258
19304
|
defaultValueFromSourceNames,
|
|
19305
|
+
schemaName,
|
|
19259
19306
|
slotFilter: "main"
|
|
19260
19307
|
});
|
|
19261
19308
|
};
|
|
@@ -19263,7 +19310,8 @@ function buildEntityFormLayout({
|
|
|
19263
19310
|
if (field.type === "tabs") return renderNestedTabsField(field);
|
|
19264
19311
|
return generateFieldJSX2(field, cardFieldIndent, {
|
|
19265
19312
|
creatableSelectFieldNames,
|
|
19266
|
-
defaultValueFromSourceNames
|
|
19313
|
+
defaultValueFromSourceNames,
|
|
19314
|
+
schemaName
|
|
19267
19315
|
});
|
|
19268
19316
|
};
|
|
19269
19317
|
const renderConditionalSidebarEntry = ({
|
|
@@ -19371,6 +19419,7 @@ function buildEntityFormLayout({
|
|
|
19371
19419
|
(field) => generateFieldJSX2(field, cardFieldIndent, {
|
|
19372
19420
|
creatableSelectFieldNames,
|
|
19373
19421
|
defaultValueFromSourceNames,
|
|
19422
|
+
schemaName,
|
|
19374
19423
|
slotFilter: "main"
|
|
19375
19424
|
})
|
|
19376
19425
|
).filter(Boolean).join("\n");
|
|
@@ -19705,7 +19754,7 @@ function generateForm(schema, pagesDir, options = {}) {
|
|
|
19705
19754
|
hasNestedObjectList,
|
|
19706
19755
|
hasCardContent: true,
|
|
19707
19756
|
hasSectionCardHeading,
|
|
19708
|
-
hasFormRoot:
|
|
19757
|
+
hasFormRoot: true,
|
|
19709
19758
|
hasButton: hasRelationship || hasSelectCombobox || hasNestedList,
|
|
19710
19759
|
hasFormControls: contentUsesFormControls || contentHasRenderedIconPostfix,
|
|
19711
19760
|
hasInput: contentUsesInput
|
|
@@ -22400,37 +22449,24 @@ function renderSingleFormImportsTemplate({ map }) {
|
|
|
22400
22449
|
${map}
|
|
22401
22450
|
} from '@admin/components/ui/card'`;
|
|
22402
22451
|
}
|
|
22403
|
-
function
|
|
22404
|
-
|
|
22405
|
-
|
|
22406
|
-
|
|
22407
|
-
|
|
22408
|
-
|
|
22409
|
-
|
|
22410
|
-
|
|
22411
|
-
|
|
22452
|
+
function renderSingleFormCardModuleTemplate({
|
|
22453
|
+
imports,
|
|
22454
|
+
content
|
|
22455
|
+
}) {
|
|
22456
|
+
return `'use client'
|
|
22457
|
+
${imports}
|
|
22458
|
+
|
|
22459
|
+
${content}
|
|
22460
|
+
`;
|
|
22461
|
+
}
|
|
22462
|
+
function renderSingleFormEntryModuleTemplate({
|
|
22412
22463
|
singular,
|
|
22413
|
-
hasCreatableSelectContent,
|
|
22414
22464
|
actionImportPath,
|
|
22415
|
-
|
|
22416
|
-
joinText,
|
|
22465
|
+
cardImports,
|
|
22417
22466
|
cardRenders
|
|
22418
22467
|
}) {
|
|
22419
|
-
return `
|
|
22420
|
-
${
|
|
22421
|
-
import { standardSchemaResolver } from '@hookform/resolvers/standard-schema'
|
|
22422
|
-
import { useMutation, ${hasCreatableSelectUseQuery}useQueryClient } from '@tanstack/react-query'${lucideIconsLucide}
|
|
22423
|
-
import {${hasNestedListUseFieldArray} useForm } from 'react-hook-form'
|
|
22424
|
-
import { toast } from 'sonner'
|
|
22425
|
-
import { z } from 'zod/v3'${hasTabsFieldImport}${hasRelationshipImport}
|
|
22426
|
-
${relHookImportsContent}${join}
|
|
22427
|
-
import type {
|
|
22428
|
-
${singular},
|
|
22429
|
-
${hasCreatableSelectContent}${singular}UpsertInput
|
|
22430
|
-
} from '@admin/actions/${actionImportPath}'
|
|
22431
|
-
import { ${hasCreatableSelectContentText}upsert${singular} } from '@admin/actions/${actionImportPath}'
|
|
22432
|
-
|
|
22433
|
-
${joinText}
|
|
22468
|
+
return `import type { ${singular} } from '@admin/actions/${actionImportPath}'
|
|
22469
|
+
${cardImports}
|
|
22434
22470
|
|
|
22435
22471
|
interface ${singular}FormProps {
|
|
22436
22472
|
initialData?: ${singular} | null
|
|
@@ -22449,8 +22485,10 @@ function renderSingleFormRenderer(request) {
|
|
|
22449
22485
|
switch (request.kind) {
|
|
22450
22486
|
case "renderSingleFormImportsTemplate":
|
|
22451
22487
|
return renderSingleFormImportsTemplate(request.props);
|
|
22452
|
-
case "
|
|
22453
|
-
return
|
|
22488
|
+
case "renderSingleFormCardModuleTemplate":
|
|
22489
|
+
return renderSingleFormCardModuleTemplate(request.props);
|
|
22490
|
+
case "renderSingleFormEntryModuleTemplate":
|
|
22491
|
+
return renderSingleFormEntryModuleTemplate(request.props);
|
|
22454
22492
|
}
|
|
22455
22493
|
throw new Error("Unsupported renderer request");
|
|
22456
22494
|
}
|
|
@@ -22536,12 +22574,12 @@ ${zodFields}
|
|
|
22536
22574
|
})
|
|
22537
22575
|
${tabParserConst}
|
|
22538
22576
|
|
|
22539
|
-
function ${groupComponentName}({ initialData }: { initialData?: ${singular} | null }) {
|
|
22577
|
+
export function ${groupComponentName}({ initialData }: { initialData?: ${singular} | null }) {
|
|
22540
22578
|
const queryClient = useQueryClient()${analysisHasTabsFieldTab}${relStateContent}${creatableSelectStateContent}${selectStateContent}
|
|
22541
22579
|
|
|
22542
22580
|
const form = useForm<z.infer<typeof ${groupVarPrefix}Schema>>({
|
|
22543
22581
|
resolver: standardSchemaResolver(${groupVarPrefix}Schema),
|
|
22544
|
-
mode: '
|
|
22582
|
+
mode: 'onChange',
|
|
22545
22583
|
reValidateMode: 'onChange',
|
|
22546
22584
|
defaultValues: {
|
|
22547
22585
|
${defaultValues}
|
|
@@ -22571,7 +22609,7 @@ ${fieldArrayHooksContent}
|
|
|
22571
22609
|
${creatableSelectHandlersContent}
|
|
22572
22610
|
return (
|
|
22573
22611
|
<Form {...form}>
|
|
22574
|
-
<form onSubmit={form.handleSubmit((values) => {
|
|
22612
|
+
<form autoComplete="off" onSubmit={form.handleSubmit((values) => {
|
|
22575
22613
|
mutation.mutate(values as ${singular}UpsertInput)
|
|
22576
22614
|
})}>
|
|
22577
22615
|
<Card >
|
|
@@ -22805,7 +22843,7 @@ function renderSingleFormBuildGroupFieldsJsxRenderer(request) {
|
|
|
22805
22843
|
}
|
|
22806
22844
|
|
|
22807
22845
|
// adapters/next/generators/form/form-single/build-group-fields-jsx.ts
|
|
22808
|
-
function buildGroupFieldsJSX(group2, analysis, defaultValueFromSourceNames, creatableSelectFieldNames) {
|
|
22846
|
+
function buildGroupFieldsJSX(group2, analysis, defaultValueFromSourceNames, creatableSelectFieldNames, schemaName) {
|
|
22809
22847
|
const indent = " ";
|
|
22810
22848
|
return group2.fields.map((f) => {
|
|
22811
22849
|
if (f.type === "tabs" && f.tabs) {
|
|
@@ -22814,7 +22852,8 @@ function buildGroupFieldsJSX(group2, analysis, defaultValueFromSourceNames, crea
|
|
|
22814
22852
|
const tabFields = (t.fields || []).map(
|
|
22815
22853
|
(tf) => generateFieldJSX2(tf, " ", {
|
|
22816
22854
|
creatableSelectFieldNames,
|
|
22817
|
-
defaultValueFromSourceNames
|
|
22855
|
+
defaultValueFromSourceNames,
|
|
22856
|
+
schemaName
|
|
22818
22857
|
})
|
|
22819
22858
|
).join("\n");
|
|
22820
22859
|
return renderSingleFormBuildGroupFieldsJsxRenderer({
|
|
@@ -22838,7 +22877,8 @@ function buildGroupFieldsJSX(group2, analysis, defaultValueFromSourceNames, crea
|
|
|
22838
22877
|
if (analysis.tabFieldNames.has(f.name)) return "";
|
|
22839
22878
|
return generateFieldJSX2(f, indent, {
|
|
22840
22879
|
creatableSelectFieldNames,
|
|
22841
|
-
defaultValueFromSourceNames
|
|
22880
|
+
defaultValueFromSourceNames,
|
|
22881
|
+
schemaName
|
|
22842
22882
|
});
|
|
22843
22883
|
}).filter(Boolean).join("\n");
|
|
22844
22884
|
}
|
|
@@ -22880,7 +22920,8 @@ function generateCardComponent(group2, schema, analysis, allFlatFields) {
|
|
|
22880
22920
|
group2,
|
|
22881
22921
|
analysis,
|
|
22882
22922
|
defaultValueFromSourceNames,
|
|
22883
|
-
creatableSelectFieldNames
|
|
22923
|
+
creatableSelectFieldNames,
|
|
22924
|
+
schema.name
|
|
22884
22925
|
);
|
|
22885
22926
|
const relState = buildGroupRelState(analysis);
|
|
22886
22927
|
const selectState = buildGroupSelectState(
|
|
@@ -23043,135 +23084,179 @@ function generateSingleForm(schema, pagesDir, options = {}) {
|
|
|
23043
23084
|
(f) => !f.primaryKey && f.name !== "createdAt" && f.name !== "updatedAt" && !isAuthorshipFieldName(f.name)
|
|
23044
23085
|
);
|
|
23045
23086
|
const cardGroups = parseCardGroups(allFormFields, schema.label);
|
|
23046
|
-
const hasBoolean = hasFieldType(schema.fields, "boolean");
|
|
23047
|
-
const hasImage = hasFieldType(schema.fields, "image");
|
|
23048
|
-
const hasVideo = hasFieldType(schema.fields, "video");
|
|
23049
|
-
const hasMedia = hasFieldType(schema.fields, "media");
|
|
23050
|
-
const hasGallery = hasFieldType(schema.fields, "gallery");
|
|
23051
|
-
const hasIcon = hasFieldType(schema.fields, "icon");
|
|
23052
|
-
const hasIconPostfix = hasRenderedIconPostfix(allFormFields);
|
|
23053
|
-
const hasDate = hasFieldType(schema.fields, "date");
|
|
23054
23087
|
const flatFields = flattenFields(allFormFields);
|
|
23055
|
-
const
|
|
23056
|
-
|
|
23057
|
-
|
|
23058
|
-
|
|
23059
|
-
|
|
23060
|
-
|
|
23061
|
-
|
|
23062
|
-
|
|
23063
|
-
|
|
23064
|
-
|
|
23065
|
-
|
|
23066
|
-
|
|
23067
|
-
|
|
23068
|
-
|
|
23069
|
-
|
|
23070
|
-
|
|
23071
|
-
|
|
23072
|
-
|
|
23073
|
-
)
|
|
23074
|
-
|
|
23075
|
-
|
|
23076
|
-
|
|
23077
|
-
|
|
23078
|
-
|
|
23079
|
-
|
|
23080
|
-
|
|
23081
|
-
|
|
23088
|
+
const inputFreeFieldTypes = /* @__PURE__ */ new Set([
|
|
23089
|
+
"boolean",
|
|
23090
|
+
"image",
|
|
23091
|
+
"video",
|
|
23092
|
+
"media",
|
|
23093
|
+
"gallery",
|
|
23094
|
+
"icon",
|
|
23095
|
+
"date",
|
|
23096
|
+
"select",
|
|
23097
|
+
"richtext",
|
|
23098
|
+
"markdown",
|
|
23099
|
+
"text",
|
|
23100
|
+
"relationship",
|
|
23101
|
+
"list",
|
|
23102
|
+
"separator",
|
|
23103
|
+
"tabs"
|
|
23104
|
+
]);
|
|
23105
|
+
const formControlFreeFieldTypes = /* @__PURE__ */ new Set(["separator", "tabs"]);
|
|
23106
|
+
const cardArtifacts = cardGroups.map((group2) => {
|
|
23107
|
+
const analysis = analyzeGroup(group2.fields);
|
|
23108
|
+
const groupFlatFields = group2.flatFields;
|
|
23109
|
+
const creatableSelectFields = groupFlatFields.filter(
|
|
23110
|
+
(field) => field.type === "select" && field.creatable === true
|
|
23111
|
+
);
|
|
23112
|
+
const hasCreatableSelect = creatableSelectFields.length > 0;
|
|
23113
|
+
const hasMultiSelect = analysis.multiSelectFields.length > 0;
|
|
23114
|
+
const hasRelationship = analysis.relFields.length > 0;
|
|
23115
|
+
const hasSelectCombobox = hasRelationship || hasMultiSelect || hasCreatableSelect;
|
|
23116
|
+
const hasSelect = groupFlatFields.some(
|
|
23117
|
+
(field) => field.type === "select" && field.multiple !== true && field.creatable !== true
|
|
23118
|
+
);
|
|
23119
|
+
const hasIconPostfix = hasRenderedIconPostfix(group2.fields);
|
|
23120
|
+
const hasNestedList = analysis.listFieldsWithNested.length > 0;
|
|
23121
|
+
const hasInput = analysis.listFieldsWithNested.some(
|
|
23122
|
+
(field) => field.fields?.some(
|
|
23123
|
+
(nestedField) => !["boolean", "image", "video", "media"].includes(nestedField.type)
|
|
23124
|
+
)
|
|
23125
|
+
) || groupFlatFields.some(
|
|
23126
|
+
(field) => !field.primaryKey && !field.hidden && !inputFreeFieldTypes.has(field.type)
|
|
23127
|
+
);
|
|
23128
|
+
const hasFormControls = groupFlatFields.some((field) => {
|
|
23129
|
+
if (field.primaryKey || field.hidden) return false;
|
|
23130
|
+
if (field.hasIcon && !["group", "section", "tabs", "separator"].includes(field.type)) {
|
|
23131
|
+
return true;
|
|
23082
23132
|
}
|
|
23133
|
+
if (field.type === "list" && (!field.fields || field.fields.length === 0)) return false;
|
|
23134
|
+
return !formControlFreeFieldTypes.has(field.type);
|
|
23135
|
+
}) || hasIconPostfix;
|
|
23136
|
+
const groupUiImports = buildUiImports({
|
|
23137
|
+
hasBoolean: hasFieldType(group2.fields, "boolean"),
|
|
23138
|
+
hasTextarea: hasFieldType(group2.fields, "text"),
|
|
23139
|
+
hasImage: hasFieldType(group2.fields, "image"),
|
|
23140
|
+
hasVideo: hasFieldType(group2.fields, "video"),
|
|
23141
|
+
hasMedia: hasFieldType(group2.fields, "media"),
|
|
23142
|
+
hasGallery: hasFieldType(group2.fields, "gallery"),
|
|
23143
|
+
hasIcon: hasFieldType(group2.fields, "icon"),
|
|
23144
|
+
hasIconPostfix,
|
|
23145
|
+
hasDate: hasFieldType(group2.fields, "date"),
|
|
23146
|
+
hasMarkdown: hasFieldType(group2.fields, "markdown"),
|
|
23147
|
+
hasRichtext: hasFieldType(group2.fields, "richtext"),
|
|
23148
|
+
hasSeparator: hasFieldType(group2.fields, "separator"),
|
|
23149
|
+
hasSelect,
|
|
23150
|
+
hasSelectCombobox,
|
|
23151
|
+
hasCreatableSelect,
|
|
23152
|
+
hasMultiSelect,
|
|
23153
|
+
hasTabsField: analysis.hasTabsField,
|
|
23154
|
+
hasRelationship,
|
|
23155
|
+
hasSimpleList: hasSimpleListField(group2.fields),
|
|
23156
|
+
hasNestedList,
|
|
23157
|
+
hasNestedObjectList: analysis.hasNestedObjectList,
|
|
23158
|
+
hasCardContent: true,
|
|
23159
|
+
hasSectionCardHeading: true,
|
|
23160
|
+
hasFormRoot: true,
|
|
23161
|
+
hasButton: true,
|
|
23162
|
+
hasFormControls,
|
|
23163
|
+
hasInput
|
|
23164
|
+
});
|
|
23165
|
+
const cardImportIndex = groupUiImports.findIndex(
|
|
23166
|
+
(value) => value.includes("from '@admin/components/ui/card'")
|
|
23167
|
+
);
|
|
23168
|
+
if (cardImportIndex !== -1) {
|
|
23169
|
+
const cardImportNames = [
|
|
23170
|
+
"Card",
|
|
23171
|
+
"CardContent",
|
|
23172
|
+
...group2.description ? ["CardDescription"] : [],
|
|
23173
|
+
"CardFooter",
|
|
23174
|
+
"CardHeader",
|
|
23175
|
+
"CardTitle"
|
|
23176
|
+
];
|
|
23177
|
+
groupUiImports[cardImportIndex] = renderSingleFormRenderer({
|
|
23178
|
+
kind: "renderSingleFormImportsTemplate",
|
|
23179
|
+
props: {
|
|
23180
|
+
map: cardImportNames.map((name) => ` ${name}`).join(",\n")
|
|
23181
|
+
}
|
|
23182
|
+
});
|
|
23083
23183
|
}
|
|
23084
|
-
|
|
23085
|
-
|
|
23086
|
-
|
|
23087
|
-
|
|
23088
|
-
|
|
23089
|
-
|
|
23090
|
-
|
|
23091
|
-
|
|
23092
|
-
|
|
23093
|
-
|
|
23094
|
-
|
|
23095
|
-
|
|
23096
|
-
|
|
23097
|
-
|
|
23098
|
-
|
|
23099
|
-
|
|
23100
|
-
|
|
23101
|
-
hasCreatableSelect
|
|
23102
|
-
|
|
23103
|
-
|
|
23104
|
-
|
|
23105
|
-
|
|
23106
|
-
|
|
23107
|
-
|
|
23108
|
-
|
|
23109
|
-
|
|
23110
|
-
|
|
23111
|
-
|
|
23112
|
-
|
|
23113
|
-
|
|
23114
|
-
|
|
23115
|
-
|
|
23116
|
-
|
|
23117
|
-
|
|
23118
|
-
|
|
23119
|
-
|
|
23120
|
-
|
|
23121
|
-
|
|
23122
|
-
|
|
23123
|
-
|
|
23184
|
+
groupUiImports.push("import { Spinner } from '@admin/components/ui/spinner'");
|
|
23185
|
+
const lucideIcons = [];
|
|
23186
|
+
const addLucideIcons = (...icons) => {
|
|
23187
|
+
for (const icon of icons) {
|
|
23188
|
+
if (!lucideIcons.includes(icon)) lucideIcons.push(icon);
|
|
23189
|
+
}
|
|
23190
|
+
};
|
|
23191
|
+
addLucideIcons(...collectTabIconNames(group2.fields));
|
|
23192
|
+
if (hasSelectCombobox) addLucideIcons("Check", "ChevronsUpDown");
|
|
23193
|
+
if (hasCreatableSelect || hasNestedList) addLucideIcons("Plus");
|
|
23194
|
+
if (hasNestedList) addLucideIcons("X");
|
|
23195
|
+
const relationshipImports = Array.from(
|
|
23196
|
+
new Set(analysis.relFields.map((field) => field.relationship).filter(Boolean))
|
|
23197
|
+
).map((relationship) => {
|
|
23198
|
+
const relationshipPlural = toPascalCase(pluralize(relationship || ""));
|
|
23199
|
+
return `import { use${relationshipPlural} } from '@admin/hooks/use-${relationship}'`;
|
|
23200
|
+
}).join("\n");
|
|
23201
|
+
const needsReact = hasRelationship || hasMultiSelect || hasCreatableSelect || analysis.listFieldsWithNested.length > 0;
|
|
23202
|
+
const hookImports = ["useForm"];
|
|
23203
|
+
if (hasNestedList) hookImports.unshift("useFieldArray");
|
|
23204
|
+
const actionTypeImports = [
|
|
23205
|
+
Singular,
|
|
23206
|
+
...hasCreatableSelect ? [`${Singular}SelectOption`] : [],
|
|
23207
|
+
`${Singular}UpsertInput`
|
|
23208
|
+
];
|
|
23209
|
+
const actionImports = [
|
|
23210
|
+
...hasCreatableSelect ? [`create${Singular}SelectOption`, `get${Singular}SelectOptions`] : [],
|
|
23211
|
+
`upsert${Singular}`
|
|
23212
|
+
];
|
|
23213
|
+
const cardImports = [
|
|
23214
|
+
needsReact ? "import * as React from 'react'" : "",
|
|
23215
|
+
"import { standardSchemaResolver } from '@hookform/resolvers/standard-schema'",
|
|
23216
|
+
`import { useMutation, ${hasCreatableSelect ? "useQuery, " : ""}useQueryClient } from '@tanstack/react-query'`,
|
|
23217
|
+
lucideIcons.length > 0 ? `import { ${lucideIcons.join(", ")} } from 'lucide-react'` : "",
|
|
23218
|
+
`import { ${hookImports.join(", ")} } from 'react-hook-form'`,
|
|
23219
|
+
"import { toast } from 'sonner'",
|
|
23220
|
+
"import { z } from 'zod/v3'",
|
|
23221
|
+
analysis.hasTabsField ? "import { parseAsStringLiteral, useQueryState } from 'nuqs'" : "",
|
|
23222
|
+
hasSelectCombobox ? "import { cn } from '@admin/utils/shared/cn'" : "",
|
|
23223
|
+
relationshipImports,
|
|
23224
|
+
groupUiImports.join("\n"),
|
|
23225
|
+
`import type { ${actionTypeImports.join(",\n ")} } from '@admin/actions/${actionImportPath}'`,
|
|
23226
|
+
`import { ${actionImports.join(", ")} } from '@admin/actions/${actionImportPath}'`
|
|
23227
|
+
].filter(Boolean).join("\n");
|
|
23228
|
+
const content2 = renderSingleFormRenderer({
|
|
23229
|
+
kind: "renderSingleFormCardModuleTemplate",
|
|
23124
23230
|
props: {
|
|
23125
|
-
|
|
23231
|
+
imports: cardImports,
|
|
23232
|
+
content: generateCardComponent(group2, schema, analysis, flatFields)
|
|
23126
23233
|
}
|
|
23127
|
-
})
|
|
23128
|
-
|
|
23129
|
-
|
|
23130
|
-
|
|
23131
|
-
|
|
23132
|
-
|
|
23133
|
-
if (!lucideIcons.includes(icon)) lucideIcons.push(icon);
|
|
23134
|
-
}
|
|
23135
|
-
};
|
|
23136
|
-
addLucideIcons(...tabIconNames);
|
|
23137
|
-
if (hasRelationship || hasSelectCombobox) addLucideIcons("Check", "ChevronsUpDown");
|
|
23138
|
-
if (hasCreatableSelect) addLucideIcons("Plus");
|
|
23139
|
-
if (hasNestedList) {
|
|
23140
|
-
addLucideIcons("Plus", "X");
|
|
23141
|
-
}
|
|
23142
|
-
const relHookImports = allRelFields.map((f) => {
|
|
23143
|
-
const relPlural = toPascalCase(pluralize(f.relationship || ""));
|
|
23144
|
-
return `import { use${relPlural} } from '@admin/hooks/use-${f.relationship}'`;
|
|
23145
|
-
}).filter((v, i, a) => a.indexOf(v) === i).join("\n");
|
|
23146
|
-
const cardComponents = cardGroups.map((group2) => {
|
|
23147
|
-
const analysis = analyzeGroup(group2.fields);
|
|
23148
|
-
return generateCardComponent(group2, schema, analysis, flatFields);
|
|
23234
|
+
});
|
|
23235
|
+
return {
|
|
23236
|
+
content: content2,
|
|
23237
|
+
fileName: `${toKebabCase(group2.componentName)}.tsx`,
|
|
23238
|
+
group: group2
|
|
23239
|
+
};
|
|
23149
23240
|
});
|
|
23150
|
-
const cardRenders =
|
|
23241
|
+
const cardRenders = cardArtifacts.map(({ group: group2 }) => ` <${group2.componentName} initialData={initialData} />`).join("\n");
|
|
23151
23242
|
const content = renderSingleFormRenderer({
|
|
23152
|
-
kind: "
|
|
23243
|
+
kind: "renderSingleFormEntryModuleTemplate",
|
|
23153
23244
|
props: {
|
|
23154
|
-
needsReactImport: needsReact ? "\nimport * as React from 'react'" : "",
|
|
23155
|
-
hasCreatableSelectUseQuery: hasCreatableSelect ? "useQuery, " : "",
|
|
23156
|
-
lucideIconsLucide: lucideIcons.length > 0 ? `
|
|
23157
|
-
import { ${lucideIcons.join(", ")} } from 'lucide-react'` : "",
|
|
23158
|
-
hasNestedListUseFieldArray: hasNestedList ? " useFieldArray," : "",
|
|
23159
|
-
hasTabsFieldImport: hasTabsField ? "\nimport { parseAsStringLiteral, useQueryState } from 'nuqs'" : "",
|
|
23160
|
-
hasRelationshipImport: hasRelationship || hasSelectCombobox ? "\nimport { cn } from '@admin/utils/shared/cn'" : "",
|
|
23161
|
-
relHookImportsContent: relHookImports ? `${relHookImports}
|
|
23162
|
-
` : "",
|
|
23163
|
-
join: uiImports.join("\n"),
|
|
23164
23245
|
singular: Singular,
|
|
23165
|
-
hasCreatableSelectContent: hasCreatableSelect ? `${Singular}SelectOption,
|
|
23166
|
-
` : "",
|
|
23167
23246
|
actionImportPath,
|
|
23168
|
-
|
|
23169
|
-
|
|
23247
|
+
cardImports: cardArtifacts.map(
|
|
23248
|
+
({ fileName, group: group2 }) => `import { ${group2.componentName} } from './${fileName.slice(0, -4)}'`
|
|
23249
|
+
).join("\n"),
|
|
23170
23250
|
cardRenders
|
|
23171
23251
|
}
|
|
23172
23252
|
});
|
|
23173
23253
|
return {
|
|
23174
|
-
files: [
|
|
23254
|
+
files: [
|
|
23255
|
+
createGeneratedFile(`${pagesDir}/${schema.name}/${schema.name}-form.tsx`, content),
|
|
23256
|
+
...cardArtifacts.map(
|
|
23257
|
+
({ content: cardContent, fileName }) => createGeneratedFile(`${pagesDir}/${schema.name}/${fileName}`, cardContent)
|
|
23258
|
+
)
|
|
23259
|
+
]
|
|
23175
23260
|
};
|
|
23176
23261
|
}
|
|
23177
23262
|
|
|
@@ -31215,8 +31300,8 @@ function scaffoldComponents({ cwd, config }) {
|
|
|
31215
31300
|
readTemplate("components/layouts/admin-sidebar.tsx")
|
|
31216
31301
|
);
|
|
31217
31302
|
write(
|
|
31218
|
-
"components/layouts/admin-sidebar-branding
|
|
31219
|
-
readTemplate("components/layouts/admin-sidebar-branding
|
|
31303
|
+
"components/layouts/admin-sidebar-branding.tsx",
|
|
31304
|
+
readTemplate("components/layouts/admin-sidebar-branding.tsx")
|
|
31220
31305
|
);
|
|
31221
31306
|
write(
|
|
31222
31307
|
"components/layouts/admin-sidebar-branding-skeleton.tsx",
|
|
@@ -31251,6 +31336,7 @@ function scaffoldComponents({ cwd, config }) {
|
|
|
31251
31336
|
"components/layouts/content-skeleton.tsx",
|
|
31252
31337
|
readTemplate("components/layouts/content-skeleton.tsx")
|
|
31253
31338
|
);
|
|
31339
|
+
write("components/layouts/role-gate.tsx", readTemplate("components/layouts/role-gate.tsx"));
|
|
31254
31340
|
write("components/shared/page-header.tsx", readTemplate("components/shared/page-header.tsx"));
|
|
31255
31341
|
write(
|
|
31256
31342
|
"components/shared/sort-indicator.tsx",
|
|
@@ -32207,11 +32293,11 @@ function scaffoldLayout({ cwd, config }) {
|
|
|
32207
32293
|
const adminDir = path74.dirname(config.paths.pages);
|
|
32208
32294
|
write(path74.join(adminDir, "layout.tsx"), readTemplate("pages/admin-layout.tsx"));
|
|
32209
32295
|
write(path74.join(config.paths.pages, "layout.tsx"), readTemplate("pages/authenticated-layout.tsx"));
|
|
32210
|
-
write(path74.join(config.paths.pages, "auth-gate
|
|
32296
|
+
write(path74.join(config.paths.pages, "auth-gate.tsx"), readTemplate("pages/auth-gate.tsx"));
|
|
32211
32297
|
write(path74.join(config.paths.login, "page.tsx"), readTemplate("pages/login-page.tsx"));
|
|
32212
32298
|
write(
|
|
32213
|
-
path74.join(config.paths.login, "login-page-
|
|
32214
|
-
readTemplate("pages/login-page-
|
|
32299
|
+
path74.join(config.paths.login, "login-page-content.tsx"),
|
|
32300
|
+
readTemplate("pages/login-page-content.tsx")
|
|
32215
32301
|
);
|
|
32216
32302
|
write(
|
|
32217
32303
|
path74.join(config.paths.login, "login-page-skeleton.tsx"),
|
|
@@ -32389,13 +32475,21 @@ function scaffoldLayout({ cwd, config }) {
|
|
|
32389
32475
|
);
|
|
32390
32476
|
const accountDir = path74.join(adminDir, "(account)");
|
|
32391
32477
|
write(path74.join(accountDir, "layout.tsx"), readTemplate("pages/account-layout.tsx"));
|
|
32392
|
-
write(path74.join(accountDir, "account-shell
|
|
32478
|
+
write(path74.join(accountDir, "account-shell.tsx"), readTemplate("pages/account-shell.tsx"));
|
|
32393
32479
|
write(
|
|
32394
32480
|
path74.join(accountDir, "minimal-account-shell.tsx"),
|
|
32395
32481
|
readTemplate("pages/minimal-account-shell.tsx")
|
|
32396
32482
|
);
|
|
32397
32483
|
const profileDir = path74.join(accountDir, "profile");
|
|
32398
32484
|
write(path74.join(profileDir, "page.tsx"), readTemplate("pages/profile/profile-page.tsx"));
|
|
32485
|
+
write(
|
|
32486
|
+
path74.join(profileDir, "profile-page-content.tsx"),
|
|
32487
|
+
readTemplate("pages/profile/profile-page-content.tsx")
|
|
32488
|
+
);
|
|
32489
|
+
write(
|
|
32490
|
+
path74.join(profileDir, "profile-page-skeleton.tsx"),
|
|
32491
|
+
readTemplate("pages/profile/profile-page-skeleton.tsx")
|
|
32492
|
+
);
|
|
32399
32493
|
write(path74.join(profileDir, "profile-form.tsx"), readTemplate("pages/profile/profile-form.tsx"));
|
|
32400
32494
|
write(
|
|
32401
32495
|
path74.join(config.paths.admin, "lib", "actions", "profile", "index.ts"),
|
|
@@ -36346,7 +36440,7 @@ var TEMPLATE_REGISTRY = {
|
|
|
36346
36440
|
relPath: "components/layouts/admin-sidebar.tsx",
|
|
36347
36441
|
content: () => readTemplate("components/layouts/admin-sidebar.tsx"),
|
|
36348
36442
|
dependencies: [
|
|
36349
|
-
"admin-sidebar-branding
|
|
36443
|
+
"admin-sidebar-branding",
|
|
36350
36444
|
"admin-sidebar-branding-skeleton",
|
|
36351
36445
|
"admin-sidebar-nav-link",
|
|
36352
36446
|
"admin-sidebar-user-menu",
|
|
@@ -36354,9 +36448,9 @@ var TEMPLATE_REGISTRY = {
|
|
|
36354
36448
|
"sidebar-utils"
|
|
36355
36449
|
]
|
|
36356
36450
|
},
|
|
36357
|
-
"admin-sidebar-branding
|
|
36358
|
-
relPath: "components/layouts/admin-sidebar-branding
|
|
36359
|
-
content: () => readTemplate("components/layouts/admin-sidebar-branding
|
|
36451
|
+
"admin-sidebar-branding": {
|
|
36452
|
+
relPath: "components/layouts/admin-sidebar-branding.tsx",
|
|
36453
|
+
content: () => readTemplate("components/layouts/admin-sidebar-branding.tsx"),
|
|
36360
36454
|
dependencies: ["sidebar-branding"]
|
|
36361
36455
|
},
|
|
36362
36456
|
"admin-sidebar-branding-skeleton": {
|
|
@@ -36403,6 +36497,11 @@ var TEMPLATE_REGISTRY = {
|
|
|
36403
36497
|
relPath: "components/layouts/content-skeleton.tsx",
|
|
36404
36498
|
content: () => readTemplate("components/layouts/content-skeleton.tsx")
|
|
36405
36499
|
},
|
|
36500
|
+
"role-gate": {
|
|
36501
|
+
relPath: "components/layouts/role-gate.tsx",
|
|
36502
|
+
content: () => readTemplate("components/layouts/role-gate.tsx"),
|
|
36503
|
+
dependencies: ["auth-roles-utils", "auth-session"]
|
|
36504
|
+
},
|
|
36406
36505
|
"page-header": {
|
|
36407
36506
|
relPath: "components/shared/page-header.tsx",
|
|
36408
36507
|
content: () => readTemplate("components/shared/page-header.tsx")
|
|
@@ -37976,11 +38075,11 @@ var TEMPLATE_REGISTRY = {
|
|
|
37976
38075
|
relPath: "app/(admin)/admin/(authenticated)/layout.tsx",
|
|
37977
38076
|
content: () => readTemplate("pages/authenticated-layout.tsx"),
|
|
37978
38077
|
base: "cwd",
|
|
37979
|
-
dependencies: ["auth-gate
|
|
38078
|
+
dependencies: ["auth-gate"]
|
|
37980
38079
|
},
|
|
37981
|
-
"auth-gate
|
|
37982
|
-
relPath: "app/(admin)/admin/(authenticated)/auth-gate
|
|
37983
|
-
content: () => readTemplate("pages/auth-gate
|
|
38080
|
+
"auth-gate": {
|
|
38081
|
+
relPath: "app/(admin)/admin/(authenticated)/auth-gate.tsx",
|
|
38082
|
+
content: () => readTemplate("pages/auth-gate.tsx"),
|
|
37984
38083
|
base: "cwd",
|
|
37985
38084
|
dependencies: ["admin-sidebar", "auth-session"]
|
|
37986
38085
|
},
|
|
@@ -37988,11 +38087,11 @@ var TEMPLATE_REGISTRY = {
|
|
|
37988
38087
|
relPath: "app/(admin)/admin/(account)/layout.tsx",
|
|
37989
38088
|
content: () => readTemplate("pages/account-layout.tsx"),
|
|
37990
38089
|
base: "cwd",
|
|
37991
|
-
dependencies: ["account-shell
|
|
38090
|
+
dependencies: ["account-shell"]
|
|
37992
38091
|
},
|
|
37993
|
-
"account-shell
|
|
37994
|
-
relPath: "app/(admin)/admin/(account)/account-shell
|
|
37995
|
-
content: () => readTemplate("pages/account-shell
|
|
38092
|
+
"account-shell": {
|
|
38093
|
+
relPath: "app/(admin)/admin/(account)/account-shell.tsx",
|
|
38094
|
+
content: () => readTemplate("pages/account-shell.tsx"),
|
|
37996
38095
|
base: "cwd",
|
|
37997
38096
|
dependencies: [
|
|
37998
38097
|
"admin-sidebar",
|
|
@@ -38011,6 +38110,18 @@ var TEMPLATE_REGISTRY = {
|
|
|
38011
38110
|
"profile-page": {
|
|
38012
38111
|
relPath: "app/(admin)/admin/(account)/profile/page.tsx",
|
|
38013
38112
|
content: () => readTemplate("pages/profile/profile-page.tsx"),
|
|
38113
|
+
base: "cwd",
|
|
38114
|
+
dependencies: ["profile-page-content", "profile-page-skeleton"]
|
|
38115
|
+
},
|
|
38116
|
+
"profile-page-content": {
|
|
38117
|
+
relPath: "app/(admin)/admin/(account)/profile/profile-page-content.tsx",
|
|
38118
|
+
content: () => readTemplate("pages/profile/profile-page-content.tsx"),
|
|
38119
|
+
base: "cwd",
|
|
38120
|
+
dependencies: ["auth-roles-utils", "auth-session", "page-header", "profile-form"]
|
|
38121
|
+
},
|
|
38122
|
+
"profile-page-skeleton": {
|
|
38123
|
+
relPath: "app/(admin)/admin/(account)/profile/profile-page-skeleton.tsx",
|
|
38124
|
+
content: () => readTemplate("pages/profile/profile-page-skeleton.tsx"),
|
|
38014
38125
|
base: "cwd"
|
|
38015
38126
|
},
|
|
38016
38127
|
"profile-form": {
|
|
@@ -38023,11 +38134,11 @@ var TEMPLATE_REGISTRY = {
|
|
|
38023
38134
|
relPath: "app/(admin)/admin/(auth)/login/page.tsx",
|
|
38024
38135
|
content: () => readTemplate("pages/login-page.tsx"),
|
|
38025
38136
|
base: "cwd",
|
|
38026
|
-
dependencies: ["login-page-
|
|
38137
|
+
dependencies: ["login-page-content", "login-page-skeleton"]
|
|
38027
38138
|
},
|
|
38028
|
-
"login-page-
|
|
38029
|
-
relPath: "app/(admin)/admin/(auth)/login/login-page-
|
|
38030
|
-
content: () => readTemplate("pages/login-page-
|
|
38139
|
+
"login-page-content": {
|
|
38140
|
+
relPath: "app/(admin)/admin/(auth)/login/login-page-content.tsx",
|
|
38141
|
+
content: () => readTemplate("pages/login-page-content.tsx"),
|
|
38031
38142
|
base: "cwd",
|
|
38032
38143
|
dependencies: ["auth-roles-utils", "auth-session", "login-form"]
|
|
38033
38144
|
},
|
|
@@ -38134,7 +38245,13 @@ var TEMPLATE_REGISTRY = {
|
|
|
38134
38245
|
relPath: "app/(admin)/admin/(authenticated)/settings/forms/page.tsx",
|
|
38135
38246
|
content: () => readTemplate("pages/settings/forms/forms-settings-page.tsx"),
|
|
38136
38247
|
base: "cwd",
|
|
38137
|
-
dependencies: [
|
|
38248
|
+
dependencies: [
|
|
38249
|
+
"auth-roles-utils",
|
|
38250
|
+
"auth-session",
|
|
38251
|
+
"role-gate",
|
|
38252
|
+
"forms-settings-page-skeleton",
|
|
38253
|
+
"forms-settings-page-content"
|
|
38254
|
+
]
|
|
38138
38255
|
},
|
|
38139
38256
|
"forms-settings-page-skeleton": {
|
|
38140
38257
|
relPath: "app/(admin)/admin/(authenticated)/settings/forms/forms-settings-page-skeleton.tsx",
|
|
@@ -38182,7 +38299,13 @@ var TEMPLATE_REGISTRY = {
|
|
|
38182
38299
|
relPath: "app/(admin)/admin/(authenticated)/settings/webhooks/page.tsx",
|
|
38183
38300
|
content: () => readTemplate("pages/settings/webhooks/webhooks-page.tsx"),
|
|
38184
38301
|
base: "cwd",
|
|
38185
|
-
dependencies: [
|
|
38302
|
+
dependencies: [
|
|
38303
|
+
"auth-roles-utils",
|
|
38304
|
+
"auth-session",
|
|
38305
|
+
"role-gate",
|
|
38306
|
+
"webhooks-page-skeleton",
|
|
38307
|
+
"webhooks-page-content"
|
|
38308
|
+
]
|
|
38186
38309
|
},
|
|
38187
38310
|
"webhooks-page-skeleton": {
|
|
38188
38311
|
relPath: "app/(admin)/admin/(authenticated)/settings/webhooks/webhooks-page-skeleton.tsx",
|
|
@@ -38242,7 +38365,13 @@ var TEMPLATE_REGISTRY = {
|
|
|
38242
38365
|
relPath: "app/(admin)/admin/(authenticated)/settings/webhooks/logs/page.tsx",
|
|
38243
38366
|
content: () => readTemplate("pages/settings/webhooks/webhooks-logs-page.tsx"),
|
|
38244
38367
|
base: "cwd",
|
|
38245
|
-
dependencies: [
|
|
38368
|
+
dependencies: [
|
|
38369
|
+
"auth-roles-utils",
|
|
38370
|
+
"auth-session",
|
|
38371
|
+
"role-gate",
|
|
38372
|
+
"webhooks-logs-page-content",
|
|
38373
|
+
"webhooks-page-skeleton"
|
|
38374
|
+
]
|
|
38246
38375
|
},
|
|
38247
38376
|
"webhooks-logs-page-content": {
|
|
38248
38377
|
relPath: "app/(admin)/admin/(authenticated)/settings/webhooks/webhooks-logs-page-content.tsx",
|
|
@@ -38926,7 +39055,13 @@ var TEMPLATE_REGISTRY = {
|
|
|
38926
39055
|
relPath: "app/(admin)/admin/(authenticated)/settings/audit-log/page.tsx",
|
|
38927
39056
|
content: () => readTemplate("pages/settings/audit-log/audit-log-page.tsx"),
|
|
38928
39057
|
base: "cwd",
|
|
38929
|
-
dependencies: [
|
|
39058
|
+
dependencies: [
|
|
39059
|
+
"auth-roles-utils",
|
|
39060
|
+
"auth-session",
|
|
39061
|
+
"role-gate",
|
|
39062
|
+
"audit-log-page-content",
|
|
39063
|
+
"audit-log-page-skeleton"
|
|
39064
|
+
]
|
|
38930
39065
|
},
|
|
38931
39066
|
"audit-log-page-skeleton": {
|
|
38932
39067
|
relPath: "app/(admin)/admin/(authenticated)/settings/audit-log/audit-log-page-skeleton.tsx",
|