pb-sxp-ui 1.1.2 → 1.2.0

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 (166) hide show
  1. package/dist/index.cjs +2260 -861
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +356 -175
  4. package/dist/index.js +2260 -861
  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 +2260 -861
  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/Pagebuilder/type.d.ts +1 -0
  15. package/es/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +0 -1
  16. package/es/core/components/SxpPageRender/FingerSwipeTip/index.js +3 -3
  17. package/es/core/components/SxpPageRender/Hashtag/index.js +1 -3
  18. package/es/core/components/SxpPageRender/Modal/index.d.ts +3 -0
  19. package/es/core/components/SxpPageRender/Modal/index.js +70 -6
  20. package/es/core/components/SxpPageRender/Navbar.js +1 -1
  21. package/es/core/components/SxpPageRender/Popup/index.js +1 -1
  22. package/es/core/components/SxpPageRender/RenderCard.d.ts +1 -0
  23. package/es/core/components/SxpPageRender/RenderCard.js +16 -12
  24. package/es/core/components/SxpPageRender/VideoWidget/index.js +10 -13
  25. package/es/core/components/SxpPageRender/WaterFall/List.js +1 -1
  26. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +1 -1
  27. package/es/core/components/SxpPageRender/index.d.ts +3 -3
  28. package/es/core/components/SxpPageRender/index.js +51 -17
  29. package/es/core/components/SxpPageRender/typing.d.ts +1 -0
  30. package/es/core/context/SxpDataSourceProvider.d.ts +1 -0
  31. package/es/core/context/SxpDataSourceProvider.js +6 -3
  32. package/es/core/utils/localStore.d.ts +3 -0
  33. package/es/core/utils/localStore.js +8 -0
  34. package/es/materials/sxp/HashTag/material.js +1 -2
  35. package/es/materials/sxp/cta/AniLink/index.d.ts +14 -0
  36. package/es/materials/sxp/cta/AniLink/index.js +58 -0
  37. package/es/materials/sxp/cta/AniLink/interactionRender.d.ts +42 -0
  38. package/es/materials/sxp/cta/AniLink/interactionRender.js +50 -0
  39. package/es/materials/sxp/cta/AniLink/material.d.ts +2 -0
  40. package/es/materials/sxp/cta/AniLink/material.js +38 -0
  41. package/es/materials/sxp/cta/AniLink/settingRender.d.ts +73 -0
  42. package/es/materials/sxp/cta/AniLink/settingRender.js +103 -0
  43. package/es/materials/sxp/cta/AniLinkPopup/index.d.ts +17 -0
  44. package/es/materials/sxp/cta/AniLinkPopup/index.js +65 -0
  45. package/es/materials/sxp/cta/AniLinkPopup/interactionRender.d.ts +42 -0
  46. package/es/materials/sxp/cta/AniLinkPopup/interactionRender.js +50 -0
  47. package/es/materials/sxp/cta/AniLinkPopup/material.d.ts +2 -0
  48. package/es/materials/sxp/cta/AniLinkPopup/material.js +52 -0
  49. package/es/materials/sxp/cta/AniLinkPopup/settingRender.d.ts +176 -0
  50. package/es/materials/sxp/cta/AniLinkPopup/settingRender.js +249 -0
  51. package/es/materials/sxp/cta/index.d.ts +2 -0
  52. package/es/materials/sxp/cta/index.js +2 -0
  53. package/es/materials/sxp/index.d.ts +1 -0
  54. package/es/materials/sxp/index.js +1 -0
  55. package/es/materials/sxp/popup/AppointForm/Form.js +1 -1
  56. package/es/materials/sxp/popup/CommodityDetail/index.d.ts +5 -0
  57. package/es/materials/sxp/popup/CommodityDetail/index.js +43 -26
  58. package/es/materials/sxp/popup/CommodityDetail/interactionRender.d.ts +9 -0
  59. package/es/materials/sxp/popup/CommodityDetail/interactionRender.js +12 -0
  60. package/es/materials/sxp/popup/CommodityDetail/material.js +3 -1
  61. package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +37 -0
  62. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +41 -0
  63. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +5 -0
  64. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +11 -25
  65. package/es/materials/sxp/popup/CommodityDetailDiroNew/interactionRender.d.ts +9 -0
  66. package/es/materials/sxp/popup/CommodityDetailDiroNew/interactionRender.js +12 -0
  67. package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +3 -1
  68. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +37 -0
  69. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +41 -0
  70. package/es/materials/sxp/popup/CommodityList/index.d.ts +28 -0
  71. package/es/materials/sxp/popup/CommodityList/index.js +56 -0
  72. package/es/materials/sxp/popup/CommodityList/interactionRender.d.ts +8 -0
  73. package/es/materials/sxp/popup/CommodityList/interactionRender.js +11 -0
  74. package/es/materials/sxp/popup/CommodityList/material.d.ts +2 -0
  75. package/es/materials/sxp/popup/CommodityList/material.js +51 -0
  76. package/es/materials/sxp/popup/CommodityList/settingRender.d.ts +151 -0
  77. package/es/materials/sxp/popup/CommodityList/settingRender.js +207 -0
  78. package/es/materials/sxp/popup/index.d.ts +1 -0
  79. package/es/materials/sxp/popup/index.js +1 -0
  80. package/es/materials/sxp/template/Link/index.js +2 -2
  81. package/es/materials/sxp/template/MultiCommodity/index.js +2 -2
  82. package/es/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
  83. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +5 -4
  84. package/es/materials/sxp/template/components/CommodityGroup.d.ts +14 -0
  85. package/es/materials/sxp/template/components/CommodityGroup.js +31 -0
  86. package/es/materials/sxp/template/components/Img.js +1 -1
  87. package/es/materials/sxp/template/components/Scroll.d.ts +2 -1
  88. package/es/materials/sxp/template/components/Scroll.js +10 -3
  89. package/es/materials/sxp/template/components/settingRender.js +0 -5
  90. package/lib/core/Pagebuilder/type.d.ts +1 -0
  91. package/lib/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +0 -1
  92. package/lib/core/components/SxpPageRender/FingerSwipeTip/index.js +3 -3
  93. package/lib/core/components/SxpPageRender/Hashtag/index.js +1 -3
  94. package/lib/core/components/SxpPageRender/Modal/index.d.ts +3 -0
  95. package/lib/core/components/SxpPageRender/Modal/index.js +70 -6
  96. package/lib/core/components/SxpPageRender/Navbar.js +1 -1
  97. package/lib/core/components/SxpPageRender/Popup/index.js +1 -1
  98. package/lib/core/components/SxpPageRender/RenderCard.d.ts +1 -0
  99. package/lib/core/components/SxpPageRender/RenderCard.js +16 -12
  100. package/lib/core/components/SxpPageRender/VideoWidget/index.js +10 -13
  101. package/lib/core/components/SxpPageRender/WaterFall/List.js +1 -1
  102. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +1 -1
  103. package/lib/core/components/SxpPageRender/index.d.ts +3 -3
  104. package/lib/core/components/SxpPageRender/index.js +50 -16
  105. package/lib/core/components/SxpPageRender/typing.d.ts +1 -0
  106. package/lib/core/context/SxpDataSourceProvider.d.ts +1 -0
  107. package/lib/core/context/SxpDataSourceProvider.js +6 -3
  108. package/lib/core/utils/localStore.d.ts +3 -0
  109. package/lib/core/utils/localStore.js +11 -1
  110. package/lib/materials/sxp/HashTag/material.js +1 -2
  111. package/lib/materials/sxp/cta/AniLink/index.d.ts +14 -0
  112. package/lib/materials/sxp/cta/AniLink/index.js +60 -0
  113. package/lib/materials/sxp/cta/AniLink/interactionRender.d.ts +42 -0
  114. package/lib/materials/sxp/cta/AniLink/interactionRender.js +52 -0
  115. package/lib/materials/sxp/cta/AniLink/material.d.ts +2 -0
  116. package/lib/materials/sxp/cta/AniLink/material.js +42 -0
  117. package/lib/materials/sxp/cta/AniLink/settingRender.d.ts +73 -0
  118. package/lib/materials/sxp/cta/AniLink/settingRender.js +105 -0
  119. package/lib/materials/sxp/cta/AniLinkPopup/index.d.ts +17 -0
  120. package/lib/materials/sxp/cta/AniLinkPopup/index.js +67 -0
  121. package/lib/materials/sxp/cta/AniLinkPopup/interactionRender.d.ts +42 -0
  122. package/lib/materials/sxp/cta/AniLinkPopup/interactionRender.js +52 -0
  123. package/lib/materials/sxp/cta/AniLinkPopup/material.d.ts +2 -0
  124. package/lib/materials/sxp/cta/AniLinkPopup/material.js +56 -0
  125. package/lib/materials/sxp/cta/AniLinkPopup/settingRender.d.ts +176 -0
  126. package/lib/materials/sxp/cta/AniLinkPopup/settingRender.js +251 -0
  127. package/lib/materials/sxp/cta/index.d.ts +2 -0
  128. package/lib/materials/sxp/cta/index.js +5 -0
  129. package/lib/materials/sxp/index.d.ts +1 -0
  130. package/lib/materials/sxp/index.js +1 -0
  131. package/lib/materials/sxp/popup/AppointForm/Form.js +1 -1
  132. package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +5 -0
  133. package/lib/materials/sxp/popup/CommodityDetail/index.js +43 -26
  134. package/lib/materials/sxp/popup/CommodityDetail/interactionRender.d.ts +9 -0
  135. package/lib/materials/sxp/popup/CommodityDetail/interactionRender.js +14 -0
  136. package/lib/materials/sxp/popup/CommodityDetail/material.js +3 -1
  137. package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +37 -0
  138. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +41 -0
  139. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +5 -0
  140. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +11 -25
  141. package/lib/materials/sxp/popup/CommodityDetailDiroNew/interactionRender.d.ts +9 -0
  142. package/lib/materials/sxp/popup/CommodityDetailDiroNew/interactionRender.js +14 -0
  143. package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +3 -1
  144. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +37 -0
  145. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +41 -0
  146. package/lib/materials/sxp/popup/CommodityList/index.d.ts +28 -0
  147. package/lib/materials/sxp/popup/CommodityList/index.js +58 -0
  148. package/lib/materials/sxp/popup/CommodityList/interactionRender.d.ts +8 -0
  149. package/lib/materials/sxp/popup/CommodityList/interactionRender.js +13 -0
  150. package/lib/materials/sxp/popup/CommodityList/material.d.ts +2 -0
  151. package/lib/materials/sxp/popup/CommodityList/material.js +55 -0
  152. package/lib/materials/sxp/popup/CommodityList/settingRender.d.ts +151 -0
  153. package/lib/materials/sxp/popup/CommodityList/settingRender.js +209 -0
  154. package/lib/materials/sxp/popup/index.d.ts +1 -0
  155. package/lib/materials/sxp/popup/index.js +1 -0
  156. package/lib/materials/sxp/template/Link/index.js +2 -2
  157. package/lib/materials/sxp/template/MultiCommodity/index.js +2 -2
  158. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
  159. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +5 -4
  160. package/lib/materials/sxp/template/components/CommodityGroup.d.ts +14 -0
  161. package/lib/materials/sxp/template/components/CommodityGroup.js +34 -0
  162. package/lib/materials/sxp/template/components/Img.js +1 -1
  163. package/lib/materials/sxp/template/components/Scroll.d.ts +2 -1
  164. package/lib/materials/sxp/template/components/Scroll.js +9 -2
  165. package/lib/materials/sxp/template/components/settingRender.js +0 -5
  166. package/package.json +1 -1
