@zohodesk/components 1.0.0-temp-158 → 1.0.0-temp-160

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 (347) hide show
  1. package/es/Accordion/Accordion.js +3 -7
  2. package/es/Accordion/AccordionItem.js +2 -4
  3. package/es/Animation/Animation.js +3 -3
  4. package/es/AppContainer/AppContainer.js +5 -13
  5. package/es/Avatar/Avatar.js +11 -23
  6. package/es/AvatarTeam/AvatarTeam.js +3 -3
  7. package/es/Button/Button.js +3 -4
  8. package/es/Buttongroup/Buttongroup.js +3 -3
  9. package/es/Card/Card.js +10 -21
  10. package/es/CheckBox/CheckBox.js +3 -5
  11. package/es/DateTime/CalendarView.js +20 -32
  12. package/es/DateTime/DateTime.js +6 -67
  13. package/es/DateTime/DateTimePopupFooter.js +2 -4
  14. package/es/DateTime/DateTimePopupHeader.js +2 -8
  15. package/es/DateTime/DateWidget.js +35 -98
  16. package/es/DateTime/DaysRow.js +2 -4
  17. package/es/DateTime/Time.js +2 -10
  18. package/es/DateTime/YearView.js +4 -28
  19. package/es/DateTime/__tests__/CalendarView.spec.js +0 -1
  20. package/es/DateTime/__tests__/DateTime.spec.js +0 -1
  21. package/es/DateTime/__tests__/DateWidget.spec.js +3 -2
  22. package/es/DateTime/common.js +0 -3
  23. package/es/DateTime/constants.js +0 -1
  24. package/es/DateTime/dateFormatUtils/dateFormat.js +30 -63
  25. package/es/DateTime/dateFormatUtils/dateFormats.js +1 -0
  26. package/es/DateTime/dateFormatUtils/dayChange.js +4 -13
  27. package/es/DateTime/dateFormatUtils/index.js +2 -32
  28. package/es/DateTime/dateFormatUtils/monthChange.js +0 -8
  29. package/es/DateTime/dateFormatUtils/timeChange.js +6 -22
  30. package/es/DateTime/dateFormatUtils/yearChange.js +2 -11
  31. package/es/DateTime/objectUtils.js +20 -14
  32. package/es/DateTime/typeChecker.js +0 -3
  33. package/es/DateTime/validator.js +6 -58
  34. package/es/DropBox/DropBox.js +2 -6
  35. package/es/DropBox/DropBoxElement/DropBoxElement.js +0 -7
  36. package/es/DropBox/DropBoxElement/css/cssJSLogic.js +3 -5
  37. package/es/DropBox/DropBoxElement/useDropboxPosCalc.js +0 -3
  38. package/es/DropBox/props/defaultProps.js +2 -1
  39. package/es/DropBox/props/propTypes.js +2 -1
  40. package/es/DropDown/DropDown.js +4 -8
  41. package/es/DropDown/DropDownHeading.js +5 -4
  42. package/es/DropDown/DropDownItem.js +0 -6
  43. package/es/DropDown/DropDownSearch.js +0 -4
  44. package/es/DropDown/DropDownSeparator.js +0 -1
  45. package/es/DropDown/__tests__/DropDown.spec.js +2 -1
  46. package/es/Heading/Heading.js +3 -2
  47. package/es/Label/Label.js +3 -2
  48. package/es/Layout/Box.js +0 -13
  49. package/es/Layout/Container.js +1 -12
  50. package/es/Layout/index.js +2 -1
  51. package/es/ListItem/ListContainer.js +3 -8
  52. package/es/ListItem/ListItem.js +3 -9
  53. package/es/ListItem/ListItemWithAvatar.js +3 -9
  54. package/es/ListItem/ListItemWithCheckBox.js +2 -7
  55. package/es/ListItem/ListItemWithIcon.js +3 -8
  56. package/es/ListItem/ListItemWithRadio.js +3 -7
  57. package/es/Modal/Modal.js +11 -28
  58. package/es/MultiSelect/AdvancedGroupMultiSelect.js +13 -89
  59. package/es/MultiSelect/AdvancedMultiSelect.js +9 -32
  60. package/es/MultiSelect/EmptyState.js +0 -2
  61. package/es/MultiSelect/MultiSelect.js +32 -99
  62. package/es/MultiSelect/MultiSelectHeader.js +0 -3
  63. package/es/MultiSelect/MultiSelectWithAvatar.js +6 -12
  64. package/es/MultiSelect/SelectedOptions.js +3 -6
  65. package/es/MultiSelect/Suggestions.js +3 -7
  66. package/es/MultiSelect/__tests__/MultiSelect.spec.js +6 -4
  67. package/es/MultiSelect/props/propTypes.js +0 -2
  68. package/es/PopOver/PopOver.js +2 -18
  69. package/es/PopOver/__tests__/PopOver.spec.js +1 -2
  70. package/es/Popup/Popup.js +24 -77
  71. package/es/Popup/__tests__/Popup.spec.js +5 -17
  72. package/es/Popup/viewPort.js +4 -16
  73. package/es/Provider/IdProvider.js +5 -10
  74. package/es/Provider/LibraryContext.js +4 -6
  75. package/es/Provider/NumberGenerator/NumberGenerator.js +7 -21
  76. package/es/Provider/ZindexProvider.js +2 -9
  77. package/es/Radio/Radio.js +2 -4
  78. package/es/Responsive/CustomResponsive.js +18 -30
  79. package/es/Responsive/RefWrapper.js +7 -6
  80. package/es/Responsive/ResizeComponent.js +25 -35
  81. package/es/Responsive/ResizeObserver.js +6 -26
  82. package/es/Responsive/Responsive.js +20 -34
  83. package/es/Responsive/index.js +3 -1
  84. package/es/Responsive/sizeObservers.js +7 -28
  85. package/es/Responsive/utils/index.js +5 -7
  86. package/es/Responsive/utils/shallowCompare.js +2 -7
  87. package/es/Responsive/windowResizeObserver.js +0 -7
  88. package/es/ResponsiveDropBox/ResponsiveDropBox.js +0 -4
  89. package/es/Ribbon/Ribbon.js +2 -3
  90. package/es/RippleEffect/RippleEffect.js +3 -1
  91. package/es/Select/GroupSelect.js +14 -58
  92. package/es/Select/Select.js +33 -79
  93. package/es/Select/SelectWithAvatar.js +4 -17
  94. package/es/Select/SelectWithIcon.js +5 -46
  95. package/es/Select/__tests__/Select.spec.js +8 -6
  96. package/es/Select/props/propTypes.js +0 -1
  97. package/es/Stencils/Stencils.js +3 -3
  98. package/es/Switch/Switch.js +3 -5
  99. package/es/Tab/Tab.js +4 -4
  100. package/es/Tab/TabContent.js +0 -1
  101. package/es/Tab/TabContentWrapper.js +0 -2
  102. package/es/Tab/TabWrapper.js +2 -5
  103. package/es/Tab/Tabs.js +7 -54
  104. package/es/Tab/__tests__/Tab.spec.js +3 -1
  105. package/es/Tab/__tests__/TabWrapper.spec.js +0 -1
  106. package/es/Tag/Tag.js +3 -6
  107. package/es/TextBox/TextBox.js +3 -15
  108. package/es/TextBox/__tests__/TextBox.spec.js +4 -1
  109. package/es/TextBoxIcon/TextBoxIcon.js +2 -9
  110. package/es/TextBoxIcon/__tests__/TextBoxIcon.spec.js +7 -2
  111. package/es/Textarea/Textarea.js +3 -12
  112. package/es/Textarea/__tests__/Textarea.spec.js +2 -2
  113. package/es/Tooltip/Tooltip.js +14 -58
  114. package/es/Tooltip/__tests__/Tooltip.spec.js +0 -5
  115. package/es/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +2 -3
  116. package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +5 -7
  117. package/es/deprecated/PortalLayer/PortalLayer.js +20 -25
  118. package/es/semantic/Button/Button.js +2 -3
  119. package/es/utils/Common.js +9 -54
  120. package/es/utils/ContextOptimizer.js +5 -4
  121. package/es/utils/__tests__/debounce.spec.js +2 -2
  122. package/es/utils/constructFullName.js +0 -2
  123. package/es/utils/css/compileClassNames.js +0 -5
  124. package/es/utils/css/mergeStyle.js +6 -7
  125. package/es/utils/css/utils.js +0 -1
  126. package/es/utils/datetime/common.js +5 -16
  127. package/es/utils/debounce.js +1 -5
  128. package/es/utils/dropDownUtils.js +11 -68
  129. package/es/utils/getInitial.js +0 -4
  130. package/es/utils/shallowEqual.js +0 -6
  131. package/lib/Accordion/Accordion.js +18 -42
  132. package/lib/Accordion/AccordionItem.js +18 -40
  133. package/lib/Accordion/__tests__/Accordion.spec.js +0 -3
  134. package/lib/Accordion/index.js +0 -3
  135. package/lib/Accordion/props/propTypes.js +0 -3
  136. package/lib/Animation/Animation.js +18 -38
  137. package/lib/Animation/__tests__/Animation.spec.js +7 -11
  138. package/lib/Animation/props/propTypes.js +0 -3
  139. package/lib/AppContainer/AppContainer.js +21 -56
  140. package/lib/AppContainer/props/propTypes.js +0 -3
  141. package/lib/Avatar/Avatar.js +38 -78
  142. package/lib/Avatar/__tests__/Avatar.spec.js +0 -44
  143. package/lib/Avatar/props/propTypes.js +0 -3
  144. package/lib/AvatarTeam/AvatarTeam.js +30 -52
  145. package/lib/AvatarTeam/__tests__/AvatarTeam.spec.js +0 -13
  146. package/lib/AvatarTeam/props/propTypes.js +0 -3
  147. package/lib/Button/Button.js +20 -31
  148. package/lib/Button/css/cssJSLogic.js +17 -18
  149. package/lib/Button/index.js +0 -3
  150. package/lib/Button/props/defaultProps.js +0 -2
  151. package/lib/Button/props/propTypes.js +0 -3
  152. package/lib/Buttongroup/Buttongroup.js +12 -32
  153. package/lib/Buttongroup/__test__/Buttongroup.spec.js +0 -10
  154. package/lib/Buttongroup/props/propTypes.js +0 -3
  155. package/lib/Card/Card.js +46 -102
  156. package/lib/Card/__tests__/Card.spec.js +1 -10
  157. package/lib/Card/index.js +0 -4
  158. package/lib/Card/props/propTypes.js +0 -3
  159. package/lib/CheckBox/CheckBox.js +47 -71
  160. package/lib/CheckBox/__tests__/CheckBox.spec.js +0 -3
  161. package/lib/CheckBox/props/propTypes.js +0 -3
  162. package/lib/DateTime/CalendarView.js +42 -82
  163. package/lib/DateTime/DateTime.js +156 -240
  164. package/lib/DateTime/DateTimePopupFooter.js +8 -31
  165. package/lib/DateTime/DateTimePopupHeader.js +17 -48
  166. package/lib/DateTime/DateWidget.js +250 -352
  167. package/lib/DateTime/DaysRow.js +5 -27
  168. package/lib/DateTime/Time.js +32 -73
  169. package/lib/DateTime/YearView.js +28 -77
  170. package/lib/DateTime/__tests__/CalendarView.spec.js +5 -13
  171. package/lib/DateTime/__tests__/DateTime.spec.js +37 -51
  172. package/lib/DateTime/__tests__/DateWidget.spec.js +8 -10
  173. package/lib/DateTime/common.js +0 -6
  174. package/lib/DateTime/constants.js +0 -1
  175. package/lib/DateTime/dateFormatUtils/dateFormat.js +122 -184
  176. package/lib/DateTime/dateFormatUtils/dateFormats.js +1 -0
  177. package/lib/DateTime/dateFormatUtils/dayChange.js +7 -14
  178. package/lib/DateTime/dateFormatUtils/index.js +16 -74
  179. package/lib/DateTime/dateFormatUtils/monthChange.js +9 -19
  180. package/lib/DateTime/dateFormatUtils/timeChange.js +22 -54
  181. package/lib/DateTime/dateFormatUtils/yearChange.js +11 -22
  182. package/lib/DateTime/index.js +0 -2
  183. package/lib/DateTime/objectUtils.js +20 -24
  184. package/lib/DateTime/props/propTypes.js +1 -11
  185. package/lib/DateTime/typeChecker.js +0 -4
  186. package/lib/DateTime/validator.js +10 -73
  187. package/lib/DropBox/DropBox.js +10 -34
  188. package/lib/DropBox/DropBoxElement/DropBoxElement.js +37 -58
  189. package/lib/DropBox/DropBoxElement/css/cssJSLogic.js +33 -41
  190. package/lib/DropBox/DropBoxElement/props/propTypes.js +0 -3
  191. package/lib/DropBox/DropBoxElement/useDropboxPosCalc.js +9 -14
  192. package/lib/DropBox/__tests__/DropBox.spec.js +2 -6
  193. package/lib/DropBox/css/cssJSLogic.js +1 -3
  194. package/lib/DropBox/props/defaultProps.js +4 -8
  195. package/lib/DropBox/props/propTypes.js +4 -10
  196. package/lib/DropDown/DropDown.js +8 -52
  197. package/lib/DropDown/DropDownHeading.js +20 -39
  198. package/lib/DropDown/DropDownItem.js +20 -42
  199. package/lib/DropDown/DropDownSearch.js +17 -40
  200. package/lib/DropDown/DropDownSeparator.js +4 -24
  201. package/lib/DropDown/__tests__/DropDown.spec.js +9 -15
  202. package/lib/DropDown/__tests__/DropDownItem.spec.js +4 -9
  203. package/lib/DropDown/__tests__/DropDownSearch.spec.js +0 -3
  204. package/lib/DropDown/index.js +0 -9
  205. package/lib/DropDown/props/propTypes.js +4 -6
  206. package/lib/Heading/Heading.js +15 -37
  207. package/lib/Heading/props/propTypes.js +0 -3
  208. package/lib/Label/Label.js +19 -39
  209. package/lib/Label/__tests__/Label.spec.js +1 -14
  210. package/lib/Label/props/propTypes.js +0 -3
  211. package/lib/Layout/Box.js +11 -31
  212. package/lib/Layout/Container.js +10 -29
  213. package/lib/Layout/__tests__/Box.spec.js +49 -65
  214. package/lib/Layout/__tests__/Container.spec.js +50 -67
  215. package/lib/Layout/index.js +0 -3
  216. package/lib/Layout/props/propTypes.js +0 -3
  217. package/lib/Layout/utils.js +0 -10
  218. package/lib/ListItem/ListContainer.js +27 -48
  219. package/lib/ListItem/ListItem.js +45 -69
  220. package/lib/ListItem/ListItemWithAvatar.js +48 -75
  221. package/lib/ListItem/ListItemWithCheckBox.js +39 -64
  222. package/lib/ListItem/ListItemWithIcon.js +44 -68
  223. package/lib/ListItem/ListItemWithRadio.js +41 -65
  224. package/lib/ListItem/index.js +0 -7
  225. package/lib/ListItem/props/propTypes.js +4 -6
  226. package/lib/Modal/Modal.js +10 -45
  227. package/lib/Modal/props/propTypes.js +0 -3
  228. package/lib/MultiSelect/AdvancedGroupMultiSelect.js +166 -294
  229. package/lib/MultiSelect/AdvancedMultiSelect.js +125 -202
  230. package/lib/MultiSelect/EmptyState.js +24 -45
  231. package/lib/MultiSelect/MultiSelect.js +206 -323
  232. package/lib/MultiSelect/MultiSelectHeader.js +8 -30
  233. package/lib/MultiSelect/MultiSelectWithAvatar.js +63 -105
  234. package/lib/MultiSelect/SelectedOptions.js +17 -43
  235. package/lib/MultiSelect/Suggestions.js +32 -64
  236. package/lib/MultiSelect/__tests__/MultiSelect.spec.js +75 -86
  237. package/lib/MultiSelect/index.js +0 -5
  238. package/lib/MultiSelect/props/defaultProps.js +0 -2
  239. package/lib/MultiSelect/props/propTypes.js +0 -5
  240. package/lib/PopOver/PopOver.js +49 -95
  241. package/lib/PopOver/__tests__/PopOver.spec.js +1 -4
  242. package/lib/PopOver/index.js +0 -4
  243. package/lib/PopOver/props/propTypes.js +0 -3
  244. package/lib/Popup/Popup.js +81 -158
  245. package/lib/Popup/__tests__/Popup.spec.js +8 -43
  246. package/lib/Popup/viewPort.js +14 -28
  247. package/lib/Provider/AvatarSize.js +0 -4
  248. package/lib/Provider/Config.js +0 -2
  249. package/lib/Provider/CssProvider.js +0 -4
  250. package/lib/Provider/IdProvider.js +6 -17
  251. package/lib/Provider/LibraryContext.js +15 -35
  252. package/lib/Provider/LibraryContextInit.js +0 -4
  253. package/lib/Provider/NumberGenerator/NumberGenerator.js +15 -44
  254. package/lib/Provider/ZindexProvider.js +3 -15
  255. package/lib/Provider/index.js +0 -5
  256. package/lib/Radio/Radio.js +38 -61
  257. package/lib/Radio/__tests__/Radiospec.js +5 -9
  258. package/lib/Radio/props/propTypes.js +0 -3
  259. package/lib/Responsive/CustomResponsive.js +29 -73
  260. package/lib/Responsive/RefWrapper.js +11 -17
  261. package/lib/Responsive/ResizeComponent.js +36 -62
  262. package/lib/Responsive/ResizeObserver.js +10 -24
  263. package/lib/Responsive/Responsive.js +30 -80
  264. package/lib/Responsive/index.js +0 -4
  265. package/lib/Responsive/props/propTypes.js +0 -3
  266. package/lib/Responsive/sizeObservers.js +17 -53
  267. package/lib/Responsive/utils/index.js +3 -11
  268. package/lib/Responsive/utils/shallowCompare.js +2 -11
  269. package/lib/Responsive/windowResizeObserver.js +0 -8
  270. package/lib/ResponsiveDropBox/ResponsiveDropBox.js +17 -45
  271. package/lib/ResponsiveDropBox/props/propTypes.js +0 -3
  272. package/lib/Ribbon/Ribbon.js +13 -33
  273. package/lib/Ribbon/__tests__/Ribbon.spec.js +0 -22
  274. package/lib/Ribbon/props/propTypes.js +0 -3
  275. package/lib/RippleEffect/RippleEffect.js +10 -18
  276. package/lib/RippleEffect/props/propTypes.js +0 -3
  277. package/lib/Select/GroupSelect.js +130 -229
  278. package/lib/Select/Select.js +209 -290
  279. package/lib/Select/SelectWithAvatar.js +56 -102
  280. package/lib/Select/SelectWithIcon.js +76 -132
  281. package/lib/Select/__tests__/Select.spec.js +91 -133
  282. package/lib/Select/index.js +0 -5
  283. package/lib/Select/props/defaultProps.js +4 -5
  284. package/lib/Select/props/propTypes.js +0 -4
  285. package/lib/Stencils/Stencils.js +10 -29
  286. package/lib/Stencils/__tests__/Stencils.spec.js +0 -12
  287. package/lib/Stencils/props/propTypes.js +0 -3
  288. package/lib/Switch/Switch.js +34 -57
  289. package/lib/Switch/props/propTypes.js +0 -3
  290. package/lib/Tab/Tab.js +27 -40
  291. package/lib/Tab/TabContent.js +5 -12
  292. package/lib/Tab/TabContentWrapper.js +6 -13
  293. package/lib/Tab/TabWrapper.js +19 -37
  294. package/lib/Tab/Tabs.js +91 -171
  295. package/lib/Tab/__tests__/Tab.spec.js +58 -67
  296. package/lib/Tab/__tests__/TabContent.spec.js +6 -10
  297. package/lib/Tab/__tests__/TabContentWrapper.spec.js +20 -28
  298. package/lib/Tab/__tests__/TabWrapper.spec.js +0 -12
  299. package/lib/Tab/__tests__/Tabs.spec.js +39 -53
  300. package/lib/Tab/index.js +0 -6
  301. package/lib/Tab/props/propTypes.js +0 -3
  302. package/lib/Tag/Tag.js +43 -72
  303. package/lib/Tag/__tests__/Tag.spec.js +8 -14
  304. package/lib/Tag/props/propTypes.js +0 -3
  305. package/lib/TextBox/TextBox.js +59 -85
  306. package/lib/TextBox/__tests__/TextBox.spec.js +4 -14
  307. package/lib/TextBox/props/propTypes.js +4 -6
  308. package/lib/TextBoxIcon/TextBoxIcon.js +52 -79
  309. package/lib/TextBoxIcon/__tests__/TextBoxIcon.spec.js +5 -14
  310. package/lib/TextBoxIcon/props/propTypes.js +0 -3
  311. package/lib/Textarea/Textarea.js +29 -54
  312. package/lib/Textarea/__tests__/Textarea.spec.js +2 -14
  313. package/lib/Textarea/props/propTypes.js +0 -3
  314. package/lib/Tooltip/Tooltip.js +31 -94
  315. package/lib/Tooltip/__tests__/Tooltip.spec.js +3 -24
  316. package/lib/Tooltip/props/propTypes.js +0 -3
  317. package/lib/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +16 -40
  318. package/lib/VelocityAnimation/VelocityAnimation/props/propTypes.js +0 -3
  319. package/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +25 -53
  320. package/lib/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +0 -3
  321. package/lib/VelocityAnimation/index.js +0 -3
  322. package/lib/css.js +0 -40
  323. package/lib/deprecated/PortalLayer/PortalLayer.js +23 -46
  324. package/lib/deprecated/PortalLayer/props/propTypes.js +0 -3
  325. package/lib/index.js +0 -57
  326. package/lib/semantic/Button/Button.js +22 -42
  327. package/lib/semantic/Button/props/propTypes.js +0 -3
  328. package/lib/semantic/index.js +0 -2
  329. package/lib/utils/Common.js +18 -108
  330. package/lib/utils/ContextOptimizer.js +10 -16
  331. package/lib/utils/__tests__/constructFullName.spec.js +0 -1
  332. package/lib/utils/__tests__/debounce.spec.js +2 -3
  333. package/lib/utils/__tests__/getInitial.spec.js +0 -1
  334. package/lib/utils/constructFullName.js +4 -13
  335. package/lib/utils/css/compileClassNames.js +0 -6
  336. package/lib/utils/css/mergeStyle.js +7 -10
  337. package/lib/utils/css/utils.js +0 -8
  338. package/lib/utils/datetime/common.js +5 -34
  339. package/lib/utils/debounce.js +1 -6
  340. package/lib/utils/dropDownUtils.js +59 -175
  341. package/lib/utils/dummyFunction.js +0 -2
  342. package/lib/utils/getHTMLFontSize.js +0 -1
  343. package/lib/utils/getInitial.js +0 -6
  344. package/lib/utils/index.js +0 -4
  345. package/lib/utils/scrollTo.js +0 -2
  346. package/lib/utils/shallowEqual.js +0 -8
  347. package/package.json +2 -2
