publ-echo-test 0.0.92 → 0.0.94
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.
@@ -644,6 +644,7 @@ var ReactGridLayout = function (_a) {
|
|
644
644
|
isHiddenVisibility: isHiddenVisibility, customColWidth: colWidth, autoResize: false, children: _jsx("div", { onClick: handleClick, onDoubleClick: handleDoubleClick }) }, block.blockId) }));
|
645
645
|
};
|
646
646
|
var currentGroupBlocks = blockStructure ? findGroupBlocks(blockStructure, editingGroupBlock) : [];
|
647
|
+
console.log('currentGroupBlocks: ', currentGroupBlocks);
|
647
648
|
return (_jsxs("div", { ref: innerRef, className: mergedClassName, style: mergedStyle, onDrop: isDroppable ? onDropHandler : noop, onDragLeave: isDroppable ? onDragLeaveHandler : noop, onDragEnter: isDroppable ? onDragEnterHandler : noop, onDragOver: isDroppable ? onDragOverHandler : noop, children: [currentGroupBlocks.map(function (each) { return processGroup(each); }), React.Children.map(children, function (child) { return processGridItem(child); }), placeholder(), activeDrag && _jsx("div", { className: "grid-guide-line-center" }), activeDrag && (_jsx("div", { className: "grid-placeholder", style: {
|
648
649
|
marginTop: margin[1] + "px",
|
649
650
|
marginBottom: margin[1] + "px",
|
@@ -53,4 +53,7 @@ export declare const addBulkToTarget: (blockStructure: Block[], targetId: string
|
|
53
53
|
export declare const getBlockWorkDirPath: (blockStructure: Block[], blockId: string) => string | null;
|
54
54
|
export declare const getBlockIdByComponentId: (blockStructure: Block[], componentId: number) => string | null;
|
55
55
|
export declare const blockStructure: Block[];
|
56
|
-
export declare const mapComponentBlockIdsToBlockIds: (blockStructure: Block[]) =>
|
56
|
+
export declare const mapComponentBlockIdsToBlockIds: (blockStructure: Block[]) => {
|
57
|
+
CB_ID: Record<number, string>;
|
58
|
+
BLOCK_ID: Record<string, number>;
|
59
|
+
};
|
@@ -415,12 +415,14 @@ export var blockStructure = [
|
|
415
415
|
}
|
416
416
|
];
|
417
417
|
export var mapComponentBlockIdsToBlockIds = function (blockStructure) {
|
418
|
-
var
|
418
|
+
var cbToBlockMap = {};
|
419
|
+
var blockToCbMap = {};
|
419
420
|
var traverse = function (blocks) {
|
420
421
|
for (var _i = 0, blocks_7 = blocks; _i < blocks_7.length; _i++) {
|
421
422
|
var block = blocks_7[_i];
|
422
423
|
if (block.type === 'COMPONENT_BLOCK') {
|
423
|
-
|
424
|
+
cbToBlockMap[block.componentBlockId] = block.blockId;
|
425
|
+
blockToCbMap[block.blockId] = block.componentBlockId;
|
424
426
|
}
|
425
427
|
if ('children' in block && block.children) {
|
426
428
|
traverse(block.children);
|
@@ -428,5 +430,5 @@ export var mapComponentBlockIdsToBlockIds = function (blockStructure) {
|
|
428
430
|
}
|
429
431
|
};
|
430
432
|
traverse(blockStructure);
|
431
|
-
return
|
433
|
+
return { CB_ID: cbToBlockMap, BLOCK_ID: blockToCbMap };
|
432
434
|
};
|