@bigbinary/neeto-molecules 1.1.9 → 1.1.11

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 (474) 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 +72 -0
  87. package/dist/IpRestriction/CurrentIp.js +26 -0
  88. package/dist/IpRestriction/FormRow.js +77 -0
  89. package/dist/IpRestriction/Row.js +86 -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 +11 -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 +67 -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/Security/AllowedKeywords/Add.js +38 -0
  182. package/dist/Security/AllowedKeywords/index.js +38 -0
  183. package/dist/Security/PasswordBlock.js +31 -0
  184. package/dist/Security/RadioBlock.js +38 -0
  185. package/dist/Security/api.js +12 -0
  186. package/dist/Security/constants.js +58 -0
  187. package/dist/Security/index.js +68 -0
  188. package/dist/Security/useSecurityApi.js +22 -0
  189. package/dist/Security/utils.js +31 -0
  190. package/dist/SendToFields/FilePicker.js +34 -0
  191. package/dist/SendToFields/constants.js +6 -0
  192. package/dist/SendToFields/index.js +102 -0
  193. package/dist/SendToFields/utils.js +54 -0
  194. package/dist/Settings/Category.js +30 -0
  195. package/dist/Settings/Item.js +38 -0
  196. package/dist/Settings/index.js +37 -0
  197. package/dist/Settings/utils.js +4 -0
  198. package/dist/ShareViaEmail/EmailBodyEditor.js +22 -0
  199. package/dist/ShareViaEmail/FilePicker.js +43 -0
  200. package/dist/ShareViaEmail/Form.js +101 -0
  201. package/dist/ShareViaEmail/FormikDatePicker.js +24 -0
  202. package/dist/ShareViaEmail/constants.js +14 -0
  203. package/dist/ShareViaEmail/index.js +89 -0
  204. package/dist/ShareViaEmail/utils.js +72 -0
  205. package/dist/ShareViaLink/EditURL.js +74 -0
  206. package/dist/ShareViaLink/Link.js +105 -0
  207. package/dist/ShareViaLink/QRCode.js +41 -0
  208. package/dist/ShareViaLink/RegenerateURL.js +47 -0
  209. package/dist/ShareViaLink/SocialMedia.js +52 -0
  210. package/dist/ShareViaLink/constants.js +25 -0
  211. package/dist/ShareViaLink/edit-url.scss +8 -0
  212. package/dist/ShareViaLink/index.js +46 -0
  213. package/dist/ShareViaLink/utils.js +47 -0
  214. package/dist/Sidebar/AppSwitcher/AppLink.js +45 -0
  215. package/dist/Sidebar/AppSwitcher/Backdrop.js +13 -0
  216. package/dist/Sidebar/AppSwitcher/Body.js +65 -0
  217. package/dist/Sidebar/AppSwitcher/Portal.js +27 -0
  218. package/dist/Sidebar/AppSwitcher/appswitcher.scss +164 -0
  219. package/dist/Sidebar/AppSwitcher/index.js +47 -0
  220. package/dist/Sidebar/AppSwitcher/utils.js +25 -0
  221. package/dist/Sidebar/Chevron.js +14 -0
  222. package/dist/Sidebar/FeaturedTooltip.js +19 -0
  223. package/dist/Sidebar/Footer/AppSwitcherButton.js +48 -0
  224. package/dist/Sidebar/Footer/ProfileButton.js +30 -0
  225. package/dist/Sidebar/Footer/index.js +56 -0
  226. package/dist/Sidebar/Footer/utils.js +39 -0
  227. package/dist/Sidebar/Header.js +33 -0
  228. package/dist/Sidebar/HelpSection/HelpSectionMenu.js +52 -0
  229. package/dist/Sidebar/HelpSection/index.js +32 -0
  230. package/dist/Sidebar/Links.js +112 -0
  231. package/dist/Sidebar/NavIconWrapper.js +20 -0
  232. package/dist/Sidebar/ProfileSection/LinkSection.js +36 -0
  233. package/dist/Sidebar/ProfileSection/ProfileMenu.js +48 -0
  234. package/dist/Sidebar/ProfileSection/index.js +42 -0
  235. package/dist/Sidebar/constants.js +40 -0
  236. package/dist/Sidebar/index.js +94 -0
  237. package/dist/Sidebar/sidebar.scss +379 -0
  238. package/dist/Sidebar/utils.js +18 -0
  239. package/dist/SubHeader/RightBlock/Columns.js +35 -0
  240. package/dist/SubHeader/RightBlock/Download.js +28 -0
  241. package/dist/SubHeader/RightBlock/Filter.js +31 -0
  242. package/dist/SubHeader/RightBlock/index.js +21 -0
  243. package/dist/SubHeader/RightBlock/utils.js +13 -0
  244. package/dist/SubHeader/index.js +28 -0
  245. package/dist/SubHeader/subheader.scss +78 -0
  246. package/dist/TableWrapper/index.js +18 -0
  247. package/dist/ThemeSidebar/Customize/Logo.js +39 -0
  248. package/dist/ThemeSidebar/Customize/Properties.js +170 -0
  249. package/dist/ThemeSidebar/Customize/index.js +66 -0
  250. package/dist/ThemeSidebar/Themes/ThemeCard.js +135 -0
  251. package/dist/ThemeSidebar/Themes/index.js +110 -0
  252. package/dist/ThemeSidebar/TitleBar.js +62 -0
  253. package/dist/ThemeSidebar/constants.js +127 -0
  254. package/dist/ThemeSidebar/fields/AlignmentBlock.js +50 -0
  255. package/dist/ThemeSidebar/fields/Card.js +19 -0
  256. package/dist/ThemeSidebar/fields/ColorBlock.js +19 -0
  257. package/dist/ThemeSidebar/fields/FontPickerBlock.js +35 -0
  258. package/dist/ThemeSidebar/fields/ImageBlock/ImageUploader.js +67 -0
  259. package/dist/ThemeSidebar/fields/ImageBlock/ProgressBar.js +22 -0
  260. package/dist/ThemeSidebar/fields/ImageBlock/index.js +55 -0
  261. package/dist/ThemeSidebar/fields/SelectBlock.js +24 -0
  262. package/dist/ThemeSidebar/fields/SliderBlock.js +30 -0
  263. package/dist/ThemeSidebar/fields/SwitchBlock.js +17 -0
  264. package/dist/ThemeSidebar/fields/TextBlock.js +13 -0
  265. package/dist/ThemeSidebar/fields/slider.scss +199 -0
  266. package/dist/ThemeSidebar/hooks/useDirectUploadDropzone.js +149 -0
  267. package/dist/ThemeSidebar/index.js +118 -0
  268. package/dist/ThemeSidebar/themeSidebar.scss +45 -0
  269. package/dist/ThemeSidebar/utils.js +169 -0
  270. package/dist/TimeFormat/index.js +3 -0
  271. package/dist/TimezoneMismatchModal/apis/time_zone.js +9 -0
  272. package/dist/TimezoneMismatchModal/index.js +83 -0
  273. package/dist/TimezoneMismatchModal/useTimeZoneApi.js +10 -0
  274. package/dist/TimezoneMismatchModal/utils.js +12 -0
  275. package/dist/ToggleFeatureCard/ToolTipSwitch.js +31 -0
  276. package/dist/ToggleFeatureCard/constants.js +5 -0
  277. package/dist/ToggleFeatureCard/hooks/useScrollIntoView.js +11 -0
  278. package/dist/ToggleFeatureCard/index.js +148 -0
  279. package/dist/ToggleFeatureCard/toggleFeatureCard.scss +4 -0
  280. package/package.json +28 -35
  281. package/dist/AutoSaveInput.cjs.js +0 -724
  282. package/dist/AutoSaveInput.cjs.js.map +0 -1
  283. package/dist/AutoSaveInput.js +0 -718
  284. package/dist/AutoSaveInput.js.map +0 -1
  285. package/dist/Breadcrumbs.cjs.js +0 -44
  286. package/dist/Breadcrumbs.cjs.js.map +0 -1
  287. package/dist/Breadcrumbs.js +0 -38
  288. package/dist/Breadcrumbs.js.map +0 -1
  289. package/dist/BrowserSupport.cjs.js +0 -1731
  290. package/dist/BrowserSupport.cjs.js.map +0 -1
  291. package/dist/BrowserSupport.js +0 -1725
  292. package/dist/BrowserSupport.js.map +0 -1
  293. package/dist/CalendarView.cjs.js +0 -610
  294. package/dist/CalendarView.cjs.js.map +0 -1
  295. package/dist/CalendarView.js +0 -598
  296. package/dist/CalendarView.js.map +0 -1
  297. package/dist/Codeblock.cjs.js +0 -302
  298. package/dist/Codeblock.cjs.js.map +0 -1
  299. package/dist/Codeblock.js +0 -296
  300. package/dist/Codeblock.js.map +0 -1
  301. package/dist/Columns.cjs.js +0 -248
  302. package/dist/Columns.cjs.js.map +0 -1
  303. package/dist/Columns.js.map +0 -1
  304. package/dist/ConfirmationModal.cjs.js +0 -87
  305. package/dist/ConfirmationModal.cjs.js.map +0 -1
  306. package/dist/ConfirmationModal.js.map +0 -1
  307. package/dist/Container.cjs.js +0 -1277
  308. package/dist/Container.cjs.js.map +0 -1
  309. package/dist/Container.js +0 -1271
  310. package/dist/Container.js.map +0 -1
  311. package/dist/CopyToClipboardButton.cjs.js +0 -275
  312. package/dist/CopyToClipboardButton.cjs.js.map +0 -1
  313. package/dist/CopyToClipboardButton.js +0 -269
  314. package/dist/CopyToClipboardButton.js.map +0 -1
  315. package/dist/CustomDomain.cjs.js +0 -774
  316. package/dist/CustomDomain.cjs.js.map +0 -1
  317. package/dist/CustomDomain.js +0 -747
  318. package/dist/CustomDomain.js.map +0 -1
  319. package/dist/CustomDomainDashboard.cjs.js +0 -2370
  320. package/dist/CustomDomainDashboard.cjs.js.map +0 -1
  321. package/dist/CustomDomainDashboard.js +0 -2342
  322. package/dist/CustomDomainDashboard.js.map +0 -1
  323. package/dist/DateFormat.cjs.js +0 -51
  324. package/dist/DateFormat.cjs.js.map +0 -1
  325. package/dist/DateFormat.js.map +0 -1
  326. package/dist/DateRangeFilter.cjs.js +0 -236
  327. package/dist/DateRangeFilter.cjs.js.map +0 -1
  328. package/dist/DateRangeFilter.js +0 -229
  329. package/dist/DateRangeFilter.js.map +0 -1
  330. package/dist/DynamicVariables.cjs.js +0 -189
  331. package/dist/DynamicVariables.cjs.js.map +0 -1
  332. package/dist/DynamicVariables.js +0 -183
  333. package/dist/DynamicVariables.js.map +0 -1
  334. package/dist/EmailForm.cjs.js +0 -4295
  335. package/dist/EmailForm.cjs.js.map +0 -1
  336. package/dist/EmailForm.js +0 -4265
  337. package/dist/EmailForm.js.map +0 -1
  338. package/dist/EmailPreview.cjs.js +0 -1419
  339. package/dist/EmailPreview.cjs.js.map +0 -1
  340. package/dist/EmailPreview.js +0 -1413
  341. package/dist/EmailPreview.js.map +0 -1
  342. package/dist/ErrorPage.cjs.js +0 -226
  343. package/dist/ErrorPage.cjs.js.map +0 -1
  344. package/dist/ErrorPage.js.map +0 -1
  345. package/dist/Header.cjs.js +0 -188
  346. package/dist/Header.cjs.js.map +0 -1
  347. package/dist/Header.js +0 -182
  348. package/dist/Header.js.map +0 -1
  349. package/dist/IconPicker.cjs.js +0 -1308
  350. package/dist/IconPicker.cjs.js.map +0 -1
  351. package/dist/IconPicker.js +0 -1302
  352. package/dist/IconPicker.js.map +0 -1
  353. package/dist/ImageWithFallback.cjs.js +0 -247
  354. package/dist/ImageWithFallback.cjs.js.map +0 -1
  355. package/dist/ImageWithFallback.js +0 -241
  356. package/dist/ImageWithFallback.js.map +0 -1
  357. package/dist/IntegrationCard.cjs.js +0 -409
  358. package/dist/IntegrationCard.cjs.js.map +0 -1
  359. package/dist/IntegrationCard.js +0 -403
  360. package/dist/IntegrationCard.js.map +0 -1
  361. package/dist/IntegrationDisconnectAlert.cjs.js +0 -89
  362. package/dist/IntegrationDisconnectAlert.cjs.js.map +0 -1
  363. package/dist/IntegrationDisconnectAlert.js +0 -80
  364. package/dist/IntegrationDisconnectAlert.js.map +0 -1
  365. package/dist/IntegrationWalkthroughModal.cjs.js +0 -50
  366. package/dist/IntegrationWalkthroughModal.cjs.js.map +0 -1
  367. package/dist/IntegrationWalkthroughModal.js.map +0 -1
  368. package/dist/IpRestriction.cjs.js +0 -3931
  369. package/dist/IpRestriction.cjs.js.map +0 -1
  370. package/dist/IpRestriction.js +0 -3905
  371. package/dist/IpRestriction.js.map +0 -1
  372. package/dist/KeyboardShortcuts.cjs.js +0 -2244
  373. package/dist/KeyboardShortcuts.cjs.js.map +0 -1
  374. package/dist/KeyboardShortcuts.js +0 -2237
  375. package/dist/KeyboardShortcuts.js.map +0 -1
  376. package/dist/LoginPage.cjs.js +0 -618
  377. package/dist/LoginPage.cjs.js.map +0 -1
  378. package/dist/LoginPage.js +0 -593
  379. package/dist/LoginPage.js.map +0 -1
  380. package/dist/MenuBar.cjs.js +0 -34273
  381. package/dist/MenuBar.cjs.js.map +0 -1
  382. package/dist/MenuBar.js +0 -34267
  383. package/dist/MenuBar.js.map +0 -1
  384. package/dist/Metadata.cjs.js +0 -272
  385. package/dist/Metadata.cjs.js.map +0 -1
  386. package/dist/Metadata.js +0 -266
  387. package/dist/Metadata.js.map +0 -1
  388. package/dist/MoreDropdown.cjs.js +0 -168
  389. package/dist/MoreDropdown.cjs.js.map +0 -1
  390. package/dist/MoreDropdown.js.map +0 -1
  391. package/dist/NavigationHeader.cjs.js +0 -756
  392. package/dist/NavigationHeader.cjs.js.map +0 -1
  393. package/dist/NavigationHeader.js +0 -750
  394. package/dist/NavigationHeader.js.map +0 -1
  395. package/dist/NeetoWidget.cjs.js +0 -3375
  396. package/dist/NeetoWidget.cjs.js.map +0 -1
  397. package/dist/NeetoWidget.js +0 -3348
  398. package/dist/NeetoWidget.js.map +0 -1
  399. package/dist/PageLoader.cjs.js +0 -158
  400. package/dist/PageLoader.cjs.js.map +0 -1
  401. package/dist/PageLoader.js +0 -134
  402. package/dist/PageLoader.js.map +0 -1
  403. package/dist/PhoneNumber.cjs.js +0 -7021
  404. package/dist/PhoneNumber.cjs.js.map +0 -1
  405. package/dist/PhoneNumber.js +0 -6989
  406. package/dist/PhoneNumber.js.map +0 -1
  407. package/dist/PublishBlock.cjs.js +0 -224
  408. package/dist/PublishBlock.cjs.js.map +0 -1
  409. package/dist/PublishBlock.js +0 -218
  410. package/dist/PublishBlock.js.map +0 -1
  411. package/dist/Rename.cjs.js +0 -516
  412. package/dist/Rename.cjs.js.map +0 -1
  413. package/dist/Rename.js +0 -510
  414. package/dist/Rename.js.map +0 -1
  415. package/dist/ResponsiveDevicePicker.cjs.js +0 -260
  416. package/dist/ResponsiveDevicePicker.cjs.js.map +0 -1
  417. package/dist/ResponsiveDevicePicker.js +0 -254
  418. package/dist/ResponsiveDevicePicker.js.map +0 -1
  419. package/dist/Schedule.cjs.js +0 -1077
  420. package/dist/Schedule.cjs.js.map +0 -1
  421. package/dist/Schedule.js +0 -1046
  422. package/dist/Schedule.js.map +0 -1
  423. package/dist/Scrollable.cjs.js +0 -188
  424. package/dist/Scrollable.cjs.js.map +0 -1
  425. package/dist/Scrollable.js +0 -182
  426. package/dist/Scrollable.js.map +0 -1
  427. package/dist/Security.cjs.js +0 -1921
  428. package/dist/Security.cjs.js.map +0 -1
  429. package/dist/Security.js +0 -1895
  430. package/dist/Security.js.map +0 -1
  431. package/dist/SendToFields.cjs.js +0 -2524
  432. package/dist/SendToFields.cjs.js.map +0 -1
  433. package/dist/SendToFields.js +0 -2517
  434. package/dist/SendToFields.js.map +0 -1
  435. package/dist/Settings.cjs.js +0 -501
  436. package/dist/Settings.cjs.js.map +0 -1
  437. package/dist/Settings.js +0 -495
  438. package/dist/Settings.js.map +0 -1
  439. package/dist/ShareViaEmail.cjs.js +0 -4272
  440. package/dist/ShareViaEmail.cjs.js.map +0 -1
  441. package/dist/ShareViaEmail.js +0 -4246
  442. package/dist/ShareViaEmail.js.map +0 -1
  443. package/dist/ShareViaLink.cjs.js +0 -1512
  444. package/dist/ShareViaLink.cjs.js.map +0 -1
  445. package/dist/ShareViaLink.js +0 -1486
  446. package/dist/ShareViaLink.js.map +0 -1
  447. package/dist/Sidebar.cjs.js +0 -34985
  448. package/dist/Sidebar.cjs.js.map +0 -1
  449. package/dist/Sidebar.js +0 -34959
  450. package/dist/Sidebar.js.map +0 -1
  451. package/dist/SubHeader.cjs.js +0 -283
  452. package/dist/SubHeader.cjs.js.map +0 -1
  453. package/dist/SubHeader.js +0 -276
  454. package/dist/SubHeader.js.map +0 -1
  455. package/dist/TableWrapper.cjs.js +0 -87
  456. package/dist/TableWrapper.cjs.js.map +0 -1
  457. package/dist/TableWrapper.js +0 -81
  458. package/dist/TableWrapper.js.map +0 -1
  459. package/dist/ThemeSidebar.cjs.js +0 -13705
  460. package/dist/ThemeSidebar.cjs.js.map +0 -1
  461. package/dist/ThemeSidebar.js +0 -13680
  462. package/dist/ThemeSidebar.js.map +0 -1
  463. package/dist/TimeFormat.cjs.js +0 -53
  464. package/dist/TimeFormat.cjs.js.map +0 -1
  465. package/dist/TimeFormat.js +0 -47
  466. package/dist/TimeFormat.js.map +0 -1
  467. package/dist/TimezoneMismatchModal.cjs.js +0 -176
  468. package/dist/TimezoneMismatchModal.cjs.js.map +0 -1
  469. package/dist/TimezoneMismatchModal.js +0 -168
  470. package/dist/TimezoneMismatchModal.js.map +0 -1
  471. package/dist/ToggleFeatureCard.cjs.js +0 -389
  472. package/dist/ToggleFeatureCard.cjs.js.map +0 -1
  473. package/dist/ToggleFeatureCard.js +0 -383
  474. package/dist/ToggleFeatureCard.js.map +0 -1
