pds-dev-kit-web-test 2.5.207 → 2.5.209

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.
@@ -73,33 +73,33 @@ var MOBILE_GRID_COLS = 8;
73
73
  var GLE_MIN_WIDTH_DESKTOP_PX = "".concat(GRID_CELL_MIN * DESKTOP_GRID_COLS, "px");
74
74
  var GLE_MIN_WIDTH_MOBILE_PX = "".concat(GRID_CELL_MIN * MOBILE_GRID_COLS, "px");
75
75
  var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
76
- var _a, _b, _c;
77
- var _d = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _d.device, editingSectionId = _d.editingSectionId, mode = _d.mode, shortcutKeyMode = _d.shortcutKeyMode, sectionActionHandler = _d.sectionActionHandler, zoomScale = _d.zoomScale;
76
+ var _a, _b, _c, _d;
77
+ var _e = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _e.device, editingSectionId = _e.editingSectionId, mode = _e.mode, shortcutKeyMode = _e.shortcutKeyMode, sectionActionHandler = _e.sectionActionHandler, zoomScale = _e.zoomScale;
78
78
  var componentBlocks = props.componentBlocks, jsonProperties = props.jsonProperties;
79
79
  var sectionPedigree = jsonProperties === null || jsonProperties === void 0 ? void 0 : jsonProperties.pedigree;
80
- var _e = (0, react_1.useState)(sectionPedigree), pedigreeState = _e[0], setPedigreeState = _e[1];
80
+ var _f = (0, react_1.useState)(sectionPedigree), pedigreeState = _f[0], setPedigreeState = _f[1];
81
81
  (0, react_1.useEffect)(function () {
82
82
  setPedigreeState(sectionPedigree);
83
83
  }, [sectionPedigree]);
84
- var _f = jsonProperties, _g = _f.data, CB_PLACEMENT_PROP_SECTION = _g.CB_PLACEMENT_PROP_SECTION, CB_LAYOUT_PROP_PADDING = _g.CB_LAYOUT_PROP_PADDING, CB_CONTENT_PROP_SECTION = _g.CB_CONTENT_PROP_SECTION, zOrders = _f.zOrders;
84
+ 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;
85
85
  var colsDesktop = (_a = CB_PLACEMENT_PROP_SECTION.CB_PLACEMENT_PROP_SECTION_SPEC_COLS) !== null && _a !== void 0 ? _a : 24;
86
86
  var colsMobile = (_b = CB_PLACEMENT_PROP_SECTION['CB_PLACEMENT_PROP_SECTION_SPEC_COLS:MOBILE']) !== null && _b !== void 0 ? _b : 8;
87
- var _h = (0, react_1.useState)(null), selectedBlockId = _h[0], setSelectedBlockId = _h[1];
87
+ var _j = (0, react_1.useState)(null), selectedBlockId = _j[0], setSelectedBlockId = _j[1];
88
88
  var gleRef = (0, react_1.useRef)(null);
89
- var _j = (0, react_1.useState)(50), rowHeight = _j[0], setRowHeight = _j[1];
90
- var _k = (0, react_1.useState)(16), baseFontSize = _k[0], setBaseFontSize = _k[1];
89
+ var _k = (0, react_1.useState)(50), rowHeight = _k[0], setRowHeight = _k[1];
90
+ var _l = (0, react_1.useState)(16), baseFontSize = _l[0], setBaseFontSize = _l[1];
91
91
  var isMobile = device === 'MOBILE';
92
92
  var isEditMode = mode === 'EDIT';
93
93
  var layoutByDevice = device === 'DESKTOP' ? 'lg' : 'sm';
94
- var _l = (0, react_1.useState)(function () {
94
+ var _m = (0, react_1.useState)(function () {
95
95
  var _a = (0, util_1.parsePlacement)(componentBlocks !== null && componentBlocks !== void 0 ? componentBlocks : [], zOrders), lg = _a.lg, sm = _a.sm;
96
96
  return {
97
97
  lg: lg,
98
98
  sm: sm
99
99
  };
100
- }), layouts = _l[0], setLayouts = _l[1];
101
- var _m = (0, react_1.useState)('ROOT'), editingGroupBlock = _m[0], setEditingGroupBlock = _m[1];
102
- var _o = (0, react_1.useState)([]), bulkBlockIds = _o[0], setBulkBlockIds = _o[1];
100
+ }), layouts = _m[0], setLayouts = _m[1];
101
+ var _o = (0, react_1.useState)('ROOT'), editingGroupBlock = _o[0], setEditingGroupBlock = _o[1];
102
+ var _p = (0, react_1.useState)([]), bulkBlockIds = _p[0], setBulkBlockIds = _p[1];
103
103
  (0, react_1.useEffect)(function () {
104
104
  if (editingGroupBlock) {
105
105
  var found = (0, group_1.findBlockByBlockId)(sectionPedigree, editingGroupBlock);
@@ -156,9 +156,8 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
156
156
  setBulkBlockIds([]);
157
157
  }
158
158
  }, [editingSectionId]);
