@myrmidon/cadmus-part-general-pg 2.1.2 → 5.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/bibliography-part-feature/bibliography-part-feature.component.mjs +30 -0
- package/{esm2020 → esm2022}/lib/cadmus-part-general-pg.module.mjs +347 -346
- package/esm2022/lib/categories-part-feature/categories-part-feature.component.mjs +26 -0
- package/esm2022/lib/chronology-fragment-feature/chronology-fragment-feature.component.mjs +26 -0
- package/esm2022/lib/chronotopes-part-feature/chronotopes-part-feature.component.mjs +30 -0
- package/esm2022/lib/comment-fragment-feature/comment-fragment-feature.component.mjs +36 -0
- package/esm2022/lib/comment-part-feature/comment-part-feature.component.mjs +36 -0
- package/esm2022/lib/doc-references-part-feature/doc-references-part-feature.component.mjs +25 -0
- package/esm2022/lib/external-ids-part-feature/external-ids-part-feature.component.mjs +31 -0
- package/esm2022/lib/historical-date-part-feature/historical-date-part-feature.component.mjs +25 -0
- package/esm2022/lib/historical-events-part-feature/historical-events-part-feature.component.mjs +34 -0
- package/esm2022/lib/index-keywords-part-feature/index-keywords-part-feature.component.mjs +25 -0
- package/esm2022/lib/keywords-part-feature/keywords-part-feature.component.mjs +25 -0
- package/esm2022/lib/metadata-part-feature/metadata-part-feature.component.mjs +25 -0
- package/esm2022/lib/names-part-feature/names-part-feature.component.mjs +33 -0
- package/esm2022/lib/note-part-feature/note-part-feature.component.mjs +26 -0
- package/esm2022/lib/pin-links-fragment-feature/pin-links-fragment-feature.component.mjs +26 -0
- package/esm2022/lib/pin-links-part-feature/pin-links-part-feature.component.mjs +25 -0
- package/esm2022/lib/tiled-text-layer-part-feature/tiled-text-layer-part-feature.component.mjs +239 -0
- package/{esm2020 → esm2022}/lib/tiled-text-layer-part-feature/tiled-text-layer-view.mjs +379 -379
- package/esm2022/lib/tiled-text-part-feature/tiled-text-part-feature.component.mjs +22 -0
- package/esm2022/lib/token-text-layer-part-feature/token-text-layer-part-feature.component.mjs +190 -0
- package/esm2022/lib/token-text-part-feature/token-text-part-feature.component.mjs +22 -0
- package/{esm2020 → esm2022}/myrmidon-cadmus-part-general-pg.mjs +4 -4
- package/{esm2020 → esm2022}/public-api.mjs +25 -25
- package/{fesm2020 → fesm2022}/myrmidon-cadmus-part-general-pg.mjs +1358 -1358
- package/fesm2022/myrmidon-cadmus-part-general-pg.mjs.map +1 -0
- package/index.d.ts +5 -5
- package/lib/bibliography-part-feature/bibliography-part-feature.component.d.ts +12 -12
- package/lib/cadmus-part-general-pg.module.d.ts +50 -50
- package/lib/categories-part-feature/categories-part-feature.component.d.ts +12 -12
- package/lib/chronology-fragment-feature/chronology-fragment-feature.component.d.ts +12 -12
- package/lib/chronotopes-part-feature/chronotopes-part-feature.component.d.ts +12 -12
- package/lib/comment-fragment-feature/comment-fragment-feature.component.d.ts +12 -12
- package/lib/comment-part-feature/comment-part-feature.component.d.ts +12 -12
- package/lib/doc-references-part-feature/doc-references-part-feature.component.d.ts +12 -12
- package/lib/external-ids-part-feature/external-ids-part-feature.component.d.ts +12 -12
- package/lib/historical-date-part-feature/historical-date-part-feature.component.d.ts +12 -12
- package/lib/historical-events-part-feature/historical-events-part-feature.component.d.ts +12 -12
- package/lib/index-keywords-part-feature/index-keywords-part-feature.component.d.ts +12 -12
- package/lib/keywords-part-feature/keywords-part-feature.component.d.ts +12 -12
- package/lib/metadata-part-feature/metadata-part-feature.component.d.ts +12 -12
- package/lib/names-part-feature/names-part-feature.component.d.ts +12 -12
- package/lib/note-part-feature/note-part-feature.component.d.ts +12 -12
- package/lib/pin-links-fragment-feature/pin-links-fragment-feature.component.d.ts +12 -12
- package/lib/pin-links-part-feature/pin-links-part-feature.component.d.ts +12 -12
- package/lib/tiled-text-layer-part-feature/tiled-text-layer-part-feature.component.d.ts +66 -66
- package/lib/tiled-text-layer-part-feature/tiled-text-layer-view.d.ts +145 -145
- package/lib/tiled-text-part-feature/tiled-text-part-feature.component.d.ts +11 -11
- package/lib/token-text-layer-part-feature/token-text-layer-part-feature.component.d.ts +54 -54
- package/lib/token-text-part-feature/token-text-part-feature.component.d.ts +11 -11
- package/package.json +8 -14
- package/public-api.d.ts +22 -22
- package/esm2020/lib/bibliography-part-feature/bibliography-part-feature.component.mjs +0 -29
- package/esm2020/lib/categories-part-feature/categories-part-feature.component.mjs +0 -25
- package/esm2020/lib/chronology-fragment-feature/chronology-fragment-feature.component.mjs +0 -25
- package/esm2020/lib/chronotopes-part-feature/chronotopes-part-feature.component.mjs +0 -29
- package/esm2020/lib/comment-fragment-feature/comment-fragment-feature.component.mjs +0 -35
- package/esm2020/lib/comment-part-feature/comment-part-feature.component.mjs +0 -35
- package/esm2020/lib/doc-references-part-feature/doc-references-part-feature.component.mjs +0 -24
- package/esm2020/lib/external-ids-part-feature/external-ids-part-feature.component.mjs +0 -30
- package/esm2020/lib/historical-date-part-feature/historical-date-part-feature.component.mjs +0 -24
- package/esm2020/lib/historical-events-part-feature/historical-events-part-feature.component.mjs +0 -33
- package/esm2020/lib/index-keywords-part-feature/index-keywords-part-feature.component.mjs +0 -24
- package/esm2020/lib/keywords-part-feature/keywords-part-feature.component.mjs +0 -24
- package/esm2020/lib/metadata-part-feature/metadata-part-feature.component.mjs +0 -24
- package/esm2020/lib/names-part-feature/names-part-feature.component.mjs +0 -32
- package/esm2020/lib/note-part-feature/note-part-feature.component.mjs +0 -25
- package/esm2020/lib/pin-links-fragment-feature/pin-links-fragment-feature.component.mjs +0 -25
- package/esm2020/lib/pin-links-part-feature/pin-links-part-feature.component.mjs +0 -24
- package/esm2020/lib/tiled-text-layer-part-feature/tiled-text-layer-part-feature.component.mjs +0 -238
- package/esm2020/lib/tiled-text-part-feature/tiled-text-part-feature.component.mjs +0 -21
- package/esm2020/lib/token-text-layer-part-feature/token-text-layer-part-feature.component.mjs +0 -189
- package/esm2020/lib/token-text-part-feature/token-text-part-feature.component.mjs +0 -21
- package/fesm2015/myrmidon-cadmus-part-general-pg.mjs +0 -1458
- package/fesm2015/myrmidon-cadmus-part-general-pg.mjs.map +0 -1
- package/fesm2020/myrmidon-cadmus-part-general-pg.mjs.map +0 -1
|
@@ -41,1412 +41,1412 @@ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
|
41
41
|
import { MatSelectModule } from '@angular/material/select';
|
|
42
42
|
import { NgToolsModule } from '@myrmidon/ng-tools';
|
|
43
43
|
|
|
44
|
-
class BibliographyPartFeatureComponent extends EditPartFeatureBase {
|
|
45
|
-
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
46
|
-
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
47
|
-
}
|
|
48
|
-
getReqThesauriIds() {
|
|
49
|
-
return [
|
|
50
|
-
'bibliography-languages',
|
|
51
|
-
'bibliography-types',
|
|
52
|
-
'bibliography-tags',
|
|
53
|
-
'bibliography-author-roles',
|
|
54
|
-
];
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
60
|
-
type: Component,
|
|
61
|
-
args: [{ selector: 'cadmus-bibliography-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-bibliography-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-bibliography-part>\r\n" }]
|
|
44
|
+
class BibliographyPartFeatureComponent extends EditPartFeatureBase {
|
|
45
|
+
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
46
|
+
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
47
|
+
}
|
|
48
|
+
getReqThesauriIds() {
|
|
49
|
+
return [
|
|
50
|
+
'bibliography-languages',
|
|
51
|
+
'bibliography-types',
|
|
52
|
+
'bibliography-tags',
|
|
53
|
+
'bibliography-author-roles',
|
|
54
|
+
];
|
|
55
|
+
}
|
|
56
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: BibliographyPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
57
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: BibliographyPartFeatureComponent, selector: "cadmus-bibliography-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-bibliography-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-bibliography-part>\r\n", styles: [""], dependencies: [{ kind: "component", type: i5.BibliographyPartComponent, selector: "cadmus-bibliography-part" }, { kind: "component", type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }] }); }
|
|
58
|
+
}
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: BibliographyPartFeatureComponent, decorators: [{
|
|
60
|
+
type: Component,
|
|
61
|
+
args: [{ selector: 'cadmus-bibliography-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-bibliography-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-bibliography-part>\r\n" }]
|
|
62
62
|
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }]; } });
|
|
63
63
|
|
|
64
|
-
class CategoriesPartFeatureComponent extends EditPartFeatureBase {
|
|
65
|
-
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
66
|
-
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
67
|
-
this.roleIdInThesauri = true;
|
|
68
|
-
}
|
|
69
|
-
getReqThesauriIds() {
|
|
70
|
-
return ['categories'];
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
76
|
-
type: Component,
|
|
77
|
-
args: [{ selector: 'cadmus-categories-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-categories-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-categories-part>\r\n" }]
|
|
64
|
+
class CategoriesPartFeatureComponent extends EditPartFeatureBase {
|
|
65
|
+
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
66
|
+
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
67
|
+
this.roleIdInThesauri = true;
|
|
68
|
+
}
|
|
69
|
+
getReqThesauriIds() {
|
|
70
|
+
return ['categories'];
|
|
71
|
+
}
|
|
72
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: CategoriesPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
73
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: CategoriesPartFeatureComponent, selector: "cadmus-categories-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-categories-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-categories-part>\r\n", styles: [""], dependencies: [{ kind: "component", type: i5.CategoriesPartComponent, selector: "cadmus-categories-part" }, { kind: "component", type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }] }); }
|
|
74
|
+
}
|
|
75
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: CategoriesPartFeatureComponent, decorators: [{
|
|
76
|
+
type: Component,
|
|
77
|
+
args: [{ selector: 'cadmus-categories-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-categories-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-categories-part>\r\n" }]
|
|
78
78
|
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }]; } });
|
|
79
79
|
|
|
80
|
-
class ChronologyFragmentFeatureComponent extends EditFragmentFeatureBase {
|
|
81
|
-
constructor(router, route, snackbar, editorService, libraryRouteService) {
|
|
82
|
-
super(router, route, snackbar, editorService, libraryRouteService);
|
|
83
|
-
}
|
|
84
|
-
getReqThesauriIds() {
|
|
85
|
-
return ['chronology-tags'];
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
91
|
-
type: Component,
|
|
92
|
-
args: [{ selector: 'cadmus-chronology-fragment-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<div class=\"base-text\">\r\n <cadmus-decorated-token-text\r\n [baseText]=\"data?.baseText || ''\"\r\n [locations]=\"frLoc ? [frLoc] : []\"\r\n ></cadmus-decorated-token-text>\r\n</div>\r\n<cadmus-chronology-fragment\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-chronology-fragment>\r\n" }]
|
|
80
|
+
class ChronologyFragmentFeatureComponent extends EditFragmentFeatureBase {
|
|
81
|
+
constructor(router, route, snackbar, editorService, libraryRouteService) {
|
|
82
|
+
super(router, route, snackbar, editorService, libraryRouteService);
|
|
83
|
+
}
|
|
84
|
+
getReqThesauriIds() {
|
|
85
|
+
return ['chronology-tags'];
|
|
86
|
+
}
|
|
87
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ChronologyFragmentFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i4.FragmentEditorService }, { token: i4$1.LibraryRouteService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
88
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: ChronologyFragmentFeatureComponent, selector: "cadmus-chronology-fragment-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<div class=\"base-text\">\r\n <cadmus-decorated-token-text\r\n [baseText]=\"data?.baseText || ''\"\r\n [locations]=\"frLoc ? [frLoc] : []\"\r\n ></cadmus-decorated-token-text>\r\n</div>\r\n<cadmus-chronology-fragment\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-chronology-fragment>\r\n", styles: [""], dependencies: [{ kind: "component", type: i5$1.DecoratedTokenTextComponent, selector: "cadmus-decorated-token-text", inputs: ["baseText", "locations", "selectedLocation"] }, { kind: "component", type: i5.ChronologyFragmentComponent, selector: "cadmus-chronology-fragment" }, { kind: "component", type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }] }); }
|
|
89
|
+
}
|
|
90
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ChronologyFragmentFeatureComponent, decorators: [{
|
|
91
|
+
type: Component,
|
|
92
|
+
args: [{ selector: 'cadmus-chronology-fragment-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<div class=\"base-text\">\r\n <cadmus-decorated-token-text\r\n [baseText]=\"data?.baseText || ''\"\r\n [locations]=\"frLoc ? [frLoc] : []\"\r\n ></cadmus-decorated-token-text>\r\n</div>\r\n<cadmus-chronology-fragment\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-chronology-fragment>\r\n" }]
|
|
93
93
|
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i4.FragmentEditorService }, { type: i4$1.LibraryRouteService }]; } });
|
|
94
94
|
|
|
95
|
-
class ChronotopesPartFeatureComponent extends EditPartFeatureBase {
|
|
96
|
-
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
97
|
-
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
98
|
-
}
|
|
99
|
-
getReqThesauriIds() {
|
|
100
|
-
return [
|
|
101
|
-
'chronotope-place-tags',
|
|
102
|
-
'chronotope-assertion-tags',
|
|
103
|
-
'doc-reference-types',
|
|
104
|
-
'doc-reference-tags',
|
|
105
|
-
];
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
111
|
-
type: Component,
|
|
112
|
-
args: [{ selector: 'cadmus-chronotopes-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\n<cadmus-chronotopes-part\n [identity]=\"identity\"\n [data]=\"$any(data)\"\n (dataChange)=\"save($event)\"\n (editorClose)=\"close()\"\n (dirtyChange)=\"onDirtyChange($event)\"\n></cadmus-chronotopes-part>\n" }]
|
|
95
|
+
class ChronotopesPartFeatureComponent extends EditPartFeatureBase {
|
|
96
|
+
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
97
|
+
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
98
|
+
}
|
|
99
|
+
getReqThesauriIds() {
|
|
100
|
+
return [
|
|
101
|
+
'chronotope-place-tags',
|
|
102
|
+
'chronotope-assertion-tags',
|
|
103
|
+
'doc-reference-types',
|
|
104
|
+
'doc-reference-tags',
|
|
105
|
+
];
|
|
106
|
+
}
|
|
107
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ChronotopesPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
108
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: ChronotopesPartFeatureComponent, selector: "cadmus-chronotopes-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar></cadmus-current-item-bar>\n<cadmus-chronotopes-part\n [identity]=\"identity\"\n [data]=\"$any(data)\"\n (dataChange)=\"save($event)\"\n (editorClose)=\"close()\"\n (dirtyChange)=\"onDirtyChange($event)\"\n></cadmus-chronotopes-part>\n", styles: [""], dependencies: [{ kind: "component", type: i5.ChronotopesPartComponent, selector: "cadmus-chronotopes-part" }, { kind: "component", type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }] }); }
|
|
109
|
+
}
|
|
110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ChronotopesPartFeatureComponent, decorators: [{
|
|
111
|
+
type: Component,
|
|
112
|
+
args: [{ selector: 'cadmus-chronotopes-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\n<cadmus-chronotopes-part\n [identity]=\"identity\"\n [data]=\"$any(data)\"\n (dataChange)=\"save($event)\"\n (editorClose)=\"close()\"\n (dirtyChange)=\"onDirtyChange($event)\"\n></cadmus-chronotopes-part>\n" }]
|
|
113
113
|
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }]; } });
|
|
114
114
|
|
|
115
|
-
class CommentFragmentFeatureComponent extends EditFragmentFeatureBase {
|
|
116
|
-
constructor(router, route, snackbar, editorService, libraryRouteService) {
|
|
117
|
-
super(router, route, snackbar, editorService, libraryRouteService);
|
|
118
|
-
}
|
|
119
|
-
getReqThesauriIds() {
|
|
120
|
-
return [
|
|
121
|
-
'comment-tags',
|
|
122
|
-
'doc-reference-tags',
|
|
123
|
-
'doc-reference-types',
|
|
124
|
-
'comment-categories',
|
|
125
|
-
'languages',
|
|
126
|
-
'keyword-indexes',
|
|
127
|
-
'keyword-tags',
|
|
128
|
-
'comment-id-scopes',
|
|
129
|
-
'comment-id-tags',
|
|
130
|
-
];
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
136
|
-
type: Component,
|
|
137
|
-
args: [{ selector: 'cadmus-comment-fragment-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<div class=\"base-text\">\r\n <cadmus-decorated-token-text\r\n [baseText]=\"data?.baseText || ''\"\r\n [locations]=\"frLoc ? [frLoc] : []\"\r\n ></cadmus-decorated-token-text>\r\n</div>\r\n<cadmus-comment-editor\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($any($event))\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-comment-editor>\r\n", styles: ["div.base-text{margin:12px;border:1px solid #f0f0f0;border-radius:4px;padding:8px}\n"] }]
|
|
115
|
+
class CommentFragmentFeatureComponent extends EditFragmentFeatureBase {
|
|
116
|
+
constructor(router, route, snackbar, editorService, libraryRouteService) {
|
|
117
|
+
super(router, route, snackbar, editorService, libraryRouteService);
|
|
118
|
+
}
|
|
119
|
+
getReqThesauriIds() {
|
|
120
|
+
return [
|
|
121
|
+
'comment-tags',
|
|
122
|
+
'doc-reference-tags',
|
|
123
|
+
'doc-reference-types',
|
|
124
|
+
'comment-categories',
|
|
125
|
+
'languages',
|
|
126
|
+
'keyword-indexes',
|
|
127
|
+
'keyword-tags',
|
|
128
|
+
'comment-id-scopes',
|
|
129
|
+
'comment-id-tags',
|
|
130
|
+
];
|
|
131
|
+
}
|
|
132
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: CommentFragmentFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i4.FragmentEditorService }, { token: i4$1.LibraryRouteService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
133
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: CommentFragmentFeatureComponent, selector: "cadmus-comment-fragment-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<div class=\"base-text\">\r\n <cadmus-decorated-token-text\r\n [baseText]=\"data?.baseText || ''\"\r\n [locations]=\"frLoc ? [frLoc] : []\"\r\n ></cadmus-decorated-token-text>\r\n</div>\r\n<cadmus-comment-editor\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($any($event))\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-comment-editor>\r\n", styles: ["div.base-text{margin:12px;border:1px solid #f0f0f0;border-radius:4px;padding:8px}\n"], dependencies: [{ kind: "component", type: i5$1.DecoratedTokenTextComponent, selector: "cadmus-decorated-token-text", inputs: ["baseText", "locations", "selectedLocation"] }, { kind: "component", type: i5.CommentEditorComponent, selector: "cadmus-comment-editor" }, { kind: "component", type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }] }); }
|
|
134
|
+
}
|
|
135
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: CommentFragmentFeatureComponent, decorators: [{
|
|
136
|
+
type: Component,
|
|
137
|
+
args: [{ selector: 'cadmus-comment-fragment-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<div class=\"base-text\">\r\n <cadmus-decorated-token-text\r\n [baseText]=\"data?.baseText || ''\"\r\n [locations]=\"frLoc ? [frLoc] : []\"\r\n ></cadmus-decorated-token-text>\r\n</div>\r\n<cadmus-comment-editor\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($any($event))\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-comment-editor>\r\n", styles: ["div.base-text{margin:12px;border:1px solid #f0f0f0;border-radius:4px;padding:8px}\n"] }]
|
|
138
138
|
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i4.FragmentEditorService }, { type: i4$1.LibraryRouteService }]; } });
|
|
139
139
|
|
|
140
|
-
class CommentPartFeatureComponent extends EditPartFeatureBase {
|
|
141
|
-
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
142
|
-
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
143
|
-
this.roleIdInThesauri = true;
|
|
144
|
-
}
|
|
145
|
-
getReqThesauriIds() {
|
|
146
|
-
return [
|
|
147
|
-
'comment-tags',
|
|
148
|
-
'doc-reference-tags',
|
|
149
|
-
'doc-reference-types',
|
|
150
|
-
'comment-categories',
|
|
151
|
-
'languages',
|
|
152
|
-
'keyword-indexes',
|
|
153
|
-
'keyword-tags',
|
|
154
|
-
'comment-id-scopes',
|
|
155
|
-
'comment-id-tags',
|
|
156
|
-
];
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
162
|
-
type: Component,
|
|
163
|
-
args: [{ selector: 'cadmus-comment-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-comment-editor\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($any($event))\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-comment-editor>\r\n" }]
|
|
140
|
+
class CommentPartFeatureComponent extends EditPartFeatureBase {
|
|
141
|
+
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
142
|
+
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
143
|
+
this.roleIdInThesauri = true;
|
|
144
|
+
}
|
|
145
|
+
getReqThesauriIds() {
|
|
146
|
+
return [
|
|
147
|
+
'comment-tags',
|
|
148
|
+
'doc-reference-tags',
|
|
149
|
+
'doc-reference-types',
|
|
150
|
+
'comment-categories',
|
|
151
|
+
'languages',
|
|
152
|
+
'keyword-indexes',
|
|
153
|
+
'keyword-tags',
|
|
154
|
+
'comment-id-scopes',
|
|
155
|
+
'comment-id-tags',
|
|
156
|
+
];
|
|
157
|
+
}
|
|
158
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: CommentPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
159
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: CommentPartFeatureComponent, selector: "cadmus-comment-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-comment-editor\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($any($event))\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-comment-editor>\r\n", styles: [""], dependencies: [{ kind: "component", type: i5.CommentEditorComponent, selector: "cadmus-comment-editor" }, { kind: "component", type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }] }); }
|
|
160
|
+
}
|
|
161
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: CommentPartFeatureComponent, decorators: [{
|
|
162
|
+
type: Component,
|
|
163
|
+
args: [{ selector: 'cadmus-comment-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-comment-editor\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($any($event))\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-comment-editor>\r\n" }]
|
|
164
164
|
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }]; } });
|
|
165
165
|
|
|
166
|
-
class DocReferencesPartFeatureComponent extends EditPartFeatureBase {
|
|
167
|
-
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
168
|
-
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
169
|
-
}
|
|
170
|
-
getReqThesauriIds() {
|
|
171
|
-
return ['doc-reference-tags', 'doc-reference-types'];
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
177
|
-
type: Component,
|
|
178
|
-
args: [{ selector: 'cadmus-doc-references-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-doc-references-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-doc-references-part>\r\n" }]
|
|
166
|
+
class DocReferencesPartFeatureComponent extends EditPartFeatureBase {
|
|
167
|
+
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
168
|
+
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
169
|
+
}
|
|
170
|
+
getReqThesauriIds() {
|
|
171
|
+
return ['doc-reference-tags', 'doc-reference-types'];
|
|
172
|
+
}
|
|
173
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: DocReferencesPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
174
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: DocReferencesPartFeatureComponent, selector: "cadmus-doc-references-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-doc-references-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-doc-references-part>\r\n", styles: [""], dependencies: [{ kind: "component", type: i5.DocReferencesPartComponent, selector: "cadmus-doc-references-part" }, { kind: "component", type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }] }); }
|
|
175
|
+
}
|
|
176
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: DocReferencesPartFeatureComponent, decorators: [{
|
|
177
|
+
type: Component,
|
|
178
|
+
args: [{ selector: 'cadmus-doc-references-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-doc-references-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-doc-references-part>\r\n" }]
|
|
179
179
|
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }]; } });
|
|
180
180
|
|
|
181
|
-
class ExternalIdsPartFeatureComponent extends EditPartFeatureBase {
|
|
182
|
-
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
183
|
-
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
184
|
-
}
|
|
185
|
-
getReqThesauriIds() {
|
|
186
|
-
return [
|
|
187
|
-
'external-id-scopes',
|
|
188
|
-
'external-id-tags',
|
|
189
|
-
'assertion-tags',
|
|
190
|
-
'doc-reference-types',
|
|
191
|
-
'doc-reference-tags',
|
|
192
|
-
];
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
198
|
-
type: Component,
|
|
199
|
-
args: [{ selector: 'cadmus-refs-external-ids-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-refs-external-ids-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-refs-external-ids-part>\r\n" }]
|
|
181
|
+
class ExternalIdsPartFeatureComponent extends EditPartFeatureBase {
|
|
182
|
+
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
183
|
+
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
184
|
+
}
|
|
185
|
+
getReqThesauriIds() {
|
|
186
|
+
return [
|
|
187
|
+
'external-id-scopes',
|
|
188
|
+
'external-id-tags',
|
|
189
|
+
'assertion-tags',
|
|
190
|
+
'doc-reference-types',
|
|
191
|
+
'doc-reference-tags',
|
|
192
|
+
];
|
|
193
|
+
}
|
|
194
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ExternalIdsPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
195
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: ExternalIdsPartFeatureComponent, selector: "cadmus-refs-external-ids-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-refs-external-ids-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-refs-external-ids-part>\r\n", styles: [""], dependencies: [{ kind: "component", type: i5.ExternalIdsPartComponent, selector: "cadmus-refs-external-ids-part" }, { kind: "component", type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }] }); }
|
|
196
|
+
}
|
|
197
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ExternalIdsPartFeatureComponent, decorators: [{
|
|
198
|
+
type: Component,
|
|
199
|
+
args: [{ selector: 'cadmus-refs-external-ids-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-refs-external-ids-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-refs-external-ids-part>\r\n" }]
|
|
200
200
|
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }]; } });
|
|
201
201
|
|
|
202
|
-
class HistoricalDatePartFeatureComponent extends EditPartFeatureBase {
|
|
203
|
-
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
204
|
-
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
205
|
-
}
|
|
206
|
-
getReqThesauriIds() {
|
|
207
|
-
return ['doc-reference-tags', 'doc-reference-types'];
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
213
|
-
type: Component,
|
|
214
|
-
args: [{ selector: 'cadmus-historical-date-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-historical-date-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-historical-date-part>\r\n" }]
|
|
202
|
+
class HistoricalDatePartFeatureComponent extends EditPartFeatureBase {
|
|
203
|
+
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
204
|
+
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
205
|
+
}
|
|
206
|
+
getReqThesauriIds() {
|
|
207
|
+
return ['doc-reference-tags', 'doc-reference-types'];
|
|
208
|
+
}
|
|
209
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: HistoricalDatePartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
210
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: HistoricalDatePartFeatureComponent, selector: "cadmus-historical-date-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-historical-date-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-historical-date-part>\r\n", styles: [""], dependencies: [{ kind: "component", type: i5.HistoricalDatePartComponent, selector: "cadmus-historical-date-part" }, { kind: "component", type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }] }); }
|
|
211
|
+
}
|
|
212
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: HistoricalDatePartFeatureComponent, decorators: [{
|
|
213
|
+
type: Component,
|
|
214
|
+
args: [{ selector: 'cadmus-historical-date-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-historical-date-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-historical-date-part>\r\n" }]
|
|
215
215
|
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }]; } });
|
|
216
216
|
|
|
217
|
-
class HistoricalEventsPartFeatureComponent extends EditPartFeatureBase {
|
|
218
|
-
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
219
|
-
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
220
|
-
this.roleIdInThesauri = true;
|
|
221
|
-
}
|
|
222
|
-
getReqThesauriIds() {
|
|
223
|
-
return [
|
|
224
|
-
'event-types',
|
|
225
|
-
'event-tags',
|
|
226
|
-
'event-relations',
|
|
227
|
-
'chronotope-tags',
|
|
228
|
-
'assertion-tags',
|
|
229
|
-
'doc-reference-tags',
|
|
230
|
-
'doc-reference-types',
|
|
231
|
-
];
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
237
|
-
type: Component,
|
|
238
|
-
args: [{ selector: 'cadmus-historical-events-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\n<cadmus-historical-events-part\n [identity]=\"identity\"\n [data]=\"$any(data)\"\n (dataChange)=\"save($event)\"\n (editorClose)=\"close()\"\n (dirtyChange)=\"onDirtyChange($event)\"\n></cadmus-historical-events-part>\n" }]
|
|
217
|
+
class HistoricalEventsPartFeatureComponent extends EditPartFeatureBase {
|
|
218
|
+
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
219
|
+
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
220
|
+
this.roleIdInThesauri = true;
|
|
221
|
+
}
|
|
222
|
+
getReqThesauriIds() {
|
|
223
|
+
return [
|
|
224
|
+
'event-types',
|
|
225
|
+
'event-tags',
|
|
226
|
+
'event-relations',
|
|
227
|
+
'chronotope-tags',
|
|
228
|
+
'assertion-tags',
|
|
229
|
+
'doc-reference-tags',
|
|
230
|
+
'doc-reference-types',
|
|
231
|
+
];
|
|
232
|
+
}
|
|
233
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: HistoricalEventsPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
234
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: HistoricalEventsPartFeatureComponent, selector: "cadmus-historical-events-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar></cadmus-current-item-bar>\n<cadmus-historical-events-part\n [identity]=\"identity\"\n [data]=\"$any(data)\"\n (dataChange)=\"save($event)\"\n (editorClose)=\"close()\"\n (dirtyChange)=\"onDirtyChange($event)\"\n></cadmus-historical-events-part>\n", styles: [""], dependencies: [{ kind: "component", type: i5.HistoricalEventsPartComponent, selector: "cadmus-historical-events-part" }, { kind: "component", type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }] }); }
|
|
235
|
+
}
|
|
236
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: HistoricalEventsPartFeatureComponent, decorators: [{
|
|
237
|
+
type: Component,
|
|
238
|
+
args: [{ selector: 'cadmus-historical-events-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\n<cadmus-historical-events-part\n [identity]=\"identity\"\n [data]=\"$any(data)\"\n (dataChange)=\"save($event)\"\n (editorClose)=\"close()\"\n (dirtyChange)=\"onDirtyChange($event)\"\n></cadmus-historical-events-part>\n" }]
|
|
239
239
|
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }]; } });
|
|
240
240
|
|
|
241
|
-
class IndexKeywordsPartFeatureComponent extends EditPartFeatureBase {
|
|
242
|
-
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
243
|
-
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
244
|
-
}
|
|
245
|
-
getReqThesauriIds() {
|
|
246
|
-
return ['languages', 'keyword-indexes', 'keyword-tags'];
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
252
|
-
type: Component,
|
|
253
|
-
args: [{ selector: 'cadmus-index-keywords-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-index-keywords-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-index-keywords-part>\r\n" }]
|
|
241
|
+
class IndexKeywordsPartFeatureComponent extends EditPartFeatureBase {
|
|
242
|
+
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
243
|
+
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
244
|
+
}
|
|
245
|
+
getReqThesauriIds() {
|
|
246
|
+
return ['languages', 'keyword-indexes', 'keyword-tags'];
|
|
247
|
+
}
|
|
248
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: IndexKeywordsPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
249
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: IndexKeywordsPartFeatureComponent, selector: "cadmus-index-keywords-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-index-keywords-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-index-keywords-part>\r\n", styles: [""], dependencies: [{ kind: "component", type: i5.IndexKeywordsPartComponent, selector: "cadmus-index-keywords-part" }, { kind: "component", type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }] }); }
|
|
250
|
+
}
|
|
251
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: IndexKeywordsPartFeatureComponent, decorators: [{
|
|
252
|
+
type: Component,
|
|
253
|
+
args: [{ selector: 'cadmus-index-keywords-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-index-keywords-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-index-keywords-part>\r\n" }]
|
|
254
254
|
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }]; } });
|
|
255
255
|
|
|
256
|
-
class KeywordsPartFeatureComponent extends EditPartFeatureBase {
|
|
257
|
-
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
258
|
-
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
259
|
-
}
|
|
260
|
-
getReqThesauriIds() {
|
|
261
|
-
return ['languages'];
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
267
|
-
type: Component,
|
|
268
|
-
args: [{ selector: 'cadmus-keywords-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-keywords-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-keywords-part>\r\n" }]
|
|
256
|
+
class KeywordsPartFeatureComponent extends EditPartFeatureBase {
|
|
257
|
+
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
258
|
+
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
259
|
+
}
|
|
260
|
+
getReqThesauriIds() {
|
|
261
|
+
return ['languages'];
|
|
262
|
+
}
|
|
263
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: KeywordsPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
264
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: KeywordsPartFeatureComponent, selector: "cadmus-keywords-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-keywords-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-keywords-part>\r\n", styles: [""], dependencies: [{ kind: "component", type: i5.KeywordsPartComponent, selector: "cadmus-keywords-part" }, { kind: "component", type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }] }); }
|
|
265
|
+
}
|
|
266
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: KeywordsPartFeatureComponent, decorators: [{
|
|
267
|
+
type: Component,
|
|
268
|
+
args: [{ selector: 'cadmus-keywords-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-keywords-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-keywords-part>\r\n" }]
|
|
269
269
|
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }]; } });
|
|
270
270
|
|
|
271
|
-
class MetadataPartFeatureComponent extends EditPartFeatureBase {
|
|
272
|
-
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
273
|
-
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
274
|
-
}
|
|
275
|
-
getReqThesauriIds() {
|
|
276
|
-
return ['metadata-types'];
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
282
|
-
type: Component,
|
|
283
|
-
args: [{ selector: 'cadmus-metadata-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\n<cadmus-metadata-part\n [identity]=\"identity\"\n [data]=\"$any(data)\"\n (dataChange)=\"save($event)\"\n (editorClose)=\"close()\"\n (dirtyChange)=\"onDirtyChange($event)\"\n></cadmus-metadata-part>\n" }]
|
|
271
|
+
class MetadataPartFeatureComponent extends EditPartFeatureBase {
|
|
272
|
+
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
273
|
+
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
274
|
+
}
|
|
275
|
+
getReqThesauriIds() {
|
|
276
|
+
return ['metadata-types'];
|
|
277
|
+
}
|
|
278
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: MetadataPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
279
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: MetadataPartFeatureComponent, selector: "cadmus-metadata-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar></cadmus-current-item-bar>\n<cadmus-metadata-part\n [identity]=\"identity\"\n [data]=\"$any(data)\"\n (dataChange)=\"save($event)\"\n (editorClose)=\"close()\"\n (dirtyChange)=\"onDirtyChange($event)\"\n></cadmus-metadata-part>\n", styles: [""], dependencies: [{ kind: "component", type: i5.MetadataPartComponent, selector: "cadmus-metadata-part" }, { kind: "component", type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }] }); }
|
|
280
|
+
}
|
|
281
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: MetadataPartFeatureComponent, decorators: [{
|
|
282
|
+
type: Component,
|
|
283
|
+
args: [{ selector: 'cadmus-metadata-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\n<cadmus-metadata-part\n [identity]=\"identity\"\n [data]=\"$any(data)\"\n (dataChange)=\"save($event)\"\n (editorClose)=\"close()\"\n (dirtyChange)=\"onDirtyChange($event)\"\n></cadmus-metadata-part>\n" }]
|
|
284
284
|
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }]; } });
|
|
285
285
|
|
|
286
|
-
class NamesPartFeatureComponent extends EditPartFeatureBase {
|
|
287
|
-
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
288
|
-
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
289
|
-
this.roleIdInThesauri = true;
|
|
290
|
-
}
|
|
291
|
-
getReqThesauriIds() {
|
|
292
|
-
return [
|
|
293
|
-
'name-languages',
|
|
294
|
-
'name-tags',
|
|
295
|
-
'name-piece-types',
|
|
296
|
-
'assertion-tags',
|
|
297
|
-
'doc-reference-types',
|
|
298
|
-
'doc-reference-tags',
|
|
299
|
-
];
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
305
|
-
type: Component,
|
|
306
|
-
args: [{ selector: 'cadmus-names-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\n<cadmus-names-part\n [identity]=\"identity\"\n [data]=\"$any(data)\"\n (dataChange)=\"save($event)\"\n (editorClose)=\"close()\"\n (dirtyChange)=\"onDirtyChange($event)\"\n></cadmus-names-part>\n" }]
|
|
286
|
+
class NamesPartFeatureComponent extends EditPartFeatureBase {
|
|
287
|
+
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
288
|
+
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
289
|
+
this.roleIdInThesauri = true;
|
|
290
|
+
}
|
|
291
|
+
getReqThesauriIds() {
|
|
292
|
+
return [
|
|
293
|
+
'name-languages',
|
|
294
|
+
'name-tags',
|
|
295
|
+
'name-piece-types',
|
|
296
|
+
'assertion-tags',
|
|
297
|
+
'doc-reference-types',
|
|
298
|
+
'doc-reference-tags',
|
|
299
|
+
];
|
|
300
|
+
}
|
|
301
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: NamesPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
302
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: NamesPartFeatureComponent, selector: "cadmus-names-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar></cadmus-current-item-bar>\n<cadmus-names-part\n [identity]=\"identity\"\n [data]=\"$any(data)\"\n (dataChange)=\"save($event)\"\n (editorClose)=\"close()\"\n (dirtyChange)=\"onDirtyChange($event)\"\n></cadmus-names-part>\n", styles: [""], dependencies: [{ kind: "component", type: i5.NamesPartComponent, selector: "cadmus-names-part" }, { kind: "component", type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }] }); }
|
|
303
|
+
}
|
|
304
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: NamesPartFeatureComponent, decorators: [{
|
|
305
|
+
type: Component,
|
|
306
|
+
args: [{ selector: 'cadmus-names-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\n<cadmus-names-part\n [identity]=\"identity\"\n [data]=\"$any(data)\"\n (dataChange)=\"save($event)\"\n (editorClose)=\"close()\"\n (dirtyChange)=\"onDirtyChange($event)\"\n></cadmus-names-part>\n" }]
|
|
307
307
|
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }]; } });
|
|
308
308
|
|
|
309
|
-
class NotePartFeatureComponent extends EditPartFeatureBase {
|
|
310
|
-
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
311
|
-
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
312
|
-
this.roleIdInThesauri = true;
|
|
313
|
-
}
|
|
314
|
-
getReqThesauriIds() {
|
|
315
|
-
return ['note-tags'];
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
321
|
-
type: Component,
|
|
322
|
-
args: [{ selector: 'cadmus-note-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-note-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-note-part>\r\n" }]
|
|
309
|
+
class NotePartFeatureComponent extends EditPartFeatureBase {
|
|
310
|
+
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
311
|
+
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
312
|
+
this.roleIdInThesauri = true;
|
|
313
|
+
}
|
|
314
|
+
getReqThesauriIds() {
|
|
315
|
+
return ['note-tags'];
|
|
316
|
+
}
|
|
317
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: NotePartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
318
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: NotePartFeatureComponent, selector: "cadmus-note-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-note-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-note-part>\r\n", styles: [""], dependencies: [{ kind: "component", type: i5.NotePartComponent, selector: "cadmus-note-part" }, { kind: "component", type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }] }); }
|
|
319
|
+
}
|
|
320
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: NotePartFeatureComponent, decorators: [{
|
|
321
|
+
type: Component,
|
|
322
|
+
args: [{ selector: 'cadmus-note-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-note-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-note-part>\r\n" }]
|
|
323
323
|
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }]; } });
|
|
324
324
|
|
|
325
|
-
class PinLinksFragmentFeatureComponent extends EditFragmentFeatureBase {
|
|
326
|
-
constructor(router, route, snackbar, editorService, libraryRouteService) {
|
|
327
|
-
super(router, route, snackbar, editorService, libraryRouteService);
|
|
328
|
-
}
|
|
329
|
-
getReqThesauriIds() {
|
|
330
|
-
return ['pin-link-tags'];
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
336
|
-
type: Component,
|
|
337
|
-
args: [{ selector: 'cadmus-pin-links-fragment-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\n<div class=\"base-text\">\n <cadmus-decorated-token-text\n [baseText]=\"data?.baseText || ''\"\n [locations]=\"frLoc ? [frLoc] : []\"\n ></cadmus-decorated-token-text>\n</div>\n<cadmus-pin-links-fragment\n [identity]=\"identity\"\n [data]=\"$any(data)\"\n (dataChange)=\"save($any($event))\"\n (editorClose)=\"close()\"\n (dirtyChange)=\"onDirtyChange($event)\"\n></cadmus-pin-links-fragment>\n" }]
|
|
325
|
+
class PinLinksFragmentFeatureComponent extends EditFragmentFeatureBase {
|
|
326
|
+
constructor(router, route, snackbar, editorService, libraryRouteService) {
|
|
327
|
+
super(router, route, snackbar, editorService, libraryRouteService);
|
|
328
|
+
}
|
|
329
|
+
getReqThesauriIds() {
|
|
330
|
+
return ['pin-link-tags'];
|
|
331
|
+
}
|
|
332
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: PinLinksFragmentFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i4.FragmentEditorService }, { token: i4$1.LibraryRouteService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
333
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: PinLinksFragmentFeatureComponent, selector: "cadmus-pin-links-fragment-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar></cadmus-current-item-bar>\n<div class=\"base-text\">\n <cadmus-decorated-token-text\n [baseText]=\"data?.baseText || ''\"\n [locations]=\"frLoc ? [frLoc] : []\"\n ></cadmus-decorated-token-text>\n</div>\n<cadmus-pin-links-fragment\n [identity]=\"identity\"\n [data]=\"$any(data)\"\n (dataChange)=\"save($any($event))\"\n (editorClose)=\"close()\"\n (dirtyChange)=\"onDirtyChange($event)\"\n></cadmus-pin-links-fragment>\n", styles: [""], dependencies: [{ kind: "component", type: i5$1.DecoratedTokenTextComponent, selector: "cadmus-decorated-token-text", inputs: ["baseText", "locations", "selectedLocation"] }, { kind: "component", type: i5.PinLinksFragmentComponent, selector: "cadmus-pin-links-fragment" }, { kind: "component", type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }] }); }
|
|
334
|
+
}
|
|
335
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: PinLinksFragmentFeatureComponent, decorators: [{
|
|
336
|
+
type: Component,
|
|
337
|
+
args: [{ selector: 'cadmus-pin-links-fragment-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\n<div class=\"base-text\">\n <cadmus-decorated-token-text\n [baseText]=\"data?.baseText || ''\"\n [locations]=\"frLoc ? [frLoc] : []\"\n ></cadmus-decorated-token-text>\n</div>\n<cadmus-pin-links-fragment\n [identity]=\"identity\"\n [data]=\"$any(data)\"\n (dataChange)=\"save($any($event))\"\n (editorClose)=\"close()\"\n (dirtyChange)=\"onDirtyChange($event)\"\n></cadmus-pin-links-fragment>\n" }]
|
|
338
338
|
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i4.FragmentEditorService }, { type: i4$1.LibraryRouteService }]; } });
|
|
339
339
|
|
|
340
|
-
class PinLinksPartFeatureComponent extends EditPartFeatureBase {
|
|
341
|
-
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
342
|
-
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
343
|
-
}
|
|
344
|
-
getReqThesauriIds() {
|
|
345
|
-
return ['pin-link-tags'];
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
351
|
-
type: Component,
|
|
352
|
-
args: [{ selector: 'cadmus-pin-links-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\n<cadmus-pin-links-part\n [identity]=\"identity\"\n [data]=\"$any(data)\"\n (dataChange)=\"save($event)\"\n (editorClose)=\"close()\"\n (dirtyChange)=\"onDirtyChange($event)\"\n></cadmus-pin-links-part>\n" }]
|
|
340
|
+
class PinLinksPartFeatureComponent extends EditPartFeatureBase {
|
|
341
|
+
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
342
|
+
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
343
|
+
}
|
|
344
|
+
getReqThesauriIds() {
|
|
345
|
+
return ['pin-link-tags'];
|
|
346
|
+
}
|
|
347
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: PinLinksPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
348
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: PinLinksPartFeatureComponent, selector: "cadmus-pin-links-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar></cadmus-current-item-bar>\n<cadmus-pin-links-part\n [identity]=\"identity\"\n [data]=\"$any(data)\"\n (dataChange)=\"save($event)\"\n (editorClose)=\"close()\"\n (dirtyChange)=\"onDirtyChange($event)\"\n></cadmus-pin-links-part>\n", styles: [""], dependencies: [{ kind: "component", type: i5.PinLinksPartComponent, selector: "cadmus-pin-links-part" }, { kind: "component", type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }] }); }
|
|
349
|
+
}
|
|
350
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: PinLinksPartFeatureComponent, decorators: [{
|
|
351
|
+
type: Component,
|
|
352
|
+
args: [{ selector: 'cadmus-pin-links-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\n<cadmus-pin-links-part\n [identity]=\"identity\"\n [data]=\"$any(data)\"\n (dataChange)=\"save($event)\"\n (editorClose)=\"close()\"\n (dirtyChange)=\"onDirtyChange($event)\"\n></cadmus-pin-links-part>\n" }]
|
|
353
353
|
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }]; } });
|
|
354
354
|
|
|
355
|
-
/**
|
|
356
|
-
* The layer view model for a tiled text.
|
|
357
|
-
*/
|
|
358
|
-
class TiledTextLayerView {
|
|
359
|
-
/**
|
|
360
|
-
* Create a new view from the specified tiled text.
|
|
361
|
-
* @param rows The tiled text rows.
|
|
362
|
-
*/
|
|
363
|
-
constructor(rows) {
|
|
364
|
-
// setup rows to reflect the text
|
|
365
|
-
this._rows = [];
|
|
366
|
-
if (rows) {
|
|
367
|
-
// for each row
|
|
368
|
-
for (let i = 0; i < rows.length; i++) {
|
|
369
|
-
this._rows[i] = {
|
|
370
|
-
tiles: [],
|
|
371
|
-
};
|
|
372
|
-
// for each tile in row
|
|
373
|
-
for (let j = 0; j < (rows[i].tiles ? rows[i].tiles.length : 0); j++) {
|
|
374
|
-
this._rows[i].tiles[j] = {
|
|
375
|
-
checked: false,
|
|
376
|
-
frIndex: -1,
|
|
377
|
-
model: rows[i].tiles[j],
|
|
378
|
-
};
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
/**
|
|
384
|
-
* The internal rows view models.
|
|
385
|
-
*/
|
|
386
|
-
get rows() {
|
|
387
|
-
return this._rows;
|
|
388
|
-
}
|
|
389
|
-
/**
|
|
390
|
-
* Get the tile at the specified coordinates.
|
|
391
|
-
*
|
|
392
|
-
* @param y The tile's y coordinate.
|
|
393
|
-
* @param x The tile's x coordinate.
|
|
394
|
-
*/
|
|
395
|
-
getTileAt(y, x) {
|
|
396
|
-
return this._rows[y - 1].tiles[x - 1];
|
|
397
|
-
}
|
|
398
|
-
/**
|
|
399
|
-
* Set the view state of all the tiles.
|
|
400
|
-
*
|
|
401
|
-
* @param state The state values to set in each tile's state.
|
|
402
|
-
* @param setChecked True to set the checked property of states.
|
|
403
|
-
* @param setFrIndex True to set the frIndex property of states.
|
|
404
|
-
*/
|
|
405
|
-
setAllTilesViewState(state) {
|
|
406
|
-
const hasChecked = state.hasOwnProperty('checked');
|
|
407
|
-
const hasFrIndex = state.hasOwnProperty('frIndex');
|
|
408
|
-
if (!hasChecked && !hasFrIndex) {
|
|
409
|
-
return;
|
|
410
|
-
}
|
|
411
|
-
// for each row
|
|
412
|
-
for (let i = 0; i < this._rows.length; i++) {
|
|
413
|
-
const row = this._rows[i];
|
|
414
|
-
// for each tile in row
|
|
415
|
-
for (let j = 0; j < row.tiles.length; j++) {
|
|
416
|
-
const tile = row.tiles[j];
|
|
417
|
-
row.tiles[j] = {
|
|
418
|
-
checked: (hasChecked ? state.checked : tile.checked) ? true : false,
|
|
419
|
-
frIndex: hasFrIndex ? state.frIndex || -1 : tile.frIndex,
|
|
420
|
-
model: tile.model,
|
|
421
|
-
};
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
/**
|
|
426
|
-
* Set the fragment index of each tile in this view. This is equal to the
|
|
427
|
-
* index to the fragment including the tile, when the tile is inside that
|
|
428
|
-
* fragment, or to -1, when the tile is outside any fragment. Fragment indexes
|
|
429
|
-
* refer to their locations, as received by this function.
|
|
430
|
-
*
|
|
431
|
-
* @param locations Fragments locations.
|
|
432
|
-
*/
|
|
433
|
-
setFragmentLocations(locations) {
|
|
434
|
-
// reset all the tiles fragment indexes
|
|
435
|
-
this.setAllTilesViewState({ frIndex: -1 });
|
|
436
|
-
// for each fragment's location
|
|
437
|
-
for (let i = 0; i < locations.length; i++) {
|
|
438
|
-
const loc = locations[i];
|
|
439
|
-
if (loc.secondary) {
|
|
440
|
-
// range
|
|
441
|
-
for (let y = loc.primary.y; y <= loc.secondary.y; y++) {
|
|
442
|
-
const row = this._rows[y - 1];
|
|
443
|
-
for (let x = y === loc.primary.y ? loc.primary.x : 1; y === loc.secondary.y
|
|
444
|
-
? x <= loc.secondary.x
|
|
445
|
-
: x <= row.tiles.length; x++) {
|
|
446
|
-
const tile = row.tiles[x - 1];
|
|
447
|
-
row.tiles[x - 1] = {
|
|
448
|
-
checked: tile.checked,
|
|
449
|
-
frIndex: i,
|
|
450
|
-
model: tile.model,
|
|
451
|
-
};
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
else {
|
|
456
|
-
// point
|
|
457
|
-
const tile = this.getTileAt(loc.primary.y, loc.primary.x);
|
|
458
|
-
if (tile) {
|
|
459
|
-
this._rows[loc.primary.y - 1].tiles[loc.primary.x - 1] = {
|
|
460
|
-
checked: tile.checked,
|
|
461
|
-
frIndex: i,
|
|
462
|
-
model: tile.model,
|
|
463
|
-
};
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
/**
|
|
469
|
-
* Find the coordinates of the first tile having the specified checked state,
|
|
470
|
-
* starting from the specified coordinates.
|
|
471
|
-
*
|
|
472
|
-
* @param y The y coordinates to start from.
|
|
473
|
-
* @param x The x coordinates to start from.
|
|
474
|
-
* @param checked True to find checked tiles, false to find unchecked tiles.
|
|
475
|
-
* @param reverse True to find in reverse direction.
|
|
476
|
-
* @returns The coordinates, or null if not found.
|
|
477
|
-
*/
|
|
478
|
-
findFirstCheckedCoords(y, x, checked, reverse = false) {
|
|
479
|
-
if (reverse) {
|
|
480
|
-
let xstart = x;
|
|
481
|
-
while (true) {
|
|
482
|
-
for (let xi = xstart; xi >= 1; xi--) {
|
|
483
|
-
if (this.getTileAt(y, xi).checked === checked) {
|
|
484
|
-
return {
|
|
485
|
-
y,
|
|
486
|
-
x: xi,
|
|
487
|
-
};
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
if (--y > 0) {
|
|
491
|
-
xstart = this._rows[y - 1].tiles.length;
|
|
492
|
-
}
|
|
493
|
-
else {
|
|
494
|
-
break;
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
else {
|
|
499
|
-
let xstart = x;
|
|
500
|
-
while (true) {
|
|
501
|
-
for (let xi = xstart; xi <= this._rows[y - 1].tiles.length; xi++) {
|
|
502
|
-
if (this.getTileAt(y, xi).checked === checked) {
|
|
503
|
-
return {
|
|
504
|
-
y,
|
|
505
|
-
x: xi,
|
|
506
|
-
};
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
if (++y <= this._rows.length) {
|
|
510
|
-
xstart = 1;
|
|
511
|
-
}
|
|
512
|
-
else {
|
|
513
|
-
break;
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
return null;
|
|
518
|
-
}
|
|
519
|
-
/**
|
|
520
|
-
* "Linearly" set the checked state in the specified range of checked tiles.
|
|
521
|
-
*
|
|
522
|
-
* @param y1 The start y coordinate.
|
|
523
|
-
* @param x1 The start x coordinate.
|
|
524
|
-
* @param y2 The end y coordinate (included).
|
|
525
|
-
* @param x2 The end x coordinate (included).
|
|
526
|
-
* @param checked The state to be set.
|
|
527
|
-
*/
|
|
528
|
-
linearSetCheck(y1, x1, y2, x2, checked) {
|
|
529
|
-
for (let y = y1; y <= y2; y++) {
|
|
530
|
-
const row = this._rows[y - 1];
|
|
531
|
-
for (let x = y === y1 ? x1 : 1; y === y2 ? x <= x2 : x <= row.tiles.length; x++) {
|
|
532
|
-
const tile = row.tiles[x - 1];
|
|
533
|
-
row.tiles[x - 1] = {
|
|
534
|
-
frIndex: tile.frIndex,
|
|
535
|
-
checked,
|
|
536
|
-
model: tile.model,
|
|
537
|
-
};
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
/**
|
|
542
|
-
* Get the coordinates of the next tile starting from the specified origin
|
|
543
|
-
* tile. The next tile is the tile to the right of the origin tile in the
|
|
544
|
-
* same row, or the first tile of the next row (if any) when the origin is
|
|
545
|
-
* the last tile in its row.
|
|
546
|
-
*
|
|
547
|
-
* @param y The y coordinate of the origin tile.
|
|
548
|
-
* @param x The x coordinate of the origin tile.
|
|
549
|
-
* @returns The coordinates, or null if no other tiles after origin.
|
|
550
|
-
*/
|
|
551
|
-
getNextTileCoords(y, x) {
|
|
552
|
-
if (x < this._rows[y - 1].tiles.length) {
|
|
553
|
-
return {
|
|
554
|
-
y,
|
|
555
|
-
x: x + 1,
|
|
556
|
-
};
|
|
557
|
-
}
|
|
558
|
-
y++;
|
|
559
|
-
while (y <= this._rows.length) {
|
|
560
|
-
if (this._rows[y - 1].tiles.length > 0) {
|
|
561
|
-
return {
|
|
562
|
-
y,
|
|
563
|
-
x: 1,
|
|
564
|
-
};
|
|
565
|
-
}
|
|
566
|
-
y++;
|
|
567
|
-
}
|
|
568
|
-
return null;
|
|
569
|
-
}
|
|
570
|
-
/**
|
|
571
|
-
* Get the coordinates of the previous tile starting from the specified origin
|
|
572
|
-
* tile. The previous tile is the tile to the left of the origin tile in the
|
|
573
|
-
* same row, or the last tile of the previous row (if any) when the origin is
|
|
574
|
-
* the first tile in its row.
|
|
575
|
-
*
|
|
576
|
-
* @param y The y coordinate of the origin tile.
|
|
577
|
-
* @param x The x coordinate of the origin tile.
|
|
578
|
-
* @returns The coordinates, or null if no other tiles before origin.
|
|
579
|
-
*/
|
|
580
|
-
getPrevTileCoords(y, x) {
|
|
581
|
-
if (x > 1) {
|
|
582
|
-
return {
|
|
583
|
-
y,
|
|
584
|
-
x: x - 1,
|
|
585
|
-
};
|
|
586
|
-
}
|
|
587
|
-
y--;
|
|
588
|
-
while (y > 0) {
|
|
589
|
-
if (this._rows[y - 1].tiles.length > 0) {
|
|
590
|
-
return {
|
|
591
|
-
y,
|
|
592
|
-
x: this._rows[y - 1].tiles.length,
|
|
593
|
-
};
|
|
594
|
-
}
|
|
595
|
-
y--;
|
|
596
|
-
}
|
|
597
|
-
return null;
|
|
598
|
-
}
|
|
599
|
-
/**
|
|
600
|
-
* "Linearly" toggle the tiles according to the specified toggle action
|
|
601
|
-
* in the specified set of tiles rows. When users toggle a tile from unchecked
|
|
602
|
-
* to checked, and any other tile was checked, the checked state must be
|
|
603
|
-
* extended so that all the tiles between the newly checked tile and the old
|
|
604
|
-
* one(s) are checked, so that they form a continuous "line", eventually
|
|
605
|
-
* spanning rows. The same inversely applies when un-checking tiles. This
|
|
606
|
-
* ensures that users can select a single range of tiles by toggling at any
|
|
607
|
-
* of its ends.
|
|
608
|
-
*
|
|
609
|
-
* @param y The y coordinate of the tile which was toggled.
|
|
610
|
-
* @param x The x coordinate of the tile which was toggled.
|
|
611
|
-
* @param checked The new checked state after toggling the tile.
|
|
612
|
-
*/
|
|
613
|
-
toggleLinearTileCheck(y, x, checked) {
|
|
614
|
-
// if it was checked, it was toggled from unchecked
|
|
615
|
-
if (checked) {
|
|
616
|
-
// find 1st next checked:
|
|
617
|
-
let yx = this.findFirstCheckedCoords(y, x, true);
|
|
618
|
-
// found: extend from it to y,x
|
|
619
|
-
if (yx) {
|
|
620
|
-
this.linearSetCheck(yx.y, yx.x, y, x, true);
|
|
621
|
-
return;
|
|
622
|
-
}
|
|
623
|
-
// not found: find 1st prev checked:
|
|
624
|
-
yx = this.findFirstCheckedCoords(y, x, true, true);
|
|
625
|
-
// found: extend from it to y,x
|
|
626
|
-
if (yx) {
|
|
627
|
-
this.linearSetCheck(yx.y, yx.x, y, x, true);
|
|
628
|
-
return;
|
|
629
|
-
}
|
|
630
|
-
// not found: check y,x
|
|
631
|
-
const tile = this.getTileAt(y, x);
|
|
632
|
-
this._rows[y - 1].tiles[x - 1] = {
|
|
633
|
-
checked: true,
|
|
634
|
-
frIndex: tile.frIndex,
|
|
635
|
-
model: tile.model,
|
|
636
|
-
};
|
|
637
|
-
}
|
|
638
|
-
else {
|
|
639
|
-
// it was toggled from checked:
|
|
640
|
-
// find 1st prev non-checked and set origin (y1,x1) equal to 1 if not found,
|
|
641
|
-
// else to the tile next to the one found. Then uncheck all from origin
|
|
642
|
-
// to y,x.
|
|
643
|
-
let y1;
|
|
644
|
-
let x1;
|
|
645
|
-
const yx = this.findFirstCheckedCoords(y, x, false, true);
|
|
646
|
-
if (yx) {
|
|
647
|
-
const next = this.getNextTileCoords(yx.y, yx.x);
|
|
648
|
-
if (!next) {
|
|
649
|
-
y1 = y;
|
|
650
|
-
x1 = x;
|
|
651
|
-
}
|
|
652
|
-
else {
|
|
653
|
-
y1 = next.y;
|
|
654
|
-
x1 = next.x;
|
|
655
|
-
}
|
|
656
|
-
this.linearSetCheck(y1, x1, yx.y, yx.x, false);
|
|
657
|
-
}
|
|
658
|
-
else {
|
|
659
|
-
y1 = 1;
|
|
660
|
-
x1 = 1;
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
/**
|
|
665
|
-
* Get the location of the checked tiles, if any. As tiles are checked
|
|
666
|
-
* only as an uninterrupted sequence, there can be only 0 or 1 location
|
|
667
|
-
* in a set.
|
|
668
|
-
*
|
|
669
|
-
* @returns The location, or null if no tiles are checked.
|
|
670
|
-
*/
|
|
671
|
-
getCheckedLocation() {
|
|
672
|
-
const start = this.findFirstCheckedCoords(1, 1, true);
|
|
673
|
-
if (!start) {
|
|
674
|
-
return null;
|
|
675
|
-
}
|
|
676
|
-
const end = this.findFirstCheckedCoords(start.y, start.x, false);
|
|
677
|
-
if (!end || (end.y === start.y && end.x === start.x)) {
|
|
678
|
-
return null;
|
|
679
|
-
}
|
|
680
|
-
const last = this.getPrevTileCoords(end.y, end.x);
|
|
681
|
-
return !last || (last.y === start.y && last.x === start.x)
|
|
682
|
-
? new TokenLocation(new TokenPoint(start.y, start.x))
|
|
683
|
-
: new TokenLocation(new TokenPoint(start.y, start.x), new TokenPoint(last.y, last.x));
|
|
684
|
-
}
|
|
685
|
-
/**
|
|
686
|
-
* Get the location of the checked tiles, together with the index to the
|
|
687
|
-
* fragment including them (or a part of them). Should the tiles be included
|
|
688
|
-
* in more than 1 fragment, no fragment will be returned.
|
|
689
|
-
*
|
|
690
|
-
* @returns Object with fragment=fragment index or -1, and location=location
|
|
691
|
-
* of checked tiles; or null if no checked tile.
|
|
692
|
-
*/
|
|
693
|
-
getCheckedLocationAndFragment() {
|
|
694
|
-
const loc = this.getCheckedLocation();
|
|
695
|
-
if (!loc) {
|
|
696
|
-
return null;
|
|
697
|
-
}
|
|
698
|
-
let y2;
|
|
699
|
-
let x2;
|
|
700
|
-
if (loc.secondary) {
|
|
701
|
-
y2 = loc.secondary.y;
|
|
702
|
-
x2 = loc.secondary.x;
|
|
703
|
-
}
|
|
704
|
-
else {
|
|
705
|
-
y2 = loc.primary.y;
|
|
706
|
-
x2 = loc.primary.x;
|
|
707
|
-
}
|
|
708
|
-
let fr = -1;
|
|
709
|
-
for (let y = loc.primary.y; y <= y2; y++) {
|
|
710
|
-
const row = this._rows[y - 1];
|
|
711
|
-
for (let x = y === loc.primary.y ? loc.primary.x : 1; x <= (y === y2 ? x2 : row.tiles.length); x++) {
|
|
712
|
-
if (row.tiles[x - 1].frIndex > -1) {
|
|
713
|
-
if (fr > -1) {
|
|
714
|
-
if (fr !== row.tiles[x - 1].frIndex) {
|
|
715
|
-
return {
|
|
716
|
-
fragment: -1,
|
|
717
|
-
location: loc,
|
|
718
|
-
};
|
|
719
|
-
}
|
|
720
|
-
}
|
|
721
|
-
else {
|
|
722
|
-
fr = row.tiles[x - 1].frIndex;
|
|
723
|
-
}
|
|
724
|
-
}
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
|
-
return {
|
|
728
|
-
fragment: fr,
|
|
729
|
-
location: loc,
|
|
730
|
-
};
|
|
731
|
-
}
|
|
355
|
+
/**
|
|
356
|
+
* The layer view model for a tiled text.
|
|
357
|
+
*/
|
|
358
|
+
class TiledTextLayerView {
|
|
359
|
+
/**
|
|
360
|
+
* Create a new view from the specified tiled text.
|
|
361
|
+
* @param rows The tiled text rows.
|
|
362
|
+
*/
|
|
363
|
+
constructor(rows) {
|
|
364
|
+
// setup rows to reflect the text
|
|
365
|
+
this._rows = [];
|
|
366
|
+
if (rows) {
|
|
367
|
+
// for each row
|
|
368
|
+
for (let i = 0; i < rows.length; i++) {
|
|
369
|
+
this._rows[i] = {
|
|
370
|
+
tiles: [],
|
|
371
|
+
};
|
|
372
|
+
// for each tile in row
|
|
373
|
+
for (let j = 0; j < (rows[i].tiles ? rows[i].tiles.length : 0); j++) {
|
|
374
|
+
this._rows[i].tiles[j] = {
|
|
375
|
+
checked: false,
|
|
376
|
+
frIndex: -1,
|
|
377
|
+
model: rows[i].tiles[j],
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* The internal rows view models.
|
|
385
|
+
*/
|
|
386
|
+
get rows() {
|
|
387
|
+
return this._rows;
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Get the tile at the specified coordinates.
|
|
391
|
+
*
|
|
392
|
+
* @param y The tile's y coordinate.
|
|
393
|
+
* @param x The tile's x coordinate.
|
|
394
|
+
*/
|
|
395
|
+
getTileAt(y, x) {
|
|
396
|
+
return this._rows[y - 1].tiles[x - 1];
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* Set the view state of all the tiles.
|
|
400
|
+
*
|
|
401
|
+
* @param state The state values to set in each tile's state.
|
|
402
|
+
* @param setChecked True to set the checked property of states.
|
|
403
|
+
* @param setFrIndex True to set the frIndex property of states.
|
|
404
|
+
*/
|
|
405
|
+
setAllTilesViewState(state) {
|
|
406
|
+
const hasChecked = state.hasOwnProperty('checked');
|
|
407
|
+
const hasFrIndex = state.hasOwnProperty('frIndex');
|
|
408
|
+
if (!hasChecked && !hasFrIndex) {
|
|
409
|
+
return;
|
|
410
|
+
}
|
|
411
|
+
// for each row
|
|
412
|
+
for (let i = 0; i < this._rows.length; i++) {
|
|
413
|
+
const row = this._rows[i];
|
|
414
|
+
// for each tile in row
|
|
415
|
+
for (let j = 0; j < row.tiles.length; j++) {
|
|
416
|
+
const tile = row.tiles[j];
|
|
417
|
+
row.tiles[j] = {
|
|
418
|
+
checked: (hasChecked ? state.checked : tile.checked) ? true : false,
|
|
419
|
+
frIndex: hasFrIndex ? state.frIndex || -1 : tile.frIndex,
|
|
420
|
+
model: tile.model,
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
* Set the fragment index of each tile in this view. This is equal to the
|
|
427
|
+
* index to the fragment including the tile, when the tile is inside that
|
|
428
|
+
* fragment, or to -1, when the tile is outside any fragment. Fragment indexes
|
|
429
|
+
* refer to their locations, as received by this function.
|
|
430
|
+
*
|
|
431
|
+
* @param locations Fragments locations.
|
|
432
|
+
*/
|
|
433
|
+
setFragmentLocations(locations) {
|
|
434
|
+
// reset all the tiles fragment indexes
|
|
435
|
+
this.setAllTilesViewState({ frIndex: -1 });
|
|
436
|
+
// for each fragment's location
|
|
437
|
+
for (let i = 0; i < locations.length; i++) {
|
|
438
|
+
const loc = locations[i];
|
|
439
|
+
if (loc.secondary) {
|
|
440
|
+
// range
|
|
441
|
+
for (let y = loc.primary.y; y <= loc.secondary.y; y++) {
|
|
442
|
+
const row = this._rows[y - 1];
|
|
443
|
+
for (let x = y === loc.primary.y ? loc.primary.x : 1; y === loc.secondary.y
|
|
444
|
+
? x <= loc.secondary.x
|
|
445
|
+
: x <= row.tiles.length; x++) {
|
|
446
|
+
const tile = row.tiles[x - 1];
|
|
447
|
+
row.tiles[x - 1] = {
|
|
448
|
+
checked: tile.checked,
|
|
449
|
+
frIndex: i,
|
|
450
|
+
model: tile.model,
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
else {
|
|
456
|
+
// point
|
|
457
|
+
const tile = this.getTileAt(loc.primary.y, loc.primary.x);
|
|
458
|
+
if (tile) {
|
|
459
|
+
this._rows[loc.primary.y - 1].tiles[loc.primary.x - 1] = {
|
|
460
|
+
checked: tile.checked,
|
|
461
|
+
frIndex: i,
|
|
462
|
+
model: tile.model,
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* Find the coordinates of the first tile having the specified checked state,
|
|
470
|
+
* starting from the specified coordinates.
|
|
471
|
+
*
|
|
472
|
+
* @param y The y coordinates to start from.
|
|
473
|
+
* @param x The x coordinates to start from.
|
|
474
|
+
* @param checked True to find checked tiles, false to find unchecked tiles.
|
|
475
|
+
* @param reverse True to find in reverse direction.
|
|
476
|
+
* @returns The coordinates, or null if not found.
|
|
477
|
+
*/
|
|
478
|
+
findFirstCheckedCoords(y, x, checked, reverse = false) {
|
|
479
|
+
if (reverse) {
|
|
480
|
+
let xstart = x;
|
|
481
|
+
while (true) {
|
|
482
|
+
for (let xi = xstart; xi >= 1; xi--) {
|
|
483
|
+
if (this.getTileAt(y, xi).checked === checked) {
|
|
484
|
+
return {
|
|
485
|
+
y,
|
|
486
|
+
x: xi,
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
if (--y > 0) {
|
|
491
|
+
xstart = this._rows[y - 1].tiles.length;
|
|
492
|
+
}
|
|
493
|
+
else {
|
|
494
|
+
break;
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
else {
|
|
499
|
+
let xstart = x;
|
|
500
|
+
while (true) {
|
|
501
|
+
for (let xi = xstart; xi <= this._rows[y - 1].tiles.length; xi++) {
|
|
502
|
+
if (this.getTileAt(y, xi).checked === checked) {
|
|
503
|
+
return {
|
|
504
|
+
y,
|
|
505
|
+
x: xi,
|
|
506
|
+
};
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
if (++y <= this._rows.length) {
|
|
510
|
+
xstart = 1;
|
|
511
|
+
}
|
|
512
|
+
else {
|
|
513
|
+
break;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
return null;
|
|
518
|
+
}
|
|
519
|
+
/**
|
|
520
|
+
* "Linearly" set the checked state in the specified range of checked tiles.
|
|
521
|
+
*
|
|
522
|
+
* @param y1 The start y coordinate.
|
|
523
|
+
* @param x1 The start x coordinate.
|
|
524
|
+
* @param y2 The end y coordinate (included).
|
|
525
|
+
* @param x2 The end x coordinate (included).
|
|
526
|
+
* @param checked The state to be set.
|
|
527
|
+
*/
|
|
528
|
+
linearSetCheck(y1, x1, y2, x2, checked) {
|
|
529
|
+
for (let y = y1; y <= y2; y++) {
|
|
530
|
+
const row = this._rows[y - 1];
|
|
531
|
+
for (let x = y === y1 ? x1 : 1; y === y2 ? x <= x2 : x <= row.tiles.length; x++) {
|
|
532
|
+
const tile = row.tiles[x - 1];
|
|
533
|
+
row.tiles[x - 1] = {
|
|
534
|
+
frIndex: tile.frIndex,
|
|
535
|
+
checked,
|
|
536
|
+
model: tile.model,
|
|
537
|
+
};
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
/**
|
|
542
|
+
* Get the coordinates of the next tile starting from the specified origin
|
|
543
|
+
* tile. The next tile is the tile to the right of the origin tile in the
|
|
544
|
+
* same row, or the first tile of the next row (if any) when the origin is
|
|
545
|
+
* the last tile in its row.
|
|
546
|
+
*
|
|
547
|
+
* @param y The y coordinate of the origin tile.
|
|
548
|
+
* @param x The x coordinate of the origin tile.
|
|
549
|
+
* @returns The coordinates, or null if no other tiles after origin.
|
|
550
|
+
*/
|
|
551
|
+
getNextTileCoords(y, x) {
|
|
552
|
+
if (x < this._rows[y - 1].tiles.length) {
|
|
553
|
+
return {
|
|
554
|
+
y,
|
|
555
|
+
x: x + 1,
|
|
556
|
+
};
|
|
557
|
+
}
|
|
558
|
+
y++;
|
|
559
|
+
while (y <= this._rows.length) {
|
|
560
|
+
if (this._rows[y - 1].tiles.length > 0) {
|
|
561
|
+
return {
|
|
562
|
+
y,
|
|
563
|
+
x: 1,
|
|
564
|
+
};
|
|
565
|
+
}
|
|
566
|
+
y++;
|
|
567
|
+
}
|
|
568
|
+
return null;
|
|
569
|
+
}
|
|
570
|
+
/**
|
|
571
|
+
* Get the coordinates of the previous tile starting from the specified origin
|
|
572
|
+
* tile. The previous tile is the tile to the left of the origin tile in the
|
|
573
|
+
* same row, or the last tile of the previous row (if any) when the origin is
|
|
574
|
+
* the first tile in its row.
|
|
575
|
+
*
|
|
576
|
+
* @param y The y coordinate of the origin tile.
|
|
577
|
+
* @param x The x coordinate of the origin tile.
|
|
578
|
+
* @returns The coordinates, or null if no other tiles before origin.
|
|
579
|
+
*/
|
|
580
|
+
getPrevTileCoords(y, x) {
|
|
581
|
+
if (x > 1) {
|
|
582
|
+
return {
|
|
583
|
+
y,
|
|
584
|
+
x: x - 1,
|
|
585
|
+
};
|
|
586
|
+
}
|
|
587
|
+
y--;
|
|
588
|
+
while (y > 0) {
|
|
589
|
+
if (this._rows[y - 1].tiles.length > 0) {
|
|
590
|
+
return {
|
|
591
|
+
y,
|
|
592
|
+
x: this._rows[y - 1].tiles.length,
|
|
593
|
+
};
|
|
594
|
+
}
|
|
595
|
+
y--;
|
|
596
|
+
}
|
|
597
|
+
return null;
|
|
598
|
+
}
|
|
599
|
+
/**
|
|
600
|
+
* "Linearly" toggle the tiles according to the specified toggle action
|
|
601
|
+
* in the specified set of tiles rows. When users toggle a tile from unchecked
|
|
602
|
+
* to checked, and any other tile was checked, the checked state must be
|
|
603
|
+
* extended so that all the tiles between the newly checked tile and the old
|
|
604
|
+
* one(s) are checked, so that they form a continuous "line", eventually
|
|
605
|
+
* spanning rows. The same inversely applies when un-checking tiles. This
|
|
606
|
+
* ensures that users can select a single range of tiles by toggling at any
|
|
607
|
+
* of its ends.
|
|
608
|
+
*
|
|
609
|
+
* @param y The y coordinate of the tile which was toggled.
|
|
610
|
+
* @param x The x coordinate of the tile which was toggled.
|
|
611
|
+
* @param checked The new checked state after toggling the tile.
|
|
612
|
+
*/
|
|
613
|
+
toggleLinearTileCheck(y, x, checked) {
|
|
614
|
+
// if it was checked, it was toggled from unchecked
|
|
615
|
+
if (checked) {
|
|
616
|
+
// find 1st next checked:
|
|
617
|
+
let yx = this.findFirstCheckedCoords(y, x, true);
|
|
618
|
+
// found: extend from it to y,x
|
|
619
|
+
if (yx) {
|
|
620
|
+
this.linearSetCheck(yx.y, yx.x, y, x, true);
|
|
621
|
+
return;
|
|
622
|
+
}
|
|
623
|
+
// not found: find 1st prev checked:
|
|
624
|
+
yx = this.findFirstCheckedCoords(y, x, true, true);
|
|
625
|
+
// found: extend from it to y,x
|
|
626
|
+
if (yx) {
|
|
627
|
+
this.linearSetCheck(yx.y, yx.x, y, x, true);
|
|
628
|
+
return;
|
|
629
|
+
}
|
|
630
|
+
// not found: check y,x
|
|
631
|
+
const tile = this.getTileAt(y, x);
|
|
632
|
+
this._rows[y - 1].tiles[x - 1] = {
|
|
633
|
+
checked: true,
|
|
634
|
+
frIndex: tile.frIndex,
|
|
635
|
+
model: tile.model,
|
|
636
|
+
};
|
|
637
|
+
}
|
|
638
|
+
else {
|
|
639
|
+
// it was toggled from checked:
|
|
640
|
+
// find 1st prev non-checked and set origin (y1,x1) equal to 1 if not found,
|
|
641
|
+
// else to the tile next to the one found. Then uncheck all from origin
|
|
642
|
+
// to y,x.
|
|
643
|
+
let y1;
|
|
644
|
+
let x1;
|
|
645
|
+
const yx = this.findFirstCheckedCoords(y, x, false, true);
|
|
646
|
+
if (yx) {
|
|
647
|
+
const next = this.getNextTileCoords(yx.y, yx.x);
|
|
648
|
+
if (!next) {
|
|
649
|
+
y1 = y;
|
|
650
|
+
x1 = x;
|
|
651
|
+
}
|
|
652
|
+
else {
|
|
653
|
+
y1 = next.y;
|
|
654
|
+
x1 = next.x;
|
|
655
|
+
}
|
|
656
|
+
this.linearSetCheck(y1, x1, yx.y, yx.x, false);
|
|
657
|
+
}
|
|
658
|
+
else {
|
|
659
|
+
y1 = 1;
|
|
660
|
+
x1 = 1;
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
/**
|
|
665
|
+
* Get the location of the checked tiles, if any. As tiles are checked
|
|
666
|
+
* only as an uninterrupted sequence, there can be only 0 or 1 location
|
|
667
|
+
* in a set.
|
|
668
|
+
*
|
|
669
|
+
* @returns The location, or null if no tiles are checked.
|
|
670
|
+
*/
|
|
671
|
+
getCheckedLocation() {
|
|
672
|
+
const start = this.findFirstCheckedCoords(1, 1, true);
|
|
673
|
+
if (!start) {
|
|
674
|
+
return null;
|
|
675
|
+
}
|
|
676
|
+
const end = this.findFirstCheckedCoords(start.y, start.x, false);
|
|
677
|
+
if (!end || (end.y === start.y && end.x === start.x)) {
|
|
678
|
+
return null;
|
|
679
|
+
}
|
|
680
|
+
const last = this.getPrevTileCoords(end.y, end.x);
|
|
681
|
+
return !last || (last.y === start.y && last.x === start.x)
|
|
682
|
+
? new TokenLocation(new TokenPoint(start.y, start.x))
|
|
683
|
+
: new TokenLocation(new TokenPoint(start.y, start.x), new TokenPoint(last.y, last.x));
|
|
684
|
+
}
|
|
685
|
+
/**
|
|
686
|
+
* Get the location of the checked tiles, together with the index to the
|
|
687
|
+
* fragment including them (or a part of them). Should the tiles be included
|
|
688
|
+
* in more than 1 fragment, no fragment will be returned.
|
|
689
|
+
*
|
|
690
|
+
* @returns Object with fragment=fragment index or -1, and location=location
|
|
691
|
+
* of checked tiles; or null if no checked tile.
|
|
692
|
+
*/
|
|
693
|
+
getCheckedLocationAndFragment() {
|
|
694
|
+
const loc = this.getCheckedLocation();
|
|
695
|
+
if (!loc) {
|
|
696
|
+
return null;
|
|
697
|
+
}
|
|
698
|
+
let y2;
|
|
699
|
+
let x2;
|
|
700
|
+
if (loc.secondary) {
|
|
701
|
+
y2 = loc.secondary.y;
|
|
702
|
+
x2 = loc.secondary.x;
|
|
703
|
+
}
|
|
704
|
+
else {
|
|
705
|
+
y2 = loc.primary.y;
|
|
706
|
+
x2 = loc.primary.x;
|
|
707
|
+
}
|
|
708
|
+
let fr = -1;
|
|
709
|
+
for (let y = loc.primary.y; y <= y2; y++) {
|
|
710
|
+
const row = this._rows[y - 1];
|
|
711
|
+
for (let x = y === loc.primary.y ? loc.primary.x : 1; x <= (y === y2 ? x2 : row.tiles.length); x++) {
|
|
712
|
+
if (row.tiles[x - 1].frIndex > -1) {
|
|
713
|
+
if (fr > -1) {
|
|
714
|
+
if (fr !== row.tiles[x - 1].frIndex) {
|
|
715
|
+
return {
|
|
716
|
+
fragment: -1,
|
|
717
|
+
location: loc,
|
|
718
|
+
};
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
else {
|
|
722
|
+
fr = row.tiles[x - 1].frIndex;
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
return {
|
|
728
|
+
fragment: fr,
|
|
729
|
+
location: loc,
|
|
730
|
+
};
|
|
731
|
+
}
|
|
732
732
|
}
|
|
733
733
|
|
|
734
|
-
/**
|
|
735
|
-
* Tiled text layer part editor.
|
|
736
|
-
* This editor allows picking any layer and see all the text tiles included
|
|
737
|
-
* in a fragment with a color highlight. Users can check any number of tiles
|
|
738
|
-
* not belonging to any fragment in the selected layer, and add a new fragment
|
|
739
|
-
* in the selected layer; or check any number of tiles belonging to a fragment
|
|
740
|
-
* of the selected layer, and edit or delete it.
|
|
741
|
-
* Tiles are thus colorized by the UI to render the fragments extent; and freely
|
|
742
|
-
* checked by users to select the fragments to operate with.
|
|
743
|
-
* All the checked tiles must follow each other, in one or more rows. Users can
|
|
744
|
-
* just check the first and the last of a sequence to get the whole sequence
|
|
745
|
-
* checked.
|
|
746
|
-
*/
|
|
747
|
-
class TiledTextLayerPartFeatureComponent {
|
|
748
|
-
constructor(route, _router, _repository, _libraryRouteService, _editedItemRepository, _dialogService, userLevelService) {
|
|
749
|
-
this._router = _router;
|
|
750
|
-
this._repository = _repository;
|
|
751
|
-
this._libraryRouteService = _libraryRouteService;
|
|
752
|
-
this._editedItemRepository = _editedItemRepository;
|
|
753
|
-
this._dialogService = _dialogService;
|
|
754
|
-
this.itemId = route.snapshot.params['iid'];
|
|
755
|
-
this.partId = route.snapshot.params['pid'];
|
|
756
|
-
if (this.partId === 'new') {
|
|
757
|
-
this.partId = undefined;
|
|
758
|
-
}
|
|
759
|
-
this.roleId = route.snapshot.queryParams['rid'];
|
|
760
|
-
if (this.roleId === 'default') {
|
|
761
|
-
this.roleId = undefined;
|
|
762
|
-
}
|
|
763
|
-
this.userLevel = userLevelService.getCurrentUserLevel();
|
|
764
|
-
// layers part
|
|
765
|
-
this.loading$ = this._repository.loading$;
|
|
766
|
-
this.saving$ = this._repository.saving$;
|
|
767
|
-
this.baseText$ = this._repository.baseText$;
|
|
768
|
-
this.locations$ = this._repository.locations$;
|
|
769
|
-
this.breakChance$ = this._repository.breakChance$;
|
|
770
|
-
this.layerHints$ = this._repository.layerHints$;
|
|
771
|
-
// base text: connect rows to the base text part
|
|
772
|
-
this.rows$ = this._repository.baseTextPart$.pipe(map((part) => part?.rows));
|
|
773
|
-
}
|
|
774
|
-
canDeactivate() {
|
|
775
|
-
return true;
|
|
776
|
-
}
|
|
777
|
-
ngOnInit() {
|
|
778
|
-
// when the base text changes, load all the fragments locations
|
|
779
|
-
// and setup their UI state
|
|
780
|
-
this.rows$.subscribe((rows) => {
|
|
781
|
-
this.view = rows ? new TiledTextLayerView(rows) : undefined;
|
|
782
|
-
this.view?.setFragmentLocations(this._repository.getLocations());
|
|
783
|
-
});
|
|
784
|
-
// ensure that the container item is loaded
|
|
785
|
-
this._editedItemRepository.ensureItemLoaded(this.itemId);
|
|
786
|
-
// load the layer part
|
|
787
|
-
this._repository.reset();
|
|
788
|
-
if (this.partId) {
|
|
789
|
-
this._repository.load(this.itemId, this.partId);
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
refreshBreakChance() {
|
|
793
|
-
this._repository.refreshBreakChance();
|
|
794
|
-
}
|
|
795
|
-
onTileChecked(y, x, checked) {
|
|
796
|
-
if (this.view) {
|
|
797
|
-
this.view.toggleLinearTileCheck(y, x, checked);
|
|
798
|
-
}
|
|
799
|
-
}
|
|
800
|
-
getSelectedTileCoords() {
|
|
801
|
-
if (!this.selectedTile || !this.view) {
|
|
802
|
-
return null;
|
|
803
|
-
}
|
|
804
|
-
for (let i = 0; i < this.view.rows.length; i++) {
|
|
805
|
-
const j = this.view.rows[i].tiles.indexOf(this.selectedTile);
|
|
806
|
-
if (j > -1) {
|
|
807
|
-
return { y: i + 1, x: j + 1 };
|
|
808
|
-
}
|
|
809
|
-
}
|
|
810
|
-
return null;
|
|
811
|
-
}
|
|
812
|
-
selectPrevTile() {
|
|
813
|
-
if (!this.view) {
|
|
814
|
-
return;
|
|
815
|
-
}
|
|
816
|
-
let yx = this.getSelectedTileCoords();
|
|
817
|
-
if (yx) {
|
|
818
|
-
yx = this.view.getPrevTileCoords(yx.y, yx.x);
|
|
819
|
-
if (yx) {
|
|
820
|
-
this.selectedTile = this.view.rows[yx.y - 1].tiles[yx.x - 1];
|
|
821
|
-
}
|
|
822
|
-
}
|
|
823
|
-
}
|
|
824
|
-
selectNextTile() {
|
|
825
|
-
if (!this.view) {
|
|
826
|
-
return;
|
|
827
|
-
}
|
|
828
|
-
let yx = this.getSelectedTileCoords();
|
|
829
|
-
if (yx) {
|
|
830
|
-
yx = this.view.getNextTileCoords(yx.y, yx.x);
|
|
831
|
-
if (yx) {
|
|
832
|
-
this.selectedTile = this.view.rows[yx.y - 1].tiles[yx.x - 1];
|
|
833
|
-
}
|
|
834
|
-
}
|
|
835
|
-
}
|
|
836
|
-
deleteFragment() {
|
|
837
|
-
if (!this.view) {
|
|
838
|
-
return;
|
|
839
|
-
}
|
|
840
|
-
const lf = this.view.getCheckedLocationAndFragment();
|
|
841
|
-
if (!lf || lf.fragment === -1) {
|
|
842
|
-
return;
|
|
843
|
-
}
|
|
844
|
-
const locations = this._repository.getLocations();
|
|
845
|
-
const loc = locations[lf.fragment];
|
|
846
|
-
this._dialogService
|
|
847
|
-
.confirm('Delete Fragment', `Delete the fragment at ${loc}?`)
|
|
848
|
-
.subscribe((ok) => {
|
|
849
|
-
if (ok) {
|
|
850
|
-
// find the fragment and remove it from the part
|
|
851
|
-
const i = this._repository.getPart()?.fragments.findIndex((p) => {
|
|
852
|
-
return TokenLocation.parse(p.location)?.overlaps(loc);
|
|
853
|
-
});
|
|
854
|
-
if (i === -1) {
|
|
855
|
-
return;
|
|
856
|
-
}
|
|
857
|
-
this._repository.deleteFragment(loc);
|
|
858
|
-
}
|
|
859
|
-
});
|
|
860
|
-
}
|
|
861
|
-
deleteFragmentFromHint(hint) {
|
|
862
|
-
const loc = TokenLocation.parse(hint.location);
|
|
863
|
-
if (loc) {
|
|
864
|
-
this._repository.deleteFragment(loc);
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
navigateToFragmentEditor(loc) {
|
|
868
|
-
const part = this._repository.getPart();
|
|
869
|
-
if (!part) {
|
|
870
|
-
return;
|
|
871
|
-
}
|
|
872
|
-
const { route, rid } = this._libraryRouteService.buildFragmentEditorRoute(this._editedItemRepository.getFacet().partDefinitions, part.itemId, part.id, part.typeId, part.roleId, loc);
|
|
873
|
-
// navigate to the editor
|
|
874
|
-
this._router.navigate([route], rid
|
|
875
|
-
? {
|
|
876
|
-
queryParams: {
|
|
877
|
-
rid: part.roleId,
|
|
878
|
-
},
|
|
879
|
-
}
|
|
880
|
-
: {});
|
|
881
|
-
}
|
|
882
|
-
editFragment() {
|
|
883
|
-
if (!this.view) {
|
|
884
|
-
return;
|
|
885
|
-
}
|
|
886
|
-
const lf = this.view.getCheckedLocationAndFragment();
|
|
887
|
-
if (!lf || lf.fragment === -1) {
|
|
888
|
-
return;
|
|
889
|
-
}
|
|
890
|
-
const locations = this._repository.getLocations();
|
|
891
|
-
this.navigateToFragmentEditor(locations[lf.fragment].toString());
|
|
892
|
-
}
|
|
893
|
-
editFragmentFromHint(hint) {
|
|
894
|
-
this.navigateToFragmentEditor(hint.location);
|
|
895
|
-
}
|
|
896
|
-
moveFragmentFromHint(hint) {
|
|
897
|
-
if (!this.pickedLocation ||
|
|
898
|
-
this.pickedLocation === hint.location ||
|
|
899
|
-
!this.partId) {
|
|
900
|
-
return;
|
|
901
|
-
}
|
|
902
|
-
this._repository.applyLayerPatches(this.partId, [
|
|
903
|
-
`mov ${hint.location} ${this.pickedLocation}`,
|
|
904
|
-
]);
|
|
905
|
-
}
|
|
906
|
-
addFragment() {
|
|
907
|
-
if (!this.view) {
|
|
908
|
-
return;
|
|
909
|
-
}
|
|
910
|
-
const lf = this.view.getCheckedLocationAndFragment();
|
|
911
|
-
if (!lf || lf.fragment > -1) {
|
|
912
|
-
return;
|
|
913
|
-
}
|
|
914
|
-
this.navigateToFragmentEditor(lf.location.toString());
|
|
915
|
-
}
|
|
916
|
-
pickLocation() {
|
|
917
|
-
if (!this.view) {
|
|
918
|
-
return;
|
|
919
|
-
}
|
|
920
|
-
const lf = this.view.getCheckedLocationAndFragment();
|
|
921
|
-
if (!lf) {
|
|
922
|
-
return;
|
|
923
|
-
}
|
|
924
|
-
const locations = this._repository.getLocations();
|
|
925
|
-
this.pickedLocation = (lf.fragment === -1 ? lf.location : locations[lf.fragment]).toString();
|
|
926
|
-
}
|
|
927
|
-
clearTileChecks() {
|
|
928
|
-
if (!this.view) {
|
|
929
|
-
return;
|
|
930
|
-
}
|
|
931
|
-
this.view.setAllTilesViewState({ checked: false });
|
|
932
|
-
this.pickedLocation = undefined;
|
|
933
|
-
}
|
|
934
|
-
applyLayerPatches(patches) {
|
|
935
|
-
if (this.partId) {
|
|
936
|
-
this._repository.applyLayerPatches(this.partId, patches);
|
|
937
|
-
}
|
|
938
|
-
}
|
|
939
|
-
close() {
|
|
940
|
-
this._router.navigate(['/items', this.itemId]);
|
|
941
|
-
}
|
|
942
|
-
}
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
946
|
-
type: Component,
|
|
947
|
-
args: [{ selector: 'cadmus-tiled-text-layer-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<mat-card appearance=\"outlined\">\r\n <mat-card-header>\r\n <div mat-card-avatar>\r\n <mat-icon>view_headline</mat-icon>\r\n </div>\r\n <mat-card-title>\r\n Tiles-Based Text Layers\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n [ngSwitch]=\"breakChance$ | async\"\r\n (click)=\"refreshBreakChance()\"\r\n >\r\n <mat-icon *ngSwitchCase=\"-1\" matTooltip=\"Checking...\">refresh</mat-icon>\r\n <mat-icon *ngSwitchCase=\"0\" matTooltip=\"Valid\">check_circle</mat-icon>\r\n <mat-icon *ngSwitchCase=\"1\" matTooltip=\"Potentially broken\" color=\"warn\"\r\n >warning</mat-icon\r\n >\r\n <mat-icon *ngSwitchCase=\"2\" matTooltip=\"Broken\" color=\"warn\"\r\n >error</mat-icon\r\n >\r\n </button>\r\n </mat-card-title>\r\n <cadmus-current-layer-part-bar></cadmus-current-layer-part-bar>\r\n </mat-card-header>\r\n <mat-card-actions *ngIf=\"!(loading$ | async) && !(saving$ | async)\">\r\n <mat-toolbar>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n (click)=\"editFragment()\"\r\n matTooltip=\"Edit the selected fragment\"\r\n >\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n color=\"warn\"\r\n (click)=\"deleteFragment()\"\r\n matTooltip=\"Delete the selected fragment\"\r\n >\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n (click)=\"pickLocation()\"\r\n matTooltip=\"Pick the selection location for a new fragment\"\r\n >\r\n <mat-icon>info</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n color=\"warn\"\r\n (click)=\"clearTileChecks()\"\r\n matTooltip=\"Clear any selection\"\r\n >\r\n <mat-icon>clear</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n color=\"primary\"\r\n (click)=\"addFragment()\"\r\n matTooltip=\"Add a new fragment at selection\"\r\n >\r\n <mat-icon>add_circle</mat-icon>\r\n </button>\r\n <span>{{ pickedLocation }}</span>\r\n </mat-toolbar>\r\n </mat-card-actions>\r\n\r\n <mat-card-content>\r\n <mat-progress-bar\r\n mode=\"indeterminate\"\r\n *ngIf=\"loading$ | async\"\r\n ></mat-progress-bar>\r\n\r\n <!-- rows -->\r\n <div *ngIf=\"view\">\r\n <div\r\n *ngFor=\"let row of view.rows; let iy = index\"\r\n class=\"tile-row\"\r\n style=\"display: flex; flex-flow: row wrap\"\r\n >\r\n <span class=\"row-nr\">{{ iy + 1 }}</span>\r\n <!-- tile -->\r\n <cadmus-text-tile\r\n *ngFor=\"let tile of row.tiles || []; let ix = index\"\r\n [tile]=\"tile.model\"\r\n [readonly]=\"true\"\r\n [selected]=\"tile === selectedTile\"\r\n [checkable]=\"true\"\r\n [checked]=\"tile.checked\"\r\n [color]=\"tile.frIndex > -1 ? 'yellow' : 'transparent'\"\r\n style=\"flex: 0 0 auto\"\r\n (click)=\"selectedTile = tile\"\r\n (checkedChange)=\"onTileChecked(iy + 1, ix + 1, $event.checked)\"\r\n (keydown.control.arrowleft)=\"selectPrevTile()\"\r\n (keydown.control.arrowright)=\"selectNextTile()\"\r\n >\r\n </cadmus-text-tile>\r\n </div>\r\n </div>\r\n </mat-card-content>\r\n\r\n <div>\r\n <button\r\n type=\"button\"\r\n mat-raised-button\r\n color=\"warn\"\r\n matTooltip=\"Close this editor\"\r\n (click)=\"close()\"\r\n >\r\n <mat-icon>cancel</mat-icon>\r\n close\r\n </button>\r\n </div>\r\n <mat-expansion-panel *ngIf=\"layerHints$ | async as layerHints\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>Layer hints</mat-panel-title>\r\n <mat-panel-description>{{ layerHints.length }}</mat-panel-description>\r\n </mat-expansion-panel-header>\r\n <cadmus-layer-hints\r\n [hints]=\"layerHints\"\r\n [disabled]=\"(loading$ | async) || (saving$ | async) ? true : false\"\r\n [readonly]=\"userLevel < 2\"\r\n [targetLocation]=\"pickedLocation\"\r\n (requestEdit)=\"editFragmentFromHint($event)\"\r\n (requestDelete)=\"deleteFragmentFromHint($event)\"\r\n (requestMove)=\"moveFragmentFromHint($event)\"\r\n (requestPatch)=\"applyLayerPatches($event)\"\r\n ></cadmus-layer-hints>\r\n </mat-expansion-panel>\r\n</mat-card>\r\n", styles: ["div.tile-row{margin-bottom:6px}span.row-nr{color:silver;font-weight:700}\n"] }]
|
|
734
|
+
/**
|
|
735
|
+
* Tiled text layer part editor.
|
|
736
|
+
* This editor allows picking any layer and see all the text tiles included
|
|
737
|
+
* in a fragment with a color highlight. Users can check any number of tiles
|
|
738
|
+
* not belonging to any fragment in the selected layer, and add a new fragment
|
|
739
|
+
* in the selected layer; or check any number of tiles belonging to a fragment
|
|
740
|
+
* of the selected layer, and edit or delete it.
|
|
741
|
+
* Tiles are thus colorized by the UI to render the fragments extent; and freely
|
|
742
|
+
* checked by users to select the fragments to operate with.
|
|
743
|
+
* All the checked tiles must follow each other, in one or more rows. Users can
|
|
744
|
+
* just check the first and the last of a sequence to get the whole sequence
|
|
745
|
+
* checked.
|
|
746
|
+
*/
|
|
747
|
+
class TiledTextLayerPartFeatureComponent {
|
|
748
|
+
constructor(route, _router, _repository, _libraryRouteService, _editedItemRepository, _dialogService, userLevelService) {
|
|
749
|
+
this._router = _router;
|
|
750
|
+
this._repository = _repository;
|
|
751
|
+
this._libraryRouteService = _libraryRouteService;
|
|
752
|
+
this._editedItemRepository = _editedItemRepository;
|
|
753
|
+
this._dialogService = _dialogService;
|
|
754
|
+
this.itemId = route.snapshot.params['iid'];
|
|
755
|
+
this.partId = route.snapshot.params['pid'];
|
|
756
|
+
if (this.partId === 'new') {
|
|
757
|
+
this.partId = undefined;
|
|
758
|
+
}
|
|
759
|
+
this.roleId = route.snapshot.queryParams['rid'];
|
|
760
|
+
if (this.roleId === 'default') {
|
|
761
|
+
this.roleId = undefined;
|
|
762
|
+
}
|
|
763
|
+
this.userLevel = userLevelService.getCurrentUserLevel();
|
|
764
|
+
// layers part
|
|
765
|
+
this.loading$ = this._repository.loading$;
|
|
766
|
+
this.saving$ = this._repository.saving$;
|
|
767
|
+
this.baseText$ = this._repository.baseText$;
|
|
768
|
+
this.locations$ = this._repository.locations$;
|
|
769
|
+
this.breakChance$ = this._repository.breakChance$;
|
|
770
|
+
this.layerHints$ = this._repository.layerHints$;
|
|
771
|
+
// base text: connect rows to the base text part
|
|
772
|
+
this.rows$ = this._repository.baseTextPart$.pipe(map((part) => part?.rows));
|
|
773
|
+
}
|
|
774
|
+
canDeactivate() {
|
|
775
|
+
return true;
|
|
776
|
+
}
|
|
777
|
+
ngOnInit() {
|
|
778
|
+
// when the base text changes, load all the fragments locations
|
|
779
|
+
// and setup their UI state
|
|
780
|
+
this.rows$.subscribe((rows) => {
|
|
781
|
+
this.view = rows ? new TiledTextLayerView(rows) : undefined;
|
|
782
|
+
this.view?.setFragmentLocations(this._repository.getLocations());
|
|
783
|
+
});
|
|
784
|
+
// ensure that the container item is loaded
|
|
785
|
+
this._editedItemRepository.ensureItemLoaded(this.itemId);
|
|
786
|
+
// load the layer part
|
|
787
|
+
this._repository.reset();
|
|
788
|
+
if (this.partId) {
|
|
789
|
+
this._repository.load(this.itemId, this.partId);
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
refreshBreakChance() {
|
|
793
|
+
this._repository.refreshBreakChance();
|
|
794
|
+
}
|
|
795
|
+
onTileChecked(y, x, checked) {
|
|
796
|
+
if (this.view) {
|
|
797
|
+
this.view.toggleLinearTileCheck(y, x, checked);
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
getSelectedTileCoords() {
|
|
801
|
+
if (!this.selectedTile || !this.view) {
|
|
802
|
+
return null;
|
|
803
|
+
}
|
|
804
|
+
for (let i = 0; i < this.view.rows.length; i++) {
|
|
805
|
+
const j = this.view.rows[i].tiles.indexOf(this.selectedTile);
|
|
806
|
+
if (j > -1) {
|
|
807
|
+
return { y: i + 1, x: j + 1 };
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
return null;
|
|
811
|
+
}
|
|
812
|
+
selectPrevTile() {
|
|
813
|
+
if (!this.view) {
|
|
814
|
+
return;
|
|
815
|
+
}
|
|
816
|
+
let yx = this.getSelectedTileCoords();
|
|
817
|
+
if (yx) {
|
|
818
|
+
yx = this.view.getPrevTileCoords(yx.y, yx.x);
|
|
819
|
+
if (yx) {
|
|
820
|
+
this.selectedTile = this.view.rows[yx.y - 1].tiles[yx.x - 1];
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
selectNextTile() {
|
|
825
|
+
if (!this.view) {
|
|
826
|
+
return;
|
|
827
|
+
}
|
|
828
|
+
let yx = this.getSelectedTileCoords();
|
|
829
|
+
if (yx) {
|
|
830
|
+
yx = this.view.getNextTileCoords(yx.y, yx.x);
|
|
831
|
+
if (yx) {
|
|
832
|
+
this.selectedTile = this.view.rows[yx.y - 1].tiles[yx.x - 1];
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
deleteFragment() {
|
|
837
|
+
if (!this.view) {
|
|
838
|
+
return;
|
|
839
|
+
}
|
|
840
|
+
const lf = this.view.getCheckedLocationAndFragment();
|
|
841
|
+
if (!lf || lf.fragment === -1) {
|
|
842
|
+
return;
|
|
843
|
+
}
|
|
844
|
+
const locations = this._repository.getLocations();
|
|
845
|
+
const loc = locations[lf.fragment];
|
|
846
|
+
this._dialogService
|
|
847
|
+
.confirm('Delete Fragment', `Delete the fragment at ${loc}?`)
|
|
848
|
+
.subscribe((ok) => {
|
|
849
|
+
if (ok) {
|
|
850
|
+
// find the fragment and remove it from the part
|
|
851
|
+
const i = this._repository.getPart()?.fragments.findIndex((p) => {
|
|
852
|
+
return TokenLocation.parse(p.location)?.overlaps(loc);
|
|
853
|
+
});
|
|
854
|
+
if (i === -1) {
|
|
855
|
+
return;
|
|
856
|
+
}
|
|
857
|
+
this._repository.deleteFragment(loc);
|
|
858
|
+
}
|
|
859
|
+
});
|
|
860
|
+
}
|
|
861
|
+
deleteFragmentFromHint(hint) {
|
|
862
|
+
const loc = TokenLocation.parse(hint.location);
|
|
863
|
+
if (loc) {
|
|
864
|
+
this._repository.deleteFragment(loc);
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
navigateToFragmentEditor(loc) {
|
|
868
|
+
const part = this._repository.getPart();
|
|
869
|
+
if (!part) {
|
|
870
|
+
return;
|
|
871
|
+
}
|
|
872
|
+
const { route, rid } = this._libraryRouteService.buildFragmentEditorRoute(this._editedItemRepository.getFacet().partDefinitions, part.itemId, part.id, part.typeId, part.roleId, loc);
|
|
873
|
+
// navigate to the editor
|
|
874
|
+
this._router.navigate([route], rid
|
|
875
|
+
? {
|
|
876
|
+
queryParams: {
|
|
877
|
+
rid: part.roleId,
|
|
878
|
+
},
|
|
879
|
+
}
|
|
880
|
+
: {});
|
|
881
|
+
}
|
|
882
|
+
editFragment() {
|
|
883
|
+
if (!this.view) {
|
|
884
|
+
return;
|
|
885
|
+
}
|
|
886
|
+
const lf = this.view.getCheckedLocationAndFragment();
|
|
887
|
+
if (!lf || lf.fragment === -1) {
|
|
888
|
+
return;
|
|
889
|
+
}
|
|
890
|
+
const locations = this._repository.getLocations();
|
|
891
|
+
this.navigateToFragmentEditor(locations[lf.fragment].toString());
|
|
892
|
+
}
|
|
893
|
+
editFragmentFromHint(hint) {
|
|
894
|
+
this.navigateToFragmentEditor(hint.location);
|
|
895
|
+
}
|
|
896
|
+
moveFragmentFromHint(hint) {
|
|
897
|
+
if (!this.pickedLocation ||
|
|
898
|
+
this.pickedLocation === hint.location ||
|
|
899
|
+
!this.partId) {
|
|
900
|
+
return;
|
|
901
|
+
}
|
|
902
|
+
this._repository.applyLayerPatches(this.partId, [
|
|
903
|
+
`mov ${hint.location} ${this.pickedLocation}`,
|
|
904
|
+
]);
|
|
905
|
+
}
|
|
906
|
+
addFragment() {
|
|
907
|
+
if (!this.view) {
|
|
908
|
+
return;
|
|
909
|
+
}
|
|
910
|
+
const lf = this.view.getCheckedLocationAndFragment();
|
|
911
|
+
if (!lf || lf.fragment > -1) {
|
|
912
|
+
return;
|
|
913
|
+
}
|
|
914
|
+
this.navigateToFragmentEditor(lf.location.toString());
|
|
915
|
+
}
|
|
916
|
+
pickLocation() {
|
|
917
|
+
if (!this.view) {
|
|
918
|
+
return;
|
|
919
|
+
}
|
|
920
|
+
const lf = this.view.getCheckedLocationAndFragment();
|
|
921
|
+
if (!lf) {
|
|
922
|
+
return;
|
|
923
|
+
}
|
|
924
|
+
const locations = this._repository.getLocations();
|
|
925
|
+
this.pickedLocation = (lf.fragment === -1 ? lf.location : locations[lf.fragment]).toString();
|
|
926
|
+
}
|
|
927
|
+
clearTileChecks() {
|
|
928
|
+
if (!this.view) {
|
|
929
|
+
return;
|
|
930
|
+
}
|
|
931
|
+
this.view.setAllTilesViewState({ checked: false });
|
|
932
|
+
this.pickedLocation = undefined;
|
|
933
|
+
}
|
|
934
|
+
applyLayerPatches(patches) {
|
|
935
|
+
if (this.partId) {
|
|
936
|
+
this._repository.applyLayerPatches(this.partId, patches);
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
close() {
|
|
940
|
+
this._router.navigate(['/items', this.itemId]);
|
|
941
|
+
}
|
|
942
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: TiledTextLayerPartFeatureComponent, deps: [{ token: i1.ActivatedRoute }, { token: i1.Router }, { token: i4.EditedLayerRepository }, { token: i4$1.LibraryRouteService }, { token: i4$2.EditedItemRepository }, { token: i5$2.DialogService }, { token: i3.UserLevelService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
943
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: TiledTextLayerPartFeatureComponent, selector: "cadmus-tiled-text-layer-part-feature", ngImport: i0, template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<mat-card appearance=\"outlined\">\r\n <mat-card-header>\r\n <div mat-card-avatar>\r\n <mat-icon>view_headline</mat-icon>\r\n </div>\r\n <mat-card-title>\r\n Tiles-Based Text Layers\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n [ngSwitch]=\"breakChance$ | async\"\r\n (click)=\"refreshBreakChance()\"\r\n >\r\n <mat-icon *ngSwitchCase=\"-1\" matTooltip=\"Checking...\">refresh</mat-icon>\r\n <mat-icon *ngSwitchCase=\"0\" matTooltip=\"Valid\">check_circle</mat-icon>\r\n <mat-icon *ngSwitchCase=\"1\" matTooltip=\"Potentially broken\" color=\"warn\"\r\n >warning</mat-icon\r\n >\r\n <mat-icon *ngSwitchCase=\"2\" matTooltip=\"Broken\" color=\"warn\"\r\n >error</mat-icon\r\n >\r\n </button>\r\n </mat-card-title>\r\n <cadmus-current-layer-part-bar></cadmus-current-layer-part-bar>\r\n </mat-card-header>\r\n <mat-card-actions *ngIf=\"!(loading$ | async) && !(saving$ | async)\">\r\n <mat-toolbar>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n (click)=\"editFragment()\"\r\n matTooltip=\"Edit the selected fragment\"\r\n >\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n color=\"warn\"\r\n (click)=\"deleteFragment()\"\r\n matTooltip=\"Delete the selected fragment\"\r\n >\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n (click)=\"pickLocation()\"\r\n matTooltip=\"Pick the selection location for a new fragment\"\r\n >\r\n <mat-icon>info</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n color=\"warn\"\r\n (click)=\"clearTileChecks()\"\r\n matTooltip=\"Clear any selection\"\r\n >\r\n <mat-icon>clear</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n color=\"primary\"\r\n (click)=\"addFragment()\"\r\n matTooltip=\"Add a new fragment at selection\"\r\n >\r\n <mat-icon>add_circle</mat-icon>\r\n </button>\r\n <span>{{ pickedLocation }}</span>\r\n </mat-toolbar>\r\n </mat-card-actions>\r\n\r\n <mat-card-content>\r\n <mat-progress-bar\r\n mode=\"indeterminate\"\r\n *ngIf=\"loading$ | async\"\r\n ></mat-progress-bar>\r\n\r\n <!-- rows -->\r\n <div *ngIf=\"view\">\r\n <div\r\n *ngFor=\"let row of view.rows; let iy = index\"\r\n class=\"tile-row\"\r\n style=\"display: flex; flex-flow: row wrap\"\r\n >\r\n <span class=\"row-nr\">{{ iy + 1 }}</span>\r\n <!-- tile -->\r\n <cadmus-text-tile\r\n *ngFor=\"let tile of row.tiles || []; let ix = index\"\r\n [tile]=\"tile.model\"\r\n [readonly]=\"true\"\r\n [selected]=\"tile === selectedTile\"\r\n [checkable]=\"true\"\r\n [checked]=\"tile.checked\"\r\n [color]=\"tile.frIndex > -1 ? 'yellow' : 'transparent'\"\r\n style=\"flex: 0 0 auto\"\r\n (click)=\"selectedTile = tile\"\r\n (checkedChange)=\"onTileChecked(iy + 1, ix + 1, $event.checked)\"\r\n (keydown.control.arrowleft)=\"selectPrevTile()\"\r\n (keydown.control.arrowright)=\"selectNextTile()\"\r\n >\r\n </cadmus-text-tile>\r\n </div>\r\n </div>\r\n </mat-card-content>\r\n\r\n <div>\r\n <button\r\n type=\"button\"\r\n mat-raised-button\r\n color=\"warn\"\r\n matTooltip=\"Close this editor\"\r\n (click)=\"close()\"\r\n >\r\n <mat-icon>cancel</mat-icon>\r\n close\r\n </button>\r\n </div>\r\n <mat-expansion-panel *ngIf=\"layerHints$ | async as layerHints\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>Layer hints</mat-panel-title>\r\n <mat-panel-description>{{ layerHints.length }}</mat-panel-description>\r\n </mat-expansion-panel-header>\r\n <cadmus-layer-hints\r\n [hints]=\"layerHints\"\r\n [disabled]=\"(loading$ | async) || (saving$ | async) ? true : false\"\r\n [readonly]=\"userLevel < 2\"\r\n [targetLocation]=\"pickedLocation\"\r\n (requestEdit)=\"editFragmentFromHint($event)\"\r\n (requestDelete)=\"deleteFragmentFromHint($event)\"\r\n (requestMove)=\"moveFragmentFromHint($event)\"\r\n (requestPatch)=\"applyLayerPatches($event)\"\r\n ></cadmus-layer-hints>\r\n </mat-expansion-panel>\r\n</mat-card>\r\n", styles: ["div.tile-row{margin-bottom:6px}span.row-nr{color:silver;font-weight:700}\n"], dependencies: [{ kind: "directive", type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i7.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i8.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i9.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i9.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i9.MatCardAvatar, selector: "[mat-card-avatar], [matCardAvatar]" }, { kind: "directive", type: i9.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i9.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i9.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: i10.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i10.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { kind: "directive", type: i10.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "directive", type: i10.MatExpansionPanelDescription, selector: "mat-panel-description" }, { kind: "component", type: i11.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i12.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i13.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i14.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "component", type: i5$1.LayerHintsComponent, selector: "cadmus-layer-hints", inputs: ["hints", "targetLocation", "disabled", "readonly"], outputs: ["requestEdit", "requestDelete", "requestMove", "requestPatch"] }, { kind: "component", type: i5.TextTileComponent, selector: "cadmus-text-tile", inputs: ["selected", "checkable", "readonly", "color", "checked", "tile"], outputs: ["tileChange", "editData", "checkedChange"] }, { kind: "component", type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { kind: "component", type: i6.CurrentLayerPartBarComponent, selector: "cadmus-current-layer-part-bar" }, { kind: "pipe", type: i7.AsyncPipe, name: "async" }] }); }
|
|
944
|
+
}
|
|
945
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: TiledTextLayerPartFeatureComponent, decorators: [{
|
|
946
|
+
type: Component,
|
|
947
|
+
args: [{ selector: 'cadmus-tiled-text-layer-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<mat-card appearance=\"outlined\">\r\n <mat-card-header>\r\n <div mat-card-avatar>\r\n <mat-icon>view_headline</mat-icon>\r\n </div>\r\n <mat-card-title>\r\n Tiles-Based Text Layers\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n [ngSwitch]=\"breakChance$ | async\"\r\n (click)=\"refreshBreakChance()\"\r\n >\r\n <mat-icon *ngSwitchCase=\"-1\" matTooltip=\"Checking...\">refresh</mat-icon>\r\n <mat-icon *ngSwitchCase=\"0\" matTooltip=\"Valid\">check_circle</mat-icon>\r\n <mat-icon *ngSwitchCase=\"1\" matTooltip=\"Potentially broken\" color=\"warn\"\r\n >warning</mat-icon\r\n >\r\n <mat-icon *ngSwitchCase=\"2\" matTooltip=\"Broken\" color=\"warn\"\r\n >error</mat-icon\r\n >\r\n </button>\r\n </mat-card-title>\r\n <cadmus-current-layer-part-bar></cadmus-current-layer-part-bar>\r\n </mat-card-header>\r\n <mat-card-actions *ngIf=\"!(loading$ | async) && !(saving$ | async)\">\r\n <mat-toolbar>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n (click)=\"editFragment()\"\r\n matTooltip=\"Edit the selected fragment\"\r\n >\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n color=\"warn\"\r\n (click)=\"deleteFragment()\"\r\n matTooltip=\"Delete the selected fragment\"\r\n >\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n (click)=\"pickLocation()\"\r\n matTooltip=\"Pick the selection location for a new fragment\"\r\n >\r\n <mat-icon>info</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n color=\"warn\"\r\n (click)=\"clearTileChecks()\"\r\n matTooltip=\"Clear any selection\"\r\n >\r\n <mat-icon>clear</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n color=\"primary\"\r\n (click)=\"addFragment()\"\r\n matTooltip=\"Add a new fragment at selection\"\r\n >\r\n <mat-icon>add_circle</mat-icon>\r\n </button>\r\n <span>{{ pickedLocation }}</span>\r\n </mat-toolbar>\r\n </mat-card-actions>\r\n\r\n <mat-card-content>\r\n <mat-progress-bar\r\n mode=\"indeterminate\"\r\n *ngIf=\"loading$ | async\"\r\n ></mat-progress-bar>\r\n\r\n <!-- rows -->\r\n <div *ngIf=\"view\">\r\n <div\r\n *ngFor=\"let row of view.rows; let iy = index\"\r\n class=\"tile-row\"\r\n style=\"display: flex; flex-flow: row wrap\"\r\n >\r\n <span class=\"row-nr\">{{ iy + 1 }}</span>\r\n <!-- tile -->\r\n <cadmus-text-tile\r\n *ngFor=\"let tile of row.tiles || []; let ix = index\"\r\n [tile]=\"tile.model\"\r\n [readonly]=\"true\"\r\n [selected]=\"tile === selectedTile\"\r\n [checkable]=\"true\"\r\n [checked]=\"tile.checked\"\r\n [color]=\"tile.frIndex > -1 ? 'yellow' : 'transparent'\"\r\n style=\"flex: 0 0 auto\"\r\n (click)=\"selectedTile = tile\"\r\n (checkedChange)=\"onTileChecked(iy + 1, ix + 1, $event.checked)\"\r\n (keydown.control.arrowleft)=\"selectPrevTile()\"\r\n (keydown.control.arrowright)=\"selectNextTile()\"\r\n >\r\n </cadmus-text-tile>\r\n </div>\r\n </div>\r\n </mat-card-content>\r\n\r\n <div>\r\n <button\r\n type=\"button\"\r\n mat-raised-button\r\n color=\"warn\"\r\n matTooltip=\"Close this editor\"\r\n (click)=\"close()\"\r\n >\r\n <mat-icon>cancel</mat-icon>\r\n close\r\n </button>\r\n </div>\r\n <mat-expansion-panel *ngIf=\"layerHints$ | async as layerHints\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>Layer hints</mat-panel-title>\r\n <mat-panel-description>{{ layerHints.length }}</mat-panel-description>\r\n </mat-expansion-panel-header>\r\n <cadmus-layer-hints\r\n [hints]=\"layerHints\"\r\n [disabled]=\"(loading$ | async) || (saving$ | async) ? true : false\"\r\n [readonly]=\"userLevel < 2\"\r\n [targetLocation]=\"pickedLocation\"\r\n (requestEdit)=\"editFragmentFromHint($event)\"\r\n (requestDelete)=\"deleteFragmentFromHint($event)\"\r\n (requestMove)=\"moveFragmentFromHint($event)\"\r\n (requestPatch)=\"applyLayerPatches($event)\"\r\n ></cadmus-layer-hints>\r\n </mat-expansion-panel>\r\n</mat-card>\r\n", styles: ["div.tile-row{margin-bottom:6px}span.row-nr{color:silver;font-weight:700}\n"] }]
|
|
948
948
|
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i1.Router }, { type: i4.EditedLayerRepository }, { type: i4$1.LibraryRouteService }, { type: i4$2.EditedItemRepository }, { type: i5$2.DialogService }, { type: i3.UserLevelService }]; } });
|
|
949
949
|
|
|
950
|
-
class TiledTextPartFeatureComponent extends EditPartFeatureBase {
|
|
951
|
-
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
952
|
-
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
958
|
-
type: Component,
|
|
959
|
-
args: [{ selector: 'cadmus-tiled-text-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-tiled-text-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-tiled-text-part>\r\n" }]
|
|
950
|
+
class TiledTextPartFeatureComponent extends EditPartFeatureBase {
|
|
951
|
+
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
952
|
+
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
953
|
+
}
|
|
954
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: TiledTextPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
955
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: TiledTextPartFeatureComponent, selector: "cadmus-tiled-text-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-tiled-text-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-tiled-text-part>\r\n", styles: [""], dependencies: [{ kind: "component", type: i5.TiledTextPartComponent, selector: "cadmus-tiled-text-part" }, { kind: "component", type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }] }); }
|
|
956
|
+
}
|
|
957
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: TiledTextPartFeatureComponent, decorators: [{
|
|
958
|
+
type: Component,
|
|
959
|
+
args: [{ selector: 'cadmus-tiled-text-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-tiled-text-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-tiled-text-part>\r\n" }]
|
|
960
960
|
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }]; } });
|
|
961
961
|
|
|
962
|
-
/**
|
|
963
|
-
* Token-based text layer part feature editor. This is a special type of editor,
|
|
964
|
-
* rather than being a simple wrapper like the others; it is used for editing
|
|
965
|
-
* any text layer (using token-based coordinates), whatever the type of its
|
|
966
|
-
* fragments. Being a sort of portal for accessing a fragments editor, it has
|
|
967
|
-
* no save capability: the single fragments are edited and saved as needed.
|
|
968
|
-
*/
|
|
969
|
-
class TokenTextLayerPartFeatureComponent {
|
|
970
|
-
constructor(route, _router, _repository, _textLayerService, _libraryRouteService, _editedItemRepository, _dialogService, userLevelService) {
|
|
971
|
-
this._router = _router;
|
|
972
|
-
this._repository = _repository;
|
|
973
|
-
this._textLayerService = _textLayerService;
|
|
974
|
-
this._libraryRouteService = _libraryRouteService;
|
|
975
|
-
this._editedItemRepository = _editedItemRepository;
|
|
976
|
-
this._dialogService = _dialogService;
|
|
977
|
-
this.textSize = 14;
|
|
978
|
-
this.itemId = route.snapshot.params['iid'];
|
|
979
|
-
this.partId = route.snapshot.params['pid'];
|
|
980
|
-
if (this.partId === 'new') {
|
|
981
|
-
this.partId = undefined;
|
|
982
|
-
}
|
|
983
|
-
this.roleId = route.snapshot.queryParams['rid'];
|
|
984
|
-
if (this.roleId === 'default') {
|
|
985
|
-
this.roleId = undefined;
|
|
986
|
-
}
|
|
987
|
-
this.userLevel = userLevelService.getCurrentUserLevel();
|
|
988
|
-
this.loading$ = this._repository.loading$;
|
|
989
|
-
this.saving$ = this._repository.saving$;
|
|
990
|
-
this.baseText$ = this._repository.baseText$;
|
|
991
|
-
this.locations$ = this._repository.locations$;
|
|
992
|
-
this.breakChance$ = this._repository.breakChance$;
|
|
993
|
-
this.layerHints$ = this._repository.layerHints$;
|
|
994
|
-
}
|
|
995
|
-
canDeactivate() {
|
|
996
|
-
return true;
|
|
997
|
-
}
|
|
998
|
-
makeLarger() {
|
|
999
|
-
const size = this.textSize + 2;
|
|
1000
|
-
if (size > 24) {
|
|
1001
|
-
return;
|
|
1002
|
-
}
|
|
1003
|
-
this.textSize = size;
|
|
1004
|
-
}
|
|
1005
|
-
makeSmaller() {
|
|
1006
|
-
const size = this.textSize - 2;
|
|
1007
|
-
if (size < 12) {
|
|
1008
|
-
return;
|
|
1009
|
-
}
|
|
1010
|
-
this.textSize = size;
|
|
1011
|
-
}
|
|
1012
|
-
ngOnInit() {
|
|
1013
|
-
// when the base text changes, load all the fragments locations
|
|
1014
|
-
// this.baseText$.subscribe(_ => {
|
|
1015
|
-
// this.loadAllFragmentLocations();
|
|
1016
|
-
// });
|
|
1017
|
-
// ensure the container item is loaded
|
|
1018
|
-
this._editedItemRepository.ensureItemLoaded(this.itemId);
|
|
1019
|
-
// load the layer part data
|
|
1020
|
-
this._repository.reset();
|
|
1021
|
-
if (this.partId) {
|
|
1022
|
-
this._repository.load(this.itemId, this.partId);
|
|
1023
|
-
}
|
|
1024
|
-
}
|
|
1025
|
-
deleteFragment() {
|
|
1026
|
-
const range = this._textLayerService.getSelectedRange();
|
|
1027
|
-
if (!range) {
|
|
1028
|
-
return;
|
|
1029
|
-
}
|
|
1030
|
-
const location = this._textLayerService.getSelectedLocationForEdit(range);
|
|
1031
|
-
if (!location) {
|
|
1032
|
-
return;
|
|
1033
|
-
}
|
|
1034
|
-
this._dialogService
|
|
1035
|
-
.confirm('Delete Fragment', `Delete the fragment at ${location}?`)
|
|
1036
|
-
.subscribe((ok) => {
|
|
1037
|
-
if (ok) {
|
|
1038
|
-
// find the fragment and remove it from the part
|
|
1039
|
-
const i = this._repository.getPart()?.fragments.findIndex((p) => {
|
|
1040
|
-
return TokenLocation.parse(p.location)?.overlaps(location);
|
|
1041
|
-
});
|
|
1042
|
-
if (i === -1) {
|
|
1043
|
-
return;
|
|
1044
|
-
}
|
|
1045
|
-
this._repository.deleteFragment(location);
|
|
1046
|
-
}
|
|
1047
|
-
});
|
|
1048
|
-
}
|
|
1049
|
-
deleteFragmentFromHint(hint) {
|
|
1050
|
-
const loc = TokenLocation.parse(hint.location);
|
|
1051
|
-
if (loc) {
|
|
1052
|
-
this._repository.deleteFragment(loc);
|
|
1053
|
-
}
|
|
1054
|
-
}
|
|
1055
|
-
refreshBreakChance() {
|
|
1056
|
-
this._repository.refreshBreakChance();
|
|
1057
|
-
}
|
|
1058
|
-
navigateToFragmentEditor(loc) {
|
|
1059
|
-
const part = this._repository.getPart();
|
|
1060
|
-
if (!part) {
|
|
1061
|
-
return;
|
|
1062
|
-
}
|
|
1063
|
-
const { route, rid } = this._libraryRouteService.buildFragmentEditorRoute(this._editedItemRepository.getFacet().partDefinitions, part.itemId, part.id, part.typeId, part.roleId, loc);
|
|
1064
|
-
// navigate to the editor
|
|
1065
|
-
this._router.navigate([route], rid
|
|
1066
|
-
? {
|
|
1067
|
-
queryParams: {
|
|
1068
|
-
rid: part.roleId,
|
|
1069
|
-
},
|
|
1070
|
-
}
|
|
1071
|
-
: {});
|
|
1072
|
-
}
|
|
1073
|
-
editFragment() {
|
|
1074
|
-
const range = this._textLayerService.getSelectedRange();
|
|
1075
|
-
if (!range) {
|
|
1076
|
-
return;
|
|
1077
|
-
}
|
|
1078
|
-
const location = this._textLayerService.getSelectedLocationForEdit(range);
|
|
1079
|
-
if (location) {
|
|
1080
|
-
this.navigateToFragmentEditor(location.toString());
|
|
1081
|
-
}
|
|
1082
|
-
}
|
|
1083
|
-
editFragmentFromHint(hint) {
|
|
1084
|
-
this.navigateToFragmentEditor(hint.location);
|
|
1085
|
-
}
|
|
1086
|
-
addFragment() {
|
|
1087
|
-
const range = this._textLayerService.getSelectedRange();
|
|
1088
|
-
if (!range) {
|
|
1089
|
-
return;
|
|
1090
|
-
}
|
|
1091
|
-
const location = this._textLayerService.getSelectedLocationForNew(range, this._repository.getBaseText() || '');
|
|
1092
|
-
if (location) {
|
|
1093
|
-
this.navigateToFragmentEditor(location.toString());
|
|
1094
|
-
}
|
|
1095
|
-
}
|
|
1096
|
-
moveFragmentFromHint(hint) {
|
|
1097
|
-
if (!this.pickedLocation ||
|
|
1098
|
-
this.pickedLocation === hint.location ||
|
|
1099
|
-
!this.partId) {
|
|
1100
|
-
return;
|
|
1101
|
-
}
|
|
1102
|
-
this._repository.applyLayerPatches(this.partId, [
|
|
1103
|
-
`mov ${hint.location} ${this.pickedLocation}`,
|
|
1104
|
-
]);
|
|
1105
|
-
}
|
|
1106
|
-
applyLayerPatches(patches) {
|
|
1107
|
-
if (this.partId) {
|
|
1108
|
-
this._repository.applyLayerPatches(this.partId, patches);
|
|
1109
|
-
}
|
|
1110
|
-
}
|
|
1111
|
-
pickLocation() {
|
|
1112
|
-
const range = this._textLayerService.getSelectedRange();
|
|
1113
|
-
if (!range) {
|
|
1114
|
-
return;
|
|
1115
|
-
}
|
|
1116
|
-
const location = this._textLayerService.getSelectedLocationForNew(range, this._repository.getBaseText() || '');
|
|
1117
|
-
if (location) {
|
|
1118
|
-
this.pickedLocation = location.toString();
|
|
1119
|
-
}
|
|
1120
|
-
}
|
|
1121
|
-
close() {
|
|
1122
|
-
this._router.navigate(['/items', this.itemId]);
|
|
1123
|
-
}
|
|
1124
|
-
}
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1128
|
-
type: Component,
|
|
1129
|
-
args: [{ selector: 'cadmus-token-text-layer-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<mat-card appearance=\"outlined\">\r\n <mat-card-header>\r\n <div mat-card-avatar>\r\n <mat-icon>view_headline</mat-icon>\r\n </div>\r\n <mat-card-title>\r\n Token-Based Text Layers\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n [ngSwitch]=\"breakChance$ | async\"\r\n (click)=\"refreshBreakChance()\"\r\n >\r\n <mat-icon *ngSwitchCase=\"-1\" matTooltip=\"Checking...\">refresh</mat-icon>\r\n <mat-icon *ngSwitchCase=\"0\" matTooltip=\"Valid\">check_circle</mat-icon>\r\n <mat-icon *ngSwitchCase=\"1\" matTooltip=\"Potentially broken\" color=\"warn\"\r\n >warning</mat-icon\r\n >\r\n <mat-icon *ngSwitchCase=\"2\" matTooltip=\"Broken\" color=\"warn\"\r\n >error</mat-icon\r\n >\r\n </button>\r\n </mat-card-title>\r\n <cadmus-current-layer-part-bar></cadmus-current-layer-part-bar>\r\n </mat-card-header>\r\n <mat-card-actions *ngIf=\"!(loading$ | async)\">\r\n <mat-toolbar>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n (click)=\"editFragment()\"\r\n matTooltip=\"Edit the selected fragment\"\r\n >\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n color=\"warn\"\r\n (click)=\"deleteFragment()\"\r\n matTooltip=\"Delete the selected fragment\"\r\n >\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n matTooltip=\"Larger text\"\r\n (click)=\"makeLarger()\"\r\n [disabled]=\"textSize >= 24\"\r\n >\r\n <mat-icon>format_size</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n matTooltip=\"Smaller text\"\r\n (click)=\"makeSmaller()\"\r\n [disabled]=\"textSize <= 12\"\r\n >\r\n <mat-icon>text_fields</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n (click)=\"pickLocation()\"\r\n matTooltip=\"Pick the selection location for a new fragment\"\r\n >\r\n <mat-icon>info</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n color=\"primary\"\r\n (click)=\"addFragment()\"\r\n matTooltip=\"Add a new fragment at selection\"\r\n >\r\n <mat-icon>add_circle</mat-icon>\r\n </button>\r\n <span>{{ pickedLocation }}</span>\r\n </mat-toolbar>\r\n </mat-card-actions>\r\n <mat-card-content fxLayout=\"row\">\r\n <mat-progress-bar\r\n mode=\"indeterminate\"\r\n *ngIf=\"loading$ | async\"\r\n ></mat-progress-bar>\r\n\r\n <div [style.font-size]=\"textSize + 'px'\">\r\n <cadmus-decorated-token-text\r\n *ngIf=\"baseText$ | async as baseText\"\r\n [baseText]=\"baseText\"\r\n [locations]=\"(locations$ | async) || []\"\r\n ></cadmus-decorated-token-text>\r\n </div>\r\n </mat-card-content>\r\n <div>\r\n <button\r\n type=\"button\"\r\n mat-raised-button\r\n color=\"warn\"\r\n matTooltip=\"Close this editor\"\r\n (click)=\"close()\"\r\n >\r\n <mat-icon>cancel</mat-icon>\r\n close\r\n </button>\r\n </div>\r\n <mat-expansion-panel *ngIf=\"layerHints$ | async as layerHints\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>Layer hints</mat-panel-title>\r\n <mat-panel-description>{{ layerHints.length }}</mat-panel-description>\r\n </mat-expansion-panel-header>\r\n <cadmus-layer-hints\r\n [hints]=\"layerHints\"\r\n [disabled]=\"(loading$ | async) || (saving$ | async) ? true : false\"\r\n [readonly]=\"userLevel < 2\"\r\n [targetLocation]=\"pickedLocation\"\r\n (requestEdit)=\"editFragmentFromHint($event)\"\r\n (requestDelete)=\"deleteFragmentFromHint($event)\"\r\n (requestMove)=\"moveFragmentFromHint($event)\"\r\n (requestPatch)=\"applyLayerPatches($event)\"\r\n ></cadmus-layer-hints>\r\n </mat-expansion-panel>\r\n</mat-card>\r\n" }]
|
|
962
|
+
/**
|
|
963
|
+
* Token-based text layer part feature editor. This is a special type of editor,
|
|
964
|
+
* rather than being a simple wrapper like the others; it is used for editing
|
|
965
|
+
* any text layer (using token-based coordinates), whatever the type of its
|
|
966
|
+
* fragments. Being a sort of portal for accessing a fragments editor, it has
|
|
967
|
+
* no save capability: the single fragments are edited and saved as needed.
|
|
968
|
+
*/
|
|
969
|
+
class TokenTextLayerPartFeatureComponent {
|
|
970
|
+
constructor(route, _router, _repository, _textLayerService, _libraryRouteService, _editedItemRepository, _dialogService, userLevelService) {
|
|
971
|
+
this._router = _router;
|
|
972
|
+
this._repository = _repository;
|
|
973
|
+
this._textLayerService = _textLayerService;
|
|
974
|
+
this._libraryRouteService = _libraryRouteService;
|
|
975
|
+
this._editedItemRepository = _editedItemRepository;
|
|
976
|
+
this._dialogService = _dialogService;
|
|
977
|
+
this.textSize = 14;
|
|
978
|
+
this.itemId = route.snapshot.params['iid'];
|
|
979
|
+
this.partId = route.snapshot.params['pid'];
|
|
980
|
+
if (this.partId === 'new') {
|
|
981
|
+
this.partId = undefined;
|
|
982
|
+
}
|
|
983
|
+
this.roleId = route.snapshot.queryParams['rid'];
|
|
984
|
+
if (this.roleId === 'default') {
|
|
985
|
+
this.roleId = undefined;
|
|
986
|
+
}
|
|
987
|
+
this.userLevel = userLevelService.getCurrentUserLevel();
|
|
988
|
+
this.loading$ = this._repository.loading$;
|
|
989
|
+
this.saving$ = this._repository.saving$;
|
|
990
|
+
this.baseText$ = this._repository.baseText$;
|
|
991
|
+
this.locations$ = this._repository.locations$;
|
|
992
|
+
this.breakChance$ = this._repository.breakChance$;
|
|
993
|
+
this.layerHints$ = this._repository.layerHints$;
|
|
994
|
+
}
|
|
995
|
+
canDeactivate() {
|
|
996
|
+
return true;
|
|
997
|
+
}
|
|
998
|
+
makeLarger() {
|
|
999
|
+
const size = this.textSize + 2;
|
|
1000
|
+
if (size > 24) {
|
|
1001
|
+
return;
|
|
1002
|
+
}
|
|
1003
|
+
this.textSize = size;
|
|
1004
|
+
}
|
|
1005
|
+
makeSmaller() {
|
|
1006
|
+
const size = this.textSize - 2;
|
|
1007
|
+
if (size < 12) {
|
|
1008
|
+
return;
|
|
1009
|
+
}
|
|
1010
|
+
this.textSize = size;
|
|
1011
|
+
}
|
|
1012
|
+
ngOnInit() {
|
|
1013
|
+
// when the base text changes, load all the fragments locations
|
|
1014
|
+
// this.baseText$.subscribe(_ => {
|
|
1015
|
+
// this.loadAllFragmentLocations();
|
|
1016
|
+
// });
|
|
1017
|
+
// ensure the container item is loaded
|
|
1018
|
+
this._editedItemRepository.ensureItemLoaded(this.itemId);
|
|
1019
|
+
// load the layer part data
|
|
1020
|
+
this._repository.reset();
|
|
1021
|
+
if (this.partId) {
|
|
1022
|
+
this._repository.load(this.itemId, this.partId);
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
deleteFragment() {
|
|
1026
|
+
const range = this._textLayerService.getSelectedRange();
|
|
1027
|
+
if (!range) {
|
|
1028
|
+
return;
|
|
1029
|
+
}
|
|
1030
|
+
const location = this._textLayerService.getSelectedLocationForEdit(range);
|
|
1031
|
+
if (!location) {
|
|
1032
|
+
return;
|
|
1033
|
+
}
|
|
1034
|
+
this._dialogService
|
|
1035
|
+
.confirm('Delete Fragment', `Delete the fragment at ${location}?`)
|
|
1036
|
+
.subscribe((ok) => {
|
|
1037
|
+
if (ok) {
|
|
1038
|
+
// find the fragment and remove it from the part
|
|
1039
|
+
const i = this._repository.getPart()?.fragments.findIndex((p) => {
|
|
1040
|
+
return TokenLocation.parse(p.location)?.overlaps(location);
|
|
1041
|
+
});
|
|
1042
|
+
if (i === -1) {
|
|
1043
|
+
return;
|
|
1044
|
+
}
|
|
1045
|
+
this._repository.deleteFragment(location);
|
|
1046
|
+
}
|
|
1047
|
+
});
|
|
1048
|
+
}
|
|
1049
|
+
deleteFragmentFromHint(hint) {
|
|
1050
|
+
const loc = TokenLocation.parse(hint.location);
|
|
1051
|
+
if (loc) {
|
|
1052
|
+
this._repository.deleteFragment(loc);
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
refreshBreakChance() {
|
|
1056
|
+
this._repository.refreshBreakChance();
|
|
1057
|
+
}
|
|
1058
|
+
navigateToFragmentEditor(loc) {
|
|
1059
|
+
const part = this._repository.getPart();
|
|
1060
|
+
if (!part) {
|
|
1061
|
+
return;
|
|
1062
|
+
}
|
|
1063
|
+
const { route, rid } = this._libraryRouteService.buildFragmentEditorRoute(this._editedItemRepository.getFacet().partDefinitions, part.itemId, part.id, part.typeId, part.roleId, loc);
|
|
1064
|
+
// navigate to the editor
|
|
1065
|
+
this._router.navigate([route], rid
|
|
1066
|
+
? {
|
|
1067
|
+
queryParams: {
|
|
1068
|
+
rid: part.roleId,
|
|
1069
|
+
},
|
|
1070
|
+
}
|
|
1071
|
+
: {});
|
|
1072
|
+
}
|
|
1073
|
+
editFragment() {
|
|
1074
|
+
const range = this._textLayerService.getSelectedRange();
|
|
1075
|
+
if (!range) {
|
|
1076
|
+
return;
|
|
1077
|
+
}
|
|
1078
|
+
const location = this._textLayerService.getSelectedLocationForEdit(range);
|
|
1079
|
+
if (location) {
|
|
1080
|
+
this.navigateToFragmentEditor(location.toString());
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
editFragmentFromHint(hint) {
|
|
1084
|
+
this.navigateToFragmentEditor(hint.location);
|
|
1085
|
+
}
|
|
1086
|
+
addFragment() {
|
|
1087
|
+
const range = this._textLayerService.getSelectedRange();
|
|
1088
|
+
if (!range) {
|
|
1089
|
+
return;
|
|
1090
|
+
}
|
|
1091
|
+
const location = this._textLayerService.getSelectedLocationForNew(range, this._repository.getBaseText() || '');
|
|
1092
|
+
if (location) {
|
|
1093
|
+
this.navigateToFragmentEditor(location.toString());
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
moveFragmentFromHint(hint) {
|
|
1097
|
+
if (!this.pickedLocation ||
|
|
1098
|
+
this.pickedLocation === hint.location ||
|
|
1099
|
+
!this.partId) {
|
|
1100
|
+
return;
|
|
1101
|
+
}
|
|
1102
|
+
this._repository.applyLayerPatches(this.partId, [
|
|
1103
|
+
`mov ${hint.location} ${this.pickedLocation}`,
|
|
1104
|
+
]);
|
|
1105
|
+
}
|
|
1106
|
+
applyLayerPatches(patches) {
|
|
1107
|
+
if (this.partId) {
|
|
1108
|
+
this._repository.applyLayerPatches(this.partId, patches);
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
pickLocation() {
|
|
1112
|
+
const range = this._textLayerService.getSelectedRange();
|
|
1113
|
+
if (!range) {
|
|
1114
|
+
return;
|
|
1115
|
+
}
|
|
1116
|
+
const location = this._textLayerService.getSelectedLocationForNew(range, this._repository.getBaseText() || '');
|
|
1117
|
+
if (location) {
|
|
1118
|
+
this.pickedLocation = location.toString();
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
close() {
|
|
1122
|
+
this._router.navigate(['/items', this.itemId]);
|
|
1123
|
+
}
|
|
1124
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: TokenTextLayerPartFeatureComponent, deps: [{ token: i1.ActivatedRoute }, { token: i1.Router }, { token: i4.EditedLayerRepository }, { token: i4$1.TextLayerService }, { token: i4$1.LibraryRouteService }, { token: i4$2.EditedItemRepository }, { token: i5$2.DialogService }, { token: i3.UserLevelService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1125
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: TokenTextLayerPartFeatureComponent, selector: "cadmus-token-text-layer-part-feature", ngImport: i0, template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<mat-card appearance=\"outlined\">\r\n <mat-card-header>\r\n <div mat-card-avatar>\r\n <mat-icon>view_headline</mat-icon>\r\n </div>\r\n <mat-card-title>\r\n Token-Based Text Layers\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n [ngSwitch]=\"breakChance$ | async\"\r\n (click)=\"refreshBreakChance()\"\r\n >\r\n <mat-icon *ngSwitchCase=\"-1\" matTooltip=\"Checking...\">refresh</mat-icon>\r\n <mat-icon *ngSwitchCase=\"0\" matTooltip=\"Valid\">check_circle</mat-icon>\r\n <mat-icon *ngSwitchCase=\"1\" matTooltip=\"Potentially broken\" color=\"warn\"\r\n >warning</mat-icon\r\n >\r\n <mat-icon *ngSwitchCase=\"2\" matTooltip=\"Broken\" color=\"warn\"\r\n >error</mat-icon\r\n >\r\n </button>\r\n </mat-card-title>\r\n <cadmus-current-layer-part-bar></cadmus-current-layer-part-bar>\r\n </mat-card-header>\r\n <mat-card-actions *ngIf=\"!(loading$ | async)\">\r\n <mat-toolbar>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n (click)=\"editFragment()\"\r\n matTooltip=\"Edit the selected fragment\"\r\n >\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n color=\"warn\"\r\n (click)=\"deleteFragment()\"\r\n matTooltip=\"Delete the selected fragment\"\r\n >\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n matTooltip=\"Larger text\"\r\n (click)=\"makeLarger()\"\r\n [disabled]=\"textSize >= 24\"\r\n >\r\n <mat-icon>format_size</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n matTooltip=\"Smaller text\"\r\n (click)=\"makeSmaller()\"\r\n [disabled]=\"textSize <= 12\"\r\n >\r\n <mat-icon>text_fields</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n (click)=\"pickLocation()\"\r\n matTooltip=\"Pick the selection location for a new fragment\"\r\n >\r\n <mat-icon>info</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n color=\"primary\"\r\n (click)=\"addFragment()\"\r\n matTooltip=\"Add a new fragment at selection\"\r\n >\r\n <mat-icon>add_circle</mat-icon>\r\n </button>\r\n <span>{{ pickedLocation }}</span>\r\n </mat-toolbar>\r\n </mat-card-actions>\r\n <mat-card-content fxLayout=\"row\">\r\n <mat-progress-bar\r\n mode=\"indeterminate\"\r\n *ngIf=\"loading$ | async\"\r\n ></mat-progress-bar>\r\n\r\n <div [style.font-size]=\"textSize + 'px'\">\r\n <cadmus-decorated-token-text\r\n *ngIf=\"baseText$ | async as baseText\"\r\n [baseText]=\"baseText\"\r\n [locations]=\"(locations$ | async) || []\"\r\n ></cadmus-decorated-token-text>\r\n </div>\r\n </mat-card-content>\r\n <div>\r\n <button\r\n type=\"button\"\r\n mat-raised-button\r\n color=\"warn\"\r\n matTooltip=\"Close this editor\"\r\n (click)=\"close()\"\r\n >\r\n <mat-icon>cancel</mat-icon>\r\n close\r\n </button>\r\n </div>\r\n <mat-expansion-panel *ngIf=\"layerHints$ | async as layerHints\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>Layer hints</mat-panel-title>\r\n <mat-panel-description>{{ layerHints.length }}</mat-panel-description>\r\n </mat-expansion-panel-header>\r\n <cadmus-layer-hints\r\n [hints]=\"layerHints\"\r\n [disabled]=\"(loading$ | async) || (saving$ | async) ? true : false\"\r\n [readonly]=\"userLevel < 2\"\r\n [targetLocation]=\"pickedLocation\"\r\n (requestEdit)=\"editFragmentFromHint($event)\"\r\n (requestDelete)=\"deleteFragmentFromHint($event)\"\r\n (requestMove)=\"moveFragmentFromHint($event)\"\r\n (requestPatch)=\"applyLayerPatches($event)\"\r\n ></cadmus-layer-hints>\r\n </mat-expansion-panel>\r\n</mat-card>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i7.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i8.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i9.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i9.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i9.MatCardAvatar, selector: "[mat-card-avatar], [matCardAvatar]" }, { kind: "directive", type: i9.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i9.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i9.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: i10.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i10.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { kind: "directive", type: i10.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "directive", type: i10.MatExpansionPanelDescription, selector: "mat-panel-description" }, { kind: "component", type: i11.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i12.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i13.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i14.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "component", type: i5$1.DecoratedTokenTextComponent, selector: "cadmus-decorated-token-text", inputs: ["baseText", "locations", "selectedLocation"] }, { kind: "component", type: i5$1.LayerHintsComponent, selector: "cadmus-layer-hints", inputs: ["hints", "targetLocation", "disabled", "readonly"], outputs: ["requestEdit", "requestDelete", "requestMove", "requestPatch"] }, { kind: "component", type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { kind: "component", type: i6.CurrentLayerPartBarComponent, selector: "cadmus-current-layer-part-bar" }, { kind: "pipe", type: i7.AsyncPipe, name: "async" }] }); }
|
|
1126
|
+
}
|
|
1127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: TokenTextLayerPartFeatureComponent, decorators: [{
|
|
1128
|
+
type: Component,
|
|
1129
|
+
args: [{ selector: 'cadmus-token-text-layer-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<mat-card appearance=\"outlined\">\r\n <mat-card-header>\r\n <div mat-card-avatar>\r\n <mat-icon>view_headline</mat-icon>\r\n </div>\r\n <mat-card-title>\r\n Token-Based Text Layers\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n [ngSwitch]=\"breakChance$ | async\"\r\n (click)=\"refreshBreakChance()\"\r\n >\r\n <mat-icon *ngSwitchCase=\"-1\" matTooltip=\"Checking...\">refresh</mat-icon>\r\n <mat-icon *ngSwitchCase=\"0\" matTooltip=\"Valid\">check_circle</mat-icon>\r\n <mat-icon *ngSwitchCase=\"1\" matTooltip=\"Potentially broken\" color=\"warn\"\r\n >warning</mat-icon\r\n >\r\n <mat-icon *ngSwitchCase=\"2\" matTooltip=\"Broken\" color=\"warn\"\r\n >error</mat-icon\r\n >\r\n </button>\r\n </mat-card-title>\r\n <cadmus-current-layer-part-bar></cadmus-current-layer-part-bar>\r\n </mat-card-header>\r\n <mat-card-actions *ngIf=\"!(loading$ | async)\">\r\n <mat-toolbar>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n (click)=\"editFragment()\"\r\n matTooltip=\"Edit the selected fragment\"\r\n >\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n color=\"warn\"\r\n (click)=\"deleteFragment()\"\r\n matTooltip=\"Delete the selected fragment\"\r\n >\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n matTooltip=\"Larger text\"\r\n (click)=\"makeLarger()\"\r\n [disabled]=\"textSize >= 24\"\r\n >\r\n <mat-icon>format_size</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n matTooltip=\"Smaller text\"\r\n (click)=\"makeSmaller()\"\r\n [disabled]=\"textSize <= 12\"\r\n >\r\n <mat-icon>text_fields</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n (click)=\"pickLocation()\"\r\n matTooltip=\"Pick the selection location for a new fragment\"\r\n >\r\n <mat-icon>info</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n color=\"primary\"\r\n (click)=\"addFragment()\"\r\n matTooltip=\"Add a new fragment at selection\"\r\n >\r\n <mat-icon>add_circle</mat-icon>\r\n </button>\r\n <span>{{ pickedLocation }}</span>\r\n </mat-toolbar>\r\n </mat-card-actions>\r\n <mat-card-content fxLayout=\"row\">\r\n <mat-progress-bar\r\n mode=\"indeterminate\"\r\n *ngIf=\"loading$ | async\"\r\n ></mat-progress-bar>\r\n\r\n <div [style.font-size]=\"textSize + 'px'\">\r\n <cadmus-decorated-token-text\r\n *ngIf=\"baseText$ | async as baseText\"\r\n [baseText]=\"baseText\"\r\n [locations]=\"(locations$ | async) || []\"\r\n ></cadmus-decorated-token-text>\r\n </div>\r\n </mat-card-content>\r\n <div>\r\n <button\r\n type=\"button\"\r\n mat-raised-button\r\n color=\"warn\"\r\n matTooltip=\"Close this editor\"\r\n (click)=\"close()\"\r\n >\r\n <mat-icon>cancel</mat-icon>\r\n close\r\n </button>\r\n </div>\r\n <mat-expansion-panel *ngIf=\"layerHints$ | async as layerHints\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>Layer hints</mat-panel-title>\r\n <mat-panel-description>{{ layerHints.length }}</mat-panel-description>\r\n </mat-expansion-panel-header>\r\n <cadmus-layer-hints\r\n [hints]=\"layerHints\"\r\n [disabled]=\"(loading$ | async) || (saving$ | async) ? true : false\"\r\n [readonly]=\"userLevel < 2\"\r\n [targetLocation]=\"pickedLocation\"\r\n (requestEdit)=\"editFragmentFromHint($event)\"\r\n (requestDelete)=\"deleteFragmentFromHint($event)\"\r\n (requestMove)=\"moveFragmentFromHint($event)\"\r\n (requestPatch)=\"applyLayerPatches($event)\"\r\n ></cadmus-layer-hints>\r\n </mat-expansion-panel>\r\n</mat-card>\r\n" }]
|
|
1130
1130
|
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i1.Router }, { type: i4.EditedLayerRepository }, { type: i4$1.TextLayerService }, { type: i4$1.LibraryRouteService }, { type: i4$2.EditedItemRepository }, { type: i5$2.DialogService }, { type: i3.UserLevelService }]; } });
|
|
1131
1131
|
|
|
1132
|
-
class TokenTextPartFeatureComponent extends EditPartFeatureBase {
|
|
1133
|
-
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
1134
|
-
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
1135
|
-
}
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1140
|
-
type: Component,
|
|
1141
|
-
args: [{ selector: 'cadmus-token-text-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-token-text-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-token-text-part>\r\n" }]
|
|
1132
|
+
class TokenTextPartFeatureComponent extends EditPartFeatureBase {
|
|
1133
|
+
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
|
|
1134
|
+
super(router, route, snackbar, itemService, thesaurusService, editorService);
|
|
1135
|
+
}
|
|
1136
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: TokenTextPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1137
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: TokenTextPartFeatureComponent, selector: "cadmus-token-text-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-token-text-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-token-text-part>\r\n", styles: [""], dependencies: [{ kind: "component", type: i5.TokenTextPartComponent, selector: "cadmus-token-text-part" }, { kind: "component", type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }] }); }
|
|
1138
|
+
}
|
|
1139
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: TokenTextPartFeatureComponent, decorators: [{
|
|
1140
|
+
type: Component,
|
|
1141
|
+
args: [{ selector: 'cadmus-token-text-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-token-text-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-token-text-part>\r\n" }]
|
|
1142
1142
|
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }]; } });
|
|
1143
1143
|
|
|
1144
|
-
// https://github.com/ng-packagr/ng-packagr/issues/778
|
|
1145
|
-
const RouterModuleForChild = RouterModule.forChild([
|
|
1146
|
-
{
|
|
1147
|
-
path: `${BIBLIOGRAPHY_PART_TYPEID}/:pid`,
|
|
1148
|
-
pathMatch: 'full',
|
|
1149
|
-
component: BibliographyPartFeatureComponent,
|
|
1150
|
-
canDeactivate: [PendingChangesGuard],
|
|
1151
|
-
},
|
|
1152
|
-
{
|
|
1153
|
-
path: `${CATEGORIES_PART_TYPEID}/:pid`,
|
|
1154
|
-
pathMatch: 'full',
|
|
1155
|
-
component: CategoriesPartFeatureComponent,
|
|
1156
|
-
canDeactivate: [PendingChangesGuard],
|
|
1157
|
-
},
|
|
1158
|
-
{
|
|
1159
|
-
path: `${COMMENT_PART_TYPEID}/:pid`,
|
|
1160
|
-
pathMatch: 'full',
|
|
1161
|
-
component: CommentPartFeatureComponent,
|
|
1162
|
-
canDeactivate: [PendingChangesGuard],
|
|
1163
|
-
},
|
|
1164
|
-
{
|
|
1165
|
-
path: `${CHRONOTOPES_PART_TYPEID}/:pid`,
|
|
1166
|
-
pathMatch: 'full',
|
|
1167
|
-
component: ChronotopesPartFeatureComponent,
|
|
1168
|
-
canDeactivate: [PendingChangesGuard],
|
|
1169
|
-
},
|
|
1170
|
-
{
|
|
1171
|
-
path: `${DOC_REFERENCES_PART_TYPEID}/:pid`,
|
|
1172
|
-
pathMatch: 'full',
|
|
1173
|
-
component: DocReferencesPartFeatureComponent,
|
|
1174
|
-
canDeactivate: [PendingChangesGuard],
|
|
1175
|
-
},
|
|
1176
|
-
{
|
|
1177
|
-
path: `${EXTERNAL_IDS_PART_TYPEID}/:pid`,
|
|
1178
|
-
pathMatch: 'full',
|
|
1179
|
-
component: ExternalIdsPartFeatureComponent,
|
|
1180
|
-
canDeactivate: [PendingChangesGuard],
|
|
1181
|
-
},
|
|
1182
|
-
{
|
|
1183
|
-
path: `${HISTORICAL_DATE_PART_TYPEID}/:pid`,
|
|
1184
|
-
pathMatch: 'full',
|
|
1185
|
-
component: HistoricalDatePartFeatureComponent,
|
|
1186
|
-
canDeactivate: [PendingChangesGuard],
|
|
1187
|
-
},
|
|
1188
|
-
{
|
|
1189
|
-
path: `${HISTORICAL_EVENTS_PART_TYPEID}/:pid`,
|
|
1190
|
-
pathMatch: 'full',
|
|
1191
|
-
component: HistoricalEventsPartFeatureComponent,
|
|
1192
|
-
canDeactivate: [PendingChangesGuard],
|
|
1193
|
-
},
|
|
1194
|
-
{
|
|
1195
|
-
path: `${KEYWORDS_PART_TYPEID}/:pid`,
|
|
1196
|
-
pathMatch: 'full',
|
|
1197
|
-
component: KeywordsPartFeatureComponent,
|
|
1198
|
-
canDeactivate: [PendingChangesGuard],
|
|
1199
|
-
},
|
|
1200
|
-
{
|
|
1201
|
-
path: `${INDEX_KEYWORDS_PART_TYPEID}/:pid`,
|
|
1202
|
-
pathMatch: 'full',
|
|
1203
|
-
component: IndexKeywordsPartFeatureComponent,
|
|
1204
|
-
canDeactivate: [PendingChangesGuard],
|
|
1205
|
-
},
|
|
1206
|
-
{
|
|
1207
|
-
path: `${METADATA_PART_TYPEID}/:pid`,
|
|
1208
|
-
pathMatch: 'full',
|
|
1209
|
-
component: MetadataPartFeatureComponent,
|
|
1210
|
-
canDeactivate: [PendingChangesGuard],
|
|
1211
|
-
},
|
|
1212
|
-
{
|
|
1213
|
-
path: `${NAMES_PART_TYPEID}/:pid`,
|
|
1214
|
-
pathMatch: 'full',
|
|
1215
|
-
component: NamesPartFeatureComponent,
|
|
1216
|
-
canDeactivate: [PendingChangesGuard],
|
|
1217
|
-
},
|
|
1218
|
-
{
|
|
1219
|
-
path: `${NOTE_PART_TYPEID}/:pid`,
|
|
1220
|
-
pathMatch: 'full',
|
|
1221
|
-
component: NotePartFeatureComponent,
|
|
1222
|
-
canDeactivate: [PendingChangesGuard],
|
|
1223
|
-
},
|
|
1224
|
-
{
|
|
1225
|
-
path: `${PIN_LINKS_PART_TYPEID}/:pid`,
|
|
1226
|
-
pathMatch: 'full',
|
|
1227
|
-
component: PinLinksPartFeatureComponent,
|
|
1228
|
-
canDeactivate: [PendingChangesGuard],
|
|
1229
|
-
},
|
|
1230
|
-
{
|
|
1231
|
-
path: `${TOKEN_TEXT_PART_TYPEID}/:pid`,
|
|
1232
|
-
pathMatch: 'full',
|
|
1233
|
-
component: TokenTextPartFeatureComponent,
|
|
1234
|
-
canDeactivate: [PendingChangesGuard],
|
|
1235
|
-
},
|
|
1236
|
-
{
|
|
1237
|
-
path: `${TILED_TEXT_PART_TYPEID}/:pid`,
|
|
1238
|
-
pathMatch: 'full',
|
|
1239
|
-
component: TiledTextPartFeatureComponent,
|
|
1240
|
-
canDeactivate: [PendingChangesGuard],
|
|
1241
|
-
},
|
|
1242
|
-
{
|
|
1243
|
-
path: 'it.vedph.token-text-layer/:pid',
|
|
1244
|
-
pathMatch: 'full',
|
|
1245
|
-
component: TokenTextLayerPartFeatureComponent,
|
|
1246
|
-
canDeactivate: [PendingChangesGuard],
|
|
1247
|
-
},
|
|
1248
|
-
{
|
|
1249
|
-
path: 'it.vedph.tiled-text-layer/:pid',
|
|
1250
|
-
pathMatch: 'full',
|
|
1251
|
-
component: TiledTextLayerPartFeatureComponent,
|
|
1252
|
-
canDeactivate: [PendingChangesGuard],
|
|
1253
|
-
},
|
|
1254
|
-
{
|
|
1255
|
-
path: `fragment/:pid/${COMMENT_FRAGMENT_TYPEID}/:loc`,
|
|
1256
|
-
pathMatch: 'full',
|
|
1257
|
-
component: CommentFragmentFeatureComponent,
|
|
1258
|
-
canDeactivate: [PendingChangesGuard],
|
|
1259
|
-
},
|
|
1260
|
-
{
|
|
1261
|
-
path: `fragment/:pid/${CHRONOLOGY_FRAGMENT_TYPEID}/:loc`,
|
|
1262
|
-
pathMatch: 'full',
|
|
1263
|
-
component: ChronologyFragmentFeatureComponent,
|
|
1264
|
-
canDeactivate: [PendingChangesGuard],
|
|
1265
|
-
},
|
|
1266
|
-
{
|
|
1267
|
-
path: `fragment/:pid/${PIN_LINKS_FRAGMENT_TYPEID}/:loc`,
|
|
1268
|
-
pathMatch: 'full',
|
|
1269
|
-
component: PinLinksFragmentFeatureComponent,
|
|
1270
|
-
canDeactivate: [PendingChangesGuard],
|
|
1271
|
-
},
|
|
1272
|
-
]);
|
|
1273
|
-
class CadmusPartGeneralPgModule {
|
|
1274
|
-
}
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1366
|
-
type: NgModule,
|
|
1367
|
-
args: [{
|
|
1368
|
-
imports: [
|
|
1369
|
-
CommonModule,
|
|
1370
|
-
FormsModule,
|
|
1371
|
-
ReactiveFormsModule,
|
|
1372
|
-
RouterModuleForChild,
|
|
1373
|
-
// material
|
|
1374
|
-
MatButtonModule,
|
|
1375
|
-
MatCheckboxModule,
|
|
1376
|
-
MatCardModule,
|
|
1377
|
-
MatExpansionModule,
|
|
1378
|
-
MatIconModule,
|
|
1379
|
-
MatInputModule,
|
|
1380
|
-
MatProgressBarModule,
|
|
1381
|
-
MatProgressSpinnerModule,
|
|
1382
|
-
MatSelectModule,
|
|
1383
|
-
MatTooltipModule,
|
|
1384
|
-
MatToolbarModule,
|
|
1385
|
-
// vendors
|
|
1386
|
-
NgToolsModule,
|
|
1387
|
-
NgMatToolsModule,
|
|
1388
|
-
// cadmus
|
|
1389
|
-
CadmusCoreModule,
|
|
1390
|
-
CadmusUiModule,
|
|
1391
|
-
CadmusPartGeneralUiModule,
|
|
1392
|
-
CadmusStateModule,
|
|
1393
|
-
CadmusUiPgModule,
|
|
1394
|
-
],
|
|
1395
|
-
declarations: [
|
|
1396
|
-
BibliographyPartFeatureComponent,
|
|
1397
|
-
CategoriesPartFeatureComponent,
|
|
1398
|
-
ChronologyFragmentFeatureComponent,
|
|
1399
|
-
ChronotopesPartFeatureComponent,
|
|
1400
|
-
CommentFragmentFeatureComponent,
|
|
1401
|
-
CommentPartFeatureComponent,
|
|
1402
|
-
DocReferencesPartFeatureComponent,
|
|
1403
|
-
ExternalIdsPartFeatureComponent,
|
|
1404
|
-
HistoricalDatePartFeatureComponent,
|
|
1405
|
-
HistoricalEventsPartFeatureComponent,
|
|
1406
|
-
IndexKeywordsPartFeatureComponent,
|
|
1407
|
-
KeywordsPartFeatureComponent,
|
|
1408
|
-
MetadataPartFeatureComponent,
|
|
1409
|
-
NamesPartFeatureComponent,
|
|
1410
|
-
NotePartFeatureComponent,
|
|
1411
|
-
PinLinksFragmentFeatureComponent,
|
|
1412
|
-
PinLinksPartFeatureComponent,
|
|
1413
|
-
TiledTextLayerPartFeatureComponent,
|
|
1414
|
-
TiledTextPartFeatureComponent,
|
|
1415
|
-
TokenTextLayerPartFeatureComponent,
|
|
1416
|
-
TokenTextPartFeatureComponent,
|
|
1417
|
-
],
|
|
1418
|
-
exports: [
|
|
1419
|
-
BibliographyPartFeatureComponent,
|
|
1420
|
-
CategoriesPartFeatureComponent,
|
|
1421
|
-
ChronologyFragmentFeatureComponent,
|
|
1422
|
-
ChronotopesPartFeatureComponent,
|
|
1423
|
-
CommentFragmentFeatureComponent,
|
|
1424
|
-
CommentPartFeatureComponent,
|
|
1425
|
-
DocReferencesPartFeatureComponent,
|
|
1426
|
-
ExternalIdsPartFeatureComponent,
|
|
1427
|
-
HistoricalDatePartFeatureComponent,
|
|
1428
|
-
HistoricalEventsPartFeatureComponent,
|
|
1429
|
-
IndexKeywordsPartFeatureComponent,
|
|
1430
|
-
KeywordsPartFeatureComponent,
|
|
1431
|
-
MetadataPartFeatureComponent,
|
|
1432
|
-
NamesPartFeatureComponent,
|
|
1433
|
-
NotePartFeatureComponent,
|
|
1434
|
-
PinLinksFragmentFeatureComponent,
|
|
1435
|
-
PinLinksPartFeatureComponent,
|
|
1436
|
-
TiledTextLayerPartFeatureComponent,
|
|
1437
|
-
TiledTextPartFeatureComponent,
|
|
1438
|
-
TokenTextLayerPartFeatureComponent,
|
|
1439
|
-
TokenTextPartFeatureComponent,
|
|
1440
|
-
],
|
|
1441
|
-
}]
|
|
1144
|
+
// https://github.com/ng-packagr/ng-packagr/issues/778
|
|
1145
|
+
const RouterModuleForChild = RouterModule.forChild([
|
|
1146
|
+
{
|
|
1147
|
+
path: `${BIBLIOGRAPHY_PART_TYPEID}/:pid`,
|
|
1148
|
+
pathMatch: 'full',
|
|
1149
|
+
component: BibliographyPartFeatureComponent,
|
|
1150
|
+
canDeactivate: [PendingChangesGuard],
|
|
1151
|
+
},
|
|
1152
|
+
{
|
|
1153
|
+
path: `${CATEGORIES_PART_TYPEID}/:pid`,
|
|
1154
|
+
pathMatch: 'full',
|
|
1155
|
+
component: CategoriesPartFeatureComponent,
|
|
1156
|
+
canDeactivate: [PendingChangesGuard],
|
|
1157
|
+
},
|
|
1158
|
+
{
|
|
1159
|
+
path: `${COMMENT_PART_TYPEID}/:pid`,
|
|
1160
|
+
pathMatch: 'full',
|
|
1161
|
+
component: CommentPartFeatureComponent,
|
|
1162
|
+
canDeactivate: [PendingChangesGuard],
|
|
1163
|
+
},
|
|
1164
|
+
{
|
|
1165
|
+
path: `${CHRONOTOPES_PART_TYPEID}/:pid`,
|
|
1166
|
+
pathMatch: 'full',
|
|
1167
|
+
component: ChronotopesPartFeatureComponent,
|
|
1168
|
+
canDeactivate: [PendingChangesGuard],
|
|
1169
|
+
},
|
|
1170
|
+
{
|
|
1171
|
+
path: `${DOC_REFERENCES_PART_TYPEID}/:pid`,
|
|
1172
|
+
pathMatch: 'full',
|
|
1173
|
+
component: DocReferencesPartFeatureComponent,
|
|
1174
|
+
canDeactivate: [PendingChangesGuard],
|
|
1175
|
+
},
|
|
1176
|
+
{
|
|
1177
|
+
path: `${EXTERNAL_IDS_PART_TYPEID}/:pid`,
|
|
1178
|
+
pathMatch: 'full',
|
|
1179
|
+
component: ExternalIdsPartFeatureComponent,
|
|
1180
|
+
canDeactivate: [PendingChangesGuard],
|
|
1181
|
+
},
|
|
1182
|
+
{
|
|
1183
|
+
path: `${HISTORICAL_DATE_PART_TYPEID}/:pid`,
|
|
1184
|
+
pathMatch: 'full',
|
|
1185
|
+
component: HistoricalDatePartFeatureComponent,
|
|
1186
|
+
canDeactivate: [PendingChangesGuard],
|
|
1187
|
+
},
|
|
1188
|
+
{
|
|
1189
|
+
path: `${HISTORICAL_EVENTS_PART_TYPEID}/:pid`,
|
|
1190
|
+
pathMatch: 'full',
|
|
1191
|
+
component: HistoricalEventsPartFeatureComponent,
|
|
1192
|
+
canDeactivate: [PendingChangesGuard],
|
|
1193
|
+
},
|
|
1194
|
+
{
|
|
1195
|
+
path: `${KEYWORDS_PART_TYPEID}/:pid`,
|
|
1196
|
+
pathMatch: 'full',
|
|
1197
|
+
component: KeywordsPartFeatureComponent,
|
|
1198
|
+
canDeactivate: [PendingChangesGuard],
|
|
1199
|
+
},
|
|
1200
|
+
{
|
|
1201
|
+
path: `${INDEX_KEYWORDS_PART_TYPEID}/:pid`,
|
|
1202
|
+
pathMatch: 'full',
|
|
1203
|
+
component: IndexKeywordsPartFeatureComponent,
|
|
1204
|
+
canDeactivate: [PendingChangesGuard],
|
|
1205
|
+
},
|
|
1206
|
+
{
|
|
1207
|
+
path: `${METADATA_PART_TYPEID}/:pid`,
|
|
1208
|
+
pathMatch: 'full',
|
|
1209
|
+
component: MetadataPartFeatureComponent,
|
|
1210
|
+
canDeactivate: [PendingChangesGuard],
|
|
1211
|
+
},
|
|
1212
|
+
{
|
|
1213
|
+
path: `${NAMES_PART_TYPEID}/:pid`,
|
|
1214
|
+
pathMatch: 'full',
|
|
1215
|
+
component: NamesPartFeatureComponent,
|
|
1216
|
+
canDeactivate: [PendingChangesGuard],
|
|
1217
|
+
},
|
|
1218
|
+
{
|
|
1219
|
+
path: `${NOTE_PART_TYPEID}/:pid`,
|
|
1220
|
+
pathMatch: 'full',
|
|
1221
|
+
component: NotePartFeatureComponent,
|
|
1222
|
+
canDeactivate: [PendingChangesGuard],
|
|
1223
|
+
},
|
|
1224
|
+
{
|
|
1225
|
+
path: `${PIN_LINKS_PART_TYPEID}/:pid`,
|
|
1226
|
+
pathMatch: 'full',
|
|
1227
|
+
component: PinLinksPartFeatureComponent,
|
|
1228
|
+
canDeactivate: [PendingChangesGuard],
|
|
1229
|
+
},
|
|
1230
|
+
{
|
|
1231
|
+
path: `${TOKEN_TEXT_PART_TYPEID}/:pid`,
|
|
1232
|
+
pathMatch: 'full',
|
|
1233
|
+
component: TokenTextPartFeatureComponent,
|
|
1234
|
+
canDeactivate: [PendingChangesGuard],
|
|
1235
|
+
},
|
|
1236
|
+
{
|
|
1237
|
+
path: `${TILED_TEXT_PART_TYPEID}/:pid`,
|
|
1238
|
+
pathMatch: 'full',
|
|
1239
|
+
component: TiledTextPartFeatureComponent,
|
|
1240
|
+
canDeactivate: [PendingChangesGuard],
|
|
1241
|
+
},
|
|
1242
|
+
{
|
|
1243
|
+
path: 'it.vedph.token-text-layer/:pid',
|
|
1244
|
+
pathMatch: 'full',
|
|
1245
|
+
component: TokenTextLayerPartFeatureComponent,
|
|
1246
|
+
canDeactivate: [PendingChangesGuard],
|
|
1247
|
+
},
|
|
1248
|
+
{
|
|
1249
|
+
path: 'it.vedph.tiled-text-layer/:pid',
|
|
1250
|
+
pathMatch: 'full',
|
|
1251
|
+
component: TiledTextLayerPartFeatureComponent,
|
|
1252
|
+
canDeactivate: [PendingChangesGuard],
|
|
1253
|
+
},
|
|
1254
|
+
{
|
|
1255
|
+
path: `fragment/:pid/${COMMENT_FRAGMENT_TYPEID}/:loc`,
|
|
1256
|
+
pathMatch: 'full',
|
|
1257
|
+
component: CommentFragmentFeatureComponent,
|
|
1258
|
+
canDeactivate: [PendingChangesGuard],
|
|
1259
|
+
},
|
|
1260
|
+
{
|
|
1261
|
+
path: `fragment/:pid/${CHRONOLOGY_FRAGMENT_TYPEID}/:loc`,
|
|
1262
|
+
pathMatch: 'full',
|
|
1263
|
+
component: ChronologyFragmentFeatureComponent,
|
|
1264
|
+
canDeactivate: [PendingChangesGuard],
|
|
1265
|
+
},
|
|
1266
|
+
{
|
|
1267
|
+
path: `fragment/:pid/${PIN_LINKS_FRAGMENT_TYPEID}/:loc`,
|
|
1268
|
+
pathMatch: 'full',
|
|
1269
|
+
component: PinLinksFragmentFeatureComponent,
|
|
1270
|
+
canDeactivate: [PendingChangesGuard],
|
|
1271
|
+
},
|
|
1272
|
+
]);
|
|
1273
|
+
class CadmusPartGeneralPgModule {
|
|
1274
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: CadmusPartGeneralPgModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1275
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.1", ngImport: i0, type: CadmusPartGeneralPgModule, declarations: [BibliographyPartFeatureComponent,
|
|
1276
|
+
CategoriesPartFeatureComponent,
|
|
1277
|
+
ChronologyFragmentFeatureComponent,
|
|
1278
|
+
ChronotopesPartFeatureComponent,
|
|
1279
|
+
CommentFragmentFeatureComponent,
|
|
1280
|
+
CommentPartFeatureComponent,
|
|
1281
|
+
DocReferencesPartFeatureComponent,
|
|
1282
|
+
ExternalIdsPartFeatureComponent,
|
|
1283
|
+
HistoricalDatePartFeatureComponent,
|
|
1284
|
+
HistoricalEventsPartFeatureComponent,
|
|
1285
|
+
IndexKeywordsPartFeatureComponent,
|
|
1286
|
+
KeywordsPartFeatureComponent,
|
|
1287
|
+
MetadataPartFeatureComponent,
|
|
1288
|
+
NamesPartFeatureComponent,
|
|
1289
|
+
NotePartFeatureComponent,
|
|
1290
|
+
PinLinksFragmentFeatureComponent,
|
|
1291
|
+
PinLinksPartFeatureComponent,
|
|
1292
|
+
TiledTextLayerPartFeatureComponent,
|
|
1293
|
+
TiledTextPartFeatureComponent,
|
|
1294
|
+
TokenTextLayerPartFeatureComponent,
|
|
1295
|
+
TokenTextPartFeatureComponent], imports: [CommonModule,
|
|
1296
|
+
FormsModule,
|
|
1297
|
+
ReactiveFormsModule, i1.RouterModule,
|
|
1298
|
+
// material
|
|
1299
|
+
MatButtonModule,
|
|
1300
|
+
MatCheckboxModule,
|
|
1301
|
+
MatCardModule,
|
|
1302
|
+
MatExpansionModule,
|
|
1303
|
+
MatIconModule,
|
|
1304
|
+
MatInputModule,
|
|
1305
|
+
MatProgressBarModule,
|
|
1306
|
+
MatProgressSpinnerModule,
|
|
1307
|
+
MatSelectModule,
|
|
1308
|
+
MatTooltipModule,
|
|
1309
|
+
MatToolbarModule,
|
|
1310
|
+
// vendors
|
|
1311
|
+
NgToolsModule,
|
|
1312
|
+
NgMatToolsModule,
|
|
1313
|
+
// cadmus
|
|
1314
|
+
CadmusCoreModule,
|
|
1315
|
+
CadmusUiModule,
|
|
1316
|
+
CadmusPartGeneralUiModule,
|
|
1317
|
+
CadmusStateModule,
|
|
1318
|
+
CadmusUiPgModule], exports: [BibliographyPartFeatureComponent,
|
|
1319
|
+
CategoriesPartFeatureComponent,
|
|
1320
|
+
ChronologyFragmentFeatureComponent,
|
|
1321
|
+
ChronotopesPartFeatureComponent,
|
|
1322
|
+
CommentFragmentFeatureComponent,
|
|
1323
|
+
CommentPartFeatureComponent,
|
|
1324
|
+
DocReferencesPartFeatureComponent,
|
|
1325
|
+
ExternalIdsPartFeatureComponent,
|
|
1326
|
+
HistoricalDatePartFeatureComponent,
|
|
1327
|
+
HistoricalEventsPartFeatureComponent,
|
|
1328
|
+
IndexKeywordsPartFeatureComponent,
|
|
1329
|
+
KeywordsPartFeatureComponent,
|
|
1330
|
+
MetadataPartFeatureComponent,
|
|
1331
|
+
NamesPartFeatureComponent,
|
|
1332
|
+
NotePartFeatureComponent,
|
|
1333
|
+
PinLinksFragmentFeatureComponent,
|
|
1334
|
+
PinLinksPartFeatureComponent,
|
|
1335
|
+
TiledTextLayerPartFeatureComponent,
|
|
1336
|
+
TiledTextPartFeatureComponent,
|
|
1337
|
+
TokenTextLayerPartFeatureComponent,
|
|
1338
|
+
TokenTextPartFeatureComponent] }); }
|
|
1339
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: CadmusPartGeneralPgModule, imports: [CommonModule,
|
|
1340
|
+
FormsModule,
|
|
1341
|
+
ReactiveFormsModule,
|
|
1342
|
+
RouterModuleForChild,
|
|
1343
|
+
// material
|
|
1344
|
+
MatButtonModule,
|
|
1345
|
+
MatCheckboxModule,
|
|
1346
|
+
MatCardModule,
|
|
1347
|
+
MatExpansionModule,
|
|
1348
|
+
MatIconModule,
|
|
1349
|
+
MatInputModule,
|
|
1350
|
+
MatProgressBarModule,
|
|
1351
|
+
MatProgressSpinnerModule,
|
|
1352
|
+
MatSelectModule,
|
|
1353
|
+
MatTooltipModule,
|
|
1354
|
+
MatToolbarModule,
|
|
1355
|
+
// vendors
|
|
1356
|
+
NgToolsModule,
|
|
1357
|
+
NgMatToolsModule,
|
|
1358
|
+
// cadmus
|
|
1359
|
+
CadmusCoreModule,
|
|
1360
|
+
CadmusUiModule,
|
|
1361
|
+
CadmusPartGeneralUiModule,
|
|
1362
|
+
CadmusStateModule,
|
|
1363
|
+
CadmusUiPgModule] }); }
|
|
1364
|
+
}
|
|
1365
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: CadmusPartGeneralPgModule, decorators: [{
|
|
1366
|
+
type: NgModule,
|
|
1367
|
+
args: [{
|
|
1368
|
+
imports: [
|
|
1369
|
+
CommonModule,
|
|
1370
|
+
FormsModule,
|
|
1371
|
+
ReactiveFormsModule,
|
|
1372
|
+
RouterModuleForChild,
|
|
1373
|
+
// material
|
|
1374
|
+
MatButtonModule,
|
|
1375
|
+
MatCheckboxModule,
|
|
1376
|
+
MatCardModule,
|
|
1377
|
+
MatExpansionModule,
|
|
1378
|
+
MatIconModule,
|
|
1379
|
+
MatInputModule,
|
|
1380
|
+
MatProgressBarModule,
|
|
1381
|
+
MatProgressSpinnerModule,
|
|
1382
|
+
MatSelectModule,
|
|
1383
|
+
MatTooltipModule,
|
|
1384
|
+
MatToolbarModule,
|
|
1385
|
+
// vendors
|
|
1386
|
+
NgToolsModule,
|
|
1387
|
+
NgMatToolsModule,
|
|
1388
|
+
// cadmus
|
|
1389
|
+
CadmusCoreModule,
|
|
1390
|
+
CadmusUiModule,
|
|
1391
|
+
CadmusPartGeneralUiModule,
|
|
1392
|
+
CadmusStateModule,
|
|
1393
|
+
CadmusUiPgModule,
|
|
1394
|
+
],
|
|
1395
|
+
declarations: [
|
|
1396
|
+
BibliographyPartFeatureComponent,
|
|
1397
|
+
CategoriesPartFeatureComponent,
|
|
1398
|
+
ChronologyFragmentFeatureComponent,
|
|
1399
|
+
ChronotopesPartFeatureComponent,
|
|
1400
|
+
CommentFragmentFeatureComponent,
|
|
1401
|
+
CommentPartFeatureComponent,
|
|
1402
|
+
DocReferencesPartFeatureComponent,
|
|
1403
|
+
ExternalIdsPartFeatureComponent,
|
|
1404
|
+
HistoricalDatePartFeatureComponent,
|
|
1405
|
+
HistoricalEventsPartFeatureComponent,
|
|
1406
|
+
IndexKeywordsPartFeatureComponent,
|
|
1407
|
+
KeywordsPartFeatureComponent,
|
|
1408
|
+
MetadataPartFeatureComponent,
|
|
1409
|
+
NamesPartFeatureComponent,
|
|
1410
|
+
NotePartFeatureComponent,
|
|
1411
|
+
PinLinksFragmentFeatureComponent,
|
|
1412
|
+
PinLinksPartFeatureComponent,
|
|
1413
|
+
TiledTextLayerPartFeatureComponent,
|
|
1414
|
+
TiledTextPartFeatureComponent,
|
|
1415
|
+
TokenTextLayerPartFeatureComponent,
|
|
1416
|
+
TokenTextPartFeatureComponent,
|
|
1417
|
+
],
|
|
1418
|
+
exports: [
|
|
1419
|
+
BibliographyPartFeatureComponent,
|
|
1420
|
+
CategoriesPartFeatureComponent,
|
|
1421
|
+
ChronologyFragmentFeatureComponent,
|
|
1422
|
+
ChronotopesPartFeatureComponent,
|
|
1423
|
+
CommentFragmentFeatureComponent,
|
|
1424
|
+
CommentPartFeatureComponent,
|
|
1425
|
+
DocReferencesPartFeatureComponent,
|
|
1426
|
+
ExternalIdsPartFeatureComponent,
|
|
1427
|
+
HistoricalDatePartFeatureComponent,
|
|
1428
|
+
HistoricalEventsPartFeatureComponent,
|
|
1429
|
+
IndexKeywordsPartFeatureComponent,
|
|
1430
|
+
KeywordsPartFeatureComponent,
|
|
1431
|
+
MetadataPartFeatureComponent,
|
|
1432
|
+
NamesPartFeatureComponent,
|
|
1433
|
+
NotePartFeatureComponent,
|
|
1434
|
+
PinLinksFragmentFeatureComponent,
|
|
1435
|
+
PinLinksPartFeatureComponent,
|
|
1436
|
+
TiledTextLayerPartFeatureComponent,
|
|
1437
|
+
TiledTextPartFeatureComponent,
|
|
1438
|
+
TokenTextLayerPartFeatureComponent,
|
|
1439
|
+
TokenTextPartFeatureComponent,
|
|
1440
|
+
],
|
|
1441
|
+
}]
|
|
1442
1442
|
}] });
|
|
1443
1443
|
|
|
1444
|
-
/*
|
|
1445
|
-
* Public API Surface of cadmus-part-general-pg
|
|
1444
|
+
/*
|
|
1445
|
+
* Public API Surface of cadmus-part-general-pg
|
|
1446
1446
|
*/
|
|
1447
1447
|
|
|
1448
|
-
/**
|
|
1449
|
-
* Generated bundle index. Do not edit.
|
|
1448
|
+
/**
|
|
1449
|
+
* Generated bundle index. Do not edit.
|
|
1450
1450
|
*/
|
|
1451
1451
|
|
|
1452
1452
|
export { BibliographyPartFeatureComponent, CadmusPartGeneralPgModule, CategoriesPartFeatureComponent, ChronologyFragmentFeatureComponent, ChronotopesPartFeatureComponent, CommentFragmentFeatureComponent, CommentPartFeatureComponent, DocReferencesPartFeatureComponent, ExternalIdsPartFeatureComponent, HistoricalDatePartFeatureComponent, HistoricalEventsPartFeatureComponent, IndexKeywordsPartFeatureComponent, KeywordsPartFeatureComponent, MetadataPartFeatureComponent, NamesPartFeatureComponent, NotePartFeatureComponent, PinLinksFragmentFeatureComponent, PinLinksPartFeatureComponent, RouterModuleForChild, TiledTextLayerPartFeatureComponent, TiledTextPartFeatureComponent, TokenTextLayerPartFeatureComponent, TokenTextPartFeatureComponent };
|