create-nevela 0.5.0 → 0.5.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/README.md +16 -15
- package/index.mjs +28 -5
- package/package.json +1 -1
- package/template/laravel/README.md +6 -4
- package/template/laravel/config/nevela.php +6 -0
- package/template/laravel/src/Generator/ResourceGenerator.php +16 -0
- package/template/laravel/src/Http/ResourceRequest.php +75 -0
- package/template/laravel/src/Nevela.php +162 -15
- package/template/laravel/src/Support/Insights.php +78 -0
- package/template/web/app/dashboard/actions.ts +79 -0
- package/template/web/app/page.tsx +3 -9
- package/template/web/components/dashboard/bulk-create-grid.tsx +326 -0
- package/template/web/components/dashboard/resource-insights.tsx +219 -0
- package/template/web/components/dashboard/resource-table.tsx +4 -0
- package/template/web/package.json +1 -1
|
@@ -24,6 +24,8 @@ import { ExportButton } from "./export-button";
|
|
|
24
24
|
import { isInlineEditable } from "./editable";
|
|
25
25
|
import { InlineCell } from "./inline-cell";
|
|
26
26
|
import type { RelationMeta } from "./fields/field-widget";
|
|
27
|
+
import { BulkCreateButton } from "./bulk-create-grid";
|
|
28
|
+
import { ResourceInsights } from "./resource-insights";
|
|
27
29
|
import { ImportDialog } from "./import-dialog";
|
|
28
30
|
import { LocalTime } from "./local-time";
|
|
29
31
|
import { hrefWith, toSearchParams, type SearchParams } from "./query";
|
|
@@ -104,12 +106,14 @@ export async function ResourceTable({ resource, searchParams }: { resource: Reso
|
|
|
104
106
|
return (
|
|
105
107
|
<TableSelection ids={rowIds}>
|
|
106
108
|
<div className="flex flex-col gap-4">
|
|
109
|
+
<ResourceInsights resource={forClient} total={meta.total} />
|
|
107
110
|
<div className="flex flex-wrap items-center justify-between gap-2">
|
|
108
111
|
<ResourceTableToolbar resource={forClient} />
|
|
109
112
|
<div className="flex flex-wrap items-center gap-2">
|
|
110
113
|
<ColumnMenu columns={allColumns.map(({ key, label }) => ({ key, label }))} visible={columns.map((column) => column.key)} />
|
|
111
114
|
<ExportButton resourceName={resource.name} pluralLabel={resource.pluralLabel} />
|
|
112
115
|
{permissions.create && <ImportDialog resource={forClient} />}
|
|
116
|
+
{permissions.create && <BulkCreateButton resource={forClient} relations={relations} />}
|
|
113
117
|
{permissions.create &&
|
|
114
118
|
(overlayForms ? (
|
|
115
119
|
<NewRecordButton resource={forClient} relations={relations} listHref={basePath} />
|