iglooform 3.0.11 → 3.0.13
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/.dumi/tmp/dumi/theme/ContextWrapper.tsx +1 -1
- package/es/confirmation/index.d.ts +2 -0
- package/es/confirmation/index.js +8 -2
- package/es/confirmation/style/index.d.ts +1 -0
- package/es/confirmation/style/index.js +1 -0
- package/es/confirmation/style/index.less +4 -0
- package/es/form/addable-section/index.js +6 -5
- package/es/free-form/addable-section/index.js +2 -2
- package/es/layout/defaultFooter.js +2 -2
- package/es/upload-photo/index.js +6 -3
- package/es/upload-photo/style/index.less +13 -0
- package/lib/confirmation/index.d.ts +2 -0
- package/lib/confirmation/index.js +8 -2
- package/lib/confirmation/style/index.d.ts +1 -0
- package/lib/confirmation/style/index.js +3 -1
- package/lib/confirmation/style/index.less +4 -0
- package/lib/form/addable-section/index.js +6 -5
- package/lib/free-form/addable-section/index.js +2 -2
- package/lib/layout/defaultFooter.js +2 -2
- package/lib/upload-photo/index.js +6 -3
- package/lib/upload-photo/style/index.less +13 -0
- package/package.json +1 -1
- package/yarn-error.log +16168 -0
|
@@ -30,7 +30,7 @@ export default function DumiContextWrapper() {
|
|
|
30
30
|
|
|
31
31
|
return (
|
|
32
32
|
<SiteContext.Provider value={{
|
|
33
|
-
pkg: {"name":"iglooform","version":"3.0.
|
|
33
|
+
pkg: {"name":"iglooform","version":"3.0.12","license":"MIT"},
|
|
34
34
|
historyType: "browser",
|
|
35
35
|
entryExports,
|
|
36
36
|
demos,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { FC } from '../types';
|
|
3
|
+
import './style';
|
|
3
4
|
export interface ConfirmationProps {
|
|
4
5
|
onChange?: Function;
|
|
5
6
|
value?: boolean;
|
|
@@ -9,6 +10,7 @@ export interface ConfirmationProps {
|
|
|
9
10
|
okText?: ReactNode;
|
|
10
11
|
cancelText?: ReactNode;
|
|
11
12
|
href?: string;
|
|
13
|
+
disabled?: boolean;
|
|
12
14
|
}
|
|
13
15
|
declare const Confirmation: FC<ConfirmationProps>;
|
|
14
16
|
export default Confirmation;
|
package/es/confirmation/index.js
CHANGED
|
@@ -5,11 +5,13 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
5
5
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import { useState, useContext } from 'react';
|
|
8
|
+
import cls from 'classnames';
|
|
8
9
|
import Modal from "../modal";
|
|
9
10
|
import Typography from "../typography";
|
|
10
11
|
import Checkbox from "../checkbox";
|
|
11
12
|
import Button from "../button";
|
|
12
13
|
import LocaleContext from "../locale/locale-context";
|
|
14
|
+
import "./style";
|
|
13
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
16
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
15
17
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -21,7 +23,8 @@ var Confirmation = function Confirmation(_ref) {
|
|
|
21
23
|
modalTitle = _ref.modalTitle,
|
|
22
24
|
okText = _ref.okText,
|
|
23
25
|
cancelText = _ref.cancelText,
|
|
24
|
-
href = _ref.href
|
|
26
|
+
href = _ref.href,
|
|
27
|
+
disabled = _ref.disabled;
|
|
25
28
|
var _useState = useState(false),
|
|
26
29
|
_useState2 = _slicedToArray(_useState, 2),
|
|
27
30
|
visible = _useState2[0],
|
|
@@ -50,10 +53,12 @@ var Confirmation = function Confirmation(_ref) {
|
|
|
50
53
|
return /*#__PURE__*/_jsxs("div", {
|
|
51
54
|
children: [/*#__PURE__*/_jsx(Checkbox, {
|
|
52
55
|
onChange: handleCheckbox,
|
|
53
|
-
checked: value
|
|
56
|
+
checked: value,
|
|
57
|
+
disabled: disabled
|
|
54
58
|
}), /*#__PURE__*/_jsx(Typography, {
|
|
55
59
|
level: "body1",
|
|
56
60
|
onClick: function onClick(e) {
|
|
61
|
+
if (disabled) return;
|
|
57
62
|
e.stopPropagation();
|
|
58
63
|
if (modalContent) {
|
|
59
64
|
return setVisible(true);
|
|
@@ -71,6 +76,7 @@ var Confirmation = function Confirmation(_ref) {
|
|
|
71
76
|
cursor: 'pointer',
|
|
72
77
|
marginLeft: 8
|
|
73
78
|
},
|
|
79
|
+
className: cls(disabled && 'disabled'),
|
|
74
80
|
children: message || /*#__PURE__*/_jsxs(_Fragment, {
|
|
75
81
|
children: [formatMessage({
|
|
76
82
|
id: 'I agree to the Igloo'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './index.less';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index.less";
|
|
@@ -29,10 +29,11 @@ var useBreakpoint = Grid.useBreakpoint;
|
|
|
29
29
|
var AddableSection = function AddableSection(_ref) {
|
|
30
30
|
var parentName = _ref.parentName,
|
|
31
31
|
config = _ref.config,
|
|
32
|
-
|
|
32
|
+
previewPropsFromInnerConfig = _ref.preview,
|
|
33
33
|
disabled = _ref.disabled,
|
|
34
34
|
setShowStepButton = _ref.setShowStepButton;
|
|
35
|
-
var
|
|
35
|
+
var formItemPreview = config.preview,
|
|
36
|
+
_config$elements = config.elements,
|
|
36
37
|
elements = _config$elements === void 0 ? [] : _config$elements,
|
|
37
38
|
name = config.name,
|
|
38
39
|
label = config.label,
|
|
@@ -51,6 +52,7 @@ var AddableSection = function AddableSection(_ref) {
|
|
|
51
52
|
addButtonText = config.addButtonText,
|
|
52
53
|
addButtonIcon = config.addButtonIcon,
|
|
53
54
|
description = config.description;
|
|
55
|
+
var preview = previewPropsFromInnerConfig || formItemPreview;
|
|
54
56
|
var _useBreakpoint = useBreakpoint(),
|
|
55
57
|
md = _useBreakpoint.md;
|
|
56
58
|
var _useContext = useContext(LocaleContext),
|
|
@@ -130,7 +132,7 @@ var AddableSection = function AddableSection(_ref) {
|
|
|
130
132
|
level: !md ? 'body1' : 'h3b',
|
|
131
133
|
wrapElement: "div",
|
|
132
134
|
children: label
|
|
133
|
-
})) : /*#__PURE__*/_jsx("div", {}), groupKeys.length > min && !preview && /*#__PURE__*/_jsx(Button, {
|
|
135
|
+
})) : /*#__PURE__*/_jsx("div", {}), groupKeys.length > min && !preview && !elementProps.disabled && /*#__PURE__*/_jsx(Button, {
|
|
134
136
|
type: "link",
|
|
135
137
|
className: "igloo-addable-section-label-remove",
|
|
136
138
|
onClick: function onClick() {
|
|
@@ -203,7 +205,7 @@ var AddableSection = function AddableSection(_ref) {
|
|
|
203
205
|
whiteSpace: 'pre-wrap'
|
|
204
206
|
},
|
|
205
207
|
children: description
|
|
206
|
-
}), /*#__PURE__*/_jsx(Button, {
|
|
208
|
+
}), !elementProps.disabled && /*#__PURE__*/_jsx(Button, {
|
|
207
209
|
onClick: function onClick() {
|
|
208
210
|
return dispath({
|
|
209
211
|
type: 'add',
|
|
@@ -212,7 +214,6 @@ var AddableSection = function AddableSection(_ref) {
|
|
|
212
214
|
},
|
|
213
215
|
className: "igloo-form-addable-section-button",
|
|
214
216
|
icon: addButtonIcon,
|
|
215
|
-
disabled: elementProps.disabled,
|
|
216
217
|
children: addButtonText || "".concat(formatMessage({
|
|
217
218
|
id: 'Add'
|
|
218
219
|
}), " ").concat(label)
|
|
@@ -242,7 +242,7 @@ var AddableSection = function AddableSection(props) {
|
|
|
242
242
|
level: !md ? 'body1' : 'h3b',
|
|
243
243
|
wrapElement: "div",
|
|
244
244
|
children: label
|
|
245
|
-
})) : /*#__PURE__*/_jsx("div", {}), groupKeys.length > min && !preview && /*#__PURE__*/_jsx(Button, {
|
|
245
|
+
})) : /*#__PURE__*/_jsx("div", {}), groupKeys.length > min && !preview && !elementProps.disabled && /*#__PURE__*/_jsx(Button, {
|
|
246
246
|
type: "link",
|
|
247
247
|
className: "igloo-addable-section-label-remove",
|
|
248
248
|
onClick: function onClick() {
|
|
@@ -287,7 +287,7 @@ var AddableSection = function AddableSection(props) {
|
|
|
287
287
|
whiteSpace: 'pre-wrap'
|
|
288
288
|
},
|
|
289
289
|
children: description
|
|
290
|
-
}), /*#__PURE__*/_jsx(Button, {
|
|
290
|
+
}), !elementProps.disabled && /*#__PURE__*/_jsx(Button, {
|
|
291
291
|
onClick: function onClick() {
|
|
292
292
|
return dispath({
|
|
293
293
|
type: 'add',
|
|
@@ -32,7 +32,7 @@ var DefaultFooter = function DefaultFooter(props) {
|
|
|
32
32
|
className: "footer-bottom",
|
|
33
33
|
children: [/*#__PURE__*/_jsx(Typography, {
|
|
34
34
|
level: "body3",
|
|
35
|
-
children: "\xA9 ".concat(new Date().getFullYear(), " Powered by
|
|
35
|
+
children: "\xA9 ".concat(new Date().getFullYear(), " Powered by Igloo. All Rights Reserved.")
|
|
36
36
|
}), /*#__PURE__*/_jsxs(Typography, {
|
|
37
37
|
level: "body3",
|
|
38
38
|
children: [/*#__PURE__*/_jsx(Button, {
|
|
@@ -73,7 +73,7 @@ var DefaultFooter = function DefaultFooter(props) {
|
|
|
73
73
|
children: [/*#__PURE__*/_jsx("div", {
|
|
74
74
|
children: /*#__PURE__*/_jsxs(Typography, {
|
|
75
75
|
level: "body3",
|
|
76
|
-
children: ["\xA9 ".concat(new Date().getFullYear(), " Powered by
|
|
76
|
+
children: ["\xA9 ".concat(new Date().getFullYear(), " Powered by Igloo. All Rights Reserved."), /*#__PURE__*/_jsx("div", {
|
|
77
77
|
children: "All Rights Reserved."
|
|
78
78
|
})]
|
|
79
79
|
})
|
package/es/upload-photo/index.js
CHANGED
|
@@ -145,7 +145,9 @@ var UploadPhoto = function UploadPhoto(props) {
|
|
|
145
145
|
id = props.id,
|
|
146
146
|
validateField = props.validateField,
|
|
147
147
|
_props$capture = props.capture,
|
|
148
|
-
capture = _props$capture === void 0 ? false : _props$capture
|
|
148
|
+
capture = _props$capture === void 0 ? false : _props$capture,
|
|
149
|
+
disabled = props.disabled;
|
|
150
|
+
console.log(props, 'props');
|
|
149
151
|
var _useContext2 = useContext(LocaleContext),
|
|
150
152
|
formatMessage = _useContext2.formatMessage;
|
|
151
153
|
var _useState = useState(isMobileAgent()),
|
|
@@ -575,7 +577,7 @@ var UploadPhoto = function UploadPhoto(props) {
|
|
|
575
577
|
});
|
|
576
578
|
};
|
|
577
579
|
return /*#__PURE__*/_jsxs("div", {
|
|
578
|
-
className: classnames(prefix, className),
|
|
580
|
+
className: classnames(prefix, className, disabled ? "".concat(prefix, "-disabled") : ''),
|
|
579
581
|
id: id,
|
|
580
582
|
ref: DomRef,
|
|
581
583
|
children: [Boolean(descriptions || samples.length) && /*#__PURE__*/_jsx("div", {
|
|
@@ -614,6 +616,7 @@ var UploadPhoto = function UploadPhoto(props) {
|
|
|
614
616
|
})]
|
|
615
617
|
})
|
|
616
618
|
}), /*#__PURE__*/_jsx("input", {
|
|
619
|
+
disabled: disabled,
|
|
617
620
|
id: uploadId,
|
|
618
621
|
type: "file",
|
|
619
622
|
style: {
|
|
@@ -654,7 +657,7 @@ var UploadPhoto = function UploadPhoto(props) {
|
|
|
654
657
|
type = _ref9.type,
|
|
655
658
|
uid = _ref9.uid;
|
|
656
659
|
return /*#__PURE__*/_jsx(Badge, {
|
|
657
|
-
count: getBadge(status, index, limit),
|
|
660
|
+
count: disabled ? null : getBadge(status, index, limit),
|
|
658
661
|
children: /*#__PURE__*/_jsxs("div", {
|
|
659
662
|
className: classnames((_classnames5 = {}, _defineProperty(_classnames5, "".concat(prefix, "-content-container"), true), _defineProperty(_classnames5, "".concat(prefix, "-content-error"), status === 'failed'), _classnames5)),
|
|
660
663
|
onMouseEnter: function onMouseEnter() {
|
|
@@ -159,6 +159,19 @@
|
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
+
.igloo-upload-photo-disabled {
|
|
163
|
+
color: rgba(0, 0, 0, 0.25);
|
|
164
|
+
cursor: not-allowed;
|
|
165
|
+
|
|
166
|
+
& label {
|
|
167
|
+
cursor: not-allowed !important;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
& .igloo-icon {
|
|
171
|
+
color: rgba(0, 0, 0, 0.25) !important;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
162
175
|
.ant-form-item-has-error .igloo-upload-photo-content-button {
|
|
163
176
|
border-color: @error-color;
|
|
164
177
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { FC } from '../types';
|
|
3
|
+
import './style';
|
|
3
4
|
export interface ConfirmationProps {
|
|
4
5
|
onChange?: Function;
|
|
5
6
|
value?: boolean;
|
|
@@ -9,6 +10,7 @@ export interface ConfirmationProps {
|
|
|
9
10
|
okText?: ReactNode;
|
|
10
11
|
cancelText?: ReactNode;
|
|
11
12
|
href?: string;
|
|
13
|
+
disabled?: boolean;
|
|
12
14
|
}
|
|
13
15
|
declare const Confirmation: FC<ConfirmationProps>;
|
|
14
16
|
export default Confirmation;
|
|
@@ -5,11 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
9
|
var _modal = _interopRequireDefault(require("../modal"));
|
|
9
10
|
var _typography = _interopRequireDefault(require("../typography"));
|
|
10
11
|
var _checkbox = _interopRequireDefault(require("../checkbox"));
|
|
11
12
|
var _button = _interopRequireDefault(require("../button"));
|
|
12
13
|
var _localeContext = _interopRequireDefault(require("../locale/locale-context"));
|
|
14
|
+
require("./style");
|
|
13
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
17
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -26,7 +28,8 @@ var Confirmation = function Confirmation(_ref) {
|
|
|
26
28
|
modalTitle = _ref.modalTitle,
|
|
27
29
|
okText = _ref.okText,
|
|
28
30
|
cancelText = _ref.cancelText,
|
|
29
|
-
href = _ref.href
|
|
31
|
+
href = _ref.href,
|
|
32
|
+
disabled = _ref.disabled;
|
|
30
33
|
var _useState = (0, _react.useState)(false),
|
|
31
34
|
_useState2 = _slicedToArray(_useState, 2),
|
|
32
35
|
visible = _useState2[0],
|
|
@@ -55,10 +58,12 @@ var Confirmation = function Confirmation(_ref) {
|
|
|
55
58
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
56
59
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_checkbox.default, {
|
|
57
60
|
onChange: handleCheckbox,
|
|
58
|
-
checked: value
|
|
61
|
+
checked: value,
|
|
62
|
+
disabled: disabled
|
|
59
63
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.default, {
|
|
60
64
|
level: "body1",
|
|
61
65
|
onClick: function onClick(e) {
|
|
66
|
+
if (disabled) return;
|
|
62
67
|
e.stopPropagation();
|
|
63
68
|
if (modalContent) {
|
|
64
69
|
return setVisible(true);
|
|
@@ -76,6 +81,7 @@ var Confirmation = function Confirmation(_ref) {
|
|
|
76
81
|
cursor: 'pointer',
|
|
77
82
|
marginLeft: 8
|
|
78
83
|
},
|
|
84
|
+
className: (0, _classnames.default)(disabled && 'disabled'),
|
|
79
85
|
children: message || /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
80
86
|
children: [formatMessage({
|
|
81
87
|
id: 'I agree to the Igloo'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './index.less';
|
|
@@ -37,10 +37,11 @@ var useBreakpoint = _antd.Grid.useBreakpoint;
|
|
|
37
37
|
var AddableSection = function AddableSection(_ref) {
|
|
38
38
|
var parentName = _ref.parentName,
|
|
39
39
|
config = _ref.config,
|
|
40
|
-
|
|
40
|
+
previewPropsFromInnerConfig = _ref.preview,
|
|
41
41
|
disabled = _ref.disabled,
|
|
42
42
|
setShowStepButton = _ref.setShowStepButton;
|
|
43
|
-
var
|
|
43
|
+
var formItemPreview = config.preview,
|
|
44
|
+
_config$elements = config.elements,
|
|
44
45
|
elements = _config$elements === void 0 ? [] : _config$elements,
|
|
45
46
|
name = config.name,
|
|
46
47
|
label = config.label,
|
|
@@ -59,6 +60,7 @@ var AddableSection = function AddableSection(_ref) {
|
|
|
59
60
|
addButtonText = config.addButtonText,
|
|
60
61
|
addButtonIcon = config.addButtonIcon,
|
|
61
62
|
description = config.description;
|
|
63
|
+
var preview = previewPropsFromInnerConfig || formItemPreview;
|
|
62
64
|
var _useBreakpoint = useBreakpoint(),
|
|
63
65
|
md = _useBreakpoint.md;
|
|
64
66
|
var _useContext = (0, _react.useContext)(_locale.LocaleContext),
|
|
@@ -138,7 +140,7 @@ var AddableSection = function AddableSection(_ref) {
|
|
|
138
140
|
level: !md ? 'body1' : 'h3b',
|
|
139
141
|
wrapElement: "div",
|
|
140
142
|
children: label
|
|
141
|
-
})) : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {}), groupKeys.length > min && !preview && /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.default, {
|
|
143
|
+
})) : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {}), groupKeys.length > min && !preview && !elementProps.disabled && /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.default, {
|
|
142
144
|
type: "link",
|
|
143
145
|
className: "igloo-addable-section-label-remove",
|
|
144
146
|
onClick: function onClick() {
|
|
@@ -211,7 +213,7 @@ var AddableSection = function AddableSection(_ref) {
|
|
|
211
213
|
whiteSpace: 'pre-wrap'
|
|
212
214
|
},
|
|
213
215
|
children: description
|
|
214
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.default, {
|
|
216
|
+
}), !elementProps.disabled && /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.default, {
|
|
215
217
|
onClick: function onClick() {
|
|
216
218
|
return dispath({
|
|
217
219
|
type: 'add',
|
|
@@ -220,7 +222,6 @@ var AddableSection = function AddableSection(_ref) {
|
|
|
220
222
|
},
|
|
221
223
|
className: "igloo-form-addable-section-button",
|
|
222
224
|
icon: addButtonIcon,
|
|
223
|
-
disabled: elementProps.disabled,
|
|
224
225
|
children: addButtonText || "".concat(formatMessage({
|
|
225
226
|
id: 'Add'
|
|
226
227
|
}), " ").concat(label)
|
|
@@ -249,7 +249,7 @@ var AddableSection = function AddableSection(props) {
|
|
|
249
249
|
level: !md ? 'body1' : 'h3b',
|
|
250
250
|
wrapElement: "div",
|
|
251
251
|
children: label
|
|
252
|
-
})) : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {}), groupKeys.length > min && !preview && /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.default, {
|
|
252
|
+
})) : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {}), groupKeys.length > min && !preview && !elementProps.disabled && /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.default, {
|
|
253
253
|
type: "link",
|
|
254
254
|
className: "igloo-addable-section-label-remove",
|
|
255
255
|
onClick: function onClick() {
|
|
@@ -294,7 +294,7 @@ var AddableSection = function AddableSection(props) {
|
|
|
294
294
|
whiteSpace: 'pre-wrap'
|
|
295
295
|
},
|
|
296
296
|
children: description
|
|
297
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.default, {
|
|
297
|
+
}), !elementProps.disabled && /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.default, {
|
|
298
298
|
onClick: function onClick() {
|
|
299
299
|
return dispath({
|
|
300
300
|
type: 'add',
|
|
@@ -37,7 +37,7 @@ var DefaultFooter = function DefaultFooter(props) {
|
|
|
37
37
|
className: "footer-bottom",
|
|
38
38
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.default, {
|
|
39
39
|
level: "body3",
|
|
40
|
-
children: "\xA9 ".concat(new Date().getFullYear(), " Powered by
|
|
40
|
+
children: "\xA9 ".concat(new Date().getFullYear(), " Powered by Igloo. All Rights Reserved.")
|
|
41
41
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_typography.default, {
|
|
42
42
|
level: "body3",
|
|
43
43
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_button.default, {
|
|
@@ -78,7 +78,7 @@ var DefaultFooter = function DefaultFooter(props) {
|
|
|
78
78
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
79
79
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_typography.default, {
|
|
80
80
|
level: "body3",
|
|
81
|
-
children: ["\xA9 ".concat(new Date().getFullYear(), " Powered by
|
|
81
|
+
children: ["\xA9 ".concat(new Date().getFullYear(), " Powered by Igloo. All Rights Reserved."), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
82
82
|
children: "All Rights Reserved."
|
|
83
83
|
})]
|
|
84
84
|
})
|
|
@@ -149,7 +149,9 @@ var UploadPhoto = function UploadPhoto(props) {
|
|
|
149
149
|
id = props.id,
|
|
150
150
|
validateField = props.validateField,
|
|
151
151
|
_props$capture = props.capture,
|
|
152
|
-
capture = _props$capture === void 0 ? false : _props$capture
|
|
152
|
+
capture = _props$capture === void 0 ? false : _props$capture,
|
|
153
|
+
disabled = props.disabled;
|
|
154
|
+
console.log(props, 'props');
|
|
153
155
|
var _useContext2 = (0, _react.useContext)(_locale.LocaleContext),
|
|
154
156
|
formatMessage = _useContext2.formatMessage;
|
|
155
157
|
var _useState = (0, _react.useState)((0, _agentDetect.isMobileAgent)()),
|
|
@@ -579,7 +581,7 @@ var UploadPhoto = function UploadPhoto(props) {
|
|
|
579
581
|
});
|
|
580
582
|
};
|
|
581
583
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
582
|
-
className: (0, _classnames6.default)(prefix, className),
|
|
584
|
+
className: (0, _classnames6.default)(prefix, className, disabled ? "".concat(prefix, "-disabled") : ''),
|
|
583
585
|
id: id,
|
|
584
586
|
ref: DomRef,
|
|
585
587
|
children: [Boolean(descriptions || samples.length) && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -618,6 +620,7 @@ var UploadPhoto = function UploadPhoto(props) {
|
|
|
618
620
|
})]
|
|
619
621
|
})
|
|
620
622
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
623
|
+
disabled: disabled,
|
|
621
624
|
id: uploadId,
|
|
622
625
|
type: "file",
|
|
623
626
|
style: {
|
|
@@ -658,7 +661,7 @@ var UploadPhoto = function UploadPhoto(props) {
|
|
|
658
661
|
type = _ref9.type,
|
|
659
662
|
uid = _ref9.uid;
|
|
660
663
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Badge, {
|
|
661
|
-
count: getBadge(status, index, limit),
|
|
664
|
+
count: disabled ? null : getBadge(status, index, limit),
|
|
662
665
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
663
666
|
className: (0, _classnames6.default)((_classnames5 = {}, _defineProperty(_classnames5, "".concat(prefix, "-content-container"), true), _defineProperty(_classnames5, "".concat(prefix, "-content-error"), status === 'failed'), _classnames5)),
|
|
664
667
|
onMouseEnter: function onMouseEnter() {
|
|
@@ -159,6 +159,19 @@
|
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
+
.igloo-upload-photo-disabled {
|
|
163
|
+
color: rgba(0, 0, 0, 0.25);
|
|
164
|
+
cursor: not-allowed;
|
|
165
|
+
|
|
166
|
+
& label {
|
|
167
|
+
cursor: not-allowed !important;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
& .igloo-icon {
|
|
171
|
+
color: rgba(0, 0, 0, 0.25) !important;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
162
175
|
.ant-form-item-has-error .igloo-upload-photo-content-button {
|
|
163
176
|
border-color: @error-color;
|
|
164
177
|
}
|