pds-dev-kit-web 2.2.78 → 2.2.79

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.
@@ -26,7 +26,20 @@ var SectionMatcher_1 = require("./components/SectionMatcher");
26
26
  var dynamicLayoutContext_1 = require("./dynamicLayoutContext");
27
27
  function DynamicLayout(_a) {
28
28
  var device = _a.device, _b = _a.mode, mode = _b === void 0 ? 'NORMAL' : _b, isPreview = _a.isPreview, sections = _a.sections, scrollDownTargetSectionId = _a.scrollDownTargetSectionId, editingSectionId = _a.editingSectionId, navigationHandler = _a.navigationHandler, sectionActionHandler = _a.sectionActionHandler, onClickEditSection = _a.onClickEditSection, programmedSectionComponents = _a.programmedSectionComponents, shortcutKeyMode = _a.shortcutKeyMode, dynamicLayoutRef = _a.dynamicLayoutRef;
29
- var filteredSortedSection = __spreadArray([], sections, true).filter(function (section) { return section.display; })
29
+ var filteredSortedSection = __spreadArray([], sections, true).filter(function (section) {
30
+ var _a;
31
+ if (!section.display) {
32
+ return false;
33
+ }
34
+ if (section.type === 'CUSTOM' && mode !== 'EDIT') {
35
+ var deviceKey = device === 'DESKTOP'
36
+ ? 'CB_CONTENT_PROP_VISIBILITY_SPEC_DESKTOP'
37
+ : 'CB_CONTENT_PROP_VISIBILITY_SPEC_MOBILEWEB';
38
+ var isVisible = (_a = section.jsonProperties) === null || _a === void 0 ? void 0 : _a.data.CB_CONTENT_PROP_VISIBILITY[deviceKey];
39
+ return isVisible;
40
+ }
41
+ return true;
42
+ })
30
43
  .sort(function (a, b) { return a.order - b.order; });
31
44
  var iframeSection = filteredSortedSection.find(function (section) { return section.manifest.schema === 'EXP_IFRAME' && section.display; });
32
45
  return ((0, jsx_runtime_1.jsxs)(dynamicLayoutContext_1.dynamicLayoutContext.Provider, __assign({ value: {
@@ -60,6 +60,7 @@ var deepCopy_1 = __importDefault(require("../../../DynamicLayout/utils/deepCopy"
60
60
  var styled_components_1 = __importDefault(require("styled-components"));
61
61
  var components_1 = require("../../components");
62
62
  var ComponentBlockMatcher_1 = __importDefault(require("./components/ComponentBlock/ComponentBlockMatcher"));
63
+ var S_HiddenCover_1 = require("./components/ComponentBlock/componentBlocks/components/S_HiddenCover");
63
64
  var useGroupDrag_1 = require("./hooks/useGroupDrag");
64
65
  var useGroupDrag_2 = require("./hooks/useGroupDrag/useGroupDrag");
65
66
  var utils_1 = require("./hooks/useGroupDrag/utils");
@@ -403,63 +404,75 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
403
404
  }
404
405
  makeCollisionOfBulk();
405
406
  };
406
- return ((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsx)(S_gleStyles, { children: (0, jsx_runtime_1.jsx)(S_SectionWrapper, __assign({ ref: gleRef, "x-dlayout-section-type": "NO_NAME", onClick: onClickSection }, { children: (0, jsx_runtime_1.jsx)(components_1.CustomSection, __assign({}, props, { isMobile: isMobile, overrideStyles: {
407
- minHeight: customSectionStyles.minHeight,
408
- paddingTop: padding.top,
409
- paddingBottom: padding.bottom,
410
- paddingRight: padding.right,
411
- paddingLeft: padding.left
412
- } }, { children: (0, jsx_runtime_1.jsx)(Responsive, __assign({ innerRef: innerRef, allowOverlap: true, layouts: layouts, resizeHandles: ['nw', 'e', 'n', 'ne', 's', 'se', 'sw', 'w'], breakpoints: breakpoints, breakpoint: breakpoint, cols: { lg: 24, sm: 8 }, rowHeight: rowHeight, margin: [10, 10], style: {
413
- width: customSectionStyles.width,
414
- maxWidth: customSectionStyles.maxWidth,
415
- minWidth: isMobile ? GLE_MIN_WIDTH_MOBILE_PX : GLE_MIN_WIDTH_DESKTOP_PX,
416
- fontSize: "".concat(baseFontSize, "px")
417
- }, onLayoutChange: onLayoutChange, onDragStop: onDragStop, onResizeStop: onResizeStop, onWidthChange: onWidthChange, minNbRow: rows, isDraggable: isEditMode, isResizable: isEditMode }, { children: keepSimilarOrderToPreventRerender(layouts[layoutByDevice]).map(function (each, index) {
418
- var _a;
419
- if (each === null) {
420
- return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
421
- }
422
- var matchedCB = componentBlocks === null || componentBlocks === void 0 ? void 0 : componentBlocks.find(function (cb) { return cb.id.toString() === each.i; });
423
- if (each.i === 'group' && each.groupLayouts) {
424
- return ((0, jsx_runtime_1.jsx)("div", __assign({ className: "iamgroup", onClick: function (e) {
425
- e.stopPropagation();
426
- onClickBulk();
427
- }, onContextMenu: function (e) {
428
- e.stopPropagation();
429
- e.preventDefault();
430
- onContextMenuCB('group', e);
431
- } }, { children: (0, jsx_runtime_1.jsx)(WidthProvidedRGL, __assign({ cols: each.w, allowOverlap: true, layout: each.groupLayouts, rowHeight: rowHeight, containerPadding: [0, 0], margin: [10, 10], isDraggable: false, isResizable: false, style: {
432
- width: '100%'
433
- } }, { children: (_a = each.groupLayouts) === null || _a === void 0 ? void 0 : _a.map(function (layoutItem, index, array) {
434
- var matchedCB = componentBlocks === null || componentBlocks === void 0 ? void 0 : componentBlocks.find(function (cb) { return cb.id.toString() === layoutItem.i; });
435
- if (!matchedCB) {
436
- return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
437
- }
438
- var cbCopy = (0, deepCopy_1.default)(matchedCB);
439
- cbCopy.jsonProperties.data.CB_EFFECT_PROP_ENTANIM.CB_EFFECT_PROP_ENTANIM_SPEC_TYPE =
440
- 'NONE';
441
- cbCopy.jsonProperties.data.CB_EFFECT_PROP_ENTANIM['CB_EFFECT_PROP_ENTANIM_SPEC_TYPE:MOBILE'] = 'NONE';
442
- return ((0, jsx_runtime_1.jsx)("div", __assign({ className: "cb-box-in-group", onClick: function (e) {
443
- e.stopPropagation();
444
- clickOneCBInBulk(matchedCB.id, array);
445
- } }, { children: (0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsx)(ComponentBlockMatcher_1.default, { cbProps: cbCopy, device: device, index: index }) }) }), matchedCB.id));
446
- }) })) }), each.i));
447
- }
448
- if (!matchedCB) {
449
- return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
450
- }
451
- return ((0, jsx_runtime_1.jsx)("div", __assign({ className: selectedCB === matchedCB.id ? 'react-grid-item-selected' : '' }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ style: {
452
- width: '100%',
453
- height: '100%'
454
- }, onClick: function (e) {
455
- e.stopPropagation();
456
- onClickCB(matchedCB.id);
457
- }, onContextMenu: function (e) {
458
- e.stopPropagation();
459
- e.preventDefault();
460
- onContextMenuCB(matchedCB.id, e);
461
- } }, { children: (0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsx)(ComponentBlockMatcher_1.default, { cbProps: matchedCB, device: device, index: index }) }) })) }), each.i));
462
- }) })) })) })) }) }));
407
+ var showSectionHiddenCover = (function () {
408
+ if (mode === 'EDIT') {
409
+ var visibilityKey = device === 'DESKTOP'
410
+ ? 'CB_CONTENT_PROP_VISIBILITY_SPEC_DESKTOP'
411
+ : 'CB_CONTENT_PROP_VISIBILITY_SPEC_MOBILEWEB';
412
+ var isSectionVisible = jsonProperties === null || jsonProperties === void 0 ? void 0 : jsonProperties.data.CB_CONTENT_PROP_VISIBILITY[visibilityKey];
413
+ // 가시성 상태를 반전하여 숨겨진 커버를 표시할지 결정
414
+ var shouldShowHiddenCover = !isSectionVisible;
415
+ return shouldShowHiddenCover;
416
+ }
417
+ return false;
418
+ })();
419
+ return ((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsxs)(S_gleStyles, { children: [showSectionHiddenCover && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}), (0, jsx_runtime_1.jsx)(S_SectionWrapper, __assign({ ref: gleRef, "x-dlayout-section-type": "NO_NAME", onClick: onClickSection }, { children: (0, jsx_runtime_1.jsx)(components_1.CustomSection, __assign({}, props, { isMobile: isMobile, overrideStyles: {
420
+ minHeight: customSectionStyles.minHeight,
421
+ paddingTop: padding.top,
422
+ paddingBottom: padding.bottom,
423
+ paddingRight: padding.right,
424
+ paddingLeft: padding.left
425
+ } }, { children: (0, jsx_runtime_1.jsx)(Responsive, __assign({ innerRef: innerRef, allowOverlap: true, layouts: layouts, resizeHandles: ['nw', 'e', 'n', 'ne', 's', 'se', 'sw', 'w'], breakpoints: breakpoints, breakpoint: breakpoint, cols: { lg: 24, sm: 8 }, rowHeight: rowHeight, margin: [10, 10], style: {
426
+ width: customSectionStyles.width,
427
+ maxWidth: customSectionStyles.maxWidth,
428
+ minWidth: isMobile ? GLE_MIN_WIDTH_MOBILE_PX : GLE_MIN_WIDTH_DESKTOP_PX,
429
+ fontSize: "".concat(baseFontSize, "px")
430
+ }, onLayoutChange: onLayoutChange, onDragStop: onDragStop, onResizeStop: onResizeStop, onWidthChange: onWidthChange, minNbRow: rows, isDraggable: isEditMode, isResizable: isEditMode }, { children: keepSimilarOrderToPreventRerender(layouts[layoutByDevice]).map(function (each, index) {
431
+ var _a;
432
+ if (each === null) {
433
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
434
+ }
435
+ var matchedCB = componentBlocks === null || componentBlocks === void 0 ? void 0 : componentBlocks.find(function (cb) { return cb.id.toString() === each.i; });
436
+ if (each.i === 'group' && each.groupLayouts) {
437
+ return ((0, jsx_runtime_1.jsx)("div", __assign({ className: "iamgroup", onClick: function (e) {
438
+ e.stopPropagation();
439
+ onClickBulk();
440
+ }, onContextMenu: function (e) {
441
+ e.stopPropagation();
442
+ e.preventDefault();
443
+ onContextMenuCB('group', e);
444
+ } }, { children: (0, jsx_runtime_1.jsx)(WidthProvidedRGL, __assign({ cols: each.w, allowOverlap: true, layout: each.groupLayouts, rowHeight: rowHeight, containerPadding: [0, 0], margin: [10, 10], isDraggable: false, isResizable: false, style: {
445
+ width: '100%'
446
+ } }, { children: (_a = each.groupLayouts) === null || _a === void 0 ? void 0 : _a.map(function (layoutItem, index, array) {
447
+ var matchedCB = componentBlocks === null || componentBlocks === void 0 ? void 0 : componentBlocks.find(function (cb) { return cb.id.toString() === layoutItem.i; });
448
+ if (!matchedCB) {
449
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
450
+ }
451
+ var cbCopy = (0, deepCopy_1.default)(matchedCB);
452
+ cbCopy.jsonProperties.data.CB_EFFECT_PROP_ENTANIM.CB_EFFECT_PROP_ENTANIM_SPEC_TYPE =
453
+ 'NONE';
454
+ cbCopy.jsonProperties.data.CB_EFFECT_PROP_ENTANIM['CB_EFFECT_PROP_ENTANIM_SPEC_TYPE:MOBILE'] = 'NONE';
455
+ return ((0, jsx_runtime_1.jsx)("div", __assign({ className: "cb-box-in-group", onClick: function (e) {
456
+ e.stopPropagation();
457
+ clickOneCBInBulk(matchedCB.id, array);
458
+ } }, { children: (0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsx)(ComponentBlockMatcher_1.default, { cbProps: cbCopy, device: device, index: index }) }) }), matchedCB.id));
459
+ }) })) }), each.i));
460
+ }
461
+ if (!matchedCB) {
462
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
463
+ }
464
+ return ((0, jsx_runtime_1.jsx)("div", __assign({ className: selectedCB === matchedCB.id ? 'react-grid-item-selected' : '' }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ style: {
465
+ width: '100%',
466
+ height: '100%'
467
+ }, onClick: function (e) {
468
+ e.stopPropagation();
469
+ onClickCB(matchedCB.id);
470
+ }, onContextMenu: function (e) {
471
+ e.stopPropagation();
472
+ e.preventDefault();
473
+ onContextMenuCB(matchedCB.id, e);
474
+ } }, { children: (0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsx)(ComponentBlockMatcher_1.default, { cbProps: matchedCB, device: device, index: index }) }) })) }), each.i));
475
+ }) })) })) }))] }) }));
463
476
  });
464
477
  function keepSimilarOrderToPreventRerender(arr) {
465
478
  var _a;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web",
3
- "version": "2.2.78",
3
+ "version": "2.2.79",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
package/release-note.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # PDS-DEV-KIT-WEB Release Notes
2
- ## [v2.2.78]
2
+ ## [v2.2.79]
3
3
  ## daily|https://design.storybook.publ.biz/
4
4
 
5
5
  ### 업데이트 사항
6
- * [PDS-1233] UserDestopTabBar의 styleTheme : content 추가
6
+ * [PDS-1232] 섹션 단위로 디바이스별 노출 설정 제공