@outbuild-company/schedule-core 1.13.0 → 1.13.3
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 +72 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +33 -1
- package/dist/index.d.ts +33 -1
- package/dist/index.js +71 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -367,6 +367,36 @@ declare const NOT_STARTED_PROGRESS = 0;
|
|
|
367
367
|
/** Progress percentage representing a completed activity. */
|
|
368
368
|
declare const COMPLETED_PROGRESS = 100;
|
|
369
369
|
|
|
370
|
+
/** Canonical reasons why an activity field edit may be blocked. */
|
|
371
|
+
declare const EDIT_DENIAL_REASON: {
|
|
372
|
+
readonly COMPLETED: "completed";
|
|
373
|
+
readonly SUMMARY: "summary";
|
|
374
|
+
readonly HAS_PROGRESS: "has_progress";
|
|
375
|
+
readonly HAS_LOOKAHEAD_TASKS: "has_lookahead_tasks";
|
|
376
|
+
readonly SIR_START_AFTER_PROGRESS: "sir_start_after_progress";
|
|
377
|
+
};
|
|
378
|
+
/** Reason code returned when an activity field edit is blocked. */
|
|
379
|
+
type EditDenialReason = (typeof EDIT_DENIAL_REASON)[keyof typeof EDIT_DENIAL_REASON];
|
|
380
|
+
/** Canonical presentation keys associated with blocked activity edits. */
|
|
381
|
+
declare const EDIT_ALERT_KEY: {
|
|
382
|
+
readonly CANT_EDIT_COMPLETED: "cant_edit_completed_activity";
|
|
383
|
+
readonly SUMMARY_COLUMN_VALUE: "summary_column_value";
|
|
384
|
+
readonly CANT_EDIT_WITH_PROGRESS: "cant_edit_activity_with_progress";
|
|
385
|
+
readonly SIR_CANT_MOVE_START_AFTER_PROGRESS: "sir_cant_move_start_after_progress";
|
|
386
|
+
readonly CANT_EDIT_WITH_TASK: "cant_edit_actvity_with_task";
|
|
387
|
+
};
|
|
388
|
+
/** Presentation key optionally returned with a blocked activity edit. */
|
|
389
|
+
type EditAlertKey = (typeof EDIT_ALERT_KEY)[keyof typeof EDIT_ALERT_KEY];
|
|
390
|
+
|
|
391
|
+
/** Describes whether a column value can be edited and why it may be blocked. */
|
|
392
|
+
type EditResult = {
|
|
393
|
+
readonly allowed: true;
|
|
394
|
+
} | {
|
|
395
|
+
readonly allowed: false;
|
|
396
|
+
readonly reason: EditDenialReason;
|
|
397
|
+
readonly alertKey?: EditAlertKey;
|
|
398
|
+
};
|
|
399
|
+
|
|
370
400
|
declare const EDITABLE: {
|
|
371
401
|
readonly TEXT: "text";
|
|
372
402
|
readonly DESCRIPTION: "description";
|
|
@@ -2085,6 +2115,8 @@ declare class ScheduleCore {
|
|
|
2085
2115
|
* @returns The activity, or `null` when absent.
|
|
2086
2116
|
*/
|
|
2087
2117
|
getActivityView(id: ActivityId): Readonly<CoreActivity> | null;
|
|
2118
|
+
/** Returns the canonical progress editability decision without mutation. */
|
|
2119
|
+
getProgressEditability(id: ActivityId): EditResult | null;
|
|
2088
2120
|
/**
|
|
2089
2121
|
* Creates a read-only date prediction bound to the current revision.
|
|
2090
2122
|
*
|
|
@@ -2523,4 +2555,4 @@ declare const DISPATCH_TRACK_EVENT: {
|
|
|
2523
2555
|
/** Consumer analytics event name emitted by a schedule mutation. */
|
|
2524
2556
|
type DispatchTrackEvent = (typeof DISPATCH_TRACK_EVENT)[keyof typeof DISPATCH_TRACK_EVENT];
|
|
2525
2557
|
|
|
2526
|
-
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, 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 ConstraintType, type ConstraintWarning, type CoreActivity, type CoreBaselinePoint, type CreationKind, type CriticalPathResult, DATE_GESTURE_KIND, DEFAULT_HOURS_PER_DAY, DISPATCH_ACTION_KIND, DISPATCH_ACTION_KINDS, DISPATCH_LINK_OPERATION_KIND, DISPATCH_TRACK_EVENT, type DateGesture, type DateGestureKind, type DateGesturePreview, type DatesBatchVerdict, type DeletedActivitySnapshot, type DeletedLinkSnapshot, type DispatchAction, type DispatchActionKind, type DispatchOptions, type DispatchRejectReason, type DispatchResult, type DispatchTrackEvent, ENTITY_CHANGE_KIND, type EditableColumnName, type EffectiveGraphAudit, type EntityChange, type ActivityBatchLinkInput as ErgonomicActivityBatchLinkInput, type ExpectedProgressAdapter, FILTER_FIELD, FILTER_LOGIC, FILTER_OPERATOR, FILTER_REJECTION_REASON, FILTER_VALUE_KIND, type FilterCriterion, type FilterCriterionValue, type FilterDateRange, type FilterField, type FilterLogic, type FilterOperator, type FilterRejection, type FilterState, type FilterValueKind, 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 LinksBatchOperation, type LoadDiagnostic, type LoadDiagnosticCode, type LookaheadConversionFormerParent, type LookaheadConversionGroup, type LookaheadConversionInput, type LookaheadConversionMilestoneMove, type LookaheadConversionPlan, type LookaheadConversionResult, type MutationContext, NEW_ACTIVITY_DEFAULTS, NOT_STARTED_PROGRESS, ORDER_DIRECTION, type OrderDirection, 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 ScheduleBaselinesApi, type ScheduleCalendarsApi, ScheduleCore, type ScheduleCoreInput, type ScheduleCoreReporter, type ScheduleCoreStatus, type ScheduleCriticalPathApi, 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, type UndoOptions, type ViewFilterInput, type ViewStateChange, type ViewStatePropChange, WORK_TIME_DIRECTION, type WithProplannerId, type WorkTimeDirection, checkNoUpdatedLinks, computeExpectedProgress, createSchedule, expectedProgressFromBaseline, getActiveBaseline, getUnsavedActivities, isRootParent, normalizeParentKey, parseFromBackend, willRunCriticalPath, yieldToBrowser };
|
|
2558
|
+
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, 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 ConstraintType, type ConstraintWarning, type CoreActivity, type CoreBaselinePoint, type CreationKind, type CriticalPathResult, DATE_GESTURE_KIND, DEFAULT_HOURS_PER_DAY, DISPATCH_ACTION_KIND, DISPATCH_ACTION_KINDS, DISPATCH_LINK_OPERATION_KIND, DISPATCH_TRACK_EVENT, type DateGesture, type DateGestureKind, type DateGesturePreview, type DatesBatchVerdict, type DeletedActivitySnapshot, type DeletedLinkSnapshot, type DispatchAction, type DispatchActionKind, 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, type FilterCriterion, type FilterCriterionValue, type FilterDateRange, type FilterField, type FilterLogic, type FilterOperator, type FilterRejection, type FilterState, type FilterValueKind, 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 LinksBatchOperation, type LoadDiagnostic, type LoadDiagnosticCode, type LookaheadConversionFormerParent, type LookaheadConversionGroup, type LookaheadConversionInput, type LookaheadConversionMilestoneMove, type LookaheadConversionPlan, type LookaheadConversionResult, type MutationContext, NEW_ACTIVITY_DEFAULTS, NOT_STARTED_PROGRESS, ORDER_DIRECTION, type OrderDirection, 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 ScheduleBaselinesApi, type ScheduleCalendarsApi, ScheduleCore, type ScheduleCoreInput, type ScheduleCoreReporter, type ScheduleCoreStatus, type ScheduleCriticalPathApi, 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, type UndoOptions, type ViewFilterInput, type ViewStateChange, type ViewStatePropChange, WORK_TIME_DIRECTION, type WithProplannerId, type WorkTimeDirection, checkNoUpdatedLinks, computeExpectedProgress, createSchedule, expectedProgressFromBaseline, getActiveBaseline, getUnsavedActivities, isRootParent, normalizeParentKey, parseFromBackend, willRunCriticalPath, yieldToBrowser };
|
package/dist/index.d.ts
CHANGED
|
@@ -367,6 +367,36 @@ declare const NOT_STARTED_PROGRESS = 0;
|
|
|
367
367
|
/** Progress percentage representing a completed activity. */
|
|
368
368
|
declare const COMPLETED_PROGRESS = 100;
|
|
369
369
|
|
|
370
|
+
/** Canonical reasons why an activity field edit may be blocked. */
|
|
371
|
+
declare const EDIT_DENIAL_REASON: {
|
|
372
|
+
readonly COMPLETED: "completed";
|
|
373
|
+
readonly SUMMARY: "summary";
|
|
374
|
+
readonly HAS_PROGRESS: "has_progress";
|
|
375
|
+
readonly HAS_LOOKAHEAD_TASKS: "has_lookahead_tasks";
|
|
376
|
+
readonly SIR_START_AFTER_PROGRESS: "sir_start_after_progress";
|
|
377
|
+
};
|
|
378
|
+
/** Reason code returned when an activity field edit is blocked. */
|
|
379
|
+
type EditDenialReason = (typeof EDIT_DENIAL_REASON)[keyof typeof EDIT_DENIAL_REASON];
|
|
380
|
+
/** Canonical presentation keys associated with blocked activity edits. */
|
|
381
|
+
declare const EDIT_ALERT_KEY: {
|
|
382
|
+
readonly CANT_EDIT_COMPLETED: "cant_edit_completed_activity";
|
|
383
|
+
readonly SUMMARY_COLUMN_VALUE: "summary_column_value";
|
|
384
|
+
readonly CANT_EDIT_WITH_PROGRESS: "cant_edit_activity_with_progress";
|
|
385
|
+
readonly SIR_CANT_MOVE_START_AFTER_PROGRESS: "sir_cant_move_start_after_progress";
|
|
386
|
+
readonly CANT_EDIT_WITH_TASK: "cant_edit_actvity_with_task";
|
|
387
|
+
};
|
|
388
|
+
/** Presentation key optionally returned with a blocked activity edit. */
|
|
389
|
+
type EditAlertKey = (typeof EDIT_ALERT_KEY)[keyof typeof EDIT_ALERT_KEY];
|
|
390
|
+
|
|
391
|
+
/** Describes whether a column value can be edited and why it may be blocked. */
|
|
392
|
+
type EditResult = {
|
|
393
|
+
readonly allowed: true;
|
|
394
|
+
} | {
|
|
395
|
+
readonly allowed: false;
|
|
396
|
+
readonly reason: EditDenialReason;
|
|
397
|
+
readonly alertKey?: EditAlertKey;
|
|
398
|
+
};
|
|
399
|
+
|
|
370
400
|
declare const EDITABLE: {
|
|
371
401
|
readonly TEXT: "text";
|
|
372
402
|
readonly DESCRIPTION: "description";
|
|
@@ -2085,6 +2115,8 @@ declare class ScheduleCore {
|
|
|
2085
2115
|
* @returns The activity, or `null` when absent.
|
|
2086
2116
|
*/
|
|
2087
2117
|
getActivityView(id: ActivityId): Readonly<CoreActivity> | null;
|
|
2118
|
+
/** Returns the canonical progress editability decision without mutation. */
|
|
2119
|
+
getProgressEditability(id: ActivityId): EditResult | null;
|
|
2088
2120
|
/**
|
|
2089
2121
|
* Creates a read-only date prediction bound to the current revision.
|
|
2090
2122
|
*
|
|
@@ -2523,4 +2555,4 @@ declare const DISPATCH_TRACK_EVENT: {
|
|
|
2523
2555
|
/** Consumer analytics event name emitted by a schedule mutation. */
|
|
2524
2556
|
type DispatchTrackEvent = (typeof DISPATCH_TRACK_EVENT)[keyof typeof DISPATCH_TRACK_EVENT];
|
|
2525
2557
|
|
|
2526
|
-
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, 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 ConstraintType, type ConstraintWarning, type CoreActivity, type CoreBaselinePoint, type CreationKind, type CriticalPathResult, DATE_GESTURE_KIND, DEFAULT_HOURS_PER_DAY, DISPATCH_ACTION_KIND, DISPATCH_ACTION_KINDS, DISPATCH_LINK_OPERATION_KIND, DISPATCH_TRACK_EVENT, type DateGesture, type DateGestureKind, type DateGesturePreview, type DatesBatchVerdict, type DeletedActivitySnapshot, type DeletedLinkSnapshot, type DispatchAction, type DispatchActionKind, type DispatchOptions, type DispatchRejectReason, type DispatchResult, type DispatchTrackEvent, ENTITY_CHANGE_KIND, type EditableColumnName, type EffectiveGraphAudit, type EntityChange, type ActivityBatchLinkInput as ErgonomicActivityBatchLinkInput, type ExpectedProgressAdapter, FILTER_FIELD, FILTER_LOGIC, FILTER_OPERATOR, FILTER_REJECTION_REASON, FILTER_VALUE_KIND, type FilterCriterion, type FilterCriterionValue, type FilterDateRange, type FilterField, type FilterLogic, type FilterOperator, type FilterRejection, type FilterState, type FilterValueKind, 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 LinksBatchOperation, type LoadDiagnostic, type LoadDiagnosticCode, type LookaheadConversionFormerParent, type LookaheadConversionGroup, type LookaheadConversionInput, type LookaheadConversionMilestoneMove, type LookaheadConversionPlan, type LookaheadConversionResult, type MutationContext, NEW_ACTIVITY_DEFAULTS, NOT_STARTED_PROGRESS, ORDER_DIRECTION, type OrderDirection, 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 ScheduleBaselinesApi, type ScheduleCalendarsApi, ScheduleCore, type ScheduleCoreInput, type ScheduleCoreReporter, type ScheduleCoreStatus, type ScheduleCriticalPathApi, 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, type UndoOptions, type ViewFilterInput, type ViewStateChange, type ViewStatePropChange, WORK_TIME_DIRECTION, type WithProplannerId, type WorkTimeDirection, checkNoUpdatedLinks, computeExpectedProgress, createSchedule, expectedProgressFromBaseline, getActiveBaseline, getUnsavedActivities, isRootParent, normalizeParentKey, parseFromBackend, willRunCriticalPath, yieldToBrowser };
|
|
2558
|
+
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, 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 ConstraintType, type ConstraintWarning, type CoreActivity, type CoreBaselinePoint, type CreationKind, type CriticalPathResult, DATE_GESTURE_KIND, DEFAULT_HOURS_PER_DAY, DISPATCH_ACTION_KIND, DISPATCH_ACTION_KINDS, DISPATCH_LINK_OPERATION_KIND, DISPATCH_TRACK_EVENT, type DateGesture, type DateGestureKind, type DateGesturePreview, type DatesBatchVerdict, type DeletedActivitySnapshot, type DeletedLinkSnapshot, type DispatchAction, type DispatchActionKind, 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, type FilterCriterion, type FilterCriterionValue, type FilterDateRange, type FilterField, type FilterLogic, type FilterOperator, type FilterRejection, type FilterState, type FilterValueKind, 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 LinksBatchOperation, type LoadDiagnostic, type LoadDiagnosticCode, type LookaheadConversionFormerParent, type LookaheadConversionGroup, type LookaheadConversionInput, type LookaheadConversionMilestoneMove, type LookaheadConversionPlan, type LookaheadConversionResult, type MutationContext, NEW_ACTIVITY_DEFAULTS, NOT_STARTED_PROGRESS, ORDER_DIRECTION, type OrderDirection, 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 ScheduleBaselinesApi, type ScheduleCalendarsApi, ScheduleCore, type ScheduleCoreInput, type ScheduleCoreReporter, type ScheduleCoreStatus, type ScheduleCriticalPathApi, 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, type UndoOptions, type ViewFilterInput, type ViewStateChange, type ViewStatePropChange, WORK_TIME_DIRECTION, type WithProplannerId, type WorkTimeDirection, checkNoUpdatedLinks, computeExpectedProgress, createSchedule, expectedProgressFromBaseline, getActiveBaseline, getUnsavedActivities, isRootParent, normalizeParentKey, parseFromBackend, willRunCriticalPath, yieldToBrowser };
|
package/dist/index.js
CHANGED
|
@@ -3585,33 +3585,65 @@ function parseLinkTypeCode(raw) {
|
|
|
3585
3585
|
return void 0;
|
|
3586
3586
|
}
|
|
3587
3587
|
var LINK_ENTRY_SEPARATOR = ";";
|
|
3588
|
-
var
|
|
3588
|
+
var LAG_UNIT = {
|
|
3589
|
+
DAY: "d",
|
|
3590
|
+
WEEK: "w",
|
|
3591
|
+
WEEK_DHTMLX: "wk",
|
|
3592
|
+
MONTH: "m",
|
|
3593
|
+
MONTH_DHTMLX: "mon",
|
|
3594
|
+
YEAR: "y"
|
|
3595
|
+
};
|
|
3596
|
+
var ENTRY_RE = /^(\d+)(fs|ss|ff|sf)?(?:([+-]?)(\d+(?:\.\d+)?)(weeks?|wk|w|months?|mon|m|days?|d|years?|y)?)?$/i;
|
|
3589
3597
|
|
|
3590
3598
|
// src/autoscheduler/links/parse-predecessor-string.ts
|
|
3591
|
-
|
|
3599
|
+
var DEFAULT_WORKING_DAYS_PER_WEEK = 5;
|
|
3600
|
+
var DAYS_PER_MONTH = 30;
|
|
3601
|
+
var DAYS_PER_YEAR = 365;
|
|
3602
|
+
var FIXED_UNIT_DAYS = {
|
|
3603
|
+
[LAG_UNIT.DAY]: 1,
|
|
3604
|
+
day: 1,
|
|
3605
|
+
days: 1,
|
|
3606
|
+
[LAG_UNIT.MONTH]: DAYS_PER_MONTH,
|
|
3607
|
+
[LAG_UNIT.MONTH_DHTMLX]: DAYS_PER_MONTH,
|
|
3608
|
+
month: DAYS_PER_MONTH,
|
|
3609
|
+
months: DAYS_PER_MONTH,
|
|
3610
|
+
[LAG_UNIT.YEAR]: DAYS_PER_YEAR,
|
|
3611
|
+
year: DAYS_PER_YEAR,
|
|
3612
|
+
years: DAYS_PER_YEAR
|
|
3613
|
+
};
|
|
3614
|
+
var WEEK_UNITS = /* @__PURE__ */ new Set([
|
|
3615
|
+
LAG_UNIT.WEEK,
|
|
3616
|
+
LAG_UNIT.WEEK_DHTMLX,
|
|
3617
|
+
"week",
|
|
3618
|
+
"weeks"
|
|
3619
|
+
]);
|
|
3620
|
+
function parsePredecessorString(input, options = {}) {
|
|
3592
3621
|
const specs = [];
|
|
3593
3622
|
const errors = [];
|
|
3623
|
+
const daysPerWeek = options.daysPerWeek !== void 0 && Number.isFinite(options.daysPerWeek) && options.daysPerWeek > 0 ? options.daysPerWeek : DEFAULT_WORKING_DAYS_PER_WEEK;
|
|
3594
3624
|
const trimmed = input.replace(/\s+/g, "");
|
|
3595
3625
|
if (trimmed.length === 0) return { specs, errors };
|
|
3596
3626
|
for (const raw of trimmed.split(LINK_ENTRY_SEPARATOR)) {
|
|
3597
3627
|
if (raw.length === 0) continue;
|
|
3598
|
-
const spec = parseEntry(raw);
|
|
3628
|
+
const spec = parseEntry(raw, daysPerWeek);
|
|
3599
3629
|
if (spec) specs.push(spec);
|
|
3600
3630
|
else errors.push(raw);
|
|
3601
3631
|
}
|
|
3602
3632
|
return { specs, errors };
|
|
3603
3633
|
}
|
|
3604
|
-
function parseEntry(entry) {
|
|
3634
|
+
function parseEntry(entry, daysPerWeek) {
|
|
3605
3635
|
const lower = entry.toLowerCase();
|
|
3606
3636
|
const match = ENTRY_RE.exec(lower);
|
|
3607
3637
|
if (!match) return null;
|
|
3608
|
-
const [, correlativeId, typeStr, sign, magnitude] = match;
|
|
3638
|
+
const [, correlativeId, typeStr, sign, magnitude, unit] = match;
|
|
3609
3639
|
const type = typeStr ? LINK_CODE_TO_TYPE[typeStr] : LINK_CODE_TO_TYPE[DEFAULT_LINK_CODE];
|
|
3610
3640
|
let lag = 0;
|
|
3611
3641
|
if (magnitude !== void 0) {
|
|
3612
3642
|
const value = Number(magnitude);
|
|
3613
3643
|
if (Number.isNaN(value)) return null;
|
|
3614
|
-
|
|
3644
|
+
const unitDays = unit !== void 0 && WEEK_UNITS.has(unit) ? daysPerWeek : FIXED_UNIT_DAYS[unit ?? LAG_UNIT.DAY];
|
|
3645
|
+
const days = value * unitDays;
|
|
3646
|
+
lag = sign === "-" ? -days : days;
|
|
3615
3647
|
}
|
|
3616
3648
|
return {
|
|
3617
3649
|
correlativeId,
|
|
@@ -4511,8 +4543,19 @@ var POST_PROCESSOR = {
|
|
|
4511
4543
|
var VALIDATION_REASON = {
|
|
4512
4544
|
NEGATIVE_DURATION: "negative_duration"};
|
|
4513
4545
|
var EDIT_DENIAL_REASON = {
|
|
4546
|
+
COMPLETED: "completed",
|
|
4514
4547
|
SUMMARY: "summary",
|
|
4515
|
-
|
|
4548
|
+
HAS_PROGRESS: "has_progress",
|
|
4549
|
+
HAS_LOOKAHEAD_TASKS: "has_lookahead_tasks",
|
|
4550
|
+
SIR_START_AFTER_PROGRESS: "sir_start_after_progress"
|
|
4551
|
+
};
|
|
4552
|
+
var EDIT_ALERT_KEY = {
|
|
4553
|
+
CANT_EDIT_COMPLETED: "cant_edit_completed_activity",
|
|
4554
|
+
SUMMARY_COLUMN_VALUE: "summary_column_value",
|
|
4555
|
+
CANT_EDIT_WITH_PROGRESS: "cant_edit_activity_with_progress",
|
|
4556
|
+
SIR_CANT_MOVE_START_AFTER_PROGRESS: "sir_cant_move_start_after_progress",
|
|
4557
|
+
CANT_EDIT_WITH_TASK: "cant_edit_actvity_with_task"
|
|
4558
|
+
};
|
|
4516
4559
|
|
|
4517
4560
|
// src/columns/shared/constraint-validation.ts
|
|
4518
4561
|
function checkConstraintViolation2(constraintType, constraintDate, projectedDate) {
|
|
@@ -4635,10 +4678,10 @@ var MAX_PROGRESS = PROGRESS_COMPLETE;
|
|
|
4635
4678
|
var progressPipeline = {
|
|
4636
4679
|
targetField: "progress",
|
|
4637
4680
|
canEdit(activity, hierarchy) {
|
|
4638
|
-
if (hasLookaheadTasks(activity))
|
|
4639
|
-
return cannotEdit("has_lookahead_tasks", "cant_edit_actvity_with_task");
|
|
4640
4681
|
if (isSummaryActivity2(activity, hierarchy))
|
|
4641
4682
|
return cannotEdit("summary", "summary_column_value");
|
|
4683
|
+
if (hasLookaheadTasks(activity))
|
|
4684
|
+
return cannotEdit("has_lookahead_tasks", "cant_edit_actvity_with_task");
|
|
4642
4685
|
return canEdit();
|
|
4643
4686
|
},
|
|
4644
4687
|
parseInput(rawValue) {
|
|
@@ -11871,7 +11914,13 @@ async function dispatchInlineEditLinks(action, options, deps) {
|
|
|
11871
11914
|
return { ok: false, reason: REJECTION_REASON.ACTIVITY_NOT_FOUND };
|
|
11872
11915
|
}
|
|
11873
11916
|
const isPredecessors = action.column === COLUMN.CUSTOM_PREDECESSORS;
|
|
11874
|
-
const { specs: specsInDays } = parsePredecessorString(
|
|
11917
|
+
const { specs: specsInDays, errors } = parsePredecessorString(
|
|
11918
|
+
action.newValue,
|
|
11919
|
+
{ daysPerWeek: sector.hoursPerWeek / sector.hoursPerDay }
|
|
11920
|
+
);
|
|
11921
|
+
if (errors.length > 0) {
|
|
11922
|
+
return { ok: false, reason: REJECTION_REASON.INVALID_VALUE };
|
|
11923
|
+
}
|
|
11875
11924
|
const specs = specsInDays.map((spec) => ({
|
|
11876
11925
|
...spec,
|
|
11877
11926
|
lag: lagDaysToHours(roundLagDays(spec.lag), sector.hoursPerDay)
|
|
@@ -22763,6 +22812,17 @@ var ScheduleCore = class _ScheduleCore {
|
|
|
22763
22812
|
this.assertReady();
|
|
22764
22813
|
return readActivity(this.coreRuntime.state, id);
|
|
22765
22814
|
}
|
|
22815
|
+
/** Returns the canonical progress editability decision without mutation. */
|
|
22816
|
+
getProgressEditability(id) {
|
|
22817
|
+
this.assertReady();
|
|
22818
|
+
const activity = readActivity(this.coreRuntime.state, id);
|
|
22819
|
+
if (!activity) return null;
|
|
22820
|
+
const context = buildPipelineContext(this.coreRuntime.state, {
|
|
22821
|
+
hoursPerDay: this.coreRuntime.sector.hoursPerDay,
|
|
22822
|
+
dateFormat: this.coreRuntime.sector.dateFormat
|
|
22823
|
+
});
|
|
22824
|
+
return progressPipeline.canEdit(activity, context.hierarchy);
|
|
22825
|
+
}
|
|
22766
22826
|
/**
|
|
22767
22827
|
* Creates a read-only date prediction bound to the current revision.
|
|
22768
22828
|
*
|
|
@@ -23736,6 +23796,6 @@ var CREATION_KIND = {
|
|
|
23736
23796
|
ROOT: "root"
|
|
23737
23797
|
};
|
|
23738
23798
|
|
|
23739
|
-
export { ACTIVITY_BATCH_ACTION_KIND, ACTIVITY_BATCH_MODE, ACTIVITY_DATE_EDGE, ACTIVITY_FIELD, ACTIVITY_PONDERATOR_CRITERION, ACTIVITY_PROGRESS_ORIGIN, ACTIVITY_TYPE, CALENDAR_UNIT, CHANGE_SET_SOURCE_KIND, COLUMN, COMPLETED_PROGRESS, CONSTRAINT_TYPE, CONSTRAINT_TYPE_TO_LABEL, CONSTRAINT_WARNING_KIND, CREATION_KIND, DATE_GESTURE_KIND, DEFAULT_HOURS_PER_DAY, DISPATCH_ACTION_KIND, DISPATCH_ACTION_KINDS, DISPATCH_LINK_OPERATION_KIND, DISPATCH_TRACK_EVENT, ENTITY_CHANGE_KIND, FILTER_FIELD, FILTER_LOGIC, FILTER_OPERATOR, FILTER_REJECTION_REASON, FILTER_VALUE_KIND, LINK_BATCH_OPERATION_KIND, LINK_CODE, LINK_CODE_TO_TYPE, LINK_REJECTION_REASON, LINK_RELATIONSHIP, LINK_TYPE, LINK_TYPE_CODE, NEW_ACTIVITY_DEFAULTS, NOT_STARTED_PROGRESS, ORDER_DIRECTION, REJECTION_REASON, ROOT_PARENT_ID, SCHEDULE_CORE_STATUS, SCHEDULE_EFFECT_KIND, SIR_AUTO_REJECT_REASON, STATUS, STATUS_CRITERIA, ScheduleCore, WORK_TIME_DIRECTION, checkNoUpdatedLinks, computeExpectedProgress, createSchedule, expectedProgressFromBaseline, getActiveBaseline, getUnsavedActivities, isRootParent, normalizeParentKey, parseFromBackend, willRunCriticalPath, yieldToBrowser };
|
|
23799
|
+
export { ACTIVITY_BATCH_ACTION_KIND, ACTIVITY_BATCH_MODE, ACTIVITY_DATE_EDGE, ACTIVITY_FIELD, ACTIVITY_PONDERATOR_CRITERION, ACTIVITY_PROGRESS_ORIGIN, ACTIVITY_TYPE, CALENDAR_UNIT, CHANGE_SET_SOURCE_KIND, COLUMN, COMPLETED_PROGRESS, CONSTRAINT_TYPE, CONSTRAINT_TYPE_TO_LABEL, CONSTRAINT_WARNING_KIND, CREATION_KIND, DATE_GESTURE_KIND, DEFAULT_HOURS_PER_DAY, DISPATCH_ACTION_KIND, DISPATCH_ACTION_KINDS, DISPATCH_LINK_OPERATION_KIND, DISPATCH_TRACK_EVENT, EDIT_ALERT_KEY, EDIT_DENIAL_REASON, ENTITY_CHANGE_KIND, FILTER_FIELD, FILTER_LOGIC, FILTER_OPERATOR, FILTER_REJECTION_REASON, FILTER_VALUE_KIND, LINK_BATCH_OPERATION_KIND, LINK_CODE, LINK_CODE_TO_TYPE, LINK_REJECTION_REASON, LINK_RELATIONSHIP, LINK_TYPE, LINK_TYPE_CODE, NEW_ACTIVITY_DEFAULTS, NOT_STARTED_PROGRESS, ORDER_DIRECTION, REJECTION_REASON, ROOT_PARENT_ID, SCHEDULE_CORE_STATUS, SCHEDULE_EFFECT_KIND, SIR_AUTO_REJECT_REASON, STATUS, STATUS_CRITERIA, ScheduleCore, WORK_TIME_DIRECTION, checkNoUpdatedLinks, computeExpectedProgress, createSchedule, expectedProgressFromBaseline, getActiveBaseline, getUnsavedActivities, isRootParent, normalizeParentKey, parseFromBackend, willRunCriticalPath, yieldToBrowser };
|
|
23740
23800
|
//# sourceMappingURL=index.js.map
|
|
23741
23801
|
//# sourceMappingURL=index.js.map
|