@bigbinary/neeto-molecules 1.1.78 → 1.2.0-beta2

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 (351) hide show
  1. package/README.md +67 -52
  2. package/dist/Breadcrumbs.js +16 -19
  3. package/dist/Breadcrumbs.js.map +1 -1
  4. package/dist/BrowserSupport.js +41 -138
  5. package/dist/BrowserSupport.js.map +1 -1
  6. package/dist/Builder.js +207 -364
  7. package/dist/Builder.js.map +1 -1
  8. package/dist/CalendarView.js +40 -288
  9. package/dist/CalendarView.js.map +1 -1
  10. package/dist/Chevron-c639aa31.js +190 -0
  11. package/dist/Chevron-c639aa31.js.map +1 -0
  12. package/dist/Codeblock.js +26 -209
  13. package/dist/Codeblock.js.map +1 -1
  14. package/dist/Columns.js +16 -240
  15. package/dist/Columns.js.map +1 -1
  16. package/dist/ConfigurePageSidebar.js +97 -0
  17. package/dist/ConfigurePageSidebar.js.map +1 -0
  18. package/dist/ConfirmationModal.js +10 -10
  19. package/dist/ConfirmationModal.js.map +1 -1
  20. package/dist/Container.js +5 -1187
  21. package/dist/Container.js.map +1 -1
  22. package/dist/CopyToClipboardButton.js +26 -155
  23. package/dist/CopyToClipboardButton.js.map +1 -1
  24. package/dist/Currency.js +912 -0
  25. package/dist/Currency.js.map +1 -0
  26. package/dist/CustomDomain.js +37 -633
  27. package/dist/CustomDomain.js.map +1 -1
  28. package/dist/CustomDomainDashboard.js +69 -2192
  29. package/dist/CustomDomainDashboard.js.map +1 -1
  30. package/dist/DateFormat.js +6 -20
  31. package/dist/DateFormat.js.map +1 -1
  32. package/dist/DateRangeFilter.js +22 -77
  33. package/dist/DateRangeFilter.js.map +1 -1
  34. package/dist/DeleteArchiveModal.js +86 -0
  35. package/dist/DeleteArchiveModal.js.map +1 -0
  36. package/dist/DocumentEditor.js +43 -133
  37. package/dist/DocumentEditor.js.map +1 -1
  38. package/dist/DownloadMobileAppCallout.js +4 -4
  39. package/dist/DownloadMobileAppCallout.js.map +1 -1
  40. package/dist/DynamicVariables.js +12 -95
  41. package/dist/DynamicVariables.js.map +1 -1
  42. package/dist/EmailForm.js +79 -1741
  43. package/dist/EmailForm.js.map +1 -1
  44. package/dist/EmailPreview.js +32 -1213
  45. package/dist/EmailPreview.js.map +1 -1
  46. package/dist/EmojiPicker.js +106 -0
  47. package/dist/EmojiPicker.js.map +1 -0
  48. package/dist/EmojiReactions.js +69 -0
  49. package/dist/EmojiReactions.js.map +1 -0
  50. package/dist/ErrorPage.js +17 -26
  51. package/dist/ErrorPage.js.map +1 -1
  52. package/dist/FloatingActionMenu.js +646 -0
  53. package/dist/FloatingActionMenu.js.map +1 -0
  54. package/dist/Header.js +45 -117
  55. package/dist/Header.js.map +1 -1
  56. package/dist/HelpPopover.js +73 -0
  57. package/dist/HelpPopover.js.map +1 -0
  58. package/dist/IconPicker.js +36 -129
  59. package/dist/IconPicker.js.map +1 -1
  60. package/dist/ImageWithFallback.js +8 -144
  61. package/dist/ImageWithFallback.js.map +1 -1
  62. package/dist/InlineInput.js +25 -528
  63. package/dist/InlineInput.js.map +1 -1
  64. package/dist/Insights.js +305 -0
  65. package/dist/Insights.js.map +1 -0
  66. package/dist/IntegrationCard.js +42 -226
  67. package/dist/IntegrationCard.js.map +1 -1
  68. package/dist/IntegrationDisconnectAlert.js +6 -48
  69. package/dist/IntegrationDisconnectAlert.js.map +1 -1
  70. package/dist/IntegrationWalkthroughModal.js +10 -10
  71. package/dist/IntegrationWalkthroughModal.js.map +1 -1
  72. package/dist/IpRestriction.js +74 -221
  73. package/dist/IpRestriction.js.map +1 -1
  74. package/dist/KeyboardShortcuts.js +38 -128
  75. package/dist/KeyboardShortcuts.js.map +1 -1
  76. package/dist/LoginPage.js +44 -463
  77. package/dist/LoginPage.js.map +1 -1
  78. package/dist/MadeWith.js +32 -0
  79. package/dist/MadeWith.js.map +1 -0
  80. package/dist/MenuBar.js +34 -1295
  81. package/dist/MenuBar.js.map +1 -1
  82. package/dist/Metadata.js +65 -86
  83. package/dist/Metadata.js.map +1 -1
  84. package/dist/MoreDropdown.js +48 -107
  85. package/dist/MoreDropdown.js.map +1 -1
  86. package/dist/NavigationHeader.js +62 -733
  87. package/dist/NavigationHeader.js.map +1 -1
  88. package/dist/NeetoWidget.js +148 -316
  89. package/dist/NeetoWidget.js.map +1 -1
  90. package/dist/Onboarding.js +204 -0
  91. package/dist/Onboarding.js.map +1 -0
  92. package/dist/OptionFields.js +507 -0
  93. package/dist/OptionFields.js.map +1 -0
  94. package/dist/PageLoader.js +9 -112
  95. package/dist/PageLoader.js.map +1 -1
  96. package/dist/PhoneNumber.js +122 -201
  97. package/dist/PhoneNumber.js.map +1 -1
  98. package/dist/ProductEmbed.js +767 -0
  99. package/dist/ProductEmbed.js.map +1 -0
  100. package/dist/PublishBlock.js +19 -60
  101. package/dist/PublishBlock.js.map +1 -1
  102. package/dist/PublishYourItem.js +52 -0
  103. package/dist/PublishYourItem.js.map +1 -0
  104. package/dist/Rename.js +127 -394
  105. package/dist/Rename.js.map +1 -1
  106. package/dist/ResponsiveDevicePicker.js +8 -144
  107. package/dist/ResponsiveDevicePicker.js.map +1 -1
  108. package/dist/Schedule.js +134 -389
  109. package/dist/Schedule.js.map +1 -1
  110. package/dist/Scrollable.js +6 -89
  111. package/dist/Scrollable.js.map +1 -1
  112. package/dist/Search.js +54 -157
  113. package/dist/Search.js.map +1 -1
  114. package/dist/Security.js +72 -1567
  115. package/dist/Security.js.map +1 -1
  116. package/dist/SendToFields.js +51 -133
  117. package/dist/SendToFields.js.map +1 -1
  118. package/dist/Settings.js +141 -412
  119. package/dist/Settings.js.map +1 -1
  120. package/dist/ShareRecordingPane.js +189 -0
  121. package/dist/ShareRecordingPane.js.map +1 -0
  122. package/dist/ShareViaEmail.js +126 -551
  123. package/dist/ShareViaEmail.js.map +1 -1
  124. package/dist/ShareViaLink.js +127 -345
  125. package/dist/ShareViaLink.js.map +1 -1
  126. package/dist/Sidebar.js +161 -758
  127. package/dist/Sidebar.js.map +1 -1
  128. package/dist/StickyRibbonsContainer.js +81 -0
  129. package/dist/StickyRibbonsContainer.js.map +1 -0
  130. package/dist/SubHeader.js +63 -108
  131. package/dist/SubHeader.js.map +1 -1
  132. package/dist/SuffixedInput.js +105 -0
  133. package/dist/SuffixedInput.js.map +1 -0
  134. package/dist/TableWrapper.js +8 -9
  135. package/dist/TableWrapper.js.map +1 -1
  136. package/dist/Taxonomy.js +112 -1774
  137. package/dist/Taxonomy.js.map +1 -1
  138. package/dist/ThemeSidebar.js +168 -784
  139. package/dist/ThemeSidebar.js.map +1 -1
  140. package/dist/TimeFormat.js +8 -44
  141. package/dist/TimeFormat.js.map +1 -1
  142. package/dist/TimezoneMismatchModal.js +49 -84
  143. package/dist/TimezoneMismatchModal.js.map +1 -1
  144. package/dist/ToggleFeatureCard.js +46 -169
  145. package/dist/ToggleFeatureCard.js.map +1 -1
  146. package/dist/cjs/Breadcrumbs.js +49 -0
  147. package/dist/cjs/Breadcrumbs.js.map +1 -0
  148. package/dist/cjs/BrowserSupport.js +332 -0
  149. package/dist/cjs/BrowserSupport.js.map +1 -0
  150. package/dist/cjs/Builder.js +560 -0
  151. package/dist/cjs/Builder.js.map +1 -0
  152. package/dist/cjs/CalendarView.js +303 -0
  153. package/dist/cjs/CalendarView.js.map +1 -0
  154. package/dist/cjs/Chevron-5fe59f57.js +206 -0
  155. package/dist/cjs/Chevron-5fe59f57.js.map +1 -0
  156. package/dist/cjs/Codeblock.js +59 -0
  157. package/dist/cjs/Codeblock.js.map +1 -0
  158. package/dist/cjs/Columns.js +31 -0
  159. package/dist/cjs/Columns.js.map +1 -0
  160. package/dist/cjs/ConfigurePageSidebar.js +105 -0
  161. package/dist/cjs/ConfigurePageSidebar.js.map +1 -0
  162. package/dist/cjs/ConfirmationModal.js +120 -0
  163. package/dist/cjs/ConfirmationModal.js.map +1 -0
  164. package/dist/cjs/Container.js +36 -0
  165. package/dist/cjs/Container.js.map +1 -0
  166. package/dist/cjs/CopyToClipboardButton.js +90 -0
  167. package/dist/cjs/CopyToClipboardButton.js.map +1 -0
  168. package/dist/cjs/Currency.js +923 -0
  169. package/dist/cjs/Currency.js.map +1 -0
  170. package/dist/cjs/CustomDomain.js +126 -0
  171. package/dist/cjs/CustomDomain.js.map +1 -0
  172. package/dist/cjs/CustomDomainDashboard.js +202 -0
  173. package/dist/cjs/CustomDomainDashboard.js.map +1 -0
  174. package/dist/cjs/DateFormat.js +41 -0
  175. package/dist/cjs/DateFormat.js.map +1 -0
  176. package/dist/cjs/DateRangeFilter.js +183 -0
  177. package/dist/cjs/DateRangeFilter.js.map +1 -0
  178. package/dist/cjs/DeleteArchiveModal.js +93 -0
  179. package/dist/cjs/DeleteArchiveModal.js.map +1 -0
  180. package/dist/cjs/DocumentEditor.js +197 -0
  181. package/dist/cjs/DocumentEditor.js.map +1 -0
  182. package/dist/cjs/DownloadMobileAppCallout.js +45 -0
  183. package/dist/cjs/DownloadMobileAppCallout.js.map +1 -0
  184. package/dist/cjs/DynamicVariables.js +109 -0
  185. package/dist/cjs/DynamicVariables.js.map +1 -0
  186. package/dist/cjs/EmailForm.js +397 -0
  187. package/dist/cjs/EmailForm.js.map +1 -0
  188. package/dist/cjs/EmailPreview.js +139 -0
  189. package/dist/cjs/EmailPreview.js.map +1 -0
  190. package/dist/cjs/EmojiPicker.js +115 -0
  191. package/dist/cjs/EmojiPicker.js.map +1 -0
  192. package/dist/cjs/EmojiReactions.js +77 -0
  193. package/dist/cjs/EmojiReactions.js.map +1 -0
  194. package/dist/cjs/ErrorPage.js +180 -0
  195. package/dist/cjs/ErrorPage.js.map +1 -0
  196. package/dist/cjs/FloatingActionMenu.js +680 -0
  197. package/dist/cjs/FloatingActionMenu.js.map +1 -0
  198. package/dist/cjs/Header.js +107 -0
  199. package/dist/cjs/Header.js.map +1 -0
  200. package/dist/cjs/HelpPopover.js +82 -0
  201. package/dist/cjs/HelpPopover.js.map +1 -0
  202. package/dist/cjs/IconPicker.js +231 -0
  203. package/dist/cjs/IconPicker.js.map +1 -0
  204. package/dist/cjs/ImageWithFallback.js +56 -0
  205. package/dist/cjs/ImageWithFallback.js.map +1 -0
  206. package/dist/cjs/InlineInput.js +240 -0
  207. package/dist/cjs/InlineInput.js.map +1 -0
  208. package/dist/cjs/Insights.js +311 -0
  209. package/dist/cjs/Insights.js.map +1 -0
  210. package/dist/cjs/IntegrationCard.js +210 -0
  211. package/dist/cjs/IntegrationCard.js.map +1 -0
  212. package/dist/cjs/IntegrationDisconnectAlert.js +50 -0
  213. package/dist/cjs/IntegrationDisconnectAlert.js.map +1 -0
  214. package/dist/cjs/IntegrationWalkthroughModal.js +51 -0
  215. package/dist/cjs/IntegrationWalkthroughModal.js.map +1 -0
  216. package/dist/cjs/IpRestriction.js +527 -0
  217. package/dist/cjs/IpRestriction.js.map +1 -0
  218. package/dist/cjs/KeyboardShortcuts.js +284 -0
  219. package/dist/cjs/KeyboardShortcuts.js.map +1 -0
  220. package/dist/cjs/LoginPage.js +202 -0
  221. package/dist/cjs/LoginPage.js.map +1 -0
  222. package/dist/cjs/MadeWith.js +40 -0
  223. package/dist/cjs/MadeWith.js.map +1 -0
  224. package/dist/cjs/MenuBar.js +211 -0
  225. package/dist/cjs/MenuBar.js.map +1 -0
  226. package/dist/cjs/Metadata.js +196 -0
  227. package/dist/cjs/Metadata.js.map +1 -0
  228. package/dist/cjs/MoreDropdown.js +155 -0
  229. package/dist/cjs/MoreDropdown.js.map +1 -0
  230. package/dist/cjs/NavigationHeader.js +187 -0
  231. package/dist/cjs/NavigationHeader.js.map +1 -0
  232. package/dist/cjs/NeetoWidget.js +915 -0
  233. package/dist/cjs/NeetoWidget.js.map +1 -0
  234. package/dist/cjs/Onboarding.js +216 -0
  235. package/dist/cjs/Onboarding.js.map +1 -0
  236. package/dist/cjs/OptionFields.js +518 -0
  237. package/dist/cjs/OptionFields.js.map +1 -0
  238. package/dist/cjs/PageLoader.js +40 -0
  239. package/dist/cjs/PageLoader.js.map +1 -0
  240. package/dist/cjs/PhoneNumber.js +367 -0
  241. package/dist/cjs/PhoneNumber.js.map +1 -0
  242. package/dist/cjs/ProductEmbed.js +777 -0
  243. package/dist/cjs/ProductEmbed.js.map +1 -0
  244. package/dist/cjs/PublishBlock.js +127 -0
  245. package/dist/cjs/PublishBlock.js.map +1 -0
  246. package/dist/cjs/PublishYourItem.js +59 -0
  247. package/dist/cjs/PublishYourItem.js.map +1 -0
  248. package/dist/cjs/Rename.js +354 -0
  249. package/dist/cjs/Rename.js.map +1 -0
  250. package/dist/cjs/ResponsiveDevicePicker.js +68 -0
  251. package/dist/cjs/ResponsiveDevicePicker.js.map +1 -0
  252. package/dist/cjs/Schedule.js +874 -0
  253. package/dist/cjs/Schedule.js.map +1 -0
  254. package/dist/cjs/Scrollable.js +49 -0
  255. package/dist/cjs/Scrollable.js.map +1 -0
  256. package/dist/cjs/Search.js +121 -0
  257. package/dist/cjs/Search.js.map +1 -0
  258. package/dist/cjs/Security.js +379 -0
  259. package/dist/cjs/Security.js.map +1 -0
  260. package/dist/cjs/SendToFields.js +275 -0
  261. package/dist/cjs/SendToFields.js.map +1 -0
  262. package/dist/cjs/Settings.js +217 -0
  263. package/dist/cjs/Settings.js.map +1 -0
  264. package/dist/cjs/ShareRecordingPane.js +199 -0
  265. package/dist/cjs/ShareRecordingPane.js.map +1 -0
  266. package/dist/cjs/ShareViaEmail.js +353 -0
  267. package/dist/cjs/ShareViaEmail.js.map +1 -0
  268. package/dist/cjs/ShareViaLink.js +508 -0
  269. package/dist/cjs/ShareViaLink.js.map +1 -0
  270. package/dist/cjs/Sidebar.js +292 -0
  271. package/dist/cjs/Sidebar.js.map +1 -0
  272. package/dist/cjs/StickyRibbonsContainer.js +90 -0
  273. package/dist/cjs/StickyRibbonsContainer.js.map +1 -0
  274. package/dist/cjs/SubHeader.js +181 -0
  275. package/dist/cjs/SubHeader.js.map +1 -0
  276. package/dist/cjs/SuffixedInput.js +114 -0
  277. package/dist/cjs/SuffixedInput.js.map +1 -0
  278. package/dist/cjs/TableWrapper.js +32 -0
  279. package/dist/cjs/TableWrapper.js.map +1 -0
  280. package/dist/cjs/Taxonomy.js +445 -0
  281. package/dist/cjs/Taxonomy.js.map +1 -0
  282. package/dist/cjs/ThemeSidebar.js +1443 -0
  283. package/dist/cjs/ThemeSidebar.js.map +1 -0
  284. package/dist/cjs/TimeFormat.js +15 -0
  285. package/dist/cjs/TimeFormat.js.map +1 -0
  286. package/dist/cjs/TimezoneMismatchModal.js +144 -0
  287. package/dist/cjs/TimezoneMismatchModal.js.map +1 -0
  288. package/dist/cjs/ToggleFeatureCard.js +213 -0
  289. package/dist/cjs/ToggleFeatureCard.js.map +1 -0
  290. package/dist/cjs/index-248c4f4c.js +1186 -0
  291. package/dist/cjs/index-248c4f4c.js.map +1 -0
  292. package/dist/cjs/index-7db1772e.js +544 -0
  293. package/dist/cjs/index-7db1772e.js.map +1 -0
  294. package/dist/cjs/inject-css-80a5faa3.js +6 -0
  295. package/dist/cjs/inject-css-80a5faa3.js.map +1 -0
  296. package/dist/cjs/useColumns-9978cf70.js +275 -0
  297. package/dist/cjs/useColumns-9978cf70.js.map +1 -0
  298. package/dist/index-7d311b7a.js +509 -0
  299. package/dist/index-7d311b7a.js.map +1 -0
  300. package/dist/index-e5588516.js +1184 -0
  301. package/dist/index-e5588516.js.map +1 -0
  302. package/dist/inject-css-c86de496.js +4 -0
  303. package/dist/inject-css-c86de496.js.map +1 -0
  304. package/dist/useColumns-751e9192.js +258 -0
  305. package/dist/useColumns-751e9192.js.map +1 -0
  306. package/package.json +30 -19
  307. package/src/translations/de.json +7 -0
  308. package/src/translations/en.json +191 -31
  309. package/src/translations/es.json +7 -0
  310. package/src/translations/fr.json +7 -0
  311. package/src/translations/nl.json +7 -0
  312. package/src/translations/pl.json +7 -0
  313. package/src/translations/pt.json +7 -0
  314. package/types/Breadcrumbs.d.ts +1 -0
  315. package/types/Builder.d.ts +61 -12
  316. package/types/Columns.d.ts +112 -5
  317. package/types/ConfigurePageSidebar.d.ts +43 -0
  318. package/types/CopyToClipboardButton.d.ts +3 -0
  319. package/types/Currency.d.ts +48 -0
  320. package/types/CustomDomain.d.ts +2 -0
  321. package/types/CustomDomainDashboard.d.ts +14 -0
  322. package/types/DateRangeFilter.d.ts +2 -0
  323. package/types/DeleteArchiveModal.d.ts +60 -0
  324. package/types/EmailForm.d.ts +1 -1
  325. package/types/EmojiPicker.d.ts +33 -0
  326. package/types/EmojiReactions.d.ts +60 -0
  327. package/types/ErrorPage.d.ts +1 -0
  328. package/types/FloatingActionMenu.d.ts +56 -0
  329. package/types/Header.d.ts +2 -1
  330. package/types/HelpPopover.d.ts +42 -0
  331. package/types/Insights.d.ts +108 -0
  332. package/types/IntegrationCard.d.ts +2 -0
  333. package/types/KeyboardShortcuts.d.ts +2 -2
  334. package/types/MadeWith.d.ts +16 -0
  335. package/types/MoreDropdown.d.ts +4 -1
  336. package/types/NavigationHeader.d.ts +3 -1
  337. package/types/Onboarding.d.ts +65 -0
  338. package/types/OptionFields.d.ts +63 -0
  339. package/types/PhoneNumber.d.ts +6 -2
  340. package/types/ProductEmbed.d.ts +87 -0
  341. package/types/Rename.d.ts +4 -1
  342. package/types/Schedule.d.ts +2 -0
  343. package/types/Search.d.ts +2 -0
  344. package/types/Settings.d.ts +13 -10
  345. package/types/ShareRecordingPane.d.ts +50 -0
  346. package/types/ShareViaLink.d.ts +15 -4
  347. package/types/Sidebar.d.ts +16 -32
  348. package/types/StickyRibbonsContainer.d.ts +26 -0
  349. package/types/SubHeader.d.ts +0 -1
  350. package/types/SuffixedInput.d.ts +43 -0
  351. package/types/ToggleFeatureCard.d.ts +8 -1
