pb-sxp-ui 1.0.68 → 1.0.70

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 +247 -121
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +1 -2
  4. package/dist/index.js +247 -121
  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 +250 -124
  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/DiyPortalPreview/VideoWidget.js +3 -2
  15. package/es/core/components/SxpPageCore/index.js +2 -2
  16. package/es/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +2 -1
  17. package/es/core/components/SxpPageRender/FingerSwipeTip/index.js +2 -2
  18. package/es/core/components/SxpPageRender/FormatImage.js +1 -2
  19. package/es/core/components/SxpPageRender/VideoWidget/index.js +1 -1
  20. package/es/core/components/SxpPageRender/index.d.ts +5 -0
  21. package/es/core/components/SxpPageRender/index.js +11 -11
  22. package/es/core/context/SxpDataSourceProvider.d.ts +0 -1
  23. package/es/core/context/SxpDataSourceProvider.js +3 -3
  24. package/es/materials/sxp/defaultSetting.d.ts +1 -4
  25. package/es/materials/sxp/defaultSetting.js +4 -5
  26. package/es/materials/sxp/popup/AppointForm/index.d.ts +2 -1
  27. package/es/materials/sxp/popup/AppointForm/index.js +3 -8
  28. package/es/materials/sxp/popup/AppointForm/settingRender.d.ts +29 -8
  29. package/es/materials/sxp/popup/AppointForm/settingRender.js +33 -2
  30. package/es/materials/sxp/popup/CommodityDetail/index.d.ts +1 -0
  31. package/es/materials/sxp/popup/CommodityDetail/index.js +7 -1
  32. package/es/materials/sxp/popup/CommodityDetail/material.js +5 -2
  33. package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +28 -0
  34. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +30 -0
  35. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +1 -0
  36. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +7 -1
  37. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +16 -0
  38. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +13 -0
  39. package/es/materials/sxp/popup/Prompt/index.d.ts +2 -1
  40. package/es/materials/sxp/popup/Prompt/index.js +2 -2
  41. package/es/materials/sxp/popup/Prompt/settingRender.d.ts +46 -11
  42. package/es/materials/sxp/popup/Prompt/settingRender.js +57 -14
  43. package/es/materials/sxp/template/Commodity/index.d.ts +1 -0
  44. package/es/materials/sxp/template/Commodity/index.js +8 -2
  45. package/es/materials/sxp/template/CommodityDiro/index.d.ts +1 -0
  46. package/es/materials/sxp/template/CommodityDiro/index.js +8 -2
  47. package/es/materials/sxp/template/CommodityDiroNew/index.d.ts +1 -0
  48. package/es/materials/sxp/template/CommodityDiroNew/index.js +8 -2
  49. package/es/materials/sxp/template/MultiCommodity/index.d.ts +1 -0
  50. package/es/materials/sxp/template/MultiCommodity/index.js +4 -2
  51. package/es/materials/sxp/template/MultiCommodityDiro/index.d.ts +1 -0
  52. package/es/materials/sxp/template/MultiCommodityDiro/index.js +4 -2
  53. package/es/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +1 -0
  54. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +4 -2
  55. package/es/materials/sxp/template/components/Img.d.ts +2 -1
  56. package/es/materials/sxp/template/components/Img.js +2 -2
  57. package/es/materials/sxp/template/components/settingRender.d.ts +50 -0
  58. package/es/materials/sxp/template/components/settingRender.js +8 -0
  59. package/lib/core/components/DiyPortalPreview/VideoWidget.js +3 -2
  60. package/lib/core/components/SxpPageCore/index.js +2 -2
  61. package/lib/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +2 -1
  62. package/lib/core/components/SxpPageRender/FingerSwipeTip/index.js +2 -2
  63. package/lib/core/components/SxpPageRender/FormatImage.js +0 -1
  64. package/lib/core/components/SxpPageRender/VideoWidget/index.js +1 -1
  65. package/lib/core/components/SxpPageRender/index.d.ts +5 -0
  66. package/lib/core/components/SxpPageRender/index.js +11 -11
  67. package/lib/core/context/SxpDataSourceProvider.d.ts +0 -1
  68. package/lib/core/context/SxpDataSourceProvider.js +3 -3
  69. package/lib/materials/sxp/defaultSetting.d.ts +1 -4
  70. package/lib/materials/sxp/defaultSetting.js +4 -5
  71. package/lib/materials/sxp/popup/AppointForm/index.d.ts +2 -1
  72. package/lib/materials/sxp/popup/AppointForm/index.js +3 -8
  73. package/lib/materials/sxp/popup/AppointForm/settingRender.d.ts +29 -8
  74. package/lib/materials/sxp/popup/AppointForm/settingRender.js +34 -2
  75. package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +1 -0
  76. package/lib/materials/sxp/popup/CommodityDetail/index.js +7 -1
  77. package/lib/materials/sxp/popup/CommodityDetail/material.js +5 -2
  78. package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +28 -0
  79. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +30 -0
  80. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +1 -0
  81. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +7 -1
  82. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +16 -0
  83. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +13 -0
  84. package/lib/materials/sxp/popup/Prompt/index.d.ts +2 -1
  85. package/lib/materials/sxp/popup/Prompt/index.js +2 -2
  86. package/lib/materials/sxp/popup/Prompt/settingRender.d.ts +46 -11
  87. package/lib/materials/sxp/popup/Prompt/settingRender.js +58 -14
  88. package/lib/materials/sxp/template/Commodity/index.d.ts +1 -0
  89. package/lib/materials/sxp/template/Commodity/index.js +8 -2
  90. package/lib/materials/sxp/template/CommodityDiro/index.d.ts +1 -0
  91. package/lib/materials/sxp/template/CommodityDiro/index.js +8 -2
  92. package/lib/materials/sxp/template/CommodityDiroNew/index.d.ts +1 -0
  93. package/lib/materials/sxp/template/CommodityDiroNew/index.js +8 -2
  94. package/lib/materials/sxp/template/MultiCommodity/index.d.ts +1 -0
  95. package/lib/materials/sxp/template/MultiCommodity/index.js +4 -2
  96. package/lib/materials/sxp/template/MultiCommodityDiro/index.d.ts +1 -0
  97. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +4 -2
  98. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +1 -0
  99. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +4 -2
  100. package/lib/materials/sxp/template/components/Img.d.ts +2 -1
  101. package/lib/materials/sxp/template/components/Img.js +2 -2
  102. package/lib/materials/sxp/template/components/settingRender.d.ts +50 -0
  103. package/lib/materials/sxp/template/components/settingRender.js +8 -0
  104. package/package.json +2 -3
