@masterteam/work-center 0.0.98 → 0.0.99

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.98",
3
+ "version": "0.0.99",
4
4
  "publishConfig": {
5
5
  "directory": "../../../dist/masterteam/work-center",
6
6
  "linkDirectory": false,
@@ -20,14 +20,12 @@
20
20
  "rxjs": "^7.8.2",
21
21
  "tailwindcss": "^4.2.2",
22
22
  "tailwindcss-primeui": "^0.6.1",
23
- "@masterteam/data-table": "^0.0.1",
24
- "@masterteam/forms": "^0.0.170",
25
- "@masterteam/data-grid": "^0.0.1",
26
- "@masterteam/components": "^0.0.330",
27
- "@masterteam/client-components": "^0.0.105",
23
+ "@masterteam/components": "^0.0.331",
28
24
  "@masterteam/discussion": "^0.0.26",
29
- "@masterteam/icons": "^0.0.17",
30
- "@masterteam/structure-builder": "^0.0.64"
25
+ "@masterteam/client-components": "^0.0.107",
26
+ "@masterteam/forms": "^0.0.171",
27
+ "@masterteam/structure-builder": "^0.0.64",
28
+ "@masterteam/icons": "^0.0.17"
31
29
  },
32
30
  "sideEffects": false,
33
31
  "exports": {
@@ -1,6 +1,7 @@
1
+ import * as _masterteam_components_table from '@masterteam/components/table';
2
+ import { ColumnDef, TableFilters, TablePersistStateKey } from '@masterteam/components/table';
1
3
  import * as _masterteam_components_statistic_card from '@masterteam/components/statistic-card';
2
4
  import { StatisticCardData } from '@masterteam/components/statistic-card';
3
- import * as _masterteam_components_types_masterteam_components_table from '@masterteam/components/types/masterteam-components-table';
4
5
  import * as _masterteam_work_center from '@masterteam/work-center';
5
6
  import * as _angular_core from '@angular/core';
6
7
  import { Type, InjectionToken, OnDestroy } from '@angular/core';
@@ -8,7 +9,6 @@ import { ClientPageMenuItem } from '@masterteam/components/client-page-menu';
8
9
  import { PropertyFilterBuilderSchema, PropertyFilterBuilderRule } from '@masterteam/components/property-filter-builder';
9
10
  import { ClientLookup, ClientForm, ClientFormSubmitRequestMapper, ProcessFormSubmitResponse } from '@masterteam/forms/client-form';
10
11
  import { LoadingStateShape } from '@masterteam/components';
11
- import { ColumnDef } from '@masterteam/components/table';
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';
@@ -19,6 +19,7 @@ import { Observable } from 'rxjs';
19
19
  import { ClientInstancePreviewConfig } from '@masterteam/client-components/client-instance-preview';
20
20
  import { EntityData } from '@masterteam/components/entities';
21
21
  import * as _masterteam_components_types_masterteam_components_statistic_card from '@masterteam/components/types/masterteam-components-statistic-card';
22
+ import * as _masterteam_components_types_masterteam_components_table from '@masterteam/components/types/masterteam-components-table';
22
23
  import * as _masterteam_components_types_masterteam_components_client_page_menu from '@masterteam/components/types/masterteam-components-client-page-menu';
23
24
  import { StateContext } from '@ngxs/store';
24
25
 
@@ -349,6 +350,7 @@ declare class WorkCenterPage {
349
350
  readonly groupChanged: _angular_core.OutputEmitterRef<string | null>;
350
351
  protected readonly context: _angular_core.Signal<_masterteam_work_center.WorkCenterContext>;
351
352
  protected readonly headerFilters: _angular_core.Signal<WorkCenterFilterRule[]>;
353
+ protected readonly tableFilters: _angular_core.WritableSignal<TableFilters>;
352
354
  protected readonly selectedItemContextKey: _angular_core.WritableSignal<string | null>;
353
355
  private readonly _menuItems;
354
356
  protected readonly menuItems: _angular_core.Signal<{
@@ -365,13 +367,40 @@ declare class WorkCenterPage {
365
367
  childrenLoading?: boolean;
366
368
  }[]>;
367
369
  protected readonly rows: _angular_core.Signal<Record<string, unknown>[]>;
368
- protected readonly columns: _angular_core.Signal<_masterteam_components_types_masterteam_components_table.ColumnDef[]>;
370
+ protected readonly columns: _angular_core.Signal<ColumnDef[]>;
369
371
  protected readonly kpis: _angular_core.Signal<_masterteam_components_statistic_card.StatisticCardData[]>;
370
372
  protected readonly runtimeFilterSchema: _angular_core.Signal<WorkCenterRuntimeFilterSchema | null>;
371
373
  protected readonly totalCount: _angular_core.Signal<number>;
372
374
  protected readonly columnFilters: _angular_core.Signal<WorkCenterFilterRule[]>;
373
375
  protected readonly loading: _angular_core.Signal<boolean>;
374
376
  protected readonly groupBy: _angular_core.Signal<string | null>;
377
+ /**
378
+ * Sort and grouping live in the runtime query (and the host's URL), not in
379
+ * table storage — persisting them locally would let a restored table claim a
380
+ * grouping the backend query no longer has. Stable reference: a fresh array
381
+ * per change detection would re-run the table's persistence effect.
382
+ */
383
+ protected readonly persistStateExclude: TablePersistStateKey[];
384
+ protected readonly tableColumns: _angular_core.Signal<{
385
+ sortable: boolean;
386
+ key: string;
387
+ label: string;
388
+ type?: _masterteam_components_table.ColumnType;
389
+ customCellTpl?: _angular_core.TemplateRef<any>;
390
+ filterConfig?: _masterteam_components_table.FilterConfig;
391
+ statusMap?: Record<string, _masterteam_components_table.TableStatusMapValue>;
392
+ groupable?: boolean;
393
+ groupKey?: string;
394
+ showGroupColumnLabel?: boolean;
395
+ readonly?: boolean;
396
+ width?: string;
397
+ align?: "start" | "center" | "end";
398
+ shrink?: boolean;
399
+ filterOnly?: boolean;
400
+ filterable?: boolean;
401
+ exportable?: boolean;
402
+ exportValue?: (row: any) => string | number | boolean | null;
403
+ }[]>;
375
404
  /**
376
405
  * Grouping is executed by the backend as a single sort, so the table's own
377
406
  * sort state is driven from the query we actually sent instead of the
@@ -417,13 +446,7 @@ declare class WorkCenterPage {
417
446
  * fires straight after carries the same sort and lands as a no-op.
418
447
  */
419
448
  onTableGroupByChange(key: string | null): void;
420
- onGridFiltersChange(filters: WorkCenterFilterRule[]): void;
421
- onGridQueryChange(event: {
422
- currentPage: number;
423
- pageSize: number;
424
- sortField: string | null;
425
- sortOrder: number;
426
- }): void;
449
+ onTableLazyLoad(event: any): void;
427
450
  /**
428
451
  * Announces the backend sort to the host only when it actually moved, so a
429
452
  * host that mirrors it into the URL doesn't churn history on every page hit.
@@ -666,9 +689,15 @@ declare const WORK_CENTER_EXTRA_TABS: InjectionToken<WorkCenterExtraTab[]>;
666
689
  declare function resolveWorkCenterExtraTabs(tabs: readonly WorkCenterExtraTab[] | null, details: WorkCenterItemBasicInfoData): WorkCenterExtraTab[];
667
690
  /**
668
691
  * The request form's sub-tab strip (`placement: 'form'`): the form, then the
669
- * host tabs. Empty when no host tab goes there, so no strip renders.
692
+ * host tabs. `formLabel: null` leaves the form out (it loaded empty, "No form
693
+ * required"). Empty when fewer than two options remain, so no strip renders.
694
+ */
695
+ declare function workCenterFormTabOptions(formLabel: string | null, tabs: readonly WorkCenterExtraTab[], translate: (key: string) => string): OptionItem[];
696
+ /**
697
+ * The form sub-tab a body opens on: the form, unless it loaded empty and a
698
+ * host tab sits beside it — then the first host tab takes its place.
670
699
  */
671
- declare function workCenterFormTabOptions(formLabel: string, tabs: readonly WorkCenterExtraTab[], translate: (key: string) => string): OptionItem[];
700
+ declare function workCenterInitialFormTab(formEmpty: boolean, tabs: readonly WorkCenterExtraTab[]): string;
672
701
  /** Splices the extra tabs into a built-in tab list (see `after`). */
673
702
  declare function insertWorkCenterExtraTabs<T extends {
674
703
  value?: unknown;
@@ -1223,5 +1252,5 @@ declare class WorkCenterState {
1223
1252
 
1224
1253
  declare const APP_STATES: (typeof WorkCenterState)[];
1225
1254
 
1226
- 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_EXTRA_TABS, WORK_CENTER_GROUP_NONE, WORK_CENTER_HIDDEN_TABS, 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, insertWorkCenterExtraTabs, isSchedulePublishConflictRow, matchesSchedulePublishSearch, parseSchedulePublishChangedFields, readSchedulePublishChanges, removeWorkCenterHiddenTabs, resolveWorkCenterActionHandler, resolveWorkCenterExtraTabs, schedulePublishRowKey, sortSchedulePublishRows, summarizeSchedulePublish, windowSchedulePublishRows, workCenterFormTabOptions };
1255
+ 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_EXTRA_TABS, WORK_CENTER_GROUP_NONE, WORK_CENTER_HIDDEN_TABS, 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, insertWorkCenterExtraTabs, isSchedulePublishConflictRow, matchesSchedulePublishSearch, parseSchedulePublishChangedFields, readSchedulePublishChanges, removeWorkCenterHiddenTabs, resolveWorkCenterActionHandler, resolveWorkCenterExtraTabs, schedulePublishRowKey, sortSchedulePublishRows, summarizeSchedulePublish, windowSchedulePublishRows, workCenterFormTabOptions, workCenterInitialFormTab };
1227
1256
  export type { ApiEnvelope, SchedulePublishDiff, SchedulePublishDiffRow, SchedulePublishFieldChange, SchedulePublishFormLoadResponse, SchedulePublishGroup, SchedulePublishGroupKey, SchedulePublishState, SchedulePublishSummary, TranslatableDto, WorkCenterActionHandler, WorkCenterActionHandlerContext, WorkCenterArea, WorkCenterAreaState, WorkCenterBootstrapInputs, WorkCenterClientFormModalData, WorkCenterClientFormModalOptions, WorkCenterColumnsConfig, WorkCenterContext, WorkCenterExtraTab, WorkCenterExtraTabItem, 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 };