@bigbinary/neeto-molecules 1.1.10 → 1.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (477) hide show
  1. package/dist/AutoSaveInput/autosaveinput.scss +15 -0
  2. package/dist/AutoSaveInput/constants.js +13 -0
  3. package/dist/AutoSaveInput/index.js +124 -0
  4. package/dist/AutoSaveInput/utils.js +10 -0
  5. package/dist/Breadcrumbs/breadcrumbs.scss +33 -0
  6. package/dist/Breadcrumbs/index.js +31 -0
  7. package/dist/BrowserSupport/Callout.js +15 -0
  8. package/dist/BrowserSupport/ContactUs.js +21 -0
  9. package/dist/BrowserSupport/DownloadLink.js +17 -0
  10. package/dist/BrowserSupport/PartialSupportedBrowserVersion.js +17 -0
  11. package/dist/BrowserSupport/UnknownBrowser.js +13 -0
  12. package/dist/BrowserSupport/UnsupportedBrowser.js +24 -0
  13. package/dist/BrowserSupport/UnsupportedBrowserMessage.js +22 -0
  14. package/dist/BrowserSupport/UnsupportedBrowserVersion.js +27 -0
  15. package/dist/BrowserSupport/UnsupportedVersionMessage.js +30 -0
  16. package/dist/BrowserSupport/browsersupport.scss +71 -0
  17. package/dist/BrowserSupport/constants.js +63 -0
  18. package/dist/BrowserSupport/index.js +58 -0
  19. package/dist/BrowserSupport/utils.js +32 -0
  20. package/dist/CalendarView/CustomDatePicker.js +87 -0
  21. package/dist/CalendarView/Header.js +53 -0
  22. package/dist/CalendarView/constants.js +19 -0
  23. package/dist/CalendarView/index.js +83 -0
  24. package/dist/CalendarView/utils.js +50 -0
  25. package/dist/Codeblock/index.js +30 -0
  26. package/dist/{Columns.js → Columns/index.js} +13 -130
  27. package/dist/Columns/utils.js +20 -0
  28. package/dist/ConfirmationModal/constants.js +3 -0
  29. package/dist/{ConfirmationModal.js → ConfirmationModal/index.js} +7 -23
  30. package/dist/ConfirmationModal/utils.js +10 -0
  31. package/dist/Container/container.scss +21 -0
  32. package/dist/Container/index.js +23 -0
  33. package/dist/CopyToClipboardButton/constants.js +13 -0
  34. package/dist/CopyToClipboardButton/copyToClipboard.scss +22 -0
  35. package/dist/CopyToClipboardButton/index.js +59 -0
  36. package/dist/CustomDomain/index.js +98 -0
  37. package/dist/CustomDomainDashboard/DeleteAlert.js +28 -0
  38. package/dist/CustomDomainDashboard/Header.js +32 -0
  39. package/dist/CustomDomainDashboard/Manage/Record.js +42 -0
  40. package/dist/CustomDomainDashboard/Manage/StatusInfo.js +21 -0
  41. package/dist/CustomDomainDashboard/Manage/TagBlock.js +36 -0
  42. package/dist/CustomDomainDashboard/Manage/constants.js +4 -0
  43. package/dist/CustomDomainDashboard/Manage/index.js +124 -0
  44. package/dist/CustomDomainDashboard/Manage/utils.js +8 -0
  45. package/dist/CustomDomainDashboard/api.js +35 -0
  46. package/dist/CustomDomainDashboard/constants.js +2 -0
  47. package/dist/CustomDomainDashboard/index.js +118 -0
  48. package/dist/CustomDomainDashboard/useCustomDomainApi.js +71 -0
  49. package/dist/CustomDomainDashboard/utils.js +84 -0
  50. package/dist/{DateFormat.js → DateFormat/index.js} +8 -25
  51. package/dist/DateRangeFilter/index.js +60 -0
  52. package/dist/DateRangeFilter/utils.js +113 -0
  53. package/dist/DynamicVariables/dynamic-variables.scss +34 -0
  54. package/dist/DynamicVariables/index.js +59 -0
  55. package/dist/DynamicVariables/utils.js +37 -0
  56. package/dist/EmailForm/EmailForm.js +97 -0
  57. package/dist/EmailForm/EmailFormProvider.js +45 -0
  58. package/dist/EmailForm/EmailPreview.js +129 -0
  59. package/dist/EmailForm/ReplyToField.js +55 -0
  60. package/dist/EmailForm/SendToField.js +27 -0
  61. package/dist/EmailForm/SubjectField.js +64 -0
  62. package/dist/EmailForm/constants.js +33 -0
  63. package/dist/EmailForm/contexts/EmailForm.js +7 -0
  64. package/dist/EmailForm/index.js +4 -0
  65. package/dist/EmailForm/utils.js +10 -0
  66. package/dist/EmailPreview/index.js +2 -0
  67. package/dist/{ErrorPage.js → ErrorPage/constants.js} +36 -175
  68. package/dist/ErrorPage/index.js +78 -0
  69. package/dist/Header/Breadcrumbs.js +31 -0
  70. package/dist/Header/Dropdown.js +12 -0
  71. package/dist/Header/constants.js +6 -0
  72. package/dist/Header/header.scss +121 -0
  73. package/dist/Header/index.js +61 -0
  74. package/dist/IconPicker/Icon.js +34 -0
  75. package/dist/IconPicker/NoResults.js +12 -0
  76. package/dist/IconPicker/constants.js +8 -0
  77. package/dist/IconPicker/icon-picker.scss +1 -0
  78. package/dist/IconPicker/index.js +164 -0
  79. package/dist/ImageWithFallback/ImagePlaceholder.js +16 -0
  80. package/dist/ImageWithFallback/index.js +31 -0
  81. package/dist/IntegrationCard/Dropdown.js +45 -0
  82. package/dist/IntegrationCard/Status.js +25 -0
  83. package/dist/IntegrationCard/index.js +128 -0
  84. package/dist/IntegrationDisconnectAlert/index.js +36 -0
  85. package/dist/{IntegrationWalkthroughModal.js → IntegrationWalkthroughModal/index.js} +6 -8
  86. package/dist/IpRestriction/AllowedIpRanges.js +75 -0
  87. package/dist/IpRestriction/CurrentIp.js +26 -0
  88. package/dist/IpRestriction/FormRow.js +84 -0
  89. package/dist/IpRestriction/Row.js +91 -0
  90. package/dist/IpRestriction/apis/allowed_ip_ranges.js +28 -0
  91. package/dist/IpRestriction/apis/current_ip.js +11 -0
  92. package/dist/IpRestriction/apis/ip_restriction.js +16 -0
  93. package/dist/IpRestriction/constants.js +20 -0
  94. package/dist/IpRestriction/hooks/reactQuery/useAllowedIpRanges.js +34 -0
  95. package/dist/IpRestriction/hooks/reactQuery/useCurrentIp.js +10 -0
  96. package/dist/IpRestriction/hooks/reactQuery/useIpRestrictions.js +18 -0
  97. package/dist/IpRestriction/index.js +102 -0
  98. package/dist/IpRestriction/utils.js +85 -0
  99. package/dist/KeyboardShortcuts/Pane/HotKey.js +44 -0
  100. package/dist/KeyboardShortcuts/Pane/HotKeyList.js +42 -0
  101. package/dist/KeyboardShortcuts/Pane/constants.js +25 -0
  102. package/dist/KeyboardShortcuts/Pane/index.js +61 -0
  103. package/dist/KeyboardShortcuts/Pane/keyboard-shortcuts.scss +5 -0
  104. package/dist/KeyboardShortcuts/Pane/utils.js +66 -0
  105. package/dist/KeyboardShortcuts/hooks/useKeyboardShortcutsPaneState.js +31 -0
  106. package/dist/KeyboardShortcuts/index.js +9 -0
  107. package/dist/LoginPage/Form.js +57 -0
  108. package/dist/LoginPage/constants.js +12 -0
  109. package/dist/LoginPage/index.js +103 -0
  110. package/dist/MenuBar/AddNew.js +25 -0
  111. package/dist/MenuBar/Block.js +60 -0
  112. package/dist/MenuBar/Item.js +32 -0
  113. package/dist/MenuBar/Search.js +39 -0
  114. package/dist/MenuBar/SubTitle.js +23 -0
  115. package/dist/MenuBar/index.js +46 -0
  116. package/dist/MenuBar/menubar.scss +154 -0
  117. package/dist/Metadata/Block.js +30 -0
  118. package/dist/Metadata/DetailsBlock.js +86 -0
  119. package/dist/Metadata/constants.js +9 -0
  120. package/dist/Metadata/index.js +29 -0
  121. package/dist/Metadata/metadata.scss +15 -0
  122. package/dist/MoreDropdown/constants.js +25 -0
  123. package/dist/{MoreDropdown.js → MoreDropdown/index.js} +9 -102
  124. package/dist/NavigationHeader/LeftBlock.js +32 -0
  125. package/dist/NavigationHeader/Navigation.js +24 -0
  126. package/dist/NavigationHeader/RightBlock.js +68 -0
  127. package/dist/NavigationHeader/constants.js +11 -0
  128. package/dist/NavigationHeader/index.js +19 -0
  129. package/dist/NavigationHeader/navigation-header.scss +3 -0
  130. package/dist/NeetoWidget/CodeBlock.js +57 -0
  131. package/dist/NeetoWidget/CodeSnippet.js +119 -0
  132. package/dist/NeetoWidget/EmbedCode.js +281 -0
  133. package/dist/NeetoWidget/Main.js +19 -0
  134. package/dist/NeetoWidget/SelectionSwitches/TooltipSwitch.js +25 -0
  135. package/dist/NeetoWidget/SelectionSwitches/index.js +44 -0
  136. package/dist/NeetoWidget/SyntaxHighlighter.js +17 -0
  137. package/dist/NeetoWidget/api.js +20 -0
  138. package/dist/NeetoWidget/constants.js +62 -0
  139. package/dist/NeetoWidget/hooks/useForceUpdate.js +14 -0
  140. package/dist/NeetoWidget/index.js +7 -0
  141. package/dist/NeetoWidget/mutations.js +9 -0
  142. package/dist/NeetoWidget/queries.js +32 -0
  143. package/dist/NeetoWidget/utils.js +83 -0
  144. package/dist/PageLoader/index.js +81 -0
  145. package/dist/PageLoader/page-loader.scss +95 -0
  146. package/dist/PhoneNumber/CountryPicker/SingleValue.js +21 -0
  147. package/dist/PhoneNumber/CountryPicker/constants.js +26 -0
  148. package/dist/PhoneNumber/CountryPicker/index.js +59 -0
  149. package/dist/PhoneNumber/FormikPhoneNumberInput.js +21 -0
  150. package/dist/PhoneNumber/PhoneNumber.js +30 -0
  151. package/dist/PhoneNumber/PhoneNumberInput.js +79 -0
  152. package/dist/PhoneNumber/index.js +5 -0
  153. package/dist/PhoneNumber/utils.js +55 -0
  154. package/dist/PublishBlock/AlertBlock.js +14 -0
  155. package/dist/PublishBlock/index.js +100 -0
  156. package/dist/PublishBlock/publish-block.scss +25 -0
  157. package/dist/Rename/DummySpan.js +21 -0
  158. package/dist/Rename/constants.js +1 -0
  159. package/dist/Rename/index.js +191 -0
  160. package/dist/Rename/rename.scss +69 -0
  161. package/dist/Rename/utils.js +10 -0
  162. package/dist/ResponsiveDevicePicker/constants.js +19 -0
  163. package/dist/ResponsiveDevicePicker/index.js +36 -0
  164. package/dist/Schedule/DisplayAvailability.js +58 -0
  165. package/dist/Schedule/Fields.js +43 -0
  166. package/dist/Schedule/Form/ScheduleRow.js +125 -0
  167. package/dist/Schedule/Form/constants.js +20 -0
  168. package/dist/Schedule/Form/index.js +144 -0
  169. package/dist/Schedule/Form/utils.js +63 -0
  170. package/dist/Schedule/Header.js +76 -0
  171. package/dist/Schedule/ScheduleContext.js +8 -0
  172. package/dist/Schedule/constants.js +8 -0
  173. package/dist/Schedule/dayjsExtended/constants.js +1 -0
  174. package/dist/Schedule/dayjsExtended/index.js +14 -0
  175. package/dist/Schedule/dayjsExtended/range.js +73 -0
  176. package/dist/Schedule/index.js +80 -0
  177. package/dist/Schedule/utils.js +152 -0
  178. package/dist/Scrollable/constants.js +8 -0
  179. package/dist/Scrollable/index.js +26 -0
  180. package/dist/Scrollable/scrollable.scss +32 -0
  181. package/dist/Search/index.js +52 -0
  182. package/dist/Security/AllowedKeywords/Add.js +38 -0
  183. package/dist/Security/AllowedKeywords/index.js +38 -0
  184. package/dist/Security/PasswordBlock.js +31 -0
  185. package/dist/Security/RadioBlock.js +38 -0
  186. package/dist/Security/api.js +12 -0
  187. package/dist/Security/constants.js +58 -0
  188. package/dist/Security/index.js +68 -0
  189. package/dist/Security/useSecurityApi.js +22 -0
  190. package/dist/Security/utils.js +31 -0
  191. package/dist/SendToFields/FilePicker.js +34 -0
  192. package/dist/SendToFields/constants.js +6 -0
  193. package/dist/SendToFields/index.js +102 -0
  194. package/dist/SendToFields/utils.js +54 -0
  195. package/dist/Settings/Category.js +30 -0
  196. package/dist/Settings/Item.js +38 -0
  197. package/dist/Settings/index.js +37 -0
  198. package/dist/Settings/utils.js +4 -0
  199. package/dist/ShareViaEmail/EmailBodyEditor.js +22 -0
  200. package/dist/ShareViaEmail/FilePicker.js +43 -0
  201. package/dist/ShareViaEmail/Form.js +101 -0
  202. package/dist/ShareViaEmail/FormikDatePicker.js +24 -0
  203. package/dist/ShareViaEmail/constants.js +14 -0
  204. package/dist/ShareViaEmail/index.js +89 -0
  205. package/dist/ShareViaEmail/utils.js +72 -0
  206. package/dist/ShareViaLink/EditURL.js +74 -0
  207. package/dist/ShareViaLink/Link.js +105 -0
  208. package/dist/ShareViaLink/QRCode.js +41 -0
  209. package/dist/ShareViaLink/RegenerateURL.js +47 -0
  210. package/dist/ShareViaLink/SocialMedia.js +52 -0
  211. package/dist/ShareViaLink/constants.js +25 -0
  212. package/dist/ShareViaLink/edit-url.scss +8 -0
  213. package/dist/ShareViaLink/index.js +46 -0
  214. package/dist/ShareViaLink/utils.js +47 -0
  215. package/dist/Sidebar/AppSwitcher/AppLink.js +45 -0
  216. package/dist/Sidebar/AppSwitcher/Backdrop.js +13 -0
  217. package/dist/Sidebar/AppSwitcher/Body.js +65 -0
  218. package/dist/Sidebar/AppSwitcher/Portal.js +27 -0
  219. package/dist/Sidebar/AppSwitcher/appswitcher.scss +164 -0
  220. package/dist/Sidebar/AppSwitcher/index.js +47 -0
  221. package/dist/Sidebar/AppSwitcher/utils.js +25 -0
  222. package/dist/Sidebar/Chevron.js +14 -0
  223. package/dist/Sidebar/FeaturedTooltip.js +19 -0
  224. package/dist/Sidebar/Footer/AppSwitcherButton.js +48 -0
  225. package/dist/Sidebar/Footer/ProfileButton.js +30 -0
  226. package/dist/Sidebar/Footer/index.js +56 -0
  227. package/dist/Sidebar/Footer/utils.js +39 -0
  228. package/dist/Sidebar/Header.js +33 -0
  229. package/dist/Sidebar/HelpSection/HelpSectionMenu.js +52 -0
  230. package/dist/Sidebar/HelpSection/index.js +32 -0
  231. package/dist/Sidebar/Links.js +112 -0
  232. package/dist/Sidebar/NavIconWrapper.js +20 -0
  233. package/dist/Sidebar/ProfileSection/LinkSection.js +36 -0
  234. package/dist/Sidebar/ProfileSection/ProfileMenu.js +48 -0
  235. package/dist/Sidebar/ProfileSection/index.js +42 -0
  236. package/dist/Sidebar/constants.js +40 -0
  237. package/dist/Sidebar/index.js +94 -0
  238. package/dist/Sidebar/sidebar.scss +379 -0
  239. package/dist/Sidebar/utils.js +18 -0
  240. package/dist/SubHeader/RightBlock/Columns.js +35 -0
  241. package/dist/SubHeader/RightBlock/Download.js +28 -0
  242. package/dist/SubHeader/RightBlock/Filter.js +31 -0
  243. package/dist/SubHeader/RightBlock/index.js +21 -0
  244. package/dist/SubHeader/RightBlock/utils.js +13 -0
  245. package/dist/SubHeader/index.js +28 -0
  246. package/dist/SubHeader/subheader.scss +78 -0
  247. package/dist/TableWrapper/index.js +18 -0
  248. package/dist/ThemeSidebar/Customize/Logo.js +39 -0
  249. package/dist/ThemeSidebar/Customize/Properties.js +170 -0
  250. package/dist/ThemeSidebar/Customize/index.js +66 -0
  251. package/dist/ThemeSidebar/Themes/ThemeCard.js +135 -0
  252. package/dist/ThemeSidebar/Themes/index.js +110 -0
  253. package/dist/ThemeSidebar/TitleBar.js +62 -0
  254. package/dist/ThemeSidebar/constants.js +127 -0
  255. package/dist/ThemeSidebar/fields/AlignmentBlock.js +50 -0
  256. package/dist/ThemeSidebar/fields/Card.js +19 -0
  257. package/dist/ThemeSidebar/fields/ColorBlock.js +19 -0
  258. package/dist/ThemeSidebar/fields/FontPickerBlock.js +35 -0
  259. package/dist/ThemeSidebar/fields/ImageBlock/ImageUploader.js +67 -0
  260. package/dist/ThemeSidebar/fields/ImageBlock/ProgressBar.js +22 -0
  261. package/dist/ThemeSidebar/fields/ImageBlock/index.js +55 -0
  262. package/dist/ThemeSidebar/fields/SelectBlock.js +24 -0
  263. package/dist/ThemeSidebar/fields/SliderBlock.js +30 -0
  264. package/dist/ThemeSidebar/fields/SwitchBlock.js +17 -0
  265. package/dist/ThemeSidebar/fields/TextBlock.js +13 -0
  266. package/dist/ThemeSidebar/fields/slider.scss +199 -0
  267. package/dist/ThemeSidebar/hooks/useDirectUploadDropzone.js +149 -0
  268. package/dist/ThemeSidebar/index.js +118 -0
  269. package/dist/ThemeSidebar/themeSidebar.scss +45 -0
  270. package/dist/ThemeSidebar/utils.js +169 -0
  271. package/dist/TimeFormat/index.js +3 -0
  272. package/dist/TimezoneMismatchModal/apis/time_zone.js +9 -0
  273. package/dist/TimezoneMismatchModal/index.js +83 -0
  274. package/dist/TimezoneMismatchModal/useTimeZoneApi.js +10 -0
  275. package/dist/TimezoneMismatchModal/utils.js +12 -0
  276. package/dist/ToggleFeatureCard/ToolTipSwitch.js +31 -0
  277. package/dist/ToggleFeatureCard/constants.js +5 -0
  278. package/dist/ToggleFeatureCard/hooks/useScrollIntoView.js +11 -0
  279. package/dist/ToggleFeatureCard/index.js +148 -0
  280. package/dist/ToggleFeatureCard/toggleFeatureCard.scss +4 -0
  281. package/package.json +28 -34
  282. package/src/translations/en.json +5 -1
  283. package/types/Search.d.ts +19 -0
  284. package/dist/AutoSaveInput.cjs.js +0 -724
  285. package/dist/AutoSaveInput.cjs.js.map +0 -1
  286. package/dist/AutoSaveInput.js +0 -718
  287. package/dist/AutoSaveInput.js.map +0 -1
  288. package/dist/Breadcrumbs.cjs.js +0 -44
  289. package/dist/Breadcrumbs.cjs.js.map +0 -1
  290. package/dist/Breadcrumbs.js +0 -38
  291. package/dist/Breadcrumbs.js.map +0 -1
  292. package/dist/BrowserSupport.cjs.js +0 -1731
  293. package/dist/BrowserSupport.cjs.js.map +0 -1
  294. package/dist/BrowserSupport.js +0 -1725
  295. package/dist/BrowserSupport.js.map +0 -1
  296. package/dist/CalendarView.cjs.js +0 -610
  297. package/dist/CalendarView.cjs.js.map +0 -1
  298. package/dist/CalendarView.js +0 -598
  299. package/dist/CalendarView.js.map +0 -1
  300. package/dist/Codeblock.cjs.js +0 -302
  301. package/dist/Codeblock.cjs.js.map +0 -1
  302. package/dist/Codeblock.js +0 -296
  303. package/dist/Codeblock.js.map +0 -1
  304. package/dist/Columns.cjs.js +0 -248
  305. package/dist/Columns.cjs.js.map +0 -1
  306. package/dist/Columns.js.map +0 -1
  307. package/dist/ConfirmationModal.cjs.js +0 -87
  308. package/dist/ConfirmationModal.cjs.js.map +0 -1
  309. package/dist/ConfirmationModal.js.map +0 -1
  310. package/dist/Container.cjs.js +0 -1277
  311. package/dist/Container.cjs.js.map +0 -1
  312. package/dist/Container.js +0 -1271
  313. package/dist/Container.js.map +0 -1
  314. package/dist/CopyToClipboardButton.cjs.js +0 -275
  315. package/dist/CopyToClipboardButton.cjs.js.map +0 -1
  316. package/dist/CopyToClipboardButton.js +0 -269
  317. package/dist/CopyToClipboardButton.js.map +0 -1
  318. package/dist/CustomDomain.cjs.js +0 -774
  319. package/dist/CustomDomain.cjs.js.map +0 -1
  320. package/dist/CustomDomain.js +0 -747
  321. package/dist/CustomDomain.js.map +0 -1
  322. package/dist/CustomDomainDashboard.cjs.js +0 -2370
  323. package/dist/CustomDomainDashboard.cjs.js.map +0 -1
  324. package/dist/CustomDomainDashboard.js +0 -2342
  325. package/dist/CustomDomainDashboard.js.map +0 -1
  326. package/dist/DateFormat.cjs.js +0 -51
  327. package/dist/DateFormat.cjs.js.map +0 -1
  328. package/dist/DateFormat.js.map +0 -1
  329. package/dist/DateRangeFilter.cjs.js +0 -236
  330. package/dist/DateRangeFilter.cjs.js.map +0 -1
  331. package/dist/DateRangeFilter.js +0 -229
  332. package/dist/DateRangeFilter.js.map +0 -1
  333. package/dist/DynamicVariables.cjs.js +0 -189
  334. package/dist/DynamicVariables.cjs.js.map +0 -1
  335. package/dist/DynamicVariables.js +0 -183
  336. package/dist/DynamicVariables.js.map +0 -1
  337. package/dist/EmailForm.cjs.js +0 -4295
  338. package/dist/EmailForm.cjs.js.map +0 -1
  339. package/dist/EmailForm.js +0 -4265
  340. package/dist/EmailForm.js.map +0 -1
  341. package/dist/EmailPreview.cjs.js +0 -1419
  342. package/dist/EmailPreview.cjs.js.map +0 -1
  343. package/dist/EmailPreview.js +0 -1413
  344. package/dist/EmailPreview.js.map +0 -1
  345. package/dist/ErrorPage.cjs.js +0 -226
  346. package/dist/ErrorPage.cjs.js.map +0 -1
  347. package/dist/ErrorPage.js.map +0 -1
  348. package/dist/Header.cjs.js +0 -188
  349. package/dist/Header.cjs.js.map +0 -1
  350. package/dist/Header.js +0 -182
  351. package/dist/Header.js.map +0 -1
  352. package/dist/IconPicker.cjs.js +0 -1308
  353. package/dist/IconPicker.cjs.js.map +0 -1
  354. package/dist/IconPicker.js +0 -1302
  355. package/dist/IconPicker.js.map +0 -1
  356. package/dist/ImageWithFallback.cjs.js +0 -247
  357. package/dist/ImageWithFallback.cjs.js.map +0 -1
  358. package/dist/ImageWithFallback.js +0 -241
  359. package/dist/ImageWithFallback.js.map +0 -1
  360. package/dist/IntegrationCard.cjs.js +0 -409
  361. package/dist/IntegrationCard.cjs.js.map +0 -1
  362. package/dist/IntegrationCard.js +0 -403
  363. package/dist/IntegrationCard.js.map +0 -1
  364. package/dist/IntegrationDisconnectAlert.cjs.js +0 -89
  365. package/dist/IntegrationDisconnectAlert.cjs.js.map +0 -1
  366. package/dist/IntegrationDisconnectAlert.js +0 -80
  367. package/dist/IntegrationDisconnectAlert.js.map +0 -1
  368. package/dist/IntegrationWalkthroughModal.cjs.js +0 -50
  369. package/dist/IntegrationWalkthroughModal.cjs.js.map +0 -1
  370. package/dist/IntegrationWalkthroughModal.js.map +0 -1
  371. package/dist/IpRestriction.cjs.js +0 -3931
  372. package/dist/IpRestriction.cjs.js.map +0 -1
  373. package/dist/IpRestriction.js +0 -3905
  374. package/dist/IpRestriction.js.map +0 -1
  375. package/dist/KeyboardShortcuts.cjs.js +0 -2263
  376. package/dist/KeyboardShortcuts.cjs.js.map +0 -1
  377. package/dist/KeyboardShortcuts.js +0 -2256
  378. package/dist/KeyboardShortcuts.js.map +0 -1
  379. package/dist/LoginPage.cjs.js +0 -618
  380. package/dist/LoginPage.cjs.js.map +0 -1
  381. package/dist/LoginPage.js +0 -593
  382. package/dist/LoginPage.js.map +0 -1
  383. package/dist/MenuBar.cjs.js +0 -34273
  384. package/dist/MenuBar.cjs.js.map +0 -1
  385. package/dist/MenuBar.js +0 -34267
  386. package/dist/MenuBar.js.map +0 -1
  387. package/dist/Metadata.cjs.js +0 -272
  388. package/dist/Metadata.cjs.js.map +0 -1
  389. package/dist/Metadata.js +0 -266
  390. package/dist/Metadata.js.map +0 -1
  391. package/dist/MoreDropdown.cjs.js +0 -168
  392. package/dist/MoreDropdown.cjs.js.map +0 -1
  393. package/dist/MoreDropdown.js.map +0 -1
  394. package/dist/NavigationHeader.cjs.js +0 -756
  395. package/dist/NavigationHeader.cjs.js.map +0 -1
  396. package/dist/NavigationHeader.js +0 -750
  397. package/dist/NavigationHeader.js.map +0 -1
  398. package/dist/NeetoWidget.cjs.js +0 -3375
  399. package/dist/NeetoWidget.cjs.js.map +0 -1
  400. package/dist/NeetoWidget.js +0 -3348
  401. package/dist/NeetoWidget.js.map +0 -1
  402. package/dist/PageLoader.cjs.js +0 -158
  403. package/dist/PageLoader.cjs.js.map +0 -1
  404. package/dist/PageLoader.js +0 -134
  405. package/dist/PageLoader.js.map +0 -1
  406. package/dist/PhoneNumber.cjs.js +0 -7021
  407. package/dist/PhoneNumber.cjs.js.map +0 -1
  408. package/dist/PhoneNumber.js +0 -6989
  409. package/dist/PhoneNumber.js.map +0 -1
  410. package/dist/PublishBlock.cjs.js +0 -224
  411. package/dist/PublishBlock.cjs.js.map +0 -1
  412. package/dist/PublishBlock.js +0 -218
  413. package/dist/PublishBlock.js.map +0 -1
  414. package/dist/Rename.cjs.js +0 -516
  415. package/dist/Rename.cjs.js.map +0 -1
  416. package/dist/Rename.js +0 -510
  417. package/dist/Rename.js.map +0 -1
  418. package/dist/ResponsiveDevicePicker.cjs.js +0 -260
  419. package/dist/ResponsiveDevicePicker.cjs.js.map +0 -1
  420. package/dist/ResponsiveDevicePicker.js +0 -254
  421. package/dist/ResponsiveDevicePicker.js.map +0 -1
  422. package/dist/Schedule.cjs.js +0 -1077
  423. package/dist/Schedule.cjs.js.map +0 -1
  424. package/dist/Schedule.js +0 -1046
  425. package/dist/Schedule.js.map +0 -1
  426. package/dist/Scrollable.cjs.js +0 -188
  427. package/dist/Scrollable.cjs.js.map +0 -1
  428. package/dist/Scrollable.js +0 -182
  429. package/dist/Scrollable.js.map +0 -1
  430. package/dist/Security.cjs.js +0 -1921
  431. package/dist/Security.cjs.js.map +0 -1
  432. package/dist/Security.js +0 -1895
  433. package/dist/Security.js.map +0 -1
  434. package/dist/SendToFields.cjs.js +0 -2524
  435. package/dist/SendToFields.cjs.js.map +0 -1
  436. package/dist/SendToFields.js +0 -2517
  437. package/dist/SendToFields.js.map +0 -1
  438. package/dist/Settings.cjs.js +0 -501
  439. package/dist/Settings.cjs.js.map +0 -1
  440. package/dist/Settings.js +0 -495
  441. package/dist/Settings.js.map +0 -1
  442. package/dist/ShareViaEmail.cjs.js +0 -4272
  443. package/dist/ShareViaEmail.cjs.js.map +0 -1
  444. package/dist/ShareViaEmail.js +0 -4246
  445. package/dist/ShareViaEmail.js.map +0 -1
  446. package/dist/ShareViaLink.cjs.js +0 -1512
  447. package/dist/ShareViaLink.cjs.js.map +0 -1
  448. package/dist/ShareViaLink.js +0 -1486
  449. package/dist/ShareViaLink.js.map +0 -1
  450. package/dist/Sidebar.cjs.js +0 -34985
  451. package/dist/Sidebar.cjs.js.map +0 -1
  452. package/dist/Sidebar.js +0 -34959
  453. package/dist/Sidebar.js.map +0 -1
  454. package/dist/SubHeader.cjs.js +0 -283
  455. package/dist/SubHeader.cjs.js.map +0 -1
  456. package/dist/SubHeader.js +0 -276
  457. package/dist/SubHeader.js.map +0 -1
  458. package/dist/TableWrapper.cjs.js +0 -87
  459. package/dist/TableWrapper.cjs.js.map +0 -1
  460. package/dist/TableWrapper.js +0 -81
  461. package/dist/TableWrapper.js.map +0 -1
  462. package/dist/ThemeSidebar.cjs.js +0 -13705
  463. package/dist/ThemeSidebar.cjs.js.map +0 -1
  464. package/dist/ThemeSidebar.js +0 -13680
  465. package/dist/ThemeSidebar.js.map +0 -1
  466. package/dist/TimeFormat.cjs.js +0 -53
  467. package/dist/TimeFormat.cjs.js.map +0 -1
  468. package/dist/TimeFormat.js +0 -47
  469. package/dist/TimeFormat.js.map +0 -1
  470. package/dist/TimezoneMismatchModal.cjs.js +0 -176
  471. package/dist/TimezoneMismatchModal.cjs.js.map +0 -1
  472. package/dist/TimezoneMismatchModal.js +0 -168
  473. package/dist/TimezoneMismatchModal.js.map +0 -1
  474. package/dist/ToggleFeatureCard.cjs.js +0 -389
  475. package/dist/ToggleFeatureCard.cjs.js.map +0 -1
  476. package/dist/ToggleFeatureCard.js +0 -383
  477. package/dist/ToggleFeatureCard.js.map +0 -1