@@ -3,51 +3,100 @@ type Element = {
3
3
  value: string;
4
4
  icon: React.ReactNode;
5
5
  };
6
-
7
6
  type ElementSection = {
8
7
  title: string;
9
8
  elements: Element[];
10
9
  key: string;
11
10
  isCreatable: (element: Element) => boolean;
12
11
  };
13
-
14
12
  type SelectedElement = {
15
13
  id: string;
16
14
  kind: string;
17
15
  position: number;
18
16
  label: string;
19
17
  icon: React.ReactNode;
18
+ isPending: boolean;
20
19
  };
21
-
22
20
  type dragResult = {
23
21
  index: number;
24
22
  };
25
-
26
23
  type SelectedElementAction = {
27
24
  label: string;
28
25
  key: string;
29
26
  onClick: (element: Element) => void;
27
+ isVisible?: boolean;
30
28
  };
31
-
32
- export const ElementsPanel: React.FC<{
29
+ export
30
+ /**
31
+ *
32
+ * @example
33
+ *
34
+ * import React from "react";
35
+ * import Container from "@bigbinary/neeto-molecules/Container";
36
+ * import {
37
+ * ElementsPanel,
38
+ * PropertiesPanel,
39
+ * } from "@bigbinary/neeto-molecules/Builder";
40
+ * import Configure from "./Configure";
41
+ *
42
+ * const Component = () => (
43
+ * <Container isHeaderFixed>
44
+ * <div className="flex h-full w-full justify-between">
45
+ * <ElementsPanel
46
+ * elementSections={sections}
47
+ * {...{
48
+ * handleAddElement,
49
+ * isElementVisible,
50
+ * selectedElements,
51
+ * fixedFirstElement,
52
+ * fixedLastElement,
53
+ * }}
54
+ * selectedElementActions={[
55
+ * {
56
+ * label: "Duplicate",
57
+ * key: "duplicate",
58
+ * onClick: element => alert("Clicked", JSON.stringify(element)),
59
+ * },
60
+ * {
61
+ * label: "Delete",
62
+ * key: "delete",
63
+ * onClick: element => alert("Clicked", JSON.stringify(element)),
64
+ * },
65
+ * ]}
66
+ * />
67
+ * <PropertiesPanel
68
+ * onClose={id => alert("The panel is closed :", id)}
69
+ * id={selectedRecord.id}
70
+ * >
71
+ * {selectedRecord.id ? <Configure /> : <PropertiesPanel.EmptyProperty />}
72
+ * </PropertiesPanel>
73
+ * </div>
74
+ * </Container>
75
+ * );
76
+ * @endexample
77
+ */
78
+ const ElementsPanel: React.FC<{
33
79
  elementSections: ElementSection[];
34
80
  selectedElements: SelectedElement[];
35
81
  handleAddElement: (element: Element) => void;
36
82
  isElementVisible: (element: Element) => boolean;
37
83
  fixedFirstElement?: SelectedElement;
38
84
  fixedLastElement?: SelectedElement;
39
- handleDragEnd?: ({ source: dragResult, destination: dragResult }) => void;
85
+ handleDragEnd?: ({
86
+ source: dragResult,
87
+ destination: dragResult
88
+ }) => void;
40
89
  isDragDisabled?: boolean;
41
90
  handleSelectElement: (index: number) => void;
42
- selectedElementIndex: number;
43
- fixedLastElementIndex: number;
44
- selectedElementActions: SelectedElementAction[];
91
+ selectedElementId: string;
92
+ selectedElementActions: SelectedElementAction[] | ((element: Element) => SelectedElementAction[]);
45
93
  addAllElements: () => void;
46
94
  isAddingAllElements?: boolean;
47
95
  showElementsFillButton?: boolean;
48
96
  isAddingNewElement?: boolean;
49
97
  }>;
50
-
51
98
  export const PropertiesPanel: React.FC<{
52
99
  children: React.ReactNode;
53
- }>;
100
+ id: string;
101
+ onClose?: (id: string) => void;
102
+ }>;
@@ -6,6 +6,16 @@ type Column = {
6
6
  key: string;
7
7
  [key: string]: any;
8
8
  };
