@myrmidon/cadmus-state 0.0.9 → 0.3.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.
Files changed (78) hide show
  1. package/README.md +24 -24
  2. package/esm2020/lib/app.query.mjs +29 -0
  3. package/esm2020/lib/app.service.mjs +43 -0
  4. package/esm2020/lib/app.store.mjs +24 -0
  5. package/esm2020/lib/cadmus-state.module.mjs +38 -0
  6. package/esm2020/lib/edit-fragment-feature-base.mjs +118 -0
  7. package/esm2020/lib/edit-fragment-query-base.mjs +32 -0
  8. package/esm2020/lib/edit-fragment-service-base.mjs +140 -0
  9. package/esm2020/lib/edit-fragment.store.mjs +36 -0
  10. package/esm2020/lib/edit-item.query.mjs +52 -0
  11. package/esm2020/lib/edit-item.service.mjs +182 -0
  12. package/esm2020/lib/edit-item.store.mjs +40 -0
  13. package/esm2020/lib/edit-layer-part.query.mjs +35 -0
  14. package/esm2020/lib/edit-layer-part.service.mjs +230 -0
  15. package/esm2020/lib/edit-layer-part.store.mjs +49 -0
  16. package/esm2020/lib/edit-part-feature-base.mjs +116 -0
  17. package/esm2020/lib/edit-part-query-base.mjs +25 -0
  18. package/esm2020/lib/edit-part-service-base.mjs +120 -0
  19. package/esm2020/lib/edit-part.store.mjs +31 -0
  20. package/esm2020/lib/edit-thesaurus.query.mjs +26 -0
  21. package/esm2020/lib/edit-thesaurus.service.mjs +59 -0
  22. package/esm2020/lib/edit-thesaurus.store.mjs +30 -0
  23. package/{esm2015/myrmidon-cadmus-state.js → esm2020/myrmidon-cadmus-state.mjs} +1 -1
  24. package/{esm2015/public-api.js → esm2020/public-api.mjs} +1 -1
  25. package/fesm2015/myrmidon-cadmus-state.mjs +1408 -0
  26. package/fesm2015/myrmidon-cadmus-state.mjs.map +1 -0
  27. package/{fesm2015/myrmidon-cadmus-state.js → fesm2020/myrmidon-cadmus-state.mjs} +189 -207
  28. package/fesm2020/myrmidon-cadmus-state.mjs.map +1 -0
  29. package/lib/app.query.d.ts +7 -4
  30. package/lib/app.service.d.ts +4 -1
  31. package/lib/app.store.d.ts +5 -2
  32. package/lib/cadmus-state.module.d.ts +9 -0
  33. package/lib/edit-fragment-feature-base.d.ts +7 -7
  34. package/lib/edit-fragment-query-base.d.ts +5 -5
  35. package/lib/edit-fragment-service-base.d.ts +1 -1
  36. package/lib/edit-fragment.store.d.ts +5 -2
  37. package/lib/edit-item.query.d.ts +9 -6
  38. package/lib/edit-item.service.d.ts +5 -2
  39. package/lib/edit-item.store.d.ts +8 -5
  40. package/lib/edit-layer-part.query.d.ts +9 -6
  41. package/lib/edit-layer-part.service.d.ts +5 -2
  42. package/lib/edit-layer-part.store.d.ts +6 -3
  43. package/lib/edit-part-feature-base.d.ts +9 -9
  44. package/lib/edit-part-query-base.d.ts +4 -4
  45. package/lib/edit-part-service-base.d.ts +3 -3
  46. package/lib/edit-part.store.d.ts +5 -3
  47. package/lib/edit-thesaurus.query.d.ts +5 -3
  48. package/lib/edit-thesaurus.service.d.ts +5 -2
  49. package/lib/edit-thesaurus.store.d.ts +4 -1
  50. package/myrmidon-cadmus-state.d.ts +1 -0
  51. package/package.json +25 -13
  52. package/bundles/myrmidon-cadmus-state.umd.js +0 -1812
  53. package/bundles/myrmidon-cadmus-state.umd.js.map +0 -1
  54. package/bundles/myrmidon-cadmus-state.umd.min.js +0 -16
  55. package/bundles/myrmidon-cadmus-state.umd.min.js.map +0 -1
  56. package/esm2015/lib/app.query.js +0 -31
  57. package/esm2015/lib/app.service.js +0 -49
  58. package/esm2015/lib/app.store.js +0 -25
  59. package/esm2015/lib/cadmus-state.module.js +0 -19
  60. package/esm2015/lib/edit-fragment-feature-base.js +0 -116
  61. package/esm2015/lib/edit-fragment-query-base.js +0 -32
  62. package/esm2015/lib/edit-fragment-service-base.js +0 -137
  63. package/esm2015/lib/edit-fragment.store.js +0 -38
  64. package/esm2015/lib/edit-item.query.js +0 -56
  65. package/esm2015/lib/edit-item.service.js +0 -188
  66. package/esm2015/lib/edit-item.store.js +0 -46
  67. package/esm2015/lib/edit-layer-part.query.js +0 -37
  68. package/esm2015/lib/edit-layer-part.service.js +0 -235
  69. package/esm2015/lib/edit-layer-part.store.js +0 -52
  70. package/esm2015/lib/edit-part-feature-base.js +0 -116
  71. package/esm2015/lib/edit-part-query-base.js +0 -25
  72. package/esm2015/lib/edit-part-service-base.js +0 -121
  73. package/esm2015/lib/edit-part.store.js +0 -38
  74. package/esm2015/lib/edit-thesaurus.query.js +0 -28
  75. package/esm2015/lib/edit-thesaurus.service.js +0 -63
  76. package/esm2015/lib/edit-thesaurus.store.js +0 -36
  77. package/fesm2015/myrmidon-cadmus-state.js.map +0 -1
  78. package/myrmidon-cadmus-state.metadata.json +0 -1
