publ-echo-test 0.0.62 → 0.0.64

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.
@@ -633,7 +633,9 @@ var ReactGridLayout = function (_a) {
633
633
  isHiddenVisibility: isHiddenVisibility, customColWidth: colWidth, autoResize: false, children: _jsx("div", { onClick: handleClick, onDoubleClick: handleDoubleClick }) }, block.blockId) }));
634
634
  };
635
635
  var currentGroupBlocks = blockStructure ? findGroupBlocks(blockStructure, editingGroupBlock) : [];
636
- console.log(currentGroupBlocks);
636
+ console.log('currentBlocks: ', currentGroupBlocks);
637
+ console.log('blockStructure: ', blockStructure);
638
+ console.log('editingGroupBlock: ', editingGroupBlock);
637
639
  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: {
638
640
  marginTop: margin[1] + "px",
639
641
  marginBottom: margin[1] + "px",
@@ -50,4 +50,5 @@ export declare const findAllComponentBlockIds: (blockStructure: Block[]) => stri
50
50
  export declare const findParentGroupByGroupId: (blockStructure: Block[], targetId: string) => string | null;
51
51
  export declare const addBlockToRoot: (blockStructure: Block[], newBlock: Block) => Block[];
52
52
  export declare const addBulkToTarget: (blockStructure: Block[], targetId: string, bulkIds: string[]) => Block[];
53
+ export declare const getBlockWorkDirPath: (blockStructure: Block[], blockId: string) => string | null;
53
54
  export declare const blockStructure: Block[];
@@ -194,6 +194,26 @@ export var addBulkToTarget = function (blockStructure, targetId, bulkIds) {
194
194
  targetBlock.children.push(bulkBlock);
195
195
  return structure;
196
196
  };
197
+ export var getBlockWorkDirPath = function (blockStructure, blockId) {
198
+ var findPath = function (blocks, id, path) {
199
+ for (var _i = 0, blocks_5 = blocks; _i < blocks_5.length; _i++) {
200
+ var block = blocks_5[_i];
201
+ var currentPath = __spreadArray(__spreadArray([], path, true), [block.blockId], false);
202
+ if (block.blockId === id) {
203
+ return currentPath;
204
+ }
205
+ if ('children' in block && block.children) {
206
+ var result = findPath(block.children, id, currentPath);
207
+ if (result) {
208
+ return result;
209
+ }
210
+ }
211
+ }
212
+ return null;
213
+ };
214
+ var path = findPath(blockStructure, blockId, ['']);
215
+ return path ? path.join('/') : null;
216
+ };
197
217
  export var blockStructure = [
198
218
  {
199
219
  blockId: 'ROOT',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "publ-echo-test",
3
- "version": "0.0.62",
3
+ "version": "0.0.64",
4
4
  "private": false,
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.js",