pb-sxp-ui 1.0.99 → 1.0.100

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 (100) hide show
  1. package/dist/index.cjs +393 -178
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +23 -20
  4. package/dist/index.js +394 -178
  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 +393 -178
  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 +3 -2
  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/VideoWidget/index.d.ts +1 -0
  18. package/es/core/components/SxpPageRender/VideoWidget/index.js +3 -3
  19. package/es/core/components/SxpPageRender/WaterFall/List.js +21 -10
  20. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +24 -13
  21. package/es/core/components/SxpPageRender/index.d.ts +1 -0
  22. package/es/core/components/SxpPageRender/index.js +2 -1
  23. package/es/core/context/EditorDataProvider.d.ts +1 -0
  24. package/es/core/context/EditorDataProvider.js +2 -1
  25. package/es/core/utils/tool.d.ts +5 -0
  26. package/es/core/utils/tool.js +43 -0
  27. package/es/index.d.ts +0 -1
  28. package/es/index.js +0 -1
  29. package/es/materials/sxp/HashTag/settingRender.d.ts +19 -22
  30. package/es/materials/sxp/HashTag/settingRender.js +31 -13
  31. package/es/materials/sxp/popup/AppointForm/Form.d.ts +14 -0
  32. package/es/materials/sxp/popup/AppointForm/Form.js +8 -0
  33. package/es/materials/sxp/popup/AppointForm/index.js +25 -20
  34. package/es/materials/sxp/popup/AppointForm/settingRender.d.ts +9 -20
  35. package/es/materials/sxp/popup/AppointForm/settingRender.js +31 -13
  36. package/es/materials/sxp/popup/CommodityDetail/index.js +13 -4
  37. package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +19 -22
  38. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +31 -13
  39. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +16 -5
  40. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +19 -22
  41. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +31 -13
  42. package/es/materials/sxp/popup/Prompt/index.js +4 -1
  43. package/es/materials/sxp/popup/Prompt/settingRender.d.ts +10 -8
  44. package/es/materials/sxp/popup/Prompt/settingRender.js +16 -8
  45. package/es/materials/sxp/template/Appoint/index.js +4 -1
  46. package/es/materials/sxp/template/Commodity/index.js +7 -2
  47. package/es/materials/sxp/template/CommodityDiro/index.js +8 -3
  48. package/es/materials/sxp/template/CommodityDiroNew/index.js +7 -2
  49. package/es/materials/sxp/template/Link/index.js +4 -1
  50. package/es/materials/sxp/template/MultiCommodity/index.js +7 -2
  51. package/es/materials/sxp/template/MultiCommodityDiro/index.js +8 -3
  52. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +7 -2
  53. package/es/materials/sxp/template/components/settingRender.d.ts +16 -24
  54. package/es/materials/sxp/template/components/settingRender.js +30 -12
  55. package/lib/core/components/SxpPageRender/ExpandableText.js +3 -2
  56. package/lib/core/components/SxpPageRender/Hashtag/index.js +3 -1
  57. package/lib/core/components/SxpPageRender/Navbar.js +4 -1
  58. package/lib/core/components/SxpPageRender/VideoWidget/index.d.ts +1 -0
  59. package/lib/core/components/SxpPageRender/VideoWidget/index.js +3 -3
  60. package/lib/core/components/SxpPageRender/WaterFall/List.js +21 -10
  61. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +24 -13
  62. package/lib/core/components/SxpPageRender/index.d.ts +1 -0
  63. package/lib/core/components/SxpPageRender/index.js +2 -1
  64. package/lib/core/context/EditorDataProvider.d.ts +1 -0
  65. package/lib/core/context/EditorDataProvider.js +2 -1
  66. package/lib/core/utils/tool.d.ts +5 -0
  67. package/lib/core/utils/tool.js +45 -1
  68. package/lib/index.d.ts +0 -1
  69. package/lib/index.js +1 -3
  70. package/lib/materials/sxp/HashTag/settingRender.d.ts +19 -22
  71. package/lib/materials/sxp/HashTag/settingRender.js +31 -13
  72. package/lib/materials/sxp/popup/AppointForm/Form.d.ts +14 -0
  73. package/lib/materials/sxp/popup/AppointForm/Form.js +11 -0
  74. package/lib/materials/sxp/popup/AppointForm/index.js +24 -19
  75. package/lib/materials/sxp/popup/AppointForm/settingRender.d.ts +9 -20
  76. package/lib/materials/sxp/popup/AppointForm/settingRender.js +31 -14
  77. package/lib/materials/sxp/popup/CommodityDetail/index.js +13 -4
  78. package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +19 -22
  79. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +31 -13
  80. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +16 -5
  81. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +19 -22
  82. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +31 -13
  83. package/lib/materials/sxp/popup/Prompt/index.js +4 -1
  84. package/lib/materials/sxp/popup/Prompt/settingRender.d.ts +10 -8
  85. package/lib/materials/sxp/popup/Prompt/settingRender.js +16 -9
  86. package/lib/materials/sxp/template/Appoint/index.js +4 -1
  87. package/lib/materials/sxp/template/Commodity/index.js +7 -2
  88. package/lib/materials/sxp/template/CommodityDiro/index.js +8 -3
  89. package/lib/materials/sxp/template/CommodityDiroNew/index.js +7 -2
  90. package/lib/materials/sxp/template/Link/index.js +4 -1
  91. package/lib/materials/sxp/template/MultiCommodity/index.js +7 -2
  92. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +8 -3
  93. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +7 -2
  94. package/lib/materials/sxp/template/components/settingRender.d.ts +16 -24
  95. package/lib/materials/sxp/template/components/settingRender.js +30 -12
  96. package/package.json +1 -1
  97. package/es/materials/sxp/defaultSetting.d.ts +0 -8
  98. package/es/materials/sxp/defaultSetting.js +0 -6
  99. package/lib/materials/sxp/defaultSetting.d.ts +0 -8
  100. package/lib/materials/sxp/defaultSetting.js +0 -9
