@nestjs-dash/core 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +56 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,56 @@
1
+ # @nestjs-dash/core
2
+
3
+ Panel, Resource, Table/Form/Action/Schema builders for nestjs-dash — the Filament-style domain model that ORM adapters and the NestJS host module build on. Re-exports `@nestjs-dash/adapter`'s `ResourceAdapter`/`DatabaseAdapter` SPI and `@nestjs-dash/support`'s shared types, so most consumers only need to import from this one package.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pnpm add @nestjs-dash/core
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```ts
14
+ import { Resource, Table, TextColumn, Schema, TextInput } from '@nestjs-dash/core';
15
+
16
+ export class AuthorResource extends Resource {
17
+ static override slug = 'authors';
18
+
19
+ static override table(table: Table) {
20
+ return table.columns([
21
+ TextColumn.make('id'),
22
+ TextColumn.make('name').sortable().searchable(),
23
+ ]);
24
+ }
25
+
26
+ static override form(form: Schema) {
27
+ return form.components([TextInput.make('name').required()]);
28
+ }
29
+ }
30
+ ```
31
+
32
+ ```ts
33
+ import { Panel } from '@nestjs-dash/core';
34
+
35
+ const panel = Panel.make()
36
+ .path('/admin')
37
+ .resources([AuthorResource]);
38
+ ```
39
+
40
+ An ORM adapter package (`@nestjs-dash/typeorm`, `@nestjs-dash/mikroorm`, `@nestjs-dash/prisma`, `@nestjs-dash/in-memory`) supplies `AuthorResource.adapter`; `@nestjs-dash/nestjs` wires the `Panel` into a NestJS module.
41
+
42
+ ## What's here
43
+
44
+ - `Resource` / `Page` / `Panel` / `RelationManager` / `NavigationLink` — the domain model
45
+ - `Table` plus columns (`TextColumn`, `IconColumn`, `ImageColumn`, `BadgeColumn`, `BooleanColumn`, `DateColumn`) and filters (`SelectFilter`, `TextFilter`, `DateFilter`)
46
+ - `Schema` / `Section` / `Grid` / `Tabs` / `Html` plus form fields (`TextInput`, `Textarea`, `Select`, `Checkbox`, `Toggle`, `Radio`, `DatePicker`, `DateTimePicker`, `ColorPicker`, `CodeEditor`, `TagsInput`, `RichEditor`, `RichBox`, `ImageUpload`, `FileUpload`, `Repeater`)
47
+ - `Action` and its subclasses (`EditAction`, `DeleteAction`, `CreateAction`, `ViewAction`, `AssociateAction`, `AttachAction`, bulk variants, …) plus `Dialog`
48
+ - `BarChart` / `LineChart` / `PieChart` / `StatCard` dashboard widgets
49
+
50
+ ## Part of nestjs-dash
51
+
52
+ This package is one piece of [nestjs-dash](https://github.com/nestjs-dash/nestjs-dash), a NestJS-native admin framework.
53
+
54
+ ## License
55
+
56
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs-dash/core",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Panel, Resource, Table/Form/Action/Schema builders for NestJS Dash (the NestJS host module lives in @nestjs-dash/nestjs; ORM adapters in @nestjs-dash/{typeorm,mikroorm,prisma,in-memory})",
5
5
  "license": "MIT",
6
6
  "files": [