pds-dev-kit-web-test 2.7.229 → 2.7.231

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.
Files changed (65) hide show
  1. package/dist/src/sub/DynamicLayout/CompositionEditor/CompositionEditor.js +6 -5
  2. package/dist/src/sub/DynamicLayout/CompositionRenderer/Composition.js +17 -14
  3. package/dist/src/sub/DynamicLayout/CompositionRenderer/FlexGridItemForCCB.d.ts +5 -2
  4. package/dist/src/sub/DynamicLayout/CompositionRenderer/FlexGridItemForCCB.js +10 -11
  5. package/dist/src/sub/DynamicLayout/GridAutoRowEditor/GridAutoRowEditorForComposition.d.ts +9 -0
  6. package/dist/src/sub/DynamicLayout/GridAutoRowEditor/GridAutoRowEditorForComposition.js +250 -0
  7. package/dist/src/sub/DynamicLayout/GridAutoRowEditor/{GridAutoRowEditor.js → GridAutoRowEditorForDL.js} +2 -6
  8. package/dist/src/sub/DynamicLayout/components/pdsOriginal/desktop/IconButton/IconButton.d.ts +2 -2
  9. package/dist/src/sub/DynamicLayout/components/pdsOriginal/desktop/IconButton/IconButton.js +11 -8
  10. package/dist/src/sub/DynamicLayout/components/pdsOriginal/hybrid/Icon/Icon.d.ts +1 -1
  11. package/dist/src/sub/DynamicLayout/mock.json +5 -3
  12. package/dist/src/sub/DynamicLayout/mock_componentBlocks.d.ts +16 -134
  13. package/dist/src/sub/DynamicLayout/mock_componentBlocks.js +91 -3
  14. package/dist/src/sub/DynamicLayout/mock_contentsCarousel.js +6389 -6376
  15. package/dist/src/sub/DynamicLayout/mock_contentsList.js +5 -3
  16. package/dist/src/sub/DynamicLayout/mock_slideBanner.js +6 -6
  17. package/dist/src/sub/DynamicLayout/mocks.js +15 -8
  18. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.js +32 -8
  19. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.d.ts +3 -1
  20. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.js +71 -38
  21. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarouselCore.js +2 -1
  22. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationNextBtn.d.ts +2 -1
  23. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationNextBtn.js +6 -6
  24. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationPrevBtn.d.ts +2 -1
  25. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationPrevBtn.js +6 -6
  26. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomProgressbar.d.ts +2 -1
  27. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomProgressbar.js +15 -12
  28. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/elementPositions.d.ts +5 -0
  29. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/elementPositions.js +243 -0
  30. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useFlexGridLayout.d.ts +1 -1
  31. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useFlexGridLayout.js +26 -43
  32. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useSwiper.d.ts +1 -1
  33. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useSwiper.js +1 -1
  34. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.d.ts +3 -1
  35. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.js +45 -18
  36. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/CustomPagination.d.ts +2 -1
  37. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/CustomPagination.js +3 -3
  38. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/contentsListUtils.d.ts +2 -1
  39. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/contentsListUtils.js +18 -7
  40. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/elementPositions.d.ts +4 -0
  41. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/elementPositions.js +108 -0
  42. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/useFlexGridLayout.d.ts +1 -1
  43. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/useFlexGridLayout.js +26 -44
  44. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/types.d.ts +1 -1
  45. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.d.ts +3 -1
  46. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.js +66 -41
  47. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationNextBtn.d.ts +2 -1
  48. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationNextBtn.js +7 -7
  49. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationPrevBtn.d.ts +2 -1
  50. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationPrevBtn.js +7 -7
  51. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomPagination.d.ts +2 -1
  52. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomPagination.js +5 -5
  53. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomProgressbar.d.ts +2 -1
  54. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomProgressbar.js +13 -11
  55. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/elementPositions.d.ts +5 -0
  56. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/elementPositions.js +243 -0
  57. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useFlexGridLayout.d.ts +1 -1
  58. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useFlexGridLayout.js +26 -43
  59. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useSwiper.d.ts +1 -1
  60. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useSwiper.js +1 -1
  61. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.js +21 -8
  62. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/types.d.ts +8 -3
  63. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/types.d.ts +3 -1
  64. package/package.json +3 -2
  65. /package/dist/src/sub/DynamicLayout/GridAutoRowEditor/{GridAutoRowEditor.d.ts → GridAutoRowEditorForDL.d.ts} +0 -0
@@ -406,9 +406,9 @@ var CompositionEditor = (0, react_1.forwardRef)(function CompositionEditorCanvas
406
406
  var customSectionStyles = {
407
407
  minHeight: "".concat(minHeight, "px"),
408
408
  maxHeight: "".concat(maxHeight, "px"),
409
- width: "".concat(canvasWidth, "px"),
409
+ // width: `${canvasWidth}px`,
410
410
  maxWidth: maxWidth ? "".concat(maxWidth, "px") : '100%',
411
- minWidth: "".concat(Math.max(canvasWidth, minWidth !== null && minWidth !== void 0 ? minWidth : 0), "px")
411
+ minWidth: "".concat(minWidth, "px")
412
412
  };
413
413
  var breakpoint = device === 'MOBILE' ? 'sm' : 'lg';
414
414
  var onClickCB = function (id) {
@@ -1055,7 +1055,8 @@ var CompositionEditor = (0, react_1.forwardRef)(function CompositionEditorCanvas
1055
1055
  }
1056
1056
  var editableCBIDs = (0, group_1.findDirectChildrenCbIds)(newblock, editingGroupBlock);
1057
1057
  return ((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsx)(dynamicLayoutContext_1.dynamicLayoutContext.Provider, __assign({ value: {
1058
- device: device
1058
+ device: device,
1059
+ mode: mode
1059
1060
  // mode,
1060
1061
  // isPreview,
1061
1062
  // navigationHandler,
@@ -1078,7 +1079,7 @@ var CompositionEditor = (0, react_1.forwardRef)(function CompositionEditorCanvas
1078
1079
  } }, { children: (0, jsx_runtime_1.jsx)(Responsive, __assign({ sectionId: props.compositionData.id.toString(), innerRef: innerRef, className: (0, clsx_1.clsx)({
1079
1080
  'selected-grid-layout': editingSectionId === props.compositionData.id
1080
1081
  }), allowOverlap: true, layouts: layouts, resizeHandles: ['nw', 'e', 'n', 'ne', 's', 'se', 'sw', 'w'], breakpoints: breakpoints, breakpoint: breakpoint, cols: { lg: colsDesktop, sm: colsMobile }, rowHeight: rowHeight, margin: [10, 10], style: {
1081
- width: customSectionStyles.width,
1082
+ minWidth: customSectionStyles.minWidth,
1082
1083
  maxWidth: customSectionStyles.maxWidth,
1083
1084
  // minWidth: isMobile ? GLE_MIN_WIDTH_MOBILE_PX : GLE_MIN_WIDTH_DESKTOP_PX,
1084
1085
  // fontSize: `${baseFontSize}px`
@@ -1115,7 +1116,7 @@ var CompositionEditor = (0, react_1.forwardRef)(function CompositionEditorCanvas
1115
1116
  e.stopPropagation();
1116
1117
  e.preventDefault();
1117
1118
  onContextMenuCB(matchedCB.id, e);
1118
- } }, { children: (0, jsx_runtime_1.jsx)(ComponentBlockMatcher_1.default, { cbProps: matchedCB, device: device, rowHeight: rowHeight, index: index }) })) }), each.i));
1119
+ } }, { children: (0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsx)(ComponentBlockMatcher_1.default, { cbProps: matchedCB, device: device, rowHeight: rowHeight, index: index }) }) })) }), each.i));
1119
1120
  }) })) })) })) }) })) })) })) }));
