@masterteam/work-center 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/fesm2022/{masterteam-work-center-work-center-process-preview-CMPv-pvC.mjs → masterteam-work-center-work-center-process-preview-jbm4vnuM.mjs} +2 -2
- package/fesm2022/{masterteam-work-center-work-center-process-preview-CMPv-pvC.mjs.map → masterteam-work-center-work-center-process-preview-jbm4vnuM.mjs.map} +1 -1
- package/fesm2022/masterteam-work-center.mjs +102 -13
- package/fesm2022/masterteam-work-center.mjs.map +1 -1
- package/package.json +6 -6
- package/types/masterteam-work-center.d.ts +46 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@masterteam/work-center",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.94",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"directory": "../../../dist/masterteam/work-center",
|
|
6
6
|
"linkDirectory": false,
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"rxjs": "^7.8.2",
|
|
21
21
|
"tailwindcss": "^4.2.2",
|
|
22
22
|
"tailwindcss-primeui": "^0.6.1",
|
|
23
|
-
"@masterteam/components": "^0.0.
|
|
24
|
-
"@masterteam/discussion": "^0.0.26",
|
|
25
|
-
"@masterteam/client-components": "^0.0.101",
|
|
26
|
-
"@masterteam/structure-builder": "^0.0.64",
|
|
23
|
+
"@masterteam/components": "^0.0.325",
|
|
27
24
|
"@masterteam/icons": "^0.0.17",
|
|
28
|
-
"@masterteam/
|
|
25
|
+
"@masterteam/client-components": "^0.0.104",
|
|
26
|
+
"@masterteam/forms": "^0.0.168",
|
|
27
|
+
"@masterteam/structure-builder": "^0.0.64",
|
|
28
|
+
"@masterteam/discussion": "^0.0.26"
|
|
29
29
|
},
|
|
30
30
|
"sideEffects": false,
|
|
31
31
|
"exports": {
|
|
@@ -12,9 +12,10 @@ import { LoadingStateShape } from '@masterteam/components';
|
|
|
12
12
|
import { ModalRef } from '@masterteam/components/dialog';
|
|
13
13
|
import { DrawerController } from '@masterteam/components/dynamic-drawer';
|
|
14
14
|
import { ModalService } from '@masterteam/components/modal';
|
|
15
|
+
import * as rxjs from 'rxjs';
|
|
16
|
+
import { Observable } from 'rxjs';
|
|
15
17
|
import { ClientInstancePreviewConfig } from '@masterteam/client-components/client-instance-preview';
|
|
16
18
|
import { EntityData } from '@masterteam/components/entities';
|
|
17
|
-
import * as rxjs from 'rxjs';
|
|
18
19
|
import * as _masterteam_components_types_masterteam_components_statistic_card from '@masterteam/components/types/masterteam-components-statistic-card';
|
|
19
20
|
import * as _masterteam_components_types_masterteam_components_table from '@masterteam/components/types/masterteam-components-table';
|
|
20
21
|
import * as _masterteam_components_types_masterteam_components_client_page_menu from '@masterteam/components/types/masterteam-components-client-page-menu';
|
|
@@ -355,6 +356,8 @@ declare class WorkCenterPage {
|
|
|
355
356
|
subtitle: string;
|
|
356
357
|
icon: string;
|
|
357
358
|
title: string;
|
|
359
|
+
caption?: string;
|
|
360
|
+
section?: string;
|
|
358
361
|
color: string;
|
|
359
362
|
key: string;
|
|
360
363
|
children?: ClientPageMenuItem[];
|
|
@@ -612,6 +615,46 @@ interface WorkCenterTypeComponentInputs {
|
|
|
612
615
|
*/
|
|
613
616
|
declare const WORK_CENTER_TYPE_COMPONENTS: InjectionToken<Record<string, Type<unknown>>>;
|
|
614
617
|
|
|
618
|
+
/**
|
|
619
|
+
* What a host action handler receives: the clicked footer action plus the
|
|
620
|
+
* item it was resolved for (`GET workcenter/runtime/item-actions`).
|
|
621
|
+
*/
|
|
622
|
+
interface WorkCenterActionHandlerContext {
|
|
623
|
+
action: WorkCenterRuntimeItemAction;
|
|
624
|
+
type: string | null;
|
|
625
|
+
context: Record<string, unknown> | null;
|
|
626
|
+
}
|
|
627
|
+
/**
|
|
628
|
+
* Runs a footer action in place of the built-in execution. Called in the
|
|
629
|
+
* footer's injection context, so it can `inject()` (ModalService, a facade,
|
|
630
|
+
* `DestroyRef`, ...).
|
|
631
|
+
*
|
|
632
|
+
* Resolves `true` when the action wrote something: the footer then reloads its
|
|
633
|
+
* actions and emits `actionExecuted` (`afterSuccess: 'refresh'`) exactly like a
|
|
634
|
+
* built-in action. `false` means dismissed, nothing to refresh.
|
|
635
|
+
*/
|
|
636
|
+
type WorkCenterActionHandler = (ctx: WorkCenterActionHandlerContext) => Observable<boolean> | Promise<boolean> | boolean;
|
|
637
|
+
/**
|
|
638
|
+
* Host-side override for Work Center footer actions, keyed by
|
|
639
|
+
* `<itemType>:<actionKey>` (e.g. `KpiMeasure:UpdateValue`). Keys match
|
|
640
|
+
* case-insensitively and ignore spaces/`_`/`-`, the same normalisation the
|
|
641
|
+
* footer already applies to `type` and `actionKey`.
|
|
642
|
+
*
|
|
643
|
+
* The footer still owns the button — its label, visibility and `isAvailable`
|
|
644
|
+
* stay backend-driven; only what happens on click moves to the host. Strictly
|
|
645
|
+
* additive: an unregistered action runs through the built-in paths unchanged.
|
|
646
|
+
*
|
|
647
|
+
* @example
|
|
648
|
+
* providers: [
|
|
649
|
+
* {
|
|
650
|
+
* provide: WORK_CENTER_ACTION_HANDLERS,
|
|
651
|
+
* useValue: { 'KpiMeasure:UpdateValue': openKpiUpdateValue },
|
|
652
|
+
* },
|
|
653
|
+
* ]
|
|
654
|
+
*/
|
|
655
|
+
declare const WORK_CENTER_ACTION_HANDLERS: InjectionToken<Record<string, WorkCenterActionHandler>>;
|
|
656
|
+
declare function resolveWorkCenterActionHandler(handlers: Record<string, WorkCenterActionHandler> | null, type: string | null | undefined, actionKey: string | null | undefined): WorkCenterActionHandler | null;
|
|
657
|
+
|
|
615
658
|
/**
|
|
616
659
|
* work-center-schedule-publish.models.ts - The wire shape of the published-vs-draft
|
|
617
660
|
* comparison an approver acts on.
|
|
@@ -1106,5 +1149,5 @@ declare class WorkCenterState {
|
|
|
1106
1149
|
|
|
1107
1150
|
declare const APP_STATES: (typeof WorkCenterState)[];
|
|
1108
1151
|
|
|
1109
|
-
export { APP_STATES, ApplyColumnFilters, ApplyHeaderFilters, ClearAllFilters, EnterArea, HydrateFromContext, LoadRuntime, SCHEDULE_PUBLISH_GROUP_ORDER, SCHEDULE_PUBLISH_OPERATION_KEY, SelectCard, SetGroupBy, SetLookups, SetParams, WORK_CENTER_EMPTY_LABEL, WORK_CENTER_GROUP_NONE, WORK_CENTER_LEVEL_GROUP_FIELD, WORK_CENTER_LEVEL_NAME_KEY, WORK_CENTER_MAX_FILTERS, WORK_CENTER_MAX_PAGE_SIZE, WORK_CENTER_MAX_SORT, WORK_CENTER_QUERY_VERSION, WORK_CENTER_TYPE_COMPONENTS, WorkCenterActionKey, WorkCenterClientFormModal, WorkCenterFacade, WorkCenterItemModal, WorkCenterItemModalRoute, WorkCenterPage, WorkCenterSchedulePublishType, WorkCenterState, decodeWorkCenterRouteContextKey, encodeWorkCenterRouteContextKey, groupSchedulePublishRows, isSchedulePublishConflictRow, matchesSchedulePublishSearch, parseSchedulePublishChangedFields, readSchedulePublishChanges, schedulePublishRowKey, sortSchedulePublishRows, summarizeSchedulePublish, windowSchedulePublishRows };
|
|
1110
|
-
export type { ApiEnvelope, SchedulePublishDiff, SchedulePublishDiffRow, SchedulePublishFieldChange, SchedulePublishFormLoadResponse, SchedulePublishGroup, SchedulePublishGroupKey, SchedulePublishState, SchedulePublishSummary, TranslatableDto, WorkCenterArea, WorkCenterAreaState, WorkCenterBootstrapInputs, WorkCenterClientFormModalData, WorkCenterClientFormModalOptions, WorkCenterColumnsConfig, WorkCenterContext, WorkCenterFilterOperator, WorkCenterFilterRule, WorkCenterHydratePatch, WorkCenterItemActionAfterSuccess, WorkCenterItemActionExecutionResult, WorkCenterItemActionsData, WorkCenterItemBasicInfoData, WorkCenterItemContextKey, WorkCenterItemModalComponentInput, WorkCenterItemModalOptions, WorkCenterLoadReason, WorkCenterLookups, WorkCenterPreviewLevelTarget, WorkCenterRuntimeCard, WorkCenterRuntimeFilterSchema, WorkCenterRuntimeItemAction, WorkCenterRuntimeOperatorOption, WorkCenterRuntimePagination, WorkCenterRuntimeProperty, WorkCenterRuntimeRequest, WorkCenterRuntimeResponseData, WorkCenterRuntimeSelectedCard, WorkCenterRuntimeStatsItem, WorkCenterRuntimeWarningDto, WorkCenterSortRule, WorkCenterStateModel, WorkCenterTypeComponentInputs };
|
|
1152
|
+
export { APP_STATES, ApplyColumnFilters, ApplyHeaderFilters, ClearAllFilters, EnterArea, HydrateFromContext, LoadRuntime, SCHEDULE_PUBLISH_GROUP_ORDER, SCHEDULE_PUBLISH_OPERATION_KEY, SelectCard, SetGroupBy, SetLookups, SetParams, WORK_CENTER_ACTION_HANDLERS, WORK_CENTER_EMPTY_LABEL, WORK_CENTER_GROUP_NONE, WORK_CENTER_LEVEL_GROUP_FIELD, WORK_CENTER_LEVEL_NAME_KEY, WORK_CENTER_MAX_FILTERS, WORK_CENTER_MAX_PAGE_SIZE, WORK_CENTER_MAX_SORT, WORK_CENTER_QUERY_VERSION, WORK_CENTER_TYPE_COMPONENTS, WorkCenterActionKey, WorkCenterClientFormModal, WorkCenterFacade, WorkCenterItemModal, WorkCenterItemModalRoute, WorkCenterPage, WorkCenterSchedulePublishType, WorkCenterState, decodeWorkCenterRouteContextKey, encodeWorkCenterRouteContextKey, groupSchedulePublishRows, isSchedulePublishConflictRow, matchesSchedulePublishSearch, parseSchedulePublishChangedFields, readSchedulePublishChanges, resolveWorkCenterActionHandler, schedulePublishRowKey, sortSchedulePublishRows, summarizeSchedulePublish, windowSchedulePublishRows };
|
|
1153
|
+
export type { ApiEnvelope, SchedulePublishDiff, SchedulePublishDiffRow, SchedulePublishFieldChange, SchedulePublishFormLoadResponse, SchedulePublishGroup, SchedulePublishGroupKey, SchedulePublishState, SchedulePublishSummary, TranslatableDto, WorkCenterActionHandler, WorkCenterActionHandlerContext, WorkCenterArea, WorkCenterAreaState, WorkCenterBootstrapInputs, WorkCenterClientFormModalData, WorkCenterClientFormModalOptions, WorkCenterColumnsConfig, WorkCenterContext, WorkCenterFilterOperator, WorkCenterFilterRule, WorkCenterHydratePatch, WorkCenterItemActionAfterSuccess, WorkCenterItemActionExecutionResult, WorkCenterItemActionsData, WorkCenterItemBasicInfoData, WorkCenterItemContextKey, WorkCenterItemModalComponentInput, WorkCenterItemModalOptions, WorkCenterLoadReason, WorkCenterLookups, WorkCenterPreviewLevelTarget, WorkCenterRuntimeCard, WorkCenterRuntimeFilterSchema, WorkCenterRuntimeItemAction, WorkCenterRuntimeOperatorOption, WorkCenterRuntimePagination, WorkCenterRuntimeProperty, WorkCenterRuntimeRequest, WorkCenterRuntimeResponseData, WorkCenterRuntimeSelectedCard, WorkCenterRuntimeStatsItem, WorkCenterRuntimeWarningDto, WorkCenterSortRule, WorkCenterStateModel, WorkCenterTypeComponentInputs };
|