@outbuild-company/schedule-core 1.13.0 → 1.13.2
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 +60 -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 +59 -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,53 @@ 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+)?)(wk|w|mon|m|d|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
|
+
[LAG_UNIT.MONTH]: DAYS_PER_MONTH,
|
|
3605
|
+
[LAG_UNIT.MONTH_DHTMLX]: DAYS_PER_MONTH,
|
|
3606
|
+
[LAG_UNIT.YEAR]: DAYS_PER_YEAR
|
|
3607
|
+
};
|
|
3608
|
+
function parsePredecessorString(input, options = {}) {
|
|
3592
3609
|
const specs = [];
|
|
3593
3610
|
const errors = [];
|
|
3611
|
+
const daysPerWeek = options.daysPerWeek !== void 0 && Number.isFinite(options.daysPerWeek) && options.daysPerWeek > 0 ? options.daysPerWeek : DEFAULT_WORKING_DAYS_PER_WEEK;
|
|
3594
3612
|
const trimmed = input.replace(/\s+/g, "");
|
|
3595
3613
|
if (trimmed.length === 0) return { specs, errors };
|
|
3596
3614
|
for (const raw of trimmed.split(LINK_ENTRY_SEPARATOR)) {
|
|
3597
3615
|
if (raw.length === 0) continue;
|
|
3598
|
-
const spec = parseEntry(raw);
|
|
3616
|
+
const spec = parseEntry(raw, daysPerWeek);
|
|
3599
3617
|
if (spec) specs.push(spec);
|
|
3600
3618
|
else errors.push(raw);
|
|
3601
3619
|
}
|
|
3602
3620
|
return { specs, errors };
|
|
3603
3621
|
}
|
|
3604
|
-
function parseEntry(entry) {
|
|
3622
|
+
function parseEntry(entry, daysPerWeek) {
|
|
3605
3623
|
const lower = entry.toLowerCase();
|
|
3606
3624
|
const match = ENTRY_RE.exec(lower);
|
|
3607
3625
|
if (!match) return null;
|
|
3608
|
-
const [, correlativeId, typeStr, sign, magnitude] = match;
|
|
3626
|
+
const [, correlativeId, typeStr, sign, magnitude, unit] = match;
|
|
3609
3627
|
const type = typeStr ? LINK_CODE_TO_TYPE[typeStr] : LINK_CODE_TO_TYPE[DEFAULT_LINK_CODE];
|
|
3610
3628
|
let lag = 0;
|
|
3611
3629
|
if (magnitude !== void 0) {
|
|
3612
3630
|
const value = Number(magnitude);
|
|
3613
3631
|
if (Number.isNaN(value)) return null;
|
|
3614
|
-
|
|
3632
|
+
const unitDays = unit === LAG_UNIT.WEEK || unit === LAG_UNIT.WEEK_DHTMLX ? daysPerWeek : FIXED_UNIT_DAYS[unit ?? LAG_UNIT.DAY];
|
|
3633
|
+
const days = value * unitDays;
|
|
3634
|
+
lag = sign === "-" ? -days : days;
|
|
3615
3635
|
}
|
|
3616
3636
|
return {
|
|
3617
3637
|
correlativeId,
|
|
@@ -4511,8 +4531,19 @@ var POST_PROCESSOR = {
|
|
|
4511
4531
|
var VALIDATION_REASON = {
|
|
4512
4532
|
NEGATIVE_DURATION: "negative_duration"};
|
|
4513
4533
|
var EDIT_DENIAL_REASON = {
|
|
4534
|
+
COMPLETED: "completed",
|
|
4514
4535
|
SUMMARY: "summary",
|
|
4515
|
-
|
|
4536
|
+
HAS_PROGRESS: "has_progress",
|
|
4537
|
+
HAS_LOOKAHEAD_TASKS: "has_lookahead_tasks",
|
|
4538
|
+
SIR_START_AFTER_PROGRESS: "sir_start_after_progress"
|
|
4539
|
+
};
|
|
4540
|
+
var EDIT_ALERT_KEY = {
|
|
4541
|
+
CANT_EDIT_COMPLETED: "cant_edit_completed_activity",
|
|
4542
|
+
SUMMARY_COLUMN_VALUE: "summary_column_value",
|
|
4543
|
+
CANT_EDIT_WITH_PROGRESS: "cant_edit_activity_with_progress",
|
|
4544
|
+
SIR_CANT_MOVE_START_AFTER_PROGRESS: "sir_cant_move_start_after_progress",
|
|
4545
|
+
CANT_EDIT_WITH_TASK: "cant_edit_actvity_with_task"
|
|
4546
|
+
};
|
|
4516
4547
|
|
|
4517
4548
|
// src/columns/shared/constraint-validation.ts
|
|
4518
4549
|
function checkConstraintViolation2(constraintType, constraintDate, projectedDate) {
|
|
@@ -4635,10 +4666,10 @@ var MAX_PROGRESS = PROGRESS_COMPLETE;
|
|
|
4635
4666
|
var progressPipeline = {
|
|
4636
4667
|
targetField: "progress",
|
|
4637
4668
|
canEdit(activity, hierarchy) {
|
|
4638
|
-
if (hasLookaheadTasks(activity))
|
|
4639
|
-
return cannotEdit("has_lookahead_tasks", "cant_edit_actvity_with_task");
|
|
4640
4669
|
if (isSummaryActivity2(activity, hierarchy))
|
|
4641
4670
|
return cannotEdit("summary", "summary_column_value");
|
|
4671
|
+
if (hasLookaheadTasks(activity))
|
|
4672
|
+
return cannotEdit("has_lookahead_tasks", "cant_edit_actvity_with_task");
|
|
4642
4673
|
return canEdit();
|
|
4643
4674
|
},
|
|
4644
4675
|
parseInput(rawValue) {
|
|
@@ -11871,7 +11902,13 @@ async function dispatchInlineEditLinks(action, options, deps) {
|
|
|
11871
11902
|
return { ok: false, reason: REJECTION_REASON.ACTIVITY_NOT_FOUND };
|
|
11872
11903
|
}
|
|
11873
11904
|
const isPredecessors = action.column === COLUMN.CUSTOM_PREDECESSORS;
|
|
11874
|
-
const { specs: specsInDays } = parsePredecessorString(
|
|
11905
|
+
const { specs: specsInDays, errors } = parsePredecessorString(
|
|
11906
|
+
action.newValue,
|
|
11907
|
+
{ daysPerWeek: sector.hoursPerWeek / sector.hoursPerDay }
|
|
11908
|
+
);
|
|
11909
|
+
if (errors.length > 0) {
|
|
11910
|
+
return { ok: false, reason: REJECTION_REASON.INVALID_VALUE };
|
|
11911
|
+
}
|
|
11875
11912
|
const specs = specsInDays.map((spec) => ({
|
|
11876
11913
|
...spec,
|
|
11877
11914
|
lag: lagDaysToHours(roundLagDays(spec.lag), sector.hoursPerDay)
|
|
@@ -22763,6 +22800,17 @@ var ScheduleCore = class _ScheduleCore {
|
|
|
22763
22800
|
this.assertReady();
|
|
22764
22801
|
return readActivity(this.coreRuntime.state, id);
|
|
22765
22802
|
}
|
|
22803
|
+
/** Returns the canonical progress editability decision without mutation. */
|
|
22804
|
+
getProgressEditability(id) {
|
|
22805
|
+
this.assertReady();
|
|
22806
|
+
const activity = readActivity(this.coreRuntime.state, id);
|
|
22807
|
+
if (!activity) return null;
|
|
22808
|
+
const context = buildPipelineContext(this.coreRuntime.state, {
|
|
22809
|
+
hoursPerDay: this.coreRuntime.sector.hoursPerDay,
|
|
22810
|
+
dateFormat: this.coreRuntime.sector.dateFormat
|
|
22811
|
+
});
|
|
22812
|
+
return progressPipeline.canEdit(activity, context.hierarchy);
|
|
22813
|
+
}
|
|
22766
22814
|
/**
|
|
22767
22815
|
* Creates a read-only date prediction bound to the current revision.
|
|
22768
22816
|
*
|
|
@@ -23736,6 +23784,6 @@ var CREATION_KIND = {
|
|
|
23736
23784
|
ROOT: "root"
|
|
23737
23785
|
};
|
|
23738
23786
|
|
|
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 };
|
|
23787
|
+
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
23788
|
//# sourceMappingURL=index.js.map
|
|
23741
23789
|
//# sourceMappingURL=index.js.map
|