@@ -1,87 +1,51 @@
1
1
  "use strict";
2
2
 
3
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
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports["default"] = void 0;
9
-
10
8
  var _react = _interopRequireDefault(require("react"));
11
-
12
9
  var _propTypes = require("./props/propTypes");
13
-
14
10
  var _defaultProps = require("./props/defaultProps");
15
-
16
11
  var _datetimejs = _interopRequireDefault(require("@zohodesk/datetimejs"));
17
-
18
12
  var _DateTime = _interopRequireDefault(require("./DateTime"));
19
-
20
13
  var _Popup = _interopRequireDefault(require("../Popup/Popup"));
21
-
22
14
  var _icons = require("@zohodesk/icons");
23
-
24
15
  var _Layout = require("../Layout");
25
-
26
16
  var _TextBoxIcon = _interopRequireDefault(require("../TextBoxIcon/TextBoxIcon"));
27
-
28
17
  var _DateWidgetModule = _interopRequireDefault(require("./DateWidget.module.css"));
29
-
30
18
  var _validator = _interopRequireDefault(require("./validator"));
31
-
32
19
  var _common = require("../utils/datetime/common");
33
-
34
20
  var _dateFormatUtils = require("./dateFormatUtils");
35
-
36
21
  var _dateFormat = require("./dateFormatUtils/dateFormat");
