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
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- 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); }
3
+ 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); }
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -31,9 +31,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
31
31
 
32
32
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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
 
@@ -100,9 +100,8 @@ var Excample = function Excample(_ref) {
100
100
  }
101
101
  };
102
102
 
103
- return (0, _jsxRuntime.jsxs)(_locale.LocaleProvider, Object.assign({
104
- currentLang: currentLang
105
- }, {
103
+ return (0, _jsxRuntime.jsxs)(_locale.LocaleProvider, {
104
+ currentLang: currentLang,
106
105
  children: [(0, _jsxRuntime.jsx)(_button.default, {
107
106
  onClick: function onClick() {
108
107
  setKey(key + 1);
@@ -124,17 +123,16 @@ var Excample = function Excample(_ref) {
124
123
  onChange: function onChange(e) {
125
124
  return setLang(e);
126
125
  }
127
- }, void 0), (0, _jsxRuntime.jsx)("div", {
128
- children: /*#__PURE__*/_react.default.cloneElement(children, _objectSpread(_objectSpread({}, rest), {}, {
129
- onSubmit: handleSubmit
130
- }))
131
- }, key), result && (0, _jsxRuntime.jsx)(_reactJsonView.default, {
126
+ }, void 0), /*#__PURE__*/_react.default.cloneElement(children, _objectSpread(_objectSpread({}, rest), {}, {
127
+ onSubmit: handleSubmit,
128
+ key: key
129
+ })), result && (0, _jsxRuntime.jsx)(_reactJsonView.default, {
132
130
  src: result,
133
131
  displayDataTypes: false,
134
132
  name: false,
135
133
  displayObjectSize: false
136
134
  }, void 0)]
137
- }), void 0);
135
+ }, void 0);
138
136
  };
139
137
 
140
138
  var _default = Excample;
@@ -92,17 +92,14 @@ var CratetCheckBoxFilter = function CratetCheckBoxFilter(props) {
92
92
  setAllChoose(false);
93
93
  }
94
94
  }, [chooseed.length, allCanChoose]);
