@myrmidon/cadmus-part-general-pg 0.0.13 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/README.md +24 -24
  2. package/esm2020/lib/bibliography-part-feature/bibliography-part-feature.component.mjs +31 -0
  3. package/esm2020/lib/bibliography-part-feature/edit-bibliography-part.query.mjs +16 -0
  4. package/esm2020/lib/bibliography-part-feature/edit-bibliography-part.service.mjs +18 -0
  5. package/esm2020/lib/bibliography-part-feature/edit-bibliography-part.store.mjs +27 -0
  6. package/esm2020/lib/cadmus-part-general-pg.module.mjs +225 -0
  7. package/esm2020/lib/categories-part-feature/categories-part-feature.component.mjs +26 -0
  8. package/esm2020/lib/categories-part-feature/edit-categories-part.query.mjs +16 -0
  9. package/esm2020/lib/categories-part-feature/edit-categories-part.service.mjs +18 -0
  10. package/esm2020/lib/categories-part-feature/edit-categories-part.store.mjs +27 -0
  11. package/esm2020/lib/chronology-fragment-feature/chronology-fragment-feature.component.mjs +28 -0
  12. package/esm2020/lib/chronology-fragment-feature/edit-chronology-fragment.query.mjs +17 -0
  13. package/esm2020/lib/chronology-fragment-feature/edit-chronology-fragment.service.mjs +18 -0
  14. package/esm2020/lib/chronology-fragment-feature/edit-chronology-fragment.store.mjs +28 -0
  15. package/esm2020/lib/comment-fragment-feature/comment-fragment-feature.component.mjs +36 -0
  16. package/esm2020/lib/comment-fragment-feature/edit-comment-fragment.query.mjs +17 -0
  17. package/esm2020/lib/comment-fragment-feature/edit-comment-fragment.service.mjs +18 -0
  18. package/esm2020/lib/comment-fragment-feature/edit-comment-fragment.store.mjs +28 -0
  19. package/esm2020/lib/comment-part-feature/comment-part-feature.component.mjs +33 -0
  20. package/esm2020/lib/comment-part-feature/edit-comment-part.query.mjs +16 -0
  21. package/esm2020/lib/comment-part-feature/edit-comment-part.service.mjs +18 -0
  22. package/esm2020/lib/comment-part-feature/edit-comment-part.store.mjs +27 -0
  23. package/esm2020/lib/doc-references-part-feature/doc-references-part-feature.component.mjs +26 -0
  24. package/esm2020/lib/doc-references-part-feature/edit-doc-references-part.query.mjs +16 -0
  25. package/esm2020/lib/doc-references-part-feature/edit-doc-references-part.service.mjs +18 -0
  26. package/esm2020/lib/doc-references-part-feature/edit-doc-references-part.store.mjs +27 -0
  27. package/esm2020/lib/historical-date-part-feature/edit-historical-date-part.query.mjs +16 -0
  28. package/esm2020/lib/historical-date-part-feature/edit-historical-date-part.service.mjs +18 -0
  29. package/esm2020/lib/historical-date-part-feature/edit-historical-date-part.store.mjs +27 -0
  30. package/esm2020/lib/historical-date-part-feature/historical-date-part-feature.component.mjs +26 -0
  31. package/esm2020/lib/index-keywords-part-feature/edit-index-keywords-part.query.mjs +16 -0
  32. package/esm2020/lib/index-keywords-part-feature/edit-index-keywords-part.service.mjs +18 -0
  33. package/esm2020/lib/index-keywords-part-feature/edit-index-keywords-part.store.mjs +27 -0
  34. package/esm2020/lib/index-keywords-part-feature/index-keywords-part-feature.component.mjs +26 -0
  35. package/esm2020/lib/keywords-part-feature/edit-keywords-part.query.mjs +16 -0
  36. package/esm2020/lib/keywords-part-feature/edit-keywords-part.service.mjs +18 -0
  37. package/esm2020/lib/keywords-part-feature/edit-keywords-part.store.mjs +27 -0
  38. package/esm2020/lib/keywords-part-feature/keywords-part-feature.component.mjs +26 -0
  39. package/esm2020/lib/note-part-feature/edit-note-part.query.mjs +16 -0
  40. package/esm2020/lib/note-part-feature/edit-note-part.service.mjs +18 -0
  41. package/esm2020/lib/note-part-feature/edit-note-part.store.mjs +27 -0
  42. package/esm2020/lib/note-part-feature/note-part-feature.component.mjs +26 -0
  43. package/esm2020/lib/tiled-text-layer-part-feature/tiled-text-layer-part-feature.component.mjs +248 -0
  44. package/esm2020/lib/tiled-text-layer-part-feature/tiled-text-layer-view.mjs +380 -0
  45. package/esm2020/lib/tiled-text-part-feature/edit-tiled-text-part.query.mjs +16 -0
  46. package/esm2020/lib/tiled-text-part-feature/edit-tiled-text-part.service.mjs +36 -0
  47. package/esm2020/lib/tiled-text-part-feature/edit-tiled-text-part.store.mjs +27 -0
  48. package/esm2020/lib/tiled-text-part-feature/tiled-text-part-feature.component.mjs +26 -0
  49. package/esm2020/lib/token-text-layer-part-feature/token-text-layer-part-feature.component.mjs +200 -0
  50. package/esm2020/lib/token-text-part-feature/edit-token-text-part.query.mjs +16 -0
  51. package/esm2020/lib/token-text-part-feature/edit-token-text-part.service.mjs +18 -0
  52. package/esm2020/lib/token-text-part-feature/edit-token-text-part.store.mjs +27 -0
  53. package/esm2020/lib/token-text-part-feature/token-text-part-feature.component.mjs +26 -0
  54. package/esm2020/myrmidon-cadmus-part-general-pg.mjs +5 -0
  55. package/esm2020/public-api.mjs +19 -0
  56. package/fesm2015/myrmidon-cadmus-part-general-pg.mjs +1804 -0
  57. package/fesm2015/myrmidon-cadmus-part-general-pg.mjs.map +1 -0
  58. package/fesm2020/myrmidon-cadmus-part-general-pg.mjs +1798 -0
  59. package/fesm2020/myrmidon-cadmus-part-general-pg.mjs.map +1 -0
  60. package/lib/bibliography-part-feature/bibliography-part-feature.component.d.ts +3 -0
  61. package/lib/bibliography-part-feature/edit-bibliography-part.query.d.ts +3 -0
  62. package/lib/bibliography-part-feature/edit-bibliography-part.service.d.ts +3 -0
  63. package/lib/bibliography-part-feature/edit-bibliography-part.store.d.ts +3 -0
  64. package/lib/cadmus-part-general-pg.module.d.ts +29 -0
  65. package/lib/categories-part-feature/categories-part-feature.component.d.ts +3 -0
  66. package/lib/categories-part-feature/edit-categories-part.query.d.ts +3 -0
  67. package/lib/categories-part-feature/edit-categories-part.service.d.ts +3 -0
  68. package/lib/categories-part-feature/edit-categories-part.store.d.ts +3 -0
  69. package/lib/chronology-fragment-feature/chronology-fragment-feature.component.d.ts +6 -3
  70. package/lib/chronology-fragment-feature/edit-chronology-fragment.query.d.ts +3 -0
  71. package/lib/chronology-fragment-feature/edit-chronology-fragment.service.d.ts +3 -0
  72. package/lib/chronology-fragment-feature/edit-chronology-fragment.store.d.ts +3 -0
  73. package/lib/comment-fragment-feature/comment-fragment-feature.component.d.ts +6 -3
  74. package/lib/comment-fragment-feature/edit-comment-fragment.query.d.ts +3 -0
  75. package/lib/comment-fragment-feature/edit-comment-fragment.service.d.ts +3 -0
  76. package/lib/comment-fragment-feature/edit-comment-fragment.store.d.ts +3 -0
  77. package/lib/comment-part-feature/comment-part-feature.component.d.ts +4 -1
  78. package/lib/comment-part-feature/edit-comment-part.query.d.ts +3 -0
  79. package/lib/comment-part-feature/edit-comment-part.service.d.ts +3 -0
  80. package/lib/comment-part-feature/edit-comment-part.store.d.ts +3 -0
  81. package/lib/doc-references-part-feature/doc-references-part-feature.component.d.ts +4 -1
  82. package/lib/doc-references-part-feature/edit-doc-references-part.query.d.ts +3 -0
  83. package/lib/doc-references-part-feature/edit-doc-references-part.service.d.ts +3 -0
  84. package/lib/doc-references-part-feature/edit-doc-references-part.store.d.ts +3 -0
  85. package/lib/historical-date-part-feature/edit-historical-date-part.query.d.ts +3 -0
  86. package/lib/historical-date-part-feature/edit-historical-date-part.service.d.ts +3 -0
  87. package/lib/historical-date-part-feature/edit-historical-date-part.store.d.ts +3 -0
  88. package/lib/historical-date-part-feature/historical-date-part-feature.component.d.ts +5 -2
  89. package/lib/index-keywords-part-feature/edit-index-keywords-part.query.d.ts +3 -0
  90. package/lib/index-keywords-part-feature/edit-index-keywords-part.service.d.ts +3 -0
  91. package/lib/index-keywords-part-feature/edit-index-keywords-part.store.d.ts +3 -0
  92. package/lib/index-keywords-part-feature/index-keywords-part-feature.component.d.ts +5 -2
  93. package/lib/keywords-part-feature/edit-keywords-part.query.d.ts +3 -0
  94. package/lib/keywords-part-feature/edit-keywords-part.service.d.ts +3 -0
  95. package/lib/keywords-part-feature/edit-keywords-part.store.d.ts +3 -0
  96. package/lib/keywords-part-feature/keywords-part-feature.component.d.ts +5 -2
  97. package/lib/note-part-feature/edit-note-part.query.d.ts +3 -0
  98. package/lib/note-part-feature/edit-note-part.service.d.ts +3 -0
  99. package/lib/note-part-feature/edit-note-part.store.d.ts +3 -0
  100. package/lib/note-part-feature/note-part-feature.component.d.ts +5 -2
  101. package/lib/tiled-text-layer-part-feature/tiled-text-layer-part-feature.component.d.ts +18 -15
  102. package/lib/tiled-text-part-feature/edit-tiled-text-part.query.d.ts +3 -0
  103. package/lib/tiled-text-part-feature/edit-tiled-text-part.service.d.ts +5 -2
  104. package/lib/tiled-text-part-feature/edit-tiled-text-part.store.d.ts +3 -0
  105. package/lib/tiled-text-part-feature/tiled-text-part-feature.component.d.ts +5 -2
  106. package/lib/token-text-layer-part-feature/token-text-layer-part-feature.component.d.ts +15 -12
  107. package/lib/token-text-part-feature/edit-token-text-part.query.d.ts +3 -0
  108. package/lib/token-text-part-feature/edit-token-text-part.service.d.ts +3 -0
  109. package/lib/token-text-part-feature/edit-token-text-part.store.d.ts +3 -0
  110. package/lib/token-text-part-feature/token-text-part-feature.component.d.ts +4 -1
  111. package/myrmidon-cadmus-part-general-pg.d.ts +1 -38
  112. package/package.json +27 -15
  113. package/public-api.d.ts +2 -0
  114. package/bundles/myrmidon-cadmus-part-general-pg.umd.js +0 -2342
  115. package/bundles/myrmidon-cadmus-part-general-pg.umd.js.map +0 -1
  116. package/esm2015/lib/bibliography-part-feature/bibliography-part-feature.component.js +0 -36
  117. package/esm2015/lib/bibliography-part-feature/edit-bibliography-part.query.js +0 -18
  118. package/esm2015/lib/bibliography-part-feature/edit-bibliography-part.service.js +0 -23
  119. package/esm2015/lib/bibliography-part-feature/edit-bibliography-part.store.js +0 -27
  120. package/esm2015/lib/cadmus-part-general-pg.module.js +0 -164
  121. package/esm2015/lib/categories-part-feature/categories-part-feature.component.js +0 -31
  122. package/esm2015/lib/categories-part-feature/edit-categories-part.query.js +0 -18
  123. package/esm2015/lib/categories-part-feature/edit-categories-part.service.js +0 -23
  124. package/esm2015/lib/categories-part-feature/edit-categories-part.store.js +0 -27
  125. package/esm2015/lib/chronology-fragment-feature/chronology-fragment-feature.component.js +0 -35
  126. package/esm2015/lib/chronology-fragment-feature/edit-chronology-fragment.query.js +0 -19
  127. package/esm2015/lib/chronology-fragment-feature/edit-chronology-fragment.service.js +0 -23
  128. package/esm2015/lib/chronology-fragment-feature/edit-chronology-fragment.store.js +0 -27
  129. package/esm2015/lib/comment-fragment-feature/comment-fragment-feature.component.js +0 -42
  130. package/esm2015/lib/comment-fragment-feature/edit-comment-fragment.query.js +0 -19
  131. package/esm2015/lib/comment-fragment-feature/edit-comment-fragment.service.js +0 -23
  132. package/esm2015/lib/comment-fragment-feature/edit-comment-fragment.store.js +0 -27
  133. package/esm2015/lib/comment-part-feature/comment-part-feature.component.js +0 -38
  134. package/esm2015/lib/comment-part-feature/edit-comment-part.query.js +0 -18
  135. package/esm2015/lib/comment-part-feature/edit-comment-part.service.js +0 -23
  136. package/esm2015/lib/comment-part-feature/edit-comment-part.store.js +0 -27
  137. package/esm2015/lib/doc-references-part-feature/doc-references-part-feature.component.js +0 -31
  138. package/esm2015/lib/doc-references-part-feature/edit-doc-references-part.query.js +0 -18
  139. package/esm2015/lib/doc-references-part-feature/edit-doc-references-part.service.js +0 -23
  140. package/esm2015/lib/doc-references-part-feature/edit-doc-references-part.store.js +0 -27
  141. package/esm2015/lib/historical-date-part-feature/edit-historical-date-part.query.js +0 -18
  142. package/esm2015/lib/historical-date-part-feature/edit-historical-date-part.service.js +0 -23
  143. package/esm2015/lib/historical-date-part-feature/edit-historical-date-part.store.js +0 -27
  144. package/esm2015/lib/historical-date-part-feature/historical-date-part-feature.component.js +0 -31
  145. package/esm2015/lib/index-keywords-part-feature/edit-index-keywords-part.query.js +0 -18
  146. package/esm2015/lib/index-keywords-part-feature/edit-index-keywords-part.service.js +0 -23
  147. package/esm2015/lib/index-keywords-part-feature/edit-index-keywords-part.store.js +0 -27
  148. package/esm2015/lib/index-keywords-part-feature/index-keywords-part-feature.component.js +0 -31
  149. package/esm2015/lib/keywords-part-feature/edit-keywords-part.query.js +0 -18
  150. package/esm2015/lib/keywords-part-feature/edit-keywords-part.service.js +0 -23
  151. package/esm2015/lib/keywords-part-feature/edit-keywords-part.store.js +0 -27
  152. package/esm2015/lib/keywords-part-feature/keywords-part-feature.component.js +0 -31
  153. package/esm2015/lib/note-part-feature/edit-note-part.query.js +0 -18
  154. package/esm2015/lib/note-part-feature/edit-note-part.service.js +0 -23
  155. package/esm2015/lib/note-part-feature/edit-note-part.store.js +0 -27
  156. package/esm2015/lib/note-part-feature/note-part-feature.component.js +0 -31
  157. package/esm2015/lib/tiled-text-layer-part-feature/tiled-text-layer-part-feature.component.js +0 -213
  158. package/esm2015/lib/tiled-text-layer-part-feature/tiled-text-layer-view.js +0 -380
  159. package/esm2015/lib/tiled-text-part-feature/edit-tiled-text-part.query.js +0 -18
  160. package/esm2015/lib/tiled-text-part-feature/edit-tiled-text-part.service.js +0 -41
  161. package/esm2015/lib/tiled-text-part-feature/edit-tiled-text-part.store.js +0 -27
  162. package/esm2015/lib/tiled-text-part-feature/tiled-text-part-feature.component.js +0 -31
  163. package/esm2015/lib/token-text-layer-part-feature/token-text-layer-part-feature.component.js +0 -171
  164. package/esm2015/lib/token-text-part-feature/edit-token-text-part.query.js +0 -18
  165. package/esm2015/lib/token-text-part-feature/edit-token-text-part.service.js +0 -23
  166. package/esm2015/lib/token-text-part-feature/edit-token-text-part.store.js +0 -27
  167. package/esm2015/lib/token-text-part-feature/token-text-part-feature.component.js +0 -31
  168. package/esm2015/myrmidon-cadmus-part-general-pg.js +0 -43
  169. package/esm2015/public-api.js +0 -17
  170. package/fesm2015/myrmidon-cadmus-part-general-pg.js +0 -1849
  171. package/fesm2015/myrmidon-cadmus-part-general-pg.js.map +0 -1
  172. package/myrmidon-cadmus-part-general-pg.metadata.json +0 -1
