@myrmidon/cadmus-state 1.1.2 → 2.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 (57) hide show
  1. package/esm2020/lib/app.repository.mjs +75 -0
  2. package/esm2020/lib/cadmus-state.module.mjs +4 -4
  3. package/esm2020/lib/edit-fragment-feature-base.mjs +76 -63
  4. package/esm2020/lib/edit-part-feature-base.mjs +78 -68
  5. package/esm2020/lib/edited-layer.repository.mjs +277 -0
  6. package/esm2020/lib/edited-thesaurus.repository.mjs +80 -0
  7. package/esm2020/lib/fragment-editor.service.mjs +167 -0
  8. package/esm2020/lib/part-editor.service.mjs +157 -0
  9. package/esm2020/public-api.mjs +6 -19
  10. package/fesm2015/myrmidon-cadmus-state.mjs +639 -1095
  11. package/fesm2015/myrmidon-cadmus-state.mjs.map +1 -1
  12. package/fesm2020/myrmidon-cadmus-state.mjs +664 -1080
  13. package/fesm2020/myrmidon-cadmus-state.mjs.map +1 -1
  14. package/lib/{app.store.d.ts → app.repository.d.ts} +24 -8
  15. package/lib/edit-fragment-feature-base.d.ts +35 -53
  16. package/lib/edit-part-feature-base.d.ts +37 -51
  17. package/lib/edited-layer.repository.d.ts +90 -0
  18. package/lib/edited-thesaurus.repository.d.ts +34 -0
  19. package/lib/fragment-editor.service.d.ts +40 -0
  20. package/lib/part-editor.service.d.ts +39 -0
  21. package/package.json +3 -3
  22. package/public-api.d.ts +5 -18
  23. package/esm2020/lib/app.query.mjs +0 -38
  24. package/esm2020/lib/app.service.mjs +0 -60
  25. package/esm2020/lib/app.store.mjs +0 -27
  26. package/esm2020/lib/edit-fragment-query-base.mjs +0 -20
  27. package/esm2020/lib/edit-fragment-service-base.mjs +0 -140
  28. package/esm2020/lib/edit-fragment.store.mjs +0 -36
  29. package/esm2020/lib/edit-item.query.mjs +0 -52
  30. package/esm2020/lib/edit-item.service.mjs +0 -212
  31. package/esm2020/lib/edit-item.store.mjs +0 -40
  32. package/esm2020/lib/edit-layer-part.query.mjs +0 -35
  33. package/esm2020/lib/edit-layer-part.service.mjs +0 -230
  34. package/esm2020/lib/edit-layer-part.store.mjs +0 -49
  35. package/esm2020/lib/edit-part-query-base.mjs +0 -25
  36. package/esm2020/lib/edit-part-service-base.mjs +0 -120
  37. package/esm2020/lib/edit-part.store.mjs +0 -31
  38. package/esm2020/lib/edit-thesaurus.query.mjs +0 -26
  39. package/esm2020/lib/edit-thesaurus.service.mjs +0 -59
  40. package/esm2020/lib/edit-thesaurus.store.mjs +0 -30
  41. package/lib/app.query.d.ts +0 -18
  42. package/lib/app.service.d.ts +0 -14
  43. package/lib/edit-fragment-query-base.d.ts +0 -12
  44. package/lib/edit-fragment-service-base.d.ts +0 -39
  45. package/lib/edit-fragment.store.d.ts +0 -24
  46. package/lib/edit-item.query.d.ts +0 -22
  47. package/lib/edit-item.service.d.ts +0 -38
  48. package/lib/edit-item.store.d.ts +0 -49
  49. package/lib/edit-layer-part.query.d.ts +0 -17
  50. package/lib/edit-layer-part.service.d.ts +0 -39
  51. package/lib/edit-layer-part.store.d.ts +0 -57
  52. package/lib/edit-part-query-base.d.ts +0 -17
  53. package/lib/edit-part-service-base.d.ts +0 -42
  54. package/lib/edit-part.store.d.ts +0 -32
  55. package/lib/edit-thesaurus.query.d.ts +0 -13
  56. package/lib/edit-thesaurus.service.d.ts +0 -14
  57. package/lib/edit-thesaurus.store.d.ts +0 -17
@@ -1,86 +1,66 @@
1
- import { Observable } from 'rxjs';
2
- import { ThesauriSet, TokenLocation, ComponentCanDeactivate, LibraryRouteService, Fragment } from '@myrmidon/cadmus-core';
1
+ import { TokenLocation, ComponentCanDeactivate, LibraryRouteService, Fragment } from '@myrmidon/cadmus-core';
3
2
  import { Router, ActivatedRoute } from '@angular/router';
4
3
  import { MatSnackBar } from '@angular/material/snack-bar';
