iglooform 2.4.7 → 2.4.11

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.
Files changed (262) hide show
  1. package/es/admin-upload/float.js +25 -35
  2. package/es/admin-upload/index.d.ts +2 -0
  3. package/es/admin-upload/index.js +43 -36
  4. package/es/admin-upload/job-list.js +85 -115
  5. package/es/admin-upload/modal.js +19 -26
  6. package/es/alert-message/index.js +11 -9
  7. package/es/amount/index.js +10 -5
  8. package/es/back-top/index.js +14 -10
  9. package/es/button/index.js +23 -28
  10. package/es/button/style/index.less +23 -19
  11. package/es/card-detail/card-group.js +16 -22
  12. package/es/card-detail/card-item.js +16 -21
  13. package/es/card-detail/card-page.js +11 -15
  14. package/es/card-detail/card.js +24 -24
  15. package/es/card-detail/style/index.less +13 -0
  16. package/es/card-detail/utils.js +6 -7
  17. package/es/checkbox/index.js +23 -22
  18. package/es/claim-list/index.js +53 -70
  19. package/es/confirmation/index.js +7 -9
  20. package/es/date-picker/buddhist.js +3 -3
  21. package/es/date-picker/index.js +10 -4
  22. package/es/declaration/index.js +16 -13
  23. package/es/detail-panel/index.js +67 -83
  24. package/es/documents/index.js +6 -8
  25. package/es/example/index.js +9 -11
  26. package/es/filter/checkBox.js +33 -45
  27. package/es/filter/customize.js +3 -4
  28. package/es/filter/index.d.ts +1 -0
  29. package/es/filter/index.js +88 -112
  30. package/es/filter/radioBox.js +23 -31
  31. package/es/filter/rangePicker.js +43 -59
  32. package/es/form/addable-section/index.d.ts +19 -0
  33. package/es/form/addable-section/index.js +211 -0
  34. package/es/form/addable-section/style/index.d.ts +1 -0
  35. package/es/form/addable-section/style/index.js +1 -0
  36. package/es/form/addable-section/style/index.less +22 -0
  37. package/es/form/divider/index.js +7 -1
  38. package/es/form/element/index.js +58 -47
  39. package/es/form/element/style/index.less +9 -0
  40. package/es/form/index.js +16 -17
  41. package/es/form/login/index.js +15 -20
  42. package/es/form/page/index.js +18 -24
  43. package/es/form/page/style/index.less +1 -1
  44. package/es/form/pages/index.js +23 -32
  45. package/es/form/pages/style/index.less +3 -1
  46. package/es/form/render/index.js +1 -1
  47. package/es/form/section/index.js +14 -17
  48. package/es/form/step/index.js +31 -42
  49. package/es/form/steps/index.js +8 -11
  50. package/es/{form/context.d.ts → form-context.d.ts} +1 -0
  51. package/es/{form/context.js → form-context.js} +0 -0
  52. package/es/free-form/addable-section/index.d.ts +18 -0
  53. package/es/free-form/addable-section/index.js +286 -0
  54. package/es/free-form/addable-section/style/index.d.ts +1 -0
  55. package/es/free-form/addable-section/style/index.js +1 -0
  56. package/es/free-form/addable-section/style/index.less +22 -0
  57. package/es/free-form/element/index.js +43 -41
  58. package/es/free-form/element/style/index.less +12 -2
  59. package/es/free-form/index.d.ts +5 -1
  60. package/es/free-form/index.js +17 -17
  61. package/es/free-form/page/index.js +36 -46
  62. package/es/free-form/page/style/index.less +3 -1
  63. package/es/free-form/pages/index.js +8 -10
  64. package/es/free-form/section/index.js +20 -22
  65. package/es/free-form/section/style/index.less +4 -0
  66. package/es/free-form/step/index.js +37 -47
  67. package/es/free-form/steps/index.js +8 -10
  68. package/es/global-message/index.js +1 -1
  69. package/es/home-menu/index.js +52 -71
  70. package/es/index.d.ts +1 -0
  71. package/es/index.js +2 -1
  72. package/es/input/amount.js +10 -5
  73. package/es/input/credit-card.js +7 -1
  74. package/es/input/email.js +8 -1
  75. package/es/input/expiry-date.js +14 -18
  76. package/es/input/input-date.js +12 -16
  77. package/es/input/input-number.js +9 -2
  78. package/es/input/input.js +9 -2
  79. package/es/input/otp.js +17 -15
  80. package/es/input/password.js +12 -6
  81. package/es/input/phone-number.js +6 -8
  82. package/es/input/style/index.less +9 -1
  83. package/es/input/text-area.js +14 -10
  84. package/es/layout/defaultFooter.js +60 -82
  85. package/es/layout/defaultHeader.js +11 -15
  86. package/es/layout/footer.js +108 -148
  87. package/es/layout/header.js +51 -60
  88. package/es/layout/index.js +16 -12
  89. package/es/locale/en-US/messages.json +2 -0
  90. package/es/locale/id-ID/messages.json +2 -0
  91. package/es/locale/locale-provider.js +8 -10
  92. package/es/locale/th-TH/messages.json +2 -0
  93. package/es/locale/vi-VN/messages.json +2 -0
  94. package/es/locale/zh-CN/messages.json +2 -0
  95. package/es/login-page/index.js +30 -42
  96. package/es/media/index.js +20 -27
  97. package/es/media/media.js +9 -12
  98. package/es/media/preview.js +8 -10
  99. package/es/mobile-insurer-detail/index.js +74 -91
  100. package/es/mobile-insurer-list/index.js +34 -38
  101. package/es/modal/index.d.ts +4 -3
  102. package/es/modal/index.js +25 -27
  103. package/es/modal/style/index.less +24 -5
  104. package/es/platform/platform-card/index.js +9 -12
  105. package/es/platform/switch-platform/index.js +24 -32
  106. package/es/policy-list/index.js +11 -14
  107. package/es/policy-list/policy-card.js +119 -153
  108. package/es/radio/index.js +33 -35
  109. package/es/select/attached-select.js +31 -34
  110. package/es/select/select.js +12 -8
  111. package/es/select/style/index.less +1 -1
  112. package/es/select/time-select.js +12 -16
  113. package/es/status-box/index.js +8 -10
  114. package/es/table/index.js +72 -96
  115. package/es/tabs/index.js +7 -1
  116. package/es/types.d.ts +4 -2
  117. package/es/typography/index.js +6 -8
  118. package/es/upload/index.d.ts +2 -1
  119. package/es/upload/index.js +169 -143
  120. package/es/upload-photo/index.d.ts +2 -1
  121. package/es/upload-photo/index.js +170 -142
  122. package/es/upload-photo/media.js +3 -4
  123. package/es/upload-preview/index.js +9 -12
  124. package/es/upload-preview/media.js +12 -16
  125. package/es/upload-preview/style/index.less +2 -2
  126. package/es/utils/form-utils.js +49 -36
  127. package/lib/admin-upload/float.js +25 -35
  128. package/lib/admin-upload/index.d.ts +2 -0
  129. package/lib/admin-upload/index.js +43 -36
  130. package/lib/admin-upload/job-list.js +85 -115
  131. package/lib/admin-upload/modal.js +19 -26
  132. package/lib/alert-message/index.js +11 -9
  133. package/lib/amount/index.js +10 -5
  134. package/lib/back-top/index.js +14 -10
  135. package/lib/button/index.js +24 -29
  136. package/lib/button/style/index.less +23 -19
  137. package/lib/card-detail/card-group.js +16 -22
  138. package/lib/card-detail/card-item.js +16 -21
  139. package/lib/card-detail/card-page.js +11 -15
  140. package/lib/card-detail/card.js +24 -24
  141. package/lib/card-detail/index.js +6 -6
  142. package/lib/card-detail/style/index.less +13 -0
  143. package/lib/card-detail/utils.js +7 -8
  144. package/lib/checkbox/index.js +24 -23
  145. package/lib/claim-list/index.js +53 -70
  146. package/lib/confirmation/index.js +7 -9
  147. package/lib/date-picker/buddhist.js +3 -3
  148. package/lib/date-picker/index.js +11 -5
  149. package/lib/declaration/index.js +16 -13
  150. package/lib/detail-panel/index.js +67 -83
  151. package/lib/documents/index.js +6 -8
  152. package/lib/example/index.js +10 -12
  153. package/lib/filter/checkBox.js +33 -45
  154. package/lib/filter/customize.js +3 -4
  155. package/lib/filter/index.d.ts +1 -0
  156. package/lib/filter/index.js +88 -112
  157. package/lib/filter/radioBox.js +23 -31
  158. package/lib/filter/rangePicker.js +43 -59
  159. package/lib/form/addable-section/index.d.ts +19 -0
  160. package/lib/form/addable-section/index.js +232 -0
  161. package/lib/form/addable-section/style/index.d.ts +1 -0
  162. package/lib/form/addable-section/style/index.js +3 -0
  163. package/lib/form/addable-section/style/index.less +22 -0
  164. package/lib/form/divider/index.js +7 -1
  165. package/lib/form/element/index.js +60 -48
  166. package/lib/form/element/style/index.less +9 -0
  167. package/lib/form/elements.js +1 -1
  168. package/lib/form/index.js +16 -17
  169. package/lib/form/login/index.js +16 -21
  170. package/lib/form/page/index.js +19 -25
  171. package/lib/form/page/style/index.less +1 -1
  172. package/lib/form/pages/index.js +24 -33
  173. package/lib/form/pages/style/index.less +3 -1
  174. package/lib/form/render/index.js +2 -2
  175. package/lib/form/section/index.js +15 -18
  176. package/lib/form/step/index.js +32 -43
  177. package/lib/form/steps/index.js +9 -12
  178. package/lib/{form/context.d.ts → form-context.d.ts} +1 -0
  179. package/lib/{form/context.js → form-context.js} +0 -0
  180. package/lib/free-form/addable-section/index.d.ts +18 -0
  181. package/lib/free-form/addable-section/index.js +306 -0
  182. package/lib/free-form/addable-section/style/index.d.ts +1 -0
  183. package/lib/free-form/addable-section/style/index.js +3 -0
  184. package/lib/free-form/addable-section/style/index.less +22 -0
  185. package/lib/free-form/element/index.js +44 -42
  186. package/lib/free-form/element/style/index.less +12 -2
  187. package/lib/free-form/index.d.ts +5 -1
  188. package/lib/free-form/index.js +17 -17
  189. package/lib/free-form/page/index.js +37 -47
  190. package/lib/free-form/page/style/index.less +3 -1
  191. package/lib/free-form/pages/index.js +8 -10
  192. package/lib/free-form/section/index.js +21 -23
  193. package/lib/free-form/section/style/index.less +4 -0
  194. package/lib/free-form/step/index.js +38 -48
  195. package/lib/free-form/steps/index.js +9 -11
  196. package/lib/global-message/index.js +1 -1
  197. package/lib/home-menu/index.js +52 -71
  198. package/lib/index.d.ts +1 -0
  199. package/lib/index.js +141 -132
  200. package/lib/input/amount.js +10 -5
  201. package/lib/input/credit-card.js +7 -1
  202. package/lib/input/email.js +7 -1
  203. package/lib/input/expiry-date.js +14 -18
  204. package/lib/input/index.js +18 -18
  205. package/lib/input/input-date.js +12 -16
  206. package/lib/input/input-number.js +8 -2
  207. package/lib/input/input.js +8 -2
  208. package/lib/input/otp.js +17 -15
  209. package/lib/input/password.js +11 -6
  210. package/lib/input/phone-number.js +6 -8
  211. package/lib/input/style/index.less +9 -1
  212. package/lib/input/text-area.js +14 -10
  213. package/lib/layout/defaultFooter.js +60 -82
  214. package/lib/layout/defaultHeader.js +11 -15
  215. package/lib/layout/footer.js +108 -148
  216. package/lib/layout/header.js +51 -60
  217. package/lib/layout/index.js +15 -12
  218. package/lib/locale/en-US/messages.json +2 -0
  219. package/lib/locale/format-message.js +1 -1
  220. package/lib/locale/id-ID/messages.json +2 -0
  221. package/lib/locale/index.js +4 -4
  222. package/lib/locale/locale-provider.js +9 -11
  223. package/lib/locale/th-TH/messages.json +2 -0
  224. package/lib/locale/vi-VN/messages.json +2 -0
  225. package/lib/locale/zh-CN/messages.json +2 -0
  226. package/lib/login-page/index.js +30 -42
  227. package/lib/media/index.js +20 -27
  228. package/lib/media/media.js +9 -12
  229. package/lib/media/preview.js +8 -10
  230. package/lib/mobile-insurer-detail/index.js +74 -91
  231. package/lib/mobile-insurer-list/index.js +34 -38
  232. package/lib/modal/index.d.ts +4 -3
  233. package/lib/modal/index.js +25 -27
  234. package/lib/modal/style/index.less +24 -5
  235. package/lib/platform/platform-card/index.js +9 -12
  236. package/lib/platform/switch-platform/index.js +24 -32
  237. package/lib/policy-list/index.js +11 -14
  238. package/lib/policy-list/policy-card.js +119 -153
  239. package/lib/radio/index.js +33 -35
  240. package/lib/select/attached-select.js +32 -35
  241. package/lib/select/select.js +13 -9
  242. package/lib/select/style/index.less +1 -1
  243. package/lib/select/time-select.js +12 -16
  244. package/lib/status-box/index.js +8 -10
  245. package/lib/table/index.js +72 -96
  246. package/lib/tabs/index.js +8 -2
  247. package/lib/types.d.ts +4 -2
  248. package/lib/typography/index.js +6 -8
  249. package/lib/upload/index.d.ts +2 -1
  250. package/lib/upload/index.js +170 -143
  251. package/lib/upload-photo/index.d.ts +2 -1
  252. package/lib/upload-photo/index.js +171 -142
  253. package/lib/upload-photo/media.js +3 -4
  254. package/lib/upload-preview/index.js +9 -12
  255. package/lib/upload-preview/media.js +12 -16
  256. package/lib/upload-preview/style/index.less +2 -2
  257. package/lib/utils/form-utils.js +49 -37
  258. package/package.json +1 -1
  259. package/es/free-form/context.d.ts +0 -19
  260. package/es/free-form/context.js +0 -7
  261. package/lib/free-form/context.d.ts +0 -19
  262. package/lib/free-form/context.js +0 -19