95
- return (0, _jsxRuntime.jsxs)("div", Object.assign({
96
- className: "igloo-form-filter-drop-down-container-content-group"
97
- }, {
98
- children: [(0, _jsxRuntime.jsxs)("div", Object.assign({
99
- className: "igloo-form-filter-drop-down-container-content-group-title"
100
- }, {
101
- children: [(0, _jsxRuntime.jsx)(_typography.default, Object.assign({
102
- level: "h4"
103
- }, {
95
+ return (0, _jsxRuntime.jsxs)("div", {
96
+ className: "igloo-form-filter-drop-down-container-content-group",
97
+ children: [(0, _jsxRuntime.jsxs)("div", {
98
+ className: "igloo-form-filter-drop-down-container-content-group-title",
99
+ children: [(0, _jsxRuntime.jsx)(_typography.default, {
100
+ level: "h4",
104
101
  children: title
105
- }), void 0), allChoose ? (0, _jsxRuntime.jsx)("span", Object.assign({
102
+ }, void 0), allChoose ? (0, _jsxRuntime.jsx)("span", {
106
103
  className: "igloo-form-filter-drop-down-container-content-group-title-action",
107
104
  onClick: function onClick() {
108
105
  valueConfirm({
@@ -110,16 +107,14 @@ var CratetCheckBoxFilter = function CratetCheckBoxFilter(props) {
110
107
  value: []
111
108
  });
112
109
  setAllChoose(false);
113
- }
114
- }, {
115
- children: (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
116
- level: "h4"
117
- }, {
110
+ },
111
+ children: (0, _jsxRuntime.jsx)(_typography.default, {
112
+ level: "h4",
118
113
  children: formatMessage({
119
114
  id: 'Unselect All'
120
115
  })
121
- }), void 0)
122
- }), void 0) : (0, _jsxRuntime.jsx)("span", Object.assign({
116
+ }, void 0)
117
+ }, void 0) : (0, _jsxRuntime.jsx)("span", {
123
118
  className: "igloo-form-filter-drop-down-container-content-group-title-action",
124
119
  onClick: function onClick() {
125
120
  valueConfirm({
@@ -127,17 +122,15 @@ var CratetCheckBoxFilter = function CratetCheckBoxFilter(props) {
127
122
  value: allCanChoose
128
123
  });
129
124
  setAllChoose(true);
130
- }
131
- }, {
132
- children: (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
133
- level: "h4"
134
- }, {
125
+ },
126
+ children: (0, _jsxRuntime.jsx)(_typography.default, {
127
+ level: "h4",
135
128
  children: formatMessage({
136
129
  id: 'Select All'
137
130
  })
138
- }), void 0)
139
- }), void 0)]
140
- }), void 0), (0, _jsxRuntime.jsx)(_checkbox.default.Group, Object.assign({
131
+ }, void 0)
132
+ }, void 0)]
133
+ }, void 0), (0, _jsxRuntime.jsx)(_checkbox.default.Group, {
141
134
  value: handleFilterDisable(chooseed, disabled),
142
135
  style: {
143
136
  width: '100%'
@@ -147,34 +140,29 @@ var CratetCheckBoxFilter = function CratetCheckBoxFilter(props) {
147
140
  type: optionKey,
148
141
  value: e
149
142
  });
150
- }
151
- }, {
152
- children: (0, _jsxRuntime.jsx)(_row.default, Object.assign({
153
- gutter: [24, 16]
154
- }, {
143
+ },
144
+ children: (0, _jsxRuntime.jsx)(_row.default, {
145
+ gutter: [24, 16],
155
146
  children: configList.map(function (item) {
156
- return (0, _jsxRuntime.jsx)(_col.default, Object.assign({
157
- span: item.span || 8
158
- }, {
159
- children: (0, _jsxRuntime.jsx)(_checkbox.default, Object.assign({
147
+ return (0, _jsxRuntime.jsx)(_col.default, {
148
+ span: item.span || 8,
149
+ children: (0, _jsxRuntime.jsx)(_checkbox.default, {
160
150
  value: item.value,
161
- disabled: disabled === null || disabled === void 0 ? void 0 : disabled.includes(item.value)
162
- }, {
163
- children: (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
164
- level: "body1"
165
- }, {
151
+ disabled: disabled === null || disabled === void 0 ? void 0 : disabled.includes(item.value),
152
+ children: (0, _jsxRuntime.jsx)(_typography.default, {
153
+ level: "body1",
166
154
  children: item.label
167
- }), void 0)
168
- }), void 0)
169
- }), item.value);
155
+ }, void 0)
156
+ }, void 0)
157
+ }, item.value);
170
158
  })
171
- }), void 0)
172
- }), String(timeKey.valueOf())), (0, _jsxRuntime.jsx)(_divider.default, {
159
+ }, void 0)
160
+ }, String(timeKey.valueOf())), (0, _jsxRuntime.jsx)(_divider.default, {
173
161
  style: {
174
162
  margin: '16px 0px'
175
163
  }
176
164
  }, void 0)]
177
- }), optionKey);
165
+ }, optionKey);
178
166
  };
179
167
 
180
168
  var _default = CratetCheckBoxFilter;
@@ -18,15 +18,14 @@ var CustomizeFilter = function CustomizeFilter(props) {
18
18
  value = props.value,
19
19
  onChange = props.onChange,
20
20
  render = props.render;
21
- return (0, _jsxRuntime.jsxs)("div", Object.assign({
22
- className: "igloo-form-filter-drop-down-container-content-group"
23
- }, {
21
+ return (0, _jsxRuntime.jsxs)("div", {
22
+ className: "igloo-form-filter-drop-down-container-content-group",
24
23
  children: [render(value, onChange), (0, _jsxRuntime.jsx)(_divider.default, {
25
24
  style: {
26
25
  margin: '16px 0px'
27
26
  }
28
27
  }, void 0)]
29
- }), optionKey);
28
+ }, optionKey);
30
29
  };
