@zohodesk/components 1.2.21 → 1.2.23

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 (664) hide show
  1. package/.DS_Store +0 -0
  2. package/.cli/PropLessFiles.html +1 -1
  3. package/.cli/propValidation_report.html +1 -1
  4. package/.cli/stringContains.js +1 -0
  5. package/README.md +10 -0
  6. package/assets/Appearance/dark/themes/blue/blue_CTA_DarkModifyCategory.module.css +15 -0
  7. package/assets/Appearance/dark/themes/blue/blue_CTA_DarkTheme.module.css +1 -0
  8. package/assets/Appearance/dark/themes/green/green_CTA_DarkModifyCategory.module.css +15 -0
  9. package/assets/Appearance/dark/themes/green/green_CTA_DarkTheme.module.css +1 -0
  10. package/assets/Appearance/dark/themes/orange/orange_CTA_DarkModifyCategory.module.css +15 -0
  11. package/assets/Appearance/dark/themes/orange/orange_CTA_DarkTheme.module.css +1 -0
  12. package/assets/Appearance/dark/themes/red/red_CTA_DarkModifyCategory.module.css +15 -0
  13. package/assets/Appearance/dark/themes/red/red_CTA_DarkTheme.module.css +1 -0
  14. package/assets/Appearance/dark/themes/yellow/yellow_CTA_DarkModifyCategory.module.css +15 -0
  15. package/assets/Appearance/dark/themes/yellow/yellow_CTA_DarkTheme.module.css +1 -0
  16. package/assets/Appearance/light/themes/blue/blue_CTA_LightModifyCategory.module.css +15 -0
  17. package/assets/Appearance/light/themes/blue/blue_CTA_LightTheme.module.css +1 -0
  18. package/assets/Appearance/light/themes/green/green_CTA_LightModifyCategory.module.css +15 -0
  19. package/assets/Appearance/light/themes/green/green_CTA_LightTheme.module.css +1 -0
  20. package/assets/Appearance/light/themes/orange/orange_CTA_LightModifyCategory.module.css +15 -0
  21. package/assets/Appearance/light/themes/orange/orange_CTA_LightTheme.module.css +1 -0
  22. package/assets/Appearance/light/themes/red/red_CTA_LightModifyCategory.module.css +15 -0
  23. package/assets/Appearance/light/themes/red/red_CTA_LightTheme.module.css +1 -0
  24. package/assets/Appearance/light/themes/yellow/yellow_CTA_LightModifyCategory.module.css +15 -0
  25. package/assets/Appearance/light/themes/yellow/yellow_CTA_LightTheme.module.css +1 -0
  26. package/assets/Appearance/pureDark/themes/blue/blue_CTA_PureDarkModifyCategory.module.css +15 -0
  27. package/assets/Appearance/pureDark/themes/blue/blue_CTA_PureDarkTheme.module.css +1 -0
  28. package/assets/Appearance/pureDark/themes/green/green_CTA_PureDarkModifyCategory.module.css +15 -0
  29. package/assets/Appearance/pureDark/themes/green/green_CTA_PureDarkTheme.module.css +1 -0
  30. package/assets/Appearance/pureDark/themes/orange/orange_CTA_PureDarkModifyCategory.module.css +15 -0
  31. package/assets/Appearance/pureDark/themes/orange/orange_CTA_PureDarkTheme.module.css +1 -0
  32. package/assets/Appearance/pureDark/themes/red/red_CTA_PureDarkModifyCategory.module.css +15 -0
  33. package/assets/Appearance/pureDark/themes/red/red_CTA_PureDarkTheme.module.css +1 -0
  34. package/assets/Appearance/pureDark/themes/yellow/yellow_CTA_PureDarkModifyCategory.module.css +15 -0
  35. package/assets/Appearance/pureDark/themes/yellow/yellow_CTA_PureDarkTheme.module.css +1 -0
  36. package/es/Accordion/Accordion.js +3 -7
  37. package/es/Accordion/AccordionItem.js +2 -4
  38. package/es/Animation/Animation.js +3 -3
  39. package/es/AppContainer/AppContainer.js +3 -14
  40. package/es/AppContainer/AppContainer.module.css +2 -2
  41. package/es/Avatar/Avatar.js +11 -23
  42. package/es/Avatar/Avatar.module.css +18 -18
  43. package/es/AvatarTeam/AvatarTeam.js +3 -3
  44. package/es/AvatarTeam/AvatarTeam.module.css +37 -35
  45. package/es/AvatarTeam/__tests__/AvatarTeam.spec.js +2 -1
  46. package/es/Button/Button.js +3 -4
  47. package/es/Button/css/Button.module.css +70 -70
  48. package/es/Buttongroup/Buttongroup.js +3 -3
  49. package/es/Buttongroup/Buttongroup.module.css +15 -13
  50. package/es/Card/Card.js +10 -21
  51. package/es/CheckBox/CheckBox.js +3 -5
  52. package/es/CheckBox/CheckBox.module.css +16 -16
  53. package/es/DateTime/CalendarView.js +20 -32
  54. package/es/DateTime/DateTime.js +6 -69
  55. package/es/DateTime/DateTime.module.css +40 -40
  56. package/es/DateTime/DateTimePopupFooter.js +1 -4
  57. package/es/DateTime/DateTimePopupHeader.js +2 -8
  58. package/es/DateTime/DateWidget.js +35 -98
  59. package/es/DateTime/DateWidget.module.css +5 -5
  60. package/es/DateTime/DaysRow.js +1 -4
  61. package/es/DateTime/Time.js +1 -10
  62. package/es/DateTime/YearView.js +4 -28
  63. package/es/DateTime/YearView.module.css +15 -15
  64. package/es/DateTime/common.js +0 -3
  65. package/es/DateTime/constants.js +0 -1
  66. package/es/DateTime/dateFormatUtils/dateFormat.js +30 -65
  67. package/es/DateTime/dateFormatUtils/dateFormats.js +1 -0
  68. package/es/DateTime/dateFormatUtils/dayChange.js +4 -13
  69. package/es/DateTime/dateFormatUtils/index.js +1 -31
  70. package/es/DateTime/dateFormatUtils/monthChange.js +0 -8
  71. package/es/DateTime/dateFormatUtils/timeChange.js +6 -22
  72. package/es/DateTime/dateFormatUtils/yearChange.js +2 -11
  73. package/es/DateTime/objectUtils.js +20 -14
  74. package/es/DateTime/typeChecker.js +0 -3
  75. package/es/DateTime/validator.js +6 -58
  76. package/es/DropBox/DropBox.js +2 -6
  77. package/es/DropBox/DropBoxElement/DropBoxElement.js +2 -8
  78. package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +76 -73
  79. package/es/DropBox/DropBoxElement/css/cssJSLogic.js +3 -5
  80. package/es/DropBox/DropBoxElement/useDropboxPosCalc.js +0 -3
  81. package/es/DropBox/css/DropBox.module.css +6 -6
  82. package/es/DropBox/props/defaultProps.js +2 -1
  83. package/es/DropBox/props/propTypes.js +2 -1
  84. package/es/DropDown/DropDown.js +1 -7
  85. package/es/DropDown/DropDown.module.css +2 -2
  86. package/es/DropDown/DropDownHeading.js +5 -4
  87. package/es/DropDown/DropDownHeading.module.css +6 -6
  88. package/es/DropDown/DropDownItem.js +0 -6
  89. package/es/DropDown/DropDownItem.module.css +12 -12
  90. package/es/DropDown/DropDownSearch.js +0 -4
  91. package/es/DropDown/DropDownSearch.module.css +3 -3
  92. package/es/DropDown/DropDownSeparator.js +0 -1
  93. package/es/DropDown/DropDownSeparator.module.css +2 -2
  94. package/es/DropDown/props/propTypes.js +2 -1
  95. package/es/Heading/Heading.js +3 -2
  96. package/es/Heading/Heading.module.css +2 -2
  97. package/es/Label/Label.js +3 -2
  98. package/es/Label/Label.module.css +5 -5
  99. package/es/Label/__tests__/Label.spec.js +2 -1
  100. package/es/Layout/Box.js +2 -15
  101. package/es/Layout/Container.js +3 -14
  102. package/es/Layout/Layout.module.css +15 -15
  103. package/es/Layout/index.js +2 -1
  104. package/es/Layout/utils.js +0 -1
  105. package/es/ListItem/ListContainer.js +3 -8
  106. package/es/ListItem/ListItem.js +3 -9
  107. package/es/ListItem/ListItem.module.css +38 -27
  108. package/es/ListItem/ListItemWithAvatar.js +3 -9
  109. package/es/ListItem/ListItemWithCheckBox.js +2 -7
  110. package/es/ListItem/ListItemWithIcon.js +3 -8
  111. package/es/ListItem/ListItemWithRadio.js +3 -7
  112. package/es/Modal/Modal.js +11 -28
  113. package/es/MultiSelect/AdvancedGroupMultiSelect.js +13 -89
  114. package/es/MultiSelect/AdvancedMultiSelect.js +9 -32
  115. package/es/MultiSelect/EmptyState.js +0 -2
  116. package/es/MultiSelect/MobileHeader/MobileHeader.module.css +5 -5
  117. package/es/MultiSelect/MultiSelect.js +30 -99
  118. package/es/MultiSelect/MultiSelect.module.css +31 -31
  119. package/es/MultiSelect/MultiSelectHeader.js +0 -3
  120. package/es/MultiSelect/MultiSelectWithAvatar.js +3 -10
  121. package/es/MultiSelect/SelectedOptions.js +3 -6
  122. package/es/MultiSelect/SelectedOptions.module.css +5 -5
  123. package/es/MultiSelect/Suggestions.js +3 -7
  124. package/es/MultiSelect/props/propTypes.js +2 -2
  125. package/es/PopOver/PopOver.js +0 -16
  126. package/es/Popup/Popup.js +24 -77
  127. package/es/Popup/viewPort.js +4 -16
  128. package/es/Provider/IdProvider.js +5 -10
  129. package/es/Provider/LibraryContext.js +4 -6
  130. package/es/Provider/NumberGenerator/NumberGenerator.js +7 -21
  131. package/es/Provider/ZindexProvider.js +2 -9
  132. package/es/Radio/Radio.js +0 -3
  133. package/es/Radio/Radio.module.css +9 -9
  134. package/es/Responsive/CustomResponsive.js +18 -30
  135. package/es/Responsive/RefWrapper.js +7 -6
  136. package/es/Responsive/ResizeComponent.js +25 -35
  137. package/es/Responsive/ResizeObserver.js +6 -26
  138. package/es/Responsive/Responsive.js +20 -34
  139. package/es/Responsive/index.js +3 -1
  140. package/es/Responsive/sizeObservers.js +7 -28
  141. package/es/Responsive/utils/index.js +5 -7
  142. package/es/Responsive/utils/shallowCompare.js +2 -7
  143. package/es/Responsive/windowResizeObserver.js +0 -7
  144. package/es/ResponsiveDropBox/ResponsiveDropBox.js +0 -4
  145. package/es/ResponsiveDropBox/ResponsiveDropBox.module.css +2 -2
  146. package/es/ResponsiveDropBox/props/propTypes.js +2 -1
  147. package/es/Ribbon/Ribbon.js +2 -3
  148. package/es/Ribbon/Ribbon.module.css +48 -45
  149. package/es/RippleEffect/RippleEffect.js +3 -1
  150. package/es/Select/GroupSelect.js +14 -58
  151. package/es/Select/Select.js +34 -80
  152. package/es/Select/Select.module.css +23 -23
  153. package/es/Select/SelectWithAvatar.js +4 -17
  154. package/es/Select/SelectWithIcon.js +5 -46
  155. package/es/Select/props/propTypes.js +2 -2
  156. package/es/Stencils/Stencils.js +3 -3
  157. package/es/Stencils/Stencils.module.css +11 -11
  158. package/es/Switch/Switch.js +3 -5
  159. package/es/Switch/Switch.module.css +23 -23
  160. package/es/Tab/Tab.js +4 -4
  161. package/es/Tab/Tab.module.css +14 -14
  162. package/es/Tab/TabContent.js +0 -1
  163. package/es/Tab/TabContentWrapper.js +8 -6
  164. package/es/Tab/TabWrapper.js +2 -5
  165. package/es/Tab/Tabs.js +7 -54
  166. package/es/Tab/Tabs.module.css +22 -22
  167. package/es/Tab/props/defaultProps.js +2 -1
  168. package/es/Tab/props/propTypes.js +3 -1
  169. package/es/Tag/Tag.js +3 -6
  170. package/es/Tag/Tag.module.css +26 -25
  171. package/es/TextBox/TextBox.js +3 -16
  172. package/es/TextBox/TextBox.module.css +10 -10
  173. package/es/TextBoxIcon/TextBoxIcon.js +2 -9
  174. package/es/TextBoxIcon/TextBoxIcon.module.css +7 -7
  175. package/es/TextBoxIcon/props/propTypes.js +2 -1
  176. package/es/Textarea/Textarea.js +3 -12
  177. package/es/Textarea/Textarea.module.css +22 -22
  178. package/es/Tooltip/Tooltip.js +14 -58
  179. package/es/Tooltip/Tooltip.module.css +5 -9
  180. package/es/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +2 -3
  181. package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +5 -7
  182. package/es/common/animation.module.css +8 -8
  183. package/es/common/avatarsizes.module.css +16 -16
  184. package/es/common/basicReset.module.css +3 -3
  185. package/es/common/common.module.css +24 -24
  186. package/es/common/customscroll.module.css +2 -12
  187. package/es/deprecated/PortalLayer/PortalLayer.js +20 -25
  188. package/es/semantic/Button/Button.js +2 -3
  189. package/es/semantic/Button/semanticButton.module.css +1 -1
  190. package/es/utils/Common.js +9 -54
  191. package/es/utils/ContextOptimizer.js +5 -4
  192. package/es/utils/constructFullName.js +0 -2
  193. package/es/utils/datetime/common.js +5 -16
  194. package/es/utils/debounce.js +1 -5
  195. package/es/utils/dropDownUtils.js +11 -68
  196. package/es/utils/getInitial.js +0 -4
  197. package/es/utils/shallowEqual.js +0 -6
  198. package/es/v1/Accordion/Accordion.js +3 -4
  199. package/es/v1/Accordion/AccordionItem.js +2 -4
  200. package/es/v1/Animation/Animation.js +3 -1
  201. package/es/v1/AppContainer/AppContainer.js +3 -9
  202. package/es/v1/Avatar/Avatar.js +6 -18
  203. package/es/v1/AvatarTeam/AvatarTeam.js +0 -1
  204. package/es/v1/Button/Button.js +3 -3
  205. package/es/v1/Card/Card.js +8 -16
  206. package/es/v1/CheckBox/CheckBox.js +3 -6
  207. package/es/v1/DateTime/CalendarView.js +20 -32
  208. package/es/v1/DateTime/DateTime.js +6 -69
  209. package/es/v1/DateTime/DateTimePopupFooter.js +1 -4
  210. package/es/v1/DateTime/DateTimePopupHeader.js +2 -8
  211. package/es/v1/DateTime/DateWidget.js +35 -98
  212. package/es/v1/DateTime/DaysRow.js +1 -4
  213. package/es/v1/DateTime/Time.js +1 -10
  214. package/es/v1/DateTime/YearView.js +4 -28
  215. package/es/v1/DropBox/DropBox.js +2 -6
  216. package/es/v1/DropBox/DropBoxElement/DropBoxElement.js +2 -8
  217. package/es/v1/DropBox/props/defaultProps.js +2 -1
  218. package/es/v1/DropBox/props/propTypes.js +2 -1
  219. package/es/v1/DropDown/DropDown.js +0 -3
  220. package/es/v1/DropDown/DropDownHeading.js +2 -2
  221. package/es/v1/DropDown/DropDownItem.js +0 -5
  222. package/es/v1/DropDown/DropDownSearch.js +2 -3
  223. package/es/v1/DropDown/props/propTypes.js +2 -1
  224. package/es/v1/Heading/Heading.js +3 -1
  225. package/es/v1/Layout/Box.js +2 -15
  226. package/es/v1/Layout/Container.js +3 -14
  227. package/es/v1/ListItem/ListContainer.js +3 -8
  228. package/es/v1/ListItem/ListItem.js +3 -10
  229. package/es/v1/ListItem/ListItemWithAvatar.js +1 -9
  230. package/es/v1/ListItem/ListItemWithCheckBox.js +2 -8
  231. package/es/v1/ListItem/ListItemWithIcon.js +3 -9
  232. package/es/v1/ListItem/ListItemWithRadio.js +3 -8
  233. package/es/v1/Modal/Modal.js +1 -17
  234. package/es/v1/MultiSelect/AdvancedGroupMultiSelect.js +15 -90
  235. package/es/v1/MultiSelect/AdvancedMultiSelect.js +9 -32
  236. package/es/v1/MultiSelect/EmptyState.js +0 -2
  237. package/es/v1/MultiSelect/MultiSelect.js +31 -100
  238. package/es/v1/MultiSelect/MultiSelectHeader.js +0 -3
  239. package/es/v1/MultiSelect/MultiSelectWithAvatar.js +3 -11
  240. package/es/v1/MultiSelect/SelectedOptions.js +3 -6
  241. package/es/v1/MultiSelect/Suggestions.js +3 -7
  242. package/es/v1/MultiSelect/props/propTypes.js +2 -2
  243. package/es/v1/PopOver/PopOver.js +0 -11
  244. package/es/v1/Popup/Popup.js +24 -77
  245. package/es/v1/Provider/IdProvider.js +5 -10
  246. package/es/v1/Provider/LibraryContext.js +4 -6
  247. package/es/v1/Provider/NumberGenerator/NumberGenerator.js +7 -21
  248. package/es/v1/Provider/ZindexProvider.js +2 -9
  249. package/es/v1/Radio/Radio.js +2 -5
  250. package/es/v1/Responsive/CustomResponsive.js +18 -30
  251. package/es/v1/Responsive/RefWrapper.js +7 -6
  252. package/es/v1/Responsive/ResizeComponent.js +25 -35
  253. package/es/v1/Responsive/ResizeObserver.js +6 -26
  254. package/es/v1/Responsive/Responsive.js +20 -34
  255. package/es/v1/Responsive/index.js +3 -1
  256. package/es/v1/ResponsiveDropBox/ResponsiveDropBox.js +0 -1
  257. package/es/v1/ResponsiveDropBox/props/propTypes.js +2 -1
  258. package/es/v1/Select/GroupSelect.js +14 -58
  259. package/es/v1/Select/Select.js +38 -82
  260. package/es/v1/Select/SelectWithAvatar.js +4 -17
  261. package/es/v1/Select/SelectWithIcon.js +5 -46
  262. package/es/v1/Select/props/propTypes.js +2 -2
  263. package/es/v1/Stencils/Stencils.js +0 -2
  264. package/es/v1/Switch/Switch.js +3 -6
  265. package/es/v1/Tab/Tab.js +3 -3
  266. package/es/v1/Tab/TabContent.js +0 -1
  267. package/es/v1/Tab/TabContentWrapper.js +8 -6
  268. package/es/v1/Tab/TabWrapper.js +2 -5
  269. package/es/v1/Tab/Tabs.js +9 -54
  270. package/es/v1/Tab/props/defaultProps.js +2 -1
  271. package/es/v1/Tab/props/propTypes.js +3 -1
  272. package/es/v1/Tab/v1Tab.module.css +14 -14
  273. package/es/v1/Tab/v1Tabs.module.css +22 -22
  274. package/es/v1/Tag/Tag.js +1 -5
  275. package/es/v1/TextBox/TextBox.js +0 -14
  276. package/es/v1/TextBoxIcon/TextBoxIcon.js +2 -6
  277. package/es/v1/TextBoxIcon/props/propTypes.js +2 -1
  278. package/es/v1/Textarea/Textarea.js +3 -10
  279. package/es/v1/Tooltip/Tooltip.js +14 -58
  280. package/es/v1/Typography/Typography.js +0 -2
  281. package/es/v1/Typography/css/Typography.module.css +31 -31
  282. package/es/v1/Typography/css/cssJSLogic.js +0 -3
  283. package/es/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +2 -1
  284. package/es/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +4 -5
  285. package/es/v1/semantic/Button/Button.js +2 -1
  286. package/lib/Accordion/Accordion.js +18 -42
  287. package/lib/Accordion/AccordionItem.js +18 -40
  288. package/lib/Accordion/index.js +0 -3
  289. package/lib/Accordion/props/propTypes.js +0 -3
  290. package/lib/Animation/Animation.js +18 -38
  291. package/lib/Animation/props/propTypes.js +0 -3
  292. package/lib/AppContainer/AppContainer.js +20 -58
  293. package/lib/AppContainer/AppContainer.module.css +2 -2
  294. package/lib/AppContainer/props/propTypes.js +0 -3
  295. package/lib/Avatar/Avatar.js +38 -78
  296. package/lib/Avatar/Avatar.module.css +18 -18
  297. package/lib/Avatar/__tests__/Avatar.spec.js +71 -95
  298. package/lib/Avatar/props/propTypes.js +0 -3
  299. package/lib/AvatarTeam/AvatarTeam.js +30 -52
  300. package/lib/AvatarTeam/AvatarTeam.module.css +37 -35
  301. package/lib/AvatarTeam/__tests__/AvatarTeam.spec.js +61 -77
  302. package/lib/AvatarTeam/props/propTypes.js +0 -3
  303. package/lib/Button/Button.js +22 -33
  304. package/lib/Button/__tests__/Button.spec.js +48 -65
  305. package/lib/Button/css/Button.module.css +70 -70
  306. package/lib/Button/css/cssJSLogic.js +17 -18
  307. package/lib/Button/index.js +0 -3
  308. package/lib/Button/props/defaultProps.js +0 -2
  309. package/lib/Button/props/propTypes.js +0 -3
  310. package/lib/Buttongroup/Buttongroup.js +12 -32
  311. package/lib/Buttongroup/Buttongroup.module.css +15 -13
  312. package/lib/Buttongroup/__tests__/Buttongroup.spec.js +10 -18
  313. package/lib/Buttongroup/props/propTypes.js +0 -3
  314. package/lib/Card/Card.js +46 -102
  315. package/lib/Card/index.js +0 -4
  316. package/lib/Card/props/propTypes.js +0 -3
  317. package/lib/CheckBox/CheckBox.js +47 -71
  318. package/lib/CheckBox/CheckBox.module.css +16 -16
  319. package/lib/CheckBox/props/propTypes.js +0 -3
  320. package/lib/DateTime/CalendarView.js +42 -82
  321. package/lib/DateTime/DateTime.js +156 -244
  322. package/lib/DateTime/DateTime.module.css +40 -40
  323. package/lib/DateTime/DateTimePopupFooter.js +8 -33
  324. package/lib/DateTime/DateTimePopupHeader.js +17 -49
  325. package/lib/DateTime/DateWidget.js +249 -350
  326. package/lib/DateTime/DateWidget.module.css +5 -5
  327. package/lib/DateTime/DaysRow.js +5 -28
  328. package/lib/DateTime/Time.js +32 -75
  329. package/lib/DateTime/YearView.js +27 -76
  330. package/lib/DateTime/YearView.module.css +15 -15
  331. package/lib/DateTime/common.js +0 -6
  332. package/lib/DateTime/constants.js +0 -1
  333. package/lib/DateTime/dateFormatUtils/dateFormat.js +122 -187
  334. package/lib/DateTime/dateFormatUtils/dateFormats.js +1 -0
  335. package/lib/DateTime/dateFormatUtils/dayChange.js +7 -15
  336. package/lib/DateTime/dateFormatUtils/index.js +16 -73
  337. package/lib/DateTime/dateFormatUtils/monthChange.js +9 -20
  338. package/lib/DateTime/dateFormatUtils/timeChange.js +22 -54
  339. package/lib/DateTime/dateFormatUtils/yearChange.js +11 -23
  340. package/lib/DateTime/index.js +0 -2
  341. package/lib/DateTime/objectUtils.js +20 -24
  342. package/lib/DateTime/props/propTypes.js +1 -11
  343. package/lib/DateTime/typeChecker.js +0 -4
  344. package/lib/DateTime/validator.js +10 -73
  345. package/lib/DropBox/DropBox.js +21 -45
  346. package/lib/DropBox/DropBoxElement/DropBoxElement.js +40 -60
  347. package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +76 -73
  348. package/lib/DropBox/DropBoxElement/css/cssJSLogic.js +34 -42
  349. package/lib/DropBox/DropBoxElement/props/propTypes.js +0 -3
  350. package/lib/DropBox/DropBoxElement/useDropboxPosCalc.js +9 -14
  351. package/lib/DropBox/css/DropBox.module.css +6 -6
  352. package/lib/DropBox/css/cssJSLogic.js +1 -3
  353. package/lib/DropBox/props/defaultProps.js +4 -8
  354. package/lib/DropBox/props/propTypes.js +4 -10
  355. package/lib/DropDown/DropDown.js +5 -51
  356. package/lib/DropDown/DropDown.module.css +2 -2
  357. package/lib/DropDown/DropDownHeading.js +20 -39
  358. package/lib/DropDown/DropDownHeading.module.css +6 -6
  359. package/lib/DropDown/DropDownItem.js +20 -42
  360. package/lib/DropDown/DropDownItem.module.css +12 -12
  361. package/lib/DropDown/DropDownSearch.js +17 -40
  362. package/lib/DropDown/DropDownSearch.module.css +3 -3
  363. package/lib/DropDown/DropDownSeparator.js +4 -24
  364. package/lib/DropDown/DropDownSeparator.module.css +2 -2
  365. package/lib/DropDown/index.js +0 -9
  366. package/lib/DropDown/props/propTypes.js +4 -10
  367. package/lib/Heading/Heading.js +15 -37
  368. package/lib/Heading/Heading.module.css +2 -2
  369. package/lib/Heading/props/propTypes.js +0 -3
  370. package/lib/Label/Label.js +21 -41
  371. package/lib/Label/Label.module.css +5 -5
  372. package/lib/Label/__tests__/Label.spec.js +34 -48
  373. package/lib/Label/props/propTypes.js +0 -3
  374. package/lib/Layout/Box.js +15 -35
  375. package/lib/Layout/Container.js +14 -33
  376. package/lib/Layout/Layout.module.css +15 -15
  377. package/lib/Layout/index.js +0 -3
  378. package/lib/Layout/props/propTypes.js +0 -3
  379. package/lib/Layout/utils.js +0 -11
  380. package/lib/ListItem/ListContainer.js +30 -55
  381. package/lib/ListItem/ListItem.js +45 -74
  382. package/lib/ListItem/ListItem.module.css +38 -27
  383. package/lib/ListItem/ListItemWithAvatar.js +48 -80
  384. package/lib/ListItem/ListItemWithCheckBox.js +40 -70
  385. package/lib/ListItem/ListItemWithIcon.js +44 -73
  386. package/lib/ListItem/ListItemWithRadio.js +42 -71
  387. package/lib/ListItem/index.js +0 -7
  388. package/lib/ListItem/props/propTypes.js +4 -6
  389. package/lib/Modal/Modal.js +10 -45
  390. package/lib/Modal/props/propTypes.js +0 -3
  391. package/lib/MultiSelect/AdvancedGroupMultiSelect.js +166 -293
  392. package/lib/MultiSelect/AdvancedMultiSelect.js +125 -202
  393. package/lib/MultiSelect/EmptyState.js +24 -45
  394. package/lib/MultiSelect/MobileHeader/MobileHeader.js +5 -14
  395. package/lib/MultiSelect/MobileHeader/MobileHeader.module.css +5 -5
  396. package/lib/MultiSelect/MobileHeader/props/propTypes.js +0 -3
  397. package/lib/MultiSelect/MultiSelect.js +214 -333
  398. package/lib/MultiSelect/MultiSelect.module.css +31 -31
  399. package/lib/MultiSelect/MultiSelectHeader.js +7 -29
  400. package/lib/MultiSelect/MultiSelectWithAvatar.js +43 -85
  401. package/lib/MultiSelect/SelectedOptions.js +17 -43
  402. package/lib/MultiSelect/SelectedOptions.module.css +5 -5
  403. package/lib/MultiSelect/Suggestions.js +32 -64
  404. package/lib/MultiSelect/index.js +0 -5
  405. package/lib/MultiSelect/props/defaultProps.js +0 -2
  406. package/lib/MultiSelect/props/propTypes.js +4 -14
  407. package/lib/PopOver/PopOver.js +47 -94
  408. package/lib/PopOver/index.js +0 -4
  409. package/lib/PopOver/props/propTypes.js +0 -3
  410. package/lib/Popup/Popup.js +81 -158
  411. package/lib/Popup/viewPort.js +14 -28
  412. package/lib/Provider/AvatarSize.js +0 -4
  413. package/lib/Provider/Config.js +0 -2
  414. package/lib/Provider/CssProvider.js +0 -4
  415. package/lib/Provider/IdProvider.js +6 -17
  416. package/lib/Provider/LibraryContext.js +15 -35
  417. package/lib/Provider/LibraryContextInit.js +0 -4
  418. package/lib/Provider/NumberGenerator/NumberGenerator.js +15 -44
  419. package/lib/Provider/ZindexProvider.js +3 -15
  420. package/lib/Provider/index.js +0 -5
  421. package/lib/Radio/Radio.js +36 -60
  422. package/lib/Radio/Radio.module.css +9 -9
  423. package/lib/Radio/__tests__/Radio.spec.js +103 -134
  424. package/lib/Radio/props/propTypes.js +0 -3
  425. package/lib/Responsive/CustomResponsive.js +29 -73
  426. package/lib/Responsive/RefWrapper.js +11 -17
  427. package/lib/Responsive/ResizeComponent.js +36 -62
  428. package/lib/Responsive/ResizeObserver.js +10 -24
  429. package/lib/Responsive/Responsive.js +30 -80
  430. package/lib/Responsive/index.js +0 -4
  431. package/lib/Responsive/props/propTypes.js +0 -3
  432. package/lib/Responsive/sizeObservers.js +17 -53
  433. package/lib/Responsive/utils/index.js +3 -11
  434. package/lib/Responsive/utils/shallowCompare.js +2 -11
  435. package/lib/Responsive/windowResizeObserver.js +0 -8
  436. package/lib/ResponsiveDropBox/ResponsiveDropBox.js +17 -45
  437. package/lib/ResponsiveDropBox/ResponsiveDropBox.module.css +2 -2
  438. package/lib/ResponsiveDropBox/props/propTypes.js +4 -9
  439. package/lib/Ribbon/Ribbon.js +13 -33
  440. package/lib/Ribbon/Ribbon.module.css +48 -45
  441. package/lib/Ribbon/__tests__/Ribbon.spec.js +14 -24
  442. package/lib/Ribbon/props/propTypes.js +0 -3
  443. package/lib/RippleEffect/RippleEffect.js +10 -18
  444. package/lib/RippleEffect/__tests__/RippleEffect.spec.js +22 -34
  445. package/lib/RippleEffect/props/propTypes.js +0 -3
  446. package/lib/Select/GroupSelect.js +130 -229
  447. package/lib/Select/Select.js +212 -296
  448. package/lib/Select/Select.module.css +23 -23
  449. package/lib/Select/SelectWithAvatar.js +56 -102
  450. package/lib/Select/SelectWithIcon.js +76 -131
  451. package/lib/Select/index.js +0 -5
  452. package/lib/Select/props/defaultProps.js +4 -5
  453. package/lib/Select/props/propTypes.js +4 -10
  454. package/lib/Stencils/Stencils.js +10 -29
  455. package/lib/Stencils/Stencils.module.css +11 -11
  456. package/lib/Stencils/__tests__/Stencils.spec.js +13 -22
  457. package/lib/Stencils/props/propTypes.js +0 -3
  458. package/lib/Switch/Switch.js +34 -57
  459. package/lib/Switch/Switch.module.css +23 -23
  460. package/lib/Switch/__tests__/Switch.spec.js +72 -91
  461. package/lib/Switch/props/propTypes.js +0 -3
  462. package/lib/Tab/Tab.js +27 -40
  463. package/lib/Tab/Tab.module.css +14 -14
  464. package/lib/Tab/TabContent.js +5 -12
  465. package/lib/Tab/TabContentWrapper.js +13 -16
  466. package/lib/Tab/TabWrapper.js +19 -37
  467. package/lib/Tab/Tabs.js +91 -171
  468. package/lib/Tab/Tabs.module.css +22 -22
  469. package/lib/Tab/index.js +0 -6
  470. package/lib/Tab/props/defaultProps.js +2 -1
  471. package/lib/Tab/props/propTypes.js +3 -4
  472. package/lib/Tag/Tag.js +43 -72
  473. package/lib/Tag/Tag.module.css +26 -25
  474. package/lib/Tag/props/propTypes.js +0 -3
  475. package/lib/TextBox/TextBox.js +60 -86
  476. package/lib/TextBox/TextBox.module.css +10 -10
  477. package/lib/TextBox/props/propTypes.js +4 -6
  478. package/lib/TextBoxIcon/TextBoxIcon.js +53 -80
  479. package/lib/TextBoxIcon/TextBoxIcon.module.css +7 -7
  480. package/lib/TextBoxIcon/props/propTypes.js +4 -9
  481. package/lib/Textarea/Textarea.js +29 -54
  482. package/lib/Textarea/Textarea.module.css +22 -22
  483. package/lib/Textarea/props/propTypes.js +0 -3
  484. package/lib/Tooltip/Tooltip.js +31 -94
  485. package/lib/Tooltip/Tooltip.module.css +5 -9
  486. package/lib/Tooltip/props/propTypes.js +0 -3
  487. package/lib/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +16 -40
  488. package/lib/VelocityAnimation/VelocityAnimation/props/propTypes.js +0 -3
  489. package/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +25 -53
  490. package/lib/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +0 -3
  491. package/lib/VelocityAnimation/index.js +0 -3
  492. package/lib/common/animation.module.css +8 -8
  493. package/lib/common/avatarsizes.module.css +16 -16
  494. package/lib/common/basicReset.module.css +3 -3
  495. package/lib/common/common.module.css +24 -24
  496. package/lib/common/customscroll.module.css +2 -12
  497. package/lib/css.js +0 -40
  498. package/lib/deprecated/PortalLayer/PortalLayer.js +23 -46
  499. package/lib/deprecated/PortalLayer/props/propTypes.js +0 -3
  500. package/lib/index.js +0 -58
  501. package/lib/semantic/Button/Button.js +22 -42
  502. package/lib/semantic/Button/props/propTypes.js +0 -3
  503. package/lib/semantic/Button/semanticButton.module.css +1 -1
  504. package/lib/semantic/index.js +0 -2
  505. package/lib/utils/Common.js +18 -111
  506. package/lib/utils/ContextOptimizer.js +10 -16
  507. package/lib/utils/constructFullName.js +4 -13
  508. package/lib/utils/datetime/common.js +5 -34
  509. package/lib/utils/debounce.js +1 -6
  510. package/lib/utils/dropDownUtils.js +59 -175
  511. package/lib/utils/dummyFunction.js +0 -2
  512. package/lib/utils/getHTMLFontSize.js +0 -1
  513. package/lib/utils/getInitial.js +0 -6
  514. package/lib/utils/index.js +0 -1
  515. package/lib/utils/scrollTo.js +0 -2
  516. package/lib/utils/shallowEqual.js +0 -8
  517. package/lib/v1/Accordion/Accordion.js +19 -38
  518. package/lib/v1/Accordion/AccordionItem.js +13 -23
  519. package/lib/v1/Accordion/index.js +0 -3
  520. package/lib/v1/Accordion/props/propTypes.js +0 -3
  521. package/lib/v1/Animation/Animation.js +14 -20
  522. package/lib/v1/Animation/props/propTypes.js +0 -3
  523. package/lib/v1/AppContainer/AppContainer.js +17 -46
  524. package/lib/v1/AppContainer/props/propTypes.js +0 -3
  525. package/lib/v1/Avatar/Avatar.js +32 -68
  526. package/lib/v1/Avatar/props/propTypes.js +0 -3
  527. package/lib/v1/AvatarTeam/AvatarTeam.js +24 -32
  528. package/lib/v1/AvatarTeam/props/propTypes.js +0 -3
  529. package/lib/v1/Button/Button.js +22 -32
  530. package/lib/v1/Button/props/defaultProps.js +0 -2
  531. package/lib/v1/Button/props/propTypes.js +0 -3
  532. package/lib/v1/Buttongroup/Buttongroup.js +5 -13
  533. package/lib/v1/Buttongroup/props/propTypes.js +0 -3
  534. package/lib/v1/Card/Card.js +44 -78
  535. package/lib/v1/Card/index.js +0 -4
  536. package/lib/v1/Card/props/propTypes.js +0 -3
  537. package/lib/v1/CheckBox/CheckBox.js +41 -52
  538. package/lib/v1/CheckBox/props/propTypes.js +0 -3
  539. package/lib/v1/DateTime/CalendarView.js +48 -89
  540. package/lib/v1/DateTime/DateTime.js +158 -246
  541. package/lib/v1/DateTime/DateTimePopupFooter.js +8 -33
  542. package/lib/v1/DateTime/DateTimePopupHeader.js +17 -49
  543. package/lib/v1/DateTime/DateWidget.js +251 -352
  544. package/lib/v1/DateTime/DaysRow.js +5 -28
  545. package/lib/v1/DateTime/Time.js +32 -75
  546. package/lib/v1/DateTime/YearView.js +27 -76
  547. package/lib/v1/DateTime/index.js +0 -2
  548. package/lib/v1/DateTime/props/propTypes.js +1 -11
  549. package/lib/v1/DropBox/DropBox.js +21 -45
  550. package/lib/v1/DropBox/DropBoxElement/DropBoxElement.js +40 -60
  551. package/lib/v1/DropBox/DropBoxElement/props/propTypes.js +0 -3
  552. package/lib/v1/DropBox/props/defaultProps.js +4 -8
  553. package/lib/v1/DropBox/props/propTypes.js +4 -10
  554. package/lib/v1/DropDown/DropDown.js +3 -23
  555. package/lib/v1/DropDown/DropDownHeading.js +13 -20
  556. package/lib/v1/DropDown/DropDownItem.js +11 -26
  557. package/lib/v1/DropDown/DropDownSearch.js +16 -28
  558. package/lib/v1/DropDown/DropDownSeparator.js +1 -7
  559. package/lib/v1/DropDown/props/propTypes.js +4 -10
  560. package/lib/v1/Heading/Heading.js +14 -19
  561. package/lib/v1/Heading/props/propTypes.js +0 -3
  562. package/lib/v1/Label/Label.js +14 -22
  563. package/lib/v1/Label/props/propTypes.js +0 -3
  564. package/lib/v1/Layout/Box.js +15 -35
  565. package/lib/v1/Layout/Container.js +14 -33
  566. package/lib/v1/Layout/index.js +0 -3
  567. package/lib/v1/Layout/props/propTypes.js +0 -3
  568. package/lib/v1/ListItem/ListContainer.js +30 -55
  569. package/lib/v1/ListItem/ListItem.js +38 -53
  570. package/lib/v1/ListItem/ListItemWithAvatar.js +39 -62
  571. package/lib/v1/ListItem/ListItemWithCheckBox.js +34 -49
  572. package/lib/v1/ListItem/ListItemWithIcon.js +37 -52
  573. package/lib/v1/ListItem/ListItemWithRadio.js +35 -49
  574. package/lib/v1/ListItem/index.js +0 -7
  575. package/lib/v1/ListItem/props/propTypes.js +4 -6
  576. package/lib/v1/Modal/Modal.js +9 -46
  577. package/lib/v1/Modal/props/propTypes.js +0 -3
  578. package/lib/v1/MultiSelect/AdvancedGroupMultiSelect.js +168 -294
  579. package/lib/v1/MultiSelect/AdvancedMultiSelect.js +125 -202
  580. package/lib/v1/MultiSelect/EmptyState.js +24 -45
  581. package/lib/v1/MultiSelect/MobileHeader/MobileHeader.js +5 -14
  582. package/lib/v1/MultiSelect/MobileHeader/props/propTypes.js +0 -3
  583. package/lib/v1/MultiSelect/MultiSelect.js +216 -335
  584. package/lib/v1/MultiSelect/MultiSelectHeader.js +7 -29
  585. package/lib/v1/MultiSelect/MultiSelectWithAvatar.js +43 -86
  586. package/lib/v1/MultiSelect/SelectedOptions.js +17 -43
  587. package/lib/v1/MultiSelect/Suggestions.js +32 -64
  588. package/lib/v1/MultiSelect/index.js +0 -5
  589. package/lib/v1/MultiSelect/props/defaultProps.js +0 -2
  590. package/lib/v1/MultiSelect/props/propTypes.js +4 -14
  591. package/lib/v1/PopOver/PopOver.js +40 -71
  592. package/lib/v1/PopOver/props/propTypes.js +0 -3
  593. package/lib/v1/Popup/Popup.js +81 -158
  594. package/lib/v1/Provider/AvatarSize.js +0 -4
  595. package/lib/v1/Provider/Config.js +0 -2
  596. package/lib/v1/Provider/CssProvider.js +0 -4
  597. package/lib/v1/Provider/IdProvider.js +6 -17
  598. package/lib/v1/Provider/LibraryContext.js +15 -35
  599. package/lib/v1/Provider/LibraryContextInit.js +0 -4
  600. package/lib/v1/Provider/NumberGenerator/NumberGenerator.js +15 -44
  601. package/lib/v1/Provider/ZindexProvider.js +3 -15
  602. package/lib/v1/Provider/index.js +0 -5
  603. package/lib/v1/Radio/Radio.js +32 -42
  604. package/lib/v1/Radio/props/propTypes.js +0 -3
  605. package/lib/v1/Responsive/CustomResponsive.js +29 -73
  606. package/lib/v1/Responsive/RefWrapper.js +11 -17
  607. package/lib/v1/Responsive/ResizeComponent.js +36 -62
  608. package/lib/v1/Responsive/ResizeObserver.js +10 -24
  609. package/lib/v1/Responsive/Responsive.js +30 -80
  610. package/lib/v1/Responsive/index.js +0 -4
  611. package/lib/v1/Responsive/props/propTypes.js +0 -3
  612. package/lib/v1/ResponsiveDropBox/ResponsiveDropBox.js +13 -27
  613. package/lib/v1/ResponsiveDropBox/props/propTypes.js +4 -9
  614. package/lib/v1/Ribbon/Ribbon.js +7 -14
  615. package/lib/v1/Ribbon/props/propTypes.js +0 -3
  616. package/lib/v1/RippleEffect/RippleEffect.js +7 -17
  617. package/lib/v1/RippleEffect/props/propTypes.js +0 -3
  618. package/lib/v1/Select/GroupSelect.js +130 -229
  619. package/lib/v1/Select/Select.js +215 -298
  620. package/lib/v1/Select/SelectWithAvatar.js +56 -102
  621. package/lib/v1/Select/SelectWithIcon.js +76 -131
  622. package/lib/v1/Select/index.js +0 -5
  623. package/lib/v1/Select/props/defaultProps.js +4 -5
  624. package/lib/v1/Select/props/propTypes.js +4 -10
  625. package/lib/v1/Stencils/Stencils.js +3 -13
  626. package/lib/v1/Stencils/props/propTypes.js +0 -3
  627. package/lib/v1/Switch/Switch.js +25 -38
  628. package/lib/v1/Switch/props/propTypes.js +0 -3
  629. package/lib/v1/Tab/Tab.js +27 -40
  630. package/lib/v1/Tab/TabContent.js +5 -12
  631. package/lib/v1/Tab/TabContentWrapper.js +13 -16
  632. package/lib/v1/Tab/TabWrapper.js +19 -37
  633. package/lib/v1/Tab/Tabs.js +83 -170
  634. package/lib/v1/Tab/index.js +0 -6
  635. package/lib/v1/Tab/props/defaultProps.js +2 -1
  636. package/lib/v1/Tab/props/propTypes.js +3 -4
  637. package/lib/v1/Tab/v1Tab.module.css +14 -14
  638. package/lib/v1/Tab/v1Tabs.module.css +22 -22
  639. package/lib/v1/Tag/Tag.js +32 -50
  640. package/lib/v1/Tag/props/propTypes.js +0 -3
  641. package/lib/v1/TextBox/TextBox.js +47 -70
  642. package/lib/v1/TextBox/props/propTypes.js +4 -6
  643. package/lib/v1/TextBoxIcon/TextBoxIcon.js +55 -80
  644. package/lib/v1/TextBoxIcon/props/propTypes.js +4 -9
  645. package/lib/v1/Textarea/Textarea.js +28 -45
  646. package/lib/v1/Textarea/props/propTypes.js +0 -3
  647. package/lib/v1/Tooltip/Tooltip.js +31 -94
  648. package/lib/v1/Tooltip/props/propTypes.js +0 -3
  649. package/lib/v1/Typography/Typography.js +15 -26
  650. package/lib/v1/Typography/css/Typography.module.css +31 -31
  651. package/lib/v1/Typography/css/cssJSLogic.js +20 -25
  652. package/lib/v1/Typography/props/propTypes.js +0 -3
  653. package/lib/v1/Typography/utils/index.js +0 -1
  654. package/lib/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +12 -25
  655. package/lib/v1/VelocityAnimation/VelocityAnimation/props/propTypes.js +0 -3
  656. package/lib/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +22 -38
  657. package/lib/v1/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +0 -3
  658. package/lib/v1/semantic/Button/Button.js +18 -24
  659. package/lib/v1/semantic/Button/props/propTypes.js +0 -3
  660. package/lib/v1/semantic/index.js +0 -2
  661. package/package.json +13 -12
  662. package/propValidationArg.json +2 -2
  663. package/result.json +1 -1
  664. /package/.cli/{AppearanceThemeValidationExcludeFiles.js → ThemeValidationExcludeFiles.js} +0 -0