@@ -1,31 +1,34 @@
1
- import { ɵɵdefineInjectable, Injectable, ɵɵinject, NgModule } from '@angular/core';
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, NgModule } from '@angular/core';
2
3
  import { Store, StoreConfig, Query } from '@datorama/akita';
3
4
  import { __decorate } from 'tslib';
4
- import { FacetService, FlagService, ThesaurusService, ItemService, CadmusApiModule } from '@myrmidon/cadmus-api';
5
5
  import { forkJoin } from 'rxjs';
6
- import { LibraryRouteService, TokenLocation, deepCopy, CadmusCoreModule } from '@myrmidon/cadmus-core';
6
+ import * as i2 from '@myrmidon/cadmus-api';
7
+ import { CadmusApiModule } from '@myrmidon/cadmus-api';
8
+ import * as i2$1 from '@myrmidon/cadmus-core';
9
+ import { TokenLocation, CadmusCoreModule } from '@myrmidon/cadmus-core';
10
+ import { deepCopy, NgToolsModule } from '@myrmidon/ng-tools';
7
11
  import { CommonModule } from '@angular/common';
8
12
  import { CadmusMaterialModule } from '@myrmidon/cadmus-material';
9
13
 
10
- const initialState = {
14
+ const initialState$2 = {
11
15
  facets: [],
12
16
  flags: [],
13
- typeThesaurus: null,
14
- itemBrowserThesaurus: null,
15
17
  };
16
18
  let AppStore = class AppStore extends Store {
17
19
  constructor() {
18
- super(initialState);
20
+ super(initialState$2);
19
21
  }
20
22
  };
21
- AppStore.ɵprov = ɵɵdefineInjectable({ factory: function AppStore_Factory() { return new AppStore(); }, token: AppStore, providedIn: "root" });
22
- AppStore.decorators = [
23
- { type: Injectable, args: [{ providedIn: 'root' },] }
24
- ];
25
- AppStore.ctorParameters = () => [];
23
+ AppStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: AppStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
24
+ AppStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: AppStore, providedIn: 'root' });
26
25
  AppStore = __decorate([
27
26
  StoreConfig({ name: 'app', resettable: false })
28
- ], AppStore);
27
+ ], AppStore);
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: AppStore, decorators: [{
29
+ type: Injectable,
30
+ args: [{ providedIn: 'root' }]
31
+ }], ctorParameters: function () { return []; } });
29
32
 
30
33
  class AppQuery extends Query {
31
34
  constructor(store) {
@@ -45,13 +48,12 @@ class AppQuery extends Query {
45
48
  return this.select((state) => state.itemBrowserThesaurus);
46
49
  }
47
50
  }
48
- AppQuery.ɵprov = ɵɵdefineInjectable({ factory: function AppQuery_Factory() { return new AppQuery(ɵɵinject(AppStore)); }, token: AppQuery, providedIn: "root" });
49
- AppQuery.decorators = [
50
- { type: Injectable, args: [{ providedIn: 'root' },] }
51
- ];
52
- AppQuery.ctorParameters = () => [
53
- { type: AppStore }
54
- ];
51
+ AppQuery.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: AppQuery, deps: [{ token: AppStore }], target: i0.ɵɵFactoryTarget.Injectable });
52
+ AppQuery.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: AppQuery, providedIn: 'root' });
53
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: AppQuery, decorators: [{
54
+ type: Injectable,
55
+ args: [{ providedIn: 'root' }]
56
+ }], ctorParameters: function () { return [{ type: AppStore }]; } });
55
57
 
56
58
  class AppService {
57
59
  constructor(_store, _facetService, _flagService, _thesaurusService) {
@@ -84,28 +86,17 @@ class AppService {
84
86
  });
85
87
  }
86
88
  }
87
- AppService.ɵprov = ɵɵdefineInjectable({ factory: function AppService_Factory() { return new AppService(ɵɵinject(AppStore), ɵɵinject(FacetService), ɵɵinject(FlagService), ɵɵinject(ThesaurusService)); }, token: AppService, providedIn: "root" });
88
- AppService.decorators = [
89
- { type: Injectable, args: [{ providedIn: 'root' },] }
90
- ];
91
- AppService.ctorParameters = () => [
92
- { type: AppStore },
93
- { type: FacetService },
94
- { type: FlagService },
95
- { type: ThesaurusService }
96
- ];
89
+ AppService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: AppService, deps: [{ token: AppStore }, { token: i2.FacetService }, { token: i2.FlagService }, { token: i2.ThesaurusService }], target: i0.ɵɵFactoryTarget.Injectable });
90
+ AppService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: AppService, providedIn: 'root' });
91
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: AppService, decorators: [{
92
+ type: Injectable,
93
+ args: [{ providedIn: 'root' }]
94
+ }], ctorParameters: function () { return [{ type: AppStore }, { type: i2.FacetService }, { type: i2.FlagService }, { type: i2.ThesaurusService }]; } });
97
95
 
98
96
  const initialState$1 = {
99
- item: null,
100
97
  parts: [],
101
98
  partGroups: [],
102
99
  layerPartInfos: [],
103
- facet: null,
104
- dirty: false,
105
- saving: false,
106
- deletingPart: false,
107
- loading: false,
108
- error: null
109
100
  };
