@myrmidon/cadmus-part-general-pg
Version:
Cadmus - general parts wrappers.
1,698 lines • 129 kB
JavaScript
import * as i0 from '@angular/core';
import { Component, NgModule } from '@angular/core';
import { AssertedHistoricalDatesPartComponent, BibliographyPartComponent, CategoriesPartComponent, ChronologyFragmentComponent, ChronotopesPartComponent, CommentEditorComponent, DecoratedCountsPartComponent, DistrictLocationPartComponent, DocReferencesPartComponent, ExternalIdsPartComponent, HistoricalDatePartComponent, HistoricalEventsPartComponent, IndexKeywordsPartComponent, KeywordsPartComponent, MetadataPartComponent, NamesPartComponent, NotePartComponent, PhysicalMeasurementsPartComponent, PhysicalStatesPartComponent, PinLinksFragmentComponent, PinLinksPartComponent, TextTileComponent, TiledTextPartComponent, TokenTextPartComponent, ASSERTED_HISTORICAL_DATES_PART_TYPEID, BIBLIOGRAPHY_PART_TYPEID, CATEGORIES_PART_TYPEID, COMMENT_PART_TYPEID, CHRONOTOPES_PART_TYPEID, DECORATED_COUNTS_PART_TYPEID, DISTRICT_LOCATION_PART_TYPEID, DOC_REFERENCES_PART_TYPEID, EXTERNAL_IDS_PART_TYPEID, HISTORICAL_DATE_PART_TYPEID, HISTORICAL_EVENTS_PART_TYPEID, KEYWORDS_PART_TYPEID, INDEX_KEYWORDS_PART_TYPEID, METADATA_PART_TYPEID, NAMES_PART_TYPEID, NOTE_PART_TYPEID, PHYSICAL_MEASUREMENTS_PART_TYPEID, PHYSICAL_STATES_PART_TYPEID, PIN_LINKS_PART_TYPEID, TOKEN_TEXT_PART_TYPEID, TILED_TEXT_PART_TYPEID, COMMENT_FRAGMENT_TYPEID, CHRONOLOGY_FRAGMENT_TYPEID, PIN_LINKS_FRAGMENT_TYPEID } from '@myrmidon/cadmus-part-general-ui';
import * as i4 from '@myrmidon/cadmus-state';
import { EditPartFeatureBase, EditFragmentFeatureBase } from '@myrmidon/cadmus-state';
import { CurrentItemBarComponent, CurrentLayerPartBarComponent } from '@myrmidon/cadmus-ui-pg';
import * as i1 from '@angular/router';
import { RouterModule } from '@angular/router';
import * as i2 from '@angular/material/snack-bar';
import * as i3 from '@myrmidon/cadmus-api';
import { DecoratedTokenTextComponent, LayerHintsComponent } from '@myrmidon/cadmus-ui';
import * as i4$1 from '@myrmidon/cadmus-core';
import { TokenLocation, TokenPoint, PendingChangesGuard } from '@myrmidon/cadmus-core';
import { AsyncPipe, CommonModule } from '@angular/common';
import { map } from 'rxjs';
import { MatCard, MatCardHeader, MatCardAvatar, MatCardTitle, MatCardActions, MatCardContent, MatCardModule } from '@angular/material/card';
import { MatIcon, MatIconModule } from '@angular/material/icon';
import { MatIconButton, MatButton, MatButtonModule } from '@angular/material/button';
import { MatTooltip, MatTooltipModule } from '@angular/material/tooltip';
import { MatToolbar, MatToolbarModule } from '@angular/material/toolbar';
import { MatProgressBar, MatProgressBarModule } from '@angular/material/progress-bar';
import { MatExpansionPanel, MatExpansionPanelHeader, MatExpansionPanelTitle, MatExpansionPanelDescription, MatExpansionModule } from '@angular/material/expansion';
import * as i4$2 from '@myrmidon/cadmus-item-editor';
import * as i5 from '@myrmidon/ngx-mat-tools';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatInputModule } from '@angular/material/input';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { MatSelectModule } from '@angular/material/select';
class AssertedHistoricalDateFeatureComponent extends EditPartFeatureBase {
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
super(router, route, snackbar, itemService, thesaurusService, editorService);
}
getReqThesauriIds() {
return [
'asserted-historical-dates-tags',
'assertion-tags',
'doc-reference-types',
'doc-reference-tags',
];
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: AssertedHistoricalDateFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: AssertedHistoricalDateFeatureComponent, isStandalone: true, selector: "cadmus-asserted-historical-date-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar />\r\n<cadmus-asserted-historical-dates-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n", styles: [""], dependencies: [{ kind: "component", type: CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { kind: "component", type: AssertedHistoricalDatesPartComponent, selector: "cadmus-asserted-historical-dates-part" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: AssertedHistoricalDateFeatureComponent, decorators: [{
type: Component,
args: [{ selector: 'cadmus-asserted-historical-date-feature', imports: [CurrentItemBarComponent, AssertedHistoricalDatesPartComponent], template: "<cadmus-current-item-bar />\r\n<cadmus-asserted-historical-dates-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n" }]
}], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }] });
class BibliographyPartFeatureComponent extends EditPartFeatureBase {
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
super(router, route, snackbar, itemService, thesaurusService, editorService);
}
getReqThesauriIds() {
return [
'bibliography-languages',
'bibliography-types',
'bibliography-tags',
'bibliography-author-roles',
];
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: BibliographyPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: BibliographyPartFeatureComponent, isStandalone: true, selector: "cadmus-bibliography-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar/>\r\n<cadmus-bibliography-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n", styles: [""], dependencies: [{ kind: "component", type: CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { kind: "component", type: BibliographyPartComponent, selector: "cadmus-bibliography-part" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: BibliographyPartFeatureComponent, decorators: [{
type: Component,
args: [{ selector: 'cadmus-bibliography-part-feature', imports: [CurrentItemBarComponent, BibliographyPartComponent], template: "<cadmus-current-item-bar/>\r\n<cadmus-bibliography-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n" }]
}], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }] });
class CategoriesPartFeatureComponent extends EditPartFeatureBase {
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
super(router, route, snackbar, itemService, thesaurusService, editorService);
this.roleIdInThesauri = true;
}
getReqThesauriIds() {
return ['categories'];
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CategoriesPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: CategoriesPartFeatureComponent, isStandalone: true, selector: "cadmus-categories-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar/>\r\n<cadmus-categories-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n", styles: [""], dependencies: [{ kind: "component", type: CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { kind: "component", type: CategoriesPartComponent, selector: "cadmus-categories-part" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CategoriesPartFeatureComponent, decorators: [{
type: Component,
args: [{ selector: 'cadmus-categories-part-feature', imports: [CurrentItemBarComponent, CategoriesPartComponent], template: "<cadmus-current-item-bar/>\r\n<cadmus-categories-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n" }]
}], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }] });
class ChronologyFragmentFeatureComponent extends EditFragmentFeatureBase {
constructor(router, route, snackbar, editorService, libraryRouteService) {
super(router, route, snackbar, editorService, libraryRouteService);
}
getReqThesauriIds() {
return ['chronology-tags'];
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: ChronologyFragmentFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i4.FragmentEditorService }, { token: i4$1.LibraryRouteService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: ChronologyFragmentFeatureComponent, isStandalone: true, selector: "cadmus-chronology-fragment-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar/>\r\n<div class=\"base-text\">\r\n <cadmus-decorated-token-text\r\n [baseText]=\"data?.baseText || ''\"\r\n [locations]=\"frLoc ? [frLoc] : []\"\r\n />\r\n</div>\r\n<cadmus-chronology-fragment\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n", styles: [""], dependencies: [{ kind: "component", type: CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { kind: "component", type: DecoratedTokenTextComponent, selector: "cadmus-decorated-token-text", inputs: ["baseText", "locations", "selectedLocation"] }, { kind: "component", type: ChronologyFragmentComponent, selector: "cadmus-chronology-fragment" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: ChronologyFragmentFeatureComponent, decorators: [{
type: Component,
args: [{ selector: 'cadmus-chronology-fragment-feature', imports: [
CurrentItemBarComponent,
DecoratedTokenTextComponent,
ChronologyFragmentComponent,
], template: "<cadmus-current-item-bar/>\r\n<div class=\"base-text\">\r\n <cadmus-decorated-token-text\r\n [baseText]=\"data?.baseText || ''\"\r\n [locations]=\"frLoc ? [frLoc] : []\"\r\n />\r\n</div>\r\n<cadmus-chronology-fragment\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n" }]
}], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i4.FragmentEditorService }, { type: i4$1.LibraryRouteService }] });
class ChronotopesPartFeatureComponent extends EditPartFeatureBase {
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
super(router, route, snackbar, itemService, thesaurusService, editorService);
}
getReqThesauriIds() {
return [
'chronotope-place-tags',
'chronotope-assertion-tags',
'doc-reference-types',
'doc-reference-tags',
];
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: ChronotopesPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: ChronotopesPartFeatureComponent, isStandalone: true, selector: "cadmus-chronotopes-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar/>\r\n<cadmus-chronotopes-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n", styles: [""], dependencies: [{ kind: "component", type: CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { kind: "component", type: ChronotopesPartComponent, selector: "cadmus-chronotopes-part" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: ChronotopesPartFeatureComponent, decorators: [{
type: Component,
args: [{ selector: 'cadmus-chronotopes-part-feature', imports: [CurrentItemBarComponent, ChronotopesPartComponent], template: "<cadmus-current-item-bar/>\r\n<cadmus-chronotopes-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n" }]
}], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }] });
class CommentFragmentFeatureComponent extends EditFragmentFeatureBase {
constructor(router, route, snackbar, editorService, libraryRouteService) {
super(router, route, snackbar, editorService, libraryRouteService);
}
getReqThesauriIds() {
return [
'comment-tags',
'doc-reference-tags',
'doc-reference-types',
'comment-categories',
'languages',
'keyword-indexes',
'keyword-tags',
'comment-id-scopes',
'comment-id-tags',
'assertion-tags',
'pin-link-settings',
];
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CommentFragmentFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i4.FragmentEditorService }, { token: i4$1.LibraryRouteService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: CommentFragmentFeatureComponent, isStandalone: true, selector: "cadmus-comment-fragment-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar />\r\n<div class=\"base-text\">\r\n <cadmus-decorated-token-text\r\n [baseText]=\"data?.baseText || ''\"\r\n [locations]=\"frLoc ? [frLoc] : []\"\r\n />\r\n</div>\r\n<cadmus-comment-editor\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($any($event!.value!))\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n", styles: ["div.base-text{margin:12px;border:1px solid #f0f0f0;border-radius:4px;padding:8px}\n"], dependencies: [{ kind: "component", type: CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { kind: "component", type: DecoratedTokenTextComponent, selector: "cadmus-decorated-token-text", inputs: ["baseText", "locations", "selectedLocation"] }, { kind: "component", type: CommentEditorComponent, selector: "cadmus-comment-editor" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CommentFragmentFeatureComponent, decorators: [{
type: Component,
args: [{ selector: 'cadmus-comment-fragment-feature', imports: [
CurrentItemBarComponent,
DecoratedTokenTextComponent,
CommentEditorComponent,
], template: "<cadmus-current-item-bar />\r\n<div class=\"base-text\">\r\n <cadmus-decorated-token-text\r\n [baseText]=\"data?.baseText || ''\"\r\n [locations]=\"frLoc ? [frLoc] : []\"\r\n />\r\n</div>\r\n<cadmus-comment-editor\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($any($event!.value!))\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n", styles: ["div.base-text{margin:12px;border:1px solid #f0f0f0;border-radius:4px;padding:8px}\n"] }]
}], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i4.FragmentEditorService }, { type: i4$1.LibraryRouteService }] });
class CommentPartFeatureComponent extends EditPartFeatureBase {
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
super(router, route, snackbar, itemService, thesaurusService, editorService);
this.roleIdInThesauri = true;
}
getReqThesauriIds() {
return [
'comment-tags',
'doc-reference-tags',
'doc-reference-types',
'comment-categories',
'languages',
'keyword-indexes',
'keyword-tags',
'comment-id-scopes',
'comment-id-tags',
'assertion-tags',
'pin-link-settings',
];
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CommentPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: CommentPartFeatureComponent, isStandalone: true, selector: "cadmus-comment-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar/>\r\n<cadmus-comment-editor\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($any($event!.value!))\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n", styles: [""], dependencies: [{ kind: "component", type: CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { kind: "component", type: CommentEditorComponent, selector: "cadmus-comment-editor" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CommentPartFeatureComponent, decorators: [{
type: Component,
args: [{ selector: 'cadmus-comment-part-feature', imports: [CurrentItemBarComponent, CommentEditorComponent], template: "<cadmus-current-item-bar/>\r\n<cadmus-comment-editor\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($any($event!.value!))\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n" }]
}], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }] });
class DecoratedCountsPartFeatureComponent extends EditPartFeatureBase {
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
super(router, route, snackbar, itemService, thesaurusService, editorService);
this.roleIdInThesauri = true;
}
getReqThesauriIds() {
return ['decorated-count-ids', 'decorated-count-tags'];
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: DecoratedCountsPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: DecoratedCountsPartFeatureComponent, isStandalone: true, selector: "cadmus-decorated-counts-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar />\r\n<cadmus-decorated-counts-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n", styles: [""], dependencies: [{ kind: "component", type: CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { kind: "component", type: DecoratedCountsPartComponent, selector: "cadmus-decorated-counts-part" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: DecoratedCountsPartFeatureComponent, decorators: [{
type: Component,
args: [{ selector: 'cadmus-decorated-counts-part-feature', imports: [CurrentItemBarComponent, DecoratedCountsPartComponent], template: "<cadmus-current-item-bar />\r\n<cadmus-decorated-counts-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n" }]
}], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }] });
class DistrictLocationPartFeatureComponent extends EditPartFeatureBase {
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
super(router, route, snackbar, itemService, thesaurusService, editorService);
}
getReqThesauriIds() {
return ['district-name-piece-types', 'district-name-lang-entries'];
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: DistrictLocationPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: DistrictLocationPartFeatureComponent, isStandalone: true, selector: "cadmus-district-location-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar/>\r\n<cadmus-district-location-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n", styles: [""], dependencies: [{ kind: "component", type: CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { kind: "component", type: DistrictLocationPartComponent, selector: "cadmus-district-location-part" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: DistrictLocationPartFeatureComponent, decorators: [{
type: Component,
args: [{ selector: 'cadmus-district-location-part-feature', imports: [CurrentItemBarComponent, DistrictLocationPartComponent], template: "<cadmus-current-item-bar/>\r\n<cadmus-district-location-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n" }]
}], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }] });
class DocReferencesPartFeatureComponent extends EditPartFeatureBase {
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
super(router, route, snackbar, itemService, thesaurusService, editorService);
}
getReqThesauriIds() {
return ['doc-reference-tags', 'doc-reference-types'];
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: DocReferencesPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: DocReferencesPartFeatureComponent, isStandalone: true, selector: "cadmus-doc-references-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar/>\r\n<cadmus-doc-references-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n", styles: [""], dependencies: [{ kind: "component", type: CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { kind: "component", type: DocReferencesPartComponent, selector: "cadmus-doc-references-part" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: DocReferencesPartFeatureComponent, decorators: [{
type: Component,
args: [{ selector: 'cadmus-doc-references-part-feature', imports: [CurrentItemBarComponent, DocReferencesPartComponent], template: "<cadmus-current-item-bar/>\r\n<cadmus-doc-references-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n" }]
}], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }] });
class ExternalIdsPartFeatureComponent extends EditPartFeatureBase {
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
super(router, route, snackbar, itemService, thesaurusService, editorService);
this.roleIdInThesauri = true;
}
getReqThesauriIds() {
return [
'external-id-scopes',
'external-id-tags',
'assertion-tags',
'doc-reference-types',
'doc-reference-tags',
];
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: ExternalIdsPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: ExternalIdsPartFeatureComponent, isStandalone: true, selector: "cadmus-refs-external-ids-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar/>\r\n<cadmus-refs-external-ids-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n", styles: [""], dependencies: [{ kind: "component", type: CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { kind: "component", type: ExternalIdsPartComponent, selector: "cadmus-refs-external-ids-part" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: ExternalIdsPartFeatureComponent, decorators: [{
type: Component,
args: [{ selector: 'cadmus-refs-external-ids-part-feature', imports: [CurrentItemBarComponent, ExternalIdsPartComponent], template: "<cadmus-current-item-bar/>\r\n<cadmus-refs-external-ids-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n" }]
}], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }] });
class HistoricalDatePartFeatureComponent extends EditPartFeatureBase {
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
super(router, route, snackbar, itemService, thesaurusService, editorService);
}
getReqThesauriIds() {
return ['doc-reference-tags', 'doc-reference-types'];
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: HistoricalDatePartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: HistoricalDatePartFeatureComponent, isStandalone: true, selector: "cadmus-historical-date-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar/>\r\n<cadmus-historical-date-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n", styles: [""], dependencies: [{ kind: "component", type: CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { kind: "component", type: HistoricalDatePartComponent, selector: "cadmus-historical-date-part" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: HistoricalDatePartFeatureComponent, decorators: [{
type: Component,
args: [{ selector: 'cadmus-historical-date-part-feature', imports: [CurrentItemBarComponent, HistoricalDatePartComponent], template: "<cadmus-current-item-bar/>\r\n<cadmus-historical-date-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n" }]
}], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }] });
class HistoricalEventsPartFeatureComponent extends EditPartFeatureBase {
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
super(router, route, snackbar, itemService, thesaurusService, editorService);
this.roleIdInThesauri = true;
}
getReqThesauriIds() {
return [
'event-types',
'event-tags',
'event-relations',
'chronotope-tags',
'assertion-tags',
'doc-reference-tags',
'doc-reference-types',
'pin-link-scopes',
'pin-link-tags',
'pin-link-settings',
];
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: HistoricalEventsPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: HistoricalEventsPartFeatureComponent, isStandalone: true, selector: "cadmus-historical-events-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar/>\r\n<cadmus-historical-events-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n", styles: [""], dependencies: [{ kind: "component", type: CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { kind: "component", type: HistoricalEventsPartComponent, selector: "cadmus-historical-events-part" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: HistoricalEventsPartFeatureComponent, decorators: [{
type: Component,
args: [{ selector: 'cadmus-historical-events-part-feature', imports: [CurrentItemBarComponent, HistoricalEventsPartComponent], template: "<cadmus-current-item-bar/>\r\n<cadmus-historical-events-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n" }]
}], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }] });
class IndexKeywordsPartFeatureComponent extends EditPartFeatureBase {
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
super(router, route, snackbar, itemService, thesaurusService, editorService);
}
getReqThesauriIds() {
return ['languages', 'keyword-indexes', 'keyword-tags'];
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: IndexKeywordsPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: IndexKeywordsPartFeatureComponent, isStandalone: true, selector: "cadmus-index-keywords-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar/>\r\n<cadmus-index-keywords-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n", styles: [""], dependencies: [{ kind: "component", type: CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { kind: "component", type: IndexKeywordsPartComponent, selector: "cadmus-index-keywords-part" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: IndexKeywordsPartFeatureComponent, decorators: [{
type: Component,
args: [{ selector: 'cadmus-index-keywords-part-feature', imports: [CurrentItemBarComponent, IndexKeywordsPartComponent], template: "<cadmus-current-item-bar/>\r\n<cadmus-index-keywords-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n" }]
}], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }] });
class KeywordsPartFeatureComponent extends EditPartFeatureBase {
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
super(router, route, snackbar, itemService, thesaurusService, editorService);
}
getReqThesauriIds() {
return ['languages'];
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: KeywordsPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: KeywordsPartFeatureComponent, isStandalone: true, selector: "cadmus-keywords-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar/>\r\n<cadmus-keywords-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n", styles: [""], dependencies: [{ kind: "component", type: CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { kind: "component", type: KeywordsPartComponent, selector: "cadmus-keywords-part" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: KeywordsPartFeatureComponent, decorators: [{
type: Component,
args: [{ selector: 'cadmus-keywords-part-feature', imports: [CurrentItemBarComponent, KeywordsPartComponent], template: "<cadmus-current-item-bar/>\r\n<cadmus-keywords-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n" }]
}], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }] });
class MetadataPartFeatureComponent extends EditPartFeatureBase {
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
super(router, route, snackbar, itemService, thesaurusService, editorService);
}
getReqThesauriIds() {
return ['metadata-types', 'metadata-names'];
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: MetadataPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: MetadataPartFeatureComponent, isStandalone: true, selector: "cadmus-metadata-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar/>\r\n<cadmus-metadata-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n", styles: [""], dependencies: [{ kind: "component", type: CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { kind: "component", type: MetadataPartComponent, selector: "cadmus-metadata-part" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: MetadataPartFeatureComponent, decorators: [{
type: Component,
args: [{ selector: 'cadmus-metadata-part-feature', imports: [CurrentItemBarComponent, MetadataPartComponent], template: "<cadmus-current-item-bar/>\r\n<cadmus-metadata-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n" }]
}], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }] });
class NamesPartFeatureComponent extends EditPartFeatureBase {
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
super(router, route, snackbar, itemService, thesaurusService, editorService);
this.roleIdInThesauri = true;
}
getReqThesauriIds() {
return [
'name-languages',
'name-tags',
'name-piece-types',
'assertion-tags',
'doc-reference-types',
'doc-reference-tags',
];
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NamesPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: NamesPartFeatureComponent, isStandalone: true, selector: "cadmus-names-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar/>\r\n<cadmus-names-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n", styles: [""], dependencies: [{ kind: "component", type: CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { kind: "component", type: NamesPartComponent, selector: "cadmus-names-part" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NamesPartFeatureComponent, decorators: [{
type: Component,
args: [{ selector: 'cadmus-names-part-feature', imports: [CurrentItemBarComponent, NamesPartComponent], template: "<cadmus-current-item-bar/>\r\n<cadmus-names-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n" }]
}], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }] });
class NotePartFeatureComponent extends EditPartFeatureBase {
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
super(router, route, snackbar, itemService, thesaurusService, editorService);
this.roleIdInThesauri = true;
}
getReqThesauriIds() {
return ['note-tags'];
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NotePartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: NotePartFeatureComponent, isStandalone: true, selector: "cadmus-note-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar/>\r\n<cadmus-note-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n", styles: [""], dependencies: [{ kind: "component", type: CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { kind: "component", type: NotePartComponent, selector: "cadmus-note-part" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: NotePartFeatureComponent, decorators: [{
type: Component,
args: [{ selector: 'cadmus-note-part-feature', imports: [CurrentItemBarComponent, NotePartComponent], template: "<cadmus-current-item-bar/>\r\n<cadmus-note-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n" }]
}], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }] });
class PhysicalMeasurementsPartFeatureComponent extends EditPartFeatureBase {
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
super(router, route, snackbar, itemService, thesaurusService, editorService);
this.roleIdInThesauri = true;
}
getReqThesauriIds() {
return [
'physical-size-units',
'physical-size-dim-tags',
'physical-size-set-names',
];
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: PhysicalMeasurementsPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: PhysicalMeasurementsPartFeatureComponent, isStandalone: true, selector: "cadmus-physical-measurements-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar/>\r\n<cadmus-physical-measurements-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n", styles: [""], dependencies: [{ kind: "component", type: CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { kind: "component", type: PhysicalMeasurementsPartComponent, selector: "cadmus-physical-measurements-part" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: PhysicalMeasurementsPartFeatureComponent, decorators: [{
type: Component,
args: [{ selector: 'cadmus-physical-measurements-part-feature', imports: [CurrentItemBarComponent, PhysicalMeasurementsPartComponent], template: "<cadmus-current-item-bar/>\r\n<cadmus-physical-measurements-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n" }]
}], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }] });
class PhysicalStatesPartFeatureComponent extends EditPartFeatureBase {
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
super(router, route, snackbar, itemService, thesaurusService, editorService);
}
getReqThesauriIds() {
return [
'physical-states',
'physical-state-features',
'physical-state-reporters',
];
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: PhysicalStatesPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: PhysicalStatesPartFeatureComponent, isStandalone: true, selector: "cadmus-physical-states-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar/>\r\n<cadmus-physical-states-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n", styles: [""], dependencies: [{ kind: "component", type: CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { kind: "component", type: PhysicalStatesPartComponent, selector: "cadmus-physical-states-part" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: PhysicalStatesPartFeatureComponent, decorators: [{
type: Component,
args: [{ selector: 'cadmus-physical-states-part-feature', imports: [CurrentItemBarComponent, PhysicalStatesPartComponent], template: "<cadmus-current-item-bar/>\r\n<cadmus-physical-states-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n" }]
}], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }] });
class PinLinksFragmentFeatureComponent extends EditFragmentFeatureBase {
constructor(router, route, snackbar, editorService, libraryRouteService) {
super(router, route, snackbar, editorService, libraryRouteService);
}
getReqThesauriIds() {
return [
'pin-link-scopes',
'pin-link-tags',
'pin-link-assertion-tags',
'pin-link-docref-types',
'pin-link-docref-tags',
'pin-link-settings',
];
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: PinLinksFragmentFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i4.FragmentEditorService }, { token: i4$1.LibraryRouteService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: PinLinksFragmentFeatureComponent, isStandalone: true, selector: "cadmus-pin-links-fragment-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar/>\r\n<div class=\"base-text\">\r\n <cadmus-decorated-token-text\r\n [baseText]=\"data?.baseText || ''\"\r\n [locations]=\"frLoc ? [frLoc] : []\"\r\n />\r\n</div>\r\n<cadmus-pin-links-fragment\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n", styles: [""], dependencies: [{ kind: "component", type: CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { kind: "component", type: DecoratedTokenTextComponent, selector: "cadmus-decorated-token-text", inputs: ["baseText", "locations", "selectedLocation"] }, { kind: "component", type: PinLinksFragmentComponent, selector: "cadmus-pin-links-fragment" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: PinLinksFragmentFeatureComponent, decorators: [{
type: Component,
args: [{ selector: 'cadmus-pin-links-fragment-feature', imports: [
CurrentItemBarComponent,
DecoratedTokenTextComponent,
PinLinksFragmentComponent,
], template: "<cadmus-current-item-bar/>\r\n<div class=\"base-text\">\r\n <cadmus-decorated-token-text\r\n [baseText]=\"data?.baseText || ''\"\r\n [locations]=\"frLoc ? [frLoc] : []\"\r\n />\r\n</div>\r\n<cadmus-pin-links-fragment\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n" }]
}], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i4.FragmentEditorService }, { type: i4$1.LibraryRouteService }] });
class PinLinksPartFeatureComponent extends EditPartFeatureBase {
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
super(router, route, snackbar, itemService, thesaurusService, editorService);
}
getReqThesauriIds() {
return [
'pin-link-scopes',
'pin-link-tags',
'pin-link-assertion-tags',
'pin-link-docref-types',
'pin-link-docref-tags',
'pin-link-settings',
];
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: PinLinksPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: PinLinksPartFeatureComponent, isStandalone: true, selector: "cadmus-pin-links-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar/>\r\n<cadmus-pin-links-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n", styles: [""], dependencies: [{ kind: "component", type: CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { kind: "component", type: PinLinksPartComponent, selector: "cadmus-pin-links-part" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: PinLinksPartFeatureComponent, decorators: [{
type: Component,
args: [{ selector: 'cadmus-pin-links-part-feature', imports: [CurrentItemBarComponent, PinLinksPartComponent], template: "<cadmus-current-item-bar/>\r\n<cadmus-pin-links-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n" }]
}], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }] });
/**
* The layer view model for a tiled text.
*/
class TiledTextLayerView {
_rows;
/**
* Create a new view from the specified tiled text.
* @param rows The tiled text rows.
*/
constructor(rows) {
// setup rows to reflect the text
this._rows = [];
if (rows) {
// for each row
for (let i = 0; i < rows.length; i++) {
this._rows[i] = {
tiles: [],
};
// for each tile in row
for (let j = 0; j < (rows[i].tiles ? rows[i].tiles.length : 0); j++) {
this._rows[i].tiles[j] = {
checked: false,
frIndex: -1,
model: rows[i].tiles[j],
};
}
}
}
}
/**
* The internal rows view models.
*/
get rows() {
return this._rows;
}
/**
* Get the tile at the specified coordinates.
*
* @param y The tile's y coordinate.
* @param x The tile's x coordinate.
*/
getTileAt(y, x) {
return this._rows[y - 1].tiles[x - 1];
}
/**
* Set the view state of all the tiles.
*
* @param state The state values to set in each tile's state.
* @param setChecked True to set the checked property of states.
* @param setFrIndex True to set the frIndex property of states.
*/
setAllTilesViewState(state) {
const hasChecked = state.hasOwnProperty('checked');
const hasFrIndex = state.hasOwnProperty('frIndex');
if (!hasChecked && !hasFrIndex) {
return;
}
// for each row
for (let i = 0; i < this._rows.length; i++) {
const row = this._rows[i];
// for each tile in row
for (let j = 0; j < row.tiles.length; j++) {
const tile = row.tiles[j];
row.tiles[j] = {
checked: (hasChecked ? state.checked : tile.checked) ? true : false,
frIndex: hasFrIndex ? state.frIndex || -1 : tile.frIndex,
model: tile.model,
};
}
}
}
/**
* Set the fragment index of each tile in this view. This is equal to the
* index to the fragment including the tile, when the tile is inside that
* fragment, or to -1, when the tile is outside any fragment. Fragment indexes
* refer to their locations, as received by this function.
*
* @param locations Fragments locations.
*/
setFragmentLocations(locations) {
// reset all the tiles fragment indexes
this.setAllTilesViewState({ frIndex: -1 });
// for each fragment's location
for (let i = 0; i < locations.length; i++) {
const loc = locations[i];
if (loc.secondary) {
// range
for (let y = loc.primary.y; y <= loc.secondary.y; y++) {
const row = this._rows[y - 1];
for (let x = y === loc.primary.y ? loc.primary.x : 1; y === loc.secondary.y
? x <= loc.secondary.x
: x <= row.tiles.length; x++) {
const tile = row.tiles[x - 1];
row.tiles[x - 1] = {
checked: tile.checked,
frIndex: i,
model: tile.model,
};
}
}
}
else {
// point
const tile = this.getTileAt(loc.primary.y, loc.primary.x);
if (tile) {
this._rows[loc.primary.y - 1].tiles[loc.primary.x - 1] = {
checked: tile.checked,
frIndex: i,
model: tile.model,
};
}
}
}
}
/**
* Find the coordinates of the first tile having the specified checked state,
* starting from the specified coordinates.
*
* @param y The y coordinates to start from.
* @param x The x coordinates to start from.
* @param checked True to find checked tiles, false to find unchecked tiles.
* @param reverse True to find in reverse direction.
* @returns The coordinates, or null if not found.
*/
findFirstCheckedCoords(y, x, checked, reverse = false) {
if (reverse) {
let xstart = x;
while (true) {
for (let xi = xstart; xi >= 1; xi--) {
if (this.getTileAt(y, xi).checked === checked) {
return {
y,
x: xi,
};
}
}
if (--y > 0) {
xstart = this._rows[y - 1].tiles.length;
}
else {
break;
}
}
}
else {
let xstart = x;
while (true) {
for (let xi = xstart; xi <= this._rows[y - 1].tiles.length; xi++) {
if (this.getTileAt(y, xi).checked === checked) {
return {
y,
x: xi,
};
}
}
if (++y <= this._rows.length) {
xstart = 1;
}
else {
break;
}
}
}
return null;
}
/**
* "Linearly" set the checked state in the specified range of checked tiles.
*
* @param y1 The start y coordinate.
* @param x1 The start x coordinate.
* @param y2 The end y coordinate (included).
* @param x2 The end x coordinate (included).
* @param checked The state to be set.
*/
linearSetCheck(y1, x1, y2, x2, checked) {
for (let y = y1; y <= y2; y++) {
const row = this._rows[y - 1];
for (let x = y === y1 ? x1 : 1; y === y2 ? x <= x2 : x <= row.tiles.length; x++) {
const tile = row.tiles[x - 1];
row.tiles[x - 1] = {
frIndex: tile.frIndex,
checked,
model: tile.model,
};
}
}
}
/**
* Get the coordinates of the next tile starting from the specified origin
* tile. The next tile is the tile to the right of the origin tile in the
* same row, or the first tile of the next row (if any) when the origin is
* the last tile in its row.
*
* @param y The y coordinate of the origin tile.
* @param x The x coordinate of the origin tile.
* @returns The coordinates, or null if no other tiles after origin.
*/
getNextTileCoords(y, x) {
if (x < this._rows[y - 1].tiles.length) {
return {
y,
x: x + 1,
};
}
y++;
while (y <= this._rows.length) {
if (this._rows[y - 1].tiles.length > 0) {
return {
y,
x: 1,
};
}
y++;
}
return null;
}
/**
* Get the coordinates of the previous tile starting from the specified origin
* tile. The previous tile is the tile to the left of the origin tile in the
* same row, or the last tile of the previous row (if any) when the origin is
* the first tile in its row.
*
* @param y The y coordinate of the origin tile.
* @param x The x coordinate of the origin tile.
* @returns The coordinates, or null if no other tiles before origin.
*/
getPrevTileCoords(y, x) {
if (x > 1) {
return {
y,
x: x - 1,
};
}
y--;
while (y > 0) {
if (this._rows[y - 1].tiles.length > 0) {
return {
y,
x: this._rows[y - 1].tiles.length,
};
}
y--;
}
return null;
}
/**
* "Linearly" toggle the tiles according to the specified toggle action
* in the specified set of tiles rows. When users toggle a tile from unchecked
* to checked, and any other tile was checked, the checked state must be
* extended so that all the tiles between the newly checked tile and the old
* one(s) are checked, so that they form a continuous "line", eventually
* spanning rows. The same inversely applies when un-checking tiles. This
* ensures that users can select a single range of tiles by toggling at any
* of its ends.
*
* @param y The y coordinate of the tile which was toggled.
* @param x The x coordinate of the tile which was toggled.
* @param checked The new checked state after toggling the tile.
*/
toggleLinearTileCheck(y, x, checked) {
// if it was checked, it was toggled from unchecked
if (checked) {
// find 1st next checked:
let yx = this.findFirstCheckedCoords(y, x, true);
// found: extend from it to y,x
if (yx) {
this.linearSetCheck(yx.y, yx.x, y, x, true);
return;
}
// not found: find 1st prev checked:
yx = this.findFirstCheckedCoords(y, x, true, true);
// found: extend from it to y,x
if (yx) {
this.linearSetCheck(yx.y, yx.x, y, x, true);
return;
}
// not found: check y,x
const tile = this.getTileAt(y, x);
this._rows[y - 1].tiles[x - 1] = {
checked: true,
frIndex: tile.frIndex,
model: tile.model,
};
}
else {
// it was toggled from checked:
// find 1st prev non-checked and set origin (y1,x1) equal to 1 if not found,
// else to the tile next to the one found. Then uncheck all from origin
// to y,x.
let y1;
let x1;
const yx = this.findFirstCheckedCoords(y, x, false, true);
if (yx) {
const next = this.getNextTileCoords(yx.y, yx.x);
if (!next) {
y1 = y;
x1 = x;
}
else {
y1 = next.y;
x1 = next.x;
}
this.linearSetCheck(y1, x1, yx.y, yx.x, false);
}
else {
y1 = 1;
x1 = 1;
}
}
}
/**
* Get the location of the checked tiles, if any. As tiles are checked
* only as an uninterrupted sequence, there can be only 0 or 1 location
* in a set.
*
* @returns The location, or null if no tiles are checked.
*/
getCheckedLocation() {
const start = this.findFirstCheckedCoords(1, 1, true);
if (!start) {
return null;
}
const end = this.findFirstCheckedCoords(start.y, start.x, false);
if (!end || (end.y === start.y && end.x === start.x)) {
return null;
}
const last = this.getPrevTileCoords(end.y, end.x);
return !last || (last.y === start.y && last.x === start.x)
? new TokenLocation(new TokenPoint(start.y, start.x))
: new TokenLocation(new TokenPoint(start.y, start.x), new TokenPoint(last.y, last.x));
}
/**
* Get the location of the checked tiles, together with the index to the
* fragment including them (or a part of them). Should the tiles be included
* in more than 1 fragment, no fragment will be returned.
*
* @returns Object with fragment=fragment index or -1, and location=location
* of checked tiles; or null if no checked tile.
*/
getCheckedLocationAndFragment() {
const loc = this.getCheckedLocation();
if (!loc) {
return null;
}
let y2;
let x2;
if (loc.secondary) {
y2 = loc.secondary.y;
x2 = loc.secondary.x;
}
else {
y2 = loc.primary.y;
x2 = loc.primary.x;
}
let fr = -1;
for (let y = loc.primary.y; y <= y2; y++) {
const row = this._rows[y - 1];
for (let x = y === loc.primary.y ? loc.primary.x : 1; x <= (y === y2 ? x2 : row.tiles.length); x++) {
if (row.tiles[x - 1].frIndex > -1) {
if (fr > -1) {
if (fr !== row.tiles[x - 1].frIndex) {
return {
fragment: -1,
location: loc,
};
}
}
else {
fr = row.tiles[x - 1].frIndex;
}
}
}
}
return {
fragment: fr,
location: loc,
};
}
}
/**
* Tiled text layer part editor.
* This editor allows picking any layer and see all the text tiles included
* in a fragment with a color highlight. Users can check any number of tiles
* not belonging to any fragment in the selected layer, and add a new fragment
* in the selected layer; or check any number of tiles belonging to a fragment
* of the selected layer, and edit or delete it.
* Tiles are thus colorized by the UI to render the fragments extent; and freely
* checked by users to select the fragments to operate with.
* All the checked tiles must follow each other, in one or more rows. Users can
* just check the first and the last of a sequence to get the whole sequence
* checked.
*/
class TiledTextLayerPartFeatureComponent {
_router;
_repository;
_libraryRouteService;
_editedItemRepository;
_dialogService;
_sub;
view;
selectedTile;
itemId;
partId;
roleId;
loading$;
saving$;
baseText$;
locations$;
rows$;
breakChance$;
layerHints$;
pickedLocation;
userLevel;
constructor(route, _router, _repository, _libraryRouteService, _editedItemRepository, _dialogService, userLevelService) {
this._router = _router;
this._repository = _repository;
this._libraryRouteService = _libraryRouteService;
this._editedItemRepository = _editedItemRepository;
this._dialogService = _dialogService;
this.itemId = route.snapshot.params['iid'];
this.partId = route.snapshot.params['pid'];
if (this.partId === 'new') {
this.partId = undefined;
}
this.roleId = route.snapshot.queryParams['rid'];
if (this.roleId === 'default') {
this.roleId = undefined;
}
this.userLevel = userLevelService.getCurrentUserLevel();
// layers part
this.loading$ = this._repository.loading$;
this.saving$ = this._repository.saving$;
this.baseText$ = this._repository.baseText$;
this.locations$ = this._repository.locations$;
this.breakChance$ = this._repository.breakChance$;
this.layerHints$ = this._repository.layerHints$;
// base text: connect rows to the base text part
this.rows$ = this._repository.baseTextPart$.pipe(map((part) => part?.rows));
}
canDeactivate() {
return true;
}
ngOnInit() {
// when the base text changes, load all the fragments locations
// and setup their UI state
this._sub = this.rows$.subscribe((rows) => {
this.view = rows ? new TiledTextLayerView(rows) : undefined;
this.view?.setFragmentLocations(this._repository.getLocations());
});
// ensure that the container item is loaded
this._editedItemRepository.ensureItemLoaded(this.itemId);
// load the layer part
this._repository.reset();
if (this.partId) {
this._repository.load(this.itemId, this.partId);
}
}
ngOnDestroy() {
this._sub?.unsubscribe();
}
refreshBreakChance() {
this._repository.refreshBreakChance();
}
onTileChecked(y, x, checked) {
if (this.view) {
this.view.toggleLinearTileCheck(y, x, checked);
}
}
getSelectedTileCoords() {
if (!this.selectedTile || !this.view) {
return null;
}
for (let i = 0; i < this.view.rows.length; i++) {
const j = this.view.rows[i].tiles.indexOf(this.selectedTile);
if (j > -1) {
return { y: i + 1, x: j + 1 };
}
}
return null;
}
selectPrevTile() {
if (!this.view) {
return;
}
let yx = this.getSelectedTileCoords();
if (yx) {
yx = this.view.getPrevTileCoords(yx.y, yx.x);
if (yx) {
this.selectedTile = this.view.rows[yx.y - 1].tiles[yx.x - 1];
}
}
}
selectNextTile() {
if (!this.view) {
return;
}
let yx = this.getSelectedTileCoords();
if (yx) {
yx = this.view.getNextTileCoords(yx.y, yx.x);
if (yx) {
this.selectedTile = this.view.rows[yx.y - 1].tiles[yx.x - 1];
}
}
}
deleteFragment() {
if (!this.view) {
return;
}
const lf = this.view.getCheckedLocationAndFragment();
if (!lf || lf.fragment === -1) {
return;
}
const locations = this._repository.getLocations();
const loc = locations[lf.fragment];
this._dialogService
.confirm('Delete Fragment', `Delete the fragment at ${loc}?`)
.subscribe((ok) => {
if (ok) {
// find the fragment and remove it from the part
const i = this._repository.getPart()?.fragments.findIndex((p) => {
return TokenLocation.parse(p.location)?.overlaps(loc);
});
if (i === -1) {
return;
}
this._repository.deleteFragment(loc);
}
});
}
deleteFragmentFromHint(hint) {
const loc = TokenLocation.parse(hint.location);
if (loc) {
this._repository.deleteFragment(loc);
}
}
navigateToFragmentEditor(loc) {
const part = this._repository.getPart();
if (!part) {
return;
}
const { route, rid } = this._libraryRouteService.buildFragmentEditorRoute(this._editedItemRepository.getFacet().partDefinitions, part.itemId, part.id, part.typeId, part.roleId, loc);
// navigate to the editor
this._router.navigate([route], rid
? {
queryParams: {
rid: part.roleId,
},
}
: {});
}
editFragment() {
if (!this.view) {
return;
}
const lf = this.view.getCheckedLocationAndFragment();
if (!lf || lf.fragment === -1) {
return;
}
const locations = this._repository.getLocations();
this.navigateToFragmentEditor(locations[lf.fragment].toString());
}
editFragmentFromHint(hint) {
this.navigateToFragmentEditor(hint.location);
}
moveFragmentFromHint(hint) {
if (!this.pickedLocation ||
this.pickedLocation === hint.location ||
!this.partId) {
return;
}
this._repository.applyLayerPatches(this.partId, [
`mov ${hint.location} ${this.pickedLocation}`,
]);
}
addFragment() {
if (!this.view) {
return;
}
const lf = this.view.getCheckedLocationAndFragment();
if (!lf || lf.fragment > -1) {
return;
}
this.navigateToFragmentEditor(lf.location.toString());
}
pickLocation() {
if (!this.view) {
return;
}
const lf = this.view.getCheckedLocationAndFragment();
if (!lf) {
return;
}
const locations = this._repository.getLocations();
this.pickedLocation = (lf.fragment === -1 ? lf.location : locations[lf.fragment]).toString();
}
clearTileChecks() {
if (!this.view) {
return;
}
this.view.setAllTilesViewState({ checked: false });
this.pickedLocation = undefined;
}
applyLayerPatches(patches) {
if (this.partId) {
this._repository.applyLayerPatches(this.partId, patches);
}
}
close() {
this._router.navigate(['/items', this.itemId]);
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TiledTextLayerPartFeatureComponent, deps: [{ token: i1.ActivatedRoute }, { token: i1.Router }, { token: i4.EditedLayerRepository }, { token: i4$1.LibraryRouteService }, { token: i4$2.EditedItemRepository }, { token: i5.DialogService }, { token: i3.UserLevelService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: TiledTextLayerPartFeatureComponent, isStandalone: true, selector: "cadmus-tiled-text-layer-part-feature", ngImport: i0, template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<mat-card appearance=\"outlined\">\r\n <mat-card-header>\r\n <div mat-card-avatar>\r\n <mat-icon>view_headline</mat-icon>\r\n </div>\r\n <mat-card-title>\r\n Tiles-Based Text Layers\r\n <button type=\"button\" mat-icon-button (click)=\"refreshBreakChance()\">\r\n @switch (breakChance$ | async) { @case (-1) {\r\n <mat-icon matTooltip=\"Checking...\">refresh</mat-icon>\r\n } @case (0) {\r\n <mat-icon matTooltip=\"Valid\">check_circle</mat-icon>\r\n } @case (1) {\r\n <mat-icon matTooltip=\"Potentially broken\" class=\"mat-warn\"\r\n >warning</mat-icon\r\n >\r\n } @case (2) {\r\n <mat-icon matTooltip=\"Broken\" class=\"mat-warn\">error</mat-icon>\r\n } }\r\n </button>\r\n </mat-card-title>\r\n <cadmus-current-layer-part-bar />\r\n </mat-card-header>\r\n @if (!(loading$ | async) && !(saving$ | async)) {\r\n <mat-card-actions>\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 (click)=\"deleteFragment()\"\r\n matTooltip=\"Delete the selected fragment\"\r\n >\r\n <mat-icon class=\"mat-warn\">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 (click)=\"clearTileChecks()\"\r\n matTooltip=\"Clear any selection\"\r\n >\r\n <mat-icon class=\"mat-warn\">clear</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n (click)=\"addFragment()\"\r\n matTooltip=\"Add a new fragment at selection\"\r\n >\r\n <mat-icon class=\"mat-primary\">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\r\n <mat-card-content>\r\n @if (loading$ | async) {\r\n <mat-progress-bar mode=\"indeterminate\" />\r\n }\r\n\r\n <!-- rows -->\r\n @if (view) {\r\n <div>\r\n @for (row of view.rows; track row; let iy = $index) {\r\n <div class=\"tile-row\" style=\"display: flex; flex-flow: row wrap\">\r\n <span class=\"row-nr\">{{ iy + 1 }}</span>\r\n <!-- tile -->\r\n @for (tile of row.tiles || []; track tile; let ix = $index) {\r\n <cadmus-text-tile\r\n [tile]=\"tile.model\"\r\n [readonly]=\"true\"\r\n [selected]=\"tile === selectedTile\"\r\n [checkable]=\"true\"\r\n [checked]=\"tile.checked\"\r\n [color]=\"tile.frIndex > -1 ? 'yellow' : 'transparent'\"\r\n style=\"flex: 0 0 auto\"\r\n (click)=\"selectedTile = tile\"\r\n (checkedChange)=\"onTileChecked(iy + 1, ix + 1, $event)\"\r\n (keydown.control.arrowleft)=\"selectPrevTile()\"\r\n (keydown.control.arrowright)=\"selectNextTile()\"\r\n />\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </mat-card-content>\r\n\r\n <div>\r\n <button\r\n type=\"button\"\r\n mat-flat-button\r\n class=\"mat-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 @if (layerHints$ | async; as layerHints) {\r\n <mat-expansion-panel>\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>Layer hints</mat-panel-title>\r\n <mat-panel-description>{{ layerHints.length }}</mat-panel-description>\r\n </mat-expansion-panel-header>\r\n <cadmus-layer-hints\r\n [hints]=\"layerHints\"\r\n [disabled]=\"(loading$ | async) || (saving$ | async) ? true : false\"\r\n [readonly]=\"userLevel < 2\"\r\n [targetLocation]=\"pickedLocation\"\r\n (requestEdit)=\"editFragmentFromHint($event)\"\r\n (requestDelete)=\"deleteFragmentFromHint($event)\"\r\n (requestMove)=\"moveFragmentFromHint($event)\"\r\n (requestPatch)=\"applyLayerPatches($event)\"\r\n />\r\n </mat-expansion-panel>\r\n }\r\n</mat-card>\r\n", styles: ["div.tile-row{margin-bottom:6px}span.row-nr{color:silver;font-weight:700}\n"], dependencies: [{ kind: "component", type: MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "component", type: MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: MatCardAvatar, selector: "[mat-card-avatar], [matCardAvatar]" }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "component", type: MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: MatCardContent, selector: "mat-card-content" }, { kind: "component", type: MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "directive", type: MatExpansionPanelDescription, selector: "mat-panel-description" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { kind: "component", type: CurrentLayerPartBarComponent, selector: "cadmus-current-layer-part-bar" }, { kind: "component", type: LayerHintsComponent, selector: "cadmus-layer-hints", inputs: ["hints", "targetLocation", "disabled", "readonly"], outputs: ["requestEdit", "requestDelete", "requestMove", "requestPatch"] }, { kind: "component", type: TextTileComponent, selector: "cadmus-text-tile", inputs: ["selected", "checkable", "readonly", "color", "checked", "tile"], outputs: ["checkedChange", "tileChange", "editData"] }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TiledTextLayerPartFeatureComponent, decorators: [{
type: Component,
args: [{ selector: 'cadmus-tiled-text-layer-part-feature', imports: [
MatCard,
MatCardHeader,
MatCardAvatar,
MatIcon,
MatCardTitle,
MatIconButton,
MatTooltip,
MatCardActions,
MatToolbar,
MatCardContent,
MatProgressBar,
MatButton,
MatExpansionPanel,
MatExpansionPanelHeader,
MatExpansionPanelTitle,
MatExpansionPanelDescription,
AsyncPipe,
CurrentItemBarComponent,
CurrentLayerPartBarComponent,
LayerHintsComponent,
TextTileComponent,
], template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<mat-card appearance=\"outlined\">\r\n <mat-card-header>\r\n <div mat-card-avatar>\r\n <mat-icon>view_headline</mat-icon>\r\n </div>\r\n <mat-card-title>\r\n Tiles-Based Text Layers\r\n <button type=\"button\" mat-icon-button (click)=\"refreshBreakChance()\">\r\n @switch (breakChance$ | async) { @case (-1) {\r\n <mat-icon matTooltip=\"Checking...\">refresh</mat-icon>\r\n } @case (0) {\r\n <mat-icon matTooltip=\"Valid\">check_circle</mat-icon>\r\n } @case (1) {\r\n <mat-icon matTooltip=\"Potentially broken\" class=\"mat-warn\"\r\n >warning</mat-icon\r\n >\r\n } @case (2) {\r\n <mat-icon matTooltip=\"Broken\" class=\"mat-warn\">error</mat-icon>\r\n } }\r\n </button>\r\n </mat-card-title>\r\n <cadmus-current-layer-part-bar />\r\n </mat-card-header>\r\n @if (!(loading$ | async) && !(saving$ | async)) {\r\n <mat-card-actions>\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 (click)=\"deleteFragment()\"\r\n matTooltip=\"Delete the selected fragment\"\r\n >\r\n <mat-icon class=\"mat-warn\">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 (click)=\"clearTileChecks()\"\r\n matTooltip=\"Clear any selection\"\r\n >\r\n <mat-icon class=\"mat-warn\">clear</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n (click)=\"addFragment()\"\r\n matTooltip=\"Add a new fragment at selection\"\r\n >\r\n <mat-icon class=\"mat-primary\">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\r\n <mat-card-content>\r\n @if (loading$ | async) {\r\n <mat-progress-bar mode=\"indeterminate\" />\r\n }\r\n\r\n <!-- rows -->\r\n @if (view) {\r\n <div>\r\n @for (row of view.rows; track row; let iy = $index) {\r\n <div class=\"tile-row\" style=\"display: flex; flex-flow: row wrap\">\r\n <span class=\"row-nr\">{{ iy + 1 }}</span>\r\n <!-- tile -->\r\n @for (tile of row.tiles || []; track tile; let ix = $index) {\r\n <cadmus-text-tile\r\n [tile]=\"tile.model\"\r\n [readonly]=\"true\"\r\n [selected]=\"tile === selectedTile\"\r\n [checkable]=\"true\"\r\n [checked]=\"tile.checked\"\r\n [color]=\"tile.frIndex > -1 ? 'yellow' : 'transparent'\"\r\n style=\"flex: 0 0 auto\"\r\n (click)=\"selectedTile = tile\"\r\n (checkedChange)=\"onTileChecked(iy + 1, ix + 1, $event)\"\r\n (keydown.control.arrowleft)=\"selectPrevTile()\"\r\n (keydown.control.arrowright)=\"selectNextTile()\"\r\n />\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </mat-card-content>\r\n\r\n <div>\r\n <button\r\n type=\"button\"\r\n mat-flat-button\r\n class=\"mat-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 @if (layerHints$ | async; as layerHints) {\r\n <mat-expansion-panel>\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>Layer hints</mat-panel-title>\r\n <mat-panel-description>{{ layerHints.length }}</mat-panel-description>\r\n </mat-expansion-panel-header>\r\n <cadmus-layer-hints\r\n [hints]=\"layerHints\"\r\n [disabled]=\"(loading$ | async) || (saving$ | async) ? true : false\"\r\n [readonly]=\"userLevel < 2\"\r\n [targetLocation]=\"pickedLocation\"\r\n (requestEdit)=\"editFragmentFromHint($event)\"\r\n (requestDelete)=\"deleteFragmentFromHint($event)\"\r\n (requestMove)=\"moveFragmentFromHint($event)\"\r\n (requestPatch)=\"applyLayerPatches($event)\"\r\n />\r\n </mat-expansion-panel>\r\n }\r\n</mat-card>\r\n", styles: ["div.tile-row{margin-bottom:6px}span.row-nr{color:silver;font-weight:700}\n"] }]
}], ctorParameters: () => [{ type: i1.ActivatedRoute }, { type: i1.Router }, { type: i4.EditedLayerRepository }, { type: i4$1.LibraryRouteService }, { type: i4$2.EditedItemRepository }, { type: i5.DialogService }, { type: i3.UserLevelService }] });
class TiledTextPartFeatureComponent extends EditPartFeatureBase {
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
super(router, route, snackbar, itemService, thesaurusService, editorService);
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TiledTextPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: TiledTextPartFeatureComponent, isStandalone: true, selector: "cadmus-tiled-text-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar/>\r\n<cadmus-tiled-text-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n", styles: [""], dependencies: [{ kind: "component", type: CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { kind: "component", type: TiledTextPartComponent, selector: "cadmus-tiled-text-part" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TiledTextPartFeatureComponent, decorators: [{
type: Component,
args: [{ selector: 'cadmus-tiled-text-part-feature', imports: [CurrentItemBarComponent, TiledTextPartComponent], template: "<cadmus-current-item-bar/>\r\n<cadmus-tiled-text-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n" }]
}], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }] });
/**
* Token-based text layer part feature editor. This is a special type of editor,
* rather than being a simple wrapper like the others; it is used for editing
* any text layer (using token-based coordinates), whatever the type of its
* fragments. Being a sort of portal for accessing a fragments editor, it has
* no save capability: the single fragments are edited and saved as needed.
*/
class TokenTextLayerPartFeatureComponent {
_router;
_repository;
_textLayerService;
_libraryRouteService;
_editedItemRepository;
_dialogService;
itemId;
partId;
roleId;
loading$;
saving$;
baseText$;
locations$;
breakChance$;
layerHints$;
pickedLocation;
userLevel;
textSize;
constructor(route, _router, _repository, _textLayerService, _libraryRouteService, _editedItemRepository, _dialogService, userLevelService) {
this._router = _router;
this._repository = _repository;
this._textLayerService = _textLayerService;
this._libraryRouteService = _libraryRouteService;
this._editedItemRepository = _editedItemRepository;
this._dialogService = _dialogService;
this.textSize = 14;
this.itemId = route.snapshot.params['iid'];
this.partId = route.snapshot.params['pid'];
if (this.partId === 'new') {
this.partId = undefined;
}
this.roleId = route.snapshot.queryParams['rid'];
if (this.roleId === 'default') {
this.roleId = undefined;
}
this.userLevel = userLevelService.getCurrentUserLevel();
this.loading$ = this._repository.loading$;
this.saving$ = this._repository.saving$;
this.baseText$ = this._repository.baseText$;
this.locations$ = this._repository.locations$;
this.breakChance$ = this._repository.breakChance$;
this.layerHints$ = this._repository.layerHints$;
}
canDeactivate() {
return true;
}
makeLarger() {
const size = this.textSize + 2;
if (size > 24) {
return;
}
this.textSize = size;
}
makeSmaller() {
const size = this.textSize - 2;
if (size < 12) {
return;
}
this.textSize = size;
}
ngOnInit() {
// ensure the container item is loaded
this._editedItemRepository.ensureItemLoaded(this.itemId);
// load the layer part data
this._repository.reset();
if (this.partId) {
this._repository.load(this.itemId, this.partId);
}
}
deleteFragment() {
const range = this._textLayerService.getSelectedRange();
if (!range) {
return;
}
const location = this._textLayerService.getSelectedLocationForEdit(range);
if (!location) {
return;
}
this._dialogService
.confirm('Delete Fragment', `Delete the fragment at ${location}?`)
.subscribe((ok) => {
if (ok) {
// find the fragment and remove it from the part
const i = this._repository.getPart()?.fragments.findIndex((p) => {
return TokenLocation.parse(p.location)?.overlaps(location);
});
if (i === -1) {
return;
}
this._repository.deleteFragment(location);
}
});
}
deleteFragmentFromHint(hint) {
const loc = TokenLocation.parse(hint.location);
if (loc) {
this._repository.deleteFragment(loc);
}
}
refreshBreakChance() {
this._repository.refreshBreakChance();
}
navigateToFragmentEditor(loc) {
const part = this._repository.getPart();
if (!part) {
return;
}
const { route, rid } = this._libraryRouteService.buildFragmentEditorRoute(this._editedItemRepository.getFacet().partDefinitions, part.itemId, part.id, part.typeId, part.roleId, loc);
// navigate to the editor
this._router.navigate([route], rid
? {
queryParams: {
rid: part.roleId,
},
}
: {});
}
editFragment() {
const range = this._textLayerService.getSelectedRange();
if (!range) {
return;
}
const location = this._textLayerService.getSelectedLocationForEdit(range);
if (location) {
this.navigateToFragmentEditor(location.toString());
}
}
editFragmentFromHint(hint) {
this.navigateToFragmentEditor(hint.location);
}
addFragment() {
const range = this._textLayerService.getSelectedRange();
if (!range) {
return;
}
const location = this._textLayerService.getSelectedLocationForNew(range, this._repository.getBaseText() || '');
if (location) {
this.navigateToFragmentEditor(location.toString());
}
}
moveFragmentFromHint(hint) {
if (!this.pickedLocation ||
this.pickedLocation === hint.location ||
!this.partId) {
return;
}
this._repository.applyLayerPatches(this.partId, [
`mov ${hint.location} ${this.pickedLocation}`,
]);
}
applyLayerPatches(patches) {
if (this.partId) {
this._repository.applyLayerPatches(this.partId, patches);
}
}
pickLocation() {
const range = this._textLayerService.getSelectedRange();
if (!range) {
return;
}
const location = this._textLayerService.getSelectedLocationForNew(range, this._repository.getBaseText() || '');
if (location) {
this.pickedLocation = location.toString();
}
}
close() {
this._router.navigate(['/items', this.itemId]);
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TokenTextLayerPartFeatureComponent, deps: [{ token: i1.ActivatedRoute }, { token: i1.Router }, { token: i4.EditedLayerRepository }, { token: i4$1.TextLayerService }, { token: i4$1.LibraryRouteService }, { token: i4$2.EditedItemRepository }, { token: i5.DialogService }, { token: i3.UserLevelService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: TokenTextLayerPartFeatureComponent, isStandalone: true, selector: "cadmus-token-text-layer-part-feature", ngImport: i0, template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<mat-card appearance=\"outlined\">\r\n <mat-card-header>\r\n <div mat-card-avatar>\r\n <mat-icon>view_headline</mat-icon>\r\n </div>\r\n <mat-card-title>\r\n Token-Based Text Layers\r\n <button type=\"button\" mat-icon-button (click)=\"refreshBreakChance()\">\r\n @switch (breakChance$ | async) { @case (-1) {\r\n <mat-icon matTooltip=\"Checking...\">refresh</mat-icon>\r\n } @case (0) {\r\n <mat-icon matTooltip=\"Valid\">check_circle</mat-icon>\r\n } @case (1) {\r\n <mat-icon matTooltip=\"Potentially broken\" class=\"mat-warn\"\r\n >warning</mat-icon\r\n >\r\n } @case (2) {\r\n <mat-icon matTooltip=\"Broken\" class=\"mat-warn\">error</mat-icon>\r\n } }\r\n </button>\r\n </mat-card-title>\r\n <cadmus-current-layer-part-bar/>\r\n </mat-card-header>\r\n @if (!(loading$ | async)) {\r\n <mat-card-actions>\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 (click)=\"deleteFragment()\"\r\n matTooltip=\"Delete the selected fragment\"\r\n >\r\n <mat-icon class=\"mat-warn\">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 (click)=\"addFragment()\"\r\n matTooltip=\"Add a new fragment at selection\"\r\n >\r\n <mat-icon class=\"mat-primary\">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 @if (loading$ | async) {\r\n <mat-progress-bar mode=\"indeterminate\"/>\r\n }\r\n\r\n <div [style.font-size]=\"textSize + 'px'\">\r\n @if (baseText$ | async; as baseText) {\r\n <cadmus-decorated-token-text\r\n [baseText]=\"baseText\"\r\n [locations]=\"(locations$ | async) || []\"\r\n />\r\n }\r\n </div>\r\n </mat-card-content>\r\n <div>\r\n <button\r\n type=\"button\"\r\n mat-flat-button\r\n class=\"mat-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 @if (layerHints$ | async; as layerHints) {\r\n <mat-expansion-panel>\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>Layer hints</mat-panel-title>\r\n <mat-panel-description>{{ layerHints.length }}</mat-panel-description>\r\n </mat-expansion-panel-header>\r\n <cadmus-layer-hints\r\n [hints]=\"layerHints\"\r\n [disabled]=\"(loading$ | async) || (saving$ | async) ? true : false\"\r\n [readonly]=\"userLevel < 2\"\r\n [targetLocation]=\"pickedLocation\"\r\n (requestEdit)=\"editFragmentFromHint($event)\"\r\n (requestDelete)=\"deleteFragmentFromHint($event)\"\r\n (requestMove)=\"moveFragmentFromHint($event)\"\r\n (requestPatch)=\"applyLayerPatches($event)\"\r\n />\r\n </mat-expansion-panel>\r\n }\r\n</mat-card>\r\n", styles: [""], dependencies: [{ kind: "component", type: MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "component", type: MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: MatCardAvatar, selector: "[mat-card-avatar], [matCardAvatar]" }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "component", type: MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: MatCardContent, selector: "mat-card-content" }, { kind: "component", type: MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "directive", type: MatExpansionPanelDescription, selector: "mat-panel-description" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: LayerHintsComponent, selector: "cadmus-layer-hints", inputs: ["hints", "targetLocation", "disabled", "readonly"], outputs: ["requestEdit", "requestDelete", "requestMove", "requestPatch"] }, { kind: "component", type: CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { kind: "component", type: CurrentLayerPartBarComponent, selector: "cadmus-current-layer-part-bar" }, { kind: "component", type: DecoratedTokenTextComponent, selector: "cadmus-decorated-token-text", inputs: ["baseText", "locations", "selectedLocation"] }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TokenTextLayerPartFeatureComponent, decorators: [{
type: Component,
args: [{ selector: 'cadmus-token-text-layer-part-feature', imports: [
MatCard,
MatCardHeader,
MatCardAvatar,
MatIcon,
MatCardTitle,
MatIconButton,
MatTooltip,
MatCardActions,
MatToolbar,
MatCardContent,
MatProgressBar,
MatButton,
MatExpansionPanel,
MatExpansionPanelHeader,
MatExpansionPanelTitle,
MatExpansionPanelDescription,
AsyncPipe,
LayerHintsComponent,
CurrentItemBarComponent,
CurrentLayerPartBarComponent,
DecoratedTokenTextComponent,
], template: "<cadmus-current-item-bar></cadmus-current-item-bar>\r\n<mat-card appearance=\"outlined\">\r\n <mat-card-header>\r\n <div mat-card-avatar>\r\n <mat-icon>view_headline</mat-icon>\r\n </div>\r\n <mat-card-title>\r\n Token-Based Text Layers\r\n <button type=\"button\" mat-icon-button (click)=\"refreshBreakChance()\">\r\n @switch (breakChance$ | async) { @case (-1) {\r\n <mat-icon matTooltip=\"Checking...\">refresh</mat-icon>\r\n } @case (0) {\r\n <mat-icon matTooltip=\"Valid\">check_circle</mat-icon>\r\n } @case (1) {\r\n <mat-icon matTooltip=\"Potentially broken\" class=\"mat-warn\"\r\n >warning</mat-icon\r\n >\r\n } @case (2) {\r\n <mat-icon matTooltip=\"Broken\" class=\"mat-warn\">error</mat-icon>\r\n } }\r\n </button>\r\n </mat-card-title>\r\n <cadmus-current-layer-part-bar/>\r\n </mat-card-header>\r\n @if (!(loading$ | async)) {\r\n <mat-card-actions>\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 (click)=\"deleteFragment()\"\r\n matTooltip=\"Delete the selected fragment\"\r\n >\r\n <mat-icon class=\"mat-warn\">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 (click)=\"addFragment()\"\r\n matTooltip=\"Add a new fragment at selection\"\r\n >\r\n <mat-icon class=\"mat-primary\">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 @if (loading$ | async) {\r\n <mat-progress-bar mode=\"indeterminate\"/>\r\n }\r\n\r\n <div [style.font-size]=\"textSize + 'px'\">\r\n @if (baseText$ | async; as baseText) {\r\n <cadmus-decorated-token-text\r\n [baseText]=\"baseText\"\r\n [locations]=\"(locations$ | async) || []\"\r\n />\r\n }\r\n </div>\r\n </mat-card-content>\r\n <div>\r\n <button\r\n type=\"button\"\r\n mat-flat-button\r\n class=\"mat-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 @if (layerHints$ | async; as layerHints) {\r\n <mat-expansion-panel>\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>Layer hints</mat-panel-title>\r\n <mat-panel-description>{{ layerHints.length }}</mat-panel-description>\r\n </mat-expansion-panel-header>\r\n <cadmus-layer-hints\r\n [hints]=\"layerHints\"\r\n [disabled]=\"(loading$ | async) || (saving$ | async) ? true : false\"\r\n [readonly]=\"userLevel < 2\"\r\n [targetLocation]=\"pickedLocation\"\r\n (requestEdit)=\"editFragmentFromHint($event)\"\r\n (requestDelete)=\"deleteFragmentFromHint($event)\"\r\n (requestMove)=\"moveFragmentFromHint($event)\"\r\n (requestPatch)=\"applyLayerPatches($event)\"\r\n />\r\n </mat-expansion-panel>\r\n }\r\n</mat-card>\r\n" }]
}], ctorParameters: () => [{ type: i1.ActivatedRoute }, { type: i1.Router }, { type: i4.EditedLayerRepository }, { type: i4$1.TextLayerService }, { type: i4$1.LibraryRouteService }, { type: i4$2.EditedItemRepository }, { type: i5.DialogService }, { type: i3.UserLevelService }] });
class TokenTextPartFeatureComponent extends EditPartFeatureBase {
constructor(router, route, snackbar, itemService, thesaurusService, editorService) {
super(router, route, snackbar, itemService, thesaurusService, editorService);
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TokenTextPartFeatureComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.MatSnackBar }, { token: i3.ItemService }, { token: i3.ThesaurusService }, { token: i4.PartEditorService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: TokenTextPartFeatureComponent, isStandalone: true, selector: "cadmus-token-text-part-feature", usesInheritance: true, ngImport: i0, template: "<cadmus-current-item-bar/>\r\n<cadmus-token-text-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n", styles: [""], dependencies: [{ kind: "component", type: CurrentItemBarComponent, selector: "cadmus-current-item-bar" }, { kind: "component", type: TokenTextPartComponent, selector: "cadmus-token-text-part" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: TokenTextPartFeatureComponent, decorators: [{
type: Component,
args: [{ selector: 'cadmus-token-text-part-feature', imports: [CurrentItemBarComponent, TokenTextPartComponent], template: "<cadmus-current-item-bar/>\r\n<cadmus-token-text-part\r\n [identity]=\"identity\"\r\n [data]=\"$any(data)\"\r\n (dataChange)=\"save($event!.value!)\"\r\n (editorClose)=\"close()\"\r\n (dirtyChange)=\"onDirtyChange($event)\"\r\n/>\r\n" }]
}], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.MatSnackBar }, { type: i3.ItemService }, { type: i3.ThesaurusService }, { type: i4.PartEditorService }] });
// https://github.com/ng-packagr/ng-packagr/issues/778
const RouterModuleForChild = RouterModule.forChild([
{
path: `${ASSERTED_HISTORICAL_DATES_PART_TYPEID}/:pid`,
pathMatch: 'full',
component: AssertedHistoricalDateFeatureComponent,
canDeactivate: [PendingChangesGuard],
},
{
path: `${BIBLIOGRAPHY_PART_TYPEID}/:pid`,
pathMatch: 'full',
component: BibliographyPartFeatureComponent,
canDeactivate: [PendingChangesGuard],
},
{
path: `${CATEGORIES_PART_TYPEID}/:pid`,
pathMatch: 'full',
component: CategoriesPartFeatureComponent,
canDeactivate: [PendingChangesGuard],
},
{
path: `${COMMENT_PART_TYPEID}/:pid`,
pathMatch: 'full',
component: CommentPartFeatureComponent,
canDeactivate: [PendingChangesGuard],
},
{
path: `${CHRONOTOPES_PART_TYPEID}/:pid`,
pathMatch: 'full',
component: ChronotopesPartFeatureComponent,
canDeactivate: [PendingChangesGuard],
},
{
path: `${DECORATED_COUNTS_PART_TYPEID}/:pid`,
pathMatch: 'full',
component: DecoratedCountsPartFeatureComponent,
canDeactivate: [PendingChangesGuard],
},
{
path: `${DISTRICT_LOCATION_PART_TYPEID}/:pid`,
pathMatch: 'full',
component: DistrictLocationPartFeatureComponent,
canDeactivate: [PendingChangesGuard],
},
{
path: `${DOC_REFERENCES_PART_TYPEID}/:pid`,
pathMatch: 'full',
component: DocReferencesPartFeatureComponent,
canDeactivate: [PendingChangesGuard],
},
{
path: `${EXTERNAL_IDS_PART_TYPEID}/:pid`,
pathMatch: 'full',
component: ExternalIdsPartFeatureComponent,
canDeactivate: [PendingChangesGuard],
},
{
path: `${HISTORICAL_DATE_PART_TYPEID}/:pid`,
pathMatch: 'full',
component: HistoricalDatePartFeatureComponent,
canDeactivate: [PendingChangesGuard],
},
{
path: `${HISTORICAL_EVENTS_PART_TYPEID}/:pid`,
pathMatch: 'full',
component: HistoricalEventsPartFeatureComponent,
canDeactivate: [PendingChangesGuard],
},
{
path: `${KEYWORDS_PART_TYPEID}/:pid`,
pathMatch: 'full',
component: KeywordsPartFeatureComponent,
canDeactivate: [PendingChangesGuard],
},
{
path: `${INDEX_KEYWORDS_PART_TYPEID}/:pid`,
pathMatch: 'full',
component: IndexKeywordsPartFeatureComponent,
canDeactivate: [PendingChangesGuard],
},
{
path: `${METADATA_PART_TYPEID}/:pid`,
pathMatch: 'full',
component: MetadataPartFeatureComponent,
canDeactivate: [PendingChangesGuard],
},
{
path: `${NAMES_PART_TYPEID}/:pid`,
pathMatch: 'full',
component: NamesPartFeatureComponent,
canDeactivate: [PendingChangesGuard],
},
{
path: `${NOTE_PART_TYPEID}/:pid`,
pathMatch: 'full',
component: NotePartFeatureComponent,
canDeactivate: [PendingChangesGuard],
},
{
path: `${PHYSICAL_MEASUREMENTS_PART_TYPEID}/:pid`,
pathMatch: 'full',
component: PhysicalMeasurementsPartFeatureComponent,
canDeactivate: [PendingChangesGuard],
},
{
path: `${PHYSICAL_STATES_PART_TYPEID}/:pid`,
pathMatch: 'full',
component: PhysicalStatesPartFeatureComponent,
canDeactivate: [PendingChangesGuard],
},
{
path: `${PIN_LINKS_PART_TYPEID}/:pid`,
pathMatch: 'full',
component: PinLinksPartFeatureComponent,
canDeactivate: [PendingChangesGuard],
},
{
path: `${TOKEN_TEXT_PART_TYPEID}/:pid`,
pathMatch: 'full',
component: TokenTextPartFeatureComponent,
canDeactivate: [PendingChangesGuard],
},
{
path: `${TILED_TEXT_PART_TYPEID}/:pid`,
pathMatch: 'full',
component: TiledTextPartFeatureComponent,
canDeactivate: [PendingChangesGuard],
},
{
path: 'it.vedph.token-text-layer/:pid',
pathMatch: 'full',
component: TokenTextLayerPartFeatureComponent,
canDeactivate: [PendingChangesGuard],
},
{
path: 'it.vedph.tiled-text-layer/:pid',
pathMatch: 'full',
component: TiledTextLayerPartFeatureComponent,
canDeactivate: [PendingChangesGuard],
},
{
path: `fragment/:pid/${COMMENT_FRAGMENT_TYPEID}/:loc`,
pathMatch: 'full',
component: CommentFragmentFeatureComponent,
canDeactivate: [PendingChangesGuard],
},
{
path: `fragment/:pid/${CHRONOLOGY_FRAGMENT_TYPEID}/:loc`,
pathMatch: 'full',
component: ChronologyFragmentFeatureComponent,
canDeactivate: [PendingChangesGuard],
},
{
path: `fragment/:pid/${PIN_LINKS_FRAGMENT_TYPEID}/:loc`,
pathMatch: 'full',
component: PinLinksFragmentFeatureComponent,
canDeactivate: [PendingChangesGuard],
},
]);
class CadmusPartGeneralPgModule {
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CadmusPartGeneralPgModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.0", ngImport: i0, type: CadmusPartGeneralPgModule, imports: [CommonModule,
FormsModule,
ReactiveFormsModule, i1.RouterModule,
// material
MatButtonModule,
MatCheckboxModule,
MatCardModule,
MatExpansionModule,
MatIconModule,
MatInputModule,
MatProgressBarModule,
MatProgressSpinnerModule,
MatSelectModule,
MatTooltipModule,
MatToolbarModule,
// cadmus
AssertedHistoricalDateFeatureComponent,
BibliographyPartFeatureComponent,
CategoriesPartFeatureComponent,
ChronologyFragmentFeatureComponent,
ChronotopesPartFeatureComponent,
CommentFragmentFeatureComponent,
CommentPartFeatureComponent,
DecoratedCountsPartFeatureComponent,
DistrictLocationPartFeatureComponent,
DocReferencesPartFeatureComponent,
ExternalIdsPartFeatureComponent,
HistoricalDatePartFeatureComponent,
HistoricalEventsPartFeatureComponent,
IndexKeywordsPartFeatureComponent,
KeywordsPartFeatureComponent,
MetadataPartFeatureComponent,
NamesPartFeatureComponent,
NotePartFeatureComponent,
PhysicalMeasurementsPartFeatureComponent,
PhysicalStatesPartFeatureComponent,
PinLinksFragmentFeatureComponent,
PinLinksPartFeatureComponent,
TiledTextLayerPartFeatureComponent,
TiledTextPartFeatureComponent,
TokenTextLayerPartFeatureComponent,
TokenTextPartFeatureComponent], exports: [AssertedHistoricalDateFeatureComponent,
BibliographyPartFeatureComponent,
CategoriesPartFeatureComponent,
ChronologyFragmentFeatureComponent,
ChronotopesPartFeatureComponent,
CommentFragmentFeatureComponent,
CommentPartFeatureComponent,
DecoratedCountsPartFeatureComponent,
DistrictLocationPartFeatureComponent,
DocReferencesPartFeatureComponent,
ExternalIdsPartFeatureComponent,
HistoricalDatePartFeatureComponent,
HistoricalEventsPartFeatureComponent,
IndexKeywordsPartFeatureComponent,
KeywordsPartFeatureComponent,
MetadataPartFeatureComponent,
NamesPartFeatureComponent,
NotePartFeatureComponent,
PhysicalMeasurementsPartFeatureComponent,
PhysicalStatesPartFeatureComponent,
PinLinksFragmentFeatureComponent,
PinLinksPartFeatureComponent,
TiledTextLayerPartFeatureComponent,
TiledTextPartFeatureComponent,
TokenTextLayerPartFeatureComponent,
TokenTextPartFeatureComponent] });
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CadmusPartGeneralPgModule, imports: [CommonModule,
FormsModule,
ReactiveFormsModule,
RouterModuleForChild,
// material
MatButtonModule,
MatCheckboxModule,
MatCardModule,
MatExpansionModule,
MatIconModule,
MatInputModule,
MatProgressBarModule,
MatProgressSpinnerModule,
MatSelectModule,
MatTooltipModule,
MatToolbarModule,
// cadmus
AssertedHistoricalDateFeatureComponent,
BibliographyPartFeatureComponent,
CategoriesPartFeatureComponent,
ChronologyFragmentFeatureComponent,
ChronotopesPartFeatureComponent,
CommentFragmentFeatureComponent,
CommentPartFeatureComponent,
DecoratedCountsPartFeatureComponent,
DistrictLocationPartFeatureComponent,
DocReferencesPartFeatureComponent,
ExternalIdsPartFeatureComponent,
HistoricalDatePartFeatureComponent,
HistoricalEventsPartFeatureComponent,
IndexKeywordsPartFeatureComponent,
KeywordsPartFeatureComponent,
MetadataPartFeatureComponent,
NamesPartFeatureComponent,
NotePartFeatureComponent,
PhysicalMeasurementsPartFeatureComponent,
PhysicalStatesPartFeatureComponent,
PinLinksFragmentFeatureComponent,
PinLinksPartFeatureComponent,
TiledTextLayerPartFeatureComponent,
TiledTextPartFeatureComponent,
TokenTextLayerPartFeatureComponent,
TokenTextPartFeatureComponent] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CadmusPartGeneralPgModule, decorators: [{
type: NgModule,
args: [{
imports: [
CommonModule,
FormsModule,
ReactiveFormsModule,
RouterModuleForChild,
// material
MatButtonModule,
MatCheckboxModule,
MatCardModule,
MatExpansionModule,
MatIconModule,
MatInputModule,
MatProgressBarModule,
MatProgressSpinnerModule,
MatSelectModule,
MatTooltipModule,
MatToolbarModule,
// cadmus
AssertedHistoricalDateFeatureComponent,
BibliographyPartFeatureComponent,
CategoriesPartFeatureComponent,
ChronologyFragmentFeatureComponent,
ChronotopesPartFeatureComponent,
CommentFragmentFeatureComponent,
CommentPartFeatureComponent,
DecoratedCountsPartFeatureComponent,
DistrictLocationPartFeatureComponent,
DocReferencesPartFeatureComponent,
ExternalIdsPartFeatureComponent,
HistoricalDatePartFeatureComponent,
HistoricalEventsPartFeatureComponent,
IndexKeywordsPartFeatureComponent,
KeywordsPartFeatureComponent,
MetadataPartFeatureComponent,
NamesPartFeatureComponent,
NotePartFeatureComponent,
PhysicalMeasurementsPartFeatureComponent,
PhysicalStatesPartFeatureComponent,
PinLinksFragmentFeatureComponent,
PinLinksPartFeatureComponent,
TiledTextLayerPartFeatureComponent,
TiledTextPartFeatureComponent,
TokenTextLayerPartFeatureComponent,
TokenTextPartFeatureComponent,
],
exports: [
AssertedHistoricalDateFeatureComponent,
BibliographyPartFeatureComponent,
CategoriesPartFeatureComponent,
ChronologyFragmentFeatureComponent,
ChronotopesPartFeatureComponent,
CommentFragmentFeatureComponent,
CommentPartFeatureComponent,
DecoratedCountsPartFeatureComponent,
DistrictLocationPartFeatureComponent,
DocReferencesPartFeatureComponent,
ExternalIdsPartFeatureComponent,
HistoricalDatePartFeatureComponent,
HistoricalEventsPartFeatureComponent,
IndexKeywordsPartFeatureComponent,
KeywordsPartFeatureComponent,
MetadataPartFeatureComponent,
NamesPartFeatureComponent,
NotePartFeatureComponent,
PhysicalMeasurementsPartFeatureComponent,
PhysicalStatesPartFeatureComponent,
PinLinksFragmentFeatureComponent,
PinLinksPartFeatureComponent,
TiledTextLayerPartFeatureComponent,
TiledTextPartFeatureComponent,
TokenTextLayerPartFeatureComponent,
TokenTextPartFeatureComponent,
],
}]
}] });
/*
* Public API Surface of cadmus-part-general-pg
*/
/**
* Generated bundle index. Do not edit.
*/
export { AssertedHistoricalDateFeatureComponent, BibliographyPartFeatureComponent, CadmusPartGeneralPgModule, CategoriesPartFeatureComponent, ChronologyFragmentFeatureComponent, ChronotopesPartFeatureComponent, CommentFragmentFeatureComponent, CommentPartFeatureComponent, DecoratedCountsPartFeatureComponent, DistrictLocationPartFeatureComponent, DocReferencesPartFeatureComponent, ExternalIdsPartFeatureComponent, HistoricalDatePartFeatureComponent, HistoricalEventsPartFeatureComponent, IndexKeywordsPartFeatureComponent, KeywordsPartFeatureComponent, MetadataPartFeatureComponent, NamesPartFeatureComponent, NotePartFeatureComponent, PhysicalMeasurementsPartFeatureComponent, PhysicalStatesPartFeatureComponent, PinLinksFragmentFeatureComponent, PinLinksPartFeatureComponent, RouterModuleForChild, TiledTextLayerPartFeatureComponent, TiledTextPartFeatureComponent, TokenTextLayerPartFeatureComponent, TokenTextPartFeatureComponent };
//# sourceMappingURL=myrmidon-cadmus-part-general-pg.mjs.map