easy-mat-ui-ng20 20.0.3 → 20.0.4

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 +50 -8
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [![Angular](https://img.shields.io/badge/Angular-20-dd0031.svg)](https://angular.dev)
6
6
  [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
7
7
 
8
- **[Live demo](https://easy-mat-ui.web.app/)** · **[Documentation](https://easy-mat-ui.web.app/docs/)** · [npm](https://www.npmjs.com/package/easy-mat-ui-ng20) · [Changelog](CHANGELOG.md)
8
+ **[Live demo](https://easy-mat-ui.web.app/)** · **[Try it on StackBlitz](https://stackblitz.com/github/chaibiredouane/easy-mat-ui/tree/main/examples/stackblitz-starter)** · **[Documentation](https://easy-mat-ui.web.app/docs/)** · [npm](https://www.npmjs.com/package/easy-mat-ui-ng20) · [Changelog](CHANGELOG.md)
9
9
 
10
10
  A set of customizable Angular Material components built around a configurable **data table**:
11
11
  filtering, sorting, pagination, typed columns, expandable rows, tabbed child tables, a toolbar,
@@ -25,7 +25,7 @@ a configurable **create / edit / view dialog** and a **multi-select** control, w
25
25
  - Reusable interface components, each with `@Input()` / `@Output()` and a typed model: `lib-easy-segmented`,
26
26
  `lib-easy-chip-nav`, `lib-easy-language-switch`, `lib-easy-card` / `lib-easy-card-grid`, `lib-easy-stat` and
27
27
  `lib-easy-page-header`.
28
- - `npx easy-mat-ui add-page`: generates a page from these components and a table (see [Generate a page](#generate-a-page)).
28
+ - **Page generation**: the *Page builder* of the demo and the `npx easy-mat-ui add-page` command generate a page from these components and a table (see [Generate a page](#generate-a-page)).
29
29
  - **Light and dark themes** switchable at runtime (`EasyThemeService`), driven by CSS variables.
30
30
  - Responsive layout (tables adapt below 768 px and 1024 px) and no WCAG 2 A/AA violation reported by axe-core on the demo.
31
31
  - Shared models, enums and configuration classes exported from one entry point.
@@ -46,6 +46,8 @@ Peer dependencies: `@angular/core`, `@angular/common`, `@angular/forms`, `@angul
46
46
 
47
47
  ## Installation
48
48
 
49
+ Want to see it first? The [starter project on StackBlitz](https://stackblitz.com/github/chaibiredouane/easy-mat-ui/tree/main/examples/stackblitz-starter) runs in your browser, with nothing to install. Its source is in [`examples/stackblitz-starter`](https://github.com/chaibiredouane/easy-mat-ui/tree/main/examples/stackblitz-starter).
50
+
49
51
  ```bash
50
52
  npm install easy-mat-ui-ng20
51
53
  ```
@@ -143,21 +145,61 @@ dialog.open({
143
145
 
144
146
  ## Generate a page
145
147
 
146
- `easy-mat-ui add-page` writes an Angular page for you. You pick the components (page header, key figures, category
147
- buttons, segmented control, language picker, card grid, and a data table with an optional child table), and it
148
- generates the component, the template, the table configuration and the models.
148
+ Every admin screen starts the same way: a header, a few figures, a table, a model, a table configuration, translations.
149
+ Easy Mat UI lets you generate that starting point instead of typing it, in two ways that share **one generator**:
150
+
151
+ | | Page builder | `add-page` command |
152
+ |---|---|---|
153
+ | Where | A page of the [live demo](https://easy-mat-ui.web.app/), in your browser | Your terminal, in an Angular project |
154
+ | You | Click the components you want, define the fields, see a live preview | Answer a few questions, or pass options |
155
+ | You get | The generated files to copy, the command to run, and a downloadable description (`.page.json`) | The files written in your project, at the right place |
156
+ | Installs anything | No | No |
157
+
158
+ ### The idea
159
+
160
+ 1. **Describe** the page: which components (page header, key figures, category buttons, segmented control, language
161
+ picker, card grid, a data table with an optional child table) and, for the table, the fields of its model.
162
+ 2. **Generate** the code from that description: a standalone component, its template, the table configuration and the
163
+ models. Nothing is hidden: it is ordinary Angular code that uses the components of this library.
164
+ 3. **Own it**: the result is a starting point. You edit it and connect your own data (a service, an API call). The
165
+ generator does not touch your code afterwards.
166
+
167
+ ### Page builder (in the browser)
168
+
169
+ Open the *Page builder* of the [live demo](https://easy-mat-ui.web.app/). Choose the components, add the fields of the
170
+ table (text, number, date, yes/no), and switch filters or the child table on. The preview uses the real components, so
171
+ what you see is what the code does. Then:
172
+
173
+ - copy the generated files one by one;
174
+ - copy the exact command that reproduces the page in your project;
175
+ - download the description of the page (`my-page.page.json`) to hand it to the command below.
176
+
177
+ It is also a quick way to discover which components exist and how they fit together, without installing anything.
178
+
179
+ ### `add-page` command (in your project)
149
180
 
150
181
  ```bash
151
182
  npx easy-mat-ui add-page # asks what it needs
152
183
  npx easy-mat-ui add-page --name stock-items --blocks page-header,stat,table --dry-run --print
184
+ npx easy-mat-ui add-page --config my-page.page.json # the description downloaded from the Page builder
153
185
  ```
154
186
 
187
+ Run it at the root of your Angular project. `--dry-run --print` shows what would be written and writes nothing, which is
188
+ the safe way to try it. `--help` lists every option.
189
+
155
190
  - **Models**: an existing `*.model.ts` that matches the page name is reused. Otherwise a generic model (`item1`,
156
- `item2`, `item3`) is generated, with example rows and text, icon and action columns.
191
+ `item2`, `item3`) is generated, with example rows and text, icon and action columns. Field types it cannot map (for
192
+ example `string[]`) are ignored instead of producing code that does not compile.
157
193
  - **Translations**: with ngx-translate the code uses translation keys, and the new entries are added to your English
158
194
  file. Without it the texts are written in the code. Nothing is ever installed.
159
- - **Prefer a screen?** The *Page builder* of the [live demo](https://easy-mat-ui.web.app/) does the same with a preview, and downloads
160
- a description that `--config` reads. `--help` lists every option.
195
+ - **Quality**: the generator has unit tests, and the continuous integration compiles the generated pages with strict
196
+ Angular templates, so generated code that stops compiling fails the build.
197
+
198
+ ### What it does not do
199
+
200
+ - It generates a **starting point, not a finished screen**: the logic and the data calls are yours.
201
+ - It does not call an API and does not create routes for you.
202
+ - It generates code for the components of `easy-mat-ui-ng20`, not generic Angular Material code.
161
203
 
162
204
  ## Demo application
163
205
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-mat-ui-ng20",
3
- "version": "20.0.3",
3
+ "version": "20.0.4",
4
4
  "description": "Angular 20 data table and reusable UI components on Angular Material: filters, pagination, CRUD dialog, child tables, themes, page generator CLI",
5
5
  "keywords": [
6
6
  "angular",