pb-sxp-ui 1.4.4 → 1.5.1

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 (91) hide show
  1. package/dist/index.cjs +171 -125
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +171 -125
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.cjs +3 -3
  6. package/dist/index.min.cjs.map +1 -1
  7. package/dist/index.min.js +3 -3
  8. package/dist/index.min.js.map +1 -1
  9. package/dist/pb-ui.js +171 -125
  10. package/dist/pb-ui.js.map +1 -1
  11. package/dist/pb-ui.min.js +3 -3
  12. package/dist/pb-ui.min.js.map +1 -1
  13. package/es/core/components/SxpPageRender/WaterFall/List.js +7 -15
  14. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +7 -15
  15. package/es/core/components/SxpPageRender/index.d.ts +6 -0
  16. package/es/core/components/SxpPageRender/index.js +2 -0
  17. package/es/core/context/SxpDataSourceProvider.js +2 -0
  18. package/es/core/utils/materials.d.ts +7 -0
  19. package/es/core/utils/materials.js +54 -0
  20. package/es/materials/sxp/HashTag/settingRender.d.ts +5 -0
  21. package/es/materials/sxp/HashTag/settingRender.js +2 -1
  22. package/es/materials/sxp/cta/AniLink/interactionRender.d.ts +1 -0
  23. package/es/materials/sxp/cta/AniLink/interactionRender.js +2 -1
  24. package/es/materials/sxp/cta/AniLinkPopup/interactionRender.d.ts +1 -0
  25. package/es/materials/sxp/cta/AniLinkPopup/interactionRender.js +2 -1
  26. package/es/materials/sxp/popup/CommodityDetail/index.js +7 -15
  27. package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +7 -0
  28. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +2 -1
  29. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +7 -15
  30. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +6 -0
  31. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +2 -1
  32. package/es/materials/sxp/popup/CommodityList/index.js +9 -15
  33. package/es/materials/sxp/popup/CommodityList/settingRender.d.ts +5 -0
  34. package/es/materials/sxp/popup/CommodityList/settingRender.js +2 -1
  35. package/es/materials/sxp/template/Appoint/interactionRender.d.ts +1 -0
  36. package/es/materials/sxp/template/Appoint/interactionRender.js +2 -1
  37. package/es/materials/sxp/template/Commodity/interactionRender.d.ts +1 -0
  38. package/es/materials/sxp/template/Commodity/interactionRender.js +2 -1
  39. package/es/materials/sxp/template/CommodityDiro/interactionRender.d.ts +1 -0
  40. package/es/materials/sxp/template/CommodityDiro/interactionRender.js +2 -1
  41. package/es/materials/sxp/template/CommodityDiroNew/interactionRender.d.ts +1 -0
  42. package/es/materials/sxp/template/CommodityDiroNew/interactionRender.js +2 -1
  43. package/es/materials/sxp/template/Link/interactionRender.d.ts +1 -0
  44. package/es/materials/sxp/template/Link/interactionRender.js +2 -1
  45. package/es/materials/sxp/template/Link/material.js +1 -1
  46. package/es/materials/sxp/template/MultiCommodity/interactionRender.d.ts +1 -0
  47. package/es/materials/sxp/template/MultiCommodity/interactionRender.js +2 -1
  48. package/es/materials/sxp/template/MultiCommodityDiro/interactionRender.d.ts +1 -0
  49. package/es/materials/sxp/template/MultiCommodityDiro/interactionRender.js +2 -1
  50. package/es/materials/sxp/template/MultiCommodityDiroNew/interactionRender.d.ts +1 -0
  51. package/es/materials/sxp/template/MultiCommodityDiroNew/interactionRender.js +2 -1
  52. package/lib/core/components/SxpPageRender/WaterFall/List.js +7 -15
  53. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +7 -15
  54. package/lib/core/components/SxpPageRender/index.d.ts +6 -0
  55. package/lib/core/components/SxpPageRender/index.js +2 -0
  56. package/lib/core/context/SxpDataSourceProvider.js +2 -0
  57. package/lib/core/utils/materials.d.ts +7 -0
  58. package/lib/core/utils/materials.js +56 -1
  59. package/lib/materials/sxp/HashTag/settingRender.d.ts +5 -0
  60. package/lib/materials/sxp/HashTag/settingRender.js +2 -1
  61. package/lib/materials/sxp/cta/AniLink/interactionRender.d.ts +1 -0
  62. package/lib/materials/sxp/cta/AniLink/interactionRender.js +2 -1
  63. package/lib/materials/sxp/cta/AniLinkPopup/interactionRender.d.ts +1 -0
  64. package/lib/materials/sxp/cta/AniLinkPopup/interactionRender.js +2 -1
  65. package/lib/materials/sxp/popup/CommodityDetail/index.js +7 -15
  66. package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +7 -0
  67. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +2 -1
  68. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +7 -15
  69. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +6 -0
  70. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +2 -1
  71. package/lib/materials/sxp/popup/CommodityList/index.js +9 -15
  72. package/lib/materials/sxp/popup/CommodityList/settingRender.d.ts +5 -0
  73. package/lib/materials/sxp/popup/CommodityList/settingRender.js +2 -1
  74. package/lib/materials/sxp/template/Appoint/interactionRender.d.ts +1 -0
  75. package/lib/materials/sxp/template/Appoint/interactionRender.js +2 -1
  76. package/lib/materials/sxp/template/Commodity/interactionRender.d.ts +1 -0
  77. package/lib/materials/sxp/template/Commodity/interactionRender.js +2 -1
  78. package/lib/materials/sxp/template/CommodityDiro/interactionRender.d.ts +1 -0
  79. package/lib/materials/sxp/template/CommodityDiro/interactionRender.js +2 -1
  80. package/lib/materials/sxp/template/CommodityDiroNew/interactionRender.d.ts +1 -0
  81. package/lib/materials/sxp/template/CommodityDiroNew/interactionRender.js +2 -1
  82. package/lib/materials/sxp/template/Link/interactionRender.d.ts +1 -0
  83. package/lib/materials/sxp/template/Link/interactionRender.js +2 -1
  84. package/lib/materials/sxp/template/Link/material.js +1 -1
  85. package/lib/materials/sxp/template/MultiCommodity/interactionRender.d.ts +1 -0
  86. package/lib/materials/sxp/template/MultiCommodity/interactionRender.js +2 -1
  87. package/lib/materials/sxp/template/MultiCommodityDiro/interactionRender.d.ts +1 -0
  88. package/lib/materials/sxp/template/MultiCommodityDiro/interactionRender.js +2 -1
  89. package/lib/materials/sxp/template/MultiCommodityDiroNew/interactionRender.d.ts +1 -0
  90. package/lib/materials/sxp/template/MultiCommodityDiroNew/interactionRender.js +2 -1
  91. package/package.json +1 -1