9
+ type getColumnDataType = {
10
+ columnData: any[];
11
+ isHidable?: boolean;
12
+ isReOrderable?: boolean;
13
+ };
14
+ type useColumnsType = {
15
+ localStorageKey: string;
16
+ initialHiddenColumns?: string[];
17
+ initialOrder?: string[];
18
+ };
9
19
  /**
10
20
  *
11
21
  * It is a helper component that can be used along with the table component to hide
@@ -14,23 +24,43 @@ type Column = {
14
24
  *
15
25
  * ![image](https://user-images.githubusercontent.com/32426070/195069324-3cbb4c70-f62b-4080-b4ae-bdeabb449b23.png|height=200|width=300)
16
26
  *
27
+ * It's a helper hook used alongside Columns component. It allows you to to
28
+ *
29
+ * interact with the underlying zustand store to hide and show columns.
30
+ *
17
31
  * @example
18
32
  *
19
33
  * import React, { useState } from "react";
20
34
  *
21
35
  * import { Table } from "@bigbinary/neetoui";
22
- * import Columns from "@bigbinary/neeto-molecules/Columns";
36
+ * import Columns, { useHiddenColumns } from "@bigbinary/neeto-molecules/Columns";
23
37
  *
24
- * import { DEFAULT_COLUMNS_DATA, DEFAULT_ROW_DATA } from "./constants";
38
+ * import { DEFAULT_ROW_DATA } from "./constants";
25
39
  *
26
40
  * const App = () => {
27
- * const [columns, setColumns] = useState(DEFAULT_COLUMNS_DATA);
41
+ * const localStorageKey = "NEETO_APP_FEATURE_HIDDEN_COLUMNS";
42
+ * const { hideColumn } = useHiddenColumns(localStorageKey);
43
+ * const [columns, setColumns] = useState([]);
44
+ * const DEFAULT_COLUMNS_DATA = [
45
+ * { title: "Id", dataIndex: "id", key: "id", isHidable: false },
46
+ * { title: "Name", dataIndex: "name", key: "name", isHidable: false },
47
+ * {
48
+ * title: () => (
49
+ * <>
50
+ * <span>Email</span>
51
+ * <Button onClick={() => hideColumn("email")}>Hide</Button>
52
+ * </>
53
+ * ),
54
+ * dataIndex: "email",
55
+ * key: "email",
56
+ * },
57
+ * ];
28
58
  *
29
59
  * return (
30
60
  * <div>
31
61
  * <Columns
32
62
  * columnData={DEFAULT_COLUMNS_DATA}
33
- * localStorageKey="NEETO_APP_FEATURE_HIDDEN_COLUMNS"
63
+ * localStorageKey={localStorageKey}
34
64
  * onChange={setColumns}
35
65
  * />
36
66
  * <Table rowData={DEFAULT_ROW_DATA} columnData={columns} />
@@ -38,16 +68,93 @@ type Column = {
38
68
  * );
39
69
  * };
40
70
  * @endexample
71
+ * It's a helper hook used alongside Columns component. It allows you to to
72
+ *
73
+ * interact with the underlying zustand store to hide/show columns and store the column order.
74
+ *
75
+ * @example
76
+ *
77
+ * import React, { useState } from "react";
78
+ *
79
+ * import { Table } from "@bigbinary/neetoui";
80
+ * import Columns, { useColumns } from "@bigbinary/neeto-molecules/Columns";
81
+ *
82
+ * import { DEFAULT_ROW_DATA } from "./constants";
83
+ *
84
+ * const App = () => {
85
+ * const localStorageKey = "NEETO_APP_FEATURE_HIDDEN_COLUMNS";
86
+ * const { hideColumn, getColumnData } = useColumns({
87
+ * localStorageKey,
88
+ * initialHiddenColumns,
89
+ * initialOrder,
90
+ * });
91
+ * const [columns, setColumns] = useState([]);
92
+ * const DEFAULT_COLUMNS_DATA = [
93
+ * { title: "Id", dataIndex: "id", key: "id", isHidable: false },
94
+ * { title: "Name", dataIndex: "name", key: "name", isHidable: false },
95
+ * {
96
+ * title: () => (
97
+ * <>
98
+ * <span>Email</span>
99
+ * <Button onClick={() => hideColumn("email")}>Hide</Button>
100
+ * </>
101
+ * ),
102
+ * dataIndex: "email",
103
+ * key: "email",
104
+ * },
105
+ * ];
106
+ *
107
+ * const handleColumnReorder = columns => {
108
+ * setColumnOrder(pluck("dataIndex", columns).filter(isNotEmpty));
109
+ * };
110
+ *
111
+ * const columnData = getColumnData({
112
+ * columnData: columns,
113
+ * isReOrderable: true,
114
+ * isHidable: true,
115
+ * });
116
+ *
117
+ * return (
118
+ * <div>
119
+ * <Table rowData={DEFAULT_ROW_DATA} {...{ columnData }} onColumnUpdate={handleColumnReorder} />
120
+ * </div>
121
+ * );
122
+ * };
123
+ * @endexample
41
124
  */
