@myrmidon/cadmus-state 5.0.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/app.repository.mjs +48 -35
- package/esm2022/lib/cadmus-state.module.mjs +4 -4
- package/esm2022/lib/edit-fragment-feature-base.mjs +3 -3
- package/esm2022/lib/edit-part-feature-base.mjs +3 -3
- package/esm2022/lib/edited-layer.repository.mjs +70 -62
- package/esm2022/lib/edited-thesaurus.repository.mjs +12 -15
- package/esm2022/lib/fragment-editor.service.mjs +3 -3
- package/esm2022/lib/part-editor.service.mjs +3 -3
- package/fesm2022/myrmidon-cadmus-state.mjs +144 -122
- package/fesm2022/myrmidon-cadmus-state.mjs.map +1 -1
- package/lib/app.repository.d.ts +18 -47
- package/lib/edited-layer.repository.d.ts +16 -43
- package/lib/edited-thesaurus.repository.d.ts +2 -6
- package/package.json +1 -1
|
@@ -1,24 +1,21 @@
|
|
|
1
1
|
import { Injectable } from '@angular/core';
|
|
2
2
|
import { BehaviorSubject } from 'rxjs';
|
|
3
|
-
import { createStore, select, setProp, withProps } from '@ngneat/elf';
|
|
4
|
-
import { withRequestsStatus } from '@ngneat/elf-requests';
|
|
5
3
|
import * as i0 from "@angular/core";
|
|
6
4
|
import * as i1 from "@myrmidon/cadmus-api";
|
|
7
5
|
class EditedThesaurusRepository {
|
|
6
|
+
get thesaurus$() {
|
|
7
|
+
return this._thesaurus$.asObservable();
|
|
8
|
+
}
|
|
8
9
|
constructor(_thesaurusService) {
|
|
9
10
|
this._thesaurusService = _thesaurusService;
|
|
10
|
-
this.
|
|
11
|
+
this._thesaurus$ = new BehaviorSubject(undefined);
|
|
11
12
|
this._loading$ = new BehaviorSubject(false);
|
|
12
13
|
this.loading$ = this._loading$.asObservable();
|
|
13
14
|
this._saving$ = new BehaviorSubject(false);
|
|
14
15
|
this.saving$ = this._saving$.asObservable();
|
|
15
|
-
this.thesaurus$ = this._store.pipe(select((state) => state.thesaurus));
|
|
16
|
-
}
|
|
17
|
-
getValue() {
|
|
18
|
-
return this._store.getValue();
|
|
19
16
|
}
|
|
20
17
|
getThesaurus() {
|
|
21
|
-
return this.
|
|
18
|
+
return this._thesaurus$.value;
|
|
22
19
|
}
|
|
23
20
|
/**
|
|
24
21
|
* Load the specified thesaurus.
|
|
@@ -31,7 +28,7 @@ class EditedThesaurusRepository {
|
|
|
31
28
|
this._thesaurusService.getThesaurus(id, true).subscribe({
|
|
32
29
|
next: (thesaurus) => {
|
|
33
30
|
this._loading$.next(false);
|
|
34
|
-
this.
|
|
31
|
+
this._thesaurus$.next(thesaurus);
|
|
35
32
|
},
|
|
36
33
|
error: (error) => {
|
|
37
34
|
this._loading$.next(false);
|
|
@@ -40,11 +37,11 @@ class EditedThesaurusRepository {
|
|
|
40
37
|
});
|
|
41
38
|
}
|
|
42
39
|
else {
|
|
43
|
-
this.
|
|
40
|
+
this._thesaurus$.next({
|
|
44
41
|
id: '',
|
|
45
42
|
language: 'en',
|
|
46
43
|
entries: [],
|
|
47
|
-
})
|
|
44
|
+
});
|
|
48
45
|
}
|
|
49
46
|
}
|
|
50
47
|
/**
|
|
@@ -70,12 +67,12 @@ class EditedThesaurusRepository {
|
|
|
70
67
|
});
|
|
71
68
|
});
|
|
72
69
|
}
|
|
73
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
74
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.
|
|
70
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: EditedThesaurusRepository, deps: [{ token: i1.ThesaurusService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
71
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: EditedThesaurusRepository, providedIn: 'root' }); }
|
|
75
72
|
}
|
|
76
73
|
export { EditedThesaurusRepository };
|
|
77
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
74
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: EditedThesaurusRepository, decorators: [{
|
|
78
75
|
type: Injectable,
|
|
79
76
|
args: [{ providedIn: 'root' }]
|
|
80
77
|
}], ctorParameters: function () { return [{ type: i1.ThesaurusService }]; } });
|
|
81
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
78
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWRpdGVkLXRoZXNhdXJ1cy5yZXBvc2l0b3J5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbXlybWlkb24vY2FkbXVzLXN0YXRlL3NyYy9saWIvZWRpdGVkLXRoZXNhdXJ1cy5yZXBvc2l0b3J5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0MsT0FBTyxFQUFFLGVBQWUsRUFBYyxNQUFNLE1BQU0sQ0FBQzs7O0FBS25ELE1BQ2EseUJBQXlCO0lBUXBDLElBQVcsVUFBVTtRQUNuQixPQUFPLElBQUksQ0FBQyxXQUFXLENBQUMsWUFBWSxFQUFFLENBQUM7SUFDekMsQ0FBQztJQUVELFlBQW9CLGlCQUFtQztRQUFuQyxzQkFBaUIsR0FBakIsaUJBQWlCLENBQWtCO1FBQ3JELElBQUksQ0FBQyxXQUFXLEdBQUcsSUFBSSxlQUFlLENBQXdCLFNBQVMsQ0FBQyxDQUFDO1FBQ3pFLElBQUksQ0FBQyxTQUFTLEdBQUcsSUFBSSxlQUFlLENBQVUsS0FBSyxDQUFDLENBQUM7UUFDckQsSUFBSSxDQUFDLFFBQVEsR0FBRyxJQUFJLENBQUMs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AgICAgICBuZXh0OiAoc2F2ZWQpID0+IHtcclxuICAgICAgICAgIHRoaXMuX3NhdmluZyQubmV4dChmYWxzZSk7XHJcbiAgICAgICAgICB0aGlzLmxvYWQoc2F2ZWQuaWQpO1xyXG4gICAgICAgICAgcmVzb2x2ZShzYXZlZCk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBlcnJvcjogKGVycm9yKSA9PiB7XHJcbiAgICAgICAgICB0aGlzLl9zYXZpbmckLm5leHQoZmFsc2UpO1xyXG4gICAgICAgICAgY29uc29sZS5lcnJvcihcclxuICAgICAgICAgICAgJ0Vycm9yIGxvZGluZyB0aGVzYXVydXM6ICcgKyBKU09OLnN0cmluZ2lmeShlcnJvciB8fCB7fSlcclxuICAgICAgICAgICk7XHJcbiAgICAgICAgICByZWplY3QoZXJyb3IpO1xyXG4gICAgICAgIH0sXHJcbiAgICAgIH0pO1xyXG4gICAgfSk7XHJcbiAgfVxyXG59XHJcbiJdfQ==
|
|
@@ -155,11 +155,11 @@ class FragmentEditorService {
|
|
|
155
155
|
});
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
159
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.
|
|
158
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: FragmentEditorService, deps: [{ token: i1.ItemService }, { token: i1.ThesaurusService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
159
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: FragmentEditorService, providedIn: 'root' }); }
|
|
160
160
|
}
|
|
161
161
|
export { FragmentEditorService };
|
|
162
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
162
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: FragmentEditorService, decorators: [{
|
|
163
163
|
type: Injectable,
|
|
164
164
|
args: [{
|
|
165
165
|
providedIn: 'root',
|
|
@@ -145,11 +145,11 @@ class PartEditorService {
|
|
|
145
145
|
});
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
149
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.
|
|
148
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: PartEditorService, deps: [{ token: i1.ItemService }, { token: i1.ThesaurusService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
149
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: PartEditorService, providedIn: 'root' }); }
|
|
150
150
|
}
|
|
151
151
|
export { PartEditorService };
|
|
152
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
152
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: PartEditorService, decorators: [{
|
|
153
153
|
type: Injectable,
|
|
154
154
|
args: [{
|
|
155
155
|
providedIn: 'root',
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, Component, NgModule } from '@angular/core';
|
|
3
|
-
import {
|
|
4
|
-
import { withRequestsStatus, updateRequestStatus } from '@ngneat/elf-requests';
|
|
5
|
-
import { forkJoin, BehaviorSubject, take, map } from 'rxjs';
|
|
3
|
+
import { BehaviorSubject, forkJoin, take, map } from 'rxjs';
|
|
6
4
|
import * as i1 from '@myrmidon/cadmus-api';
|
|
7
5
|
import { CadmusApiModule } from '@myrmidon/cadmus-api';
|
|
8
6
|
import * as i4 from '@myrmidon/cadmus-core';
|
|
@@ -16,31 +14,50 @@ import { CommonModule } from '@angular/common';
|
|
|
16
14
|
* App state ELF repository.
|
|
17
15
|
*/
|
|
18
16
|
class AppRepository {
|
|
17
|
+
get facets$() {
|
|
18
|
+
return this._facets$;
|
|
19
|
+
}
|
|
20
|
+
get flags$() {
|
|
21
|
+
return this._flags$;
|
|
22
|
+
}
|
|
23
|
+
get typeThesaurus$() {
|
|
24
|
+
return this._typeThesaurus$;
|
|
25
|
+
}
|
|
26
|
+
get itemBrowserThesaurus$() {
|
|
27
|
+
return this._itemBrowserThesaurus$;
|
|
28
|
+
}
|
|
29
|
+
get previewJKeys$() {
|
|
30
|
+
return this._previewJKeys$;
|
|
31
|
+
}
|
|
32
|
+
get previewFKeys$() {
|
|
33
|
+
return this._previewFKeys$;
|
|
34
|
+
}
|
|
35
|
+
get previewCKeys$() {
|
|
36
|
+
return this._previewCKeys$;
|
|
37
|
+
}
|
|
19
38
|
constructor(_facetService, _flagService, _thesaurusService, _previewService) {
|
|
20
39
|
this._facetService = _facetService;
|
|
21
40
|
this._flagService = _flagService;
|
|
22
41
|
this._thesaurusService = _thesaurusService;
|
|
23
42
|
this._previewService = _previewService;
|
|
24
|
-
this.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return this._store.getValue();
|
|
43
|
+
this._facets$ = new BehaviorSubject([]);
|
|
44
|
+
this._flags$ = new BehaviorSubject([]);
|
|
45
|
+
this._typeThesaurus$ = new BehaviorSubject(undefined);
|
|
46
|
+
this._itemBrowserThesaurus$ = new BehaviorSubject(undefined);
|
|
47
|
+
this._previewJKeys$ = new BehaviorSubject([]);
|
|
48
|
+
this._previewFKeys$ = new BehaviorSubject([]);
|
|
49
|
+
this._previewCKeys$ = new BehaviorSubject([]);
|
|
50
|
+
}
|
|
51
|
+
getTypeThesaurus() {
|
|
52
|
+
return this._typeThesaurus$.value;
|
|
53
|
+
}
|
|
54
|
+
getFacets() {
|
|
55
|
+
return this._facets$.value;
|
|
56
|
+
}
|
|
57
|
+
getFlags() {
|
|
58
|
+
return this._flags$.value;
|
|
41
59
|
}
|
|
42
60
|
load() {
|
|
43
|
-
this._store.update(updateRequestStatus('app', 'pending'));
|
|
44
61
|
const facets$ = this._facetService.getFacets();
|
|
45
62
|
const flags$ = this._flagService.getFlags();
|
|
46
63
|
const thesauri$ = this._thesaurusService.getThesauriSet([
|
|
@@ -59,24 +76,20 @@ class AppRepository {
|
|
|
59
76
|
cKeys: cKeys$,
|
|
60
77
|
}).subscribe({
|
|
61
78
|
next: (result) => {
|
|
62
|
-
this.
|
|
63
|
-
this.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
previewJKeys: result.jKeys,
|
|
70
|
-
previewFKeys: result.fKeys,
|
|
71
|
-
previewCKeys: result.cKeys,
|
|
72
|
-
}));
|
|
79
|
+
this._facets$.next(result.facets);
|
|
80
|
+
this._flags$.next(result.flags);
|
|
81
|
+
this._typeThesaurus$.next(result.thesauri['model-types']);
|
|
82
|
+
this._itemBrowserThesaurus$.next(result.thesauri['item-browsers']);
|
|
83
|
+
this._previewJKeys$.next(result.jKeys);
|
|
84
|
+
this._previewFKeys$.next(result.fKeys);
|
|
85
|
+
this._previewCKeys$.next(result.cKeys);
|
|
73
86
|
},
|
|
74
87
|
});
|
|
75
88
|
}
|
|
76
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
77
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.
|
|
89
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: AppRepository, deps: [{ token: i1.FacetService }, { token: i1.FlagService }, { token: i1.ThesaurusService }, { token: i1.PreviewService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
90
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: AppRepository, providedIn: 'root' }); }
|
|
78
91
|
}
|
|
79
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
92
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: AppRepository, decorators: [{
|
|
80
93
|
type: Injectable,
|
|
81
94
|
args: [{ providedIn: 'root' }]
|
|
82
95
|
}], ctorParameters: function () { return [{ type: i1.FacetService }, { type: i1.FlagService }, { type: i1.ThesaurusService }, { type: i1.PreviewService }]; } });
|
|
@@ -234,10 +247,10 @@ class FragmentEditorService {
|
|
|
234
247
|
});
|
|
235
248
|
});
|
|
236
249
|
}
|
|
237
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
238
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.
|
|
250
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: FragmentEditorService, deps: [{ token: i1.ItemService }, { token: i1.ThesaurusService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
251
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: FragmentEditorService, providedIn: 'root' }); }
|
|
239
252
|
}
|
|
240
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
253
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: FragmentEditorService, decorators: [{
|
|
241
254
|
type: Injectable,
|
|
242
255
|
args: [{
|
|
243
256
|
providedIn: 'root',
|
|
@@ -358,10 +371,10 @@ class EditFragmentFeatureBase {
|
|
|
358
371
|
},
|
|
359
372
|
});
|
|
360
373
|
}
|
|
361
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
362
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.
|
|
374
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: EditFragmentFeatureBase, deps: [{ token: i1$1.Router }, { token: i1$1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: FragmentEditorService }, { token: i4.LibraryRouteService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
375
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.7", type: EditFragmentFeatureBase, selector: "ng-component", ngImport: i0, template: '', isInline: true }); }
|
|
363
376
|
}
|
|
364
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
377
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: EditFragmentFeatureBase, decorators: [{
|
|
365
378
|
type: Component,
|
|
366
379
|
args: [{
|
|
367
380
|
template: '',
|
|
@@ -511,10 +524,10 @@ class PartEditorService {
|
|
|
511
524
|
});
|
|
512
525
|
});
|
|
513
526
|
}
|
|
514
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
515
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.
|
|
527
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: PartEditorService, deps: [{ token: i1.ItemService }, { token: i1.ThesaurusService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
528
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: PartEditorService, providedIn: 'root' }); }
|
|
516
529
|
}
|
|
517
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
530
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: PartEditorService, decorators: [{
|
|
518
531
|
type: Injectable,
|
|
519
532
|
args: [{
|
|
520
533
|
providedIn: 'root',
|
|
@@ -653,10 +666,10 @@ class EditPartFeatureBase {
|
|
|
653
666
|
close() {
|
|
654
667
|
this.router.navigate(['items', this.identity.itemId]);
|
|
655
668
|
}
|
|
656
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
657
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.
|
|
669
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: EditPartFeatureBase, deps: [{ token: i1$1.Router }, { token: i1$1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i1.ItemService }, { token: i1.ThesaurusService }, { token: PartEditorService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
670
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.7", type: EditPartFeatureBase, selector: "ng-component", ngImport: i0, template: '', isInline: true }); }
|
|
658
671
|
}
|
|
659
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
672
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: EditPartFeatureBase, decorators: [{
|
|
660
673
|
type: Component,
|
|
661
674
|
args: [{
|
|
662
675
|
template: '',
|
|
@@ -664,20 +677,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImpor
|
|
|
664
677
|
}], ctorParameters: function () { return [{ type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i1.ItemService }, { type: i1.ThesaurusService }, { type: PartEditorService }]; } });
|
|
665
678
|
|
|
666
679
|
class EditedThesaurusRepository {
|
|
680
|
+
get thesaurus$() {
|
|
681
|
+
return this._thesaurus$.asObservable();
|
|
682
|
+
}
|
|
667
683
|
constructor(_thesaurusService) {
|
|
668
684
|
this._thesaurusService = _thesaurusService;
|
|
669
|
-
this.
|
|
685
|
+
this._thesaurus$ = new BehaviorSubject(undefined);
|
|
670
686
|
this._loading$ = new BehaviorSubject(false);
|
|
671
687
|
this.loading$ = this._loading$.asObservable();
|
|
672
688
|
this._saving$ = new BehaviorSubject(false);
|
|
673
689
|
this.saving$ = this._saving$.asObservable();
|
|
674
|
-
this.thesaurus$ = this._store.pipe(select((state) => state.thesaurus));
|
|
675
|
-
}
|
|
676
|
-
getValue() {
|
|
677
|
-
return this._store.getValue();
|
|
678
690
|
}
|
|
679
691
|
getThesaurus() {
|
|
680
|
-
return this.
|
|
692
|
+
return this._thesaurus$.value;
|
|
681
693
|
}
|
|
682
694
|
/**
|
|
683
695
|
* Load the specified thesaurus.
|
|
@@ -690,7 +702,7 @@ class EditedThesaurusRepository {
|
|
|
690
702
|
this._thesaurusService.getThesaurus(id, true).subscribe({
|
|
691
703
|
next: (thesaurus) => {
|
|
692
704
|
this._loading$.next(false);
|
|
693
|
-
this.
|
|
705
|
+
this._thesaurus$.next(thesaurus);
|
|
694
706
|
},
|
|
695
707
|
error: (error) => {
|
|
696
708
|
this._loading$.next(false);
|
|
@@ -699,11 +711,11 @@ class EditedThesaurusRepository {
|
|
|
699
711
|
});
|
|
700
712
|
}
|
|
701
713
|
else {
|
|
702
|
-
this.
|
|
714
|
+
this._thesaurus$.next({
|
|
703
715
|
id: '',
|
|
704
716
|
language: 'en',
|
|
705
717
|
entries: [],
|
|
706
|
-
})
|
|
718
|
+
});
|
|
707
719
|
}
|
|
708
720
|
}
|
|
709
721
|
/**
|
|
@@ -729,52 +741,72 @@ class EditedThesaurusRepository {
|
|
|
729
741
|
});
|
|
730
742
|
});
|
|
731
743
|
}
|
|
732
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
733
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.
|
|
744
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: EditedThesaurusRepository, deps: [{ token: i1.ThesaurusService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
745
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: EditedThesaurusRepository, providedIn: 'root' }); }
|
|
734
746
|
}
|
|
735
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
747
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: EditedThesaurusRepository, decorators: [{
|
|
736
748
|
type: Injectable,
|
|
737
749
|
args: [{ providedIn: 'root' }]
|
|
738
750
|
}], ctorParameters: function () { return [{ type: i1.ThesaurusService }]; } });
|
|
739
751
|
|
|
740
752
|
/**
|
|
741
|
-
* Edited layer part
|
|
753
|
+
* Edited layer part repository.
|
|
742
754
|
*/
|
|
743
755
|
class EditedLayerRepository {
|
|
756
|
+
get loading$() {
|
|
757
|
+
return this._loading$.asObservable();
|
|
758
|
+
}
|
|
759
|
+
get saving$() {
|
|
760
|
+
return this._saving$.asObservable();
|
|
761
|
+
}
|
|
762
|
+
get part$() {
|
|
763
|
+
return this._part$.asObservable();
|
|
764
|
+
}
|
|
765
|
+
get baseText$() {
|
|
766
|
+
return this._baseText$.asObservable();
|
|
767
|
+
}
|
|
768
|
+
get baseTextPart$() {
|
|
769
|
+
return this._baseTextPart$.asObservable();
|
|
770
|
+
}
|
|
771
|
+
get locations$() {
|
|
772
|
+
return this._locations$.asObservable();
|
|
773
|
+
}
|
|
774
|
+
get breakChance$() {
|
|
775
|
+
return this._breakChance$.asObservable();
|
|
776
|
+
}
|
|
777
|
+
get layerHints$() {
|
|
778
|
+
return this._layerHints$.asObservable();
|
|
779
|
+
}
|
|
744
780
|
constructor(_itemService, _facetService, _thesaurusService) {
|
|
745
781
|
this._itemService = _itemService;
|
|
746
782
|
this._facetService = _facetService;
|
|
747
783
|
this._thesaurusService = _thesaurusService;
|
|
748
|
-
this.
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
784
|
+
this._part$ = new BehaviorSubject(undefined);
|
|
785
|
+
this._baseText$ = new BehaviorSubject(undefined);
|
|
786
|
+
this._baseTextPart$ = new BehaviorSubject(undefined);
|
|
787
|
+
this._locations$ = new BehaviorSubject([]);
|
|
788
|
+
this._breakChance$ = new BehaviorSubject(-1);
|
|
789
|
+
this._layerHints$ = new BehaviorSubject([]);
|
|
790
|
+
this._thesauriSet = new BehaviorSubject(undefined);
|
|
753
791
|
this._loading$ = new BehaviorSubject(false);
|
|
754
|
-
this.loading$ = this._loading$.asObservable();
|
|
755
792
|
this._saving$ = new BehaviorSubject(false);
|
|
756
|
-
this.saving$ = this._saving$.asObservable();
|
|
757
|
-
this.part$ = this._store.pipe(select((state) => state.part));
|
|
758
|
-
this.baseText$ = this._store.pipe(select((state) => state.baseText));
|
|
759
|
-
this.baseTextPart$ = this._store.pipe(select((state) => state.baseTextPart));
|
|
760
|
-
this.locations$ = this._store.pipe(select((state) => state.locations));
|
|
761
|
-
this.breakChance$ = this._store.pipe(select((state) => state.breakChance));
|
|
762
|
-
this.layerHints$ = this._store.pipe(select((state) => state.layerHints));
|
|
763
793
|
}
|
|
764
794
|
reset() {
|
|
765
|
-
this.
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
795
|
+
this._part$.next(undefined);
|
|
796
|
+
this._baseText$.next(undefined);
|
|
797
|
+
this._baseTextPart$.next(undefined);
|
|
798
|
+
this._locations$.next([]);
|
|
799
|
+
this._breakChance$.next(-1);
|
|
800
|
+
this._layerHints$.next([]);
|
|
769
801
|
}
|
|
770
802
|
getPart() {
|
|
771
|
-
return this.
|
|
803
|
+
return this._part$.value;
|
|
772
804
|
}
|
|
773
805
|
getBaseText() {
|
|
774
|
-
return this.
|
|
806
|
+
return this._baseText$.value;
|
|
775
807
|
}
|
|
776
808
|
getLocations() {
|
|
777
|
-
return this.
|
|
809
|
+
return this._locations$.value;
|
|
778
810
|
}
|
|
779
811
|
getPartLocations(part) {
|
|
780
812
|
const locations = [];
|
|
@@ -809,16 +841,13 @@ class EditedLayerRepository {
|
|
|
809
841
|
this._thesaurusService.getThesauriSet(scopedIds).subscribe({
|
|
810
842
|
next: (thesauri) => {
|
|
811
843
|
this._loading$.next(false);
|
|
812
|
-
this.
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
layerHints: result.layerHints,
|
|
820
|
-
thesauri: thesauri,
|
|
821
|
-
}));
|
|
844
|
+
this._part$.next(result.layerPart);
|
|
845
|
+
this._baseText$.next(result.baseText.text);
|
|
846
|
+
this._baseTextPart$.next(result.baseText.part);
|
|
847
|
+
this._locations$.next(this.getPartLocations(result.layerPart));
|
|
848
|
+
this._breakChance$.next(result.breakChance.chance);
|
|
849
|
+
this._layerHints$.next(result.layerHints);
|
|
850
|
+
this._thesauriSet.next(thesauri);
|
|
822
851
|
},
|
|
823
852
|
error: (error) => {
|
|
824
853
|
this._loading$.next(false);
|
|
@@ -828,16 +857,13 @@ class EditedLayerRepository {
|
|
|
828
857
|
}
|
|
829
858
|
else {
|
|
830
859
|
this._loading$.next(false);
|
|
831
|
-
this.
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
layerHints: result.layerHints,
|
|
839
|
-
thesauri: result.thesauri,
|
|
840
|
-
}));
|
|
860
|
+
this._part$.next(result.layerPart);
|
|
861
|
+
this._baseText$.next(result.baseText.text);
|
|
862
|
+
this._baseTextPart$.next(result.baseText.part);
|
|
863
|
+
this._locations$.next(this.getPartLocations(result.layerPart));
|
|
864
|
+
this._breakChance$.next(result.breakChance.chance);
|
|
865
|
+
this._layerHints$.next(result.layerHints);
|
|
866
|
+
this._thesauriSet.next(result.thesauri);
|
|
841
867
|
}
|
|
842
868
|
},
|
|
843
869
|
error: (error) => {
|
|
@@ -858,15 +884,12 @@ class EditedLayerRepository {
|
|
|
858
884
|
}).subscribe({
|
|
859
885
|
next: (result) => {
|
|
860
886
|
this._loading$.next(false);
|
|
861
|
-
this.
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
breakChance: result.breakChance.chance,
|
|
868
|
-
layerHints: result.layerHints,
|
|
869
|
-
}));
|
|
887
|
+
this._part$.next(result.layerPart);
|
|
888
|
+
this._baseText$.next(result.baseText.text);
|
|
889
|
+
this._baseTextPart$.next(result.baseText.part);
|
|
890
|
+
this._locations$.next(this.getPartLocations(result.layerPart));
|
|
891
|
+
this._breakChance$.next(result.breakChance.chance);
|
|
892
|
+
this._layerHints$.next(result.layerHints);
|
|
870
893
|
},
|
|
871
894
|
error: (error) => {
|
|
872
895
|
this._loading$.next(false);
|
|
@@ -893,18 +916,17 @@ class EditedLayerRepository {
|
|
|
893
916
|
* Refresh the layer part break chance.
|
|
894
917
|
*/
|
|
895
918
|
refreshBreakChance() {
|
|
896
|
-
const
|
|
897
|
-
const part = store.part;
|
|
919
|
+
const part = this._part$.value;
|
|
898
920
|
if (!part) {
|
|
899
921
|
return;
|
|
900
922
|
}
|
|
901
923
|
this._itemService.getLayerPartBreakChance(part.id).subscribe({
|
|
902
924
|
next: (result) => {
|
|
903
|
-
this.
|
|
925
|
+
this._breakChance$.next(result.chance);
|
|
904
926
|
},
|
|
905
927
|
error: (error) => {
|
|
906
928
|
console.error('Error calculating break chance: ' + JSON.stringify(error || {}));
|
|
907
|
-
this.
|
|
929
|
+
this._breakChance$.next(-1);
|
|
908
930
|
},
|
|
909
931
|
});
|
|
910
932
|
}
|
|
@@ -928,7 +950,7 @@ class EditedLayerRepository {
|
|
|
928
950
|
*/
|
|
929
951
|
deleteFragment(loc) {
|
|
930
952
|
// find the fragment
|
|
931
|
-
let part = this.
|
|
953
|
+
let part = this._part$.value;
|
|
932
954
|
if (!part) {
|
|
933
955
|
return;
|
|
934
956
|
}
|
|
@@ -964,7 +986,7 @@ class EditedLayerRepository {
|
|
|
964
986
|
*/
|
|
965
987
|
saveFragment(fragment) {
|
|
966
988
|
// find the fragment
|
|
967
|
-
let part = this.
|
|
989
|
+
let part = this._part$.value;
|
|
968
990
|
if (!part) {
|
|
969
991
|
return;
|
|
970
992
|
}
|
|
@@ -1001,28 +1023,28 @@ class EditedLayerRepository {
|
|
|
1001
1023
|
},
|
|
1002
1024
|
});
|
|
1003
1025
|
}
|
|
1004
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
1005
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.
|
|
1026
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: EditedLayerRepository, deps: [{ token: i1.ItemService }, { token: i1.FacetService }, { token: i1.ThesaurusService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1027
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: EditedLayerRepository, providedIn: 'root' }); }
|
|
1006
1028
|
}
|
|
1007
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
1029
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: EditedLayerRepository, decorators: [{
|
|
1008
1030
|
type: Injectable,
|
|
1009
1031
|
args: [{ providedIn: 'root' }]
|
|
1010
1032
|
}], ctorParameters: function () { return [{ type: i1.ItemService }, { type: i1.FacetService }, { type: i1.ThesaurusService }]; } });
|
|
1011
1033
|
|
|
1012
1034
|
class CadmusStateModule {
|
|
1013
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
1014
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.
|
|
1035
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: CadmusStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1036
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.7", ngImport: i0, type: CadmusStateModule, imports: [CommonModule,
|
|
1015
1037
|
// Cadmus
|
|
1016
1038
|
CadmusCoreModule,
|
|
1017
1039
|
CadmusApiModule,
|
|
1018
1040
|
NgToolsModule] }); }
|
|
1019
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.
|
|
1041
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: CadmusStateModule, imports: [CommonModule,
|
|
1020
1042
|
// Cadmus
|
|
1021
1043
|
CadmusCoreModule,
|
|
1022
1044
|
CadmusApiModule,
|
|
1023
1045
|
NgToolsModule] }); }
|
|
1024
1046
|
}
|
|
1025
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
1047
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImport: i0, type: CadmusStateModule, decorators: [{
|
|
1026
1048
|
type: NgModule,
|
|
1027
1049
|
args: [{
|
|
1028
1050
|
imports: [
|