@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
@@ -1,747 +0,0 @@
1
- import React, { useRef, useState } from 'react';
2
- import { SINGULAR } from '@bigbinary/neeto-commons-frontend/constants';
3
- import { snakeToCamelCase, isNotEmpty, noop } from '@bigbinary/neeto-commons-frontend/pure';
4
- import { MenuVertical, MenuHorizontal, Info, Check, CustomDomain as CustomDomain$1 } from '@bigbinary/neeto-icons';
5
- import { Alert, Dropdown, Tooltip, Button, Tag, Callout, Input, Pane, Typography, Label, Spinner } from '@bigbinary/neetoui';
6
- import { useTranslation, Trans } from 'react-i18next';
7
- import { Formik, Form } from 'formik';
8
- import { Input as Input$1 } from '@bigbinary/neetoui/formik';
9
- import { joinHyphenCase } from '@bigbinary/neeto-commons-frontend/utils';
10
- import CopyToClipboardButton from '@bigbinary/neeto-molecules/CopyToClipboardButton';
11
- import { t } from 'i18next';
12
- import { mergeRight } from 'ramda';
13
- import * as Yup from 'yup';
14
- import { useQueryClient, useMutation, useQuery } from 'react-query';
15
- import axios from 'axios';
16
-
17
- function _arrayWithHoles(arr) {
18
- if (Array.isArray(arr)) return arr;
19
- }
20
-
21
- function _iterableToArrayLimit(arr, i) {
22
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
23
- if (null != _i) {
24
- var _s,
25
- _e,
26
- _x,
27
- _r,
28
- _arr = [],
29
- _n = !0,
30
- _d = !1;
31
- try {
32
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
33
- if (Object(_i) !== _i) return;
34
- _n = !1;
35
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
36
- } catch (err) {
37
- _d = !0, _e = err;
38
- } finally {
39
- try {
40
- if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
41
- } finally {
42
- if (_d) throw _e;
43
- }
44
- }
45
- return _arr;
46
- }
47
- }
48
-
49
- function _arrayLikeToArray(arr, len) {
50
- if (len == null || len > arr.length) len = arr.length;
51
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
52
- return arr2;
53
- }
54
-
55
- function _unsupportedIterableToArray(o, minLen) {
56
- if (!o) return;
57
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
58
- var n = Object.prototype.toString.call(o).slice(8, -1);
59
- if (n === "Object" && o.constructor) n = o.constructor.name;
60
- if (n === "Map" || n === "Set") return Array.from(o);
61
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
62
- }
63
-
64
- function _nonIterableRest() {
65
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
66
- }
67
-
68
- function _slicedToArray(arr, i) {
69
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
70
- }
71
-
72
- var DeleteAlert = function DeleteAlert(_ref) {
73
- var onClose = _ref.onClose,
74
- onSubmit = _ref.onSubmit,
75
- isOpen = _ref.isOpen,
76
- isSubmitting = _ref.isSubmitting,
77
- hostname = _ref.hostname;
78
- var _useTranslation = useTranslation(),
79
- t = _useTranslation.t;
80
- return /*#__PURE__*/React.createElement(Alert, {
81
- cancelButtonLabel: t("neetoMolecules.common.actions.cancel"),
82
- isOpen: isOpen,
83
- isSubmitting: isSubmitting,
84
- submitButtonLabel: t("neetoMolecules.common.actions.delete"),
85
- title: t("neetoMolecules.customDomain.delete"),
86
- message: /*#__PURE__*/React.createElement(Trans, {
87
- i18nKey: "neetoMolecules.customDomain.alertMessage",
88
- values: {
89
- hostname: hostname
90
- }
91
- }),
92
- onClose: onClose,
93
- onSubmit: onSubmit
94
- });
95
- };
96
-
97
- var HOSTNAME_REGEX = /^(?!-)[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9](?:\.[a-zA-Z]{2,})+/;
98
- var INITIAL_VALUES = {
99
- hostname: ""
100
- };
101
-
102
- function _objectWithoutPropertiesLoose(source, excluded) {
103
- if (source == null) return {};
104
- var target = {};
105
- var sourceKeys = Object.keys(source);
106
- var key, i;
107
- for (i = 0; i < sourceKeys.length; i++) {
108
- key = sourceKeys[i];
109
- if (excluded.indexOf(key) >= 0) continue;
110
- target[key] = source[key];
111
- }
112
- return target;
113
- }
114
-
115
- function _objectWithoutProperties(source, excluded) {
116
- if (source == null) return {};
117
- var target = _objectWithoutPropertiesLoose(source, excluded);
118
- var key, i;
119
- if (Object.getOwnPropertySymbols) {
120
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
121
- for (i = 0; i < sourceSymbolKeys.length; i++) {
122
- key = sourceSymbolKeys[i];
123
- if (excluded.indexOf(key) >= 0) continue;
124
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
125
- target[key] = source[key];
126
- }
127
- }
128
- return target;
129
- }
130
-
131
- function _typeof(obj) {
132
- "@babel/helpers - typeof";
133
-
134
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
135
- return typeof obj;
136
- } : function (obj) {
137
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
138
- }, _typeof(obj);
139
- }
140
-
141
- function _toPrimitive(input, hint) {
142
- if (_typeof(input) !== "object" || input === null) return input;
143
- var prim = input[Symbol.toPrimitive];
144
- if (prim !== undefined) {
145
- var res = prim.call(input, hint || "default");
146
- if (_typeof(res) !== "object") return res;
147
- throw new TypeError("@@toPrimitive must return a primitive value.");
148
- }
149
- return (hint === "string" ? String : Number)(input);
150
- }
151
-
152
- function _toPropertyKey(arg) {
153
- var key = _toPrimitive(arg, "string");
154
- return _typeof(key) === "symbol" ? key : String(key);
155
- }
156
-
157
- function _defineProperty(obj, key, value) {
158
- key = _toPropertyKey(key);
159
- if (key in obj) {
160
- Object.defineProperty(obj, key, {
161
- value: value,
162
- enumerable: true,
163
- configurable: true,
164
- writable: true
165
- });
166
- } else {
167
- obj[key] = value;
168
- }
169
- return obj;
170
- }
171
-
172
- function _extends() {
173
- _extends = Object.assign ? Object.assign.bind() : function (target) {
174
- for (var i = 1; i < arguments.length; i++) {
175
- var source = arguments[i];
176
- for (var key in source) {
177
- if (Object.prototype.hasOwnProperty.call(source, key)) {
178
- target[key] = source[key];
179
- }
180
- }
181
- }
182
- return target;
183
- };
184
- return _extends.apply(this, arguments);
185
- }
186
-
187
- var MENU_ITEM_TYPES = {
188
- menuItem: "menuItem",
189
- divider: "divider"
190
- };
191
- var DEFAULT_TOOLTIP_PROPS = {
192
- disabled: true,
193
- position: "bottom"
194
- };
195
-
196
- var _excluded = ["key", "onClick", "label", "type", "isVisible"];
197
- function ownKeys$1(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; }
198
- function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
199
- var Menu = Dropdown.Menu,
200
- MenuItem = Dropdown.MenuItem,
201
- Divider = Dropdown.Divider;
202
- var MoreDropdown = function MoreDropdown(_ref) {
203
- var _ref$dropdownButtonPr = _ref.dropdownButtonProps,
204
- dropdownButtonProps = _ref$dropdownButtonPr === void 0 ? {} : _ref$dropdownButtonPr,
205
- _ref$isVertical = _ref.isVertical,
206
- isVertical = _ref$isVertical === void 0 ? false : _ref$isVertical,
207
- _ref$isDisabled = _ref.isDisabled,
208
- isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
209
- _ref$dropdownProps = _ref.dropdownProps,
210
- dropdownProps = _ref$dropdownProps === void 0 ? {} : _ref$dropdownProps,
211
- menuTopChildren = _ref.menuTopChildren,
212
- menuBottomChildren = _ref.menuBottomChildren,
213
- _ref$menuItems = _ref.menuItems,
214
- menuItems = _ref$menuItems === void 0 ? [] : _ref$menuItems;
215
- var tooltipProps = mergeRight(DEFAULT_TOOLTIP_PROPS, dropdownButtonProps.tooltipProps);
216
- var targetIcon = isVertical ? MenuVertical : MenuHorizontal;
217
- var isDropdownDisabled = isDisabled || dropdownProps.disabled;
218
- if (isDropdownDisabled && !tooltipProps.disabled) {
219
- return /*#__PURE__*/React.createElement(Tooltip, tooltipProps, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Button, _extends({
220
- disabled: true,
221
- "data-testid": "nui-dropdown-button",
222
- icon: targetIcon,
223
- iconPosition: "right",
224
- size: "medium",
225
- style: "text"
226
- }, dropdownButtonProps))));
227
- }
228
- return /*#__PURE__*/React.createElement(Dropdown, _extends({
229
- autoWidth: true,
230
- className: "flex",
231
- disabled: isDisabled,
232
- icon: targetIcon,
233
- buttonProps: _objectSpread$1({
234
- className: "min-h-0 flex-shrink-0",
235
- style: "text"
236
- }, dropdownButtonProps)
237
- }, dropdownProps), /*#__PURE__*/React.createElement(Menu, null, menuTopChildren, menuItems.map(function (_ref2) {
238
- var key = _ref2.key,
239
- onClick = _ref2.onClick,
240
- label = _ref2.label,
241
- _ref2$type = _ref2.type,
242
- type = _ref2$type === void 0 ? MENU_ITEM_TYPES.menuItem : _ref2$type,
243
- _ref2$isVisible = _ref2.isVisible,
244
- isVisible = _ref2$isVisible === void 0 ? true : _ref2$isVisible,
245
- menuItemProps = _objectWithoutProperties(_ref2, _excluded);
246
- if (!isVisible) return null;
247
- return type === MENU_ITEM_TYPES.menuItem ? /*#__PURE__*/React.createElement(MenuItem.Button, _extends({
248
- key: key
249
- }, _objectSpread$1({
250
- onClick: onClick
251
- }, menuItemProps)), label) : /*#__PURE__*/React.createElement(Divider, {
252
- key: key
253
- });
254
- }), menuBottomChildren));
255
- };
256
-
257
- var classnames$1 = {exports: {}};
258
-
259
- /*!
260
- Copyright (c) 2018 Jed Watson.
261
- Licensed under the MIT License (MIT), see
262
- http://jedwatson.github.io/classnames
263
- */
264
-
265
- (function (module) {
266
- /* global define */
267
-
268
- (function () {
269
-
270
- var hasOwn = {}.hasOwnProperty;
271
-
272
- function classNames() {
273
- var classes = [];
274
-
275
- for (var i = 0; i < arguments.length; i++) {
276
- var arg = arguments[i];
277
- if (!arg) continue;
278
-
279
- var argType = typeof arg;
280
-
281
- if (argType === 'string' || argType === 'number') {
282
- classes.push(arg);
283
- } else if (Array.isArray(arg)) {
284
- if (arg.length) {
285
- var inner = classNames.apply(null, arg);
286
- if (inner) {
287
- classes.push(inner);
288
- }
289
- }
290
- } else if (argType === 'object') {
291
- if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
292
- classes.push(arg.toString());
293
- continue;
294
- }
295
-
296
- for (var key in arg) {
297
- if (hasOwn.call(arg, key) && arg[key]) {
298
- classes.push(key);
299
- }
300
- }
301
- }
302
- }
303
-
304
- return classes.join(' ');
305
- }
306
-
307
- if (module.exports) {
308
- classNames.default = classNames;
309
- module.exports = classNames;
310
- } else {
311
- window.classNames = classNames;
312
- }
313
- }());
314
- } (classnames$1));
315
-
316
- var classnames = classnames$1.exports;
317
-
318
- var TagBlock = function TagBlock(_ref) {
319
- var status = _ref.status,
320
- _ref$stacked = _ref.stacked,
321
- stacked = _ref$stacked === void 0 ? false : _ref$stacked;
322
- var _useTranslation = useTranslation(),
323
- t = _useTranslation.t;
324
- var isDomainValidated = status === "active" || status === "pending_cname_validation";
325
- var camelCasedStatus = snakeToCamelCase(status || "");
326
- return /*#__PURE__*/React.createElement("div", {
327
- className: classnames("flex gap-2", {
328
- "flex-col items-start": stacked
329
- })
330
- }, status === "failed" ? /*#__PURE__*/React.createElement(Tag, {
331
- indicatorStyle: "danger",
332
- label: t("neetoMolecules.customDomain.status.".concat(camelCasedStatus)),
333
- style: "secondary"
334
- }) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Tag, {
335
- indicatorStyle: isDomainValidated ? "success" : "warning",
336
- style: "secondary",
337
- label: t("neetoMolecules.customDomain.status.domain.".concat(camelCasedStatus))
338
- }), isDomainValidated && /*#__PURE__*/React.createElement("div", {
339
- className: classnames("flex items-center justify-between gap-2", {
340
- "w-full": stacked
341
- })
342
- }, /*#__PURE__*/React.createElement(Tag, {
343
- indicatorStyle: status === "active" ? "success" : "warning",
344
- style: "secondary",
345
- label: t("neetoMolecules.customDomain.status.cname.".concat(camelCasedStatus))
346
- }))));
347
- };
348
- var TagBlock$1 = /*#__PURE__*/React.memo(TagBlock);
349
-
350
- var recordData = function recordData(customDomain) {
351
- var status = customDomain.status,
352
- hostname = customDomain.hostname,
353
- dnsTarget = customDomain.dnsTarget,
354
- cnameValidationParams = customDomain.cnameValidationParams;
355
- var isDomainValidated = status === "active" || status === "pending_cname_validation";
356
- var recordName = isDomainValidated ? hostname : cnameValidationParams === null || cnameValidationParams === void 0 ? void 0 : cnameValidationParams.name;
357
- var recordValue = isDomainValidated ? dnsTarget : cnameValidationParams === null || cnameValidationParams === void 0 ? void 0 : cnameValidationParams.value;
358
- var recordType = isDomainValidated ? t("neetoMolecules.customDomain.cname") : t("neetoMolecules.customDomain.domainValidationCname");
359
- var recordDescription = isDomainValidated ? t("neetoMolecules.customDomain.validation.desc", {
360
- record: recordType
361
- }) : t("neetoMolecules.customDomain.validation.desc", {
362
- record: recordType,
363
- proxyMessage: t("neetoMolecules.customDomain.validation.proxyMessage")
364
- });
365
- var recordNameLabel = t("neetoMolecules.customDomain.validation.record", {
366
- record: recordType,
367
- type: t("neetoMolecules.common.name")
368
- });
369
- var recordValueLabel = t("neetoMolecules.customDomain.validation.record", {
370
- record: recordType,
371
- type: t("neetoMolecules.common.value")
372
- });
373
- return {
374
- recordName: recordName,
375
- recordValue: recordValue,
376
- recordDescription: recordDescription,
377
- recordNameLabel: recordNameLabel,
378
- recordValueLabel: recordValueLabel
379
- };
380
- };
381
-
382
- var Record = function Record(_ref) {
383
- var customDomain = _ref.customDomain;
384
- var _recordData = recordData(customDomain),
385
- recordName = _recordData.recordName,
386
- recordValue = _recordData.recordValue,
387
- recordDescription = _recordData.recordDescription,
388
- recordNameLabel = _recordData.recordNameLabel,
389
- recordValueLabel = _recordData.recordValueLabel;
390
- return /*#__PURE__*/React.createElement("div", {
391
- className: "mt-6 grid gap-4"
392
- }, customDomain.status !== "active" && /*#__PURE__*/React.createElement(Callout, {
393
- icon: Info,
394
- style: "info"
395
- }, recordDescription), /*#__PURE__*/React.createElement(Input, {
396
- disabled: true,
397
- "data-cy": joinHyphenCase(recordNameLabel),
398
- label: recordNameLabel,
399
- value: recordName,
400
- suffix: /*#__PURE__*/React.createElement(CopyToClipboardButton, {
401
- size: "small",
402
- style: "text",
403
- value: recordName
404
- })
405
- }), /*#__PURE__*/React.createElement(Input, {
406
- disabled: true,
407
- "data-cy": joinHyphenCase(recordValueLabel),
408
- label: recordValueLabel,
409
- value: recordValue,
410
- suffix: /*#__PURE__*/React.createElement(CopyToClipboardButton, {
411
- size: "small",
412
- style: "text",
413
- value: recordValue
414
- })
415
- }));
416
- };
417
- var Record$1 = /*#__PURE__*/React.memo(Record);
418
-
419
- var StatusInfo = function StatusInfo() {
420
- var helpUrl = "https://help.".concat(globalProps.appName.toLowerCase(), ".com/articles/custom-domains");
421
- return /*#__PURE__*/React.createElement("div", {
422
- className: "space-y-6"
423
- }, /*#__PURE__*/React.createElement("div", {
424
- className: "neeto-ui-rounded neeto-ui-bg-gray-100 neeto-ui-text-gray-700 space-y-3 p-4"
425
- }, /*#__PURE__*/React.createElement(Trans, {
426
- i18nKey: "neetoMolecules.customDomain.messageBlock.dnsStatus",
427
- components: {
428
- a: /*#__PURE__*/React.createElement("a", {
429
- className: "neeto-ui-btn--style-link",
430
- href: helpUrl,
431
- rel: "noreferrer",
432
- target: "_blank"
433
- })
434
- }
435
- })));
436
- };
437
- var StatusInfo$1 = /*#__PURE__*/React.memo(StatusInfo);
438
-
439
- var getCustomDomainValidationSchema = function getCustomDomainValidationSchema() {
440
- return Yup.object().shape({
441
- hostname: Yup.string().required(t("neetoMolecules.customDomain.formikValidation.required")).matches(HOSTNAME_REGEX, t("neetoMolecules.customDomain.formikValidation.valid"))
442
- });
443
- };
444
-
445
- var getUrlwithId = function getUrlwithId(url, id) {
446
- return id ? "".concat(url, "/").concat(id) : url;
447
- };
448
- var fetchCustomDomains = function fetchCustomDomains(_ref) {
449
- var url = _ref.url,
450
- params = _ref.params;
451
- return axios.get(url, {
452
- params: params
453
- });
454
- };
455
- var updateCustomDomain = function updateCustomDomain(url, id) {
456
- return axios.patch(getUrlwithId(url, id));
457
- };
458
- var createCustomDomain = function createCustomDomain(url, payload) {
459
- return axios.post(url, payload);
460
- };
461
- var deleteCustomDomain = function deleteCustomDomain(url, id) {
462
- return axios["delete"](getUrlwithId(url, id));
463
- };
464
- var validateDomain = function validateDomain(url, id) {
465
- return axios.patch("".concat(getUrlwithId(url, id), "/validate_domain"));
466
- };
467
- var validateCname = function validateCname(url, id) {
468
- return axios.patch("".concat(getUrlwithId(url, id), "/validate_cname"));
469
- };
470
- var customDomainApi = {
471
- createCustomDomain: createCustomDomain,
472
- deleteCustomDomain: deleteCustomDomain,
473
- validateDomain: validateDomain,
474
- fetchCustomDomains: fetchCustomDomains,
475
- validateCname: validateCname,
476
- updateCustomDomain: updateCustomDomain
477
- };
478
-
479
- var DEFAULT_STALE_TIME = 60 * 60 * 1000;
480
- var DOMAIN_QUERY_KEY = "custom-domain";
481
-
482
- 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; }
483
- 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; }
484
- var useCreateCustomDomain = function useCreateCustomDomain(url) {
485
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
486
- var queryClient = useQueryClient();
487
- return useMutation(function (payload) {
488
- return customDomainApi.createCustomDomain(url, payload);
489
- }, _objectSpread(_objectSpread({}, options), {}, {
490
- onSuccess: function onSuccess() {
491
- return queryClient.invalidateQueries(DOMAIN_QUERY_KEY);
492
- }
493
- }));
494
- };
495
- var useDeleteCustomDomain = function useDeleteCustomDomain(url) {
496
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
497
- var queryClient = useQueryClient();
498
- return useMutation(function (id) {
499
- return customDomainApi.deleteCustomDomain(url, id);
500
- }, _objectSpread(_objectSpread({}, options), {}, {
501
- onSuccess: function onSuccess(result) {
502
- var _options$onSuccess;
503
- (_options$onSuccess = options.onSuccess) === null || _options$onSuccess === void 0 ? void 0 : _options$onSuccess.call(options, result);
504
- queryClient.invalidateQueries(DOMAIN_QUERY_KEY);
505
- }
506
- }));
507
- };
508
- var useFetchCustomDomains = function useFetchCustomDomains(params) {
509
- return useQuery([DOMAIN_QUERY_KEY, _objectSpread({}, params)], function () {
510
- return customDomainApi.fetchCustomDomains(params);
511
- }, {
512
- staleTime: DEFAULT_STALE_TIME
513
- });
514
- };
515
- var useValidateDomain = function useValidateDomain(url) {
516
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
517
- var queryClient = useQueryClient();
518
- return useMutation(function (id) {
519
- return customDomainApi.validateDomain(url, id);
520
- }, _objectSpread(_objectSpread({}, options), {}, {
521
- onSuccess: function onSuccess() {
522
- return queryClient.invalidateQueries(DOMAIN_QUERY_KEY);
523
- }
524
- }));
525
- };
526
- var useValidateCname = function useValidateCname(url) {
527
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
528
- var queryClient = useQueryClient();
529
- return useMutation(function (id) {
530
- return customDomainApi.validateCname(url, id);
531
- }, _objectSpread(_objectSpread({}, options), {}, {
532
- onSuccess: function onSuccess() {
533
- return queryClient.invalidateQueries(DOMAIN_QUERY_KEY);
534
- }
535
- }));
536
- };
537
- var useUpdateCustomDomain = function useUpdateCustomDomain(url) {
538
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
539
- var queryClient = useQueryClient();
540
- return useMutation(function (id) {
541
- return customDomainApi.updateCustomDomain(url, id);
542
- }, _objectSpread(_objectSpread({}, options), {}, {
543
- onSuccess: function onSuccess() {
544
- return queryClient.invalidateQueries(DOMAIN_QUERY_KEY);
545
- }
546
- }));
547
- };
548
-
549
- var Manage = function Manage(_ref) {
550
- var isOpen = _ref.isOpen,
551
- onClose = _ref.onClose,
552
- customDomain = _ref.customDomain,
553
- setCustomDomain = _ref.setCustomDomain,
554
- url = _ref.url,
555
- hasOne = _ref.hasOne;
556
- var _useTranslation = useTranslation(),
557
- t = _useTranslation.t;
558
- var initialFocusRef = useRef(null);
559
- var customDomainId = hasOne ? null : customDomain === null || customDomain === void 0 ? void 0 : customDomain.id;
560
- var _useCreateCustomDomai = useCreateCustomDomain(url),
561
- createCustomDomain = _useCreateCustomDomai.mutate,
562
- isCreating = _useCreateCustomDomai.isLoading;
563
- var _useValidateDomain = useValidateDomain(url),
564
- validateDomain = _useValidateDomain.mutate,
565
- isValidating = _useValidateDomain.isLoading;
566
- var _useValidateCname = useValidateCname(url),
567
- validateCname = _useValidateCname.mutate,
568
- isCnameValidating = _useValidateCname.isLoading;
569
- var _useUpdateCustomDomai = useUpdateCustomDomain(url),
570
- updateCustomDomain = _useUpdateCustomDomai.mutate,
571
- isUpdating = _useUpdateCustomDomai.isLoading;
572
- var handleSubmit = function handleSubmit(values) {
573
- return createCustomDomain(values, {
574
- onSuccess: function onSuccess(values) {
575
- return setCustomDomain(values);
576
- }
577
- });
578
- };
579
- var handleValidateDomain = function handleValidateDomain() {
580
- return validateDomain(customDomainId, {
581
- onSuccess: function onSuccess(values) {
582
- return setCustomDomain(values);
583
- }
584
- });
585
- };
586
- var handleValidateCname = function handleValidateCname() {
587
- validateCname(customDomainId, {
588
- onSuccess: function onSuccess(data) {
589
- return setCustomDomain(data);
590
- }
591
- });
592
- };
593
- var handleUpdateCname = function handleUpdateCname() {
594
- updateCustomDomain(customDomainId, {
595
- onSuccess: function onSuccess(data) {
596
- return setCustomDomain(data);
597
- }
598
- });
599
- };
600
- return /*#__PURE__*/React.createElement(Pane, {
601
- initialFocusRef: initialFocusRef,
602
- isOpen: isOpen,
603
- onClose: onClose
604
- }, /*#__PURE__*/React.createElement(Formik, {
605
- enableReinitialize: true,
606
- initialValues: customDomain || INITIAL_VALUES,
607
- validationSchema: getCustomDomainValidationSchema(),
608
- onSubmit: handleSubmit
609
- }, function (_ref2) {
610
- var dirty = _ref2.dirty;
611
- return /*#__PURE__*/React.createElement(Form, null, /*#__PURE__*/React.createElement(Pane.Header, null, /*#__PURE__*/React.createElement(Typography, {
612
- "data-cy": "add-custom-domain-pane-heading",
613
- style: "h2",
614
- weight: "semibold"
615
- }, isNotEmpty(customDomain) ? t("neetoMolecules.customDomain.edit") : t("neetoMolecules.customDomain.addNew"))), /*#__PURE__*/React.createElement(Pane.Body, null, /*#__PURE__*/React.createElement("div", {
616
- className: "w-full space-y-6"
617
- }, isNotEmpty(customDomain) && /*#__PURE__*/React.createElement(TagBlock$1, {
618
- stacked: true,
619
- handleValidateCname: handleValidateCname,
620
- isCnameRecordsAdded: customDomain.addedCnameAt,
621
- status: customDomain.status
622
- }), /*#__PURE__*/React.createElement("div", {
623
- className: "space-y-2"
624
- }, /*#__PURE__*/React.createElement(Label, {
625
- htmlFor: "hostname"
626
- }, isNotEmpty(customDomain) ? t("neetoMolecules.customDomain.customDomain", SINGULAR) : t("neetoMolecules.customDomain.label")), /*#__PURE__*/React.createElement("div", {
627
- className: "flex items-start gap-2"
628
- }, /*#__PURE__*/React.createElement(Input$1, {
629
- "data-cy": "custom-domain-input-field",
630
- disabled: isNotEmpty(customDomain),
631
- name: "hostname",
632
- placeholder: t("neetoMolecules.customDomain.placeholder"),
633
- ref: initialFocusRef
634
- }), !isNotEmpty(customDomain) && /*#__PURE__*/React.createElement(Button, {
635
- "data-cy": "submit-custom-domain-button",
636
- "data-testid": "submit-custom-domain-button",
637
- disabled: !dirty || isCreating,
638
- icon: Check,
639
- loading: isCreating,
640
- style: "primary",
641
- type: "submit"
642
- }))), isNotEmpty(customDomain) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Record$1, {
643
- customDomain: customDomain
644
- }), customDomain.status === "pending_domain_validation" && /*#__PURE__*/React.createElement(Button, {
645
- "data-cy": "validate-domain-button",
646
- disabled: isValidating,
647
- loading: isValidating,
648
- label: t("neetoMolecules.customDomain.validation.buttonLabel.domain"),
649
- onClick: handleValidateDomain
650
- }), customDomain.status === "pending_cname_validation" && /*#__PURE__*/React.createElement(Button, {
651
- "data-cy": "validate-cname-record-button",
652
- loading: isCnameValidating || isUpdating,
653
- label: t("neetoMolecules.customDomain.validation.buttonLabel.cnameAdded"),
654
- onClick: handleUpdateCname
655
- }), /*#__PURE__*/React.createElement(StatusInfo$1, null)))));
656
- }));
657
- };
658
-
659
- var CustomDomain = function CustomDomain(_ref) {
660
- var url = _ref.url,
661
- iconOnly = _ref.iconOnly;
662
- var _useState = useState(false),
663
- _useState2 = _slicedToArray(_useState, 2),
664
- isPaneOpen = _useState2[0],
665
- setIsPaneOpen = _useState2[1];
666
- var _useState3 = useState(false),
667
- _useState4 = _slicedToArray(_useState3, 2),
668
- isAlertOpen = _useState4[0],
669
- setIsAlertOpen = _useState4[1];
670
- var _useTranslation = useTranslation(),
671
- t = _useTranslation.t;
672
- var _useFetchCustomDomain = useFetchCustomDomains({
673
- url: url
674
- }),
675
- customDomain = _useFetchCustomDomain.data,
676
- isLoading = _useFetchCustomDomain.isLoading;
677
- var _useDeleteCustomDomai = useDeleteCustomDomain(url, {
678
- onSettled: function onSettled() {
679
- return setIsAlertOpen(false);
680
- }
681
- }),
682
- deleteCustomDomain = _useDeleteCustomDomai.mutate,
683
- isDeleting = _useDeleteCustomDomai.isLoading;
684
- var actions = [{
685
- key: "edit",
686
- label: t("neetoMolecules.common.actions.edit"),
687
- onClick: function onClick() {
688
- return setIsPaneOpen(true);
689
- }
690
- }, {
691
- key: "delete",
692
- label: t("neetoMolecules.common.actions.delete"),
693
- onClick: function onClick() {
694
- return setIsAlertOpen(true);
695
- }
696
- }];
697
- if (isLoading) return /*#__PURE__*/React.createElement(Spinner, null);
698
- return /*#__PURE__*/React.createElement("div", null, isNotEmpty(customDomain) ? /*#__PURE__*/React.createElement("div", {
699
- className: "flex flex-row items-center"
700
- }, /*#__PURE__*/React.createElement(Tag, {
701
- label: customDomain === null || customDomain === void 0 ? void 0 : customDomain.hostname,
702
- style: customDomain.status === "active" ? "success" : "warning"
703
- }), /*#__PURE__*/React.createElement(MoreDropdown, {
704
- dropdownProps: {
705
- autoWidth: true
706
- },
707
- menuItems: actions,
708
- dropdownButtonProps: {
709
- "data-testid": "nui-dropdown-icon",
710
- strategy: "fixed"
711
- }
712
- })) : /*#__PURE__*/React.createElement(Button, {
713
- icon: iconOnly && CustomDomain$1,
714
- style: "text",
715
- label: iconOnly ? "" : t("neetoMolecules.common.actions.add", {
716
- entity: t("neetoMolecules.customDomain.customDomain", SINGULAR).toLowerCase()
717
- }),
718
- tooltipProps: iconOnly && {
719
- content: t("neetoMolecules.customDomain.customDomain", SINGULAR)
720
- },
721
- onClick: function onClick() {
722
- return setIsPaneOpen(true);
723
- }
724
- }), /*#__PURE__*/React.createElement(Manage, {
725
- hasOne: true,
726
- customDomain: customDomain,
727
- url: url,
728
- isOpen: isPaneOpen,
729
- setCustomDomain: noop,
730
- onClose: function onClose() {
731
- return setIsPaneOpen(false);
732
- }
733
- }), /*#__PURE__*/React.createElement(DeleteAlert, {
734
- hostname: customDomain === null || customDomain === void 0 ? void 0 : customDomain.hostname,
735
- isOpen: isAlertOpen,
736
- isSubmitting: isDeleting,
737
- onClose: function onClose() {
738
- return setIsAlertOpen(false);
739
- },
740
- onSubmit: function onSubmit() {
741
- return deleteCustomDomain();
742
- }
743
- }));
744
- };
745
-
746
- export { CustomDomain as default };
747
- //# sourceMappingURL=CustomDomain.js.map