pds-dev-kit-web-test 2.7.286 → 2.7.288

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.
@@ -137,6 +137,7 @@ var Composition = (0, react_1.forwardRef)(function CustomSection(props, ref) {
137
137
  maxWidth: maxWidth ? "".concat(maxWidth, "px") : '100%',
138
138
  minWidth: "".concat(Math.max(canvasWidth, minWidth !== null && minWidth !== void 0 ? minWidth : 0), "px")
139
139
  };
140
+ console.log('composition: ', customSectionStyles);
140
141
  var onClickSection = function () {
141
142
  if (!isEditMode) {
142
143
  return;
@@ -43,8 +43,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
43
43
  Object.defineProperty(exports, "__esModule", { value: true });
44
44
  var jsx_runtime_1 = require("react/jsx-runtime");
45
45
  /* eslint-disable @typescript-eslint/no-unused-vars */
46
- var group_1 = require("publ-echo-test/dist/lib/GridLayoutEditor/group");
47
- var renderHelpers_1 = require("publ-echo-test/dist/lib/GridLayoutEditor/utils/renderHelpers");
46
+ require("publ-echo-test/dist/lib/GridLayoutEditor/utils/renderHelpers");
48
47
  require("publ-echo/dist/lib/GridItem/OutsideClickHandler");
49
48
  var react_1 = __importStar(require("react"));
50
49
  var ErrorBoundary_1 = require("../../DynamicLayout/components/Section/ErrorBoundary");
@@ -52,7 +51,7 @@ var dynamicLayoutContext_1 = require("../../DynamicLayout/dynamicLayoutContext")
52
51
  var styled_components_1 = __importDefault(require("styled-components"));
53
52
  require("../components");
54
53
  var CompositionBackground_1 = __importDefault(require("../CompositionRenderer/CompositionBackground"));
55
- var FlexGridItem_1 = __importDefault(require("../CompositionRenderer/FlexGridItem"));
54
+ require("../CompositionRenderer/FlexGridItem");
56
55
  var gleStyles_1 = require("../gleStyles");
57
56
  var useResizableObserver_1 = require("../sections/CustomSection/hooks/useResizableObserver");
58
57
  var util_1 = require("../sections/CustomSection/util");
@@ -96,53 +95,12 @@ var GridAutoRowEditor = (0, react_1.forwardRef)(function CustomSection(props, re
96
95
  // sm
97
96
  // };
98
97
  // });
99
- (0, react_1.useEffect)(function () {
100
- if (editingSectionId !== props.id) {
101
- setSelectedCB(null);
102
- // breakGroupCB();
103
- }
104
- }, [editingSectionId]);
105
- // NOTE: 추후에 event를 외부에서 전달받게하거나, 아예 상태를 끌어올리거나 해야합니다.
106
- (0, react_1.useLayoutEffect)(function () {
107
- if (props.id !== editingSectionId) {
108
- return;
109
- }
110
- if (!shortcutKeyMode) {
111
- return;
112
- }
113
- if (shortcutKeyMode === 'SELECT_ALL') {
114
- if ((componentBlocks === null || componentBlocks === void 0 ? void 0 : componentBlocks.length) === 1) {
115
- setSelectedCB(componentBlocks[0].id);
116
- return;
117
- }
118
- // makeAllInOneGroup();
119
- return;
120
- }
121
- if (shortcutKeyMode === 'MANUAL_BULK_BREAK') {
122
- // breakGroupCB();
123
- setSelectedCB(null);
124
- return;
125
- }
126
- }, [shortcutKeyMode, setSelectedCB]);
127
- (0, react_1.useLayoutEffect)(function () {
128
- if (props.id !== editingSectionId) {
129
- return;
130
- }
131
- if (shortcutKeyMode === 'MANUAL_COLLISION_SELECT') {
132
- if (!selectedCB || selectedCB === 'BULK') {
133
- return;
134
- }
135
- // makeCollisionGroup(selectedCB);
136
- // sectionActionHandler &&
137
- // sectionActionHandler({
138
- // type: '@CUSTOMSECTION/BLOCK_CLICKED',
139
- // payload: {
140
- // block:
141
- // }
142
- // });
143
- setSelectedCB('BULK');
144
- }
145
- }, [selectedCB, shortcutKeyMode, sectionActionHandler, setSelectedCB]);
98
+ // useEffect(() => {
99
+ // if (editingSectionId !== props.id) {
100
+ // setSelectedCB(null);
101
+ // // breakGroupCB();
102
+ // }
103
+ // }, [editingSectionId]);
146
104
  var _k = (0, parseCompositionPlacement_1.default)({
147
105
  isMobile: isMobile,
148
106
  compositionProps: CB_PLACEMENT_PROP_COMPOSITION
@@ -155,6 +113,7 @@ var GridAutoRowEditor = (0, react_1.forwardRef)(function CustomSection(props, re
155
113
  maxWidth: maxWidth ? "".concat(maxWidth, "px") : '100%',
156
114
  minWidth: "".concat(Math.max(canvasWidth, minWidth !== null && minWidth !== void 0 ? minWidth : 0), "px")
157
115
  };
116
+ console.log(customSectionStyles);
158
117
  var onClickSection = function () {
159
118
  if (!isEditMode) {
160
119
  return;
@@ -262,51 +221,6 @@ var GridAutoRowEditor = (0, react_1.forwardRef)(function CustomSection(props, re
262
221
  // onToggleGBPinned={onToggleGBPinned}
263
222
  isEditMode: true }, child.blockId)); })] })) })) })) }) })) }));
