@masterteam/components 0.0.300 → 0.0.301
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/assets/common.css +1 -1
- package/fesm2022/masterteam-components-business-fields.mjs +138 -51
- package/fesm2022/masterteam-components-business-fields.mjs.map +1 -1
- package/fesm2022/masterteam-components-checkbox-field.mjs +2 -2
- package/fesm2022/masterteam-components-checkbox-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-entities.mjs +208 -291
- package/fesm2022/masterteam-components-entities.mjs.map +1 -1
- package/fesm2022/masterteam-components-radio-button-field.mjs +2 -2
- package/fesm2022/masterteam-components-radio-button-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-select-field.mjs +23 -2
- package/fesm2022/masterteam-components-select-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-table.mjs +1 -1
- package/fesm2022/masterteam-components-table.mjs.map +1 -1
- package/fesm2022/masterteam-components-toggle-field.mjs +2 -2
- package/fesm2022/masterteam-components-toggle-field.mjs.map +1 -1
- package/fesm2022/masterteam-components.mjs +43 -2
- package/fesm2022/masterteam-components.mjs.map +1 -1
- package/package.json +1 -1
- package/types/masterteam-components-business-fields.d.ts +80 -27
- package/types/masterteam-components-entities.d.ts +132 -114
- package/types/masterteam-components-select-field.d.ts +14 -0
- package/types/masterteam-components.d.ts +27 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { AfterViewInit, InjectionToken, Type, Provider
|
|
2
|
+
import { AfterViewInit, OnInit, InjectionToken, Type, Provider } from '@angular/core';
|
|
3
3
|
import { LookupMatrixFieldConfig, LookupOptionItemConfig, LookupMatrixCellConfig, SchemaConnectionFieldRuntimeContext, SchedulePredecessorFieldRuntimeContext, EntityListFieldRuntimeContext, ScheduleItemSelectorFieldRuntimeContext, LookupCheckListPropertyConfig, LookupModuleCheckListFieldRuntimeContext } from '@masterteam/components';
|
|
4
|
-
import { ControlValueAccessor, NgControl, Validators } from '@angular/forms';
|
|
4
|
+
import { ControlValueAccessor, NgControl, AbstractControl, Validators } from '@angular/forms';
|
|
5
5
|
import { HttpContext } from '@angular/common/http';
|
|
6
6
|
import { ColumnDef, TableAction } from '@masterteam/components/table';
|
|
7
7
|
import { EntityData } from '@masterteam/components/entities';
|
|
@@ -104,10 +104,15 @@ interface SourceLevelState {
|
|
|
104
104
|
options: any[];
|
|
105
105
|
loading: boolean;
|
|
106
106
|
}
|
|
107
|
-
declare class SchemaConnectionField implements ControlValueAccessor {
|
|
107
|
+
declare class SchemaConnectionField implements ControlValueAccessor, OnInit {
|
|
108
108
|
readonly label: _angular_core.InputSignal<string>;
|
|
109
109
|
readonly placeholder: _angular_core.InputSignal<string>;
|
|
110
110
|
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
111
|
+
/**
|
|
112
|
+
* Kept for direct-host API compatibility. Dynamic/client forms do not bind
|
|
113
|
+
* it; runtime requiredness is defined per source by
|
|
114
|
+
* `configuration.sourceLevels[].isOptional`.
|
|
115
|
+
*/
|
|
111
116
|
readonly required: _angular_core.InputSignal<boolean>;
|
|
112
117
|
readonly filter: _angular_core.InputSignal<boolean>;
|
|
113
118
|
/**
|
|
@@ -137,17 +142,15 @@ declare class SchemaConnectionField implements ControlValueAccessor {
|
|
|
137
142
|
onTouched: () => void;
|
|
138
143
|
onModelChange: (value: ConnectionPayload | null) => void;
|
|
139
144
|
/**
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
* stock `Validators.required` accepts — so a plain required check would let an
|
|
144
|
-
* empty connection pass and the form submit. Mirrors {@link syncValue}, which
|
|
145
|
-
* collapses a source-less selection to `null`.
|
|
145
|
+
* Every source whose `isOptional` is false must have at least one selected
|
|
146
|
+
* record. The field-level `isRequired` flag is intentionally ignored because
|
|
147
|
+
* one Connection property can mix optional and required source levels.
|
|
146
148
|
*/
|
|
147
|
-
private readonly
|
|
149
|
+
private readonly requiredSourcesValidator;
|
|
148
150
|
ngControl: NgControl | null;
|
|
149
151
|
private http;
|
|
150
152
|
private destroyRef;
|
|
153
|
+
private readonly cdr;
|
|
151
154
|
private transloco;
|
|
152
155
|
/** Active UI language, kept reactive so source labels re-resolve on switch. */
|
|
153
156
|
private readonly activeLang;
|
|
@@ -178,12 +181,52 @@ declare class SchemaConnectionField implements ControlValueAccessor {
|
|
|
178
181
|
*/
|
|
179
182
|
readonly dropdownWidth: _angular_core.Signal<string>;
|
|
180
183
|
constructor();
|
|
184
|
+
/**
|
|
185
|
+
* Repaint when the control's own state changes.
|
|
186
|
+
*
|
|
187
|
+
* `touched` and validity are plain `AbstractControl` state, not signals, and
|
|
188
|
+
* this component is `OnPush` — so a host that calls `markAllAsTouched()` on a
|
|
189
|
+
* failed submit marked the connection invalid and nothing re-rendered. The
|
|
190
|
+
* required message only appeared once the user happened to touch a dropdown,
|
|
191
|
+
* which is the one moment they no longer need telling.
|
|
192
|
+
*
|
|
193
|
+
* `ngOnInit` rather than the constructor: `formControl` / `formControlName`
|
|
194
|
+
* only expose `.control` after their first `ngOnChanges`.
|
|
195
|
+
*/
|
|
196
|
+
ngOnInit(): void;
|
|
181
197
|
/**
|
|
182
198
|
* Returns a stable numeric ID for a source regardless of whether it is a
|
|
183
199
|
* level (`levelId`) or a module (`moduleId`). Used as the key in `selections`
|
|
184
200
|
* and `sourceLevelStates`.
|
|
185
201
|
*/
|
|
186
202
|
protected getSourceId(source: ConnectionSourceLevel): number;
|
|
203
|
+
/**
|
|
204
|
+
* A source that must be selected and is not. Mirrors
|
|
205
|
+
* {@link requiredSourcesValidator}, which decides the same thing from the
|
|
206
|
+
* control value.
|
|
207
|
+
*
|
|
208
|
+
* A method, not a computed: `selections` is a plain object that `ngModel`
|
|
209
|
+
* mutates in place and carries no signal, so only re-reading it every change
|
|
210
|
+
* detection cycle stays truthful.
|
|
211
|
+
*/
|
|
212
|
+
protected isSourceMissing(source: ConnectionSourceLevel): boolean;
|
|
213
|
+
/**
|
|
214
|
+
* The control, but only for the source the message belongs under — every
|
|
215
|
+
* other source gets `null` and renders nothing. `mt-field-validation` still
|
|
216
|
+
* decides whether to paint: it waits for `touched`.
|
|
217
|
+
*
|
|
218
|
+
* Field height stays stable because the reserved line moves rather than
|
|
219
|
+
* appears. A null control reserves nothing, so exactly one slot is live at a
|
|
220
|
+
* time — the missing source's, or {@link unattributedErrorControl}'s below
|
|
221
|
+
* the row.
|
|
222
|
+
*/
|
|
223
|
+
protected sourceErrorControl(source: ConnectionSourceLevel): AbstractControl | null;
|
|
224
|
+
/**
|
|
225
|
+
* The control, but only while no source owns the failure — a server error on
|
|
226
|
+
* a fully selected connection has nowhere else to render. Null as soon as a
|
|
227
|
+
* source is missing, so one failure never prints twice.
|
|
228
|
+
*/
|
|
229
|
+
protected unattributedErrorControl(): AbstractControl | null;
|
|
187
230
|
/**
|
|
188
231
|
* Builds the `contextKey` for the `fetch/query` request based on source type.
|
|
189
232
|
*/
|
|
@@ -370,14 +413,17 @@ declare class EntityListField implements ControlValueAccessor {
|
|
|
370
413
|
/** Optional HttpContext (kept for back-compat). */
|
|
371
414
|
readonly context: _angular_core.InputSignal<HttpContext | undefined>;
|
|
372
415
|
/**
|
|
373
|
-
*
|
|
374
|
-
*
|
|
375
|
-
* `
|
|
416
|
+
* The stored value, for hosts that render this field **outside a form** —
|
|
417
|
+
* the read-only `mt-entity-list-preview` creates it through
|
|
418
|
+
* `NgComponentOutlet`, which can set inputs but cannot drive a
|
|
419
|
+
* `ControlValueAccessor`.
|
|
376
420
|
*
|
|
377
|
-
* Ignored
|
|
378
|
-
*
|
|
421
|
+
* Ignored once a form control is attached, so it can never race
|
|
422
|
+
* `writeValue`. It matters for a `Write`-access list: that field may not read
|
|
423
|
+
* the target module, so its stored `rows[]` are the only thing it has to
|
|
424
|
+
* show.
|
|
379
425
|
*/
|
|
380
|
-
readonly
|
|
426
|
+
readonly initialValue: _angular_core.InputSignal<string | EntityListStoredValue | null>;
|
|
381
427
|
private readonly storedValue;
|
|
382
428
|
/** Runtime-scoped metadata; null until the endpoint answers. */
|
|
383
429
|
private readonly metadata;
|
|
@@ -711,7 +757,7 @@ declare class EntityListField implements ControlValueAccessor {
|
|
|
711
757
|
private applyRecords;
|
|
712
758
|
private toEntityData;
|
|
713
759
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityListField, never>;
|
|
714
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityListField, "mt-entity-list-field", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "propertyId": { "alias": "propertyId"; "required": false; "isSignal": true; }; "configuration": { "alias": "configuration"; "required": false; "isSignal": true; }; "runtimeContext": { "alias": "runtimeContext"; "required": false; "isSignal": true; }; "pendingSubmission": { "alias": "pendingSubmission"; "required": false; "isSignal": true; }; "lookups": { "alias": "lookups"; "required": false; "isSignal": true; }; "context": { "alias": "context"; "required": false; "isSignal": true; }; "
|
|
760
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityListField, "mt-entity-list-field", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "propertyId": { "alias": "propertyId"; "required": false; "isSignal": true; }; "configuration": { "alias": "configuration"; "required": false; "isSignal": true; }; "runtimeContext": { "alias": "runtimeContext"; "required": false; "isSignal": true; }; "pendingSubmission": { "alias": "pendingSubmission"; "required": false; "isSignal": true; }; "lookups": { "alias": "lookups"; "required": false; "isSignal": true; }; "context": { "alias": "context"; "required": false; "isSignal": true; }; "initialValue": { "alias": "initialValue"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
715
761
|
}
|
|
716
762
|
|
|
717
763
|
/** Inputs the EntityList add-row dialog will receive via ModalService inputValues. */
|
|
@@ -741,18 +787,25 @@ interface EntityListAddDialogInputs {
|
|
|
741
787
|
declare const ENTITY_LIST_ADD_DIALOG_COMPONENT: InjectionToken<Type<unknown>>;
|
|
742
788
|
|
|
743
789
|
/**
|
|
744
|
-
* Lets
|
|
745
|
-
*
|
|
790
|
+
* Lets `mt-entity-list-preview` render a module-backed `EntityList` as the
|
|
791
|
+
* real, fetched table instead of its count-and-drawer trigger.
|
|
792
|
+
*
|
|
793
|
+
* Pair it with an `EntityRuntimeContextStore` carrying the owning level and
|
|
794
|
+
* level-data ids — the preview needs both, and without the context this
|
|
795
|
+
* provider changes nothing. `mt-client-instance-preview` sets both up, so a
|
|
796
|
+
* host rendering preview cards through it needs neither.
|
|
746
797
|
*
|
|
747
|
-
*
|
|
748
|
-
*
|
|
749
|
-
*
|
|
750
|
-
* change how nested lists render inside another table.
|
|
798
|
+
* The indirection exists because `entities` cannot import `table`: `table`
|
|
799
|
+
* already imports `entities`, and they are separate entry points of
|
|
800
|
+
* `@masterteam/components`. See `ENTITY_LIST_TABLE_COMPONENT`.
|
|
751
801
|
*
|
|
752
|
-
*
|
|
753
|
-
*
|
|
802
|
+
* ```ts
|
|
803
|
+
* @Component({
|
|
804
|
+
* providers: [EntityRuntimeContextStore, provideEntityListTablePreview()],
|
|
805
|
+
* })
|
|
806
|
+
* ```
|
|
754
807
|
*/
|
|
755
|
-
declare function
|
|
808
|
+
declare function provideEntityListTablePreview(): Provider;
|
|
756
809
|
|
|
757
810
|
/** One picker option — only the name is shown. */
|
|
758
811
|
interface ScheduleItemOption {
|
|
@@ -945,5 +998,5 @@ declare class LookupModuleCheckListField implements ControlValueAccessor, OnInit
|
|
|
945
998
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<LookupModuleCheckListField, "mt-lookup-module-check-list-field", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "lookupOptions": { "alias": "lookupOptions"; "required": false; "isSignal": true; }; "lookups": { "alias": "lookups"; "required": false; "isSignal": true; }; "propertyFields": { "alias": "propertyFields"; "required": false; "isSignal": true; }; "scopeId": { "alias": "scopeId"; "required": false; "isSignal": true; }; "propertyKeys": { "alias": "propertyKeys"; "required": false; "isSignal": true; }; "runtimeContext": { "alias": "runtimeContext"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
946
999
|
}
|
|
947
1000
|
|
|
948
|
-
export { ENTITY_LIST_ADD_DIALOG_COMPONENT, EntityListField, LOOKUP_CHECK_LIST_FORM_COMPONENT, LookupMatrixField, LookupModuleCheckListField, ScheduleItemSelectorField, SchedulePredecessorField, SchemaConnectionField,
|
|
1001
|
+
export { ENTITY_LIST_ADD_DIALOG_COMPONENT, EntityListField, LOOKUP_CHECK_LIST_FORM_COMPONENT, LookupMatrixField, LookupModuleCheckListField, ScheduleItemSelectorField, SchedulePredecessorField, SchemaConnectionField, provideEntityListTablePreview };
|
|
949
1002
|
export type { ConnectionPayload, ConnectionSource, ConnectionSourceLevel, EntityListAddDialogInputs, LookupCheckListFormInputs, SchemaConnectionConfig, SourceLevelState };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as _masterteam_components_entities from '@masterteam/components/entities';
|
|
2
1
|
import * as _angular_core from '@angular/core';
|
|
3
2
|
import { InjectionToken, Type, ElementRef, NgZone, Signal } from '@angular/core';
|
|
3
|
+
import * as _masterteam_components_entities from '@masterteam/components/entities';
|
|
4
4
|
import { MTDateFormatType } from '@masterteam/components';
|
|
5
5
|
import { MTIcon } from '@masterteam/icons';
|
|
6
6
|
import { HttpContext } from '@angular/common/http';
|
|
@@ -493,18 +493,10 @@ interface EntityScheduleItemValue {
|
|
|
493
493
|
moduleKey?: string;
|
|
494
494
|
itemType?: string;
|
|
495
495
|
}
|
|
496
|
-
/** One cell of an `EntityList` row.
|
|
496
|
+
/** One cell of an `EntityList` row. Values are always sent as strings. */
|
|
497
497
|
interface EntityListValueItem {
|
|
498
498
|
propertyKey: string;
|
|
499
499
|
rawValue?: string | null;
|
|
500
|
-
/**
|
|
501
|
-
* The backend's resolved counterpart of `rawValue` — a user object, a
|
|
502
|
-
* formatted date. `process-form-load` emits it beside every row value (see
|
|
503
|
-
* `toDisplayMap` in `mt-entity-list-field`); the `fetch` Card projection
|
|
504
|
-
* currently does not, which is why a snapshot-backed preview renders the
|
|
505
|
-
* stored id. Read when present so that stays a backend-only fix.
|
|
506
|
-
*/
|
|
507
|
-
value?: unknown;
|
|
508
500
|
}
|
|
509
501
|
/** One row of an `EntityList` value. */
|
|
510
502
|
interface EntityListRowValue {
|
|
@@ -513,26 +505,13 @@ interface EntityListRowValue {
|
|
|
513
505
|
values?: EntityListValueItem[];
|
|
514
506
|
}
|
|
515
507
|
/**
|
|
516
|
-
* The stored `EntityList` payload, as the backend renders it.
|
|
517
|
-
*
|
|
518
|
-
*
|
|
519
|
-
* source. An inline list keeps its rows in `rows`; a **module-backed** list
|
|
520
|
-
* keeps the linked target records in `snapshot.entities` and uses `rows` only
|
|
521
|
-
* for creates/updates the backend has not applied yet. Reading `rows` alone
|
|
522
|
-
* therefore shows nothing for the common module case — see
|
|
523
|
-
* `buildEntityListRows`, which merges the two.
|
|
524
|
-
*
|
|
525
|
-
* `entityIds` and the operation-marker arrays exist for the writable runtime,
|
|
526
|
-
* not for reading.
|
|
508
|
+
* The stored `EntityList` payload, as the backend renders it. `rows` is the
|
|
509
|
+
* only part this view type displays — `entityIds` and the operation-marker
|
|
510
|
+
* arrays exist for the writable runtime, not for reading.
|
|
527
511
|
*/
|
|
528
512
|
interface EntityListEntityValue {
|
|
529
513
|
entityIds?: number[];
|
|
530
514
|
rows?: EntityListRowValue[];
|
|
531
|
-
/** Preserved values of the linked target records, for module-backed lists. */
|
|
532
|
-
snapshot?: {
|
|
533
|
-
takenAt?: string | null;
|
|
534
|
-
entities?: EntityListRowValue[];
|
|
535
|
-
};
|
|
536
515
|
}
|
|
537
516
|
/**
|
|
538
517
|
* One field definition of an inline `EntityList`, from its property
|
|
@@ -545,13 +524,6 @@ interface EntityListInlineFieldMeta {
|
|
|
545
524
|
order?: number;
|
|
546
525
|
required?: boolean;
|
|
547
526
|
configuration?: EntityPropertyConfiguration;
|
|
548
|
-
/**
|
|
549
|
-
* Display label. Absent on a genuine `inlineFields` entry — inline
|
|
550
|
-
* configuration has no labels, which is what `humanizeEntityListKey` exists
|
|
551
|
-
* for. Set when the columns are derived from `catalog.nestedProperties`,
|
|
552
|
-
* whose entries carry the target module's own label.
|
|
553
|
-
*/
|
|
554
|
-
label?: string;
|
|
555
527
|
}
|
|
556
528
|
/**
|
|
557
529
|
* Catalog metadata for a property nested inside another property's value.
|
|
@@ -686,6 +658,56 @@ declare function resolveEntityLabelPosition(configuration?: EntityConfiguration
|
|
|
686
658
|
*/
|
|
687
659
|
declare function normalizeNumerals(input: string): string;
|
|
688
660
|
|
|
661
|
+
/**
|
|
662
|
+
* The runtime ids an entity renderer needs to fetch anything of its own.
|
|
663
|
+
*
|
|
664
|
+
* A rendered `EntityData` describes one *value*; it carries no idea of which
|
|
665
|
+
* level or level-data row it was read from. Most view types never need one —
|
|
666
|
+
* the value is the whole answer. `EntityList` is the exception: a module-backed
|
|
667
|
+
* list's rows live in another module and are scoped by the owning level-data
|
|
668
|
+
* row, so the renderer cannot resolve them from the value alone.
|
|
669
|
+
*
|
|
670
|
+
* Hosts that know these ids publish them through `EntityRuntimeContextStore`;
|
|
671
|
+
* hosts that do not simply leave it unprovided and every renderer keeps its
|
|
672
|
+
* value-only behaviour.
|
|
673
|
+
*/
|
|
674
|
+
interface EntityRuntimeContext {
|
|
675
|
+
/** Owning level id — addresses the per-level configuration override. */
|
|
676
|
+
levelId?: number | string | null;
|
|
677
|
+
/** Owning level-data row — what related records are scoped to. */
|
|
678
|
+
levelDataId?: number | string | null;
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* Publishes an `EntityRuntimeContext` to a subtree of entity renderers.
|
|
682
|
+
*
|
|
683
|
+
* Deliberately **not** `providedIn: 'root'`: an unprovided store is the signal
|
|
684
|
+
* that the host has no runtime context, and every consumer injects it
|
|
685
|
+
* `{ optional: true }`. Providing it on a component scopes it to that
|
|
686
|
+
* component's view — which is also how a nested renderer shuts the context
|
|
687
|
+
* off for its own children (see `EntityListField`, whose table cells must not
|
|
688
|
+
* re-enter the fetching path).
|
|
689
|
+
*/
|
|
690
|
+
declare class EntityRuntimeContextStore {
|
|
691
|
+
readonly context: _angular_core.WritableSignal<EntityRuntimeContext | null>;
|
|
692
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityRuntimeContextStore, never>;
|
|
693
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<EntityRuntimeContextStore>;
|
|
694
|
+
}
|
|
695
|
+
/**
|
|
696
|
+
* The component `mt-entity-list-preview` renders inline instead of its
|
|
697
|
+
* count-and-drawer trigger, when a runtime context is available.
|
|
698
|
+
*
|
|
699
|
+
* Indirection rather than a direct import because the real renderer is
|
|
700
|
+
* `mt-entity-list-field` (`@masterteam/components/business-fields`), which
|
|
701
|
+
* builds on `mt-table` — and `table` already imports `entities`, so importing
|
|
702
|
+
* it back here would make the two entry points circular. The provider lives
|
|
703
|
+
* with the component: `provideEntityListTablePreview()`.
|
|
704
|
+
*
|
|
705
|
+
* The component is created with `NgComponentOutlet` and receives
|
|
706
|
+
* `propertyId`, `runtimeContext`, `configuration`, `initialValue`, `readonly`
|
|
707
|
+
* and `label` as inputs.
|
|
708
|
+
*/
|
|
709
|
+
declare const ENTITY_LIST_TABLE_COMPONENT: InjectionToken<Type<unknown>>;
|
|
710
|
+
|
|
689
711
|
type EntityFieldGap = 'compact' | 'normal' | 'relaxed';
|
|
690
712
|
declare class EntityField {
|
|
691
713
|
readonly label: _angular_core.InputSignal<string>;
|
|
@@ -907,7 +929,6 @@ declare class EntityCheckbox {
|
|
|
907
929
|
readonly emptyLabel = "_";
|
|
908
930
|
readonly hideName: _angular_core.Signal<boolean>;
|
|
909
931
|
readonly checkboxState: _angular_core.Signal<boolean | null>;
|
|
910
|
-
private parseBoolean;
|
|
911
932
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityCheckbox, never>;
|
|
912
933
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityCheckbox, "mt-entity-checkbox", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "rawValue": { "alias": "rawValue"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
913
934
|
}
|
|
@@ -1095,17 +1116,11 @@ declare function humanizeEntityListKey(key: string): string;
|
|
|
1095
1116
|
/**
|
|
1096
1117
|
* Turns an `EntityList` entity into rendered rows.
|
|
1097
1118
|
*
|
|
1098
|
-
* Nothing is fetched
|
|
1099
|
-
*
|
|
1100
|
-
*
|
|
1101
|
-
* `
|
|
1102
|
-
*
|
|
1103
|
-
* ordered by `readFields`; that yields humanized labels and plain text rather
|
|
1104
|
-
* than the target module's own labels and view types, which only that module's
|
|
1105
|
-
* catalog knows and this renderer never loads.
|
|
1106
|
-
*
|
|
1107
|
-
* Shared by the trigger (`mt-entity-list-preview`, which needs the count and
|
|
1108
|
-
* the titles) and the drawer that renders them in full.
|
|
1119
|
+
* Nothing is fetched: the value already carries `rows[]`, and the property
|
|
1120
|
+
* configuration's `inlineFields` is the only description of the nested columns
|
|
1121
|
+
* — the rows themselves carry bare keys. Shared by the trigger
|
|
1122
|
+
* (`mt-entity-list-preview`, which needs the count and the titles) and the
|
|
1123
|
+
* drawer that renders them in full.
|
|
1109
1124
|
*
|
|
1110
1125
|
* `allowed` narrows to those keys, in that order; empty renders every field
|
|
1111
1126
|
* that survives the companion and identifier rules.
|
|
@@ -1120,51 +1135,37 @@ declare function summarizeEntityListRows(rows: readonly EntityListRenderedRow[],
|
|
|
1120
1135
|
remaining: number;
|
|
1121
1136
|
};
|
|
1122
1137
|
|
|
1123
|
-
/**
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
* `levelDataId` is the parent record's scope, which the fetch Card projection
|
|
1128
|
-
* does not carry at all — the host reads it from the route. A call site that
|
|
1129
|
-
* cannot supply them leaves the context null and keeps the compact renderer.
|
|
1130
|
-
*/
|
|
1131
|
-
interface EntityListPreviewContext {
|
|
1132
|
-
levelId?: number | string | null;
|
|
1133
|
-
levelDataId?: number | string | null;
|
|
1138
|
+
/** What `NgComponentOutlet` needs to render the inline table. */
|
|
1139
|
+
interface EntityListTableHost {
|
|
1140
|
+
component: Type<unknown>;
|
|
1141
|
+
inputs: Record<string, unknown>;
|
|
1134
1142
|
}
|
|
1135
1143
|
/**
|
|
1136
|
-
*
|
|
1137
|
-
*
|
|
1138
|
-
* from `@masterteam/components/business-fields`.
|
|
1139
|
-
*
|
|
1140
|
-
* It is a token rather than a direct import because `business-fields` already
|
|
1141
|
-
* imports this package: rendering the field from here would close the cycle.
|
|
1142
|
-
* The same reason `ENTITY_LIST_ADD_DIALOG_COMPONENT` exists one layer up.
|
|
1144
|
+
* Read-only renderer for an `EntityList` value. It has two shapes, and which
|
|
1145
|
+
* one applies is decided by what the host gave it — never by the value.
|
|
1143
1146
|
*
|
|
1144
|
-
*
|
|
1145
|
-
*
|
|
1146
|
-
* {
|
|
1147
|
-
*
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
*
|
|
1153
|
-
*
|
|
1154
|
-
* target module carries a calculated inline list of its own (phase gate
|
|
1155
|
-
* checklists being the case this was written for).
|
|
1147
|
+
* **Inline table.** When the host published an `EntityRuntimeContext` and the
|
|
1148
|
+
* property is module-backed, the rows are the target module's own records and
|
|
1149
|
+
* live behind `Properties/{id}/entitylist/table-metadata` + `fetch/query`.
|
|
1150
|
+
* Nothing in the value describes them — a `Realtime` list's value is literally
|
|
1151
|
+
* `null` — so the whole table is fetched, by handing the work to the read-only
|
|
1152
|
+
* `mt-entity-list-field` through `ENTITY_LIST_TABLE_COMPONENT`. That component
|
|
1153
|
+
* already owns the metadata call, the authorization boundary (`403` is a
|
|
1154
|
+
* notice, not an error) and the column projection; duplicating it here would
|
|
1155
|
+
* be a second implementation of the same contract. This is the shape a card
|
|
1156
|
+
* preview gets.
|
|
1156
1157
|
*
|
|
1157
|
-
*
|
|
1158
|
-
*
|
|
1159
|
-
*
|
|
1160
|
-
*
|
|
1161
|
-
*
|
|
1162
|
-
*
|
|
1158
|
+
* **Count + drawer.** Otherwise the value carries its own `rows[]` and the
|
|
1159
|
+
* property configuration's `inlineFields` is the only description of the
|
|
1160
|
+
* columns — a calculated inline list, phase gate checklists being the case
|
|
1161
|
+
* this was written for. Those render inside a *table cell* (`mt-table` builds
|
|
1162
|
+
* its entity cells through `mt-entity-preview`), where inline rows would own
|
|
1163
|
+
* the height of every row in the grid: three lines per checklist item, times
|
|
1164
|
+
* however many the phase gate has. The rows go in a drawer instead, and the
|
|
1165
|
+
* tooltip names them so "which ones are these?" is answered without opening
|
|
1166
|
+
* anything. A table cell publishes no runtime context, so it keeps this shape.
|
|
1163
1167
|
*
|
|
1164
|
-
*
|
|
1165
|
-
* configuration's `inlineFields` carries the only description of the columns.
|
|
1166
|
-
* There is no writable path here by design — calculated inline lists are
|
|
1167
|
-
* `access: Read` at the source.
|
|
1168
|
+
* There is no writable path in either case.
|
|
1168
1169
|
*/
|
|
1169
1170
|
declare class EntityListPreview {
|
|
1170
1171
|
readonly data: _angular_core.InputSignal<EntityData>;
|
|
@@ -1172,10 +1173,22 @@ declare class EntityListPreview {
|
|
|
1172
1173
|
* Restricts rendering to these nested field keys, in this order. Left empty,
|
|
1173
1174
|
* every field in `inlineFields` renders — what the generic table path wants;
|
|
1174
1175
|
* a host that knows the list narrows it here. Forwarded to the drawer.
|
|
1176
|
+
*
|
|
1177
|
+
* Applies to the drawer shape only: an inline table's columns come from the
|
|
1178
|
+
* backend's own projection, which already reflects the configured read
|
|
1179
|
+
* fields for this level.
|
|
1175
1180
|
*/
|
|
1176
1181
|
readonly fields: _angular_core.InputSignal<string[]>;
|
|
1177
1182
|
private readonly modal;
|
|
1178
1183
|
private readonly transloco;
|
|
1184
|
+
/**
|
|
1185
|
+
* Both optional, and both have to be present for the inline table: the
|
|
1186
|
+
* component says the host *can* render one, the context says it knows which
|
|
1187
|
+
* level-data row to scope the rows to. A host that provides neither — every
|
|
1188
|
+
* `mt-table` cell — keeps the drawer.
|
|
1189
|
+
*/
|
|
1190
|
+
private readonly tableComponent;
|
|
1191
|
+
private readonly runtimeContextStore;
|
|
1179
1192
|
/**
|
|
1180
1193
|
* Read inside every computed that translates. `transloco.translate()` is a
|
|
1181
1194
|
* one-shot read with no signal of its own, so without this dependency the
|
|
@@ -1188,6 +1201,28 @@ declare class EntityListPreview {
|
|
|
1188
1201
|
readonly rows: _angular_core.Signal<EntityListRenderedRow[]>;
|
|
1189
1202
|
readonly count: _angular_core.Signal<number>;
|
|
1190
1203
|
readonly hasRows: _angular_core.Signal<boolean>;
|
|
1204
|
+
/**
|
|
1205
|
+
* Whether the list's rows are records of another module rather than values
|
|
1206
|
+
* held inside this one.
|
|
1207
|
+
*
|
|
1208
|
+
* Mirrors the backend's own `ResolveSourceType`: an explicit `sourceType`
|
|
1209
|
+
* wins, and a configuration written before that field existed is module-
|
|
1210
|
+
* backed exactly when it names a module. Read from the stored configuration
|
|
1211
|
+
* because it is the only description available before the metadata request —
|
|
1212
|
+
* the effective, level-overridden one comes back from that endpoint, and the
|
|
1213
|
+
* table component gates on it again.
|
|
1214
|
+
*/
|
|
1215
|
+
private readonly moduleBacked;
|
|
1216
|
+
/**
|
|
1217
|
+
* The inline table's component and inputs, or null when this instance
|
|
1218
|
+
* renders the drawer trigger instead.
|
|
1219
|
+
*
|
|
1220
|
+
* A `computed` rather than a template expression on purpose: the object is
|
|
1221
|
+
* re-created only when its inputs actually change, and `NgComponentOutlet`
|
|
1222
|
+
* re-applies inputs on identity change — a fresh object per change-detection
|
|
1223
|
+
* pass would re-write every input on every tick.
|
|
1224
|
+
*/
|
|
1225
|
+
protected readonly tableHost: _angular_core.Signal<EntityListTableHost | null>;
|
|
1191
1226
|
/**
|
|
1192
1227
|
* An empty list reads as the standard empty value, not as a sentence — this
|
|
1193
1228
|
* sits in a table cell, where a "no related items" line would be louder than
|
|
@@ -1205,6 +1240,13 @@ declare class EntityListPreview {
|
|
|
1205
1240
|
* the button's own wording when no row has a title to show.
|
|
1206
1241
|
*/
|
|
1207
1242
|
readonly tooltip: _angular_core.Signal<string>;
|
|
1243
|
+
/**
|
|
1244
|
+
* The untouched catalog configuration. `configuration` is read as a fallback
|
|
1245
|
+
* because the table merges its own display flags into that object when it
|
|
1246
|
+
* builds a cell, and a `LeafDetails` catalog entry is an array — neither is
|
|
1247
|
+
* an `EntityList` configuration, so both are rejected here.
|
|
1248
|
+
*/
|
|
1249
|
+
private readonly propertyConfiguration;
|
|
1208
1250
|
private viewLabel;
|
|
1209
1251
|
protected openDrawer(): void;
|
|
1210
1252
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityListPreview, never>;
|
|
@@ -1513,8 +1555,6 @@ declare class EntityPreview {
|
|
|
1513
1555
|
private readonly transloco;
|
|
1514
1556
|
readonly data: _angular_core.InputSignal<EntityData>;
|
|
1515
1557
|
readonly attachmentShape: _angular_core.InputSignal<"compact" | "default">;
|
|
1516
|
-
/** Forwarded to the body; see `EntityPreviewBody.entityListContext`. */
|
|
1517
|
-
readonly entityListContext: _angular_core.InputSignal<EntityListPreviewContext | null>;
|
|
1518
1558
|
private readonly activeLang;
|
|
1519
1559
|
/**
|
|
1520
1560
|
* The admin-authored note for the active language, or `''` when the property
|
|
@@ -1526,7 +1566,7 @@ declare class EntityPreview {
|
|
|
1526
1566
|
readonly infoText: _angular_core.Signal<string>;
|
|
1527
1567
|
readonly comparisonKind: _angular_core.Signal<"Value" | "EntityList" | null>;
|
|
1528
1568
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityPreview, never>;
|
|
1529
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityPreview, "mt-entity-preview", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "attachmentShape": { "alias": "attachmentShape"; "required": false; "isSignal": true; };
|
|
1569
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityPreview, "mt-entity-preview", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "attachmentShape": { "alias": "attachmentShape"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1530
1570
|
}
|
|
1531
1571
|
|
|
1532
1572
|
/**
|
|
@@ -1538,28 +1578,8 @@ declare class EntityPreview {
|
|
|
1538
1578
|
declare class EntityPreviewBody {
|
|
1539
1579
|
readonly data: _angular_core.InputSignal<EntityData>;
|
|
1540
1580
|
readonly attachmentShape: _angular_core.InputSignal<"compact" | "default">;
|
|
1541
|
-
/**
|
|
1542
|
-
* Runtime ids that opt an `EntityList` into its full read-only table instead
|
|
1543
|
-
* of the compact count-and-drawer. Null — the default, and what every table
|
|
1544
|
-
* cell passes — keeps the compact renderer.
|
|
1545
|
-
*/
|
|
1546
|
-
readonly entityListContext: _angular_core.InputSignal<EntityListPreviewContext | null>;
|
|
1547
|
-
private readonly tableComponent;
|
|
1548
|
-
/**
|
|
1549
|
-
* The expanded table, when this call site asked for one, a host registered a
|
|
1550
|
-
* component to render it, and the ids that component needs are present. The
|
|
1551
|
-
* property id addresses the metadata endpoint and the level scopes it, so
|
|
1552
|
-
* without either there is nothing to render and the compact view stands in.
|
|
1553
|
-
*/
|
|
1554
|
-
protected readonly entityListTable: _angular_core.Signal<Type<unknown> | null>;
|
|
1555
|
-
/**
|
|
1556
|
-
* Inputs for the registered table. `label` is deliberately blank: the
|
|
1557
|
-
* surrounding `mt-entity-field` already prints the property name, and the
|
|
1558
|
-
* field would otherwise print a second one in its own style.
|
|
1559
|
-
*/
|
|
1560
|
-
protected readonly entityListTableInputs: _angular_core.Signal<Record<string, unknown>>;
|
|
1561
1581
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityPreviewBody, never>;
|
|
1562
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityPreviewBody, "mt-entity-preview-body", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "attachmentShape": { "alias": "attachmentShape"; "required": false; "isSignal": true; };
|
|
1582
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityPreviewBody, "mt-entity-preview-body", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "attachmentShape": { "alias": "attachmentShape"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1563
1583
|
}
|
|
1564
1584
|
|
|
1565
1585
|
declare class ComparisonValue {
|
|
@@ -1630,8 +1650,6 @@ declare class EntitiesPreview {
|
|
|
1630
1650
|
/** Array of entity data to display */
|
|
1631
1651
|
readonly entities: _angular_core.InputSignal<EntityData[]>;
|
|
1632
1652
|
readonly attachmentShape: _angular_core.InputSignal<"compact" | "default">;
|
|
1633
|
-
/** Forwarded to every entity; see `EntityPreviewBody.entityListContext`. */
|
|
1634
|
-
readonly entityListContext: _angular_core.InputSignal<EntityListPreviewContext | null>;
|
|
1635
1653
|
/**
|
|
1636
1654
|
* Soft "stack every field full-width when the host is narrower than the
|
|
1637
1655
|
* 24-column grid reads well" behavior (the ≤400px container-query fallback,
|
|
@@ -1689,7 +1707,7 @@ declare class EntitiesPreview {
|
|
|
1689
1707
|
protected readonly slotGroups: _angular_core.Signal<EntitySlotGroup[]>;
|
|
1690
1708
|
protected onSlotClick(source: MouseEvent, slot: EntitySlot): void;
|
|
1691
1709
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntitiesPreview, never>;
|
|
1692
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntitiesPreview, "mt-entities-preview", never, { "entities": { "alias": "entities"; "required": true; "isSignal": true; }; "attachmentShape": { "alias": "attachmentShape"; "required": false; "isSignal": true; }; "
|
|
1710
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntitiesPreview, "mt-entities-preview", never, { "entities": { "alias": "entities"; "required": true; "isSignal": true; }; "attachmentShape": { "alias": "attachmentShape"; "required": false; "isSignal": true; }; "stackOnNarrow": { "alias": "stackOnNarrow"; "required": false; "isSignal": true; }; "clickableKeys": { "alias": "clickableKeys"; "required": false; "isSignal": true; }; "activeKeys": { "alias": "activeKeys"; "required": false; "isSignal": true; }; "clickableTooltip": { "alias": "clickableTooltip"; "required": false; "isSignal": true; }; "activeTooltip": { "alias": "activeTooltip"; "required": false; "isSignal": true; }; }, { "entityClick": "entityClick"; }, never, never, true, never>;
|
|
1693
1711
|
}
|
|
1694
1712
|
|
|
1695
1713
|
/**
|
|
@@ -1809,5 +1827,5 @@ declare class FitText {
|
|
|
1809
1827
|
|
|
1810
1828
|
declare function sharedActiveLang(transloco: TranslocoService): Signal<string>;
|
|
1811
1829
|
|
|
1812
|
-
export { CONNECTION_KEY_SEPARATOR, CURRENCY_COMPACT_THRESHOLD, ComparisonEntityList, ComparisonValue, DEFAULT_PHASE_GATE_COLOR, ENTITY_EMPTY_VALUE_PLACEHOLDER, ENTITY_LIST_TABLE_COMPONENT, EntitiesManage, EntitiesPreview, EntitiesResizeBase, EntityAttachment, EntityCheckbox, EntityConnection, EntityCurrency, EntityDate, EntityField, EntityIcon, EntityLeafDetails, EntityListDrawer, EntityListPreview, EntityLocation, EntityLongText, EntityLookup, EntityLookupModuleCheckList, EntityPercentage, EntityPhaseGate, EntityPreview, EntityPreviewBody, EntityScheduleItem, EntityStatus, EntityText, EntityUser, FitText, LEAF_DETAILS_KEY_SEPARATOR, LEAF_PHASES_KEY_SEPARATOR, SECTION_KEY_PREFIX, buildConnectionKey, buildDisplayEntities, buildEntityListRows, buildSectionKey, compactCurrencyDisplay, currencyUnitOf, displayOrPlaceholder, expandConnectionEntity, expandLeafDetailsEntity, extractDisplayText, getEntitySectionTitle, groupEntitiesIntoSections, humanizeEntityListKey, isConnectionSyntheticKey, isEntityAlignEnd, isEntityLabelHidden, isEntitySection, isLeafDetailsCatalogConfiguration, isLeafDetailsCollectionValue, isLeafDetailsRuntimeValue, isLeafDetailsSyntheticKey, isLeafDetailsValue, isLeafPhasesSyntheticKey, isLeafSyntheticKey, isSectionKey, isValueMissing, matchesPercentageColorRule, normalizeConnectionSourceLevels, normalizeNumerals, parseCurrencyAmount, readEntityValueColor, resolveConnectionLevelName, resolveEntityInfo, resolveEntityLabelPosition, resolveLocalizedLabel, resolvePercentageColor, serializeEntityRawValue, sharedActiveLang, splitConnectionKey, splitLeafKey, summarizeEntityListRows };
|
|
1813
|
-
export type { ComparisonValueSide, ConnectionCatalogConfiguration, ConnectionLevelSavedConfig, ConnectionSourceLevelConfig, EntityAttachmentItemValue, EntityAttachmentValue, EntityBaseConfig, EntityClickEvent, EntityComparisonField, EntityComparisonOperation, EntityConfiguration, EntityConnectionConfig, EntityConnectionSourceValue, EntityConnectionValue, EntityData, EntityLabelPosition, EntityLeafDetailsConfig, EntityListComparison, EntityListComparisonRow, EntityListEntityValue, EntityListInlineFieldMeta,
|
|
1830
|
+
export { CONNECTION_KEY_SEPARATOR, CURRENCY_COMPACT_THRESHOLD, ComparisonEntityList, ComparisonValue, DEFAULT_PHASE_GATE_COLOR, ENTITY_EMPTY_VALUE_PLACEHOLDER, ENTITY_LIST_TABLE_COMPONENT, EntitiesManage, EntitiesPreview, EntitiesResizeBase, EntityAttachment, EntityCheckbox, EntityConnection, EntityCurrency, EntityDate, EntityField, EntityIcon, EntityLeafDetails, EntityListDrawer, EntityListPreview, EntityLocation, EntityLongText, EntityLookup, EntityLookupModuleCheckList, EntityPercentage, EntityPhaseGate, EntityPreview, EntityPreviewBody, EntityRuntimeContextStore, EntityScheduleItem, EntityStatus, EntityText, EntityUser, FitText, LEAF_DETAILS_KEY_SEPARATOR, LEAF_PHASES_KEY_SEPARATOR, SECTION_KEY_PREFIX, buildConnectionKey, buildDisplayEntities, buildEntityListRows, buildSectionKey, compactCurrencyDisplay, currencyUnitOf, displayOrPlaceholder, expandConnectionEntity, expandLeafDetailsEntity, extractDisplayText, getEntitySectionTitle, groupEntitiesIntoSections, humanizeEntityListKey, isConnectionSyntheticKey, isEntityAlignEnd, isEntityLabelHidden, isEntitySection, isLeafDetailsCatalogConfiguration, isLeafDetailsCollectionValue, isLeafDetailsRuntimeValue, isLeafDetailsSyntheticKey, isLeafDetailsValue, isLeafPhasesSyntheticKey, isLeafSyntheticKey, isSectionKey, isValueMissing, matchesPercentageColorRule, normalizeConnectionSourceLevels, normalizeNumerals, parseCurrencyAmount, readEntityValueColor, resolveConnectionLevelName, resolveEntityInfo, resolveEntityLabelPosition, resolveLocalizedLabel, resolvePercentageColor, serializeEntityRawValue, sharedActiveLang, splitConnectionKey, splitLeafKey, summarizeEntityListRows };
|
|
1831
|
+
export type { ComparisonValueSide, ConnectionCatalogConfiguration, ConnectionLevelSavedConfig, ConnectionSourceLevelConfig, EntityAttachmentItemValue, EntityAttachmentValue, EntityBaseConfig, EntityClickEvent, EntityComparisonField, EntityComparisonOperation, EntityConfiguration, EntityConnectionConfig, EntityConnectionSourceValue, EntityConnectionValue, EntityData, EntityLabelPosition, EntityLeafDetailsConfig, EntityListComparison, EntityListComparisonRow, EntityListEntityValue, EntityListInlineFieldMeta, EntityListRenderedRow, EntityListRowValue, EntityListValueItem, EntityLocationValue, EntityLookupCheckListItem, EntityLookupCheckListPropValue, EntityLookupCheckListValue, EntityLookupValue, EntityMultiLookupValue, EntityMultiUserValue, EntityNestedPropertyMeta, EntityPercentageConfig, EntityPhaseGateValue, EntityPropertyConfiguration, EntityResizeEvent, EntityRuntimeContext, EntityScheduleItemValue, EntitySectionConfig, EntitySectionGroup, EntitySectionLabel, EntitySize, EntityStatusValue, EntityTranslatableTextValue, EntityUserConfig, EntityUserValue, EntityViewType, LeafDetailsBadgeKind, LeafDetailsCatalogConfiguration, LeafDetailsCatalogLevelValue, LeafDetailsCatalogPhaseValue, LeafDetailsCatalogStatusValue, LeafDetailsEntityCollectionValue, LeafDetailsEntityValue, LeafDetailsPhaseSummary, LeafDetailsRuntimeChildSchema, LeafDetailsRuntimePhaseCount, LeafDetailsRuntimePhaseDetails, LeafDetailsRuntimeStatusCount, LeafDetailsRuntimeStatusDetails, LeafDetailsRuntimeValue, LeafDetailsStatusSummary, LeafLevelSavedConfig, LeafPhaseSavedConfig, PercentageColorMode, PercentageColorPropertyRef, PercentageColorRule, PercentageColorSource, PropertyValueComparison, ValueComparison };
|
|
@@ -42,6 +42,11 @@ declare class SelectField implements ControlValueAccessor, OnInit, OnChanges, Af
|
|
|
42
42
|
readonly filter: _angular_core.InputSignal<boolean | undefined>;
|
|
43
43
|
readonly filterBy: _angular_core.InputSignal<string | undefined>;
|
|
44
44
|
readonly dataKey: _angular_core.InputSignal<string | undefined>;
|
|
45
|
+
/**
|
|
46
|
+
* Clear button. Left unset it follows {@link isRequiredField}: an optional
|
|
47
|
+
* select has to be able to go back to empty, a required one has nothing to
|
|
48
|
+
* clear to. Pass an explicit `true` / `false` to override that.
|
|
49
|
+
*/
|
|
45
50
|
readonly showClear: _angular_core.InputSignal<boolean | undefined>;
|
|
46
51
|
readonly clearAfterSelect: _angular_core.InputSignal<boolean | undefined>;
|
|
47
52
|
readonly required: _angular_core.InputSignal<boolean>;
|
|
@@ -91,6 +96,15 @@ declare class SelectField implements ControlValueAccessor, OnInit, OnChanges, Af
|
|
|
91
96
|
registerOnTouched(fn: any): void;
|
|
92
97
|
setDisabledState(disabled: boolean): void;
|
|
93
98
|
isGrouped(): boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Required through the input or through a `Validators.required` on the bound
|
|
101
|
+
* control — DynamicForm and hand-written reactive forms take the second route.
|
|
102
|
+
* A method, not a computed: validators are mutable and carry no signal, so
|
|
103
|
+
* only re-reading them per change detection keeps this truthful.
|
|
104
|
+
*/
|
|
105
|
+
isRequiredField(): boolean;
|
|
106
|
+
/** Explicit `showClear` wins; otherwise every optional select is clearable. */
|
|
107
|
+
isClearable(): boolean;
|
|
94
108
|
clearSelection(): void;
|
|
95
109
|
getOptionLabelValue(option: any): string;
|
|
96
110
|
/**
|