@myrmidon/cadmus-item-editor 18.0.1 → 20.1.0

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
@@ -5,3 +5,17 @@
5
5
  This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.0.0.
6
6
 
7
7
  This library contains the editor for a single Cadmus item with its children components.
8
+
9
+ ## Item Editor
10
+
11
+ The item editor page (`ItemEditorComponent`, routed at `items/:id`) loads the item from its route (`new` for a new item), and lets users edit its metadata, parts and layers.
12
+
13
+ The item's metadata (title, sort key, description, facet, group, flags) are edited by the "dumb" `ItemMetadataEditorComponent` (`cadmus-item-metadata-editor`), which:
14
+
15
+ - edits the item received in its `item` input (ignoring its parts);
16
+ - never saves by itself: it emits `saveRequest` with the normalized metadata, `generateRequest` to generate the title (`T`) or description (`D`) (the host then calls `setGenerated`), `generateItemsRequest`, and `dirtyChange`;
17
+ - receives from its host the `facets`, `flagDefinitions`, `userLevel` (admin flags can be changed only by admins), `busy` and `hasMetadataBuilders` inputs;
18
+ - has a `readonly` input: when true, its form is disabled, flags are shown as a static list, and all the action buttons are hidden. This is used by the edit history view (`@myrmidon/cadmus-ui-history`).
19
+
20
+ When `historyEnabled` is true in `env.js`, the parts and layers lists of the item editor have a history button, opening the part editor route with a final `/history` (see `@myrmidon/cadmus-ui-history`).
21
+