@myrmidon/cadmus-ui 13.0.0 → 15.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/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { OnInit, ElementRef, OnDestroy } from '@angular/core';
3
- import { FormGroup, UntypedFormGroup, FormArray, FormBuilder, UntypedFormControl, UntypedFormBuilder, FormControl, ValidatorFn, AbstractControl } from '@angular/forms';
4
- import { TokenLocation, TextLayerService, FacetDefinition, FlagDefinition, LayerHint, DataPinInfo, IndexLookupDefinitions, Thesaurus, PartTypeIds, ThesaurusEntry, Part, Fragment, ThesauriSet, TextLayerPart } from '@myrmidon/cadmus-core';
3
+ import { FormGroup, UntypedFormGroup, FormArray, FormControl, FormBuilder, UntypedFormControl, UntypedFormBuilder, ValidatorFn, AbstractControl } from '@angular/forms';
4
+ import { TokenLocation, TextLayerService, FacetDefinition, FlagDefinition, LayerHint, DataPinInfo, IndexLookupDefinitions, Thesaurus, PartTypeIds, ThesaurusEntry, Part, Fragment, PartIdentity, FragmentIdentity, EditedObject } from '@myrmidon/cadmus-core';
5
5
  import { DialogService } from '@myrmidon/ngx-mat-tools';
6
6
  import { Observable, BehaviorSubject } from 'rxjs';
7
7
  import { ItemService, FacetService, UserService } from '@myrmidon/cadmus-api';
