pds-dev-kit-web-test 2.7.99 → 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.
|
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
|
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) {
|
@@ -68,9 +92,11 @@ function RenderPedigreeRecursively(_a) {
|
|
68
92
|
cols: bounding.w,
|
69
93
|
rows: bounding.h
|
70
94
|
});
|
95
|
+
var relativeGridArea_1 = parentGroupArea
|
96
|
+
? calculateRelativeGridArea(gridArea_1, parentGroupArea)
|
97
|
+
: gridArea_1;
|
71
98
|
return ((0, jsx_runtime_1.jsxs)(S_GroupItem, __assign({ cols: bounding.w, sectionRow: bounding.h, rowHeight: rowHeight, selectedRows: [], style: {
|
72
|
-
gridArea: gridAreaObjToString(
|
73
|
-
border: '1px solid red',
|
99
|
+
gridArea: gridAreaObjToString(relativeGridArea_1),
|
74
100
|
display: 'grid'
|
75
101
|
} }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ style: {
|
76
102
|
position: 'absolute',
|
@@ -86,17 +112,25 @@ function RenderPedigreeRecursively(_a) {
|
|
86
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)); })] })));
|
87
113
|
}
|
88
114
|
// default: TYPE === 'COMPONENT_BLOCK'
|
89
|
-
var
|
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
|
+
}
|
90
120
|
var originalGridAreaString = (0, FlexGridItem_1.getGridAreaFromCB)(cb.jsonProperties.data.CB_PLACEMENT_PROP_PLACEMENT, 'DESKTOP');
|
91
121
|
var originalGridArea = parseGridArea(originalGridAreaString);
|
92
122
|
// 부모 그룹이 있는 경우, 상대적 위치 계산
|
93
123
|
var relativeGridArea = parentGroupArea
|
94
124
|
? calculateRelativeGridArea(originalGridArea, parentGroupArea)
|
95
125
|
: originalGridArea;
|
126
|
+
var isEditing = false;
|
127
|
+
var isPinned = false;
|
96
128
|
return ((0, jsx_runtime_1.jsx)(S_GridItem, __assign({ style: {
|
97
|
-
gridArea: gridAreaObjToString(relativeGridArea)
|
98
|
-
|
99
|
-
|
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) })));
|
100
134
|
}
|
101
135
|
exports.default = RenderPedigreeRecursively;
|
102
136
|
function clamp(num, min, max) {
|
@@ -152,8 +186,8 @@ function calculateRelativeGridArea(componentArea, parentArea) {
|
|
152
186
|
colEnd: componentArea.colEnd - parentArea.colStart + 1
|
153
187
|
};
|
154
188
|
}
|
155
|
-
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"])));
|
156
|
-
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) {
|
157
191
|
// // 전체 행 개수만큼 배열을 생성하여 각 행의 CSS 값을 정의합니다.
|
158
192
|
return Array.from({ length: props.sectionRow })
|
159
193
|
.map(function (_, index) {
|