pds-dev-kit-web-test 2.5.162 → 2.5.163

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.
@@ -48,16 +48,6 @@ type ActionHandlerPayload = {
48
48
  blockId: string;
49
49
  workDir: string;
50
50
  };
51
- '@CUSTOMSECTION/BULK_DRAG_STOP': {
52
- layout: Layout;
53
- prev?: LayoutItem;
54
- item?: LayoutItem;
55
- placeholder?: LayoutItem;
56
- e?: ResizeEventType;
57
- node?: HTMLElement;
58
- outerBasedChildrenPositions: LayoutItem[];
59
- workDir: string;
60
- };
61
51
  '@CUSTOMSECTION/CB_RESIZE_STOP': {
62
52
  layout: Layout;
63
53
  prev?: LayoutItem;
@@ -122,9 +112,13 @@ type ActionHandlerPayload = {
122
112
  '@CUSTOMSECTION/ESCAPE_ONE_FROM_BULK': {
123
113
  id: string;
124
114
  };
125
- '@CUSTOMSECTION/GROUP_DRAG_STOP': {
115
+ '@CUSTOMSECTION/BULK_DRAG_STOP': {
126
116
  updatedBlocks: UpdatedBlock[];
127
117
  };
118
+ '@CUSTOMSECTION/GROUP_DRAG_STOP': {
119
+ item: LayoutItem;
120
+ e?: ResizeEventType;
121
+ };
128
122
  };
129
123
  export type UpdatedBlock = {
130
124
  blockId: string;
@@ -37,17 +37,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
37
37
  __setModuleDefault(result, mod);
38
38
  return result;
39
39
  };
40
- var __rest = (this && this.__rest) || function (s, e) {
41
- var t = {};
42
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
43
- t[p] = s[p];
44
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
45
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
46
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
47
- t[p[i]] = s[p[i]];
48
- }
49
- return t;
50
- };
51
40
  var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
52
41
  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
53
42
  if (ar || !(i in from)) {
@@ -453,7 +442,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
453
442
  });
454
443
  };
455
444
  var onDragStop = function (props) {
456
- var _a, _b, _c, _d;
445
+ var _a, _b, _c;
457
446
  if (!isEditMode || !props.item) {
458
447
  return;
459
448
  }
@@ -465,17 +454,27 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
465
454
  }, 0);
466
455
  return;
467
456
  }
468
- if (item.i === 'BULK' && props.item.groupLayouts) {
469
- setSelectedBlockId('BULK');
470
- var outerBasedChildrenPositions = props.item.groupLayouts.map(function (cb) { return (__assign(__assign({}, cb), { x: item.x + cb.x, y: item.y + cb.y })); });
471
- sectionActionHandler &&
472
- sectionActionHandler({
473
- type: '@CUSTOMSECTION/BULK_DRAG_STOP',
474
- payload: __assign(__assign({}, props), { outerBasedChildrenPositions: outerBasedChildrenPositions, workDir: (_a = (0, group_1.getBlockWorkDirPath)(newblock, editingGroupBlock)) !== null && _a !== void 0 ? _a : 'NOT-FOUND' })
475
- });
476
- return;
477
- }
478
- var numberId = Number((_b = props.item) === null || _b === void 0 ? void 0 : _b.i);
457
+ // NOTE 미사용시 삭제
458
+ // if (item.i === 'BULK' && props.item.groupLayouts) {
459
+ // setSelectedBlockId('BULK');
460
+ // const outerBasedChildrenPositions = props.item.groupLayouts.map((cb) => ({
461
+ // ...cb,
462
+ // x: item.x + cb.x,
463
+ // y: item.y + cb.y
464
+ // }));
465
+ // sectionActionHandler &&
466
+ // sectionActionHandler({
467
+ // type: '@CUSTOMSECTION/BULK_DRAG_STOP',
468
+ // payload: {
469
+ // updatedBlocks: props.
470
+ // ...props,
471
+ // outerBasedChildrenPositions,
472
+ // workDir: getBlockWorkDirPath(newblock, editingGroupBlock) ?? 'NOT-FOUND'
473
+ // }
474
+ // });
475
+ // return;
476
+ // }
477
+ var numberId = Number((_a = props.item) === null || _a === void 0 ? void 0 : _a.i);
479
478
  var blockId = (0, group_1.formatCbIdToBlockId)(numberId);
480
479
  var isIdNumber = !Number.isNaN(numberId);
