@myrmidon/cadmus-ui 15.1.0 → 15.1.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,10 +1,11 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { OnInit, ElementRef, OnDestroy, Type } from '@angular/core';
3
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, Part, Fragment, PartIdentity, FragmentIdentity, EditedObject } from '@myrmidon/cadmus-core';
4
+ import { TokenLocation, TextLayerService, FacetDefinition, FlagDefinition, LayerHint, DataPinInfo, IndexLookupDefinitions, ThesaurusEntry as ThesaurusEntry$1, Thesaurus, PartTypeIds, 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';
8
+ import { CdkDragDrop } from '@angular/cdk/drag-drop';
8
9
  import { PagedTreeStoreService, TreeNodeFilter, PagedTreeNode, PagedTreeStore, PageChangeRequest } from '@myrmidon/paged-data-browsers';
9
10
  import { DataPage } from '@myrmidon/ngx-tools';
10
11
  import { MatDialogRef } from '@angular/material/dialog';
@@ -229,6 +230,76 @@ declare class LookupPinComponent implements OnInit {
229
230
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<LookupPinComponent, "cadmus-lookup-pin", never, { "initialValue": { "alias": "initialValue"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "limit": { "alias": "limit"; "required": false; "isSignal": true; }; "resetOnPick": { "alias": "resetOnPick"; "required": false; "isSignal": true; }; "lookupKey": { "alias": "lookupKey"; "required": false; "isSignal": true; }; }, { "entryChange": "entryChange"; }, never, never, true, never>;
230
231
  }
231
232
 
233
+ /**
234
+ * The prefix added to custom entries' IDs.
235
+ */
236
+ declare const CUSTOM_ENTRY_PREFIX = "$";
237
+ /**
238
+ * A picker component for thesaurus entries.
239
+ * This component allows picking one or more entries from a given thesaurus.
240
+ * In its collapsed state, it shows the picked entries as chips; when
241
+ * expanded, it shows the thesaurus tree to pick from. Custom entries
242
+ * (not in the thesaurus) can be optionally allowed.
243
+ */
244
+ declare class ThesEntriesPickerComponent {
245
+ /**
246
+ * The thesaurus entries to pick from (required).
247
+ */
248
+ readonly availableEntries: _angular_core.InputSignal<ThesaurusEntry$1[]>;
249
+ /**
250
+ * The picked entries.
251
+ */
252
+ readonly entries: _angular_core.ModelSignal<ThesaurusEntry$1[]>;
253
+ /**
254
+ * True to show the entries with labels shortened according to
255
+ * their hierarchy.
256
+ */
257
+ readonly hierarchicLabels: _angular_core.InputSignal<boolean>;
258
+ /**
259
+ * True to automatically sort entries (disables drag-and-drop).
260
+ * When false, entries can be manually reordered via drag-and-drop.
261
+ */
262
+ readonly autoSort: _angular_core.InputSignal<boolean>;
263
+ /**
264
+ * True to allow custom values (not in the entries list).
265
+ */
266
+ readonly allowCustom: _angular_core.InputSignal<boolean>;
267
+ /**
268
+ * The minimum number of entries to pick.
269
+ */
270
+ readonly minEntries: _angular_core.InputSignal<number>;
271
+ /**
272
+ * The maximum number of entries to pick (0=unlimited).
273
+ */
274
+ readonly maxEntries: _angular_core.InputSignal<number>;
275
+ /**
276
+ * True when the picker is expanded (showing the entries list).
277
+ */
278
+ readonly expanded: _angular_core.ModelSignal<boolean>;
279
+ /**
280
+ * The message to show when there are no picked entries.
281
+ */
282
+ readonly emptyMessage: _angular_core.InputSignal<string>;
283
+ /**
284
+ * The number of remaining entries that can be picked (0=unlimited).
285
+ * This is displayed only if maxEntries > 1.
286
+ */
287
+ readonly remaining: _angular_core.Signal<number>;
288
+ id: FormControl<string>;
289
+ value: FormControl<string>;
290
+ form: FormGroup;
291
+ constructor(formBuilder: FormBuilder);
292
+ renderLabel: (label: string) => string;
293
+ private sortEntries;
294
+ onEntryChange(entry: ThesaurusEntry$1): void;
295
+ addCustomEntry(): void;
296
+ removeEntry(entry: ThesaurusEntry$1): void;
297
+ clear(): void;
298
+ onDrop(event: CdkDragDrop<ThesaurusEntry$1[]>): void;
299
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ThesEntriesPickerComponent, never>;
300
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ThesEntriesPickerComponent, "cadmus-thes-entries-picker", never, { "availableEntries": { "alias": "availableEntries"; "required": true; "isSignal": true; }; "entries": { "alias": "entries"; "required": false; "isSignal": true; }; "hierarchicLabels": { "alias": "hierarchicLabels"; "required": false; "isSignal": true; }; "autoSort": { "alias": "autoSort"; "required": false; "isSignal": true; }; "allowCustom": { "alias": "allowCustom"; "required": false; "isSignal": true; }; "minEntries": { "alias": "minEntries"; "required": false; "isSignal": true; }; "maxEntries": { "alias": "maxEntries"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; }, { "entries": "entriesChange"; "expanded": "expandedChange"; }, never, never, true, never>;
301
+ }
302
+
232
303
  interface ThesaurusEntry {
233
304
  id: string;
234
305
  value: string;
@@ -645,5 +716,5 @@ declare const extractTouchedChanges: (control: ObjectLike<AbstractControl, "mark
645
716
  */
646
717
  declare const extractPristineChanges: (control: ObjectLike<AbstractControl, "markAsPristine" | "markAsDirty">) => Observable<boolean>;
647
718
 
648
- export { CloseSaveButtonsComponent, ColorService, CustomValidators, DecoratedTokenTextComponent, ErrorListComponent, FacetBadgeComponent, FlagsBadgeComponent, JsonValidators, LayerHintsComponent, LookupPinComponent, ModelEditorComponentBase, PartBadgeComponent, PartBadgeType, StaticThesPagedTreeStoreService, ThesPagedTreeBrowserComponent, ThesaurusTreeComponent, UserRefLookupService, extractPristineChanges, extractTouchedChanges, getPartIdName, renderLabelFromLastColon };
719
+ export { CUSTOM_ENTRY_PREFIX, CloseSaveButtonsComponent, ColorService, CustomValidators, DecoratedTokenTextComponent, ErrorListComponent, FacetBadgeComponent, FlagsBadgeComponent, JsonValidators, LayerHintsComponent, LookupPinComponent, ModelEditorComponentBase, PartBadgeComponent, PartBadgeType, StaticThesPagedTreeStoreService, ThesEntriesPickerComponent, ThesPagedTreeBrowserComponent, ThesaurusTreeComponent, UserRefLookupService, extractPristineChanges, extractTouchedChanges, getPartIdName, renderLabelFromLastColon };
649
720
  export type { ArgumentsType, FacetBadgeData, FlagsBadgeData, ThesEntryNodeFilter, ThesEntryPagedTreeNode, ThesaurusEntry, UserWithRoles };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myrmidon/cadmus-ui",
3
- "version": "15.1.0",
3
+ "version": "15.1.1",
4
4
  "description": "Cadmus - general UI components.",
5
5
  "keywords": [
6
6
  "Cadmus"
@@ -18,7 +18,7 @@
18
18
  "@angular/core": "^20.0.0",
19
19
  "@angular/material": "^20.0.0",
20
20
  "@myrmidon/ngx-tools": "^2.0.0",
21
- "@myrmidon/cadmus-refs-lookup": "^10.0.3",
21
+ "@myrmidon/cadmus-refs-lookup": "^10.0.5",
22
22
  "@myrmidon/cadmus-core": "^12.0.2"
23
23
  },
24
24
  "dependencies": {