pb-sxp-ui 1.9.7 → 1.10.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 (68) hide show
  1. package/dist/index.cjs +525 -167
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +35 -0
  4. package/dist/index.js +525 -167
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.cjs +7 -3
  7. package/dist/index.min.cjs.map +1 -1
  8. package/dist/index.min.js +7 -3
  9. package/dist/index.min.js.map +1 -1
  10. package/dist/pb-ui.js +525 -167
  11. package/dist/pb-ui.js.map +1 -1
  12. package/dist/pb-ui.min.js +7 -3
  13. package/dist/pb-ui.min.js.map +1 -1
  14. package/es/core/Pagebuilder/index.js +3 -4
  15. package/es/core/components/SxpPageCore/index.d.ts +1 -1
  16. package/es/core/components/SxpPageCore/index.js +7 -6
  17. package/es/core/components/SxpPageRender/NavBack.d.ts +9 -0
  18. package/es/core/components/SxpPageRender/NavBack.js +16 -0
  19. package/es/core/components/SxpPageRender/PictureGroup/index.js +3 -1
  20. package/es/core/components/SxpPageRender/index.d.ts +2 -0
  21. package/es/core/components/SxpPageRender/index.js +30 -22
  22. package/es/core/components/SxpPageRender/typing.d.ts +1 -0
  23. package/es/core/context/EditorContext.d.ts +2 -0
  24. package/es/core/context/EditorContext.js +9 -3
  25. package/es/core/context/EditorDataProvider.d.ts +2 -0
  26. package/es/core/context/EditorDataProvider.js +4 -1
  27. package/es/core/context/SxpDataSourceProvider.d.ts +4 -2
  28. package/es/core/context/SxpDataSourceProvider.js +83 -52
  29. package/es/core/utils/materials.d.ts +1 -1
  30. package/es/materials/sxp/MultiPosts/index.d.ts +26 -0
  31. package/es/materials/sxp/MultiPosts/index.js +98 -0
  32. package/es/materials/sxp/MultiPosts/interactionRender.d.ts +9 -0
  33. package/es/materials/sxp/MultiPosts/interactionRender.js +42 -0
  34. package/es/materials/sxp/MultiPosts/material.d.ts +2 -0
  35. package/es/materials/sxp/MultiPosts/material.js +22 -0
  36. package/es/materials/sxp/MultiPosts/settingRender.d.ts +73 -0
  37. package/es/materials/sxp/MultiPosts/settingRender.js +115 -0
  38. package/es/materials/sxp/index.d.ts +1 -0
  39. package/es/materials/sxp/index.js +1 -0
  40. package/es/materials/sxp/template/components/EventProvider.js +5 -5
  41. package/lib/core/Pagebuilder/index.js +3 -4
  42. package/lib/core/components/SxpPageCore/index.d.ts +1 -1
  43. package/lib/core/components/SxpPageCore/index.js +6 -5
  44. package/lib/core/components/SxpPageRender/NavBack.d.ts +9 -0
  45. package/lib/core/components/SxpPageRender/NavBack.js +19 -0
  46. package/lib/core/components/SxpPageRender/PictureGroup/index.js +3 -1
  47. package/lib/core/components/SxpPageRender/index.d.ts +2 -0
  48. package/lib/core/components/SxpPageRender/index.js +30 -22
  49. package/lib/core/components/SxpPageRender/typing.d.ts +1 -0
  50. package/lib/core/context/EditorContext.d.ts +2 -0
  51. package/lib/core/context/EditorContext.js +9 -3
  52. package/lib/core/context/EditorDataProvider.d.ts +2 -0
  53. package/lib/core/context/EditorDataProvider.js +4 -1
  54. package/lib/core/context/SxpDataSourceProvider.d.ts +4 -2
  55. package/lib/core/context/SxpDataSourceProvider.js +83 -52
  56. package/lib/core/utils/materials.d.ts +1 -1
  57. package/lib/materials/sxp/MultiPosts/index.d.ts +26 -0
  58. package/lib/materials/sxp/MultiPosts/index.js +100 -0
  59. package/lib/materials/sxp/MultiPosts/interactionRender.d.ts +9 -0
  60. package/lib/materials/sxp/MultiPosts/interactionRender.js +44 -0
  61. package/lib/materials/sxp/MultiPosts/material.d.ts +2 -0
  62. package/lib/materials/sxp/MultiPosts/material.js +26 -0
  63. package/lib/materials/sxp/MultiPosts/settingRender.d.ts +73 -0
  64. package/lib/materials/sxp/MultiPosts/settingRender.js +117 -0
  65. package/lib/materials/sxp/index.d.ts +1 -0
  66. package/lib/materials/sxp/index.js +1 -0
  67. package/lib/materials/sxp/template/components/EventProvider.js +5 -5
  68. package/package.json +1 -1
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = [
4
+ {
5
+ title: '背景设置',
6
+ child: [
7
+ {
8
+ label: '背景图',
9
+ type: 'Upload',
10
+ name: ['props', 'bgImgUrl']
11
+ },
12
+ {
13
+ type: 'Group',
14
+ label: '返回按钮',
15
+ child: [
16
+ {
17
+ type: 'Switch',
18
+ name: ['props', 'backButton', 'enable']
19
+ },
20
+ {
21
+ type: 'Upload',
22
+ name: ['props', 'backButton', 'icon'],
23
+ text: '建议尺寸:100 * 76'
24
+ }
25
+ ]
26
+ },
27
+ {
28
+ type: 'Group',
29
+ label: '',
30
+ child: [
31
+ {
32
+ type: 'Select',
33
+ name: ['props', 'backButton', 'xPosit'],
34
+ options: [
35
+ {
36
+ label: '相对左侧',
37
+ value: 'left'
38
+ },
39
+ {
40
+ label: '相对右侧',
41
+ value: 'right'
42
+ }
43
+ ],
44
+ initialValue: 'left'
45
+ },
46
+ {
47
+ type: 'Number',
48
+ name: ['props', 'backButton', 'x'],
49
+ addonAfter: 'X'
50
+ }
51
+ ]
52
+ },
53
+ {
54
+ type: 'Group',
55
+ label: '',
56
+ child: [
57
+ {
58
+ type: 'Select',
59
+ name: ['props', 'backButton', 'yPosit'],
60
+ options: [
61
+ {
62
+ label: '相对底部',
63
+ value: 'bottom'
64
+ },
65
+ {
66
+ label: '相对顶部',
67
+ value: 'top'
68
+ }
69
+ ],
70
+ initialValue: 'top'
71
+ },
72
+ {
73
+ type: 'Number',
74
+ name: ['props', 'backButton', 'y'],
75
+ addonAfter: 'Y',
76
+ initialValue: 0
77
+ }
78
+ ]
79
+ }
80
+ ]
81
+ },
82
+ {
83
+ title: '按钮设置',
84
+ child: [
85
+ {
86
+ type: 'Group',
87
+ child: [
88
+ {
89
+ type: 'Upload',
90
+ name: ['props', 'button1Url'],
91
+ text: '按钮1'
92
+ },
93
+ {
94
+ type: 'Upload',
95
+ name: ['props', 'button2Url'],
96
+ text: '按钮2'
97
+ }
98
+ ]
99
+ },
100
+ {
101
+ type: 'Group',
102
+ child: [
103
+ {
104
+ type: 'Upload',
105
+ name: ['props', 'button3Url'],
106
+ text: '按钮3'
107
+ },
108
+ {
109
+ type: 'Upload',
110
+ name: ['props', 'button4Url'],
111
+ text: '按钮4'
112
+ }
113
+ ]
114
+ }
115
+ ]
116
+ }
117
+ ];
@@ -4,3 +4,4 @@ export * from './HashTag/material';
4
4
  export * from './Consent/material';