@@ -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); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
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] != 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; }
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, Object.assign({
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), _jsx("div", {
106
- children: /*#__PURE__*/React.cloneElement(children, _objectSpread(_objectSpread({}, rest), {}, {
107
- onSubmit: handleSubmit
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
- }), void 0);
113
+ }, void 0);
116
114
  };
117
115
 
118
116
  export default Excample;
@@ -73,17 +73,14 @@ var CratetCheckBoxFilter = function CratetCheckBoxFilter(props) {
73
73
  setAllChoose(false);
74
74
  }
75
75
  }, [chooseed.length, allCanChoose]);
76
- return _jsxs("div", Object.assign({
77
- className: "igloo-form-filter-drop-down-container-content-group"
78
- }, {
79
- children: [_jsxs("div", Object.assign({
80
- className: "igloo-form-filter-drop-down-container-content-group-title"
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
- }), void 0), allChoose ? _jsx("span", Object.assign({
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
- children: _jsx(Typography, Object.assign({
97
- level: "h4"
98
- }, {
91
+ },
92
+ children: _jsx(Typography, {
93
+ level: "h4",
99
94
  children: formatMessage({
100
95
  id: 'Unselect All'
101
96
  })
102
- }), void 0)
103
- }), void 0) : _jsx("span", Object.assign({
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
- children: _jsx(Typography, Object.assign({
114
- level: "h4"
115
- }, {
106
+ },
107
+ children: _jsx(Typography, {
108
+ level: "h4",
116
109
  children: formatMessage({
117
110
  id: 'Select All'
118
111
  })
119
- }), void 0)
120
- }), void 0)]
121
- }), void 0), _jsx(_Checkbox.Group, Object.assign({
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
- children: _jsx(_Row, Object.assign({
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, Object.assign({
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
- children: _jsx(Typography, Object.assign({
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
- }), void 0)
149
- }), void 0)
150
- }), item.value);
136
+ }, void 0)
137
+ }, void 0)
138
+ }, item.value);
151
139
  })
