pds-dev-kit-web-test 2.7.101 → 2.7.103

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.
@@ -265,7 +265,7 @@ var GridAutoRowEditor = (0, react_1.forwardRef)(function CustomSection(props, re
265
265
  backgroundColor: '#e8e1e189',
266
266
  border: '1px solid #6b666688'
267
267
  }, "data-row": rIdx + 1, "data-col": cIdx + 1 }, "bg-grid-item-".concat(rIdx + 1, "-").concat(cIdx + 1))); }) }), "bg-grid-row-".concat(rIdx + 1)));
268
- }), pedigree.children.map(function (child) { return ((0, jsx_runtime_1.jsx)(groupUtils_1.default, { block: child, rowHeight: rowHeight, layoutItems: layouts[device === 'DESKTOP' ? 'lg' : 'sm'], cbs: props.componentBlocks }, child.blockId)); })] })) })) })) }) })) }));
268
+ }), pedigree.children.map(function (child) { return ((0, jsx_runtime_1.jsx)(groupUtils_1.default, { block: child, rowHeight: rowHeight, layoutItems: layouts[device === 'DESKTOP' ? 'lg' : 'sm'], cbs: props.componentBlocks, device: device }, child.blockId)); })] })) })) })) }) })) }));
269
269
  });
270
270
  function GroupBlockRender(_a) {
271
271
  var block = _a.block, layouts = _a.layouts, pedigree = _a.pedigree, isEditing = _a.isEditing, isPinned = _a.isPinned, componentBlocks = _a.componentBlocks, onTogglePinned = _a.onTogglePinned, onDoubleClick = _a.onDoubleClick, onDoubleClickOutside = _a.onDoubleClickOutside;
@@ -1,13 +1,15 @@
1
1
  /// <reference types="react" />
2
2
  import type { ComponentBlock } from '../sections/CustomSection/types';
3
+ import type { Device } from '../sections/CustomSection/util/types';
3
4
  import type { LayoutItem } from 'publ-echo/dist/lib';
4
5
  import type { Block } from 'publ-echo/dist/lib/GridLayoutEditor/group';
5
6
  export declare function findAllChildrenCbIds(block: Block, targetGroupId: string): number[];
6
- export default function RenderPedigreeRecursively({ block, layoutItems, cbs, parentGroupArea, rowHeight }: {
7
+ export default function RenderPedigreeRecursively({ block, layoutItems, cbs, parentGroupArea, rowHeight, device }: {
7
8
  block: Block;
8
9
  layoutItems: LayoutItem[];
9
10
  cbs: ComponentBlock[];
10
11
  rowHeight: number;
12
+ device: Device;
11
13
  parentGroupArea?: {
12
14
  rowStart: number;
13
15
  colStart: number;
@@ -78,7 +78,7 @@ function findAllChildrenCbIds(block, targetGroupId) {
78
78
  }
79
79
  exports.findAllChildrenCbIds = findAllChildrenCbIds;
80
80
  function RenderPedigreeRecursively(_a) {
81
- var block = _a.block, layoutItems = _a.layoutItems, cbs = _a.cbs, parentGroupArea = _a.parentGroupArea, rowHeight = _a.rowHeight;
81
+ var block = _a.block, layoutItems = _a.layoutItems, cbs = _a.cbs, parentGroupArea = _a.parentGroupArea, rowHeight = _a.rowHeight, device = _a.device;
82
82
  var type = block.type;
83
83
  if (type === 'GROUP_BLOCK') {
84
84
  var childrenIds = findAllChildrenCbIds(block, block.blockId).map(function (i) { return i.toString(); });
@@ -97,7 +97,10 @@ function RenderPedigreeRecursively(_a) {
97
97
  : gridArea_1;
98
98
  return ((0, jsx_runtime_1.jsxs)(S_GroupItem, __assign({ cols: bounding.w, sectionRow: bounding.h, rowHeight: rowHeight, selectedRows: [], style: {
99
99
  gridArea: gridAreaObjToString(relativeGridArea_1),
100
- display: 'grid'
100
+ display: 'grid',
101
+ zIndex: device === 'DESKTOP'
102
+ ? block.zOrderDesktopInternal
103
+ : block.zOrderMobileInternal
101
104
  } }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ style: {
102
105
  position: 'absolute',
103
106
  top: 4,
@@ -109,7 +112,7 @@ function RenderPedigreeRecursively(_a) {
109
112
  fontSize: '12px',
110
113
  zIndex: 1,
111
114
  pointerEvents: 'none'
112
- } }, { children: block.blockId })), block.children.map(function (child) { return ((0, jsx_runtime_1.jsx)(RenderPedigreeRecursively, { rowHeight: rowHeight, block: child, layoutItems: layoutItems, cbs: cbs, parentGroupArea: gridArea_1 }, child.blockId)); })] })));
115
+ } }, { children: block.blockId })), block.children.map(function (child) { return ((0, jsx_runtime_1.jsx)(RenderPedigreeRecursively, { rowHeight: rowHeight, block: child, layoutItems: layoutItems, cbs: cbs, parentGroupArea: gridArea_1, device: device }, child.blockId)); })] })));
113
116
  }
114
117
  // default: TYPE === 'COMPONENT_BLOCK'
115
118
  var cbIndex = cbs.findIndex(function (c) { return c.blockId === block.blockId; });
@@ -125,12 +128,24 @@ function RenderPedigreeRecursively(_a) {
125
128
  : originalGridArea;
126
129
  var isEditing = false;
127
130
  var isPinned = false;
128
- return ((0, jsx_runtime_1.jsx)(S_GridItem, __assign({ style: {
129
- gridArea: gridAreaObjToString(relativeGridArea)
130
- }, "data-og-grid-area": originalGridAreaString, "data-rel-grid-area": gridAreaObjToString(relativeGridArea) }, { children: (0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsx)(FlexGridItem_1.default, { cb: cb, index: cbIndex, device: "DESKTOP", rowHeight: 50, zIndex: 0, style: {
131
- pointerEvents: 'none'
132
- // opacity: isEditing ? 1 : 0.3
133
- }, showPinned: isEditing, isParentGroupPinned: isPinned }) }, cb.id) })));
131
+ return (
132
+ // <S_GridItem
133
+ // style={{
134
+ // gridArea: gridAreaObjToString(relativeGridArea)
135
+ // }}
136
+ // data-og-grid-area={originalGridAreaString}
137
+ // data-rel-grid-area={gridAreaObjToString(relativeGridArea)}
138
+ // >
139
+ (0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsx)(FlexGridItem_1.default, { cb: cb, index: cbIndex, device: device, rowHeight: 50, zIndex: device === 'DESKTOP'
140
+ ? block.zOrderDesktopInternal
141
+ : block.zOrderMobileInternal, style: {
142
+ pointerEvents: 'none',
143
+ gridArea: gridAreaObjToString(relativeGridArea),
144
+ boxShadow: '0 0 0 2px red'
145
+ // opacity: isEditing ? 1 : 0.3
146
+ }, showPinned: isEditing, isParentGroupPinned: isPinned }) }, cb.id)
147
+ // </S_GridItem>
148
+ );
134
149
  }
135
150
  exports.default = RenderPedigreeRecursively;
136
151
  function clamp(num, min, max) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "2.7.101",
3
+ "version": "2.7.103",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",