@zohodesk/dot 1.0.0-temp-175.7 → 1.0.0-temp-181

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 (231) hide show
  1. package/.cli/propValidation_report.html +1 -1
  2. package/README.md +30 -0
  3. package/assets/Appearance/dark/mode/Dot_DarkMode.module.css +0 -1
  4. package/assets/Appearance/light/mode/Dot_LightMode.module.css +0 -1
  5. package/assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css +0 -1
  6. package/coverage/ExternalLink/ExternalLink.js.html +1 -1
  7. package/coverage/ExternalLink/ExternalLink.module.css.html +1 -1
  8. package/coverage/ExternalLink/index.html +1 -1
  9. package/coverage/ExternalLink/props/defaultProps.js.html +1 -1
  10. package/coverage/ExternalLink/props/index.html +1 -1
  11. package/coverage/ExternalLink/props/propTypes.js.html +1 -1
  12. package/coverage/IconButton/IconButton.js.html +7 -7
  13. package/coverage/IconButton/IconButton.module.css.html +1 -1
  14. package/coverage/IconButton/index.html +11 -11
  15. package/coverage/IconButton/props/defaultProps.js.html +1 -1
  16. package/coverage/IconButton/props/index.html +1 -1
  17. package/coverage/IconButton/props/propTypes.js.html +1 -1
  18. package/coverage/Image/Image.js.html +1 -1
  19. package/coverage/Image/Image.module.css.html +1 -1
  20. package/coverage/Image/index.html +1 -1
  21. package/coverage/Image/props/defaultProps.js.html +1 -1
  22. package/coverage/Image/props/index.html +1 -1
  23. package/coverage/Image/props/propTypes.js.html +1 -1
  24. package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.js.html +1 -1
  25. package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.module.css.html +1 -1
  26. package/coverage/avatar/AvatarWithTeam/index.html +1 -1
  27. package/coverage/avatar/AvatarWithTeam/props/defaultProps.js.html +1 -1
  28. package/coverage/avatar/AvatarWithTeam/props/index.html +1 -1
  29. package/coverage/avatar/AvatarWithTeam/props/propTypes.js.html +1 -1
  30. package/coverage/coverage-final.json +16 -16
  31. package/coverage/coverage-summary.json +17 -17
  32. package/coverage/index.html +11 -11
  33. package/es/Drawer/Drawer.js +6 -3
  34. package/es/Drawer/props/defaultProps.js +2 -1
  35. package/es/Drawer/props/propTypes.js +2 -1
  36. package/es/Hooks/Dragger/useDragger.js +4 -3
  37. package/es/IconButton/IconButton.js +2 -2
  38. package/es/NewStar/NewStar.module.css +128 -67
  39. package/es/emptystate/CommonEmptyState/CommonEmptyState.module.css +4 -0
  40. package/es/form/fields/TextEditor/TextEditor.module.css +63 -47
  41. package/es/list/status/StatusDropdown/StatusDropdown.js +2 -1
  42. package/es/list/status/StatusListItem/StatusListItem.js +12 -5
  43. package/es/list/status/StatusListItem/props/defaultProps.js +2 -1
  44. package/es/list/status/StatusListItem/props/propTypes.js +3 -1
  45. package/es/lookup/Lookup/Lookup.js +6 -3
  46. package/es/v1/DotWrapper/DotWrapper.js +28 -0
  47. package/es/v1/DotWrapper/libraryChunks/appearance/component/DarkMode_Component.js +1 -0
  48. package/es/v1/DotWrapper/libraryChunks/appearance/component/LightMode_Component.js +1 -0
  49. package/es/v1/DotWrapper/libraryChunks/appearance/component/PureDarkMode_Component.js +1 -0
  50. package/es/v1/DotWrapper/libraryChunks/appearance/dot/DarkMode_Dot.js +1 -0
  51. package/es/v1/DotWrapper/libraryChunks/appearance/dot/LightMode_Dot.js +1 -0
  52. package/es/v1/DotWrapper/libraryChunks/appearance/dot/PureDarkMode_Dot.js +1 -0
  53. package/es/v1/DotWrapper/libraryChunks/appearance/svg/DarkMode_SVG.js +1 -0
  54. package/es/v1/DotWrapper/libraryChunks/appearance/svg/LightMode_SVG.js +1 -0
  55. package/es/v1/DotWrapper/libraryChunks/appearance/svg/PureDarkMode_SVG.js +1 -0
  56. package/es/v1/DotWrapper/libraryChunks/dynamicImports.js +19 -0
  57. package/es/v1/DotWrapper/libraryChunks/themes/component/blue/Blue_Dark_Component.js +3 -0
  58. package/es/v1/DotWrapper/libraryChunks/themes/component/blue/Blue_Light_Component.js +3 -0
  59. package/es/v1/DotWrapper/libraryChunks/themes/component/blue/Blue_PureDark_Component.js +3 -0
  60. package/es/v1/DotWrapper/libraryChunks/themes/component/green/Green_Dark_Component.js +3 -0
  61. package/es/v1/DotWrapper/libraryChunks/themes/component/green/Green_Light_Component.js +3 -0
  62. package/es/v1/DotWrapper/libraryChunks/themes/component/green/Green_PureDark_Component.js +3 -0
  63. package/es/v1/DotWrapper/libraryChunks/themes/component/orange/Orange_Dark_Component.js +3 -0
  64. package/es/v1/DotWrapper/libraryChunks/themes/component/orange/Orange_Light_Component.js +3 -0
  65. package/es/v1/DotWrapper/libraryChunks/themes/component/orange/Orange_PureDark_Component.js +3 -0
  66. package/es/v1/DotWrapper/libraryChunks/themes/component/red/Red_Dark_Component.js +3 -0
  67. package/es/v1/DotWrapper/libraryChunks/themes/component/red/Red_Light_Component.js +3 -0
  68. package/es/v1/DotWrapper/libraryChunks/themes/component/red/Red_PureDark_Component.js +3 -0
  69. package/es/v1/DotWrapper/libraryChunks/themes/component/yellow/Yellow_Dark_Component.js +3 -0
  70. package/es/v1/DotWrapper/libraryChunks/themes/component/yellow/Yellow_Light_Component.js +3 -0
  71. package/es/v1/DotWrapper/libraryChunks/themes/component/yellow/Yellow_PureDark_Component.js +3 -0
  72. package/es/v1/DotWrapper/libraryChunks/themes/dot/blue/Blue_Dark_Dot.js +1 -0
  73. package/es/v1/DotWrapper/libraryChunks/themes/dot/blue/Blue_Light_Dot.js +1 -0
  74. package/es/v1/DotWrapper/libraryChunks/themes/dot/blue/Blue_PureDark_Dot.js +1 -0
  75. package/es/v1/DotWrapper/libraryChunks/themes/dot/green/Green_Dark_Dot.js +1 -0
  76. package/es/v1/DotWrapper/libraryChunks/themes/dot/green/Green_Light_Dot.js +1 -0
  77. package/es/v1/DotWrapper/libraryChunks/themes/dot/green/Green_PureDark_Dot.js +1 -0
  78. package/es/v1/DotWrapper/libraryChunks/themes/dot/orange/Orange_Dark_Dot.js +1 -0
  79. package/es/v1/DotWrapper/libraryChunks/themes/dot/orange/Orange_Light_Dot.js +1 -0
  80. package/es/v1/DotWrapper/libraryChunks/themes/dot/orange/Orange_PureDark_Dot.js +1 -0
  81. package/es/v1/DotWrapper/libraryChunks/themes/dot/red/Red_Dark_Dot.js +1 -0
  82. package/es/v1/DotWrapper/libraryChunks/themes/dot/red/Red_Light_Dot.js +1 -0
  83. package/es/v1/DotWrapper/libraryChunks/themes/dot/red/Red_PureDark_Dot.js +1 -0
  84. package/es/v1/DotWrapper/libraryChunks/themes/dot/yellow/Yellow_Dark_Dot.js +1 -0
  85. package/es/v1/DotWrapper/libraryChunks/themes/dot/yellow/Yellow_Light_Dot.js +1 -0
  86. package/es/v1/DotWrapper/libraryChunks/themes/dot/yellow/Yellow_PureDark_Dot.js +1 -0
  87. package/es/v1/DotWrapper/libraryChunks/themes/svg/blue/Blue_Dark_SVG.js +1 -0
  88. package/es/v1/DotWrapper/libraryChunks/themes/svg/blue/Blue_Light_SVG.js +1 -0
  89. package/es/v1/DotWrapper/libraryChunks/themes/svg/blue/Blue_PureDark_SVG.js +1 -0
  90. package/es/v1/DotWrapper/libraryChunks/themes/svg/green/Green_Dark_SVG.js +1 -0
  91. package/es/v1/DotWrapper/libraryChunks/themes/svg/green/Green_Light_SVG.js +1 -0
  92. package/es/v1/DotWrapper/libraryChunks/themes/svg/green/Green_PureDark_SVG.js +1 -0
  93. package/es/v1/DotWrapper/libraryChunks/themes/svg/orange/Orange_Dark_SVG.js +1 -0
  94. package/es/v1/DotWrapper/libraryChunks/themes/svg/orange/Orange_Light_SVG.js +1 -0
  95. package/es/v1/DotWrapper/libraryChunks/themes/svg/orange/Orange_PureDark_SVG.js +1 -0
  96. package/es/v1/DotWrapper/libraryChunks/themes/svg/red/Red_Dark_SVG.js +1 -0
  97. package/es/v1/DotWrapper/libraryChunks/themes/svg/red/Red_Light_SVG.js +1 -0
  98. package/es/v1/DotWrapper/libraryChunks/themes/svg/red/Red_PureDark_SVG.js +1 -0
  99. package/es/v1/DotWrapper/libraryChunks/themes/svg/yellow/Yellow_Dark_SVG.js +1 -0
  100. package/es/v1/DotWrapper/libraryChunks/themes/svg/yellow/Yellow_Light_SVG.js +1 -0
  101. package/es/v1/DotWrapper/libraryChunks/themes/svg/yellow/Yellow_PureDark_SVG.js +1 -0
  102. package/es/v1/DotWrapper/props/defaultProps.js +7 -0
  103. package/es/v1/DotWrapper/props/propTypes.js +8 -0
  104. package/es/v1/DotWrapper/utils/appearanceProperties.js +46 -0
  105. package/es/v1/DotWrapper/utils/errorMessage.js +7 -0
  106. package/es/v1/DotWrapper/utils/importFiles.js +18 -0
  107. package/es/v1/DotWrapper/utils/themeProperties.js +220 -0
  108. package/es/v1/Drawer/Drawer.js +6 -3
  109. package/es/v1/Drawer/props/defaultProps.js +2 -1
  110. package/es/v1/Drawer/props/propTypes.js +2 -1
  111. package/es/v1/IconButton/IconButton.js +2 -2
  112. package/es/v1/form/fields/SelectField/SelectField.js +1 -9
  113. package/es/v1/form/fields/TextBoxField/TextBoxField.js +122 -142
  114. package/es/v1/form/fields/TextEditorField/TextEditorField.js +133 -153
  115. package/es/v1/form/fields/TextEditorWrapper/TextEditorWrapper.js +137 -178
  116. package/es/v1/form/fields/TextareaField/TextareaField.js +113 -137
  117. package/es/v1/form/fields/ValidationMessage/ValidationMessage.js +43 -43
  118. package/es/v1/form/layout/Field/Field.js +24 -28
  119. package/es/v1/form/layout/Section/Section.js +25 -33
  120. package/es/v1/form/layout/Section/props/propTypes.js +0 -1
  121. package/es/v1/list/Subject/Subject.js +39 -48
  122. package/es/v1/list/TagNew/TagNew.js +18 -27
  123. package/es/v1/list/Thread/Thread.js +26 -35
  124. package/es/v1/list/status/StatusDropdown/StatusDropdown.js +2 -1
  125. package/es/v1/list/status/StatusListItem/StatusListItem.js +12 -5
  126. package/es/v1/list/status/StatusListItem/props/defaultProps.js +2 -1
  127. package/es/v1/list/status/StatusListItem/props/propTypes.js +3 -1
  128. package/es/v1/lookup/Lookup/Lookup.js +6 -3
  129. package/es/version2/GlobalNotification/GlobalNotification.module.css +1 -2
  130. package/lib/Drawer/Drawer.js +6 -3
  131. package/lib/Drawer/props/defaultProps.js +2 -1
  132. package/lib/Drawer/props/propTypes.js +2 -1
  133. package/lib/Hooks/Dragger/useDragger.js +4 -3
  134. package/lib/IconButton/IconButton.js +2 -2
  135. package/lib/NewStar/NewStar.module.css +128 -67
  136. package/lib/emptystate/CommonEmptyState/CommonEmptyState.module.css +4 -0
  137. package/lib/form/fields/TextEditor/TextEditor.module.css +63 -47
  138. package/lib/list/status/StatusDropdown/StatusDropdown.js +2 -1
  139. package/lib/list/status/StatusListItem/StatusListItem.js +12 -5
  140. package/lib/list/status/StatusListItem/props/defaultProps.js +2 -1
  141. package/lib/list/status/StatusListItem/props/propTypes.js +3 -1
  142. package/lib/lookup/Lookup/Lookup.js +14 -3
  143. package/lib/v1/DotWrapper/DotWrapper.js +41 -0
  144. package/lib/v1/DotWrapper/libraryChunks/appearance/component/DarkMode_Component.js +3 -0
  145. package/lib/v1/DotWrapper/libraryChunks/appearance/component/LightMode_Component.js +3 -0
  146. package/lib/v1/DotWrapper/libraryChunks/appearance/component/PureDarkMode_Component.js +3 -0
  147. package/lib/v1/DotWrapper/libraryChunks/appearance/dot/DarkMode_Dot.js +3 -0
  148. package/lib/v1/DotWrapper/libraryChunks/appearance/dot/LightMode_Dot.js +3 -0
  149. package/lib/v1/DotWrapper/libraryChunks/appearance/dot/PureDarkMode_Dot.js +3 -0
  150. package/lib/v1/DotWrapper/libraryChunks/appearance/svg/DarkMode_SVG.js +3 -0
  151. package/lib/v1/DotWrapper/libraryChunks/appearance/svg/LightMode_SVG.js +3 -0
  152. package/lib/v1/DotWrapper/libraryChunks/appearance/svg/PureDarkMode_SVG.js +3 -0
  153. package/lib/v1/DotWrapper/libraryChunks/dynamicImports.js +33 -0
  154. package/lib/v1/DotWrapper/libraryChunks/themes/component/blue/Blue_Dark_Component.js +7 -0
  155. package/lib/v1/DotWrapper/libraryChunks/themes/component/blue/Blue_Light_Component.js +7 -0
  156. package/lib/v1/DotWrapper/libraryChunks/themes/component/blue/Blue_PureDark_Component.js +7 -0
  157. package/lib/v1/DotWrapper/libraryChunks/themes/component/green/Green_Dark_Component.js +7 -0
  158. package/lib/v1/DotWrapper/libraryChunks/themes/component/green/Green_Light_Component.js +7 -0
  159. package/lib/v1/DotWrapper/libraryChunks/themes/component/green/Green_PureDark_Component.js +7 -0
  160. package/lib/v1/DotWrapper/libraryChunks/themes/component/orange/Orange_Dark_Component.js +7 -0
  161. package/lib/v1/DotWrapper/libraryChunks/themes/component/orange/Orange_Light_Component.js +7 -0
  162. package/lib/v1/DotWrapper/libraryChunks/themes/component/orange/Orange_PureDark_Component.js +7 -0
  163. package/lib/v1/DotWrapper/libraryChunks/themes/component/red/Red_Dark_Component.js +7 -0
  164. package/lib/v1/DotWrapper/libraryChunks/themes/component/red/Red_Light_Component.js +7 -0
  165. package/lib/v1/DotWrapper/libraryChunks/themes/component/red/Red_PureDark_Component.js +7 -0
  166. package/lib/v1/DotWrapper/libraryChunks/themes/component/yellow/Yellow_Dark_Component.js +7 -0
  167. package/lib/v1/DotWrapper/libraryChunks/themes/component/yellow/Yellow_Light_Component.js +7 -0
  168. package/lib/v1/DotWrapper/libraryChunks/themes/component/yellow/Yellow_PureDark_Component.js +7 -0
  169. package/lib/v1/DotWrapper/libraryChunks/themes/dot/blue/Blue_Dark_Dot.js +3 -0
  170. package/lib/v1/DotWrapper/libraryChunks/themes/dot/blue/Blue_Light_Dot.js +3 -0
  171. package/lib/v1/DotWrapper/libraryChunks/themes/dot/blue/Blue_PureDark_Dot.js +3 -0
  172. package/lib/v1/DotWrapper/libraryChunks/themes/dot/green/Green_Dark_Dot.js +3 -0
  173. package/lib/v1/DotWrapper/libraryChunks/themes/dot/green/Green_Light_Dot.js +3 -0
  174. package/lib/v1/DotWrapper/libraryChunks/themes/dot/green/Green_PureDark_Dot.js +3 -0
  175. package/lib/v1/DotWrapper/libraryChunks/themes/dot/orange/Orange_Dark_Dot.js +3 -0
  176. package/lib/v1/DotWrapper/libraryChunks/themes/dot/orange/Orange_Light_Dot.js +3 -0
  177. package/lib/v1/DotWrapper/libraryChunks/themes/dot/orange/Orange_PureDark_Dot.js +3 -0
  178. package/lib/v1/DotWrapper/libraryChunks/themes/dot/red/Red_Dark_Dot.js +3 -0
  179. package/lib/v1/DotWrapper/libraryChunks/themes/dot/red/Red_Light_Dot.js +3 -0
  180. package/lib/v1/DotWrapper/libraryChunks/themes/dot/red/Red_PureDark_Dot.js +3 -0
  181. package/lib/v1/DotWrapper/libraryChunks/themes/dot/yellow/Yellow_Dark_Dot.js +3 -0
  182. package/lib/v1/DotWrapper/libraryChunks/themes/dot/yellow/Yellow_Light_Dot.js +3 -0
  183. package/lib/v1/DotWrapper/libraryChunks/themes/dot/yellow/Yellow_PureDark_Dot.js +3 -0
  184. package/lib/v1/DotWrapper/libraryChunks/themes/svg/blue/Blue_Dark_SVG.js +3 -0
  185. package/lib/v1/DotWrapper/libraryChunks/themes/svg/blue/Blue_Light_SVG.js +3 -0
  186. package/lib/v1/DotWrapper/libraryChunks/themes/svg/blue/Blue_PureDark_SVG.js +3 -0
  187. package/lib/v1/DotWrapper/libraryChunks/themes/svg/green/Green_Dark_SVG.js +3 -0
  188. package/lib/v1/DotWrapper/libraryChunks/themes/svg/green/Green_Light_SVG.js +3 -0
  189. package/lib/v1/DotWrapper/libraryChunks/themes/svg/green/Green_PureDark_SVG.js +3 -0
  190. package/lib/v1/DotWrapper/libraryChunks/themes/svg/orange/Orange_Dark_SVG.js +3 -0
  191. package/lib/v1/DotWrapper/libraryChunks/themes/svg/orange/Orange_Light_SVG.js +3 -0
  192. package/lib/v1/DotWrapper/libraryChunks/themes/svg/orange/Orange_PureDark_SVG.js +3 -0
  193. package/lib/v1/DotWrapper/libraryChunks/themes/svg/red/Red_Dark_SVG.js +3 -0
  194. package/lib/v1/DotWrapper/libraryChunks/themes/svg/red/Red_Light_SVG.js +3 -0
  195. package/lib/v1/DotWrapper/libraryChunks/themes/svg/red/Red_PureDark_SVG.js +3 -0
  196. package/lib/v1/DotWrapper/libraryChunks/themes/svg/yellow/Yellow_Dark_SVG.js +3 -0
  197. package/lib/v1/DotWrapper/libraryChunks/themes/svg/yellow/Yellow_Light_SVG.js +3 -0
  198. package/lib/v1/DotWrapper/libraryChunks/themes/svg/yellow/Yellow_PureDark_SVG.js +3 -0
  199. package/lib/v1/DotWrapper/props/defaultProps.js +14 -0
  200. package/lib/v1/DotWrapper/props/propTypes.js +19 -0
  201. package/lib/v1/DotWrapper/utils/appearanceProperties.js +79 -0
  202. package/lib/v1/DotWrapper/utils/errorMessage.js +14 -0
  203. package/lib/v1/DotWrapper/utils/importFiles.js +25 -0
  204. package/lib/v1/DotWrapper/utils/themeProperties.js +325 -0
  205. package/lib/v1/Drawer/Drawer.js +6 -3
  206. package/lib/v1/Drawer/props/defaultProps.js +2 -1
  207. package/lib/v1/Drawer/props/propTypes.js +2 -1
  208. package/lib/v1/IconButton/IconButton.js +2 -2
  209. package/lib/v1/form/fields/SelectField/SelectField.js +1 -7
  210. package/lib/v1/form/fields/TextBoxField/TextBoxField.js +125 -181
  211. package/lib/v1/form/fields/TextEditorField/TextEditorField.js +138 -193
  212. package/lib/v1/form/fields/TextEditorWrapper/TextEditorWrapper.js +160 -212
  213. package/lib/v1/form/fields/TextareaField/TextareaField.js +117 -177
  214. package/lib/v1/form/fields/ValidationMessage/ValidationMessage.js +41 -80
  215. package/lib/v1/form/layout/Field/Field.js +22 -69
  216. package/lib/v1/form/layout/Section/Section.js +27 -72
  217. package/lib/v1/form/layout/Section/props/propTypes.js +0 -1
  218. package/lib/v1/list/Subject/Subject.js +39 -87
  219. package/lib/v1/list/TagNew/TagNew.js +18 -66
  220. package/lib/v1/list/Thread/Thread.js +25 -73
  221. package/lib/v1/list/status/StatusDropdown/StatusDropdown.js +2 -1
  222. package/lib/v1/list/status/StatusListItem/StatusListItem.js +12 -5
  223. package/lib/v1/list/status/StatusListItem/props/defaultProps.js +2 -1
  224. package/lib/v1/list/status/StatusListItem/props/propTypes.js +3 -1
  225. package/lib/v1/lookup/Lookup/Lookup.js +11 -6
  226. package/lib/version2/GlobalNotification/GlobalNotification.module.css +1 -2
  227. package/package.json +13 -13
  228. package/prePublish.js +0 -69
  229. package/react-cli.config.js +6 -1
  230. package/result.json +1 -1
  231. package/unittest/index.html +1 -1
