pds-dev-kit-web-test 2.7.553 → 2.7.554
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/createCompositions.d.ts +2 -1
- package/dist/src/sub/DynamicLayout/CompositionRenderer/createCompositions.js +10 -3
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.js +2 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.js +2 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.js +2 -1
- package/package.json +1 -1
|
@@ -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[];
|
|
@@ -17,19 +17,26 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
exports.createCompositions = void 0;
|
|
18
18
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
19
|
var compositionQueryContext_1 = require("../compositionQueryContext");
|
|
20
|
+
var dynamicLayoutContext_1 = require("../dynamicLayoutContext");
|
|
20
21
|
var Composition_1 = __importDefault(require("./Composition"));
|
|
21
22
|
function createCompositions(_a) {
|
|
22
|
-
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;
|
|
23
24
|
var isQueryDataConnected = valueType === 'DATA' || valueType === 'DELEGATEDDATA';
|
|
24
25
|
// 직접 입력 유형인 경우
|
|
25
26
|
if (!isQueryDataConnected) {
|
|
26
27
|
var valueTypeCompositions = compositions.filter(function (composition) { return !!(composition === null || composition === void 0 ? void 0 : composition.ccbManualItemUuid); });
|
|
27
|
-
return valueTypeCompositions.map(function (composition) { return ((0, jsx_runtime_1.jsx)(
|
|
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)); });
|
|
28
32
|
}
|
|
29
33
|
var queryDataValue = queryData === null || queryData === void 0 ? void 0 : queryData[queryPath];
|
|
30
34
|
var queryComposition = compositions.find(function (composition) { return !composition.ccbManualItemUuid; });
|
|
31
35
|
if (!queryDataValue)
|
|
32
36
|
return [(0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {})];
|
|
33
|
-
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)(
|
|
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)); });
|
|
34
41
|
}
|
|
35
42
|
exports.createCompositions = createCompositions;
|
|
@@ -188,7 +188,8 @@ function ContentsCarousel(props) {
|
|
|
188
188
|
: CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_ITEMCOUNTS,
|
|
189
189
|
queryData: queryData,
|
|
190
190
|
compositions: compositions,
|
|
191
|
-
componentBlockCode: types_1.CB_ALL_CODES.CB_CONTENTSCAROUSEL
|
|
191
|
+
componentBlockCode: types_1.CB_ALL_CODES.CB_CONTENTSCAROUSEL,
|
|
192
|
+
device: device
|
|
192
193
|
}) }), CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_VALUETYPE +
|
|
193
194
|
CB_EFFECT_PROP_CONTENTSCAROUSEL_SPEC_TRANSITIONTYPE +
|
|
194
195
|
autoPlayEnabled +
|
|
@@ -192,7 +192,8 @@ function ContentsList(props) {
|
|
|
192
192
|
limit: CB_CONTENT_PROP_CONTENTSLIST_SPEC_ITEMCOUNTS,
|
|
193
193
|
queryData: queryData,
|
|
194
194
|
compositions: compositions,
|
|
195
|
-
componentBlockCode: types_1.CB_ALL_CODES.CB_LIST
|
|
195
|
+
componentBlockCode: types_1.CB_ALL_CODES.CB_LIST,
|
|
196
|
+
device: device
|
|
196
197
|
}).slice(startIndex, endIndex + 1) })) })));
|
|
197
198
|
};
|
|
198
199
|
var renderCompositions = function (compositions) {
|
|
@@ -168,7 +168,8 @@ function SlideBanner(props) {
|
|
|
168
168
|
limit: CB_CONTENT_PROP_SLIDEBANNER_SPEC_ITEMCOUNTS,
|
|
169
169
|
queryData: queryData,
|
|
170
170
|
compositions: compositions,
|
|
171
|
-
componentBlockCode: types_1.CB_ALL_CODES.CB_SLIDEBANNER
|
|
171
|
+
componentBlockCode: types_1.CB_ALL_CODES.CB_SLIDEBANNER,
|
|
172
|
+
device: device
|
|
172
173
|
}) }), CB_CONTENT_PROP_SLIDEBANNER_SPEC_VALUETYPE +
|
|
173
174
|
CB_EFFECT_PROP_SLIDEBANNER_SPEC_TRANSITIONTYPE +
|
|
174
175
|
autoPlayEnabled +
|