@zohodesk/components 1.6.0 → 1.6.2

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 (560) hide show
  1. package/README.md +18 -1
  2. package/_react-cli.config.js +24 -0
  3. package/assets/Appearance/dark/mode/Component_DarkMode.module.css +330 -321
  4. package/assets/Appearance/dark/mode/Component_v1_DarkMode.module.css +15 -9
  5. package/assets/Appearance/dark/themes/blue/blue_CTA_DarkModifyCategory.module.css +466 -466
  6. package/assets/Appearance/dark/themes/blue/blue_CTA_DarkTheme.module.css +34 -34
  7. package/assets/Appearance/dark/themes/blue/blue_ComponentTheme_DarkTheme.module.css +33 -29
  8. package/assets/Appearance/dark/themes/green/green_CTA_DarkModifyCategory.module.css +466 -466
  9. package/assets/Appearance/dark/themes/green/green_CTA_DarkTheme.module.css +34 -34
  10. package/assets/Appearance/dark/themes/green/green_ComponentTheme_DarkTheme.module.css +33 -29
  11. package/assets/Appearance/dark/themes/orange/orange_CTA_DarkModifyCategory.module.css +466 -466
  12. package/assets/Appearance/dark/themes/orange/orange_CTA_DarkTheme.module.css +34 -34
  13. package/assets/Appearance/dark/themes/orange/orange_ComponentTheme_DarkTheme.module.css +33 -29
  14. package/assets/Appearance/dark/themes/red/red_CTA_DarkModifyCategory.module.css +466 -466
  15. package/assets/Appearance/dark/themes/red/red_CTA_DarkTheme.module.css +34 -34
  16. package/assets/Appearance/dark/themes/red/red_ComponentTheme_DarkTheme.module.css +33 -29
  17. package/assets/Appearance/dark/themes/yellow/yellow_CTA_DarkModifyCategory.module.css +466 -466
  18. package/assets/Appearance/dark/themes/yellow/yellow_CTA_DarkTheme.module.css +34 -34
  19. package/assets/Appearance/dark/themes/yellow/yellow_ComponentTheme_DarkTheme.module.css +33 -29
  20. package/assets/Appearance/light/mode/Component_LightMode.module.css +330 -321
  21. package/assets/Appearance/light/mode/Component_v1_LightMode.module.css +15 -9
  22. package/assets/Appearance/light/themes/blue/blue_CTA_LightModifyCategory.module.css +466 -466
  23. package/assets/Appearance/light/themes/blue/blue_CTA_LightTheme.module.css +34 -34
  24. package/assets/Appearance/light/themes/blue/blue_ComponentTheme_LightTheme.module.css +33 -29
  25. package/assets/Appearance/light/themes/green/green_CTA_LightModifyCategory.module.css +466 -466
  26. package/assets/Appearance/light/themes/green/green_CTA_LightTheme.module.css +34 -34
  27. package/assets/Appearance/light/themes/green/green_ComponentTheme_LightTheme.module.css +33 -29
  28. package/assets/Appearance/light/themes/orange/orange_CTA_LightModifyCategory.module.css +466 -466
  29. package/assets/Appearance/light/themes/orange/orange_CTA_LightTheme.module.css +34 -34
  30. package/assets/Appearance/light/themes/orange/orange_ComponentTheme_LightTheme.module.css +33 -29
  31. package/assets/Appearance/light/themes/red/red_CTA_LightModifyCategory.module.css +466 -466
  32. package/assets/Appearance/light/themes/red/red_CTA_LightTheme.module.css +34 -34
  33. package/assets/Appearance/light/themes/red/red_ComponentTheme_LightTheme.module.css +33 -29
  34. package/assets/Appearance/light/themes/yellow/yellow_CTA_LightModifyCategory.module.css +466 -466
  35. package/assets/Appearance/light/themes/yellow/yellow_CTA_LightTheme.module.css +34 -34
  36. package/assets/Appearance/light/themes/yellow/yellow_ComponentTheme_LightTheme.module.css +33 -29
  37. package/assets/Appearance/pureDark/mode/Component_PureDarkMode.module.css +330 -321
  38. package/assets/Appearance/pureDark/mode/Component_v1_PureDarkMode.module.css +15 -9
  39. package/assets/Appearance/pureDark/themes/blue/blue_CTA_PureDarkModifyCategory.module.css +466 -466
  40. package/assets/Appearance/pureDark/themes/blue/blue_CTA_PureDarkTheme.module.css +34 -34
  41. package/assets/Appearance/pureDark/themes/blue/blue_ComponentTheme_PureDarkTheme.module.css +33 -29
  42. package/assets/Appearance/pureDark/themes/green/green_CTA_PureDarkModifyCategory.module.css +466 -466
  43. package/assets/Appearance/pureDark/themes/green/green_CTA_PureDarkTheme.module.css +34 -34
  44. package/assets/Appearance/pureDark/themes/green/green_ComponentTheme_PureDarkTheme.module.css +33 -29
  45. package/assets/Appearance/pureDark/themes/orange/orange_CTA_PureDarkModifyCategory.module.css +466 -466
  46. package/assets/Appearance/pureDark/themes/orange/orange_CTA_PureDarkTheme.module.css +34 -34
  47. package/assets/Appearance/pureDark/themes/orange/orange_ComponentTheme_PureDarkTheme.module.css +33 -29
  48. package/assets/Appearance/pureDark/themes/red/red_CTA_PureDarkModifyCategory.module.css +466 -466
  49. package/assets/Appearance/pureDark/themes/red/red_CTA_PureDarkTheme.module.css +34 -34
  50. package/assets/Appearance/pureDark/themes/red/red_ComponentTheme_PureDarkTheme.module.css +33 -29
  51. package/assets/Appearance/pureDark/themes/yellow/yellow_CTA_PureDarkModifyCategory.module.css +466 -466
  52. package/assets/Appearance/pureDark/themes/yellow/yellow_CTA_PureDarkTheme.module.css +34 -34
  53. package/assets/Appearance/pureDark/themes/yellow/yellow_ComponentTheme_PureDarkTheme.module.css +33 -29
  54. package/assets/Contrast/darkContrastLightness.module.css +36 -36
  55. package/assets/Contrast/lightContrastLightness.module.css +36 -36
  56. package/assets/Contrast/pureDarkContrastLightness.module.css +36 -36
  57. package/cbt.config.js +41 -0
  58. package/es/AppContainer/AppContainer.js +9 -10
  59. package/es/Avatar/Avatar.js +5 -4
  60. package/es/Avatar/Avatar.module.css +8 -8
  61. package/es/AvatarTeam/AvatarTeam.js +7 -7
  62. package/es/AvatarTeam/AvatarTeam.module.css +30 -30
  63. package/es/Button/Button.js +6 -5
  64. package/es/Button/css/Button.module.css +19 -19
  65. package/es/Buttongroup/Buttongroup.js +0 -0
  66. package/es/Buttongroup/Buttongroup.module.css +5 -3
  67. package/es/Card/Card.js +0 -0
  68. package/es/CheckBox/CheckBox.js +11 -11
  69. package/es/ColorSelect/ColorMultiSelect.js +4 -2
  70. package/es/ColorSelect/ColorSingleSelect.js +4 -2
  71. package/es/ColorSelect/_shared/ColorIndicator/ColorIndicator.js +4 -3
  72. package/es/ColorSelect/_shared/ColorIndicator/ColorIndicator.module.css +2 -2
  73. package/es/ColorSelect/_shared/ColoredTag/ColoredTag.js +4 -2
  74. package/es/ColorSelect/_shared/helpers/renderHelpers.js +6 -4
  75. package/es/DateTime/CalendarView.js +0 -0
  76. package/es/DateTime/DateTime.js +5 -4
  77. package/es/DateTime/DateWidget.js +5 -4
  78. package/es/DateTime/Time.js +11 -12
  79. package/es/DateTime/YearView.js +0 -0
  80. package/es/DateTime/common.js +0 -0
  81. package/es/DateTime/index.js +0 -0
  82. package/es/DateTime/objectUtils.js +0 -0
  83. package/es/DateTime/typeChecker.js +0 -0
  84. package/es/DateTime/validator.js +0 -0
  85. package/es/DropBox/DropBox.js +11 -10
  86. package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +6 -3
  87. package/es/DropDown/DropDown.js +1 -2
  88. package/es/DropDown/DropDownHeading.js +0 -0
  89. package/es/DropDown/DropDownHeading.module.css +4 -4
  90. package/es/DropDown/DropDownItem.js +0 -0
  91. package/es/DropDown/DropDownItem.module.css +4 -4
  92. package/es/DropDown/DropDownSearch.js +0 -0
  93. package/es/DropDown/DropDownSearch.module.css +3 -3
  94. package/es/DropDown/DropDownSeparator.js +0 -0
  95. package/es/Label/Label.js +7 -7
  96. package/es/Label/Label.module.css +5 -5
  97. package/es/Layout/Box.js +0 -0
  98. package/es/Layout/Container.js +0 -0
  99. package/es/Layout/utils.js +0 -0
  100. package/es/ListItem/ListContainer.js +5 -6
  101. package/es/ListItem/ListItem.js +5 -4
  102. package/es/ListItem/ListItem.module.css +30 -19
  103. package/es/ListItem/ListItemWithAvatar.js +10 -11
  104. package/es/ListItem/ListItemWithCheckBox.js +5 -4
  105. package/es/ListItem/ListItemWithIcon.js +5 -4
  106. package/es/ListItem/ListItemWithRadio.js +5 -4
  107. package/es/Modal/Modal.js +5 -4
  108. package/es/MultiSelect/AdvancedGroupMultiSelect.js +2 -0
  109. package/es/MultiSelect/AdvancedMultiSelect.js +11 -8
  110. package/es/MultiSelect/EmptyState.js +16 -2
  111. package/es/MultiSelect/MultiSelect.js +10 -8
  112. package/es/MultiSelect/MultiSelectWithAvatar.js +7 -4
  113. package/es/MultiSelect/SelectedOptions.js +8 -6
  114. package/es/MultiSelect/Suggestions.js +8 -6
  115. package/es/MultiSelect/props/propTypes.js +3 -0
  116. package/es/Popup/Popup.js +0 -0
  117. package/es/Provider/LibraryContext.js +11 -3
  118. package/es/Radio/Radio.js +11 -11
  119. package/es/Radio/Radio.module.css +9 -8
  120. package/es/Responsive/CustomResponsive.js +0 -0
  121. package/es/ResponsiveDropBox/ResponsiveDropBox.js +4 -2
  122. package/es/Ribbon/Ribbon.js +0 -0
  123. package/es/Ribbon/Ribbon.module.css +25 -20
  124. package/es/Select/GroupSelect.js +13 -12
  125. package/es/Select/Select.js +14 -12
  126. package/es/Select/SelectWithAvatar.js +13 -12
  127. package/es/Select/SelectWithIcon.js +10 -8
  128. package/es/Select/props/propTypes.js +3 -0
  129. package/es/Stencils/Stencils.js +0 -0
  130. package/es/Stencils/Stencils.module.css +11 -11
  131. package/es/Switch/Switch.js +8 -8
  132. package/es/Tab/Tab.js +5 -4
  133. package/es/Tab/TabContentWrapper.js +5 -4
  134. package/es/Tab/TabWrapper.js +4 -2
  135. package/es/Tab/Tabs.js +19 -20
  136. package/es/Tag/Tag.js +11 -12
  137. package/es/Tag/Tag.module.css +18 -17
  138. package/es/TextBox/TextBox.js +5 -5
  139. package/es/TextBox/TextBox.module.css +9 -9
  140. package/es/TextBoxIcon/TextBoxIcon.js +4 -2
  141. package/es/TextBoxIcon/TextBoxIcon.module.css +1 -1
  142. package/es/Textarea/Textarea.js +7 -6
  143. package/es/Textarea/Textarea.module.css +18 -18
  144. package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +5 -4
  145. package/es/common/avatarsizes.module.css +16 -16
  146. package/es/common/common.module.css +2 -2
  147. package/es/deprecated/PortalLayer/PortalLayer.js +6 -8
  148. package/es/deprecated/Switch/Switch.js +8 -8
  149. package/es/shared/ArrowIcon/ArrowIcon.js +6 -6
  150. package/es/shared/InputFieldLine/InputFieldLine.js +6 -6
  151. package/es/shared/InputFieldLine/InputFieldLine.module.css +2 -2
  152. package/es/utils/Common.js +0 -0
  153. package/es/utils/dropDownUtils.js +0 -0
  154. package/es/v1/Label/Label.js +98 -33
  155. package/es/v1/Label/__tests__/Label.spec.js +214 -0
  156. package/es/v1/Label/__tests__/__snapshots__/Label.spec.js.snap +457 -0
  157. package/es/v1/Label/constants/index.js +8 -0
  158. package/es/v1/Label/css/Label_v1.module.css +42 -0
  159. package/es/v1/Label/css/cssJSLogic.js +44 -0
  160. package/es/v1/Label/props/defaultProps.js +14 -9
  161. package/es/v1/Label/props/propTypes.js +34 -14
  162. package/es/v1/Switch/Switch.js +7 -6
  163. package/es/v1/Switch/css/Switch_v1.module.css +28 -28
  164. package/lib/Avatar/Avatar.module.css +8 -8
  165. package/lib/AvatarTeam/AvatarTeam.js +0 -0
  166. package/lib/AvatarTeam/AvatarTeam.module.css +30 -30
  167. package/lib/Button/Button.js +0 -0
  168. package/lib/Button/css/Button.module.css +19 -19
  169. package/lib/Buttongroup/Buttongroup.js +0 -0
  170. package/lib/Buttongroup/Buttongroup.module.css +5 -3
  171. package/lib/Card/Card.js +0 -0
  172. package/lib/CheckBox/CheckBox.js +0 -0
  173. package/lib/ColorSelect/_shared/ColorIndicator/ColorIndicator.module.css +2 -2
  174. package/lib/DateTime/CalendarView.js +0 -0
  175. package/lib/DateTime/DateTime.js +0 -0
  176. package/lib/DateTime/DateWidget.js +0 -0
  177. package/lib/DateTime/YearView.js +0 -0
  178. package/lib/DateTime/common.js +0 -0
  179. package/lib/DateTime/index.js +0 -0
  180. package/lib/DateTime/objectUtils.js +0 -0
  181. package/lib/DateTime/typeChecker.js +0 -0
  182. package/lib/DateTime/validator.js +0 -0
  183. package/lib/DropBox/DropBox.js +0 -0
  184. package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +6 -3
  185. package/lib/DropDown/DropDown.js +0 -0
  186. package/lib/DropDown/DropDownHeading.js +0 -0
  187. package/lib/DropDown/DropDownHeading.module.css +4 -4
  188. package/lib/DropDown/DropDownItem.js +0 -0
  189. package/lib/DropDown/DropDownItem.module.css +4 -4
  190. package/lib/DropDown/DropDownSearch.js +0 -0
  191. package/lib/DropDown/DropDownSearch.module.css +3 -3
  192. package/lib/DropDown/DropDownSeparator.js +0 -0
  193. package/lib/Label/Label.js +0 -0
  194. package/lib/Label/Label.module.css +5 -5
  195. package/lib/Layout/Box.js +0 -0
  196. package/lib/Layout/Container.js +0 -0
  197. package/lib/Layout/utils.js +0 -0
  198. package/lib/ListItem/ListItem.js +0 -0
  199. package/lib/ListItem/ListItem.module.css +30 -19
  200. package/lib/MultiSelect/AdvancedGroupMultiSelect.js +2 -0
  201. package/lib/MultiSelect/AdvancedMultiSelect.js +2 -0
  202. package/lib/MultiSelect/EmptyState.js +17 -2
  203. package/lib/MultiSelect/MultiSelect.js +2 -0
  204. package/lib/MultiSelect/MultiSelectWithAvatar.js +2 -0
  205. package/lib/MultiSelect/props/propTypes.js +3 -0
  206. package/lib/Popup/Popup.js +0 -0
  207. package/lib/Provider/LibraryContext.js +11 -3
  208. package/lib/Radio/Radio.js +0 -0
  209. package/lib/Radio/Radio.module.css +9 -8
  210. package/lib/Responsive/CustomResponsive.js +0 -0
  211. package/lib/Ribbon/Ribbon.js +0 -0
  212. package/lib/Ribbon/Ribbon.module.css +25 -20
  213. package/lib/Select/GroupSelect.js +2 -0
  214. package/lib/Select/Select.js +2 -0
  215. package/lib/Select/SelectWithAvatar.js +2 -0
  216. package/lib/Select/SelectWithIcon.js +2 -0
  217. package/lib/Select/props/propTypes.js +3 -0
  218. package/lib/Stencils/Stencils.js +0 -0
  219. package/lib/Stencils/Stencils.module.css +11 -11
  220. package/lib/Switch/Switch.js +0 -0
  221. package/lib/Tag/Tag.js +0 -0
  222. package/lib/Tag/Tag.module.css +18 -17
  223. package/lib/TextBox/TextBox.js +0 -0
  224. package/lib/TextBox/TextBox.module.css +9 -9
  225. package/lib/TextBoxIcon/TextBoxIcon.js +0 -0
  226. package/lib/TextBoxIcon/TextBoxIcon.module.css +1 -1
  227. package/lib/Textarea/Textarea.js +0 -0
  228. package/lib/Textarea/Textarea.module.css +18 -18
  229. package/lib/common/avatarsizes.module.css +16 -16
  230. package/lib/common/common.module.css +2 -2
  231. package/lib/deprecated/Switch/Switch.js +0 -0
  232. package/lib/shared/InputFieldLine/InputFieldLine.module.css +2 -2
  233. package/lib/utils/Common.js +0 -0
  234. package/lib/utils/dropDownUtils.js +0 -0
  235. package/lib/v1/Label/Label.js +104 -36
  236. package/lib/v1/Label/__tests__/Label.spec.js +221 -0
  237. package/lib/v1/Label/__tests__/__snapshots__/Label.spec.js.snap +457 -0
  238. package/lib/v1/Label/constants/index.js +16 -0
  239. package/lib/v1/Label/css/Label_v1.module.css +42 -0
  240. package/lib/v1/Label/css/cssJSLogic.js +38 -0
  241. package/lib/v1/Label/props/defaultProps.js +16 -11
  242. package/lib/v1/Label/props/propTypes.js +36 -16
  243. package/lib/v1/Switch/css/Switch_v1.module.css +28 -28
  244. package/package.json +15 -20
  245. package/es/v1/Accordion/Accordion.js +0 -66
  246. package/es/v1/Accordion/AccordionItem.js +0 -57
  247. package/es/v1/Accordion/index.js +0 -2
  248. package/es/v1/Accordion/props/defaultProps.js +0 -12
  249. package/es/v1/Accordion/props/propTypes.js +0 -33
  250. package/es/v1/Animation/Animation.js +0 -45
  251. package/es/v1/Animation/props/defaultProps.js +0 -7
  252. package/es/v1/Animation/props/propTypes.js +0 -12
  253. package/es/v1/Animation/utils.js +0 -83
  254. package/es/v1/AppContainer/AppContainer.js +0 -115
  255. package/es/v1/AppContainer/props/defaultProps.js +0 -10
  256. package/es/v1/AppContainer/props/propTypes.js +0 -17
  257. package/es/v1/Avatar/Avatar.js +0 -139
  258. package/es/v1/Avatar/props/defaultProps.js +0 -17
  259. package/es/v1/Avatar/props/propTypes.js +0 -26
  260. package/es/v1/AvatarTeam/AvatarTeam.js +0 -70
  261. package/es/v1/AvatarTeam/props/defaultProps.js +0 -17
  262. package/es/v1/AvatarTeam/props/propTypes.js +0 -27
  263. package/es/v1/Button/Button.js +0 -67
  264. package/es/v1/Button/props/defaultProps.js +0 -18
  265. package/es/v1/Button/props/propTypes.js +0 -28
  266. package/es/v1/Buttongroup/Buttongroup.js +0 -31
  267. package/es/v1/Buttongroup/props/defaultProps.js +0 -6
  268. package/es/v1/Buttongroup/props/propTypes.js +0 -9
  269. package/es/v1/Card/Card.js +0 -237
  270. package/es/v1/Card/index.js +0 -4
  271. package/es/v1/Card/props/defaultProps.js +0 -25
  272. package/es/v1/Card/props/propTypes.js +0 -48
  273. package/es/v1/CheckBox/CheckBox.js +0 -161
  274. package/es/v1/CheckBox/props/defaultProps.js +0 -18
  275. package/es/v1/CheckBox/props/propTypes.js +0 -41
  276. package/es/v1/DateTime/CalendarView.js +0 -254
  277. package/es/v1/DateTime/DateTime.js +0 -779
  278. package/es/v1/DateTime/DateTimePopupFooter.js +0 -47
  279. package/es/v1/DateTime/DateTimePopupHeader.js +0 -105
  280. package/es/v1/DateTime/DateWidget.js +0 -1134
  281. package/es/v1/DateTime/DaysRow.js +0 -32
  282. package/es/v1/DateTime/Time.js +0 -181
  283. package/es/v1/DateTime/YearView.js +0 -264
  284. package/es/v1/DateTime/index.js +0 -1
  285. package/es/v1/DateTime/props/defaultProps.js +0 -63
  286. package/es/v1/DateTime/props/propTypes.js +0 -206
  287. package/es/v1/DropBox/DropBox.js +0 -79
  288. package/es/v1/DropBox/DropBoxElement/DropBoxElement.js +0 -133
  289. package/es/v1/DropBox/DropBoxElement/props/defaultProps.js +0 -18
  290. package/es/v1/DropBox/DropBoxElement/props/propTypes.js +0 -51
  291. package/es/v1/DropBox/props/defaultProps.js +0 -14
  292. package/es/v1/DropBox/props/propTypes.js +0 -16
  293. package/es/v1/DropBox/utils/isMobilePopover.js +0 -17
  294. package/es/v1/DropDown/DropDown.js +0 -53
  295. package/es/v1/DropDown/DropDownHeading.js +0 -36
  296. package/es/v1/DropDown/DropDownItem.js +0 -56
  297. package/es/v1/DropDown/DropDownSearch.js +0 -58
  298. package/es/v1/DropDown/DropDownSeparator.js +0 -12
  299. package/es/v1/DropDown/props/defaultProps.js +0 -21
  300. package/es/v1/DropDown/props/propTypes.js +0 -66
  301. package/es/v1/Heading/Heading.js +0 -35
  302. package/es/v1/Heading/props/defaultProps.js +0 -5
  303. package/es/v1/Heading/props/propTypes.js +0 -12
  304. package/es/v1/Layout/Box.js +0 -115
  305. package/es/v1/Layout/Container.js +0 -132
  306. package/es/v1/Layout/index.js +0 -2
  307. package/es/v1/Layout/props/defaultProps.js +0 -16
  308. package/es/v1/Layout/props/propTypes.js +0 -46
  309. package/es/v1/ListItem/ListContainer.js +0 -104
  310. package/es/v1/ListItem/ListItem.js +0 -123
  311. package/es/v1/ListItem/ListItemWithAvatar.js +0 -143
  312. package/es/v1/ListItem/ListItemWithCheckBox.js +0 -104
  313. package/es/v1/ListItem/ListItemWithIcon.js +0 -126
  314. package/es/v1/ListItem/ListItemWithRadio.js +0 -105
  315. package/es/v1/ListItem/index.js +0 -6
  316. package/es/v1/ListItem/props/defaultProps.js +0 -97
  317. package/es/v1/ListItem/props/propTypes.js +0 -202
  318. package/es/v1/Modal/Modal.js +0 -125
  319. package/es/v1/Modal/props/defaultProps.js +0 -3
  320. package/es/v1/Modal/props/propTypes.js +0 -7
  321. package/es/v1/MultiSelect/AdvancedGroupMultiSelect.js +0 -1092
  322. package/es/v1/MultiSelect/AdvancedMultiSelect.js +0 -583
  323. package/es/v1/MultiSelect/EmptyState.js +0 -64
  324. package/es/v1/MultiSelect/MobileHeader/MobileHeader.js +0 -50
  325. package/es/v1/MultiSelect/MobileHeader/props/defaultProps.js +0 -7
  326. package/es/v1/MultiSelect/MobileHeader/props/propTypes.js +0 -7
  327. package/es/v1/MultiSelect/MultiSelect.js +0 -1119
  328. package/es/v1/MultiSelect/MultiSelectHeader.js +0 -32
  329. package/es/v1/MultiSelect/MultiSelectWithAvatar.js +0 -208
  330. package/es/v1/MultiSelect/SelectedOptions.js +0 -84
  331. package/es/v1/MultiSelect/Suggestions.js +0 -141
  332. package/es/v1/MultiSelect/index.js +0 -4
  333. package/es/v1/MultiSelect/props/defaultProps.js +0 -165
  334. package/es/v1/MultiSelect/props/propTypes.js +0 -322
  335. package/es/v1/PopOver/PopOver.js +0 -176
  336. package/es/v1/PopOver/props/defaultProps.js +0 -7
  337. package/es/v1/PopOver/props/propTypes.js +0 -53
  338. package/es/v1/Popup/Popup.js +0 -644
  339. package/es/v1/Radio/Radio.js +0 -130
  340. package/es/v1/Radio/props/defaultProps.js +0 -15
  341. package/es/v1/Radio/props/propTypes.js +0 -40
  342. package/es/v1/ResponsiveDropBox/ResponsiveDropBox.js +0 -56
  343. package/es/v1/ResponsiveDropBox/props/defaultProps.js +0 -4
  344. package/es/v1/ResponsiveDropBox/props/propTypes.js +0 -8
  345. package/es/v1/Ribbon/Ribbon.js +0 -33
  346. package/es/v1/Ribbon/props/defaultProps.js +0 -9
  347. package/es/v1/Ribbon/props/propTypes.js +0 -11
  348. package/es/v1/RippleEffect/RippleEffect.js +0 -25
  349. package/es/v1/RippleEffect/props/defaultProps.js +0 -10
  350. package/es/v1/RippleEffect/props/propTypes.js +0 -12
  351. package/es/v1/Select/GroupSelect.js +0 -818
  352. package/es/v1/Select/Select.js +0 -975
  353. package/es/v1/Select/SelectWithAvatar.js +0 -356
  354. package/es/v1/Select/SelectWithIcon.js +0 -545
  355. package/es/v1/Select/index.js +0 -4
  356. package/es/v1/Select/props/defaultProps.js +0 -126
  357. package/es/v1/Select/props/propTypes.js +0 -297
  358. package/es/v1/Stencils/Stencils.js +0 -26
  359. package/es/v1/Stencils/props/defaultProps.js +0 -6
  360. package/es/v1/Stencils/props/propTypes.js +0 -7
  361. package/es/v1/Tab/Tab.js +0 -106
  362. package/es/v1/Tab/TabContent.js +0 -30
  363. package/es/v1/Tab/TabContentWrapper.js +0 -33
  364. package/es/v1/Tab/TabWrapper.js +0 -55
  365. package/es/v1/Tab/Tabs.js +0 -619
  366. package/es/v1/Tab/index.js +0 -5
  367. package/es/v1/Tab/props/defaultProps.js +0 -51
  368. package/es/v1/Tab/props/propTypes.js +0 -117
  369. package/es/v1/Tab/v1Tab.module.css +0 -100
  370. package/es/v1/Tab/v1TabContent.module.css +0 -4
  371. package/es/v1/Tab/v1Tabs.module.css +0 -167
  372. package/es/v1/Tag/Tag.js +0 -140
  373. package/es/v1/Tag/props/defaultProps.js +0 -15
  374. package/es/v1/Tag/props/propTypes.js +0 -36
  375. package/es/v1/TextBox/TextBox.js +0 -160
  376. package/es/v1/TextBox/props/defaultProps.js +0 -20
  377. package/es/v1/TextBox/props/propTypes.js +0 -56
  378. package/es/v1/TextBoxIcon/TextBoxIcon.js +0 -166
  379. package/es/v1/TextBoxIcon/props/defaultProps.js +0 -24
  380. package/es/v1/TextBoxIcon/props/propTypes.js +0 -53
  381. package/es/v1/Textarea/Textarea.js +0 -100
  382. package/es/v1/Textarea/props/defaultProps.js +0 -17
  383. package/es/v1/Textarea/props/propTypes.js +0 -31
  384. package/es/v1/Tooltip/Tooltip.js +0 -530
  385. package/es/v1/Tooltip/props/defaultProps.js +0 -4
  386. package/es/v1/Tooltip/props/propTypes.js +0 -5
  387. package/es/v1/Typography/Typography.js +0 -38
  388. package/es/v1/Typography/css/cssJSLogic.js +0 -56
  389. package/es/v1/Typography/css/v1_Typography.module.css +0 -380
  390. package/es/v1/Typography/props/defaultProps.js +0 -8
  391. package/es/v1/Typography/props/propTypes.js +0 -27
  392. package/es/v1/Typography/utils/index.js +0 -50
  393. package/es/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +0 -69
  394. package/es/v1/VelocityAnimation/VelocityAnimation/props/defaultProps.js +0 -7
  395. package/es/v1/VelocityAnimation/VelocityAnimation/props/propTypes.js +0 -12
  396. package/es/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +0 -99
  397. package/es/v1/VelocityAnimation/VelocityAnimationGroup/props/defaultProps.js +0 -15
  398. package/es/v1/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +0 -19
  399. package/es/v1/semantic/Button/Button.js +0 -53
  400. package/es/v1/semantic/Button/props/defaultProps.js +0 -12
  401. package/es/v1/semantic/Button/props/propTypes.js +0 -22
  402. package/es/v1/semantic/index.js +0 -1
  403. package/lib/v1/Accordion/Accordion.js +0 -98
  404. package/lib/v1/Accordion/AccordionItem.js +0 -68
  405. package/lib/v1/Accordion/index.js +0 -23
  406. package/lib/v1/Accordion/props/defaultProps.js +0 -20
  407. package/lib/v1/Accordion/props/propTypes.js +0 -45
  408. package/lib/v1/Animation/Animation.js +0 -61
  409. package/lib/v1/Animation/props/defaultProps.js +0 -14
  410. package/lib/v1/Animation/props/propTypes.js +0 -23
  411. package/lib/v1/Animation/utils.js +0 -94
  412. package/lib/v1/AppContainer/AppContainer.js +0 -146
  413. package/lib/v1/AppContainer/props/defaultProps.js +0 -17
  414. package/lib/v1/AppContainer/props/propTypes.js +0 -28
  415. package/lib/v1/Avatar/Avatar.js +0 -191
  416. package/lib/v1/Avatar/props/defaultProps.js +0 -24
  417. package/lib/v1/Avatar/props/propTypes.js +0 -37
  418. package/lib/v1/AvatarTeam/AvatarTeam.js +0 -81
  419. package/lib/v1/AvatarTeam/props/defaultProps.js +0 -24
  420. package/lib/v1/AvatarTeam/props/propTypes.js +0 -38
  421. package/lib/v1/Button/Button.js +0 -82
  422. package/lib/v1/Button/props/defaultProps.js +0 -27
  423. package/lib/v1/Button/props/propTypes.js +0 -40
  424. package/lib/v1/Buttongroup/Buttongroup.js +0 -44
  425. package/lib/v1/Buttongroup/props/defaultProps.js +0 -13
  426. package/lib/v1/Buttongroup/props/propTypes.js +0 -20
  427. package/lib/v1/Card/Card.js +0 -269
  428. package/lib/v1/Card/index.js +0 -37
  429. package/lib/v1/Card/props/defaultProps.js +0 -35
  430. package/lib/v1/Card/props/propTypes.js +0 -62
  431. package/lib/v1/CheckBox/CheckBox.js +0 -172
  432. package/lib/v1/CheckBox/props/defaultProps.js +0 -25
  433. package/lib/v1/CheckBox/props/propTypes.js +0 -52
  434. package/lib/v1/DateTime/CalendarView.js +0 -322
  435. package/lib/v1/DateTime/DateTime.js +0 -877
  436. package/lib/v1/DateTime/DateTimePopupFooter.js +0 -96
  437. package/lib/v1/DateTime/DateTimePopupHeader.js +0 -166
  438. package/lib/v1/DateTime/DateWidget.js +0 -1163
  439. package/lib/v1/DateTime/DaysRow.js +0 -81
  440. package/lib/v1/DateTime/Time.js +0 -270
  441. package/lib/v1/DateTime/YearView.js +0 -325
  442. package/lib/v1/DateTime/index.js +0 -15
  443. package/lib/v1/DateTime/props/defaultProps.js +0 -76
  444. package/lib/v1/DateTime/props/propTypes.js +0 -238
  445. package/lib/v1/DropBox/DropBox.js +0 -109
  446. package/lib/v1/DropBox/DropBoxElement/DropBoxElement.js +0 -146
  447. package/lib/v1/DropBox/DropBoxElement/props/defaultProps.js +0 -25
  448. package/lib/v1/DropBox/DropBoxElement/props/propTypes.js +0 -62
  449. package/lib/v1/DropBox/props/defaultProps.js +0 -30
  450. package/lib/v1/DropBox/props/propTypes.js +0 -35
  451. package/lib/v1/DropBox/utils/isMobilePopover.js +0 -25
  452. package/lib/v1/DropDown/DropDown.js +0 -74
  453. package/lib/v1/DropDown/DropDownHeading.js +0 -47
  454. package/lib/v1/DropDown/DropDownItem.js +0 -75
  455. package/lib/v1/DropDown/DropDownSearch.js +0 -77
  456. package/lib/v1/DropDown/DropDownSeparator.js +0 -24
  457. package/lib/v1/DropDown/props/defaultProps.js +0 -31
  458. package/lib/v1/DropDown/props/propTypes.js +0 -87
  459. package/lib/v1/Heading/Heading.js +0 -53
  460. package/lib/v1/Heading/props/defaultProps.js +0 -12
  461. package/lib/v1/Heading/props/propTypes.js +0 -23
  462. package/lib/v1/Layout/Box.js +0 -128
  463. package/lib/v1/Layout/Container.js +0 -145
  464. package/lib/v1/Layout/index.js +0 -23
  465. package/lib/v1/Layout/props/defaultProps.js +0 -24
  466. package/lib/v1/Layout/props/propTypes.js +0 -58
  467. package/lib/v1/ListItem/ListContainer.js +0 -128
  468. package/lib/v1/ListItem/ListItem.js +0 -138
  469. package/lib/v1/ListItem/ListItemWithAvatar.js +0 -167
  470. package/lib/v1/ListItem/ListItemWithCheckBox.js +0 -126
  471. package/lib/v1/ListItem/ListItemWithIcon.js +0 -143
  472. package/lib/v1/ListItem/ListItemWithRadio.js +0 -127
  473. package/lib/v1/ListItem/index.js +0 -55
  474. package/lib/v1/ListItem/props/defaultProps.js +0 -109
  475. package/lib/v1/ListItem/props/propTypes.js +0 -196
  476. package/lib/v1/Modal/Modal.js +0 -166
  477. package/lib/v1/Modal/props/defaultProps.js +0 -10
  478. package/lib/v1/Modal/props/propTypes.js +0 -18
  479. package/lib/v1/MultiSelect/AdvancedGroupMultiSelect.js +0 -1180
  480. package/lib/v1/MultiSelect/AdvancedMultiSelect.js +0 -649
  481. package/lib/v1/MultiSelect/EmptyState.js +0 -112
  482. package/lib/v1/MultiSelect/MobileHeader/MobileHeader.js +0 -62
  483. package/lib/v1/MultiSelect/MobileHeader/props/defaultProps.js +0 -14
  484. package/lib/v1/MultiSelect/MobileHeader/props/propTypes.js +0 -18
  485. package/lib/v1/MultiSelect/MultiSelect.js +0 -1202
  486. package/lib/v1/MultiSelect/MultiSelectHeader.js +0 -78
  487. package/lib/v1/MultiSelect/MultiSelectWithAvatar.js +0 -262
  488. package/lib/v1/MultiSelect/SelectedOptions.js +0 -130
  489. package/lib/v1/MultiSelect/Suggestions.js +0 -196
  490. package/lib/v1/MultiSelect/index.js +0 -39
  491. package/lib/v1/MultiSelect/props/defaultProps.js +0 -181
  492. package/lib/v1/MultiSelect/props/propTypes.js +0 -350
  493. package/lib/v1/PopOver/PopOver.js +0 -197
  494. package/lib/v1/PopOver/props/defaultProps.js +0 -15
  495. package/lib/v1/PopOver/props/propTypes.js +0 -66
  496. package/lib/v1/Popup/Popup.js +0 -715
  497. package/lib/v1/Radio/Radio.js +0 -141
  498. package/lib/v1/Radio/props/defaultProps.js +0 -22
  499. package/lib/v1/Radio/props/propTypes.js +0 -51
  500. package/lib/v1/ResponsiveDropBox/ResponsiveDropBox.js +0 -79
  501. package/lib/v1/ResponsiveDropBox/props/defaultProps.js +0 -11
  502. package/lib/v1/ResponsiveDropBox/props/propTypes.js +0 -27
  503. package/lib/v1/Ribbon/Ribbon.js +0 -44
  504. package/lib/v1/Ribbon/props/defaultProps.js +0 -16
  505. package/lib/v1/Ribbon/props/propTypes.js +0 -22
  506. package/lib/v1/RippleEffect/RippleEffect.js +0 -40
  507. package/lib/v1/RippleEffect/props/defaultProps.js +0 -17
  508. package/lib/v1/RippleEffect/props/propTypes.js +0 -23
  509. package/lib/v1/Select/GroupSelect.js +0 -894
  510. package/lib/v1/Select/Select.js +0 -1025
  511. package/lib/v1/Select/SelectWithAvatar.js +0 -406
  512. package/lib/v1/Select/SelectWithIcon.js +0 -607
  513. package/lib/v1/Select/index.js +0 -39
  514. package/lib/v1/Select/props/defaultProps.js +0 -125
  515. package/lib/v1/Select/props/propTypes.js +0 -319
  516. package/lib/v1/Stencils/Stencils.js +0 -43
  517. package/lib/v1/Stencils/props/defaultProps.js +0 -13
  518. package/lib/v1/Stencils/props/propTypes.js +0 -18
  519. package/lib/v1/Tab/Tab.js +0 -132
  520. package/lib/v1/Tab/TabContent.js +0 -42
  521. package/lib/v1/Tab/TabContentWrapper.js +0 -47
  522. package/lib/v1/Tab/TabWrapper.js +0 -89
  523. package/lib/v1/Tab/Tabs.js +0 -688
  524. package/lib/v1/Tab/index.js +0 -47
  525. package/lib/v1/Tab/props/defaultProps.js +0 -62
  526. package/lib/v1/Tab/props/propTypes.js +0 -132
  527. package/lib/v1/Tab/v1Tab.module.css +0 -100
  528. package/lib/v1/Tab/v1TabContent.module.css +0 -4
  529. package/lib/v1/Tab/v1Tabs.module.css +0 -167
  530. package/lib/v1/Tag/Tag.js +0 -160
  531. package/lib/v1/Tag/props/defaultProps.js +0 -22
  532. package/lib/v1/Tag/props/propTypes.js +0 -47
  533. package/lib/v1/TextBox/TextBox.js +0 -175
  534. package/lib/v1/TextBox/props/defaultProps.js +0 -27
  535. package/lib/v1/TextBox/props/propTypes.js +0 -62
  536. package/lib/v1/TextBoxIcon/TextBoxIcon.js +0 -206
  537. package/lib/v1/TextBoxIcon/props/defaultProps.js +0 -31
  538. package/lib/v1/TextBoxIcon/props/propTypes.js +0 -72
  539. package/lib/v1/Textarea/Textarea.js +0 -118
  540. package/lib/v1/Textarea/props/defaultProps.js +0 -24
  541. package/lib/v1/Textarea/props/propTypes.js +0 -42
  542. package/lib/v1/Tooltip/Tooltip.js +0 -599
  543. package/lib/v1/Tooltip/props/defaultProps.js +0 -11
  544. package/lib/v1/Tooltip/props/propTypes.js +0 -16
  545. package/lib/v1/Typography/Typography.js +0 -56
  546. package/lib/v1/Typography/css/cssJSLogic.js +0 -48
  547. package/lib/v1/Typography/css/v1_Typography.module.css +0 -380
  548. package/lib/v1/Typography/props/defaultProps.js +0 -15
  549. package/lib/v1/Typography/props/propTypes.js +0 -38
  550. package/lib/v1/Typography/utils/index.js +0 -59
  551. package/lib/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +0 -90
  552. package/lib/v1/VelocityAnimation/VelocityAnimation/props/defaultProps.js +0 -14
  553. package/lib/v1/VelocityAnimation/VelocityAnimation/props/propTypes.js +0 -23
  554. package/lib/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +0 -126
  555. package/lib/v1/VelocityAnimation/VelocityAnimationGroup/props/defaultProps.js +0 -22
  556. package/lib/v1/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +0 -30
  557. package/lib/v1/semantic/Button/Button.js +0 -63
  558. package/lib/v1/semantic/Button/props/defaultProps.js +0 -19
  559. package/lib/v1/semantic/Button/props/propTypes.js +0 -33
  560. package/lib/v1/semantic/index.js +0 -15