5
- import { EditFragmentQueryBase } from './edit-fragment-query-base';
6
- import { EditFragmentServiceBase } from './edit-fragment-service-base';
7
- import { EditItemQuery } from './edit-item.query';
8
- import { EditItemService } from './edit-item.service';
9
- import { EditLayerPartQuery } from './edit-layer-part.query';
10
- import { EditLayerPartService } from './edit-layer-part.service';
4
+ import { EditedObject, FragmentIdentity } from '@myrmidon/cadmus-ui';
5
+ import { OnDestroy, OnInit } from '@angular/core';
6
+ import { FragmentEditorService } from './fragment-editor.service';
7
+ import * as i0 from "@angular/core";
11
8
  /**
12
9
  * Base class for fragment feature editors.
13
10
  * This is similar to the EditPartFeatureBase class.
14
11
  */
15
- export declare abstract class EditFragmentFeatureBase implements ComponentCanDeactivate {
12
+ export declare abstract class EditFragmentFeatureBase implements OnInit, OnDestroy, ComponentCanDeactivate {
16
13
  private _router;
17
14
  protected snackbar: MatSnackBar;
18
- private _editFrQuery;
19
- private _editFrService;
20
- private _editItemQuery;
21
- private _editItemService;
22
- private _editLayersQuery;
23
- private _editLayersService;
15
+ protected editorService: FragmentEditorService;
24
16
  private _libraryRouteService;
25
- private _formDirty?;
26
- private _stateDirty?;
17
+ private _loadingSub?;
18
+ private _savingSub?;
27
19
  /**
28
- * The fragment being edited (from the local store).
20
+ * The fragment being edited.
29
21
  */
30
- fragment$: Observable<Fragment | undefined>;
22
+ data?: EditedObject<Fragment>;
31
23
  /**
32
- * The thesauri requested for editing this part.
24
+ * The identity of the fragment being edited. This gets built from the current
25
+ * route.
33
26
  */
34
- thesauri$: Observable<ThesauriSet | undefined>;
27
+ identity: FragmentIdentity;
35
28
  /**
36
- * The base text the fragment refers to.
29
+ * True when the wrapped editor component data is dirty.
37
30
  */
38
- baseText$: Observable<string | undefined>;
31
+ dirty?: boolean;
39
32
  /**
40
- * The location of the fragment being edited.
41
- */
42
- frLoc: TokenLocation | undefined;
43
- /**
44
- * The item ID of the edited part, as got from the route.
33
+ * True when loading data.
45
34
  */
46
- readonly itemId: string;
35
+ loading?: boolean;
47
36
  /**
48
- * The part ID of the edited part, as got from the route.
37
+ * True when saving data.
49
38
  */
50
- readonly partId: string;
39
+ saving?: boolean;
51
40
  /**
52
- * The fragment's type ID, as got from the route.
53
- */
54
- readonly frTypeId: string;
55
- /**
56
- * The fragment's location, as got from the route.
41
+ * The location of the fragment being edited.
57
42
  */
58
- readonly loc: string;
43
+ frLoc: TokenLocation | undefined;
44
+ constructor(_router: Router, route: ActivatedRoute, snackbar: MatSnackBar, editorService: FragmentEditorService, _libraryRouteService: LibraryRouteService);
59
45
  /**
60
- * The fragment's location, as got from the route query params.
46
+ * Override in derived classes to return the IDs of the thesauri requested
47
+ * for this editor.
48
+ *
49
+ * @return Array with thesauri IDs, eventually empty.
61
50
  */
62
- readonly frRoleId: string;
63
- constructor(_router: Router, route: ActivatedRoute, snackbar: MatSnackBar, _editFrQuery: EditFragmentQueryBase, _editFrService: EditFragmentServiceBase, _editItemQuery: EditItemQuery, _editItemService: EditItemService, _editLayersQuery: EditLayerPartQuery, _editLayersService: EditLayerPartService, _libraryRouteService: LibraryRouteService);
51
+ protected getReqThesauriIds(): string[];
64
52
  /**
65
- * Implementation of ComponentCanDeactivate. The editor can deactivate
66
- * when both its "root" form in the wrapped UI editor and the edit state
67
- * are not dirty. The form gets dirty when edited by the user; the edit
68
- * state gets dirty after a failed save attempt.
53
+ * Called once data has been loaded.
69
54
  */
55
+ protected onDataLoaded(): void;
56
+ ngOnInit(): void;
57
+ ngOnDestroy(): void;
70
58
  canDeactivate(): boolean;
71
- private ensureItemLoaded;
72
- private ensureLayersLoaded;
73
- /**
74
- * Initialize the editor. You MUST call this in your OnInit.
75
- *
76
- * @param thesauriIds The optional ID(s) of the thesauri sets you want
77
- * to use in your editor.
78
- */
79
- protected initEditor(thesauriIds?: string[]): void;
80
59
  /**
81
60
  * Called when the wrapped editor dirty state changes.
82
61
  * In the HTML template, you MUST bind this handler to the dirtyChange event
83
62
  * emitted by your wrapped editor (i.e. (dirtyChange)="onDirtyChange($event)").
63
+ *
84
64
  * @param value The value of the dirty state.
85
65
  */
86
66
  onDirtyChange(value: boolean): void;
@@ -91,4 +71,6 @@ export declare abstract class EditFragmentFeatureBase implements ComponentCanDea
91
71
  */
92
72
  save(fragment: Fragment): void;
93
73
  close(): void;
74
+ static ɵfac: i0.ɵɵFactoryDeclaration<EditFragmentFeatureBase, never>;
75
+ static ɵcmp: i0.ɵɵComponentDeclaration<EditFragmentFeatureBase, "ng-component", never, {}, {}, never, never, false, never>;
94
76
  }
@@ -1,76 +1,60 @@
1
- import { Observable } from 'rxjs';
1
+ import { OnDestroy, OnInit } from '@angular/core';
2
2
  import { Router, ActivatedRoute } from '@angular/router';
3
3
  import { MatSnackBar } from '@angular/material/snack-bar';
4
- import { ThesauriSet, ComponentCanDeactivate, Part } from '@myrmidon/cadmus-core';
5
- import { EditPartQueryBase } from './edit-part-query-base';
6
- import { EditPartServiceBase } from './edit-part-service-base';
7
- import { EditItemQuery } from './edit-item.query';
8
- import { EditItemService } from './edit-item.service';
4
+ import { ComponentCanDeactivate, Part } from '@myrmidon/cadmus-core';
5
+ import { ItemService, ThesaurusService } from '@myrmidon/cadmus-api';
6
+ import { EditedObject, PartIdentity } from '@myrmidon/cadmus-ui';
7
+ import { PartEditorService } from './part-editor.service';
8
+ import * as i0 from "@angular/core";
9
9
  /**
10
10
  * Base class for part feature editors.
11
- * A part feature editor is a wrapper component, linking a part edit
12
- * state (accessed from a part query and loaded with a part service)
13
- * to a corresponding wrapped UI editor.
14
- * It implements ComponentCanDeactivate to allow using the
15
- * PendingChangesGuard. To this end, it tracks the dirty state of
16
- * the edited data coming from 2 different sources: the wrapped editor
17
- * state (from its "root" form), and the store edit state. This is
18
- * set to dirty when a save attempt fails.
19
- * Thus, at the end the user will be prompted when closing an editor
20
- * either because he has changed data in it, or because he attempted
21
- * a save without success.
11
+ * A part feature editor is a wrapper component around a model editor component,
12
+ * used to separate the editor's logic from its host infrastructure.
22
13
  */
23
- export declare abstract class EditPartFeatureBase implements ComponentCanDeactivate {
14
+ export declare abstract class EditPartFeatureBase implements OnInit, OnDestroy, ComponentCanDeactivate {
24
15
  protected router: Router;
25
16
  protected snackbar: MatSnackBar;
26
- private _editPartQuery;
27
- private _editPartService;
28
- private _editItemQuery;
29
- private _editItemService;
30
- private _formDirty?;
31
- private _stateDirty?;
17
+ protected itemService: ItemService;
18
+ protected thesaurusService: ThesaurusService;
19
+ protected editorService: PartEditorService;
20
+ private _loadingSub?;
21
+ private _savingSub?;
32
22
  /**
33
- * The part being edited (from the local store).
23
+ * The part being edited.
34
24
  */
35
- part$?: Observable<Part | undefined>;
25
+ data?: EditedObject<Part>;
36
26
  /**
37
- * The thesauri requested for editing this part.
27
+ * The identity of the part being edited. This gets built from the current
28
+ * route.
38
29
  */
39
- thesauri$?: Observable<ThesauriSet | undefined>;
30
+ identity: PartIdentity;
40
31
  /**
41
- * The item ID of the edited part, as got from the route.
32
+ * True when the wrapped editor component data is dirty.
42
33
  */
43
- itemId: string;
34
+ dirty?: boolean;
44
35
  /**
45
- * The part type ID of the edited part, as got from the route.
36
+ * True when loading data.
46
37
  */
47
- typeId?: string;
38
+ loading?: boolean;
48
39
  /**
49
- * The part ID of the edited part, as got from the route;
50
- * or null for a new part.
40
+ * True when saving data.
51
41
  */
52
- partId?: string;
42
+ saving?: boolean;
43
+ constructor(router: Router, route: ActivatedRoute, snackbar: MatSnackBar, itemService: ItemService, thesaurusService: ThesaurusService, editorService: PartEditorService);
53
44
  /**
54
- * The role ID of the edited part, as got from the route,
55
- * or null.
45
+ * Override in derived classes to return the IDs of the thesauri requested
46
+ * for this editor.
47
+ *
48
+ * @return Array with thesauri IDs, eventually empty.
56
49
  */
57
- roleId?: string;
58
- constructor(router: Router, route: ActivatedRoute, snackbar: MatSnackBar, _editPartQuery: EditPartQueryBase, _editPartService: EditPartServiceBase, _editItemQuery: EditItemQuery, _editItemService: EditItemService);
50
+ protected getReqThesauriIds(): string[];
59
51
  /**
60
- * Implementation of ComponentCanDeactivate. The editor can deactivate
61
- * when both its "root" form in the wrapped UI editor and the edit state
62
- * are not dirty. The form gets dirty when edited by the user; the edit
63
- * state gets dirty after a failed save attempt.
52
+ * Called once data has been loaded.
64
53
  */
54
+ protected onDataLoaded(): void;
55
+ ngOnInit(): void;
56
+ ngOnDestroy(): void;
65
57
  canDeactivate(): boolean;
66
- private ensureItemLoaded;
67
- /**
68
- * Initialize the editor. You MUST call this in your OnInit.
69
- *
70
- * @param thesauriIds The optional ID(s) of the thesauri sets you want
71
- * to use in your editor.
72
- */
73
- protected initEditor(thesauriIds?: string[]): void;
74
58
  /**
75
59
  * Called when the wrapped editor dirty state changes.
76
60
  * In the HTML template, you MUST bind this handler to the dirtyChange event
@@ -89,4 +73,6 @@ export declare abstract class EditPartFeatureBase implements ComponentCanDeactiv
89
73
  * Close the editor by navigating back to the part's item.
90
74
  */
91
75
  close(): void;
76
+ static ɵfac: i0.ɵɵFactoryDeclaration<EditPartFeatureBase, never>;
77
+ static ɵcmp: i0.ɵɵComponentDeclaration<EditPartFeatureBase, "ng-component", never, {}, {}, never, never, false, never>;
92
78
  }
@@ -0,0 +1,90 @@
1
+ import { Fragment, LayerHint, Part, TextLayerPart, TokenLocation } from '@myrmidon/cadmus-core';
2
+ import { Observable } from 'rxjs';
3
+ import { FacetService, ItemService, ThesaurusService } from '@myrmidon/cadmus-api';
4
+ import * as i0 from "@angular/core";
5
+ export interface EditedLayerState {
6
+ /**
7
+ * The layer part (=collection of fragments) being edited.
8
+ */
9
+ part?: TextLayerPart;
10
+ /**
11
+ * The base text rendered into a plain string, whatever its original model.
12
+ * This is used for reference (e.g. show it to the user while editing),
13
+ * even if in some cases it can be enough to work with the base text in the
14
+ * layer part editor itself (this is the case of the token-based text,
15
+ * but not e.g. for the tiles-based text).
16
+ */
17
+ baseText?: string;
18
+ /**
19
+ * The base text part.
20
+ */
21
+ baseTextPart?: Part;
22
+ /**
23
+ * The fragments locations, collected from all the fragments.
24
+ */
25
+ locations: TokenLocation[];
26
+ /**
27
+ * The estimated chance of broken fragments in this layer: 0=safe,
28
+ * 1=potentially broken, 2=broken.
29
+ */
30
+ breakChance: number;
31
+ /**
32
+ * The layer fragments reconciliation hints. There is one hint for each
33
+ * fragment in the layer.
34
+ */
35
+ layerHints: LayerHint[];
36
+ }
37
+ /**
38
+ * Edited layer part ELF repository.
39
+ */
40
+ export declare class EditedLayerRepository {
41
+ private _itemService;
42
+ private _facetService;
43
+ private _thesaurusService;
44
+ private _store;
45
+ private _loading$;
46
+ private _saving$;
47
+ loading$: Observable<boolean>;
48
+ saving$: Observable<boolean>;
49
+ part$: Observable<TextLayerPart | undefined>;
50
+ baseText$: Observable<string | undefined>;
51
+ baseTextPart$: Observable<Part | undefined>;
52
+ locations$: Observable<TokenLocation[]>;
53
+ breakChance$: Observable<number>;
54
+ layerHints$: Observable<LayerHint[]>;
55
+ constructor(_itemService: ItemService, _facetService: FacetService, _thesaurusService: ThesaurusService);
56
+ getValue(): EditedLayerState;
57
+ getPart(): TextLayerPart | undefined;
58
+ getBaseText(): string | undefined;
59
+ getLocations(): TokenLocation[];
60
+ private getPartLocations;
61
+ private loadWithThesauri;
62
+ private loadWithoutThesauri;
63
+ /**
64
+ * Load the state for editing layer part(s).
65
+ *
66
+ * @param itemId The item ID the layer part belongs to.
67
+ * @param partId The layer part ID.
68
+ * @param thesauriIds The optional thesauri IDs to load.
69
+ */
70
+ load(itemId: string, partId: string, thesauriIds?: string[]): void;
71
+ /**
72
+ * Refresh the layer part break chance.
73
+ */
74
+ refreshBreakChance(): void;
75
+ applyLayerPatches(partId: string, patches: string[]): void;
76
+ /**
77
+ * Delete the fragment at the specified location.
78
+ *
79
+ * @param loc The fragment's location.
80
+ */
81
+ deleteFragment(loc: TokenLocation): void;
82
+ /**
83
+ * Save the specified fragment.
84
+ *
85
+ * @param fragment The fragment.
86
+ */
87
+ saveFragment(fragment: Fragment): void;
88
+ static ɵfac: i0.ɵɵFactoryDeclaration<EditedLayerRepository, never>;
89
+ static ɵprov: i0.ɵɵInjectableDeclaration<EditedLayerRepository>;
90
+ }
@@ -0,0 +1,34 @@
1
+ import { Observable } from 'rxjs';
2
+ import { Thesaurus } from '@myrmidon/cadmus-core';
3
+ import { ThesaurusService } from '@myrmidon/cadmus-api';
4
+ import * as i0 from "@angular/core";
5
+ export interface EditedThesaurusState {
6
+ thesaurus?: Thesaurus;
7
+ }
8
+ export declare class EditedThesaurusRepository {
9
+ private _thesaurusService;
10
+ private _store;
11
+ private _loading$;
12
+ private _saving$;
13
+ loading$: Observable<boolean>;
14
+ saving$: Observable<boolean>;
15
+ thesaurus$: Observable<Thesaurus | undefined>;
16
+ constructor(_thesaurusService: ThesaurusService);
17
+ getValue(): EditedThesaurusState;
18
+ getThesaurus(): Thesaurus | undefined;
19
+ /**
20
+ * Load the specified thesaurus.
21
+ *
22
+ * @param id The thesaurus ID or undefined to load a new thesaurus.
23
+ */
24
+ load(id?: string): void;
25
+ /**
26
+ * Save the specified thesaurus.
27
+ *
28
+ * @param thesaurus The thesaurus to save.
29
+ * @returns Promise with saved thesaurus.
30
+ */
31
+ save(thesaurus: Thesaurus): Promise<Thesaurus>;
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<EditedThesaurusRepository, never>;
33
+ static ɵprov: i0.ɵɵInjectableDeclaration<EditedThesaurusRepository>;
34
+ }
@@ -0,0 +1,40 @@
1
+ import { Observable } from 'rxjs';
2
+ import { ItemService, ThesaurusService } from '@myrmidon/cadmus-api';
3
+ import { Fragment, Part } from '@myrmidon/cadmus-core';
4
+ import { EditedObject, FragmentIdentity } from '@myrmidon/cadmus-ui';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * Service used by layer part editor wrappers to load part and thesauri
8
+ * or save parts.
9
+ */
10
+ export declare class FragmentEditorService {
11
+ private _itemService;
12
+ private _thesaurusService;
13
+ private _loading$;
14
+ private _saving$;
15
+ loading$: Observable<boolean>;
16
+ saving$: Observable<boolean>;
17
+ constructor(_itemService: ItemService, _thesaurusService: ThesaurusService);
18
+ private getFragmentFromPart;
19
+ private loadWithThesauri;
20
+ private loadWithoutThesauri;
21
+ /**
22
+ * Load into the state the part with the specified ID
23
+ * and its thesauri.
24
+ * If the ID is not specified, it's a new part; in this case,
25
+ * it will get a null ID, but use the specified itemId and roleId.
26
+ *
27
+ * @param identity The part identity.
28
+ * @param thesauriIds The thesauri IDs array.
29
+ */
30
+ load(identity: FragmentIdentity, thesauriIds?: string[]): Promise<EditedObject<Fragment> | null>;
31
+ /**
32
+ * Save the fragments in their layer part.
33
+ *
34
+ * @param part The part.
35
+ * @returns Promise which when successful returns the saved part.
36
+ */
37
+ save(part: Part): Promise<Part>;
38
+ static ɵfac: i0.ɵɵFactoryDeclaration<FragmentEditorService, never>;
39
+ static ɵprov: i0.ɵɵInjectableDeclaration<FragmentEditorService>;
40
+ }
@@ -0,0 +1,39 @@
1
+ import { Observable } from 'rxjs';
2
+ import { ItemService, ThesaurusService } from '@myrmidon/cadmus-api';
3
+ import { Part } from '@myrmidon/cadmus-core';
4
+ import { EditedObject, PartIdentity } from '@myrmidon/cadmus-ui';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * Service used by part editor wrappers to load part and thesauri
8
+ * or save parts.
9
+ */
10
+ export declare class PartEditorService {
11
+ private _itemService;
12
+ private _thesaurusService;
13
+ private _loading$;
14
+ private _saving$;
15
+ loading$: Observable<boolean>;
16
+ saving$: Observable<boolean>;
17
+ constructor(_itemService: ItemService, _thesaurusService: ThesaurusService);
18
+ private loadWithThesauri;
19
+ private loadWithoutThesauri;
20
+ /**
21
+ * Load into the state the part with the specified ID
22
+ * and its thesauri.
23
+ * If the ID is not specified, it's a new part; in this case,
24
+ * it will get a null ID, but use the specified itemId and roleId.
25
+ *
26
+ * @param identity The part identity.
27
+ * @param thesauriIds The thesauri IDs array.
28
+ */
29
+ load(identity: PartIdentity, thesauriIds?: string[]): Promise<EditedObject<Part> | null>;
30
+ /**
31
+ * Save the part.
32
+ *
33
+ * @param part The part.
34
+ * @returns Promise which when successful returns the saved part.
35
+ */
36
+ save(part: Part): Promise<Part>;
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<PartEditorService, never>;
38
+ static ɵprov: i0.ɵɵInjectableDeclaration<PartEditorService>;
39
+ }
package/package.json CHANGED
@@ -12,10 +12,10 @@
12
12
  "author": {
13
13
  "name": "Daniele Fusi"
14
14
  },
15
- "version": "1.1.2",
15
+ "version": "2.0.1",
16
16
  "peerDependencies": {
17
- "@angular/common": "^14.0.0",
18
- "@angular/core": "^14.0.0"
17
+ "@angular/common": "^15.0.0",
18
+ "@angular/core": "^15.0.0"
19
19
  },
20
20
  "dependencies": {
21
21
  "tslib": "^2.3.0"
package/public-api.d.ts CHANGED
@@ -1,21 +1,8 @@
1
- export * from './lib/app.query';
2
- export * from './lib/app.service';
3
- export * from './lib/app.store';
4
- export * from './lib/edit-item.query';
5
- export * from './lib/edit-item.service';
6
- export * from './lib/edit-item.store';
1
+ export * from './lib/app.repository';
7
2
  export * from './lib/edit-fragment-feature-base';
8
- export * from './lib/edit-fragment-query-base';
9
- export * from './lib/edit-fragment.store';
10
- export * from './lib/edit-fragment-service-base';
11
3
  export * from './lib/edit-part-feature-base';
12
- export * from './lib/edit-part-query-base';
13
- export * from './lib/edit-part-service-base';
14
- export * from './lib/edit-part.store';
15
- export * from './lib/edit-layer-part.query';
16
- export * from './lib/edit-layer-part.service';
17
- export * from './lib/edit-layer-part.store';
18
- export * from './lib/edit-thesaurus.query';
19
- export * from './lib/edit-thesaurus.service';
20
- export * from './lib/edit-thesaurus.store';
4
+ export * from './lib/edited-thesaurus.repository';
5
+ export * from './lib/edited-layer.repository';
6
+ export * from './lib/fragment-editor.service';
7
+ export * from './lib/part-editor.service';
21
8
  export * from './lib/cadmus-state.module';
@@ -1,38 +0,0 @@
1
- import { Injectable } from '@angular/core';
2
- import { Query } from '@datorama/akita';
3
- import * as i0 from "@angular/core";
4
- import * as i1 from "./app.store";
5
- export class AppQuery extends Query {
6
- constructor(store) {
7
- super(store);
8
- this.store = store;
9
- }
10
- selectFacets() {
11
- return this.select((state) => state.facets);
12
- }
13
- selectFlags() {
14
- return this.select((state) => state.flags);
15
- }
16
- selectTypeThesaurus() {
17
- return this.select((state) => state.typeThesaurus);
18
- }
19
- selectItemBrowserThesaurus() {
20
- return this.select((state) => state.itemBrowserThesaurus);
21
- }
22
- selectPreviewJKeys() {
23
- return this.select((state) => state.previewJKeys);
24
- }
25
- selectPreviewFKeys() {
26
- return this.select((state) => state.previewFKeys);
27
- }
28
- selectPreviewCKeys() {
29
- return this.select((state) => state.previewCKeys);
30
- }
31
- }
32
- AppQuery.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AppQuery, deps: [{ token: i1.AppStore }], target: i0.ɵɵFactoryTarget.Injectable });
33
- AppQuery.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AppQuery, providedIn: 'root' });
34
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AppQuery, decorators: [{
35
- type: Injectable,
36
- args: [{ providedIn: 'root' }]
37
- }], ctorParameters: function () { return [{ type: i1.AppStore }]; } });
38
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLnF1ZXJ5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbXlybWlkb24vY2FkbXVzLXN0YXRlL3NyYy9saWIvYXBwLnF1ZXJ5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFHM0MsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLGlCQUFpQixDQUFDOzs7QUFXeEMsTUFBTSxPQUFPLFFBQVMsU0FBUSxLQUFlO0lBQzNDLFlBQStCLEtBQWU7UUFDNUMsS0FBSyxDQUFDLEtBQUssQ0FBQyxDQUFDO1FBRGdCLFVBQUssR0FBTCxLQUFLLENBQVU7SUFFOUMsQ0F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GVzYXVydXMoKTogT2JzZXJ2YWJsZTxUaGVzYXVydXMgfCB1bmRlZmluZWQ+IHtcclxuICAgIHJldHVybiB0aGlzLnNlbGVjdCgoc3RhdGUpID0+IHN0YXRlLnR5cGVUaGVzYXVydXMpO1xyXG4gIH1cclxuXHJcbiAgcHVibGljIHNlbGVjdEl0ZW1Ccm93c2VyVGhlc2F1cnVzKCk6IE9ic2VydmFibGU8VGhlc2F1cnVzIHwgdW5kZWZpbmVkPiB7XHJcbiAgICByZXR1cm4gdGhpcy5zZWxlY3QoKHN0YXRlKSA9PiBzdGF0ZS5pdGVtQnJvd3NlclRoZXNhdXJ1cyk7XHJcbiAgfVxyXG5cclxuICBwdWJsaWMgc2VsZWN0UHJldmlld0pLZXlzKCk6IE9ic2VydmFibGU8c3RyaW5nW10+IHtcclxuICAgIHJldHVybiB0aGlzLnNlbGVjdCgoc3RhdGUpID0+IHN0YXRlLnByZXZpZXdKS2V5cyk7XHJcbiAgfVxyXG5cclxuICBwdWJsaWMgc2VsZWN0UHJldmlld0ZLZXlzKCk6IE9ic2VydmFibGU8c3RyaW5nW10+IHtcclxuICAgIHJldHVybiB0aGlzLnNlbGVjdCgoc3RhdGUpID0+IHN0YXRlLnByZXZpZXdGS2V5cyk7XHJcbiAgfVxyXG5cclxuICBwdWJsaWMgc2VsZWN0UHJldmlld0NLZXlzKCk6IE9ic2VydmFibGU8c3RyaW5nW10+IHtcclxuICAgIHJldHVybiB0aGlzLnNlbGVjdCgoc3RhdGUpID0+IHN0YXRlLnByZXZpZXdDS2V5cyk7XHJcbiAgfVxyXG59XHJcbiJdfQ==
@@ -1,60 +0,0 @@
1
- import { Injectable } from '@angular/core';
2
- import { forkJoin } from 'rxjs';
3
- import * as i0 from "@angular/core";
4
- import * as i1 from "./app.store";
5
- import * as i2 from "@myrmidon/cadmus-api";
6
- export class AppService {
7
- constructor(_store, _facetService, _flagService, _thesaurusService, _previewService) {
8
- this._store = _store;
9
- this._facetService = _facetService;
10
- this._flagService = _flagService;
11
- this._thesaurusService = _thesaurusService;
12
- this._previewService = _previewService;
13
- }
14
- load() {
15
- this._store.setLoading(true);
16
- const facets$ = this._facetService.getFacets();
17
- const flags$ = this._flagService.getFlags();
18
- const thesauri$ = this._thesaurusService.getThesauriSet([
19
- 'model-types@en',
20
- 'item-browsers@en',
21
- ]);
22
- const jKeys$ = this._previewService.getKeys('J');
23
- const fKeys$ = this._previewService.getKeys('F');
24
- const cKeys$ = this._previewService.getKeys('C');
25
- forkJoin({
26
- facets: facets$,
27
- flags: flags$,
28
- thesauri: thesauri$,
29
- jKeys: jKeys$,
30
- fKeys: fKeys$,
31
- cKeys: cKeys$
32
- }).subscribe({
33
- next: (result) => {
34
- this._store.setLoading(false);
35
- this._store.setError(null);
36
- this._store.update({
37
- facets: result.facets,
38
- flags: result.flags,
39
- typeThesaurus: result.thesauri['model-types'],
40
- itemBrowserThesaurus: result.thesauri['item-browsers'],
41
- previewJKeys: result.jKeys,
42
- previewFKeys: result.fKeys,
43
- previewCKeys: result.cKeys
44
- });
45
- },
46
- error: (error) => {
47
- console.error(error);
48
- this._store.setLoading(false);
49
- this._store.setError('Error loading app state');
50
- },
51
- });
52
- }
53
- }
54
- AppService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AppService, deps: [{ token: i1.AppStore }, { token: i2.FacetService }, { token: i2.FlagService }, { token: i2.ThesaurusService }, { token: i2.PreviewService }], target: i0.ɵɵFactoryTarget.Injectable });
55
- AppService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AppService, providedIn: 'root' });
56
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AppService, decorators: [{
57
- type: Injectable,
58
- args: [{ providedIn: 'root' }]
59
- }], ctorParameters: function () { return [{ type: i1.AppStore }, { type: i2.FacetService }, { type: i2.FlagService }, { type: i2.ThesaurusService }, { type: i2.P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ChyZXN1bHQpID0+IHtcclxuICAgICAgICB0aGlzLl9zdG9yZS5zZXRMb2FkaW5nKGZhbHNlKTtcclxuICAgICAgICB0aGlzLl9zdG9yZS5zZXRFcnJvcihudWxsKTtcclxuXHJcbiAgICAgICAgdGhpcy5fc3RvcmUudXBkYXRlKHtcclxuICAgICAgICAgIGZhY2V0czogcmVzdWx0LmZhY2V0cyxcclxuICAgICAgICAgIGZsYWdzOiByZXN1bHQuZmxhZ3MsXHJcbiAgICAgICAgICB0eXBlVGhlc2F1cnVzOiByZXN1bHQudGhlc2F1cmlbJ21vZGVsLXR5cGVzJ10sXHJcbiAgICAgICAgICBpdGVtQnJvd3NlclRoZXNhdXJ1czogcmVzdWx0LnRoZXNhdXJpWydpdGVtLWJyb3dzZXJzJ10sXHJcbiAgICAgICAgICBwcmV2aWV3SktleXM6IHJlc3VsdC5qS2V5cyxcclxuICAgICAgICAgIHByZXZpZXdGS2V5czogcmVzdWx0LmZLZXlzLFxyXG4gICAgICAgICAgcHJldmlld0NLZXlzOiByZXN1bHQuY0tleXNcclxuICAgICAgICB9KTtcclxuICAgICAgfSxcclxuICAgICAgZXJyb3I6IChlcnJvcikgPT4ge1xyXG4gICAgICAgIGNvbnNvbGUuZXJyb3IoZXJyb3IpO1xyXG4gICAgICAgIHRoaXMuX3N0b3JlLnNldExvYWRpbmcoZmFsc2UpO1xyXG4gICAgICAgIHRoaXMuX3N0b3JlLnNldEVycm9yKCdFcnJvciBsb2FkaW5nIGFwcCBzdGF0ZScpO1xyXG4gICAgICB9LFxyXG4gICAgfSk7XHJcbiAgfVxyXG59XHJcbiJdfQ==
@@ -1,27 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { Injectable } from '@angular/core';
3
- import { StoreConfig, Store } from '@datorama/akita';
4
- import * as i0 from "@angular/core";
5
- const initialState = {
6
- facets: [],
7
- flags: [],
8
- previewJKeys: [],
9
- previewFKeys: [],
10
- previewCKeys: [],
11
- };
12
- let AppStore = class AppStore extends Store {
13
- constructor() {
14
- super(initialState);
15
- }
16
- };
17
- AppStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AppStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
18
- AppStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AppStore, providedIn: 'root' });
19
- AppStore = __decorate([
20
- StoreConfig({ name: 'app', resettable: false })
21
- ], AppStore);
22
- export { AppStore };
23
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AppStore, decorators: [{
24
- type: Injectable,
25
- args: [{ providedIn: 'root' }]
26
- }], ctorParameters: function () { return []; } });
27
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLnN0b3JlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbXlybWlkb24vY2FkbXVzLXN0YXRlL3NyYy9saWIvYXBwLnN0b3JlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFLQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRTNDLE9BQU8sRUFBRSxXQUFXLEVBQUUsS0FBSyxFQUFFLE1BQU0saUJBQWlCLENBQUM7O0FBMkNyRCxNQUFNLFlBQVksR0FBYTtJQUM3QixNQUFNLEVBQUUsRUFBRTtJQUNWLEtBQUssRUFBRSxFQUFFO0lBQ1QsWUFBWSxFQUFFLEVBQUU7SUFDaEIsWUFBWSxFQUFFLEVBQUU7SUFDaEIsWUFBWSxFQUFFLEVBQUU7Q0FDakIsQ0FBQztJQUlXLFFBQVEsU0FBUixRQUFTLFNBQVEsS0FBZTtJQUMzQztRQUNFLEtBQUssQ0FBQyxZQUFZLENBQUMsQ0FBQztJQUN0QixDQUFDO0NBQ0YsQ0FBQTtxR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