@masterteam/work-center 0.0.91 → 0.0.93

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/work-center",
3
- "version": "0.0.91",
3
+ "version": "0.0.93",
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.308",
24
- "@masterteam/icons": "^0.0.17",
23
+ "@masterteam/client-components": "^0.0.103",
24
+ "@masterteam/discussion": "^0.0.26",
25
+ "@masterteam/forms": "^0.0.167",
25
26
  "@masterteam/structure-builder": "^0.0.64",
26
- "@masterteam/client-components": "^0.0.99",
27
- "@masterteam/forms": "^0.0.161",
28
- "@masterteam/discussion": "^0.0.26"
27
+ "@masterteam/components": "^0.0.321",
28
+ "@masterteam/icons": "^0.0.17"
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[];
@@ -421,6 +424,14 @@ declare class WorkCenterPage {
421
424
  onMenuItemClick(item: ClientPageMenuItem): void;
422
425
  onRuntimeFiltersApplied(filters: PropertyFilterBuilderRule[]): void;
423
426
  onRuntimeFiltersCleared(): void;
427
+ /**
428
+ * "Clear filters" on the table's empty state. The table has already reset
429
+ * its search term and column filters; with header filters active it left
430
+ * the reload to us, so clear through the same path as the header builder's
431
+ * own Clear — one request, the builder badge and the host URL included.
432
+ * Without header filters the table's `lazyLoad` already covered it.
433
+ */
434
+ onEmptyStateFiltersCleared(): void;
424
435
  /**
425
436
  * Single entry point for `mt-table` (`lazy=true`) — handles both column
426
437
  * filters and pagination/sort. Filter changes always reset the page to 1
@@ -604,6 +615,46 @@ interface WorkCenterTypeComponentInputs {
604
615
  */
605
616
  declare const WORK_CENTER_TYPE_COMPONENTS: InjectionToken<Record<string, Type<unknown>>>;
606
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
+
607
658
  /**
608
659
  * work-center-schedule-publish.models.ts - The wire shape of the published-vs-draft
609
660
  * comparison an approver acts on.
@@ -1098,5 +1149,5 @@ declare class WorkCenterState {
1098
1149
 
1099
1150
  declare const APP_STATES: (typeof WorkCenterState)[];
1100
1151
 
1101
- 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 };
1102
- 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 };