@@ -17,7 +17,7 @@ var DataSourceType;
17
17
  DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
18
18
  })(DataSourceType || (DataSourceType = {}));
19
19
  const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
20
- const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, isShowTag = true }) => {
20
+ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false }) => {
21
21
  const [rtcList, setRtcList] = (0, react_1.useState)([]);
22
22
  const [tagList, setTagList] = (0, react_1.useState)([]);
23
23
  const [loading, setLoading] = (0, react_1.useState)(false);
@@ -159,7 +159,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
159
159
  }), [bffFetch]);
160
160
  const bffGetTagList = (0, react_1.useCallback)(() => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
161
161
  var _h, _j, _k, _l, _m;
162
- if (!utmVal || !isShowTag)
162
+ if (!utmVal)
163
163
  return;
164
164
  try {
165
165
  const val = (_k = (_j = (_h = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _h === void 0 ? void 0 : _h.filter((val) => {
@@ -172,7 +172,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
172
172
  catch (e) {
173
173
  console.log('e', e);
174
174
  }
175
- }), [bffFetch, utmVal, isShowTag]);
175
+ }), [bffFetch, utmVal]);
176
176
  const ctaEvent = (0, react_1.useCallback)((eventInfo, rec, product, position) => {
177
177
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
178
178
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
@@ -3,9 +3,6 @@ export declare const fontOptions: {
3
3
  value: string;
4
4
  }[];
5
5
  declare const _default: {
6
- fontOptions: {
7
- label: string;
8
- value: string;
9
- }[];
6
+ fontOptions: any[];
10
7
  };
11
8
  export default _default;
@@ -1,10 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.fontOptions = void 0;
4
- exports.fontOptions = [
5
- { label: '应用字体', value: 'appFont' },
6
- { label: '黑体', value: '黑体' }
7
- ];
4
+ exports.fontOptions = [{ label: '默认字体', 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) : [];
8
7
  exports.default = {
9
- fontOptions: exports.fontOptions
8
+ fontOptions: [...exports.fontOptions, ...data]
10
9
  };
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { CSSProperties } from 'react';
2
2
  import './index.less';
3
3
  export interface IAppointFormProps {
4
4
  columns?: any[];
@@ -14,6 +14,7 @@ export interface IAppointFormProps {
14
14
  layoutType?: 'horizontal' | 'vertical' | 'inline';
15
15
  isExternalLink?: boolean;
16
16
  isPopup?: boolean;
17
+ submitButtonStyle?: CSSProperties;
17
18
  onClick?: () => void;
18
19
  onClose?: () => void;
19
20
  }
@@ -3,13 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const css_1 = require("@emotion/css");
5
5
  const react_1 = tslib_1.__importStar(require("react"));
6
- const pro_components_1 = require("@ant-design/pro-components");
7
6
  const lodash_1 = require("lodash");
8
7
  const hooks_1 = require("../../../../core/hooks");
9
8
  require("./index.less");
10
9
  const useEventReport_1 = require("../../../../core/hooks/useEventReport");
11
10
  const AppointForm = (_a) => {
12
- var { columns, style, title, textStyle, submitBgColor, submitColor, submitText, layoutType, isExternalLink, isPopup, onClick, onClose } = _a, props = tslib_1.__rest(_a, ["columns", "style", "title", "textStyle", "submitBgColor", "submitColor", "submitText", "layoutType", "isExternalLink", "isPopup", "onClick", "onClose"]);
11
+ var { columns, style, title, textStyle, submitBgColor, submitColor, submitText, layoutType, isExternalLink, isPopup, onClick, onClose, submitButtonStyle } = _a, props = tslib_1.__rest(_a, ["columns", "style", "title", "textStyle", "submitBgColor", "submitColor", "submitText", "layoutType", "isExternalLink", "isPopup", "onClick", "onClose", "submitButtonStyle"]);
13
12
  const { submitForm, popupDetailData } = (0, hooks_1.useSxpDataSource)();
14
13
  const { jumpToWeb } = (0, useEventReport_1.useEventReport)();
15
14
  const formRef = (0, react_1.useRef)();
@@ -83,12 +82,8 @@ const AppointForm = (_a) => {
83
82
  return (react_1.default.createElement("div", { className: 'pb-appoint-form' },
84
83
  react_1.default.createElement("div", { className: `pb-appoint-form-title ${(0, css_1.css)(Object.assign({}, textStyle))}` }, title),
85
84
  react_1.default.createElement("div", Object.assign({ className: (0, css_1.css)(Object.assign({}, style)) }, props),
86
- react_1.default.createElement("div", { className: 'pb-appoint-form-container' },
87
- react_1.default.createElement(pro_components_1.BetaSchemaForm, { columns: columnsData, submitter: false, layout: layoutType, autoFocusFirstInput: false, size: 'large', formRef: formRef, className: 'panel-reset' }))),
85
+ react_1.default.createElement("div", { className: 'pb-appoint-form-container' })),
88
86
  react_1.default.createElement("div", { className: 'pb-appoint-form-btn-wrapper' },
89
- react_1.default.createElement("button", { onClick: handleSubmit, className: 'pb-appoint-form-btn', style: {
90
- color: submitColor,
91
- background: submitBgColor
92
- } }, loading ? react_1.default.createElement(react_1.default.Fragment, null, "loading...") : submitText))));
87
+ react_1.default.createElement("button", { onClick: handleSubmit, className: 'pb-appoint-form-btn', style: Object.assign({ color: submitColor, background: submitBgColor }, submitButtonStyle) }, loading ? react_1.default.createElement(react_1.default.Fragment, null, "loading...") : submitText))));
93
88
  };
94
89
  exports.default = (0, react_1.memo)(AppointForm);
@@ -51,16 +51,37 @@ declare const _default: ({
51
51
  })[];
52
52
  name: string[];
53
53
  child?: undefined;
54
- })[];
55
- type?: undefined;
56
- label?: undefined;
57
- name?: undefined;
58
- } | {
59
- title: string;
60
- child: {
54
+ } | {
55
+ type: string;
56
+ label: string;
57
+ child: ({
58
+ type: string;
59
+ name: string[];
60
+ initialValue: string;
61
+ options?: undefined;
62
+ addonAfter?: undefined;
63
+ } | {
64
+ type: string;
65
+ name: string[];
66
+ options: any[];
67
+ initialValue: any;
68
+ addonAfter?: undefined;
69
+ } | {
70
+ type: string;
71
+ name: string[];
72
+ addonAfter: string;
73
+ initialValue: number;
74
+ options?: undefined;
75
+ })[];
76
+ name?: undefined;
77
+ options?: undefined;
78
+ } | {
61
79
  type: string;
62
80
  name: string[];
63
- }[];
81
+ label?: undefined;
82
+ child?: undefined;
83
+ options?: undefined;
84
+ })[];
64
85
  type?: undefined;