@@ -0,0 +1,129 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import React from "react";
3
+ import classnames from "classnames";
4
+ import { isNotEmpty, isPresent } from "@bigbinary/neeto-commons-frontend/pure";
5
+ import { withT } from "@bigbinary/neeto-commons-frontend/react-utils";
6
+ import { EditorContent } from "@bigbinary/neeto-editor";
7
+ import { Typography, Button } from "@bigbinary/neetoui";
8
+ import PropTypes from "prop-types";
9
+ var MemoizedEditorContent = /*#__PURE__*/React.memo(EditorContent);
10
+ var EmailPreview = withT(function (_ref) {
11
+ var t = _ref.t,
12
+ _ref$to = _ref.to,
13
+ to = _ref$to === void 0 ? [] : _ref$to,
14
+ from = _ref.from,
15
+ subject = _ref.subject,
16
+ body = _ref.body,
17
+ productName = _ref.productName,
18
+ actionButtonText = _ref.actionButtonText,
19
+ logo = _ref.logo,
20
+ _ref$className = _ref.className,
21
+ className = _ref$className === void 0 ? "" : _ref$className;
22
+ return /*#__PURE__*/React.createElement("div", {
23
+ "data-cy": "email-preview-card",
24
+ "data-testid": "email-preview",
25
+ className: classnames("neeto-ui-border-gray-300 neeto-ui-shadow-m neeto-ui-bg-white flex flex-1 flex-col border", _defineProperty({}, className, className))
26
+ }, /*#__PURE__*/React.createElement("div", {
27
+ className: "neeto-ui-border-gray-300 space-y-3 divide-y divide-gray-200 border-b p-6"
28
+ }, /*#__PURE__*/React.createElement("div", {
29
+ className: "flex gap-2",
30
+ "data-cy": "email-send-to-preview",
31
+ "data-testid": "email-to-block"
32
+ }, /*#__PURE__*/React.createElement(Typography, {
33
+ className: "neeto-ui-text-gray-500",
34
+ lineHeight: "normal",
35
+ style: "body2"
36
+ }, t("neetoMolecules.emailPreview.to"), ":"), isPresent(to) && isNotEmpty(to) ? /*#__PURE__*/React.createElement(Typography, {
37
+ className: "neeto-ui-text-gray-800 min-w-0 flex-grow break-words",
38
+ lineHeight: "normal",
39
+ style: "body2"
40
+ }, to.join(", ")) : /*#__PURE__*/React.createElement("div", {
41
+ className: "neeto-ui-bg-gray-300 neeto-ui-rounded-full mt-2 h-2 w-40"
42
+ })), from && /*#__PURE__*/React.createElement("div", {
43
+ className: "flex items-center gap-2 pt-3"
44
+ }, /*#__PURE__*/React.createElement(Typography, {
45
+ className: "neeto-ui-text-gray-500",
46
+ lineHeight: "normal",
47
+ style: "body2"
48
+ }, t("neetoMolecules.emailPreview.from"), ":"), /*#__PURE__*/React.createElement(Typography, {
49
+ className: "neeto-ui-text-gray-800 min-w-0 flex-grow break-words",
50
+ "data-cy": "email-send-from-preview",
51
+ lineHeight: "normal",
52
+ style: "body2"
53
+ }, from)), /*#__PURE__*/React.createElement("div", {
54
+ className: "flex items-center gap-2 pt-3"
55
+ }, /*#__PURE__*/React.createElement(Typography, {
56
+ className: "neeto-ui-text-gray-500",
57
+ lineHeight: "normal",
58
+ style: "body2"
59
+ }, t("neetoMolecules.emailPreview.subject"), ":"), /*#__PURE__*/React.createElement(Typography, {
60
+ className: "neeto-ui-text-gray-800 min-w-0 flex-grow break-words",
61
+ "data-cy": "email-subject-preview",
62
+ lineHeight: "normal",
63
+ style: "body2"
64
+ }, subject || /*#__PURE__*/React.createElement("span", {
65
+ className: "neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-40"
66
+ })))), /*#__PURE__*/React.createElement("div", {
67
+ className: "neeto-ui-text-gray-800 flex flex-1 flex-col justify-between space-y-6 p-6 pr-10 text-base leading-relaxed",
68
+ "data-cy": "email-body-preview-container"
69
+ }, body ? /*#__PURE__*/React.createElement(MemoizedEditorContent, {
70
+ content: body
71
+ }) : /*#__PURE__*/React.createElement("div", {
72
+ className: "space-y-4"
73
+ }, /*#__PURE__*/React.createElement("div", {
74
+ className: "neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-80"
75
+ }), /*#__PURE__*/React.createElement("div", {
76
+ className: "neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-72"
77
+ }), /*#__PURE__*/React.createElement("div", {
78
+ className: "neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-80"
79
+ })), actionButtonText && /*#__PURE__*/React.createElement("div", {
80
+ className: "mt-6 flex w-full items-center justify-center"
81
+ }, /*#__PURE__*/React.createElement(Button, {
82
+ className: "pointer-events-none",
83
+ label: actionButtonText
84
+ })), logo && /*#__PURE__*/React.createElement("img", {
85
+ alt: t("neetoMolecules.emailPreview.logoAltText"),
86
+ className: "h-20 w-36 object-cover",
87
+ "data-cy": "company-logo-preview",
88
+ src: logo
89
+ })), productName && /*#__PURE__*/React.createElement("div", {
90
+ className: "neeto-ui-bg-gray-100 mt-auto p-2",
91
+ "data-testid": "product-name-block"
92
+ }, /*#__PURE__*/React.createElement(Typography, {
93
+ className: "neeto-ui-text-gray-600 text-center leading-6",
94
+ style: "body3"
95
+ }, t("neetoMolecules.emailPreview.poweredBy"), /*#__PURE__*/React.createElement("span", {
96
+ className: "neeto-ui-text-gray-800 font-medium"
97
+ }, productName))));
98
+ });
99
+ EmailPreview.propTypes = {
100
+ /**
101
+ * The value of the send-to field.
102
+ */
103
+ to: PropTypes.arrayOf(PropTypes.string),
104
+ /**
105
+ * The value of the send-from field.
106
+ */
107
+ from: PropTypes.string,
108
+ /**
109
+ * The subject of the email.
110
+ */
111
+ subject: PropTypes.string,
112
+ /**
113
+ * The body of the email.
114
+ */
115
+ body: PropTypes.string,
116
+ /**
117
+ * The name of the neeto product to be previewed.
118
+ */
119
+ productName: PropTypes.string,
120
+ /**
121
+ * The text to be shown in the action button.
122
+ */
123
+ actionButtonText: PropTypes.string,
124
+ /**
125
+ * Source link for the company logo.
126
+ */
127
+ logo: PropTypes.string
128
+ };
129
+ export default EmailPreview;
@@ -0,0 +1,55 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import React from "react";
3
+ import { useFormikContext } from "formik";
4
+ import { isNotEmpty } from "@bigbinary/neeto-commons-frontend/pure";
5
+ import { Info } from "@bigbinary/neeto-icons";
6
+ import { Select, Input } from "@bigbinary/neetoui/formik";
7
+ import { useTranslation } from "react-i18next";
8
+ var ReplyToField = function ReplyToField(_ref) {
9
+ var _helpIconProps2;
10
+ var replyToOptions = _ref.replyToOptions;
11
+ var _useTranslation = useTranslation(),
12
+ t = _useTranslation.t;
13
+ var isDropdownField = isNotEmpty(replyToOptions);
14
+ var _useFormikContext = useFormikContext(),
15
+ setFieldValue = _useFormikContext.setFieldValue;
16
+ if (isDropdownField) {
17
+ var _helpIconProps;
18
+ return /*#__PURE__*/React.createElement(Select, {
19
+ className: "w-full",
20
+ "data-testid": "replyToOptions",
21
+ label: t("neetoMolecules.emailForm.labels.replyTo"),
22
+ name: "replyTo",
23
+ options: replyToOptions,
24
+ labelProps: {
25
+ helpIconProps: (_helpIconProps = {
26
+ icon: Info
27
+ }, _defineProperty(_helpIconProps, "data-testid", "reply-to-tooltip"), _defineProperty(_helpIconProps, "tooltipProps", {
28
+ content: t("neetoMolecules.emailForm.tooltips.replyTo")
29
+ }), _helpIconProps)
30
+ },
31
+ onChange: function onChange(_ref2) {
32
+ var value = _ref2.value;
33
+ return setFieldValue("replyTo", value);
34
+ }
35
+ });
36
+ }
37
+ return /*#__PURE__*/React.createElement(Input, {
38
+ autoFocus: true,
39
+ required: true,
40
+ className: "w-full",
41
+ "data-testid": "replyToInput",
42
+ label: t("neetoMolecules.emailForm.labels.replyTo"),
43
+ name: "replyTo",
44
+ placeholder: t("neetoMolecules.emailForm.placeholders.emailPlaceholder"),
45
+ size: "large",
46
+ labelProps: {
47
+ helpIconProps: (_helpIconProps2 = {
48
+ icon: Info
49
+ }, _defineProperty(_helpIconProps2, "data-testid", "reply-to-tooltip"), _defineProperty(_helpIconProps2, "tooltipProps", {
50
+ content: t("neetoMolecules.emailForm.tooltips.replyTo")
51
+ }), _helpIconProps2)
52
+ }
53
+ });
54
+ };
55
+ export default ReplyToField;
@@ -0,0 +1,27 @@
1
+ import React from "react";
2
+ import { withT } from "@bigbinary/neeto-commons-frontend/react-utils";
3
+ import SendToFields from "../SendToFields";
4
+ var SendToField = withT(function (_ref) {
5
+ var t = _ref.t;
6
+ return /*#__PURE__*/React.createElement(SendToFields, {
7
+ showCcBccButton: true,
8
+ showUploadCsvButton: true,
9
+ bccInputProps: {
10
+ label: t("neetoMolecules.emailForm.labels.bCc"),
11
+ name: "sendToBcc",
12
+ placeholder: t("neetoMolecules.emailForm.placeholders.commaSeparatedEmails")
13
+ },
14
+ ccInputProps: {
15
+ label: t("neetoMolecules.emailForm.labels.cc"),
16
+ name: "sendToCc",
17
+ placeholder: t("neetoMolecules.emailForm.placeholders.commaSeparatedEmails")
18
+ },
19
+ emailInputProps: {
20
+ id: "sendTo",
21
+ name: "sendTo",
22
+ label: t("neetoMolecules.emailForm.labels.sendTo"),
23
+ placeholder: t("neetoMolecules.emailForm.placeholders.commaSeparatedEmails")
24
+ }
25
+ });
26
+ });
27
+ export default SendToField;
@@ -0,0 +1,64 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+ import React, { useState } from "react";
3
+ import { withEventTargetValue } from "@bigbinary/neeto-commons-frontend/utils";
4
+ import { Input, Typography } from "@bigbinary/neetoui";
5
+ import { Trans, useTranslation } from "react-i18next";
6
+ import DynamicVariables from "../DynamicVariables";
7
+ var SubjectField = function SubjectField(_ref) {
8
+ var name = _ref.name,
9
+ text = _ref.text,
10
+ updateText = _ref.updateText,
11
+ _ref$subjectVariables = _ref.subjectVariables,
12
+ subjectVariables = _ref$subjectVariables === void 0 ? [] : _ref$subjectVariables,
13
+ error = _ref.error,
14
+ _ref$required = _ref.required,
15
+ required = _ref$required === void 0 ? false : _ref$required;
16
+ var _useState = useState(false),
17
+ _useState2 = _slicedToArray(_useState, 2),
18
+ isFieldFocusedOnce = _useState2[0],
19
+ setIsFieldFocusedOnce = _useState2[1];
20
+ var _useTranslation = useTranslation(),
21
+ t = _useTranslation.t;
22
+ var tagClickHandler = function tagClickHandler(_ref2) {
23
+ var slug = _ref2.key;
24
+ var textAreaElement = document.querySelector("textarea[name=".concat(name, "]"));
25
+ var splitIndex = isFieldFocusedOnce && textAreaElement ? textAreaElement.selectionEnd : text.length;
26
+ var updatedSubject = [text.slice(0, splitIndex), " {{".concat(slug, "}}"), text.slice(splitIndex)].join("");
27
+ updateText(updatedSubject);
28
+ };
29
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Input, {
30
+ error: error,
31
+ name: name,
32
+ required: required,
33
+ label: t("neetoMolecules.emailForm.labels.subject"),
34
+ size: "large",
35
+ value: text,
36
+ suffix: /*#__PURE__*/React.createElement(DynamicVariables, {
37
+ variables: subjectVariables,
38
+ dropdownProps: {
39
+ className: "neeto-ui-dropdown__popup overflow-y-auto",
40
+ buttonSize: "small"
41
+ },
42
+ onVariableClick: tagClickHandler
43
+ }),
44
+ onChange: withEventTargetValue(updateText),
45
+ onFocus: function onFocus() {
46
+ return setIsFieldFocusedOnce(true);
47
+ }
48
+ }), /*#__PURE__*/React.createElement(Typography, {
49
+ className: "neeto-ui-text-gray-600 mt-2",
50
+ "data-cy": "subject-input-variable-label",
51
+ style: "body3"
52
+ }, /*#__PURE__*/React.createElement(Trans, {
53
+ components: {
54
+ span: /*#__PURE__*/React.createElement("span", {
55
+ className: "font-semibold"
56
+ })
57
+ },
58
+ i18nKey: "neetoMolecules.emailForm.helpText",
59
+ values: {
60
+ type: "subject"
61
+ }
62
+ })));
63
+ };
64
+ export default SubjectField;
@@ -0,0 +1,33 @@
1
+ import { t } from "i18next";
2
+ import { isEditorEmpty } from "@bigbinary/neeto-editor";
3
+ import { prop } from "ramda";
4
+ import * as yup from "yup";
5
+ export var INITIAL_FORM_VALUES = {
6
+ sendTo: [],
7
+ sendToCc: [],
8
+ sendToBcc: [],
9
+ replyTo: "",
10
+ showCopyEmails: false,
11
+ subject: "",
12
+ message: ""
13
+ };
14
+ export var EMAIL_FORM_VALIDATION_SCHEMA = yup.object({
15
+ subject: yup.string().required(t("neetoMolecules.emailForm.errors.subjectRequired")),
16
+ message: yup.string().test("message", t("neetoMolecules.emailForm.errors.messageRequired"), function (value) {
17
+ return !isEditorEmpty(value);
18
+ })
19
+ });
20
+ export var SEND_TO_FIELD_VALIDATION = yup.object({
21
+ sendTo: yup.array().min(1, t("neetoMolecules.emailForm.errors.required", {
22
+ entity: t("neetoMolecules.emailForm.fields.sendToEmailAddress")
23
+ })).test("all-emails-valid", t("neetoMolecules.emailForm.errors.invalidEmailAddress"), function (emails) {
24
+ return emails === null || emails === void 0 ? void 0 : emails.every(prop("valid"));
25
+ }).nullable()
26
+ });
27
+ export var REPLY_TO_FIELD_VALIDATION = yup.object({
28
+ replyTo: yup.string().nullable().email(t("neetoMolecules.emailForm.errors.invalidEmailAddress")).required(t("neetoMolecules.emailForm.errors.required", {
29
+ entity: t("neetoMolecules.emailForm.fields.replyToEmailAddress")
30
+ }))
31
+ });
32
+ export var EDITOR_ADDONS = ["highlight", "emoji", "code-block", "block-quote", "image-upload", "divider", "video-embed"];
33
+ export var ALLOWED_FILE_PICKER_TYPES = [".csv"];
@@ -0,0 +1,7 @@
1
+ /* eslint-disable @bigbinary/neeto/use-zustand-for-global-state-management */
2
+ import React from "react";
3
+ var EmailFormContext = /*#__PURE__*/React.createContext({
4
+ showSendToField: false,
5
+ showReplyToField: false
6
+ });
7
+ export { EmailFormContext };
@@ -0,0 +1,4 @@
1
+ import EmailForm from "./EmailForm";
2
+ import EmailFormProvider from "./EmailFormProvider";
3
+ import EmailPreview from "./EmailPreview";
4
+ export { EmailFormProvider, EmailForm, EmailPreview };
@@ -0,0 +1,10 @@
1
+ import { EMAIL_FORM_VALIDATION_SCHEMA, REPLY_TO_FIELD_VALIDATION, SEND_TO_FIELD_VALIDATION } from "./constants";
2
+ export var getValidationSchema = function getValidationSchema(_ref) {
3
+ var showSendToField = _ref.showSendToField,
4
+ showReplyToField = _ref.showReplyToField,
5
+ customValidations = _ref.customValidations;
6
+ var schema = EMAIL_FORM_VALIDATION_SCHEMA.clone();
7
+ if (showSendToField) schema = schema.concat(SEND_TO_FIELD_VALIDATION);
8
+ if (showReplyToField) schema = schema.concat(REPLY_TO_FIELD_VALIDATION);
9
+ return schema.shape(customValidations);
10
+ };
@@ -0,0 +1,2 @@
1
+ import EmailPreview from "../EmailForm/EmailPreview";
2
+ export default EmailPreview;
@@ -1,202 +1,63 @@
1
- import * as React from 'react';
2
- import React__default, { useEffect } from 'react';
3
- import { useErrorDisplayStore } from '@bigbinary/neeto-commons-frontend/react-utils';
4
- import { Typography, Button } from '@bigbinary/neetoui';
5
- import { pick } from 'ramda';
6
- import { Helmet } from 'react-helmet';
7
- import { useTranslation, Trans } from 'react-i18next';
8
-
9
- function _extends$3() {
10
- _extends$3 = Object.assign ? Object.assign.bind() : function (target) {
11
- for (var i = 1; i < arguments.length; i++) {
12
- var source = arguments[i];
13
- for (var key in source) {
14
- if (Object.prototype.hasOwnProperty.call(source, key)) {
15
- target[key] = source[key];
16
- }
17
- }
18
- }
19
- return target;
20
- };
21
- return _extends$3.apply(this, arguments);
22
- }
23
-
24
- function shallow(objA, objB) {
25
- if (Object.is(objA, objB)) {
26
- return true;
27
- }
28
- if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) {
29
- return false;
30
- }
31
- if (objA instanceof Map && objB instanceof Map) {
32
- if (objA.size !== objB.size)
33
- return false;
34
- for (const [key, value] of objA) {
35
- if (!Object.is(value, objB.get(key))) {
36
- return false;
37
- }
38
- }
39
- return true;
40
- }
41
- if (objA instanceof Set && objB instanceof Set) {
42
- if (objA.size !== objB.size)
43
- return false;
44
- for (const value of objA) {
45
- if (!objB.has(value)) {
46
- return false;
47
- }
48
- }
49
- return true;
50
- }
51
- const keysA = Object.keys(objA);
52
- if (keysA.length !== Object.keys(objB).length) {
53
- return false;
54
- }
55
- for (let i = 0; i < keysA.length; i++) {
56
- if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !Object.is(objA[keysA[i]], objB[keysA[i]])) {
57
- return false;
58
- }
59
- }
60
- return true;
61
- }
62
-
63
- var _path$2, _path2$2;
64
- function _extends$2() { _extends$2 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
65
- var SvgInternalServerError = function SvgInternalServerError(props) {
66
- return /*#__PURE__*/React.createElement("svg", _extends$2({
67
- xmlns: "http://www.w3.org/2000/svg",
68
- width: 120,
69
- height: 120,
70
- fill: "none"
71
- }, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
1
+ import React from "react";
2
+ var InternalServerErrorImage = function InternalServerErrorImage(props) {
3
+ return /*#__PURE__*/React.createElement("svg", props, /*#__PURE__*/React.createElement("path", {
72
4
  fill: "#1D1D1F",
73
5
  d: "M120 60c0-33.137-26.863-60-60-60H0v120h120V60Z"
74
- })), _path2$2 || (_path2$2 = /*#__PURE__*/React.createElement("path", {
6
+ }), /*#__PURE__*/React.createElement("path", {
75
7
  fill: "#fff",
76
8
  d: "M30.602 107.562c2.343 0 4.421-.484 6.234-1.453 1.812-.984 3.234-2.343 4.266-4.078 1.03-1.734 1.546-3.726 1.546-5.976v-.047c0-2.172-.484-4.094-1.453-5.766a10.432 10.432 0 0 0-3.96-3.984c-1.672-.969-3.594-1.453-5.766-1.453-1.094 0-2.125.132-3.094.398a9.096 9.096 0 0 0-2.625 1.172 7.204 7.204 0 0 0-1.969 1.922h-.093l1.148-11.367h15.89v-3.75H21.368l-1.734 19.289h3.726c.22-.39.461-.75.727-1.078.281-.329.57-.633.867-.914a7.185 7.185 0 0 1 2.578-1.524c.985-.344 2.047-.516 3.188-.516 1.5 0 2.828.329 3.984.985a7.101 7.101 0 0 1 2.719 2.719c.672 1.14 1.008 2.453 1.008 3.937v.047c0 1.516-.328 2.86-.985 4.031a7.056 7.056 0 0 1-2.742 2.719c-1.172.656-2.523.984-4.055.984-1.343 0-2.554-.257-3.632-.773-1.078-.516-1.953-1.219-2.625-2.109a6.34 6.34 0 0 1-1.22-3.024l-.023-.187H19l.023.257c.172 1.829.766 3.461 1.782 4.899 1.015 1.437 2.36 2.57 4.03 3.398 1.688.828 3.61 1.242 5.767 1.242ZM58.844 107.562c2.593 0 4.82-.71 6.68-2.132 1.859-1.422 3.28-3.438 4.265-6.047 1-2.61 1.5-5.703 1.5-9.281v-.047c0-3.578-.5-6.672-1.5-9.282-.984-2.609-2.406-4.617-4.266-6.023-1.859-1.422-4.085-2.133-6.68-2.133-2.593 0-4.82.711-6.679 2.133-1.844 1.406-3.258 3.414-4.242 6.023-.984 2.61-1.477 5.704-1.477 9.282v.047c0 3.578.492 6.671 1.477 9.28.984 2.61 2.398 4.626 4.242 6.048 1.86 1.422 4.086 2.132 6.68 2.132Zm0-3.679c-1.719 0-3.188-.555-4.407-1.664-1.218-1.125-2.148-2.719-2.789-4.781-.64-2.063-.96-4.508-.96-7.336v-.047c0-2.828.32-5.266.96-7.313.641-2.062 1.57-3.648 2.79-4.758 1.218-1.109 2.687-1.664 4.406-1.664 1.718 0 3.187.555 4.406 1.664 1.234 1.11 2.172 2.696 2.813 4.758.656 2.047.984 4.485.984 7.313v.047c0 2.828-.328 5.273-.984 7.335-.641 2.063-1.579 3.657-2.813 4.782-1.219 1.109-2.688 1.664-4.406 1.664ZM87.953 107.562c2.594 0 4.82-.71 6.68-2.132 1.86-1.422 3.281-3.438 4.265-6.047 1-2.61 1.5-5.703 1.5-9.281v-.047c0-3.578-.5-6.672-1.5-9.282-.984-2.609-2.406-4.617-4.265-6.023-1.86-1.422-4.086-2.133-6.68-2.133-2.594 0-4.82.711-6.68 2.133-1.843 1.406-3.257 3.414-4.242 6.023-.984 2.61-1.476 5.704-1.476 9.282v.047c0 3.578.492 6.671 1.476 9.28.985 2.61 2.399 4.626 4.242 6.048 1.86 1.422 4.086 2.132 6.68 2.132Zm0-3.679c-1.719 0-3.187-.555-4.406-1.664-1.219-1.125-2.149-2.719-2.79-4.781-.64-2.063-.96-4.508-.96-7.336v-.047c0-2.828.32-5.266.96-7.313.641-2.062 1.571-3.648 2.79-4.758 1.219-1.109 2.687-1.664 4.406-1.664 1.719 0 3.188.555 4.406 1.664 1.235 1.11 2.172 2.696 2.813 4.758.656 2.047.984 4.485.984 7.313v.047c0 2.828-.328 5.273-.984 7.335-.64 2.063-1.578 3.657-2.813 4.782-1.218 1.109-2.687 1.664-4.406 1.664Z"
77
- })));
9
+ }));
78
10
  };