@@ -15,27 +15,24 @@ declare const _default: ({
15
15
  } | {
16
16
  type: string;
17
17
  label: string;
18
- child: ({
18
+ child: {
19
19
  type: string;
20
20
  name: string[];
21
- options?: undefined;
22
- initialValue?: undefined;
23
- addonAfter?: undefined;
24
- } | {
21
+ bottomText: string;
22
+ }[];
23
+ name?: undefined;
24
+ options?: undefined;
25
+ } | {
26
+ type: string;
27
+ label: string;
28
+ child: ({
25
29
  type: string;
26
30
  name: string[];
27
- options: {
28
- label: string;
29
- value: string;
30
- }[];
31
- initialValue: string;
32
31
  addonAfter?: undefined;
33
32
  } | {
34
33
  type: string;
35
34
  name: string[];
36
35
  addonAfter: string;
37
- options?: undefined;
38
- initialValue?: undefined;
39
36
  })[];
40
37
  name?: undefined;
41
38
  options?: undefined;
@@ -58,20 +55,12 @@ declare const _default: ({
58
55
  type: string;
59
56
  name: string[];
60
57
  initialValue: string;
61
- options?: undefined;
62
- addonAfter?: undefined;
63
- } | {
64
- type: string;
65
- name: string[];
66
- options: any[];
67
- initialValue: any;
68
58
  addonAfter?: undefined;
69
59
  } | {
70
60
  type: string;
71
61
  name: string[];
72
62
  addonAfter: string;
73
63
  initialValue: number;
74
- options?: undefined;
75
64
  })[];
76
65
  name?: undefined;
77
66
  options?: undefined;
@@ -1,5 +1,3 @@
1
- var _a, _b, _c;
2
- import defaultSetting, { fontOptions } from '../../defaultSetting';
3
1
  export default [
4
2
  {
5
3
  type: 'Text',
@@ -19,14 +17,24 @@ export default [
19
17
  label: '标题字体',
20
18
  child: [
21
19
  {
22
- type: 'Color',
23
- name: ['textStyle', 'color']
20
+ type: 'Select',
21
+ name: ['testStyle', 'fontFamily-cn'],
22
+ bottomText: '中文字体'
24
23
  },
25
24
  {
26
25
  type: 'Select',
27
- name: ['textStyle', 'fontFamily'],
28
- options: fontOptions,
29
- initialValue: (_a = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a === void 0 ? void 0 : _a.value
26
+ name: ['testStyle', 'fontFamily-en'],
27
+ bottomText: '英文/其他字体'
28
+ }
29
+ ]
30
+ },
31
+ {
32
+ type: 'Group',
33
+ label: '',
34
+ child: [
35
+ {
36
+ type: 'Color',
37
+ name: ['textStyle', 'color']
30
38
  },
31
39
  {
32
40
  type: 'Number',
@@ -74,15 +82,25 @@ export default [
74
82
  label: '提交按钮字体',
75
83
  child: [
76
84
  {
77
- type: 'Color',
78
- name: ['props', 'submitButtonStyle', 'color'],
79
- initialValue: '#fff'
85
+ type: 'Select',
86
+ name: ['props', 'submitButtonStyle', 'fontFamily-cn'],
87
+ bottomText: '中文字体'
80
88
  },
81
89
  {
82
90
  type: 'Select',
83
- name: ['props', 'submitButtonStyle', 'fontFamily'],
84
- options: defaultSetting === null || defaultSetting === void 0 ? void 0 : defaultSetting.fontOptions,
85
- initialValue: (_c = (_b = defaultSetting === null || defaultSetting === void 0 ? void 0 : defaultSetting.fontOptions) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.value
91
+ name: ['props', 'submitButtonStyle', 'fontFamily-en'],
92
+ bottomText: '英文/其他字体'
93
+ }
94
+ ]
95
+ },
96
+ {
97
+ type: 'Group',
98
+ label: '',
99
+ child: [
100
+ {
101
+ type: 'Color',
102
+ name: ['props', 'submitButtonStyle', 'color'],
103
+ initialValue: '#fff'
86
104
  },
87
105
  {
88
106
  type: 'Number',
@@ -9,6 +9,7 @@ import { useEventReport } from '../../../../core/hooks/useEventReport';
9
9
  import Modal from '../../../../core/components/SxpPageRender/Modal';
10
10
  import ExpandableText from '../../../../core/components/SxpPageRender/ExpandableText';
11
11
  import FormatImage from '../../../../core/components/SxpPageRender/FormatImage';
12
+ import { setFontForText } from '../../../../core/utils/tool';
12
13
  const CommodityDetail = (_a) => {
13
14
  var _b, _c, _d, _e, _f, _g, _h, _j, _k;
14
15
  var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle", "index"]);
@@ -62,9 +63,15 @@ const CommodityDetail = (_a) => {
62
63
  const renderContent = ({ isPost }) => {
63
64
  var _a, _b, _c;
64
65
  return (React.createElement("div", null,
65
- React.createElement("div", { className: 'pb-commondity-content-collection', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection), hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === '') }, (_a = product === null || product === void 0 ? void 0 : product.collection) !== null && _a !== void 0 ? _a : 'Tiffany Lock'),
66
- React.createElement("div", { className: 'pb-commondity-content-title', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title), hidden: !!product && !(product === null || product === void 0 ? void 0 : product.title) }, (_b = product === null || product === void 0 ? void 0 : product.title) !== null && _b !== void 0 ? _b : 'Pendant in Yellow Gold with Diamonds, Medium'),
67
- React.createElement("div", { className: 'pb-commondity-content-price', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price), hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price) }, priceText),
66
+ React.createElement("div", { className: 'pb-commondity-content-collection', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection), hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === ''), dangerouslySetInnerHTML: {
67
+ __html: setFontForText((_a = product === null || product === void 0 ? void 0 : product.collection) !== null && _a !== void 0 ? _a : 'Tiffany Lock', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
68
+ } }),
69
+ React.createElement("div", { className: 'pb-commondity-content-title', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title), hidden: !!product && !(product === null || product === void 0 ? void 0 : product.title), dangerouslySetInnerHTML: {
70
+ __html: setFontForText((_b = product === null || product === void 0 ? void 0 : product.title) !== null && _b !== void 0 ? _b : 'Pendant in Yellow Gold with Diamonds, Medium', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
71
+ } }),
72
+ React.createElement("div", { className: 'pb-commondity-content-price', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price), hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price), dangerouslySetInnerHTML: {
73
+ __html: setFontForText(priceText, commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
74
+ } }),
68
75
  React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
69
76
  React.createElement(ExpandableText, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
70
77
  bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
@@ -74,7 +81,9 @@ const CommodityDetail = (_a) => {
74
81
  };
75
82
  const renderBtn = () => {
76
83
  var _a, _b;
77
- return (React.createElement(React.Fragment, null, (isDefault || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (_a = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _a !== void 0 ? _a : 'Purchase on Website', onClick: handleLink, className: 'pb-commondity-btn', style: buttonStyle }, (_b = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _b !== void 0 ? _b : 'Purchase on Website'))));
84
+ return (React.createElement(React.Fragment, null, (isDefault || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (_a = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _a !== void 0 ? _a : 'Purchase on Website', onClick: handleLink, className: 'pb-commondity-btn', style: buttonStyle, dangerouslySetInnerHTML: {
85
+ __html: setFontForText((_b = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _b !== void 0 ? _b : 'Purchase on Website', buttonStyle)
86
+ } }))));
78
87
  };
79
88
  const getStyle = useCallback((style) => {
80
89
  if (style === null || style === void 0 ? void 0 : style.lineClamp) {
@@ -62,27 +62,25 @@ declare const _default: ({
62
62
  } | {
63
63
  type: string;
64
64
  label: string;
65
- child: ({
65
+ child: {
66
66
  type: string;
67
67
  name: string[];
68
- options?: undefined;
69
- initialValue?: undefined;
70
- addonAfter?: undefined;
71
- } | {
68
+ bottomText: string;
69
+ }[];
70
+ options?: undefined;
71
+ name?: undefined;
72
+ initialValue?: undefined;
73
+ } | {
74
+ type: string;
75
+ label: string;
76
+ child: ({
72
77
  type: string;
73
- options: {
74
- label: string;
75
- value: string;
76
- }[];
77
78
  name: string[];
78
- initialValue: string;
79
79
  addonAfter?: undefined;
80
80
  } | {
81
81
  type: string;
82
82
  addonAfter: string;
83
83
  name: string[];
84
- options?: undefined;
85
- initialValue?: undefined;
86
84
  })[];
87
85
  options?: undefined;
88
86
  name?: undefined;
@@ -136,19 +134,19 @@ declare const _default: ({
136
134
  } | {
137
135
  type: string;
138
136
  label: string;
139
- child: ({
137
+ child: {
140
138
  type: string;
141
139
  name: string[];
142
- initialValue: string;
143
- options?: undefined;
144
- addonAfter?: undefined;
145
- } | {
140
+ bottomText: string;
141
+ }[];
142
+ name?: undefined;
143
+ initialValue?: undefined;
144
+ } | {
145
+ type: string;
146
+ label: string;
147
+ child: ({
146
148
  type: string;
147
149
  name: string[];
148
- options: {
149
- label: string;
150
- value: string;
151
- }[];
152
150
  initialValue: string;
153
151
  addonAfter?: undefined;
154
152
  } | {
@@ -156,7 +154,6 @@ declare const _default: ({
156
154
  name: string[];
157
155
  addonAfter: string;
158
156
  initialValue?: undefined;
159
- options?: undefined;
160
157
  })[];
161
158
  name?: undefined;
162
159
  initialValue?: undefined;
@@ -1,5 +1,3 @@
1
- var _a, _b;
2
- import { fontOptions } from '../../defaultSetting';
3
1
  export default [
4
2
  {
5
3
  title: '商品图片',
@@ -92,14 +90,24 @@ export default [
92
90
  label: '标题字体',
93
91
  child: [
94
92
  {
95
- type: 'Color',
96
- name: ['color']
93
+ type: 'Select',
94
+ name: ['fontFamily-cn'],
95
+ bottomText: '中文字体'
97
96
  },
98
97
  {
99
98
  type: 'Select',
100
- options: fontOptions,
101
- name: ['fontFamily'],
102
- initialValue: (_a = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a === void 0 ? void 0 : _a.value
99
+ name: ['fontFamily-en'],
100
+ bottomText: '英文/其他字体'
101
+ }
102
+ ]
103
+ },
104
+ {
105
+ type: 'Group',
106
+ label: '',
107
+ child: [
108
+ {
109
+ type: 'Color',
110
+ name: ['color']
103
111
  },
104
112
  {
105
113
  type: 'Number',
@@ -171,15 +179,25 @@ export default [
171
179
  label: '字体',
172
180
  child: [
173
181
  {
174
- type: 'Color',
175
- name: ['props', 'buttonStyle', 'color'],
176
- initialValue: '#fff'
182
+ type: 'Select',
183
+ name: ['props', 'buttonStyle', 'fontFamily-cn'],
184
+ bottomText: '中文字体'
177
185
  },
178
186
  {
179
187
  type: 'Select',
180
- name: ['props', 'buttonStyle', 'fontFamily'],
181
- options: fontOptions,
182
- initialValue: (_b = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _b === void 0 ? void 0 : _b.value
188
+ name: ['props', 'buttonStyle', 'fontFamily-en'],
189
+ bottomText: '英文/其他字体'
190
+ }
191
+ ]
192
+ },
193
+ {
194
+ type: 'Group',
195
+ label: '',
196
+ child: [
197
+ {
198
+ type: 'Color',
199
+ name: ['props', 'buttonStyle', 'color'],
200
+ initialValue: '#fff'
183
201
  },
184
202
  {
185
203
  type: 'Number',
@@ -9,6 +9,7 @@ import Modal from '../../../../core/components/SxpPageRender/Modal';
9
9
  import ExpandableText from '../../../../core/components/SxpPageRender/ExpandableText';
10
10
  import { useEventReport } from '../../../../core/hooks/useEventReport';
11
11
  import FormatImage from '../../../../core/components/SxpPageRender/FormatImage';
12
+ import { setFontForText } from '../../../../core/utils/tool';
12
13
  const CommodityDetailDiroNew = (_a) => {
13
14
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
14
15
  var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index"]);
@@ -142,12 +143,22 @@ Made in Italy` })));
142
143
  React.createElement("div", { className: 'pb-commondityDiroNew-content' },
143
144
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
144
145
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
145
- React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title) }, (_l = product === null || product === void 0 ? void 0 : product.title) !== null && _l !== void 0 ? _l : 'Large Dior Toujours BagLarge'),
146
- React.createElement("div", { className: 'pb-commondityDiroNew-content-collection', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === ''), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection) }, (product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage CalfskinLarge')),
146
+ React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title), dangerouslySetInnerHTML: {
147
+ __html: setFontForText((_l = product === null || product === void 0 ? void 0 : product.title) !== null && _l !== void 0 ? _l : 'Large Dior Toujours BagLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
148
+ } }),
149
+ React.createElement("div", { className: 'pb-commondityDiroNew-content-collection', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === ''), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection), dangerouslySetInnerHTML: {
150
+ __html: setFontForText((product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage CalfskinLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
151
+ } })),
147
152
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right' },
148
- React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) }, priceText),
149
- React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.taxInfo), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo) }, (_m = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _m !== void 0 ? _m : '税费'))),
150
- (!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (_o = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _o !== void 0 ? _o : 'Shop now', onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle }, (_p = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _p !== void 0 ? _p : 'Shop now')),
153
+ React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price), dangerouslySetInnerHTML: {
154
+ __html: setFontForText(priceText, commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
155
+ } }),
156
+ React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.taxInfo), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo), dangerouslySetInnerHTML: {
157
+ __html: setFontForText((_m = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _m !== void 0 ? _m : '税费', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo)
158
+ } }))),
159
+ (!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (_o = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _o !== void 0 ? _o : 'Shop now', onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle, dangerouslySetInnerHTML: {
160
+ __html: setFontForText((_p = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _p !== void 0 ? _p : 'Shop now', buttonStyle)
161
+ } })),
151
162
  productInfoText({ isPost }))),
152
163
  React.createElement(Modal, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false }))));
153
164
  };
@@ -50,27 +50,25 @@ declare const _default: ({
50
50
  } | {
51
51
  type: string;
52
52
  label: string;
53
- child: ({
53
+ child: {
54
54
  type: string;
55
55
  name: string[];
56
- options?: undefined;
57
- initialValue?: undefined;
58
- addonAfter?: undefined;
59
- } | {
56
+ bottomText: string;
57
+ }[];
58
+ options?: undefined;
59
+ name?: undefined;
60
+ initialValue?: undefined;
61
+ } | {
62
+ type: string;
63
+ label: string;
64
+ child: ({
60
65
  type: string;
61
- options: {
62
- label: string;
63
- value: string;
64
- }[];
65
66
  name: string[];
66
- initialValue: string;
67
67
  addonAfter?: undefined;
68
68
  } | {
69
69
  type: string;
70
70
  addonAfter: string;
71
71
  name: string[];
72
- options?: undefined;
73
- initialValue?: undefined;
74
72
  })[];
75
73
  options?: undefined;
76
74
  name?: undefined;
@@ -124,19 +122,19 @@ declare const _default: ({
124
122
  } | {
125
123
  type: string;
126
124
  label: string;
127
- child: ({
125
+ child: {
128
126
  type: string;
129
127
  name: string[];
130
- initialValue: string;
131
- options?: undefined;
132
- addonAfter?: undefined;
133
- } | {
128
+ bottomText: string;
129
+ }[];
130
+ name?: undefined;
131
+ initialValue?: undefined;
132
+ } | {
133
+ type: string;
134
+ label: string;
135
+ child: ({
134
136
  type: string;
135
137
  name: string[];
136
- options: {
137
- label: string;
138
- value: string;
139
- }[];
140
138
  initialValue: string;
141
139
  addonAfter?: undefined;
142
140
  } | {
@@ -144,7 +142,6 @@ declare const _default: ({
144
142
  name: string[];
145
143
  addonAfter: string;
146
144
  initialValue?: undefined;
147
- options?: undefined;
148
145
  })[];
149
146
  name?: undefined;
150
147
  initialValue?: undefined;
@@ -1,5 +1,3 @@
1
- var _a, _b;
2
- import { fontOptions } from '../../defaultSetting';
3
1
  export default [
4
2
  {
5
3
  title: '商品图片',
@@ -79,14 +77,24 @@ export default [
79
77
  label: '标题字体',
80
78
  child: [
81
79
  {
82
- type: 'Color',
83
- name: ['color']
80
+ type: 'Select',
81
+ name: ['fontFamily-cn'],
82
+ bottomText: '中文字体'
84
83
  },
85
84
  {
86
85
  type: 'Select',
87
- options: fontOptions,
88
- name: ['fontFamily'],
89
- initialValue: (_a = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a === void 0 ? void 0 : _a.value
86
+ name: ['fontFamily-en'],
87
+ bottomText: '英文/其他字体'
88
+ }
89
+ ]
90
+ },
91
+ {
92
+ type: 'Group',
93
+ label: '',
94
+ child: [
95
+ {
96
+ type: 'Color',
97
+ name: ['color']
90
98
  },
91
99
  {
92
100
  type: 'Number',
@@ -158,15 +166,25 @@ export default [
158
166
  label: '字体',
159
167
  child: [
160
168
  {
161
- type: 'Color',
162
- name: ['props', 'buttonStyle', 'color'],
163
- initialValue: '#fff'
169
+ type: 'Select',
170
+ name: ['props', 'buttonStyle', 'fontFamily-cn'],
171
+ bottomText: '中文字体'
164
172
  },
165
173
  {
166
174
  type: 'Select',
167
- name: ['props', 'buttonStyle', 'fontFamily'],
168
- options: fontOptions,
169
- initialValue: (_b = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _b === void 0 ? void 0 : _b.value
175
+ name: ['props', 'buttonStyle', 'fontFamily-en'],
176
+ bottomText: '英文/其他字体'
177
+ }
178
+ ]
179
+ },
180
+ {
181
+ type: 'Group',
182
+ label: '',
183
+ child: [
184
+ {
185
+ type: 'Color',
186
+ name: ['props', 'buttonStyle', 'color'],
187
+ initialValue: '#fff'
170
188
  },
171
189
  {
172
190
  type: 'Number',
@@ -6,6 +6,7 @@ import { getMediaValueByMode } from '../../../../core/utils/materials';
6
6
  import './index.less';
7
7
  import { useSxpDataSource } from '../../../../core/hooks';
8
8
  import { useEventReport } from '../../../../core/hooks/useEventReport';
9
+ import { setFontForText } from '../../../../core/utils/tool';
9
10
  const Prompt = (_a) => {
10
11
  var { content, btnText, style, icon, isPopup, isExternalLink, onClose, onClick, submitButtonStyle } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "isExternalLink", "onClose", "onClick", "submitButtonStyle"]);
11
12
  const { popupDetailData } = useSxpDataSource();
@@ -29,6 +30,8 @@ const Prompt = (_a) => {
29
30
  React.createElement("div", { className: 'pb-prompt-icon' },
30
31
  React.createElement("img", { width: '100%', src: iconSrc !== null && iconSrc !== void 0 ? iconSrc : success, alt: 'success image' })),
31
32
  React.createElement("div", { className: 'pb-prompt-content' }, content),
32
- React.createElement("button", { "aria-label": btnText, className: 'pb-prompt-btn', style: submitButtonStyle, onClick: handleOk }, btnText)));
33
+ React.createElement("button", { "aria-label": btnText, className: 'pb-prompt-btn', style: submitButtonStyle, onClick: handleOk, dangerouslySetInnerHTML: {
34
+ __html: setFontForText(btnText, submitButtonStyle)
35
+ } })));
33
36
  };
34
37
  export default memo(Prompt);
@@ -15,24 +15,26 @@ declare const _default: {
15
15
  } | {
16
16
  type: string;
17
17
  label: string;
18
- child: ({
18
+ child: {
19
19
  type: string;
20
20
  name: string[];
21
- initialValue: string;
22
- options?: undefined;
23
- addonAfter?: undefined;
24
- } | {
21
+ bottomText: string;
22
+ }[];
23
+ name?: undefined;
24
+ mediaType?: undefined;
25
+ } | {
26
+ type: string;
27
+ label: string;
28
+ child: ({
25
29
  type: string;
26
30
  name: string[];
27
- options: any[];
28
- initialValue: any;
31
+ initialValue: string;
29
32
  addonAfter?: undefined;
30
33
  } | {
31
34
  type: string;
32
35
  name: string[];
33
36
  addonAfter: string;
34
37
  initialValue: number;
35
- options?: undefined;
36
38
  })[];
37
39
  name?: undefined;
38
40
  mediaType?: undefined;
@@ -1,5 +1,3 @@
1
- var _a, _b;
2
- import defaultSetting from '../../defaultSetting';
3
1
  export default [
4
2
  {
5
3
  title: '',
@@ -25,15 +23,25 @@ export default [
25
23
  label: '提交按钮字体',
26
24
  child: [
27
25
  {
28
- type: 'Color',
29
- name: ['props', 'submitButtonStyle', 'color'],
30
- initialValue: '#fff'
26
+ type: 'Select',
27
+ name: ['props', 'submitButtonStyle', 'fontFamily-cn'],
28
+ bottomText: '中文字体'
31
29
  },
32
30
  {
33
31
  type: 'Select',
34
- name: ['props', 'submitButtonStyle', 'fontFamily'],
35
- options: defaultSetting === null || defaultSetting === void 0 ? void 0 : defaultSetting.fontOptions,
36
- initialValue: (_b = (_a = defaultSetting === null || defaultSetting === void 0 ? void 0 : defaultSetting.fontOptions) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.value
32
+ name: ['props', 'submitButtonStyle', 'fontFamily-en'],
33
+ bottomText: '英文/其他字体'
34
+ }
35
+ ]
36
+ },
37
+ {
38
+ type: 'Group',
39
+ label: '',
40
+ child: [
41
+ {
42
+ type: 'Color',
43
+ name: ['props', 'submitButtonStyle', 'color'],
44
+ initialValue: '#fff'
37
45
  },
38
46
  {
39
47
  type: 'Number',
@@ -4,6 +4,7 @@ import React, { memo } from 'react';
4
4
  import EventProvider from '../components/EventProvider';
5
5
  import { useSxpDataSource } from '../../../../core/hooks';
6
6
  import Img from '../components/Img';
7
+ import { setFontForText } from '../../../../core/utils/tool';
7
8
  const Appoint = (_a) => {
8
9
  var _b, _c, _d, _e, _f, _g;
9
10
  var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "index"]);
@@ -12,6 +13,8 @@ const Appoint = (_a) => {
12
13
  const src = (_d = (_c = cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image;
13
14
  return (React.createElement(EventProvider, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' }, index: index }, props),
14
15
  React.createElement(Img, { src: src, rec: recData, item: (_f = (_e = recData === null || recData === void 0 ? void 0 : recData.video) === null || _e === void 0 ? void 0 : _e.bindProduct) !== null && _f !== void 0 ? _f : recData === null || recData === void 0 ? void 0 : recData.video, index: index, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
15
- React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', textOverflow: 'ellipsis' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_g = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _g !== void 0 ? _g : 'Product Name')));
16
+ React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', textOverflow: 'ellipsis' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
17
+ __html: setFontForText((_g = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _g !== void 0 ? _g : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
18
+ } })));
16
19
  };
17
20
  export default memo(Appoint);
@@ -5,6 +5,7 @@ import EventProvider from '../components/EventProvider';
5
5
  import styles from './index.module.less';
6
6
  import { useSxpDataSource } from '../../../../core/hooks';
7
7
  import Img from '../components/Img';
8
+ import { setFontForText } from '../../../../core/utils/tool';
8
9
  const Commodity = (_a) => {
9
10
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
10
11
  var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY", "index"]);
@@ -21,7 +22,11 @@ const Commodity = (_a) => {
21
22
  width: '100%',
22
23
  overflow: 'hidden'
23
24
  }) },
24
- React.createElement("div", { className: styles['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_j = product === null || product === void 0 ? void 0 : product.title) !== null && _j !== void 0 ? _j : 'Product Name'),
25
- React.createElement("div", { className: css(Object.assign({ padding: '0 7px', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap', lineHeight: ((_k = ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle) === null || _k === void 0 ? void 0 : _k.height) + 'px' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_m = (_l = product === null || product === void 0 ? void 0 : product.bindCta) === null || _l === void 0 ? void 0 : _l.enTitle) !== null && _m !== void 0 ? _m : 'Shop Now'))));
25
+ React.createElement("div", { className: styles['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
26
+ __html: setFontForText((_j = product === null || product === void 0 ? void 0 : product.title) !== null && _j !== void 0 ? _j : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
27
+ } }),
28
+ React.createElement("div", { className: css(Object.assign({ padding: '0 7px', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap', lineHeight: ((_k = ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle) === null || _k === void 0 ? void 0 : _k.height) + 'px' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
29
+ __html: setFontForText((_m = (_l = product === null || product === void 0 ? void 0 : product.bindCta) === null || _l === void 0 ? void 0 : _l.enTitle) !== null && _m !== void 0 ? _m : 'Shop Now', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
30
+ } }))));
26
31
  };
27
32
  export default memo(Commodity);