pds-dev-kit-web-test 2.5.63 → 2.5.65

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.
@@ -8,15 +8,21 @@ export type PayloadCBType = {
8
8
  type: ComponentBlock['type'];
9
9
  blockId: string;
10
10
  cbId: number;
11
+ workDir: string;
11
12
  };
12
13
  export type PayloadGBType = {
13
14
  type: GroupBlock['type'];
14
15
  blockId: string;
16
+ childrenBlockIds: string[];
17
+ childrenCBIds: number[];
18
+ workDir: string;
15
19
  };
16
20
  export type PayloadBulkType = {
17
21
  type: 'BULK';
18
22
  blockId: 'BULK';
19
23
  childrenBlockIds: string[];
24
+ childrenCBIds: number[];
25
+ workDir: string;
20
26
  };
21
27
  export type BlockPayloadType = PayloadCBType | PayloadGBType | PayloadBulkType;
22
28
  type ActionHandlerPayload = {
@@ -82,21 +82,26 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
82
82
  setPedigreeState((_a = jsonProperties === null || jsonProperties === void 0 ? void 0 : jsonProperties.pedigree) !== null && _a !== void 0 ? _a : []);
83
83
  setBlockIdMap((0, group_1.mapComponentBlockIdsToBlockIds)((_b = jsonProperties === null || jsonProperties === void 0 ? void 0 : jsonProperties.pedigree) !== null && _b !== void 0 ? _b : []));
84
84
  }, [jsonProperties === null || jsonProperties === void 0 ? void 0 : jsonProperties.pedigree]);
85
- var _g = jsonProperties.data, CB_PLACEMENT_PROP_SECTION = _g.CB_PLACEMENT_PROP_SECTION, CB_LAYOUT_PROP_PADDING = _g.CB_LAYOUT_PROP_PADDING, CB_CONTENT_PROP_SECTION = _g.CB_CONTENT_PROP_SECTION;
86
- var _h = (0, react_1.useState)(null), selectedBlockId = _h[0], setSelectedBlockId = _h[1];
85
+ var _g = jsonProperties, _h = _g.data, CB_PLACEMENT_PROP_SECTION = _h.CB_PLACEMENT_PROP_SECTION, CB_LAYOUT_PROP_PADDING = _h.CB_LAYOUT_PROP_PADDING, CB_CONTENT_PROP_SECTION = _h.CB_CONTENT_PROP_SECTION, zOrders = _g.zOrders;
86
+ var _j = (0, react_1.useState)(null), selectedBlockId = _j[0], setSelectedBlockId = _j[1];
87
87
  var gleRef = (0, react_1.useRef)(null);
88
- var _j = (0, react_1.useState)(50), rowHeight = _j[0], setRowHeight = _j[1];
89
- var _k = (0, react_1.useState)(16), baseFontSize = _k[0], setBaseFontSize = _k[1];
88
+ var _k = (0, react_1.useState)(50), rowHeight = _k[0], setRowHeight = _k[1];
89
+ var _l = (0, react_1.useState)(16), baseFontSize = _l[0], setBaseFontSize = _l[1];
90
90
  var isMobile = device === 'MOBILE';
91
91
  var isEditMode = mode === 'EDIT';
92
92
  var layoutByDevice = device === 'DESKTOP' ? 'lg' : 'sm';