79
-
80
- var _path$1, _path2$1;
81
- function _extends$1() { _extends$1 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
82
- var SvgPageNotFound = function SvgPageNotFound(props) {
83
- return /*#__PURE__*/React.createElement("svg", _extends$1({
84
- xmlns: "http://www.w3.org/2000/svg",
85
- width: 121,
86
- height: 120,
87
- fill: "none"
88
- }, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
11
+ InternalServerErrorImage.defaultProps = {
12
+ xmlns: "http://www.w3.org/2000/svg",
13
+ width: "120",
14
+ height: "120",
15
+ fill: "none"
16
+ };
17
+ var PageNotFoundImage = function PageNotFoundImage(props) {
18
+ return /*#__PURE__*/React.createElement("svg", props, /*#__PURE__*/React.createElement("path", {
89
19
  fill: "#1D1D1F",
90
20
  d: "M120.5 60c0-33.137-26.863-60-60-60H.5v120h120V60Z"
91
- })), _path2$1 || (_path2$1 = /*#__PURE__*/React.createElement("path", {
21
+ }), /*#__PURE__*/React.createElement("path", {
92
22
  fill: "#fff",
93
23
  d: "M35.501 106.909h3.164v-7.838h5.154v-2.876h-5.154V72.32h-4.77a2440.935 2440.935 0 0 1-3.188 4.77 823.85 823.85 0 0 0-3.188 4.746 2487.114 2487.114 0 0 1-3.188 4.77l-3.212 4.747c-1.055 1.582-2.11 3.172-3.164 4.77v2.948h17.546v7.838ZM21.24 96.195v-.072a945.042 945.042 0 0 1 2.828-4.195l2.829-4.17 2.828-4.172c.943-1.39 1.886-2.772 2.829-4.147.943-1.39 1.886-2.788 2.828-4.194h.12v20.95H21.24ZM59.879 107.461c2.605 0 4.842-.719 6.712-2.158 1.87-1.454 3.3-3.507 4.29-6.16 1.007-2.669 1.51-5.833 1.51-9.492v-.072c0-3.644-.503-6.8-1.51-9.468-.99-2.669-2.42-4.723-4.29-6.16-1.87-1.455-4.107-2.182-6.712-2.182-2.605 0-4.842.727-6.712 2.181-1.853 1.438-3.284 3.492-4.29 6.16-.991 2.653-1.487 5.81-1.487 9.469v.072c0 3.643.496 6.8 1.487 9.468 1.006 2.653 2.437 4.706 4.29 6.16 1.87 1.455 4.107 2.182 6.712 2.182Zm0-2.877c-1.934 0-3.588-.607-4.962-1.822-1.374-1.214-2.429-2.94-3.164-5.177-.72-2.237-1.079-4.882-1.079-7.934v-.072c0-3.052.36-5.697 1.079-7.934.735-2.237 1.79-3.963 3.164-5.178 1.374-1.214 3.028-1.822 4.962-1.822 1.934 0 3.587.608 4.962 1.822 1.39 1.215 2.453 2.94 3.188 5.178.735 2.221 1.102 4.866 1.102 7.934v.072c0 3.052-.367 5.697-1.102 7.934-.735 2.237-1.798 3.963-3.188 5.177-1.375 1.215-3.028 1.822-4.962 1.822ZM93.893 106.909h3.164v-7.838h5.153v-2.876h-5.153V72.32h-4.77a2487.163 2487.163 0 0 1-3.189 4.77 829.054 829.054 0 0 0-3.188 4.746 2534.647 2534.647 0 0 1-3.188 4.77c-1.07 1.583-2.14 3.165-3.212 4.747-1.054 1.582-2.109 3.172-3.164 4.77v2.948h17.547v7.838ZM79.63 96.195v-.072a953.801 953.801 0 0 1 2.829-4.195l2.828-4.17 2.829-4.172c.943-1.39 1.885-2.772 2.828-4.147.943-1.39 1.886-2.788 2.829-4.194h.12v20.95H79.63Z"
94
- })));
24
+ }));
25
+ };
26
+ PageNotFoundImage.defaultProps = {
27
+ xmlns: "http://www.w3.org/2000/svg",
28
+ width: "121",
29
+ height: "120",
30
+ fill: "none"
95
31
  };
