@myrmidon/cadmus-refs-asserted-ids 10.0.0 → 10.0.2

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/index.d.ts CHANGED
@@ -1,14 +1,14 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { OnInit, OnDestroy } from '@angular/core';
3
3
  import { FormControl, FormGroup, FormBuilder } from '@angular/forms';
4
- import { IndexLookupDefinitions, ThesaurusEntry, DataPinInfo, Item, Part, IndexLookupDefinition } from '@myrmidon/cadmus-core';
4
+ import { RamStorageService } from '@myrmidon/ngx-tools';
5
5
  import { Assertion } from '@myrmidon/cadmus-refs-assertion';
6
+ import { Item, DataPinInfo, Part, IndexLookupDefinitions, ThesaurusEntry, IndexLookupDefinition } from '@myrmidon/cadmus-core';
7
+ import { RefLookupService, RefLookupFilter, RefLookupConfig, RefLookupSetEvent } from '@myrmidon/cadmus-refs-lookup';
6
8
  import { Observable } from 'rxjs';
7
9
  import { ItemService, ThesaurusService } from '@myrmidon/cadmus-api';
8
- import { RefLookupService, RefLookupFilter, RefLookupConfig, RefLookupSetEvent } from '@myrmidon/cadmus-refs-lookup';
9
- import { DialogService } from '@myrmidon/ngx-mat-tools';
10
- import { RamStorageService } from '@myrmidon/ngx-tools';
11
10
  import { MatSnackBar } from '@angular/material/snack-bar';
11
+ import { DialogService } from '@myrmidon/ngx-mat-tools';
12
12
 
