@zohodesk/dot 1.2.3 → 1.3.0

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 (257) hide show
  1. package/.cli/PropLessFiles.html +1 -1
  2. package/.cli/PropValidationExcludeFilesArray.js +1 -1
  3. package/.cli/propValidation_report.html +1 -1
  4. package/README.md +13 -0
  5. package/coverage/ExternalLink/ExternalLink.js.html +1 -1
  6. package/coverage/ExternalLink/ExternalLink.module.css.html +1 -1
  7. package/coverage/ExternalLink/index.html +1 -1
  8. package/coverage/ExternalLink/props/defaultProps.js.html +1 -1
  9. package/coverage/ExternalLink/props/index.html +1 -1
  10. package/coverage/ExternalLink/props/propTypes.js.html +1 -1
  11. package/coverage/Image/Image.js.html +1 -1
  12. package/coverage/Image/Image.module.css.html +1 -1
  13. package/coverage/Image/index.html +1 -1
  14. package/coverage/Image/props/defaultProps.js.html +1 -1
  15. package/coverage/Image/props/index.html +1 -1
  16. package/coverage/Image/props/propTypes.js.html +1 -1
  17. package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.js.html +1 -1
  18. package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.module.css.html +1 -1
  19. package/coverage/avatar/AvatarWithTeam/index.html +1 -1
  20. package/coverage/avatar/AvatarWithTeam/props/defaultProps.js.html +1 -1
  21. package/coverage/avatar/AvatarWithTeam/props/index.html +1 -1
  22. package/coverage/avatar/AvatarWithTeam/props/propTypes.js.html +1 -1
  23. package/coverage/index.html +1 -1
  24. package/es/Drawer/Drawer.js +13 -12
  25. package/es/lookup/Lookup/Lookup.js +10 -10
  26. package/es/v1/ActionButton/ActionButton.js +11 -8
  27. package/es/v1/AlphabeticList/AlphabeticList.js +2 -2
  28. package/es/v1/Attachment/Attachment.js +1 -1
  29. package/es/v1/AttachmentViewer/AttachmentViewer.js +4 -4
  30. package/es/v1/ChannelIcon/ChannelIcon.js +1 -1
  31. package/es/v1/Drawer/Drawer.js +16 -16
  32. package/es/v1/FlipCard/FlipCard.js +4 -4
  33. package/es/v1/FormAction/FormAction.js +1 -1
  34. package/es/v1/FreezeLayer/FreezeLayer.js +3 -3
  35. package/es/v1/{version2/GlobalNotification → GlobalNotification}/GlobalNotification.js +7 -7
  36. package/es/v1/IconButton/IconButton.js +3 -3
  37. package/es/v1/ImportantNotes/ImportantNotes.js +1 -1
  38. package/es/v1/Loader/Loader.js +1 -1
  39. package/es/v1/MessageBanner/MessageBanner.js +1 -1
  40. package/es/v1/NewStar/NewStar.js +1 -1
  41. package/es/v1/Separator/Separator.js +1 -1
  42. package/es/v1/TagWithIcon/TagWithIcon.js +1 -1
  43. package/es/v1/ToastMessage/ToastMessage.js +4 -4
  44. package/es/v1/Upload/Upload.js +1 -1
  45. package/es/v1/{version2 → alert}/AlertClose/AlertClose.js +1 -1
  46. package/es/v1/alert/AlertHeader/AlertHeader.js +58 -49
  47. package/es/v1/alert/AlertLookup/AlertLookup.js +101 -41
  48. package/es/v1/avatar/AvatarClose/AvatarClose.js +1 -1
  49. package/es/v1/avatar/AvatarCollision/AvatarCollision.js +1 -1
  50. package/es/v1/avatar/AvatarIcon/AvatarIcon.js +2 -2
  51. package/es/v1/avatar/AvatarStatus/AvatarStatus.js +1 -1
  52. package/es/v1/avatar/AvatarThread/AvatarThread.js +1 -1
  53. package/es/v1/avatar/AvatarUser/AvatarUser.js +1 -1
  54. package/es/v1/avatar/AvatarWithTeam/AvatarWithTeam.js +2 -2
  55. package/es/v1/dropdown/ToggleDropDown/ToggleDropDown.js +18 -15
  56. package/es/v1/errorstate/Inconvenience/Inconvenience.js +53 -80
  57. package/es/v1/{version2/errorstate → errorstate}/OopsSomethingMiss/OopsSomethingMiss.js +6 -6
  58. package/es/v1/{version2/errorstate → errorstate}/UnableToProcessRequest/UnableToProcessRequest.js +6 -6
  59. package/es/v1/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +54 -73
  60. package/es/v1/{version2/errorstate → errorstate}/UrlNotFound/UrlNotFound.js +6 -6
  61. package/es/v1/{version2/errorstate → errorstate}/WillBeRightBack/WillBeRightBack.js +6 -6
  62. package/es/v1/form/fields/CheckBoxField/CheckBoxField.js +102 -118
  63. package/es/v1/form/fields/CurrencyField/CurrencyField.js +128 -154
  64. package/es/v1/form/fields/DateField/DateField.js +131 -162
  65. package/es/v1/form/fields/FieldContainer/FieldContainer.js +52 -57
  66. package/es/v1/form/fields/MultiSelectField/MultiSelectField.js +144 -168
  67. package/es/v1/form/fields/PhoneField/PhoneField.js +128 -156
  68. package/es/v1/form/fields/RadioField/RadioField.js +2 -2
  69. package/es/v1/form/fields/SelectField/SelectField.js +3 -3
  70. package/es/v1/form/fields/TagsMultiSelect/TagsMultiSelect.js +8 -8
  71. package/es/v1/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +8 -5
  72. package/es/v1/form/fields/TextBoxField/TextBoxField.js +3 -3
  73. package/es/v1/form/fields/TextEditor/TextEditor.js +1 -1
  74. package/es/v1/form/fields/TextEditorField/TextEditorField.js +1 -1
  75. package/es/v1/form/fields/TextEditorWrapper/TextEditorWrapper.js +3 -3
  76. package/es/v1/form/fields/TextareaField/TextareaField.js +3 -3
  77. package/es/v1/form/fields/ValidationMessage/ValidationMessage.js +2 -2
  78. package/es/v1/layout/SetupDetailLayout/SetupDetailLayout.js +1 -1
  79. package/es/v1/layout/SubtabLayout/SubtabLayout.js +2 -2
  80. package/es/v1/list/AvatarFlip/AvatarFlip.js +61 -64
  81. package/es/v1/list/BluePrintStatus/BluePrintStatus.js +11 -18
  82. package/es/v1/list/Comment/Comment.js +25 -32
  83. package/es/v1/list/DepartmentDropDown/DepartmentDropDown.js +57 -72
  84. package/es/v1/list/Dot/Dot.js +9 -16
  85. package/es/v1/list/DotNew/DotNew.js +11 -18
  86. package/es/v1/list/GridStencils/GridStencils.js +21 -24
  87. package/es/v1/list/Icons/AddNewIcon.js +19 -22
  88. package/es/v1/list/Icons/CompleteIcon.js +21 -24
  89. package/es/v1/list/Icons/DeleteIcon.js +22 -25
  90. package/es/v1/list/Icons/EditIcon.js +22 -25
  91. package/es/v1/list/Icons/FloatingIcons.js +12 -19
  92. package/es/v1/list/Icons/ReadUnreadIcon.js +24 -27
  93. package/es/v1/list/Icons/SmartIcon.js +20 -23
  94. package/es/v1/list/ListLayout/ListLayout.js +54 -68
  95. package/es/v1/list/ListStencils/ListStencils.js +28 -31
  96. package/es/v1/list/SecondaryText/AccountName.js +1 -1
  97. package/es/v1/list/SecondaryText/ContactName.js +1 -1
  98. package/es/v1/list/SecondryPanel/SecondryPanel.js +1 -2
  99. package/es/v1/list/Thread/Thread.js +1 -1
  100. package/es/v1/list/UserTime/UserTime.js +1 -1
  101. package/es/v1/list/status/StatusDropdown/StatusDropdown.js +266 -357
  102. package/es/v1/list/status/StatusListItem/StatusListItem.js +5 -5
  103. package/es/v1/lookup/Lookup/Lookup.js +14 -13
  104. package/es/v1/lookup/Section/Section.js +1 -1
  105. package/es/v1/lookup/header/ModuleHeader/ModuleHeader.js +1 -1
  106. package/es/v1/lookup/header/Search/Search.js +3 -3
  107. package/es/v1/lookup/header/TicketHeader/TicketHeader.js +1 -1
  108. package/es/v1/lookup/header/ViewDropDown/ViewDropDown.js +10 -9
  109. package/es/v1/{version2/notification → notification}/DesktopNotification/DesktopNotification.js +6 -6
  110. package/es/v1/{version2/notification → notification}/DesktopNotificationHeader/DesktopNotificationHeader.js +6 -6
  111. package/es/v1/setup/header/Button/Button.js +1 -1
  112. package/es/v1/setup/header/Link/Link.js +1 -1
  113. package/es/v1/setup/header/Search/Search.js +1 -1
  114. package/es/v1/setup/table/Table/Table.js +1 -1
  115. package/es/v1/setup/table/TableBody/TableBody.js +1 -1
  116. package/es/v1/setup/table/TableData/TableData.js +1 -1
  117. package/es/v1/setup/table/TableHead/TableHead.js +1 -1
  118. package/es/v1/setup/table/TableRow/TableRow.js +1 -1
  119. package/lib/Drawer/Drawer.js +18 -17
  120. package/lib/lookup/Lookup/Lookup.js +15 -15
  121. package/lib/v1/ActionButton/ActionButton.js +11 -9
  122. package/lib/v1/AlphabeticList/AlphabeticList.js +2 -4
  123. package/lib/v1/Attachment/Attachment.js +1 -1
  124. package/lib/v1/AttachmentViewer/AttachmentViewer.js +4 -4
  125. package/lib/v1/ChannelIcon/ChannelIcon.js +1 -1
  126. package/lib/v1/Drawer/Drawer.js +21 -21
  127. package/lib/v1/FlipCard/FlipCard.js +4 -4
  128. package/lib/v1/FormAction/FormAction.js +1 -1
  129. package/lib/v1/FreezeLayer/FreezeLayer.js +3 -3
  130. package/lib/v1/{version2/GlobalNotification → GlobalNotification}/GlobalNotification.js +7 -7
  131. package/lib/v1/IconButton/IconButton.js +3 -3
  132. package/lib/v1/ImportantNotes/ImportantNotes.js +1 -1
  133. package/lib/v1/Loader/Loader.js +1 -1
  134. package/lib/v1/MessageBanner/MessageBanner.js +1 -1
  135. package/lib/v1/NewStar/NewStar.js +1 -1
  136. package/lib/v1/Separator/Separator.js +1 -1
  137. package/lib/v1/TagWithIcon/TagWithIcon.js +1 -1
  138. package/lib/v1/ToastMessage/ToastMessage.js +4 -4
  139. package/lib/v1/Upload/Upload.js +1 -1
  140. package/lib/v1/{version2 → alert}/AlertClose/AlertClose.js +1 -1
  141. package/lib/v1/alert/AlertHeader/AlertHeader.js +68 -50
  142. package/lib/v1/alert/AlertLookup/AlertLookup.js +109 -42
  143. package/lib/v1/avatar/AvatarClose/AvatarClose.js +1 -1
  144. package/lib/v1/avatar/AvatarCollision/AvatarCollision.js +1 -1
  145. package/lib/v1/avatar/AvatarIcon/AvatarIcon.js +2 -2
  146. package/lib/v1/avatar/AvatarStatus/AvatarStatus.js +1 -1
  147. package/lib/v1/avatar/AvatarThread/AvatarThread.js +1 -1
  148. package/lib/v1/avatar/AvatarUser/AvatarUser.js +1 -1
  149. package/lib/v1/avatar/AvatarWithTeam/AvatarWithTeam.js +2 -2
  150. package/lib/v1/dropdown/ToggleDropDown/ToggleDropDown.js +18 -16
  151. package/lib/v1/errorstate/Inconvenience/Inconvenience.js +53 -115
  152. package/lib/v1/{version2/errorstate → errorstate}/OopsSomethingMiss/OopsSomethingMiss.js +6 -6
  153. package/lib/v1/{version2/errorstate → errorstate}/UnableToProcessRequest/UnableToProcessRequest.js +6 -6
  154. package/lib/v1/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +54 -108
  155. package/lib/v1/{version2/errorstate → errorstate}/UrlNotFound/UrlNotFound.js +6 -6
  156. package/lib/v1/{version2/errorstate → errorstate}/WillBeRightBack/WillBeRightBack.js +6 -6
  157. package/lib/v1/form/fields/CheckBoxField/CheckBoxField.js +107 -159
  158. package/lib/v1/form/fields/CurrencyField/CurrencyField.js +152 -193
  159. package/lib/v1/form/fields/DateField/DateField.js +140 -206
  160. package/lib/v1/form/fields/FieldContainer/FieldContainer.js +60 -91
  161. package/lib/v1/form/fields/MultiSelectField/MultiSelectField.js +168 -228
  162. package/lib/v1/form/fields/PhoneField/PhoneField.js +150 -193
  163. package/lib/v1/form/fields/RadioField/RadioField.js +2 -2
  164. package/lib/v1/form/fields/SelectField/SelectField.js +3 -3
  165. package/lib/v1/form/fields/TagsMultiSelect/TagsMultiSelect.js +8 -8
  166. package/lib/v1/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +11 -8
  167. package/lib/v1/form/fields/TextBoxField/TextBoxField.js +3 -3
  168. package/lib/v1/form/fields/TextEditor/TextEditor.js +1 -1
  169. package/lib/v1/form/fields/TextEditorField/TextEditorField.js +1 -1
  170. package/lib/v1/form/fields/TextEditorWrapper/TextEditorWrapper.js +3 -3
  171. package/lib/v1/form/fields/TextareaField/TextareaField.js +3 -3
  172. package/lib/v1/form/fields/ValidationMessage/ValidationMessage.js +2 -2
  173. package/lib/v1/layout/SetupDetailLayout/SetupDetailLayout.js +1 -1
  174. package/lib/v1/layout/SubtabLayout/SubtabLayout.js +2 -2
  175. package/lib/v1/list/AvatarFlip/AvatarFlip.js +61 -106
  176. package/lib/v1/list/BluePrintStatus/BluePrintStatus.js +11 -51
  177. package/lib/v1/list/Comment/Comment.js +24 -69
  178. package/lib/v1/list/DepartmentDropDown/DepartmentDropDown.js +67 -122
  179. package/lib/v1/list/Dot/Dot.js +9 -54
  180. package/lib/v1/list/DotNew/DotNew.js +11 -56
  181. package/lib/v1/list/GridStencils/GridStencils.js +21 -62
  182. package/lib/v1/list/Icons/AddNewIcon.js +19 -60
  183. package/lib/v1/list/Icons/CompleteIcon.js +21 -62
  184. package/lib/v1/list/Icons/DeleteIcon.js +22 -63
  185. package/lib/v1/list/Icons/EditIcon.js +22 -63
  186. package/lib/v1/list/Icons/FloatingIcons.js +17 -62
  187. package/lib/v1/list/Icons/ReadUnreadIcon.js +24 -65
  188. package/lib/v1/list/Icons/SmartIcon.js +20 -65
  189. package/lib/v1/list/ListLayout/ListLayout.js +53 -116
  190. package/lib/v1/list/ListStencils/ListStencils.js +33 -72
  191. package/lib/v1/list/SecondaryText/AccountName.js +1 -1
  192. package/lib/v1/list/SecondaryText/ContactName.js +1 -1
  193. package/lib/v1/list/SecondryPanel/SecondryPanel.js +3 -5
  194. package/lib/v1/list/Thread/Thread.js +1 -1
  195. package/lib/v1/list/UserTime/UserTime.js +1 -1
  196. package/lib/v1/list/status/StatusDropdown/StatusDropdown.js +367 -472
  197. package/lib/v1/list/status/StatusListItem/StatusListItem.js +5 -5
  198. package/lib/v1/lookup/Lookup/Lookup.js +20 -18
  199. package/lib/v1/lookup/Section/Section.js +1 -1
  200. package/lib/v1/lookup/header/ModuleHeader/ModuleHeader.js +1 -1
  201. package/lib/v1/lookup/header/Search/Search.js +3 -3
  202. package/lib/v1/lookup/header/TicketHeader/TicketHeader.js +1 -1
  203. package/lib/v1/lookup/header/ViewDropDown/ViewDropDown.js +10 -9
  204. package/lib/v1/{version2/notification → notification}/DesktopNotification/DesktopNotification.js +6 -6
  205. package/lib/v1/{version2/notification → notification}/DesktopNotificationHeader/DesktopNotificationHeader.js +6 -6
  206. package/lib/v1/setup/header/Button/Button.js +1 -1
  207. package/lib/v1/setup/header/Link/Link.js +1 -1
  208. package/lib/v1/setup/header/Search/Search.js +1 -1
  209. package/lib/v1/setup/table/Table/Table.js +1 -1
  210. package/lib/v1/setup/table/TableBody/TableBody.js +1 -1
  211. package/lib/v1/setup/table/TableData/TableData.js +1 -1
  212. package/lib/v1/setup/table/TableHead/TableHead.js +1 -1
  213. package/lib/v1/setup/table/TableRow/TableRow.js +1 -1
  214. package/package.json +11 -11
  215. package/result.json +1 -1
  216. package/es/v1/errorstate/LinkText/LinkText.js +0 -29
  217. package/es/v1/errorstate/NoRequestFound/NoRequestFound.js +0 -84
  218. package/es/v1/errorstate/PermissionPlay/PermissionPlay.js +0 -83
  219. package/es/v1/errorstate/RequestUrlNotFound/RequestUrlNotFound.js +0 -84
  220. package/es/v1/errorstate/UnableToProcess/UnableToProcess.js +0 -86
  221. package/es/v1/errorstate/WillBack/WillBack.js +0 -75
  222. package/es/v1/errorstate/index.js +0 -8
  223. package/es/v1/version2/errorstate/Inconvenience/Inconvenience.js +0 -63
  224. package/es/v1/version2/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +0 -65
  225. package/es/v1/version2/index.js +0 -12
  226. package/es/v1/version2/lookup/AlertHeader/AlertHeader.js +0 -79
  227. package/es/v1/version2/lookup/AlertLookup/AlertLookup.js +0 -164
  228. package/lib/v1/errorstate/LinkText/LinkText.js +0 -80
  229. package/lib/v1/errorstate/NoRequestFound/NoRequestFound.js +0 -135
  230. package/lib/v1/errorstate/PermissionPlay/PermissionPlay.js +0 -134
  231. package/lib/v1/errorstate/RequestUrlNotFound/RequestUrlNotFound.js +0 -135
  232. package/lib/v1/errorstate/UnableToProcess/UnableToProcess.js +0 -137
  233. package/lib/v1/errorstate/WillBack/WillBack.js +0 -125
  234. package/lib/v1/errorstate/index.js +0 -71
  235. package/lib/v1/version2/errorstate/Inconvenience/Inconvenience.js +0 -79
  236. package/lib/v1/version2/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +0 -81
  237. package/lib/v1/version2/index.js +0 -58
  238. package/lib/v1/version2/lookup/AlertHeader/AlertHeader.js +0 -104
  239. package/lib/v1/version2/lookup/AlertLookup/AlertLookup.js +0 -185
  240. /package/es/v1/{version2 → alert}/alertIcons/AlarmAlertIcon.js +0 -0
  241. /package/es/v1/{version2 → alert}/alertIcons/AlertIcons.js +0 -0
  242. /package/es/v1/{version2 → alert}/alertIcons/DangerAlertIcon.js +0 -0
  243. /package/es/v1/{version2 → alert}/alertIcons/ErrorAlertIcon.js +0 -0
  244. /package/es/v1/{version2 → alert}/alertIcons/InfoAlertIcon.js +0 -0
  245. /package/es/v1/{version2 → alert}/alertIcons/NotificationAlertIcon.js +0 -0
  246. /package/es/v1/{version2 → alert}/alertIcons/SuccessAlertIcon.js +0 -0
  247. /package/es/v1/{version2 → alert}/alertIcons/WarningAlertIcon.js +0 -0
  248. /package/es/v1/{version2 → alert}/alertIcons/index.js +0 -0
  249. /package/lib/v1/{version2 → alert}/alertIcons/AlarmAlertIcon.js +0 -0
  250. /package/lib/v1/{version2 → alert}/alertIcons/AlertIcons.js +0 -0
  251. /package/lib/v1/{version2 → alert}/alertIcons/DangerAlertIcon.js +0 -0
  252. /package/lib/v1/{version2 → alert}/alertIcons/ErrorAlertIcon.js +0 -0
  253. /package/lib/v1/{version2 → alert}/alertIcons/InfoAlertIcon.js +0 -0
  254. /package/lib/v1/{version2 → alert}/alertIcons/NotificationAlertIcon.js +0 -0
  255. /package/lib/v1/{version2 → alert}/alertIcons/SuccessAlertIcon.js +0 -0
  256. /package/lib/v1/{version2 → alert}/alertIcons/WarningAlertIcon.js +0 -0
  257. /package/lib/v1/{version2 → alert}/alertIcons/index.js +0 -0