65
86
  label?: undefined;
66
87
  name?: undefined;
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
- var _a;
2
+ var _a, _b, _c;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- const defaultSetting_1 = require("../../defaultSetting");
4
+ const tslib_1 = require("tslib");
5
+ const defaultSetting_1 = tslib_1.__importStar(require("../../defaultSetting"));
5
6
  exports.default = [
6
7
  {
7
8
  type: 'Text',
@@ -71,6 +72,37 @@ exports.default = [
71
72
  type: 'Text',
72
73
  name: ['props', 'submitText']
73
74
  },
75
+ {
76
+ type: 'Group',
77
+ label: '提交按钮字体',
78
+ child: [
79
+ {
80
+ type: 'Color',
81
+ name: ['props', 'submitButtonStyle', 'color'],
82
+ initialValue: '#fff'
83
+ },
84
+ {
85
+ type: 'Select',
86
+ name: ['props', 'submitButtonStyle', 'fontFamily'],
87
+ options: defaultSetting_1.default === null || defaultSetting_1.default === void 0 ? void 0 : defaultSetting_1.default.fontOptions,
88
+ initialValue: (_c = (_b = defaultSetting_1.default === null || defaultSetting_1.default === void 0 ? void 0 : defaultSetting_1.default.fontOptions) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.value
89
+ },
90
+ {
91
+ type: 'Number',
92
+ name: ['props', 'submitButtonStyle', 'fontSize'],
93
+ addonAfter: 'px',
94
+ initialValue: 12
95
+ }
96
+ ]
97
+ },
98
+ {
99
+ type: 'TextStyle',
100
+ name: ['props', 'submitButtonStyle']
101
+ },
102
+ {
103
+ type: 'TextAlign',
104
+ name: ['props', 'submitButtonStyle']
105
+ },
74
106
  {
75
107
  label: '提交文本颜色',
76
108
  type: 'Color',
@@ -20,6 +20,7 @@ export interface ICommodityDetailProps {
20
20
  swiper: {
21
21
  dotsAlign: 'left' | 'center';
22
22
  delay: number;
23
+ translateY?: number;
23
24
  };
24
25
  commodityStyles?: {
25
26
  title: CSSProperties;
@@ -95,7 +95,13 @@ const CommodityDetail = (_a) => {
95
95
  width,
96
96
  height: width
97
97
  } },
98
- react_1.default.createElement(FormatImage_1.default, { style: { height: '100%', width: '100%', objectFit: 'cover', display: 'block' }, src: src }))));
98
+ react_1.default.createElement(FormatImage_1.default, { style: {
99
+ height: '100%',
100
+ width: '100%',
101
+ objectFit: 'cover',
102
+ display: 'block',
103
+ transform: `translateY(${swiper === null || swiper === void 0 ? void 0 : swiper.translateY})%`
104
+ }, src: src }))));
99
105
  }))),
