@outbuild-company/schedule-core 1.21.0 → 1.22.0
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/dist/cdn/schedule-core.global.js +1 -1
- package/dist/cdn/schedule-core.global.js.map +1 -1
- package/dist/index.cjs +241 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +50 -1
- package/dist/index.d.ts +50 -1
- package/dist/index.js +241 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -209,6 +209,9 @@ declare const DISPATCH_ACTION_KIND: {
|
|
|
209
209
|
readonly CALENDAR_RECONCILE: "calendar-reconcile";
|
|
210
210
|
readonly ACTIVITY_PASTE_COPIED: "activity-paste-copied";
|
|
211
211
|
readonly ACTIVITY_DUPLICATE: "activity-duplicate";
|
|
212
|
+
readonly CELL_COPY: "cell-copy";
|
|
213
|
+
readonly CELL_CLIPBOARD_CLEAR: "cell-clipboard-clear";
|
|
214
|
+
readonly CELL_PASTE_COPIED: "cell-paste-copied";
|
|
212
215
|
readonly PERSISTENCE_ACKNOWLEDGE: "persistence-acknowledge";
|
|
213
216
|
readonly BASELINE_APPLY: "baseline-apply";
|
|
214
217
|
readonly PONDERATOR_CRITERION_SET: "ponderator-criterion-set";
|
|
@@ -729,6 +732,19 @@ type DispatchAction = {
|
|
|
729
732
|
kind: typeof DISPATCH_ACTION_KIND.ACTIVITY_DUPLICATE;
|
|
730
733
|
activityIds: ReadonlyArray<ActivityId>;
|
|
731
734
|
eventSource?: string;
|
|
735
|
+
} | {
|
|
736
|
+
kind: typeof DISPATCH_ACTION_KIND.CELL_COPY;
|
|
737
|
+
activityId: ActivityId;
|
|
738
|
+
column: EditableColumnName;
|
|
739
|
+
eventSource?: string;
|
|
740
|
+
} | {
|
|
741
|
+
kind: typeof DISPATCH_ACTION_KIND.CELL_CLIPBOARD_CLEAR;
|
|
742
|
+
eventSource?: string;
|
|
743
|
+
} | {
|
|
744
|
+
kind: typeof DISPATCH_ACTION_KIND.CELL_PASTE_COPIED;
|
|
745
|
+
activityIds: ReadonlyArray<ActivityId>;
|
|
746
|
+
column: EditableColumnName;
|
|
747
|
+
eventSource?: string;
|
|
732
748
|
} | {
|
|
733
749
|
kind: typeof DISPATCH_ACTION_KIND.PERSISTENCE_ACKNOWLEDGE;
|
|
734
750
|
activities?: ReadonlyArray<PersistedEntityIdentity>;
|
|
@@ -2076,6 +2092,34 @@ interface ScheduleActivitiesApi {
|
|
|
2076
2092
|
*/
|
|
2077
2093
|
createDateGesturePreview(gesture: DateGesture): DateGesturePreview;
|
|
2078
2094
|
}
|
|
2095
|
+
/** Single-cell clipboard reads and mutations for a ready schedule. */
|
|
2096
|
+
interface ScheduleCellsApi {
|
|
2097
|
+
/**
|
|
2098
|
+
* Copies one activity's cell value to core-owned clipboard state.
|
|
2099
|
+
*
|
|
2100
|
+
* Predecessor and successor columns copy the underlying dependency links;
|
|
2101
|
+
* every other column copies its canonical field value.
|
|
2102
|
+
* @param activityId - Source activity.
|
|
2103
|
+
* @param column - Source column.
|
|
2104
|
+
* @param context - Optional consumer event source.
|
|
2105
|
+
* @returns The complete dispatch result.
|
|
2106
|
+
*/
|
|
2107
|
+
copy(activityId: ActivityId, column: EditableColumnName, context?: MutationContext): Promise<DispatchResult>;
|
|
2108
|
+
/**
|
|
2109
|
+
* Pastes the copied cell value into one or more activities' column.
|
|
2110
|
+
*
|
|
2111
|
+
* Predecessor and successor columns paste cross-compatibly with each
|
|
2112
|
+
* other; every other column is rejected unless its own pipeline accepts
|
|
2113
|
+
* the copied value.
|
|
2114
|
+
* @param activityIds - Destination activities.
|
|
2115
|
+
* @param column - Destination column.
|
|
2116
|
+
* @param context - Optional consumer event source.
|
|
2117
|
+
* @returns The complete dispatch result.
|
|
2118
|
+
*/
|
|
2119
|
+
paste(activityIds: ReadonlyArray<ActivityId>, column: EditableColumnName, context?: MutationContext): Promise<DispatchResult>;
|
|
2120
|
+
/** @returns The complete result of clearing core-owned cell clipboard state. */
|
|
2121
|
+
clearClipboard(context?: MutationContext): Promise<DispatchResult>;
|
|
2122
|
+
}
|
|
2079
2123
|
/** Dependency-link reads and mutations for a ready schedule. */
|
|
2080
2124
|
interface ScheduleLinksApi {
|
|
2081
2125
|
/** @returns A defensive link snapshot, or `null` when the ID is absent. */
|
|
@@ -2396,6 +2440,8 @@ interface ScheduleDiagnosticsApi {
|
|
|
2396
2440
|
interface ScheduleApiNamespaces {
|
|
2397
2441
|
/** Activity reads and mutations. */
|
|
2398
2442
|
readonly activities: ScheduleActivitiesApi;
|
|
2443
|
+
/** Single-cell clipboard reads and mutations. */
|
|
2444
|
+
readonly cells: ScheduleCellsApi;
|
|
2399
2445
|
/** Dependency-link reads and mutations. */
|
|
2400
2446
|
readonly links: ScheduleLinksApi;
|
|
2401
2447
|
/** Calendar reads and reconciliation. */
|
|
@@ -2727,6 +2773,8 @@ interface UndoOptions {
|
|
|
2727
2773
|
declare class ScheduleCore {
|
|
2728
2774
|
/** Activity reads and mutations. */
|
|
2729
2775
|
readonly activities: ScheduleApiNamespaces['activities'];
|
|
2776
|
+
/** Single-cell clipboard reads and mutations. */
|
|
2777
|
+
readonly cells: ScheduleApiNamespaces['cells'];
|
|
2730
2778
|
/** Dependency-link reads and mutations. */
|
|
2731
2779
|
readonly links: ScheduleApiNamespaces['links'];
|
|
2732
2780
|
/** Calendar reads and reconciliation. */
|
|
@@ -2751,6 +2799,7 @@ declare class ScheduleCore {
|
|
|
2751
2799
|
readonly diagnostics: ScheduleApiNamespaces['diagnostics'];
|
|
2752
2800
|
readonly dataDates: ScheduleP6Api;
|
|
2753
2801
|
private readonly _activityClipboard;
|
|
2802
|
+
private readonly _cellClipboard;
|
|
2754
2803
|
private _status;
|
|
2755
2804
|
private readonly coreRuntime;
|
|
2756
2805
|
private readonly _isFork;
|
|
@@ -3582,4 +3631,4 @@ declare const DISPATCH_TRACK_EVENT: {
|
|
|
3582
3631
|
/** Consumer analytics event name emitted by a schedule mutation. */
|
|
3583
3632
|
type DispatchTrackEvent = (typeof DISPATCH_TRACK_EVENT)[keyof typeof DISPATCH_TRACK_EVENT];
|
|
3584
3633
|
|
|
3585
|
-
export { ACTIVITY_BATCH_ACTION_KIND, ACTIVITY_BATCH_MODE, ACTIVITY_DATE_EDGE, ACTIVITY_FIELD, ACTIVITY_PONDERATOR_CRITERION, ACTIVITY_PROGRESS_ORIGIN, ACTIVITY_TYPE, type ActivityBaselineSnapshot, type ActivityBatchAction, type ActivityBatchInput, type ActivityBatchItem, type ActivityBatchItemInput, type ActivityBatchLinkInput$1 as ActivityBatchLinkInput, type ActivityBatchMode, type ActivityBatchParentReference, type ActivityBatchReference, type ActivityBulkEdit, type ActivityCreateInput, type ActivityCreationOverrides, type ActivityCreter, type ActivityDateEdge, type ActivityDateEdit, type ActivityField, type ActivityFieldEdit, type ActivityFieldValue, type ActivityId, type ActivityLookaheadSyncInput, type ActivityMoveInput, type ActivityStatus, type ActivityType, type ApplyLookaheadConversionInput, type BackendActivityInput, type BackendCalendarExceptionInput, type BackendCalendarInput, type BackendLinkInput, type BackendScheduleInput, type BackendSectorInput, type BackendShiftInput, type BaselinePoint, type BaselineVersion, type BranchOrderChange, CALENDAR_UNIT, CHANGE_SET_SOURCE_KIND, COLUMN, COMPLETED_PROGRESS, CONFIRMATION_KIND, CONSTRAINT_TYPE, CONSTRAINT_TYPE_TO_LABEL, CONSTRAINT_WARNING_KIND, CREATION_KIND, type Calendar, type CalendarId, type CalendarLike, type CalendarUnit, type CalendarWorktime, type ChangeSet, type ChangeSetSource, type ColumnName, type ConfirmationAlternative, type ConfirmationKind, type ConfirmationRequest, type ConstraintType, type ConstraintWarning, type CoreActivity, type CoreBaselinePoint, type CreationKind, type CriticalPathResult, P6_PROPERTY_CONTRACT as DATA_DATE_PROPERTY_CONTRACT, DATE_GESTURE_KIND, DEFAULT_HOURS_PER_DAY, DISPATCH_ACTION_KIND, DISPATCH_ACTION_KINDS, DISPATCH_LINK_OPERATION_KIND, DISPATCH_TRACK_EVENT, type P6ActivityCalculationInputs as DataDateActivityCalculationInputs, type P6ActivityColumnKey as DataDateActivityColumnKey, type P6ActivityData as DataDateActivityData, type P6ActivityDraftState as DataDateActivityDraftState, type P6ActivityInputPatch as DataDateActivityInputPatch, type P6ActivityState as DataDateActivityState, type P6ActivityType as DataDateActivityType, P6CapabilityError as DataDateCapabilityError, type P6CapabilityErrorCode as DataDateCapabilityErrorCode, type P6DependencyReference as DataDateDependencyReference, type P6DiagnosticProjectIdentity as DataDateDiagnosticProjectIdentity, type P6DiagnosticRelationship as DataDateDiagnosticRelationship, type P6DiagnosticRelationshipType as DataDateDiagnosticRelationshipType, type P6DurationType as DataDateDurationType, type P6EndingActivityOption as DataDateEndingActivityOption, type P6EndingActivityPage as DataDateEndingActivityPage, type P6EndingActivitySearch as DataDateEndingActivitySearch, type P6MappedScheduleOptions as DataDateMappedScheduleOptions, type P6MissingActivityInput as DataDateMissingActivityInput, type P6OutOfSequencePolicy as DataDateOutOfSequencePolicy, type P6ProjectPlannedStartChange as DataDateProjectPlannedStartChange, type P6ProjectState as DataDateProjectState, type P6PropertyContractRow as DataDatePropertyContractRow, type P6PropertyEdgeCases as DataDatePropertyEdgeCases, type P6RawProjectOptions as DataDateRawProjectOptions, type P6RawScheduleOptions as DataDateRawScheduleOptions, type P6RequiredHistoricalField as DataDateRequiredHistoricalField, type P6ResourceAssignment as DataDateResourceAssignment, type P6ScheduleDiagnostic as DataDateScheduleDiagnostic, type P6ScheduleDiagnosticCode as DataDateScheduleDiagnosticCode, type P6ScheduleInput as DataDateScheduleInput, type P6ScheduleReadiness as DataDateScheduleReadiness, type P6ScheduleResult as DataDateScheduleResult, type P6ScheduleRunLog as DataDateScheduleRunLog, type P6ScheduleSettings as DataDateScheduleSettings, type P6ScheduleWarning as DataDateScheduleWarning, type P6SettingsChange as DataDateSettingsChange, type DateGesture, type DateGestureKind, type DateGesturePreview, type DatesBatchVerdict, type DeletedActivitySnapshot, type DeletedLinkSnapshot, type DispatchAction, type DispatchActionKind, type DispatchManyAction, type DispatchManyChangeSetSource, type DispatchManyResult, type DispatchOptions, type DispatchRejectReason, type DispatchResult, type DispatchTrackEvent, EDIT_ALERT_KEY, EDIT_DENIAL_REASON, ENTITY_CHANGE_KIND, type EditAlertKey, type EditDenialReason, type EditResult, type EditableColumnName, type EffectiveGraphAudit, type EntityChange, type ActivityBatchLinkInput as ErgonomicActivityBatchLinkInput, type ExpectedProgressAdapter, FILTER_FIELD, FILTER_LOGIC, FILTER_OPERATOR, FILTER_REJECTION_REASON, FILTER_VALUE_KIND, FLAT_WBS_DEPTH, type FilterCriterion, type FilterCriterionGroup, type FilterCriterionValue, type FilterDateRange, type FilterField, type FilterLogic, type FilterOperator, type FilterRejection, type FilterState, type FilterValueKind, GROUP_ID_PREFIX, GROUP_ID_SEPARATOR, type GroupCriterion, type GroupCriterionInput, type GroupLevelWindow, type GroupState, type GroupStateInput, type ImpactRequestSyncInput, LINK_BATCH_OPERATION_KIND, LINK_CODE, LINK_CODE_TO_TYPE, LINK_REJECTION_REASON, LINK_RELATIONSHIP, LINK_TYPE, LINK_TYPE_CODE, type Link, type LinkBatchOperationKind, type LinkBatchRequest, type LinkBatchVerdict, type LinkCreateRequest, type LinkId, type LinkPatchRequest, type LinkRejection, type LinkRelationship, type LinkType, type LinkTypeCode, type LinkUpdateAction, type LinksBatchOperation, type LoadDiagnostic, type LoadDiagnosticCode, type LookaheadActualIntent, LookaheadActualTransitionError, type LookaheadActualTransitionErrorCode, type LookaheadConversionFormerParent, type LookaheadConversionGroup, type LookaheadConversionInput, type LookaheadConversionMilestoneMove, type LookaheadConversionPlan, type LookaheadConversionResult, type LookaheadDerivedCalendars, type LookaheadDerivedFields, type LookaheadDerivedFieldsResolver, type LookaheadDerivedInput, type LookaheadProgressActualActivityState, type LookaheadProgressActualInput, type LookaheadProgressActualPlan, MINIMUM_GROUP_DEPTH, MINIMUM_GROUP_LEVEL, type MutationContext, NEW_ACTIVITY_DEFAULTS, NOT_STARTED_PROGRESS, ORDER_DIRECTION, ORDER_MODE, type OrderDirection, type OrderMode, type OrderRule, type OrderState, type ParsedInput, type PendingRequest, type PersistableActivityField, type PersistedEntityIdentity, type PersistenceCheckpoint, type PipelineColumnName, type ProjectWorkHours, REJECTION_REASON, ROOT_PARENT_ID, SCHEDULE_CORE_STATUS, SCHEDULE_EFFECT_KIND, SIR_AUTO_REJECT_REASON, STATUS, STATUS_CRITERIA, type ScheduleActivitiesApi, type ScheduleApiNamespaces, type ScheduleAutoScheduleAction, type ScheduleBaselinesApi, type ScheduleCalendarsApi, ScheduleCore, type ScheduleCoreInput, type ScheduleCoreReporter, type ScheduleCoreStatus, type ScheduleCriticalPathApi, type ScheduleP6Api as ScheduleDataDatesApi, type ScheduleDiagnosticsApi, type ScheduleEffect, type ScheduleHistoryApi, type ScheduleImpactRequestsApi, type ScheduleLinksApi, type SchedulePersistenceApi, type ScheduleProjectionApi, type ScheduleSelectionApi, type ScheduleViewApi, type SectorMetadata, type SelectionToggleInput, type StaticActivityDefaults, type StatusCriteria, type TrackingEvent, UNASSIGNED_GROUP_LABEL, UNASSIGNED_VALUE_ID, type UndoOptions, VIEW_ATTRIBUTE_KIND, VISUAL_ROW_KIND, type ViewAttributeAssignmentInput, type ViewAttributeCatalogInput, type ViewAttributeFilterCriterion, type ViewAttributeOrderRule, type ViewAttributeValueInput, type ViewFilterInput, type ViewStateChange, type ViewStatePropChange, type VisualRow, WORK_TIME_DIRECTION, type WbsDepth, type WithProplannerId, type WorkTimeDirection, allowedSecondaryConstraintTypes, appendGroupRowId, buildGroupRowId, checkNoUpdatedLinks, computeExpectedProgress, createLookaheadDerivedFields, createOutbuildP6ScheduleSettings as createOutbuildDataDateScheduleSettings, createSchedule, expectedProgressFromBaseline, formatUtcAsP6WallDate, getActiveBaseline, getUnsavedActivities, isRootParent, isViewAttributeCriterion, isViewAttributeOrderRule, mapP6ScheduleOptions as mapDataDateScheduleOptions, normalizeParentKey, parseFromBackend, parseP6DayAsCalendarStart, parseP6WallDateAsUtc, planLookaheadProgressActuals, prepareLookaheadProgressActuals, resolveExpectedFinishDateSelection, resolveLookaheadActualDateSelection, willRunCriticalPath, yieldToBrowser };
|
|
3634
|
+
export { ACTIVITY_BATCH_ACTION_KIND, ACTIVITY_BATCH_MODE, ACTIVITY_DATE_EDGE, ACTIVITY_FIELD, ACTIVITY_PONDERATOR_CRITERION, ACTIVITY_PROGRESS_ORIGIN, ACTIVITY_TYPE, type ActivityBaselineSnapshot, type ActivityBatchAction, type ActivityBatchInput, type ActivityBatchItem, type ActivityBatchItemInput, type ActivityBatchLinkInput$1 as ActivityBatchLinkInput, type ActivityBatchMode, type ActivityBatchParentReference, type ActivityBatchReference, type ActivityBulkEdit, type ActivityCreateInput, type ActivityCreationOverrides, type ActivityCreter, type ActivityDateEdge, type ActivityDateEdit, type ActivityField, type ActivityFieldEdit, type ActivityFieldValue, type ActivityId, type ActivityLookaheadSyncInput, type ActivityMoveInput, type ActivityStatus, type ActivityType, type ApplyLookaheadConversionInput, type BackendActivityInput, type BackendCalendarExceptionInput, type BackendCalendarInput, type BackendLinkInput, type BackendScheduleInput, type BackendSectorInput, type BackendShiftInput, type BaselinePoint, type BaselineVersion, type BranchOrderChange, CALENDAR_UNIT, CHANGE_SET_SOURCE_KIND, COLUMN, COMPLETED_PROGRESS, CONFIRMATION_KIND, CONSTRAINT_TYPE, CONSTRAINT_TYPE_TO_LABEL, CONSTRAINT_WARNING_KIND, CREATION_KIND, type Calendar, type CalendarId, type CalendarLike, type CalendarUnit, type CalendarWorktime, type ChangeSet, type ChangeSetSource, type ColumnName, type ConfirmationAlternative, type ConfirmationKind, type ConfirmationRequest, type ConstraintType, type ConstraintWarning, type CoreActivity, type CoreBaselinePoint, type CreationKind, type CriticalPathResult, P6_PROPERTY_CONTRACT as DATA_DATE_PROPERTY_CONTRACT, DATE_GESTURE_KIND, DEFAULT_HOURS_PER_DAY, DISPATCH_ACTION_KIND, DISPATCH_ACTION_KINDS, DISPATCH_LINK_OPERATION_KIND, DISPATCH_TRACK_EVENT, type P6ActivityCalculationInputs as DataDateActivityCalculationInputs, type P6ActivityColumnKey as DataDateActivityColumnKey, type P6ActivityData as DataDateActivityData, type P6ActivityDraftState as DataDateActivityDraftState, type P6ActivityInputPatch as DataDateActivityInputPatch, type P6ActivityState as DataDateActivityState, type P6ActivityType as DataDateActivityType, P6CapabilityError as DataDateCapabilityError, type P6CapabilityErrorCode as DataDateCapabilityErrorCode, type P6DependencyReference as DataDateDependencyReference, type P6DiagnosticProjectIdentity as DataDateDiagnosticProjectIdentity, type P6DiagnosticRelationship as DataDateDiagnosticRelationship, type P6DiagnosticRelationshipType as DataDateDiagnosticRelationshipType, type P6DurationType as DataDateDurationType, type P6EndingActivityOption as DataDateEndingActivityOption, type P6EndingActivityPage as DataDateEndingActivityPage, type P6EndingActivitySearch as DataDateEndingActivitySearch, type P6MappedScheduleOptions as DataDateMappedScheduleOptions, type P6MissingActivityInput as DataDateMissingActivityInput, type P6OutOfSequencePolicy as DataDateOutOfSequencePolicy, type P6ProjectPlannedStartChange as DataDateProjectPlannedStartChange, type P6ProjectState as DataDateProjectState, type P6PropertyContractRow as DataDatePropertyContractRow, type P6PropertyEdgeCases as DataDatePropertyEdgeCases, type P6RawProjectOptions as DataDateRawProjectOptions, type P6RawScheduleOptions as DataDateRawScheduleOptions, type P6RequiredHistoricalField as DataDateRequiredHistoricalField, type P6ResourceAssignment as DataDateResourceAssignment, type P6ScheduleDiagnostic as DataDateScheduleDiagnostic, type P6ScheduleDiagnosticCode as DataDateScheduleDiagnosticCode, type P6ScheduleInput as DataDateScheduleInput, type P6ScheduleReadiness as DataDateScheduleReadiness, type P6ScheduleResult as DataDateScheduleResult, type P6ScheduleRunLog as DataDateScheduleRunLog, type P6ScheduleSettings as DataDateScheduleSettings, type P6ScheduleWarning as DataDateScheduleWarning, type P6SettingsChange as DataDateSettingsChange, type DateGesture, type DateGestureKind, type DateGesturePreview, type DatesBatchVerdict, type DeletedActivitySnapshot, type DeletedLinkSnapshot, type DispatchAction, type DispatchActionKind, type DispatchManyAction, type DispatchManyChangeSetSource, type DispatchManyResult, type DispatchOptions, type DispatchRejectReason, type DispatchResult, type DispatchTrackEvent, EDIT_ALERT_KEY, EDIT_DENIAL_REASON, ENTITY_CHANGE_KIND, type EditAlertKey, type EditDenialReason, type EditResult, type EditableColumnName, type EffectiveGraphAudit, type EntityChange, type ActivityBatchLinkInput as ErgonomicActivityBatchLinkInput, type ExpectedProgressAdapter, FILTER_FIELD, FILTER_LOGIC, FILTER_OPERATOR, FILTER_REJECTION_REASON, FILTER_VALUE_KIND, FLAT_WBS_DEPTH, type FilterCriterion, type FilterCriterionGroup, type FilterCriterionValue, type FilterDateRange, type FilterField, type FilterLogic, type FilterOperator, type FilterRejection, type FilterState, type FilterValueKind, GROUP_ID_PREFIX, GROUP_ID_SEPARATOR, type GroupCriterion, type GroupCriterionInput, type GroupLevelWindow, type GroupState, type GroupStateInput, type ImpactRequestSyncInput, LINK_BATCH_OPERATION_KIND, LINK_CODE, LINK_CODE_TO_TYPE, LINK_REJECTION_REASON, LINK_RELATIONSHIP, LINK_TYPE, LINK_TYPE_CODE, type Link, type LinkBatchOperationKind, type LinkBatchRequest, type LinkBatchVerdict, type LinkCreateRequest, type LinkId, type LinkPatchRequest, type LinkRejection, type LinkRelationship, type LinkType, type LinkTypeCode, type LinkUpdateAction, type LinksBatchOperation, type LoadDiagnostic, type LoadDiagnosticCode, type LookaheadActualIntent, LookaheadActualTransitionError, type LookaheadActualTransitionErrorCode, type LookaheadConversionFormerParent, type LookaheadConversionGroup, type LookaheadConversionInput, type LookaheadConversionMilestoneMove, type LookaheadConversionPlan, type LookaheadConversionResult, type LookaheadDerivedCalendars, type LookaheadDerivedFields, type LookaheadDerivedFieldsResolver, type LookaheadDerivedInput, type LookaheadProgressActualActivityState, type LookaheadProgressActualInput, type LookaheadProgressActualPlan, MINIMUM_GROUP_DEPTH, MINIMUM_GROUP_LEVEL, type MutationContext, NEW_ACTIVITY_DEFAULTS, NOT_STARTED_PROGRESS, ORDER_DIRECTION, ORDER_MODE, type OrderDirection, type OrderMode, type OrderRule, type OrderState, type ParsedInput, type PendingRequest, type PersistableActivityField, type PersistedEntityIdentity, type PersistenceCheckpoint, type PipelineColumnName, type ProjectWorkHours, REJECTION_REASON, ROOT_PARENT_ID, SCHEDULE_CORE_STATUS, SCHEDULE_EFFECT_KIND, SIR_AUTO_REJECT_REASON, STATUS, STATUS_CRITERIA, type ScheduleActivitiesApi, type ScheduleApiNamespaces, type ScheduleAutoScheduleAction, type ScheduleBaselinesApi, type ScheduleCalendarsApi, type ScheduleCellsApi, ScheduleCore, type ScheduleCoreInput, type ScheduleCoreReporter, type ScheduleCoreStatus, type ScheduleCriticalPathApi, type ScheduleP6Api as ScheduleDataDatesApi, type ScheduleDiagnosticsApi, type ScheduleEffect, type ScheduleHistoryApi, type ScheduleImpactRequestsApi, type ScheduleLinksApi, type SchedulePersistenceApi, type ScheduleProjectionApi, type ScheduleSelectionApi, type ScheduleViewApi, type SectorMetadata, type SelectionToggleInput, type StaticActivityDefaults, type StatusCriteria, type TrackingEvent, UNASSIGNED_GROUP_LABEL, UNASSIGNED_VALUE_ID, type UndoOptions, VIEW_ATTRIBUTE_KIND, VISUAL_ROW_KIND, type ViewAttributeAssignmentInput, type ViewAttributeCatalogInput, type ViewAttributeFilterCriterion, type ViewAttributeOrderRule, type ViewAttributeValueInput, type ViewFilterInput, type ViewStateChange, type ViewStatePropChange, type VisualRow, WORK_TIME_DIRECTION, type WbsDepth, type WithProplannerId, type WorkTimeDirection, allowedSecondaryConstraintTypes, appendGroupRowId, buildGroupRowId, checkNoUpdatedLinks, computeExpectedProgress, createLookaheadDerivedFields, createOutbuildP6ScheduleSettings as createOutbuildDataDateScheduleSettings, createSchedule, expectedProgressFromBaseline, formatUtcAsP6WallDate, getActiveBaseline, getUnsavedActivities, isRootParent, isViewAttributeCriterion, isViewAttributeOrderRule, mapP6ScheduleOptions as mapDataDateScheduleOptions, normalizeParentKey, parseFromBackend, parseP6DayAsCalendarStart, parseP6WallDateAsUtc, planLookaheadProgressActuals, prepareLookaheadProgressActuals, resolveExpectedFinishDateSelection, resolveLookaheadActualDateSelection, willRunCriticalPath, yieldToBrowser };
|
package/dist/index.d.ts
CHANGED
|
@@ -209,6 +209,9 @@ declare const DISPATCH_ACTION_KIND: {
|
|
|
209
209
|
readonly CALENDAR_RECONCILE: "calendar-reconcile";
|
|
210
210
|
readonly ACTIVITY_PASTE_COPIED: "activity-paste-copied";
|
|
211
211
|
readonly ACTIVITY_DUPLICATE: "activity-duplicate";
|
|
212
|
+
readonly CELL_COPY: "cell-copy";
|
|
213
|
+
readonly CELL_CLIPBOARD_CLEAR: "cell-clipboard-clear";
|
|
214
|
+
readonly CELL_PASTE_COPIED: "cell-paste-copied";
|
|
212
215
|
readonly PERSISTENCE_ACKNOWLEDGE: "persistence-acknowledge";
|
|
213
216
|
readonly BASELINE_APPLY: "baseline-apply";
|
|
214
217
|
readonly PONDERATOR_CRITERION_SET: "ponderator-criterion-set";
|
|
@@ -729,6 +732,19 @@ type DispatchAction = {
|
|
|
729
732
|
kind: typeof DISPATCH_ACTION_KIND.ACTIVITY_DUPLICATE;
|
|
730
733
|
activityIds: ReadonlyArray<ActivityId>;
|
|
731
734
|
eventSource?: string;
|
|
735
|
+
} | {
|
|
736
|
+
kind: typeof DISPATCH_ACTION_KIND.CELL_COPY;
|
|
737
|
+
activityId: ActivityId;
|
|
738
|
+
column: EditableColumnName;
|
|
739
|
+
eventSource?: string;
|
|
740
|
+
} | {
|
|
741
|
+
kind: typeof DISPATCH_ACTION_KIND.CELL_CLIPBOARD_CLEAR;
|
|
742
|
+
eventSource?: string;
|
|
743
|
+
} | {
|
|
744
|
+
kind: typeof DISPATCH_ACTION_KIND.CELL_PASTE_COPIED;
|
|
745
|
+
activityIds: ReadonlyArray<ActivityId>;
|
|
746
|
+
column: EditableColumnName;
|
|
747
|
+
eventSource?: string;
|
|
732
748
|
} | {
|
|
733
749
|
kind: typeof DISPATCH_ACTION_KIND.PERSISTENCE_ACKNOWLEDGE;
|
|
734
750
|
activities?: ReadonlyArray<PersistedEntityIdentity>;
|
|
@@ -2076,6 +2092,34 @@ interface ScheduleActivitiesApi {
|
|
|
2076
2092
|
*/
|
|
2077
2093
|
createDateGesturePreview(gesture: DateGesture): DateGesturePreview;
|
|
2078
2094
|
}
|
|
2095
|
+
/** Single-cell clipboard reads and mutations for a ready schedule. */
|
|
2096
|
+
interface ScheduleCellsApi {
|
|
2097
|
+
/**
|
|
2098
|
+
* Copies one activity's cell value to core-owned clipboard state.
|
|
2099
|
+
*
|
|
2100
|
+
* Predecessor and successor columns copy the underlying dependency links;
|
|
2101
|
+
* every other column copies its canonical field value.
|
|
2102
|
+
* @param activityId - Source activity.
|
|
2103
|
+
* @param column - Source column.
|
|
2104
|
+
* @param context - Optional consumer event source.
|
|
2105
|
+
* @returns The complete dispatch result.
|
|
2106
|
+
*/
|
|
2107
|
+
copy(activityId: ActivityId, column: EditableColumnName, context?: MutationContext): Promise<DispatchResult>;
|
|
2108
|
+
/**
|
|
2109
|
+
* Pastes the copied cell value into one or more activities' column.
|
|
2110
|
+
*
|
|
2111
|
+
* Predecessor and successor columns paste cross-compatibly with each
|
|
2112
|
+
* other; every other column is rejected unless its own pipeline accepts
|
|
2113
|
+
* the copied value.
|
|
2114
|
+
* @param activityIds - Destination activities.
|
|
2115
|
+
* @param column - Destination column.
|
|
2116
|
+
* @param context - Optional consumer event source.
|
|
2117
|
+
* @returns The complete dispatch result.
|
|
2118
|
+
*/
|
|
2119
|
+
paste(activityIds: ReadonlyArray<ActivityId>, column: EditableColumnName, context?: MutationContext): Promise<DispatchResult>;
|
|
2120
|
+
/** @returns The complete result of clearing core-owned cell clipboard state. */
|
|
2121
|
+
clearClipboard(context?: MutationContext): Promise<DispatchResult>;
|
|
2122
|
+
}
|
|
2079
2123
|
/** Dependency-link reads and mutations for a ready schedule. */
|
|
2080
2124
|
interface ScheduleLinksApi {
|
|
2081
2125
|
/** @returns A defensive link snapshot, or `null` when the ID is absent. */
|
|
@@ -2396,6 +2440,8 @@ interface ScheduleDiagnosticsApi {
|
|
|
2396
2440
|
interface ScheduleApiNamespaces {
|
|
2397
2441
|
/** Activity reads and mutations. */
|
|
2398
2442
|
readonly activities: ScheduleActivitiesApi;
|
|
2443
|
+
/** Single-cell clipboard reads and mutations. */
|
|
2444
|
+
readonly cells: ScheduleCellsApi;
|
|
2399
2445
|
/** Dependency-link reads and mutations. */
|
|
2400
2446
|
readonly links: ScheduleLinksApi;
|
|
2401
2447
|
/** Calendar reads and reconciliation. */
|
|
@@ -2727,6 +2773,8 @@ interface UndoOptions {
|
|
|
2727
2773
|
declare class ScheduleCore {
|
|
2728
2774
|
/** Activity reads and mutations. */
|
|
2729
2775
|
readonly activities: ScheduleApiNamespaces['activities'];
|
|
2776
|
+
/** Single-cell clipboard reads and mutations. */
|
|
2777
|
+
readonly cells: ScheduleApiNamespaces['cells'];
|
|
2730
2778
|
/** Dependency-link reads and mutations. */
|
|
2731
2779
|
readonly links: ScheduleApiNamespaces['links'];
|
|
2732
2780
|
/** Calendar reads and reconciliation. */
|
|
@@ -2751,6 +2799,7 @@ declare class ScheduleCore {
|
|
|
2751
2799
|
readonly diagnostics: ScheduleApiNamespaces['diagnostics'];
|
|
2752
2800
|
readonly dataDates: ScheduleP6Api;
|
|
2753
2801
|
private readonly _activityClipboard;
|
|
2802
|
+
private readonly _cellClipboard;
|
|
2754
2803
|
private _status;
|
|
2755
2804
|
private readonly coreRuntime;
|
|
2756
2805
|
private readonly _isFork;
|
|
@@ -3582,4 +3631,4 @@ declare const DISPATCH_TRACK_EVENT: {
|
|
|
3582
3631
|
/** Consumer analytics event name emitted by a schedule mutation. */
|
|
3583
3632
|
type DispatchTrackEvent = (typeof DISPATCH_TRACK_EVENT)[keyof typeof DISPATCH_TRACK_EVENT];
|
|
3584
3633
|
|
|
3585
|
-
export { ACTIVITY_BATCH_ACTION_KIND, ACTIVITY_BATCH_MODE, ACTIVITY_DATE_EDGE, ACTIVITY_FIELD, ACTIVITY_PONDERATOR_CRITERION, ACTIVITY_PROGRESS_ORIGIN, ACTIVITY_TYPE, type ActivityBaselineSnapshot, type ActivityBatchAction, type ActivityBatchInput, type ActivityBatchItem, type ActivityBatchItemInput, type ActivityBatchLinkInput$1 as ActivityBatchLinkInput, type ActivityBatchMode, type ActivityBatchParentReference, type ActivityBatchReference, type ActivityBulkEdit, type ActivityCreateInput, type ActivityCreationOverrides, type ActivityCreter, type ActivityDateEdge, type ActivityDateEdit, type ActivityField, type ActivityFieldEdit, type ActivityFieldValue, type ActivityId, type ActivityLookaheadSyncInput, type ActivityMoveInput, type ActivityStatus, type ActivityType, type ApplyLookaheadConversionInput, type BackendActivityInput, type BackendCalendarExceptionInput, type BackendCalendarInput, type BackendLinkInput, type BackendScheduleInput, type BackendSectorInput, type BackendShiftInput, type BaselinePoint, type BaselineVersion, type BranchOrderChange, CALENDAR_UNIT, CHANGE_SET_SOURCE_KIND, COLUMN, COMPLETED_PROGRESS, CONFIRMATION_KIND, CONSTRAINT_TYPE, CONSTRAINT_TYPE_TO_LABEL, CONSTRAINT_WARNING_KIND, CREATION_KIND, type Calendar, type CalendarId, type CalendarLike, type CalendarUnit, type CalendarWorktime, type ChangeSet, type ChangeSetSource, type ColumnName, type ConfirmationAlternative, type ConfirmationKind, type ConfirmationRequest, type ConstraintType, type ConstraintWarning, type CoreActivity, type CoreBaselinePoint, type CreationKind, type CriticalPathResult, P6_PROPERTY_CONTRACT as DATA_DATE_PROPERTY_CONTRACT, DATE_GESTURE_KIND, DEFAULT_HOURS_PER_DAY, DISPATCH_ACTION_KIND, DISPATCH_ACTION_KINDS, DISPATCH_LINK_OPERATION_KIND, DISPATCH_TRACK_EVENT, type P6ActivityCalculationInputs as DataDateActivityCalculationInputs, type P6ActivityColumnKey as DataDateActivityColumnKey, type P6ActivityData as DataDateActivityData, type P6ActivityDraftState as DataDateActivityDraftState, type P6ActivityInputPatch as DataDateActivityInputPatch, type P6ActivityState as DataDateActivityState, type P6ActivityType as DataDateActivityType, P6CapabilityError as DataDateCapabilityError, type P6CapabilityErrorCode as DataDateCapabilityErrorCode, type P6DependencyReference as DataDateDependencyReference, type P6DiagnosticProjectIdentity as DataDateDiagnosticProjectIdentity, type P6DiagnosticRelationship as DataDateDiagnosticRelationship, type P6DiagnosticRelationshipType as DataDateDiagnosticRelationshipType, type P6DurationType as DataDateDurationType, type P6EndingActivityOption as DataDateEndingActivityOption, type P6EndingActivityPage as DataDateEndingActivityPage, type P6EndingActivitySearch as DataDateEndingActivitySearch, type P6MappedScheduleOptions as DataDateMappedScheduleOptions, type P6MissingActivityInput as DataDateMissingActivityInput, type P6OutOfSequencePolicy as DataDateOutOfSequencePolicy, type P6ProjectPlannedStartChange as DataDateProjectPlannedStartChange, type P6ProjectState as DataDateProjectState, type P6PropertyContractRow as DataDatePropertyContractRow, type P6PropertyEdgeCases as DataDatePropertyEdgeCases, type P6RawProjectOptions as DataDateRawProjectOptions, type P6RawScheduleOptions as DataDateRawScheduleOptions, type P6RequiredHistoricalField as DataDateRequiredHistoricalField, type P6ResourceAssignment as DataDateResourceAssignment, type P6ScheduleDiagnostic as DataDateScheduleDiagnostic, type P6ScheduleDiagnosticCode as DataDateScheduleDiagnosticCode, type P6ScheduleInput as DataDateScheduleInput, type P6ScheduleReadiness as DataDateScheduleReadiness, type P6ScheduleResult as DataDateScheduleResult, type P6ScheduleRunLog as DataDateScheduleRunLog, type P6ScheduleSettings as DataDateScheduleSettings, type P6ScheduleWarning as DataDateScheduleWarning, type P6SettingsChange as DataDateSettingsChange, type DateGesture, type DateGestureKind, type DateGesturePreview, type DatesBatchVerdict, type DeletedActivitySnapshot, type DeletedLinkSnapshot, type DispatchAction, type DispatchActionKind, type DispatchManyAction, type DispatchManyChangeSetSource, type DispatchManyResult, type DispatchOptions, type DispatchRejectReason, type DispatchResult, type DispatchTrackEvent, EDIT_ALERT_KEY, EDIT_DENIAL_REASON, ENTITY_CHANGE_KIND, type EditAlertKey, type EditDenialReason, type EditResult, type EditableColumnName, type EffectiveGraphAudit, type EntityChange, type ActivityBatchLinkInput as ErgonomicActivityBatchLinkInput, type ExpectedProgressAdapter, FILTER_FIELD, FILTER_LOGIC, FILTER_OPERATOR, FILTER_REJECTION_REASON, FILTER_VALUE_KIND, FLAT_WBS_DEPTH, type FilterCriterion, type FilterCriterionGroup, type FilterCriterionValue, type FilterDateRange, type FilterField, type FilterLogic, type FilterOperator, type FilterRejection, type FilterState, type FilterValueKind, GROUP_ID_PREFIX, GROUP_ID_SEPARATOR, type GroupCriterion, type GroupCriterionInput, type GroupLevelWindow, type GroupState, type GroupStateInput, type ImpactRequestSyncInput, LINK_BATCH_OPERATION_KIND, LINK_CODE, LINK_CODE_TO_TYPE, LINK_REJECTION_REASON, LINK_RELATIONSHIP, LINK_TYPE, LINK_TYPE_CODE, type Link, type LinkBatchOperationKind, type LinkBatchRequest, type LinkBatchVerdict, type LinkCreateRequest, type LinkId, type LinkPatchRequest, type LinkRejection, type LinkRelationship, type LinkType, type LinkTypeCode, type LinkUpdateAction, type LinksBatchOperation, type LoadDiagnostic, type LoadDiagnosticCode, type LookaheadActualIntent, LookaheadActualTransitionError, type LookaheadActualTransitionErrorCode, type LookaheadConversionFormerParent, type LookaheadConversionGroup, type LookaheadConversionInput, type LookaheadConversionMilestoneMove, type LookaheadConversionPlan, type LookaheadConversionResult, type LookaheadDerivedCalendars, type LookaheadDerivedFields, type LookaheadDerivedFieldsResolver, type LookaheadDerivedInput, type LookaheadProgressActualActivityState, type LookaheadProgressActualInput, type LookaheadProgressActualPlan, MINIMUM_GROUP_DEPTH, MINIMUM_GROUP_LEVEL, type MutationContext, NEW_ACTIVITY_DEFAULTS, NOT_STARTED_PROGRESS, ORDER_DIRECTION, ORDER_MODE, type OrderDirection, type OrderMode, type OrderRule, type OrderState, type ParsedInput, type PendingRequest, type PersistableActivityField, type PersistedEntityIdentity, type PersistenceCheckpoint, type PipelineColumnName, type ProjectWorkHours, REJECTION_REASON, ROOT_PARENT_ID, SCHEDULE_CORE_STATUS, SCHEDULE_EFFECT_KIND, SIR_AUTO_REJECT_REASON, STATUS, STATUS_CRITERIA, type ScheduleActivitiesApi, type ScheduleApiNamespaces, type ScheduleAutoScheduleAction, type ScheduleBaselinesApi, type ScheduleCalendarsApi, ScheduleCore, type ScheduleCoreInput, type ScheduleCoreReporter, type ScheduleCoreStatus, type ScheduleCriticalPathApi, type ScheduleP6Api as ScheduleDataDatesApi, type ScheduleDiagnosticsApi, type ScheduleEffect, type ScheduleHistoryApi, type ScheduleImpactRequestsApi, type ScheduleLinksApi, type SchedulePersistenceApi, type ScheduleProjectionApi, type ScheduleSelectionApi, type ScheduleViewApi, type SectorMetadata, type SelectionToggleInput, type StaticActivityDefaults, type StatusCriteria, type TrackingEvent, UNASSIGNED_GROUP_LABEL, UNASSIGNED_VALUE_ID, type UndoOptions, VIEW_ATTRIBUTE_KIND, VISUAL_ROW_KIND, type ViewAttributeAssignmentInput, type ViewAttributeCatalogInput, type ViewAttributeFilterCriterion, type ViewAttributeOrderRule, type ViewAttributeValueInput, type ViewFilterInput, type ViewStateChange, type ViewStatePropChange, type VisualRow, WORK_TIME_DIRECTION, type WbsDepth, type WithProplannerId, type WorkTimeDirection, allowedSecondaryConstraintTypes, appendGroupRowId, buildGroupRowId, checkNoUpdatedLinks, computeExpectedProgress, createLookaheadDerivedFields, createOutbuildP6ScheduleSettings as createOutbuildDataDateScheduleSettings, createSchedule, expectedProgressFromBaseline, formatUtcAsP6WallDate, getActiveBaseline, getUnsavedActivities, isRootParent, isViewAttributeCriterion, isViewAttributeOrderRule, mapP6ScheduleOptions as mapDataDateScheduleOptions, normalizeParentKey, parseFromBackend, parseP6DayAsCalendarStart, parseP6WallDateAsUtc, planLookaheadProgressActuals, prepareLookaheadProgressActuals, resolveExpectedFinishDateSelection, resolveLookaheadActualDateSelection, willRunCriticalPath, yieldToBrowser };
|
|
3634
|
+
export { ACTIVITY_BATCH_ACTION_KIND, ACTIVITY_BATCH_MODE, ACTIVITY_DATE_EDGE, ACTIVITY_FIELD, ACTIVITY_PONDERATOR_CRITERION, ACTIVITY_PROGRESS_ORIGIN, ACTIVITY_TYPE, type ActivityBaselineSnapshot, type ActivityBatchAction, type ActivityBatchInput, type ActivityBatchItem, type ActivityBatchItemInput, type ActivityBatchLinkInput$1 as ActivityBatchLinkInput, type ActivityBatchMode, type ActivityBatchParentReference, type ActivityBatchReference, type ActivityBulkEdit, type ActivityCreateInput, type ActivityCreationOverrides, type ActivityCreter, type ActivityDateEdge, type ActivityDateEdit, type ActivityField, type ActivityFieldEdit, type ActivityFieldValue, type ActivityId, type ActivityLookaheadSyncInput, type ActivityMoveInput, type ActivityStatus, type ActivityType, type ApplyLookaheadConversionInput, type BackendActivityInput, type BackendCalendarExceptionInput, type BackendCalendarInput, type BackendLinkInput, type BackendScheduleInput, type BackendSectorInput, type BackendShiftInput, type BaselinePoint, type BaselineVersion, type BranchOrderChange, CALENDAR_UNIT, CHANGE_SET_SOURCE_KIND, COLUMN, COMPLETED_PROGRESS, CONFIRMATION_KIND, CONSTRAINT_TYPE, CONSTRAINT_TYPE_TO_LABEL, CONSTRAINT_WARNING_KIND, CREATION_KIND, type Calendar, type CalendarId, type CalendarLike, type CalendarUnit, type CalendarWorktime, type ChangeSet, type ChangeSetSource, type ColumnName, type ConfirmationAlternative, type ConfirmationKind, type ConfirmationRequest, type ConstraintType, type ConstraintWarning, type CoreActivity, type CoreBaselinePoint, type CreationKind, type CriticalPathResult, P6_PROPERTY_CONTRACT as DATA_DATE_PROPERTY_CONTRACT, DATE_GESTURE_KIND, DEFAULT_HOURS_PER_DAY, DISPATCH_ACTION_KIND, DISPATCH_ACTION_KINDS, DISPATCH_LINK_OPERATION_KIND, DISPATCH_TRACK_EVENT, type P6ActivityCalculationInputs as DataDateActivityCalculationInputs, type P6ActivityColumnKey as DataDateActivityColumnKey, type P6ActivityData as DataDateActivityData, type P6ActivityDraftState as DataDateActivityDraftState, type P6ActivityInputPatch as DataDateActivityInputPatch, type P6ActivityState as DataDateActivityState, type P6ActivityType as DataDateActivityType, P6CapabilityError as DataDateCapabilityError, type P6CapabilityErrorCode as DataDateCapabilityErrorCode, type P6DependencyReference as DataDateDependencyReference, type P6DiagnosticProjectIdentity as DataDateDiagnosticProjectIdentity, type P6DiagnosticRelationship as DataDateDiagnosticRelationship, type P6DiagnosticRelationshipType as DataDateDiagnosticRelationshipType, type P6DurationType as DataDateDurationType, type P6EndingActivityOption as DataDateEndingActivityOption, type P6EndingActivityPage as DataDateEndingActivityPage, type P6EndingActivitySearch as DataDateEndingActivitySearch, type P6MappedScheduleOptions as DataDateMappedScheduleOptions, type P6MissingActivityInput as DataDateMissingActivityInput, type P6OutOfSequencePolicy as DataDateOutOfSequencePolicy, type P6ProjectPlannedStartChange as DataDateProjectPlannedStartChange, type P6ProjectState as DataDateProjectState, type P6PropertyContractRow as DataDatePropertyContractRow, type P6PropertyEdgeCases as DataDatePropertyEdgeCases, type P6RawProjectOptions as DataDateRawProjectOptions, type P6RawScheduleOptions as DataDateRawScheduleOptions, type P6RequiredHistoricalField as DataDateRequiredHistoricalField, type P6ResourceAssignment as DataDateResourceAssignment, type P6ScheduleDiagnostic as DataDateScheduleDiagnostic, type P6ScheduleDiagnosticCode as DataDateScheduleDiagnosticCode, type P6ScheduleInput as DataDateScheduleInput, type P6ScheduleReadiness as DataDateScheduleReadiness, type P6ScheduleResult as DataDateScheduleResult, type P6ScheduleRunLog as DataDateScheduleRunLog, type P6ScheduleSettings as DataDateScheduleSettings, type P6ScheduleWarning as DataDateScheduleWarning, type P6SettingsChange as DataDateSettingsChange, type DateGesture, type DateGestureKind, type DateGesturePreview, type DatesBatchVerdict, type DeletedActivitySnapshot, type DeletedLinkSnapshot, type DispatchAction, type DispatchActionKind, type DispatchManyAction, type DispatchManyChangeSetSource, type DispatchManyResult, type DispatchOptions, type DispatchRejectReason, type DispatchResult, type DispatchTrackEvent, EDIT_ALERT_KEY, EDIT_DENIAL_REASON, ENTITY_CHANGE_KIND, type EditAlertKey, type EditDenialReason, type EditResult, type EditableColumnName, type EffectiveGraphAudit, type EntityChange, type ActivityBatchLinkInput as ErgonomicActivityBatchLinkInput, type ExpectedProgressAdapter, FILTER_FIELD, FILTER_LOGIC, FILTER_OPERATOR, FILTER_REJECTION_REASON, FILTER_VALUE_KIND, FLAT_WBS_DEPTH, type FilterCriterion, type FilterCriterionGroup, type FilterCriterionValue, type FilterDateRange, type FilterField, type FilterLogic, type FilterOperator, type FilterRejection, type FilterState, type FilterValueKind, GROUP_ID_PREFIX, GROUP_ID_SEPARATOR, type GroupCriterion, type GroupCriterionInput, type GroupLevelWindow, type GroupState, type GroupStateInput, type ImpactRequestSyncInput, LINK_BATCH_OPERATION_KIND, LINK_CODE, LINK_CODE_TO_TYPE, LINK_REJECTION_REASON, LINK_RELATIONSHIP, LINK_TYPE, LINK_TYPE_CODE, type Link, type LinkBatchOperationKind, type LinkBatchRequest, type LinkBatchVerdict, type LinkCreateRequest, type LinkId, type LinkPatchRequest, type LinkRejection, type LinkRelationship, type LinkType, type LinkTypeCode, type LinkUpdateAction, type LinksBatchOperation, type LoadDiagnostic, type LoadDiagnosticCode, type LookaheadActualIntent, LookaheadActualTransitionError, type LookaheadActualTransitionErrorCode, type LookaheadConversionFormerParent, type LookaheadConversionGroup, type LookaheadConversionInput, type LookaheadConversionMilestoneMove, type LookaheadConversionPlan, type LookaheadConversionResult, type LookaheadDerivedCalendars, type LookaheadDerivedFields, type LookaheadDerivedFieldsResolver, type LookaheadDerivedInput, type LookaheadProgressActualActivityState, type LookaheadProgressActualInput, type LookaheadProgressActualPlan, MINIMUM_GROUP_DEPTH, MINIMUM_GROUP_LEVEL, type MutationContext, NEW_ACTIVITY_DEFAULTS, NOT_STARTED_PROGRESS, ORDER_DIRECTION, ORDER_MODE, type OrderDirection, type OrderMode, type OrderRule, type OrderState, type ParsedInput, type PendingRequest, type PersistableActivityField, type PersistedEntityIdentity, type PersistenceCheckpoint, type PipelineColumnName, type ProjectWorkHours, REJECTION_REASON, ROOT_PARENT_ID, SCHEDULE_CORE_STATUS, SCHEDULE_EFFECT_KIND, SIR_AUTO_REJECT_REASON, STATUS, STATUS_CRITERIA, type ScheduleActivitiesApi, type ScheduleApiNamespaces, type ScheduleAutoScheduleAction, type ScheduleBaselinesApi, type ScheduleCalendarsApi, type ScheduleCellsApi, ScheduleCore, type ScheduleCoreInput, type ScheduleCoreReporter, type ScheduleCoreStatus, type ScheduleCriticalPathApi, type ScheduleP6Api as ScheduleDataDatesApi, type ScheduleDiagnosticsApi, type ScheduleEffect, type ScheduleHistoryApi, type ScheduleImpactRequestsApi, type ScheduleLinksApi, type SchedulePersistenceApi, type ScheduleProjectionApi, type ScheduleSelectionApi, type ScheduleViewApi, type SectorMetadata, type SelectionToggleInput, type StaticActivityDefaults, type StatusCriteria, type TrackingEvent, UNASSIGNED_GROUP_LABEL, UNASSIGNED_VALUE_ID, type UndoOptions, VIEW_ATTRIBUTE_KIND, VISUAL_ROW_KIND, type ViewAttributeAssignmentInput, type ViewAttributeCatalogInput, type ViewAttributeFilterCriterion, type ViewAttributeOrderRule, type ViewAttributeValueInput, type ViewFilterInput, type ViewStateChange, type ViewStatePropChange, type VisualRow, WORK_TIME_DIRECTION, type WbsDepth, type WithProplannerId, type WorkTimeDirection, allowedSecondaryConstraintTypes, appendGroupRowId, buildGroupRowId, checkNoUpdatedLinks, computeExpectedProgress, createLookaheadDerivedFields, createOutbuildP6ScheduleSettings as createOutbuildDataDateScheduleSettings, createSchedule, expectedProgressFromBaseline, formatUtcAsP6WallDate, getActiveBaseline, getUnsavedActivities, isRootParent, isViewAttributeCriterion, isViewAttributeOrderRule, mapP6ScheduleOptions as mapDataDateScheduleOptions, normalizeParentKey, parseFromBackend, parseP6DayAsCalendarStart, parseP6WallDateAsUtc, planLookaheadProgressActuals, prepareLookaheadProgressActuals, resolveExpectedFinishDateSelection, resolveLookaheadActualDateSelection, willRunCriticalPath, yieldToBrowser };
|
package/dist/index.js
CHANGED
|
@@ -344,6 +344,9 @@ var DISPATCH_ACTION_KIND = {
|
|
|
344
344
|
CALENDAR_RECONCILE: "calendar-reconcile",
|
|
345
345
|
ACTIVITY_PASTE_COPIED: "activity-paste-copied",
|
|
346
346
|
ACTIVITY_DUPLICATE: "activity-duplicate",
|
|
347
|
+
CELL_COPY: "cell-copy",
|
|
348
|
+
CELL_CLIPBOARD_CLEAR: "cell-clipboard-clear",
|
|
349
|
+
CELL_PASTE_COPIED: "cell-paste-copied",
|
|
347
350
|
PERSISTENCE_ACKNOWLEDGE: "persistence-acknowledge",
|
|
348
351
|
BASELINE_APPLY: "baseline-apply",
|
|
349
352
|
PONDERATOR_CRITERION_SET: "ponderator-criterion-set",
|
|
@@ -615,6 +618,26 @@ function createActivitiesApi(engine) {
|
|
|
615
618
|
createDateGesturePreview: (gesture) => engine.createDateGesturePreview(gesture)
|
|
616
619
|
};
|
|
617
620
|
}
|
|
621
|
+
function createCellsApi(engine) {
|
|
622
|
+
return {
|
|
623
|
+
copy: (activityId, column, context = {}) => engine.dispatch({
|
|
624
|
+
...context,
|
|
625
|
+
kind: DISPATCH_ACTION_KIND.CELL_COPY,
|
|
626
|
+
activityId,
|
|
627
|
+
column
|
|
628
|
+
}),
|
|
629
|
+
paste: (activityIds, column, context = {}) => engine.dispatch({
|
|
630
|
+
...context,
|
|
631
|
+
kind: DISPATCH_ACTION_KIND.CELL_PASTE_COPIED,
|
|
632
|
+
activityIds,
|
|
633
|
+
column
|
|
634
|
+
}),
|
|
635
|
+
clearClipboard: (context = {}) => engine.dispatch({
|
|
636
|
+
...context,
|
|
637
|
+
kind: DISPATCH_ACTION_KIND.CELL_CLIPBOARD_CLEAR
|
|
638
|
+
})
|
|
639
|
+
};
|
|
640
|
+
}
|
|
618
641
|
function createLinksApi(engine) {
|
|
619
642
|
return {
|
|
620
643
|
get: (id) => engine.getLinkView(id),
|
|
@@ -662,6 +685,7 @@ function createScheduleNamespaces(engine) {
|
|
|
662
685
|
);
|
|
663
686
|
return {
|
|
664
687
|
activities: createActivitiesApi(engine),
|
|
688
|
+
cells: createCellsApi(engine),
|
|
665
689
|
links: createLinksApi(engine),
|
|
666
690
|
calendars: {
|
|
667
691
|
get: (id) => engine.getCalendar(id),
|
|
@@ -3892,7 +3916,7 @@ function applyLinkOperation(op, deps) {
|
|
|
3892
3916
|
return applyDelete(op, deps);
|
|
3893
3917
|
}
|
|
3894
3918
|
}
|
|
3895
|
-
function
|
|
3919
|
+
function validateLinkCreateBatch(links, deps) {
|
|
3896
3920
|
if (links.length === 0) return { applied: true };
|
|
3897
3921
|
const existingLinks = deps.port.getAllLinks();
|
|
3898
3922
|
const duplicateKeys = /* @__PURE__ */ new Map();
|
|
@@ -3976,6 +4000,12 @@ function applyLinkCreates(links, deps) {
|
|
|
3976
4000
|
if (!effectiveVerdict.ok) {
|
|
3977
4001
|
return { applied: false, rejected: LINK_REJECTION_REASON.CYCLE };
|
|
3978
4002
|
}
|
|
4003
|
+
return { applied: true };
|
|
4004
|
+
}
|
|
4005
|
+
function applyLinkCreates(links, deps) {
|
|
4006
|
+
if (links.length === 0) return { applied: true };
|
|
4007
|
+
const validation = validateLinkCreateBatch(links, deps);
|
|
4008
|
+
if (!validation.applied) return validation;
|
|
3979
4009
|
for (const { operation, linkId } of links) {
|
|
3980
4010
|
const preserved = deps.preserved?.get(linkId);
|
|
3981
4011
|
deps.port.addLink({
|
|
@@ -11713,6 +11743,8 @@ var NON_SCHEDULING_INLINE_COLUMNS = /* @__PURE__ */ new Set([
|
|
|
11713
11743
|
var NON_SCHEDULING_KINDS = /* @__PURE__ */ new Set([
|
|
11714
11744
|
DISPATCH_ACTION_KIND.ACTIVITY_CLIPBOARD_CLEAR,
|
|
11715
11745
|
DISPATCH_ACTION_KIND.ACTIVITY_COPY,
|
|
11746
|
+
DISPATCH_ACTION_KIND.CELL_CLIPBOARD_CLEAR,
|
|
11747
|
+
DISPATCH_ACTION_KIND.CELL_COPY,
|
|
11716
11748
|
DISPATCH_ACTION_KIND.SELECTION_TOGGLE,
|
|
11717
11749
|
DISPATCH_ACTION_KIND.SELECTION_REPLACE,
|
|
11718
11750
|
DISPATCH_ACTION_KIND.VISIBILITY_SET,
|
|
@@ -11731,6 +11763,8 @@ var NON_SCHEDULING_KINDS = /* @__PURE__ */ new Set([
|
|
|
11731
11763
|
var PURE_VIEW_STATE_KINDS = /* @__PURE__ */ new Set([
|
|
11732
11764
|
DISPATCH_ACTION_KIND.ACTIVITY_CLIPBOARD_CLEAR,
|
|
11733
11765
|
DISPATCH_ACTION_KIND.ACTIVITY_COPY,
|
|
11766
|
+
DISPATCH_ACTION_KIND.CELL_CLIPBOARD_CLEAR,
|
|
11767
|
+
DISPATCH_ACTION_KIND.CELL_COPY,
|
|
11734
11768
|
DISPATCH_ACTION_KIND.SELECTION_TOGGLE,
|
|
11735
11769
|
DISPATCH_ACTION_KIND.SELECTION_REPLACE,
|
|
11736
11770
|
DISPATCH_ACTION_KIND.VISIBILITY_SET,
|
|
@@ -11748,7 +11782,7 @@ function reappliesViewState(action) {
|
|
|
11748
11782
|
}
|
|
11749
11783
|
var NO_STRUCTURAL_EXEMPTIONS = /* @__PURE__ */ new Set();
|
|
11750
11784
|
function editsOnlyNonSchedulingColumns(action) {
|
|
11751
|
-
if (action.kind === DISPATCH_ACTION_KIND.INLINE_EDIT) {
|
|
11785
|
+
if (action.kind === DISPATCH_ACTION_KIND.INLINE_EDIT || action.kind === DISPATCH_ACTION_KIND.CELL_PASTE_COPIED) {
|
|
11752
11786
|
return NON_SCHEDULING_INLINE_COLUMNS.has(action.column);
|
|
11753
11787
|
}
|
|
11754
11788
|
if (action.kind === DISPATCH_ACTION_KIND.BULK_EDIT) {
|
|
@@ -11759,7 +11793,7 @@ function editsOnlyNonSchedulingColumns(action) {
|
|
|
11759
11793
|
return false;
|
|
11760
11794
|
}
|
|
11761
11795
|
function editsOnlyDataDateColumns(action) {
|
|
11762
|
-
if (action.kind === DISPATCH_ACTION_KIND.INLINE_EDIT) {
|
|
11796
|
+
if (action.kind === DISPATCH_ACTION_KIND.INLINE_EDIT || action.kind === DISPATCH_ACTION_KIND.CELL_PASTE_COPIED) {
|
|
11763
11797
|
return DATA_DATE_COLUMNS.has(action.column);
|
|
11764
11798
|
}
|
|
11765
11799
|
return action.kind === DISPATCH_ACTION_KIND.BULK_EDIT && action.edits.every((edit) => DATA_DATE_COLUMNS.has(edit.column));
|
|
@@ -11801,6 +11835,9 @@ function dispatchChangesProgress(action) {
|
|
|
11801
11835
|
if (action.kind === DISPATCH_ACTION_KIND.BULK_EDIT) {
|
|
11802
11836
|
return action.edits.some((edit) => edit.column === COLUMN.PROGRESS);
|
|
11803
11837
|
}
|
|
11838
|
+
if (action.kind === DISPATCH_ACTION_KIND.CELL_PASTE_COPIED) {
|
|
11839
|
+
return action.column === COLUMN.PROGRESS;
|
|
11840
|
+
}
|
|
11804
11841
|
return false;
|
|
11805
11842
|
}
|
|
11806
11843
|
function resolveRunRealCost(action) {
|
|
@@ -11816,7 +11853,7 @@ var PROGRESS_AFFECTING_COLUMNS = /* @__PURE__ */ new Set([
|
|
|
11816
11853
|
]);
|
|
11817
11854
|
function shouldRecomputeParentProgress(action) {
|
|
11818
11855
|
if (action.kind === DISPATCH_ACTION_KIND.ACTIVITY_SET_PROGRESS) return true;
|
|
11819
|
-
if (action.kind === DISPATCH_ACTION_KIND.INLINE_EDIT) {
|
|
11856
|
+
if (action.kind === DISPATCH_ACTION_KIND.INLINE_EDIT || action.kind === DISPATCH_ACTION_KIND.CELL_PASTE_COPIED) {
|
|
11820
11857
|
return PROGRESS_AFFECTING_COLUMNS.has(action.column);
|
|
11821
11858
|
}
|
|
11822
11859
|
if (action.kind === DISPATCH_ACTION_KIND.BULK_EDIT) {
|
|
@@ -12788,6 +12825,15 @@ function mergeScheduledIds(firstSettleIds, secondSettleIds) {
|
|
|
12788
12825
|
}
|
|
12789
12826
|
|
|
12790
12827
|
// src/dispatch/shared/helpers.ts
|
|
12828
|
+
function getIncidentLinkSnapshots(adapter, activityId, isPredecessors) {
|
|
12829
|
+
const incidentLinkIds = isPredecessors ? adapter.getIncomingLinkIds(activityId) : adapter.getOutgoingLinkIds(activityId);
|
|
12830
|
+
const links = [];
|
|
12831
|
+
for (const linkId of incidentLinkIds) {
|
|
12832
|
+
const link = adapter.getLink(linkId);
|
|
12833
|
+
if (link) links.push(link);
|
|
12834
|
+
}
|
|
12835
|
+
return links;
|
|
12836
|
+
}
|
|
12791
12837
|
function buildLinkChangesForBatch(applied, beforeLinks, adapter) {
|
|
12792
12838
|
const out = [];
|
|
12793
12839
|
for (const { op, finalLinkId, rejected: rejected2 } of applied) {
|
|
@@ -14014,12 +14060,11 @@ async function dispatchInlineEditLinks(action, options, deps) {
|
|
|
14014
14060
|
byCorrelative.set(String(a.correlativeId), a.id);
|
|
14015
14061
|
});
|
|
14016
14062
|
const resolve = (corr) => byCorrelative.get(corr) ?? null;
|
|
14017
|
-
const
|
|
14018
|
-
|
|
14019
|
-
|
|
14020
|
-
|
|
14021
|
-
|
|
14022
|
-
}
|
|
14063
|
+
const currentLinks = getIncidentLinkSnapshots(
|
|
14064
|
+
adapter,
|
|
14065
|
+
action.activityId,
|
|
14066
|
+
isPredecessors
|
|
14067
|
+
);
|
|
14023
14068
|
const diff = isPredecessors ? diffLinks({
|
|
14024
14069
|
targetActivityId: action.activityId,
|
|
14025
14070
|
currentLinks,
|
|
@@ -18774,6 +18819,170 @@ function replicateInternalLinks(state, deps) {
|
|
|
18774
18819
|
return applied;
|
|
18775
18820
|
}
|
|
18776
18821
|
|
|
18822
|
+
// src/cell-copy-paste/copy.ts
|
|
18823
|
+
var CELL_CLIPBOARD_KIND = {
|
|
18824
|
+
FIELD: "field",
|
|
18825
|
+
LINKS: "links"
|
|
18826
|
+
};
|
|
18827
|
+
function copyLinkSpecs(adapter, activityId, isPredecessors) {
|
|
18828
|
+
return getIncidentLinkSnapshots(adapter, activityId, isPredecessors).map(
|
|
18829
|
+
(link) => ({
|
|
18830
|
+
otherActivityId: isPredecessors ? link.source : link.target,
|
|
18831
|
+
type: link.type,
|
|
18832
|
+
lag: link.lag
|
|
18833
|
+
})
|
|
18834
|
+
);
|
|
18835
|
+
}
|
|
18836
|
+
function emptyChangeSet(action) {
|
|
18837
|
+
return {
|
|
18838
|
+
ok: true,
|
|
18839
|
+
changes: {
|
|
18840
|
+
source: action,
|
|
18841
|
+
activities: [],
|
|
18842
|
+
links: [],
|
|
18843
|
+
calendars: [],
|
|
18844
|
+
trackingEvents: []
|
|
18845
|
+
}
|
|
18846
|
+
};
|
|
18847
|
+
}
|
|
18848
|
+
function dispatchCellCopy(action, deps) {
|
|
18849
|
+
const activity = deps.adapter.getActivity(action.activityId);
|
|
18850
|
+
if (!activity) {
|
|
18851
|
+
return { ok: false, reason: REJECTION_REASON.ACTIVITY_NOT_FOUND };
|
|
18852
|
+
}
|
|
18853
|
+
if (action.column === COLUMN.CUSTOM_PREDECESSORS || action.column === COLUMN.CUSTOM_SUCESSORS) {
|
|
18854
|
+
deps.clipboard.value = {
|
|
18855
|
+
kind: CELL_CLIPBOARD_KIND.LINKS,
|
|
18856
|
+
specs: copyLinkSpecs(
|
|
18857
|
+
deps.adapter,
|
|
18858
|
+
action.activityId,
|
|
18859
|
+
action.column === COLUMN.CUSTOM_PREDECESSORS
|
|
18860
|
+
)
|
|
18861
|
+
};
|
|
18862
|
+
return emptyChangeSet(action);
|
|
18863
|
+
}
|
|
18864
|
+
const pipeline = findPipelineForColumn(action.column);
|
|
18865
|
+
if (!pipeline) {
|
|
18866
|
+
return { ok: false, reason: REJECTION_REASON.NO_PIPELINE_FOR_COLUMN };
|
|
18867
|
+
}
|
|
18868
|
+
const canonicalValue = readPipelineTargetValue(activity, pipeline.targetField);
|
|
18869
|
+
if (action.column === COLUMN.DURATION && !Number.isFinite(canonicalValue)) {
|
|
18870
|
+
return { ok: false, reason: REJECTION_REASON.INVALID_VALUE };
|
|
18871
|
+
}
|
|
18872
|
+
const raw = action.column === COLUMN.DURATION ? canonicalValue / deps.hoursPerDay : cloneDomainValue(canonicalValue);
|
|
18873
|
+
deps.clipboard.value = { kind: CELL_CLIPBOARD_KIND.FIELD, raw };
|
|
18874
|
+
return emptyChangeSet(action);
|
|
18875
|
+
}
|
|
18876
|
+
function dispatchCellClipboardClear(action, clipboard) {
|
|
18877
|
+
clipboard.value = null;
|
|
18878
|
+
return emptyChangeSet(action);
|
|
18879
|
+
}
|
|
18880
|
+
|
|
18881
|
+
// src/cell-copy-paste/paste.ts
|
|
18882
|
+
function toDiffPlaceholder(activityId) {
|
|
18883
|
+
return String(activityId);
|
|
18884
|
+
}
|
|
18885
|
+
function fromDiffPlaceholder(adapter, placeholder) {
|
|
18886
|
+
const activityId = placeholder;
|
|
18887
|
+
return adapter.activityExists(activityId) ? activityId : null;
|
|
18888
|
+
}
|
|
18889
|
+
function linkOperationsForTarget(targetActivityId, isPredecessors, clipboard, deps) {
|
|
18890
|
+
const desiredSpecs = clipboard.specs.map((spec) => ({
|
|
18891
|
+
correlativeId: toDiffPlaceholder(spec.otherActivityId),
|
|
18892
|
+
type: spec.type,
|
|
18893
|
+
lag: spec.lag
|
|
18894
|
+
}));
|
|
18895
|
+
const currentLinks = getIncidentLinkSnapshots(
|
|
18896
|
+
deps.adapter,
|
|
18897
|
+
targetActivityId,
|
|
18898
|
+
isPredecessors
|
|
18899
|
+
);
|
|
18900
|
+
const resolve = (placeholder) => fromDiffPlaceholder(deps.adapter, placeholder);
|
|
18901
|
+
const diff = isPredecessors ? diffLinks({
|
|
18902
|
+
targetActivityId,
|
|
18903
|
+
currentLinks,
|
|
18904
|
+
desiredSpecs,
|
|
18905
|
+
resolveActivityByCorrelative: resolve
|
|
18906
|
+
}) : diffOutgoingLinks({
|
|
18907
|
+
sourceActivityId: targetActivityId,
|
|
18908
|
+
currentLinks,
|
|
18909
|
+
desiredSpecs,
|
|
18910
|
+
resolveActivityByCorrelative: resolve
|
|
18911
|
+
});
|
|
18912
|
+
return diff.operations;
|
|
18913
|
+
}
|
|
18914
|
+
async function dispatchCellPasteCopied(action, options, deps) {
|
|
18915
|
+
const clipboard = deps.cellClipboard.value;
|
|
18916
|
+
if (clipboard === null) {
|
|
18917
|
+
return { ok: false, reason: REJECTION_REASON.CLIPBOARD_EMPTY };
|
|
18918
|
+
}
|
|
18919
|
+
if (action.activityIds.length === 0) {
|
|
18920
|
+
return { ok: false, reason: REJECTION_REASON.ACTIVITY_IDS_EMPTY };
|
|
18921
|
+
}
|
|
18922
|
+
const hasMissingActivity = action.activityIds.some(
|
|
18923
|
+
(activityId) => !deps.adapter.activityExists(activityId)
|
|
18924
|
+
);
|
|
18925
|
+
if (hasMissingActivity) {
|
|
18926
|
+
return { ok: false, reason: REJECTION_REASON.ACTIVITY_NOT_FOUND };
|
|
18927
|
+
}
|
|
18928
|
+
if (action.column === COLUMN.CUSTOM_PREDECESSORS || action.column === COLUMN.CUSTOM_SUCESSORS) {
|
|
18929
|
+
if (clipboard.kind !== CELL_CLIPBOARD_KIND.LINKS) {
|
|
18930
|
+
return { ok: false, reason: REJECTION_REASON.INVALID_VALUE };
|
|
18931
|
+
}
|
|
18932
|
+
const hasSelfReference = action.activityIds.some(
|
|
18933
|
+
(activityId) => clipboard.specs.some(
|
|
18934
|
+
(spec) => String(spec.otherActivityId) === String(activityId)
|
|
18935
|
+
)
|
|
18936
|
+
);
|
|
18937
|
+
if (hasSelfReference) {
|
|
18938
|
+
return { ok: false, reason: LINK_REJECTION_REASON.SELF_LINK };
|
|
18939
|
+
}
|
|
18940
|
+
const isPredecessors = action.column === COLUMN.CUSTOM_PREDECESSORS;
|
|
18941
|
+
const operations = action.activityIds.flatMap(
|
|
18942
|
+
(activityId) => linkOperationsForTarget(activityId, isPredecessors, clipboard, deps)
|
|
18943
|
+
);
|
|
18944
|
+
const createEntries = operations.filter(
|
|
18945
|
+
(operation) => operation.kind === LINK_OPERATION_KIND.CREATE
|
|
18946
|
+
).map((operation) => ({
|
|
18947
|
+
operation,
|
|
18948
|
+
linkId: deps.linkIdGen.next()
|
|
18949
|
+
}));
|
|
18950
|
+
const creation = validateLinkCreateBatch(createEntries, {
|
|
18951
|
+
port: deps.adapter,
|
|
18952
|
+
rejectParentLinkMutations: options.rejectParentLinkMutations ?? false
|
|
18953
|
+
});
|
|
18954
|
+
if (!creation.applied) {
|
|
18955
|
+
return {
|
|
18956
|
+
ok: false,
|
|
18957
|
+
reason: creation.rejected ?? REJECTION_REASON.INVALID
|
|
18958
|
+
};
|
|
18959
|
+
}
|
|
18960
|
+
return dispatchLinkBatch(operations, action, options, deps);
|
|
18961
|
+
}
|
|
18962
|
+
if (clipboard.kind !== CELL_CLIPBOARD_KIND.FIELD) {
|
|
18963
|
+
return { ok: false, reason: REJECTION_REASON.INVALID_VALUE };
|
|
18964
|
+
}
|
|
18965
|
+
if (!findPipelineForColumn(action.column)) {
|
|
18966
|
+
return { ok: false, reason: REJECTION_REASON.NO_PIPELINE_FOR_COLUMN };
|
|
18967
|
+
}
|
|
18968
|
+
const column = action.column;
|
|
18969
|
+
const result = await dispatchBulkEdit(
|
|
18970
|
+
{
|
|
18971
|
+
kind: DISPATCH_ACTION_KIND.BULK_EDIT,
|
|
18972
|
+
edits: action.activityIds.map((activityId) => ({
|
|
18973
|
+
activityId,
|
|
18974
|
+
column,
|
|
18975
|
+
newValue: clipboard.raw
|
|
18976
|
+
})),
|
|
18977
|
+
...action.eventSource === void 0 ? {} : { eventSource: action.eventSource }
|
|
18978
|
+
},
|
|
18979
|
+
options,
|
|
18980
|
+
deps
|
|
18981
|
+
);
|
|
18982
|
+
if (!result.ok) return result;
|
|
18983
|
+
return { ...result, changes: { ...result.changes, source: action } };
|
|
18984
|
+
}
|
|
18985
|
+
|
|
18777
18986
|
// src/dispatch/dispatch.ts
|
|
18778
18987
|
async function performDispatch(action, options, deps) {
|
|
18779
18988
|
if (action.kind === DISPATCH_ACTION_KIND.ACTIVITY_COPY) {
|
|
@@ -18794,6 +19003,19 @@ async function performDispatch(action, options, deps) {
|
|
|
18794
19003
|
if (action.kind === DISPATCH_ACTION_KIND.ACTIVITY_DUPLICATE) {
|
|
18795
19004
|
return dispatchActivityDuplicate(action, options, deps);
|
|
18796
19005
|
}
|
|
19006
|
+
if (action.kind === DISPATCH_ACTION_KIND.CELL_COPY) {
|
|
19007
|
+
return dispatchCellCopy(action, {
|
|
19008
|
+
adapter: deps.adapter,
|
|
19009
|
+
clipboard: deps.cellClipboard,
|
|
19010
|
+
hoursPerDay: deps.sector.hoursPerDay
|
|
19011
|
+
});
|
|
19012
|
+
}
|
|
19013
|
+
if (action.kind === DISPATCH_ACTION_KIND.CELL_CLIPBOARD_CLEAR) {
|
|
19014
|
+
return dispatchCellClipboardClear(action, deps.cellClipboard);
|
|
19015
|
+
}
|
|
19016
|
+
if (action.kind === DISPATCH_ACTION_KIND.CELL_PASTE_COPIED) {
|
|
19017
|
+
return dispatchCellPasteCopied(action, options, deps);
|
|
19018
|
+
}
|
|
18797
19019
|
if (action.kind === ACTIVITY_BATCH_ACTION_KIND) {
|
|
18798
19020
|
return dispatchActivityBatch(action, options, deps);
|
|
18799
19021
|
}
|
|
@@ -30466,7 +30688,7 @@ function validateP6EndingActivitySearch(input) {
|
|
|
30466
30688
|
);
|
|
30467
30689
|
}
|
|
30468
30690
|
}
|
|
30469
|
-
function
|
|
30691
|
+
function emptyChangeSet2(source) {
|
|
30470
30692
|
return {
|
|
30471
30693
|
source,
|
|
30472
30694
|
activities: [],
|
|
@@ -30504,6 +30726,8 @@ function isCurrentFilterProjection(projection, filter, context) {
|
|
|
30504
30726
|
var ScheduleCore = class _ScheduleCore {
|
|
30505
30727
|
/** Activity reads and mutations. */
|
|
30506
30728
|
activities;
|
|
30729
|
+
/** Single-cell clipboard reads and mutations. */
|
|
30730
|
+
cells;
|
|
30507
30731
|
/** Dependency-link reads and mutations. */
|
|
30508
30732
|
links;
|
|
30509
30733
|
/** Calendar reads and reconciliation. */
|
|
@@ -30541,6 +30765,7 @@ var ScheduleCore = class _ScheduleCore {
|
|
|
30541
30765
|
schedule: (patch) => this._scheduleP6(patch)
|
|
30542
30766
|
});
|
|
30543
30767
|
_activityClipboard = { value: null };
|
|
30768
|
+
_cellClipboard = { value: null };
|
|
30544
30769
|
_status = SCHEDULE_CORE_STATUS.READY;
|
|
30545
30770
|
coreRuntime;
|
|
30546
30771
|
_isFork;
|
|
@@ -30585,6 +30810,9 @@ var ScheduleCore = class _ScheduleCore {
|
|
|
30585
30810
|
this._activityClipboard.value = cloneDomainValue(
|
|
30586
30811
|
source._activityClipboard.value
|
|
30587
30812
|
);
|
|
30813
|
+
this._cellClipboard.value = cloneDomainValue(
|
|
30814
|
+
source._cellClipboard.value
|
|
30815
|
+
);
|
|
30588
30816
|
this._undo = source._undo.fork();
|
|
30589
30817
|
this._saveTracker = source._saveTracker.fork();
|
|
30590
30818
|
this._scheduleRevision = source._scheduleRevision;
|
|
@@ -31813,7 +32041,7 @@ var ScheduleCore = class _ScheduleCore {
|
|
|
31813
32041
|
});
|
|
31814
32042
|
continue;
|
|
31815
32043
|
}
|
|
31816
|
-
const changes =
|
|
32044
|
+
const changes = emptyChangeSet2(action);
|
|
31817
32045
|
results.push({ ok: true, changes });
|
|
31818
32046
|
acceptedChangeSets.push(changes);
|
|
31819
32047
|
acceptedActions.push(action);
|
|
@@ -31942,6 +32170,7 @@ var ScheduleCore = class _ScheduleCore {
|
|
|
31942
32170
|
customIdTracker: this.coreRuntime.customIdTracker,
|
|
31943
32171
|
reporter: this.coreRuntime.reporter,
|
|
31944
32172
|
activityClipboard: this._activityClipboard,
|
|
32173
|
+
cellClipboard: this._cellClipboard,
|
|
31945
32174
|
stateRevision: this._stateRevision,
|
|
31946
32175
|
defaultBaseCalendarId: this.coreRuntime.baseCalendars.find(
|
|
31947
32176
|
(calendar) => calendar.baseDefault
|