@bigbinary/neeto-molecules 1.1.16 → 1.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (392) hide show
  1. package/dist/AutoSaveInput.js +658 -0
  2. package/dist/AutoSaveInput.js.map +1 -0
  3. package/dist/Breadcrumbs.js +38 -0
  4. package/dist/Breadcrumbs.js.map +1 -0
  5. package/dist/BrowserSupport.js +418 -0
  6. package/dist/BrowserSupport.js.map +1 -0
  7. package/dist/Builder.js +662 -0
  8. package/dist/Builder.js.map +1 -0
  9. package/dist/CalendarView.js +538 -0
  10. package/dist/CalendarView.js.map +1 -0
  11. package/dist/Codeblock.js +236 -0
  12. package/dist/Codeblock.js.map +1 -0
  13. package/dist/{Columns/index.js → Columns.js} +130 -13
  14. package/dist/Columns.js.map +1 -0
  15. package/dist/{ConfirmationModal/index.js → ConfirmationModal.js} +20 -8
  16. package/dist/ConfirmationModal.js.map +1 -0
  17. package/dist/Container.js +1211 -0
  18. package/dist/Container.js.map +1 -0
  19. package/dist/CopyToClipboardButton.js +209 -0
  20. package/dist/CopyToClipboardButton.js.map +1 -0
  21. package/dist/CustomDomain.js +688 -0
  22. package/dist/CustomDomain.js.map +1 -0
  23. package/dist/CustomDomainDashboard.js +2283 -0
  24. package/dist/CustomDomainDashboard.js.map +1 -0
  25. package/dist/{DateFormat/index.js → DateFormat.js} +25 -8
  26. package/dist/DateFormat.js.map +1 -0
  27. package/dist/DateRangeFilter.js +229 -0
  28. package/dist/DateRangeFilter.js.map +1 -0
  29. package/dist/DynamicVariables.js +183 -0
  30. package/dist/DynamicVariables.js.map +1 -0
  31. package/dist/EmailForm.js +2292 -0
  32. package/dist/EmailForm.js.map +1 -0
  33. package/dist/EmailPreview.js +1353 -0
  34. package/dist/EmailPreview.js.map +1 -0
  35. package/dist/{ErrorPage/constants.js → ErrorPage.js} +137 -36
  36. package/dist/ErrorPage.js.map +1 -0
  37. package/dist/Header.js +122 -0
  38. package/dist/Header.js.map +1 -0
  39. package/dist/IconPicker.js +313 -0
  40. package/dist/IconPicker.js.map +1 -0
  41. package/dist/ImageWithFallback.js +181 -0
  42. package/dist/ImageWithFallback.js.map +1 -0
  43. package/dist/IntegrationCard.js +343 -0
  44. package/dist/IntegrationCard.js.map +1 -0
  45. package/dist/IntegrationDisconnectAlert.js +80 -0
  46. package/dist/IntegrationDisconnectAlert.js.map +1 -0
  47. package/dist/{IntegrationWalkthroughModal/index.js → IntegrationWalkthroughModal.js} +8 -6
  48. package/dist/IntegrationWalkthroughModal.js.map +1 -0
  49. package/dist/IpRestriction.js +857 -0
  50. package/dist/IpRestriction.js.map +1 -0
  51. package/dist/KeyboardShortcuts.js +359 -0
  52. package/dist/KeyboardShortcuts.js.map +1 -0
  53. package/dist/LoginPage.js +593 -0
  54. package/dist/LoginPage.js.map +1 -0
  55. package/dist/MenuBar.js +1461 -0
  56. package/dist/MenuBar.js.map +1 -0
  57. package/dist/Metadata.js +206 -0
  58. package/dist/Metadata.js.map +1 -0
  59. package/dist/{MoreDropdown/index.js → MoreDropdown.js} +102 -9
  60. package/dist/MoreDropdown.js.map +1 -0
  61. package/dist/NavigationHeader.js +690 -0
  62. package/dist/NavigationHeader.js.map +1 -0
  63. package/dist/NeetoWidget.js +1333 -0
  64. package/dist/NeetoWidget.js.map +1 -0
  65. package/dist/PageLoader.js +134 -0
  66. package/dist/PageLoader.js.map +1 -0
  67. package/dist/PhoneNumber.js +365 -0
  68. package/dist/PhoneNumber.js.map +1 -0
  69. package/dist/PublishBlock.js +158 -0
  70. package/dist/PublishBlock.js.map +1 -0
  71. package/dist/Rename.js +450 -0
  72. package/dist/Rename.js.map +1 -0
  73. package/dist/ResponsiveDevicePicker.js +194 -0
  74. package/dist/ResponsiveDevicePicker.js.map +1 -0
  75. package/dist/Schedule.js +1046 -0
  76. package/dist/Schedule.js.map +1 -0
  77. package/dist/Scrollable.js +122 -0
  78. package/dist/Scrollable.js.map +1 -0
  79. package/dist/Search.js +151 -0
  80. package/dist/Search.js.map +1 -0
  81. package/dist/Security.js +1835 -0
  82. package/dist/Security.js.map +1 -0
  83. package/dist/SendToFields.js +601 -0
  84. package/dist/SendToFields.js.map +1 -0
  85. package/dist/Settings.js +435 -0
  86. package/dist/Settings.js.map +1 -0
  87. package/dist/ShareViaEmail.js +2277 -0
  88. package/dist/ShareViaEmail.js.map +1 -0
  89. package/dist/ShareViaLink.js +628 -0
  90. package/dist/ShareViaLink.js.map +1 -0
  91. package/dist/Sidebar.js +972 -0
  92. package/dist/Sidebar.js.map +1 -0
  93. package/dist/SubHeader.js +216 -0
  94. package/dist/SubHeader.js.map +1 -0
  95. package/dist/{TableWrapper/index.js → TableWrapper.js} +6 -3
  96. package/dist/TableWrapper.js.map +1 -0
  97. package/dist/ThemeSidebar.js +1984 -0
  98. package/dist/ThemeSidebar.js.map +1 -0
  99. package/dist/TimeFormat.js +47 -0
  100. package/dist/TimeFormat.js.map +1 -0
  101. package/dist/TimezoneMismatchModal.js +168 -0
  102. package/dist/TimezoneMismatchModal.js.map +1 -0
  103. package/dist/ToggleFeatureCard.js +323 -0
  104. package/dist/ToggleFeatureCard.js.map +1 -0
  105. package/package.json +22 -13
  106. package/dist/AutoSaveInput/autosaveinput.scss +0 -15
  107. package/dist/AutoSaveInput/constants.js +0 -13
  108. package/dist/AutoSaveInput/index.js +0 -124
  109. package/dist/AutoSaveInput/utils.js +0 -10
  110. package/dist/Breadcrumbs/breadcrumbs.scss +0 -33
  111. package/dist/Breadcrumbs/index.js +0 -31
  112. package/dist/BrowserSupport/Callout.js +0 -15
  113. package/dist/BrowserSupport/ContactUs.js +0 -21
  114. package/dist/BrowserSupport/DownloadLink.js +0 -17
  115. package/dist/BrowserSupport/PartialSupportedBrowserVersion.js +0 -17
  116. package/dist/BrowserSupport/UnknownBrowser.js +0 -13
  117. package/dist/BrowserSupport/UnsupportedBrowser.js +0 -24
  118. package/dist/BrowserSupport/UnsupportedBrowserMessage.js +0 -22
  119. package/dist/BrowserSupport/UnsupportedBrowserVersion.js +0 -27
  120. package/dist/BrowserSupport/UnsupportedVersionMessage.js +0 -30
  121. package/dist/BrowserSupport/browsersupport.scss +0 -71
  122. package/dist/BrowserSupport/constants.js +0 -63
  123. package/dist/BrowserSupport/index.js +0 -58
  124. package/dist/BrowserSupport/utils.js +0 -32
  125. package/dist/Builder/Body.js +0 -9
  126. package/dist/Builder/ElementsPanel/ElementsList/Element.js +0 -27
  127. package/dist/Builder/ElementsPanel/ElementsList/Section.js +0 -28
  128. package/dist/Builder/ElementsPanel/ElementsList/TitleBar.js +0 -28
  129. package/dist/Builder/ElementsPanel/ElementsList/index.js +0 -63
  130. package/dist/Builder/ElementsPanel/SelectedElementsList/SelectedElement.js +0 -73
  131. package/dist/Builder/ElementsPanel/SelectedElementsList/TitleBar.js +0 -50
  132. package/dist/Builder/ElementsPanel/SelectedElementsList/index.js +0 -91
  133. package/dist/Builder/ElementsPanel/index.js +0 -70
  134. package/dist/Builder/PropertiesPanel/EmptyProperty.js +0 -21
  135. package/dist/Builder/PropertiesPanel/Skeleton.js +0 -24
  136. package/dist/Builder/PropertiesPanel/index.js +0 -12
  137. package/dist/Builder/index.js +0 -3
  138. package/dist/Builder/styles.scss +0 -84
  139. package/dist/CalendarView/CustomDatePicker.js +0 -87
  140. package/dist/CalendarView/Header.js +0 -53
  141. package/dist/CalendarView/constants.js +0 -19
  142. package/dist/CalendarView/index.js +0 -83
  143. package/dist/CalendarView/utils.js +0 -50
  144. package/dist/Codeblock/index.js +0 -30
  145. package/dist/Columns/utils.js +0 -20
  146. package/dist/ConfirmationModal/constants.js +0 -3
  147. package/dist/ConfirmationModal/utils.js +0 -6
  148. package/dist/Container/container.scss +0 -21
  149. package/dist/Container/index.js +0 -23
  150. package/dist/CopyToClipboardButton/constants.js +0 -13
  151. package/dist/CopyToClipboardButton/copyToClipboard.scss +0 -22
  152. package/dist/CopyToClipboardButton/index.js +0 -59
  153. package/dist/CustomDomain/index.js +0 -98
  154. package/dist/CustomDomainDashboard/DeleteAlert.js +0 -28
  155. package/dist/CustomDomainDashboard/Header.js +0 -32
  156. package/dist/CustomDomainDashboard/Manage/Record.js +0 -42
  157. package/dist/CustomDomainDashboard/Manage/StatusInfo.js +0 -21
  158. package/dist/CustomDomainDashboard/Manage/TagBlock.js +0 -36
  159. package/dist/CustomDomainDashboard/Manage/constants.js +0 -4
  160. package/dist/CustomDomainDashboard/Manage/index.js +0 -125
  161. package/dist/CustomDomainDashboard/Manage/utils.js +0 -8
  162. package/dist/CustomDomainDashboard/api.js +0 -35
  163. package/dist/CustomDomainDashboard/constants.js +0 -2
  164. package/dist/CustomDomainDashboard/index.js +0 -118
  165. package/dist/CustomDomainDashboard/useCustomDomainApi.js +0 -71
  166. package/dist/CustomDomainDashboard/utils.js +0 -84
  167. package/dist/DateRangeFilter/index.js +0 -60
  168. package/dist/DateRangeFilter/utils.js +0 -113
  169. package/dist/DynamicVariables/dynamic-variables.scss +0 -34
  170. package/dist/DynamicVariables/index.js +0 -59
  171. package/dist/DynamicVariables/utils.js +0 -37
  172. package/dist/EmailForm/EmailForm.js +0 -98
  173. package/dist/EmailForm/EmailFormProvider.js +0 -45
  174. package/dist/EmailForm/EmailPreview.js +0 -129
  175. package/dist/EmailForm/ReplyToField.js +0 -55
  176. package/dist/EmailForm/SendToField.js +0 -28
  177. package/dist/EmailForm/SubjectField.js +0 -64
  178. package/dist/EmailForm/constants.js +0 -33
  179. package/dist/EmailForm/contexts/EmailForm.js +0 -7
  180. package/dist/EmailForm/index.js +0 -4
  181. package/dist/EmailForm/utils.js +0 -10
  182. package/dist/EmailPreview/index.js +0 -2
  183. package/dist/ErrorPage/index.js +0 -78
  184. package/dist/Header/Breadcrumbs.js +0 -31
  185. package/dist/Header/Dropdown.js +0 -12
  186. package/dist/Header/constants.js +0 -6
  187. package/dist/Header/header.scss +0 -121
  188. package/dist/Header/index.js +0 -61
  189. package/dist/IconPicker/Icon.js +0 -34
  190. package/dist/IconPicker/NoResults.js +0 -12
  191. package/dist/IconPicker/constants.js +0 -8
  192. package/dist/IconPicker/icon-picker.scss +0 -1
  193. package/dist/IconPicker/index.js +0 -164
  194. package/dist/ImageWithFallback/ImagePlaceholder.js +0 -16
  195. package/dist/ImageWithFallback/index.js +0 -31
  196. package/dist/IntegrationCard/Dropdown.js +0 -45
  197. package/dist/IntegrationCard/Status.js +0 -25
  198. package/dist/IntegrationCard/index.js +0 -128
  199. package/dist/IntegrationDisconnectAlert/index.js +0 -36
  200. package/dist/IpRestriction/AllowedIpRanges.js +0 -75
  201. package/dist/IpRestriction/CurrentIp.js +0 -26
  202. package/dist/IpRestriction/FormRow.js +0 -84
  203. package/dist/IpRestriction/Row.js +0 -91
  204. package/dist/IpRestriction/apis/allowed_ip_ranges.js +0 -28
  205. package/dist/IpRestriction/apis/current_ip.js +0 -11
  206. package/dist/IpRestriction/apis/ip_restriction.js +0 -16
  207. package/dist/IpRestriction/constants.js +0 -20
  208. package/dist/IpRestriction/hooks/reactQuery/useAllowedIpRanges.js +0 -34
  209. package/dist/IpRestriction/hooks/reactQuery/useCurrentIp.js +0 -10
  210. package/dist/IpRestriction/hooks/reactQuery/useIpRestrictions.js +0 -18
  211. package/dist/IpRestriction/index.js +0 -102
  212. package/dist/IpRestriction/utils.js +0 -85
  213. package/dist/KeyboardShortcuts/Pane/HotKey.js +0 -44
  214. package/dist/KeyboardShortcuts/Pane/HotKeyList.js +0 -42
  215. package/dist/KeyboardShortcuts/Pane/constants.js +0 -25
  216. package/dist/KeyboardShortcuts/Pane/index.js +0 -61
  217. package/dist/KeyboardShortcuts/Pane/keyboard-shortcuts.scss +0 -5
  218. package/dist/KeyboardShortcuts/Pane/utils.js +0 -66
  219. package/dist/KeyboardShortcuts/hooks/useKeyboardShortcutsPaneState.js +0 -31
  220. package/dist/KeyboardShortcuts/index.js +0 -9
  221. package/dist/LoginPage/Form.js +0 -57
  222. package/dist/LoginPage/constants.js +0 -12
  223. package/dist/LoginPage/index.js +0 -103
  224. package/dist/MenuBar/AddNew.js +0 -25
  225. package/dist/MenuBar/Block.js +0 -60
  226. package/dist/MenuBar/Item.js +0 -32
  227. package/dist/MenuBar/Search.js +0 -39
  228. package/dist/MenuBar/SubTitle.js +0 -23
  229. package/dist/MenuBar/index.js +0 -46
  230. package/dist/MenuBar/menubar.scss +0 -154
  231. package/dist/Metadata/Block.js +0 -30
  232. package/dist/Metadata/DetailsBlock.js +0 -86
  233. package/dist/Metadata/constants.js +0 -9
  234. package/dist/Metadata/index.js +0 -29
  235. package/dist/Metadata/metadata.scss +0 -15
  236. package/dist/MoreDropdown/constants.js +0 -25
  237. package/dist/NavigationHeader/LeftBlock.js +0 -32
  238. package/dist/NavigationHeader/Navigation.js +0 -24
  239. package/dist/NavigationHeader/RightBlock.js +0 -68
  240. package/dist/NavigationHeader/constants.js +0 -11
  241. package/dist/NavigationHeader/index.js +0 -19
  242. package/dist/NavigationHeader/navigation-header.scss +0 -3
  243. package/dist/NeetoWidget/CodeBlock.js +0 -57
  244. package/dist/NeetoWidget/CodeSnippet.js +0 -119
  245. package/dist/NeetoWidget/EmbedCode.js +0 -281
  246. package/dist/NeetoWidget/Main.js +0 -19
  247. package/dist/NeetoWidget/SelectionSwitches/TooltipSwitch.js +0 -25
  248. package/dist/NeetoWidget/SelectionSwitches/index.js +0 -44
  249. package/dist/NeetoWidget/SyntaxHighlighter.js +0 -17
  250. package/dist/NeetoWidget/api.js +0 -20
  251. package/dist/NeetoWidget/constants.js +0 -62
  252. package/dist/NeetoWidget/hooks/useForceUpdate.js +0 -14
  253. package/dist/NeetoWidget/index.js +0 -7
  254. package/dist/NeetoWidget/mutations.js +0 -9
  255. package/dist/NeetoWidget/queries.js +0 -32
  256. package/dist/NeetoWidget/utils.js +0 -83
  257. package/dist/PageLoader/index.js +0 -81
  258. package/dist/PageLoader/page-loader.scss +0 -95
  259. package/dist/PhoneNumber/CountryPicker/SingleValue.js +0 -21
  260. package/dist/PhoneNumber/CountryPicker/constants.js +0 -26
  261. package/dist/PhoneNumber/CountryPicker/index.js +0 -59
  262. package/dist/PhoneNumber/FormikPhoneNumberInput.js +0 -21
  263. package/dist/PhoneNumber/PhoneNumber.js +0 -30
  264. package/dist/PhoneNumber/PhoneNumberInput.js +0 -79
  265. package/dist/PhoneNumber/index.js +0 -5
  266. package/dist/PhoneNumber/utils.js +0 -55
  267. package/dist/PublishBlock/AlertBlock.js +0 -14
  268. package/dist/PublishBlock/index.js +0 -100
  269. package/dist/PublishBlock/publish-block.scss +0 -25
  270. package/dist/Rename/DummySpan.js +0 -21
  271. package/dist/Rename/constants.js +0 -1
  272. package/dist/Rename/index.js +0 -191
  273. package/dist/Rename/rename.scss +0 -69
  274. package/dist/Rename/utils.js +0 -10
  275. package/dist/ResponsiveDevicePicker/constants.js +0 -19
  276. package/dist/ResponsiveDevicePicker/index.js +0 -36
  277. package/dist/Schedule/DisplayAvailability.js +0 -58
  278. package/dist/Schedule/Fields.js +0 -43
  279. package/dist/Schedule/Form/ScheduleRow.js +0 -125
  280. package/dist/Schedule/Form/constants.js +0 -20
  281. package/dist/Schedule/Form/index.js +0 -144
  282. package/dist/Schedule/Form/utils.js +0 -63
  283. package/dist/Schedule/Header.js +0 -76
  284. package/dist/Schedule/ScheduleContext.js +0 -8
  285. package/dist/Schedule/constants.js +0 -8
  286. package/dist/Schedule/dayjsExtended/constants.js +0 -1
  287. package/dist/Schedule/dayjsExtended/index.js +0 -14
  288. package/dist/Schedule/dayjsExtended/range.js +0 -73
  289. package/dist/Schedule/index.js +0 -80
  290. package/dist/Schedule/utils.js +0 -152
  291. package/dist/Scrollable/constants.js +0 -8
  292. package/dist/Scrollable/index.js +0 -26
  293. package/dist/Scrollable/scrollable.scss +0 -32
  294. package/dist/Search/index.js +0 -52
  295. package/dist/Security/AllowedKeywords/Add.js +0 -38
  296. package/dist/Security/AllowedKeywords/index.js +0 -38
  297. package/dist/Security/PasswordBlock.js +0 -31
  298. package/dist/Security/RadioBlock.js +0 -38
  299. package/dist/Security/api.js +0 -12
  300. package/dist/Security/constants.js +0 -58
  301. package/dist/Security/index.js +0 -68
  302. package/dist/Security/useSecurityApi.js +0 -22
  303. package/dist/Security/utils.js +0 -31
  304. package/dist/SendToFields/FilePicker.js +0 -34
  305. package/dist/SendToFields/constants.js +0 -6
  306. package/dist/SendToFields/index.js +0 -102
  307. package/dist/SendToFields/utils.js +0 -54
  308. package/dist/Settings/Category.js +0 -30
  309. package/dist/Settings/Item.js +0 -38
  310. package/dist/Settings/index.js +0 -37
  311. package/dist/Settings/utils.js +0 -4
  312. package/dist/ShareViaEmail/EmailBodyEditor.js +0 -22
  313. package/dist/ShareViaEmail/FilePicker.js +0 -43
  314. package/dist/ShareViaEmail/Form.js +0 -105
  315. package/dist/ShareViaEmail/FormikDatePicker.js +0 -24
  316. package/dist/ShareViaEmail/constants.js +0 -14
  317. package/dist/ShareViaEmail/index.js +0 -92
  318. package/dist/ShareViaEmail/utils.js +0 -72
  319. package/dist/ShareViaLink/EditURL.js +0 -74
  320. package/dist/ShareViaLink/Link.js +0 -105
  321. package/dist/ShareViaLink/QRCode.js +0 -41
  322. package/dist/ShareViaLink/RegenerateURL.js +0 -47
  323. package/dist/ShareViaLink/SocialMedia.js +0 -52
  324. package/dist/ShareViaLink/constants.js +0 -25
  325. package/dist/ShareViaLink/edit-url.scss +0 -8
  326. package/dist/ShareViaLink/index.js +0 -46
  327. package/dist/ShareViaLink/utils.js +0 -47
  328. package/dist/Sidebar/AppSwitcher/AppLink.js +0 -45
  329. package/dist/Sidebar/AppSwitcher/Backdrop.js +0 -13
  330. package/dist/Sidebar/AppSwitcher/Body.js +0 -65
  331. package/dist/Sidebar/AppSwitcher/Portal.js +0 -27
  332. package/dist/Sidebar/AppSwitcher/appswitcher.scss +0 -164
  333. package/dist/Sidebar/AppSwitcher/index.js +0 -47
  334. package/dist/Sidebar/AppSwitcher/utils.js +0 -25
  335. package/dist/Sidebar/Chevron.js +0 -14
  336. package/dist/Sidebar/FeaturedTooltip.js +0 -19
  337. package/dist/Sidebar/Footer/AppSwitcherButton.js +0 -48
  338. package/dist/Sidebar/Footer/ProfileButton.js +0 -30
  339. package/dist/Sidebar/Footer/index.js +0 -56
  340. package/dist/Sidebar/Footer/utils.js +0 -39
  341. package/dist/Sidebar/Header.js +0 -33
  342. package/dist/Sidebar/HelpSection/HelpSectionMenu.js +0 -52
  343. package/dist/Sidebar/HelpSection/index.js +0 -32
  344. package/dist/Sidebar/Links.js +0 -112
  345. package/dist/Sidebar/NavIconWrapper.js +0 -20
  346. package/dist/Sidebar/ProfileSection/LinkSection.js +0 -36
  347. package/dist/Sidebar/ProfileSection/ProfileMenu.js +0 -48
  348. package/dist/Sidebar/ProfileSection/index.js +0 -42
  349. package/dist/Sidebar/constants.js +0 -40
  350. package/dist/Sidebar/index.js +0 -94
  351. package/dist/Sidebar/sidebar.scss +0 -379
  352. package/dist/Sidebar/utils.js +0 -18
  353. package/dist/SubHeader/RightBlock/Columns.js +0 -35
  354. package/dist/SubHeader/RightBlock/Download.js +0 -28
  355. package/dist/SubHeader/RightBlock/Filter.js +0 -31
  356. package/dist/SubHeader/RightBlock/index.js +0 -21
  357. package/dist/SubHeader/RightBlock/utils.js +0 -13
  358. package/dist/SubHeader/index.js +0 -28
  359. package/dist/SubHeader/subheader.scss +0 -78
  360. package/dist/ThemeSidebar/Customize/Logo.js +0 -39
  361. package/dist/ThemeSidebar/Customize/Properties.js +0 -170
  362. package/dist/ThemeSidebar/Customize/index.js +0 -66
  363. package/dist/ThemeSidebar/Themes/ThemeCard.js +0 -135
  364. package/dist/ThemeSidebar/Themes/index.js +0 -110
  365. package/dist/ThemeSidebar/TitleBar.js +0 -62
  366. package/dist/ThemeSidebar/constants.js +0 -127
  367. package/dist/ThemeSidebar/fields/AlignmentBlock.js +0 -50
  368. package/dist/ThemeSidebar/fields/Card.js +0 -19
  369. package/dist/ThemeSidebar/fields/ColorBlock.js +0 -19
  370. package/dist/ThemeSidebar/fields/FontPickerBlock.js +0 -35
  371. package/dist/ThemeSidebar/fields/ImageBlock/ImageUploader.js +0 -67
  372. package/dist/ThemeSidebar/fields/ImageBlock/ProgressBar.js +0 -22
  373. package/dist/ThemeSidebar/fields/ImageBlock/index.js +0 -55
  374. package/dist/ThemeSidebar/fields/SelectBlock.js +0 -24
  375. package/dist/ThemeSidebar/fields/SliderBlock.js +0 -30
  376. package/dist/ThemeSidebar/fields/SwitchBlock.js +0 -17
  377. package/dist/ThemeSidebar/fields/TextBlock.js +0 -13
  378. package/dist/ThemeSidebar/fields/slider.scss +0 -199
  379. package/dist/ThemeSidebar/hooks/useDirectUploadDropzone.js +0 -149
  380. package/dist/ThemeSidebar/index.js +0 -118
  381. package/dist/ThemeSidebar/themeSidebar.scss +0 -45
  382. package/dist/ThemeSidebar/utils.js +0 -169
  383. package/dist/TimeFormat/index.js +0 -3
  384. package/dist/TimezoneMismatchModal/apis/time_zone.js +0 -9
  385. package/dist/TimezoneMismatchModal/index.js +0 -83
  386. package/dist/TimezoneMismatchModal/useTimeZoneApi.js +0 -10
  387. package/dist/TimezoneMismatchModal/utils.js +0 -12
  388. package/dist/ToggleFeatureCard/ToolTipSwitch.js +0 -31
  389. package/dist/ToggleFeatureCard/constants.js +0 -5
  390. package/dist/ToggleFeatureCard/hooks/useScrollIntoView.js +0 -11
  391. package/dist/ToggleFeatureCard/index.js +0 -148
  392. package/dist/ToggleFeatureCard/toggleFeatureCard.scss +0 -4
