@myrmidon/cadmus-state 0.1.0 → 1.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 (49) hide show
  1. package/README.md +24 -24
  2. package/esm2020/lib/app.query.mjs +4 -4
  3. package/esm2020/lib/app.service.mjs +4 -4
  4. package/esm2020/lib/app.store.mjs +4 -6
  5. package/esm2020/lib/cadmus-state.module.mjs +9 -9
  6. package/esm2020/lib/edit-fragment-feature-base.mjs +10 -7
  7. package/esm2020/lib/edit-fragment-query-base.mjs +1 -13
  8. package/esm2020/lib/edit-fragment-service-base.mjs +7 -4
  9. package/esm2020/lib/edit-fragment.store.mjs +4 -7
  10. package/esm2020/lib/edit-item.query.mjs +8 -8
  11. package/esm2020/lib/edit-item.service.mjs +21 -21
  12. package/esm2020/lib/edit-item.store.mjs +7 -14
  13. package/esm2020/lib/edit-layer-part.query.mjs +4 -4
  14. package/esm2020/lib/edit-layer-part.service.mjs +12 -11
  15. package/esm2020/lib/edit-layer-part.store.mjs +4 -8
  16. package/esm2020/lib/edit-part-feature-base.mjs +6 -6
  17. package/esm2020/lib/edit-part-query-base.mjs +3 -3
  18. package/esm2020/lib/edit-part-service-base.mjs +7 -7
  19. package/esm2020/lib/edit-part.store.mjs +5 -13
  20. package/esm2020/lib/edit-thesaurus.query.mjs +7 -7
  21. package/esm2020/lib/edit-thesaurus.service.mjs +5 -5
  22. package/esm2020/lib/edit-thesaurus.store.mjs +5 -12
  23. package/esm2020/public-api.mjs +1 -1
  24. package/fesm2015/myrmidon-cadmus-state.mjs +132 -159
  25. package/fesm2015/myrmidon-cadmus-state.mjs.map +1 -1
  26. package/fesm2020/myrmidon-cadmus-state.mjs +123 -159
  27. package/fesm2020/myrmidon-cadmus-state.mjs.map +1 -1
  28. package/lib/app.query.d.ts +4 -4
  29. package/lib/app.service.d.ts +1 -1
  30. package/lib/app.store.d.ts +2 -2
  31. package/lib/cadmus-state.module.d.ts +2 -2
  32. package/lib/edit-fragment-feature-base.d.ts +7 -7
  33. package/lib/edit-fragment-query-base.d.ts +5 -5
  34. package/lib/edit-fragment-service-base.d.ts +1 -1
  35. package/lib/edit-fragment.store.d.ts +2 -2
  36. package/lib/edit-item.query.d.ts +3 -3
  37. package/lib/edit-item.service.d.ts +2 -2
  38. package/lib/edit-item.store.d.ts +5 -5
  39. package/lib/edit-layer-part.query.d.ts +6 -6
  40. package/lib/edit-layer-part.service.d.ts +2 -2
  41. package/lib/edit-layer-part.store.d.ts +3 -3
  42. package/lib/edit-part-feature-base.d.ts +9 -9
  43. package/lib/edit-part-query-base.d.ts +4 -4
  44. package/lib/edit-part-service-base.d.ts +3 -3
  45. package/lib/edit-part.store.d.ts +2 -3
  46. package/lib/edit-thesaurus.query.d.ts +2 -3
  47. package/lib/edit-thesaurus.service.d.ts +2 -2
  48. package/lib/edit-thesaurus.store.d.ts +1 -1
  49. package/package.json +6 -9
@@ -6,27 +6,25 @@ import { forkJoin } from 'rxjs';
6
6
  import * as i2 from '@myrmidon/cadmus-api';
7
7
  import { CadmusApiModule } from '@myrmidon/cadmus-api';
8
8
  import * as i2$1 from '@myrmidon/cadmus-core';
9
- import { TokenLocation, deepCopy, CadmusCoreModule } from '@myrmidon/cadmus-core';
9
+ import { TokenLocation, CadmusCoreModule } from '@myrmidon/cadmus-core';
10
+ import { deepCopy, NgToolsModule } from '@myrmidon/ng-tools';
10
11
  import { CommonModule } from '@angular/common';
11
- import { CadmusMaterialModule } from '@myrmidon/cadmus-material';
12
12
 
13
- const initialState$3 = {
13
+ const initialState$2 = {
14
14
  facets: [],
15
15
  flags: [],
16
- typeThesaurus: null,
17
- itemBrowserThesaurus: null,
18
16
  };
19
17
  let AppStore = class AppStore extends Store {
20
18
  constructor() {
21
- super(initialState$3);
19
+ super(initialState$2);
22
20
  }
23
21
  };
24
- AppStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: AppStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
25
- AppStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: AppStore, providedIn: 'root' });
22
+ AppStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: AppStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
23
+ AppStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: AppStore, providedIn: 'root' });
26
24
  AppStore = __decorate([
27
25
  StoreConfig({ name: 'app', resettable: false })
28
26
  ], AppStore);