264
223
  });
265
- function GroupBlockRender(_a) {
266
- 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;
267
- var childrenIds = (0, group_1.findAllChildrenCbIds)(pedigree, block.blockId).map(function (i) { return i.toString(); });
268
- var bounding = (0, renderHelpers_1.getBoundingArea)(layouts, childrenIds);
269
- (0, react_1.useEffect)(function () {
270
- if (!isEditing) {
271
- return;
272
- }
273
- function handleDoubleClickOutside(e) {
274
- if (!e.target.closest('.group')) {
275
- onDoubleClickOutside();
276
- }
277
- }
278
- document.addEventListener('dblclick', handleDoubleClickOutside);
279
- return function () {
280
- document.removeEventListener('dblclick', handleDoubleClickOutside);
281
- };
282
- }, [isEditing]);
283
- if (!bounding) {
284
- return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
285
- }
286
- var gridArea = getGridAreaFromGroup({
287
- x: bounding.x,
288
- y: bounding.y,
289
- cols: bounding.w,
290
- rows: bounding.h
291
- });
292
- var children = componentBlocks === null || componentBlocks === void 0 ? void 0 : componentBlocks.filter(function (cb) { return childrenIds.includes(cb.id.toString()); });
293
- if (childrenIds.length === 0) {
294
- return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "\uB529\uD06C\uADF8\uB8F9" });
295
- }
296
- return ((0, jsx_runtime_1.jsxs)("div", __assign({ style: {
297
- gridArea: gridArea,
298
- position: 'relative',
299
- width: '100%',
300
- height: '100%'
301
- }, onDoubleClick: onDoubleClick }, { children: [(0, jsx_runtime_1.jsx)("div", { className: "group", style: {
302
- position: 'absolute',
303
- top: 0,
304
- left: 0,
305
- right: 0,
306
- bottom: 0,
307
- boxShadow: '0 0 0 3px #027aff'
308
- } }), 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, block: block, isParentGroupPinned: isPinned }) }, cb.id)); })] })));
309
- }
310
224
  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"])));
311
225
  function getGridAreaFromGroup(position) {
312
226
  var x = position.x, y = position.y, cols = position.cols, rows = position.rows;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "2.7.286",
3
+ "version": "2.7.288",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",