@@ -0,0 +1,78 @@
1
+ $neeto-molecules-sub-header-height: 37px;
2
+ $neeto-molecules-sub-header-bottom-margin: 20px;
3
+
4
+ :root {
5
+ --neeto-molecules-sub-header-height: #{$neeto-molecules-sub-header-height};
6
+ --neeto-molecules-sub-header-bottom-margin: #{$neeto-molecules-sub-header-bottom-margin};
7
+ }
8
+
9
+ .neeto-molecules-subheader {
10
+ width: 100%;
11
+ display: flex;
12
+ flex-direction: row;
13
+ justify-content: space-between;
14
+ align-items: center;
15
+ min-height: var(--neeto-molecules-sub-header-height);
16
+ margin-bottom: var(--neeto-molecules-sub-header-bottom-margin);
17
+ background-color: rgb(var(--neeto-ui-white));
18
+
19
+ .neeto-molecules-subheader__left-wrapper {
20
+ display: flex;
21
+ flex-grow: 1;
22
+
23
+ .neeto-molecules-subheader__left {
24
+ display: flex;
25
+ flex-direction: row;
26
+ justify-content: flex-start;
27
+ align-items: center;
28
+
29
+ .neeto-molecules-input__prefix {
30
+ color: rgb(var(--neeto-ui-gray-400));
31
+ }
32
+ }
33
+ }
34
+
35
+ .neeto-molecules-subheader__right {
36
+ display: flex;
37
+ flex-direction: row;
38
+ justify-content: flex-end;
39
+ align-items: center;
40
+ gap: 12px;
41
+
42
+ &-actions {
43
+ display: flex;
44
+ flex-direction: row;
45
+ justify-content: flex-end;
46
+ align-items: center;
47
+ gap: 8px;
48
+
49
+ & > :not([hidden]) ~ :not([hidden]) {
50
+ border-left: thin solid rgb(var(--neeto-ui-gray-300));
51
+ padding-left: 8px;
52
+ }
53
+ }
54
+ }
55
+
56
+ &__download {
57
+ position: relative;
58
+
59
+ &-count {
60
+ position: absolute;
61
+ right: -2px;
62
+ top: -2px;
63
+ min-width: 16px;
64
+ min-height: 16px;
65
+
66
+ display: inline-flex;
67
+ justify-content: center;
68
+ align-items: center;
69
+ text-align: center;
70
+
71
+ background-color: rgb(var(--neeto-ui-primary-500));
72
+ color: rgb(var(--neeto-ui-white));
73
+ border-radius: var(--neeto-ui-rounded-full);
74
+ font-size: 10px;
75
+ z-index: 1;
76
+ }
77
+ }
78
+ }
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+ import classNames from "classnames";
3
+ var TableWrapper = function TableWrapper(_ref) {
4
+ var children = _ref.children,
5
+ _ref$className = _ref.className,
6
+ className = _ref$className === void 0 ? "" : _ref$className,
7
+ _ref$hasPagination = _ref.hasPagination,
8
+ hasPagination = _ref$hasPagination === void 0 ? false : _ref$hasPagination;
9
+ return /*#__PURE__*/React.createElement("div", {
10
+ "data-testid": "table-wrapper",
11
+ className: classNames("flex min-h-0 w-full flex-grow flex-col pb-6", className)
12
+ }, /*#__PURE__*/React.createElement("div", {
13
+ className: classNames("min-h-0 flex-grow", {
14
+ "pb-11": hasPagination
15
+ })
16
+ }, children));
17
+ };
18
+ export default TableWrapper;
@@ -0,0 +1,39 @@
1
+ import React from "react";
2
+ import { findBy } from "@bigbinary/neeto-commons-frontend/pure";
3
+ import { mergeLeft, isEmpty } from "ramda";
4
+ import { useTranslation } from "react-i18next";
5
+ import { POSITION_OPTIONS } from "../constants";
6
+ import Card from "../fields/Card";
7
+ import ImageBlock from "../fields/ImageBlock";
8
+ import SelectBlock from "../fields/SelectBlock";
9
+ var Logo = function Logo(_ref) {
10
+ var logo = _ref.logo,
11
+ _onChange = _ref.onChange;
12
+ var _useTranslation = useTranslation(),
13
+ t = _useTranslation.t;
14
+ return /*#__PURE__*/React.createElement(Card, {
15
+ title: t("neetoMolecules.themeSidebar.logo")
16
+ }, /*#__PURE__*/React.createElement("div", {
17
+ className: "divide-y divide-gray-200"
18
+ }, /*#__PURE__*/React.createElement(ImageBlock, {
19
+ imageData: logo,
20
+ name: "logo",
21
+ onChange: function onChange(name, value) {
22
+ return _onChange(name, isEmpty(value) ? {
23
+ position: logo.position
24
+ } : mergeLeft(value, logo));
25
+ }
26
+ }), logo.url && /*#__PURE__*/React.createElement(SelectBlock, {
27
+ label: t("neetoMolecules.themeSidebar.logoPosition"),
28
+ options: POSITION_OPTIONS,
29
+ placeholder: t("neetoMolecules.themeSidebar.left"),
30
+ value: findBy({
31
+ value: logo.position || "left"
32
+ }, POSITION_OPTIONS),
33
+ onChange: function onChange(_ref2) {
34
+ var value = _ref2.value;
35
+ return _onChange("logo.position", value);
36
+ }
37
+ })));
38
+ };
39
+ export default /*#__PURE__*/React.memo(Logo);
@@ -0,0 +1,170 @@
1
+ import React, { useEffect } from "react";
2
+ import { findBy } from "@bigbinary/neeto-commons-frontend/pure";
3
+ import { useTranslation } from "react-i18next";
4
+ import { BACKGROUND_POSITION_OPTIONS, FONT_OPTIONS } from "../constants";
5
+ import AlignmentBlock from "../fields/AlignmentBlock";
6
+ import Card from "../fields/Card";
7
+ import ColorBlock from "../fields/ColorBlock";
8
+ import FontPickerBlock from "../fields/FontPickerBlock";
9
+ import ImageBlock from "../fields/ImageBlock";
10
+ import SelectBlock from "../fields/SelectBlock";
11
+ import SliderBlock from "../fields/SliderBlock";
12
+ import SwitchBlock from "../fields/SwitchBlock";
13
+ import { getContrast, hexToRgb } from "../utils";
14
+ var Properties = function Properties(_ref) {
15
+ var handleChange = _ref.handleChange,
16
+ values = _ref.values;
17
+ var _useTranslation = useTranslation(),
18
+ t = _useTranslation.t;
19
+ var backgroundColor = values.backgroundColor,
20
+ questionColor = values.questionColor,
21
+ buttonBackgroundColor = values.buttonBackgroundColor,
22
+ buttonTextColor = values.buttonTextColor,
23
+ answerColor = values.answerColor,
24
+ backgroundImage = values.backgroundImage,
25
+ isContentBackgroundEnabled = values.isContentBackgroundEnabled,
26
+ contentBackgroundColor = values.contentBackgroundColor,
27
+ isDominantBackgroundColorEnabled = values.isDominantBackgroundColorEnabled,
28
+ backgroundOverlayOpacity = values.backgroundOverlayOpacity,
29
+ buttonBorderRadius = values.buttonBorderRadius;
30
+ var handleOverlayChange = function handleOverlayChange(value) {
31
+ handleChange("backgroundOverlayOpacity", value, Math.abs(value / 100));
32
+ if (value < 0) {
33
+ handleChange("backgroundOverlayColor", "#000000");
34
+ } else if (value > 0) {
35
+ handleChange("backgroundOverlayColor", "#ffffff");
36
+ }
37
+ };
38
+ useEffect(function () {
39
+ if (isContentBackgroundEnabled) {
40
+ var color = contentBackgroundColor || backgroundColor;
41
+ handleChange("contentBackgroundColor", color);
42
+ } else {
43
+ handleChange("contentBackgroundColor", contentBackgroundColor);
44
+ }
45
+ }, [isContentBackgroundEnabled]);
46
+ useEffect(function () {
47
+ if (isDominantBackgroundColorEnabled && backgroundImage !== null && backgroundImage !== void 0 && backgroundImage.dominantColor) {
48
+ handleChange("backgroundColor", backgroundImage.dominantColor, backgroundImage.dominantColor ? hexToRgb(backgroundImage.dominantColor) : "initial");
49
+ }
50
+ }, [isDominantBackgroundColorEnabled, backgroundImage === null || backgroundImage === void 0 ? void 0 : backgroundImage.dominantColor]);
51
+ var handleColorChange = function handleColorChange(name) {
52
+ return function (_ref2) {
53
+ var hex = _ref2.hex,
54
+ rgb = _ref2.rgb;
55
+ handleChange(name, hex, "".concat(rgb.r, ", ").concat(rgb.g, ", ").concat(rgb.b));
56
+ };
57
+ };
58
+ var handleAnswerColorChange = function handleAnswerColorChange(_ref3) {
59
+ var hex = _ref3.hex,
60
+ rgb = _ref3.rgb;
61
+ handleColorChange("answerColor")({
62
+ hex: hex,
63
+ rgb: rgb
64
+ });
65
+ var contrastColor = getContrast(hex);
66
+ handleColorChange("answerTextColor")({
67
+ hex: contrastColor,
68
+ rgb: hexToRgb(contrastColor)
69
+ });
70
+ };
71
+ return /*#__PURE__*/React.createElement(Card, {
72
+ title: t("neetoMolecules.themeSidebar.style")
73
+ }, /*#__PURE__*/React.createElement("div", {
74
+ className: "divide-y divide-gray-200"
75
+ }, /*#__PURE__*/React.createElement(FontPickerBlock, {
76
+ label: t("neetoMolecules.themeSidebar.font"),
77
+ options: FONT_OPTIONS,
78
+ value: findBy({
79
+ value: values.fontFamily
80
+ }, FONT_OPTIONS) || null,
81
+ onChange: function onChange(_ref4) {
82
+ var value = _ref4.value;
83
+ return handleChange("fontFamily", value);
84
+ }
85
+ }), /*#__PURE__*/React.createElement(ColorBlock, {
86
+ color: questionColor,
87
+ label: t("neetoMolecules.themeSidebar.questions"),
88
+ onChange: handleColorChange("questionColor")
89
+ }), /*#__PURE__*/React.createElement(ColorBlock, {
90
+ color: answerColor,
91
+ label: t("neetoMolecules.themeSidebar.answerColor"),
92
+ onChange: handleAnswerColorChange
93
+ }), /*#__PURE__*/React.createElement(ColorBlock, {
94
+ color: buttonBackgroundColor,
95
+ label: t("neetoMolecules.themeSidebar.buttons"),
96
+ onChange: handleColorChange("buttonBackgroundColor")
97
+ }), /*#__PURE__*/React.createElement(ColorBlock, {
98
+ color: buttonTextColor,
99
+ label: t("neetoMolecules.themeSidebar.buttonText"),
100
+ onChange: handleColorChange("buttonTextColor")
101
+ }), /*#__PURE__*/React.createElement(SliderBlock, {
102
+ defaultValue: buttonBorderRadius,
103
+ label: t("neetoMolecules.themeSidebar.buttonBorderRadius"),
104
+ max: 50,
105
+ min: 0,
106
+ onChange: function onChange(borderRadius) {
107
+ return handleChange("buttonBorderRadius", borderRadius, "".concat(borderRadius, "px"));
108
+ }
109
+ }), /*#__PURE__*/React.createElement(ColorBlock, {
110
+ color: backgroundColor,
111
+ label: t("neetoMolecules.themeSidebar.backgroundColor"),
112
+ onChange: function onChange(_ref5) {
113
+ var hex = _ref5.hex,
114
+ rgb = _ref5.rgb;
115
+ handleColorChange("backgroundColor")({
116
+ hex: hex,
117
+ rgb: rgb
118
+ });
119
+ handleChange("isDominantBackgroundColorEnabled", false);
120
+ }
121
+ }), /*#__PURE__*/React.createElement(SwitchBlock, {
122
+ label: t("neetoMolecules.themeSidebar.enableContentBackground"),
123
+ name: "isContentBackgroundEnabled"
124
+ }), isContentBackgroundEnabled && /*#__PURE__*/React.createElement(ColorBlock, {
125
+ color: contentBackgroundColor,
126
+ label: t("neetoMolecules.themeSidebar.formBackgroundColor"),
127
+ onChange: handleColorChange("contentBackgroundColor")
128
+ }), /*#__PURE__*/React.createElement(ImageBlock, {
129
+ imageData: backgroundImage,
130
+ label: t("neetoMolecules.themeSidebar.backgroundImage"),
131
+ name: "backgroundImage",
132
+ onChange: function onChange(name, value, variableValue) {
133
+ handleChange(name, value, variableValue);
134
+ handleChange("backgroundOverlayOpacity", 0);
135
+ }
136
+ }), (backgroundImage === null || backgroundImage === void 0 ? void 0 : backgroundImage.url) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SliderBlock, {
137
+ defaultValue: backgroundOverlayOpacity,
138
+ label: t("neetoMolecules.themeSidebar.backgroundOverlay"),
139
+ marks: {
140
+ 0: " "
141
+ },
142
+ max: 100,
143
+ min: -100,
144
+ onChange: handleOverlayChange
145
+ }), /*#__PURE__*/React.createElement(SwitchBlock, {
146
+ name: "isDominantBackgroundColorEnabled",
147
+ label: t("neetoMolecules.themeSidebar.enableDominantBackgroundColor")
148
+ }), /*#__PURE__*/React.createElement(SelectBlock, {
149
+ label: t("neetoMolecules.themeSidebar.backgroundPosition"),
150
+ options: BACKGROUND_POSITION_OPTIONS,
151
+ placeholder: t("neetoMolecules.themeSidebar.left"),
152
+ value: findBy({
153
+ value: backgroundImage.backgroundPosition || "center"
154
+ }, BACKGROUND_POSITION_OPTIONS),
155
+ onChange: function onChange(_ref6) {
156
+ var value = _ref6.value;
157
+ return handleChange("backgroundImage.backgroundPosition", value);
158
+ }
159
+ })), /*#__PURE__*/React.createElement(AlignmentBlock, {
160
+ label: t("neetoMolecules.themeSidebar.thankYouTextAlignment"),
161
+ name: "thankYouTextAlignment"
162
+ }), /*#__PURE__*/React.createElement(AlignmentBlock, {
163
+ label: t("neetoMolecules.themeSidebar.welcomeTextAlignment"),
164
+ name: "welcomeTextAlignment"
165
+ }), /*#__PURE__*/React.createElement(AlignmentBlock, {
166
+ label: t("neetoMolecules.themeSidebar.questionsTextAlignment"),
167
+ name: "questionsTextAlignment"
168
+ })));
169
+ };
170
+ export default Properties;
@@ -0,0 +1,66 @@
1
+ import React from "react";
2
+ import { Button } from "@bigbinary/neetoui";
3
+ import { Form } from "@bigbinary/neetoui/formik";
4
+ import { useTranslation } from "react-i18next";
5
+ import Logo from "./Logo";
6
+ import Properties from "./Properties";
7
+ import { INITIAL_STATE, THEME_VALIDATION_SCHEMA } from "../constants";
8
+ import Card from "../fields/Card";
9
+ import TextBlock from "../fields/TextBlock";
10
+ import { parseTheme } from "../utils";
11
+ var Customize = function Customize(_ref) {
12
+ var theme = _ref.theme,
13
+ handleFormSubmit = _ref.handleFormSubmit;
14
+ var _useTranslation = useTranslation(),
15
+ t = _useTranslation.t;
16
+ var getInitialValues = function getInitialValues() {
17
+ return theme ? parseTheme(theme) : INITIAL_STATE;
18
+ };
19
+ return /*#__PURE__*/React.createElement(Form, {
20
+ formikProps: {
21
+ enableReinitialize: true,
22
+ initialValues: getInitialValues(),
23
+ onSubmit: handleFormSubmit,
24
+ validationSchema: THEME_VALIDATION_SCHEMA,
25
+ validateOnBlur: true,
26
+ validateOnChange: true
27
+ }
28
+ }, function (_ref2) {
29
+ var values = _ref2.values,
30
+ dirty = _ref2.dirty,
31
+ isSubmitting = _ref2.isSubmitting,
32
+ setFieldValue = _ref2.setFieldValue;
33
+ return /*#__PURE__*/React.createElement("div", {
34
+ className: "neeto-molecules-theme-design-sidebar__scroll"
35
+ }, /*#__PURE__*/React.createElement("div", {
36
+ className: "flex flex-col gap-6 p-4"
37
+ }, /*#__PURE__*/React.createElement(Card, {
38
+ title: t("neetoMolecules.themeSidebar.name")
39
+ }, /*#__PURE__*/React.createElement(TextBlock, {
40
+ autoFocus: true,
41
+ name: "name"
42
+ })), /*#__PURE__*/React.createElement(Properties, {
43
+ handleChange: setFieldValue,
44
+ values: values
45
+ }), /*#__PURE__*/React.createElement(Logo, {
46
+ logo: values.logo,
47
+ onChange: setFieldValue
48
+ })), /*#__PURE__*/React.createElement("div", {
49
+ className: "neeto-ui-bg-white neeto-ui-shadow-s sticky bottom-0 left-0 right-0 py-6 px-4"
50
+ }, /*#__PURE__*/React.createElement(Button, {
51
+ "data-cy": "save-changes-button",
52
+ disabled: !dirty && theme.id,
53
+ label: t("neetoMolecules.common.actions.save"),
54
+ loading: isSubmitting,
55
+ type: "submit"
56
+ }), /*#__PURE__*/React.createElement(Button, {
57
+ className: "ml-2",
58
+ "data-cy": "reset-button",
59
+ disabled: !dirty,
60
+ label: t("neetoMolecules.common.actions.reset"),
61
+ style: "text",
62
+ type: "reset"
63
+ })));
64
+ });
65
+ };
66
+ export default Customize;
@@ -0,0 +1,135 @@
1
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
+ var _excluded = ["name"];
3
+ import React from "react";
4
+ import classnames from "classnames";
5
+ import { isPresent } from "@bigbinary/neeto-commons-frontend/pure";
6
+ import { Typography, Tag, Button } from "@bigbinary/neetoui";
7
+ import { path } from "ramda";
8
+ import { useTranslation } from "react-i18next";
9
+ import MoreDropdown from "../../MoreDropdown";
10
+ var ThemeCard = function ThemeCard(_ref) {
11
+ var _ref$active = _ref.active,
12
+ active = _ref$active === void 0 ? false : _ref$active,
13
+ isPreviewing = _ref.isPreviewing,
14
+ onSetPreviewTheme = _ref.onSetPreviewTheme,
15
+ onDeleteTheme = _ref.onDeleteTheme,
16
+ onEditTheme = _ref.onEditTheme,
17
+ onApplyTheme = _ref.onApplyTheme,
18
+ onCloneTheme = _ref.onCloneTheme,
19
+ theme = _ref.theme,
20
+ isHighLightedTheme = _ref.isHighLightedTheme,
21
+ isApplyingTheme = _ref.isApplyingTheme;
22
+ var _useTranslation = useTranslation(),
23
+ t = _useTranslation.t;
24
+ var name = theme.name,
25
+ styles = _objectWithoutProperties(theme, _excluded);
26
+ var handleApplyTheme = function handleApplyTheme() {
27
+ if (isApplyingTheme) return;
28
+ onApplyTheme(theme);
29
+ };
30
+ var moreMenuItems = [{
31
+ "data-cy": "theme-edit-button",
32
+ key: "theme-edit-button",
33
+ onClick: function onClick() {
34
+ return onEditTheme(theme);
35
+ },
36
+ label: t("neetoMolecules.common.actions.edit"),
37
+ isVisible: isPresent(onEditTheme)
38
+ }, {
39
+ isVisible: isPresent(onCloneTheme),
40
+ "data-cy": "theme-clone-button",
41
+ key: "theme-clone-button",
42
+ onClick: function onClick() {
43
+ return onCloneTheme(theme);
44
+ },
45
+ label: t("neetoMolecules.themeSidebar.themeOptions.clone")
46
+ }, {
47
+ isVisible: isPresent(onDeleteTheme),
48
+ type: "divider",
49
+ key: "divider"
50
+ }, {
51
+ isVisible: isPresent(onDeleteTheme),
52
+ "data-cy": "theme-delete-button",
53
+ key: "theme-delete-button",
54
+ onClick: function onClick() {
55
+ return onDeleteTheme(theme);
56
+ },
57
+ label: t("neetoMolecules.themeSidebar.themeOptions.delete")
58
+ }];
59
+ return /*#__PURE__*/React.createElement("div", {
60
+ className: "group space-y-2",
61
+ "data-cy": active ? "active-theme-card" : "theme-card",
62
+ id: theme.id
63
+ }, /*#__PURE__*/React.createElement("div", {
64
+ className: classnames("neeto-molecules-theme-thumbnail neeto-ui-rounded-lg border transition-all duration-300 ease-in-out", {
65
+ "neeto-ui-border-gray-400": !active,
66
+ "neeto-ui-border-gray-800 neeto-molecules-theme-thumbnail--active": active,
67
+ "neeto-molecules-theme-thumbnail--preview-active": isPreviewing,
68
+ "neeto-molecules-theme-thumbnail--highlight-active": isHighLightedTheme
69
+ }),
70
+ style: {
71
+ backgroundColor: path(["colorScheme", "backgroundColor"], styles),
72
+ backgroundImage: path(["backgroundImage", "url"], styles) ? "url(".concat(path(["backgroundImage", "url"], styles), ")") : "initial",
73
+ backgroundSize: "cover"
74
+ },
75
+ onClick: function onClick() {
76
+ return onSetPreviewTheme(theme);
77
+ }
78
+ }, /*#__PURE__*/React.createElement("div", {
79
+ className: "group-hover:opacity-85 neeto-ui-rounded-lg cursor-pointer p-6 transition-all duration-300 ease-in-out"
80
+ }, /*#__PURE__*/React.createElement("div", {
81
+ className: "mb-3"
82
+ }, /*#__PURE__*/React.createElement(Typography, {
83
+ style: "h3",
84
+ weight: "semibold"
85
+ }, /*#__PURE__*/React.createElement("span", {
86
+ style: {
87
+ color: path(["colorScheme", "questionColor"], styles)
88
+ }
89
+ }, t("neetoMolecules.themeSidebar.themeCard.question"))), /*#__PURE__*/React.createElement(Typography, {
90
+ className: "neeto-ui-text-gray-600",
91
+ style: "body2"
92
+ }, /*#__PURE__*/React.createElement("span", {
93
+ style: {
94
+ color: path(["colorScheme", "answerColor"], styles)
95
+ }
96
+ }, t("neetoMolecules.themeSidebar.themeCard.answer")))), /*#__PURE__*/React.createElement("div", {
97
+ className: "neeto-ui-rounded-lg h-5 w-12",
98
+ style: {
99
+ backgroundColor: path(["colorScheme", "buttonBackgroundColor"], styles)
100
+ }
101
+ }))), /*#__PURE__*/React.createElement("div", {
102
+ className: "flex items-start justify-between gap-1"
103
+ }, /*#__PURE__*/React.createElement(Typography, {
104
+ className: "min-w-0 flex-grow break-words pt-1 line-clamp-2",
105
+ "data-cy": "theme-name",
106
+ lineHeight: "snug",
107
+ style: "body2"
108
+ }, name), /*#__PURE__*/React.createElement("div", {
109
+ className: "flex items-center gap-2"
110
+ }, active ? /*#__PURE__*/React.createElement(Tag, {
111
+ className: "flex-shrink-0",
112
+ "data-cy": "active-theme-label",
113
+ label: t("neetoMolecules.themeSidebar.active"),
114
+ style: "success"
115
+ }) : /*#__PURE__*/React.createElement(Button, {
116
+ className: "flex-shrink-0",
117
+ "data-cy": "apply-theme-button",
118
+ disabled: isApplyingTheme,
119
+ label: t("neetoMolecules.common.actions.apply"),
120
+ loading: isApplyingTheme,
121
+ size: "small",
122
+ style: "link",
123
+ onClick: handleApplyTheme
124
+ }), /*#__PURE__*/React.createElement(MoreDropdown, {
125
+ buttonProps: {
126
+ buttonSize: "small"
127
+ },
128
+ menuItems: moreMenuItems,
129
+ dropdownButtonProps: {
130
+ "data-cy": "theme-card-options",
131
+ strategy: "fixed"
132
+ }
133
+ }))));
134
+ };
135
+ export default ThemeCard;
@@ -0,0 +1,110 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+ import React, { useEffect, useState } from "react";
3
+ import { isNotEmpty } from "@bigbinary/neeto-commons-frontend/pure";
4
+ import { Search } from "@bigbinary/neeto-icons";
5
+ import { Input, Typography } from "@bigbinary/neetoui";
6
+ import { isEmpty } from "ramda";
7
+ import { useTranslation } from "react-i18next";
8
+ import ThemeCard from "./ThemeCard";
9
+ import { scrollElementIntoView } from "../utils";
10
+ var Themes = function Themes(_ref) {
11
+ var currentTheme = _ref.currentTheme,
12
+ onCloneTheme = _ref.onCloneTheme,
13
+ _ref$customThemes = _ref.customThemes,
14
+ customThemes = _ref$customThemes === void 0 ? [] : _ref$customThemes,
15
+ _ref$defaultThemes = _ref.defaultThemes,
16
+ defaultThemes = _ref$defaultThemes === void 0 ? [] : _ref$defaultThemes,
17
+ onDeleteTheme = _ref.onDeleteTheme,
18
+ onEditTheme = _ref.onEditTheme,
19
+ onApplyTheme = _ref.onApplyTheme,
20
+ previewingTheme = _ref.previewingTheme,
21
+ setPreviewingTheme = _ref.setPreviewingTheme,
22
+ themeToHighlight = _ref.themeToHighlight,
23
+ didScrollActiveThemeIntoView = _ref.didScrollActiveThemeIntoView,
24
+ applyingThemeId = _ref.applyingThemeId;
25
+ var _useTranslation = useTranslation(),
26
+ t = _useTranslation.t;
27
+ var _useState = useState(""),
28
+ _useState2 = _slicedToArray(_useState, 2),
29
+ searchQuery = _useState2[0],
30
+ setSearchQuery = _useState2[1];
31
+ var filteredDefaultThemes = defaultThemes.filter(function (theme) {
32
+ return theme.name.toLowerCase().includes(searchQuery.toLowerCase());
33
+ });
34
+ var filteredThemes = customThemes.filter(function (theme) {
35
+ return theme.name.toLowerCase().includes(searchQuery.toLowerCase());
36
+ });
37
+ var isSearchFieldVisible = (customThemes === null || customThemes === void 0 ? void 0 : customThemes.length) + (defaultThemes === null || defaultThemes === void 0 ? void 0 : defaultThemes.length) > 10;
38
+ useEffect(function () {
39
+ if (didScrollActiveThemeIntoView.current || !(currentTheme !== null && currentTheme !== void 0 && currentTheme.id)) return;
40
+ didScrollActiveThemeIntoView.current = true;
41
+ setTimeout(function () {
42
+ scrollElementIntoView(currentTheme.id);
43
+ }, 200);
44
+ }, [didScrollActiveThemeIntoView, currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme.id]);
45
+ return /*#__PURE__*/React.createElement("div", {
46
+ className: "neeto-molecules-theme-design-sidebar__scroll"
47
+ }, /*#__PURE__*/React.createElement("div", {
48
+ className: "mb-6 space-y-3"
49
+ }, isSearchFieldVisible && /*#__PURE__*/React.createElement(Input, {
50
+ autoFocus: true,
51
+ autoComplete: "off",
52
+ className: "mb-4 mt-1 px-6",
53
+ placeholder: t("neetoMolecules.themeSidebar.searchThemes"),
54
+ prefix: /*#__PURE__*/React.createElement(Search, null),
55
+ type: "search",
56
+ value: searchQuery,
57
+ onChange: function onChange(e) {
58
+ return setSearchQuery(e.target.value);
59
+ }
60
+ }), isEmpty(filteredThemes) && isEmpty(filteredDefaultThemes) && /*#__PURE__*/React.createElement(Typography, {
61
+ className: "text-center",
62
+ style: "body2"
63
+ }, t("neetoMolecules.common.notFound.title", {
64
+ entity: t("neetoMolecules.themeSidebar.theme", {
65
+ count: 2
66
+ })
67
+ })), isNotEmpty(filteredDefaultThemes) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Typography, {
68
+ className: "my-4 px-6 uppercase",
69
+ "data-cy": "system-themes-header",
70
+ style: "h6",
71
+ weight: "semibold"
72
+ }, t("neetoMolecules.themeSidebar.systemThemes")), /*#__PURE__*/React.createElement("div", {
73
+ className: "flex flex-col gap-4 px-6"
74
+ }, filteredDefaultThemes.map(function (theme) {
75
+ return /*#__PURE__*/React.createElement(ThemeCard, {
76
+ active: (currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme.id) === theme.id,
77
+ isApplyingTheme: applyingThemeId === theme.id,
78
+ isPreviewing: (previewingTheme === null || previewingTheme === void 0 ? void 0 : previewingTheme.id) === theme.id,
79
+ key: theme.id,
80
+ onApplyTheme: onApplyTheme,
81
+ onCloneTheme: onCloneTheme,
82
+ theme: theme,
83
+ onSetPreviewTheme: setPreviewingTheme
84
+ });
85
+ })))), isNotEmpty(filteredThemes) && /*#__PURE__*/React.createElement("div", {
86
+ className: "mb-6 space-y-3"
87
+ }, /*#__PURE__*/React.createElement(Typography, {
88
+ className: "my-4 px-6 uppercase",
89
+ "data-cy": "custom-themes-header",
90
+ style: "h6",
91
+ weight: "semibold"
92
+ }, t("neetoMolecules.themeSidebar.customThemes")), /*#__PURE__*/React.createElement("div", {
93
+ className: "flex flex-col gap-4 px-6"
94
+ }, filteredThemes.map(function (theme) {
95
+ var isActive = (currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme.id) === theme.id;
96
+ return /*#__PURE__*/React.createElement(ThemeCard, {
97
+ active: isActive,
98
+ isHighLightedTheme: theme.id === themeToHighlight,
99
+ isPreviewing: (previewingTheme === null || previewingTheme === void 0 ? void 0 : previewingTheme.id) === theme.id,
100
+ key: theme.id,
101
+ onApplyTheme: onApplyTheme,
102
+ onCloneTheme: onCloneTheme,
103
+ onEditTheme: onEditTheme,
104
+ theme: theme,
105
+ onDeleteTheme: !isActive ? onDeleteTheme : null,
106
+ onSetPreviewTheme: setPreviewingTheme
107
+ });
108
+ }))));
109
+ };
110
+ export default Themes;
@@ -0,0 +1,62 @@
1
+ import React from "react";
2
+ import classnames from "classnames";
3
+ import { capitalize } from "@bigbinary/neeto-commons-frontend/pure";
4
+ import { LeftArrow, Plus } from "@bigbinary/neeto-icons";
5
+ import { Button, Typography } from "@bigbinary/neetoui";
6
+ import { useTranslation } from "react-i18next";
7
+ import { DESIGN_SCREENS } from "./constants";
8
+ var TitleBar = function TitleBar(_ref) {
9
+ var currentScreen = _ref.currentScreen,
10
+ handleBackPress = _ref.handleBackPress,
11
+ handleCreateNewTheme = _ref.handleCreateNewTheme,
12
+ isNewTheme = _ref.isNewTheme;
13
+ var _useTranslation = useTranslation(),
14
+ t = _useTranslation.t;
15
+ if (currentScreen === DESIGN_SCREENS.CUSTOMIZE) {
16
+ return /*#__PURE__*/React.createElement("div", {
17
+ className: classnames("neeto-molecules-theme-design-sidebar__header px-4")
18
+ }, /*#__PURE__*/React.createElement("div", {
19
+ className: "flex items-center justify-start space-x-2"
20
+ }, /*#__PURE__*/React.createElement(Button, {
21
+ "data-cy": "customise-themes-back-button",
22
+ icon: LeftArrow,
23
+ iconPosition: "left",
24
+ style: "text",
25
+ tooltipProps: {
26
+ content: t("neetoMolecules.themeSidebar.backToThemes"),
27
+ position: "top"
28
+ },
29
+ onClick: handleBackPress
30
+ }), /*#__PURE__*/React.createElement(Typography, {
31
+ "data-cy": "themes-header",
32
+ lineHeight: "normal",
33
+ style: "h3",
34
+ weight: "semibold"
35
+ }, isNewTheme ? t("neetoMolecules.themeSidebar.createTheme.title") : t("neetoMolecules.themeSidebar.editTheme.title"))));
36
+ }
37
+ return /*#__PURE__*/React.createElement("div", {
38
+ className: classnames("neeto-molecules-theme-design-sidebar__header px-6")
39
+ }, /*#__PURE__*/React.createElement("div", {
40
+ className: "flex items-center justify-between space-x-2"
41
+ }, /*#__PURE__*/React.createElement(Typography, {
42
+ "data-cy": "themes-header",
43
+ lineHeight: "normal",
44
+ style: "h3",
45
+ weight: "semibold"
46
+ }, capitalize(t("neetoMolecules.themeSidebar.theme", {
47
+ count: 2
48
+ }))), /*#__PURE__*/React.createElement("div", {
49
+ className: "self-end"
50
+ }, /*#__PURE__*/React.createElement(Button, {
51
+ "data-cy": "customise-themes-add-theme-button",
52
+ icon: Plus,
53
+ iconPosition: "left",
54
+ style: "text",
55
+ tooltipProps: {
56
+ content: t("neetoMolecules.themeSidebar.addNewTheme"),
57
+ position: "top"
58
+ },
59
+ onClick: handleCreateNewTheme
60
+ }))));
61
+ };
62
+ export default TitleBar;