pds-dev-kit-web-test 2.5.32 → 2.5.34
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.
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import type { ISection } from '../../types';
|
3
|
-
import type { Layout } from 'publ-echo/dist/lib/GridLayoutEditor/types';
|
3
|
+
import type { Layout } from 'publ-echo-test/dist/lib/GridLayoutEditor/types';
|
4
4
|
export type LayoutsType = {
|
5
5
|
sm: Layout;
|
6
6
|
lg: Layout;
|
@@ -346,26 +346,26 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
346
346
|
});
|
347
347
|
}
|
348
348
|
};
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
349
|
+
var onAutoFitContent = function (props) {
|
350
|
+
var prev = props.prev, item = props.item;
|
351
|
+
if (!isEditMode || !item) {
|
352
|
+
return;
|
353
|
+
}
|
354
|
+
var numberId = Number(item.i);
|
355
|
+
var isIdNumber = !Number.isNaN(numberId);
|
356
|
+
if (isLayoutPlacementSame(item, prev)) {
|
357
|
+
return;
|
358
|
+
}
|
359
|
+
if (isIdNumber) {
|
360
|
+
setSelectedCB(numberId);
|
361
|
+
}
|
362
|
+
if (sectionActionHandler && isIdNumber) {
|
363
|
+
sectionActionHandler({
|
364
|
+
type: '@CUSTOMSECTION/CB_AUTO_FIT_CONTENT',
|
365
|
+
payload: __assign(__assign({}, props), { details: { hadPaddingChanged: props.hasPaddingChanged } })
|
366
|
+
});
|
367
|
+
}
|
368
|
+
};
|
369
369
|
var onClickSection = function () {
|
370
370
|
if (!isEditMode) {
|
371
371
|
return;
|
@@ -456,9 +456,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
456
456
|
maxWidth: customSectionStyles.maxWidth,
|
457
457
|
minWidth: isMobile ? GLE_MIN_WIDTH_MOBILE_PX : GLE_MIN_WIDTH_DESKTOP_PX,
|
458
458
|
fontSize: "".concat(baseFontSize, "px")
|
459
|
-
}, onLayoutChange: onLayoutChange, onDragStart: onDragStart, onDragStop: onDragStop, onResizeStop: onResizeStop,
|
460
|
-
// onFitToContent={onAutoFitContent}
|
461
|
-
onWidthChange: onWidthChange, minNbRow: rows, isDraggable: isEditMode, isResizable: isEditMode }, { children: keepSimilarOrderToPreventRerender(layouts[layoutByDevice]).map(function (each, index) {
|
459
|
+
}, onLayoutChange: onLayoutChange, onDragStart: onDragStart, onDragStop: onDragStop, onResizeStop: onResizeStop, onFitToContent: onAutoFitContent, onWidthChange: onWidthChange, minNbRow: rows, isDraggable: isEditMode, isResizable: isEditMode }, { children: keepSimilarOrderToPreventRerender(layouts[layoutByDevice]).map(function (each, index) {
|
462
460
|
var _a;
|
463
461
|
if (each === null) {
|
464
462
|
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
|
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.34",
|
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.48",
|
27
27
|
"react-hook-form": "^7.28.1",
|
28
28
|
"react-i18next": "^11.12.0",
|
29
29
|
"react-router-dom": "^5.2.0",
|