pds-dev-kit-web-test 2.5.674 → 2.5.675
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.
@@ -47,30 +47,29 @@ var createComponent = function (type, getDesignType, getLocation) {
|
|
47
47
|
};
|
48
48
|
};
|
49
49
|
function ContentsList(props) {
|
50
|
-
var _a, _b, _c, _d;
|
51
|
-
var
|
52
|
-
console.log(queryData);
|
50
|
+
var _a, _b, _c, _d, _e;
|
51
|
+
var _f = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _f.device, mode = _f.mode, queryData = _f.queryData;
|
53
52
|
var index = props.index, compositions = props.compositions, CB_CONTENT_PROP_CONTENTSLIST = props.CB_CONTENT_PROP_CONTENTSLIST, CB_STYLE_PROP_CONTENTSLIST = props.CB_STYLE_PROP_CONTENTSLIST, CB_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW, CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM, CB_LAYOUT_PROP_PADDING = props.CB_LAYOUT_PROP_PADDING, CB_STYLE_PROP_BGMEDIA = props.CB_STYLE_PROP_BGMEDIA;
|
54
53
|
var CB_CONTENT_PROP_CONTENTSLIST_SPEC_ITEMCOUNTS = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_ITEMCOUNTS, CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS, CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE, CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA, CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS;
|
55
|
-
var
|
56
|
-
var
|
54
|
+
var _g = (0, react_1.useState)(false), isHovered = _g[0], setIsHovered = _g[1];
|
55
|
+
var _h = (0, react_1.useState)(1), currentPage = _h[0], setCurrentPage = _h[1];
|
57
56
|
var parsedQueryPath = removeFirstSegment(CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA);
|
58
57
|
var queryDataValue = queryData === null || queryData === void 0 ? void 0 : queryData[parsedQueryPath];
|
59
58
|
var totalPage = Math.ceil((CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE === 'DATA' && queryDataValue
|
60
59
|
? queryDataValue === null || queryDataValue === void 0 ? void 0 : queryDataValue.length
|
61
60
|
: compositions.length - 1) / CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS);
|
62
|
-
var
|
61
|
+
var _j = (0, util_1.parseProperties)(props, device), style = _j.style, hoverStyle = _j.hoverStyle, layout = _j.layout, effect = _j.effect, overlayStyle = _j.overlayStyle;
|
63
62
|
var contentPropCss = (0, contentsListUtils_1.parseGridContentProp)({
|
64
63
|
props: CB_CONTENT_PROP_CONTENTSLIST
|
65
64
|
}).contentPropCss;
|
66
|
-
var
|
65
|
+
var _k = (0, contentsListUtils_1.parseGridStyleProp)({
|
67
66
|
props: CB_STYLE_PROP_CONTENTSLIST,
|
68
67
|
device: device
|
69
|
-
}), stylePropCss =
|
70
|
-
var
|
68
|
+
}), stylePropCss = _k.stylePropCss, hoverStylePropCss = _k.hoverStylePropCss;
|
69
|
+
var _l = (0, contentsListUtils_1.parsePaginationStyleProp)({
|
71
70
|
props: CB_STYLE_PROP_CONTENTSLIST,
|
72
71
|
device: device
|
73
|
-
}), paginationNormalStyle =
|
72
|
+
}), paginationNormalStyle = _l.normalStyle, paginationHoverStyle = _l.hoverStyle;
|
74
73
|
// NOTE: edit모드에서는 그리드의 이벤트만 작동하도록 CB의 포인터 이벤트는 막습니다.
|
75
74
|
var editModeStyle = mode === 'EDIT' ? { pointerEvents: 'none' } : {};
|
76
75
|
var cbRef = (0, react_1.useRef)(null);
|
@@ -120,9 +119,9 @@ function ContentsList(props) {
|
|
120
119
|
var components = [
|
121
120
|
createPagination(paginationNormalStyle, paginationHoverStyle, isHovered)
|
122
121
|
].filter(function (component) { return component !== undefined; });
|
123
|
-
var
|
122
|
+
var _m = (0, useFlexGridLayout_1.useFlexGridLayout)({ components: components }), layoutRef = _m.layoutRef, positionRefs = _m.positionRefs,
|
124
123
|
// ccbInset,
|
125
|
-
componentGroups =
|
124
|
+
componentGroups = _m.componentGroups, getPositionStyle = _m.getPositionStyle, getComponentGroupLayout = _m.getComponentGroupLayout;
|
126
125
|
var ccbInset = {
|
127
126
|
top: '0px',
|
128
127
|
right: '0px',
|
@@ -141,6 +140,8 @@ function ContentsList(props) {
|
|
141
140
|
var isMobile = device === 'MOBILE';
|
142
141
|
var isBgMedia = getIsBgMedia(isMobile, CB_STYLE_PROP_BGMEDIA);
|
143
142
|
var mediaType = getMediaType(isMobile, CB_STYLE_PROP_BGMEDIA);
|
143
|
+
var queryLength = (_e = queryData === null || queryData === void 0 ? void 0 : queryData[CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA].length) !== null && _e !== void 0 ? _e : 0;
|
144
|
+
var displayedItemLength = Math.max(0, Math.min(endIndex, queryLength) - startIndex);
|
144
145
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [Object.entries(componentGroups).map(function (_a) {
|
145
146
|
var position = _a[0], groupComponents = _a[1];
|
146
147
|
return ((0, jsx_runtime_1.jsx)("div", __assign({ className: "cb-contentslist-button-group", ref: function (el) {
|
@@ -154,7 +155,7 @@ function ContentsList(props) {
|
|
154
155
|
}), (0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsx)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ id: "contentslist-box", className: "cb-layout-box ccb-layout-box", normalStyle: __assign(__assign(__assign(__assign(__assign({}, style), layout), effectCssProperties), editModeStyle), { overflow: 'hidden' }), hoverStyle: __assign(__assign({}, hoverStyle), { overflow: 'hidden' }), cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device, onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, "data-number-of-items": CB_CONTENT_PROP_CONTENTSLIST_SPEC_ITEMCOUNTS, "data-number-of-columns": CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS, "data-row-gap": rowGap, "data-column-gap": columnGap, "data-cols": CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS, "data-min-width": listMinWidth, "data-min-height": listMinHeight, "data-inset-top": parseFloat(ccbInset.top), "data-inset-bottom": parseFloat(ccbInset.bottom) }, { children: (0, jsx_runtime_1.jsxs)(S_ContentsListLayout, __assign({ className: "cb-contentslist-layout-box", ref: layoutRef }, { children: [(0, jsx_runtime_1.jsx)(S_CustomBackgroundWrapper, __assign({ ref: backgroundRef, style: __assign(__assign({}, effect), { background: style.background }) }, { children: isBgMedia && CB_STYLE_PROP_BGMEDIA && ((0, jsx_runtime_1.jsx)(CustomSectionBackgroundMedia_1.CustomSectionBackgroundMedia, { specs: CB_STYLE_PROP_BGMEDIA, componentStyle: style, playerId: index, mediaType: mediaType || 'NONE', device: isMobile ? 'MOBILE' : 'DESKTOP', backgroundRef: backgroundRef })) })), (0, jsx_runtime_1.jsxs)(S_ContentsListWrapper, __assign({ className: "cb-contentslist-wrapper", ccbInset: ccbInset, contentPropCss: contentPropCss, stylePropCss: isHovered ? hoverStylePropCss : stylePropCss }, { children: [(0, createCompositions_1.createCompositions)({
|
155
156
|
valueType: CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE,
|
156
157
|
queryPath: CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA,
|
157
|
-
limit:
|
158
|
+
limit: displayedItemLength,
|
158
159
|
queryData: queryData,
|
159
160
|
compositions: compositions
|
160
161
|
}).slice(startIndex, endIndex), (0, jsx_runtime_1.jsx)(S_Overlay, { style: overlayStyle })] }))] })) })) }))] }));
|