37
-
38
22
  var _dayChange = require("./dateFormatUtils/dayChange");
39
-
40
23
  var _monthChange = require("./dateFormatUtils/monthChange");
41
-
42
24
  var _yearChange = require("./dateFormatUtils/yearChange");
43
-
44
25
  var _timeChange = require("./dateFormatUtils/timeChange");
45
-
46
26
  var _Common = require("../utils/Common");
47
-
48
27
  var _constants = require("./constants");
49
-
50
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
51
-
52
29
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
53
-
54
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
55
-
30
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
56
31
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
57
-
32
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
33
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
58
34
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
59
-
60
35
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
61
-
62
36
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
63
-
64
37
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
65
-
66
38
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
67
-
68
39
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
69
-
70
40
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
71
-
72
41
  /* eslint-disable react/no-unused-prop-types */
73
-
74
42
  /* eslint css-modules/no-unused-class: [0, { markAsUsed: 'inputLine'] }] */
75
43
  var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
76
44
  _inherits(DateWidgetComponent, _React$Component);
77
-
78
45
  var _super = _createSuper(DateWidgetComponent);
79
-
80
46
  function DateWidgetComponent(props) {
81
47
  var _this;
82
-
83
48
  _classCallCheck(this, DateWidgetComponent);
84
-
85
49
  _this = _super.call(this, props);
86
50
  _this.handleSelect = _this.handleSelect.bind(_assertThisInitialized(_this));
87
51
  _this.handleTogglePopup = _this.handleTogglePopup.bind(_assertThisInitialized(_this));
@@ -121,27 +85,21 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
121
85
  _this.oldFocusOrder = '';
122
86
  _this.focusOrder = '';
123
87
  _this.oldKeyDownAction = ''; //'Arrow' || 'valueTyped'
124
-
125
88
  _this.keyDownAction = ''; //'Arrow' || 'valueTyped'
126
-
127
89
  _this.isMouseDown = false;
128
90
  return _this;
129
91
  }