1120
1121
  });
1121
1122
  function isLayoutPlacementSame(current, prev) {
@@ -50,30 +50,33 @@ var styled_components_1 = __importDefault(require("styled-components"));
50
50
  require("../components");
51
51
  var gleStyles_1 = require("../gleStyles");
52
52
  var useResizableObserver_1 = require("../sections/CustomSection/hooks/useResizableObserver");
53
- require("../sections/CustomSection/util");
53
+ var util_1 = require("../sections/CustomSection/util");
54
54
  var parseSectionPadding_1 = __importDefault(require("../sections/CustomSection/util/layoutPropParsers/parseSectionPadding"));
55
55
  var parseCompositionPlacement_1 = __importDefault(require("../sections/CustomSection/util/parseCompositionPlacement"));
56
56
  require("../sections/CustomSection/util/stylePropParsers/parseStylePropBorder");
57
57
  require("../sections/CustomSection/util/stylePropParsers/parseStylePropShadow");
58
58
  require("../sections/CustomSection/util/stylePropParsers/types");
59
+ var groupUtils_1 = __importDefault(require("../utils/groupUtils"));
59
60
  var CompositionBackground_1 = __importDefault(require("./CompositionBackground"));
60
- var FlexGridItemForCCB_1 = __importDefault(require("./FlexGridItemForCCB"));
61
+ require("./FlexGridItemForCCB");
61
62
  var Composition = (0, react_1.forwardRef)(function CustomSection(props, ref) {
62
- var _a, _b, _c, _d, _e;
63
- 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
+ var _a, _b, _c, _d;
64
+ var _e = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _e.device, editingSectionId = _e.editingSectionId, mode = _e.mode, shortcutKeyMode = _e.shortcutKeyMode, sectionActionHandler = _e.sectionActionHandler, queryData = _e.queryData;
64
65
  var componentBlocks = props.componentBlocks, jsonProperties = props.jsonProperties;
66
+ var pedigree = jsonProperties === null || jsonProperties === void 0 ? void 0 : jsonProperties.pedigree;
67
+ var _f = jsonProperties, _g = _f.data, CB_PLACEMENT_PROP_COMPOSITION = _g.CB_PLACEMENT_PROP_COMPOSITION, CB_LAYOUT_PROP_PADDING = _g.CB_LAYOUT_PROP_PADDING, CB_STYLE_PROP_SHADOW = _g.CB_STYLE_PROP_SHADOW, CB_STYLE_PROP_BORDER = _g.CB_STYLE_PROP_BORDER, zOrders = _f.zOrders;
68
+ var layouts = (0, util_1.parsePlacement)(componentBlocks !== null && componentBlocks !== void 0 ? componentBlocks : [], zOrders);
65
69
  var isMobile = device === 'MOBILE';
66
70
  var isEditMode = mode === 'EDIT';
67
- var _g = jsonProperties, _h = _g.data, CB_PLACEMENT_PROP_COMPOSITION = _h.CB_PLACEMENT_PROP_COMPOSITION, CB_LAYOUT_PROP_PADDING = _h.CB_LAYOUT_PROP_PADDING, CB_STYLE_PROP_SHADOW = _h.CB_STYLE_PROP_SHADOW, CB_STYLE_PROP_BORDER = _h.CB_STYLE_PROP_BORDER, zOrders = _g.zOrders;
68
71
  var colsDesktop = (_a = CB_PLACEMENT_PROP_COMPOSITION.CB_PLACEMENT_PROP_COMPOSITION_SPEC_COLUMNS) !== null && _a !== void 0 ? _a : 24;
69
72
  var colsMobile = (_b = CB_PLACEMENT_PROP_COMPOSITION['CB_PLACEMENT_PROP_COMPOSITION_SPEC_COLUMNS:MOBILE']) !== null && _b !== void 0 ? _b : 8;
70
73
  var rowsDesktop = (_c = CB_PLACEMENT_PROP_COMPOSITION.CB_PLACEMENT_PROP_COMPOSITION_SPEC_ROWS) !== null && _c !== void 0 ? _c : 26;
71
- var rowsMobile = (_d = CB_PLACEMENT_PROP_COMPOSITION['CB_PLACEMENT_PROP_COMPOSITION_SPEC_ROWS:MOBILE']) !== null && _d !== void 0 ? _d : 26;
74
+ var rowsMobile = (_d = CB_PLACEMENT_PROP_COMPOSITION['CB_PLACEMENT_PROP_COMPOSITION_SPEC_ROWS:MOBILE']) !== null && _d !== void 0 ? _d : rowsDesktop;
72
75
  var rows = isMobile ? rowsMobile : rowsDesktop;
73
76
  var cols = isMobile ? colsMobile : colsDesktop;
74
77
  var containerRef = (0, react_1.useRef)(null);
75
78
  var size = (0, useResizableObserver_1.useResizeObserver)({ ref: containerRef, box: 'border-box' });
76
- var _j = (0, react_1.useState)(null), selectedCB = _j[0], setSelectedCB = _j[1];
79
+ var _h = (0, react_1.useState)(null), selectedCB = _h[0], setSelectedCB = _h[1];
77
80
  var gleRef = (0, react_1.useRef)(null);
78
81
  (0, react_1.useEffect)(function () {
79
82
  if (editingSectionId !== props.id) {
@@ -122,10 +125,10 @@ var Composition = (0, react_1.forwardRef)(function CustomSection(props, ref) {
122
125
  setSelectedCB('BULK');
123
126
  }
124
127
  }, [selectedCB, shortcutKeyMode, sectionActionHandler, setSelectedCB]);
125
- var _k = (0, parseCompositionPlacement_1.default)({
128
+ var _j = (0, parseCompositionPlacement_1.default)({
126
129
  isMobile: isMobile,
127
130
  compositionProps: CB_PLACEMENT_PROP_COMPOSITION
128
- }), minHeight = _k.minHeight, maxHeight = _k.maxHeight, maxWidth = _k.maxWidth, minWidth = _k.minWidth;
131
+ }), minHeight = _j.minHeight, maxHeight = _j.maxHeight, maxWidth = _j.maxWidth, minWidth = _j.minWidth;
129
132
  var canvasWidth = 50 * cols;
130
133
  var customSectionStyles = {
131
134
  minHeight: "".concat(minHeight, "px"),
@@ -223,10 +226,10 @@ var Composition = (0, react_1.forwardRef)(function CustomSection(props, ref) {
223
226
  maxWidth: customSectionStyles.maxWidth
224
227
  // minWidth: isMobile ? GLE_MIN_WIDTH_MOBILE_PX : GLE_MIN_WIDTH_DESKTOP_PX,
225
228
  // fontSize: `${baseFontSize}px`
226
- } }, { children: (_e = props.componentBlocks) === null || _e === void 0 ? void 0 : _e.map(function (cb, index) {
227
- var _a;
228
- return ((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsx)(FlexGridItemForCCB_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));
229
- }) })) })) })) })) })) }));
229
+ } }, { children: pedigree.children.map(function (child) { return ((0, jsx_runtime_1.jsx)(groupUtils_1.default, { block: child, rowHeight: rowHeight, layoutItems: layouts[device === 'DESKTOP' ? 'lg' : 'sm'], cbs: props.componentBlocks, device: device, selectedRows: [],
230
+ // pinnedGBs={pinnedGBs}
231
+ // onToggleGBPinned={onToggleGBPinned}
232
+ isEditMode: false }, child.blockId)); }) })) })) })) })) })) }));
230
233
  });