93
- var _l = (0, react_1.useState)(function () {
94
- var _a = (0, util_1.parsePlacement)(componentBlocks !== null && componentBlocks !== void 0 ? componentBlocks : []), lg = _a.lg, sm = _a.sm;
93
+ var _m = (0, react_1.useState)(function () {
94
+ var _a = (0, util_1.parsePlacement)(componentBlocks !== null && componentBlocks !== void 0 ? componentBlocks : [], zOrders), lg = _a.lg, sm = _a.sm;
95
95
  return {
96
96
  lg: lg,
97
97
  sm: sm
98
98
  };
99
- }), layouts = _l[0], setLayouts = _l[1];
99
+ }), layouts = _m[0], setLayouts = _m[1];
100
+ var _o = (0, react_1.useState)('ROOT'), editingGroupBlock = _o[0], setEditingGroupBlock = _o[1];
101
+ var _p = (0, react_1.useState)([]), bulkBlockIds = _p[0], setBulkBlockIds = _p[1];
102
+ var newblock = bulkBlockIds.length > 0
103
+ ? (0, group_1.addBulkToTarget)(pedigreeState, editingGroupBlock, bulkBlockIds)
104
+ : pedigreeState;
100
105
  (0, react_1.useImperativeHandle)(ref, function () {
101
106
  return {
102
107
  selectCB: function (cbId) {
@@ -113,7 +118,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
113
118
  };
114
119
  }, [componentBlocks]);
115
120
  (0, react_1.useLayoutEffect)(function () {
116
- var parsedLayouts = (0, util_1.parsePlacement)(componentBlocks !== null && componentBlocks !== void 0 ? componentBlocks : []);
121
+ var parsedLayouts = (0, util_1.parsePlacement)(componentBlocks !== null && componentBlocks !== void 0 ? componentBlocks : [], zOrders);
117
122
  setLayouts(function (prev) {
118
123
  var _a;
119
124
  var _b;
@@ -156,7 +161,6 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
156
161
  return;
157
162
  }
158
163
  if (shortcutKeyMode === 'MANUAL_BULK_BREAK') {
159
- // breakGroupCB();
160
164
  setBulkBlockIds([]);
161
165
  setSelectedBlockId(null);
162
166
  return;
@@ -193,10 +197,10 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
193
197
  var allRootChildIds = (0, group_1.findAllChildrenIds)(pedigreeState, editingGroupBlock, 'current');
194
198
  setBulkBlockIds(allRootChildIds);
195
199
  };
196
- var _m = (0, util_1.parseCustomSectionPlacement)({
200
+ var _q = (0, util_1.parseCustomSectionPlacement)({
197
201
  isMobile: isMobile,
198
202
  customSectionProps: CB_PLACEMENT_PROP_SECTION
199
- }), rows = _m.rows, width = _m.width, minHeight = _m.minHeight, isFullWidth = _m.isFullWidth;
203
+ }), rows = _q.rows, width = _q.width, minHeight = _q.minHeight, isFullWidth = _q.isFullWidth;
200
204
  var customSectionStyles = {
201
205
  minHeight: "".concat(minHeight, "vh"),
202
206
  width: '100%',
@@ -204,6 +208,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
204
208
  };
205
209
  var breakpoint = device === 'MOBILE' ? 'sm' : 'lg';
206
210
  var onClickCB = function (id) {
211
+ var _a, _b;
207
212
  var blockId = blockIdMap.CB_ID[id];
208
213
  if (!isEditMode) {
209
214
  return;
@@ -221,7 +226,10 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
221
226
  return Array.from(set);
222
227
  });
223
228
  setSelectedBlockId(null);
224
- var newBulkIds = Array.from(new Set(__spreadArray(__spreadArray([], bulkBlockIds, true), blockIds_1, true)));
229
+ var newBulkBlockIds = Array.from(new Set(__spreadArray(__spreadArray([], bulkBlockIds, true), blockIds_1, true)));
230
+ var newBulkCBIds = newBulkBlockIds
231
+ .map(function (id) { return blockIdMap.BLOCK_ID[id]; })
232
+ .filter(function (each) { return each !== undefined; });
225
233
  sectionActionHandler &&
226
234
  sectionActionHandler({
227
235
  type: '@CUSTOMSECTION/BLOCK_CLICKED',
@@ -229,7 +237,9 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
229
237
  block: {
230
238
  type: 'BULK',
231
239
  blockId: 'BULK',
232
- childrenBlockIds: newBulkIds
240
+ childrenBlockIds: newBulkBlockIds,
241
+ childrenCBIds: newBulkCBIds,
242
+ workDir: (_a = (0, group_1.getBlockWorkDirPath)(newblock, blockId)) !== null && _a !== void 0 ? _a : 'NOT-FOUND'
233
243
  }
234
244
  }
235
245
  });
@@ -265,7 +275,8 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
265
275
  block: {
266
276
  blockId: blockId,
267
277
  type: 'COMPONENT_BLOCK',
268
- cbId: id
278
+ cbId: id,
279
+ workDir: (_b = (0, group_1.getBlockWorkDirPath)(newblock, blockId)) !== null && _b !== void 0 ? _b : 'NOT-FOUND'
269
280
  }
270
281
  }
271
282
  });