130
-
131
92
  _createClass(DateWidgetComponent, [{
132
93
  key: "componentDidMount",
133
94
  value: function componentDidMount() {
134
95
  var validation = this.props.validation;
135
96
  var selected = this.state.selected;
136
-
137
97
  if (validation && validation.validate) {
138
98
  this.validateOnSelect(selected, this.props);
139
99
  }
140
-
141
100
  var _this$handleGetDispla = this.handleGetDisplayText(this.props),
142
- displayText = _this$handleGetDispla.displayText,
143
- newSelected = _this$handleGetDispla.selected;
144
-
101
+ displayText = _this$handleGetDispla.displayText,
102
+ newSelected = _this$handleGetDispla.selected;
145
103
  this.setState({
146
104
  displayText: displayText,
147
105
  selected: newSelected
@@ -152,39 +110,35 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
152
110
  key: "componentDidUpdate",
153
111
  value: function componentDidUpdate(prevProps, prevState) {
154
112
  var _this$state = this.state,
155
- selected = _this$state.selected,
156
- day = _this$state.day,
157
- month = _this$state.month,
158
- year = _this$state.year,
159
- hour = _this$state.hour,
160
- minute = _this$state.minute,
161
- noon = _this$state.noon,
162
- isDateEdited = _this$state.isDateEdited,
163
- stateFocusOrder = _this$state.stateFocusOrder,
164
- isFocused = _this$state.isFocused;
113
+ selected = _this$state.selected,
114
+ day = _this$state.day,
115
+ month = _this$state.month,
116
+ year = _this$state.year,
117
+ hour = _this$state.hour,
118
+ minute = _this$state.minute,
119
+ noon = _this$state.noon,
120
+ isDateEdited = _this$state.isDateEdited,
121
+ stateFocusOrder = _this$state.stateFocusOrder,
122
+ isFocused = _this$state.isFocused;
165
123
  var _this$props = this.props,
166
- value = _this$props.value,
167
- validation = _this$props.validation,
168
- isPopupReady = _this$props.isPopupReady,
169
- _this$props$dateForma = _this$props.dateFormat,
170
- dateFormat = _this$props$dateForma === void 0 ? '' : _this$props$dateForma,
171
- is24Hour = _this$props.is24Hour,
172
- isHideCurrentYear = _this$props.isHideCurrentYear;
173
-
124
+ value = _this$props.value,
125
+ validation = _this$props.validation,
126
+ isPopupReady = _this$props.isPopupReady,
127
+ _this$props$dateForma = _this$props.dateFormat,
128
+ dateFormat = _this$props$dateForma === void 0 ? '' : _this$props$dateForma,
129
+ is24Hour = _this$props.is24Hour,
130
+ isHideCurrentYear = _this$props.isHideCurrentYear;
174
131
  if (validation && validation.validate) {
175
132
  this.validateOnSelect(selected, this.props);
176
133
  }
177
-
178
134
  if (value !== prevProps.value || dateFormat !== prevProps.dateFormat || is24Hour !== prevProps.is24Hour || isHideCurrentYear !== prevProps.isHideCurrentYear) {
179
135
  var _this$handleGetDispla2 = this.handleGetDisplayText(this.props),
180
- displayText = _this$handleGetDispla2.displayText,
181
- _selected = _this$handleGetDispla2.selected;
182
-
136
+ displayText = _this$handleGetDispla2.displayText,
137
+ _selected = _this$handleGetDispla2.selected;
183
138
  this.setState({
184
139
  selected: _selected,
185
140
  displayText: displayText
186
141
  });
187
-
188
142
  if (value !== _constants.INVALID_DATE) {
189
143
  this.setState({
190
144
  day: '',
@@ -198,30 +152,29 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
198
152
  });
199
153
  }
200
154
  }
201
-
202
155
  if (prevProps.isPopupReady !== isPopupReady) {
203
156
  if (isPopupReady) {
204
157
  this.resetLocalDate && this.resetLocalDate();
205
158
  }
206
159
  }
207
-
208
160
  var haveLocalValue = [day, month, year, hour, minute, noon].some(function (value) {
209
161
  return !(0, _Common.getIsEmptyValue)(value);
210
162
  });
211
-
212
163
  if (isDateEdited !== haveLocalValue) {
213
164
  this.setState({
214
165
  isDateEdited: haveLocalValue
215
166
  });
216
167
  }
217
-
218
168
  if (value !== prevProps.value || dateFormat !== prevProps.dateFormat || is24Hour !== prevProps.is24Hour || (0, _dateFormatUtils.arrayIsNotEqual)([day, month, year, hour, minute, noon], [prevState.day, prevState.month, prevState.year, prevState.hour, prevState.minute, prevState.noon])) {
219
169
  this.handleSelectionRangeDetails(this.props);
220
- } // if (stateFocusOrder !== prevState.stateFocusOrder) {
170
+ }
221
171
 
172
+ // if (stateFocusOrder !== prevState.stateFocusOrder) {
222
173
 
223
174
  isFocused && !(0, _Common.getIsEmptyValue)(stateFocusOrder) && this.handleSelection(stateFocusOrder);
224
- this.handleBlurSelectionRange(stateFocusOrder, prevState.stateFocusOrder); // }
175
+ this.handleBlurSelectionRange(stateFocusOrder, prevState.stateFocusOrder);
176
+ // }
177
+
225
178
  // if (prevProps.isPopupOpen !== isPopupOpen) {
226
179
  // if (!isPopupOpen) {
227
180
  // this.valueInput && this.valueInput.focus({preventScroll:true});
@@ -232,16 +185,14 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
232
185
  key: "handleSelect",
233
186
  value: function handleSelect(userZoneSelectedTime, fotmattedValue, e) {
234
187
  var _this$props2 = this.props,
235
- id = _this$props2.id,
236
- onSelect = _this$props2.onSelect,
237
- closePopupOnly = _this$props2.closePopupOnly,
238
- validation = _this$props2.validation;
239
-
188
+ id = _this$props2.id,
189
+ onSelect = _this$props2.onSelect,
190
+ closePopupOnly = _this$props2.closePopupOnly,
191
+ validation = _this$props2.validation;
240
192
  if (validation && validation.validateOn) {
241
193
  var selected = this.state.selected;
242
194
  this.validateOnSelect(selected, this.props);
243
195
  }
244
-
245
196
  onSelect && onSelect(userZoneSelectedTime, id);
246
197
  this.valueInput && this.valueInput.focus({
247
198
  preventScroll: true
@@ -255,20 +206,17 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
255
206
  var defaultValidateRules = ['required'];
256
207
  var defaultType = 'onegroup';
257
208
  var validation = props.validation,
258
- onPassValidation = props.onPassValidation,
259
- onFailValidation = props.onFailValidation;
209
+ onPassValidation = props.onPassValidation,
210
+ onFailValidation = props.onFailValidation;
260
211
  var targetTag = this.elementRef;
261
-
262
212
  if (validation) {
263
213
  //validateOn won't work here ...
264
214
  var newValidation = _validator["default"].combinePropsValidation(this.props, defaultType, 'onSelect', validation, defaultCheckPropsRules, defaultValidateRules);
265
-
266
215
  var validationObj = {
267
216
  validation: newValidation,
268
217
  onPassValidation: onPassValidation,
269
218
  onFailValidation: onFailValidation
270
219
  };
271
-
272
220
  _validator["default"].executeValidation(value, targetTag, validationObj, defaultType);
273
221
  } else {
274
222
  onPassValidation && onPassValidation(value, targetTag);
@@ -278,13 +226,12 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
278
226
  key: "handleTogglePopup",
279
227
  value: function handleTogglePopup(e, isOpenOnly) {
280
228
  var _this$props3 = this.props,
281
- togglePopup = _this$props3.togglePopup,
282
- _this$props3$defaultP = _this$props3.defaultPosition,
283
- defaultPosition = _this$props3$defaultP === void 0 ? 'bottom' : _this$props3$defaultP,
284
- openPopupOnly = _this$props3.openPopupOnly,
285
- isPopupOpen = _this$props3.isPopupOpen,
286
- removeClose = _this$props3.removeClose;
287
-
229
+ togglePopup = _this$props3.togglePopup,
230
+ _this$props3$defaultP = _this$props3.defaultPosition,
231
+ defaultPosition = _this$props3$defaultP === void 0 ? 'bottom' : _this$props3$defaultP,
232
+ openPopupOnly = _this$props3.openPopupOnly,
233
+ isPopupOpen = _this$props3.isPopupOpen,
234
+ removeClose = _this$props3.removeClose;
288
235
  if (isOpenOnly) {
289
236
  if (!isPopupOpen) {
290
237
  togglePopup(e, "".concat(defaultPosition, "Right"));
@@ -292,26 +239,26 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
292
239
  removeClose(e);
293
240
  }
294
241
  }
295
-
296
242
  !isOpenOnly && togglePopup(e, "".concat(defaultPosition, "Right"));
297
243
  }
298
244
  }, {
299
245
  key: "handleSelectionRangeDetails",
300
246
  value: function handleSelectionRangeDetails(props) {
301
247
  var timeZone = props.timeZone,
302
- dateFormat = props.dateFormat,
303
- isDateTime = props.isDateTime,
304
- value = props.value,
305
- is24Hour = props.is24Hour;
248
+ dateFormat = props.dateFormat,
249
+ isDateTime = props.isDateTime,
250
+ value = props.value,
251
+ is24Hour = props.is24Hour;
306
252
  var _this$state2 = this.state,
307
- day = _this$state2.day,
308
- month = _this$state2.month,
309
- year = _this$state2.year,
310
- hour = _this$state2.hour,
311
- minute = _this$state2.minute,
312
- noon = _this$state2.noon;
313
- var selected = value === _constants.INVALID_DATE ? '' : value; //New UI Changes
253
+ day = _this$state2.day,
254
+ month = _this$state2.month,
255
+ year = _this$state2.year,
256
+ hour = _this$state2.hour,
257
+ minute = _this$state2.minute,
258
+ noon = _this$state2.noon;
259
+ var selected = value === _constants.INVALID_DATE ? '' : value;
314
260
 
261
+ //New UI Changes
315
262
  var dateFormatDetails = (0, _dateFormat.getDateFormatDetails)(dateFormat, {
316
263
  isHideCurrentYear: false,
317
264
  value: value,
@@ -342,11 +289,11 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
342
289
  key: "handleGetDisplayText",
343
290
  value: function handleGetDisplayText(props) {
344
291
  var timeZone = props.timeZone,
345
- dateFormat = props.dateFormat,
346
- isDateTime = props.isDateTime,
347
- value = props.value,
348
- is24Hour = props.is24Hour,
349
- isHideCurrentYear = props.isHideCurrentYear;
292
+ dateFormat = props.dateFormat,
293
+ isDateTime = props.isDateTime,
294
+ value = props.value,
295
+ is24Hour = props.is24Hour,
296
+ isHideCurrentYear = props.isHideCurrentYear;
350
297
  var dateFormatDetails = (0, _dateFormat.getDateFormatDetails)(dateFormat, {
351
298
  isHideCurrentYear: isHideCurrentYear,
352
299
  value: value,
@@ -356,21 +303,17 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
356
303
  var newDateFormat = dateFormatDetails.dateFormat;
357
304
  var displayText = '';
358
305
  var selected = value === _constants.INVALID_DATE ? '' : value;
359
-
360
306
  if (selected) {
361
307
  var format = newDateFormat,
362
- convertedValue;
363
-
308
+ convertedValue;
364
309
  if (isDateTime) {
365
310
  convertedValue = _datetimejs["default"].toDate(_datetimejs["default"].tz.utcToTz(value, timeZone));
366
311
  format = "".concat(newDateFormat, " ").concat(is24Hour ? 'HH:mm' : 'hh:mm A');
367
312
  } else {
368
313
  convertedValue = _datetimejs["default"].toDate(value);
369
314
  }
370
-
371
315
  displayText = (0, _common.formatDate)(convertedValue, format);
372
316
  }
373
-
374
317
  return {
375
318
  displayText: displayText,
376
319
  selected: selected
@@ -381,20 +324,18 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
381
324
  value: function handleKeyDown(e) {
382
325
  var keyCode = e.keyCode;
383
326
  var _this$props4 = this.props,
384
- isPopupOpen = _this$props4.isPopupOpen,
385
- isPopupOpenOnEnter = _this$props4.isPopupOpenOnEnter,
386
- onKeyDown = _this$props4.onKeyDown,
387
- closePopupOnly = _this$props4.closePopupOnly,
388
- cantEditOnPopupOpen = _this$props4.cantEditOnPopupOpen;
327
+ isPopupOpen = _this$props4.isPopupOpen,
328
+ isPopupOpenOnEnter = _this$props4.isPopupOpenOnEnter,
329
+ onKeyDown = _this$props4.onKeyDown,
330
+ closePopupOnly = _this$props4.closePopupOnly,
331
+ cantEditOnPopupOpen = _this$props4.cantEditOnPopupOpen;
389
332
  var isAllowedDateType = this.handleGetAllowedType();
390
-
391
333
  if (isPopupOpen) {
392
334
  if (keyCode === 9 && !isAllowedDateType) {
393
335
  //on tab click popup close
394
336
  closePopupOnly(e);
395
- } // ~~~~~~~ handle date navigation in dateTime popup ~~~~~
396
-
397
-
337
+ }
338
+ // ~~~~~~~ handle date navigation in dateTime popup ~~~~~
398
339
  if (isAllowedDateType) {
399
340
  cantEditOnPopupOpen && this.handleDateType(e);
400
341
  }
@@ -422,13 +363,12 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
422
363
  value: function handleFocus() {
423
364
  var isAllowedDateType = this.handleGetAllowedType();
424
365
  var isMouseDown = this.isMouseDown;
425
-
426
366
  if (isAllowedDateType && !isMouseDown) {
427
367
  var dateFormatSelection = this.state.dateFormatSelection;
428
368
  var focusedIndex = dateFormatSelection.focusedIndex;
429
369
  var _this$valueInput = this.valueInput,
430
- newSelectionStart = _this$valueInput.selectionStart,
431
- newSelectionEnd = _this$valueInput.selectionEnd;
370
+ newSelectionStart = _this$valueInput.selectionStart,
371
+ newSelectionEnd = _this$valueInput.selectionEnd;
432
372
  var focusedOrder = focusedIndex["".concat(newSelectionStart, "_").concat(newSelectionEnd)] || 0;
433
373
  isAllowedDateType && this.setState({
434
374
  stateFocusOrder: focusedOrder,
@@ -442,7 +382,6 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
442
382
  isFocused: true
443
383
  });
444
384
  }
445
-
446
385
  var onFocus = this.props.onFocus;
447
386
  onFocus && onFocus();
448
387
  }
@@ -455,7 +394,9 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
455
394
  this.keyDownAction = '';
456
395
  this.setState({
457
396
  isFocused: false
458
- }); // const { valueInput } = this;
397
+ });
398
+
399
+ // const { valueInput } = this;
459
400
  // document.getSelection().removeAllRanges();
460
401
  // valueInput && valueInput.setSelectionRange(0, 0);
461
402
 
@@ -467,8 +408,8 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
467
408
  value: function handleGetMethods(methods) {
468
409
  var getMethods = this.props.getMethods;
469
410
  var resetLocalDate = methods.resetLocalDate,
470
- getStateValues = methods.getStateValues,
471
- toggleYearView = methods.toggleYearView;
411
+ getStateValues = methods.getStateValues,
412
+ toggleYearView = methods.toggleYearView;
472
413
  this.resetLocalDate = resetLocalDate;
473
414
  this.getDateTimeStateValues = getStateValues;
474
415
  this.DateTimeYearViewToggle = toggleYearView;
@@ -478,75 +419,67 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
478
419
  key: "handleDateType",
479
420
  value: function handleDateType(e) {
480
421
  var _this2 = this;
481
-
482
422
  var keyCode = e.keyCode,
483
- shiftKey = e.shiftKey;
423
+ shiftKey = e.shiftKey;
484
424
  var input = e.target;
485
-
486
425
  if ((0, _dateFormatUtils.getIsSupportedKey)(e)) {
487
426
  e.preventDefault();
488
427
  }
489
-
490
428
  var _this$props5 = this.props,
491
- isDateTime = _this$props5.isDateTime,
492
- timeZone = _this$props5.timeZone,
493
- value = _this$props5.value,
494
- onSelect = _this$props5.onSelect,
495
- id = _this$props5.id,
496
- min = _this$props5.min,
497
- max = _this$props5.max,
498
- minErrorText = _this$props5.minErrorText,
499
- maxErrorText = _this$props5.maxErrorText,
500
- onError = _this$props5.onError,
501
- closePopupOnly = _this$props5.closePopupOnly,
502
- is24Hour = _this$props5.is24Hour;
429
+ isDateTime = _this$props5.isDateTime,
430
+ timeZone = _this$props5.timeZone,
431
+ value = _this$props5.value,
432
+ onSelect = _this$props5.onSelect,
433
+ id = _this$props5.id,
434
+ min = _this$props5.min,
435
+ max = _this$props5.max,
436
+ minErrorText = _this$props5.minErrorText,
437
+ maxErrorText = _this$props5.maxErrorText,
438
+ onError = _this$props5.onError,
439
+ closePopupOnly = _this$props5.closePopupOnly,
440
+ is24Hour = _this$props5.is24Hour;
503
441
  var _this$state3 = this.state,
504
- dateFormatSelection = _this$state3.dateFormatSelection,
505
- day = _this$state3.day,
506
- month = _this$state3.month,
507
- year = _this$state3.year,
508
- hour = _this$state3.hour,
509
- minute = _this$state3.minute,
510
- noon = _this$state3.noon,
511
- selected = _this$state3.selected,
512
- dateFormatDetails = _this$state3.dateFormatDetails;
442
+ dateFormatSelection = _this$state3.dateFormatSelection,
443
+ day = _this$state3.day,
444
+ month = _this$state3.month,
445
+ year = _this$state3.year,
446
+ hour = _this$state3.hour,
447
+ minute = _this$state3.minute,
448
+ noon = _this$state3.noon,
449
+ selected = _this$state3.selected,
450
+ dateFormatDetails = _this$state3.dateFormatDetails;
513
451
  var focusedIndex = dateFormatSelection.focusedIndex,
514
- order = dateFormatSelection.order;
452
+ order = dateFormatSelection.order;
515
453
  var yearInfo = dateFormatDetails.yearInfo;
516
-
517
454
  var _getDateDetails = (0, _dateFormat.getDateDetails)(selected, {
518
- day: day,
519
- month: month,
520
- year: year,
521
- hour: hour,
522
- minute: minute,
523
- noon: noon
524
- }, isDateTime, timeZone, {
525
- is24Hour: is24Hour
526
- }),
527
- _getDateDetails$day = _getDateDetails.day,
528
- selectedDay = _getDateDetails$day === void 0 ? '' : _getDateDetails$day,
529
- _getDateDetails$month = _getDateDetails.month,
530
- selectedMonth = _getDateDetails$month === void 0 ? '' : _getDateDetails$month,
531
- _getDateDetails$year = _getDateDetails.year,
532
- selectedYear = _getDateDetails$year === void 0 ? '' : _getDateDetails$year,
533
- _getDateDetails$hour = _getDateDetails.hour,
534
- selectedHour = _getDateDetails$hour === void 0 ? '' : _getDateDetails$hour,
535
- _getDateDetails$minut = _getDateDetails.minute,
536
- selectedMinute = _getDateDetails$minut === void 0 ? '' : _getDateDetails$minut,
537
- _getDateDetails$noon = _getDateDetails.noon,
538
- selectedNoon = _getDateDetails$noon === void 0 ? '' : _getDateDetails$noon;
539
-
455
+ day: day,
456
+ month: month,
457
+ year: year,
458
+ hour: hour,
459
+ minute: minute,
460
+ noon: noon
461
+ }, isDateTime, timeZone, {
462
+ is24Hour: is24Hour
463
+ }),
464
+ _getDateDetails$day = _getDateDetails.day,
465
+ selectedDay = _getDateDetails$day === void 0 ? '' : _getDateDetails$day,
466
+ _getDateDetails$month = _getDateDetails.month,
467
+ selectedMonth = _getDateDetails$month === void 0 ? '' : _getDateDetails$month,
468
+ _getDateDetails$year = _getDateDetails.year,
469
+ selectedYear = _getDateDetails$year === void 0 ? '' : _getDateDetails$year,
470
+ _getDateDetails$hour = _getDateDetails.hour,
471
+ selectedHour = _getDateDetails$hour === void 0 ? '' : _getDateDetails$hour,
472
+ _getDateDetails$minut = _getDateDetails.minute,
473
+ selectedMinute = _getDateDetails$minut === void 0 ? '' : _getDateDetails$minut,
474
+ _getDateDetails$noon = _getDateDetails.noon,
475
+ selectedNoon = _getDateDetails$noon === void 0 ? '' : _getDateDetails$noon;
540
476
  var newSelectionStart = input.selectionStart,
541
- newSelectionEnd = input.selectionEnd;
477
+ newSelectionEnd = input.selectionEnd;
542
478
  var focusedOrder = focusedIndex["".concat(newSelectionStart, "_").concat(newSelectionEnd)];
543
-
544
479
  var _ref = order[focusedOrder] || {},
545
- type = _ref.type;
546
-
480
+ type = _ref.type;
547
481
  this.oldFocusOrder = this.focusOrder;
548
482
  this.focusOrder = focusedOrder;
549
-
550
483
  if (keyCode === 38 || keyCode === 40) {
551
484
  //up arrow && down arrow
552
485
  this.oldKeyDownAction = this.keyDownAction;
@@ -555,7 +488,6 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
555
488
  this.oldKeyDownAction = this.keyDownAction;
556
489
  this.keyDownAction = 'valueTyped';
557
490
  }
558
-
559
491
  var focusedOrders = {
560
492
  focusOrder: this.focusOrder,
561
493
  oldFocusOrder: this.oldFocusOrder
@@ -565,14 +497,13 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
565
497
  keyAction: this.keyDownAction
566
498
  };
567
499
  var newDay = selectedDay,
568
- newMonth = selectedMonth,
569
- newYear = selectedYear,
570
- newHour = selectedHour,
571
- newMinute = selectedMinute,
572
- newNoon = selectedNoon,
573
- isValueChanged = false,
574
- newFocusOrder = focusedOrder;
575
-
500
+ newMonth = selectedMonth,
501
+ newYear = selectedYear,
502
+ newHour = selectedHour,
503
+ newMinute = selectedMinute,
504
+ newNoon = selectedNoon,
505
+ isValueChanged = false,
506
+ newFocusOrder = focusedOrder;
576
507
  if (keyCode === 9 && shiftKey && !(0, _Common.getIsEmptyValue)(focusedOrder) && focusedOrder !== 0) {
577
508
  e.preventDefault();
578
509
  this.setState({
@@ -606,7 +537,6 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
606
537
  month: selectedMonth,
607
538
  year: selectedYear
608
539
  }, e, focusedOrders, keyActions);
609
-
610
540
  newDay = _getChangedDay.day;
611
541
  isValueChanged = _getChangedDay.isChanged;
612
542
  newFocusOrder = _getChangedDay.focusOrder;
@@ -616,7 +546,6 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
616
546
  month: selectedMonth,
617
547
  year: selectedYear
618
548
  }, e, focusedOrders, keyActions);
619
-
620
549
  newMonth = _getChangedMonth.month;
621
550
  isValueChanged = _getChangedMonth.isChanged;
622
551
  newFocusOrder = _getChangedMonth.focusOrder;
@@ -628,7 +557,6 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
628
557
  }, e, focusedOrders, keyActions, {
629
558
  yearInfo: yearInfo
630
559
  });
631
-
632
560
  newYear = _getChangedYear.year;
633
561
  isValueChanged = _getChangedYear.isChanged;
634
562
  newFocusOrder = _getChangedYear.focusOrder;
@@ -638,7 +566,6 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
638
566
  }, e, focusedOrders, keyActions, {
639
567
  is24Hour: is24Hour
640
568
  });
641
-
642
569
  newHour = _getChangedHour.hour;
643
570
  isValueChanged = _getChangedHour.isChanged;
644
571
  newFocusOrder = _getChangedHour.focusOrder;
@@ -646,7 +573,6 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
646
573
  var _getChangedMinute = (0, _timeChange.getChangedMinute)({
647
574
  minute: selectedMinute
648
575
  }, e, focusedOrders, keyActions);
649
-
650
576
  newMinute = _getChangedMinute.minute;
651
577
  isValueChanged = _getChangedMinute.isChanged;
652
578
  newFocusOrder = _getChangedMinute.focusOrder;
@@ -654,12 +580,10 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
654
580
  var _getChangedNoon = (0, _timeChange.getChangedNoon)({
655
581
  noon: selectedNoon
656
582
  }, e, focusedOrders, keyActions);
657
-
658
583
  newNoon = _getChangedNoon.noon;
659
584
  isValueChanged = _getChangedNoon.isChanged;
660
585
  newFocusOrder = _getChangedNoon.focusOrder;
661
586
  }
662
-
663
587
  if (isValueChanged) {
664
588
  var currentValue = {
665
589
  day: newDay,
@@ -669,7 +593,6 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
669
593
  minute: newMinute,
670
594
  noon: newNoon
671
595
  };
672
-
673
596
  var errorCaseHandle = function errorCaseHandle(isEmptyValError) {
674
597
  _this2.setState(function () {
675
598
  return {
@@ -684,38 +607,33 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
684
607
  isError: !isEmptyValError
685
608
  };
686
609
  });
687
-
688
610
  var newSelected = isEmptyValError ? '' : _constants.INVALID_DATE;
689
611
  value !== newSelected && onSelect && onSelect(newSelected, id);
690
612
  };
691
-
692
613
  var _getIsValidDate = (0, _dateFormat.getIsValidDate)(currentValue, isDateTime, {
693
- is24Hour: is24Hour
694
- }),
695
- isError = _getIsValidDate.isError,
696
- isEmptyValError = _getIsValidDate.isEmptyValError;
697
-
614
+ is24Hour: is24Hour
615
+ }),
616
+ isError = _getIsValidDate.isError,
617
+ isEmptyValError = _getIsValidDate.isEmptyValError;
698
618
  if (isError) {
699
619
  errorCaseHandle(isEmptyValError);
700
620
  } else {
701
621
  var _getSelectedDate = (0, _dateFormat.getSelectedDate)(currentValue, {
702
- min: min,
703
- max: max,
704
- timeZone: timeZone,
705
- isDateTime: isDateTime,
706
- is24Hour: is24Hour
707
- }),
708
- selectedValue = _getSelectedDate.selectedValue,
709
- selectedDateError = _getSelectedDate.isError,
710
- errorType = _getSelectedDate.errorType;
711
-
622
+ min: min,
623
+ max: max,
624
+ timeZone: timeZone,
625
+ isDateTime: isDateTime,
626
+ is24Hour: is24Hour
627
+ }),
628
+ selectedValue = _getSelectedDate.selectedValue,
629
+ selectedDateError = _getSelectedDate.isError,
630
+ errorType = _getSelectedDate.errorType;
712
631
  if (selectedDateError) {
713
632
  if (errorType === 'MIN') {
714
633
  onError && onError(minErrorText, true);
715
634
  } else if (errorType === 'MAX') {
716
635
  onError && onError(maxErrorText, true);
717
636
  }
718
-
719
637
  errorCaseHandle();
720
638
  } else {
721
639
  this.setState(function () {
@@ -741,23 +659,17 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
741
659
  value: function handleSelection() {
742
660
  var focusOrder = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
743
661
  var isAllowedDateType = this.handleGetAllowedType();
744
-
745
662
  if (isAllowedDateType) {
746
663
  var dateFormatSelection = this.state.dateFormatSelection;
747
664
  var _dateFormatSelection$ = dateFormatSelection.order,
748
- order = _dateFormatSelection$ === void 0 ? {} : _dateFormatSelection$;
749
-
665
+ order = _dateFormatSelection$ === void 0 ? {} : _dateFormatSelection$;
750
666
  var _ref2 = order[focusOrder] || {},
751
- index = _ref2.index;
752
-
667
+ index = _ref2.index;
753
668
  if (!index) {
754
669
  focusOrder = 0;
755
-
756
670
  var _ref3 = order[focusOrder] || {};
757
-
758
671
  index = _ref3.index;
759
672
  }
760
-
761
673
  if (index && this.valueInput) {
762
674
  document.getSelection().removeAllRanges();
763
675
  this.valueInput.setSelectionRange(index[0], index[1]);
@@ -775,31 +687,26 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
775
687
  var clickIndex = dateFormatSelection.clickIndex;
776
688
  var focusOrder = clickIndex[selectionEnd] || clickIndex[selectionEnd - 1] || 0;
777
689
  var isAllowedDateType = this.handleGetAllowedType();
778
-
779
690
  if (isAllowedDateType) {
780
691
  this.setState({
781
692
  stateFocusOrder: focusOrder,
782
693
  isFocused: true
783
694
  });
784
695
  }
785
-
786
696
  if (!isAllowedDateType) {
787
697
  this.handleTogglePopup(e);
788
698
  } else {
789
699
  var _this$props6 = this.props,
790
- isPopupOpenOnClick = _this$props6.isPopupOpenOnClick,
791
- isReadOnly = _this$props6.isReadOnly,
792
- isDisabled = _this$props6.isDisabled;
793
-
700
+ isPopupOpenOnClick = _this$props6.isPopupOpenOnClick,
701
+ isReadOnly = _this$props6.isReadOnly,
702
+ isDisabled = _this$props6.isDisabled;
794
703
  if (isPopupOpenOnClick && (!isReadOnly || !isDisabled)) {
795
704
  this.handleTogglePopup(e, true);
796
705
  }
797
-
798
706
  var _this$props7 = this.props,
799
- isPopupCloseOnClick = _this$props7.isPopupCloseOnClick,
800
- isPopupOpen = _this$props7.isPopupOpen,
801
- closePopupOnly = _this$props7.closePopupOnly;
802
-
707
+ isPopupCloseOnClick = _this$props7.isPopupCloseOnClick,
708
+ isPopupOpen = _this$props7.isPopupOpen,
709
+ closePopupOnly = _this$props7.closePopupOnly;
803
710
  if (isPopupCloseOnClick && !isPopupOpen) {
804
711
  closePopupOnly && closePopupOnly(e);
805
712
  }
@@ -814,49 +721,47 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
814
721
  key: "handleGetShowValue",
815
722
  value: function handleGetShowValue() {
816
723
  var _this$state4 = this.state,
817
- day = _this$state4.day,
818
- month = _this$state4.month,
819
- year = _this$state4.year,
820
- hour = _this$state4.hour,
821
- minute = _this$state4.minute,
822
- noon = _this$state4.noon,
823
- dateFormatDetails = _this$state4.dateFormatDetails,
824
- displayText = _this$state4.displayText,
825
- newDateFormat = _this$state4.newDateFormat,
826
- isDateEdited = _this$state4.isDateEdited,
827
- isFocused = _this$state4.isFocused,
828
- selected = _this$state4.selected;
724
+ day = _this$state4.day,
725
+ month = _this$state4.month,
726
+ year = _this$state4.year,
727
+ hour = _this$state4.hour,
728
+ minute = _this$state4.minute,
729
+ noon = _this$state4.noon,
730
+ dateFormatDetails = _this$state4.dateFormatDetails,
731
+ displayText = _this$state4.displayText,
732
+ newDateFormat = _this$state4.newDateFormat,
733
+ isDateEdited = _this$state4.isDateEdited,
734
+ isFocused = _this$state4.isFocused,
735
+ selected = _this$state4.selected;
829
736
  var _this$props8 = this.props,
830
- isDateTime = _this$props8.isDateTime,
831
- is24Hour = _this$props8.is24Hour,
832
- isPopupReady = _this$props8.isPopupReady,
833
- timeZone = _this$props8.timeZone,
834
- isPopupOpen = _this$props8.isPopupOpen;
835
-
737
+ isDateTime = _this$props8.isDateTime,
738
+ is24Hour = _this$props8.is24Hour,
739
+ isPopupReady = _this$props8.isPopupReady,
740
+ timeZone = _this$props8.timeZone,
741
+ isPopupOpen = _this$props8.isPopupOpen;
836
742
  if (isDateEdited || isFocused || isPopupReady || isPopupOpen) {
837
743
  var _getDateDetails2 = (0, _dateFormat.getDateDetails)(selected, {
838
- day: day,
839
- month: month,
840
- year: year,
841
- hour: hour,
842
- minute: minute,
843
- noon: noon
844
- }, isDateTime, timeZone, {
845
- is24Hour: is24Hour
846
- }),
847
- _getDateDetails2$day = _getDateDetails2.day,
848
- selectedDay = _getDateDetails2$day === void 0 ? '' : _getDateDetails2$day,
849
- _getDateDetails2$mont = _getDateDetails2.month,
850
- selectedMonth = _getDateDetails2$mont === void 0 ? '' : _getDateDetails2$mont,
851
- _getDateDetails2$year = _getDateDetails2.year,
852
- selectedYear = _getDateDetails2$year === void 0 ? '' : _getDateDetails2$year,
853
- _getDateDetails2$hour = _getDateDetails2.hour,
854
- selectedHour = _getDateDetails2$hour === void 0 ? '' : _getDateDetails2$hour,
855
- _getDateDetails2$minu = _getDateDetails2.minute,
856
- selectedMinute = _getDateDetails2$minu === void 0 ? '' : _getDateDetails2$minu,
857
- _getDateDetails2$noon = _getDateDetails2.noon,
858
- selectedNoon = _getDateDetails2$noon === void 0 ? '' : _getDateDetails2$noon;
859
-
744
+ day: day,
745
+ month: month,
746
+ year: year,
747
+ hour: hour,
748
+ minute: minute,
749
+ noon: noon
750
+ }, isDateTime, timeZone, {
751
+ is24Hour: is24Hour
752
+ }),
753
+ _getDateDetails2$day = _getDateDetails2.day,
754
+ selectedDay = _getDateDetails2$day === void 0 ? '' : _getDateDetails2$day,
755
+ _getDateDetails2$mont = _getDateDetails2.month,
756
+ selectedMonth = _getDateDetails2$mont === void 0 ? '' : _getDateDetails2$mont,
757
+ _getDateDetails2$year = _getDateDetails2.year,
758
+ selectedYear = _getDateDetails2$year === void 0 ? '' : _getDateDetails2$year,
759
+ _getDateDetails2$hour = _getDateDetails2.hour,
760
+ selectedHour = _getDateDetails2$hour === void 0 ? '' : _getDateDetails2$hour,
761
+ _getDateDetails2$minu = _getDateDetails2.minute,
762
+ selectedMinute = _getDateDetails2$minu === void 0 ? '' : _getDateDetails2$minu,
763
+ _getDateDetails2$noon = _getDateDetails2.noon,
764
+ selectedNoon = _getDateDetails2$noon === void 0 ? '' : _getDateDetails2$noon;
860
765
  var dateTimeString = (0, _dateFormat.getDateTimeString)({
861
766
  day: selectedDay,
862
767
  month: selectedMonth,
@@ -873,7 +778,6 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
873
778
  } else if (displayText) {
874
779
  return displayText;
875
780
  }
876
-
877
781
  var timeFormat = is24Hour ? ' HH:mm' : ' hh:mm --';
878
782
  var dateTimeFormat = isDateTime ? "".concat(newDateFormat).concat(timeFormat) : newDateFormat;
879
783
  return dateTimeFormat || '';
@@ -882,27 +786,24 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
882
786
  key: "handleGetAllowedType",
883
787
  value: function handleGetAllowedType() {
884
788
  var _this$props9 = this.props,
885
- isReadOnly = _this$props9.isReadOnly,
886
- isDisabled = _this$props9.isDisabled,
887
- isEditable = _this$props9.isEditable;
888
-
789
+ isReadOnly = _this$props9.isReadOnly,
790
+ isDisabled = _this$props9.isDisabled,
791
+ isEditable = _this$props9.isEditable;
889
792
  if (isEditable) {
890
793
  if (isReadOnly || isDisabled) {
891
794
  return false;
892
795
  }
893
-
894
796
  return true;
895
797
  }
896
-
897
798
  return false;
898
799
  }
899
800
  }, {
900
801
  key: "handleDateClear",
901
802
  value: function handleDateClear() {
902
803
  var _this$props10 = this.props,
903
- id = _this$props10.id,
904
- onSelect = _this$props10.onSelect,
905
- value = _this$props10.value;
804
+ id = _this$props10.id,
805
+ onSelect = _this$props10.onSelect,
806
+ value = _this$props10.value;
906
807
  this.setState({
907
808
  day: '',
908
809
  month: '',
@@ -914,7 +815,8 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
914
815
  stateFocusOrder: 0,
915
816
  isError: false
916
817
  });
917
- value && onSelect && onSelect('', id); // this.valueInput && this.valueInput.focus({ preventScroll: true });
818
+ value && onSelect && onSelect('', id);
819
+ // this.valueInput && this.valueInput.focus({ preventScroll: true });
918
820
  }
919
821
  }, {
920
822
  key: "handleDateTimeClear",
@@ -937,85 +839,82 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
937
839
  var focusOrder = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
938
840
  var oldFocusOrder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
939
841
  var isAllowedDateType = this.handleGetAllowedType();
940
-
941
842
  if (isAllowedDateType) {
942
843
  // if (focusOrder !== oldFocusOrder) {
943
844
  var _this$state$dateForma = this.state.dateFormatSelection,
944
- dateFormatSelection = _this$state$dateForma === void 0 ? {} : _this$state$dateForma;
845
+ dateFormatSelection = _this$state$dateForma === void 0 ? {} : _this$state$dateForma;
945
846
  var _dateFormatSelection$2 = dateFormatSelection.order,
946
- order = _dateFormatSelection$2 === void 0 ? [] : _dateFormatSelection$2;
947
- var isPopupOpen = this.props.isPopupOpen; // const { type: oldFocusedType = '' } = order[oldFocusOrder] || {};
847
+ order = _dateFormatSelection$2 === void 0 ? [] : _dateFormatSelection$2;
848
+ var isPopupOpen = this.props.isPopupOpen;
948
849
 
850
+ // const { type: oldFocusedType = '' } = order[oldFocusOrder] || {};
949
851
  var _ref4 = order[focusOrder] || {},
950
- _ref4$type = _ref4.type,
951
- focusedType = _ref4$type === void 0 ? '' : _ref4$type;
952
-
852
+ _ref4$type = _ref4.type,
853
+ focusedType = _ref4$type === void 0 ? '' : _ref4$type;
953
854
  var _this$getDateTimeStat = this.getDateTimeStateValues(),
954
- isYearView = _this$getDateTimeStat.isYearView,
955
- oldIsMonthOpen = _this$getDateTimeStat.isMonthOpen;
956
-
855
+ isYearView = _this$getDateTimeStat.isYearView,
856
+ oldIsMonthOpen = _this$getDateTimeStat.isMonthOpen;
957
857
  var yearViewTypes = ['month', 'year'];
958
858
  var isMonthOpen = focusedType === 'month';
959
-
960
859
  if (isPopupOpen) {
961
860
  if (yearViewTypes.indexOf(focusedType) >= 0 && (!isYearView || isMonthOpen !== oldIsMonthOpen)) {
962
861
  this.DateTimeYearViewToggle(true, isMonthOpen);
963
862
  } else if (yearViewTypes.indexOf(focusedType) === -1 && isYearView) {
964
863
  this.DateTimeYearViewToggle(false, false);
965
864
  }
966
- } // }
967
-
865
+ }
866
+ // }
968
867
  }
969
868
  }
970
869
  }, {
971
870
  key: "render",
972
871
  value: function render() {
973
872
  var _this$props11 = this.props,
974
- removeClose = _this$props11.removeClose,
975
- minErrorText = _this$props11.minErrorText,
976
- maxErrorText = _this$props11.maxErrorText,
977
- min = _this$props11.min,
978
- max = _this$props11.max,
979
- placeholder = _this$props11.placeholder,
980
- isPopupOpen = _this$props11.isPopupOpen,
981
- isPopupReady = _this$props11.isPopupReady,
982
- isDateTime = _this$props11.isDateTime,
983
- position = _this$props11.position,
984
- textBoxVariant = _this$props11.textBoxVariant,
985
- textBoxSize = _this$props11.textBoxSize,
986
- _this$props11$childre = _this$props11.children,
987
- children = _this$props11$childre === void 0 ? null : _this$props11$childre,
988
- isDisabled = _this$props11.isDisabled,
989
- getContainerRef = _this$props11.getContainerRef,
990
- getTargetRef = _this$props11.getTargetRef,
991
- timeZone = _this$props11.timeZone,
992
- isReadOnly = _this$props11.isReadOnly,
993
- dataId = _this$props11.dataId,
994
- needResponsive = _this$props11.needResponsive,
995
- className = _this$props11.className,
996
- needBorder = _this$props11.needBorder,
997
- defaultTime = _this$props11.defaultTime,
998
- needDefaultTime = _this$props11.needDefaultTime,
999
- borderColor = _this$props11.borderColor,
1000
- i18nKeys = _this$props11.i18nKeys,
1001
- needErrorOnBlur = _this$props11.needErrorOnBlur,
1002
- htmlId = _this$props11.htmlId,
1003
- iconOnHover = _this$props11.iconOnHover,
1004
- is24Hour = _this$props11.is24Hour,
1005
- isAbsolutePositioningNeeded = _this$props11.isAbsolutePositioningNeeded,
1006
- positionsOffset = _this$props11.positionsOffset,
1007
- targetOffset = _this$props11.targetOffset,
1008
- isRestrictScroll = _this$props11.isRestrictScroll,
1009
- dropBoxPortalId = _this$props11.dropBoxPortalId,
1010
- a11y = _this$props11.a11y,
1011
- boxSize = _this$props11.boxSize,
1012
- onError = _this$props11.onError;
873
+ removeClose = _this$props11.removeClose,
874
+ minErrorText = _this$props11.minErrorText,
875
+ maxErrorText = _this$props11.maxErrorText,
876
+ min = _this$props11.min,
877
+ max = _this$props11.max,
878
+ placeholder = _this$props11.placeholder,
879
+ isPopupOpen = _this$props11.isPopupOpen,
880
+ isPopupReady = _this$props11.isPopupReady,
881
+ isDateTime = _this$props11.isDateTime,
882
+ position = _this$props11.position,
883
+ textBoxVariant = _this$props11.textBoxVariant,
884
+ textBoxSize = _this$props11.textBoxSize,
885
+ _this$props11$childre = _this$props11.children,
886
+ children = _this$props11$childre === void 0 ? null : _this$props11$childre,
887
+ isDisabled = _this$props11.isDisabled,
888
+ getContainerRef = _this$props11.getContainerRef,
889
+ getTargetRef = _this$props11.getTargetRef,
890
+ timeZone = _this$props11.timeZone,
891
+ isReadOnly = _this$props11.isReadOnly,
892
+ dataId = _this$props11.dataId,
893
+ needResponsive = _this$props11.needResponsive,
894
+ className = _this$props11.className,
895
+ needBorder = _this$props11.needBorder,
896
+ defaultTime = _this$props11.defaultTime,
897
+ needDefaultTime = _this$props11.needDefaultTime,
898
+ borderColor = _this$props11.borderColor,
899
+ i18nKeys = _this$props11.i18nKeys,
900
+ needErrorOnBlur = _this$props11.needErrorOnBlur,
901
+ htmlId = _this$props11.htmlId,
902
+ iconOnHover = _this$props11.iconOnHover,
903
+ is24Hour = _this$props11.is24Hour,
904
+ isAbsolutePositioningNeeded = _this$props11.isAbsolutePositioningNeeded,
905
+ positionsOffset = _this$props11.positionsOffset,
906
+ targetOffset = _this$props11.targetOffset,
907
+ isRestrictScroll = _this$props11.isRestrictScroll,
908
+ dropBoxPortalId = _this$props11.dropBoxPortalId,
909
+ a11y = _this$props11.a11y,
910
+ boxSize = _this$props11.boxSize,
911
+ onError = _this$props11.onError;
1013
912
  var _this$state5 = this.state,
1014
- _this$state5$selected = _this$state5.selected,
1015
- value = _this$state5$selected === void 0 ? '' : _this$state5$selected,
1016
- isError = _this$state5.isError,
1017
- isDateEdited = _this$state5.isDateEdited,
1018
- isFocused = _this$state5.isFocused;
913
+ _this$state5$selected = _this$state5.selected,
914
+ value = _this$state5$selected === void 0 ? '' : _this$state5$selected,
915
+ isError = _this$state5.isError,
916
+ isDateEdited = _this$state5.isDateEdited,
917
+ isFocused = _this$state5.isFocused;
1019
918
  var showValue = this.handleGetShowValue();
1020
919
  var isAllowedDateType = this.handleGetAllowedType();
1021
920
  var showClear = !(isDisabled || isReadOnly) && (isDateEdited || value) ? true : false;
@@ -1100,14 +999,14 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
1100
999
  }));
1101
1000
  }
1102
1001
  }]);
1103
-
1104
1002
  return DateWidgetComponent;
1105
1003
  }(_react["default"].Component);
1106
-
1107
1004
  DateWidgetComponent.defaultProps = _defaultProps.DateWidget_defaultProps;
1108
1005
  DateWidgetComponent.propTypes = _propTypes.DateWidget_propTypes;
1109
1006
  var DateWidget = (0, _Popup["default"])(DateWidgetComponent);
1110
- DateWidget.defaultProps = DateWidgetComponent.defaultProps; // eslint-disable-next-line no-undef
1007
+ DateWidget.defaultProps = DateWidgetComponent.defaultProps;
1008
+
1009
+ // eslint-disable-next-line no-undef
1111
1010
  // if (__DOCS__) {
1112
1011
  // DateWidgetComponent.docs = {
1113
1012
  // componentGroup: 'Form Elements',
@@ -1118,6 +1017,5 @@ DateWidget.defaultProps = DateWidgetComponent.defaultProps; // eslint-disable-ne
1118
1017
  // // eslint-disable-next-line react/forbid-foreign-prop-types
1119
1018
  // DateWidget.propTypes = DateWidgetComponent.propTypes;
1120
1019
  // }
1121
-
1122
1020
  var _default = DateWidget;
1123
1021
  exports["default"] = _default;