iglooform 2.4.25 → 2.4.28
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 +14 -14
- package/es/admin-upload/index.js +11 -11
- package/es/admin-upload/job-list.js +47 -47
- package/es/admin-upload/modal.js +10 -10
- package/es/alert-message/index.js +7 -7
- package/es/amount/index.js +2 -2
- package/es/back-top/index.js +4 -4
- package/es/button/index.js +9 -9
- package/es/card-detail/card-group.js +6 -6
- package/es/card-detail/card-item.js +5 -5
- package/es/card-detail/card-page.js +5 -5
- package/es/card-detail/card.js +7 -7
- package/es/checkbox/index.js +6 -6
- package/es/claim-list/index.js +19 -19
- package/es/confirmation/index.js +4 -4
- package/es/date-picker/buddhist.js +2 -2
- package/es/date-picker/index.js +9 -9
- package/es/declaration/index.js +5 -5
- package/es/detail-panel/index.js +26 -26
- package/es/documents/index.js +2 -2
- package/es/example/index.js +5 -5
- package/es/filter/checkBox.js +10 -10
- package/es/filter/customize.js +1 -1
- package/es/filter/index.js +43 -43
- package/es/filter/radioBox.js +7 -7
- package/es/filter/rangePicker.js +23 -23
- package/es/filter/style/index.less +10 -2
- package/es/form/addable-section/index.js +33 -18
- package/es/form/addable-section/style/index.less +6 -10
- package/es/form/divider/index.js +1 -1
- package/es/form/element/index.js +17 -17
- package/es/form/elements.js +6 -3
- package/es/form/index.js +7 -7
- package/es/form/login/index.js +6 -6
- package/es/form/page/index.js +8 -8
- package/es/form/pages/index.js +10 -10
- package/es/form/render/index.js +1 -1
- package/es/form/section/index.js +4 -4
- package/es/form/step/index.js +14 -14
- package/es/form/steps/index.js +2 -2
- package/es/free-form/addable-section/index.js +29 -14
- package/es/free-form/addable-section/style/index.less +0 -4
- package/es/free-form/element/index.js +10 -10
- package/es/free-form/index.js +3 -3
- package/es/free-form/page/index.js +15 -15
- package/es/free-form/pages/index.js +2 -2
- package/es/free-form/section/index.js +4 -4
- package/es/free-form/step/index.js +14 -14
- package/es/free-form/steps/index.js +2 -2
- package/es/global-message/index.js +12 -12
- package/es/home-menu/index.js +18 -18
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/input/amount.js +2 -2
- package/es/input/credit-card.js +4 -4
- package/es/input/email.js +1 -1
- package/es/input/expiry-date.js +3 -3
- package/es/input/input-date.js +3 -3
- package/es/input/input-number.js +1 -1
- package/es/input/input.js +1 -1
- package/es/input/otp.js +6 -6
- package/es/input/password.js +4 -4
- package/es/input/phone-number.js +4 -4
- package/es/input/text-area.js +4 -4
- package/es/layout/defaultFooter.js +28 -28
- package/es/layout/defaultHeader.js +6 -6
- package/es/layout/footer.js +66 -66
- package/es/layout/header.js +25 -25
- package/es/layout/index.js +4 -4
- package/es/locale/en-US/messages.json +1 -0
- package/es/locale/id-ID/messages.json +3 -2
- package/es/locale/locale-provider.js +2 -2
- package/es/locale/th-TH/messages.json +3 -2
- package/es/locale/vi-VN/messages.json +3 -2
- package/es/locale/zh-CN/messages.json +3 -2
- package/es/login-page/index.js +16 -16
- package/es/media/index.js +15 -15
- package/es/media/media.js +8 -8
- package/es/media/preview.js +6 -6
- package/es/mobile-insurer-detail/index.js +18 -18
- package/es/mobile-insurer-list/index.js +11 -11
- package/es/modal/index.js +8 -8
- package/es/platform/platform-card/index.js +5 -5
- package/es/platform/switch-platform/index.js +12 -12
- package/es/policy-list/index.js +4 -4
- package/es/policy-list/policy-card.js +32 -32
- package/es/radio/index.d.ts +2 -1
- package/es/radio/index.js +13 -12
- package/es/radio/radio-group-with-other.d.ts +6 -0
- package/es/radio/radio-group-with-other.js +85 -0
- package/es/select/attached-select.js +17 -20
- package/es/select/select.js +6 -9
- package/es/select/time-select.js +20 -20
- package/es/status-box/index.js +2 -2
- package/es/table/index.js +33 -33
- package/es/tabs/index.js +1 -1
- package/es/typography/index.js +10 -3
- package/es/upload/index.js +28 -28
- package/es/upload-photo/index.js +30 -34
- package/es/upload-photo/media.js +4 -4
- package/es/upload-preview/index.js +10 -10
- package/es/upload-preview/media.js +8 -8
- package/es/utils/form-utils.d.ts +1 -1
- package/es/utils/form-utils.js +11 -11
- package/lib/admin-upload/float.js +14 -14
- package/lib/admin-upload/index.js +11 -11
- package/lib/admin-upload/job-list.js +47 -47
- package/lib/admin-upload/modal.js +10 -10
- package/lib/alert-message/index.js +7 -7
- package/lib/amount/index.js +2 -2
- package/lib/back-top/index.js +4 -4
- package/lib/button/index.js +9 -9
- package/lib/card-detail/card-group.js +6 -6
- package/lib/card-detail/card-item.js +5 -5
- package/lib/card-detail/card-page.js +5 -5
- package/lib/card-detail/card.js +7 -7
- package/lib/checkbox/index.js +6 -6
- package/lib/claim-list/index.js +19 -19
- package/lib/confirmation/index.js +4 -4
- package/lib/date-picker/buddhist.js +2 -2
- package/lib/date-picker/index.js +9 -9
- package/lib/declaration/index.js +5 -5
- package/lib/detail-panel/index.js +26 -26
- package/lib/documents/index.js +2 -2
- package/lib/example/index.js +5 -5
- package/lib/filter/checkBox.js +10 -10
- package/lib/filter/customize.js +1 -1
- package/lib/filter/index.js +43 -43
- package/lib/filter/radioBox.js +7 -7
- package/lib/filter/rangePicker.js +23 -23
- package/lib/filter/style/index.less +10 -2
- package/lib/form/addable-section/index.js +37 -17
- package/lib/form/addable-section/style/index.less +6 -10
- package/lib/form/divider/index.js +1 -1
- package/lib/form/element/index.js +17 -17
- package/lib/form/elements.js +6 -2
- package/lib/form/index.js +7 -7
- package/lib/form/login/index.js +6 -6
- package/lib/form/page/index.js +8 -8
- package/lib/form/pages/index.js +10 -10
- package/lib/form/render/index.js +1 -1
- package/lib/form/section/index.js +4 -4
- package/lib/form/step/index.js +14 -14
- package/lib/form/steps/index.js +2 -2
- package/lib/free-form/addable-section/index.js +33 -13
- package/lib/free-form/addable-section/style/index.less +0 -4
- package/lib/free-form/element/index.js +10 -10
- package/lib/free-form/index.js +3 -3
- package/lib/free-form/page/index.js +15 -15
- package/lib/free-form/pages/index.js +2 -2
- package/lib/free-form/section/index.js +4 -4
- package/lib/free-form/step/index.js +14 -14
- package/lib/free-form/steps/index.js +2 -2
- package/lib/global-message/index.js +12 -12
- package/lib/home-menu/index.js +18 -18
- package/lib/index.d.ts +1 -1
- package/lib/index.js +7 -0
- package/lib/input/amount.js +2 -2
- package/lib/input/credit-card.js +4 -4
- package/lib/input/email.js +1 -1
- package/lib/input/expiry-date.js +3 -3
- package/lib/input/input-date.js +3 -3
- package/lib/input/input-number.js +1 -1
- package/lib/input/input.js +1 -1
- package/lib/input/otp.js +6 -6
- package/lib/input/password.js +4 -4
- package/lib/input/phone-number.js +4 -4
- package/lib/input/text-area.js +4 -4
- package/lib/layout/defaultFooter.js +28 -28
- package/lib/layout/defaultHeader.js +6 -6
- package/lib/layout/footer.js +66 -66
- package/lib/layout/header.js +25 -25
- package/lib/layout/index.js +4 -4
- package/lib/locale/en-US/messages.json +1 -0
- package/lib/locale/id-ID/messages.json +3 -2
- package/lib/locale/locale-provider.js +2 -2
- package/lib/locale/th-TH/messages.json +3 -2
- package/lib/locale/vi-VN/messages.json +3 -2
- package/lib/locale/zh-CN/messages.json +3 -2
- package/lib/login-page/index.js +16 -16
- package/lib/media/index.js +15 -15
- package/lib/media/media.js +8 -8
- package/lib/media/preview.js +6 -6
- package/lib/mobile-insurer-detail/index.js +18 -18
- package/lib/mobile-insurer-list/index.js +11 -11
- package/lib/modal/index.js +8 -8
- package/lib/platform/platform-card/index.js +5 -5
- package/lib/platform/switch-platform/index.js +12 -12
- package/lib/policy-list/index.js +4 -4
- package/lib/policy-list/policy-card.js +32 -32
- package/lib/radio/index.d.ts +2 -1
- package/lib/radio/index.js +21 -12
- package/lib/radio/radio-group-with-other.d.ts +6 -0
- package/lib/radio/radio-group-with-other.js +98 -0
- package/lib/select/attached-select.js +16 -19
- package/lib/select/select.js +5 -8
- package/lib/select/time-select.js +20 -20
- package/lib/status-box/index.js +2 -2
- package/lib/table/index.js +33 -33
- package/lib/tabs/index.js +1 -1
- package/lib/typography/index.js +10 -3
- package/lib/upload/index.js +28 -28
- package/lib/upload-photo/index.js +30 -34
- package/lib/upload-photo/media.js +4 -4
- package/lib/upload-preview/index.js +10 -10
- package/lib/upload-preview/media.js +8 -8
- package/lib/utils/form-utils.d.ts +1 -1
- package/lib/utils/form-utils.js +10 -10
- package/package.json +1 -1
|
@@ -134,23 +134,23 @@ var PolicyCard = function PolicyCard(props) {
|
|
|
134
134
|
className: (0, _classnames.default)({
|
|
135
135
|
'hide-icon': !extend
|
|
136
136
|
})
|
|
137
|
-
}
|
|
137
|
+
}), (0, _jsxRuntime.jsx)(_iglooicon.ArrowDownOutlined, {
|
|
138
138
|
className: (0, _classnames.default)({
|
|
139
139
|
'hide-icon': extend
|
|
140
140
|
})
|
|
141
|
-
}
|
|
142
|
-
}
|
|
141
|
+
})]
|
|
142
|
+
}), (0, _jsxRuntime.jsx)("div", {
|
|
143
143
|
className: "left-logo-container",
|
|
144
144
|
children: insurerLogo
|
|
145
|
-
}
|
|
145
|
+
}), (0, _jsxRuntime.jsxs)(_typography.default, {
|
|
146
146
|
level: "h4",
|
|
147
147
|
className: "left-title-container",
|
|
148
148
|
children: [insurerName, " ", insurerType]
|
|
149
|
-
}
|
|
149
|
+
}), (0, _jsxRuntime.jsx)("div", {
|
|
150
150
|
className: "left-status",
|
|
151
|
-
children: (0, _jsxRuntime.jsx)(_statusBox.default, _objectSpread({}, statusProps)
|
|
152
|
-
}
|
|
153
|
-
}
|
|
151
|
+
children: (0, _jsxRuntime.jsx)(_statusBox.default, _objectSpread({}, statusProps))
|
|
152
|
+
})]
|
|
153
|
+
}), buttons && buttons.map(function (item, index) {
|
|
154
154
|
return item.render ? item.render() : (0, _jsxRuntime.jsx)(_button.default, {
|
|
155
155
|
icon: item.icon,
|
|
156
156
|
onClick: function onClick(e) {
|
|
@@ -164,13 +164,13 @@ var PolicyCard = function PolicyCard(props) {
|
|
|
164
164
|
children: (0, _jsxRuntime.jsx)(_typography.default, {
|
|
165
165
|
level: "h4",
|
|
166
166
|
children: item.label
|
|
167
|
-
}
|
|
167
|
+
})
|
|
168
168
|
}, String(item) + index);
|
|
169
169
|
})]
|
|
170
|
-
}
|
|
170
|
+
}), messageBar && (0, _jsxRuntime.jsx)("div", {
|
|
171
171
|
className: "message-container",
|
|
172
|
-
children: (0, _jsxRuntime.jsx)(_alertMessage.default, _objectSpread({}, messageBar)
|
|
173
|
-
}
|
|
172
|
+
children: (0, _jsxRuntime.jsx)(_alertMessage.default, _objectSpread({}, messageBar))
|
|
173
|
+
}), defaultItems && (0, _jsxRuntime.jsx)("div", {
|
|
174
174
|
className: "container-bottom",
|
|
175
175
|
children: (0, _jsxRuntime.jsx)(_row.default, {
|
|
176
176
|
gutter: [24, 32],
|
|
@@ -194,8 +194,8 @@ var PolicyCard = function PolicyCard(props) {
|
|
|
194
194
|
children: (0, _jsxRuntime.jsx)(_typography.default, {
|
|
195
195
|
level: "body1",
|
|
196
196
|
children: title
|
|
197
|
-
}
|
|
198
|
-
}
|
|
197
|
+
})
|
|
198
|
+
}), textArr.map(function (textItem, index) {
|
|
199
199
|
var text = textItem.text,
|
|
200
200
|
link = textItem.link;
|
|
201
201
|
|
|
@@ -205,7 +205,7 @@ var PolicyCard = function PolicyCard(props) {
|
|
|
205
205
|
children: (0, _jsxRuntime.jsx)(_typography.default, {
|
|
206
206
|
level: "body1",
|
|
207
207
|
children: textItem
|
|
208
|
-
}
|
|
208
|
+
})
|
|
209
209
|
}, index);
|
|
210
210
|
} // 处理link (一个or多个,换行or不换行)
|
|
211
211
|
|
|
@@ -220,13 +220,13 @@ var PolicyCard = function PolicyCard(props) {
|
|
|
220
220
|
children: [(0, _jsxRuntime.jsx)(_typography.default, {
|
|
221
221
|
level: "body1",
|
|
222
222
|
children: text
|
|
223
|
-
}
|
|
223
|
+
}), (0, _jsxRuntime.jsx)(_button.default, {
|
|
224
224
|
onClick: onClick ? function () {
|
|
225
225
|
return onClick(props);
|
|
226
226
|
} : function () {},
|
|
227
227
|
type: "link",
|
|
228
228
|
children: link.linkText
|
|
229
|
-
}
|
|
229
|
+
})]
|
|
230
230
|
}, index);
|
|
231
231
|
}
|
|
232
232
|
|
|
@@ -235,7 +235,7 @@ var PolicyCard = function PolicyCard(props) {
|
|
|
235
235
|
children: [(0, _jsxRuntime.jsx)(_typography.default, {
|
|
236
236
|
level: "body1",
|
|
237
237
|
children: text
|
|
238
|
-
}
|
|
238
|
+
}), linkArr.map(function (linkObj, index) {
|
|
239
239
|
var onClick = linkObj.onClick;
|
|
240
240
|
return (0, _jsxRuntime.jsx)("div", {
|
|
241
241
|
style: {
|
|
@@ -247,15 +247,15 @@ var PolicyCard = function PolicyCard(props) {
|
|
|
247
247
|
} : function () {},
|
|
248
248
|
type: "link",
|
|
249
249
|
children: linkObj.linkText
|
|
250
|
-
}
|
|
250
|
+
})
|
|
251
251
|
}, index);
|
|
252
252
|
})]
|
|
253
253
|
}, index);
|
|
254
254
|
})]
|
|
255
255
|
}, index);
|
|
256
256
|
})
|
|
257
|
-
}
|
|
258
|
-
}
|
|
257
|
+
})
|
|
258
|
+
}), (0, _jsxRuntime.jsx)(_collapse.default, {
|
|
259
259
|
className: "igloo-policy-collapse-container",
|
|
260
260
|
activeKey: extend ? allActiveKeys : [],
|
|
261
261
|
children: infoGroups.map(function (group, index) {
|
|
@@ -269,7 +269,7 @@ var PolicyCard = function PolicyCard(props) {
|
|
|
269
269
|
level: "h4",
|
|
270
270
|
className: "panel-group-section-name",
|
|
271
271
|
children: sectionName
|
|
272
|
-
}
|
|
272
|
+
}), (0, _jsxRuntime.jsx)(_row.default, {
|
|
273
273
|
gutter: [24, 16],
|
|
274
274
|
children: infoItems.map(function (item, index) {
|
|
275
275
|
var _item$span = item.span,
|
|
@@ -290,8 +290,8 @@ var PolicyCard = function PolicyCard(props) {
|
|
|
290
290
|
children: (0, _jsxRuntime.jsx)(_typography.default, {
|
|
291
291
|
level: "body1",
|
|
292
292
|
children: title
|
|
293
|
-
}
|
|
294
|
-
}
|
|
293
|
+
})
|
|
294
|
+
}), textArr.map(function (textItem, index) {
|
|
295
295
|
var text = textItem.text,
|
|
296
296
|
link = textItem.link;
|
|
297
297
|
|
|
@@ -301,7 +301,7 @@ var PolicyCard = function PolicyCard(props) {
|
|
|
301
301
|
children: (0, _jsxRuntime.jsx)(_typography.default, {
|
|
302
302
|
level: "body1",
|
|
303
303
|
children: textItem
|
|
304
|
-
}
|
|
304
|
+
})
|
|
305
305
|
}, index);
|
|
306
306
|
} // 处理link (一个or多个,换行or不换行)
|
|
307
307
|
|
|
@@ -316,13 +316,13 @@ var PolicyCard = function PolicyCard(props) {
|
|
|
316
316
|
children: [(0, _jsxRuntime.jsx)(_typography.default, {
|
|
317
317
|
level: "body1",
|
|
318
318
|
children: text
|
|
319
|
-
}
|
|
319
|
+
}), (0, _jsxRuntime.jsx)(_button.default, {
|
|
320
320
|
onClick: onClick ? function () {
|
|
321
321
|
return onClick(props);
|
|
322
322
|
} : function () {},
|
|
323
323
|
type: "link",
|
|
324
324
|
children: link.linkText
|
|
325
|
-
}
|
|
325
|
+
})]
|
|
326
326
|
}, index);
|
|
327
327
|
}
|
|
328
328
|
|
|
@@ -331,7 +331,7 @@ var PolicyCard = function PolicyCard(props) {
|
|
|
331
331
|
children: [(0, _jsxRuntime.jsx)(_typography.default, {
|
|
332
332
|
level: "body1",
|
|
333
333
|
children: text
|
|
334
|
-
}
|
|
334
|
+
}), linkArr.map(function (linkObj, index) {
|
|
335
335
|
var onClick = linkObj.onClick;
|
|
336
336
|
return (0, _jsxRuntime.jsx)("div", {
|
|
337
337
|
style: {
|
|
@@ -343,18 +343,18 @@ var PolicyCard = function PolicyCard(props) {
|
|
|
343
343
|
} : function () {},
|
|
344
344
|
type: "link",
|
|
345
345
|
children: linkObj.linkText
|
|
346
|
-
}
|
|
346
|
+
})
|
|
347
347
|
}, index);
|
|
348
348
|
})]
|
|
349
349
|
}, index);
|
|
350
350
|
})]
|
|
351
351
|
}, index);
|
|
352
352
|
})
|
|
353
|
-
}
|
|
353
|
+
})]
|
|
354
354
|
}, index);
|
|
355
355
|
})
|
|
356
|
-
}
|
|
357
|
-
}
|
|
356
|
+
})]
|
|
357
|
+
});
|
|
358
358
|
};
|
|
359
359
|
|
|
360
360
|
var _default = PolicyCard;
|
package/lib/radio/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import './style/index.less';
|
|
|
4
4
|
import { FormInstance } from 'antd/es/form';
|
|
5
5
|
declare type Props = RadioProps & IglooComponentProps;
|
|
6
6
|
declare const IglooRadio: FC<Props>;
|
|
7
|
-
interface Option extends RadioProps {
|
|
7
|
+
export interface Option extends RadioProps {
|
|
8
8
|
extraInfo?: {
|
|
9
9
|
content: any;
|
|
10
10
|
shownTrigger: 'unchecked' | 'checked' | 'all';
|
|
@@ -19,3 +19,4 @@ export interface IProps extends IglooComponentProps, Omit<RadioGroupProps, 'opti
|
|
|
19
19
|
}
|
|
20
20
|
export declare const RadioGroup: FC<IProps>;
|
|
21
21
|
export default IglooRadio;
|
|
22
|
+
export { default as RadioGroupWithOther } from './radio-group-with-other';
|
package/lib/radio/index.js
CHANGED
|
@@ -3,7 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.RadioGroup = void 0;
|
|
7
|
+
Object.defineProperty(exports, "RadioGroupWithOther", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _radioGroupWithOther.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
exports.default = void 0;
|
|
7
14
|
|
|
8
15
|
require("antd/es/col/style");
|
|
9
16
|
|
|
@@ -31,6 +38,8 @@ require("./style/index.less");
|
|
|
31
38
|
|
|
32
39
|
var _typography = _interopRequireDefault(require("../typography"));
|
|
33
40
|
|
|
41
|
+
var _radioGroupWithOther = _interopRequireDefault(require("./radio-group-with-other"));
|
|
42
|
+
|
|
34
43
|
var _excluded = ["className", "options", "radioType", "getOptions", "value"],
|
|
35
44
|
_excluded2 = ["label", "value", "extraInfo"];
|
|
36
45
|
|
|
@@ -47,7 +56,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
47
56
|
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; }
|
|
48
57
|
|
|
49
58
|
var IglooRadio = function IglooRadio(props) {
|
|
50
|
-
return (0, _jsxRuntime.jsx)(_radio.default, _objectSpread({}, (0, _omit.default)(props, _formMethods.default))
|
|
59
|
+
return (0, _jsxRuntime.jsx)(_radio.default, _objectSpread({}, (0, _omit.default)(props, _formMethods.default)));
|
|
51
60
|
};
|
|
52
61
|
|
|
53
62
|
IglooRadio.formItemPropsHandler = function () {
|
|
@@ -102,11 +111,11 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
102
111
|
children: (0, _jsxRuntime.jsx)(_typography.default, {
|
|
103
112
|
level: "body1",
|
|
104
113
|
children: label
|
|
105
|
-
}
|
|
106
|
-
})
|
|
114
|
+
})
|
|
115
|
+
})), (0, _jsxRuntime.jsx)("div", {
|
|
107
116
|
className: "igloo-radio-extra",
|
|
108
117
|
children: extraInfo && (extraInfo.shownTrigger === 'all' || extraInfo.shownTrigger === 'checked' && value === key || extraInfo.shownTrigger === 'unchecked' && value !== key) && extraInfo.content
|
|
109
|
-
}
|
|
118
|
+
})]
|
|
110
119
|
}, key) : (0, _jsxRuntime.jsx)(_col.default, {
|
|
111
120
|
span: 12,
|
|
112
121
|
className: 'igloo-radio-group-button',
|
|
@@ -120,17 +129,17 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
120
129
|
children: (0, _jsxRuntime.jsx)(_typography.default, {
|
|
121
130
|
level: "body1",
|
|
122
131
|
children: label
|
|
123
|
-
}
|
|
124
|
-
}
|
|
132
|
+
})
|
|
133
|
+
}), (0, _jsxRuntime.jsx)(_radio.default, {
|
|
125
134
|
value: key,
|
|
126
135
|
className: 'igloo-radio-inner-radio'
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
})
|
|
136
|
+
})]
|
|
137
|
+
})
|
|
138
|
+
}))
|
|
130
139
|
}, key);
|
|
131
140
|
})
|
|
132
|
-
}
|
|
133
|
-
})
|
|
141
|
+
})
|
|
142
|
+
}));
|
|
134
143
|
};
|
|
135
144
|
|
|
136
145
|
exports.RadioGroup = RadioGroup;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
|
|
10
|
+
var _react = require("react");
|
|
11
|
+
|
|
12
|
+
var _index = require("./index");
|
|
13
|
+
|
|
14
|
+
var _input = require("../input");
|
|
15
|
+
|
|
16
|
+
var _locale = require("../locale");
|
|
17
|
+
|
|
18
|
+
var _excluded = ["value", "onChange", "options", "otherOptionLabel"];
|
|
19
|
+
|
|
20
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
21
|
+
|
|
22
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
23
|
+
|
|
24
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
25
|
+
|
|
26
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
27
|
+
|
|
28
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
29
|
+
|
|
30
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
31
|
+
|
|
32
|
+
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; }
|
|
33
|
+
|
|
34
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
35
|
+
|
|
36
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
37
|
+
|
|
38
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
39
|
+
|
|
40
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
41
|
+
|
|
42
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
43
|
+
|
|
44
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
45
|
+
|
|
46
|
+
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; }
|
|
47
|
+
|
|
48
|
+
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; }
|
|
49
|
+
|
|
50
|
+
var otherKey = 'iglooRadioGroupOther';
|
|
51
|
+
|
|
52
|
+
var RadioGroupWithOther = function RadioGroupWithOther(_ref) {
|
|
53
|
+
var value = _ref.value,
|
|
54
|
+
onChange = _ref.onChange,
|
|
55
|
+
options = _ref.options,
|
|
56
|
+
otherOptionLabel = _ref.otherOptionLabel,
|
|
57
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
58
|
+
|
|
59
|
+
var _useState = (0, _react.useState)(false),
|
|
60
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
61
|
+
otherEnabled = _useState2[0],
|
|
62
|
+
enableOther = _useState2[1];
|
|
63
|
+
|
|
64
|
+
var handleChange = function handleChange(e) {
|
|
65
|
+
onChange && onChange(e);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
var handleRadioChange = function handleRadioChange(e) {
|
|
69
|
+
enableOther(e.target.value === otherKey);
|
|
70
|
+
onChange && onChange(e);
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
var _useContext = (0, _react.useContext)(_locale.LocaleContext),
|
|
74
|
+
formatMessage = _useContext.formatMessage;
|
|
75
|
+
|
|
76
|
+
return (0, _jsxRuntime.jsx)("div", {
|
|
77
|
+
className: "igloo-reason-selector",
|
|
78
|
+
children: (0, _jsxRuntime.jsx)(_index.RadioGroup, _objectSpread({
|
|
79
|
+
value: otherEnabled ? otherKey : value,
|
|
80
|
+
onChange: handleRadioChange,
|
|
81
|
+
options: [].concat(_toConsumableArray(options), [{
|
|
82
|
+
label: otherOptionLabel || formatMessage({
|
|
83
|
+
id: 'Other Reason'
|
|
84
|
+
}),
|
|
85
|
+
value: otherKey,
|
|
86
|
+
extraInfo: {
|
|
87
|
+
content: (0, _jsxRuntime.jsx)(_input.TextArea, {
|
|
88
|
+
onChange: handleChange
|
|
89
|
+
}),
|
|
90
|
+
shownTrigger: 'checked'
|
|
91
|
+
}
|
|
92
|
+
}])
|
|
93
|
+
}, rest))
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
var _default = RadioGroupWithOther;
|
|
98
|
+
exports.default = _default;
|
|
@@ -246,10 +246,7 @@ var IglooSelect = function IglooSelect(_ref) {
|
|
|
246
246
|
}
|
|
247
247
|
}, (0, _omit.default)(rest, _formMethods.default)), {}, {
|
|
248
248
|
value: selected,
|
|
249
|
-
suffixIcon: (0, _jsxRuntime.jsxs)(
|
|
250
|
-
style: {
|
|
251
|
-
position: 'relative'
|
|
252
|
-
},
|
|
249
|
+
suffixIcon: (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
253
250
|
children: [(0, _jsxRuntime.jsx)(_iglooicon.ArrowDownOutlined, {
|
|
254
251
|
className: (0, _classnames.default)({
|
|
255
252
|
'igloo-select-arrow': true,
|
|
@@ -258,7 +255,7 @@ var IglooSelect = function IglooSelect(_ref) {
|
|
|
258
255
|
style: {
|
|
259
256
|
opacity: dropVisible ? 0 : 1
|
|
260
257
|
}
|
|
261
|
-
}
|
|
258
|
+
}), (0, _jsxRuntime.jsx)(_iglooicon.ArrowUpOutlined, {
|
|
262
259
|
className: (0, _classnames.default)({
|
|
263
260
|
'igloo-select-arrow': true,
|
|
264
261
|
'igloo-select-arrow-active': dropVisible
|
|
@@ -266,8 +263,8 @@ var IglooSelect = function IglooSelect(_ref) {
|
|
|
266
263
|
style: {
|
|
267
264
|
opacity: dropVisible ? 1 : 0
|
|
268
265
|
}
|
|
269
|
-
}
|
|
270
|
-
}
|
|
266
|
+
})]
|
|
267
|
+
}),
|
|
271
268
|
className: (0, _classnames.default)('igloo-attached-select', {
|
|
272
269
|
'igloo-attached-select-open-status': dropVisible
|
|
273
270
|
}),
|
|
@@ -297,12 +294,12 @@ var IglooSelect = function IglooSelect(_ref) {
|
|
|
297
294
|
style: {
|
|
298
295
|
fontSize: 24
|
|
299
296
|
}
|
|
300
|
-
}
|
|
297
|
+
}),
|
|
301
298
|
onKeyDown: function onKeyDown(e) {
|
|
302
299
|
return e.stopPropagation();
|
|
303
300
|
}
|
|
304
|
-
}
|
|
305
|
-
}
|
|
301
|
+
})
|
|
302
|
+
}), (0, _jsxRuntime.jsxs)("div", {
|
|
306
303
|
className: "igloo-attached-select-multiple-dropdown-buttons",
|
|
307
304
|
children: [(0, _jsxRuntime.jsx)(_button.default, {
|
|
308
305
|
type: "link",
|
|
@@ -314,7 +311,7 @@ var IglooSelect = function IglooSelect(_ref) {
|
|
|
314
311
|
children: formatMessage({
|
|
315
312
|
id: 'Select All'
|
|
316
313
|
})
|
|
317
|
-
}
|
|
314
|
+
}), (0, _jsxRuntime.jsx)(_button.default, {
|
|
318
315
|
type: "link",
|
|
319
316
|
onClick: clearAll,
|
|
320
317
|
disabled: displayOptions.every(function (_ref7) {
|
|
@@ -324,9 +321,9 @@ var IglooSelect = function IglooSelect(_ref) {
|
|
|
324
321
|
children: formatMessage({
|
|
325
322
|
id: 'Clear All'
|
|
326
323
|
})
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
}
|
|
324
|
+
})]
|
|
325
|
+
}), originNode]
|
|
326
|
+
});
|
|
330
327
|
},
|
|
331
328
|
maxTagCount: 0,
|
|
332
329
|
maxTagPlaceholder: function maxTagPlaceholder(values) {
|
|
@@ -356,8 +353,8 @@ var IglooSelect = function IglooSelect(_ref) {
|
|
|
356
353
|
style: {
|
|
357
354
|
marginRight: 8
|
|
358
355
|
}
|
|
359
|
-
}
|
|
360
|
-
}
|
|
356
|
+
}), label]
|
|
357
|
+
}) : label, (0, _jsxRuntime.jsx)("div", {
|
|
361
358
|
style: {
|
|
362
359
|
position: 'absolute',
|
|
363
360
|
width: '100%',
|
|
@@ -366,11 +363,11 @@ var IglooSelect = function IglooSelect(_ref) {
|
|
|
366
363
|
top: 0,
|
|
367
364
|
left: 0
|
|
368
365
|
}
|
|
369
|
-
}
|
|
366
|
+
})]
|
|
370
367
|
}, value);
|
|
371
368
|
})
|
|
372
|
-
})
|
|
373
|
-
}
|
|
369
|
+
}))
|
|
370
|
+
});
|
|
374
371
|
};
|
|
375
372
|
|
|
376
373
|
IglooSelect.formItemPropsHandler = function (config) {
|
package/lib/select/select.js
CHANGED
|
@@ -83,10 +83,7 @@ var IglooSelect = function IglooSelect(_ref) {
|
|
|
83
83
|
}, (0, _omit.default)(rest, _formMethods.default)), {}, {
|
|
84
84
|
options: children ? void 0 : options,
|
|
85
85
|
value: value,
|
|
86
|
-
suffixIcon: (0, _jsxRuntime.jsxs)(
|
|
87
|
-
style: {
|
|
88
|
-
position: 'relative'
|
|
89
|
-
},
|
|
86
|
+
suffixIcon: (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
90
87
|
children: [(0, _jsxRuntime.jsx)(_iglooicon.ArrowDownOutlined, {
|
|
91
88
|
className: (0, _classnames.default)({
|
|
92
89
|
'igloo-select-arrow': true,
|
|
@@ -95,7 +92,7 @@ var IglooSelect = function IglooSelect(_ref) {
|
|
|
95
92
|
style: {
|
|
96
93
|
opacity: isOpen ? 0 : 1
|
|
97
94
|
}
|
|
98
|
-
}
|
|
95
|
+
}), (0, _jsxRuntime.jsx)(_iglooicon.ArrowUpOutlined, {
|
|
99
96
|
className: (0, _classnames.default)({
|
|
100
97
|
'igloo-select-arrow': true,
|
|
101
98
|
'igloo-select-arrow-active': isOpen
|
|
@@ -103,8 +100,8 @@ var IglooSelect = function IglooSelect(_ref) {
|
|
|
103
100
|
style: {
|
|
104
101
|
opacity: isOpen ? 1 : 0
|
|
105
102
|
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
103
|
+
})]
|
|
104
|
+
}),
|
|
108
105
|
getPopupContainer: function getPopupContainer(trigger) {
|
|
109
106
|
return trigger.parentNode;
|
|
110
107
|
},
|
|
@@ -121,7 +118,7 @@ var IglooSelect = function IglooSelect(_ref) {
|
|
|
121
118
|
} : void 0),
|
|
122
119
|
mode: undefined,
|
|
123
120
|
children: children
|
|
124
|
-
})
|
|
121
|
+
}));
|
|
125
122
|
};
|
|
126
123
|
|
|
127
124
|
IglooSelect.OptGroup = OptGroup;
|
|
@@ -221,57 +221,57 @@ var IglooTimeSelect = function IglooTimeSelect(props) {
|
|
|
221
221
|
onClick: function onClick() {
|
|
222
222
|
return handleTimeSwitchButton(hourRange, hourValue, setHourVale, 'down');
|
|
223
223
|
}
|
|
224
|
-
}
|
|
224
|
+
}), (0, _jsxRuntime.jsx)(_index.default, {
|
|
225
225
|
onChange: function onChange(e) {
|
|
226
226
|
return handleTimeInput(hourRange, e.target.value, setHourVale);
|
|
227
227
|
},
|
|
228
228
|
value: hourValue
|
|
229
|
-
}
|
|
229
|
+
}), (0, _jsxRuntime.jsx)(_iglooicon.ArrowDownOutlined, {
|
|
230
230
|
onClick: function onClick() {
|
|
231
231
|
return handleTimeSwitchButton(hourRange, hourValue, setHourVale, 'up');
|
|
232
232
|
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
233
|
+
})]
|
|
234
|
+
}), (0, _jsxRuntime.jsx)("span", {
|
|
235
235
|
children: ":"
|
|
236
|
-
}
|
|
236
|
+
}), (0, _jsxRuntime.jsxs)("div", {
|
|
237
237
|
children: [(0, _jsxRuntime.jsx)(_iglooicon.ArrowUpOutlined, {
|
|
238
238
|
onClick: function onClick() {
|
|
239
239
|
return handleTimeSwitchButton(minuteRange, minuteValue, setMinuteVale, 'down');
|
|
240
240
|
}
|
|
241
|
-
}
|
|
241
|
+
}), (0, _jsxRuntime.jsx)(_index.default, {
|
|
242
242
|
ref: secondInputRef,
|
|
243
243
|
onChange: function onChange(e) {
|
|
244
244
|
return handleTimeInput(minuteRange, e.target.value, setMinuteVale);
|
|
245
245
|
},
|
|
246
246
|
value: minuteValue
|
|
247
|
-
}
|
|
247
|
+
}), (0, _jsxRuntime.jsx)(_iglooicon.ArrowDownOutlined, {
|
|
248
248
|
onClick: function onClick() {
|
|
249
249
|
return handleTimeSwitchButton(minuteRange, minuteValue, setMinuteVale, 'up');
|
|
250
250
|
}
|
|
251
|
-
}
|
|
252
|
-
}
|
|
251
|
+
})]
|
|
252
|
+
}), (0, _jsxRuntime.jsxs)("div", {
|
|
253
253
|
children: [(0, _jsxRuntime.jsx)(_iglooicon.ArrowUpOutlined, {
|
|
254
254
|
className: (0, _classnames.default)({// 'igloo-hour-select-meridiem-disable': meridiemDisable,
|
|
255
255
|
}),
|
|
256
256
|
onClick: function onClick() {
|
|
257
257
|
return meridiemSwitch(hourValue);
|
|
258
258
|
}
|
|
259
|
-
}
|
|
259
|
+
}), (0, _jsxRuntime.jsx)("span", {
|
|
260
260
|
children: (0, _jsxRuntime.jsx)(_typography.default, {
|
|
261
261
|
level: "body1",
|
|
262
262
|
children: meridiem ? 'AM' : 'PM'
|
|
263
|
-
}
|
|
264
|
-
}
|
|
263
|
+
})
|
|
264
|
+
}), (0, _jsxRuntime.jsx)(_iglooicon.ArrowDownOutlined, {
|
|
265
265
|
className: (0, _classnames.default)({// 'igloo-hour-select-meridiem-disable': meridiemDisable,
|
|
266
266
|
}),
|
|
267
267
|
onClick: function onClick() {
|
|
268
268
|
return meridiemSwitch(hourValue);
|
|
269
269
|
}
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
}
|
|
270
|
+
})]
|
|
271
|
+
})]
|
|
272
|
+
})
|
|
273
273
|
}, '0')
|
|
274
|
-
}
|
|
274
|
+
});
|
|
275
275
|
return (0, _jsxRuntime.jsxs)("div", {
|
|
276
276
|
className: "igloo-hour-select",
|
|
277
277
|
ref: topDomRef,
|
|
@@ -291,13 +291,13 @@ var IglooTimeSelect = function IglooTimeSelect(props) {
|
|
|
291
291
|
className: (0, _classnames.default)('igloo-input', {
|
|
292
292
|
'igloo-hour-select-input-active': dropDownVisible
|
|
293
293
|
})
|
|
294
|
-
}
|
|
295
|
-
}
|
|
294
|
+
})
|
|
295
|
+
}), (0, _jsxRuntime.jsx)(_iglooicon.TimeOutlined, {
|
|
296
296
|
className: (0, _classnames.default)({
|
|
297
297
|
'igloo-hour-select-active': dropDownVisible
|
|
298
298
|
})
|
|
299
|
-
}
|
|
300
|
-
}
|
|
299
|
+
})]
|
|
300
|
+
});
|
|
301
301
|
};
|
|
302
302
|
|
|
303
303
|
function checkCard(value) {
|
package/lib/status-box/index.js
CHANGED