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.
- package/dist/index.cjs +2260 -861
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +356 -175
- package/dist/index.js +2260 -861
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +2260 -861
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/Pagebuilder/type.d.ts +1 -0
- package/es/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +0 -1
- package/es/core/components/SxpPageRender/FingerSwipeTip/index.js +3 -3
- package/es/core/components/SxpPageRender/Hashtag/index.js +1 -3
- package/es/core/components/SxpPageRender/Modal/index.d.ts +3 -0
- package/es/core/components/SxpPageRender/Modal/index.js +70 -6
- package/es/core/components/SxpPageRender/Navbar.js +1 -1
- package/es/core/components/SxpPageRender/Popup/index.js +1 -1
- package/es/core/components/SxpPageRender/RenderCard.d.ts +1 -0
- package/es/core/components/SxpPageRender/RenderCard.js +16 -12
- package/es/core/components/SxpPageRender/VideoWidget/index.js +10 -13
- package/es/core/components/SxpPageRender/WaterFall/List.js +1 -1
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +1 -1
- package/es/core/components/SxpPageRender/index.d.ts +3 -3
- package/es/core/components/SxpPageRender/index.js +51 -17
- package/es/core/components/SxpPageRender/typing.d.ts +1 -0
- package/es/core/context/SxpDataSourceProvider.d.ts +1 -0
- package/es/core/context/SxpDataSourceProvider.js +6 -3
- package/es/core/utils/localStore.d.ts +3 -0
- package/es/core/utils/localStore.js +8 -0
- package/es/materials/sxp/HashTag/material.js +1 -2
- package/es/materials/sxp/cta/AniLink/index.d.ts +14 -0
- package/es/materials/sxp/cta/AniLink/index.js +58 -0
- package/es/materials/sxp/cta/AniLink/interactionRender.d.ts +42 -0
- package/es/materials/sxp/cta/AniLink/interactionRender.js +50 -0
- package/es/materials/sxp/cta/AniLink/material.d.ts +2 -0
- package/es/materials/sxp/cta/AniLink/material.js +38 -0
- package/es/materials/sxp/cta/AniLink/settingRender.d.ts +73 -0
- package/es/materials/sxp/cta/AniLink/settingRender.js +103 -0
- package/es/materials/sxp/cta/AniLinkPopup/index.d.ts +17 -0
- package/es/materials/sxp/cta/AniLinkPopup/index.js +65 -0
- package/es/materials/sxp/cta/AniLinkPopup/interactionRender.d.ts +42 -0
- package/es/materials/sxp/cta/AniLinkPopup/interactionRender.js +50 -0
- package/es/materials/sxp/cta/AniLinkPopup/material.d.ts +2 -0
- package/es/materials/sxp/cta/AniLinkPopup/material.js +52 -0
- package/es/materials/sxp/cta/AniLinkPopup/settingRender.d.ts +176 -0
- package/es/materials/sxp/cta/AniLinkPopup/settingRender.js +249 -0
- package/es/materials/sxp/cta/index.d.ts +2 -0
- package/es/materials/sxp/cta/index.js +2 -0
- package/es/materials/sxp/index.d.ts +1 -0
- package/es/materials/sxp/index.js +1 -0
- package/es/materials/sxp/popup/AppointForm/Form.js +1 -1
- package/es/materials/sxp/popup/CommodityDetail/index.d.ts +5 -0
- package/es/materials/sxp/popup/CommodityDetail/index.js +43 -26
- package/es/materials/sxp/popup/CommodityDetail/interactionRender.d.ts +9 -0
- package/es/materials/sxp/popup/CommodityDetail/interactionRender.js +12 -0
- package/es/materials/sxp/popup/CommodityDetail/material.js +3 -1
- package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +37 -0
- package/es/materials/sxp/popup/CommodityDetail/settingRender.js +41 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +5 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +11 -25
- package/es/materials/sxp/popup/CommodityDetailDiroNew/interactionRender.d.ts +9 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/interactionRender.js +12 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +3 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +37 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +41 -0
- package/es/materials/sxp/popup/CommodityList/index.d.ts +28 -0
- package/es/materials/sxp/popup/CommodityList/index.js +56 -0
- package/es/materials/sxp/popup/CommodityList/interactionRender.d.ts +8 -0
- package/es/materials/sxp/popup/CommodityList/interactionRender.js +11 -0
- package/es/materials/sxp/popup/CommodityList/material.d.ts +2 -0
- package/es/materials/sxp/popup/CommodityList/material.js +51 -0
- package/es/materials/sxp/popup/CommodityList/settingRender.d.ts +151 -0
- package/es/materials/sxp/popup/CommodityList/settingRender.js +207 -0
- package/es/materials/sxp/popup/index.d.ts +1 -0
- package/es/materials/sxp/popup/index.js +1 -0
- package/es/materials/sxp/template/Link/index.js +2 -2
- package/es/materials/sxp/template/MultiCommodity/index.js +2 -2
- package/es/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +5 -4
- package/es/materials/sxp/template/components/CommodityGroup.d.ts +14 -0
- package/es/materials/sxp/template/components/CommodityGroup.js +31 -0
- package/es/materials/sxp/template/components/Img.js +1 -1
- package/es/materials/sxp/template/components/Scroll.d.ts +2 -1
- package/es/materials/sxp/template/components/Scroll.js +10 -3
- package/es/materials/sxp/template/components/settingRender.js +0 -5
- package/lib/core/Pagebuilder/type.d.ts +1 -0
- package/lib/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +0 -1
- package/lib/core/components/SxpPageRender/FingerSwipeTip/index.js +3 -3
- package/lib/core/components/SxpPageRender/Hashtag/index.js +1 -3
- package/lib/core/components/SxpPageRender/Modal/index.d.ts +3 -0
- package/lib/core/components/SxpPageRender/Modal/index.js +70 -6
- package/lib/core/components/SxpPageRender/Navbar.js +1 -1
- package/lib/core/components/SxpPageRender/Popup/index.js +1 -1
- package/lib/core/components/SxpPageRender/RenderCard.d.ts +1 -0
- package/lib/core/components/SxpPageRender/RenderCard.js +16 -12
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +10 -13
- package/lib/core/components/SxpPageRender/WaterFall/List.js +1 -1
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +1 -1
- package/lib/core/components/SxpPageRender/index.d.ts +3 -3
- package/lib/core/components/SxpPageRender/index.js +50 -16
- package/lib/core/components/SxpPageRender/typing.d.ts +1 -0
- package/lib/core/context/SxpDataSourceProvider.d.ts +1 -0
- package/lib/core/context/SxpDataSourceProvider.js +6 -3
- package/lib/core/utils/localStore.d.ts +3 -0
- package/lib/core/utils/localStore.js +11 -1
- package/lib/materials/sxp/HashTag/material.js +1 -2
- package/lib/materials/sxp/cta/AniLink/index.d.ts +14 -0
- package/lib/materials/sxp/cta/AniLink/index.js +60 -0
- package/lib/materials/sxp/cta/AniLink/interactionRender.d.ts +42 -0
- package/lib/materials/sxp/cta/AniLink/interactionRender.js +52 -0
- package/lib/materials/sxp/cta/AniLink/material.d.ts +2 -0
- package/lib/materials/sxp/cta/AniLink/material.js +42 -0
- package/lib/materials/sxp/cta/AniLink/settingRender.d.ts +73 -0
- package/lib/materials/sxp/cta/AniLink/settingRender.js +105 -0
- package/lib/materials/sxp/cta/AniLinkPopup/index.d.ts +17 -0
- package/lib/materials/sxp/cta/AniLinkPopup/index.js +67 -0
- package/lib/materials/sxp/cta/AniLinkPopup/interactionRender.d.ts +42 -0
- package/lib/materials/sxp/cta/AniLinkPopup/interactionRender.js +52 -0
- package/lib/materials/sxp/cta/AniLinkPopup/material.d.ts +2 -0
- package/lib/materials/sxp/cta/AniLinkPopup/material.js +56 -0
- package/lib/materials/sxp/cta/AniLinkPopup/settingRender.d.ts +176 -0
- package/lib/materials/sxp/cta/AniLinkPopup/settingRender.js +251 -0
- package/lib/materials/sxp/cta/index.d.ts +2 -0
- package/lib/materials/sxp/cta/index.js +5 -0
- package/lib/materials/sxp/index.d.ts +1 -0
- package/lib/materials/sxp/index.js +1 -0
- package/lib/materials/sxp/popup/AppointForm/Form.js +1 -1
- package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +5 -0
- package/lib/materials/sxp/popup/CommodityDetail/index.js +43 -26
- package/lib/materials/sxp/popup/CommodityDetail/interactionRender.d.ts +9 -0
- package/lib/materials/sxp/popup/CommodityDetail/interactionRender.js +14 -0
- package/lib/materials/sxp/popup/CommodityDetail/material.js +3 -1
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +37 -0
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +41 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +5 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +11 -25
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/interactionRender.d.ts +9 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/interactionRender.js +14 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +3 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +37 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +41 -0
- package/lib/materials/sxp/popup/CommodityList/index.d.ts +28 -0
- package/lib/materials/sxp/popup/CommodityList/index.js +58 -0
- package/lib/materials/sxp/popup/CommodityList/interactionRender.d.ts +8 -0
- package/lib/materials/sxp/popup/CommodityList/interactionRender.js +13 -0
- package/lib/materials/sxp/popup/CommodityList/material.d.ts +2 -0
- package/lib/materials/sxp/popup/CommodityList/material.js +55 -0
- package/lib/materials/sxp/popup/CommodityList/settingRender.d.ts +151 -0
- package/lib/materials/sxp/popup/CommodityList/settingRender.js +209 -0
- package/lib/materials/sxp/popup/index.d.ts +1 -0
- package/lib/materials/sxp/popup/index.js +1 -0
- package/lib/materials/sxp/template/Link/index.js +2 -2
- package/lib/materials/sxp/template/MultiCommodity/index.js +2 -2
- package/lib/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +5 -4
- package/lib/materials/sxp/template/components/CommodityGroup.d.ts +14 -0
- package/lib/materials/sxp/template/components/CommodityGroup.js +34 -0
- package/lib/materials/sxp/template/components/Img.js +1 -1
- package/lib/materials/sxp/template/components/Scroll.d.ts +2 -1
- package/lib/materials/sxp/template/components/Scroll.js +9 -2
- package/lib/materials/sxp/template/components/settingRender.js +0 -5
- package/package.json +1 -1
@@ -0,0 +1,73 @@
|
|
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
|
+
name?: undefined;
|
12
|
+
direction?: undefined;
|
13
|
+
} | {
|
14
|
+
type: string;
|
15
|
+
label: string;
|
16
|
+
child: ({
|
17
|
+
type: string;
|
18
|
+
name: string[];
|
19
|
+
max: number;
|
20
|
+
addonAfter?: undefined;
|
21
|
+
} | {
|
22
|
+
type: string;
|
23
|
+
name: string[];
|
24
|
+
addonAfter: string;
|
25
|
+
max: number;
|
26
|
+
})[];
|
27
|
+
name?: undefined;
|
28
|
+
direction?: undefined;
|
29
|
+
} | {
|
30
|
+
type: string;
|
31
|
+
label: string;
|
32
|
+
name: string[];
|
33
|
+
child?: undefined;
|
34
|
+
direction?: undefined;
|
35
|
+
} | {
|
36
|
+
type: string;
|
37
|
+
name: string[];
|
38
|
+
label: string;
|
39
|
+
direction: string;
|
40
|
+
child?: undefined;
|
41
|
+
})[];
|
42
|
+
} | {
|
43
|
+
title: string;
|
44
|
+
child: ({
|
45
|
+
type: string;
|
46
|
+
label: string;
|
47
|
+
child: {
|
48
|
+
type: string;
|
49
|
+
name: string[];
|
50
|
+
bottomText: string;
|
51
|
+
}[];
|
52
|
+
name?: undefined;
|
53
|
+
} | {
|
54
|
+
type: string;
|
55
|
+
label: string;
|
56
|
+
child: ({
|
57
|
+
type: string;
|
58
|
+
name: string[];
|
59
|
+
addonAfter?: undefined;
|
60
|
+
} | {
|
61
|
+
type: string;
|
62
|
+
addonAfter: string;
|
63
|
+
name: string[];
|
64
|
+
})[];
|
65
|
+
name?: undefined;
|
66
|
+
} | {
|
67
|
+
label: string;
|
68
|
+
type: string;
|
69
|
+
name: string[];
|
70
|
+
child?: undefined;
|
71
|
+
})[];
|
72
|
+
})[];
|
73
|
+
export default _default;
|
@@ -0,0 +1,105 @@
|
|
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: ['style', 'width'],
|
14
|
+
addonAfter: 'W'
|
15
|
+
},
|
16
|
+
{
|
17
|
+
type: 'Number',
|
18
|
+
name: ['style', 'height'],
|
19
|
+
addonAfter: 'H'
|
20
|
+
}
|
21
|
+
]
|
22
|
+
},
|
23
|
+
{
|
24
|
+
type: 'Group',
|
25
|
+
label: '圆角',
|
26
|
+
child: [
|
27
|
+
{
|
28
|
+
type: 'Slider',
|
29
|
+
name: ['style', 'borderRadius'],
|
30
|
+
max: 100
|
31
|
+
},
|
32
|
+
{
|
33
|
+
type: 'Number',
|
34
|
+
name: ['style', 'borderRadius'],
|
35
|
+
addonAfter: 'px',
|
36
|
+
max: 100
|
37
|
+
}
|
38
|
+
]
|
39
|
+
},
|
40
|
+
{
|
41
|
+
type: 'Color',
|
42
|
+
label: '背景色',
|
43
|
+
name: ['style', 'backgroundColor']
|
44
|
+
},
|
45
|
+
{
|
46
|
+
type: 'TextMargin',
|
47
|
+
name: ['style'],
|
48
|
+
label: '上下边距',
|
49
|
+
direction: 'vertical'
|
50
|
+
},
|
51
|
+
{
|
52
|
+
type: 'TextPadding',
|
53
|
+
name: ['style'],
|
54
|
+
label: '内边距',
|
55
|
+
direction: 'horizontal'
|
56
|
+
}
|
57
|
+
]
|
58
|
+
},
|
59
|
+
{
|
60
|
+
title: 'CTA标题',
|
61
|
+
child: [
|
62
|
+
{
|
63
|
+
type: 'Group',
|
64
|
+
label: '字体',
|
65
|
+
child: [
|
66
|
+
{
|
67
|
+
type: 'Select',
|
68
|
+
name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily-cn'],
|
69
|
+
bottomText: '中文字体'
|
70
|
+
},
|
71
|
+
{
|
72
|
+
type: 'Select',
|
73
|
+
name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily-en'],
|
74
|
+
bottomText: '英文/其他字体'
|
75
|
+
}
|
76
|
+
]
|
77
|
+
},
|
78
|
+
{
|
79
|
+
type: 'Group',
|
80
|
+
label: '',
|
81
|
+
child: [
|
82
|
+
{
|
83
|
+
type: 'Color',
|
84
|
+
name: ['props', 'ctaTempStyles', 'ctaTitle', 'color']
|
85
|
+
},
|
86
|
+
{
|
87
|
+
type: 'Number',
|
88
|
+
addonAfter: 'px',
|
89
|
+
name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontSize']
|
90
|
+
}
|
91
|
+
]
|
92
|
+
},
|
93
|
+
{
|
94
|
+
label: '样式',
|
95
|
+
type: 'TextStyle',
|
96
|
+
name: ['props', 'ctaTempStyles', 'ctaTitle']
|
97
|
+
},
|
98
|
+
{
|
99
|
+
label: '对齐',
|
100
|
+
type: 'TextAlign',
|
101
|
+
name: ['props', 'ctaTempStyles', 'ctaTitle']
|
102
|
+
}
|
103
|
+
]
|
104
|
+
}
|
105
|
+
];
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { ICtaTempStylesType } from '../../template/components/typing';
|
3
|
+
import { RecItemType } from '../../../../core/components/SxpPageRender/typing';
|
4
|
+
export interface IAniLinkPopupProps {
|
5
|
+
style?: Record<string, any>;
|
6
|
+
recData?: RecItemType;
|
7
|
+
ctaTempStyles?: ICtaTempStylesType;
|
8
|
+
index?: number;
|
9
|
+
event?: any;
|
10
|
+
translateY?: number;
|
11
|
+
bottom_image?: string;
|
12
|
+
isTel?: boolean;
|
13
|
+
onClick?: () => void;
|
14
|
+
isExternalLink?: boolean;
|
15
|
+
}
|
16
|
+
declare const _default: React.NamedExoticComponent<IAniLinkPopupProps>;
|
17
|
+
export default _default;
|
@@ -0,0 +1,67 @@
|
|
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
|
+
const useEventReport_1 = require("../../../../core/hooks/useEventReport");
|
8
|
+
const Img_1 = tslib_1.__importDefault(require("../../template/components/Img"));
|
9
|
+
const tool_1 = require("../../../../core/utils/tool");
|
10
|
+
const index_module_less_1 = tslib_1.__importDefault(require("./index.module.less"));
|
11
|
+
const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
|
12
|
+
const AniLinkPopup = (_a) => {
|
13
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
14
|
+
var { style, recData, ctaTempStyles, index, event, bottom_image, translateY, isTel, onClick, isExternalLink = false } = _a, props = tslib_1.__rest(_a, ["style", "recData", "ctaTempStyles", "index", "event", "bottom_image", "translateY", "isTel", "onClick", "isExternalLink"]);
|
15
|
+
const { sxpParameter, globalConfig, ctaEvent } = (0, hooks_1.useSxpDataSource)();
|
16
|
+
const { jumpToWeb } = (0, useEventReport_1.useEventReport)();
|
17
|
+
const [visible, setVisible] = (0, react_1.useState)(true);
|
18
|
+
const cta = ((_d = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.bindCta) || ((_f = (_e = recData === null || recData === void 0 ? void 0 : recData.video) === null || _e === void 0 ? void 0 : _e.bindProduct) === null || _f === void 0 ? void 0 : _f.bindCta) || ((_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindCta);
|
19
|
+
const product = ((_j = (_h = recData === null || recData === void 0 ? void 0 : recData.video) === null || _h === void 0 ? void 0 : _h.bindProducts) === null || _j === void 0 ? void 0 : _j[0]) || ((_k = recData === null || recData === void 0 ? void 0 : recData.video) === null || _k === void 0 ? void 0 : _k.bindProduct);
|
20
|
+
const handleTo = () => {
|
21
|
+
var _a, _b, _c;
|
22
|
+
const item = ((_b = (_a = recData === null || recData === void 0 ? void 0 : recData.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b[0]) || ((_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct) || (recData === null || recData === void 0 ? void 0 : recData.video);
|
23
|
+
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
24
|
+
eventSubject: 'clickCta',
|
25
|
+
eventDescription: 'User clicked the CTA'
|
26
|
+
}, recData, item, index);
|
27
|
+
if (isExternalLink) {
|
28
|
+
jumpToWeb(recData, product, cta, index);
|
29
|
+
}
|
30
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
31
|
+
};
|
32
|
+
const title = (cta === null || cta === void 0 ? void 0 : cta.title) || '查看详情 >';
|
33
|
+
const aniStyle = (0, react_1.useMemo)(() => {
|
34
|
+
var _a, _b;
|
35
|
+
const ani = event === null || event === void 0 ? void 0 : event.animation;
|
36
|
+
if (ani) {
|
37
|
+
const { delay, duration, backgroundColor } = ani;
|
38
|
+
return {
|
39
|
+
':after': {
|
40
|
+
animationDelay: `${(_a = delay / 1000) !== null && _a !== void 0 ? _a : 0}s`,
|
41
|
+
animationDuration: `${(_b = duration / 1000) !== null && _b !== void 0 ? _b : 0}s`,
|
42
|
+
backgroundColor: `${backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : 'transparent'}`
|
43
|
+
}
|
44
|
+
};
|
45
|
+
}
|
46
|
+
}, [event === null || event === void 0 ? void 0 : event.animation]);
|
47
|
+
const src = (_q = (_p = (_o = (_l = product === null || product === void 0 ? void 0 : product.cover) !== null && _l !== void 0 ? _l : (_m = product === null || product === void 0 ? void 0 : product.homePage) === null || _m === void 0 ? void 0 : _m[0]) !== null && _o !== void 0 ? _o : cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _p !== void 0 ? _p : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _q !== void 0 ? _q : bottom_image;
|
48
|
+
const onClose = (event) => {
|
49
|
+
event.stopPropagation();
|
50
|
+
setVisible(false);
|
51
|
+
};
|
52
|
+
return (react_1.default.createElement(react_1.default.Fragment, null, isTel ? (react_1.default.createElement("div", { style: {
|
53
|
+
height: '40px',
|
54
|
+
lineHeight: '40px',
|
55
|
+
paddingLeft: '6px'
|
56
|
+
} }, "Cta Title")) : (react_1.default.createElement("div", Object.assign({ style: Object.assign(Object.assign({}, style), { position: 'fixed', right: 0, bottom: 0, zIndex: 1000, display: visible ? 'block' : 'none' }) }, props, { className: `${index_module_less_1.default['animated-button']} ${(0, css_1.css)(aniStyle)}`, onClick: handleTo }),
|
57
|
+
react_1.default.createElement("div", { onClick: onClose, className: index_module_less_1.default['modal-icon-wrapper'], style: { padding: (_r = style === null || style === void 0 ? void 0 : style['padding']) !== null && _r !== void 0 ? _r : 0 } },
|
58
|
+
react_1.default.createElement("img", { src: (_s = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.popupCloseIcon) !== null && _s !== void 0 ? _s : closeIcon, alt: 'close', className: index_module_less_1.default['modal-icon-wrapper-img'] })),
|
59
|
+
react_1.default.createElement(Img_1.default, { src: src, rec: recData, item: (_x = (_v = (_u = (_t = recData === null || recData === void 0 ? void 0 : recData.video) === null || _t === void 0 ? void 0 : _t.bindProducts) === null || _u === void 0 ? void 0 : _u[0]) !== null && _v !== void 0 ? _v : (_w = recData === null || recData === void 0 ? void 0 : recData.video) === null || _w === void 0 ? void 0 : _w.bindProduct) !== null && _x !== void 0 ? _x : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
|
60
|
+
react_1.default.createElement("div", { hidden: !!recData && !(product === null || product === void 0 ? void 0 : product.title), className: index_module_less_1.default['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
|
61
|
+
__html: (0, tool_1.setFontForText)((_y = product === null || product === void 0 ? void 0 : product.title) !== null && _y !== void 0 ? _y : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
|
62
|
+
} }),
|
63
|
+
react_1.default.createElement("div", { className: 'one-line-ellipsis', style: Object.assign(Object.assign({}, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle), { lineHeight: ((_z = ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle) === null || _z === void 0 ? void 0 : _z.height) + 'px' }), dangerouslySetInnerHTML: {
|
64
|
+
__html: (0, tool_1.setFontForText)(title, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
|
65
|
+
} })))));
|
66
|
+
};
|
67
|
+
exports.default = (0, react_1.memo)(AniLinkPopup);
|
@@ -0,0 +1,42 @@
|
|
1
|
+
declare const _default: ({
|
2
|
+
title: string;
|
3
|
+
child: {
|
4
|
+
type: string;
|
5
|
+
name: string;
|
6
|
+
}[];
|
7
|
+
} | {
|
8
|
+
title: string;
|
9
|
+
child: ({
|
10
|
+
type: string;
|
11
|
+
name: string[];
|
12
|
+
label: string;
|
13
|
+
options?: undefined;
|
14
|
+
initialValue?: undefined;
|
15
|
+
fieldProps?: undefined;
|
16
|
+
addonAfter?: undefined;
|
17
|
+
} | {
|
18
|
+
type: string;
|
19
|
+
name: string[];
|
20
|
+
label: string;
|
21
|
+
options: {
|
22
|
+
label: string;
|
23
|
+
value: number;
|
24
|
+
}[];
|
25
|
+
initialValue: number;
|
26
|
+
fieldProps: {
|
27
|
+
style: {
|
28
|
+
width: string;
|
29
|
+
};
|
30
|
+
};
|
31
|
+
addonAfter?: undefined;
|
32
|
+
} | {
|
33
|
+
type: string;
|
34
|
+
label: string;
|
35
|
+
name: string[];
|
36
|
+
addonAfter: string;
|
37
|
+
options?: undefined;
|
38
|
+
initialValue?: undefined;
|
39
|
+
fieldProps?: undefined;
|
40
|
+
})[];
|
41
|
+
})[];
|
42
|
+
export default _default;
|
@@ -0,0 +1,52 @@
|
|
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
|
+
{
|
14
|
+
title: '动画效果',
|
15
|
+
child: [
|
16
|
+
{
|
17
|
+
type: 'Color',
|
18
|
+
name: ['animation', 'backgroundColor'],
|
19
|
+
label: '动画颜色'
|
20
|
+
},
|
21
|
+
{
|
22
|
+
type: 'Select',
|
23
|
+
name: ['animation', 'name'],
|
24
|
+
label: '动画',
|
25
|
+
options: [
|
26
|
+
{
|
27
|
+
label: '由左向右/中间扩散',
|
28
|
+
value: 1
|
29
|
+
}
|
30
|
+
],
|
31
|
+
initialValue: 1,
|
32
|
+
fieldProps: {
|
33
|
+
style: {
|
34
|
+
width: '100%'
|
35
|
+
}
|
36
|
+
}
|
37
|
+
},
|
38
|
+
{
|
39
|
+
type: 'Number',
|
40
|
+
label: '动画启动时间',
|
41
|
+
name: ['animation', 'delay'],
|
42
|
+
addonAfter: 'ms'
|
43
|
+
},
|
44
|
+
{
|
45
|
+
type: 'Number',
|
46
|
+
label: '动画持续时间',
|
47
|
+
name: ['animation', 'duration'],
|
48
|
+
addonAfter: 'ms'
|
49
|
+
}
|
50
|
+
]
|
51
|
+
}
|
52
|
+
];
|
@@ -0,0 +1,56 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.AniLinkPopup = 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 AniLinkPopup = (0, create_1.createMaterial)(_1.default, {
|
10
|
+
displayName: '竖版弹窗CTA',
|
11
|
+
icon: '',
|
12
|
+
category: 'cta',
|
13
|
+
type: 'AniLinkPopup',
|
14
|
+
related: {
|
15
|
+
settingRender: settingRender_1.default,
|
16
|
+
bindableProps: [],
|
17
|
+
interactionRender: interactionRender_1.default
|
18
|
+
},
|
19
|
+
defaulSetting: {
|
20
|
+
props: {
|
21
|
+
ctaTempStyles: {
|
22
|
+
img: {
|
23
|
+
borderRadius: 3,
|
24
|
+
width: 76,
|
25
|
+
height: 76,
|
26
|
+
marginBottom: 10
|
27
|
+
},
|
28
|
+
title: {
|
29
|
+
fontSize: 12,
|
30
|
+
color: '#000',
|
31
|
+
textAlign: 'left'
|
32
|
+
},
|
33
|
+
ctaTitle: {
|
34
|
+
fontSize: 10,
|
35
|
+
color: '#fff',
|
36
|
+
textAlign: 'center',
|
37
|
+
width: 76,
|
38
|
+
height: 20,
|
39
|
+
backgroundColor: 'rgba(0,0,0,1)'
|
40
|
+
}
|
41
|
+
}
|
42
|
+
},
|
43
|
+
style: {
|
44
|
+
width: 90,
|
45
|
+
height: 160,
|
46
|
+
borderRadius: 3,
|
47
|
+
backgroundColor: 'rgba(255,255,255,1)',
|
48
|
+
padding: 7,
|
49
|
+
margin: 10
|
50
|
+
}
|
51
|
+
},
|
52
|
+
w: 100,
|
53
|
+
h: 40,
|
54
|
+
sort: 2
|
55
|
+
});
|
56
|
+
exports.AniLinkPopup = AniLinkPopup;
|
@@ -0,0 +1,176 @@
|
|
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
|
+
name?: undefined;
|
12
|
+
addonAfter?: undefined;
|
13
|
+
} | {
|
14
|
+
type: string;
|
15
|
+
label: string;
|
16
|
+
child: ({
|
17
|
+
type: string;
|
18
|
+
name: string[];
|
19
|
+
max: number;
|
20
|
+
addonAfter?: undefined;
|
21
|
+
} | {
|
22
|
+
type: string;
|
23
|
+
name: string[];
|
24
|
+
addonAfter: string;
|
25
|
+
max: number;
|
26
|
+
})[];
|
27
|
+
name?: undefined;
|
28
|
+
addonAfter?: undefined;
|
29
|
+
} | {
|
30
|
+
type: string;
|
31
|
+
label: string;
|
32
|
+
name: string[];
|
33
|
+
child?: undefined;
|
34
|
+
addonAfter?: undefined;
|
35
|
+
} | {
|
36
|
+
label: string;
|
37
|
+
type: string;
|
38
|
+
name: string[];
|
39
|
+
addonAfter: string;
|
40
|
+
child?: undefined;
|
41
|
+
})[];
|
42
|
+
type?: undefined;
|
43
|
+
} | {
|
44
|
+
title: string;
|
45
|
+
child: ({
|
46
|
+
type: string;
|
47
|
+
label: string;
|
48
|
+
child: {
|
49
|
+
type: string;
|
50
|
+
name: string[];
|
51
|
+
addonAfter: string;
|
52
|
+
}[];
|
53
|
+
addonAfter?: undefined;
|
54
|
+
name?: undefined;
|
55
|
+
min?: undefined;
|
56
|
+
initialValue?: undefined;
|
57
|
+
} | {
|
58
|
+
type: string;
|
59
|
+
label: string;
|
60
|
+
child: ({
|
61
|
+
type: string;
|
62
|
+
name: string[];
|
63
|
+
max: number;
|
64
|
+
addonAfter?: undefined;
|
65
|
+
} | {
|
66
|
+
type: string;
|
67
|
+
name: string[];
|
68
|
+
addonAfter: string;
|
69
|
+
max: number;
|
70
|
+
})[];
|
71
|
+
addonAfter?: undefined;
|
72
|
+
name?: undefined;
|
73
|
+
min?: undefined;
|
74
|
+
initialValue?: undefined;
|
75
|
+
} | {
|
76
|
+
type: string;
|
77
|
+
label: string;
|
78
|
+
addonAfter: string;
|
79
|
+
name: string[];
|
80
|
+
child?: undefined;
|
81
|
+
min?: undefined;
|
82
|
+
initialValue?: undefined;
|
83
|
+
} | {
|
84
|
+
label: string;
|
85
|
+
type: string;
|
86
|
+
name: string[];
|
87
|
+
min: number;
|
88
|
+
addonAfter: string;
|
89
|
+
initialValue: number;
|
90
|
+
child?: undefined;
|
91
|
+
})[];
|
92
|
+
type?: undefined;
|
93
|
+
} | {
|
94
|
+
title: string;
|
95
|
+
type: string;
|
96
|
+
child: ({
|
97
|
+
type: string;
|
98
|
+
label: string;
|
99
|
+
child: {
|
100
|
+
type: string;
|
101
|
+
name: string[];
|
102
|
+
bottomText: string;
|
103
|
+
}[];
|
104
|
+
name?: undefined;
|
105
|
+
} | {
|
106
|
+
type: string;
|
107
|
+
label: string;
|
108
|
+
child: ({
|
109
|
+
type: string;
|
110
|
+
name: string[];
|
111
|
+
addonAfter?: undefined;
|
112
|
+
} | {
|
113
|
+
type: string;
|
114
|
+
addonAfter: string;
|
115
|
+
name: string[];
|
116
|
+
})[];
|
117
|
+
name?: undefined;
|
118
|
+
} | {
|
119
|
+
label: string;
|
120
|
+
type: string;
|
121
|
+
name: string[];
|
122
|
+
child?: undefined;
|
123
|
+
})[];
|
124
|
+
} | {
|
125
|
+
title: string;
|
126
|
+
child: ({
|
127
|
+
type: string;
|
128
|
+
label: string;
|
129
|
+
child: ({
|
130
|
+
type: string;
|
131
|
+
name: string[];
|
132
|
+
max: number;
|
133
|
+
addonAfter?: undefined;
|
134
|
+
} | {
|
135
|
+
type: string;
|
136
|
+
name: string[];
|
137
|
+
addonAfter: string;
|
138
|
+
max: number;
|
139
|
+
})[];
|
140
|
+
name?: undefined;
|
141
|
+
} | {
|
142
|
+
type: string;
|
143
|
+
name: string[];
|
144
|
+
label?: undefined;
|
145
|
+
child?: undefined;
|
146
|
+
} | {
|
147
|
+
type: string;
|
148
|
+
label: string;
|
149
|
+
name: string[];
|
150
|
+
child?: undefined;
|
151
|
+
} | {
|
152
|
+
type: string;
|
153
|
+
label: string;
|
154
|
+
child: {
|
155
|
+
type: string;
|
156
|
+
name: string[];
|
157
|
+
bottomText: string;
|
158
|
+
}[];
|
159
|
+
name?: undefined;
|
160
|
+
} | {
|
161
|
+
type: string;
|
162
|
+
label: string;
|
163
|
+
child: ({
|
164
|
+
type: string;
|
165
|
+
name: string[];
|
166
|
+
addonAfter?: undefined;
|
167
|
+
} | {
|
168
|
+
type: string;
|
169
|
+
addonAfter: string;
|
170
|
+
name: string[];
|
171
|
+
})[];
|
172
|
+
name?: undefined;
|
173
|
+
})[];
|
174
|
+
type?: undefined;
|
175
|
+
})[];
|
176
|
+
export default _default;
|