@@ -311,7 +322,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
311
322
  });
312
323
  };
313
324
  var onDragStop = function (props) {
314
- var _a;
325
+ var _a, _b;
315
326
  if (!isEditMode || !props.item) {
316
327
  return;
317
328
  }
@@ -353,7 +364,8 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
353
364
  block: {
354
365
  blockId: blockId,
355
366
  cbId: numberId,
356
- type: 'COMPONENT_BLOCK'
367
+ type: 'COMPONENT_BLOCK',
368
+ workDir: (_b = (0, group_1.getBlockWorkDirPath)(newblock, blockId)) !== null && _b !== void 0 ? _b : 'NOT-FOUND'
357
369
  }
358
370
  }
359
371
  });
@@ -423,7 +435,6 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
423
435
  });
424
436
  };
425
437
  var onContextGroup = function (e, blockId, isEditingGroup) {
426
- console.log(e, blockId, isEditingGroup);
427
438
  setSelectedBlockId(blockId);
428
439
  sectionActionHandler &&
429
440
  sectionActionHandler({
@@ -471,6 +482,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
471
482
  var breakpoints = device === 'DESKTOP' ? { lg: 100, sm: 0 } : { lg: 1200, sm: 480 };
472
483
  var innerRef = (0, react_1.useRef)(null);
473
484
  var clickOneCBInBulk = function (id) {
485
+ var _a;
474
486
  var blockId = blockIdMap.CB_ID[id];
475
487
  if (shortcutKeyMode === 'COLLISION_SELECT') {
476
488
  // makeCollisionOfBulk();
@@ -492,7 +504,8 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
492
504
  block: {
493
505
  blockId: oneLastBlockId,
494
506
  cbId: cbId,
495
- type: 'COMPONENT_BLOCK'
507
+ type: 'COMPONENT_BLOCK',
508
+ workDir: (_a = (0, group_1.getBlockWorkDirPath)(newblock, blockId)) !== null && _a !== void 0 ? _a : 'NOT-FOUND'
496
509
  }
497
510
  }
498
511
  });
@@ -519,11 +532,6 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
519
532
  }
520
533
  return false;
521
534
  })();
522
- var _o = (0, react_1.useState)('ROOT'), editingGroupBlock = _o[0], setEditingGroupBlock = _o[1];
523
- var _p = (0, react_1.useState)([]), bulkBlockIds = _p[0], setBulkBlockIds = _p[1];
524
- var newblock = bulkBlockIds.length > 0
525
- ? (0, group_1.addBulkToTarget)(pedigreeState, editingGroupBlock, bulkBlockIds)
526
- : pedigreeState;
527
535
  var onDoubleClickGroup = function (e, id, type) {
528
536
  e.stopPropagation();
529
537
  if (id === 'BULK') {
@@ -535,6 +543,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
535
543
  setEditingGroupBlock('ROOT');
536
544
  };
537
545
  var onClickGroup = function (e, id, type) {
546
+ var _a, _b, _c, _d;
538
547
  e.stopPropagation();
539
548
  if (id === 'BULK') {
540
549
  return;
@@ -551,14 +560,18 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
551
560
  block: {
552
561
  blockId: oneLastBlockId,
553
562
  type: 'COMPONENT_BLOCK',
554
- cbId: blockIdMap.BLOCK_ID[oneLastBlockId]
563
+ cbId: blockIdMap.BLOCK_ID[oneLastBlockId],
564
+ workDir: (_a = (0, group_1.getBlockWorkDirPath)(newblock, oneLastBlockId)) !== null && _a !== void 0 ? _a : 'NOT-FOUND'
555
565
  }
556
566
  }
557
567
  });
