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

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.
@@ -310,7 +310,7 @@ function GroupBlockRender(_a) {
310
310
  right: 0,
311
311
  bottom: 0,
312
312
  boxShadow: '0 0 0 3px #e602ff'
313
- } }), children === null || children === void 0 ? void 0 : children.map(function (cb, index) { return ((0, jsx_runtime_1.jsxs)(ErrorBoundary_1.ErrorBoundary, { children: [cb.id, (0, jsx_runtime_1.jsx)(FlexGridItem_1.default, { cb: cb, index: index, device: "DESKTOP", rowHeight: 50, zIndex: 0, style: { pointerEvents: 'none', opacity: isEditing ? 1 : 0.3 }, showPinned: isEditing, isParentGroupPinned: isPinned })] }, cb.id)); })] })));
313
+ } }), children === null || children === void 0 ? void 0 : children.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: "DESKTOP", rowHeight: 50, zIndex: 0, style: { pointerEvents: 'none', opacity: isEditing ? 1 : 0.3 }, showPinned: isEditing, isParentGroupPinned: isPinned }) }, cb.id)); })] })));
314
314
  }
315
315
  var S_Pinned = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n pointer-events: auto;\n position: absolute;\n right: 0;\n top: 0;\n z-index: 9999999;\n"], ["\n pointer-events: auto;\n position: absolute;\n right: 0;\n top: 0;\n z-index: 9999999;\n"])));
316
316
  function getGridAreaFromGroup(position) {
@@ -14,6 +14,29 @@ var __assign = (this && this.__assign) || function () {
14
14
  };
15
15
  return __assign.apply(this, arguments);
16
16
  };
17
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ var desc = Object.getOwnPropertyDescriptor(m, k);
20
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
21
+ desc = { enumerable: true, get: function() { return m[k]; } };
22
+ }
23
+ Object.defineProperty(o, k2, desc);
24
+ }) : (function(o, m, k, k2) {
25
+ if (k2 === undefined) k2 = k;
26
+ o[k2] = m[k];
27
+ }));
28
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
29
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
30
+ }) : function(o, v) {
31
+ o["default"] = v;
32
+ });
33
+ var __importStar = (this && this.__importStar) || function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
17
40
  var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
18
41
  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
19
42
  if (ar || !(i in from)) {
@@ -31,7 +54,8 @@ exports.findAllChildrenCbIds = void 0;
31
54
  var jsx_runtime_1 = require("react/jsx-runtime");
32
55
  var renderHelpers_1 = require("publ-echo-test/dist/lib/GridLayoutEditor/utils/renderHelpers");
33
56
  var styled_components_1 = __importDefault(require("styled-components"));
34
- var FlexGridItem_1 = require("../CompositionRenderer/FlexGridItem");
57
+ var ErrorBoundary_1 = require("../components/Section/ErrorBoundary");
58
+ var FlexGridItem_1 = __importStar(require("../CompositionRenderer/FlexGridItem"));
35
59
  function findAllChildrenCbIds(block, targetGroupId) {
36
60
  // 현재 블록이 target group이면, 모든 하위 컴포넌트 블록 ID를 수집
37
61
  if (block.blockId === targetGroupId) {
@@ -73,7 +97,6 @@ function RenderPedigreeRecursively(_a) {
73
97
  : gridArea_1;
74
98
  return ((0, jsx_runtime_1.jsxs)(S_GroupItem, __assign({ cols: bounding.w, sectionRow: bounding.h, rowHeight: rowHeight, selectedRows: [], style: {
75
99
  gridArea: gridAreaObjToString(relativeGridArea_1),
76
- border: '1px solid red',
77
100
  display: 'grid'
78
101
  } }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ style: {
79
102
  position: 'absolute',
@@ -89,17 +112,25 @@ function RenderPedigreeRecursively(_a) {
89
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)); })] })));
90
113
  }
91
114
  // default: TYPE === 'COMPONENT_BLOCK'
