pds-dev-kit-web-test 2.7.310 → 2.7.312
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/sub/DynamicLayout/CompositionRenderer/Composition.d.ts +2 -0
- package/dist/src/sub/DynamicLayout/CompositionRenderer/Composition.js +5 -2
- package/dist/src/sub/DynamicLayout/CompositionRenderer/createCompositions.d.ts +3 -1
- package/dist/src/sub/DynamicLayout/CompositionRenderer/createCompositions.js +3 -3
- package/dist/src/sub/DynamicLayout/mock_section.json +6366 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.js +3 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.js +3 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.js +3 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBannerCore.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { CB_ALL_CODES } from '../sections/CustomSection/types';
|
|
2
3
|
import type { IComposition } from '../types';
|
|
3
4
|
import type { Layout } from 'publ-echo-test/dist/lib/GridLayoutEditor/types';
|
|
4
5
|
export type LayoutsType = {
|
|
@@ -7,5 +8,6 @@ export type LayoutsType = {
|
|
|
7
8
|
};
|
|
8
9
|
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<IComposition & {
|
|
9
10
|
device?: "DESKTOP" | "MOBILE" | undefined;
|
|
11
|
+
ccbCode: CB_ALL_CODES;
|
|
10
12
|
} & React.RefAttributes<unknown>>>;
|
|
11
13
|
export default _default;
|
|
@@ -48,8 +48,10 @@ var ErrorBoundary_1 = require("../../DynamicLayout/components/Section/ErrorBound
|
|
|
48
48
|
var dynamicLayoutContext_1 = require("../../DynamicLayout/dynamicLayoutContext");
|
|
49
49
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
50
50
|
require("../components");
|
|
51
|
+
require("../components/Section/components/CustomSectionBackground");
|
|
51
52
|
var gleStyles_1 = require("../gleStyles");
|
|
52
53
|
var useResizableObserver_1 = require("../sections/CustomSection/hooks/useResizableObserver");
|
|
54
|
+
var types_1 = require("../sections/CustomSection/types");
|
|
53
55
|
var util_1 = require("../sections/CustomSection/util");
|
|
54
56
|
var parseSectionPadding_1 = __importDefault(require("../sections/CustomSection/util/layoutPropParsers/parseSectionPadding"));
|
|
55
57
|
var parseCompositionPlacement_1 = __importDefault(require("../sections/CustomSection/util/parseCompositionPlacement"));
|
|
@@ -62,7 +64,7 @@ require("./FlexGridItemForCCB");
|
|
|
62
64
|
var Composition = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
63
65
|
var _a, _b, _c, _d;
|
|
64
66
|
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;
|
|
65
|
-
var componentBlocks = props.componentBlocks, jsonProperties = props.jsonProperties;
|
|
67
|
+
var componentBlocks = props.componentBlocks, jsonProperties = props.jsonProperties, ccbCode = props.ccbCode;
|
|
66
68
|
var pedigree = jsonProperties === null || jsonProperties === void 0 ? void 0 : jsonProperties.pedigree;
|
|
67
69
|
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
70
|
var layouts = (0, util_1.parsePlacement)(componentBlocks !== null && componentBlocks !== void 0 ? componentBlocks : [], zOrders);
|
|
@@ -202,6 +204,7 @@ var Composition = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
|
202
204
|
}
|
|
203
205
|
return 16;
|
|
204
206
|
})();
|
|
207
|
+
var useFullHeightBackground = ccbCode === types_1.CB_ALL_CODES.CB_SLIDEBANNER;
|
|
205
208
|
return ((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsx)(dynamicLayoutContext_1.dynamicLayoutContext.Provider, __assign({ value: {
|
|
206
209
|
device: device
|
|
207
210
|
} }, { children: (0, jsx_runtime_1.jsx)(gleStyles_1.S_gleStyles, __assign({ style: {
|
|
@@ -288,7 +291,7 @@ var MOCK_SHADOW = {
|
|
|
288
291
|
'CB_STYLE_PROP_SHADOW_SPEC_Y:MOBILE': null,
|
|
289
292
|
'CB_STYLE_PROP_SHADOW_SPEC_Y:MOBILE:HOVER': null
|
|
290
293
|
};
|
|
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
|
|
294
|
+
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"); });
|
|
292
295
|
var S_COMPOSITIONWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: relative;\n"], ["\n position: relative;\n"])));
|
|
293
296
|
exports.default = react_1.default.memo(Composition);
|
|
294
297
|
function getDefensiveFontSize(device, width) {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import type { ComponentBlock } from '../sections/CustomSection/types';
|
|
2
3
|
import type { CB_VALUE_TYPE, CCB_VALUE_TYPE } from '../sections/CustomSection/util/types';
|
|
3
4
|
import type { IComposition, QueryData } from '../../DynamicLayout/types';
|
|
4
|
-
export declare function createCompositions({ valueType, queryPath, queryData, compositions, limit }: {
|
|
5
|
+
export declare function createCompositions({ valueType, queryPath, queryData, compositions, limit, componentBlockCode }: {
|
|
5
6
|
valueType: CCB_VALUE_TYPE | CB_VALUE_TYPE;
|
|
6
7
|
queryPath: string;
|
|
7
8
|
queryData: QueryData | undefined;
|
|
8
9
|
compositions: IComposition[];
|
|
9
10
|
limit: number;
|
|
11
|
+
componentBlockCode: ComponentBlock['componentBlockCode'];
|
|
10
12
|
}): JSX.Element[];
|
|
@@ -26,7 +26,7 @@ var styled_components_1 = __importDefault(require("styled-components"));
|
|
|
26
26
|
var compositionQueryContext_1 = require("../compositionQueryContext");
|
|
27
27
|
var Composition_1 = __importDefault(require("./Composition"));
|
|
28
28
|
function createCompositions(_a) {
|
|
29
|
-
var valueType = _a.valueType, queryPath = _a.queryPath, queryData = _a.queryData, compositions = _a.compositions, limit = _a.limit;
|
|
29
|
+
var valueType = _a.valueType, queryPath = _a.queryPath, queryData = _a.queryData, compositions = _a.compositions, limit = _a.limit, componentBlockCode = _a.componentBlockCode;
|
|
30
30
|
var isQueryDataConnected = valueType === 'DATA' || valueType === 'DELEGATEDDATA';
|
|
31
31
|
// 직접 입력 유형인 경우
|
|
32
32
|
if (!isQueryDataConnected) {
|
|
@@ -35,7 +35,7 @@ function createCompositions(_a) {
|
|
|
35
35
|
if (!valueTypeCompositions.length) {
|
|
36
36
|
return [(0, jsx_runtime_1.jsx)(EmptyString, {}, "empty-manual-item")];
|
|
37
37
|
}
|
|
38
|
-
return valueTypeCompositions.map(function (composition) { return ((0, jsx_runtime_1.jsx)(Composition_1.default, __assign({}, composition), composition.id)); });
|
|
38
|
+
return valueTypeCompositions.map(function (composition) { return ((0, jsx_runtime_1.jsx)(Composition_1.default, __assign({}, composition, { ccbCode: componentBlockCode }), composition.id)); });
|
|
39
39
|
}
|
|
40
40
|
if (!compositions.length) {
|
|
41
41
|
return [(0, jsx_runtime_1.jsx)("div", { children: "EMPTY TEXT" }, "empty")];
|
|
@@ -55,7 +55,7 @@ function createCompositions(_a) {
|
|
|
55
55
|
if (!queryDataValue.length) {
|
|
56
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
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)) }), index)); });
|
|
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)); });
|
|
59
59
|
}
|
|
60
60
|
exports.createCompositions = createCompositions;
|
|
61
61
|
function removeFirstSegment(path) {
|