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
@@ -7,6 +7,7 @@ require("./WaterfallList.less");
7
7
  const preview_json_1 = tslib_1.__importDefault(require("./preview.json"));
8
8
  const FormatImage_1 = tslib_1.__importDefault(require("../FormatImage"));
9
9
  const css_1 = require("@emotion/css");
10
+ const tool_1 = require("../../../../core/utils/tool");
10
11
  const WaterfallFlowItem = (props) => {
11
12
  const { rec, style = {}, sizeChange = () => { }, unitWidth, index, showBorder, list, reportTagsView, textStyles, space } = props;
12
13
  const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = (0, hooks_1.useSxpDataSource)();
@@ -104,11 +105,15 @@ const WaterfallFlowItem = (props) => {
104
105
  react_1.default.createElement("div", { className: 'waterFallList-content-listItem-picture', ref: pictRef },
105
106
  react_1.default.createElement(FormatImage_1.default, { loading: 'lazy', className: 'waterFallList-content-listItem-picture-img', onLoad: imgLoad, ref: imgDom })),
106
107
  react_1.default.createElement("div", { className: 'waterFallList-content-listItem-info' },
107
- react_1.default.createElement("div", { className: `${'waterFallList-content-listItem-info-title'} ${priceText ? 'waterFallList-content-listItem-info-nowrap' : ''}`, style: Object.assign({}, textStyles === null || textStyles === void 0 ? void 0 : textStyles.title) }, title && title),
108
- react_1.default.createElement("div", { className: 'waterFallList-content-listItem-info-price', hidden: !priceText, style: textStyles.price }, priceText))));
108
+ react_1.default.createElement("div", { className: `${'waterFallList-content-listItem-info-title'} ${priceText ? 'waterFallList-content-listItem-info-nowrap' : ''}`, style: Object.assign({}, textStyles === null || textStyles === void 0 ? void 0 : textStyles.title), dangerouslySetInnerHTML: {
109
+ __html: (0, tool_1.setFontForText)(title, textStyles === null || textStyles === void 0 ? void 0 : textStyles.title)
110
+ } }),
111
+ react_1.default.createElement("div", { className: 'waterFallList-content-listItem-info-price', hidden: !priceText, style: textStyles.price, dangerouslySetInnerHTML: {
112
+ __html: (0, tool_1.setFontForText)(priceText, textStyles === null || textStyles === void 0 ? void 0 : textStyles.price)
113
+ } }))));
109
114
  };
110
115
  function WaterfallList(_a) {
111
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
116
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
112
117
  var { reportTagsView, showBanner } = _a, props = tslib_1.__rest(_a, ["reportTagsView", "showBanner"]);
113
118
  const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = (0, hooks_1.useSxpDataSource)();
114
119
  const scrollParent = (0, react_1.useRef)(null);
@@ -286,24 +291,30 @@ function WaterfallList(_a) {
286
291
  objectFit: 'cover',
287
292
  marginBottom: '20px'
288
293
  }), src: (_c = data === null || data === void 0 ? void 0 : data.tag) === null || _c === void 0 ? void 0 : _c.picture }))),