96
-
97
- var _path, _path2;
98
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
99
- var SvgUnauthorized = function SvgUnauthorized(props) {
100
- return /*#__PURE__*/React.createElement("svg", _extends({
101
- xmlns: "http://www.w3.org/2000/svg",
102
- width: 120,
103
- height: 120,
104
- fill: "none"
105
- }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
32
+ var UnauthorizedImage = function UnauthorizedImage(props) {
33
+ return /*#__PURE__*/React.createElement("svg", props, /*#__PURE__*/React.createElement("path", {
106
34
  fill: "#1D1D1F",
107
35
  d: "M120 60c0-33.137-26.863-60-60-60H0v120h120V60Z"
108
- })), _path2 || (_path2 = /*#__PURE__*/React.createElement("path", {
36
+ }), /*#__PURE__*/React.createElement("path", {
109
37
  fill: "#fff",
110
38
  d: "M32.913 105.236h4.205v-7.143h4.873v-3.846h-4.873V70.764h-6.283a569.118 569.118 0 0 0-2.962 4.515 396.499 396.499 0 0 0-3.01 4.659 611.785 611.785 0 0 0-3.01 4.73l-2.963 4.777a3496.03 3496.03 0 0 1-2.89 4.73v3.918h16.913v7.143ZM20.348 94.271v-.24c.78-1.29 1.576-2.587 2.389-3.893l2.484-3.966a843.046 843.046 0 0 1 2.532-3.941l2.485-3.846c.828-1.274 1.64-2.508 2.436-3.703h.263v19.589h-12.59ZM59.716 106c2.58 0 4.786-.733 6.617-2.198 1.832-1.465 3.241-3.543 4.228-6.235.988-2.691 1.481-5.876 1.481-9.555v-.048c0-3.679-.493-6.856-1.48-9.531-.988-2.692-2.397-4.77-4.229-6.235C64.502 70.733 62.296 70 59.716 70c-2.564 0-4.762.733-6.593 2.198-1.816 1.465-3.217 3.543-4.205 6.235-.971 2.675-1.457 5.852-1.457 9.531v.048c0 3.679.486 6.864 1.457 9.555.988 2.692 2.39 4.77 4.205 6.235 1.831 1.465 4.029 2.198 6.593 2.198Zm0-3.75c-1.656 0-3.082-.582-4.276-1.744-1.179-1.163-2.086-2.803-2.723-4.921-.621-2.134-.932-4.659-.932-7.573v-.048c0-2.914.31-5.43.932-7.549.637-2.118 1.544-3.75 2.723-4.897 1.194-1.162 2.62-1.744 4.276-1.744 1.688 0 3.121.582 4.3 1.744 1.194 1.147 2.11 2.78 2.747 4.897.637 2.118.956 4.635.956 7.55v.047c0 2.914-.319 5.439-.956 7.573-.637 2.118-1.553 3.758-2.747 4.921-1.179 1.162-2.612 1.744-4.3 1.744ZM90.341 105.809c2.31 0 4.364-.43 6.163-1.29 1.8-.876 3.217-2.07 4.252-3.583 1.036-1.513 1.553-3.225 1.553-5.136v-.048c0-2.453-.78-4.42-2.34-5.9-1.546-1.498-3.576-2.35-6.092-2.557V87.2c1.433-.303 2.699-.82 3.798-1.553 1.099-.733 1.959-1.648 2.58-2.747.621-1.1.931-2.357.931-3.775v-.047c0-1.752-.453-3.289-1.361-4.61-.892-1.339-2.158-2.382-3.799-3.13-1.624-.765-3.535-1.147-5.733-1.147-2.15 0-4.053.39-5.71 1.17-1.64.781-2.961 1.872-3.965 3.273-.987 1.402-1.576 3.042-1.767 4.921l-.024.24h4.133l.023-.24c.128-1.162.51-2.166 1.147-3.01.637-.844 1.481-1.489 2.532-1.934 1.067-.462 2.278-.693 3.631-.693 1.402 0 2.588.223 3.56.669.987.445 1.736 1.09 2.245 1.935.51.844.765 1.87.765 3.081v.048c0 1.147-.295 2.174-.884 3.082-.59.891-1.41 1.6-2.46 2.126-1.052.51-2.262.764-3.632.764h-4.133v3.631h4.324c2.421 0 4.332.573 5.734 1.72 1.417 1.13 2.126 2.755 2.126 4.873v.048c0 1.21-.319 2.285-.956 3.225-.637.924-1.529 1.648-2.675 2.174-1.131.526-2.453.788-3.966.788-1.529 0-2.874-.239-4.037-.716-1.163-.494-2.094-1.171-2.795-2.03a5.723 5.723 0 0 1-1.218-2.987l-.024-.239h-4.133l.024.287c.16 1.815.748 3.432 1.768 4.849 1.035 1.418 2.436 2.532 4.204 3.345 1.768.812 3.838 1.218 6.211 1.218Z"
111
- })));
39
+ }));
40
+ };
41
+ UnauthorizedImage.defaultProps = {
42
+ xmlns: "http://www.w3.org/2000/svg",
43
+ width: "120",
44
+ height: "120",
45
+ fill: "none"
112
46
  };
