pds-dev-kit-web-test 2.5.353 → 2.5.355

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.
@@ -22,14 +22,24 @@ var Composition_1 = __importDefault(require("./Composition"));
22
22
  function createCompositions(_a) {
23
23
  var valueType = _a.valueType, queryPath = _a.queryPath, queryData = _a.queryData, compositions = _a.compositions;
24
24
  var isQueryDataConnected = valueType === 'DATA';
25
- if (!isQueryDataConnected || !queryPath || !queryData) {
26
- return compositions.map(function (composition) { return (0, jsx_runtime_1.jsx)(Composition_1.default, __assign({}, composition), composition.id); });
25
+ // 직접 입력 유형인 경우
26
+ if (!isQueryDataConnected) {
27
+ return compositions
28
+ .filter(function (composition) { return !composition.isDefault; })
29
+ .map(function (composition) { return (0, jsx_runtime_1.jsx)(Composition_1.default, __assign({}, composition), composition.id); });
30
+ }
31
+ // 데이터 연결 유형이나, 쿼리 데이터나 키가 없는 경우
32
+ if (!queryPath || !queryData) {
33
+ return compositions
34
+ .filter(function (composition) { return composition.isDefault; })
35
+ .map(function (composition) { return (0, jsx_runtime_1.jsx)(Composition_1.default, __assign({}, composition), composition.id); });
27
36
  }
28
37
  var parsedQueryPath = convertSlashToUnderscores(queryPath);
29
38
  var queryDataValue = queryData[parsedQueryPath];
30
39
  var queryComposition = compositions.find(function (composition) { return composition.isDefault; });
40
+ // 쿼리 데이터와 키가 있으나, 쿼리 데이터에 해당 키가 없는 경우
31
41
  if (!queryDataValue) {
32
- return [(0, jsx_runtime_1.jsxs)("div", { children: ["NOT FOUND QUERYDATA: ", parsedQueryPath] }, "not-found")];
42
+ return [(0, jsx_runtime_1.jsxs)("div", { children: ["NOT FOUND QUERYDATA OR DEFAULT: ", parsedQueryPath] }, "not-found")];
33
43
  }
34
44
  return queryDataValue.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)); });
35
45
  }
@@ -148,7 +148,9 @@ exports.sampleMockComposition1 = {
148
148
  CB_CONTENT_PROP_HOVER_SPEC_MUSE: true
149
149
  },
150
150
  CB_CONTENT_PROP_IMAGE: {
151
- CB_CONTENT_PROP_IMAGE_SPEC_SELECTOR: 'https://static.publ.site/pages-sample/img_cb_content_prop_image_spec_selector_01.png'
151
+ CB_CONTENT_PROP_IMAGE_SPEC_SELECTOR: 'https://static.publ.site/pages-sample/img_cb_content_prop_image_spec_selector_01.png',
152
+ CB_CONTENT_PROP_IMAGE_SPEC_VALUETYPE: 'DATA',
153
+ CB_CONTENT_PROP_IMAGE_SPEC_CONNECTDATA: 'itemThumbnail'
152
154
  },