42
125
  const Columns: React.FC<{
43
126
  actionBlock?: React.ReactNode;
44
127
  checkboxProps?: CheckboxProps;
45
128
  columnData: Column[];
46
- fixedColumns?: string[];
47
129
  isSearchable?: boolean;
48
130
  localStorageKey: string;
49
131
  noColumnMessage?: string;
50
132
  onChange: (columns: Column[], hiddenColumns: string[]) => any[];
51
133
  searchProps?: InputProps;
52
134
  } & DropdownProps>;
135
+ export function useHiddenColumns(localStorageKey: string, initialValue?: string[]): {
136
+ hiddenColumns: string[];
137
+ hideColumn: (dataIndex: string) => void;
138
+ showColumn: (dataIndex: string) => void;
139
+ getVisibleColumnData: (columnData: any[]) => any[];
140
+ onColumnDataChange: (columnData: any[]) => void;
141
+ };
142
+ export function useColumns({
143
+ localStorageKey,
144
+ initialHiddenColumns,
145
+ initialOrder
146
+ }: useColumnsType): {
147
+ hiddenColumns: string[];
148
+ columnOrder: string[];
149
+ hideColumn: (dataIndex: string) => void;
150
+ showColumn: (dataIndex: string) => void;
151
+ getVisibleColumnData: (columnData: any[]) => any[];
152
+ onColumnDataChange: (columnData: any[]) => void;
153
+ getColumnData: ({
154
+ columnData,
155
+ isHidable,
156
+ isReOrderable
157
+ }: getColumnDataType) => any[];
158
+ setColumnOrder: (columns: string[]) => void;
159
+ };
53
160
  export default Columns;
