iglooform 2.3.3 → 2.3.7
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/admin-upload/modal.js +1 -1
- package/es/card-detail/card-group.js +2 -1
- package/es/card-detail/card-item.js +7 -0
- package/es/card-detail/card.d.ts +2 -2
- package/es/card-detail/card.js +3 -3
- package/es/card-detail/style/index.less +28 -2
- package/es/card-detail/utils.d.ts +2 -2
- package/es/card-detail/utils.js +24 -11
- package/es/detail-panel/style/index.less +3 -2
- package/es/filter/customize.d.ts +9 -0
- package/es/filter/customize.js +21 -0
- package/es/filter/index.d.ts +6 -4
- package/es/filter/index.js +82 -42
- package/es/filter/style/index.less +1 -1
- package/es/form/context.d.ts +2 -0
- package/es/form/context.js +2 -1
- package/es/form/element/index.js +54 -2
- package/es/form/index.js +63 -13
- package/es/form/page/index.js +31 -2
- package/es/form/pages/index.js +46 -26
- package/es/form/render/index.js +3 -2
- package/es/form/steps/index.js +47 -30
- package/es/free-form/context.d.ts +19 -0
- package/es/free-form/context.js +7 -0
- package/es/free-form/element/index.d.ts +11 -0
- package/es/free-form/element/index.js +262 -0
- package/es/free-form/element/style/index.d.ts +1 -0
- package/es/free-form/element/style/index.js +1 -0
- package/es/free-form/element/style/index.less +116 -0
- package/es/free-form/index.d.ts +7 -0
- package/es/free-form/index.js +203 -0
- package/es/free-form/messages.d.ts +48 -0
- package/es/free-form/messages.js +49 -0
- package/es/free-form/page/index.d.ts +11 -0
- package/es/free-form/page/index.js +144 -0
- package/es/free-form/page/style/index.d.ts +1 -0
- package/es/free-form/page/style/index.js +1 -0
- package/es/free-form/page/style/index.less +55 -0
- package/es/free-form/style/index.d.ts +1 -0
- package/es/free-form/style/index.js +1 -0
- package/es/free-form/style/index.less +40 -0
- package/es/free-form/utils.d.ts +73 -0
- package/es/free-form/utils.js +370 -0
- package/es/global-message/style/index.less +30 -0
- package/es/index.d.ts +3 -0
- package/es/index.js +4 -1
- package/es/input/input-date.js +18 -9
- package/es/input/phone-number.js +9 -9
- package/es/input/style/index.less +17 -14
- package/es/layout/index.js +10 -2
- package/es/layout/style/index.less +2 -0
- package/es/locale/en-US/messages.json +1 -1
- package/es/locale/id-ID/messages.json +1 -1
- package/es/locale/th-TH/messages.json +1 -1
- package/es/locale/vi-VN/messages.json +1 -1
- package/es/locale/zh-CN/messages.json +1 -1
- package/es/media/media.js +0 -1
- package/es/media/preview.js +0 -1
- package/es/select/attached-select.js +2 -2
- package/es/table/index.js +33 -9
- package/es/typography/index.js +2 -2
- package/es/typography/style/index.less +4 -1
- package/es/upload/index.d.ts +3 -3
- package/es/upload/index.js +2 -2
- package/es/upload-photo/index.d.ts +2 -2
- package/es/upload-photo/index.js +2 -2
- package/es/upload-photo/media.js +0 -1
- package/es/upload-preview/media.js +0 -1
- package/lib/admin-upload/modal.js +1 -1
- package/lib/card-detail/card-group.js +2 -1
- package/lib/card-detail/card-item.js +7 -0
- package/lib/card-detail/card.d.ts +2 -2
- package/lib/card-detail/card.js +3 -3
- package/lib/card-detail/style/index.less +28 -2
- package/lib/card-detail/utils.d.ts +2 -2
- package/lib/card-detail/utils.js +25 -12
- package/lib/detail-panel/style/index.less +3 -2
- package/lib/filter/customize.d.ts +9 -0
- package/lib/filter/customize.js +33 -0
- package/lib/filter/index.d.ts +6 -4
- package/lib/filter/index.js +83 -42
- package/lib/filter/style/index.less +1 -1
- package/lib/form/context.d.ts +2 -0
- package/lib/form/context.js +2 -1
- package/lib/form/element/index.js +53 -1
- package/lib/form/index.js +62 -12
- package/lib/form/page/index.js +29 -1
- package/lib/form/pages/index.js +45 -25
- package/lib/form/render/index.js +2 -1
- package/lib/form/steps/index.js +46 -29
- package/lib/free-form/context.d.ts +19 -0
- package/lib/free-form/context.js +19 -0
- package/lib/free-form/element/index.d.ts +11 -0
- package/lib/free-form/element/index.js +288 -0
- package/lib/free-form/element/style/index.d.ts +1 -0
- package/lib/free-form/element/style/index.js +3 -0
- package/lib/free-form/element/style/index.less +116 -0
- package/lib/free-form/index.d.ts +7 -0
- package/lib/free-form/index.js +220 -0
- package/lib/free-form/messages.d.ts +48 -0
- package/lib/free-form/messages.js +56 -0
- package/lib/free-form/page/index.d.ts +11 -0
- package/lib/free-form/page/index.js +164 -0
- package/lib/free-form/page/style/index.d.ts +1 -0
- package/lib/free-form/page/style/index.js +3 -0
- package/lib/free-form/page/style/index.less +55 -0
- package/lib/free-form/style/index.d.ts +1 -0
- package/lib/free-form/style/index.js +3 -0
- package/lib/free-form/style/index.less +40 -0
- package/lib/free-form/utils.d.ts +73 -0
- package/lib/free-form/utils.js +403 -0
- package/lib/global-message/style/index.less +30 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +28 -1
- package/lib/input/input-date.js +18 -9
- package/lib/input/phone-number.js +9 -9
- package/lib/input/style/index.less +17 -14
- package/lib/layout/index.js +10 -2
- package/lib/layout/style/index.less +2 -0
- package/lib/locale/en-US/messages.json +1 -1
- package/lib/locale/id-ID/messages.json +1 -1
- package/lib/locale/th-TH/messages.json +1 -1
- package/lib/locale/vi-VN/messages.json +1 -1
- package/lib/locale/zh-CN/messages.json +1 -1
- package/lib/media/media.js +0 -1
- package/lib/media/preview.js +0 -1
- package/lib/select/attached-select.js +2 -2
- package/lib/table/index.js +32 -8
- package/lib/typography/index.js +2 -2
- package/lib/typography/style/index.less +4 -1
- package/lib/upload/index.d.ts +3 -3
- package/lib/upload/index.js +2 -2
- package/lib/upload-photo/index.d.ts +2 -2
- package/lib/upload-photo/index.js +2 -2
- package/lib/upload-photo/media.js +0 -1
- package/lib/upload-preview/media.js +0 -1
- package/package.json +1 -1
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
.iglooform-global-message {
|
|
2
|
+
min-width: 324px;
|
|
3
|
+
|
|
2
4
|
.ant-message-notice-content {
|
|
3
5
|
padding: 0px;
|
|
6
|
+
|
|
7
|
+
.ant-alert-message {
|
|
8
|
+
text-align: left;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@media screen and (max-width: 768px) {
|
|
14
|
+
.iglooform-global-message .igloo-alert-message {
|
|
15
|
+
max-width: 100%;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@media screen and (min-width: 768px) and (max-width: 992px) {
|
|
20
|
+
.iglooform-global-message .igloo-alert-message {
|
|
21
|
+
max-width: 720px;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@media screen and (min-width: 992px) and (max-width: 1200px) {
|
|
26
|
+
.iglooform-global-message .igloo-alert-message {
|
|
27
|
+
max-width: 960px;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@media screen and (min-width: 1200px) {
|
|
32
|
+
.iglooform-global-message .igloo-alert-message {
|
|
33
|
+
max-width: 1140px;
|
|
4
34
|
}
|
|
5
35
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -35,3 +35,6 @@ export { default as MobileInsurerDetail } from './mobile-insurer-detail';
|
|
|
35
35
|
export { default as Layout } from './layout';
|
|
36
36
|
export { default as DetailPanel } from './detail-panel';
|
|
37
37
|
export { default as message } from './global-message';
|
|
38
|
+
export { default as FreeForm } from './free-form';
|
|
39
|
+
export { default as FormItem } from './free-form/element';
|
|
40
|
+
export { default as FormPage } from './free-form/page';
|
package/lib/index.js
CHANGED
|
@@ -63,7 +63,10 @@ var _exportNames = {
|
|
|
63
63
|
MobileInsurerDetail: true,
|
|
64
64
|
Layout: true,
|
|
65
65
|
DetailPanel: true,
|
|
66
|
-
message: true
|
|
66
|
+
message: true,
|
|
67
|
+
FreeForm: true,
|
|
68
|
+
FormItem: true,
|
|
69
|
+
FormPage: true
|
|
67
70
|
};
|
|
68
71
|
Object.defineProperty(exports, "Form", {
|
|
69
72
|
enumerable: true,
|
|
@@ -413,6 +416,24 @@ Object.defineProperty(exports, "message", {
|
|
|
413
416
|
return _globalMessage.default;
|
|
414
417
|
}
|
|
415
418
|
});
|
|
419
|
+
Object.defineProperty(exports, "FreeForm", {
|
|
420
|
+
enumerable: true,
|
|
421
|
+
get: function get() {
|
|
422
|
+
return _freeForm.default;
|
|
423
|
+
}
|
|
424
|
+
});
|
|
425
|
+
Object.defineProperty(exports, "FormItem", {
|
|
426
|
+
enumerable: true,
|
|
427
|
+
get: function get() {
|
|
428
|
+
return _element.default;
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
Object.defineProperty(exports, "FormPage", {
|
|
432
|
+
enumerable: true,
|
|
433
|
+
get: function get() {
|
|
434
|
+
return _page.default;
|
|
435
|
+
}
|
|
436
|
+
});
|
|
416
437
|
|
|
417
438
|
var _form = _interopRequireDefault(require("./form"));
|
|
418
439
|
|
|
@@ -500,6 +521,12 @@ var _detailPanel = _interopRequireDefault(require("./detail-panel"));
|
|
|
500
521
|
|
|
501
522
|
var _globalMessage = _interopRequireDefault(require("./global-message"));
|
|
502
523
|
|
|
524
|
+
var _freeForm = _interopRequireDefault(require("./free-form"));
|
|
525
|
+
|
|
526
|
+
var _element = _interopRequireDefault(require("./free-form/element"));
|
|
527
|
+
|
|
528
|
+
var _page = _interopRequireDefault(require("./free-form/page"));
|
|
529
|
+
|
|
503
530
|
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); }
|
|
504
531
|
|
|
505
532
|
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; }
|
package/lib/input/input-date.js
CHANGED
|
@@ -111,6 +111,11 @@ var IglooInputDate = function IglooInputDate(props) {
|
|
|
111
111
|
inputValue = _useState4[0],
|
|
112
112
|
setInput = _useState4[1];
|
|
113
113
|
|
|
114
|
+
var _useState5 = (0, _react.useState)(false),
|
|
115
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
116
|
+
everInputAll = _useState6[0],
|
|
117
|
+
setEverInputAll = _useState6[1];
|
|
118
|
+
|
|
114
119
|
var formatDeleteSpace = format.replace(/\s+/g, '');
|
|
115
120
|
|
|
116
121
|
var _dealFormat = dealFormat(formatDeleteSpace),
|
|
@@ -124,7 +129,7 @@ var IglooInputDate = function IglooInputDate(props) {
|
|
|
124
129
|
(0, _react.useEffect)(function () {
|
|
125
130
|
var _dealFormat3 = dealFormat(formatDeleteSpace),
|
|
126
131
|
_dealFormat4 = _slicedToArray(_dealFormat3, 2),
|
|
127
|
-
|
|
132
|
+
_ = _dealFormat4[0],
|
|
128
133
|
delimiter = _dealFormat4[1];
|
|
129
134
|
|
|
130
135
|
if (!value) return;
|
|
@@ -135,16 +140,19 @@ var IglooInputDate = function IglooInputDate(props) {
|
|
|
135
140
|
(0, _react.useEffect)(function () {
|
|
136
141
|
var currentInput = inputValueRef.current.join(delimiter); // 不管值如何 统一交给rule校验
|
|
137
142
|
|
|
138
|
-
|
|
139
|
-
|
|
143
|
+
var allGet = currentInput.length === formatDeleteSpace.length;
|
|
144
|
+
if (!everInputAll && allGet) setEverInputAll(true);
|
|
145
|
+
|
|
146
|
+
if (everInputAll || allGet) {
|
|
147
|
+
onChangeProps && onChangeProps(allGet ? (0, _moment.default)(currentInput, formatDeleteSpace).format(format) : undefined);
|
|
140
148
|
}
|
|
141
149
|
}, [inputValue]);
|
|
142
150
|
|
|
143
|
-
function hanldeOnChange(str,
|
|
151
|
+
function hanldeOnChange(str, refArr, index, inputFormat) {
|
|
144
152
|
var valueInput = str.replace(/[^0-9]/gi, '');
|
|
145
153
|
|
|
146
|
-
if (valueInput.length ===
|
|
147
|
-
var formatType =
|
|
154
|
+
if (valueInput.length === inputFormat.length) {
|
|
155
|
+
var formatType = inputFormat[0];
|
|
148
156
|
var timeLimit = sampleLimit[formatType]; // 关于 单个input的限制还是要有的
|
|
149
157
|
|
|
150
158
|
if (timeLimit) {
|
|
@@ -166,10 +174,11 @@ var IglooInputDate = function IglooInputDate(props) {
|
|
|
166
174
|
if (thirdInput.current) thirdInput.current.focus();
|
|
167
175
|
break;
|
|
168
176
|
}
|
|
169
|
-
}
|
|
177
|
+
} // 替换了ref 中 current
|
|
178
|
+
|
|
170
179
|
|
|
171
|
-
|
|
172
|
-
setInput(_toConsumableArray(
|
|
180
|
+
refArr.splice(index, 1, valueInput.slice(0, inputFormat.length));
|
|
181
|
+
setInput(_toConsumableArray(refArr));
|
|
173
182
|
}
|
|
174
183
|
|
|
175
184
|
return (0, _jsxRuntime.jsx)("div", Object.assign({
|
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
require("antd/es/input
|
|
8
|
+
require("antd/es/input/style");
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _input = _interopRequireDefault(require("antd/es/input"));
|
|
11
11
|
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
|
|
@@ -94,17 +94,17 @@ var PhoneNumber = function PhoneNumber(_ref) {
|
|
|
94
94
|
'igloo-input-phone-disabled': disabled
|
|
95
95
|
}, className)
|
|
96
96
|
}, {
|
|
97
|
-
children: [leftPart, (0, _jsxRuntime.jsx)(
|
|
97
|
+
children: [leftPart, (0, _jsxRuntime.jsx)(_input.default, {
|
|
98
|
+
type: "tel",
|
|
98
99
|
defaultValue: number,
|
|
99
100
|
onChange: function onChange(e) {
|
|
100
|
-
setNumber(e);
|
|
101
|
-
formChangeProps({
|
|
101
|
+
setNumber(e.target.value);
|
|
102
|
+
formChangeProps(e.target.value ? {
|
|
102
103
|
areaCode: selectedCode,
|
|
103
|
-
phoneNumber: e
|
|
104
|
-
});
|
|
104
|
+
phoneNumber: e.target.value
|
|
105
|
+
} : undefined);
|
|
105
106
|
},
|
|
106
|
-
disabled: disabled
|
|
107
|
-
type: "number"
|
|
107
|
+
disabled: disabled
|
|
108
108
|
}, void 0)]
|
|
109
109
|
}), void 0);
|
|
110
110
|
};
|
|
@@ -108,7 +108,7 @@ input[type='number'] {
|
|
|
108
108
|
justify-content: center;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
.ant-input
|
|
111
|
+
.ant-input {
|
|
112
112
|
border-radius: 0px 3px 3px 0px;
|
|
113
113
|
flex: 1 auto;
|
|
114
114
|
border-top: 0px;
|
|
@@ -117,8 +117,8 @@ input[type='number'] {
|
|
|
117
117
|
border-color: #bdbdbd;
|
|
118
118
|
height: 48px;
|
|
119
119
|
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
&:focus {
|
|
121
|
+
border-color: #bdbdbd;
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
|
|
@@ -237,22 +237,25 @@ input[type='number'] {
|
|
|
237
237
|
|
|
238
238
|
.igloo-phone-number-select,
|
|
239
239
|
.igloo-phone-number-addon-before {
|
|
240
|
-
border
|
|
241
|
-
border-
|
|
242
|
-
border-bottom: 1px solid #bdbdbd;
|
|
243
|
-
border-radius: 3px 0px 0px 3px;
|
|
240
|
+
border: 1px solid #bdbdbd;
|
|
241
|
+
border-right: 0px;
|
|
244
242
|
}
|
|
245
243
|
|
|
246
|
-
.
|
|
247
|
-
border-
|
|
244
|
+
.igloo-phone-number-select {
|
|
245
|
+
border-radius: 3px 0px 0px 3px;
|
|
246
|
+
}
|
|
248
247
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
248
|
+
.igloo-phone-number-select {
|
|
249
|
+
.ant-select {
|
|
250
|
+
.ant-select-selector {
|
|
251
|
+
border-color: #bdbdbd;
|
|
252
|
+
}
|
|
254
253
|
}
|
|
255
254
|
}
|
|
255
|
+
|
|
256
|
+
.ant-input {
|
|
257
|
+
border: 1px solid @error-color;
|
|
258
|
+
}
|
|
256
259
|
}
|
|
257
260
|
|
|
258
261
|
.igloo-otp {
|
package/lib/layout/index.js
CHANGED
|
@@ -387,10 +387,18 @@ var Layout = function Layout(props) {
|
|
|
387
387
|
className: "footer-bottom"
|
|
388
388
|
}, {
|
|
389
389
|
children: [(0, _jsxRuntime.jsx)("div", {
|
|
390
|
-
children: copyRightRender ? copyRightRender(
|
|
390
|
+
children: copyRightRender ? copyRightRender((0, _jsxRuntime.jsxs)("div", {
|
|
391
|
+
children: [(0, _jsxRuntime.jsxs)("div", {
|
|
392
|
+
children: ["\xA9 $", new Date().getFullYear(), " Powered by Axinan Pte Ltd."]
|
|
393
|
+
}, void 0), (0, _jsxRuntime.jsx)("div", {
|
|
394
|
+
children: "All Rights Reserved."
|
|
395
|
+
}, void 0)]
|
|
396
|
+
}, void 0)) : (0, _jsxRuntime.jsxs)(_typography.default, Object.assign({
|
|
391
397
|
level: "body3"
|
|
392
398
|
}, {
|
|
393
|
-
children: "\xA9 ".concat(new Date().getFullYear(), " Powered by Axinan Pte Ltd.
|
|
399
|
+
children: ["\xA9 ".concat(new Date().getFullYear(), " Powered by Axinan Pte Ltd."), (0, _jsxRuntime.jsx)("div", {
|
|
400
|
+
children: "All Rights Reserved."
|
|
401
|
+
}, void 0)]
|
|
394
402
|
}), void 0)
|
|
395
403
|
}, void 0), (0, _jsxRuntime.jsx)("div", {
|
|
396
404
|
children: (0, _jsxRuntime.jsxs)(_typography.default, Object.assign({
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
align-items: center;
|
|
7
7
|
justify-content: space-between;
|
|
8
8
|
height: 100vh;
|
|
9
|
+
overflow: auto;
|
|
9
10
|
|
|
10
11
|
.igloo-layout-header {
|
|
11
12
|
min-height: 56px;
|
|
@@ -207,6 +208,7 @@
|
|
|
207
208
|
align-items: center;
|
|
208
209
|
justify-content: space-between;
|
|
209
210
|
height: 100vh;
|
|
211
|
+
overflow: auto;
|
|
210
212
|
|
|
211
213
|
& > div {
|
|
212
214
|
width: 100%;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"1 file imported.": "1 file imported.",
|
|
4
4
|
"1 file in progress...": "1 file in progress...",
|
|
5
5
|
"Accept": "Accept",
|
|
6
|
+
"Action": "Action",
|
|
6
7
|
"Apply": "Apply",
|
|
7
8
|
"Apply Columns": "Apply Columns",
|
|
8
9
|
"Cancel": "Cancel",
|
|
@@ -56,7 +57,6 @@
|
|
|
56
57
|
"Submit": "Submit",
|
|
57
58
|
"The file type is not supported.": "The file type is not supported.",
|
|
58
59
|
"This Month": "This Month",
|
|
59
|
-
"Top": "Top",
|
|
60
60
|
"Unselect All": "Unselect All",
|
|
61
61
|
"Uploading": "Uploading",
|
|
62
62
|
"We support CSV or XLSX files (less than 20M each).": "We support CSV or XLSX files (less than 20M each).",
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"1 file imported.": "1 data terunggah",
|
|
4
4
|
"1 file in progress...": "1 data dalam proses",
|
|
5
5
|
"Accept": "Menerima",
|
|
6
|
+
"Action": "Beroperasi",
|
|
6
7
|
"Apply": "Terapkan",
|
|
7
8
|
"Apply Columns": "Terapkan Kolom",
|
|
8
9
|
"Cancel": "Batal",
|
|
@@ -56,7 +57,6 @@
|
|
|
56
57
|
"Submit": "Ajukan",
|
|
57
58
|
"The file type is not supported.": "Jenis file tidak didukung.",
|
|
58
59
|
"This Month": "Bulan ini",
|
|
59
|
-
"Top": "Puncak",
|
|
60
60
|
"Unselect All": "Batalkan semua",
|
|
61
61
|
"Uploading": "Mengunggah",
|
|
62
62
|
"We support CSV or XLSX files (less than 20M each).": "Kami mendukung file CSV atau XLSX (Ukuran maksimal 20 MB) .",
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"1 file imported.": "นำเข้า 1 ไฟล์",
|
|
4
4
|
"1 file in progress...": "กำลังดำเนินการ 1 ไฟล์...",
|
|
5
5
|
"Accept": "ยอมรับ",
|
|
6
|
+
"Action": "ดำเนินงาน",
|
|
6
7
|
"Apply": "ใช้",
|
|
7
8
|
"Apply Columns": "ใช้คอลัมน์",
|
|
8
9
|
"Cancel": "ยกเลิก",
|
|
@@ -56,7 +57,6 @@
|
|
|
56
57
|
"Submit": "ส่ง/ยืนยัน",
|
|
57
58
|
"The file type is not supported.": "ประเภทไฟล์ไม่รองรับ",
|
|
58
59
|
"This Month": "เดือนนี้",
|
|
59
|
-
"Top": "ข้างบน",
|
|
60
60
|
"Unselect All": "ไม่เลือกทั้งหมด",
|
|
61
61
|
"Uploading": "กำลังอัพโหลด",
|
|
62
62
|
"We support CSV or XLSX files (less than 20M each).": "เรารองรับ CSV หรือ XLSX ไฟล์ (แต่ละไฟล์ขนาดไฟล์ต้องไม่เกิน 20M)",
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"1 file imported.": "1 tệp được nhập",
|
|
4
4
|
"1 file in progress...": "1 tệp đang được xử lý",
|
|
5
5
|
"Accept": "Chấp nhận",
|
|
6
|
+
"Action": "Chạy",
|
|
6
7
|
"Apply": "Áp dụng",
|
|
7
8
|
"Apply Columns": "Áp dụng Cột",
|
|
8
9
|
"Cancel": "Hủy",
|
|
@@ -56,7 +57,6 @@
|
|
|
56
57
|
"Submit": "Gửi",
|
|
57
58
|
"The file type is not supported.": "Loại tệp không được hỗ trợ.",
|
|
58
59
|
"This Month": "Tháng này",
|
|
59
|
-
"Top": "Hàng đầu",
|
|
60
60
|
"Unselect All": "Hủy chọn tất cả",
|
|
61
61
|
"Uploading": "Đang tải lên",
|
|
62
62
|
"We support CSV or XLSX files (less than 20M each).": "Hỗ trợ .CSV hoặc .XLSX (file nhỏ hơn 20MB)",
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"1 file imported.": "1个文件已导入。",
|
|
4
4
|
"1 file in progress...": "1个文件正在处理...",
|
|
5
5
|
"Accept": "接受",
|
|
6
|
+
"Action": "操作",
|
|
6
7
|
"Apply": "应用",
|
|
7
8
|
"Apply Columns": "应用",
|
|
8
9
|
"Cancel": "取消",
|
|
@@ -56,7 +57,6 @@
|
|
|
56
57
|
"Submit": "提交",
|
|
57
58
|
"The file type is not supported.": "不支持上传该类型的文件。",
|
|
58
59
|
"This Month": "当月",
|
|
59
|
-
"Top": "上",
|
|
60
60
|
"Unselect All": "反选",
|
|
61
61
|
"Uploading": "上传中",
|
|
62
62
|
"We support CSV or XLSX files (less than 20M each).": "支持上传20M以内的CSV和XLSX文件",
|
package/lib/media/media.js
CHANGED
package/lib/media/preview.js
CHANGED
|
@@ -154,8 +154,8 @@ var IglooSelect = function IglooSelect(_ref) {
|
|
|
154
154
|
}, [options]);
|
|
155
155
|
(0, _react.useEffect)(function () {
|
|
156
156
|
var setFieldValue = rest.setFieldValue;
|
|
157
|
-
var foundValue =
|
|
158
|
-
return option.value === valueProp;
|
|
157
|
+
var foundValue = originOptions.find(function (option) {
|
|
158
|
+
return Array.isArray(valueProp) ? valueProp.includes(option.value) : option.value === valueProp;
|
|
159
159
|
});
|
|
160
160
|
|
|
161
161
|
if (!foundValue) {
|
package/lib/table/index.js
CHANGED
|
@@ -99,14 +99,14 @@ var headerStyle = function headerStyle() {
|
|
|
99
99
|
|
|
100
100
|
var filterDefaultShow = function filterDefaultShow(col) {
|
|
101
101
|
return col.filter(function (item) {
|
|
102
|
-
return
|
|
102
|
+
return item.defaultShow !== false && item.customize !== false;
|
|
103
103
|
}).map(function (item) {
|
|
104
104
|
return item.key;
|
|
105
105
|
});
|
|
106
106
|
}; // buttons:all actionButtons, rowData:current row record data, actionButtonsFilter: filter function
|
|
107
107
|
|
|
108
108
|
|
|
109
|
-
var getDropDownMenu = function getDropDownMenu(allButtons, rowData, actionButtonsFilter) {
|
|
109
|
+
var getDropDownMenu = function getDropDownMenu(allButtons, rowData, actionButtonsFilter, setActionListVisible, actionIndex) {
|
|
110
110
|
var actionButtons = actionButtonsFilter && typeof actionButtonsFilter === 'function' ? actionButtonsFilter(rowData, allButtons) : allButtons;
|
|
111
111
|
return (0, _jsxRuntime.jsx)(_space.default, Object.assign({
|
|
112
112
|
size: 16,
|
|
@@ -119,7 +119,11 @@ var getDropDownMenu = function getDropDownMenu(allButtons, rowData, actionButton
|
|
|
119
119
|
return (0, _jsxRuntime.jsx)(_button.default, Object.assign({
|
|
120
120
|
type: "text",
|
|
121
121
|
onClick: function onClick(e) {
|
|
122
|
-
|
|
122
|
+
item.onClick(rowData);
|
|
123
|
+
setActionListVisible({
|
|
124
|
+
type: actionIndex,
|
|
125
|
+
value: false
|
|
126
|
+
});
|
|
123
127
|
}
|
|
124
128
|
}, {
|
|
125
129
|
children: (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
|
|
@@ -200,6 +204,12 @@ function paginationItem(page, type, originalElement) {
|
|
|
200
204
|
}), void 0);
|
|
201
205
|
}
|
|
202
206
|
|
|
207
|
+
function actionListChange(state, action) {
|
|
208
|
+
var type = action.type,
|
|
209
|
+
value = action.value;
|
|
210
|
+
return _objectSpread(_objectSpread({}, state), {}, _defineProperty({}, type, value));
|
|
211
|
+
}
|
|
212
|
+
|
|
203
213
|
var IglooTable = function IglooTable(_ref) {
|
|
204
214
|
var total = _ref.total,
|
|
205
215
|
_ref$page = _ref.page,
|
|
@@ -264,6 +274,11 @@ var IglooTable = function IglooTable(_ref) {
|
|
|
264
274
|
modalSelectedCol = _useState8[0],
|
|
265
275
|
setModalSelectedCol = _useState8[1];
|
|
266
276
|
|
|
277
|
+
var _useReducer = (0, _react.useReducer)(actionListChange, {}),
|
|
278
|
+
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
279
|
+
actionListVisible = _useReducer2[0],
|
|
280
|
+
setActionListVisible = _useReducer2[1];
|
|
281
|
+
|
|
267
282
|
(0, _react.useEffect)(function () {
|
|
268
283
|
if (colMax !== null && noCustomize !== true) {
|
|
269
284
|
(0, _invariant.default)(colMax >= selectedColKeys.length, 'colmax has less than default select');
|
|
@@ -288,7 +303,7 @@ var IglooTable = function IglooTable(_ref) {
|
|
|
288
303
|
return (0, _jsxRuntime.jsx)("div", {
|
|
289
304
|
children: (0, _jsxRuntime.jsx)(_checkbox.default, Object.assign({
|
|
290
305
|
value: item.key,
|
|
291
|
-
disabled: colDisable && colMax ? defaultOptions.length
|
|
306
|
+
disabled: colDisable && colMax ? defaultOptions.length >= colMax && !defaultOptions.includes(item.key) : false
|
|
292
307
|
}, {
|
|
293
308
|
children: (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
|
|
294
309
|
level: "body1"
|
|
@@ -303,14 +318,23 @@ var IglooTable = function IglooTable(_ref) {
|
|
|
303
318
|
|
|
304
319
|
var actionCol = {
|
|
305
320
|
width: 50 + 32,
|
|
306
|
-
title:
|
|
321
|
+
title: formatMessage({
|
|
322
|
+
id: 'Action'
|
|
323
|
+
}),
|
|
307
324
|
dataIndex: 'action',
|
|
308
325
|
key: 'action',
|
|
309
326
|
align: 'center',
|
|
310
|
-
render: function render(text, record) {
|
|
327
|
+
render: function render(text, record, index) {
|
|
311
328
|
return (0, _jsxRuntime.jsx)(_popover.default, Object.assign({
|
|
329
|
+
visible: actionListVisible[index] || false,
|
|
330
|
+
onVisibleChange: function onVisibleChange(visible) {
|
|
331
|
+
setActionListVisible({
|
|
332
|
+
type: index,
|
|
333
|
+
value: visible
|
|
334
|
+
});
|
|
335
|
+
},
|
|
312
336
|
placement: "bottomRight",
|
|
313
|
-
content: getDropDownMenu(actionButtons, record, actionButtonsFilter),
|
|
337
|
+
content: getDropDownMenu(actionButtons, record, actionButtonsFilter, setActionListVisible, index),
|
|
314
338
|
getPopupContainer: function getPopupContainer() {
|
|
315
339
|
return tableRef.current;
|
|
316
340
|
},
|
|
@@ -534,7 +558,7 @@ var IglooTable = function IglooTable(_ref) {
|
|
|
534
558
|
}), void 0), (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
|
|
535
559
|
level: "body1"
|
|
536
560
|
}, {
|
|
537
|
-
children: modalContent(columns,
|
|
561
|
+
children: modalContent(columns, modalSelectedCol, function (item) {
|
|
538
562
|
setModalSelectedCol(item);
|
|
539
563
|
}, colMax, colDisable)
|
|
540
564
|
}), void 0)]
|