153
155
  CB_CONTENT_PROP_VISIBILITY: {
154
156
  CB_CONTENT_PROP_VISIBILITY_SPEC_DESKTOP: true,
@@ -482,7 +484,9 @@ exports.sampleMockComposition2 = {
482
484
  CB_CONTENT_PROP_HOVER_SPEC_MUSE: true
483
485
  },
484
486
  CB_CONTENT_PROP_IMAGE: {
485
- CB_CONTENT_PROP_IMAGE_SPEC_SELECTOR: 'https://static.publ.site/pages-sample/img_cb_content_prop_image_spec_selector_01.png'
487
+ CB_CONTENT_PROP_IMAGE_SPEC_SELECTOR: 'https://static.publ.site/pages-sample/img_cb_content_prop_image_spec_selector_01.png',
488
+ CB_CONTENT_PROP_IMAGE_SPEC_VALUETYPE: 'VALUE',
489
+ CB_CONTENT_PROP_IMAGE_SPEC_CONNECTDATA: 'NONE'
486
490
  },
487
491
  CB_CONTENT_PROP_VISIBILITY: {
488
492
  CB_CONTENT_PROP_VISIBILITY_SPEC_DESKTOP: true,
@@ -93,7 +93,7 @@ exports.SAMPLE_SLIDEBANNER_CB = {
93
93
  'CB_STYLE_PROP_SLIDEBANNER_SPEC_INFINITESCROLL:MOBILE:HOVER': false
94
94
  },
95
95
  CB_CONTENT_PROP_SLIDEBANNER: {
96
- CB_CONTENT_PROP_SLIDEBANNER_SPEC_VALUETYPE: 'DATA',
96
+ CB_CONTENT_PROP_SLIDEBANNER_SPEC_VALUETYPE: 'VALUE',
97
97
  CB_CONTENT_PROP_SLIDEBANNER_SPEC_CONNECTDATA: 'C00007/PAPPQUERY_C00007_VOD_CLASS_TOTAL',
98
98
  CB_CONTENT_PROP_SLIDEBANNER_SPEC_DATASORTING: '최신순',
99
99
  CB_CONTENT_PROP_SLIDEBANNER_SPEC_OFFSET: 1,
@@ -30,7 +30,7 @@ var S_CB_BoxWithShadow_1 = require("../components/S_CB_BoxWithShadow");
30
30
  var CustomPagination_1 = require("./components/CustomPagination");
31
31
  var contentsListUtils_1 = require("./contentsListUtils");
32
32
  function ContentsList(props) {
33
- var _a = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _a.device, queryData = _a.queryData;
33
+ var _a = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _a.device, mode = _a.mode, queryData = _a.queryData;
34
34
  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;
35
35
  var 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;
36
36
  var _b = (0, react_1.useState)(false), isHovered = _b[0], setIsHovered = _b[1];
@@ -49,6 +49,8 @@ function ContentsList(props) {
49
49
  props: CB_STYLE_PROP_CONTENTSLIST,
50
50
  device: device
51
51
  }), paginationNormalStyle = _f.normalStyle, paginationHoverStyle = _f.hoverStyle;
52
+ // NOTE: edit모드에서는 그리드의 이벤트만 작동하도록 CB의 포인터 이벤트는 막습니다.
53
+ var editModeStyle = mode === 'EDIT' ? { pointerEvents: 'none' } : {};
52
54
  var cbRef = (0, react_1.useRef)(null);
53
55
  var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false }, [
54
56
  index
@@ -79,7 +81,7 @@ function ContentsList(props) {
79
81
  };
80
82
  var startIndex = (currentPage - 1) * itemCounts;
81
83
  var endIndex = startIndex + itemCounts;
82
- return ((0, jsx_runtime_1.jsxs)(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", normalStyle: __assign(__assign(__assign({}, style), layout), effectCssProperties), hoverStyle: hoverStyle, cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device, onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); } }, { children: (0, jsx_runtime_1.jsx)(S_ContentsListWrapper, __assign({ id: "contentslist-wrapper" }, { children: (0, jsx_runtime_1.jsx)(S_ContentsListGrid, __assign({ id: "contentslist-grid", contentPropCss: contentPropCss, stylePropCss: isHovered ? hoverStylePropCss : stylePropCss }, { children: (0, createCompositions_1.createCompositions)({
84
+ return ((0, jsx_runtime_1.jsxs)(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", normalStyle: __assign(__assign(__assign(__assign(__assign({}, style), layout), effectCssProperties), editModeStyle), { position: 'relative', overflow: 'hidden' }), hoverStyle: __assign(__assign({}, hoverStyle), { position: 'relative', overflow: 'hidden' }), cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device, onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); } }, { children: (0, jsx_runtime_1.jsx)(S_ContentsListWrapper, __assign({ id: "contentslist-wrapper" }, { children: (0, jsx_runtime_1.jsx)(S_ContentsListGrid, __assign({ id: "contentslist-grid", contentPropCss: contentPropCss, stylePropCss: isHovered ? hoverStylePropCss : stylePropCss }, { children: (0, createCompositions_1.createCompositions)({
83
85
  valueType: CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE,
84
86
  queryPath: CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA,
85
87
  queryData: queryData,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "2.5.353",
3
+ "version": "2.5.355",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",