29
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: AppStore, decorators: [{
27
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: AppStore, decorators: [{
30
28
  type: Injectable,
31
29
  args: [{ providedIn: 'root' }]
32
30
  }], ctorParameters: function () { return []; } });
@@ -49,9 +47,9 @@ class AppQuery extends Query {
49
47
  return this.select((state) => state.itemBrowserThesaurus);
50
48
  }
51
49
  }
52
- AppQuery.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: AppQuery, deps: [{ token: AppStore }], target: i0.ɵɵFactoryTarget.Injectable });
53
- AppQuery.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: AppQuery, providedIn: 'root' });
54
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: AppQuery, decorators: [{
50
+ AppQuery.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: AppQuery, deps: [{ token: AppStore }], target: i0.ɵɵFactoryTarget.Injectable });
51
+ AppQuery.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: AppQuery, providedIn: 'root' });
52
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: AppQuery, decorators: [{
55
53
  type: Injectable,
56
54
  args: [{ providedIn: 'root' }]
57
55
  }], ctorParameters: function () { return [{ type: AppStore }]; } });
@@ -87,51 +85,44 @@ class AppService {
87
85
  });
88
86
  }
89
87
  }
90
- AppService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: AppService, deps: [{ token: AppStore }, { token: i2.FacetService }, { token: i2.FlagService }, { token: i2.ThesaurusService }], target: i0.ɵɵFactoryTarget.Injectable });
91
- AppService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: AppService, providedIn: 'root' });
92
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: AppService, decorators: [{
88
+ AppService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: AppService, deps: [{ token: AppStore }, { token: i2.FacetService }, { token: i2.FlagService }, { token: i2.ThesaurusService }], target: i0.ɵɵFactoryTarget.Injectable });
89
+ AppService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: AppService, providedIn: 'root' });
90
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: AppService, decorators: [{
93
91
  type: Injectable,
94
92
  args: [{ providedIn: 'root' }]
95
93
  }], ctorParameters: function () { return [{ type: AppStore }, { type: i2.FacetService }, { type: i2.FlagService }, { type: i2.ThesaurusService }]; } });
96
94
 
97
- const initialState$2 = {
98
- item: null,
95
+ const initialState$1 = {
99
96
  parts: [],
100
97
  partGroups: [],
101
98
  layerPartInfos: [],
102
- facet: null,
103
- dirty: false,
104
- saving: false,
105
- deletingPart: false,
106
- loading: false,
107
- error: null
108
99
  };
109
100
  let EditItemStore = class EditItemStore extends Store {
110
101
  constructor() {
111
- super(initialState$2);
102
+ super(initialState$1);
112
103
  }
113
104
  setDirty(value = true) {
114
105
  this.update({
115
- dirty: value
106
+ dirty: value,
116
107
  });
117
108
  }
118
109
  setSaving(value = true) {
119
110
  this.update({
120
- saving: value
111
+ saving: value,
121
112
  });
122
113
  }
123
114
  setDeletingPart(value = true) {
124
115
  this.update({
125
- deletingPart: value
116
+ deletingPart: value,
126
117
  });
127
118
  }
128
119
  };
129
- EditItemStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditItemStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
130
- EditItemStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditItemStore, providedIn: 'root' });
120
+ EditItemStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditItemStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
121
+ EditItemStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditItemStore, providedIn: 'root' });
131
122
  EditItemStore = __decorate([
132
123
  StoreConfig({ name: 'edit-item', resettable: true })
133
124
  ], EditItemStore);
134
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditItemStore, decorators: [{
125
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditItemStore, decorators: [{
135
126
  type: Injectable,
136
127
  args: [{ providedIn: 'root' }]
137
128
  }], ctorParameters: function () { return []; } });
@@ -155,19 +146,19 @@ class EditItemQuery extends Query {
155
146
  return this.select((state) => state.facet);
156
147
  }
157
148
  selectSaving() {
158
- return this.select((state) => state.saving);
149
+ return this.select((state) => (state.saving ? true : false));
159
150
  }
160
151
  selectDeletingPart() {
161
- return this.select((state) => state.deletingPart);
152
+ return this.select((state) => (state.deletingPart ? true : false));
162
153
  }
