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