@bigbinary/neeto-molecules 1.1.10 → 1.1.12

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 (477) hide show
  1. package/dist/AutoSaveInput/autosaveinput.scss +15 -0
  2. package/dist/AutoSaveInput/constants.js +13 -0
  3. package/dist/AutoSaveInput/index.js +124 -0
  4. package/dist/AutoSaveInput/utils.js +10 -0
  5. package/dist/Breadcrumbs/breadcrumbs.scss +33 -0
  6. package/dist/Breadcrumbs/index.js +31 -0
  7. package/dist/BrowserSupport/Callout.js +15 -0
  8. package/dist/BrowserSupport/ContactUs.js +21 -0
  9. package/dist/BrowserSupport/DownloadLink.js +17 -0
  10. package/dist/BrowserSupport/PartialSupportedBrowserVersion.js +17 -0
  11. package/dist/BrowserSupport/UnknownBrowser.js +13 -0
  12. package/dist/BrowserSupport/UnsupportedBrowser.js +24 -0
  13. package/dist/BrowserSupport/UnsupportedBrowserMessage.js +22 -0
  14. package/dist/BrowserSupport/UnsupportedBrowserVersion.js +27 -0
  15. package/dist/BrowserSupport/UnsupportedVersionMessage.js +30 -0
  16. package/dist/BrowserSupport/browsersupport.scss +71 -0
  17. package/dist/BrowserSupport/constants.js +63 -0
  18. package/dist/BrowserSupport/index.js +58 -0
  19. package/dist/BrowserSupport/utils.js +32 -0
  20. package/dist/CalendarView/CustomDatePicker.js +87 -0
  21. package/dist/CalendarView/Header.js +53 -0
  22. package/dist/CalendarView/constants.js +19 -0
  23. package/dist/CalendarView/index.js +83 -0
  24. package/dist/CalendarView/utils.js +50 -0
  25. package/dist/Codeblock/index.js +30 -0
  26. package/dist/{Columns.js → Columns/index.js} +13 -130
  27. package/dist/Columns/utils.js +20 -0
  28. package/dist/ConfirmationModal/constants.js +3 -0
  29. package/dist/{ConfirmationModal.js → ConfirmationModal/index.js} +7 -23
  30. package/dist/ConfirmationModal/utils.js +10 -0
  31. package/dist/Container/container.scss +21 -0
  32. package/dist/Container/index.js +23 -0
  33. package/dist/CopyToClipboardButton/constants.js +13 -0
  34. package/dist/CopyToClipboardButton/copyToClipboard.scss +22 -0
  35. package/dist/CopyToClipboardButton/index.js +59 -0
  36. package/dist/CustomDomain/index.js +98 -0
  37. package/dist/CustomDomainDashboard/DeleteAlert.js +28 -0
  38. package/dist/CustomDomainDashboard/Header.js +32 -0
  39. package/dist/CustomDomainDashboard/Manage/Record.js +42 -0
  40. package/dist/CustomDomainDashboard/Manage/StatusInfo.js +21 -0
  41. package/dist/CustomDomainDashboard/Manage/TagBlock.js +36 -0
  42. package/dist/CustomDomainDashboard/Manage/constants.js +4 -0
  43. package/dist/CustomDomainDashboard/Manage/index.js +124 -0
  44. package/dist/CustomDomainDashboard/Manage/utils.js +8 -0
  45. package/dist/CustomDomainDashboard/api.js +35 -0
  46. package/dist/CustomDomainDashboard/constants.js +2 -0
  47. package/dist/CustomDomainDashboard/index.js +118 -0
  48. package/dist/CustomDomainDashboard/useCustomDomainApi.js +71 -0
  49. package/dist/CustomDomainDashboard/utils.js +84 -0
  50. package/dist/{DateFormat.js → DateFormat/index.js} +8 -25
  51. package/dist/DateRangeFilter/index.js +60 -0
  52. package/dist/DateRangeFilter/utils.js +113 -0
  53. package/dist/DynamicVariables/dynamic-variables.scss +34 -0
  54. package/dist/DynamicVariables/index.js +59 -0
  55. package/dist/DynamicVariables/utils.js +37 -0
  56. package/dist/EmailForm/EmailForm.js +97 -0
  57. package/dist/EmailForm/EmailFormProvider.js +45 -0
  58. package/dist/EmailForm/EmailPreview.js +129 -0
  59. package/dist/EmailForm/ReplyToField.js +55 -0
  60. package/dist/EmailForm/SendToField.js +27 -0
  61. package/dist/EmailForm/SubjectField.js +64 -0
  62. package/dist/EmailForm/constants.js +33 -0
  63. package/dist/EmailForm/contexts/EmailForm.js +7 -0
  64. package/dist/EmailForm/index.js +4 -0
  65. package/dist/EmailForm/utils.js +10 -0
  66. package/dist/EmailPreview/index.js +2 -0
  67. package/dist/{ErrorPage.js → ErrorPage/constants.js} +36 -175
  68. package/dist/ErrorPage/index.js +78 -0
  69. package/dist/Header/Breadcrumbs.js +31 -0
  70. package/dist/Header/Dropdown.js +12 -0
  71. package/dist/Header/constants.js +6 -0
  72. package/dist/Header/header.scss +121 -0
  73. package/dist/Header/index.js +61 -0
  74. package/dist/IconPicker/Icon.js +34 -0
  75. package/dist/IconPicker/NoResults.js +12 -0
  76. package/dist/IconPicker/constants.js +8 -0
  77. package/dist/IconPicker/icon-picker.scss +1 -0
  78. package/dist/IconPicker/index.js +164 -0
  79. package/dist/ImageWithFallback/ImagePlaceholder.js +16 -0
  80. package/dist/ImageWithFallback/index.js +31 -0
  81. package/dist/IntegrationCard/Dropdown.js +45 -0
  82. package/dist/IntegrationCard/Status.js +25 -0
  83. package/dist/IntegrationCard/index.js +128 -0
  84. package/dist/IntegrationDisconnectAlert/index.js +36 -0
  85. package/dist/{IntegrationWalkthroughModal.js → IntegrationWalkthroughModal/index.js} +6 -8
  86. package/dist/IpRestriction/AllowedIpRanges.js +75 -0
  87. package/dist/IpRestriction/CurrentIp.js +26 -0
  88. package/dist/IpRestriction/FormRow.js +84 -0
  89. package/dist/IpRestriction/Row.js +91 -0
  90. package/dist/IpRestriction/apis/allowed_ip_ranges.js +28 -0
  91. package/dist/IpRestriction/apis/current_ip.js +11 -0
  92. package/dist/IpRestriction/apis/ip_restriction.js +16 -0
  93. package/dist/IpRestriction/constants.js +20 -0
  94. package/dist/IpRestriction/hooks/reactQuery/useAllowedIpRanges.js +34 -0
  95. package/dist/IpRestriction/hooks/reactQuery/useCurrentIp.js +10 -0
  96. package/dist/IpRestriction/hooks/reactQuery/useIpRestrictions.js +18 -0
  97. package/dist/IpRestriction/index.js +102 -0
  98. package/dist/IpRestriction/utils.js +85 -0
  99. package/dist/KeyboardShortcuts/Pane/HotKey.js +44 -0
  100. package/dist/KeyboardShortcuts/Pane/HotKeyList.js +42 -0
  101. package/dist/KeyboardShortcuts/Pane/constants.js +25 -0
  102. package/dist/KeyboardShortcuts/Pane/index.js +61 -0
  103. package/dist/KeyboardShortcuts/Pane/keyboard-shortcuts.scss +5 -0
  104. package/dist/KeyboardShortcuts/Pane/utils.js +66 -0
  105. package/dist/KeyboardShortcuts/hooks/useKeyboardShortcutsPaneState.js +31 -0
  106. package/dist/KeyboardShortcuts/index.js +9 -0
  107. package/dist/LoginPage/Form.js +57 -0
  108. package/dist/LoginPage/constants.js +12 -0
  109. package/dist/LoginPage/index.js +103 -0
  110. package/dist/MenuBar/AddNew.js +25 -0
  111. package/dist/MenuBar/Block.js +60 -0
  112. package/dist/MenuBar/Item.js +32 -0
  113. package/dist/MenuBar/Search.js +39 -0
  114. package/dist/MenuBar/SubTitle.js +23 -0
  115. package/dist/MenuBar/index.js +46 -0
  116. package/dist/MenuBar/menubar.scss +154 -0
  117. package/dist/Metadata/Block.js +30 -0
  118. package/dist/Metadata/DetailsBlock.js +86 -0
  119. package/dist/Metadata/constants.js +9 -0
  120. package/dist/Metadata/index.js +29 -0
  121. package/dist/Metadata/metadata.scss +15 -0
  122. package/dist/MoreDropdown/constants.js +25 -0
  123. package/dist/{MoreDropdown.js → MoreDropdown/index.js} +9 -102
  124. package/dist/NavigationHeader/LeftBlock.js +32 -0
  125. package/dist/NavigationHeader/Navigation.js +24 -0
  126. package/dist/NavigationHeader/RightBlock.js +68 -0
  127. package/dist/NavigationHeader/constants.js +11 -0
  128. package/dist/NavigationHeader/index.js +19 -0
  129. package/dist/NavigationHeader/navigation-header.scss +3 -0
  130. package/dist/NeetoWidget/CodeBlock.js +57 -0
  131. package/dist/NeetoWidget/CodeSnippet.js +119 -0
  132. package/dist/NeetoWidget/EmbedCode.js +281 -0
  133. package/dist/NeetoWidget/Main.js +19 -0
  134. package/dist/NeetoWidget/SelectionSwitches/TooltipSwitch.js +25 -0
  135. package/dist/NeetoWidget/SelectionSwitches/index.js +44 -0
  136. package/dist/NeetoWidget/SyntaxHighlighter.js +17 -0
  137. package/dist/NeetoWidget/api.js +20 -0
  138. package/dist/NeetoWidget/constants.js +62 -0
  139. package/dist/NeetoWidget/hooks/useForceUpdate.js +14 -0
  140. package/dist/NeetoWidget/index.js +7 -0
  141. package/dist/NeetoWidget/mutations.js +9 -0
  142. package/dist/NeetoWidget/queries.js +32 -0
  143. package/dist/NeetoWidget/utils.js +83 -0
  144. package/dist/PageLoader/index.js +81 -0
  145. package/dist/PageLoader/page-loader.scss +95 -0
  146. package/dist/PhoneNumber/CountryPicker/SingleValue.js +21 -0
  147. package/dist/PhoneNumber/CountryPicker/constants.js +26 -0
  148. package/dist/PhoneNumber/CountryPicker/index.js +59 -0
  149. package/dist/PhoneNumber/FormikPhoneNumberInput.js +21 -0
  150. package/dist/PhoneNumber/PhoneNumber.js +30 -0
  151. package/dist/PhoneNumber/PhoneNumberInput.js +79 -0
  152. package/dist/PhoneNumber/index.js +5 -0
  153. package/dist/PhoneNumber/utils.js +55 -0
  154. package/dist/PublishBlock/AlertBlock.js +14 -0
  155. package/dist/PublishBlock/index.js +100 -0
  156. package/dist/PublishBlock/publish-block.scss +25 -0
  157. package/dist/Rename/DummySpan.js +21 -0
  158. package/dist/Rename/constants.js +1 -0
  159. package/dist/Rename/index.js +191 -0
  160. package/dist/Rename/rename.scss +69 -0
  161. package/dist/Rename/utils.js +10 -0
  162. package/dist/ResponsiveDevicePicker/constants.js +19 -0
  163. package/dist/ResponsiveDevicePicker/index.js +36 -0
  164. package/dist/Schedule/DisplayAvailability.js +58 -0
  165. package/dist/Schedule/Fields.js +43 -0
  166. package/dist/Schedule/Form/ScheduleRow.js +125 -0
  167. package/dist/Schedule/Form/constants.js +20 -0
  168. package/dist/Schedule/Form/index.js +144 -0
  169. package/dist/Schedule/Form/utils.js +63 -0
  170. package/dist/Schedule/Header.js +76 -0
  171. package/dist/Schedule/ScheduleContext.js +8 -0
  172. package/dist/Schedule/constants.js +8 -0
  173. package/dist/Schedule/dayjsExtended/constants.js +1 -0
  174. package/dist/Schedule/dayjsExtended/index.js +14 -0
  175. package/dist/Schedule/dayjsExtended/range.js +73 -0
  176. package/dist/Schedule/index.js +80 -0
  177. package/dist/Schedule/utils.js +152 -0
  178. package/dist/Scrollable/constants.js +8 -0
  179. package/dist/Scrollable/index.js +26 -0
  180. package/dist/Scrollable/scrollable.scss +32 -0
  181. package/dist/Search/index.js +52 -0
  182. package/dist/Security/AllowedKeywords/Add.js +38 -0
  183. package/dist/Security/AllowedKeywords/index.js +38 -0
  184. package/dist/Security/PasswordBlock.js +31 -0
  185. package/dist/Security/RadioBlock.js +38 -0
  186. package/dist/Security/api.js +12 -0
  187. package/dist/Security/constants.js +58 -0
  188. package/dist/Security/index.js +68 -0
  189. package/dist/Security/useSecurityApi.js +22 -0
  190. package/dist/Security/utils.js +31 -0
  191. package/dist/SendToFields/FilePicker.js +34 -0
  192. package/dist/SendToFields/constants.js +6 -0
  193. package/dist/SendToFields/index.js +102 -0
  194. package/dist/SendToFields/utils.js +54 -0
  195. package/dist/Settings/Category.js +30 -0
  196. package/dist/Settings/Item.js +38 -0
  197. package/dist/Settings/index.js +37 -0
  198. package/dist/Settings/utils.js +4 -0
  199. package/dist/ShareViaEmail/EmailBodyEditor.js +22 -0
  200. package/dist/ShareViaEmail/FilePicker.js +43 -0
  201. package/dist/ShareViaEmail/Form.js +101 -0
  202. package/dist/ShareViaEmail/FormikDatePicker.js +24 -0
  203. package/dist/ShareViaEmail/constants.js +14 -0
  204. package/dist/ShareViaEmail/index.js +89 -0
  205. package/dist/ShareViaEmail/utils.js +72 -0
  206. package/dist/ShareViaLink/EditURL.js +74 -0
  207. package/dist/ShareViaLink/Link.js +105 -0
  208. package/dist/ShareViaLink/QRCode.js +41 -0
  209. package/dist/ShareViaLink/RegenerateURL.js +47 -0
  210. package/dist/ShareViaLink/SocialMedia.js +52 -0
  211. package/dist/ShareViaLink/constants.js +25 -0
  212. package/dist/ShareViaLink/edit-url.scss +8 -0
  213. package/dist/ShareViaLink/index.js +46 -0
  214. package/dist/ShareViaLink/utils.js +47 -0
  215. package/dist/Sidebar/AppSwitcher/AppLink.js +45 -0
  216. package/dist/Sidebar/AppSwitcher/Backdrop.js +13 -0
  217. package/dist/Sidebar/AppSwitcher/Body.js +65 -0
  218. package/dist/Sidebar/AppSwitcher/Portal.js +27 -0
  219. package/dist/Sidebar/AppSwitcher/appswitcher.scss +164 -0
  220. package/dist/Sidebar/AppSwitcher/index.js +47 -0
  221. package/dist/Sidebar/AppSwitcher/utils.js +25 -0
  222. package/dist/Sidebar/Chevron.js +14 -0
  223. package/dist/Sidebar/FeaturedTooltip.js +19 -0
  224. package/dist/Sidebar/Footer/AppSwitcherButton.js +48 -0
  225. package/dist/Sidebar/Footer/ProfileButton.js +30 -0
  226. package/dist/Sidebar/Footer/index.js +56 -0
  227. package/dist/Sidebar/Footer/utils.js +39 -0
  228. package/dist/Sidebar/Header.js +33 -0
  229. package/dist/Sidebar/HelpSection/HelpSectionMenu.js +52 -0
  230. package/dist/Sidebar/HelpSection/index.js +32 -0
  231. package/dist/Sidebar/Links.js +112 -0
  232. package/dist/Sidebar/NavIconWrapper.js +20 -0
  233. package/dist/Sidebar/ProfileSection/LinkSection.js +36 -0
  234. package/dist/Sidebar/ProfileSection/ProfileMenu.js +48 -0
  235. package/dist/Sidebar/ProfileSection/index.js +42 -0
  236. package/dist/Sidebar/constants.js +40 -0
  237. package/dist/Sidebar/index.js +94 -0
  238. package/dist/Sidebar/sidebar.scss +379 -0
  239. package/dist/Sidebar/utils.js +18 -0
  240. package/dist/SubHeader/RightBlock/Columns.js +35 -0
  241. package/dist/SubHeader/RightBlock/Download.js +28 -0
  242. package/dist/SubHeader/RightBlock/Filter.js +31 -0
  243. package/dist/SubHeader/RightBlock/index.js +21 -0
  244. package/dist/SubHeader/RightBlock/utils.js +13 -0
  245. package/dist/SubHeader/index.js +28 -0
  246. package/dist/SubHeader/subheader.scss +78 -0
  247. package/dist/TableWrapper/index.js +18 -0
  248. package/dist/ThemeSidebar/Customize/Logo.js +39 -0
  249. package/dist/ThemeSidebar/Customize/Properties.js +170 -0
  250. package/dist/ThemeSidebar/Customize/index.js +66 -0
  251. package/dist/ThemeSidebar/Themes/ThemeCard.js +135 -0
  252. package/dist/ThemeSidebar/Themes/index.js +110 -0
  253. package/dist/ThemeSidebar/TitleBar.js +62 -0
  254. package/dist/ThemeSidebar/constants.js +127 -0
  255. package/dist/ThemeSidebar/fields/AlignmentBlock.js +50 -0
  256. package/dist/ThemeSidebar/fields/Card.js +19 -0
  257. package/dist/ThemeSidebar/fields/ColorBlock.js +19 -0
  258. package/dist/ThemeSidebar/fields/FontPickerBlock.js +35 -0
  259. package/dist/ThemeSidebar/fields/ImageBlock/ImageUploader.js +67 -0
  260. package/dist/ThemeSidebar/fields/ImageBlock/ProgressBar.js +22 -0
  261. package/dist/ThemeSidebar/fields/ImageBlock/index.js +55 -0
  262. package/dist/ThemeSidebar/fields/SelectBlock.js +24 -0
  263. package/dist/ThemeSidebar/fields/SliderBlock.js +30 -0
  264. package/dist/ThemeSidebar/fields/SwitchBlock.js +17 -0
  265. package/dist/ThemeSidebar/fields/TextBlock.js +13 -0
  266. package/dist/ThemeSidebar/fields/slider.scss +199 -0
  267. package/dist/ThemeSidebar/hooks/useDirectUploadDropzone.js +149 -0
  268. package/dist/ThemeSidebar/index.js +118 -0
  269. package/dist/ThemeSidebar/themeSidebar.scss +45 -0
  270. package/dist/ThemeSidebar/utils.js +169 -0
  271. package/dist/TimeFormat/index.js +3 -0
  272. package/dist/TimezoneMismatchModal/apis/time_zone.js +9 -0
  273. package/dist/TimezoneMismatchModal/index.js +83 -0
  274. package/dist/TimezoneMismatchModal/useTimeZoneApi.js +10 -0
  275. package/dist/TimezoneMismatchModal/utils.js +12 -0
  276. package/dist/ToggleFeatureCard/ToolTipSwitch.js +31 -0
  277. package/dist/ToggleFeatureCard/constants.js +5 -0
  278. package/dist/ToggleFeatureCard/hooks/useScrollIntoView.js +11 -0
  279. package/dist/ToggleFeatureCard/index.js +148 -0
  280. package/dist/ToggleFeatureCard/toggleFeatureCard.scss +4 -0
  281. package/package.json +28 -34
  282. package/src/translations/en.json +5 -1
  283. package/types/Search.d.ts +19 -0
  284. package/dist/AutoSaveInput.cjs.js +0 -724
  285. package/dist/AutoSaveInput.cjs.js.map +0 -1
  286. package/dist/AutoSaveInput.js +0 -718
  287. package/dist/AutoSaveInput.js.map +0 -1
  288. package/dist/Breadcrumbs.cjs.js +0 -44
  289. package/dist/Breadcrumbs.cjs.js.map +0 -1
  290. package/dist/Breadcrumbs.js +0 -38
  291. package/dist/Breadcrumbs.js.map +0 -1
  292. package/dist/BrowserSupport.cjs.js +0 -1731
  293. package/dist/BrowserSupport.cjs.js.map +0 -1
  294. package/dist/BrowserSupport.js +0 -1725
  295. package/dist/BrowserSupport.js.map +0 -1
  296. package/dist/CalendarView.cjs.js +0 -610
  297. package/dist/CalendarView.cjs.js.map +0 -1
  298. package/dist/CalendarView.js +0 -598
  299. package/dist/CalendarView.js.map +0 -1
  300. package/dist/Codeblock.cjs.js +0 -302
  301. package/dist/Codeblock.cjs.js.map +0 -1
  302. package/dist/Codeblock.js +0 -296
  303. package/dist/Codeblock.js.map +0 -1
  304. package/dist/Columns.cjs.js +0 -248
  305. package/dist/Columns.cjs.js.map +0 -1
  306. package/dist/Columns.js.map +0 -1
  307. package/dist/ConfirmationModal.cjs.js +0 -87
  308. package/dist/ConfirmationModal.cjs.js.map +0 -1
  309. package/dist/ConfirmationModal.js.map +0 -1
  310. package/dist/Container.cjs.js +0 -1277
  311. package/dist/Container.cjs.js.map +0 -1
  312. package/dist/Container.js +0 -1271
  313. package/dist/Container.js.map +0 -1
  314. package/dist/CopyToClipboardButton.cjs.js +0 -275
  315. package/dist/CopyToClipboardButton.cjs.js.map +0 -1
  316. package/dist/CopyToClipboardButton.js +0 -269
  317. package/dist/CopyToClipboardButton.js.map +0 -1
  318. package/dist/CustomDomain.cjs.js +0 -774
  319. package/dist/CustomDomain.cjs.js.map +0 -1
  320. package/dist/CustomDomain.js +0 -747
  321. package/dist/CustomDomain.js.map +0 -1
  322. package/dist/CustomDomainDashboard.cjs.js +0 -2370
  323. package/dist/CustomDomainDashboard.cjs.js.map +0 -1
  324. package/dist/CustomDomainDashboard.js +0 -2342
  325. package/dist/CustomDomainDashboard.js.map +0 -1
  326. package/dist/DateFormat.cjs.js +0 -51
  327. package/dist/DateFormat.cjs.js.map +0 -1
  328. package/dist/DateFormat.js.map +0 -1
  329. package/dist/DateRangeFilter.cjs.js +0 -236
  330. package/dist/DateRangeFilter.cjs.js.map +0 -1
  331. package/dist/DateRangeFilter.js +0 -229
  332. package/dist/DateRangeFilter.js.map +0 -1
  333. package/dist/DynamicVariables.cjs.js +0 -189
  334. package/dist/DynamicVariables.cjs.js.map +0 -1
  335. package/dist/DynamicVariables.js +0 -183
  336. package/dist/DynamicVariables.js.map +0 -1
  337. package/dist/EmailForm.cjs.js +0 -4295
  338. package/dist/EmailForm.cjs.js.map +0 -1
  339. package/dist/EmailForm.js +0 -4265
  340. package/dist/EmailForm.js.map +0 -1
  341. package/dist/EmailPreview.cjs.js +0 -1419
  342. package/dist/EmailPreview.cjs.js.map +0 -1
  343. package/dist/EmailPreview.js +0 -1413
  344. package/dist/EmailPreview.js.map +0 -1
  345. package/dist/ErrorPage.cjs.js +0 -226
  346. package/dist/ErrorPage.cjs.js.map +0 -1
  347. package/dist/ErrorPage.js.map +0 -1
  348. package/dist/Header.cjs.js +0 -188
  349. package/dist/Header.cjs.js.map +0 -1
  350. package/dist/Header.js +0 -182
  351. package/dist/Header.js.map +0 -1
  352. package/dist/IconPicker.cjs.js +0 -1308
  353. package/dist/IconPicker.cjs.js.map +0 -1
  354. package/dist/IconPicker.js +0 -1302
  355. package/dist/IconPicker.js.map +0 -1
  356. package/dist/ImageWithFallback.cjs.js +0 -247
  357. package/dist/ImageWithFallback.cjs.js.map +0 -1
  358. package/dist/ImageWithFallback.js +0 -241
  359. package/dist/ImageWithFallback.js.map +0 -1
  360. package/dist/IntegrationCard.cjs.js +0 -409
  361. package/dist/IntegrationCard.cjs.js.map +0 -1
  362. package/dist/IntegrationCard.js +0 -403
  363. package/dist/IntegrationCard.js.map +0 -1
  364. package/dist/IntegrationDisconnectAlert.cjs.js +0 -89
  365. package/dist/IntegrationDisconnectAlert.cjs.js.map +0 -1
  366. package/dist/IntegrationDisconnectAlert.js +0 -80
  367. package/dist/IntegrationDisconnectAlert.js.map +0 -1
  368. package/dist/IntegrationWalkthroughModal.cjs.js +0 -50
  369. package/dist/IntegrationWalkthroughModal.cjs.js.map +0 -1
  370. package/dist/IntegrationWalkthroughModal.js.map +0 -1
  371. package/dist/IpRestriction.cjs.js +0 -3931
  372. package/dist/IpRestriction.cjs.js.map +0 -1
  373. package/dist/IpRestriction.js +0 -3905
  374. package/dist/IpRestriction.js.map +0 -1
  375. package/dist/KeyboardShortcuts.cjs.js +0 -2263
  376. package/dist/KeyboardShortcuts.cjs.js.map +0 -1
  377. package/dist/KeyboardShortcuts.js +0 -2256
  378. package/dist/KeyboardShortcuts.js.map +0 -1
  379. package/dist/LoginPage.cjs.js +0 -618
  380. package/dist/LoginPage.cjs.js.map +0 -1
  381. package/dist/LoginPage.js +0 -593
  382. package/dist/LoginPage.js.map +0 -1
  383. package/dist/MenuBar.cjs.js +0 -34273
  384. package/dist/MenuBar.cjs.js.map +0 -1
  385. package/dist/MenuBar.js +0 -34267
  386. package/dist/MenuBar.js.map +0 -1
  387. package/dist/Metadata.cjs.js +0 -272
  388. package/dist/Metadata.cjs.js.map +0 -1
  389. package/dist/Metadata.js +0 -266
  390. package/dist/Metadata.js.map +0 -1
  391. package/dist/MoreDropdown.cjs.js +0 -168
  392. package/dist/MoreDropdown.cjs.js.map +0 -1
  393. package/dist/MoreDropdown.js.map +0 -1
  394. package/dist/NavigationHeader.cjs.js +0 -756
  395. package/dist/NavigationHeader.cjs.js.map +0 -1
  396. package/dist/NavigationHeader.js +0 -750
  397. package/dist/NavigationHeader.js.map +0 -1
  398. package/dist/NeetoWidget.cjs.js +0 -3375
  399. package/dist/NeetoWidget.cjs.js.map +0 -1
  400. package/dist/NeetoWidget.js +0 -3348
  401. package/dist/NeetoWidget.js.map +0 -1
  402. package/dist/PageLoader.cjs.js +0 -158
  403. package/dist/PageLoader.cjs.js.map +0 -1
  404. package/dist/PageLoader.js +0 -134
  405. package/dist/PageLoader.js.map +0 -1
  406. package/dist/PhoneNumber.cjs.js +0 -7021
  407. package/dist/PhoneNumber.cjs.js.map +0 -1
  408. package/dist/PhoneNumber.js +0 -6989
  409. package/dist/PhoneNumber.js.map +0 -1
  410. package/dist/PublishBlock.cjs.js +0 -224
  411. package/dist/PublishBlock.cjs.js.map +0 -1
  412. package/dist/PublishBlock.js +0 -218
  413. package/dist/PublishBlock.js.map +0 -1
  414. package/dist/Rename.cjs.js +0 -516
  415. package/dist/Rename.cjs.js.map +0 -1
  416. package/dist/Rename.js +0 -510
  417. package/dist/Rename.js.map +0 -1
  418. package/dist/ResponsiveDevicePicker.cjs.js +0 -260
  419. package/dist/ResponsiveDevicePicker.cjs.js.map +0 -1
  420. package/dist/ResponsiveDevicePicker.js +0 -254
  421. package/dist/ResponsiveDevicePicker.js.map +0 -1
  422. package/dist/Schedule.cjs.js +0 -1077
  423. package/dist/Schedule.cjs.js.map +0 -1
  424. package/dist/Schedule.js +0 -1046
  425. package/dist/Schedule.js.map +0 -1
  426. package/dist/Scrollable.cjs.js +0 -188
  427. package/dist/Scrollable.cjs.js.map +0 -1
  428. package/dist/Scrollable.js +0 -182
  429. package/dist/Scrollable.js.map +0 -1
  430. package/dist/Security.cjs.js +0 -1921
  431. package/dist/Security.cjs.js.map +0 -1
  432. package/dist/Security.js +0 -1895
  433. package/dist/Security.js.map +0 -1
  434. package/dist/SendToFields.cjs.js +0 -2524
  435. package/dist/SendToFields.cjs.js.map +0 -1
  436. package/dist/SendToFields.js +0 -2517
  437. package/dist/SendToFields.js.map +0 -1
  438. package/dist/Settings.cjs.js +0 -501
  439. package/dist/Settings.cjs.js.map +0 -1
  440. package/dist/Settings.js +0 -495
  441. package/dist/Settings.js.map +0 -1
  442. package/dist/ShareViaEmail.cjs.js +0 -4272
  443. package/dist/ShareViaEmail.cjs.js.map +0 -1
  444. package/dist/ShareViaEmail.js +0 -4246
  445. package/dist/ShareViaEmail.js.map +0 -1
  446. package/dist/ShareViaLink.cjs.js +0 -1512
  447. package/dist/ShareViaLink.cjs.js.map +0 -1
  448. package/dist/ShareViaLink.js +0 -1486
  449. package/dist/ShareViaLink.js.map +0 -1
  450. package/dist/Sidebar.cjs.js +0 -34985
  451. package/dist/Sidebar.cjs.js.map +0 -1
  452. package/dist/Sidebar.js +0 -34959
  453. package/dist/Sidebar.js.map +0 -1
  454. package/dist/SubHeader.cjs.js +0 -283
  455. package/dist/SubHeader.cjs.js.map +0 -1
  456. package/dist/SubHeader.js +0 -276
  457. package/dist/SubHeader.js.map +0 -1
  458. package/dist/TableWrapper.cjs.js +0 -87
  459. package/dist/TableWrapper.cjs.js.map +0 -1
  460. package/dist/TableWrapper.js +0 -81
  461. package/dist/TableWrapper.js.map +0 -1
  462. package/dist/ThemeSidebar.cjs.js +0 -13705
  463. package/dist/ThemeSidebar.cjs.js.map +0 -1
  464. package/dist/ThemeSidebar.js +0 -13680
  465. package/dist/ThemeSidebar.js.map +0 -1
  466. package/dist/TimeFormat.cjs.js +0 -53
  467. package/dist/TimeFormat.cjs.js.map +0 -1
  468. package/dist/TimeFormat.js +0 -47
  469. package/dist/TimeFormat.js.map +0 -1
  470. package/dist/TimezoneMismatchModal.cjs.js +0 -176
  471. package/dist/TimezoneMismatchModal.cjs.js.map +0 -1
  472. package/dist/TimezoneMismatchModal.js +0 -168
  473. package/dist/TimezoneMismatchModal.js.map +0 -1
  474. package/dist/ToggleFeatureCard.cjs.js +0 -389
  475. package/dist/ToggleFeatureCard.cjs.js.map +0 -1
  476. package/dist/ToggleFeatureCard.js +0 -383
  477. package/dist/ToggleFeatureCard.js.map +0 -1
