pds-dev-kit-web-test 2.5.332 → 2.5.334

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.
@@ -51,6 +51,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
51
51
  };
52
52
  Object.defineProperty(exports, "__esModule", { value: true });
53
53
  var jsx_runtime_1 = require("react/jsx-runtime");
54
+ /* eslint-disable @typescript-eslint/no-unused-vars */
54
55
  var publ_echo_1 = require("publ-echo");
55
56
  var group_1 = require("publ-echo/dist/lib/GridLayoutEditor/group");
56
57
  var renderHelpers_1 = require("publ-echo/dist/lib/GridLayoutEditor/utils/renderHelpers");
@@ -716,10 +717,9 @@ var CompositionEditor = (0, react_1.forwardRef)(function CompositionEditorCanvas
716
717
  setSelectedBlockId(null);
717
718
  compositionActionHandler &&
718
719
  compositionActionHandler({
719
- type: '@COMPOSITION/COMPOSITION_RIGHT_CLICKED',
720
+ type: '@COMPOSITION/COMPOSITION_CLICKED',
720
721
  payload: {
721
- compositionId: props.compositionData.id,
722
- e: e
722
+ compositionId: props.compositionData.id
723
723
  }
724
724
  });
725
725
  };
@@ -771,18 +771,19 @@ var CompositionEditor = (0, react_1.forwardRef)(function CompositionEditorCanvas
771
771
  // const responsiveFontMode =
772
772
  // // NOTE: local환경에서 CB_CONTENT_PROP_COMPOSITION이 없는 경우가 있음.
773
773
  // !!CB_CONTENT_PROP_COMPOSITION?.CB_CONTENT_PROP_COMPOSITION_SPEC_VARIABLEROOTFONTSIZE;
774
+ var responsiveFontMode = true;
774
775
  if (device === 'MOBILE') {
775
776
  // const cellWidth = width / rows;
776
777
  var cellWidth_1 = 50;
777
778
  setRowHeight(cellWidth_1 * 0.56);
778
- // baseFontSize !== 16 && setBaseFontSize(width * 0.0133);
779
- // responsiveFontMode ? setBaseFontSize(width * 0.0421) : setBaseFontSize(16);
779
+ baseFontSize !== 16 && setBaseFontSize(width * 0.0133);
780
+ responsiveFontMode ? setBaseFontSize(width * 0.0421) : setBaseFontSize(16);
780
781
  return;
781
782
  }
782
783
  // const cellWidth = width / cols;
783
784
  var cellWidth = 50;
784
785
  setRowHeight(cellWidth * 0.56);
785
- // responsiveFontMode ? setBaseFontSize(width * 0.0133) : setBaseFontSize(16);
786
+ responsiveFontMode ? setBaseFontSize(width * 0.0133) : setBaseFontSize(16);
786
787
  };
787
788
  var padding = (0, parseSectionPadding_1.default)(CB_LAYOUT_PROP_PADDING, device);
788
789
  var breakpoints = device === 'DESKTOP' ? { lg: 100, sm: 0 } : { lg: 1200, sm: 480 };
