@outbuild-company/schedule-core 1.17.2 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/schedule-core.global.js +1 -1
- package/dist/cdn/schedule-core.global.js.map +1 -1
- package/dist/index.cjs +208 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +40 -2
- package/dist/index.d.ts +40 -2
- package/dist/index.js +208 -28
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -291,6 +291,7 @@ var READ_ONLY = {
|
|
|
291
291
|
DURATION_BASE: "duration_base",
|
|
292
292
|
COST_BASE: "cost_base",
|
|
293
293
|
WORK_BASE: "work_base",
|
|
294
|
+
BASELINE_VARIANCE: "baseline_variance",
|
|
294
295
|
CALENDAR_DURATION: "calendarDuration",
|
|
295
296
|
IS_CRITICAL: "is_critical",
|
|
296
297
|
EARLY_START: "earlyStart",
|
|
@@ -353,6 +354,7 @@ var DISPATCH_ACTION_KIND = {
|
|
|
353
354
|
SORT_SET: "sort-set",
|
|
354
355
|
VIEW_ATTRIBUTES_SET: "view-attributes-set",
|
|
355
356
|
GROUP_SET: "group-set",
|
|
357
|
+
WBS_DEPTH_SET: "wbs-depth-set",
|
|
356
358
|
SIR_SYNC: "sir-sync",
|
|
357
359
|
ACTIVITY_LOOKAHEAD_SYNC: "activity-lookahead-sync",
|
|
358
360
|
SCHEDULE_AUTO_SCHEDULE: "schedule-auto-schedule"
|
|
@@ -687,6 +689,12 @@ function createScheduleNamespaces(engine) {
|
|
|
687
689
|
kind: DISPATCH_ACTION_KIND.GROUP_SET,
|
|
688
690
|
group
|
|
689
691
|
}),
|
|
692
|
+
wbsDepth: () => engine.getWbsDepth(),
|
|
693
|
+
setWbsDepth: (wbsDepth, context = {}) => engine.dispatch({
|
|
694
|
+
...context,
|
|
695
|
+
kind: DISPATCH_ACTION_KIND.WBS_DEPTH_SET,
|
|
696
|
+
wbsDepth
|
|
697
|
+
}),
|
|
690
698
|
setVisibility: (activityIds, context = {}) => engine.dispatch({
|
|
691
699
|
...context,
|
|
692
700
|
kind: DISPATCH_ACTION_KIND.VISIBILITY_SET,
|
|
@@ -1044,6 +1052,7 @@ var FILTER_FIELD = {
|
|
|
1044
1052
|
TOTAL_SLACK_DAYS: "totalSlackDays",
|
|
1045
1053
|
EXPECTED_PROGRESS_BASELINE: "expectedProgressBaseline",
|
|
1046
1054
|
BASELINE_DURATION_DAYS: "baselineDurationDays",
|
|
1055
|
+
BASELINE_VARIANCE_DAYS: "baselineVarianceDays",
|
|
1047
1056
|
BASELINE_COST: "baselineCost",
|
|
1048
1057
|
BASELINE_WORK_HOURS: "baselineWorkHours",
|
|
1049
1058
|
EXPECTED_PROGRESS: "expectedProgress",
|
|
@@ -1211,6 +1220,10 @@ var FIELD_REGISTRY = {
|
|
|
1211
1220
|
valueKind: FILTER_VALUE_KIND.NUMBER,
|
|
1212
1221
|
extract: (activity) => activity.baselineSnapshot?.durationDays ?? null
|
|
1213
1222
|
},
|
|
1223
|
+
[FILTER_FIELD.BASELINE_VARIANCE_DAYS]: {
|
|
1224
|
+
valueKind: FILTER_VALUE_KIND.NUMBER,
|
|
1225
|
+
extract: (activity) => activity.baselineVarianceDays
|
|
1226
|
+
},
|
|
1214
1227
|
[FILTER_FIELD.BASELINE_COST]: {
|
|
1215
1228
|
valueKind: FILTER_VALUE_KIND.NUMBER,
|
|
1216
1229
|
extract: (activity) => activity.baselineSnapshot?.cost ?? null
|
|
@@ -1301,6 +1314,7 @@ var GROUP_ID_SEPARATOR = ":";
|
|
|
1301
1314
|
var UNASSIGNED_GROUP_LABEL = "Unassigned";
|
|
1302
1315
|
var MINIMUM_GROUP_DEPTH = 1;
|
|
1303
1316
|
var MINIMUM_GROUP_LEVEL = 1;
|
|
1317
|
+
var FLAT_WBS_DEPTH = 0;
|
|
1304
1318
|
function buildGroupRowId(attributeKey, valueId) {
|
|
1305
1319
|
return `${GROUP_ID_PREFIX}${GROUP_ID_SEPARATOR}${attributeKey}${GROUP_ID_SEPARATOR}${valueId}`;
|
|
1306
1320
|
}
|
|
@@ -2278,6 +2292,17 @@ function dispatchGroupSet(action, deps) {
|
|
|
2278
2292
|
adapter.setGroup(group);
|
|
2279
2293
|
return { ok: true, changes: emptyViewChanges(action) };
|
|
2280
2294
|
}
|
|
2295
|
+
function dispatchWbsDepthSet(action, deps) {
|
|
2296
|
+
const { adapter } = deps;
|
|
2297
|
+
const { wbsDepth } = action;
|
|
2298
|
+
if (wbsDepth !== null) {
|
|
2299
|
+
if (!isFiniteInteger(wbsDepth) || wbsDepth < FLAT_WBS_DEPTH) {
|
|
2300
|
+
return { ok: false, reason: FILTER_REJECTION_REASON.INVALID_VALUE };
|
|
2301
|
+
}
|
|
2302
|
+
}
|
|
2303
|
+
adapter.setWbsDepth(wbsDepth);
|
|
2304
|
+
return { ok: true, changes: emptyViewChanges(action) };
|
|
2305
|
+
}
|
|
2281
2306
|
|
|
2282
2307
|
// src/shared/assert-never.ts
|
|
2283
2308
|
function assertNever(value, message) {
|
|
@@ -2356,7 +2381,8 @@ var ACTIVITY_PROPERTY = {
|
|
|
2356
2381
|
CUSTOM_ID: "customId",
|
|
2357
2382
|
NEW_ACTIVITIES_ARRAY: "newActivityIds",
|
|
2358
2383
|
HAS_NEW_ACTIVITIES: "hasNewActivities",
|
|
2359
|
-
CALENDAR_DURATION: "calendarDuration"
|
|
2384
|
+
CALENDAR_DURATION: "calendarDuration",
|
|
2385
|
+
BASELINE_VARIANCE_DAYS: "baselineVarianceDays"};
|
|
2360
2386
|
var LINK_PROPERTY = {
|
|
2361
2387
|
SOURCE: "source",
|
|
2362
2388
|
TARGET: "target",
|
|
@@ -6288,12 +6314,16 @@ function mergeCorrelativeShiftIntoDiff(diff, correlativeBefore, activityId, live
|
|
|
6288
6314
|
after: liveActivity.correlativeId
|
|
6289
6315
|
};
|
|
6290
6316
|
}
|
|
6317
|
+
var DERIVED_DISPLAY_FIELDS = [
|
|
6318
|
+
ACTIVITY_PROPERTY.CALENDAR_DURATION,
|
|
6319
|
+
ACTIVITY_PROPERTY.BASELINE_VARIANCE_DAYS
|
|
6320
|
+
];
|
|
6291
6321
|
function diffActivity(before, after) {
|
|
6292
6322
|
const fields = {};
|
|
6293
6323
|
const beforeRec = before ?? {};
|
|
6294
6324
|
const afterRec = after;
|
|
6295
6325
|
const keys = /* @__PURE__ */ new Set([...Object.keys(beforeRec), ...Object.keys(afterRec)]);
|
|
6296
|
-
keys.delete(
|
|
6326
|
+
for (const derived of DERIVED_DISPLAY_FIELDS) keys.delete(derived);
|
|
6297
6327
|
for (const k of keys) {
|
|
6298
6328
|
if (Object.hasOwn(beforeRec, k) !== Object.hasOwn(afterRec, k) || !fieldValueEqual(beforeRec[k], afterRec[k])) {
|
|
6299
6329
|
fields[k] = {
|
|
@@ -6543,6 +6573,43 @@ function applyStatusPass(state, criteria) {
|
|
|
6543
6573
|
return changed;
|
|
6544
6574
|
}
|
|
6545
6575
|
|
|
6576
|
+
// src/propagations/shared/get-visible-baseline.ts
|
|
6577
|
+
function getVisibleBaseline(activity) {
|
|
6578
|
+
const points = activity?.baselinePoints;
|
|
6579
|
+
if (!Array.isArray(points) || points.length === 0) return null;
|
|
6580
|
+
return points.find((point) => point.isVisibleVersion) ?? null;
|
|
6581
|
+
}
|
|
6582
|
+
|
|
6583
|
+
// src/columns/baseline-variance/compute.ts
|
|
6584
|
+
var VARIANCE_DECIMAL_SCALE = 100;
|
|
6585
|
+
var roundToVariancePrecision = (days) => Math.round(days * VARIANCE_DECIMAL_SCALE) / VARIANCE_DECIMAL_SCALE;
|
|
6586
|
+
function computeBaselineVarianceDays(activity, calendars, hoursPerDay) {
|
|
6587
|
+
if (hoursPerDay <= 0) return null;
|
|
6588
|
+
const baselineEnd = getVisibleBaseline(activity)?.endDate;
|
|
6589
|
+
const activityEnd = activity.endDate;
|
|
6590
|
+
if (!baselineEnd || !activityEnd) return null;
|
|
6591
|
+
const finishesLate = activityEnd.getTime() > baselineEnd.getTime();
|
|
6592
|
+
const finishesEarly = baselineEnd.getTime() > activityEnd.getTime();
|
|
6593
|
+
if (!finishesLate && !finishesEarly) return 0;
|
|
6594
|
+
const durationHours = calendars.calculateDuration({
|
|
6595
|
+
startDate: finishesLate ? baselineEnd : activityEnd,
|
|
6596
|
+
endDate: finishesLate ? activityEnd : baselineEnd,
|
|
6597
|
+
task: activity
|
|
6598
|
+
});
|
|
6599
|
+
const magnitude = roundToVariancePrecision(durationHours / hoursPerDay);
|
|
6600
|
+
return finishesLate ? magnitude : -magnitude;
|
|
6601
|
+
}
|
|
6602
|
+
function applyBaselineVariancePass(state, hoursPerDay) {
|
|
6603
|
+
const changed = [];
|
|
6604
|
+
state.forEachActivity((activity, id) => {
|
|
6605
|
+
const variance = computeBaselineVarianceDays(activity, state, hoursPerDay);
|
|
6606
|
+
if (activity.baselineVarianceDays === variance) return;
|
|
6607
|
+
activity.baselineVarianceDays = variance;
|
|
6608
|
+
changed.push(String(id));
|
|
6609
|
+
});
|
|
6610
|
+
return changed;
|
|
6611
|
+
}
|
|
6612
|
+
|
|
6546
6613
|
// src/critical-path/legacy/shims/moment.js
|
|
6547
6614
|
function moment(input) {
|
|
6548
6615
|
const d = input instanceof Date ? new Date(input.getTime()) : input && typeof input === "object" && typeof input.valueOf === "function" ? new Date(input.valueOf()) : new Date(input);
|
|
@@ -11167,6 +11234,7 @@ var NON_SCHEDULING_KINDS = /* @__PURE__ */ new Set([
|
|
|
11167
11234
|
DISPATCH_ACTION_KIND.SORT_SET,
|
|
11168
11235
|
DISPATCH_ACTION_KIND.VIEW_ATTRIBUTES_SET,
|
|
11169
11236
|
DISPATCH_ACTION_KIND.GROUP_SET,
|
|
11237
|
+
DISPATCH_ACTION_KIND.WBS_DEPTH_SET,
|
|
11170
11238
|
DISPATCH_ACTION_KIND.SIR_SYNC,
|
|
11171
11239
|
DISPATCH_ACTION_KIND.ACTIVITY_LOOKAHEAD_SYNC,
|
|
11172
11240
|
DISPATCH_ACTION_KIND.PERSISTENCE_ACKNOWLEDGE,
|
|
@@ -11183,7 +11251,8 @@ var PURE_VIEW_STATE_KINDS = /* @__PURE__ */ new Set([
|
|
|
11183
11251
|
DISPATCH_ACTION_KIND.FILTER_SET,
|
|
11184
11252
|
DISPATCH_ACTION_KIND.SORT_SET,
|
|
11185
11253
|
DISPATCH_ACTION_KIND.VIEW_ATTRIBUTES_SET,
|
|
11186
|
-
DISPATCH_ACTION_KIND.GROUP_SET
|
|
11254
|
+
DISPATCH_ACTION_KIND.GROUP_SET,
|
|
11255
|
+
DISPATCH_ACTION_KIND.WBS_DEPTH_SET
|
|
11187
11256
|
]);
|
|
11188
11257
|
function reappliesViewState(action) {
|
|
11189
11258
|
return !PURE_VIEW_STATE_KINDS.has(action.kind);
|
|
@@ -11267,6 +11336,7 @@ var DERIVED_PASS = {
|
|
|
11267
11336
|
REAL_WORK: "real-work",
|
|
11268
11337
|
EXPECTED_PROGRESS: "expected-progress",
|
|
11269
11338
|
REAL_COST: "real-cost",
|
|
11339
|
+
BASELINE_VARIANCE: "baseline-variance",
|
|
11270
11340
|
CRITICAL_PATH: "critical-path"
|
|
11271
11341
|
};
|
|
11272
11342
|
function resolveDerivedPasses(action, autoSchedule, options) {
|
|
@@ -11284,6 +11354,9 @@ function resolveDerivedPasses(action, autoSchedule, options) {
|
|
|
11284
11354
|
if (runsLoadRecomputes && resolveRunRealCost(action)) {
|
|
11285
11355
|
passes.add(DERIVED_PASS.REAL_COST);
|
|
11286
11356
|
}
|
|
11357
|
+
if (dispatchChangesSchedulingState(action)) {
|
|
11358
|
+
passes.add(DERIVED_PASS.BASELINE_VARIANCE);
|
|
11359
|
+
}
|
|
11287
11360
|
const runsCriticalPath = runsLoadRecomputes && resolveRunCriticalPath(action) && !options.skipCriticalPath;
|
|
11288
11361
|
if (runsCriticalPath) passes.add(DERIVED_PASS.CRITICAL_PATH);
|
|
11289
11362
|
return passes;
|
|
@@ -11946,6 +12019,9 @@ async function runDerivedRecomputes(deps, passes, now) {
|
|
|
11946
12019
|
if (passes.has(DERIVED_PASS.REAL_COST)) {
|
|
11947
12020
|
emitRealCost(deps.adapter);
|
|
11948
12021
|
}
|
|
12022
|
+
if (passes.has(DERIVED_PASS.BASELINE_VARIANCE)) {
|
|
12023
|
+
applyBaselineVariancePass(deps.adapter, deps.sector.hoursPerDay);
|
|
12024
|
+
}
|
|
11949
12025
|
if (passes.has(DERIVED_PASS.CRITICAL_PATH)) {
|
|
11950
12026
|
await applyCriticalPath(deps.adapter, deps.sector.hoursPerDay);
|
|
11951
12027
|
}
|
|
@@ -12893,6 +12969,7 @@ var NEW_ACTIVITY_DEFAULTS = Object.freeze({
|
|
|
12893
12969
|
tagIds: [],
|
|
12894
12970
|
baselinePoints: [],
|
|
12895
12971
|
baselineSnapshot: null,
|
|
12972
|
+
baselineVarianceDays: null,
|
|
12896
12973
|
recursiveDurationHours: 0,
|
|
12897
12974
|
isCritical: false,
|
|
12898
12975
|
freeSlackHours: null,
|
|
@@ -16624,6 +16701,7 @@ async function dispatchBaselineApply(action, deps) {
|
|
|
16624
16701
|
deps.reporter,
|
|
16625
16702
|
deps.defaultBaseCalendarId ?? null
|
|
16626
16703
|
);
|
|
16704
|
+
applyBaselineVariancePass(deps.adapter, deps.sector.hoursPerDay);
|
|
16627
16705
|
if (activeBaselineSignature(deps) !== activeBaselineBefore) {
|
|
16628
16706
|
recomputeBaselineWeightedFields(
|
|
16629
16707
|
deps,
|
|
@@ -17064,6 +17142,12 @@ async function performDispatch(action, options, deps) {
|
|
|
17064
17142
|
hoursPerDay: deps.sector.hoursPerDay
|
|
17065
17143
|
});
|
|
17066
17144
|
}
|
|
17145
|
+
if (action.kind === DISPATCH_ACTION_KIND.WBS_DEPTH_SET) {
|
|
17146
|
+
return dispatchWbsDepthSet(action, {
|
|
17147
|
+
adapter: deps.adapter,
|
|
17148
|
+
hoursPerDay: deps.sector.hoursPerDay
|
|
17149
|
+
});
|
|
17150
|
+
}
|
|
17067
17151
|
if (action.kind === DISPATCH_ACTION_KIND.SIR_SYNC) {
|
|
17068
17152
|
return dispatchSirSync(action, deps);
|
|
17069
17153
|
}
|
|
@@ -20203,35 +20287,95 @@ function sortedChildNodes(node, direction) {
|
|
|
20203
20287
|
if (direction === ORDER_DIRECTION.DESCENDING) children.reverse();
|
|
20204
20288
|
return children;
|
|
20205
20289
|
}
|
|
20206
|
-
|
|
20207
|
-
|
|
20290
|
+
var FIRST_WBS_LEVEL = 1;
|
|
20291
|
+
var WHOLE_WBS = Number.POSITIVE_INFINITY;
|
|
20292
|
+
function activityRow(activity) {
|
|
20293
|
+
return {
|
|
20294
|
+
kind: VISUAL_ROW_KIND.ACTIVITY,
|
|
20295
|
+
activityId: String(activity.id)
|
|
20296
|
+
};
|
|
20297
|
+
}
|
|
20298
|
+
function buildWbsTree(included, activitiesInVisualOrder, parentOf) {
|
|
20299
|
+
const roots = [];
|
|
20300
|
+
const childrenOf = /* @__PURE__ */ new Map();
|
|
20301
|
+
for (const activity of activitiesInVisualOrder) {
|
|
20302
|
+
if (!included.has(String(activity.id))) continue;
|
|
20303
|
+
const parentId = parentOf(activity.id);
|
|
20304
|
+
const parentKey = parentId === null ? null : String(parentId);
|
|
20305
|
+
if (parentKey === null || !included.has(parentKey)) {
|
|
20306
|
+
roots.push(activity);
|
|
20307
|
+
continue;
|
|
20308
|
+
}
|
|
20309
|
+
const siblings = childrenOf.get(parentKey);
|
|
20310
|
+
if (siblings === void 0) childrenOf.set(parentKey, [activity]);
|
|
20311
|
+
else siblings.push(activity);
|
|
20312
|
+
}
|
|
20313
|
+
return { roots, childrenOf };
|
|
20314
|
+
}
|
|
20315
|
+
function emitWbsRows(included, input) {
|
|
20316
|
+
const { roots, childrenOf } = buildWbsTree(
|
|
20317
|
+
included,
|
|
20318
|
+
input.activitiesInVisualOrder,
|
|
20319
|
+
input.parentOf
|
|
20320
|
+
);
|
|
20321
|
+
const cap = input.wbsDepth ?? WHOLE_WBS;
|
|
20322
|
+
const childrenOfActivity = (activity) => childrenOf.get(String(activity.id)) ?? [];
|
|
20323
|
+
const foldToActivities = (siblings) => {
|
|
20324
|
+
const folded = [];
|
|
20325
|
+
const walk = (nodes) => {
|
|
20326
|
+
for (const node of nodes) {
|
|
20327
|
+
const children = childrenOfActivity(node);
|
|
20328
|
+
if (children.length === 0) folded.push(node);
|
|
20329
|
+
else walk(children);
|
|
20330
|
+
}
|
|
20331
|
+
};
|
|
20332
|
+
walk(siblings);
|
|
20333
|
+
return folded;
|
|
20334
|
+
};
|
|
20335
|
+
const emit = (siblings, level) => {
|
|
20336
|
+
if (level > cap) {
|
|
20337
|
+
const folded = foldToActivities(siblings);
|
|
20338
|
+
const ordered = input.comparator === null ? folded : sortSiblingsInOrderMode(
|
|
20339
|
+
folded,
|
|
20340
|
+
input.comparator,
|
|
20341
|
+
input.orderMode,
|
|
20342
|
+
() => false
|
|
20343
|
+
);
|
|
20344
|
+
for (const activity of ordered) input.rows.push(activityRow(activity));
|
|
20345
|
+
return;
|
|
20346
|
+
}
|
|
20347
|
+
for (const activity of siblings) {
|
|
20348
|
+
input.rows.push(activityRow(activity));
|
|
20349
|
+
const children = childrenOfActivity(activity);
|
|
20350
|
+
if (children.length > 0) emit(children, level + 1);
|
|
20351
|
+
}
|
|
20352
|
+
};
|
|
20353
|
+
emit(roots, FIRST_WBS_LEVEL);
|
|
20354
|
+
}
|
|
20355
|
+
function emitWbsOrderedActivities(memberActivities, input) {
|
|
20356
|
+
const included = new Set(
|
|
20208
20357
|
memberActivities.map((activity) => String(activity.id))
|
|
20209
20358
|
);
|
|
20210
|
-
const
|
|
20211
|
-
|
|
20212
|
-
let ancestorId = parentOf(memberId);
|
|
20359
|
+
for (const member of memberActivities) {
|
|
20360
|
+
let ancestorId = input.parentOf(member.id);
|
|
20213
20361
|
while (ancestorId !== null) {
|
|
20214
20362
|
included.add(String(ancestorId));
|
|
20215
|
-
ancestorId = parentOf(ancestorId);
|
|
20363
|
+
ancestorId = input.parentOf(ancestorId);
|
|
20216
20364
|
}
|
|
20217
20365
|
}
|
|
20218
|
-
|
|
20219
|
-
if (!included.has(String(activity.id))) continue;
|
|
20220
|
-
rows.push({
|
|
20221
|
-
kind: VISUAL_ROW_KIND.ACTIVITY,
|
|
20222
|
-
activityId: String(activity.id)
|
|
20223
|
-
});
|
|
20224
|
-
}
|
|
20366
|
+
emitWbsRows(included, input);
|
|
20225
20367
|
}
|
|
20226
20368
|
function emitActivities(node, context) {
|
|
20227
20369
|
const { rows } = context;
|
|
20228
20370
|
if (context.group.includeWbs) {
|
|
20229
|
-
emitWbsOrderedActivities(
|
|
20230
|
-
|
|
20231
|
-
context.
|
|
20232
|
-
context.
|
|
20371
|
+
emitWbsOrderedActivities(node.activities, {
|
|
20372
|
+
activitiesInVisualOrder: context.activitiesInVisualOrder,
|
|
20373
|
+
parentOf: context.parentOf,
|
|
20374
|
+
wbsDepth: context.wbsDepth,
|
|
20375
|
+
comparator: context.comparator,
|
|
20376
|
+
orderMode: context.orderMode,
|
|
20233
20377
|
rows
|
|
20234
|
-
);
|
|
20378
|
+
});
|
|
20235
20379
|
return;
|
|
20236
20380
|
}
|
|
20237
20381
|
for (const activity of sortSiblingsInOrderMode(
|
|
@@ -20282,10 +20426,20 @@ function projectVisualRows(input) {
|
|
|
20282
20426
|
(activity) => input.isVisible(activity.id)
|
|
20283
20427
|
);
|
|
20284
20428
|
if (input.group === null || input.catalog === null) {
|
|
20285
|
-
return visibleActivities.map(
|
|
20286
|
-
|
|
20287
|
-
|
|
20288
|
-
|
|
20429
|
+
if (input.wbsDepth === null) return visibleActivities.map(activityRow);
|
|
20430
|
+
const rows2 = [];
|
|
20431
|
+
emitWbsRows(
|
|
20432
|
+
new Set(visibleActivities.map((activity) => String(activity.id))),
|
|
20433
|
+
{
|
|
20434
|
+
activitiesInVisualOrder: visibleActivities,
|
|
20435
|
+
parentOf: input.parentOf,
|
|
20436
|
+
wbsDepth: input.wbsDepth,
|
|
20437
|
+
comparator: input.comparator,
|
|
20438
|
+
orderMode: input.orderMode,
|
|
20439
|
+
rows: rows2
|
|
20440
|
+
}
|
|
20441
|
+
);
|
|
20442
|
+
return rows2;
|
|
20289
20443
|
}
|
|
20290
20444
|
const { group, catalog } = input;
|
|
20291
20445
|
const root = buildGroupTree(
|
|
@@ -20303,6 +20457,7 @@ function projectVisualRows(input) {
|
|
|
20303
20457
|
hasChildren: input.hasChildren,
|
|
20304
20458
|
comparator: input.comparator,
|
|
20305
20459
|
orderMode: input.orderMode,
|
|
20460
|
+
wbsDepth: input.wbsDepth,
|
|
20306
20461
|
secondaryCatalog: input.secondaryCatalog,
|
|
20307
20462
|
rows
|
|
20308
20463
|
};
|
|
@@ -20316,6 +20471,7 @@ function projectVisualRows(input) {
|
|
|
20316
20471
|
var ViewAttributeStore = class _ViewAttributeStore {
|
|
20317
20472
|
catalogs = /* @__PURE__ */ new Map();
|
|
20318
20473
|
group = null;
|
|
20474
|
+
wbsDepth = null;
|
|
20319
20475
|
getCatalog(key) {
|
|
20320
20476
|
return this.catalogs.get(key) ?? null;
|
|
20321
20477
|
}
|
|
@@ -20335,10 +20491,17 @@ var ViewAttributeStore = class _ViewAttributeStore {
|
|
|
20335
20491
|
setGroup(nextGroup) {
|
|
20336
20492
|
this.group = nextGroup;
|
|
20337
20493
|
}
|
|
20494
|
+
getWbsDepth() {
|
|
20495
|
+
return this.wbsDepth;
|
|
20496
|
+
}
|
|
20497
|
+
setWbsDepth(nextDepth) {
|
|
20498
|
+
this.wbsDepth = nextDepth;
|
|
20499
|
+
}
|
|
20338
20500
|
clone() {
|
|
20339
20501
|
const fork = new _ViewAttributeStore();
|
|
20340
20502
|
fork.catalogs = new Map(this.catalogs);
|
|
20341
20503
|
fork.group = this.group === null ? null : cloneDomainValue(this.group);
|
|
20504
|
+
fork.wbsDepth = this.wbsDepth;
|
|
20342
20505
|
return fork;
|
|
20343
20506
|
}
|
|
20344
20507
|
};
|
|
@@ -20576,6 +20739,13 @@ var ScheduleState = class _ScheduleState {
|
|
|
20576
20739
|
this._viewAttributes.setGroup(nextGroup);
|
|
20577
20740
|
this.invalidateVisualRows();
|
|
20578
20741
|
}
|
|
20742
|
+
getWbsDepth() {
|
|
20743
|
+
return this._viewAttributes.getWbsDepth();
|
|
20744
|
+
}
|
|
20745
|
+
setWbsDepth(nextDepth) {
|
|
20746
|
+
this._viewAttributes.setWbsDepth(nextDepth);
|
|
20747
|
+
this.invalidateVisualRows();
|
|
20748
|
+
}
|
|
20579
20749
|
invalidateVisualRows() {
|
|
20580
20750
|
this._cache.visualRows = null;
|
|
20581
20751
|
}
|
|
@@ -20598,7 +20768,8 @@ var ScheduleState = class _ScheduleState {
|
|
|
20598
20768
|
catalog,
|
|
20599
20769
|
secondaryCatalog,
|
|
20600
20770
|
comparator: this.getOrderComparator(),
|
|
20601
|
-
orderMode: this.getOrderMode()
|
|
20771
|
+
orderMode: this.getOrderMode(),
|
|
20772
|
+
wbsDepth: this._viewAttributes.getWbsDepth()
|
|
20602
20773
|
});
|
|
20603
20774
|
return this._cache.visualRows;
|
|
20604
20775
|
}
|
|
@@ -21195,7 +21366,7 @@ function getDispatchHistoryPolicy(action) {
|
|
|
21195
21366
|
if (action.kind === DISPATCH_ACTION_KIND.PERSISTENCE_ACKNOWLEDGE) {
|
|
21196
21367
|
return DISPATCH_HISTORY_POLICY.CHECKPOINT_ON_SUCCESS;
|
|
21197
21368
|
}
|
|
21198
|
-
if (action.kind === DISPATCH_ACTION_KIND.SIR_SYNC || action.kind === DISPATCH_ACTION_KIND.CALENDAR_RECONCILE || action.kind === DISPATCH_ACTION_KIND.ACTIVITY_LOOKAHEAD_SYNC || action.kind === DISPATCH_ACTION_KIND.BASELINE_APPLY || action.kind === DISPATCH_ACTION_KIND.PONDERATOR_CRITERION_SET || action.kind === DISPATCH_ACTION_KIND.STATUS_CRITERIA_SET || action.kind === DISPATCH_ACTION_KIND.ACTIVITY_CLIPBOARD_CLEAR || action.kind === DISPATCH_ACTION_KIND.ACTIVITY_COPY || action.kind === DISPATCH_ACTION_KIND.SELECTION_TOGGLE || action.kind === DISPATCH_ACTION_KIND.SELECTION_REPLACE || action.kind === DISPATCH_ACTION_KIND.VISIBILITY_SET || action.kind === DISPATCH_ACTION_KIND.FILTER_SET || action.kind === DISPATCH_ACTION_KIND.SORT_SET || action.kind === DISPATCH_ACTION_KIND.VIEW_ATTRIBUTES_SET || action.kind === DISPATCH_ACTION_KIND.GROUP_SET) {
|
|
21369
|
+
if (action.kind === DISPATCH_ACTION_KIND.SIR_SYNC || action.kind === DISPATCH_ACTION_KIND.CALENDAR_RECONCILE || action.kind === DISPATCH_ACTION_KIND.ACTIVITY_LOOKAHEAD_SYNC || action.kind === DISPATCH_ACTION_KIND.BASELINE_APPLY || action.kind === DISPATCH_ACTION_KIND.PONDERATOR_CRITERION_SET || action.kind === DISPATCH_ACTION_KIND.STATUS_CRITERIA_SET || action.kind === DISPATCH_ACTION_KIND.ACTIVITY_CLIPBOARD_CLEAR || action.kind === DISPATCH_ACTION_KIND.ACTIVITY_COPY || action.kind === DISPATCH_ACTION_KIND.SELECTION_TOGGLE || action.kind === DISPATCH_ACTION_KIND.SELECTION_REPLACE || action.kind === DISPATCH_ACTION_KIND.VISIBILITY_SET || action.kind === DISPATCH_ACTION_KIND.FILTER_SET || action.kind === DISPATCH_ACTION_KIND.SORT_SET || action.kind === DISPATCH_ACTION_KIND.VIEW_ATTRIBUTES_SET || action.kind === DISPATCH_ACTION_KIND.GROUP_SET || action.kind === DISPATCH_ACTION_KIND.WBS_DEPTH_SET) {
|
|
21199
21370
|
return DISPATCH_HISTORY_POLICY.SKIP;
|
|
21200
21371
|
}
|
|
21201
21372
|
return DISPATCH_HISTORY_POLICY.RECORD;
|
|
@@ -21711,6 +21882,7 @@ var ACTIVITY_SAVE_FIELD_POLICY = {
|
|
|
21711
21882
|
isCritical: SAVE_FIELD_POLICY.IGNORED,
|
|
21712
21883
|
freeSlackHours: SAVE_FIELD_POLICY.IGNORED,
|
|
21713
21884
|
calendarDuration: SAVE_FIELD_POLICY.IGNORED,
|
|
21885
|
+
baselineVarianceDays: SAVE_FIELD_POLICY.IGNORED,
|
|
21714
21886
|
expectedProgress: SAVE_FIELD_POLICY.IGNORED,
|
|
21715
21887
|
expectedProgressBaseline: SAVE_FIELD_POLICY.IGNORED,
|
|
21716
21888
|
status: SAVE_FIELD_POLICY.IGNORED,
|
|
@@ -22337,6 +22509,7 @@ function parseActivity(raw, context) {
|
|
|
22337
22509
|
isMilestone
|
|
22338
22510
|
),
|
|
22339
22511
|
baselineSnapshot: null,
|
|
22512
|
+
baselineVarianceDays: null,
|
|
22340
22513
|
recursiveDurationHours: durationToHours(
|
|
22341
22514
|
Number(raw.sumOfDurationRecursively ?? 0),
|
|
22342
22515
|
context.hoursPerDay
|
|
@@ -23559,6 +23732,7 @@ async function runInitialPasses(deps) {
|
|
|
23559
23732
|
applyExpectedProgressLive(state, now);
|
|
23560
23733
|
applyStatusPass(state, sector.statusCriteria);
|
|
23561
23734
|
}
|
|
23735
|
+
applyBaselineVariancePass(state, sector.hoursPerDay);
|
|
23562
23736
|
return;
|
|
23563
23737
|
}
|
|
23564
23738
|
const result = await scheduler.schedule({});
|
|
@@ -23571,6 +23745,7 @@ async function runInitialPasses(deps) {
|
|
|
23571
23745
|
applyExpectedProgressLive(state, now);
|
|
23572
23746
|
applyStatusPass(state, sector.statusCriteria);
|
|
23573
23747
|
}
|
|
23748
|
+
applyBaselineVariancePass(state, sector.hoursPerDay);
|
|
23574
23749
|
}
|
|
23575
23750
|
function recomputeSkippedLeafEnds(state) {
|
|
23576
23751
|
state.forEachActivity((activity) => {
|
|
@@ -24448,6 +24623,11 @@ var ScheduleCore = class _ScheduleCore {
|
|
|
24448
24623
|
this.assertReady();
|
|
24449
24624
|
return cloneDomainValue(this.coreRuntime.state.getGroup());
|
|
24450
24625
|
}
|
|
24626
|
+
/** @returns How deep the WBS reaches the screen, or `null` for every level. */
|
|
24627
|
+
getWbsDepth() {
|
|
24628
|
+
this.assertReady();
|
|
24629
|
+
return this.coreRuntime.state.getWbsDepth();
|
|
24630
|
+
}
|
|
24451
24631
|
/** @returns Whether the parent currently has a direct child. */
|
|
24452
24632
|
hasChild(parentId) {
|
|
24453
24633
|
this.assertReady();
|
|
@@ -25419,6 +25599,7 @@ exports.FILTER_LOGIC = FILTER_LOGIC;
|
|
|
25419
25599
|
exports.FILTER_OPERATOR = FILTER_OPERATOR;
|
|
25420
25600
|
exports.FILTER_REJECTION_REASON = FILTER_REJECTION_REASON;
|
|
25421
25601
|
exports.FILTER_VALUE_KIND = FILTER_VALUE_KIND;
|
|
25602
|
+
exports.FLAT_WBS_DEPTH = FLAT_WBS_DEPTH;
|
|
25422
25603
|
exports.GROUP_ID_PREFIX = GROUP_ID_PREFIX;
|
|
25423
25604
|
exports.GROUP_ID_SEPARATOR = GROUP_ID_SEPARATOR;
|
|
25424
25605
|
exports.LINK_BATCH_OPERATION_KIND = LINK_BATCH_OPERATION_KIND;
|