pds-dev-kit-web-test 2.7.391 → 2.7.393

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.
@@ -74,33 +74,33 @@ var MOBILE_GRID_COLS = 8;
74
74
  var GLE_MIN_WIDTH_DESKTOP_PX = "".concat(GRID_CELL_MIN * DESKTOP_GRID_COLS, "px");
75
75
  var GLE_MIN_WIDTH_MOBILE_PX = "".concat(GRID_CELL_MIN * MOBILE_GRID_COLS, "px");
76
76
  var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
77
- var _a, _b, _c, _d, _e, _f;
78
- var _g = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _g.device, editingSectionId = _g.editingSectionId, mode = _g.mode, shortcutKeyMode = _g.shortcutKeyMode, zoomScale = _g.zoomScale, placementRestriction = _g.placementRestriction, sectionActionHandler = _g.sectionActionHandler;
77
+ var _a, _b, _c, _d;
78
+ var _e = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _e.device, editingSectionId = _e.editingSectionId, mode = _e.mode, shortcutKeyMode = _e.shortcutKeyMode, zoomScale = _e.zoomScale, placementRestriction = _e.placementRestriction, sectionActionHandler = _e.sectionActionHandler;
79
79
  var componentBlocks = props.componentBlocks, jsonProperties = props.jsonProperties;
80
80
  var sectionPedigree = jsonProperties === null || jsonProperties === void 0 ? void 0 : jsonProperties.pedigree;
81
- var _h = (0, react_1.useState)(sectionPedigree), pedigreeState = _h[0], setPedigreeState = _h[1];
81
+ var _f = (0, react_1.useState)(sectionPedigree), pedigreeState = _f[0], setPedigreeState = _f[1];
82
82
  (0, react_1.useEffect)(function () {
83
83
  setPedigreeState(sectionPedigree);
84
84
  }, [sectionPedigree]);
85
- var _j = jsonProperties, _k = _j.data, CB_PLACEMENT_PROP_SECTION = _k.CB_PLACEMENT_PROP_SECTION, CB_LAYOUT_PROP_PADDING = _k.CB_LAYOUT_PROP_PADDING, CB_CONTENT_PROP_SECTION = _k.CB_CONTENT_PROP_SECTION, zOrders = _j.zOrders;
85
+ var _g = jsonProperties, _h = _g.data, CB_PLACEMENT_PROP_SECTION = _h.CB_PLACEMENT_PROP_SECTION, CB_LAYOUT_PROP_PADDING = _h.CB_LAYOUT_PROP_PADDING, CB_CONTENT_PROP_SECTION = _h.CB_CONTENT_PROP_SECTION, zOrders = _g.zOrders;
86
86
  var colsDesktop = (_a = CB_PLACEMENT_PROP_SECTION.CB_PLACEMENT_PROP_SECTION_SPEC_COLS) !== null && _a !== void 0 ? _a : 24;
87
87
  var colsMobile = (_b = CB_PLACEMENT_PROP_SECTION['CB_PLACEMENT_PROP_SECTION_SPEC_COLS:MOBILE']) !== null && _b !== void 0 ? _b : 8;
88
- var _l = (0, react_1.useState)(null), selectedBlockId = _l[0], setSelectedBlockId = _l[1];
88
+ var _j = (0, react_1.useState)(null), selectedBlockId = _j[0], setSelectedBlockId = _j[1];
89
89
  var gleRef = (0, react_1.useRef)(null);
90
- var _m = (0, react_1.useState)(50), rowHeight = _m[0], setRowHeight = _m[1];
91
- var _o = (0, react_1.useState)(16), baseFontSize = _o[0], setBaseFontSize = _o[1];
90
+ var _k = (0, react_1.useState)(50), rowHeight = _k[0], setRowHeight = _k[1];
91
+ var _l = (0, react_1.useState)(16), baseFontSize = _l[0], setBaseFontSize = _l[1];
92
92
  var isMobile = device === 'MOBILE';
93
93
  var isEditMode = mode === 'EDIT';
94
94
  var layoutByDevice = device === 'DESKTOP' ? 'lg' : 'sm';
95
- var _p = (0, react_1.useState)(function () {
95
+ var _m = (0, react_1.useState)(function () {
96
96
  var _a = (0, util_1.parsePlacement)(componentBlocks !== null && componentBlocks !== void 0 ? componentBlocks : [], zOrders, placementRestriction), lg = _a.lg, sm = _a.sm;
97
97
  return {
98
98
  lg: lg,
99
99
  sm: sm
100
100
  };
101
- }), layouts = _p[0], setLayouts = _p[1];
102
- var _q = (0, react_1.useState)('ROOT'), editingGroupBlock = _q[0], setEditingGroupBlock = _q[1];
103
- var _r = (0, react_1.useState)([]), bulkBlockIds = _r[0], setBulkBlockIds = _r[1];
101
+ }), layouts = _m[0], setLayouts = _m[1];
102
+ var _o = (0, react_1.useState)('ROOT'), editingGroupBlock = _o[0], setEditingGroupBlock = _o[1];
103
+ var _p = (0, react_1.useState)([]), bulkBlockIds = _p[0], setBulkBlockIds = _p[1];
104
104
  (0, react_1.useEffect)(function () {
105
105
  if (editingGroupBlock) {
106
106
  var found = (0, group_1.findBlockByBlockId)(sectionPedigree, editingGroupBlock);
@@ -388,10 +388,10 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
388
388
  });
389
389
  return __spreadArray(__spreadArray([], collisions, true), [(0, group_1.formatCbIdToBlockId)(cdId1)], false);
390
390
  };
