@myrmidon/cadmus-state 12.0.0 → 14.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/myrmidon-cadmus-state.mjs +21 -21
- package/fesm2022/myrmidon-cadmus-state.mjs.map +1 -1
- package/index.d.ts +393 -3
- package/package.json +6 -6
- package/lib/app.repository.d.ts +0 -76
- package/lib/edit-fragment-feature-base.d.ts +0 -76
- package/lib/edit-part-feature-base.d.ts +0 -91
- package/lib/edited-layer.repository.d.ts +0 -64
- package/lib/edited-thesaurus.repository.d.ts +0 -30
- package/lib/fragment-editor.service.d.ts +0 -40
- package/lib/part-editor.service.d.ts +0 -39
- package/public-api.d.ts +0 -7
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { Fragment, LayerHint, Part, TextLayerPart, TokenLocation } from '@myrmidon/cadmus-core';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { FacetService, ItemService, ThesaurusService } from '@myrmidon/cadmus-api';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* Edited layer part repository.
|
|
7
|
-
*/
|
|
8
|
-
export declare class EditedLayerRepository {
|
|
9
|
-
private _itemService;
|
|
10
|
-
private _facetService;
|
|
11
|
-
private _thesaurusService;
|
|
12
|
-
private _part$;
|
|
13
|
-
private _baseText$;
|
|
14
|
-
private _baseTextPart$;
|
|
15
|
-
private _locations$;
|
|
16
|
-
private _breakChance$;
|
|
17
|
-
private _layerHints$;
|
|
18
|
-
private _thesauriSet;
|
|
19
|
-
private _loading$;
|
|
20
|
-
private _saving$;
|
|
21
|
-
get loading$(): Observable<boolean>;
|
|
22
|
-
get saving$(): Observable<boolean>;
|
|
23
|
-
get part$(): Observable<TextLayerPart | undefined>;
|
|
24
|
-
get baseText$(): Observable<string | undefined>;
|
|
25
|
-
get baseTextPart$(): Observable<Part | undefined>;
|
|
26
|
-
get locations$(): Observable<TokenLocation[]>;
|
|
27
|
-
get breakChance$(): Observable<number>;
|
|
28
|
-
get layerHints$(): Observable<LayerHint[]>;
|
|
29
|
-
constructor(_itemService: ItemService, _facetService: FacetService, _thesaurusService: ThesaurusService);
|
|
30
|
-
reset(): void;
|
|
31
|
-
getPart(): TextLayerPart | undefined;
|
|
32
|
-
getBaseText(): string | undefined;
|
|
33
|
-
getLocations(): TokenLocation[];
|
|
34
|
-
private getPartLocations;
|
|
35
|
-
private loadWithThesauri;
|
|
36
|
-
private loadWithoutThesauri;
|
|
37
|
-
/**
|
|
38
|
-
* Load the state for editing layer part(s).
|
|
39
|
-
*
|
|
40
|
-
* @param itemId The item ID the layer part belongs to.
|
|
41
|
-
* @param partId The layer part ID.
|
|
42
|
-
* @param thesauriIds The optional thesauri IDs to load.
|
|
43
|
-
*/
|
|
44
|
-
load(itemId: string, partId: string, thesauriIds?: string[]): void;
|
|
45
|
-
/**
|
|
46
|
-
* Refresh the layer part break chance.
|
|
47
|
-
*/
|
|
48
|
-
refreshBreakChance(): void;
|
|
49
|
-
applyLayerPatches(partId: string, patches: string[]): void;
|
|
50
|
-
/**
|
|
51
|
-
* Delete the fragment at the specified location.
|
|
52
|
-
*
|
|
53
|
-
* @param loc The fragment's location.
|
|
54
|
-
*/
|
|
55
|
-
deleteFragment(loc: TokenLocation): void;
|
|
56
|
-
/**
|
|
57
|
-
* Save the specified fragment.
|
|
58
|
-
*
|
|
59
|
-
* @param fragment The fragment.
|
|
60
|
-
*/
|
|
61
|
-
saveFragment(fragment: Fragment): void;
|
|
62
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<EditedLayerRepository, never>;
|
|
63
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<EditedLayerRepository>;
|
|
64
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { Thesaurus } from '@myrmidon/cadmus-core';
|
|
3
|
-
import { ThesaurusService } from '@myrmidon/cadmus-api';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class EditedThesaurusRepository {
|
|
6
|
-
private _thesaurusService;
|
|
7
|
-
private _thesaurus$;
|
|
8
|
-
private _loading$;
|
|
9
|
-
private _saving$;
|
|
10
|
-
loading$: Observable<boolean>;
|
|
11
|
-
saving$: Observable<boolean>;
|
|
12
|
-
get thesaurus$(): Observable<Thesaurus | undefined>;
|
|
13
|
-
constructor(_thesaurusService: ThesaurusService);
|
|
14
|
-
getThesaurus(): Thesaurus | undefined;
|
|
15
|
-
/**
|
|
16
|
-
* Load the specified thesaurus.
|
|
17
|
-
*
|
|
18
|
-
* @param id The thesaurus ID or undefined to load a new thesaurus.
|
|
19
|
-
*/
|
|
20
|
-
load(id?: string): void;
|
|
21
|
-
/**
|
|
22
|
-
* Save the specified thesaurus.
|
|
23
|
-
*
|
|
24
|
-
* @param thesaurus The thesaurus to save.
|
|
25
|
-
* @returns Promise with saved thesaurus.
|
|
26
|
-
*/
|
|
27
|
-
save(thesaurus: Thesaurus): Promise<Thesaurus>;
|
|
28
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<EditedThesaurusRepository, never>;
|
|
29
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<EditedThesaurusRepository>;
|
|
30
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { ItemService, ThesaurusService } from '@myrmidon/cadmus-api';
|
|
3
|
-
import { Fragment, Part } from '@myrmidon/cadmus-core';
|
|
4
|
-
import { EditedObject, FragmentIdentity } from '@myrmidon/cadmus-ui';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* Service used by layer part editor wrappers to load part and thesauri
|
|
8
|
-
* or save parts.
|
|
9
|
-
*/
|
|
10
|
-
export declare class FragmentEditorService {
|
|
11
|
-
private _itemService;
|
|
12
|
-
private _thesaurusService;
|
|
13
|
-
private _loading$;
|
|
14
|
-
private _saving$;
|
|
15
|
-
loading$: Observable<boolean>;
|
|
16
|
-
saving$: Observable<boolean>;
|
|
17
|
-
constructor(_itemService: ItemService, _thesaurusService: ThesaurusService);
|
|
18
|
-
private getFragmentFromPart;
|
|
19
|
-
private loadWithThesauri;
|
|
20
|
-
private loadWithoutThesauri;
|
|
21
|
-
/**
|
|
22
|
-
* Load into the state the part with the specified ID
|
|
23
|
-
* and its thesauri.
|
|
24
|
-
* If the ID is not specified, it's a new part; in this case,
|
|
25
|
-
* it will get a null ID, but use the specified itemId and roleId.
|
|
26
|
-
*
|
|
27
|
-
* @param identity The part identity.
|
|
28
|
-
* @param thesauriIds The thesauri IDs array.
|
|
29
|
-
*/
|
|
30
|
-
load(identity: FragmentIdentity, thesauriIds?: string[]): Promise<EditedObject<Fragment> | null>;
|
|
31
|
-
/**
|
|
32
|
-
* Save the fragments in their layer part.
|
|
33
|
-
*
|
|
34
|
-
* @param part The part.
|
|
35
|
-
* @returns Promise which when successful returns the saved part.
|
|
36
|
-
*/
|
|
37
|
-
save(part: Part): Promise<Part>;
|
|
38
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FragmentEditorService, never>;
|
|
39
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<FragmentEditorService>;
|
|
40
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { ItemService, ThesaurusService } from '@myrmidon/cadmus-api';
|
|
3
|
-
import { Part } from '@myrmidon/cadmus-core';
|
|
4
|
-
import { EditedObject, PartIdentity } from '@myrmidon/cadmus-ui';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* Service used by part editor wrappers to load part and thesauri
|
|
8
|
-
* or save parts.
|
|
9
|
-
*/
|
|
10
|
-
export declare class PartEditorService {
|
|
11
|
-
private _itemService;
|
|
12
|
-
private _thesaurusService;
|
|
13
|
-
private _loading$;
|
|
14
|
-
private _saving$;
|
|
15
|
-
loading$: Observable<boolean>;
|
|
16
|
-
saving$: Observable<boolean>;
|
|
17
|
-
constructor(_itemService: ItemService, _thesaurusService: ThesaurusService);
|
|
18
|
-
private loadWithThesauri;
|
|
19
|
-
private loadWithoutThesauri;
|
|
20
|
-
/**
|
|
21
|
-
* Load into the state the part with the specified ID
|
|
22
|
-
* and its thesauri.
|
|
23
|
-
* If the ID is not specified, it's a new part; in this case,
|
|
24
|
-
* it will get a null ID, but use the specified itemId and roleId.
|
|
25
|
-
*
|
|
26
|
-
* @param identity The part identity.
|
|
27
|
-
* @param thesauriIds The thesauri IDs array.
|
|
28
|
-
*/
|
|
29
|
-
load(identity: PartIdentity, thesauriIds?: string[]): Promise<EditedObject<Part> | null>;
|
|
30
|
-
/**
|
|
31
|
-
* Save the part.
|
|
32
|
-
*
|
|
33
|
-
* @param part The part.
|
|
34
|
-
* @returns Promise which when successful returns the saved part.
|
|
35
|
-
*/
|
|
36
|
-
save(part: Part): Promise<Part>;
|
|
37
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PartEditorService, never>;
|
|
38
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<PartEditorService>;
|
|
39
|
-
}
|
package/public-api.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from './lib/app.repository';
|
|
2
|
-
export * from './lib/edit-fragment-feature-base';
|
|
3
|
-
export * from './lib/edit-part-feature-base';
|
|
4
|
-
export * from './lib/edited-thesaurus.repository';
|
|
5
|
-
export * from './lib/edited-layer.repository';
|
|
6
|
-
export * from './lib/fragment-editor.service';
|
|
7
|
-
export * from './lib/part-editor.service';
|