@outbuild-company/schedule-core 1.29.0 → 1.29.1

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/index.cjs CHANGED
@@ -932,11 +932,6 @@ function diffSelections(before, after) {
932
932
  return { checked, unchecked };
933
933
  }
934
934
 
935
- // src/internal/selection/is-frozen.ts
936
- function isFrozen(activity) {
937
- return (activity.pendingRequestIds?.length ?? 0) > 0;
938
- }
939
-
940
935
  // src/dispatch/reasons.ts
941
936
  var REJECTION_REASON = {
942
937
  CANNOT_EDIT: "cannot_edit",
@@ -974,10 +969,6 @@ var REJECTION_REASON = {
974
969
  };
975
970
 
976
971
  // src/dispatch/selection.ts
977
- var snapshotIsFrozen = (adapter, id) => {
978
- const snapshot = adapter.getActivity(id);
979
- return snapshot != null && isFrozen(snapshot);
980
- };
981
972
  var buildSelectionChangeSet = (action, adapter, changed2) => {
982
973
  const viewState = [];
983
974
  const emit = (id, nextChecked) => {
@@ -1002,8 +993,8 @@ function dispatchSelectionToggle(action, deps) {
1002
993
  if (!adapter.getActivity(clickedId)) {
1003
994
  return { ok: false, reason: REJECTION_REASON.ACTIVITY_NOT_FOUND };
1004
995
  }
1005
- const frozenSet = action.frozenIds ? new Set(action.frozenIds) : null;
1006
- const isActivityFrozen = frozenSet ? (id) => frozenSet.has(id) : (id) => snapshotIsFrozen(adapter, id);
996
+ const frozenSet = new Set((action.frozenIds ?? []).map(String));
997
+ const isActivityFrozen = (id) => frozenSet.has(id);
1007
998
  const update = computeSelectionUpdate({
1008
999
  clickedId,
1009
1000
  isChecked: action.isChecked,
@@ -1027,7 +1018,7 @@ function dispatchSelectionToggle(action, deps) {
1027
1018
  function dispatchSelectionReplace(action, deps) {
1028
1019
  const { adapter } = deps;
1029
1020
  const target = new Set(
1030
- action.activityIds.map(String).filter((id) => adapter.activityExists(id)).filter((id) => !snapshotIsFrozen(adapter, id))
1021
+ action.activityIds.map(String).filter((id) => adapter.activityExists(id))
1031
1022
  );
1032
1023
  const current = new Set(adapter.checkedIds().map(String));
1033
1024
  const changed2 = {
@@ -12474,6 +12465,11 @@ function cloneLink(link) {
12474
12465
  return { ...link };
12475
12466
  }
12476
12467
 
12468
+ // src/internal/selection/is-frozen.ts
12469
+ function isFrozen(activity) {
12470
+ return (activity.pendingRequestIds?.length ?? 0) > 0;
12471
+ }
12472
+
12477
12473
  // src/dispatch/sir-auto-reject.ts
12478
12474
  function detectSirAutoReject(beforeSnap, adapter, touchedIds) {
12479
12475
  const effects = [];