pds-dev-kit-web-test 2.5.161 → 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/
|
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;
|
@@ -442,7 +442,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
442
442
|
});
|
443
443
|
};
|
444
444
|
var onDragStop = function (props) {
|
445
|
-
var _a, _b, _c
|
445
|
+
var _a, _b, _c;
|
446
446
|
if (!isEditMode || !props.item) {
|
447
447
|
return;
|
448
448
|
}
|
@@ -454,17 +454,27 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
454
454
|
}, 0);
|
455
455
|
return;
|
456
456
|
}
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
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);
|
468
478
|
var blockId = (0, group_1.formatCbIdToBlockId)(numberId);
|
469
479
|
var isIdNumber = !Number.isNaN(numberId);
|
470
480
|
if (blockId) {
|
@@ -485,7 +495,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
485
495
|
blockId: blockId,
|
486
496
|
cbId: numberId,
|
487
497
|
type: 'COMPONENT_BLOCK',
|
488
|
-
workDir: (
|
498
|
+
workDir: (_b = (0, group_1.getBlockWorkDirPath)(newblock, editingGroupBlock)) !== null && _b !== void 0 ? _b : 'NOT-FOUND'
|
489
499
|
}
|
490
500
|
}
|
491
501
|
});
|
@@ -494,7 +504,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
494
504
|
if (sectionActionHandler && isIdNumber) {
|
495
505
|
sectionActionHandler({
|
496
506
|
type: '@CUSTOMSECTION/CB_DRAG_STOP',
|
497
|
-
payload: __assign(__assign({}, props), { blockId: blockId, workDir: (
|
507
|
+
payload: __assign(__assign({}, props), { blockId: blockId, workDir: (_c = (0, group_1.getBlockWorkDirPath)(newblock, editingGroupBlock)) !== null && _c !== void 0 ? _c : 'NOT-FOUND' })
|
498
508
|
});
|
499
509
|
}
|
500
510
|
};
|
@@ -800,20 +810,33 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
800
810
|
}
|
801
811
|
});
|
802
812
|
};
|
803
|
-
var
|
804
|
-
var updatedItems = _a.updatedItems;
|
805
|
-
|
806
|
-
sectionActionHandler
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
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
|
+
}
|
817
840
|
};
|
818
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) {
|
819
842
|
e.stopPropagation();
|
@@ -830,7 +853,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
830
853
|
maxWidth: customSectionStyles.maxWidth,
|
831
854
|
minWidth: isMobile ? GLE_MIN_WIDTH_MOBILE_PX : GLE_MIN_WIDTH_DESKTOP_PX,
|
832
855
|
fontSize: "".concat(baseFontSize, "px")
|
833
|
-
}, onLayoutChange: onLayoutChange, onDragStart: onDragStart, onDragStop: onDragStop, onResizeStop: onResizeStop, onDragStopForGroup:
|
856
|
+
}, onLayoutChange: onLayoutChange, onDragStart: onDragStart, onDragStop: onDragStop, onResizeStop: onResizeStop, onDragStopForGroup: onBulkDragStop, onFitToContent: onAutoFitContent, onWidthChange: onWidthChange, minNbRow: rows, isDraggable: isEditMode, isResizable: isEditMode,
|
834
857
|
// GROUP
|
835
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) {
|
836
859
|
var matchedCB = componentBlocks === null || componentBlocks === void 0 ? void 0 : componentBlocks.find(function (cb) { return cb.id.toString() === each.i; });
|