481
480
  if (blockId) {
@@ -496,7 +495,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
496
495
  blockId: blockId,
497
496
  cbId: numberId,
498
497
  type: 'COMPONENT_BLOCK',
499
- workDir: (_c = (0, group_1.getBlockWorkDirPath)(newblock, editingGroupBlock)) !== null && _c !== void 0 ? _c : 'NOT-FOUND'
498
+ workDir: (_b = (0, group_1.getBlockWorkDirPath)(newblock, editingGroupBlock)) !== null && _b !== void 0 ? _b : 'NOT-FOUND'
500
499
  }
501
500
  }
502
501
  });
@@ -505,7 +504,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
505
504
  if (sectionActionHandler && isIdNumber) {
506
505
  sectionActionHandler({
507
506
  type: '@CUSTOMSECTION/CB_DRAG_STOP',
508
- payload: __assign(__assign({}, props), { blockId: blockId, workDir: (_d = (0, group_1.getBlockWorkDirPath)(newblock, editingGroupBlock)) !== null && _d !== void 0 ? _d : 'NOT-FOUND' })
507
+ payload: __assign(__assign({}, props), { blockId: blockId, workDir: (_c = (0, group_1.getBlockWorkDirPath)(newblock, editingGroupBlock)) !== null && _c !== void 0 ? _c : 'NOT-FOUND' })
509
508
  });
510
509
  }
511
510
  };
@@ -811,21 +810,33 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
811
810
  }
812
811
  });
813
812
  };
814
- var onGroupDragStop = function (_a) {
815
- var updatedItems = _a.updatedItems, rest = __rest(_a, ["updatedItems"]);
816
- console.log('group drag stop', rest);
817
- sectionActionHandler &&
818
- sectionActionHandler({
819
- type: '@CUSTOMSECTION/GROUP_DRAG_STOP',
820
- payload: {
821
- updatedBlocks: updatedItems.map(function (i) { return ({
822
- cbId: Number(i.id),
823
- blockId: (0, group_1.formatCbIdToBlockId)(Number(i.id)),
824
- x: i.x,
825
- y: i.y
826
- }); })
827
- }
828
- });
813
+ var onBulkDragStop = function (_a) {
814
+ var updatedItems = _a.updatedItems, item = _a.item, e = _a.e;
815
+ if ((item === null || item === void 0 ? void 0 : item.i) === 'BULK') {
816
+ sectionActionHandler &&
817
+ sectionActionHandler({
818
+ type: '@CUSTOMSECTION/BULK_DRAG_STOP',
819
+ payload: {
820
+ updatedBlocks: updatedItems.map(function (i) { return ({
821
+ cbId: Number(i.id),
822
+ blockId: (0, group_1.formatCbIdToBlockId)(Number(i.id)),
823
+ x: i.x,
824
+ y: i.y
825
+ }); })
826
+ }
827
+ });
828
+ return;
829
+ }
830
+ if (item) {
831
+ sectionActionHandler &&
832
+ sectionActionHandler({
833
+ type: '@CUSTOMSECTION/GROUP_DRAG_STOP',
834
+ payload: {
835
+ item: item,
836
+ e: e
837
+ }
838
+ });
839
+ }
829
840
  };
830
841
  return ((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsxs)(gleStyles_1.S_gleStyles, __assign({ isBulkMode: shortcutKeyMode === 'BULK_SELECT' }, { 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, onContextMenu: function (e) {
831
842
  e.stopPropagation();
@@ -842,7 +853,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
842
853
  maxWidth: customSectionStyles.maxWidth,
843
854
  minWidth: isMobile ? GLE_MIN_WIDTH_MOBILE_PX : GLE_MIN_WIDTH_DESKTOP_PX,
844
855
  fontSize: "".concat(baseFontSize, "px")
845
- }, onLayoutChange: onLayoutChange, onDragStart: onDragStart, onDragStop: onDragStop, onResizeStop: onResizeStop, onDragStopForGroup: onGroupDragStop, onFitToContent: onAutoFitContent, onWidthChange: onWidthChange, minNbRow: rows, isDraggable: isEditMode, isResizable: isEditMode,
856
+ }, onLayoutChange: onLayoutChange, onDragStart: onDragStart, onDragStop: onDragStop, onResizeStop: onResizeStop, onDragStopForGroup: onBulkDragStop, onFitToContent: onAutoFitContent, onWidthChange: onWidthChange, minNbRow: rows, isDraggable: isEditMode, isResizable: isEditMode,
846
857
  // GROUP
847
858
  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) {
848
859
  var matchedCB = componentBlocks === null || componentBlocks === void 0 ? void 0 : componentBlocks.find(function (cb) { return cb.id.toString() === each.i; });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "2.5.162",
3
+ "version": "2.5.163",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",