@masterteam/client-components 0.0.111 → 0.0.112
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/fesm2022/masterteam-client-components-client-instance-preview.mjs +44 -20
- package/fesm2022/masterteam-client-components-client-instance-preview.mjs.map +1 -1
- package/fesm2022/masterteam-client-components-client-list.mjs +139 -8
- package/fesm2022/masterteam-client-components-client-list.mjs.map +1 -1
- package/package.json +5 -5
- package/types/masterteam-client-components-client-instance-preview.d.ts +13 -1
- package/types/masterteam-client-components-client-list.d.ts +22 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@masterteam/client-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.112",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"directory": "../../../dist/masterteam/client-components",
|
|
6
6
|
"linkDirectory": true,
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
"rxjs": "^7.8.2",
|
|
17
17
|
"tailwindcss": "^4.2.2",
|
|
18
18
|
"tailwindcss-primeui": "^0.6.1",
|
|
19
|
-
"@masterteam/forms": "^0.0.173",
|
|
20
19
|
"@masterteam/dashboard-builder": "^0.0.115",
|
|
20
|
+
"@masterteam/data-table": "^0.0.8",
|
|
21
|
+
"@masterteam/forms": "^0.0.173",
|
|
21
22
|
"@masterteam/icons": "^0.0.17",
|
|
22
|
-
"@masterteam/
|
|
23
|
-
"@masterteam/
|
|
24
|
-
"@masterteam/data-table": "^0.0.6"
|
|
23
|
+
"@masterteam/data-grid": "^0.0.5",
|
|
24
|
+
"@masterteam/components": "^0.0.339"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"tslib": "^2.8.1"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { OnDestroy } from '@angular/core';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
3
4
|
import * as _masterteam_components_entities from '@masterteam/components/entities';
|
|
4
5
|
import { EntityRuntimeContext, EntityData, EntityViewType, EntityCalculationStatus } from '@masterteam/components/entities';
|
|
5
|
-
import { Observable } from 'rxjs';
|
|
6
6
|
|
|
7
7
|
interface ClientInstancePreviewConfig {
|
|
8
8
|
contextKey: string;
|
|
@@ -137,6 +137,7 @@ declare class ClientInstancePreview implements OnDestroy {
|
|
|
137
137
|
private readonly clientInstancePreviewApiService;
|
|
138
138
|
private readonly transloco;
|
|
139
139
|
private readonly runtimeContextStore;
|
|
140
|
+
private readonly calculationHistory;
|
|
140
141
|
private loadSub?;
|
|
141
142
|
readonly config: _angular_core.InputSignal<ClientInstancePreviewConfig>;
|
|
142
143
|
/** When true, suppresses the "No preview data" empty-state placeholder so the host can collapse. */
|
|
@@ -154,6 +155,11 @@ declare class ClientInstancePreview implements OnDestroy {
|
|
|
154
155
|
readonly error: _angular_core.WritableSignal<string | null>;
|
|
155
156
|
readonly response: _angular_core.WritableSignal<PreviewResponse | null>;
|
|
156
157
|
private readonly mappedEntities;
|
|
158
|
+
/**
|
|
159
|
+
* The `CalculatedValueHistory` scope of this preview: previews of a context
|
|
160
|
+
* compare with each other, never with a list's read of the same record.
|
|
161
|
+
*/
|
|
162
|
+
private readonly calculationScope;
|
|
157
163
|
readonly entities: _angular_core.Signal<EntityData[]>;
|
|
158
164
|
/**
|
|
159
165
|
* Name of the schema the loaded record belongs to — the level name for a
|
|
@@ -174,6 +180,12 @@ declare class ClientInstancePreview implements OnDestroy {
|
|
|
174
180
|
private readonly runtimeContext;
|
|
175
181
|
constructor();
|
|
176
182
|
load(config: ClientInstancePreviewConfig): void;
|
|
183
|
+
/**
|
|
184
|
+
* Refetches the record in place: the fields stay on screen, without the
|
|
185
|
+
* skeleton `load()` shows, and calculated values that moved say so. The
|
|
186
|
+
* caller subscribes and owns the errors.
|
|
187
|
+
*/
|
|
188
|
+
refresh(): Observable<PreviewResponse | null>;
|
|
177
189
|
ngOnDestroy(): void;
|
|
178
190
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClientInstancePreview, never>;
|
|
179
191
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ClientInstancePreview, "mt-client-instance-preview", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; "hideEmptyState": { "alias": "hideEmptyState"; "required": false; "isSignal": true; }; "stackOnNarrow": { "alias": "stackOnNarrow"; "required": false; "isSignal": true; }; "calculation": { "alias": "calculation"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -435,6 +435,8 @@ interface ClientListFetchPropertyMeta {
|
|
|
435
435
|
order: number;
|
|
436
436
|
isRequired?: boolean;
|
|
437
437
|
isSystem?: boolean;
|
|
438
|
+
isCalculated?: boolean;
|
|
439
|
+
calculationMethod?: string | null;
|
|
438
440
|
}
|
|
439
441
|
interface ClientListFetchValueCell {
|
|
440
442
|
raw: unknown;
|
|
@@ -797,6 +799,7 @@ interface ClientListLazyLoadEvent {
|
|
|
797
799
|
|
|
798
800
|
declare class ClientListStateService {
|
|
799
801
|
private readonly transloco;
|
|
802
|
+
private readonly calculationHistory;
|
|
800
803
|
readonly itemsByKey: _angular_core.WritableSignal<Record<string, ClientListState>>;
|
|
801
804
|
readonly items: _angular_core.Signal<ClientListState[]>;
|
|
802
805
|
setConfigs(configs: ClientListState[]): void;
|
|
@@ -876,6 +879,12 @@ declare class ClientListStateService {
|
|
|
876
879
|
private orderRecords;
|
|
877
880
|
private resolvePrimarySchema;
|
|
878
881
|
private toEntityData;
|
|
882
|
+
/**
|
|
883
|
+
* Hands the calculated values just read to the session history, which notes
|
|
884
|
+
* those that moved since a list of this context last read them.
|
|
885
|
+
*/
|
|
886
|
+
private observeRows;
|
|
887
|
+
private observeCards;
|
|
879
888
|
/** Active UI language for resolving localized display labels. */
|
|
880
889
|
private resolveActiveLang;
|
|
881
890
|
private createPropertyMaps;
|
|
@@ -889,6 +898,8 @@ declare class ClientListStateService {
|
|
|
889
898
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ClientListStateService>;
|
|
890
899
|
}
|
|
891
900
|
|
|
901
|
+
/** Above this many changed records a background refresh reloads the page. */
|
|
902
|
+
declare const MAX_BACKGROUND_REFRESH_RECORDS = 10;
|
|
892
903
|
declare class ClientList implements OnDestroy {
|
|
893
904
|
private readonly api;
|
|
894
905
|
protected readonly state: ClientListStateService;
|
|
@@ -921,6 +932,8 @@ declare class ClientList implements OnDestroy {
|
|
|
921
932
|
private readonly requestPropertyKeys;
|
|
922
933
|
/** Single-record read-backs, kept apart from the page loads they must not cancel. */
|
|
923
934
|
private readonly recordSubscriptions;
|
|
935
|
+
/** Background refreshes from {@link refreshRecords}; several may overlap. */
|
|
936
|
+
private readonly refreshSubscriptions;
|
|
924
937
|
constructor();
|
|
925
938
|
onLazyLoad(itemKey: string, event: ClientListLazyLoadEvent): void;
|
|
926
939
|
/**
|
|
@@ -966,6 +979,14 @@ declare class ClientList implements OnDestroy {
|
|
|
966
979
|
* record, so an insert lands at the top of the page in view.
|
|
967
980
|
*/
|
|
968
981
|
applyWriteResult(itemKey: string, result: ClientListRecordWriteResult | null | undefined): void;
|
|
982
|
+
/**
|
|
983
|
+
* Reads records the backend changed on its own back into the list, without
|
|
984
|
+
* the loading state of a reload: values it recalculated after a save
|
|
985
|
+
* elsewhere. Only records the list already shows are read; a record it does
|
|
986
|
+
* not hold is not added. More than {@link MAX_BACKGROUND_REFRESH_RECORDS}
|
|
987
|
+
* records, or a hierarchy table, reload the page instead.
|
|
988
|
+
*/
|
|
989
|
+
refreshRecords(itemKey: string, recordIds: readonly number[]): void;
|
|
969
990
|
/**
|
|
970
991
|
* Drops a deleted record from the list in place. Falls back to a reload when
|
|
971
992
|
* the record is not part of the loaded set, so a stale list still corrects
|
|
@@ -1291,5 +1312,5 @@ declare class ClientListToolbarService {
|
|
|
1291
1312
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ClientListToolbarService>;
|
|
1292
1313
|
}
|
|
1293
1314
|
|
|
1294
|
-
export { CLIENT_LIST_DEFAULT_INCLUDE_STATE, CLIENT_LIST_RECORD_ID_FILTER_KEY, CLIENT_LIST_RECORD_SOURCE_KEY, CLIENT_LIST_RECORD_STATE_KEY, ClientList, ClientListApiService, ClientListRuntimeActionsService, ClientListStateService, ClientListToolbarService, defaultResolveRecordId, findClientListSourceGroup, findClientListTotal, isClientListTotalIncomplete, readClientListRowSource };
|
|
1315
|
+
export { CLIENT_LIST_DEFAULT_INCLUDE_STATE, CLIENT_LIST_RECORD_ID_FILTER_KEY, CLIENT_LIST_RECORD_SOURCE_KEY, CLIENT_LIST_RECORD_STATE_KEY, ClientList, ClientListApiService, ClientListRuntimeActionsService, ClientListStateService, ClientListToolbarService, MAX_BACKGROUND_REFRESH_RECORDS, defaultResolveRecordId, findClientListSourceGroup, findClientListTotal, isClientListTotalIncomplete, readClientListRowSource };
|
|
1295
1316
|
export type { ClientListAreaType, ClientListBaseConfiguration, ClientListBaseState, ClientListCard, ClientListCardIndicator, ClientListCardIndicatorsResolver, ClientListCardModule, ClientListCardProperty, ClientListCardsPayload, ClientListCardsState, ClientListClickableItem, ClientListCollapseConfig, ClientListConfiguration, ClientListContentTemplateContext, ClientListDataLoadedHandler, ClientListFetchCardDisplayOrderItem, ClientListFetchCardGroup, ClientListFetchCatalog, ClientListFetchHierarchyScope, ClientListFetchProjection, ClientListFetchProjectionMeta, ClientListFetchPropertyMeta, ClientListFetchQueryRequest, ClientListFetchQueryResponse, ClientListFetchRecord, ClientListFetchRecordSource, ClientListFetchRecordState, ClientListFetchRequestDisplay, ClientListFetchRequestFilter, ClientListFetchSchema, ClientListFetchSourceGroup, ClientListFetchStateKey, ClientListFetchSum, ClientListFetchTableColumn, ClientListFetchValueCell, ClientListFormConfiguration, ClientListInformativeChartLink, ClientListInformativeConfiguration, ClientListInformativeDashboardPayload, ClientListInformativeSelectionFilterInjection, ClientListInformativeState, ClientListItemClickedEvent, ClientListLayoutConfig, ClientListLazyLoadEvent, ClientListMode, ClientListRecordEscalationState, ClientListRecordProjectionStatus, ClientListRecordWriteResult, ClientListReturnRecordRequest, ClientListRowsFetchResult, ClientListRuntimeContext, ClientListRuntimeRecordActionsConfig, ClientListRuntimeRecordActionsContext, ClientListState, ClientListTableDisplayConfig, ClientListTablePersistStateKey, ClientListTableQuery, ClientListTableSettingsCatalogResponse, ClientListTableSettingsColumn, ClientListTableState, ClientListTableTransform, ClientListTableTransformResult, ClientListToolbarBucket, ClientListToolbarDefaults, ClientListType, NormalizedClientListConfiguration, NormalizedClientListTableDisplayConfig, Response, RuntimeEntityColumnDef, RuntimeTableDisplayRow, RuntimeTableRowsResponse };
|