@masterteam/client-components 0.0.92 → 0.0.94

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masterteam/client-components",
3
- "version": "0.0.92",
3
+ "version": "0.0.94",
4
4
  "publishConfig": {
5
5
  "directory": "../../../dist/masterteam/client-components",
6
6
  "linkDirectory": true,
@@ -16,10 +16,10 @@
16
16
  "rxjs": "^7.8.2",
17
17
  "tailwindcss": "^4.2.2",
18
18
  "tailwindcss-primeui": "^0.6.1",
19
- "@masterteam/forms": "^0.0.150",
20
19
  "@masterteam/dashboard-builder": "^0.0.88",
20
+ "@masterteam/components": "^0.0.292",
21
21
  "@masterteam/icons": "^0.0.17",
22
- "@masterteam/components": "^0.0.287"
22
+ "@masterteam/forms": "^0.0.152"
23
23
  },
24
24
  "dependencies": {
25
25
  "tslib": "^2.8.1"
@@ -1,7 +1,7 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { OnDestroy } from '@angular/core';
3
3
  import * as _masterteam_components_entities from '@masterteam/components/entities';
4
- import { EntityViewType, EntityData } from '@masterteam/components/entities';
4
+ import { EntityData, EntityViewType } from '@masterteam/components/entities';
5
5
  import { Observable } from 'rxjs';
6
6
 
7
7
  interface ClientInstancePreviewConfig {
@@ -9,7 +9,14 @@ interface ClientInstancePreviewConfig {
9
9
  instanceId: number;
10
10
  displayAreas?: string[];
11
11
  processRequestId?: number;
12
+ /**
13
+ * Optional host projection applied after the preview response is converted
14
+ * to renderable entities. Use it to merge or derive presentation-only
15
+ * fields without changing the fetched record or the saved display config.
16
+ */
17
+ transformEntities?: ClientInstancePreviewEntityTransform;
12
18
  }
19
+ type ClientInstancePreviewEntityTransform = (entities: EntityData[], response: PreviewResponse) => EntityData[];
13
20
  interface Response<T> {
14
21
  endpoint: string;
15
22
  status: number;
@@ -36,6 +43,14 @@ interface PreviewFetchValueCell {
36
43
  raw: unknown;
37
44
  value: unknown;
38
45
  display?: string | null;
46
+ /**
47
+ * The colour the backend resolved for this value. See `EntityData.color`.
48
+ *
49
+ * Declared explicitly even though the index signature below would admit it:
50
+ * left undeclared it was silently dropped by the mapper, and nothing could
51
+ * flag that because `unknown` is assignable from anything.
52
+ */
53
+ color?: string | null;
39
54
  comparison?: _masterteam_components_entities.PropertyValueComparison;
40
55
  [key: string]: unknown;
41
56
  }
@@ -127,4 +142,4 @@ declare class ClientInstancePreviewApiService {
127
142
  }
128
143
 
129
144
  export { ClientInstancePreview, ClientInstancePreviewApiService };
130
- export type { ClientInstancePreviewConfig, DisplayConfiguration, PreviewFetchCatalog, PreviewFetchPropertyMeta, PreviewFetchRecord, PreviewFetchRecordResponse, PreviewFetchSchema, PreviewFetchValueCell, PreviewResponse, Response };
145
+ export type { ClientInstancePreviewConfig, ClientInstancePreviewEntityTransform, DisplayConfiguration, PreviewFetchCatalog, PreviewFetchPropertyMeta, PreviewFetchRecord, PreviewFetchRecordResponse, PreviewFetchSchema, PreviewFetchValueCell, PreviewResponse, Response };
@@ -252,8 +252,32 @@ interface ClientListInformativeConfiguration extends ClientListBaseConfiguration
252
252
  instanceId?: number;
253
253
  /** Complete filter array converted by key/value to dashboard extraFilters. */
254
254
  filters?: ClientListFetchRequestFilter[];
255
+ /**
256
+ * Runtime-only filters injected into matching dashboard selections.
257
+ *
258
+ * Use this for authoritative host scope that must still work when an older
259
+ * saved chart does not contain a placeholder such as `{{currentId}}`.
260
+ * Matching is by the selection selector (`<target.type>:<target.id>`). An
261
+ * existing filter with the same property key is replaced; otherwise the
262
+ * filter is appended. The saved dashboard configuration is never mutated.
263
+ */
264
+ selectionFilterInjections?: ClientListInformativeSelectionFilterInjection[];
255
265
  areaType?: 'table';
256
266
  }
267
+ interface ClientListInformativeSelectionFilterInjection {
268
+ target: {
269
+ type: string;
270
+ id: string | number;
271
+ };
272
+ filter: {
273
+ propertyKey: string;
274
+ propertyValue: unknown;
275
+ operation?: string;
276
+ logical?: string;
277
+ operationLevel?: number | null;
278
+ [key: string]: unknown;
279
+ };
280
+ }
257
281
  type ClientListConfiguration = ClientListFormConfiguration | ClientListInformativeConfiguration;
258
282
  interface ClientListCollapseConfig {
259
283
  enabled?: boolean;
@@ -385,6 +409,16 @@ interface ClientListFetchValueCell {
385
409
  raw: unknown;
386
410
  value: unknown;
387
411
  display?: string | null;
412
+ /**
413
+ * The colour the backend resolved for this value — a Percentage's band
414
+ * colour, or the colour its `colorSource: 'property'` configuration took
415
+ * from a sibling property on this record.
416
+ *
417
+ * Declared explicitly even though the index signature below would admit it:
418
+ * left undeclared it was silently dropped by every mapper, and nothing could
419
+ * flag that because `unknown` is assignable from anything.
420
+ */
421
+ color?: string | null;
388
422
  comparison?: _masterteam_components_entities.PropertyValueComparison;
389
423
  [key: string]: unknown;
390
424
  }
@@ -647,6 +681,7 @@ interface NormalizedClientListConfiguration {
647
681
  contextKey: ClientListRuntimeContext | null;
648
682
  instanceId: number | null;
649
683
  filters: ClientListFetchRequestFilter[];
684
+ selectionFilterInjections: ClientListInformativeSelectionFilterInjection[];
650
685
  /** Null unless the host asked for descendant scope on a table. */
651
686
  hierarchy: ClientListFetchHierarchyScope | null;
652
687
  levelId: number | null;
@@ -1118,4 +1153,4 @@ declare class ClientListToolbarService {
1118
1153
  }
1119
1154
 
1120
1155
  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 };
1121
- export type { ClientListAreaType, ClientListBaseConfiguration, ClientListBaseState, ClientListCard, 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, 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 };
1156
+ export type { ClientListAreaType, ClientListBaseConfiguration, ClientListBaseState, ClientListCard, 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 };