@@ -1,98 +0,0 @@
1
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
- import React, { useState } from "react";
3
- import { SINGULAR } from "@bigbinary/neeto-commons-frontend/constants";
4
- import { isNotEmpty, noop } from "@bigbinary/neeto-commons-frontend/pure";
5
- import { CustomDomain as NeetoUICustomDomainIcon } from "@bigbinary/neeto-icons";
6
- import { Button, Tag, Spinner } from "@bigbinary/neetoui";
7
- import { useTranslation } from "react-i18next";
8
- import DeleteAlert from "../CustomDomainDashboard/DeleteAlert";
9
- import ManageDomain from "../CustomDomainDashboard/Manage";
10
- import { useFetchCustomDomains, useDeleteCustomDomain } from "../CustomDomainDashboard/useCustomDomainApi";
11
- import MoreDropdown from "../MoreDropdown";
12
- var CustomDomain = function CustomDomain(_ref) {
13
- var url = _ref.url,
14
- iconOnly = _ref.iconOnly;
15
- var _useState = useState(false),
16
- _useState2 = _slicedToArray(_useState, 2),
17
- isPaneOpen = _useState2[0],
18
- setIsPaneOpen = _useState2[1];
19
- var _useState3 = useState(false),
20
- _useState4 = _slicedToArray(_useState3, 2),
21
- isAlertOpen = _useState4[0],
22
- setIsAlertOpen = _useState4[1];
23
- var _useTranslation = useTranslation(),
24
- t = _useTranslation.t;
25
- var _useFetchCustomDomain = useFetchCustomDomains({
26
- url: url
27
- }),
28
- customDomain = _useFetchCustomDomain.data,
29
- isLoading = _useFetchCustomDomain.isLoading;
30
- var _useDeleteCustomDomai = useDeleteCustomDomain(url, {
31
- onSettled: function onSettled() {
32
- return setIsAlertOpen(false);
33
- }
34
- }),
35
- deleteCustomDomain = _useDeleteCustomDomai.mutate,
36
- isDeleting = _useDeleteCustomDomai.isLoading;
37
- var actions = [{
38
- key: "edit",
39
- label: t("neetoMolecules.common.actions.edit"),
40
- onClick: function onClick() {
41
- return setIsPaneOpen(true);
42
- }
43
- }, {
44
- key: "delete",
45
- label: t("neetoMolecules.common.actions.delete"),
46
- onClick: function onClick() {
47
- return setIsAlertOpen(true);
48
- }
49
- }];
50
- if (isLoading) return /*#__PURE__*/React.createElement(Spinner, null);
51
- return /*#__PURE__*/React.createElement("div", null, isNotEmpty(customDomain) ? /*#__PURE__*/React.createElement("div", {
52
- className: "flex flex-row items-center"
53
- }, /*#__PURE__*/React.createElement(Tag, {
54
- label: customDomain === null || customDomain === void 0 ? void 0 : customDomain.hostname,
55
- style: customDomain.status === "active" ? "success" : "warning"
56
- }), /*#__PURE__*/React.createElement(MoreDropdown, {
57
- dropdownProps: {
58
- autoWidth: true
59
- },
60
- menuItems: actions,
61
- dropdownButtonProps: {
62
- "data-testid": "nui-dropdown-icon",
63
- strategy: "fixed"
64
- }
65
- })) : /*#__PURE__*/React.createElement(Button, {
66
- icon: iconOnly && NeetoUICustomDomainIcon,
67
- style: "text",
68
- label: iconOnly ? "" : t("neetoMolecules.common.actions.add", {
69
- entity: t("neetoMolecules.customDomain.customDomain", SINGULAR).toLowerCase()
70
- }),
71
- tooltipProps: iconOnly && {
72
- content: t("neetoMolecules.customDomain.customDomain", SINGULAR)
73
- },
74
- onClick: function onClick() {
75
- return setIsPaneOpen(true);
76
- }
77
- }), /*#__PURE__*/React.createElement(ManageDomain, {
78
- hasOne: true,
79
- customDomain: customDomain,
80
- url: url,
81
- isOpen: isPaneOpen,
82
- setCustomDomain: noop,
83
- onClose: function onClose() {
84
- return setIsPaneOpen(false);
85
- }
86
- }), /*#__PURE__*/React.createElement(DeleteAlert, {
87
- hostname: customDomain === null || customDomain === void 0 ? void 0 : customDomain.hostname,
88
- isOpen: isAlertOpen,
89
- isSubmitting: isDeleting,
90
- onClose: function onClose() {
91
- return setIsAlertOpen(false);
92
- },
93
- onSubmit: function onSubmit() {
94
- return deleteCustomDomain();
95
- }
96
- }));
97
- };
98
- export default CustomDomain;
@@ -1,28 +0,0 @@
1
- import React from "react";
2
- import { Alert } from "@bigbinary/neetoui";
3
- import { useTranslation, Trans } from "react-i18next";
4
- var DeleteAlert = function DeleteAlert(_ref) {
5
- var onClose = _ref.onClose,
6
- onSubmit = _ref.onSubmit,
7
- isOpen = _ref.isOpen,
8
- isSubmitting = _ref.isSubmitting,
9
- hostname = _ref.hostname;
10
- var _useTranslation = useTranslation(),
11
- t = _useTranslation.t;
12
- return /*#__PURE__*/React.createElement(Alert, {
13
- cancelButtonLabel: t("neetoMolecules.common.actions.cancel"),
14
- isOpen: isOpen,
15
- isSubmitting: isSubmitting,
16
- submitButtonLabel: t("neetoMolecules.common.actions.delete"),
17
- title: t("neetoMolecules.customDomain.delete"),
18
- message: /*#__PURE__*/React.createElement(Trans, {
19
- i18nKey: "neetoMolecules.customDomain.alertMessage",
20
- values: {
21
- hostname: hostname
22
- }
23
- }),
24
- onClose: onClose,
25
- onSubmit: onSubmit
26
- });
27
- };
28
- export default DeleteAlert;
@@ -1,32 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import React from "react";
3
- import { PLURAL } from "@bigbinary/neeto-commons-frontend/constants";
4
- import { withT } from "@bigbinary/neeto-commons-frontend/react-utils";
5
- import { withEventTargetValue } from "@bigbinary/neeto-commons-frontend/utils";
6
- import { Button } from "@bigbinary/neetoui";
7
- import NeetoHeader from "../Header";
8
- var Header = withT(function (_ref) {
9
- var t = _ref.t,
10
- setIsPaneOpen = _ref.setIsPaneOpen,
11
- searchTerm = _ref.searchTerm,
12
- setSearchTerm = _ref.setSearchTerm,
13
- headerProps = _ref.headerProps;
14
- return /*#__PURE__*/React.createElement(NeetoHeader, _extends({
15
- "data-testid": "custom-domain-header",
16
- title: t("neetoMolecules.customDomain.customDomain", PLURAL),
17
- actionBlock: /*#__PURE__*/React.createElement(Button, {
18
- "data-cy": "add-new-custom-domain-button",
19
- label: t("neetoMolecules.customDomain.addNew"),
20
- onClick: function onClick() {
21
- return setIsPaneOpen(true);
22
- }
23
- }),
24
- searchProps: {
25
- value: searchTerm,
26
- onChange: withEventTargetValue(setSearchTerm),
27
- placeholder: t("neetoMolecules.customDomain.search"),
28
- "data-cy": "custom-domain-search-field"
29
- }
30
- }, headerProps));
31
- });
32
- export default /*#__PURE__*/React.memo(Header);
@@ -1,42 +0,0 @@
1
- import React from "react";
2
- import { joinHyphenCase } from "@bigbinary/neeto-commons-frontend/utils";
3
- import { Info } from "@bigbinary/neeto-icons";
4
- import { Input, Callout } from "@bigbinary/neetoui";
5
- import CopyToClipboardButton from "../../CopyToClipboardButton";
6
- import { recordData } from "../utils";
7
- var Record = function Record(_ref) {
8
- var customDomain = _ref.customDomain;
9
- var _recordData = recordData(customDomain),
10
- recordName = _recordData.recordName,
11
- recordValue = _recordData.recordValue,
12
- recordDescription = _recordData.recordDescription,
13
- recordNameLabel = _recordData.recordNameLabel,
14
- recordValueLabel = _recordData.recordValueLabel;
15
- return /*#__PURE__*/React.createElement("div", {
16
- className: "mt-6 grid gap-4"
17
- }, customDomain.status !== "active" && /*#__PURE__*/React.createElement(Callout, {
18
- icon: Info,
19
- style: "info"
20
- }, recordDescription), /*#__PURE__*/React.createElement(Input, {
21
- disabled: true,
22
- "data-cy": joinHyphenCase(recordNameLabel),
23
- label: recordNameLabel,
24
- value: recordName,
25
- suffix: /*#__PURE__*/React.createElement(CopyToClipboardButton, {
26
- size: "small",
27
- style: "text",
28
- value: recordName
29
- })
30
- }), /*#__PURE__*/React.createElement(Input, {
31
- disabled: true,
32
- "data-cy": joinHyphenCase(recordValueLabel),
33
- label: recordValueLabel,
34
- value: recordValue,
35
- suffix: /*#__PURE__*/React.createElement(CopyToClipboardButton, {
36
- size: "small",
37
- style: "text",
38
- value: recordValue
39
- })
40
- }));
41
- };
42
- export default /*#__PURE__*/React.memo(Record);
@@ -1,21 +0,0 @@
1
- import React from "react";
2
- import { Trans } from "react-i18next";
3
- var StatusInfo = function StatusInfo() {
4
- var helpUrl = "https://help.".concat(globalProps.appName.toLowerCase(), ".com/articles/custom-domains");
5
- return /*#__PURE__*/React.createElement("div", {
6
- className: "space-y-6"
7
- }, /*#__PURE__*/React.createElement("div", {
8
- className: "neeto-ui-rounded neeto-ui-bg-gray-100 neeto-ui-text-gray-700 space-y-3 p-4"
9
- }, /*#__PURE__*/React.createElement(Trans, {
10
- i18nKey: "neetoMolecules.customDomain.messageBlock.dnsStatus",
11
- components: {
12
- a: /*#__PURE__*/React.createElement("a", {
13
- className: "neeto-ui-btn--style-link",
14
- href: helpUrl,
15
- rel: "noreferrer",
16
- target: "_blank"
17
- })
18
- }
19
- })));
20
- };
21
- export default /*#__PURE__*/React.memo(StatusInfo);
@@ -1,36 +0,0 @@
1
- import React from "react";
2
- import classnames from "classnames";
3
- import { snakeToCamelCase } from "@bigbinary/neeto-commons-frontend/pure";
4
- import { Tag } from "@bigbinary/neetoui";
5
- import { useTranslation } from "react-i18next";
6
- var TagBlock = function TagBlock(_ref) {
7
- var status = _ref.status,
8
- _ref$stacked = _ref.stacked,
9
- stacked = _ref$stacked === void 0 ? false : _ref$stacked;
10
- var _useTranslation = useTranslation(),
11
- t = _useTranslation.t;
12
- var isDomainValidated = status === "active" || status === "pending_cname_validation";
13
- var camelCasedStatus = snakeToCamelCase(status || "");
14
- return /*#__PURE__*/React.createElement("div", {
15
- className: classnames("flex gap-2", {
16
- "flex-col items-start": stacked
17
- })
18
- }, status === "failed" ? /*#__PURE__*/React.createElement(Tag, {
19
- indicatorStyle: "danger",
20
- label: t("neetoMolecules.customDomain.status.".concat(camelCasedStatus)),
21
- style: "secondary"
22
- }) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Tag, {
23
- indicatorStyle: isDomainValidated ? "success" : "warning",
24
- style: "secondary",
25
- label: t("neetoMolecules.customDomain.status.domain.".concat(camelCasedStatus))
26
- }), isDomainValidated && /*#__PURE__*/React.createElement("div", {
27
- className: classnames("flex items-center justify-between gap-2", {
28
- "w-full": stacked
29
- })
30
- }, /*#__PURE__*/React.createElement(Tag, {
31
- indicatorStyle: status === "active" ? "success" : "warning",
32
- style: "secondary",
33
- label: t("neetoMolecules.customDomain.status.cname.".concat(camelCasedStatus))
34
- }))));
35
- };
36
- export default /*#__PURE__*/React.memo(TagBlock);
@@ -1,4 +0,0 @@
1
- export var HOSTNAME_REGEX = /^(?!-)[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9](?:\.[a-zA-Z]{2,})+/;
2
- export var INITIAL_VALUES = {
3
- hostname: ""
4
- };
@@ -1,125 +0,0 @@
1
- import React, { useRef } from "react";
2
- import { Form, Formik } from "formik";
3
- import { SINGULAR } from "@bigbinary/neeto-commons-frontend/constants";
4
- import { isNotEmpty } from "@bigbinary/neeto-commons-frontend/pure";
5
- import { Check } from "@bigbinary/neeto-icons";
6
- import { Label, Pane, Typography, Button } from "@bigbinary/neetoui";
7
- import { Input } from "@bigbinary/neetoui/formik";
8
- import { useTranslation } from "react-i18next";
9
- import { INITIAL_VALUES } from "./constants";
10
- import Record from "./Record";
11
- import StatusInfo from "./StatusInfo";
12
- import TagBlock from "./TagBlock";
13
- import { getCustomDomainValidationSchema } from "./utils";
14
- import { useCreateCustomDomain, useValidateDomain, useValidateCname, useUpdateCustomDomain } from "../useCustomDomainApi";
15
- var Manage = function Manage(_ref) {
16
- var isOpen = _ref.isOpen,
17
- onClose = _ref.onClose,
18
- customDomain = _ref.customDomain,
19
- setCustomDomain = _ref.setCustomDomain,
20
- url = _ref.url,
21
- hasOne = _ref.hasOne;
22
- var _useTranslation = useTranslation(),
23
- t = _useTranslation.t;
24
- var initialFocusRef = useRef(null);
25
- var customDomainId = hasOne ? null : customDomain === null || customDomain === void 0 ? void 0 : customDomain.id;
26
- var _useCreateCustomDomai = useCreateCustomDomain(url),
27
- createCustomDomain = _useCreateCustomDomai.mutate,
28
- isCreating = _useCreateCustomDomai.isLoading;
29
- var _useValidateDomain = useValidateDomain(url),
30
- validateDomain = _useValidateDomain.mutate,
31
- isValidating = _useValidateDomain.isLoading;
32
- var _useValidateCname = useValidateCname(url),
33
- validateCname = _useValidateCname.mutate,
34
- isCnameValidating = _useValidateCname.isLoading;
35
- var _useUpdateCustomDomai = useUpdateCustomDomain(url),
36
- updateCustomDomain = _useUpdateCustomDomai.mutate,
37
- isUpdating = _useUpdateCustomDomai.isLoading;
38
- var handleSubmit = function handleSubmit(values) {
39
- return createCustomDomain(values, {
40
- onSuccess: function onSuccess(values) {
41
- return setCustomDomain(values);
42
- }
43
- });
44
- };
45
- var handleValidateDomain = function handleValidateDomain() {
46
- return validateDomain(customDomainId, {
47
- onSuccess: function onSuccess(values) {
48
- return setCustomDomain(values);
49
- }
50
- });
51
- };
52
- var handleValidateCname = function handleValidateCname() {
53
- validateCname(customDomainId, {
54
- onSuccess: function onSuccess(data) {
55
- return setCustomDomain(data);
56
- }
57
- });
58
- };
59
- var handleUpdateCname = function handleUpdateCname() {
60
- updateCustomDomain(customDomainId, {
61
- onSuccess: function onSuccess(data) {
62
- return setCustomDomain(data);
63
- }
64
- });
65
- };
66
- return /*#__PURE__*/React.createElement(Pane, {
67
- initialFocusRef: initialFocusRef,
68
- isOpen: isOpen,
69
- onClose: onClose
70
- }, /*#__PURE__*/React.createElement(Formik, {
71
- enableReinitialize: true,
72
- initialValues: customDomain || INITIAL_VALUES,
73
- validationSchema: getCustomDomainValidationSchema(),
74
- onSubmit: handleSubmit
75
- }, function (_ref2) {
76
- var dirty = _ref2.dirty;
77
- return /*#__PURE__*/React.createElement(Form, null, /*#__PURE__*/React.createElement(Pane.Header, null, /*#__PURE__*/React.createElement(Typography, {
78
- "data-cy": "add-custom-domain-pane-heading",
79
- style: "h2",
80
- weight: "semibold"
81
- }, isNotEmpty(customDomain) ? t("neetoMolecules.customDomain.edit") : t("neetoMolecules.customDomain.addNew"))), /*#__PURE__*/React.createElement(Pane.Body, null, /*#__PURE__*/React.createElement("div", {
82
- className: "w-full space-y-6"
83
- }, isNotEmpty(customDomain) && /*#__PURE__*/React.createElement(TagBlock, {
84
- stacked: true,
85
- handleValidateCname: handleValidateCname,
86
- isCnameRecordsAdded: customDomain.addedCnameAt,
87
- status: customDomain.status
88
- }), /*#__PURE__*/React.createElement("div", {
89
- className: "space-y-2"
90
- }, /*#__PURE__*/React.createElement(Label, {
91
- required: true,
92
- htmlFor: "hostname"
93
- }, isNotEmpty(customDomain) ? t("neetoMolecules.customDomain.customDomain", SINGULAR) : t("neetoMolecules.customDomain.label")), /*#__PURE__*/React.createElement("div", {
94
- className: "flex items-start gap-2"
95
- }, /*#__PURE__*/React.createElement(Input, {
96
- "data-cy": "custom-domain-input-field",
97
- disabled: isNotEmpty(customDomain),
98
- name: "hostname",
99
- placeholder: t("neetoMolecules.customDomain.placeholder"),
100
- ref: initialFocusRef
101
- }), !isNotEmpty(customDomain) && /*#__PURE__*/React.createElement(Button, {
102
- "data-cy": "submit-custom-domain-button",
103
- "data-testid": "submit-custom-domain-button",
104
- disabled: !dirty || isCreating,
105
- icon: Check,
106
- loading: isCreating,
107
- style: "primary",
108
- type: "submit"
109
- }))), isNotEmpty(customDomain) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Record, {
110
- customDomain: customDomain
111
- }), customDomain.status === "pending_domain_validation" && /*#__PURE__*/React.createElement(Button, {
112
- "data-cy": "validate-domain-button",
113
- disabled: isValidating,
114
- loading: isValidating,
115
- label: t("neetoMolecules.customDomain.validation.buttonLabel.domain"),
116
- onClick: handleValidateDomain
117
- }), customDomain.status === "pending_cname_validation" && /*#__PURE__*/React.createElement(Button, {
118
- "data-cy": "validate-cname-record-button",
119
- loading: isCnameValidating || isUpdating,
120
- label: t("neetoMolecules.customDomain.validation.buttonLabel.cnameAdded"),
121
- onClick: handleUpdateCname
122
- }), /*#__PURE__*/React.createElement(StatusInfo, null)))));
123
- }));
124
- };
125
- export default Manage;
@@ -1,8 +0,0 @@
1
- import { t } from "i18next";
2
- import * as Yup from "yup";
3
- import { HOSTNAME_REGEX } from "./constants";
4
- export var getCustomDomainValidationSchema = function getCustomDomainValidationSchema() {
5
- return Yup.object().shape({
6
- hostname: Yup.string().required(t("neetoMolecules.customDomain.formikValidation.required")).matches(HOSTNAME_REGEX, t("neetoMolecules.customDomain.formikValidation.valid"))
7
- });
8
- };
@@ -1,35 +0,0 @@
1
- import axios from "axios";
2
- var getUrlwithId = function getUrlwithId(url, id) {
3
- return id ? "".concat(url, "/").concat(id) : url;
4
- };
5
- var fetchCustomDomains = function fetchCustomDomains(_ref) {
6
- var url = _ref.url,
7
- params = _ref.params;
8
- return axios.get(url, {
9
- params: params
10
- });
11
- };
12
- var updateCustomDomain = function updateCustomDomain(url, id) {
13
- return axios.patch(getUrlwithId(url, id));
14
- };
15
- var createCustomDomain = function createCustomDomain(url, payload) {
16
- return axios.post(url, payload);
17
- };
18
- var deleteCustomDomain = function deleteCustomDomain(url, id) {
19
- return axios["delete"](getUrlwithId(url, id));
20
- };
21
- var validateDomain = function validateDomain(url, id) {
22
- return axios.patch("".concat(getUrlwithId(url, id), "/validate_domain"));
23
- };
24
- var validateCname = function validateCname(url, id) {
25
- return axios.patch("".concat(getUrlwithId(url, id), "/validate_cname"));
26
- };
27
- var customDomainApi = {
28
- createCustomDomain: createCustomDomain,
29
- deleteCustomDomain: deleteCustomDomain,
30
- validateDomain: validateDomain,
31
- fetchCustomDomains: fetchCustomDomains,
32
- validateCname: validateCname,
33
- updateCustomDomain: updateCustomDomain
34
- };
35
- export default customDomainApi;
@@ -1,2 +0,0 @@
1
- export var DEFAULT_STALE_TIME = 60 * 60 * 1000;
2
- export var DOMAIN_QUERY_KEY = "custom-domain";
@@ -1,118 +0,0 @@
1
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
- import React, { useState } from "react";
3
- import { isNotEmpty } from "@bigbinary/neeto-commons-frontend/pure";
4
- import { useDebounce } from "@bigbinary/neeto-commons-frontend/react-utils";
5
- import { Table, Typography, NoData } from "@bigbinary/neetoui";
6
- import { useTranslation } from "react-i18next";
7
- import Container from "../Container";
8
- import PageLoader from "../PageLoader";
9
- import SubHeader from "../SubHeader";
10
- import DeleteAlert from "./DeleteAlert";
11
- import Header from "./Header";
12
- import ManageDomain from "./Manage";
13
- import { useFetchCustomDomains, useDeleteCustomDomain } from "./useCustomDomainApi";
14
- import { renderColumnData } from "./utils";
15
- var CustomDomainDashboard = function CustomDomainDashboard(_ref) {
16
- var _data$customDomains;
17
- var headerProps = _ref.headerProps,
18
- url = _ref.url;
19
- var _useState = useState(""),
20
- _useState2 = _slicedToArray(_useState, 2),
21
- searchTerm = _useState2[0],
22
- setSearchTerm = _useState2[1];
23
- var _useState3 = useState(false),
24
- _useState4 = _slicedToArray(_useState3, 2),
25
- isPaneOpen = _useState4[0],
26
- setIsPaneOpen = _useState4[1];
27
- var _useState5 = useState({}),
28
- _useState6 = _slicedToArray(_useState5, 2),
29
- customDomain = _useState6[0],
30
- setCustomDomain = _useState6[1];
31
- var _useState7 = useState(false),
32
- _useState8 = _slicedToArray(_useState7, 2),
33
- isAlertOpen = _useState8[0],
34
- setIsAlertOpen = _useState8[1];
35
- var _useTranslation = useTranslation(),
36
- t = _useTranslation.t;
37
- var debouncedSearchTerm = useDebounce(searchTerm, 500);
38
- var _useFetchCustomDomain = useFetchCustomDomains({
39
- url: url,
40
- params: {
41
- search: debouncedSearchTerm
42
- }
43
- }),
44
- data = _useFetchCustomDomain.data,
45
- isLoading = _useFetchCustomDomain.isLoading;
46
- var _useDeleteCustomDomai = useDeleteCustomDomain(url, {
47
- onSettled: function onSettled() {
48
- setIsAlertOpen(false);
49
- setCustomDomain({});
50
- }
51
- }),
52
- deleteCustomDomain = _useDeleteCustomDomai.mutate,
53
- isDeleting = _useDeleteCustomDomai.isLoading;
54
- var enableManagePane = function enableManagePane(customDomain) {
55
- setCustomDomain(customDomain);
56
- setIsPaneOpen(true);
57
- };
58
- var enableDeleteAlert = function enableDeleteAlert(customDomain) {
59
- setCustomDomain(customDomain);
60
- setIsAlertOpen(true);
61
- };
62
- var disableManagePane = function disableManagePane() {
63
- setIsPaneOpen(false);
64
- setCustomDomain({});
65
- };
66
- var disableDeleteAlert = function disableDeleteAlert() {
67
- setIsAlertOpen(false);
68
- setCustomDomain({});
69
- };
70
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Container, null, /*#__PURE__*/React.createElement(Header, {
71
- headerProps: headerProps,
72
- searchTerm: searchTerm,
73
- setIsPaneOpen: setIsPaneOpen,
74
- setSearchTerm: setSearchTerm
75
- }), isLoading && /*#__PURE__*/React.createElement("div", {
76
- className: "h-screen w-full"
77
- }, /*#__PURE__*/React.createElement(PageLoader, null)), !isLoading && (isNotEmpty(data === null || data === void 0 ? void 0 : data.customDomains) ? /*#__PURE__*/React.createElement("div", {
78
- className: "w-full flex-grow"
79
- }, /*#__PURE__*/React.createElement(SubHeader, {
80
- leftActionBlock: /*#__PURE__*/React.createElement(Typography, {
81
- className: "neeto-ui-gray-800 font-semibold",
82
- component: "h4"
83
- }, t("neetoMolecules.customDomain.customDomainWithCount", {
84
- count: data === null || data === void 0 ? void 0 : (_data$customDomains = data.customDomains) === null || _data$customDomains === void 0 ? void 0 : _data$customDomains.length
85
- }))
86
- }), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Table, {
87
- allowRowClick: false,
88
- rowData: data === null || data === void 0 ? void 0 : data.customDomains,
89
- rowSelection: false,
90
- columnData: renderColumnData(enableManagePane, enableDeleteAlert)
91
- }))) : /*#__PURE__*/React.createElement("div", {
92
- className: "flex h-full w-full flex-grow items-center justify-center"
93
- }, /*#__PURE__*/React.createElement(NoData, {
94
- title: t("neetoMolecules.customDomain.notFound"),
95
- primaryButtonProps: {
96
- label: t("neetoMolecules.customDomain.addNew"),
97
- onClick: function onClick() {
98
- return setIsPaneOpen(true);
99
- }
100
- }
101
- })))), /*#__PURE__*/React.createElement(ManageDomain, {
102
- customDomain: customDomain,
103
- hasOne: false,
104
- isOpen: isPaneOpen,
105
- setCustomDomain: setCustomDomain,
106
- url: url,
107
- onClose: disableManagePane
108
- }), /*#__PURE__*/React.createElement(DeleteAlert, {
109
- hostname: customDomain === null || customDomain === void 0 ? void 0 : customDomain.hostname,
110
- isOpen: isAlertOpen,
111
- isSubmitting: isDeleting,
112
- onClose: disableDeleteAlert,
113
- onSubmit: function onSubmit() {
114
- return deleteCustomDomain(customDomain === null || customDomain === void 0 ? void 0 : customDomain.id);
115
- }
116
- }));
117
- };
118
- export default CustomDomainDashboard;
@@ -1,71 +0,0 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
- import { useMutation, useQuery, useQueryClient } from "react-query";
5
- import customDomainApi from "./api";
6
- import { DEFAULT_STALE_TIME, DOMAIN_QUERY_KEY } from "./constants";
7
- var useCreateCustomDomain = function useCreateCustomDomain(url) {
8
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
9
- var queryClient = useQueryClient();
10
- return useMutation(function (payload) {
11
- return customDomainApi.createCustomDomain(url, payload);
12
- }, _objectSpread(_objectSpread({}, options), {}, {
13
- onSuccess: function onSuccess() {
14
- return queryClient.invalidateQueries(DOMAIN_QUERY_KEY);
15
- }
16
- }));
17
- };
18
- var useDeleteCustomDomain = function useDeleteCustomDomain(url) {
19
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
20
- var queryClient = useQueryClient();
21
- return useMutation(function (id) {
22
- return customDomainApi.deleteCustomDomain(url, id);
23
- }, _objectSpread(_objectSpread({}, options), {}, {
24
- onSuccess: function onSuccess(result) {
25
- var _options$onSuccess;
26
- (_options$onSuccess = options.onSuccess) === null || _options$onSuccess === void 0 ? void 0 : _options$onSuccess.call(options, result);
27
- queryClient.invalidateQueries(DOMAIN_QUERY_KEY);
28
- }
29
- }));
30
- };
31
- var useFetchCustomDomains = function useFetchCustomDomains(params) {
32
- return useQuery([DOMAIN_QUERY_KEY, _objectSpread({}, params)], function () {
33
- return customDomainApi.fetchCustomDomains(params);
34
- }, {
35
- staleTime: DEFAULT_STALE_TIME
36
- });
37
- };
38
- var useValidateDomain = function useValidateDomain(url) {
39
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
40
- var queryClient = useQueryClient();
41
- return useMutation(function (id) {
42
- return customDomainApi.validateDomain(url, id);
43
- }, _objectSpread(_objectSpread({}, options), {}, {
44
- onSuccess: function onSuccess() {
45
- return queryClient.invalidateQueries(DOMAIN_QUERY_KEY);
46
- }
47
- }));
48
- };
49
- var useValidateCname = function useValidateCname(url) {
50
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
51
- var queryClient = useQueryClient();
52
- return useMutation(function (id) {
53
- return customDomainApi.validateCname(url, id);
54
- }, _objectSpread(_objectSpread({}, options), {}, {
55
- onSuccess: function onSuccess() {
56
- return queryClient.invalidateQueries(DOMAIN_QUERY_KEY);
57
- }
58
- }));
59
- };
60
- var useUpdateCustomDomain = function useUpdateCustomDomain(url) {
61
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
62
- var queryClient = useQueryClient();
63
- return useMutation(function (id) {
64
- return customDomainApi.updateCustomDomain(url, id);
65
- }, _objectSpread(_objectSpread({}, options), {}, {
66
- onSuccess: function onSuccess() {
67
- return queryClient.invalidateQueries(DOMAIN_QUERY_KEY);
68
- }
69
- }));
70
- };
71
- export { useCreateCustomDomain, useDeleteCustomDomain, useValidateDomain, useFetchCustomDomains, useValidateCname, useUpdateCustomDomain };