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
@@ -1,15 +1,16 @@
1
1
  import { __awaiter, __rest } from "tslib";
2
2
  import { css } from '@emotion/css';
3
- import React, { memo, useMemo, useRef, useState } from 'react';
3
+ import React, { memo, useCallback, useMemo, useState } from 'react';
4
4
  import { cloneDeep, debounce } from 'lodash';
5
5
  import { useSxpDataSource } from '../../../../core/hooks';
6
6
  import './index.less';
7
7
  import { useEventReport } from '../../../../core/hooks/useEventReport';
8
+ import { setFontForText } from '../../../../core/utils/tool';
9
+ import Form from './Form';
8
10
  const AppointForm = (_a) => {
9
- var { columns, style, title, textStyle, submitBgColor, submitColor, submitText, layoutType, isExternalLink, isPopup, onClick, onClose, submitButtonStyle } = _a, props = __rest(_a, ["columns", "style", "title", "textStyle", "submitBgColor", "submitColor", "submitText", "layoutType", "isExternalLink", "isPopup", "onClick", "onClose", "submitButtonStyle"]);
11
+ var { columns, style, title, textStyle, submitBgColor, submitColor, submitText, layoutType = 'inline', isExternalLink, isPopup, onClick, onClose, submitButtonStyle } = _a, props = __rest(_a, ["columns", "style", "title", "textStyle", "submitBgColor", "submitColor", "submitText", "layoutType", "isExternalLink", "isPopup", "onClick", "onClose", "submitButtonStyle"]);
10
12
  const { submitForm, popupDetailData } = useSxpDataSource();
11
13
  const { jumpToWeb } = useEventReport();
12
- const formRef = useRef();
13
14
  const [loading, setLoading] = useState(false);
14
15
  const defaultColumns = useMemo(() => [
15
16
  {
@@ -37,27 +38,26 @@ const AppointForm = (_a) => {
37
38
  key: '4'
38
39
  }
39
40
  ], []);
41
+ const [formData, setFormData] = useState({});
40
42
  const columnsData = useMemo(() => {
41
- if (layoutType === undefined) {
42
- const list = cloneDeep(columns) || defaultColumns;
43
- return list === null || list === void 0 ? void 0 : list.map((obj) => (Object.assign(Object.assign({}, obj), { title: undefined, fieldProps: { placeholder: obj === null || obj === void 0 ? void 0 : obj.title } })));
44
- }
45
- else {
46
- return cloneDeep(columns) || defaultColumns;
47
- }
48
- }, [layoutType, columns, defaultColumns]);
43
+ return cloneDeep(columns) || defaultColumns;
44
+ }, [columns, defaultColumns]);
45
+ const handleChange = useCallback((e) => {
46
+ const { name, value } = e.target;
47
+ setFormData(Object.assign(Object.assign({}, formData), { [name]: value }));
48
+ }, [formData]);
49
49
  const handleSubmit = debounce(() => __awaiter(void 0, void 0, void 0, function* () {
50
- var _b, _c, _d, _e, _f, _g;
51
- const vals = yield ((_b = formRef === null || formRef === void 0 ? void 0 : formRef.current) === null || _b === void 0 ? void 0 : _b.getFieldsValue());
50
+ var _b, _c, _d, _e, _f;
51
+ const vals = formData;
52
52
  if (!vals)
53
53
  return;
54
- const arr = (_d = (_c = Object.keys(vals)) === null || _c === void 0 ? void 0 : _c.map((key) => {
54
+ const arr = (_c = (_b = Object.keys(vals)) === null || _b === void 0 ? void 0 : _b.map((key) => {
55
55
  var _a;
56
56
  return ({
57
57
  name: key,
58
58
  value: (_a = vals[key]) !== null && _a !== void 0 ? _a : ''
59
59
  });
60
- })) === null || _d === void 0 ? void 0 : _d.filter((item) => item === null || item === void 0 ? void 0 : item.value);
60
+ })) === null || _c === void 0 ? void 0 : _c.filter((item) => item === null || item === void 0 ? void 0 : item.value);
61
61
  if (!arr || !(arr === null || arr === void 0 ? void 0 : arr.length))
62
62
  return;
63
63
  setLoading(true);
@@ -66,8 +66,8 @@ const AppointForm = (_a) => {
66
66
  if (res) {
67
67
  if (isExternalLink) {
68
68
  const data = popupDetailData;
69
- const product = (_e = data === null || data === void 0 ? void 0 : data.video) === null || _e === void 0 ? void 0 : _e.bindProduct;
70
- const cta = (_g = (_f = data === null || data === void 0 ? void 0 : data.video) === null || _f === void 0 ? void 0 : _f.bindProduct) === null || _g === void 0 ? void 0 : _g.bindCta;
69
+ const product = (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.bindProduct;
70
+ const cta = (_f = (_e = data === null || data === void 0 ? void 0 : data.video) === null || _e === void 0 ? void 0 : _e.bindProduct) === null || _f === void 0 ? void 0 : _f.bindCta;
71
71
  const position = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
72
72
  jumpToWeb(data, product, cta, position);
73
73
  }
@@ -78,10 +78,15 @@ const AppointForm = (_a) => {
78
78
  }
79
79
  }), 1000);
80
80
  return (React.createElement("div", { className: 'pb-appoint-form' },
81
- React.createElement("div", { className: `pb-appoint-form-title ${css(Object.assign({}, textStyle))}` }, title),
81
+ React.createElement("div", { className: `pb-appoint-form-title ${css(Object.assign({}, textStyle))}`, dangerouslySetInnerHTML: {
82
+ __html: setFontForText(title, textStyle)
83
+ } }),
82
84
  React.createElement("div", Object.assign({ className: css(Object.assign({}, style)) }, props),
83
- React.createElement("div", { className: 'pb-appoint-form-container' })),
85
+ React.createElement("div", { className: 'pb-appoint-form-container' },
86
+ React.createElement(Form, { columns: columnsData, layout: layoutType, onChange: handleChange }))),
84
87
  React.createElement("div", { className: 'pb-appoint-form-btn-wrapper' },
85
- React.createElement("button", { "aria-label": submitText, onClick: handleSubmit, className: 'pb-appoint-form-btn', style: Object.assign({ color: submitColor, background: submitBgColor }, submitButtonStyle) }, loading ? React.createElement(React.Fragment, null, "loading...") : submitText))));
88
+ React.createElement("button", { "aria-label": submitText, onClick: handleSubmit, className: 'pb-appoint-form-btn', style: Object.assign({ color: submitColor, background: submitBgColor }, submitButtonStyle), dangerouslySetInnerHTML: {
89
+ __html: setFontForText(loading ? 'loading...' : submitText, submitButtonStyle)
90
+ } }))));
86
91
  };
87
92
  export default memo(AppointForm);
@@ -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,10 @@ 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 },
85
+ React.createElement("span", { dangerouslySetInnerHTML: {
86
+ __html: setFontForText((_b = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _b !== void 0 ? _b : 'Purchase on Website', buttonStyle)
87
+ } })))));
78
88
  };
79
89
  const getStyle = useCallback((style) => {
80
90
  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,23 @@ 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 },
160
+ React.createElement("span", { dangerouslySetInnerHTML: {
161
+ __html: setFontForText((_p = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _p !== void 0 ? _p : 'Shop now', buttonStyle)
162
+ } }))),
151
163
  productInfoText({ isPost }))),
152
164
  React.createElement(Modal, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false }))));
153
165
  };
@@ -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;