@aduptive/strapi-blockscene 1.0.0-alpha.10 → 1.0.0-alpha.11
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/README.md +111 -18
- package/dist/admin.cjs +1073 -298
- package/dist/admin.mjs +1073 -298
- package/dist/server.cjs +165 -17
- package/package.json +1 -1
package/dist/admin.cjs
CHANGED
|
@@ -130,13 +130,22 @@ var require_groups = __commonJS({
|
|
|
130
130
|
const [a, b] = direction === "up" ? [ranges[to], ranges[at]] : [ranges[at], ranges[to]];
|
|
131
131
|
return [...rows.slice(0, a[0]), ...rows.slice(b[0], b[1] + 1), ...rows.slice(a[0], a[1] + 1), ...rows.slice(b[1] + 1)];
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function removeGroup3(rows, key, g) {
|
|
134
134
|
if (!g) return null;
|
|
135
135
|
const start = rows.findIndex((row) => blockKey3(row) === String(key));
|
|
136
136
|
if (start < 0 || !isOpener2(rows[start], g)) return null;
|
|
137
137
|
const [, end] = groupRange3(rows, start, g);
|
|
138
|
+
if (end <= start || uidOf(rows[end]) !== g[uidOf(rows[start])]) return null;
|
|
138
139
|
return [...rows.slice(0, start), ...rows.slice(end + 1)];
|
|
139
140
|
}
|
|
141
|
+
function unwrapGroup3(rows, key, g) {
|
|
142
|
+
if (!g) return null;
|
|
143
|
+
const start = rows.findIndex((row) => blockKey3(row) === String(key));
|
|
144
|
+
if (start < 0 || !isOpener2(rows[start], g)) return null;
|
|
145
|
+
const [, end] = groupRange3(rows, start, g);
|
|
146
|
+
if (end <= start || uidOf(rows[end]) !== g[uidOf(rows[start])]) return null;
|
|
147
|
+
return [...rows.slice(0, start), ...rows.slice(start + 1, end), ...rows.slice(end + 1)];
|
|
148
|
+
}
|
|
140
149
|
var MAX_COLUMNS = 12;
|
|
141
150
|
var parseColumns = (value) => {
|
|
142
151
|
const n = typeof value === "number" ? value : typeof value === "string" && /^\s*\d{1,3}\s*$/.test(value) ? Number(value) : NaN;
|
|
@@ -163,7 +172,8 @@ var require_groups = __commonJS({
|
|
|
163
172
|
groupRows: groupRows2,
|
|
164
173
|
topLevelRanges: topLevelRanges2,
|
|
165
174
|
moveGroup: moveGroup2,
|
|
166
|
-
removeGroup:
|
|
175
|
+
removeGroup: removeGroup3,
|
|
176
|
+
unwrapGroup: unwrapGroup3,
|
|
167
177
|
blockKey: blockKey3,
|
|
168
178
|
isOpener: isOpener2,
|
|
169
179
|
isClose: isClose2,
|
|
@@ -182,8 +192,8 @@ __export(strapi4_exports, {
|
|
|
182
192
|
default: () => strapi4_default
|
|
183
193
|
});
|
|
184
194
|
module.exports = __toCommonJS(strapi4_exports);
|
|
185
|
-
var
|
|
186
|
-
var
|
|
195
|
+
var React13 = __toESM(require("react"));
|
|
196
|
+
var import_design_system8 = require("@strapi/design-system");
|
|
187
197
|
var import_helper_plugin = require("@strapi/helper-plugin");
|
|
188
198
|
var import_react_intl2 = require("react-intl");
|
|
189
199
|
|
|
@@ -235,6 +245,26 @@ function variantRow(schema, components, values, keys = fractional) {
|
|
|
235
245
|
}
|
|
236
246
|
return row;
|
|
237
247
|
}
|
|
248
|
+
function starterKitRows(kit, zones, components, form) {
|
|
249
|
+
const out = {};
|
|
250
|
+
for (const [name, items2] of Object.entries(kit?.zones || {})) {
|
|
251
|
+
const zone = zones.find((entry) => entry.name === name);
|
|
252
|
+
const current = form.rows(name);
|
|
253
|
+
if (!zone || current.length || current.length + items2.length > (zone.max ?? Infinity) || items2.some((item) => !zone.components.includes(item.__component) || !components[item.__component])) return null;
|
|
254
|
+
const keys = form.keys(current, current.length, items2.length);
|
|
255
|
+
out[name] = items2.map((item, index) => ({ ...variantRow(components[item.__component], components, item.values), __component: item.__component, __temp_key__: keys[index] }));
|
|
256
|
+
}
|
|
257
|
+
return out;
|
|
258
|
+
}
|
|
259
|
+
function starterKitsForLocale(kits, locale) {
|
|
260
|
+
if (!Array.isArray(kits)) return [];
|
|
261
|
+
const current = String(locale || "").toLowerCase();
|
|
262
|
+
const language = current.split("-")[0];
|
|
263
|
+
return kits.filter((kit) => !Array.isArray(kit.locales) || kit.locales.some((entry) => {
|
|
264
|
+
const wanted = String(entry).toLowerCase();
|
|
265
|
+
return wanted === current || !wanted.includes("-") && wanted === language;
|
|
266
|
+
}));
|
|
267
|
+
}
|
|
238
268
|
function editableZones(schema, values, canEdit, disabled = false) {
|
|
239
269
|
if (disabled) return [];
|
|
240
270
|
return Object.entries(schema?.attributes || {}).filter(
|
|
@@ -299,6 +329,12 @@ var pickable = (zone, config) => {
|
|
|
299
329
|
const closers = Object.values(config.groups || {});
|
|
300
330
|
return zone.components.filter((uid) => !closers.includes(uid));
|
|
301
331
|
};
|
|
332
|
+
function showRowThumbnail(uid, config = {}) {
|
|
333
|
+
const configured = config.components?.[uid]?.showRowThumbnail;
|
|
334
|
+
if (typeof configured === "boolean") return configured;
|
|
335
|
+
const groups = config.groups || {};
|
|
336
|
+
return !Object.prototype.hasOwnProperty.call(groups, uid) && !Object.values(groups).includes(uid);
|
|
337
|
+
}
|
|
302
338
|
function entryOf(uid, schema, config) {
|
|
303
339
|
const meta = config.components?.[uid] || {};
|
|
304
340
|
return {
|
|
@@ -435,13 +471,74 @@ var TEXT_TYPES = ["string", "text"];
|
|
|
435
471
|
var RICH_TYPES = ["richtext", "blocks", "customField"];
|
|
436
472
|
var EDITABLE_TYPES = [...TEXT_TYPES, ...RICH_TYPES];
|
|
437
473
|
var SCALAR = ["string", "text", "richtext", "email", "enumeration", "integer", "biginteger", "float", "decimal", "boolean", "date", "datetime", "time", "json", "blocks", "uid", "customField"];
|
|
474
|
+
var ENTRY_SYSTEM = ["id", "documentId", "locale", "createdAt", "updatedAt", "publishedAt"];
|
|
475
|
+
var privateAttribute = (attr) => attr?.private === true || attr?.pluginOptions?.blockscene?.private === true;
|
|
476
|
+
var fieldReadable = (path, allowed, all = false) => {
|
|
477
|
+
if (all) return true;
|
|
478
|
+
const fields = Array.isArray(allowed) ? allowed : [];
|
|
479
|
+
const parts = String(path).split(".");
|
|
480
|
+
return parts.some((_, index) => fields.includes(parts.slice(0, index + 1).join("."))) || fields.some((field) => field.startsWith(`${path}.`));
|
|
481
|
+
};
|
|
438
482
|
var blockKey = (row) => row && row.id != null ? `${row.__component}#${row.id}` : row && row.__temp_key__ != null ? String(row.__temp_key__) : null;
|
|
483
|
+
function plainValue(value, depth = 0) {
|
|
484
|
+
if (value == null || typeof value === "number" || typeof value === "boolean") return value;
|
|
485
|
+
if (typeof value === "string") return value.slice(0, 2e5);
|
|
486
|
+
if (typeof value !== "object" || depth > 8) return void 0;
|
|
487
|
+
if (Array.isArray(value)) return value.slice(0, 500).map((item) => plainValue(item, depth + 1)).filter((item) => item !== void 0);
|
|
488
|
+
const out = {};
|
|
489
|
+
for (const [name, child] of Object.entries(value).slice(0, 500)) {
|
|
490
|
+
const projected = plainValue(child, depth + 1);
|
|
491
|
+
if (projected !== void 0) out[name] = projected;
|
|
492
|
+
}
|
|
493
|
+
return out;
|
|
494
|
+
}
|
|
495
|
+
function projectEntryValue(value, attr, components, cmsOrigin, depth = 0, readable = () => true, path = "") {
|
|
496
|
+
if (privateAttribute(attr) || attr?.type === "password" || depth > 8) return void 0;
|
|
497
|
+
if (attr?.type === "media") {
|
|
498
|
+
const files = (attr.multiple ? Array.isArray(value) ? value : [] : value ? [value] : []).map((file) => projectMedia(file, cmsOrigin)).filter(Boolean);
|
|
499
|
+
return attr.multiple ? files : files[0] || null;
|
|
500
|
+
}
|
|
501
|
+
if (attr?.type === "component") {
|
|
502
|
+
const schema = components?.[attr.component];
|
|
503
|
+
const one = (item) => {
|
|
504
|
+
if (!item || !schema) return null;
|
|
505
|
+
const projected = projectEntryObject(item, schema, components, cmsOrigin, depth + 1, readable, path);
|
|
506
|
+
return item.id != null ? { id: item.id, ...projected } : projected;
|
|
507
|
+
};
|
|
508
|
+
return attr.repeatable ? (Array.isArray(value) ? value : []).slice(0, 500).map(one).filter(Boolean) : one(value);
|
|
509
|
+
}
|
|
510
|
+
if (attr?.type === "dynamiczone") {
|
|
511
|
+
return (Array.isArray(value) ? value : []).slice(0, 500).flatMap((item) => {
|
|
512
|
+
const uid = item?.__component;
|
|
513
|
+
const schema = components?.[uid];
|
|
514
|
+
if (!uid || !schema) return [];
|
|
515
|
+
const projected = projectEntryObject(item, schema, components, cmsOrigin, depth + 1, readable, path);
|
|
516
|
+
return [{ ...item.id != null && { id: item.id }, __component: uid, ...projected }];
|
|
517
|
+
});
|
|
518
|
+
}
|
|
519
|
+
return plainValue(value, depth);
|
|
520
|
+
}
|
|
521
|
+
function projectEntryObject(values, schema, components, cmsOrigin, depth = 0, readable = () => true, prefix2 = "") {
|
|
522
|
+
const out = {};
|
|
523
|
+
for (const [name, attr] of Object.entries(schema?.attributes || {})) {
|
|
524
|
+
const path = prefix2 ? `${prefix2}.${name}` : name;
|
|
525
|
+
if (!readable(path) || privateAttribute(attr) || attr.type === "password" || values?.[name] === void 0) continue;
|
|
526
|
+
const projected = projectEntryValue(values[name], attr, components, cmsOrigin, depth, readable, path);
|
|
527
|
+
if (projected !== void 0) out[name] = projected;
|
|
528
|
+
}
|
|
529
|
+
return out;
|
|
530
|
+
}
|
|
531
|
+
function projectEntry(values, schema, components, cmsOrigin, readable = () => true) {
|
|
532
|
+
const out = projectEntryObject(values, schema, components, cmsOrigin, 0, readable);
|
|
533
|
+
for (const name of ENTRY_SYSTEM) if (values?.[name] !== void 0) out[name] = plainValue(values[name]);
|
|
534
|
+
return out;
|
|
535
|
+
}
|
|
439
536
|
function projectRow(row, schema, components, cmsOrigin, depth = 0) {
|
|
440
537
|
if (!row || !schema || depth > 3) return null;
|
|
441
538
|
const out = {};
|
|
442
539
|
for (const [name, attr] of Object.entries(schema.attributes || {})) {
|
|
443
540
|
const value = row[name];
|
|
444
|
-
if (attr.type === "password" || attr.type === "relation" || attr
|
|
541
|
+
if (attr.type === "password" || attr.type === "relation" || privateAttribute(attr)) continue;
|
|
445
542
|
if (SCALAR.includes(attr.type)) {
|
|
446
543
|
if (value !== void 0) out[name] = typeof value === "string" ? value.slice(0, 2e5) : value;
|
|
447
544
|
} else if (attr.type === "media") {
|
|
@@ -470,7 +567,7 @@ function resolveField(uid, field, components) {
|
|
|
470
567
|
const parts = field.split(".");
|
|
471
568
|
for (let i = 0; i < parts.length; i++) {
|
|
472
569
|
const attr = schema?.attributes?.[parts[i]];
|
|
473
|
-
if (!attr || attr
|
|
570
|
+
if (!attr || privateAttribute(attr)) return null;
|
|
474
571
|
if (i === parts.length - 1) return attr;
|
|
475
572
|
if (attr.type !== "component") return null;
|
|
476
573
|
if (attr.repeatable) {
|
|
@@ -486,7 +583,7 @@ function editableFields(uid, row, components) {
|
|
|
486
583
|
const out = [];
|
|
487
584
|
const SYSTEM = ["id", "documentId", "locale", "createdAt", "updatedAt", "publishedAt", "createdBy", "updatedBy", "localizations", "__component", "__temp_key__"];
|
|
488
585
|
const push = (name, attr, label) => {
|
|
489
|
-
if (!SYSTEM.includes(name.split(".").pop()) && attr
|
|
586
|
+
if (!SYSTEM.includes(name.split(".").pop()) && !privateAttribute(attr) && EDITABLE_TYPES.includes(attr?.type)) out.push({ name, type: attr.type, label });
|
|
490
587
|
};
|
|
491
588
|
for (const [name, attr] of Object.entries(schema?.attributes || {})) {
|
|
492
589
|
if (attr.type === "component" && attr.repeatable) {
|
|
@@ -500,7 +597,7 @@ function editableFields(uid, row, components) {
|
|
|
500
597
|
function mediaFields(uid, row, components) {
|
|
501
598
|
const media = {};
|
|
502
599
|
for (const [name, attr] of Object.entries(components?.[uid]?.attributes || {})) {
|
|
503
|
-
if (attr.type === "media" && attr
|
|
600
|
+
if (attr.type === "media" && !privateAttribute(attr)) media[name] = { required: attr.required === true, multiple: attr.multiple === true, present: attr.multiple ? Array.isArray(row?.[name]) && row[name].length > 0 : Boolean(row?.[name]) };
|
|
504
601
|
}
|
|
505
602
|
return media;
|
|
506
603
|
}
|
|
@@ -540,6 +637,7 @@ var hoverKey = (key, rows) => key === null ? null : typeof key === "string" && k
|
|
|
540
637
|
function isPreviewMessage(event, origin, source, channel, type) {
|
|
541
638
|
return event.origin === origin && event.source === source && event.data?.protocol === PROTOCOL && event.data?.channel === channel && event.data?.type === type;
|
|
542
639
|
}
|
|
640
|
+
var previewMessageAllowed = (event, origin, source, channel, readOnly) => isPreviewMessage(event, origin, source, channel, event.data?.type) && (!readOnly || event.data?.type === "ready");
|
|
543
641
|
function insertIndex(rows, after) {
|
|
544
642
|
if (after === null || after === void 0) return 0;
|
|
545
643
|
const index = (Array.isArray(rows) ? rows : []).findIndex((row) => blockKey(row) === String(after));
|
|
@@ -742,7 +840,7 @@ var import_react_intl = require("react-intl");
|
|
|
742
840
|
// admin/translations/en.json
|
|
743
841
|
var en_default = {
|
|
744
842
|
title: "Blockscene",
|
|
745
|
-
settings: "
|
|
843
|
+
settings: "General",
|
|
746
844
|
gallery: "Block gallery",
|
|
747
845
|
search: "Search blocks",
|
|
748
846
|
clear: "Clear search",
|
|
@@ -758,6 +856,17 @@ var en_default = {
|
|
|
758
856
|
moreActions: "More actions",
|
|
759
857
|
settingsTitle: "Blockscene",
|
|
760
858
|
settingsIntro: "Gallery thumbnails, wireframe palette and editor preferences. Changes apply the next time the gallery opens; no rebuild is needed.",
|
|
859
|
+
settingsGeneral: "General",
|
|
860
|
+
settingsGeneralIntro: "Choose how Blockscene behaves in the editor and which row actions are available.",
|
|
861
|
+
settingsPreview: "Page preview",
|
|
862
|
+
settingsPreviewIntro: "Connect the frontend preview and configure its modes, toolbar and responsive widths.",
|
|
863
|
+
settingsContentTypes: "Content types",
|
|
864
|
+
settingsContentTypesIntro: "Choose where Blockscene is enabled and tailor the visual editor for each content type.",
|
|
865
|
+
settingsGallery: "Block gallery",
|
|
866
|
+
settingsGalleryIntro: "Configure gallery thumbnails, wireframe colors, block types and filters.",
|
|
867
|
+
settingsHistory: "History & trash",
|
|
868
|
+
settingsHistoryIntro: "Control version snapshots, activity retention and recoverable deletions.",
|
|
869
|
+
historyUnavailable: "History and trash settings require Strapi 5.",
|
|
761
870
|
palette: "Wireframe palette",
|
|
762
871
|
background: "Background",
|
|
763
872
|
surface: "Surfaces",
|
|
@@ -787,6 +896,7 @@ var en_default = {
|
|
|
787
896
|
showCloseAll: 'Show "Collapse all"',
|
|
788
897
|
toggleHelp: "The zone bar shows one button: with both on it expands while any block is collapsed and collapses them all otherwise; with only one on, it offers that action alone.",
|
|
789
898
|
showRowThumbnails: "Show block thumbnails in the rows",
|
|
899
|
+
componentRowThumbnail: "Show thumbnail in the editor row",
|
|
790
900
|
initialState: "Initial accordion state",
|
|
791
901
|
"states.closed": "All closed",
|
|
792
902
|
"states.open": "All open",
|
|
@@ -794,10 +904,10 @@ var en_default = {
|
|
|
794
904
|
rememberHelp: "Only the explicit open all / close all buttons update the memory, per user and browser. Opening one block does not.",
|
|
795
905
|
previewUrl: "Preview route base URL",
|
|
796
906
|
previewUrlHelp: "Full URL of your frontend page-preview route, e.g. https://site.test/block-preview/page. Leave empty to reuse the origin of Strapi's native Preview (when configured for the content type) with /block-preview/page. The route must implement the bridge (see README).",
|
|
797
|
-
previewUrlEmpty: "No preview URL is set: editors get the Fields +
|
|
907
|
+
previewUrlEmpty: "No preview URL is set: editors get the Fields + preview and Visual editor modes only on content types where Strapi's native Preview is configured. Elsewhere the mode menu is not shown.",
|
|
798
908
|
previewMode: "Initial preview mode",
|
|
799
|
-
"modes.form": "Fields",
|
|
800
|
-
"modes.split": "Fields +
|
|
909
|
+
"modes.form": "Fields only",
|
|
910
|
+
"modes.split": "Fields + preview",
|
|
801
911
|
"modes.preview": "Visual editor",
|
|
802
912
|
previewModeHelp: "Every edit view opens in this mode, unless its content type sets its own below. Editors can switch while they edit; the switch is not remembered.",
|
|
803
913
|
lazyEdit: "Click to edit",
|
|
@@ -805,8 +915,8 @@ var en_default = {
|
|
|
805
915
|
lazyFields: "Custom fields loaded on demand",
|
|
806
916
|
lazyEditorsHelp: "Listed custom fields show a read-only preview until clicked or focused, so opening large pages stays fast. Separate uids with commas.",
|
|
807
917
|
lazyFieldsInvalid: "Use up to {max} custom field uids such as plugin::ckeditor5.CKEditor or global::my-field.",
|
|
808
|
-
modeForm: "Fields",
|
|
809
|
-
modeSplit: "Fields +
|
|
918
|
+
modeForm: "Fields only",
|
|
919
|
+
modeSplit: "Fields + preview",
|
|
810
920
|
modePreview: "Visual editor",
|
|
811
921
|
previewPane: "Page preview",
|
|
812
922
|
resize: "Resize preview pane",
|
|
@@ -833,6 +943,7 @@ var en_default = {
|
|
|
833
943
|
denied: "Access denied.",
|
|
834
944
|
loadFailed: "Could not load settings. Reload to try again.",
|
|
835
945
|
invalidColor: "Colors must use #RRGGBB.",
|
|
946
|
+
invalidUrl: "Preview URLs must be complete HTTP or HTTPS URLs.",
|
|
836
947
|
previewLabel: "Palette preview",
|
|
837
948
|
removeGroup: "Remove group",
|
|
838
949
|
diagTitle: "Block groups need attention; publishing is refused until they are fixed:",
|
|
@@ -867,6 +978,7 @@ var en_default = {
|
|
|
867
978
|
contentTypes: "Content types",
|
|
868
979
|
contentTypesHelp: 'The gallery, accordions and page preview work on these content types (the ones with a Dynamic Zone). Turn one off to leave its edit view native. "Opens in" is how every edit view of that type starts; editors can still switch while they edit.',
|
|
869
980
|
typeMode: "Opens in",
|
|
981
|
+
typeAdvanced: "Visual editor options",
|
|
870
982
|
modeDefault: "Default ({mode})",
|
|
871
983
|
blockModalDone: "Done",
|
|
872
984
|
crashed: "Blockscene stopped here after an error. The native editor is unaffected. If it happens again, turn Blockscene off in Settings, Blockscene.",
|
|
@@ -901,6 +1013,9 @@ var en_default = {
|
|
|
901
1013
|
unstar: "Remove star",
|
|
902
1014
|
quickInsert: "Insert {label}",
|
|
903
1015
|
insert: "Insert",
|
|
1016
|
+
starterKits: "Start with a kit",
|
|
1017
|
+
starterKitsHelp: "Choose a starting structure. Everything is inserted as an unsaved, editable draft.",
|
|
1018
|
+
startBlank: "Start blank",
|
|
904
1019
|
closeDetail: "Close details",
|
|
905
1020
|
typology: "Typology",
|
|
906
1021
|
typologyAuto: "Automatic ({name})",
|
|
@@ -955,6 +1070,11 @@ var en_default = {
|
|
|
955
1070
|
confirmDeleteTitle: "Delete block",
|
|
956
1071
|
confirmDelete: "Delete block {name}?",
|
|
957
1072
|
confirmDeleteMarker: "This is a group marker: only the marker is removed, not the blocks inside the group, and the group stays unbalanced until it is fixed.",
|
|
1073
|
+
confirmDeleteGroupTitle: "Delete group",
|
|
1074
|
+
confirmDeleteGroup: "Delete group {name}?",
|
|
1075
|
+
confirmDeleteGroupHint: "This group contains {count, plural, one {# block} other {# blocks}}. Choose whether to delete them or keep them on the page without the group.",
|
|
1076
|
+
keepGroupBlocks: "Remove group, keep blocks",
|
|
1077
|
+
deleteGroupAndBlocks: "{count, plural, =0 {Delete group} one {Delete group and # block} other {Delete group and # blocks}}",
|
|
958
1078
|
delete: "Delete",
|
|
959
1079
|
selectBlocks: "Select blocks",
|
|
960
1080
|
selectAll: "Select all",
|
|
@@ -1149,6 +1269,7 @@ var en_default = {
|
|
|
1149
1269
|
gridCellMenu: "More actions for {label}",
|
|
1150
1270
|
removeFromGroup: "Remove from group",
|
|
1151
1271
|
gridAdd: "Add a block",
|
|
1272
|
+
groupAdd: "Add block inside {label}",
|
|
1152
1273
|
gridShowList: "Show group {label} as a list",
|
|
1153
1274
|
gridShowGrid: "Show group {label} as a grid",
|
|
1154
1275
|
layoutColumnsField: "Layout grid: columns field",
|
|
@@ -1157,13 +1278,29 @@ var en_default = {
|
|
|
1157
1278
|
layoutOff: "No grid",
|
|
1158
1279
|
layoutNoMobile: "None",
|
|
1159
1280
|
layoutHelp: "The group's blocks show as a grid in the form, with the column count this block holds.",
|
|
1160
|
-
layoutNoFields: "This block has no field that can hold a column count."
|
|
1281
|
+
layoutNoFields: "This block has no field that can hold a column count.",
|
|
1282
|
+
"toolbar.versions": "Version history",
|
|
1283
|
+
versionsDenied: "Ask an administrator to grant the Blockscene Read version history permission.",
|
|
1284
|
+
versionsDisabled: "History is not enabled for this content type. Ask an administrator to enable it in Settings > Blockscene (settings.history.enabled).",
|
|
1285
|
+
versionsNew: "Save this entry first to start its history.",
|
|
1286
|
+
versionsPerson: "Filter by person",
|
|
1287
|
+
versionsEveryone: "Everyone",
|
|
1288
|
+
versionsCounts: "{total} blocks",
|
|
1289
|
+
versionsCountsMissing: "Block counts unavailable (older or unrecorded event).",
|
|
1290
|
+
versionsPage: "Page {page} of {count}",
|
|
1291
|
+
versionsPrevious: "Previous",
|
|
1292
|
+
versionsNext: "Next",
|
|
1293
|
+
versionsViewing: "Viewing version of {date} by {person} (read-only).",
|
|
1294
|
+
versionsCurrent: "Back to current draft",
|
|
1295
|
+
versionsMissing: "Some blocks, fields, media or relations are no longer available in this preview.",
|
|
1296
|
+
versionsBridgeLegacy: "This preview bridge does not support read-only browsing. Interaction is disabled; update the bridge to support readOnly.",
|
|
1297
|
+
historyExpired: "Snapshot no longer available"
|
|
1161
1298
|
};
|
|
1162
1299
|
|
|
1163
1300
|
// admin/translations/pt-BR.json
|
|
1164
1301
|
var pt_BR_default = {
|
|
1165
1302
|
title: "Blockscene",
|
|
1166
|
-
settings: "
|
|
1303
|
+
settings: "Geral",
|
|
1167
1304
|
gallery: "Galeria de blocos",
|
|
1168
1305
|
search: "Buscar blocos",
|
|
1169
1306
|
clear: "Limpar busca",
|
|
@@ -1179,6 +1316,17 @@ var pt_BR_default = {
|
|
|
1179
1316
|
moreActions: "Mais a\xE7\xF5es",
|
|
1180
1317
|
settingsTitle: "Blockscene",
|
|
1181
1318
|
settingsIntro: "Miniaturas da galeria, paleta dos wireframes e prefer\xEAncias do editor. As mudan\xE7as valem na pr\xF3xima abertura da galeria; n\xE3o \xE9 preciso rebuild.",
|
|
1319
|
+
settingsGeneral: "Geral",
|
|
1320
|
+
settingsGeneralIntro: "Defina como o Blockscene funciona no editor e quais a\xE7\xF5es ficam dispon\xEDveis nas linhas.",
|
|
1321
|
+
settingsPreview: "Preview da p\xE1gina",
|
|
1322
|
+
settingsPreviewIntro: "Conecte a preview do frontend e configure modos, barra de ferramentas e larguras responsivas.",
|
|
1323
|
+
settingsContentTypes: "Tipos de conte\xFAdo",
|
|
1324
|
+
settingsContentTypesIntro: "Escolha onde o Blockscene fica ativo e personalize o editor visual de cada tipo de conte\xFAdo.",
|
|
1325
|
+
settingsGallery: "Galeria de blocos",
|
|
1326
|
+
settingsGalleryIntro: "Configure miniaturas, cores dos wireframes, tipos e filtros da galeria.",
|
|
1327
|
+
settingsHistory: "Hist\xF3rico e lixeira",
|
|
1328
|
+
settingsHistoryIntro: "Controle vers\xF5es, reten\xE7\xE3o de atividades e exclus\xF5es recuper\xE1veis.",
|
|
1329
|
+
historyUnavailable: "As configura\xE7\xF5es de hist\xF3rico e lixeira exigem o Strapi 5.",
|
|
1182
1330
|
palette: "Paleta dos wireframes",
|
|
1183
1331
|
background: "Fundo",
|
|
1184
1332
|
surface: "Superf\xEDcies",
|
|
@@ -1208,6 +1356,7 @@ var pt_BR_default = {
|
|
|
1208
1356
|
showCloseAll: 'Mostrar "Recolher tudo"',
|
|
1209
1357
|
toggleHelp: "A barra da zona mostra um \xFAnico bot\xE3o: com as duas op\xE7\xF5es ligadas, ele expande enquanto houver algum bloco recolhido e, sen\xE3o, recolhe todos; com s\xF3 uma ligada, oferece apenas essa a\xE7\xE3o.",
|
|
1210
1358
|
showRowThumbnails: "Mostrar miniaturas dos blocos nas linhas",
|
|
1359
|
+
componentRowThumbnail: "Mostrar miniatura na linha do editor",
|
|
1211
1360
|
initialState: "Estado inicial dos accordions",
|
|
1212
1361
|
"states.closed": "Todos fechados",
|
|
1213
1362
|
"states.open": "Todos abertos",
|
|
@@ -1215,10 +1364,10 @@ var pt_BR_default = {
|
|
|
1215
1364
|
rememberHelp: "Somente os bot\xF5es de abrir/fechar todos atualizam a mem\xF3ria, por usu\xE1rio e navegador. Abrir um bloco isolado n\xE3o muda.",
|
|
1216
1365
|
previewUrl: "URL base da rota de preview",
|
|
1217
1366
|
previewUrlHelp: "URL completa da rota de preview de p\xE1gina do seu frontend, por exemplo https://site.test/block-preview/page. Vazio reutiliza a origem da Preview nativa do Strapi (quando configurada para o tipo de conte\xFAdo) com /block-preview/page. A rota precisa implementar a bridge (ver README).",
|
|
1218
|
-
previewUrlEmpty: "Nenhuma URL de preview definida: os editores s\xF3 t\xEAm os modos Campos +
|
|
1367
|
+
previewUrlEmpty: "Nenhuma URL de preview definida: os editores s\xF3 t\xEAm os modos Campos + preview e Editor visual nos tipos de conte\xFAdo com o Preview nativo do Strapi configurado. Nos demais, o menu de modos n\xE3o aparece.",
|
|
1219
1368
|
previewMode: "Modo inicial da preview",
|
|
1220
|
-
"modes.form": "
|
|
1221
|
-
"modes.split": "Campos +
|
|
1369
|
+
"modes.form": "Somente campos",
|
|
1370
|
+
"modes.split": "Campos + preview",
|
|
1222
1371
|
"modes.preview": "Editor visual",
|
|
1223
1372
|
previewModeHelp: "Toda tela de edi\xE7\xE3o abre neste modo, a menos que o tipo de conte\xFAdo defina o seu abaixo. Quem edita pode trocar durante a edi\xE7\xE3o; a troca n\xE3o fica gravada.",
|
|
1224
1373
|
lazyEdit: "Clique para editar",
|
|
@@ -1226,8 +1375,8 @@ var pt_BR_default = {
|
|
|
1226
1375
|
lazyFields: "Campos personalizados carregados sob demanda",
|
|
1227
1376
|
lazyEditorsHelp: "Os campos personalizados listados mostram uma pr\xE9via somente leitura at\xE9 receberem clique ou foco, para que p\xE1ginas grandes abram r\xE1pido. Separe os uids com v\xEDrgulas.",
|
|
1228
1377
|
lazyFieldsInvalid: "Use at\xE9 {max} uids de campos personalizados, como plugin::ckeditor5.CKEditor ou global::meu-campo.",
|
|
1229
|
-
modeForm: "
|
|
1230
|
-
modeSplit: "Campos +
|
|
1378
|
+
modeForm: "Somente campos",
|
|
1379
|
+
modeSplit: "Campos + preview",
|
|
1231
1380
|
modePreview: "Editor visual",
|
|
1232
1381
|
previewPane: "Preview da p\xE1gina",
|
|
1233
1382
|
resize: "Redimensionar painel de preview",
|
|
@@ -1254,6 +1403,7 @@ var pt_BR_default = {
|
|
|
1254
1403
|
denied: "Acesso negado.",
|
|
1255
1404
|
loadFailed: "N\xE3o foi poss\xEDvel carregar. Recarregue para tentar novamente.",
|
|
1256
1405
|
invalidColor: "As cores devem usar #RRGGBB.",
|
|
1406
|
+
invalidUrl: "As URLs de preview devem ser URLs HTTP ou HTTPS completas.",
|
|
1257
1407
|
previewLabel: "Pr\xE9via da paleta",
|
|
1258
1408
|
removeGroup: "Remover grupo",
|
|
1259
1409
|
diagTitle: "Os grupos de blocos precisam de aten\xE7\xE3o; a publica\xE7\xE3o \xE9 recusada at\xE9 a corre\xE7\xE3o:",
|
|
@@ -1288,6 +1438,7 @@ var pt_BR_default = {
|
|
|
1288
1438
|
contentTypes: "Tipos de conte\xFAdo",
|
|
1289
1439
|
contentTypesHelp: 'A galeria, os accordions e o preview da p\xE1gina funcionam nestes tipos de conte\xFAdo (os que t\xEAm uma zona din\xE2mica). Desligue um para deixar a edi\xE7\xE3o dele nativa. "Abre em" \xE9 como toda tela de edi\xE7\xE3o desse tipo come\xE7a; quem edita ainda pode trocar durante a edi\xE7\xE3o.',
|
|
1290
1440
|
typeMode: "Abre em",
|
|
1441
|
+
typeAdvanced: "Op\xE7\xF5es do editor visual",
|
|
1291
1442
|
modeDefault: "Padr\xE3o ({mode})",
|
|
1292
1443
|
blockModalDone: "Concluir",
|
|
1293
1444
|
crashed: "O Blockscene parou aqui por causa de um erro. O editor nativo n\xE3o foi afetado. Se acontecer de novo, desligue o Blockscene em Settings, Blockscene.",
|
|
@@ -1322,6 +1473,9 @@ var pt_BR_default = {
|
|
|
1322
1473
|
unstar: "Remover dos favoritos",
|
|
1323
1474
|
quickInsert: "Inserir {label}",
|
|
1324
1475
|
insert: "Inserir",
|
|
1476
|
+
starterKits: "Come\xE7ar com um kit",
|
|
1477
|
+
starterKitsHelp: "Escolha uma estrutura inicial. Tudo \xE9 inserido como rascunho edit\xE1vel e ainda n\xE3o salvo.",
|
|
1478
|
+
startBlank: "Come\xE7ar em branco",
|
|
1325
1479
|
closeDetail: "Fechar detalhes",
|
|
1326
1480
|
typology: "Tipologia",
|
|
1327
1481
|
typologyAuto: "Autom\xE1tica ({name})",
|
|
@@ -1376,6 +1530,11 @@ var pt_BR_default = {
|
|
|
1376
1530
|
confirmDeleteTitle: "Excluir bloco",
|
|
1377
1531
|
confirmDelete: "Excluir o bloco {name}?",
|
|
1378
1532
|
confirmDeleteMarker: "Este \xE9 um marcador de grupo: s\xF3 o marcador \xE9 removido, n\xE3o os blocos dentro do grupo, e o grupo fica desbalanceado at\xE9 ser corrigido.",
|
|
1533
|
+
confirmDeleteGroupTitle: "Excluir grupo",
|
|
1534
|
+
confirmDeleteGroup: "Excluir o grupo {name}?",
|
|
1535
|
+
confirmDeleteGroupHint: "Este grupo cont\xE9m {count, plural, one {# bloco} other {# blocos}}. Escolha entre exclu\xED-los ou mant\xEA-los na p\xE1gina sem o grupo.",
|
|
1536
|
+
keepGroupBlocks: "Remover grupo e manter blocos",
|
|
1537
|
+
deleteGroupAndBlocks: "{count, plural, =0 {Excluir grupo} one {Excluir grupo e # bloco} other {Excluir grupo e # blocos}}",
|
|
1379
1538
|
delete: "Excluir",
|
|
1380
1539
|
selectBlocks: "Selecionar blocos",
|
|
1381
1540
|
selectAll: "Selecionar todos",
|
|
@@ -1570,6 +1729,7 @@ var pt_BR_default = {
|
|
|
1570
1729
|
gridCellMenu: "Mais a\xE7\xF5es para {label}",
|
|
1571
1730
|
removeFromGroup: "Remover do grupo",
|
|
1572
1731
|
gridAdd: "Adicionar bloco",
|
|
1732
|
+
groupAdd: "Adicionar bloco dentro de {label}",
|
|
1573
1733
|
gridShowList: "Mostrar o grupo {label} como lista",
|
|
1574
1734
|
gridShowGrid: "Mostrar o grupo {label} como grade",
|
|
1575
1735
|
layoutColumnsField: "Grade do layout: campo das colunas",
|
|
@@ -1578,13 +1738,29 @@ var pt_BR_default = {
|
|
|
1578
1738
|
layoutOff: "Sem grade",
|
|
1579
1739
|
layoutNoMobile: "Nenhum",
|
|
1580
1740
|
layoutHelp: "Os blocos do grupo aparecem em grade no formul\xE1rio, com o n\xFAmero de colunas deste bloco.",
|
|
1581
|
-
layoutNoFields: "Este bloco n\xE3o tem campo que guarde um n\xFAmero de colunas."
|
|
1741
|
+
layoutNoFields: "Este bloco n\xE3o tem campo que guarde um n\xFAmero de colunas.",
|
|
1742
|
+
"toolbar.versions": "Hist\xF3rico de vers\xF5es",
|
|
1743
|
+
versionsDenied: "Pe\xE7a a um administrador a permiss\xE3o Ler hist\xF3rico de vers\xF5es do Blockscene.",
|
|
1744
|
+
versionsDisabled: "O hist\xF3rico n\xE3o est\xE1 ativo para este tipo de conte\xFAdo. Pe\xE7a a um administrador para ativ\xE1-lo em Settings > Blockscene (settings.history.enabled).",
|
|
1745
|
+
versionsNew: "Salve este conte\xFAdo primeiro para iniciar seu hist\xF3rico.",
|
|
1746
|
+
versionsPerson: "Filtrar por pessoa",
|
|
1747
|
+
versionsEveryone: "Todas as pessoas",
|
|
1748
|
+
versionsCounts: "{total} blocos",
|
|
1749
|
+
versionsCountsMissing: "Contagem de blocos indispon\xEDvel (evento antigo ou n\xE3o registrado).",
|
|
1750
|
+
versionsPage: "P\xE1gina {page} de {count}",
|
|
1751
|
+
versionsPrevious: "Anterior",
|
|
1752
|
+
versionsNext: "Pr\xF3xima",
|
|
1753
|
+
versionsViewing: "Vendo vers\xE3o de {date} por {person} (somente leitura).",
|
|
1754
|
+
versionsCurrent: "Voltar ao rascunho atual",
|
|
1755
|
+
versionsMissing: "Alguns blocos, campos, m\xEDdias ou rela\xE7\xF5es n\xE3o est\xE3o mais dispon\xEDveis nesta preview.",
|
|
1756
|
+
versionsBridgeLegacy: "Esta bridge n\xE3o suporta navega\xE7\xE3o somente leitura. A intera\xE7\xE3o est\xE1 desativada; atualize a bridge para suportar readOnly.",
|
|
1757
|
+
historyExpired: "Snapshot n\xE3o est\xE1 mais dispon\xEDvel"
|
|
1582
1758
|
};
|
|
1583
1759
|
|
|
1584
1760
|
// admin/translations/pt.json
|
|
1585
1761
|
var pt_default = {
|
|
1586
1762
|
title: "Blockscene",
|
|
1587
|
-
settings: "
|
|
1763
|
+
settings: "Geral",
|
|
1588
1764
|
gallery: "Galeria de blocos",
|
|
1589
1765
|
search: "Pesquisar blocos",
|
|
1590
1766
|
clear: "Limpar pesquisa",
|
|
@@ -1600,6 +1776,17 @@ var pt_default = {
|
|
|
1600
1776
|
moreActions: "Mais a\xE7\xF5es",
|
|
1601
1777
|
settingsTitle: "Blockscene",
|
|
1602
1778
|
settingsIntro: "Miniaturas da galeria, paleta dos wireframes e prefer\xEAncias do editor. As mudan\xE7as valem na pr\xF3xima abertura da galeria; n\xE3o \xE9 preciso rebuild.",
|
|
1779
|
+
settingsGeneral: "Geral",
|
|
1780
|
+
settingsGeneralIntro: "Defina como o Blockscene funciona no editor e quais a\xE7\xF5es ficam dispon\xEDveis nas linhas.",
|
|
1781
|
+
settingsPreview: "Pr\xE9-visualiza\xE7\xE3o da p\xE1gina",
|
|
1782
|
+
settingsPreviewIntro: "Ligue a pr\xE9-visualiza\xE7\xE3o do frontend e configure modos, barra de ferramentas e larguras responsivas.",
|
|
1783
|
+
settingsContentTypes: "Tipos de conte\xFAdo",
|
|
1784
|
+
settingsContentTypesIntro: "Escolha onde o Blockscene fica ativo e personalize o editor visual de cada tipo de conte\xFAdo.",
|
|
1785
|
+
settingsGallery: "Galeria de blocos",
|
|
1786
|
+
settingsGalleryIntro: "Configure miniaturas, cores dos wireframes, tipos e filtros da galeria.",
|
|
1787
|
+
settingsHistory: "Hist\xF3rico e lixo",
|
|
1788
|
+
settingsHistoryIntro: "Controle vers\xF5es, reten\xE7\xE3o de atividades e elimina\xE7\xF5es recuper\xE1veis.",
|
|
1789
|
+
historyUnavailable: "As configura\xE7\xF5es de hist\xF3rico e lixo exigem o Strapi 5.",
|
|
1603
1790
|
palette: "Paleta dos wireframes",
|
|
1604
1791
|
background: "Fundo",
|
|
1605
1792
|
surface: "Superf\xEDcies",
|
|
@@ -1629,6 +1816,7 @@ var pt_default = {
|
|
|
1629
1816
|
showCloseAll: 'Mostrar "Recolher tudo"',
|
|
1630
1817
|
toggleHelp: "A barra da zona mostra um \xFAnico bot\xE3o: com as duas op\xE7\xF5es ativas, expande enquanto houver algum bloco recolhido e, caso contr\xE1rio, recolhe todos; com apenas uma ativa, oferece s\xF3 essa a\xE7\xE3o.",
|
|
1631
1818
|
showRowThumbnails: "Mostrar miniaturas dos blocos nas linhas",
|
|
1819
|
+
componentRowThumbnail: "Mostrar miniatura na linha do editor",
|
|
1632
1820
|
initialState: "Estado inicial dos accordions",
|
|
1633
1821
|
"states.closed": "Todos fechados",
|
|
1634
1822
|
"states.open": "Todos abertos",
|
|
@@ -1636,10 +1824,10 @@ var pt_default = {
|
|
|
1636
1824
|
rememberHelp: "Somente os bot\xF5es de abrir/fechar todos atualizam a mem\xF3ria, por usu\xE1rio e navegador. Abrir um bloco isolado n\xE3o muda.",
|
|
1637
1825
|
previewUrl: "URL base da rota de pr\xE9-visualiza\xE7\xE3o",
|
|
1638
1826
|
previewUrlHelp: "URL completa da rota de preview de p\xE1gina do seu frontend, por exemplo https://site.test/block-preview/page. Vazio reutiliza a origem da Preview nativa do Strapi (quando configurada para o tipo de conte\xFAdo) com /block-preview/page. A rota precisa implementar a bridge (ver README).",
|
|
1639
|
-
previewUrlEmpty: "Nenhum URL de pr\xE9-visualiza\xE7\xE3o definido: os editores s\xF3 t\xEAm os modos Campos +
|
|
1827
|
+
previewUrlEmpty: "Nenhum URL de pr\xE9-visualiza\xE7\xE3o definido: os editores s\xF3 t\xEAm os modos Campos + pr\xE9-visualiza\xE7\xE3o e Editor visual nos tipos de conte\xFAdo com a Preview nativa do Strapi configurada. Nos restantes, o menu de modos n\xE3o aparece.",
|
|
1640
1828
|
previewMode: "Modo inicial da pr\xE9-visualiza\xE7\xE3o",
|
|
1641
|
-
"modes.form": "
|
|
1642
|
-
"modes.split": "Campos +
|
|
1829
|
+
"modes.form": "Apenas campos",
|
|
1830
|
+
"modes.split": "Campos + pr\xE9-visualiza\xE7\xE3o",
|
|
1643
1831
|
"modes.preview": "Editor visual",
|
|
1644
1832
|
previewModeHelp: "Cada ecr\xE3 de edi\xE7\xE3o abre neste modo, salvo se o tipo de conte\xFAdo definir o seu abaixo. Quem edita pode mudar durante a edi\xE7\xE3o; a mudan\xE7a n\xE3o fica guardada.",
|
|
1645
1833
|
lazyEdit: "Clique para editar",
|
|
@@ -1647,8 +1835,8 @@ var pt_default = {
|
|
|
1647
1835
|
lazyFields: "Campos personalizados carregados a pedido",
|
|
1648
1836
|
lazyEditorsHelp: "Os campos personalizados indicados mostram uma pr\xE9-visualiza\xE7\xE3o s\xF3 de leitura at\xE9 receberem clique ou foco, para que p\xE1ginas grandes abram depressa. Separe os uids com v\xEDrgulas.",
|
|
1649
1837
|
lazyFieldsInvalid: "Use at\xE9 {max} uids de campos personalizados, como plugin::ckeditor5.CKEditor ou global::meu-campo.",
|
|
1650
|
-
modeForm: "
|
|
1651
|
-
modeSplit: "Campos +
|
|
1838
|
+
modeForm: "Apenas campos",
|
|
1839
|
+
modeSplit: "Campos + pr\xE9-visualiza\xE7\xE3o",
|
|
1652
1840
|
modePreview: "Editor visual",
|
|
1653
1841
|
previewPane: "Pr\xE9-visualiza\xE7\xE3o da p\xE1gina",
|
|
1654
1842
|
resize: "Redimensionar painel de pr\xE9-visualiza\xE7\xE3o",
|
|
@@ -1675,6 +1863,7 @@ var pt_default = {
|
|
|
1675
1863
|
denied: "Acesso negado.",
|
|
1676
1864
|
loadFailed: "N\xE3o foi poss\xEDvel carregar. Recarregue para tentar novamente.",
|
|
1677
1865
|
invalidColor: "As cores devem usar #RRGGBB.",
|
|
1866
|
+
invalidUrl: "Os URL de pr\xE9-visualiza\xE7\xE3o devem ser endere\xE7os HTTP ou HTTPS completos.",
|
|
1678
1867
|
previewLabel: "Pr\xE9-visualiza\xE7\xE3o da paleta",
|
|
1679
1868
|
removeGroup: "Remover grupo",
|
|
1680
1869
|
diagTitle: "Os grupos de blocos precisam de aten\xE7\xE3o; a publica\xE7\xE3o \xE9 recusada at\xE9 \xE0 corre\xE7\xE3o:",
|
|
@@ -1709,6 +1898,7 @@ var pt_default = {
|
|
|
1709
1898
|
contentTypes: "Tipos de conte\xFAdo",
|
|
1710
1899
|
contentTypesHelp: 'A galeria, os acorde\xF5es e a pr\xE9-visualiza\xE7\xE3o da p\xE1gina funcionam nestes tipos de conte\xFAdo (os que t\xEAm uma zona din\xE2mica). Desligue um para manter a edi\xE7\xE3o nativa. "Abre em" \xE9 como come\xE7a cada ecr\xE3 de edi\xE7\xE3o desse tipo; quem edita pode sempre mudar durante a edi\xE7\xE3o.',
|
|
1711
1900
|
typeMode: "Abre em",
|
|
1901
|
+
typeAdvanced: "Op\xE7\xF5es do editor visual",
|
|
1712
1902
|
modeDefault: "Predefini\xE7\xE3o ({mode})",
|
|
1713
1903
|
blockModalDone: "Concluir",
|
|
1714
1904
|
crashed: "O Blockscene parou aqui devido a um erro. O editor nativo n\xE3o foi afetado. Se voltar a acontecer, desligue o Blockscene em Settings, Blockscene.",
|
|
@@ -1743,6 +1933,9 @@ var pt_default = {
|
|
|
1743
1933
|
unstar: "Remover dos favoritos",
|
|
1744
1934
|
quickInsert: "Inserir {label}",
|
|
1745
1935
|
insert: "Inserir",
|
|
1936
|
+
starterKits: "Come\xE7ar com um kit",
|
|
1937
|
+
starterKitsHelp: "Escolha uma estrutura inicial. Tudo \xE9 inserido como um rascunho edit\xE1vel e ainda n\xE3o guardado.",
|
|
1938
|
+
startBlank: "Come\xE7ar em branco",
|
|
1746
1939
|
closeDetail: "Fechar detalhes",
|
|
1747
1940
|
typology: "Tipologia",
|
|
1748
1941
|
typologyAuto: "Autom\xE1tica ({name})",
|
|
@@ -1797,6 +1990,11 @@ var pt_default = {
|
|
|
1797
1990
|
confirmDeleteTitle: "Eliminar bloco",
|
|
1798
1991
|
confirmDelete: "Eliminar o bloco {name}?",
|
|
1799
1992
|
confirmDeleteMarker: "Este \xE9 um marcador de grupo: s\xF3 o marcador \xE9 removido, n\xE3o os blocos dentro do grupo, e o grupo fica desequilibrado at\xE9 ser corrigido.",
|
|
1993
|
+
confirmDeleteGroupTitle: "Eliminar grupo",
|
|
1994
|
+
confirmDeleteGroup: "Eliminar o grupo {name}?",
|
|
1995
|
+
confirmDeleteGroupHint: "Este grupo cont\xE9m {count, plural, one {# bloco} other {# blocos}}. Escolha entre elimin\xE1-los ou mant\xEA-los na p\xE1gina sem o grupo.",
|
|
1996
|
+
keepGroupBlocks: "Eliminar grupo e manter blocos",
|
|
1997
|
+
deleteGroupAndBlocks: "{count, plural, =0 {Eliminar grupo} one {Eliminar grupo e # bloco} other {Eliminar grupo e # blocos}}",
|
|
1800
1998
|
delete: "Eliminar",
|
|
1801
1999
|
selectBlocks: "Selecionar blocos",
|
|
1802
2000
|
selectAll: "Selecionar todos",
|
|
@@ -1991,6 +2189,7 @@ var pt_default = {
|
|
|
1991
2189
|
gridCellMenu: "Mais a\xE7\xF5es para {label}",
|
|
1992
2190
|
removeFromGroup: "Remover do grupo",
|
|
1993
2191
|
gridAdd: "Adicionar bloco",
|
|
2192
|
+
groupAdd: "Adicionar bloco dentro de {label}",
|
|
1994
2193
|
gridShowList: "Mostrar o grupo {label} como lista",
|
|
1995
2194
|
gridShowGrid: "Mostrar o grupo {label} como grelha",
|
|
1996
2195
|
layoutColumnsField: "Grelha do layout: campo das colunas",
|
|
@@ -1999,13 +2198,29 @@ var pt_default = {
|
|
|
1999
2198
|
layoutOff: "Sem grelha",
|
|
2000
2199
|
layoutNoMobile: "Nenhum",
|
|
2001
2200
|
layoutHelp: "Os blocos do grupo aparecem em grelha no formul\xE1rio, com o n\xFAmero de colunas deste bloco.",
|
|
2002
|
-
layoutNoFields: "Este bloco n\xE3o tem campo que guarde um n\xFAmero de colunas."
|
|
2201
|
+
layoutNoFields: "Este bloco n\xE3o tem campo que guarde um n\xFAmero de colunas.",
|
|
2202
|
+
"toolbar.versions": "Hist\xF3rico de vers\xF5es",
|
|
2203
|
+
versionsDenied: "Pe\xE7a a um administrador a permiss\xE3o Ler hist\xF3rico de vers\xF5es do Blockscene.",
|
|
2204
|
+
versionsDisabled: "O hist\xF3rico n\xE3o est\xE1 ativo para este tipo de conte\xFAdo. Pe\xE7a a um administrador para o ativar em Settings > Blockscene (settings.history.enabled).",
|
|
2205
|
+
versionsNew: "Guarde este conte\xFAdo primeiro para iniciar o hist\xF3rico.",
|
|
2206
|
+
versionsPerson: "Filtrar por pessoa",
|
|
2207
|
+
versionsEveryone: "Todas as pessoas",
|
|
2208
|
+
versionsCounts: "{total} blocos",
|
|
2209
|
+
versionsCountsMissing: "Contagem de blocos indispon\xEDvel (evento antigo ou n\xE3o registado).",
|
|
2210
|
+
versionsPage: "P\xE1gina {page} de {count}",
|
|
2211
|
+
versionsPrevious: "Anterior",
|
|
2212
|
+
versionsNext: "Seguinte",
|
|
2213
|
+
versionsViewing: "A ver a vers\xE3o de {date} por {person} (s\xF3 de leitura).",
|
|
2214
|
+
versionsCurrent: "Voltar ao rascunho atual",
|
|
2215
|
+
versionsMissing: "Alguns blocos, campos, ficheiros ou rela\xE7\xF5es j\xE1 n\xE3o est\xE3o dispon\xEDveis nesta pr\xE9via.",
|
|
2216
|
+
versionsBridgeLegacy: "Esta bridge n\xE3o suporta navega\xE7\xE3o s\xF3 de leitura. A intera\xE7\xE3o est\xE1 desativada; atualize a bridge para suportar readOnly.",
|
|
2217
|
+
historyExpired: "Snapshot j\xE1 n\xE3o est\xE1 dispon\xEDvel"
|
|
2003
2218
|
};
|
|
2004
2219
|
|
|
2005
2220
|
// admin/translations/fr.json
|
|
2006
2221
|
var fr_default = {
|
|
2007
2222
|
title: "Blockscene",
|
|
2008
|
-
settings: "
|
|
2223
|
+
settings: "G\xE9n\xE9ral",
|
|
2009
2224
|
gallery: "Galerie de blocs",
|
|
2010
2225
|
search: "Rechercher des blocs",
|
|
2011
2226
|
clear: "Effacer la recherche",
|
|
@@ -2021,6 +2236,17 @@ var fr_default = {
|
|
|
2021
2236
|
moreActions: "Plus d'actions",
|
|
2022
2237
|
settingsTitle: "Blockscene",
|
|
2023
2238
|
settingsIntro: "Vignettes de la galerie, palette des wireframes et pr\xE9f\xE9rences de l'\xE9diteur. Les changements s'appliquent \xE0 la prochaine ouverture de la galerie ; aucun rebuild n'est n\xE9cessaire.",
|
|
2239
|
+
settingsGeneral: "G\xE9n\xE9ral",
|
|
2240
|
+
settingsGeneralIntro: "D\xE9finissez le comportement de Blockscene dans l'\xE9diteur et les actions disponibles sur les lignes.",
|
|
2241
|
+
settingsPreview: "Aper\xE7u de page",
|
|
2242
|
+
settingsPreviewIntro: "Connectez l'aper\xE7u du frontend et configurez ses modes, sa barre d'outils et ses largeurs responsives.",
|
|
2243
|
+
settingsContentTypes: "Types de contenu",
|
|
2244
|
+
settingsContentTypesIntro: "Choisissez o\xF9 Blockscene est actif et personnalisez l'\xE9diteur visuel pour chaque type de contenu.",
|
|
2245
|
+
settingsGallery: "Galerie de blocs",
|
|
2246
|
+
settingsGalleryIntro: "Configurez les vignettes, les couleurs des wireframes, les types et les filtres de la galerie.",
|
|
2247
|
+
settingsHistory: "Historique et corbeille",
|
|
2248
|
+
settingsHistoryIntro: "G\xE9rez les versions, la conservation des activit\xE9s et les suppressions r\xE9cup\xE9rables.",
|
|
2249
|
+
historyUnavailable: "Les r\xE9glages d'historique et de corbeille n\xE9cessitent Strapi 5.",
|
|
2024
2250
|
palette: "Palette des wireframes",
|
|
2025
2251
|
background: "Fond",
|
|
2026
2252
|
surface: "Surfaces",
|
|
@@ -2050,6 +2276,7 @@ var fr_default = {
|
|
|
2050
2276
|
showCloseAll: "Afficher \xAB Tout replier \xBB",
|
|
2051
2277
|
toggleHelp: "La barre de la zone affiche un seul bouton : avec les deux options activ\xE9es, il d\xE9plie tant qu'un bloc est repli\xE9 et sinon les replie tous ; avec une seule, il ne propose que cette action.",
|
|
2052
2278
|
showRowThumbnails: "Afficher les miniatures des blocs dans les lignes",
|
|
2279
|
+
componentRowThumbnail: "Afficher la miniature dans la ligne de l'\xE9diteur",
|
|
2053
2280
|
initialState: "\xC9tat initial des accord\xE9ons",
|
|
2054
2281
|
"states.closed": "Tous ferm\xE9s",
|
|
2055
2282
|
"states.open": "Tous ouverts",
|
|
@@ -2057,10 +2284,10 @@ var fr_default = {
|
|
|
2057
2284
|
rememberHelp: "Seuls les boutons explicites tout ouvrir / tout fermer mettent la m\xE9moire \xE0 jour, par utilisateur et navigateur. Ouvrir un seul bloc ne change rien.",
|
|
2058
2285
|
previewUrl: "URL de base de la route d'aper\xE7u",
|
|
2059
2286
|
previewUrlHelp: "URL compl\xE8te de la route d'aper\xE7u de page de votre frontend, par ex. https://site.test/block-preview/page. Laissez vide pour r\xE9utiliser l'origine de l'aper\xE7u natif de Strapi (s'il est configur\xE9 pour le type de contenu) avec /block-preview/page. La route doit impl\xE9menter le pont (voir README).",
|
|
2060
|
-
previewUrlEmpty: "Aucune URL d'aper\xE7u : les \xE9diteurs n'ont les modes Champs +
|
|
2287
|
+
previewUrlEmpty: "Aucune URL d'aper\xE7u : les \xE9diteurs n'ont les modes Champs + aper\xE7u et \xC9diteur visuel que sur les types de contenu o\xF9 l'aper\xE7u natif de Strapi est configur\xE9. Ailleurs, le menu des modes n'appara\xEEt pas.",
|
|
2061
2288
|
previewMode: "Mode d'aper\xE7u initial",
|
|
2062
|
-
"modes.form": "Champs",
|
|
2063
|
-
"modes.split": "Champs +
|
|
2289
|
+
"modes.form": "Champs uniquement",
|
|
2290
|
+
"modes.split": "Champs + aper\xE7u",
|
|
2064
2291
|
"modes.preview": "\xC9diteur visuel",
|
|
2065
2292
|
previewModeHelp: "Chaque vue d'\xE9dition s'ouvre dans ce mode, sauf si son type de contenu d\xE9finit le sien ci-dessous. L'\xE9diteur peut changer pendant l'\xE9dition ; ce choix n'est pas m\xE9moris\xE9.",
|
|
2066
2293
|
lazyEdit: "Cliquer pour modifier",
|
|
@@ -2068,8 +2295,8 @@ var fr_default = {
|
|
|
2068
2295
|
lazyFields: "Champs personnalis\xE9s charg\xE9s \xE0 la demande",
|
|
2069
2296
|
lazyEditorsHelp: "Les champs personnalis\xE9s list\xE9s affichent un aper\xE7u en lecture seule jusqu'au clic ou au focus, pour que les grandes pages s'ouvrent vite. S\xE9parez les uids par des virgules.",
|
|
2070
2297
|
lazyFieldsInvalid: "Utilisez jusqu'\xE0 {max} uids de champs personnalis\xE9s, comme plugin::ckeditor5.CKEditor ou global::mon-champ.",
|
|
2071
|
-
modeForm: "Champs",
|
|
2072
|
-
modeSplit: "Champs +
|
|
2298
|
+
modeForm: "Champs uniquement",
|
|
2299
|
+
modeSplit: "Champs + aper\xE7u",
|
|
2073
2300
|
modePreview: "\xC9diteur visuel",
|
|
2074
2301
|
previewPane: "Aper\xE7u de la page",
|
|
2075
2302
|
resize: "Redimensionner le panneau d'aper\xE7u",
|
|
@@ -2096,6 +2323,7 @@ var fr_default = {
|
|
|
2096
2323
|
denied: "Acc\xE8s refus\xE9.",
|
|
2097
2324
|
loadFailed: "Impossible de charger les param\xE8tres. Rechargez pour r\xE9essayer.",
|
|
2098
2325
|
invalidColor: "Les couleurs doivent utiliser #RRGGBB.",
|
|
2326
|
+
invalidUrl: "Les URL d'aper\xE7u doivent \xEAtre des adresses HTTP ou HTTPS compl\xE8tes.",
|
|
2099
2327
|
previewLabel: "Aper\xE7u de la palette",
|
|
2100
2328
|
removeGroup: "Supprimer le groupe",
|
|
2101
2329
|
diagTitle: "Les groupes de blocs demandent une correction ; la publication est refus\xE9e tant qu'ils ne sont pas corrig\xE9s :",
|
|
@@ -2130,6 +2358,7 @@ var fr_default = {
|
|
|
2130
2358
|
contentTypes: "Types de contenu",
|
|
2131
2359
|
contentTypesHelp: "La galerie, les accord\xE9ons et l'aper\xE7u de page fonctionnent sur ces types de contenu (ceux qui ont une Dynamic Zone). D\xE9sactivez-en un pour garder son \xE9dition native. \xAB S'ouvre en \xBB d\xE9finit le mode de d\xE9part de chaque vue d'\xE9dition de ce type ; l'\xE9diteur peut toujours changer pendant l'\xE9dition.",
|
|
2132
2360
|
typeMode: "S'ouvre en",
|
|
2361
|
+
typeAdvanced: "Options de l'\xE9diteur visuel",
|
|
2133
2362
|
modeDefault: "Par d\xE9faut ({mode})",
|
|
2134
2363
|
blockModalDone: "Termin\xE9",
|
|
2135
2364
|
crashed: "Blockscene s'est arr\xEAt\xE9 ici \xE0 cause d'une erreur. L'\xE9diteur natif n'est pas touch\xE9. Si cela se reproduit, d\xE9sactivez Blockscene dans Settings, Blockscene.",
|
|
@@ -2164,6 +2393,9 @@ var fr_default = {
|
|
|
2164
2393
|
unstar: "Retirer des favoris",
|
|
2165
2394
|
quickInsert: "Ins\xE9rer {label}",
|
|
2166
2395
|
insert: "Ins\xE9rer",
|
|
2396
|
+
starterKits: "D\xE9marrer avec un kit",
|
|
2397
|
+
starterKitsHelp: "Choisissez une structure de d\xE9part. Tout est ins\xE9r\xE9 comme brouillon modifiable et non enregistr\xE9.",
|
|
2398
|
+
startBlank: "Commencer vide",
|
|
2167
2399
|
closeDetail: "Fermer les d\xE9tails",
|
|
2168
2400
|
typology: "Typologie",
|
|
2169
2401
|
typologyAuto: "Automatique ({name})",
|
|
@@ -2218,6 +2450,11 @@ var fr_default = {
|
|
|
2218
2450
|
confirmDeleteTitle: "Supprimer le bloc",
|
|
2219
2451
|
confirmDelete: "Supprimer le bloc {name} ?",
|
|
2220
2452
|
confirmDeleteMarker: "C'est un marqueur de groupe : seul le marqueur est supprim\xE9, pas les blocs du groupe, et le groupe reste d\xE9s\xE9quilibr\xE9 jusqu'\xE0 sa correction.",
|
|
2453
|
+
confirmDeleteGroupTitle: "Supprimer le groupe",
|
|
2454
|
+
confirmDeleteGroup: "Supprimer le groupe {name} ?",
|
|
2455
|
+
confirmDeleteGroupHint: "Ce groupe contient {count, plural, one {# bloc} other {# blocs}}. Choisissez de les supprimer ou de les conserver dans la page sans le groupe.",
|
|
2456
|
+
keepGroupBlocks: "Supprimer le groupe, conserver les blocs",
|
|
2457
|
+
deleteGroupAndBlocks: "{count, plural, =0 {Supprimer le groupe} one {Supprimer le groupe et # bloc} other {Supprimer le groupe et # blocs}}",
|
|
2221
2458
|
delete: "Supprimer",
|
|
2222
2459
|
selectBlocks: "S\xE9lectionner des blocs",
|
|
2223
2460
|
selectAll: "Tout s\xE9lectionner",
|
|
@@ -2412,6 +2649,7 @@ var fr_default = {
|
|
|
2412
2649
|
gridCellMenu: "Plus d'actions pour {label}",
|
|
2413
2650
|
removeFromGroup: "Retirer du groupe",
|
|
2414
2651
|
gridAdd: "Ajouter un bloc",
|
|
2652
|
+
groupAdd: "Ajouter un bloc dans {label}",
|
|
2415
2653
|
gridShowList: "Afficher le groupe {label} en liste",
|
|
2416
2654
|
gridShowGrid: "Afficher le groupe {label} en grille",
|
|
2417
2655
|
layoutColumnsField: "Grille de mise en page : champ des colonnes",
|
|
@@ -2420,13 +2658,29 @@ var fr_default = {
|
|
|
2420
2658
|
layoutOff: "Pas de grille",
|
|
2421
2659
|
layoutNoMobile: "Aucun",
|
|
2422
2660
|
layoutHelp: "Les blocs du groupe s'affichent en grille dans le formulaire, avec le nombre de colonnes de ce bloc.",
|
|
2423
|
-
layoutNoFields: "Ce bloc n'a aucun champ pouvant contenir un nombre de colonnes."
|
|
2661
|
+
layoutNoFields: "Ce bloc n'a aucun champ pouvant contenir un nombre de colonnes.",
|
|
2662
|
+
"toolbar.versions": "Historique des versions",
|
|
2663
|
+
versionsDenied: "Demandez \xE0 un administrateur la permission Lire l\u2019historique des versions de Blockscene.",
|
|
2664
|
+
versionsDisabled: "L\u2019historique n\u2019est pas activ\xE9 pour ce type de contenu. Demandez \xE0 un administrateur de l\u2019activer dans Settings > Blockscene (settings.history.enabled).",
|
|
2665
|
+
versionsNew: "Enregistrez d\u2019abord ce contenu pour commencer son historique.",
|
|
2666
|
+
versionsPerson: "Filtrer par personne",
|
|
2667
|
+
versionsEveryone: "Tout le monde",
|
|
2668
|
+
versionsCounts: "{total} blocs",
|
|
2669
|
+
versionsCountsMissing: "Nombre de blocs indisponible (\xE9v\xE9nement ancien ou non enregistr\xE9).",
|
|
2670
|
+
versionsPage: "Page {page} sur {count}",
|
|
2671
|
+
versionsPrevious: "Pr\xE9c\xE9dente",
|
|
2672
|
+
versionsNext: "Suivante",
|
|
2673
|
+
versionsViewing: "Version du {date} par {person} (lecture seule).",
|
|
2674
|
+
versionsCurrent: "Revenir au brouillon actuel",
|
|
2675
|
+
versionsMissing: "Certains blocs, champs, m\xE9dias ou relations ne sont plus disponibles dans cet aper\xE7u.",
|
|
2676
|
+
versionsBridgeLegacy: "Cette bridge ne prend pas en charge la navigation en lecture seule. L\u2019interaction est d\xE9sactiv\xE9e ; mettez la bridge \xE0 jour pour prendre en charge readOnly.",
|
|
2677
|
+
historyExpired: "Snapshot indisponible"
|
|
2424
2678
|
};
|
|
2425
2679
|
|
|
2426
2680
|
// admin/translations/es.json
|
|
2427
2681
|
var es_default = {
|
|
2428
2682
|
title: "Blockscene",
|
|
2429
|
-
settings: "
|
|
2683
|
+
settings: "General",
|
|
2430
2684
|
gallery: "Galer\xEDa de bloques",
|
|
2431
2685
|
search: "Buscar bloques",
|
|
2432
2686
|
clear: "Borrar b\xFAsqueda",
|
|
@@ -2442,6 +2696,17 @@ var es_default = {
|
|
|
2442
2696
|
moreActions: "M\xE1s acciones",
|
|
2443
2697
|
settingsTitle: "Blockscene",
|
|
2444
2698
|
settingsIntro: "Miniaturas de la galer\xEDa, paleta de los wireframes y preferencias del editor. Los cambios se aplican la pr\xF3xima vez que se abra la galer\xEDa; no hace falta rebuild.",
|
|
2699
|
+
settingsGeneral: "General",
|
|
2700
|
+
settingsGeneralIntro: "Define c\xF3mo funciona Blockscene en el editor y qu\xE9 acciones est\xE1n disponibles en las filas.",
|
|
2701
|
+
settingsPreview: "Vista previa de p\xE1gina",
|
|
2702
|
+
settingsPreviewIntro: "Conecta la vista previa del frontend y configura sus modos, barra de herramientas y anchos adaptables.",
|
|
2703
|
+
settingsContentTypes: "Tipos de contenido",
|
|
2704
|
+
settingsContentTypesIntro: "Elige d\xF3nde se activa Blockscene y personaliza el editor visual de cada tipo de contenido.",
|
|
2705
|
+
settingsGallery: "Galer\xEDa de bloques",
|
|
2706
|
+
settingsGalleryIntro: "Configura miniaturas, colores de wireframes, tipos y filtros de la galer\xEDa.",
|
|
2707
|
+
settingsHistory: "Historial y papelera",
|
|
2708
|
+
settingsHistoryIntro: "Controla versiones, retenci\xF3n de actividad y eliminaciones recuperables.",
|
|
2709
|
+
historyUnavailable: "La configuraci\xF3n de historial y papelera requiere Strapi 5.",
|
|
2445
2710
|
palette: "Paleta de wireframes",
|
|
2446
2711
|
background: "Fondo",
|
|
2447
2712
|
surface: "Superficies",
|
|
@@ -2471,6 +2736,7 @@ var es_default = {
|
|
|
2471
2736
|
showCloseAll: "Mostrar \xABContraer todo\xBB",
|
|
2472
2737
|
toggleHelp: "La barra de la zona muestra un solo bot\xF3n: con ambas opciones activadas expande mientras haya alg\xFAn bloque contra\xEDdo y, si no, los contrae todos; con solo una, ofrece \xFAnicamente esa acci\xF3n.",
|
|
2473
2738
|
showRowThumbnails: "Mostrar miniaturas de los bloques en las filas",
|
|
2739
|
+
componentRowThumbnail: "Mostrar miniatura en la fila del editor",
|
|
2474
2740
|
initialState: "Estado inicial de los acordeones",
|
|
2475
2741
|
"states.closed": "Todos cerrados",
|
|
2476
2742
|
"states.open": "Todos abiertos",
|
|
@@ -2478,10 +2744,10 @@ var es_default = {
|
|
|
2478
2744
|
rememberHelp: "Solo los botones expl\xEDcitos de abrir/cerrar todos actualizan la memoria, por usuario y navegador. Abrir un solo bloque no la cambia.",
|
|
2479
2745
|
previewUrl: "URL base de la ruta de vista previa",
|
|
2480
2746
|
previewUrlHelp: "URL completa de la ruta de vista previa de p\xE1gina de su frontend, p. ej. https://site.test/block-preview/page. D\xE9jela vac\xEDa para reutilizar el origen de la Vista previa nativa de Strapi (si est\xE1 configurada para el tipo de contenido) con /block-preview/page. La ruta debe implementar el puente (ver README).",
|
|
2481
|
-
previewUrlEmpty: "No hay URL de vista previa: los editores solo tienen los modos Campos +
|
|
2747
|
+
previewUrlEmpty: "No hay URL de vista previa: los editores solo tienen los modos Campos + vista previa y Editor visual en los tipos de contenido con la vista previa nativa de Strapi configurada. En los dem\xE1s no aparece el men\xFA de modos.",
|
|
2482
2748
|
previewMode: "Modo inicial de la vista previa",
|
|
2483
|
-
"modes.form": "
|
|
2484
|
-
"modes.split": "Campos +
|
|
2749
|
+
"modes.form": "Solo campos",
|
|
2750
|
+
"modes.split": "Campos + vista previa",
|
|
2485
2751
|
"modes.preview": "Editor visual",
|
|
2486
2752
|
previewModeHelp: "Cada vista de edici\xF3n se abre en este modo, salvo que su tipo de contenido defina el suyo abajo. Quien edita puede cambiarlo mientras edita; el cambio no se recuerda.",
|
|
2487
2753
|
lazyEdit: "Haz clic para editar",
|
|
@@ -2489,8 +2755,8 @@ var es_default = {
|
|
|
2489
2755
|
lazyFields: "Campos personalizados cargados bajo demanda",
|
|
2490
2756
|
lazyEditorsHelp: "Los campos personalizados de la lista muestran una vista previa de solo lectura hasta recibir un clic o el foco, para que las p\xE1ginas grandes abran r\xE1pido. Separa los uids con comas.",
|
|
2491
2757
|
lazyFieldsInvalid: "Usa hasta {max} uids de campos personalizados, como plugin::ckeditor5.CKEditor o global::mi-campo.",
|
|
2492
|
-
modeForm: "
|
|
2493
|
-
modeSplit: "Campos +
|
|
2758
|
+
modeForm: "Solo campos",
|
|
2759
|
+
modeSplit: "Campos + vista previa",
|
|
2494
2760
|
modePreview: "Editor visual",
|
|
2495
2761
|
previewPane: "Vista previa de la p\xE1gina",
|
|
2496
2762
|
resize: "Redimensionar el panel de vista previa",
|
|
@@ -2517,6 +2783,7 @@ var es_default = {
|
|
|
2517
2783
|
denied: "Acceso denegado.",
|
|
2518
2784
|
loadFailed: "No se pudieron cargar los ajustes. Recargue para reintentar.",
|
|
2519
2785
|
invalidColor: "Los colores deben usar #RRGGBB.",
|
|
2786
|
+
invalidUrl: "Las URL de vista previa deben ser direcciones HTTP o HTTPS completas.",
|
|
2520
2787
|
previewLabel: "Vista previa de la paleta",
|
|
2521
2788
|
removeGroup: "Eliminar grupo",
|
|
2522
2789
|
diagTitle: "Los grupos de bloques necesitan atenci\xF3n; la publicaci\xF3n se rechaza hasta corregirlos:",
|
|
@@ -2551,6 +2818,7 @@ var es_default = {
|
|
|
2551
2818
|
contentTypes: "Tipos de contenido",
|
|
2552
2819
|
contentTypesHelp: 'La galer\xEDa, los acordeones y la vista previa de p\xE1gina funcionan en estos tipos de contenido (los que tienen una Dynamic Zone). Desactiva uno para dejar su edici\xF3n nativa. "Se abre en" define c\xF3mo empieza cada vista de edici\xF3n de ese tipo; quien edita puede cambiarlo mientras edita.',
|
|
2553
2820
|
typeMode: "Se abre en",
|
|
2821
|
+
typeAdvanced: "Opciones del editor visual",
|
|
2554
2822
|
modeDefault: "Predeterminado ({mode})",
|
|
2555
2823
|
blockModalDone: "Listo",
|
|
2556
2824
|
crashed: "Blockscene se detuvo aqu\xED por un error. El editor nativo no se ve afectado. Si vuelve a pasar, desactiva Blockscene en Settings, Blockscene.",
|
|
@@ -2585,6 +2853,9 @@ var es_default = {
|
|
|
2585
2853
|
unstar: "Quitar de favoritos",
|
|
2586
2854
|
quickInsert: "Insertar {label}",
|
|
2587
2855
|
insert: "Insertar",
|
|
2856
|
+
starterKits: "Comenzar con un kit",
|
|
2857
|
+
starterKitsHelp: "Elige una estructura inicial. Todo se inserta como un borrador editable y sin guardar.",
|
|
2858
|
+
startBlank: "Comenzar en blanco",
|
|
2588
2859
|
closeDetail: "Cerrar detalles",
|
|
2589
2860
|
typology: "Tipolog\xEDa",
|
|
2590
2861
|
typologyAuto: "Autom\xE1tica ({name})",
|
|
@@ -2639,6 +2910,11 @@ var es_default = {
|
|
|
2639
2910
|
confirmDeleteTitle: "Eliminar bloque",
|
|
2640
2911
|
confirmDelete: "\xBFEliminar el bloque {name}?",
|
|
2641
2912
|
confirmDeleteMarker: "Es un marcador de grupo: solo se elimina el marcador, no los bloques del grupo, y el grupo queda desequilibrado hasta corregirlo.",
|
|
2913
|
+
confirmDeleteGroupTitle: "Eliminar grupo",
|
|
2914
|
+
confirmDeleteGroup: "\xBFEliminar el grupo {name}?",
|
|
2915
|
+
confirmDeleteGroupHint: "Este grupo contiene {count, plural, one {# bloque} other {# bloques}}. Elige si eliminarlos o conservarlos en la p\xE1gina sin el grupo.",
|
|
2916
|
+
keepGroupBlocks: "Eliminar grupo y conservar bloques",
|
|
2917
|
+
deleteGroupAndBlocks: "{count, plural, =0 {Eliminar grupo} one {Eliminar grupo y # bloque} other {Eliminar grupo y # bloques}}",
|
|
2642
2918
|
delete: "Eliminar",
|
|
2643
2919
|
selectBlocks: "Seleccionar bloques",
|
|
2644
2920
|
selectAll: "Seleccionar todos",
|
|
@@ -2833,6 +3109,7 @@ var es_default = {
|
|
|
2833
3109
|
gridCellMenu: "M\xE1s acciones para {label}",
|
|
2834
3110
|
removeFromGroup: "Quitar del grupo",
|
|
2835
3111
|
gridAdd: "A\xF1adir un bloque",
|
|
3112
|
+
groupAdd: "A\xF1adir un bloque dentro de {label}",
|
|
2836
3113
|
gridShowList: "Mostrar el grupo {label} como lista",
|
|
2837
3114
|
gridShowGrid: "Mostrar el grupo {label} como cuadr\xEDcula",
|
|
2838
3115
|
layoutColumnsField: "Cuadr\xEDcula de dise\xF1o: campo de columnas",
|
|
@@ -2841,13 +3118,29 @@ var es_default = {
|
|
|
2841
3118
|
layoutOff: "Sin cuadr\xEDcula",
|
|
2842
3119
|
layoutNoMobile: "Ninguno",
|
|
2843
3120
|
layoutHelp: "Los bloques del grupo se muestran en cuadr\xEDcula en el formulario, con el n\xFAmero de columnas de este bloque.",
|
|
2844
|
-
layoutNoFields: "Este bloque no tiene ning\xFAn campo que pueda guardar un n\xFAmero de columnas."
|
|
3121
|
+
layoutNoFields: "Este bloque no tiene ning\xFAn campo que pueda guardar un n\xFAmero de columnas.",
|
|
3122
|
+
"toolbar.versions": "Historial de versiones",
|
|
3123
|
+
versionsDenied: "Pide a un administrador el permiso Leer historial de versiones de Blockscene.",
|
|
3124
|
+
versionsDisabled: "El historial no est\xE1 activo para este tipo de contenido. Pide a un administrador que lo active en Settings > Blockscene (settings.history.enabled).",
|
|
3125
|
+
versionsNew: "Guarda primero este contenido para iniciar su historial.",
|
|
3126
|
+
versionsPerson: "Filtrar por persona",
|
|
3127
|
+
versionsEveryone: "Todas las personas",
|
|
3128
|
+
versionsCounts: "{total} bloques",
|
|
3129
|
+
versionsCountsMissing: "Recuento de bloques no disponible (evento antiguo o no registrado).",
|
|
3130
|
+
versionsPage: "P\xE1gina {page} de {count}",
|
|
3131
|
+
versionsPrevious: "Anterior",
|
|
3132
|
+
versionsNext: "Siguiente",
|
|
3133
|
+
versionsViewing: "Viendo la versi\xF3n del {date} por {person} (solo lectura).",
|
|
3134
|
+
versionsCurrent: "Volver al borrador actual",
|
|
3135
|
+
versionsMissing: "Algunos bloques, campos, archivos o relaciones ya no est\xE1n disponibles en esta vista previa.",
|
|
3136
|
+
versionsBridgeLegacy: "Esta bridge no admite navegaci\xF3n de solo lectura. La interacci\xF3n est\xE1 desactivada; actualiza la bridge para admitir readOnly.",
|
|
3137
|
+
historyExpired: "Snapshot ya no disponible"
|
|
2845
3138
|
};
|
|
2846
3139
|
|
|
2847
3140
|
// admin/translations/de.json
|
|
2848
3141
|
var de_default = {
|
|
2849
3142
|
title: "Blockscene",
|
|
2850
|
-
settings: "
|
|
3143
|
+
settings: "Allgemein",
|
|
2851
3144
|
gallery: "Blockgalerie",
|
|
2852
3145
|
search: "Bl\xF6cke suchen",
|
|
2853
3146
|
clear: "Suche l\xF6schen",
|
|
@@ -2863,6 +3156,17 @@ var de_default = {
|
|
|
2863
3156
|
moreActions: "Weitere Aktionen",
|
|
2864
3157
|
settingsTitle: "Blockscene",
|
|
2865
3158
|
settingsIntro: "Galerie-Vorschaubilder, Wireframe-Palette und Editor-Einstellungen. \xC4nderungen gelten beim n\xE4chsten \xD6ffnen der Galerie; kein Rebuild n\xF6tig.",
|
|
3159
|
+
settingsGeneral: "Allgemein",
|
|
3160
|
+
settingsGeneralIntro: "Lege fest, wie Blockscene im Editor arbeitet und welche Zeilenaktionen verf\xFCgbar sind.",
|
|
3161
|
+
settingsPreview: "Seitenvorschau",
|
|
3162
|
+
settingsPreviewIntro: "Verbinde die Frontend-Vorschau und konfiguriere Modi, Werkzeugleiste und responsive Breiten.",
|
|
3163
|
+
settingsContentTypes: "Inhaltstypen",
|
|
3164
|
+
settingsContentTypesIntro: "W\xE4hle, wo Blockscene aktiv ist, und passe den visuellen Editor je Inhaltstyp an.",
|
|
3165
|
+
settingsGallery: "Blockgalerie",
|
|
3166
|
+
settingsGalleryIntro: "Konfiguriere Vorschaubilder, Wireframe-Farben, Blocktypen und Filter.",
|
|
3167
|
+
settingsHistory: "Verlauf und Papierkorb",
|
|
3168
|
+
settingsHistoryIntro: "Steuere Versionen, Aufbewahrung von Aktivit\xE4ten und wiederherstellbare L\xF6schungen.",
|
|
3169
|
+
historyUnavailable: "Verlauf und Papierkorb erfordern Strapi 5.",
|
|
2866
3170
|
palette: "Wireframe-Palette",
|
|
2867
3171
|
background: "Hintergrund",
|
|
2868
3172
|
surface: "Fl\xE4chen",
|
|
@@ -2892,6 +3196,7 @@ var de_default = {
|
|
|
2892
3196
|
showCloseAll: "\u201EAlle zuklappen\u201C anzeigen",
|
|
2893
3197
|
toggleHelp: "Die Zonenleiste zeigt einen einzigen Button: Sind beide Optionen an, klappt er auf, solange ein Block zugeklappt ist, sonst klappt er alle zu; ist nur eine an, bietet er nur diese Aktion.",
|
|
2894
3198
|
showRowThumbnails: "Blockvorschaubilder in den Zeilen anzeigen",
|
|
3199
|
+
componentRowThumbnail: "Vorschaubild in der Editorzeile anzeigen",
|
|
2895
3200
|
initialState: "Anfangszustand der Akkordeons",
|
|
2896
3201
|
"states.closed": "Alle geschlossen",
|
|
2897
3202
|
"states.open": "Alle ge\xF6ffnet",
|
|
@@ -2899,10 +3204,10 @@ var de_default = {
|
|
|
2899
3204
|
rememberHelp: "Nur die expliziten Schaltfl\xE4chen \u201Ealle \xF6ffnen/schlie\xDFen\u201C aktualisieren die Erinnerung, pro Benutzer und Browser. Das \xD6ffnen eines einzelnen Blocks \xE4ndert nichts.",
|
|
2900
3205
|
previewUrl: "Basis-URL der Vorschauroute",
|
|
2901
3206
|
previewUrlHelp: "Vollst\xE4ndige URL der Seitenvorschau-Route Ihres Frontends, z. B. https://site.test/block-preview/page. Leer lassen, um den Ursprung der nativen Strapi-Vorschau (wenn f\xFCr den Inhaltstyp konfiguriert) mit /block-preview/page zu verwenden. Die Route muss die Bridge implementieren (siehe README).",
|
|
2902
|
-
previewUrlEmpty: "Keine Vorschau-URL gesetzt: Redakteure erhalten die Modi Felder +
|
|
3207
|
+
previewUrlEmpty: "Keine Vorschau-URL gesetzt: Redakteure erhalten die Modi Felder + Vorschau und Visueller Editor nur bei Inhaltstypen, f\xFCr die Strapis native Vorschau konfiguriert ist. Sonst wird das Modusmen\xFC nicht angezeigt.",
|
|
2903
3208
|
previewMode: "Anf\xE4nglicher Vorschaumodus",
|
|
2904
|
-
"modes.form": "Felder",
|
|
2905
|
-
"modes.split": "Felder +
|
|
3209
|
+
"modes.form": "Nur Felder",
|
|
3210
|
+
"modes.split": "Felder + Vorschau",
|
|
2906
3211
|
"modes.preview": "Visueller Editor",
|
|
2907
3212
|
previewModeHelp: "Jede Bearbeitungsansicht \xF6ffnet in diesem Modus, au\xDFer ihr Inhaltstyp legt unten einen eigenen fest. Beim Bearbeiten l\xE4sst sich wechseln; der Wechsel wird nicht gespeichert.",
|
|
2908
3213
|
lazyEdit: "Zum Bearbeiten klicken",
|
|
@@ -2910,8 +3215,8 @@ var de_default = {
|
|
|
2910
3215
|
lazyFields: "Bei Bedarf geladene benutzerdefinierte Felder",
|
|
2911
3216
|
lazyEditorsHelp: "Die aufgef\xFChrten benutzerdefinierten Felder zeigen eine schreibgesch\xFCtzte Vorschau, bis sie angeklickt oder fokussiert werden, damit gro\xDFe Seiten schnell \xF6ffnen. Uids durch Kommas trennen.",
|
|
2912
3217
|
lazyFieldsInvalid: "Bis zu {max} Uids benutzerdefinierter Felder verwenden, z. B. plugin::ckeditor5.CKEditor oder global::mein-feld.",
|
|
2913
|
-
modeForm: "Felder",
|
|
2914
|
-
modeSplit: "Felder +
|
|
3218
|
+
modeForm: "Nur Felder",
|
|
3219
|
+
modeSplit: "Felder + Vorschau",
|
|
2915
3220
|
modePreview: "Visueller Editor",
|
|
2916
3221
|
previewPane: "Seitenvorschau",
|
|
2917
3222
|
resize: "Vorschaubereich anpassen",
|
|
@@ -2938,6 +3243,7 @@ var de_default = {
|
|
|
2938
3243
|
denied: "Zugriff verweigert.",
|
|
2939
3244
|
loadFailed: "Einstellungen konnten nicht geladen werden. Neu laden, um es erneut zu versuchen.",
|
|
2940
3245
|
invalidColor: "Farben m\xFCssen #RRGGBB verwenden.",
|
|
3246
|
+
invalidUrl: "Vorschau-URLs m\xFCssen vollst\xE4ndige HTTP- oder HTTPS-Adressen sein.",
|
|
2941
3247
|
previewLabel: "Palettenvorschau",
|
|
2942
3248
|
removeGroup: "Gruppe entfernen",
|
|
2943
3249
|
diagTitle: "Blockgruppen m\xFCssen korrigiert werden; das Ver\xF6ffentlichen wird bis dahin abgelehnt:",
|
|
@@ -2972,6 +3278,7 @@ var de_default = {
|
|
|
2972
3278
|
contentTypes: "Inhaltstypen",
|
|
2973
3279
|
contentTypesHelp: "Galerie, Akkordeons und Seitenvorschau arbeiten auf diesen Inhaltstypen (denen mit einer Dynamic Zone). Schalte einen aus, um seine Bearbeitung nativ zu lassen. \u201E\xD6ffnet in\u201C bestimmt, wie jede Bearbeitungsansicht dieses Typs startet; beim Bearbeiten l\xE4sst sich weiter wechseln.",
|
|
2974
3280
|
typeMode: "\xD6ffnet in",
|
|
3281
|
+
typeAdvanced: "Optionen des visuellen Editors",
|
|
2975
3282
|
modeDefault: "Standard ({mode})",
|
|
2976
3283
|
blockModalDone: "Fertig",
|
|
2977
3284
|
crashed: "Blockscene wurde hier wegen eines Fehlers beendet. Der native Editor ist nicht betroffen. Passiert es erneut, schalte Blockscene unter Settings, Blockscene aus.",
|
|
@@ -3006,6 +3313,9 @@ var de_default = {
|
|
|
3006
3313
|
unstar: "Aus Favoriten entfernen",
|
|
3007
3314
|
quickInsert: "{label} einf\xFCgen",
|
|
3008
3315
|
insert: "Einf\xFCgen",
|
|
3316
|
+
starterKits: "Mit einem Kit starten",
|
|
3317
|
+
starterKitsHelp: "W\xE4hlen Sie eine Ausgangsstruktur. Alles wird als ungespeicherter, bearbeitbarer Entwurf eingef\xFCgt.",
|
|
3318
|
+
startBlank: "Leer beginnen",
|
|
3009
3319
|
closeDetail: "Details schlie\xDFen",
|
|
3010
3320
|
typology: "Typologie",
|
|
3011
3321
|
typologyAuto: "Automatisch ({name})",
|
|
@@ -3060,6 +3370,11 @@ var de_default = {
|
|
|
3060
3370
|
confirmDeleteTitle: "Block l\xF6schen",
|
|
3061
3371
|
confirmDelete: "Block {name} l\xF6schen?",
|
|
3062
3372
|
confirmDeleteMarker: "Dies ist eine Gruppenmarkierung: Nur die Markierung wird entfernt, nicht die Bl\xF6cke der Gruppe, und die Gruppe bleibt unausgeglichen, bis sie korrigiert ist.",
|
|
3373
|
+
confirmDeleteGroupTitle: "Gruppe l\xF6schen",
|
|
3374
|
+
confirmDeleteGroup: "Gruppe {name} l\xF6schen?",
|
|
3375
|
+
confirmDeleteGroupHint: "Diese Gruppe enth\xE4lt {count, plural, one {# Block} other {# Bl\xF6cke}}. L\xF6schen Sie sie oder behalten Sie sie ohne die Gruppe auf der Seite.",
|
|
3376
|
+
keepGroupBlocks: "Gruppe entfernen, Bl\xF6cke behalten",
|
|
3377
|
+
deleteGroupAndBlocks: "{count, plural, =0 {Gruppe l\xF6schen} one {Gruppe und # Block l\xF6schen} other {Gruppe und # Bl\xF6cke l\xF6schen}}",
|
|
3063
3378
|
delete: "L\xF6schen",
|
|
3064
3379
|
selectBlocks: "Bl\xF6cke ausw\xE4hlen",
|
|
3065
3380
|
selectAll: "Alle ausw\xE4hlen",
|
|
@@ -3254,6 +3569,7 @@ var de_default = {
|
|
|
3254
3569
|
gridCellMenu: "Weitere Aktionen f\xFCr {label}",
|
|
3255
3570
|
removeFromGroup: "Aus der Gruppe entfernen",
|
|
3256
3571
|
gridAdd: "Block hinzuf\xFCgen",
|
|
3572
|
+
groupAdd: "Block in {label} hinzuf\xFCgen",
|
|
3257
3573
|
gridShowList: "Gruppe {label} als Liste anzeigen",
|
|
3258
3574
|
gridShowGrid: "Gruppe {label} als Raster anzeigen",
|
|
3259
3575
|
layoutColumnsField: "Layout-Raster: Feld der Spalten",
|
|
@@ -3262,13 +3578,29 @@ var de_default = {
|
|
|
3262
3578
|
layoutOff: "Kein Raster",
|
|
3263
3579
|
layoutNoMobile: "Keines",
|
|
3264
3580
|
layoutHelp: "Die Bl\xF6cke der Gruppe erscheinen im Formular als Raster, mit der Spaltenzahl dieses Blocks.",
|
|
3265
|
-
layoutNoFields: "Dieser Block hat kein Feld, das eine Spaltenzahl enthalten kann."
|
|
3581
|
+
layoutNoFields: "Dieser Block hat kein Feld, das eine Spaltenzahl enthalten kann.",
|
|
3582
|
+
"toolbar.versions": "Versionsverlauf",
|
|
3583
|
+
versionsDenied: "Bitte einen Administrator um die Blockscene-Berechtigung zum Lesen des Versionsverlaufs.",
|
|
3584
|
+
versionsDisabled: "Der Verlauf ist f\xFCr diesen Inhaltstyp nicht aktiviert. Bitte einen Administrator, ihn unter Settings > Blockscene zu aktivieren (settings.history.enabled).",
|
|
3585
|
+
versionsNew: "Speichere diesen Eintrag zuerst, um seinen Verlauf zu beginnen.",
|
|
3586
|
+
versionsPerson: "Nach Person filtern",
|
|
3587
|
+
versionsEveryone: "Alle Personen",
|
|
3588
|
+
versionsCounts: "{total} Bl\xF6cke",
|
|
3589
|
+
versionsCountsMissing: "Blockanzahl nicht verf\xFCgbar (\xE4lteres oder nicht aufgezeichnetes Ereignis).",
|
|
3590
|
+
versionsPage: "Seite {page} von {count}",
|
|
3591
|
+
versionsPrevious: "Zur\xFCck",
|
|
3592
|
+
versionsNext: "Weiter",
|
|
3593
|
+
versionsViewing: "Version vom {date} von {person} (schreibgesch\xFCtzt).",
|
|
3594
|
+
versionsCurrent: "Zur\xFCck zum aktuellen Entwurf",
|
|
3595
|
+
versionsMissing: "Einige Bl\xF6cke, Felder, Medien oder Beziehungen sind in dieser Vorschau nicht mehr verf\xFCgbar.",
|
|
3596
|
+
versionsBridgeLegacy: "Diese Bridge unterst\xFCtzt keine schreibgesch\xFCtzte Navigation. Interaktion ist deaktiviert; aktualisiere die Bridge f\xFCr readOnly.",
|
|
3597
|
+
historyExpired: "Snapshot nicht mehr verf\xFCgbar"
|
|
3266
3598
|
};
|
|
3267
3599
|
|
|
3268
3600
|
// admin/translations/it.json
|
|
3269
3601
|
var it_default = {
|
|
3270
3602
|
title: "Blockscene",
|
|
3271
|
-
settings: "
|
|
3603
|
+
settings: "Generali",
|
|
3272
3604
|
gallery: "Galleria dei blocchi",
|
|
3273
3605
|
search: "Cerca blocchi",
|
|
3274
3606
|
clear: "Cancella ricerca",
|
|
@@ -3284,6 +3616,17 @@ var it_default = {
|
|
|
3284
3616
|
moreActions: "Altre azioni",
|
|
3285
3617
|
settingsTitle: "Blockscene",
|
|
3286
3618
|
settingsIntro: "Miniature della galleria, palette dei wireframe e preferenze dell'editor. Le modifiche valgono alla prossima apertura della galleria; non serve alcun rebuild.",
|
|
3619
|
+
settingsGeneral: "Generali",
|
|
3620
|
+
settingsGeneralIntro: "Configura il comportamento di Blockscene nell'editor e le azioni disponibili sulle righe.",
|
|
3621
|
+
settingsPreview: "Anteprima pagina",
|
|
3622
|
+
settingsPreviewIntro: "Collega l'anteprima del frontend e configura modalit\xE0, barra degli strumenti e larghezze responsive.",
|
|
3623
|
+
settingsContentTypes: "Tipi di contenuto",
|
|
3624
|
+
settingsContentTypesIntro: "Scegli dove attivare Blockscene e personalizza l'editor visivo per ogni tipo di contenuto.",
|
|
3625
|
+
settingsGallery: "Galleria dei blocchi",
|
|
3626
|
+
settingsGalleryIntro: "Configura miniature, colori dei wireframe, tipi e filtri della galleria.",
|
|
3627
|
+
settingsHistory: "Cronologia e cestino",
|
|
3628
|
+
settingsHistoryIntro: "Gestisci versioni, conservazione delle attivit\xE0 ed eliminazioni recuperabili.",
|
|
3629
|
+
historyUnavailable: "Le impostazioni di cronologia e cestino richiedono Strapi 5.",
|
|
3287
3630
|
palette: "Palette dei wireframe",
|
|
3288
3631
|
background: "Sfondo",
|
|
3289
3632
|
surface: "Superfici",
|
|
@@ -3313,6 +3656,7 @@ var it_default = {
|
|
|
3313
3656
|
showCloseAll: 'Mostra "Comprimi tutto"',
|
|
3314
3657
|
toggleHelp: "La barra della zona mostra un solo pulsante: con entrambe le opzioni attive espande finch\xE9 c'\xE8 un blocco compresso, altrimenti li comprime tutti; con una sola, offre solo quell'azione.",
|
|
3315
3658
|
showRowThumbnails: "Mostra le miniature dei blocchi nelle righe",
|
|
3659
|
+
componentRowThumbnail: "Mostra la miniatura nella riga dell'editor",
|
|
3316
3660
|
initialState: "Stato iniziale delle fisarmoniche",
|
|
3317
3661
|
"states.closed": "Tutte chiuse",
|
|
3318
3662
|
"states.open": "Tutte aperte",
|
|
@@ -3320,10 +3664,10 @@ var it_default = {
|
|
|
3320
3664
|
rememberHelp: "Solo i pulsanti espliciti apri tutti / chiudi tutti aggiornano la memoria, per utente e browser. Aprire un singolo blocco non la cambia.",
|
|
3321
3665
|
previewUrl: "URL di base della route di anteprima",
|
|
3322
3666
|
previewUrlHelp: "URL completo della route di anteprima pagina del tuo frontend, ad es. https://site.test/block-preview/page. Lascia vuoto per riutilizzare l'origine dell'Anteprima nativa di Strapi (se configurata per il tipo di contenuto) con /block-preview/page. La route deve implementare il bridge (vedi README).",
|
|
3323
|
-
previewUrlEmpty: "Nessun URL di anteprima impostato: gli editor hanno le modalit\xE0 Campi +
|
|
3667
|
+
previewUrlEmpty: "Nessun URL di anteprima impostato: gli editor hanno le modalit\xE0 Campi + anteprima ed Editor visivo solo sui tipi di contenuto con l'anteprima nativa di Strapi configurata. Altrove il menu delle modalit\xE0 non compare.",
|
|
3324
3668
|
previewMode: "Modalit\xE0 iniziale dell'anteprima",
|
|
3325
|
-
"modes.form": "
|
|
3326
|
-
"modes.split": "Campi +
|
|
3669
|
+
"modes.form": "Solo campi",
|
|
3670
|
+
"modes.split": "Campi + anteprima",
|
|
3327
3671
|
"modes.preview": "Editor visivo",
|
|
3328
3672
|
previewModeHelp: "Ogni vista di modifica si apre in questo modo, a meno che il suo tipo di contenuto ne imposti uno proprio qui sotto. Durante la modifica si pu\xF2 cambiare; la scelta non viene ricordata.",
|
|
3329
3673
|
lazyEdit: "Fai clic per modificare",
|
|
@@ -3331,8 +3675,8 @@ var it_default = {
|
|
|
3331
3675
|
lazyFields: "Campi personalizzati caricati su richiesta",
|
|
3332
3676
|
lazyEditorsHelp: "I campi personalizzati elencati mostrano un'anteprima di sola lettura finch\xE9 non ricevono un clic o il focus, cos\xEC le pagine grandi si aprono in fretta. Separa gli uid con virgole.",
|
|
3333
3677
|
lazyFieldsInvalid: "Usa fino a {max} uid di campi personalizzati, come plugin::ckeditor5.CKEditor o global::mio-campo.",
|
|
3334
|
-
modeForm: "
|
|
3335
|
-
modeSplit: "Campi +
|
|
3678
|
+
modeForm: "Solo campi",
|
|
3679
|
+
modeSplit: "Campi + anteprima",
|
|
3336
3680
|
modePreview: "Editor visivo",
|
|
3337
3681
|
previewPane: "Anteprima della pagina",
|
|
3338
3682
|
resize: "Ridimensiona il pannello di anteprima",
|
|
@@ -3359,6 +3703,7 @@ var it_default = {
|
|
|
3359
3703
|
denied: "Accesso negato.",
|
|
3360
3704
|
loadFailed: "Impossibile caricare le impostazioni. Ricarica per riprovare.",
|
|
3361
3705
|
invalidColor: "I colori devono usare #RRGGBB.",
|
|
3706
|
+
invalidUrl: "Gli URL di anteprima devono essere indirizzi HTTP o HTTPS completi.",
|
|
3362
3707
|
previewLabel: "Anteprima della palette",
|
|
3363
3708
|
removeGroup: "Rimuovi gruppo",
|
|
3364
3709
|
diagTitle: "I gruppi di blocchi richiedono attenzione; la pubblicazione \xE8 rifiutata finch\xE9 non vengono corretti:",
|
|
@@ -3393,6 +3738,7 @@ var it_default = {
|
|
|
3393
3738
|
contentTypes: "Tipi di contenuto",
|
|
3394
3739
|
contentTypesHelp: "La galleria, le fisarmoniche e l'anteprima di pagina funzionano su questi tipi di contenuto (quelli con una Dynamic Zone). Disattivane uno per lasciarne la modifica nativa. \xABSi apre in\xBB \xE8 il modo in cui parte ogni vista di modifica di quel tipo; durante la modifica si pu\xF2 sempre cambiare.",
|
|
3395
3740
|
typeMode: "Si apre in",
|
|
3741
|
+
typeAdvanced: "Opzioni dell'editor visivo",
|
|
3396
3742
|
modeDefault: "Predefinito ({mode})",
|
|
3397
3743
|
blockModalDone: "Fatto",
|
|
3398
3744
|
crashed: "Blockscene si \xE8 fermato qui a causa di un errore. L'editor nativo non \xE8 toccato. Se succede di nuovo, disattiva Blockscene in Settings, Blockscene.",
|
|
@@ -3427,6 +3773,9 @@ var it_default = {
|
|
|
3427
3773
|
unstar: "Rimuovi dai preferiti",
|
|
3428
3774
|
quickInsert: "Inserisci {label}",
|
|
3429
3775
|
insert: "Inserisci",
|
|
3776
|
+
starterKits: "Inizia con un kit",
|
|
3777
|
+
starterKitsHelp: "Scegli una struttura iniziale. Tutto viene inserito come bozza modificabile e non salvata.",
|
|
3778
|
+
startBlank: "Inizia da zero",
|
|
3430
3779
|
closeDetail: "Chiudi dettagli",
|
|
3431
3780
|
typology: "Tipologia",
|
|
3432
3781
|
typologyAuto: "Automatica ({name})",
|
|
@@ -3481,6 +3830,11 @@ var it_default = {
|
|
|
3481
3830
|
confirmDeleteTitle: "Elimina blocco",
|
|
3482
3831
|
confirmDelete: "Eliminare il blocco {name}?",
|
|
3483
3832
|
confirmDeleteMarker: "\xC8 un marcatore di gruppo: viene rimosso solo il marcatore, non i blocchi del gruppo, e il gruppo resta sbilanciato finch\xE9 non viene corretto.",
|
|
3833
|
+
confirmDeleteGroupTitle: "Elimina gruppo",
|
|
3834
|
+
confirmDeleteGroup: "Eliminare il gruppo {name}?",
|
|
3835
|
+
confirmDeleteGroupHint: "Questo gruppo contiene {count, plural, one {# blocco} other {# blocchi}}. Scegli se eliminarli o mantenerli nella pagina senza il gruppo.",
|
|
3836
|
+
keepGroupBlocks: "Rimuovi il gruppo, mantieni i blocchi",
|
|
3837
|
+
deleteGroupAndBlocks: "{count, plural, =0 {Elimina gruppo} one {Elimina gruppo e # blocco} other {Elimina gruppo e # blocchi}}",
|
|
3484
3838
|
delete: "Elimina",
|
|
3485
3839
|
selectBlocks: "Seleziona blocchi",
|
|
3486
3840
|
selectAll: "Seleziona tutti",
|
|
@@ -3675,6 +4029,7 @@ var it_default = {
|
|
|
3675
4029
|
gridCellMenu: "Altre azioni per {label}",
|
|
3676
4030
|
removeFromGroup: "Rimuovi dal gruppo",
|
|
3677
4031
|
gridAdd: "Aggiungi un blocco",
|
|
4032
|
+
groupAdd: "Aggiungi un blocco dentro {label}",
|
|
3678
4033
|
gridShowList: "Mostra il gruppo {label} come elenco",
|
|
3679
4034
|
gridShowGrid: "Mostra il gruppo {label} come griglia",
|
|
3680
4035
|
layoutColumnsField: "Griglia di layout: campo delle colonne",
|
|
@@ -3683,13 +4038,29 @@ var it_default = {
|
|
|
3683
4038
|
layoutOff: "Nessuna griglia",
|
|
3684
4039
|
layoutNoMobile: "Nessuno",
|
|
3685
4040
|
layoutHelp: "I blocchi del gruppo appaiono in griglia nel modulo, con il numero di colonne di questo blocco.",
|
|
3686
|
-
layoutNoFields: "Questo blocco non ha un campo che possa contenere un numero di colonne."
|
|
4041
|
+
layoutNoFields: "Questo blocco non ha un campo che possa contenere un numero di colonne.",
|
|
4042
|
+
"toolbar.versions": "Cronologia delle versioni",
|
|
4043
|
+
versionsDenied: "Chiedi a un amministratore il permesso Leggere la cronologia delle versioni di Blockscene.",
|
|
4044
|
+
versionsDisabled: "La cronologia non \xE8 attiva per questo tipo di contenuto. Chiedi a un amministratore di attivarla in Settings > Blockscene (settings.history.enabled).",
|
|
4045
|
+
versionsNew: "Salva prima questo contenuto per avviare la cronologia.",
|
|
4046
|
+
versionsPerson: "Filtra per persona",
|
|
4047
|
+
versionsEveryone: "Tutte le persone",
|
|
4048
|
+
versionsCounts: "{total} blocchi",
|
|
4049
|
+
versionsCountsMissing: "Conteggio dei blocchi non disponibile (evento vecchio o non registrato).",
|
|
4050
|
+
versionsPage: "Pagina {page} di {count}",
|
|
4051
|
+
versionsPrevious: "Precedente",
|
|
4052
|
+
versionsNext: "Successiva",
|
|
4053
|
+
versionsViewing: "Versione del {date} di {person} (sola lettura).",
|
|
4054
|
+
versionsCurrent: "Torna alla bozza attuale",
|
|
4055
|
+
versionsMissing: "Alcuni blocchi, campi, media o relazioni non sono pi\xF9 disponibili in questa anteprima.",
|
|
4056
|
+
versionsBridgeLegacy: "Questa bridge non supporta la navigazione in sola lettura. Interazione disattivata; aggiorna la bridge per supportare readOnly.",
|
|
4057
|
+
historyExpired: "Snapshot non pi\xF9 disponibile"
|
|
3687
4058
|
};
|
|
3688
4059
|
|
|
3689
4060
|
// admin/translations/nl.json
|
|
3690
4061
|
var nl_default = {
|
|
3691
4062
|
title: "Blockscene",
|
|
3692
|
-
settings: "
|
|
4063
|
+
settings: "Algemeen",
|
|
3693
4064
|
gallery: "Blokkengalerij",
|
|
3694
4065
|
search: "Blokken zoeken",
|
|
3695
4066
|
clear: "Zoekopdracht wissen",
|
|
@@ -3705,6 +4076,17 @@ var nl_default = {
|
|
|
3705
4076
|
moreActions: "Meer acties",
|
|
3706
4077
|
settingsTitle: "Blockscene",
|
|
3707
4078
|
settingsIntro: "Galerijminiaturen, wireframe-palet en editorvoorkeuren. Wijzigingen gelden bij de volgende opening van de galerij; geen rebuild nodig.",
|
|
4079
|
+
settingsGeneral: "Algemeen",
|
|
4080
|
+
settingsGeneralIntro: "Bepaal hoe Blockscene in de editor werkt en welke rijacties beschikbaar zijn.",
|
|
4081
|
+
settingsPreview: "Paginavoorbeeld",
|
|
4082
|
+
settingsPreviewIntro: "Koppel het frontendvoorbeeld en configureer modi, werkbalk en responsieve breedtes.",
|
|
4083
|
+
settingsContentTypes: "Contenttypes",
|
|
4084
|
+
settingsContentTypesIntro: "Kies waar Blockscene actief is en pas de visuele editor per contenttype aan.",
|
|
4085
|
+
settingsGallery: "Blokkengalerij",
|
|
4086
|
+
settingsGalleryIntro: "Configureer miniaturen, wireframekleuren, bloktypen en filters.",
|
|
4087
|
+
settingsHistory: "Geschiedenis en prullenbak",
|
|
4088
|
+
settingsHistoryIntro: "Beheer versies, activiteitsbewaring en herstelbare verwijderingen.",
|
|
4089
|
+
historyUnavailable: "Instellingen voor geschiedenis en prullenbak vereisen Strapi 5.",
|
|
3708
4090
|
palette: "Wireframe-palet",
|
|
3709
4091
|
background: "Achtergrond",
|
|
3710
4092
|
surface: "Vlakken",
|
|
@@ -3734,6 +4116,7 @@ var nl_default = {
|
|
|
3734
4116
|
showCloseAll: '"Alles inklappen" tonen',
|
|
3735
4117
|
toggleHelp: "De zonebalk toont \xE9\xE9n knop: staan beide opties aan, dan klapt hij uit zolang er een blok ingeklapt is en klapt hij anders alles in; staat er maar \xE9\xE9n aan, dan biedt hij alleen die actie.",
|
|
3736
4118
|
showRowThumbnails: "Blokminiaturen in de rijen tonen",
|
|
4119
|
+
componentRowThumbnail: "Miniatuur in de editorrij tonen",
|
|
3737
4120
|
initialState: "Beginstand van de accordeons",
|
|
3738
4121
|
"states.closed": "Alle gesloten",
|
|
3739
4122
|
"states.open": "Alle open",
|
|
@@ -3741,10 +4124,10 @@ var nl_default = {
|
|
|
3741
4124
|
rememberHelp: "Alleen de expliciete knoppen alles openen / alles sluiten werken het geheugen bij, per gebruiker en browser. E\xE9n blok openen verandert niets.",
|
|
3742
4125
|
previewUrl: "Basis-URL van de voorbeeldroute",
|
|
3743
4126
|
previewUrlHelp: "Volledige URL van de paginavoorbeeldroute van uw frontend, bijv. https://site.test/block-preview/page. Laat leeg om de oorsprong van Strapi's native Preview (indien geconfigureerd voor het contenttype) met /block-preview/page te hergebruiken. De route moet de bridge implementeren (zie README).",
|
|
3744
|
-
previewUrlEmpty: "Geen preview-URL ingesteld: redacteuren krijgen de modi Velden +
|
|
4127
|
+
previewUrlEmpty: "Geen preview-URL ingesteld: redacteuren krijgen de modi Velden + voorbeeld en Visuele editor alleen bij inhoudstypes waarvoor de native Preview van Strapi is ingesteld. Elders verschijnt het modusmenu niet.",
|
|
3745
4128
|
previewMode: "Beginmodus van het voorbeeld",
|
|
3746
|
-
"modes.form": "
|
|
3747
|
-
"modes.split": "Velden +
|
|
4129
|
+
"modes.form": "Alleen velden",
|
|
4130
|
+
"modes.split": "Velden + voorbeeld",
|
|
3748
4131
|
"modes.preview": "Visuele editor",
|
|
3749
4132
|
previewModeHelp: "Elke bewerkweergave opent in deze modus, tenzij het contenttype hieronder een eigen modus instelt. Tijdens het bewerken kan je wisselen; die keuze wordt niet onthouden.",
|
|
3750
4133
|
lazyEdit: "Klik om te bewerken",
|
|
@@ -3752,8 +4135,8 @@ var nl_default = {
|
|
|
3752
4135
|
lazyFields: "Aangepaste velden die op aanvraag laden",
|
|
3753
4136
|
lazyEditorsHelp: "De vermelde aangepaste velden tonen een alleen-lezen voorbeeld tot ze worden aangeklikt of focus krijgen, zodat grote pagina's snel openen. Scheid uids met komma's.",
|
|
3754
4137
|
lazyFieldsInvalid: "Gebruik maximaal {max} uids van aangepaste velden, zoals plugin::ckeditor5.CKEditor of global::mijn-veld.",
|
|
3755
|
-
modeForm: "
|
|
3756
|
-
modeSplit: "Velden +
|
|
4138
|
+
modeForm: "Alleen velden",
|
|
4139
|
+
modeSplit: "Velden + voorbeeld",
|
|
3757
4140
|
modePreview: "Visuele editor",
|
|
3758
4141
|
previewPane: "Paginavoorbeeld",
|
|
3759
4142
|
resize: "Voorbeeldpaneel aanpassen",
|
|
@@ -3780,6 +4163,7 @@ var nl_default = {
|
|
|
3780
4163
|
denied: "Toegang geweigerd.",
|
|
3781
4164
|
loadFailed: "Instellingen konden niet worden geladen. Herlaad om opnieuw te proberen.",
|
|
3782
4165
|
invalidColor: "Kleuren moeten #RRGGBB gebruiken.",
|
|
4166
|
+
invalidUrl: "Voorbeeld-URL's moeten volledige HTTP- of HTTPS-adressen zijn.",
|
|
3783
4167
|
previewLabel: "Paletvoorbeeld",
|
|
3784
4168
|
removeGroup: "Groep verwijderen",
|
|
3785
4169
|
diagTitle: "Blokgroepen vragen aandacht; publiceren wordt geweigerd tot ze hersteld zijn:",
|
|
@@ -3814,6 +4198,7 @@ var nl_default = {
|
|
|
3814
4198
|
contentTypes: "Contenttypes",
|
|
3815
4199
|
contentTypesHelp: 'De galerij, accordeons en paginavoorbeeld werken op deze contenttypes (die met een Dynamic Zone). Zet er een uit om de bewerking native te laten. "Opent in" bepaalt hoe elke bewerkweergave van dat type start; tijdens het bewerken kan je nog wisselen.',
|
|
3816
4200
|
typeMode: "Opent in",
|
|
4201
|
+
typeAdvanced: "Opties voor de visuele editor",
|
|
3817
4202
|
modeDefault: "Standaard ({mode})",
|
|
3818
4203
|
blockModalDone: "Klaar",
|
|
3819
4204
|
crashed: "Blockscene is hier gestopt door een fout. De native editor blijft werken. Gebeurt het opnieuw, zet Blockscene uit in Settings, Blockscene.",
|
|
@@ -3848,6 +4233,9 @@ var nl_default = {
|
|
|
3848
4233
|
unstar: "Uit favorieten verwijderen",
|
|
3849
4234
|
quickInsert: "{label} invoegen",
|
|
3850
4235
|
insert: "Invoegen",
|
|
4236
|
+
starterKits: "Start met een kit",
|
|
4237
|
+
starterKitsHelp: "Kies een beginstructuur. Alles wordt ingevoegd als een onopgeslagen, bewerkbaar concept.",
|
|
4238
|
+
startBlank: "Leeg beginnen",
|
|
3851
4239
|
closeDetail: "Details sluiten",
|
|
3852
4240
|
typology: "Typologie",
|
|
3853
4241
|
typologyAuto: "Automatisch ({name})",
|
|
@@ -3902,6 +4290,11 @@ var nl_default = {
|
|
|
3902
4290
|
confirmDeleteTitle: "Blok verwijderen",
|
|
3903
4291
|
confirmDelete: "Blok {name} verwijderen?",
|
|
3904
4292
|
confirmDeleteMarker: "Dit is een groepsmarkering: alleen de markering wordt verwijderd, niet de blokken in de groep, en de groep blijft onevenwichtig tot hij hersteld is.",
|
|
4293
|
+
confirmDeleteGroupTitle: "Groep verwijderen",
|
|
4294
|
+
confirmDeleteGroup: "Groep {name} verwijderen?",
|
|
4295
|
+
confirmDeleteGroupHint: "Deze groep bevat {count, plural, one {# blok} other {# blokken}}. Verwijder ze of behoud ze op de pagina zonder de groep.",
|
|
4296
|
+
keepGroupBlocks: "Groep verwijderen, blokken behouden",
|
|
4297
|
+
deleteGroupAndBlocks: "{count, plural, =0 {Groep verwijderen} one {Groep en # blok verwijderen} other {Groep en # blokken verwijderen}}",
|
|
3905
4298
|
delete: "Verwijderen",
|
|
3906
4299
|
selectBlocks: "Blokken selecteren",
|
|
3907
4300
|
selectAll: "Alles selecteren",
|
|
@@ -4096,6 +4489,7 @@ var nl_default = {
|
|
|
4096
4489
|
gridCellMenu: "Meer acties voor {label}",
|
|
4097
4490
|
removeFromGroup: "Uit de groep halen",
|
|
4098
4491
|
gridAdd: "Blok toevoegen",
|
|
4492
|
+
groupAdd: "Blok toevoegen binnen {label}",
|
|
4099
4493
|
gridShowList: "Groep {label} als lijst tonen",
|
|
4100
4494
|
gridShowGrid: "Groep {label} als raster tonen",
|
|
4101
4495
|
layoutColumnsField: "Layoutraster: veld met kolommen",
|
|
@@ -4104,7 +4498,23 @@ var nl_default = {
|
|
|
4104
4498
|
layoutOff: "Geen raster",
|
|
4105
4499
|
layoutNoMobile: "Geen",
|
|
4106
4500
|
layoutHelp: "De blokken van de groep verschijnen als raster in het formulier, met het aantal kolommen van dit blok.",
|
|
4107
|
-
layoutNoFields: "Dit blok heeft geen veld dat een aantal kolommen kan bevatten."
|
|
4501
|
+
layoutNoFields: "Dit blok heeft geen veld dat een aantal kolommen kan bevatten.",
|
|
4502
|
+
"toolbar.versions": "Versiegeschiedenis",
|
|
4503
|
+
versionsDenied: "Vraag een beheerder om de Blockscene-machtiging Versiegeschiedenis lezen.",
|
|
4504
|
+
versionsDisabled: "Geschiedenis is niet ingeschakeld voor dit inhoudstype. Vraag een beheerder dit in Settings > Blockscene in te schakelen (settings.history.enabled).",
|
|
4505
|
+
versionsNew: "Sla dit item eerst op om de geschiedenis te starten.",
|
|
4506
|
+
versionsPerson: "Filter op persoon",
|
|
4507
|
+
versionsEveryone: "Iedereen",
|
|
4508
|
+
versionsCounts: "{total} blokken",
|
|
4509
|
+
versionsCountsMissing: "Aantal blokken niet beschikbaar (oudere of niet vastgelegde gebeurtenis).",
|
|
4510
|
+
versionsPage: "Pagina {page} van {count}",
|
|
4511
|
+
versionsPrevious: "Vorige",
|
|
4512
|
+
versionsNext: "Volgende",
|
|
4513
|
+
versionsViewing: "Versie van {date} door {person} bekijken (alleen-lezen).",
|
|
4514
|
+
versionsCurrent: "Terug naar huidig concept",
|
|
4515
|
+
versionsMissing: "Sommige blokken, velden, media of relaties zijn niet meer beschikbaar in dit voorbeeld.",
|
|
4516
|
+
versionsBridgeLegacy: "Deze bridge ondersteunt geen alleen-lezen navigatie. Interactie is uitgeschakeld; werk de bridge bij voor readOnly.",
|
|
4517
|
+
historyExpired: "Snapshot niet meer beschikbaar"
|
|
4108
4518
|
};
|
|
4109
4519
|
|
|
4110
4520
|
// admin/messages.ts
|
|
@@ -4208,8 +4618,15 @@ function RowPreviews({ zones, components, catalog, Modal: Modal2 }) {
|
|
|
4208
4618
|
const candidates = (uid) => candidatesFor(uid, catalog?.components?.[uid] || {}, catalog || {});
|
|
4209
4619
|
const label = (uid) => catalog?.components?.[uid]?.label || components?.[uid]?.info?.displayName || uid;
|
|
4210
4620
|
const srcOf = (uid) => candidates(uid)[resolved[uid] ?? -1] || "";
|
|
4621
|
+
const visible = anchors.filter(({ uid }) => showRowThumbnail(uid, catalog));
|
|
4211
4622
|
React2.useEffect(() => {
|
|
4212
4623
|
for (const { el, uid } of anchors) {
|
|
4624
|
+
if (!showRowThumbnail(uid, catalog)) {
|
|
4625
|
+
el.style.removeProperty("cursor");
|
|
4626
|
+
for (const name of ["role", "tabindex", "aria-label"])
|
|
4627
|
+
el.removeAttribute(name);
|
|
4628
|
+
continue;
|
|
4629
|
+
}
|
|
4213
4630
|
if (srcOf(uid)) {
|
|
4214
4631
|
el.setAttribute("role", "button");
|
|
4215
4632
|
el.setAttribute("tabindex", "0");
|
|
@@ -4221,7 +4638,7 @@ function RowPreviews({ zones, components, catalog, Modal: Modal2 }) {
|
|
|
4221
4638
|
}
|
|
4222
4639
|
});
|
|
4223
4640
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
4224
|
-
|
|
4641
|
+
visible.map(
|
|
4225
4642
|
(a) => (0, import_react_dom.createPortal)(
|
|
4226
4643
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
4227
4644
|
"span",
|
|
@@ -4401,7 +4818,15 @@ function movedRow(prev, next, actor) {
|
|
|
4401
4818
|
}
|
|
4402
4819
|
function keepGroupsTogether(prev, next, groups, actor) {
|
|
4403
4820
|
if (!groups) return null;
|
|
4404
|
-
|
|
4821
|
+
let move = movedRow(prev, next, actor);
|
|
4822
|
+
if (!move && actor == null) {
|
|
4823
|
+
const candidates = prev.flatMap((row) => {
|
|
4824
|
+
if (!(0, import_groups2.isOpener)(row, groups)) return [];
|
|
4825
|
+
const candidate = movedRow(prev, next, (0, import_groups2.blockKey)(row));
|
|
4826
|
+
return candidate && (0, import_groups2.isOpener)(prev[candidate.from], groups) ? [candidate] : [];
|
|
4827
|
+
});
|
|
4828
|
+
if (candidates.length === 1) move = candidates[0];
|
|
4829
|
+
}
|
|
4405
4830
|
if (!move || !(0, import_groups2.isOpener)(prev[move.from], groups)) return null;
|
|
4406
4831
|
const start = move.from, end = groupOutline(prev, groups)[start].end;
|
|
4407
4832
|
if (end == null) return null;
|
|
@@ -4754,6 +5179,7 @@ var DEPTH = "data-blockscene-depth";
|
|
|
4754
5179
|
var KIND = "data-blockscene-group";
|
|
4755
5180
|
var FOLD = "data-blockscene-fold";
|
|
4756
5181
|
var COUNT = "data-blockscene-fold-count";
|
|
5182
|
+
var INSERT = "data-blockscene-group-insert";
|
|
4757
5183
|
var GRID_BOX = "data-blockscene-grid";
|
|
4758
5184
|
var STEP = "2.4rem";
|
|
4759
5185
|
var folded = /* @__PURE__ */ new Set();
|
|
@@ -4775,6 +5201,14 @@ var Count = import_styled_components3.default.span`
|
|
|
4775
5201
|
margin-right: 4px; padding: 1px 6px; border-radius: 3px; font-size: 11px; font-weight: 600; line-height: 16px; white-space: nowrap;
|
|
4776
5202
|
color: ${({ theme }) => theme.colors.primary700}; background: ${({ theme }) => theme.colors.primary100};
|
|
4777
5203
|
`;
|
|
5204
|
+
var GroupInsert = import_styled_components3.default.button`
|
|
5205
|
+
display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 42px; padding: 8px 12px;
|
|
5206
|
+
border: 1px dashed ${({ theme }) => theme.colors.primary600}; border-radius: 4px; cursor: pointer; font: inherit; font-size: 12px; font-weight: 600;
|
|
5207
|
+
color: ${({ theme }) => theme.colors.primary600}; background: ${({ theme }) => theme.colors.neutral0};
|
|
5208
|
+
&:hover:not(:disabled) { background: ${({ theme }) => theme.colors.primary100}; }
|
|
5209
|
+
&:disabled { opacity: 0.5; cursor: default; }
|
|
5210
|
+
&:focus-visible { outline: 2px solid ${({ theme }) => theme.colors.primary600}; outline-offset: 1px; }
|
|
5211
|
+
`;
|
|
4778
5212
|
function GroupRows({ zones, form, groups, docKey, labelOf, layouts = null, components, catalog, openBlock, openInsert }) {
|
|
4779
5213
|
const t = useMessages();
|
|
4780
5214
|
const theme = (0, import_styled_components3.useTheme)();
|
|
@@ -4870,18 +5304,34 @@ function GroupRows({ zones, form, groups, docKey, labelOf, layouts = null, compo
|
|
|
4870
5304
|
for (const index of unfold) for (const p of outline[index]?.parents || []) folded.delete(idOf(p));
|
|
4871
5305
|
const isFolded = (i) => outline[i].end != null && folded.has(idOf(i));
|
|
4872
5306
|
const grid = [];
|
|
5307
|
+
const anchorByOpen = /* @__PURE__ */ new Map();
|
|
4873
5308
|
lis.forEach((li, i) => {
|
|
4874
5309
|
const o = outline[i];
|
|
4875
5310
|
seen.add(li);
|
|
4876
5311
|
set(li, DEPTH, o.depth ? String(o.depth) : null);
|
|
4877
5312
|
if (o.depth) li.style.setProperty("--bs-depth", String(o.depth));
|
|
4878
5313
|
set(li, KIND, o.kind === "block" ? null : o.kind);
|
|
4879
|
-
const inGrid =
|
|
5314
|
+
const inGrid = o.parents.some((p) => grid[p]);
|
|
4880
5315
|
const hidden = o.parents.some(isFolded) || inGrid;
|
|
4881
5316
|
set(li, FOLDED, hidden ? "" : null);
|
|
4882
5317
|
const layout = o.kind === "open" && o.end != null ? layouts2?.[rows[i].__component] || null : null;
|
|
4883
5318
|
const toggle = li.querySelector("button[aria-expanded]");
|
|
4884
5319
|
grid[i] = Boolean(layout && toggle?.parentElement) && !hidden && !isFolded(i) && !listed.has(idOf(i));
|
|
5320
|
+
if (o.kind === "close") {
|
|
5321
|
+
const open = o.parents[o.parents.length - 1];
|
|
5322
|
+
const anchor2 = anchorByOpen.get(open);
|
|
5323
|
+
if (anchor2 && !grid[open] && !hidden) {
|
|
5324
|
+
let insertEl = li.querySelector(`:scope > [${INSERT}]`);
|
|
5325
|
+
if (!insertEl) {
|
|
5326
|
+
insertEl = document.createElement("div");
|
|
5327
|
+
insertEl.setAttribute(INSERT, "");
|
|
5328
|
+
li.appendChild(insertEl);
|
|
5329
|
+
}
|
|
5330
|
+
anchor2.insertEl = insertEl;
|
|
5331
|
+
anchor2.after = blockKey(rows[Math.max(open, i - 1)]);
|
|
5332
|
+
}
|
|
5333
|
+
return;
|
|
5334
|
+
}
|
|
4885
5335
|
if (o.kind !== "open" || o.end == null || !toggle?.parentElement) return;
|
|
4886
5336
|
let gridEl = li.querySelector(`:scope > [${GRID_BOX}]`);
|
|
4887
5337
|
if (grid[i] && !gridEl) {
|
|
@@ -4904,15 +5354,32 @@ function GroupRows({ zones, form, groups, docKey, labelOf, layouts = null, compo
|
|
|
4904
5354
|
countEl.style.cssText = "display:inline-flex;align-items:center";
|
|
4905
5355
|
actions.insertBefore(countEl, actions.firstChild);
|
|
4906
5356
|
}
|
|
4907
|
-
|
|
5357
|
+
const anchor = {
|
|
5358
|
+
el,
|
|
5359
|
+
countEl,
|
|
5360
|
+
insertEl: null,
|
|
5361
|
+
after: null,
|
|
5362
|
+
full: Boolean(zone.full),
|
|
5363
|
+
zone: zone.name,
|
|
5364
|
+
index: i,
|
|
5365
|
+
id: idOf(i),
|
|
5366
|
+
count: o.count || 0,
|
|
5367
|
+
open: !isFolded(i),
|
|
5368
|
+
label: labelOf2(rows[i]),
|
|
5369
|
+
layout,
|
|
5370
|
+
gridEl
|
|
5371
|
+
};
|
|
5372
|
+
next.push(anchor);
|
|
5373
|
+
anchorByOpen.set(i, anchor);
|
|
4908
5374
|
});
|
|
4909
5375
|
}
|
|
4910
5376
|
landed.current = null;
|
|
4911
5377
|
for (const li of document.querySelectorAll(`li[${DEPTH}], li[${KIND}], li[${FOLDED}]`))
|
|
4912
5378
|
if (!seen.has(li)) for (const name of [DEPTH, KIND, FOLDED]) li.removeAttribute(name);
|
|
4913
|
-
for (const el of document.querySelectorAll(`[${FOLD}], [${COUNT}], [${GRID_BOX}]`))
|
|
5379
|
+
for (const el of document.querySelectorAll(`[${FOLD}], [${COUNT}], [${GRID_BOX}], [${INSERT}]`))
|
|
5380
|
+
if (!next.some((a) => a.el === el || a.countEl === el || a.gridEl === el || a.insertEl === el)) el.remove();
|
|
4914
5381
|
setAnchors(
|
|
4915
|
-
(prev) => prev.length === next.length && prev.every((a, i) => ["el", "countEl", "id", "index", "count", "open", "label", "layout", "gridEl"].every((k) => a[k] === next[i][k])) ? prev : next
|
|
5382
|
+
(prev) => prev.length === next.length && prev.every((a, i) => ["el", "countEl", "insertEl", "after", "full", "id", "index", "count", "open", "label", "layout", "gridEl"].every((k) => a[k] === next[i][k])) ? prev : next
|
|
4916
5383
|
);
|
|
4917
5384
|
};
|
|
4918
5385
|
React4.useEffect(() => {
|
|
@@ -4930,7 +5397,7 @@ function GroupRows({ zones, form, groups, docKey, labelOf, layouts = null, compo
|
|
|
4930
5397
|
return () => {
|
|
4931
5398
|
observer.disconnect();
|
|
4932
5399
|
cancelAnimationFrame(frame2);
|
|
4933
|
-
for (const el of document.querySelectorAll(`[${FOLD}], [${COUNT}], [${GRID_BOX}]`)) el.remove();
|
|
5400
|
+
for (const el of document.querySelectorAll(`[${FOLD}], [${COUNT}], [${GRID_BOX}], [${INSERT}]`)) el.remove();
|
|
4934
5401
|
for (const li of document.querySelectorAll(`li[${DEPTH}], li[${KIND}], li[${FOLDED}]`)) for (const name of [DEPTH, KIND, FOLDED]) li.removeAttribute(name);
|
|
4935
5402
|
};
|
|
4936
5403
|
}, []);
|
|
@@ -4947,10 +5414,8 @@ function GroupRows({ zones, form, groups, docKey, labelOf, layouts = null, compo
|
|
|
4947
5414
|
${list}[${DEPTH}] { padding-left: calc(var(--bs-depth) * ${STEP}); background: repeating-linear-gradient(to right, ${line} 0 2px, transparent 2px ${STEP}) 1.1rem 0 / calc(var(--bs-depth) * ${STEP}) 100% no-repeat; }
|
|
4948
5415
|
${list}[${FOLDED}]:not([data-bp-block-modal]) { display: none !important; }
|
|
4949
5416
|
${list}[data-bp-block-modal] { padding-left: 0 !important; background-image: none !important; }
|
|
4950
|
-
${list}[${KIND}="close"] [
|
|
4951
|
-
${list}[${KIND}="close"]
|
|
4952
|
-
${list}[${KIND}="close"] button[aria-expanded]:first-of-type + * { padding-top: 0 !important; padding-bottom: 0 !important; }
|
|
4953
|
-
${list}[${KIND}="close"] button[aria-expanded] [data-blockscene-row-thumb] { display: none; }` }),
|
|
5417
|
+
${list}[${KIND}="close"] > *:not([${INSERT}]) { display: none !important; }
|
|
5418
|
+
${list}[${KIND}="close"] [${INSERT}] { display: block; padding: 8px 12px; }` }),
|
|
4954
5419
|
anchors.map(
|
|
4955
5420
|
(a) => (0, import_react_dom2.createPortal)(
|
|
4956
5421
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
@@ -5004,7 +5469,27 @@ ${list}[${KIND}="close"] button[aria-expanded] [data-blockscene-row-thumb] { dis
|
|
|
5004
5469
|
a.gridEl,
|
|
5005
5470
|
`grid:${a.zone}:${a.index}`
|
|
5006
5471
|
) : null;
|
|
5007
|
-
})
|
|
5472
|
+
}),
|
|
5473
|
+
anchors.map(
|
|
5474
|
+
(a) => a.insertEl ? (0, import_react_dom2.createPortal)(
|
|
5475
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
5476
|
+
GroupInsert,
|
|
5477
|
+
{
|
|
5478
|
+
type: "button",
|
|
5479
|
+
disabled: a.full,
|
|
5480
|
+
title: a.full ? t.zoneFull : void 0,
|
|
5481
|
+
"data-testid": `group-add-${a.zone}-${a.index}`,
|
|
5482
|
+
onClick: () => openInsert?.(a.zone, a.after),
|
|
5483
|
+
children: [
|
|
5484
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, { name: "plus", size: 14 }),
|
|
5485
|
+
t.f("groupAdd", { label: a.label })
|
|
5486
|
+
]
|
|
5487
|
+
}
|
|
5488
|
+
),
|
|
5489
|
+
a.insertEl,
|
|
5490
|
+
`insert:${a.zone}:${a.index}`
|
|
5491
|
+
) : null
|
|
5492
|
+
)
|
|
5008
5493
|
] });
|
|
5009
5494
|
}
|
|
5010
5495
|
function ViewToggle({ grid, testid, label, onFlip }) {
|
|
@@ -5207,9 +5692,33 @@ function useRowActions({ zones, components, catalog, form }) {
|
|
|
5207
5692
|
if (hiddenName) form.setRows(zoneName, setHidden(rows, index, groups, hiddenName, rows[index]?.[hiddenName] !== true));
|
|
5208
5693
|
};
|
|
5209
5694
|
const paste = (zoneName, at) => pasteInto(form, zoneOf(zoneName), clip, components, groups, t, at);
|
|
5695
|
+
const changeGroup = (zoneName, key, keepBlocks) => {
|
|
5696
|
+
const rows = form.rows(zoneName);
|
|
5697
|
+
const next = keepBlocks ? (0, import_groups2.unwrapGroup)(rows, key, groups) : (0, import_groups2.removeGroup)(rows, key, groups);
|
|
5698
|
+
if (next) form.setRows(zoneName, next);
|
|
5699
|
+
};
|
|
5210
5700
|
const pastable = (zoneName) => !["empty", "notAllowed"].includes(pasteProblem(clip, zoneOf(zoneName), form.rows(zoneName), components, groups)?.code);
|
|
5211
5701
|
const selectable = (zoneName) => form.rows(zoneName).filter((row) => canAct(row, groups)).map((row) => blockKey(row)).filter(Boolean);
|
|
5212
|
-
return {
|
|
5702
|
+
return {
|
|
5703
|
+
t,
|
|
5704
|
+
editor,
|
|
5705
|
+
groups,
|
|
5706
|
+
hiddenName,
|
|
5707
|
+
clip,
|
|
5708
|
+
selection,
|
|
5709
|
+
setSelection,
|
|
5710
|
+
busy,
|
|
5711
|
+
form,
|
|
5712
|
+
labelOf,
|
|
5713
|
+
duplicate,
|
|
5714
|
+
copy: copy2,
|
|
5715
|
+
toggleHidden,
|
|
5716
|
+
paste,
|
|
5717
|
+
pastable,
|
|
5718
|
+
selectable,
|
|
5719
|
+
changeGroup,
|
|
5720
|
+
isMarker: (row) => isGroupMarker(row, groups)
|
|
5721
|
+
};
|
|
5213
5722
|
}
|
|
5214
5723
|
var RowButton = import_styled_components4.default.button`
|
|
5215
5724
|
display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0;
|
|
@@ -5233,7 +5742,7 @@ function RowActions({ zones, actions, Modal: Modal2 }) {
|
|
|
5233
5742
|
const latest = React5.useRef({ zones, a });
|
|
5234
5743
|
latest.current = { zones, a };
|
|
5235
5744
|
React5.useEffect(() => {
|
|
5236
|
-
if (!a
|
|
5745
|
+
if (!a) return;
|
|
5237
5746
|
const onClick = (event) => {
|
|
5238
5747
|
const button = event.target?.closest?.("button");
|
|
5239
5748
|
if (!button || bypass.current) return;
|
|
@@ -5243,10 +5752,23 @@ function RowActions({ zones, actions, Modal: Modal2 }) {
|
|
|
5243
5752
|
const headers = toggles(list);
|
|
5244
5753
|
const index = headers.findIndex((toggle) => trashOf(toggle) === button);
|
|
5245
5754
|
if (index < 0) return;
|
|
5755
|
+
const row = latest.current.a?.form.rows(zone.name)[index];
|
|
5756
|
+
const marker2 = Boolean(latest.current.a?.isMarker(row));
|
|
5757
|
+
if (!marker2 && e.confirmDelete === false) return;
|
|
5246
5758
|
event.preventDefault();
|
|
5247
5759
|
event.stopPropagation();
|
|
5248
|
-
|
|
5249
|
-
|
|
5760
|
+
if (marker2 && !canAct(row, latest.current.a?.groups)) return;
|
|
5761
|
+
const key = blockKey(row) || "";
|
|
5762
|
+
const rows = latest.current.a.form.rows(zone.name);
|
|
5763
|
+
const range = marker2 ? actionRange(rows, index, latest.current.a.groups) : [index, index];
|
|
5764
|
+
setConfirm({
|
|
5765
|
+
button,
|
|
5766
|
+
label: latest.current.a?.labelOf(row) || headers[index].textContent?.trim(),
|
|
5767
|
+
kind: marker2 ? "group" : "block",
|
|
5768
|
+
zone: zone.name,
|
|
5769
|
+
key,
|
|
5770
|
+
count: marker2 ? rows.slice(range[0] + 1, range[1]).filter((item) => canAct(item, latest.current.a.groups)).length : 0
|
|
5771
|
+
});
|
|
5250
5772
|
return;
|
|
5251
5773
|
}
|
|
5252
5774
|
};
|
|
@@ -5274,6 +5796,11 @@ function RowActions({ zones, actions, Modal: Modal2 }) {
|
|
|
5274
5796
|
bypass.current = false;
|
|
5275
5797
|
}
|
|
5276
5798
|
};
|
|
5799
|
+
const confirmGroup = (keepBlocks) => {
|
|
5800
|
+
const target = confirm;
|
|
5801
|
+
setConfirm(null);
|
|
5802
|
+
if (target?.kind === "group") a.changeGroup(target.zone, target.key, keepBlocks);
|
|
5803
|
+
};
|
|
5277
5804
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
5278
5805
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("style", { children: `li[${HIDDEN_ATTR}] button[aria-expanded] { opacity: 0.5; }
|
|
5279
5806
|
ol[aria-describedby] > li button[data-strapi-accordion-toggle] { overflow: hidden; }
|
|
@@ -5353,14 +5880,25 @@ ol[aria-describedby] > li button[data-strapi-accordion-toggle] > span:last-child
|
|
|
5353
5880
|
`${zone}:${index}`
|
|
5354
5881
|
);
|
|
5355
5882
|
}),
|
|
5356
|
-
confirm && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5883
|
+
confirm && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
5884
|
+
Modal2,
|
|
5885
|
+
{
|
|
5886
|
+
open: true,
|
|
5887
|
+
width: "48rem",
|
|
5888
|
+
onOpenChange: (open) => !open && setConfirm(null),
|
|
5889
|
+
trigger: null,
|
|
5890
|
+
title: confirm.kind === "group" ? t.confirmDeleteGroupTitle : t.confirmDeleteTitle,
|
|
5891
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_design_system.Flex, { direction: "column", alignItems: "stretch", gap: 4, "data-testid": "row-confirm-delete", children: [
|
|
5892
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_design_system.Typography, { children: t.f(confirm.kind === "group" ? "confirmDeleteGroup" : "confirmDelete", { name: confirm.label, count: confirm.count }) }),
|
|
5893
|
+
confirm.kind === "group" && confirm.count > 0 && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_design_system.Typography, { variant: "pi", textColor: "neutral600", children: t.f("confirmDeleteGroupHint", { count: confirm.count }) }),
|
|
5894
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_design_system.Flex, { gap: 2, justifyContent: "flex-end", children: [
|
|
5895
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_design_system.Button, { variant: "tertiary", onClick: () => setConfirm(null), "data-testid": "row-confirm-cancel", children: t.cancel }),
|
|
5896
|
+
confirm.kind === "group" && confirm.count > 0 && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_design_system.Button, { variant: "secondary", onClick: () => confirmGroup(true), "data-testid": "row-confirm-unwrap", children: t.keepGroupBlocks }),
|
|
5897
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_design_system.Button, { variant: "danger", onClick: confirm.kind === "group" ? () => confirmGroup(false) : confirmDelete, "data-testid": "row-confirm-ok", children: confirm.kind === "group" ? t.f("deleteGroupAndBlocks", { count: confirm.count }) : t.delete })
|
|
5898
|
+
] })
|
|
5899
|
+
] })
|
|
5900
|
+
}
|
|
5901
|
+
)
|
|
5364
5902
|
] });
|
|
5365
5903
|
}
|
|
5366
5904
|
function zoneMenuItems(zone, a) {
|
|
@@ -5718,6 +6256,10 @@ var Round = import_styled_components5.default.button`
|
|
|
5718
6256
|
border: 1px solid ${({ theme }) => theme.colors.neutral200};
|
|
5719
6257
|
color: ${({ theme, $on }) => $on ? theme.colors.warning500 : theme.colors.neutral600};
|
|
5720
6258
|
background: ${({ theme }) => theme.colors.neutral0};
|
|
6259
|
+
transition: transform 120ms ease-out;
|
|
6260
|
+
&:active {
|
|
6261
|
+
transform: scale(0.97);
|
|
6262
|
+
}
|
|
5721
6263
|
&:focus-visible {
|
|
5722
6264
|
outline: 2px solid ${({ theme }) => theme.colors.primary600};
|
|
5723
6265
|
outline-offset: 1px;
|
|
@@ -6411,7 +6953,7 @@ function ZoneGallery({
|
|
|
6411
6953
|
gap: 4,
|
|
6412
6954
|
style: { overflowY: "auto", flex: 1, minHeight: 0, padding: "4px" },
|
|
6413
6955
|
children: (view === "recent" ? [{ typology: "recent", entries }] : groupEntries(entries)).map(
|
|
6414
|
-
({ typology, entries: items2 }) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_design_system2.Flex, { direction: "column", alignItems: "stretch", gap: 2, children: [
|
|
6956
|
+
({ typology, entries: items2 }) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_design_system2.Flex, { direction: "column", alignItems: "stretch", gap: 2, flex: "0 0 auto", children: [
|
|
6415
6957
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_design_system2.Typography, { variant: "sigma", textColor: "neutral600", "data-testid": `block-group-${typology}`, children: `${typology === "recent" ? t.nav.recent : t.typologies[typology] || typology} (${items2.length})` }),
|
|
6416
6958
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Columns, { $columns: columns, children: items2.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
6417
6959
|
Card,
|
|
@@ -6697,8 +7239,14 @@ var import_styled_components6 = __toESM(require("styled-components"));
|
|
|
6697
7239
|
var import_design_system4 = require("@strapi/design-system");
|
|
6698
7240
|
|
|
6699
7241
|
// admin/pane.mjs
|
|
6700
|
-
var TOOLBAR = ["modes", "history", "devices", "status", "actions"];
|
|
7242
|
+
var TOOLBAR = ["modes", "history", "versions", "devices", "status", "actions"];
|
|
6701
7243
|
var RIGHT = ["status", "actions"];
|
|
7244
|
+
function topNavigationInset(navs, viewportWidth) {
|
|
7245
|
+
return Math.round(Math.max(0, ...(Array.isArray(navs) ? navs : []).flatMap((nav) => {
|
|
7246
|
+
const rect = nav?.rect || {};
|
|
7247
|
+
return ["fixed", "sticky"].includes(nav?.position) && Math.abs(Number(rect.top) || 0) <= 1 && (Number(rect.left) || 0) <= 1 && Number(rect.right) >= viewportWidth - 1 && Number(rect.height) > 0 && Number(rect.height) <= 128 ? [Number(rect.bottom) || Number(rect.height)] : [];
|
|
7248
|
+
})));
|
|
7249
|
+
}
|
|
6702
7250
|
function toolbarLayout(list) {
|
|
6703
7251
|
const ids = Array.isArray(list) ? list.filter((id, i) => TOOLBAR.includes(id) && list.indexOf(id) === i) : TOOLBAR;
|
|
6704
7252
|
const at = ids.findIndex((id) => RIGHT.includes(id));
|
|
@@ -6833,6 +7381,25 @@ function useMainRect() {
|
|
|
6833
7381
|
}, []);
|
|
6834
7382
|
return rect;
|
|
6835
7383
|
}
|
|
7384
|
+
function useAdminTopInset() {
|
|
7385
|
+
const [inset, setInset] = React8.useState(0);
|
|
7386
|
+
React8.useLayoutEffect(() => {
|
|
7387
|
+
const navs = () => [...document.querySelectorAll("nav")];
|
|
7388
|
+
const measure = () => setInset(topNavigationInset(navs().map((nav) => ({
|
|
7389
|
+
position: getComputedStyle(nav).position,
|
|
7390
|
+
rect: nav.getBoundingClientRect()
|
|
7391
|
+
})), window.innerWidth));
|
|
7392
|
+
measure();
|
|
7393
|
+
const observer = "ResizeObserver" in window ? new ResizeObserver(measure) : null;
|
|
7394
|
+
navs().forEach((nav) => observer?.observe(nav));
|
|
7395
|
+
window.addEventListener("resize", measure);
|
|
7396
|
+
return () => {
|
|
7397
|
+
observer?.disconnect();
|
|
7398
|
+
window.removeEventListener("resize", measure);
|
|
7399
|
+
};
|
|
7400
|
+
}, []);
|
|
7401
|
+
return inset;
|
|
7402
|
+
}
|
|
6836
7403
|
var Handle = import_styled_components6.default.div`
|
|
6837
7404
|
position: absolute;
|
|
6838
7405
|
top: 0;
|
|
@@ -6921,6 +7488,7 @@ body.bp-block-modal [data-bp-block-modal] { position: fixed !important; top: ${B
|
|
|
6921
7488
|
background: ${background}; border-radius: 0 0 8px 8px; box-shadow: 0 8px 32px rgba(33, 33, 52, 0.3); }
|
|
6922
7489
|
body.bp-block-modal [data-bp-block-modal]::before, body.bp-block-modal [data-bp-block-modal]::after { display: none !important; }
|
|
6923
7490
|
body.bp-block-modal [data-bp-block-modal] > div { margin: 0 !important; padding-top: 0 !important; }
|
|
7491
|
+
body.bp-block-modal > div:has(> [role="listbox"]) { z-index: 1002 !important; }
|
|
6924
7492
|
body.bp-block-modal [data-bp-modal-hide] { display: none !important; }`;
|
|
6925
7493
|
var DRAWER_WIDTH = 640;
|
|
6926
7494
|
var fieldsStyle = (background, drawer) => `
|
|
@@ -6929,6 +7497,7 @@ body.bp-fields [data-bp-show] { grid-column: 1 / -1 !important; }
|
|
|
6929
7497
|
body.bp-fields [data-bp-flat] { border: 0 !important; box-shadow: none !important; padding: 0 !important; background: transparent !important; }
|
|
6930
7498
|
body.bp-fields [data-bp-fields] { position: fixed !important; z-index: 1001; overflow: auto; margin: 0 !important;
|
|
6931
7499
|
padding: 1.6rem 2.4rem; background: ${background}; box-shadow: 0 8px 32px rgba(33, 33, 52, 0.3); }
|
|
7500
|
+
body.bp-fields > div:has(> [role="listbox"]) { z-index: 1002 !important; }
|
|
6932
7501
|
body.bp-fields [data-bp-fields="modal"] { top: ${BLOCK_TOP}; left: 50%; transform: translateX(-50%); width: min(96rem, 92vw);
|
|
6933
7502
|
max-height: calc(88vh - 5.6rem); border-radius: 0 0 8px 8px; }
|
|
6934
7503
|
${drawer ? `body.bp-fields [data-bp-fields="drawer"] { top: ${drawer.top + 56}px; left: ${drawer.left}px; width: ${drawer.width}px; height: ${drawer.height - 56}px; }` : ""}`;
|
|
@@ -7120,7 +7689,8 @@ function PagePreview({
|
|
|
7120
7689
|
hiddenAttribute = null,
|
|
7121
7690
|
form = null,
|
|
7122
7691
|
Modal: Modal2,
|
|
7123
|
-
Toggle
|
|
7692
|
+
Toggle,
|
|
7693
|
+
versions
|
|
7124
7694
|
}) {
|
|
7125
7695
|
const t = useMessages();
|
|
7126
7696
|
const { values, zone, zoneLabel: zoneLabel2, canEdit, latest, insertRows: insertRows2 } = usePreviewZone(host);
|
|
@@ -7140,12 +7710,15 @@ function PagePreview({
|
|
|
7140
7710
|
return v > 0 && v < 1 ? v : 0.5;
|
|
7141
7711
|
});
|
|
7142
7712
|
const main = useMainRect();
|
|
7713
|
+
const topInset = useAdminTopInset();
|
|
7143
7714
|
const vw = main.width;
|
|
7144
7715
|
const [dragging, setDragging] = React8.useState(false);
|
|
7145
7716
|
const [ready, setReady] = React8.useState(false);
|
|
7717
|
+
const [readOnlyBridge, setReadOnlyBridge] = React8.useState(false);
|
|
7146
7718
|
const [failed, setFailed] = React8.useState(false);
|
|
7147
7719
|
const [attempt, retry] = React8.useReducer((n) => n + 1, 0);
|
|
7148
7720
|
const [picking, setPicking] = React8.useState(null);
|
|
7721
|
+
const [deletingGroup, setDeletingGroup] = React8.useState(null);
|
|
7149
7722
|
const [hovered, setHovered] = React8.useState(null);
|
|
7150
7723
|
const [edge, setEdge] = React8.useState(null);
|
|
7151
7724
|
const hoverRow = React8.useRef(null);
|
|
@@ -7187,7 +7760,13 @@ function PagePreview({
|
|
|
7187
7760
|
const iframe = React8.useRef(null);
|
|
7188
7761
|
const loaded = React8.useRef(false);
|
|
7189
7762
|
const anchor = React8.useRef(null);
|
|
7190
|
-
const
|
|
7763
|
+
const version = versions?.view;
|
|
7764
|
+
const readOnly = Boolean(version);
|
|
7765
|
+
const viewRows = React8.useRef([]);
|
|
7766
|
+
viewRows.current = version ? version.values?.[zone] || [] : latest.current;
|
|
7767
|
+
const viewValues = React8.useRef({});
|
|
7768
|
+
viewValues.current = version ? version.values : values;
|
|
7769
|
+
const channel = React8.useMemo(() => crypto.randomUUID(), [host.model, host.documentId, host.locale, version?.scope, version?.event.id]);
|
|
7191
7770
|
const { base, source } = state.preview;
|
|
7192
7771
|
const url = base ? new URL(base) : null;
|
|
7193
7772
|
url?.searchParams.set("channel", channel);
|
|
@@ -7206,7 +7785,8 @@ function PagePreview({
|
|
|
7206
7785
|
setMode,
|
|
7207
7786
|
onChange,
|
|
7208
7787
|
clip,
|
|
7209
|
-
clipCount
|
|
7788
|
+
clipCount,
|
|
7789
|
+
readOnly
|
|
7210
7790
|
});
|
|
7211
7791
|
live.current = {
|
|
7212
7792
|
mode,
|
|
@@ -7216,7 +7796,8 @@ function PagePreview({
|
|
|
7216
7796
|
setMode,
|
|
7217
7797
|
onChange,
|
|
7218
7798
|
clip,
|
|
7219
|
-
clipCount
|
|
7799
|
+
clipCount,
|
|
7800
|
+
readOnly
|
|
7220
7801
|
};
|
|
7221
7802
|
const send = React8.useCallback(() => {
|
|
7222
7803
|
iframe.current?.contentWindow?.postMessage(
|
|
@@ -7224,20 +7805,45 @@ function PagePreview({
|
|
|
7224
7805
|
protocol: PROTOCOL,
|
|
7225
7806
|
channel,
|
|
7226
7807
|
type: "update-page",
|
|
7808
|
+
entry: projectEntry(
|
|
7809
|
+
viewValues.current,
|
|
7810
|
+
host.contentType,
|
|
7811
|
+
live.current.components,
|
|
7812
|
+
window.location.origin,
|
|
7813
|
+
host.readable
|
|
7814
|
+
),
|
|
7815
|
+
contentType: {
|
|
7816
|
+
uid: host.model,
|
|
7817
|
+
kind: host.contentType?.kind,
|
|
7818
|
+
singularName: host.contentType?.info?.singularName,
|
|
7819
|
+
pluralName: host.contentType?.info?.pluralName,
|
|
7820
|
+
displayName: host.contentType?.info?.displayName
|
|
7821
|
+
},
|
|
7822
|
+
zone,
|
|
7227
7823
|
blocks: projectPage(
|
|
7228
|
-
|
|
7824
|
+
viewRows.current,
|
|
7229
7825
|
live.current.components,
|
|
7230
7826
|
window.location.origin,
|
|
7231
7827
|
hiddenAttribute
|
|
7232
|
-
),
|
|
7828
|
+
).map((block) => live.current.readOnly ? { ...block, fields: [], media: {} } : block),
|
|
7233
7829
|
groups,
|
|
7234
7830
|
locale: t.locale,
|
|
7235
7831
|
mode: live.current.mode,
|
|
7236
|
-
clipboard: live.current.clipCount
|
|
7832
|
+
clipboard: live.current.readOnly ? 0 : live.current.clipCount,
|
|
7833
|
+
readOnly: live.current.readOnly
|
|
7237
7834
|
},
|
|
7238
7835
|
origin
|
|
7239
7836
|
);
|
|
7240
|
-
}, [channel, origin, hiddenAttribute]);
|
|
7837
|
+
}, [channel, origin, hiddenAttribute, groups, host.contentType, host.model, host.readable, zone]);
|
|
7838
|
+
React8.useEffect(() => {
|
|
7839
|
+
if (readOnly) {
|
|
7840
|
+
setInserting(null);
|
|
7841
|
+
setBlockModal(null);
|
|
7842
|
+
setPicking(null);
|
|
7843
|
+
setFieldsPanel(null);
|
|
7844
|
+
setHovered(null);
|
|
7845
|
+
}
|
|
7846
|
+
}, [readOnly]);
|
|
7241
7847
|
const indexOf = (key) => latest.current.findIndex((row) => blockKey(row) === key);
|
|
7242
7848
|
const path = (key, field) => `${zone}.${indexOf(key)}.${field}`;
|
|
7243
7849
|
React8.useEffect(() => {
|
|
@@ -7394,9 +8000,11 @@ function PagePreview({
|
|
|
7394
8000
|
React8.useEffect(() => {
|
|
7395
8001
|
if (!active) return;
|
|
7396
8002
|
setReady(false);
|
|
8003
|
+
setReadOnlyBridge(false);
|
|
7397
8004
|
setFailed(false);
|
|
7398
8005
|
const timeout = setTimeout(() => setFailed(true), 15e3);
|
|
7399
8006
|
const receive = (event) => {
|
|
8007
|
+
if (!previewMessageAllowed(event, origin, iframe.current?.contentWindow, channel, live.current.readOnly)) return;
|
|
7400
8008
|
const is = (type) => isPreviewMessage(
|
|
7401
8009
|
event,
|
|
7402
8010
|
origin,
|
|
@@ -7409,6 +8017,7 @@ function PagePreview({
|
|
|
7409
8017
|
clearTimeout(timeout);
|
|
7410
8018
|
setReady(true);
|
|
7411
8019
|
setFailed(false);
|
|
8020
|
+
setReadOnlyBridge(Array.isArray(event.data.capabilities) && event.data.capabilities.includes("readOnly"));
|
|
7412
8021
|
send();
|
|
7413
8022
|
return;
|
|
7414
8023
|
}
|
|
@@ -7440,12 +8049,17 @@ function PagePreview({
|
|
|
7440
8049
|
return;
|
|
7441
8050
|
}
|
|
7442
8051
|
if (is("delete-group") && canEdit2 && groups) {
|
|
7443
|
-
const
|
|
7444
|
-
|
|
7445
|
-
|
|
7446
|
-
|
|
7447
|
-
);
|
|
7448
|
-
|
|
8052
|
+
const key2 = String(event.data.key);
|
|
8053
|
+
const start = latest.current.findIndex((row) => blockKey(row) === key2);
|
|
8054
|
+
if (start < 0) return;
|
|
8055
|
+
const [, end] = (0, import_groups.groupRange)(latest.current, start, groups);
|
|
8056
|
+
if (end <= start || latest.current[end]?.__component !== groups[latest.current[start]?.__component]) return;
|
|
8057
|
+
const closes = new Set(Object.values(groups));
|
|
8058
|
+
setDeletingGroup({
|
|
8059
|
+
key: key2,
|
|
8060
|
+
label: components?.[latest.current[start]?.__component]?.info?.displayName || latest.current[start]?.__component || "",
|
|
8061
|
+
count: latest.current.slice(start + 1, end).filter((row) => !closes.has(row?.__component)).length
|
|
8062
|
+
});
|
|
7449
8063
|
return;
|
|
7450
8064
|
}
|
|
7451
8065
|
if (is("insert-group") && canEdit2 && groups) {
|
|
@@ -7536,9 +8150,9 @@ function PagePreview({
|
|
|
7536
8150
|
if (!ready || !active) return;
|
|
7537
8151
|
const timer = setTimeout(send, 120);
|
|
7538
8152
|
return () => clearTimeout(timer);
|
|
7539
|
-
}, [values, host.components, ready, active, send, mode, clipCount]);
|
|
8153
|
+
}, [values, version, host.components, ready, active, send, mode, clipCount]);
|
|
7540
8154
|
React8.useEffect(() => {
|
|
7541
|
-
if (!active || !ready) return;
|
|
8155
|
+
if (!active || !ready || readOnly) return;
|
|
7542
8156
|
let last = null;
|
|
7543
8157
|
const post = (key) => {
|
|
7544
8158
|
if (key === last) return;
|
|
@@ -7561,7 +8175,7 @@ function PagePreview({
|
|
|
7561
8175
|
document.removeEventListener("pointerout", onOut);
|
|
7562
8176
|
post(null);
|
|
7563
8177
|
};
|
|
7564
|
-
}, [active, ready, channel, origin]);
|
|
8178
|
+
}, [active, ready, channel, origin, readOnly]);
|
|
7565
8179
|
React8.useEffect(() => {
|
|
7566
8180
|
const item = hovered && active ? findZoneList(live.current.zoneLabel)?.querySelectorAll(":scope > li")[indexOf(hovered)] : void 0;
|
|
7567
8181
|
hoverRow.current = item || null;
|
|
@@ -7615,7 +8229,7 @@ function PagePreview({
|
|
|
7615
8229
|
}
|
|
7616
8230
|
) });
|
|
7617
8231
|
const layout = toolbarLayout(editor?.previewToolbar);
|
|
7618
|
-
const tools = { modes: switcher, history: historyTools, devices };
|
|
8232
|
+
const tools = { modes: switcher, history: !readOnly && historyTools, versions: versions?.button, devices };
|
|
7619
8233
|
const toolbarShown = !ready || layout.before.length + layout.right.length + layout.after.length > 0;
|
|
7620
8234
|
const onKey = (event) => {
|
|
7621
8235
|
const map = {
|
|
@@ -7629,6 +8243,12 @@ function PagePreview({
|
|
|
7629
8243
|
applyWidth(map[event.key], true);
|
|
7630
8244
|
}
|
|
7631
8245
|
};
|
|
8246
|
+
const confirmGroupDelete = (keepBlocks) => {
|
|
8247
|
+
if (!deletingGroup || !zone) return;
|
|
8248
|
+
const next = keepBlocks ? (0, import_groups.unwrapGroup)(latest.current, deletingGroup.key, groups) : (0, import_groups.removeGroup)(latest.current, deletingGroup.key, groups);
|
|
8249
|
+
setDeletingGroup(null);
|
|
8250
|
+
if (next) onChange(zone, next);
|
|
8251
|
+
};
|
|
7632
8252
|
return (
|
|
7633
8253
|
// Hidden anchor in the side panels column: split mode and the sidebar items find the edit view's grid from here.
|
|
7634
8254
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { ref: anchor, children: [
|
|
@@ -7639,6 +8259,7 @@ function PagePreview({
|
|
|
7639
8259
|
"data-testid": "page-preview-pane",
|
|
7640
8260
|
"aria-label": t.previewPane,
|
|
7641
8261
|
style: {
|
|
8262
|
+
top: topInset,
|
|
7642
8263
|
left: mode === "preview" || narrow ? main.left : main.left + main.width - paneWidth,
|
|
7643
8264
|
width: mode === "preview" || narrow ? main.width : paneWidth,
|
|
7644
8265
|
userSelect: dragging ? "none" : void 0
|
|
@@ -7724,7 +8345,7 @@ ${/* Strapi 4's scrolled header is fixed to the viewport's right edge: beside th
|
|
|
7724
8345
|
children: [
|
|
7725
8346
|
!ready && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_design_system4.Typography, { variant: "pi", role: "status", textColor: "neutral600", children: failed ? t.previewFailed : t.previewLoading }),
|
|
7726
8347
|
failed && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_design_system4.Button, { size: "S", variant: "secondary", onClick: retry, children: t.retry }),
|
|
7727
|
-
layout.right.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Actions, { parts: layout.right })
|
|
8348
|
+
!readOnly && layout.right.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Actions, { parts: layout.right })
|
|
7728
8349
|
]
|
|
7729
8350
|
}
|
|
7730
8351
|
),
|
|
@@ -7732,68 +8353,83 @@ ${/* Strapi 4's scrolled header is fixed to the viewport's right edge: beside th
|
|
|
7732
8353
|
]
|
|
7733
8354
|
}
|
|
7734
8355
|
),
|
|
7735
|
-
|
|
7736
|
-
|
|
7737
|
-
|
|
7738
|
-
|
|
7739
|
-
|
|
7740
|
-
|
|
7741
|
-
|
|
7742
|
-
|
|
7743
|
-
|
|
7744
|
-
|
|
7745
|
-
|
|
7746
|
-
|
|
7747
|
-
|
|
7748
|
-
|
|
7749
|
-
|
|
7750
|
-
|
|
7751
|
-
{
|
|
7752
|
-
|
|
7753
|
-
|
|
7754
|
-
|
|
7755
|
-
|
|
7756
|
-
|
|
7757
|
-
|
|
7758
|
-
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
}
|
|
7766
|
-
) }),
|
|
7767
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
7768
|
-
"div",
|
|
7769
|
-
{
|
|
7770
|
-
ref: setStage,
|
|
7771
|
-
"data-testid": "page-preview-stage",
|
|
7772
|
-
"data-device": device.id,
|
|
7773
|
-
style: { position: "relative", flex: 1, overflow: "hidden", ...stageBackground(theme) },
|
|
7774
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
7775
|
-
Frame2,
|
|
7776
|
-
{
|
|
7777
|
-
ref: iframe,
|
|
7778
|
-
title: t.previewPane,
|
|
7779
|
-
src: url.href,
|
|
7780
|
-
sandbox: "allow-scripts allow-same-origin",
|
|
7781
|
-
referrerPolicy: "no-referrer",
|
|
7782
|
-
onLoad: () => {
|
|
7783
|
-
loaded.current = true;
|
|
8356
|
+
versions?.banner,
|
|
8357
|
+
readOnly && ready && !readOnlyBridge && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_design_system4.Box, { padding: 2, background: "neutral100", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_design_system4.Typography, { variant: "pi", role: "status", children: t.versionsBridgeLegacy }) }),
|
|
8358
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: { flex: 1, minHeight: 0, display: "flex" }, children: [
|
|
8359
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: { flex: 1, minWidth: 0, minHeight: 0, display: "flex", flexDirection: sidebarPosition === "bottom" ? "column-reverse" : sidebarPosition === "right" ? "row-reverse" : "row" }, children: [
|
|
8360
|
+
!readOnly && mode === "preview" && sidebar.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { ref: setRailEl, style: { display: "flex" }, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
8361
|
+
import_design_system4.Flex,
|
|
8362
|
+
{
|
|
8363
|
+
"data-testid": "page-preview-sidebar",
|
|
8364
|
+
"data-position": sidebarPosition,
|
|
8365
|
+
role: "toolbar",
|
|
8366
|
+
"aria-label": t.sidebarLabel,
|
|
8367
|
+
direction: sidebarPosition === "bottom" ? "row" : "column",
|
|
8368
|
+
gap: 1,
|
|
8369
|
+
padding: 1,
|
|
8370
|
+
background: "neutral100",
|
|
8371
|
+
justifyContent: sidebarPosition === "bottom" ? "center" : "flex-start",
|
|
8372
|
+
style: { [sidebarPosition === "bottom" ? "borderTop" : sidebarPosition === "right" ? "borderLeft" : "borderRight"]: `1px solid ${theme?.colors?.neutral200 || "#dcdce4"}`, overflow: "auto" },
|
|
8373
|
+
children: sidebar.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
8374
|
+
RailButton,
|
|
8375
|
+
{
|
|
8376
|
+
type: "button",
|
|
8377
|
+
$active: fieldsPanel === item,
|
|
8378
|
+
"aria-pressed": fieldsPanel === item,
|
|
8379
|
+
title: item.label,
|
|
8380
|
+
"data-testid": item.custom ? `sidebar-panel-${item.id}` : `sidebar-item-${i}`,
|
|
8381
|
+
onClick: () => setFieldsPanel(fieldsPanel === item ? null : item),
|
|
8382
|
+
children: [
|
|
8383
|
+
typeof item.icon === "string" ? item.icon && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Icon, { name: item.icon }) : item.icon,
|
|
8384
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: item.label })
|
|
8385
|
+
]
|
|
7784
8386
|
},
|
|
7785
|
-
|
|
7786
|
-
|
|
7787
|
-
|
|
7788
|
-
|
|
7789
|
-
|
|
7790
|
-
|
|
8387
|
+
`${item.label}-${i}`
|
|
8388
|
+
))
|
|
8389
|
+
}
|
|
8390
|
+
) }),
|
|
8391
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
8392
|
+
"div",
|
|
8393
|
+
{
|
|
8394
|
+
ref: setStage,
|
|
8395
|
+
"data-testid": "page-preview-stage",
|
|
8396
|
+
"data-device": device.id,
|
|
8397
|
+
style: { position: "relative", flex: 1, overflow: "hidden", ...stageBackground(theme) },
|
|
8398
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
8399
|
+
Frame2,
|
|
8400
|
+
{
|
|
8401
|
+
ref: iframe,
|
|
8402
|
+
title: t.previewPane,
|
|
8403
|
+
src: url.href,
|
|
8404
|
+
sandbox: "allow-scripts allow-same-origin",
|
|
8405
|
+
referrerPolicy: "no-referrer",
|
|
8406
|
+
...readOnly && !readOnlyBridge ? { inert: "", tabIndex: -1 } : {},
|
|
8407
|
+
onLoad: () => {
|
|
8408
|
+
loaded.current = true;
|
|
8409
|
+
},
|
|
8410
|
+
style: { ...frameStyle(device.width, stageSize), ...dragging || readOnly && !readOnlyBridge ? { pointerEvents: "none" } : {} }
|
|
8411
|
+
},
|
|
8412
|
+
attempt
|
|
8413
|
+
)
|
|
8414
|
+
}
|
|
8415
|
+
)
|
|
8416
|
+
] }),
|
|
8417
|
+
versions?.drawer
|
|
7791
8418
|
] })
|
|
7792
8419
|
]
|
|
7793
8420
|
}
|
|
7794
8421
|
),
|
|
7795
8422
|
document.body
|
|
7796
8423
|
),
|
|
8424
|
+
deletingGroup && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Modal2, { open: true, width: "48rem", onOpenChange: (open) => !open && setDeletingGroup(null), trigger: null, title: t.confirmDeleteGroupTitle, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_design_system4.Flex, { direction: "column", alignItems: "stretch", gap: 4, "data-testid": "preview-confirm-delete-group", children: [
|
|
8425
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_design_system4.Typography, { children: t.f("confirmDeleteGroup", { name: deletingGroup.label, count: deletingGroup.count }) }),
|
|
8426
|
+
deletingGroup.count > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_design_system4.Typography, { variant: "pi", textColor: "neutral600", children: t.f("confirmDeleteGroupHint", { count: deletingGroup.count }) }),
|
|
8427
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_design_system4.Flex, { gap: 2, justifyContent: "flex-end", children: [
|
|
8428
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_design_system4.Button, { variant: "tertiary", onClick: () => setDeletingGroup(null), children: t.cancel }),
|
|
8429
|
+
deletingGroup.count > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_design_system4.Button, { variant: "secondary", onClick: () => confirmGroupDelete(true), children: t.keepGroupBlocks }),
|
|
8430
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_design_system4.Button, { variant: "danger", onClick: () => confirmGroupDelete(false), children: t.f("deleteGroupAndBlocks", { count: deletingGroup.count }) })
|
|
8431
|
+
] })
|
|
8432
|
+
] }) }),
|
|
7797
8433
|
inserting && insertAttr && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
7798
8434
|
PickerModal,
|
|
7799
8435
|
{
|
|
@@ -7814,6 +8450,7 @@ ${/* Strapi 4's scrolled header is fixed to the viewport's right edge: beside th
|
|
|
7814
8450
|
if (!open) setInserting(null);
|
|
7815
8451
|
},
|
|
7816
8452
|
onSelect: (uid, values2) => {
|
|
8453
|
+
if (live.current.readOnly) return;
|
|
7817
8454
|
const rows = inserting.zone === zone ? latest.current : Array.isArray(host.values?.[inserting.zone]) ? host.values[inserting.zone] : [];
|
|
7818
8455
|
const index = insertIndex(rows, inserting.after);
|
|
7819
8456
|
setInserting(null);
|
|
@@ -7938,6 +8575,7 @@ ${/* Strapi 4's scrolled header is fixed to the viewport's right edge: beside th
|
|
|
7938
8575
|
multiple: picking.attr.multiple === true,
|
|
7939
8576
|
onClose: () => setPicking(null),
|
|
7940
8577
|
onSelectAssets: (assets) => {
|
|
8578
|
+
if (live.current.readOnly) return;
|
|
7941
8579
|
const index = indexOf(picking.key);
|
|
7942
8580
|
setPicking(null);
|
|
7943
8581
|
if (index < 0 || !assets?.length) return;
|
|
@@ -7975,6 +8613,27 @@ var Card2 = import_styled_components7.default.div`
|
|
|
7975
8613
|
display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 4px;
|
|
7976
8614
|
border: 1px solid ${({ theme }) => theme.colors.neutral200}; background: ${({ theme }) => theme.colors.neutral0};
|
|
7977
8615
|
`;
|
|
8616
|
+
var ContentTypeGrid = import_styled_components7.default.div`
|
|
8617
|
+
display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 16px; align-items: start;
|
|
8618
|
+
`;
|
|
8619
|
+
var ContentTypeCard = import_styled_components7.default.div`
|
|
8620
|
+
display: flex; flex-direction: column; gap: 16px; padding: 20px; border-radius: 4px;
|
|
8621
|
+
border: 1px solid ${({ theme }) => theme.colors.neutral200}; background: ${({ theme }) => theme.colors.neutral0};
|
|
8622
|
+
`;
|
|
8623
|
+
var ContentTypeTop = import_styled_components7.default.div`
|
|
8624
|
+
display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, 240px); gap: 16px; align-items: end;
|
|
8625
|
+
@media (max-width: 520px) { grid-template-columns: 1fr; }
|
|
8626
|
+
`;
|
|
8627
|
+
var Advanced = import_styled_components7.default.details`
|
|
8628
|
+
border-top: 1px solid ${({ theme }) => theme.colors.neutral200}; padding-top: 12px;
|
|
8629
|
+
summary { cursor: pointer; color: ${({ theme }) => theme.colors.neutral800}; font-size: 13px; font-weight: 600; }
|
|
8630
|
+
summary::marker { color: ${({ theme }) => theme.colors.neutral500}; }
|
|
8631
|
+
&[open] summary { margin-bottom: 16px; }
|
|
8632
|
+
`;
|
|
8633
|
+
var ToolbarSection = import_styled_components7.default.div`
|
|
8634
|
+
display: flex; flex-direction: column; gap: 12px; margin-top: 16px; padding-top: 16px;
|
|
8635
|
+
border-top: 1px solid ${({ theme }) => theme.colors.neutral200};
|
|
8636
|
+
`;
|
|
7978
8637
|
var Bar = import_styled_components7.default.div`
|
|
7979
8638
|
position: fixed; top: 0; z-index: 4; padding: 12px 32px;
|
|
7980
8639
|
background: ${({ theme }) => theme.colors.neutral100}; border-bottom: 1px solid ${({ theme }) => theme.colors.neutral150};
|
|
@@ -8019,13 +8678,33 @@ function ColorField({ name, label, value, onChange, disabled }) {
|
|
|
8019
8678
|
] });
|
|
8020
8679
|
}
|
|
8021
8680
|
function TagsField({ name, label, hint, value, onChange, disabled }) {
|
|
8022
|
-
const
|
|
8681
|
+
const external = value.join(", ");
|
|
8682
|
+
const input = React9.useRef(null);
|
|
8683
|
+
const focused = React9.useRef(false);
|
|
8684
|
+
const parse = (next) => [...new Set(next.split(",").map((tag) => tag.replace(/[<>]/g, "").trim().slice(0, 24)).filter(Boolean))].slice(0, 10);
|
|
8685
|
+
React9.useEffect(() => {
|
|
8686
|
+
if (!focused.current && input.current && input.current.value !== external) input.current.value = external;
|
|
8687
|
+
}, [external]);
|
|
8023
8688
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Label, { children: [
|
|
8024
8689
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { variant: "pi", fontWeight: "bold", textColor: "neutral800", children: label }),
|
|
8025
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
8026
|
-
|
|
8027
|
-
|
|
8028
|
-
|
|
8690
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
8691
|
+
"input",
|
|
8692
|
+
{
|
|
8693
|
+
ref: input,
|
|
8694
|
+
name,
|
|
8695
|
+
defaultValue: external,
|
|
8696
|
+
disabled,
|
|
8697
|
+
spellCheck: false,
|
|
8698
|
+
onFocus: () => {
|
|
8699
|
+
focused.current = true;
|
|
8700
|
+
},
|
|
8701
|
+
onBlur: (e) => {
|
|
8702
|
+
focused.current = false;
|
|
8703
|
+
onChange(parse(e.currentTarget.value));
|
|
8704
|
+
},
|
|
8705
|
+
style: { padding: "6px 8px", border: "1px solid #dcdce4", borderRadius: 4, fontSize: 13 }
|
|
8706
|
+
}
|
|
8707
|
+
),
|
|
8029
8708
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { variant: "pi", textColor: "neutral600", children: hint })
|
|
8030
8709
|
] });
|
|
8031
8710
|
}
|
|
@@ -8057,12 +8736,12 @@ var Checks = import_styled_components7.default.fieldset`
|
|
|
8057
8736
|
legend { font-size: 12px; font-weight: 600; margin-bottom: 4px; }
|
|
8058
8737
|
label { display: inline-flex; align-items: center; gap: 6px; }
|
|
8059
8738
|
`;
|
|
8060
|
-
var TOOLBAR2 = ["modes", "history", "devices", "status", "actions"];
|
|
8739
|
+
var TOOLBAR2 = ["modes", "history", "versions", "devices", "status", "actions"];
|
|
8061
8740
|
var DEVICE_NAMES = ["fit", "mobile", "tablet", "desktop"];
|
|
8062
8741
|
var DEVICE_LABEL = /^[^<>]{1,24}$/;
|
|
8063
8742
|
var badDevices = (list = []) => list.length < 1 || list.length > 8 || list.some((item) => typeof item !== "string" && (!DEVICE_LABEL.test(String(item.label || "").trim()) || !(Number.isInteger(item.width) && item.width >= 240 && item.width <= 3840))) || new Set(list.map((item) => typeof item === "string" ? item : item.width)).size !== list.length;
|
|
8064
8743
|
var Row = import_styled_components7.default.div` display: flex; align-items: center; gap: 8px; min-height: 36px; font-size: 13px; color: ${({ theme }) => theme.colors.neutral800}; `;
|
|
8065
|
-
function PaneEditor({ id, toolbar, devices, set: set2, t, disabled, TextField: TextField2 }) {
|
|
8744
|
+
function PaneEditor({ id, toolbar, devices, set: set2, t, disabled, TextField: TextField2, versions }) {
|
|
8066
8745
|
const move = (list, index, by) => {
|
|
8067
8746
|
const next = [...list];
|
|
8068
8747
|
[next[index], next[index + by]] = [next[index + by], next[index]];
|
|
@@ -8085,7 +8764,7 @@ function PaneEditor({ id, toolbar, devices, set: set2, t, disabled, TextField: T
|
|
|
8085
8764
|
const width = (index, patch) => set2("previewDevices", devices.map((item, i) => i === index ? { ...item, ...patch } : item));
|
|
8086
8765
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_design_system5.Flex, { direction: "column", alignItems: "stretch", gap: 3, "data-testid": `pane-editor-${id}`, children: [
|
|
8087
8766
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { variant: "pi", textColor: "neutral600", children: t.paneHelp }),
|
|
8088
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Box, { children: [...toolbar, ...TOOLBAR2.filter((item) => !toolbar.includes(item))].map((item) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Row, { "data-testid": `${id}-toolbar-${item}`, children: [
|
|
8767
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Box, { children: [...toolbar, ...TOOLBAR2.filter((item) => !toolbar.includes(item))].filter((item) => item !== "versions" || versions).map((item) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Row, { "data-testid": `${id}-toolbar-${item}`, children: [
|
|
8089
8768
|
arrows(toolbar, toolbar.indexOf(item), "previewToolbar"),
|
|
8090
8769
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("label", { style: { display: "inline-flex", gap: 6, alignItems: "center" }, children: [
|
|
8091
8770
|
check(toolbar, item, "previewToolbar"),
|
|
@@ -8186,10 +8865,9 @@ function SidebarEditor({ type, entry, set: set2, t, disabled, SelectField: Selec
|
|
|
8186
8865
|
};
|
|
8187
8866
|
const fields = (type.attributes || []).filter((attr) => !SYSTEM_FIELDS2.includes(attr.name));
|
|
8188
8867
|
const id = (name, index) => `sidebar-${name}-${type.uid}${index === void 0 ? "" : `-${index}`}`;
|
|
8189
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_design_system5.Flex, { direction: "column", alignItems: "stretch", gap: 3,
|
|
8190
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { variant: "delta", tag: "h3", children: t.f("sidebarTitle", { name: type.displayName }) }),
|
|
8868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_design_system5.Flex, { direction: "column", alignItems: "stretch", gap: 3, "data-testid": `sidebar-editor-${type.uid}`, children: [
|
|
8191
8869
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { variant: "pi", textColor: "neutral600", children: t.sidebarHelp }),
|
|
8192
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Box, {
|
|
8870
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
8193
8871
|
SelectField2,
|
|
8194
8872
|
{
|
|
8195
8873
|
name: id("position"),
|
|
@@ -8265,7 +8943,7 @@ function SidebarEditor({ type, entry, set: set2, t, disabled, SelectField: Selec
|
|
|
8265
8943
|
] });
|
|
8266
8944
|
}
|
|
8267
8945
|
var permissions = { read: [{ action: "plugin::blockscene.settings.read", subject: null }], update: [{ action: "plugin::blockscene.settings.update", subject: null }] };
|
|
8268
|
-
function Settings({ useClient, usePermissions: usePermissions2, MediaPicker: MediaPicker2, ToggleField: ToggleField2, SelectField: SelectField2, TextField: TextField2, lazyEditors = false }) {
|
|
8946
|
+
function Settings({ useClient, usePermissions: usePermissions2, MediaPicker: MediaPicker2, ToggleField: ToggleField2, SelectField: SelectField2, TextField: TextField2, lazyEditors = false, section = "general" }) {
|
|
8269
8947
|
const t = useMessages();
|
|
8270
8948
|
const { get, put, del } = useClient();
|
|
8271
8949
|
const { canRead, canUpdate, isLoading } = usePermissions2();
|
|
@@ -8283,7 +8961,7 @@ function Settings({ useClient, usePermissions: usePermissions2, MediaPicker: Med
|
|
|
8283
8961
|
React9.useEffect(() => {
|
|
8284
8962
|
if (!canRead || isLoading) return;
|
|
8285
8963
|
let active = true;
|
|
8286
|
-
Promise.all([get("/blockscene/settings"), get("/blockscene/catalog")]).then(([s, c]) => {
|
|
8964
|
+
Promise.all([get("/blockscene/settings"), section === "gallery" ? get("/blockscene/catalog") : Promise.resolve({ data: {} })]).then(([s, c]) => {
|
|
8287
8965
|
if (!active) return;
|
|
8288
8966
|
setData(s.data);
|
|
8289
8967
|
setSettings(s.data.settings);
|
|
@@ -8295,18 +8973,20 @@ function Settings({ useClient, usePermissions: usePermissions2, MediaPicker: Med
|
|
|
8295
8973
|
return () => {
|
|
8296
8974
|
active = false;
|
|
8297
8975
|
};
|
|
8298
|
-
}, [get, canRead, isLoading]);
|
|
8976
|
+
}, [get, canRead, isLoading, section]);
|
|
8299
8977
|
const update = (patch) => {
|
|
8300
8978
|
setSettings((current) => patch(structuredClone(current)));
|
|
8301
8979
|
setDirty(true);
|
|
8302
8980
|
setStatus("");
|
|
8303
8981
|
};
|
|
8304
|
-
const
|
|
8982
|
+
const badPalette = settings && Object.values(settings.palette).some((value) => !COLOR2.test(value));
|
|
8983
|
+
const badPreviewUrl = settings && [settings.editor.previewUrl, settings.editor.blockPreviewUrl].some((url) => url && !/^https?:\/\/\S+$/.test(url));
|
|
8305
8984
|
const badSidebar = settings && Object.values(settings.contentTypes || {}).some((entry) => (entry.sidebar || []).some(badItem));
|
|
8306
8985
|
const badLazy = settings && badUids(settings.editor.lazyFields);
|
|
8307
8986
|
const badHistory = settings && data?.historyTypes && badRetention(settings.history);
|
|
8308
|
-
const
|
|
8309
|
-
const
|
|
8987
|
+
const badEditorPane = settings && settings.editor.previewDevices && badDevices(settings.editor.previewDevices);
|
|
8988
|
+
const badTypePane = settings && Object.values(settings.contentTypes || {}).some((entry) => entry.previewDevices && badDevices(entry.previewDevices));
|
|
8989
|
+
const invalid = section === "general" ? badLazy : section === "preview" ? badPreviewUrl || badEditorPane : section === "content-types" ? badSidebar || badTypePane : section === "gallery" ? badPalette : badHistory;
|
|
8310
8990
|
const save = async () => {
|
|
8311
8991
|
if (!settings || invalid || !canUpdate) return;
|
|
8312
8992
|
setSaving(true);
|
|
@@ -8358,6 +9038,8 @@ function Settings({ useClient, usePermissions: usePermissions2, MediaPicker: Med
|
|
|
8358
9038
|
return index === 0 && manual ? t.manual : t.automatic;
|
|
8359
9039
|
};
|
|
8360
9040
|
const ready = !isLoading && canRead && !failed && settings && catalog;
|
|
9041
|
+
const sectionTitle = t[`settings${section === "content-types" ? "ContentTypes" : section[0].toUpperCase() + section.slice(1)}`];
|
|
9042
|
+
const sectionIntro = t[`settings${section === "content-types" ? "ContentTypes" : section[0].toUpperCase() + section.slice(1)}Intro`];
|
|
8361
9043
|
const header = React9.useRef(null);
|
|
8362
9044
|
const [floating, setFloating] = React9.useState(false);
|
|
8363
9045
|
const main = useMainRect2(header);
|
|
@@ -8370,22 +9052,22 @@ function Settings({ useClient, usePermissions: usePermissions2, MediaPicker: Med
|
|
|
8370
9052
|
}, [ready]);
|
|
8371
9053
|
const controls = (suffix) => ready && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_design_system5.Flex, { gap: 3, alignItems: "center", wrap: "wrap", children: [
|
|
8372
9054
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { role: "status", "aria-live": "polite", textColor: dirty ? "warning700" : "neutral600", "data-testid": `${dirty ? "unsaved-indicator" : "save-status"}${suffix}`, children: dirty ? t.unsaved : status || t.noChanges }),
|
|
8373
|
-
!suffix && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Button, { variant: "tertiary", onClick: restore, disabled: !canUpdate || saving, "data-testid": "restore-blockscene-settings", children: data.projectDefaults ? t.restoreProject : t.resetAll }),
|
|
9055
|
+
!suffix && section === "general" && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Button, { variant: "tertiary", onClick: restore, disabled: !canUpdate || saving, "data-testid": "restore-blockscene-settings", children: data.projectDefaults ? t.restoreProject : t.resetAll }),
|
|
8374
9056
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Button, { onClick: save, disabled: !canUpdate || invalid || !dirty, loading: saving, "data-testid": `save-blockscene-settings${suffix}`, children: t.save })
|
|
8375
9057
|
] });
|
|
8376
9058
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Box, { padding: 8, background: "neutral100", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_design_system5.Flex, { direction: "column", alignItems: "stretch", gap: 5, children: [
|
|
8377
9059
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { ref: header, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_design_system5.Flex, { gap: 4, alignItems: "center", justifyContent: "space-between", wrap: "wrap", children: [
|
|
8378
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { variant: "alpha", tag: "h1", children:
|
|
9060
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { variant: "alpha", tag: "h1", children: sectionTitle }),
|
|
8379
9061
|
controls("")
|
|
8380
9062
|
] }) }),
|
|
8381
9063
|
floating && main.width > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Bar, { style: { left: main.left, width: main.width }, "data-testid": "settings-floating-bar", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_design_system5.Flex, { gap: 4, alignItems: "center", justifyContent: "space-between", wrap: "wrap", children: [
|
|
8382
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { variant: "beta", tag: "p", children:
|
|
9064
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { variant: "beta", tag: "p", children: sectionTitle }),
|
|
8383
9065
|
controls("-floating")
|
|
8384
9066
|
] }) }),
|
|
8385
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { textColor: "neutral600", children:
|
|
9067
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { textColor: "neutral600", children: sectionIntro }),
|
|
8386
9068
|
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { children: "\u2026" }) : !canRead ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { role: "alert", children: t.denied }) : failed ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { role: "alert", children: t.loadFailed }) : !settings || !catalog ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { children: t.loading }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
8387
9069
|
data.disabled && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Box, { padding: 4, background: "warning100", hasRadius: true, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { role: "alert", textColor: "warning700", children: t.disabledByServer }) }),
|
|
8388
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Box, { padding: 6, background: "neutral0", hasRadius: true, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_design_system5.Flex, { direction: "column", alignItems: "stretch", gap: 4, children: [
|
|
9070
|
+
section === "gallery" && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Box, { padding: 6, background: "neutral0", hasRadius: true, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_design_system5.Flex, { direction: "column", alignItems: "stretch", gap: 4, children: [
|
|
8389
9071
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { variant: "beta", tag: "h2", children: t.palette }),
|
|
8390
9072
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Swatches, { children: Object.keys(DEFAULT_PALETTE).map((key) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
8391
9073
|
ColorField,
|
|
@@ -8401,7 +9083,7 @@ function Settings({ useClient, usePermissions: usePermissions2, MediaPicker: Med
|
|
|
8401
9083
|
},
|
|
8402
9084
|
key
|
|
8403
9085
|
)) }),
|
|
8404
|
-
|
|
9086
|
+
badPalette && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { role: "alert", textColor: "danger600", children: t.invalidColor }),
|
|
8405
9087
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { variant: "pi", textColor: "neutral600", children: t.previewLabel }),
|
|
8406
9088
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Swatches, { "data-testid": "palette-preview", children: TEMPLATES.map((template) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_design_system5.Flex, { direction: "column", gap: 1, children: [
|
|
8407
9089
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Box, { style: { aspectRatio: "16 / 9", overflow: "hidden" }, hasRadius: true, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Wireframe, { template, palette: settings.palette }) }),
|
|
@@ -8412,7 +9094,7 @@ function Settings({ useClient, usePermissions: usePermissions2, MediaPicker: Med
|
|
|
8412
9094
|
return s;
|
|
8413
9095
|
}), children: t.resetPalette }) })
|
|
8414
9096
|
] }) }),
|
|
8415
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Box, { padding: 6, background: "neutral0", hasRadius: true, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_design_system5.Flex, { direction: "column", alignItems: "stretch", gap: 4, children: [
|
|
9097
|
+
section === "general" && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Box, { padding: 6, background: "neutral0", hasRadius: true, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_design_system5.Flex, { direction: "column", alignItems: "stretch", gap: 4, children: [
|
|
8416
9098
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { variant: "beta", tag: "h2", children: t.editor }),
|
|
8417
9099
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ToggleField2, { name: "editor-enabled", label: t.enabled, value: editor.enabled, disabled: !canUpdate || saving, onChange: (v) => update((s) => {
|
|
8418
9100
|
s.editor.enabled = v;
|
|
@@ -8452,6 +9134,30 @@ function Settings({ useClient, usePermissions: usePermissions2, MediaPicker: Med
|
|
|
8452
9134
|
}
|
|
8453
9135
|
),
|
|
8454
9136
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { variant: "pi", textColor: "neutral600", children: t.rememberHelp }),
|
|
9137
|
+
lazyEditors && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
9138
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ToggleField2, { name: "editor-lazyEditors", label: t.lazyEditors, value: editor.lazyEditors !== false, disabled: !canUpdate || saving, onChange: (v) => update((s) => {
|
|
9139
|
+
s.editor.lazyEditors = v;
|
|
9140
|
+
return s;
|
|
9141
|
+
}) }),
|
|
9142
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
9143
|
+
UidListField,
|
|
9144
|
+
{
|
|
9145
|
+
TextField: TextField2,
|
|
9146
|
+
name: "editor-lazyFields",
|
|
9147
|
+
label: t.lazyFields,
|
|
9148
|
+
value: editor.lazyFields || [],
|
|
9149
|
+
disabled: !canUpdate || saving || editor.lazyEditors === false,
|
|
9150
|
+
placeholder: "plugin::ckeditor5.CKEditor",
|
|
9151
|
+
onChange: (uids) => update((s) => {
|
|
9152
|
+
s.editor.lazyFields = uids;
|
|
9153
|
+
return s;
|
|
9154
|
+
})
|
|
9155
|
+
}
|
|
9156
|
+
),
|
|
9157
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { variant: "pi", textColor: badLazy ? "danger600" : "neutral600", role: badLazy ? "alert" : void 0, children: badLazy ? t.f("lazyFieldsInvalid", { max: LAZY_MAX }) : t.lazyEditorsHelp })
|
|
9158
|
+
] })
|
|
9159
|
+
] }) }),
|
|
9160
|
+
section === "preview" && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Box, { padding: 6, background: "neutral0", hasRadius: true, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_design_system5.Flex, { direction: "column", alignItems: "stretch", gap: 4, children: [
|
|
8455
9161
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
8456
9162
|
TextField2,
|
|
8457
9163
|
{
|
|
@@ -8503,6 +9209,7 @@ function Settings({ useClient, usePermissions: usePermissions2, MediaPicker: Med
|
|
|
8503
9209
|
PaneEditor,
|
|
8504
9210
|
{
|
|
8505
9211
|
id: "editor",
|
|
9212
|
+
versions: Boolean(data.historyTypes),
|
|
8506
9213
|
toolbar: editor.previewToolbar || TOOLBAR2,
|
|
8507
9214
|
devices: editor.previewDevices || DEVICE_NAMES,
|
|
8508
9215
|
t,
|
|
@@ -8514,37 +9221,16 @@ function Settings({ useClient, usePermissions: usePermissions2, MediaPicker: Med
|
|
|
8514
9221
|
})
|
|
8515
9222
|
}
|
|
8516
9223
|
),
|
|
8517
|
-
|
|
8518
|
-
|
|
8519
|
-
|
|
9224
|
+
badPreviewUrl && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { role: "alert", textColor: "danger600", children: t.invalidUrl }),
|
|
9225
|
+
lazyEditors && data.blockPreviewAvailable && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
9226
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ToggleField2, { name: "editor-blockPreviewInForm", label: t.blockPreviewInForm, value: editor.blockPreviewInForm, disabled: !canUpdate || saving, onChange: (v) => update((s) => {
|
|
9227
|
+
s.editor.blockPreviewInForm = v;
|
|
8520
9228
|
return s;
|
|
8521
9229
|
}) }),
|
|
8522
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
8523
|
-
UidListField,
|
|
8524
|
-
{
|
|
8525
|
-
TextField: TextField2,
|
|
8526
|
-
name: "editor-lazyFields",
|
|
8527
|
-
label: t.lazyFields,
|
|
8528
|
-
value: editor.lazyFields || [],
|
|
8529
|
-
disabled: !canUpdate || saving || editor.lazyEditors === false,
|
|
8530
|
-
placeholder: "plugin::ckeditor5.CKEditor",
|
|
8531
|
-
onChange: (uids) => update((s) => {
|
|
8532
|
-
s.editor.lazyFields = uids;
|
|
8533
|
-
return s;
|
|
8534
|
-
})
|
|
8535
|
-
}
|
|
8536
|
-
),
|
|
8537
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { variant: "pi", textColor: badLazy ? "danger600" : "neutral600", role: badLazy ? "alert" : void 0, children: badLazy ? t.f("lazyFieldsInvalid", { max: LAZY_MAX }) : t.lazyEditorsHelp }),
|
|
8538
|
-
data.blockPreviewAvailable && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
8539
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ToggleField2, { name: "editor-blockPreviewInForm", label: t.blockPreviewInForm, value: editor.blockPreviewInForm, disabled: !canUpdate || saving, onChange: (v) => update((s) => {
|
|
8540
|
-
s.editor.blockPreviewInForm = v;
|
|
8541
|
-
return s;
|
|
8542
|
-
}) }),
|
|
8543
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { variant: "pi", textColor: "neutral600", children: t.blockPreviewInFormHelp })
|
|
8544
|
-
] })
|
|
9230
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { variant: "pi", textColor: "neutral600", children: t.blockPreviewInFormHelp })
|
|
8545
9231
|
] })
|
|
8546
9232
|
] }) }),
|
|
8547
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Box, { padding: 6, background: "neutral0", hasRadius: true, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_design_system5.Flex, { direction: "column", alignItems: "stretch", gap: 4, "data-testid": "row-actions-settings", children: [
|
|
9233
|
+
section === "general" && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Box, { padding: 6, background: "neutral0", hasRadius: true, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_design_system5.Flex, { direction: "column", alignItems: "stretch", gap: 4, "data-testid": "row-actions-settings", children: [
|
|
8548
9234
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { variant: "beta", tag: "h2", children: t.rowActionsTitle }),
|
|
8549
9235
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ToggleField2, { name: "editor-confirmDelete", label: t.confirmDeleteOption, value: editor.confirmDelete !== false, disabled: !canUpdate || saving, onChange: (v) => update((s) => {
|
|
8550
9236
|
s.editor.confirmDelete = v;
|
|
@@ -8574,7 +9260,7 @@ function Settings({ useClient, usePermissions: usePermissions2, MediaPicker: Med
|
|
|
8574
9260
|
),
|
|
8575
9261
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { variant: "pi", textColor: "neutral600", children: data.hiddenAttribute ? t.hiddenBlocksHelp : t.hiddenAttributeOff })
|
|
8576
9262
|
] }) }),
|
|
8577
|
-
data.historyTypes && settings.history && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
9263
|
+
section === "history" && data.historyTypes && settings.history && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
8578
9264
|
HistorySettings,
|
|
8579
9265
|
{
|
|
8580
9266
|
types: data.historyTypes,
|
|
@@ -8589,10 +9275,10 @@ function Settings({ useClient, usePermissions: usePermissions2, MediaPicker: Med
|
|
|
8589
9275
|
})
|
|
8590
9276
|
}
|
|
8591
9277
|
),
|
|
8592
|
-
|
|
8593
|
-
|
|
8594
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { variant: "pi", textColor: "neutral600", children: t.contentTypesHelp }),
|
|
8595
|
-
data.contentTypes.map((type) => {
|
|
9278
|
+
section === "history" && !data.historyTypes && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Box, { padding: 6, background: "neutral0", hasRadius: true, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { textColor: "neutral600", children: t.historyUnavailable }) }),
|
|
9279
|
+
section === "content-types" && (data.contentTypes || []).length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_design_system5.Flex, { direction: "column", alignItems: "stretch", gap: 4, "data-testid": "content-types", children: [
|
|
9280
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Box, { padding: 4, background: "neutral0", hasRadius: true, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { variant: "pi", textColor: "neutral600", children: t.contentTypesHelp }) }),
|
|
9281
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ContentTypeGrid, { children: data.contentTypes.map((type) => {
|
|
8596
9282
|
const entry = settings.contentTypes?.[type.uid] || {};
|
|
8597
9283
|
const set2 = (key, value, fallback) => update((s) => {
|
|
8598
9284
|
const next = { ...s.contentTypes?.[type.uid] || {} };
|
|
@@ -8603,9 +9289,10 @@ function Settings({ useClient, usePermissions: usePermissions2, MediaPicker: Med
|
|
|
8603
9289
|
else delete s.contentTypes[type.uid];
|
|
8604
9290
|
return s;
|
|
8605
9291
|
});
|
|
8606
|
-
|
|
8607
|
-
|
|
8608
|
-
|
|
9292
|
+
const customized = Boolean(entry.sidebar?.length || entry.sidebarPosition || entry.previewToolbar || entry.previewDevices);
|
|
9293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(ContentTypeCard, { "data-testid": `content-type-${type.uid}`, children: [
|
|
9294
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(ContentTypeTop, { children: [
|
|
9295
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
8609
9296
|
ToggleField2,
|
|
8610
9297
|
{
|
|
8611
9298
|
name: `type-enabled-${type.uid}`,
|
|
@@ -8615,7 +9302,7 @@ function Settings({ useClient, usePermissions: usePermissions2, MediaPicker: Med
|
|
|
8615
9302
|
onChange: (v) => set2("enabled", v, true)
|
|
8616
9303
|
}
|
|
8617
9304
|
) }),
|
|
8618
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Box, {
|
|
9305
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
8619
9306
|
SelectField2,
|
|
8620
9307
|
{
|
|
8621
9308
|
name: `type-mode-${type.uid}`,
|
|
@@ -8627,45 +9314,51 @@ function Settings({ useClient, usePermissions: usePermissions2, MediaPicker: Med
|
|
|
8627
9314
|
}
|
|
8628
9315
|
) })
|
|
8629
9316
|
] }),
|
|
8630
|
-
entry.enabled !== false && /* @__PURE__ */ (0, import_jsx_runtime10.
|
|
8631
|
-
|
|
8632
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
8633
|
-
|
|
8634
|
-
|
|
8635
|
-
|
|
8636
|
-
|
|
8637
|
-
|
|
8638
|
-
|
|
8639
|
-
|
|
8640
|
-
|
|
8641
|
-
|
|
9317
|
+
entry.enabled !== false && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Advanced, { defaultOpen: customized, children: [
|
|
9318
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("summary", { children: t.typeAdvanced }),
|
|
9319
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SidebarEditor, { type, entry, set: set2, t, disabled: !canUpdate || saving, SelectField: SelectField2, TextField: TextField2 }),
|
|
9320
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(ToolbarSection, { children: [
|
|
9321
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
9322
|
+
ToggleField2,
|
|
9323
|
+
{
|
|
9324
|
+
name: `type-pane-${type.uid}`,
|
|
9325
|
+
label: t.f("paneTypeOverride", { name: type.displayName }),
|
|
9326
|
+
value: Boolean(entry.previewToolbar || entry.previewDevices),
|
|
9327
|
+
disabled: !canUpdate || saving,
|
|
9328
|
+
onChange: (v) => {
|
|
9329
|
+
set2("previewToolbar", v ? [...editor.previewToolbar || TOOLBAR2] : void 0, void 0);
|
|
9330
|
+
set2("previewDevices", v ? structuredClone(editor.previewDevices || DEVICE_NAMES) : void 0, void 0);
|
|
9331
|
+
}
|
|
8642
9332
|
}
|
|
8643
|
-
|
|
8644
|
-
|
|
8645
|
-
|
|
8646
|
-
|
|
8647
|
-
|
|
8648
|
-
|
|
8649
|
-
|
|
8650
|
-
|
|
8651
|
-
|
|
8652
|
-
|
|
8653
|
-
|
|
8654
|
-
|
|
8655
|
-
|
|
8656
|
-
|
|
9333
|
+
),
|
|
9334
|
+
(entry.previewToolbar || entry.previewDevices) && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
9335
|
+
PaneEditor,
|
|
9336
|
+
{
|
|
9337
|
+
id: `type-${type.uid}`,
|
|
9338
|
+
versions: Boolean(data.historyTypes),
|
|
9339
|
+
toolbar: entry.previewToolbar || editor.previewToolbar || TOOLBAR2,
|
|
9340
|
+
devices: entry.previewDevices || editor.previewDevices || DEVICE_NAMES,
|
|
9341
|
+
t,
|
|
9342
|
+
disabled: !canUpdate || saving,
|
|
9343
|
+
TextField: TextField2,
|
|
9344
|
+
set: (key, value) => set2(key, value, void 0)
|
|
9345
|
+
}
|
|
9346
|
+
)
|
|
9347
|
+
] })
|
|
8657
9348
|
] })
|
|
8658
9349
|
] }, type.uid);
|
|
8659
|
-
}),
|
|
9350
|
+
}) }),
|
|
8660
9351
|
badSidebar && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { role: "alert", textColor: "danger600", children: t.sidebarInvalidSave })
|
|
8661
|
-
] })
|
|
8662
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Box, { padding: 6, background: "neutral0", hasRadius: true, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_design_system5.Flex, { direction: "column", alignItems: "stretch", gap: 4, children: [
|
|
9352
|
+
] }),
|
|
9353
|
+
section === "gallery" && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Box, { padding: 6, background: "neutral0", hasRadius: true, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_design_system5.Flex, { direction: "column", alignItems: "stretch", gap: 4, children: [
|
|
8663
9354
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { variant: "beta", tag: "h2", children: t.components }),
|
|
8664
9355
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Searchbar, { name: "component-filter", value: filter, placeholder: t.filter, clearLabel: t.clear, onClear: () => setFilter(""), onChange: (e) => setFilter(e.target.value), children: t.filter }),
|
|
8665
9356
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { variant: "pi", textColor: "neutral600", "data-testid": "components-count", children: t.f("countAll", { count: components.length }) }),
|
|
8666
9357
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Grid2, { "data-testid": "components-grid", children: components.map((component) => {
|
|
8667
9358
|
const entry = settings.components[component.uid] || {};
|
|
8668
9359
|
const meta = { ...catalog.components?.[component.uid] || {}, ...media[component.uid] || {} };
|
|
9360
|
+
const groupMarker = Boolean(catalog.groups?.[component.uid] || Object.values(catalog.groups || {}).includes(component.uid));
|
|
9361
|
+
const rowThumbnail = entry.showRowThumbnail ?? !groupMarker;
|
|
8669
9362
|
const candidates = candidatesFor(component.uid, meta, catalog);
|
|
8670
9363
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Card2, { "data-testid": `settings-${component.uid}`, children: [
|
|
8671
9364
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
@@ -8744,6 +9437,16 @@ function Settings({ useClient, usePermissions: usePermissions2, MediaPicker: Med
|
|
|
8744
9437
|
onChange: (tags) => setComponent(component.uid, "tags", tags.length ? tags : void 0)
|
|
8745
9438
|
}
|
|
8746
9439
|
),
|
|
9440
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
9441
|
+
ToggleField2,
|
|
9442
|
+
{
|
|
9443
|
+
name: `row-thumbnail-${component.uid}`,
|
|
9444
|
+
label: t.componentRowThumbnail,
|
|
9445
|
+
value: rowThumbnail,
|
|
9446
|
+
disabled: !canUpdate || saving,
|
|
9447
|
+
onChange: (v) => setComponent(component.uid, "showRowThumbnail", v)
|
|
9448
|
+
}
|
|
9449
|
+
),
|
|
8747
9450
|
meta.variants?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_design_system5.Typography, { variant: "pi", textColor: "neutral600", "data-testid": `variants-${component.uid}`, children: [
|
|
8748
9451
|
t.variantsFromCode,
|
|
8749
9452
|
": ",
|
|
@@ -8819,18 +9522,29 @@ function LayoutFields({ component, layout, set: set2, t, disabled, SelectField:
|
|
|
8819
9522
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system5.Typography, { variant: "pi", textColor: "neutral600", children: fields.length ? t.layoutHelp : t.layoutNoFields })
|
|
8820
9523
|
] });
|
|
8821
9524
|
}
|
|
9525
|
+
var SETTINGS_SECTIONS = [
|
|
9526
|
+
{ id: "general", label: "General" },
|
|
9527
|
+
{ id: "preview", label: "Page preview" },
|
|
9528
|
+
{ id: "content-types", label: "Content types" },
|
|
9529
|
+
{ id: "gallery", label: "Block gallery" },
|
|
9530
|
+
{ id: "history", label: "History & trash" }
|
|
9531
|
+
];
|
|
8822
9532
|
function register(app, Component2, to) {
|
|
8823
9533
|
app.createSettingSection(
|
|
8824
9534
|
{ id: "blockscene", intlLabel: { id: "blockscene.title", defaultMessage: "Blockscene" } },
|
|
8825
|
-
|
|
8826
|
-
|
|
8827
|
-
to
|
|
8828
|
-
|
|
8829
|
-
|
|
8830
|
-
|
|
8831
|
-
|
|
8832
|
-
|
|
8833
|
-
|
|
9535
|
+
SETTINGS_SECTIONS.map(({ id, label }) => {
|
|
9536
|
+
const Page = () => React9.createElement(Component2, { section: id });
|
|
9537
|
+
const sectionPath = id === "general" ? to : to.startsWith("/") ? `${to}-${id}` : `${to}/${id}`;
|
|
9538
|
+
return {
|
|
9539
|
+
id: `blockscene-${id}`,
|
|
9540
|
+
to: sectionPath,
|
|
9541
|
+
intlLabel: { id: `blockscene.settings${id === "content-types" ? "ContentTypes" : id[0].toUpperCase() + id.slice(1)}`, defaultMessage: label },
|
|
9542
|
+
// Module shape: older Strapi 4 (e.g. 4.11) only reads `.default` from the loader result.
|
|
9543
|
+
// Not an `async` function: Strapi 5 warns on AsyncFunction loaders.
|
|
9544
|
+
Component: () => Promise.resolve({ default: Page }),
|
|
9545
|
+
permissions: permissions.read
|
|
9546
|
+
};
|
|
9547
|
+
})
|
|
8834
9548
|
);
|
|
8835
9549
|
}
|
|
8836
9550
|
|
|
@@ -8904,20 +9618,75 @@ var labelsHook = (get, relabel, drop) => (args) => {
|
|
|
8904
9618
|
}
|
|
8905
9619
|
};
|
|
8906
9620
|
|
|
8907
|
-
// admin/
|
|
9621
|
+
// admin/StarterKits.tsx
|
|
9622
|
+
var React12 = __toESM(require("react"));
|
|
9623
|
+
var import_design_system7 = require("@strapi/design-system");
|
|
8908
9624
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
9625
|
+
var marker = (docKey) => {
|
|
9626
|
+
try {
|
|
9627
|
+
const entry = window.history.state?.key ?? window.history.state?.idx ?? "route";
|
|
9628
|
+
return `blockscene:starter-kit:${entry}:${docKey}`;
|
|
9629
|
+
} catch {
|
|
9630
|
+
return `blockscene:starter-kit:${docKey}`;
|
|
9631
|
+
}
|
|
9632
|
+
};
|
|
9633
|
+
var wasHandled = (key) => {
|
|
9634
|
+
try {
|
|
9635
|
+
return window.sessionStorage.getItem(key) === "handled";
|
|
9636
|
+
} catch {
|
|
9637
|
+
return false;
|
|
9638
|
+
}
|
|
9639
|
+
};
|
|
9640
|
+
var remember2 = (key) => {
|
|
9641
|
+
try {
|
|
9642
|
+
window.sessionStorage.setItem(key, "handled");
|
|
9643
|
+
} catch {
|
|
9644
|
+
}
|
|
9645
|
+
};
|
|
9646
|
+
function StarterKits({ creating, kits, zones, components, form, Modal: Modal2, docKey }) {
|
|
9647
|
+
const t = useMessages();
|
|
9648
|
+
const key = marker(docKey);
|
|
9649
|
+
const handled = React12.useRef({ key, value: wasHandled(key) });
|
|
9650
|
+
if (handled.current.key !== key) handled.current = { key, value: wasHandled(key) };
|
|
9651
|
+
const usable = starterKitsForLocale(kits, form?.locale).filter((kit) => Object.keys(kit.zones || {}).every((name) => zones.some((zone) => zone.name === name)));
|
|
9652
|
+
const available = creating && form && !handled.current.value && usable.length > 0 && zones.length > 0 && zones.every((zone) => form.rows(zone.name).length === 0);
|
|
9653
|
+
const [open, setOpen] = React12.useState(available);
|
|
9654
|
+
React12.useEffect(() => {
|
|
9655
|
+
if (available) setOpen(true);
|
|
9656
|
+
}, [available, key]);
|
|
9657
|
+
if (!available) return null;
|
|
9658
|
+
const finish = () => {
|
|
9659
|
+
handled.current.value = true;
|
|
9660
|
+
remember2(key);
|
|
9661
|
+
setOpen(false);
|
|
9662
|
+
};
|
|
9663
|
+
const apply = (kit) => {
|
|
9664
|
+
const rows = starterKitRows(kit, zones, components, form);
|
|
9665
|
+
if (!rows) return;
|
|
9666
|
+
for (const [zone, value] of Object.entries(rows)) form.setRows(zone, value);
|
|
9667
|
+
finish();
|
|
9668
|
+
};
|
|
9669
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Modal2, { open, onOpenChange: (next) => next ? setOpen(true) : finish(), title: t.starterKits, width: "560px", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_design_system7.Flex, { direction: "column", alignItems: "stretch", gap: 3, children: [
|
|
9670
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_design_system7.Typography, { textColor: "neutral600", children: t.starterKitsHelp }),
|
|
9671
|
+
usable.map((kit) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_design_system7.Button, { variant: "secondary", fullWidth: true, onClick: () => apply(kit), "data-testid": `starter-kit-${kit.id}`, children: localized(kit.label, t.locale) }, kit.id)),
|
|
9672
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_design_system7.Box, { paddingTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_design_system7.Button, { variant: "tertiary", onClick: finish, children: t.startBlank }) })
|
|
9673
|
+
] }) });
|
|
9674
|
+
}
|
|
9675
|
+
|
|
9676
|
+
// admin/strapi4.tsx
|
|
9677
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
8909
9678
|
function Modal({ open, onOpenChange, trigger, title, children, width = "80vw" }) {
|
|
8910
|
-
const id =
|
|
8911
|
-
return /* @__PURE__ */ (0,
|
|
9679
|
+
const id = React13.useId();
|
|
9680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
8912
9681
|
trigger,
|
|
8913
|
-
open && /* @__PURE__ */ (0,
|
|
8914
|
-
/* @__PURE__ */ (0,
|
|
8915
|
-
/* @__PURE__ */ (0,
|
|
9682
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_design_system8.ModalLayout, { onClose: () => onOpenChange(false), labelledBy: id, width, children: [
|
|
9683
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_design_system8.ModalHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_design_system8.Typography, { id, variant: "beta", children: title }) }),
|
|
9684
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_design_system8.ModalBody, { children })
|
|
8916
9685
|
] })
|
|
8917
9686
|
] });
|
|
8918
9687
|
}
|
|
8919
|
-
var Menu2 = ({ label, testid, items: items2 }) => /* @__PURE__ */ (0,
|
|
8920
|
-
/* @__PURE__ */ (0,
|
|
9688
|
+
var Menu2 = ({ label, testid, items: items2 }) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { "data-testid": testid, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_design_system8.SimpleMenu, { variant: "tertiary", size: "S", "aria-label": label, title: label, endIcon: null, label: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon, { name: "more", size: 16 }), children: items2.map((item) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_design_system8.MenuItem, { onClick: item.onSelect, "data-testid": item.testid, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_design_system8.Flex, { as: "span", gap: 2, alignItems: "center", children: [
|
|
9689
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon, { name: item.icon, size: 16 }),
|
|
8921
9690
|
item.label
|
|
8922
9691
|
] }) }, item.testid)) }) });
|
|
8923
9692
|
function overlayVariant(c, components, zone, at, uid, values) {
|
|
@@ -8926,7 +9695,7 @@ function overlayVariant(c, components, zone, at, uid, values) {
|
|
|
8926
9695
|
}
|
|
8927
9696
|
function useRowForm(c, components) {
|
|
8928
9697
|
const toggleNotification = (0, import_helper_plugin.useNotification)();
|
|
8929
|
-
const latest =
|
|
9698
|
+
const latest = React13.useRef(c.modifiedData);
|
|
8930
9699
|
latest.current = c.modifiedData;
|
|
8931
9700
|
if (typeof c.onChange !== "function") return null;
|
|
8932
9701
|
return {
|
|
@@ -8977,7 +9746,7 @@ function Picker() {
|
|
|
8977
9746
|
};
|
|
8978
9747
|
if (!catalog?.editor?.enabled || catalog.contentTypes?.[c.slug]?.enabled === false) return null;
|
|
8979
9748
|
const docKey = `${c.slug}:${c.isCreatingEntry ? "new" : c.initialData?.id}:${c.initialData?.locale || ""}`;
|
|
8980
|
-
return /* @__PURE__ */ (0,
|
|
9749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { hidden: true, "data-blockscene-editor": "", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Workspace, { c, schema, zones, components, add, catalog, docKey, form, get, put }) });
|
|
8981
9750
|
}
|
|
8982
9751
|
function Workspace({ c, schema, zones, components, add, catalog, docKey, form, get, put }) {
|
|
8983
9752
|
const typeSettings = catalog.contentTypes?.[c.slug] || {};
|
|
@@ -8991,8 +9760,9 @@ function Workspace({ c, schema, zones, components, add, catalog, docKey, form, g
|
|
|
8991
9760
|
};
|
|
8992
9761
|
const host = usePreviewHost4(c, schema, components, get, put);
|
|
8993
9762
|
const state = useEditorState(editor, host);
|
|
8994
|
-
return /* @__PURE__ */ (0,
|
|
8995
|
-
/* @__PURE__ */ (0,
|
|
9763
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
9764
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(StarterKits, { creating: c.isCreatingEntry, kits: catalog.kits?.[c.slug], zones, components, form, Modal, docKey }),
|
|
9765
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
8996
9766
|
Gallery,
|
|
8997
9767
|
{
|
|
8998
9768
|
zones,
|
|
@@ -9009,12 +9779,12 @@ function Workspace({ c, schema, zones, components, add, catalog, docKey, form, g
|
|
|
9009
9779
|
userId: import_helper_plugin.auth.getUserInfo?.()?.id,
|
|
9010
9780
|
form,
|
|
9011
9781
|
Menu: Menu2,
|
|
9012
|
-
zoneTools: state.preview.base ? /* @__PURE__ */ (0,
|
|
9782
|
+
zoneTools: state.preview.base ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ZoneBarTools, { state }) : null,
|
|
9013
9783
|
openBlock: state.openBlock,
|
|
9014
9784
|
openInsert: state.openInsert
|
|
9015
9785
|
}
|
|
9016
9786
|
),
|
|
9017
|
-
/* @__PURE__ */ (0,
|
|
9787
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
9018
9788
|
PagePreview,
|
|
9019
9789
|
{
|
|
9020
9790
|
editor,
|
|
@@ -9033,9 +9803,13 @@ function usePreviewHost4(c, schema, components, get, put) {
|
|
|
9033
9803
|
const toggleNotification = (0, import_helper_plugin.useNotification)();
|
|
9034
9804
|
const { components: library } = (0, import_helper_plugin.useLibrary)();
|
|
9035
9805
|
const creating = Boolean(c.isCreatingEntry);
|
|
9036
|
-
const
|
|
9037
|
-
(
|
|
9038
|
-
[
|
|
9806
|
+
const layoutFields = React13.useMemo(
|
|
9807
|
+
() => new Set((schema?.layouts?.edit?.flat(3) || []).map((field) => field?.name).filter(Boolean)),
|
|
9808
|
+
[schema?.layouts?.edit]
|
|
9809
|
+
);
|
|
9810
|
+
const readable = React13.useCallback(
|
|
9811
|
+
(name) => fieldReadable(name, c.readActionAllowedFields, creating) || layoutFields.has(name.split(".")[0]),
|
|
9812
|
+
[creating, c.readActionAllowedFields, layoutFields]
|
|
9039
9813
|
);
|
|
9040
9814
|
return {
|
|
9041
9815
|
ds: 1,
|
|
@@ -9072,7 +9846,7 @@ function Actions4({ parts }) {
|
|
|
9072
9846
|
const c = (0, import_helper_plugin.useCMEditViewDataManager)();
|
|
9073
9847
|
const t = useMessages();
|
|
9074
9848
|
const { formatMessage } = (0, import_react_intl2.useIntl)();
|
|
9075
|
-
const dirty =
|
|
9849
|
+
const dirty = React13.useMemo(
|
|
9076
9850
|
() => c.isCreatingEntry ? Object.keys(c.modifiedData || {}).length > 0 : JSON.stringify(c.initialData) !== JSON.stringify(c.modifiedData),
|
|
9077
9851
|
[c.initialData, c.modifiedData, c.isCreatingEntry]
|
|
9078
9852
|
);
|
|
@@ -9086,13 +9860,13 @@ function Actions4({ parts }) {
|
|
|
9086
9860
|
{ label: save, variant: "secondary", disabled: !dirty, loading: c.status === "submit-pending", reason: t.saveDisabledHint },
|
|
9087
9861
|
...c.hasDraftAndPublish && !c.isCreatingEntry ? [{ label: publish, variant: "default", disabled: dirty, loading: c.status === (published ? "unpublish-pending" : "publish-pending"), reason: t.publishDisabledHint }] : []
|
|
9088
9862
|
].filter((action) => native(action.label));
|
|
9089
|
-
return /* @__PURE__ */ (0,
|
|
9090
|
-
parts.includes("status") && (status || dirty) && /* @__PURE__ */ (0,
|
|
9091
|
-
status && /* @__PURE__ */ (0,
|
|
9092
|
-
dirty && /* @__PURE__ */ (0,
|
|
9863
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_design_system8.Flex, { gap: 2, alignItems: "center", "data-testid": "page-preview-actions", children: [
|
|
9864
|
+
parts.includes("status") && (status || dirty) && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_design_system8.Flex, { gap: 2, alignItems: "center", style: { order: parts.indexOf("status") }, children: [
|
|
9865
|
+
status && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_design_system8.Status, { size: "S", showBullet: false, role: "status", "data-testid": "page-preview-status", variant: published ? "success" : "secondary", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_design_system8.Typography, { as: "span", variant: "omega", fontWeight: "bold", children: formatMessage({ id: `content-manager.containers.List.${status}`, defaultMessage: status === "published" ? "Published" : "Draft" }) }) }),
|
|
9866
|
+
dirty && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_design_system8.Typography, { variant: "pi", textColor: "neutral600", children: t.unsaved })
|
|
9093
9867
|
] }),
|
|
9094
|
-
parts.includes("actions") && actions.map((action) => /* @__PURE__ */ (0,
|
|
9095
|
-
|
|
9868
|
+
parts.includes("actions") && actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { title: action.disabled ? action.reason : void 0, style: { order: parts.indexOf("actions") }, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
9869
|
+
import_design_system8.Button,
|
|
9096
9870
|
{
|
|
9097
9871
|
size: "S",
|
|
9098
9872
|
variant: action.variant,
|
|
@@ -9105,9 +9879,9 @@ function Actions4({ parts }) {
|
|
|
9105
9879
|
) }, action.label))
|
|
9106
9880
|
] });
|
|
9107
9881
|
}
|
|
9108
|
-
var ToggleField = ({ name, label, value, onChange, disabled }) => /* @__PURE__ */ (0,
|
|
9109
|
-
/* @__PURE__ */ (0,
|
|
9110
|
-
|
|
9882
|
+
var ToggleField = ({ name, label, value, onChange, disabled }) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_design_system8.Flex, { gap: 3, children: [
|
|
9883
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
9884
|
+
import_design_system8.Switch,
|
|
9111
9885
|
{
|
|
9112
9886
|
name,
|
|
9113
9887
|
"aria-label": label,
|
|
@@ -9116,9 +9890,9 @@ var ToggleField = ({ name, label, value, onChange, disabled }) => /* @__PURE__ *
|
|
|
9116
9890
|
onChange: () => onChange(!value)
|
|
9117
9891
|
}
|
|
9118
9892
|
),
|
|
9119
|
-
/* @__PURE__ */ (0,
|
|
9893
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_design_system8.Typography, { children: label })
|
|
9120
9894
|
] });
|
|
9121
|
-
var TextField = ({ name, label, value, onChange, disabled, placeholder }) => /* @__PURE__ */ (0,
|
|
9895
|
+
var TextField = ({ name, label, value, onChange, disabled, placeholder }) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_design_system8.TextInput, { name, label, value, disabled, placeholder, onChange: (e) => onChange(e.target.value) });
|
|
9122
9896
|
var SelectField = ({
|
|
9123
9897
|
name,
|
|
9124
9898
|
label,
|
|
@@ -9126,15 +9900,15 @@ var SelectField = ({
|
|
|
9126
9900
|
onChange,
|
|
9127
9901
|
disabled,
|
|
9128
9902
|
options
|
|
9129
|
-
}) => /* @__PURE__ */ (0,
|
|
9130
|
-
|
|
9903
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
9904
|
+
import_design_system8.SingleSelect,
|
|
9131
9905
|
{
|
|
9132
9906
|
name,
|
|
9133
9907
|
label,
|
|
9134
9908
|
value,
|
|
9135
9909
|
disabled,
|
|
9136
9910
|
onChange: (v) => onChange(String(v)),
|
|
9137
|
-
children: options.map((o) => /* @__PURE__ */ (0,
|
|
9911
|
+
children: options.map((o) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_design_system8.SingleSelectOption, { value: o.value, children: o.label }, o.value))
|
|
9138
9912
|
}
|
|
9139
9913
|
);
|
|
9140
9914
|
function MediaPicker({ onClose, onSelect }) {
|
|
@@ -9144,7 +9918,7 @@ function MediaPicker({ onClose, onSelect }) {
|
|
|
9144
9918
|
onClose();
|
|
9145
9919
|
return null;
|
|
9146
9920
|
}
|
|
9147
|
-
return /* @__PURE__ */ (0,
|
|
9921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
9148
9922
|
Dialog,
|
|
9149
9923
|
{
|
|
9150
9924
|
onClose,
|
|
@@ -9161,7 +9935,7 @@ function usePermissions() {
|
|
|
9161
9935
|
isLoading
|
|
9162
9936
|
};
|
|
9163
9937
|
}
|
|
9164
|
-
var SettingsPage = () => /* @__PURE__ */ (0,
|
|
9938
|
+
var SettingsPage = ({ section }) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Guard, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
9165
9939
|
Settings,
|
|
9166
9940
|
{
|
|
9167
9941
|
useClient: import_helper_plugin.useFetchClient,
|
|
@@ -9169,7 +9943,8 @@ var SettingsPage = () => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Guard, {
|
|
|
9169
9943
|
MediaPicker,
|
|
9170
9944
|
ToggleField,
|
|
9171
9945
|
SelectField,
|
|
9172
|
-
TextField
|
|
9946
|
+
TextField,
|
|
9947
|
+
section
|
|
9173
9948
|
}
|
|
9174
9949
|
) });
|
|
9175
9950
|
var strapi4_default = {
|
|
@@ -9182,7 +9957,7 @@ var strapi4_default = {
|
|
|
9182
9957
|
app.registerHook("Admin/CM/pages/EditView/mutate-edit-view-layout", labelsHook(() => (0, import_helper_plugin.getFetchClient)().get, labelEditLayout4, dropField4));
|
|
9183
9958
|
app.injectContentManagerComponent("editView", "right-links", {
|
|
9184
9959
|
name: "blockscene",
|
|
9185
|
-
Component: () => /* @__PURE__ */ (0,
|
|
9960
|
+
Component: () => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Guard, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Picker, {}) })
|
|
9186
9961
|
});
|
|
9187
9962
|
}
|
|
9188
9963
|
};
|