163
- hasItem(id = null) {
154
+ hasItem(id) {
164
155
  const item = this.getValue().item;
165
156
  if (!item || (id && id !== item.id)) {
166
157
  return false;
167
158
  }
168
159
  return true;
169
160
  }
170
- getEditorKeyFromPartTypeId(typeId, roleId = null) {
161
+ getEditorKeyFromPartTypeId(typeId, roleId) {
171
162
  const facet = this.getValue().facet;
172
163
  if (!facet) {
173
164
  return 'default';
@@ -176,9 +167,9 @@ class EditItemQuery extends Query {
176
167
  .partKey;
177
168
  }
178
169
  }
179
- EditItemQuery.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditItemQuery, deps: [{ token: EditItemStore }, { token: i2$1.LibraryRouteService }], target: i0.ɵɵFactoryTarget.Injectable });
180
- EditItemQuery.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditItemQuery, providedIn: 'root' });
181
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditItemQuery, decorators: [{
170
+ EditItemQuery.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditItemQuery, deps: [{ token: EditItemStore }, { token: i2$1.LibraryRouteService }], target: i0.ɵɵFactoryTarget.Injectable });
171
+ EditItemQuery.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditItemQuery, providedIn: 'root' });
172
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditItemQuery, decorators: [{
182
173
  type: Injectable,
183
174
  args: [{ providedIn: 'root' }]
184
175
  }], ctorParameters: function () { return [{ type: EditItemStore }, { type: i2$1.LibraryRouteService }]; } });
@@ -194,7 +185,7 @@ class EditItemService {
194
185
  }
