@bigbinary/neeto-molecules 1.1.16 → 1.1.18

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 (392) hide show
  1. package/dist/AutoSaveInput.js +658 -0
  2. package/dist/AutoSaveInput.js.map +1 -0
  3. package/dist/Breadcrumbs.js +38 -0
  4. package/dist/Breadcrumbs.js.map +1 -0
  5. package/dist/BrowserSupport.js +418 -0
  6. package/dist/BrowserSupport.js.map +1 -0
  7. package/dist/Builder.js +662 -0
  8. package/dist/Builder.js.map +1 -0
  9. package/dist/CalendarView.js +538 -0
  10. package/dist/CalendarView.js.map +1 -0
  11. package/dist/Codeblock.js +236 -0
  12. package/dist/Codeblock.js.map +1 -0
  13. package/dist/{Columns/index.js → Columns.js} +130 -13
  14. package/dist/Columns.js.map +1 -0
  15. package/dist/{ConfirmationModal/index.js → ConfirmationModal.js} +20 -8
  16. package/dist/ConfirmationModal.js.map +1 -0
  17. package/dist/Container.js +1211 -0
  18. package/dist/Container.js.map +1 -0
  19. package/dist/CopyToClipboardButton.js +209 -0
  20. package/dist/CopyToClipboardButton.js.map +1 -0
  21. package/dist/CustomDomain.js +688 -0
  22. package/dist/CustomDomain.js.map +1 -0
  23. package/dist/CustomDomainDashboard.js +2283 -0
  24. package/dist/CustomDomainDashboard.js.map +1 -0
  25. package/dist/{DateFormat/index.js → DateFormat.js} +25 -8
  26. package/dist/DateFormat.js.map +1 -0
  27. package/dist/DateRangeFilter.js +229 -0
  28. package/dist/DateRangeFilter.js.map +1 -0
  29. package/dist/DynamicVariables.js +183 -0
  30. package/dist/DynamicVariables.js.map +1 -0
  31. package/dist/EmailForm.js +2292 -0
  32. package/dist/EmailForm.js.map +1 -0
  33. package/dist/EmailPreview.js +1353 -0
  34. package/dist/EmailPreview.js.map +1 -0
  35. package/dist/{ErrorPage/constants.js → ErrorPage.js} +137 -36
  36. package/dist/ErrorPage.js.map +1 -0
  37. package/dist/Header.js +122 -0
  38. package/dist/Header.js.map +1 -0
  39. package/dist/IconPicker.js +313 -0
  40. package/dist/IconPicker.js.map +1 -0
  41. package/dist/ImageWithFallback.js +181 -0
  42. package/dist/ImageWithFallback.js.map +1 -0
  43. package/dist/IntegrationCard.js +343 -0
  44. package/dist/IntegrationCard.js.map +1 -0
  45. package/dist/IntegrationDisconnectAlert.js +80 -0
  46. package/dist/IntegrationDisconnectAlert.js.map +1 -0
  47. package/dist/{IntegrationWalkthroughModal/index.js → IntegrationWalkthroughModal.js} +8 -6
  48. package/dist/IntegrationWalkthroughModal.js.map +1 -0
  49. package/dist/IpRestriction.js +857 -0
  50. package/dist/IpRestriction.js.map +1 -0
  51. package/dist/KeyboardShortcuts.js +359 -0
  52. package/dist/KeyboardShortcuts.js.map +1 -0
  53. package/dist/LoginPage.js +593 -0
  54. package/dist/LoginPage.js.map +1 -0
  55. package/dist/MenuBar.js +1461 -0
  56. package/dist/MenuBar.js.map +1 -0
  57. package/dist/Metadata.js +206 -0
  58. package/dist/Metadata.js.map +1 -0
  59. package/dist/{MoreDropdown/index.js → MoreDropdown.js} +102 -9
  60. package/dist/MoreDropdown.js.map +1 -0
  61. package/dist/NavigationHeader.js +690 -0
  62. package/dist/NavigationHeader.js.map +1 -0
  63. package/dist/NeetoWidget.js +1333 -0
  64. package/dist/NeetoWidget.js.map +1 -0
  65. package/dist/PageLoader.js +134 -0
  66. package/dist/PageLoader.js.map +1 -0
  67. package/dist/PhoneNumber.js +365 -0
  68. package/dist/PhoneNumber.js.map +1 -0
  69. package/dist/PublishBlock.js +158 -0
  70. package/dist/PublishBlock.js.map +1 -0
  71. package/dist/Rename.js +450 -0
  72. package/dist/Rename.js.map +1 -0
  73. package/dist/ResponsiveDevicePicker.js +194 -0
  74. package/dist/ResponsiveDevicePicker.js.map +1 -0
  75. package/dist/Schedule.js +1046 -0
  76. package/dist/Schedule.js.map +1 -0
  77. package/dist/Scrollable.js +122 -0
  78. package/dist/Scrollable.js.map +1 -0
  79. package/dist/Search.js +151 -0
  80. package/dist/Search.js.map +1 -0
  81. package/dist/Security.js +1835 -0
  82. package/dist/Security.js.map +1 -0
  83. package/dist/SendToFields.js +601 -0
  84. package/dist/SendToFields.js.map +1 -0
  85. package/dist/Settings.js +435 -0
  86. package/dist/Settings.js.map +1 -0
  87. package/dist/ShareViaEmail.js +2277 -0
  88. package/dist/ShareViaEmail.js.map +1 -0
  89. package/dist/ShareViaLink.js +628 -0
  90. package/dist/ShareViaLink.js.map +1 -0
  91. package/dist/Sidebar.js +972 -0
  92. package/dist/Sidebar.js.map +1 -0
  93. package/dist/SubHeader.js +216 -0
  94. package/dist/SubHeader.js.map +1 -0
  95. package/dist/{TableWrapper/index.js → TableWrapper.js} +6 -3
  96. package/dist/TableWrapper.js.map +1 -0
  97. package/dist/ThemeSidebar.js +1984 -0
  98. package/dist/ThemeSidebar.js.map +1 -0
  99. package/dist/TimeFormat.js +47 -0
  100. package/dist/TimeFormat.js.map +1 -0
  101. package/dist/TimezoneMismatchModal.js +168 -0
  102. package/dist/TimezoneMismatchModal.js.map +1 -0
  103. package/dist/ToggleFeatureCard.js +323 -0
  104. package/dist/ToggleFeatureCard.js.map +1 -0
  105. package/package.json +22 -13
  106. package/dist/AutoSaveInput/autosaveinput.scss +0 -15
  107. package/dist/AutoSaveInput/constants.js +0 -13
  108. package/dist/AutoSaveInput/index.js +0 -124
  109. package/dist/AutoSaveInput/utils.js +0 -10
  110. package/dist/Breadcrumbs/breadcrumbs.scss +0 -33
  111. package/dist/Breadcrumbs/index.js +0 -31
  112. package/dist/BrowserSupport/Callout.js +0 -15
  113. package/dist/BrowserSupport/ContactUs.js +0 -21
  114. package/dist/BrowserSupport/DownloadLink.js +0 -17
  115. package/dist/BrowserSupport/PartialSupportedBrowserVersion.js +0 -17
  116. package/dist/BrowserSupport/UnknownBrowser.js +0 -13
  117. package/dist/BrowserSupport/UnsupportedBrowser.js +0 -24
  118. package/dist/BrowserSupport/UnsupportedBrowserMessage.js +0 -22
  119. package/dist/BrowserSupport/UnsupportedBrowserVersion.js +0 -27
  120. package/dist/BrowserSupport/UnsupportedVersionMessage.js +0 -30
  121. package/dist/BrowserSupport/browsersupport.scss +0 -71
  122. package/dist/BrowserSupport/constants.js +0 -63
  123. package/dist/BrowserSupport/index.js +0 -58
  124. package/dist/BrowserSupport/utils.js +0 -32
  125. package/dist/Builder/Body.js +0 -9
  126. package/dist/Builder/ElementsPanel/ElementsList/Element.js +0 -27
  127. package/dist/Builder/ElementsPanel/ElementsList/Section.js +0 -28
  128. package/dist/Builder/ElementsPanel/ElementsList/TitleBar.js +0 -28
  129. package/dist/Builder/ElementsPanel/ElementsList/index.js +0 -63
  130. package/dist/Builder/ElementsPanel/SelectedElementsList/SelectedElement.js +0 -73
  131. package/dist/Builder/ElementsPanel/SelectedElementsList/TitleBar.js +0 -50
  132. package/dist/Builder/ElementsPanel/SelectedElementsList/index.js +0 -91
  133. package/dist/Builder/ElementsPanel/index.js +0 -70
  134. package/dist/Builder/PropertiesPanel/EmptyProperty.js +0 -21
  135. package/dist/Builder/PropertiesPanel/Skeleton.js +0 -24
  136. package/dist/Builder/PropertiesPanel/index.js +0 -12
  137. package/dist/Builder/index.js +0 -3
  138. package/dist/Builder/styles.scss +0 -84
  139. package/dist/CalendarView/CustomDatePicker.js +0 -87
  140. package/dist/CalendarView/Header.js +0 -53
  141. package/dist/CalendarView/constants.js +0 -19
  142. package/dist/CalendarView/index.js +0 -83
  143. package/dist/CalendarView/utils.js +0 -50
  144. package/dist/Codeblock/index.js +0 -30
  145. package/dist/Columns/utils.js +0 -20
  146. package/dist/ConfirmationModal/constants.js +0 -3
  147. package/dist/ConfirmationModal/utils.js +0 -6
  148. package/dist/Container/container.scss +0 -21
  149. package/dist/Container/index.js +0 -23
  150. package/dist/CopyToClipboardButton/constants.js +0 -13
  151. package/dist/CopyToClipboardButton/copyToClipboard.scss +0 -22
  152. package/dist/CopyToClipboardButton/index.js +0 -59
  153. package/dist/CustomDomain/index.js +0 -98
  154. package/dist/CustomDomainDashboard/DeleteAlert.js +0 -28
  155. package/dist/CustomDomainDashboard/Header.js +0 -32
  156. package/dist/CustomDomainDashboard/Manage/Record.js +0 -42
  157. package/dist/CustomDomainDashboard/Manage/StatusInfo.js +0 -21
  158. package/dist/CustomDomainDashboard/Manage/TagBlock.js +0 -36
  159. package/dist/CustomDomainDashboard/Manage/constants.js +0 -4
  160. package/dist/CustomDomainDashboard/Manage/index.js +0 -125
  161. package/dist/CustomDomainDashboard/Manage/utils.js +0 -8
  162. package/dist/CustomDomainDashboard/api.js +0 -35
  163. package/dist/CustomDomainDashboard/constants.js +0 -2
  164. package/dist/CustomDomainDashboard/index.js +0 -118
  165. package/dist/CustomDomainDashboard/useCustomDomainApi.js +0 -71
  166. package/dist/CustomDomainDashboard/utils.js +0 -84
  167. package/dist/DateRangeFilter/index.js +0 -60
  168. package/dist/DateRangeFilter/utils.js +0 -113
  169. package/dist/DynamicVariables/dynamic-variables.scss +0 -34
  170. package/dist/DynamicVariables/index.js +0 -59
  171. package/dist/DynamicVariables/utils.js +0 -37
  172. package/dist/EmailForm/EmailForm.js +0 -98
  173. package/dist/EmailForm/EmailFormProvider.js +0 -45
  174. package/dist/EmailForm/EmailPreview.js +0 -129
  175. package/dist/EmailForm/ReplyToField.js +0 -55
  176. package/dist/EmailForm/SendToField.js +0 -28
  177. package/dist/EmailForm/SubjectField.js +0 -64
  178. package/dist/EmailForm/constants.js +0 -33
  179. package/dist/EmailForm/contexts/EmailForm.js +0 -7
  180. package/dist/EmailForm/index.js +0 -4
  181. package/dist/EmailForm/utils.js +0 -10
  182. package/dist/EmailPreview/index.js +0 -2
  183. package/dist/ErrorPage/index.js +0 -78
  184. package/dist/Header/Breadcrumbs.js +0 -31
  185. package/dist/Header/Dropdown.js +0 -12
  186. package/dist/Header/constants.js +0 -6
  187. package/dist/Header/header.scss +0 -121
  188. package/dist/Header/index.js +0 -61
  189. package/dist/IconPicker/Icon.js +0 -34
  190. package/dist/IconPicker/NoResults.js +0 -12
  191. package/dist/IconPicker/constants.js +0 -8
  192. package/dist/IconPicker/icon-picker.scss +0 -1
  193. package/dist/IconPicker/index.js +0 -164
  194. package/dist/ImageWithFallback/ImagePlaceholder.js +0 -16
  195. package/dist/ImageWithFallback/index.js +0 -31
  196. package/dist/IntegrationCard/Dropdown.js +0 -45
  197. package/dist/IntegrationCard/Status.js +0 -25
  198. package/dist/IntegrationCard/index.js +0 -128
  199. package/dist/IntegrationDisconnectAlert/index.js +0 -36
  200. package/dist/IpRestriction/AllowedIpRanges.js +0 -75
  201. package/dist/IpRestriction/CurrentIp.js +0 -26
  202. package/dist/IpRestriction/FormRow.js +0 -84
  203. package/dist/IpRestriction/Row.js +0 -91
  204. package/dist/IpRestriction/apis/allowed_ip_ranges.js +0 -28
  205. package/dist/IpRestriction/apis/current_ip.js +0 -11
  206. package/dist/IpRestriction/apis/ip_restriction.js +0 -16
  207. package/dist/IpRestriction/constants.js +0 -20
  208. package/dist/IpRestriction/hooks/reactQuery/useAllowedIpRanges.js +0 -34
  209. package/dist/IpRestriction/hooks/reactQuery/useCurrentIp.js +0 -10
  210. package/dist/IpRestriction/hooks/reactQuery/useIpRestrictions.js +0 -18
  211. package/dist/IpRestriction/index.js +0 -102
  212. package/dist/IpRestriction/utils.js +0 -85
  213. package/dist/KeyboardShortcuts/Pane/HotKey.js +0 -44
  214. package/dist/KeyboardShortcuts/Pane/HotKeyList.js +0 -42
  215. package/dist/KeyboardShortcuts/Pane/constants.js +0 -25
  216. package/dist/KeyboardShortcuts/Pane/index.js +0 -61
  217. package/dist/KeyboardShortcuts/Pane/keyboard-shortcuts.scss +0 -5
  218. package/dist/KeyboardShortcuts/Pane/utils.js +0 -66
  219. package/dist/KeyboardShortcuts/hooks/useKeyboardShortcutsPaneState.js +0 -31
  220. package/dist/KeyboardShortcuts/index.js +0 -9
  221. package/dist/LoginPage/Form.js +0 -57
  222. package/dist/LoginPage/constants.js +0 -12
  223. package/dist/LoginPage/index.js +0 -103
  224. package/dist/MenuBar/AddNew.js +0 -25
  225. package/dist/MenuBar/Block.js +0 -60
  226. package/dist/MenuBar/Item.js +0 -32
  227. package/dist/MenuBar/Search.js +0 -39
  228. package/dist/MenuBar/SubTitle.js +0 -23
  229. package/dist/MenuBar/index.js +0 -46
  230. package/dist/MenuBar/menubar.scss +0 -154
  231. package/dist/Metadata/Block.js +0 -30
  232. package/dist/Metadata/DetailsBlock.js +0 -86
  233. package/dist/Metadata/constants.js +0 -9
  234. package/dist/Metadata/index.js +0 -29
  235. package/dist/Metadata/metadata.scss +0 -15
  236. package/dist/MoreDropdown/constants.js +0 -25
  237. package/dist/NavigationHeader/LeftBlock.js +0 -32
  238. package/dist/NavigationHeader/Navigation.js +0 -24
  239. package/dist/NavigationHeader/RightBlock.js +0 -68
  240. package/dist/NavigationHeader/constants.js +0 -11
  241. package/dist/NavigationHeader/index.js +0 -19
  242. package/dist/NavigationHeader/navigation-header.scss +0 -3
  243. package/dist/NeetoWidget/CodeBlock.js +0 -57
  244. package/dist/NeetoWidget/CodeSnippet.js +0 -119
  245. package/dist/NeetoWidget/EmbedCode.js +0 -281
  246. package/dist/NeetoWidget/Main.js +0 -19
  247. package/dist/NeetoWidget/SelectionSwitches/TooltipSwitch.js +0 -25
  248. package/dist/NeetoWidget/SelectionSwitches/index.js +0 -44
  249. package/dist/NeetoWidget/SyntaxHighlighter.js +0 -17
  250. package/dist/NeetoWidget/api.js +0 -20
  251. package/dist/NeetoWidget/constants.js +0 -62
  252. package/dist/NeetoWidget/hooks/useForceUpdate.js +0 -14
  253. package/dist/NeetoWidget/index.js +0 -7
  254. package/dist/NeetoWidget/mutations.js +0 -9
  255. package/dist/NeetoWidget/queries.js +0 -32
  256. package/dist/NeetoWidget/utils.js +0 -83
  257. package/dist/PageLoader/index.js +0 -81
  258. package/dist/PageLoader/page-loader.scss +0 -95
  259. package/dist/PhoneNumber/CountryPicker/SingleValue.js +0 -21
  260. package/dist/PhoneNumber/CountryPicker/constants.js +0 -26
  261. package/dist/PhoneNumber/CountryPicker/index.js +0 -59
  262. package/dist/PhoneNumber/FormikPhoneNumberInput.js +0 -21
  263. package/dist/PhoneNumber/PhoneNumber.js +0 -30
  264. package/dist/PhoneNumber/PhoneNumberInput.js +0 -79
  265. package/dist/PhoneNumber/index.js +0 -5
  266. package/dist/PhoneNumber/utils.js +0 -55
  267. package/dist/PublishBlock/AlertBlock.js +0 -14
  268. package/dist/PublishBlock/index.js +0 -100
  269. package/dist/PublishBlock/publish-block.scss +0 -25
  270. package/dist/Rename/DummySpan.js +0 -21
  271. package/dist/Rename/constants.js +0 -1
  272. package/dist/Rename/index.js +0 -191
  273. package/dist/Rename/rename.scss +0 -69
  274. package/dist/Rename/utils.js +0 -10
  275. package/dist/ResponsiveDevicePicker/constants.js +0 -19
  276. package/dist/ResponsiveDevicePicker/index.js +0 -36
  277. package/dist/Schedule/DisplayAvailability.js +0 -58
  278. package/dist/Schedule/Fields.js +0 -43
  279. package/dist/Schedule/Form/ScheduleRow.js +0 -125
  280. package/dist/Schedule/Form/constants.js +0 -20
  281. package/dist/Schedule/Form/index.js +0 -144
  282. package/dist/Schedule/Form/utils.js +0 -63
  283. package/dist/Schedule/Header.js +0 -76
  284. package/dist/Schedule/ScheduleContext.js +0 -8
  285. package/dist/Schedule/constants.js +0 -8
  286. package/dist/Schedule/dayjsExtended/constants.js +0 -1
  287. package/dist/Schedule/dayjsExtended/index.js +0 -14
  288. package/dist/Schedule/dayjsExtended/range.js +0 -73
  289. package/dist/Schedule/index.js +0 -80
  290. package/dist/Schedule/utils.js +0 -152
  291. package/dist/Scrollable/constants.js +0 -8
  292. package/dist/Scrollable/index.js +0 -26
  293. package/dist/Scrollable/scrollable.scss +0 -32
  294. package/dist/Search/index.js +0 -52
  295. package/dist/Security/AllowedKeywords/Add.js +0 -38
  296. package/dist/Security/AllowedKeywords/index.js +0 -38
  297. package/dist/Security/PasswordBlock.js +0 -31
  298. package/dist/Security/RadioBlock.js +0 -38
  299. package/dist/Security/api.js +0 -12
  300. package/dist/Security/constants.js +0 -58
  301. package/dist/Security/index.js +0 -68
  302. package/dist/Security/useSecurityApi.js +0 -22
  303. package/dist/Security/utils.js +0 -31
  304. package/dist/SendToFields/FilePicker.js +0 -34
  305. package/dist/SendToFields/constants.js +0 -6
  306. package/dist/SendToFields/index.js +0 -102
  307. package/dist/SendToFields/utils.js +0 -54
  308. package/dist/Settings/Category.js +0 -30
  309. package/dist/Settings/Item.js +0 -38
  310. package/dist/Settings/index.js +0 -37
  311. package/dist/Settings/utils.js +0 -4
  312. package/dist/ShareViaEmail/EmailBodyEditor.js +0 -22
  313. package/dist/ShareViaEmail/FilePicker.js +0 -43
  314. package/dist/ShareViaEmail/Form.js +0 -105
  315. package/dist/ShareViaEmail/FormikDatePicker.js +0 -24
  316. package/dist/ShareViaEmail/constants.js +0 -14
  317. package/dist/ShareViaEmail/index.js +0 -92
  318. package/dist/ShareViaEmail/utils.js +0 -72
  319. package/dist/ShareViaLink/EditURL.js +0 -74
  320. package/dist/ShareViaLink/Link.js +0 -105
  321. package/dist/ShareViaLink/QRCode.js +0 -41
  322. package/dist/ShareViaLink/RegenerateURL.js +0 -47
  323. package/dist/ShareViaLink/SocialMedia.js +0 -52
  324. package/dist/ShareViaLink/constants.js +0 -25
  325. package/dist/ShareViaLink/edit-url.scss +0 -8
  326. package/dist/ShareViaLink/index.js +0 -46
  327. package/dist/ShareViaLink/utils.js +0 -47
  328. package/dist/Sidebar/AppSwitcher/AppLink.js +0 -45
  329. package/dist/Sidebar/AppSwitcher/Backdrop.js +0 -13
  330. package/dist/Sidebar/AppSwitcher/Body.js +0 -65
  331. package/dist/Sidebar/AppSwitcher/Portal.js +0 -27
  332. package/dist/Sidebar/AppSwitcher/appswitcher.scss +0 -164
  333. package/dist/Sidebar/AppSwitcher/index.js +0 -47
  334. package/dist/Sidebar/AppSwitcher/utils.js +0 -25
  335. package/dist/Sidebar/Chevron.js +0 -14
  336. package/dist/Sidebar/FeaturedTooltip.js +0 -19
  337. package/dist/Sidebar/Footer/AppSwitcherButton.js +0 -48
  338. package/dist/Sidebar/Footer/ProfileButton.js +0 -30
  339. package/dist/Sidebar/Footer/index.js +0 -56
  340. package/dist/Sidebar/Footer/utils.js +0 -39
  341. package/dist/Sidebar/Header.js +0 -33
  342. package/dist/Sidebar/HelpSection/HelpSectionMenu.js +0 -52
  343. package/dist/Sidebar/HelpSection/index.js +0 -32
  344. package/dist/Sidebar/Links.js +0 -112
  345. package/dist/Sidebar/NavIconWrapper.js +0 -20
  346. package/dist/Sidebar/ProfileSection/LinkSection.js +0 -36
  347. package/dist/Sidebar/ProfileSection/ProfileMenu.js +0 -48
  348. package/dist/Sidebar/ProfileSection/index.js +0 -42
  349. package/dist/Sidebar/constants.js +0 -40
  350. package/dist/Sidebar/index.js +0 -94
  351. package/dist/Sidebar/sidebar.scss +0 -379
  352. package/dist/Sidebar/utils.js +0 -18
  353. package/dist/SubHeader/RightBlock/Columns.js +0 -35
  354. package/dist/SubHeader/RightBlock/Download.js +0 -28
  355. package/dist/SubHeader/RightBlock/Filter.js +0 -31
  356. package/dist/SubHeader/RightBlock/index.js +0 -21
  357. package/dist/SubHeader/RightBlock/utils.js +0 -13
  358. package/dist/SubHeader/index.js +0 -28
  359. package/dist/SubHeader/subheader.scss +0 -78
  360. package/dist/ThemeSidebar/Customize/Logo.js +0 -39
  361. package/dist/ThemeSidebar/Customize/Properties.js +0 -170
  362. package/dist/ThemeSidebar/Customize/index.js +0 -66
  363. package/dist/ThemeSidebar/Themes/ThemeCard.js +0 -135
  364. package/dist/ThemeSidebar/Themes/index.js +0 -110
  365. package/dist/ThemeSidebar/TitleBar.js +0 -62
  366. package/dist/ThemeSidebar/constants.js +0 -127
  367. package/dist/ThemeSidebar/fields/AlignmentBlock.js +0 -50
  368. package/dist/ThemeSidebar/fields/Card.js +0 -19
  369. package/dist/ThemeSidebar/fields/ColorBlock.js +0 -19
  370. package/dist/ThemeSidebar/fields/FontPickerBlock.js +0 -35
  371. package/dist/ThemeSidebar/fields/ImageBlock/ImageUploader.js +0 -67
  372. package/dist/ThemeSidebar/fields/ImageBlock/ProgressBar.js +0 -22
  373. package/dist/ThemeSidebar/fields/ImageBlock/index.js +0 -55
  374. package/dist/ThemeSidebar/fields/SelectBlock.js +0 -24
  375. package/dist/ThemeSidebar/fields/SliderBlock.js +0 -30
  376. package/dist/ThemeSidebar/fields/SwitchBlock.js +0 -17
  377. package/dist/ThemeSidebar/fields/TextBlock.js +0 -13
  378. package/dist/ThemeSidebar/fields/slider.scss +0 -199
  379. package/dist/ThemeSidebar/hooks/useDirectUploadDropzone.js +0 -149
  380. package/dist/ThemeSidebar/index.js +0 -118
  381. package/dist/ThemeSidebar/themeSidebar.scss +0 -45
  382. package/dist/ThemeSidebar/utils.js +0 -169
  383. package/dist/TimeFormat/index.js +0 -3
  384. package/dist/TimezoneMismatchModal/apis/time_zone.js +0 -9
  385. package/dist/TimezoneMismatchModal/index.js +0 -83
  386. package/dist/TimezoneMismatchModal/useTimeZoneApi.js +0 -10
  387. package/dist/TimezoneMismatchModal/utils.js +0 -12
  388. package/dist/ToggleFeatureCard/ToolTipSwitch.js +0 -31
  389. package/dist/ToggleFeatureCard/constants.js +0 -5
  390. package/dist/ToggleFeatureCard/hooks/useScrollIntoView.js +0 -11
  391. package/dist/ToggleFeatureCard/index.js +0 -148
  392. package/dist/ToggleFeatureCard/toggleFeatureCard.scss +0 -4