152
- }), void 0)
153
- }), String(timeKey.valueOf())), _jsx(_Divider, {
140
+ }, void 0)
141
+ }, String(timeKey.valueOf())), _jsx(_Divider, {
154
142
  style: {
155
143
  margin: '16px 0px'
156
144
  }
157
145
  }, void 0)]
158
- }), optionKey);
146
+ }, optionKey);
159
147
  };
160
148
 
161
149
  export default CratetCheckBoxFilter;
@@ -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", Object.assign({
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
- }), optionKey);
17
+ }, optionKey);
19
18
  };
20
19
 
21
20
  export default CustomizeFilter;
@@ -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;
@@ -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); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
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] != 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; }
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"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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", Object.assign({
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, Object.assign({
617
- level: "h4"
618
- }, {
619
+ }, void 0), _jsx(Typography, {
620
+ level: "h4",
619
621
  children: filterTitle
620
- }), void 0)]
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
- }), void 0), _jsxs("div", Object.assign({
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
- children: _jsx(Typography, Object.assign({
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
- }), void 0)
723
- }), void 0), _jsxs(_Space, Object.assign({
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
- children: _jsx(Typography, Object.assign({
737
- level: "h4"
738
- }, {
732
+ },
733
+ children: _jsx(Typography, {
734
+ level: "h4",
739
735
  children: formatMessage({
740
736
  id: 'Cancel'
741
737
  })
742
- }), void 0)
743
- }), void 0), _jsx(_Button, Object.assign({
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
- }), void 0)
773
- }), void 0)]
774
- }), void 0)]
775
- }), void 0)]
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", Object.assign({
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, Object.assign({
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, Object.assign({
804
- value: item.value
805
- }, {
806
- children: _jsx(Typography, Object.assign({
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
- }), void 0)
811
- }), item.value);
800
+ }, void 0)
801
+ }, item.value);
812
802
  })
