@masterteam/components 0.0.305 → 0.0.306
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 +11 -1
- package/assets/i18n/en.json +11 -1
- package/fesm2022/masterteam-components-business-fields.mjs +212 -36
- package/fesm2022/masterteam-components-business-fields.mjs.map +1 -1
- package/package.json +1 -1
- package/types/masterteam-components-business-fields.d.ts +90 -5
package/package.json
CHANGED
|
@@ -4,7 +4,6 @@ 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 * as _masterteam_components_entities from '@masterteam/components/entities';
|
|
8
7
|
import { EntityData, EntityListLocalSchemaField, EntityListLocalCell } from '@masterteam/components/entities';
|
|
9
8
|
|
|
10
9
|
declare class LookupMatrixField implements AfterViewInit {
|
|
@@ -319,6 +318,18 @@ declare class SchedulePredecessorField implements ControlValueAccessor {
|
|
|
319
318
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SchedulePredecessorField, "mt-schedule-predecessor-field", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "configuration": { "alias": "configuration"; "required": false; "isSignal": true; }; "runtimeContext": { "alias": "runtimeContext"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
320
319
|
}
|
|
321
320
|
|
|
321
|
+
/**
|
|
322
|
+
* One saved revision of a list — `GET entity-lists/revisions`, newest first.
|
|
323
|
+
* `createdBy` is an actor id and is never shown; `createdByName` is the
|
|
324
|
+
* author's *current* display name, null when it cannot be resolved, and
|
|
325
|
+
* absent on a backend older than `f039e096`.
|
|
326
|
+
*/
|
|
327
|
+
interface EntityListRevision {
|
|
328
|
+
version: number;
|
|
329
|
+
createdAt: string;
|
|
330
|
+
createdBy?: string | null;
|
|
331
|
+
createdByName?: string | null;
|
|
332
|
+
}
|
|
322
333
|
/**
|
|
323
334
|
* Why the metadata request produced no table.
|
|
324
335
|
*
|
|
@@ -622,7 +633,7 @@ declare class EntityListField implements ControlValueAccessor {
|
|
|
622
633
|
* active schema is the fallback for a list that has never been saved.
|
|
623
634
|
*/
|
|
624
635
|
private readonly localSchema;
|
|
625
|
-
protected readonly localFields: _angular_core.Signal<
|
|
636
|
+
protected readonly localFields: _angular_core.Signal<EntityListLocalSchemaField[]>;
|
|
626
637
|
/**
|
|
627
638
|
* Render the Local table once the metadata answered: it is the access
|
|
628
639
|
* boundary, and it carries the operation switches the table obeys.
|
|
@@ -656,6 +667,8 @@ declare class EntityListField implements ControlValueAccessor {
|
|
|
656
667
|
* control value and option label, like a locally added linked row.
|
|
657
668
|
*/
|
|
658
669
|
protected readonly localTableRows: _angular_core.Signal<EntityListRow[]>;
|
|
670
|
+
private buildLocalColumns;
|
|
671
|
+
private buildLocalRows;
|
|
659
672
|
/**
|
|
660
673
|
* Edit and delete per row. A row added in this session is still part of the
|
|
661
674
|
* create — changing or dropping it undoes nothing stored — so it follows
|
|
@@ -730,7 +743,71 @@ declare class EntityListField implements ControlValueAccessor {
|
|
|
730
743
|
protected readonly preservedAvailable: _angular_core.Signal<boolean>;
|
|
731
744
|
protected readonly preservedAt: _angular_core.Signal<string | null>;
|
|
732
745
|
protected readonly unavailableCount: _angular_core.Signal<number>;
|
|
746
|
+
/** Query of the two read-only review endpoints for this list's owner. */
|
|
747
|
+
private reviewParams;
|
|
733
748
|
private fetchComparison;
|
|
749
|
+
/**
|
|
750
|
+
* A list viewed from outside its form, with its owning record named (a
|
|
751
|
+
* table cell's drawer), has saved revisions to browse — Related, Local and
|
|
752
|
+
* Selected alike. Nowhere else: an editable list, a record preview and a
|
|
753
|
+
* form know no owner, and history is read-only anyway.
|
|
754
|
+
*/
|
|
755
|
+
protected readonly historyAvailable: _angular_core.Signal<boolean>;
|
|
756
|
+
/**
|
|
757
|
+
* A Local or Selected list shows its value until a revision is picked;
|
|
758
|
+
* then that revision, until *Back to latest*. A Related list always shows
|
|
759
|
+
* a comparison, the latest one when no revision is picked.
|
|
760
|
+
*/
|
|
761
|
+
protected readonly showingRevision: _angular_core.Signal<boolean>;
|
|
762
|
+
/** The Local rows of the revision being viewed, with that revision's schema. */
|
|
763
|
+
private readonly revisionLocalDocument;
|
|
764
|
+
private readonly revisionLocalFields;
|
|
765
|
+
protected readonly revisionLocalColumns: _angular_core.Signal<EntityListColumnDef[]>;
|
|
766
|
+
protected readonly revisionLocalRows: _angular_core.Signal<EntityListRow[]>;
|
|
767
|
+
/** The history list is open. */
|
|
768
|
+
protected readonly revisionsOpen: _angular_core.WritableSignal<boolean>;
|
|
769
|
+
/** Revisions loaded so far, newest first. */
|
|
770
|
+
protected readonly revisions: _angular_core.WritableSignal<EntityListRevision[]>;
|
|
771
|
+
/**
|
|
772
|
+
* The revisions as listed, each with the author to print: the name the
|
|
773
|
+
* backend resolved for the page, or "Unknown user" when it resolved none.
|
|
774
|
+
* Plain text — the template interpolates it, never binds it as HTML.
|
|
775
|
+
*/
|
|
776
|
+
protected readonly revisionItems: _angular_core.Signal<{
|
|
777
|
+
version: number;
|
|
778
|
+
createdAt: string;
|
|
779
|
+
author: string;
|
|
780
|
+
}[]>;
|
|
781
|
+
private readonly revisionsTotal;
|
|
782
|
+
private revisionsPage;
|
|
783
|
+
protected readonly revisionsLoading: _angular_core.WritableSignal<boolean>;
|
|
784
|
+
protected readonly revisionsError: _angular_core.WritableSignal<string | null>;
|
|
785
|
+
protected readonly hasMoreRevisions: _angular_core.Signal<boolean>;
|
|
786
|
+
/** The revision the comparison shows; null is the list as saved last. */
|
|
787
|
+
protected readonly viewedRevision: _angular_core.WritableSignal<number | null>;
|
|
788
|
+
/** A revision is being read; the tables stay until it arrives. */
|
|
789
|
+
protected readonly revisionLoading: _angular_core.WritableSignal<boolean>;
|
|
790
|
+
/** Why the chosen revision could not be read. The last comparison stays. */
|
|
791
|
+
protected readonly revisionError: _angular_core.WritableSignal<string | null>;
|
|
792
|
+
private revisionSubscription?;
|
|
793
|
+
private revisionsSubscription?;
|
|
794
|
+
protected toggleRevisions(): void;
|
|
795
|
+
/** The next page of the revision index. */
|
|
796
|
+
protected loadRevisions(): void;
|
|
797
|
+
/**
|
|
798
|
+
* Compare a saved revision with today — its preserved rows beside today's
|
|
799
|
+
* values of the records it held; for Local, its rows as saved — or, with
|
|
800
|
+
* `null`, go back to the latest: a Related list re-reads its comparison, a
|
|
801
|
+
* Local or Selected one shows its value again. Read-only: nothing here is
|
|
802
|
+
* ever submitted.
|
|
803
|
+
*/
|
|
804
|
+
protected showRevision(version: number | null): void;
|
|
805
|
+
/**
|
|
806
|
+
* `entity_list.history_source_changed` (`400`): the revision was saved with
|
|
807
|
+
* another source configuration. `404`: it no longer exists.
|
|
808
|
+
*/
|
|
809
|
+
private revisionFailureMessage;
|
|
810
|
+
private resetRevisions;
|
|
734
811
|
protected readonly selectionRowActions: _angular_core.Signal<TableAction[]>;
|
|
735
812
|
/**
|
|
736
813
|
* A required Selected list needs a record. An emptied selection is an
|
|
@@ -814,11 +891,17 @@ declare class EntityListField implements ControlValueAccessor {
|
|
|
814
891
|
*/
|
|
815
892
|
private writeLocalValue;
|
|
816
893
|
/**
|
|
817
|
-
* True when the written value still carries exactly the
|
|
818
|
-
*
|
|
819
|
-
*
|
|
894
|
+
* True when the written value still carries exactly the change we last
|
|
895
|
+
* emitted — i.e. the form is echoing our own value back rather than loading
|
|
896
|
+
* a new one.
|
|
897
|
+
*
|
|
898
|
+
* The list version, change id and tokens are part of it: a reload after a
|
|
899
|
+
* save can carry the same (empty) rows and deletions as the last emission,
|
|
900
|
+
* and taking it for an echo kept the old version, so the next save was
|
|
901
|
+
* refused as a version conflict.
|
|
820
902
|
*/
|
|
821
903
|
private isEchoOfLastEmit;
|
|
904
|
+
private echoKey;
|
|
822
905
|
/**
|
|
823
906
|
* The stored value is persisted as JSON, so a host may write either the
|
|
824
907
|
* parsed object or its raw string form.
|
|
@@ -942,6 +1025,8 @@ declare class EntityListField implements ControlValueAccessor {
|
|
|
942
1025
|
* what it loaded with; the backend skips it.
|
|
943
1026
|
*/
|
|
944
1027
|
private linkedMutation;
|
|
1028
|
+
/** The loaded value's `mutationId`, restored once nothing is left to apply. */
|
|
1029
|
+
private loadedMutationId;
|
|
945
1030
|
private linkedMutationId;
|
|
946
1031
|
/**
|
|
947
1032
|
* `values[]` entries, restricted to `writeFields` when configured.
|