195
186
  pickDefaultFacet(facets) {
196
187
  if (!facets.length) {
197
- return null;
188
+ return undefined;
198
189
  }
199
190
  // if there is a facet with id="default", pick it
200
191
  const defaultFacet = facets.find((f) => f.id === 'default');
@@ -210,9 +201,9 @@ class EditItemService {
210
201
  */
211
202
  load(itemId) {
212
203
  this._store.setLoading(true);
213
- const layers$ = this._itemService.getItemLayerInfo(itemId, true);
214
204
  const appState = this._appQuery.getValue();
215
205
  // if not a new item, include it in load
206
+ const layers$ = this._itemService.getItemLayerInfo(itemId || 'new', true);
216
207
  if (itemId) {
217
208
  forkJoin({
218
209
  item: this._itemService.getItem(itemId, true),
@@ -227,7 +218,7 @@ class EditItemService {
227
218
  this._store.update({
228
219
  item: result.item,
229
220
  parts: result.item.parts,
230
- partGroups: this._itemService.groupParts(result.item.parts, facetParts),
221
+ partGroups: this._itemService.groupParts(result.item.parts || [], facetParts),
231
222
  layerPartInfos: result.layers,
232
223
  facet: appState.facets.find((f) => f.id === result.item.facetId),
233
224
  });
@@ -246,17 +237,17 @@ class EditItemService {
246
237
  this._store.setError(null);
247
238
  this._store.update({
248
239
  item: {
249
- id: null,
250
- title: null,
251
- description: null,
252
- facetId: null,
253
- groupId: null,
254
- sortKey: null,
240
+ id: '',
241
+ title: '',
242
+ description: '',
243
+ facetId: '',
244
+ groupId: '',
245
+ sortKey: '',
255
246
  flags: 0,
256
247
  timeCreated: new Date(),
257
- creatorId: null,
248
+ creatorId: '',
258
249
  timeModified: new Date(),
259
- userId: null,
250
+ userId: '',
260
251
  },
261
252
  parts: [],
262
253
  partGroups: [],
@@ -307,7 +298,7 @@ class EditItemService {
307
298
  this._itemService.deletePart(id).subscribe((_) => {
308
299
  this._store.setDeletingPart(false);
309
300
  // reload the store
310
- this.load(this._store.getValue().item.id);
301
+ this.load(this._store.getValue().item?.id);
311
302
  resolve(id);
312
303
  }, (error) => {
313
304
  console.log(error);
@@ -322,9 +313,9 @@ class EditItemService {
322
313
  itemId,
323
314
  typeId,
324
315
  roleId,
325
- id: null,
326
- creatorId: null,
327
- userId: null,
316
+ id: '',
317
+ creatorId: '',
318
+ userId: '',
328
319
  timeCreated: new Date(),
329
320
  timeModified: new Date(),
330
321
  };
@@ -332,7 +323,7 @@ class EditItemService {
332
323
  this._itemService.addPart(part).subscribe((_) => {
333
324
  this._store.setSaving(false);
334
325
  // reload the store
335
- this.load(this._store.getValue().item.id);
326
+ this.load(this._store.getValue().item?.id);
336
327
  }, (error) => {
337
328
  console.log(error);
338
329
  this._store.setSaving(false);
@@ -344,7 +335,7 @@ class EditItemService {
344
335
  this._itemService.setPartThesaurusScope(ids, scope).subscribe((_) => {
345
336
  this._store.setSaving(false);
346
337
  // reload the store
347
- this.load(this._store.getValue().item.id);
338
+ this.load(this._store.getValue().item?.id);
348
339
  }, (error) => {
349
340
  console.log(error);
350
341
  this._store.setSaving(false);
@@ -352,9 +343,9 @@ class EditItemService {
352
343
  });
353
344
  }
354
345
  }
355
- EditItemService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditItemService, deps: [{ token: EditItemStore }, { token: AppQuery }, { token: i2.ItemService }], target: i0.ɵɵFactoryTarget.Injectable });
356
- EditItemService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditItemService, providedIn: 'root' });
357
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditItemService, decorators: [{
346
+ EditItemService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditItemService, deps: [{ token: EditItemStore }, { token: AppQuery }, { token: i2.ItemService }], target: i0.ɵɵFactoryTarget.Injectable });
347
+ EditItemService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditItemService, providedIn: 'root' });
348
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditItemService, decorators: [{
358
349
  type: Injectable,
359
350
  args: [{ providedIn: 'root' }]
360
351
  }], ctorParameters: function () { return [{ type: EditItemStore }, { type: AppQuery }, { type: i2.ItemService }]; } });
@@ -374,15 +365,18 @@ class EditFragmentFeatureBase {
374
365
  this._editLayersQuery = _editLayersQuery;
375
366
  this._editLayersService = _editLayersService;
376
367
  this._libraryRouteService = _libraryRouteService;
377
- this.itemId = route.snapshot.params.iid;
378
- this.partId = route.snapshot.params.pid;
368
+ this.fragment$ = this._editFrQuery.selectFragment();
369
+ this.thesauri$ = this._editFrQuery.selectThesauri();
370
+ this.baseText$ = this._editLayersQuery.select((state) => state.baseText);
371
+ this.itemId = route.snapshot.params['iid'];
372
+ this.partId = route.snapshot.params['pid'];
379
373
  this.frTypeId = route.snapshot.url[2]?.path;
380
- this.loc = route.snapshot.params.loc;
381
- this.frRoleId = route.snapshot.queryParams.frrid;
374
+ this.loc = route.snapshot.params['loc'];
375
+ this.frRoleId = route.snapshot.queryParams['frrid'];
382
376
  // connect _stateDirty to the value of the edit state
383
377
  this._editFrQuery.selectDirty().subscribe((d) => {
384
378
  console.log('fr dirty change (from state): ' + d);
385
- this._stateDirty = d;
379
+ this._stateDirty = d ? true : false;
386
380
  });
387
381
  }
388
382
  /**
@@ -415,7 +409,7 @@ class EditFragmentFeatureBase {
415
409
  this.fragment$ = this._editFrQuery.selectFragment();
416
410
  this.thesauri$ = this._editFrQuery.selectThesauri();
417
411
  this.baseText$ = this._editLayersQuery.select((state) => state.baseText);
418
- this.frLoc = TokenLocation.parse(this.loc);
412
+ this.frLoc = TokenLocation.parse(this.loc) ?? undefined;
419
413
  // load item if required
420
414
  this.ensureItemLoaded(this.itemId);
421
415
  // load layers if required
@@ -487,30 +481,15 @@ class EditFragmentQueryBase extends Query {
487
481
  selectFragment() {
488
482
  return this.select((state) => state.fragment);
489
483
  }
490
- // public selectJson(): Observable<string> {
491
- // return this.select((state) => state.fragment).pipe(
492
- // map((fr: Fragment) => {
493
- // // supply IDs
494
- // if (fr) {
495
- // return JSON.stringify(fr);
496
- // } else {
497
- // return '{}';
498
- // }
499
- // })
500
- // );
501
- // }
502
484
  selectThesauri() {
503
485
  return this.select((state) => state.thesauri);
504
486
  }
505
487
  }
506
488
 
507
489
  const editFragmentInitialState = {
508
- fragment: null,
509
- thesauri: null,
510
490
  dirty: false,
511
491
  saving: false,
512
492
  loading: false,
513
- error: null,
514
493
  };
515
494
  /**
516
495
  * General-purpose edit-fragment store. This can be used with any fragment,
@@ -528,12 +507,12 @@ let EditFragmentStore = class EditFragmentStore extends Store {
528
507
  this.update({ saving: value });
529
508
  }
530
509
  };
531
- EditFragmentStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditFragmentStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
532
- EditFragmentStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditFragmentStore, providedIn: 'root' });
510
+ EditFragmentStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditFragmentStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
511
+ EditFragmentStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditFragmentStore, providedIn: 'root' });
533
512
  EditFragmentStore = __decorate([
534
513
  StoreConfig({ name: 'edit-fragment' })
535
514
  ], EditFragmentStore);
536
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditFragmentStore, decorators: [{
515
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditFragmentStore, decorators: [{
537
516
  type: Injectable,
538
517
  args: [{ providedIn: 'root' }]
539
518
  }], ctorParameters: function () { return []; } });
@@ -555,13 +534,16 @@ class EditFragmentServiceBase {
555
534
  * @param thesauriIds The thesauri IDs array, or null.
556
535
  */
557
536
  load(partId, loc, thesauriIds = null) {
537
+ if (!this.store) {
538
+ return;
539
+ }
558
540
  // signal that we're loading
559
541
  this.store.setLoading(true);
560
542
  // if thesauri are required:
561
543
  if (thesauriIds) {
562
544
  // remove trailing ! from IDs if any
563
545
  const unscopedIds = thesauriIds.map((id) => {
564
- return this._thesaurusService.getScopedId(id, null);
546
+ return this._thesaurusService.getScopedId(id);
565
547
  });
566
548
  // fetch fragment and thesauri
567
549
  forkJoin({
@@ -593,9 +575,9 @@ class EditFragmentServiceBase {
593
575
  });
594
576
  }
595
577
  // if the loaded layer part has a thesaurus scope, reload the thesauri
596
- if (result.part.thesaurusScope) {
578
+ if (result.part?.thesaurusScope) {
597
579
  const scopedIds = thesauriIds.map((id) => {
598
- return this._thesaurusService.getScopedId(id, result.part.thesaurusScope);
580
+ return this._thesaurusService.getScopedId(id, result.part?.thesaurusScope);
599
581
  });
600
582
  // loading again
601
583
  this.store.setLoading(true);
@@ -697,18 +679,18 @@ class EditPartFeatureBase {
697
679
  this._editItemQuery = _editItemQuery;
698
680
  this._editItemService = _editItemService;
699
681
  // item ID
700
- this.itemId = route.snapshot.params.iid;
682
+ this.itemId = route.snapshot.params['iid'];
701
683
  // type ID (from "TYPEID/:pid")
702
684
  this.typeId = route.snapshot.routeConfig.path.substr(0, route.snapshot.routeConfig.path.indexOf('/'));
703
685
  // part ID or null (if "new")
704
- this.partId = route.snapshot.params.pid;
686
+ this.partId = route.snapshot.params['pid'];
705
687
  if (this.partId === 'new') {
706
- this.partId = null;
688
+ this.partId = undefined;
707
689
  }
708
690
  // role ID or null (if "default")
709
- this.roleId = route.snapshot.queryParams.rid;
691
+ this.roleId = route.snapshot.queryParams['rid'];
710
692
  if (this.roleId === 'default') {
711
- this.roleId = null;
693
+ this.roleId = undefined;
712
694
  }
713
695
  // connect _stateDirty to the value observed in the part state
714
696
  this._editPartQuery.selectDirty().subscribe((d) => {
@@ -807,10 +789,10 @@ class EditPartQueryBase extends Query {
807
789
  return this.select((state) => state.saving);
808
790
  }
809
791
  selectPart() {
810
- return this.select((state) => state.part);
792
+ return this.select((state) => state.part || undefined);
811
793
  }
812
794
  selectThesauri() {
813
- return this.select((state) => state.thesauri);
795
+ return this.select((state) => state.thesauri || undefined);
814
796
  }
815
797
  }
816
798
 
@@ -829,23 +811,23 @@ class EditPartServiceBase {
829
811
  * it will get a null ID, but use the specified itemId and roleId.
830
812
  *
831
813
  * @param partId The part ID, unless it's a new part.
832
- * @param thesauriIds The thesauri IDs array, or null.
814
+ * @param thesauriIds The thesauri IDs array.
833
815
  * @param itemId The item ID for the new part.
834
816
  * @param typeId The part type ID for the new part.
835
817
  * @param roleId The role ID for the new part.
836
818
  */
837
- load(partId, thesauriIds = null, itemId, typeId, roleId) {
819
+ load(partId, thesauriIds, itemId, typeId, roleId) {
838
820
  // signal that we're loading
839
821
  this.store.setLoading(true);
840
822
  // if thesauri are required:
841
823
  if (thesauriIds) {
842
824
  // remove trailing ! from IDs if any
843
825
  const unscopedIds = thesauriIds.map((id) => {
844
- return this.thesaurusService.getScopedId(id, null);
826
+ return this.thesaurusService.getScopedId(id);
845
827
  });
846
828
  // fetch part and thesauri
847
829
  forkJoin({
848
- part: this.itemService.getPart(partId),
830
+ part: this.itemService.getPart(partId || ''),
849
831
  thesauri: this.thesaurusService.getThesauriSet(unscopedIds),
850
832
  }).subscribe((result) => {
851
833
  // loading has ended
@@ -864,7 +846,7 @@ class EditPartServiceBase {
864
846
  // if the loaded part has a thesaurus scope, reload the thesauri
865
847
  if (result.part?.thesaurusScope) {
866
848
  const scopedIds = thesauriIds.map((id) => {
867
- return this.thesaurusService.getScopedId(id, result.part.thesaurusScope);
849
+ return this.thesaurusService.getScopedId(id, result.part?.thesaurusScope);
868
850
  });
869
851
  // loading again
870
852
  this.store.setLoading(true);
@@ -884,7 +866,7 @@ class EditPartServiceBase {
884
866
  }
885
867
  else {
886
868
  // without thesauri to be fetched, just fetch the part
887
- this.itemService.getPart(partId).subscribe((part) => {
869
+ this.itemService.getPart(partId || '').subscribe((part) => {
888
870
  this.store.update({
889
871
  part: part || {
890
872
  id: null,
@@ -933,14 +915,6 @@ class EditPartServiceBase {
933
915
  }
934
916
  }
935
917
 
936
- const editPartInitialState = {
937
- part: null,
938
- thesauri: null,
939
- dirty: false,
940
- saving: false,
941
- loading: false,
942
- error: null
943
- };
944
918
  /**
945
919
  * General-purpose edit-part store. This can be used with any part, so that
946
920
  * you should only provide your part store, query, and service (usually
@@ -948,7 +922,7 @@ const editPartInitialState = {
948
922
  */
949
923
  let EditPartStore = class EditPartStore extends Store {
950
924
  constructor() {
951
- super(editPartInitialState);
925
+ super({});
952
926
  }
953
927
  setDirty(value) {
954
928
  this.update({ dirty: value });
@@ -957,26 +931,22 @@ let EditPartStore = class EditPartStore extends Store {
957
931
  this.update({ saving: value });
958
932
  }
959
933
  };
960
- EditPartStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditPartStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
961
- EditPartStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditPartStore, providedIn: 'root' });
934
+ EditPartStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditPartStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
935
+ EditPartStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditPartStore, providedIn: 'root' });
962
936
  EditPartStore = __decorate([
963
937
  StoreConfig({ name: 'edit-part' })
964
938
  ], EditPartStore);
965
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditPartStore, decorators: [{
939
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditPartStore, decorators: [{
966
940
  type: Injectable,
967
941
  args: [{ providedIn: 'root' }]
968
942
  }], ctorParameters: function () { return []; } });
969
943
 
970
- const initialState$1 = {
971
- part: null,
972
- baseText: null,
973
- baseTextPart: null,
944
+ const initialState = {
974
945
  locations: [],
975
946
  breakChance: -1,
976
947
  layerHints: [],
977
948
  thesauri: {},
978
949
  loading: false,
979
- error: null,
980
950
  deletingFragment: false,
981
951
  savingFragment: false,
982
952
  refreshingBreakChance: false,
@@ -984,7 +954,7 @@ const initialState$1 = {
984
954
  };
985
955
  let EditLayerPartStore = class EditLayerPartStore extends Store {
986
956
  constructor() {
987
- super(initialState$1);
957
+ super(initialState);
988
958
  }
989
959
  setDeletingFragment(value = true) {
990
960
  this.update({ deletingFragment: value });
@@ -1005,12 +975,12 @@ let EditLayerPartStore = class EditLayerPartStore extends Store {
1005
975
  this.update({ locations });
1006
976
  }
1007
977
  };
1008
- EditLayerPartStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditLayerPartStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1009
- EditLayerPartStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditLayerPartStore, providedIn: 'root' });
978
+ EditLayerPartStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditLayerPartStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
979
+ EditLayerPartStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditLayerPartStore, providedIn: 'root' });
1010
980
  EditLayerPartStore = __decorate([
1011
981
  StoreConfig({ name: 'edit-layer-part' })
1012
982
  ], EditLayerPartStore);
1013
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditLayerPartStore, decorators: [{
983
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditLayerPartStore, decorators: [{
1014
984
  type: Injectable,
1015
985
  args: [{ providedIn: 'root' }]
1016
986
  }], ctorParameters: function () { return []; } });
@@ -1039,9 +1009,9 @@ class EditLayerPartQuery extends Query {
1039
1009
  return this.select((state) => state.patchingLayer);
1040
1010
  }
1041
1011
  }
1042
- EditLayerPartQuery.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditLayerPartQuery, deps: [{ token: EditLayerPartStore }], target: i0.ɵɵFactoryTarget.Injectable });
1043
- EditLayerPartQuery.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditLayerPartQuery, providedIn: 'root' });
1044
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditLayerPartQuery, decorators: [{
1012
+ EditLayerPartQuery.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditLayerPartQuery, deps: [{ token: EditLayerPartStore }], target: i0.ɵɵFactoryTarget.Injectable });
1013
+ EditLayerPartQuery.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditLayerPartQuery, providedIn: 'root' });
1014
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditLayerPartQuery, decorators: [{
1045
1015
  type: Injectable,
1046
1016
  args: [{ providedIn: 'root' }]
1047
1017
  }], ctorParameters: function () { return [{ type: EditLayerPartStore }]; } });
@@ -1069,7 +1039,7 @@ class EditLayerPartService {
1069
1039
  * @param partId The layer part ID.
1070
1040
  * @param thesauriIds The optional thesauri IDs to load.
1071
1041
  */
1072
- load(itemId, partId, thesauriIds = null) {
1042
+ load(itemId, partId, thesauriIds) {
1073
1043
  if (this._store.getValue().loading) {
1074
1044
  return;
1075
1045
  }
@@ -1077,7 +1047,7 @@ class EditLayerPartService {
1077
1047
  if (thesauriIds) {
1078
1048
  // remove trailing ! from IDs if any
1079
1049
  const unscopedIds = thesauriIds.map((id) => {
1080
- return this._thesaurusService.getScopedId(id, null);
1050
+ return this._thesaurusService.getScopedId(id);
1081
1051
  });
1082
1052
  forkJoin({
1083
1053
  // TODO: eventually optimize by adding method param to load only fragments locations
@@ -1097,10 +1067,10 @@ class EditLayerPartService {
1097
1067
  layerHints: result.layerHints,
1098
1068
  thesauri: result.thesauri,
1099
1069
  loading: false,
1100
- error: null,
1070
+ error: undefined,
1101
1071
  });
1102
1072
  // if the loaded part has a thesaurus scope, reload the thesauri
1103
- if (result.layerPart.thesaurusScope) {
1073
+ if (result.layerPart?.thesaurusScope) {
1104
1074
  const scopedIds = thesauriIds.map((id) => {
1105
1075
  return this._thesaurusService.getScopedId(id, result.layerPart.thesaurusScope);
1106
1076
  });
@@ -1138,7 +1108,7 @@ class EditLayerPartService {
1138
1108
  breakChance: result.breakChance.chance,
1139
1109
  layerHints: result.layerHints,
1140
1110
  loading: false,
1141
- error: null,
1111
+ error: undefined,
1142
1112
  });
1143
1113
  }, (error) => {
1144
1114
  console.error(error);
@@ -1191,7 +1161,7 @@ class EditLayerPartService {
1191
1161
  return;
1192
1162
  }
1193
1163
  const i = part.fragments.findIndex((p) => {
1194
- return TokenLocation.parse(p.location).overlaps(loc);
1164
+ return TokenLocation.parse(p.location)?.overlaps(loc);
1195
1165
  });
1196
1166
  if (i === -1) {
1197
1167
  return;
@@ -1262,23 +1232,16 @@ class EditLayerPartService {
1262
1232
  });
1263
1233
  }
1264
1234
  }
1265
- EditLayerPartService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditLayerPartService, deps: [{ token: EditLayerPartStore }, { token: i2.ItemService }, { token: i2.FacetService }, { token: i2.ThesaurusService }], target: i0.ɵɵFactoryTarget.Injectable });
1266
- EditLayerPartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditLayerPartService, providedIn: 'root' });
1267
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditLayerPartService, decorators: [{
1235
+ EditLayerPartService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditLayerPartService, deps: [{ token: EditLayerPartStore }, { token: i2.ItemService }, { token: i2.FacetService }, { token: i2.ThesaurusService }], target: i0.ɵɵFactoryTarget.Injectable });
1236
+ EditLayerPartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditLayerPartService, providedIn: 'root' });
1237
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditLayerPartService, decorators: [{
1268
1238
  type: Injectable,
1269
1239
  args: [{ providedIn: 'root' }]
1270
1240
  }], ctorParameters: function () { return [{ type: EditLayerPartStore }, { type: i2.ItemService }, { type: i2.FacetService }, { type: i2.ThesaurusService }]; } });
1271
1241
 
1272
- const initialState = {
1273
- thesaurus: null,
1274
- dirty: false,
1275
- saving: false,
1276
- loading: false,
1277
- error: null,
1278
- };
1279
1242
  let EditThesaurusStore = class EditThesaurusStore extends Store {
1280
1243
  constructor() {
1281
- super(initialState);
1244
+ super({});
1282
1245
  }
1283
1246
  setDirty(value = true) {
1284
1247
  this.update({
@@ -1291,12 +1254,12 @@ let EditThesaurusStore = class EditThesaurusStore extends Store {
1291
1254
  });
1292
1255
  }
1293
1256
  };
1294
- EditThesaurusStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditThesaurusStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1295
- EditThesaurusStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditThesaurusStore, providedIn: 'root' });
1257
+ EditThesaurusStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditThesaurusStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1258
+ EditThesaurusStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditThesaurusStore, providedIn: 'root' });
1296
1259
  EditThesaurusStore = __decorate([
1297
1260
  StoreConfig({ name: 'edit-thesaurus', resettable: true })
1298
1261
  ], EditThesaurusStore);
1299
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditThesaurusStore, decorators: [{
1262
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditThesaurusStore, decorators: [{
1300
1263
  type: Injectable,
1301
1264
  args: [{ providedIn: 'root' }]
1302
1265
  }], ctorParameters: function () { return []; } });
@@ -1309,16 +1272,16 @@ class EditThesaurusQuery extends Query {
1309
1272
  selectThesaurus() {
1310
1273
  return this.select(state => state.thesaurus);
1311
1274
  }
1312
- selectLoading() {
1313
- return this.select(state => state.loading);
1314
- }
1275
+ // public selectLoading(): Observable<boolean | undefined> {
1276
+ // return this.select(state => state.loading);
1277
+ // }
1315
1278
  selectSaving() {
1316
1279
  return this.select(state => state.saving);
1317
1280
  }
1318
1281
  }
1319
- EditThesaurusQuery.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditThesaurusQuery, deps: [{ token: EditThesaurusStore }], target: i0.ɵɵFactoryTarget.Injectable });
1320
- EditThesaurusQuery.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditThesaurusQuery, providedIn: 'root' });
1321
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditThesaurusQuery, decorators: [{
1282
+ EditThesaurusQuery.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditThesaurusQuery, deps: [{ token: EditThesaurusStore }], target: i0.ɵɵFactoryTarget.Injectable });
1283
+ EditThesaurusQuery.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditThesaurusQuery, providedIn: 'root' });
1284
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditThesaurusQuery, decorators: [{
1322
1285
  type: Injectable,
1323
1286
  args: [{ providedIn: 'root' }]
1324
1287
  }], ctorParameters: function () { return [{ type: EditThesaurusStore }]; } });
@@ -1345,7 +1308,7 @@ class EditThesaurusService {
1345
1308
  else {
1346
1309
  this._store.update({
1347
1310
  thesaurus: {
1348
- id: null,
1311
+ id: '',
1349
1312
  language: 'en',
1350
1313
  entries: [],
1351
1314
  },
@@ -1371,29 +1334,29 @@ class EditThesaurusService {
1371
1334
  });
1372
1335
  }
1373
1336
  }
1374
- EditThesaurusService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditThesaurusService, deps: [{ token: EditThesaurusStore }, { token: i2.ThesaurusService }], target: i0.ɵɵFactoryTarget.Injectable });
1375
- EditThesaurusService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditThesaurusService, providedIn: 'root' });
1376
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditThesaurusService, decorators: [{
1337
+ EditThesaurusService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditThesaurusService, deps: [{ token: EditThesaurusStore }, { token: i2.ThesaurusService }], target: i0.ɵɵFactoryTarget.Injectable });
1338
+ EditThesaurusService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditThesaurusService, providedIn: 'root' });
1339
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditThesaurusService, decorators: [{
1377
1340
  type: Injectable,
1378
1341
  args: [{ providedIn: 'root' }]
1379
1342
  }], ctorParameters: function () { return [{ type: EditThesaurusStore }, { type: i2.ThesaurusService }]; } });