@@ -0,0 +1,1798 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, Component, NgModule } from '@angular/core';
3
+ import * as i5 from '@myrmidon/cadmus-state';
4
+ import { EditPartQueryBase, EditPartServiceBase, EditPartFeatureBase, editFragmentInitialState, EditFragmentQueryBase, EditFragmentServiceBase, EditFragmentFeatureBase, CadmusStateModule } from '@myrmidon/cadmus-state';
5
+ import * as i1 from '@angular/router';
6
+ import { RouterModule } from '@angular/router';
7
+ import * as i2$1 from '@angular/material/snack-bar';
8
+ import { __decorate } from 'tslib';
9
+ import { Store, StoreConfig } from '@datorama/akita';
10
+ import * as i7 from '@myrmidon/cadmus-part-general-ui';
11
+ import { BIBLIOGRAPHY_PART_TYPEID, CATEGORIES_PART_TYPEID, CHRONOLOGY_FRAGMENT_TYPEID, COMMENT_FRAGMENT_TYPEID, COMMENT_PART_TYPEID, DOC_REFERENCES_PART_TYPEID, HISTORICAL_DATE_PART_TYPEID, INDEX_KEYWORDS_PART_TYPEID, KEYWORDS_PART_TYPEID, NOTE_PART_TYPEID, TILED_TEXT_PART_TYPEID, TOKEN_TEXT_PART_TYPEID, CadmusPartGeneralUiModule } from '@myrmidon/cadmus-part-general-ui';
12
+ import * as i2 from '@myrmidon/cadmus-api';
13
+ import * as i6 from '@myrmidon/cadmus-ui-pg';
14
+ import { CadmusUiPgModule } from '@myrmidon/cadmus-ui-pg';
15
+ import * as i8 from '@angular/common';
16
+ import { CommonModule } from '@angular/common';
17
+ import * as i3 from '@myrmidon/cadmus-core';
18
+ import { TokenLocation, TokenPoint, PendingChangesGuard, CadmusCoreModule } from '@myrmidon/cadmus-core';
19
+ import * as i8$1 from '@myrmidon/cadmus-ui';
20
+ import { CadmusUiModule } from '@myrmidon/cadmus-ui';
21
+ import * as i4 from '@myrmidon/ng-mat-tools';
22
+ import { NgMatToolsModule } from '@myrmidon/ng-mat-tools';
23
+ import * as i7$1 from '@angular/material/card';
24
+ import * as i8$2 from '@angular/material/icon';
25
+ import * as i9 from '@angular/material/button';
26
+ import * as i10 from '@angular/material/toolbar';
27
+ import * as i11 from '@angular/material/progress-spinner';
28
+ import * as i13 from '@angular/material/expansion';
29
+ import * as i16 from '@angular/material/tooltip';
30
+ import * as i17 from '@angular/flex-layout/flex';
31
+ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
32
+ import { CadmusMaterialModule } from '@myrmidon/cadmus-material';
33
+ import { NgToolsModule } from '@myrmidon/ng-tools';
34
+
35
+ let EditBibliographyPartStore = class EditBibliographyPartStore extends Store {
36
+ constructor() {
37
+ super({});
38
+ }
39
+ setDirty(value) {
40
+ this.update({ dirty: value });
41
+ }
42
+ setSaving(value) {
43
+ this.update({ saving: value });
44
+ }
45
+ };
46
+ EditBibliographyPartStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditBibliographyPartStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
47
+ EditBibliographyPartStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditBibliographyPartStore, providedIn: 'root' });
48
+ EditBibliographyPartStore = __decorate([
49
+ StoreConfig({ name: BIBLIOGRAPHY_PART_TYPEID })
50
+ ], EditBibliographyPartStore);
51
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditBibliographyPartStore, decorators: [{
52
+ type: Injectable,
53
+ args: [{ providedIn: 'root' }]
54
+ }], ctorParameters: function () { return []; } });
55
+
56
+ class EditBibliographyPartQuery extends EditPartQueryBase {
57
+ constructor(store) {
58
+ super(store);
59
+ }
60
+ }
61
+ EditBibliographyPartQuery.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditBibliographyPartQuery, deps: [{ token: EditBibliographyPartStore }], target: i0.ɵɵFactoryTarget.Injectable });
62
+ EditBibliographyPartQuery.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditBibliographyPartQuery, providedIn: 'root' });
63
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditBibliographyPartQuery, decorators: [{
64
+ type: Injectable,
65
+ args: [{ providedIn: 'root' }]
66
+ }], ctorParameters: function () { return [{ type: EditBibliographyPartStore }]; } });
67
+
68
+ class EditBibliographyPartService extends EditPartServiceBase {
69
+ constructor(editPartStore, itemService, thesaurusService) {
70
+ super(itemService, thesaurusService);
71
+ this.store = editPartStore;
72
+ }
73
+ }
74
+ EditBibliographyPartService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditBibliographyPartService, deps: [{ token: EditBibliographyPartStore }, { token: i2.ItemService }, { token: i2.ThesaurusService }], target: i0.ɵɵFactoryTarget.Injectable });
75
+ EditBibliographyPartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditBibliographyPartService, providedIn: 'root' });
76
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditBibliographyPartService, decorators: [{
77
+ type: Injectable,
78
+ args: [{ providedIn: 'root' }]
79
+ }], ctorParameters: function () { return [{ type: EditBibliographyPartStore }, { type: i2.ItemService }, { type: i2.ThesaurusService }]; } });
80
+
81
+ class BibliographyPartFeatureComponent extends EditPartFeatureBase {
82
+ constructor(router, route, snackbar, editPartQuery, editPartService, editItemQuery, editItemService) {
83
+ super(router, route, snackbar, editPartQuery, editPartService, editItemQuery, editItemService);
84
+ }
85
+ ngOnInit() {
86
+ this.initEditor([
87
+ 'bibliography-languages',
88
+ 'bibliography-types',
89
+ 'bibliography-tags',
90
+ 'bibliography-author-roles',
91
+ ]);
92
+ }
93
+ }
94
+ BibliographyPartFeatureComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: BibliographyPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2$1.MatSnackBar }, { token: EditBibliographyPartQuery }, { token: EditBibliographyPartService }, { token: i5.EditItemQuery }, { token: i5.EditItemService }], target: i0.ɵɵFactoryTarget.Component });
95
+ BibliographyPartFeatureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.2", 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 [itemId]=\"itemId\"\r\n [roleId]=\"roleId\"\r\n [model]=\"part$ | async\"\r\n (modelChange)=\"save($event)\"\r\n [thesauri]=\"thesauri$ | async\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-bibliography-part>\r\n", styles: [""], components: [{ type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { type: i7.BibliographyPartComponent, selector: "cadmus-bibliography-part" }], pipes: { "async": i8.AsyncPipe } });
96
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: BibliographyPartFeatureComponent, decorators: [{
97
+ type: Component,
98
+ args: [{ selector: 'cadmus-bibliography-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-bibliography-part\r\n [itemId]=\"itemId\"\r\n [roleId]=\"roleId\"\r\n [model]=\"part$ | async\"\r\n (modelChange)=\"save($event)\"\r\n [thesauri]=\"thesauri$ | async\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-bibliography-part>\r\n", styles: [""] }]
99
+ }], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2$1.MatSnackBar }, { type: EditBibliographyPartQuery }, { type: EditBibliographyPartService }, { type: i5.EditItemQuery }, { type: i5.EditItemService }]; } });
100
+
101
+ let EditCategoriesPartStore = class EditCategoriesPartStore extends Store {
102
+ constructor() {
103
+ super({});
104
+ }
105
+ setDirty(value) {
106
+ this.update({ dirty: value });
107
+ }
108
+ setSaving(value) {
109
+ this.update({ saving: value });
110
+ }
111
+ };
112
+ EditCategoriesPartStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditCategoriesPartStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
113
+ EditCategoriesPartStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditCategoriesPartStore, providedIn: 'root' });
114
+ EditCategoriesPartStore = __decorate([
115
+ StoreConfig({ name: CATEGORIES_PART_TYPEID })
116
+ ], EditCategoriesPartStore);
117
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditCategoriesPartStore, decorators: [{
118
+ type: Injectable,
119
+ args: [{ providedIn: 'root' }]
120
+ }], ctorParameters: function () { return []; } });
121
+
122
+ class EditCategoriesPartQuery extends EditPartQueryBase {
123
+ constructor(store) {
124
+ super(store);
125
+ }
126
+ }
127
+ EditCategoriesPartQuery.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditCategoriesPartQuery, deps: [{ token: EditCategoriesPartStore }], target: i0.ɵɵFactoryTarget.Injectable });
128
+ EditCategoriesPartQuery.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditCategoriesPartQuery, providedIn: 'root' });
129
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditCategoriesPartQuery, decorators: [{
130
+ type: Injectable,
131
+ args: [{ providedIn: 'root' }]
132
+ }], ctorParameters: function () { return [{ type: EditCategoriesPartStore }]; } });
133
+
134
+ class EditCategoriesPartService extends EditPartServiceBase {
135
+ constructor(editPartStore, itemService, thesaurusService) {
136
+ super(itemService, thesaurusService);
137
+ this.store = editPartStore;
138
+ }
139
+ }
140
+ EditCategoriesPartService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditCategoriesPartService, deps: [{ token: EditCategoriesPartStore }, { token: i2.ItemService }, { token: i2.ThesaurusService }], target: i0.ɵɵFactoryTarget.Injectable });
141
+ EditCategoriesPartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditCategoriesPartService, providedIn: 'root' });
142
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditCategoriesPartService, decorators: [{
143
+ type: Injectable,
144
+ args: [{ providedIn: 'root' }]
145
+ }], ctorParameters: function () { return [{ type: EditCategoriesPartStore }, { type: i2.ItemService }, { type: i2.ThesaurusService }]; } });
146
+
147
+ class CategoriesPartFeatureComponent extends EditPartFeatureBase {
148
+ constructor(router, route, snackbar, editPartQuery, editPartService, editItemQuery, editItemService) {
149
+ super(router, route, snackbar, editPartQuery, editPartService, editItemQuery, editItemService);
150
+ }
151
+ ngOnInit() {
152
+ this.initEditor(['categories']);
153
+ }
154
+ }
155
+ CategoriesPartFeatureComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: CategoriesPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2$1.MatSnackBar }, { token: EditCategoriesPartQuery }, { token: EditCategoriesPartService }, { token: i5.EditItemQuery }, { token: i5.EditItemService }], target: i0.ɵɵFactoryTarget.Component });
156
+ CategoriesPartFeatureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.2", 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 [itemId]=\"itemId\"\r\n [roleId]=\"roleId\"\r\n [model]=\"part$ | async\"\r\n (modelChange)=\"save($event)\"\r\n [thesauri]=\"thesauri$ | async\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-categories-part>\r\n", styles: [""], components: [{ type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { type: i7.CategoriesPartComponent, selector: "cadmus-categories-part" }], pipes: { "async": i8.AsyncPipe } });
157
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: CategoriesPartFeatureComponent, decorators: [{
158
+ type: Component,
159
+ args: [{ selector: 'cadmus-categories-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-categories-part\r\n [itemId]=\"itemId\"\r\n [roleId]=\"roleId\"\r\n [model]=\"part$ | async\"\r\n (modelChange)=\"save($event)\"\r\n [thesauri]=\"thesauri$ | async\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-categories-part>\r\n", styles: [""] }]
160
+ }], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2$1.MatSnackBar }, { type: EditCategoriesPartQuery }, { type: EditCategoriesPartService }, { type: i5.EditItemQuery }, { type: i5.EditItemService }]; } });
161
+
162
+ let EditChronologyFragmentStore = class EditChronologyFragmentStore extends Store {
163
+ constructor() {
164
+ super(editFragmentInitialState);
165
+ }
166
+ setDirty(value) {
167
+ this.update({ dirty: value });
168
+ }
169
+ setSaving(value) {
170
+ this.update({ saving: value });
171
+ }
172
+ };
173
+ EditChronologyFragmentStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditChronologyFragmentStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
174
+ EditChronologyFragmentStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditChronologyFragmentStore, providedIn: 'root' });
175
+ EditChronologyFragmentStore = __decorate([
176
+ StoreConfig({ name: CHRONOLOGY_FRAGMENT_TYPEID })
177
+ ], EditChronologyFragmentStore);
178
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditChronologyFragmentStore, decorators: [{
179
+ type: Injectable,
180
+ args: [{ providedIn: 'root' }]
181
+ }], ctorParameters: function () { return []; } });
182
+
183
+ class EditChronologyFragmentQuery extends EditFragmentQueryBase {
184
+ constructor(store) {
185
+ super(store);
186
+ this.store = store;
187
+ }
188
+ }
189
+ EditChronologyFragmentQuery.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditChronologyFragmentQuery, deps: [{ token: EditChronologyFragmentStore }], target: i0.ɵɵFactoryTarget.Injectable });
190
+ EditChronologyFragmentQuery.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditChronologyFragmentQuery, providedIn: 'root' });
191
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditChronologyFragmentQuery, decorators: [{
192
+ type: Injectable,
193
+ args: [{ providedIn: 'root' }]
194
+ }], ctorParameters: function () { return [{ type: EditChronologyFragmentStore }]; } });
195
+
196
+ class EditChronologyFragmentService extends EditFragmentServiceBase {
197
+ constructor(editPartStore, itemService, thesaurusService) {
198
+ super(itemService, thesaurusService);
199
+ this.store = editPartStore;
200
+ }
201
+ }
202
+ EditChronologyFragmentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditChronologyFragmentService, deps: [{ token: EditChronologyFragmentStore }, { token: i2.ItemService }, { token: i2.ThesaurusService }], target: i0.ɵɵFactoryTarget.Injectable });
203
+ EditChronologyFragmentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditChronologyFragmentService, providedIn: 'root' });
204
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditChronologyFragmentService, decorators: [{
205
+ type: Injectable,
206
+ args: [{ providedIn: 'root' }]
207
+ }], ctorParameters: function () { return [{ type: EditChronologyFragmentStore }, { type: i2.ItemService }, { type: i2.ThesaurusService }]; } });
208
+
209
+ class ChronologyFragmentFeatureComponent extends EditFragmentFeatureBase {
210
+ constructor(router, route, snackbar, editFrQuery, editFrService, editItemQuery, editItemService, editLayersQuery, editLayersService, libraryRouteService) {
211
+ super(router, route, snackbar, editFrQuery, editFrService, editItemQuery, editItemService, editLayersQuery, editLayersService, libraryRouteService);
212
+ }
213
+ ngOnInit() {
214
+ this.initEditor(['chronology-tags']);
215
+ }
216
+ }
217
+ ChronologyFragmentFeatureComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: ChronologyFragmentFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2$1.MatSnackBar }, { token: EditChronologyFragmentQuery }, { token: EditChronologyFragmentService }, { token: i5.EditItemQuery }, { token: i5.EditItemService }, { token: i5.EditLayerPartQuery }, { token: i5.EditLayerPartService }, { token: i3.LibraryRouteService }], target: i0.ɵɵFactoryTarget.Component });
218
+ ChronologyFragmentFeatureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.2", 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]=\"baseText$ | async\"\r\n [locations]=\"[frLoc]\"\r\n ></cadmus-decorated-token-text>\r\n</div>\r\n<cadmus-chronology-fragment\r\n [model]=\"fragment$ | async\"\r\n (modelChange)=\"save($event)\"\r\n [thesauri]=\"thesauri$ | async\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-chronology-fragment>\r\n", styles: [""], components: [{ type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { type: i8$1.DecoratedTokenTextComponent, selector: "cadmus-decorated-token-text", inputs: ["baseText", "locations", "selectedLocation"] }, { type: i7.ChronologyFragmentComponent, selector: "cadmus-chronology-fragment" }], pipes: { "async": i8.AsyncPipe } });
219
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: ChronologyFragmentFeatureComponent, decorators: [{
220
+ type: Component,
221
+ 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]=\"baseText$ | async\"\r\n [locations]=\"[frLoc]\"\r\n ></cadmus-decorated-token-text>\r\n</div>\r\n<cadmus-chronology-fragment\r\n [model]=\"fragment$ | async\"\r\n (modelChange)=\"save($event)\"\r\n [thesauri]=\"thesauri$ | async\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-chronology-fragment>\r\n", styles: [""] }]
222
+ }], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2$1.MatSnackBar }, { type: EditChronologyFragmentQuery }, { type: EditChronologyFragmentService }, { type: i5.EditItemQuery }, { type: i5.EditItemService }, { type: i5.EditLayerPartQuery }, { type: i5.EditLayerPartService }, { type: i3.LibraryRouteService }]; } });
223
+
224
+ let EditCommentFragmentStore = class EditCommentFragmentStore extends Store {
225
+ constructor() {
226
+ super(editFragmentInitialState);
227
+ }
228
+ setDirty(value) {
229
+ this.update({ dirty: value });
230
+ }
231
+ setSaving(value) {
232
+ this.update({ saving: value });
233
+ }
234
+ };
235
+ EditCommentFragmentStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditCommentFragmentStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
236
+ EditCommentFragmentStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditCommentFragmentStore, providedIn: 'root' });
237
+ EditCommentFragmentStore = __decorate([
238
+ StoreConfig({ name: COMMENT_FRAGMENT_TYPEID })
239
+ ], EditCommentFragmentStore);
240
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditCommentFragmentStore, decorators: [{
241
+ type: Injectable,
242
+ args: [{ providedIn: 'root' }]
243
+ }], ctorParameters: function () { return []; } });
244
+
245
+ class EditCommentFragmentQuery extends EditFragmentQueryBase {
246
+ constructor(store) {
247
+ super(store);
248
+ this.store = store;
249
+ }
250
+ }
251
+ EditCommentFragmentQuery.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditCommentFragmentQuery, deps: [{ token: EditCommentFragmentStore }], target: i0.ɵɵFactoryTarget.Injectable });
252
+ EditCommentFragmentQuery.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditCommentFragmentQuery, providedIn: 'root' });
253
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditCommentFragmentQuery, decorators: [{
254
+ type: Injectable,
255
+ args: [{ providedIn: 'root' }]
256
+ }], ctorParameters: function () { return [{ type: EditCommentFragmentStore }]; } });
257
+
258
+ class EditCommentFragmentService extends EditFragmentServiceBase {
259
+ constructor(editPartStore, itemService, thesaurusService) {
260
+ super(itemService, thesaurusService);
261
+ this.store = editPartStore;
262
+ }
263
+ }
264
+ EditCommentFragmentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditCommentFragmentService, deps: [{ token: EditCommentFragmentStore }, { token: i2.ItemService }, { token: i2.ThesaurusService }], target: i0.ɵɵFactoryTarget.Injectable });
265
+ EditCommentFragmentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditCommentFragmentService, providedIn: 'root' });
266
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditCommentFragmentService, decorators: [{
267
+ type: Injectable,
268
+ args: [{ providedIn: 'root' }]
269
+ }], ctorParameters: function () { return [{ type: EditCommentFragmentStore }, { type: i2.ItemService }, { type: i2.ThesaurusService }]; } });
270
+
271
+ class CommentFragmentFeatureComponent extends EditFragmentFeatureBase {
272
+ constructor(router, route, snackbar, editFrQuery, editFrService, editItemQuery, editItemService, editLayersQuery, editLayersService, libraryRouteService) {
273
+ super(router, route, snackbar, editFrQuery, editFrService, editItemQuery, editItemService, editLayersQuery, editLayersService, libraryRouteService);
274
+ }
275
+ ngOnInit() {
276
+ this.initEditor([
277
+ 'comment-tags',
278
+ 'doc-reference-tags',
279
+ 'doc-reference-types',
280
+ 'categories',
281
+ 'languages',
282
+ 'keyword-indexes',
283
+ 'keyword-tags',
284
+ ]);
285
+ }
286
+ }
287
+ CommentFragmentFeatureComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: CommentFragmentFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2$1.MatSnackBar }, { token: EditCommentFragmentQuery }, { token: EditCommentFragmentService }, { token: i5.EditItemQuery }, { token: i5.EditItemService }, { token: i5.EditLayerPartQuery }, { token: i5.EditLayerPartService }, { token: i3.LibraryRouteService }], target: i0.ɵɵFactoryTarget.Component });
288
+ CommentFragmentFeatureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.2", 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]=\"baseText$ | async\"\r\n [locations]=\"[frLoc]\"\r\n ></cadmus-decorated-token-text>\r\n</div>\r\n<cadmus-comment-editor\r\n [model]=\"fragment$ | async\"\r\n (modelChange)=\"save($event)\"\r\n [thesauri]=\"thesauri$ | async\"\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"], components: [{ type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { type: i8$1.DecoratedTokenTextComponent, selector: "cadmus-decorated-token-text", inputs: ["baseText", "locations", "selectedLocation"] }, { type: i7.CommentEditorComponent, selector: "cadmus-comment-editor" }], pipes: { "async": i8.AsyncPipe } });
289
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: CommentFragmentFeatureComponent, decorators: [{
290
+ type: Component,
291
+ 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]=\"baseText$ | async\"\r\n [locations]=\"[frLoc]\"\r\n ></cadmus-decorated-token-text>\r\n</div>\r\n<cadmus-comment-editor\r\n [model]=\"fragment$ | async\"\r\n (modelChange)=\"save($event)\"\r\n [thesauri]=\"thesauri$ | async\"\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"] }]
292
+ }], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2$1.MatSnackBar }, { type: EditCommentFragmentQuery }, { type: EditCommentFragmentService }, { type: i5.EditItemQuery }, { type: i5.EditItemService }, { type: i5.EditLayerPartQuery }, { type: i5.EditLayerPartService }, { type: i3.LibraryRouteService }]; } });
293
+
294
+ let EditCommentPartStore = class EditCommentPartStore extends Store {
295
+ constructor() {
296
+ super({});
297
+ }
298
+ setDirty(value) {
299
+ this.update({ dirty: value });
300
+ }
301
+ setSaving(value) {
302
+ this.update({ saving: value });
303
+ }
304
+ };
305
+ EditCommentPartStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditCommentPartStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
306
+ EditCommentPartStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditCommentPartStore, providedIn: 'root' });
307
+ EditCommentPartStore = __decorate([
308
+ StoreConfig({ name: COMMENT_PART_TYPEID })
309
+ ], EditCommentPartStore);
310
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditCommentPartStore, decorators: [{
311
+ type: Injectable,
312
+ args: [{ providedIn: 'root' }]
313
+ }], ctorParameters: function () { return []; } });
314
+
315
+ class EditCommentPartQuery extends EditPartQueryBase {
316
+ constructor(store) {
317
+ super(store);
318
+ }
319
+ }
320
+ EditCommentPartQuery.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditCommentPartQuery, deps: [{ token: EditCommentPartStore }], target: i0.ɵɵFactoryTarget.Injectable });
321
+ EditCommentPartQuery.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditCommentPartQuery, providedIn: 'root' });
322
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditCommentPartQuery, decorators: [{
323
+ type: Injectable,
324
+ args: [{ providedIn: 'root' }]
325
+ }], ctorParameters: function () { return [{ type: EditCommentPartStore }]; } });
326
+
327
+ class EditCommentPartService extends EditPartServiceBase {
328
+ constructor(editPartStore, itemService, thesaurusService) {
329
+ super(itemService, thesaurusService);
330
+ this.store = editPartStore;
331
+ }
332
+ }
333
+ EditCommentPartService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditCommentPartService, deps: [{ token: EditCommentPartStore }, { token: i2.ItemService }, { token: i2.ThesaurusService }], target: i0.ɵɵFactoryTarget.Injectable });
334
+ EditCommentPartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditCommentPartService, providedIn: 'root' });
335
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditCommentPartService, decorators: [{
336
+ type: Injectable,
337
+ args: [{ providedIn: 'root' }]
338
+ }], ctorParameters: function () { return [{ type: EditCommentPartStore }, { type: i2.ItemService }, { type: i2.ThesaurusService }]; } });
339
+
340
+ class CommentPartFeatureComponent extends EditPartFeatureBase {
341
+ constructor(router, route, snackbar, editPartQuery, editPartService, editItemQuery, editItemService) {
342
+ super(router, route, snackbar, editPartQuery, editPartService, editItemQuery, editItemService);
343
+ }
344
+ ngOnInit() {
345
+ this.initEditor([
346
+ 'comment-tags',
347
+ 'doc-reference-tags',
348
+ 'categories',
349
+ 'languages',
350
+ 'keyword-indexes',
351
+ 'keyword-tags',
352
+ ]);
353
+ }
354
+ }
355
+ CommentPartFeatureComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: CommentPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2$1.MatSnackBar }, { token: EditCommentPartQuery }, { token: EditCommentPartService }, { token: i5.EditItemQuery }, { token: i5.EditItemService }], target: i0.ɵɵFactoryTarget.Component });
356
+ CommentPartFeatureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.2", 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 [itemId]=\"itemId\"\r\n [roleId]=\"roleId\"\r\n [model]=\"part$ | async\"\r\n (modelChange)=\"save($event)\"\r\n [thesauri]=\"thesauri$ | async\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-comment-editor>\r\n", styles: [""], components: [{ type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { type: i7.CommentEditorComponent, selector: "cadmus-comment-editor" }], pipes: { "async": i8.AsyncPipe } });
357
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: CommentPartFeatureComponent, decorators: [{
358
+ type: Component,
359
+ args: [{ selector: 'cadmus-comment-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-comment-editor\r\n [itemId]=\"itemId\"\r\n [roleId]=\"roleId\"\r\n [model]=\"part$ | async\"\r\n (modelChange)=\"save($event)\"\r\n [thesauri]=\"thesauri$ | async\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-comment-editor>\r\n", styles: [""] }]
360
+ }], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2$1.MatSnackBar }, { type: EditCommentPartQuery }, { type: EditCommentPartService }, { type: i5.EditItemQuery }, { type: i5.EditItemService }]; } });
361
+
362
+ let EditDocReferencesPartStore = class EditDocReferencesPartStore extends Store {
363
+ constructor() {
364
+ super({});
365
+ }
366
+ setDirty(value) {
367
+ this.update({ dirty: value });
368
+ }
369
+ setSaving(value) {
370
+ this.update({ saving: value });
371
+ }
372
+ };
373
+ EditDocReferencesPartStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditDocReferencesPartStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
374
+ EditDocReferencesPartStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditDocReferencesPartStore, providedIn: 'root' });
375
+ EditDocReferencesPartStore = __decorate([
376
+ StoreConfig({ name: DOC_REFERENCES_PART_TYPEID })
377
+ ], EditDocReferencesPartStore);
378
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditDocReferencesPartStore, decorators: [{
379
+ type: Injectable,
380
+ args: [{ providedIn: 'root' }]
381
+ }], ctorParameters: function () { return []; } });
382
+
383
+ class EditDocReferencesPartQuery extends EditPartQueryBase {
384
+ constructor(store) {
385
+ super(store);
386
+ }
387
+ }
388
+ EditDocReferencesPartQuery.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditDocReferencesPartQuery, deps: [{ token: EditDocReferencesPartStore }], target: i0.ɵɵFactoryTarget.Injectable });
389
+ EditDocReferencesPartQuery.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditDocReferencesPartQuery, providedIn: 'root' });
390
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditDocReferencesPartQuery, decorators: [{
391
+ type: Injectable,
392
+ args: [{ providedIn: 'root' }]
393
+ }], ctorParameters: function () { return [{ type: EditDocReferencesPartStore }]; } });
394
+
395
+ class EditDocReferencesPartService extends EditPartServiceBase {
396
+ constructor(editPartStore, itemService, thesaurusService) {
397
+ super(itemService, thesaurusService);
398
+ this.store = editPartStore;
399
+ }
400
+ }
401
+ EditDocReferencesPartService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditDocReferencesPartService, deps: [{ token: EditDocReferencesPartStore }, { token: i2.ItemService }, { token: i2.ThesaurusService }], target: i0.ɵɵFactoryTarget.Injectable });
402
+ EditDocReferencesPartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditDocReferencesPartService, providedIn: 'root' });
403
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditDocReferencesPartService, decorators: [{
404
+ type: Injectable,
405
+ args: [{ providedIn: 'root' }]
406
+ }], ctorParameters: function () { return [{ type: EditDocReferencesPartStore }, { type: i2.ItemService }, { type: i2.ThesaurusService }]; } });
407
+
408
+ class DocReferencesPartFeatureComponent extends EditPartFeatureBase {
409
+ constructor(router, route, snackbar, editPartQuery, editPartService, editItemQuery, editItemService) {
410
+ super(router, route, snackbar, editPartQuery, editPartService, editItemQuery, editItemService);
411
+ }
412
+ ngOnInit() {
413
+ this.initEditor(['doc-reference-tags', 'doc-reference-types']);
414
+ }
415
+ }
416
+ DocReferencesPartFeatureComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: DocReferencesPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2$1.MatSnackBar }, { token: EditDocReferencesPartQuery }, { token: EditDocReferencesPartService }, { token: i5.EditItemQuery }, { token: i5.EditItemService }], target: i0.ɵɵFactoryTarget.Component });
417
+ DocReferencesPartFeatureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.2", 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 [itemId]=\"itemId\"\r\n [roleId]=\"roleId\"\r\n [model]=\"part$ | async\"\r\n (modelChange)=\"save($event)\"\r\n [thesauri]=\"thesauri$ | async\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-doc-references-part>\r\n", styles: [""], components: [{ type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { type: i7.DocReferencesPartComponent, selector: "cadmus-doc-references-part" }], pipes: { "async": i8.AsyncPipe } });
418
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: DocReferencesPartFeatureComponent, decorators: [{
419
+ type: Component,
420
+ args: [{ selector: 'cadmus-doc-references-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-doc-references-part\r\n [itemId]=\"itemId\"\r\n [roleId]=\"roleId\"\r\n [model]=\"part$ | async\"\r\n (modelChange)=\"save($event)\"\r\n [thesauri]=\"thesauri$ | async\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-doc-references-part>\r\n", styles: [""] }]
421
+ }], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2$1.MatSnackBar }, { type: EditDocReferencesPartQuery }, { type: EditDocReferencesPartService }, { type: i5.EditItemQuery }, { type: i5.EditItemService }]; } });
422
+
423
+ let EditHistoricalDatePartStore = class EditHistoricalDatePartStore extends Store {
424
+ constructor() {
425
+ super({});
426
+ }
427
+ setDirty(value) {
428
+ this.update({ dirty: value });
429
+ }
430
+ setSaving(value) {
431
+ this.update({ saving: value });
432
+ }
433
+ };
434
+ EditHistoricalDatePartStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditHistoricalDatePartStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
435
+ EditHistoricalDatePartStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditHistoricalDatePartStore, providedIn: 'root' });
436
+ EditHistoricalDatePartStore = __decorate([
437
+ StoreConfig({ name: HISTORICAL_DATE_PART_TYPEID })
438
+ ], EditHistoricalDatePartStore);
439
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditHistoricalDatePartStore, decorators: [{
440
+ type: Injectable,
441
+ args: [{ providedIn: 'root' }]
442
+ }], ctorParameters: function () { return []; } });
443
+
444
+ class EditHistoricalDatePartQuery extends EditPartQueryBase {
445
+ constructor(store) {
446
+ super(store);
447
+ }
448
+ }
449
+ EditHistoricalDatePartQuery.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditHistoricalDatePartQuery, deps: [{ token: EditHistoricalDatePartStore }], target: i0.ɵɵFactoryTarget.Injectable });
450
+ EditHistoricalDatePartQuery.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditHistoricalDatePartQuery, providedIn: 'root' });
451
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditHistoricalDatePartQuery, decorators: [{
452
+ type: Injectable,
453
+ args: [{ providedIn: 'root' }]
454
+ }], ctorParameters: function () { return [{ type: EditHistoricalDatePartStore }]; } });
455
+
456
+ class EditHistoricalDatePartService extends EditPartServiceBase {
457
+ constructor(editPartStore, itemService, thesaurusService) {
458
+ super(itemService, thesaurusService);
459
+ this.store = editPartStore;
460
+ }
461
+ }
462
+ EditHistoricalDatePartService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditHistoricalDatePartService, deps: [{ token: EditHistoricalDatePartStore }, { token: i2.ItemService }, { token: i2.ThesaurusService }], target: i0.ɵɵFactoryTarget.Injectable });
463
+ EditHistoricalDatePartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditHistoricalDatePartService, providedIn: 'root' });
464
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditHistoricalDatePartService, decorators: [{
465
+ type: Injectable,
466
+ args: [{ providedIn: 'root' }]
467
+ }], ctorParameters: function () { return [{ type: EditHistoricalDatePartStore }, { type: i2.ItemService }, { type: i2.ThesaurusService }]; } });
468
+
469
+ class HistoricalDatePartFeatureComponent extends EditPartFeatureBase {
470
+ constructor(router, route, snackbar, editPartQuery, editPartService, editItemQuery, editItemService) {
471
+ super(router, route, snackbar, editPartQuery, editPartService, editItemQuery, editItemService);
472
+ }
473
+ ngOnInit() {
474
+ this.initEditor(['doc-reference-tags', 'doc-reference-types']);
475
+ }
476
+ }
477
+ HistoricalDatePartFeatureComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: HistoricalDatePartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2$1.MatSnackBar }, { token: EditHistoricalDatePartQuery }, { token: EditHistoricalDatePartService }, { token: i5.EditItemQuery }, { token: i5.EditItemService }], target: i0.ɵɵFactoryTarget.Component });
478
+ HistoricalDatePartFeatureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.2", 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 [itemId]=\"itemId\"\r\n [roleId]=\"roleId\"\r\n [model]=\"part$ | async\"\r\n (modelChange)=\"save($event)\"\r\n [thesauri]=\"thesauri$ | async\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-historical-date-part>\r\n", styles: [""], components: [{ type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { type: i7.HistoricalDatePartComponent, selector: "cadmus-historical-date-part" }], pipes: { "async": i8.AsyncPipe } });
479
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: HistoricalDatePartFeatureComponent, decorators: [{
480
+ type: Component,
481
+ args: [{ selector: 'cadmus-historical-date-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-historical-date-part\r\n [itemId]=\"itemId\"\r\n [roleId]=\"roleId\"\r\n [model]=\"part$ | async\"\r\n (modelChange)=\"save($event)\"\r\n [thesauri]=\"thesauri$ | async\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-historical-date-part>\r\n", styles: [""] }]
482
+ }], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2$1.MatSnackBar }, { type: EditHistoricalDatePartQuery }, { type: EditHistoricalDatePartService }, { type: i5.EditItemQuery }, { type: i5.EditItemService }]; } });
483
+
484
+ let EditIndexKeywordsPartStore = class EditIndexKeywordsPartStore extends Store {
485
+ constructor() {
486
+ super({});
487
+ }
488
+ setDirty(value) {
489
+ this.update({ dirty: value });
490
+ }
491
+ setSaving(value) {
492
+ this.update({ saving: value });
493
+ }
494
+ };
495
+ EditIndexKeywordsPartStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditIndexKeywordsPartStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
496
+ EditIndexKeywordsPartStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditIndexKeywordsPartStore, providedIn: 'root' });
497
+ EditIndexKeywordsPartStore = __decorate([
498
+ StoreConfig({ name: INDEX_KEYWORDS_PART_TYPEID })
499
+ ], EditIndexKeywordsPartStore);
500
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditIndexKeywordsPartStore, decorators: [{
501
+ type: Injectable,
502
+ args: [{ providedIn: 'root' }]
503
+ }], ctorParameters: function () { return []; } });
504
+
505
+ class EditIndexKeywordsPartQuery extends EditPartQueryBase {
506
+ constructor(store) {
507
+ super(store);
508
+ }
509
+ }
510
+ EditIndexKeywordsPartQuery.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditIndexKeywordsPartQuery, deps: [{ token: EditIndexKeywordsPartStore }], target: i0.ɵɵFactoryTarget.Injectable });
511
+ EditIndexKeywordsPartQuery.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditIndexKeywordsPartQuery, providedIn: 'root' });
512
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditIndexKeywordsPartQuery, decorators: [{
513
+ type: Injectable,
514
+ args: [{ providedIn: 'root' }]
515
+ }], ctorParameters: function () { return [{ type: EditIndexKeywordsPartStore }]; } });
516
+
517
+ class EditIndexKeywordsPartService extends EditPartServiceBase {
518
+ constructor(editPartStore, itemService, thesaurusService) {
519
+ super(itemService, thesaurusService);
520
+ this.store = editPartStore;
521
+ }
522
+ }
523
+ EditIndexKeywordsPartService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditIndexKeywordsPartService, deps: [{ token: EditIndexKeywordsPartStore }, { token: i2.ItemService }, { token: i2.ThesaurusService }], target: i0.ɵɵFactoryTarget.Injectable });
524
+ EditIndexKeywordsPartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditIndexKeywordsPartService, providedIn: 'root' });
525
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditIndexKeywordsPartService, decorators: [{
526
+ type: Injectable,
527
+ args: [{ providedIn: 'root' }]
528
+ }], ctorParameters: function () { return [{ type: EditIndexKeywordsPartStore }, { type: i2.ItemService }, { type: i2.ThesaurusService }]; } });
529
+
530
+ class IndexKeywordsPartFeatureComponent extends EditPartFeatureBase {
531
+ constructor(router, route, snackbar, editPartQuery, editPartService, editItemQuery, editItemService) {
532
+ super(router, route, snackbar, editPartQuery, editPartService, editItemQuery, editItemService);
533
+ }
534
+ ngOnInit() {
535
+ this.initEditor(['languages', 'keyword-indexes', 'keyword-tags']);
536
+ }
537
+ }
538
+ IndexKeywordsPartFeatureComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: IndexKeywordsPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2$1.MatSnackBar }, { token: EditIndexKeywordsPartQuery }, { token: EditIndexKeywordsPartService }, { token: i5.EditItemQuery }, { token: i5.EditItemService }], target: i0.ɵɵFactoryTarget.Component });
539
+ IndexKeywordsPartFeatureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.2", 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 [itemId]=\"itemId\"\r\n [roleId]=\"roleId\"\r\n [model]=\"part$ | async\"\r\n (modelChange)=\"save($event)\"\r\n [thesauri]=\"thesauri$ | async\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-index-keywords-part>\r\n", styles: [""], components: [{ type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { type: i7.IndexKeywordsPartComponent, selector: "cadmus-index-keywords-part" }], pipes: { "async": i8.AsyncPipe } });
540
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: IndexKeywordsPartFeatureComponent, decorators: [{
541
+ type: Component,
542
+ args: [{ selector: 'cadmus-index-keywords-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-index-keywords-part\r\n [itemId]=\"itemId\"\r\n [roleId]=\"roleId\"\r\n [model]=\"part$ | async\"\r\n (modelChange)=\"save($event)\"\r\n [thesauri]=\"thesauri$ | async\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-index-keywords-part>\r\n", styles: [""] }]
543
+ }], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2$1.MatSnackBar }, { type: EditIndexKeywordsPartQuery }, { type: EditIndexKeywordsPartService }, { type: i5.EditItemQuery }, { type: i5.EditItemService }]; } });
544
+
545
+ let EditKeywordsPartStore = class EditKeywordsPartStore extends Store {
546
+ constructor() {
547
+ super({});
548
+ }
549
+ setDirty(value) {
550
+ this.update({ dirty: value });
551
+ }
552
+ setSaving(value) {
553
+ this.update({ saving: value });
554
+ }
555
+ };
556
+ EditKeywordsPartStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditKeywordsPartStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
557
+ EditKeywordsPartStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditKeywordsPartStore, providedIn: 'root' });
558
+ EditKeywordsPartStore = __decorate([
559
+ StoreConfig({ name: KEYWORDS_PART_TYPEID })
560
+ ], EditKeywordsPartStore);
561
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditKeywordsPartStore, decorators: [{
562
+ type: Injectable,
563
+ args: [{ providedIn: 'root' }]
564
+ }], ctorParameters: function () { return []; } });
565
+
566
+ class EditKeywordsPartQuery extends EditPartQueryBase {
567
+ constructor(store) {
568
+ super(store);
569
+ }
570
+ }
571
+ EditKeywordsPartQuery.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditKeywordsPartQuery, deps: [{ token: EditKeywordsPartStore }], target: i0.ɵɵFactoryTarget.Injectable });
572
+ EditKeywordsPartQuery.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditKeywordsPartQuery, providedIn: 'root' });
573
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditKeywordsPartQuery, decorators: [{
574
+ type: Injectable,
575
+ args: [{ providedIn: 'root' }]
576
+ }], ctorParameters: function () { return [{ type: EditKeywordsPartStore }]; } });
577
+
578
+ class EditKeywordsPartService extends EditPartServiceBase {
579
+ constructor(editPartStore, itemService, thesaurusService) {
580
+ super(itemService, thesaurusService);
581
+ this.store = editPartStore;
582
+ }
583
+ }
584
+ EditKeywordsPartService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditKeywordsPartService, deps: [{ token: EditKeywordsPartStore }, { token: i2.ItemService }, { token: i2.ThesaurusService }], target: i0.ɵɵFactoryTarget.Injectable });
585
+ EditKeywordsPartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditKeywordsPartService, providedIn: 'root' });
586
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditKeywordsPartService, decorators: [{
587
+ type: Injectable,
588
+ args: [{ providedIn: 'root' }]
589
+ }], ctorParameters: function () { return [{ type: EditKeywordsPartStore }, { type: i2.ItemService }, { type: i2.ThesaurusService }]; } });
590
+
591
+ class KeywordsPartFeatureComponent extends EditPartFeatureBase {
592
+ constructor(router, route, snackbar, editPartQuery, editPartService, editItemQuery, editItemService) {
593
+ super(router, route, snackbar, editPartQuery, editPartService, editItemQuery, editItemService);
594
+ }
595
+ ngOnInit() {
596
+ this.initEditor(['languages']);
597
+ }
598
+ }
599
+ KeywordsPartFeatureComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: KeywordsPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2$1.MatSnackBar }, { token: EditKeywordsPartQuery }, { token: EditKeywordsPartService }, { token: i5.EditItemQuery }, { token: i5.EditItemService }], target: i0.ɵɵFactoryTarget.Component });
600
+ KeywordsPartFeatureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.2", 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 [itemId]=\"itemId\"\r\n [roleId]=\"roleId\"\r\n [model]=\"part$ | async\"\r\n (modelChange)=\"save($event)\"\r\n [thesauri]=\"thesauri$ | async\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-keywords-part>\r\n", styles: [""], components: [{ type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { type: i7.KeywordsPartComponent, selector: "cadmus-keywords-part" }], pipes: { "async": i8.AsyncPipe } });
601
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: KeywordsPartFeatureComponent, decorators: [{
602
+ type: Component,
603
+ args: [{ selector: 'cadmus-keywords-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-keywords-part\r\n [itemId]=\"itemId\"\r\n [roleId]=\"roleId\"\r\n [model]=\"part$ | async\"\r\n (modelChange)=\"save($event)\"\r\n [thesauri]=\"thesauri$ | async\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-keywords-part>\r\n", styles: [""] }]
604
+ }], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2$1.MatSnackBar }, { type: EditKeywordsPartQuery }, { type: EditKeywordsPartService }, { type: i5.EditItemQuery }, { type: i5.EditItemService }]; } });
605
+
606
+ let EditNotePartStore = class EditNotePartStore extends Store {
607
+ constructor() {
608
+ super({});
609
+ }
610
+ setDirty(value) {
611
+ this.update({ dirty: value });
612
+ }
613
+ setSaving(value) {
614
+ this.update({ saving: value });
615
+ }
616
+ };
617
+ EditNotePartStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditNotePartStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
618
+ EditNotePartStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditNotePartStore, providedIn: 'root' });
619
+ EditNotePartStore = __decorate([
620
+ StoreConfig({ name: NOTE_PART_TYPEID })
621
+ ], EditNotePartStore);
622
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditNotePartStore, decorators: [{
623
+ type: Injectable,
624
+ args: [{ providedIn: 'root' }]
625
+ }], ctorParameters: function () { return []; } });
626
+
627
+ class EditNotePartQuery extends EditPartQueryBase {
628
+ constructor(store) {
629
+ super(store);
630
+ }
631
+ }
632
+ EditNotePartQuery.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditNotePartQuery, deps: [{ token: EditNotePartStore }], target: i0.ɵɵFactoryTarget.Injectable });
633
+ EditNotePartQuery.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditNotePartQuery, providedIn: 'root' });
634
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditNotePartQuery, decorators: [{
635
+ type: Injectable,
636
+ args: [{ providedIn: 'root' }]
637
+ }], ctorParameters: function () { return [{ type: EditNotePartStore }]; } });
638
+
639
+ class EditNotePartService extends EditPartServiceBase {
640
+ constructor(editPartStore, itemService, thesaurusService) {
641
+ super(itemService, thesaurusService);
642
+ this.store = editPartStore;
643
+ }
644
+ }
645
+ EditNotePartService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditNotePartService, deps: [{ token: EditNotePartStore }, { token: i2.ItemService }, { token: i2.ThesaurusService }], target: i0.ɵɵFactoryTarget.Injectable });
646
+ EditNotePartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditNotePartService, providedIn: 'root' });
647
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditNotePartService, decorators: [{
648
+ type: Injectable,
649
+ args: [{ providedIn: 'root' }]
650
+ }], ctorParameters: function () { return [{ type: EditNotePartStore }, { type: i2.ItemService }, { type: i2.ThesaurusService }]; } });
651
+
652
+ class NotePartFeatureComponent extends EditPartFeatureBase {
653
+ constructor(router, route, snackbar, editPartQuery, editPartService, editItemQuery, editItemService) {
654
+ super(router, route, snackbar, editPartQuery, editPartService, editItemQuery, editItemService);
655
+ }
656
+ ngOnInit() {
657
+ this.initEditor(['note-tags']);
658
+ }
659
+ }
660
+ NotePartFeatureComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NotePartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2$1.MatSnackBar }, { token: EditNotePartQuery }, { token: EditNotePartService }, { token: i5.EditItemQuery }, { token: i5.EditItemService }], target: i0.ɵɵFactoryTarget.Component });
661
+ NotePartFeatureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.2", 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 [itemId]=\"itemId\"\r\n [roleId]=\"roleId\"\r\n [model]=\"part$ | async\"\r\n (modelChange)=\"save($event)\"\r\n [thesauri]=\"thesauri$ | async\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-note-part>\r\n", styles: [""], components: [{ type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { type: i7.NotePartComponent, selector: "cadmus-note-part" }], pipes: { "async": i8.AsyncPipe } });
662
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: NotePartFeatureComponent, decorators: [{
663
+ type: Component,
664
+ args: [{ selector: 'cadmus-note-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-note-part\r\n [itemId]=\"itemId\"\r\n [roleId]=\"roleId\"\r\n [model]=\"part$ | async\"\r\n (modelChange)=\"save($event)\"\r\n [thesauri]=\"thesauri$ | async\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-note-part>\r\n", styles: [""] }]
665
+ }], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2$1.MatSnackBar }, { type: EditNotePartQuery }, { type: EditNotePartService }, { type: i5.EditItemQuery }, { type: i5.EditItemService }]; } });
666
+
667
+ /**
668
+ * The layer view model for a tiled text.
669
+ */
670
+ class TiledTextLayerView {
671
+ /**
672
+ * Create a new view from the specified tiled text.
673
+ * @param rows The tiled text rows.
674
+ */
675
+ constructor(rows) {
676
+ // setup rows to reflect the text
677
+ this._rows = [];
678
+ if (rows) {
679
+ // for each row
680
+ for (let i = 0; i < rows.length; i++) {
681
+ this._rows[i] = {
682
+ tiles: [],
683
+ };
684
+ // for each tile in row
685
+ for (let j = 0; j < (rows[i].tiles ? rows[i].tiles.length : 0); j++) {
686
+ this._rows[i].tiles[j] = {
687
+ checked: false,
688
+ frIndex: -1,
689
+ model: rows[i].tiles[j],
690
+ };
691
+ }
692
+ }
693
+ }
694
+ }
695
+ /**
696
+ * The internal rows view models.
697
+ */
698
+ get rows() {
699
+ return this._rows;
700
+ }
701
+ /**
702
+ * Get the tile at the specified coordinates.
703
+ *
704
+ * @param y The tile's y coordinate.
705
+ * @param x The tile's x coordinate.
706
+ */
707
+ getTileAt(y, x) {
708
+ return this._rows[y - 1].tiles[x - 1];
709
+ }
710
+ /**
711
+ * Set the view state of all the tiles.
712
+ *
713
+ * @param state The state values to set in each tile's state.
714
+ * @param setChecked True to set the checked property of states.
715
+ * @param setFrIndex True to set the frIndex property of states.
716
+ */
717
+ setAllTilesViewState(state) {
718
+ const hasChecked = state.hasOwnProperty('checked');
719
+ const hasFrIndex = state.hasOwnProperty('frIndex');
720
+ if (!hasChecked && !hasFrIndex) {
721
+ return;
722
+ }
723
+ // for each row
724
+ for (let i = 0; i < this._rows.length; i++) {
725
+ const row = this._rows[i];
726
+ // for each tile in row
727
+ for (let j = 0; j < row.tiles.length; j++) {
728
+ const tile = row.tiles[j];
729
+ row.tiles[j] = {
730
+ checked: (hasChecked ? state.checked : tile.checked) ? true : false,
731
+ frIndex: hasFrIndex ? state.frIndex || -1 : tile.frIndex,
732
+ model: tile.model,
733
+ };
734
+ }
735
+ }
736
+ }
737
+ /**
738
+ * Set the fragment index of each tile in this view. This is equal to the
739
+ * index to the fragment including the tile, when the tile is inside that
740
+ * fragment, or to -1, when the tile is outside any fragment. Fragment indexes
741
+ * refer to their locations, as received by this function.
742
+ *
743
+ * @param locations Fragments locations.
744
+ */
745
+ setFragmentLocations(locations) {
746
+ // reset all the tiles fragment indexes
747
+ this.setAllTilesViewState({ frIndex: -1 });
748
+ // for each fragment's location
749
+ for (let i = 0; i < locations.length; i++) {
750
+ const loc = locations[i];
751
+ if (loc.secondary) {
752
+ // range
753
+ for (let y = loc.primary.y; y <= loc.secondary.y; y++) {
754
+ const row = this._rows[y - 1];
755
+ for (let x = y === loc.primary.y ? loc.primary.x : 1; y === loc.secondary.y
756
+ ? x <= loc.secondary.x
757
+ : x <= row.tiles.length; x++) {
758
+ const tile = row.tiles[x - 1];
759
+ row.tiles[x - 1] = {
760
+ checked: tile.checked,
761
+ frIndex: i,
762
+ model: tile.model,
763
+ };
764
+ }
765
+ }
766
+ }
767
+ else {
768
+ // point
769
+ const tile = this.getTileAt(loc.primary.y, loc.primary.x);
770
+ if (tile) {
771
+ this._rows[loc.primary.y - 1].tiles[loc.primary.x - 1] = {
772
+ checked: tile.checked,
773
+ frIndex: i,
774
+ model: tile.model,
775
+ };
776
+ }
777
+ }
778
+ }
779
+ }
780
+ /**
781
+ * Find the coordinates of the first tile having the specified checked state,
782
+ * starting from the specified coordinates.
783
+ *
784
+ * @param y The y coordinates to start from.
785
+ * @param x The x coordinates to start from.
786
+ * @param checked True to find checked tiles, false to find unchecked tiles.
787
+ * @param reverse True to find in reverse direction.
788
+ * @returns The coordinates, or null if not found.
789
+ */
790
+ findFirstCheckedCoords(y, x, checked, reverse = false) {
791
+ if (reverse) {
792
+ let xstart = x;
793
+ while (true) {
794
+ for (let xi = xstart; xi >= 1; xi--) {
795
+ if (this.getTileAt(y, xi).checked === checked) {
796
+ return {
797
+ y,
798
+ x: xi,
799
+ };
800
+ }
801
+ }
802
+ if (--y > 0) {
803
+ xstart = this._rows[y - 1].tiles.length;
804
+ }
805
+ else {
806
+ break;
807
+ }
808
+ }
809
+ }
810
+ else {
811
+ let xstart = x;
812
+ while (true) {
813
+ for (let xi = xstart; xi <= this._rows[y - 1].tiles.length; xi++) {
814
+ if (this.getTileAt(y, xi).checked === checked) {
815
+ return {
816
+ y,
817
+ x: xi,
818
+ };
819
+ }
820
+ }
821
+ if (++y <= this._rows.length) {
822
+ xstart = 1;
823
+ }
824
+ else {
825
+ break;
826
+ }
827
+ }
828
+ }
829
+ return null;
830
+ }
831
+ /**
832
+ * "Linearly" set the checked state in the specified range of checked tiles.
833
+ *
834
+ * @param y1 The start y coordinate.
835
+ * @param x1 The start x coordinate.
836
+ * @param y2 The end y coordinate (included).
837
+ * @param x2 The end x coordinate (included).
838
+ * @param checked The state to be set.
839
+ */
840
+ linearSetCheck(y1, x1, y2, x2, checked) {
841
+ for (let y = y1; y <= y2; y++) {
842
+ const row = this._rows[y - 1];
843
+ for (let x = y === y1 ? x1 : 1; y === y2 ? x <= x2 : x <= row.tiles.length; x++) {
844
+ const tile = row.tiles[x - 1];
845
+ row.tiles[x - 1] = {
846
+ frIndex: tile.frIndex,
847
+ checked,
848
+ model: tile.model,
849
+ };
850
+ }
851
+ }
852
+ }
853
+ /**
854
+ * Get the coordinates of the next tile starting from the specified origin
855
+ * tile. The next tile is the tile to the right of the origin tile in the
856
+ * same row, or the first tile of the next row (if any) when the origin is
857
+ * the last tile in its row.
858
+ *
859
+ * @param y The y coordinate of the origin tile.
860
+ * @param x The x coordinate of the origin tile.
861
+ * @returns The coordinates, or null if no other tiles after origin.
862
+ */
863
+ getNextTileCoords(y, x) {
864
+ if (x < this._rows[y - 1].tiles.length) {
865
+ return {
866
+ y,
867
+ x: x + 1,
868
+ };
869
+ }
870
+ y++;
871
+ while (y <= this._rows.length) {
872
+ if (this._rows[y - 1].tiles.length > 0) {
873
+ return {
874
+ y,
875
+ x: 1,
876
+ };
877
+ }
878
+ y++;
879
+ }
880
+ return null;
881
+ }
882
+ /**
883
+ * Get the coordinates of the previous tile starting from the specified origin
884
+ * tile. The previous tile is the tile to the left of the origin tile in the
885
+ * same row, or the last tile of the previous row (if any) when the origin is
886
+ * the first tile in its row.
887
+ *
888
+ * @param y The y coordinate of the origin tile.
889
+ * @param x The x coordinate of the origin tile.
890
+ * @returns The coordinates, or null if no other tiles before origin.
891
+ */
892
+ getPrevTileCoords(y, x) {
893
+ if (x > 1) {
894
+ return {
895
+ y,
896
+ x: x - 1,
897
+ };
898
+ }
899
+ y--;
900
+ while (y > 0) {
901
+ if (this._rows[y - 1].tiles.length > 0) {
902
+ return {
903
+ y,
904
+ x: this._rows[y - 1].tiles.length,
905
+ };
906
+ }
907
+ y--;
908
+ }
909
+ return null;
910
+ }
911
+ /**
912
+ * "Linearly" toggle the tiles according to the specified toggle action
913
+ * in the specified set of tiles rows. When users toggle a tile from unchecked
914
+ * to checked, and any other tile was checked, the checked state must be
915
+ * extended so that all the tiles between the newly checked tile and the old
916
+ * one(s) are checked, so that they form a continuous "line", eventually
917
+ * spanning rows. The same inversely applies when un-checking tiles. This
918
+ * ensures that users can select a single range of tiles by toggling at any
919
+ * of its ends.
920
+ *
921
+ * @param y The y coordinate of the tile which was toggled.
922
+ * @param x The x coordinate of the tile which was toggled.
923
+ * @param checked The new checked state after toggling the tile.
924
+ */
925
+ toggleLinearTileCheck(y, x, checked) {
926
+ // if it was checked, it was toggled from unchecked
927
+ if (checked) {
928
+ // find 1st next checked:
929
+ let yx = this.findFirstCheckedCoords(y, x, true);
930
+ // found: extend from it to y,x
931
+ if (yx) {
932
+ this.linearSetCheck(yx.y, yx.x, y, x, true);
933
+ return;
934
+ }
935
+ // not found: find 1st prev checked:
936
+ yx = this.findFirstCheckedCoords(y, x, true, true);
937
+ // found: extend from it to y,x
938
+ if (yx) {
939
+ this.linearSetCheck(yx.y, yx.x, y, x, true);
940
+ return;
941
+ }
942
+ // not found: check y,x
943
+ const tile = this.getTileAt(y, x);
944
+ this._rows[y - 1].tiles[x - 1] = {
945
+ checked: true,
946
+ frIndex: tile.frIndex,
947
+ model: tile.model,
948
+ };
949
+ }
950
+ else {
951
+ // it was toggled from checked:
952
+ // find 1st prev non-checked and set origin (y1,x1) equal to 1 if not found,
953
+ // else to the tile next to the one found. Then uncheck all from origin
954
+ // to y,x.
955
+ let y1;
956
+ let x1;
957
+ const yx = this.findFirstCheckedCoords(y, x, false, true);
958
+ if (yx) {
959
+ const next = this.getNextTileCoords(yx.y, yx.x);
960
+ if (!next) {
961
+ y1 = y;
962
+ x1 = x;
963
+ }
964
+ else {
965
+ y1 = next.y;
966
+ x1 = next.x;
967
+ }
968
+ this.linearSetCheck(y1, x1, yx.y, yx.x, false);
969
+ }
970
+ else {
971
+ y1 = 1;
972
+ x1 = 1;
973
+ }
974
+ }
975
+ }
976
+ /**
977
+ * Get the location of the checked tiles, if any. As tiles are checked
978
+ * only as an uninterrupted sequence, there can be only 0 or 1 location
979
+ * in a set.
980
+ *
981
+ * @returns The location, or null if no tiles are checked.
982
+ */
983
+ getCheckedLocation() {
984
+ const start = this.findFirstCheckedCoords(1, 1, true);
985
+ if (!start) {
986
+ return null;
987
+ }
988
+ const end = this.findFirstCheckedCoords(start.y, start.x, false);
989
+ if (!end || (end.y === start.y && end.x === start.x)) {
990
+ return null;
991
+ }
992
+ const last = this.getPrevTileCoords(end.y, end.x);
993
+ return !last || (last.y === start.y && last.x === start.x)
994
+ ? new TokenLocation(new TokenPoint(start.y, start.x))
995
+ : new TokenLocation(new TokenPoint(start.y, start.x), new TokenPoint(last.y, last.x));
996
+ }
997
+ /**
998
+ * Get the location of the checked tiles, together with the index to the
999
+ * fragment including them (or a part of them). Should the tiles be included
1000
+ * in more than 1 fragment, no fragment will be returned.
1001
+ *
1002
+ * @returns Object with fragment=fragment index or -1, and location=location
1003
+ * of checked tiles; or null if no checked tile.
1004
+ */
1005
+ getCheckedLocationAndFragment() {
1006
+ const loc = this.getCheckedLocation();
1007
+ if (!loc) {
1008
+ return null;
1009
+ }
1010
+ let y2;
1011
+ let x2;
1012
+ if (loc.secondary) {
1013
+ y2 = loc.secondary.y;
1014
+ x2 = loc.secondary.x;
1015
+ }
1016
+ else {
1017
+ y2 = loc.primary.y;
1018
+ x2 = loc.primary.x;
1019
+ }
1020
+ let fr = -1;
1021
+ for (let y = loc.primary.y; y <= y2; y++) {
1022
+ const row = this._rows[y - 1];
1023
+ for (let x = y === loc.primary.y ? loc.primary.x : 1; x <= (y === y2 ? x2 : row.tiles.length); x++) {
1024
+ if (row.tiles[x - 1].frIndex > -1) {
1025
+ if (fr > -1) {
1026
+ if (fr !== row.tiles[x - 1].frIndex) {
1027
+ return {
1028
+ fragment: -1,
1029
+ location: loc,
1030
+ };
1031
+ }
1032
+ }
1033
+ else {
1034
+ fr = row.tiles[x - 1].frIndex;
1035
+ }
1036
+ }
1037
+ }
1038
+ }
1039
+ return {
1040
+ fragment: fr,
1041
+ location: loc,
1042
+ };
1043
+ }
1044
+ }
1045
+
1046
+ /**
1047
+ * Tiled text layer part editor.
1048
+ * This editor allows picking any layer and see all the text tiles included
1049
+ * in a fragment with a color highlight. Users can check any number of tiles
1050
+ * not belonging to any fragment in the selected layer, and add a new fragment
1051
+ * in the selected layer; or check any number of tiles belonging to a fragment
1052
+ * of the selected layer, and edit or delete it.
1053
+ * Tiles are thus colorized by the UI to render the fragments extent; and freely
1054
+ * checked by users to select the fragments to operate with.
1055
+ * All the checked tiles must follow each other, in one or more rows. Users can
1056
+ * just check the first and the last of a sequence to get the whole sequence
1057
+ * checked.
1058
+ */
1059
+ class TiledTextLayerPartFeatureComponent {
1060
+ constructor(route, _router, _editQuery, _editService, _editItemQuery, _editItemService, _libraryRouteService, _dialogService, authService) {
1061
+ this._router = _router;
1062
+ this._editQuery = _editQuery;
1063
+ this._editService = _editService;
1064
+ this._editItemQuery = _editItemQuery;
1065
+ this._editItemService = _editItemService;
1066
+ this._libraryRouteService = _libraryRouteService;
1067
+ this._dialogService = _dialogService;
1068
+ this.itemId = route.snapshot.params['iid'];
1069
+ this.partId = route.snapshot.params['pid'];
1070
+ if (this.partId === 'new') {
1071
+ this.partId = undefined;
1072
+ }
1073
+ this.roleId = route.snapshot.queryParams['rid'];
1074
+ if (this.roleId === 'default') {
1075
+ this.roleId = undefined;
1076
+ }
1077
+ this.userLevel = authService.getCurrentUserLevel();
1078
+ // layers part
1079
+ this.loading$ = this._editQuery.selectLoading();
1080
+ this.error$ = this._editQuery.selectError();
1081
+ this.baseText$ = this._editQuery.select((state) => state.baseText);
1082
+ this.locations$ = this._editQuery.select((state) => state.locations);
1083
+ this.refreshingBreakChance$ = this._editQuery.selectRefreshingBreakChance();
1084
+ this.breakChance$ = this._editQuery.selectBreakChance();
1085
+ this.layerHints$ = this._editQuery.selectLayerHints();
1086
+ this.patchingLayer$ = this._editQuery.selectPatchingLayers();
1087
+ this.deletingFragment$ = this._editQuery.selectDeletingFragment();
1088
+ // base text: connect rows to the base text part
1089
+ this.rows$ = this._editQuery.select((state) => state.baseTextPart?.rows);
1090
+ }
1091
+ canDeactivate() {
1092
+ return true;
1093
+ }
1094
+ ensureItemLoaded(id) {
1095
+ if (!this._editItemQuery.hasItem(id)) {
1096
+ this._editItemService.load(id);
1097
+ }
1098
+ }
1099
+ ngOnInit() {
1100
+ // when the base text changes, load all the fragments locations
1101
+ // and setup their UI state
1102
+ this.rows$.subscribe((rows) => {
1103
+ this.view = rows ? new TiledTextLayerView(rows) : undefined;
1104
+ this.view?.setFragmentLocations(this._editQuery.getValue().locations);
1105
+ });
1106
+ // ensure that the container item is loaded
1107
+ this.ensureItemLoaded(this.itemId);
1108
+ // load the layer part
1109
+ if (this.partId) {
1110
+ this._editService.load(this.itemId, this.partId);
1111
+ }
1112
+ }
1113
+ refreshBreakChance() {
1114
+ this._editService.refreshBreakChance();
1115
+ }
1116
+ onTileChecked(y, x, checked) {
1117
+ if (this.view) {
1118
+ this.view.toggleLinearTileCheck(y, x, checked);
1119
+ }
1120
+ }
1121
+ getSelectedTileCoords() {
1122
+ if (!this.selectedTile || !this.view) {
1123
+ return null;
1124
+ }
1125
+ for (let i = 0; i < this.view.rows.length; i++) {
1126
+ const j = this.view.rows[i].tiles.indexOf(this.selectedTile);
1127
+ if (j > -1) {
1128
+ return { y: i + 1, x: j + 1 };
1129
+ }
1130
+ }
1131
+ return null;
1132
+ }
1133
+ selectPrevTile() {
1134
+ if (!this.view) {
1135
+ return;
1136
+ }
1137
+ let yx = this.getSelectedTileCoords();
1138
+ if (yx) {
1139
+ yx = this.view.getPrevTileCoords(yx.y, yx.x);
1140
+ if (yx) {
1141
+ this.selectedTile = this.view.rows[yx.y - 1].tiles[yx.x - 1];
1142
+ }
1143
+ }
1144
+ }
1145
+ selectNextTile() {
1146
+ if (!this.view) {
1147
+ return;
1148
+ }
1149
+ let yx = this.getSelectedTileCoords();
1150
+ if (yx) {
1151
+ yx = this.view.getNextTileCoords(yx.y, yx.x);
1152
+ if (yx) {
1153
+ this.selectedTile = this.view.rows[yx.y - 1].tiles[yx.x - 1];
1154
+ }
1155
+ }
1156
+ }
1157
+ deleteFragment() {
1158
+ if (!this.view) {
1159
+ return;
1160
+ }
1161
+ const lf = this.view.getCheckedLocationAndFragment();
1162
+ if (!lf || lf.fragment === -1) {
1163
+ return;
1164
+ }
1165
+ const locations = this._editQuery.getValue().locations;
1166
+ const loc = locations[lf.fragment];
1167
+ this._dialogService
1168
+ .confirm('Delete Fragment', `Delete the fragment at ${loc}?`)
1169
+ .subscribe((ok) => {
1170
+ if (ok) {
1171
+ // find the fragment and remove it from the part
1172
+ const i = this._editQuery
1173
+ .getValue()
1174
+ .part?.fragments.findIndex((p) => {
1175
+ return TokenLocation.parse(p.location)?.overlaps(loc);
1176
+ });
1177
+ if (i === -1) {
1178
+ return;
1179
+ }
1180
+ this._editService.deleteFragment(loc);
1181
+ }
1182
+ });
1183
+ }
1184
+ deleteFragmentFromHint(hint) {
1185
+ const loc = TokenLocation.parse(hint.location);
1186
+ if (loc) {
1187
+ this._editService.deleteFragment(loc);
1188
+ }
1189
+ }
1190
+ navigateToFragmentEditor(loc) {
1191
+ const part = this._editQuery.getValue().part;
1192
+ if (!part) {
1193
+ return;
1194
+ }
1195
+ const { route, rid } = this._libraryRouteService.buildFragmentEditorRoute(this._editItemQuery.getValue().facet.partDefinitions, part.itemId, part.id, part.typeId, part.roleId, loc);
1196
+ // navigate to the editor
1197
+ this._router.navigate([route], rid
1198
+ ? {
1199
+ queryParams: {
1200
+ rid: part.roleId,
1201
+ },
1202
+ }
1203
+ : {});
1204
+ }
1205
+ editFragment() {
1206
+ if (!this.view) {
1207
+ return;
1208
+ }
1209
+ const lf = this.view.getCheckedLocationAndFragment();
1210
+ if (!lf || lf.fragment === -1) {
1211
+ return;
1212
+ }
1213
+ const locations = this._editQuery.getValue().locations;
1214
+ this.navigateToFragmentEditor(locations[lf.fragment].toString());
1215
+ }
1216
+ editFragmentFromHint(hint) {
1217
+ this.navigateToFragmentEditor(hint.location);
1218
+ }
1219
+ moveFragmentFromHint(hint) {
1220
+ if (!this.pickedLocation ||
1221
+ this.pickedLocation === hint.location ||
1222
+ !this.partId) {
1223
+ return;
1224
+ }
1225
+ this._editService.applyLayerPatches(this.partId, [
1226
+ `mov ${hint.location} ${this.pickedLocation}`,
1227
+ ]);
1228
+ }
1229
+ addFragment() {
1230
+ if (!this.view) {
1231
+ return;
1232
+ }
1233
+ const lf = this.view.getCheckedLocationAndFragment();
1234
+ if (!lf || lf.fragment > -1) {
1235
+ return;
1236
+ }
1237
+ this.navigateToFragmentEditor(lf.location.toString());
1238
+ }
1239
+ pickLocation() {
1240
+ if (!this.view) {
1241
+ return;
1242
+ }
1243
+ const lf = this.view.getCheckedLocationAndFragment();
1244
+ if (!lf) {
1245
+ return;
1246
+ }
1247
+ const locations = this._editQuery.getValue().locations;
1248
+ this.pickedLocation = (lf.fragment === -1 ? lf.location : locations[lf.fragment]).toString();
1249
+ }
1250
+ clearTileChecks() {
1251
+ if (!this.view) {
1252
+ return;
1253
+ }
1254
+ this.view.setAllTilesViewState({ checked: false });
1255
+ this.pickedLocation = undefined;
1256
+ }
1257
+ applyLayerPatches(patches) {
1258
+ if (this.partId) {
1259
+ this._editService.applyLayerPatches(this.partId, patches);
1260
+ }
1261
+ }
1262
+ close() {
1263
+ this._router.navigate(['/items', this.itemId]);
1264
+ }
1265
+ }
1266
+ TiledTextLayerPartFeatureComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: TiledTextLayerPartFeatureComponent, deps: [{ token: i1.ActivatedRoute }, { token: i1.Router }, { token: i5.EditLayerPartQuery }, { token: i5.EditLayerPartService }, { token: i5.EditItemQuery }, { token: i5.EditItemService }, { token: i3.LibraryRouteService }, { token: i4.DialogService }, { token: i2.AuthService }], target: i0.ɵɵFactoryTarget.Component });
1267
+ TiledTextLayerPartFeatureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.2", type: TiledTextLayerPartFeatureComponent, selector: "cadmus-tiled-text-layer-part-feature", ngImport: i0, template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<mat-card>\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)\">\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 fxLayout=\"row\">\r\n <div *ngIf=\"loading$ | async\" fxFlex fxLayoutAlign=\"center center\">\r\n <mat-spinner [diameter]=\"48\" [strokeWidth]=\"4\"></mat-spinner>\r\n </div>\r\n <div *ngIf=\"error$ | async as error\" class=\"error-message\">{{ error }}</div>\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 fxLayout=\"row\"\r\n fxLayoutAlign=\"start center\"\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 fxFlex=\"none\"\r\n (click)=\"selectedTile = tile\"\r\n (checkedChange)=\"onTileChecked(iy + 1, ix + 1, $event)\"\r\n (keydown.control.arrowleft)=\"selectPrevTile(iy + 1, ix + 1)\"\r\n (keydown.control.arrowright)=\"selectNextTile(iy + 1, ix + 1)\"\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]=\"\r\n (loading$ | async) ||\r\n (patchingLayer$ | async) ||\r\n (deletingFragment$ | async)\r\n \"\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:bold}\n"], components: [{ type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { type: i7$1.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i7$1.MatCardHeader, selector: "mat-card-header" }, { type: i8$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i9.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i6.CurrentLayerPartBarComponent, selector: "cadmus-current-layer-part-bar" }, { type: i10.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { type: i11.MatSpinner, selector: "mat-spinner", inputs: ["color"] }, { type: i7.TextTileComponent, selector: "cadmus-text-tile", inputs: ["selected", "checkable", "readonly", "color", "checked", "tile"], outputs: ["tileChange", "editData", "checkedChange"] }, { type: i13.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { type: i13.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { type: i8$1.LayerHintsComponent, selector: "cadmus-layer-hints", inputs: ["hints", "targetLocation", "disabled", "readonly"], outputs: ["requestEdit", "requestDelete", "requestMove", "requestPatch"] }], directives: [{ type: i7$1.MatCardAvatar, selector: "[mat-card-avatar], [matCardAvatar]" }, { type: i7$1.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { type: i8.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i8.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i16.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7$1.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { type: i7$1.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { type: i17.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i17.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i17.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i13.MatExpansionPanelTitle, selector: "mat-panel-title" }, { type: i13.MatExpansionPanelDescription, selector: "mat-panel-description" }], pipes: { "async": i8.AsyncPipe } });
1268
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: TiledTextLayerPartFeatureComponent, decorators: [{
1269
+ type: Component,
1270
+ args: [{ selector: 'cadmus-tiled-text-layer-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<mat-card>\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)\">\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 fxLayout=\"row\">\r\n <div *ngIf=\"loading$ | async\" fxFlex fxLayoutAlign=\"center center\">\r\n <mat-spinner [diameter]=\"48\" [strokeWidth]=\"4\"></mat-spinner>\r\n </div>\r\n <div *ngIf=\"error$ | async as error\" class=\"error-message\">{{ error }}</div>\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 fxLayout=\"row\"\r\n fxLayoutAlign=\"start center\"\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 fxFlex=\"none\"\r\n (click)=\"selectedTile = tile\"\r\n (checkedChange)=\"onTileChecked(iy + 1, ix + 1, $event)\"\r\n (keydown.control.arrowleft)=\"selectPrevTile(iy + 1, ix + 1)\"\r\n (keydown.control.arrowright)=\"selectNextTile(iy + 1, ix + 1)\"\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]=\"\r\n (loading$ | async) ||\r\n (patchingLayer$ | async) ||\r\n (deletingFragment$ | async)\r\n \"\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:bold}\n"] }]
1271
+ }], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i1.Router }, { type: i5.EditLayerPartQuery }, { type: i5.EditLayerPartService }, { type: i5.EditItemQuery }, { type: i5.EditItemService }, { type: i3.LibraryRouteService }, { type: i4.DialogService }, { type: i2.AuthService }]; } });
1272
+
1273
+ let EditTiledTextPartStore = class EditTiledTextPartStore extends Store {
1274
+ constructor() {
1275
+ super({});
1276
+ }
1277
+ setDirty(value) {
1278
+ this.update({ dirty: value });
1279
+ }
1280
+ setSaving(value) {
1281
+ this.update({ saving: value });
1282
+ }
1283
+ };
1284
+ EditTiledTextPartStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditTiledTextPartStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1285
+ EditTiledTextPartStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditTiledTextPartStore, providedIn: 'root' });
1286
+ EditTiledTextPartStore = __decorate([
1287
+ StoreConfig({ name: TILED_TEXT_PART_TYPEID })
1288
+ ], EditTiledTextPartStore);
1289
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditTiledTextPartStore, decorators: [{
1290
+ type: Injectable,
1291
+ args: [{ providedIn: 'root' }]
1292
+ }], ctorParameters: function () { return []; } });
1293
+
1294
+ class EditTiledTextPartQuery extends EditPartQueryBase {
1295
+ constructor(store) {
1296
+ super(store);
1297
+ }
1298
+ }
1299
+ EditTiledTextPartQuery.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditTiledTextPartQuery, deps: [{ token: EditTiledTextPartStore }], target: i0.ɵɵFactoryTarget.Injectable });
1300
+ EditTiledTextPartQuery.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditTiledTextPartQuery, providedIn: 'root' });
1301
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditTiledTextPartQuery, decorators: [{
1302
+ type: Injectable,
1303
+ args: [{ providedIn: 'root' }]
1304
+ }], ctorParameters: function () { return [{ type: EditTiledTextPartStore }]; } });
1305
+
1306
+ class EditTiledTextPartService extends EditPartServiceBase {
1307
+ constructor(editPartStore, itemService, thesaurusService) {
1308
+ super(itemService, thesaurusService);
1309
+ this.store = editPartStore;
1310
+ }
1311
+ /**
1312
+ * Load the part, a base text part, from its item's ID.
1313
+ * This relies on the convention that every base text part should have
1314
+ * a "base-text" role ID.
1315
+ *
1316
+ * @param itemId The item's ID.
1317
+ * @param thesauriIds The optional thesauri IDs.
1318
+ */
1319
+ loadBaseTextPart(itemId, thesauriIds) {
1320
+ // get the base text part ID from the item's ID
1321
+ this.itemService
1322
+ .getPartFromTypeAndRole(itemId, 'any', 'base-text')
1323
+ .subscribe((part) => {
1324
+ this.load(part.id, thesauriIds);
1325
+ }, (error) => {
1326
+ this.store.setError('Error retrieving base text part of item ' + itemId);
1327
+ });
1328
+ }
1329
+ }
1330
+ EditTiledTextPartService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditTiledTextPartService, deps: [{ token: EditTiledTextPartStore }, { token: i2.ItemService }, { token: i2.ThesaurusService }], target: i0.ɵɵFactoryTarget.Injectable });
1331
+ EditTiledTextPartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditTiledTextPartService, providedIn: 'root' });
1332
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditTiledTextPartService, decorators: [{
1333
+ type: Injectable,
1334
+ args: [{ providedIn: 'root' }]
1335
+ }], ctorParameters: function () { return [{ type: EditTiledTextPartStore }, { type: i2.ItemService }, { type: i2.ThesaurusService }]; } });
1336
+
1337
+ class TiledTextPartFeatureComponent extends EditPartFeatureBase {
1338
+ constructor(router, route, snackbar, editPartQuery, editPartService, editItemQuery, editItemService) {
1339
+ super(router, route, snackbar, editPartQuery, editPartService, editItemQuery, editItemService);
1340
+ }
1341
+ ngOnInit() {
1342
+ this.initEditor();
1343
+ }
1344
+ }
1345
+ TiledTextPartFeatureComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: TiledTextPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2$1.MatSnackBar }, { token: EditTiledTextPartQuery }, { token: EditTiledTextPartService }, { token: i5.EditItemQuery }, { token: i5.EditItemService }], target: i0.ɵɵFactoryTarget.Component });
1346
+ TiledTextPartFeatureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.2", 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 [itemId]=\"itemId\"\r\n [roleId]=\"roleId\"\r\n [model]=\"part$ | async\"\r\n (modelChange)=\"save($event)\"\r\n [thesauri]=\"thesauri$ | async\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-tiled-text-part>\r\n", styles: [""], components: [{ type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { type: i7.TiledTextPartComponent, selector: "cadmus-tiled-text-part" }], pipes: { "async": i8.AsyncPipe } });
1347
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: TiledTextPartFeatureComponent, decorators: [{
1348
+ type: Component,
1349
+ args: [{ selector: 'cadmus-tiled-text-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-tiled-text-part\r\n [itemId]=\"itemId\"\r\n [roleId]=\"roleId\"\r\n [model]=\"part$ | async\"\r\n (modelChange)=\"save($event)\"\r\n [thesauri]=\"thesauri$ | async\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n></cadmus-tiled-text-part>\r\n", styles: [""] }]
1350
+ }], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2$1.MatSnackBar }, { type: EditTiledTextPartQuery }, { type: EditTiledTextPartService }, { type: i5.EditItemQuery }, { type: i5.EditItemService }]; } });
1351
+
1352
+ /**
1353
+ * Token-based text layer part feature editor. This is a special type of editor,
1354
+ * rather than being a simple wrapper like the others; it is used for editing
1355
+ * any text layer (using token-based coordinates), whatever the type of its
1356
+ * fragments. Being a sort of portal for accessing a fragments editor, it has
1357
+ * no save capability: the single fragments are edited and saved as needed.
1358
+ */
1359
+ class TokenTextLayerPartFeatureComponent {
1360
+ constructor(route, _router, _editQuery, _editService, _textLayerService, _editItemQuery, _editItemService, _libraryRouteService, _dialogService, authService) {
1361
+ this._router = _router;
1362
+ this._editQuery = _editQuery;
1363
+ this._editService = _editService;
1364
+ this._textLayerService = _textLayerService;
1365
+ this._editItemQuery = _editItemQuery;
1366
+ this._editItemService = _editItemService;
1367
+ this._libraryRouteService = _libraryRouteService;
1368
+ this._dialogService = _dialogService;
1369
+ this.textSize = 14;
1370
+ this.itemId = route.snapshot.params.iid;
1371
+ this.partId = route.snapshot.params.pid;
1372
+ if (this.partId === 'new') {
1373
+ this.partId = undefined;
1374
+ }
1375
+ this.roleId = route.snapshot.queryParams.rid;
1376
+ if (this.roleId === 'default') {
1377
+ this.roleId = undefined;
1378
+ }
1379
+ this.userLevel = authService.getCurrentUserLevel();
1380
+ this.loading$ = this._editQuery.selectLoading();
1381
+ this.error$ = this._editQuery.selectError();
1382
+ this.baseText$ = this._editQuery.select((state) => state.baseText);
1383
+ this.locations$ = this._editQuery.select((state) => state.locations);
1384
+ this.refreshingBreakChance$ = this._editQuery.selectRefreshingBreakChance();
1385
+ this.breakChance$ = this._editQuery.selectBreakChance();
1386
+ this.layerHints$ = this._editQuery.selectLayerHints();
1387
+ this.patchingLayer$ = this._editQuery.selectPatchingLayers();
1388
+ this.deletingFragment$ = this._editQuery.selectDeletingFragment();
1389
+ }
1390
+ canDeactivate() {
1391
+ return true;
1392
+ }
1393
+ ensureItemLoaded(id) {
1394
+ if (!this._editItemQuery.hasItem(id)) {
1395
+ this._editItemService.load(id);
1396
+ }
1397
+ }
1398
+ makeLarger() {
1399
+ const size = this.textSize + 2;
1400
+ if (size > 24) {
1401
+ return;
1402
+ }
1403
+ this.textSize = size;
1404
+ }
1405
+ makeSmaller() {
1406
+ const size = this.textSize - 2;
1407
+ if (size < 12) {
1408
+ return;
1409
+ }
1410
+ this.textSize = size;
1411
+ }
1412
+ ngOnInit() {
1413
+ // when the base text changes, load all the fragments locations
1414
+ // this.baseText$.subscribe(_ => {
1415
+ // this.loadAllFragmentLocations();
1416
+ // });
1417
+ // ensure the container item is loaded
1418
+ this.ensureItemLoaded(this.itemId);
1419
+ // load the layer part data
1420
+ if (this.partId) {
1421
+ this._editService.load(this.itemId, this.partId);
1422
+ }
1423
+ }
1424
+ deleteFragment() {
1425
+ const range = this._textLayerService.getSelectedRange();
1426
+ if (!range) {
1427
+ return;
1428
+ }
1429
+ const location = this._textLayerService.getSelectedLocationForEdit(range);
1430
+ if (!location) {
1431
+ return;
1432
+ }
1433
+ this._dialogService
1434
+ .confirm('Delete Fragment', `Delete the fragment at ${location}?`)
1435
+ .subscribe((ok) => {
1436
+ if (ok) {
1437
+ // find the fragment and remove it from the part
1438
+ const i = this._editQuery
1439
+ .getValue()
1440
+ .part.fragments.findIndex((p) => {
1441
+ return TokenLocation.parse(p.location)?.overlaps(location);
1442
+ });
1443
+ if (i === -1) {
1444
+ return;
1445
+ }
1446
+ this._editService.deleteFragment(location);
1447
+ }
1448
+ });
1449
+ }
1450
+ deleteFragmentFromHint(hint) {
1451
+ const loc = TokenLocation.parse(hint.location);
1452
+ if (loc) {
1453
+ this._editService.deleteFragment(loc);
1454
+ }
1455
+ }
1456
+ refreshBreakChance() {
1457
+ this._editService.refreshBreakChance();
1458
+ }
1459
+ navigateToFragmentEditor(loc) {
1460
+ const part = this._editQuery.getValue().part;
1461
+ if (!part) {
1462
+ return;
1463
+ }
1464
+ const { route, rid } = this._libraryRouteService.buildFragmentEditorRoute(this._editItemQuery.getValue().facet.partDefinitions, part.itemId, part.id, part.typeId, part.roleId, loc);
1465
+ // navigate to the editor
1466
+ this._router.navigate([route], rid
1467
+ ? {
1468
+ queryParams: {
1469
+ rid: part.roleId,
1470
+ },
1471
+ }
1472
+ : {});
1473
+ }
1474
+ editFragment() {
1475
+ const range = this._textLayerService.getSelectedRange();
1476
+ if (!range) {
1477
+ return;
1478
+ }
1479
+ const location = this._textLayerService.getSelectedLocationForEdit(range);
1480
+ if (location) {
1481
+ this.navigateToFragmentEditor(location.toString());
1482
+ }
1483
+ }
1484
+ editFragmentFromHint(hint) {
1485
+ this.navigateToFragmentEditor(hint.location);
1486
+ }
1487
+ addFragment() {
1488
+ const range = this._textLayerService.getSelectedRange();
1489
+ if (!range) {
1490
+ return;
1491
+ }
1492
+ const location = this._textLayerService.getSelectedLocationForNew(range, this._editQuery.getValue()?.baseText || '');
1493
+ if (location) {
1494
+ this.navigateToFragmentEditor(location.toString());
1495
+ }
1496
+ }
1497
+ moveFragmentFromHint(hint) {
1498
+ if (!this.pickedLocation ||
1499
+ this.pickedLocation === hint.location ||
1500
+ !this.partId) {
1501
+ return;
1502
+ }
1503
+ this._editService.applyLayerPatches(this.partId, [
1504
+ `mov ${hint.location} ${this.pickedLocation}`,
1505
+ ]);
1506
+ }
1507
+ applyLayerPatches(patches) {
1508
+ if (this.partId) {
1509
+ this._editService.applyLayerPatches(this.partId, patches);
1510
+ }
1511
+ }
1512
+ pickLocation() {
1513
+ const range = this._textLayerService.getSelectedRange();
1514
+ if (!range) {
1515
+ return;
1516
+ }
1517
+ const location = this._textLayerService.getSelectedLocationForNew(range, this._editQuery.getValue()?.baseText || '');
1518
+ if (location) {
1519
+ this.pickedLocation = location.toString();
1520
+ }
1521
+ }
1522
+ close() {
1523
+ this._router.navigate(['/items', this.itemId]);
1524
+ }
1525
+ }
1526
+ TokenTextLayerPartFeatureComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: TokenTextLayerPartFeatureComponent, deps: [{ token: i1.ActivatedRoute }, { token: i1.Router }, { token: i5.EditLayerPartQuery }, { token: i5.EditLayerPartService }, { token: i3.TextLayerService }, { token: i5.EditItemQuery }, { token: i5.EditItemService }, { token: i3.LibraryRouteService }, { token: i4.DialogService }, { token: i2.AuthService }], target: i0.ɵɵFactoryTarget.Component });
1527
+ TokenTextLayerPartFeatureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.2", type: TokenTextLayerPartFeatureComponent, selector: "cadmus-token-text-layer-part-feature", ngImport: i0, template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<mat-card>\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 <div *ngIf=\"loading$ | async\" fxFlex fxLayoutAlign=\"center center\">\r\n <mat-spinner [diameter]=\"48\" [strokeWidth]=\"4\"></mat-spinner>\r\n </div>\r\n <div *ngIf=\"error$ | async as error\" class=\"error-message\">{{ error }}</div>\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]=\"\r\n (loading$ | async) ||\r\n (patchingLayer$ | async) ||\r\n (deletingFragment$ | async)\r\n \"\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: [""], components: [{ type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { type: i7$1.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i7$1.MatCardHeader, selector: "mat-card-header" }, { type: i8$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i9.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i6.CurrentLayerPartBarComponent, selector: "cadmus-current-layer-part-bar" }, { type: i10.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { type: i11.MatSpinner, selector: "mat-spinner", inputs: ["color"] }, { type: i8$1.DecoratedTokenTextComponent, selector: "cadmus-decorated-token-text", inputs: ["baseText", "locations", "selectedLocation"] }, { type: i13.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { type: i13.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { type: i8$1.LayerHintsComponent, selector: "cadmus-layer-hints", inputs: ["hints", "targetLocation", "disabled", "readonly"], outputs: ["requestEdit", "requestDelete", "requestMove", "requestPatch"] }], directives: [{ type: i7$1.MatCardAvatar, selector: "[mat-card-avatar], [matCardAvatar]" }, { type: i7$1.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { type: i8.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i8.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i16.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7$1.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { type: i7$1.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { type: i17.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i17.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i17.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i13.MatExpansionPanelTitle, selector: "mat-panel-title" }, { type: i13.MatExpansionPanelDescription, selector: "mat-panel-description" }], pipes: { "async": i8.AsyncPipe } });
1528
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: TokenTextLayerPartFeatureComponent, decorators: [{
1529
+ type: Component,
1530
+ args: [{ selector: 'cadmus-token-text-layer-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<mat-card>\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 <div *ngIf=\"loading$ | async\" fxFlex fxLayoutAlign=\"center center\">\r\n <mat-spinner [diameter]=\"48\" [strokeWidth]=\"4\"></mat-spinner>\r\n </div>\r\n <div *ngIf=\"error$ | async as error\" class=\"error-message\">{{ error }}</div>\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]=\"\r\n (loading$ | async) ||\r\n (patchingLayer$ | async) ||\r\n (deletingFragment$ | async)\r\n \"\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: [""] }]
1531
+ }], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i1.Router }, { type: i5.EditLayerPartQuery }, { type: i5.EditLayerPartService }, { type: i3.TextLayerService }, { type: i5.EditItemQuery }, { type: i5.EditItemService }, { type: i3.LibraryRouteService }, { type: i4.DialogService }, { type: i2.AuthService }]; } });
1532
+
1533
+ let EditTokenTextPartStore = class EditTokenTextPartStore extends Store {
1534
+ constructor() {
1535
+ super({});
1536
+ }
1537
+ setDirty(value) {
1538
+ this.update({ dirty: value });
1539
+ }
1540
+ setSaving(value) {
1541
+ this.update({ saving: value });
1542
+ }
1543
+ };
1544
+ EditTokenTextPartStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditTokenTextPartStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1545
+ EditTokenTextPartStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditTokenTextPartStore, providedIn: 'root' });
1546
+ EditTokenTextPartStore = __decorate([
1547
+ StoreConfig({ name: TOKEN_TEXT_PART_TYPEID })
1548
+ ], EditTokenTextPartStore);
1549
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditTokenTextPartStore, decorators: [{
1550
+ type: Injectable,
1551
+ args: [{ providedIn: 'root' }]
1552
+ }], ctorParameters: function () { return []; } });
1553
+
1554
+ class EditTokenTextPartQuery extends EditPartQueryBase {
1555
+ constructor(store) {
1556
+ super(store);
1557
+ }
1558
+ }
1559
+ EditTokenTextPartQuery.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditTokenTextPartQuery, deps: [{ token: EditTokenTextPartStore }], target: i0.ɵɵFactoryTarget.Injectable });
1560
+ EditTokenTextPartQuery.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditTokenTextPartQuery, providedIn: 'root' });
1561
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditTokenTextPartQuery, decorators: [{
1562
+ type: Injectable,
1563
+ args: [{ providedIn: 'root' }]
1564
+ }], ctorParameters: function () { return [{ type: EditTokenTextPartStore }]; } });
1565
+
1566
+ class EditTokenTextPartService extends EditPartServiceBase {
1567
+ constructor(editPartStore, itemService, thesaurusService) {
1568
+ super(itemService, thesaurusService);
1569
+ this.store = editPartStore;
1570
+ }
1571
+ }
1572
+ EditTokenTextPartService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditTokenTextPartService, deps: [{ token: EditTokenTextPartStore }, { token: i2.ItemService }, { token: i2.ThesaurusService }], target: i0.ɵɵFactoryTarget.Injectable });
1573
+ EditTokenTextPartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditTokenTextPartService, providedIn: 'root' });
1574
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: EditTokenTextPartService, decorators: [{
1575
+ type: Injectable,
1576
+ args: [{ providedIn: 'root' }]
1577
+ }], ctorParameters: function () { return [{ type: EditTokenTextPartStore }, { type: i2.ItemService }, { type: i2.ThesaurusService }]; } });
1578
+
1579
+ class TokenTextPartFeatureComponent extends EditPartFeatureBase {
1580
+ constructor(router, route, snackbar, editPartQuery, editPartService, editItemQuery, editItemService) {
1581
+ super(router, route, snackbar, editPartQuery, editPartService, editItemQuery, editItemService);
1582
+ }
1583
+ ngOnInit() {
1584
+ this.initEditor();
1585
+ }
1586
+ }
1587
+ TokenTextPartFeatureComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: TokenTextPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2$1.MatSnackBar }, { token: EditTokenTextPartQuery }, { token: EditTokenTextPartService }, { token: i5.EditItemQuery }, { token: i5.EditItemService }], target: i0.ɵɵFactoryTarget.Component });
1588
+ TokenTextPartFeatureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.2", 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 [itemId]=\"itemId\"\r\n [roleId]=\"roleId\"\r\n [model]=\"part$ | async\"\r\n (modelChange)=\"save($event)\"\r\n [thesauri]=\"thesauri$ | async\"\r\n (editorClose)=\"close()\"\r\n></cadmus-token-text-part>\r\n", styles: [""], components: [{ type: i6.CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { type: i7.TokenTextPartComponent, selector: "cadmus-token-text-part" }], pipes: { "async": i8.AsyncPipe } });
1589
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: TokenTextPartFeatureComponent, decorators: [{
1590
+ type: Component,
1591
+ args: [{ selector: 'cadmus-token-text-part-feature', template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<cadmus-token-text-part\r\n [itemId]=\"itemId\"\r\n [roleId]=\"roleId\"\r\n [model]=\"part$ | async\"\r\n (modelChange)=\"save($event)\"\r\n [thesauri]=\"thesauri$ | async\"\r\n (editorClose)=\"close()\"\r\n></cadmus-token-text-part>\r\n", styles: [""] }]
1592
+ }], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2$1.MatSnackBar }, { type: EditTokenTextPartQuery }, { type: EditTokenTextPartService }, { type: i5.EditItemQuery }, { type: i5.EditItemService }]; } });
1593
+
1594
+ // https://github.com/ng-packagr/ng-packagr/issues/778
1595
+ const RouterModuleForChild = RouterModule.forChild([
1596
+ {
1597
+ path: `${BIBLIOGRAPHY_PART_TYPEID}/:pid`,
1598
+ pathMatch: 'full',
1599
+ component: BibliographyPartFeatureComponent,
1600
+ canDeactivate: [PendingChangesGuard],
1601
+ },
1602
+ {
1603
+ path: `${CATEGORIES_PART_TYPEID}/:pid`,
1604
+ pathMatch: 'full',
1605
+ component: CategoriesPartFeatureComponent,
1606
+ canDeactivate: [PendingChangesGuard],
1607
+ },
1608
+ {
1609
+ path: `${COMMENT_PART_TYPEID}/:pid`,
1610
+ pathMatch: 'full',
1611
+ component: CommentPartFeatureComponent,
1612
+ canDeactivate: [PendingChangesGuard],
1613
+ },
1614
+ {
1615
+ path: `${DOC_REFERENCES_PART_TYPEID}/:pid`,
1616
+ pathMatch: 'full',
1617
+ component: DocReferencesPartFeatureComponent,
1618
+ canDeactivate: [PendingChangesGuard],
1619
+ },
1620
+ {
1621
+ path: `${HISTORICAL_DATE_PART_TYPEID}/:pid`,
1622
+ pathMatch: 'full',
1623
+ component: HistoricalDatePartFeatureComponent,
1624
+ canDeactivate: [PendingChangesGuard],
1625
+ },
1626
+ {
1627
+ path: `${KEYWORDS_PART_TYPEID}/:pid`,
1628
+ pathMatch: 'full',
1629
+ component: KeywordsPartFeatureComponent,
1630
+ canDeactivate: [PendingChangesGuard],
1631
+ },
1632
+ {
1633
+ path: `${INDEX_KEYWORDS_PART_TYPEID}/:pid`,
1634
+ pathMatch: 'full',
1635
+ component: IndexKeywordsPartFeatureComponent,
1636
+ canDeactivate: [PendingChangesGuard],
1637
+ },
1638
+ {
1639
+ path: `${NOTE_PART_TYPEID}/:pid`,
1640
+ pathMatch: 'full',
1641
+ component: NotePartFeatureComponent,
1642
+ canDeactivate: [PendingChangesGuard],
1643
+ },
1644
+ {
1645
+ path: `${TOKEN_TEXT_PART_TYPEID}/:pid`,
1646
+ pathMatch: 'full',
1647
+ component: TokenTextPartFeatureComponent,
1648
+ canDeactivate: [PendingChangesGuard],
1649
+ },
1650
+ {
1651
+ path: `${TILED_TEXT_PART_TYPEID}/:pid`,
1652
+ pathMatch: 'full',
1653
+ component: TiledTextPartFeatureComponent,
1654
+ canDeactivate: [PendingChangesGuard],
1655
+ },
1656
+ {
1657
+ path: 'it.vedph.token-text-layer/:pid',
1658
+ pathMatch: 'full',
1659
+ component: TokenTextLayerPartFeatureComponent,
1660
+ canDeactivate: [PendingChangesGuard],
1661
+ },
1662
+ {
1663
+ path: 'it.vedph.tiled-text-layer/:pid',
1664
+ pathMatch: 'full',
1665
+ component: TiledTextLayerPartFeatureComponent,
1666
+ canDeactivate: [PendingChangesGuard],
1667
+ },
1668
+ {
1669
+ path: `fragment/:pid/${COMMENT_FRAGMENT_TYPEID}/:loc`,
1670
+ pathMatch: 'full',
1671
+ component: CommentFragmentFeatureComponent,
1672
+ canDeactivate: [PendingChangesGuard],
1673
+ },
1674
+ {
1675
+ path: `fragment/:pid/${CHRONOLOGY_FRAGMENT_TYPEID}/:loc`,
1676
+ pathMatch: 'full',
1677
+ component: ChronologyFragmentFeatureComponent,
1678
+ canDeactivate: [PendingChangesGuard],
1679
+ },
1680
+ ]);
1681
+ class CadmusPartGeneralPgModule {
1682
+ }
1683
+ CadmusPartGeneralPgModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: CadmusPartGeneralPgModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1684
+ CadmusPartGeneralPgModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: CadmusPartGeneralPgModule, declarations: [BibliographyPartFeatureComponent,
1685
+ CategoriesPartFeatureComponent,
1686
+ ChronologyFragmentFeatureComponent,
1687
+ CommentFragmentFeatureComponent,
1688
+ CommentPartFeatureComponent,
1689
+ DocReferencesPartFeatureComponent,
1690
+ HistoricalDatePartFeatureComponent,
1691
+ IndexKeywordsPartFeatureComponent,
1692
+ KeywordsPartFeatureComponent,
1693
+ NotePartFeatureComponent,
1694
+ TiledTextLayerPartFeatureComponent,
1695
+ TiledTextPartFeatureComponent,
1696
+ TokenTextLayerPartFeatureComponent,
1697
+ TokenTextPartFeatureComponent], imports: [CommonModule,
1698
+ FormsModule,
1699
+ ReactiveFormsModule, i1.RouterModule,
1700
+ // cadmus
1701
+ CadmusCoreModule,
1702
+ CadmusMaterialModule,
1703
+ CadmusUiModule,
1704
+ CadmusPartGeneralUiModule,
1705
+ CadmusStateModule,
1706
+ CadmusUiPgModule,
1707
+ NgToolsModule,
1708
+ NgMatToolsModule], exports: [BibliographyPartFeatureComponent,
1709
+ CategoriesPartFeatureComponent,
1710
+ ChronologyFragmentFeatureComponent,
1711
+ CommentFragmentFeatureComponent,
1712
+ CommentPartFeatureComponent,
1713
+ DocReferencesPartFeatureComponent,
1714
+ HistoricalDatePartFeatureComponent,
1715
+ IndexKeywordsPartFeatureComponent,
1716
+ KeywordsPartFeatureComponent,
1717
+ NotePartFeatureComponent,
1718
+ TiledTextLayerPartFeatureComponent,
1719
+ TiledTextPartFeatureComponent,
1720
+ TokenTextLayerPartFeatureComponent,
1721
+ TokenTextPartFeatureComponent] });
1722
+ CadmusPartGeneralPgModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: CadmusPartGeneralPgModule, imports: [[
1723
+ CommonModule,
1724
+ FormsModule,
1725
+ ReactiveFormsModule,
1726
+ RouterModuleForChild,
1727
+ // cadmus
1728
+ CadmusCoreModule,
1729
+ CadmusMaterialModule,
1730
+ CadmusUiModule,
1731
+ CadmusPartGeneralUiModule,
1732
+ CadmusStateModule,
1733
+ CadmusUiPgModule,
1734
+ NgToolsModule,
1735
+ NgMatToolsModule,
1736
+ ]] });
1737
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: CadmusPartGeneralPgModule, decorators: [{
1738
+ type: NgModule,
1739
+ args: [{
1740
+ imports: [
1741
+ CommonModule,
1742
+ FormsModule,
1743
+ ReactiveFormsModule,
1744
+ RouterModuleForChild,
1745
+ // cadmus
1746
+ CadmusCoreModule,
1747
+ CadmusMaterialModule,
1748
+ CadmusUiModule,
1749
+ CadmusPartGeneralUiModule,
1750
+ CadmusStateModule,
1751
+ CadmusUiPgModule,
1752
+ NgToolsModule,
1753
+ NgMatToolsModule,
1754
+ ],
1755
+ declarations: [
1756
+ BibliographyPartFeatureComponent,
1757
+ CategoriesPartFeatureComponent,
1758
+ ChronologyFragmentFeatureComponent,
1759
+ CommentFragmentFeatureComponent,
1760
+ CommentPartFeatureComponent,
1761
+ DocReferencesPartFeatureComponent,
1762
+ HistoricalDatePartFeatureComponent,
1763
+ IndexKeywordsPartFeatureComponent,
1764
+ KeywordsPartFeatureComponent,
1765
+ NotePartFeatureComponent,
1766
+ TiledTextLayerPartFeatureComponent,
1767
+ TiledTextPartFeatureComponent,
1768
+ TokenTextLayerPartFeatureComponent,
1769
+ TokenTextPartFeatureComponent,
1770
+ ],
1771
+ exports: [
1772
+ BibliographyPartFeatureComponent,
1773
+ CategoriesPartFeatureComponent,
1774
+ ChronologyFragmentFeatureComponent,
1775
+ CommentFragmentFeatureComponent,
1776
+ CommentPartFeatureComponent,
1777
+ DocReferencesPartFeatureComponent,
1778
+ HistoricalDatePartFeatureComponent,
1779
+ IndexKeywordsPartFeatureComponent,
1780
+ KeywordsPartFeatureComponent,
1781
+ NotePartFeatureComponent,
1782
+ TiledTextLayerPartFeatureComponent,
1783
+ TiledTextPartFeatureComponent,
1784
+ TokenTextLayerPartFeatureComponent,
1785
+ TokenTextPartFeatureComponent,
1786
+ ],
1787
+ }]
1788
+ }] });
1789
+
1790
+ /*
1791
+ * Public API Surface of cadmus-part-general-pg
1792
+ */
1793
+
1794
+ /**
1795
+ * Generated bundle index. Do not edit.
1796
+ */
1797
+
1798
+ export { BibliographyPartFeatureComponent, CadmusPartGeneralPgModule, CategoriesPartFeatureComponent, ChronologyFragmentFeatureComponent, CommentFragmentFeatureComponent, CommentPartFeatureComponent, DocReferencesPartFeatureComponent, HistoricalDatePartFeatureComponent, IndexKeywordsPartFeatureComponent, KeywordsPartFeatureComponent, NotePartFeatureComponent, RouterModuleForChild, TiledTextLayerPartFeatureComponent, TiledTextPartFeatureComponent, TokenTextLayerPartFeatureComponent, TokenTextPartFeatureComponent };