@fonixtree/magic-design 0.1.86 → 0.1.87
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/es/assets/fonts/.DS_Store +0 -0
- package/es/common/CountDown/index.js +20 -11
- package/es/common/CropperModal/index.js +126 -0
- package/es/common/CropperModal/index.less +29 -0
- package/es/common/LinkModal/AffiliateStore/index.js +332 -0
- package/es/common/LinkModal/SelectVideoModal/index.js +3 -2
- package/es/common/LinkModal/index.js +14 -5
- package/es/common/UrlPicker/index.js +1 -10
- package/es/common/Video/QualityComponent/index.js +169 -0
- package/es/common/Video/QualityComponent/index.less +78 -0
- package/es/common/Video/index.js +142 -86
- package/es/common/VideoUpload/index.js +1 -1
- package/es/common/index.js +8 -0
- package/es/composite-comp/bol/components/Banner/mobile/index.js +4 -2
- package/es/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +3 -4
- package/es/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.js +3 -4
- package/es/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +3 -4
- package/es/composite-comp/bol/config-panels/ImageGalleryConfig/ImageGalleryConfigImageGroup/index.js +3 -4
- package/es/composite-comp/bol/config-panels/ImageTextConfig/ImageTextConfigGroup/index.js +3 -4
- package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.js +3 -4
- package/es/composite-comp/bol/config-panels/TextCompConfig/TextConfigGroup/index.js +3 -4
- package/es/composite-comp/bol/config-panels/VideoConfig/VideoConfigGroup/index.js +3 -3
- package/es/composite-comp/bol/config-panels/WalletConfig/WalletConfigImageGroup/index.js +3 -4
- package/es/composite-comp/bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.js +3 -4
- package/es/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +3 -1
- package/es/composite-comp/common/components/AffiliateProductItem/imgs/icon-cashback.svg +9 -0
- package/es/composite-comp/common/components/AffiliateProductItem/index.js +25 -14
- package/es/composite-comp/common/components/AffiliateProductItem/index.less +31 -1
- package/es/composite-comp/common/config-panels/CustomizeConfig/index.js +2 -15
- package/es/composite-comp/dito/components/CommonFunctions/defaultJSON.js +1 -1
- package/es/composite-comp/dito/components/CommonFunctions/mobile/index.js +8 -2
- package/es/composite-comp/dito/components/CommonFunctions/mobile/index.less +5 -5
- package/es/composite-comp/dito/components/FlashDeal/mobile/index.js +8 -1
- package/es/composite-comp/dito/components/MobileNavigation/mobile/index.js +11 -0
- package/es/composite-comp/dito/components/Orders/mobile/index.js +8 -3
- package/es/composite-comp/dito/components/Orders/mobile/index.less +6 -7
- package/es/composite-comp/dito/components/PersonalInformation/mobile/index.js +142 -17
- package/es/composite-comp/dito/components/PersonalInformation/mobile/index.less +10 -7
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +4 -2
- package/es/composite-comp/dito/components/SearchBar/mobile/index.js +13 -1
- package/es/composite-comp/dito/config-panels/CommonFunctionsConfig/ConfigGroup/index.js +3 -4
- package/es/composite-comp/dito/config-panels/HeadNavigationConfig/HeadNavConfigImageGroup/index.js +3 -4
- package/es/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.js +3 -4
- package/es/composite-comp/dito/config-panels/MobileNavigationConfig/MobileNavigationConfigGroup/index.js +3 -4
- package/es/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +3 -4
- package/es/composite-comp/dito/config-panels/PcNavigationConfig/PcNavigationConfigGroup/index.js +3 -4
- package/es/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigGroup/index.js +3 -4
- package/es/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.js +2 -16
- package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +1 -2
- package/es/composite-comp/dito/second-config-panels/HeadNavigationSecondConfig/index.js +1 -1
- package/es/composite-comp/dito/second-config-panels/MenuNavigationSecondConfig/index.js +1 -1
- package/es/composite-comp/{dito → nuri}/components/AffiliateRecommend/mobile/index.js +12 -10
- package/{lib/composite-comp/dito → es/composite-comp/nuri}/components/AffiliateRecommend/pc/index.js +12 -10
- package/{lib/composite-comp/dito → es/composite-comp/nuri}/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.js +3 -17
- package/es/constants/component-types.js +3 -3
- package/es/constants/index.js +1 -0
- package/es/core/Designer/ToolBarModal/index.js +5 -1
- package/es/core/Renderer/index.js +6 -2
- package/es/decorator/compositeDecorator.js +9 -5
- package/es/decorator/index.js +4 -1
- package/es/decorator/metaDecorator.js +6 -2
- package/es/locale/en/en.json +1 -1
- package/es/locale/es/es.json +2 -2
- package/es/locale/id/id.json +1 -1
- package/es/meta-comp/config-panels/TextConfig/index.js +1 -1
- package/es/utils/androidUtil.js +1 -0
- package/es/utils/businessUtil.js +12 -0
- package/es/utils/commonUtil.js +22 -6
- package/es/utils/coreUtil.js +40 -30
- package/lib/assets/fonts/.DS_Store +0 -0
- package/lib/common/CountDown/index.js +20 -11
- package/lib/common/CropperModal/index.js +126 -0
- package/lib/common/CropperModal/index.less +29 -0
- package/lib/common/LinkModal/AffiliateStore/index.js +332 -0
- package/lib/common/LinkModal/SelectVideoModal/index.js +3 -2
- package/lib/common/LinkModal/index.js +14 -5
- package/lib/common/UrlPicker/index.js +1 -10
- package/lib/common/Video/QualityComponent/index.js +169 -0
- package/lib/common/Video/QualityComponent/index.less +78 -0
- package/lib/common/Video/index.js +142 -86
- package/lib/common/VideoUpload/index.js +1 -1
- package/lib/common/index.js +8 -0
- package/lib/composite-comp/bol/components/Banner/mobile/index.js +4 -2
- package/lib/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +3 -4
- package/lib/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.js +3 -4
- package/lib/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +3 -4
- package/lib/composite-comp/bol/config-panels/ImageGalleryConfig/ImageGalleryConfigImageGroup/index.js +3 -4
- package/lib/composite-comp/bol/config-panels/ImageTextConfig/ImageTextConfigGroup/index.js +3 -4
- package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.js +3 -4
- package/lib/composite-comp/bol/config-panels/TextCompConfig/TextConfigGroup/index.js +3 -4
- package/lib/composite-comp/bol/config-panels/VideoConfig/VideoConfigGroup/index.js +3 -3
- package/lib/composite-comp/bol/config-panels/WalletConfig/WalletConfigImageGroup/index.js +3 -4
- package/lib/composite-comp/bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.js +3 -4
- package/lib/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +3 -1
- package/lib/composite-comp/common/components/AffiliateProductItem/imgs/icon-cashback.svg +9 -0
- package/lib/composite-comp/common/components/AffiliateProductItem/index.js +25 -14
- package/lib/composite-comp/common/components/AffiliateProductItem/index.less +31 -1
- package/lib/composite-comp/common/config-panels/CustomizeConfig/index.js +2 -15
- package/lib/composite-comp/dito/components/CommonFunctions/defaultJSON.js +1 -1
- package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.js +8 -2
- package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.less +5 -5
- package/lib/composite-comp/dito/components/FlashDeal/mobile/index.js +8 -1
- package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.js +11 -0
- package/lib/composite-comp/dito/components/Orders/mobile/index.js +8 -3
- package/lib/composite-comp/dito/components/Orders/mobile/index.less +6 -7
- package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.js +142 -17
- package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.less +10 -7
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +4 -2
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +13 -1
- package/lib/composite-comp/dito/config-panels/CommonFunctionsConfig/ConfigGroup/index.js +3 -4
- package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/HeadNavConfigImageGroup/index.js +3 -4
- package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.js +3 -4
- package/lib/composite-comp/dito/config-panels/MobileNavigationConfig/MobileNavigationConfigGroup/index.js +3 -4
- package/lib/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +3 -4
- package/lib/composite-comp/dito/config-panels/PcNavigationConfig/PcNavigationConfigGroup/index.js +3 -4
- package/lib/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigGroup/index.js +3 -4
- package/lib/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.js +2 -16
- package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +1 -2
- package/lib/composite-comp/dito/second-config-panels/HeadNavigationSecondConfig/index.js +1 -1
- package/lib/composite-comp/dito/second-config-panels/MenuNavigationSecondConfig/index.js +1 -1
- package/lib/composite-comp/{dito → nuri}/components/AffiliateRecommend/mobile/index.js +12 -10
- package/{es/composite-comp/dito → lib/composite-comp/nuri}/components/AffiliateRecommend/pc/index.js +12 -10
- package/{es/composite-comp/dito → lib/composite-comp/nuri}/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.js +3 -17
- package/lib/constants/component-types.js +3 -3
- package/lib/constants/index.js +1 -0
- package/lib/core/Designer/ToolBarModal/index.js +5 -1
- package/lib/core/Renderer/index.js +6 -2
- package/lib/decorator/compositeDecorator.js +9 -5
- package/lib/decorator/index.js +4 -1
- package/lib/decorator/metaDecorator.js +6 -2
- package/lib/locale/en/en.json +1 -1
- package/lib/locale/es/es.json +2 -2
- package/lib/locale/id/id.json +1 -1
- package/lib/meta-comp/config-panels/TextConfig/index.js +1 -1
- package/lib/utils/androidUtil.js +1 -0
- package/lib/utils/businessUtil.js +12 -0
- package/lib/utils/commonUtil.js +22 -6
- package/lib/utils/coreUtil.js +40 -30
- package/package.json +2 -1
- package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.less +0 -1
- package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.less +0 -1
- /package/es/common/Video/{components → RateComponent}/index.js +0 -0
- /package/es/common/Video/{components → RateComponent}/index.less +0 -0
- /package/es/composite-comp/{dito → nuri}/components/AffiliateRecommend/defaultJSON.js +0 -0
- /package/es/composite-comp/{dito → nuri}/components/AffiliateRecommend/index.js +0 -0
- /package/es/composite-comp/{dito → nuri}/components/AffiliateRecommend/mobile/index.less +0 -0
- /package/es/composite-comp/{dito → nuri}/components/AffiliateRecommend/pc/index.less +0 -0
- /package/es/composite-comp/{dito → nuri}/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.js +0 -0
- /package/es/composite-comp/{dito → nuri}/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.less +0 -0
- /package/es/composite-comp/{dito → nuri}/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.less +0 -0
- /package/es/composite-comp/{dito → nuri}/config-panels/AffiliateRecommendConfig/imgs/defaultImg.png +0 -0
- /package/es/composite-comp/{dito → nuri}/config-panels/AffiliateRecommendConfig/index.js +0 -0
- /package/es/composite-comp/{dito → nuri}/second-config-panels/AffiliateRecommendSecondConfig/AIRecommendation/index.js +0 -0
- /package/es/composite-comp/{dito → nuri}/second-config-panels/AffiliateRecommendSecondConfig/index.js +0 -0
- /package/es/composite-comp/{dito → nuri}/second-config-panels/AffiliateRecommendSecondConfig/index.less +0 -0
- /package/lib/common/Video/{components → RateComponent}/index.js +0 -0
- /package/lib/common/Video/{components → RateComponent}/index.less +0 -0
- /package/lib/composite-comp/{dito → nuri}/components/AffiliateRecommend/defaultJSON.js +0 -0
- /package/lib/composite-comp/{dito → nuri}/components/AffiliateRecommend/index.js +0 -0
- /package/lib/composite-comp/{dito → nuri}/components/AffiliateRecommend/mobile/index.less +0 -0
- /package/lib/composite-comp/{dito → nuri}/components/AffiliateRecommend/pc/index.less +0 -0
- /package/lib/composite-comp/{dito → nuri}/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.js +0 -0
- /package/lib/composite-comp/{dito → nuri}/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.less +0 -0
- /package/lib/composite-comp/{dito → nuri}/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.less +0 -0
- /package/lib/composite-comp/{dito → nuri}/config-panels/AffiliateRecommendConfig/imgs/defaultImg.png +0 -0
- /package/lib/composite-comp/{dito → nuri}/config-panels/AffiliateRecommendConfig/index.js +0 -0
- /package/lib/composite-comp/{dito → nuri}/second-config-panels/AffiliateRecommendSecondConfig/AIRecommendation/index.js +0 -0
- /package/lib/composite-comp/{dito → nuri}/second-config-panels/AffiliateRecommendSecondConfig/index.js +0 -0
- /package/lib/composite-comp/{dito → nuri}/second-config-panels/AffiliateRecommendSecondConfig/index.less +0 -0
|
Binary file
|
|
@@ -57,9 +57,11 @@ function (_super) {
|
|
|
57
57
|
hour: '00',
|
|
58
58
|
min: '00',
|
|
59
59
|
second: '00',
|
|
60
|
-
nowTime: _this.props.now
|
|
60
|
+
nowTime: Number(_this.props.now),
|
|
61
|
+
now: _this.props.now
|
|
61
62
|
};
|
|
62
63
|
_this.timer = null;
|
|
64
|
+
_this.preTime = '';
|
|
63
65
|
|
|
64
66
|
_this.componentWillUnmount = function () {
|
|
65
67
|
_this.clearTimer();
|
|
@@ -112,19 +114,26 @@ function (_super) {
|
|
|
112
114
|
return _this;
|
|
113
115
|
}
|
|
114
116
|
|
|
115
|
-
CountDown.
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
CountDown.getDerivedStateFromProps = function (nextProps, prevState) {
|
|
118
|
+
// 检查是否需要更新sortType
|
|
119
|
+
if (nextProps.now !== prevState.now) {
|
|
120
|
+
return {
|
|
121
|
+
now: nextProps.now,
|
|
120
122
|
nowTime: nextProps.now
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return null;
|
|
127
|
+
};
|
|
123
128
|
|
|
124
|
-
|
|
129
|
+
CountDown.prototype.componentDidUpdate = function () {
|
|
130
|
+
var now = this.state.now;
|
|
125
131
|
|
|
126
|
-
|
|
127
|
-
|
|
132
|
+
if (this.preTime != now) {
|
|
133
|
+
this.preTime = now;
|
|
134
|
+
this.clearTimer();
|
|
135
|
+
this.calcLastTime();
|
|
136
|
+
this.timer = setInterval(this.calcLastTime, 1000);
|
|
128
137
|
}
|
|
129
138
|
};
|
|
130
139
|
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _reactCropper = _interopRequireDefault(require("react-cropper"));
|
|
13
|
+
|
|
14
|
+
require("cropperjs/dist/cropper.css");
|
|
15
|
+
|
|
16
|
+
require("./index.less");
|
|
17
|
+
|
|
18
|
+
var _locale = require("../../locale");
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
+
|
|
22
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
+
|
|
24
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
|
+
|
|
26
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
27
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
28
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
29
|
+
__proto__: []
|
|
30
|
+
} instanceof Array && function (d, b) {
|
|
31
|
+
d.__proto__ = b;
|
|
32
|
+
} || function (d, b) {
|
|
33
|
+
for (var p in b) {
|
|
34
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
return _extendStatics(d, b);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
return function (d, b) {
|
|
42
|
+
_extendStatics(d, b);
|
|
43
|
+
|
|
44
|
+
function __() {
|
|
45
|
+
this.constructor = d;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
49
|
+
};
|
|
50
|
+
}();
|
|
51
|
+
|
|
52
|
+
var AComponent =
|
|
53
|
+
/** @class */
|
|
54
|
+
function (_super) {
|
|
55
|
+
__extends(AComponent, _super);
|
|
56
|
+
|
|
57
|
+
function AComponent() {
|
|
58
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
59
|
+
|
|
60
|
+
_this.state = {
|
|
61
|
+
src: ''
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
_this.onSubmit = function () {
|
|
65
|
+
_this.cropper.getCroppedCanvas().toBlob(function (blob) {
|
|
66
|
+
var fileName = _this.props.uploadedImageFile.name; // Vovi手机没有图片后缀
|
|
67
|
+
|
|
68
|
+
if (fileName && fileName.lastIndexOf('.') === -1) {
|
|
69
|
+
fileName = "file_" + new Date().getTime() + ".jpg";
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
var formData = new FormData();
|
|
73
|
+
formData.append('file', blob, fileName);
|
|
74
|
+
|
|
75
|
+
_this.props.onSubmit(formData);
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
return _this;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
AComponent.prototype.componentDidMount = function () {
|
|
83
|
+
var _this = this;
|
|
84
|
+
|
|
85
|
+
var fileReader = new FileReader();
|
|
86
|
+
|
|
87
|
+
fileReader.onload = function (e) {
|
|
88
|
+
var dataURL = e.target.result;
|
|
89
|
+
|
|
90
|
+
_this.setState({
|
|
91
|
+
src: dataURL
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
fileReader.readAsDataURL(this.props.uploadedImageFile);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
AComponent.prototype.render = function () {
|
|
99
|
+
var _this = this;
|
|
100
|
+
|
|
101
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
102
|
+
className: "cropperModalWrap"
|
|
103
|
+
}, /*#__PURE__*/_react["default"].createElement(_reactCropper["default"], {
|
|
104
|
+
aspectRatio: 1,
|
|
105
|
+
className: "company-logo-cropper",
|
|
106
|
+
guides: false,
|
|
107
|
+
onInitialized: function onInitialized(cop) {
|
|
108
|
+
_this.cropper = cop;
|
|
109
|
+
},
|
|
110
|
+
src: this.state.src,
|
|
111
|
+
viewMode: 1,
|
|
112
|
+
zoomable: false
|
|
113
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
114
|
+
className: "btnWrap"
|
|
115
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
116
|
+
onClick: this.props.onClose
|
|
117
|
+
}, (0, _locale.i18n)('CANCEL')), /*#__PURE__*/_react["default"].createElement("span", {
|
|
118
|
+
onClick: this.onSubmit
|
|
119
|
+
}, (0, _locale.i18n)('SUBMIT'))));
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
return AComponent;
|
|
123
|
+
}(_react.Component);
|
|
124
|
+
|
|
125
|
+
var _default = AComponent;
|
|
126
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
.cropperModalWrap {
|
|
2
|
+
background: #000;
|
|
3
|
+
position: fixed;
|
|
4
|
+
z-index: 1000;
|
|
5
|
+
top: 0;
|
|
6
|
+
bottom: 0;
|
|
7
|
+
left: 0;
|
|
8
|
+
right: 0;
|
|
9
|
+
display: flex;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
align-items: center;
|
|
12
|
+
|
|
13
|
+
.btnWrap {
|
|
14
|
+
span {
|
|
15
|
+
color: #fff;
|
|
16
|
+
font-size: 18px;
|
|
17
|
+
position: absolute;
|
|
18
|
+
bottom: 10px;
|
|
19
|
+
|
|
20
|
+
&:first-child {
|
|
21
|
+
left: 12px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&:last-child {
|
|
25
|
+
right: 12px;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = AffiliateStore;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _antd = require("antd");
|
|
13
|
+
|
|
14
|
+
var _commonUtil = require("../../../utils/commonUtil");
|
|
15
|
+
|
|
16
|
+
var _locale = require("../../../locale");
|
|
17
|
+
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
+
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
|
|
22
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
23
|
+
__assign = Object.assign || function (t) {
|
|
24
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
25
|
+
s = arguments[i];
|
|
26
|
+
|
|
27
|
+
for (var p in s) {
|
|
28
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return t;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
return __assign.apply(this, arguments);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
39
|
+
function adopt(value) {
|
|
40
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
41
|
+
resolve(value);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
46
|
+
function fulfilled(value) {
|
|
47
|
+
try {
|
|
48
|
+
step(generator.next(value));
|
|
49
|
+
} catch (e) {
|
|
50
|
+
reject(e);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function rejected(value) {
|
|
55
|
+
try {
|
|
56
|
+
step(generator["throw"](value));
|
|
57
|
+
} catch (e) {
|
|
58
|
+
reject(e);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function step(result) {
|
|
63
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
|
|
71
|
+
var _ = {
|
|
72
|
+
label: 0,
|
|
73
|
+
sent: function sent() {
|
|
74
|
+
if (t[0] & 1) throw t[1];
|
|
75
|
+
return t[1];
|
|
76
|
+
},
|
|
77
|
+
trys: [],
|
|
78
|
+
ops: []
|
|
79
|
+
},
|
|
80
|
+
f,
|
|
81
|
+
y,
|
|
82
|
+
t,
|
|
83
|
+
g;
|
|
84
|
+
return g = {
|
|
85
|
+
next: verb(0),
|
|
86
|
+
"throw": verb(1),
|
|
87
|
+
"return": verb(2)
|
|
88
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
89
|
+
return this;
|
|
90
|
+
}), g;
|
|
91
|
+
|
|
92
|
+
function verb(n) {
|
|
93
|
+
return function (v) {
|
|
94
|
+
return step([n, v]);
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function step(op) {
|
|
99
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
100
|
+
|
|
101
|
+
while (_) {
|
|
102
|
+
try {
|
|
103
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
104
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
105
|
+
|
|
106
|
+
switch (op[0]) {
|
|
107
|
+
case 0:
|
|
108
|
+
case 1:
|
|
109
|
+
t = op;
|
|
110
|
+
break;
|
|
111
|
+
|
|
112
|
+
case 4:
|
|
113
|
+
_.label++;
|
|
114
|
+
return {
|
|
115
|
+
value: op[1],
|
|
116
|
+
done: false
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
case 5:
|
|
120
|
+
_.label++;
|
|
121
|
+
y = op[1];
|
|
122
|
+
op = [0];
|
|
123
|
+
continue;
|
|
124
|
+
|
|
125
|
+
case 7:
|
|
126
|
+
op = _.ops.pop();
|
|
127
|
+
|
|
128
|
+
_.trys.pop();
|
|
129
|
+
|
|
130
|
+
continue;
|
|
131
|
+
|
|
132
|
+
default:
|
|
133
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
134
|
+
_ = 0;
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
139
|
+
_.label = op[1];
|
|
140
|
+
break;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
144
|
+
_.label = t[1];
|
|
145
|
+
t = op;
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
if (t && _.label < t[2]) {
|
|
150
|
+
_.label = t[2];
|
|
151
|
+
|
|
152
|
+
_.ops.push(op);
|
|
153
|
+
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (t[2]) _.ops.pop();
|
|
158
|
+
|
|
159
|
+
_.trys.pop();
|
|
160
|
+
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
op = body.call(thisArg, _);
|
|
165
|
+
} catch (e) {
|
|
166
|
+
op = [6, e];
|
|
167
|
+
y = 0;
|
|
168
|
+
} finally {
|
|
169
|
+
f = t = 0;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
if (op[0] & 5) throw op[1];
|
|
174
|
+
return {
|
|
175
|
+
value: op[0] ? op[1] : void 0,
|
|
176
|
+
done: true
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
var paginationParams = {
|
|
182
|
+
pageSize: 20,
|
|
183
|
+
pageIndex: 1
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
function AffiliateStore(props) {
|
|
187
|
+
var _this = this;
|
|
188
|
+
|
|
189
|
+
var _onChange = props.onChange;
|
|
190
|
+
|
|
191
|
+
var _a = (0, _react.useState)([]),
|
|
192
|
+
storeList = _a[0],
|
|
193
|
+
setStoreList = _a[1];
|
|
194
|
+
|
|
195
|
+
var _b = (0, _react.useState)(false),
|
|
196
|
+
loading = _b[0],
|
|
197
|
+
setLoading = _b[1];
|
|
198
|
+
|
|
199
|
+
var _c = (0, _react.useState)(''),
|
|
200
|
+
storeName = _c[0],
|
|
201
|
+
setStoreName = _c[1];
|
|
202
|
+
|
|
203
|
+
var queryStore = function queryStore(params) {
|
|
204
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
205
|
+
var res;
|
|
206
|
+
return __generator(this, function (_a) {
|
|
207
|
+
switch (_a.label) {
|
|
208
|
+
case 0:
|
|
209
|
+
setLoading(true);
|
|
210
|
+
return [4
|
|
211
|
+
/*yield*/
|
|
212
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/affiliate/store/query/page", params, 'GET')];
|
|
213
|
+
|
|
214
|
+
case 1:
|
|
215
|
+
res = _a.sent();
|
|
216
|
+
paginationParams.total = res.total;
|
|
217
|
+
setStoreList(res.list);
|
|
218
|
+
setLoading(false);
|
|
219
|
+
return [2
|
|
220
|
+
/*return*/
|
|
221
|
+
];
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
});
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
(0, _react.useEffect)(function () {
|
|
228
|
+
queryStore(paginationParams);
|
|
229
|
+
}, []);
|
|
230
|
+
var columns = [{
|
|
231
|
+
title: 'Store ID',
|
|
232
|
+
dataIndex: 'shopId'
|
|
233
|
+
}, {
|
|
234
|
+
title: 'Store Name',
|
|
235
|
+
dataIndex: 'storeName'
|
|
236
|
+
}, {
|
|
237
|
+
title: 'Logo',
|
|
238
|
+
dataIndex: 'logo',
|
|
239
|
+
render: function render(val) {
|
|
240
|
+
return /*#__PURE__*/_react["default"].createElement("img", {
|
|
241
|
+
alt: "",
|
|
242
|
+
src: val,
|
|
243
|
+
style: {
|
|
244
|
+
maxWidth: '50px',
|
|
245
|
+
maxHeight: '50px'
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
}, {
|
|
250
|
+
title: 'Channel',
|
|
251
|
+
dataIndex: 'bindChannel'
|
|
252
|
+
}];
|
|
253
|
+
var rowSelection = {
|
|
254
|
+
onChange: function onChange(selectedRowKeys, selectedRow) {
|
|
255
|
+
_onChange({
|
|
256
|
+
value: selectedRow[0].affiliateStoreId,
|
|
257
|
+
name: selectedRow[0].storeName
|
|
258
|
+
});
|
|
259
|
+
},
|
|
260
|
+
type: 'radio'
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
var reset = function reset() {
|
|
264
|
+
setStoreName('');
|
|
265
|
+
queryStore(__assign({
|
|
266
|
+
storeName: ''
|
|
267
|
+
}, paginationParams));
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
271
|
+
style: {
|
|
272
|
+
height: 550
|
|
273
|
+
}
|
|
274
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Form, {
|
|
275
|
+
labelCol: {
|
|
276
|
+
span: 6
|
|
277
|
+
},
|
|
278
|
+
layout: "horizontal"
|
|
279
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Row, {
|
|
280
|
+
gutter: 24
|
|
281
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
282
|
+
span: 12
|
|
283
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
284
|
+
label: "Store Name"
|
|
285
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
|
|
286
|
+
onChange: function onChange(e) {
|
|
287
|
+
return setStoreName(e.target.value);
|
|
288
|
+
},
|
|
289
|
+
size: "small",
|
|
290
|
+
value: storeName
|
|
291
|
+
}))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
292
|
+
span: 6
|
|
293
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
294
|
+
onClick: function onClick() {
|
|
295
|
+
setLoading(true);
|
|
296
|
+
paginationParams.pageIndex = 1;
|
|
297
|
+
queryStore(__assign({
|
|
298
|
+
storeName: storeName
|
|
299
|
+
}, paginationParams));
|
|
300
|
+
},
|
|
301
|
+
size: "small",
|
|
302
|
+
style: {
|
|
303
|
+
marginRight: 10
|
|
304
|
+
},
|
|
305
|
+
type: "primary"
|
|
306
|
+
}, (0, _locale.i18n)('QUERY')), /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
307
|
+
onClick: function onClick() {
|
|
308
|
+
reset();
|
|
309
|
+
},
|
|
310
|
+
size: "small"
|
|
311
|
+
}, (0, _locale.i18n)('CANCEL'))))), /*#__PURE__*/_react["default"].createElement(_antd.Table, {
|
|
312
|
+
bordered: false,
|
|
313
|
+
columns: columns,
|
|
314
|
+
dataSource: storeList,
|
|
315
|
+
defaultExpandAllRows: true,
|
|
316
|
+
loading: loading,
|
|
317
|
+
pagination: __assign(__assign({}, paginationParams), {
|
|
318
|
+
onChange: function onChange(page) {
|
|
319
|
+
paginationParams.pageIndex = page;
|
|
320
|
+
queryStore(__assign(__assign({}, paginationParams), {
|
|
321
|
+
storeName: storeName
|
|
322
|
+
}));
|
|
323
|
+
},
|
|
324
|
+
showSizeChanger: false
|
|
325
|
+
}),
|
|
326
|
+
rowKey: "affiliateStoreId",
|
|
327
|
+
rowSelection: rowSelection,
|
|
328
|
+
scroll: {
|
|
329
|
+
y: 400
|
|
330
|
+
}
|
|
331
|
+
}));
|
|
332
|
+
}
|
|
@@ -128,10 +128,11 @@ function (_super) {
|
|
|
128
128
|
size: "20px",
|
|
129
129
|
type: "icon-delete1"
|
|
130
130
|
})))), this.videoSetting.sourceType === 'Upload' && /*#__PURE__*/_react["default"].createElement(_VideoUpload["default"], {
|
|
131
|
-
onChange: function onChange(v, n) {
|
|
131
|
+
onChange: function onChange(v, n, id) {
|
|
132
132
|
_this.onFieldChange({
|
|
133
133
|
sourceUrl: v,
|
|
134
|
-
name: n
|
|
134
|
+
name: n,
|
|
135
|
+
sourceId: id
|
|
135
136
|
});
|
|
136
137
|
},
|
|
137
138
|
value: this.videoSetting.sourceUrl
|
|
@@ -37,6 +37,8 @@ var _StoreCatgTable = _interopRequireDefault(require("./StoreCatgTable"));
|
|
|
37
37
|
|
|
38
38
|
var _AffiliateProductTable = _interopRequireDefault(require("./AffiliateProductTable"));
|
|
39
39
|
|
|
40
|
+
var _AffiliateStore = _interopRequireDefault(require("./AffiliateStore"));
|
|
41
|
+
|
|
40
42
|
var _locale = require("../../locale");
|
|
41
43
|
|
|
42
44
|
var _commonUtil = require("../../utils/commonUtil");
|
|
@@ -232,7 +234,7 @@ var LinkModal = function LinkModal(props) {
|
|
|
232
234
|
|
|
233
235
|
var getLinkTypes = function getLinkTypes() {
|
|
234
236
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
235
|
-
var types,
|
|
237
|
+
var types, type_1;
|
|
236
238
|
return __generator(this, function (_a) {
|
|
237
239
|
switch (_a.label) {
|
|
238
240
|
case 0:
|
|
@@ -246,12 +248,15 @@ var LinkModal = function LinkModal(props) {
|
|
|
246
248
|
types = _a.sent();
|
|
247
249
|
|
|
248
250
|
if (onlySpecificCode) {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
+
type_1 = [];
|
|
252
|
+
onlySpecificCode.forEach(function (code) {
|
|
253
|
+
type_1.push(types.find(function (item) {
|
|
254
|
+
return item.linkTypeCode === code;
|
|
255
|
+
}));
|
|
251
256
|
});
|
|
252
257
|
|
|
253
|
-
if (
|
|
254
|
-
types =
|
|
258
|
+
if (type_1.length > 0) {
|
|
259
|
+
types = type_1;
|
|
255
260
|
}
|
|
256
261
|
}
|
|
257
262
|
|
|
@@ -359,6 +364,10 @@ var LinkModal = function LinkModal(props) {
|
|
|
359
364
|
onChange: function onChange(value) {
|
|
360
365
|
return setLinkUrl(value);
|
|
361
366
|
}
|
|
367
|
+
}), item.linkTypeCode === 'AffiliateStore' && /*#__PURE__*/_react["default"].createElement(_AffiliateStore["default"], {
|
|
368
|
+
onChange: function onChange(value) {
|
|
369
|
+
return setLinkUrl(value);
|
|
370
|
+
}
|
|
362
371
|
}));
|
|
363
372
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
364
373
|
className: "footer"
|
|
@@ -117,16 +117,7 @@ function (_super) {
|
|
|
117
117
|
value: inputName
|
|
118
118
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
119
119
|
className: "icon-btns"
|
|
120
|
-
}, /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
|
|
121
|
-
color: "#000",
|
|
122
|
-
onClick: function onClick() {
|
|
123
|
-
return _this.setState({
|
|
124
|
-
anchorModalVisible: true
|
|
125
|
-
});
|
|
126
|
-
},
|
|
127
|
-
size: "20px",
|
|
128
|
-
type: "icon-anchor"
|
|
129
|
-
}), window.magicDesign.outputType != 'html' && /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
|
|
120
|
+
}, window.magicDesign.outputType != 'html' && /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
|
|
130
121
|
color: "#000",
|
|
131
122
|
onClick: function onClick() {
|
|
132
123
|
return _this.setState({
|