813
- }), void 0), (hightLightFilterButton || showDefaultOptions || stillHaveTagsToDelete) && !noFilters && !showSearchInputDefault && !showSearchInputWhenHasTag ? _jsxs("div", Object.assign({
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, Object.assign({
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", Object.assign({
843
- className: "tag-card"
844
- }, {
845
- children: [_jsx(Typography, Object.assign({
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
- }), void 0), !item.canNotDelete && _jsx(CrossOutlined, {
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
- }), index);
867
+ }, index);
883
868
  }), !oneLineCanShow && !inputExtend && _jsx("span", {
884
869
  children: "..."
885
870
  }, void 0)]
886
- }), void 0), !onlyHaveCanNotDeleteTags && _jsx(CrossOutlined, {
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
- }), void 0), _jsxs("div", Object.assign({
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, Object.assign({
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", Object.assign({
943
- className: "tag-card"
944
- }, {
945
- children: [_jsx(Typography, Object.assign({
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
- }), void 0), !item.canNotDelete && _jsx(CrossOutlined, {
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
- }), index);
963
+ }, index);
983
964
  })
984
- }), void 0), !onlyHaveCanNotDeleteTags && _jsx(CrossOutlined, {
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
- }), void 0)]
1012
- }), void 0) : _jsx(_Input, {
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, Object.assign({
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
- children: _jsx("div", Object.assign({
1080
- className: "igloo-form-filter-button-container"
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
- children: _jsx("span", Object.assign({
1097
- className: "filter-text"
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
- }), void 0)
1106
- }), void 0)
1107
- }), void 0)
1108
- }), void 0)
1109
- }), void 0), _jsx("div", {
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
- }), void 0);
1089
+ }, void 0);
1114
1090
  };
1115
1091
 
1116
1092
  export default FilterComponent;
@@ -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", Object.assign({
20
- className: "igloo-form-filter-drop-down-container-content-group"
21
- }, {
22
- children: [_jsx("div", Object.assign({
23
- className: "igloo-form-filter-drop-down-container-content-group-title"
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
- }), void 0)
30
- }), void 0), _jsx(_Radio.Group, Object.assign({
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
- children: _jsx(_Row, Object.assign({
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, Object.assign({
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
- children: _jsx(Typography, Object.assign({
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
- }), void 0)
55
- }), void 0)
56
- }), item.value);
46
+ }, void 0)
47
+ }, void 0)
48
+ }, item.value);
57
49
  })
58
- }), void 0)
59
- }), void 0), _jsx(_Divider, {
50
+ }, void 0)
51
+ }, void 0), _jsx(_Divider, {
60
52
  style: {
61
53
  margin: '16px 0px'
62
54
  }
63
55
  }, void 0)]
64
- }), optionKey);
56
+ }, optionKey);
65
57
  };
66
58
 
67
59
  export default CreateRadioBoxFilter;