@@ -39,7 +39,7 @@ declare class DecoratedTokenTextComponent implements OnInit {
39
39
  * A selected token-based location.
40
40
  */
41
41
  readonly selectedLocation: _angular_core.InputSignal<TokenLocation | undefined>;
42
- text?: string;
42
+ readonly text: _angular_core.WritableSignal<string | undefined>;
43
43
  constructor(_textLayerService: TextLayerService);
44
44
  ngOnInit(): void;
45
45
  private decorate;
@@ -110,9 +110,9 @@ declare class FacetBadgeComponent {
110
110
  private _colorService;
111
111
  private _facetColors;
112
112
  private _facetTips;
113
- color: string;
114
- contrastColor: string;
115
- tip?: string;
113
+ readonly color: _angular_core.WritableSignal<string>;
114
+ readonly contrastColor: _angular_core.WritableSignal<string>;
115
+ readonly tip: _angular_core.WritableSignal<string | undefined>;
116
116
  /**
117
117
  * The facet data.
118
118
  */
@@ -137,8 +137,8 @@ interface FlagsBadgeData {
137
137
  * with the flag's color key.
138
138
  */
139
139
  declare class FlagsBadgeComponent {
140
- badgeFlags: FlagDefinition[];
141
140
  readonly data: _angular_core.InputSignal<FlagsBadgeData | undefined>;
141
+ readonly badgeFlags: _angular_core.WritableSignal<FlagDefinition[]>;
142
142
  constructor();
143
143
  private updateBadge;
144
144
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<FlagsBadgeComponent, never>;
@@ -157,7 +157,7 @@ declare class LayerHintsComponent {
157
157
  readonly requestMove: _angular_core.OutputEmitterRef<LayerHint>;
158
158
  readonly requestPatch: _angular_core.OutputEmitterRef<string[]>;
159
159
  form: FormGroup;
160
- checks: FormArray;
160
+ checks: FormArray<FormControl<boolean>>;
161
161
  constructor(_formBuilder: FormBuilder, _dialogService: DialogService);
162
162
  private updateChecks;
163
163
  emitRequestEdit(hint: LayerHint): void;
@@ -211,7 +211,7 @@ declare class LookupPinComponent implements OnInit {
211
211
  form: UntypedFormGroup;
212
212
  lookup: UntypedFormControl;
213
213
  entries$: Observable<DataPinInfo[]> | undefined;
214
- entry: DataPinInfo | undefined;
214
+ readonly entry: _angular_core.WritableSignal<DataPinInfo | undefined>;
215
215
  constructor(formBuilder: UntypedFormBuilder, _itemService: ItemService, _lookupDefs: IndexLookupDefinitions);
216
216
  /**
217
217
  * The lookup key to be used for this component.
@@ -252,10 +252,6 @@ declare function getPartIdName(typeId: string, roleId?: string | null, typeThesa
252
252
  declare class PartBadgeComponent {
253
253
  private _facetService;
254
254
  private _colorService;
255
- typeName: string | undefined;
256
- roleName: string | undefined;
257
- color: string;
258
- contrastColor: string;
259
255
  /**
260
256
  * The badge type: 0=part and role, 1=part only, 2=role only.
261
257
  */
@@ -272,6 +268,10 @@ declare class PartBadgeComponent {
272
268
  * The part type IDs.
273
269
  */
274
270
  readonly partTypeIds: _angular_core.InputSignal<PartTypeIds | undefined>;
271
+ readonly typeName: _angular_core.WritableSignal<string | undefined>;
272
+ readonly roleName: _angular_core.WritableSignal<string | undefined>;
273
+ readonly color: _angular_core.WritableSignal<string>;
274
+ readonly contrastColor: _angular_core.WritableSignal<string>;
275
275
  constructor(_facetService: FacetService, _colorService: ColorService);
276
276
  private getPartColor;
277
277
  /**
@@ -366,32 +366,6 @@ declare class ThesaurusTreeComponent implements OnInit {
366
366
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<ThesaurusTreeComponent, "cadmus-thesaurus-tree", never, { "entries": { "alias": "entries"; "required": false; "isSignal": true; }; "rootLabel": { "alias": "rootLabel"; "required": false; "isSignal": true; }; "renderLabel": { "alias": "renderLabel"; "required": false; "isSignal": true; }; }, { "entryChange": "entryChange"; }, never, never, true, never>;
367
367
  }
368
368
 
369
- /**
370
- * The identifiers for an edited part.
371
- */
372
- interface PartIdentity {
373
- itemId: string;
374
- typeId: string;
375
- partId: string | null;
376
- roleId: string | null;
377
- }
378
- /**
379
- * The identifiers for an edited fragment.
380
- */
381
- interface FragmentIdentity extends PartIdentity {
382
- frTypeId: string;
383
- frRoleId: string | null;
384
- loc: string;
385
- }
386
- /**
387
- * An edited part or fragment.
388
- */
389
- interface EditedObject<T extends Part | Fragment> {
390
- value: T | null;
391
- thesauri: ThesauriSet;
392
- layerPart?: TextLayerPart;
393
- baseText?: string;
394
- }
395
369
  /**
396
370
  * Base class for part/fragment editors dumb components.
397
371
  * The model type is the templated argument T.
@@ -597,4 +571,4 @@ declare const extractTouchedChanges: (control: ObjectLike<AbstractControl, "mark
597
571
  declare const extractPristineChanges: (control: ObjectLike<AbstractControl, "markAsPristine" | "markAsDirty">) => Observable<boolean>;
598
572
 
599
573
  export { CloseSaveButtonsComponent, ColorService, CustomValidators, DecoratedTokenTextComponent, ErrorListComponent, FacetBadgeComponent, FlagsBadgeComponent, JsonValidators, LayerHintsComponent, LookupPinComponent, ModelEditorComponentBase, PartBadgeComponent, PartBadgeType, ThesaurusTreeComponent, UserRefLookupService, extractPristineChanges, extractTouchedChanges, getPartIdName, renderLabelFromLastColon };
600
- export type { ArgumentsType, EditedObject, FacetBadgeData, FlagsBadgeData, FragmentIdentity, PartIdentity, UserWithRoles };
574
+ export type { ArgumentsType, FacetBadgeData, FlagsBadgeData, UserWithRoles };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myrmidon/cadmus-ui",
3
- "version": "13.0.0",
3
+ "version": "15.0.0",
4
4
  "description": "Cadmus - general UI components.",
5
5
  "keywords": [
6
6
  "Cadmus"
@@ -16,9 +16,10 @@
16
16
  "peerDependencies": {
17
17
  "@angular/common": "^20.0.0",
18
18
  "@angular/core": "^20.0.0",
19
+ "@angular/material": "^20.0.0",
19
20
  "@myrmidon/ngx-tools": "^2.0.0",
20
- "@myrmidon/cadmus-refs-lookup": "^9.0.0",
21
- "@myrmidon/cadmus-core": "^12.0.0"
21
+ "@myrmidon/cadmus-refs-lookup": "^10.0.3",
22
+ "@myrmidon/cadmus-core": "^12.0.2"
22
23
  },
23
24
  "dependencies": {
24
25
  "tslib": "^2.3.0"