@myrmidon/cadmus-refs-asserted-ids 2.1.7 → 3.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/README.md +15 -8
- package/esm2022/lib/asserted-composite-id/asserted-composite-id.component.mjs +34 -20
- package/esm2022/lib/asserted-composite-ids/asserted-composite-ids.component.mjs +6 -7
- package/esm2022/lib/asserted-id/asserted-id.component.mjs +8 -9
- package/esm2022/lib/asserted-ids/asserted-ids.component.mjs +6 -7
- package/esm2022/lib/cadmus-refs-asserted-ids.module.mjs +6 -7
- package/esm2022/lib/pin-target-lookup/pin-target-lookup.component.mjs +27 -9
- package/esm2022/lib/scoped-pin-lookup/scoped-pin-lookup.component.mjs +8 -9
- package/esm2022/lib/services/item-ref-lookup.service.mjs +6 -7
- package/esm2022/lib/services/pin-ref-lookup.service.mjs +6 -7
- package/fesm2022/myrmidon-cadmus-refs-asserted-ids.mjs +89 -56
- package/fesm2022/myrmidon-cadmus-refs-asserted-ids.mjs.map +1 -1
- package/lib/asserted-composite-id/asserted-composite-id.component.d.ts +14 -3
- package/lib/pin-target-lookup/pin-target-lookup.component.d.ts +9 -1
- package/package.json +3 -3
|
@@ -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[];
|
|
@@ -78,7 +87,8 @@ export declare class AssertedCompositeIdComponent implements OnInit {
|
|
|
78
87
|
* Emitted whenever the user requests to close the editor.
|
|
79
88
|
*/
|
|
80
89
|
editorClose: EventEmitter<any>;
|
|
81
|
-
|
|
90
|
+
extMoreRequest: EventEmitter<RefLookupSetEvent>;
|
|
91
|
+
constructor(formBuilder: FormBuilder, lookupService: PinRefLookupService, lookupDefs: IndexLookupDefinitions, settings: RamStorageService);
|
|
82
92
|
ngOnInit(): void;
|
|
83
93
|
onAssertionChange(assertion: Assertion | undefined): void;
|
|
84
94
|
onTargetChange(target: PinTarget): void;
|
|
@@ -86,8 +96,9 @@ export declare class AssertedCompositeIdComponent implements OnInit {
|
|
|
86
96
|
private getId;
|
|
87
97
|
emitIdChange(): void;
|
|
88
98
|
onEditorClose(): void;
|
|
99
|
+
onExtMoreRequest(event: RefLookupSetEvent): void;
|
|
89
100
|
cancel(): void;
|
|
90
101
|
save(): void;
|
|
91
102
|
static ɵfac: i0.ɵɵFactoryDeclaration<AssertedCompositeIdComponent, never>;
|
|
92
|
-
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"; }, 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>;
|
|
93
104
|
}
|
|
@@ -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,10 @@ 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[];
|
|
75
80
|
/**
|
|
76
81
|
* True if when a new target is set it should be internal rather than
|
|
77
82
|
* external by default.
|
|
@@ -95,6 +100,7 @@ export declare class PinTargetLookupComponent implements OnInit, OnDestroy {
|
|
|
95
100
|
* The event's value is the new target.
|
|
96
101
|
*/
|
|
97
102
|
targetChange: EventEmitter<PinTarget>;
|
|
103
|
+
extMoreRequest: EventEmitter<RefLookupSetEvent>;
|
|
98
104
|
modelEntries: ThesaurusEntry[];
|
|
99
105
|
partTypeKeys: string[];
|
|
100
106
|
itemParts: Part[];
|
|
@@ -137,10 +143,12 @@ export declare class PinTargetLookupComponent implements OnInit, OnDestroy {
|
|
|
137
143
|
* @param info The pin info from pin lookup.
|
|
138
144
|
*/
|
|
139
145
|
onPinLookupChange(info: DataPinInfo): void;
|
|
146
|
+
onExtItemChange(event: RefLookupSetEvent): void;
|
|
147
|
+
onExtMoreRequest(event: RefLookupSetEvent): void;
|
|
140
148
|
onCopied(): void;
|
|
141
149
|
close(): void;
|
|
142
150
|
save(): void;
|
|
143
151
|
static ɵfac: i0.ɵɵFactoryDeclaration<PinTargetLookupComponent, never>;
|
|
144
|
-
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; }; "internalDefault": { "alias": "internalDefault"; "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>;
|
|
145
153
|
}
|
|
146
154
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myrmidon/cadmus-refs-asserted-ids",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Cadmus - asserted IDs components.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Cadmus",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"name": "Daniele Fusi"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"@angular/common": "^
|
|
19
|
-
"@angular/core": "^
|
|
18
|
+
"@angular/common": "^17.0.0",
|
|
19
|
+
"@angular/core": "^17.0.0"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"tslib": "^2.5.0"
|