pb-sxp-ui 14.0.6 → 14.0.7

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 (66) hide show
  1. package/dist/index.cjs +801 -396
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +89 -0
  4. package/dist/index.js +801 -396
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.cjs +4 -4
  7. package/dist/index.min.cjs.map +1 -1
  8. package/dist/index.min.js +4 -4
  9. package/dist/index.min.js.map +1 -1
  10. package/dist/pb-ui.js +801 -396
  11. package/dist/pb-ui.js.map +1 -1
  12. package/dist/pb-ui.min.js +4 -4
  13. package/dist/pb-ui.min.js.map +1 -1
  14. package/es/core/components/SxpPageRender/ConsentPopup.js +8 -8
  15. package/es/core/components/SxpPageRender/Navbar.js +1 -1
  16. package/es/core/components/SxpPageRender/WaterFall/preview.json +207 -272
  17. package/es/core/components/SxpPageRender/index.js +5 -2
  18. package/es/core/context/SxpDataSourceProvider.js +54 -22
  19. package/es/core/utils/materials.js +5 -3
  20. package/es/materials/sxp/consentPopup/Click/index.d.ts +19 -0
  21. package/es/materials/sxp/consentPopup/Click/index.js +19 -0
  22. package/es/materials/sxp/consentPopup/Click/material.d.ts +2 -0
  23. package/es/materials/sxp/consentPopup/Click/material.js +48 -0
  24. package/es/materials/sxp/consentPopup/Click/settingRender.d.ts +63 -0
  25. package/es/materials/sxp/consentPopup/Click/settingRender.js +210 -0
  26. package/es/materials/sxp/consentPopup/Display/index.d.ts +2 -2
  27. package/es/materials/sxp/consentPopup/Display/index.js +7 -5
  28. package/es/materials/sxp/consentPopup/Swipe/index.d.ts +12 -0
  29. package/es/materials/sxp/consentPopup/Swipe/index.js +44 -0
  30. package/es/materials/sxp/consentPopup/Swipe/material.d.ts +2 -0
  31. package/es/materials/sxp/consentPopup/Swipe/material.js +24 -0
  32. package/es/materials/sxp/consentPopup/Swipe/settingRender.d.ts +29 -0
  33. package/es/materials/sxp/consentPopup/Swipe/settingRender.js +43 -0
  34. package/es/materials/sxp/consentPopup/index.d.ts +2 -0
  35. package/es/materials/sxp/consentPopup/index.js +2 -0
  36. package/es/materials/sxp/cta/AniLink/index.js +1 -1
  37. package/es/materials/sxp/cta/AniLinkPopup/index.js +1 -1
  38. package/es/materials/sxp/popup/ConsentDetail/index.d.ts +2 -1
  39. package/es/materials/sxp/popup/ConsentDetail/index.js +2 -2
  40. package/lib/core/components/SxpPageRender/ConsentPopup.js +7 -7
  41. package/lib/core/components/SxpPageRender/Navbar.js +1 -1
  42. package/lib/core/components/SxpPageRender/WaterFall/preview.json +207 -272
  43. package/lib/core/components/SxpPageRender/index.js +5 -2
  44. package/lib/core/context/SxpDataSourceProvider.js +54 -22
  45. package/lib/core/utils/materials.js +5 -3
  46. package/lib/materials/sxp/consentPopup/Click/index.d.ts +19 -0
  47. package/lib/materials/sxp/consentPopup/Click/index.js +21 -0
  48. package/lib/materials/sxp/consentPopup/Click/material.d.ts +2 -0
  49. package/lib/materials/sxp/consentPopup/Click/material.js +52 -0
  50. package/lib/materials/sxp/consentPopup/Click/settingRender.d.ts +63 -0
  51. package/lib/materials/sxp/consentPopup/Click/settingRender.js +212 -0
  52. package/lib/materials/sxp/consentPopup/Display/index.d.ts +2 -2
  53. package/lib/materials/sxp/consentPopup/Display/index.js +7 -5
  54. package/lib/materials/sxp/consentPopup/Swipe/index.d.ts +12 -0
  55. package/lib/materials/sxp/consentPopup/Swipe/index.js +46 -0
  56. package/lib/materials/sxp/consentPopup/Swipe/material.d.ts +2 -0
  57. package/lib/materials/sxp/consentPopup/Swipe/material.js +28 -0
  58. package/lib/materials/sxp/consentPopup/Swipe/settingRender.d.ts +29 -0
  59. package/lib/materials/sxp/consentPopup/Swipe/settingRender.js +45 -0
  60. package/lib/materials/sxp/consentPopup/index.d.ts +2 -0
  61. package/lib/materials/sxp/consentPopup/index.js +2 -0
  62. package/lib/materials/sxp/cta/AniLink/index.js +1 -1
  63. package/lib/materials/sxp/cta/AniLinkPopup/index.js +1 -1
  64. package/lib/materials/sxp/popup/ConsentDetail/index.d.ts +2 -1
  65. package/lib/materials/sxp/popup/ConsentDetail/index.js +2 -2
  66. package/package.json +1 -1
