iglooform 2.4.8 → 2.4.12
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.d.ts +2 -0
- package/es/admin-upload/index.js +43 -36
- package/es/admin-upload/job-list.js +85 -115
- 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 +23 -28
- package/es/button/style/index.less +23 -19
- package/es/card-detail/card-group.js +16 -22
- package/es/card-detail/card-item.js +16 -21
- package/es/card-detail/card-page.js +11 -15
- package/es/card-detail/card.js +24 -24
- package/es/card-detail/utils.js +6 -7
- package/es/checkbox/index.js +23 -22
- package/es/claim-list/index.js +53 -70
- package/es/confirmation/index.js +7 -9
- package/es/date-picker/buddhist.js +3 -3
- 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 +9 -11
- package/es/filter/checkBox.js +33 -45
- package/es/filter/customize.js +3 -4
- package/es/filter/index.d.ts +1 -0
- package/es/filter/index.js +88 -112
- package/es/filter/radioBox.js +23 -31
- package/es/filter/rangePicker.js +43 -59
- package/es/form/addable-section/index.d.ts +19 -0
- package/es/form/addable-section/index.js +211 -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 +58 -47
- package/es/form/element/style/index.less +9 -0
- package/es/form/index.js +16 -17
- package/es/form/login/index.js +15 -20
- package/es/form/page/index.js +18 -24
- package/es/form/page/style/index.less +1 -1
- package/es/form/pages/index.js +23 -32
- package/es/form/pages/style/index.less +3 -1
- package/es/form/render/index.js +1 -1
- package/es/form/section/index.js +14 -17
- package/es/form/step/index.js +31 -42
- package/es/form/steps/index.js +8 -11
- package/es/{form/context.d.ts → form-context.d.ts} +1 -0
- package/es/{form/context.js → form-context.js} +0 -0
- package/es/free-form/addable-section/index.d.ts +18 -0
- package/es/free-form/addable-section/index.js +286 -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 +43 -41
- package/es/free-form/element/style/index.less +12 -2
- package/es/free-form/index.d.ts +5 -1
- package/es/free-form/index.js +17 -17
- package/es/free-form/page/index.js +36 -46
- package/es/free-form/page/style/index.less +3 -1
- package/es/free-form/pages/index.js +8 -10
- package/es/free-form/section/index.js +20 -22
- package/es/free-form/section/style/index.less +4 -0
- package/es/free-form/step/index.js +37 -47
- package/es/free-form/steps/index.js +8 -10
- package/es/global-message/index.js +1 -1
- 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 +14 -18
- 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 +51 -60
- 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 +8 -10
- 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 +8 -10
- package/es/mobile-insurer-detail/index.js +74 -91
- package/es/mobile-insurer-list/index.js +34 -38
- package/es/modal/index.d.ts +4 -3
- package/es/modal/index.js +25 -27
- package/es/modal/style/index.less +24 -5
- package/es/platform/platform-card/index.js +9 -12
- package/es/platform/switch-platform/index.js +24 -32
- package/es/policy-list/index.js +11 -14
- 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/style/index.less +1 -1
- package/es/select/time-select.js +12 -16
- package/es/status-box/index.js +8 -10
- package/es/table/index.js +72 -96
- package/es/tabs/index.js +7 -1
- package/es/types.d.ts +4 -2
- package/es/typography/index.js +6 -8
- package/es/upload/index.d.ts +2 -1
- package/es/upload/index.js +169 -143
- package/es/upload-photo/index.d.ts +2 -1
- package/es/upload-photo/index.js +170 -142
- 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 +49 -36
- package/lib/admin-upload/float.js +25 -35
- package/lib/admin-upload/index.d.ts +2 -0
- package/lib/admin-upload/index.js +43 -36
- package/lib/admin-upload/job-list.js +85 -115
- 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 +24 -29
- package/lib/button/style/index.less +23 -19
- package/lib/card-detail/card-group.js +16 -22
- package/lib/card-detail/card-item.js +16 -21
- 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 +7 -8
- package/lib/checkbox/index.js +24 -23
- package/lib/claim-list/index.js +53 -70
- package/lib/confirmation/index.js +7 -9
- package/lib/date-picker/buddhist.js +3 -3
- 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 +10 -12
- package/lib/filter/checkBox.js +33 -45
- package/lib/filter/customize.js +3 -4
- package/lib/filter/index.d.ts +1 -0
- package/lib/filter/index.js +88 -112
- package/lib/filter/radioBox.js +23 -31
- package/lib/filter/rangePicker.js +43 -59
- package/lib/form/addable-section/index.d.ts +19 -0
- package/lib/form/addable-section/index.js +232 -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 +60 -48
- package/lib/form/element/style/index.less +9 -0
- package/lib/form/elements.js +1 -1
- package/lib/form/index.js +16 -17
- package/lib/form/login/index.js +16 -21
- package/lib/form/page/index.js +19 -25
- package/lib/form/page/style/index.less +1 -1
- package/lib/form/pages/index.js +24 -33
- package/lib/form/pages/style/index.less +3 -1
- package/lib/form/render/index.js +2 -2
- package/lib/form/section/index.js +15 -18
- package/lib/form/step/index.js +32 -43
- package/lib/form/steps/index.js +9 -12
- package/lib/{form/context.d.ts → form-context.d.ts} +1 -0
- package/lib/{form/context.js → form-context.js} +0 -0
- package/lib/free-form/addable-section/index.d.ts +18 -0
- package/lib/free-form/addable-section/index.js +306 -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 +44 -42
- package/lib/free-form/element/style/index.less +12 -2
- package/lib/free-form/index.d.ts +5 -1
- package/lib/free-form/index.js +17 -17
- package/lib/free-form/page/index.js +37 -47
- package/lib/free-form/page/style/index.less +3 -1
- package/lib/free-form/pages/index.js +8 -10
- package/lib/free-form/section/index.js +21 -23
- package/lib/free-form/section/style/index.less +4 -0
- package/lib/free-form/step/index.js +38 -48
- package/lib/free-form/steps/index.js +9 -11
- package/lib/global-message/index.js +1 -1
- package/lib/home-menu/index.js +52 -71
- package/lib/index.d.ts +1 -0
- package/lib/index.js +141 -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 +14 -18
- 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 +51 -60
- 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 +9 -11
- 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 +8 -10
- package/lib/mobile-insurer-detail/index.js +74 -91
- package/lib/mobile-insurer-list/index.js +34 -38
- package/lib/modal/index.d.ts +4 -3
- package/lib/modal/index.js +25 -27
- package/lib/modal/style/index.less +24 -5
- package/lib/platform/platform-card/index.js +9 -12
- package/lib/platform/switch-platform/index.js +24 -32
- package/lib/policy-list/index.js +11 -14
- 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/style/index.less +1 -1
- package/lib/select/time-select.js +12 -16
- package/lib/status-box/index.js +8 -10
- package/lib/table/index.js +72 -96
- package/lib/tabs/index.js +8 -2
- package/lib/types.d.ts +4 -2
- package/lib/typography/index.js +6 -8
- package/lib/upload/index.d.ts +2 -1
- package/lib/upload/index.js +170 -143
- package/lib/upload-photo/index.d.ts +2 -1
- package/lib/upload-photo/index.js +171 -142
- 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 +49 -37
- package/package.json +1 -1
- package/es/free-form/context.d.ts +0 -19
- package/es/free-form/context.js +0 -7
- package/lib/free-form/context.d.ts +0 -19
- package/lib/free-form/context.js +0 -19
package/lib/radio/index.js
CHANGED
|
@@ -40,8 +40,14 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
40
40
|
|
|
41
41
|
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; }
|
|
42
42
|
|
|
43
|
+
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; }
|
|
44
|
+
|
|
45
|
+
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; }
|
|
46
|
+
|
|
47
|
+
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
|
+
|
|
43
49
|
var IglooRadio = function IglooRadio(props) {
|
|
44
|
-
return (0, _jsxRuntime.jsx)(_radio.default,
|
|
50
|
+
return (0, _jsxRuntime.jsx)(_radio.default, _objectSpread({}, (0, _omit.default)(props, _formMethods.default)), void 0);
|
|
45
51
|
};
|
|
46
52
|
|
|
47
53
|
IglooRadio.formItemPropsHandler = function () {
|
|
@@ -76,62 +82,54 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
76
82
|
typeof setFieldValue === 'function' && setFieldValue(undefined);
|
|
77
83
|
}
|
|
78
84
|
}, [value, options]);
|
|
79
|
-
return (0, _jsxRuntime.jsx)(_radio.default.Group,
|
|
85
|
+
return (0, _jsxRuntime.jsx)(_radio.default.Group, _objectSpread(_objectSpread({}, (0, _omit.default)(rest, _formMethods.default)), {}, {
|
|
80
86
|
className: (0, _classnames.default)('igloo-radio-group', className),
|
|
81
|
-
value: value
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
gutter: [8, 8]
|
|
85
|
-
}, {
|
|
87
|
+
value: value,
|
|
88
|
+
children: (0, _jsxRuntime.jsx)(_row.default, {
|
|
89
|
+
gutter: [8, 8],
|
|
86
90
|
children: options.map(function (_ref2) {
|
|
87
91
|
var label = _ref2.label,
|
|
88
92
|
key = _ref2.value,
|
|
89
93
|
extraInfo = _ref2.extraInfo,
|
|
90
94
|
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
91
95
|
|
|
92
|
-
return radioType === 'normal' ? (0, _jsxRuntime.jsxs)(_col.default,
|
|
96
|
+
return radioType === 'normal' ? (0, _jsxRuntime.jsxs)(_col.default, {
|
|
93
97
|
span: 24,
|
|
94
|
-
className: 'igloo-radio-group-normal'
|
|
95
|
-
|
|
96
|
-
children: [(0, _jsxRuntime.jsx)(_radio.default, Object.assign({
|
|
98
|
+
className: 'igloo-radio-group-normal',
|
|
99
|
+
children: [(0, _jsxRuntime.jsx)(_radio.default, _objectSpread(_objectSpread({
|
|
97
100
|
value: key
|
|
98
|
-
}, rest, {
|
|
99
|
-
children: (0, _jsxRuntime.jsx)(_typography.default,
|
|
100
|
-
level: "body1"
|
|
101
|
-
}, {
|
|
101
|
+
}, rest), {}, {
|
|
102
|
+
children: (0, _jsxRuntime.jsx)(_typography.default, {
|
|
103
|
+
level: "body1",
|
|
102
104
|
children: label
|
|
103
|
-
}
|
|
104
|
-
}), void 0), (0, _jsxRuntime.jsx)("div",
|
|
105
|
-
className: "igloo-radio-extra"
|
|
106
|
-
}, {
|
|
105
|
+
}, void 0)
|
|
106
|
+
}), void 0), (0, _jsxRuntime.jsx)("div", {
|
|
107
|
+
className: "igloo-radio-extra",
|
|
107
108
|
children: extraInfo && (extraInfo.shownTrigger === 'all' || extraInfo.shownTrigger === 'checked' && value === key || extraInfo.shownTrigger === 'unchecked' && value !== key) && extraInfo.content
|
|
108
|
-
}
|
|
109
|
-
}
|
|
109
|
+
}, void 0)]
|
|
110
|
+
}, key) : (0, _jsxRuntime.jsx)(_col.default, {
|
|
110
111
|
span: 12,
|
|
111
|
-
className: 'igloo-radio-group-button'
|
|
112
|
-
|
|
113
|
-
children: (0, _jsxRuntime.jsx)(_radio.default.Button, Object.assign({
|
|
112
|
+
className: 'igloo-radio-group-button',
|
|
113
|
+
children: (0, _jsxRuntime.jsx)(_radio.default.Button, _objectSpread(_objectSpread({
|
|
114
114
|
value: key
|
|
115
|
-
}, rest, {
|
|
116
|
-
children: (0, _jsxRuntime.jsxs)(_row.default,
|
|
115
|
+
}, rest), {}, {
|
|
116
|
+
children: (0, _jsxRuntime.jsxs)(_row.default, {
|
|
117
117
|
justify: "space-between",
|
|
118
|
-
align: "middle"
|
|
119
|
-
}, {
|
|
118
|
+
align: "middle",
|
|
120
119
|
children: [(0, _jsxRuntime.jsx)("span", {
|
|
121
|
-
children: (0, _jsxRuntime.jsx)(_typography.default,
|
|
122
|
-
level: "body1"
|
|
123
|
-
}, {
|
|
120
|
+
children: (0, _jsxRuntime.jsx)(_typography.default, {
|
|
121
|
+
level: "body1",
|
|
124
122
|
children: label
|
|
125
|
-
}
|
|
123
|
+
}, void 0)
|
|
126
124
|
}, void 0), (0, _jsxRuntime.jsx)(_radio.default, {
|
|
127
125
|
value: key,
|
|
128
126
|
className: 'igloo-radio-inner-radio'
|
|
129
127
|
}, void 0)]
|
|
130
|
-
}
|
|
128
|
+
}, void 0)
|
|
131
129
|
}), void 0)
|
|
132
|
-
}
|
|
130
|
+
}, key);
|
|
133
131
|
})
|
|
134
|
-
}
|
|
132
|
+
}, void 0)
|
|
135
133
|
}), void 0);
|
|
136
134
|
};
|
|
137
135
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports.
|
|
6
|
+
exports.default = exports.Option = exports.OptGroup = void 0;
|
|
7
7
|
|
|
8
8
|
require("antd/es/select/style");
|
|
9
9
|
|
|
@@ -35,6 +35,12 @@ var _excluded = ["options", "getOptions", "value", "className", "placeholder", "
|
|
|
35
35
|
|
|
36
36
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
37
37
|
|
|
38
|
+
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; }
|
|
39
|
+
|
|
40
|
+
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; }
|
|
41
|
+
|
|
42
|
+
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; }
|
|
43
|
+
|
|
38
44
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
39
45
|
|
|
40
46
|
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."); }
|
|
@@ -229,23 +235,21 @@ var IglooSelect = function IglooSelect(_ref) {
|
|
|
229
235
|
setSelectedOptions(options);
|
|
230
236
|
};
|
|
231
237
|
|
|
232
|
-
return (0, _jsxRuntime.jsx)("div",
|
|
233
|
-
className: (0, _classnames.default)('igloo-attached-select-containter', className)
|
|
234
|
-
|
|
235
|
-
children: (0, _jsxRuntime.jsx)(_select.default, Object.assign({
|
|
238
|
+
return (0, _jsxRuntime.jsx)("div", {
|
|
239
|
+
className: (0, _classnames.default)('igloo-attached-select-containter', className),
|
|
240
|
+
children: (0, _jsxRuntime.jsx)(_select.default, _objectSpread(_objectSpread({
|
|
236
241
|
placeholder: placeholder || formatMessage({
|
|
237
242
|
id: 'Please select'
|
|
238
243
|
}),
|
|
239
244
|
getPopupContainer: function getPopupContainer(trigger) {
|
|
240
245
|
return trigger.parentNode;
|
|
241
246
|
}
|
|
242
|
-
}, (0, _omit.default)(rest, _formMethods.default), {
|
|
247
|
+
}, (0, _omit.default)(rest, _formMethods.default)), {}, {
|
|
243
248
|
value: selected,
|
|
244
|
-
suffixIcon: (0, _jsxRuntime.jsxs)("div",
|
|
249
|
+
suffixIcon: (0, _jsxRuntime.jsxs)("div", {
|
|
245
250
|
style: {
|
|
246
251
|
position: 'relative'
|
|
247
|
-
}
|
|
248
|
-
}, {
|
|
252
|
+
},
|
|
249
253
|
children: [(0, _jsxRuntime.jsx)(_iglooicon.ArrowDownOutlined, {
|
|
250
254
|
className: (0, _classnames.default)({
|
|
251
255
|
'igloo-select-arrow': true,
|
|
@@ -263,7 +267,7 @@ var IglooSelect = function IglooSelect(_ref) {
|
|
|
263
267
|
opacity: dropVisible ? 1 : 0
|
|
264
268
|
}
|
|
265
269
|
}, void 0)]
|
|
266
|
-
}
|
|
270
|
+
}, void 0),
|
|
267
271
|
className: (0, _classnames.default)('igloo-attached-select', {
|
|
268
272
|
'igloo-attached-select-open-status': dropVisible
|
|
269
273
|
}),
|
|
@@ -281,14 +285,12 @@ var IglooSelect = function IglooSelect(_ref) {
|
|
|
281
285
|
return originNode;
|
|
282
286
|
}
|
|
283
287
|
|
|
284
|
-
return (0, _jsxRuntime.jsxs)("div",
|
|
285
|
-
className: "igloo-attached-select-multiple-dropdown"
|
|
286
|
-
|
|
287
|
-
children: [showSearch && (0, _jsxRuntime.jsx)("div", Object.assign({
|
|
288
|
+
return (0, _jsxRuntime.jsxs)("div", {
|
|
289
|
+
className: "igloo-attached-select-multiple-dropdown",
|
|
290
|
+
children: [showSearch && (0, _jsxRuntime.jsx)("div", {
|
|
288
291
|
style: {
|
|
289
292
|
padding: '12px 16px'
|
|
290
|
-
}
|
|
291
|
-
}, {
|
|
293
|
+
},
|
|
292
294
|
children: (0, _jsxRuntime.jsx)(_input.default, {
|
|
293
295
|
onChange: handleSearch,
|
|
294
296
|
prefix: (0, _jsxRuntime.jsx)(_iglooicon.SearchOutlined, {
|
|
@@ -300,34 +302,31 @@ var IglooSelect = function IglooSelect(_ref) {
|
|
|
300
302
|
return e.stopPropagation();
|
|
301
303
|
}
|
|
302
304
|
}, void 0)
|
|
303
|
-
}
|
|
304
|
-
className: "igloo-attached-select-multiple-dropdown-buttons"
|
|
305
|
-
|
|
306
|
-
children: [(0, _jsxRuntime.jsx)(_button.default, Object.assign({
|
|
305
|
+
}, void 0), (0, _jsxRuntime.jsxs)("div", {
|
|
306
|
+
className: "igloo-attached-select-multiple-dropdown-buttons",
|
|
307
|
+
children: [(0, _jsxRuntime.jsx)(_button.default, {
|
|
307
308
|
type: "link",
|
|
308
309
|
onClick: selectAll,
|
|
309
310
|
disabled: displayOptions.every(function (_ref6) {
|
|
310
311
|
var value = _ref6.value;
|
|
311
312
|
return selected === null || selected === void 0 ? void 0 : selected.includes(value);
|
|
312
|
-
})
|
|
313
|
-
}, {
|
|
313
|
+
}),
|
|
314
314
|
children: formatMessage({
|
|
315
315
|
id: 'Select All'
|
|
316
316
|
})
|
|
317
|
-
}
|
|
317
|
+
}, void 0), (0, _jsxRuntime.jsx)(_button.default, {
|
|
318
318
|
type: "link",
|
|
319
319
|
onClick: clearAll,
|
|
320
320
|
disabled: displayOptions.every(function (_ref7) {
|
|
321
321
|
var value = _ref7.value;
|
|
322
322
|
return !(selected === null || selected === void 0 ? void 0 : selected.includes(value));
|
|
323
|
-
})
|
|
324
|
-
}, {
|
|
323
|
+
}),
|
|
325
324
|
children: formatMessage({
|
|
326
325
|
id: 'Clear All'
|
|
327
326
|
})
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
}
|
|
327
|
+
}, void 0)]
|
|
328
|
+
}, void 0), originNode]
|
|
329
|
+
}, void 0);
|
|
331
330
|
},
|
|
332
331
|
maxTagCount: 0,
|
|
333
332
|
maxTagPlaceholder: function maxTagPlaceholder(values) {
|
|
@@ -341,18 +340,16 @@ var IglooSelect = function IglooSelect(_ref) {
|
|
|
341
340
|
}).join(', ');
|
|
342
341
|
},
|
|
343
342
|
onChange: handleChange,
|
|
344
|
-
dropdownMatchSelectWidth: true
|
|
345
|
-
}, {
|
|
343
|
+
dropdownMatchSelectWidth: true,
|
|
346
344
|
children: displayOptions.map(function (_ref10) {
|
|
347
345
|
var label = _ref10.label,
|
|
348
346
|
value = _ref10.value;
|
|
349
|
-
return (0, _jsxRuntime.jsxs)(Option,
|
|
347
|
+
return (0, _jsxRuntime.jsxs)(Option, {
|
|
350
348
|
value: value,
|
|
351
349
|
label: label,
|
|
352
350
|
style: {
|
|
353
351
|
position: 'relative'
|
|
354
|
-
}
|
|
355
|
-
}, {
|
|
352
|
+
},
|
|
356
353
|
children: [multiple ? (0, _jsxRuntime.jsxs)("div", {
|
|
357
354
|
children: [(0, _jsxRuntime.jsx)(_checkbox.default, {
|
|
358
355
|
checked: Array.isArray(selected) && selected.includes(value),
|
|
@@ -370,10 +367,10 @@ var IglooSelect = function IglooSelect(_ref) {
|
|
|
370
367
|
left: 0
|
|
371
368
|
}
|
|
372
369
|
}, void 0)]
|
|
373
|
-
}
|
|
370
|
+
}, value);
|
|
374
371
|
})
|
|
375
372
|
}), void 0)
|
|
376
|
-
}
|
|
373
|
+
}, void 0);
|
|
377
374
|
};
|
|
378
375
|
|
|
379
376
|
IglooSelect.formItemPropsHandler = function (config) {
|
package/lib/select/select.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports.
|
|
6
|
+
exports.default = exports.Option = exports.OptGroup = void 0;
|
|
7
7
|
|
|
8
8
|
require("antd/es/select/style");
|
|
9
9
|
|
|
@@ -29,6 +29,12 @@ var _excluded = ["options", "value", "className", "placeholder", "children", "on
|
|
|
29
29
|
|
|
30
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
31
|
|
|
32
|
+
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; }
|
|
33
|
+
|
|
34
|
+
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; }
|
|
35
|
+
|
|
36
|
+
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; }
|
|
37
|
+
|
|
32
38
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
33
39
|
|
|
34
40
|
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."); }
|
|
@@ -70,18 +76,17 @@ var IglooSelect = function IglooSelect(_ref) {
|
|
|
70
76
|
var _useContext = (0, _react.useContext)(_localeContext.default),
|
|
71
77
|
formatMessage = _useContext.formatMessage;
|
|
72
78
|
|
|
73
|
-
return (0, _jsxRuntime.jsx)(_select.default,
|
|
79
|
+
return (0, _jsxRuntime.jsx)(_select.default, _objectSpread(_objectSpread({
|
|
74
80
|
placeholder: placeholder || formatMessage({
|
|
75
81
|
id: 'Please select'
|
|
76
82
|
})
|
|
77
|
-
}, (0, _omit.default)(rest, _formMethods.default), {
|
|
83
|
+
}, (0, _omit.default)(rest, _formMethods.default)), {}, {
|
|
78
84
|
options: children ? void 0 : options,
|
|
79
85
|
value: value,
|
|
80
|
-
suffixIcon: (0, _jsxRuntime.jsxs)("div",
|
|
86
|
+
suffixIcon: (0, _jsxRuntime.jsxs)("div", {
|
|
81
87
|
style: {
|
|
82
88
|
position: 'relative'
|
|
83
|
-
}
|
|
84
|
-
}, {
|
|
89
|
+
},
|
|
85
90
|
children: [(0, _jsxRuntime.jsx)(_iglooicon.ArrowDownOutlined, {
|
|
86
91
|
className: (0, _classnames.default)({
|
|
87
92
|
'igloo-select-arrow': true,
|
|
@@ -99,7 +104,7 @@ var IglooSelect = function IglooSelect(_ref) {
|
|
|
99
104
|
opacity: isOpen ? 1 : 0
|
|
100
105
|
}
|
|
101
106
|
}, void 0)]
|
|
102
|
-
}
|
|
107
|
+
}, void 0),
|
|
103
108
|
getPopupContainer: function getPopupContainer(trigger) {
|
|
104
109
|
return trigger.parentNode;
|
|
105
110
|
},
|
|
@@ -114,8 +119,7 @@ var IglooSelect = function IglooSelect(_ref) {
|
|
|
114
119
|
|
|
115
120
|
return Boolean(option === null || option === void 0 ? void 0 : (_option$label = option.label) === null || _option$label === void 0 ? void 0 : (_option$label$toStrin = _option$label.toString()) === null || _option$label$toStrin === void 0 ? void 0 : _option$label$toStrin.includes(value));
|
|
116
121
|
} : void 0),
|
|
117
|
-
mode: undefined
|
|
118
|
-
}, {
|
|
122
|
+
mode: undefined,
|
|
119
123
|
children: children
|
|
120
124
|
}), void 0);
|
|
121
125
|
};
|
|
@@ -211,12 +211,11 @@ var IglooTimeSelect = function IglooTimeSelect(props) {
|
|
|
211
211
|
|
|
212
212
|
var menu = (0, _jsxRuntime.jsx)(_menu.default, {
|
|
213
213
|
children: (0, _jsxRuntime.jsx)(_menu.default.Item, {
|
|
214
|
-
children: (0, _jsxRuntime.jsxs)("div",
|
|
214
|
+
children: (0, _jsxRuntime.jsxs)("div", {
|
|
215
215
|
onClick: function onClick(e) {
|
|
216
216
|
return e.stopPropagation();
|
|
217
217
|
},
|
|
218
|
-
className: "igloo-drop-down-content"
|
|
219
|
-
}, {
|
|
218
|
+
className: "igloo-drop-down-content",
|
|
220
219
|
children: [(0, _jsxRuntime.jsxs)("div", {
|
|
221
220
|
children: [(0, _jsxRuntime.jsx)(_iglooicon.ArrowUpOutlined, {
|
|
222
221
|
onClick: function onClick() {
|
|
@@ -258,11 +257,10 @@ var IglooTimeSelect = function IglooTimeSelect(props) {
|
|
|
258
257
|
return meridiemSwitch(hourValue);
|
|
259
258
|
}
|
|
260
259
|
}, void 0), (0, _jsxRuntime.jsx)("span", {
|
|
261
|
-
children: (0, _jsxRuntime.jsx)(_typography.default,
|
|
262
|
-
level: "body1"
|
|
263
|
-
}, {
|
|
260
|
+
children: (0, _jsxRuntime.jsx)(_typography.default, {
|
|
261
|
+
level: "body1",
|
|
264
262
|
children: meridiem ? 'AM' : 'PM'
|
|
265
|
-
}
|
|
263
|
+
}, void 0)
|
|
266
264
|
}, void 0), (0, _jsxRuntime.jsx)(_iglooicon.ArrowDownOutlined, {
|
|
267
265
|
className: (0, _classnames.default)({// 'igloo-hour-select-meridiem-disable': meridiemDisable,
|
|
268
266
|
}),
|
|
@@ -271,14 +269,13 @@ var IglooTimeSelect = function IglooTimeSelect(props) {
|
|
|
271
269
|
}
|
|
272
270
|
}, void 0)]
|
|
273
271
|
}, void 0)]
|
|
274
|
-
}
|
|
272
|
+
}, void 0)
|
|
275
273
|
}, '0')
|
|
276
274
|
}, void 0);
|
|
277
|
-
return (0, _jsxRuntime.jsxs)("div",
|
|
275
|
+
return (0, _jsxRuntime.jsxs)("div", {
|
|
278
276
|
className: "igloo-hour-select",
|
|
279
|
-
ref: topDomRef
|
|
280
|
-
|
|
281
|
-
children: [(0, _jsxRuntime.jsx)(_dropdown.default, Object.assign({
|
|
277
|
+
ref: topDomRef,
|
|
278
|
+
children: [(0, _jsxRuntime.jsx)(_dropdown.default, {
|
|
282
279
|
onVisibleChange: function onVisibleChange(open) {
|
|
283
280
|
return setDropDownVisible(open);
|
|
284
281
|
},
|
|
@@ -288,20 +285,19 @@ var IglooTimeSelect = function IglooTimeSelect(props) {
|
|
|
288
285
|
getPopupContainer: function getPopupContainer() {
|
|
289
286
|
return topDomRef.current;
|
|
290
287
|
},
|
|
291
|
-
disabled: disabled
|
|
292
|
-
}, {
|
|
288
|
+
disabled: disabled,
|
|
293
289
|
children: (0, _jsxRuntime.jsx)(_index.default, {
|
|
294
290
|
value: finalDisplayValue,
|
|
295
291
|
className: (0, _classnames.default)('igloo-input', {
|
|
296
292
|
'igloo-hour-select-input-active': dropDownVisible
|
|
297
293
|
})
|
|
298
294
|
}, void 0)
|
|
299
|
-
}
|
|
295
|
+
}, void 0), (0, _jsxRuntime.jsx)(_iglooicon.TimeOutlined, {
|
|
300
296
|
className: (0, _classnames.default)({
|
|
301
297
|
'igloo-hour-select-active': dropDownVisible
|
|
302
298
|
})
|
|
303
299
|
}, void 0)]
|
|
304
|
-
}
|
|
300
|
+
}, void 0);
|
|
305
301
|
};
|
|
306
302
|
|
|
307
303
|
function checkCard(value) {
|
package/lib/status-box/index.js
CHANGED
|
@@ -15,9 +15,9 @@ require("./style/index");
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
18
|
+
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; }
|
|
19
19
|
|
|
20
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
20
|
+
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; }
|
|
21
21
|
|
|
22
22
|
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; }
|
|
23
23
|
|
|
@@ -28,19 +28,17 @@ var IglooStatusBox = function IglooStatusBox(props) {
|
|
|
28
28
|
background = props.background,
|
|
29
29
|
className = props.className,
|
|
30
30
|
style = props.style;
|
|
31
|
-
return (0, _jsxRuntime.jsx)("span",
|
|
31
|
+
return (0, _jsxRuntime.jsx)("span", {
|
|
32
32
|
className: (0, _classnames.default)("iglooform-status-box-".concat(type), 'iglooform-status-box-container', className),
|
|
33
33
|
style: _objectSpread({
|
|
34
34
|
color: color,
|
|
35
35
|
backgroundColor: background
|
|
36
|
-
}, style)
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
level: "status"
|
|
40
|
-
}, {
|
|
36
|
+
}, style),
|
|
37
|
+
children: (0, _jsxRuntime.jsx)(_typography.default, {
|
|
38
|
+
level: "status",
|
|
41
39
|
children: children
|
|
42
|
-
}
|
|
43
|
-
}
|
|
40
|
+
}, void 0)
|
|
41
|
+
}, void 0);
|
|
44
42
|
};
|
|
45
43
|
|
|
46
44
|
var _default = IglooStatusBox;
|