easy-mat-ui-ng20 20.0.1 → 20.0.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 CHANGED
@@ -22,6 +22,10 @@ a configurable **create / edit / view dialog** and a **multi-select** control, w
22
22
  - Expandable rows with **child tables**, or several child tables in **tabs** (`childConfig`).
23
23
  - `EasyDialogService`: a configurable dialog to create, edit or view a record.
24
24
  - `lib-easy-multi-select`: a searchable multi-select with select-all, clear, read-only and compact modes, or a single-choice dropdown (`single`).
25
+ - Reusable interface components, each with `@Input()` / `@Output()` and a typed model: `lib-easy-segmented`,
26
+ `lib-easy-chip-nav`, `lib-easy-language-switch`, `lib-easy-card` / `lib-easy-card-grid`, `lib-easy-stat` and
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)).
25
29
  - **Light and dark themes** switchable at runtime (`EasyThemeService`), driven by CSS variables.
26
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.
27
31
  - Shared models, enums and configuration classes exported from one entry point.
@@ -137,6 +141,24 @@ dialog.open({
137
141
  }).afterClosed().subscribe(result => console.log(result?.event, result?.data));
138
142
  ```
139
143
 
144
+ ## Generate a page
145
+
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.
149
+
150
+ ```bash
151
+ npx easy-mat-ui add-page # asks what it needs
152
+ npx easy-mat-ui add-page --name stock-items --blocks page-header,stat,table --dry-run --print
153
+ ```
154
+
155
+ - **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.
157
+ - **Translations**: with ngx-translate the code uses translation keys, and the new entries are added to your English
158
+ 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](__SITE_URL__/) does the same with a preview, and downloads
160
+ a description that `--config` reads. `--help` lists every option.
161
+
140
162
  ## Demo application
141
163
 
142
164
  The repository contains a runnable demo in [`projects/demo`](projects/demo). It needs no backend: a mock service