@@ -13,13 +13,13 @@ var _defaultProps = require("../../../../form/fields/MultiSelectField/props/defa
13
13
 
14
14
  var _propTypes = require("../../../../form/fields/MultiSelectField/props/propTypes");
15
15
 
16
- var _Label = _interopRequireDefault(require("@zohodesk/components/lib/Label/Label"));
16
+ var _Label = _interopRequireDefault(require("@zohodesk/components/es/v1/Label/Label"));
17
17
 
18
- var _MultiSelect = _interopRequireDefault(require("@zohodesk/components/lib/MultiSelect/MultiSelect"));
18
+ var _MultiSelect = _interopRequireDefault(require("@zohodesk/components/es/v1/MultiSelect/MultiSelect"));
19
19
 
20
20
  var _ValidationMessage = _interopRequireDefault(require("../ValidationMessage/ValidationMessage"));
21
21
 
22
- var _IdProvider = require("@zohodesk/components/lib/Provider/IdProvider");
22
+ var _IdProvider = require("@zohodesk/components/es/v1/Provider/IdProvider");
23
23
 
24
24
  var _FieldContainer = _interopRequireDefault(require("../FieldContainer/FieldContainer"));
25
25
 
@@ -33,236 +33,176 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
33
33
 
34
34
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
35
35
 
36
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
37
-
38
- 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); } }
39
-
40
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
41
-
42
- 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); }
43
-
44
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
45
-
46
- 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); }; }
47
-
48
- 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); }
49
-
50
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
51
-
52
- 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; } }
53
-
54
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
55
-
56
- var MultiSelectField = /*#__PURE__*/function (_PureComponent) {
57
- _inherits(MultiSelectField, _PureComponent);
58
-
59
- var _super = _createSuper(MultiSelectField);
60
-
61
- function MultiSelectField(props) {
62
- var _this;
63
-
64
- _classCallCheck(this, MultiSelectField);
36
+ function MultiSelectField(props) {
37
+ var labelName = props.labelName,
38
+ id = props.id,
39
+ isMandatory = props.isMandatory,
40
+ options = props.options,
41
+ selectedOptions = props.selectedOptions,
42
+ needSelectAll = props.needSelectAll,
43
+ selectAllText = props.selectAllText,
44
+ isAnimate = props.isAnimate,
45
+ emptyMessage = props.emptyMessage,
46
+ size = props.size,
47
+ variant = props.variant,
48
+ textBoxSize = props.textBoxSize,
49
+ animationStyle = props.animationStyle,
50
+ validationMessage = props.validationMessage,
51
+ validationPalette = props.validationPalette,
52
+ isReadOnly = props.isReadOnly,
53
+ errorType = props.errorType,
54
+ isDisabled = props.isDisabled,
55
+ title = props.title,
56
+ dataId = props.dataId,
57
+ dataSelectorId = props.dataSelectorId,
58
+ validationRuleMessage = props.validationRuleMessage,
59
+ validationRulePalette = props.validationRulePalette,
60
+ onKeyDown = props.onKeyDown,
61
+ infoText = props.infoText,
62
+ borderColor = props.borderColor,
63
+ placeHolder = props.placeHolder,
64
+ fieldSize = props.fieldSize,
65
+ valueField = props.valueField,
66
+ textField = props.textField,
67
+ isNextOptions = props.isNextOptions,
68
+ isSearching = props.isSearching,
69
+ popupGroup = props.popupGroup,
70
+ labelPalette = props.labelPalette,
71
+ palette = props.palette,
72
+ lockedInfoText = props.lockedInfoText,
73
+ isLocked = props.isLocked,
74
+ htmlId = props.htmlId,
75
+ children = props.children,
76
+ customChildrenClass = props.customChildrenClass,
77
+ onFocus = props.onFocus,
78
+ customProps = props.customProps,
79
+ i18nKeys = props.i18nKeys,
80
+ renderLabelProps = props.renderLabelProps,
81
+ onChange = props.onChange,
82
+ onDropBoxOpen = props.onDropBoxOpen,
83
+ onSearch = props.onSearch,
84
+ getNextOptions = props.getNextOptions,
85
+ getRef = props.getRef;
86
+ var _customProps$LabelPro = customProps.LabelProps,
87
+ LabelProps = _customProps$LabelPro === void 0 ? {} : _customProps$LabelPro,
88
+ _customProps$MultiSel = customProps.MultiSelectProps,
89
+ MultiSelectProps = _customProps$MultiSel === void 0 ? {} : _customProps$MultiSel,
90
+ _customProps$Validati = customProps.ValidationMessageProps1,
91
+ ValidationMessageProps1 = _customProps$Validati === void 0 ? {} : _customProps$Validati,
92
+ _customProps$Validati2 = customProps.ValidationMessageProps2,
93
+ ValidationMessageProps2 = _customProps$Validati2 === void 0 ? {} : _customProps$Validati2;
94
+ var getNextId = (0, _IdProvider.useUniqueId)();
95
+ var multiSelectBox = (0, _react.useRef)(null);
96
+ var isDarkPalette = palette === 'dark';
97
+ var uniqueId = htmlId ? htmlId : getNextId();
98
+
99
+ function handleChange(selectedValueIds, selectedValues) {
100
+ onChange && onChange(id, selectedValueIds, selectedValues);
101
+ }
65
102
 
66
- _this = _super.call(this, props);
67
- _this.handleChange = _this.handleChange.bind(_assertThisInitialized(_this));
68
- _this.handleGetRef = _this.handleGetRef.bind(_assertThisInitialized(_this));
69
- _this.onDropBoxOpen = _this.onDropBoxOpen.bind(_assertThisInitialized(_this)); // this.handleLabelClick = this.handleLabelClick.bind(this);
103
+ function handleDropBoxOpen() {
104
+ return onDropBoxOpen && onDropBoxOpen(id);
105
+ }
70
106
 
71
- _this.onSearch = _this.onSearch.bind(_assertThisInitialized(_this));
72
- _this.getNextOptions = _this.getNextOptions.bind(_assertThisInitialized(_this));
73
- _this.getNextId = (0, _IdProvider.getUniqueId)(_assertThisInitialized(_this));
74
- return _this;
107
+ function handleSearch(searchStr) {
108
+ return onSearch && onSearch(searchStr, {
109
+ id: id
110
+ });
75
111
  }
76
112
 
77
- _createClass(MultiSelectField, [{
78
- key: "handleChange",
79
- value: function handleChange(selectedValueIds, selectedValues) {
80
- var _this$props = this.props,
81
- id = _this$props.id,
82
- onChange = _this$props.onChange;
83
- onChange && onChange(id, selectedValueIds, selectedValues);
84
- }
85
- }, {
86
- key: "onDropBoxOpen",
87
- value: function onDropBoxOpen() {
88
- var _this$props2 = this.props,
89
- onDropBoxOpen = _this$props2.onDropBoxOpen,
90
- id = _this$props2.id;
91
- return onDropBoxOpen && onDropBoxOpen(id);
92
- }
93
- }, {
94
- key: "onSearch",
95
- value: function onSearch(searchStr) {
96
- var _this$props3 = this.props,
97
- onSearch = _this$props3.onSearch,
98
- id = _this$props3.id;
99
- return onSearch && onSearch(searchStr, {
100
- id: id
101
- });
102
- }
103
- }, {
104
- key: "getNextOptions",
105
- value: function getNextOptions(searchStr) {
106
- var _this$props4 = this.props,
107
- getNextOptions = _this$props4.getNextOptions,
108
- id = _this$props4.id;
109
- return getNextOptions && getNextOptions(searchStr, {
110
- id: id
111
- });
112
- }
113
- }, {
114
- key: "handleGetRef",
115
- value: function handleGetRef(el) {
116
- var _this$props5 = this.props,
117
- getRef = _this$props5.getRef,
118
- id = _this$props5.id;
119
- this.multiSelectBox = el;
120
- getRef && getRef(el, id);
121
- } // handleLabelClick() {
122
- // let { isFocusOnLabelClick } = this.props;
123
- // if (
124
- // isFocusOnLabelClick &&
125
- // this.multiSelectBox &&
126
- // this.multiSelectBox.focus
127
- // ) {
128
- // this.multiSelectBox.focus();
129
- // }
130
- // }
113
+ function handleGetNextOptions(searchStr) {
114
+ return getNextOptions && getNextOptions(searchStr, {
115
+ id: id
116
+ });
117
+ }
131
118
 
132
- }, {
133
- key: "render",
134
- value: function render() {
135
- var _this$props6 = this.props,
136
- labelName = _this$props6.labelName,
137
- id = _this$props6.id,
138
- isMandatory = _this$props6.isMandatory,
139
- options = _this$props6.options,
140
- selectedOptions = _this$props6.selectedOptions,
141
- needSelectAll = _this$props6.needSelectAll,
142
- selectAllText = _this$props6.selectAllText,
143
- isAnimate = _this$props6.isAnimate,
144
- emptyMessage = _this$props6.emptyMessage,
145
- size = _this$props6.size,
146
- variant = _this$props6.variant,
147
- textBoxSize = _this$props6.textBoxSize,
148
- animationStyle = _this$props6.animationStyle,
149
- validationMessage = _this$props6.validationMessage,
150
- validationPalette = _this$props6.validationPalette,
151
- isReadOnly = _this$props6.isReadOnly,
152
- errorType = _this$props6.errorType,
153
- isDisabled = _this$props6.isDisabled,
154
- title = _this$props6.title,
155
- dataId = _this$props6.dataId,
156
- dataSelectorId = _this$props6.dataSelectorId,
157
- validationRuleMessage = _this$props6.validationRuleMessage,
158
- validationRulePalette = _this$props6.validationRulePalette,
159
- onKeyDown = _this$props6.onKeyDown,
160
- infoText = _this$props6.infoText,
161
- borderColor = _this$props6.borderColor,
162
- placeHolder = _this$props6.placeHolder,
163
- fieldSize = _this$props6.fieldSize,
164
- valueField = _this$props6.valueField,
165
- textField = _this$props6.textField,
166
- isNextOptions = _this$props6.isNextOptions,
167
- isSearching = _this$props6.isSearching,
168
- popupGroup = _this$props6.popupGroup,
169
- labelPalette = _this$props6.labelPalette,
170
- palette = _this$props6.palette,
171
- lockedInfoText = _this$props6.lockedInfoText,
172
- isLocked = _this$props6.isLocked,
173
- htmlId = _this$props6.htmlId,
174
- children = _this$props6.children,
175
- customChildrenClass = _this$props6.customChildrenClass,
176
- onFocus = _this$props6.onFocus,
177
- customProps = _this$props6.customProps,
178
- i18nKeys = _this$props6.i18nKeys,
179
- renderLabelProps = _this$props6.renderLabelProps;
180
- var _customProps$LabelPro = customProps.LabelProps,
181
- LabelProps = _customProps$LabelPro === void 0 ? {} : _customProps$LabelPro,
182
- _customProps$MultiSel = customProps.MultiSelectProps,
183
- MultiSelectProps = _customProps$MultiSel === void 0 ? {} : _customProps$MultiSel,
184
- _customProps$Validati = customProps.ValidationMessageProps1,
185
- ValidationMessageProps1 = _customProps$Validati === void 0 ? {} : _customProps$Validati,
186
- _customProps$Validati2 = customProps.ValidationMessageProps2,
187
- ValidationMessageProps2 = _customProps$Validati2 === void 0 ? {} : _customProps$Validati2;
188
- var isDarkPalette = palette === 'dark';
189
- var uniqueId = htmlId ? htmlId : this.getNextId();
190
- return /*#__PURE__*/_react["default"].createElement("div", {
191
- className: "".concat(_FieldsModule["default"].container, " ").concat(isDisabled ? _FieldsModule["default"].disabled : isReadOnly ? _FieldsModule["default"].readonly : ''),
192
- "data-title": isDisabled ? title : null,
193
- "data-selector-id": dataSelectorId
194
- }, labelName && /*#__PURE__*/_react["default"].createElement(_FieldContainer["default"], {
195
- infoText: infoText,
196
- isLocked: isLocked,
197
- lockedInfoText: lockedInfoText,
198
- renderProps: renderLabelProps
199
- }, /*#__PURE__*/_react["default"].createElement(_Label["default"], _extends({
200
- text: labelName,
201
- id: id,
202
- size: fieldSize === 'small' ? 'small' : 'medium',
203
- palette: isDarkPalette ? 'dark' : isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette // onClick={this.handleLabelClick}
204
- ,
205
- customClass: "".concat(_FieldsModule["default"].fieldLabel, " ").concat(isMandatory ? _FieldsModule["default"].labelMandatory : ''),
206
- dataId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label"),
207
- htmlFor: uniqueId
208
- }, LabelProps))), /*#__PURE__*/_react["default"].createElement(_MultiSelect["default"], _extends({
209
- options: options,
210
- onChange: this.handleChange,
211
- selectedOptions: selectedOptions,
212
- getRef: this.handleGetRef,
213
- isReadOnly: isReadOnly,
214
- needSelectAll: needSelectAll,
215
- selectAllText: selectAllText,
216
- isAnimate: isAnimate,
217
- emptyMessage: emptyMessage,
218
- textBoxSize: textBoxSize,
219
- variant: variant,
220
- size: size,
221
- animationStyle: animationStyle,
222
- dataId: dataId,
223
- onKeyDown: onKeyDown,
224
- borderColor: borderColor,
225
- placeHolder: placeHolder,
226
- isDisabled: isDisabled,
227
- textField: textField,
228
- valueField: valueField,
229
- getNextOptions: this.getNextOptions,
230
- onSearch: this.onSearch,
231
- onDropBoxOpen: this.onDropBoxOpen,
232
- popupGroup: popupGroup,
233
- isNextOptions: isNextOptions,
234
- isSearching: isSearching,
235
- palette: palette,
236
- i18nKeys: i18nKeys,
237
- htmlId: uniqueId,
238
- customChildrenClass: customChildrenClass,
239
- onFocus: onFocus
240
- }, MultiSelectProps, {
241
- ariaLabelledby: uniqueId
242
- }), children ? children : null), validationMessage && /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], _extends({
243
- text: validationMessage,
244
- palette: validationPalette,
245
- type: errorType,
246
- dataId: "".concat(dataId, "_ValidationMessage"),
247
- htmlFor: uniqueId
248
- }, ValidationMessageProps1)), validationRuleMessage && /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], _extends({
249
- text: validationRuleMessage,
250
- palette: validationRulePalette,
251
- type: errorType,
252
- dataId: "".concat(dataId, "_ValidationRuleMessage"),
253
- htmlFor: uniqueId
254
- }, ValidationMessageProps2)));
255
- }
256
- }]);
119
+ function handleGetRef(el) {
120
+ multiSelectBox.current = el;
121
+ getRef && getRef(el, id);
122
+ } // handleLabelClick() {
123
+ // let { isFocusOnLabelClick } = this.props;
124
+ // if (
125
+ // isFocusOnLabelClick &&
126
+ // this.multiSelectBox &&
127
+ // this.multiSelectBox.focus
128
+ // ) {
129
+ // this.multiSelectBox.focus();
130
+ // }
131
+ // }
132
+
133
+
134
+ return /*#__PURE__*/_react["default"].createElement("div", {
135
+ className: "".concat(_FieldsModule["default"].container, " ").concat(isDisabled ? _FieldsModule["default"].disabled : isReadOnly ? _FieldsModule["default"].readonly : ''),
136
+ "data-title": isDisabled ? title : null,
137
+ "data-selector-id": dataSelectorId
138
+ }, labelName && /*#__PURE__*/_react["default"].createElement(_FieldContainer["default"], {
139
+ infoText: infoText,
140
+ isLocked: isLocked,
141
+ lockedInfoText: lockedInfoText,
142
+ renderProps: renderLabelProps
143
+ }, /*#__PURE__*/_react["default"].createElement(_Label["default"], _extends({
144
+ text: labelName,
145
+ id: id,
146
+ size: fieldSize === 'small' ? 'small' : 'medium',
147
+ palette: isDarkPalette ? 'dark' : isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette // onClick={this.handleLabelClick}
148
+ ,
149
+ customClass: "".concat(_FieldsModule["default"].fieldLabel, " ").concat(isMandatory ? _FieldsModule["default"].labelMandatory : ''),
150
+ dataId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label"),
151
+ htmlFor: uniqueId
152
+ }, LabelProps))), /*#__PURE__*/_react["default"].createElement(_MultiSelect["default"], _extends({
153
+ options: options,
154
+ onChange: handleChange,
155
+ selectedOptions: selectedOptions,
156
+ getRef: handleGetRef,
157
+ isReadOnly: isReadOnly,
158
+ needSelectAll: needSelectAll,
159
+ selectAllText: selectAllText,
160
+ isAnimate: isAnimate,
161
+ emptyMessage: emptyMessage,
162
+ textBoxSize: textBoxSize,
163
+ variant: variant,
164
+ size: size,
165
+ animationStyle: animationStyle,
166
+ dataId: dataId,
167
+ onKeyDown: onKeyDown,
168
+ borderColor: borderColor,
169
+ placeHolder: placeHolder,
170
+ isDisabled: isDisabled,
171
+ textField: textField,
172
+ valueField: valueField,
173
+ getNextOptions: handleGetNextOptions,
174
+ onSearch: handleSearch,
175
+ onDropBoxOpen: handleDropBoxOpen,
176
+ popupGroup: popupGroup,
177
+ isNextOptions: isNextOptions,
178
+ isSearching: isSearching,
179
+ palette: palette,
180
+ i18nKeys: i18nKeys,
181
+ htmlId: uniqueId,
182
+ customChildrenClass: customChildrenClass,
183
+ onFocus: onFocus
184
+ }, MultiSelectProps, {
185
+ ariaLabelledby: uniqueId
186
+ }), children ? children : null), validationMessage && /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], _extends({
187
+ text: validationMessage,
188
+ palette: validationPalette,
189
+ type: errorType,
190
+ dataId: "".concat(dataId, "_ValidationMessage"),
191
+ htmlFor: uniqueId
192
+ }, ValidationMessageProps1)), validationRuleMessage && /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], _extends({
193
+ text: validationRuleMessage,
194
+ palette: validationRulePalette,
195
+ type: errorType,
196
+ dataId: "".concat(dataId, "_ValidationRuleMessage"),
197
+ htmlFor: uniqueId
198
+ }, ValidationMessageProps2)));
199
+ } // const MomoizedMultiSelectField = memo(MultiSelectField);
200
+ // export default MomoizedMultiSelectField;
201
+ // MomoizedMultiSelectField.propTypes = propTypes;
202
+ // MomoizedMultiSelectField.defaultProps = defaultProps;
257
203
 
258
- return MultiSelectField;
259
- }(_react.PureComponent);
260
204
 
261
- exports["default"] = MultiSelectField;
262
205
  MultiSelectField.propTypes = _propTypes.propTypes;
263
- MultiSelectField.defaultProps = _defaultProps.defaultProps; // if (__DOCS__) {
264
- // MultiSelectField.docs = {
265
- // componentGroup: 'Form Fields',
266
- // folderName: 'General'
267
- // };
268
- // }
206
+ MultiSelectField.defaultProps = _defaultProps.defaultProps;
207
+ var _default = MultiSelectField;
208
+ exports["default"] = _default;