@firecms/core 3.5.1 → 3.5.2-canary.16bf7bb
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/HomePage/HomePageDnD.d.ts +4 -2
- package/dist/{de-CBOjCvsy.js → de-CUF9f7S-.js} +2 -1
- package/dist/{de-CBOjCvsy.js.map → de-CUF9f7S-.js.map} +1 -1
- package/dist/{editor-BSo_aS1I.js → editor-WZytSO_1.js} +172 -137
- package/dist/editor-WZytSO_1.js.map +1 -0
- package/dist/{fr-DRfttcG0.js → fr-DmkMX6hp.js} +2 -1
- package/dist/{fr-DRfttcG0.js.map → fr-DmkMX6hp.js.map} +1 -1
- package/dist/{hi-DwieOZNf.js → hi-BKuaMr7w.js} +2 -1
- package/dist/{hi-DwieOZNf.js.map → hi-BKuaMr7w.js.map} +1 -1
- package/dist/index.es.js +70 -62
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +238 -189
- package/dist/index.umd.js.map +1 -1
- package/dist/{it-l2KXtx9n.js → it-BwQflFGz.js} +2 -1
- package/dist/{it-l2KXtx9n.js.map → it-BwQflFGz.js.map} +1 -1
- package/dist/{pl-DPZrdKhi.js → pl-BPsAvZvc.js} +2 -1
- package/dist/{pl-DPZrdKhi.js.map → pl-BPsAvZvc.js.map} +1 -1
- package/dist/{pt-BoHpabw1.js → pt-D5q7OQp1.js} +2 -1
- package/dist/{pt-BoHpabw1.js.map → pt-D5q7OQp1.js.map} +1 -1
- package/dist/types/translations.d.ts +1 -0
- package/package.json +3 -3
- package/src/components/HomePage/DefaultHomePage.tsx +2 -0
- package/src/components/HomePage/HomePageDnD.tsx +12 -4
- package/src/editor/selectors/link-selector.tsx +37 -12
- package/src/locales/de.ts +1 -0
- package/src/locales/en.ts +1 -0
- package/src/locales/es.ts +1 -0
- package/src/locales/fr.ts +1 -0
- package/src/locales/hi.ts +1 -0
- package/src/locales/it.ts +1 -0
- package/src/locales/pl.ts +1 -0
- package/src/locales/pt.ts +1 -0
- package/src/types/translations.ts +1 -0
- package/dist/editor-BSo_aS1I.js.map +0 -1
package/dist/index.es.js
CHANGED
|
@@ -16100,7 +16100,7 @@ function CircularProgressCenter(t0) {
|
|
|
16100
16100
|
}
|
|
16101
16101
|
return t3;
|
|
16102
16102
|
}
|
|
16103
|
-
const FireCMSEditor$1 = lazyEager(() => import("./editor-
|
|
16103
|
+
const FireCMSEditor$1 = lazyEager(() => import("./editor-WZytSO_1.js"), "FireCMSEditor");
|
|
16104
16104
|
function MarkdownEditorFieldBinding$1({
|
|
16105
16105
|
property,
|
|
16106
16106
|
propertyKey,
|
|
@@ -22162,21 +22162,24 @@ const cloneItemsForDnd = (items) => items.map((g) => ({
|
|
|
22162
22162
|
entries: g.entries.map(cloneSerializableNavigationEntry)
|
|
22163
22163
|
}));
|
|
22164
22164
|
function SortableNavigationCard(t0) {
|
|
22165
|
-
const $ = c(
|
|
22165
|
+
const $ = c(18);
|
|
22166
22166
|
const {
|
|
22167
22167
|
entry,
|
|
22168
|
-
onClick
|
|
22168
|
+
onClick,
|
|
22169
|
+
disabled
|
|
22169
22170
|
} = t0;
|
|
22170
22171
|
let t1;
|
|
22171
|
-
if ($[0] !== entry.url) {
|
|
22172
|
+
if ($[0] !== disabled || $[1] !== entry.url) {
|
|
22172
22173
|
t1 = {
|
|
22173
22174
|
id: entry.url,
|
|
22174
|
-
animateLayoutChanges
|
|
22175
|
+
animateLayoutChanges,
|
|
22176
|
+
disabled
|
|
22175
22177
|
};
|
|
22176
|
-
$[0] =
|
|
22177
|
-
$[1] =
|
|
22178
|
+
$[0] = disabled;
|
|
22179
|
+
$[1] = entry.url;
|
|
22180
|
+
$[2] = t1;
|
|
22178
22181
|
} else {
|
|
22179
|
-
t1 = $[
|
|
22182
|
+
t1 = $[2];
|
|
22180
22183
|
}
|
|
22181
22184
|
const {
|
|
22182
22185
|
setNodeRef,
|
|
@@ -22187,101 +22190,104 @@ function SortableNavigationCard(t0) {
|
|
|
22187
22190
|
isDragging
|
|
22188
22191
|
} = useSortable(t1);
|
|
22189
22192
|
let t2;
|
|
22190
|
-
if ($[
|
|
22193
|
+
if ($[3] !== transform) {
|
|
22191
22194
|
t2 = transform ? CSS.Transform.toString(transform) : void 0;
|
|
22192
|
-
$[
|
|
22193
|
-
$[
|
|
22195
|
+
$[3] = transform;
|
|
22196
|
+
$[4] = t2;
|
|
22194
22197
|
} else {
|
|
22195
|
-
t2 = $[
|
|
22198
|
+
t2 = $[4];
|
|
22196
22199
|
}
|
|
22197
22200
|
const t3 = isDragging ? 0 : 1;
|
|
22198
22201
|
let t4;
|
|
22199
|
-
if ($[
|
|
22202
|
+
if ($[5] !== t2 || $[6] !== t3 || $[7] !== transition) {
|
|
22200
22203
|
t4 = {
|
|
22201
22204
|
transform: t2,
|
|
22202
22205
|
transition,
|
|
22203
22206
|
opacity: t3
|
|
22204
22207
|
};
|
|
22205
|
-
$[
|
|
22206
|
-
$[
|
|
22207
|
-
$[
|
|
22208
|
-
$[
|
|
22208
|
+
$[5] = t2;
|
|
22209
|
+
$[6] = t3;
|
|
22210
|
+
$[7] = transition;
|
|
22211
|
+
$[8] = t4;
|
|
22209
22212
|
} else {
|
|
22210
|
-
t4 = $[
|
|
22213
|
+
t4 = $[8];
|
|
22211
22214
|
}
|
|
22212
22215
|
const style = t4;
|
|
22213
22216
|
let t5;
|
|
22214
|
-
if ($[
|
|
22217
|
+
if ($[9] !== entry || $[10] !== onClick) {
|
|
22215
22218
|
t5 = /* @__PURE__ */ jsx(NavigationCardBinding, { ...entry, onClick });
|
|
22216
|
-
$[
|
|
22217
|
-
$[
|
|
22218
|
-
$[
|
|
22219
|
+
$[9] = entry;
|
|
22220
|
+
$[10] = onClick;
|
|
22221
|
+
$[11] = t5;
|
|
22219
22222
|
} else {
|
|
22220
|
-
t5 = $[
|
|
22223
|
+
t5 = $[11];
|
|
22221
22224
|
}
|
|
22222
22225
|
let t6;
|
|
22223
|
-
if ($[
|
|
22226
|
+
if ($[12] !== attributes || $[13] !== listeners2 || $[14] !== setNodeRef || $[15] !== style || $[16] !== t5) {
|
|
22224
22227
|
t6 = /* @__PURE__ */ jsx("div", { ref: setNodeRef, style, ...attributes, ...listeners2, children: t5 });
|
|
22225
|
-
$[
|
|
22226
|
-
$[
|
|
22227
|
-
$[
|
|
22228
|
-
$[
|
|
22229
|
-
$[
|
|
22230
|
-
$[
|
|
22228
|
+
$[12] = attributes;
|
|
22229
|
+
$[13] = listeners2;
|
|
22230
|
+
$[14] = setNodeRef;
|
|
22231
|
+
$[15] = style;
|
|
22232
|
+
$[16] = t5;
|
|
22233
|
+
$[17] = t6;
|
|
22231
22234
|
} else {
|
|
22232
|
-
t6 = $[
|
|
22235
|
+
t6 = $[17];
|
|
22233
22236
|
}
|
|
22234
22237
|
return t6;
|
|
22235
22238
|
}
|
|
22236
22239
|
function NavigationGroupDroppable(t0) {
|
|
22237
|
-
const $ = c(
|
|
22240
|
+
const $ = c(12);
|
|
22238
22241
|
const {
|
|
22239
22242
|
id,
|
|
22240
22243
|
itemIds,
|
|
22241
22244
|
children,
|
|
22242
|
-
isPotentialCardDropTarget: t1
|
|
22245
|
+
isPotentialCardDropTarget: t1,
|
|
22246
|
+
disabled
|
|
22243
22247
|
} = t0;
|
|
22244
22248
|
const isPotentialCardDropTarget = t1 === void 0 ? false : t1;
|
|
22245
22249
|
let t2;
|
|
22246
|
-
if ($[0] !== id) {
|
|
22250
|
+
if ($[0] !== disabled || $[1] !== id) {
|
|
22247
22251
|
t2 = {
|
|
22248
|
-
id
|
|
22252
|
+
id,
|
|
22253
|
+
disabled
|
|
22249
22254
|
};
|
|
22250
|
-
$[0] =
|
|
22251
|
-
$[1] =
|
|
22255
|
+
$[0] = disabled;
|
|
22256
|
+
$[1] = id;
|
|
22257
|
+
$[2] = t2;
|
|
22252
22258
|
} else {
|
|
22253
|
-
t2 = $[
|
|
22259
|
+
t2 = $[2];
|
|
22254
22260
|
}
|
|
22255
22261
|
const {
|
|
22256
22262
|
setNodeRef
|
|
22257
22263
|
} = useDroppable(t2);
|
|
22258
22264
|
const t3 = isPotentialCardDropTarget ? "p-2 bg-surface-accent-200 dark:bg-surface-accent-800 rounded-lg" : void 0;
|
|
22259
22265
|
let t4;
|
|
22260
|
-
if ($[
|
|
22266
|
+
if ($[3] !== t3) {
|
|
22261
22267
|
t4 = cls(t3, "transition-all duration-200 ease-in-out");
|
|
22262
|
-
$[
|
|
22263
|
-
$[
|
|
22268
|
+
$[3] = t3;
|
|
22269
|
+
$[4] = t4;
|
|
22264
22270
|
} else {
|
|
22265
|
-
t4 = $[
|
|
22271
|
+
t4 = $[4];
|
|
22266
22272
|
}
|
|
22267
22273
|
let t5;
|
|
22268
|
-
if ($[
|
|
22274
|
+
if ($[5] !== children || $[6] !== itemIds) {
|
|
22269
22275
|
t5 = /* @__PURE__ */ jsx(SortableContext, { items: itemIds, strategy: rectSortingStrategy, children });
|
|
22270
|
-
$[
|
|
22271
|
-
$[
|
|
22272
|
-
$[
|
|
22276
|
+
$[5] = children;
|
|
22277
|
+
$[6] = itemIds;
|
|
22278
|
+
$[7] = t5;
|
|
22273
22279
|
} else {
|
|
22274
|
-
t5 = $[
|
|
22280
|
+
t5 = $[7];
|
|
22275
22281
|
}
|
|
22276
22282
|
let t6;
|
|
22277
|
-
if ($[
|
|
22283
|
+
if ($[8] !== setNodeRef || $[9] !== t4 || $[10] !== t5) {
|
|
22278
22284
|
t6 = /* @__PURE__ */ jsx("div", { ref: setNodeRef, className: t4, children: t5 });
|
|
22279
|
-
$[
|
|
22280
|
-
$[
|
|
22281
|
-
$[
|
|
22282
|
-
$[
|
|
22285
|
+
$[8] = setNodeRef;
|
|
22286
|
+
$[9] = t4;
|
|
22287
|
+
$[10] = t5;
|
|
22288
|
+
$[11] = t6;
|
|
22283
22289
|
} else {
|
|
22284
|
-
t6 = $[
|
|
22290
|
+
t6 = $[11];
|
|
22285
22291
|
}
|
|
22286
22292
|
return t6;
|
|
22287
22293
|
}
|
|
@@ -23266,8 +23272,8 @@ function DefaultHomePage({
|
|
|
23266
23272
|
return /* @__PURE__ */ jsx(SortableNavigationGroup, { groupName: groupKey, disabled: dndDisabled, children: /* @__PURE__ */ jsx(NavigationGroup, { group: groupKey === DEFAULT_GROUP_KEY ? void 0 : groupKey, minimised: draggingGroupId === groupKey && !isDraggingCardOnly, isPotentialCardDropTarget: isDraggingCardOnly, dndDisabled, onEditGroup: () => {
|
|
23267
23273
|
if (dndDisabled) return;
|
|
23268
23274
|
setDialogOpenForGroup(groupKey);
|
|
23269
|
-
}, collapsed: isGroupCollapsed(groupKey), onToggleCollapsed: () => toggleGroupCollapsed(groupKey), children: /* @__PURE__ */ jsx(NavigationGroupDroppable, { id: groupKey, itemIds: entriesInGroup.map((e_4) => e_4.url), isPotentialCardDropTarget: isDraggingCardOnly, children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 ", children: [
|
|
23270
|
-
entriesInGroup.map((entry) => /* @__PURE__ */ jsx(SortableNavigationCard, { entry, onClick: () => {
|
|
23275
|
+
}, collapsed: isGroupCollapsed(groupKey), onToggleCollapsed: () => toggleGroupCollapsed(groupKey), children: /* @__PURE__ */ jsx(NavigationGroupDroppable, { id: groupKey, itemIds: entriesInGroup.map((e_4) => e_4.url), isPotentialCardDropTarget: isDraggingCardOnly, disabled: dndDisabled, children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 ", children: [
|
|
23276
|
+
entriesInGroup.map((entry) => /* @__PURE__ */ jsx(SortableNavigationCard, { entry, disabled: dndDisabled, onClick: () => {
|
|
23271
23277
|
let event = "unmapped_event";
|
|
23272
23278
|
if (entry.type === "collection") event = "home_navigate_to_collection";
|
|
23273
23279
|
else if (entry.type === "view") event = "home_navigate_to_view";
|
|
@@ -35012,6 +35018,7 @@ const en = {
|
|
|
35012
35018
|
editor_cancel: "Cancel",
|
|
35013
35019
|
editor_remove_link: "Remove link",
|
|
35014
35020
|
editor_paste_or_type_link: "Paste or type link",
|
|
35021
|
+
editor_invalid_url: "Invalid URL",
|
|
35015
35022
|
editor_open_in_new_window: "Open in new window",
|
|
35016
35023
|
editor_bold: "Bold",
|
|
35017
35024
|
editor_italic: "Italic",
|
|
@@ -35717,6 +35724,7 @@ const es = {
|
|
|
35717
35724
|
editor_cancel: "Cancelar",
|
|
35718
35725
|
editor_remove_link: "Eliminar enlace",
|
|
35719
35726
|
editor_paste_or_type_link: "Pega o escribe el enlace",
|
|
35727
|
+
editor_invalid_url: "URL no válida",
|
|
35720
35728
|
editor_open_in_new_window: "Abrir en una ventana nueva",
|
|
35721
35729
|
editor_bold: "Negrita",
|
|
35722
35730
|
editor_italic: "Cursiva",
|
|
@@ -35814,12 +35822,12 @@ const es = {
|
|
|
35814
35822
|
};
|
|
35815
35823
|
const FIRECMS_NS = "firecms_core";
|
|
35816
35824
|
const localeLoaders = {
|
|
35817
|
-
de: () => import("./de-
|
|
35818
|
-
fr: () => import("./fr-
|
|
35819
|
-
it: () => import("./it-
|
|
35820
|
-
hi: () => import("./hi-
|
|
35821
|
-
pt: () => import("./pt-
|
|
35822
|
-
pl: () => import("./pl-
|
|
35825
|
+
de: () => import("./de-CUF9f7S-.js").then((m) => m.de),
|
|
35826
|
+
fr: () => import("./fr-DmkMX6hp.js").then((m) => m.fr),
|
|
35827
|
+
it: () => import("./it-BwQflFGz.js").then((m) => m.it),
|
|
35828
|
+
hi: () => import("./hi-BKuaMr7w.js").then((m) => m.hi),
|
|
35829
|
+
pt: () => import("./pt-D5q7OQp1.js").then((m) => m.pt),
|
|
35830
|
+
pl: () => import("./pl-BPsAvZvc.js").then((m) => m.pl)
|
|
35823
35831
|
};
|
|
35824
35832
|
const loadedLocales = {
|
|
35825
35833
|
en,
|
|
@@ -35988,7 +35996,7 @@ function buildResources(translations) {
|
|
|
35988
35996
|
}
|
|
35989
35997
|
return resources;
|
|
35990
35998
|
}
|
|
35991
|
-
const LazyFireCMSEditor = React__default.lazy(() => import("./editor-
|
|
35999
|
+
const LazyFireCMSEditor = React__default.lazy(() => import("./editor-WZytSO_1.js").then((module) => ({
|
|
35992
36000
|
default: module.FireCMSEditor
|
|
35993
36001
|
})));
|
|
35994
36002
|
function FireCMSEditor(props) {
|