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

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
@@ -492,5 +364,133 @@ declare class AssertedCompositeIdsComponent {
492
364
  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
365
  }
494
366
 
367
+ /**
368
+ * An asserted ID.
369
+ */
370
+ interface AssertedId {
371
+ tag?: string;
372
+ value: string;
373
+ label?: string;
374
+ scope: string;
375
+ assertion?: Assertion;
376
+ }
377
+ /**
378
+ * Asserted ID editor component.
379
+ */
380
+ declare class AssertedIdComponent implements OnInit, OnDestroy {
381
+ lookupService: PinRefLookupService;
382
+ lookupDefs: IndexLookupDefinitions;
383
+ private _sub?;
384
+ private _updatingForm;
385
+ tag: FormControl<string | null>;
386
+ value: FormControl<string | null>;
387
+ label: FormControl<string | null>;
388
+ scope: FormControl<string | null>;
389
+ assertion: FormControl<Assertion | null>;
390
+ form: FormGroup;
391
+ lookupExpanded: boolean;
392
+ readonly idScopeEntries: _angular_core.InputSignal<ThesaurusEntry[] | undefined>;
393
+ readonly idTagEntries: _angular_core.InputSignal<ThesaurusEntry[] | undefined>;
394
+ readonly assTagEntries: _angular_core.InputSignal<ThesaurusEntry[] | undefined>;
395
+ readonly refTypeEntries: _angular_core.InputSignal<ThesaurusEntry[] | undefined>;
396
+ readonly refTagEntries: _angular_core.InputSignal<ThesaurusEntry[] | undefined>;
397
+ /**
398
+ * The asserted ID being edited.
399
+ */
400
+ readonly id: _angular_core.ModelSignal<AssertedId | undefined>;
401
+ /**
402
+ * True to hide the pin-based EID lookup UI.
403
+ */
404
+ readonly noEidLookup: _angular_core.InputSignal<boolean | undefined>;
405
+ /**
406
+ * True to show the submit button.
407
+ */
408
+ readonly hasSubmit: _angular_core.InputSignal<boolean | undefined>;
409
+ /**
410
+ * Emitted when the editor is closed.
411
+ */
412
+ readonly editorClose: _angular_core.OutputEmitterRef<void>;
413
+ constructor(formBuilder: FormBuilder, lookupService: PinRefLookupService, lookupDefs: IndexLookupDefinitions);
414
+ ngOnInit(): void;
415
+ ngOnDestroy(): void;
416
+ onAssertionChange(assertion: Assertion | undefined): void;
417
+ onIdPick(id: string): void;
418
+ private updateForm;
419
+ private getId;
420
+ emitIdChange(): void;
421
+ cancel(): void;
422
+ save(): void;
423
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AssertedIdComponent, never>;
424
+ 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>;
425
+ }
426
+
427
+ /**
428
+ * Asserted IDs editor.
429
+ */
430
+ declare class AssertedIdsComponent {
431
+ private _dialogService;
432
+ private _editedIndex;
433
+ edited?: AssertedId;
434
+ /**
435
+ * The asserted IDs.
436
+ */
437
+ readonly ids: _angular_core.ModelSignal<AssertedId[]>;
438
+ readonly idScopeEntries: _angular_core.InputSignal<ThesaurusEntry[] | undefined>;
439
+ readonly idTagEntries: _angular_core.InputSignal<ThesaurusEntry[] | undefined>;
440
+ readonly assTagEntries: _angular_core.InputSignal<ThesaurusEntry[] | undefined>;
441
+ readonly refTypeEntries: _angular_core.InputSignal<ThesaurusEntry[] | undefined>;
442
+ readonly refTagEntries: _angular_core.InputSignal<ThesaurusEntry[] | undefined>;
443
+ entries: FormControl<AssertedId[]>;
444
+ form: FormGroup;
445
+ constructor(formBuilder: FormBuilder, _dialogService: DialogService);
446
+ private updateForm;
447
+ addId(): void;
448
+ editId(id: AssertedId, index: number): void;
449
+ closeId(): void;
450
+ saveId(entry: AssertedId): void;
451
+ deleteId(index: number): void;
452
+ moveIdUp(index: number): void;
453
+ moveIdDown(index: number): void;
454
+ onIdChange(id?: AssertedId): void;
455
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AssertedIdsComponent, never>;
456
+ 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>;
457
+ }
458
+
459
+ interface MetadataPart extends Part {
460
+ metadata: {
461
+ type?: string;
462
+ name: string;
463
+ value: string;
464
+ }[];
465
+ }
466
+ interface LookupInfo {
467
+ pin: DataPinInfo;
468
+ item?: Item;
469
+ part?: MetadataPart;
470
+ }
471
+ declare class ScopedPinLookupComponent {
472
+ private _itemService;
473
+ lookupService: PinRefLookupService;
474
+ lookupDefs: IndexLookupDefinitions;
475
+ key: FormControl<string | null>;
476
+ keyForm: FormGroup;
477
+ keys: string[];
478
+ info?: LookupInfo;
479
+ id: FormControl<string | null>;
480
+ idForm: FormGroup;
481
+ /**
482
+ * Emitted whenever the user picks an ID.
483
+ */
484
+ readonly idPick: _angular_core.OutputEmitterRef<string>;
485
+ constructor(formBuilder: FormBuilder, _itemService: ItemService, lookupService: PinRefLookupService, lookupDefs: IndexLookupDefinitions);
486
+ ngOnInit(): void;
487
+ onItemChange(item: unknown): void;
488
+ appendIdComponent(type: string, metaIndex?: number): void;
489
+ pickId(): void;
490
+ resetId(): void;
491
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ScopedPinLookupComponent, never>;
492
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ScopedPinLookupComponent, "cadmus-scoped-pin-lookup", never, {}, { "idPick": "idPick"; }, never, never, true, never>;
493
+ }
494
+
495
495
  export { ASSERTED_COMPOSITE_ID_CONFIGS_KEY, AssertedCompositeIdComponent, AssertedCompositeIdsComponent, AssertedIdComponent, AssertedIdsComponent, ItemRefLookupService, PinRefLookupService, PinTargetLookupComponent, ScopedPinLookupComponent };
496
496
  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.1",
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": {