@outbuild-company/schedule-core 1.6.2 → 1.6.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/README.md +26 -0
- package/dist/cdn/schedule-core.global.js +1 -1
- package/dist/cdn/schedule-core.global.js.map +1 -1
- package/dist/index.cjs +48 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +42 -15
- package/dist/index.d.ts +42 -15
- package/dist/index.js +47 -38
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -204,6 +204,26 @@ interface EntityChange<T> {
|
|
|
204
204
|
after: Readonly<T> | null;
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
+
declare const EDITABLE: {
|
|
208
|
+
readonly TEXT: "text";
|
|
209
|
+
readonly DESCRIPTION: "description";
|
|
210
|
+
readonly DURATION: "duration";
|
|
211
|
+
readonly PROGRESS: "progress";
|
|
212
|
+
readonly COST: "cost";
|
|
213
|
+
readonly USED_COST: "used_cost";
|
|
214
|
+
readonly HH_WORK_TIME: "hhWorkTime";
|
|
215
|
+
readonly START_DATE: "start_date";
|
|
216
|
+
readonly END_DATE: "end_date";
|
|
217
|
+
readonly CONSTRAINT_TYPE: "constraint_type";
|
|
218
|
+
readonly CONSTRAINT_DATE: "constraint_date";
|
|
219
|
+
readonly CALENDAR_ID: "calendar_id";
|
|
220
|
+
readonly CUSTOM_ID: "custom_id";
|
|
221
|
+
readonly SUBCONTRACT_ID: "subcontractId";
|
|
222
|
+
readonly RESPONSABLES: "responsables";
|
|
223
|
+
readonly TAGS: "tags";
|
|
224
|
+
readonly CUSTOM_PREDECESSORS: "custom_predecessors";
|
|
225
|
+
readonly CUSTOM_SUCESSORS: "custom_sucessors";
|
|
226
|
+
};
|
|
207
227
|
declare const COLUMN: {
|
|
208
228
|
readonly REAL_WORK: "real_work";
|
|
209
229
|
readonly REAL_COST: "real_cost";
|
|
@@ -245,8 +265,11 @@ declare const COLUMN: {
|
|
|
245
265
|
readonly CUSTOM_PREDECESSORS: "custom_predecessors";
|
|
246
266
|
readonly CUSTOM_SUCESSORS: "custom_sucessors";
|
|
247
267
|
};
|
|
268
|
+
type EditableColumnName = (typeof EDITABLE)[keyof typeof EDITABLE];
|
|
248
269
|
type ColumnName = (typeof COLUMN)[keyof typeof COLUMN];
|
|
249
270
|
|
|
271
|
+
type PipelineColumnName = Exclude<(typeof EDITABLE)[keyof typeof EDITABLE], typeof COLUMN.CUSTOM_PREDECESSORS | typeof COLUMN.CUSTOM_SUCESSORS>;
|
|
272
|
+
|
|
250
273
|
declare const CREATION_OVERRIDE_FIELD_LIST: readonly ["name", "description", "type", "startDate", "durationHours", "constraintType", "constraintDate", "calendarId", "assignedDefaultCalendar", "autoScheduling", "progress", "cost", "usedCost", "realCost", "workHours", "realWorkHours", "ponderator", "hasCustomPonderator", "customId", "subcontractId", "responsableIds", "tagIds", "isLookahead"];
|
|
251
274
|
type CreationOverrideField = (typeof CREATION_OVERRIDE_FIELD_LIST)[number];
|
|
252
275
|
type CreationOverrides = Partial<Pick<CoreActivity, CreationOverrideField>>;
|
|
@@ -365,7 +388,7 @@ type DispatchAction = {
|
|
|
365
388
|
} | {
|
|
366
389
|
kind: 'inline-edit';
|
|
367
390
|
activityId: ActivityId;
|
|
368
|
-
column:
|
|
391
|
+
column: EditableColumnName;
|
|
369
392
|
newValue: unknown;
|
|
370
393
|
} | {
|
|
371
394
|
kind: 'dates-batch';
|
|
@@ -378,7 +401,7 @@ type DispatchAction = {
|
|
|
378
401
|
kind: 'bulk-edit';
|
|
379
402
|
edits: ReadonlyArray<{
|
|
380
403
|
activityId: ActivityId;
|
|
381
|
-
column:
|
|
404
|
+
column: PipelineColumnName;
|
|
382
405
|
newValue: unknown;
|
|
383
406
|
}>;
|
|
384
407
|
eventSource?: string;
|
|
@@ -561,14 +584,15 @@ interface ViewStateChange {
|
|
|
561
584
|
readonly checked?: ViewStatePropChange;
|
|
562
585
|
readonly visible?: ViewStatePropChange;
|
|
563
586
|
}
|
|
587
|
+
type ChangeSetSource = InternalDispatchAction | {
|
|
588
|
+
kind: 'init';
|
|
589
|
+
} | {
|
|
590
|
+
kind: 'undo';
|
|
591
|
+
} | {
|
|
592
|
+
kind: 'redo';
|
|
593
|
+
};
|
|
564
594
|
interface ChangeSet {
|
|
565
|
-
source:
|
|
566
|
-
kind: 'init';
|
|
567
|
-
} | {
|
|
568
|
-
kind: 'undo';
|
|
569
|
-
} | {
|
|
570
|
-
kind: 'redo';
|
|
571
|
-
};
|
|
595
|
+
source: ChangeSetSource;
|
|
572
596
|
activities: ReadonlyArray<EntityChange<CoreActivity>>;
|
|
573
597
|
links: ReadonlyArray<EntityChange<Link>>;
|
|
574
598
|
calendars: ReadonlyArray<EntityChange<Calendar>>;
|
|
@@ -647,7 +671,6 @@ interface BackendActivityInput {
|
|
|
647
671
|
has_childs: boolean;
|
|
648
672
|
isOnLookahead: boolean;
|
|
649
673
|
sumOfDurationRecursively: number | null;
|
|
650
|
-
freeSlack: number | null;
|
|
651
674
|
is_critical: boolean;
|
|
652
675
|
newActivitiesArray: string | (string | number)[] | null;
|
|
653
676
|
hasNewActivities: boolean | null;
|
|
@@ -712,6 +735,11 @@ interface ScheduleCoreReporter {
|
|
|
712
735
|
}
|
|
713
736
|
|
|
714
737
|
type ScheduleCoreStatus = 'ready' | 'destroyed' | 'poisoned';
|
|
738
|
+
declare const SCHEDULE_CORE_STATUS: {
|
|
739
|
+
readonly READY: "ready";
|
|
740
|
+
readonly DESTROYED: "destroyed";
|
|
741
|
+
readonly POISONED: "poisoned";
|
|
742
|
+
};
|
|
715
743
|
interface ScheduleCoreInput extends BackendScheduleInput {
|
|
716
744
|
skipInitialAutoSchedule?: boolean;
|
|
717
745
|
baselinePoints?: readonly BaselinePoint[];
|
|
@@ -927,16 +955,15 @@ declare class ScheduleCore {
|
|
|
927
955
|
private _rollback;
|
|
928
956
|
}
|
|
929
957
|
|
|
930
|
-
interface ViewStateSeed {
|
|
931
|
-
readonly hiddenIds: readonly ActivityId[];
|
|
932
|
-
}
|
|
933
958
|
interface ParsedInput {
|
|
934
959
|
sector: SectorMetadata;
|
|
935
960
|
activities: CoreActivity[];
|
|
936
961
|
links: Link[];
|
|
937
962
|
calendars: Calendar[];
|
|
938
963
|
baseCalendars: Calendar[];
|
|
939
|
-
viewStateSeed:
|
|
964
|
+
viewStateSeed: {
|
|
965
|
+
readonly hiddenIds: readonly ActivityId[];
|
|
966
|
+
};
|
|
940
967
|
}
|
|
941
968
|
declare function parseFromBackend(input: BackendScheduleInput, reporter?: ScheduleCoreReporter): ParsedInput;
|
|
942
969
|
|
|
@@ -1070,4 +1097,4 @@ declare const DISPATCH_TRACK_EVENT: {
|
|
|
1070
1097
|
};
|
|
1071
1098
|
type DispatchTrackEvent = (typeof DISPATCH_TRACK_EVENT)[keyof typeof DISPATCH_TRACK_EVENT];
|
|
1072
1099
|
|
|
1073
|
-
export { ACTIVITY_TYPE, type ActivityBatchAction, type ActivityBatchItem, type ActivityBatchLinkInput, type ActivityBatchMode, type ActivityBatchParentReference, type ActivityBatchReference, type ActivityCreter, type ActivityId, type ActivityType, type BackendActivityInput, type BackendCalendarInput, type BackendLinkInput, type BackendScheduleInput, type BackendSectorInput, type BaselinePoint, type BaselineVersion, type BranchOrderChange, CALENDAR_UNIT, COLUMN, CONSTRAINT_TYPE, CONSTRAINT_TYPE_TO_LABEL, CREATION_KIND, type Calendar, type CalendarId, type CalendarUnit, type CalendarWorktime, type ChangeSet, type ColumnName, type ConstraintType, type ConstraintWarning, type CoreActivity, type CreationKind, DEFAULT_HOURS_PER_DAY, DISPATCH_ACTION_KIND, DISPATCH_ACTION_KINDS, DISPATCH_TRACK_EVENT, type DateGesture, type DateGesturePreview, type DeletedActivitySnapshot, type DeletedLinkSnapshot, type DispatchAction, type DispatchActionKind, type DispatchOptions, type DispatchRejectReason, type DispatchResult, type DispatchTrackEvent, type EntityChange, type FilterCriterion, type FilterDateRange, type FilterField, type FilterState, LINK_CODE_TO_TYPE, LINK_TYPE, LINK_TYPE_CODE, type Link, type LinkId, type LinkType, type LinkTypeCode, type LinksBatchOperation, NEW_ACTIVITY_DEFAULTS, type OrderRule, type OrderState, type ParsedInput, type PastedActivityInput, type PastedLinkInput, type PendingRequest, type PersistedEntityIdentity, REJECTION_REASON, ROOT_PARENT_ID, ScheduleCore, type ScheduleCoreInput, type ScheduleCoreReporter, type ScheduleCoreStatus, type ScheduleEffect, type SectorMetadata, type StatusCriteria, type TrackingEvent, type UndoOptions, WORK_TIME_DIRECTION, type WorkTimeDirection, checkNoUpdatedLinks, computeExpectedProgress, expectedProgressFromBaseline, getActiveBaseline, getUnsavedActivities, isRootParent, normalizeParentKey, parseFromBackend, willRunCriticalPath, yieldToBrowser };
|
|
1100
|
+
export { ACTIVITY_TYPE, type ActivityBaselineSnapshot, type ActivityBatchAction, type ActivityBatchItem, type ActivityBatchLinkInput, type ActivityBatchMode, type ActivityBatchParentReference, type ActivityBatchReference, type ActivityCreter, type ActivityId, type ActivityStatus, type ActivityType, type BackendActivityInput, type BackendCalendarExceptionInput, type BackendCalendarInput, type BackendLinkInput, type BackendScheduleInput, type BackendSectorInput, type BackendShiftInput, type BaselinePoint, type BaselineVersion, type BranchOrderChange, CALENDAR_UNIT, COLUMN, CONSTRAINT_TYPE, CONSTRAINT_TYPE_TO_LABEL, 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 CreationOverrides, type CriticalPathResult, DEFAULT_HOURS_PER_DAY, DISPATCH_ACTION_KIND, DISPATCH_ACTION_KINDS, DISPATCH_TRACK_EVENT, type DateGesture, type DateGesturePreview, type DatesBatchVerdict, type DeletedActivitySnapshot, type DeletedLinkSnapshot, type DispatchAction, type DispatchActionKind, type DispatchOptions, type DispatchRejectReason, type DispatchResult, type DispatchTrackEvent, type EditableColumnName, type EntityChange, type ExpectedProgressAdapter, type FilterCriterion, type FilterCriterionValue, type FilterDateRange, type FilterField, type FilterOperator, type FilterState, LINK_CODE_TO_TYPE, LINK_TYPE, LINK_TYPE_CODE, type Link, type LinkBatchVerdict, type LinkId, type LinkType, type LinkTypeCode, type LinksBatchOperation, NEW_ACTIVITY_DEFAULTS, type OrderRule, type OrderState, type ParsedInput, type PastedActivityInput, type PastedLinkInput, type PendingRequest, type PersistedEntityIdentity, type PipelineColumnName, type ProjectWorkHours, REJECTION_REASON, ROOT_PARENT_ID, SCHEDULE_CORE_STATUS, STATUS, ScheduleCore, type ScheduleCoreInput, type ScheduleCoreReporter, type ScheduleCoreStatus, type ScheduleEffect, type SectorMetadata, type StaticActivityDefaults, type StatusCriteria, type TrackingEvent, type UndoOptions, type ViewStateChange, type ViewStatePropChange, WORK_TIME_DIRECTION, type WithProplannerId, type WorkTimeDirection, checkNoUpdatedLinks, computeExpectedProgress, expectedProgressFromBaseline, getActiveBaseline, getUnsavedActivities, isRootParent, normalizeParentKey, parseFromBackend, willRunCriticalPath, yieldToBrowser };
|
package/dist/index.d.ts
CHANGED
|
@@ -204,6 +204,26 @@ interface EntityChange<T> {
|
|
|
204
204
|
after: Readonly<T> | null;
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
+
declare const EDITABLE: {
|
|
208
|
+
readonly TEXT: "text";
|
|
209
|
+
readonly DESCRIPTION: "description";
|
|
210
|
+
readonly DURATION: "duration";
|
|
211
|
+
readonly PROGRESS: "progress";
|
|
212
|
+
readonly COST: "cost";
|
|
213
|
+
readonly USED_COST: "used_cost";
|
|
214
|
+
readonly HH_WORK_TIME: "hhWorkTime";
|
|
215
|
+
readonly START_DATE: "start_date";
|
|
216
|
+
readonly END_DATE: "end_date";
|
|
217
|
+
readonly CONSTRAINT_TYPE: "constraint_type";
|
|
218
|
+
readonly CONSTRAINT_DATE: "constraint_date";
|
|
219
|
+
readonly CALENDAR_ID: "calendar_id";
|
|
220
|
+
readonly CUSTOM_ID: "custom_id";
|
|
221
|
+
readonly SUBCONTRACT_ID: "subcontractId";
|
|
222
|
+
readonly RESPONSABLES: "responsables";
|
|
223
|
+
readonly TAGS: "tags";
|
|
224
|
+
readonly CUSTOM_PREDECESSORS: "custom_predecessors";
|
|
225
|
+
readonly CUSTOM_SUCESSORS: "custom_sucessors";
|
|
226
|
+
};
|
|
207
227
|
declare const COLUMN: {
|
|
208
228
|
readonly REAL_WORK: "real_work";
|
|
209
229
|
readonly REAL_COST: "real_cost";
|
|
@@ -245,8 +265,11 @@ declare const COLUMN: {
|
|
|
245
265
|
readonly CUSTOM_PREDECESSORS: "custom_predecessors";
|
|
246
266
|
readonly CUSTOM_SUCESSORS: "custom_sucessors";
|
|
247
267
|
};
|
|
268
|
+
type EditableColumnName = (typeof EDITABLE)[keyof typeof EDITABLE];
|
|
248
269
|
type ColumnName = (typeof COLUMN)[keyof typeof COLUMN];
|
|
249
270
|
|
|
271
|
+
type PipelineColumnName = Exclude<(typeof EDITABLE)[keyof typeof EDITABLE], typeof COLUMN.CUSTOM_PREDECESSORS | typeof COLUMN.CUSTOM_SUCESSORS>;
|
|
272
|
+
|
|
250
273
|
declare const CREATION_OVERRIDE_FIELD_LIST: readonly ["name", "description", "type", "startDate", "durationHours", "constraintType", "constraintDate", "calendarId", "assignedDefaultCalendar", "autoScheduling", "progress", "cost", "usedCost", "realCost", "workHours", "realWorkHours", "ponderator", "hasCustomPonderator", "customId", "subcontractId", "responsableIds", "tagIds", "isLookahead"];
|
|
251
274
|
type CreationOverrideField = (typeof CREATION_OVERRIDE_FIELD_LIST)[number];
|
|
252
275
|
type CreationOverrides = Partial<Pick<CoreActivity, CreationOverrideField>>;
|
|
@@ -365,7 +388,7 @@ type DispatchAction = {
|
|
|
365
388
|
} | {
|
|
366
389
|
kind: 'inline-edit';
|
|
367
390
|
activityId: ActivityId;
|
|
368
|
-
column:
|
|
391
|
+
column: EditableColumnName;
|
|
369
392
|
newValue: unknown;
|
|
370
393
|
} | {
|
|
371
394
|
kind: 'dates-batch';
|
|
@@ -378,7 +401,7 @@ type DispatchAction = {
|
|
|
378
401
|
kind: 'bulk-edit';
|
|
379
402
|
edits: ReadonlyArray<{
|
|
380
403
|
activityId: ActivityId;
|
|
381
|
-
column:
|
|
404
|
+
column: PipelineColumnName;
|
|
382
405
|
newValue: unknown;
|
|
383
406
|
}>;
|
|
384
407
|
eventSource?: string;
|
|
@@ -561,14 +584,15 @@ interface ViewStateChange {
|
|
|
561
584
|
readonly checked?: ViewStatePropChange;
|
|
562
585
|
readonly visible?: ViewStatePropChange;
|
|
563
586
|
}
|
|
587
|
+
type ChangeSetSource = InternalDispatchAction | {
|
|
588
|
+
kind: 'init';
|
|
589
|
+
} | {
|
|
590
|
+
kind: 'undo';
|
|
591
|
+
} | {
|
|
592
|
+
kind: 'redo';
|
|
593
|
+
};
|
|
564
594
|
interface ChangeSet {
|
|
565
|
-
source:
|
|
566
|
-
kind: 'init';
|
|
567
|
-
} | {
|
|
568
|
-
kind: 'undo';
|
|
569
|
-
} | {
|
|
570
|
-
kind: 'redo';
|
|
571
|
-
};
|
|
595
|
+
source: ChangeSetSource;
|
|
572
596
|
activities: ReadonlyArray<EntityChange<CoreActivity>>;
|
|
573
597
|
links: ReadonlyArray<EntityChange<Link>>;
|
|
574
598
|
calendars: ReadonlyArray<EntityChange<Calendar>>;
|
|
@@ -647,7 +671,6 @@ interface BackendActivityInput {
|
|
|
647
671
|
has_childs: boolean;
|
|
648
672
|
isOnLookahead: boolean;
|
|
649
673
|
sumOfDurationRecursively: number | null;
|
|
650
|
-
freeSlack: number | null;
|
|
651
674
|
is_critical: boolean;
|
|
652
675
|
newActivitiesArray: string | (string | number)[] | null;
|
|
653
676
|
hasNewActivities: boolean | null;
|
|
@@ -712,6 +735,11 @@ interface ScheduleCoreReporter {
|
|
|
712
735
|
}
|
|
713
736
|
|
|
714
737
|
type ScheduleCoreStatus = 'ready' | 'destroyed' | 'poisoned';
|
|
738
|
+
declare const SCHEDULE_CORE_STATUS: {
|
|
739
|
+
readonly READY: "ready";
|
|
740
|
+
readonly DESTROYED: "destroyed";
|
|
741
|
+
readonly POISONED: "poisoned";
|
|
742
|
+
};
|
|
715
743
|
interface ScheduleCoreInput extends BackendScheduleInput {
|
|
716
744
|
skipInitialAutoSchedule?: boolean;
|
|
717
745
|
baselinePoints?: readonly BaselinePoint[];
|
|
@@ -927,16 +955,15 @@ declare class ScheduleCore {
|
|
|
927
955
|
private _rollback;
|
|
928
956
|
}
|
|
929
957
|
|
|
930
|
-
interface ViewStateSeed {
|
|
931
|
-
readonly hiddenIds: readonly ActivityId[];
|
|
932
|
-
}
|
|
933
958
|
interface ParsedInput {
|
|
934
959
|
sector: SectorMetadata;
|
|
935
960
|
activities: CoreActivity[];
|
|
936
961
|
links: Link[];
|
|
937
962
|
calendars: Calendar[];
|
|
938
963
|
baseCalendars: Calendar[];
|
|
939
|
-
viewStateSeed:
|
|
964
|
+
viewStateSeed: {
|
|
965
|
+
readonly hiddenIds: readonly ActivityId[];
|
|
966
|
+
};
|
|
940
967
|
}
|
|
941
968
|
declare function parseFromBackend(input: BackendScheduleInput, reporter?: ScheduleCoreReporter): ParsedInput;
|
|
942
969
|
|
|
@@ -1070,4 +1097,4 @@ declare const DISPATCH_TRACK_EVENT: {
|
|
|
1070
1097
|
};
|
|
1071
1098
|
type DispatchTrackEvent = (typeof DISPATCH_TRACK_EVENT)[keyof typeof DISPATCH_TRACK_EVENT];
|
|
1072
1099
|
|
|
1073
|
-
export { ACTIVITY_TYPE, type ActivityBatchAction, type ActivityBatchItem, type ActivityBatchLinkInput, type ActivityBatchMode, type ActivityBatchParentReference, type ActivityBatchReference, type ActivityCreter, type ActivityId, type ActivityType, type BackendActivityInput, type BackendCalendarInput, type BackendLinkInput, type BackendScheduleInput, type BackendSectorInput, type BaselinePoint, type BaselineVersion, type BranchOrderChange, CALENDAR_UNIT, COLUMN, CONSTRAINT_TYPE, CONSTRAINT_TYPE_TO_LABEL, CREATION_KIND, type Calendar, type CalendarId, type CalendarUnit, type CalendarWorktime, type ChangeSet, type ColumnName, type ConstraintType, type ConstraintWarning, type CoreActivity, type CreationKind, DEFAULT_HOURS_PER_DAY, DISPATCH_ACTION_KIND, DISPATCH_ACTION_KINDS, DISPATCH_TRACK_EVENT, type DateGesture, type DateGesturePreview, type DeletedActivitySnapshot, type DeletedLinkSnapshot, type DispatchAction, type DispatchActionKind, type DispatchOptions, type DispatchRejectReason, type DispatchResult, type DispatchTrackEvent, type EntityChange, type FilterCriterion, type FilterDateRange, type FilterField, type FilterState, LINK_CODE_TO_TYPE, LINK_TYPE, LINK_TYPE_CODE, type Link, type LinkId, type LinkType, type LinkTypeCode, type LinksBatchOperation, NEW_ACTIVITY_DEFAULTS, type OrderRule, type OrderState, type ParsedInput, type PastedActivityInput, type PastedLinkInput, type PendingRequest, type PersistedEntityIdentity, REJECTION_REASON, ROOT_PARENT_ID, ScheduleCore, type ScheduleCoreInput, type ScheduleCoreReporter, type ScheduleCoreStatus, type ScheduleEffect, type SectorMetadata, type StatusCriteria, type TrackingEvent, type UndoOptions, WORK_TIME_DIRECTION, type WorkTimeDirection, checkNoUpdatedLinks, computeExpectedProgress, expectedProgressFromBaseline, getActiveBaseline, getUnsavedActivities, isRootParent, normalizeParentKey, parseFromBackend, willRunCriticalPath, yieldToBrowser };
|
|
1100
|
+
export { ACTIVITY_TYPE, type ActivityBaselineSnapshot, type ActivityBatchAction, type ActivityBatchItem, type ActivityBatchLinkInput, type ActivityBatchMode, type ActivityBatchParentReference, type ActivityBatchReference, type ActivityCreter, type ActivityId, type ActivityStatus, type ActivityType, type BackendActivityInput, type BackendCalendarExceptionInput, type BackendCalendarInput, type BackendLinkInput, type BackendScheduleInput, type BackendSectorInput, type BackendShiftInput, type BaselinePoint, type BaselineVersion, type BranchOrderChange, CALENDAR_UNIT, COLUMN, CONSTRAINT_TYPE, CONSTRAINT_TYPE_TO_LABEL, 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 CreationOverrides, type CriticalPathResult, DEFAULT_HOURS_PER_DAY, DISPATCH_ACTION_KIND, DISPATCH_ACTION_KINDS, DISPATCH_TRACK_EVENT, type DateGesture, type DateGesturePreview, type DatesBatchVerdict, type DeletedActivitySnapshot, type DeletedLinkSnapshot, type DispatchAction, type DispatchActionKind, type DispatchOptions, type DispatchRejectReason, type DispatchResult, type DispatchTrackEvent, type EditableColumnName, type EntityChange, type ExpectedProgressAdapter, type FilterCriterion, type FilterCriterionValue, type FilterDateRange, type FilterField, type FilterOperator, type FilterState, LINK_CODE_TO_TYPE, LINK_TYPE, LINK_TYPE_CODE, type Link, type LinkBatchVerdict, type LinkId, type LinkType, type LinkTypeCode, type LinksBatchOperation, NEW_ACTIVITY_DEFAULTS, type OrderRule, type OrderState, type ParsedInput, type PastedActivityInput, type PastedLinkInput, type PendingRequest, type PersistedEntityIdentity, type PipelineColumnName, type ProjectWorkHours, REJECTION_REASON, ROOT_PARENT_ID, SCHEDULE_CORE_STATUS, STATUS, ScheduleCore, type ScheduleCoreInput, type ScheduleCoreReporter, type ScheduleCoreStatus, type ScheduleEffect, type SectorMetadata, type StaticActivityDefaults, type StatusCriteria, type TrackingEvent, type UndoOptions, type ViewStateChange, type ViewStatePropChange, WORK_TIME_DIRECTION, type WithProplannerId, type WorkTimeDirection, checkNoUpdatedLinks, computeExpectedProgress, expectedProgressFromBaseline, getActiveBaseline, getUnsavedActivities, isRootParent, normalizeParentKey, parseFromBackend, willRunCriticalPath, yieldToBrowser };
|
package/dist/index.js
CHANGED
|
@@ -4423,29 +4423,6 @@ function toConstraintWarning(activityId, notification) {
|
|
|
4423
4423
|
};
|
|
4424
4424
|
}
|
|
4425
4425
|
|
|
4426
|
-
// src/constants/activity-properties.ts
|
|
4427
|
-
var ACTIVITY_PROPERTY = {
|
|
4428
|
-
PARENT: "parentId",
|
|
4429
|
-
TYPE: "type",
|
|
4430
|
-
START_DATE: "startDate",
|
|
4431
|
-
END_DATE: "endDate",
|
|
4432
|
-
CONSTRAINT_TYPE: "constraintType",
|
|
4433
|
-
CONSTRAINT_DATE: "constraintDate",
|
|
4434
|
-
AUTO_SCHEDULING: "autoScheduling",
|
|
4435
|
-
PROGRESS: "progress",
|
|
4436
|
-
COST: "cost",
|
|
4437
|
-
USED_COST: "usedCost",
|
|
4438
|
-
REAL_COST: "realCost",
|
|
4439
|
-
WORK_HOURS: "workHours",
|
|
4440
|
-
REAL_WORK_HOURS: "realWorkHours",
|
|
4441
|
-
CORRELATIVE_ID: "correlativeId",
|
|
4442
|
-
CUSTOM_ID: "customId",
|
|
4443
|
-
NEW_ACTIVITIES_ARRAY: "newActivityIds",
|
|
4444
|
-
HAS_NEW_ACTIVITIES: "hasNewActivities"};
|
|
4445
|
-
var LINK_PROPERTY = {
|
|
4446
|
-
TYPE: "type",
|
|
4447
|
-
LAG: "lag"};
|
|
4448
|
-
|
|
4449
4426
|
// src/columns/types.ts
|
|
4450
4427
|
var COLUMN_WRITABLE_FIELD_LIST = [
|
|
4451
4428
|
"name",
|
|
@@ -9314,6 +9291,28 @@ async function applyCriticalPath(state, hoursPerDay, isCurrent = () => true) {
|
|
|
9314
9291
|
return true;
|
|
9315
9292
|
}
|
|
9316
9293
|
|
|
9294
|
+
// src/constants/activity-properties.ts
|
|
9295
|
+
var ACTIVITY_PROPERTY = {
|
|
9296
|
+
PARENT: "parentId",
|
|
9297
|
+
TYPE: "type",
|
|
9298
|
+
START_DATE: "startDate",
|
|
9299
|
+
END_DATE: "endDate",
|
|
9300
|
+
CONSTRAINT_TYPE: "constraintType",
|
|
9301
|
+
CONSTRAINT_DATE: "constraintDate",
|
|
9302
|
+
PROGRESS: "progress",
|
|
9303
|
+
COST: "cost",
|
|
9304
|
+
USED_COST: "usedCost",
|
|
9305
|
+
REAL_COST: "realCost",
|
|
9306
|
+
WORK_HOURS: "workHours",
|
|
9307
|
+
REAL_WORK_HOURS: "realWorkHours",
|
|
9308
|
+
CORRELATIVE_ID: "correlativeId",
|
|
9309
|
+
CUSTOM_ID: "customId",
|
|
9310
|
+
NEW_ACTIVITIES_ARRAY: "newActivityIds",
|
|
9311
|
+
HAS_NEW_ACTIVITIES: "hasNewActivities"};
|
|
9312
|
+
var LINK_PROPERTY = {
|
|
9313
|
+
TYPE: "type",
|
|
9314
|
+
LAG: "lag"};
|
|
9315
|
+
|
|
9317
9316
|
// src/propagations/upward/real-cost.ts
|
|
9318
9317
|
function emitRealCost(state) {
|
|
9319
9318
|
const rootIds = [];
|
|
@@ -9913,16 +9912,14 @@ async function dispatchInlineEdit(action, options, deps) {
|
|
|
9913
9912
|
const { adapter, ctx, scheduler, sector } = deps;
|
|
9914
9913
|
const pipeline = findPipelineForColumn(action.column);
|
|
9915
9914
|
if (!pipeline) {
|
|
9916
|
-
|
|
9917
|
-
|
|
9918
|
-
|
|
9915
|
+
return {
|
|
9916
|
+
ok: false,
|
|
9917
|
+
reason: REJECTION_REASON.NO_PIPELINE_FOR_COLUMN
|
|
9918
|
+
};
|
|
9919
9919
|
}
|
|
9920
|
-
if (
|
|
9920
|
+
if (action.column === COLUMN.DURATION) {
|
|
9921
9921
|
scheduler.invalidateExpandedLinksCache();
|
|
9922
9922
|
}
|
|
9923
|
-
if (action.column === ACTIVITY_PROPERTY.PARENT) {
|
|
9924
|
-
scheduler.invalidateAllCaches();
|
|
9925
|
-
}
|
|
9926
9923
|
const activitySnap = ctx.activityReader.getActivity(action.activityId);
|
|
9927
9924
|
if (!activitySnap) {
|
|
9928
9925
|
return { ok: false, reason: REJECTION_REASON.ACTIVITY_NOT_FOUND };
|
|
@@ -10053,9 +10050,6 @@ async function dispatchInlineEdit(action, options, deps) {
|
|
|
10053
10050
|
})
|
|
10054
10051
|
};
|
|
10055
10052
|
}
|
|
10056
|
-
function columnInvalidatesExpandedLinks(column) {
|
|
10057
|
-
return column === COLUMN.DURATION || column === ACTIVITY_PROPERTY.AUTO_SCHEDULING;
|
|
10058
|
-
}
|
|
10059
10053
|
|
|
10060
10054
|
// src/dispatch/handlers/link.ts
|
|
10061
10055
|
function collectBatchContext(operations, adapter) {
|
|
@@ -10565,11 +10559,24 @@ function buildNewActivity(input, adapter) {
|
|
|
10565
10559
|
startDate: rawStartDate,
|
|
10566
10560
|
endDate: rawStartDate
|
|
10567
10561
|
};
|
|
10568
|
-
|
|
10562
|
+
let startDate = overrides.startDate ? new Date(base.startDate) : adapter.getClosestWorkTime({
|
|
10569
10563
|
date: base.startDate,
|
|
10570
10564
|
dir: WORK_TIME_DIRECTION.FUTURE,
|
|
10571
10565
|
task: base
|
|
10572
10566
|
});
|
|
10567
|
+
if (!overrides.startDate && parent && isMilestoneType(parent.type)) {
|
|
10568
|
+
const inheritedDay = new Date(parent.startDate);
|
|
10569
|
+
inheritedDay.setUTCHours(0, 0, 0, 0);
|
|
10570
|
+
const snappedDay = new Date(startDate);
|
|
10571
|
+
snappedDay.setUTCHours(0, 0, 0, 0);
|
|
10572
|
+
if (snappedDay.getTime() !== inheritedDay.getTime()) {
|
|
10573
|
+
startDate = adapter.getClosestWorkTime({
|
|
10574
|
+
date: inheritedDay,
|
|
10575
|
+
dir: WORK_TIME_DIRECTION.FUTURE,
|
|
10576
|
+
task: base
|
|
10577
|
+
});
|
|
10578
|
+
}
|
|
10579
|
+
}
|
|
10573
10580
|
const endDate = adapter.calculateEndDate({
|
|
10574
10581
|
startDate,
|
|
10575
10582
|
durationHours: base.durationHours,
|
|
@@ -18149,7 +18156,7 @@ function parseActivity(raw, context) {
|
|
|
18149
18156
|
context.hoursPerDay
|
|
18150
18157
|
),
|
|
18151
18158
|
isCritical: Boolean(raw.is_critical),
|
|
18152
|
-
freeSlackHours:
|
|
18159
|
+
freeSlackHours: null,
|
|
18153
18160
|
expectedProgress: null,
|
|
18154
18161
|
expectedProgressBaseline: null,
|
|
18155
18162
|
status: null,
|
|
@@ -18598,7 +18605,7 @@ function createActivityIdGenerator(options = {}) {
|
|
|
18598
18605
|
|
|
18599
18606
|
// src/generators/link-id-generator.ts
|
|
18600
18607
|
function createLinkIdGenerator(options = {}) {
|
|
18601
|
-
let counter = options.seed ??
|
|
18608
|
+
let counter = options.seed ?? 0;
|
|
18602
18609
|
const raise = (value) => {
|
|
18603
18610
|
if (value > counter) counter = value;
|
|
18604
18611
|
};
|
|
@@ -19360,7 +19367,8 @@ var SCHEDULE_CORE_STATUS = {
|
|
|
19360
19367
|
};
|
|
19361
19368
|
function initializeCore(input) {
|
|
19362
19369
|
const clock = input.clock ?? null;
|
|
19363
|
-
const
|
|
19370
|
+
const initializedAt = clock?.() ?? null;
|
|
19371
|
+
const loadNow = initializedAt ? endOfLocalDay(initializedAt) : null;
|
|
19364
19372
|
const reporter = input.reporter ?? noopReporter;
|
|
19365
19373
|
const parsed2 = parseFromBackend(
|
|
19366
19374
|
{
|
|
@@ -19391,6 +19399,7 @@ function initializeCore(input) {
|
|
|
19391
19399
|
knownIds: parsed2.activities.map((a) => a.id)
|
|
19392
19400
|
});
|
|
19393
19401
|
const linkIdGen = createLinkIdGenerator({
|
|
19402
|
+
seed: initializedAt?.getTime() ?? 0,
|
|
19394
19403
|
knownIds: parsed2.links.map((l) => l.id)
|
|
19395
19404
|
});
|
|
19396
19405
|
const uidGen = createUniqueCorrelativeIdGenerator({
|
|
@@ -20550,6 +20559,6 @@ var CREATION_KIND = {
|
|
|
20550
20559
|
ROOT: "root"
|
|
20551
20560
|
};
|
|
20552
20561
|
|
|
20553
|
-
export { ACTIVITY_TYPE, CALENDAR_UNIT, COLUMN, CONSTRAINT_TYPE2 as CONSTRAINT_TYPE, CONSTRAINT_TYPE_TO_LABEL, CREATION_KIND, DEFAULT_HOURS_PER_DAY, DISPATCH_ACTION_KIND, DISPATCH_ACTION_KINDS, DISPATCH_TRACK_EVENT, LINK_CODE_TO_TYPE, LINK_TYPE, LINK_TYPE_CODE, NEW_ACTIVITY_DEFAULTS, REJECTION_REASON, ROOT_PARENT_ID, ScheduleCore, WORK_TIME_DIRECTION, checkNoUpdatedLinks, computeExpectedProgress, expectedProgressFromBaseline, getActiveBaseline, getUnsavedActivities, isRootParent, normalizeParentKey, parseFromBackend, willRunCriticalPath, yieldToBrowser };
|
|
20562
|
+
export { ACTIVITY_TYPE, CALENDAR_UNIT, COLUMN, CONSTRAINT_TYPE2 as CONSTRAINT_TYPE, CONSTRAINT_TYPE_TO_LABEL, CREATION_KIND, DEFAULT_HOURS_PER_DAY, DISPATCH_ACTION_KIND, DISPATCH_ACTION_KINDS, DISPATCH_TRACK_EVENT, LINK_CODE_TO_TYPE, LINK_TYPE, LINK_TYPE_CODE, NEW_ACTIVITY_DEFAULTS, REJECTION_REASON, ROOT_PARENT_ID, SCHEDULE_CORE_STATUS, STATUS, ScheduleCore, WORK_TIME_DIRECTION, checkNoUpdatedLinks, computeExpectedProgress, expectedProgressFromBaseline, getActiveBaseline, getUnsavedActivities, isRootParent, normalizeParentKey, parseFromBackend, willRunCriticalPath, yieldToBrowser };
|
|
20554
20563
|
//# sourceMappingURL=index.js.map
|
|
20555
20564
|
//# sourceMappingURL=index.js.map
|