publ-echo-test 0.0.78 → 0.0.80
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.
@@ -36,6 +36,7 @@ var GridItem = function (_a) {
|
|
36
36
|
var _o = useState(), dragStart = _o[0], setDragStart = _o[1];
|
37
37
|
var _p = useState(false), isDragging = _p[0], setIsDragging = _p[1];
|
38
38
|
var _q = useState(false), isResizing = _q[0], setIsResizing = _q[1];
|
39
|
+
var _r = useState(false), pointerEventsNone = _r[0], setPointerEventsNone = _r[1];
|
39
40
|
var elementRef = useRef(null);
|
40
41
|
var isSelected = (_b = elementRef.current) === null || _b === void 0 ? void 0 : _b.classList.contains('react-grid-item-selected');
|
41
42
|
useEffect(function () {
|
@@ -172,12 +173,11 @@ var GridItem = function (_a) {
|
|
172
173
|
*/
|
173
174
|
var mixinDraggable = function (child, isDraggable) {
|
174
175
|
function onMouseDownDraggable() {
|
175
|
-
var _a
|
176
|
-
console.log('mouse down!');
|
176
|
+
var _a;
|
177
177
|
if (!isDraggable) {
|
178
|
-
console.log('not draggable');
|
179
178
|
if ((_a = elementRef.current) === null || _a === void 0 ? void 0 : _a.classList) {
|
180
|
-
|
179
|
+
// elementRef.current?.classList.add('pointer-events-none')
|
180
|
+
setPointerEventsNone(true);
|
181
181
|
}
|
182
182
|
}
|
183
183
|
}
|
@@ -409,7 +409,7 @@ var GridItem = function (_a) {
|
|
409
409
|
// dropping: Boolean(droppingPosition),
|
410
410
|
cssTransforms: useCSSTransforms,
|
411
411
|
}),
|
412
|
-
style: __assign(__assign(__assign({}, props.style), child.props.style), createStyle(pos)),
|
412
|
+
style: __assign(__assign(__assign(__assign({}, props.style), child.props.style), createStyle(pos)), { pointerEvents: pointerEventsNone ? 'none' : 'auto' }),
|
413
413
|
});
|
414
414
|
newChild = mixinResizable(newChild, pos, isResizable);
|
415
415
|
newChild = mixinDraggable(newChild, isDraggable);
|
@@ -42,7 +42,7 @@ export type BulkBlockInternal = {
|
|
42
42
|
};
|
43
43
|
export declare const findBlockByBlockId: (blocks: Block[], blockId: string) => Block | null;
|
44
44
|
export declare const findChildrenComponentIds: (blockStructure: Block[], targetId: string) => string[];
|
45
|
-
export declare const findAllChildrenIds: (blockStructure: Block[], targetId: string) => string[];
|
45
|
+
export declare const findAllChildrenIds: (blockStructure: Block[], targetId: string, depth?: 'current' | 'deep') => string[];
|
46
46
|
export declare const findAllChildrenComponentIds: (blockStructure: Block[], targetId: string) => number[];
|
47
47
|
export declare const findAllParentGroups: (blockStructure: Block[], targetId: string) => GroupBlock[];
|
48
48
|
export declare const findGroupBlocks: (blockStructure: Block[], targetId: string) => GroupBlock[];
|
@@ -58,14 +58,17 @@ export var findChildrenComponentIds = function (blockStructure, targetId) {
|
|
58
58
|
var blockCBChildren = targetBlock.children.filter(function (child) { return child.type === 'COMPONENT_BLOCK'; });
|
59
59
|
return blockCBChildren.map(function (cb) { return cb.componentBlockId.toString(); });
|
60
60
|
};
|
61
|
-
export var findAllChildrenIds = function (blockStructure, targetId) {
|
61
|
+
export var findAllChildrenIds = function (blockStructure, targetId, depth) {
|
62
|
+
if (depth === void 0) { depth = 'deep'; }
|
62
63
|
var collectChildrenIds = function (block) {
|
63
64
|
var ids = [];
|
64
65
|
if ('children' in block && block.children) {
|
65
66
|
for (var _i = 0, _a = block.children; _i < _a.length; _i++) {
|
66
67
|
var child = _a[_i];
|
67
68
|
ids.push(child.blockId);
|
68
|
-
|
69
|
+
if (depth === 'deep') {
|
70
|
+
ids = ids.concat(collectChildrenIds(child));
|
71
|
+
}
|
69
72
|
}
|
70
73
|
}
|
71
74
|
return ids;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "publ-echo-test",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.80",
|
4
4
|
"private": false,
|
5
5
|
"main": "dist/lib/index.js",
|
6
6
|
"types": "dist/lib/index.d.js",
|
@@ -52,5 +52,8 @@
|
|
52
52
|
"styled-components": "^5.3.10",
|
53
53
|
"typescript": "^5.1.6",
|
54
54
|
"web-vitals": "^2.1.4"
|
55
|
+
},
|
56
|
+
"dependencies": {
|
57
|
+
"build-lib": "^1.0.0"
|
55
58
|
}
|
56
59
|
}
|