@myrmidon/cadmus-refs-asserted-ids 2.1.6 → 2.1.8
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/README.md +18 -8
- package/esm2022/lib/asserted-composite-id/asserted-composite-id.component.mjs +34 -17
- package/esm2022/lib/asserted-composite-ids/asserted-composite-ids.component.mjs +7 -5
- package/esm2022/lib/asserted-id/asserted-id.component.mjs +3 -3
- package/esm2022/lib/asserted-ids/asserted-ids.component.mjs +3 -3
- package/esm2022/lib/cadmus-refs-asserted-ids.module.mjs +4 -4
- package/esm2022/lib/pin-target-lookup/pin-target-lookup.component.mjs +27 -6
- package/esm2022/lib/scoped-pin-lookup/scoped-pin-lookup.component.mjs +3 -3
- package/esm2022/lib/services/item-ref-lookup.service.mjs +3 -3
- package/esm2022/lib/services/pin-ref-lookup.service.mjs +3 -3
- package/fesm2022/myrmidon-cadmus-refs-asserted-ids.mjs +83 -44
- package/fesm2022/myrmidon-cadmus-refs-asserted-ids.mjs.map +1 -1
- package/lib/asserted-composite-id/asserted-composite-id.component.d.ts +19 -3
- package/lib/asserted-composite-ids/asserted-composite-ids.component.d.ts +6 -1
- package/lib/pin-target-lookup/pin-target-lookup.component.d.ts +14 -1
- package/package.json +1 -1
|
@@ -4,6 +4,8 @@ import { IndexLookupDefinitions, ThesaurusEntry } from '@myrmidon/cadmus-core';
|
|
|
4
4
|
import { Assertion } from '@myrmidon/cadmus-refs-assertion';
|
|
5
5
|
import { PinRefLookupService } from '../services/pin-ref-lookup.service';
|
|
6
6
|
import { PinTarget } from '../pin-target-lookup/pin-target-lookup.component';
|
|
7
|
+
import { RefLookupConfig, RefLookupSetEvent } from '@myrmidon/cadmus-refs-lookup';
|
|
8
|
+
import { RamStorageService } from '@myrmidon/ng-tools';
|
|
7
9
|
import * as i0 from "@angular/core";
|
|
8
10
|
/**
|
|
9
11
|
* An asserted composite ID. This can be an external ID, having only the ID value
|
|
@@ -16,17 +18,24 @@ export interface AssertedCompositeId {
|
|
|
16
18
|
scope?: string;
|
|
17
19
|
assertion?: Assertion;
|
|
18
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* The key to be used to retrieve the external lookup configs from the
|
|
23
|
+
* settings storage. This is equal to the selector of
|
|
24
|
+
* AssertedCompositeIdComponent plus ".configs".
|
|
25
|
+
*/
|
|
26
|
+
export declare const ASSERTED_COMPOSITE_ID_CONFIGS_KEY = "cadmus-refs-asserted-composite-id.configs";
|
|
19
27
|
export declare class AssertedCompositeIdComponent implements OnInit {
|
|
20
28
|
lookupService: PinRefLookupService;
|
|
21
29
|
lookupDefs: IndexLookupDefinitions;
|
|
22
30
|
private _updatingForm;
|
|
23
31
|
private _id;
|
|
32
|
+
extLookupConfigs: RefLookupConfig[];
|
|
33
|
+
targetExpanded: boolean;
|
|
24
34
|
target: FormControl<PinTarget | null>;
|
|
25
35
|
scope: FormControl<string | null>;
|
|
26
36
|
tag: FormControl<string | null>;
|
|
27
37
|
assertion: FormControl<Assertion | null>;
|
|
28
38
|
form: FormGroup;
|
|
29
|
-
targetExpanded: boolean;
|
|
30
39
|
idScopeEntries?: ThesaurusEntry[];
|
|
31
40
|
idTagEntries?: ThesaurusEntry[];
|
|
32
41
|
assTagEntries?: ThesaurusEntry[];
|
|
@@ -34,6 +43,11 @@ export declare class AssertedCompositeIdComponent implements OnInit {
|
|
|
34
43
|
refTagEntries: ThesaurusEntry[] | undefined;
|
|
35
44
|
get id(): AssertedCompositeId | undefined | null;
|
|
36
45
|
set id(value: AssertedCompositeId | undefined | null);
|
|
46
|
+
/**
|
|
47
|
+
* True if when a new ID is set it should be internal rather than
|
|
48
|
+
* external by default.
|
|
49
|
+
*/
|
|
50
|
+
internalDefault: boolean | undefined;
|
|
37
51
|
/**
|
|
38
52
|
* True if the UI has a submit button.
|
|
39
53
|
*/
|
|
@@ -73,7 +87,8 @@ export declare class AssertedCompositeIdComponent implements OnInit {
|
|
|
73
87
|
* Emitted whenever the user requests to close the editor.
|
|
74
88
|
*/
|
|
75
89
|
editorClose: EventEmitter<any>;
|
|
76
|
-
|
|
90
|
+
extMoreRequest: EventEmitter<RefLookupSetEvent>;
|
|
91
|
+
constructor(formBuilder: FormBuilder, lookupService: PinRefLookupService, lookupDefs: IndexLookupDefinitions, settings: RamStorageService);
|
|
77
92
|
ngOnInit(): void;
|
|
78
93
|
onAssertionChange(assertion: Assertion | undefined): void;
|
|
79
94
|
onTargetChange(target: PinTarget): void;
|
|
@@ -81,8 +96,9 @@ export declare class AssertedCompositeIdComponent implements OnInit {
|
|
|
81
96
|
private getId;
|
|
82
97
|
emitIdChange(): void;
|
|
83
98
|
onEditorClose(): void;
|
|
99
|
+
onExtMoreRequest(event: RefLookupSetEvent): void;
|
|
84
100
|
cancel(): void;
|
|
85
101
|
save(): void;
|
|
86
102
|
static ɵfac: i0.ɵɵFactoryDeclaration<AssertedCompositeIdComponent, never>;
|
|
87
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AssertedCompositeIdComponent, "cadmus-refs-asserted-composite-id", never, { "idScopeEntries": { "alias": "idScopeEntries"; "required": false; }; "idTagEntries": { "alias": "idTagEntries"; "required": false; }; "assTagEntries": { "alias": "assTagEntries"; "required": false; }; "refTypeEntries": { "alias": "refTypeEntries"; "required": false; }; "refTagEntries": { "alias": "refTagEntries"; "required": false; }; "id": { "alias": "id"; "required": false; }; "hasSubmit": { "alias": "hasSubmit"; "required": false; }; "pinByTypeMode": { "alias": "pinByTypeMode"; "required": false; }; "canSwitchMode": { "alias": "canSwitchMode"; "required": false; }; "canEditTarget": { "alias": "canEditTarget"; "required": false; }; "lookupDefinitions": { "alias": "lookupDefinitions"; "required": false; }; "defaultPartTypeKey": { "alias": "defaultPartTypeKey"; "required": false; }; }, { "idChange": "idChange"; "editorClose": "editorClose"; }, never, never, false, never>;
|
|
103
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AssertedCompositeIdComponent, "cadmus-refs-asserted-composite-id", never, { "idScopeEntries": { "alias": "idScopeEntries"; "required": false; }; "idTagEntries": { "alias": "idTagEntries"; "required": false; }; "assTagEntries": { "alias": "assTagEntries"; "required": false; }; "refTypeEntries": { "alias": "refTypeEntries"; "required": false; }; "refTagEntries": { "alias": "refTagEntries"; "required": false; }; "id": { "alias": "id"; "required": false; }; "internalDefault": { "alias": "internalDefault"; "required": false; }; "hasSubmit": { "alias": "hasSubmit"; "required": false; }; "pinByTypeMode": { "alias": "pinByTypeMode"; "required": false; }; "canSwitchMode": { "alias": "canSwitchMode"; "required": false; }; "canEditTarget": { "alias": "canEditTarget"; "required": false; }; "lookupDefinitions": { "alias": "lookupDefinitions"; "required": false; }; "defaultPartTypeKey": { "alias": "defaultPartTypeKey"; "required": false; }; }, { "idChange": "idChange"; "editorClose": "editorClose"; "extMoreRequest": "extMoreRequest"; }, never, never, false, never>;
|
|
88
104
|
}
|
|
@@ -49,6 +49,11 @@ export declare class AssertedCompositeIdsComponent {
|
|
|
49
49
|
* The default part type key.
|
|
50
50
|
*/
|
|
51
51
|
defaultPartTypeKey?: string | null;
|
|
52
|
+
/**
|
|
53
|
+
* True if when a new ID is set it should be internal rather than
|
|
54
|
+
* external by default.
|
|
55
|
+
*/
|
|
56
|
+
internalDefault: boolean | undefined;
|
|
52
57
|
/**
|
|
53
58
|
* Emitted whenever any ID changes.
|
|
54
59
|
*/
|
|
@@ -67,5 +72,5 @@ export declare class AssertedCompositeIdsComponent {
|
|
|
67
72
|
moveIdDown(index: number): void;
|
|
68
73
|
onIdChange(id: AssertedCompositeId): void;
|
|
69
74
|
static ɵfac: i0.ɵɵFactoryDeclaration<AssertedCompositeIdsComponent, never>;
|
|
70
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AssertedCompositeIdsComponent, "cadmus-refs-asserted-composite-ids", never, { "ids": { "alias": "ids"; "required": false; }; "idScopeEntries": { "alias": "idScopeEntries"; "required": false; }; "idTagEntries": { "alias": "idTagEntries"; "required": false; }; "assTagEntries": { "alias": "assTagEntries"; "required": false; }; "refTypeEntries": { "alias": "refTypeEntries"; "required": false; }; "refTagEntries": { "alias": "refTagEntries"; "required": false; }; "pinByTypeMode": { "alias": "pinByTypeMode"; "required": false; }; "canSwitchMode": { "alias": "canSwitchMode"; "required": false; }; "canEditTarget": { "alias": "canEditTarget"; "required": false; }; "lookupDefinitions": { "alias": "lookupDefinitions"; "required": false; }; "defaultPartTypeKey": { "alias": "defaultPartTypeKey"; "required": false; }; }, { "idsChange": "idsChange"; }, never, never, false, never>;
|
|
75
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AssertedCompositeIdsComponent, "cadmus-refs-asserted-composite-ids", never, { "ids": { "alias": "ids"; "required": false; }; "idScopeEntries": { "alias": "idScopeEntries"; "required": false; }; "idTagEntries": { "alias": "idTagEntries"; "required": false; }; "assTagEntries": { "alias": "assTagEntries"; "required": false; }; "refTypeEntries": { "alias": "refTypeEntries"; "required": false; }; "refTagEntries": { "alias": "refTagEntries"; "required": false; }; "pinByTypeMode": { "alias": "pinByTypeMode"; "required": false; }; "canSwitchMode": { "alias": "canSwitchMode"; "required": false; }; "canEditTarget": { "alias": "canEditTarget"; "required": false; }; "lookupDefinitions": { "alias": "lookupDefinitions"; "required": false; }; "defaultPartTypeKey": { "alias": "defaultPartTypeKey"; "required": false; }; "internalDefault": { "alias": "internalDefault"; "required": false; }; }, { "idsChange": "idsChange"; }, never, never, false, never>;
|
|
71
76
|
}
|
|
@@ -5,6 +5,7 @@ import { ItemService, ThesaurusService } from '@myrmidon/cadmus-api';
|
|
|
5
5
|
import { DataPinInfo, IndexLookupDefinition, IndexLookupDefinitions, Item, Part, ThesaurusEntry } from '@myrmidon/cadmus-core';
|
|
6
6
|
import { PinRefLookupFilter, PinRefLookupService } from '../services/pin-ref-lookup.service';
|
|
7
7
|
import { ItemRefLookupService } from '../services/item-ref-lookup.service';
|
|
8
|
+
import { RefLookupConfig, RefLookupSetEvent } from '@myrmidon/cadmus-refs-lookup';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
interface MetadataPart extends Part {
|
|
10
11
|
metadata: {
|
|
@@ -72,6 +73,15 @@ export declare class PinTargetLookupComponent implements OnInit, OnDestroy {
|
|
|
72
73
|
* disabled.
|
|
73
74
|
*/
|
|
74
75
|
lookupDefinitions?: IndexLookupDefinitions;
|
|
76
|
+
/**
|
|
77
|
+
* The optional configurations for using external lookup services.
|
|
78
|
+
*/
|
|
79
|
+
extLookupConfigs: RefLookupConfig[];
|
|
80
|
+
/**
|
|
81
|
+
* True if when a new target is set it should be internal rather than
|
|
82
|
+
* external by default.
|
|
83
|
+
*/
|
|
84
|
+
internalDefault: boolean | undefined;
|
|
75
85
|
/**
|
|
76
86
|
* The target to be edited.
|
|
77
87
|
*/
|
|
@@ -90,6 +100,7 @@ export declare class PinTargetLookupComponent implements OnInit, OnDestroy {
|
|
|
90
100
|
* The event's value is the new target.
|
|
91
101
|
*/
|
|
92
102
|
targetChange: EventEmitter<PinTarget>;
|
|
103
|
+
extMoreRequest: EventEmitter<RefLookupSetEvent>;
|
|
93
104
|
modelEntries: ThesaurusEntry[];
|
|
94
105
|
partTypeKeys: string[];
|
|
95
106
|
itemParts: Part[];
|
|
@@ -132,10 +143,12 @@ export declare class PinTargetLookupComponent implements OnInit, OnDestroy {
|
|
|
132
143
|
* @param info The pin info from pin lookup.
|
|
133
144
|
*/
|
|
134
145
|
onPinLookupChange(info: DataPinInfo): void;
|
|
146
|
+
onExtItemChange(event: RefLookupSetEvent): void;
|
|
147
|
+
onExtMoreRequest(event: RefLookupSetEvent): void;
|
|
135
148
|
onCopied(): void;
|
|
136
149
|
close(): void;
|
|
137
150
|
save(): void;
|
|
138
151
|
static ɵfac: i0.ɵɵFactoryDeclaration<PinTargetLookupComponent, never>;
|
|
139
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PinTargetLookupComponent, "cadmus-pin-target-lookup", never, { "pinByTypeMode": { "alias": "pinByTypeMode"; "required": false; }; "canSwitchMode": { "alias": "canSwitchMode"; "required": false; }; "canEditTarget": { "alias": "canEditTarget"; "required": false; }; "lookupDefinitions": { "alias": "lookupDefinitions"; "required": false; }; "target": { "alias": "target"; "required": false; }; "defaultPartTypeKey": { "alias": "defaultPartTypeKey"; "required": false; }; }, { "editorClose": "editorClose"; "targetChange": "targetChange"; }, never, never, false, never>;
|
|
152
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PinTargetLookupComponent, "cadmus-pin-target-lookup", never, { "pinByTypeMode": { "alias": "pinByTypeMode"; "required": false; }; "canSwitchMode": { "alias": "canSwitchMode"; "required": false; }; "canEditTarget": { "alias": "canEditTarget"; "required": false; }; "lookupDefinitions": { "alias": "lookupDefinitions"; "required": false; }; "extLookupConfigs": { "alias": "extLookupConfigs"; "required": false; }; "internalDefault": { "alias": "internalDefault"; "required": false; }; "target": { "alias": "target"; "required": false; }; "defaultPartTypeKey": { "alias": "defaultPartTypeKey"; "required": false; }; }, { "editorClose": "editorClose"; "targetChange": "targetChange"; "extMoreRequest": "extMoreRequest"; }, never, never, false, never>;
|
|
140
153
|
}
|
|
141
154
|
export {};
|