100
106
  !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (react_1.default.createElement("div", { className: (0, css_1.css)({
101
107
  position: 'relative',
@@ -22,7 +22,9 @@ const CommodityDetail = (0, create_1.createMaterial)(_1.default, {
22
22
  commodityStyles: {
23
23
  price: {
24
24
  color: '#000',
25
- fontSize: 18
25
+ fontSize: 18,
26
+ marginTop: 24,
27
+ marginBottom: 10
26
28
  },
27
29
  title: {
28
30
  color: '#000',
@@ -30,7 +32,8 @@ const CommodityDetail = (0, create_1.createMaterial)(_1.default, {
30
32
  },
31
33
  collection: {
32
34
  fontSize: 12,
33
- color: '#000'
35
+ color: '#000',
36
+ marginBottom: 14
34
37
  },
35
38
  info: {
36
39
  color: 'gray',
@@ -9,12 +9,28 @@ declare const _default: ({
9
9
  }[];
10
10
  name: string[];
11
11
  addonAfter?: undefined;
12
+ child?: undefined;
12
13
  } | {
13
14
  type: string;
14
15
  name: string[];
15
16
  addonAfter: string;
16
17
  label?: undefined;
17
18
  options?: undefined;
19
+ child?: undefined;
20
+ } | {
21
+ type: string;
22
+ child: {
23
+ label: string;
24
+ type: string;
25
+ name: string[];
26
+ min: number;
27
+ addonAfter: string;
28
+ initialValue: number;
29
+ }[];
30
+ label?: undefined;
31
+ options?: undefined;
32
+ name?: undefined;
33
+ addonAfter?: undefined;
18
34
  })[];
19
35
  } | {
20
36
  title: string;
@@ -31,6 +47,18 @@ declare const _default: ({
31
47
  name: string[];
32
48
  initialValue: string;
33
49
  child?: undefined;
50
+ } | {
51
+ type: string;
52
+ child: {
53
+ label: string;
54
+ type: string;
55
+ addonAfter: string;
56
+ name: string[];
57
+ }[];
58
+ label?: undefined;
59
+ options?: undefined;
60
+ name?: undefined;
61
+ initialValue?: undefined;
34
62
  } | {
35
63
  type: string;
36
64
  label: string;
@@ -25,6 +25,19 @@ exports.default = [
25
25
  type: 'Number',
26
26
  name: ['props', 'swiper', 'delay'],
27
27
  addonAfter: 's'
28
+ },
29
+ {
30
+ type: 'Group',
31
+ child: [
32
+ {
33
+ label: '居中垂直偏移',
34
+ type: 'Number',
35
+ name: ['props', 'swiper', 'translateY'],
36
+ min: -100,
37
+ addonAfter: '%',
38
+ initialValue: 0
39
+ }
40
+ ]
28
41
  }
29
42
  ]
30
43
  },
@@ -59,6 +72,23 @@ exports.default = [
59
72
  name: ['props', 'commodityStyles', 'field'],
60
73
  initialValue: 'title'
61
74
  },
75
+ {
76
+ type: 'Group',
77
+ child: [
78
+ {
79
+ label: '上边距',
80
+ type: 'Number',
81
+ addonAfter: 'px',
82
+ name: ['marginTop']
83
+ },
84
+ {
85
+ label: '下边距',
86
+ type: 'Number',
87
+ addonAfter: 'px',
88
+ name: ['marginBottom']
89
+ }
90
+ ]
91
+ },
62
92
  {
63
93
  type: 'Group',
64
94
  label: '标题字体',
@@ -20,6 +20,7 @@ export interface ICommodityDetailDiroNewProps {
20
20
  swiper: {
21
21
  dotsAlign: 'left' | 'center';
22
22
  delay: number;
23
+ translateY?: number;
23
24
  };
24
25
  commodityStyles?: {
25
26
  title: CSSProperties;
@@ -113,7 +113,13 @@ Made in Italy` })));
113
113
  width,
114
114
  height: width
115
115
  } },
116
- react_1.default.createElement(FormatImage_1.default, { style: { height: '100%', width: '100%', objectFit: 'cover', display: 'block' }, src: src }))));
116
+ react_1.default.createElement(FormatImage_1.default, { style: {
117
+ height: '100%',
118
+ width: '100%',
119
+ objectFit: 'cover',
120
+ display: 'block',
121
+ transform: `translateY(${swiper === null || swiper === void 0 ? void 0 : swiper.translateY})%`
122
+ }, src: src }))));
117
123
  }))),
118
124
  !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (react_1.default.createElement("div", { className: (0, css_1.css)({
119
125
  position: 'relative',
@@ -9,12 +9,28 @@ declare const _default: ({
9
9
  }[];
10
10
  name: string[];
11
11
  addonAfter?: undefined;
12
+ child?: undefined;
12
13
  } | {
13
14
  type: string;
14
15
  name: string[];
15
16
  addonAfter: string;
16
17
  label?: undefined;
17
18
  options?: undefined;
19
+ child?: undefined;
20
+ } | {
21
+ type: string;
22
+ child: {
23
+ label: string;
24
+ type: string;
25
+ name: string[];
26
+ min: number;
27
+ addonAfter: string;
28
+ initialValue: number;
29
+ }[];
30
+ label?: undefined;
31
+ options?: undefined;
32
+ name?: undefined;
33
+ addonAfter?: undefined;
18
34
  })[];
19
35
  } | {
20
36
  title: string;
@@ -25,6 +25,19 @@ exports.default = [
25
25
  type: 'Number',
26
26
  name: ['props', 'swiper', 'delay'],
27
27
  addonAfter: 's'
28
+ },
29
+ {
30
+ type: 'Group',
31
+ child: [
32
+ {
33
+ label: '居中垂直偏移',
34
+ type: 'Number',
35
+ name: ['props', 'swiper', 'translateY'],
36
+ min: -100,
37
+ addonAfter: '%',
38
+ initialValue: 0
39
+ }
40
+ ]
28
41
  }
29
42
  ]
30
43
  },
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { CSSProperties } from 'react';
2
2
  import './index.less';
3
3
  export interface IPromptProps {
4
4
  content?: string;
@@ -9,6 +9,7 @@ export interface IPromptProps {
9
9
  isPopup?: boolean;
10
10
  onClose?: () => void;
11
11
  onClick?: () => void;
12
+ submitButtonStyle?: CSSProperties;
12
13
  }
13
14
  declare const _default: React.NamedExoticComponent<IPromptProps>;
14
15
  export default _default;
@@ -9,7 +9,7 @@ require("./index.less");
9
9
  const hooks_1 = require("../../../../core/hooks");
10
10
  const useEventReport_1 = require("../../../../core/hooks/useEventReport");
11
11
  const Prompt = (_a) => {
12
- var { content, btnText, style, icon, isPopup, isExternalLink, onClose, onClick } = _a, props = tslib_1.__rest(_a, ["content", "btnText", "style", "icon", "isPopup", "isExternalLink", "onClose", "onClick"]);
12
+ var { content, btnText, style, icon, isPopup, isExternalLink, onClose, onClick, submitButtonStyle } = _a, props = tslib_1.__rest(_a, ["content", "btnText", "style", "icon", "isPopup", "isExternalLink", "onClose", "onClick", "submitButtonStyle"]);
13
13
  const { popupDetailData } = (0, hooks_1.useSxpDataSource)();
14
14
  const { jumpToWeb } = (0, useEventReport_1.useEventReport)();
15
15
  const iconSrc = typeof icon === 'string' ? icon : (0, materials_1.getMediaValueByMode)(icon);
@@ -31,6 +31,6 @@ const Prompt = (_a) => {
31
31
  react_1.default.createElement("div", { className: 'pb-prompt-icon' },
32
32
  react_1.default.createElement("img", { width: '100%', src: iconSrc !== null && iconSrc !== void 0 ? iconSrc : success_png_1.default })),
33
33
  react_1.default.createElement("div", { className: 'pb-prompt-content' }, content),
34
- react_1.default.createElement("button", { className: 'pb-prompt-btn', onClick: handleOk }, btnText)));
34
+ react_1.default.createElement("button", { className: 'pb-prompt-btn', style: submitButtonStyle, onClick: handleOk }, btnText)));
35
35
  };
36
36
  exports.default = (0, react_1.memo)(Prompt);
@@ -1,12 +1,47 @@
1
- declare const _default: ({
2
- type: string;
3
- label: string;
4
- name: string[];
5
- mediaType: string;
6
- } | {
7
- type: string;
8
- label: string;
9
- name: string[];
10
- mediaType?: undefined;
11
- })[];
1
+ declare const _default: {
2
+ title: string;
3
+ child: ({
4
+ type: string;
5
+ label: string;
6
+ name: string[];
7
+ mediaType: string;
8
+ child?: undefined;
9
+ } | {
10
+ type: string;
11
+ label: string;
12
+ name: string[];
13
+ mediaType?: undefined;
14
+ child?: undefined;
15
+ } | {
16
+ type: string;
17
+ label: string;
18
+ child: ({
19
+ type: string;
20
+ name: string[];
21
+ initialValue: string;
22
+ options?: undefined;
23
+ addonAfter?: undefined;
24
+ } | {
25
+ type: string;
26
+ name: string[];
27
+ options: any[];
28
+ initialValue: any;
29
+ addonAfter?: undefined;
30
+ } | {
31
+ type: string;
32
+ name: string[];
33
+ addonAfter: string;
34
+ initialValue: number;
35
+ options?: undefined;
36
+ })[];
37
+ name?: undefined;
38
+ mediaType?: undefined;
39
+ } | {
40
+ type: string;
41
+ name: string[];
42
+ label?: undefined;
43
+ mediaType?: undefined;
44
+ child?: undefined;
45
+ })[];
46
+ }[];
12
47
  export default _default;
@@ -1,20 +1,64 @@
1
1
  "use strict";
2
+ var _a, _b;
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
+ const tslib_1 = require("tslib");
5
+ const defaultSetting_1 = tslib_1.__importDefault(require("../../defaultSetting"));
3
6
  exports.default = [
4
7
  {
5
- type: 'Media',
6
- label: '图标',
7
- name: ['props', 'icon'],
8
- mediaType: 'Image'
9
- },
10
- {
11
- type: 'TextArea',
12
- label: '内容',
13
- name: ['props', 'content']
14
- },
15
- {
16
- type: 'Text',
17
- label: '按钮文案',
18
- name: ['props', 'btnText']
8
+ title: '',
9
+ child: [
10
+ {
11
+ type: 'Media',
12
+ label: '图标',
13
+ name: ['props', 'icon'],
14
+ mediaType: 'Image'
15
+ },
16
+ {
17
+ type: 'TextArea',
18
+ label: '内容',
19
+ name: ['props', 'content']
20
+ },
21
+ {
22
+ type: 'Text',
23
+ label: '按钮文案',
24
+ name: ['props', 'btnText']
25
+ },
26
+ {
27
+ type: 'Group',
28
+ label: '提交按钮字体',
29
+ child: [
30
+ {
31
+ type: 'Color',
32
+ name: ['props', 'submitButtonStyle', 'color'],
33
+ initialValue: '#fff'
34
+ },
35
+ {
36
+ type: 'Select',
37
+ name: ['props', 'submitButtonStyle', 'fontFamily'],
38
+ options: defaultSetting_1.default === null || defaultSetting_1.default === void 0 ? void 0 : defaultSetting_1.default.fontOptions,
39
+ initialValue: (_b = (_a = defaultSetting_1.default === null || defaultSetting_1.default === void 0 ? void 0 : defaultSetting_1.default.fontOptions) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.value
40
+ },
41
+ {
42
+ type: 'Number',
43
+ name: ['props', 'submitButtonStyle', 'fontSize'],
44
+ addonAfter: 'px',
45
+ initialValue: 12
46
+ }
47
+ ]
48
+ },
49
+ {
50
+ type: 'TextStyle',
51
+ name: ['props', 'submitButtonStyle']
52
+ },
53
+ {
54
+ type: 'TextAlign',
55
+ name: ['props', 'submitButtonStyle']
56
+ },
57
+ {
58
+ label: '提交按钮颜色',
59
+ type: 'Color',
60
+ name: ['props', 'submitButtonStyle', 'backgroundColor']
61
+ }
62
+ ]
19
63
  }
20
64
  ];
@@ -10,6 +10,7 @@ export interface ICommodityProps {
10
10
  ctaTempStyles?: ICtaTempStylesType;
11
11
  isExternalLink?: boolean;
12
12
  index?: number;
13
+ translateY?: number;
13
14
  }
14
15
  declare const _default: React.NamedExoticComponent<ICommodityProps>;
15
16
  export default _default;
@@ -9,13 +9,19 @@ const hooks_1 = require("../../../../core/hooks");
9
9
  const FormatImage_1 = tslib_1.__importDefault(require("../../../../core/components/SxpPageRender/FormatImage"));
10
10
  const Commodity = (_a) => {
11
11
  var _b, _c, _d, _e, _f, _g, _h;
12
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink"]);
12
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0 } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY"]);
13
13
  const { sxpParameter } = (0, hooks_1.useSxpDataSource)();
14
14
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
15
15
  const src = (_e = (_d = (_c = product === null || product === void 0 ? void 0 : product.homePage) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image;
16
16
  return (react_1.default.createElement(EventProvider_1.default, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: (0, css_1.css)(Object.assign({}, style)), style: { display: 'flex' } }, props),
17
17
  react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
18
- react_1.default.createElement(FormatImage_1.default, { className: (0, css_1.css)({ width: '100%', objectFit: 'cover', height: '100%', display: 'block' }), src: src })),
18
+ react_1.default.createElement(FormatImage_1.default, { className: (0, css_1.css)({
19
+ width: '100%',
20
+ objectFit: 'cover',
21
+ height: '100%',
22
+ display: 'block',
23
+ transform: `translateY(${translateY}%)`
24
+ }), src: src })),
19
25
  react_1.default.createElement("div", { className: (0, css_1.css)({
20
26
  color: '#fff',
21
27
  display: 'flex',
@@ -10,6 +10,7 @@ export interface ICommodityDiroProps {
10
10
  ctaTempStyles?: ICtaTempStylesType;
11
11
  isExternalLink?: boolean;
12
12
  index?: number;
13
+ translateY?: number;
13
14
  }
14
15
  declare const _default: React.NamedExoticComponent<ICommodityDiroProps>;
15
16
  export default _default;
@@ -9,13 +9,19 @@ const hooks_1 = require("../../../../core/hooks");
9
9
  const FormatImage_1 = tslib_1.__importDefault(require("../../../../core/components/SxpPageRender/FormatImage"));
10
10
  const CommodityDiro = (_a) => {
11
11
  var _b, _c, _d, _e, _f, _g, _h;
12
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink"]);
12
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0 } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY"]);
13
13
  const { sxpParameter } = (0, hooks_1.useSxpDataSource)();
14
14
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
15
15
  const src = (_e = (_d = (_c = product === null || product === void 0 ? void 0 : product.homePage) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image;
16
16
  return (react_1.default.createElement(EventProvider_1.default, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: (0, css_1.css)(Object.assign({}, style)), style: { display: 'flex' } }, props),
17
17
  react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
18
- react_1.default.createElement(FormatImage_1.default, { className: (0, css_1.css)({ width: '100%', objectFit: 'cover', height: '100%', display: 'block' }), src: src })),
18
+ react_1.default.createElement(FormatImage_1.default, { className: (0, css_1.css)({
19
+ width: '100%',
20
+ objectFit: 'cover',
21
+ height: '100%',
22
+ display: 'block',
23
+ transform: `translateY(${translateY}%)`
24
+ }), src: src })),
19
25
  react_1.default.createElement("div", { className: (0, css_1.css)({
20
26
  color: '#fff',
21
27
  display: 'flex',