@masterteam/components 0.0.301 → 0.0.302
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/assets/i18n/ar.json +392 -391
- package/assets/i18n/en.json +392 -391
- package/fesm2022/masterteam-components-business-fields.mjs +562 -4
- package/fesm2022/masterteam-components-business-fields.mjs.map +1 -1
- package/fesm2022/masterteam-components-entities.mjs +158 -5
- package/fesm2022/masterteam-components-entities.mjs.map +1 -1
- package/package.json +1 -1
- package/types/masterteam-components-business-fields.d.ts +180 -3
- package/types/masterteam-components-entities.d.ts +126 -3
package/package.json
CHANGED
|
@@ -4,7 +4,8 @@ import { LookupMatrixFieldConfig, LookupOptionItemConfig, LookupMatrixCellConfig
|
|
|
4
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
|
-
import
|
|
7
|
+
import * as _masterteam_components_entities from '@masterteam/components/entities';
|
|
8
|
+
import { EntityData, EntityListLocalSchemaField, EntityListLocalCell } from '@masterteam/components/entities';
|
|
8
9
|
|
|
9
10
|
declare class LookupMatrixField implements AfterViewInit {
|
|
10
11
|
readonly config: _angular_core.InputSignal<LookupMatrixFieldConfig>;
|
|
@@ -579,6 +580,65 @@ declare class EntityListField implements ControlValueAccessor {
|
|
|
579
580
|
* against the record values and add an empty cell to every row.
|
|
580
581
|
*/
|
|
581
582
|
protected readonly tableColumns: _angular_core.Signal<EntityListColumnDef[]>;
|
|
583
|
+
/** Loaded document plus this session's edits; see `LocalEditorState`. */
|
|
584
|
+
private readonly localState;
|
|
585
|
+
/** The bound value was a Local document, whatever the metadata says yet. */
|
|
586
|
+
private readonly localValueSeen;
|
|
587
|
+
/** The last Local value emitted, so its echo does not reset the edits. */
|
|
588
|
+
private lastLocalEmit;
|
|
589
|
+
/**
|
|
590
|
+
* Rows live inside the parent record: no target records, no `fetch/query`,
|
|
591
|
+
* and the value is a document of its own rather than operation markers.
|
|
592
|
+
* Known from the metadata, or earlier from the value itself.
|
|
593
|
+
*/
|
|
594
|
+
protected readonly localMode: _angular_core.Signal<boolean>;
|
|
595
|
+
/**
|
|
596
|
+
* The schema the table is built from. A loaded value's own schema wins: it
|
|
597
|
+
* is the one its rows were projected against, and pending or approved
|
|
598
|
+
* evidence stays pinned to the schema it was submitted with. The metadata's
|
|
599
|
+
* active schema is the fallback for a list that has never been saved.
|
|
600
|
+
*/
|
|
601
|
+
private readonly localSchema;
|
|
602
|
+
protected readonly localFields: _angular_core.Signal<_masterteam_components_entities.EntityListLocalSchemaField[]>;
|
|
603
|
+
/**
|
|
604
|
+
* Render the Local table once the metadata answered: it is the access
|
|
605
|
+
* boundary, and it carries the operation switches the table obeys.
|
|
606
|
+
*/
|
|
607
|
+
protected readonly localReady: _angular_core.Signal<boolean>;
|
|
608
|
+
/**
|
|
609
|
+
* Writes are staged into the parent's submission, never sent on their own.
|
|
610
|
+
*
|
|
611
|
+
* Whether the host lets this field be edited is the form's call —
|
|
612
|
+
* `readonly` — as it is for a linked list; `pendingSubmission` is not one.
|
|
613
|
+
* A loaded request is not always a review: a returned request is loaded to
|
|
614
|
+
* be corrected and resubmitted, and the backend projects the active schema
|
|
615
|
+
* for exactly that.
|
|
616
|
+
*/
|
|
617
|
+
private readonly localWritable;
|
|
618
|
+
protected readonly localCanCreate: _angular_core.Signal<boolean>;
|
|
619
|
+
private readonly localCanEdit;
|
|
620
|
+
private readonly localCanDelete;
|
|
621
|
+
/** Reordering rewrites loaded rows, so it is an edit. */
|
|
622
|
+
protected readonly localCanReorder: _angular_core.Signal<boolean>;
|
|
623
|
+
/**
|
|
624
|
+
* One column per visible schema field, keyed by the field's local id — the
|
|
625
|
+
* id cells are keyed by. Sorting is off while rows can be dragged: a sorted
|
|
626
|
+
* table would show an order that is not the one being saved.
|
|
627
|
+
*/
|
|
628
|
+
protected readonly localColumns: _angular_core.Signal<EntityListColumnDef[]>;
|
|
629
|
+
/**
|
|
630
|
+
* Rows as rendered: loaded rows with this session's edits over them, then
|
|
631
|
+
* new rows, in the order they would be saved. A loaded cell renders from the
|
|
632
|
+
* backend's resolved `value`; a cell the user set renders from the dialog's
|
|
633
|
+
* control value and option label, like a locally added linked row.
|
|
634
|
+
*/
|
|
635
|
+
protected readonly localTableRows: _angular_core.Signal<EntityListRow[]>;
|
|
636
|
+
/**
|
|
637
|
+
* Edit and delete per row. A row added in this session is still part of the
|
|
638
|
+
* create — changing or dropping it undoes nothing stored — so it follows
|
|
639
|
+
* `allowCreate`; a loaded row follows `allowEdit` / `allowDelete`.
|
|
640
|
+
*/
|
|
641
|
+
protected readonly localRowActions: _angular_core.Signal<TableAction[]>;
|
|
582
642
|
/** Enough context to ask the backend what this field should render. */
|
|
583
643
|
protected readonly hasRequiredContext: _angular_core.Signal<boolean>;
|
|
584
644
|
/**
|
|
@@ -604,8 +664,34 @@ declare class EntityListField implements ControlValueAccessor {
|
|
|
604
664
|
* `writeFields`.
|
|
605
665
|
*/
|
|
606
666
|
private readonly addDialogComponent;
|
|
667
|
+
/**
|
|
668
|
+
* Row dialog of a Local list, built from the schema's captured definitions
|
|
669
|
+
* (`provideEntityListAddForm()` registers it beside the linked one). Without
|
|
670
|
+
* it a Local list renders read-only.
|
|
671
|
+
*/
|
|
672
|
+
private readonly localDialogComponent;
|
|
607
673
|
constructor();
|
|
608
674
|
writeValue(value: EntityListStoredValue | string | null): void;
|
|
675
|
+
/**
|
|
676
|
+
* Take a Local document, and say whether it was one.
|
|
677
|
+
*
|
|
678
|
+
* - Our own emission echoed back (`mt-dynamic-form` re-writes the model on
|
|
679
|
+
* every change) keeps the session's edits.
|
|
680
|
+
* - A value some instance of this field emitted restores that instance's
|
|
681
|
+
* state — see `LOCAL_EDITOR_STATES`.
|
|
682
|
+
* - A document the backend sent starts a fresh session on it: the projection
|
|
683
|
+
* `process-form-load` returns (its `schema` set, cells rendered), or the
|
|
684
|
+
* stored document the fetch endpoints return for a preview (`schema:
|
|
685
|
+
* null`, cells unrendered) — the schema then comes from the metadata.
|
|
686
|
+
* Every backend document carries the `schema` member, null or not; a
|
|
687
|
+
* mutation never does. So a mutation nobody here emitted has no rows to
|
|
688
|
+
* rebuild the table from and is left as the control's value, untouched
|
|
689
|
+
* until the user edits.
|
|
690
|
+
*
|
|
691
|
+
* An empty value resets the Local session too — a form reset — and still
|
|
692
|
+
* falls through, since which storage the list uses may not be known yet.
|
|
693
|
+
*/
|
|
694
|
+
private writeLocalValue;
|
|
609
695
|
/**
|
|
610
696
|
* True when the written value still carries exactly the rows and deletions
|
|
611
697
|
* we last emitted — i.e. the form is echoing our own value back rather than
|
|
@@ -637,6 +723,57 @@ declare class EntityListField implements ControlValueAccessor {
|
|
|
637
723
|
* existing records are queued in `deletedIds` for the backend to delete.
|
|
638
724
|
*/
|
|
639
725
|
protected deleteRow(row: EntityListRow): void;
|
|
726
|
+
/**
|
|
727
|
+
* Add a Local row (no `row`) or edit one. The dialog is built from the
|
|
728
|
+
* schema; its `submit` map is serialized here into cell `rawValue`s.
|
|
729
|
+
*
|
|
730
|
+
* A loaded row keeps only the cells that differ from what was loaded, so an
|
|
731
|
+
* untouched cell is omitted and retained. Emptying a cell that had a value
|
|
732
|
+
* is a clear, sent as `null` — the dialog is filled from every schema field,
|
|
733
|
+
* so an empty control here really was emptied.
|
|
734
|
+
*/
|
|
735
|
+
protected openLocalRowDialog(row?: EntityListRow): void;
|
|
736
|
+
/**
|
|
737
|
+
* Remove a Local row. A loaded row is listed in `deletedRowIds` and its
|
|
738
|
+
* pending edit dropped — a row is never both deleted and submitted. A row
|
|
739
|
+
* added in this session just disappears.
|
|
740
|
+
*/
|
|
741
|
+
protected deleteLocalRow(row: EntityListRow): void;
|
|
742
|
+
/**
|
|
743
|
+
* Apply a drag within the table. Replays PrimeNG's own move on the rows as
|
|
744
|
+
* rendered: `p-table` is bound to a derived array, so the event's `value`
|
|
745
|
+
* is not reliably the reordered one.
|
|
746
|
+
*/
|
|
747
|
+
protected onLocalReorder(event: {
|
|
748
|
+
dragIndex?: number;
|
|
749
|
+
dropIndex?: number;
|
|
750
|
+
}): void;
|
|
751
|
+
/**
|
|
752
|
+
* Serialize one dialog result into cells, by field id, for every visible
|
|
753
|
+
* field. `submit` is the dialog's reduction to stored scalars and wins over
|
|
754
|
+
* the raw control value, as for linked rows.
|
|
755
|
+
*/
|
|
756
|
+
private toLocalCells;
|
|
757
|
+
/**
|
|
758
|
+
* Publish the Local state as the control's value.
|
|
759
|
+
*
|
|
760
|
+
* With changes, the value is a mutation: the loaded list and schema
|
|
761
|
+
* versions, only the changed rows and cells, explicit deletions, and a
|
|
762
|
+
* `mutationId` that stays the same while the content does (a retry of the
|
|
763
|
+
* same save) and changes with it (a new save). Without changes it is the
|
|
764
|
+
* loaded document again, which `mapFormValueToSubmitFields` leaves out of the
|
|
765
|
+
* submission — an unchanged Local list is omitted, never re-sent.
|
|
766
|
+
*/
|
|
767
|
+
private emitLocal;
|
|
768
|
+
/** A cell the user set in this session, shaped like a backend one. */
|
|
769
|
+
private buildLocalDraftCell;
|
|
770
|
+
/**
|
|
771
|
+
* A loaded cell: the backend's rendered `value` beside its `rawValue`. A
|
|
772
|
+
* stored document from the fetch endpoints has no rendered values, so the
|
|
773
|
+
* raw one is shaped the way a locally set cell would be — a user id still
|
|
774
|
+
* renders as a user, though only as its id until the backend renders it.
|
|
775
|
+
*/
|
|
776
|
+
private buildLocalLoadedCell;
|
|
640
777
|
/**
|
|
641
778
|
* Normalize the add/edit dialog close payload. The rich dialog returns
|
|
642
779
|
* `{ values, display }`; a custom add-dialog may still return the raw values
|
|
@@ -785,6 +922,46 @@ interface EntityListAddDialogInputs {
|
|
|
785
922
|
* token is not registered, the field falls back to a minimal text-only popup.
|
|
786
923
|
*/
|
|
787
924
|
declare const ENTITY_LIST_ADD_DIALOG_COMPONENT: InjectionToken<Type<unknown>>;
|
|
925
|
+
/**
|
|
926
|
+
* Inputs the Local row dialog receives via `ModalService` `inputValues`.
|
|
927
|
+
*
|
|
928
|
+
* A Local list (`storageMode: "Local"`) has no source form to load: its rows
|
|
929
|
+
* belong to the parent record, and the source module only lent its field
|
|
930
|
+
* definitions, which the published schema captured. So the dialog is built
|
|
931
|
+
* from `fields` — never from `process-form-load` of the source module, which
|
|
932
|
+
* may not even be mapped to this level.
|
|
933
|
+
*/
|
|
934
|
+
interface EntityListLocalRowDialogInputs {
|
|
935
|
+
/** Visible schema fields, in order, each with its captured definition. */
|
|
936
|
+
fields: EntityListLocalSchemaField[];
|
|
937
|
+
/** Host form's lookup catalog, for `Lookup` / `LookupMultiSelect` fields. */
|
|
938
|
+
lookups?: unknown[];
|
|
939
|
+
/**
|
|
940
|
+
* The loaded cells of the row being edited, by field id. Each is mapped the
|
|
941
|
+
* way a top-level form maps a loaded value (a `User` from its rendered
|
|
942
|
+
* object, a `Checkbox` from its stored text …).
|
|
943
|
+
*/
|
|
944
|
+
initialCells?: Record<string, EntityListLocalCell>;
|
|
945
|
+
/** Control values from this session, by field id; win over `initialCells`. */
|
|
946
|
+
initialValues?: Record<string, unknown>;
|
|
947
|
+
isEdit?: boolean;
|
|
948
|
+
}
|
|
949
|
+
/**
|
|
950
|
+
* Close payload of the Local row dialog, keyed by field id. Same three maps as
|
|
951
|
+
* the linked dialog: `values` refills the form, `display` renders option
|
|
952
|
+
* labels, and `submit` is each value reduced to the scalar the backend
|
|
953
|
+
* stores — the field only serializes it.
|
|
954
|
+
*/
|
|
955
|
+
interface EntityListLocalRowDialogResult {
|
|
956
|
+
values: Record<string, unknown>;
|
|
957
|
+
display: Record<string, unknown>;
|
|
958
|
+
submit: Record<string, unknown>;
|
|
959
|
+
}
|
|
960
|
+
/**
|
|
961
|
+
* Local counterpart of `ENTITY_LIST_ADD_DIALOG_COMPONENT`, registered by the
|
|
962
|
+
* same `provideEntityListAddForm()`. Without it a Local list is read-only.
|
|
963
|
+
*/
|
|
964
|
+
declare const ENTITY_LIST_LOCAL_ROW_DIALOG_COMPONENT: InjectionToken<Type<unknown>>;
|
|
788
965
|
|
|
789
966
|
/**
|
|
790
967
|
* Lets `mt-entity-list-preview` render a module-backed `EntityList` as the
|
|
@@ -998,5 +1175,5 @@ declare class LookupModuleCheckListField implements ControlValueAccessor, OnInit
|
|
|
998
1175
|
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>;
|
|
999
1176
|
}
|
|
1000
1177
|
|
|
1001
|
-
export { ENTITY_LIST_ADD_DIALOG_COMPONENT, EntityListField, LOOKUP_CHECK_LIST_FORM_COMPONENT, LookupMatrixField, LookupModuleCheckListField, ScheduleItemSelectorField, SchedulePredecessorField, SchemaConnectionField, provideEntityListTablePreview };
|
|
1002
|
-
export type { ConnectionPayload, ConnectionSource, ConnectionSourceLevel, EntityListAddDialogInputs, LookupCheckListFormInputs, SchemaConnectionConfig, SourceLevelState };
|
|
1178
|
+
export { ENTITY_LIST_ADD_DIALOG_COMPONENT, ENTITY_LIST_LOCAL_ROW_DIALOG_COMPONENT, EntityListField, LOOKUP_CHECK_LIST_FORM_COMPONENT, LookupMatrixField, LookupModuleCheckListField, ScheduleItemSelectorField, SchedulePredecessorField, SchemaConnectionField, provideEntityListTablePreview };
|
|
1179
|
+
export type { ConnectionPayload, ConnectionSource, ConnectionSourceLevel, EntityListAddDialogInputs, EntityListLocalRowDialogInputs, EntityListLocalRowDialogResult, LookupCheckListFormInputs, SchemaConnectionConfig, SourceLevelState };
|
|
@@ -513,6 +513,94 @@ interface EntityListEntityValue {
|
|
|
513
513
|
entityIds?: number[];
|
|
514
514
|
rows?: EntityListRowValue[];
|
|
515
515
|
}
|
|
516
|
+
/** A `{ en, ar }` pair, as the backend's `Translatable` serializes. */
|
|
517
|
+
interface EntityListTranslatable {
|
|
518
|
+
en?: string | null;
|
|
519
|
+
ar?: string | null;
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* The source property definition a Local list captured when its schema was
|
|
523
|
+
* published (`PropertyDefinitionReadDto`). Server-owned and response-only: the
|
|
524
|
+
* backend never trusts one sent back, and pins it so saved values stay
|
|
525
|
+
* readable after the source field or module changes or is deleted.
|
|
526
|
+
*/
|
|
527
|
+
interface EntityListLocalFieldDefinition {
|
|
528
|
+
key: string;
|
|
529
|
+
name?: string | null;
|
|
530
|
+
nameEn?: string | null;
|
|
531
|
+
nameAr?: string | null;
|
|
532
|
+
viewType: string;
|
|
533
|
+
isRequired?: boolean;
|
|
534
|
+
isTranslatable?: boolean;
|
|
535
|
+
configuration?: Record<string, unknown> | string | null;
|
|
536
|
+
}
|
|
537
|
+
/** A field's share of a row, as the form builder sizes it: ¼, ½ or full. */
|
|
538
|
+
type EntityListLocalFieldWidth = '25' | '50' | '100';
|
|
539
|
+
/**
|
|
540
|
+
* One field of a Local list's schema. `id` is the stable local identity cells
|
|
541
|
+
* are keyed by — a UUID, not the source property id. `label` is an optional
|
|
542
|
+
* local override of the source label, and `required` is local to the list.
|
|
543
|
+
*/
|
|
544
|
+
interface EntityListLocalSchemaField {
|
|
545
|
+
id?: string;
|
|
546
|
+
sourceKey: string;
|
|
547
|
+
label?: EntityListTranslatable | null;
|
|
548
|
+
required?: boolean;
|
|
549
|
+
hidden?: boolean;
|
|
550
|
+
order?: number;
|
|
551
|
+
/**
|
|
552
|
+
* The field's size in the row dialog. Sent by the configuration screen but
|
|
553
|
+
* **not yet stored by the backend** (`LocalEntityListField` has no such
|
|
554
|
+
* member), so it is absent from what comes back and the dialog falls back
|
|
555
|
+
* to its default until the backend adds it.
|
|
556
|
+
*/
|
|
557
|
+
width?: EntityListLocalFieldWidth | null;
|
|
558
|
+
definition?: EntityListLocalFieldDefinition | null;
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* A published Local schema. `version` is a UUID that changes whenever the
|
|
562
|
+
* field set does; every mutation names the version it was built against.
|
|
563
|
+
*/
|
|
564
|
+
interface EntityListLocalSchema {
|
|
565
|
+
lineageId?: string;
|
|
566
|
+
version?: string;
|
|
567
|
+
fields: EntityListLocalSchemaField[];
|
|
568
|
+
}
|
|
569
|
+
/** One cell of a Local row. `value` is the rendered counterpart, read-only. */
|
|
570
|
+
interface EntityListLocalCell {
|
|
571
|
+
fieldId: string;
|
|
572
|
+
rawValue: string | null;
|
|
573
|
+
value?: unknown;
|
|
574
|
+
}
|
|
575
|
+
/** One Local row. `rowId` is a client-generated UUID, not a record id. */
|
|
576
|
+
interface EntityListLocalRow {
|
|
577
|
+
rowId: string;
|
|
578
|
+
order: number;
|
|
579
|
+
version: number;
|
|
580
|
+
cells: EntityListLocalCell[];
|
|
581
|
+
}
|
|
582
|
+
/**
|
|
583
|
+
* A Local `EntityList` value (`storageMode: "Local"`): rows owned by the parent
|
|
584
|
+
* record, stored inside it rather than as records of the source module.
|
|
585
|
+
*
|
|
586
|
+
* Arrives from `process-form-load` as the *projected* document — current
|
|
587
|
+
* versions, rendered cells, and `schema` with hidden fields already removed —
|
|
588
|
+
* and leaves as a *mutation* carrying only what changed, a fresh `mutationId`,
|
|
589
|
+
* and no `schema`. See `.github/instructions/properties/EntityList.md`.
|
|
590
|
+
*/
|
|
591
|
+
interface EntityListLocalDocument {
|
|
592
|
+
storageMode: 'Local';
|
|
593
|
+
formatVersion: number;
|
|
594
|
+
schemaVersion: string;
|
|
595
|
+
version: number;
|
|
596
|
+
mutationId?: string;
|
|
597
|
+
localRows: EntityListLocalRow[];
|
|
598
|
+
deletedRowIds?: string[];
|
|
599
|
+
/** Response-only: the schema the rows were projected against. */
|
|
600
|
+
schema?: EntityListLocalSchema | null;
|
|
601
|
+
}
|
|
602
|
+
/** Whether a stored or rendered `EntityList` value is a Local document. */
|
|
603
|
+
declare function isEntityListLocalDocument(value: unknown): value is EntityListLocalDocument;
|
|
516
604
|
/**
|
|
517
605
|
* One field definition of an inline `EntityList`, from its property
|
|
518
606
|
* configuration's `inlineFields`. This is the only description of the nested
|
|
@@ -1125,7 +1213,7 @@ declare function humanizeEntityListKey(key: string): string;
|
|
|
1125
1213
|
* `allowed` narrows to those keys, in that order; empty renders every field
|
|
1126
1214
|
* that survives the companion and identifier rules.
|
|
1127
1215
|
*/
|
|
1128
|
-
declare function buildEntityListRows(data: EntityData, allowed?: readonly string[]): EntityListRenderedRow[];
|
|
1216
|
+
declare function buildEntityListRows(data: EntityData, allowed?: readonly string[], lang?: string): EntityListRenderedRow[];
|
|
1129
1217
|
/**
|
|
1130
1218
|
* Plain-text summary of the rows, for the trigger's tooltip. Caps the list so
|
|
1131
1219
|
* a forty-item checklist does not become a forty-line tooltip.
|
|
@@ -1135,6 +1223,39 @@ declare function summarizeEntityListRows(rows: readonly EntityListRenderedRow[],
|
|
|
1135
1223
|
remaining: number;
|
|
1136
1224
|
};
|
|
1137
1225
|
|
|
1226
|
+
/**
|
|
1227
|
+
* Pure helpers shared by everything that reads a Local `EntityList`
|
|
1228
|
+
* (`storageMode: "Local"`) — the runtime field that edits it and the preview
|
|
1229
|
+
* that only renders it. See `.github/instructions/properties/EntityList.md`.
|
|
1230
|
+
*/
|
|
1231
|
+
/**
|
|
1232
|
+
* The schema's fields a row is rendered with, in order.
|
|
1233
|
+
*
|
|
1234
|
+
* A removed field stays in the stored schema as `hidden` so its values survive
|
|
1235
|
+
* and come back if it is re-added. The projected schema of a loaded value has
|
|
1236
|
+
* already dropped them, but the configuration's copy — what a create form falls
|
|
1237
|
+
* back to — has not.
|
|
1238
|
+
*/
|
|
1239
|
+
declare function visibleLocalSchemaFields(schema: EntityListLocalSchema | null | undefined): EntityListLocalSchemaField[];
|
|
1240
|
+
/**
|
|
1241
|
+
* The label a field renders under: its local override, then the source label
|
|
1242
|
+
* captured when it was published, then its key. The publisher writes an
|
|
1243
|
+
* override into the captured definition as well, so either path shows it.
|
|
1244
|
+
*/
|
|
1245
|
+
declare function resolveLocalFieldLabel(field: EntityListLocalSchemaField, lang?: string): string;
|
|
1246
|
+
/** The source view type the field captured; `Text` when none was. */
|
|
1247
|
+
declare function resolveLocalFieldViewType(field: EntityListLocalSchemaField): string;
|
|
1248
|
+
/**
|
|
1249
|
+
* The captured source configuration (lookup id, percentage colour rules …).
|
|
1250
|
+
* `PropertyDefinitionReadDto.configuration` is typed `object?`, so the backend
|
|
1251
|
+
* writes whatever the source held — an object, or its JSON text.
|
|
1252
|
+
*/
|
|
1253
|
+
declare function resolveLocalFieldConfiguration(field: EntityListLocalSchemaField): Record<string, unknown> | null;
|
|
1254
|
+
/** A row's cells keyed by field id. */
|
|
1255
|
+
declare function localCellsByFieldId(row: EntityListLocalRow): Map<string, EntityListLocalCell>;
|
|
1256
|
+
/** Rows in their stored order. */
|
|
1257
|
+
declare function sortLocalRows(rows: readonly EntityListLocalRow[] | null | undefined): EntityListLocalRow[];
|
|
1258
|
+
|
|
1138
1259
|
/** What `NgComponentOutlet` needs to render the inline table. */
|
|
1139
1260
|
interface EntityListTableHost {
|
|
1140
1261
|
component: Type<unknown>;
|
|
@@ -1271,6 +1392,8 @@ declare class EntityListDrawer {
|
|
|
1271
1392
|
readonly data: _angular_core.InputSignal<EntityData>;
|
|
1272
1393
|
/** Ordered allowlist of nested field keys; empty renders all of them. */
|
|
1273
1394
|
readonly fields: _angular_core.InputSignal<string[]>;
|
|
1395
|
+
/** A Local list's labels are `{ en, ar }` pairs; see `sharedActiveLang`. */
|
|
1396
|
+
private readonly activeLang;
|
|
1274
1397
|
readonly rows: _angular_core.Signal<EntityListRenderedRow[]>;
|
|
1275
1398
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityListDrawer, never>;
|
|
1276
1399
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityListDrawer, "mt-entity-list-drawer", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "fields": { "alias": "fields"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -1827,5 +1950,5 @@ declare class FitText {
|
|
|
1827
1950
|
|
|
1828
1951
|
declare function sharedActiveLang(transloco: TranslocoService): Signal<string>;
|
|
1829
1952
|
|
|
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 };
|
|
1953
|
+
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, isEntityListLocalDocument, isEntitySection, isLeafDetailsCatalogConfiguration, isLeafDetailsCollectionValue, isLeafDetailsRuntimeValue, isLeafDetailsSyntheticKey, isLeafDetailsValue, isLeafPhasesSyntheticKey, isLeafSyntheticKey, isSectionKey, isValueMissing, localCellsByFieldId, matchesPercentageColorRule, normalizeConnectionSourceLevels, normalizeNumerals, parseCurrencyAmount, readEntityValueColor, resolveConnectionLevelName, resolveEntityInfo, resolveEntityLabelPosition, resolveLocalFieldConfiguration, resolveLocalFieldLabel, resolveLocalFieldViewType, resolveLocalizedLabel, resolvePercentageColor, serializeEntityRawValue, sharedActiveLang, sortLocalRows, splitConnectionKey, splitLeafKey, summarizeEntityListRows, visibleLocalSchemaFields };
|
|
1954
|
+
export type { ComparisonValueSide, ConnectionCatalogConfiguration, ConnectionLevelSavedConfig, ConnectionSourceLevelConfig, EntityAttachmentItemValue, EntityAttachmentValue, EntityBaseConfig, EntityClickEvent, EntityComparisonField, EntityComparisonOperation, EntityConfiguration, EntityConnectionConfig, EntityConnectionSourceValue, EntityConnectionValue, EntityData, EntityLabelPosition, EntityLeafDetailsConfig, EntityListComparison, EntityListComparisonRow, EntityListEntityValue, EntityListInlineFieldMeta, EntityListLocalCell, EntityListLocalDocument, EntityListLocalFieldDefinition, EntityListLocalFieldWidth, EntityListLocalRow, EntityListLocalSchema, EntityListLocalSchemaField, EntityListRenderedRow, EntityListRowValue, EntityListTranslatable, 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 };
|