391
- var _s = (0, util_1.parseCustomSectionPlacement)({
391
+ var _q = (0, util_1.parseCustomSectionPlacement)({
392
392
  isMobile: isMobile,
393
393
  customSectionProps: CB_PLACEMENT_PROP_SECTION
394
- }), rows = _s.rows, width = _s.width, minHeight = _s.minHeight, isFullWidth = _s.isFullWidth;
394
+ }), rows = _q.rows, width = _q.width, minHeight = _q.minHeight, isFullWidth = _q.isFullWidth;
395
395
  var customSectionStyles = {
396
396
  minHeight: "".concat(minHeight, "vh"),
397
397
  width: '100%',
@@ -1051,7 +1051,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
1051
1051
  paddingBottom: padding.bottom,
1052
1052
  paddingRight: padding.right,
1053
1053
  paddingLeft: padding.left
1054
- } }, { children: (0, jsx_runtime_1.jsx)(Responsive, __assign({ selectedBlockId: (_e = (_d = (0, group_1.formatBlockIdToCbId)(selectedBlockId !== null && selectedBlockId !== void 0 ? selectedBlockId : '')) === null || _d === void 0 ? void 0 : _d.toString()) !== null && _e !== void 0 ? _e : '', sectionId: props.id.toString(), innerRef: innerRef, className: (0, clsx_1.clsx)({
1054
+ } }, { children: (0, jsx_runtime_1.jsx)(Responsive, __assign({ selectedBlockId: selectedBlockId !== null && selectedBlockId !== void 0 ? selectedBlockId : '', sectionId: props.id.toString(), innerRef: innerRef, className: (0, clsx_1.clsx)({
1055
1055
  'selected-grid-layout': editingSectionId === props.id
1056
1056
  }), allowOverlap: true, layouts: layouts, resizeHandles: ['nw', 'e', 'n', 'ne', 's', 'se', 'sw', 'w'], breakpoints: breakpoints, breakpoint: breakpoint, cols: { lg: colsDesktop, sm: colsMobile }, rowHeight: rowHeight, margin: [10, 10], style: {
1057
1057
  width: customSectionStyles.width,
@@ -1060,7 +1060,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
1060
1060
  fontSize: "".concat(baseFontSize, "px")
1061
1061
  }, onLayoutChange: onLayoutChange, onDragStart: onDragStart, onDragStop: onDragStop, onResizeStop: onResizeStop, onDragStopForGroup: onBulkDragStop, onFitToContent: onAutoFitContent, onWidthChange: onWidthChange, minNbRow: rows, isDraggable: isEditMode, isResizable: isEditMode, zoom: zoomScale,
1062
1062
  // GROUP
1063
- selectedGroupBlock: (_f = selectedBlockId === null || selectedBlockId === void 0 ? void 0 : selectedBlockId.toString()) !== null && _f !== void 0 ? _f : 'ROOT', editingGroupBlock: editingGroupBlock, blockStructure: newblock, bulkIds: bulkBlockIds, onDoubleClickGroup: onDoubleClickGroup, onClickGroup: onClickGroup, onDoubleClickOutsideGroup: onDoubleClickOutsideGroup, onContextGroup: onContextGroup }, { children: layouts[layoutByDevice].map(function (each, index) {
1063
+ selectedGroupBlock: (_d = selectedBlockId === null || selectedBlockId === void 0 ? void 0 : selectedBlockId.toString()) !== null && _d !== void 0 ? _d : 'ROOT', editingGroupBlock: editingGroupBlock, blockStructure: newblock, bulkIds: bulkBlockIds, onDoubleClickGroup: onDoubleClickGroup, onClickGroup: onClickGroup, onDoubleClickOutsideGroup: onDoubleClickOutsideGroup, onContextGroup: onContextGroup }, { children: layouts[layoutByDevice].map(function (each, index) {
1064
1064
  var matchedCB = componentBlocks === null || componentBlocks === void 0 ? void 0 : componentBlocks.find(function (cb) { return cb.id.toString() === each.i; });
1065
1065
  var isInBulk = bulkBlockIds.includes((0, group_1.formatCbIdToBlockId)(Number(each.i)));
1066
1066
  if (!matchedCB) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "2.7.391",
3
+ "version": "2.7.393",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
@@ -25,7 +25,7 @@
25
25
  "lottie-react": "^2.3.1",
26
26
  "nuka-carousel": "^4.8.4",
27
27
  "publ-echo": "^0.0.120",
28
- "publ-echo-test": "^0.0.374",
28
+ "publ-echo-test": "^0.0.375",
29
29
  "react-hook-form": "^7.28.1",
30
30
  "react-i18next": "^11.12.0",
31
31
  "react-router-dom": "^5.2.0",