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.
Files changed (104) hide show
  1. package/dist/index.cjs +408 -184
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +23 -20
  4. package/dist/index.js +409 -184
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.cjs +3 -3
  7. package/dist/index.min.cjs.map +1 -1
  8. package/dist/index.min.js +3 -3
  9. package/dist/index.min.js.map +1 -1
  10. package/dist/pb-ui.js +408 -184
  11. package/dist/pb-ui.js.map +1 -1
  12. package/dist/pb-ui.min.js +3 -3
  13. package/dist/pb-ui.min.js.map +1 -1
  14. package/es/core/components/SxpPageRender/ExpandableText.js +6 -3
  15. package/es/core/components/SxpPageRender/Hashtag/index.js +3 -1
  16. package/es/core/components/SxpPageRender/Navbar.js +4 -1
  17. package/es/core/components/SxpPageRender/Tagbar.d.ts +1 -0
  18. package/es/core/components/SxpPageRender/Tagbar.js +2 -2
  19. package/es/core/components/SxpPageRender/VideoWidget/index.d.ts +1 -0
  20. package/es/core/components/SxpPageRender/VideoWidget/index.js +3 -3
  21. package/es/core/components/SxpPageRender/WaterFall/List.js +21 -10
  22. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +24 -13
  23. package/es/core/components/SxpPageRender/index.d.ts +1 -0
  24. package/es/core/components/SxpPageRender/index.js +9 -3
  25. package/es/core/context/EditorDataProvider.d.ts +1 -0
  26. package/es/core/context/EditorDataProvider.js +2 -1
  27. package/es/core/utils/tool.d.ts +5 -0
  28. package/es/core/utils/tool.js +43 -0
  29. package/es/index.d.ts +0 -1
  30. package/es/index.js +0 -1
  31. package/es/materials/sxp/HashTag/settingRender.d.ts +19 -22
  32. package/es/materials/sxp/HashTag/settingRender.js +31 -13
  33. package/es/materials/sxp/popup/AppointForm/Form.d.ts +14 -0
  34. package/es/materials/sxp/popup/AppointForm/Form.js +8 -0
  35. package/es/materials/sxp/popup/AppointForm/index.js +25 -20
  36. package/es/materials/sxp/popup/AppointForm/settingRender.d.ts +9 -20
  37. package/es/materials/sxp/popup/AppointForm/settingRender.js +31 -13
  38. package/es/materials/sxp/popup/CommodityDetail/index.js +14 -4
  39. package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +19 -22
  40. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +31 -13
  41. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +17 -5
  42. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +19 -22
  43. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +31 -13
  44. package/es/materials/sxp/popup/Prompt/index.js +4 -1
  45. package/es/materials/sxp/popup/Prompt/settingRender.d.ts +10 -8
  46. package/es/materials/sxp/popup/Prompt/settingRender.js +16 -8
  47. package/es/materials/sxp/template/Appoint/index.js +4 -1
  48. package/es/materials/sxp/template/Commodity/index.js +7 -2
  49. package/es/materials/sxp/template/CommodityDiro/index.js +8 -3
  50. package/es/materials/sxp/template/CommodityDiroNew/index.js +7 -2
  51. package/es/materials/sxp/template/Link/index.js +4 -1
  52. package/es/materials/sxp/template/MultiCommodity/index.js +7 -2
  53. package/es/materials/sxp/template/MultiCommodityDiro/index.js +8 -3
  54. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +7 -2
  55. package/es/materials/sxp/template/components/settingRender.d.ts +16 -24
  56. package/es/materials/sxp/template/components/settingRender.js +30 -12
  57. package/lib/core/components/SxpPageRender/ExpandableText.js +6 -3
  58. package/lib/core/components/SxpPageRender/Hashtag/index.js +3 -1
  59. package/lib/core/components/SxpPageRender/Navbar.js +4 -1
  60. package/lib/core/components/SxpPageRender/Tagbar.d.ts +1 -0
  61. package/lib/core/components/SxpPageRender/Tagbar.js +2 -2
  62. package/lib/core/components/SxpPageRender/VideoWidget/index.d.ts +1 -0
  63. package/lib/core/components/SxpPageRender/VideoWidget/index.js +3 -3
  64. package/lib/core/components/SxpPageRender/WaterFall/List.js +21 -10
  65. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +24 -13
  66. package/lib/core/components/SxpPageRender/index.d.ts +1 -0
  67. package/lib/core/components/SxpPageRender/index.js +9 -3
  68. package/lib/core/context/EditorDataProvider.d.ts +1 -0
  69. package/lib/core/context/EditorDataProvider.js +2 -1
  70. package/lib/core/utils/tool.d.ts +5 -0
  71. package/lib/core/utils/tool.js +45 -1
  72. package/lib/index.d.ts +0 -1
  73. package/lib/index.js +1 -3
  74. package/lib/materials/sxp/HashTag/settingRender.d.ts +19 -22
  75. package/lib/materials/sxp/HashTag/settingRender.js +31 -13
  76. package/lib/materials/sxp/popup/AppointForm/Form.d.ts +14 -0
  77. package/lib/materials/sxp/popup/AppointForm/Form.js +11 -0
  78. package/lib/materials/sxp/popup/AppointForm/index.js +24 -19
  79. package/lib/materials/sxp/popup/AppointForm/settingRender.d.ts +9 -20
  80. package/lib/materials/sxp/popup/AppointForm/settingRender.js +31 -14
  81. package/lib/materials/sxp/popup/CommodityDetail/index.js +14 -4
  82. package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +19 -22
  83. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +31 -13
  84. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +17 -5
  85. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +19 -22
  86. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +31 -13
  87. package/lib/materials/sxp/popup/Prompt/index.js +4 -1
  88. package/lib/materials/sxp/popup/Prompt/settingRender.d.ts +10 -8
  89. package/lib/materials/sxp/popup/Prompt/settingRender.js +16 -9
  90. package/lib/materials/sxp/template/Appoint/index.js +4 -1
  91. package/lib/materials/sxp/template/Commodity/index.js +7 -2
  92. package/lib/materials/sxp/template/CommodityDiro/index.js +8 -3
  93. package/lib/materials/sxp/template/CommodityDiroNew/index.js +7 -2
  94. package/lib/materials/sxp/template/Link/index.js +4 -1
  95. package/lib/materials/sxp/template/MultiCommodity/index.js +7 -2
  96. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +8 -3
  97. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +7 -2
  98. package/lib/materials/sxp/template/components/settingRender.d.ts +16 -24
  99. package/lib/materials/sxp/template/components/settingRender.js +30 -12
  100. package/package.json +1 -1
  101. package/es/materials/sxp/defaultSetting.d.ts +0 -8
  102. package/es/materials/sxp/defaultSetting.js +0 -6
  103. package/lib/materials/sxp/defaultSetting.d.ts +0 -8
  104. 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 }, (_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Product Name'),
49
- react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', borderRadius: '25px', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_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'))))));
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 }, (_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Product Name'),
50
- 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)) }, (_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'))))));
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
- options?: undefined;
103
- initialValue?: undefined;
104
- addonAfter?: undefined;
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
- options?: undefined;
157
- initialValue?: undefined;
158
- addonAfter?: undefined;
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: 'Color',
123
- name: ['props', 'ctaTempStyles', 'title', 'color']
120
+ type: 'Select',
121
+ name: ['props', 'ctaTempStyles', 'title', 'fontFamily-cn'],
122
+ bottomText: '中文字体'
124
123
  },