159
+ var workDir = (_c = (0, group_1.getBlockWorkDirPath)(newblock, editingGroupBlock)) !== null && _c !== void 0 ? _c : '/ROOT';
159
160
  (0, react_1.useEffect)(function () {
160
- var _a;
161
- var workDir = (_a = (0, group_1.getBlockWorkDirPath)(newblock, editingGroupBlock)) !== null && _a !== void 0 ? _a : 'ROOT';
162
161
  sectionActionHandler &&
163
162
  sectionActionHandler({
164
163
  type: '@CUSTOMSECTION/WORKDIR_CHANGED',
@@ -166,7 +165,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
166
165
  workDir: workDir
167
166
  }
168
167
  });
169
- }, [newblock, editingGroupBlock, sectionActionHandler]);
168
+ }, [workDir]);
170
169
  // NOTE: 추후에 event를 외부에서 전달받게하거나, 아예 상태를 끌어올리거나 해야합니다.
171
170
  (0, react_1.useLayoutEffect)(function () {
172
171
  var _a, _b, _c, _d, _e, _f;
@@ -378,10 +377,10 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
378
377
  });
379
378
  return __spreadArray(__spreadArray([], collisions, true), [(0, group_1.formatCbIdToBlockId)(cdId1)], false);
380
379
  };
381
- var _p = (0, util_1.parseCustomSectionPlacement)({
380
+ var _q = (0, util_1.parseCustomSectionPlacement)({
382
381
  isMobile: isMobile,
383
382
  customSectionProps: CB_PLACEMENT_PROP_SECTION
384
- }), rows = _p.rows, width = _p.width, minHeight = _p.minHeight, isFullWidth = _p.isFullWidth;
383
+ }), rows = _q.rows, width = _q.width, minHeight = _q.minHeight, isFullWidth = _q.isFullWidth;
385
384
  var customSectionStyles = {
386
385
  minHeight: "".concat(minHeight, "vh"),
387
386
  width: '100%',
@@ -984,7 +983,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
984
983
  fontSize: "".concat(baseFontSize, "px")
985
984
  }, onLayoutChange: onLayoutChange, onDragStart: onDragStart, onDragStop: onDragStop, onResizeStop: onResizeStop, onDragStopForGroup: onBulkDragStop, onFitToContent: onAutoFitContent, onWidthChange: onWidthChange, minNbRow: rows, isDraggable: isEditMode, isResizable: isEditMode, zoom: zoomScale,
986
985
  // GROUP
987
- selectedGroupBlock: (_c = selectedBlockId === null || selectedBlockId === void 0 ? void 0 : selectedBlockId.toString()) !== null && _c !== void 0 ? _c : 'ROOT', editingGroupBlock: editingGroupBlock, blockStructure: newblock, bulkIds: bulkBlockIds, onDoubleClickGroup: onDoubleClickGroup, onClickGroup: onClickGroup, onDoubleClickOutsideGroup: onDoubleClickOutsideGroup, onContextGroup: onContextGroup }, { children: layouts[layoutByDevice].map(function (each, index) {
986
+ 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) {
988
987
  var matchedCB = componentBlocks === null || componentBlocks === void 0 ? void 0 : componentBlocks.find(function (cb) { return cb.id.toString() === each.i; });
989
988
  var isInBulk = bulkBlockIds.includes((0, group_1.formatCbIdToBlockId)(Number(each.i)));
990
989
  if (!matchedCB) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "2.5.207",
3
+ "version": "2.5.209",
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.99",
26
- "publ-echo-test": "^0.0.170",
26
+ "publ-echo-test": "^0.0.171",
27
27
  "react-hook-form": "^7.28.1",
28
28
  "react-i18next": "^11.12.0",
29
29
  "react-router-dom": "^5.2.0",