pds-dev-kit-web 2.2.296 → 2.2.298
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.
- package/dist/src/common/assets/icons/fill/Plugin.js +1 -1
- package/dist/src/common/assets/icons/line/Plugin.js +1 -1
- package/dist/src/common/services/i18n/resources/en.json +6 -1
- package/dist/src/common/services/i18n/resources/es.json +6 -1
- package/dist/src/common/services/i18n/resources/fil.json +6 -1
- package/dist/src/common/services/i18n/resources/index.d.ts +35 -0
- package/dist/src/common/services/i18n/resources/ja.json +6 -1
- package/dist/src/common/services/i18n/resources/ko.json +6 -1
- package/dist/src/common/services/i18n/resources/zh-cn.json +6 -1
- package/dist/src/common/services/i18n/resources/zh-tw.json +6 -1
- package/dist/src/sub/DynamicLayout/CompositionEditor/CompositionEditor.js +0 -2
- package/dist/src/sub/DynamicLayout/CompositionRenderer/Composition.js +9 -10
- package/dist/src/sub/DynamicLayout/CompositionRenderer/createCompositions.d.ts +2 -1
- package/dist/src/sub/DynamicLayout/CompositionRenderer/createCompositions.js +15 -55
- package/dist/src/sub/DynamicLayout/gleStyles.js +1 -1
- package/dist/src/sub/DynamicLayout/mock_composition.d.ts +1 -2
- package/dist/src/sub/DynamicLayout/mock_queryData.d.ts +216 -74
- package/dist/src/sub/DynamicLayout/mock_queryData.js +1018 -2510
- package/dist/src/sub/DynamicLayout/mock_section.json +10777 -23774
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.js +38 -8
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.js +95 -56
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarouselCore.js +48 -22
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useSwiper.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useSwiper.js +10 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.js +75 -59
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image/Image.js +33 -7
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.js +67 -38
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useSwiper.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useSwiper.js +11 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.d.ts +5 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.js +109 -9
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/textSpecFormatOptions.d.ts +1 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/textSpecFormatOptions.js +4 -4
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/VideoPlayer/VideoPlayer.js +25 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/types.d.ts +4 -3
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/fallbacks/DataNotFound.d.ts +4 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/fallbacks/DataNotFound.js +33 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseJsonProperties.js +0 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseQueryData.d.ts +18 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseQueryData.js +92 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBorder.js +19 -5
- package/dist/src/sub/DynamicLayout/types.d.ts +1 -0
- package/package.json +1 -1
- package/release-note.md +2 -2
|
@@ -25,6 +25,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
25
25
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
26
26
|
var Plugin = function (_a) {
|
|
27
27
|
var color = _a.color, size = _a.size, rest = __rest(_a, ["color", "size"]);
|
|
28
|
-
return ((0, jsx_runtime_1.jsx)("svg", __assign({ width: size, height: size, viewBox: "0 0 24 24" }, rest, { children: (0, jsx_runtime_1.jsxs)("g", __assign({ fill: "none" }, { children: [(0, jsx_runtime_1.jsx)("path", { fill: color, fillRule: "evenodd", d: "
|
|
28
|
+
return ((0, jsx_runtime_1.jsx)("svg", __assign({ width: size, height: size, viewBox: "0 0 24 24" }, rest, { children: (0, jsx_runtime_1.jsxs)("g", __assign({ xmlns: "http://www.w3.org/2000/svg", fill: "none" }, { children: [(0, jsx_runtime_1.jsx)("path", { fill: color, fillRule: "evenodd", d: "M8.7675,6.2426 C9.3195,6.2426 9.7675,6.6906 9.7675,7.2426 L9.7675,16.7576 C9.7675,17.3096 9.3195,17.7576 8.7675,17.7576 L5.9955,17.7576 C4.0625,17.7576 2.4955,16.1906 2.4955,14.2576 L2.4955,9.7426 C2.4955,7.8096 4.0625,6.2426 5.9955,6.2426 Z M17.8637,6.2426 L14.8347,6.2426 C14.2827,6.2426 13.8347,6.6906 13.8347,7.2426 L13.8347,16.7576 C13.8347,17.3096 14.2827,17.7576 14.8347,17.7576 L17.8637,17.7576 C19.7967,17.7576 21.3637,16.1906 21.3637,14.2576 L21.3637,9.7426 C21.3637,7.8096 19.7967,6.2426 17.8637,6.2426 L17.8637,6.2426 Z M17.8637,8.2426 C18.6907,8.2426 19.3637,8.9156 19.3637,9.7426 L19.3637,14.2576 C19.3637,15.0846 18.6907,15.7576 17.8637,15.7576 L15.8347,15.7576 L15.8347,8.2426 L17.8637,8.2426 Z" }), (0, jsx_runtime_1.jsx)("path", { stroke: color, strokeLinecap: "round", strokeWidth: "2", d: "M2.7086,12 L1.3956,12 M21.2914,12 L22.6044,12 M11.9337,9.7384 L8.9337,9.7384 M11.9337,14.2616 L8.9337,14.2616" })] })) })));
|
|
29
29
|
};
|
|
30
30
|
exports.default = Plugin;
|
|
@@ -25,6 +25,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
25
25
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
26
26
|
var Plugin = function (_a) {
|
|
27
27
|
var color = _a.color, size = _a.size, rest = __rest(_a, ["color", "size"]);
|
|
28
|
-
return ((0, jsx_runtime_1.jsx)("svg", __assign({ width: size, height: size, viewBox: "0 0 24 24" }, rest, { children: (0, jsx_runtime_1.jsxs)("g", __assign({ fill: "none" }, { children: [(0, jsx_runtime_1.jsx)("path", { fill: color, fillRule: "evenodd", d: "
|
|
28
|
+
return ((0, jsx_runtime_1.jsx)("svg", __assign({ width: size, height: size, viewBox: "0 0 24 24" }, rest, { children: (0, jsx_runtime_1.jsxs)("g", __assign({ xmlns: "http://www.w3.org/2000/svg", fill: "none" }, { children: [(0, jsx_runtime_1.jsx)("path", { fill: color, fillRule: "evenodd", d: "M8.7675,6.2426 C9.3195,6.2426 9.7675,6.6906 9.7675,7.2426 L9.7675,16.7576 C9.7675,17.3096 9.3195,17.7576 8.7675,17.7576 L5.9955,17.7576 C4.0625,17.7576 2.4955,16.1906 2.4955,14.2576 L2.4955,9.7426 C2.4955,7.8096 4.0625,6.2426 5.9955,6.2426 Z M17.8637,6.2426 L14.8347,6.2426 C14.2827,6.2426 13.8347,6.6906 13.8347,7.2426 L13.8347,16.7576 C13.8347,17.3096 14.2827,17.7576 14.8347,17.7576 L17.8637,17.7576 C19.7967,17.7576 21.3637,16.1906 21.3637,14.2576 L21.3637,9.7426 C21.3637,7.8096 19.7967,6.2426 17.8637,6.2426 L17.8637,6.2426 Z M17.8637,7.7426 C18.9667,7.7426 19.8637,8.6396 19.8637,9.7426 L19.8637,14.2576 C19.8637,15.3606 18.9667,16.2576 17.8637,16.2576 L15.3347,16.2576 L15.3347,7.7426 L17.8637,7.7426 Z" }), (0, jsx_runtime_1.jsx)("path", { stroke: color, strokeLinecap: "round", strokeWidth: "1.5", d: "M2.7086,12 L1.3956,12 M21.2914,12 L22.6044,12 M11.9337,9.7384 L8.9337,9.7384 M11.9337,14.2616 L8.9337,14.2616" })] })) })));
|
|
29
29
|
};
|
|
30
30
|
exports.default = Plugin;
|
|
@@ -106,6 +106,11 @@
|
|
|
106
106
|
"str_reaction": "Reaction",
|
|
107
107
|
"str_9806": "There are no items added yet. Please add and edit items!",
|
|
108
108
|
"str_10106": "The height is adjusted\naccording to the content.",
|
|
109
|
-
"str_grid_height_variable": "Variable"
|
|
109
|
+
"str_grid_height_variable": "Variable",
|
|
110
|
+
"str_10476": "Loading data information.",
|
|
111
|
+
"str_10477": "Data value not linked",
|
|
112
|
+
"str_10478": "No data values to link.",
|
|
113
|
+
"str_paid": "Paid",
|
|
114
|
+
"str_10597": "Associated Data Value"
|
|
110
115
|
}
|
|
111
116
|
}
|
|
@@ -106,6 +106,11 @@
|
|
|
106
106
|
"str_reaction": "Reaction",
|
|
107
107
|
"str_9806": "There are no items added yet. Please add and edit items!",
|
|
108
108
|
"str_10106": "The height is adjusted\naccording to the content.",
|
|
109
|
-
"str_grid_height_variable": "Variable"
|
|
109
|
+
"str_grid_height_variable": "Variable",
|
|
110
|
+
"str_10476": "Loading data information.",
|
|
111
|
+
"str_10477": "Data value not linked",
|
|
112
|
+
"str_10478": "No data values to link.",
|
|
113
|
+
"str_paid": "Paid",
|
|
114
|
+
"str_10597": "Associated Data Value"
|
|
110
115
|
}
|
|
111
116
|
}
|
|
@@ -99,6 +99,11 @@
|
|
|
99
99
|
"str_reaction": "Reaction",
|
|
100
100
|
"str_9806": "There are no items added yet. Please add and edit items!",
|
|
101
101
|
"str_10106": "The height is adjusted\naccording to the content.",
|
|
102
|
-
"str_grid_height_variable": "Variable"
|
|
102
|
+
"str_grid_height_variable": "Variable",
|
|
103
|
+
"str_10476": "Loading data information.",
|
|
104
|
+
"str_10477": "Data value not linked",
|
|
105
|
+
"str_10478": "No data values to link.",
|
|
106
|
+
"str_paid": "Paid",
|
|
107
|
+
"str_10597": "Associated Data Value"
|
|
103
108
|
}
|
|
104
109
|
}
|
|
@@ -109,6 +109,11 @@ declare const locale: {
|
|
|
109
109
|
str_9806: string;
|
|
110
110
|
str_10106: string;
|
|
111
111
|
str_grid_height_variable: string;
|
|
112
|
+
str_10476: string;
|
|
113
|
+
str_10477: string;
|
|
114
|
+
str_10478: string;
|
|
115
|
+
str_paid: string;
|
|
116
|
+
str_10597: string;
|
|
112
117
|
};
|
|
113
118
|
};
|
|
114
119
|
readonly en: {
|
|
@@ -220,6 +225,11 @@ declare const locale: {
|
|
|
220
225
|
str_9806: string;
|
|
221
226
|
str_10106: string;
|
|
222
227
|
str_grid_height_variable: string;
|
|
228
|
+
str_10476: string;
|
|
229
|
+
str_10477: string;
|
|
230
|
+
str_10478: string;
|
|
231
|
+
str_paid: string;
|
|
232
|
+
str_10597: string;
|
|
223
233
|
};
|
|
224
234
|
};
|
|
225
235
|
readonly ja: {
|
|
@@ -331,6 +341,11 @@ declare const locale: {
|
|
|
331
341
|
str_9806: string;
|
|
332
342
|
str_10106: string;
|
|
333
343
|
str_grid_height_variable: string;
|
|
344
|
+
str_10476: string;
|
|
345
|
+
str_10477: string;
|
|
346
|
+
str_10478: string;
|
|
347
|
+
str_paid: string;
|
|
348
|
+
str_10597: string;
|
|
334
349
|
};
|
|
335
350
|
};
|
|
336
351
|
readonly es: {
|
|
@@ -442,6 +457,11 @@ declare const locale: {
|
|
|
442
457
|
str_9806: string;
|
|
443
458
|
str_10106: string;
|
|
444
459
|
str_grid_height_variable: string;
|
|
460
|
+
str_10476: string;
|
|
461
|
+
str_10477: string;
|
|
462
|
+
str_10478: string;
|
|
463
|
+
str_paid: string;
|
|
464
|
+
str_10597: string;
|
|
445
465
|
};
|
|
446
466
|
};
|
|
447
467
|
readonly 'zh-cn': {
|
|
@@ -553,6 +573,11 @@ declare const locale: {
|
|
|
553
573
|
str_9806: string;
|
|
554
574
|
str_10106: string;
|
|
555
575
|
str_grid_height_variable: string;
|
|
576
|
+
str_10476: string;
|
|
577
|
+
str_10477: string;
|
|
578
|
+
str_10478: string;
|
|
579
|
+
str_paid: string;
|
|
580
|
+
str_10597: string;
|
|
556
581
|
};
|
|
557
582
|
};
|
|
558
583
|
readonly 'zh-tw': {
|
|
@@ -664,6 +689,11 @@ declare const locale: {
|
|
|
664
689
|
str_9806: string;
|
|
665
690
|
str_10106: string;
|
|
666
691
|
str_grid_height_variable: string;
|
|
692
|
+
str_10476: string;
|
|
693
|
+
str_10477: string;
|
|
694
|
+
str_10478: string;
|
|
695
|
+
str_paid: string;
|
|
696
|
+
str_10597: string;
|
|
667
697
|
};
|
|
668
698
|
};
|
|
669
699
|
readonly fil: {
|
|
@@ -768,6 +798,11 @@ declare const locale: {
|
|
|
768
798
|
str_9806: string;
|
|
769
799
|
str_10106: string;
|
|
770
800
|
str_grid_height_variable: string;
|
|
801
|
+
str_10476: string;
|
|
802
|
+
str_10477: string;
|
|
803
|
+
str_10478: string;
|
|
804
|
+
str_paid: string;
|
|
805
|
+
str_10597: string;
|
|
771
806
|
};
|
|
772
807
|
};
|
|
773
808
|
};
|
|
@@ -106,6 +106,11 @@
|
|
|
106
106
|
"str_reaction": "Reaction",
|
|
107
107
|
"str_9806": "There are no items added yet. Please add and edit items!",
|
|
108
108
|
"str_10106": "The height is adjusted\naccording to the content.",
|
|
109
|
-
"str_grid_height_variable": "Variable"
|
|
109
|
+
"str_grid_height_variable": "Variable",
|
|
110
|
+
"str_10476": "Loading data information.",
|
|
111
|
+
"str_10477": "Data value not linked",
|
|
112
|
+
"str_10478": "No data values to link.",
|
|
113
|
+
"str_paid": "Paid",
|
|
114
|
+
"str_10597": "Associated Data Value"
|
|
110
115
|
}
|
|
111
116
|
}
|
|
@@ -107,6 +107,11 @@
|
|
|
107
107
|
"str_reaction": "반응",
|
|
108
108
|
"str_9806": "아직 추가된 항목이 없어요. 항목을 추가하고 편집해주세요!",
|
|
109
109
|
"str_10106": "내용에 따라 높이가 조절됩니다.",
|
|
110
|
-
"str_grid_height_variable": "가변"
|
|
110
|
+
"str_grid_height_variable": "가변",
|
|
111
|
+
"str_10476": "데이터 정보를 불러오는 중입니다.",
|
|
112
|
+
"str_10477": "데이터 값 연결되지 않음",
|
|
113
|
+
"str_10478": "연결할 데이터 값이 없습니다.",
|
|
114
|
+
"str_paid": "유료",
|
|
115
|
+
"str_10597": "관련 데이터 값 표시함"
|
|
111
116
|
}
|
|
112
117
|
}
|
|
@@ -106,6 +106,11 @@
|
|
|
106
106
|
"str_reaction": "Reaction",
|
|
107
107
|
"str_9806": "There are no items added yet. Please add and edit items!",
|
|
108
108
|
"str_10106": "The height is adjusted\naccording to the content.",
|
|
109
|
-
"str_grid_height_variable": "Variable"
|
|
109
|
+
"str_grid_height_variable": "Variable",
|
|
110
|
+
"str_10476": "Loading data information.",
|
|
111
|
+
"str_10477": "Data value not linked",
|
|
112
|
+
"str_10478": "No data values to link.",
|
|
113
|
+
"str_paid": "Paid",
|
|
114
|
+
"str_10597": "Associated Data Value"
|
|
110
115
|
}
|
|
111
116
|
}
|
|
@@ -106,6 +106,11 @@
|
|
|
106
106
|
"str_reaction": "Reaction",
|
|
107
107
|
"str_9806": "There are no items added yet. Please add and edit items!",
|
|
108
108
|
"str_10106": "The height is adjusted\naccording to the content.",
|
|
109
|
-
"str_grid_height_variable": "Variable"
|
|
109
|
+
"str_grid_height_variable": "Variable",
|
|
110
|
+
"str_10476": "Loading data information.",
|
|
111
|
+
"str_10477": "Data value not linked",
|
|
112
|
+
"str_10478": "No data values to link.",
|
|
113
|
+
"str_paid": "Paid",
|
|
114
|
+
"str_10597": "Associated Data Value"
|
|
110
115
|
}
|
|
111
116
|
}
|
|
@@ -75,8 +75,6 @@ var Responsive = (0, publ_echo_1.WidthProvider)(publ_echo_1.ResponsiveGridEditor
|
|
|
75
75
|
var CompositionEditor = (0, react_1.forwardRef)(function CompositionEditorCanvas(props, ref) {
|
|
76
76
|
var _a, _b, _c, _d;
|
|
77
77
|
var _e = props.editorProps, device = _e.device, shortcutKeyMode = _e.shortcutKeyMode, placementRestriction = _e.placementRestriction, compositionActionHandler = _e.compositionActionHandler;
|
|
78
|
-
// const GLE_MIN_WIDTH_DESKTOP_PX = `${GRID_CELL_MIN * cols}px`;
|
|
79
|
-
// const GLE_MIN_WIDTH_MOBILE_PX = `${GRID_CELL_MIN * rows}px`;
|
|
80
78
|
var editingSectionId = props.compositionData.id;
|
|
81
79
|
var mode = 'EDIT';
|
|
82
80
|
var _f = props.compositionData, componentBlocks = _f.componentBlocks, jsonProperties = _f.jsonProperties;
|
|
@@ -119,9 +119,9 @@ var Composition = (0, react_1.forwardRef)(function CustomSection(props) {
|
|
|
119
119
|
var customSectionStyles = {
|
|
120
120
|
minHeight: "".concat(minHeight, "px"),
|
|
121
121
|
maxHeight: "".concat(maxHeight, "px"),
|
|
122
|
-
width: "100%
|
|
122
|
+
width: mode === 'EDIT' ? "".concat(Math.max(canvasWidth, minWidth !== null && minWidth !== void 0 ? minWidth : 0), "px") : '100%',
|
|
123
123
|
maxWidth: maxWidth ? "".concat(maxWidth, "px") : '100%',
|
|
124
|
-
minWidth: "".concat(
|
|
124
|
+
minWidth: minWidth ? "".concat(minWidth, "px") : '0px'
|
|
125
125
|
};
|
|
126
126
|
var onClickSection = function () {
|
|
127
127
|
if (!isEditMode) {
|
|
@@ -152,20 +152,19 @@ var Composition = (0, react_1.forwardRef)(function CustomSection(props) {
|
|
|
152
152
|
width: '100%',
|
|
153
153
|
height: '100%'
|
|
154
154
|
} }, { children: (0, jsx_runtime_1.jsx)(CompositionBackground_1.default, __assign({}, props, { isMobile: isMobile, overrideStyles: {
|
|
155
|
-
// minHeight: customSectionStyles.minHeight,
|
|
156
155
|
paddingTop: padding.top,
|
|
157
156
|
paddingBottom: padding.bottom,
|
|
158
157
|
paddingRight: padding.right,
|
|
159
158
|
paddingLeft: padding.left,
|
|
160
|
-
width:
|
|
161
|
-
height:
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
159
|
+
width: customSectionStyles.width,
|
|
160
|
+
height: ccbCode === types_1.CB_ALL_CODES.CB_CONTENTSCAROUSEL ? 'auto' : '100%',
|
|
161
|
+
maxHeight: customSectionStyles.maxHeight,
|
|
162
|
+
minHeight: customSectionStyles.minHeight,
|
|
163
|
+
maxWidth: customSectionStyles.maxWidth,
|
|
164
|
+
minWidth: customSectionStyles.minWidth
|
|
165
|
+
} }, { children: (0, jsx_runtime_1.jsx)(GridContainer, __assign({ className: "composition-container", "data-cols": cols, "data-rows": rows, "data-row-height": rowHeight, "data-col-width": "10px", ref: containerRef, cols: cols, rowHeight: rowHeight, sectionRow: rows, "data-wrapper-paddingT": padding.top, "data-wrapper-paddingB": padding.bottom, "data-wrapper-paddingL": padding.left, "data-wrapper-paddingR": padding.right }, { 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: [], isEditMode: false }, child.blockId)); }) })) })) })) })) })) }));
|
|
166
166
|
});
|
|
167
167
|
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"); });
|
|
168
168
|
var S_COMPOSITIONWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: relative;\n"], ["\n position: relative;\n"])));
|
|
169
|
-
var HEIGHT_AUTO_CODES = [types_1.CB_ALL_CODES.CB_CONTENTSCAROUSEL, types_1.CB_ALL_CODES.CB_LIST];
|
|
170
169
|
exports.default = react_1.default.memo(Composition);
|
|
171
170
|
var templateObject_1, templateObject_2;
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
import type { ComponentBlock } from '../sections/CustomSection/types';
|
|
3
3
|
import type { CB_VALUE_TYPE, CCB_VALUE_TYPE } from '../sections/CustomSection/util/types';
|
|
4
4
|
import type { IComposition, QueryData } from '../../DynamicLayout/types';
|
|
5
|
-
export declare function createCompositions({ valueType, queryPath, queryData, compositions, limit, componentBlockCode }: {
|
|
5
|
+
export declare function createCompositions({ valueType, queryPath, queryData, compositions, limit, componentBlockCode, device }: {
|
|
6
6
|
valueType: CCB_VALUE_TYPE | CB_VALUE_TYPE;
|
|
7
7
|
queryPath: string;
|
|
8
8
|
queryData: QueryData | undefined;
|
|
9
9
|
compositions: IComposition[];
|
|
10
10
|
limit: number;
|
|
11
11
|
componentBlockCode: ComponentBlock['componentBlockCode'];
|
|
12
|
+
device: 'MOBILE' | 'DESKTOP';
|
|
12
13
|
}): JSX.Element[];
|
|
@@ -1,8 +1,4 @@
|
|
|
1
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
2
|
var __assign = (this && this.__assign) || function () {
|
|
7
3
|
__assign = Object.assign || function(t) {
|
|
8
4
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -20,63 +16,27 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
20
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
17
|
exports.createCompositions = void 0;
|
|
22
18
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
23
|
-
require("react");
|
|
24
|
-
var react_i18next_1 = require("react-i18next");
|
|
25
|
-
var styled_components_1 = __importDefault(require("styled-components"));
|
|
26
19
|
var compositionQueryContext_1 = require("../compositionQueryContext");
|
|
20
|
+
var dynamicLayoutContext_1 = require("../dynamicLayoutContext");
|
|
27
21
|
var Composition_1 = __importDefault(require("./Composition"));
|
|
28
22
|
function createCompositions(_a) {
|
|
29
|
-
var valueType = _a.valueType, queryPath = _a.queryPath, queryData = _a.queryData, compositions = _a.compositions, limit = _a.limit, componentBlockCode = _a.componentBlockCode;
|
|
23
|
+
var valueType = _a.valueType, queryPath = _a.queryPath, queryData = _a.queryData, compositions = _a.compositions, limit = _a.limit, componentBlockCode = _a.componentBlockCode, device = _a.device;
|
|
30
24
|
var isQueryDataConnected = valueType === 'DATA' || valueType === 'DELEGATEDDATA';
|
|
31
25
|
// 직접 입력 유형인 경우
|
|
32
26
|
if (!isQueryDataConnected) {
|
|
33
|
-
var valueTypeCompositions = compositions.filter(function (composition) { return
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return valueTypeCompositions.map(function (composition) { return ((0, jsx_runtime_1.jsx)(Composition_1.default, __assign({}, composition, { ccbCode: componentBlockCode }), composition.id)); });
|
|
39
|
-
}
|
|
40
|
-
if (!compositions.length) {
|
|
41
|
-
return [(0, jsx_runtime_1.jsx)("div", { children: "EMPTY TEXT" }, "empty")];
|
|
42
|
-
}
|
|
43
|
-
// 데이터 연결 유형이나, 쿼리 데이터나 키가 없는 경우
|
|
44
|
-
if (queryPath === 'NONE' || !queryPath || !queryData) {
|
|
45
|
-
return [(0, jsx_runtime_1.jsx)(S_EmptyLayer, { children: "\uC544\uC9C1 \uC5F0\uACB0\uB41C \uCFFC\uB9AC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4." }, "no-query")];
|
|
27
|
+
var valueTypeCompositions = compositions.filter(function (composition) { return !!(composition === null || composition === void 0 ? void 0 : composition.ccbManualItemUuid); });
|
|
28
|
+
return valueTypeCompositions.map(function (composition) { return ((0, jsx_runtime_1.jsx)(dynamicLayoutContext_1.dynamicLayoutContext.Provider, __assign({ value: {
|
|
29
|
+
mode: 'PREVIEW',
|
|
30
|
+
device: device
|
|
31
|
+
} }, { children: (0, jsx_runtime_1.jsx)(Composition_1.default, __assign({}, composition, { ccbCode: componentBlockCode }), composition.id) }), composition.id)); });
|
|
46
32
|
}
|
|
47
|
-
var
|
|
48
|
-
var
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if (!queryDataValue.length) {
|
|
56
|
-
return [(0, jsx_runtime_1.jsx)(S_EmptyLayer, { children: "\uC544\uC9C1 \uBCF4\uC5EC\uC904 \uCF58\uD150\uCE20\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4." }, "empty-item")];
|
|
57
|
-
}
|
|
58
|
-
return queryDataValue.slice(0, limit).map(function (query, index) { return ((0, jsx_runtime_1.jsx)(compositionQueryContext_1.CCBQueryPathContext.Provider, __assign({ value: { queryData: query } }, { children: (0, jsx_runtime_1.jsx)(Composition_1.default, __assign({}, queryComposition, { ccbCode: componentBlockCode })) }), index)); });
|
|
33
|
+
var queryDataValue = queryData === null || queryData === void 0 ? void 0 : queryData[queryPath];
|
|
34
|
+
var queryComposition = compositions.find(function (composition) { return !composition.ccbManualItemUuid; });
|
|
35
|
+
if (!queryDataValue)
|
|
36
|
+
return [(0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {})];
|
|
37
|
+
return queryDataValue.slice(0, limit).map(function (query, index) { return ((0, jsx_runtime_1.jsx)(compositionQueryContext_1.CCBQueryPathContext.Provider, __assign({ value: { queryData: query } }, { children: (0, jsx_runtime_1.jsx)(dynamicLayoutContext_1.dynamicLayoutContext.Provider, __assign({ value: {
|
|
38
|
+
mode: 'PREVIEW',
|
|
39
|
+
device: device
|
|
40
|
+
} }, { children: (0, jsx_runtime_1.jsx)(Composition_1.default, __assign({}, queryComposition, { ccbCode: componentBlockCode })) })) }), index)); });
|
|
59
41
|
}
|
|
60
42
|
exports.createCompositions = createCompositions;
|
|
61
|
-
function removeFirstSegment(path) {
|
|
62
|
-
var segments = path.split('/');
|
|
63
|
-
return segments.slice(1).join('/');
|
|
64
|
-
}
|
|
65
|
-
function EmptyString() {
|
|
66
|
-
var t = (0, react_i18next_1.useTranslation)('translation').t;
|
|
67
|
-
return (0, jsx_runtime_1.jsx)(S_EmptyLayer, { children: t('str_9806') });
|
|
68
|
-
}
|
|
69
|
-
var S_EmptyLayer = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: rgba(0, 0, 0, 0.6);\n color: white;\n display: flex;\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n padding: ", ";\n text-align: center;\n word-break: keep-all;\n"], ["\n background-color: rgba(0, 0, 0, 0.6);\n color: white;\n display: flex;\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n padding: ", ";\n text-align: center;\n word-break: keep-all;\n"])), function (_a) {
|
|
70
|
-
var theme = _a.theme;
|
|
71
|
-
return theme.desktopFontSize.body2;
|
|
72
|
-
}, function (_a) {
|
|
73
|
-
var theme = _a.theme;
|
|
74
|
-
return theme.fontWeight.bold;
|
|
75
|
-
}, function (_a) {
|
|
76
|
-
var theme = _a.theme;
|
|
77
|
-
return theme.desktopLineHeight.body2;
|
|
78
|
-
}, function (_a) {
|
|
79
|
-
var theme = _a.theme;
|
|
80
|
-
return theme.spacing.spacingE;
|
|
81
|
-
});
|
|
82
|
-
var templateObject_1;
|