@bigbinary/neeto-molecules 1.1.16 → 1.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (392) hide show
  1. package/dist/AutoSaveInput.js +658 -0
  2. package/dist/AutoSaveInput.js.map +1 -0
  3. package/dist/Breadcrumbs.js +38 -0
  4. package/dist/Breadcrumbs.js.map +1 -0
  5. package/dist/BrowserSupport.js +418 -0
  6. package/dist/BrowserSupport.js.map +1 -0
  7. package/dist/Builder.js +662 -0
  8. package/dist/Builder.js.map +1 -0
  9. package/dist/CalendarView.js +538 -0
  10. package/dist/CalendarView.js.map +1 -0
  11. package/dist/Codeblock.js +236 -0
  12. package/dist/Codeblock.js.map +1 -0
  13. package/dist/{Columns/index.js → Columns.js} +130 -13
  14. package/dist/Columns.js.map +1 -0
  15. package/dist/{ConfirmationModal/index.js → ConfirmationModal.js} +20 -8
  16. package/dist/ConfirmationModal.js.map +1 -0
  17. package/dist/Container.js +1211 -0
  18. package/dist/Container.js.map +1 -0
  19. package/dist/CopyToClipboardButton.js +209 -0
  20. package/dist/CopyToClipboardButton.js.map +1 -0
  21. package/dist/CustomDomain.js +688 -0
  22. package/dist/CustomDomain.js.map +1 -0
  23. package/dist/CustomDomainDashboard.js +2283 -0
  24. package/dist/CustomDomainDashboard.js.map +1 -0
  25. package/dist/{DateFormat/index.js → DateFormat.js} +25 -8
  26. package/dist/DateFormat.js.map +1 -0
  27. package/dist/DateRangeFilter.js +229 -0
  28. package/dist/DateRangeFilter.js.map +1 -0
  29. package/dist/DynamicVariables.js +183 -0
  30. package/dist/DynamicVariables.js.map +1 -0
  31. package/dist/EmailForm.js +2292 -0
  32. package/dist/EmailForm.js.map +1 -0
  33. package/dist/EmailPreview.js +1353 -0
  34. package/dist/EmailPreview.js.map +1 -0
  35. package/dist/{ErrorPage/constants.js → ErrorPage.js} +137 -36
  36. package/dist/ErrorPage.js.map +1 -0
  37. package/dist/Header.js +122 -0
  38. package/dist/Header.js.map +1 -0
  39. package/dist/IconPicker.js +313 -0
  40. package/dist/IconPicker.js.map +1 -0
  41. package/dist/ImageWithFallback.js +181 -0
  42. package/dist/ImageWithFallback.js.map +1 -0
  43. package/dist/IntegrationCard.js +343 -0
  44. package/dist/IntegrationCard.js.map +1 -0
  45. package/dist/IntegrationDisconnectAlert.js +80 -0
  46. package/dist/IntegrationDisconnectAlert.js.map +1 -0
  47. package/dist/{IntegrationWalkthroughModal/index.js → IntegrationWalkthroughModal.js} +8 -6
  48. package/dist/IntegrationWalkthroughModal.js.map +1 -0
  49. package/dist/IpRestriction.js +857 -0
  50. package/dist/IpRestriction.js.map +1 -0
  51. package/dist/KeyboardShortcuts.js +359 -0
  52. package/dist/KeyboardShortcuts.js.map +1 -0
  53. package/dist/LoginPage.js +593 -0
  54. package/dist/LoginPage.js.map +1 -0
  55. package/dist/MenuBar.js +1461 -0
  56. package/dist/MenuBar.js.map +1 -0
  57. package/dist/Metadata.js +206 -0
  58. package/dist/Metadata.js.map +1 -0
  59. package/dist/{MoreDropdown/index.js → MoreDropdown.js} +102 -9
  60. package/dist/MoreDropdown.js.map +1 -0
  61. package/dist/NavigationHeader.js +690 -0
  62. package/dist/NavigationHeader.js.map +1 -0
  63. package/dist/NeetoWidget.js +1333 -0
  64. package/dist/NeetoWidget.js.map +1 -0
  65. package/dist/PageLoader.js +134 -0
  66. package/dist/PageLoader.js.map +1 -0
  67. package/dist/PhoneNumber.js +365 -0
  68. package/dist/PhoneNumber.js.map +1 -0
  69. package/dist/PublishBlock.js +158 -0
  70. package/dist/PublishBlock.js.map +1 -0
  71. package/dist/Rename.js +450 -0
  72. package/dist/Rename.js.map +1 -0
  73. package/dist/ResponsiveDevicePicker.js +194 -0
  74. package/dist/ResponsiveDevicePicker.js.map +1 -0
  75. package/dist/Schedule.js +1046 -0
  76. package/dist/Schedule.js.map +1 -0
  77. package/dist/Scrollable.js +122 -0
  78. package/dist/Scrollable.js.map +1 -0
  79. package/dist/Search.js +151 -0
  80. package/dist/Search.js.map +1 -0
  81. package/dist/Security.js +1835 -0
  82. package/dist/Security.js.map +1 -0
  83. package/dist/SendToFields.js +601 -0
  84. package/dist/SendToFields.js.map +1 -0
  85. package/dist/Settings.js +435 -0
  86. package/dist/Settings.js.map +1 -0
  87. package/dist/ShareViaEmail.js +2277 -0
  88. package/dist/ShareViaEmail.js.map +1 -0
  89. package/dist/ShareViaLink.js +628 -0
  90. package/dist/ShareViaLink.js.map +1 -0
  91. package/dist/Sidebar.js +972 -0
  92. package/dist/Sidebar.js.map +1 -0
  93. package/dist/SubHeader.js +216 -0
  94. package/dist/SubHeader.js.map +1 -0
  95. package/dist/{TableWrapper/index.js → TableWrapper.js} +6 -3
  96. package/dist/TableWrapper.js.map +1 -0
  97. package/dist/ThemeSidebar.js +1984 -0
  98. package/dist/ThemeSidebar.js.map +1 -0
  99. package/dist/TimeFormat.js +47 -0
  100. package/dist/TimeFormat.js.map +1 -0
  101. package/dist/TimezoneMismatchModal.js +168 -0
  102. package/dist/TimezoneMismatchModal.js.map +1 -0
  103. package/dist/ToggleFeatureCard.js +323 -0
  104. package/dist/ToggleFeatureCard.js.map +1 -0
  105. package/package.json +22 -13
  106. package/dist/AutoSaveInput/autosaveinput.scss +0 -15
  107. package/dist/AutoSaveInput/constants.js +0 -13
  108. package/dist/AutoSaveInput/index.js +0 -124
  109. package/dist/AutoSaveInput/utils.js +0 -10
  110. package/dist/Breadcrumbs/breadcrumbs.scss +0 -33
  111. package/dist/Breadcrumbs/index.js +0 -31
  112. package/dist/BrowserSupport/Callout.js +0 -15
  113. package/dist/BrowserSupport/ContactUs.js +0 -21
  114. package/dist/BrowserSupport/DownloadLink.js +0 -17
  115. package/dist/BrowserSupport/PartialSupportedBrowserVersion.js +0 -17
  116. package/dist/BrowserSupport/UnknownBrowser.js +0 -13
  117. package/dist/BrowserSupport/UnsupportedBrowser.js +0 -24
  118. package/dist/BrowserSupport/UnsupportedBrowserMessage.js +0 -22
  119. package/dist/BrowserSupport/UnsupportedBrowserVersion.js +0 -27
  120. package/dist/BrowserSupport/UnsupportedVersionMessage.js +0 -30
  121. package/dist/BrowserSupport/browsersupport.scss +0 -71
  122. package/dist/BrowserSupport/constants.js +0 -63
  123. package/dist/BrowserSupport/index.js +0 -58
  124. package/dist/BrowserSupport/utils.js +0 -32
  125. package/dist/Builder/Body.js +0 -9
  126. package/dist/Builder/ElementsPanel/ElementsList/Element.js +0 -27
  127. package/dist/Builder/ElementsPanel/ElementsList/Section.js +0 -28
  128. package/dist/Builder/ElementsPanel/ElementsList/TitleBar.js +0 -28
  129. package/dist/Builder/ElementsPanel/ElementsList/index.js +0 -63
  130. package/dist/Builder/ElementsPanel/SelectedElementsList/SelectedElement.js +0 -73
  131. package/dist/Builder/ElementsPanel/SelectedElementsList/TitleBar.js +0 -50
  132. package/dist/Builder/ElementsPanel/SelectedElementsList/index.js +0 -91
  133. package/dist/Builder/ElementsPanel/index.js +0 -70
  134. package/dist/Builder/PropertiesPanel/EmptyProperty.js +0 -21
  135. package/dist/Builder/PropertiesPanel/Skeleton.js +0 -24
  136. package/dist/Builder/PropertiesPanel/index.js +0 -12
  137. package/dist/Builder/index.js +0 -3
  138. package/dist/Builder/styles.scss +0 -84
  139. package/dist/CalendarView/CustomDatePicker.js +0 -87
  140. package/dist/CalendarView/Header.js +0 -53
  141. package/dist/CalendarView/constants.js +0 -19
  142. package/dist/CalendarView/index.js +0 -83
  143. package/dist/CalendarView/utils.js +0 -50
  144. package/dist/Codeblock/index.js +0 -30
  145. package/dist/Columns/utils.js +0 -20
  146. package/dist/ConfirmationModal/constants.js +0 -3
  147. package/dist/ConfirmationModal/utils.js +0 -6
  148. package/dist/Container/container.scss +0 -21
  149. package/dist/Container/index.js +0 -23
  150. package/dist/CopyToClipboardButton/constants.js +0 -13
  151. package/dist/CopyToClipboardButton/copyToClipboard.scss +0 -22
  152. package/dist/CopyToClipboardButton/index.js +0 -59
  153. package/dist/CustomDomain/index.js +0 -98
  154. package/dist/CustomDomainDashboard/DeleteAlert.js +0 -28
  155. package/dist/CustomDomainDashboard/Header.js +0 -32
  156. package/dist/CustomDomainDashboard/Manage/Record.js +0 -42
  157. package/dist/CustomDomainDashboard/Manage/StatusInfo.js +0 -21
  158. package/dist/CustomDomainDashboard/Manage/TagBlock.js +0 -36
  159. package/dist/CustomDomainDashboard/Manage/constants.js +0 -4
  160. package/dist/CustomDomainDashboard/Manage/index.js +0 -125
  161. package/dist/CustomDomainDashboard/Manage/utils.js +0 -8
  162. package/dist/CustomDomainDashboard/api.js +0 -35
  163. package/dist/CustomDomainDashboard/constants.js +0 -2
  164. package/dist/CustomDomainDashboard/index.js +0 -118
  165. package/dist/CustomDomainDashboard/useCustomDomainApi.js +0 -71
  166. package/dist/CustomDomainDashboard/utils.js +0 -84
  167. package/dist/DateRangeFilter/index.js +0 -60
  168. package/dist/DateRangeFilter/utils.js +0 -113
  169. package/dist/DynamicVariables/dynamic-variables.scss +0 -34
  170. package/dist/DynamicVariables/index.js +0 -59
  171. package/dist/DynamicVariables/utils.js +0 -37
  172. package/dist/EmailForm/EmailForm.js +0 -98
  173. package/dist/EmailForm/EmailFormProvider.js +0 -45
  174. package/dist/EmailForm/EmailPreview.js +0 -129
  175. package/dist/EmailForm/ReplyToField.js +0 -55
  176. package/dist/EmailForm/SendToField.js +0 -28
  177. package/dist/EmailForm/SubjectField.js +0 -64
  178. package/dist/EmailForm/constants.js +0 -33
  179. package/dist/EmailForm/contexts/EmailForm.js +0 -7
  180. package/dist/EmailForm/index.js +0 -4
  181. package/dist/EmailForm/utils.js +0 -10
  182. package/dist/EmailPreview/index.js +0 -2
  183. package/dist/ErrorPage/index.js +0 -78
  184. package/dist/Header/Breadcrumbs.js +0 -31
  185. package/dist/Header/Dropdown.js +0 -12
  186. package/dist/Header/constants.js +0 -6
  187. package/dist/Header/header.scss +0 -121
  188. package/dist/Header/index.js +0 -61
  189. package/dist/IconPicker/Icon.js +0 -34
  190. package/dist/IconPicker/NoResults.js +0 -12
  191. package/dist/IconPicker/constants.js +0 -8
  192. package/dist/IconPicker/icon-picker.scss +0 -1
  193. package/dist/IconPicker/index.js +0 -164
  194. package/dist/ImageWithFallback/ImagePlaceholder.js +0 -16
  195. package/dist/ImageWithFallback/index.js +0 -31
  196. package/dist/IntegrationCard/Dropdown.js +0 -45
  197. package/dist/IntegrationCard/Status.js +0 -25
  198. package/dist/IntegrationCard/index.js +0 -128
  199. package/dist/IntegrationDisconnectAlert/index.js +0 -36
  200. package/dist/IpRestriction/AllowedIpRanges.js +0 -75
  201. package/dist/IpRestriction/CurrentIp.js +0 -26
  202. package/dist/IpRestriction/FormRow.js +0 -84
  203. package/dist/IpRestriction/Row.js +0 -91
  204. package/dist/IpRestriction/apis/allowed_ip_ranges.js +0 -28
  205. package/dist/IpRestriction/apis/current_ip.js +0 -11
  206. package/dist/IpRestriction/apis/ip_restriction.js +0 -16
  207. package/dist/IpRestriction/constants.js +0 -20
  208. package/dist/IpRestriction/hooks/reactQuery/useAllowedIpRanges.js +0 -34
  209. package/dist/IpRestriction/hooks/reactQuery/useCurrentIp.js +0 -10
  210. package/dist/IpRestriction/hooks/reactQuery/useIpRestrictions.js +0 -18
  211. package/dist/IpRestriction/index.js +0 -102
  212. package/dist/IpRestriction/utils.js +0 -85
  213. package/dist/KeyboardShortcuts/Pane/HotKey.js +0 -44
  214. package/dist/KeyboardShortcuts/Pane/HotKeyList.js +0 -42
  215. package/dist/KeyboardShortcuts/Pane/constants.js +0 -25
  216. package/dist/KeyboardShortcuts/Pane/index.js +0 -61
  217. package/dist/KeyboardShortcuts/Pane/keyboard-shortcuts.scss +0 -5
  218. package/dist/KeyboardShortcuts/Pane/utils.js +0 -66
  219. package/dist/KeyboardShortcuts/hooks/useKeyboardShortcutsPaneState.js +0 -31
  220. package/dist/KeyboardShortcuts/index.js +0 -9
  221. package/dist/LoginPage/Form.js +0 -57
  222. package/dist/LoginPage/constants.js +0 -12
  223. package/dist/LoginPage/index.js +0 -103
  224. package/dist/MenuBar/AddNew.js +0 -25
  225. package/dist/MenuBar/Block.js +0 -60
  226. package/dist/MenuBar/Item.js +0 -32
  227. package/dist/MenuBar/Search.js +0 -39
  228. package/dist/MenuBar/SubTitle.js +0 -23
  229. package/dist/MenuBar/index.js +0 -46
  230. package/dist/MenuBar/menubar.scss +0 -154
  231. package/dist/Metadata/Block.js +0 -30
  232. package/dist/Metadata/DetailsBlock.js +0 -86
  233. package/dist/Metadata/constants.js +0 -9
  234. package/dist/Metadata/index.js +0 -29
  235. package/dist/Metadata/metadata.scss +0 -15
  236. package/dist/MoreDropdown/constants.js +0 -25
  237. package/dist/NavigationHeader/LeftBlock.js +0 -32
  238. package/dist/NavigationHeader/Navigation.js +0 -24
  239. package/dist/NavigationHeader/RightBlock.js +0 -68
  240. package/dist/NavigationHeader/constants.js +0 -11
  241. package/dist/NavigationHeader/index.js +0 -19
  242. package/dist/NavigationHeader/navigation-header.scss +0 -3
  243. package/dist/NeetoWidget/CodeBlock.js +0 -57
  244. package/dist/NeetoWidget/CodeSnippet.js +0 -119
  245. package/dist/NeetoWidget/EmbedCode.js +0 -281
  246. package/dist/NeetoWidget/Main.js +0 -19
  247. package/dist/NeetoWidget/SelectionSwitches/TooltipSwitch.js +0 -25
  248. package/dist/NeetoWidget/SelectionSwitches/index.js +0 -44
  249. package/dist/NeetoWidget/SyntaxHighlighter.js +0 -17
  250. package/dist/NeetoWidget/api.js +0 -20
  251. package/dist/NeetoWidget/constants.js +0 -62
  252. package/dist/NeetoWidget/hooks/useForceUpdate.js +0 -14
  253. package/dist/NeetoWidget/index.js +0 -7
  254. package/dist/NeetoWidget/mutations.js +0 -9
  255. package/dist/NeetoWidget/queries.js +0 -32
  256. package/dist/NeetoWidget/utils.js +0 -83
  257. package/dist/PageLoader/index.js +0 -81
  258. package/dist/PageLoader/page-loader.scss +0 -95
  259. package/dist/PhoneNumber/CountryPicker/SingleValue.js +0 -21
  260. package/dist/PhoneNumber/CountryPicker/constants.js +0 -26
  261. package/dist/PhoneNumber/CountryPicker/index.js +0 -59
  262. package/dist/PhoneNumber/FormikPhoneNumberInput.js +0 -21
  263. package/dist/PhoneNumber/PhoneNumber.js +0 -30
  264. package/dist/PhoneNumber/PhoneNumberInput.js +0 -79
  265. package/dist/PhoneNumber/index.js +0 -5
  266. package/dist/PhoneNumber/utils.js +0 -55
  267. package/dist/PublishBlock/AlertBlock.js +0 -14
  268. package/dist/PublishBlock/index.js +0 -100
  269. package/dist/PublishBlock/publish-block.scss +0 -25
  270. package/dist/Rename/DummySpan.js +0 -21
  271. package/dist/Rename/constants.js +0 -1
  272. package/dist/Rename/index.js +0 -191
  273. package/dist/Rename/rename.scss +0 -69
  274. package/dist/Rename/utils.js +0 -10
  275. package/dist/ResponsiveDevicePicker/constants.js +0 -19
  276. package/dist/ResponsiveDevicePicker/index.js +0 -36
  277. package/dist/Schedule/DisplayAvailability.js +0 -58
  278. package/dist/Schedule/Fields.js +0 -43
  279. package/dist/Schedule/Form/ScheduleRow.js +0 -125
  280. package/dist/Schedule/Form/constants.js +0 -20
  281. package/dist/Schedule/Form/index.js +0 -144
  282. package/dist/Schedule/Form/utils.js +0 -63
  283. package/dist/Schedule/Header.js +0 -76
  284. package/dist/Schedule/ScheduleContext.js +0 -8
  285. package/dist/Schedule/constants.js +0 -8
  286. package/dist/Schedule/dayjsExtended/constants.js +0 -1
  287. package/dist/Schedule/dayjsExtended/index.js +0 -14
  288. package/dist/Schedule/dayjsExtended/range.js +0 -73
  289. package/dist/Schedule/index.js +0 -80
  290. package/dist/Schedule/utils.js +0 -152
  291. package/dist/Scrollable/constants.js +0 -8
  292. package/dist/Scrollable/index.js +0 -26
  293. package/dist/Scrollable/scrollable.scss +0 -32
  294. package/dist/Search/index.js +0 -52
  295. package/dist/Security/AllowedKeywords/Add.js +0 -38
  296. package/dist/Security/AllowedKeywords/index.js +0 -38
  297. package/dist/Security/PasswordBlock.js +0 -31
  298. package/dist/Security/RadioBlock.js +0 -38
  299. package/dist/Security/api.js +0 -12
  300. package/dist/Security/constants.js +0 -58
  301. package/dist/Security/index.js +0 -68
  302. package/dist/Security/useSecurityApi.js +0 -22
  303. package/dist/Security/utils.js +0 -31
  304. package/dist/SendToFields/FilePicker.js +0 -34
  305. package/dist/SendToFields/constants.js +0 -6
  306. package/dist/SendToFields/index.js +0 -102
  307. package/dist/SendToFields/utils.js +0 -54
  308. package/dist/Settings/Category.js +0 -30
  309. package/dist/Settings/Item.js +0 -38
  310. package/dist/Settings/index.js +0 -37
  311. package/dist/Settings/utils.js +0 -4
  312. package/dist/ShareViaEmail/EmailBodyEditor.js +0 -22
  313. package/dist/ShareViaEmail/FilePicker.js +0 -43
  314. package/dist/ShareViaEmail/Form.js +0 -105
  315. package/dist/ShareViaEmail/FormikDatePicker.js +0 -24
  316. package/dist/ShareViaEmail/constants.js +0 -14
  317. package/dist/ShareViaEmail/index.js +0 -92
  318. package/dist/ShareViaEmail/utils.js +0 -72
  319. package/dist/ShareViaLink/EditURL.js +0 -74
  320. package/dist/ShareViaLink/Link.js +0 -105
  321. package/dist/ShareViaLink/QRCode.js +0 -41
  322. package/dist/ShareViaLink/RegenerateURL.js +0 -47
  323. package/dist/ShareViaLink/SocialMedia.js +0 -52
  324. package/dist/ShareViaLink/constants.js +0 -25
  325. package/dist/ShareViaLink/edit-url.scss +0 -8
  326. package/dist/ShareViaLink/index.js +0 -46
  327. package/dist/ShareViaLink/utils.js +0 -47
  328. package/dist/Sidebar/AppSwitcher/AppLink.js +0 -45
  329. package/dist/Sidebar/AppSwitcher/Backdrop.js +0 -13
  330. package/dist/Sidebar/AppSwitcher/Body.js +0 -65
  331. package/dist/Sidebar/AppSwitcher/Portal.js +0 -27
  332. package/dist/Sidebar/AppSwitcher/appswitcher.scss +0 -164
  333. package/dist/Sidebar/AppSwitcher/index.js +0 -47
  334. package/dist/Sidebar/AppSwitcher/utils.js +0 -25
  335. package/dist/Sidebar/Chevron.js +0 -14
  336. package/dist/Sidebar/FeaturedTooltip.js +0 -19
  337. package/dist/Sidebar/Footer/AppSwitcherButton.js +0 -48
  338. package/dist/Sidebar/Footer/ProfileButton.js +0 -30
  339. package/dist/Sidebar/Footer/index.js +0 -56
  340. package/dist/Sidebar/Footer/utils.js +0 -39
  341. package/dist/Sidebar/Header.js +0 -33
  342. package/dist/Sidebar/HelpSection/HelpSectionMenu.js +0 -52
  343. package/dist/Sidebar/HelpSection/index.js +0 -32
  344. package/dist/Sidebar/Links.js +0 -112
  345. package/dist/Sidebar/NavIconWrapper.js +0 -20
  346. package/dist/Sidebar/ProfileSection/LinkSection.js +0 -36
  347. package/dist/Sidebar/ProfileSection/ProfileMenu.js +0 -48
  348. package/dist/Sidebar/ProfileSection/index.js +0 -42
  349. package/dist/Sidebar/constants.js +0 -40
  350. package/dist/Sidebar/index.js +0 -94
  351. package/dist/Sidebar/sidebar.scss +0 -379
  352. package/dist/Sidebar/utils.js +0 -18
  353. package/dist/SubHeader/RightBlock/Columns.js +0 -35
  354. package/dist/SubHeader/RightBlock/Download.js +0 -28
  355. package/dist/SubHeader/RightBlock/Filter.js +0 -31
  356. package/dist/SubHeader/RightBlock/index.js +0 -21
  357. package/dist/SubHeader/RightBlock/utils.js +0 -13
  358. package/dist/SubHeader/index.js +0 -28
  359. package/dist/SubHeader/subheader.scss +0 -78
  360. package/dist/ThemeSidebar/Customize/Logo.js +0 -39
  361. package/dist/ThemeSidebar/Customize/Properties.js +0 -170
  362. package/dist/ThemeSidebar/Customize/index.js +0 -66
  363. package/dist/ThemeSidebar/Themes/ThemeCard.js +0 -135
  364. package/dist/ThemeSidebar/Themes/index.js +0 -110
  365. package/dist/ThemeSidebar/TitleBar.js +0 -62
  366. package/dist/ThemeSidebar/constants.js +0 -127
  367. package/dist/ThemeSidebar/fields/AlignmentBlock.js +0 -50
  368. package/dist/ThemeSidebar/fields/Card.js +0 -19
  369. package/dist/ThemeSidebar/fields/ColorBlock.js +0 -19
  370. package/dist/ThemeSidebar/fields/FontPickerBlock.js +0 -35
  371. package/dist/ThemeSidebar/fields/ImageBlock/ImageUploader.js +0 -67
  372. package/dist/ThemeSidebar/fields/ImageBlock/ProgressBar.js +0 -22
  373. package/dist/ThemeSidebar/fields/ImageBlock/index.js +0 -55
  374. package/dist/ThemeSidebar/fields/SelectBlock.js +0 -24
  375. package/dist/ThemeSidebar/fields/SliderBlock.js +0 -30
  376. package/dist/ThemeSidebar/fields/SwitchBlock.js +0 -17
  377. package/dist/ThemeSidebar/fields/TextBlock.js +0 -13
  378. package/dist/ThemeSidebar/fields/slider.scss +0 -199
  379. package/dist/ThemeSidebar/hooks/useDirectUploadDropzone.js +0 -149
  380. package/dist/ThemeSidebar/index.js +0 -118
  381. package/dist/ThemeSidebar/themeSidebar.scss +0 -45
  382. package/dist/ThemeSidebar/utils.js +0 -169
  383. package/dist/TimeFormat/index.js +0 -3
  384. package/dist/TimezoneMismatchModal/apis/time_zone.js +0 -9
  385. package/dist/TimezoneMismatchModal/index.js +0 -83
  386. package/dist/TimezoneMismatchModal/useTimeZoneApi.js +0 -10
  387. package/dist/TimezoneMismatchModal/utils.js +0 -12
  388. package/dist/ToggleFeatureCard/ToolTipSwitch.js +0 -31
  389. package/dist/ToggleFeatureCard/constants.js +0 -5
  390. package/dist/ToggleFeatureCard/hooks/useScrollIntoView.js +0 -11
  391. package/dist/ToggleFeatureCard/index.js +0 -148
  392. package/dist/ToggleFeatureCard/toggleFeatureCard.scss +0 -4
