iglooform 2.4.6 → 2.4.10
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/button/style/index.less +11 -25
- 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/style/index.less +13 -0
- 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/addable-section/index.d.ts +14 -0
- package/es/form/addable-section/index.js +188 -0
- package/es/form/addable-section/style/index.d.ts +1 -0
- package/es/form/addable-section/style/index.js +1 -0
- package/es/form/addable-section/style/index.less +22 -0
- package/es/form/divider/index.js +7 -1
- package/es/form/element/index.js +39 -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 +9 -9
- package/es/free-form/addable-section/index.d.ts +13 -0
- package/es/free-form/addable-section/index.js +263 -0
- package/es/free-form/addable-section/style/index.d.ts +1 -0
- package/es/free-form/addable-section/style/index.js +1 -0
- package/es/free-form/addable-section/style/index.less +22 -0
- 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.d.ts +1 -0
- package/es/free-form/steps/index.js +8 -8
- package/es/home-menu/index.js +52 -71
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- 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/style/index.less +9 -1
- 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/en-US/messages.json +2 -0
- package/es/locale/id-ID/messages.json +2 -0
- package/es/locale/locale-provider.js +6 -8
- package/es/locale/th-TH/messages.json +2 -0
- package/es/locale/vi-VN/messages.json +2 -0
- package/es/locale/zh-CN/messages.json +2 -0
- 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/upload-preview/style/index.less +2 -2
- package/es/utils/form-utils.js +19 -26
- 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/button/style/index.less +11 -25
- 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/style/index.less +13 -0
- 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/addable-section/index.d.ts +14 -0
- package/lib/form/addable-section/index.js +209 -0
- package/lib/form/addable-section/style/index.d.ts +1 -0
- package/lib/form/addable-section/style/index.js +3 -0
- package/lib/form/addable-section/style/index.less +22 -0
- package/lib/form/divider/index.js +7 -1
- package/lib/form/element/index.js +40 -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 +9 -9
- package/lib/free-form/addable-section/index.d.ts +13 -0
- package/lib/free-form/addable-section/index.js +283 -0
- package/lib/free-form/addable-section/style/index.d.ts +1 -0
- package/lib/free-form/addable-section/style/index.js +3 -0
- package/lib/free-form/addable-section/style/index.less +22 -0
- 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.d.ts +1 -0
- package/lib/free-form/steps/index.js +8 -8
- package/lib/home-menu/index.js +52 -71
- package/lib/index.d.ts +1 -0
- package/lib/index.js +140 -131
- 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/style/index.less +9 -1
- 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/en-US/messages.json +2 -0
- package/lib/locale/format-message.js +1 -1
- package/lib/locale/id-ID/messages.json +2 -0
- package/lib/locale/index.js +4 -4
- package/lib/locale/locale-provider.js +7 -9
- package/lib/locale/th-TH/messages.json +2 -0
- package/lib/locale/vi-VN/messages.json +2 -0
- package/lib/locale/zh-CN/messages.json +2 -0
- 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/upload-preview/style/index.less +2 -2
- package/lib/utils/form-utils.js +20 -27
- package/package.json +1 -1
package/lib/media/media.js
CHANGED
|
@@ -31,18 +31,17 @@ var MediaItem = function MediaItem(_ref) {
|
|
|
31
31
|
}, void 0);
|
|
32
32
|
|
|
33
33
|
case 'pdf':
|
|
34
|
-
return (0, _jsxRuntime.jsx)("div",
|
|
34
|
+
return (0, _jsxRuntime.jsx)("div", {
|
|
35
35
|
style: {
|
|
36
36
|
maxWidth: 80,
|
|
37
37
|
maxHeight: 80,
|
|
38
38
|
position: 'absolute'
|
|
39
|
-
}
|
|
40
|
-
}, {
|
|
39
|
+
},
|
|
41
40
|
children: (0, _jsxRuntime.jsx)(_reactPdf.default, {
|
|
42
41
|
file: src,
|
|
43
42
|
scale: 0.1
|
|
44
43
|
}, void 0)
|
|
45
|
-
}
|
|
44
|
+
}, void 0);
|
|
46
45
|
|
|
47
46
|
default:
|
|
48
47
|
return (0, _jsxRuntime.jsx)("img", {
|
|
@@ -61,11 +60,10 @@ var Media = function Media(_ref2) {
|
|
|
61
60
|
name = _ref2.name,
|
|
62
61
|
type = _ref2.type,
|
|
63
62
|
onClick = _ref2.onClick;
|
|
64
|
-
return (0, _jsxRuntime.jsx)(_tooltip.default,
|
|
63
|
+
return (0, _jsxRuntime.jsx)(_tooltip.default, {
|
|
65
64
|
title: name,
|
|
66
|
-
placement: "bottom"
|
|
67
|
-
|
|
68
|
-
children: (0, _jsxRuntime.jsxs)("div", Object.assign({
|
|
65
|
+
placement: "bottom",
|
|
66
|
+
children: (0, _jsxRuntime.jsxs)("div", {
|
|
69
67
|
onClick: onClick,
|
|
70
68
|
style: {
|
|
71
69
|
position: 'relative',
|
|
@@ -76,8 +74,7 @@ var Media = function Media(_ref2) {
|
|
|
76
74
|
alignItems: 'center',
|
|
77
75
|
overflow: 'hidden',
|
|
78
76
|
border: '1px solid #EEEEEE'
|
|
79
|
-
}
|
|
80
|
-
}, {
|
|
77
|
+
},
|
|
81
78
|
children: [(0, _jsxRuntime.jsx)(MediaItem, {
|
|
82
79
|
type: type,
|
|
83
80
|
src: src
|
|
@@ -90,8 +87,8 @@ var Media = function Media(_ref2) {
|
|
|
90
87
|
},
|
|
91
88
|
onClick: onClick
|
|
92
89
|
}, void 0)]
|
|
93
|
-
}
|
|
94
|
-
}
|
|
90
|
+
}, void 0)
|
|
91
|
+
}, void 0);
|
|
95
92
|
};
|
|
96
93
|
|
|
97
94
|
var _default = Media;
|
package/lib/media/preview.js
CHANGED
|
@@ -63,7 +63,7 @@ var PdfViewer = function PdfViewer(_ref) {
|
|
|
63
63
|
}, i));
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
return (0, _jsxRuntime.jsx)("div",
|
|
66
|
+
return (0, _jsxRuntime.jsx)("div", {
|
|
67
67
|
style: {
|
|
68
68
|
display: 'flex',
|
|
69
69
|
flexDirection: 'column',
|
|
@@ -71,10 +71,9 @@ var PdfViewer = function PdfViewer(_ref) {
|
|
|
71
71
|
maxHeight: '100%',
|
|
72
72
|
transform: "translate(".concat(left, "px, ").concat(top, "px)"),
|
|
73
73
|
position: 'absolute'
|
|
74
|
-
}
|
|
75
|
-
}, {
|
|
74
|
+
},
|
|
76
75
|
children: pages
|
|
77
|
-
}
|
|
76
|
+
}, void 0);
|
|
78
77
|
};
|
|
79
78
|
|
|
80
79
|
var MediaItem = function MediaItem(_ref3) {
|
|
@@ -206,7 +205,7 @@ var Media = function Media(_ref4) {
|
|
|
206
205
|
});
|
|
207
206
|
};
|
|
208
207
|
|
|
209
|
-
return (0, _jsxRuntime.jsx)("div",
|
|
208
|
+
return (0, _jsxRuntime.jsx)("div", {
|
|
210
209
|
style: {
|
|
211
210
|
position: 'relative',
|
|
212
211
|
width: '100%',
|
|
@@ -218,8 +217,7 @@ var Media = function Media(_ref4) {
|
|
|
218
217
|
},
|
|
219
218
|
onMouseDown: handleMouseDown,
|
|
220
219
|
onMouseUp: handleMouseUp,
|
|
221
|
-
onMouseMove: handleMouseMove
|
|
222
|
-
}, {
|
|
220
|
+
onMouseMove: handleMouseMove,
|
|
223
221
|
children: (0, _jsxRuntime.jsx)(MediaItem, {
|
|
224
222
|
type: type,
|
|
225
223
|
src: src,
|
|
@@ -227,7 +225,7 @@ var Media = function Media(_ref4) {
|
|
|
227
225
|
offset: offset,
|
|
228
226
|
isCurrent: isCurrent
|
|
229
227
|
}, void 0)
|
|
230
|
-
}
|
|
228
|
+
}, void 0);
|
|
231
229
|
};
|
|
232
230
|
|
|
233
231
|
var _default = Media;
|
|
@@ -21,6 +21,12 @@ require("./style/index");
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
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; }
|
|
27
|
+
|
|
28
|
+
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; }
|
|
29
|
+
|
|
24
30
|
var MobileInsurerDetail = function MobileInsurerDetail(props) {
|
|
25
31
|
var insurerLogo = props.insurerLogo,
|
|
26
32
|
insurerName = props.insurerName,
|
|
@@ -33,36 +39,30 @@ var MobileInsurerDetail = function MobileInsurerDetail(props) {
|
|
|
33
39
|
style = props.style,
|
|
34
40
|
className = props.className,
|
|
35
41
|
messageBar = props.messageBar;
|
|
36
|
-
return (0, _jsxRuntime.jsxs)("div",
|
|
42
|
+
return (0, _jsxRuntime.jsxs)("div", {
|
|
37
43
|
className: (0, _classnames.default)('igloo-policy-mobile-detail-container', className),
|
|
38
|
-
style: style
|
|
39
|
-
|
|
40
|
-
children: [messageBar && (0, _jsxRuntime.jsx)(_alertMessage.default, Object.assign({}, messageBar, {
|
|
44
|
+
style: style,
|
|
45
|
+
children: [messageBar && (0, _jsxRuntime.jsx)(_alertMessage.default, _objectSpread(_objectSpread({}, messageBar), {}, {
|
|
41
46
|
style: {
|
|
42
47
|
marginBottom: 24
|
|
43
48
|
}
|
|
44
|
-
}), void 0), (0, _jsxRuntime.jsxs)("div",
|
|
45
|
-
className: "mobile-detail-top"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
className: "mobile-detail-top-insurer-logo"
|
|
49
|
-
}, {
|
|
49
|
+
}), void 0), (0, _jsxRuntime.jsxs)("div", {
|
|
50
|
+
className: "mobile-detail-top",
|
|
51
|
+
children: [insurerLogo && (0, _jsxRuntime.jsx)("div", {
|
|
52
|
+
className: "mobile-detail-top-insurer-logo",
|
|
50
53
|
children: insurerLogo
|
|
51
|
-
}
|
|
52
|
-
className: "mobile-detail-top-insurer-info"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
children: (0, _jsxRuntime.jsxs)(_typography.default, Object.assign({
|
|
58
|
-
level: "h4"
|
|
59
|
-
}, {
|
|
54
|
+
}, void 0), (0, _jsxRuntime.jsxs)("div", {
|
|
55
|
+
className: "mobile-detail-top-insurer-info",
|
|
56
|
+
children: [(0, _jsxRuntime.jsx)("div", {
|
|
57
|
+
className: "insurer-name",
|
|
58
|
+
children: (0, _jsxRuntime.jsxs)(_typography.default, {
|
|
59
|
+
level: "h4",
|
|
60
60
|
children: [insurerName, " ", insurerType]
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
return item.render ? item.render() : (0, _jsxRuntime.jsx)(_button.default,
|
|
61
|
+
}, void 0)
|
|
62
|
+
}, void 0), (0, _jsxRuntime.jsx)(_statusBox.default, _objectSpread({}, statusProps), void 0)]
|
|
63
|
+
}, void 0)]
|
|
64
|
+
}, void 0), buttons && buttons.map(function (item, index) {
|
|
65
|
+
return item.render ? item.render() : (0, _jsxRuntime.jsx)(_button.default, {
|
|
66
66
|
icon: item.icon,
|
|
67
67
|
onClick: function onClick() {
|
|
68
68
|
return item.onClick && item.onClick(props);
|
|
@@ -71,34 +71,29 @@ var MobileInsurerDetail = function MobileInsurerDetail(props) {
|
|
|
71
71
|
style: {
|
|
72
72
|
width: '100%',
|
|
73
73
|
marginBottom: "".concat(index === buttons.length - 1 ? 0 : 16, "px")
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
level: "h4"
|
|
78
|
-
}, {
|
|
74
|
+
},
|
|
75
|
+
children: (0, _jsxRuntime.jsx)(_typography.default, {
|
|
76
|
+
level: "h4",
|
|
79
77
|
children: item.label
|
|
80
|
-
}
|
|
81
|
-
}
|
|
78
|
+
}, void 0)
|
|
79
|
+
}, String(item) + index);
|
|
82
80
|
}), (0, _jsxRuntime.jsx)("div", {
|
|
83
81
|
className: "dividing-line"
|
|
84
82
|
}, void 0), infoGroups.map(function (group, index) {
|
|
85
83
|
var sectionName = group.sectionName,
|
|
86
84
|
infoItems = group.infoItems,
|
|
87
85
|
hideBottomLine = group.hideBottomLine;
|
|
88
|
-
return (0, _jsxRuntime.jsxs)("div",
|
|
86
|
+
return (0, _jsxRuntime.jsxs)("div", {
|
|
89
87
|
className: (0, _classnames.default)('policy-info-group-container', {
|
|
90
88
|
'policy-info-group-container-no-bottom-line': hideBottomLine
|
|
91
|
-
})
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
children: (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
|
|
97
|
-
level: "h4"
|
|
98
|
-
}, {
|
|
89
|
+
}),
|
|
90
|
+
children: [sectionName && (0, _jsxRuntime.jsx)("div", {
|
|
91
|
+
className: "group-section-name",
|
|
92
|
+
children: (0, _jsxRuntime.jsx)(_typography.default, {
|
|
93
|
+
level: "h4",
|
|
99
94
|
children: sectionName
|
|
100
|
-
}
|
|
101
|
-
}
|
|
95
|
+
}, void 0)
|
|
96
|
+
}, void 0), infoItems.map(function (item, index) {
|
|
102
97
|
var title = item.title,
|
|
103
98
|
info = item.info,
|
|
104
99
|
hide = item.hide;
|
|
@@ -108,31 +103,26 @@ var MobileInsurerDetail = function MobileInsurerDetail(props) {
|
|
|
108
103
|
return;
|
|
109
104
|
}
|
|
110
105
|
|
|
111
|
-
return (0, _jsxRuntime.jsxs)("div",
|
|
112
|
-
className: "group-policy-info"
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
children: (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
|
|
118
|
-
level: "body1"
|
|
119
|
-
}, {
|
|
106
|
+
return (0, _jsxRuntime.jsxs)("div", {
|
|
107
|
+
className: "group-policy-info",
|
|
108
|
+
children: [(0, _jsxRuntime.jsx)("div", {
|
|
109
|
+
className: "group-policy-info-title",
|
|
110
|
+
children: (0, _jsxRuntime.jsx)(_typography.default, {
|
|
111
|
+
level: "body1",
|
|
120
112
|
children: title
|
|
121
|
-
}
|
|
122
|
-
}
|
|
113
|
+
}, void 0)
|
|
114
|
+
}, void 0), textArr.map(function (textItem, index) {
|
|
123
115
|
var text = textItem.text,
|
|
124
116
|
link = textItem.link;
|
|
125
117
|
|
|
126
118
|
if (typeof textItem === 'string' || link === undefined || link.length === 0) {
|
|
127
|
-
return (0, _jsxRuntime.jsx)("div",
|
|
128
|
-
className: "group-policy-info-text"
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
level: "body1"
|
|
132
|
-
}, {
|
|
119
|
+
return (0, _jsxRuntime.jsx)("div", {
|
|
120
|
+
className: "group-policy-info-text",
|
|
121
|
+
children: (0, _jsxRuntime.jsx)(_typography.default, {
|
|
122
|
+
level: "body1",
|
|
133
123
|
children: textItem
|
|
134
|
-
}
|
|
135
|
-
}
|
|
124
|
+
}, void 0)
|
|
125
|
+
}, index);
|
|
136
126
|
}
|
|
137
127
|
|
|
138
128
|
var linkArr = Array.isArray(link) ? link : [link];
|
|
@@ -140,55 +130,48 @@ var MobileInsurerDetail = function MobileInsurerDetail(props) {
|
|
|
140
130
|
|
|
141
131
|
if (onlyOneLink) {
|
|
142
132
|
var onClick = link.onClick;
|
|
143
|
-
return (0, _jsxRuntime.jsxs)("div",
|
|
144
|
-
className: "group-policy-info-text"
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
level: "body1"
|
|
148
|
-
}, {
|
|
133
|
+
return (0, _jsxRuntime.jsxs)("div", {
|
|
134
|
+
className: "group-policy-info-text",
|
|
135
|
+
children: [(0, _jsxRuntime.jsx)(_typography.default, {
|
|
136
|
+
level: "body1",
|
|
149
137
|
children: text
|
|
150
|
-
}
|
|
138
|
+
}, void 0), (0, _jsxRuntime.jsx)(_button.default, {
|
|
151
139
|
onClick: onClick ? function () {
|
|
152
140
|
return onClick(props);
|
|
153
141
|
} : function () {},
|
|
154
|
-
type: "link"
|
|
155
|
-
}, {
|
|
142
|
+
type: "link",
|
|
156
143
|
children: link.linkText
|
|
157
|
-
}
|
|
158
|
-
}
|
|
144
|
+
}, void 0)]
|
|
145
|
+
}, index);
|
|
159
146
|
}
|
|
160
147
|
|
|
161
|
-
return (0, _jsxRuntime.jsxs)("div",
|
|
162
|
-
className: "group-text-and-link-mult-link"
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
level: "body1"
|
|
166
|
-
}, {
|
|
148
|
+
return (0, _jsxRuntime.jsxs)("div", {
|
|
149
|
+
className: "group-text-and-link-mult-link",
|
|
150
|
+
children: [(0, _jsxRuntime.jsx)(_typography.default, {
|
|
151
|
+
level: "body1",
|
|
167
152
|
children: text
|
|
168
|
-
}
|
|
153
|
+
}, void 0), linkArr.map(function (linkObj, index) {
|
|
169
154
|
var onClick = linkObj.onClick;
|
|
170
|
-
return (0, _jsxRuntime.jsx)("div",
|
|
155
|
+
return (0, _jsxRuntime.jsx)("div", {
|
|
171
156
|
style: {
|
|
172
157
|
marginTop: 2
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
children: (0, _jsxRuntime.jsx)(_button.default, Object.assign({
|
|
158
|
+
},
|
|
159
|
+
children: (0, _jsxRuntime.jsx)(_button.default, {
|
|
176
160
|
onClick: onClick ? function () {
|
|
177
161
|
return onClick(props);
|
|
178
162
|
} : function () {},
|
|
179
|
-
type: "link"
|
|
180
|
-
}, {
|
|
163
|
+
type: "link",
|
|
181
164
|
children: linkObj.linkText
|
|
182
|
-
}
|
|
183
|
-
}
|
|
165
|
+
}, void 0)
|
|
166
|
+
}, index);
|
|
184
167
|
})]
|
|
185
|
-
}
|
|
168
|
+
}, index);
|
|
186
169
|
})]
|
|
187
|
-
}
|
|
170
|
+
}, index);
|
|
188
171
|
})]
|
|
189
|
-
}
|
|
172
|
+
}, index);
|
|
190
173
|
})]
|
|
191
|
-
}
|
|
174
|
+
}, void 0);
|
|
192
175
|
};
|
|
193
176
|
|
|
194
177
|
var _default = MobileInsurerDetail;
|
|
@@ -21,14 +21,19 @@ require("./style/index");
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
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; }
|
|
27
|
+
|
|
28
|
+
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; }
|
|
29
|
+
|
|
24
30
|
var MobileInsurerList = function MobileInsurerList(props) {
|
|
25
31
|
var dataList = props.dataList,
|
|
26
32
|
style = props.style,
|
|
27
33
|
className = props.className;
|
|
28
|
-
return (0, _jsxRuntime.jsx)("div",
|
|
34
|
+
return (0, _jsxRuntime.jsx)("div", {
|
|
29
35
|
className: (0, _classnames.default)('mobile-card-list', className),
|
|
30
|
-
style: style
|
|
31
|
-
}, {
|
|
36
|
+
style: style,
|
|
32
37
|
children: dataList.map(function (cardInfo, index) {
|
|
33
38
|
var insurerLogo = cardInfo.insurerLogo,
|
|
34
39
|
insurerName = cardInfo.insurerName,
|
|
@@ -38,50 +43,41 @@ var MobileInsurerList = function MobileInsurerList(props) {
|
|
|
38
43
|
mobileTagOnClick = cardInfo.mobileTagOnClick,
|
|
39
44
|
mobileRedDot = cardInfo.mobileRedDot;
|
|
40
45
|
(0, _invariant.default)(mobileTagOnClick == undefined || typeof mobileTagOnClick === 'function', 'mobileTagOnClick must be a function');
|
|
41
|
-
return (0, _jsxRuntime.jsxs)("div",
|
|
46
|
+
return (0, _jsxRuntime.jsxs)("div", {
|
|
42
47
|
className: "mobile-tag-container",
|
|
43
48
|
onClick: function onClick(e) {
|
|
44
49
|
return mobileTagOnClick && mobileTagOnClick(cardInfo, e);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
children: [insurerLogo && (0, _jsxRuntime.jsx)("div", Object.assign({
|
|
51
|
-
className: "left-insurer-icon"
|
|
52
|
-
}, {
|
|
50
|
+
},
|
|
51
|
+
children: [(0, _jsxRuntime.jsxs)("div", {
|
|
52
|
+
className: "mobile-tag-left",
|
|
53
|
+
children: [insurerLogo && (0, _jsxRuntime.jsx)("div", {
|
|
54
|
+
className: "left-insurer-icon",
|
|
53
55
|
children: insurerLogo
|
|
54
|
-
}
|
|
55
|
-
className: "left-insurer-info-container"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
children: [(0, _jsxRuntime.jsxs)(_typography.default, Object.assign({
|
|
61
|
-
level: "h4"
|
|
62
|
-
}, {
|
|
56
|
+
}, void 0), (0, _jsxRuntime.jsxs)("div", {
|
|
57
|
+
className: "left-insurer-info-container",
|
|
58
|
+
children: [(0, _jsxRuntime.jsxs)("div", {
|
|
59
|
+
className: "left-insurer-title",
|
|
60
|
+
children: [(0, _jsxRuntime.jsxs)(_typography.default, {
|
|
61
|
+
level: "h4",
|
|
63
62
|
children: [insurerName, " ", insurerType]
|
|
64
|
-
}
|
|
63
|
+
}, void 0), mobileRedDot && (0, _jsxRuntime.jsx)("div", {
|
|
65
64
|
className: "left-insurer-title-red-dot"
|
|
66
65
|
}, void 0)]
|
|
67
|
-
}
|
|
68
|
-
className: "left-insurer-sub-title"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
level: "body2"
|
|
72
|
-
}, {
|
|
66
|
+
}, void 0), mobileSubTitle && (0, _jsxRuntime.jsx)("div", {
|
|
67
|
+
className: "left-insurer-sub-title",
|
|
68
|
+
children: (0, _jsxRuntime.jsx)(_typography.default, {
|
|
69
|
+
level: "body2",
|
|
73
70
|
children: mobileSubTitle
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
className: "left-insurer-status"
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}), index);
|
|
71
|
+
}, void 0)
|
|
72
|
+
}, void 0), statusProps && (0, _jsxRuntime.jsx)("div", {
|
|
73
|
+
className: "left-insurer-status",
|
|
74
|
+
children: (0, _jsxRuntime.jsx)(_statusBox.default, _objectSpread({}, statusProps), void 0)
|
|
75
|
+
}, void 0)]
|
|
76
|
+
}, void 0)]
|
|
77
|
+
}, void 0), (0, _jsxRuntime.jsx)(_iglooicon.ArrowRightOutlined, {}, void 0)]
|
|
78
|
+
}, index);
|
|
83
79
|
})
|
|
84
|
-
}
|
|
80
|
+
}, void 0);
|
|
85
81
|
};
|
|
86
82
|
|
|
87
83
|
var _default = MobileInsurerList;
|
package/lib/modal/index.js
CHANGED
|
@@ -34,16 +34,16 @@ var _excluded = ["getContainer"],
|
|
|
34
34
|
|
|
35
35
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
36
36
|
|
|
37
|
+
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; }
|
|
38
|
+
|
|
39
|
+
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; }
|
|
40
|
+
|
|
37
41
|
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; }
|
|
38
42
|
|
|
39
43
|
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; }
|
|
40
44
|
|
|
41
45
|
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; }
|
|
42
46
|
|
|
43
|
-
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; }
|
|
44
|
-
|
|
45
|
-
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; }
|
|
46
|
-
|
|
47
47
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
48
48
|
|
|
49
49
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
@@ -144,7 +144,7 @@ var IglooModal = function IglooModal(props) {
|
|
|
144
144
|
};
|
|
145
145
|
}();
|
|
146
146
|
|
|
147
|
-
return (0, _jsxRuntime.jsx)(_modal.default,
|
|
147
|
+
return (0, _jsxRuntime.jsx)(_modal.default, _objectSpread(_objectSpread({}, props), {}, {
|
|
148
148
|
className: (0, _classnames.default)('igloo-modal', props.className, {
|
|
149
149
|
'igloo-modal-no-footer': footer === null,
|
|
150
150
|
'igloo-modal-limit-height': mode !== 'form'
|
|
@@ -155,26 +155,23 @@ var IglooModal = function IglooModal(props) {
|
|
|
155
155
|
color: '#666666'
|
|
156
156
|
}
|
|
157
157
|
}, void 0),
|
|
158
|
-
footer: footer === undefined ? (0, _jsxRuntime.jsxs)("div",
|
|
159
|
-
className: "igloo-modal-footer-btns"
|
|
160
|
-
|
|
161
|
-
children: [(0, _jsxRuntime.jsx)(_button.default, Object.assign({
|
|
158
|
+
footer: footer === undefined ? (0, _jsxRuntime.jsxs)("div", {
|
|
159
|
+
className: "igloo-modal-footer-btns",
|
|
160
|
+
children: [(0, _jsxRuntime.jsx)(_button.default, _objectSpread(_objectSpread({
|
|
162
161
|
onClick: onCancel
|
|
163
|
-
}, cancelButtonProps, {
|
|
164
|
-
className: (0, _classnames.default)('igloo-modal-footer-button', cancelButtonProps.className)
|
|
165
|
-
}, {
|
|
162
|
+
}, cancelButtonProps), {}, {
|
|
163
|
+
className: (0, _classnames.default)('igloo-modal-footer-button', cancelButtonProps.className),
|
|
166
164
|
children: cancelText
|
|
167
|
-
}), void 0), (0, _jsxRuntime.jsx)(_button.default,
|
|
165
|
+
}), void 0), (0, _jsxRuntime.jsx)(_button.default, _objectSpread(_objectSpread({
|
|
168
166
|
type: okType
|
|
169
|
-
}, okButtonProps, {
|
|
167
|
+
}, okButtonProps), {}, {
|
|
170
168
|
className: (0, _classnames.default)('igloo-modal-footer-button', okButtonProps.className),
|
|
171
|
-
onClick: handleOk
|
|
172
|
-
}, {
|
|
169
|
+
onClick: handleOk,
|
|
173
170
|
children: okText
|
|
174
171
|
}), void 0)]
|
|
175
|
-
}
|
|
172
|
+
}, void 0) : footer,
|
|
176
173
|
width: width || 'noStyleWidth',
|
|
177
|
-
children: formConfig ? (0, _jsxRuntime.jsx)(_form.default,
|
|
174
|
+
children: formConfig ? (0, _jsxRuntime.jsx)(_form.default, _objectSpread({
|
|
178
175
|
config: formConfig,
|
|
179
176
|
showSubmitButton: false,
|
|
180
177
|
ref: formRef
|
|
@@ -213,10 +210,9 @@ var modalFunction = function modalFunction(_ref2) {
|
|
|
213
210
|
_onOk = _ref3.onOk,
|
|
214
211
|
rest = _objectWithoutProperties(_ref3, _excluded2);
|
|
215
212
|
|
|
216
|
-
(0, _reactDom.render)((0, _jsxRuntime.jsx)(_locale.LocaleProvider,
|
|
217
|
-
currentLang: _formatMessage.staticLang.current
|
|
218
|
-
|
|
219
|
-
children: (0, _jsxRuntime.jsx)(IglooModal, Object.assign({}, rest, {
|
|
213
|
+
(0, _reactDom.render)((0, _jsxRuntime.jsx)(_locale.LocaleProvider, {
|
|
214
|
+
currentLang: _formatMessage.staticLang.current,
|
|
215
|
+
children: (0, _jsxRuntime.jsx)(IglooModal, _objectSpread(_objectSpread({}, rest), {}, {
|
|
220
216
|
visible: true,
|
|
221
217
|
onCancel: function onCancel() {
|
|
222
218
|
_onCancel && _onCancel.apply(void 0, arguments);
|
|
@@ -234,11 +230,10 @@ var modalFunction = function modalFunction(_ref2) {
|
|
|
234
230
|
}
|
|
235
231
|
|
|
236
232
|
return rst;
|
|
237
|
-
}
|
|
238
|
-
}, {
|
|
233
|
+
},
|
|
239
234
|
children: content
|
|
240
235
|
}), void 0)
|
|
241
|
-
}
|
|
236
|
+
}, void 0), ele);
|
|
242
237
|
};
|
|
243
238
|
|
|
244
239
|
var destroy = function destroy() {
|
|
@@ -44,25 +44,22 @@ var PlatformCard = function PlatformCard(_ref) {
|
|
|
44
44
|
showDefault = _useState2[0],
|
|
45
45
|
setShowDefault = _useState2[1];
|
|
46
46
|
|
|
47
|
-
return (0, _jsxRuntime.jsxs)("div",
|
|
47
|
+
return (0, _jsxRuntime.jsxs)("div", {
|
|
48
48
|
className: (0, _classnames.default)('igloo-platform', className),
|
|
49
49
|
onClick: onClick,
|
|
50
|
-
style: style
|
|
51
|
-
|
|
52
|
-
children: [showDefault && (0, _jsxRuntime.jsxs)("div", Object.assign({
|
|
50
|
+
style: style,
|
|
51
|
+
children: [showDefault && (0, _jsxRuntime.jsxs)("div", {
|
|
53
52
|
style: {
|
|
54
53
|
textAlign: 'center'
|
|
55
|
-
}
|
|
56
|
-
}, {
|
|
54
|
+
},
|
|
57
55
|
children: [(0, _jsxRuntime.jsx)("img", {
|
|
58
56
|
src: _default2.default,
|
|
59
57
|
className: "igloo-platform-defaultLogo"
|
|
60
|
-
}, void 0), (0, _jsxRuntime.jsx)("div",
|
|
61
|
-
className: "igloo-platform-name"
|
|
62
|
-
}, {
|
|
58
|
+
}, void 0), (0, _jsxRuntime.jsx)("div", {
|
|
59
|
+
className: "igloo-platform-name",
|
|
63
60
|
children: platform
|
|
64
|
-
}
|
|
65
|
-
}
|
|
61
|
+
}, void 0)]
|
|
62
|
+
}, void 0), !showDefault && (0, _jsxRuntime.jsx)(_image.default, {
|
|
66
63
|
width: 200,
|
|
67
64
|
height: 200,
|
|
68
65
|
src: "https://static.iglooinsure.com/partner/normal/".concat(platform.toLowerCase(), ".svg"),
|
|
@@ -71,7 +68,7 @@ var PlatformCard = function PlatformCard(_ref) {
|
|
|
71
68
|
},
|
|
72
69
|
preview: false
|
|
73
70
|
}, void 0)]
|
|
74
|
-
}
|
|
71
|
+
}, void 0);
|
|
75
72
|
};
|
|
76
73
|
|
|
77
74
|
var _default = PlatformCard;
|