@@ -0,0 +1,601 @@
1
+ import React, { useRef } from 'react';
2
+ import { useFormikContext } from 'formik';
3
+ import { Upload } from '@bigbinary/neeto-icons';
4
+ import { Toastr, Button } from '@bigbinary/neetoui';
5
+ import { MultiEmailInput } from '@bigbinary/neetoui/formik';
6
+ import { useTranslation } from 'react-i18next';
7
+ import { t } from 'i18next';
8
+ import Papa from 'papaparse';
9
+ import { prop } from 'ramda';
10
+ import { string } from 'yup';
11
+
12
+ function _extends() {
13
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
14
+ for (var i = 1; i < arguments.length; i++) {
15
+ var source = arguments[i];
16
+ for (var key in source) {
17
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
18
+ target[key] = source[key];
19
+ }
20
+ }
21
+ }
22
+ return target;
23
+ };
24
+ return _extends.apply(this, arguments);
25
+ }
26
+
27
+ function _arrayLikeToArray(arr, len) {
28
+ if (len == null || len > arr.length) len = arr.length;
29
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
30
+ return arr2;
31
+ }
32
+
33
+ function _arrayWithoutHoles(arr) {
34
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
35
+ }
36
+
37
+ function _iterableToArray(iter) {
38
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
39
+ }
40
+
41
+ function _unsupportedIterableToArray(o, minLen) {
42
+ if (!o) return;
43
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
44
+ var n = Object.prototype.toString.call(o).slice(8, -1);
45
+ if (n === "Object" && o.constructor) n = o.constructor.name;
46
+ if (n === "Map" || n === "Set") return Array.from(o);
47
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
48
+ }
49
+
50
+ function _nonIterableSpread() {
51
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
52
+ }
53
+
54
+ function _toConsumableArray(arr) {
55
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
56
+ }
57
+
58
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
59
+ try {
60
+ var info = gen[key](arg);
61
+ var value = info.value;
62
+ } catch (error) {
63
+ reject(error);
64
+ return;
65
+ }
66
+ if (info.done) {
67
+ resolve(value);
68
+ } else {
69
+ Promise.resolve(value).then(_next, _throw);
70
+ }
71
+ }
72
+ function _asyncToGenerator(fn) {
73
+ return function () {
74
+ var self = this,
75
+ args = arguments;
76
+ return new Promise(function (resolve, reject) {
77
+ var gen = fn.apply(self, args);
78
+ function _next(value) {
79
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
80
+ }
81
+ function _throw(err) {
82
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
83
+ }
84
+ _next(undefined);
85
+ });
86
+ };
87
+ }
88
+
89
+ var regeneratorRuntime$1 = {exports: {}};
90
+
91
+ var _typeof = {exports: {}};
92
+
93
+ (function (module) {
94
+ function _typeof(obj) {
95
+ "@babel/helpers - typeof";
96
+
97
+ return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
98
+ return typeof obj;
99
+ } : function (obj) {
100
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
101
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
102
+ }
103
+ module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
104
+ } (_typeof));
105
+
106
+ (function (module) {
107
+ var _typeof$1 = _typeof.exports["default"];
108
+ function _regeneratorRuntime() {
109
+ module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
110
+ return exports;
111
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports;
112
+ var exports = {},
113
+ Op = Object.prototype,
114
+ hasOwn = Op.hasOwnProperty,
115
+ defineProperty = Object.defineProperty || function (obj, key, desc) {
116
+ obj[key] = desc.value;
117
+ },
118
+ $Symbol = "function" == typeof Symbol ? Symbol : {},
119
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
120
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
121
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
122
+ function define(obj, key, value) {
123
+ return Object.defineProperty(obj, key, {
124
+ value: value,
125
+ enumerable: !0,
126
+ configurable: !0,
127
+ writable: !0
128
+ }), obj[key];
129
+ }
130
+ try {
131
+ define({}, "");
132
+ } catch (err) {
133
+ define = function define(obj, key, value) {
134
+ return obj[key] = value;
135
+ };
136
+ }
137
+ function wrap(innerFn, outerFn, self, tryLocsList) {
138
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
139
+ generator = Object.create(protoGenerator.prototype),
140
+ context = new Context(tryLocsList || []);
141
+ return defineProperty(generator, "_invoke", {
142
+ value: makeInvokeMethod(innerFn, self, context)
143
+ }), generator;
144
+ }
145
+ function tryCatch(fn, obj, arg) {
146
+ try {
147
+ return {
148
+ type: "normal",
149
+ arg: fn.call(obj, arg)
150
+ };
151
+ } catch (err) {
152
+ return {
153
+ type: "throw",
154
+ arg: err
155
+ };
156
+ }
157
+ }
158
+ exports.wrap = wrap;
159
+ var ContinueSentinel = {};
160
+ function Generator() {}
161
+ function GeneratorFunction() {}
162
+ function GeneratorFunctionPrototype() {}
163
+ var IteratorPrototype = {};
164
+ define(IteratorPrototype, iteratorSymbol, function () {
165
+ return this;
166
+ });
167
+ var getProto = Object.getPrototypeOf,
168
+ NativeIteratorPrototype = getProto && getProto(getProto(values([])));
169
+ NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
170
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
171
+ function defineIteratorMethods(prototype) {
172
+ ["next", "throw", "return"].forEach(function (method) {
173
+ define(prototype, method, function (arg) {
174
+ return this._invoke(method, arg);
175
+ });
176
+ });
177
+ }
178
+ function AsyncIterator(generator, PromiseImpl) {
179
+ function invoke(method, arg, resolve, reject) {
180
+ var record = tryCatch(generator[method], generator, arg);
181
+ if ("throw" !== record.type) {
182
+ var result = record.arg,
183
+ value = result.value;
184
+ return value && "object" == _typeof$1(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
185
+ invoke("next", value, resolve, reject);
186
+ }, function (err) {
187
+ invoke("throw", err, resolve, reject);
188
+ }) : PromiseImpl.resolve(value).then(function (unwrapped) {
189
+ result.value = unwrapped, resolve(result);
190
+ }, function (error) {
191
+ return invoke("throw", error, resolve, reject);
192
+ });
193
+ }
194
+ reject(record.arg);
195
+ }
196
+ var previousPromise;
197
+ defineProperty(this, "_invoke", {
198
+ value: function value(method, arg) {
199
+ function callInvokeWithMethodAndArg() {
200
+ return new PromiseImpl(function (resolve, reject) {
201
+ invoke(method, arg, resolve, reject);
202
+ });
203
+ }
204
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
205
+ }
206
+ });
207
+ }
208
+ function makeInvokeMethod(innerFn, self, context) {
209
+ var state = "suspendedStart";
210
+ return function (method, arg) {
211
+ if ("executing" === state) throw new Error("Generator is already running");
212
+ if ("completed" === state) {
213
+ if ("throw" === method) throw arg;
214
+ return doneResult();
215
+ }
216
+ for (context.method = method, context.arg = arg;;) {
217
+ var delegate = context.delegate;
218
+ if (delegate) {
219
+ var delegateResult = maybeInvokeDelegate(delegate, context);
220
+ if (delegateResult) {
221
+ if (delegateResult === ContinueSentinel) continue;
222
+ return delegateResult;
223
+ }
224
+ }
225
+ if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
226
+ if ("suspendedStart" === state) throw state = "completed", context.arg;
227
+ context.dispatchException(context.arg);
228
+ } else "return" === context.method && context.abrupt("return", context.arg);
229
+ state = "executing";
230
+ var record = tryCatch(innerFn, self, context);
231
+ if ("normal" === record.type) {
232
+ if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
233
+ return {
234
+ value: record.arg,
235
+ done: context.done
236
+ };
237
+ }
238
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
239
+ }
240
+ };
241
+ }
242
+ function maybeInvokeDelegate(delegate, context) {
243
+ var methodName = context.method,
244
+ method = delegate.iterator[methodName];
245
+ if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
246
+ var record = tryCatch(method, delegate.iterator, context.arg);
247
+ if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
248
+ var info = record.arg;
249
+ return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
250
+ }
251
+ function pushTryEntry(locs) {
252
+ var entry = {
253
+ tryLoc: locs[0]
254
+ };
255
+ 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
256
+ }
257
+ function resetTryEntry(entry) {
258
+ var record = entry.completion || {};
259
+ record.type = "normal", delete record.arg, entry.completion = record;
260
+ }
261
+ function Context(tryLocsList) {
262
+ this.tryEntries = [{
263
+ tryLoc: "root"
264
+ }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
265
+ }
266
+ function values(iterable) {
267
+ if (iterable) {
268
+ var iteratorMethod = iterable[iteratorSymbol];
269
+ if (iteratorMethod) return iteratorMethod.call(iterable);
270
+ if ("function" == typeof iterable.next) return iterable;
271
+ if (!isNaN(iterable.length)) {
272
+ var i = -1,
273
+ next = function next() {
274
+ for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
275
+ return next.value = undefined, next.done = !0, next;
276
+ };
277
+ return next.next = next;
278
+ }
279
+ }
280
+ return {
281
+ next: doneResult
282
+ };
283
+ }
284
+ function doneResult() {
285
+ return {
286
+ value: undefined,
287
+ done: !0
288
+ };
289
+ }
290
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
291
+ value: GeneratorFunctionPrototype,
292
+ configurable: !0
293
+ }), defineProperty(GeneratorFunctionPrototype, "constructor", {
294
+ value: GeneratorFunction,
295
+ configurable: !0
296
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
297
+ var ctor = "function" == typeof genFun && genFun.constructor;
298
+ return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
299
+ }, exports.mark = function (genFun) {
300
+ return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
301
+ }, exports.awrap = function (arg) {
302
+ return {
303
+ __await: arg
304
+ };
305
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
306
+ return this;
307
+ }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
308
+ void 0 === PromiseImpl && (PromiseImpl = Promise);
309
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
310
+ return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
311
+ return result.done ? result.value : iter.next();
312
+ });
313
+ }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
314
+ return this;
315
+ }), define(Gp, "toString", function () {
316
+ return "[object Generator]";
317
+ }), exports.keys = function (val) {
318
+ var object = Object(val),
319
+ keys = [];
320
+ for (var key in object) keys.push(key);
321
+ return keys.reverse(), function next() {
322
+ for (; keys.length;) {
323
+ var key = keys.pop();
324
+ if (key in object) return next.value = key, next.done = !1, next;
325
+ }
326
+ return next.done = !0, next;
327
+ };
328
+ }, exports.values = values, Context.prototype = {
329
+ constructor: Context,
330
+ reset: function reset(skipTempReset) {
331
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
332
+ },
333
+ stop: function stop() {
334
+ this.done = !0;
335
+ var rootRecord = this.tryEntries[0].completion;
336
+ if ("throw" === rootRecord.type) throw rootRecord.arg;
337
+ return this.rval;
338
+ },
339
+ dispatchException: function dispatchException(exception) {
340
+ if (this.done) throw exception;
341
+ var context = this;
342
+ function handle(loc, caught) {
343
+ return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
344
+ }
345
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
346
+ var entry = this.tryEntries[i],
347
+ record = entry.completion;
348
+ if ("root" === entry.tryLoc) return handle("end");
349
+ if (entry.tryLoc <= this.prev) {
350
+ var hasCatch = hasOwn.call(entry, "catchLoc"),
351
+ hasFinally = hasOwn.call(entry, "finallyLoc");
352
+ if (hasCatch && hasFinally) {
353
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
354
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
355
+ } else if (hasCatch) {
356
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
357
+ } else {
358
+ if (!hasFinally) throw new Error("try statement without catch or finally");
359
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
360
+ }
361
+ }
362
+ }
363
+ },
364
+ abrupt: function abrupt(type, arg) {
365
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
366
+ var entry = this.tryEntries[i];
367
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
368
+ var finallyEntry = entry;
369
+ break;
370
+ }
371
+ }
372
+ finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
373
+ var record = finallyEntry ? finallyEntry.completion : {};
374
+ return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
375
+ },
376
+ complete: function complete(record, afterLoc) {
377
+ if ("throw" === record.type) throw record.arg;
378
+ return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
379
+ },
380
+ finish: function finish(finallyLoc) {
381
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
382
+ var entry = this.tryEntries[i];
383
+ if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
384
+ }
385
+ },
386
+ "catch": function _catch(tryLoc) {
387
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
388
+ var entry = this.tryEntries[i];
389
+ if (entry.tryLoc === tryLoc) {
390
+ var record = entry.completion;
391
+ if ("throw" === record.type) {
392
+ var thrown = record.arg;
393
+ resetTryEntry(entry);
394
+ }
395
+ return thrown;
396
+ }
397
+ }
398
+ throw new Error("illegal catch attempt");
399
+ },
400
+ delegateYield: function delegateYield(iterable, resultName, nextLoc) {
401
+ return this.delegate = {
402
+ iterator: values(iterable),
403
+ resultName: resultName,
404
+ nextLoc: nextLoc
405
+ }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
406
+ }
407
+ }, exports;
408
+ }
409
+ module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
410
+ } (regeneratorRuntime$1));
411
+
412
+ // TODO(Babel 8): Remove this file.
413
+
414
+ var runtime = regeneratorRuntime$1.exports();
415
+ var regenerator = runtime;
416
+
417
+ // Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
418
+ try {
419
+ regeneratorRuntime = runtime;
420
+ } catch (accidentalStrictMode) {
421
+ if (typeof globalThis === "object") {
422
+ globalThis.regeneratorRuntime = runtime;
423
+ } else {
424
+ Function("r", "regeneratorRuntime = r")(runtime);
425
+ }
426
+ }
427
+
428
+ var ALLOWED_FILE_PICKER_TYPES = [".csv"];
429
+
430
+ var FilePicker = function FilePicker(_ref) {
431
+ var _ref$types = _ref.types,
432
+ types = _ref$types === void 0 ? [] : _ref$types,
433
+ onChange = _ref.onChange,
434
+ children = _ref.children;
435
+ var inputRef = useRef();
436
+ var accept = types.reduce(function (acc, ext) {
437
+ return "".concat(acc, ", ").concat(ext);
438
+ }, "");
439
+ var handleInputChange = function handleInputChange(_ref2) {
440
+ var target = _ref2.target;
441
+ if (!target.files) return;
442
+ onChange(target.files);
443
+
444
+ // This will trigger handleClick when same file is uploaded again.
445
+ inputRef.current.value = "";
446
+ handleClick();
447
+ };
448
+ var handleClick = function handleClick() {
449
+ if (!inputRef.current) return;
450
+ inputRef.current.click();
451
+ };
452
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
453
+ onClick: handleClick
454
+ }, children), /*#__PURE__*/React.createElement("input", {
455
+ accept: accept,
456
+ className: "hidden",
457
+ ref: inputRef,
458
+ type: "file",
459
+ onChange: handleInputChange
460
+ }));
461
+ };
462
+
463
+ var isValidEmail = function isValidEmail(email) {
464
+ return string().email().isValidSync(email);
465
+ };
466
+ var createEmailOptions = function createEmailOptions() {
467
+ var emails = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
468
+ return emails.map(function (email) {
469
+ return {
470
+ label: email,
471
+ value: email,
472
+ valid: isValidEmail(email)
473
+ };
474
+ });
475
+ };
476
+ var parseCsvEmails = /*#__PURE__*/function () {
477
+ var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(file, onSuccess) {
478
+ return regenerator.wrap(function _callee$(_context) {
479
+ while (1) switch (_context.prev = _context.next) {
480
+ case 0:
481
+ Papa.parse(file, {
482
+ header: true,
483
+ skipEmptyLines: true,
484
+ transformHeader: function transformHeader(h) {
485
+ return h.toLowerCase().replace(/\W/g, "");
486
+ },
487
+ complete: function complete(results) {
488
+ var _results$meta$fields;
489
+ var isEmailFieldPresent = (_results$meta$fields = results.meta.fields) === null || _results$meta$fields === void 0 ? void 0 : _results$meta$fields.includes("email");
490
+ if (isEmailFieldPresent) {
491
+ var emails = results.data.filter(prop("email")).map(function (item) {
492
+ return item.email.trim();
493
+ });
494
+ onSuccess(createEmailOptions(emails));
495
+ } else {
496
+ Toastr.error(t("neetoMolecules.sendToFields.errors.invalidCsv"));
497
+ }
498
+ }
499
+ });
500
+ case 1:
501
+ case "end":
502
+ return _context.stop();
503
+ }
504
+ }, _callee);
505
+ }));
506
+ return function parseCsvEmails(_x, _x2) {
507
+ return _ref.apply(this, arguments);
508
+ };
509
+ }();
510
+
511
+ var SendToFields = function SendToFields(_ref) {
512
+ var emailInputProps = _ref.emailInputProps,
513
+ ccInputProps = _ref.ccInputProps,
514
+ bccInputProps = _ref.bccInputProps,
515
+ _ref$showUploadCsvBut = _ref.showUploadCsvButton,
516
+ showUploadCsvButton = _ref$showUploadCsvBut === void 0 ? false : _ref$showUploadCsvBut,
517
+ _ref$showCcBccButton = _ref.showCcBccButton,
518
+ showCcBccButton = _ref$showCcBccButton === void 0 ? false : _ref$showCcBccButton;
519
+ var sendToFieldRef = useRef();
520
+ var _useFormikContext = useFormikContext(),
521
+ _useFormikContext$val = _useFormikContext.values,
522
+ showCopyEmails = _useFormikContext$val.showCopyEmails,
523
+ existingSendToEmails = _useFormikContext$val[emailInputProps.name || "sendTo"],
524
+ setFieldValue = _useFormikContext.setFieldValue;
525
+ var _useTranslation = useTranslation(),
526
+ t = _useTranslation.t;
527
+ var handleCSVFile = /*#__PURE__*/function () {
528
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(files) {
529
+ var _sendToFieldRef$curre, onSuccess;
530
+ return regenerator.wrap(function _callee$(_context) {
531
+ while (1) switch (_context.prev = _context.next) {
532
+ case 0:
533
+ _context.prev = 0;
534
+ onSuccess = function onSuccess(values) {
535
+ return setFieldValue(emailInputProps.name || "sendTo", [].concat(_toConsumableArray(existingSendToEmails), _toConsumableArray(values)));
536
+ };
537
+ _context.next = 4;
538
+ return parseCsvEmails(files[0], onSuccess);
539
+ case 4:
540
+ (_sendToFieldRef$curre = sendToFieldRef.current) === null || _sendToFieldRef$curre === void 0 ? void 0 : _sendToFieldRef$curre.focus();
541
+ _context.next = 10;
542
+ break;
543
+ case 7:
544
+ _context.prev = 7;
545
+ _context.t0 = _context["catch"](0);
546
+ Toastr.error(_context.t0);
547
+ case 10:
548
+ case "end":
549
+ return _context.stop();
550
+ }
551
+ }, _callee, null, [[0, 7]]);
552
+ }));
553
+ return function handleCSVFile(_x) {
554
+ return _ref2.apply(this, arguments);
555
+ };
556
+ }();
557
+ var handelCcBccButtonClick = function handelCcBccButtonClick(e) {
558
+ e.stopPropagation();
559
+ setFieldValue("showCopyEmails", !showCopyEmails);
560
+ };
561
+ return /*#__PURE__*/React.createElement("div", {
562
+ className: "relative w-full flex-col gap-2"
563
+ }, showUploadCsvButton && /*#__PURE__*/React.createElement("div", {
564
+ className: "absolute top-0 right-1"
565
+ }, /*#__PURE__*/React.createElement(FilePicker, {
566
+ types: ALLOWED_FILE_PICKER_TYPES,
567
+ onChange: handleCSVFile
568
+ }, /*#__PURE__*/React.createElement(Button, {
569
+ "data-cy": "upload-csv-button",
570
+ icon: Upload,
571
+ label: t("neetoMolecules.emailForm.uploadCSV"),
572
+ size: "small",
573
+ style: "link",
574
+ tooltipProps: {
575
+ content: t("neetoMolecules.sendToFields.uploadCsvTooltip"),
576
+ position: "right"
577
+ }
578
+ }))), /*#__PURE__*/React.createElement(MultiEmailInput, _extends({
579
+ "data-testid": "emails",
580
+ name: "sendTo",
581
+ ref: sendToFieldRef
582
+ }, emailInputProps, {
583
+ suffix: showCcBccButton && /*#__PURE__*/React.createElement(Button, {
584
+ "data-cy": "cc-bcc-button",
585
+ "data-testid": "cc-bcc-button",
586
+ label: t("neetoMolecules.emailForm.labels.ccBcc"),
587
+ size: "small",
588
+ style: "link",
589
+ onClick: handelCcBccButtonClick
590
+ })
591
+ })), showCopyEmails && /*#__PURE__*/React.createElement("div", {
592
+ className: "mt-5 flex w-full flex-col gap-6"
593
+ }, /*#__PURE__*/React.createElement(MultiEmailInput, _extends({
594
+ name: "sendToBcc"
595
+ }, ccInputProps)), /*#__PURE__*/React.createElement(MultiEmailInput, _extends({
596
+ name: "sendToCc"
597
+ }, bccInputProps))));
598
+ };
599
+
600
+ export { SendToFields as default };
601
+ //# sourceMappingURL=SendToFields.js.map