@bigbinary/neeto-molecules 1.1.16 → 1.1.17

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 +2291 -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,1835 @@
1
+ import * as React from 'react';
2
+ import React__default, { forwardRef, useRef } from 'react';
3
+ import { isNotEmpty, noop } from '@bigbinary/neeto-commons-frontend/pure';
4
+ import { Input as Input$1, Radio, Form, ActionBlock } from '@bigbinary/neetoui/formik';
5
+ import classnames from 'classnames';
6
+ import { MenuHorizontal, Search, Delete } from '@bigbinary/neeto-icons';
7
+ import { Typography, Dropdown as Dropdown$1, Input, Button, Label } from '@bigbinary/neetoui';
8
+ import { useTranslation } from 'react-i18next';
9
+ import { Link } from 'react-router-dom';
10
+ import { useFormikContext, ErrorMessage } from 'formik';
11
+ import { globalProps } from '@bigbinary/neeto-commons-frontend/initializers';
12
+ import { remove, isEmpty, identity } from 'ramda';
13
+ import { t as t$1 } from 'i18next';
14
+ import * as yup from 'yup';
15
+ import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
16
+ import { useQuery } from 'react-query';
17
+ import axios from 'axios';
18
+
19
+ var propTypes = {exports: {}};
20
+
21
+ var reactIs = {exports: {}};
22
+
23
+ var reactIs_production_min = {};
24
+
25
+ /** @license React v16.13.1
26
+ * react-is.production.min.js
27
+ *
28
+ * Copyright (c) Facebook, Inc. and its affiliates.
29
+ *
30
+ * This source code is licensed under the MIT license found in the
31
+ * LICENSE file in the root directory of this source tree.
32
+ */
33
+
34
+ var hasRequiredReactIs_production_min;
35
+
36
+ function requireReactIs_production_min () {
37
+ if (hasRequiredReactIs_production_min) return reactIs_production_min;
38
+ hasRequiredReactIs_production_min = 1;
39
+ var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
40
+ Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
41
+ function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}reactIs_production_min.AsyncMode=l;reactIs_production_min.ConcurrentMode=m;reactIs_production_min.ContextConsumer=k;reactIs_production_min.ContextProvider=h;reactIs_production_min.Element=c;reactIs_production_min.ForwardRef=n;reactIs_production_min.Fragment=e;reactIs_production_min.Lazy=t;reactIs_production_min.Memo=r;reactIs_production_min.Portal=d;
42
+ reactIs_production_min.Profiler=g;reactIs_production_min.StrictMode=f;reactIs_production_min.Suspense=p;reactIs_production_min.isAsyncMode=function(a){return A(a)||z(a)===l};reactIs_production_min.isConcurrentMode=A;reactIs_production_min.isContextConsumer=function(a){return z(a)===k};reactIs_production_min.isContextProvider=function(a){return z(a)===h};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};reactIs_production_min.isForwardRef=function(a){return z(a)===n};reactIs_production_min.isFragment=function(a){return z(a)===e};reactIs_production_min.isLazy=function(a){return z(a)===t};
43
+ reactIs_production_min.isMemo=function(a){return z(a)===r};reactIs_production_min.isPortal=function(a){return z(a)===d};reactIs_production_min.isProfiler=function(a){return z(a)===g};reactIs_production_min.isStrictMode=function(a){return z(a)===f};reactIs_production_min.isSuspense=function(a){return z(a)===p};
44
+ reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};reactIs_production_min.typeOf=z;
45
+ return reactIs_production_min;
46
+ }
47
+
48
+ var reactIs_development = {};
49
+
50
+ /** @license React v16.13.1
51
+ * react-is.development.js
52
+ *
53
+ * Copyright (c) Facebook, Inc. and its affiliates.
54
+ *
55
+ * This source code is licensed under the MIT license found in the
56
+ * LICENSE file in the root directory of this source tree.
57
+ */
58
+
59
+ var hasRequiredReactIs_development;
60
+
61
+ function requireReactIs_development () {
62
+ if (hasRequiredReactIs_development) return reactIs_development;
63
+ hasRequiredReactIs_development = 1;
64
+
65
+
66
+
67
+ if (process.env.NODE_ENV !== "production") {
68
+ (function() {
69
+
70
+ // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
71
+ // nor polyfill, then a plain number is used for performance.
72
+ var hasSymbol = typeof Symbol === 'function' && Symbol.for;
73
+ var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
74
+ var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
75
+ var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
76
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
77
+ var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
78
+ var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
79
+ var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
80
+ // (unstable) APIs that have been removed. Can we remove the symbols?
81
+
82
+ var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
83
+ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
84
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
85
+ var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
86
+ var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
87
+ var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
88
+ var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
89
+ var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
90
+ var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
91
+ var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
92
+ var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
93
+
94
+ function isValidElementType(type) {
95
+ return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
96
+ type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
97
+ }
98
+
99
+ function typeOf(object) {
100
+ if (typeof object === 'object' && object !== null) {
101
+ var $$typeof = object.$$typeof;
102
+
103
+ switch ($$typeof) {
104
+ case REACT_ELEMENT_TYPE:
105
+ var type = object.type;
106
+
107
+ switch (type) {
108
+ case REACT_ASYNC_MODE_TYPE:
109
+ case REACT_CONCURRENT_MODE_TYPE:
110
+ case REACT_FRAGMENT_TYPE:
111
+ case REACT_PROFILER_TYPE:
112
+ case REACT_STRICT_MODE_TYPE:
113
+ case REACT_SUSPENSE_TYPE:
114
+ return type;
115
+
116
+ default:
117
+ var $$typeofType = type && type.$$typeof;
118
+
119
+ switch ($$typeofType) {
120
+ case REACT_CONTEXT_TYPE:
121
+ case REACT_FORWARD_REF_TYPE:
122
+ case REACT_LAZY_TYPE:
123
+ case REACT_MEMO_TYPE:
124
+ case REACT_PROVIDER_TYPE:
125
+ return $$typeofType;
126
+
127
+ default:
128
+ return $$typeof;
129
+ }
130
+
131
+ }
132
+
133
+ case REACT_PORTAL_TYPE:
134
+ return $$typeof;
135
+ }
136
+ }
137
+
138
+ return undefined;
139
+ } // AsyncMode is deprecated along with isAsyncMode
140
+
141
+ var AsyncMode = REACT_ASYNC_MODE_TYPE;
142
+ var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
143
+ var ContextConsumer = REACT_CONTEXT_TYPE;
144
+ var ContextProvider = REACT_PROVIDER_TYPE;
145
+ var Element = REACT_ELEMENT_TYPE;
146
+ var ForwardRef = REACT_FORWARD_REF_TYPE;
147
+ var Fragment = REACT_FRAGMENT_TYPE;
148
+ var Lazy = REACT_LAZY_TYPE;
149
+ var Memo = REACT_MEMO_TYPE;
150
+ var Portal = REACT_PORTAL_TYPE;
151
+ var Profiler = REACT_PROFILER_TYPE;
152
+ var StrictMode = REACT_STRICT_MODE_TYPE;
153
+ var Suspense = REACT_SUSPENSE_TYPE;
154
+ var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
155
+
156
+ function isAsyncMode(object) {
157
+ {
158
+ if (!hasWarnedAboutDeprecatedIsAsyncMode) {
159
+ hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
160
+
161
+ console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
162
+ }
163
+ }
164
+
165
+ return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
166
+ }
167
+ function isConcurrentMode(object) {
168
+ return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
169
+ }
170
+ function isContextConsumer(object) {
171
+ return typeOf(object) === REACT_CONTEXT_TYPE;
172
+ }
173
+ function isContextProvider(object) {
174
+ return typeOf(object) === REACT_PROVIDER_TYPE;
175
+ }
176
+ function isElement(object) {
177
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
178
+ }
179
+ function isForwardRef(object) {
180
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
181
+ }
182
+ function isFragment(object) {
183
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
184
+ }
185
+ function isLazy(object) {
186
+ return typeOf(object) === REACT_LAZY_TYPE;
187
+ }
188
+ function isMemo(object) {
189
+ return typeOf(object) === REACT_MEMO_TYPE;
190
+ }
191
+ function isPortal(object) {
192
+ return typeOf(object) === REACT_PORTAL_TYPE;
193
+ }
194
+ function isProfiler(object) {
195
+ return typeOf(object) === REACT_PROFILER_TYPE;
196
+ }
197
+ function isStrictMode(object) {
198
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
199
+ }
200
+ function isSuspense(object) {
201
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
202
+ }
203
+
204
+ reactIs_development.AsyncMode = AsyncMode;
205
+ reactIs_development.ConcurrentMode = ConcurrentMode;
206
+ reactIs_development.ContextConsumer = ContextConsumer;
207
+ reactIs_development.ContextProvider = ContextProvider;
208
+ reactIs_development.Element = Element;
209
+ reactIs_development.ForwardRef = ForwardRef;
210
+ reactIs_development.Fragment = Fragment;
211
+ reactIs_development.Lazy = Lazy;
212
+ reactIs_development.Memo = Memo;
213
+ reactIs_development.Portal = Portal;
214
+ reactIs_development.Profiler = Profiler;
215
+ reactIs_development.StrictMode = StrictMode;
216
+ reactIs_development.Suspense = Suspense;
217
+ reactIs_development.isAsyncMode = isAsyncMode;
218
+ reactIs_development.isConcurrentMode = isConcurrentMode;
219
+ reactIs_development.isContextConsumer = isContextConsumer;
220
+ reactIs_development.isContextProvider = isContextProvider;
221
+ reactIs_development.isElement = isElement;
222
+ reactIs_development.isForwardRef = isForwardRef;
223
+ reactIs_development.isFragment = isFragment;
224
+ reactIs_development.isLazy = isLazy;
225
+ reactIs_development.isMemo = isMemo;
226
+ reactIs_development.isPortal = isPortal;
227
+ reactIs_development.isProfiler = isProfiler;
228
+ reactIs_development.isStrictMode = isStrictMode;
229
+ reactIs_development.isSuspense = isSuspense;
230
+ reactIs_development.isValidElementType = isValidElementType;
231
+ reactIs_development.typeOf = typeOf;
232
+ })();
233
+ }
234
+ return reactIs_development;
235
+ }
236
+
237
+ var hasRequiredReactIs;
238
+
239
+ function requireReactIs () {
240
+ if (hasRequiredReactIs) return reactIs.exports;
241
+ hasRequiredReactIs = 1;
242
+ (function (module) {
243
+
244
+ if (process.env.NODE_ENV === 'production') {
245
+ module.exports = requireReactIs_production_min();
246
+ } else {
247
+ module.exports = requireReactIs_development();
248
+ }
249
+ } (reactIs));
250
+ return reactIs.exports;
251
+ }
252
+
253
+ /*
254
+ object-assign
255
+ (c) Sindre Sorhus
256
+ @license MIT
257
+ */
258
+
259
+ var objectAssign;
260
+ var hasRequiredObjectAssign;
261
+
262
+ function requireObjectAssign () {
263
+ if (hasRequiredObjectAssign) return objectAssign;
264
+ hasRequiredObjectAssign = 1;
265
+ /* eslint-disable no-unused-vars */
266
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
267
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
268
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
269
+
270
+ function toObject(val) {
271
+ if (val === null || val === undefined) {
272
+ throw new TypeError('Object.assign cannot be called with null or undefined');
273
+ }
274
+
275
+ return Object(val);
276
+ }
277
+
278
+ function shouldUseNative() {
279
+ try {
280
+ if (!Object.assign) {
281
+ return false;
282
+ }
283
+
284
+ // Detect buggy property enumeration order in older V8 versions.
285
+
286
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
287
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
288
+ test1[5] = 'de';
289
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
290
+ return false;
291
+ }
292
+
293
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
294
+ var test2 = {};
295
+ for (var i = 0; i < 10; i++) {
296
+ test2['_' + String.fromCharCode(i)] = i;
297
+ }
298
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
299
+ return test2[n];
300
+ });
301
+ if (order2.join('') !== '0123456789') {
302
+ return false;
303
+ }
304
+
305
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
306
+ var test3 = {};
307
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
308
+ test3[letter] = letter;
309
+ });
310
+ if (Object.keys(Object.assign({}, test3)).join('') !==
311
+ 'abcdefghijklmnopqrst') {
312
+ return false;
313
+ }
314
+
315
+ return true;
316
+ } catch (err) {
317
+ // We don't expect any of the above to throw, but better to be safe.
318
+ return false;
319
+ }
320
+ }
321
+
322
+ objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
323
+ var from;
324
+ var to = toObject(target);
325
+ var symbols;
326
+
327
+ for (var s = 1; s < arguments.length; s++) {
328
+ from = Object(arguments[s]);
329
+
330
+ for (var key in from) {
331
+ if (hasOwnProperty.call(from, key)) {
332
+ to[key] = from[key];
333
+ }
334
+ }
335
+
336
+ if (getOwnPropertySymbols) {
337
+ symbols = getOwnPropertySymbols(from);
338
+ for (var i = 0; i < symbols.length; i++) {
339
+ if (propIsEnumerable.call(from, symbols[i])) {
340
+ to[symbols[i]] = from[symbols[i]];
341
+ }
342
+ }
343
+ }
344
+ }
345
+
346
+ return to;
347
+ };
348
+ return objectAssign;
349
+ }
350
+
351
+ /**
352
+ * Copyright (c) 2013-present, Facebook, Inc.
353
+ *
354
+ * This source code is licensed under the MIT license found in the
355
+ * LICENSE file in the root directory of this source tree.
356
+ */
357
+
358
+ var ReactPropTypesSecret_1;
359
+ var hasRequiredReactPropTypesSecret;
360
+
361
+ function requireReactPropTypesSecret () {
362
+ if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
363
+ hasRequiredReactPropTypesSecret = 1;
364
+
365
+ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
366
+
367
+ ReactPropTypesSecret_1 = ReactPropTypesSecret;
368
+ return ReactPropTypesSecret_1;
369
+ }
370
+
371
+ var has;
372
+ var hasRequiredHas;
373
+
374
+ function requireHas () {
375
+ if (hasRequiredHas) return has;
376
+ hasRequiredHas = 1;
377
+ has = Function.call.bind(Object.prototype.hasOwnProperty);
378
+ return has;
379
+ }
380
+
381
+ /**
382
+ * Copyright (c) 2013-present, Facebook, Inc.
383
+ *
384
+ * This source code is licensed under the MIT license found in the
385
+ * LICENSE file in the root directory of this source tree.
386
+ */
387
+
388
+ var checkPropTypes_1;
389
+ var hasRequiredCheckPropTypes;
390
+
391
+ function requireCheckPropTypes () {
392
+ if (hasRequiredCheckPropTypes) return checkPropTypes_1;
393
+ hasRequiredCheckPropTypes = 1;
394
+
395
+ var printWarning = function() {};
396
+
397
+ if (process.env.NODE_ENV !== 'production') {
398
+ var ReactPropTypesSecret = requireReactPropTypesSecret();
399
+ var loggedTypeFailures = {};
400
+ var has = requireHas();
401
+
402
+ printWarning = function(text) {
403
+ var message = 'Warning: ' + text;
404
+ if (typeof console !== 'undefined') {
405
+ console.error(message);
406
+ }
407
+ try {
408
+ // --- Welcome to debugging React ---
409
+ // This error was thrown as a convenience so that you can use this stack
410
+ // to find the callsite that caused this warning to fire.
411
+ throw new Error(message);
412
+ } catch (x) { /**/ }
413
+ };
414
+ }
415
+
416
+ /**
417
+ * Assert that the values match with the type specs.
418
+ * Error messages are memorized and will only be shown once.
419
+ *
420
+ * @param {object} typeSpecs Map of name to a ReactPropType
421
+ * @param {object} values Runtime values that need to be type-checked
422
+ * @param {string} location e.g. "prop", "context", "child context"
423
+ * @param {string} componentName Name of the component for error messages.
424
+ * @param {?Function} getStack Returns the component stack.
425
+ * @private
426
+ */
427
+ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
428
+ if (process.env.NODE_ENV !== 'production') {
429
+ for (var typeSpecName in typeSpecs) {
430
+ if (has(typeSpecs, typeSpecName)) {
431
+ var error;
432
+ // Prop type validation may throw. In case they do, we don't want to
433
+ // fail the render phase where it didn't fail before. So we log it.
434
+ // After these have been cleaned up, we'll let them throw.
435
+ try {
436
+ // This is intentionally an invariant that gets caught. It's the same
437
+ // behavior as without this statement except with a better message.
438
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
439
+ var err = Error(
440
+ (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
441
+ 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
442
+ 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
443
+ );
444
+ err.name = 'Invariant Violation';
445
+ throw err;
446
+ }
447
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
448
+ } catch (ex) {
449
+ error = ex;
450
+ }
451
+ if (error && !(error instanceof Error)) {
452
+ printWarning(
453
+ (componentName || 'React class') + ': type specification of ' +
454
+ location + ' `' + typeSpecName + '` is invalid; the type checker ' +
455
+ 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
456
+ 'You may have forgotten to pass an argument to the type checker ' +
457
+ 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
458
+ 'shape all require an argument).'
459
+ );
460
+ }
461
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
462
+ // Only monitor this failure once because there tends to be a lot of the
463
+ // same error.
464
+ loggedTypeFailures[error.message] = true;
465
+
466
+ var stack = getStack ? getStack() : '';
467
+
468
+ printWarning(
469
+ 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
470
+ );
471
+ }
472
+ }
473
+ }
474
+ }
475
+ }
476
+
477
+ /**
478
+ * Resets warning cache when testing.
479
+ *
480
+ * @private
481
+ */
482
+ checkPropTypes.resetWarningCache = function() {
483
+ if (process.env.NODE_ENV !== 'production') {
484
+ loggedTypeFailures = {};
485
+ }
486
+ };
487
+
488
+ checkPropTypes_1 = checkPropTypes;
489
+ return checkPropTypes_1;
490
+ }
491
+
492
+ /**
493
+ * Copyright (c) 2013-present, Facebook, Inc.
494
+ *
495
+ * This source code is licensed under the MIT license found in the
496
+ * LICENSE file in the root directory of this source tree.
497
+ */
498
+
499
+ var factoryWithTypeCheckers;
500
+ var hasRequiredFactoryWithTypeCheckers;
501
+
502
+ function requireFactoryWithTypeCheckers () {
503
+ if (hasRequiredFactoryWithTypeCheckers) return factoryWithTypeCheckers;
504
+ hasRequiredFactoryWithTypeCheckers = 1;
505
+
506
+ var ReactIs = requireReactIs();
507
+ var assign = requireObjectAssign();
508
+
509
+ var ReactPropTypesSecret = requireReactPropTypesSecret();
510
+ var has = requireHas();
511
+ var checkPropTypes = requireCheckPropTypes();
512
+
513
+ var printWarning = function() {};
514
+
515
+ if (process.env.NODE_ENV !== 'production') {
516
+ printWarning = function(text) {
517
+ var message = 'Warning: ' + text;
518
+ if (typeof console !== 'undefined') {
519
+ console.error(message);
520
+ }
521
+ try {
522
+ // --- Welcome to debugging React ---
523
+ // This error was thrown as a convenience so that you can use this stack
524
+ // to find the callsite that caused this warning to fire.
525
+ throw new Error(message);
526
+ } catch (x) {}
527
+ };
528
+ }
529
+
530
+ function emptyFunctionThatReturnsNull() {
531
+ return null;
532
+ }
533
+
534
+ factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
535
+ /* global Symbol */
536
+ var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
537
+ var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
538
+
539
+ /**
540
+ * Returns the iterator method function contained on the iterable object.
541
+ *
542
+ * Be sure to invoke the function with the iterable as context:
543
+ *
544
+ * var iteratorFn = getIteratorFn(myIterable);
545
+ * if (iteratorFn) {
546
+ * var iterator = iteratorFn.call(myIterable);
547
+ * ...
548
+ * }
549
+ *
550
+ * @param {?object} maybeIterable
551
+ * @return {?function}
552
+ */
553
+ function getIteratorFn(maybeIterable) {
554
+ var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
555
+ if (typeof iteratorFn === 'function') {
556
+ return iteratorFn;
557
+ }
558
+ }
559
+
560
+ /**
561
+ * Collection of methods that allow declaration and validation of props that are
562
+ * supplied to React components. Example usage:
563
+ *
564
+ * var Props = require('ReactPropTypes');
565
+ * var MyArticle = React.createClass({
566
+ * propTypes: {
567
+ * // An optional string prop named "description".
568
+ * description: Props.string,
569
+ *
570
+ * // A required enum prop named "category".
571
+ * category: Props.oneOf(['News','Photos']).isRequired,
572
+ *
573
+ * // A prop named "dialog" that requires an instance of Dialog.
574
+ * dialog: Props.instanceOf(Dialog).isRequired
575
+ * },
576
+ * render: function() { ... }
577
+ * });
578
+ *
579
+ * A more formal specification of how these methods are used:
580
+ *
581
+ * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
582
+ * decl := ReactPropTypes.{type}(.isRequired)?
583
+ *
584
+ * Each and every declaration produces a function with the same signature. This
585
+ * allows the creation of custom validation functions. For example:
586
+ *
587
+ * var MyLink = React.createClass({
588
+ * propTypes: {
589
+ * // An optional string or URI prop named "href".
590
+ * href: function(props, propName, componentName) {
591
+ * var propValue = props[propName];
592
+ * if (propValue != null && typeof propValue !== 'string' &&
593
+ * !(propValue instanceof URI)) {
594
+ * return new Error(
595
+ * 'Expected a string or an URI for ' + propName + ' in ' +
596
+ * componentName
597
+ * );
598
+ * }
599
+ * }
600
+ * },
601
+ * render: function() {...}
602
+ * });
603
+ *
604
+ * @internal
605
+ */
606
+
607
+ var ANONYMOUS = '<<anonymous>>';
608
+
609
+ // Important!
610
+ // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
611
+ var ReactPropTypes = {
612
+ array: createPrimitiveTypeChecker('array'),
613
+ bigint: createPrimitiveTypeChecker('bigint'),
614
+ bool: createPrimitiveTypeChecker('boolean'),
615
+ func: createPrimitiveTypeChecker('function'),
616
+ number: createPrimitiveTypeChecker('number'),
617
+ object: createPrimitiveTypeChecker('object'),
618
+ string: createPrimitiveTypeChecker('string'),
619
+ symbol: createPrimitiveTypeChecker('symbol'),
620
+
621
+ any: createAnyTypeChecker(),
622
+ arrayOf: createArrayOfTypeChecker,
623
+ element: createElementTypeChecker(),
624
+ elementType: createElementTypeTypeChecker(),
625
+ instanceOf: createInstanceTypeChecker,
626
+ node: createNodeChecker(),
627
+ objectOf: createObjectOfTypeChecker,
628
+ oneOf: createEnumTypeChecker,
629
+ oneOfType: createUnionTypeChecker,
630
+ shape: createShapeTypeChecker,
631
+ exact: createStrictShapeTypeChecker,
632
+ };
633
+
634
+ /**
635
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
636
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
637
+ */
638
+ /*eslint-disable no-self-compare*/
639
+ function is(x, y) {
640
+ // SameValue algorithm
641
+ if (x === y) {
642
+ // Steps 1-5, 7-10
643
+ // Steps 6.b-6.e: +0 != -0
644
+ return x !== 0 || 1 / x === 1 / y;
645
+ } else {
646
+ // Step 6.a: NaN == NaN
647
+ return x !== x && y !== y;
648
+ }
649
+ }
650
+ /*eslint-enable no-self-compare*/
651
+
652
+ /**
653
+ * We use an Error-like object for backward compatibility as people may call
654
+ * PropTypes directly and inspect their output. However, we don't use real
655
+ * Errors anymore. We don't inspect their stack anyway, and creating them
656
+ * is prohibitively expensive if they are created too often, such as what
657
+ * happens in oneOfType() for any type before the one that matched.
658
+ */
659
+ function PropTypeError(message, data) {
660
+ this.message = message;
661
+ this.data = data && typeof data === 'object' ? data: {};
662
+ this.stack = '';
663
+ }
664
+ // Make `instanceof Error` still work for returned errors.
665
+ PropTypeError.prototype = Error.prototype;
666
+
667
+ function createChainableTypeChecker(validate) {
668
+ if (process.env.NODE_ENV !== 'production') {
669
+ var manualPropTypeCallCache = {};
670
+ var manualPropTypeWarningCount = 0;
671
+ }
672
+ function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
673
+ componentName = componentName || ANONYMOUS;
674
+ propFullName = propFullName || propName;
675
+
676
+ if (secret !== ReactPropTypesSecret) {
677
+ if (throwOnDirectAccess) {
678
+ // New behavior only for users of `prop-types` package
679
+ var err = new Error(
680
+ 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
681
+ 'Use `PropTypes.checkPropTypes()` to call them. ' +
682
+ 'Read more at http://fb.me/use-check-prop-types'
683
+ );
684
+ err.name = 'Invariant Violation';
685
+ throw err;
686
+ } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
687
+ // Old behavior for people using React.PropTypes
688
+ var cacheKey = componentName + ':' + propName;
689
+ if (
690
+ !manualPropTypeCallCache[cacheKey] &&
691
+ // Avoid spamming the console because they are often not actionable except for lib authors
692
+ manualPropTypeWarningCount < 3
693
+ ) {
694
+ printWarning(
695
+ 'You are manually calling a React.PropTypes validation ' +
696
+ 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
697
+ 'and will throw in the standalone `prop-types` package. ' +
698
+ 'You may be seeing this warning due to a third-party PropTypes ' +
699
+ 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
700
+ );
701
+ manualPropTypeCallCache[cacheKey] = true;
702
+ manualPropTypeWarningCount++;
703
+ }
704
+ }
705
+ }
706
+ if (props[propName] == null) {
707
+ if (isRequired) {
708
+ if (props[propName] === null) {
709
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
710
+ }
711
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
712
+ }
713
+ return null;
714
+ } else {
715
+ return validate(props, propName, componentName, location, propFullName);
716
+ }
717
+ }
718
+
719
+ var chainedCheckType = checkType.bind(null, false);
720
+ chainedCheckType.isRequired = checkType.bind(null, true);
721
+
722
+ return chainedCheckType;
723
+ }
724
+
725
+ function createPrimitiveTypeChecker(expectedType) {
726
+ function validate(props, propName, componentName, location, propFullName, secret) {
727
+ var propValue = props[propName];
728
+ var propType = getPropType(propValue);
729
+ if (propType !== expectedType) {
730
+ // `propValue` being instance of, say, date/regexp, pass the 'object'
731
+ // check, but we can offer a more precise error message here rather than
732
+ // 'of type `object`'.
733
+ var preciseType = getPreciseType(propValue);
734
+
735
+ return new PropTypeError(
736
+ 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
737
+ {expectedType: expectedType}
738
+ );
739
+ }
740
+ return null;
741
+ }
742
+ return createChainableTypeChecker(validate);
743
+ }
744
+
745
+ function createAnyTypeChecker() {
746
+ return createChainableTypeChecker(emptyFunctionThatReturnsNull);
747
+ }
748
+
749
+ function createArrayOfTypeChecker(typeChecker) {
750
+ function validate(props, propName, componentName, location, propFullName) {
751
+ if (typeof typeChecker !== 'function') {
752
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
753
+ }
754
+ var propValue = props[propName];
755
+ if (!Array.isArray(propValue)) {
756
+ var propType = getPropType(propValue);
757
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
758
+ }
759
+ for (var i = 0; i < propValue.length; i++) {
760
+ var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
761
+ if (error instanceof Error) {
762
+ return error;
763
+ }
764
+ }
765
+ return null;
766
+ }
767
+ return createChainableTypeChecker(validate);
768
+ }
769
+
770
+ function createElementTypeChecker() {
771
+ function validate(props, propName, componentName, location, propFullName) {
772
+ var propValue = props[propName];
773
+ if (!isValidElement(propValue)) {
774
+ var propType = getPropType(propValue);
775
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
776
+ }
777
+ return null;
778
+ }
779
+ return createChainableTypeChecker(validate);
780
+ }
781
+
782
+ function createElementTypeTypeChecker() {
783
+ function validate(props, propName, componentName, location, propFullName) {
784
+ var propValue = props[propName];
785
+ if (!ReactIs.isValidElementType(propValue)) {
786
+ var propType = getPropType(propValue);
787
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
788
+ }
789
+ return null;
790
+ }
791
+ return createChainableTypeChecker(validate);
792
+ }
793
+
794
+ function createInstanceTypeChecker(expectedClass) {
795
+ function validate(props, propName, componentName, location, propFullName) {
796
+ if (!(props[propName] instanceof expectedClass)) {
797
+ var expectedClassName = expectedClass.name || ANONYMOUS;
798
+ var actualClassName = getClassName(props[propName]);
799
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
800
+ }
801
+ return null;
802
+ }
803
+ return createChainableTypeChecker(validate);
804
+ }
805
+
806
+ function createEnumTypeChecker(expectedValues) {
807
+ if (!Array.isArray(expectedValues)) {
808
+ if (process.env.NODE_ENV !== 'production') {
809
+ if (arguments.length > 1) {
810
+ printWarning(
811
+ 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
812
+ 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
813
+ );
814
+ } else {
815
+ printWarning('Invalid argument supplied to oneOf, expected an array.');
816
+ }
817
+ }
818
+ return emptyFunctionThatReturnsNull;
819
+ }
820
+
821
+ function validate(props, propName, componentName, location, propFullName) {
822
+ var propValue = props[propName];
823
+ for (var i = 0; i < expectedValues.length; i++) {
824
+ if (is(propValue, expectedValues[i])) {
825
+ return null;
826
+ }
827
+ }
828
+
829
+ var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
830
+ var type = getPreciseType(value);
831
+ if (type === 'symbol') {
832
+ return String(value);
833
+ }
834
+ return value;
835
+ });
836
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
837
+ }
838
+ return createChainableTypeChecker(validate);
839
+ }
840
+
841
+ function createObjectOfTypeChecker(typeChecker) {
842
+ function validate(props, propName, componentName, location, propFullName) {
843
+ if (typeof typeChecker !== 'function') {
844
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
845
+ }
846
+ var propValue = props[propName];
847
+ var propType = getPropType(propValue);
848
+ if (propType !== 'object') {
849
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
850
+ }
851
+ for (var key in propValue) {
852
+ if (has(propValue, key)) {
853
+ var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
854
+ if (error instanceof Error) {
855
+ return error;
856
+ }
857
+ }
858
+ }
859
+ return null;
860
+ }
861
+ return createChainableTypeChecker(validate);
862
+ }
863
+
864
+ function createUnionTypeChecker(arrayOfTypeCheckers) {
865
+ if (!Array.isArray(arrayOfTypeCheckers)) {
866
+ process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
867
+ return emptyFunctionThatReturnsNull;
868
+ }
869
+
870
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
871
+ var checker = arrayOfTypeCheckers[i];
872
+ if (typeof checker !== 'function') {
873
+ printWarning(
874
+ 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
875
+ 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
876
+ );
877
+ return emptyFunctionThatReturnsNull;
878
+ }
879
+ }
880
+
881
+ function validate(props, propName, componentName, location, propFullName) {
882
+ var expectedTypes = [];
883
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
884
+ var checker = arrayOfTypeCheckers[i];
885
+ var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
886
+ if (checkerResult == null) {
887
+ return null;
888
+ }
889
+ if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
890
+ expectedTypes.push(checkerResult.data.expectedType);
891
+ }
892
+ }
893
+ var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
894
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
895
+ }
896
+ return createChainableTypeChecker(validate);
897
+ }
898
+
899
+ function createNodeChecker() {
900
+ function validate(props, propName, componentName, location, propFullName) {
901
+ if (!isNode(props[propName])) {
902
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
903
+ }
904
+ return null;
905
+ }
906
+ return createChainableTypeChecker(validate);
907
+ }
908
+
909
+ function invalidValidatorError(componentName, location, propFullName, key, type) {
910
+ return new PropTypeError(
911
+ (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
912
+ 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
913
+ );
914
+ }
915
+
916
+ function createShapeTypeChecker(shapeTypes) {
917
+ function validate(props, propName, componentName, location, propFullName) {
918
+ var propValue = props[propName];
919
+ var propType = getPropType(propValue);
920
+ if (propType !== 'object') {
921
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
922
+ }
923
+ for (var key in shapeTypes) {
924
+ var checker = shapeTypes[key];
925
+ if (typeof checker !== 'function') {
926
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
927
+ }
928
+ var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
929
+ if (error) {
930
+ return error;
931
+ }
932
+ }
933
+ return null;
934
+ }
935
+ return createChainableTypeChecker(validate);
936
+ }
937
+
938
+ function createStrictShapeTypeChecker(shapeTypes) {
939
+ function validate(props, propName, componentName, location, propFullName) {
940
+ var propValue = props[propName];
941
+ var propType = getPropType(propValue);
942
+ if (propType !== 'object') {
943
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
944
+ }
945
+ // We need to check all keys in case some are required but missing from props.
946
+ var allKeys = assign({}, props[propName], shapeTypes);
947
+ for (var key in allKeys) {
948
+ var checker = shapeTypes[key];
949
+ if (has(shapeTypes, key) && typeof checker !== 'function') {
950
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
951
+ }
952
+ if (!checker) {
953
+ return new PropTypeError(
954
+ 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
955
+ '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
956
+ '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
957
+ );
958
+ }
959
+ var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
960
+ if (error) {
961
+ return error;
962
+ }
963
+ }
964
+ return null;
965
+ }
966
+
967
+ return createChainableTypeChecker(validate);
968
+ }
969
+
970
+ function isNode(propValue) {
971
+ switch (typeof propValue) {
972
+ case 'number':
973
+ case 'string':
974
+ case 'undefined':
975
+ return true;
976
+ case 'boolean':
977
+ return !propValue;
978
+ case 'object':
979
+ if (Array.isArray(propValue)) {
980
+ return propValue.every(isNode);
981
+ }
982
+ if (propValue === null || isValidElement(propValue)) {
983
+ return true;
984
+ }
985
+
986
+ var iteratorFn = getIteratorFn(propValue);
987
+ if (iteratorFn) {
988
+ var iterator = iteratorFn.call(propValue);
989
+ var step;
990
+ if (iteratorFn !== propValue.entries) {
991
+ while (!(step = iterator.next()).done) {
992
+ if (!isNode(step.value)) {
993
+ return false;
994
+ }
995
+ }
996
+ } else {
997
+ // Iterator will provide entry [k,v] tuples rather than values.
998
+ while (!(step = iterator.next()).done) {
999
+ var entry = step.value;
1000
+ if (entry) {
1001
+ if (!isNode(entry[1])) {
1002
+ return false;
1003
+ }
1004
+ }
1005
+ }
1006
+ }
1007
+ } else {
1008
+ return false;
1009
+ }
1010
+
1011
+ return true;
1012
+ default:
1013
+ return false;
1014
+ }
1015
+ }
1016
+
1017
+ function isSymbol(propType, propValue) {
1018
+ // Native Symbol.
1019
+ if (propType === 'symbol') {
1020
+ return true;
1021
+ }
1022
+
1023
+ // falsy value can't be a Symbol
1024
+ if (!propValue) {
1025
+ return false;
1026
+ }
1027
+
1028
+ // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
1029
+ if (propValue['@@toStringTag'] === 'Symbol') {
1030
+ return true;
1031
+ }
1032
+
1033
+ // Fallback for non-spec compliant Symbols which are polyfilled.
1034
+ if (typeof Symbol === 'function' && propValue instanceof Symbol) {
1035
+ return true;
1036
+ }
1037
+
1038
+ return false;
1039
+ }
1040
+
1041
+ // Equivalent of `typeof` but with special handling for array and regexp.
1042
+ function getPropType(propValue) {
1043
+ var propType = typeof propValue;
1044
+ if (Array.isArray(propValue)) {
1045
+ return 'array';
1046
+ }
1047
+ if (propValue instanceof RegExp) {
1048
+ // Old webkits (at least until Android 4.0) return 'function' rather than
1049
+ // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
1050
+ // passes PropTypes.object.
1051
+ return 'object';
1052
+ }
1053
+ if (isSymbol(propType, propValue)) {
1054
+ return 'symbol';
1055
+ }
1056
+ return propType;
1057
+ }
1058
+
1059
+ // This handles more types than `getPropType`. Only used for error messages.
1060
+ // See `createPrimitiveTypeChecker`.
1061
+ function getPreciseType(propValue) {
1062
+ if (typeof propValue === 'undefined' || propValue === null) {
1063
+ return '' + propValue;
1064
+ }
1065
+ var propType = getPropType(propValue);
1066
+ if (propType === 'object') {
1067
+ if (propValue instanceof Date) {
1068
+ return 'date';
1069
+ } else if (propValue instanceof RegExp) {
1070
+ return 'regexp';
1071
+ }
1072
+ }
1073
+ return propType;
1074
+ }
1075
+
1076
+ // Returns a string that is postfixed to a warning about an invalid type.
1077
+ // For example, "undefined" or "of type array"
1078
+ function getPostfixForTypeWarning(value) {
1079
+ var type = getPreciseType(value);
1080
+ switch (type) {
1081
+ case 'array':
1082
+ case 'object':
1083
+ return 'an ' + type;
1084
+ case 'boolean':
1085
+ case 'date':
1086
+ case 'regexp':
1087
+ return 'a ' + type;
1088
+ default:
1089
+ return type;
1090
+ }
1091
+ }
1092
+
1093
+ // Returns class name of the object, if any.
1094
+ function getClassName(propValue) {
1095
+ if (!propValue.constructor || !propValue.constructor.name) {
1096
+ return ANONYMOUS;
1097
+ }
1098
+ return propValue.constructor.name;
1099
+ }
1100
+
1101
+ ReactPropTypes.checkPropTypes = checkPropTypes;
1102
+ ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
1103
+ ReactPropTypes.PropTypes = ReactPropTypes;
1104
+
1105
+ return ReactPropTypes;
1106
+ };
1107
+ return factoryWithTypeCheckers;
1108
+ }
1109
+
1110
+ /**
1111
+ * Copyright (c) 2013-present, Facebook, Inc.
1112
+ *
1113
+ * This source code is licensed under the MIT license found in the
1114
+ * LICENSE file in the root directory of this source tree.
1115
+ */
1116
+
1117
+ var factoryWithThrowingShims;
1118
+ var hasRequiredFactoryWithThrowingShims;
1119
+
1120
+ function requireFactoryWithThrowingShims () {
1121
+ if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
1122
+ hasRequiredFactoryWithThrowingShims = 1;
1123
+
1124
+ var ReactPropTypesSecret = requireReactPropTypesSecret();
1125
+
1126
+ function emptyFunction() {}
1127
+ function emptyFunctionWithReset() {}
1128
+ emptyFunctionWithReset.resetWarningCache = emptyFunction;
1129
+
1130
+ factoryWithThrowingShims = function() {
1131
+ function shim(props, propName, componentName, location, propFullName, secret) {
1132
+ if (secret === ReactPropTypesSecret) {
1133
+ // It is still safe when called from React.
1134
+ return;
1135
+ }
1136
+ var err = new Error(
1137
+ 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
1138
+ 'Use PropTypes.checkPropTypes() to call them. ' +
1139
+ 'Read more at http://fb.me/use-check-prop-types'
1140
+ );
1141
+ err.name = 'Invariant Violation';
1142
+ throw err;
1143
+ } shim.isRequired = shim;
1144
+ function getShim() {
1145
+ return shim;
1146
+ } // Important!
1147
+ // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
1148
+ var ReactPropTypes = {
1149
+ array: shim,
1150
+ bigint: shim,
1151
+ bool: shim,
1152
+ func: shim,
1153
+ number: shim,
1154
+ object: shim,
1155
+ string: shim,
1156
+ symbol: shim,
1157
+
1158
+ any: shim,
1159
+ arrayOf: getShim,
1160
+ element: shim,
1161
+ elementType: shim,
1162
+ instanceOf: getShim,
1163
+ node: shim,
1164
+ objectOf: getShim,
1165
+ oneOf: getShim,
1166
+ oneOfType: getShim,
1167
+ shape: getShim,
1168
+ exact: getShim,
1169
+
1170
+ checkPropTypes: emptyFunctionWithReset,
1171
+ resetWarningCache: emptyFunction
1172
+ };
1173
+
1174
+ ReactPropTypes.PropTypes = ReactPropTypes;
1175
+
1176
+ return ReactPropTypes;
1177
+ };
1178
+ return factoryWithThrowingShims;
1179
+ }
1180
+
1181
+ /**
1182
+ * Copyright (c) 2013-present, Facebook, Inc.
1183
+ *
1184
+ * This source code is licensed under the MIT license found in the
1185
+ * LICENSE file in the root directory of this source tree.
1186
+ */
1187
+
1188
+ if (process.env.NODE_ENV !== 'production') {
1189
+ var ReactIs = requireReactIs();
1190
+
1191
+ // By explicitly using `prop-types` you are opting into new development behavior.
1192
+ // http://fb.me/prop-types-in-prod
1193
+ var throwOnDirectAccess = true;
1194
+ propTypes.exports = requireFactoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
1195
+ } else {
1196
+ // By explicitly using `prop-types` you are opting into new production behavior.
1197
+ // http://fb.me/prop-types-in-prod
1198
+ propTypes.exports = requireFactoryWithThrowingShims()();
1199
+ }
1200
+
1201
+ 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}}
1202
+
1203
+ var css$3 = ".neeto-molecules-container{align-items:flex-start;display:flex;flex-direction:column;flex-grow:1;height:100vh;justify-content:flex-start;overflow-y:auto;padding:0 40px!important}.neeto-molecules-container--header-fixed{padding:0!important}.neeto-molecules-container--header-fixed>.neeto-molecules-header,.neeto-molecules-container--header-fixed>.neeto-molecules-scrollable,.neeto-molecules-container--header-fixed>.neeto-molecules-subheader{padding-left:40px!important;padding-right:40px!important}";
1204
+ n(css$3,{});
1205
+
1206
+ var Container = /*#__PURE__*/forwardRef(function (_ref, ref) {
1207
+ var _ref$isHeaderFixed = _ref.isHeaderFixed,
1208
+ isHeaderFixed = _ref$isHeaderFixed === void 0 ? false : _ref$isHeaderFixed,
1209
+ children = _ref.children;
1210
+ return /*#__PURE__*/React__default.createElement("div", {
1211
+ ref: ref,
1212
+ className: classnames("neeto-molecules-container", {
1213
+ "neeto-molecules-container--header-fixed": isHeaderFixed
1214
+ })
1215
+ }, children);
1216
+ });
1217
+ Container.displayName = "Container";
1218
+ Container.propTypes = {
1219
+ /**
1220
+ * Decides whether the `Header` component should be stickied at the top on scroll.
1221
+ */
1222
+ isHeaderFixed: propTypes.exports.bool
1223
+ };
1224
+
1225
+ function _extends$1() {
1226
+ _extends$1 = Object.assign ? Object.assign.bind() : function (target) {
1227
+ for (var i = 1; i < arguments.length; i++) {
1228
+ var source = arguments[i];
1229
+ for (var key in source) {
1230
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
1231
+ target[key] = source[key];
1232
+ }
1233
+ }
1234
+ }
1235
+ return target;
1236
+ };
1237
+ return _extends$1.apply(this, arguments);
1238
+ }
1239
+
1240
+ var css$2 = ":root{--neeto-molecules-main-header-height:98px;--neeto-molecules-main-header-with-breadcrumbs-height:170px}.neeto-molecules-header{align-items:flex-start!important;background:rgb(var(--neeto-ui-white));display:flex;flex-direction:row;justify-content:space-between;min-height:98px;min-height:var(--neeto-molecules-main-header-height);padding:40px 0 24px!important;width:100%}.neeto-molecules-header .neeto-molecules-header__toggle-menubar-btn{margin-right:8px}.neeto-molecules-header .neeto-molecules-header__left{align-items:flex-start!important;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start}.neeto-molecules-header .neeto-molecules-header__left-data-wrap{display:flex;flex-wrap:wrap}.neeto-molecules-header .neeto-molecules-header__page-title{align-items:center;display:flex;flex-direction:row;gap:12px;margin-top:-16px;width:100%}.neeto-molecules-header .neeto-molecules-header__page-title h2{font-size:40px;line-height:var(--neeto-ui-leading-tight)}.neeto-molecules-header .neeto-molecules-header__breadcrumbs-wrap{display:flex;margin:0 0 40px}.neeto-molecules-header .neeto-molecules-header__breadcrumb{align-items:center;display:flex;flex-direction:row;justify-content:flex-start;line-height:1}.neeto-molecules-header .neeto-molecules-header__breadcrumb a{text-decoration:none;transition:all .3s ease-in-out}.neeto-molecules-header .neeto-molecules-header__breadcrumb a:focus-visible{border-radius:var(--neeto-ui-rounded-sm);outline:3px solid rgba(var(--neeto-ui-primary-500),50%)}.neeto-molecules-header .neeto-molecules-header__breadcrumb-separator{font-size:12px;line-height:16px;margin:0 12px!important}.neeto-molecules-header .neeto-molecules-header__right{align-items:center;display:flex;flex-direction:row;justify-content:flex-end}.neeto-molecules-header--has-breadcrumbs{min-height:170px;min-height:var(--neeto-molecules-main-header-with-breadcrumbs-height)}.neeto-molecules-header--has-breadcrumbs .neeto-molecules-header__page-title{margin-top:0}.neeto-molecules-header--nano,.neeto-molecules-header--small{flex-shrink:0;min-height:0}.neeto-molecules-header--nano .neeto-molecules-header__breadcrumbs-wrap,.neeto-molecules-header--small .neeto-molecules-header__breadcrumbs-wrap{margin:0 0 16px}.neeto-molecules-header--small .neeto-molecules-header__page-title{margin-top:-4px}.neeto-molecules-header--small .neeto-molecules-header__page-title h2{font-size:32px}.neeto-molecules-header--nano .neeto-molecules-header__page-title{margin-top:0}.neeto-molecules-header--nano .neeto-molecules-header__page-title h2{font-size:24px}";
1241
+ n(css$2,{});
1242
+
1243
+ var Breadcrumbs = function Breadcrumbs(_ref) {
1244
+ var breadcrumbs = _ref.breadcrumbs;
1245
+ return /*#__PURE__*/React__default.createElement("div", {
1246
+ className: "neeto-molecules-header__breadcrumbs-wrap"
1247
+ }, breadcrumbs.map(function (_ref2, index) {
1248
+ var text = _ref2.text,
1249
+ _ref2$link = _ref2.link,
1250
+ link = _ref2$link === void 0 ? "#" : _ref2$link;
1251
+ return /*#__PURE__*/React__default.createElement("div", {
1252
+ className: "neeto-molecules-header__breadcrumb",
1253
+ "data-cy": "header-breadcrumb",
1254
+ key: index
1255
+ }, /*#__PURE__*/React__default.createElement(Link, {
1256
+ to: link
1257
+ }, /*#__PURE__*/React__default.createElement(Typography, {
1258
+ className: "neeto-ui-text-gray-700 hover:neeto-ui-text-gray-800 neeto-molecules-header__breadcrumb-link",
1259
+ component: "span",
1260
+ "data-cy": text,
1261
+ "data-test-id": text,
1262
+ style: "body2",
1263
+ weight: "normal"
1264
+ }, text)), index !== breadcrumbs.length - 1 && /*#__PURE__*/React__default.createElement("span", {
1265
+ className: "neeto-molecules-header__breadcrumb-separator neeto-ui-text-black"
1266
+ }, "/"));
1267
+ }));
1268
+ };
1269
+ var Breadcrumbs$1 = /*#__PURE__*/React__default.memo(Breadcrumbs);
1270
+
1271
+ var SIZES$1 = {
1272
+ nano: "nano",
1273
+ small: "small",
1274
+ large: "large"
1275
+ };
1276
+
1277
+ var Dropdown = function Dropdown(props) {
1278
+ return /*#__PURE__*/React__default.createElement(Dropdown$1, _extends$1({
1279
+ buttonStyle: "text",
1280
+ icon: MenuHorizontal,
1281
+ position: "bottom-end"
1282
+ }, props));
1283
+ };
1284
+
1285
+ var Header = function Header(_ref) {
1286
+ var title = _ref.title,
1287
+ searchProps = _ref.searchProps,
1288
+ _ref$className = _ref.className,
1289
+ className = _ref$className === void 0 ? "" : _ref$className,
1290
+ actionBlock = _ref.actionBlock,
1291
+ _ref$breadcrumbs = _ref.breadcrumbs,
1292
+ breadcrumbs = _ref$breadcrumbs === void 0 ? [] : _ref$breadcrumbs,
1293
+ _ref$renderDropdown = _ref.renderDropdown,
1294
+ renderDropdown = _ref$renderDropdown === void 0 ? noop : _ref$renderDropdown,
1295
+ _ref$size = _ref.size,
1296
+ size = _ref$size === void 0 ? "large" : _ref$size,
1297
+ _ref$dataTestid = _ref["data-testid"],
1298
+ dataTestId = _ref$dataTestid === void 0 ? "neeto-molecules-header" : _ref$dataTestid;
1299
+ var searchRef = useRef(null);
1300
+ var _useTranslation = useTranslation(),
1301
+ t = _useTranslation.t;
1302
+ return /*#__PURE__*/React__default.createElement("div", {
1303
+ "data-testid": dataTestId,
1304
+ className: classnames(["neeto-molecules-header", {
1305
+ "neeto-molecules-header--has-breadcrumbs": isNotEmpty(breadcrumbs),
1306
+ "neeto-molecules-header--large": size === SIZES$1.large,
1307
+ "neeto-molecules-header--small": size === SIZES$1.small,
1308
+ "neeto-molecules-header--nano": size === SIZES$1.nano
1309
+ }, className])
1310
+ }, /*#__PURE__*/React__default.createElement("div", {
1311
+ className: "neeto-molecules-header__left"
1312
+ }, /*#__PURE__*/React__default.createElement("div", {
1313
+ className: "neeto-molecules-header__left-data-wrap"
1314
+ }, isNotEmpty(breadcrumbs) && /*#__PURE__*/React__default.createElement(Breadcrumbs$1, {
1315
+ breadcrumbs: breadcrumbs
1316
+ }), /*#__PURE__*/React__default.createElement("div", {
1317
+ className: "neeto-molecules-header__page-title"
1318
+ }, /*#__PURE__*/React__default.createElement(Typography, {
1319
+ "data-cy": "main-header",
1320
+ "data-test-id": "main-header",
1321
+ lineHeight: "tight",
1322
+ style: "h2",
1323
+ weight: "semibold"
1324
+ }, title), renderDropdown(Dropdown)))), /*#__PURE__*/React__default.createElement("div", {
1325
+ className: "neeto-ui-gap-3 neeto-molecules-header__right"
1326
+ }, searchProps && /*#__PURE__*/React__default.createElement(Input, _extends$1({
1327
+ placeholder: t("neetoMolecules.common.actions.search"),
1328
+ prefix: /*#__PURE__*/React__default.createElement(Search, null),
1329
+ ref: searchRef,
1330
+ type: "search",
1331
+ className: classnames(["neeto-molecules-header__search-input", searchProps.className])
1332
+ }, searchProps)), actionBlock));
1333
+ };
1334
+
1335
+ function _objectWithoutPropertiesLoose(source, excluded) {
1336
+ if (source == null) return {};
1337
+ var target = {};
1338
+ var sourceKeys = Object.keys(source);
1339
+ var key, i;
1340
+ for (i = 0; i < sourceKeys.length; i++) {
1341
+ key = sourceKeys[i];
1342
+ if (excluded.indexOf(key) >= 0) continue;
1343
+ target[key] = source[key];
1344
+ }
1345
+ return target;
1346
+ }
1347
+
1348
+ function _objectWithoutProperties(source, excluded) {
1349
+ if (source == null) return {};
1350
+ var target = _objectWithoutPropertiesLoose(source, excluded);
1351
+ var key, i;
1352
+ if (Object.getOwnPropertySymbols) {
1353
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
1354
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
1355
+ key = sourceSymbolKeys[i];
1356
+ if (excluded.indexOf(key) >= 0) continue;
1357
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
1358
+ target[key] = source[key];
1359
+ }
1360
+ }
1361
+ return target;
1362
+ }
1363
+
1364
+ var _path, _path2, _g, _defs;
1365
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1366
+ var SvgNeeto = function SvgNeeto(props) {
1367
+ return /*#__PURE__*/React.createElement("svg", _extends({
1368
+ width: 50,
1369
+ height: 50,
1370
+ viewBox: "0 0 415 415",
1371
+ fill: "none",
1372
+ xmlns: "http://www.w3.org/2000/svg"
1373
+ }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
1374
+ d: "M414.989 207.495C414.989 92.899 322.091 0 207.495 0H0v414.989h414.989V207.495Z",
1375
+ fill: "#0043AC"
1376
+ })), /*#__PURE__*/React.createElement("mask", {
1377
+ id: "neeto_svg__a",
1378
+ style: {
1379
+ maskType: "alpha"
1380
+ },
1381
+ maskUnits: "userSpaceOnUse",
1382
+ x: 0,
1383
+ y: 0,
1384
+ width: 415,
1385
+ height: 415
1386
+ }, _path2 || (_path2 = /*#__PURE__*/React.createElement("path", {
1387
+ d: "M414.989 207.495C414.989 92.899 322.091 0 207.495 0H0v414.989h414.989V207.495Z",
1388
+ fill: "#0043AC"
1389
+ }))), _g || (_g = /*#__PURE__*/React.createElement("g", {
1390
+ mask: "url(#neeto_svg__a)"
1391
+ }, /*#__PURE__*/React.createElement("path", {
1392
+ d: "M233.747 348.74c88.579 101.145 172.015 116.411 202.661 111.401v32.491H-8.032V230.487c43.685-2.726 153.2 17.108 241.779 118.253Z",
1393
+ fill: "url(#neeto_svg__b)"
1394
+ }))), _defs || (_defs = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("radialGradient", {
1395
+ id: "neeto_svg__b",
1396
+ cx: 0,
1397
+ cy: 0,
1398
+ r: 1,
1399
+ gradientUnits: "userSpaceOnUse",
1400
+ gradientTransform: "rotate(47.118 -220.556 214.818) scale(427.964 725.049)"
1401
+ }, /*#__PURE__*/React.createElement("stop", {
1402
+ stopColor: "#0043AC"
1403
+ }), /*#__PURE__*/React.createElement("stop", {
1404
+ offset: 1,
1405
+ stopColor: "#3DB1CA",
1406
+ stopOpacity: 0.8
1407
+ })))));
1408
+ };
1409
+
1410
+ var css$1 = ".neeto-molecules-pageloader__wrapper{height:100%;position:relative;width:100%}.neeto-molecules-pageloader__wrapper .neeto-molecules-pageloader{height:100%;left:0;position:absolute;top:0;width:100%}.neeto-molecules-pageloader__wrapper .neeto-molecules-pageloader__content{height:66px;margin-bottom:16px;overflow:hidden;padding:8px;position:relative;width:66px}.neeto-molecules-pageloader__wrapper .neeto-molecules-pageloader__text{color:rgb(var(--neeto-ui-gray-800));font-size:1.25rem;line-height:1.75rem;margin-bottom:4rem;text-align:center}.neeto-molecules-pageloader__spinner{display:flex;gap:2px;height:25px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.neeto-molecules-pageloader__spinner>div{animation:neeto-ui-stretch-delay 1.2s ease-in-out infinite;background-color:#fff;border-radius:2px;display:inline-flex;height:100%;width:2px}.neeto-molecules-pageloader__spinner .neeto-molecules-pageloader__rect2{animation-delay:-1.1s}.neeto-molecules-pageloader__spinner .neeto-molecules-pageloader__rect3{animation-delay:-1s}.neeto-molecules-pageloader__spinner .neeto-molecules-pageloader__rect4{animation-delay:-.9s}.neeto-molecules-pageloader__spinner .neeto-molecules-pageloader__rect5{animation-delay:-.8s}@keyframes neeto-ui-stretch-delay{0%,40%,to{transform:scaleY(.4);-webkit-transform:scaleY(.4)}20%{transform:scaleY(1);-webkit-transform:scaleY(1)}}";
1411
+ n(css$1,{});
1412
+
1413
+ var _excluded$1 = ["text"];
1414
+ var PageLoader = function PageLoader(_ref) {
1415
+ var _ref$text = _ref.text,
1416
+ text = _ref$text === void 0 ? "" : _ref$text,
1417
+ otherProps = _objectWithoutProperties(_ref, _excluded$1);
1418
+ return /*#__PURE__*/React__default.createElement("div", _extends$1({
1419
+ className: "neeto-molecules-pageloader__wrapper"
1420
+ }, otherProps), /*#__PURE__*/React__default.createElement("div", {
1421
+ className: "neeto-molecules-pageloader neeto-ui-flex neeto-ui-flex-col neeto-ui-items-center neeto-ui-justify-center"
1422
+ }, /*#__PURE__*/React__default.createElement("div", {
1423
+ className: "neeto-molecules-pageloader__content neeto-ui-flex neeto-ui-flex-shrink-0 neeto-ui-items-center neeto-ui-justify-center"
1424
+ }, /*#__PURE__*/React__default.createElement(SvgNeeto, {
1425
+ className: "neeto-molecules-pageloader__logo",
1426
+ size: 50
1427
+ }), /*#__PURE__*/React__default.createElement("div", {
1428
+ className: "neeto-molecules-pageloader__spinner"
1429
+ }, /*#__PURE__*/React__default.createElement("div", {
1430
+ className: "neeto-molecules-pageloader__rect1"
1431
+ }), /*#__PURE__*/React__default.createElement("div", {
1432
+ className: "neeto-molecules-pageloader__rect2"
1433
+ }), /*#__PURE__*/React__default.createElement("div", {
1434
+ className: "neeto-molecules-pageloader__rect3"
1435
+ }), /*#__PURE__*/React__default.createElement("div", {
1436
+ className: "neeto-molecules-pageloader__rect4"
1437
+ }), /*#__PURE__*/React__default.createElement("div", {
1438
+ className: "neeto-molecules-pageloader__rect5"
1439
+ }))), text && /*#__PURE__*/React__default.createElement(Typography, {
1440
+ style: "h5",
1441
+ weight: "semibold"
1442
+ }, text)));
1443
+ };
1444
+ var PageLoader$1 = /*#__PURE__*/React__default.memo(PageLoader);
1445
+
1446
+ function _typeof(obj) {
1447
+ "@babel/helpers - typeof";
1448
+
1449
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
1450
+ return typeof obj;
1451
+ } : function (obj) {
1452
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
1453
+ }, _typeof(obj);
1454
+ }
1455
+
1456
+ function _toPrimitive(input, hint) {
1457
+ if (_typeof(input) !== "object" || input === null) return input;
1458
+ var prim = input[Symbol.toPrimitive];
1459
+ if (prim !== undefined) {
1460
+ var res = prim.call(input, hint || "default");
1461
+ if (_typeof(res) !== "object") return res;
1462
+ throw new TypeError("@@toPrimitive must return a primitive value.");
1463
+ }
1464
+ return (hint === "string" ? String : Number)(input);
1465
+ }
1466
+
1467
+ function _toPropertyKey(arg) {
1468
+ var key = _toPrimitive(arg, "string");
1469
+ return _typeof(key) === "symbol" ? key : String(key);
1470
+ }
1471
+
1472
+ function _defineProperty(obj, key, value) {
1473
+ key = _toPropertyKey(key);
1474
+ if (key in obj) {
1475
+ Object.defineProperty(obj, key, {
1476
+ value: value,
1477
+ enumerable: true,
1478
+ configurable: true,
1479
+ writable: true
1480
+ });
1481
+ } else {
1482
+ obj[key] = value;
1483
+ }
1484
+ return obj;
1485
+ }
1486
+
1487
+ var SIZES = {
1488
+ nano: "nano",
1489
+ small: "small",
1490
+ medium: "medium",
1491
+ large: "large",
1492
+ viewport: "viewport"
1493
+ };
1494
+
1495
+ var css = ".neeto-molecules-scrollable{flex-grow:1;overflow-y:auto}.neeto-molecules-scrollable.neeto-molecules-scrollable--nano{height:calc(100vh - var(--neeto-molecules-main-header-with-breadcrumbs-height) - var(--neeto-molecules-sub-header-height) - var(--neeto-molecules-sub-header-bottom-margin))}.neeto-molecules-scrollable.neeto-molecules-scrollable--small{height:calc(100vh - var(--neeto-molecules-main-header-height) - var(--neeto-molecules-sub-header-height) - var(--neeto-molecules-sub-header-bottom-margin))}.neeto-molecules-scrollable.neeto-molecules-scrollable--medium{height:calc(100vh - var(--neeto-molecules-main-header-with-breadcrumbs-height))}.neeto-molecules-scrollable.neeto-molecules-scrollable--large{height:calc(100vh - var(--neeto-molecules-main-header-height))}.neeto-molecules-scrollable.neeto-molecules-scrollable--viewport{height:100vh}";
1496
+ n(css,{});
1497
+
1498
+ var _excluded = ["children", "className", "size"];
1499
+ var Scrollable = function Scrollable(_ref) {
1500
+ var children = _ref.children,
1501
+ _ref$className = _ref.className,
1502
+ className = _ref$className === void 0 ? "" : _ref$className,
1503
+ _ref$size = _ref.size,
1504
+ size = _ref$size === void 0 ? "small" : _ref$size,
1505
+ otherProps = _objectWithoutProperties(_ref, _excluded);
1506
+ return /*#__PURE__*/React__default.createElement("div", _extends$1({
1507
+ className: classnames(["neeto-molecules-scrollable", _defineProperty({
1508
+ "neeto-molecules-scrollable--nano": size === SIZES.nano,
1509
+ "neeto-molecules-scrollable--small": size === SIZES.small,
1510
+ "neeto-molecules-scrollable--medium": size === SIZES.medium,
1511
+ "neeto-molecules-scrollable--large": size === SIZES.large,
1512
+ "neeto-molecules-scrollable--viewport": size === SIZES.viewport
1513
+ }, className, className)])
1514
+ }, otherProps), children);
1515
+ };
1516
+
1517
+ function _arrayLikeToArray(arr, len) {
1518
+ if (len == null || len > arr.length) len = arr.length;
1519
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
1520
+ return arr2;
1521
+ }
1522
+
1523
+ function _arrayWithoutHoles(arr) {
1524
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
1525
+ }
1526
+
1527
+ function _iterableToArray(iter) {
1528
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1529
+ }
1530
+
1531
+ function _unsupportedIterableToArray(o, minLen) {
1532
+ if (!o) return;
1533
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
1534
+ var n = Object.prototype.toString.call(o).slice(8, -1);
1535
+ if (n === "Object" && o.constructor) n = o.constructor.name;
1536
+ if (n === "Map" || n === "Set") return Array.from(o);
1537
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
1538
+ }
1539
+
1540
+ function _nonIterableSpread() {
1541
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1542
+ }
1543
+
1544
+ function _toConsumableArray(arr) {
1545
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
1546
+ }
1547
+
1548
+ var Add = function Add() {
1549
+ var _useTranslation = useTranslation(),
1550
+ t = _useTranslation.t;
1551
+ var _useFormikContext = useFormikContext(),
1552
+ setFieldValue = _useFormikContext.setFieldValue,
1553
+ allowedKeywords = _useFormikContext.values.allowedKeywords;
1554
+ var removeKeyword = function removeKeyword(index) {
1555
+ return setFieldValue("allowedKeywords", remove(index, 1, allowedKeywords));
1556
+ };
1557
+ if (!allowedKeywords) return null;
1558
+ return allowedKeywords.map(function (_, index) {
1559
+ return /*#__PURE__*/React__default.createElement("div", {
1560
+ className: classnames("flex w-full items-start justify-between gap-x-2"),
1561
+ key: index
1562
+ }, /*#__PURE__*/React__default.createElement(Input$1, {
1563
+ autoFocus: true,
1564
+ "data-cy": "keyword-input-field-".concat(index),
1565
+ name: "allowedKeywords[".concat(index, "]"),
1566
+ placeholder: t("neetoMolecules.security.placeholders.enterKeyword")
1567
+ }), /*#__PURE__*/React__default.createElement(Button, {
1568
+ "data-cy": "keyword-remove-button-".concat(index),
1569
+ icon: Delete,
1570
+ style: "text",
1571
+ onClick: function onClick() {
1572
+ return removeKeyword(index);
1573
+ }
1574
+ }));
1575
+ });
1576
+ };
1577
+
1578
+ 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; }
1579
+ 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; }
1580
+ var buildSecuritySettings = function buildSecuritySettings(settings) {
1581
+ return _objectSpread(_objectSpread({}, settings.setting), {}, {
1582
+ addEmail: false
1583
+ });
1584
+ };
1585
+ var findKeywordDuplicates = function findKeywordDuplicates(list, message, createError) {
1586
+ var duplicates = {};
1587
+ list === null || list === void 0 ? void 0 : list.forEach(function (value, index) {
1588
+ if (duplicates[value]) {
1589
+ duplicates[value].push(index);
1590
+ } else {
1591
+ duplicates[value] = [index];
1592
+ }
1593
+ });
1594
+ var errors = Object.values(duplicates).map(function (index) {
1595
+ return index.length > 1 && new yup.ValidationError(message, list[index.at(-1)], "setting.allowedKeywords[".concat(index.at(-1), "]"));
1596
+ });
1597
+ if (isEmpty(errors)) {
1598
+ return true;
1599
+ }
1600
+ return createError({
1601
+ message: function message() {
1602
+ return errors;
1603
+ }
1604
+ });
1605
+ };
1606
+
1607
+ var NOT_SECURED = "no_auth";
1608
+ var SESSION_AUTH = "session_auth";
1609
+ yup.addMethod(yup.array, "unique", function (message) {
1610
+ var mapper = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : identity;
1611
+ return this.test("unique", message, function (list, _ref) {
1612
+ var authKind = _ref.parent.authKind;
1613
+ return authKind === OTP_ENABLED && (list === null || list === void 0 ? void 0 : list.length) === new Set(list === null || list === void 0 ? void 0 : list.map(mapper)).size ? true : findKeywordDuplicates(list, message, this.createError);
1614
+ });
1615
+ });
1616
+ var QUERY_KEYS = {
1617
+ SETTINGS_LIST: "settings-list",
1618
+ GETTING_STARTED: "getting-started",
1619
+ INTEGRATION_SETTINGS: "integration_settings",
1620
+ THEMES_SETTINGS: "themes_setting"
1621
+ };
1622
+ var SETTINGS_STALE_TIME = 900000; // 15 mins
1623
+ var PASSWORD_ENABLED = "basic_auth";
1624
+ var OTP_ENABLED = "otp_auth";
1625
+ var APP_NAME = {
1626
+ neetoKB: "KB",
1627
+ neetoCourse: "Course"
1628
+ };
1629
+ [{
1630
+ label: t$1("neetoMolecules.security.labels.notSecured"),
1631
+ value: NOT_SECURED
1632
+ }, {
1633
+ label: t$1("neetoMolecules.security.labels.passwordEnabled"),
1634
+ value: PASSWORD_ENABLED
1635
+ }, {
1636
+ label: t$1("neetoMolecules.security.labels.otpEnabled"),
1637
+ value: OTP_ENABLED
1638
+ }, {
1639
+ label: t$1("neetoMolecules.security.labels.private"),
1640
+ value: SESSION_AUTH
1641
+ }];
1642
+ var SECURITY_SETTINGS_VALIDATION_SCHEMA = yup.object({
1643
+ password: yup.string().when("authKind", {
1644
+ is: PASSWORD_ENABLED,
1645
+ then: yup.string().required(t$1("neetoMolecules.security.validation.required", {
1646
+ what: t$1("neetoMolecules.security.labels.password")
1647
+ })).min(4, t$1("neetoMolecules.security.validation.min", {
1648
+ entity: t$1("neetoMolecules.security.labels.password"),
1649
+ min: 4
1650
+ }))
1651
+ }),
1652
+ allowedKeywords: yup.array().when("authKind", {
1653
+ is: OTP_ENABLED,
1654
+ then: yup.array().of(yup.string().trim().required(t$1("neetoMolecules.security.validation.required", {
1655
+ what: t$1("neetoMolecules.security.labels.keyword")
1656
+ }))).unique(t$1("neetoMolecules.security.placeholders.exists", {
1657
+ what: t$1("neetoMolecules.security.labels.keyword")
1658
+ }))
1659
+ })
1660
+ });
1661
+
1662
+ var AllowedKeywords = function AllowedKeywords() {
1663
+ var _useTranslation = useTranslation(),
1664
+ t = _useTranslation.t;
1665
+ var _useFormikContext = useFormikContext(),
1666
+ setFieldValue = _useFormikContext.setFieldValue,
1667
+ _useFormikContext$val = _useFormikContext.values,
1668
+ allowedKeywords = _useFormikContext$val.allowedKeywords,
1669
+ authKind = _useFormikContext$val.authKind;
1670
+ if (authKind !== OTP_ENABLED) return null;
1671
+ var appName = APP_NAME[globalProps.appName];
1672
+ return /*#__PURE__*/React__default.createElement("div", {
1673
+ className: "flex-col space-y-2 py-2"
1674
+ }, appName && /*#__PURE__*/React__default.createElement(Label, null, t("neetoMolecules.security.labels.keywordForm.".concat(appName))), /*#__PURE__*/React__default.createElement("div", {
1675
+ className: "neeto-ui-bg-pastel-blue neeto-ui-rounded-sm w-full space-y-4 p-6"
1676
+ }, /*#__PURE__*/React__default.createElement(Add, null), /*#__PURE__*/React__default.createElement(Button, {
1677
+ "data-cy": "add-allowed-keyword-button",
1678
+ "data-testid": "add-allowed-keyword-button",
1679
+ label: t("neetoMolecules.security.labels.addKeyWord"),
1680
+ style: "link",
1681
+ onClick: function onClick() {
1682
+ return setFieldValue("allowedKeywords", [].concat(_toConsumableArray(allowedKeywords), [""]));
1683
+ }
1684
+ })), isEmpty(allowedKeywords) && /*#__PURE__*/React__default.createElement(ErrorMessage, {
1685
+ className: "neeto-ui-text-error-600",
1686
+ component: "div",
1687
+ name: "allowedKeywords"
1688
+ }));
1689
+ };
1690
+
1691
+ var Password = function Password() {
1692
+ var _useTranslation = useTranslation(),
1693
+ t = _useTranslation.t;
1694
+ var _useFormikContext = useFormikContext(),
1695
+ authKind = _useFormikContext.values.authKind,
1696
+ getFieldProps = _useFormikContext.getFieldProps;
1697
+ if (authKind !== PASSWORD_ENABLED) return null;
1698
+ var _getFieldProps = getFieldProps("password"),
1699
+ onPasswordChange = _getFieldProps.onChange;
1700
+ return /*#__PURE__*/React__default.createElement("div", {
1701
+ className: "space-y-4 pb-2"
1702
+ }, /*#__PURE__*/React__default.createElement(Input$1, {
1703
+ autoFocus: true,
1704
+ unlimitedChars: true,
1705
+ className: "w-7/12",
1706
+ "data-testid": "password-block",
1707
+ label: t("neetoMolecules.security.labels.password"),
1708
+ name: "password",
1709
+ placeholder: t("neetoMolecules.security.placeholders.enterPassword"),
1710
+ onChange: function onChange(e) {
1711
+ e.target.value = e.target.value.trim();
1712
+ onPasswordChange(e);
1713
+ }
1714
+ }));
1715
+ };
1716
+
1717
+ var RadioBlock = function RadioBlock(_ref) {
1718
+ var radioItems = _ref.radioItems;
1719
+ var _useFormikContext = useFormikContext(),
1720
+ _useFormikContext$val = _useFormikContext.values.allowedKeywords,
1721
+ allowedKeywords = _useFormikContext$val === void 0 ? [] : _useFormikContext$val,
1722
+ setFieldValue = _useFormikContext.setFieldValue;
1723
+ var handleRadioChange = function handleRadioChange(_ref2) {
1724
+ var value = _ref2.event.target.value,
1725
+ allowedKeywords = _ref2.allowedKeywords;
1726
+ var allowedKeywordsValue = value === OTP_ENABLED ? [].concat(_toConsumableArray(allowedKeywords), [""]) : [];
1727
+ setFieldValue("allowedKeywords", allowedKeywordsValue);
1728
+ setFieldValue("authKind", value);
1729
+ };
1730
+ return /*#__PURE__*/React__default.createElement(Radio, {
1731
+ stacked: true,
1732
+ name: "authKind",
1733
+ onChange: function onChange(event) {
1734
+ return handleRadioChange({
1735
+ event: event,
1736
+ allowedKeywords: allowedKeywords
1737
+ });
1738
+ }
1739
+ }, radioItems.map(function (_ref3) {
1740
+ var label = _ref3.label,
1741
+ value = _ref3.value;
1742
+ return /*#__PURE__*/React__default.createElement(Radio.Item, {
1743
+ key: value,
1744
+ label: label,
1745
+ value: value
1746
+ });
1747
+ }));
1748
+ };
1749
+
1750
+ var fetch = function fetch(url) {
1751
+ return axios.get(url);
1752
+ };
1753
+ var update = function update(url, payload) {
1754
+ return axios.put(url, payload);
1755
+ };
1756
+ var settingsApi = {
1757
+ fetch: fetch,
1758
+ update: update
1759
+ };
1760
+
1761
+ var SETTINGS_LIST = QUERY_KEYS.SETTINGS_LIST,
1762
+ GETTING_STARTED = QUERY_KEYS.GETTING_STARTED,
1763
+ THEMES_SETTINGS = QUERY_KEYS.THEMES_SETTINGS;
1764
+ var useFetchSettings = function useFetchSettings(url) {
1765
+ return useQuery(SETTINGS_LIST, function () {
1766
+ return settingsApi.fetch(url);
1767
+ }, {
1768
+ staleTime: SETTINGS_STALE_TIME
1769
+ });
1770
+ };
1771
+ var useUpdateSetting = function useUpdateSetting(url) {
1772
+ return useMutationWithInvalidation(function (payload) {
1773
+ return settingsApi.update(url, payload);
1774
+ }, {
1775
+ keysToInvalidate: [SETTINGS_LIST, GETTING_STARTED, THEMES_SETTINGS]
1776
+ });
1777
+ };
1778
+
1779
+ var Security = function Security(_ref) {
1780
+ var url = _ref.url,
1781
+ breadcrumbs = _ref.breadcrumbs,
1782
+ title = _ref.title,
1783
+ radioItems = _ref.radioItems;
1784
+ var _useFetchSettings = useFetchSettings(url),
1785
+ _useFetchSettings$dat = _useFetchSettings.data,
1786
+ settings = _useFetchSettings$dat === void 0 ? {} : _useFetchSettings$dat,
1787
+ isLoading = _useFetchSettings.isLoading;
1788
+ var _useUpdateSetting = useUpdateSetting(url),
1789
+ updateSettings = _useUpdateSetting.mutate;
1790
+ var handleSubmit = function handleSubmit(values, _ref2) {
1791
+ var setSubmitting = _ref2.setSubmitting;
1792
+ updateSettings(values, {
1793
+ onSettled: function onSettled() {
1794
+ return setSubmitting(false);
1795
+ }
1796
+ });
1797
+ };
1798
+ if (isLoading) return /*#__PURE__*/React__default.createElement(PageLoader$1, null);
1799
+ return /*#__PURE__*/React__default.createElement(Container, {
1800
+ isHeaderFixed: true
1801
+ }, /*#__PURE__*/React__default.createElement(Header, {
1802
+ "data-cy": "general-settings-heading",
1803
+ breadcrumbs: breadcrumbs,
1804
+ title: title
1805
+ }), /*#__PURE__*/React__default.createElement(Scrollable, {
1806
+ className: "w-full pb-6"
1807
+ }, /*#__PURE__*/React__default.createElement(Form, {
1808
+ className: "mx-auto w-full max-w-3xl space-y-6 md:px-0 lg:px-6",
1809
+ formikProps: {
1810
+ initialValues: buildSecuritySettings(settings),
1811
+ validationSchema: SECURITY_SETTINGS_VALIDATION_SCHEMA,
1812
+ onSubmit: handleSubmit,
1813
+ enableReinitialize: true
1814
+ }
1815
+ }, function (_ref3) {
1816
+ var dirty = _ref3.dirty,
1817
+ isSubmitting = _ref3.isSubmitting;
1818
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(RadioBlock, {
1819
+ radioItems: radioItems
1820
+ }), /*#__PURE__*/React__default.createElement(Password, null), /*#__PURE__*/React__default.createElement(AllowedKeywords, null), /*#__PURE__*/React__default.createElement(ActionBlock, {
1821
+ cancelButtonProps: {
1822
+ disabled: false,
1823
+ className: "ml-3"
1824
+ },
1825
+ className: "mt-6 w-full justify-start",
1826
+ submitButtonProps: {
1827
+ loading: isSubmitting,
1828
+ disabled: !dirty || isSubmitting
1829
+ }
1830
+ }));
1831
+ })));
1832
+ };
1833
+
1834
+ export { Security as default };
1835
+ //# sourceMappingURL=Security.js.map