558
568
  return;
559
569
  }
560
- var newBulkBlockIds = bulkBlockIds.filter(function (each) { return each !== id; });
561
- setBulkBlockIds(newBulkBlockIds);
570
+ var newBulkBlockIds_1 = bulkBlockIds.filter(function (each) { return each !== id; });
571
+ var newBulkCBIds_1 = newBulkBlockIds_1
572
+ .map(function (id) { return blockIdMap.BLOCK_ID[id]; })
573
+ .filter(function (each) { return each !== undefined; });
574
+ setBulkBlockIds(newBulkBlockIds_1);
562
575
  sectionActionHandler &&
563
576
  sectionActionHandler({
564
577
  type: '@CUSTOMSECTION/BLOCK_CLICKED',
@@ -566,7 +579,9 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
566
579
  block: {
567
580
  blockId: 'BULK',
568
581
  type: 'BULK',
569
- childrenBlockIds: newBulkBlockIds
582
+ childrenBlockIds: newBulkBlockIds_1,
583
+ childrenCBIds: newBulkCBIds_1,
584
+ workDir: (_b = (0, group_1.getBlockWorkDirPath)(newblock, 'BULK')) !== null && _b !== void 0 ? _b : 'NOT-FOUND'
570
585
  }
571
586
  }
572
587
  });
@@ -574,8 +589,11 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
574
589
  }
575
590
  if (shortcutKeyMode === 'BULK_SELECT') {
576
591
  var added = selectedBlockId ? [selectedBlockId.toString(), id] : [id];
577
- var newBulkBlocks = Array.from(new Set(__spreadArray(__spreadArray([], bulkBlockIds, true), added, true)));
578
- setBulkBlockIds(newBulkBlocks);
592
+ var newBulkBlockIds_2 = Array.from(new Set(__spreadArray(__spreadArray([], bulkBlockIds, true), added, true)));
593
+ var newBulkCBIds_2 = newBulkBlockIds_2
594
+ .map(function (id) { return blockIdMap.BLOCK_ID[id]; })
595
+ .filter(function (each) { return each !== undefined; });
596
+ setBulkBlockIds(newBulkBlockIds_2);
579
597
  setSelectedBlockId(null);
580
598
  sectionActionHandler &&
581
599
  sectionActionHandler({
@@ -584,7 +602,9 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
584
602
  block: {
585
603
  blockId: 'BULK',
586
604
  type: 'BULK',
587
- childrenBlockIds: newBulkBlocks
605
+ childrenBlockIds: newBulkBlockIds_2,
606
+ childrenCBIds: newBulkCBIds_2,
607
+ workDir: (_c = (0, group_1.getBlockWorkDirPath)(newblock, 'BULK')) !== null && _c !== void 0 ? _c : 'NOT-FOUND'
588
608
  }
589
609
  }
590
610
  });
@@ -592,13 +612,20 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
592
612
  }
593
613
  setBulkBlockIds([]);
594
614
  setSelectedBlockId(id);
615
+ var newBulkBlockIds = (0, group_1.findAllChildrenIds)(newblock, id, 'current');
616
+ var newBulkCBIds = newBulkBlockIds
617
+ .map(function (id) { return blockIdMap.BLOCK_ID[id]; })
618
+ .filter(function (each) { return each !== undefined; });
595
619
  sectionActionHandler &&
596
620
  sectionActionHandler({
597
621
  type: '@CUSTOMSECTION/BLOCK_CLICKED',
598
622
  payload: {
599
623
  block: {
600
624
  blockId: id,
601
- type: 'GROUP_BLOCK'
625
+ type: 'GROUP_BLOCK',
626
+ workDir: (_d = (0, group_1.getBlockWorkDirPath)(newblock, id)) !== null && _d !== void 0 ? _d : 'NOT-FOUND',
627
+ childrenBlockIds: newBulkBlockIds,
628
+ childrenCBIds: newBulkCBIds
602
629
  }
603
630
  }
604
631
  });
