strapi-plugin-bulk-updater 1.2.11 → 1.2.12
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/_chunks/{BulkUpdater-DS6gm_qd.js → BulkUpdater-CQ9zGdat.js} +401 -4
- package/dist/_chunks/BulkUpdater-CQ9zGdat.js.map +1 -0
- package/dist/_chunks/{BulkUpdater-B_COVQmo.mjs → BulkUpdater-DvCSr1vU.mjs} +401 -4
- package/dist/_chunks/BulkUpdater-DvCSr1vU.mjs.map +1 -0
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/server/index.js +377 -3
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +377 -3
- package/dist/server/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/_chunks/BulkUpdater-B_COVQmo.mjs.map +0 -1
- package/dist/_chunks/BulkUpdater-DS6gm_qd.js.map +0 -1
|
@@ -1124,7 +1124,8 @@ const BulkUpdatePreviewModal = ({
|
|
|
1124
1124
|
loading,
|
|
1125
1125
|
previewData,
|
|
1126
1126
|
attribute,
|
|
1127
|
-
targetValueDisplay
|
|
1127
|
+
targetValueDisplay,
|
|
1128
|
+
publishOnApproval = true
|
|
1128
1129
|
}) => {
|
|
1129
1130
|
const [filterTab, setFilterTab] = React.useState("all");
|
|
1130
1131
|
const [searchQuery, setSearchQuery] = React.useState("");
|
|
@@ -1197,9 +1198,17 @@ const BulkUpdatePreviewModal = ({
|
|
|
1197
1198
|
] }),
|
|
1198
1199
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", children: "Inspect exact before & after values across target records before applying changes to the database." })
|
|
1199
1200
|
] }),
|
|
1200
|
-
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, alignItems: "center", children: [
|
|
1201
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, alignItems: "center", wrap: "wrap", children: [
|
|
1201
1202
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", children: "New Value:" }),
|
|
1202
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Badge, { backgroundColor: "success100", textColor: "success700", children: targetValueDisplay || "(empty)" })
|
|
1203
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Badge, { backgroundColor: "success100", textColor: "success700", children: targetValueDisplay || "(empty)" }),
|
|
1204
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1205
|
+
designSystem.Badge,
|
|
1206
|
+
{
|
|
1207
|
+
backgroundColor: publishOnApproval !== false ? "success100" : "warning100",
|
|
1208
|
+
textColor: publishOnApproval !== false ? "success700" : "warning700",
|
|
1209
|
+
children: publishOnApproval !== false ? "✓ LIVE PUBLISH" : "DRAFT ONLY"
|
|
1210
|
+
}
|
|
1211
|
+
)
|
|
1203
1212
|
] })
|
|
1204
1213
|
] })
|
|
1205
1214
|
}
|
|
@@ -1638,6 +1647,9 @@ const BulkUpdater = () => {
|
|
|
1638
1647
|
const [showPreviewModal, setShowPreviewModal] = React.useState(false);
|
|
1639
1648
|
const [previewLoading, setPreviewLoading] = React.useState(false);
|
|
1640
1649
|
const [previewData, setPreviewData] = React.useState(null);
|
|
1650
|
+
const [showPublishConfirmModal, setShowPublishConfirmModal] = React.useState(false);
|
|
1651
|
+
const [publishing, setPublishing] = React.useState(false);
|
|
1652
|
+
const [publishMakerNotesInput, setPublishMakerNotesInput] = React.useState("");
|
|
1641
1653
|
const MODELS_CACHE_KEY = "strapi_bulk_updater_models_cache";
|
|
1642
1654
|
const LAST_ATTR_KEY = "strapi_bulk_updater_last_attr";
|
|
1643
1655
|
const getInitialAttribute = () => {
|
|
@@ -2423,6 +2435,148 @@ const BulkUpdater = () => {
|
|
|
2423
2435
|
setMakerNotesInput("");
|
|
2424
2436
|
}
|
|
2425
2437
|
};
|
|
2438
|
+
const handleOpenPublishModal = () => {
|
|
2439
|
+
const totalSelected = Object.values(selectedEntries).filter(Boolean).length;
|
|
2440
|
+
if (totalSelected === 0) {
|
|
2441
|
+
toggleNotification({
|
|
2442
|
+
type: "warning",
|
|
2443
|
+
message: "Please select at least one collection type or entry to publish"
|
|
2444
|
+
});
|
|
2445
|
+
return;
|
|
2446
|
+
}
|
|
2447
|
+
setShowPublishConfirmModal(true);
|
|
2448
|
+
};
|
|
2449
|
+
const executeBatchPublish = async (executionMode, forceImmediate = false) => {
|
|
2450
|
+
const targets = [];
|
|
2451
|
+
Object.keys(selectedEntries).forEach((key) => {
|
|
2452
|
+
if (selectedEntries[key]) {
|
|
2453
|
+
const parts = key.split(KEY_SEP);
|
|
2454
|
+
if (parts.length === 2) {
|
|
2455
|
+
targets.push({ uid: parts[0], documentId: parts[1] });
|
|
2456
|
+
}
|
|
2457
|
+
}
|
|
2458
|
+
});
|
|
2459
|
+
try {
|
|
2460
|
+
setPublishing(true);
|
|
2461
|
+
setShowPublishConfirmModal(false);
|
|
2462
|
+
setShowProcessingDashboard(true);
|
|
2463
|
+
setIsSubmittingBatch(true);
|
|
2464
|
+
setLastResults(null);
|
|
2465
|
+
const tempBatchId = `batch_pub_${Date.now()}`;
|
|
2466
|
+
setDashboardBatchId(tempBatchId);
|
|
2467
|
+
setDashboardJob({
|
|
2468
|
+
id: tempBatchId,
|
|
2469
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2470
|
+
status: "processing",
|
|
2471
|
+
executionMode,
|
|
2472
|
+
attribute: "(publish)",
|
|
2473
|
+
value: "published",
|
|
2474
|
+
totalTargets: targets.length,
|
|
2475
|
+
processedCount: 0,
|
|
2476
|
+
updatedCount: 0,
|
|
2477
|
+
skippedCount: 0,
|
|
2478
|
+
failedCount: 0,
|
|
2479
|
+
isLive: true,
|
|
2480
|
+
publishOnApproval: true,
|
|
2481
|
+
results: []
|
|
2482
|
+
});
|
|
2483
|
+
const payload = {
|
|
2484
|
+
selectedEntries: targets,
|
|
2485
|
+
executionMode,
|
|
2486
|
+
makerNotes: publishMakerNotesInput,
|
|
2487
|
+
forceImmediate
|
|
2488
|
+
};
|
|
2489
|
+
const res = await post("/bulk-updater/batch-publish", payload);
|
|
2490
|
+
setIsSubmittingBatch(false);
|
|
2491
|
+
if (res.data && res.data.success) {
|
|
2492
|
+
setSelectedEntries({});
|
|
2493
|
+
const finalBatchId = res.data.batchId;
|
|
2494
|
+
setDashboardBatchId(finalBatchId);
|
|
2495
|
+
if (res.data.pending) {
|
|
2496
|
+
setDashboardJob({
|
|
2497
|
+
id: finalBatchId,
|
|
2498
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2499
|
+
status: res.data.status || "pending_approval",
|
|
2500
|
+
executionMode,
|
|
2501
|
+
scheduledFor: res.data.scheduledFor,
|
|
2502
|
+
attribute: "(publish)",
|
|
2503
|
+
value: "published",
|
|
2504
|
+
totalTargets: targets.length,
|
|
2505
|
+
processedCount: 0,
|
|
2506
|
+
updatedCount: 0,
|
|
2507
|
+
skippedCount: 0,
|
|
2508
|
+
failedCount: 0,
|
|
2509
|
+
isLive: true,
|
|
2510
|
+
publishOnApproval: true,
|
|
2511
|
+
makerNotes: publishMakerNotesInput,
|
|
2512
|
+
policyMessage: res.data.message,
|
|
2513
|
+
results: []
|
|
2514
|
+
});
|
|
2515
|
+
toggleNotification({
|
|
2516
|
+
type: "success",
|
|
2517
|
+
message: res.data.message || "Publish batch submitted successfully."
|
|
2518
|
+
});
|
|
2519
|
+
await fetchPendingBatches();
|
|
2520
|
+
} else {
|
|
2521
|
+
setLastResults(res.data.results || []);
|
|
2522
|
+
setUpdateSummary({
|
|
2523
|
+
updatedCount: res.data.publishedCount || 0,
|
|
2524
|
+
skippedCount: res.data.skippedCount || 0,
|
|
2525
|
+
batchId: res.data.batchId
|
|
2526
|
+
});
|
|
2527
|
+
setDashboardJob({
|
|
2528
|
+
id: finalBatchId,
|
|
2529
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2530
|
+
completedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2531
|
+
status: res.data.status || "successful",
|
|
2532
|
+
executionMode: "immediate",
|
|
2533
|
+
attribute: "(publish)",
|
|
2534
|
+
value: "published",
|
|
2535
|
+
totalTargets: res.data.totalTargets || targets.length,
|
|
2536
|
+
processedCount: res.data.results?.length || targets.length,
|
|
2537
|
+
updatedCount: res.data.publishedCount || 0,
|
|
2538
|
+
skippedCount: res.data.skippedCount || 0,
|
|
2539
|
+
failedCount: res.data.failedCount || 0,
|
|
2540
|
+
isLive: true,
|
|
2541
|
+
publishOnApproval: true,
|
|
2542
|
+
results: res.data.results || []
|
|
2543
|
+
});
|
|
2544
|
+
toggleNotification({
|
|
2545
|
+
type: "success",
|
|
2546
|
+
message: `Bulk publish complete! Batch ID: ${res.data.batchId}. Published: ${res.data.publishedCount}, Skipped: ${res.data.skippedCount}`
|
|
2547
|
+
});
|
|
2548
|
+
await fetchModels();
|
|
2549
|
+
await fetchAuditHistory();
|
|
2550
|
+
}
|
|
2551
|
+
} else {
|
|
2552
|
+
setIsSubmittingBatch(false);
|
|
2553
|
+
setDashboardJob((prev) => ({
|
|
2554
|
+
...prev,
|
|
2555
|
+
status: "failed",
|
|
2556
|
+
error: res.data?.error || "Batch publish encountered an error"
|
|
2557
|
+
}));
|
|
2558
|
+
toggleNotification({
|
|
2559
|
+
type: "danger",
|
|
2560
|
+
message: res.data?.error || "Batch publish encountered an error"
|
|
2561
|
+
});
|
|
2562
|
+
}
|
|
2563
|
+
} catch (err) {
|
|
2564
|
+
setIsSubmittingBatch(false);
|
|
2565
|
+
const errMsg = err.response?.data?.error || err.message || "Batch publish failed";
|
|
2566
|
+
setDashboardJob((prev) => ({
|
|
2567
|
+
...prev,
|
|
2568
|
+
status: "failed",
|
|
2569
|
+
error: errMsg
|
|
2570
|
+
}));
|
|
2571
|
+
toggleNotification({
|
|
2572
|
+
type: "danger",
|
|
2573
|
+
message: errMsg
|
|
2574
|
+
});
|
|
2575
|
+
} finally {
|
|
2576
|
+
setPublishing(false);
|
|
2577
|
+
setPublishMakerNotesInput("");
|
|
2578
|
+
}
|
|
2579
|
+
};
|
|
2426
2580
|
const handleApproveBatch = async (batchId) => {
|
|
2427
2581
|
try {
|
|
2428
2582
|
setApprovingBatchId(batchId);
|
|
@@ -2907,9 +3061,47 @@ const BulkUpdater = () => {
|
|
|
2907
3061
|
")"
|
|
2908
3062
|
]
|
|
2909
3063
|
}
|
|
3064
|
+
),
|
|
3065
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3066
|
+
designSystem.Button,
|
|
3067
|
+
{
|
|
3068
|
+
startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Check, {}),
|
|
3069
|
+
variant: "success-light",
|
|
3070
|
+
size: "L",
|
|
3071
|
+
onClick: handleOpenPublishModal,
|
|
3072
|
+
loading: publishing,
|
|
3073
|
+
disabled: loading || totalSelectedCount === 0,
|
|
3074
|
+
title: "Directly publish selected draft records across collections",
|
|
3075
|
+
children: [
|
|
3076
|
+
"Publish Selected (",
|
|
3077
|
+
totalSelectedCount,
|
|
3078
|
+
")"
|
|
3079
|
+
]
|
|
3080
|
+
}
|
|
2910
3081
|
)
|
|
2911
3082
|
] })
|
|
2912
3083
|
] }),
|
|
3084
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { marginTop: 4, padding: 4, background: "neutral100", hasRadius: true, style: { border: "1px solid #eaeaef" }, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", alignItems: "center", wrap: "wrap", gap: 3, children: [
|
|
3085
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, alignItems: "center", children: [
|
|
3086
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3087
|
+
designSystem.Checkbox,
|
|
3088
|
+
{
|
|
3089
|
+
checked: publishOnApproval,
|
|
3090
|
+
onCheckedChange: (checked) => setPublishOnApproval(Boolean(checked)),
|
|
3091
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "bold", children: "Auto-Publish after Update" })
|
|
3092
|
+
}
|
|
3093
|
+
),
|
|
3094
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3095
|
+
designSystem.Badge,
|
|
3096
|
+
{
|
|
3097
|
+
backgroundColor: publishOnApproval ? "success100" : "warning100",
|
|
3098
|
+
textColor: publishOnApproval ? "success700" : "warning700",
|
|
3099
|
+
children: publishOnApproval ? "✓ LIVE PUBLISH" : "DRAFT ONLY"
|
|
3100
|
+
}
|
|
3101
|
+
)
|
|
3102
|
+
] }),
|
|
3103
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", children: publishOnApproval ? "When enabled, entries will be published live immediately upon batch execution for draft-enabled content types." : "When disabled, entries will be saved as draft versions without publishing to live visitors." })
|
|
3104
|
+
] }) }),
|
|
2913
3105
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { marginTop: 4, padding: 4, background: "neutral100", hasRadius: true, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", alignItems: "center", wrap: "wrap", gap: 3, children: [
|
|
2914
3106
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { gap: 2, alignItems: "center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2915
3107
|
designSystem.Checkbox,
|
|
@@ -4237,6 +4429,210 @@ const BulkUpdater = () => {
|
|
|
4237
4429
|
)
|
|
4238
4430
|
}
|
|
4239
4431
|
),
|
|
4432
|
+
showPublishConfirmModal && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4433
|
+
"div",
|
|
4434
|
+
{
|
|
4435
|
+
style: {
|
|
4436
|
+
position: "fixed",
|
|
4437
|
+
top: 0,
|
|
4438
|
+
left: 0,
|
|
4439
|
+
right: 0,
|
|
4440
|
+
bottom: 0,
|
|
4441
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
4442
|
+
display: "flex",
|
|
4443
|
+
alignItems: "center",
|
|
4444
|
+
justifyContent: "center",
|
|
4445
|
+
zIndex: 100
|
|
4446
|
+
},
|
|
4447
|
+
onClick: () => setShowPublishConfirmModal(false),
|
|
4448
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4449
|
+
designSystem.Box,
|
|
4450
|
+
{
|
|
4451
|
+
background: "neutral0",
|
|
4452
|
+
hasRadius: true,
|
|
4453
|
+
style: {
|
|
4454
|
+
width: "90%",
|
|
4455
|
+
maxWidth: 620,
|
|
4456
|
+
maxHeight: "90vh",
|
|
4457
|
+
display: "flex",
|
|
4458
|
+
flexDirection: "column",
|
|
4459
|
+
boxShadow: "0 10px 40px rgba(0, 0, 0, 0.25)",
|
|
4460
|
+
overflow: "hidden"
|
|
4461
|
+
},
|
|
4462
|
+
onClick: (e) => e.stopPropagation(),
|
|
4463
|
+
children: [
|
|
4464
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4465
|
+
designSystem.Box,
|
|
4466
|
+
{
|
|
4467
|
+
padding: 5,
|
|
4468
|
+
background: "neutral100",
|
|
4469
|
+
style: {
|
|
4470
|
+
borderBottom: "1px solid rgba(120, 120, 150, 0.2)",
|
|
4471
|
+
flexShrink: 0
|
|
4472
|
+
},
|
|
4473
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", alignItems: "center", children: [
|
|
4474
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { children: [
|
|
4475
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "beta", fontWeight: "bold", children: "Confirm Bulk Publish" }),
|
|
4476
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { marginTop: 1, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", children: "Publish selected draft records live to visitors across content types" }) })
|
|
4477
|
+
] }),
|
|
4478
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Badge, { backgroundColor: "success100", textColor: "success700", children: [
|
|
4479
|
+
totalSelectedCount,
|
|
4480
|
+
" Selected"
|
|
4481
|
+
] })
|
|
4482
|
+
] })
|
|
4483
|
+
}
|
|
4484
|
+
),
|
|
4485
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4486
|
+
designSystem.Box,
|
|
4487
|
+
{
|
|
4488
|
+
padding: 5,
|
|
4489
|
+
style: {
|
|
4490
|
+
overflowY: "auto",
|
|
4491
|
+
flexGrow: 1,
|
|
4492
|
+
display: "flex",
|
|
4493
|
+
flexDirection: "column",
|
|
4494
|
+
gap: 16
|
|
4495
|
+
},
|
|
4496
|
+
children: [
|
|
4497
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { padding: 4, background: "neutral100", hasRadius: true, style: { border: "1px solid #eaeaef" }, children: [
|
|
4498
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", fontWeight: "bold", children: "Collection Breakdown:" }),
|
|
4499
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { marginTop: 2, children: collections.filter(
|
|
4500
|
+
(col) => col.entries.some((entry) => selectedEntries[`${col.uid}${KEY_SEP}${entry.documentId}`])
|
|
4501
|
+
).map((col) => {
|
|
4502
|
+
const count = col.entries.filter(
|
|
4503
|
+
(entry) => selectedEntries[`${col.uid}${KEY_SEP}${entry.documentId}`]
|
|
4504
|
+
).length;
|
|
4505
|
+
const hasDraftAndPublish = col.draftAndPublish !== false;
|
|
4506
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4507
|
+
designSystem.Flex,
|
|
4508
|
+
{
|
|
4509
|
+
justifyContent: "space-between",
|
|
4510
|
+
alignItems: "center",
|
|
4511
|
+
paddingTop: 2,
|
|
4512
|
+
paddingBottom: 2,
|
|
4513
|
+
style: { borderBottom: "1px dashed #eaeaef" },
|
|
4514
|
+
children: [
|
|
4515
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Typography, { variant: "pi", children: [
|
|
4516
|
+
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: col.displayName }),
|
|
4517
|
+
" (",
|
|
4518
|
+
col.uid,
|
|
4519
|
+
")"
|
|
4520
|
+
] }),
|
|
4521
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, alignItems: "center", children: [
|
|
4522
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Badge, { backgroundColor: "neutral150", textColor: "neutral700", children: [
|
|
4523
|
+
count,
|
|
4524
|
+
" ",
|
|
4525
|
+
count === 1 ? "entry" : "entries"
|
|
4526
|
+
] }),
|
|
4527
|
+
hasDraftAndPublish ? /* @__PURE__ */ jsxRuntime.jsx(designSystem.Badge, { backgroundColor: "success100", textColor: "success700", children: "✓ Draft & Publish Enabled" }) : /* @__PURE__ */ jsxRuntime.jsx(designSystem.Badge, { backgroundColor: "warning100", textColor: "warning700", children: "⚠️ Skipped (Drafts Disabled)" })
|
|
4528
|
+
] })
|
|
4529
|
+
]
|
|
4530
|
+
},
|
|
4531
|
+
col.uid
|
|
4532
|
+
);
|
|
4533
|
+
}) })
|
|
4534
|
+
] }),
|
|
4535
|
+
executionWindow?.isBusinessHours && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4536
|
+
designSystem.Box,
|
|
4537
|
+
{
|
|
4538
|
+
padding: 4,
|
|
4539
|
+
background: "warning100",
|
|
4540
|
+
hasRadius: true,
|
|
4541
|
+
style: { border: "1px solid #f5c0b8" },
|
|
4542
|
+
children: [
|
|
4543
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", fontWeight: "bold", textColor: "warning700", children: "⚠️ Business Hours Active:" }),
|
|
4544
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Typography, { variant: "pi", textColor: "warning700", style: { display: "block", marginTop: 4 }, children: [
|
|
4545
|
+
"It is currently business peak hours (",
|
|
4546
|
+
executionWindow.currentTime,
|
|
4547
|
+
"). To prevent API latency spikes, publish requests should be queued for off-peak hours (",
|
|
4548
|
+
executionWindow.offPeakStartTime,
|
|
4549
|
+
") or submitted for governance review."
|
|
4550
|
+
] })
|
|
4551
|
+
]
|
|
4552
|
+
}
|
|
4553
|
+
),
|
|
4554
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { children: [
|
|
4555
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", fontWeight: "bold", children: "Governance Notes / Reason (Optional):" }),
|
|
4556
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { marginTop: 1, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4557
|
+
designSystem.TextInput,
|
|
4558
|
+
{
|
|
4559
|
+
name: "publishMakerNotes",
|
|
4560
|
+
placeholder: "e.g. Publishing Q3 catalog release updates",
|
|
4561
|
+
value: publishMakerNotesInput,
|
|
4562
|
+
onChange: (e) => setPublishMakerNotesInput(e.target.value)
|
|
4563
|
+
}
|
|
4564
|
+
) })
|
|
4565
|
+
] })
|
|
4566
|
+
]
|
|
4567
|
+
}
|
|
4568
|
+
),
|
|
4569
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4570
|
+
designSystem.Box,
|
|
4571
|
+
{
|
|
4572
|
+
padding: 4,
|
|
4573
|
+
background: "neutral100",
|
|
4574
|
+
style: {
|
|
4575
|
+
borderTop: "1px solid rgba(120, 120, 150, 0.2)",
|
|
4576
|
+
flexShrink: 0,
|
|
4577
|
+
boxShadow: "0 -4px 16px rgba(0, 0, 0, 0.08)"
|
|
4578
|
+
},
|
|
4579
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", alignItems: "center", gap: 3, style: { width: "100%" }, children: [
|
|
4580
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "tertiary", size: "M", onClick: () => setShowPublishConfirmModal(false), children: "Cancel" }),
|
|
4581
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, wrap: "wrap", justifyContent: "flex-end", alignItems: "center", children: [
|
|
4582
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4583
|
+
designSystem.Button,
|
|
4584
|
+
{
|
|
4585
|
+
variant: executionWindow?.isBusinessHours ? "default" : "secondary",
|
|
4586
|
+
size: "M",
|
|
4587
|
+
onClick: () => executeBatchPublish("maker_checker"),
|
|
4588
|
+
loading: publishing,
|
|
4589
|
+
children: "Submit for Checker Approval"
|
|
4590
|
+
}
|
|
4591
|
+
),
|
|
4592
|
+
executionWindow?.isBusinessHours ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4593
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4594
|
+
designSystem.Button,
|
|
4595
|
+
{
|
|
4596
|
+
variant: "secondary",
|
|
4597
|
+
size: "M",
|
|
4598
|
+
onClick: () => executeBatchPublish("queue_offpeak"),
|
|
4599
|
+
loading: publishing,
|
|
4600
|
+
children: [
|
|
4601
|
+
"Queue for Off-Peak (",
|
|
4602
|
+
executionWindow?.offPeakStartTime || "18:00",
|
|
4603
|
+
")"
|
|
4604
|
+
]
|
|
4605
|
+
}
|
|
4606
|
+
),
|
|
4607
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4608
|
+
designSystem.Button,
|
|
4609
|
+
{
|
|
4610
|
+
variant: "danger-light",
|
|
4611
|
+
size: "S",
|
|
4612
|
+
onClick: () => executeBatchPublish("immediate", true),
|
|
4613
|
+
loading: publishing,
|
|
4614
|
+
children: "Force Publish Now"
|
|
4615
|
+
}
|
|
4616
|
+
)
|
|
4617
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
4618
|
+
designSystem.Button,
|
|
4619
|
+
{
|
|
4620
|
+
variant: "default",
|
|
4621
|
+
size: "M",
|
|
4622
|
+
onClick: () => executeBatchPublish("immediate"),
|
|
4623
|
+
loading: publishing,
|
|
4624
|
+
children: "Confirm & Publish Now"
|
|
4625
|
+
}
|
|
4626
|
+
)
|
|
4627
|
+
] })
|
|
4628
|
+
] })
|
|
4629
|
+
}
|
|
4630
|
+
)
|
|
4631
|
+
]
|
|
4632
|
+
}
|
|
4633
|
+
)
|
|
4634
|
+
}
|
|
4635
|
+
),
|
|
4240
4636
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4241
4637
|
BulkUpdatePreviewModal,
|
|
4242
4638
|
{
|
|
@@ -4249,6 +4645,7 @@ const BulkUpdater = () => {
|
|
|
4249
4645
|
loading: previewLoading,
|
|
4250
4646
|
previewData,
|
|
4251
4647
|
attribute: selectedAttribute,
|
|
4648
|
+
publishOnApproval,
|
|
4252
4649
|
targetValueDisplay: relationsMeta[selectedAttribute] ? selectedRelationDocId === "__clear__" ? "Clear / Unlink Relation" : relationOptions.find((o) => o.documentId === selectedRelationDocId)?.label || selectedRelationDocId || "(none)" : useRegex ? `Replace /${regexPattern}/g with "${attributeValue}"` : attributeValue
|
|
4253
4650
|
}
|
|
4254
4651
|
),
|
|
@@ -4270,4 +4667,4 @@ exports.default = BulkUpdater;
|
|
|
4270
4667
|
exports.formatDisplayValue = formatDisplayValue;
|
|
4271
4668
|
exports.getAvailableColumnsForCollection = getAvailableColumnsForCollection;
|
|
4272
4669
|
exports.getNestedValue = getNestedValue;
|
|
4273
|
-
//# sourceMappingURL=BulkUpdater-
|
|
4670
|
+
//# sourceMappingURL=BulkUpdater-CQ9zGdat.js.map
|