pb-sxp-ui 1.4.3 → 1.5.0
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 +172 -130
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +172 -130
- 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 +172 -130
- 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 +47 -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 +9 -0
- package/es/materials/sxp/popup/CommodityDetail/settingRender.js +6 -3
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +7 -15
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +8 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +6 -3
- 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 +49 -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 +9 -0
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +6 -3
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +7 -15
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +8 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +6 -3
- 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
@@ -95,6 +95,7 @@ declare const _default: ({
|
|
95
95
|
name: string[];
|
96
96
|
initialValue: string;
|
97
97
|
child?: undefined;
|
98
|
+
belong?: undefined;
|
98
99
|
} | {
|
99
100
|
type: string;
|
100
101
|
label: string;
|
@@ -106,6 +107,7 @@ declare const _default: ({
|
|
106
107
|
options?: undefined;
|
107
108
|
name?: undefined;
|
108
109
|
initialValue?: undefined;
|
110
|
+
belong?: undefined;
|
109
111
|
} | {
|
110
112
|
type: string;
|
111
113
|
label: string;
|
@@ -121,6 +123,7 @@ declare const _default: ({
|
|
121
123
|
options?: undefined;
|
122
124
|
name?: undefined;
|
123
125
|
initialValue?: undefined;
|
126
|
+
belong?: undefined;
|
124
127
|
} | {
|
125
128
|
label: string;
|
126
129
|
type: string;
|
@@ -128,6 +131,7 @@ declare const _default: ({
|
|
128
131
|
name?: undefined;
|
129
132
|
initialValue?: undefined;
|
130
133
|
child?: undefined;
|
134
|
+
belong?: undefined;
|
131
135
|
} | {
|
132
136
|
label: string;
|
133
137
|
type: string;
|
@@ -135,11 +139,13 @@ declare const _default: ({
|
|
135
139
|
options?: undefined;
|
136
140
|
initialValue?: undefined;
|
137
141
|
child?: undefined;
|
142
|
+
belong?: undefined;
|
138
143
|
} | {
|
139
144
|
label: string;
|
140
145
|
type: string;
|
141
146
|
name: string[];
|
142
147
|
initialValue: boolean;
|
148
|
+
belong: string;
|
143
149
|
options?: undefined;
|
144
150
|
child?: undefined;
|
145
151
|
})[];
|
@@ -226,12 +232,14 @@ declare const _default: ({
|
|
226
232
|
label: string;
|
227
233
|
name: string[];
|
228
234
|
type: string;
|
235
|
+
initialValue: string;
|
229
236
|
addonAfter?: undefined;
|
230
237
|
} | {
|
231
238
|
label: string;
|
232
239
|
name: string[];
|
233
240
|
type: string;
|
234
241
|
addonAfter: string;
|
242
|
+
initialValue?: undefined;
|
235
243
|
})[];
|
236
244
|
})[];
|
237
245
|
export default _default;
|
@@ -202,7 +202,8 @@ exports.default = [
|
|
202
202
|
label: '价格千分符展示',
|
203
203
|
type: 'Switch',
|
204
204
|
name: ['enableFormattedPrice'],
|
205
|
-
initialValue: true
|
205
|
+
initialValue: true,
|
206
|
+
belong: 'price'
|
206
207
|
}
|
207
208
|
]
|
208
209
|
}
|
@@ -318,12 +319,14 @@ exports.default = [
|
|
318
319
|
{
|
319
320
|
label: '背景色',
|
320
321
|
name: ['props', 'swiper', 'dotsBgColor'],
|
321
|
-
type: 'Color'
|
322
|
+
type: 'Color',
|
323
|
+
initialValue: 'rgba(0,0,0,.2)'
|
322
324
|
},
|
323
325
|
{
|
324
326
|
label: '选中色',
|
325
327
|
name: ['props', 'swiper', 'dotsActiveColor'],
|
326
|
-
type: 'Color'
|
328
|
+
type: 'Color',
|
329
|
+
initialValue: 'rgba(0,0,0,1)'
|
327
330
|
},
|
328
331
|
{
|
329
332
|
label: '底边距',
|
@@ -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',
|