@@ -5,13 +5,15 @@ const tslib_1 = require("tslib");
5
5
  const settingRender_1 = tslib_1.__importDefault(require("./settingRender"));
6
6
  const _1 = tslib_1.__importDefault(require("."));
7
7
  const create_1 = require("../../../../core/create");
8
+ const interactionRender_1 = tslib_1.__importDefault(require("./interactionRender"));
8
9
  const CommodityDetailDiroNew = (0, create_1.createMaterial)(_1.default, {
9
10
  displayName: '商品详情',
10
11
  icon: '',
11
12
  category: 'popup',
12
13
  type: 'CommodityDetailDiroNew',
13
14
  related: {
14
- settingRender: settingRender_1.default
15
+ settingRender: settingRender_1.default,
16
+ interactionRender: interactionRender_1.default
15
17
  },
16
18
  defaulSetting: {
17
19
  props: {
@@ -32,6 +32,43 @@ declare const _default: ({
32
32
  name?: undefined;
33
33
  addonAfter?: undefined;
34
34
  })[];
35
+ } | {
36
+ title: string;
37
+ child: ({
38
+ type: string;
39
+ name: string[];
40
+ label: string;
41
+ child?: undefined;
42
+ } | {
43
+ type: string;
44
+ child: {
45
+ label: string;
46
+ type: string;
47
+ name: string[];
48
+ min: number;
49
+ addonAfter: string;
50
+ initialValue: number;
51
+ }[];
52
+ name?: undefined;
53
+ label?: undefined;
54
+ } | {
55
+ type: string;
56
+ child: ({
57
+ label: string;
58
+ name: string[];
59
+ type: string;
60
+ addonAfter: string;
61
+ initialValue: number;
62
+ } | {
63
+ label: string;
64
+ name: string[];
65
+ type: string;
66
+ addonAfter: string;
67
+ initialValue?: undefined;
68
+ })[];
69
+ name?: undefined;
70
+ label?: undefined;
71
+ })[];
35
72
  } | {
36
73
  title: string;
37
74
  child: {
@@ -39,6 +39,47 @@ exports.default = [
39
39
  }
40
40
  ]
41
41
  },
42
+ {
43
+ title: '多商品切换器',
44
+ child: [
45
+ {
46
+ type: 'Switch',
47
+ name: ['props', 'commodityGroup', 'open'],
48
+ label: '快速切换开关'
49
+ },
50
+ {
51
+ type: 'Group',
52
+ child: [
53
+ {
54
+ label: '居中垂直偏移',
55
+ type: 'Number',
56
+ name: ['props', 'commodityGroup', 'translateY'],
57
+ min: -1000,
58
+ addonAfter: '%',
59
+ initialValue: 0
60
+ }
61
+ ]
62
+ },
63
+ {
64
+ type: 'Group',
65
+ child: [
66
+ {
67
+ label: '上边距',
68
+ name: ['props', 'commodityGroup', 'style', 'marginTop'],
69
+ type: 'Number',
70
+ addonAfter: 'px',
71
+ initialValue: 20
72
+ },
73
+ {
74
+ label: '下边距',
75
+ name: ['props', 'commodityGroup', 'style', 'marginBottom'],
76
+ type: 'Number',
77
+ addonAfter: 'px'
78
+ }
79
+ ]
80
+ }
81
+ ]
82
+ },
42
83
  {
43
84
  title: '商品文本',
44
85
  child: [
@@ -0,0 +1,28 @@
1
+ import React, { CSSProperties } from 'react';
2
+ import { IEditorContext } from '../../../../core/context/EditorContext';
3
+ import { RecItemType } from '../../../../core/components/SxpPageRender/typing';
4
+ import './index.less';
5
+ export interface ICommodityListProps {
6
+ content?: string;
7
+ style?: Record<string, any>;
8
+ bgImg?: Record<string, any> | string;
9
+ onClick?: () => void;
10
+ schema?: IEditorContext['schema'];
11
+ isDefault?: boolean;
12
+ rec?: RecItemType;
13
+ viewTime?: any;
14
+ isPost?: boolean;
15
+ bottom_image?: string;
16
+ commodityStyles?: {
17
+ title: CSSProperties;
18
+ collection: CSSProperties;
19
+ price: CSSProperties;
20
+ };
21
+ buttonStyle?: CSSProperties;
22
+ index?: number;
23
+ translateY?: number;
24
+ commodityPicture?: CSSProperties;
25
+ isExternalLink?: boolean;
26
+ }
27
+ declare const _default: React.NamedExoticComponent<ICommodityListProps>;
28
+ export default _default;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const css_1 = require("@emotion/css");
5
+ const react_1 = tslib_1.__importStar(require("react"));
6
+ const hooks_1 = require("../../../../core/hooks");
7
+ require("./index.less");
8
+ const tool_1 = require("../../../../core/utils/tool");
9
+ const Img_1 = tslib_1.__importDefault(require("../../template/components/Img"));
10
+ const EventProvider_1 = tslib_1.__importDefault(require("../../template/components/EventProvider"));
11
+ const CommodityList = (_a) => {
12
+ var _b, _c;
13
+ var { style, isDefault, rec, viewTime, isPost, bottom_image, commodityStyles, buttonStyle, index, translateY = 0, commodityPicture, isExternalLink } = _a, props = tslib_1.__rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "commodityStyles", "buttonStyle", "index", "translateY", "commodityPicture", "isExternalLink"]);
14
+ const { sxpParameter } = (0, hooks_1.useSxpDataSource)();
15
+ const { popupDetailData, bffEventReport, isPreview, swiperRef, bffFbReport } = (0, hooks_1.useSxpDataSource)();
16
+ const curTimeRef = (0, react_1.useRef)(null);
17
+ const recData = isPost ? rec : popupDetailData;
18
+ const product = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [null, null, null, null];
19
+ const priceText = (0, react_1.useCallback)((product) => {
20
+ var _a, _b, _c, _d, _e;
21
+ if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
22
+ return `${(_c = (_b = (_a = product === null || product === void 0 ? void 0 : product.currency) === null || _a === void 0 ? void 0 : _a.split('-')[1]) === null || _b === void 0 ? void 0 : _b.toUpperCase()) !== null && _c !== void 0 ? _c : ''}${(_e = (_d = product === null || product === void 0 ? void 0 : product.price) === null || _d === void 0 ? void 0 : _d.toLocaleString('zh', {
23
+ minimumFractionDigits: 0
24
+ })) !== null && _e !== void 0 ? _e : ''}`;
25
+ }
26
+ else {
27
+ return '$7,000';
28
+ }
29
+ }, []);
30
+ return (react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign(Object.assign({}, style), { display: 'flex', flexDirection: 'column', gap: '10px', padding: '0 20px', marginTop: '50px' })) }, product === null || product === void 0 ? void 0 : product.map((item, index) => {
31
+ var _a, _b, _c, _d, _e, _f, _g, _h;
32
+ return (react_1.default.createElement(EventProvider_1.default, Object.assign({ key: index, isExternalLink: isExternalLink, rec: recData, index: index }, props, { className: (0, css_1.css)({
33
+ display: 'flex'
34
+ }) }),
35
+ react_1.default.createElement(Img_1.default, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: commodityPicture }),
36
+ react_1.default.createElement("div", null,
37
+ react_1.default.createElement("div", { style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!item && !(item === null || item === void 0 ? void 0 : item.title), dangerouslySetInnerHTML: {
38
+ __html: (0, tool_1.setFontForText)((_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Pendant in Yellow Gold with Diamonds, Medium', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
39
+ } }),
40
+ react_1.default.createElement("div", { style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection, hidden: !!item && (!(item === null || item === void 0 ? void 0 : item.collection) || (item === null || item === void 0 ? void 0 : item.collection) === ''), dangerouslySetInnerHTML: {
41
+ __html: (0, tool_1.setFontForText)((_f = item === null || item === void 0 ? void 0 : item.collection) !== null && _f !== void 0 ? _f : 'Tiffany Lock', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
42
+ } }),
43
+ react_1.default.createElement("div", { className: (0, css_1.css)({
44
+ display: 'flex',
45
+ alignItems: 'flex-end',
46
+ justifyContent: 'space-between',
47
+ width: '100%',
48
+ overflow: 'hidden'
49
+ }) },
50
+ react_1.default.createElement("div", { style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price, hidden: !!item && !(item === null || item === void 0 ? void 0 : item.price), dangerouslySetInnerHTML: {
51
+ __html: (0, tool_1.setFontForText)(priceText(item), commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
52
+ } }),
53
+ react_1.default.createElement("div", { style: Object.assign(Object.assign({}, buttonStyle), { padding: '0 15px' }), dangerouslySetInnerHTML: {
54
+ __html: (0, tool_1.setFontForText)((_h = (_g = item === null || item === void 0 ? void 0 : item.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop Now', buttonStyle)
55
+ } })))));
56
+ })));
57
+ };
58
+ exports.default = (0, react_1.memo)(CommodityList);
@@ -0,0 +1,8 @@
1
+ declare const _default: {
2
+ title: string;
3
+ child: {
4
+ type: string;
5
+ name: string;
6
+ }[];
7
+ }[];
8
+ export default _default;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = [
4
+ {
5
+ title: '点击事件',
6
+ child: [
7
+ {
8
+ type: 'link',
9
+ name: 'onClick'
10
+ }
11
+ ]
12
+ }
13
+ ];
@@ -0,0 +1,2 @@
1
+ declare const CommodityList: import("../../../../core/create").MaterialComponet<import(".").ICommodityListProps>;
2
+ export { CommodityList };
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CommodityList = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const settingRender_1 = tslib_1.__importDefault(require("./settingRender"));
6
+ const _1 = tslib_1.__importDefault(require("."));
7
+ const create_1 = require("../../../../core/create");
8
+ const interactionRender_1 = tslib_1.__importDefault(require("./interactionRender"));
9
+ const CommodityList = (0, create_1.createMaterial)(_1.default, {
10
+ displayName: '商品列表',
11
+ icon: '',
12
+ category: 'popup',
13
+ type: 'CommodityList',
14
+ related: {
15
+ settingRender: settingRender_1.default,
16
+ interactionRender: interactionRender_1.default
17
+ },
18
+ defaulSetting: {
19
+ props: {
20
+ commodityPicture: {
21
+ width: 100,
22
+ height: 100,
23
+ marginRight: 10
24
+ },
25
+ commodityStyles: {
26
+ price: {
27
+ color: '#000',
28
+ fontWeight: 'bold',
29
+ fontSize: 14
30
+ },
31
+ title: {
32
+ color: '#000',
33
+ fontSize: 14
34
+ },
35
+ collection: {
36
+ color: '#757575',
37
+ fontSize: 12
38
+ }
39
+ },
40
+ buttonStyle: {
41
+ backgroundColor: '#000',
42
+ fontSize: 12,
43
+ height: 30,
44
+ textAlign: 'center',
45
+ color: '#fff',
46
+ lineHeight: 2.5
47
+ }
48
+ },
49
+ style: {}
50
+ },
51
+ w: 100,
52
+ h: 40,
53
+ sort: 1
54
+ });
55
+ exports.CommodityList = CommodityList;
@@ -0,0 +1,151 @@
1
+ declare const _default: ({
2
+ title: string;
3
+ child: ({
4
+ type: string;
5
+ label: string;
6
+ child: {
7
+ type: string;
8
+ name: string[];
9
+ addonAfter: string;
10
+ }[];
11
+ addonAfter?: undefined;
12
+ name?: undefined;
13
+ min?: undefined;
14
+ initialValue?: undefined;
15
+ } | {
16
+ type: string;
17
+ label: string;
18
+ child: ({
19
+ type: string;
20
+ name: string[];
21
+ max: number;
22
+ addonAfter?: undefined;
23
+ } | {
24
+ type: string;
25
+ name: string[];
26
+ addonAfter: string;
27
+ max: number;
28
+ })[];
29
+ addonAfter?: undefined;
30
+ name?: undefined;
31
+ min?: undefined;
32
+ initialValue?: undefined;
33
+ } | {
34
+ type: string;
35
+ label: string;
36
+ addonAfter: string;
37
+ name: string[];
38
+ child?: undefined;
39
+ min?: undefined;
40
+ initialValue?: undefined;
41
+ } | {
42
+ label: string;
43
+ type: string;
44
+ name: string[];
45
+ min: number;
46
+ addonAfter: string;
47
+ initialValue: number;
48
+ child?: undefined;
49
+ })[];
50
+ } | {
51
+ title: string;
52
+ child: {
53
+ name: string[];
54
+ type: string;
55
+ child: ({
56
+ label: string;
57
+ type: string;
58
+ options: {
59
+ label: string;
60
+ value: string;
61
+ }[];
62
+ name: string[];
63
+ initialValue: string;
64
+ child?: undefined;
65
+ } | {
66
+ type: string;
67
+ label: string;
68
+ child: {
69
+ type: string;
70
+ name: string[];
71
+ bottomText: string;
72
+ }[];
73
+ options?: undefined;
74
+ name?: undefined;
75
+ initialValue?: undefined;
76
+ } | {
77
+ type: string;
78
+ label: string;
79
+ child: ({
80
+ type: string;
81
+ name: string[];
82
+ addonAfter?: undefined;
83
+ } | {
84
+ type: string;
85
+ addonAfter: string;
86
+ name: string[];
87
+ })[];
88
+ options?: undefined;
89
+ name?: undefined;
90
+ initialValue?: undefined;
91
+ } | {
92
+ label: string;
93
+ type: string;
94
+ options?: undefined;
95
+ name?: undefined;
96
+ initialValue?: undefined;
97
+ child?: undefined;
98
+ })[];
99
+ }[];
100
+ } | {
101
+ title: string;
102
+ child: ({
103
+ type: string;
104
+ label: string;
105
+ name: string[];
106
+ child?: undefined;
107
+ } | {
108
+ type: string;
109
+ label: string;
110
+ child: ({
111
+ type: string;
112
+ name: string[];
113
+ max: number;
114
+ addonAfter?: undefined;
115
+ } | {
116
+ type: string;
117
+ name: string[];
118
+ addonAfter: string;
119
+ max: number;
120
+ })[];
121
+ name?: undefined;
122
+ } | {
123
+ type: string;
124
+ name: string[];
125
+ label?: undefined;
126
+ child?: undefined;
127
+ } | {
128
+ type: string;
129
+ label: string;
130
+ child: {
131
+ type: string;
132
+ name: string[];
133
+ bottomText: string;
134
+ }[];
135
+ name?: undefined;
136
+ } | {
137
+ type: string;
138
+ label: string;
139
+ child: ({
140
+ type: string;
141
+ name: string[];
142
+ addonAfter?: undefined;
143
+ } | {
144
+ type: string;
145
+ addonAfter: string;
146
+ name: string[];
147
+ })[];
148
+ name?: undefined;
149
+ })[];
150
+ })[];
151
+ export default _default;
@@ -0,0 +1,209 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = [
4
+ {
5
+ title: '商品图片',
6
+ child: [
7
+ {
8
+ type: 'Group',
9
+ label: '尺寸',
10
+ child: [
11
+ {
12
+ type: 'Number',
13
+ name: ['props', 'commodityPicture', 'width'],
14
+ addonAfter: 'W'
15
+ },
16
+ {
17
+ type: 'Number',
18
+ name: ['props', 'commodityPicture', 'height'],
19
+ addonAfter: 'H'
20
+ }
21
+ ]
22
+ },
23
+ {
24
+ type: 'Group',
25
+ label: '圆角',
26
+ child: [
27
+ {
28
+ type: 'Slider',
29
+ name: ['props', 'commodityPicture', 'borderRadius'],
30
+ max: 100
31
+ },
32
+ {
33
+ type: 'Number',
34
+ name: ['props', 'commodityPicture', 'borderRadius'],
35
+ addonAfter: 'px',
36
+ max: 100
37
+ }
38
+ ]
39
+ },
40
+ {
41
+ type: 'Number',
42
+ label: '与右侧边距',
43
+ addonAfter: 'px',
44
+ name: ['props', 'commodityPicture', 'marginRight']
45
+ },
46
+ {
47
+ label: '居中垂直偏移',
48
+ type: 'Number',
49
+ name: ['props', 'translateY'],
50
+ min: -1000,
51
+ addonAfter: '%',
52
+ initialValue: 0
53
+ }
54
+ ]
55
+ },
56
+ {
57
+ title: '商品文本',
58
+ child: [
59
+ {
60
+ name: ['props', 'commodityStyles'],
61
+ type: 'SelectLinkage',
62
+ child: [
63
+ {
64
+ label: '字段',
65
+ type: 'Select',
66
+ options: [
67
+ {
68
+ label: '商品名称',
69
+ value: 'title'
70
+ },
71
+ {
72
+ label: '系列名称',
73
+ value: 'collection'
74
+ },
75
+ {
76
+ label: '价格',
77
+ value: 'price'
78
+ }
79
+ ],
80
+ name: ['props', 'commodityStyles', 'field'],
81
+ initialValue: 'title'
82
+ },
83
+ {
84
+ type: 'Group',
85
+ label: '标题字体',
86
+ child: [
87
+ {
88
+ type: 'Select',
89
+ name: ['fontFamily-cn'],
90
+ bottomText: '中文字体'
91
+ },
92
+ {
93
+ type: 'Select',
94
+ name: ['fontFamily-en'],
95
+ bottomText: '英文/其他字体'
96
+ }
97
+ ]
98
+ },
99
+ {
100
+ type: 'Group',
101
+ label: '',
102
+ child: [
103
+ {
104
+ type: 'Color',
105
+ name: ['color']
106
+ },
107
+ {
108
+ type: 'Number',
109
+ addonAfter: 'px',
110
+ name: ['fontSize']
111
+ }
112
+ ]
113
+ },
114
+ {
115
+ label: '标题样式',
116
+ type: 'TextStyle'
117
+ },
118
+ {
119
+ label: '标题对齐',
120
+ type: 'TextAlign'
121
+ }
122
+ ]
123
+ }
124
+ ]
125
+ },
126
+ {
127
+ title: '按钮样式',
128
+ child: [
129
+ {
130
+ type: 'Color',
131
+ label: '背景色',
132
+ name: ['props', 'buttonStyle', 'backgroundColor']
133
+ },
134
+ {
135
+ type: 'Group',
136
+ label: '尺寸',
137
+ child: [
138
+ {
139
+ type: 'Number',
140
+ name: ['props', 'buttonStyle', 'height'],
141
+ addonAfter: 'H'
142
+ }
143
+ ]
144
+ },
145
+ {
146
+ type: 'Group',
147
+ label: '圆角',
148
+ child: [
149
+ {
150
+ type: 'Slider',
151
+ name: ['props', 'buttonStyle', 'borderRadius'],
152
+ max: 100
153
+ },
154
+ {
155
+ type: 'Number',
156
+ name: ['props', 'buttonStyle', 'borderRadius'],
157
+ addonAfter: 'px',
158
+ max: 100
159
+ }
160
+ ]
161
+ },
162
+ {
163
+ type: 'TextSpace',
164
+ name: ['props', 'buttonStyle']
165
+ },
166
+ {
167
+ type: 'Group',
168
+ label: '字体',
169
+ child: [
170
+ {
171
+ type: 'Select',
172
+ name: ['props', 'buttonStyle', 'fontFamily-cn'],
173
+ bottomText: '中文字体'
174
+ },
175
+ {
176
+ type: 'Select',
177
+ name: ['props', 'buttonStyle', 'fontFamily-en'],
178
+ bottomText: '英文/其他字体'
179
+ }
180
+ ]
181
+ },
182
+ {
183
+ type: 'Group',
184
+ label: '',
185
+ child: [
186
+ {
187
+ type: 'Color',
188
+ name: ['props', 'buttonStyle', 'color']
189
+ },
190
+ {
191
+ type: 'Number',
192
+ addonAfter: 'px',
193
+ name: ['props', 'buttonStyle', 'fontSize']
194
+ }
195
+ ]
196
+ },
197
+ {
198
+ label: '样式',
199
+ type: 'TextStyle',
200
+ name: ['props', 'buttonStyle']
201
+ },
202
+ {
203
+ label: '对齐',
204
+ type: 'TextAlign',
205
+ name: ['props', 'buttonStyle']
206
+ }
207
+ ]
208
+ }
209
+ ];
@@ -2,3 +2,4 @@ export * from './AppointForm/material';
2
2
  export * from './CommodityDetail/material';
3
3
  export * from './Prompt/material';
4
4
  export * from './CommodityDetailDiroNew/material';
5
+ export * from './CommodityList/material';
@@ -5,3 +5,4 @@ tslib_1.__exportStar(require("./AppointForm/material"), exports);
5
5
  tslib_1.__exportStar(require("./CommodityDetail/material"), exports);
6
6
  tslib_1.__exportStar(require("./Prompt/material"), exports);
7
7
  tslib_1.__exportStar(require("./CommodityDetailDiroNew/material"), exports);
8
+ tslib_1.__exportStar(require("./CommodityList/material"), exports);
@@ -4,11 +4,11 @@ const tslib_1 = require("tslib");
4
4
  const css_1 = require("@emotion/css");
5
5
  const react_1 = tslib_1.__importStar(require("react"));
6
6
  const EventProvider_1 = tslib_1.__importDefault(require("../components/EventProvider"));
7
+ const index_module_less_1 = tslib_1.__importDefault(require("./index.module.less"));
7
8
  const hooks_1 = require("../../../../core/hooks");
8
9
  const useEventReport_1 = require("../../../../core/hooks/useEventReport");
9
10
  const Img_1 = tslib_1.__importDefault(require("../components/Img"));
10
11
  const tool_1 = require("../../../../core/utils/tool");
11
- const index_module_less_1 = tslib_1.__importDefault(require("./index.module.less"));
12
12
  const Link = (_a) => {
13
13
  var _b, _c, _d, _e, _f, _g, _h, _j;
14
14
  var { content, style, bgImg, recData, bottom_image, ctaTempStyles, index, customTitle } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "index", "customTitle"]);
@@ -32,7 +32,7 @@ const Link = (_a) => {
32
32
  overflow: 'hidden'
33
33
  }) },
34
34
  react_1.default.createElement("div", null,
35
- react_1.default.createElement("div", { className: index_module_less_1.default['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle, dangerouslySetInnerHTML: {
35
+ react_1.default.createElement("div", { className: (customTitle === null || customTitle === void 0 ? void 0 : customTitle.display) ? index_module_less_1.default['one-line-ellipsis'] : index_module_less_1.default['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle, dangerouslySetInnerHTML: {
36
36
  __html: (0, tool_1.setFontForText)((_h = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _h !== void 0 ? _h : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
37
37
  } }),
38
38
  (customTitle === null || customTitle === void 0 ? void 0 : customTitle.display) && (react_1.default.createElement("div", { style: Object.assign(Object.assign({}, customTitle === null || customTitle === void 0 ? void 0 : customTitle.style), { lineHeight: ((_j = customTitle === null || customTitle === void 0 ? void 0 : customTitle.style) === null || _j === void 0 ? void 0 : _j.height) + 'px' }), className: index_module_less_1.default['one-line-ellipsis'], dangerouslySetInnerHTML: {