@@ -16,6 +16,7 @@
16
16
  // 15.A: represent the AM or PM
17
17
  // 16.Z: represent the timezone (Asia/Kolkata)
18
18
  // 17. (O) : Offset Of the timezone (GMT+00:00)
19
+
19
20
  export const dateSymbols = {
20
21
  d: 'date',
21
22
  dd: 'date',
@@ -7,12 +7,11 @@ export function getChangedDay(values, event, focusOrders, keyActions) {
7
7
  which
8
8
  } = event;
9
9
  const {
10
- day = ''
11
- /*month = '', year = ''*/
12
-
10
+ day = '' /*month = '', year = ''*/
13
11
  } = values;
14
12
  let isChanged = false;
15
- let newDay = Number.parseInt(day) || 0; // const newMonth = Number.parseInt(month) || 0;
13
+ let newDay = Number.parseInt(day) || 0;
14
+ // const newMonth = Number.parseInt(month) || 0;
16
15
  // const newYear = Number.parseInt(year) || 0;
17
16
 
18
17
  const {
@@ -22,11 +21,8 @@ export function getChangedDay(values, event, focusOrders, keyActions) {
22
21
  const isNewType = getIsNewValueType(focusOrders, keyActions);
23
22
  const {
24
23
  startPoint,
25
- endPoint
26
- /*getDayEnd(newMonth, newYear);*/
27
-
24
+ endPoint /*getDayEnd(newMonth, newYear);*/
28
25
  } = getDayDetails();
29
-
30
26
  if (keyCode === 38) {
31
27
  //up arrow
32
28
  if (newDay === endPoint || !newDay) {
@@ -49,19 +45,15 @@ export function getChangedDay(values, event, focusOrders, keyActions) {
49
45
  const keyString = getKeyValue(event);
50
46
  let newValue = isNewType ? keyString : day.toString() + keyString;
51
47
  newValue = Number.parseInt(newValue);
52
-
53
48
  if (isNewType) {
54
49
  isChanged = true;
55
-
56
50
  if (newValue * 10 > endPoint) {
57
51
  newFocusOrder += 1;
58
52
  }
59
-
60
53
  newDay = newValue;
61
54
  } else {
62
55
  isChanged = true;
63
56
  newFocusOrder += 1;
64
-
65
57
  if (newValue > endPoint) {
66
58
  newDay = endPoint;
67
59
  } else if (!newValue) {
@@ -74,7 +66,6 @@ export function getChangedDay(values, event, focusOrders, keyActions) {
74
66
  isChanged = true;
75
67
  newDay = '';
76
68
  }
77
-
78
69
  return {
79
70
  day: newDay,
80
71
  isChanged,
@@ -2,8 +2,8 @@
2
2
 
3
3
  /** * Methods ** */
4
4
  import { getMonthEnd } from '../../utils/datetime/common';
5
- /** * Constants ** */
6
5
 
6
+ /** * Constants ** */
7
7
  import { flags, INVALID_DATE } from '../constants';
8
8
  import { getDateText } from './dateFormat';
9
9
  export function convertYearToTwoDigit(year) {
@@ -13,7 +13,6 @@ export function addZero() {
13
13
  let value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
14
14
  let length = arguments.length > 1 ? arguments[1] : undefined;
15
15
  let newValue = value.toString();
16
-
17
16
  for (let i = 0; i < length; i++) {
18
17
  if (newValue.length < length) {
19
18
  newValue = `0${newValue}`;
@@ -21,19 +20,16 @@ export function addZero() {
21
20
  break;
22
21
  }
23
22
  }
24
-
25
23
  return newValue;
26
24
  }
27
25
  export function getDayEnd(month, year) {
28
26
  month -= 1;
29
27
  const monthend = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
30
-
31
28
  if (month && year) {
32
29
  return getMonthEnd(month, year);
33
30
  } else if (month) {
34
31
  return monthend[month];
35
32
  }
36
-
37
33
  return 31;
38
34
  }
39
35
  export function getIsNumberTyped(event) {
@@ -43,18 +39,15 @@ export function getIsNumberTyped(event) {
43
39
  metaKey,
44
40
  shiftKey
45
41
  } = event;
46
-
47
42
  if ((keyCode >= 48 && keyCode <= 57 || keyCode >= 96 && keyCode <= 105) && !ctrlKey && !metaKey && !shiftKey) {
48
43
  return true;
49
44
  }
50
-
51
45
  return false;
52
46
  }
53
47
  export function getIsDeleteTyped(keyCode) {
54
48
  if (keyCode === 8) {
55
49
  return true;
56
50
  }
57
-
58
51
  return false;
59
52
  }
60
53
  export function getIsNewValueType(focusOrders, keyActions) {
@@ -83,7 +76,6 @@ export function getMonthDetails() {
83
76
  export function getYearDetails(yearLength) {
84
77
  const dateObj = new Date();
85
78
  const year = dateObj.getFullYear();
86
-
87
79
  if (yearLength === 2) {
88
80
  return {
89
81
  startPoint: 0,
@@ -91,7 +83,6 @@ export function getYearDetails(yearLength) {
91
83
  currentYear: year
92
84
  };
93
85
  }
94
-
95
86
  return {
96
87
  startPoint: 1850,
97
88
  endPoint: 9999,
@@ -105,11 +96,9 @@ export function convertTwoDigitToYear() {
105
96
  let year = dateObj.getFullYear();
106
97
  const digitValueStr = addZero(digitValue.toString(), 2);
107
98
  year = selectedYear ? selectedYear : year;
108
-
109
99
  if (digitValueStr && digitValueStr.length <= 2) {
110
100
  return parseInt(year.toString().slice(0, 2) + digitValueStr);
111
101
  }
112
-
113
102
  return digitValue;
114
103
  }
115
104
  export function getHourDetails(is24Hour) {
@@ -124,12 +113,10 @@ export function getHourSuggestions(is24Hour) {
124
113
  endPoint
125
114
  } = getHourDetails(is24Hour);
126
115
  const hourArr = [];
127
-
128
116
  for (let hour = startPoint; hour <= endPoint; hour++) {
129
117
  const htxt = addZeroIfNeeded(hour);
130
118
  hourArr.push(htxt);
131
119
  }
132
-
133
120
  return hourArr;
134
121
  }
135
122
  export function getMinuteDetails() {
@@ -144,12 +131,10 @@ export function getMinuteSuggestions() {
144
131
  endPoint
145
132
  } = getMinuteDetails();
146
133
  const minArr = [];
147
-
148
134
  for (let minute = startPoint; minute <= endPoint; minute++) {
149
135
  const mtxt = addZeroIfNeeded(minute);
150
136
  minArr.push(mtxt);
151
137
  }
152
-
153
138
  return minArr;
154
139
  }
155
140
  export function addZeroIfNeeded(value) {
@@ -159,14 +144,12 @@ export function getIsNoonValueTyped(event) {
159
144
  const {
160
145
  keyCode
161
146
  } = event;
162
-
163
147
  if (keyCode === 65 || keyCode === 77 || keyCode === 80) {
164
148
  //A -65
165
149
  //M -77
166
150
  //P -80
167
151
  return true;
168
152
  }
169
-
170
153
  return false;
171
154
  }
172
155
  export function getNoonDetails() {
@@ -174,42 +157,32 @@ export function getNoonDetails() {
174
157
  allowedValues: ['AM', 'PM']
175
158
  };
176
159
  }
177
-
178
160
  function getIsArrowTyped(keyCode) {
179
161
  const arrowKeycodes = [37, 38, 39, 40];
180
-
181
162
  if (arrowKeycodes.indexOf(keyCode) >= 0) {
182
163
  return true;
183
164
  }
184
-
185
165
  return false;
186
166
  }
187
-
188
167
  export function getIsSupportedKey(event) {
189
168
  const {
190
169
  keyCode
191
170
  } = event;
192
-
193
171
  if (getIsArrowTyped(keyCode) || getIsDeleteTyped(keyCode) || getIsNumberTyped(event) || getIsNoonValueTyped(event)) {
194
172
  return true;
195
173
  }
196
-
197
174
  return false;
198
175
  }
199
176
  export function arrayIsNotEqual(a, b) {
200
177
  return a.some((val, index) => val !== b[index]);
201
178
  }
202
-
203
179
  function getIsEmptyValue(value, startPoint, endPoint) {
204
180
  const newValue = parseInt(value) || 0;
205
-
206
181
  if (newValue >= startPoint && newValue <= endPoint) {
207
182
  return false;
208
183
  }
209
-
210
184
  return true;
211
185
  }
212
-
213
186
  export function getIsEmptyHour(value, is24Hour) {
214
187
  const {
215
188
  startPoint,
@@ -231,7 +204,6 @@ export function getIsCurrentYear(_ref) {
231
204
  timeZone
232
205
  } = _ref;
233
206
  let isCurrentYear = false;
234
-
235
207
  if (value && value !== INVALID_DATE) {
236
208
  const dateObj = getDateText(value, isDateTime, timeZone);
237
209
  const currentDateObj = new Date();
@@ -239,7 +211,6 @@ export function getIsCurrentYear(_ref) {
239
211
  const selectedYear = dateObj.getFullYear();
240
212
  isCurrentYear = currentYear === selectedYear;
241
213
  }
242
-
243
214
  return {
244
215
  isCurrentYear
245
216
  };
@@ -252,7 +223,6 @@ export function removeYearPattern(dateFormatArr, patternArr) {
252
223
  const {
253
224
  type
254
225
  } = flags[val];
255
-
256
226
  if (type === 'year') {
257
227
  yearIndex = index;
258
228
  } else {
@@ -24,7 +24,6 @@ export function getChangedMonth(values, event, focusOrders, keyActions) {
24
24
  startPoint,
25
25
  endPoint
26
26
  } = getMonthDetails();
27
-
28
27
  if (keyCode === 38) {
29
28
  //up arrow
30
29
  if (newMonth === endPoint || !newMonth) {
@@ -47,19 +46,15 @@ export function getChangedMonth(values, event, focusOrders, keyActions) {
47
46
  const keyString = getKeyValue(event);
48
47
  let newValue = isNewType ? keyString : month.toString() + keyString;
49
48
  newValue = Number.parseInt(newValue);
50
-
51
49
  if (isNewType) {
52
50
  isChanged = true;
53
-
54
51
  if (newValue * 10 > endPoint) {
55
52
  newFocusOrder += 1;
56
53
  }
57
-
58
54
  newMonth = newValue;
59
55
  } else {
60
56
  isChanged = true;
61
57
  newFocusOrder += 1;
62
-
63
58
  if (newValue > endPoint) {
64
59
  newMonth = endPoint;
65
60
  } else if (!newValue) {
@@ -72,15 +67,12 @@ export function getChangedMonth(values, event, focusOrders, keyActions) {
72
67
  isChanged = true;
73
68
  newMonth = '';
74
69
  }
75
-
76
70
  const dayEnd = getDayEnd(newMonth, newYear);
77
71
  let dayChanged = false;
78
-
79
72
  if (newDay && newDay > dayEnd) {
80
73
  dayChanged = true;
81
74
  newDay = dayEnd;
82
75
  }
83
-
84
76
  return {
85
77
  day: dayChanged ? newDay : day,
86
78
  month: newMonth,
@@ -23,7 +23,6 @@ export function getChangedHour(values, event, focusOrders, keyActions) {
23
23
  startPoint,
24
24
  endPoint
25
25
  } = getHourDetails(is24Hour);
26
-
27
26
  if (keyCode === 38) {
28
27
  //up arrow
29
28
  if (newHour === endPoint || getIsEmptyHour(newHour, is24Hour)) {
@@ -46,19 +45,15 @@ export function getChangedHour(values, event, focusOrders, keyActions) {
46
45
  const keyString = getKeyValue(event);
47
46
  let newValue = isNewType ? keyString : hour.toString() + keyString;
48
47
  newValue = Number.parseInt(newValue);
49
-
50
48
  if (isNewType) {
51
49
  isChanged = true;
52
-
53
50
  if (newValue * 10 > endPoint) {
54
51
  newFocusOrder += 1;
55
52
  }
56
-
57
53
  newHour = newValue;
58
54
  } else {
59
55
  isChanged = true;
60
56
  newFocusOrder += 1;
61
-
62
57
  if (newValue > endPoint) {
63
58
  newHour = endPoint;
64
59
  } else if (!newValue) {
@@ -71,7 +66,6 @@ export function getChangedHour(values, event, focusOrders, keyActions) {
71
66
  isChanged = true;
72
67
  newHour = '';
73
68
  }
74
-
75
69
  return {
76
70
  hour: newHour,
77
71
  isChanged,
@@ -98,7 +92,6 @@ export function getChangedMinute(values, event, focusOrders, keyActions) {
98
92
  startPoint,
99
93
  endPoint
100
94
  } = getMinuteDetails();
101
-
102
95
  if (keyCode === 38) {
103
96
  //up arrow
104
97
  if (newMinute === endPoint || isEmptyMinute) {
@@ -121,19 +114,15 @@ export function getChangedMinute(values, event, focusOrders, keyActions) {
121
114
  const keyString = getKeyValue(event);
122
115
  let newValue = isNewType ? keyString : minute.toString() + keyString;
123
116
  newValue = Number.parseInt(newValue);
124
-
125
117
  if (isNewType) {
126
118
  isChanged = true;
127
-
128
119
  if (newValue * 10 > endPoint) {
129
120
  newFocusOrder += 1;
130
121
  }
131
-
132
122
  newMinute = newValue;
133
123
  } else {
134
124
  isChanged = true;
135
125
  newFocusOrder += 1;
136
-
137
126
  if (newValue > endPoint) {
138
127
  newMinute = endPoint;
139
128
  } else {
@@ -144,16 +133,13 @@ export function getChangedMinute(values, event, focusOrders, keyActions) {
144
133
  isChanged = true;
145
134
  newMinute = '';
146
135
  }
147
-
148
136
  return {
149
137
  minute: newMinute,
150
138
  isChanged,
151
139
  focusOrder: newFocusOrder
152
140
  };
153
141
  }
154
- export function getChangedNoon(values, event, focusOrders
155
- /*keyActions*/
156
- ) {
142
+ export function getChangedNoon(values, event, focusOrders /*keyActions*/) {
157
143
  const {
158
144
  keyCode,
159
145
  which
@@ -166,7 +152,9 @@ export function getChangedNoon(values, event, focusOrders
166
152
  const {
167
153
  focusOrder
168
154
  } = focusOrders;
169
- const newFocusOrder = focusOrder; // const isNewType = getIsNewValueType(focusOrders, keyActions);
155
+ const newFocusOrder = focusOrder;
156
+
157
+ // const isNewType = getIsNewValueType(focusOrders, keyActions);
170
158
 
171
159
  const {
172
160
  allowedValues
@@ -174,7 +162,6 @@ export function getChangedNoon(values, event, focusOrders
174
162
  const [startPoint] = allowedValues;
175
163
  const endPoint = allowedValues[allowedValues.length - 1];
176
164
  const currentNoonIndex = allowedValues.indexOf(newNoon);
177
-
178
165
  if (keyCode === 38) {
179
166
  //up arrow
180
167
  if (newNoon === endPoint || !newNoon) {
@@ -194,11 +181,11 @@ export function getChangedNoon(values, event, focusOrders
194
181
  newNoon = allowedValues[currentNoonIndex - 1];
195
182
  }
196
183
  } else if (getIsNoonValueTyped(event)) {
197
- const keyString = getKeyValue(event).toUpperCase(); // let newValue = isNewType ? keyString : noon.toString() + keyString;
184
+ const keyString = getKeyValue(event).toUpperCase();
198
185
 
186
+ // let newValue = isNewType ? keyString : noon.toString() + keyString;
199
187
  const newValue = keyString;
200
188
  const needChangeNoon = newNoon.indexOf(newValue) === -1 ? true : false;
201
-
202
189
  if (needChangeNoon) {
203
190
  let newValueIndex = currentNoonIndex;
204
191
  allowedValues.some((val, index) => {
@@ -206,10 +193,8 @@ export function getChangedNoon(values, event, focusOrders
206
193
  newValueIndex = index;
207
194
  return true;
208
195
  }
209
-
210
196
  return false;
211
197
  });
212
-
213
198
  if (currentNoonIndex !== newValueIndex) {
214
199
  isChanged = true;
215
200
  newNoon = allowedValues[newValueIndex];
@@ -219,7 +204,6 @@ export function getChangedNoon(values, event, focusOrders
219
204
  isChanged = true;
220
205
  newNoon = '';
221
206
  }
222
-
223
207
  return {
224
208
  noon: newNoon,
225
209
  isChanged,
@@ -16,17 +16,16 @@ export function getChangedYear(values, event, focusOrders, keyActions, _ref) {
16
16
  day = '',
17
17
  month = ''
18
18
  } = values;
19
- let isChanged = false; //Year Two Digit case
19
+ let isChanged = false;
20
20
 
21
+ //Year Two Digit case
21
22
  const {
22
23
  length: yearLength
23
24
  } = yearInfo;
24
25
  const oldYear = year; // For get Centuries
25
-
26
26
  if (yearLength === 2) {
27
27
  year = convertYearToTwoDigit(year).toString();
28
28
  }
29
-
30
29
  let newDay = Number.parseInt(day) || 0;
31
30
  const newMonth = Number.parseInt(month) || 0;
32
31
  let newYear = Number.parseInt(year) || 0;
@@ -40,7 +39,6 @@ export function getChangedYear(values, event, focusOrders, keyActions, _ref) {
40
39
  endPoint,
41
40
  currentYear
42
41
  } = getYearDetails(yearLength);
43
-
44
42
  if (keyCode === 38) {
45
43
  //up arrow
46
44
  if (newYear === endPoint) {
@@ -70,17 +68,14 @@ export function getChangedYear(values, event, focusOrders, keyActions, _ref) {
70
68
  let newValue = isNewType ? keyString : year.toString() + keyString;
71
69
  const newValueString = newValue || '';
72
70
  newValue = Number.parseInt(newValue);
73
-
74
71
  if (isNewType) {
75
72
  isChanged = true;
76
73
  newYear = newValue;
77
74
  } else {
78
75
  isChanged = true;
79
-
80
76
  if (newValue * 10 > endPoint) {
81
77
  newFocusOrder += 1;
82
78
  }
83
-
84
79
  if (newValue > endPoint) {
85
80
  // newYear = endPoint;
86
81
  newYear = currentYear;
@@ -99,19 +94,15 @@ export function getChangedYear(values, event, focusOrders, keyActions, _ref) {
99
94
  isChanged = true;
100
95
  newYear = '';
101
96
  }
102
-
103
97
  if (yearLength === 2) {
104
98
  newYear = convertTwoDigitToYear(newYear, oldYear);
105
99
  }
106
-
107
100
  const dayEnd = getDayEnd(newMonth, newYear);
108
101
  let dayChanged = false;
109
-
110
102
  if (newDay && newDay > dayEnd) {
111
103
  dayChanged = true;
112
104
  newDay = dayEnd;
113
105
  }
114
-
115
106
  return {
116
107
  day: dayChanged ? newDay : day,
117
108
  year: newYear,
@@ -4,50 +4,56 @@ export const clone = (a, b, c, d, e, f) => {
4
4
  };
5
5
  export const extract = (obj, keys, target) => {
6
6
  target = target || {};
7
-
8
7
  for (var i in obj) {
9
8
  if (keys.indexOf(i) < 0) continue;
10
9
  if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
11
10
  target[i] = obj[i];
12
11
  }
13
-
14
12
  return target;
15
13
  };
16
14
  export const omit = (obj, keys, target) => {
17
15
  target = target || {};
18
-
19
16
  for (var i in obj) {
20
17
  if (keys.indexOf(i) >= 0) continue;
21
18
  if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
22
19
  target[i] = obj[i];
23
20
  }
24
-
25
21
  return target;
26
22
  };
27
23
  export const equals = (x, y) => {
28
- if (x === y) return true; // if both x and y are null or undefined and exactly the same
24
+ if (x === y) return true;
25
+ // if both x and y are null or undefined and exactly the same
29
26
 
30
- if (x == null && y != null || x != null && y == null) return false; //break if not same null or undefined
27
+ if (x == null && y != null || x != null && y == null) return false;
28
+ //break if not same null or undefined
31
29
 
32
- if (!(x instanceof Object) || !(y instanceof Object)) return false; // if they are not strictly equal, they both need to be Objects
30
+ if (!(x instanceof Object) || !(y instanceof Object)) return false;
31
+ // if they are not strictly equal, they both need to be Objects
33
32
 
34
- if (x.constructor !== y.constructor) return false; // they must have the exact same prototype chain, the closest we can do is
33
+ if (x.constructor !== y.constructor) return false;
34
+ // they must have the exact same prototype chain, the closest we can do is
35
35
  // test there constructor.
36
36
 
37
37
  for (var p in x) {
38
- if (!x.hasOwnProperty(p)) continue; // other properties were tested using x.constructor === y.constructor
38
+ if (!x.hasOwnProperty(p)) continue;
39
+ // other properties were tested using x.constructor === y.constructor
39
40
 
40
- if (!y.hasOwnProperty(p)) return false; // allows to compare x[ p ] and y[ p ] when set to undefined
41
+ if (!y.hasOwnProperty(p)) return false;
42
+ // allows to compare x[ p ] and y[ p ] when set to undefined
41
43
 
42
- if (x[p] === y[p]) continue; // if they have the same strict value or identity then they are equal
44
+ if (x[p] === y[p]) continue;
45
+ // if they have the same strict value or identity then they are equal
43
46
 
44
- if (typeof x[p] !== 'object') return false; // Numbers, Strings, Functions, Booleans must be strictly equal
47
+ if (typeof x[p] !== 'object') return false;
48
+ // Numbers, Strings, Functions, Booleans must be strictly equal
45
49
 
46
- if (!equals(x[p], y[p])) return false; // Objects and Arrays must be tested recursively
50
+ if (!equals(x[p], y[p])) return false;
51
+ // Objects and Arrays must be tested recursively
47
52
  }
48
53
 
49
54
  for (p in y) {
50
- if (y.hasOwnProperty(p) && !x.hasOwnProperty(p)) return false; // allows x[ p ] to be set to undefined
55
+ if (y.hasOwnProperty(p) && !x.hasOwnProperty(p)) return false;
56
+ // allows x[ p ] to be set to undefined
51
57
  }
52
58
 
53
59
  return true;
@@ -1,10 +1,8 @@
1
1
  const exports = {};
2
2
  let types = 'Array Object String Date RegExp Function Boolean Number Null Undefined'.split(' ');
3
-
4
3
  let type = function () {
5
4
  return Object.prototype.toString.call(this).slice(8, -1);
6
5
  };
7
-
8
6
  for (let i = types.length; i--;) {
9
7
  /*eslint-disable */
10
8
  exports['is' + types[i]] = function (self) {
@@ -15,5 +13,4 @@ for (let i = types.length; i--;) {
15
13
  }
16
14
  /*eslint-enable */
17
15
 
18
-
19
16
  export default exports;