@simmalugnt-se/payload-content-health 0.6.0 → 0.6.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/CHANGELOG.md +6 -0
- package/dist/admin/ContentHealthFieldBridge.js +1 -1
- package/dist/copy.d.ts +2 -0
- package/dist/copy.js +2 -0
- package/dist/view/WorkList.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.1
|
|
4
|
+
|
|
5
|
+
- Work-list filters and field links update Next’s router state, so refresh preserves the current
|
|
6
|
+
filters and does not restore consumed field parameters.
|
|
7
|
+
- Checks that need individual review (including share images) explain why there is no batch action.
|
|
8
|
+
|
|
3
9
|
## 0.6.0
|
|
4
10
|
|
|
5
11
|
- The dashboard widget is a summary: a ring for the share in order, and one row per category (SEO,
|
|
@@ -91,7 +91,7 @@ function takeFieldParam() {
|
|
|
91
91
|
return null;
|
|
92
92
|
}
|
|
93
93
|
url.searchParams.delete(FIELD_PARAM);
|
|
94
|
-
window.history.replaceState(
|
|
94
|
+
window.history.replaceState(null, "", url);
|
|
95
95
|
return path || null;
|
|
96
96
|
}
|
|
97
97
|
function expandRows(steps, fields, dispatchFields) {
|
package/dist/copy.d.ts
CHANGED
|
@@ -68,6 +68,7 @@ export declare const LIST_COPY: {
|
|
|
68
68
|
readonly draft: "Draft";
|
|
69
69
|
readonly fix: "Fix with the assistant";
|
|
70
70
|
readonly fixMany: (count: number, total: number) => string;
|
|
71
|
+
readonly individualFix: "Review and fix these one document at a time with the assistant.";
|
|
71
72
|
readonly none: "No issues found.";
|
|
72
73
|
readonly noneFiltered: "No issues match these filters.";
|
|
73
74
|
};
|
|
@@ -85,6 +86,7 @@ export declare const LIST_COPY: {
|
|
|
85
86
|
readonly draft: "Utkast";
|
|
86
87
|
readonly fix: "Åtgärda med assistenten";
|
|
87
88
|
readonly fixMany: (count: number, total: number) => string;
|
|
89
|
+
readonly individualFix: "Granska och åtgärda dessa ett dokument i taget med assistenten.";
|
|
88
90
|
readonly none: "Inga problem hittades.";
|
|
89
91
|
readonly noneFiltered: "Inga problem matchar filtren.";
|
|
90
92
|
};
|
package/dist/copy.js
CHANGED
|
@@ -224,6 +224,7 @@ export const LIST_COPY = {
|
|
|
224
224
|
fixMany: (count, total) => count < total
|
|
225
225
|
? `Fix ${count} of ${total} with the assistant`
|
|
226
226
|
: `Fix ${count} with the assistant`,
|
|
227
|
+
individualFix: "Review and fix these one document at a time with the assistant.",
|
|
227
228
|
none: "No issues found.",
|
|
228
229
|
noneFiltered: "No issues match these filters.",
|
|
229
230
|
},
|
|
@@ -243,6 +244,7 @@ export const LIST_COPY = {
|
|
|
243
244
|
fixMany: (count, total) => count < total
|
|
244
245
|
? `Åtgärda ${count} av ${total} med assistenten`
|
|
245
246
|
: `Åtgärda ${count} med assistenten`,
|
|
247
|
+
individualFix: "Granska och åtgärda dessa ett dokument i taget med assistenten.",
|
|
246
248
|
none: "Inga problem hittades.",
|
|
247
249
|
noneFiltered: "Inga problem matchar filtren.",
|
|
248
250
|
},
|
package/dist/view/WorkList.js
CHANGED
|
@@ -35,7 +35,7 @@ export function WorkList({ adminRoute, batchAsk, categories, collections, initia
|
|
|
35
35
|
const update = (next) => {
|
|
36
36
|
setFilters(next);
|
|
37
37
|
const query = filterQuery(next);
|
|
38
|
-
window.history.replaceState(
|
|
38
|
+
window.history.replaceState(null, "", `${window.location.pathname}${query ? `?${query}` : ""}`);
|
|
39
39
|
};
|
|
40
40
|
const moveTab = (event, index) => {
|
|
41
41
|
const step = event.key === "ArrowRight" ? 1 : event.key === "ArrowLeft" ? -1 : 0;
|
|
@@ -59,7 +59,7 @@ function Section({ adminRoute, ask, copy, filters, rows, }) {
|
|
|
59
59
|
const batchHref = ask && targets.length > 1
|
|
60
60
|
? batchURL(adminRoute, { ...filters, check }, targets, ask)
|
|
61
61
|
: undefined;
|
|
62
|
-
return (_jsxs("section", { className: "content-health-list__section", children: [_jsxs("header", { className: "content-health-list__section-head", children: [_jsx("h2", { children: rows[0]?.checkLabel }), _jsx("span", { className: "content-health-list__pill", children: copy.documents(documents) }), batchHref ? (_jsx(Button, { buttonStyle: "secondary", className: "content-health-list__batch", el: "link", margin: false, size: "small", url: batchHref, children: copy.fixMany(Math.min(targets.length, MAX_BATCH_TARGETS), targets.length) })) : null] }), _jsx("ul", { className: "content-health-list__items", children: rows.map((row) => (_jsxs("li", { className: "content-health-list__item", children: [_jsx(Link, { href: row.href, prefetch: false, children: row.title }), row.locale ? _jsx("span", { className: "content-health-list__pill", children: row.locale }) : null, row.draft ? (_jsx("span", { className: "content-health-list__pill content-health-list__pill--draft", children: copy.draft })) : null, row.detail ? _jsx("span", { className: "content-health-list__detail", children: row.detail }) : null, row.askHref ? (_jsx(Link, { className: "content-health-list__fix", href: row.askHref, prefetch: false, children: copy.fix })) : null] }, row.key))) })] }));
|
|
62
|
+
return (_jsxs("section", { className: "content-health-list__section", children: [_jsxs("header", { className: "content-health-list__section-head", children: [_jsx("h2", { children: rows[0]?.checkLabel }), _jsx("span", { className: "content-health-list__pill", children: copy.documents(documents) }), batchHref ? (_jsx(Button, { buttonStyle: "secondary", className: "content-health-list__batch", el: "link", margin: false, size: "small", url: batchHref, children: copy.fixMany(Math.min(targets.length, MAX_BATCH_TARGETS), targets.length) })) : null] }), !BATCH_CHECKS[check] && rows.some((row) => row.askHref) ? (_jsx("p", { className: "content-health-list__detail", children: copy.individualFix })) : null, _jsx("ul", { className: "content-health-list__items", children: rows.map((row) => (_jsxs("li", { className: "content-health-list__item", children: [_jsx(Link, { href: row.href, prefetch: false, children: row.title }), row.locale ? _jsx("span", { className: "content-health-list__pill", children: row.locale }) : null, row.draft ? (_jsx("span", { className: "content-health-list__pill content-health-list__pill--draft", children: copy.draft })) : null, row.detail ? _jsx("span", { className: "content-health-list__detail", children: row.detail }) : null, row.askHref ? (_jsx(Link, { className: "content-health-list__fix", href: row.askHref, prefetch: false, children: copy.fix })) : null] }, row.key))) })] }));
|
|
63
63
|
}
|
|
64
64
|
function Filter({ all, label, onChange, options, value, }) {
|
|
65
65
|
const inputId = useId();
|
package/package.json
CHANGED