@@ -0,0 +1,43 @@
1
+ import React from "react";
2
+ type NavLinkItemType = {
3
+ to: string;
4
+ label?: React.ReactNode;
5
+ isActive: () => boolean;
6
+ items: NavLinkItemType[];
7
+ } & React.PropsWithoutRef<NavLinkProps<any>> & React.RefAttributes<HTMLAnchorElement>;
8
+ /**
9
+ *
10
+ * The ConfigurePageSidebar component is used in Neeto products to display
11
+ *
12
+ * navigation links on configure pages with simplified UI for navigation. An
13
+ *
14
+ * example of its usage is the NeetoForm Configure page within the form builder.
15
+ *
16
+ * ![Screenshot](https://github.com/bigbinary/neeto-molecules/assets/12969853/3e3f16f0-7296-476a-90c3-2f95846dae62|height=200|width=300)
17
+ *
18
+ * @example
19
+ *
20
+ * import ConfigurePageSidebar from "@bigbinary/neeto-molecules/ConfigurePageSidebar";
21
+ * import { SIDEBAR_LINKS } from "components/constants";
22
+ *
23
+ * const App = ({ children }) => {
24
+ * // custom app logic
25
+ * return (
26
+ * <div>
27
+ * <ConfigurePageSidebar
28
+ * configurePageRoute={buildUrl(routes.form.configure.index, { formId })}
29
+ * label="Configure"
30
+ * navLinks={SIDEBAR_LINKS}
31
+ * />
32
+ * {children}
33
+ * </div>
34
+ * );
35
+ * };
36
+ * @endexample
37
+ */
38
+ const ConfigurePageSidebar: React.FC<{
39
+ label: React.ReactNode;
40
+ navLinks: NavLinkItemType[];
41
+ configurePageRoute: string;
42
+ }>;
43
+ export default ConfigurePageSidebar;
@@ -3,6 +3,9 @@ export interface CopyToClipboardButtonProps {
3
3
  className?: string;
4
4
  icon?: string | any;
5
5
  label?: string;
6
+ successLabel?: string;
7
+ tooltipContent?: string;
8
+ successTooltipContent?: string;
6
9
  value: string;
7
10
  style?: "primary" | "secondary" | "text";
8
11
  }