@@ -1,877 +0,0 @@
1
- "use strict";
2
-
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
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports["default"] = void 0;
9
-
10
- var _react = _interopRequireDefault(require("react"));
11
-
12
- var _propTypes = require("./props/propTypes");
13
-
14
- var _defaultProps = require("./props/defaultProps");
15
-
16
- var _datetimejs = _interopRequireDefault(require("@zohodesk/datetimejs"));
17
-
18
- var _CalendarView = _interopRequireDefault(require("./CalendarView"));
19
-
20
- var _YearView = _interopRequireDefault(require("./YearView"));
21
-
22
- var _DateTimePopupHeader = _interopRequireDefault(require("./DateTimePopupHeader"));
23
-
24
- var _DateTimePopupFooter = _interopRequireDefault(require("./DateTimePopupFooter"));
25
-
26
- var _Time = _interopRequireDefault(require("./Time"));
27
-
28
- var _DateTimeModule = _interopRequireDefault(require("../../DateTime/DateTime.module.css"));
29
-
30
- var _common = require("../../utils/datetime/common");
31
-
32
- var _Common = require("../../utils/Common");
33
-
34
- var _constants = require("../../DateTime/constants");
35
-
36
- var _ResponsiveDropBox = _interopRequireDefault(require("../ResponsiveDropBox/ResponsiveDropBox"));
37
-
38
- var _Layout = require("../Layout");
39
-
40
- var _dateFormatUtils = require("../../DateTime/dateFormatUtils");
41
-
42
- var _dateFormat = require("./../../DateTime/dateFormatUtils/dateFormat");
43
-
44
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
45
-
46
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
47
-
48
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
49
-
50
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
51
-
52
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
53
-
54
- function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
55
-
56
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
57
-
58
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
59
-
60
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
61
-
62
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
63
-
64
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
65
-
66
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
67
-
68
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
69
-
70
- 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); } }
71
-
72
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
73
-
74
- 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); }
75
-
76
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
77
-
78
- 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); }; }
79
-
80
- 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); }
81
-
82
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
83
-
84
- 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; } }
85
-
86
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
87
-
88
- function title(date, year, month) {
89
- var monthNames = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
90
- var HeadingText = "".concat(monthNames[month] || '', " ").concat(year);
91
- return HeadingText;
92
- }
93
-
94
- var DateTime = /*#__PURE__*/function (_React$PureComponent) {
95
- _inherits(DateTime, _React$PureComponent);
96
-
97
- var _super = _createSuper(DateTime);
98
-
99
- function DateTime(props) {
100
- var _this;
101
-
102
- _classCallCheck(this, DateTime);
103
-
104
- _this = _super.call(this, props);
105
- _this.getHours = _this.getHours.bind(_assertThisInitialized(_this));
106
- _this.amPmSelect = _this.amPmSelect.bind(_assertThisInitialized(_this));
107
- _this.hoursSelect = _this.hoursSelect.bind(_assertThisInitialized(_this));
108
- _this.dateSelect = _this.dateSelect.bind(_assertThisInitialized(_this));
109
- _this.handleClear = _this.handleClear.bind(_assertThisInitialized(_this));
110
- _this.handleSelect = _this.handleSelect.bind(_assertThisInitialized(_this));
111
- _this.minutesSelect = _this.minutesSelect.bind(_assertThisInitialized(_this));
112
- _this.modifyCalendar = _this.modifyCalendar.bind(_assertThisInitialized(_this));
113
- _this.handleGetSelectedDate = _this.handleGetSelectedDate.bind(_assertThisInitialized(_this));
114
- _this.handleChange = _this.handleChange.bind(_assertThisInitialized(_this));
115
- _this.handleCalendarNavigation = _this.handleCalendarNavigation.bind(_assertThisInitialized(_this));
116
- _this.handleExposeMethods = _this.handleExposeMethods.bind(_assertThisInitialized(_this));
117
- _this.handleDateReset = _this.handleDateReset.bind(_assertThisInitialized(_this));
118
- _this.handleOpenYearView = _this.handleOpenYearView.bind(_assertThisInitialized(_this));
119
- _this.handleSelectMonth = _this.handleSelectMonth.bind(_assertThisInitialized(_this));
120
- _this.handleSelectYear = _this.handleSelectYear.bind(_assertThisInitialized(_this));
121
- _this.handleSelectMonthViaYearView = _this.handleSelectMonthViaYearView.bind(_assertThisInitialized(_this));
122
- _this.handleGetStateValues = _this.handleGetStateValues.bind(_assertThisInitialized(_this));
123
- _this.handleYearViewToggle = _this.handleYearViewToggle.bind(_assertThisInitialized(_this));
124
- var _props$i18nKeys$ampmT = props.i18nKeys.ampmText,
125
- ampmText = _props$i18nKeys$ampmT === void 0 ? _constants.ampmTextDefault : _props$i18nKeys$ampmT;
126
-
127
- _this.ampmSuggestions = function () {
128
- var ampmSuggestions = [];
129
- ampmText.forEach(function (text, index) {
130
- if (index === 0) {
131
- ampmSuggestions.push({
132
- text: text,
133
- id: 'AM'
134
- });
135
- } else if (index === 1) {
136
- ampmSuggestions.push({
137
- text: text,
138
- id: 'PM'
139
- });
140
- }
141
- });
142
- return ampmSuggestions;
143
- }();
144
-
145
- var initalStateObj = _this.getStateFromProps(props);
146
-
147
- _this.state = Object.assign({}, initalStateObj, {
148
- isYearView: false,
149
- isMonthOpen: false
150
- });
151
- return _this;
152
- }
153
-
154
- _createClass(DateTime, [{
155
- key: "componentDidMount",
156
- value: function componentDidMount() {
157
- this.handleExposeMethods(true);
158
- }
159
- }, {
160
- key: "componentDidUpdate",
161
- value: function componentDidUpdate(prevProps) {
162
- var _this$props = this.props,
163
- value = _this$props.value,
164
- isActive = _this$props.isActive,
165
- is24Hour = _this$props.is24Hour;
166
-
167
- if (prevProps.value !== value || is24Hour !== prevProps.is24Hour) {
168
- this.setState(this.getStateFromProps(this.props));
169
- }
170
-
171
- if (prevProps.isActive !== isActive && !isActive) {
172
- this.setState({
173
- isYearView: false,
174
- isMonthOpen: false
175
- });
176
- }
177
- }
178
- }, {
179
- key: "componentWillUnmount",
180
- value: function componentWillUnmount() {
181
- this.handleExposeMethods(false);
182
- }
183
- }, {
184
- key: "getStateFromProps",
185
- value: function getStateFromProps(props) {
186
- var date, month, year, hours, mins, amPm;
187
- var value = props.value,
188
- timeZone = props.timeZone,
189
- defaultTime = props.defaultTime,
190
- needDefaultTime = props.needDefaultTime,
191
- isDateTimeField = props.isDateTimeField,
192
- is24Hour = props.is24Hour; //defaultTime --> 12:00:PM
193
-
194
- defaultTime = needDefaultTime ? defaultTime ? defaultTime : '12:00:PM' : '';
195
- var defaultHour, defaultMin, defaultAmPm;
196
- var todayObj = new Date();
197
- var todayDate = todayObj.getDate();
198
- var todayMonth = todayObj.getMonth();
199
- var todayYear = todayObj.getFullYear();
200
-
201
- if (!value) {
202
- var _ref = defaultTime ? defaultTime.split(':') : [];
203
-
204
- var _ref2 = _slicedToArray(_ref, 3);
205
-
206
- defaultHour = _ref2[0];
207
- defaultMin = _ref2[1];
208
- defaultAmPm = _ref2[2];
209
- defaultHour = parseInt(defaultHour);
210
- defaultMin = parseInt(defaultMin);
211
- }
212
-
213
- var dateObj = (0, _dateFormat.getDateText)(value, timeZone, isDateTimeField);
214
- date = dateObj.getDate();
215
- month = dateObj.getMonth();
216
- year = dateObj.getFullYear();
217
- hours = defaultHour ? defaultHour : dateObj.getHours();
218
- mins = !(0, _Common.getIsEmptyValue)(defaultMin) ? defaultMin : dateObj.getMinutes();
219
- mins = (0, _dateFormatUtils.addZeroIfNeeded)(mins);
220
- amPm = defaultAmPm ? defaultAmPm : hours < 12 ? 'AM' : 'PM';
221
- hours = this.getHours(hours, is24Hour);
222
- return {
223
- date: date,
224
- month: month,
225
- year: year,
226
- mins: mins,
227
- hours: hours,
228
- amPm: amPm,
229
- todayDate: todayDate,
230
- todayMonth: todayMonth,
231
- todayYear: todayYear
232
- };
233
- }
234
- }, {
235
- key: "getHours",
236
- value: function getHours(hoursParam, is24Hour) {
237
- var hours = hoursParam;
238
-
239
- if (!is24Hour) {
240
- if (hours === 0) {
241
- hours = 12;
242
- } else if (hours > 12) {
243
- hours -= 12;
244
- }
245
- }
246
-
247
- hours = (0, _dateFormatUtils.addZeroIfNeeded)(hours);
248
- return hours;
249
- }
250
- }, {
251
- key: "handleGetSelectedDate",
252
- value: function handleGetSelectedDate() {
253
- var selectedInfo = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
254
- var _this$props2 = this.props,
255
- min = _this$props2.min,
256
- max = _this$props2.max,
257
- timeZone = _this$props2.timeZone,
258
- isDateTimeField = _this$props2.isDateTimeField,
259
- dateFormat = _this$props2.dateFormat,
260
- is24Hour = _this$props2.is24Hour,
261
- customDateFormat = _this$props2.customDateFormat;
262
- var year = selectedInfo.year,
263
- month = selectedInfo.month,
264
- date = selectedInfo.date,
265
- hours = selectedInfo.hours,
266
- mins = selectedInfo.mins,
267
- amPm = selectedInfo.amPm;
268
-
269
- if (!is24Hour) {
270
- if (parseInt(hours) === 12) {
271
- hours = amPm === 'AM' ? 0 : 12;
272
- }
273
-
274
- if (amPm === 'PM') {
275
- if (hours < 12) {
276
- hours = parseInt(hours) + 12;
277
- }
278
- }
279
- }
280
-
281
- var minInMillis = min ? _datetimejs["default"].millis(min) : null,
282
- maxInMillis = max ? _datetimejs["default"].millis(max) : null,
283
- selectedInMillis,
284
- selectedValue = '',
285
- formattedValue;
286
- var currentDate = new Date();
287
- var sec = currentDate.getSeconds();
288
- var milliSec = currentDate.getMilliseconds();
289
-
290
- if (isDateTimeField || customDateFormat) {
291
- var dateArgs = [year, month, date, hours, mins];
292
-
293
- if (customDateFormat) {
294
- dateArgs.push(sec, milliSec);
295
- }
296
-
297
- selectedInMillis = timeZone ? _datetimejs["default"].tz.tzToUtc(Date.UTC.apply(Date, dateArgs), timeZone) : Date.UTC.apply(Date, dateArgs);
298
- selectedValue = _datetimejs["default"].ISO(selectedInMillis);
299
- formattedValue = (0, _common.formatDate)(_construct(Date, dateArgs), customDateFormat == null ? is24Hour ? "".concat(dateFormat, " HH:mm:ss") : "".concat(dateFormat, " hh:mm:ss A") : "".concat(customDateFormat));
300
- } else {
301
- selectedInMillis = Date.UTC(year, month, date);
302
- selectedValue = (0, _common.formatDate)(new Date(year, month, date), 'YYYY-MM-DD');
303
- formattedValue = (0, _common.formatDate)(new Date(year, month, date), dateFormat);
304
- }
305
-
306
- var isError = false;
307
- var errorType = '';
308
-
309
- if (minInMillis && minInMillis > selectedInMillis) {
310
- isError = true;
311
- errorType = 'MIN';
312
- } else if (maxInMillis && maxInMillis < selectedInMillis) {
313
- isError = true;
314
- errorType = 'MAX';
315
- }
316
-
317
- return {
318
- isError: isError,
319
- errorType: errorType,
320
- selectedValue: selectedValue,
321
- formattedValue: formattedValue
322
- };
323
- }
324
- }, {
325
- key: "handleSelect",
326
- value: function handleSelect(e) {
327
- e && e.preventDefault();
328
- var _this$props3 = this.props,
329
- onError = _this$props3.onError,
330
- onSelect = _this$props3.onSelect,
331
- minErrorText = _this$props3.minErrorText,
332
- maxErrorText = _this$props3.maxErrorText;
333
- var _this$state = this.state,
334
- year = _this$state.year,
335
- month = _this$state.month,
336
- date = _this$state.date,
337
- hours = _this$state.hours,
338
- mins = _this$state.mins,
339
- amPm = _this$state.amPm;
340
-
341
- var _this$handleGetSelect = this.handleGetSelectedDate({
342
- year: year,
343
- month: month,
344
- date: date,
345
- hours: hours,
346
- mins: mins,
347
- amPm: amPm
348
- }),
349
- isError = _this$handleGetSelect.isError,
350
- errorType = _this$handleGetSelect.errorType,
351
- selectedValue = _this$handleGetSelect.selectedValue,
352
- formattedValue = _this$handleGetSelect.formattedValue;
353
-
354
- if (isError) {
355
- if (errorType === 'MIN') {
356
- onError && onError(minErrorText, true);
357
- } else if (errorType === 'MAX') {
358
- onError && onError(maxErrorText, true);
359
- }
360
- } else {
361
- onSelect(selectedValue, formattedValue, e);
362
- }
363
- }
364
- }, {
365
- key: "handleChange",
366
- value: function handleChange() {
367
- var selectedInfo = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
368
- var _this$props4 = this.props,
369
- onError = _this$props4.onError,
370
- onChange = _this$props4.onChange,
371
- minErrorText = _this$props4.minErrorText,
372
- maxErrorText = _this$props4.maxErrorText;
373
- var _this$state2 = this.state,
374
- oldYear = _this$state2.year,
375
- oldMonth = _this$state2.month,
376
- oldDate = _this$state2.date,
377
- oldHours = _this$state2.hours,
378
- oldMins = _this$state2.mins,
379
- oldAMPM = _this$state2.amPm;
380
- var year = selectedInfo.year,
381
- month = selectedInfo.month,
382
- date = selectedInfo.date,
383
- hours = selectedInfo.hours,
384
- mins = selectedInfo.mins,
385
- amPm = selectedInfo.amPm;
386
- var newSelectedInfo = {
387
- year: (0, _Common.getIsEmptyValue)(year) ? oldYear : year,
388
- month: (0, _Common.getIsEmptyValue)(month) ? oldMonth : month,
389
- date: (0, _Common.getIsEmptyValue)(date) ? oldDate : date,
390
- hours: (0, _Common.getIsEmptyValue)(hours) ? oldHours : hours,
391
- mins: (0, _Common.getIsEmptyValue)(mins) ? oldMins : mins,
392
- amPm: (0, _Common.getIsEmptyValue)(amPm) ? oldAMPM : amPm
393
- };
394
-
395
- if (onChange) {
396
- var _this$handleGetSelect2 = this.handleGetSelectedDate(newSelectedInfo),
397
- isError = _this$handleGetSelect2.isError,
398
- errorType = _this$handleGetSelect2.errorType,
399
- selectedValue = _this$handleGetSelect2.selectedValue,
400
- formattedValue = _this$handleGetSelect2.formattedValue;
401
-
402
- if (isError) {
403
- if (errorType === 'MIN') {
404
- onError && onError(minErrorText, true);
405
- } else if (errorType === 'MAX') {
406
- onError && onError(maxErrorText, true);
407
- }
408
- } else {
409
- this.setState(newSelectedInfo);
410
- onChange(selectedValue, formattedValue);
411
- }
412
- } else {
413
- this.setState(newSelectedInfo);
414
- }
415
- }
416
- }, {
417
- key: "handleClear",
418
- value: function handleClear(e) {
419
- var _this$props5 = this.props,
420
- onSelect = _this$props5.onSelect,
421
- onClear = _this$props5.onClear;
422
-
423
- if (onClear) {
424
- onClear(e);
425
- } else {
426
- onSelect('', '', e);
427
- }
428
- }
429
- }, {
430
- key: "dateSelect",
431
- value: function dateSelect(date, month, year, e) {
432
- this.handleChange({
433
- date: date,
434
- month: month,
435
- year: year
436
- });
437
- e && e.preventDefault();
438
- var _this$props6 = this.props,
439
- onError = _this$props6.onError,
440
- onDateSelect = _this$props6.onDateSelect,
441
- minErrorText = _this$props6.minErrorText,
442
- maxErrorText = _this$props6.maxErrorText;
443
- var _this$state3 = this.state,
444
- hours = _this$state3.hours,
445
- mins = _this$state3.mins,
446
- amPm = _this$state3.amPm;
447
-
448
- var _this$handleGetSelect3 = this.handleGetSelectedDate({
449
- year: year,
450
- month: month,
451
- date: date,
452
- hours: hours,
453
- mins: mins,
454
- amPm: amPm
455
- }),
456
- isError = _this$handleGetSelect3.isError,
457
- errorType = _this$handleGetSelect3.errorType,
458
- selectedValue = _this$handleGetSelect3.selectedValue,
459
- formattedValue = _this$handleGetSelect3.formattedValue;
460
-
461
- if (isError) {
462
- if (errorType === 'MIN') {
463
- onError && onError(minErrorText, true);
464
- } else if (errorType === 'MAX') {
465
- onError && onError(maxErrorText, true);
466
- }
467
- } else {
468
- onDateSelect && onDateSelect(selectedValue, formattedValue, e);
469
- }
470
- }
471
- }, {
472
- key: "hoursSelect",
473
- value: function hoursSelect(hours) {
474
- this.handleChange({
475
- hours: hours
476
- });
477
- }
478
- }, {
479
- key: "minutesSelect",
480
- value: function minutesSelect(mins) {
481
- this.handleChange({
482
- mins: mins
483
- });
484
- }
485
- }, {
486
- key: "amPmSelect",
487
- value: function amPmSelect(amPm) {
488
- this.handleChange({
489
- amPm: amPm
490
- });
491
- }
492
- /*global closeGroupPopups*/
493
-
494
- }, {
495
- key: "closePopup",
496
- value: function closePopup() {
497
- closeGroupPopups('calender');
498
- }
499
- }, {
500
- key: "handleCalendarNavigation",
501
- value: function handleCalendarNavigation(type, selectedInfo) {
502
- var stateYear = selectedInfo.year,
503
- stateMonth = selectedInfo.month,
504
- stateDate = selectedInfo.date;
505
- var date = stateDate;
506
- var month = stateMonth;
507
- var year = stateYear;
508
-
509
- var getDate = function getDate(month, year) {
510
- var monthEnd = (0, _common.getMonthEnd)(month, year);
511
- return monthEnd >= parseInt(date) ? date : monthEnd;
512
- };
513
-
514
- var modifyCalendarRecursion = function modifyCalendarRecursion(recursionType) {
515
- if (recursionType === 'nextYear') {
516
- //Click next year icon
517
- var newYear = year + 1;
518
- return {
519
- date: getDate(month, newYear),
520
- month: month,
521
- year: newYear
522
- };
523
- } else if (recursionType === 'previousYear') {
524
- //Click previous year icon
525
- var _newYear = year - 1;
526
-
527
- return {
528
- date: getDate(month, _newYear),
529
- month: month,
530
- year: _newYear
531
- };
532
- } else if (recursionType === 'nextMonth') {
533
- //Click next month icon
534
- if (month === 11) {
535
- month = 0;
536
- return modifyCalendarRecursion('nextYear');
537
- }
538
-
539
- var newMonth = month + 1;
540
- return {
541
- date: getDate(newMonth, year),
542
- month: newMonth,
543
- year: year
544
- };
545
- } else if (recursionType === 'previousMonth') {
546
- //Click previous month icon
547
- if (month === 0) {
548
- month = 11;
549
- return modifyCalendarRecursion('previousYear');
550
- }
551
-
552
- var _newMonth = month - 1;
553
-
554
- return {
555
- date: getDate(_newMonth, year),
556
- month: _newMonth,
557
- year: year
558
- };
559
- } else if (recursionType === 'nextDate') {
560
- var monthEnd = (0, _common.getMonthEnd)(month, year);
561
-
562
- if (date === monthEnd) {
563
- date = 1;
564
- return modifyCalendarRecursion('nextMonth');
565
- }
566
-
567
- var newDate = parseInt(date) + 1;
568
- return {
569
- date: newDate,
570
- month: month,
571
- year: year
572
- };
573
- } else if (recursionType === 'previousDate') {
574
- if (date === 1) {
575
- date = month === 0 ? (0, _common.getMonthEnd)(11, year - 1) : (0, _common.getMonthEnd)(month - 1, year);
576
- return modifyCalendarRecursion('previousMonth');
577
- }
578
-
579
- var _newDate = parseInt(date) - 1;
580
-
581
- return {
582
- date: _newDate,
583
- month: month,
584
- year: year
585
- };
586
- }
587
- };
588
-
589
- return modifyCalendarRecursion(type);
590
- }
591
- }, {
592
- key: "modifyCalendar",
593
- value: function modifyCalendar(type) {
594
- var _this$state4 = this.state,
595
- year = _this$state4.year,
596
- month = _this$state4.month,
597
- date = _this$state4.date;
598
- return this.handleChange(this.handleCalendarNavigation(type, {
599
- year: year,
600
- month: month,
601
- date: date
602
- }));
603
- }
604
- }, {
605
- key: "handleDateReset",
606
- value: function handleDateReset() {
607
- this.setState(this.getStateFromProps(this.props));
608
- }
609
- }, {
610
- key: "handleGetStateValues",
611
- value: function handleGetStateValues() {
612
- var isActive = this.props.isActive;
613
- var _this$state5 = this.state,
614
- isYearView = _this$state5.isYearView,
615
- isMonthOpen = _this$state5.isMonthOpen;
616
- return {
617
- isActive: isActive,
618
- isYearView: isYearView,
619
- isMonthOpen: isMonthOpen
620
- };
621
- }
622
- }, {
623
- key: "handleYearViewToggle",
624
- value: function handleYearViewToggle(isYearOpen, isMonthOpen) {
625
- this.setState({
626
- isYearView: isYearOpen,
627
- isMonthOpen: isMonthOpen
628
- });
629
- }
630
- }, {
631
- key: "handleExposeMethods",
632
- value: function handleExposeMethods(isMount) {
633
- var getMethods = this.props.getMethods;
634
- var methods = {};
635
-
636
- if (isMount) {
637
- methods = {
638
- resetLocalDate: this.handleDateReset,
639
- getStateValues: this.handleGetStateValues,
640
- toggleYearView: this.handleYearViewToggle
641
- };
642
- } else {
643
- methods = {
644
- resetLocalDate: null,
645
- getStateValues: null,
646
- toggleYearView: null
647
- };
648
- }
649
-
650
- getMethods && getMethods(methods);
651
- }
652
- }, {
653
- key: "handleOpenYearView",
654
- value: function handleOpenYearView() {
655
- var _this$state6 = this.state,
656
- isYearView = _this$state6.isYearView,
657
- isMonthOpen = _this$state6.isMonthOpen;
658
- this.setState({
659
- isYearView: !isYearView,
660
- isMonthOpen: !isMonthOpen
661
- });
662
- }
663
- }, {
664
- key: "handleSelectYear",
665
- value: function handleSelectYear(year) {
666
- this.setState({
667
- year: year,
668
- isMonthOpen: true
669
- });
670
- }
671
- }, {
672
- key: "handleSelectMonth",
673
- value: function handleSelectMonth(month) {
674
- var _this$state7 = this.state,
675
- date = _this$state7.date,
676
- year = _this$state7.year;
677
- var monthEnd = (0, _common.getMonthEnd)(month, year);
678
- var newDate = date;
679
-
680
- if (date > monthEnd) {
681
- newDate = monthEnd;
682
- }
683
-
684
- this.setState({
685
- month: month,
686
- date: newDate
687
- });
688
- }
689
- }, {
690
- key: "handleSelectMonthViaYearView",
691
- value: function handleSelectMonthViaYearView(month) {
692
- this.handleSelectMonth(month);
693
- this.setState({
694
- isYearView: false,
695
- isMonthOpen: false
696
- });
697
- }
698
- }, {
699
- key: "render",
700
- value: function render() {
701
- var _this$state8 = this.state,
702
- date = _this$state8.date,
703
- month = _this$state8.month,
704
- year = _this$state8.year,
705
- hours = _this$state8.hours,
706
- mins = _this$state8.mins,
707
- amPm = _this$state8.amPm,
708
- isYearView = _this$state8.isYearView,
709
- isMonthOpen = _this$state8.isMonthOpen,
710
- todayDate = _this$state8.todayDate,
711
- todayMonth = _this$state8.todayMonth,
712
- todayYear = _this$state8.todayYear;
713
- var _this$props7 = this.props,
714
- isDateTimeField = _this$props7.isDateTimeField,
715
- isActive = _this$props7.isActive,
716
- position = _this$props7.position,
717
- isReady = _this$props7.isReady,
718
- getRef = _this$props7.getRef,
719
- onClick = _this$props7.onClick,
720
- dataId = _this$props7.dataId,
721
- needResponsive = _this$props7.needResponsive,
722
- isAbsolute = _this$props7.isAbsolute,
723
- isAnimate = _this$props7.isAnimate,
724
- needAction = _this$props7.needAction,
725
- boxSize = _this$props7.boxSize,
726
- className = _this$props7.className,
727
- innerClass = _this$props7.innerClass,
728
- isPadding = _this$props7.isPadding,
729
- i18nKeys = _this$props7.i18nKeys,
730
- is24Hour = _this$props7.is24Hour,
731
- isDefaultPosition = _this$props7.isDefaultPosition,
732
- positionsOffset = _this$props7.positionsOffset,
733
- targetOffset = _this$props7.targetOffset,
734
- isRestrictScroll = _this$props7.isRestrictScroll,
735
- dropBoxPortalId = _this$props7.dropBoxPortalId,
736
- startDate = _this$props7.startDate,
737
- endDate = _this$props7.endDate,
738
- _this$props7$customPr = _this$props7.customProps,
739
- customProps = _this$props7$customPr === void 0 ? {} : _this$props7$customPr,
740
- holidays = _this$props7.holidays,
741
- weekStartDay = _this$props7.weekStartDay;
742
- var _customProps$TimeProp = customProps.TimeProps,
743
- TimeProps = _customProps$TimeProp === void 0 ? {} : _customProps$TimeProp;
744
- var _i18nKeys$timeText = i18nKeys.timeText,
745
- timeText = _i18nKeys$timeText === void 0 ? 'Time' : _i18nKeys$timeText,
746
- _i18nKeys$submitText = i18nKeys.submitText,
747
- submitText = _i18nKeys$submitText === void 0 ? 'Set' : _i18nKeys$submitText,
748
- _i18nKeys$cancelText = i18nKeys.cancelText,
749
- cancelText = _i18nKeys$cancelText === void 0 ? 'Clear' : _i18nKeys$cancelText,
750
- _i18nKeys$hourEmptyTe = i18nKeys.hourEmptyText,
751
- hourEmptyText = _i18nKeys$hourEmptyTe === void 0 ? 'No search results' : _i18nKeys$hourEmptyTe,
752
- _i18nKeys$minuteEmpty = i18nKeys.minuteEmptyText,
753
- minuteEmptyText = _i18nKeys$minuteEmpty === void 0 ? 'No search results' : _i18nKeys$minuteEmpty,
754
- _i18nKeys$nextMonthTi = i18nKeys.nextMonthTitleText,
755
- nextMonthTitleText = _i18nKeys$nextMonthTi === void 0 ? 'Next month' : _i18nKeys$nextMonthTi,
756
- _i18nKeys$prevMonthTi = i18nKeys.prevMonthTitleText,
757
- prevMonthTitleText = _i18nKeys$prevMonthTi === void 0 ? 'Prev month' : _i18nKeys$prevMonthTi,
758
- _i18nKeys$monthNames = i18nKeys.monthNames,
759
- monthNames = _i18nKeys$monthNames === void 0 ? _constants.monthNamesDefault : _i18nKeys$monthNames,
760
- _i18nKeys$monthNamesS = i18nKeys.monthNamesShort,
761
- monthNamesShort = _i18nKeys$monthNamesS === void 0 ? _constants.monthNamesShortDefault : _i18nKeys$monthNamesS,
762
- _i18nKeys$dayNames = i18nKeys.dayNames,
763
- dayNames = _i18nKeys$dayNames === void 0 ? _constants.dayNamesDefault : _i18nKeys$dayNames,
764
- _i18nKeys$dayNamesSho = i18nKeys.dayNamesShort,
765
- dayNamesShort = _i18nKeys$dayNamesSho === void 0 ? _constants.dayNamesShortDefault : _i18nKeys$dayNamesSho;
766
- var showmonthtxt = title(date, year, month, monthNames);
767
- var customDayNames = dayNames,
768
- customDayNamesShort = dayNamesShort,
769
- customizedHolidays = holidays;
770
-
771
- if (weekStartDay !== 0) {
772
- customDayNames = [].concat(_toConsumableArray(dayNames.slice(weekStartDay)), _toConsumableArray(dayNames.slice(0, weekStartDay)));
773
- customDayNamesShort = [].concat(_toConsumableArray(dayNamesShort.slice(weekStartDay)), _toConsumableArray(dayNamesShort.slice(0, weekStartDay)));
774
- customizedHolidays = holidays.map(function (dayIndex) {
775
- return customDayNames.indexOf(dayNames[dayIndex]);
776
- });
777
- }
778
-
779
- var childEle = /*#__PURE__*/_react["default"].createElement("div", {
780
- className: "".concat(_DateTimeModule["default"].container, " ").concat(innerClass),
781
- "data-id": "".concat(dataId, "_Calendar"),
782
- "data-test-id": "".concat(dataId, "_Calendar"),
783
- onClick: this.closePopup
784
- }, /*#__PURE__*/_react["default"].createElement(_DateTimePopupHeader["default"], {
785
- onOpenYearView: this.handleOpenYearView,
786
- showMonthTxt: showmonthtxt,
787
- isYearView: isYearView,
788
- prevMonthTitleText: prevMonthTitleText,
789
- nextMonthTitleText: nextMonthTitleText,
790
- onModifyCalendar: this.modifyCalendar
791
- }), /*#__PURE__*/_react["default"].createElement("div", {
792
- className: _DateTimeModule["default"].subContainer
793
- }, /*#__PURE__*/_react["default"].createElement(_CalendarView["default"], {
794
- needBorder: isDateTimeField || needAction,
795
- dataId: dataId,
796
- date: date,
797
- year: year,
798
- month: month,
799
- onSelect: this.dateSelect,
800
- dayNames: customDayNames,
801
- dayNamesShort: customDayNamesShort,
802
- todayDate: todayDate,
803
- todayMonth: todayMonth,
804
- todayYear: todayYear,
805
- startDate: startDate,
806
- endDate: endDate,
807
- weekStartDay: weekStartDay,
808
- holidays: customizedHolidays
809
- }), isDateTimeField ? /*#__PURE__*/_react["default"].createElement(_Time["default"], {
810
- timeText: timeText,
811
- dataId: dataId,
812
- hourSuggestions: (0, _dateFormatUtils.getHourSuggestions)(is24Hour),
813
- onHourSelect: this.hoursSelect,
814
- hours: hours,
815
- hourEmptyText: hourEmptyText,
816
- needResponsive: needResponsive,
817
- minSuggestions: (0, _dateFormatUtils.getMinuteSuggestions)(),
818
- onMinutesSelect: this.minutesSelect,
819
- mins: mins,
820
- minuteEmptyText: minuteEmptyText,
821
- ampmSuggestions: this.ampmSuggestions,
822
- onAmPmSelect: this.amPmSelect,
823
- amPm: amPm,
824
- is24Hour: is24Hour,
825
- customProps: TimeProps
826
- }) : null, needAction ? /*#__PURE__*/_react["default"].createElement(_DateTimePopupFooter["default"], {
827
- submitText: submitText,
828
- onSubmit: this.handleSelect,
829
- cancelText: cancelText,
830
- onCancel: this.handleClear,
831
- dataId: dataId
832
- }) : null, isYearView ? /*#__PURE__*/_react["default"].createElement("div", {
833
- className: _DateTimeModule["default"].yearContainer
834
- }, /*#__PURE__*/_react["default"].createElement(_YearView["default"], {
835
- onSelectYear: this.handleSelectYear,
836
- onSelectMonth: this.handleSelectMonthViaYearView,
837
- viewedYear: year,
838
- viewedMonth: month,
839
- monthNames: monthNames,
840
- monthNamesShort: monthNamesShort,
841
- isMonthOpen: isMonthOpen
842
- })) : null));
843
-
844
- return isDefaultPosition ? /*#__PURE__*/_react["default"].createElement("div", {
845
- className: "".concat(_DateTimeModule["default"].dropBox, " ").concat(className),
846
- "data-id": "".concat(dataId, "_dateBoxContainer"),
847
- "data-test-id": "".concat(dataId, "_dateBoxContainer")
848
- }, childEle) : isReady ? /*#__PURE__*/_react["default"].createElement(_ResponsiveDropBox["default"], {
849
- size: boxSize,
850
- boxPosition: position,
851
- isActive: isActive,
852
- isArrow: false,
853
- isAnimate: isAnimate,
854
- animationStyle: "bounce",
855
- getRef: getRef,
856
- onClick: onClick,
857
- dataId: "".concat(dataId, "_dateBoxContainer"),
858
- needResponsive: needResponsive,
859
- isAbsolutePositioningNeeded: isAbsolute,
860
- customClass: {
861
- customDropBoxWrap: className
862
- },
863
- isPadding: isPadding,
864
- positionsOffset: positionsOffset,
865
- targetOffset: targetOffset,
866
- isRestrictScroll: isRestrictScroll,
867
- portalId: dropBoxPortalId
868
- }, /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, childEle)) : null;
869
- }
870
- }]);
871
-
872
- return DateTime;
873
- }(_react["default"].PureComponent);
874
-
875
- exports["default"] = DateTime;
876
- DateTime.propTypes = _propTypes.DateTime_propTypes;
877
- DateTime.defaultProps = _defaultProps.DateTime_defaultProps;