pds-dev-kit-web-test 2.5.30 → 2.5.31
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.
@@ -79,14 +79,6 @@ type ActionHandlerPayload = {
|
|
79
79
|
'@CUSTOMSECTION/ESCAPE_ONE_FROM_GROUP': {
|
80
80
|
id: string;
|
81
81
|
};
|
82
|
-
'@CUSTOMSECTION/ON_DROP_FROM_OUTSIDE': {
|
83
|
-
layout: Layout;
|
84
|
-
layoutItem: LayoutItem;
|
85
|
-
data: any;
|
86
|
-
};
|
87
|
-
'@CUSTOMSECTION/ON_DROP_DRAG_OVER': {
|
88
|
-
e: any;
|
89
|
-
};
|
90
82
|
};
|
91
83
|
type ActionMap<M extends {
|
92
84
|
[index: string]: any;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import type { ISection } from '../../types';
|
3
|
-
import type { Layout } from 'publ-echo
|
3
|
+
import type { Layout } from 'publ-echo/dist/lib/GridLayoutEditor/types';
|
4
4
|
export type LayoutsType = {
|
5
5
|
sm: Layout;
|
6
6
|
lg: Layout;
|
@@ -53,7 +53,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
53
|
exports.S_gleStyles = void 0;
|
54
54
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
55
55
|
var publ_echo_test_1 = require("publ-echo-test");
|
56
|
-
var ReactGridLayout_1 = __importDefault(require("publ-echo
|
56
|
+
var ReactGridLayout_1 = __importDefault(require("publ-echo/dist/lib/GridLayoutEditor/ReactGridLayout"));
|
57
57
|
var react_1 = __importStar(require("react"));
|
58
58
|
var ErrorBoundary_1 = require("../../../DynamicLayout/components/Section/ErrorBoundary");
|
59
59
|
var dynamicLayoutContext_1 = require("../../../DynamicLayout/dynamicLayoutContext");
|
@@ -445,49 +445,18 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
445
445
|
}
|
446
446
|
return false;
|
447
447
|
})();
|
448
|
-
var _j = (0, react_1.useState)(), droppingItem = _j[0], setDroppingItem = _j[1];
|
449
|
-
var onDrop = function (layout, layoutItem, e) {
|
450
|
-
var data = e.dataTransfer.getData('text/plain');
|
451
|
-
console.log(data);
|
452
|
-
// alert(`Dropped element props:\n${JSON.stringify(layoutItem, ['x', 'y', 'w', 'h'], 2)}`);
|
453
|
-
if (!isEditMode) {
|
454
|
-
return;
|
455
|
-
}
|
456
|
-
sectionActionHandler &&
|
457
|
-
sectionActionHandler({
|
458
|
-
type: '@CUSTOMSECTION/ON_DROP_FROM_OUTSIDE',
|
459
|
-
payload: {
|
460
|
-
layout: layout,
|
461
|
-
layoutItem: layoutItem,
|
462
|
-
data: data
|
463
|
-
}
|
464
|
-
});
|
465
|
-
};
|
466
|
-
var onDropDragOver = function (e) {
|
467
|
-
if (!sectionActionHandler) {
|
468
|
-
return null;
|
469
|
-
}
|
470
|
-
// return sectionActionHandler({
|
471
|
-
// type: '@CUSTOMSECTION/ON_DROP_FROM_OUTSIDE',
|
472
|
-
// payload: {
|
473
|
-
// e
|
474
|
-
// }
|
475
|
-
// });
|
476
|
-
return null;
|
477
|
-
};
|
478
448
|
return ((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsxs)(exports.S_gleStyles, { children: [showSectionHiddenCover && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}), (0, jsx_runtime_1.jsx)(S_SectionWrapper, __assign({ ref: gleRef, "x-dlayout-section-type": "NO_NAME", onClick: onClickSection }, { children: (0, jsx_runtime_1.jsx)(components_1.CustomSection, __assign({}, props, { isMobile: isMobile, overrideStyles: {
|
479
449
|
minHeight: customSectionStyles.minHeight,
|
480
450
|
paddingTop: padding.top,
|
481
451
|
paddingBottom: padding.bottom,
|
482
452
|
paddingRight: padding.right,
|
483
453
|
paddingLeft: padding.left
|
484
|
-
} }, { children: (0, jsx_runtime_1.jsx)(Responsive, __assign({ innerRef: innerRef, allowOverlap: true,
|
454
|
+
} }, { children: (0, jsx_runtime_1.jsx)(Responsive, __assign({ innerRef: innerRef, allowOverlap: true, layouts: layouts, resizeHandles: ['nw', 'e', 'n', 'ne', 's', 'se', 'sw', 'w'], breakpoints: breakpoints, breakpoint: breakpoint, cols: { lg: 24, sm: 8 }, rowHeight: rowHeight, margin: [10, 10], style: {
|
485
455
|
width: customSectionStyles.width,
|
486
456
|
maxWidth: customSectionStyles.maxWidth,
|
487
457
|
minWidth: isMobile ? GLE_MIN_WIDTH_MOBILE_PX : GLE_MIN_WIDTH_DESKTOP_PX,
|
488
458
|
fontSize: "".concat(baseFontSize, "px")
|
489
|
-
}, onLayoutChange: onLayoutChange, onDragStart: onDragStart, onDragStop: onDragStop,
|
490
|
-
// droppingItem={droppingItem}
|
459
|
+
}, onLayoutChange: onLayoutChange, onDragStart: onDragStart, onDragStop: onDragStop, onResizeStop: onResizeStop,
|
491
460
|
// onFitToContent={onAutoFitContent}
|
492
461
|
onWidthChange: onWidthChange, minNbRow: rows, isDraggable: isEditMode, isResizable: isEditMode }, { children: keepSimilarOrderToPreventRerender(layouts[layoutByDevice]).map(function (each, index) {
|
493
462
|
var _a;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "pds-dev-kit-web-test",
|
3
|
-
"version": "2.5.
|
3
|
+
"version": "2.5.31",
|
4
4
|
"license": "MIT",
|
5
5
|
"private": false,
|
6
6
|
"main": "dist/index.js",
|
@@ -23,7 +23,7 @@
|
|
23
23
|
"lottie-react": "^2.3.1",
|
24
24
|
"nuka-carousel": "^4.8.4",
|
25
25
|
"publ-echo": "^0.0.45",
|
26
|
-
"publ-echo-test": "^0.0.
|
26
|
+
"publ-echo-test": "^0.0.39",
|
27
27
|
"react-hook-form": "^7.28.1",
|
28
28
|
"react-i18next": "^11.12.0",
|
29
29
|
"react-router-dom": "^5.2.0",
|