@@ -0,0 +1,48 @@
1
+ import React from "react";
2
+ import { SelectProps } from "@bigbinary/neetoui";
3
+ type CurrencyProps = {
4
+ allowedCurrencies?: string[];
5
+ } & SelectProps;
6
+ /**
7
+ *
8
+ * A component that allows you to select a currency.
9
+ *
10
+ * ![Screenshot](https://github.com/bigbinary/neeto-molecules/assets/10956193/422f706f-8873-4091-866f-f09c24958b69|height=200|width=300)
11
+ *
12
+ * @example
13
+ *
14
+ * import { useState } from "react";
15
+ * import { Currency } from "@bigbinary/neeto-molecules/Currency";
16
+ *
17
+ * const CurrencyContainer = () => {
18
+ * const [currency, setCurrency] = useState();
19
+ * return <Currency onChange={setCurrency} />;
20
+ * };
21
+ * @endexample
22
+ * The Currency component wrapped in Formik.
23
+ *
24
+ * @example
25
+ *
26
+ * import * as yup from "yup";
27
+ * import { FormikCurrency } from "@bigbinary/neeto-molecules/Currency";
28
+ *
29
+ * const FormikCurrencyContainer = () => {
30
+ * return (
31
+ * <Form
32
+ * formikProps={{
33
+ * initialValues: { currency: null },
34
+ * validationSchema: yup.object().shape({
35
+ * currency: yup.object().required(),
36
+ * }),
37
+ * }}
38
+ * >
39
+ * <FormikCurrency />
40
+ * <Button className="mt-5" label="Submit" type="submit" />
41
+ * </Form>
42
+ * );
43
+ * };
44
+ * @endexample
45
+ */
46
+ const Currency: React.FC<CurrencyProps>;
47
+ const FormikCurrency: React.FC<CurrencyProps>;
48
+ export { Currency, FormikCurrency };
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import { onCreateCustomDomainCallback } from "./CustomDomainDashboard";
2
3
  /**
3
4
  *
4
5
  * A common component for managing custom domain. This component can be used when
@@ -15,5 +16,6 @@ import React from "react";
15
16
  const CustomDomain: React.FC<{
16
17
  url: string;
17
18
  iconOnly: boolean;
19
+ onCreate?: onCreateCustomDomainCallback;
18
20
  }>;
19
21
  export default CustomDomain;
@@ -1,4 +1,17 @@
1
1
  import React from "react";
2
+ type customDomainFields = {
3
+ addedCnameAt: string;
4
+ cnameValidationParams: {
5
+ name: string;
6
+ value: string;
7
+ };
8
+ dnsTarget: string;
9
+ hostname: string;
10
+ id: string;
11
+ notice: string;
12
+ status: string;
13
+ };
14
+ export type onCreateCustomDomainCallback = (values: customDomainFields) => void;
2
15
  /**
3
16
  *
4
17
  * A full page common component for managing custom domains. This component can be
@@ -29,5 +42,6 @@ const CustomDomainDashboard: React.FC<{
29
42
  [key: string]: any;
30
43
  };
31
44
  url: string;
45
+ onCreate: onCreateCustomDomainCallback;
32
46
  }>;
33
47
  export default CustomDomainDashboard;
@@ -1,5 +1,6 @@
1
1
  import React from "react";
2
2
  import { Dayjs } from "dayjs";
3
+ import { DatePickerProps } from "@bigbinary/neetoui";
3
4
  interface TimePeriodType {
4
5
  startDate: Dayjs;
5
6
  endDate: Dayjs;
@@ -48,5 +49,6 @@ const DateRangeFilter: React.FC<{
48
49
  timePeriod: TimePeriodType;
49
50
  setTimePeriod: React.Dispatch<React.SetStateAction<TimePeriodType>>;
50
51
  timePeriodOptions?: TimePeriodType[];
52
+ datePickerProps?: DatePickerProps;
51
53
  }>;
52
54
  export default DateRangeFilter;
@@ -0,0 +1,60 @@
1
+ import React from "react";
2
+ /**
3
+ *
4
+ * The DeleteArchiveModal component is designed to facilitate the deletion of an entity, emphasizing the irreversible nature of this action through a confirmation checkbox. Additionally, it provides an option to archive the entity instead of deleting it.
5
+ *
6
+ * @example
7
+ *
8
+ * import React from "react";
9
+ * import DeleteArchiveModal from "@bigbinary/neeto-molecules/DeleteArchiveModal";
10
+ *
11
+ * import { deleteProject, archiveProject } from "apis/projectApi.js";
12
+ *
13
+ * const App = ({ project }) => {
14
+ * const [isDeleting, setIsDeleting] = useState(false);
15
+ * const [isArchiving, setIsArchiving] = useState(false);
16
+ * const [showModal, setShowModal] = useState(false);
17
+ *
18
+ * return (
19
+ * <DeleteArchiveModal
20
+ * checkboxLabel="Yes, delete <Form_Name>"
21
+ * description={
22
+ * `The selected form <Form_Name> and all associated responses will be permanently deleted.
23
+ *
24
+ * Since, we won't be able to recover the deleted form we suggest you to archive the form.`
25
+ * }
26
+ * isArchiving={isArchiving}
27
+ * isDeleting={isDeleting}
28
+ * isOpen={showModal}
29
+ * title="Delete form?"
30
+ * onClose={() => setShowModal(false)}
31
+ * onDelete={async () => {
32
+ * setIsDeleting(true);
33
+ * await deleteProject(project.name);
34
+ * setShowModal(false);
35
+ * setIsDeleting(false);
36
+ * }}
37
+ * onArchive={async () => {
38
+ * setIsArchiving(true);
39
+ * await archiveProject(project.name);
40
+ * setShowModal(false);
41
+ * setIsArchiving(false);
42
+ * }}
43
+ * />
44
+ * );
45
+ * };
46
+ * @endexample
47
+ */
48
+ const DeleteArchiveModal: React.FC<{
49
+ checkboxLabel: string;
50
+ className: string;
51
+ description: string;
52
+ isArchiving: boolean;
53
+ isDeleting: boolean;
54
+ isOpen: boolean;
55
+ onArchive: Function;
56
+ onClose: Function;
57
+ onDelete: Function;
58
+ title: string;
59
+ }>;
60
+ export default DeleteArchiveModal;
@@ -28,7 +28,7 @@ type FieldOptions = {
28
28
  * return (
29
29
  * <EmailFormProvider>
30
30
  * {({ values }) => (
31
- * <div className="flex gap-2 p-6">
31
+ * <div className="flex flex-col gap-2 p-6 md:flex-row">
32
32
  * <EmailForm
33
33
  * showReplyToField
34
34
  * showSendToField
@@ -0,0 +1,33 @@
1
+ import React from "react";
2
+ import { DropdownProps } from "neetoui";
3
+ type Emoji = {
4
+ native: string;
5
+ unified: string;
6
+ };
7
+ /**
8
+ *
9
+ * A component to pick emojis.
10
+ *
11
+ * ![Screenshot](https://github.com/bigbinary/neeto-ui/assets/10956193/6238f165-3a55-4e66-bf4f-101971f80c80|height=200|width=300)
12
+ *
13
+ * @example
14
+ *
15
+ * import EmojiPicker from "@bigbinary/neeto-molecules/EmojiPicker";
16
+ *
17
+ * const EmojiPickerContainer = () => {
18
+ * const [emoji, setEmoji] = useState();
19
+ * return (
20
+ * <div>
21
+ * <div>Selected Emoji: {emoji}</div>
22
+ * <EmojiPicker onSelect={obj => setEmoji(obj.native)} />
23
+ * </div>
24
+ * );
25
+ * };
26
+ * @endexample
27
+ */
28
+ const EmojiPicker: React.FC<{
29
+ onSelect?: (emoji: Emoji) => void;
30
+ open?: boolean;
31
+ dropdownProps?: DropdownProps;
32
+ }>;
33
+ export default EmojiPicker;
@@ -0,0 +1,60 @@
1
+ import React from "react";
2
+ type Emoji = {
3
+ native: string;
4
+ unified: string;
5
+ };
6
+ type Reaction = {
7
+ native: string;
8
+ unified: string;
9
+ userName: string;
10
+ };
11
+ /**
12
+ *
13
+ * A component to group user selected emojis and display them.
14
+ *
15
+ * ![Screenshot](https://github.com/bigbinary/neeto-ui/assets/10956193/576abbd2-dd08-4535-a120-1e9b295850fb|height=200|width=300)
16
+ *
17
+ * @example
18
+ *
19
+ * import EmojiReactions from "@bigbinary/neeto-molecules/EmojiReactions";
20
+ * const EmojiReactionsContainer = () => {
21
+ * const [reactions, setReactions] = useState([
22
+ * { native: "😃", unified: "1f603", userName: "User 1" },
23
+ * { native: "😄", unified: "1f604", userName: "User 1" },
24
+ * ]);
25
+ *
26
+ * const createReaction = emoji => ({
27
+ * native: emoji.native,
28
+ * unified: emoji.unified,
29
+ * userName: user.name,
30
+ * userId: user.id,
31
+ * });
32
+ *
33
+ * const onReactionClick = emoji => {
34
+ * const reaction = findBy(
35
+ * { unified: emoji.unified, userId: user.id },
36
+ * reactions
37
+ * );
38
+ * if (reaction) {
39
+ * setReactions(reactions.filter(item => item.unified !== reaction.unified));
40
+ * } else {
41
+ * setReactions([...reactions, createReaction(emoji)]);
42
+ * }
43
+ * };
44
+ *
45
+ * return (
46
+ * <div>
47
+ * <EmojiReactions {...{ onReactionClick, reactions }} />
48
+ * </div>
49
+ * );
50
+ * };
51
+ * @endexample
52
+ */
53
+ const EmojiReactions: React.FC<{
54
+ reactions: Reaction[];
55
+ onReactionClick?: (emoji: Emoji) => void;
56
+ emojiSize?: string;
57
+ emojiBoxStyle?: string;
58
+ isUpdating?: boolean;
59
+ }>;
60
+ export default EmojiReactions;
@@ -14,5 +14,6 @@ const ErrorPage: React.FC<{
14
14
  status?: number;
15
15
  backToHomeButtonProps?: Partial<ButtonProps>;
16
16
  children?: React.ReactNode | React.ReactNode[];
17
+ showNeetoChatWidget?: boolean;
17
18
  }>;
18
19
  export default ErrorPage;
@@ -0,0 +1,56 @@
1
+ import React from "react";
2
+ import { AvatarProps } from "@bigbinary/neetoui";
3
+ type LinkType = {
4
+ onClick?: React.MouseEventHandler<HTMLButtonElement>;
5
+ label?: React.ReactNode;
6
+ icon?: any;
7
+ } & React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
8
+ interface ProfileInfo {
9
+ name?: string;
10
+ email?: string;
11
+ imageUrl?: string;
12
+ }
13
+ interface HelpLinks {
14
+ liveChatProps?: LinkType;
15
+ helpCenterProps?: LinkType;
16
+ changelogProps?: ChangeLogPropsType;
17
+ keyboardShortcutProps?: LinkType;
18
+ }
19
+ type FloatingActionMenuProps = {
20
+ profileInfoOverrides?: ProfileInfo & AvatarProps;
21
+ helpLinkOverrides?: HelpLinks;
22
+ showProductSwitcher?: boolean;
23
+ topLinks?: LinkType[];
24
+ bottomLinks?: LinkType[];
25
+ customContent?: React.ReactNode;
26
+ isThemeSwitcherEnabled?: boolean;
27
+ };
28
+ /**
29
+ *
30
+ * The FloatingActionMenu component provides access to options such as
31
+ *
32
+ * notifications, profile, app navigation links, what's new, product switcher and
33
+ *
34
+ * help center from anywhere in the app. The Product switcher UI & Changelog
35
+ *
36
+ * display UI are all implemented internally in this component.
37
+ *
38
+ * ![Screenshot](https://github.com/bigbinary/neeto-molecules/assets/12969853/07e3bcd1-ee9a-44cd-9230-017251627815|height=200|width=300)
39
+ *
40
+ * @example
41
+ *
42
+ * import FloatingActionMenu from "@bigbinary/neeto-molecules/FloatingActionMenu";
43
+ *
44
+ * const FloatingActionMenuContainer = ({ children }) => {
45
+ * // custom app logic
46
+ * return (
47
+ * <div>
48
+ * <FloatingActionMenu />
49
+ * {children}
50
+ * </div>
51
+ * );
52
+ * };
53
+ * @endexample
54
+ */
55
+ const FloatingActionMenu: React.FC<FloatingActionMenuProps>;
56
+ export default FloatingActionMenu;
package/types/Header.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
2
  import { SIZES } from "components/Header/constants";
3
3
  import { DropdownProps } from "neetoui";
4
+ import MoreDropdown from "./MoreDropdown";
4
5
  /**
5
6
  *
6
7
  * The Header component can be used to display the page title and an action block
@@ -26,6 +27,6 @@ const Header: React.FC<{
26
27
  link?: string;
27
28
  }[];
28
29
  size?: keyof typeof SIZES;
29
- renderDropdown?: (Dropdown: React.FC<DropdownProps>) => JSX.Element;
30
+ renderDropdown?: (Dropdown: MoreDropdown) => JSX.Element;
30
31
  }>;
31
32
  export default Header;