@masterteam/client-components 0.0.101 → 0.0.103
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 +5 -2
- package/fesm2022/masterteam-client-components-client-instance-preview.mjs.map +1 -1
- package/fesm2022/masterteam-client-components-client-list.mjs +35 -8
- package/fesm2022/masterteam-client-components-client-list.mjs.map +1 -1
- package/package.json +4 -4
- package/types/masterteam-client-components-client-list.d.ts +31 -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.103",
|
|
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/
|
|
20
|
-
"@masterteam/components": "^0.0.312",
|
|
19
|
+
"@masterteam/components": "^0.0.317",
|
|
21
20
|
"@masterteam/icons": "^0.0.17",
|
|
22
|
-
"@masterteam/dashboard-builder": "^0.0.
|
|
21
|
+
"@masterteam/dashboard-builder": "^0.0.101",
|
|
22
|
+
"@masterteam/forms": "^0.0.164"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"tslib": "^2.8.1"
|
|
@@ -5,6 +5,7 @@ import * as _masterteam_components_entities from '@masterteam/components/entitie
|
|
|
5
5
|
import { EntityData, EntityConfiguration } from '@masterteam/components/entities';
|
|
6
6
|
import { DashboardBuilderData } from '@masterteam/dashboard-builder';
|
|
7
7
|
import { RuntimeAction } from '@masterteam/components/runtime-action';
|
|
8
|
+
import { MTIcon } from '@masterteam/icons';
|
|
8
9
|
import { Observable } from 'rxjs';
|
|
9
10
|
|
|
10
11
|
type ClientListMode = 'auto' | 'override';
|
|
@@ -257,6 +258,13 @@ interface ClientListFormConfiguration extends ClientListBaseConfiguration {
|
|
|
257
258
|
* the card face keeps rendering its own layout and never shows them.
|
|
258
259
|
*/
|
|
259
260
|
transformResult?: ClientListTableTransform;
|
|
261
|
+
/**
|
|
262
|
+
* `areaType: 'cards'` only — host hook that puts small status icons with a
|
|
263
|
+
* tooltip on a card, next to its 3-dots menu (e.g. a lock for a locked KPI).
|
|
264
|
+
* Leave it out and no card shows an indicator. See
|
|
265
|
+
* {@link ClientListCardIndicatorsResolver}.
|
|
266
|
+
*/
|
|
267
|
+
cardIndicators?: ClientListCardIndicatorsResolver;
|
|
260
268
|
}
|
|
261
269
|
interface ClientListInformativeConfiguration extends ClientListBaseConfiguration {
|
|
262
270
|
type: 'informative';
|
|
@@ -637,6 +645,27 @@ interface ClientListCard {
|
|
|
637
645
|
*/
|
|
638
646
|
source?: ClientListFetchRecordSource | null;
|
|
639
647
|
}
|
|
648
|
+
/** One status icon on a card's top-end corner, explained by its tooltip. */
|
|
649
|
+
interface ClientListCardIndicator {
|
|
650
|
+
icon: MTIcon;
|
|
651
|
+
/** Already-translated text, shown on hover/focus and read by screen readers. */
|
|
652
|
+
tooltip: string;
|
|
653
|
+
/** Any CSS colour; defaults to the muted grey of the 3-dots trigger. */
|
|
654
|
+
color?: string;
|
|
655
|
+
}
|
|
656
|
+
/**
|
|
657
|
+
* Decides which indicators a card shows. Receives the card and its row
|
|
658
|
+
* representation (`{ Id, [entityKey]: EntityData, ...displayProperties }`), so
|
|
659
|
+
* it can read the card's own entities, `state`, `source` or host-derived
|
|
660
|
+
* `displayProperties`.
|
|
661
|
+
*
|
|
662
|
+
* Runs inside a `computed`: signals the resolver reads (e.g. a lookup the host
|
|
663
|
+
* loaded from another API) are tracked, and the indicators update when they
|
|
664
|
+
* change. Return an empty array, `null` or `undefined` for none. Keep it pure
|
|
665
|
+
* and cheap — it runs once per card whenever the board or a tracked signal
|
|
666
|
+
* changes.
|
|
667
|
+
*/
|
|
668
|
+
type ClientListCardIndicatorsResolver = (card: ClientListCard, row: RuntimeTableDisplayRow) => readonly ClientListCardIndicator[] | null | undefined;
|
|
640
669
|
type ClientListCardsPayload = ClientListFetchQueryResponse;
|
|
641
670
|
interface ClientListInformativeChartLink {
|
|
642
671
|
id?: number;
|
|
@@ -739,6 +768,7 @@ interface NormalizedClientListConfiguration {
|
|
|
739
768
|
dataLoaded?: ClientListDataLoadedHandler;
|
|
740
769
|
runtimeRecordActions?: ClientListRuntimeRecordActionsConfig;
|
|
741
770
|
transformResult?: ClientListTableTransform;
|
|
771
|
+
cardIndicators?: ClientListCardIndicatorsResolver;
|
|
742
772
|
}
|
|
743
773
|
interface ClientListContentTemplateContext {
|
|
744
774
|
$implicit: ClientListState;
|
|
@@ -1246,4 +1276,4 @@ declare class ClientListToolbarService {
|
|
|
1246
1276
|
}
|
|
1247
1277
|
|
|
1248
1278
|
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 };
|
|
1249
|
-
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 };
|
|
1279
|
+
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 };
|