231
234
  var MOCK_BORDER = {
232
235
  CB_STYLE_PROP_BORDER_SPEC_COLOR: '#000000FF',
@@ -285,7 +288,7 @@ var MOCK_SHADOW = {
285
288
  'CB_STYLE_PROP_SHADOW_SPEC_Y:MOBILE': null,
286
289
  'CB_STYLE_PROP_SHADOW_SPEC_Y:MOBILE:HOVER': null
287
290
  };
288
- var GridContainer = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: grid; /* Space between grid items */\n gap: 10px;\n /* grid-auto-rows: minmax(", ", auto); */\n grid-template-columns: repeat(", ", 1fr);\n grid-template-rows: repeat(\n ", ",\n minmax(", ", auto)\n );\n height: 100%;\n padding: 10px 10px;\n width: 100%;\n\n * {\n box-sizing: border-box;\n }\n"], ["\n display: grid; /* Space between grid items */\n gap: 10px;\n /* grid-auto-rows: minmax(", ", auto); */\n grid-template-columns: repeat(", ", 1fr);\n grid-template-rows: repeat(\n ", ",\n minmax(", ", auto)\n );\n height: 100%;\n padding: 10px 10px;\n width: 100%;\n\n * {\n box-sizing: border-box;\n }\n"])), function (props) { return "".concat(props.rowHeight, "px"); }, function (props) { return props.cols; }, function (props) { return props.sectionRow; }, function (props) { return "".concat(props.rowHeight, "px"); });
291
+ var GridContainer = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: grid; /* Space between grid items */\n gap: 10px;\n grid-template-columns: repeat(", ", 1fr);\n grid-template-rows: repeat(\n ", ",\n minmax(", ", auto)\n );\n height: 100%;\n padding: 10px 10px;\n width: 100%;\n\n * {\n box-sizing: border-box;\n }\n"], ["\n display: grid; /* Space between grid items */\n gap: 10px;\n grid-template-columns: repeat(", ", 1fr);\n grid-template-rows: repeat(\n ", ",\n minmax(", ", auto)\n );\n height: 100%;\n padding: 10px 10px;\n width: 100%;\n\n * {\n box-sizing: border-box;\n }\n"])), function (props) { return props.cols; }, function (props) { return props.sectionRow; }, function (props) { return "".concat(props.rowHeight, "px"); });
289
292
  var S_COMPOSITIONWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: relative;\n"], ["\n position: relative;\n"])));
290
293
  exports.default = react_1.default.memo(Composition);
291
294
  function getDefensiveFontSize(device, width) {
@@ -1,14 +1,17 @@
1
1
  /// <reference types="react" />
2
2
  import type { ComponentBlock } from '../sections/CustomSection/types';
3
3
  import type { Device } from '../sections/CustomSection/util/types';
4
+ import type { Block } from 'publ-echo-test/dist/lib/GridLayoutEditor/group';
4
5
  type Props = {
5
6
  cb: ComponentBlock;
6
7
  index: number;
7
8
  device: Device;
8
9
  rowHeight: number;
9
10
  zIndex: number;
10
- showPinned?: boolean;
11
+ maxCols: number;
12
+ block: Block;
13
+ isParentGroupPinned: boolean;
11
14
  style?: React.CSSProperties;
12
15
  };
13
- declare function FlexGridItem({ cb, index, device, rowHeight, zIndex, showPinned, style }: Props): JSX.Element;
16
+ declare function FlexGridItem({ cb, index, device, rowHeight, zIndex, style, maxCols, block, isParentGroupPinned }: Props): JSX.Element;
14
17
  export default FlexGridItem;
@@ -19,20 +19,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
19
19
  };
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
21
  var jsx_runtime_1 = require("react/jsx-runtime");
22
- var react_1 = require("react");
23
22
  var styled_components_1 = __importDefault(require("styled-components"));
24
23
  var ComponentBlockMatcher_1 = __importDefault(require("./ComponentBlockMatcher"));
25
24
  var gap = 10;
26
25
  function FlexGridItem(_a) {
27
- var cb = _a.cb, index = _a.index, device = _a.device, rowHeight = _a.rowHeight, zIndex = _a.zIndex, showPinned = _a.showPinned, style = _a.style;
26
+ var cb = _a.cb, index = _a.index, device = _a.device, rowHeight = _a.rowHeight, zIndex = _a.zIndex, style = _a.style, maxCols = _a.maxCols, block = _a.block, isParentGroupPinned = _a.isParentGroupPinned;
28
27
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
29
28
  var defaultHeight = getMaxHeight(cb.jsonProperties.data.CB_PLACEMENT_PROP_PLACEMENT, device, rowHeight);
30
- var gridArea = getGridAreaFromCB(cb.jsonProperties.data.CB_PLACEMENT_PROP_PLACEMENT, device);
31
- var _b = (0, react_1.useState)(false), isPinned = _b[0], setIsPinned = _b[1];
32
- return ((0, jsx_runtime_1.jsxs)(GridItem, __assign({ style: __assign({ zIndex: zIndex, gridArea: gridArea, position: 'relative', maxHeight: isPinned ? defaultHeight : 'none' }, style) }, { children: [showPinned && ((0, jsx_runtime_1.jsx)(S_Pinned, { children: isPinned ? ((0, jsx_runtime_1.jsx)("button", __assign({ type: "button", onClick: function () { return setIsPinned(false); } }, { children: "H\uACE0\uC815\uB428 \uD83D\uDCCC" }))) : ((0, jsx_runtime_1.jsx)("button", __assign({ type: "button", onClick: function () { return setIsPinned(true); } }, { children: "H\uB298\uC5B4\uB0A8 \uD83E\uDEB1" }))) })), (0, jsx_runtime_1.jsx)(ComponentBlockMatcher_1.default, { rowHeight: rowHeight, cbProps: cb, device: device, index: index })] })));
29
+ var gridArea = getGridAreaFromCB(cb.jsonProperties.data.CB_PLACEMENT_PROP_PLACEMENT, device, maxCols);
30
+ var isCBPinned = device === 'DESKTOP' ? block.isPinnedDesktop : block.isPinnedMobile;
31
+ var isPinned = isParentGroupPinned || isCBPinned;
32
+ return ((0, jsx_runtime_1.jsx)(GridItem, __assign({ style: __assign({ zIndex: zIndex, gridArea: gridArea, position: 'relative', maxHeight: isPinned ? defaultHeight : 'none' }, style) }, { children: (0, jsx_runtime_1.jsx)(ComponentBlockMatcher_1.default, { rowHeight: rowHeight, cbProps: cb, device: device, index: index }) })));
33
33
  }
34
- 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"])));
35
- var GridItem = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: auto;\n word-break: break-word;\n"], ["\n height: auto;\n word-break: break-word;\n"])));
34
+ var GridItem = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: auto;\n word-break: break-word;\n"], ["\n height: auto;\n word-break: break-word;\n"])));
36
35
  function getMaxHeight(props, device, rowHeight) {
37
36
  if (device === 'DESKTOP') {
38
37
  var CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS = props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS;
@@ -44,7 +43,7 @@ function getMaxHeight(props, device, rowHeight) {
44
43
  var height = rowsMobile * rowHeight + (rowsMobile - 1) * gap;
45
44
  return height;
46
45
  }
47
- function getGridAreaFromCB(props, device) {
46
+ function getGridAreaFromCB(props, device, maxCols) {
48
47
  var CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX = props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX, CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY = props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY, cols = props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS, rows = props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS;
49
48
  if (device === 'DESKTOP') {
50
49
  var colStart_1 = CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX + 1;
@@ -52,7 +51,7 @@ function getGridAreaFromCB(props, device) {
52
51
  var rowEnd_1 = rows + rowStart_1;
53
52
  var colEnd_1 = cols + colStart_1;
54
53
  // <grid-row-start> / <grid-column-start> / <grid-row-end> / <grid-column-end>;
55
- return "".concat(rowStart_1, " / ").concat(colStart_1, " / ").concat(rowEnd_1, " / ").concat(colEnd_1);
54
+ return "".concat(rowStart_1, " / ").concat(colStart_1, " / ").concat(rowEnd_1, " / ").concat(Math.min(colEnd_1, maxCols));
56
55
  }
57
56
  var startXMobile = props['CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX:MOBILE'];
58
57
  var startYMobile = props['CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY:MOBILE'];
@@ -62,7 +61,7 @@ function getGridAreaFromCB(props, device) {
62
61
  var rowStart = startYMobile + 1;
63
62
  var rowEnd = rowsMobile + rowStart;
64
63
  var colEnd = colsMobile + colStart;
65
- return "".concat(rowStart, " / ").concat(colStart, " / ").concat(rowEnd, " / ").concat(colEnd);
64
+ return "".concat(rowStart, " / ").concat(colStart, " / ").concat(rowEnd, " / ").concat(Math.min(colEnd, maxCols));
66
65
  }
67
66
  exports.default = FlexGridItem;
68
- var templateObject_1, templateObject_2;
67
+ var templateObject_1;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { IComposition } from '../types';
3
+ import type { Layout } from 'publ-echo-test/dist/lib/GridLayoutEditor/types';
4
+ export type LayoutsType = {
5
+ sm: Layout;
6
+ lg: Layout;
7
+ };
8
+ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<IComposition & React.RefAttributes<unknown>>>;
9
+ export default _default;
@@ -0,0 +1,250 @@
1
+ "use strict";
2
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
+ return cooked;
5
+ };
6
+ var __assign = (this && this.__assign) || function () {
7
+ __assign = Object.assign || function(t) {
8
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
9
+ s = arguments[i];
10
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
+ t[p] = s[p];
12
+ }
13
+ return t;
14
+ };
15
+ return __assign.apply(this, arguments);
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
+ };
40
+ var __importDefault = (this && this.__importDefault) || function (mod) {
41
+ return (mod && mod.__esModule) ? mod : { "default": mod };
42
+ };
43
+ Object.defineProperty(exports, "__esModule", { value: true });
44
+ var jsx_runtime_1 = require("react/jsx-runtime");
45
+ /* eslint-disable @typescript-eslint/no-unused-vars */
46
+ require("publ-echo-test/dist/lib/GridLayoutEditor/utils/renderHelpers");
47
+ require("publ-echo/dist/lib/GridItem/OutsideClickHandler");
48
+ var react_1 = __importStar(require("react"));
49
+ var ErrorBoundary_1 = require("../../DynamicLayout/components/Section/ErrorBoundary");
50
+ var dynamicLayoutContext_1 = require("../../DynamicLayout/dynamicLayoutContext");
51
+ var styled_components_1 = __importDefault(require("styled-components"));
52
+ require("../components");
53
+ var CompositionBackground_1 = __importDefault(require("../CompositionRenderer/CompositionBackground"));
54
+ require("../CompositionRenderer/FlexGridItem");
55
+ var gleStyles_1 = require("../gleStyles");
56
+ var useResizableObserver_1 = require("../sections/CustomSection/hooks/useResizableObserver");
57
+ var util_1 = require("../sections/CustomSection/util");
58
+ var parseSectionPadding_1 = __importDefault(require("../sections/CustomSection/util/layoutPropParsers/parseSectionPadding"));
59
+ var parseCompositionPlacement_1 = __importDefault(require("../sections/CustomSection/util/parseCompositionPlacement"));
60
+ var groupUtils_1 = __importDefault(require("../utils/groupUtils"));
61
+ // const GRID_CELL_MIN = 24;
62
+ // const DESKTOP_GRID_COLS = 24;
63
+ // const MOBILE_GRID_COLS = 8;
64
+ // const GLE_MIN_WIDTH_DESKTOP_PX = `${GRID_CELL_MIN * DESKTOP_GRID_COLS}px`;
65
+ // const GLE_MIN_WIDTH_MOBILE_PX = `${GRID_CELL_MIN * MOBILE_GRID_COLS}px`;
66
+ // type Props = ISection & ContextProps;
67
+ // type ContextProps = {
68
+ // device: Device;
69
+ // queryData: QueryData;
70
+ // };
71
+ var GridAutoRowEditor = (0, react_1.forwardRef)(function CustomSection(props, ref) {
72
+ var _a, _b, _c, _d;
73
+ var _e = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _e.device, editingSectionId = _e.editingSectionId, mode = _e.mode, shortcutKeyMode = _e.shortcutKeyMode, sectionActionHandler = _e.sectionActionHandler, queryData = _e.queryData;
74
+ var componentBlocks = props.componentBlocks, jsonProperties = props.jsonProperties;
75
+ var _f = jsonProperties, _g = _f.data, CB_PLACEMENT_PROP_COMPOSITION = _g.CB_PLACEMENT_PROP_COMPOSITION, CB_LAYOUT_PROP_PADDING = _g.CB_LAYOUT_PROP_PADDING, zOrders = _f.zOrders;
76
+ var isMobile = device === 'MOBILE';
77
+ var colsDesktop = (_a = CB_PLACEMENT_PROP_COMPOSITION.CB_PLACEMENT_PROP_COMPOSITION_SPEC_COLUMNS) !== null && _a !== void 0 ? _a : 24;
78
+ var colsMobile = (_b = CB_PLACEMENT_PROP_COMPOSITION['CB_PLACEMENT_PROP_COMPOSITION_SPEC_COLUMNS:MOBILE']) !== null && _b !== void 0 ? _b : 8;
79
+ var rowsDesktop = (_c = CB_PLACEMENT_PROP_COMPOSITION.CB_PLACEMENT_PROP_COMPOSITION_SPEC_ROWS) !== null && _c !== void 0 ? _c : 26;
80
+ var rowsMobile = (_d = CB_PLACEMENT_PROP_COMPOSITION['CB_PLACEMENT_PROP_COMPOSITION_SPEC_ROWS:MOBILE']) !== null && _d !== void 0 ? _d : rowsDesktop;
81
+ var rows = isMobile ? rowsMobile : rowsDesktop;
82
+ var cols = isMobile ? colsMobile : colsDesktop;
83
+ var layouts = (0, util_1.parsePlacement)(componentBlocks !== null && componentBlocks !== void 0 ? componentBlocks : [], zOrders);
84
+ var containerRef = (0, react_1.useRef)(null);
85
+ var size = (0, useResizableObserver_1.useResizeObserver)({ ref: containerRef, box: 'border-box' });
86
+ var _h = (0, react_1.useState)(null), selectedCB = _h[0], setSelectedCB = _h[1];
87
+ var gleRef = (0, react_1.useRef)(null);
88
+ var _j = (0, react_1.useState)([]), selectedRows = _j[0], setSelectedRows = _j[1]; // 빈 배열로 초기화
89
+ var isEditMode = mode === 'EDIT';
90
+ // const layoutByDevice = device === 'DESKTOP' ? 'lg' : 'sm';
91
+ // const [layouts] = useState<LayoutsType>(() => {
92
+ // const { lg, sm } = parsePlacement(componentBlocks ?? []);
93
+ // return {
94
+ // lg,
95
+ // sm
96
+ // };
97
+ // });
98
+ // useEffect(() => {
99
+ // if (editingSectionId !== props.id) {
100
+ // setSelectedCB(null);
101
+ // // breakGroupCB();
102
+ // }
103
+ // }, [editingSectionId]);
104
+ var _k = (0, parseCompositionPlacement_1.default)({
105
+ isMobile: isMobile,
106
+ compositionProps: CB_PLACEMENT_PROP_COMPOSITION
107
+ }), minHeight = _k.minHeight, maxHeight = _k.maxHeight, maxWidth = _k.maxWidth, minWidth = _k.minWidth;
108
+ var canvasWidth = 50 * cols;
109
+ var customSectionStyles = {
110
+ minHeight: "".concat(minHeight, "px"),
111
+ maxHeight: "".concat(maxHeight, "px"),
112
+ width: "100%",
113
+ maxWidth: maxWidth ? "".concat(maxWidth, "px") : '100%',
114
+ // minWidth: `${Math.max(canvasWidth, minWidth ?? 0)}px`
115
+ minWidth: "".concat(minWidth, "px")
116
+ };
117
+ var onClickSection = function () {
118
+ if (!isEditMode) {
119
+ return;
120
+ }
121
+ setSelectedCB(null);
122
+ sectionActionHandler &&
123
+ sectionActionHandler({
124
+ type: '@CUSTOMSECTION/SECTION_CLICKED',
125
+ payload: {
126
+ sectionId: props.id
127
+ }
128
+ });
129
+ };
130
+ var padding = (0, parseSectionPadding_1.default)(CB_LAYOUT_PROP_PADDING, device);
131
+ // const sectionRow =
132
+ // CB_PLACEMENT_PROP_COMPOSITION[
133
+ // device === 'DESKTOP'
134
+ // ? 'CB_PLACEMENT_PROP_COMPOSITION_SPEC_ROWS'
135
+ // : 'CB_PLACEMENT_PROP_COMPOSITION_SPEC_ROWS:MOBILE'
136
+ // ];
137
+ var rowHeight = (function () {
138
+ if (!size.width) {
139
+ return 50;
140
+ }
141
+ if (device === 'MOBILE') {
142
+ var cellWidth_1 = size.width / cols;
143
+ return cellWidth_1 * 0.56;
144
+ }
145
+ var cellWidth = size.width / cols;
146
+ return cellWidth * 0.56;
147
+ })();
148
+ var baseFontSize = (function () {
149
+ if (!size.width) {
150
+ return 16;
151
+ }
152
+ // NOTE: 확인 필요
153
+ var responsiveFontMode = true;
154
+ if (device === 'MOBILE') {
155
+ if (responsiveFontMode) {
156
+ return size.width * 0.0421;
157
+ }
158
+ if (size.width < 327) {
159
+ return Math.max(getDefensiveFontSize(device, size.width), 14);
160
+ }
161
+ return 16;
162
+ }
163
+ // NOTE: Desktop
164
+ if (responsiveFontMode) {
165
+ return size.width * 0.0133;
166
+ }
167
+ if (size.width < 1200) {
168
+ return Math.max(getDefensiveFontSize(device, size.width), 16);
169
+ }
170
+ return 16;
171
+ })();
172
+ var pedigree = jsonProperties === null || jsonProperties === void 0 ? void 0 : jsonProperties.pedigree;
173
+ // const [editingGroupBlock, setEditingGroupBlock] = useState<string>('ROOT');
174
+ // const editableCBIds = findDirectChildrenCbIds(pedigree, 'ROOT');
175
+ // const groupblocks = findGroupBlocks(pedigree, editingGroupBlock) ?? [];
176
+ // const handleGroupBlockDoubleClick = (blockId: string) => {
177
+ // setEditingGroupBlock(blockId);
178
+ // };
179
+ // const [pinnedGBs, setPinnedGBs] = useState<string[]>([]);
180
+ // const pinnedChildrens = pinnedGBs.map((gbId) => findAllChildrenCbIds(pedigree, gbId)).flat();
181
+ // const currentDepthCbs = props.componentBlocks?.filter((cb) => {
182
+ // return editableCBIds.includes(cb.id);
183
+ // });
184
+ // const onToggleGBPinned = (gbId: string) => {
185
+ // setPinnedGBs((prev) => {
186
+ // if (prev.includes(gbId)) {
187
+ // return prev.filter((id) => id !== gbId);
188
+ // }
189
+ // return [...prev, gbId];
190
+ // });
191
+ // };
192
+ return ((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsx)(dynamicLayoutContext_1.dynamicLayoutContext.Provider, __assign({ value: {
193
+ device: device,
194
+ mode: mode,
195
+ queryData: queryData
196
+ } }, { children: (0, jsx_runtime_1.jsx)(gleStyles_1.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)(CompositionBackground_1.default, __assign({}, props, { isMobile: isMobile, overrideStyles: {
197
+ minHeight: customSectionStyles.minHeight,
198
+ paddingTop: padding.top,
199
+ paddingBottom: padding.bottom,
200
+ paddingRight: padding.right,
201
+ paddingLeft: padding.left
202
+ } }, { children: (0, jsx_runtime_1.jsxs)(GridContainer, __assign({ ref: containerRef, cols: cols, rowHeight: rowHeight, sectionRow: rows, selectedRows: selectedRows, style: {
203
+ width: customSectionStyles.width,
204
+ maxWidth: customSectionStyles.maxWidth,
205
+ minWidth: customSectionStyles.minWidth
206
+ } }, { children: [Array.from({ length: rows }).map(function (_, rIdx) {
207
+ // selectedRows 배열에 현재 행의 인덱스가 포함되어 있는지 확인합니다.
208
+ return ((0, jsx_runtime_1.jsx)("div", __assign({
209
+ // className={`bg-grid-row ${isSelected ? 'selected' : ''}`}
210
+ style: {
211
+ gridRow: "".concat(rIdx + 1),
212
+ gridColumn: "1 / -1",
213
+ display: 'contents'
214
+ } }, { children: Array.from({ length: cols }).map(function (_, cIdx) { return ((0, jsx_runtime_1.jsx)("div", { className: "bg-grid-item", style: {
215
+ gridArea: "".concat(rIdx + 1, " / ").concat(cIdx + 1),
216
+ position: 'relative',
217
+ backgroundColor: '#0000001a',
218
+ border: '1px solid #ffffff33'
219
+ }, "data-row": rIdx + 1, "data-col": cIdx + 1 }, "bg-grid-item-".concat(rIdx + 1, "-").concat(cIdx + 1))); }) }), "bg-grid-row-".concat(rIdx + 1)));
220
+ }), pedigree.children.map(function (child) { return ((0, jsx_runtime_1.jsx)(groupUtils_1.default, { block: child, rowHeight: rowHeight, layoutItems: layouts[device === 'DESKTOP' ? 'lg' : 'sm'], cbs: props.componentBlocks, device: device, selectedRows: selectedRows,
221
+ // pinnedGBs={device === 'DESKTOP' ? child?.isPinnedDesktop : child.isPinnedMobile}
222
+ // onToggleGBPinned={onToggleGBPinned}
223
+ isEditMode: true }, child.blockId)); })] })) })) })) }) })) }));
224
+ });
225
+ 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"])));
226
+ function getGridAreaFromGroup(position) {
227
+ var x = position.x, y = position.y, cols = position.cols, rows = position.rows;
228
+ var colStart = clamp(x + 1, 1, Math.max(1, 25 - cols));
229
+ var rowStart = clamp(y + 1, 1, Infinity);
230
+ var rowEnd = clamp(rows + rowStart, rowStart + 1, Infinity);
231
+ var colEnd = clamp(colStart + cols, colStart + 1, 25);
232
+ return "".concat(rowStart, " / ").concat(colStart, " / ").concat(rowEnd, " / ").concat(colEnd);
233
+ }
234
+ function clamp(num, min, max) {
235
+ return Math.max(Math.min(num, max), min);
236
+ }
237
+ var GridContainer = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: grid; /* Space between grid items */\n gap: 10px;\n grid-auto-rows: minmax(", ", auto);\n grid-template-columns: repeat(", ", 1fr);\n grid-template-rows: ", ";\n padding: 10px 10px;\n\n * {\n box-sizing: border-box;\n }\n\n .bg-grid-item {\n transition: background-color 0.2s ease;\n }\n\n /* 1. \uAE30\uBCF8 \uD638\uBC84 (\uC120\uD0DD\uB418\uC9C0 \uC54A\uC558\uC744 \uB54C) */\n .bg-grid-row:not(.selected):hover > .bg-grid-item {\n background-color: #90ee90 !important; /* \uC5F0\uB450\uC0C9 */\n }\n\n /* 2. 'selected' \uD074\uB798\uC2A4\uAC00 \uBD99\uC740 \uD589\uC758 \uC544\uC774\uD15C (\uC120\uD0DD\uB428) */\n .bg-grid-row.selected > .bg-grid-item {\n background-color: #90ee90 !important; /* \uC5F0\uB450\uC0C9 */\n }\n\n /* 3. \uC120\uD0DD\uB41C \uD589\uC5D0 \uD638\uBC84\uD588\uC744 \uB54C */\n .bg-grid-row.selected:hover > .bg-grid-item {\n background-color: #ffc0cb !important; /* \uD551\uD06C\uC0C9 */\n }\n"], ["\n display: grid; /* Space between grid items */\n gap: 10px;\n grid-auto-rows: minmax(", ", auto);\n grid-template-columns: repeat(", ", 1fr);\n grid-template-rows: ", ";\n padding: 10px 10px;\n\n * {\n box-sizing: border-box;\n }\n\n .bg-grid-item {\n transition: background-color 0.2s ease;\n }\n\n /* 1. \uAE30\uBCF8 \uD638\uBC84 (\uC120\uD0DD\uB418\uC9C0 \uC54A\uC558\uC744 \uB54C) */\n .bg-grid-row:not(.selected):hover > .bg-grid-item {\n background-color: #90ee90 !important; /* \uC5F0\uB450\uC0C9 */\n }\n\n /* 2. 'selected' \uD074\uB798\uC2A4\uAC00 \uBD99\uC740 \uD589\uC758 \uC544\uC774\uD15C (\uC120\uD0DD\uB428) */\n .bg-grid-row.selected > .bg-grid-item {\n background-color: #90ee90 !important; /* \uC5F0\uB450\uC0C9 */\n }\n\n /* 3. \uC120\uD0DD\uB41C \uD589\uC5D0 \uD638\uBC84\uD588\uC744 \uB54C */\n .bg-grid-row.selected:hover > .bg-grid-item {\n background-color: #ffc0cb !important; /* \uD551\uD06C\uC0C9 */\n }\n"])), function (props) { return "".concat(props.rowHeight, "px"); }, function (props) { return props.cols; }, function (props) {
238
+ return Array.from({ length: props.sectionRow })
239
+ .map(function (_) { return "minmax(".concat(props.rowHeight, "px, auto)"); })
240
+ .join(' ');
241
+ });
242
+ var S_SectionWrapper = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: relative;\n"], ["\n position: relative;\n"])));
243
+ exports.default = react_1.default.memo(GridAutoRowEditor);
244
+ function getDefensiveFontSize(device, width) {
245
+ if (device === 'MOBILE') {
246
+ return width * (0.0000868 * width + 0.0202);
247
+ }
248
+ return width * (0.0000246 * width - 0.01618);
249
+ }
250
+ var templateObject_1, templateObject_2, templateObject_3;
@@ -326,13 +326,9 @@ function getGridAreaFromGroup(position) {
326
326
  function clamp(num, min, max) {
327
327
  return Math.max(Math.min(num, max), min);
328
328
  }
329
- var GridContainer = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: grid; /* Space between grid items */\n gap: 10px;\n grid-auto-rows: minmax(", ", auto);\n grid-template-columns: repeat(", ", 1fr);\n\n grid-template-rows: ", "; /* \uBC30\uC5F4\uC744 \uACF5\uBC31\uC73C\uB85C \uAD6C\uBD84\uB41C \uBB38\uC790\uC5F4\uB85C \uD569\uCE69\uB2C8\uB2E4. */\n padding: 10px 10px;\n\n * {\n box-sizing: border-box;\n }\n\n .bg-grid-item {\n transition: background-color 0.2s ease;\n }\n\n /* 1. \uAE30\uBCF8 \uD638\uBC84 (\uC120\uD0DD\uB418\uC9C0 \uC54A\uC558\uC744 \uB54C) */\n .bg-grid-row:not(.selected):hover > .bg-grid-item {\n background-color: #90ee90 !important; /* \uC5F0\uB450\uC0C9 */\n }\n\n /* 2. 'selected' \uD074\uB798\uC2A4\uAC00 \uBD99\uC740 \uD589\uC758 \uC544\uC774\uD15C (\uC120\uD0DD\uB428) */\n .bg-grid-row.selected > .bg-grid-item {\n background-color: #90ee90 !important; /* \uC5F0\uB450\uC0C9 */\n }\n\n /* 3. \uC120\uD0DD\uB41C \uD589\uC5D0 \uD638\uBC84\uD588\uC744 \uB54C */\n .bg-grid-row.selected:hover > .bg-grid-item {\n background-color: #ffc0cb !important; /* \uD551\uD06C\uC0C9 */\n }\n"], ["\n display: grid; /* Space between grid items */\n gap: 10px;\n grid-auto-rows: minmax(", ", auto);\n grid-template-columns: repeat(", ", 1fr);\n\n grid-template-rows: ", "; /* \uBC30\uC5F4\uC744 \uACF5\uBC31\uC73C\uB85C \uAD6C\uBD84\uB41C \uBB38\uC790\uC5F4\uB85C \uD569\uCE69\uB2C8\uB2E4. */\n padding: 10px 10px;\n\n * {\n box-sizing: border-box;\n }\n\n .bg-grid-item {\n transition: background-color 0.2s ease;\n }\n\n /* 1. \uAE30\uBCF8 \uD638\uBC84 (\uC120\uD0DD\uB418\uC9C0 \uC54A\uC558\uC744 \uB54C) */\n .bg-grid-row:not(.selected):hover > .bg-grid-item {\n background-color: #90ee90 !important; /* \uC5F0\uB450\uC0C9 */\n }\n\n /* 2. 'selected' \uD074\uB798\uC2A4\uAC00 \uBD99\uC740 \uD589\uC758 \uC544\uC774\uD15C (\uC120\uD0DD\uB428) */\n .bg-grid-row.selected > .bg-grid-item {\n background-color: #90ee90 !important; /* \uC5F0\uB450\uC0C9 */\n }\n\n /* 3. \uC120\uD0DD\uB41C \uD589\uC5D0 \uD638\uBC84\uD588\uC744 \uB54C */\n .bg-grid-row.selected:hover > .bg-grid-item {\n background-color: #ffc0cb !important; /* \uD551\uD06C\uC0C9 */\n }\n"])), function (props) { return "".concat(props.rowHeight, "px"); }, function (props) { return props.cols; }, function (props) {
330
- // 전체 행 개수만큼 배열을 생성하여 각 행의 CSS 값을 정의합니다.
329
+ var GridContainer = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: grid; /* Space between grid items */\n gap: 10px;\n grid-auto-rows: minmax(", ", auto);\n grid-template-columns: repeat(", ", 1fr);\n grid-template-rows: ", ";\n padding: 10px 10px;\n\n * {\n box-sizing: border-box;\n }\n\n .bg-grid-item {\n transition: background-color 0.2s ease;\n }\n\n /* 1. \uAE30\uBCF8 \uD638\uBC84 (\uC120\uD0DD\uB418\uC9C0 \uC54A\uC558\uC744 \uB54C) */\n .bg-grid-row:not(.selected):hover > .bg-grid-item {\n background-color: #90ee90 !important; /* \uC5F0\uB450\uC0C9 */\n }\n\n /* 2. 'selected' \uD074\uB798\uC2A4\uAC00 \uBD99\uC740 \uD589\uC758 \uC544\uC774\uD15C (\uC120\uD0DD\uB428) */\n .bg-grid-row.selected > .bg-grid-item {\n background-color: #90ee90 !important; /* \uC5F0\uB450\uC0C9 */\n }\n\n /* 3. \uC120\uD0DD\uB41C \uD589\uC5D0 \uD638\uBC84\uD588\uC744 \uB54C */\n .bg-grid-row.selected:hover > .bg-grid-item {\n background-color: #ffc0cb !important; /* \uD551\uD06C\uC0C9 */\n }\n"], ["\n display: grid; /* Space between grid items */\n gap: 10px;\n grid-auto-rows: minmax(", ", auto);\n grid-template-columns: repeat(", ", 1fr);\n grid-template-rows: ", ";\n padding: 10px 10px;\n\n * {\n box-sizing: border-box;\n }\n\n .bg-grid-item {\n transition: background-color 0.2s ease;\n }\n\n /* 1. \uAE30\uBCF8 \uD638\uBC84 (\uC120\uD0DD\uB418\uC9C0 \uC54A\uC558\uC744 \uB54C) */\n .bg-grid-row:not(.selected):hover > .bg-grid-item {\n background-color: #90ee90 !important; /* \uC5F0\uB450\uC0C9 */\n }\n\n /* 2. 'selected' \uD074\uB798\uC2A4\uAC00 \uBD99\uC740 \uD589\uC758 \uC544\uC774\uD15C (\uC120\uD0DD\uB428) */\n .bg-grid-row.selected > .bg-grid-item {\n background-color: #90ee90 !important; /* \uC5F0\uB450\uC0C9 */\n }\n\n /* 3. \uC120\uD0DD\uB41C \uD589\uC5D0 \uD638\uBC84\uD588\uC744 \uB54C */\n .bg-grid-row.selected:hover > .bg-grid-item {\n background-color: #ffc0cb !important; /* \uD551\uD06C\uC0C9 */\n }\n"])), function (props) { return "".concat(props.rowHeight, "px"); }, function (props) { return props.cols; }, function (props) {
331
330
  return Array.from({ length: props.sectionRow })
332
- .map(function (_) {
333
- // props로 받은 selectedRows 배열에 현재 행(index)이 포함되어 있는지 확인합니다.
334
- return "minmax(".concat(props.rowHeight, "px, auto)");
335
- })
331
+ .map(function (_) { return "minmax(".concat(props.rowHeight, "px, auto)"); })
336
332
  .join(' ');
337
333
  });
338
334
  var S_SectionWrapper = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: relative;\n"], ["\n position: relative;\n"])));
@@ -3,12 +3,12 @@ import type { PDSIconType, UiColors } from '../../common';
3
3
  export type IconButtonProps = {
4
4
  fillType?: 'fill' | 'line';
5
5
  shapeType?: 'circular' | 'rectangle';
6
- baseSize?: 'xxlarge' | 'large' | 'medium' | 'small' | 'xsmall';
6
+ baseSize?: 'xxlarge' | 'large' | 'medium' | 'small' | 'xsmall' | number;
7
7
  baseColorKey?: UiColors;
8
8
  overrideBaseColorHex?: string;
9
9
  overrideBaseColorHexHover?: string;
10
10
  borderColorKey?: UiColors;
11
- iconSize?: 12 | 16 | 20 | 24 | 48 | 72;
11
+ iconSize?: 12 | 16 | 20 | 24 | 40 | 48 | 72;
12
12
  iconFillType?: 'fill' | 'line';
13
13
  iconName: PDSIconType;
14
14
  iconColorKey?: UiColors;
@@ -171,14 +171,17 @@ var iconButtonStyle = (0, styled_components_1.css)(templateObject_12 || (templat
171
171
  }[fillType];
172
172
  }, function (_a) {
173
173
  var baseSize = _a.baseSize;
174
- return baseSize &&
175
- {
176
- xxlarge: xxlarge,
177
- large: large,
178
- medium: medium,
179
- small: small,
180
- xsmall: xsmall
181
- }[baseSize];
174
+ return typeof baseSize === 'number'
175
+ ? "height: ".concat(baseSize, "px; width: ").concat(baseSize, "px;")
176
+ : typeof baseSize === 'string'
177
+ ? {
178
+ xxlarge: xxlarge,
179
+ large: large,
180
+ medium: medium,
181
+ small: small,
182
+ xsmall: xsmall
183
+ }[baseSize]
184
+ : null;
182
185
  });
183
186
  var S_IconButton = styled_components_1.default.button(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), iconButtonStyle);