@@ -13,6 +13,8 @@ var _defaultProps = require("./props/defaultProps");
13
13
 
14
14
  var _propTypes = require("./props/propTypes");
15
15
 
16
+ var _useEffectCallOnlyAfterState = _interopRequireDefault(require("@zohodesk/hooks/es/utils/useEffectCallOnlyAfterState"));
17
+
16
18
  var _TextEditor = _interopRequireDefault(require("../TextEditor/TextEditor"));
17
19
 
18
20
  var _Textarea = _interopRequireDefault(require("@zohodesk/components/es/v1/Textarea/Textarea"));
@@ -31,226 +33,172 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
31
33
 
32
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); }
33
35
 
34
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
35
-
36
- 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); } }
37
-
38
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
36
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
39
37
 
40
- 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); }
38
+ 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."); }
41
39
 
42
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
40
+ 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); }
43
41
 
44
- 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); }; }
42
+ 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; }
45
43
 
46
- 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); }
44
+ 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; }
47
45
 
48
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
49
-
50
- 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; } }
51
-
52
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
46
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
53
47
 
54
48
  /* eslint-disable react/no-deprecated */
55
- var TextEditorWrapper = /*#__PURE__*/function (_Component) {
56
- _inherits(TextEditorWrapper, _Component);
57
-
58
- var _super = _createSuper(TextEditorWrapper);
59
-
60
- function TextEditorWrapper(props) {
61
- var _this;
62
-
63
- _classCallCheck(this, TextEditorWrapper);
64
-
65
- _this = _super.call(this, props);
66
- var value = props.value,
67
- isEditorDefaultOpen = props.isEditorDefaultOpen;
68
- _this.state = {
69
- isEditorShow: isEditorDefaultOpen ? true : !!value
70
- };
71
- _this.handleTextareaFocus = _this.handleTextareaFocus.bind(_assertThisInitialized(_this));
72
- _this.toggleEdit = _this.toggleEdit.bind(_assertThisInitialized(_this));
73
- _this.focusCallback = _this.focusCallback.bind(_assertThisInitialized(_this));
74
- return _this;
75
- }
76
-
77
- _createClass(TextEditorWrapper, [{
78
- key: "handleTextareaFocus",
79
- value: function handleTextareaFocus() {
80
- var _this2 = this;
81
-
82
- var _this$props = this.props,
83
- isReadOnly = _this$props.isReadOnly,
84
- isDisabled = _this$props.isDisabled;
85
-
86
- if (!isReadOnly && !isDisabled) {
87
- this.setState({
88
- isEditorShow: true
89
- }, function () {
90
- setTimeout(function () {
91
- editor[_this2.props.id].squireInstance.focus();
92
- }, 300);
93
- });
94
- }
95
- }
96
- }, {
97
- key: "toggleEdit",
98
- value: function toggleEdit(value) {
99
- this.setState({
100
- isEditorShow: value
101
- });
102
- }
103
- }, {
104
- key: "focusCallback",
105
- value: function focusCallback() {
106
- var onFocus = this.props.onFocus;
107
- this.setState({
108
- isEditorFocus: true
109
- });
110
- onFocus && onFocus();
111
- }
112
- }, {
113
- key: "componentWillReceiveProps",
114
- value: function componentWillReceiveProps(np) {
115
- var _this$props2 = this.props,
116
- id = _this$props2.id,
117
- value = _this$props2.value;
118
-
119
- if (np.value || typeof editor != 'undefined' && (0, _editorUtils.editorContentValidate)(editor[id])) {
120
- this.setState({
121
- isEditorShow: true
122
- });
123
- } else {
124
- if (!this.state.isEditorFocus && !this.props.isEditorDefaultOpen) {
125
- this.setState({
126
- isEditorShow: false
127
- });
128
- }
129
- } // if (np.value !== value && np.value == '') {
130
- // editor[id].setContent('');
131
- // }
132
-
49
+ var TextEditorWrapper = function TextEditorWrapper(props) {
50
+ var id = props.id,
51
+ onChange = props.onChange,
52
+ value = props.value,
53
+ onAttachmentUpload = props.onAttachmentUpload,
54
+ needEditor = props.needEditor,
55
+ dataId = props.dataId,
56
+ isReadOnly = props.isReadOnly,
57
+ isDisabled = props.isDisabled,
58
+ getRef = props.getRef,
59
+ textBoxSize = props.textBoxSize,
60
+ textBoxVariant = props.textBoxVariant,
61
+ editorMode = props.editorMode,
62
+ editorSize = props.editorSize,
63
+ editorBorder = props.editorBorder,
64
+ EDITORURL = props.EDITORURL,
65
+ isCustomScroll = props.isCustomScroll,
66
+ initCallback = props.initCallback,
67
+ loadingComponent = props.loadingComponent,
68
+ handleAlertMessage = props.handleAlertMessage,
69
+ editorCallback = props.editorCallback,
70
+ editorBlurCallback = props.editorBlurCallback,
71
+ editorOptions = props.editorOptions,
72
+ changeEditorContent = props.changeEditorContent,
73
+ shouldEditorUpdateContent = props.shouldEditorUpdateContent,
74
+ setInlineAttachmentInProgress = props.setInlineAttachmentInProgress,
75
+ handleEditorDropUpload = props.handleEditorDropUpload,
76
+ ImgLazyLoad = props.ImgLazyLoad,
77
+ i18nKeys = props.i18nKeys,
78
+ isEditorDefaultOpen = props.isEditorDefaultOpen,
79
+ needInlineAttachment = props.needInlineAttachment,
80
+ customProps = props.customProps,
81
+ dataSelectorId = props.dataSelectorId,
82
+ onFocus = props.onFocus;
83
+ var _customProps$Textarea = customProps.Textarea1Props,
84
+ Textarea1Props = _customProps$Textarea === void 0 ? {} : _customProps$Textarea,
85
+ _customProps$Textarea2 = customProps.Textarea2Props,
86
+ Textarea2Props = _customProps$Textarea2 === void 0 ? {} : _customProps$Textarea2,
87
+ _customProps$TextEdit = customProps.TextEditorProps,
88
+ TextEditorProps = _customProps$TextEdit === void 0 ? {} : _customProps$TextEdit;
89
+
90
+ var _useState = (0, _react.useState)(isEditorDefaultOpen ? true : !!value),
91
+ _useState2 = _slicedToArray(_useState, 2),
92
+ isEditorShow = _useState2[0],
93
+ setIsEditorShow = _useState2[1];
94
+
95
+ var _useState3 = (0, _react.useState)(false),
96
+ _useState4 = _slicedToArray(_useState3, 2),
97
+ isEditorFocus = _useState4[0],
98
+ setIsEditorFocus = _useState4[1];
99
+
100
+ var defaultObj = {
101
+ needEditorFocus: !value
102
+ };
103
+ var editorOptionsObject = Object.assign(defaultObj, editorOptions);
104
+
105
+ var handleTextareaFocus = function handleTextareaFocus() {
106
+ if (!isReadOnly && !isDisabled) {
107
+ setIsEditorShow(true);
108
+ setTimeout(function () {
109
+ editor[id].squireInstance.focus();
110
+ }, 300);
133
111
  }
134
- }, {
135
- key: "render",
136
- value: function render() {
137
- var isEditorShow = this.state.isEditorShow;
138
- var _this$props3 = this.props,
139
- id = _this$props3.id,
140
- onChange = _this$props3.onChange,
141
- value = _this$props3.value,
142
- onAttachmentUpload = _this$props3.onAttachmentUpload,
143
- needEditor = _this$props3.needEditor,
144
- dataId = _this$props3.dataId,
145
- isReadOnly = _this$props3.isReadOnly,
146
- isDisabled = _this$props3.isDisabled,
147
- getRef = _this$props3.getRef,
148
- textBoxSize = _this$props3.textBoxSize,
149
- textBoxVariant = _this$props3.textBoxVariant,
150
- editorMode = _this$props3.editorMode,
151
- editorSize = _this$props3.editorSize,
152
- editorBorder = _this$props3.editorBorder,
153
- EDITORURL = _this$props3.EDITORURL,
154
- isCustomScroll = _this$props3.isCustomScroll,
155
- initCallback = _this$props3.initCallback,
156
- loadingComponent = _this$props3.loadingComponent,
157
- handleAlertMessage = _this$props3.handleAlertMessage,
158
- editorCallback = _this$props3.editorCallback,
159
- editorBlurCallback = _this$props3.editorBlurCallback,
160
- editorOptions = _this$props3.editorOptions,
161
- changeEditorContent = _this$props3.changeEditorContent,
162
- shouldEditorUpdateContent = _this$props3.shouldEditorUpdateContent,
163
- setInlineAttachmentInProgress = _this$props3.setInlineAttachmentInProgress,
164
- handleEditorDropUpload = _this$props3.handleEditorDropUpload,
165
- ImgLazyLoad = _this$props3.ImgLazyLoad,
166
- i18nKeys = _this$props3.i18nKeys,
167
- isEditorDefaultOpen = _this$props3.isEditorDefaultOpen,
168
- needInlineAttachment = _this$props3.needInlineAttachment,
169
- customProps = _this$props3.customProps,
170
- dataSelectorId = _this$props3.dataSelectorId;
171
- var _customProps$Textarea = customProps.Textarea1Props,
172
- Textarea1Props = _customProps$Textarea === void 0 ? {} : _customProps$Textarea,
173
- _customProps$Textarea2 = customProps.Textarea2Props,
174
- Textarea2Props = _customProps$Textarea2 === void 0 ? {} : _customProps$Textarea2,
175
- _customProps$TextEdit = customProps.TextEditorProps,
176
- TextEditorProps = _customProps$TextEdit === void 0 ? {} : _customProps$TextEdit;
177
- var defaultObj = {
178
- needEditorFocus: !value
179
- };
180
- var editorOptionsObject = Object.assign(defaultObj, editorOptions);
181
- return /*#__PURE__*/_react["default"].createElement("div", {
182
- className: _TextEditorWrapperModule["default"].container,
183
- "data-selector-id": dataSelectorId
184
- }, !isEditorShow ? /*#__PURE__*/_react["default"].createElement(_Textarea["default"], _extends({
185
- onFocus: this.handleTextareaFocus,
186
- text: value,
187
- animated: !needEditor,
188
- onChange: onChange,
189
- dataId: dataId,
190
- isReadOnly: isReadOnly,
191
- isDisabled: isDisabled,
192
- needEffect: !(isReadOnly || isDisabled),
193
- getRef: getRef,
194
- size: textBoxSize,
195
- variant: textBoxVariant,
196
- customClass: _TextEditorWrapperModule["default"].textBox
197
- }, Textarea1Props)) : null, /*#__PURE__*/_react["default"].createElement(_VelocityAnimationGroup["default"], {
198
- name: "slideDown",
199
- runOnMount: true,
200
- enterDuration: '300',
201
- exitDuration: '400',
202
- isActive: isEditorShow,
203
- component: "div"
204
- }, /*#__PURE__*/_react["default"].createElement("div", {
205
- className: _TextEditorWrapperModule["default"].textEditor
206
- }, isEditorShow && needEditor ? /*#__PURE__*/_react["default"].createElement(_TextEditor["default"], _extends({
207
- id: id,
208
- value: value,
209
- onChange: !isReadOnly && !isDisabled ? onChange : null,
210
- editorOptions: editorOptionsObject,
211
- onUpload: onAttachmentUpload,
212
- editorMode: editorMode,
213
- type: editorSize,
214
- border: editorBorder,
215
- dataId: dataId,
216
- getRef: getRef,
217
- plainTextSwitchCallback: !isReadOnly && !isDisabled ? onChange : null,
218
- EDITORURL: EDITORURL,
219
- isCustomScroll: isCustomScroll,
220
- initCallback: initCallback,
221
- loadingComponent: loadingComponent,
222
- handleAlertMessage: handleAlertMessage,
223
- toggleEdit: this.toggleEdit,
224
- isEditorDefaultOpen: isEditorDefaultOpen,
225
- editorCallback: editorCallback,
226
- i18nKeys: i18nKeys,
227
- ImgLazyLoad: ImgLazyLoad,
228
- blurCallback: editorBlurCallback,
229
- changeEditorContent: changeEditorContent,
230
- shouldUpdateContent: shouldEditorUpdateContent,
231
- setInlineAttachmentInProgress: setInlineAttachmentInProgress,
232
- handleDropUpload: handleEditorDropUpload,
233
- onFocus: this.focusCallback,
234
- needInlineAttachment: needInlineAttachment
235
- }, TextEditorProps)) : /*#__PURE__*/_react["default"].createElement(_Textarea["default"], _extends({
236
- onFocus: this.handleTextareaFocus,
237
- text: value,
238
- animated: !needEditor,
239
- onChange: onChange,
240
- dataId: dataId,
241
- isReadOnly: isReadOnly,
242
- isDisabled: isDisabled,
243
- needEffect: !(isReadOnly || isDisabled),
244
- getRef: getRef,
245
- size: textBoxSize,
246
- variant: textBoxVariant
247
- }, Textarea2Props)))));
112
+ };
113
+
114
+ var toggleEdit = function toggleEdit(value) {
115
+ setIsEditorShow(value);
116
+ };
117
+
118
+ var focusCallback = function focusCallback() {
119
+ setIsEditorFocus(true);
120
+ onFocus && onFocus();
121
+ };
122
+
123
+ (0, _useEffectCallOnlyAfterState["default"])(function () {
124
+ if (value || typeof editor !== 'undefined' && (0, _editorUtils.editorContentValidate)(editor[id])) {
125
+ setIsEditorShow(true);
126
+ } else {
127
+ if (!isEditorFocus && !isEditorDefaultOpen) {
128
+ setIsEditorShow(false);
129
+ }
248
130
  }
249
- }]);
250
-
251
- return TextEditorWrapper;
252
- }(_react.Component);
253
-
254
- exports["default"] = TextEditorWrapper;
131
+ }, [value, id, isEditorDefaultOpen]);
132
+ return /*#__PURE__*/_react["default"].createElement("div", {
133
+ className: _TextEditorWrapperModule["default"].container,
134
+ "data-selector-id": dataSelectorId
135
+ }, !isEditorShow ? /*#__PURE__*/_react["default"].createElement(_Textarea["default"], _extends({
136
+ onFocus: handleTextareaFocus,
137
+ text: value,
138
+ animated: !needEditor,
139
+ onChange: onChange,
140
+ dataId: dataId,
141
+ isReadOnly: isReadOnly,
142
+ isDisabled: isDisabled,
143
+ needEffect: !(isReadOnly || isDisabled),
144
+ getRef: getRef,
145
+ size: textBoxSize,
146
+ variant: textBoxVariant,
147
+ customClass: _TextEditorWrapperModule["default"].textBox
148
+ }, Textarea1Props)) : null, /*#__PURE__*/_react["default"].createElement(_VelocityAnimationGroup["default"], {
149
+ name: "slideDown",
150
+ runOnMount: true,
151
+ enterDuration: '300',
152
+ exitDuration: '400',
153
+ isActive: isEditorShow,
154
+ component: "div"
155
+ }, /*#__PURE__*/_react["default"].createElement("div", {
156
+ className: _TextEditorWrapperModule["default"].textEditor
157
+ }, isEditorShow && needEditor ? /*#__PURE__*/_react["default"].createElement(_TextEditor["default"], _extends({
158
+ id: id,
159
+ value: value,
160
+ onChange: !isReadOnly && !isDisabled ? onChange : null,
161
+ editorOptions: editorOptionsObject,
162
+ onUpload: onAttachmentUpload,
163
+ editorMode: editorMode,
164
+ type: editorSize,
165
+ border: editorBorder,
166
+ dataId: dataId,
167
+ getRef: getRef,
168
+ plainTextSwitchCallback: !isReadOnly && !isDisabled ? onChange : null,
169
+ EDITORURL: EDITORURL,
170
+ isCustomScroll: isCustomScroll,
171
+ initCallback: initCallback,
172
+ loadingComponent: loadingComponent,
173
+ handleAlertMessage: handleAlertMessage,
174
+ toggleEdit: toggleEdit,
175
+ isEditorDefaultOpen: isEditorDefaultOpen,
176
+ editorCallback: editorCallback,
177
+ i18nKeys: i18nKeys,
178
+ ImgLazyLoad: ImgLazyLoad,
179
+ blurCallback: editorBlurCallback,
180
+ changeEditorContent: changeEditorContent,
181
+ shouldUpdateContent: shouldEditorUpdateContent,
182
+ setInlineAttachmentInProgress: setInlineAttachmentInProgress,
183
+ handleDropUpload: handleEditorDropUpload,
184
+ onFocus: focusCallback,
185
+ needInlineAttachment: needInlineAttachment
186
+ }, TextEditorProps)) : /*#__PURE__*/_react["default"].createElement(_Textarea["default"], _extends({
187
+ onFocus: handleTextareaFocus,
188
+ text: value,
189
+ animated: !needEditor,
190
+ onChange: onChange,
191
+ dataId: dataId,
192
+ isReadOnly: isReadOnly,
193
+ isDisabled: isDisabled,
194
+ needEffect: !(isReadOnly || isDisabled),
195
+ getRef: getRef,
196
+ size: textBoxSize,
197
+ variant: textBoxVariant
198
+ }, Textarea2Props)))));
199
+ };
200
+
201
+ var _default = TextEditorWrapper;
202
+ exports["default"] = _default;
255
203
  TextEditorWrapper.propTypes = _propTypes.propTypes;
256
204
  TextEditorWrapper.defaultProps = _defaultProps.defaultProps;