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/form/section/index.js
CHANGED
|
@@ -65,24 +65,21 @@ var Section = function Section(_ref) {
|
|
|
65
65
|
}]);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
return display ? _jsxs(_Col,
|
|
68
|
+
return display ? _jsxs(_Col, {
|
|
69
69
|
span: 24,
|
|
70
70
|
className: 'igloo-section',
|
|
71
|
-
style: style
|
|
72
|
-
|
|
73
|
-
children: [label && _jsx(Typography, Object.assign({
|
|
71
|
+
style: style,
|
|
72
|
+
children: [label && _jsx(Typography, _objectSpread(_objectSpread({
|
|
74
73
|
className: 'igloo-section-label'
|
|
75
|
-
}, labelProps, {
|
|
74
|
+
}, labelProps), {}, {
|
|
76
75
|
level: "h4",
|
|
77
|
-
wrapElement: "div"
|
|
78
|
-
}, {
|
|
76
|
+
wrapElement: "div",
|
|
79
77
|
children: label
|
|
80
|
-
}), void 0), _jsx("div",
|
|
78
|
+
}), void 0), _jsx("div", _objectSpread(_objectSpread({
|
|
81
79
|
className: 'igloo-section-content'
|
|
82
|
-
}, contentProps, {
|
|
83
|
-
children: _jsx(_Row,
|
|
84
|
-
gutter: [32, 24]
|
|
85
|
-
}, {
|
|
80
|
+
}, contentProps), {}, {
|
|
81
|
+
children: _jsx(_Row, {
|
|
82
|
+
gutter: [32, 24],
|
|
86
83
|
children: elements.map(function (child, index) {
|
|
87
84
|
return _jsx(Element, {
|
|
88
85
|
parentName: namePath,
|
|
@@ -92,9 +89,9 @@ var Section = function Section(_ref) {
|
|
|
92
89
|
setShowStepButton: setShowStepButton
|
|
93
90
|
}, index);
|
|
94
91
|
})
|
|
95
|
-
}
|
|
92
|
+
}, void 0)
|
|
96
93
|
}), void 0)]
|
|
97
|
-
}
|
|
94
|
+
}, void 0) : null;
|
|
98
95
|
};
|
|
99
96
|
|
|
100
97
|
export default Section;
|
package/es/form/step/index.js
CHANGED
|
@@ -90,26 +90,21 @@ var Step = function Step(_ref) {
|
|
|
90
90
|
}) : containerRef === null || containerRef === void 0 ? void 0 : (_containerRef$current3 = containerRef.current) === null || _containerRef$current3 === void 0 ? void 0 : _containerRef$current3.scrollIntoView();
|
|
91
91
|
}, [shouldScroll, edit]);
|
|
92
92
|
var displayTotal = showLastIndex ? total : total - 1;
|
|
93
|
-
return _jsxs("div",
|
|
93
|
+
return _jsxs("div", {
|
|
94
94
|
className: 'igloo-step-container',
|
|
95
|
-
ref: containerRef
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
className: "igloo-step-label"
|
|
99
|
-
}, {
|
|
95
|
+
ref: containerRef,
|
|
96
|
+
children: [label && _jsxs("div", {
|
|
97
|
+
className: "igloo-step-label",
|
|
100
98
|
children: [_jsxs("div", {
|
|
101
|
-
children: [(index !== total - 1 || showLastIndex) && _jsx("span",
|
|
102
|
-
className: "igloo-step-label-index"
|
|
103
|
-
}, {
|
|
99
|
+
children: [(index !== total - 1 || showLastIndex) && _jsx("span", {
|
|
100
|
+
className: "igloo-step-label-index",
|
|
104
101
|
children: specialDisplayIndex(index + 1)
|
|
105
|
-
}
|
|
106
|
-
className: "igloo-step-label-text"
|
|
107
|
-
}, {
|
|
102
|
+
}, void 0), _jsx("span", {
|
|
103
|
+
className: "igloo-step-label-text",
|
|
108
104
|
children: label
|
|
109
|
-
}
|
|
110
|
-
}, void 0), !preview && (index !== total - 1 || showLastIndex) && _jsx("div",
|
|
111
|
-
className: "igloo-step-label-step-count"
|
|
112
|
-
}, {
|
|
105
|
+
}, void 0)]
|
|
106
|
+
}, void 0), !preview && (index !== total - 1 || showLastIndex) && _jsx("div", {
|
|
107
|
+
className: "igloo-step-label-step-count",
|
|
113
108
|
children: formatMessage({
|
|
114
109
|
id: "{currentStep} of {allSteps}",
|
|
115
110
|
values: {
|
|
@@ -117,22 +112,19 @@ var Step = function Step(_ref) {
|
|
|
117
112
|
allSteps: displayTotal
|
|
118
113
|
}
|
|
119
114
|
})
|
|
120
|
-
}
|
|
115
|
+
}, void 0), preview && _jsx(Button, {
|
|
121
116
|
type: "link",
|
|
122
117
|
className: "igloo-step-label-edit",
|
|
123
118
|
onClick: handleEdit,
|
|
124
|
-
disabled: disableEditButton
|
|
125
|
-
}, {
|
|
119
|
+
disabled: disableEditButton,
|
|
126
120
|
children: editButtonLabel || formatMessage({
|
|
127
121
|
id: 'Edit'
|
|
128
122
|
})
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
className: 'igloo-step-content'
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
gutter: [32, preview ? 16 : 24]
|
|
135
|
-
}, {
|
|
123
|
+
}, void 0)]
|
|
124
|
+
}, void 0), (edit || preview) && _jsxs("div", {
|
|
125
|
+
className: 'igloo-step-content',
|
|
126
|
+
children: [_jsx(_Row, {
|
|
127
|
+
gutter: [32, preview ? 16 : 24],
|
|
136
128
|
children: elements.map(function (child, index) {
|
|
137
129
|
return _jsx(Element, {
|
|
138
130
|
config: child,
|
|
@@ -141,38 +133,35 @@ var Step = function Step(_ref) {
|
|
|
141
133
|
preview: preview
|
|
142
134
|
}, index);
|
|
143
135
|
})
|
|
144
|
-
}
|
|
145
|
-
children: _jsx(Button,
|
|
136
|
+
}, void 0), edit && index !== total - 1 && showButton && _jsx(_Row, {
|
|
137
|
+
children: _jsx(Button, {
|
|
146
138
|
onClick: handleNext,
|
|
147
139
|
className: 'igloo-step-button',
|
|
148
140
|
type: "primary",
|
|
149
|
-
disabled: buttonDisabled
|
|
150
|
-
}, {
|
|
141
|
+
disabled: buttonDisabled,
|
|
151
142
|
children: continueText || formatMessage({
|
|
152
143
|
id: 'Continue'
|
|
153
144
|
})
|
|
154
|
-
}
|
|
155
|
-
}, void 0), edit && index === total - 1 && showButton && showSubmitButton && _jsx(_Form.Item,
|
|
145
|
+
}, void 0)
|
|
146
|
+
}, void 0), edit && index === total - 1 && showButton && showSubmitButton && _jsx(_Form.Item, {
|
|
156
147
|
style: {
|
|
157
148
|
marginBottom: 0
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
children: _jsx(Button, Object.assign({
|
|
149
|
+
},
|
|
150
|
+
children: _jsx(Button, {
|
|
161
151
|
type: "primary",
|
|
162
152
|
htmlType: "submit",
|
|
163
153
|
className: 'igloo-step-button',
|
|
164
154
|
loading: submitting,
|
|
165
|
-
disabled: buttonDisabled
|
|
166
|
-
}, {
|
|
155
|
+
disabled: buttonDisabled,
|
|
167
156
|
children: submitText || formatMessage({
|
|
168
157
|
id: 'Submit'
|
|
169
158
|
})
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
159
|
+
}, void 0)
|
|
160
|
+
}, void 0)]
|
|
161
|
+
}, void 0), !edit && !preview && _jsx(_Divider, {
|
|
173
162
|
className: "igloo-step-divider"
|
|
174
163
|
}, void 0)]
|
|
175
|
-
}
|
|
164
|
+
}, void 0);
|
|
176
165
|
};
|
|
177
166
|
|
|
178
167
|
export default Step;
|
package/es/form/steps/index.js
CHANGED
|
@@ -169,12 +169,10 @@ var Steps = function Steps(_ref) {
|
|
|
169
169
|
typeof onEdit === 'function' && onEdit(index);
|
|
170
170
|
};
|
|
171
171
|
|
|
172
|
-
return _jsx("div",
|
|
173
|
-
className: 'igloo-steps-container'
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
className: 'igloo-steps-content'
|
|
177
|
-
}, {
|
|
172
|
+
return _jsx("div", {
|
|
173
|
+
className: 'igloo-steps-container',
|
|
174
|
+
children: _jsx("div", {
|
|
175
|
+
className: 'igloo-steps-content',
|
|
178
176
|
children: renderElements.map(function (child, index) {
|
|
179
177
|
invariant(child.type === 'Step', 'Child of steps should be Step');
|
|
180
178
|
return _jsx(Step, {
|
|
@@ -190,8 +188,8 @@ var Steps = function Steps(_ref) {
|
|
|
190
188
|
shouldScroll: shouldScroll
|
|
191
189
|
}, child.key);
|
|
192
190
|
})
|
|
193
|
-
}
|
|
194
|
-
}
|
|
191
|
+
}, void 0)
|
|
192
|
+
}, void 0);
|
|
195
193
|
};
|
|
196
194
|
|
|
197
195
|
export default Steps;
|
|
@@ -218,75 +218,69 @@ var Element = function Element(props) {
|
|
|
218
218
|
if (!display) return null;
|
|
219
219
|
|
|
220
220
|
if (preview) {
|
|
221
|
-
return _jsx(_Col,
|
|
221
|
+
return _jsx(_Col, {
|
|
222
222
|
span: 24,
|
|
223
223
|
className: classNames('igloo-freeform-element-preview', {
|
|
224
224
|
'igloo-freeform-element-preview-hide': props.hideWhenPreview,
|
|
225
225
|
'igloo-freeform-element-preview-hide-divider': props.hidePreviewDivider
|
|
226
|
-
})
|
|
227
|
-
|
|
228
|
-
children: _jsx(_Form.Item, Object.assign({}, omit(formItemProps, ['copiedValue', 'selectedValue']), {
|
|
226
|
+
}),
|
|
227
|
+
children: _jsx(_Form.Item, _objectSpread(_objectSpread({}, omit(formItemProps, ['copiedValue', 'selectedValue'])), {}, {
|
|
229
228
|
labelCol: {
|
|
230
229
|
span: 24
|
|
231
230
|
},
|
|
232
231
|
wrapperCol: {
|
|
233
232
|
span: 24
|
|
234
233
|
},
|
|
235
|
-
label: null
|
|
236
|
-
|
|
237
|
-
children: _jsxs(_Row, Object.assign({
|
|
234
|
+
label: null,
|
|
235
|
+
children: _jsxs(_Row, {
|
|
238
236
|
className: "igloo-freeform-element-preview-item",
|
|
239
237
|
gutter: {
|
|
240
238
|
md: 32,
|
|
241
239
|
sm: 0,
|
|
242
240
|
xs: 0
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
children: [(rest.previewLabel || rest.label) && _jsx(_Col, Object.assign({
|
|
241
|
+
},
|
|
242
|
+
children: [(rest.previewLabel || rest.label) && _jsx(_Col, {
|
|
246
243
|
span: 12,
|
|
247
244
|
md: 12,
|
|
248
245
|
sm: 24,
|
|
249
246
|
xs: 24,
|
|
250
|
-
className: "igloo-freeform-element-preview-label"
|
|
251
|
-
}, {
|
|
247
|
+
className: "igloo-freeform-element-preview-label",
|
|
252
248
|
children: rest.previewLabel || rest.label
|
|
253
|
-
}
|
|
249
|
+
}, void 0), _jsxs(_Col, {
|
|
254
250
|
span: rest.previewLabel || rest.label ? 12 : 24,
|
|
255
251
|
md: rest.previewLabel || rest.label ? 12 : 24,
|
|
256
252
|
sm: 24,
|
|
257
253
|
xs: 24,
|
|
258
|
-
className: "igloo-freeform-element-preview-value"
|
|
259
|
-
}, {
|
|
254
|
+
className: "igloo-freeform-element-preview-value",
|
|
260
255
|
children: [error && !!error.length && _jsx(CloseCircleFilled, {
|
|
261
256
|
className: "igloo-freeform-element-preview-value-icon"
|
|
262
257
|
}, void 0), previewFormater ? previewFormater(value, form) : value || '-']
|
|
263
|
-
}
|
|
264
|
-
}
|
|
258
|
+
}, void 0)]
|
|
259
|
+
}, void 0)
|
|
265
260
|
}), void 0)
|
|
266
|
-
}
|
|
261
|
+
}, void 0);
|
|
267
262
|
}
|
|
268
263
|
|
|
269
|
-
return props.hideWhenEdit ? null : _jsx(_Col,
|
|
270
|
-
className: "igloo-freeform-item"
|
|
271
|
-
|
|
272
|
-
children: _jsx("div", Object.assign({
|
|
264
|
+
return props.hideWhenEdit ? null : _jsx(_Col, _objectSpread(_objectSpread({}, restColProps), {}, {
|
|
265
|
+
className: "igloo-freeform-item",
|
|
266
|
+
children: _jsx("div", {
|
|
273
267
|
ref: ref,
|
|
274
268
|
style: {
|
|
275
269
|
width: halfRow && md ? '50%' : '100%',
|
|
276
270
|
paddingRight: halfRow && md ? 16 : 0
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
children: _jsx(_Form.Item, Object.assign({
|
|
271
|
+
},
|
|
272
|
+
children: _jsx(_Form.Item, _objectSpread(_objectSpread({
|
|
280
273
|
labelCol: {
|
|
281
274
|
span: 24
|
|
282
275
|
},
|
|
283
276
|
wrapperCol: {
|
|
284
277
|
span: 24
|
|
285
278
|
}
|
|
286
|
-
}, omit(formItemProps, ['copiedValue', 'selectedValue']), {
|
|
279
|
+
}, omit(formItemProps, ['copiedValue', 'selectedValue'])), {}, {
|
|
280
|
+
className: "igloo-freeform-element-edit",
|
|
287
281
|
children: transformChildren()
|
|
288
282
|
}), void 0)
|
|
289
|
-
}
|
|
283
|
+
}, void 0)
|
|
290
284
|
}), void 0);
|
|
291
285
|
};
|
|
292
286
|
|
package/es/free-form/index.js
CHANGED
|
@@ -181,13 +181,12 @@ var FreeForm = function FreeForm(props) {
|
|
|
181
181
|
}
|
|
182
182
|
};
|
|
183
183
|
|
|
184
|
-
return _jsx("div",
|
|
184
|
+
return _jsx("div", {
|
|
185
185
|
className: classNames(className, {
|
|
186
186
|
'igloo-freeform-without-button': !showSubmitButton
|
|
187
187
|
}),
|
|
188
|
-
style: style
|
|
189
|
-
|
|
190
|
-
children: _jsx(FormContext.Provider, Object.assign({
|
|
188
|
+
style: style,
|
|
189
|
+
children: _jsx(FormContext.Provider, {
|
|
191
190
|
value: _objectSpread({
|
|
192
191
|
form: form,
|
|
193
192
|
onCancel: onCancel,
|
|
@@ -196,21 +195,19 @@ var FreeForm = function FreeForm(props) {
|
|
|
196
195
|
showSubmitButton: showSubmitButton,
|
|
197
196
|
getScrollContainer: getScrollContainer,
|
|
198
197
|
registerDependencies: registerDependencies
|
|
199
|
-
}, locales)
|
|
200
|
-
|
|
201
|
-
children: _jsx(_Form, Object.assign({
|
|
198
|
+
}, locales),
|
|
199
|
+
children: _jsx(_Form, {
|
|
202
200
|
form: form,
|
|
203
201
|
onFinish: handleSubmit,
|
|
204
202
|
onFieldsChange: handleValuesChange,
|
|
205
203
|
colon: false,
|
|
206
204
|
validateMessages: validateMessages || messages,
|
|
207
205
|
initialValues: initialValues,
|
|
208
|
-
scrollToFirstError: true
|
|
209
|
-
}, {
|
|
206
|
+
scrollToFirstError: true,
|
|
210
207
|
children: children
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
}
|
|
208
|
+
}, void 0)
|
|
209
|
+
}, void 0)
|
|
210
|
+
}, void 0);
|
|
214
211
|
};
|
|
215
212
|
|
|
216
213
|
export default FreeForm;
|
|
@@ -181,90 +181,79 @@ var Page = function Page(_ref) {
|
|
|
181
181
|
};
|
|
182
182
|
}();
|
|
183
183
|
|
|
184
|
-
return _jsxs("div",
|
|
184
|
+
return _jsxs("div", {
|
|
185
185
|
className: 'igloo-freeform-page-container',
|
|
186
186
|
style: {
|
|
187
187
|
display: current === index ? 'block' : 'none'
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
children: [_jsx(Typography, Object.assign({
|
|
188
|
+
},
|
|
189
|
+
children: [_jsx(Typography, {
|
|
191
190
|
level: "h3b",
|
|
192
191
|
wrapElement: "div",
|
|
193
192
|
style: {
|
|
194
193
|
marginBottom: 8
|
|
195
|
-
}
|
|
196
|
-
}, {
|
|
194
|
+
},
|
|
197
195
|
children: label
|
|
198
|
-
}
|
|
196
|
+
}, void 0), _jsx(Typography, {
|
|
199
197
|
level: "body1",
|
|
200
198
|
wrapElement: "div",
|
|
201
199
|
style: {
|
|
202
200
|
marginBottom: 24,
|
|
203
201
|
color: '#666666'
|
|
204
|
-
}
|
|
205
|
-
}, {
|
|
202
|
+
},
|
|
206
203
|
children: description
|
|
207
|
-
}
|
|
208
|
-
className: 'igloo-freeform-page-content'
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
gutter: [32, 24]
|
|
212
|
-
}, {
|
|
204
|
+
}, void 0), _jsx("div", {
|
|
205
|
+
className: 'igloo-freeform-page-content',
|
|
206
|
+
children: _jsx(_Row, {
|
|
207
|
+
gutter: [32, 24],
|
|
213
208
|
children: tranformChildren()
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
className: 'igloo-freeform-page-footer'
|
|
217
|
-
}, {
|
|
209
|
+
}, void 0)
|
|
210
|
+
}, void 0), showFooter && showSubmitButton && (current === undefined || index === undefined || total === undefined ? _jsxs("div", {
|
|
211
|
+
className: 'igloo-freeform-page-footer',
|
|
218
212
|
children: [buttonPlacement === 'right' && _jsx("div", {}, void 0), _jsx(_Form.Item, {
|
|
219
|
-
children: _jsx(Button,
|
|
213
|
+
children: _jsx(Button, {
|
|
220
214
|
type: "primary",
|
|
221
215
|
htmlType: "submit",
|
|
222
216
|
className: 'igloo-freeform-page-submit-button',
|
|
223
217
|
loading: submitting,
|
|
224
|
-
disabled: buttonDisabled
|
|
225
|
-
}, {
|
|
218
|
+
disabled: buttonDisabled,
|
|
226
219
|
children: submitText || formatMessage({
|
|
227
220
|
id: 'Submit'
|
|
228
221
|
})
|
|
229
|
-
}
|
|
222
|
+
}, void 0)
|
|
230
223
|
}, void 0), buttonPlacement === 'left' && _jsx("div", {}, void 0)]
|
|
231
|
-
}
|
|
232
|
-
className: 'igloo-freeform-page-footer'
|
|
233
|
-
|
|
234
|
-
children: [index === 0 && _jsx("div", {}, void 0), index > 0 && total > 1 && _jsx(Button, Object.assign({
|
|
224
|
+
}, void 0) : _jsxs("div", {
|
|
225
|
+
className: 'igloo-freeform-page-footer',
|
|
226
|
+
children: [index === 0 && _jsx("div", {}, void 0), index > 0 && total > 1 && _jsx(Button, {
|
|
235
227
|
className: 'igloo-freeform-page-preview-button',
|
|
236
228
|
onClick: function onClick() {
|
|
237
229
|
return handlePreviousPage && handlePreviousPage(index);
|
|
238
230
|
},
|
|
239
|
-
disabled: previousDisabled
|
|
240
|
-
}, {
|
|
231
|
+
disabled: previousDisabled,
|
|
241
232
|
children: previewText || formatMessage({
|
|
242
233
|
id: 'Previous'
|
|
243
234
|
})
|
|
244
|
-
}
|
|
235
|
+
}, void 0), index < total - 1 && _jsx(Button, {
|
|
245
236
|
className: 'igloo-freeform-page-next-button',
|
|
246
237
|
onClick: handleNext,
|
|
247
238
|
disabled: buttonDisabled,
|
|
248
|
-
type: "primary"
|
|
249
|
-
}, {
|
|
239
|
+
type: "primary",
|
|
250
240
|
children: nextText || formatMessage({
|
|
251
241
|
id: 'Next'
|
|
252
242
|
})
|
|
253
|
-
}
|
|
254
|
-
children: _jsx(Button,
|
|
243
|
+
}, void 0), current === total - 1 && _jsx(_Form.Item, {
|
|
244
|
+
children: _jsx(Button, {
|
|
255
245
|
type: "primary",
|
|
256
246
|
htmlType: "submit",
|
|
257
247
|
className: 'igloo-freeform-page-submit-button',
|
|
258
248
|
loading: submitting,
|
|
259
|
-
disabled: buttonDisabled
|
|
260
|
-
}, {
|
|
249
|
+
disabled: buttonDisabled,
|
|
261
250
|
children: submitText || formatMessage({
|
|
262
251
|
id: 'Submit'
|
|
263
252
|
})
|
|
264
|
-
}
|
|
253
|
+
}, void 0)
|
|
265
254
|
}, void 0)]
|
|
266
|
-
}
|
|
267
|
-
}
|
|
255
|
+
}, void 0))]
|
|
256
|
+
}, void 0);
|
|
268
257
|
};
|
|
269
258
|
|
|
270
259
|
Page.displayName = 'Igloo_Free_Form_Page';
|
|
@@ -80,15 +80,13 @@ var Pages = function Pages(_ref) {
|
|
|
80
80
|
})) : children;
|
|
81
81
|
};
|
|
82
82
|
|
|
83
|
-
return _jsx("div",
|
|
84
|
-
className: 'igloo-freeform-pages-container'
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
className: 'igloo-freeform-pages-content'
|
|
88
|
-
}, {
|
|
83
|
+
return _jsx("div", {
|
|
84
|
+
className: 'igloo-freeform-pages-container',
|
|
85
|
+
children: _jsx("div", {
|
|
86
|
+
className: 'igloo-freeform-pages-content',
|
|
89
87
|
children: transformChildren()
|
|
90
|
-
}
|
|
91
|
-
}
|
|
88
|
+
}, void 0)
|
|
89
|
+
}, void 0);
|
|
92
90
|
};
|
|
93
91
|
|
|
94
92
|
export default Pages;
|
|
@@ -168,28 +168,25 @@ var Section = function Section(props) {
|
|
|
168
168
|
})) : children;
|
|
169
169
|
};
|
|
170
170
|
|
|
171
|
-
return display ? _jsxs(_Col,
|
|
171
|
+
return display ? _jsxs(_Col, {
|
|
172
172
|
span: 24,
|
|
173
173
|
className: 'igloo-freeform-section',
|
|
174
|
-
style: style
|
|
175
|
-
|
|
176
|
-
children: [label && _jsx(Typography, Object.assign({
|
|
174
|
+
style: style,
|
|
175
|
+
children: [label && _jsx(Typography, _objectSpread(_objectSpread({
|
|
177
176
|
className: 'igloo-freeform-section-label'
|
|
178
|
-
}, labelProps, {
|
|
177
|
+
}, labelProps), {}, {
|
|
179
178
|
level: "h4",
|
|
180
|
-
wrapElement: "div"
|
|
181
|
-
}, {
|
|
179
|
+
wrapElement: "div",
|
|
182
180
|
children: label
|
|
183
|
-
}), void 0), _jsx("div",
|
|
181
|
+
}), void 0), _jsx("div", _objectSpread(_objectSpread({
|
|
184
182
|
className: 'igloo-freeform-section-content'
|
|
185
|
-
}, contentProps, {
|
|
186
|
-
children: _jsx(_Row,
|
|
187
|
-
gutter: [32, 24]
|
|
188
|
-
}, {
|
|
183
|
+
}, contentProps), {}, {
|
|
184
|
+
children: _jsx(_Row, {
|
|
185
|
+
gutter: [32, 24],
|
|
189
186
|
children: transformChildren()
|
|
190
|
-
}
|
|
187
|
+
}, void 0)
|
|
191
188
|
}), void 0)]
|
|
192
|
-
}
|
|
189
|
+
}, void 0) : null;
|
|
193
190
|
};
|
|
194
191
|
|
|
195
192
|
Section.displayName = 'Igloo_Free_Form_Section';
|
|
@@ -218,26 +218,21 @@ var Step = function Step(_ref) {
|
|
|
218
218
|
return null;
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
return _jsxs("div",
|
|
221
|
+
return _jsxs("div", {
|
|
222
222
|
className: 'igloo-freeform-step-container',
|
|
223
|
-
ref: containerRef
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
className: "igloo-freeform-step-label"
|
|
227
|
-
}, {
|
|
223
|
+
ref: containerRef,
|
|
224
|
+
children: [label && _jsxs("div", {
|
|
225
|
+
className: "igloo-freeform-step-label",
|
|
228
226
|
children: [_jsxs("div", {
|
|
229
|
-
children: [(index !== total - 1 || showLastIndex) && _jsx("span",
|
|
230
|
-
className: "igloo-freeform-step-label-index"
|
|
231
|
-
}, {
|
|
227
|
+
children: [(index !== total - 1 || showLastIndex) && _jsx("span", {
|
|
228
|
+
className: "igloo-freeform-step-label-index",
|
|
232
229
|
children: specialDisplayIndex(index + 1)
|
|
233
|
-
}
|
|
234
|
-
className: "igloo-freeform-step-label-text"
|
|
235
|
-
}, {
|
|
230
|
+
}, void 0), _jsx("span", {
|
|
231
|
+
className: "igloo-freeform-step-label-text",
|
|
236
232
|
children: label
|
|
237
|
-
}
|
|
238
|
-
}, void 0), !preview && (index !== total - 1 || showLastIndex) && _jsx("div",
|
|
239
|
-
className: "igloo-freeform-step-label-step-count"
|
|
240
|
-
}, {
|
|
233
|
+
}, void 0)]
|
|
234
|
+
}, void 0), !preview && (index !== total - 1 || showLastIndex) && _jsx("div", {
|
|
235
|
+
className: "igloo-freeform-step-label-step-count",
|
|
241
236
|
children: formatMessage({
|
|
242
237
|
id: "{currentStep} of {allSteps}",
|
|
243
238
|
values: {
|
|
@@ -245,55 +240,49 @@ var Step = function Step(_ref) {
|
|
|
245
240
|
allSteps: displayTotal
|
|
246
241
|
}
|
|
247
242
|
})
|
|
248
|
-
}
|
|
243
|
+
}, void 0), preview && _jsx(Button, {
|
|
249
244
|
type: "link",
|
|
250
245
|
className: "igloo-freeform-step-label-edit",
|
|
251
246
|
onClick: handleEdit,
|
|
252
|
-
disabled: disableEditButton
|
|
253
|
-
}, {
|
|
247
|
+
disabled: disableEditButton,
|
|
254
248
|
children: editButtonLabel || formatMessage({
|
|
255
249
|
id: 'Edit'
|
|
256
250
|
})
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
className: 'igloo-freeform-step-content'
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
gutter: [32, preview ? 16 : 24]
|
|
263
|
-
}, {
|
|
251
|
+
}, void 0)]
|
|
252
|
+
}, void 0), (edit || preview) && _jsxs("div", {
|
|
253
|
+
className: 'igloo-freeform-step-content',
|
|
254
|
+
children: [_jsx(_Row, {
|
|
255
|
+
gutter: [32, preview ? 16 : 24],
|
|
264
256
|
children: transformChildren()
|
|
265
|
-
}
|
|
266
|
-
children: _jsx(Button,
|
|
257
|
+
}, void 0), edit && index !== total - 1 && showButton && _jsx(_Row, {
|
|
258
|
+
children: _jsx(Button, {
|
|
267
259
|
onClick: handleNext,
|
|
268
260
|
className: 'igloo-freeform-step-button',
|
|
269
261
|
type: "primary",
|
|
270
|
-
disabled: buttonDisabled
|
|
271
|
-
}, {
|
|
262
|
+
disabled: buttonDisabled,
|
|
272
263
|
children: continueText || formatMessage({
|
|
273
264
|
id: 'Continue'
|
|
274
265
|
})
|
|
275
|
-
}
|
|
276
|
-
}, void 0), edit && index === total - 1 && showButton && showSubmitButton && _jsx(_Form.Item,
|
|
266
|
+
}, void 0)
|
|
267
|
+
}, void 0), edit && index === total - 1 && showButton && showSubmitButton && _jsx(_Form.Item, {
|
|
277
268
|
style: {
|
|
278
269
|
marginBottom: 0
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
children: _jsx(Button, Object.assign({
|
|
270
|
+
},
|
|
271
|
+
children: _jsx(Button, {
|
|
282
272
|
type: "primary",
|
|
283
273
|
htmlType: "submit",
|
|
284
274
|
className: 'igloo-freeform-step-button',
|
|
285
275
|
loading: submitting,
|
|
286
|
-
disabled: buttonDisabled
|
|
287
|
-
}, {
|
|
276
|
+
disabled: buttonDisabled,
|
|
288
277
|
children: submitText || formatMessage({
|
|
289
278
|
id: 'Submit'
|
|
290
279
|
})
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
}
|
|
280
|
+
}, void 0)
|
|
281
|
+
}, void 0)]
|
|
282
|
+
}, void 0), !edit && !preview && _jsx(_Divider, {
|
|
294
283
|
className: "igloo-freeform-step-divider"
|
|
295
284
|
}, void 0)]
|
|
296
|
-
}
|
|
285
|
+
}, void 0);
|
|
297
286
|
};
|
|
298
287
|
|
|
299
288
|
export default Step;
|
|
@@ -110,15 +110,13 @@ var Steps = function Steps(_ref) {
|
|
|
110
110
|
});
|
|
111
111
|
};
|
|
112
112
|
|
|
113
|
-
return _jsx("div",
|
|
114
|
-
className: 'igloo-freeform-steps-container'
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
className: 'igloo-freeform-steps-content'
|
|
118
|
-
}, {
|
|
113
|
+
return _jsx("div", {
|
|
114
|
+
className: 'igloo-freeform-steps-container',
|
|
115
|
+
children: _jsx("div", {
|
|
116
|
+
className: 'igloo-freeform-steps-content',
|
|
119
117
|
children: transformChildren()
|
|
120
|
-
}
|
|
121
|
-
}
|
|
118
|
+
}, void 0)
|
|
119
|
+
}, void 0);
|
|
122
120
|
};
|
|
123
121
|
|
|
124
122
|
export default Steps;
|