pb-sxp-ui 1.4.4 → 1.5.1
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/index.cjs +171 -125
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +171 -125
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +171 -125
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/WaterFall/List.js +7 -15
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +7 -15
- package/es/core/components/SxpPageRender/index.d.ts +6 -0
- package/es/core/components/SxpPageRender/index.js +2 -0
- package/es/core/context/SxpDataSourceProvider.js +2 -0
- package/es/core/utils/materials.d.ts +7 -0
- package/es/core/utils/materials.js +54 -0
- package/es/materials/sxp/HashTag/settingRender.d.ts +5 -0
- package/es/materials/sxp/HashTag/settingRender.js +2 -1
- package/es/materials/sxp/cta/AniLink/interactionRender.d.ts +1 -0
- package/es/materials/sxp/cta/AniLink/interactionRender.js +2 -1
- package/es/materials/sxp/cta/AniLinkPopup/interactionRender.d.ts +1 -0
- package/es/materials/sxp/cta/AniLinkPopup/interactionRender.js +2 -1
- package/es/materials/sxp/popup/CommodityDetail/index.js +7 -15
- package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +7 -0
- package/es/materials/sxp/popup/CommodityDetail/settingRender.js +2 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +7 -15
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +6 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +2 -1
- package/es/materials/sxp/popup/CommodityList/index.js +9 -15
- package/es/materials/sxp/popup/CommodityList/settingRender.d.ts +5 -0
- package/es/materials/sxp/popup/CommodityList/settingRender.js +2 -1
- package/es/materials/sxp/template/Appoint/interactionRender.d.ts +1 -0
- package/es/materials/sxp/template/Appoint/interactionRender.js +2 -1
- package/es/materials/sxp/template/Commodity/interactionRender.d.ts +1 -0
- package/es/materials/sxp/template/Commodity/interactionRender.js +2 -1
- package/es/materials/sxp/template/CommodityDiro/interactionRender.d.ts +1 -0
- package/es/materials/sxp/template/CommodityDiro/interactionRender.js +2 -1
- package/es/materials/sxp/template/CommodityDiroNew/interactionRender.d.ts +1 -0
- package/es/materials/sxp/template/CommodityDiroNew/interactionRender.js +2 -1
- package/es/materials/sxp/template/Link/interactionRender.d.ts +1 -0
- package/es/materials/sxp/template/Link/interactionRender.js +2 -1
- package/es/materials/sxp/template/Link/material.js +1 -1
- package/es/materials/sxp/template/MultiCommodity/interactionRender.d.ts +1 -0
- package/es/materials/sxp/template/MultiCommodity/interactionRender.js +2 -1
- package/es/materials/sxp/template/MultiCommodityDiro/interactionRender.d.ts +1 -0
- package/es/materials/sxp/template/MultiCommodityDiro/interactionRender.js +2 -1
- package/es/materials/sxp/template/MultiCommodityDiroNew/interactionRender.d.ts +1 -0
- package/es/materials/sxp/template/MultiCommodityDiroNew/interactionRender.js +2 -1
- package/lib/core/components/SxpPageRender/WaterFall/List.js +7 -15
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +7 -15
- package/lib/core/components/SxpPageRender/index.d.ts +6 -0
- package/lib/core/components/SxpPageRender/index.js +2 -0
- package/lib/core/context/SxpDataSourceProvider.js +2 -0
- package/lib/core/utils/materials.d.ts +7 -0
- package/lib/core/utils/materials.js +56 -1
- package/lib/materials/sxp/HashTag/settingRender.d.ts +5 -0
- package/lib/materials/sxp/HashTag/settingRender.js +2 -1
- package/lib/materials/sxp/cta/AniLink/interactionRender.d.ts +1 -0
- package/lib/materials/sxp/cta/AniLink/interactionRender.js +2 -1
- package/lib/materials/sxp/cta/AniLinkPopup/interactionRender.d.ts +1 -0
- package/lib/materials/sxp/cta/AniLinkPopup/interactionRender.js +2 -1
- package/lib/materials/sxp/popup/CommodityDetail/index.js +7 -15
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +7 -0
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +2 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +7 -15
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +6 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +2 -1
- package/lib/materials/sxp/popup/CommodityList/index.js +9 -15
- package/lib/materials/sxp/popup/CommodityList/settingRender.d.ts +5 -0
- package/lib/materials/sxp/popup/CommodityList/settingRender.js +2 -1
- package/lib/materials/sxp/template/Appoint/interactionRender.d.ts +1 -0
- package/lib/materials/sxp/template/Appoint/interactionRender.js +2 -1
- package/lib/materials/sxp/template/Commodity/interactionRender.d.ts +1 -0
- package/lib/materials/sxp/template/Commodity/interactionRender.js +2 -1
- package/lib/materials/sxp/template/CommodityDiro/interactionRender.d.ts +1 -0
- package/lib/materials/sxp/template/CommodityDiro/interactionRender.js +2 -1
- package/lib/materials/sxp/template/CommodityDiroNew/interactionRender.d.ts +1 -0
- package/lib/materials/sxp/template/CommodityDiroNew/interactionRender.js +2 -1
- package/lib/materials/sxp/template/Link/interactionRender.d.ts +1 -0
- package/lib/materials/sxp/template/Link/interactionRender.js +2 -1
- package/lib/materials/sxp/template/Link/material.js +1 -1
- package/lib/materials/sxp/template/MultiCommodity/interactionRender.d.ts +1 -0
- package/lib/materials/sxp/template/MultiCommodity/interactionRender.js +2 -1
- package/lib/materials/sxp/template/MultiCommodityDiro/interactionRender.d.ts +1 -0
- package/lib/materials/sxp/template/MultiCommodityDiro/interactionRender.js +2 -1
- package/lib/materials/sxp/template/MultiCommodityDiroNew/interactionRender.d.ts +1 -0
- package/lib/materials/sxp/template/MultiCommodityDiroNew/interactionRender.js +2 -1
- package/package.json +1 -1
@@ -9,30 +9,24 @@ const useEventReport_1 = require("../../../../core/hooks/useEventReport");
|
|
9
9
|
const tool_1 = require("../../../../core/utils/tool");
|
10
10
|
const Img_1 = tslib_1.__importDefault(require("../../template/components/Img"));
|
11
11
|
const lodash_1 = require("lodash");
|
12
|
+
const materials_1 = require("../../../../core/utils/materials");
|
12
13
|
const CommodityList = (_a) => {
|
13
14
|
var _b, _c, _d;
|
14
15
|
var { style, isDefault, rec, viewTime, isPost, bottom_image, commodityStyles, buttonStyle, translateY = 0, commodityPicture, isExternalLink, onClick } = _a, props = tslib_1.__rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "commodityStyles", "buttonStyle", "translateY", "commodityPicture", "isExternalLink", "onClick"]);
|
15
|
-
const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent } = (0, hooks_1.useSxpDataSource)();
|
16
|
+
const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent, globalConfig } = (0, hooks_1.useSxpDataSource)();
|
16
17
|
const { jumpToWeb } = (0, useEventReport_1.useEventReport)();
|
17
18
|
const { popup } = (0, hooks_1.useEditor)();
|
18
19
|
const recData = isPost ? rec : popupDetailData;
|
19
20
|
const product = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [null, null, null, null];
|
20
21
|
const index = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
|
21
22
|
const priceText = (0, react_1.useCallback)((product) => {
|
22
|
-
var _a
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
: product === null || product === void 0 ? void 0 : product.price}`;
|
30
|
-
}
|
31
|
-
else {
|
32
|
-
const p = 7000;
|
33
|
-
return `$${isToLocStr ? p === null || p === void 0 ? void 0 : p.toLocaleString() : p}`;
|
34
|
-
}
|
35
|
-
}, [(_d = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _d === void 0 ? void 0 : _d.enableFormattedPrice]);
|
23
|
+
var _a;
|
24
|
+
return (0, materials_1.getPriceText)({
|
25
|
+
product,
|
26
|
+
enableFormattedPrice: (_a = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice,
|
27
|
+
globalConfig
|
28
|
+
});
|
29
|
+
}, [(_d = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _d === void 0 ? void 0 : _d.enableFormattedPrice, globalConfig]);
|
36
30
|
const handleClick = (0, lodash_1.throttle)((item, multiCheckIndex) => {
|
37
31
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
38
32
|
eventSubject: 'clickCta',
|
@@ -62,6 +62,7 @@ declare const _default: ({
|
|
62
62
|
name: string[];
|
63
63
|
initialValue: string;
|
64
64
|
child?: undefined;
|
65
|
+
belong?: undefined;
|
65
66
|
} | {
|
66
67
|
type: string;
|
67
68
|
label: string;
|
@@ -73,6 +74,7 @@ declare const _default: ({
|
|
73
74
|
options?: undefined;
|
74
75
|
name?: undefined;
|
75
76
|
initialValue?: undefined;
|
77
|
+
belong?: undefined;
|
76
78
|
} | {
|
77
79
|
type: string;
|
78
80
|
label: string;
|
@@ -88,6 +90,7 @@ declare const _default: ({
|
|
88
90
|
options?: undefined;
|
89
91
|
name?: undefined;
|
90
92
|
initialValue?: undefined;
|
93
|
+
belong?: undefined;
|
91
94
|
} | {
|
92
95
|
label: string;
|
93
96
|
type: string;
|
@@ -95,11 +98,13 @@ declare const _default: ({
|
|
95
98
|
name?: undefined;
|
96
99
|
initialValue?: undefined;
|
97
100
|
child?: undefined;
|
101
|
+
belong?: undefined;
|
98
102
|
} | {
|
99
103
|
label: string;
|
100
104
|
type: string;
|
101
105
|
name: string[];
|
102
106
|
initialValue: boolean;
|
107
|
+
belong: string;
|
103
108
|
options?: undefined;
|
104
109
|
child?: undefined;
|
105
110
|
})[];
|
@@ -9,7 +9,7 @@ const _1 = tslib_1.__importDefault(require("."));
|
|
9
9
|
const create_1 = require("../../../../core/create");
|
10
10
|
const interactionRender_1 = tslib_1.__importDefault(require("./interactionRender"));
|
11
11
|
const Link = (0, create_1.createMaterial)(_1.default, {
|
12
|
-
displayName: '
|
12
|
+
displayName: '普通CTA',
|
13
13
|
icon: '',
|
14
14
|
category: 'template',
|
15
15
|
type: 'Link',
|