13
13
  /**
14
14
  * Pin-based lookup filter. This is a RefLookupFilter with the addition
@@ -34,134 +34,6 @@ declare class PinRefLookupService implements RefLookupService {
34
34
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<PinRefLookupService>;
35
35
  }
36
36
 
37
- /**
38
- * An asserted ID.
39
- */
40
- interface AssertedId {
41
- tag?: string;
42
- value: string;
43
- label?: string;
44
- scope: string;
45
- assertion?: Assertion;
46
- }
47
- /**
48
- * Asserted ID editor component.
49
- */
50
- declare class AssertedIdComponent implements OnInit, OnDestroy {
51
- lookupService: PinRefLookupService;
52
- lookupDefs: IndexLookupDefinitions;
53
- private _sub?;
54
- private _updatingForm;
55
- tag: FormControl<string | null>;
56
- value: FormControl<string | null>;
57
- label: FormControl<string | null>;
58
- scope: FormControl<string | null>;
59
- assertion: FormControl<Assertion | null>;
60
- form: FormGroup;
61
- lookupExpanded: boolean;
62
- readonly idScopeEntries: _angular_core.InputSignal<ThesaurusEntry[] | undefined>;
63
- readonly idTagEntries: _angular_core.InputSignal<ThesaurusEntry[] | undefined>;
64
- readonly assTagEntries: _angular_core.InputSignal<ThesaurusEntry[] | undefined>;
65
- readonly refTypeEntries: _angular_core.InputSignal<ThesaurusEntry[] | undefined>;
66
- readonly refTagEntries: _angular_core.InputSignal<ThesaurusEntry[] | undefined>;
67
- /**
68
- * The asserted ID being edited.
69
- */
70
- readonly id: _angular_core.ModelSignal<AssertedId | undefined>;
71
- /**
72
- * True to hide the pin-based EID lookup UI.
73
- */
74
- readonly noEidLookup: _angular_core.InputSignal<boolean | undefined>;
75
- /**
76
- * True to show the submit button.
77
- */
78
- readonly hasSubmit: _angular_core.InputSignal<boolean | undefined>;
79
- /**
80
- * Emitted when the editor is closed.
81
- */
82
- readonly editorClose: _angular_core.OutputEmitterRef<void>;
83
- constructor(formBuilder: FormBuilder, lookupService: PinRefLookupService, lookupDefs: IndexLookupDefinitions);
84
- ngOnInit(): void;
85
- ngOnDestroy(): void;
86
- onAssertionChange(assertion: Assertion | undefined): void;
87
- onIdPick(id: string): void;
88
- private updateForm;
89
- private getId;
90
- emitIdChange(): void;
91
- cancel(): void;
92
- save(): void;
93
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AssertedIdComponent, never>;
94
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AssertedIdComponent, "cadmus-refs-asserted-id", never, { "idScopeEntries": { "alias": "idScopeEntries"; "required": false; "isSignal": true; }; "idTagEntries": { "alias": "idTagEntries"; "required": false; "isSignal": true; }; "assTagEntries": { "alias": "assTagEntries"; "required": false; "isSignal": true; }; "refTypeEntries": { "alias": "refTypeEntries"; "required": false; "isSignal": true; }; "refTagEntries": { "alias": "refTagEntries"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "noEidLookup": { "alias": "noEidLookup"; "required": false; "isSignal": true; }; "hasSubmit": { "alias": "hasSubmit"; "required": false; "isSignal": true; }; }, { "id": "idChange"; "editorClose": "editorClose"; }, never, never, true, never>;
95
- }
96
-
97
- /**
98
- * Asserted IDs editor.
99
- */
100
- declare class AssertedIdsComponent {
101
- private _dialogService;
102
- private _editedIndex;
103
- edited?: AssertedId;
104
- /**
105
- * The asserted IDs.
106
- */
107
- readonly ids: _angular_core.ModelSignal<AssertedId[]>;
108
- readonly idScopeEntries: _angular_core.InputSignal<ThesaurusEntry[] | undefined>;
109
- readonly idTagEntries: _angular_core.InputSignal<ThesaurusEntry[] | undefined>;
110
- readonly assTagEntries: _angular_core.InputSignal<ThesaurusEntry[] | undefined>;
111
- readonly refTypeEntries: _angular_core.InputSignal<ThesaurusEntry[] | undefined>;
112
- readonly refTagEntries: _angular_core.InputSignal<ThesaurusEntry[] | undefined>;
113
- entries: FormControl<AssertedId[]>;
114
- form: FormGroup;
115
- constructor(formBuilder: FormBuilder, _dialogService: DialogService);
116
- private updateForm;
117
- addId(): void;
118
- editId(id: AssertedId, index: number): void;
119
- closeId(): void;
120
- saveId(entry: AssertedId): void;
121
- deleteId(index: number): void;
122
- moveIdUp(index: number): void;
123
- moveIdDown(index: number): void;
124
- onIdChange(id?: AssertedId): void;
125
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AssertedIdsComponent, never>;
126
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AssertedIdsComponent, "cadmus-refs-asserted-ids", never, { "ids": { "alias": "ids"; "required": false; "isSignal": true; }; "idScopeEntries": { "alias": "idScopeEntries"; "required": false; "isSignal": true; }; "idTagEntries": { "alias": "idTagEntries"; "required": false; "isSignal": true; }; "assTagEntries": { "alias": "assTagEntries"; "required": false; "isSignal": true; }; "refTypeEntries": { "alias": "refTypeEntries"; "required": false; "isSignal": true; }; "refTagEntries": { "alias": "refTagEntries"; "required": false; "isSignal": true; }; }, { "ids": "idsChange"; }, never, never, true, never>;
127
- }
128
-
129
- interface MetadataPart$1 extends Part {
130
- metadata: {
131
- type?: string;
132
- name: string;
133
- value: string;
134
- }[];
135
- }
136
- interface LookupInfo {
137
- pin: DataPinInfo;
138
- item?: Item;
139
- part?: MetadataPart$1;
140
- }
141
- declare class ScopedPinLookupComponent {
142
- private _itemService;
143
- lookupService: PinRefLookupService;
144
- lookupDefs: IndexLookupDefinitions;
145
- key: FormControl<string | null>;
146
- keyForm: FormGroup;
147
- keys: string[];
148
- info?: LookupInfo;
149
- id: FormControl<string | null>;
150
- idForm: FormGroup;
151
- /**
152
- * Emitted whenever the user picks an ID.
153
- */
154
- readonly idPick: _angular_core.OutputEmitterRef<string>;
155
- constructor(formBuilder: FormBuilder, _itemService: ItemService, lookupService: PinRefLookupService, lookupDefs: IndexLookupDefinitions);
156
- ngOnInit(): void;
157
- onItemChange(item: unknown): void;
158
- appendIdComponent(type: string, metaIndex?: number): void;
159
- pickId(): void;
160
- resetId(): void;
161
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<ScopedPinLookupComponent, never>;
162
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ScopedPinLookupComponent, "cadmus-scoped-pin-lookup", never, {}, { "idPick": "idPick"; }, never, never, true, never>;
163
- }
164
-
165
37
  declare class ItemRefLookupService implements RefLookupService {
166
38
  private _itemService;
167
39
  constructor(_itemService: ItemService);
@@ -171,7 +43,7 @@ declare class ItemRefLookupService implements RefLookupService {
171
43
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<ItemRefLookupService>;
172
44
  }
173
45
 
174
- interface MetadataPart extends Part {
46
+ interface MetadataPart$1 extends Part {
175
47
  metadata: {
176
48
  type?: string;
177
49
  name: string;
@@ -184,7 +56,7 @@ interface MetadataPart extends Part {
184
56
  interface PinLookupData {
185
57
  pin: DataPinInfo;
186
58
  item?: Item;
187
- metaPart?: MetadataPart;
59
+ metaPart?: MetadataPart$1;
188
60
  }
189
61
  /**
190
62
  * A pin-based target. This includes pin's name and value, and
@@ -329,12 +201,6 @@ interface AssertedCompositeId {
329
201
  scope?: string;
330
202
  assertion?: Assertion;
331
203
  }
332
- /**
333
- * The key to be used to retrieve the external lookup configs from the
334
- * settings storage. This is equal to the selector of
335
- * AssertedCompositeIdComponent plus ".configs".
336
- */
337
- declare const ASSERTED_COMPOSITE_ID_CONFIGS_KEY = "cadmus-refs-asserted-composite-id.configs";
338
204
  /**
339
205
  * An asserted composite ID editor. This allows the user to edit an asserted
340
206
  * composite ID, which can be an external ID or a lookup ID.
@@ -492,5 +358,133 @@ declare class AssertedCompositeIdsComponent {
492
358
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<AssertedCompositeIdsComponent, "cadmus-refs-asserted-composite-ids", never, { "ids": { "alias": "ids"; "required": false; }; "idScopeEntries": { "alias": "idScopeEntries"; "required": false; "isSignal": true; }; "idTagEntries": { "alias": "idTagEntries"; "required": false; "isSignal": true; }; "assTagEntries": { "alias": "assTagEntries"; "required": false; "isSignal": true; }; "refTypeEntries": { "alias": "refTypeEntries"; "required": false; "isSignal": true; }; "refTagEntries": { "alias": "refTagEntries"; "required": false; "isSignal": true; }; "pinByTypeMode": { "alias": "pinByTypeMode"; "required": false; "isSignal": true; }; "canSwitchMode": { "alias": "canSwitchMode"; "required": false; "isSignal": true; }; "canEditTarget": { "alias": "canEditTarget"; "required": false; "isSignal": true; }; "lookupDefinitions": { "alias": "lookupDefinitions"; "required": false; "isSignal": true; }; "defaultPartTypeKey": { "alias": "defaultPartTypeKey"; "required": false; "isSignal": true; }; "internalDefault": { "alias": "internalDefault"; "required": false; "isSignal": true; }; }, { "idsChange": "idsChange"; }, never, never, true, never>;
493
359
  }
494
360
 
495
- export { ASSERTED_COMPOSITE_ID_CONFIGS_KEY, AssertedCompositeIdComponent, AssertedCompositeIdsComponent, AssertedIdComponent, AssertedIdsComponent, ItemRefLookupService, PinRefLookupService, PinTargetLookupComponent, ScopedPinLookupComponent };
361
+ /**
362
+ * An asserted ID.
363
+ */
364
+ interface AssertedId {
365
+ tag?: string;
366
+ value: string;
367
+ label?: string;
368
+ scope: string;
369
+ assertion?: Assertion;
370
+ }
371
+ /**
372
+ * Asserted ID editor component.
373
+ */
374
+ declare class AssertedIdComponent implements OnInit, OnDestroy {
375
+ lookupService: PinRefLookupService;
376
+ lookupDefs: IndexLookupDefinitions;
377
+ private _sub?;
378
+ private _updatingForm;
379
+ tag: FormControl<string | null>;
380
+ value: FormControl<string | null>;
381
+ label: FormControl<string | null>;
382
+ scope: FormControl<string | null>;
383
+ assertion: FormControl<Assertion | null>;
384
+ form: FormGroup;
385
+ lookupExpanded: boolean;
386
+ readonly idScopeEntries: _angular_core.InputSignal<ThesaurusEntry[] | undefined>;
387
+ readonly idTagEntries: _angular_core.InputSignal<ThesaurusEntry[] | undefined>;
388
+ readonly assTagEntries: _angular_core.InputSignal<ThesaurusEntry[] | undefined>;
389
+ readonly refTypeEntries: _angular_core.InputSignal<ThesaurusEntry[] | undefined>;
390
+ readonly refTagEntries: _angular_core.InputSignal<ThesaurusEntry[] | undefined>;
391
+ /**
392
+ * The asserted ID being edited.
393
+ */
394
+ readonly id: _angular_core.ModelSignal<AssertedId | undefined>;
395
+ /**
396
+ * True to hide the pin-based EID lookup UI.
397
+ */
398
+ readonly noEidLookup: _angular_core.InputSignal<boolean | undefined>;
399
+ /**
400
+ * True to show the submit button.
401
+ */
402
+ readonly hasSubmit: _angular_core.InputSignal<boolean | undefined>;
403
+ /**
404
+ * Emitted when the editor is closed.
405
+ */
406
+ readonly editorClose: _angular_core.OutputEmitterRef<void>;
407
+ constructor(formBuilder: FormBuilder, lookupService: PinRefLookupService, lookupDefs: IndexLookupDefinitions);
408
+ ngOnInit(): void;
409
+ ngOnDestroy(): void;
410
+ onAssertionChange(assertion: Assertion | undefined): void;
411
+ onIdPick(id: string): void;
412
+ private updateForm;
413
+ private getId;
414
+ emitIdChange(): void;
415
+ cancel(): void;
416
+ save(): void;
417
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AssertedIdComponent, never>;
418
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AssertedIdComponent, "cadmus-refs-asserted-id", never, { "idScopeEntries": { "alias": "idScopeEntries"; "required": false; "isSignal": true; }; "idTagEntries": { "alias": "idTagEntries"; "required": false; "isSignal": true; }; "assTagEntries": { "alias": "assTagEntries"; "required": false; "isSignal": true; }; "refTypeEntries": { "alias": "refTypeEntries"; "required": false; "isSignal": true; }; "refTagEntries": { "alias": "refTagEntries"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "noEidLookup": { "alias": "noEidLookup"; "required": false; "isSignal": true; }; "hasSubmit": { "alias": "hasSubmit"; "required": false; "isSignal": true; }; }, { "id": "idChange"; "editorClose": "editorClose"; }, never, never, true, never>;
419
+ }
420
+
421
+ /**
422
+ * Asserted IDs editor.
423
+ */
424
+ declare class AssertedIdsComponent {
425
+ private _dialogService;
426
+ private _editedIndex;
427
+ edited?: AssertedId;
428
+ /**
429
+ * The asserted IDs.
430
+ */
431
+ readonly ids: _angular_core.ModelSignal<AssertedId[]>;
432
+ readonly idScopeEntries: _angular_core.InputSignal<ThesaurusEntry[] | undefined>;
433
+ readonly idTagEntries: _angular_core.InputSignal<ThesaurusEntry[] | undefined>;
434
+ readonly assTagEntries: _angular_core.InputSignal<ThesaurusEntry[] | undefined>;
435
+ readonly refTypeEntries: _angular_core.InputSignal<ThesaurusEntry[] | undefined>;
436
+ readonly refTagEntries: _angular_core.InputSignal<ThesaurusEntry[] | undefined>;
437
+ entries: FormControl<AssertedId[]>;
438
+ form: FormGroup;
439
+ constructor(formBuilder: FormBuilder, _dialogService: DialogService);
440
+ private updateForm;
441
+ addId(): void;
442
+ editId(id: AssertedId, index: number): void;
443
+ closeId(): void;
444
+ saveId(entry: AssertedId): void;
445
+ deleteId(index: number): void;
446
+ moveIdUp(index: number): void;
447
+ moveIdDown(index: number): void;
448
+ onIdChange(id?: AssertedId): void;
449
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AssertedIdsComponent, never>;
450
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AssertedIdsComponent, "cadmus-refs-asserted-ids", never, { "ids": { "alias": "ids"; "required": false; "isSignal": true; }; "idScopeEntries": { "alias": "idScopeEntries"; "required": false; "isSignal": true; }; "idTagEntries": { "alias": "idTagEntries"; "required": false; "isSignal": true; }; "assTagEntries": { "alias": "assTagEntries"; "required": false; "isSignal": true; }; "refTypeEntries": { "alias": "refTypeEntries"; "required": false; "isSignal": true; }; "refTagEntries": { "alias": "refTagEntries"; "required": false; "isSignal": true; }; }, { "ids": "idsChange"; }, never, never, true, never>;
451
+ }
452
+
453
+ interface MetadataPart extends Part {
454
+ metadata: {
455
+ type?: string;
456
+ name: string;
457
+ value: string;
458
+ }[];
459
+ }
460
+ interface LookupInfo {
461
+ pin: DataPinInfo;
462
+ item?: Item;
463
+ part?: MetadataPart;
464
+ }
465
+ declare class ScopedPinLookupComponent {
466
+ private _itemService;
467
+ lookupService: PinRefLookupService;
468
+ lookupDefs: IndexLookupDefinitions;
469
+ key: FormControl<string | null>;
470
+ keyForm: FormGroup;
471
+ keys: string[];
472
+ info?: LookupInfo;
473
+ id: FormControl<string | null>;
474
+ idForm: FormGroup;
475
+ /**
476
+ * Emitted whenever the user picks an ID.
477
+ */
478
+ readonly idPick: _angular_core.OutputEmitterRef<string>;
479
+ constructor(formBuilder: FormBuilder, _itemService: ItemService, lookupService: PinRefLookupService, lookupDefs: IndexLookupDefinitions);
480
+ ngOnInit(): void;
481
+ onItemChange(item: unknown): void;
482
+ appendIdComponent(type: string, metaIndex?: number): void;
483
+ pickId(): void;
484
+ resetId(): void;
485
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ScopedPinLookupComponent, never>;
486
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ScopedPinLookupComponent, "cadmus-scoped-pin-lookup", never, {}, { "idPick": "idPick"; }, never, never, true, never>;
487
+ }
488
+
489
+ export { AssertedCompositeIdComponent, AssertedCompositeIdsComponent, AssertedIdComponent, AssertedIdsComponent, ItemRefLookupService, PinRefLookupService, PinTargetLookupComponent, ScopedPinLookupComponent };
496
490
  export type { AssertedCompositeId, AssertedId, PinLookupData, PinRefLookupFilter, PinTarget };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myrmidon/cadmus-refs-asserted-ids",
3
- "version": "10.0.0",
3
+ "version": "10.0.2",
4
4
  "description": "Cadmus - asserted IDs components.",
5
5
  "keywords": [
6
6
  "Cadmus",
@@ -18,7 +18,7 @@
18
18
  "@angular/common": "^20.0.0",
19
19
  "@angular/core": "^20.0.0",
20
20
  "@myrmidon/ngx-mat-tools": "^1.0.0",
21
- "@myrmidon/cadmus-api": "^13.0.0",
21
+ "@myrmidon/cadmus-api": "^14.0.0",
22
22
  "@myrmidon/cadmus-refs-assertion": "^10.0.0"
23
23
  },
24
24
  "dependencies": {