@@ -0,0 +1,972 @@
1
+ import React, { forwardRef, useState, useRef, useEffect } from 'react';
2
+ import classnames from 'classnames';
3
+ import { globalProps as globalProps$1 } from '@bigbinary/neeto-commons-frontend/initializers';
4
+ import { useFetchNeetoApps, useHotKeys, useLocalStorage } from '@bigbinary/neeto-commons-frontend/react-utils';
5
+ import { Typography, Button, Input, Spinner, Avatar, Tooltip } from '@bigbinary/neetoui';
6
+ import { toLower, all, mergeDeepLeft, curry, is, includes, __, not } from 'ramda';
7
+ import { useTranslation } from 'react-i18next';
8
+ import { Link, useLocation, NavLink } from 'react-router-dom';
9
+ import { CSSTransition } from 'react-transition-group';
10
+ import { NeetoIcon, Close, Search, AppSwitcher as AppSwitcher$1, ChatEmpty, Book, Gift, Keyboard, User, Settings, LeftArrow, Help, Down } from '@bigbinary/neeto-icons';
11
+ import { capitalize, truncate, isPresent, findBy, isNotPresent } from '@bigbinary/neeto-commons-frontend/pure';
12
+ import * as AppIcons from '@bigbinary/neeto-icons/app-icons';
13
+ import { createPortal } from 'react-dom';
14
+ import { t as t$1 } from 'i18next';
15
+ import { resetAuthTokens } from '@bigbinary/neeto-commons-frontend/utils';
16
+ import KeyboardShortcuts from '@bigbinary/neeto-molecules/KeyboardShortcuts';
17
+ import * as ProductTypefaceLogos from '@bigbinary/neeto-icons/typeface-logos';
18
+ import { Neeto } from '@bigbinary/neeto-icons/typeface-logos';
19
+
20
+ function _arrayWithHoles(arr) {
21
+ if (Array.isArray(arr)) return arr;
22
+ }
23
+
24
+ function _iterableToArrayLimit(arr, i) {
25
+ var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
26
+ if (null != _i) {
27
+ var _s,
28
+ _e,
29
+ _x,
30
+ _r,
31
+ _arr = [],
32
+ _n = !0,
33
+ _d = !1;
34
+ try {
35
+ if (_x = (_i = _i.call(arr)).next, 0 === i) {
36
+ if (Object(_i) !== _i) return;
37
+ _n = !1;
38
+ } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
39
+ } catch (err) {
40
+ _d = !0, _e = err;
41
+ } finally {
42
+ try {
43
+ if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
44
+ } finally {
45
+ if (_d) throw _e;
46
+ }
47
+ }
48
+ return _arr;
49
+ }
50
+ }
51
+
52
+ function _arrayLikeToArray(arr, len) {
53
+ if (len == null || len > arr.length) len = arr.length;
54
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
55
+ return arr2;
56
+ }
57
+
58
+ function _unsupportedIterableToArray(o, minLen) {
59
+ if (!o) return;
60
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
61
+ var n = Object.prototype.toString.call(o).slice(8, -1);
62
+ if (n === "Object" && o.constructor) n = o.constructor.name;
63
+ if (n === "Map" || n === "Set") return Array.from(o);
64
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
65
+ }
66
+
67
+ function _nonIterableRest() {
68
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
69
+ }
70
+
71
+ function _slicedToArray(arr, i) {
72
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
73
+ }
74
+
75
+ var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
76
+
77
+ var css$1 = ".neeto-molecules-app-switcher__backdrop{align-items:center;background-color:rgba(27,31,35,.867);flex-direction:row;left:0;overflow:hidden;position:fixed;top:0;z-index:99998}.neeto-molecules-app-switcher__backdrop,.neeto-molecules-app-switcher__wrapper{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);display:flex;height:100vh;justify-content:flex-start;transition:all .3s;width:100vw}.neeto-molecules-app-switcher__wrapper{align-items:flex-start;animation:nuifadeIn .3s ease-in;background-color:rgb(var(--neeto-ui-white));flex-direction:column;max-width:100%;overflow-y:auto;padding:40px;position:relative}.neeto-molecules-app-switcher__wrapper--collapsed{width:100vw}.neeto-molecules-app-switcher__grid{grid-gap:24px;display:grid;gap:24px;grid-template-columns:repeat(auto-fill,minmax(288px,1fr))}.neeto-molecules-app-switcher__header{align-items:center;display:flex;gap:16px;justify-content:space-between;margin-bottom:32px;position:relative;width:100%}.neeto-molecules-app-switcher__header h1{font-size:40px;line-height:var(--neeto-ui-leading-tight);margin-top:-16px}.neeto-molecules-app-switcher__close-btn{position:absolute;right:12px;top:12px}.neeto-molecules-app-switcher__search-wrapper{width:316px}.neeto-molecules-app-switcher__body{display:flex;flex-direction:column;font-size:var(--neeto-ui-text-sm);gap:12px;margin-bottom:24px;width:100%}.neeto-molecules-app-switcher-link{align-items:center;background-color:rgb(var(--neeto-ui-gray-100));border-color:rgb(var(--neeto-ui-gray-100));border-radius:var(--neeto-ui-rounded-lg);border-style:solid;border-width:2px;cursor:pointer;display:flex;gap:12px;max-width:100%;padding:12px 16px;text-decoration:none;transition:background-color .3s ease-in-out;width:100%}.neeto-molecules-app-switcher-link:focus,.neeto-molecules-app-switcher-link:focus-visible{outline:none}.neeto-molecules-app-switcher-link:focus-visible{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-app-switcher-link:not(.neeto-molecules-app-switcher-link--active):hover{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-app-switcher-link--active{background:rgb(var(--neeto-ui-primary-100));border-color:rgb(var(--neeto-ui-primary-600))}.neeto-molecules-app-switcher-link__icon-holder{align-items:center;border-radius:var(--neeto-ui-rounded-lg);display:flex;flex-shrink:0;height:42px;justify-content:center;width:42px}.neeto-molecules-app-switcher-link__content{flex-grow:1}.neeto-molecules-app-switcher-link__content span{display:block}.neeto-molecules-app-switcher-enter.neeto-molecules-app-switcher__backdrop{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);opacity:0}.neeto-molecules-app-switcher-enter-active.neeto-molecules-app-switcher__backdrop,.neeto-molecules-app-switcher-enter-done.neeto-molecules-app-switcher__backdrop,.neeto-molecules-app-switcher-exit.neeto-molecules-app-switcher__backdrop{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);opacity:1}.neeto-molecules-app-switcher-exit-active.neeto-molecules-app-switcher__backdrop{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);opacity:0}";
78
+ n(css$1,{});
79
+
80
+ function _extends() {
81
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
82
+ for (var i = 1; i < arguments.length; i++) {
83
+ var source = arguments[i];
84
+ for (var key in source) {
85
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
86
+ target[key] = source[key];
87
+ }
88
+ }
89
+ }
90
+ return target;
91
+ };
92
+ return _extends.apply(this, arguments);
93
+ }
94
+
95
+ function _objectWithoutPropertiesLoose(source, excluded) {
96
+ if (source == null) return {};
97
+ var target = {};
98
+ var sourceKeys = Object.keys(source);
99
+ var key, i;
100
+ for (i = 0; i < sourceKeys.length; i++) {
101
+ key = sourceKeys[i];
102
+ if (excluded.indexOf(key) >= 0) continue;
103
+ target[key] = source[key];
104
+ }
105
+ return target;
106
+ }
107
+
108
+ function _objectWithoutProperties(source, excluded) {
109
+ if (source == null) return {};
110
+ var target = _objectWithoutPropertiesLoose(source, excluded);
111
+ var key, i;
112
+ if (Object.getOwnPropertySymbols) {
113
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
114
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
115
+ key = sourceSymbolKeys[i];
116
+ if (excluded.indexOf(key) >= 0) continue;
117
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
118
+ target[key] = source[key];
119
+ }
120
+ }
121
+ return target;
122
+ }
123
+
124
+ var _excluded$3 = ["children"];
125
+ var Backdrop = function Backdrop(_ref, ref) {
126
+ var children = _ref.children,
127
+ otherProps = _objectWithoutProperties(_ref, _excluded$3);
128
+ return /*#__PURE__*/React.createElement("div", _extends({
129
+ "data-testid": "neeto-backdrop",
130
+ ref: ref
131
+ }, otherProps), children);
132
+ };
133
+ var Backdrop$1 = /*#__PURE__*/forwardRef(Backdrop);
134
+
135
+ var AppLink = function AppLink(_ref) {
136
+ var name = _ref.name,
137
+ description = _ref.description,
138
+ url = _ref.url;
139
+ var appName = "Neeto".concat(name.charAt(0)).concat(name.slice(1).toLowerCase());
140
+ var AppIcon = AppIcons[appName];
141
+ return /*#__PURE__*/React.createElement("a", {
142
+ "data-cy": "".concat(name, "-app-link"),
143
+ "data-test-id": "neetoapp-link-".concat(name),
144
+ href: url,
145
+ rel: "noreferrer",
146
+ target: "_blank",
147
+ className: classnames("neeto-molecules-app-switcher-link", {
148
+ "neeto-molecules-app-switcher-link--active": capitalize(globalProps.appName) === appName
149
+ })
150
+ }, /*#__PURE__*/React.createElement("div", {
151
+ className: classnames("neeto-molecules-app-switcher-link__icon-holder", {
152
+ "neeto-ui-bg-primary-500": !AppIcon
153
+ })
154
+ }, AppIcon ? /*#__PURE__*/React.createElement(AppIcon, {
155
+ size: 42
156
+ }) : /*#__PURE__*/React.createElement(NeetoIcon, {
157
+ color: "white",
158
+ size: 42
159
+ })), /*#__PURE__*/React.createElement("div", {
160
+ className: "neeto-molecules-app-switcher-link__content"
161
+ }, /*#__PURE__*/React.createElement(Typography, {
162
+ component: "span",
163
+ lineHeight: "relaxed",
164
+ style: "h4",
165
+ weight: "medium"
166
+ }, name), /*#__PURE__*/React.createElement(Typography, {
167
+ component: "span",
168
+ style: "body3",
169
+ weight: "normal"
170
+ }, description)));
171
+ };
172
+ var AppLink$1 = /*#__PURE__*/React.memo(AppLink);
173
+
174
+ var Body = function Body(_ref) {
175
+ var onClose = _ref.onClose;
176
+ var _useTranslation = useTranslation(),
177
+ t = _useTranslation.t;
178
+ var _useState = useState(""),
179
+ _useState2 = _slicedToArray(_useState, 2),
180
+ searchTerm = _useState2[0],
181
+ setSearchTerm = _useState2[1];
182
+ var _useFetchNeetoApps = useFetchNeetoApps(),
183
+ data = _useFetchNeetoApps.data;
184
+ var substring = searchTerm.replace(/ /g, "").toLowerCase();
185
+ var filteredApps = data === null || data === void 0 ? void 0 : data.neetoApps.filter(function (_ref2) {
186
+ var name = _ref2.name;
187
+ return name.toLowerCase().includes(substring);
188
+ });
189
+ var handleSearch = function handleSearch(e) {
190
+ return setSearchTerm(e.target.value);
191
+ };
192
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
193
+ className: "neeto-molecules-app-switcher__close-btn",
194
+ "data-cy": "app-switcher-back-button",
195
+ "data-testid": "app-switcher-back-button",
196
+ icon: Close,
197
+ iconPosition: "left",
198
+ size: "small",
199
+ style: "text",
200
+ onClick: onClose
201
+ }), /*#__PURE__*/React.createElement("div", {
202
+ className: "neeto-molecules-app-switcher__header",
203
+ "data-cy": "app-switcher-body-wrapper"
204
+ }, /*#__PURE__*/React.createElement(Typography, {
205
+ style: "h1"
206
+ }, t("neetoMolecules.appSwitcher.chooseNeetoProduct")), /*#__PURE__*/React.createElement("div", {
207
+ className: "neeto-molecules-app-switcher__search-wrapper"
208
+ }, /*#__PURE__*/React.createElement(Input, {
209
+ autoFocus: true,
210
+ "data-cy": "app-switcher-search-input",
211
+ placeholder: t("neetoMolecules.appSwitcher.searchProducts"),
212
+ prefix: /*#__PURE__*/React.createElement(Search, null),
213
+ type: "search",
214
+ value: searchTerm,
215
+ onChange: handleSearch
216
+ }))), /*#__PURE__*/React.createElement("div", {
217
+ className: "neeto-molecules-app-switcher__body"
218
+ }, (filteredApps === null || filteredApps === void 0 ? void 0 : filteredApps.length) > 0 ? /*#__PURE__*/React.createElement("div", {
219
+ className: "neeto-molecules-app-switcher__grid"
220
+ }, filteredApps.map(function (app) {
221
+ return /*#__PURE__*/React.createElement(AppLink$1, _extends({
222
+ key: app.name
223
+ }, app));
224
+ })) : /*#__PURE__*/React.createElement(Typography, {
225
+ className: "neeto-ui-text-center",
226
+ style: "body1"
227
+ }, t("neetoMolecules.appSwitcher.noApps"))));
228
+ };
229
+
230
+ var Portal = function Portal(_ref) {
231
+ var rootId = _ref.rootId,
232
+ children = _ref.children;
233
+ var target = useRef(null);
234
+ useEffect(function () {
235
+ var container = document.getElementById(rootId);
236
+ if (!container) {
237
+ container = document.createElement("div");
238
+ container.setAttribute("id", rootId);
239
+ document.body.appendChild(container);
240
+ }
241
+ container.appendChild(target.current);
242
+ return function () {
243
+ target.current.remove();
244
+ if (container.childNodes.length === 0) {
245
+ container.remove();
246
+ }
247
+ };
248
+ }, [rootId]);
249
+ if (!target.current) {
250
+ target.current = document.createElement("div");
251
+ }
252
+ return /*#__PURE__*/createPortal(children, target.current);
253
+ };
254
+
255
+ var useOnClickOutside = function useOnClickOutside(insideRef, outsideRef, handler) {
256
+ useEffect(function () {
257
+ var listener = function listener(event) {
258
+ // Do nothing if clicking ref's element or descendent elements
259
+ if (!insideRef.current || insideRef.current.contains(event.target)) {
260
+ return;
261
+ }
262
+ if (outsideRef.current) {
263
+ // If Outside ref exists, trigger the handler if it contains the event target.
264
+ if (outsideRef.current.contains(event.target)) {
265
+ handler(event);
266
+ }
267
+ return;
268
+ }
269
+ handler(event);
270
+ };
271
+ document.addEventListener("mousedown", listener);
272
+ document.addEventListener("touchstart", listener);
273
+ return function () {
274
+ document.removeEventListener("mousedown", listener);
275
+ document.removeEventListener("touchstart", listener);
276
+ };
277
+ }, [insideRef, outsideRef, handler]);
278
+ };
279
+
280
+ var AppSwitcher = function AppSwitcher(_ref) {
281
+ var isOpen = _ref.isOpen,
282
+ onClose = _ref.onClose,
283
+ isSidebarCollapsed = _ref.isSidebarCollapsed;
284
+ var paneWrapper = useRef(null);
285
+ var backdropRef = useRef(null);
286
+ useOnClickOutside(paneWrapper, backdropRef, onClose);
287
+ useHotKeys("esc", onClose, {
288
+ enabled: isOpen,
289
+ mode: "global"
290
+ });
291
+ return /*#__PURE__*/React.createElement(Portal, {
292
+ rootId: "neeto-ui-portal"
293
+ }, /*#__PURE__*/React.createElement(CSSTransition, {
294
+ appear: true,
295
+ unmountOnExit: true,
296
+ classNames: "neeto-molecules-app-switcher",
297
+ "in": isOpen,
298
+ timeout: 300
299
+ }, /*#__PURE__*/React.createElement(Backdrop$1, {
300
+ key: "switcher-backdrop",
301
+ ref: backdropRef,
302
+ className: classnames("neeto-molecules-app-switcher__backdrop", {
303
+ "neeto-molecules-app-switcher__backdrop--collapsed": isSidebarCollapsed
304
+ })
305
+ }, /*#__PURE__*/React.createElement("div", {
306
+ "data-cy": "switcher-wrapper",
307
+ "data-testid": "switcher-wrapper",
308
+ key: "switcher-wrapper",
309
+ ref: paneWrapper,
310
+ className: classnames("neeto-molecules-app-switcher__wrapper", {
311
+ "neeto-molecules-app-switcher__wrapper--collapsed": isSidebarCollapsed
312
+ })
313
+ }, /*#__PURE__*/React.createElement(Body, {
314
+ onClose: onClose
315
+ })))));
316
+ };
317
+
318
+ var Chevron = function Chevron(_ref) {
319
+ var style = _ref.style;
320
+ return /*#__PURE__*/React.createElement("svg", {
321
+ height: "16",
322
+ viewBox: "0 0 16 16",
323
+ width: "16",
324
+ style: style
325
+ }, /*#__PURE__*/React.createElement("path", {
326
+ d: "M7.07031 13.8887C7.2207 14.0391 7.40527 14.1211 7.62402 14.1211C8.06836 14.1211 8.41699 13.7725 8.41699 13.3281C8.41699 13.1094 8.32812 12.9043 8.17773 12.7539L3.37207 8.05762L8.17773 3.375C8.32812 3.21777 8.41699 3.0127 8.41699 2.80078C8.41699 2.35645 8.06836 2.00781 7.62402 2.00781C7.40527 2.00781 7.2207 2.08984 7.07031 2.24023L1.73828 7.44922C1.56055 7.62012 1.46484 7.8252 1.46484 8.06445C1.46484 8.29688 1.55371 8.49512 1.73828 8.67969L7.07031 13.8887ZM13.1748 13.8887C13.3252 14.0391 13.5098 14.1211 13.7354 14.1211C14.1797 14.1211 14.5283 13.7725 14.5283 13.3281C14.5283 13.1094 14.4395 12.9043 14.2891 12.7539L9.4834 8.05762L14.2891 3.375C14.4395 3.21777 14.5283 3.0127 14.5283 2.80078C14.5283 2.35645 14.1797 2.00781 13.7354 2.00781C13.5098 2.00781 13.3252 2.08984 13.1748 2.24023L7.84961 7.44922C7.66504 7.62012 7.57617 7.8252 7.56934 8.06445C7.56934 8.29688 7.66504 8.49512 7.84961 8.67969L13.1748 13.8887Z",
327
+ fill: "currentColor"
328
+ }));
329
+ };
330
+
331
+ var css = ":root{--neeto-molecules-sidebar-width:240px;--neeto-molecules-sidebar-z-index:99998;--neeto-chat-primary:136,134,255;--neeto-wireframe-primary:106,103,232;--neeto-site-primary:129,118,255;--neeto-desk-primary:253,148,55;--neeto-planner-primary:82,169,198;--neeto-replay-primary:32,199,189;--neeto-course-primary:140,214,114;--neeto-ci-primary:255,133,184;--neeto-invoice-primary:70,160,211;--neeto-quiz-primary:254,99,99;--neeto-runner-primary:75,71,255;--neeto-form-primary:254,128,114;--neeto-crm-primary:96,154,240;--neeto-changelog-primary:255,135,135;--neeto-deploy-primary:20,209,164;--neeto-kb-primary:101,205,161;--neeto-cal-primary:238,77,95;--neeto-invisible-primary:121,157,250;--neeto-testify-primary:255,158,69;--neeto-monitor-primary:70,181,197;--neeto-git-primary:255,78,110}.neeto-molecules-sidebar__wrapper{display:flex;max-width:240px;max-width:var(--neeto-molecules-sidebar-width);position:relative;transition:all .15s;width:240px;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar__wrapper--collapsed{max-width:0;width:0}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{right:-36px;transform:scale(-1)}.neeto-molecules-sidebar__wrapper:hover .neeto-molecules-sidebar__toggler{opacity:1}.neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-gray-100));border-right:1px solid rgb(var(--neeto-ui-gray-100));height:100vh;padding:24px 0;width:100%;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}.neeto-molecules-sidebar__no-shrinkable{max-width:240px;max-width:var(--neeto-molecules-sidebar-width);width:240px;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar::-webkit-scrollbar{height:0;width:0}.neeto-molecules-sidebar::-webkit-scrollbar-thumb{background:rgb(var(--neeto-ui-gray-300));border-radius:50px}.neeto-molecules-sidebar::-webkit-scrollbar-track{background:\"transparent\"}.neeto-molecules-sidebar__toggler-hover-area{bottom:0;left:100%;position:absolute;top:0;width:40px;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}.neeto-molecules-sidebar__toggler{opacity:0;position:absolute;right:8px;top:8px;transition:opacity .3s ease-in-out;z-index:99999;z-index:calc(var(--neeto-molecules-sidebar-z-index) + 1)}.neeto-molecules-sidebar__toggler:focus{opacity:1}.neeto-molecules-sidebar__header{margin:14px 0 28px;padding:0 24px}.neeto-molecules-sidebar__logo svg{height:20px;max-width:100%;width:auto}.neeto-molecules-sidebar__links{margin-bottom:40px}.neeto-molecules-sidebar__link{color:rgb(var(--neeto-ui-gray-800));gap:10px;padding:12px 24px;position:relative;text-decoration:none!important;transition:var(--neeto-ui-transition);width:100%}.neeto-molecules-sidebar__link-icon{flex-shrink:0;transition:var(--neeto-ui-transition)}.neeto-molecules-sidebar__link-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-sidebar__link-icon--rotate{transform:scale(-1)}.neeto-molecules-sidebar__link-icon--caret{opacity:0;transition:opacity .3s ease-in-out}.neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__link-sub-label{flex-grow:1;text-align:left}.neeto-molecules-sidebar__link:hover{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link:focus,.neeto-molecules-sidebar__link:focus-visible,.neeto-molecules-sidebar__link[aria-expanded=true]{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black));outline:none}.neeto-molecules-sidebar__link.active{background-color:rgb(var(--neeto-ui-white));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link.active .neeto-molecules-sidebar__link-label{font-weight:var(--neeto-ui-font-medium)}.neeto-molecules-sidebar__link.active .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:focus .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:focus-visible .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:hover .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link[aria-expanded=true] .neeto-molecules-sidebar__link-icon--caret{opacity:1}.neeto-molecules-sidebar__link--button:focus{background-color:transparent}.neeto-molecules-sidebar__link--button:focus-visible{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-gray-800))}.neeto-molecules-sidebar__link--change-log{outline:none!important}.neeto-molecules-sidebar__sublink-wrapper{background-color:rgb(var(--neeto-ui-white));padding:4px 0}.neeto-molecules-sidebar__sublink{background-color:rgb(var(--neeto-ui-white));color:rgb(var(--neeto-ui-gray-700));cursor:pointer;gap:8px;padding:8px 24px 8px 58px;text-decoration:none;transition:all .3s}.neeto-molecules-sidebar__sublink:not(:last-child){margin-bottom:4px}.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{opacity:.75}.neeto-molecules-sidebar__sublink:hover{color:rgb(var(--neeto-ui-gray-800));text-decoration:none}.neeto-molecules-sidebar__sublink:hover .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink:focus,.neeto-molecules-sidebar__sublink:focus-visible{color:rgb(var(--neeto-ui-gray-800));outline:none;text-decoration:none}.neeto-molecules-sidebar__sublink:focus .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:focus-visible .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink.active,.neeto-molecules-sidebar__sublink:active{color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);text-decoration:none}.neeto-molecules-sidebar__sublink.active .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:active .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__footer{margin-top:auto}.sidebar-featured-tooltip__content{border-radius:8px!important;box-shadow:var(--neeto-ui-shadow-sm)!important}.sidebar-featured-tooltip__content .tippy-content{padding:0}.sidebar-featured-tooltip{padding:12px;width:150px}.sidebar-featured-tooltip__icon-wrap{background-color:rgb(var(--neeto-ui-gray-100));border-radius:8px;height:40px;margin-bottom:8px;margin-left:auto;margin-right:auto;width:40px}.sidebar-featured-tooltip__title{margin-bottom:4px}.neeto-molecules-help-popup-wrapper,.neeto-molecules-profile-popup-wrapper{border:1px solid rgb(var(--neeto-ui-gray-400));border-radius:var(--neeto-ui-rounded)!important;box-shadow:0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.2)!important;min-width:240px}.neeto-molecules-help-popup-wrapper .tippy-content,.neeto-molecules-profile-popup-wrapper .tippy-content{padding:0}.neeto-molecules-help-popup-wrapper .tippy-svg-arrow,.neeto-molecules-profile-popup-wrapper .tippy-svg-arrow{display:none!important}.neeto-molecules-profile-popup__top-section{border-top-left-radius:var(--neeto-ui-rounded);border-top-right-radius:var(--neeto-ui-rounded)}.neeto-molecules-profile-sublist{border-top:1px solid rgb(var(--neeto-ui-gray-400))}.neeto-molecules-help-sublist,.neeto-molecules-profile-sublist{list-style:none;margin:0;padding:4px 0}.neeto-molecules-help-sublist__item,.neeto-molecules-profile-sublist__item{width:100%}.neeto-molecules-help-sublist__item-btn,.neeto-molecules-profile-sublist__item-btn{border-radius:0;justify-content:flex-end!important;min-height:40px;text-align:left}.neeto-molecules-help-sublist__item-btn.active,.neeto-molecules-profile-sublist__item-btn.active{background-color:rgb(var(--neeto-ui-gray-800));color:rgb(var(--neeto-ui-white))}.neeto-molecules-help-sublist__item-btn-icon svg path,.neeto-molecules-profile-sublist__item-btn-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-help-sublist__item-btn span,.neeto-molecules-profile-sublist__item-btn span{align-items:center;display:flex;gap:8px}.neeto-molecules-sidebar__link-icon{position:relative}.neeto-molecules-sidebar__notif-count{position:absolute;right:-6px;top:-6px;z-index:1}.neeto-molecules-help-sublist__item-btn-count,.neeto-molecules-sidebar__notif-count{align-items:center;background-color:rgb(var(--neeto-ui-primary-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:inline-flex;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);height:16px;justify-content:center;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:16px}";
332
+ n(css,{});
333
+
334
+ var AppSwitcherButton = function AppSwitcherButton(_ref) {
335
+ var onAppSwitcherToggle = _ref.onAppSwitcherToggle;
336
+ var _useTranslation = useTranslation(),
337
+ t = _useTranslation.t;
338
+ var _useState = useState(false),
339
+ _useState2 = _slicedToArray(_useState, 2),
340
+ hasHovered = _useState2[0],
341
+ setHasHovered = _useState2[1];
342
+ var _useFetchNeetoApps = useFetchNeetoApps(),
343
+ data = _useFetchNeetoApps.data,
344
+ refetchNeetoApps = _useFetchNeetoApps.refetch,
345
+ isStale = _useFetchNeetoApps.isStale,
346
+ isLoading = _useFetchNeetoApps.isLoading;
347
+ var handleAppSwitcherToggle = function handleAppSwitcherToggle(event) {
348
+ if (!data) event.stopPropagation();else onAppSwitcherToggle();
349
+ };
350
+ return /*#__PURE__*/React.createElement("button", {
351
+ className: "neeto-molecules-sidebar__link neeto-molecules-sidebar__link--app-switcher neeto-molecules-sidebar__link--button neeto-ui-flex neeto-ui-w-full neeto-ui-select-none neeto-ui-items-center neeto-ui-justify-start neeto-ui-shadow-none",
352
+ "data-cy": "app-switcher-button",
353
+ "data-testid": "app-switcher-button",
354
+ onClick: handleAppSwitcherToggle,
355
+ onMouseEnter: function onMouseEnter() {
356
+ if (!hasHovered && isStale) {
357
+ refetchNeetoApps();
358
+ setHasHovered(true);
359
+ }
360
+ }
361
+ }, /*#__PURE__*/React.createElement("span", {
362
+ className: "neeto-molecules-sidebar__link-icon neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center h-6 w-6"
363
+ }, hasHovered && isLoading ? /*#__PURE__*/React.createElement("span", {
364
+ "data-testid": "app-switcher-button-loader"
365
+ }, /*#__PURE__*/React.createElement(Spinner, null)) : /*#__PURE__*/React.createElement(AppSwitcher$1, {
366
+ size: 24
367
+ })), /*#__PURE__*/React.createElement(Typography, {
368
+ className: "neeto-molecules-sidebar__link-label",
369
+ component: "span",
370
+ style: "body2",
371
+ weight: "normal"
372
+ }, t("neetoMolecules.sidebar.productSwitcher")));
373
+ };
374
+
375
+ var MY_PROFILE_URL = "/auth/profile/edit";
376
+ var MY_ORGANIZATION_URL = "/auth/organization/edit";
377
+ var CHANGELOG_WIDGET_TRIGGER_ID = "neetochangelog-trigger";
378
+ var DEFAULT_HELP_LINK_PROPS = {
379
+ liveChatProps: {
380
+ label: t$1("neetoMolecules.sidebar.helpLinks.liveChat"),
381
+ icon: ChatEmpty,
382
+ "data-cy": "help-link-live-chat-button",
383
+ onClick: function onClick() {
384
+ var _window$NeetoChat, _window$NeetoChat$con, _window$NeetoChat2, _window$NeetoChat2$co;
385
+ (_window$NeetoChat = window.NeetoChat) === null || _window$NeetoChat === void 0 ? void 0 : (_window$NeetoChat$con = _window$NeetoChat.contextualHelp) === null || _window$NeetoChat$con === void 0 ? void 0 : _window$NeetoChat$con.maximizeWidget();
386
+ (_window$NeetoChat2 = window.NeetoChat) === null || _window$NeetoChat2 === void 0 ? void 0 : (_window$NeetoChat2$co = _window$NeetoChat2.contextualHelp) === null || _window$NeetoChat2$co === void 0 ? void 0 : _window$NeetoChat2$co.openWidget();
387
+ }
388
+ },
389
+ helpCenterProps: {
390
+ label: t$1("neetoMolecules.sidebar.helpLinks.helpArticles"),
391
+ icon: Book,
392
+ "data-cy": "help-link-help-center-button",
393
+ href: "https://help.".concat(toLower(globalProps.appName), ".com/"),
394
+ target: "_blank"
395
+ },
396
+ changelogProps: {
397
+ id: CHANGELOG_WIDGET_TRIGGER_ID,
398
+ label: t$1("neetoMolecules.sidebar.helpLinks.whatsNew"),
399
+ icon: Gift,
400
+ "data-cy": "help-link-changelog-button"
401
+ },
402
+ keyboardShortcutProps: {
403
+ label: t$1("neetoMolecules.sidebar.helpLinks.keyboardShortcuts"),
404
+ icon: Keyboard,
405
+ "data-cy": "help-link-keyboard-shortcut-button"
406
+ }
407
+ };
408
+
409
+ var isSubRouteActive = function isSubRouteActive(subRoute, location) {
410
+ var currentBrowserUrl = new URL(location.pathname + location.search, window.location.origin);
411
+ var targetUrl = new URL(subRoute, window.location.origin);
412
+ if (!currentBrowserUrl.pathname.startsWith(targetUrl.pathname)) {
413
+ return false;
414
+ }
415
+ var targetSearchParams = targetUrl.searchParams;
416
+ var targetSearchKeys = Array.from(targetSearchParams.keys());
417
+ return all(function (key) {
418
+ return currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key);
419
+ }, targetSearchKeys);
420
+ };
421
+ var getSidebarStateLocalStorageKey = function getSidebarStateLocalStorageKey() {
422
+ var _globalProps$user, _globalProps$user2;
423
+ var user = ((_globalProps$user = globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.email) || ((_globalProps$user2 = globalProps.user) === null || _globalProps$user2 === void 0 ? void 0 : _globalProps$user2.phoneNumber);
424
+ return "sidebarState-".concat(user);
425
+ };
426
+
427
+ var getProfileInfo = function getProfileInfo(isOwner, profileInfoOverrides) {
428
+ var _globalProps$user, _globalProps$user2, _globalProps$user3, _globalProps$user4, _globalProps$user5;
429
+ return mergeDeepLeft(profileInfoOverrides, {
430
+ name: "".concat((_globalProps$user = globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.firstName, " ").concat((_globalProps$user2 = globalProps.user) === null || _globalProps$user2 === void 0 ? void 0 : _globalProps$user2.lastName),
431
+ imageUrl: (_globalProps$user3 = globalProps.user) === null || _globalProps$user3 === void 0 ? void 0 : _globalProps$user3.profileImageUrl,
432
+ email: ((_globalProps$user4 = globalProps.user) === null || _globalProps$user4 === void 0 ? void 0 : _globalProps$user4.email) || ((_globalProps$user5 = globalProps.user) === null || _globalProps$user5 === void 0 ? void 0 : _globalProps$user5.phoneNumber),
433
+ topLinks: [{
434
+ label: t$1("neetoMolecules.sidebar.myProfile"),
435
+ icon: User,
436
+ onClick: function onClick() {
437
+ return window.open(MY_PROFILE_URL, "_blank");
438
+ },
439
+ "data-cy": "my-profile-button"
440
+ }, isOwner && {
441
+ label: t$1("neetoMolecules.sidebar.myOrganization"),
442
+ icon: Settings,
443
+ onClick: function onClick() {
444
+ return window.open(MY_ORGANIZATION_URL, "_blank");
445
+ },
446
+ "data-cy": "profile-organization-settings-button"
447
+ }].filter(Boolean),
448
+ bottomLinks: [{
449
+ icon: LeftArrow,
450
+ label: t$1("neetoMolecules.sidebar.logout"),
451
+ onClick: function onClick() {
452
+ resetAuthTokens();
453
+ localStorage.removeItem(getSidebarStateLocalStorageKey());
454
+ window.location.href = "/logout";
455
+ },
456
+ "data-cy": "profile-logout-button"
457
+ }]
458
+ });
459
+ };
460
+
461
+ var ProfileSection = function ProfileSection(_ref, ref) {
462
+ var profileInfo = _ref.profileInfo;
463
+ var _useState = useState(false),
464
+ _useState2 = _slicedToArray(_useState, 2),
465
+ hasHovered = _useState2[0],
466
+ setHasHovered = _useState2[1];
467
+ var _useFetchNeetoApps = useFetchNeetoApps(),
468
+ refetchNeetoApps = _useFetchNeetoApps.refetch,
469
+ isLoading = _useFetchNeetoApps.isLoading,
470
+ isStale = _useFetchNeetoApps.isStale;
471
+ return /*#__PURE__*/React.createElement("button", {
472
+ className: "neeto-molecules-sidebar__link neeto-molecules-sidebar__link--button neeto-ui-shadow-none neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none",
473
+ "data-cy": "profile-section",
474
+ "data-testid": "profile-section",
475
+ ref: ref,
476
+ onMouseEnter: function onMouseEnter() {
477
+ if (!hasHovered && isStale) {
478
+ refetchNeetoApps();
479
+ setHasHovered(true);
480
+ }
481
+ }
482
+ }, isLoading && hasHovered ? /*#__PURE__*/React.createElement("span", {
483
+ "data-testid": "profile-avatar-loader"
484
+ }, /*#__PURE__*/React.createElement(Spinner, null)) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Avatar, {
485
+ className: "neeto-ui-flex-shrink-0 neeto-molecules-sidebar__profile-avatar",
486
+ "data-testid": "profile-avatar",
487
+ size: "small",
488
+ user: profileInfo
489
+ }), /*#__PURE__*/React.createElement(Typography, {
490
+ className: "neeto-molecules-sidebar__link-label",
491
+ component: "span",
492
+ style: "body2",
493
+ weight: "normal"
494
+ }, truncate(profileInfo.name, 18))));
495
+ };
496
+ var ProfileSection$1 = /*#__PURE__*/forwardRef(ProfileSection);
497
+
498
+ function _arrayWithoutHoles(arr) {
499
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
500
+ }
501
+
502
+ function _iterableToArray(iter) {
503
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
504
+ }
505
+
506
+ function _nonIterableSpread() {
507
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
508
+ }
509
+
510
+ function _toConsumableArray(arr) {
511
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
512
+ }
513
+
514
+ function _typeof(obj) {
515
+ "@babel/helpers - typeof";
516
+
517
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
518
+ return typeof obj;
519
+ } : function (obj) {
520
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
521
+ }, _typeof(obj);
522
+ }
523
+
524
+ function _toPrimitive(input, hint) {
525
+ if (_typeof(input) !== "object" || input === null) return input;
526
+ var prim = input[Symbol.toPrimitive];
527
+ if (prim !== undefined) {
528
+ var res = prim.call(input, hint || "default");
529
+ if (_typeof(res) !== "object") return res;
530
+ throw new TypeError("@@toPrimitive must return a primitive value.");
531
+ }
532
+ return (hint === "string" ? String : Number)(input);
533
+ }
534
+
535
+ function _toPropertyKey(arg) {
536
+ var key = _toPrimitive(arg, "string");
537
+ return _typeof(key) === "symbol" ? key : String(key);
538
+ }
539
+
540
+ function _defineProperty(obj, key, value) {
541
+ key = _toPropertyKey(key);
542
+ if (key in obj) {
543
+ Object.defineProperty(obj, key, {
544
+ value: value,
545
+ enumerable: true,
546
+ configurable: true,
547
+ writable: true
548
+ });
549
+ } else {
550
+ obj[key] = value;
551
+ }
552
+ return obj;
553
+ }
554
+
555
+ var _excluded$2 = ["onClick", "label", "icon"];
556
+ function ownKeys$2(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; }
557
+ function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
558
+ var LinkSection = function LinkSection(_ref) {
559
+ var links = _ref.links;
560
+ return /*#__PURE__*/React.createElement("ul", {
561
+ className: "neeto-molecules-profile-sublist"
562
+ }, links.map(function (_ref2, idx) {
563
+ var onClick = _ref2.onClick,
564
+ label = _ref2.label,
565
+ _ref2$icon = _ref2.icon,
566
+ icon = _ref2$icon === void 0 ? null : _ref2$icon,
567
+ otherProps = _objectWithoutProperties(_ref2, _excluded$2);
568
+ return /*#__PURE__*/React.createElement("li", {
569
+ className: "neeto-molecules-profile-sublist__item",
570
+ key: idx
571
+ }, /*#__PURE__*/React.createElement(Button, _extends({
572
+ fullWidth: true,
573
+ className: "neeto-molecules-profile-sublist__item-btn",
574
+ iconPosition: "left",
575
+ iconSize: 18,
576
+ style: "text"
577
+ }, _objectSpread$2({
578
+ icon: icon,
579
+ label: label,
580
+ onClick: onClick
581
+ }, otherProps))));
582
+ }));
583
+ };
584
+
585
+ var ProfileMenu = function ProfileMenu(_ref) {
586
+ var profileInfo = _ref.profileInfo,
587
+ extraTopLinks = _ref.extraTopLinks;
588
+ var name = profileInfo.name,
589
+ email = profileInfo.email,
590
+ topLinks = profileInfo.topLinks,
591
+ bottomLinks = profileInfo.bottomLinks,
592
+ customContent = profileInfo.customContent;
593
+ return /*#__PURE__*/React.createElement("div", {
594
+ className: "neeto-ui-flex neeto-ui-flex-col neeto-molecules-profile-popup",
595
+ "data-cy": "profile-popup",
596
+ "data-testid": "profile-popup"
597
+ }, /*#__PURE__*/React.createElement("div", {
598
+ className: classnames("neeto-ui-relative neeto-ui-flex neeto-ui-items-center neeto-ui-p-3 neeto-ui-bg-primary-100 neeto-molecules-profile-popup__top-section")
599
+ }, /*#__PURE__*/React.createElement("div", {
600
+ className: "top-0 left-0"
601
+ }, /*#__PURE__*/React.createElement(Avatar, {
602
+ size: "large",
603
+ user: profileInfo
604
+ })), /*#__PURE__*/React.createElement("div", {
605
+ className: "neeto-ui-flex neeto-ui-flex-col neeto-ui-flex-grow neeto-ui-min-w-0 neeto-ui-pl-3"
606
+ }, /*#__PURE__*/React.createElement(Typography, {
607
+ className: "neeto-ui-m-0",
608
+ component: "h2",
609
+ lineHeight: "tight",
610
+ style: "h5",
611
+ title: name,
612
+ weight: "semibold"
613
+ }, truncate(name, 18)), email && /*#__PURE__*/React.createElement(Typography, {
614
+ className: "neeto-ui-w-full neeto-ui-truncate neeto-ui-text-gray-700",
615
+ lineHeight: "tight",
616
+ style: "body3"
617
+ }, email))), /*#__PURE__*/React.createElement("div", {
618
+ className: "neeto-molecules-sidebar__profile-wrapper-custom-content"
619
+ }, customContent), topLinks && /*#__PURE__*/React.createElement(LinkSection, {
620
+ links: [].concat(_toConsumableArray(extraTopLinks), _toConsumableArray(topLinks))
621
+ }), bottomLinks && /*#__PURE__*/React.createElement(LinkSection, {
622
+ links: bottomLinks
623
+ }));
624
+ };
625
+
626
+ var ProfileButton = function ProfileButton(_ref) {
627
+ var extraTopLinks = _ref.extraTopLinks,
628
+ profileInfoOverrides = _ref.profileInfoOverrides;
629
+ var _useFetchNeetoApps = useFetchNeetoApps(),
630
+ data = _useFetchNeetoApps.data;
631
+ var profileInfo = getProfileInfo(data === null || data === void 0 ? void 0 : data.isOwner, profileInfoOverrides);
632
+ return /*#__PURE__*/React.createElement(Tooltip, {
633
+ interactive: true,
634
+ className: "neeto-molecules-profile-popup-wrapper",
635
+ content: /*#__PURE__*/React.createElement(ProfileMenu, {
636
+ extraTopLinks: extraTopLinks,
637
+ profileInfo: profileInfo
638
+ }),
639
+ disabled: !data,
640
+ hideOnClick: false,
641
+ interactiveDebounce: 20,
642
+ offset: [0, -70],
643
+ position: "right",
644
+ theme: "light"
645
+ }, /*#__PURE__*/React.createElement(ProfileSection$1, {
646
+ profileInfo: profileInfo
647
+ }));
648
+ };
649
+
650
+ // Rule can be enabled once the ticket - https://github.com/bigbinary/neeto-commons-frontend/issues/905 is closed.
651
+ // eslint-disable-next-line @bigbinary/neeto/no-dumb-components-with-use-translation
652
+ var HelpSection = function HelpSection(_ref, ref) {
653
+ var changesCount = _ref.changesCount;
654
+ var _useTranslation = useTranslation(),
655
+ t = _useTranslation.t;
656
+ return /*#__PURE__*/React.createElement("button", {
657
+ className: "neeto-molecules-sidebar__link neeto-molecules-sidebar__link--button neeto-ui-shadow-none neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none",
658
+ "data-cy": "help-button",
659
+ ref: ref
660
+ }, /*#__PURE__*/React.createElement("span", {
661
+ className: "neeto-molecules-sidebar__link-icon neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center"
662
+ }, /*#__PURE__*/React.createElement(Help, {
663
+ size: 24
664
+ }), isPresent(changesCount) && /*#__PURE__*/React.createElement("span", {
665
+ className: "neeto-molecules-sidebar__notif-count",
666
+ "data-testid": "help-icon-changes-count"
667
+ }, changesCount)), /*#__PURE__*/React.createElement(Typography, {
668
+ className: "neeto-molecules-sidebar__link-label",
669
+ component: "span",
670
+ style: "body2",
671
+ weight: "normal"
672
+ }, t("neetoMolecules.sidebar.helpLinks.helpCenter")));
673
+ };
674
+ var HelpSection$1 = /*#__PURE__*/forwardRef(HelpSection);
675
+
676
+ var _excluded$1 = ["label"];
677
+ 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; }
678
+ 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; }
679
+ var HelpSectionMenu = function HelpSectionMenu(_ref) {
680
+ var helpLinkOverrides = _ref.helpLinkOverrides,
681
+ changesCount = _ref.changesCount;
682
+ var _KeyboardShortcuts$us = KeyboardShortcuts.usePaneState(),
683
+ _KeyboardShortcuts$us2 = _slicedToArray(_KeyboardShortcuts$us, 2),
684
+ setIsOpen = _KeyboardShortcuts$us2[1];
685
+ var helpLinks = Object.keys(DEFAULT_HELP_LINK_PROPS).map(function (key) {
686
+ return _objectSpread$1(_objectSpread$1(_objectSpread$1(_objectSpread$1({}, DEFAULT_HELP_LINK_PROPS[key]), helpLinkOverrides[key]), key === "keyboardShortcutProps" && {
687
+ onClick: function onClick() {
688
+ return setIsOpen(true);
689
+ }
690
+ }), key === "changelogProps" && changesCount && {
691
+ changesCount: changesCount
692
+ });
693
+ }).filter(function (_ref2) {
694
+ var hide = _ref2.hide;
695
+ return !hide;
696
+ });
697
+ return /*#__PURE__*/React.createElement("ul", {
698
+ className: "neeto-molecules-help-sublist"
699
+ }, helpLinks.map(function (_ref3, idx) {
700
+ var label = _ref3.label,
701
+ buttonProps = _objectWithoutProperties(_ref3, _excluded$1);
702
+ return /*#__PURE__*/React.createElement("li", {
703
+ className: "neeto-molecules-help-sublist__item",
704
+ key: idx
705
+ }, /*#__PURE__*/React.createElement(Button, _extends({
706
+ fullWidth: true,
707
+ className: "neeto-molecules-help-sublist__item-btn",
708
+ iconPosition: "left",
709
+ iconSize: 18,
710
+ style: "text"
711
+ }, buttonProps), label, isPresent(buttonProps.changesCount) && /*#__PURE__*/React.createElement("span", {
712
+ className: "neeto-molecules-help-sublist__item-btn-count",
713
+ "data-testid": "help-section-menu-changes-count"
714
+ }, buttonProps.changesCount)));
715
+ }));
716
+ };
717
+
718
+ var Footer = function Footer(_ref) {
719
+ var extraTopLinks = _ref.extraTopLinks,
720
+ helpLinkOverrides = _ref.helpLinkOverrides,
721
+ profileInfoOverrides = _ref.profileInfoOverrides,
722
+ _ref$showAppSwitcher = _ref.showAppSwitcher,
723
+ showAppSwitcher = _ref$showAppSwitcher === void 0 ? false : _ref$showAppSwitcher,
724
+ onAppSwitcherToggle = _ref.onAppSwitcherToggle;
725
+ var _useState = useState(null),
726
+ _useState2 = _slicedToArray(_useState, 2),
727
+ changesCount = _useState2[0],
728
+ setChangesCount = _useState2[1];
729
+ useEffect(function () {
730
+ var Nv = {
731
+ onReceiveData: function onReceiveData(data) {
732
+ if (data.unreadCount) {
733
+ setChangesCount(data.unreadCount);
734
+ }
735
+ },
736
+ onShow: function onShow() {
737
+ setChangesCount(null);
738
+ }
739
+ };
740
+ window.Nv = window.Nv ? Object.assign(window.Nv, Nv) : Nv;
741
+ }, []);
742
+ return /*#__PURE__*/React.createElement("div", {
743
+ className: "neeto-molecules-sidebar__footer neeto-molecules-sidebar__no-shrinkable"
744
+ }, /*#__PURE__*/React.createElement(Tooltip, {
745
+ interactive: true,
746
+ className: "neeto-molecules-help-popup-wrapper",
747
+ content: /*#__PURE__*/React.createElement(HelpSectionMenu, {
748
+ changesCount: changesCount,
749
+ helpLinkOverrides: helpLinkOverrides
750
+ }),
751
+ hideOnClick: false,
752
+ interactiveDebounce: 20,
753
+ offset: [0, -70],
754
+ position: "right",
755
+ theme: "light"
756
+ }, /*#__PURE__*/React.createElement(HelpSection$1, {
757
+ changesCount: changesCount
758
+ })), showAppSwitcher && /*#__PURE__*/React.createElement(AppSwitcherButton, {
759
+ onAppSwitcherToggle: onAppSwitcherToggle
760
+ }), /*#__PURE__*/React.createElement(ProfileButton, {
761
+ extraTopLinks: extraTopLinks,
762
+ profileInfoOverrides: profileInfoOverrides
763
+ }));
764
+ };
765
+
766
+ var Header = function Header(_ref) {
767
+ var _ProductTypefaceLogos;
768
+ var customLogo = _ref.customLogo;
769
+ var productName = globalProps.appName.substr(5);
770
+ var logoName = "Neeto".concat(capitalize(productName.toLowerCase()));
771
+ var ProductTypefaceLogo = (_ProductTypefaceLogos = ProductTypefaceLogos[logoName]) !== null && _ProductTypefaceLogos !== void 0 ? _ProductTypefaceLogos : Neeto;
772
+ var LogoComponent = customLogo !== null && customLogo !== void 0 ? customLogo : ProductTypefaceLogo;
773
+ var _useFetchNeetoApps = useFetchNeetoApps(),
774
+ data = _useFetchNeetoApps.data;
775
+ var homePath = "/";
776
+ if (data !== null && data !== void 0 && data.neetoApps) {
777
+ var thisApp = findBy({
778
+ name: productName
779
+ }, data.neetoApps);
780
+ if (thisApp !== null && thisApp !== void 0 && thisApp.url) {
781
+ homePath = new URL(thisApp === null || thisApp === void 0 ? void 0 : thisApp.url).pathname;
782
+ }
783
+ }
784
+ return /*#__PURE__*/React.createElement("div", {
785
+ className: "neeto-molecules-sidebar__header neeto-molecules-sidebar__no-shrinkable",
786
+ "data-cy": "sidebar-info"
787
+ }, /*#__PURE__*/React.createElement(Link, {
788
+ className: "neeto-molecules-sidebar__logo neeto-ui-w-full",
789
+ to: homePath
790
+ }, /*#__PURE__*/React.createElement(LogoComponent, null)));
791
+ };
792
+ var Header$1 = /*#__PURE__*/React.memo(Header);
793
+
794
+ var _excluded = ["label", "to", "icon", "items"],
795
+ _excluded2 = ["label", "to", "count", "dataCy"];
796
+ 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; }
797
+ 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; }
798
+ var Links = function Links(_ref) {
799
+ var navLinks = _ref.navLinks;
800
+ var location = useLocation();
801
+ var _useState = useState(true),
802
+ _useState2 = _slicedToArray(_useState, 2),
803
+ isActiveLinkExpanded = _useState2[0],
804
+ setIsActiveLinkExpanded = _useState2[1];
805
+ var filterByPermissions = curry(function (_ref2) {
806
+ var permissions = _ref2.permissions;
807
+ if (permissions) {
808
+ return is(Array, permissions) ? permissions.some(includes(__, globalProps$1.permissions)) : globalProps$1.permissions.includes(permissions);
809
+ }
810
+ return true;
811
+ });
812
+ var handleNavLinkClick = function handleNavLinkClick(event, isActive, items) {
813
+ if (isNotPresent(items)) return;
814
+ if (isActive()) {
815
+ setIsActiveLinkExpanded(not);
816
+ event.preventDefault();
817
+ return;
818
+ }
819
+ setIsActiveLinkExpanded(true);
820
+ };
821
+ return /*#__PURE__*/React.createElement("div", {
822
+ className: "neeto-molecules-sidebar__links neeto-molecules-sidebar__no-shrinkable"
823
+ }, navLinks.filter(filterByPermissions).map(function (_ref3, mainIndex) {
824
+ var label = _ref3.label,
825
+ to = _ref3.to,
826
+ icon = _ref3.icon,
827
+ items = _ref3.items,
828
+ otherProps = _objectWithoutProperties(_ref3, _excluded);
829
+ var IconSVG = icon;
830
+ var url = new URL(to, window.location.href);
831
+ var isActive = function isActive() {
832
+ return is(Function, otherProps.isActive) ? otherProps.isActive() : location.pathname.startsWith(url.pathname);
833
+ };
834
+ var isMenuExpanded = isActive() && isActiveLinkExpanded;
835
+ return /*#__PURE__*/React.createElement(React.Fragment, {
836
+ key: mainIndex
837
+ }, /*#__PURE__*/React.createElement(NavLink, _extends({
838
+ activeClassName: "active",
839
+ className: "neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none neeto-molecules-sidebar__link",
840
+ onClick: function onClick(event) {
841
+ return handleNavLinkClick(event, isActive, items);
842
+ }
843
+ }, _objectSpread({
844
+ isActive: isActive,
845
+ to: to
846
+ }, otherProps)), icon && /*#__PURE__*/React.createElement("span", {
847
+ className: "neeto-molecules-sidebar__link-icon",
848
+ "data-testid": label
849
+ }, /*#__PURE__*/React.createElement(IconSVG, null)), /*#__PURE__*/React.createElement(Typography, {
850
+ className: "neeto-molecules-sidebar__link-label",
851
+ component: "span",
852
+ style: "body2",
853
+ weight: "normal"
854
+ }, label), items && /*#__PURE__*/React.createElement("span", {
855
+ className: classnames("neeto-molecules-sidebar__link-icon neeto-molecules-sidebar__link-icon--caret", {
856
+ "neeto-molecules-sidebar__link-icon--rotate": isMenuExpanded
857
+ })
858
+ }, /*#__PURE__*/React.createElement(Down, {
859
+ size: 16
860
+ }))), items && isMenuExpanded && /*#__PURE__*/React.createElement("div", {
861
+ className: "neeto-molecules-sidebar__sublink-wrapper",
862
+ "data-cy": "sidebar-sub-link-wrapper"
863
+ }, items.filter(filterByPermissions).map(function (_ref4, subIndex) {
864
+ var subLabel = _ref4.label,
865
+ subRoute = _ref4.to,
866
+ count = _ref4.count,
867
+ dataCy = _ref4.dataCy,
868
+ otherProps = _objectWithoutProperties(_ref4, _excluded2);
869
+ return /*#__PURE__*/React.createElement(NavLink, _extends({
870
+ activeClassName: "active",
871
+ className: "neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none",
872
+ "data-cy": "".concat(dataCy, "-sub-link"),
873
+ isActive: function isActive() {
874
+ return isSubRouteActive(subRoute, location);
875
+ },
876
+ key: subIndex,
877
+ to: subRoute
878
+ }, otherProps), /*#__PURE__*/React.createElement(Typography, {
879
+ className: "neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow",
880
+ component: "span",
881
+ "data-cy": "".concat(dataCy, "-sub-link-label"),
882
+ style: "body2"
883
+ }, subLabel), /*#__PURE__*/React.createElement(Typography, {
884
+ className: "neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0",
885
+ component: "span",
886
+ "data-cy": "".concat(dataCy, "-sub-link-count"),
887
+ style: "body2"
888
+ }, count > 999 ? "999+" : count));
889
+ })));
890
+ }));
891
+ };
892
+
893
+ var Sidebar = function Sidebar(_ref) {
894
+ var navLinks = _ref.navLinks,
895
+ customLogo = _ref.customLogo,
896
+ _ref$profileInfoOverr = _ref.profileInfoOverrides,
897
+ profileInfoOverrides = _ref$profileInfoOverr === void 0 ? {} : _ref$profileInfoOverr,
898
+ _ref$helpLinkOverride = _ref.helpLinkOverrides,
899
+ helpLinkOverrides = _ref$helpLinkOverride === void 0 ? {} : _ref$helpLinkOverride,
900
+ _ref$extraTopLinks = _ref.extraTopLinks,
901
+ extraTopLinks = _ref$extraTopLinks === void 0 ? [] : _ref$extraTopLinks,
902
+ _ref$showAppSwitcher = _ref.showAppSwitcher,
903
+ showAppSwitcher = _ref$showAppSwitcher === void 0 ? true : _ref$showAppSwitcher;
904
+ var _useState = useState(false),
905
+ _useState2 = _slicedToArray(_useState, 2),
906
+ isAppSwitcherOpen = _useState2[0],
907
+ setIsAppSwitcherOpen = _useState2[1];
908
+ var _useLocalStorage = useLocalStorage(getSidebarStateLocalStorageKey(), false),
909
+ _useLocalStorage2 = _slicedToArray(_useLocalStorage, 2),
910
+ isSidebarCollapsed = _useLocalStorage2[0],
911
+ setIsSidebarCollapsed = _useLocalStorage2[1];
912
+ var location = useLocation();
913
+ var _useTranslation = useTranslation(),
914
+ t = _useTranslation.t;
915
+ useEffect(function () {
916
+ isAppSwitcherOpen && setIsAppSwitcherOpen(false);
917
+ // eslint-disable-next-line react-hooks/exhaustive-deps
918
+ }, [location]);
919
+ var productName = globalProps$1.appName.substr(5).toLowerCase();
920
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
921
+ "data-testid": "sidebar-container",
922
+ className: classnames("neeto-molecules-sidebar__wrapper", {
923
+ "neeto-molecules-sidebar__wrapper--collapsed": isSidebarCollapsed
924
+ })
925
+ }, /*#__PURE__*/React.createElement("div", {
926
+ className: "neeto-molecules-sidebar neeto-ui-flex neeto-ui-flex-col neeto-ui-flex-shrink-0 neeto-ui-overflow-y-auto neeto-ui-overflow-x-hidden",
927
+ "data-cy": "sidebar-wrapper",
928
+ "data-testid": "sidebar"
929
+ }, /*#__PURE__*/React.createElement(Header$1, {
930
+ customLogo: customLogo
931
+ }), /*#__PURE__*/React.createElement(Links, {
932
+ navLinks: navLinks
933
+ }), /*#__PURE__*/React.createElement(Footer, {
934
+ extraTopLinks: extraTopLinks,
935
+ helpLinkOverrides: helpLinkOverrides,
936
+ profileInfoOverrides: profileInfoOverrides,
937
+ showAppSwitcher: showAppSwitcher,
938
+ onAppSwitcherToggle: function onAppSwitcherToggle() {
939
+ return setIsAppSwitcherOpen(not);
940
+ }
941
+ })), isSidebarCollapsed && /*#__PURE__*/React.createElement("div", {
942
+ className: "neeto-molecules-sidebar__toggler-hover-area"
943
+ }), /*#__PURE__*/React.createElement(Button, {
944
+ className: "neeto-molecules-sidebar__toggler",
945
+ "data-cy": "neeto-molecules-sidebar-toggler",
946
+ "data-testid": "sidebar-toggleButton",
947
+ style: "text",
948
+ icon: function icon() {
949
+ return /*#__PURE__*/React.createElement(Chevron, {
950
+ style: {
951
+ color: "rgb(var(--neeto-".concat(productName, "-primary))")
952
+ }
953
+ });
954
+ },
955
+ tooltipProps: {
956
+ content: isSidebarCollapsed ? t("neetoMolecules.sidebar.showMenu") : t("neetoMolecules.sidebar.hideMenu"),
957
+ position: "bottom"
958
+ },
959
+ onClick: function onClick() {
960
+ setIsSidebarCollapsed(!isSidebarCollapsed);
961
+ }
962
+ })), showAppSwitcher && /*#__PURE__*/React.createElement(AppSwitcher, {
963
+ isSidebarCollapsed: isSidebarCollapsed,
964
+ isOpen: isAppSwitcherOpen,
965
+ onClose: function onClose() {
966
+ return setIsAppSwitcherOpen(false);
967
+ }
968
+ }));
969
+ };
970
+
971
+ export { Sidebar as default };
972
+ //# sourceMappingURL=Sidebar.js.map