@@ -9,30 +9,24 @@ const useEventReport_1 = require("../../../../core/hooks/useEventReport");
9
9
  const tool_1 = require("../../../../core/utils/tool");
10
10
  const Img_1 = tslib_1.__importDefault(require("../../template/components/Img"));
11
11
  const lodash_1 = require("lodash");
12
+ const materials_1 = require("../../../../core/utils/materials");
12
13
  const CommodityList = (_a) => {
13
14
  var _b, _c, _d;
14
15
  var { style, isDefault, rec, viewTime, isPost, bottom_image, commodityStyles, buttonStyle, translateY = 0, commodityPicture, isExternalLink, onClick } = _a, props = tslib_1.__rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "commodityStyles", "buttonStyle", "translateY", "commodityPicture", "isExternalLink", "onClick"]);
15
- const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent } = (0, hooks_1.useSxpDataSource)();
16
+ const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent, globalConfig } = (0, hooks_1.useSxpDataSource)();
16
17
  const { jumpToWeb } = (0, useEventReport_1.useEventReport)();
17
18
  const { popup } = (0, hooks_1.useEditor)();
18
19
  const recData = isPost ? rec : popupDetailData;
19
20
  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];
20
21
  const index = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
21
22
  const priceText = (0, react_1.useCallback)((product) => {
22
- var _a, _b, _c, _d, _e, _f, _g;
23
- const isToLocStr = ((_a = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice) === undefined || ((_b = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _b === void 0 ? void 0 : _b.enableFormattedPrice);
24
- if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
25
- return `${(_e = (_d = (_c = product === null || product === void 0 ? void 0 : product.currency) === null || _c === void 0 ? void 0 : _c.split('-')[1]) === null || _d === void 0 ? void 0 : _d.toUpperCase()) !== null && _e !== void 0 ? _e : ''}${isToLocStr
26
- ? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
27
- minimumFractionDigits: 0
28
- })) !== null && _g !== void 0 ? _g : ''
29
- : product === null || product === void 0 ? void 0 : product.price}`;
30
- }
31
- else {
32
- const p = 7000;
33
- return `$${isToLocStr ? p === null || p === void 0 ? void 0 : p.toLocaleString() : p}`;
34
- }
35
- }, [(_d = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _d === void 0 ? void 0 : _d.enableFormattedPrice]);
23
+ var _a;
24
+ return (0, materials_1.getPriceText)({
25
+ product,
26
+ enableFormattedPrice: (_a = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice,
27
+ globalConfig
28
+ });
29
+ }, [(_d = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _d === void 0 ? void 0 : _d.enableFormattedPrice, globalConfig]);
36
30
  const handleClick = (0, lodash_1.throttle)((item, multiCheckIndex) => {
37
31
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
38
32
  eventSubject: 'clickCta',
@@ -62,6 +62,7 @@ declare const _default: ({
62
62
  name: string[];
63
63
  initialValue: string;
64
64
  child?: undefined;
65
+ belong?: undefined;
65
66
  } | {
66
67
  type: string;
67
68
  label: string;
@@ -73,6 +74,7 @@ declare const _default: ({
73
74
  options?: undefined;
74
75
  name?: undefined;
75
76
  initialValue?: undefined;
77
+ belong?: undefined;
76
78
  } | {
77
79
  type: string;
78
80
  label: string;
@@ -88,6 +90,7 @@ declare const _default: ({
88
90
  options?: undefined;
89
91
  name?: undefined;
90
92
  initialValue?: undefined;
93
+ belong?: undefined;
91
94
  } | {
92
95
  label: string;
93
96
  type: string;
@@ -95,11 +98,13 @@ declare const _default: ({
95
98
  name?: undefined;
96
99
  initialValue?: undefined;
97
100
  child?: undefined;
101
+ belong?: undefined;
98
102
  } | {
99
103
  label: string;
100
104
  type: string;
101
105
  name: string[];
102
106
  initialValue: boolean;
107
+ belong: string;
103
108
  options?: undefined;
104
109
  child?: undefined;
105
110
  })[];
@@ -142,7 +142,8 @@ exports.default = [
142
142
  label: '价格千分符展示',
143
143
  type: 'Switch',
144
144
  name: ['enableFormattedPrice'],
145
- initialValue: true
145
+ initialValue: true,
146
+ belong: 'price'
146
147
  }
147
148
  ]
148
149
  }
@@ -3,6 +3,7 @@ declare const _default: {
3
3
  child: {
4
4
  type: string;
5
5
  name: string;
6
+ hiddenUrl: boolean;
6
7
  }[];
7
8
  }[];
8
9
  export default _default;
@@ -6,7 +6,8 @@ exports.default = [
6
6
  child: [
7
7
  {
8
8
  type: 'link',
9
- name: 'onClick'
9
+ name: 'onClick',
10
+ hiddenUrl: true
10
11
  }
11
12
  ]
12
13
  }
@@ -3,6 +3,7 @@ declare const _default: {
3
3
  child: {
4
4
  type: string;
5
5
  name: string;
6
+ hiddenUrl: boolean;
6
7
  }[];
7
8
  }[];
8
9
  export default _default;
@@ -6,7 +6,8 @@ exports.default = [
6
6
  child: [
7
7
  {
8
8
  type: 'link',
9
- name: 'onClick'
9
+ name: 'onClick',
10
+ hiddenUrl: true
10
11
  }
11
12
  ]
12
13
  }
@@ -3,6 +3,7 @@ declare const _default: {
3
3
  child: {
4
4
  type: string;
5
5
  name: string;
6
+ hiddenUrl: boolean;
6
7
  }[];
7
8
  }[];
8
9
  export default _default;
@@ -6,7 +6,8 @@ exports.default = [
6
6
  child: [
7
7
  {
8
8
  type: 'link',
9
- name: 'onClick'
9
+ name: 'onClick',
10
+ hiddenUrl: true
10
11
  }
11
12
  ]
12
13
  }
@@ -3,6 +3,7 @@ declare const _default: {
3
3
  child: {
4
4
  type: string;
5
5
  name: string;
6
+ hiddenUrl: boolean;
6
7
  }[];
7
8
  }[];
8
9
  export default _default;
@@ -6,7 +6,8 @@ exports.default = [
6
6
  child: [
7
7
  {
8
8
  type: 'link',
9
- name: 'onClick'
9
+ name: 'onClick',
10
+ hiddenUrl: true
10
11
  }
11
12
  ]
12
13
  }
@@ -3,6 +3,7 @@ declare const _default: {
3
3
  child: {
4
4
  type: string;
5
5
  name: string;
6
+ hiddenUrl: boolean;
6
7
  }[];
7
8
  }[];
8
9
  export default _default;
@@ -6,7 +6,8 @@ exports.default = [
6
6
  child: [
7
7
  {
8
8
  type: 'link',
9
- name: 'onClick'
9
+ name: 'onClick',
10
+ hiddenUrl: true
10
11
  }
11
12
  ]
12
13
  }
@@ -9,7 +9,7 @@ const _1 = tslib_1.__importDefault(require("."));
9
9
  const create_1 = require("../../../../core/create");
10
10
  const interactionRender_1 = tslib_1.__importDefault(require("./interactionRender"));
11
11
  const Link = (0, create_1.createMaterial)(_1.default, {
12
- displayName: '跳转指引',
12
+ displayName: '普通CTA',
13
13
  icon: '',
14
14
  category: 'template',
15
15
  type: 'Link',
@@ -3,6 +3,7 @@ declare const _default: {
3
3
  child: {
4
4
  type: string;
5
5
  name: string;
6
+ hiddenUrl: boolean;
6
7
  }[];
7
8
  }[];
8
9
  export default _default;
@@ -6,7 +6,8 @@ exports.default = [
6
6
  child: [
7
7
  {
8
8
  type: 'link',
9
- name: 'onClick'
9
+ name: 'onClick',
10
+ hiddenUrl: true
10
11
  }
11
12
  ]
12
13
  }
@@ -3,6 +3,7 @@ declare const _default: {
3
3
  child: {
4
4
  type: string;
5
5
  name: string;
6
+ hiddenUrl: boolean;
6
7
  }[];
7
8
  }[];
8
9
  export default _default;
@@ -6,7 +6,8 @@ exports.default = [
6
6
  child: [
7
7
  {
8
8
  type: 'link',
9
- name: 'onClick'
9
+ name: 'onClick',
10
+ hiddenUrl: true
10
11
  }
11
12
  ]
12
13
  }
@@ -3,6 +3,7 @@ declare const _default: {
3
3
  child: {
4
4
  type: string;
5
5
  name: string;
6
+ hiddenUrl: boolean;
6
7
  }[];
7
8
  }[];
8
9
  export default _default;
@@ -6,7 +6,8 @@ exports.default = [
6
6
  child: [
7
7
  {
8
8
  type: 'link',
9
- name: 'onClick'
9
+ name: 'onClick',
10
+ hiddenUrl: true
10
11
  }
11
12
  ]
12
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.4.4",
3
+ "version": "1.5.1",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",