@@ -62,10 +62,10 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
62
62
  var _a;
63
63
  var _b = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _b.device, editingSectionId = _b.editingSectionId, mode = _b.mode, shortcutKeyMode = _b.shortcutKeyMode, sectionActionHandler = _b.sectionActionHandler;
64
64
  var componentBlocks = props.componentBlocks, jsonProperties = props.jsonProperties;
65
- var _c = jsonProperties.data, CB_PLACEMENT_PROP_SECTION = _c.CB_PLACEMENT_PROP_SECTION, CB_LAYOUT_PROP_PADDING = _c.CB_LAYOUT_PROP_PADDING;
65
+ var _c = jsonProperties, _d = _c.data, CB_PLACEMENT_PROP_SECTION = _d.CB_PLACEMENT_PROP_SECTION, CB_LAYOUT_PROP_PADDING = _d.CB_LAYOUT_PROP_PADDING, zOrders = _c.zOrders;
66
66
  var containerRef = (0, react_1.useRef)(null);
67
67
  var size = (0, useResizableObserver_1.useResizeObserver)({ ref: containerRef, box: 'border-box' });
68
- var _d = (0, react_1.useState)(null), selectedCB = _d[0], setSelectedCB = _d[1];
68
+ var _e = (0, react_1.useState)(null), selectedCB = _e[0], setSelectedCB = _e[1];
69
69
  var gleRef = (0, react_1.useRef)(null);
70
70
  var isMobile = device === 'MOBILE';
71
71
  var isEditMode = mode === 'EDIT';
@@ -124,10 +124,10 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
124
124
  setSelectedCB('BULK');
125
125
  }
126
126
  }, [selectedCB, shortcutKeyMode, sectionActionHandler, setSelectedCB]);
127
- var _e = (0, util_1.parseCustomSectionPlacement)({
127
+ var _f = (0, util_1.parseCustomSectionPlacement)({
128
128
  isMobile: isMobile,
129
129
  customSectionProps: CB_PLACEMENT_PROP_SECTION
130
- }), width = _e.width, minHeight = _e.minHeight, isFullWidth = _e.isFullWidth;
130
+ }), width = _f.width, minHeight = _f.minHeight, isFullWidth = _f.isFullWidth;
131
131
  var customSectionStyles = {
132
132
  minHeight: "".concat(minHeight, "vh"),
133
133
  width: '100%',
@@ -195,7 +195,10 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
195
195
  maxWidth: customSectionStyles.maxWidth,
196
196
  minWidth: isMobile ? GLE_MIN_WIDTH_MOBILE_PX : GLE_MIN_WIDTH_DESKTOP_PX,
197
197
  fontSize: "".concat(baseFontSize, "px")
198
- } }, { children: (_a = props.componentBlocks) === null || _a === void 0 ? void 0 : _a.map(function (cb, index) { return ((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsx)(FlexGridItem_1.default, { cb: cb, index: index, device: device, rowHeight: rowHeight }) }, cb.id)); }) })) })) })) }) }));
198
+ } }, { children: (_a = props.componentBlocks) === null || _a === void 0 ? void 0 : _a.map(function (cb, index) {
199
+ var _a;
200
+ return ((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsx)(FlexGridItem_1.default, { cb: cb, index: index, device: device, rowHeight: rowHeight, zIndex: (_a = zOrders === null || zOrders === void 0 ? void 0 : zOrders[device === 'DESKTOP' ? 'desktop' : 'mobile'][cb.id]) !== null && _a !== void 0 ? _a : 0 }) }, cb.id));
201
+ }) })) })) })) }) }));
199
202
  });