31
30
 
32
31
  var _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;
@@ -79,13 +79,13 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
79
79
 
80
80
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
81
81
 
82
- 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; }
82
+ 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; }
83
83
 
84
- 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; }
84
+ 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; }
85
85
 
86
86
  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; }
87
87
 
88
- 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); }
88
+ 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); }
89
89
 
90
90
  var defaultFormat = 'DD / MM / YYYY';
91
91
 
@@ -388,7 +388,8 @@ var FilterComponent = function FilterComponent(props) {
388
388
  _props$searchWithFilt = props.searchWithFilter,
389
389
  searchWithFilter = _props$searchWithFilt === void 0 ? false : _props$searchWithFilt,
390
390
  searchInputDefault = props.searchInputDefault,
391
- initValue = props.initValue;
391
+ initValue = props.initValue,
392
+ inputOnly = props.inputOnly;
392
393
  var filterTitle = props.filterTitle,
393
394
  _props$filterItems = props.filterItems,
394
395
  filterItems = _props$filterItems === void 0 ? [] : _props$filterItems; // id controller
@@ -543,11 +544,14 @@ var FilterComponent = function FilterComponent(props) {
543
544
  }, [JSON.stringify(filterItems)]); // 设置tag框 高度改变动效
544
545
 
545
546
  (0, _react.useLayoutEffect)(function () {
546
- setTimeout(function () {
547
+ var timer = setTimeout(function () {
547
548
  var _heightRef$current;
548
549
 
549
550
  setOpenTagHeight((_heightRef$current = heightRef.current) === null || _heightRef$current === void 0 ? void 0 : _heightRef$current.offsetHeight);
550
551
  }, 0);
552
+ return function () {
553
+ return clearTimeout(timer);
554
+ };
551
555
  }, [inputExtend, JSON.stringify(confirmed)]); // 针对删除了所有可删除的filter tags情况,自动聚焦到seatch Input
552
556
 
553
557
  (0, _react.useLayoutEffect)(function () {
@@ -637,20 +641,18 @@ var FilterComponent = function FilterComponent(props) {
637
641
  }, [inputExtend]);
638
642
  var menu = (0, _jsxRuntime.jsx)(_menu.default, {
639
643
  children: (0, _jsxRuntime.jsxs)(_menu.default.Item, {
640
- children: [(0, _jsxRuntime.jsxs)("div", Object.assign({
641
- className: "igloo-form-filter-drop-down-container-content"
642
- }, {
644
+ children: [(0, _jsxRuntime.jsxs)("div", {
645
+ className: "igloo-form-filter-drop-down-container-content",
643
646
  children: [(0, _jsxRuntime.jsxs)(_space.default, {
644
647
  children: [(0, _jsxRuntime.jsx)(_iglooicon.FilterOutlined, {
645
648
  style: {
646
649
  fontSize: '24px',
647
650
  color: '#666666'
648
651
  }
649
- }, void 0), (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
650
- level: "h4"
651
- }, {
652
+ }, void 0), (0, _jsxRuntime.jsx)(_typography.default, {
653
+ level: "h4",
652
654
  children: filterTitle
653
- }), void 0)]
655
+ }, void 0)]
654
656
  }, void 0), (0, _jsxRuntime.jsx)(_divider.default, {
655
657
  style: {
656
658
  margin: '16px 0px'
@@ -729,13 +731,12 @@ var FilterComponent = function FilterComponent(props) {
729
731
  }, key);
730
732
  }
731
733
  })]
732
- }), void 0), (0, _jsxRuntime.jsxs)("div", Object.assign({
734
+ }, void 0), (0, _jsxRuntime.jsxs)("div", {
733
735
  className: "igloo-form-filter-drop-down-footer",
734
736
  onClick: function onClick(e) {
735
737
  return e.stopPropagation();
736
- }
737
- }, {
738
- children: [(0, _jsxRuntime.jsx)("span", Object.assign({
738
+ },
739
+ children: [(0, _jsxRuntime.jsx)("span", {
739
740
  onClick: function onClick() {
740
741
  setTimeout(function () {
741
742
  setTimeRangeType(-1);
@@ -744,19 +745,16 @@ var FilterComponent = function FilterComponent(props) {
744
745
  value: _objectSpread({}, defaultOptions)
745
746
  });
746
747
  }, 10);
747
- }
748
- }, {
749
- children: (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
750
- level: "h4"
751
- }, {
748
+ },
749
+ children: (0, _jsxRuntime.jsx)(_typography.default, {
750
+ level: "h4",
752
751
  children: formatMessage({
753
752
  id: 'Reset All Filters'
754
753
  })
755
- }), void 0)
756
- }), void 0), (0, _jsxRuntime.jsxs)(_space.default, Object.assign({
757
- size: 16
758
- }, {
759
- children: [(0, _jsxRuntime.jsx)("span", Object.assign({
754
+ }, void 0)
755
+ }, void 0), (0, _jsxRuntime.jsxs)(_space.default, {
756
+ size: 16,
757
+ children: [(0, _jsxRuntime.jsx)("span", {
760
758
  onClick: function onClick() {
761
759
  setDropVisible(false);
762
760
  dispatchOptionsChange({
@@ -764,16 +762,14 @@ var FilterComponent = function FilterComponent(props) {
764
762
  value: confirmed
765
763
  });
766
764
  setTimeRangeType(confirmedTimeRange);
767
- }
768
- }, {
769
- children: (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
770
- level: "h4"
771
- }, {
765
+ },
766
+ children: (0, _jsxRuntime.jsx)(_typography.default, {
767
+ level: "h4",
772
768
  children: formatMessage({
773
769
  id: 'Cancel'
774
770
  })
775
- }), void 0)
776
- }), void 0), (0, _jsxRuntime.jsx)(_button.default, Object.assign({
771
+ }, void 0)
772
+ }, void 0), (0, _jsxRuntime.jsx)(_button.default, {
777
773
  onClick: function onClick() {
778
774
  setDropVisible(false);
779
775
  setShowSearchInputDefault(false);
@@ -791,26 +787,23 @@ var FilterComponent = function FilterComponent(props) {
791
787
  } else {
792
788
  setHighLightFilter(false);
793
789
  }
794
- }
795
- }, {
796
- children: (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
790
+ },
791
+ children: (0, _jsxRuntime.jsx)(_typography.default, {
797
792
  level: "h4",
798
793
  style: {
799
794
  padding: '0px 35px'
800
- }
801
- }, {
795
+ },
802
796
  children: formatMessage({
803
797
  id: 'Apply'
804
798
  })
805
- }), void 0)
806
- }), void 0)]
807
- }), void 0)]
808
- }), void 0)]
799
+ }, void 0)
800
+ }, void 0)]
801
+ }, void 0)]
802
+ }, void 0)]
809
803
  }, 1)