289
- react_1.default.createElement("div", { className: 'waterFallList-info', style: (_d = props === null || props === void 0 ? void 0 : props.textStyles) === null || _d === void 0 ? void 0 : _d.hashTagDesc }, (_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.info),
290
- react_1.default.createElement("div", { hidden: !((_f = data === null || data === void 0 ? void 0 : data.tag) === null || _f === void 0 ? void 0 : _f.link), className: 'waterFallList-collection', style: Object.assign({}, (_g = props === null || props === void 0 ? void 0 : props.textStyles) === null || _g === void 0 ? void 0 : _g.hashTagLink), onClick: handleClickLink }, ((_h = data === null || data === void 0 ? void 0 : data.tag) === null || _h === void 0 ? void 0 : _h.linkTitle) || 'Shop the collection'),
294
+ react_1.default.createElement("div", { className: 'waterFallList-info', style: (_d = props === null || props === void 0 ? void 0 : props.textStyles) === null || _d === void 0 ? void 0 : _d.hashTagDesc, dangerouslySetInnerHTML: {
295
+ __html: (0, tool_1.setFontForText)((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.info, (_f = props === null || props === void 0 ? void 0 : props.textStyles) === null || _f === void 0 ? void 0 : _f.hashTagDesc)
296
+ } }),
297
+ react_1.default.createElement("div", { hidden: !((_g = data === null || data === void 0 ? void 0 : data.tag) === null || _g === void 0 ? void 0 : _g.link), className: 'waterFallList-collection', style: Object.assign({}, (_h = props === null || props === void 0 ? void 0 : props.textStyles) === null || _h === void 0 ? void 0 : _h.hashTagLink), onClick: handleClickLink, dangerouslySetInnerHTML: {
298
+ __html: (0, tool_1.setFontForText)(((_j = data === null || data === void 0 ? void 0 : data.tag) === null || _j === void 0 ? void 0 : _j.linkTitle) || 'Shop the collection', (_k = props === null || props === void 0 ? void 0 : props.textStyles) === null || _k === void 0 ? void 0 : _k.hashTagLink)
299
+ } }),
291
300
  react_1.default.createElement("div", { className: 'waterFallList-content' }, list === null || list === void 0 ? void 0 :
292
301
  list.map((item, ind) => {
293
302
  var _a;
294
303
  return (react_1.default.createElement(WaterfallFlowItem, Object.assign({ key: ind, index: ind, rec: item, list: list, showBorder: scrollTop + ((_a = scrollParent === null || scrollParent === void 0 ? void 0 : scrollParent.current) === null || _a === void 0 ? void 0 : _a.clientHeight), style: styleList[ind], sizeChange: onSizeChange, unitWidth: unitWidth, reportTagsView: reportTagsView }, props)));
295
304
  }),
296
- react_1.default.createElement("div", { hidden: !((_j = data === null || data === void 0 ? void 0 : data.tag) === null || _j === void 0 ? void 0 : _j.link), style: {
305
+ react_1.default.createElement("div", { hidden: !((_l = data === null || data === void 0 ? void 0 : data.tag) === null || _l === void 0 ? void 0 : _l.link), style: {
297
306
  position: 'absolute',
298
307
  width: '100%',
299
- transform: `translate(0px,${(_p = ((_l = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current[((_k = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current) === null || _k === void 0 ? void 0 : _k.length) - 1]) === null || _l === void 0 ? void 0 : _l.top) +
300
- ((_o = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current[((_m = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current) === null || _m === void 0 ? void 0 : _m.length) - 1]) === null || _o === void 0 ? void 0 : _o.height)) !== null && _p !== void 0 ? _p : 0}px)`,
301
- height: ((_q = data === null || data === void 0 ? void 0 : data.tag) === null || _q === void 0 ? void 0 : _q.link)
302
- ? ((_r = buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) === null || _r === void 0 ? void 0 : _r.offsetHeight) || ((_s = props === null || props === void 0 ? void 0 : props.buttonBgStyle) === null || _s === void 0 ? void 0 : _s.height) || '100px'
308
+ transform: `translate(0px,${(_r = ((_o = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current[((_m = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current) === null || _m === void 0 ? void 0 : _m.length) - 1]) === null || _o === void 0 ? void 0 : _o.top) +
309
+ ((_q = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current[((_p = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current) === null || _p === void 0 ? void 0 : _p.length) - 1]) === null || _q === void 0 ? void 0 : _q.height)) !== null && _r !== void 0 ? _r : 0}px)`,
310
+ height: ((_s = data === null || data === void 0 ? void 0 : data.tag) === null || _s === void 0 ? void 0 : _s.link)
311
+ ? ((_t = buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) === null || _t === void 0 ? void 0 : _t.offsetHeight) || ((_u = props === null || props === void 0 ? void 0 : props.buttonBgStyle) === null || _u === void 0 ? void 0 : _u.height) || '100px'
303
312
  : 0
304
313
  } }))),
305
- react_1.default.createElement("div", { className: 'waterFallList-bottom', hidden: !((_t = data === null || data === void 0 ? void 0 : data.tag) === null || _t === void 0 ? void 0 : _t.link), style: props === null || props === void 0 ? void 0 : props.buttonBgStyle }),
306
- react_1.default.createElement("div", { ref: buttonRef, hidden: !((_u = data === null || data === void 0 ? void 0 : data.tag) === null || _u === void 0 ? void 0 : _u.link), className: 'waterFallList-btn-wrap', style: Object.assign(Object.assign({}, props === null || props === void 0 ? void 0 : props.buttonBgStyle), { height: 'auto', backgroundColor: 'transparent' }) },
307
- react_1.default.createElement("button", { "aria-label": ((_v = data === null || data === void 0 ? void 0 : data.tag) === null || _v === void 0 ? void 0 : _v.linkTitle) || 'Shop the collection', className: 'waterFallList-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((_w = data === null || data === void 0 ? void 0 : data.tag) === null || _w === void 0 ? void 0 : _w.linkTitle) || 'Shop the collection'))))));
314
+ react_1.default.createElement("div", { className: 'waterFallList-bottom', hidden: !((_v = data === null || data === void 0 ? void 0 : data.tag) === null || _v === void 0 ? void 0 : _v.link), style: props === null || props === void 0 ? void 0 : props.buttonBgStyle }),
315
+ react_1.default.createElement("div", { ref: buttonRef, hidden: !((_w = data === null || data === void 0 ? void 0 : data.tag) === null || _w === void 0 ? void 0 : _w.link), className: 'waterFallList-btn-wrap', style: Object.assign(Object.assign({}, props === null || props === void 0 ? void 0 : props.buttonBgStyle), { height: 'auto', backgroundColor: 'transparent' }) },
316
+ react_1.default.createElement("button", { "aria-label": ((_x = data === null || data === void 0 ? void 0 : data.tag) === null || _x === void 0 ? void 0 : _x.linkTitle) || 'Shop the collection', className: 'waterFallList-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink, dangerouslySetInnerHTML: {
317
+ __html: (0, tool_1.setFontForText)(((_y = data === null || data === void 0 ? void 0 : data.tag) === null || _y === void 0 ? void 0 : _y.linkTitle) || 'Shop the collection', props === null || props === void 0 ? void 0 : props.buttonStyle)
318
+ } }))))));
308
319
  }
309
320
  exports.default = WaterfallList;
@@ -35,6 +35,7 @@ export interface ISxpPageRenderProps {
35
35
  likeIconXPosit?: string;
36
36
  swipeTipOffset?: number;
37
37
  consent?: any[];
38
+ videoPlayIcon?: string;
38
39
  };
39
40
  descStyle?: CSSProperties;
40
41
  tipText?: {
@@ -171,11 +171,14 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
171
171
  }
172
172
  return h;
173
173
  }, [tagList, waterFallData]);