1380
1343
 
1381
1344
  class CadmusStateModule {
1382
1345
  }
1383
- CadmusStateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: CadmusStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1384
- CadmusStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: CadmusStateModule, imports: [CommonModule,
1346
+ CadmusStateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CadmusStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1347
+ CadmusStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CadmusStateModule, imports: [CommonModule,
1385
1348
  // Cadmus
1386
1349
  CadmusCoreModule,
1387
1350
  CadmusApiModule,
1388
- CadmusMaterialModule] });
1389
- CadmusStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: CadmusStateModule, imports: [[
1351
+ NgToolsModule] });
1352
+ CadmusStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CadmusStateModule, imports: [[
1390
1353
  CommonModule,
1391
1354
  // Cadmus
1392
1355
  CadmusCoreModule,
1393
1356
  CadmusApiModule,
1394
- CadmusMaterialModule,
1357
+ NgToolsModule,
1395
1358
  ]] });
1396
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: CadmusStateModule, decorators: [{
1359
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CadmusStateModule, decorators: [{
1397
1360
  type: NgModule,
1398
1361
  args: [{
1399
1362
  imports: [
@@ -1401,7 +1364,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
1401
1364
  // Cadmus
1402
1365
  CadmusCoreModule,
1403
1366
  CadmusApiModule,
1404
- CadmusMaterialModule,
1367
+ NgToolsModule,
1405
1368
  ],
1406
1369
  }]
1407
1370
  }] });
@@ -1414,4 +1377,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
1414
1377
  * Generated bundle index. Do not edit.
1415
1378
  */
1416
1379
 
1417
- export { AppQuery, AppService, AppStore, CadmusStateModule, EditFragmentFeatureBase, EditFragmentQueryBase, EditFragmentServiceBase, EditFragmentStore, EditItemQuery, EditItemService, EditItemStore, EditLayerPartQuery, EditLayerPartService, EditLayerPartStore, EditPartFeatureBase, EditPartQueryBase, EditPartServiceBase, EditPartStore, EditThesaurusQuery, EditThesaurusService, EditThesaurusStore, editFragmentInitialState, editPartInitialState };
1380
+ export { AppQuery, AppService, AppStore, CadmusStateModule, EditFragmentFeatureBase, EditFragmentQueryBase, EditFragmentServiceBase, EditFragmentStore, EditItemQuery, EditItemService, EditItemStore, EditLayerPartQuery, EditLayerPartService, EditLayerPartStore, EditPartFeatureBase, EditPartQueryBase, EditPartServiceBase, EditPartStore, EditThesaurusQuery, EditThesaurusService, EditThesaurusStore, editFragmentInitialState };
1381
+ //# sourceMappingURL=myrmidon-cadmus-state.mjs.map