@@ -0,0 +1,32 @@
1
+ .neeto-molecules-scrollable {
2
+ flex-grow: 1;
3
+ overflow-y: auto;
4
+
5
+ &.neeto-molecules-scrollable--nano {
6
+ height: calc(
7
+ 100vh - var(--neeto-molecules-main-header-with-breadcrumbs-height) -
8
+ var(--neeto-molecules-sub-header-height) -
9
+ var(--neeto-molecules-sub-header-bottom-margin)
10
+ );
11
+ }
12
+
13
+ &.neeto-molecules-scrollable--small {
14
+ height: calc(
15
+ 100vh - var(--neeto-molecules-main-header-height) -
16
+ var(--neeto-molecules-sub-header-height) -
17
+ var(--neeto-molecules-sub-header-bottom-margin)
18
+ );
19
+ }
20
+
21
+ &.neeto-molecules-scrollable--medium {
22
+ height: calc(100vh - var(--neeto-molecules-main-header-with-breadcrumbs-height));
23
+ }
24
+
25
+ &.neeto-molecules-scrollable--large {
26
+ height: calc(100vh - var(--neeto-molecules-main-header-height));
27
+ }
28
+
29
+ &.neeto-molecules-scrollable--viewport {
30
+ height: 100vh;
31
+ }
32
+ }
@@ -0,0 +1,52 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
+ var _excluded = ["value", "debounceTime", "onChange", "onSearch"];
5
+ import React, { useEffect, useState } from "react";
6
+ import { useDebounce } from "@bigbinary/neeto-commons-frontend/react-utils";
7
+ import { Search as NeetoUISearchIcon } from "@bigbinary/neeto-icons";
8
+ import { Input } from "@bigbinary/neetoui";
9
+ import { useTranslation } from "react-i18next";
10
+ var Search = function Search(_ref) {
11
+ var _ref$value = _ref.value,
12
+ value = _ref$value === void 0 ? "" : _ref$value,
13
+ _ref$debounceTime = _ref.debounceTime,
14
+ debounceTime = _ref$debounceTime === void 0 ? 300 : _ref$debounceTime,
15
+ onChange = _ref.onChange,
16
+ onSearch = _ref.onSearch,
17
+ inputProps = _objectWithoutProperties(_ref, _excluded);
18
+ var _useTranslation = useTranslation(),
19
+ t = _useTranslation.t;
20
+ var _useState = useState(value),
21
+ _useState2 = _slicedToArray(_useState, 2),
22
+ internalValue = _useState2[0],
23
+ setInternalValue = _useState2[1];
24
+ var _useState3 = useState(),
25
+ _useState4 = _slicedToArray(_useState3, 2),
26
+ untrimmedValue = _useState4[0],
27
+ setUntrimmedValue = _useState4[1];
28
+ useEffect(function () {
29
+ if (untrimmedValue && untrimmedValue.includes(value)) {
30
+ setInternalValue(untrimmedValue);
31
+ } else {
32
+ setInternalValue(value);
33
+ }
34
+ }, [value]);
35
+ var debouncedValue = useDebounce(internalValue, debounceTime);
36
+ useEffect(function () {
37
+ onSearch === null || onSearch === void 0 ? void 0 : onSearch(debouncedValue.trim());
38
+ }, [debouncedValue, onSearch]);
39
+ var handleOnChange = function handleOnChange(e) {
40
+ onChange === null || onChange === void 0 ? void 0 : onChange(e);
41
+ setInternalValue(e.target.value);
42
+ setUntrimmedValue(e.target.value);
43
+ };
44
+ return /*#__PURE__*/React.createElement(Input, _extends({
45
+ placeholder: t("neetoMolecules.common.actions.search"),
46
+ prefix: /*#__PURE__*/React.createElement(NeetoUISearchIcon, null),
47
+ type: "search",
48
+ value: internalValue,
49
+ onChange: handleOnChange
50
+ }, inputProps));
51
+ };
52
+ export default Search;
@@ -0,0 +1,38 @@
1
+ import React from "react";
2
+ import classNames from "classnames";
3
+ import { useFormikContext } from "formik";
4
+ import { Delete } from "@bigbinary/neeto-icons";
5
+ import { Button } from "@bigbinary/neetoui";
6
+ import { Input } from "@bigbinary/neetoui/formik";
7
+ import { remove } from "ramda";
8
+ import { useTranslation } from "react-i18next";
9
+ var Add = function Add() {
10
+ var _useTranslation = useTranslation(),
11
+ t = _useTranslation.t;
12
+ var _useFormikContext = useFormikContext(),
13
+ setFieldValue = _useFormikContext.setFieldValue,
14
+ allowedKeywords = _useFormikContext.values.allowedKeywords;
15
+ var removeKeyword = function removeKeyword(index) {
16
+ return setFieldValue("allowedKeywords", remove(index, 1, allowedKeywords));
17
+ };
18
+ if (!allowedKeywords) return null;
19
+ return allowedKeywords.map(function (_, index) {
20
+ return /*#__PURE__*/React.createElement("div", {
21
+ className: classNames("flex w-full items-start justify-between gap-x-2"),
22
+ key: index
23
+ }, /*#__PURE__*/React.createElement(Input, {
24
+ autoFocus: true,
25
+ "data-cy": "keyword-input-field-".concat(index),
26
+ name: "allowedKeywords[".concat(index, "]"),
27
+ placeholder: t("neetoMolecules.security.placeholders.enterKeyword")
28
+ }), /*#__PURE__*/React.createElement(Button, {
29
+ "data-cy": "keyword-remove-button-".concat(index),
30
+ icon: Delete,
31
+ style: "text",
32
+ onClick: function onClick() {
33
+ return removeKeyword(index);
34
+ }
35
+ }));
36
+ });
37
+ };
38
+ export default Add;
@@ -0,0 +1,38 @@
1
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
+ import React from "react";
3
+ import { ErrorMessage, useFormikContext } from "formik";
4
+ import { globalProps } from "@bigbinary/neeto-commons-frontend/initializers";
5
+ import { Button, Label } from "@bigbinary/neetoui";
6
+ import { isEmpty } from "ramda";
7
+ import { useTranslation } from "react-i18next";
8
+ import Add from "./Add";
9
+ import { OTP_ENABLED, APP_NAME } from "../constants";
10
+ var AllowedKeywords = function AllowedKeywords() {
11
+ var _useTranslation = useTranslation(),
12
+ t = _useTranslation.t;
13
+ var _useFormikContext = useFormikContext(),
14
+ setFieldValue = _useFormikContext.setFieldValue,
15
+ _useFormikContext$val = _useFormikContext.values,
16
+ allowedKeywords = _useFormikContext$val.allowedKeywords,
17
+ authKind = _useFormikContext$val.authKind;
18
+ if (authKind !== OTP_ENABLED) return null;
19
+ var appName = APP_NAME[globalProps.appName];
20
+ return /*#__PURE__*/React.createElement("div", {
21
+ className: "flex-col space-y-2 py-2"
22
+ }, appName && /*#__PURE__*/React.createElement(Label, null, t("neetoMolecules.security.labels.keywordForm.".concat(appName))), /*#__PURE__*/React.createElement("div", {
23
+ className: "neeto-ui-bg-pastel-blue neeto-ui-rounded-sm w-full space-y-4 p-6"
24
+ }, /*#__PURE__*/React.createElement(Add, null), /*#__PURE__*/React.createElement(Button, {
25
+ "data-cy": "add-allowed-keyword-button",
26
+ "data-testid": "add-allowed-keyword-button",
27
+ label: t("neetoMolecules.security.labels.addKeyWord"),
28
+ style: "link",
29
+ onClick: function onClick() {
30
+ return setFieldValue("allowedKeywords", [].concat(_toConsumableArray(allowedKeywords), [""]));
31
+ }
32
+ })), isEmpty(allowedKeywords) && /*#__PURE__*/React.createElement(ErrorMessage, {
33
+ className: "neeto-ui-text-error-600",
34
+ component: "div",
35
+ name: "allowedKeywords"
36
+ }));
37
+ };
38
+ export default AllowedKeywords;
@@ -0,0 +1,31 @@
1
+ import React from "react";
2
+ import { useFormikContext } from "formik";
3
+ import { Input } from "@bigbinary/neetoui/formik";
4
+ import { useTranslation } from "react-i18next";
5
+ import { PASSWORD_ENABLED } from "./constants";
6
+ var Password = function Password() {
7
+ var _useTranslation = useTranslation(),
8
+ t = _useTranslation.t;
9
+ var _useFormikContext = useFormikContext(),
10
+ authKind = _useFormikContext.values.authKind,
11
+ getFieldProps = _useFormikContext.getFieldProps;
12
+ if (authKind !== PASSWORD_ENABLED) return null;
13
+ var _getFieldProps = getFieldProps("password"),
14
+ onPasswordChange = _getFieldProps.onChange;
15
+ return /*#__PURE__*/React.createElement("div", {
16
+ className: "space-y-4 pb-2"
17
+ }, /*#__PURE__*/React.createElement(Input, {
18
+ autoFocus: true,
19
+ unlimitedChars: true,
20
+ className: "w-7/12",
21
+ "data-testid": "password-block",
22
+ label: t("neetoMolecules.security.labels.password"),
23
+ name: "password",
24
+ placeholder: t("neetoMolecules.security.placeholders.enterPassword"),
25
+ onChange: function onChange(e) {
26
+ e.target.value = e.target.value.trim();
27
+ onPasswordChange(e);
28
+ }
29
+ }));
30
+ };
31
+ export default Password;
@@ -0,0 +1,38 @@
1
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
+ import React from "react";
3
+ import { useFormikContext } from "formik";
4
+ import { Radio } from "@bigbinary/neetoui/formik";
5
+ import { OTP_ENABLED } from "./constants";
6
+ var RadioBlock = function RadioBlock(_ref) {
7
+ var radioItems = _ref.radioItems;
8
+ var _useFormikContext = useFormikContext(),
9
+ _useFormikContext$val = _useFormikContext.values.allowedKeywords,
10
+ allowedKeywords = _useFormikContext$val === void 0 ? [] : _useFormikContext$val,
11
+ setFieldValue = _useFormikContext.setFieldValue;
12
+ var handleRadioChange = function handleRadioChange(_ref2) {
13
+ var value = _ref2.event.target.value,
14
+ allowedKeywords = _ref2.allowedKeywords;
15
+ var allowedKeywordsValue = value === OTP_ENABLED ? [].concat(_toConsumableArray(allowedKeywords), [""]) : [];
16
+ setFieldValue("allowedKeywords", allowedKeywordsValue);
17
+ setFieldValue("authKind", value);
18
+ };
19
+ return /*#__PURE__*/React.createElement(Radio, {
20
+ stacked: true,
21
+ name: "authKind",
22
+ onChange: function onChange(event) {
23
+ return handleRadioChange({
24
+ event: event,
25
+ allowedKeywords: allowedKeywords
26
+ });
27
+ }
28
+ }, radioItems.map(function (_ref3) {
29
+ var label = _ref3.label,
30
+ value = _ref3.value;
31
+ return /*#__PURE__*/React.createElement(Radio.Item, {
32
+ key: value,
33
+ label: label,
34
+ value: value
35
+ });
36
+ }));
37
+ };
38
+ export default RadioBlock;
@@ -0,0 +1,12 @@
1
+ import axios from "axios";
2
+ var fetch = function fetch(url) {
3
+ return axios.get(url);
4
+ };
5
+ var update = function update(url, payload) {
6
+ return axios.put(url, payload);
7
+ };
8
+ var settingsApi = {
9
+ fetch: fetch,
10
+ update: update
11
+ };
12
+ export default settingsApi;
@@ -0,0 +1,58 @@
1
+ import { t } from "i18next";
2
+ import { identity } from "ramda";
3
+ import * as yup from "yup";
4
+ import { findKeywordDuplicates } from "./utils";
5
+ var NOT_SECURED = "no_auth";
6
+ var SESSION_AUTH = "session_auth";
7
+ yup.addMethod(yup.array, "unique", function (message) {
8
+ var mapper = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : identity;
9
+ return this.test("unique", message, function (list, _ref) {
10
+ var authKind = _ref.parent.authKind;
11
+ return authKind === OTP_ENABLED && (list === null || list === void 0 ? void 0 : list.length) === new Set(list === null || list === void 0 ? void 0 : list.map(mapper)).size ? true : findKeywordDuplicates(list, message, this.createError);
12
+ });
13
+ });
14
+ export var QUERY_KEYS = {
15
+ SETTINGS_LIST: "settings-list",
16
+ GETTING_STARTED: "getting-started",
17
+ INTEGRATION_SETTINGS: "integration_settings",
18
+ THEMES_SETTINGS: "themes_setting"
19
+ };
20
+ export var SETTINGS_STALE_TIME = 900000; // 15 mins
21
+ export var PASSWORD_ENABLED = "basic_auth";
22
+ export var OTP_ENABLED = "otp_auth";
23
+ export var APP_NAME = {
24
+ neetoKB: "KB",
25
+ neetoCourse: "Course"
26
+ };
27
+ export var AUTH_KINDS = [{
28
+ label: t("neetoMolecules.security.labels.notSecured"),
29
+ value: NOT_SECURED
30
+ }, {
31
+ label: t("neetoMolecules.security.labels.passwordEnabled"),
32
+ value: PASSWORD_ENABLED
33
+ }, {
34
+ label: t("neetoMolecules.security.labels.otpEnabled"),
35
+ value: OTP_ENABLED
36
+ }, {
37
+ label: t("neetoMolecules.security.labels.private"),
38
+ value: SESSION_AUTH
39
+ }];
40
+ export var SECURITY_SETTINGS_VALIDATION_SCHEMA = yup.object({
41
+ password: yup.string().when("authKind", {
42
+ is: PASSWORD_ENABLED,
43
+ then: yup.string().required(t("neetoMolecules.security.validation.required", {
44
+ what: t("neetoMolecules.security.labels.password")
45
+ })).min(4, t("neetoMolecules.security.validation.min", {
46
+ entity: t("neetoMolecules.security.labels.password"),
47
+ min: 4
48
+ }))
49
+ }),
50
+ allowedKeywords: yup.array().when("authKind", {
51
+ is: OTP_ENABLED,
52
+ then: yup.array().of(yup.string().trim().required(t("neetoMolecules.security.validation.required", {
53
+ what: t("neetoMolecules.security.labels.keyword")
54
+ }))).unique(t("neetoMolecules.security.placeholders.exists", {
55
+ what: t("neetoMolecules.security.labels.keyword")
56
+ }))
57
+ })
58
+ });
@@ -0,0 +1,68 @@
1
+ import React from "react";
2
+ import { toLabelAndValue } from "@bigbinary/neeto-commons-frontend/pure";
3
+ import { Form, ActionBlock } from "@bigbinary/neetoui/formik";
4
+ import Container from "../Container";
5
+ import Header from "../Header";
6
+ import PageLoader from "../PageLoader";
7
+ import Scrollable from "../Scrollable";
8
+ import AllowedKeywords from "./AllowedKeywords";
9
+ import { SECURITY_SETTINGS_VALIDATION_SCHEMA } from "./constants";
10
+ import Password from "./PasswordBlock";
11
+ import RadioBlock from "./RadioBlock";
12
+ import { useFetchSettings, useUpdateSetting } from "./useSecurityApi";
13
+ import { buildSecuritySettings } from "./utils";
14
+ var Security = function Security(_ref) {
15
+ var url = _ref.url,
16
+ breadcrumbs = _ref.breadcrumbs,
17
+ title = _ref.title,
18
+ radioItems = _ref.radioItems;
19
+ var _useFetchSettings = useFetchSettings(url),
20
+ _useFetchSettings$dat = _useFetchSettings.data,
21
+ settings = _useFetchSettings$dat === void 0 ? {} : _useFetchSettings$dat,
22
+ isLoading = _useFetchSettings.isLoading;
23
+ var _useUpdateSetting = useUpdateSetting(url),
24
+ updateSettings = _useUpdateSetting.mutate;
25
+ var handleSubmit = function handleSubmit(values, _ref2) {
26
+ var setSubmitting = _ref2.setSubmitting;
27
+ updateSettings(values, {
28
+ onSettled: function onSettled() {
29
+ return setSubmitting(false);
30
+ }
31
+ });
32
+ };
33
+ if (isLoading) return /*#__PURE__*/React.createElement(PageLoader, null);
34
+ return /*#__PURE__*/React.createElement(Container, {
35
+ isHeaderFixed: true
36
+ }, /*#__PURE__*/React.createElement(Header, {
37
+ "data-cy": "general-settings-heading",
38
+ breadcrumbs: breadcrumbs,
39
+ title: title
40
+ }), /*#__PURE__*/React.createElement(Scrollable, {
41
+ className: "w-full pb-6"
42
+ }, /*#__PURE__*/React.createElement(Form, {
43
+ className: "mx-auto w-full max-w-3xl space-y-6 md:px-0 lg:px-6",
44
+ formikProps: {
45
+ initialValues: buildSecuritySettings(settings),
46
+ validationSchema: SECURITY_SETTINGS_VALIDATION_SCHEMA,
47
+ onSubmit: handleSubmit,
48
+ enableReinitialize: true
49
+ }
50
+ }, function (_ref3) {
51
+ var dirty = _ref3.dirty,
52
+ isSubmitting = _ref3.isSubmitting;
53
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(RadioBlock, {
54
+ radioItems: radioItems
55
+ }), /*#__PURE__*/React.createElement(Password, null), /*#__PURE__*/React.createElement(AllowedKeywords, null), /*#__PURE__*/React.createElement(ActionBlock, {
56
+ cancelButtonProps: {
57
+ disabled: false,
58
+ className: "ml-3"
59
+ },
60
+ className: "mt-6 w-full justify-start",
61
+ submitButtonProps: {
62
+ loading: isSubmitting,
63
+ disabled: !dirty || isSubmitting
64
+ }
65
+ }));
66
+ })));
67
+ };
68
+ export default Security;
@@ -0,0 +1,22 @@
1
+ import { useMutationWithInvalidation } from "@bigbinary/neeto-commons-frontend/react-utils";
2
+ import { useQuery } from "react-query";
3
+ import settingsApi from "./api";
4
+ import { QUERY_KEYS, SETTINGS_STALE_TIME } from "./constants";
5
+ var SETTINGS_LIST = QUERY_KEYS.SETTINGS_LIST,
6
+ GETTING_STARTED = QUERY_KEYS.GETTING_STARTED,
7
+ THEMES_SETTINGS = QUERY_KEYS.THEMES_SETTINGS;
8
+ var useFetchSettings = function useFetchSettings(url) {
9
+ return useQuery(SETTINGS_LIST, function () {
10
+ return settingsApi.fetch(url);
11
+ }, {
12
+ staleTime: SETTINGS_STALE_TIME
13
+ });
14
+ };
15
+ var useUpdateSetting = function useUpdateSetting(url) {
16
+ return useMutationWithInvalidation(function (payload) {
17
+ return settingsApi.update(url, payload);
18
+ }, {
19
+ keysToInvalidate: [SETTINGS_LIST, GETTING_STARTED, THEMES_SETTINGS]
20
+ });
21
+ };
22
+ export { useFetchSettings, useUpdateSetting };
@@ -0,0 +1,31 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+ import { isEmpty } from "ramda";
5
+ import * as yup from "yup";
6
+ export var buildSecuritySettings = function buildSecuritySettings(settings) {
7
+ return _objectSpread(_objectSpread({}, settings.setting), {}, {
8
+ addEmail: false
9
+ });
10
+ };
11
+ export var findKeywordDuplicates = function findKeywordDuplicates(list, message, createError) {
12
+ var duplicates = {};
13
+ list === null || list === void 0 ? void 0 : list.forEach(function (value, index) {
14
+ if (duplicates[value]) {
15
+ duplicates[value].push(index);
16
+ } else {
17
+ duplicates[value] = [index];
18
+ }
19
+ });
20
+ var errors = Object.values(duplicates).map(function (index) {
21
+ return index.length > 1 && new yup.ValidationError(message, list[index.at(-1)], "setting.allowedKeywords[".concat(index.at(-1), "]"));
22
+ });
23
+ if (isEmpty(errors)) {
24
+ return true;
25
+ }
26
+ return createError({
27
+ message: function message() {
28
+ return errors;
29
+ }
30
+ });
31
+ };
@@ -0,0 +1,34 @@
1
+ import React, { useRef } from "react";
2
+ var FilePicker = function FilePicker(_ref) {
3
+ var _ref$types = _ref.types,
4
+ types = _ref$types === void 0 ? [] : _ref$types,
5
+ onChange = _ref.onChange,
6
+ children = _ref.children;
7
+ var inputRef = useRef();
8
+ var accept = types.reduce(function (acc, ext) {
9
+ return "".concat(acc, ", ").concat(ext);
10
+ }, "");
11
+ var handleInputChange = function handleInputChange(_ref2) {
12
+ var target = _ref2.target;
13
+ if (!target.files) return;
14
+ onChange(target.files);
15
+
16
+ // This will trigger handleClick when same file is uploaded again.
17
+ inputRef.current.value = "";
18
+ handleClick();
19
+ };
20
+ var handleClick = function handleClick() {
21
+ if (!inputRef.current) return;
22
+ inputRef.current.click();
23
+ };
24
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
25
+ onClick: handleClick
26
+ }, children), /*#__PURE__*/React.createElement("input", {
27
+ accept: accept,
28
+ className: "hidden",
29
+ ref: inputRef,
30
+ type: "file",
31
+ onChange: handleInputChange
32
+ }));
33
+ };
34
+ export default FilePicker;
@@ -0,0 +1,6 @@
1
+ export var SIZES = {
2
+ small: "small",
3
+ medium: "medium",
4
+ large: "large"
5
+ };
6
+ export var ALLOWED_FILE_PICKER_TYPES = [".csv"];
@@ -0,0 +1,102 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
+ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
4
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
5
+ import React, { useRef } from "react";
6
+ import { useFormikContext } from "formik";
7
+ import { Upload } from "@bigbinary/neeto-icons";
8
+ import { Button, Toastr } from "@bigbinary/neetoui";
9
+ import { MultiEmailInput } from "@bigbinary/neetoui/formik";
10
+ import { useTranslation } from "react-i18next";
11
+ import { SIZES, ALLOWED_FILE_PICKER_TYPES } from "./constants";
12
+ import FilePicker from "./FilePicker";
13
+ import { parseCsvEmails } from "./utils";
14
+ var SendToFields = function SendToFields(_ref) {
15
+ var emailInputProps = _ref.emailInputProps,
16
+ ccInputProps = _ref.ccInputProps,
17
+ bccInputProps = _ref.bccInputProps,
18
+ _ref$showUploadCsvBut = _ref.showUploadCsvButton,
19
+ showUploadCsvButton = _ref$showUploadCsvBut === void 0 ? false : _ref$showUploadCsvBut,
20
+ _ref$showCcBccButton = _ref.showCcBccButton,
21
+ showCcBccButton = _ref$showCcBccButton === void 0 ? false : _ref$showCcBccButton;
22
+ var sendToFieldRef = useRef();
23
+ var _useFormikContext = useFormikContext(),
24
+ _useFormikContext$val = _useFormikContext.values,
25
+ showCopyEmails = _useFormikContext$val.showCopyEmails,
26
+ existingSendToEmails = _useFormikContext$val[emailInputProps.name || "sendTo"],
27
+ setFieldValue = _useFormikContext.setFieldValue;
28
+ var _useTranslation = useTranslation(),
29
+ t = _useTranslation.t;
30
+ var handleCSVFile = /*#__PURE__*/function () {
31
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(files) {
32
+ var _sendToFieldRef$curre, onSuccess;
33
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
34
+ while (1) switch (_context.prev = _context.next) {
35
+ case 0:
36
+ _context.prev = 0;
37
+ onSuccess = function onSuccess(values) {
38
+ return setFieldValue(emailInputProps.name || "sendTo", [].concat(_toConsumableArray(existingSendToEmails), _toConsumableArray(values)));
39
+ };
40
+ _context.next = 4;
41
+ return parseCsvEmails(files[0], onSuccess);
42
+ case 4:
43
+ (_sendToFieldRef$curre = sendToFieldRef.current) === null || _sendToFieldRef$curre === void 0 ? void 0 : _sendToFieldRef$curre.focus();
44
+ _context.next = 10;
45
+ break;
46
+ case 7:
47
+ _context.prev = 7;
48
+ _context.t0 = _context["catch"](0);
49
+ Toastr.error(_context.t0);
50
+ case 10:
51
+ case "end":
52
+ return _context.stop();
53
+ }
54
+ }, _callee, null, [[0, 7]]);
55
+ }));
56
+ return function handleCSVFile(_x) {
57
+ return _ref2.apply(this, arguments);
58
+ };
59
+ }();
60
+ var handelCcBccButtonClick = function handelCcBccButtonClick(e) {
61
+ e.stopPropagation();
62
+ setFieldValue("showCopyEmails", !showCopyEmails);
63
+ };
64
+ return /*#__PURE__*/React.createElement("div", {
65
+ className: "relative w-full flex-col gap-2"
66
+ }, showUploadCsvButton && /*#__PURE__*/React.createElement("div", {
67
+ className: "absolute top-0 right-1"
68
+ }, /*#__PURE__*/React.createElement(FilePicker, {
69
+ types: ALLOWED_FILE_PICKER_TYPES,
70
+ onChange: handleCSVFile
71
+ }, /*#__PURE__*/React.createElement(Button, {
72
+ "data-cy": "upload-csv-button",
73
+ icon: Upload,
74
+ label: t("neetoMolecules.emailForm.uploadCSV"),
75
+ size: "small",
76
+ style: "link",
77
+ tooltipProps: {
78
+ content: t("neetoMolecules.sendToFields.uploadCsvTooltip"),
79
+ position: "right"
80
+ }
81
+ }))), /*#__PURE__*/React.createElement(MultiEmailInput, _extends({
82
+ "data-testid": "emails",
83
+ name: "sendTo",
84
+ ref: sendToFieldRef
85
+ }, emailInputProps, {
86
+ suffix: showCcBccButton && /*#__PURE__*/React.createElement(Button, {
87
+ "data-cy": "cc-bcc-button",
88
+ "data-testid": "cc-bcc-button",
89
+ label: t("neetoMolecules.emailForm.labels.ccBcc"),
90
+ size: "small",
91
+ style: "link",
92
+ onClick: handelCcBccButtonClick
93
+ })
94
+ })), showCopyEmails && /*#__PURE__*/React.createElement("div", {
95
+ className: "mt-5 flex w-full flex-col gap-6"
96
+ }, /*#__PURE__*/React.createElement(MultiEmailInput, _extends({
97
+ name: "sendToBcc"
98
+ }, ccInputProps)), /*#__PURE__*/React.createElement(MultiEmailInput, _extends({
99
+ name: "sendToCc"
100
+ }, bccInputProps))));
101
+ };
102
+ export default SendToFields;
@@ -0,0 +1,54 @@
1
+ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
3
+ import { t } from "i18next";
4
+ import { Toastr } from "@bigbinary/neetoui";
5
+ import Papa from "papaparse";
6
+ import { prop } from "ramda";
7
+ import { string } from "yup";
8
+ var isValidEmail = function isValidEmail(email) {
9
+ return string().email().isValidSync(email);
10
+ };
11
+ export var createEmailOptions = function createEmailOptions() {
12
+ var emails = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
13
+ return emails.map(function (email) {
14
+ return {
15
+ label: email,
16
+ value: email,
17
+ valid: isValidEmail(email)
18
+ };
19
+ });
20
+ };
21
+ export var parseCsvEmails = /*#__PURE__*/function () {
22
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(file, onSuccess) {
23
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
24
+ while (1) switch (_context.prev = _context.next) {
25
+ case 0:
26
+ Papa.parse(file, {
27
+ header: true,
28
+ skipEmptyLines: true,
29
+ transformHeader: function transformHeader(h) {
30
+ return h.toLowerCase().replace(/\W/g, "");
31
+ },
32
+ complete: function complete(results) {
33
+ var _results$meta$fields;
34
+ var isEmailFieldPresent = (_results$meta$fields = results.meta.fields) === null || _results$meta$fields === void 0 ? void 0 : _results$meta$fields.includes("email");
35
+ if (isEmailFieldPresent) {
36
+ var emails = results.data.filter(prop("email")).map(function (item) {
37
+ return item.email.trim();
38
+ });
39
+ onSuccess(createEmailOptions(emails));
40
+ } else {
41
+ Toastr.error(t("neetoMolecules.sendToFields.errors.invalidCsv"));
42
+ }
43
+ }
44
+ });
45
+ case 1:
46
+ case "end":
47
+ return _context.stop();
48
+ }
49
+ }, _callee);
50
+ }));
51
+ return function parseCsvEmails(_x, _x2) {
52
+ return _ref.apply(this, arguments);
53
+ };
54
+ }();
@@ -0,0 +1,30 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import React from "react";
3
+ import { isNotEmpty } from "@bigbinary/neeto-commons-frontend/pure";
4
+ import { Typography } from "@bigbinary/neetoui";
5
+ import IntegrationCard from "../IntegrationCard";
6
+ import Item from "./Item";
7
+ var Category = function Category(_ref) {
8
+ var items = _ref.items,
9
+ label = _ref.label,
10
+ id = _ref.id,
11
+ isIntegration = _ref.isIntegration;
12
+ var SettingsCard = isIntegration ? IntegrationCard : Item;
13
+ return /*#__PURE__*/React.createElement("div", {
14
+ className: "flex flex-col py-6",
15
+ id: id
16
+ }, isNotEmpty(items) && /*#__PURE__*/React.createElement(Typography, {
17
+ className: "mb-6",
18
+ component: "h2",
19
+ "data-cy": "settings-category-heading",
20
+ style: "h2",
21
+ weight: "semibold"
22
+ }, label), /*#__PURE__*/React.createElement("div", {
23
+ className: "grid grid-cols-1 gap-3 lg:grid-cols-2 lg:gap-6 xl:grid-cols-3 2xl:grid-cols-4"
24
+ }, items.map(function (item) {
25
+ return /*#__PURE__*/React.createElement(SettingsCard, _extends({
26
+ key: item.label
27
+ }, item));
28
+ })));
29
+ };
30
+ export default Category;