113
-
114
- var ERRORS = {
47
+ export var ERRORS = {
115
48
  404: {
116
- Image: SvgPageNotFound,
49
+ Image: PageNotFoundImage,
117
50
  errorKey: "neetoMolecules.errorPage.cantBeFound",
118
51
  titleKey: "neetoMolecules.errorPage.title.cantBeFound"
119
52
  },
120
53
  403: {
121
- Image: SvgUnauthorized,
54
+ Image: UnauthorizedImage,
122
55
  errorKey: "neetoMolecules.errorPage.unauthorized",
123
56
  titleKey: "neetoMolecules.errorPage.title.unauthorized"
124
57
  },
125
58
  500: {
126
- Image: SvgInternalServerError,
59
+ Image: InternalServerErrorImage,
127
60
  errorKey: "neetoMolecules.errorPage.internalServerError",
128
61
  titleKey: "neetoMolecules.errorPage.title.internalServerError"
129
62
  }
130
- };
131
-
132
- var ErrorPage = function ErrorPage(_ref) {
133
- var _ref$homeUrl = _ref.homeUrl,
134
- homeUrl = _ref$homeUrl === void 0 ? "/" : _ref$homeUrl,
135
- status = _ref.status,
136
- backToHomeButtonProps = _ref.backToHomeButtonProps,
137
- children = _ref.children;
138
- var _useTranslation = useTranslation(),
139
- t = _useTranslation.t;
140
- var _useErrorDisplayStore = useErrorDisplayStore(pick(["statusCode", "showErrorPage"]), shallow),
141
- storeStatusCode = _useErrorDisplayStore.statusCode,
142
- showErrorPage = _useErrorDisplayStore.showErrorPage;
143
- status = status || storeStatusCode;
144
- var _ref2 = ERRORS[status] || ERRORS[404],
145
- Image = _ref2.Image,
146
- errorKey = _ref2.errorKey,
147
- titleKey = _ref2.titleKey;
148
- useEffect(function () {
149
- var onBackButtonPress = function onBackButtonPress() {
150
- if (showErrorPage) {
151
- useErrorDisplayStore.setState({
152
- showErrorPage: false
153
- });
154
- }
155
- };
156
- window.addEventListener("popstate", onBackButtonPress);
157
- return function () {
158
- window.removeEventListener("popstate", onBackButtonPress);
159
- };
160
- }, []);
161
- var openChatWidget = function openChatWidget() {
162
- var _window$NeetoChat, _window$NeetoChat$con, _window$NeetoChat2, _window$NeetoChat2$co;
163
- (_window$NeetoChat = window.NeetoChat) === null || _window$NeetoChat === void 0 ? void 0 : (_window$NeetoChat$con = _window$NeetoChat.contextualHelp) === null || _window$NeetoChat$con === void 0 ? void 0 : _window$NeetoChat$con.maximizeWidget();
164
- (_window$NeetoChat2 = window.NeetoChat) === null || _window$NeetoChat2 === void 0 ? void 0 : (_window$NeetoChat2$co = _window$NeetoChat2.contextualHelp) === null || _window$NeetoChat2$co === void 0 ? void 0 : _window$NeetoChat2$co.openWidget();
165
- };
166
- return /*#__PURE__*/React__default.createElement("div", {
167
- className: "flex min-h-screen w-full flex-col items-center justify-center",
168
- "data-cy": "error-page-container"
169
- }, /*#__PURE__*/React__default.createElement(Helmet, null, /*#__PURE__*/React__default.createElement("title", null, t(titleKey))), /*#__PURE__*/React__default.createElement(Image, {
170
- className: "mb-8",
171
- "data-cy": "error-image"
172
- }), /*#__PURE__*/React__default.createElement(Typography, {
173
- className: "mb-6 text-center",
174
- "data-cy": "title",
175
- style: "h2",
176
- weight: "semibold"
177
- }, /*#__PURE__*/React__default.createElement(Trans, {
178
- i18nKey: errorKey
179
- })), /*#__PURE__*/React__default.createElement("div", {
180
- className: "mb-5 flex flex-col items-center space-y-3"
181
- }, /*#__PURE__*/React__default.createElement(Button, _extends$3({
182
- href: homeUrl,
183
- label: t("neetoMolecules.errorPage.backToHome"),
184
- size: "large",
185
- style: "primary"
186
- }, backToHomeButtonProps)), children), /*#__PURE__*/React__default.createElement(Typography, {
187
- className: "text-center",
188
- "data-cy": "title",
189
- style: "body2"
190
- }, /*#__PURE__*/React__default.createElement(Trans, {
191
- i18nKey: "neetoMolecules.errorPage.contactUs",
192
- components: {
193
- button: /*#__PURE__*/React__default.createElement(Button, {
194
- style: "link",
195
- onClick: openChatWidget
196
- })
197
- }
198
- })));
199
- };
200
-
201
- export { ErrorPage as default };
202
- //# sourceMappingURL=ErrorPage.js.map
63
+ };