pds-dev-kit-web-test 2.7.572 → 2.7.574
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.
|
@@ -17,7 +17,7 @@ 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
|
-
|
|
20
|
+
require("../dynamicLayoutContext");
|
|
21
21
|
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, limit = _a.limit, componentBlockCode = _a.componentBlockCode, device = _a.device, navigationHandler = _a.navigationHandler, mode = _a.mode;
|
|
@@ -25,20 +25,12 @@ function createCompositions(_a) {
|
|
|
25
25
|
// 직접 입력 유형인 경우
|
|
26
26
|
if (!isQueryDataConnected) {
|
|
27
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)(
|
|
29
|
-
mode: mode,
|
|
30
|
-
device: device,
|
|
31
|
-
navigationHandler: navigationHandler
|
|
32
|
-
} }, { children: (0, jsx_runtime_1.jsx)(Composition_1.default, __assign({}, composition, { ccbCode: componentBlockCode }), composition.id) }), composition.id)); });
|
|
28
|
+
return valueTypeCompositions.map(function (composition) { return ((0, jsx_runtime_1.jsx)(Composition_1.default, __assign({}, composition, { ccbCode: componentBlockCode }), composition.id)); });
|
|
33
29
|
}
|
|
34
30
|
var queryDataValue = queryData === null || queryData === void 0 ? void 0 : queryData[queryPath];
|
|
35
31
|
var queryComposition = compositions.find(function (composition) { return !composition.ccbManualItemUuid; });
|
|
36
32
|
if (!queryDataValue)
|
|
37
33
|
return [(0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {})];
|
|
38
|
-
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)(
|
|
39
|
-
mode: mode,
|
|
40
|
-
device: device,
|
|
41
|
-
navigationHandler: navigationHandler
|
|
42
|
-
} }, { children: (0, jsx_runtime_1.jsx)(Composition_1.default, __assign({}, queryComposition, { ccbCode: componentBlockCode })) })) }), index)); });
|
|
34
|
+
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)); });
|
|
43
35
|
}
|
|
44
36
|
exports.createCompositions = createCompositions;
|
|
@@ -56,16 +56,29 @@ function VideoPlayer(props) {
|
|
|
56
56
|
: CB_EFFECT_PROP_ENTANIM['CB_EFFECT_PROP_ENTANIM_SPEC_TYPE:MOBILE'] === 'NONE';
|
|
57
57
|
var hasEffect = !isNoneEffectType;
|
|
58
58
|
var effectVisibleStyle = hasEffect ? { opacity: isVisible ? 1 : 0 } : {};
|
|
59
|
-
var CB_CONTENT_PROP_VIDEO_SPEC_SELECTOR = CB_CONTENT_PROP_VIDEO.CB_CONTENT_PROP_VIDEO_SPEC_SELECTOR, CB_CONTENT_PROP_VIDEO_SPEC_STARTTIME = CB_CONTENT_PROP_VIDEO.CB_CONTENT_PROP_VIDEO_SPEC_STARTTIME, CB_CONTENT_PROP_VIDEO_SPEC_THUMB = CB_CONTENT_PROP_VIDEO.CB_CONTENT_PROP_VIDEO_SPEC_THUMB, CB_CONTENT_PROP_VIDEO_SPEC_MAUTOPLAY = CB_CONTENT_PROP_VIDEO.CB_CONTENT_PROP_VIDEO_SPEC_MAUTOPLAY, CB_CONTENT_PROP_VIDEO_SPEC_AUTOPLAY = CB_CONTENT_PROP_VIDEO.CB_CONTENT_PROP_VIDEO_SPEC_AUTOPLAY, CB_CONTENT_PROP_VIDEO_SPEC_REPLAY = CB_CONTENT_PROP_VIDEO.CB_CONTENT_PROP_VIDEO_SPEC_REPLAY, CB_CONTENT_PROP_VIDEO_SPEC_ENDTIME = CB_CONTENT_PROP_VIDEO.CB_CONTENT_PROP_VIDEO_SPEC_ENDTIME;
|
|
59
|
+
var CB_CONTENT_PROP_VIDEO_SPEC_SELECTOR = CB_CONTENT_PROP_VIDEO.CB_CONTENT_PROP_VIDEO_SPEC_SELECTOR, CB_CONTENT_PROP_VIDEO_SPEC_STARTTIME = CB_CONTENT_PROP_VIDEO.CB_CONTENT_PROP_VIDEO_SPEC_STARTTIME, CB_CONTENT_PROP_VIDEO_SPEC_THUMB = CB_CONTENT_PROP_VIDEO.CB_CONTENT_PROP_VIDEO_SPEC_THUMB, CB_CONTENT_PROP_VIDEO_SPEC_MAUTOPLAY = CB_CONTENT_PROP_VIDEO.CB_CONTENT_PROP_VIDEO_SPEC_MAUTOPLAY, CB_CONTENT_PROP_VIDEO_SPEC_AUTOPLAY = CB_CONTENT_PROP_VIDEO.CB_CONTENT_PROP_VIDEO_SPEC_AUTOPLAY, CB_CONTENT_PROP_VIDEO_SPEC_REPLAY = CB_CONTENT_PROP_VIDEO.CB_CONTENT_PROP_VIDEO_SPEC_REPLAY, CB_CONTENT_PROP_VIDEO_SPEC_ENDTIME = CB_CONTENT_PROP_VIDEO.CB_CONTENT_PROP_VIDEO_SPEC_ENDTIME, CB_CONTENT_PROP_VIDEO_SPEC_VALUETYPE = CB_CONTENT_PROP_VIDEO.CB_CONTENT_PROP_VIDEO_SPEC_VALUETYPE, CB_CONTENT_PROP_VIDEO_SPEC_CONNECTDATA = CB_CONTENT_PROP_VIDEO.CB_CONTENT_PROP_VIDEO_SPEC_CONNECTDATA;
|
|
60
60
|
var shouldAutoplay = (CB_CONTENT_PROP_VIDEO_SPEC_AUTOPLAY && device === 'DESKTOP') ||
|
|
61
61
|
(CB_CONTENT_PROP_VIDEO_SPEC_MAUTOPLAY && device === 'MOBILE');
|
|
62
62
|
var videoRef = (0, react_1.useRef)(null);
|
|
63
63
|
var _e = (0, react_1.useState)(false), videoLoaded = _e[0], setVideoLoaded = _e[1];
|
|
64
|
+
var videoSrcValue = (function () {
|
|
65
|
+
if (CB_CONTENT_PROP_VIDEO_SPEC_VALUETYPE === 'DATA' ||
|
|
66
|
+
CB_CONTENT_PROP_VIDEO_SPEC_VALUETYPE === 'DELEGATEDDATA') {
|
|
67
|
+
if (!(queryContext === null || queryContext === void 0 ? void 0 : queryContext.queryData)) {
|
|
68
|
+
return '';
|
|
69
|
+
}
|
|
70
|
+
if (!Object.prototype.hasOwnProperty.call(queryContext.queryData, CB_CONTENT_PROP_VIDEO_SPEC_CONNECTDATA)) {
|
|
71
|
+
return '';
|
|
72
|
+
}
|
|
73
|
+
return queryContext.queryData[CB_CONTENT_PROP_VIDEO_SPEC_CONNECTDATA];
|
|
74
|
+
}
|
|
75
|
+
return CB_CONTENT_PROP_VIDEO_SPEC_SELECTOR;
|
|
76
|
+
})();
|
|
64
77
|
var _f = (0, react_1.useState)(function () {
|
|
65
|
-
return (0, helper_1.parseTargetUrl)(
|
|
78
|
+
return (0, helper_1.parseTargetUrl)(videoSrcValue).encodedURL;
|
|
66
79
|
}), videoURL = _f[0], setVideoURL = _f[1];
|
|
67
80
|
var onVideoError = function () {
|
|
68
|
-
var fallbackURL = (0, helper_1.parseTargetUrl)(
|
|
81
|
+
var fallbackURL = (0, helper_1.parseTargetUrl)(videoSrcValue).fallbackURL;
|
|
69
82
|
var isFallbackURL = fallbackURL === videoURL;
|
|
70
83
|
if (fallbackURL && !isFallbackURL) {
|
|
71
84
|
setVideoURL(fallbackURL);
|
|
@@ -116,8 +129,8 @@ function VideoPlayer(props) {
|
|
|
116
129
|
};
|
|
117
130
|
}, [videoLoaded, isEditMode, shouldAutoplay]);
|
|
118
131
|
(0, react_1.useEffect)(function () {
|
|
119
|
-
setVideoURL((0, helper_1.parseTargetUrl)(
|
|
120
|
-
}, [
|
|
132
|
+
setVideoURL((0, helper_1.parseTargetUrl)(videoSrcValue).encodedURL);
|
|
133
|
+
}, [videoSrcValue]);
|
|
121
134
|
var onTimeUpdate = function () {
|
|
122
135
|
var video = videoRef.current;
|
|
123
136
|
if (!video) {
|