pb-sxp-ui 1.0.99 → 1.0.101
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 +408 -184
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +23 -20
- package/dist/index.js +409 -184
- 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 +408 -184
- 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/ExpandableText.js +6 -3
- package/es/core/components/SxpPageRender/Hashtag/index.js +3 -1
- package/es/core/components/SxpPageRender/Navbar.js +4 -1
- package/es/core/components/SxpPageRender/Tagbar.d.ts +1 -0
- package/es/core/components/SxpPageRender/Tagbar.js +2 -2
- package/es/core/components/SxpPageRender/VideoWidget/index.d.ts +1 -0
- package/es/core/components/SxpPageRender/VideoWidget/index.js +3 -3
- package/es/core/components/SxpPageRender/WaterFall/List.js +21 -10
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +24 -13
- package/es/core/components/SxpPageRender/index.d.ts +1 -0
- package/es/core/components/SxpPageRender/index.js +9 -3
- package/es/core/context/EditorDataProvider.d.ts +1 -0
- package/es/core/context/EditorDataProvider.js +2 -1
- package/es/core/utils/tool.d.ts +5 -0
- package/es/core/utils/tool.js +43 -0
- package/es/index.d.ts +0 -1
- package/es/index.js +0 -1
- package/es/materials/sxp/HashTag/settingRender.d.ts +19 -22
- package/es/materials/sxp/HashTag/settingRender.js +31 -13
- package/es/materials/sxp/popup/AppointForm/Form.d.ts +14 -0
- package/es/materials/sxp/popup/AppointForm/Form.js +8 -0
- package/es/materials/sxp/popup/AppointForm/index.js +25 -20
- package/es/materials/sxp/popup/AppointForm/settingRender.d.ts +9 -20
- package/es/materials/sxp/popup/AppointForm/settingRender.js +31 -13
- package/es/materials/sxp/popup/CommodityDetail/index.js +14 -4
- package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +19 -22
- package/es/materials/sxp/popup/CommodityDetail/settingRender.js +31 -13
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +17 -5
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +19 -22
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +31 -13
- package/es/materials/sxp/popup/Prompt/index.js +4 -1
- package/es/materials/sxp/popup/Prompt/settingRender.d.ts +10 -8
- package/es/materials/sxp/popup/Prompt/settingRender.js +16 -8
- package/es/materials/sxp/template/Appoint/index.js +4 -1
- package/es/materials/sxp/template/Commodity/index.js +7 -2
- package/es/materials/sxp/template/CommodityDiro/index.js +8 -3
- package/es/materials/sxp/template/CommodityDiroNew/index.js +7 -2
- package/es/materials/sxp/template/Link/index.js +4 -1
- package/es/materials/sxp/template/MultiCommodity/index.js +7 -2
- package/es/materials/sxp/template/MultiCommodityDiro/index.js +8 -3
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +7 -2
- package/es/materials/sxp/template/components/settingRender.d.ts +16 -24
- package/es/materials/sxp/template/components/settingRender.js +30 -12
- package/lib/core/components/SxpPageRender/ExpandableText.js +6 -3
- package/lib/core/components/SxpPageRender/Hashtag/index.js +3 -1
- package/lib/core/components/SxpPageRender/Navbar.js +4 -1
- package/lib/core/components/SxpPageRender/Tagbar.d.ts +1 -0
- package/lib/core/components/SxpPageRender/Tagbar.js +2 -2
- package/lib/core/components/SxpPageRender/VideoWidget/index.d.ts +1 -0
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +3 -3
- package/lib/core/components/SxpPageRender/WaterFall/List.js +21 -10
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +24 -13
- package/lib/core/components/SxpPageRender/index.d.ts +1 -0
- package/lib/core/components/SxpPageRender/index.js +9 -3
- package/lib/core/context/EditorDataProvider.d.ts +1 -0
- package/lib/core/context/EditorDataProvider.js +2 -1
- package/lib/core/utils/tool.d.ts +5 -0
- package/lib/core/utils/tool.js +45 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.js +1 -3
- package/lib/materials/sxp/HashTag/settingRender.d.ts +19 -22
- package/lib/materials/sxp/HashTag/settingRender.js +31 -13
- package/lib/materials/sxp/popup/AppointForm/Form.d.ts +14 -0
- package/lib/materials/sxp/popup/AppointForm/Form.js +11 -0
- package/lib/materials/sxp/popup/AppointForm/index.js +24 -19
- package/lib/materials/sxp/popup/AppointForm/settingRender.d.ts +9 -20
- package/lib/materials/sxp/popup/AppointForm/settingRender.js +31 -14
- package/lib/materials/sxp/popup/CommodityDetail/index.js +14 -4
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +19 -22
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +31 -13
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +17 -5
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +19 -22
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +31 -13
- package/lib/materials/sxp/popup/Prompt/index.js +4 -1
- package/lib/materials/sxp/popup/Prompt/settingRender.d.ts +10 -8
- package/lib/materials/sxp/popup/Prompt/settingRender.js +16 -9
- package/lib/materials/sxp/template/Appoint/index.js +4 -1
- package/lib/materials/sxp/template/Commodity/index.js +7 -2
- package/lib/materials/sxp/template/CommodityDiro/index.js +8 -3
- package/lib/materials/sxp/template/CommodityDiroNew/index.js +7 -2
- package/lib/materials/sxp/template/Link/index.js +4 -1
- package/lib/materials/sxp/template/MultiCommodity/index.js +7 -2
- package/lib/materials/sxp/template/MultiCommodityDiro/index.js +8 -3
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +7 -2
- package/lib/materials/sxp/template/components/settingRender.d.ts +16 -24
- package/lib/materials/sxp/template/components/settingRender.js +30 -12
- package/package.json +1 -1
- package/es/materials/sxp/defaultSetting.d.ts +0 -8
- package/es/materials/sxp/defaultSetting.js +0 -6
- package/lib/materials/sxp/defaultSetting.d.ts +0 -8
- package/lib/materials/sxp/defaultSetting.js +0 -9
@@ -10,6 +10,7 @@ const Img_1 = tslib_1.__importDefault(require("../components/Img"));
|
|
10
10
|
const index_module_less_1 = tslib_1.__importDefault(require("./index.module.less"));
|
11
11
|
const hooks_1 = require("../../../../core/hooks");
|
12
12
|
const useEventReport_1 = require("../../../../core/hooks/useEventReport");
|
13
|
+
const tool_1 = require("../../../../core/utils/tool");
|
13
14
|
const MultiCommodityDiro = (_a) => {
|
14
15
|
var _b, _c;
|
15
16
|
var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink, index, translateY = 0 } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink", "index", "translateY"]);
|
@@ -34,7 +35,7 @@ const MultiCommodityDiro = (_a) => {
|
|
34
35
|
}
|
35
36
|
}, popup === null || popup === void 0 ? void 0 : popup.duration);
|
36
37
|
return (react_1.default.createElement(Scroll_1.default, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
|
37
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
38
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
38
39
|
return (react_1.default.createElement(react_1.default.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (react_1.default.createElement(react_2.SwiperSlide, Object.assign({ key: item === null || item === void 0 ? void 0 : item.itemId, className: (0, css_1.css)(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
|
39
40
|
react_1.default.createElement(Img_1.default, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
|
40
41
|
react_1.default.createElement("div", { className: (0, css_1.css)({
|
@@ -45,8 +46,12 @@ const MultiCommodityDiro = (_a) => {
|
|
45
46
|
width: '100%',
|
46
47
|
overflow: 'hidden'
|
47
48
|
}) },
|
48
|
-
react_1.default.createElement("div", { className: index_module_less_1.default['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title
|
49
|
-
|
49
|
+
react_1.default.createElement("div", { className: index_module_less_1.default['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
|
50
|
+
__html: (0, tool_1.setFontForText)((_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
|
51
|
+
} }),
|
52
|
+
react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ padding: '0 7px', textOverflow: 'ellipsis', overflow: 'hidden', borderRadius: '25px', whiteSpace: 'nowrap', lineHeight: ((_f = ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle) === null || _f === void 0 ? void 0 : _f.height) + 'px' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
|
53
|
+
__html: (0, tool_1.setFontForText)((_h = (_g = item === null || item === void 0 ? void 0 : item.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop Now', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
|
54
|
+
} }))))));
|
50
55
|
})));
|
51
56
|
};
|
52
57
|
exports.default = (0, react_1.memo)(MultiCommodityDiro);
|
@@ -10,6 +10,7 @@ const Img_1 = tslib_1.__importDefault(require("../components/Img"));
|
|
10
10
|
const index_module_less_1 = tslib_1.__importDefault(require("./index.module.less"));
|
11
11
|
const hooks_1 = require("../../../../core/hooks");
|
12
12
|
const useEventReport_1 = require("../../../../core/hooks/useEventReport");
|
13
|
+
const tool_1 = require("../../../../core/utils/tool");
|
13
14
|
const MultiCommodityDiroNew = (_a) => {
|
14
15
|
var _b, _c;
|
15
16
|
var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink, index, translateY = 0 } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink", "index", "translateY"]);
|
@@ -46,8 +47,12 @@ const MultiCommodityDiroNew = (_a) => {
|
|
46
47
|
overflow: 'hidden',
|
47
48
|
lineHeight: '20px'
|
48
49
|
}) },
|
49
|
-
react_1.default.createElement("div", { className: index_module_less_1.default['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title
|
50
|
-
|
50
|
+
react_1.default.createElement("div", { className: index_module_less_1.default['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
|
51
|
+
__html: (0, tool_1.setFontForText)((_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
|
52
|
+
} }),
|
53
|
+
react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
|
54
|
+
__html: (0, tool_1.setFontForText)((_g = (_f = item === null || item === void 0 ? void 0 : item.bindCta) === null || _f === void 0 ? void 0 : _f.enTitle) !== null && _g !== void 0 ? _g : 'Shop Now', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
|
55
|
+
} }))))));
|
51
56
|
})));
|
52
57
|
};
|
53
58
|
exports.default = (0, react_1.memo)(MultiCommodityDiroNew);
|
@@ -96,27 +96,23 @@ declare const _default: ({
|
|
96
96
|
child: ({
|
97
97
|
type: string;
|
98
98
|
label: string;
|
99
|
-
child:
|
99
|
+
child: {
|
100
100
|
type: string;
|
101
101
|
name: string[];
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
102
|
+
bottomText: string;
|
103
|
+
}[];
|
104
|
+
name?: undefined;
|
105
|
+
} | {
|
106
|
+
type: string;
|
107
|
+
label: string;
|
108
|
+
child: ({
|
106
109
|
type: string;
|
107
|
-
options: {
|
108
|
-
label: string;
|
109
|
-
value: string;
|
110
|
-
}[];
|
111
110
|
name: string[];
|
112
|
-
initialValue: string;
|
113
111
|
addonAfter?: undefined;
|
114
112
|
} | {
|
115
113
|
type: string;
|
116
114
|
addonAfter: string;
|
117
115
|
name: string[];
|
118
|
-
options?: undefined;
|
119
|
-
initialValue?: undefined;
|
120
116
|
})[];
|
121
117
|
name?: undefined;
|
122
118
|
} | {
|
@@ -150,27 +146,23 @@ declare const _default: ({
|
|
150
146
|
} | {
|
151
147
|
type: string;
|
152
148
|
label: string;
|
153
|
-
child:
|
149
|
+
child: {
|
154
150
|
type: string;
|
155
151
|
name: string[];
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
152
|
+
bottomText: string;
|
153
|
+
}[];
|
154
|
+
name?: undefined;
|
155
|
+
} | {
|
156
|
+
type: string;
|
157
|
+
label: string;
|
158
|
+
child: ({
|
160
159
|
type: string;
|
161
|
-
options: {
|
162
|
-
label: string;
|
163
|
-
value: string;
|
164
|
-
}[];
|
165
160
|
name: string[];
|
166
|
-
initialValue: string;
|
167
161
|
addonAfter?: undefined;
|
168
162
|
} | {
|
169
163
|
type: string;
|
170
164
|
addonAfter: string;
|
171
165
|
name: string[];
|
172
|
-
options?: undefined;
|
173
|
-
initialValue?: undefined;
|
174
166
|
})[];
|
175
167
|
name?: undefined;
|
176
168
|
})[];
|
@@ -1,7 +1,5 @@
|
|
1
1
|
"use strict";
|
2
|
-
var _a, _b;
|
3
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
const defaultSetting_1 = require("../../defaultSetting");
|
5
3
|
exports.default = [
|
6
4
|
{
|
7
5
|
title: '主题样式',
|
@@ -119,14 +117,24 @@ exports.default = [
|
|
119
117
|
label: '字体',
|
120
118
|
child: [
|
121
119
|
{
|
122
|
-
type: '
|
123
|
-
name: ['props', 'ctaTempStyles', 'title', '
|
120
|
+
type: 'Select',
|
121
|
+
name: ['props', 'ctaTempStyles', 'title', 'fontFamily-cn'],
|
122
|
+
bottomText: '中文字体'
|
124
123
|
},
|
125
124
|
{
|
126
125
|
type: 'Select',
|
127
|
-
|
128
|
-
|
129
|
-
|
126
|
+
name: ['props', 'ctaTempStyles', 'title', 'fontFamily-en'],
|
127
|
+
bottomText: '英文/其他字体'
|
128
|
+
}
|
129
|
+
]
|
130
|
+
},
|
131
|
+
{
|
132
|
+
type: 'Group',
|
133
|
+
label: '',
|
134
|
+
child: [
|
135
|
+
{
|
136
|
+
type: 'Color',
|
137
|
+
name: ['props', 'ctaTempStyles', 'title', 'color']
|
130
138
|
},
|
131
139
|
{
|
132
140
|
type: 'Number',
|
@@ -198,14 +206,24 @@ exports.default = [
|
|
198
206
|
label: '字体',
|
199
207
|
child: [
|
200
208
|
{
|
201
|
-
type: '
|
202
|
-
name: ['props', 'ctaTempStyles', 'ctaTitle', '
|
209
|
+
type: 'Select',
|
210
|
+
name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily-cn'],
|
211
|
+
bottomText: '中文字体'
|
203
212
|
},
|
204
213
|
{
|
205
214
|
type: 'Select',
|
206
|
-
|
207
|
-
|
208
|
-
|
215
|
+
name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily-en'],
|
216
|
+
bottomText: '英文/其他字体'
|
217
|
+
}
|
218
|
+
]
|
219
|
+
},
|
220
|
+
{
|
221
|
+
type: 'Group',
|
222
|
+
label: '',
|
223
|
+
child: [
|
224
|
+
{
|
225
|
+
type: 'Color',
|
226
|
+
name: ['props', 'ctaTempStyles', 'ctaTitle', 'color']
|
209
227
|
},
|
210
228
|
{
|
211
229
|
type: 'Number',
|
package/package.json
CHANGED
@@ -1,6 +0,0 @@
|
|
1
|
-
export const fontOptions = [{ label: 'defalut', value: 'appFont' }];
|
2
|
-
const sxpFonts = typeof window !== 'undefined' && (window === null || window === void 0 ? void 0 : window.localStorage.getItem('sxp_font_links'));
|
3
|
-
const data = sxpFonts && sxpFonts !== '' ? JSON.parse(sxpFonts) : [];
|
4
|
-
export default {
|
5
|
-
fontOptions: [...fontOptions, ...data]
|
6
|
-
};
|
@@ -1,9 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.fontOptions = void 0;
|
4
|
-
exports.fontOptions = [{ label: 'defalut', value: 'appFont' }];
|
5
|
-
const sxpFonts = typeof window !== 'undefined' && (window === null || window === void 0 ? void 0 : window.localStorage.getItem('sxp_font_links'));
|
6
|
-
const data = sxpFonts && sxpFonts !== '' ? JSON.parse(sxpFonts) : [];
|
7
|
-
exports.default = {
|
8
|
-
fontOptions: [...exports.fontOptions, ...data]
|
9
|
-
};
|