@ozguraltan/strapi-content-input 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin/{ContentInputField-BM2WS_KZ.js → ContentInputField-BKP5B-ap.js} +60 -17
- package/dist/admin/{ContentInputField-D6rlm6Te.mjs → ContentInputField-D-oLSSaU.mjs} +60 -17
- package/dist/admin/{index-IuCWhUHI.js → index-CEOkAoB9.js} +1 -1
- package/dist/admin/{index-BA2XyNVO.mjs → index-DjfM5X8R.mjs} +1 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const reactDom = require("react-dom");
|
|
6
6
|
const cloneDeep = require("lodash/cloneDeep");
|
|
7
|
-
const index = require("./index-
|
|
7
|
+
const index = require("./index-CEOkAoB9.js");
|
|
8
8
|
const admin = require("@strapi/strapi/admin");
|
|
9
9
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
10
10
|
const React__default = /* @__PURE__ */ _interopDefault(React);
|
|
@@ -2894,6 +2894,7 @@ const VENodeToolbar = ({
|
|
|
2894
2894
|
onDragStart,
|
|
2895
2895
|
onDragEnd
|
|
2896
2896
|
}) => {
|
|
2897
|
+
const { t } = useEditorTranslator();
|
|
2897
2898
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2898
2899
|
"div",
|
|
2899
2900
|
{
|
|
@@ -2903,7 +2904,7 @@ const VENodeToolbar = ({
|
|
|
2903
2904
|
onDragEnd,
|
|
2904
2905
|
onClick: (e) => e.stopPropagation(),
|
|
2905
2906
|
style: { cursor: onDragStart ? "grab" : "default" },
|
|
2906
|
-
title: "
|
|
2907
|
+
title: t("field.dragToReorderRow", "Drag to reorder"),
|
|
2907
2908
|
children: [
|
|
2908
2909
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2909
2910
|
"span",
|
|
@@ -2926,7 +2927,7 @@ const VENodeToolbar = ({
|
|
|
2926
2927
|
{
|
|
2927
2928
|
type: "button",
|
|
2928
2929
|
className: "ve-node-toolbar__btn",
|
|
2929
|
-
title: "
|
|
2930
|
+
title: `${t("contextMenu.moveUp", "Move Up")} (Alt+↑)`,
|
|
2930
2931
|
onClick: onMoveUp,
|
|
2931
2932
|
children: /* @__PURE__ */ jsxRuntime.jsx(index.MaterialIcon, { name: "arrow_upward", size: 13, color: "#fff" })
|
|
2932
2933
|
}
|
|
@@ -2936,7 +2937,7 @@ const VENodeToolbar = ({
|
|
|
2936
2937
|
{
|
|
2937
2938
|
type: "button",
|
|
2938
2939
|
className: "ve-node-toolbar__btn",
|
|
2939
|
-
title: "
|
|
2940
|
+
title: `${t("contextMenu.moveDown", "Move Down")} (Alt+↓)`,
|
|
2940
2941
|
onClick: onMoveDown,
|
|
2941
2942
|
children: /* @__PURE__ */ jsxRuntime.jsx(index.MaterialIcon, { name: "arrow_downward", size: 13, color: "#fff" })
|
|
2942
2943
|
}
|
|
@@ -2946,7 +2947,7 @@ const VENodeToolbar = ({
|
|
|
2946
2947
|
{
|
|
2947
2948
|
type: "button",
|
|
2948
2949
|
className: "ve-node-toolbar__btn",
|
|
2949
|
-
title: "
|
|
2950
|
+
title: t("common.settings", "Settings"),
|
|
2950
2951
|
onClick: onSettings,
|
|
2951
2952
|
children: /* @__PURE__ */ jsxRuntime.jsx(index.MaterialIcon, { name: "tune", size: 13, color: "#fff" })
|
|
2952
2953
|
}
|
|
@@ -2956,7 +2957,7 @@ const VENodeToolbar = ({
|
|
|
2956
2957
|
{
|
|
2957
2958
|
type: "button",
|
|
2958
2959
|
className: "ve-node-toolbar__btn",
|
|
2959
|
-
title: "
|
|
2960
|
+
title: `${t("common.duplicate", "Duplicate")} (Ctrl+D)`,
|
|
2960
2961
|
onClick: onDuplicate,
|
|
2961
2962
|
children: /* @__PURE__ */ jsxRuntime.jsx(index.MaterialIcon, { name: "content_copy", size: 13, color: "#fff" })
|
|
2962
2963
|
}
|
|
@@ -2966,7 +2967,7 @@ const VENodeToolbar = ({
|
|
|
2966
2967
|
{
|
|
2967
2968
|
type: "button",
|
|
2968
2969
|
className: "ve-node-toolbar__btn ve-node-toolbar__btn--danger",
|
|
2969
|
-
title: "
|
|
2970
|
+
title: `${t("common.delete", "Delete")} (Delete)`,
|
|
2970
2971
|
onClick: onDelete,
|
|
2971
2972
|
children: /* @__PURE__ */ jsxRuntime.jsx(index.MaterialIcon, { name: "delete_outline", size: 13, color: "#fff" })
|
|
2972
2973
|
}
|
|
@@ -10090,6 +10091,7 @@ const VELeftPanel = ({ width = 280 }) => {
|
|
|
10090
10091
|
type: "button",
|
|
10091
10092
|
draggable: true,
|
|
10092
10093
|
onDragStart: (e) => {
|
|
10094
|
+
e.stopPropagation();
|
|
10093
10095
|
const payload = {
|
|
10094
10096
|
type: "new-row-preset",
|
|
10095
10097
|
cols: preset.cols
|
|
@@ -10098,7 +10100,10 @@ const VELeftPanel = ({ width = 280 }) => {
|
|
|
10098
10100
|
e.dataTransfer.effectAllowed = "copy";
|
|
10099
10101
|
e.dataTransfer.setData("application/x-ci-dnd", JSON.stringify(payload));
|
|
10100
10102
|
},
|
|
10101
|
-
onDragEnd: () =>
|
|
10103
|
+
onDragEnd: (e) => {
|
|
10104
|
+
e.stopPropagation();
|
|
10105
|
+
editor.setDragItem(null);
|
|
10106
|
+
},
|
|
10102
10107
|
onClick: () => editor.addRowPreset(preset.cols),
|
|
10103
10108
|
title: `${presetLabel} (${t("leftPanel.clickOrDrag", "Click or drag onto canvas")})`,
|
|
10104
10109
|
style: {
|
|
@@ -10170,6 +10175,7 @@ const VELeftPanel = ({ width = 280 }) => {
|
|
|
10170
10175
|
type: "button",
|
|
10171
10176
|
draggable: true,
|
|
10172
10177
|
onDragStart: (e) => {
|
|
10178
|
+
e.stopPropagation();
|
|
10173
10179
|
const payload = {
|
|
10174
10180
|
type: "new-widget",
|
|
10175
10181
|
widgetId: w.id
|
|
@@ -10178,7 +10184,10 @@ const VELeftPanel = ({ width = 280 }) => {
|
|
|
10178
10184
|
e.dataTransfer.effectAllowed = "copy";
|
|
10179
10185
|
e.dataTransfer.setData("application/x-ci-dnd", JSON.stringify(payload));
|
|
10180
10186
|
},
|
|
10181
|
-
onDragEnd: () =>
|
|
10187
|
+
onDragEnd: (e) => {
|
|
10188
|
+
e.stopPropagation();
|
|
10189
|
+
editor.setDragItem(null);
|
|
10190
|
+
},
|
|
10182
10191
|
onClick: () => handleWidgetQuickAdd(w.id),
|
|
10183
10192
|
title: `${wDesc} (${t("leftPanel.clickOrDragBlock", "Click or drag into block")})`,
|
|
10184
10193
|
style: {
|
|
@@ -10251,10 +10260,13 @@ const VELeftPanel = ({ width = 280 }) => {
|
|
|
10251
10260
|
draggable: true,
|
|
10252
10261
|
onDragStart: (e) => {
|
|
10253
10262
|
e.stopPropagation();
|
|
10254
|
-
|
|
10263
|
+
const payload = { type: "row", rowIndex: rIdx };
|
|
10264
|
+
editor.setDragItem(payload);
|
|
10255
10265
|
e.dataTransfer.effectAllowed = "move";
|
|
10266
|
+
e.dataTransfer.setData("application/x-ci-dnd", JSON.stringify(payload));
|
|
10256
10267
|
},
|
|
10257
|
-
onDragEnd: () => {
|
|
10268
|
+
onDragEnd: (e) => {
|
|
10269
|
+
e.stopPropagation();
|
|
10258
10270
|
editor.setDragItem(null);
|
|
10259
10271
|
setLayerDropTarget(null);
|
|
10260
10272
|
},
|
|
@@ -10337,14 +10349,17 @@ const VELeftPanel = ({ width = 280 }) => {
|
|
|
10337
10349
|
draggable: true,
|
|
10338
10350
|
onDragStart: (e) => {
|
|
10339
10351
|
e.stopPropagation();
|
|
10340
|
-
|
|
10352
|
+
const payload = {
|
|
10341
10353
|
type: "block",
|
|
10342
10354
|
rowIndex: rIdx,
|
|
10343
10355
|
blockIndex: bIdx
|
|
10344
|
-
}
|
|
10356
|
+
};
|
|
10357
|
+
editor.setDragItem(payload);
|
|
10345
10358
|
e.dataTransfer.effectAllowed = "move";
|
|
10359
|
+
e.dataTransfer.setData("application/x-ci-dnd", JSON.stringify(payload));
|
|
10346
10360
|
},
|
|
10347
|
-
onDragEnd: () => {
|
|
10361
|
+
onDragEnd: (e) => {
|
|
10362
|
+
e.stopPropagation();
|
|
10348
10363
|
editor.setDragItem(null);
|
|
10349
10364
|
setLayerDropTarget(null);
|
|
10350
10365
|
},
|
|
@@ -10435,15 +10450,18 @@ const VELeftPanel = ({ width = 280 }) => {
|
|
|
10435
10450
|
draggable: true,
|
|
10436
10451
|
onDragStart: (e) => {
|
|
10437
10452
|
e.stopPropagation();
|
|
10438
|
-
|
|
10453
|
+
const payload = {
|
|
10439
10454
|
type: "widget",
|
|
10440
10455
|
rowIndex: rIdx,
|
|
10441
10456
|
blockIndex: bIdx,
|
|
10442
10457
|
widgetIndex: wIdx
|
|
10443
|
-
}
|
|
10458
|
+
};
|
|
10459
|
+
editor.setDragItem(payload);
|
|
10444
10460
|
e.dataTransfer.effectAllowed = "move";
|
|
10461
|
+
e.dataTransfer.setData("application/x-ci-dnd", JSON.stringify(payload));
|
|
10445
10462
|
},
|
|
10446
|
-
onDragEnd: () => {
|
|
10463
|
+
onDragEnd: (e) => {
|
|
10464
|
+
e.stopPropagation();
|
|
10447
10465
|
editor.setDragItem(null);
|
|
10448
10466
|
setLayerDropTarget(null);
|
|
10449
10467
|
},
|
|
@@ -10925,6 +10943,31 @@ const VECanvas = () => {
|
|
|
10925
10943
|
textAlign: "center"
|
|
10926
10944
|
},
|
|
10927
10945
|
onClick: (e) => e.stopPropagation(),
|
|
10946
|
+
onDragOver: (e) => {
|
|
10947
|
+
const d = editor.dragItem;
|
|
10948
|
+
if (!d || d.type !== "new-row-preset" && d.type !== "new-widget") return;
|
|
10949
|
+
e.preventDefault();
|
|
10950
|
+
e.stopPropagation();
|
|
10951
|
+
e.dataTransfer.dropEffect = "copy";
|
|
10952
|
+
},
|
|
10953
|
+
onDrop: (e) => {
|
|
10954
|
+
const d = editor.dragItem;
|
|
10955
|
+
if (!d) return;
|
|
10956
|
+
if (d.type === "new-row-preset") {
|
|
10957
|
+
e.preventDefault();
|
|
10958
|
+
e.stopPropagation();
|
|
10959
|
+
editor.setDragItem(null);
|
|
10960
|
+
editor.addRowPreset(d.cols);
|
|
10961
|
+
} else if (d.type === "new-widget") {
|
|
10962
|
+
e.preventDefault();
|
|
10963
|
+
e.stopPropagation();
|
|
10964
|
+
editor.setDragItem(null);
|
|
10965
|
+
editor.addRowPreset([[12, 12, 12, 12, 12]]);
|
|
10966
|
+
setTimeout(() => {
|
|
10967
|
+
editor.addWidget(0, 0, d.widgetId);
|
|
10968
|
+
}, 0);
|
|
10969
|
+
}
|
|
10970
|
+
},
|
|
10928
10971
|
children: [
|
|
10929
10972
|
/* @__PURE__ */ jsxRuntime.jsx(index.MaterialIcon, { name: "dashboard_customize", size: 38, color: "#2669a0" }),
|
|
10930
10973
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
|
2
2
|
import React, { useState, useMemo, useRef, createContext, useContext, useEffect } from "react";
|
|
3
3
|
import { createPortal } from "react-dom";
|
|
4
4
|
import cloneDeep from "lodash/cloneDeep";
|
|
5
|
-
import { M as MaterialIcon } from "./index-
|
|
5
|
+
import { M as MaterialIcon } from "./index-DjfM5X8R.mjs";
|
|
6
6
|
import { useFetchClient } from "@strapi/strapi/admin";
|
|
7
7
|
const ROW_PRESETS = [
|
|
8
8
|
{
|
|
@@ -2889,6 +2889,7 @@ const VENodeToolbar = ({
|
|
|
2889
2889
|
onDragStart,
|
|
2890
2890
|
onDragEnd
|
|
2891
2891
|
}) => {
|
|
2892
|
+
const { t } = useEditorTranslator();
|
|
2892
2893
|
return /* @__PURE__ */ jsxs(
|
|
2893
2894
|
"div",
|
|
2894
2895
|
{
|
|
@@ -2898,7 +2899,7 @@ const VENodeToolbar = ({
|
|
|
2898
2899
|
onDragEnd,
|
|
2899
2900
|
onClick: (e) => e.stopPropagation(),
|
|
2900
2901
|
style: { cursor: onDragStart ? "grab" : "default" },
|
|
2901
|
-
title: "
|
|
2902
|
+
title: t("field.dragToReorderRow", "Drag to reorder"),
|
|
2902
2903
|
children: [
|
|
2903
2904
|
/* @__PURE__ */ jsxs(
|
|
2904
2905
|
"span",
|
|
@@ -2921,7 +2922,7 @@ const VENodeToolbar = ({
|
|
|
2921
2922
|
{
|
|
2922
2923
|
type: "button",
|
|
2923
2924
|
className: "ve-node-toolbar__btn",
|
|
2924
|
-
title: "
|
|
2925
|
+
title: `${t("contextMenu.moveUp", "Move Up")} (Alt+↑)`,
|
|
2925
2926
|
onClick: onMoveUp,
|
|
2926
2927
|
children: /* @__PURE__ */ jsx(MaterialIcon, { name: "arrow_upward", size: 13, color: "#fff" })
|
|
2927
2928
|
}
|
|
@@ -2931,7 +2932,7 @@ const VENodeToolbar = ({
|
|
|
2931
2932
|
{
|
|
2932
2933
|
type: "button",
|
|
2933
2934
|
className: "ve-node-toolbar__btn",
|
|
2934
|
-
title: "
|
|
2935
|
+
title: `${t("contextMenu.moveDown", "Move Down")} (Alt+↓)`,
|
|
2935
2936
|
onClick: onMoveDown,
|
|
2936
2937
|
children: /* @__PURE__ */ jsx(MaterialIcon, { name: "arrow_downward", size: 13, color: "#fff" })
|
|
2937
2938
|
}
|
|
@@ -2941,7 +2942,7 @@ const VENodeToolbar = ({
|
|
|
2941
2942
|
{
|
|
2942
2943
|
type: "button",
|
|
2943
2944
|
className: "ve-node-toolbar__btn",
|
|
2944
|
-
title: "
|
|
2945
|
+
title: t("common.settings", "Settings"),
|
|
2945
2946
|
onClick: onSettings,
|
|
2946
2947
|
children: /* @__PURE__ */ jsx(MaterialIcon, { name: "tune", size: 13, color: "#fff" })
|
|
2947
2948
|
}
|
|
@@ -2951,7 +2952,7 @@ const VENodeToolbar = ({
|
|
|
2951
2952
|
{
|
|
2952
2953
|
type: "button",
|
|
2953
2954
|
className: "ve-node-toolbar__btn",
|
|
2954
|
-
title: "
|
|
2955
|
+
title: `${t("common.duplicate", "Duplicate")} (Ctrl+D)`,
|
|
2955
2956
|
onClick: onDuplicate,
|
|
2956
2957
|
children: /* @__PURE__ */ jsx(MaterialIcon, { name: "content_copy", size: 13, color: "#fff" })
|
|
2957
2958
|
}
|
|
@@ -2961,7 +2962,7 @@ const VENodeToolbar = ({
|
|
|
2961
2962
|
{
|
|
2962
2963
|
type: "button",
|
|
2963
2964
|
className: "ve-node-toolbar__btn ve-node-toolbar__btn--danger",
|
|
2964
|
-
title: "
|
|
2965
|
+
title: `${t("common.delete", "Delete")} (Delete)`,
|
|
2965
2966
|
onClick: onDelete,
|
|
2966
2967
|
children: /* @__PURE__ */ jsx(MaterialIcon, { name: "delete_outline", size: 13, color: "#fff" })
|
|
2967
2968
|
}
|
|
@@ -10085,6 +10086,7 @@ const VELeftPanel = ({ width = 280 }) => {
|
|
|
10085
10086
|
type: "button",
|
|
10086
10087
|
draggable: true,
|
|
10087
10088
|
onDragStart: (e) => {
|
|
10089
|
+
e.stopPropagation();
|
|
10088
10090
|
const payload = {
|
|
10089
10091
|
type: "new-row-preset",
|
|
10090
10092
|
cols: preset.cols
|
|
@@ -10093,7 +10095,10 @@ const VELeftPanel = ({ width = 280 }) => {
|
|
|
10093
10095
|
e.dataTransfer.effectAllowed = "copy";
|
|
10094
10096
|
e.dataTransfer.setData("application/x-ci-dnd", JSON.stringify(payload));
|
|
10095
10097
|
},
|
|
10096
|
-
onDragEnd: () =>
|
|
10098
|
+
onDragEnd: (e) => {
|
|
10099
|
+
e.stopPropagation();
|
|
10100
|
+
editor.setDragItem(null);
|
|
10101
|
+
},
|
|
10097
10102
|
onClick: () => editor.addRowPreset(preset.cols),
|
|
10098
10103
|
title: `${presetLabel} (${t("leftPanel.clickOrDrag", "Click or drag onto canvas")})`,
|
|
10099
10104
|
style: {
|
|
@@ -10165,6 +10170,7 @@ const VELeftPanel = ({ width = 280 }) => {
|
|
|
10165
10170
|
type: "button",
|
|
10166
10171
|
draggable: true,
|
|
10167
10172
|
onDragStart: (e) => {
|
|
10173
|
+
e.stopPropagation();
|
|
10168
10174
|
const payload = {
|
|
10169
10175
|
type: "new-widget",
|
|
10170
10176
|
widgetId: w.id
|
|
@@ -10173,7 +10179,10 @@ const VELeftPanel = ({ width = 280 }) => {
|
|
|
10173
10179
|
e.dataTransfer.effectAllowed = "copy";
|
|
10174
10180
|
e.dataTransfer.setData("application/x-ci-dnd", JSON.stringify(payload));
|
|
10175
10181
|
},
|
|
10176
|
-
onDragEnd: () =>
|
|
10182
|
+
onDragEnd: (e) => {
|
|
10183
|
+
e.stopPropagation();
|
|
10184
|
+
editor.setDragItem(null);
|
|
10185
|
+
},
|
|
10177
10186
|
onClick: () => handleWidgetQuickAdd(w.id),
|
|
10178
10187
|
title: `${wDesc} (${t("leftPanel.clickOrDragBlock", "Click or drag into block")})`,
|
|
10179
10188
|
style: {
|
|
@@ -10246,10 +10255,13 @@ const VELeftPanel = ({ width = 280 }) => {
|
|
|
10246
10255
|
draggable: true,
|
|
10247
10256
|
onDragStart: (e) => {
|
|
10248
10257
|
e.stopPropagation();
|
|
10249
|
-
|
|
10258
|
+
const payload = { type: "row", rowIndex: rIdx };
|
|
10259
|
+
editor.setDragItem(payload);
|
|
10250
10260
|
e.dataTransfer.effectAllowed = "move";
|
|
10261
|
+
e.dataTransfer.setData("application/x-ci-dnd", JSON.stringify(payload));
|
|
10251
10262
|
},
|
|
10252
|
-
onDragEnd: () => {
|
|
10263
|
+
onDragEnd: (e) => {
|
|
10264
|
+
e.stopPropagation();
|
|
10253
10265
|
editor.setDragItem(null);
|
|
10254
10266
|
setLayerDropTarget(null);
|
|
10255
10267
|
},
|
|
@@ -10332,14 +10344,17 @@ const VELeftPanel = ({ width = 280 }) => {
|
|
|
10332
10344
|
draggable: true,
|
|
10333
10345
|
onDragStart: (e) => {
|
|
10334
10346
|
e.stopPropagation();
|
|
10335
|
-
|
|
10347
|
+
const payload = {
|
|
10336
10348
|
type: "block",
|
|
10337
10349
|
rowIndex: rIdx,
|
|
10338
10350
|
blockIndex: bIdx
|
|
10339
|
-
}
|
|
10351
|
+
};
|
|
10352
|
+
editor.setDragItem(payload);
|
|
10340
10353
|
e.dataTransfer.effectAllowed = "move";
|
|
10354
|
+
e.dataTransfer.setData("application/x-ci-dnd", JSON.stringify(payload));
|
|
10341
10355
|
},
|
|
10342
|
-
onDragEnd: () => {
|
|
10356
|
+
onDragEnd: (e) => {
|
|
10357
|
+
e.stopPropagation();
|
|
10343
10358
|
editor.setDragItem(null);
|
|
10344
10359
|
setLayerDropTarget(null);
|
|
10345
10360
|
},
|
|
@@ -10430,15 +10445,18 @@ const VELeftPanel = ({ width = 280 }) => {
|
|
|
10430
10445
|
draggable: true,
|
|
10431
10446
|
onDragStart: (e) => {
|
|
10432
10447
|
e.stopPropagation();
|
|
10433
|
-
|
|
10448
|
+
const payload = {
|
|
10434
10449
|
type: "widget",
|
|
10435
10450
|
rowIndex: rIdx,
|
|
10436
10451
|
blockIndex: bIdx,
|
|
10437
10452
|
widgetIndex: wIdx
|
|
10438
|
-
}
|
|
10453
|
+
};
|
|
10454
|
+
editor.setDragItem(payload);
|
|
10439
10455
|
e.dataTransfer.effectAllowed = "move";
|
|
10456
|
+
e.dataTransfer.setData("application/x-ci-dnd", JSON.stringify(payload));
|
|
10440
10457
|
},
|
|
10441
|
-
onDragEnd: () => {
|
|
10458
|
+
onDragEnd: (e) => {
|
|
10459
|
+
e.stopPropagation();
|
|
10442
10460
|
editor.setDragItem(null);
|
|
10443
10461
|
setLayerDropTarget(null);
|
|
10444
10462
|
},
|
|
@@ -10920,6 +10938,31 @@ const VECanvas = () => {
|
|
|
10920
10938
|
textAlign: "center"
|
|
10921
10939
|
},
|
|
10922
10940
|
onClick: (e) => e.stopPropagation(),
|
|
10941
|
+
onDragOver: (e) => {
|
|
10942
|
+
const d = editor.dragItem;
|
|
10943
|
+
if (!d || d.type !== "new-row-preset" && d.type !== "new-widget") return;
|
|
10944
|
+
e.preventDefault();
|
|
10945
|
+
e.stopPropagation();
|
|
10946
|
+
e.dataTransfer.dropEffect = "copy";
|
|
10947
|
+
},
|
|
10948
|
+
onDrop: (e) => {
|
|
10949
|
+
const d = editor.dragItem;
|
|
10950
|
+
if (!d) return;
|
|
10951
|
+
if (d.type === "new-row-preset") {
|
|
10952
|
+
e.preventDefault();
|
|
10953
|
+
e.stopPropagation();
|
|
10954
|
+
editor.setDragItem(null);
|
|
10955
|
+
editor.addRowPreset(d.cols);
|
|
10956
|
+
} else if (d.type === "new-widget") {
|
|
10957
|
+
e.preventDefault();
|
|
10958
|
+
e.stopPropagation();
|
|
10959
|
+
editor.setDragItem(null);
|
|
10960
|
+
editor.addRowPreset([[12, 12, 12, 12, 12]]);
|
|
10961
|
+
setTimeout(() => {
|
|
10962
|
+
editor.addWidget(0, 0, d.widgetId);
|
|
10963
|
+
}, 0);
|
|
10964
|
+
}
|
|
10965
|
+
},
|
|
10923
10966
|
children: [
|
|
10924
10967
|
/* @__PURE__ */ jsx(MaterialIcon, { name: "dashboard_customize", size: 38, color: "#2669a0" }),
|
|
10925
10968
|
/* @__PURE__ */ jsx(
|
|
@@ -124,7 +124,7 @@ const index = {
|
|
|
124
124
|
},
|
|
125
125
|
icon: PluginIcon,
|
|
126
126
|
components: {
|
|
127
|
-
Input: async () => Promise.resolve().then(() => require("./ContentInputField-
|
|
127
|
+
Input: async () => Promise.resolve().then(() => require("./ContentInputField-BKP5B-ap.js")).then((mod) => ({
|
|
128
128
|
default: mod.ContentInputField
|
|
129
129
|
}))
|
|
130
130
|
},
|
|
@@ -121,7 +121,7 @@ const index = {
|
|
|
121
121
|
},
|
|
122
122
|
icon: PluginIcon,
|
|
123
123
|
components: {
|
|
124
|
-
Input: async () => import("./ContentInputField-
|
|
124
|
+
Input: async () => import("./ContentInputField-D-oLSSaU.mjs").then((mod) => ({
|
|
125
125
|
default: mod.ContentInputField
|
|
126
126
|
}))
|
|
127
127
|
},
|
package/dist/admin/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const index = require("./index-
|
|
3
|
+
const index = require("./index-CEOkAoB9.js");
|
|
4
4
|
require("react");
|
|
5
5
|
exports.default = index.index;
|
package/dist/admin/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ozguraltan/strapi-content-input",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Locomotive CMS ContentInput visual page/content builder ported to Strapi v5 as a native JSONB Custom Field plugin.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ozgur Altan <ozguraltan05@gmail.com>",
|