iglooform 2.4.8 → 2.4.9
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/float.js +25 -35
- package/es/admin-upload/index.js +18 -25
- package/es/admin-upload/job-list.js +83 -113
- package/es/admin-upload/modal.js +19 -26
- package/es/alert-message/index.js +11 -9
- package/es/amount/index.js +10 -5
- package/es/back-top/index.js +14 -10
- package/es/button/index.js +21 -26
- package/es/card-detail/card-group.js +16 -22
- package/es/card-detail/card-item.js +15 -20
- package/es/card-detail/card-page.js +11 -15
- package/es/card-detail/card.js +24 -24
- package/es/card-detail/utils.js +3 -4
- package/es/checkbox/index.js +23 -22
- package/es/claim-list/index.js +51 -68
- package/es/confirmation/index.js +5 -7
- package/es/date-picker/buddhist.js +1 -1
- package/es/date-picker/index.js +10 -4
- package/es/declaration/index.js +16 -13
- package/es/detail-panel/index.js +67 -83
- package/es/documents/index.js +6 -8
- package/es/example/index.js +3 -4
- package/es/filter/checkBox.js +33 -45
- package/es/filter/customize.js +3 -4
- package/es/filter/index.js +79 -107
- package/es/filter/radioBox.js +23 -31
- package/es/filter/rangePicker.js +43 -59
- package/es/form/divider/index.js +7 -1
- package/es/form/element/index.js +28 -36
- package/es/form/element/style/index.less +4 -0
- package/es/form/index.js +9 -12
- package/es/form/login/index.js +14 -19
- package/es/form/page/index.js +17 -23
- package/es/form/pages/index.js +22 -30
- package/es/form/section/index.js +11 -14
- package/es/form/step/index.js +30 -41
- package/es/form/steps/index.js +6 -8
- package/es/free-form/element/index.js +21 -27
- package/es/free-form/element/style/index.less +4 -0
- package/es/free-form/index.js +9 -12
- package/es/free-form/page/index.js +28 -39
- package/es/free-form/pages/index.js +6 -8
- package/es/free-form/section/index.js +11 -14
- package/es/free-form/step/index.js +30 -41
- package/es/free-form/steps/index.js +6 -8
- package/es/home-menu/index.js +52 -71
- package/es/input/amount.js +10 -5
- package/es/input/credit-card.js +7 -1
- package/es/input/email.js +8 -1
- package/es/input/expiry-date.js +12 -16
- package/es/input/input-date.js +12 -16
- package/es/input/input-number.js +9 -2
- package/es/input/input.js +9 -2
- package/es/input/otp.js +17 -15
- package/es/input/password.js +12 -6
- package/es/input/phone-number.js +6 -8
- package/es/input/text-area.js +14 -10
- package/es/layout/defaultFooter.js +60 -82
- package/es/layout/defaultHeader.js +11 -15
- package/es/layout/footer.js +108 -148
- package/es/layout/header.js +50 -59
- package/es/layout/index.js +16 -12
- package/es/locale/locale-provider.js +6 -8
- package/es/login-page/index.js +30 -42
- package/es/media/index.js +20 -27
- package/es/media/media.js +9 -12
- package/es/media/preview.js +6 -8
- package/es/mobile-insurer-detail/index.js +74 -91
- package/es/mobile-insurer-list/index.js +34 -38
- package/es/modal/index.js +20 -25
- package/es/platform/platform-card/index.js +9 -12
- package/es/platform/switch-platform/index.js +24 -32
- package/es/policy-list/index.js +9 -12
- package/es/policy-list/policy-card.js +119 -153
- package/es/radio/index.js +33 -35
- package/es/select/attached-select.js +31 -34
- package/es/select/select.js +12 -8
- package/es/select/time-select.js +12 -16
- package/es/status-box/index.js +6 -8
- package/es/table/index.js +69 -93
- package/es/tabs/index.js +7 -1
- package/es/typography/index.js +6 -8
- package/es/upload/index.js +48 -66
- package/es/upload-photo/index.js +47 -63
- package/es/upload-photo/media.js +3 -4
- package/es/upload-preview/index.js +9 -12
- package/es/upload-preview/media.js +12 -16
- package/es/utils/form-utils.js +18 -25
- package/lib/admin-upload/float.js +25 -35
- package/lib/admin-upload/index.js +18 -25
- package/lib/admin-upload/job-list.js +83 -113
- package/lib/admin-upload/modal.js +19 -26
- package/lib/alert-message/index.js +11 -9
- package/lib/amount/index.js +10 -5
- package/lib/back-top/index.js +14 -10
- package/lib/button/index.js +22 -27
- package/lib/card-detail/card-group.js +16 -22
- package/lib/card-detail/card-item.js +15 -20
- package/lib/card-detail/card-page.js +11 -15
- package/lib/card-detail/card.js +24 -24
- package/lib/card-detail/index.js +6 -6
- package/lib/card-detail/utils.js +4 -5
- package/lib/checkbox/index.js +24 -23
- package/lib/claim-list/index.js +51 -68
- package/lib/confirmation/index.js +5 -7
- package/lib/date-picker/buddhist.js +1 -1
- package/lib/date-picker/index.js +11 -5
- package/lib/declaration/index.js +16 -13
- package/lib/detail-panel/index.js +67 -83
- package/lib/documents/index.js +6 -8
- package/lib/example/index.js +3 -4
- package/lib/filter/checkBox.js +33 -45
- package/lib/filter/customize.js +3 -4
- package/lib/filter/index.js +79 -107
- package/lib/filter/radioBox.js +23 -31
- package/lib/filter/rangePicker.js +43 -59
- package/lib/form/divider/index.js +7 -1
- package/lib/form/element/index.js +28 -36
- package/lib/form/element/style/index.less +4 -0
- package/lib/form/index.js +9 -12
- package/lib/form/login/index.js +14 -19
- package/lib/form/page/index.js +17 -23
- package/lib/form/pages/index.js +22 -30
- package/lib/form/section/index.js +11 -14
- package/lib/form/step/index.js +30 -41
- package/lib/form/steps/index.js +6 -8
- package/lib/free-form/element/index.js +21 -27
- package/lib/free-form/element/style/index.less +4 -0
- package/lib/free-form/index.js +9 -12
- package/lib/free-form/page/index.js +28 -39
- package/lib/free-form/pages/index.js +6 -8
- package/lib/free-form/section/index.js +11 -14
- package/lib/free-form/step/index.js +30 -41
- package/lib/free-form/steps/index.js +6 -8
- package/lib/home-menu/index.js +52 -71
- package/lib/index.js +132 -132
- package/lib/input/amount.js +10 -5
- package/lib/input/credit-card.js +7 -1
- package/lib/input/email.js +7 -1
- package/lib/input/expiry-date.js +12 -16
- package/lib/input/index.js +18 -18
- package/lib/input/input-date.js +12 -16
- package/lib/input/input-number.js +8 -2
- package/lib/input/input.js +8 -2
- package/lib/input/otp.js +17 -15
- package/lib/input/password.js +11 -6
- package/lib/input/phone-number.js +6 -8
- package/lib/input/text-area.js +14 -10
- package/lib/layout/defaultFooter.js +60 -82
- package/lib/layout/defaultHeader.js +11 -15
- package/lib/layout/footer.js +108 -148
- package/lib/layout/header.js +50 -59
- package/lib/layout/index.js +15 -12
- package/lib/locale/format-message.js +1 -1
- package/lib/locale/index.js +4 -4
- package/lib/locale/locale-provider.js +7 -9
- package/lib/login-page/index.js +30 -42
- package/lib/media/index.js +20 -27
- package/lib/media/media.js +9 -12
- package/lib/media/preview.js +6 -8
- package/lib/mobile-insurer-detail/index.js +74 -91
- package/lib/mobile-insurer-list/index.js +34 -38
- package/lib/modal/index.js +20 -25
- package/lib/platform/platform-card/index.js +9 -12
- package/lib/platform/switch-platform/index.js +24 -32
- package/lib/policy-list/index.js +9 -12
- package/lib/policy-list/policy-card.js +119 -153
- package/lib/radio/index.js +33 -35
- package/lib/select/attached-select.js +32 -35
- package/lib/select/select.js +13 -9
- package/lib/select/time-select.js +12 -16
- package/lib/status-box/index.js +6 -8
- package/lib/table/index.js +69 -93
- package/lib/tabs/index.js +8 -2
- package/lib/typography/index.js +6 -8
- package/lib/upload/index.js +48 -66
- package/lib/upload-photo/index.js +47 -63
- package/lib/upload-photo/media.js +3 -4
- package/lib/upload-preview/index.js +9 -12
- package/lib/upload-preview/media.js +12 -16
- package/lib/utils/form-utils.js +19 -26
- package/package.json +1 -1
package/es/filter/rangePicker.js
CHANGED
|
@@ -105,20 +105,16 @@ var CreateRangePickerFilter = function CreateRangePickerFilter(props) {
|
|
|
105
105
|
className: "igloo-filter-date-picker-range-separate"
|
|
106
106
|
}, void 0);
|
|
107
107
|
|
|
108
|
-
return _jsxs("div",
|
|
109
|
-
className: "igloo-form-filter-drop-down-container-content-group"
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}, {
|
|
114
|
-
children: [_jsx(Typography, Object.assign({
|
|
108
|
+
return _jsxs("div", {
|
|
109
|
+
className: "igloo-form-filter-drop-down-container-content-group",
|
|
110
|
+
children: [_jsxs("div", {
|
|
111
|
+
className: "igloo-form-filter-drop-down-container-content-group-title",
|
|
112
|
+
children: [_jsx(Typography, {
|
|
115
113
|
level: "h4",
|
|
116
|
-
className: "igloo-form-filter-range-picker-label"
|
|
117
|
-
}, {
|
|
114
|
+
className: "igloo-form-filter-range-picker-label",
|
|
118
115
|
children: title
|
|
119
|
-
}
|
|
120
|
-
className: "igloo-form-filter-range-picker-container"
|
|
121
|
-
}, {
|
|
116
|
+
}, void 0), _jsxs("div", {
|
|
117
|
+
className: "igloo-form-filter-range-picker-container",
|
|
122
118
|
children: [_jsx(RangePicker, {
|
|
123
119
|
inputReadOnly: true,
|
|
124
120
|
className: classnames('igloo-date-picker-container', {
|
|
@@ -169,10 +165,9 @@ var CreateRangePickerFilter = function CreateRangePickerFilter(props) {
|
|
|
169
165
|
var thisMonthFinallyUse = dateRangeConfig.thisMonth || [moment().startOf('month'), moment().endOf('month')];
|
|
170
166
|
var thisMonthDisable = disabledDate(thisMonthFinallyUse[0]) || disabledDate(thisMonthFinallyUse[1]);
|
|
171
167
|
return _jsxs("div", {
|
|
172
|
-
children: [_jsxs("div",
|
|
173
|
-
className: "igloo-form-filter-date-picker-panel-top"
|
|
174
|
-
|
|
175
|
-
children: [_jsx("div", Object.assign({
|
|
168
|
+
children: [_jsxs("div", {
|
|
169
|
+
className: "igloo-form-filter-date-picker-panel-top",
|
|
170
|
+
children: [_jsx("div", {
|
|
176
171
|
className: customDisable ? 'igloo-form-filter-date-picker-top-diable' : '',
|
|
177
172
|
onClick: function onClick() {
|
|
178
173
|
if (customDisable) return;
|
|
@@ -181,17 +176,15 @@ var CreateRangePickerFilter = function CreateRangePickerFilter(props) {
|
|
|
181
176
|
startTime: customFinallyUse[0],
|
|
182
177
|
endTime: customFinallyUse[1]
|
|
183
178
|
};
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
children: _jsx(Typography, Object.assign({
|
|
179
|
+
},
|
|
180
|
+
children: _jsx(Typography, {
|
|
187
181
|
level: "h5",
|
|
188
|
-
className: "".concat(tiemRange === 0 ? 'igloo-form-filter-date-picker-panel-top-action' : '')
|
|
189
|
-
}, {
|
|
182
|
+
className: "".concat(tiemRange === 0 ? 'igloo-form-filter-date-picker-panel-top-action' : ''),
|
|
190
183
|
children: formatMessage({
|
|
191
184
|
id: 'Custom'
|
|
192
185
|
})
|
|
193
|
-
}
|
|
194
|
-
}
|
|
186
|
+
}, void 0)
|
|
187
|
+
}, void 0), _jsx("div", {
|
|
195
188
|
className: lastDayDisable ? 'igloo-form-filter-date-picker-top-diable' : '',
|
|
196
189
|
onClick: function onClick() {
|
|
197
190
|
if (lastDayDisable) return;
|
|
@@ -200,17 +193,15 @@ var CreateRangePickerFilter = function CreateRangePickerFilter(props) {
|
|
|
200
193
|
startTime: lastDayFinallyUse[0],
|
|
201
194
|
endTime: lastDayFinallyUse[1]
|
|
202
195
|
};
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
children: _jsx(Typography, Object.assign({
|
|
196
|
+
},
|
|
197
|
+
children: _jsx(Typography, {
|
|
206
198
|
level: "h5",
|
|
207
|
-
className: "".concat(tiemRange === 1 ? 'igloo-form-filter-date-picker-panel-top-action' : '')
|
|
208
|
-
}, {
|
|
199
|
+
className: "".concat(tiemRange === 1 ? 'igloo-form-filter-date-picker-panel-top-action' : ''),
|
|
209
200
|
children: formatMessage({
|
|
210
201
|
id: 'Last Day'
|
|
211
202
|
})
|
|
212
|
-
}
|
|
213
|
-
}
|
|
203
|
+
}, void 0)
|
|
204
|
+
}, void 0), _jsx("div", {
|
|
214
205
|
className: lastSevenDaysDisable ? 'igloo-form-filter-date-picker-top-diable' : '',
|
|
215
206
|
onClick: function onClick() {
|
|
216
207
|
if (lastSevenDaysDisable) return;
|
|
@@ -219,17 +210,15 @@ var CreateRangePickerFilter = function CreateRangePickerFilter(props) {
|
|
|
219
210
|
startTime: lastSevenDaysFinallyUse[0],
|
|
220
211
|
endTime: lastSevenDaysFinallyUse[1]
|
|
221
212
|
};
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
children: _jsx(Typography, Object.assign({
|
|
213
|
+
},
|
|
214
|
+
children: _jsx(Typography, {
|
|
225
215
|
level: "h5",
|
|
226
|
-
className: "".concat(tiemRange === 2 ? 'igloo-form-filter-date-picker-panel-top-action' : '')
|
|
227
|
-
}, {
|
|
216
|
+
className: "".concat(tiemRange === 2 ? 'igloo-form-filter-date-picker-panel-top-action' : ''),
|
|
228
217
|
children: formatMessage({
|
|
229
218
|
id: 'Last 7 Days'
|
|
230
219
|
})
|
|
231
|
-
}
|
|
232
|
-
}
|
|
220
|
+
}, void 0)
|
|
221
|
+
}, void 0), _jsx("div", {
|
|
233
222
|
className: lastMonthDisable ? 'igloo-form-filter-date-picker-top-diable' : '',
|
|
234
223
|
onClick: function onClick() {
|
|
235
224
|
if (lastMonthDisable) return;
|
|
@@ -238,17 +227,15 @@ var CreateRangePickerFilter = function CreateRangePickerFilter(props) {
|
|
|
238
227
|
startTime: lastMonthFinallyUse[0],
|
|
239
228
|
endTime: lastMonthFinallyUse[1]
|
|
240
229
|
};
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
children: _jsx(Typography, Object.assign({
|
|
230
|
+
},
|
|
231
|
+
children: _jsx(Typography, {
|
|
244
232
|
level: "h5",
|
|
245
|
-
className: "".concat(tiemRange === 3 ? 'igloo-form-filter-date-picker-panel-top-action' : '')
|
|
246
|
-
}, {
|
|
233
|
+
className: "".concat(tiemRange === 3 ? 'igloo-form-filter-date-picker-panel-top-action' : ''),
|
|
247
234
|
children: formatMessage({
|
|
248
235
|
id: 'Last Month'
|
|
249
236
|
})
|
|
250
|
-
}
|
|
251
|
-
}
|
|
237
|
+
}, void 0)
|
|
238
|
+
}, void 0), _jsx("div", {
|
|
252
239
|
className: thisMonthDisable ? 'igloo-form-filter-date-picker-top-diable' : '',
|
|
253
240
|
onClick: function onClick() {
|
|
254
241
|
if (thisMonthDisable) return;
|
|
@@ -257,23 +244,20 @@ var CreateRangePickerFilter = function CreateRangePickerFilter(props) {
|
|
|
257
244
|
startTime: thisMonthFinallyUse[0],
|
|
258
245
|
endTime: thisMonthFinallyUse[1]
|
|
259
246
|
};
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
children: _jsx(Typography, Object.assign({
|
|
247
|
+
},
|
|
248
|
+
children: _jsx(Typography, {
|
|
263
249
|
level: "h5",
|
|
264
|
-
className: "".concat(tiemRange === 4 ? 'igloo-form-filter-date-picker-panel-top-action' : '')
|
|
265
|
-
}, {
|
|
250
|
+
className: "".concat(tiemRange === 4 ? 'igloo-form-filter-date-picker-panel-top-action' : ''),
|
|
266
251
|
children: formatMessage({
|
|
267
252
|
id: 'This Month'
|
|
268
253
|
})
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
}
|
|
254
|
+
}, void 0)
|
|
255
|
+
}, void 0)]
|
|
256
|
+
}, void 0), pa]
|
|
272
257
|
}, void 0);
|
|
273
258
|
}
|
|
274
|
-
}, void 0), pickerOpenStatus && _jsx("div",
|
|
275
|
-
className: "igloo-form-filter-range-icon"
|
|
276
|
-
}, {
|
|
259
|
+
}, void 0), pickerOpenStatus && _jsx("div", {
|
|
260
|
+
className: "igloo-form-filter-range-icon",
|
|
277
261
|
children: _jsx(CalendarOutlined, {
|
|
278
262
|
style: {
|
|
279
263
|
fontSize: '20px'
|
|
@@ -289,17 +273,17 @@ var CreateRangePickerFilter = function CreateRangePickerFilter(props) {
|
|
|
289
273
|
onFocus.focus();
|
|
290
274
|
}
|
|
291
275
|
}, void 0)
|
|
292
|
-
}
|
|
276
|
+
}, void 0), _jsx("div", {
|
|
293
277
|
ref: dateRangerContainerRef,
|
|
294
278
|
className: "igloo-form-fliter-drop-down-container-content-group-title-ranger-container"
|
|
295
279
|
}, void 0)]
|
|
296
|
-
}
|
|
297
|
-
}
|
|
280
|
+
}, void 0)]
|
|
281
|
+
}, void 0), _jsx(_Divider, {
|
|
298
282
|
style: {
|
|
299
283
|
margin: '16px 0px'
|
|
300
284
|
}
|
|
301
285
|
}, void 0)]
|
|
302
|
-
}
|
|
286
|
+
}, optionKey);
|
|
303
287
|
};
|
|
304
288
|
|
|
305
289
|
export default CreateRangePickerFilter;
|
package/es/form/divider/index.js
CHANGED
|
@@ -2,6 +2,12 @@ import "antd/es/divider/style";
|
|
|
2
2
|
import _Divider from "antd/es/divider";
|
|
3
3
|
var _excluded = ["className"];
|
|
4
4
|
|
|
5
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
6
|
+
|
|
7
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
8
|
+
|
|
9
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
|
+
|
|
5
11
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
6
12
|
|
|
7
13
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -16,7 +22,7 @@ var DividerElement = function DividerElement(_ref) {
|
|
|
16
22
|
var className = _ref.className,
|
|
17
23
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
18
24
|
|
|
19
|
-
return _jsx(_Divider,
|
|
25
|
+
return _jsx(_Divider, _objectSpread({
|
|
20
26
|
className: classNames(className, 'igloo-form-divider')
|
|
21
27
|
}, omit(props, formMethods)), void 0);
|
|
22
28
|
};
|
package/es/form/element/index.js
CHANGED
|
@@ -223,17 +223,15 @@ var Element = function Element(_ref) {
|
|
|
223
223
|
return null;
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
-
return hideWhenEdit ? null : _jsx(_Col,
|
|
227
|
-
className: "igloo-form-item"
|
|
228
|
-
|
|
229
|
-
children: _jsx("div", Object.assign({
|
|
226
|
+
return hideWhenEdit ? null : _jsx(_Col, _objectSpread(_objectSpread({}, restColProps), {}, {
|
|
227
|
+
className: "igloo-form-item",
|
|
228
|
+
children: _jsx("div", {
|
|
230
229
|
style: {
|
|
231
230
|
width: halfRow && md ? '50%' : '100%',
|
|
232
231
|
paddingRight: halfRow && md ? 16 : 0
|
|
233
232
|
},
|
|
234
|
-
ref: ref
|
|
235
|
-
|
|
236
|
-
children: _jsx(Component, Object.assign({}, otherElementProps, {
|
|
233
|
+
ref: ref,
|
|
234
|
+
children: _jsx(Component, _objectSpread(_objectSpread({}, otherElementProps), {}, {
|
|
237
235
|
disabled: elementProps.disabled || disabled,
|
|
238
236
|
containerRef: ref,
|
|
239
237
|
setFieldError: setFieldError,
|
|
@@ -242,7 +240,7 @@ var Element = function Element(_ref) {
|
|
|
242
240
|
getFormInstance: getFormInstance,
|
|
243
241
|
validateField: validateField
|
|
244
242
|
}), void 0)
|
|
245
|
-
}
|
|
243
|
+
}, void 0)
|
|
246
244
|
}), void 0);
|
|
247
245
|
}
|
|
248
246
|
|
|
@@ -253,74 +251,68 @@ var Element = function Element(_ref) {
|
|
|
253
251
|
return null;
|
|
254
252
|
}
|
|
255
253
|
|
|
256
|
-
return _jsx(_Col,
|
|
254
|
+
return _jsx(_Col, {
|
|
257
255
|
span: 24,
|
|
258
256
|
className: classNames({
|
|
259
257
|
'igloo-element-preview': !config.hideWhenPreview,
|
|
260
258
|
'igloo-element-preview-hide': config.hideWhenPreview,
|
|
261
259
|
'igloo-element-preview-hide-divider': config.hidePreviewDivider
|
|
262
|
-
})
|
|
263
|
-
|
|
264
|
-
children: _jsx(_Form.Item, Object.assign({}, omit(formItemProps, ['copiedValue', 'selectedValue']), {
|
|
260
|
+
}),
|
|
261
|
+
children: _jsx(_Form.Item, _objectSpread(_objectSpread({}, omit(formItemProps, ['copiedValue', 'selectedValue'])), {}, {
|
|
265
262
|
labelCol: {
|
|
266
263
|
span: 24
|
|
267
264
|
},
|
|
268
265
|
wrapperCol: {
|
|
269
266
|
span: 24
|
|
270
267
|
},
|
|
271
|
-
label: null
|
|
272
|
-
|
|
273
|
-
children: _jsxs(_Row, Object.assign({
|
|
268
|
+
label: null,
|
|
269
|
+
children: _jsxs(_Row, {
|
|
274
270
|
className: "igloo-element-preview-item",
|
|
275
271
|
gutter: {
|
|
276
272
|
md: 32,
|
|
277
273
|
sm: 0,
|
|
278
274
|
xs: 0
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
children: [(previewLabel || label) && _jsx(_Col, Object.assign({
|
|
275
|
+
},
|
|
276
|
+
children: [(previewLabel || label) && _jsx(_Col, {
|
|
282
277
|
span: 12,
|
|
283
278
|
md: 12,
|
|
284
279
|
sm: 24,
|
|
285
280
|
xs: 24,
|
|
286
|
-
className: "igloo-element-preview-label"
|
|
287
|
-
}, {
|
|
281
|
+
className: "igloo-element-preview-label",
|
|
288
282
|
children: previewLabel || label
|
|
289
|
-
}
|
|
283
|
+
}, void 0), _jsxs(_Col, {
|
|
290
284
|
span: label ? 12 : 24,
|
|
291
285
|
md: label ? 12 : 24,
|
|
292
286
|
sm: 24,
|
|
293
287
|
xs: 24,
|
|
294
|
-
className: "igloo-element-preview-value"
|
|
295
|
-
}, {
|
|
288
|
+
className: "igloo-element-preview-value",
|
|
296
289
|
children: [error && !!error.length && _jsx(CloseCircleFilled, {
|
|
297
290
|
className: "igloo-element-preview-value-icon"
|
|
298
291
|
}, void 0), previewFormater ? previewFormater(value, form) : value || '-']
|
|
299
|
-
}
|
|
300
|
-
}
|
|
292
|
+
}, void 0)]
|
|
293
|
+
}, void 0)
|
|
301
294
|
}), void 0)
|
|
302
|
-
}
|
|
295
|
+
}, void 0);
|
|
303
296
|
}
|
|
304
297
|
|
|
305
|
-
return config.hideWhenEdit ? null : _jsx(_Col,
|
|
306
|
-
className: "igloo-form-item"
|
|
307
|
-
|
|
308
|
-
children: _jsx("div", Object.assign({
|
|
298
|
+
return config.hideWhenEdit ? null : _jsx(_Col, _objectSpread(_objectSpread({}, restColProps), {}, {
|
|
299
|
+
className: "igloo-form-item",
|
|
300
|
+
children: _jsx("div", {
|
|
309
301
|
ref: ref,
|
|
310
302
|
style: {
|
|
311
303
|
width: halfRow && md ? '50%' : '100%',
|
|
312
304
|
paddingRight: halfRow && md ? 16 : 0
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
children: _jsx(_Form.Item, Object.assign({
|
|
305
|
+
},
|
|
306
|
+
children: _jsx(_Form.Item, _objectSpread(_objectSpread({
|
|
316
307
|
labelCol: {
|
|
317
308
|
span: 24
|
|
318
309
|
},
|
|
319
310
|
wrapperCol: {
|
|
320
311
|
span: 24
|
|
321
312
|
}
|
|
322
|
-
}, omit(formItemProps, ['copiedValue', 'selectedValue']), {
|
|
323
|
-
|
|
313
|
+
}, omit(formItemProps, ['copiedValue', 'selectedValue'])), {}, {
|
|
314
|
+
className: "igloo-element-edit",
|
|
315
|
+
children: _jsx(Component, _objectSpread(_objectSpread({}, elementProps), {}, {
|
|
324
316
|
disabled: elementProps.disabled || disabled,
|
|
325
317
|
containerRef: ref,
|
|
326
318
|
setFieldError: setFieldError,
|
|
@@ -330,7 +322,7 @@ var Element = function Element(_ref) {
|
|
|
330
322
|
validateField: validateField
|
|
331
323
|
}), void 0)
|
|
332
324
|
}), void 0)
|
|
333
|
-
}
|
|
325
|
+
}, void 0)
|
|
334
326
|
}), void 0);
|
|
335
327
|
};
|
|
336
328
|
|
package/es/form/index.js
CHANGED
|
@@ -224,13 +224,12 @@ var IglooForm = function IglooForm(props, ref) {
|
|
|
224
224
|
}
|
|
225
225
|
};
|
|
226
226
|
|
|
227
|
-
return _jsx("div",
|
|
227
|
+
return _jsx("div", {
|
|
228
228
|
className: classNames(className, {
|
|
229
229
|
'igloo-form-without-button': !showSubmitButton
|
|
230
230
|
}),
|
|
231
|
-
style: style
|
|
232
|
-
|
|
233
|
-
children: _jsx(FormContext.Provider, Object.assign({
|
|
231
|
+
style: style,
|
|
232
|
+
children: _jsx(FormContext.Provider, {
|
|
234
233
|
value: _objectSpread({
|
|
235
234
|
form: form,
|
|
236
235
|
onCancel: onCancel,
|
|
@@ -239,17 +238,15 @@ var IglooForm = function IglooForm(props, ref) {
|
|
|
239
238
|
showSubmitButton: showSubmitButton,
|
|
240
239
|
getScrollContainer: getScrollContainer,
|
|
241
240
|
registerDependencies: registerDependencies
|
|
242
|
-
}, locales)
|
|
243
|
-
|
|
244
|
-
children: _jsxs(_Form, Object.assign({
|
|
241
|
+
}, locales),
|
|
242
|
+
children: _jsxs(_Form, {
|
|
245
243
|
form: form,
|
|
246
244
|
onFinish: handleSubmit,
|
|
247
245
|
onFieldsChange: handleValuesChange,
|
|
248
246
|
colon: false,
|
|
249
247
|
validateMessages: validateMessages || messages,
|
|
250
248
|
initialValues: initialValues,
|
|
251
|
-
scrollToFirstError: true
|
|
252
|
-
}, {
|
|
249
|
+
scrollToFirstError: true,
|
|
253
250
|
children: [type === 'Pages' && _jsx(Pages, {
|
|
254
251
|
config: config
|
|
255
252
|
}, void 0), type === 'Page' && _jsx(Page, {
|
|
@@ -259,9 +256,9 @@ var IglooForm = function IglooForm(props, ref) {
|
|
|
259
256
|
}, void 0), type === 'Login' && _jsx(Login, {
|
|
260
257
|
config: config
|
|
261
258
|
}, void 0)]
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
}
|
|
259
|
+
}, void 0)
|
|
260
|
+
}, void 0)
|
|
261
|
+
}, void 0);
|
|
265
262
|
};
|
|
266
263
|
|
|
267
264
|
var ExportedForm = function () {
|
package/es/form/login/index.js
CHANGED
|
@@ -30,40 +30,35 @@ var Login = function Login(_ref) {
|
|
|
30
30
|
var _useContext2 = useContext(LocaleContext),
|
|
31
31
|
formatMessage = _useContext2.formatMessage;
|
|
32
32
|
|
|
33
|
-
return _jsxs(_Col,
|
|
33
|
+
return _jsxs(_Col, {
|
|
34
34
|
span: 24,
|
|
35
|
-
className: 'igloo-login'
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
className: 'igloo-login-label'
|
|
39
|
-
}, {
|
|
35
|
+
className: 'igloo-login',
|
|
36
|
+
children: [label && _jsx("div", {
|
|
37
|
+
className: 'igloo-login-label',
|
|
40
38
|
children: label
|
|
41
|
-
}
|
|
42
|
-
className: 'igloo-login-content'
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
gutter: [32, 24]
|
|
46
|
-
}, {
|
|
39
|
+
}, void 0), _jsx("div", {
|
|
40
|
+
className: 'igloo-login-content',
|
|
41
|
+
children: _jsx(_Row, {
|
|
42
|
+
gutter: [32, 24],
|
|
47
43
|
children: elements.map(function (child, index) {
|
|
48
44
|
return _jsx(Element, {
|
|
49
45
|
parentName: calcNamePath(parentName, name),
|
|
50
46
|
config: child
|
|
51
47
|
}, index);
|
|
52
48
|
})
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
children: _jsx(_Button,
|
|
49
|
+
}, void 0)
|
|
50
|
+
}, void 0), showSubmitButton && _jsx(_Form.Item, {
|
|
51
|
+
children: _jsx(_Button, {
|
|
56
52
|
type: "primary",
|
|
57
53
|
htmlType: "submit",
|
|
58
54
|
className: 'igloo-login-button',
|
|
59
|
-
loading: submitting
|
|
60
|
-
}, {
|
|
55
|
+
loading: submitting,
|
|
61
56
|
children: submitText || formatMessage({
|
|
62
57
|
id: 'Log in'
|
|
63
58
|
})
|
|
64
|
-
}
|
|
59
|
+
}, void 0)
|
|
65
60
|
}, void 0)]
|
|
66
|
-
}
|
|
61
|
+
}, void 0);
|
|
67
62
|
};
|
|
68
63
|
|
|
69
64
|
export default Login;
|
package/es/form/page/index.js
CHANGED
|
@@ -64,49 +64,43 @@ var Page = function Page(_ref) {
|
|
|
64
64
|
registerDependencies('SUBSCRIBE_ALL', dispatch);
|
|
65
65
|
}
|
|
66
66
|
}, []);
|
|
67
|
-
return _jsxs("div",
|
|
68
|
-
className: 'igloo-page-container'
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
children: _jsx(_Row, Object.assign({
|
|
74
|
-
gutter: [32, 24]
|
|
75
|
-
}, {
|
|
67
|
+
return _jsxs("div", {
|
|
68
|
+
className: 'igloo-page-container',
|
|
69
|
+
children: [_jsx("div", {
|
|
70
|
+
className: 'igloo-page-content',
|
|
71
|
+
children: _jsx(_Row, {
|
|
72
|
+
gutter: [32, 24],
|
|
76
73
|
children: elements.map(function (child, index) {
|
|
77
74
|
return _jsx(Element, {
|
|
78
75
|
config: child,
|
|
79
76
|
parentName: calcNamePath(parentName, name)
|
|
80
77
|
}, index);
|
|
81
78
|
})
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
className: 'igloo-page-footer'
|
|
85
|
-
}, {
|
|
79
|
+
}, void 0)
|
|
80
|
+
}, void 0), showFooter && showSubmitButton && _jsxs("div", {
|
|
81
|
+
className: 'igloo-page-footer',
|
|
86
82
|
children: [onCancel && _jsx(_Col, {
|
|
87
|
-
children: _jsx(Button,
|
|
83
|
+
children: _jsx(Button, {
|
|
88
84
|
className: 'igloo-page-cancel-button',
|
|
89
|
-
onClick: onCancel
|
|
90
|
-
}, {
|
|
85
|
+
onClick: onCancel,
|
|
91
86
|
children: cancelText || formatMessage({
|
|
92
87
|
id: 'Cancel'
|
|
93
88
|
})
|
|
94
|
-
}
|
|
89
|
+
}, void 0)
|
|
95
90
|
}, void 0), !onCancel && _jsx("div", {}, void 0), _jsx(_Form.Item, {
|
|
96
|
-
children: _jsx(Button,
|
|
91
|
+
children: _jsx(Button, {
|
|
97
92
|
type: "primary",
|
|
98
93
|
htmlType: "submit",
|
|
99
94
|
className: 'igloo-page-submit-button',
|
|
100
95
|
loading: submitting,
|
|
101
|
-
disabled: buttonDisabled
|
|
102
|
-
}, {
|
|
96
|
+
disabled: buttonDisabled,
|
|
103
97
|
children: submitText || formatMessage({
|
|
104
98
|
id: 'Submit'
|
|
105
99
|
})
|
|
106
|
-
}
|
|
100
|
+
}, void 0)
|
|
107
101
|
}, void 0)]
|
|
108
|
-
}
|
|
109
|
-
}
|
|
102
|
+
}, void 0)]
|
|
103
|
+
}, void 0);
|
|
110
104
|
};
|
|
111
105
|
|
|
112
106
|
export default Page;
|
package/es/form/pages/index.js
CHANGED
|
@@ -168,75 +168,67 @@ var Pages = function Pages(_ref) {
|
|
|
168
168
|
getPreviousDisabledState = _renderElements$curre2.getPreviousDisabledState;
|
|
169
169
|
var buttonDisabled = getButtonDisabledState && form && getButtonDisabledState(form);
|
|
170
170
|
var previousDisabled = getPreviousDisabledState && form && getPreviousDisabledState(form);
|
|
171
|
-
return _jsxs("div",
|
|
172
|
-
className: 'igloo-pages-container'
|
|
173
|
-
|
|
174
|
-
children: [_jsx(Typography, Object.assign({
|
|
171
|
+
return _jsxs("div", {
|
|
172
|
+
className: 'igloo-pages-container',
|
|
173
|
+
children: [_jsx(Typography, {
|
|
175
174
|
className: "igloo-pages-page-title",
|
|
176
175
|
level: md ? 'h3b' : 'body1',
|
|
177
176
|
wrapElement: "div",
|
|
178
177
|
style: {
|
|
179
178
|
padding: md ? 0 : '0 16px'
|
|
180
|
-
}
|
|
181
|
-
}, {
|
|
179
|
+
},
|
|
182
180
|
children: renderElements[current].label
|
|
183
|
-
}
|
|
184
|
-
className: 'igloo-pages-content'
|
|
185
|
-
}, {
|
|
181
|
+
}, void 0), _jsxs("div", {
|
|
182
|
+
className: 'igloo-pages-content',
|
|
186
183
|
children: [renderElements.map(function (child, index) {
|
|
187
184
|
invariant(child.type === 'Page', 'Child of Pages should be Page');
|
|
188
|
-
return _jsx("div",
|
|
185
|
+
return _jsx("div", {
|
|
189
186
|
className: 'igloo-pages-page',
|
|
190
187
|
style: current === index ? {
|
|
191
188
|
display: 'block'
|
|
192
189
|
} : {
|
|
193
190
|
display: 'none'
|
|
194
|
-
}
|
|
195
|
-
}, {
|
|
191
|
+
},
|
|
196
192
|
children: _jsx(Page, {
|
|
197
193
|
config: child,
|
|
198
194
|
parentName: calcNamePath(parentName, name),
|
|
199
195
|
showFooter: false
|
|
200
196
|
}, void 0)
|
|
201
|
-
}
|
|
202
|
-
}), _jsxs("div",
|
|
203
|
-
className: 'igloo-pages-footer'
|
|
204
|
-
|
|
205
|
-
children: [current === 0 && _jsx("div", {}, void 0), current > 0 && _jsx(Button, Object.assign({
|
|
197
|
+
}, child.key);
|
|
198
|
+
}), _jsxs("div", {
|
|
199
|
+
className: 'igloo-pages-footer',
|
|
200
|
+
children: [current === 0 && _jsx("div", {}, void 0), current > 0 && _jsx(Button, {
|
|
206
201
|
className: 'igloo-pages-preview-button',
|
|
207
202
|
onClick: function onClick() {
|
|
208
203
|
return setCurrent(current - 1);
|
|
209
204
|
},
|
|
210
|
-
disabled: previousDisabled
|
|
211
|
-
}, {
|
|
205
|
+
disabled: previousDisabled,
|
|
212
206
|
children: previewText || formatMessage({
|
|
213
207
|
id: 'Previous'
|
|
214
208
|
})
|
|
215
|
-
}
|
|
209
|
+
}, void 0), current < renderElements.length - 1 && _jsx(Button, {
|
|
216
210
|
className: 'igloo-pages-next-button',
|
|
217
211
|
onClick: handleNext,
|
|
218
212
|
disabled: buttonDisabled,
|
|
219
|
-
type: "primary"
|
|
220
|
-
}, {
|
|
213
|
+
type: "primary",
|
|
221
214
|
children: nextText || formatMessage({
|
|
222
215
|
id: 'Next'
|
|
223
216
|
})
|
|
224
|
-
}
|
|
225
|
-
children: _jsx(Button,
|
|
217
|
+
}, void 0), current === renderElements.length - 1 && showSubmitButton && _jsx(_Form.Item, {
|
|
218
|
+
children: _jsx(Button, {
|
|
226
219
|
type: "primary",
|
|
227
220
|
htmlType: "submit",
|
|
228
221
|
className: 'igloo-pages-submit-button',
|
|
229
222
|
loading: submitting,
|
|
230
|
-
disabled: buttonDisabled
|
|
231
|
-
}, {
|
|
223
|
+
disabled: buttonDisabled,
|
|
232
224
|
children: submitText || formatMessage({
|
|
233
225
|
id: 'Submit'
|
|
234
226
|
})
|
|
235
|
-
}
|
|
227
|
+
}, void 0)
|
|
236
228
|
}, void 0)]
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
}
|
|
229
|
+
}, void 0)]
|
|
230
|
+
}, void 0)]
|
|
231
|
+
}, void 0);
|
|
240
232
|
};
|
|
241
233
|
|
|
242
234
|
export default Pages;
|