@masterteam/work-center 0.0.83 → 0.0.84

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.83",
3
+ "version": "0.0.84",
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/client-components": "^0.0.87",
24
- "@masterteam/components": "^0.0.274",
25
23
  "@masterteam/forms": "^0.0.141",
24
+ "@masterteam/discussion": "^0.0.26",
26
25
  "@masterteam/icons": "^0.0.17",
27
- "@masterteam/structure-builder": "^0.0.62",
28
- "@masterteam/discussion": "^0.0.26"
26
+ "@masterteam/client-components": "^0.0.84",
27
+ "@masterteam/components": "^0.0.273",
28
+ "@masterteam/structure-builder": "^0.0.62"
29
29
  },
30
30
  "sideEffects": false,
31
31
  "exports": {
@@ -589,8 +589,11 @@ declare const WORK_CENTER_TYPE_COMPONENTS: InjectionToken<Record<string, Type<un
589
589
  */
590
590
  /**
591
591
  * `'removed'` means a row that is in the published snapshot but no longer in the
592
- * plan. `'unchanged'` never reaches the comparison payload - the drawer shows
593
- * what is being published, not the whole plan.
592
+ * plan. `'unchanged'` appears only on a CONVERGENT-CONFLICT row (round 3: both
593
+ * sides were touched and ended with equal values) - it carries no publishable
594
+ * change and is excluded from every publish count, but the approver must still
595
+ * see it in the conflicts section, or the request reports conflicts the view
596
+ * cannot show. A non-conflict `unchanged` row is still dropped.
594
597
  */
595
598
  type SchedulePublishState = 'added' | 'changed' | 'removed' | 'unchanged';
596
599
  interface SchedulePublishFieldChange {
@@ -624,6 +627,19 @@ interface SchedulePublishDiffRow {
624
627
  * list: the whole row is the change.
625
628
  */
626
629
  changes?: SchedulePublishFieldChange[] | null;
630
+ /**
631
+ * `'stale'` | `'conflict'` - the server's per-row baseline verdict (round 3,
632
+ * additive). `'conflict'` means the PUBLISHED side also moved on a row this
633
+ * draft edits; such rows lead the comparison in their own section. Absent on
634
+ * an older backend, which renders exactly as before.
635
+ */
636
+ draftBaselineState?: string | null;
637
+ /**
638
+ * Comma-joined field keys the published side changed on a conflict row -
639
+ * parse with {@link parseSchedulePublishChangedFields}. Additive; absent on
640
+ * older backends.
641
+ */
642
+ publishedChangedFields?: string | null;
627
643
  }
628
644
  interface SchedulePublishDiff {
629
645
  levelDataId?: number | null;
@@ -676,8 +692,10 @@ interface SchedulePublishFormLoadResponse {
676
692
  * group is where the eye stops.
677
693
  */
678
694
  declare const SCHEDULE_PUBLISH_GROUP_ORDER: readonly SchedulePublishState[];
695
+ /** Group keys: the publish states plus the leading conflicts section (round 3). */
696
+ type SchedulePublishGroupKey = SchedulePublishState | 'conflict';
679
697
  interface SchedulePublishGroup {
680
- state: SchedulePublishState;
698
+ state: SchedulePublishGroupKey;
681
699
  rows: SchedulePublishDiffRow[];
682
700
  /** Rows in this group BEFORE the search filter - the badge count stays honest. */
683
701
  totalCount: number;
@@ -688,18 +706,42 @@ interface SchedulePublishSummary {
688
706
  changedCount: number;
689
707
  removedCount: number;
690
708
  totalCount: number;
709
+ /** Rows the published plan moved under the draft's own edits. */
710
+ conflictCount: number;
691
711
  /** True when there is genuinely nothing to publish (as opposed to never published). */
692
712
  isEmpty: boolean;
713
+ /**
714
+ * The comparison has something to show: publishable changes OR conflicts.
715
+ * A diff of only zero-diff conflict rows is publish-empty but must still
716
+ * render its conflicts section - "nothing to publish" would contradict the
717
+ * request the approver is looking at.
718
+ */
719
+ needsAttention: boolean;
693
720
  }
721
+ /** The server's per-row baseline verdict says the published side also moved. */
722
+ declare function isSchedulePublishConflictRow(row: SchedulePublishDiffRow): boolean;
694
723
  declare function summarizeSchedulePublish(diff: SchedulePublishDiff | null | undefined): SchedulePublishSummary;
695
724
  /**
696
725
  * Group the comparison for display, optionally narrowed by a free-text search.
697
726
  *
727
+ * CONFLICTS LEAD, as their own section holding every conflicted row (whatever
728
+ * its publish state - including the zero-diff `unchanged` convergences the
729
+ * backend ships solely for this section). The approver has no resolution
730
+ * control - the section is informational: the frozen plan they are approving
731
+ * was captured while the live plan had moved under it. The remaining rows
732
+ * group added → changed → removed exactly as before, with non-conflict
733
+ * `unchanged` rows still dropped.
734
+ *
698
735
  * Search matches a row's NAME and its changed FIELD KEYS, so "start" finds every
699
736
  * row whose planned start moved even though that text appears nowhere in a name.
700
737
  * Empty groups are dropped rather than rendered as empty headers.
701
738
  */
702
739
  declare function groupSchedulePublishRows(diff: SchedulePublishDiff | null | undefined, searchText?: string): SchedulePublishGroup[];
740
+ /**
741
+ * The changed-field keys a conflict row ships as one comma-joined string -
742
+ * the same wire shape the schedule read envelope uses.
743
+ */
744
+ declare function parseSchedulePublishChangedFields(changedFields: string | null | undefined): string[];
703
745
  /**
704
746
  * Plan order, falling back to the row id.
705
747
  *
@@ -797,6 +839,12 @@ declare class WorkCenterSchedulePublishType implements OnDestroy {
797
839
  * nothing.
798
840
  */
799
841
  protected isExpandable(row: SchedulePublishDiffRow): boolean;
842
+ /**
843
+ * The published-side field keys of a conflict row, as human labels. Rendered
844
+ * as an informational hint — the approver has no per-row resolution control;
845
+ * the frozen plan they decide on was captured as-is.
846
+ */
847
+ protected publishedMovedFields(row: SchedulePublishDiffRow): string[];
800
848
  protected groupBadgeClass(state: string): string;
801
849
  protected groupLabel(state: string): string;
802
850
  /**
@@ -1015,5 +1063,5 @@ declare class WorkCenterState {
1015
1063
 
1016
1064
  declare const APP_STATES: (typeof WorkCenterState)[];
1017
1065
 
1018
- 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, matchesSchedulePublishSearch, readSchedulePublishChanges, schedulePublishRowKey, sortSchedulePublishRows, summarizeSchedulePublish, windowSchedulePublishRows };
1019
- export type { ApiEnvelope, SchedulePublishDiff, SchedulePublishDiffRow, SchedulePublishFieldChange, SchedulePublishFormLoadResponse, SchedulePublishGroup, 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 };
1066
+ 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 };
1067
+ 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 };