184
187
  exports.default = IconButton;
@@ -2,7 +2,7 @@
2
2
  import type { PDSIconType, UiColors } from '../../common';
3
3
  export type IconProps = {
4
4
  iconName?: PDSIconType;
5
- size?: 12 | 16 | 20 | 24 | 32 | 48 | 56 | 64 | 72;
5
+ size?: 12 | 16 | 20 | 24 | 32 | 40 | 48 | 56 | 64 | 72;
6
6
  colorKey?: UiColors;
7
7
  overrideColorHex?: string;
8
8
  fillType?: 'line' | 'fill';
@@ -6033,13 +6033,15 @@
6033
6033
  },
6034
6034
  "CB_CONTENT_PROP_TEXT": {
6035
6035
  "CB_CONTENT_PROP_TEXT_SPEC_CONNECTDATA": "NONE",
6036
- "CB_CONTENT_PROP_TEXT_SPEC_FORMAT": "NONE",
6037
- "CB_CONTENT_PROP_TEXT_SPEC_PREFIX": null,
6038
- "CB_CONTENT_PROP_TEXT_SPEC_SUFFIX": null,
6039
6036
  "CB_CONTENT_PROP_TEXT_SPEC_TEXT": "New Text",
6040
6037
  "CB_CONTENT_PROP_TEXT_SPEC_TEXTMOBILEALTERNATIVE": null,
6041
6038
  "CB_CONTENT_PROP_TEXT_SPEC_VALUETYPE": "VALUE"
6042
6039
  },
6040
+ "CB_CONTENT_PROP_TEXTOPTION": {
6041
+ "CB_CONTENT_PROP_TEXTOPTION_SPEC_FORMAT": "NONE",
6042
+ "CB_CONTENT_PROP_TEXTOPTION_SPEC_PREFIX": null,
6043
+ "CB_CONTENT_PROP_TEXTOPTION_SPEC_SUFFIX": null
6044
+ },
6043
6045
  "CB_CONTENT_PROP_VISIBILITY": {
6044
6046
  "CB_CONTENT_PROP_VISIBILITY_SPEC_DESKTOP": true,
6045
6047
  "CB_CONTENT_PROP_VISIBILITY_SPEC_MOBILEWEB": true