@fonixtree/magic-design 2.0.98 → 2.0.100
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/magic-box-iconfont.css +23 -3
- package/es/assets/fonts/magic-box-iconfont.js +1 -1
- package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/es/common/PopUpModal/index.js +349 -0
- package/es/common/PopUpModal/index.less +79 -0
- package/es/common/PopUpModal1/index.js +164 -0
- package/es/common/PopUpModal1/style.less +56 -0
- package/es/common/ProductFilterModal/components/FilterSearchModal/imgs/notFound.png +0 -0
- package/es/common/ProductFilterModal/components/FilterSearchModal/index.js +244 -0
- package/es/common/ProductFilterModal/components/FilterSearchModal/index.less +129 -0
- package/es/common/ProductFilterModal/index.js +366 -0
- package/es/common/ProductFilterModal/index.less +72 -0
- package/es/common/Tag/index.js +46 -0
- package/es/common/Tag/index.less +16 -0
- package/es/common/index.js +16 -0
- package/es/composite-comp/common/components/MonpayProductItem/index.js +1 -1
- package/es/composite-comp/monpay/components/Bundle/defaultJSON.js +77 -0
- package/es/composite-comp/monpay/components/Bundle/index.js +86 -0
- package/es/composite-comp/monpay/components/Bundle/mobile/BundleItem/index.js +119 -0
- package/es/composite-comp/monpay/components/Bundle/mobile/BundleItem/index.less +107 -0
- package/es/composite-comp/monpay/components/Bundle/mobile/BundleProdItem/index.js +51 -0
- package/es/composite-comp/monpay/components/Bundle/mobile/BundleProdItem/index.less +61 -0
- package/es/composite-comp/monpay/components/Bundle/mobile/img/card.png +0 -0
- package/es/composite-comp/monpay/components/Bundle/mobile/index.js +493 -0
- package/es/composite-comp/monpay/components/Bundle/mobile/index.less +7 -0
- package/es/composite-comp/monpay/components/InterestProducts/defaultJSON.js +80 -0
- package/es/composite-comp/monpay/components/InterestProducts/index.js +86 -0
- package/es/composite-comp/monpay/components/InterestProducts/mobile/ProductItem/index.js +192 -0
- package/es/composite-comp/monpay/components/InterestProducts/mobile/ProductItem/index.less +159 -0
- package/es/composite-comp/monpay/components/InterestProducts/mobile/img/card.png +0 -0
- package/es/composite-comp/monpay/components/InterestProducts/mobile/index.js +348 -0
- package/es/composite-comp/monpay/components/InterestProducts/mobile/index.less +21 -0
- package/es/composite-comp/monpay/components/MerchantSales/defaultJSON.js +99 -0
- package/es/composite-comp/monpay/components/MerchantSales/index.js +86 -0
- package/es/composite-comp/monpay/components/MerchantSales/mobile/ProductItem/index.js +104 -0
- package/es/composite-comp/monpay/components/MerchantSales/mobile/ProductItem/index.less +34 -0
- package/es/composite-comp/monpay/components/MerchantSales/mobile/img/card.png +0 -0
- package/es/composite-comp/monpay/components/MerchantSales/mobile/img/sale.png +0 -0
- package/es/composite-comp/monpay/components/MerchantSales/mobile/index.js +302 -0
- package/es/composite-comp/monpay/components/MerchantSales/mobile/index.less +14 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.less +1 -1
- package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/index.less +1 -1
- package/es/composite-comp/monpay/components/MonpayRecommend/defaultJSON.js +7 -3
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/SearchCondition/index.js +144 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/SearchCondition/index.less +49 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/card.png +0 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +143 -35
- package/es/composite-comp/monpay/components/MonpayRecommend/pc/imgs/card.png +0 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/pc/index.js +59 -5
- package/es/composite-comp/monpay/components/MonpayRecommend/pc/index.less +5 -0
- package/es/composite-comp/monpay/config-panels/BundleConfig/ConfigContent/index.js +114 -0
- package/es/composite-comp/monpay/config-panels/BundleConfig/ConfigContent/index.less +41 -0
- package/es/composite-comp/monpay/config-panels/BundleConfig/ConfigTitle/index.js +95 -0
- package/es/composite-comp/monpay/config-panels/BundleConfig/ConfigTitle/index.less +7 -0
- package/es/composite-comp/monpay/config-panels/BundleConfig/imgs/layout.png +0 -0
- package/es/composite-comp/monpay/config-panels/BundleConfig/index.js +73 -0
- package/es/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigContent/index.js +114 -0
- package/es/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigContent/index.less +41 -0
- package/es/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigTitle/index.js +101 -0
- package/es/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigTitle/index.less +7 -0
- package/es/composite-comp/monpay/config-panels/InterestProductsConfig/imgs/layout.png +0 -0
- package/es/composite-comp/monpay/config-panels/InterestProductsConfig/index.js +73 -0
- package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigContent/index.js +109 -0
- package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigContent/index.less +41 -0
- package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigTitle/index.js +95 -0
- package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigTitle/index.less +7 -0
- package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/imgs/layout.png +0 -0
- package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/index.js +73 -0
- package/es/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/AIRecommendation/index.js +5 -1
- package/es/constants/component-types.js +14 -2
- package/es/constants/index.js +34 -3
- package/es/locale/en/en.json +10 -0
- package/es/locale/es/es.json +10 -0
- package/es/locale/id/id.json +10 -0
- package/lib/assets/fonts/magic-box-iconfont.css +23 -3
- package/lib/assets/fonts/magic-box-iconfont.js +1 -1
- package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/lib/common/PopUpModal/index.js +349 -0
- package/lib/common/PopUpModal/index.less +79 -0
- package/lib/common/PopUpModal1/index.js +164 -0
- package/lib/common/PopUpModal1/style.less +56 -0
- package/lib/common/ProductFilterModal/components/FilterSearchModal/imgs/notFound.png +0 -0
- package/lib/common/ProductFilterModal/components/FilterSearchModal/index.js +244 -0
- package/lib/common/ProductFilterModal/components/FilterSearchModal/index.less +129 -0
- package/lib/common/ProductFilterModal/index.js +366 -0
- package/lib/common/ProductFilterModal/index.less +72 -0
- package/lib/common/Tag/index.js +46 -0
- package/lib/common/Tag/index.less +16 -0
- package/lib/common/index.js +16 -0
- package/lib/composite-comp/common/components/MonpayProductItem/index.js +1 -1
- package/lib/composite-comp/monpay/components/Bundle/defaultJSON.js +77 -0
- package/lib/composite-comp/monpay/components/Bundle/index.js +86 -0
- package/lib/composite-comp/monpay/components/Bundle/mobile/BundleItem/index.js +119 -0
- package/lib/composite-comp/monpay/components/Bundle/mobile/BundleItem/index.less +107 -0
- package/lib/composite-comp/monpay/components/Bundle/mobile/BundleProdItem/index.js +51 -0
- package/lib/composite-comp/monpay/components/Bundle/mobile/BundleProdItem/index.less +61 -0
- package/lib/composite-comp/monpay/components/Bundle/mobile/img/card.png +0 -0
- package/lib/composite-comp/monpay/components/Bundle/mobile/index.js +493 -0
- package/lib/composite-comp/monpay/components/Bundle/mobile/index.less +7 -0
- package/lib/composite-comp/monpay/components/InterestProducts/defaultJSON.js +80 -0
- package/lib/composite-comp/monpay/components/InterestProducts/index.js +86 -0
- package/lib/composite-comp/monpay/components/InterestProducts/mobile/ProductItem/index.js +192 -0
- package/lib/composite-comp/monpay/components/InterestProducts/mobile/ProductItem/index.less +159 -0
- package/lib/composite-comp/monpay/components/InterestProducts/mobile/img/card.png +0 -0
- package/lib/composite-comp/monpay/components/InterestProducts/mobile/index.js +348 -0
- package/lib/composite-comp/monpay/components/InterestProducts/mobile/index.less +21 -0
- package/lib/composite-comp/monpay/components/MerchantSales/defaultJSON.js +99 -0
- package/lib/composite-comp/monpay/components/MerchantSales/index.js +86 -0
- package/lib/composite-comp/monpay/components/MerchantSales/mobile/ProductItem/index.js +104 -0
- package/lib/composite-comp/monpay/components/MerchantSales/mobile/ProductItem/index.less +34 -0
- package/lib/composite-comp/monpay/components/MerchantSales/mobile/img/card.png +0 -0
- package/lib/composite-comp/monpay/components/MerchantSales/mobile/img/sale.png +0 -0
- package/lib/composite-comp/monpay/components/MerchantSales/mobile/index.js +302 -0
- package/lib/composite-comp/monpay/components/MerchantSales/mobile/index.less +14 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.less +1 -1
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/index.less +1 -1
- package/lib/composite-comp/monpay/components/MonpayRecommend/defaultJSON.js +7 -3
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/SearchCondition/index.js +144 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/SearchCondition/index.less +49 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/card.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +143 -35
- package/lib/composite-comp/monpay/components/MonpayRecommend/pc/imgs/card.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/pc/index.js +59 -5
- package/lib/composite-comp/monpay/components/MonpayRecommend/pc/index.less +5 -0
- package/lib/composite-comp/monpay/config-panels/BundleConfig/ConfigContent/index.js +114 -0
- package/lib/composite-comp/monpay/config-panels/BundleConfig/ConfigContent/index.less +41 -0
- package/lib/composite-comp/monpay/config-panels/BundleConfig/ConfigTitle/index.js +95 -0
- package/lib/composite-comp/monpay/config-panels/BundleConfig/ConfigTitle/index.less +7 -0
- package/lib/composite-comp/monpay/config-panels/BundleConfig/imgs/layout.png +0 -0
- package/lib/composite-comp/monpay/config-panels/BundleConfig/index.js +73 -0
- package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigContent/index.js +114 -0
- package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigContent/index.less +41 -0
- package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigTitle/index.js +101 -0
- package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigTitle/index.less +7 -0
- package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/imgs/layout.png +0 -0
- package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/index.js +73 -0
- package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigContent/index.js +109 -0
- package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigContent/index.less +41 -0
- package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigTitle/index.js +95 -0
- package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigTitle/index.less +7 -0
- package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/imgs/layout.png +0 -0
- package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/index.js +73 -0
- package/lib/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/AIRecommendation/index.js +5 -1
- package/lib/constants/component-types.js +14 -2
- package/lib/constants/index.js +34 -3
- package/lib/locale/en/en.json +10 -0
- package/lib/locale/es/es.json +10 -0
- package/lib/locale/id/id.json +10 -0
- package/package.json +1 -1
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/defImg1.png +0 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/defImg2.png +0 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/defImg3.png +0 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/pc/imgs/defImg1.png +0 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/pc/imgs/defImg2.png +0 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/pc/imgs/defImg3.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/defImg1.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/defImg2.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/defImg3.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/pc/imgs/defImg1.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/pc/imgs/defImg2.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/pc/imgs/defImg3.png +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,349 @@
|
|
|
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 _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
+
|
|
16
|
+
require("./index.less");
|
|
17
|
+
|
|
18
|
+
var _Button = _interopRequireDefault(require("../Button"));
|
|
19
|
+
|
|
20
|
+
var _coreUtil = require("../../utils/coreUtil");
|
|
21
|
+
|
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
|
+
|
|
24
|
+
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); }
|
|
25
|
+
|
|
26
|
+
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; }
|
|
27
|
+
|
|
28
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
29
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
30
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
31
|
+
__proto__: []
|
|
32
|
+
} instanceof Array && function (d, b) {
|
|
33
|
+
d.__proto__ = b;
|
|
34
|
+
} || function (d, b) {
|
|
35
|
+
for (var p in b) {
|
|
36
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
return _extendStatics(d, b);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
return function (d, b) {
|
|
44
|
+
_extendStatics(d, b);
|
|
45
|
+
|
|
46
|
+
function __() {
|
|
47
|
+
this.constructor = d;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
51
|
+
};
|
|
52
|
+
}();
|
|
53
|
+
|
|
54
|
+
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
55
|
+
function adopt(value) {
|
|
56
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
57
|
+
resolve(value);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
62
|
+
function fulfilled(value) {
|
|
63
|
+
try {
|
|
64
|
+
step(generator.next(value));
|
|
65
|
+
} catch (e) {
|
|
66
|
+
reject(e);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function rejected(value) {
|
|
71
|
+
try {
|
|
72
|
+
step(generator["throw"](value));
|
|
73
|
+
} catch (e) {
|
|
74
|
+
reject(e);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function step(result) {
|
|
79
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
|
|
87
|
+
var _ = {
|
|
88
|
+
label: 0,
|
|
89
|
+
sent: function sent() {
|
|
90
|
+
if (t[0] & 1) throw t[1];
|
|
91
|
+
return t[1];
|
|
92
|
+
},
|
|
93
|
+
trys: [],
|
|
94
|
+
ops: []
|
|
95
|
+
},
|
|
96
|
+
f,
|
|
97
|
+
y,
|
|
98
|
+
t,
|
|
99
|
+
g;
|
|
100
|
+
return g = {
|
|
101
|
+
next: verb(0),
|
|
102
|
+
"throw": verb(1),
|
|
103
|
+
"return": verb(2)
|
|
104
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
105
|
+
return this;
|
|
106
|
+
}), g;
|
|
107
|
+
|
|
108
|
+
function verb(n) {
|
|
109
|
+
return function (v) {
|
|
110
|
+
return step([n, v]);
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function step(op) {
|
|
115
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
116
|
+
|
|
117
|
+
while (_) {
|
|
118
|
+
try {
|
|
119
|
+
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;
|
|
120
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
121
|
+
|
|
122
|
+
switch (op[0]) {
|
|
123
|
+
case 0:
|
|
124
|
+
case 1:
|
|
125
|
+
t = op;
|
|
126
|
+
break;
|
|
127
|
+
|
|
128
|
+
case 4:
|
|
129
|
+
_.label++;
|
|
130
|
+
return {
|
|
131
|
+
value: op[1],
|
|
132
|
+
done: false
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
case 5:
|
|
136
|
+
_.label++;
|
|
137
|
+
y = op[1];
|
|
138
|
+
op = [0];
|
|
139
|
+
continue;
|
|
140
|
+
|
|
141
|
+
case 7:
|
|
142
|
+
op = _.ops.pop();
|
|
143
|
+
|
|
144
|
+
_.trys.pop();
|
|
145
|
+
|
|
146
|
+
continue;
|
|
147
|
+
|
|
148
|
+
default:
|
|
149
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
150
|
+
_ = 0;
|
|
151
|
+
continue;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
155
|
+
_.label = op[1];
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
160
|
+
_.label = t[1];
|
|
161
|
+
t = op;
|
|
162
|
+
break;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if (t && _.label < t[2]) {
|
|
166
|
+
_.label = t[2];
|
|
167
|
+
|
|
168
|
+
_.ops.push(op);
|
|
169
|
+
|
|
170
|
+
break;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
if (t[2]) _.ops.pop();
|
|
174
|
+
|
|
175
|
+
_.trys.pop();
|
|
176
|
+
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
op = body.call(thisArg, _);
|
|
181
|
+
} catch (e) {
|
|
182
|
+
op = [6, e];
|
|
183
|
+
y = 0;
|
|
184
|
+
} finally {
|
|
185
|
+
f = t = 0;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
if (op[0] & 5) throw op[1];
|
|
190
|
+
return {
|
|
191
|
+
value: op[0] ? op[1] : void 0,
|
|
192
|
+
done: true
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
198
|
+
var t = {};
|
|
199
|
+
|
|
200
|
+
for (var p in s) {
|
|
201
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
205
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
206
|
+
}
|
|
207
|
+
return t;
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
var debug = require('debug')('worker:pop-up-modal');
|
|
211
|
+
|
|
212
|
+
var AComponent =
|
|
213
|
+
/** @class */
|
|
214
|
+
function (_super) {
|
|
215
|
+
__extends(AComponent, _super);
|
|
216
|
+
|
|
217
|
+
function AComponent() {
|
|
218
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
219
|
+
|
|
220
|
+
_this.state = {};
|
|
221
|
+
|
|
222
|
+
_this.onConfirm = function () {
|
|
223
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
224
|
+
var _a, onConfirm, onClose, error_1;
|
|
225
|
+
|
|
226
|
+
return __generator(this, function (_b) {
|
|
227
|
+
switch (_b.label) {
|
|
228
|
+
case 0:
|
|
229
|
+
_b.trys.push([0, 2,, 3]);
|
|
230
|
+
|
|
231
|
+
_a = this.props, onConfirm = _a.onConfirm, onClose = _a.onClose;
|
|
232
|
+
return [4
|
|
233
|
+
/*yield*/
|
|
234
|
+
, onConfirm()];
|
|
235
|
+
|
|
236
|
+
case 1:
|
|
237
|
+
_b.sent();
|
|
238
|
+
|
|
239
|
+
onClose();
|
|
240
|
+
return [3
|
|
241
|
+
/*break*/
|
|
242
|
+
, 3];
|
|
243
|
+
|
|
244
|
+
case 2:
|
|
245
|
+
error_1 = _b.sent();
|
|
246
|
+
debug(error_1);
|
|
247
|
+
return [3
|
|
248
|
+
/*break*/
|
|
249
|
+
, 3];
|
|
250
|
+
|
|
251
|
+
case 3:
|
|
252
|
+
return [2
|
|
253
|
+
/*return*/
|
|
254
|
+
];
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
});
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
_this.onCancel = function () {
|
|
261
|
+
try {
|
|
262
|
+
var onClose = _this.props.onClose;
|
|
263
|
+
onCancel();
|
|
264
|
+
onClose();
|
|
265
|
+
} catch (error) {
|
|
266
|
+
debug(error);
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
return _this;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
AComponent.prototype.render = function () {
|
|
274
|
+
var _a = this.props,
|
|
275
|
+
title = _a.title,
|
|
276
|
+
titleStyle = _a.titleStyle,
|
|
277
|
+
message = _a.message,
|
|
278
|
+
confirmText = _a.confirmText,
|
|
279
|
+
cancelText = _a.cancelText,
|
|
280
|
+
onClose = _a.onClose,
|
|
281
|
+
visible = _a.visible,
|
|
282
|
+
maskClosable = _a.maskClosable,
|
|
283
|
+
rest = __rest(_a, ["title", "titleStyle", "message", "confirmText", "cancelText", "onClose", "visible", "maskClosable"]);
|
|
284
|
+
|
|
285
|
+
var messageBox = message;
|
|
286
|
+
|
|
287
|
+
if (message instanceof Function) {
|
|
288
|
+
messageBox = message();
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, visible && /*#__PURE__*/_react["default"].createElement("div", {
|
|
292
|
+
className: (0, _classnames["default"])('popUpModal', rest.className),
|
|
293
|
+
style: {
|
|
294
|
+
position: (0, _coreUtil.isDesignMode)() ? 'absolute' : 'fixed'
|
|
295
|
+
}
|
|
296
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
297
|
+
className: "modal-shadow",
|
|
298
|
+
onClick: maskClosable && onClose
|
|
299
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
300
|
+
className: "modal-content"
|
|
301
|
+
}, title && /*#__PURE__*/_react["default"].createElement("div", {
|
|
302
|
+
className: "modal-title",
|
|
303
|
+
style: titleStyle
|
|
304
|
+
}, title), /*#__PURE__*/_react["default"].createElement("div", {
|
|
305
|
+
className: "modal-btn-wrap"
|
|
306
|
+
}, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
307
|
+
onClick: this.onConfirm,
|
|
308
|
+
style: {
|
|
309
|
+
flex: 'none'
|
|
310
|
+
}
|
|
311
|
+
}, confirmText)))));
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
return AComponent;
|
|
315
|
+
}(_react.Component);
|
|
316
|
+
|
|
317
|
+
AComponent.propTypes = {
|
|
318
|
+
/** title */
|
|
319
|
+
title: _propTypes["default"].string,
|
|
320
|
+
|
|
321
|
+
/** message */
|
|
322
|
+
message: _propTypes["default"].any,
|
|
323
|
+
|
|
324
|
+
/** confirmText */
|
|
325
|
+
confirmText: _propTypes["default"].string,
|
|
326
|
+
|
|
327
|
+
/** cancelText */
|
|
328
|
+
cancelText: _propTypes["default"].string,
|
|
329
|
+
|
|
330
|
+
/** hideCancel */
|
|
331
|
+
hideCancel: _propTypes["default"].bool,
|
|
332
|
+
|
|
333
|
+
/** 确认按钮点击 */
|
|
334
|
+
onConfirm: function onConfirm() {},
|
|
335
|
+
|
|
336
|
+
/** 取消按钮点击 */
|
|
337
|
+
onCancel: function onCancel() {}
|
|
338
|
+
};
|
|
339
|
+
AComponent.defaultProps = {
|
|
340
|
+
title: '',
|
|
341
|
+
message: '',
|
|
342
|
+
confirmText: 'YES',
|
|
343
|
+
cancelText: 'NO',
|
|
344
|
+
hideCancel: false,
|
|
345
|
+
onConfirm: function onConfirm() {},
|
|
346
|
+
onCancel: function onCancel() {}
|
|
347
|
+
};
|
|
348
|
+
var _default = AComponent;
|
|
349
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
.popUpModal {
|
|
2
|
+
display: flex;
|
|
3
|
+
position: fixed;
|
|
4
|
+
left: 0;
|
|
5
|
+
top: 0;
|
|
6
|
+
right: 0;
|
|
7
|
+
bottom: 0;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
width: 100%;
|
|
10
|
+
z-index: 1000;
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
transform: translateZ(1000px);
|
|
15
|
+
|
|
16
|
+
.modal-shadow {
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: 100%;
|
|
19
|
+
background-color: rgba(0, 0, 0, .5);
|
|
20
|
+
position: absolute;
|
|
21
|
+
left: 0;
|
|
22
|
+
right: 0;
|
|
23
|
+
top: 0;
|
|
24
|
+
bottom: 0;
|
|
25
|
+
z-index: -1;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.modal-content {
|
|
29
|
+
position: absolute;
|
|
30
|
+
bottom: 0;
|
|
31
|
+
left: 0;
|
|
32
|
+
right: 0;
|
|
33
|
+
width: 100%;
|
|
34
|
+
padding: 20px;
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
background-color: #fff;
|
|
38
|
+
box-shadow: 0px 4px 8px rgba(96, 97, 112, 0.16);
|
|
39
|
+
animation: bounceIn .5s linear;
|
|
40
|
+
margin-top: -80px;
|
|
41
|
+
max-height: 60%;
|
|
42
|
+
border-radius: 10px 10px 0 0;
|
|
43
|
+
|
|
44
|
+
.modal-title {
|
|
45
|
+
color: #000;
|
|
46
|
+
font-size: 16px;
|
|
47
|
+
font-weight: 600;
|
|
48
|
+
text-align: center;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.modal-icon-close {
|
|
52
|
+
position: absolute;
|
|
53
|
+
right: 20px;
|
|
54
|
+
top: 20px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.modal-message {
|
|
58
|
+
margin: 20px 10px;
|
|
59
|
+
overflow-y: scroll;
|
|
60
|
+
height: calc(100% - 64px);
|
|
61
|
+
color: rgb(0, 0, 0);
|
|
62
|
+
text-align: center;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.message-max-height {
|
|
66
|
+
height: calc(100% - 114px);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.modal-btn-wrap {
|
|
70
|
+
display: flex;
|
|
71
|
+
flex-direction: column;
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
.confirm {
|
|
75
|
+
margin: 10px 0;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _antd = require("antd");
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
|
|
14
|
+
var _style = _interopRequireDefault(require("./style.less"));
|
|
15
|
+
|
|
16
|
+
var _Button = _interopRequireDefault(require("../Button"));
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
21
|
+
|
|
22
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
23
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
24
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
25
|
+
__proto__: []
|
|
26
|
+
} instanceof Array && function (d, b) {
|
|
27
|
+
d.__proto__ = b;
|
|
28
|
+
} || function (d, b) {
|
|
29
|
+
for (var p in b) {
|
|
30
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
return _extendStatics(d, b);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
return function (d, b) {
|
|
38
|
+
_extendStatics(d, b);
|
|
39
|
+
|
|
40
|
+
function __() {
|
|
41
|
+
this.constructor = d;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
45
|
+
};
|
|
46
|
+
}();
|
|
47
|
+
|
|
48
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
49
|
+
__assign = Object.assign || function (t) {
|
|
50
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
51
|
+
s = arguments[i];
|
|
52
|
+
|
|
53
|
+
for (var p in s) {
|
|
54
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return t;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
return __assign.apply(this, arguments);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
65
|
+
var t = {};
|
|
66
|
+
|
|
67
|
+
for (var p in s) {
|
|
68
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
72
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
73
|
+
}
|
|
74
|
+
return t;
|
|
75
|
+
};
|
|
76
|
+
/* eslint-disable max-len */
|
|
77
|
+
|
|
78
|
+
/* eslint-disable react/prefer-stateless-function */
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
var MyModal =
|
|
82
|
+
/** @class */
|
|
83
|
+
function (_super) {
|
|
84
|
+
__extends(MyModal, _super);
|
|
85
|
+
|
|
86
|
+
function MyModal() {
|
|
87
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
MyModal.prototype.render = function () {
|
|
91
|
+
var _a = this.props,
|
|
92
|
+
onOk = _a.onOk,
|
|
93
|
+
okText = _a.okText,
|
|
94
|
+
hideCloseBtn = _a.hideCloseBtn,
|
|
95
|
+
title = _a.title,
|
|
96
|
+
visible = _a.visible,
|
|
97
|
+
onCloseText = _a.onCloseText,
|
|
98
|
+
onClose = _a.onClose,
|
|
99
|
+
children = _a.children,
|
|
100
|
+
rest = __rest(_a, ["onOk", "okText", "hideCloseBtn", "title", "visible", "onCloseText", "onClose", "children"]);
|
|
101
|
+
|
|
102
|
+
var style = rest.style;
|
|
103
|
+
Reflect.deleteProperty(rest, 'style');
|
|
104
|
+
var showCloseBtn = !hideCloseBtn && onClose;
|
|
105
|
+
return /*#__PURE__*/_react["default"].createElement(_antd.Popup, _extends({
|
|
106
|
+
className: _style["default"].container,
|
|
107
|
+
closeOnMaskClick: true,
|
|
108
|
+
onClose: onClose,
|
|
109
|
+
visible: visible
|
|
110
|
+
}, rest), /*#__PURE__*/_react["default"].createElement("div", {
|
|
111
|
+
className: "modal-content-wrap",
|
|
112
|
+
style: __assign({}, style)
|
|
113
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
114
|
+
className: "topLineWrap"
|
|
115
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
116
|
+
className: "topLine",
|
|
117
|
+
onClick: onClose
|
|
118
|
+
})), title && /*#__PURE__*/_react["default"].createElement("div", {
|
|
119
|
+
className: "modal-title"
|
|
120
|
+
}, title), children, (onOk || showCloseBtn) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
121
|
+
className: "btn-wrap"
|
|
122
|
+
}, onOk && /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
123
|
+
onClick: onOk
|
|
124
|
+
}, okText), showCloseBtn && /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
125
|
+
onClick: onClose,
|
|
126
|
+
plain: true
|
|
127
|
+
}, onCloseText))));
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
return MyModal;
|
|
131
|
+
}(_react["default"].Component);
|
|
132
|
+
|
|
133
|
+
MyModal.propTypes = {
|
|
134
|
+
/** title */
|
|
135
|
+
title: _propTypes["default"].string,
|
|
136
|
+
|
|
137
|
+
/** visible */
|
|
138
|
+
visible: _propTypes["default"].bool,
|
|
139
|
+
|
|
140
|
+
/** onClose */
|
|
141
|
+
onClose: _propTypes["default"].func,
|
|
142
|
+
|
|
143
|
+
/** 确认按钮事件 */
|
|
144
|
+
onOk: _propTypes["default"].func,
|
|
145
|
+
|
|
146
|
+
/** 确认按钮文案 */
|
|
147
|
+
okText: _propTypes["default"].string,
|
|
148
|
+
|
|
149
|
+
/** 取消按钮文案 */
|
|
150
|
+
onCloseText: _propTypes["default"].string,
|
|
151
|
+
|
|
152
|
+
/** 取消按钮文案 */
|
|
153
|
+
hideCloseBtn: _propTypes["default"].bool
|
|
154
|
+
};
|
|
155
|
+
MyModal.defaultProps = {
|
|
156
|
+
title: '',
|
|
157
|
+
visible: false,
|
|
158
|
+
onClose: function onClose() {},
|
|
159
|
+
okText: 'Ok',
|
|
160
|
+
onCloseText: 'Cancel',
|
|
161
|
+
hideCloseBtn: false
|
|
162
|
+
};
|
|
163
|
+
var _default = MyModal;
|
|
164
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
:global {
|
|
3
|
+
.topLineWrap {
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
height: 24px;
|
|
8
|
+
|
|
9
|
+
.topLine {
|
|
10
|
+
width: 42px;
|
|
11
|
+
height: 4px;
|
|
12
|
+
background: rgba(233, 233, 233, 1);
|
|
13
|
+
border-radius: 2px;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.btn-wrap {
|
|
18
|
+
padding: 12px 24px;
|
|
19
|
+
|
|
20
|
+
&>div+div {
|
|
21
|
+
margin-top: 12px;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
.adm-popup-body {
|
|
27
|
+
border-radius: 10px 10px 0px 0px;
|
|
28
|
+
background: #FFF;
|
|
29
|
+
box-shadow: 0px -10px 5px 0px rgba(0, 0, 0, 0.05);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.am-modal-content {
|
|
33
|
+
text-align: left;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.am-modal-content {
|
|
37
|
+
border-radius: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.modal-content-wrap {
|
|
41
|
+
padding: 0;
|
|
42
|
+
position: relative;
|
|
43
|
+
|
|
44
|
+
.modal-title {
|
|
45
|
+
font-size: 16px;
|
|
46
|
+
font-weight: 600;
|
|
47
|
+
color: #000;
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
height: 48px;
|
|
52
|
+
padding: 12px 16px 0 16px;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|