92
- var cb = cbs.find(function (c) { return c.blockId === block.blockId; });
115
+ var cbIndex = cbs.findIndex(function (c) { return c.blockId === block.blockId; });
116
+ var cb = cbs[cbIndex];
117
+ if (!cb) {
118
+ return (0, jsx_runtime_1.jsxs)("div", { children: ["NO CB FOUND FOR ", block.blockId] });
119
+ }
93
120
  var originalGridAreaString = (0, FlexGridItem_1.getGridAreaFromCB)(cb.jsonProperties.data.CB_PLACEMENT_PROP_PLACEMENT, 'DESKTOP');
94
121
  var originalGridArea = parseGridArea(originalGridAreaString);
95
122
  // 부모 그룹이 있는 경우, 상대적 위치 계산
96
123
  var relativeGridArea = parentGroupArea
97
124
  ? calculateRelativeGridArea(originalGridArea, parentGroupArea)
98
125
  : originalGridArea;
126
+ var isEditing = false;
127
+ var isPinned = false;
99
128
  return ((0, jsx_runtime_1.jsx)(S_GridItem, __assign({ style: {
100
- gridArea: gridAreaObjToString(relativeGridArea),
101
- border: '1px solid blue'
102
- }, "data-og-grid-area": originalGridAreaString, "data-rel-grid-area": gridAreaObjToString(relativeGridArea) }, { children: block.blockId })));
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) })));
103
134
  }
104
135
  exports.default = RenderPedigreeRecursively;
105
136
  function clamp(num, min, max) {
@@ -155,8 +186,8 @@ function calculateRelativeGridArea(componentArea, parentArea) {
155
186
  colEnd: componentArea.colEnd - parentArea.colStart + 1
156
187
  };
157
188
  }
158
- var S_GridItem = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 100%;\n position: relative;\n width: 100%;\n"], ["\n height: 100%;\n position: relative;\n width: 100%;\n"])));
159
- var S_GroupItem = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n gap: 10px;\n grid-template-columns: repeat(", ", 1fr);\n grid-template-rows: ", ";\n position: relative; /* \uBC30\uC5F4\uC744 \uACF5\uBC31\uC73C\uB85C \uAD6C\uBD84\uB41C \uBB38\uC790\uC5F4\uB85C \uD569\uCE69\uB2C8\uB2E4. */\n"], ["\n gap: 10px;\n grid-template-columns: repeat(", ", 1fr);\n grid-template-rows: ", ";\n position: relative; /* \uBC30\uC5F4\uC744 \uACF5\uBC31\uC73C\uB85C \uAD6C\uBD84\uB41C \uBB38\uC790\uC5F4\uB85C \uD569\uCE69\uB2C8\uB2E4. */\n"])), function (props) { return props.cols; }, function (props) {
189
+ var S_GridItem = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n box-shadow: 0 0 0 2px red;\n height: 100%;\n position: relative;\n width: 100%;\n"], ["\n box-shadow: 0 0 0 2px red;\n height: 100%;\n position: relative;\n width: 100%;\n"])));
190
+ var S_GroupItem = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n box-shadow: 0 0 0 3px blue;\n gap: 10px;\n grid-template-columns: repeat(", ", 1fr);\n grid-template-rows: ", ";\n position: relative; /* \uBC30\uC5F4\uC744 \uACF5\uBC31\uC73C\uB85C \uAD6C\uBD84\uB41C \uBB38\uC790\uC5F4\uB85C \uD569\uCE69\uB2C8\uB2E4. */\n"], ["\n box-shadow: 0 0 0 3px blue;\n gap: 10px;\n grid-template-columns: repeat(", ", 1fr);\n grid-template-rows: ", ";\n position: relative; /* \uBC30\uC5F4\uC744 \uACF5\uBC31\uC73C\uB85C \uAD6C\uBD84\uB41C \uBB38\uC790\uC5F4\uB85C \uD569\uCE69\uB2C8\uB2E4. */\n"])), function (props) { return props.cols; }, function (props) {
160
191
  // // 전체 행 개수만큼 배열을 생성하여 각 행의 CSS 값을 정의합니다.
161
192
  return Array.from({ length: props.sectionRow })
162
193
  .map(function (_, index) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "2.7.100",
3
+ "version": "2.7.101",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",