strapi-plugin-bulk-updater 1.5.5 → 1.5.7

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.
@@ -4451,10 +4451,19 @@ const BulkUpdater = () => {
4451
4451
  if (selectedEntries[key]) {
4452
4452
  const parts = key.split(KEY_SEP);
4453
4453
  if (parts.length === 2) {
4454
- const targetObj = { uid: parts[0], documentId: parts[1] };
4454
+ const colUid = parts[0];
4455
+ const docId = parts[1];
4456
+ const targetObj = { uid: colUid, documentId: docId };
4455
4457
  if (selectedDzBlocks[key] && selectedDzBlocks[key].length > 0) {
4456
4458
  targetObj.dynamicZoneIndexes = selectedDzBlocks[key];
4457
4459
  }
4460
+ const colPage = collectionPages[colUid];
4461
+ const cachedEntry = colPage?.entries?.find((e) => e.documentId === docId);
4462
+ if (cachedEntry) {
4463
+ if (cachedEntry.status) targetObj.status = cachedEntry.status;
4464
+ if (cachedEntry.strapi_stage) targetObj.strapi_stage = cachedEntry.strapi_stage;
4465
+ if (cachedEntry.publishedAt) targetObj.publishedAt = cachedEntry.publishedAt;
4466
+ }
4458
4467
  targets.push(targetObj);
4459
4468
  }
4460
4469
  }
@@ -4500,10 +4509,19 @@ const BulkUpdater = () => {
4500
4509
  if (selectedEntries[key]) {
4501
4510
  const parts = key.split(KEY_SEP);
4502
4511
  if (parts.length === 2) {
4503
- const targetObj = { uid: parts[0], documentId: parts[1] };
4512
+ const colUid = parts[0];
4513
+ const docId = parts[1];
4514
+ const targetObj = { uid: colUid, documentId: docId };
4504
4515
  if (selectedDzBlocks[key] && selectedDzBlocks[key].length > 0) {
4505
4516
  targetObj.dynamicZoneIndexes = selectedDzBlocks[key];
4506
4517
  }
4518
+ const colPage = collectionPages[colUid];
4519
+ const cachedEntry = colPage?.entries?.find((e) => e.documentId === docId);
4520
+ if (cachedEntry) {
4521
+ if (cachedEntry.status) targetObj.status = cachedEntry.status;
4522
+ if (cachedEntry.strapi_stage) targetObj.strapi_stage = cachedEntry.strapi_stage;
4523
+ if (cachedEntry.publishedAt) targetObj.publishedAt = cachedEntry.publishedAt;
4524
+ }
4507
4525
  targets.push(targetObj);
4508
4526
  }
4509
4527
  }
@@ -7515,4 +7533,4 @@ export {
7515
7533
  getSortOptionsForCollection,
7516
7534
  parseDynamicZonePath
7517
7535
  };
7518
- //# sourceMappingURL=BulkUpdater-7YA96VJT.mjs.map
7536
+ //# sourceMappingURL=BulkUpdater-Ci_Uojtf.mjs.map