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/es/example/index.js
CHANGED
|
@@ -2,9 +2,9 @@ import "antd/es/button/style";
|
|
|
2
2
|
import _Button from "antd/es/button";
|
|
3
3
|
var _excluded = ["onSubmit"];
|
|
4
4
|
|
|
5
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
5
|
+
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; }
|
|
6
6
|
|
|
7
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
7
|
+
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; }
|
|
8
8
|
|
|
9
9
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
10
|
|
|
@@ -78,9 +78,8 @@ var Excample = function Excample(_ref) {
|
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
80
|
|
|
81
|
-
return _jsxs(LocaleProvider,
|
|
82
|
-
currentLang: currentLang
|
|
83
|
-
}, {
|
|
81
|
+
return _jsxs(LocaleProvider, {
|
|
82
|
+
currentLang: currentLang,
|
|
84
83
|
children: [_jsx(_Button, {
|
|
85
84
|
onClick: function onClick() {
|
|
86
85
|
setKey(key + 1);
|
|
@@ -102,17 +101,16 @@ var Excample = function Excample(_ref) {
|
|
|
102
101
|
onChange: function onChange(e) {
|
|
103
102
|
return setLang(e);
|
|
104
103
|
}
|
|
105
|
-
}, void 0),
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}, key), result && _jsx(ReactJson, {
|
|
104
|
+
}, void 0), /*#__PURE__*/React.cloneElement(children, _objectSpread(_objectSpread({}, rest), {}, {
|
|
105
|
+
onSubmit: handleSubmit,
|
|
106
|
+
key: key
|
|
107
|
+
})), result && _jsx(ReactJson, {
|
|
110
108
|
src: result,
|
|
111
109
|
displayDataTypes: false,
|
|
112
110
|
name: false,
|
|
113
111
|
displayObjectSize: false
|
|
114
112
|
}, void 0)]
|
|
115
|
-
}
|
|
113
|
+
}, void 0);
|
|
116
114
|
};
|
|
117
115
|
|
|
118
116
|
export default Excample;
|
package/es/filter/checkBox.js
CHANGED
|
@@ -73,17 +73,14 @@ var CratetCheckBoxFilter = function CratetCheckBoxFilter(props) {
|
|
|
73
73
|
setAllChoose(false);
|
|
74
74
|
}
|
|
75
75
|
}, [chooseed.length, allCanChoose]);
|
|
76
|
-
return _jsxs("div",
|
|
77
|
-
className: "igloo-form-filter-drop-down-container-content-group"
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
children: [_jsx(Typography, Object.assign({
|
|
83
|
-
level: "h4"
|
|
84
|
-
}, {
|
|
76
|
+
return _jsxs("div", {
|
|
77
|
+
className: "igloo-form-filter-drop-down-container-content-group",
|
|
78
|
+
children: [_jsxs("div", {
|
|
79
|
+
className: "igloo-form-filter-drop-down-container-content-group-title",
|
|
80
|
+
children: [_jsx(Typography, {
|
|
81
|
+
level: "h4",
|
|
85
82
|
children: title
|
|
86
|
-
}
|
|
83
|
+
}, void 0), allChoose ? _jsx("span", {
|
|
87
84
|
className: "igloo-form-filter-drop-down-container-content-group-title-action",
|
|
88
85
|
onClick: function onClick() {
|
|
89
86
|
valueConfirm({
|
|
@@ -91,16 +88,14 @@ var CratetCheckBoxFilter = function CratetCheckBoxFilter(props) {
|
|
|
91
88
|
value: []
|
|
92
89
|
});
|
|
93
90
|
setAllChoose(false);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
level: "h4"
|
|
98
|
-
}, {
|
|
91
|
+
},
|
|
92
|
+
children: _jsx(Typography, {
|
|
93
|
+
level: "h4",
|
|
99
94
|
children: formatMessage({
|
|
100
95
|
id: 'Unselect All'
|
|
101
96
|
})
|
|
102
|
-
}
|
|
103
|
-
}
|
|
97
|
+
}, void 0)
|
|
98
|
+
}, void 0) : _jsx("span", {
|
|
104
99
|
className: "igloo-form-filter-drop-down-container-content-group-title-action",
|
|
105
100
|
onClick: function onClick() {
|
|
106
101
|
valueConfirm({
|
|
@@ -108,17 +103,15 @@ var CratetCheckBoxFilter = function CratetCheckBoxFilter(props) {
|
|
|
108
103
|
value: allCanChoose
|
|
109
104
|
});
|
|
110
105
|
setAllChoose(true);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
level: "h4"
|
|
115
|
-
}, {
|
|
106
|
+
},
|
|
107
|
+
children: _jsx(Typography, {
|
|
108
|
+
level: "h4",
|
|
116
109
|
children: formatMessage({
|
|
117
110
|
id: 'Select All'
|
|
118
111
|
})
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
112
|
+
}, void 0)
|
|
113
|
+
}, void 0)]
|
|
114
|
+
}, void 0), _jsx(_Checkbox.Group, {
|
|
122
115
|
value: handleFilterDisable(chooseed, disabled),
|
|
123
116
|
style: {
|
|
124
117
|
width: '100%'
|
|
@@ -128,34 +121,29 @@ var CratetCheckBoxFilter = function CratetCheckBoxFilter(props) {
|
|
|
128
121
|
type: optionKey,
|
|
129
122
|
value: e
|
|
130
123
|
});
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
gutter: [24, 16]
|
|
135
|
-
}, {
|
|
124
|
+
},
|
|
125
|
+
children: _jsx(_Row, {
|
|
126
|
+
gutter: [24, 16],
|
|
136
127
|
children: configList.map(function (item) {
|
|
137
|
-
return _jsx(_Col,
|
|
138
|
-
span: item.span || 8
|
|
139
|
-
|
|
140
|
-
children: _jsx(_Checkbox, Object.assign({
|
|
128
|
+
return _jsx(_Col, {
|
|
129
|
+
span: item.span || 8,
|
|
130
|
+
children: _jsx(_Checkbox, {
|
|
141
131
|
value: item.value,
|
|
142
|
-
disabled: disabled === null || disabled === void 0 ? void 0 : disabled.includes(item.value)
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
level: "body1"
|
|
146
|
-
}, {
|
|
132
|
+
disabled: disabled === null || disabled === void 0 ? void 0 : disabled.includes(item.value),
|
|
133
|
+
children: _jsx(Typography, {
|
|
134
|
+
level: "body1",
|
|
147
135
|
children: item.label
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
136
|
+
}, void 0)
|
|
137
|
+
}, void 0)
|
|
138
|
+
}, item.value);
|
|
151
139
|
})
|
|
152
|
-
}
|
|
153
|
-
}
|
|
140
|
+
}, void 0)
|
|
141
|
+
}, String(timeKey.valueOf())), _jsx(_Divider, {
|
|
154
142
|
style: {
|
|
155
143
|
margin: '16px 0px'
|
|
156
144
|
}
|
|
157
145
|
}, void 0)]
|
|
158
|
-
}
|
|
146
|
+
}, optionKey);
|
|
159
147
|
};
|
|
160
148
|
|
|
161
149
|
export default CratetCheckBoxFilter;
|
package/es/filter/customize.js
CHANGED
|
@@ -7,15 +7,14 @@ var CustomizeFilter = function CustomizeFilter(props) {
|
|
|
7
7
|
value = props.value,
|
|
8
8
|
onChange = props.onChange,
|
|
9
9
|
render = props.render;
|
|
10
|
-
return _jsxs("div",
|
|
11
|
-
className: "igloo-form-filter-drop-down-container-content-group"
|
|
12
|
-
}, {
|
|
10
|
+
return _jsxs("div", {
|
|
11
|
+
className: "igloo-form-filter-drop-down-container-content-group",
|
|
13
12
|
children: [render(value, onChange), _jsx(_Divider, {
|
|
14
13
|
style: {
|
|
15
14
|
margin: '16px 0px'
|
|
16
15
|
}
|
|
17
16
|
}, void 0)]
|
|
18
|
-
}
|
|
17
|
+
}, optionKey);
|
|
19
18
|
};
|
|
20
19
|
|
|
21
20
|
export default CustomizeFilter;
|
package/es/filter/index.d.ts
CHANGED
|
@@ -43,6 +43,7 @@ export interface IFilterProps {
|
|
|
43
43
|
deleteAllTagsType?: 'closeAllCanDelete' | 'restFilters';
|
|
44
44
|
searchInputDefault?: string | number;
|
|
45
45
|
searchWithFilter?: boolean;
|
|
46
|
+
inputOnly?: boolean;
|
|
46
47
|
}
|
|
47
48
|
declare const FilterComponent: (props: IFilterProps) => JSX.Element;
|
|
48
49
|
export default FilterComponent;
|
package/es/filter/index.js
CHANGED
|
@@ -31,13 +31,13 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
31
31
|
|
|
32
32
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
33
33
|
|
|
34
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
34
|
+
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; }
|
|
35
35
|
|
|
36
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
36
|
+
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; }
|
|
37
37
|
|
|
38
38
|
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; }
|
|
39
39
|
|
|
40
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
40
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
41
41
|
|
|
42
42
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
43
43
|
import moment from 'moment';
|
|
@@ -354,7 +354,8 @@ var FilterComponent = function FilterComponent(props) {
|
|
|
354
354
|
_props$searchWithFilt = props.searchWithFilter,
|
|
355
355
|
searchWithFilter = _props$searchWithFilt === void 0 ? false : _props$searchWithFilt,
|
|
356
356
|
searchInputDefault = props.searchInputDefault,
|
|
357
|
-
initValue = props.initValue
|
|
357
|
+
initValue = props.initValue,
|
|
358
|
+
inputOnly = props.inputOnly;
|
|
358
359
|
var filterTitle = props.filterTitle,
|
|
359
360
|
_props$filterItems = props.filterItems,
|
|
360
361
|
filterItems = _props$filterItems === void 0 ? [] : _props$filterItems; // id controller
|
|
@@ -509,11 +510,14 @@ var FilterComponent = function FilterComponent(props) {
|
|
|
509
510
|
}, [JSON.stringify(filterItems)]); // 设置tag框 高度改变动效
|
|
510
511
|
|
|
511
512
|
useLayoutEffect(function () {
|
|
512
|
-
setTimeout(function () {
|
|
513
|
+
var timer = setTimeout(function () {
|
|
513
514
|
var _heightRef$current;
|
|
514
515
|
|
|
515
516
|
setOpenTagHeight((_heightRef$current = heightRef.current) === null || _heightRef$current === void 0 ? void 0 : _heightRef$current.offsetHeight);
|
|
516
517
|
}, 0);
|
|
518
|
+
return function () {
|
|
519
|
+
return clearTimeout(timer);
|
|
520
|
+
};
|
|
517
521
|
}, [inputExtend, JSON.stringify(confirmed)]); // 针对删除了所有可删除的filter tags情况,自动聚焦到seatch Input
|
|
518
522
|
|
|
519
523
|
useLayoutEffect(function () {
|
|
@@ -604,20 +608,18 @@ var FilterComponent = function FilterComponent(props) {
|
|
|
604
608
|
|
|
605
609
|
var menu = _jsx(_Menu, {
|
|
606
610
|
children: _jsxs(_Menu.Item, {
|
|
607
|
-
children: [_jsxs("div",
|
|
608
|
-
className: "igloo-form-filter-drop-down-container-content"
|
|
609
|
-
}, {
|
|
611
|
+
children: [_jsxs("div", {
|
|
612
|
+
className: "igloo-form-filter-drop-down-container-content",
|
|
610
613
|
children: [_jsxs(_Space, {
|
|
611
614
|
children: [_jsx(FilterOutlined, {
|
|
612
615
|
style: {
|
|
613
616
|
fontSize: '24px',
|
|
614
617
|
color: '#666666'
|
|
615
618
|
}
|
|
616
|
-
}, void 0), _jsx(Typography,
|
|
617
|
-
level: "h4"
|
|
618
|
-
}, {
|
|
619
|
+
}, void 0), _jsx(Typography, {
|
|
620
|
+
level: "h4",
|
|
619
621
|
children: filterTitle
|
|
620
|
-
}
|
|
622
|
+
}, void 0)]
|
|
621
623
|
}, void 0), _jsx(_Divider, {
|
|
622
624
|
style: {
|
|
623
625
|
margin: '16px 0px'
|
|
@@ -696,13 +698,12 @@ var FilterComponent = function FilterComponent(props) {
|
|
|
696
698
|
}, key);
|
|
697
699
|
}
|
|
698
700
|
})]
|
|
699
|
-
}
|
|
701
|
+
}, void 0), _jsxs("div", {
|
|
700
702
|
className: "igloo-form-filter-drop-down-footer",
|
|
701
703
|
onClick: function onClick(e) {
|
|
702
704
|
return e.stopPropagation();
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
children: [_jsx("span", Object.assign({
|
|
705
|
+
},
|
|
706
|
+
children: [_jsx("span", {
|
|
706
707
|
onClick: function onClick() {
|
|
707
708
|
setTimeout(function () {
|
|
708
709
|
setTimeRangeType(-1);
|
|
@@ -711,19 +712,16 @@ var FilterComponent = function FilterComponent(props) {
|
|
|
711
712
|
value: _objectSpread({}, defaultOptions)
|
|
712
713
|
});
|
|
713
714
|
}, 10);
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
level: "h4"
|
|
718
|
-
}, {
|
|
715
|
+
},
|
|
716
|
+
children: _jsx(Typography, {
|
|
717
|
+
level: "h4",
|
|
719
718
|
children: formatMessage({
|
|
720
719
|
id: 'Reset All Filters'
|
|
721
720
|
})
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
size: 16
|
|
725
|
-
|
|
726
|
-
children: [_jsx("span", Object.assign({
|
|
721
|
+
}, void 0)
|
|
722
|
+
}, void 0), _jsxs(_Space, {
|
|
723
|
+
size: 16,
|
|
724
|
+
children: [_jsx("span", {
|
|
727
725
|
onClick: function onClick() {
|
|
728
726
|
setDropVisible(false);
|
|
729
727
|
dispatchOptionsChange({
|
|
@@ -731,16 +729,14 @@ var FilterComponent = function FilterComponent(props) {
|
|
|
731
729
|
value: confirmed
|
|
732
730
|
});
|
|
733
731
|
setTimeRangeType(confirmedTimeRange);
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
level: "h4"
|
|
738
|
-
}, {
|
|
732
|
+
},
|
|
733
|
+
children: _jsx(Typography, {
|
|
734
|
+
level: "h4",
|
|
739
735
|
children: formatMessage({
|
|
740
736
|
id: 'Cancel'
|
|
741
737
|
})
|
|
742
|
-
}
|
|
743
|
-
}
|
|
738
|
+
}, void 0)
|
|
739
|
+
}, void 0), _jsx(_Button, {
|
|
744
740
|
onClick: function onClick() {
|
|
745
741
|
setDropVisible(false);
|
|
746
742
|
setShowSearchInputDefault(false);
|
|
@@ -758,27 +754,24 @@ var FilterComponent = function FilterComponent(props) {
|
|
|
758
754
|
} else {
|
|
759
755
|
setHighLightFilter(false);
|
|
760
756
|
}
|
|
761
|
-
}
|
|
762
|
-
|
|
763
|
-
children: _jsx(Typography, Object.assign({
|
|
757
|
+
},
|
|
758
|
+
children: _jsx(Typography, {
|
|
764
759
|
level: "h4",
|
|
765
760
|
style: {
|
|
766
761
|
padding: '0px 35px'
|
|
767
|
-
}
|
|
768
|
-
}, {
|
|
762
|
+
},
|
|
769
763
|
children: formatMessage({
|
|
770
764
|
id: 'Apply'
|
|
771
765
|
})
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
|
-
}
|
|
775
|
-
}
|
|
766
|
+
}, void 0)
|
|
767
|
+
}, void 0)]
|
|
768
|
+
}, void 0)]
|
|
769
|
+
}, void 0)]
|
|
776
770
|
}, 1)
|
|
777
771
|
}, void 0);
|
|
778
772
|
|
|
779
|
-
return _jsxs("div",
|
|
780
|
-
className: "".concat(showIdSelect ? 'igloo-form-filter-with-select' : 'igloo-form-filter')
|
|
781
|
-
}, {
|
|
773
|
+
return _jsxs("div", {
|
|
774
|
+
className: "".concat(showIdSelect ? 'igloo-form-filter-with-select' : 'igloo-form-filter'),
|
|
782
775
|
children: [_jsx(_Input, {
|
|
783
776
|
ref: invisibleRef,
|
|
784
777
|
style: {
|
|
@@ -787,7 +780,7 @@ var FilterComponent = function FilterComponent(props) {
|
|
|
787
780
|
padding: '0px',
|
|
788
781
|
border: '0px'
|
|
789
782
|
}
|
|
790
|
-
}, void 0), showIdSelect && idKeyTypes.length !== 0 && _jsx(Select,
|
|
783
|
+
}, void 0), showIdSelect && idKeyTypes.length !== 0 && _jsx(Select, {
|
|
791
784
|
className: "igloo-form-filter-id-select",
|
|
792
785
|
onChange: function onChange(e) {
|
|
793
786
|
return setIdName(String(e));
|
|
@@ -797,23 +790,19 @@ var FilterComponent = function FilterComponent(props) {
|
|
|
797
790
|
style: {
|
|
798
791
|
fontSize: 24
|
|
799
792
|
}
|
|
800
|
-
}, void 0)
|
|
801
|
-
}, {
|
|
793
|
+
}, void 0),
|
|
802
794
|
children: idKeyTypes.map(function (item) {
|
|
803
|
-
return _jsx(Option,
|
|
804
|
-
value: item.value
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
level: "body1"
|
|
808
|
-
}, {
|
|
795
|
+
return _jsx(Option, {
|
|
796
|
+
value: item.value,
|
|
797
|
+
children: _jsx(Typography, {
|
|
798
|
+
level: "body1",
|
|
809
799
|
children: item.label
|
|
810
|
-
}
|
|
811
|
-
}
|
|
800
|
+
}, void 0)
|
|
801
|
+
}, item.value);
|
|
812
802
|
})
|
|
813
|
-
}
|
|
814
|
-
className: "igloo-filter-tag-position-reference"
|
|
815
|
-
|
|
816
|
-
children: [_jsxs("div", Object.assign({
|
|
803
|
+
}, void 0), (hightLightFilterButton || showDefaultOptions || stillHaveTagsToDelete) && !noFilters && !showSearchInputDefault && !showSearchInputWhenHasTag ? _jsxs("div", {
|
|
804
|
+
className: "igloo-filter-tag-position-reference",
|
|
805
|
+
children: [_jsxs("div", {
|
|
817
806
|
ref: heightRef,
|
|
818
807
|
className: classname({
|
|
819
808
|
'tag-defalut-container-hide-status': inputExtend,
|
|
@@ -827,26 +816,22 @@ var FilterComponent = function FilterComponent(props) {
|
|
|
827
816
|
if (onlyHaveCanNotDeleteTags) {
|
|
828
817
|
setShowSearchInputWhenHasTag(true);
|
|
829
818
|
}
|
|
830
|
-
}
|
|
831
|
-
}, {
|
|
819
|
+
},
|
|
832
820
|
children: [_jsx(SearchOutlined, {
|
|
833
821
|
className: 'search-icon'
|
|
834
|
-
}, void 0), _jsxs(_Space,
|
|
822
|
+
}, void 0), _jsxs(_Space, {
|
|
835
823
|
size: [12, 8],
|
|
836
824
|
className: "tag-container",
|
|
837
825
|
style: {
|
|
838
826
|
flex: '1'
|
|
839
|
-
}
|
|
840
|
-
}, {
|
|
827
|
+
},
|
|
841
828
|
children: [_toConsumableArray(inputExtend ? choosedTags : maxTagsWhenClosed).map(function (item, index) {
|
|
842
|
-
return _jsxs("div",
|
|
843
|
-
className: "tag-card"
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
level: "body3"
|
|
847
|
-
}, {
|
|
829
|
+
return _jsxs("div", {
|
|
830
|
+
className: "tag-card",
|
|
831
|
+
children: [_jsx(Typography, {
|
|
832
|
+
level: "body3",
|
|
848
833
|
children: item.label
|
|
849
|
-
}
|
|
834
|
+
}, void 0), !item.canNotDelete && _jsx(CrossOutlined, {
|
|
850
835
|
className: "delete-icon",
|
|
851
836
|
onClick: function onClick(e) {
|
|
852
837
|
e.stopPropagation();
|
|
@@ -879,11 +864,11 @@ var FilterComponent = function FilterComponent(props) {
|
|
|
879
864
|
deleteSomeOne(confirmed, item, [statusCallBack, handleFilter]);
|
|
880
865
|
}
|
|
881
866
|
}, void 0)]
|
|
882
|
-
}
|
|
867
|
+
}, index);
|
|
883
868
|
}), !oneLineCanShow && !inputExtend && _jsx("span", {
|
|
884
869
|
children: "..."
|
|
885
870
|
}, void 0)]
|
|
886
|
-
}
|
|
871
|
+
}, void 0), !onlyHaveCanNotDeleteTags && _jsx(CrossOutlined, {
|
|
887
872
|
className: "delete-all-icon",
|
|
888
873
|
onClick: function onClick(e) {
|
|
889
874
|
e.stopPropagation();
|
|
@@ -911,7 +896,7 @@ var FilterComponent = function FilterComponent(props) {
|
|
|
911
896
|
}
|
|
912
897
|
}
|
|
913
898
|
}, void 0)]
|
|
914
|
-
}
|
|
899
|
+
}, void 0), _jsxs("div", {
|
|
915
900
|
ref: openStatusTagRef,
|
|
916
901
|
className: classname('tag-extend-container-hide-status', {
|
|
917
902
|
'igloo-form-filter-has-select-tag-container': showIdSelect,
|
|
@@ -927,26 +912,22 @@ var FilterComponent = function FilterComponent(props) {
|
|
|
927
912
|
if (onlyHaveCanNotDeleteTags) {
|
|
928
913
|
setShowSearchInputWhenHasTag(true);
|
|
929
914
|
}
|
|
930
|
-
}
|
|
931
|
-
}, {
|
|
915
|
+
},
|
|
932
916
|
children: [_jsx(SearchOutlined, {
|
|
933
917
|
className: 'search-icon'
|
|
934
|
-
}, void 0), _jsx(_Space,
|
|
918
|
+
}, void 0), _jsx(_Space, {
|
|
935
919
|
size: [12, 8],
|
|
936
920
|
className: "tag-container",
|
|
937
921
|
style: {
|
|
938
922
|
flex: '1'
|
|
939
|
-
}
|
|
940
|
-
}, {
|
|
923
|
+
},
|
|
941
924
|
children: _toConsumableArray(inputExtend ? choosedTags : maxTagsWhenClosed).map(function (item, index) {
|
|
942
|
-
return _jsxs("div",
|
|
943
|
-
className: "tag-card"
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
level: "body3"
|
|
947
|
-
}, {
|
|
925
|
+
return _jsxs("div", {
|
|
926
|
+
className: "tag-card",
|
|
927
|
+
children: [_jsx(Typography, {
|
|
928
|
+
level: "body3",
|
|
948
929
|
children: item.label
|
|
949
|
-
}
|
|
930
|
+
}, void 0), !item.canNotDelete && _jsx(CrossOutlined, {
|
|
950
931
|
className: "delete-icon",
|
|
951
932
|
onClick: function onClick(e) {
|
|
952
933
|
e.stopPropagation();
|
|
@@ -979,9 +960,9 @@ var FilterComponent = function FilterComponent(props) {
|
|
|
979
960
|
deleteSomeOne(confirmed, item, [statusCallBack, handleFilter]);
|
|
980
961
|
}
|
|
981
962
|
}, void 0)]
|
|
982
|
-
}
|
|
963
|
+
}, index);
|
|
983
964
|
})
|
|
984
|
-
}
|
|
965
|
+
}, void 0), !onlyHaveCanNotDeleteTags && _jsx(CrossOutlined, {
|
|
985
966
|
className: "delete-all-icon",
|
|
986
967
|
onClick: function onClick() {
|
|
987
968
|
setTimeRangeType(-1);
|
|
@@ -1008,8 +989,8 @@ var FilterComponent = function FilterComponent(props) {
|
|
|
1008
989
|
}
|
|
1009
990
|
}
|
|
1010
991
|
}, void 0)]
|
|
1011
|
-
}
|
|
1012
|
-
}
|
|
992
|
+
}, void 0)]
|
|
993
|
+
}, void 0) : _jsx(_Input, {
|
|
1013
994
|
ref: searchInput,
|
|
1014
995
|
value: searchInputValue,
|
|
1015
996
|
onChange: function onChange(e) {
|
|
@@ -1050,7 +1031,7 @@ var FilterComponent = function FilterComponent(props) {
|
|
|
1050
1031
|
onFilter(value);
|
|
1051
1032
|
typeof parentFilterCallBack === 'function' && parentFilterCallBack(value);
|
|
1052
1033
|
}
|
|
1053
|
-
}, void 0), _jsx(_Dropdown,
|
|
1034
|
+
}, void 0), !inputOnly && _jsx(_Dropdown, {
|
|
1054
1035
|
getPopupContainer: function getPopupContainer() {
|
|
1055
1036
|
return dropDownContainerRef.current;
|
|
1056
1037
|
},
|
|
@@ -1074,12 +1055,10 @@ var FilterComponent = function FilterComponent(props) {
|
|
|
1074
1055
|
}
|
|
1075
1056
|
}, 0);
|
|
1076
1057
|
},
|
|
1077
|
-
trigger: ['click']
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
}, {
|
|
1082
|
-
children: _jsx(_Button, Object.assign({
|
|
1058
|
+
trigger: ['click'],
|
|
1059
|
+
children: _jsx("div", {
|
|
1060
|
+
className: "igloo-form-filter-button-container",
|
|
1061
|
+
children: _jsx(_Button, {
|
|
1083
1062
|
className: classname('igloo-form-filter-filter-button', {
|
|
1084
1063
|
'igloo-form-filter-filter-button-active': dropVisible,
|
|
1085
1064
|
'igloo-form-filter-filter-button-high-light': hightLightFilterButton
|
|
@@ -1091,26 +1070,23 @@ var FilterComponent = function FilterComponent(props) {
|
|
|
1091
1070
|
}, void 0),
|
|
1092
1071
|
onClick: function onClick() {
|
|
1093
1072
|
setDropVisible(true);
|
|
1094
|
-
}
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
children: _jsx(Typography, Object.assign({
|
|
1100
|
-
level: "body1"
|
|
1101
|
-
}, {
|
|
1073
|
+
},
|
|
1074
|
+
children: _jsx("span", {
|
|
1075
|
+
className: "filter-text",
|
|
1076
|
+
children: _jsx(Typography, {
|
|
1077
|
+
level: "body1",
|
|
1102
1078
|
children: formatMessage({
|
|
1103
1079
|
id: 'Filter'
|
|
1104
1080
|
})
|
|
1105
|
-
}
|
|
1106
|
-
}
|
|
1107
|
-
}
|
|
1108
|
-
}
|
|
1109
|
-
}
|
|
1081
|
+
}, void 0)
|
|
1082
|
+
}, void 0)
|
|
1083
|
+
}, void 0)
|
|
1084
|
+
}, void 0)
|
|
1085
|
+
}, void 0), _jsx("div", {
|
|
1110
1086
|
className: "igloo-form-filter-drop-down",
|
|
1111
1087
|
ref: dropDownContainerRef
|
|
1112
1088
|
}, void 0)]
|
|
1113
|
-
}
|
|
1089
|
+
}, void 0);
|
|
1114
1090
|
};
|
|
1115
1091
|
|
|
1116
1092
|
export default FilterComponent;
|
package/es/filter/radioBox.js
CHANGED
|
@@ -16,52 +16,44 @@ var CreateRadioBoxFilter = function CreateRadioBoxFilter(props) {
|
|
|
16
16
|
disabled = props.disabled,
|
|
17
17
|
valueConfirm = props.valueConfirm,
|
|
18
18
|
chooseed = props.chooseed;
|
|
19
|
-
return _jsxs("div",
|
|
20
|
-
className: "igloo-form-filter-drop-down-container-content-group"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
children: _jsx(Typography, Object.assign({
|
|
26
|
-
level: "h4"
|
|
27
|
-
}, {
|
|
19
|
+
return _jsxs("div", {
|
|
20
|
+
className: "igloo-form-filter-drop-down-container-content-group",
|
|
21
|
+
children: [_jsx("div", {
|
|
22
|
+
className: "igloo-form-filter-drop-down-container-content-group-title",
|
|
23
|
+
children: _jsx(Typography, {
|
|
24
|
+
level: "h4",
|
|
28
25
|
children: title
|
|
29
|
-
}
|
|
30
|
-
}
|
|
26
|
+
}, void 0)
|
|
27
|
+
}, void 0), _jsx(_Radio.Group, {
|
|
31
28
|
value: chooseed,
|
|
32
29
|
onChange: function onChange(e) {
|
|
33
30
|
return valueConfirm({
|
|
34
31
|
type: optionKey,
|
|
35
32
|
value: e.target.value
|
|
36
33
|
});
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
gutter: [24, 16]
|
|
41
|
-
}, {
|
|
34
|
+
},
|
|
35
|
+
children: _jsx(_Row, {
|
|
36
|
+
gutter: [24, 16],
|
|
42
37
|
children: configList.map(function (item) {
|
|
43
|
-
return _jsx(_Col,
|
|
44
|
-
span: item.span || 8
|
|
45
|
-
|
|
46
|
-
children: _jsx(_Radio, Object.assign({
|
|
38
|
+
return _jsx(_Col, {
|
|
39
|
+
span: item.span || 8,
|
|
40
|
+
children: _jsx(_Radio, {
|
|
47
41
|
value: item.value,
|
|
48
|
-
disabled: disabled === null || disabled === void 0 ? void 0 : disabled.includes(item.value)
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
level: "body1"
|
|
52
|
-
}, {
|
|
42
|
+
disabled: disabled === null || disabled === void 0 ? void 0 : disabled.includes(item.value),
|
|
43
|
+
children: _jsx(Typography, {
|
|
44
|
+
level: "body1",
|
|
53
45
|
children: item.label
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
46
|
+
}, void 0)
|
|
47
|
+
}, void 0)
|
|
48
|
+
}, item.value);
|
|
57
49
|
})
|
|
58
|
-
}
|
|
59
|
-
}
|
|
50
|
+
}, void 0)
|
|
51
|
+
}, void 0), _jsx(_Divider, {
|
|
60
52
|
style: {
|
|
61
53
|
margin: '16px 0px'
|
|
62
54
|
}
|
|
63
55
|
}, void 0)]
|
|
64
|
-
}
|
|
56
|
+
}, optionKey);
|
|
65
57
|
};
|
|
66
58
|
|
|
67
59
|
export default CreateRadioBoxFilter;
|