@fonixtree/magic-design 2.0.203 → 2.0.204
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.
|
@@ -0,0 +1,114 @@
|
|
|
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 _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
|
|
14
|
+
var _locale = require("src/components/locale");
|
|
15
|
+
|
|
16
|
+
require("./index.less");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
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); }
|
|
21
|
+
|
|
22
|
+
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; }
|
|
23
|
+
|
|
24
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
25
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
26
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
27
|
+
__proto__: []
|
|
28
|
+
} instanceof Array && function (d, b) {
|
|
29
|
+
d.__proto__ = b;
|
|
30
|
+
} || function (d, b) {
|
|
31
|
+
for (var p in b) {
|
|
32
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return _extendStatics(d, b);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return function (d, b) {
|
|
40
|
+
_extendStatics(d, b);
|
|
41
|
+
|
|
42
|
+
function __() {
|
|
43
|
+
this.constructor = d;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
47
|
+
};
|
|
48
|
+
}();
|
|
49
|
+
|
|
50
|
+
var AComponent =
|
|
51
|
+
/** @class */
|
|
52
|
+
function (_super) {
|
|
53
|
+
__extends(AComponent, _super);
|
|
54
|
+
|
|
55
|
+
function AComponent() {
|
|
56
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
57
|
+
|
|
58
|
+
_this.state = {};
|
|
59
|
+
return _this;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
AComponent.prototype.render = function () {
|
|
63
|
+
var _a = this.props,
|
|
64
|
+
title = _a.title,
|
|
65
|
+
confirmText = _a.confirmText,
|
|
66
|
+
cancelText = _a.cancelText,
|
|
67
|
+
onConfirm = _a.onConfirm,
|
|
68
|
+
onClose = _a.onClose;
|
|
69
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
70
|
+
className: "search-dito-confirm-modal"
|
|
71
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
72
|
+
className: "modal-shadow",
|
|
73
|
+
onClick: onClose
|
|
74
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
75
|
+
className: "modal-content"
|
|
76
|
+
}, title && /*#__PURE__*/_react["default"].createElement("div", {
|
|
77
|
+
className: "modal-title"
|
|
78
|
+
}, title), /*#__PURE__*/_react["default"].createElement("div", {
|
|
79
|
+
className: "modal-btn-wrap"
|
|
80
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
81
|
+
onClick: onClose
|
|
82
|
+
}, cancelText), /*#__PURE__*/_react["default"].createElement("div", {
|
|
83
|
+
onClick: onConfirm
|
|
84
|
+
}, confirmText))));
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
return AComponent;
|
|
88
|
+
}(_react.Component);
|
|
89
|
+
|
|
90
|
+
AComponent.propTypes = {
|
|
91
|
+
/** title */
|
|
92
|
+
title: _propTypes["default"].string,
|
|
93
|
+
|
|
94
|
+
/** confirmText */
|
|
95
|
+
confirmText: _propTypes["default"].string,
|
|
96
|
+
|
|
97
|
+
/** cancelText */
|
|
98
|
+
cancelText: _propTypes["default"].string,
|
|
99
|
+
|
|
100
|
+
/** 确认按钮点击 */
|
|
101
|
+
onConfirm: function onConfirm() {},
|
|
102
|
+
|
|
103
|
+
/** 取消按钮点击 */
|
|
104
|
+
onClose: function onClose() {}
|
|
105
|
+
};
|
|
106
|
+
AComponent.defaultProps = {
|
|
107
|
+
title: '',
|
|
108
|
+
confirmText: (0, _locale.i18n)('CONFIRM'),
|
|
109
|
+
cancelText: (0, _locale.i18n)('CANCEL'),
|
|
110
|
+
onConfirm: function onConfirm() {},
|
|
111
|
+
onCancel: function onCancel() {}
|
|
112
|
+
};
|
|
113
|
+
var _default = AComponent;
|
|
114
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,114 @@
|
|
|
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 _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
|
|
14
|
+
var _locale = require("src/components/locale");
|
|
15
|
+
|
|
16
|
+
require("./index.less");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
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); }
|
|
21
|
+
|
|
22
|
+
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; }
|
|
23
|
+
|
|
24
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
25
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
26
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
27
|
+
__proto__: []
|
|
28
|
+
} instanceof Array && function (d, b) {
|
|
29
|
+
d.__proto__ = b;
|
|
30
|
+
} || function (d, b) {
|
|
31
|
+
for (var p in b) {
|
|
32
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return _extendStatics(d, b);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return function (d, b) {
|
|
40
|
+
_extendStatics(d, b);
|
|
41
|
+
|
|
42
|
+
function __() {
|
|
43
|
+
this.constructor = d;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
47
|
+
};
|
|
48
|
+
}();
|
|
49
|
+
|
|
50
|
+
var AComponent =
|
|
51
|
+
/** @class */
|
|
52
|
+
function (_super) {
|
|
53
|
+
__extends(AComponent, _super);
|
|
54
|
+
|
|
55
|
+
function AComponent() {
|
|
56
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
57
|
+
|
|
58
|
+
_this.state = {};
|
|
59
|
+
return _this;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
AComponent.prototype.render = function () {
|
|
63
|
+
var _a = this.props,
|
|
64
|
+
title = _a.title,
|
|
65
|
+
confirmText = _a.confirmText,
|
|
66
|
+
cancelText = _a.cancelText,
|
|
67
|
+
onConfirm = _a.onConfirm,
|
|
68
|
+
onClose = _a.onClose;
|
|
69
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
70
|
+
className: "search-dito-confirm-modal"
|
|
71
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
72
|
+
className: "modal-shadow",
|
|
73
|
+
onClick: onClose
|
|
74
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
75
|
+
className: "modal-content"
|
|
76
|
+
}, title && /*#__PURE__*/_react["default"].createElement("div", {
|
|
77
|
+
className: "modal-title"
|
|
78
|
+
}, title), /*#__PURE__*/_react["default"].createElement("div", {
|
|
79
|
+
className: "modal-btn-wrap"
|
|
80
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
81
|
+
onClick: onClose
|
|
82
|
+
}, cancelText), /*#__PURE__*/_react["default"].createElement("div", {
|
|
83
|
+
onClick: onConfirm
|
|
84
|
+
}, confirmText))));
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
return AComponent;
|
|
88
|
+
}(_react.Component);
|
|
89
|
+
|
|
90
|
+
AComponent.propTypes = {
|
|
91
|
+
/** title */
|
|
92
|
+
title: _propTypes["default"].string,
|
|
93
|
+
|
|
94
|
+
/** confirmText */
|
|
95
|
+
confirmText: _propTypes["default"].string,
|
|
96
|
+
|
|
97
|
+
/** cancelText */
|
|
98
|
+
cancelText: _propTypes["default"].string,
|
|
99
|
+
|
|
100
|
+
/** 确认按钮点击 */
|
|
101
|
+
onConfirm: function onConfirm() {},
|
|
102
|
+
|
|
103
|
+
/** 取消按钮点击 */
|
|
104
|
+
onClose: function onClose() {}
|
|
105
|
+
};
|
|
106
|
+
AComponent.defaultProps = {
|
|
107
|
+
title: '',
|
|
108
|
+
confirmText: (0, _locale.i18n)('CONFIRM'),
|
|
109
|
+
cancelText: (0, _locale.i18n)('CANCEL'),
|
|
110
|
+
onConfirm: function onConfirm() {},
|
|
111
|
+
onCancel: function onCancel() {}
|
|
112
|
+
};
|
|
113
|
+
var _default = AComponent;
|
|
114
|
+
exports["default"] = _default;
|