110
101
  let EditItemStore = class EditItemStore extends Store {
111
102
  constructor() {
@@ -113,28 +104,29 @@ let EditItemStore = class EditItemStore extends Store {
113
104
  }
114
105
  setDirty(value = true) {
115
106
  this.update({
116
- dirty: value
107
+ dirty: value,
117
108
  });
118
109
  }
119
110
  setSaving(value = true) {
120
111
  this.update({
121
- saving: value
112
+ saving: value,
122
113
  });
123
114
  }
124
115
  setDeletingPart(value = true) {
125
116
  this.update({
126
- deletingPart: value
117
+ deletingPart: value,
127
118
  });
128
119
  }
129
120
  };
130
- EditItemStore.ɵprov = ɵɵdefineInjectable({ factory: function EditItemStore_Factory() { return new EditItemStore(); }, token: EditItemStore, providedIn: "root" });
131
- EditItemStore.decorators = [
132
- { type: Injectable, args: [{ providedIn: 'root' },] }
133
- ];
134
- EditItemStore.ctorParameters = () => [];
121
+ EditItemStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditItemStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
122
+ EditItemStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditItemStore, providedIn: 'root' });
135
123
  EditItemStore = __decorate([
136
124
  StoreConfig({ name: 'edit-item', resettable: true })
137
- ], EditItemStore);
125
+ ], EditItemStore);
126
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditItemStore, decorators: [{
127
+ type: Injectable,
128
+ args: [{ providedIn: 'root' }]
129
+ }], ctorParameters: function () { return []; } });
138
130
 
139
131
  /**
140
132
  * The query facade to the edit item store.
@@ -160,14 +152,14 @@ class EditItemQuery extends Query {
160
152
  selectDeletingPart() {
161
153
  return this.select((state) => state.deletingPart);
162
154
  }
163
- hasItem(id = null) {
155
+ hasItem(id) {
164
156
  const item = this.getValue().item;
165
157
  if (!item || (id && id !== item.id)) {
166
158
  return false;
167
159
  }
168
160
  return true;
169
161
  }
170
- getEditorKeyFromPartTypeId(typeId, roleId = null) {
162
+ getEditorKeyFromPartTypeId(typeId, roleId) {
171
163
  const facet = this.getValue().facet;
172
164
  if (!facet) {
173
165
  return 'default';
@@ -176,14 +168,12 @@ class EditItemQuery extends Query {
176
168
  .partKey;
177
169
  }
178
170
  }
179
- EditItemQuery.ɵprov = ɵɵdefineInjectable({ factory: function EditItemQuery_Factory() { return new EditItemQuery(ɵɵinject(EditItemStore), ɵɵinject(LibraryRouteService)); }, token: EditItemQuery, providedIn: "root" });
180
- EditItemQuery.decorators = [
181
- { type: Injectable, args: [{ providedIn: 'root' },] }
182
- ];
183
- EditItemQuery.ctorParameters = () => [
184
- { type: EditItemStore },
185
- { type: LibraryRouteService }
186
- ];
171
+ EditItemQuery.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditItemQuery, deps: [{ token: EditItemStore }, { token: i2$1.LibraryRouteService }], target: i0.ɵɵFactoryTarget.Injectable });
172
+ EditItemQuery.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditItemQuery, providedIn: 'root' });
173
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditItemQuery, decorators: [{
174
+ type: Injectable,
175
+ args: [{ providedIn: 'root' }]
176
+ }], ctorParameters: function () { return [{ type: EditItemStore }, { type: i2$1.LibraryRouteService }]; } });
187
177
 
188
178
  /**
189
179
  * The service which handles the edit item store.
@@ -196,7 +186,7 @@ class EditItemService {
196
186
  }
197
187
  pickDefaultFacet(facets) {
198
188
  if (!facets.length) {
199
- return null;
189
+ return undefined;
200
190
  }
201
191
  // if there is a facet with id="default", pick it
202
192
  const defaultFacet = facets.find((f) => f.id === 'default');
@@ -212,9 +202,9 @@ class EditItemService {
212
202
  */