@@ -56,25 +56,21 @@ var parseCompositionPlacement_1 = __importDefault(require("../sections/CustomSec
56
56
  var CompositionBackground_1 = __importDefault(require("./CompositionBackground"));
57
57
  var FlexGridItem_1 = __importDefault(require("./FlexGridItem"));
58
58
  var Composition = (0, react_1.forwardRef)(function CustomSection(props, ref) {
59
- var _a, _b, _c, _d, _e, _f, _g;
60
- var _h = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext),
61
- // NOTE: 이것을 사용해야함
62
- contextDevice = _h.device, editingSectionId = _h.editingSectionId, mode = _h.mode, shortcutKeyMode = _h.shortcutKeyMode, sectionActionHandler = _h.sectionActionHandler, queryData = _h.queryData;
59
+ var _a, _b, _c, _d, _e;
60
+ var _f = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _f.device, editingSectionId = _f.editingSectionId, mode = _f.mode, shortcutKeyMode = _f.shortcutKeyMode, sectionActionHandler = _f.sectionActionHandler, queryData = _f.queryData;
63
61
  var componentBlocks = props.componentBlocks, jsonProperties = props.jsonProperties;
64
- // NOTE: 임시. 테스트용.
65
- var device = (_b = (_a = props.device) !== null && _a !== void 0 ? _a : contextDevice) !== null && _b !== void 0 ? _b : 'DESKTOP';
66
62
  var isMobile = device === 'MOBILE';
67
63
  var isEditMode = mode === 'EDIT';
68
- var _j = jsonProperties, _k = _j.data, CB_PLACEMENT_PROP_COMPOSITION = _k.CB_PLACEMENT_PROP_COMPOSITION, CB_LAYOUT_PROP_PADDING = _k.CB_LAYOUT_PROP_PADDING, zOrders = _j.zOrders;
69
- var colsDesktop = (_c = CB_PLACEMENT_PROP_COMPOSITION.CB_PLACEMENT_PROP_COMPOSITION_SPEC_COLUMNS) !== null && _c !== void 0 ? _c : 24;
70
- var colsMobile = (_d = CB_PLACEMENT_PROP_COMPOSITION['CB_PLACEMENT_PROP_COMPOSITION_SPEC_COLUMNS:MOBILE']) !== null && _d !== void 0 ? _d : 8;
71
- var rowsDesktop = (_e = CB_PLACEMENT_PROP_COMPOSITION.CB_PLACEMENT_PROP_COMPOSITION_SPEC_ROWS) !== null && _e !== void 0 ? _e : 26;
72
- var rowsMobile = (_f = CB_PLACEMENT_PROP_COMPOSITION['CB_PLACEMENT_PROP_COMPOSITION_SPEC_ROWS:MOBILE']) !== null && _f !== void 0 ? _f : 26;
64
+ var _g = jsonProperties, _h = _g.data, CB_PLACEMENT_PROP_COMPOSITION = _h.CB_PLACEMENT_PROP_COMPOSITION, CB_LAYOUT_PROP_PADDING = _h.CB_LAYOUT_PROP_PADDING, zOrders = _g.zOrders;
65
+ var colsDesktop = (_a = CB_PLACEMENT_PROP_COMPOSITION.CB_PLACEMENT_PROP_COMPOSITION_SPEC_COLUMNS) !== null && _a !== void 0 ? _a : 24;
66
+ var colsMobile = (_b = CB_PLACEMENT_PROP_COMPOSITION['CB_PLACEMENT_PROP_COMPOSITION_SPEC_COLUMNS:MOBILE']) !== null && _b !== void 0 ? _b : 8;
67
+ var rowsDesktop = (_c = CB_PLACEMENT_PROP_COMPOSITION.CB_PLACEMENT_PROP_COMPOSITION_SPEC_ROWS) !== null && _c !== void 0 ? _c : 26;
68
+ var rowsMobile = (_d = CB_PLACEMENT_PROP_COMPOSITION['CB_PLACEMENT_PROP_COMPOSITION_SPEC_ROWS:MOBILE']) !== null && _d !== void 0 ? _d : 26;
73
69
  var rows = isMobile ? rowsMobile : rowsDesktop;
74
70
  var cols = isMobile ? colsMobile : colsDesktop;
75
71
  var containerRef = (0, react_1.useRef)(null);
76
72
  var size = (0, useResizableObserver_1.useResizeObserver)({ ref: containerRef, box: 'border-box' });
77
- var _l = (0, react_1.useState)(null), selectedCB = _l[0], setSelectedCB = _l[1];
73
+ var _j = (0, react_1.useState)(null), selectedCB = _j[0], setSelectedCB = _j[1];
78
74
  var gleRef = (0, react_1.useRef)(null);
79
75
  (0, react_1.useEffect)(function () {
80
76
  if (editingSectionId !== props.id) {
@@ -123,10 +119,10 @@ var Composition = (0, react_1.forwardRef)(function CustomSection(props, ref) {
123
119
  setSelectedCB('BULK');
124
120
  }
125
121
  }, [selectedCB, shortcutKeyMode, sectionActionHandler, setSelectedCB]);
126
- var _m = (0, parseCompositionPlacement_1.default)({
122
+ var _k = (0, parseCompositionPlacement_1.default)({
127
123
  isMobile: isMobile,
128
124
  compositionProps: CB_PLACEMENT_PROP_COMPOSITION
129
- }), minHeight = _m.minHeight, maxHeight = _m.maxHeight, maxWidth = _m.maxWidth, minWidth = _m.minWidth;
125
+ }), minHeight = _k.minHeight, maxHeight = _k.maxHeight, maxWidth = _k.maxWidth, minWidth = _k.minWidth;
130
126
  var canvasWidth = 50 * cols;
131
127
  var customSectionStyles = {
132
128
  minHeight: "".concat(minHeight, "px"),
@@ -168,18 +164,19 @@ var Composition = (0, react_1.forwardRef)(function CustomSection(props, ref) {
168
164
  // const responsiveFontMode =
169
165
  // !!props.jsonProperties?.CB_CONTENT_PROP_COMPOSITION
170
166
  // ?.CB_CONTENT_PROP_COMPOSITION_SPEC_VARIABLEROOTFONTSIZE;
167
+ var responsiveFontMode = true;
171
168
  if (device === 'MOBILE') {
172
- // if (responsiveFontMode) {
173
- // return size.width * 0.0421;
174
- // }
169
+ if (responsiveFontMode) {
170
+ return size.width * 0.0421;
171
+ }
175
172
  if (size.width < 327) {
176
173
  return Math.max(getDefensiveFontSize(device, size.width), 14);
177
174
  }
178
175
  return 16;
179
176
  }
180
- // if (responsiveFontMode) {
181
- // return size.width * 0.0133;
182
- // }
177
+ if (responsiveFontMode) {
178
+ return size.width * 0.0133;
179
+ }
183
180
  if (size.width < 1200) {
184
181
  return Math.max(getDefensiveFontSize(device, size.width), 14);
185
182
  }
@@ -201,7 +198,7 @@ var Composition = (0, react_1.forwardRef)(function CustomSection(props, ref) {
201
198
  maxWidth: customSectionStyles.maxWidth,
202
199
  // minWidth: isMobile ? GLE_MIN_WIDTH_MOBILE_PX : GLE_MIN_WIDTH_DESKTOP_PX,
203
200
  fontSize: "".concat(baseFontSize, "px")
204
- } }, { children: (_g = props.componentBlocks) === null || _g === void 0 ? void 0 : _g.map(function (cb, index) {
201
+ } }, { children: (_e = props.componentBlocks) === null || _e === void 0 ? void 0 : _e.map(function (cb, index) {
205
202
  var _a;
206
203
  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));
207
204
  }) })) })) })) })) }));
@@ -176,6 +176,7 @@ var FlexGridCustomSection = (0, react_1.forwardRef)(function CustomSection(props
176
176
  }
177
177
  return 16;
178
178
  }
179
+ // NOTE: Desktop
179
180
  if (responsiveFontMode) {
180
181
  return size.width * 0.0133;
181
182
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "2.5.332",
3
+ "version": "2.5.334",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",