@@ -1,15 +1,15 @@
1
- import React, { memo, useMemo } from 'react';
1
+ import React, { memo } from 'react';
2
2
  import './index.less';
3
3
  import withBindDataSource from '../../../core/hoc/withBindDataSource';
4
- import { getContsentState } from '../../../core/utils/localStore';
4
+ import { useEditorDataProvider } from '../../../core/context/EditorDataProvider';
5
5
  const Consent = ({ resolver, globalConfig }) => {
6
6
  var _a, _b;
7
- const contsentState = useMemo(() => {
8
- return getContsentState();
9
- }, []);
10
- const t = resolver === null || resolver === void 0 ? void 0 : resolver['Display'];
11
- const Component = withBindDataSource(t);
7
+ const { consentPopupCate } = useEditorDataProvider();
12
8
  const value = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consentPopup) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item;
13
- return React.createElement(Component, Object.assign({}, value === null || value === void 0 ? void 0 : value.props, { style: value === null || value === void 0 ? void 0 : value.style, event: (value === null || value === void 0 ? void 0 : value.event) || {}, contsentState: contsentState }));
9
+ if (!value)
10
+ return null;
11
+ const t = resolver === null || resolver === void 0 ? void 0 : resolver[value === null || value === void 0 ? void 0 : value.type];
12
+ const Component = withBindDataSource(t);
13
+ return (React.createElement(Component, Object.assign({}, value === null || value === void 0 ? void 0 : value.props, { style: value === null || value === void 0 ? void 0 : value.style, event: (value === null || value === void 0 ? void 0 : value.event) || {}, consentPopupCate: consentPopupCate })));
14
14
  };
15
15
  export default memo(Consent);
@@ -8,7 +8,7 @@ const Navbar = ({ icon, styles, textStyle, onClose }) => {
8
8
  React.createElement("button", { className: 'clc-sxp-nav-left', role: 'button', "aria-label": 'back button', onClick: onClose },
9
9
  React.createElement("img", { src: icon, alt: 'back button' })),
10
10
  React.createElement("div", { className: 'clc-sxp-nav-title', style: Object.assign(Object.assign({}, textStyle), { paddingLeft: (textStyle === null || textStyle === void 0 ? void 0 : textStyle.textAlign) === 'left' ? '35px' : 0 }), dangerouslySetInnerHTML: {
11
- __html: setFontForText(`#${(_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag) !== null && _a !== void 0 ? _a : '标题'}`, textStyle)
11
+ __html: setFontForText(`#${(_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag) !== null && _a !== void 0 ? _a : 'title'}`, textStyle)
12
12
  } })));
13
13
  };
14
14
  export default memo(Navbar);