213
203
  load(itemId) {
214
204
  this._store.setLoading(true);
215
- const layers$ = this._itemService.getItemLayerInfo(itemId, true);
216
205
  const appState = this._appQuery.getValue();
217
206
  // if not a new item, include it in load
207
+ const layers$ = this._itemService.getItemLayerInfo(itemId || '', true);
218
208
  if (itemId) {
219
209
  forkJoin({
220
210
  item: this._itemService.getItem(itemId, true),
@@ -229,7 +219,7 @@ class EditItemService {
229
219
  this._store.update({
230
220
  item: result.item,
231
221
  parts: result.item.parts,
232
- partGroups: this._itemService.groupParts(result.item.parts, facetParts),
222
+ partGroups: this._itemService.groupParts(result.item.parts || [], facetParts),
233
223
  layerPartInfos: result.layers,
234
224
  facet: appState.facets.find((f) => f.id === result.item.facetId),
235
225
  });
@@ -248,17 +238,17 @@ class EditItemService {
248
238
  this._store.setError(null);
249
239
  this._store.update({
250
240
  item: {
251
- id: null,
252
- title: null,
253
- description: null,
254
- facetId: null,
255
- groupId: null,
256
- sortKey: null,
241
+ id: '',
242
+ title: '',
243
+ description: '',
244
+ facetId: '',
245
+ groupId: '',
246
+ sortKey: '',
257
247
  flags: 0,
258
248
  timeCreated: new Date(),
259
- creatorId: null,
249
+ creatorId: '',
260
250
  timeModified: new Date(),
261
- userId: null,
251
+ userId: '',
262
252
  },
263
253
  parts: [],
264
254
  partGroups: [],
@@ -309,7 +299,7 @@ class EditItemService {
309
299
  this._itemService.deletePart(id).subscribe((_) => {
310
300
  this._store.setDeletingPart(false);
311
301
  // reload the store
312
- this.load(this._store.getValue().item.id);
302
+ this.load(this._store.getValue().item?.id);
313
303
  resolve(id);
314
304
  }, (error) => {
315
305
  console.log(error);
@@ -324,9 +314,9 @@ class EditItemService {
324
314
  itemId,
325
315
  typeId,
326
316
  roleId,
327
- id: null,
328
- creatorId: null,
329
- userId: null,
317
+ id: '',
318
+ creatorId: '',
319
+ userId: '',
330
320
  timeCreated: new Date(),
331
321
  timeModified: new Date(),
332
322
  };
@@ -334,7 +324,7 @@ class EditItemService {
334
324
  this._itemService.addPart(part).subscribe((_) => {
335
325
  this._store.setSaving(false);
336
326
  // reload the store
337
- this.load(this._store.getValue().item.id);
327
+ this.load(this._store.getValue().item?.id);
338
328
  }, (error) => {
339
329
  console.log(error);
340
330
  this._store.setSaving(false);
@@ -346,7 +336,7 @@ class EditItemService {
346
336
  this._itemService.setPartThesaurusScope(ids, scope).subscribe((_) => {
347
337
  this._store.setSaving(false);
348
338
  // reload the store
349
- this.load(this._store.getValue().item.id);
339
+ this.load(this._store.getValue().item?.id);
350
340
  }, (error) => {
351
341
  console.log(error);
352
342
  this._store.setSaving(false);
@@ -354,15 +344,12 @@ class EditItemService {
354
344
  });
355
345
  }
356
346
  }
357
- EditItemService.ɵprov = ɵɵdefineInjectable({ factory: function EditItemService_Factory() { return new EditItemService(ɵɵinject(EditItemStore), ɵɵinject(AppQuery), ɵɵinject(ItemService)); }, token: EditItemService, providedIn: "root" });
358
- EditItemService.decorators = [
359
- { type: Injectable, args: [{ providedIn: 'root' },] }
360
- ];
361
- EditItemService.ctorParameters = () => [
362
- { type: EditItemStore },
363
- { type: AppQuery },
364
- { type: ItemService }
365
- ];
347
+ EditItemService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditItemService, deps: [{ token: EditItemStore }, { token: AppQuery }, { token: i2.ItemService }], target: i0.ɵɵFactoryTarget.Injectable });
348
+ EditItemService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditItemService, providedIn: 'root' });
349
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditItemService, decorators: [{
350
+ type: Injectable,
351
+ args: [{ providedIn: 'root' }]
352
+ }], ctorParameters: function () { return [{ type: EditItemStore }, { type: AppQuery }, { type: i2.ItemService }]; } });
366
353
 
367
354
  /**
368
355
  * Base class for fragment feature editors.
@@ -370,7 +357,6 @@ EditItemService.ctorParameters = () => [
370
357
  */
371
358
  class EditFragmentFeatureBase {
372
359
  constructor(_router, route, snackbar, _editFrQuery, _editFrService, _editItemQuery, _editItemService, _editLayersQuery, _editLayersService, _libraryRouteService) {
373
- var _a;
374
360
  this._router = _router;
375
361
  this.snackbar = snackbar;
376
362
  this._editFrQuery = _editFrQuery;
@@ -380,15 +366,18 @@ class EditFragmentFeatureBase {
380
366
  this._editLayersQuery = _editLayersQuery;
381
367
  this._editLayersService = _editLayersService;
382
368
  this._libraryRouteService = _libraryRouteService;
369
+ this.fragment$ = this._editFrQuery.selectFragment();
370
+ this.thesauri$ = this._editFrQuery.selectThesauri();
371
+ this.baseText$ = this._editLayersQuery.select((state) => state.baseText);
383
372
  this.itemId = route.snapshot.params.iid;
384
373
  this.partId = route.snapshot.params.pid;
385
- this.frTypeId = (_a = route.snapshot.url[2]) === null || _a === void 0 ? void 0 : _a.path;
374
+ this.frTypeId = route.snapshot.url[2]?.path;
386
375
  this.loc = route.snapshot.params.loc;
387
376
  this.frRoleId = route.snapshot.queryParams.frrid;
388
377
  // connect _stateDirty to the value of the edit state
389
378
  this._editFrQuery.selectDirty().subscribe((d) => {
390
379
  console.log('fr dirty change (from state): ' + d);
391
- this._stateDirty = d;
380
+ this._stateDirty = d ? true : false;
392
381
  });
393
382
  }
394
383
  /**
@@ -421,7 +410,7 @@ class EditFragmentFeatureBase {
421
410
  this.fragment$ = this._editFrQuery.selectFragment();
422
411
  this.thesauri$ = this._editFrQuery.selectThesauri();
423
412
  this.baseText$ = this._editLayersQuery.select((state) => state.baseText);
424
- this.frLoc = TokenLocation.parse(this.loc);
413
+ this.frLoc = TokenLocation.parse(this.loc) ?? undefined;
425
414
  // load item if required
426
415
  this.ensureItemLoaded(this.itemId);
427
416
  // load layers if required
@@ -511,12 +500,9 @@ class EditFragmentQueryBase extends Query {
511
500
  }
512
501
 
513
502
  const editFragmentInitialState = {
514
- fragment: null,
515
- thesauri: null,
516
503
  dirty: false,
517
504
  saving: false,
518
505
  loading: false,
519
- error: null,
520
506
  };
521
507
  /**
522
508
  * General-purpose edit-fragment store. This can be used with any fragment,
@@ -534,14 +520,15 @@ let EditFragmentStore = class EditFragmentStore extends Store {
534
520
  this.update({ saving: value });
535
521
  }
536
522
  };
537
- EditFragmentStore.ɵprov = ɵɵdefineInjectable({ factory: function EditFragmentStore_Factory() { return new EditFragmentStore(); }, token: EditFragmentStore, providedIn: "root" });
538
- EditFragmentStore.decorators = [
539
- { type: Injectable, args: [{ providedIn: 'root' },] }
540
- ];
541
- EditFragmentStore.ctorParameters = () => [];
523
+ EditFragmentStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditFragmentStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
524
+ EditFragmentStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditFragmentStore, providedIn: 'root' });
542
525
  EditFragmentStore = __decorate([
543
526
  StoreConfig({ name: 'edit-fragment' })
544
- ], EditFragmentStore);
527
+ ], EditFragmentStore);
528
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditFragmentStore, decorators: [{
529
+ type: Injectable,
530
+ args: [{ providedIn: 'root' }]
531
+ }], ctorParameters: function () { return []; } });
545
532
 
546
533
  /**
547
534
  * Base class for fragment editor services.
@@ -560,13 +547,16 @@ class EditFragmentServiceBase {
560
547
  * @param thesauriIds The thesauri IDs array, or null.
561
548
  */
562
549
  load(partId, loc, thesauriIds = null) {
550
+ if (!this.store) {
551
+ return;
552
+ }
563
553
  // signal that we're loading
564
554
  this.store.setLoading(true);
565
555
  // if thesauri are required:
566
556
  if (thesauriIds) {
567
557
  // remove trailing ! from IDs if any
568
558
  const unscopedIds = thesauriIds.map((id) => {
569
- return this._thesaurusService.getScopedId(id, null);
559
+ return this._thesaurusService.getScopedId(id);
570
560
  });
571
561
  // fetch fragment and thesauri
572
562
  forkJoin({
@@ -598,9 +588,9 @@ class EditFragmentServiceBase {
598
588
  });
599
589
  }
600
590
  // if the loaded layer part has a thesaurus scope, reload the thesauri
601
- if (result.part.thesaurusScope) {
591
+ if (result.part?.thesaurusScope) {
602
592
  const scopedIds = thesauriIds.map((id) => {
603
- return this._thesaurusService.getScopedId(id, result.part.thesaurusScope);
593
+ return this._thesaurusService.getScopedId(id, result.part?.thesaurusScope);
604
594
  });
605
595
  // loading again
606
596
  this.store.setLoading(true);
@@ -708,12 +698,12 @@ class EditPartFeatureBase {
708
698
  // part ID or null (if "new")
709
699
  this.partId = route.snapshot.params.pid;
710
700
  if (this.partId === 'new') {
711
- this.partId = null;
701
+ this.partId = undefined;
712
702
  }
713
703
  // role ID or null (if "default")
714
704
  this.roleId = route.snapshot.queryParams.rid;
715
705
  if (this.roleId === 'default') {
716
- this.roleId = null;
706
+ this.roleId = undefined;
717
707
  }
718
708
  // connect _stateDirty to the value observed in the part state
719
709
  this._editPartQuery.selectDirty().subscribe((d) => {
@@ -812,10 +802,10 @@ class EditPartQueryBase extends Query {
812
802
  return this.select((state) => state.saving);
813
803
  }
814
804
  selectPart() {
815
- return this.select((state) => state.part);
805
+ return this.select((state) => state.part || undefined);
816
806
  }
817
807
  selectThesauri() {
818
- return this.select((state) => state.thesauri);
808
+ return this.select((state) => state.thesauri || undefined);
819
809
  }
820
810
  }
821
811
 
@@ -834,26 +824,25 @@ class EditPartServiceBase {
834
824
  * it will get a null ID, but use the specified itemId and roleId.
835
825
  *
836
826
  * @param partId The part ID, unless it's a new part.
837
- * @param thesauriIds The thesauri IDs array, or null.
827
+ * @param thesauriIds The thesauri IDs array.
838
828
  * @param itemId The item ID for the new part.
839
829
  * @param typeId The part type ID for the new part.
840
830
  * @param roleId The role ID for the new part.
841
831
  */
842
- load(partId, thesauriIds = null, itemId, typeId, roleId) {
832
+ load(partId, thesauriIds, itemId, typeId, roleId) {
843
833
  // signal that we're loading
844
834
  this.store.setLoading(true);
845
835
  // if thesauri are required:
846
836
  if (thesauriIds) {
847
837
  // remove trailing ! from IDs if any
848
838
  const unscopedIds = thesauriIds.map((id) => {
849
- return this.thesaurusService.getScopedId(id, null);
839
+ return this.thesaurusService.getScopedId(id);
850
840
  });
851
841
  // fetch part and thesauri
852
842
  forkJoin({
853
- part: this.itemService.getPart(partId),
843
+ part: this.itemService.getPart(partId || ''),
854
844
  thesauri: this.thesaurusService.getThesauriSet(unscopedIds),
855
845
  }).subscribe((result) => {
856
- var _a;
857
846
  // loading has ended
858
847
  this.store.setLoading(false);
859
848
  // update the store with a new or existing part,
@@ -868,13 +857,13 @@ class EditPartServiceBase {
868
857
  thesauri: result.thesauri,
869
858
  });
870
859
  // if the loaded part has a thesaurus scope, reload the thesauri
871
- if ((_a = result.part) === null || _a === void 0 ? void 0 : _a.thesaurusScope) {
860
+ if (result.part?.thesaurusScope) {
872
861
  const scopedIds = thesauriIds.map((id) => {
873
- return this.thesaurusService.getScopedId(id, result.part.thesaurusScope);
862
+ return this.thesaurusService.getScopedId(id, result.part?.thesaurusScope);
874
863
  });
875
864
  // loading again
876
865
  this.store.setLoading(true);
877
- this.thesaurusService.getThesauriSet(thesauriIds).subscribe((thesauri) => {
866
+ this.thesaurusService.getThesauriSet(scopedIds).subscribe((thesauri) => {
878
867
  // completed, replace the thesauri
879
868
  this.store.update({
880
869
  thesauri,
@@ -890,7 +879,7 @@ class EditPartServiceBase {
890
879
  }
891
880
  else {
892
881
  // without thesauri to be fetched, just fetch the part
893
- this.itemService.getPart(partId).subscribe((part) => {
882
+ this.itemService.getPart(partId || '').subscribe((part) => {
894
883
  this.store.update({
895
884
  part: part || {
896
885
  id: null,
@@ -939,14 +928,6 @@ class EditPartServiceBase {
939
928
  }
940
929
  }
941
930
 
942
- const editPartInitialState = {
943
- part: null,
944
- thesauri: null,
945
- dirty: false,
946
- saving: false,
947
- loading: false,
948
- error: null
949
- };
950
931
  /**
951
932
  * General-purpose edit-part store. This can be used with any part, so that
952
933
  * you should only provide your part store, query, and service (usually
@@ -954,7 +935,7 @@ const editPartInitialState = {
954
935
  */
955
936
  let EditPartStore = class EditPartStore extends Store {
956
937
  constructor() {
957
- super(editPartInitialState);
938
+ super({});
958
939
  }
959
940
  setDirty(value) {
960
941
  this.update({ dirty: value });
@@ -963,25 +944,22 @@ let EditPartStore = class EditPartStore extends Store {
963
944
  this.update({ saving: value });
964
945
  }
965
946
  };
966
- EditPartStore.ɵprov = ɵɵdefineInjectable({ factory: function EditPartStore_Factory() { return new EditPartStore(); }, token: EditPartStore, providedIn: "root" });
967
- EditPartStore.decorators = [
968
- { type: Injectable, args: [{ providedIn: 'root' },] }
969
- ];
970
- EditPartStore.ctorParameters = () => [];
947
+ EditPartStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditPartStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
948
+ EditPartStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditPartStore, providedIn: 'root' });
971
949
  EditPartStore = __decorate([
972
950
  StoreConfig({ name: 'edit-part' })
973
- ], EditPartStore);
951
+ ], EditPartStore);
952
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditPartStore, decorators: [{
953
+ type: Injectable,
954
+ args: [{ providedIn: 'root' }]
955
+ }], ctorParameters: function () { return []; } });
974
956
 
975
- const initialState$2 = {
976
- part: null,
977
- baseText: null,
978
- baseTextPart: null,
957
+ const initialState = {
979
958
  locations: [],
980
959
  breakChance: -1,
981
960
  layerHints: [],
982
961
  thesauri: {},
983
962
  loading: false,
984
- error: null,
985
963
  deletingFragment: false,
986
964
  savingFragment: false,
987
965
  refreshingBreakChance: false,
@@ -989,7 +967,7 @@ const initialState$2 = {
989
967
  };
990
968
  let EditLayerPartStore = class EditLayerPartStore extends Store {
991
969
  constructor() {
992
- super(initialState$2);
970
+ super(initialState);
993
971
  }
994
972
  setDeletingFragment(value = true) {
995
973
  this.update({ deletingFragment: value });
@@ -1010,14 +988,15 @@ let EditLayerPartStore = class EditLayerPartStore extends Store {
1010
988
  this.update({ locations });
1011
989
  }
1012
990
  };
1013
- EditLayerPartStore.ɵprov = ɵɵdefineInjectable({ factory: function EditLayerPartStore_Factory() { return new EditLayerPartStore(); }, token: EditLayerPartStore, providedIn: "root" });
1014
- EditLayerPartStore.decorators = [
1015
- { type: Injectable, args: [{ providedIn: 'root' },] }
1016
- ];
1017
- EditLayerPartStore.ctorParameters = () => [];
991
+ EditLayerPartStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditLayerPartStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
992
+ EditLayerPartStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditLayerPartStore, providedIn: 'root' });
1018
993
  EditLayerPartStore = __decorate([
1019
994
  StoreConfig({ name: 'edit-layer-part' })
1020
- ], EditLayerPartStore);
995
+ ], EditLayerPartStore);
996
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditLayerPartStore, decorators: [{
997
+ type: Injectable,
998
+ args: [{ providedIn: 'root' }]
999
+ }], ctorParameters: function () { return []; } });
1021
1000
 
1022
1001
  class EditLayerPartQuery extends Query {
1023
1002
  constructor(store) {
@@ -1043,13 +1022,12 @@ class EditLayerPartQuery extends Query {
1043
1022
  return this.select((state) => state.patchingLayer);
1044
1023
  }
1045
1024
  }
1046
- EditLayerPartQuery.ɵprov = ɵɵdefineInjectable({ factory: function EditLayerPartQuery_Factory() { return new EditLayerPartQuery(ɵɵinject(EditLayerPartStore)); }, token: EditLayerPartQuery, providedIn: "root" });
1047
- EditLayerPartQuery.decorators = [
1048
- { type: Injectable, args: [{ providedIn: 'root' },] }
1049
- ];
1050
- EditLayerPartQuery.ctorParameters = () => [
1051
- { type: EditLayerPartStore }
1052
- ];
1025
+ EditLayerPartQuery.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditLayerPartQuery, deps: [{ token: EditLayerPartStore }], target: i0.ɵɵFactoryTarget.Injectable });
1026
+ EditLayerPartQuery.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditLayerPartQuery, providedIn: 'root' });
1027
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditLayerPartQuery, decorators: [{
1028
+ type: Injectable,
1029
+ args: [{ providedIn: 'root' }]
1030
+ }], ctorParameters: function () { return [{ type: EditLayerPartStore }]; } });
1053
1031
 
1054
1032
  class EditLayerPartService {
1055
1033
  constructor(_store, _itemService, _facetService, _thesaurusService) {
@@ -1074,7 +1052,7 @@ class EditLayerPartService {
1074
1052
  * @param partId The layer part ID.
1075
1053
  * @param thesauriIds The optional thesauri IDs to load.
1076
1054
  */
1077
- load(itemId, partId, thesauriIds = null) {
1055
+ load(itemId, partId, thesauriIds) {
1078
1056
  if (this._store.getValue().loading) {
1079
1057
  return;
1080
1058
  }
@@ -1082,7 +1060,7 @@ class EditLayerPartService {
1082
1060
  if (thesauriIds) {
1083
1061
  // remove trailing ! from IDs if any
1084
1062
  const unscopedIds = thesauriIds.map((id) => {
1085
- return this._thesaurusService.getScopedId(id, null);
1063
+ return this._thesaurusService.getScopedId(id);
1086
1064
  });
1087
1065
  forkJoin({
1088
1066
  // TODO: eventually optimize by adding method param to load only fragments locations
@@ -1102,10 +1080,10 @@ class EditLayerPartService {
1102
1080
  layerHints: result.layerHints,
1103
1081
  thesauri: result.thesauri,
1104
1082
  loading: false,
1105
- error: null,
1083
+ error: undefined,
1106
1084
  });
1107
1085
  // if the loaded part has a thesaurus scope, reload the thesauri
1108
- if (result.layerPart.thesaurusScope) {
1086
+ if (result.layerPart?.thesaurusScope) {
1109
1087
  const scopedIds = thesauriIds.map((id) => {
1110
1088
  return this._thesaurusService.getScopedId(id, result.layerPart.thesaurusScope);
1111
1089
  });
@@ -1143,7 +1121,7 @@ class EditLayerPartService {
1143
1121
  breakChance: result.breakChance.chance,
1144
1122
  layerHints: result.layerHints,
1145
1123
  loading: false,
1146
- error: null,
1124
+ error: undefined,
1147
1125
  });
1148
1126
  }, (error) => {
1149
1127
  console.error(error);
@@ -1196,7 +1174,7 @@ class EditLayerPartService {
1196
1174
  return;
1197
1175
  }
1198
1176
  const i = part.fragments.findIndex((p) => {
1199
- return TokenLocation.parse(p.location).overlaps(loc);
1177
+ return TokenLocation.parse(p.location)?.overlaps(loc);
1200
1178
  });
1201
1179
  if (i === -1) {
1202
1180
  return;
@@ -1267,27 +1245,16 @@ class EditLayerPartService {
1267
1245
  });
1268
1246
  }
1269
1247
  }
1270
- EditLayerPartService.ɵprov = ɵɵdefineInjectable({ factory: function EditLayerPartService_Factory() { return new EditLayerPartService(ɵɵinject(EditLayerPartStore), ɵɵinject(ItemService), ɵɵinject(FacetService), ɵɵinject(ThesaurusService)); }, token: EditLayerPartService, providedIn: "root" });
1271
- EditLayerPartService.decorators = [
1272
- { type: Injectable, args: [{ providedIn: 'root' },] }
1273
- ];
1274
- EditLayerPartService.ctorParameters = () => [
1275
- { type: EditLayerPartStore },
1276
- { type: ItemService },
1277
- { type: FacetService },
1278
- { type: ThesaurusService }
1279
- ];
1248
+ EditLayerPartService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditLayerPartService, deps: [{ token: EditLayerPartStore }, { token: i2.ItemService }, { token: i2.FacetService }, { token: i2.ThesaurusService }], target: i0.ɵɵFactoryTarget.Injectable });
1249
+ EditLayerPartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditLayerPartService, providedIn: 'root' });
1250
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditLayerPartService, decorators: [{
1251
+ type: Injectable,
1252
+ args: [{ providedIn: 'root' }]
1253
+ }], ctorParameters: function () { return [{ type: EditLayerPartStore }, { type: i2.ItemService }, { type: i2.FacetService }, { type: i2.ThesaurusService }]; } });
1280
1254
 
1281
- const initialState$3 = {
1282
- thesaurus: null,
1283
- dirty: false,
1284
- saving: false,
1285
- loading: false,
1286
- error: null,
1287
- };
1288
1255
  let EditThesaurusStore = class EditThesaurusStore extends Store {
1289
1256
  constructor() {
1290
- super(initialState$3);
1257
+ super({});
1291
1258
  }
1292
1259
  setDirty(value = true) {
1293
1260
  this.update({
@@ -1300,14 +1267,15 @@ let EditThesaurusStore = class EditThesaurusStore extends Store {
1300
1267
  });
1301
1268
  }
1302
1269
  };
1303
- EditThesaurusStore.ɵprov = ɵɵdefineInjectable({ factory: function EditThesaurusStore_Factory() { return new EditThesaurusStore(); }, token: EditThesaurusStore, providedIn: "root" });
1304
- EditThesaurusStore.decorators = [
1305
- { type: Injectable, args: [{ providedIn: 'root' },] }
1306
- ];
1307
- EditThesaurusStore.ctorParameters = () => [];
1270
+ EditThesaurusStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditThesaurusStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1271
+ EditThesaurusStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditThesaurusStore, providedIn: 'root' });
1308
1272
  EditThesaurusStore = __decorate([
1309
1273
  StoreConfig({ name: 'edit-thesaurus', resettable: true })
1310
- ], EditThesaurusStore);
1274
+ ], EditThesaurusStore);
1275
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditThesaurusStore, decorators: [{
1276
+ type: Injectable,
1277
+ args: [{ providedIn: 'root' }]
1278
+ }], ctorParameters: function () { return []; } });
1311
1279
 
1312
1280
  class EditThesaurusQuery extends Query {
1313
1281
  constructor(store) {
@@ -1317,20 +1285,19 @@ class EditThesaurusQuery extends Query {
1317
1285
  selectThesaurus() {
1318
1286
  return this.select(state => state.thesaurus);
1319
1287
  }
1320
- selectLoading() {
1321
- return this.select(state => state.loading);
1322
- }
1288
+ // public selectLoading(): Observable<boolean | undefined> {
1289
+ // return this.select(state => state.loading);
1290
+ // }
1323
1291
  selectSaving() {
1324
1292
  return this.select(state => state.saving);
1325
1293
  }
1326
1294
  }
1327
- EditThesaurusQuery.ɵprov = ɵɵdefineInjectable({ factory: function EditThesaurusQuery_Factory() { return new EditThesaurusQuery(ɵɵinject(EditThesaurusStore)); }, token: EditThesaurusQuery, providedIn: "root" });
1328
- EditThesaurusQuery.decorators = [
1329
- { type: Injectable, args: [{ providedIn: 'root' },] }
1330
- ];
1331
- EditThesaurusQuery.ctorParameters = () => [
1332
- { type: EditThesaurusStore }
1333
- ];
1295
+ EditThesaurusQuery.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditThesaurusQuery, deps: [{ token: EditThesaurusStore }], target: i0.ɵɵFactoryTarget.Injectable });
1296
+ EditThesaurusQuery.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditThesaurusQuery, providedIn: 'root' });
1297
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditThesaurusQuery, decorators: [{
1298
+ type: Injectable,
1299
+ args: [{ providedIn: 'root' }]
1300
+ }], ctorParameters: function () { return [{ type: EditThesaurusStore }]; } });
1334
1301
 
1335
1302
  class EditThesaurusService {
1336
1303
  constructor(_store, _thesaurusService) {
@@ -1354,7 +1321,7 @@ class EditThesaurusService {
1354
1321
  else {
1355
1322
  this._store.update({
1356
1323
  thesaurus: {
1357
- id: null,
1324
+ id: '',
1358
1325
  language: 'en',
1359
1326
  entries: [],
1360
1327
  },
@@ -1380,28 +1347,43 @@ class EditThesaurusService {
1380
1347
  });
1381
1348
  }
1382
1349
  }
1383
- EditThesaurusService.ɵprov = ɵɵdefineInjectable({ factory: function EditThesaurusService_Factory() { return new EditThesaurusService(ɵɵinject(EditThesaurusStore), ɵɵinject(ThesaurusService)); }, token: EditThesaurusService, providedIn: "root" });
1384
- EditThesaurusService.decorators = [
1385
- { type: Injectable, args: [{ providedIn: 'root' },] }
1386
- ];
1387
- EditThesaurusService.ctorParameters = () => [
1388
- { type: EditThesaurusStore },
1389
- { type: ThesaurusService }
1390
- ];
1350
+ EditThesaurusService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditThesaurusService, deps: [{ token: EditThesaurusStore }, { token: i2.ThesaurusService }], target: i0.ɵɵFactoryTarget.Injectable });
1351
+ EditThesaurusService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditThesaurusService, providedIn: 'root' });
1352
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditThesaurusService, decorators: [{
1353
+ type: Injectable,
1354
+ args: [{ providedIn: 'root' }]
1355
+ }], ctorParameters: function () { return [{ type: EditThesaurusStore }, { type: i2.ThesaurusService }]; } });
1391
1356
 
1392
1357
  class CadmusStateModule {
1393
1358
  }
1394
- CadmusStateModule.decorators = [
1395
- { type: NgModule, args: [{
1396
- imports: [
1397
- CommonModule,
1398
- // Cadmus
1399
- CadmusCoreModule,
1400
- CadmusApiModule,
1401
- CadmusMaterialModule,
1402
- ],
1403
- },] }
1404
- ];
1359
+ CadmusStateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: CadmusStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1360
+ CadmusStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: CadmusStateModule, imports: [CommonModule,
1361
+ // Cadmus
1362
+ CadmusCoreModule,
1363
+ CadmusApiModule,
1364
+ CadmusMaterialModule,
1365
+ NgToolsModule] });
1366
+ CadmusStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: CadmusStateModule, imports: [[
1367
+ CommonModule,
1368
+ // Cadmus
1369
+ CadmusCoreModule,
1370
+ CadmusApiModule,
1371
+ CadmusMaterialModule,
1372
+ NgToolsModule
1373
+ ]] });
1374
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: CadmusStateModule, decorators: [{
1375
+ type: NgModule,
1376
+ args: [{
1377
+ imports: [
1378
+ CommonModule,
1379
+ // Cadmus
1380
+ CadmusCoreModule,
1381
+ CadmusApiModule,
1382
+ CadmusMaterialModule,
1383
+ NgToolsModule
1384
+ ],
1385
+ }]
1386
+ }] });
1405
1387
 
1406
1388
  /*
1407
1389
  * Public API Surface of cadmus-state
@@ -1411,5 +1393,5 @@ CadmusStateModule.decorators = [
1411
1393
  * Generated bundle index. Do not edit.
1412
1394
  */
1413
1395
 
1414
- export { AppQuery, AppService, AppStore, CadmusStateModule, EditFragmentFeatureBase, EditFragmentQueryBase, EditFragmentServiceBase, EditFragmentStore, EditItemQuery, EditItemService, EditItemStore, EditLayerPartQuery, EditLayerPartService, EditLayerPartStore, EditPartFeatureBase, EditPartQueryBase, EditPartServiceBase, EditPartStore, EditThesaurusQuery, EditThesaurusService, EditThesaurusStore, editFragmentInitialState, editPartInitialState };
1415
- //# sourceMappingURL=myrmidon-cadmus-state.js.map
1396
+ export { AppQuery, AppService, AppStore, CadmusStateModule, EditFragmentFeatureBase, EditFragmentQueryBase, EditFragmentServiceBase, EditFragmentStore, EditItemQuery, EditItemService, EditItemStore, EditLayerPartQuery, EditLayerPartService, EditLayerPartStore, EditPartFeatureBase, EditPartQueryBase, EditPartServiceBase, EditPartStore, EditThesaurusQuery, EditThesaurusService, EditThesaurusStore, editFragmentInitialState };
1397
+ //# sourceMappingURL=myrmidon-cadmus-state.mjs.map