@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: [],
@@ -305,9 +296,10 @@ class EditItemService {
305
296
  return new Promise((resolve, reject) => {
306
297
  // delete from server
307
298
  this._itemService.deletePart(id).subscribe((_) => {
299
+ var _a;
308
300
  this._store.setDeletingPart(false);
309
301
  // reload the store
310
- this.load(this._store.getValue().item.id);
302
+ this.load((_a = this._store.getValue().item) === null || _a === void 0 ? void 0 : _a.id);
311
303
  resolve(id);
312
304
  }, (error) => {
313
305
  console.log(error);
@@ -322,17 +314,18 @@ class EditItemService {
322
314
  itemId,
323
315
  typeId,
324
316
  roleId,
325
- id: null,
326
- creatorId: null,
327
- userId: null,
317
+ id: '',
318
+ creatorId: '',
319
+ userId: '',
328
320
  timeCreated: new Date(),
329
321
  timeModified: new Date(),
330
322
  };
331
323
  this._store.setSaving();
332
324
  this._itemService.addPart(part).subscribe((_) => {
325
+ var _a;
333
326
  this._store.setSaving(false);
334
327
  // reload the store
335
- this.load(this._store.getValue().item.id);
328
+ this.load((_a = this._store.getValue().item) === null || _a === void 0 ? void 0 : _a.id);
336
329
  }, (error) => {
337
330
  console.log(error);
338
331
  this._store.setSaving(false);
@@ -342,9 +335,10 @@ class EditItemService {
342
335
  setPartThesaurusScope(ids, scope) {
343
336
  this._store.setSaving();
344
337
  this._itemService.setPartThesaurusScope(ids, scope).subscribe((_) => {
338
+ var _a;
345
339
  this._store.setSaving(false);
346
340
  // reload the store
347
- this.load(this._store.getValue().item.id);
341
+ this.load((_a = this._store.getValue().item) === null || _a === void 0 ? void 0 : _a.id);
348
342
  }, (error) => {
349
343
  console.log(error);
350
344
  this._store.setSaving(false);
@@ -352,9 +346,9 @@ class EditItemService {
352
346
  });
353
347
  }
354
348
  }
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: [{
349
+ 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 });
350
+ EditItemService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditItemService, providedIn: 'root' });
351
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditItemService, decorators: [{
358
352
  type: Injectable,
359
353
  args: [{ providedIn: 'root' }]
360
354
  }], ctorParameters: function () { return [{ type: EditItemStore }, { type: AppQuery }, { type: i2.ItemService }]; } });
@@ -375,15 +369,18 @@ class EditFragmentFeatureBase {
375
369
  this._editLayersQuery = _editLayersQuery;
376
370
  this._editLayersService = _editLayersService;
377
371
  this._libraryRouteService = _libraryRouteService;
378
- this.itemId = route.snapshot.params.iid;
379
- this.partId = route.snapshot.params.pid;
372
+ this.fragment$ = this._editFrQuery.selectFragment();
373
+ this.thesauri$ = this._editFrQuery.selectThesauri();
374
+ this.baseText$ = this._editLayersQuery.select((state) => state.baseText);
375
+ this.itemId = route.snapshot.params['iid'];
376
+ this.partId = route.snapshot.params['pid'];
380
377
  this.frTypeId = (_a = route.snapshot.url[2]) === null || _a === void 0 ? void 0 : _a.path;
381
- this.loc = route.snapshot.params.loc;
382
- this.frRoleId = route.snapshot.queryParams.frrid;
378
+ this.loc = route.snapshot.params['loc'];
379
+ this.frRoleId = route.snapshot.queryParams['frrid'];
383
380
  // connect _stateDirty to the value of the edit state
384
381
  this._editFrQuery.selectDirty().subscribe((d) => {
385
382
  console.log('fr dirty change (from state): ' + d);
386
- this._stateDirty = d;
383
+ this._stateDirty = d ? true : false;
387
384
  });
388
385
  }
389
386
  /**
@@ -413,10 +410,11 @@ class EditFragmentFeatureBase {
413
410
  * to use in your editor.
414
411
  */
415
412
  initEditor(thesauriIds) {
413
+ var _a;
416
414
  this.fragment$ = this._editFrQuery.selectFragment();
417
415
  this.thesauri$ = this._editFrQuery.selectThesauri();
418
416
  this.baseText$ = this._editLayersQuery.select((state) => state.baseText);
419
- this.frLoc = TokenLocation.parse(this.loc);
417
+ this.frLoc = (_a = TokenLocation.parse(this.loc)) !== null && _a !== void 0 ? _a : undefined;
420
418
  // load item if required
421
419
  this.ensureItemLoaded(this.itemId);
422
420
  // load layers if required
@@ -488,30 +486,15 @@ class EditFragmentQueryBase extends Query {
488
486
  selectFragment() {
489
487
  return this.select((state) => state.fragment);
490
488
  }
491
- // public selectJson(): Observable<string> {
492
- // return this.select((state) => state.fragment).pipe(
493
- // map((fr: Fragment) => {
494
- // // supply IDs
495
- // if (fr) {
496
- // return JSON.stringify(fr);
497
- // } else {
498
- // return '{}';
499
- // }
500
- // })
501
- // );
502
- // }
503
489
  selectThesauri() {
504
490
  return this.select((state) => state.thesauri);
505
491
  }
506
492
  }
507
493
 
508
494
  const editFragmentInitialState = {
509
- fragment: null,
510
- thesauri: null,
511
495
  dirty: false,
512
496
  saving: false,
513
497
  loading: false,
514
- error: null,
515
498
  };
516
499
  /**
517
500
  * General-purpose edit-fragment store. This can be used with any fragment,
@@ -529,12 +512,12 @@ let EditFragmentStore = class EditFragmentStore extends Store {
529
512
  this.update({ saving: value });
530
513
  }
531
514
  };
532
- EditFragmentStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditFragmentStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
533
- EditFragmentStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditFragmentStore, providedIn: 'root' });
515
+ EditFragmentStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditFragmentStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
516
+ EditFragmentStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditFragmentStore, providedIn: 'root' });
534
517
  EditFragmentStore = __decorate([
535
518
  StoreConfig({ name: 'edit-fragment' })
536
519
  ], EditFragmentStore);
537
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditFragmentStore, decorators: [{
520
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditFragmentStore, decorators: [{
538
521
  type: Injectable,
539
522
  args: [{ providedIn: 'root' }]
540
523
  }], ctorParameters: function () { return []; } });
@@ -556,19 +539,23 @@ class EditFragmentServiceBase {
556
539
  * @param thesauriIds The thesauri IDs array, or null.
557
540
  */
558
541
  load(partId, loc, thesauriIds = null) {
542
+ if (!this.store) {
543
+ return;
544
+ }
559
545
  // signal that we're loading
560
546
  this.store.setLoading(true);
561
547
  // if thesauri are required:
562
548
  if (thesauriIds) {
563
549
  // remove trailing ! from IDs if any
564
550
  const unscopedIds = thesauriIds.map((id) => {
565
- return this._thesaurusService.getScopedId(id, null);
551
+ return this._thesaurusService.getScopedId(id);
566
552
  });
567
553
  // fetch fragment and thesauri
568
554
  forkJoin({
569
555
  part: this._itemService.getPart(partId),
570
556
  thesauri: this._thesaurusService.getThesauriSet(unscopedIds),
571
557
  }).subscribe((result) => {
558
+ var _a;
572
559
  // loading has ended
573
560
  this.store.setLoading(false);
574
561
  const layerPart = result.part;
@@ -594,9 +581,10 @@ class EditFragmentServiceBase {
594
581
  });
595
582
  }
596
583
  // if the loaded layer part has a thesaurus scope, reload the thesauri
597
- if (result.part.thesaurusScope) {
584
+ if ((_a = result.part) === null || _a === void 0 ? void 0 : _a.thesaurusScope) {
598
585
  const scopedIds = thesauriIds.map((id) => {
599
- return this._thesaurusService.getScopedId(id, result.part.thesaurusScope);
586
+ var _a;
587
+ return this._thesaurusService.getScopedId(id, (_a = result.part) === null || _a === void 0 ? void 0 : _a.thesaurusScope);
600
588
  });
601
589
  // loading again
602
590
  this.store.setLoading(true);
@@ -698,18 +686,18 @@ class EditPartFeatureBase {
698
686
  this._editItemQuery = _editItemQuery;
699
687
  this._editItemService = _editItemService;
700
688
  // item ID
701
- this.itemId = route.snapshot.params.iid;
689
+ this.itemId = route.snapshot.params['iid'];
702
690
  // type ID (from "TYPEID/:pid")
703
691
  this.typeId = route.snapshot.routeConfig.path.substr(0, route.snapshot.routeConfig.path.indexOf('/'));
704
692
  // part ID or null (if "new")
705
- this.partId = route.snapshot.params.pid;
693
+ this.partId = route.snapshot.params['pid'];
706
694
  if (this.partId === 'new') {
707
- this.partId = null;
695
+ this.partId = undefined;
708
696
  }
709
697
  // role ID or null (if "default")
710
- this.roleId = route.snapshot.queryParams.rid;
698
+ this.roleId = route.snapshot.queryParams['rid'];
711
699
  if (this.roleId === 'default') {
712
- this.roleId = null;
700
+ this.roleId = undefined;
713
701
  }
714
702
  // connect _stateDirty to the value observed in the part state
715
703
  this._editPartQuery.selectDirty().subscribe((d) => {
@@ -808,10 +796,10 @@ class EditPartQueryBase extends Query {
808
796
  return this.select((state) => state.saving);
809
797
  }
810
798
  selectPart() {
811
- return this.select((state) => state.part);
799
+ return this.select((state) => state.part || undefined);
812
800
  }
813
801
  selectThesauri() {
814
- return this.select((state) => state.thesauri);
802
+ return this.select((state) => state.thesauri || undefined);
815
803
  }
816
804
  }
817
805
 
@@ -830,23 +818,23 @@ class EditPartServiceBase {
830
818
  * it will get a null ID, but use the specified itemId and roleId.
831
819
  *
832
820
  * @param partId The part ID, unless it's a new part.
833
- * @param thesauriIds The thesauri IDs array, or null.
821
+ * @param thesauriIds The thesauri IDs array.
834
822
  * @param itemId The item ID for the new part.
835
823
  * @param typeId The part type ID for the new part.
836
824
  * @param roleId The role ID for the new part.
837
825
  */
838
- load(partId, thesauriIds = null, itemId, typeId, roleId) {
826
+ load(partId, thesauriIds, itemId, typeId, roleId) {
839
827
  // signal that we're loading
840
828
  this.store.setLoading(true);
841
829
  // if thesauri are required:
842
830
  if (thesauriIds) {
843
831
  // remove trailing ! from IDs if any
844
832
  const unscopedIds = thesauriIds.map((id) => {
845
- return this.thesaurusService.getScopedId(id, null);
833
+ return this.thesaurusService.getScopedId(id);
846
834
  });
847
835
  // fetch part and thesauri
848
836
  forkJoin({
849
- part: this.itemService.getPart(partId),
837
+ part: this.itemService.getPart(partId || ''),
850
838
  thesauri: this.thesaurusService.getThesauriSet(unscopedIds),
851
839
  }).subscribe((result) => {
852
840
  var _a;
@@ -866,7 +854,8 @@ class EditPartServiceBase {
866
854
  // if the loaded part has a thesaurus scope, reload the thesauri
867
855
  if ((_a = result.part) === null || _a === void 0 ? void 0 : _a.thesaurusScope) {
868
856
  const scopedIds = thesauriIds.map((id) => {
869
- return this.thesaurusService.getScopedId(id, result.part.thesaurusScope);
857
+ var _a;
858
+ return this.thesaurusService.getScopedId(id, (_a = result.part) === null || _a === void 0 ? void 0 : _a.thesaurusScope);
870
859
  });
871
860
  // loading again
872
861
  this.store.setLoading(true);
@@ -886,7 +875,7 @@ class EditPartServiceBase {
886
875
  }
887
876
  else {
888
877
  // without thesauri to be fetched, just fetch the part
889
- this.itemService.getPart(partId).subscribe((part) => {
878
+ this.itemService.getPart(partId || '').subscribe((part) => {
890
879
  this.store.update({
891
880
  part: part || {
892
881
  id: null,
@@ -935,14 +924,6 @@ class EditPartServiceBase {
935
924
  }
936
925
  }
937
926
 
938
- const editPartInitialState = {
939
- part: null,
940
- thesauri: null,
941
- dirty: false,
942
- saving: false,
943
- loading: false,
944
- error: null
945
- };
946
927
  /**
947
928
  * General-purpose edit-part store. This can be used with any part, so that
948
929
  * you should only provide your part store, query, and service (usually
@@ -950,7 +931,7 @@ const editPartInitialState = {
950
931
  */
951
932
  let EditPartStore = class EditPartStore extends Store {
952
933
  constructor() {
953
- super(editPartInitialState);
934
+ super({});
954
935
  }
955
936
  setDirty(value) {
956
937
  this.update({ dirty: value });
@@ -959,26 +940,22 @@ let EditPartStore = class EditPartStore extends Store {
959
940
  this.update({ saving: value });
960
941
  }
961
942
  };
962
- EditPartStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditPartStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
963
- EditPartStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditPartStore, providedIn: 'root' });
943
+ EditPartStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditPartStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
944
+ EditPartStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditPartStore, providedIn: 'root' });
964
945
  EditPartStore = __decorate([
965
946
  StoreConfig({ name: 'edit-part' })
966
947
  ], EditPartStore);
967
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditPartStore, decorators: [{
948
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditPartStore, decorators: [{
968
949
  type: Injectable,
969
950
  args: [{ providedIn: 'root' }]
970
951
  }], ctorParameters: function () { return []; } });
971
952
 
972
- const initialState$1 = {
973
- part: null,
974
- baseText: null,
975
- baseTextPart: null,
953
+ const initialState = {
976
954
  locations: [],
977
955
  breakChance: -1,
978
956
  layerHints: [],
979
957
  thesauri: {},
980
958
  loading: false,
981
- error: null,
982
959
  deletingFragment: false,
983
960
  savingFragment: false,
984
961
  refreshingBreakChance: false,
@@ -986,7 +963,7 @@ const initialState$1 = {
986
963
  };
987
964
  let EditLayerPartStore = class EditLayerPartStore extends Store {
988
965
  constructor() {
989
- super(initialState$1);
966
+ super(initialState);
990
967
  }
991
968
  setDeletingFragment(value = true) {
992
969
  this.update({ deletingFragment: value });
@@ -1007,12 +984,12 @@ let EditLayerPartStore = class EditLayerPartStore extends Store {
1007
984
  this.update({ locations });
1008
985
  }
1009
986
  };
1010
- EditLayerPartStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditLayerPartStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1011
- EditLayerPartStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditLayerPartStore, providedIn: 'root' });
987
+ EditLayerPartStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditLayerPartStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
988
+ EditLayerPartStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditLayerPartStore, providedIn: 'root' });
1012
989
  EditLayerPartStore = __decorate([
1013
990
  StoreConfig({ name: 'edit-layer-part' })
1014
991
  ], EditLayerPartStore);
1015
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditLayerPartStore, decorators: [{
992
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditLayerPartStore, decorators: [{
1016
993
  type: Injectable,
1017
994
  args: [{ providedIn: 'root' }]
1018
995
  }], ctorParameters: function () { return []; } });
@@ -1041,9 +1018,9 @@ class EditLayerPartQuery extends Query {
1041
1018
  return this.select((state) => state.patchingLayer);
1042
1019
  }
1043
1020
  }
1044
- EditLayerPartQuery.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditLayerPartQuery, deps: [{ token: EditLayerPartStore }], target: i0.ɵɵFactoryTarget.Injectable });
1045
- EditLayerPartQuery.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditLayerPartQuery, providedIn: 'root' });
1046
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditLayerPartQuery, decorators: [{
1021
+ EditLayerPartQuery.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditLayerPartQuery, deps: [{ token: EditLayerPartStore }], target: i0.ɵɵFactoryTarget.Injectable });
1022
+ EditLayerPartQuery.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditLayerPartQuery, providedIn: 'root' });
1023
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditLayerPartQuery, decorators: [{
1047
1024
  type: Injectable,
1048
1025
  args: [{ providedIn: 'root' }]
1049
1026
  }], ctorParameters: function () { return [{ type: EditLayerPartStore }]; } });
@@ -1071,7 +1048,7 @@ class EditLayerPartService {
1071
1048
  * @param partId The layer part ID.
1072
1049
  * @param thesauriIds The optional thesauri IDs to load.
1073
1050
  */
1074
- load(itemId, partId, thesauriIds = null) {
1051
+ load(itemId, partId, thesauriIds) {
1075
1052
  if (this._store.getValue().loading) {
1076
1053
  return;
1077
1054
  }
@@ -1079,7 +1056,7 @@ class EditLayerPartService {
1079
1056
  if (thesauriIds) {
1080
1057
  // remove trailing ! from IDs if any
1081
1058
  const unscopedIds = thesauriIds.map((id) => {
1082
- return this._thesaurusService.getScopedId(id, null);
1059
+ return this._thesaurusService.getScopedId(id);
1083
1060
  });
1084
1061
  forkJoin({
1085
1062
  // TODO: eventually optimize by adding method param to load only fragments locations
@@ -1090,6 +1067,7 @@ class EditLayerPartService {
1090
1067
  layerHints: this._itemService.getLayerPartHints(partId),
1091
1068
  thesauri: this._thesaurusService.getThesauriSet(unscopedIds),
1092
1069
  }).subscribe((result) => {
1070
+ var _a;
1093
1071
  this._store.update({
1094
1072
  part: result.layerPart,
1095
1073
  baseText: result.baseText.text,
@@ -1099,10 +1077,10 @@ class EditLayerPartService {
1099
1077
  layerHints: result.layerHints,
1100
1078
  thesauri: result.thesauri,
1101
1079
  loading: false,
1102
- error: null,
1080
+ error: undefined,
1103
1081
  });
1104
1082
  // if the loaded part has a thesaurus scope, reload the thesauri
1105
- if (result.layerPart.thesaurusScope) {
1083
+ if ((_a = result.layerPart) === null || _a === void 0 ? void 0 : _a.thesaurusScope) {
1106
1084
  const scopedIds = thesauriIds.map((id) => {
1107
1085
  return this._thesaurusService.getScopedId(id, result.layerPart.thesaurusScope);
1108
1086
  });
@@ -1140,7 +1118,7 @@ class EditLayerPartService {
1140
1118
  breakChance: result.breakChance.chance,
1141
1119
  layerHints: result.layerHints,
1142
1120
  loading: false,
1143
- error: null,
1121
+ error: undefined,
1144
1122
  });
1145
1123
  }, (error) => {
1146
1124
  console.error(error);
@@ -1193,7 +1171,8 @@ class EditLayerPartService {
1193
1171
  return;
1194
1172
  }
1195
1173
  const i = part.fragments.findIndex((p) => {
1196
- return TokenLocation.parse(p.location).overlaps(loc);
1174
+ var _a;
1175
+ return (_a = TokenLocation.parse(p.location)) === null || _a === void 0 ? void 0 : _a.overlaps(loc);
1197
1176
  });
1198
1177
  if (i === -1) {
1199
1178
  return;
@@ -1264,23 +1243,16 @@ class EditLayerPartService {
1264
1243
  });
1265
1244
  }
1266
1245
  }
1267
- 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 });
1268
- EditLayerPartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditLayerPartService, providedIn: 'root' });
1269
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditLayerPartService, decorators: [{
1246
+ 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 });
1247
+ EditLayerPartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditLayerPartService, providedIn: 'root' });
1248
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditLayerPartService, decorators: [{
1270
1249
  type: Injectable,
1271
1250
  args: [{ providedIn: 'root' }]
1272
1251
  }], ctorParameters: function () { return [{ type: EditLayerPartStore }, { type: i2.ItemService }, { type: i2.FacetService }, { type: i2.ThesaurusService }]; } });
1273
1252
 
1274
- const initialState = {
1275
- thesaurus: null,
1276
- dirty: false,
1277
- saving: false,
1278
- loading: false,
1279
- error: null,
1280
- };
1281
1253
  let EditThesaurusStore = class EditThesaurusStore extends Store {
1282
1254
  constructor() {
1283
- super(initialState);
1255
+ super({});
1284
1256
  }
1285
1257
  setDirty(value = true) {
1286
1258
  this.update({
@@ -1293,12 +1265,12 @@ let EditThesaurusStore = class EditThesaurusStore extends Store {
1293
1265
  });
1294
1266
  }
1295
1267
  };
1296
- EditThesaurusStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditThesaurusStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1297
- EditThesaurusStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditThesaurusStore, providedIn: 'root' });
1268
+ EditThesaurusStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditThesaurusStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1269
+ EditThesaurusStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditThesaurusStore, providedIn: 'root' });
1298
1270
  EditThesaurusStore = __decorate([
1299
1271
  StoreConfig({ name: 'edit-thesaurus', resettable: true })
1300
1272
  ], EditThesaurusStore);
1301
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditThesaurusStore, decorators: [{
1273
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditThesaurusStore, decorators: [{
1302
1274
  type: Injectable,
1303
1275
  args: [{ providedIn: 'root' }]
1304
1276
  }], ctorParameters: function () { return []; } });
@@ -1311,16 +1283,16 @@ class EditThesaurusQuery extends Query {
1311
1283
  selectThesaurus() {
1312
1284
  return this.select(state => state.thesaurus);
1313
1285
  }
1314
- selectLoading() {
1315
- return this.select(state => state.loading);
1316
- }
1286
+ // public selectLoading(): Observable<boolean | undefined> {
1287
+ // return this.select(state => state.loading);
1288
+ // }
1317
1289
  selectSaving() {
1318
1290
  return this.select(state => state.saving);
1319
1291
  }
1320
1292
  }
1321
- EditThesaurusQuery.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditThesaurusQuery, deps: [{ token: EditThesaurusStore }], target: i0.ɵɵFactoryTarget.Injectable });
1322
- EditThesaurusQuery.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditThesaurusQuery, providedIn: 'root' });
1323
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditThesaurusQuery, decorators: [{
1293
+ EditThesaurusQuery.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditThesaurusQuery, deps: [{ token: EditThesaurusStore }], target: i0.ɵɵFactoryTarget.Injectable });
1294
+ EditThesaurusQuery.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditThesaurusQuery, providedIn: 'root' });
1295
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditThesaurusQuery, decorators: [{
1324
1296
  type: Injectable,
1325
1297
  args: [{ providedIn: 'root' }]
1326
1298
  }], ctorParameters: function () { return [{ type: EditThesaurusStore }]; } });
@@ -1347,7 +1319,7 @@ class EditThesaurusService {
1347
1319
  else {
1348
1320
  this._store.update({
1349
1321
  thesaurus: {
1350
- id: null,
1322
+ id: '',
1351
1323
  language: 'en',
1352
1324
  entries: [],
1353
1325
  },
@@ -1373,29 +1345,29 @@ class EditThesaurusService {
1373
1345
  });
1374
1346
  }
1375
1347
  }
1376
- 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 });
1377
- EditThesaurusService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditThesaurusService, providedIn: 'root' });
1378
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: EditThesaurusService, decorators: [{
1348
+ 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 });
1349
+ EditThesaurusService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditThesaurusService, providedIn: 'root' });
1350
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: EditThesaurusService, decorators: [{
1379
1351
  type: Injectable,
1380
1352
  args: [{ providedIn: 'root' }]
1381
1353
  }], ctorParameters: function () { return [{ type: EditThesaurusStore }, { type: i2.ThesaurusService }]; } });