125
124
  {
126
125
  type: 'Select',
127
- options: defaultSetting_1.fontOptions,
128
- name: ['props', 'ctaTempStyles', 'title', 'fontFamily'],
129
- initialValue: (_a = defaultSetting_1.fontOptions === null || defaultSetting_1.fontOptions === void 0 ? void 0 : defaultSetting_1.fontOptions[0]) === null || _a === void 0 ? void 0 : _a.value
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: 'Color',
202
- name: ['props', 'ctaTempStyles', 'ctaTitle', 'color']
209
+ type: 'Select',
210
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily-cn'],
211
+ bottomText: '中文字体'
203
212
  },
204
213
  {
205
214
  type: 'Select',
206
- options: defaultSetting_1.fontOptions,
207
- name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily'],
208
- initialValue: (_b = defaultSetting_1.fontOptions === null || defaultSetting_1.fontOptions === void 0 ? void 0 : defaultSetting_1.fontOptions[0]) === null || _b === void 0 ? void 0 : _b.value
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 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.0.99",
3
+ "version": "1.0.101",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -1,8 +0,0 @@
1
- export declare const fontOptions: {
2
- label: string;
3
- value: string;
4
- }[];
5
- declare const _default: {
6
- fontOptions: any[];
7
- };
8
- export default _default;
@@ -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,8 +0,0 @@
1
- export declare const fontOptions: {
2
- label: string;
3
- value: string;
4
- }[];
5
- declare const _default: {
6
- fontOptions: any[];
7
- };
8
- export default _default;
@@ -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
- };