810
804
  }, void 0);
811
- return (0, _jsxRuntime.jsxs)("div", Object.assign({
812
- className: "".concat(showIdSelect ? 'igloo-form-filter-with-select' : 'igloo-form-filter')
813
- }, {
805
+ return (0, _jsxRuntime.jsxs)("div", {
806
+ className: "".concat(showIdSelect ? 'igloo-form-filter-with-select' : 'igloo-form-filter'),
814
807
  children: [(0, _jsxRuntime.jsx)(_input.default, {
815
808
  ref: invisibleRef,
816
809
  style: {
@@ -819,7 +812,7 @@ var FilterComponent = function FilterComponent(props) {
819
812
  padding: '0px',
820
813
  border: '0px'
821
814
  }
822
- }, void 0), showIdSelect && idKeyTypes.length !== 0 && (0, _jsxRuntime.jsx)(_select.default, Object.assign({
815
+ }, void 0), showIdSelect && idKeyTypes.length !== 0 && (0, _jsxRuntime.jsx)(_select.default, {
823
816
  className: "igloo-form-filter-id-select",
824
817
  onChange: function onChange(e) {
825
818
  return setIdName(String(e));
@@ -829,23 +822,19 @@ var FilterComponent = function FilterComponent(props) {
829
822
  style: {
830
823
  fontSize: 24
831
824
  }
832
- }, void 0)
833
- }, {
825
+ }, void 0),
834
826
  children: idKeyTypes.map(function (item) {
835
- return (0, _jsxRuntime.jsx)(Option, Object.assign({
836
- value: item.value
837
- }, {
838
- children: (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
839
- level: "body1"
840
- }, {
827
+ return (0, _jsxRuntime.jsx)(Option, {
828
+ value: item.value,
829
+ children: (0, _jsxRuntime.jsx)(_typography.default, {
830
+ level: "body1",
841
831
  children: item.label
842
- }), void 0)
843
- }), item.value);
832
+ }, void 0)
833
+ }, item.value);
844
834
  })
845
- }), void 0), (hightLightFilterButton || showDefaultOptions || stillHaveTagsToDelete) && !noFilters && !showSearchInputDefault && !showSearchInputWhenHasTag ? (0, _jsxRuntime.jsxs)("div", Object.assign({
846
- className: "igloo-filter-tag-position-reference"
847
- }, {
848
- children: [(0, _jsxRuntime.jsxs)("div", Object.assign({
835
+ }, void 0), (hightLightFilterButton || showDefaultOptions || stillHaveTagsToDelete) && !noFilters && !showSearchInputDefault && !showSearchInputWhenHasTag ? (0, _jsxRuntime.jsxs)("div", {
836
+ className: "igloo-filter-tag-position-reference",
837
+ children: [(0, _jsxRuntime.jsxs)("div", {
849
838
  ref: heightRef,
850
839
  className: (0, _classnames.default)({
851
840
  'tag-defalut-container-hide-status': inputExtend,
@@ -859,26 +848,22 @@ var FilterComponent = function FilterComponent(props) {
859
848
  if (onlyHaveCanNotDeleteTags) {
860
849
  setShowSearchInputWhenHasTag(true);
861
850
  }
862
- }
863
- }, {
851
+ },
864
852
  children: [(0, _jsxRuntime.jsx)(_iglooicon.SearchOutlined, {
865
853
  className: 'search-icon'
866
- }, void 0), (0, _jsxRuntime.jsxs)(_space.default, Object.assign({
854
+ }, void 0), (0, _jsxRuntime.jsxs)(_space.default, {
867
855
  size: [12, 8],
868
856
  className: "tag-container",
869
857
  style: {
870
858
  flex: '1'
871
- }
872
- }, {
859
+ },
873
860
  children: [_toConsumableArray(inputExtend ? choosedTags : maxTagsWhenClosed).map(function (item, index) {
874
- return (0, _jsxRuntime.jsxs)("div", Object.assign({
875
- className: "tag-card"
876
- }, {
877
- children: [(0, _jsxRuntime.jsx)(_typography.default, Object.assign({
878
- level: "body3"
879
- }, {
861
+ return (0, _jsxRuntime.jsxs)("div", {
862
+ className: "tag-card",
863
+ children: [(0, _jsxRuntime.jsx)(_typography.default, {
864
+ level: "body3",
880
865
  children: item.label
881
- }), void 0), !item.canNotDelete && (0, _jsxRuntime.jsx)(_iglooicon.CrossOutlined, {
866
+ }, void 0), !item.canNotDelete && (0, _jsxRuntime.jsx)(_iglooicon.CrossOutlined, {
882
867
  className: "delete-icon",
883
868
  onClick: function onClick(e) {
884
869
  e.stopPropagation();
@@ -911,11 +896,11 @@ var FilterComponent = function FilterComponent(props) {
911
896
  deleteSomeOne(confirmed, item, [statusCallBack, handleFilter]);
912
897
  }
913
898
  }, void 0)]
914
- }), index);
899
+ }, index);
915
900
  }), !oneLineCanShow && !inputExtend && (0, _jsxRuntime.jsx)("span", {
916
901
  children: "..."
917
902
  }, void 0)]
918
- }), void 0), !onlyHaveCanNotDeleteTags && (0, _jsxRuntime.jsx)(_iglooicon.CrossOutlined, {
903
+ }, void 0), !onlyHaveCanNotDeleteTags && (0, _jsxRuntime.jsx)(_iglooicon.CrossOutlined, {
919
904
  className: "delete-all-icon",
920
905
  onClick: function onClick(e) {
921
906
  e.stopPropagation();
@@ -943,7 +928,7 @@ var FilterComponent = function FilterComponent(props) {
943
928
  }
944
929
  }
945
930
  }, void 0)]
946
- }), void 0), (0, _jsxRuntime.jsxs)("div", Object.assign({
931
+ }, void 0), (0, _jsxRuntime.jsxs)("div", {
947
932
  ref: openStatusTagRef,
948
933
  className: (0, _classnames.default)('tag-extend-container-hide-status', {
949
934
  'igloo-form-filter-has-select-tag-container': showIdSelect,
@@ -959,26 +944,22 @@ var FilterComponent = function FilterComponent(props) {
959
944
  if (onlyHaveCanNotDeleteTags) {
960
945
  setShowSearchInputWhenHasTag(true);
961
946
  }
962
- }
963
- }, {
947
+ },
964
948
  children: [(0, _jsxRuntime.jsx)(_iglooicon.SearchOutlined, {
965
949
  className: 'search-icon'
966
- }, void 0), (0, _jsxRuntime.jsx)(_space.default, Object.assign({
950
+ }, void 0), (0, _jsxRuntime.jsx)(_space.default, {
967
951
  size: [12, 8],
968
952
  className: "tag-container",
969
953
  style: {
970
954
  flex: '1'
971
- }
972
- }, {
955
+ },
973
956
  children: _toConsumableArray(inputExtend ? choosedTags : maxTagsWhenClosed).map(function (item, index) {
974
- return (0, _jsxRuntime.jsxs)("div", Object.assign({
975
- className: "tag-card"
976
- }, {
977
- children: [(0, _jsxRuntime.jsx)(_typography.default, Object.assign({
978
- level: "body3"
979
- }, {
957
+ return (0, _jsxRuntime.jsxs)("div", {
958
+ className: "tag-card",
959
+ children: [(0, _jsxRuntime.jsx)(_typography.default, {
960
+ level: "body3",
980
961
  children: item.label
981
- }), void 0), !item.canNotDelete && (0, _jsxRuntime.jsx)(_iglooicon.CrossOutlined, {
962
+ }, void 0), !item.canNotDelete && (0, _jsxRuntime.jsx)(_iglooicon.CrossOutlined, {
982
963
  className: "delete-icon",
983
964
  onClick: function onClick(e) {
984
965
  e.stopPropagation();
@@ -1011,9 +992,9 @@ var FilterComponent = function FilterComponent(props) {
1011
992
  deleteSomeOne(confirmed, item, [statusCallBack, handleFilter]);
1012
993
  }
1013
994
  }, void 0)]
1014
- }), index);
995
+ }, index);
1015
996
  })
1016
- }), void 0), !onlyHaveCanNotDeleteTags && (0, _jsxRuntime.jsx)(_iglooicon.CrossOutlined, {
997
+ }, void 0), !onlyHaveCanNotDeleteTags && (0, _jsxRuntime.jsx)(_iglooicon.CrossOutlined, {
1017
998
  className: "delete-all-icon",
1018
999
  onClick: function onClick() {
1019
1000
  setTimeRangeType(-1);
@@ -1040,8 +1021,8 @@ var FilterComponent = function FilterComponent(props) {
1040
1021
  }
1041
1022
  }
1042
1023
  }, void 0)]
1043
- }), void 0)]
1044
- }), void 0) : (0, _jsxRuntime.jsx)(_input.default, {
1024
+ }, void 0)]
1025
+ }, void 0) : (0, _jsxRuntime.jsx)(_input.default, {
1045
1026
  ref: searchInput,
1046
1027
  value: searchInputValue,
1047
1028
  onChange: function onChange(e) {
@@ -1082,7 +1063,7 @@ var FilterComponent = function FilterComponent(props) {
1082
1063
  onFilter(value);
1083
1064
  typeof parentFilterCallBack === 'function' && parentFilterCallBack(value);
1084
1065
  }
1085
- }, void 0), (0, _jsxRuntime.jsx)(_dropdown.default, Object.assign({
1066
+ }, void 0), !inputOnly && (0, _jsxRuntime.jsx)(_dropdown.default, {
1086
1067
  getPopupContainer: function getPopupContainer() {
1087
1068
  return dropDownContainerRef.current;
1088
1069
  },
@@ -1106,12 +1087,10 @@ var FilterComponent = function FilterComponent(props) {
1106
1087
  }
1107
1088
  }, 0);
1108
1089
  },
1109
- trigger: ['click']
1110
- }, {
1111
- children: (0, _jsxRuntime.jsx)("div", Object.assign({
1112
- className: "igloo-form-filter-button-container"
1113
- }, {
1114
- children: (0, _jsxRuntime.jsx)(_button.default, Object.assign({
1090
+ trigger: ['click'],
1091
+ children: (0, _jsxRuntime.jsx)("div", {
1092
+ className: "igloo-form-filter-button-container",
1093
+ children: (0, _jsxRuntime.jsx)(_button.default, {
1115
1094
  className: (0, _classnames.default)('igloo-form-filter-filter-button', {
1116
1095
  'igloo-form-filter-filter-button-active': dropVisible,
1117
1096
  'igloo-form-filter-filter-button-high-light': hightLightFilterButton
@@ -1123,26 +1102,23 @@ var FilterComponent = function FilterComponent(props) {
1123
1102
  }, void 0),
1124
1103
  onClick: function onClick() {
1125
1104
  setDropVisible(true);
1126
- }
1127
- }, {
1128
- children: (0, _jsxRuntime.jsx)("span", Object.assign({
1129
- className: "filter-text"
1130
- }, {
1131
- children: (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
1132
- level: "body1"
1133
- }, {
1105
+ },
1106
+ children: (0, _jsxRuntime.jsx)("span", {
1107
+ className: "filter-text",
1108
+ children: (0, _jsxRuntime.jsx)(_typography.default, {
1109
+ level: "body1",
1134
1110
  children: formatMessage({
1135
1111
  id: 'Filter'
1136
1112
  })
1137
- }), void 0)
1138
- }), void 0)
1139
- }), void 0)
1140
- }), void 0)
1141
- }), void 0), (0, _jsxRuntime.jsx)("div", {
1113
+ }, void 0)
1114
+ }, void 0)
1115
+ }, void 0)
1116
+ }, void 0)
1117
+ }, void 0), (0, _jsxRuntime.jsx)("div", {
1142
1118
  className: "igloo-form-filter-drop-down",
1143
1119
  ref: dropDownContainerRef
1144
1120
  }, void 0)]
1145
- }), void 0);
1121
+ }, void 0);
1146
1122
  };
1147
1123
 
1148
1124
  var _default = FilterComponent;