200
203
  var GridContainer = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: grid; /* Space between grid items */\n gap: 10px;\n grid-auto-rows: minmax(", ", auto);\n grid-template-columns: repeat(", ", 1fr);\n grid-template-rows: repeat(\n ", ",\n minmax(", ", auto)\n );\n padding: 10px 10px;\n\n * {\n box-sizing: border-box;\n }\n"], ["\n display: grid; /* Space between grid items */\n gap: 10px;\n grid-auto-rows: minmax(", ", auto);\n grid-template-columns: repeat(", ", 1fr);\n grid-template-rows: repeat(\n ", ",\n minmax(", ", auto)\n );\n padding: 10px 10px;\n\n * {\n box-sizing: border-box;\n }\n"])), function (props) { return "".concat(props.rowHeight, "px"); }, function (props) { return props.cols; }, function (props) { return props.sectionRow; }, function (props) { return "".concat(props.rowHeight, "px"); });
201
204
  var S_SectionWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: relative;\n"], ["\n position: relative;\n"])));
@@ -6,6 +6,7 @@ type Props = {
6
6
  index: number;
7
7
  device: Device;
8
8
  rowHeight: number;
9
+ zIndex: number;
9
10
  };
10
- declare function FlexGridItem({ cb, index, device, rowHeight }: Props): JSX.Element;
11
+ declare function FlexGridItem({ cb, index, device, rowHeight, zIndex }: Props): JSX.Element;
11
12
  export default FlexGridItem;
@@ -23,13 +23,16 @@ var styled_components_1 = __importDefault(require("styled-components"));
23
23
  var ComponentBlockMatcher_1 = __importDefault(require("./components/ComponentBlock/ComponentBlockMatcher"));
24
24
  var gap = 10;