1382
1354
 
1383
1355
  class CadmusStateModule {
1384
1356
  }
1385
- CadmusStateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: CadmusStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1386
- CadmusStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: CadmusStateModule, imports: [CommonModule,
1357
+ CadmusStateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CadmusStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1358
+ CadmusStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CadmusStateModule, imports: [CommonModule,
1387
1359
  // Cadmus
1388
1360
  CadmusCoreModule,
1389
1361
  CadmusApiModule,
1390
- CadmusMaterialModule] });
1391
- CadmusStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: CadmusStateModule, imports: [[
1362
+ NgToolsModule] });
1363
+ CadmusStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CadmusStateModule, imports: [[
1392
1364
  CommonModule,
1393
1365
  // Cadmus
1394
1366
  CadmusCoreModule,
1395
1367
  CadmusApiModule,
1396
- CadmusMaterialModule,
1368
+ NgToolsModule,
1397
1369
  ]] });
1398
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: CadmusStateModule, decorators: [{
1370
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: CadmusStateModule, decorators: [{
1399
1371
  type: NgModule,
1400
1372
  args: [{
1401
1373
  imports: [
@@ -1403,7 +1375,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
1403
1375
  // Cadmus
1404
1376
  CadmusCoreModule,
1405
1377
  CadmusApiModule,
1406
- CadmusMaterialModule,
1378
+ NgToolsModule,
1407
1379
  ],
1408
1380
  }]
1409
1381
  }] });
@@ -1416,4 +1388,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
1416
1388
  * Generated bundle index. Do not edit.
1417
1389
  */
1418
1390
 
1419
- export { AppQuery, AppService, AppStore, CadmusStateModule, EditFragmentFeatureBase, EditFragmentQueryBase, EditFragmentServiceBase, EditFragmentStore, EditItemQuery, EditItemService, EditItemStore, EditLayerPartQuery, EditLayerPartService, EditLayerPartStore, EditPartFeatureBase, EditPartQueryBase, EditPartServiceBase, EditPartStore, EditThesaurusQuery, EditThesaurusService, EditThesaurusStore, editFragmentInitialState, editPartInitialState };
1391
+ export { AppQuery, AppService, AppStore, CadmusStateModule, EditFragmentFeatureBase, EditFragmentQueryBase, EditFragmentServiceBase, EditFragmentStore, EditItemQuery, EditItemService, EditItemStore, EditLayerPartQuery, EditLayerPartService, EditLayerPartStore, EditPartFeatureBase, EditPartQueryBase, EditPartServiceBase, EditPartStore, EditThesaurusQuery, EditThesaurusService, EditThesaurusStore, editFragmentInitialState };
1392
+ //# sourceMappingURL=myrmidon-cadmus-state.mjs.map