174
- const height = (0, react_1.useMemo)(() => {
174
+ const minusHeight = (0, react_1.useMemo)(() => {
175
175
  let minusHeight = 0;
176
176
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
177
177
  minusHeight += 45;
178
178
  }
179
+ return minusHeight;
180
+ }, []);
181
+ const height = (0, react_1.useMemo)(() => {
179
182
  return containerHeight - minusHeight - tagHeight;
180
183
  }, [globalConfig, containerHeight, tagHeight]);
181
184
  const renderLogo = (0, react_1.useMemo)(() => {
@@ -188,7 +191,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
188
191
  const renderContent = (0, react_1.useCallback)((rec, index) => {
189
192
  var _a, _b, _c, _d;
190
193
  if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) {
191
- return (react_1.default.createElement(VideoWidget_1.default, { rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost, videoRef: videoRef.current }));
194
+ return (react_1.default.createElement(VideoWidget_1.default, { rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost, videoRef: videoRef.current, videoPlayIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPlayIcon }));
192
195
  }
193
196
  if ((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
194
197
  return (react_1.default.createElement(PictureGroup_1.default, { key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, imgUrls: rec === null || rec === void 0 ? void 0 : rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, onReportViewImageEnd: handleReportViewImageEnd, onViewImageStartEvent: handleViewImageStartEvent, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
@@ -210,6 +213,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
210
213
  isMuted,
211
214
  activeIndex,
212
215
  globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost,
216
+ globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPlayIcon,
213
217
  viewTime,
214
218
  tipText,
215
219
  resolver,
@@ -407,7 +411,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
407
411
  setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(true);
408
412
  } })),
409
413
  renderLogo,
410
- react_1.default.createElement(Tagbar_1.default, { tagList: tagList, setActiveIndex: setActiveIndex }),
414
+ react_1.default.createElement(Tagbar_1.default, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
415
+ top: minusHeight
416
+ } }),
411
417
  isShowFingerTip ? (react_1.default.createElement(FingerSwipeTip_1.default, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 + ((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _a !== void 0 ? _a : 0)}%` } })) : null,
412
418
  react_1.default.createElement(react_2.Swiper, { style: {
413
419
  marginTop: tagHeight
@@ -20,6 +20,7 @@ interface IEditorDataContext {
20
20
  setOpenHashtag?: React.Dispatch<React.SetStateAction<boolean>>;
21
21
  openConsent?: boolean;
22
22
  setOpenConsent?: React.Dispatch<React.SetStateAction<boolean>>;
23
+ sxpFontLinks?: any[];
23
24
  }
24
25
  interface IEditorProviderProps {
25
26
  data?: any;
@@ -28,7 +28,8 @@ const EditorDataProvider = ({ children, data }) => {
28
28
  openHashtag,
29
29
  setOpenHashtag,
30
30
  openConsent,
31
- setOpenConsent
31
+ setOpenConsent,
32
+ sxpFontLinks: data === null || data === void 0 ? void 0 : data.sxpFontLinks
32
33
  } }, children));
33
34
  };
34
35
  function useEditorDataProvider() {
@@ -2,4 +2,9 @@ declare function uuid(len: number, radix: number): string;
2
2
  declare const getIndexByblockType: (type: string, index: number) => number | "initial";
3
3
  export declare const generateRandomString: (length: number) => string;
4
4
  export declare const getUid: () => string;
5
+ interface IfontType {
6
+ 'fontFamily-cn': string;
7
+ 'fontFamily-en': string;
8
+ }
9
+ export declare const setFontForText: (textContent?: string | null, style?: IfontType | any) => string;
5
10
  export { uuid, getIndexByblockType };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getIndexByblockType = exports.uuid = exports.getUid = exports.generateRandomString = void 0;
3
+ exports.getIndexByblockType = exports.uuid = exports.setFontForText = exports.getUid = exports.generateRandomString = void 0;
4
4
  const uuid_1 = require("uuid");
5
5
  function uuid(len, radix) {
6
6
  const chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
@@ -52,3 +52,47 @@ const getUid = () => {
52
52
  return uid;
53
53
  };
54
54
  exports.getUid = getUid;
55
+ const setFontForText = (textContent, style) => {
56
+ if (!textContent)
57
+ return '';
58
+ let content = '';
59
+ const cn = style === null || style === void 0 ? void 0 : style['fontFamily-cn'];
60
+ const en = style === null || style === void 0 ? void 0 : style['fontFamily-en'];
61
+ if (!cn && !en) {
62
+ return textContent;
63
+ }
64
+ let text = textContent;
65
+ const chineseRegex = /[\u4e00-\u9fa5]/g;
66
+ const englishRegex = /[^\u4e00-\u9fa5]/g;
67
+ const cnStyle = `font-family:${cn !== null && cn !== void 0 ? cn : 'inherit'}`;
68
+ const enStyle = `font-family:${en !== null && en !== void 0 ? en : 'inherit'}`;
69
+ const fn = (str) => {
70
+ let chineseStartIndex = str.search(chineseRegex);
71
+ let englishStartIndex = str.search(englishRegex);
72
+ if (chineseStartIndex !== -1 && englishStartIndex !== -1 && chineseStartIndex < englishStartIndex) {
73
+ content += `<span style="${cnStyle}">${str.substring(chineseStartIndex, englishStartIndex)}</span>`;
74
+ text = str.substring(englishStartIndex, str === null || str === void 0 ? void 0 : str.length);
75
+ }
76
+ if (chineseStartIndex !== -1 && englishStartIndex !== -1 && chineseStartIndex > englishStartIndex) {
77
+ content += `<span style="${enStyle}">${str.substring(englishStartIndex, chineseStartIndex)}</span>`;
78
+ text = str.substring(chineseStartIndex, str === null || str === void 0 ? void 0 : str.length);
79
+ }
80
+ if (chineseStartIndex === -1) {
81
+ content += `<span style="${enStyle}">${str.substring(englishStartIndex, str === null || str === void 0 ? void 0 : str.length)}</span>`;
82
+ text = '';
83
+ return false;
84
+ }
85
+ if (englishStartIndex === -1) {
86
+ content += `<span style="${cnStyle}">${str.substring(chineseStartIndex, str === null || str === void 0 ? void 0 : str.length)}</span>`;
87
+ text = '';
88
+ return false;
89
+ }
90
+ return true;
91
+ };
92
+ let w = true;
93
+ while (w) {
94
+ w = fn(text);
95
+ }
96
+ return content;
97
+ };
98
+ exports.setFontForText = setFontForText;
package/lib/index.d.ts CHANGED
@@ -8,5 +8,4 @@ export { default as SxpDataSourceProvider } from './core/context/SxpDataSourcePr
8
8
  export { default as SxpPageCore } from './core/components/SxpPageCore';
9
9
  export { default as EditorDataProvider } from './core/context/EditorDataProvider';
10
10
  export { useEditorDataProvider } from './core/context/EditorDataProvider';
11
- export { default as defaultSetting } from './materials/sxp/defaultSetting';
12
11
  export default Pagebuilder;
package/lib/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.defaultSetting = exports.useEditorDataProvider = exports.EditorDataProvider = exports.SxpPageCore = exports.SxpDataSourceProvider = exports.Modal = exports.DiyPortalPreview = exports.SxpPageRender = exports.materials = exports.core = void 0;
3
+ exports.useEditorDataProvider = exports.EditorDataProvider = exports.SxpPageCore = exports.SxpDataSourceProvider = exports.Modal = exports.DiyPortalPreview = exports.SxpPageRender = exports.materials = exports.core = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const Pagebuilder_1 = require("./core/Pagebuilder");
6
6
  exports.core = tslib_1.__importStar(require("./core"));
@@ -19,6 +19,4 @@ var EditorDataProvider_1 = require("./core/context/EditorDataProvider");
19
19
  Object.defineProperty(exports, "EditorDataProvider", { enumerable: true, get: function () { return tslib_1.__importDefault(EditorDataProvider_1).default; } });
20
20
  var EditorDataProvider_2 = require("./core/context/EditorDataProvider");
21
21
  Object.defineProperty(exports, "useEditorDataProvider", { enumerable: true, get: function () { return EditorDataProvider_2.useEditorDataProvider; } });
22
- var defaultSetting_1 = require("./materials/sxp/defaultSetting");
23
- Object.defineProperty(exports, "defaultSetting", { enumerable: true, get: function () { return tslib_1.__importDefault(defaultSetting_1).default; } });
24
22
  exports.default = Pagebuilder_1.Pagebuilder;
@@ -38,27 +38,25 @@ declare const _default: ({
38
38
  } | {
39
39
  type: string;
40
40
  label: string;
41
- child: ({
41
+ child: {
42
42
  type: string;
43
43
  name: string[];
44
- options?: undefined;
45
- initialValue?: undefined;
46
- addonAfter?: undefined;
47
- } | {
44
+ bottomText: string;
45
+ }[];
46
+ options?: undefined;
47
+ name?: undefined;
48
+ initialValue?: undefined;
49
+ } | {
50
+ type: string;
51
+ label: string;
52
+ child: ({
48
53
  type: string;
49
- options: {
50
- label: string;
51
- value: string;
52
- }[];
53
54
  name: string[];
54
- initialValue: string;
55
55
  addonAfter?: undefined;
56
56
  } | {
57
57
  type: string;
58
58
  addonAfter: string;
59
59
  name: string[];
60
- options?: undefined;
61
- initialValue?: undefined;
62
60
  })[];
63
61
  options?: undefined;
64
62
  name?: undefined;
@@ -105,19 +103,19 @@ declare const _default: ({
105
103
  } | {
106
104
  type: string;
107
105
  label: string;
108
- child: ({
106
+ child: {
109
107
  type: string;
110
108
  name: string[];
111
- initialValue: string;
112
- options?: undefined;
113
- addonAfter?: undefined;
114
- } | {
109
+ bottomText: string;
110
+ }[];
111
+ name?: undefined;
112
+ initialValue?: undefined;
113
+ } | {
114
+ type: string;
115
+ label: string;
116
+ child: ({
115
117
  type: string;
116
118
  name: string[];
117
- options: {
118
- label: string;
119
- value: string;
120
- }[];
121
119
  initialValue: string;
122
120
  addonAfter?: undefined;
123
121
  } | {
@@ -125,7 +123,6 @@ declare const _default: ({
125
123
  name: string[];
126
124
  addonAfter: string;
127
125
  initialValue?: undefined;
128
- options?: undefined;
129
126
  })[];
130
127
  name?: undefined;
131
128
  initialValue?: undefined;
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
- var _a, _b;
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
- const defaultSetting_1 = require("../defaultSetting");
5
3
  exports.default = [
6
4
  {
7
5
  title: 'Banner',
@@ -70,14 +68,24 @@ exports.default = [
70
68
  label: '标题字体',
71
69
  child: [
72
70
  {
73
- type: 'Color',
74
- name: ['color']
71
+ type: 'Select',
72
+ name: ['fontFamily-cn'],
73
+ bottomText: '中文字体'
75
74
  },
76
75
  {
77
76
  type: 'Select',
78
- options: defaultSetting_1.fontOptions,
79
- name: ['fontFamily'],
80
- initialValue: (_a = defaultSetting_1.fontOptions === null || defaultSetting_1.fontOptions === void 0 ? void 0 : defaultSetting_1.fontOptions[0]) === null || _a === void 0 ? void 0 : _a.value
77
+ name: ['fontFamily-en'],
78
+ bottomText: '英文/其他字体'
79
+ }
80
+ ]
81
+ },
82
+ {
83
+ type: 'Group',
84
+ label: '',
85
+ child: [
86
+ {
87
+ type: 'Color',
88
+ name: ['color']
81
89
  },
82
90
  {
83
91
  type: 'Number',
@@ -144,15 +152,25 @@ exports.default = [
144
152
  label: '字体',
145
153
  child: [
146
154
  {
147
- type: 'Color',
148
- name: ['props', 'buttonStyle', 'color'],
149
- initialValue: '#fff'
155
+ type: 'Select',
156
+ name: ['props', 'buttonStyle', 'fontFamily-cn'],
157
+ bottomText: '中文字体'
150
158
  },
151
159
  {
152
160
  type: 'Select',
153
- name: ['props', 'buttonStyle', 'fontFamily'],
154
- options: defaultSetting_1.fontOptions,
155
- initialValue: (_b = defaultSetting_1.fontOptions === null || defaultSetting_1.fontOptions === void 0 ? void 0 : defaultSetting_1.fontOptions[0]) === null || _b === void 0 ? void 0 : _b.value
161
+ name: ['props', 'buttonStyle', 'fontFamily-en'],
162
+ bottomText: '英文/其他字体'
163
+ }
164
+ ]
165
+ },
166
+ {
167
+ type: 'Group',
168
+ label: '',
169
+ child: [
170
+ {
171
+ type: 'Color',
172
+ name: ['props', 'buttonStyle', 'color'],
173
+ initialValue: '#fff'
156
174
  },
157
175
  {
158
176
  type: 'Number',
@@ -0,0 +1,14 @@
1
+ import { IAppointFormProps } from '.';
2
+ import React from 'react';
3
+ interface IFormProps {
4
+ columns?: {
5
+ title?: string;
6
+ dataIndex?: string;
7
+ valueType?: string;
8
+ key?: string;
9
+ }[];
10
+ layout?: IAppointFormProps['layoutType'];
11
+ onChange?: (data: Record<string, any>) => void;
12
+ }
13
+ declare const _default: React.NamedExoticComponent<IFormProps>;
14
+ export default _default;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const react_1 = require("react");
5
+ const react_2 = tslib_1.__importDefault(require("react"));
6
+ const Form = ({ layout, columns, onChange }) => {
7
+ return (react_2.default.createElement(react_2.default.Fragment, null, columns === null || columns === void 0 ? void 0 : columns.map((item, index) => (react_2.default.createElement("div", { key: index, className: 'pb-appoint-form-container-item', style: { flexDirection: layout === 'horizontal' ? 'row' : 'column' } },
8
+ layout !== 'inline' && react_2.default.createElement("label", { className: 'pb-appoint-form-container-label' }, item === null || item === void 0 ? void 0 : item.title),
9
+ (item === null || item === void 0 ? void 0 : item.valueType) === 'text' && (react_2.default.createElement("input", { className: 'pb-appoint-form-container-input', type: 'text', placeholder: layout === 'inline' ? item === null || item === void 0 ? void 0 : item.title : '请输入', name: item === null || item === void 0 ? void 0 : item.dataIndex, onChange: onChange })))))));
10
+ };
11
+ exports.default = (0, react_1.memo)(Form);
@@ -7,11 +7,12 @@ const lodash_1 = require("lodash");
7
7
  const hooks_1 = require("../../../../core/hooks");
8
8
  require("./index.less");
9
9
  const useEventReport_1 = require("../../../../core/hooks/useEventReport");
10
+ const tool_1 = require("../../../../core/utils/tool");
11
+ const Form_1 = tslib_1.__importDefault(require("./Form"));
10
12
  const AppointForm = (_a) => {
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
+ var { columns, style, title, textStyle, submitBgColor, submitColor, submitText, layoutType = 'inline', isExternalLink, isPopup, onClick, onClose, submitButtonStyle } = _a, props = tslib_1.__rest(_a, ["columns", "style", "title", "textStyle", "submitBgColor", "submitColor", "submitText", "layoutType", "isExternalLink", "isPopup", "onClick", "onClose", "submitButtonStyle"]);
12
14
  const { submitForm, popupDetailData } = (0, hooks_1.useSxpDataSource)();
13
15
  const { jumpToWeb } = (0, useEventReport_1.useEventReport)();
14
- const formRef = (0, react_1.useRef)();
15
16
  const [loading, setLoading] = (0, react_1.useState)(false);
16
17
  const defaultColumns = (0, react_1.useMemo)(() => [
17
18
  {
@@ -39,27 +40,26 @@ const AppointForm = (_a) => {
39
40
  key: '4'
40
41
  }
41
42
  ], []);
43
+ const [formData, setFormData] = (0, react_1.useState)({});
42
44
  const columnsData = (0, react_1.useMemo)(() => {
43
- if (layoutType === undefined) {
44
- const list = (0, lodash_1.cloneDeep)(columns) || defaultColumns;
45
- 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 } })));
46
- }
47
- else {
48
- return (0, lodash_1.cloneDeep)(columns) || defaultColumns;
49
- }
50
- }, [layoutType, columns, defaultColumns]);
45
+ return (0, lodash_1.cloneDeep)(columns) || defaultColumns;
46
+ }, [columns, defaultColumns]);
47
+ const handleChange = (0, react_1.useCallback)((e) => {
48
+ const { name, value } = e.target;
49
+ setFormData(Object.assign(Object.assign({}, formData), { [name]: value }));
50
+ }, [formData]);
51
51
  const handleSubmit = (0, lodash_1.debounce)(() => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
52
- var _b, _c, _d, _e, _f, _g;
53
- const vals = yield ((_b = formRef === null || formRef === void 0 ? void 0 : formRef.current) === null || _b === void 0 ? void 0 : _b.getFieldsValue());
52
+ var _b, _c, _d, _e, _f;
53
+ const vals = formData;
54
54
  if (!vals)
55
55
  return;
56
- const arr = (_d = (_c = Object.keys(vals)) === null || _c === void 0 ? void 0 : _c.map((key) => {
56
+ const arr = (_c = (_b = Object.keys(vals)) === null || _b === void 0 ? void 0 : _b.map((key) => {
57
57
  var _a;
58
58
  return ({
59
59
  name: key,
60
60
  value: (_a = vals[key]) !== null && _a !== void 0 ? _a : ''
61
61
  });
62
- })) === null || _d === void 0 ? void 0 : _d.filter((item) => item === null || item === void 0 ? void 0 : item.value);
62
+ })) === null || _c === void 0 ? void 0 : _c.filter((item) => item === null || item === void 0 ? void 0 : item.value);
63
63
  if (!arr || !(arr === null || arr === void 0 ? void 0 : arr.length))
64
64
  return;
65
65
  setLoading(true);
@@ -68,8 +68,8 @@ const AppointForm = (_a) => {
68
68
  if (res) {
69
69
  if (isExternalLink) {
70
70
  const data = popupDetailData;
71
- const product = (_e = data === null || data === void 0 ? void 0 : data.video) === null || _e === void 0 ? void 0 : _e.bindProduct;
72
- 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;
71
+ const product = (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.bindProduct;
72
+ 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;
73
73
  const position = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
74
74
  jumpToWeb(data, product, cta, position);
75
75
  }
@@ -80,10 +80,15 @@ const AppointForm = (_a) => {
80
80
  }
81
81
  }), 1000);
82
82
  return (react_1.default.createElement("div", { className: 'pb-appoint-form' },
83
- react_1.default.createElement("div", { className: `pb-appoint-form-title ${(0, css_1.css)(Object.assign({}, textStyle))}` }, title),
83
+ react_1.default.createElement("div", { className: `pb-appoint-form-title ${(0, css_1.css)(Object.assign({}, textStyle))}`, dangerouslySetInnerHTML: {
84
+ __html: (0, tool_1.setFontForText)(title, textStyle)
85
+ } }),
84
86
  react_1.default.createElement("div", Object.assign({ className: (0, css_1.css)(Object.assign({}, style)) }, props),
85
- react_1.default.createElement("div", { className: 'pb-appoint-form-container' })),
87
+ react_1.default.createElement("div", { className: 'pb-appoint-form-container' },
88
+ react_1.default.createElement(Form_1.default, { columns: columnsData, layout: layoutType, onChange: handleChange }))),
86
89
  react_1.default.createElement("div", { className: 'pb-appoint-form-btn-wrapper' },
87
- react_1.default.createElement("button", { "aria-label": submitText, 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))));
90
+ react_1.default.createElement("button", { "aria-label": submitText, onClick: handleSubmit, className: 'pb-appoint-form-btn', style: Object.assign({ color: submitColor, background: submitBgColor }, submitButtonStyle), dangerouslySetInnerHTML: {
91
+ __html: (0, tool_1.setFontForText)(loading ? 'loading...' : submitText, submitButtonStyle)
92
+ } }))));
88
93
  };
89
94
  exports.default = (0, react_1.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,8 +1,5 @@
1
1
  "use strict";
2
- var _a, _b, _c;
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
- const tslib_1 = require("tslib");
5
- const defaultSetting_1 = tslib_1.__importStar(require("../../defaultSetting"));
6
3
  exports.default = [
7
4
  {
8
5
  type: 'Text',
@@ -22,14 +19,24 @@ exports.default = [
22
19
  label: '标题字体',
23
20
  child: [
24
21
  {
25
- type: 'Color',
26
- name: ['textStyle', 'color']
22
+ type: 'Select',
23
+ name: ['testStyle', 'fontFamily-cn'],
24
+ bottomText: '中文字体'
27
25
  },
28
26
  {
29
27
  type: 'Select',
30
- name: ['textStyle', 'fontFamily'],
31
- options: defaultSetting_1.fontOptions,
32
- initialValue: (_a = defaultSetting_1.fontOptions === null || defaultSetting_1.fontOptions === void 0 ? void 0 : defaultSetting_1.fontOptions[0]) === null || _a === void 0 ? void 0 : _a.value
28
+ name: ['testStyle', 'fontFamily-en'],
29
+ bottomText: '英文/其他字体'
30
+ }
31
+ ]
32
+ },
33
+ {
34
+ type: 'Group',
35
+ label: '',
36
+ child: [
37
+ {
38
+ type: 'Color',
39
+ name: ['textStyle', 'color']
33
40
  },
34
41
  {
35
42
  type: 'Number',
@@ -77,15 +84,25 @@ exports.default = [
77
84
  label: '提交按钮字体',
78
85
  child: [
79
86
  {
80
- type: 'Color',
81
- name: ['props', 'submitButtonStyle', 'color'],
82
- initialValue: '#fff'
87
+ type: 'Select',
88
+ name: ['props', 'submitButtonStyle', 'fontFamily-cn'],
89
+ bottomText: '中文字体'
83
90
  },
84
91
  {
85
92
  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
93
+ name: ['props', 'submitButtonStyle', 'fontFamily-en'],
94
+ bottomText: '英文/其他字体'
95
+ }
96
+ ]
97
+ },
98
+ {
99
+ type: 'Group',
100
+ label: '',
101
+ child: [
102
+ {
103
+ type: 'Color',
104
+ name: ['props', 'submitButtonStyle', 'color'],
105
+ initialValue: '#fff'
89
106
  },
90
107
  {
91
108
  type: 'Number',