5
5
  export * from './cta';
6
6
  export * from './consentPopup';
7
+ export * from './MultiPosts/material';
@@ -7,3 +7,4 @@ tslib_1.__exportStar(require("./HashTag/material"), exports);
7
7
  tslib_1.__exportStar(require("./Consent/material"), exports);
8
8
  tslib_1.__exportStar(require("./cta"), exports);
9
9
  tslib_1.__exportStar(require("./consentPopup"), exports);
10
+ tslib_1.__exportStar(require("./MultiPosts/material"), exports);
@@ -13,9 +13,9 @@ const EventProvider = (_a) => {
13
13
  const { jumpToWeb } = (0, useEventReport_1.useEventReport)();
14
14
  const [element, setElement] = (0, react_1.useState)(null);
15
15
  const handleClick = (0, lodash_1.throttle)((event) => {
16
- var _a, _b, _c, _d, _e, _f, _g;
16
+ var _a, _b, _c, _d, _e, _f;
17
17
  event.preventDefault();
18
- const item = (_c = (_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct) !== null && _b !== void 0 ? _b : rec === null || rec === void 0 ? void 0 : rec.video) !== null && _c !== void 0 ? _c : multItem;
18
+ const item = multItem ? multItem : (_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct) !== null && _b !== void 0 ? _b : rec === null || rec === void 0 ? void 0 : rec.video;
19
19
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
20
20
  eventSubject: 'clickCta',
21
21
  eventDescription: 'User clicked the CTA'
@@ -24,10 +24,10 @@ const EventProvider = (_a) => {
24
24
  ? Object.assign(Object.assign({}, rec), { video: Object.assign(Object.assign({}, rec === null || rec === void 0 ? void 0 : rec.video), { bindProduct: multItem }), index, multiCheckIndex }) : Object.assign(Object.assign({}, rec), { index }));
25
25
  setElement(ref === null || ref === void 0 ? void 0 : ref.current);
26
26
  if (isExternalLink) {
27
- const link = ((_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindProduct) === null || _e === void 0 ? void 0 : _e.link) || (multItem === null || multItem === void 0 ? void 0 : multItem.link);
27
+ const link = ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) === null || _d === void 0 ? void 0 : _d.link) || (multItem === null || multItem === void 0 ? void 0 : multItem.link);
28
28
  if (jumpLink || link) {
29
- const cta = ((_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindCta) || (multItem === null || multItem === void 0 ? void 0 : multItem.bindCta);
30
- const product = ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.bindProduct) || multItem;
29
+ const cta = ((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta) || (multItem === null || multItem === void 0 ? void 0 : multItem.bindCta);
30
+ const product = ((_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct) || multItem;
31
31
  jumpToWeb(rec, product, cta, index);
32
32
  window.location.href = window.getJointUtmLink(jumpLink || link || '');
33
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.9.7",
3
+ "version": "1.10.0",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",