25
25
  function FlexGridItem(_a) {
26
- var cb = _a.cb, index = _a.index, device = _a.device, rowHeight = _a.rowHeight;
26
+ var cb = _a.cb, index = _a.index, device = _a.device, rowHeight = _a.rowHeight, zIndex = _a.zIndex;
27
27
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
28
28
  var defaultHeight = getMaxHeight(cb.jsonProperties.data.CB_PLACEMENT_PROP_PLACEMENT, device, rowHeight);
29
29
  var gridArea = getGridAreaFromCB(cb.jsonProperties.data.CB_PLACEMENT_PROP_PLACEMENT, device);
30
- var zIndex = device === 'DESKTOP'
31
- ? cb.jsonProperties.data.CB_PLACEMENT_PROP_PLACEMENT.CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX
32
- : cb.jsonProperties.data.CB_PLACEMENT_PROP_PLACEMENT['CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX:MOBILE'];
30
+ // const zIndex =
31
+ // device === 'DESKTOP'
32
+ // ? cb.jsonProperties.data.CB_PLACEMENT_PROP_PLACEMENT.CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX
33
+ // : cb.jsonProperties.data.CB_PLACEMENT_PROP_PLACEMENT[
34
+ // 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX:MOBILE'
35
+ // ];
33
36
  return ((0, jsx_runtime_1.jsx)(GridItem, __assign({ style: {
34
37
  zIndex: zIndex,
35
38
  gridArea: gridArea
@@ -1,5 +1,6 @@
1
- import type { ComponentBlock } from '../types';
2
- export declare function parsePlacement(components: ComponentBlock[]): {
1
+ import { ComponentBlock } from '../types';
2
+ import type { SectionZOrder } from 'publ-echo-test/dist/lib/GridLayoutEditor/group';
3
+ export declare function parsePlacement(components: ComponentBlock[], zOrders: SectionZOrder): {
3
4
  sm: {
4
5
  i: string;
5
6
  x: number;
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ /* eslint-disable no-console */
2
3
  var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
3
4
  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
4
5
  if (ar || !(i in from)) {
@@ -11,10 +12,13 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
11
12
  Object.defineProperty(exports, "__esModule", { value: true });
12
13
  exports.parsePlacement = void 0;
13
14
  var types_1 = require("../types");
14
- function parsePlacement(components) {
15
+ function parsePlacement(components, zOrders) {
16
+ if (!zOrders) {
17
+ console.error('Z-ORDER NOT FOUND');
18
+ }
15
19
  return components.reduce(function (acc, cur) {
16
20
  var id = cur.id, jsonProperties = cur.jsonProperties, componentBlockCode = cur.componentBlockCode;
17
- var _a = parsePropPlacement(jsonProperties.data.CB_PLACEMENT_PROP_PLACEMENT, id, componentBlockCode), mobileLayout = _a.mobileLayout, desktopLayout = _a.desktopLayout;
21
+ var _a = parsePropPlacement(jsonProperties.data.CB_PLACEMENT_PROP_PLACEMENT, id, componentBlockCode, zOrders), mobileLayout = _a.mobileLayout, desktopLayout = _a.desktopLayout;
18
22
  return {
19
23
  sm: __spreadArray(__spreadArray([], acc.sm, true), [mobileLayout], false),
20
24
  lg: __spreadArray(__spreadArray([], acc.lg, true), [desktopLayout], false)
@@ -22,14 +26,14 @@ function parsePlacement(components) {
22
26
  }, { sm: [], lg: [] });
23
27
  }
24
28
  exports.parsePlacement = parsePlacement;
25
- function parsePropPlacement(props, id, cbCode) {
29
+ function parsePropPlacement(props, id, cbCode, zOrders) {
26
30
  var desktopLayout = {
27
31
  i: id.toString(),
28
32
  x: props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX,
29
33
  y: props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY,
30
34
  w: props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS,
31
35
  h: props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS,
32
- z: props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX + 500,
36
+ z: zOrders.desktop[id] + 500,
33
37
  autoResize: cbCode === types_1.CB_ALL_CODES.CB_TEXT
34
38
  };
35
39
  var mobileLayout = {
@@ -38,7 +42,7 @@ function parsePropPlacement(props, id, cbCode) {
38
42
  y: props['CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY:MOBILE'],
39
43
  w: props['CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS:MOBILE'],
40
44
  h: props['CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS:MOBILE'],
41
- z: props['CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX:MOBILE'] + 500,
45
+ z: zOrders.mobile[id] + 500,
42
46
  autoResize: cbCode === types_1.CB_ALL_CODES.CB_TEXT
43
47
  };
44
48
  return {
@@ -6,7 +6,7 @@ import type { CB_EFFECT_PROP_ENTANIM_SPECS } from './sections/CustomSection/util
6
6
  import type { CB_LAYOUT_PROP_PADDING_SPECS } from './sections/CustomSection/util/layoutPropParsers/parseLayoutPropPadding';
7
7
  import type { CB_STYLE_PROP_BGCOLOR_SPECS } from './sections/CustomSection/util/stylePropParsers/parseStylePropBgColor';
8
8
  import type { CB_STYLE_PROP_BGOVERLAY_SPECS } from './sections/CustomSection/util/stylePropParsers/parseStylePropBgOverlay';
9
- import type { Block } from 'publ-echo-test/dist/lib/GridLayoutEditor/group';
9
+ import type { Block, SectionZOrder } from 'publ-echo-test/dist/lib/GridLayoutEditor/group';
10
10
  import type { Ref } from 'react';
11
11
  export { TypeOfSectionAction };
12
12
  export type TypeOfSectionManifestSchema = 'BASE_INTRO' | 'BASE_CONTENTS' | 'BASE_CONTENTS_CAROUSEL' | 'BASE_FOOTER' | 'BASE_INFO_BOX' | 'EXP_IFRAME' | 'PRG_MEMBERSHIP_DISPLAY' | 'CUSTOM';
@@ -301,6 +301,7 @@ export type IMembershipDisplay = {
301
301
  connectedMemberships: IConnectedMembership[];
302
302
  };
303
303
  export type ISectionJsonProperties = {
304
+ zOrders?: SectionZOrder;
304
305
  pedigree?: SectionPedigree;
305
306
  data: {
306
307
  CB_CONTENT_PROP_SECTION: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "2.5.63",
3
+ "version": "2.5.65",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",