box-ui-elements 15.0.0-beta.7 → 15.0.0

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 (508) hide show
  1. package/CONTRIBUTING.md +3 -1
  2. package/dist/explorer.css +1 -1
  3. package/dist/explorer.js +58 -26
  4. package/dist/openwith.css +1 -1
  5. package/dist/openwith.js +10 -17
  6. package/dist/picker.css +1 -1
  7. package/dist/picker.js +12 -19
  8. package/dist/preview.css +1 -1
  9. package/dist/preview.js +56 -24
  10. package/dist/sharing.css +1 -1
  11. package/dist/sharing.js +54 -22
  12. package/dist/sidebar.css +1 -1
  13. package/dist/sidebar.js +56 -24
  14. package/dist/uploader.css +1 -1
  15. package/dist/uploader.js +12 -19
  16. package/es/api/uploads/UploadsReachability.js.flow +2 -2
  17. package/es/api/uploads/UploadsReachability.js.map +1 -1
  18. package/es/common/messages.js +4 -0
  19. package/es/common/messages.js.flow +5 -0
  20. package/es/common/messages.js.map +1 -1
  21. package/es/common/types/core.js.flow +2 -0
  22. package/es/common/types/core.js.map +1 -1
  23. package/es/components/avatar/UnknownUserAvatar.js +6 -9
  24. package/es/components/avatar/UnknownUserAvatar.js.map +1 -1
  25. package/es/components/close-button/CloseButton.js +24 -0
  26. package/es/components/close-button/CloseButton.js.flow +26 -0
  27. package/es/components/close-button/CloseButton.js.map +1 -0
  28. package/es/components/close-button/CloseButton.scss +10 -0
  29. package/es/components/close-button/CloseButton.stories.js +14 -0
  30. package/es/components/close-button/CloseButton.stories.js.map +1 -0
  31. package/es/components/close-button/index.js +2 -0
  32. package/es/components/close-button/index.js.flow +2 -0
  33. package/es/components/close-button/index.js.map +1 -0
  34. package/es/components/date-picker/AccessiblePikaday.js +113 -0
  35. package/es/components/date-picker/AccessiblePikaday.js.map +1 -0
  36. package/es/components/date-picker/DatePicker.js +426 -106
  37. package/es/components/date-picker/DatePicker.js.map +1 -1
  38. package/es/components/date-picker/DatePicker.scss +32 -22
  39. package/es/components/date-picker/DatePicker.stories.js +10 -0
  40. package/es/components/date-picker/DatePicker.stories.js.map +1 -1
  41. package/es/components/date-picker/_pikaday.scss +8 -2
  42. package/es/components/flyout/Flyout.js +13 -3
  43. package/es/components/flyout/Flyout.js.flow +14 -3
  44. package/es/components/flyout/Flyout.js.map +1 -1
  45. package/es/components/flyout/Flyout.scss +40 -0
  46. package/es/components/flyout/FlyoutContext.js +6 -0
  47. package/es/components/flyout/FlyoutContext.js.flow +9 -0
  48. package/es/components/flyout/FlyoutContext.js.map +1 -0
  49. package/es/components/flyout/OverlayHeader.js +33 -0
  50. package/es/components/flyout/OverlayHeader.js.map +1 -0
  51. package/es/components/flyout/OverlayHeader.scss +9 -0
  52. package/es/components/flyout/_variables.scss +1 -0
  53. package/es/components/flyout/index.js +2 -0
  54. package/es/components/flyout/index.js.flow +2 -0
  55. package/es/components/flyout/index.js.map +1 -1
  56. package/es/components/image-tooltip/ImageTooltip.js +1 -2
  57. package/es/components/image-tooltip/ImageTooltip.js.map +1 -1
  58. package/es/components/media-query/constants.js +26 -0
  59. package/es/components/media-query/constants.js.flow +32 -0
  60. package/es/components/media-query/constants.js.map +1 -0
  61. package/es/components/media-query/index.js +3 -0
  62. package/es/components/media-query/index.js.flow +4 -0
  63. package/es/components/media-query/index.js.map +1 -0
  64. package/es/components/media-query/stories/MediaQuery.stories.js +37 -0
  65. package/es/components/media-query/stories/MediaQuery.stories.js.flow +80 -0
  66. package/es/components/media-query/stories/MediaQuery.stories.js.map +1 -0
  67. package/es/components/media-query/types.js +2 -0
  68. package/es/components/media-query/types.js.flow +29 -0
  69. package/es/components/media-query/types.js.map +1 -0
  70. package/es/components/media-query/useMediaQuery.js +91 -0
  71. package/es/components/media-query/useMediaQuery.js.flow +97 -0
  72. package/es/components/media-query/useMediaQuery.js.map +1 -0
  73. package/es/components/media-query/withMediaQuery.js +21 -0
  74. package/es/components/media-query/withMediaQuery.js.flow +23 -0
  75. package/es/components/media-query/withMediaQuery.js.map +1 -0
  76. package/es/components/modal/Modal.scss +27 -0
  77. package/es/components/preview/previewIcons.js +4 -0
  78. package/es/components/preview/previewIcons.js.map +1 -1
  79. package/es/components/search-form/SearchForm.scss +0 -5
  80. package/es/components/selector-dropdown/SelectorDropdown.js +5 -3
  81. package/es/components/selector-dropdown/SelectorDropdown.js.flow +3 -3
  82. package/es/components/selector-dropdown/SelectorDropdown.js.map +1 -1
  83. package/es/components/tab-view/Tabs.scss +0 -4
  84. package/es/components/tooltip/Tooltip.js +21 -4
  85. package/es/components/tooltip/Tooltip.js.map +1 -1
  86. package/es/constants.js +1 -0
  87. package/es/constants.js.flow +1 -0
  88. package/es/constants.js.map +1 -1
  89. package/es/elements/content-open-with/IconFileMap.js +0 -2
  90. package/es/elements/content-open-with/IconFileMap.js.flow +0 -2
  91. package/es/elements/content-open-with/IconFileMap.js.map +1 -1
  92. package/es/elements/content-sidebar/Sidebar.js +2 -1
  93. package/es/elements/content-sidebar/Sidebar.js.flow +1 -1
  94. package/es/elements/content-sidebar/Sidebar.js.map +1 -1
  95. package/es/elements/content-sidebar/activity-feed/common/delete-confirmation/DeleteConfirmation.scss +3 -3
  96. package/es/elements/content-sidebar/activity-feed/task-form/TaskForm.js +14 -4
  97. package/es/elements/content-sidebar/activity-feed/task-form/TaskForm.js.flow +18 -5
  98. package/es/elements/content-sidebar/activity-feed/task-form/TaskForm.js.map +1 -1
  99. package/es/elements/content-sidebar/versions/StaticVersionSidebar.js +78 -0
  100. package/es/elements/content-sidebar/versions/StaticVersionSidebar.js.flow +97 -0
  101. package/es/elements/content-sidebar/versions/StaticVersionSidebar.js.map +1 -0
  102. package/es/elements/content-sidebar/versions/StaticVersionsSidebar.scss +67 -0
  103. package/es/elements/content-sidebar/versions/VersionsSidebar.js +12 -4
  104. package/es/elements/content-sidebar/versions/VersionsSidebar.js.flow +16 -3
  105. package/es/elements/content-sidebar/versions/VersionsSidebar.js.map +1 -1
  106. package/es/elements/content-sidebar/versions/VersionsSidebar.scss +5 -0
  107. package/es/elements/content-sidebar/versions/VersionsSidebarContainer.js +42 -10
  108. package/es/elements/content-sidebar/versions/VersionsSidebarContainer.js.flow +42 -7
  109. package/es/elements/content-sidebar/versions/VersionsSidebarContainer.js.map +1 -1
  110. package/es/elements/content-sidebar/versions/flowTypes.js.flow +1 -0
  111. package/es/elements/content-sidebar/versions/messages.js +20 -0
  112. package/es/elements/content-sidebar/versions/messages.js.flow +28 -0
  113. package/es/elements/content-sidebar/versions/messages.js.map +1 -1
  114. package/es/features/classification/constants.js +2 -1
  115. package/es/features/classification/constants.js.flow +2 -0
  116. package/es/features/classification/constants.js.map +1 -1
  117. package/es/features/classification/flowTypes.js +1 -0
  118. package/es/features/classification/flowTypes.js.flow +7 -1
  119. package/es/features/classification/flowTypes.js.map +1 -1
  120. package/es/features/classification/security-controls/SecurityControls.js +3 -4
  121. package/es/features/classification/security-controls/SecurityControls.js.flow +3 -4
  122. package/es/features/classification/security-controls/SecurityControls.js.map +1 -1
  123. package/es/features/classification/security-controls/SecurityControlsItem.js +1 -1
  124. package/es/features/classification/security-controls/SecurityControlsItem.js.flow +20 -17
  125. package/es/features/classification/security-controls/SecurityControlsItem.js.map +1 -1
  126. package/es/features/classification/security-controls/SecurityControlsItem.scss +4 -0
  127. package/es/features/classification/security-controls/SecurityControlsModal.js +2 -2
  128. package/es/features/classification/security-controls/SecurityControlsModal.js.flow +2 -2
  129. package/es/features/classification/security-controls/SecurityControlsModal.js.map +1 -1
  130. package/es/features/classification/security-controls/messages.js +4 -0
  131. package/es/features/classification/security-controls/messages.js.flow +5 -0
  132. package/es/features/classification/security-controls/messages.js.map +1 -1
  133. package/es/features/classification/security-controls/utils.js +56 -35
  134. package/es/features/classification/security-controls/utils.js.flow +51 -27
  135. package/es/features/classification/security-controls/utils.js.map +1 -1
  136. package/es/features/collapsible-sidebar/CollapsibleSidebar.js +9 -3
  137. package/es/features/collapsible-sidebar/CollapsibleSidebar.js.flow +13 -5
  138. package/es/features/collapsible-sidebar/CollapsibleSidebar.js.map +1 -1
  139. package/es/features/collapsible-sidebar/CollapsibleSidebar.scss +35 -3
  140. package/es/features/content-explorer/content-explorer/ContentExplorer.scss +1 -1
  141. package/es/features/content-explorer/item-list/ItemList.js +1 -0
  142. package/es/features/content-explorer/item-list/ItemList.js.flow +1 -0
  143. package/es/features/content-explorer/item-list/ItemList.js.map +1 -1
  144. package/es/features/content-explorer/item-list/ItemListName.js +13 -2
  145. package/es/features/content-explorer/item-list/ItemListName.js.flow +3 -2
  146. package/es/features/content-explorer/item-list/ItemListName.js.map +1 -1
  147. package/es/features/header-flyout/HeaderFlyout.js +8 -10
  148. package/es/features/header-flyout/HeaderFlyout.js.flow +4 -8
  149. package/es/features/header-flyout/HeaderFlyout.js.map +1 -1
  150. package/es/features/header-flyout/styles/HeaderFlyout.scss +54 -15
  151. package/es/features/header-flyout/styles/_variables.scss +4 -0
  152. package/es/features/message-center/components/message-center-modal/MessageCenterModal.js +1 -0
  153. package/es/features/message-center/components/message-center-modal/MessageCenterModal.js.flow +1 -0
  154. package/es/features/message-center/components/message-center-modal/MessageCenterModal.js.map +1 -1
  155. package/es/features/presence/PresenceCollaborator.js +90 -0
  156. package/es/features/presence/PresenceCollaborator.js.flow +81 -0
  157. package/es/features/presence/PresenceCollaborator.js.map +1 -0
  158. package/es/features/presence/PresenceCollaborator.scss +28 -0
  159. package/es/features/presence/PresenceCollaboratorsList.js +9 -57
  160. package/es/features/presence/PresenceCollaboratorsList.js.flow +7 -58
  161. package/es/features/presence/PresenceCollaboratorsList.js.map +1 -1
  162. package/es/features/presence/PresenceCollaboratorsList.scss +8 -35
  163. package/es/features/quick-search/QuickSearch.js +4 -2
  164. package/es/features/quick-search/QuickSearch.js.flow +13 -1
  165. package/es/features/quick-search/QuickSearch.js.map +1 -1
  166. package/es/features/unified-share-modal/SharedLinkSection.js +9 -20
  167. package/es/features/unified-share-modal/SharedLinkSection.js.flow +6 -27
  168. package/es/features/unified-share-modal/SharedLinkSection.js.map +1 -1
  169. package/es/features/unified-share-modal/UnifiedShareForm.js +95 -53
  170. package/es/features/unified-share-modal/UnifiedShareForm.js.flow +70 -14
  171. package/es/features/unified-share-modal/UnifiedShareForm.js.map +1 -1
  172. package/es/features/unified-share-modal/UnifiedShareModal.scss +3 -0
  173. package/es/features/unified-share-modal/flowTypes.js.flow +6 -0
  174. package/es/features/unified-share-modal/flowTypes.js.map +1 -1
  175. package/es/features/unified-share-modal/messages.js +8 -0
  176. package/es/features/unified-share-modal/messages.js.flow +10 -0
  177. package/es/features/unified-share-modal/messages.js.map +1 -1
  178. package/es/features/unified-share-modal/utils/mergeContacts.js +13 -10
  179. package/es/features/unified-share-modal/utils/mergeContacts.js.flow +4 -2
  180. package/es/features/unified-share-modal/utils/mergeContacts.js.map +1 -1
  181. package/es/icon/content/FileXbd32.js +39 -0
  182. package/es/icon/content/FileXbd32.js.flow +38 -0
  183. package/es/icon/content/FileXbd32.js.map +1 -0
  184. package/es/icon/content/FileXbd32.stories.js +13 -0
  185. package/es/icon/content/FileXbd32.stories.js.map +1 -0
  186. package/es/icon/content/FileXdw32.js +39 -0
  187. package/es/icon/content/FileXdw32.js.flow +38 -0
  188. package/es/icon/content/FileXdw32.js.map +1 -0
  189. package/es/icon/content/FileXdw32.stories.js +13 -0
  190. package/es/icon/content/FileXdw32.stories.js.map +1 -0
  191. package/es/icon/content/RetentionPolicyModifiable32.js +36 -0
  192. package/es/icon/content/RetentionPolicyModifiable32.js.flow +31 -0
  193. package/es/icon/content/RetentionPolicyModifiable32.js.map +1 -0
  194. package/es/icon/content/RetentionPolicyModifiable32.stories.js +13 -0
  195. package/es/icon/content/RetentionPolicyModifiable32.stories.js.map +1 -0
  196. package/es/icon/content/RetentionPolicyNonModifiable32.js +36 -0
  197. package/es/icon/content/RetentionPolicyNonModifiable32.js.flow +31 -0
  198. package/es/icon/content/RetentionPolicyNonModifiable32.js.map +1 -0
  199. package/es/icon/content/RetentionPolicyNonModifiable32.stories.js +13 -0
  200. package/es/icon/content/RetentionPolicyNonModifiable32.stories.js.map +1 -0
  201. package/es/icons/avatars/UnknownUserAvatar.js +10 -34
  202. package/es/icons/avatars/UnknownUserAvatar.js.map +1 -1
  203. package/es/icons/file-icon/FileIcon.js +8 -2
  204. package/es/icons/file-icon/FileIcon.js.flow +2 -2
  205. package/es/icons/file-icon/FileIcon.js.map +1 -1
  206. package/es/icons/general/IconSearch.js +1 -1
  207. package/es/icons/general/IconSearch.js.flow +1 -1
  208. package/es/icons/general/IconSearch.js.map +1 -1
  209. package/es/icons/general/IconSearchJuicy.js +30 -0
  210. package/es/icons/general/IconSearchJuicy.js.flow +26 -0
  211. package/es/icons/general/IconSearchJuicy.js.map +1 -0
  212. package/es/icons/google-docs/IconGoogle.js +89 -0
  213. package/es/icons/google-docs/IconGoogle.js.flow +57 -0
  214. package/es/icons/google-docs/IconGoogle.js.map +1 -0
  215. package/es/icons/item-icon/ItemIcon.js +4 -0
  216. package/es/icons/item-icon/ItemIcon.js.map +1 -1
  217. package/es/icons/microsoft-office/IconOffice.js +80 -0
  218. package/es/icons/microsoft-office/IconOffice.js.flow +45 -0
  219. package/es/icons/microsoft-office/IconOffice.js.map +1 -0
  220. package/es/illustration/EmailVerification140.js +111 -0
  221. package/es/illustration/EmailVerification140.js.flow +102 -0
  222. package/es/illustration/EmailVerification140.js.map +1 -0
  223. package/es/illustration/EmailVerification140.stories.js +13 -0
  224. package/es/illustration/EmailVerification140.stories.js.map +1 -0
  225. package/es/src/components/close-button/CloseButton.d.ts +9 -0
  226. package/es/src/components/close-button/CloseButton.stories.d.ts +9 -0
  227. package/es/src/components/close-button/__tests__/CloseButton.stories.test.d.ts +0 -0
  228. package/es/src/components/close-button/__tests__/CloseButton.test.d.ts +1 -0
  229. package/es/src/components/close-button/index.d.ts +1 -0
  230. package/es/src/components/date-picker/AccessiblePikaday.d.ts +16 -0
  231. package/es/src/components/date-picker/DatePicker.d.ts +33 -6
  232. package/es/src/components/date-picker/DatePicker.stories.d.ts +2 -1
  233. package/es/src/components/flyout/OverlayHeader.d.ts +10 -0
  234. package/es/src/components/tooltip/Tooltip.d.ts +4 -3
  235. package/es/src/icon/content/FileXbd32.d.ts +13 -0
  236. package/es/src/icon/content/FileXbd32.stories.d.ts +9 -0
  237. package/es/src/icon/content/FileXdw32.d.ts +13 -0
  238. package/es/src/icon/content/FileXdw32.stories.d.ts +9 -0
  239. package/es/src/icon/content/RetentionPolicyModifiable32.d.ts +13 -0
  240. package/es/src/icon/content/RetentionPolicyModifiable32.stories.d.ts +9 -0
  241. package/es/src/icon/content/RetentionPolicyNonModifiable32.d.ts +13 -0
  242. package/es/src/icon/content/RetentionPolicyNonModifiable32.stories.d.ts +9 -0
  243. package/es/src/icons/avatars/UnknownUserAvatar.d.ts +0 -1
  244. package/es/src/icons/general/IconSearchJuicy.d.ts +3 -0
  245. package/es/src/icons/general/__tests__/IconSearchJuicy.test.d.ts +1 -0
  246. package/es/src/icons/google-docs/IconGoogle.d.ts +12 -0
  247. package/es/src/icons/google-docs/__tests__/IconGoogle.test.d.ts +1 -0
  248. package/es/src/icons/item-icon/ItemIcon.d.ts +2 -0
  249. package/es/src/icons/microsoft-office/IconOffice.d.ts +12 -0
  250. package/es/src/icons/microsoft-office/__tests__/IconOffice.test.d.ts +1 -0
  251. package/es/src/illustration/EmailVerification140.d.ts +13 -0
  252. package/es/src/illustration/EmailVerification140.stories.d.ts +9 -0
  253. package/es/src/styles/variables.d.ts +9 -0
  254. package/es/styles/_variables.scss +1 -0
  255. package/es/styles/common/_forms.scss +6 -0
  256. package/es/styles/constants/_layout.scss +3 -0
  257. package/es/styles/constants/_media-queries.scss +15 -0
  258. package/es/styles/variables.js +18 -0
  259. package/es/styles/variables.js.flow +10 -1
  260. package/es/styles/variables.js.map +1 -1
  261. package/es/utils/Browser.js +12 -0
  262. package/es/utils/Browser.js.flow +10 -0
  263. package/es/utils/Browser.js.map +1 -1
  264. package/es/utils/validators.js +26 -4
  265. package/es/utils/validators.js.flow +25 -3
  266. package/es/utils/validators.js.map +1 -1
  267. package/i18n/bn-IN.js +12 -0
  268. package/i18n/bn-IN.properties +24 -0
  269. package/i18n/da-DK.js +12 -0
  270. package/i18n/da-DK.properties +24 -0
  271. package/i18n/de-DE.js +12 -0
  272. package/i18n/de-DE.properties +24 -0
  273. package/i18n/en-AU.js +12 -0
  274. package/i18n/en-AU.properties +24 -0
  275. package/i18n/en-CA.js +12 -0
  276. package/i18n/en-CA.properties +24 -0
  277. package/i18n/en-GB.js +12 -0
  278. package/i18n/en-GB.properties +24 -0
  279. package/i18n/en-US.js +12 -0
  280. package/i18n/en-US.properties +24 -0
  281. package/i18n/en-x-pseudo.js +12 -0
  282. package/i18n/es-419.js +12 -0
  283. package/i18n/es-419.properties +24 -0
  284. package/i18n/es-ES.js +12 -0
  285. package/i18n/es-ES.properties +24 -0
  286. package/i18n/fi-FI.js +12 -0
  287. package/i18n/fi-FI.properties +24 -0
  288. package/i18n/fr-CA.js +12 -0
  289. package/i18n/fr-CA.properties +24 -0
  290. package/i18n/fr-FR.js +12 -0
  291. package/i18n/fr-FR.properties +24 -0
  292. package/i18n/hi-IN.js +12 -0
  293. package/i18n/hi-IN.properties +24 -0
  294. package/i18n/it-IT.js +12 -0
  295. package/i18n/it-IT.properties +24 -0
  296. package/i18n/ja-JP.js +25 -13
  297. package/i18n/ja-JP.properties +37 -13
  298. package/i18n/ko-KR.js +12 -0
  299. package/i18n/ko-KR.properties +24 -0
  300. package/i18n/nb-NO.js +12 -0
  301. package/i18n/nb-NO.properties +24 -0
  302. package/i18n/nl-NL.js +12 -0
  303. package/i18n/nl-NL.properties +24 -0
  304. package/i18n/pl-PL.js +12 -0
  305. package/i18n/pl-PL.properties +24 -0
  306. package/i18n/pt-BR.js +12 -0
  307. package/i18n/pt-BR.properties +24 -0
  308. package/i18n/ru-RU.js +12 -0
  309. package/i18n/ru-RU.properties +24 -0
  310. package/i18n/sv-SE.js +12 -0
  311. package/i18n/sv-SE.properties +24 -0
  312. package/i18n/tr-TR.js +12 -0
  313. package/i18n/tr-TR.properties +24 -0
  314. package/i18n/zh-CN.js +12 -0
  315. package/i18n/zh-CN.properties +24 -0
  316. package/i18n/zh-TW.js +12 -0
  317. package/i18n/zh-TW.properties +24 -0
  318. package/package.json +8 -5
  319. package/src/__mocks__/pikaday.js +1 -0
  320. package/src/api/__tests__/MockOpenWithData.json +2 -25
  321. package/src/api/uploads/UploadsReachability.js +2 -2
  322. package/src/common/messages.js +5 -0
  323. package/src/common/types/core.js +2 -0
  324. package/src/components/avatar/UnknownUserAvatar.tsx +5 -4
  325. package/src/components/close-button/CloseButton.js.flow +26 -0
  326. package/src/components/close-button/CloseButton.scss +10 -0
  327. package/src/components/close-button/CloseButton.stories.md +1 -0
  328. package/src/components/close-button/CloseButton.stories.tsx +14 -0
  329. package/src/components/close-button/CloseButton.tsx +30 -0
  330. package/src/components/close-button/__tests__/CloseButton.stories.test.tsx +6 -0
  331. package/src/components/close-button/__tests__/CloseButton.test.tsx +40 -0
  332. package/src/components/close-button/__tests__/__image_snapshots__/close-button-stories-test-tsx-components-close-button-close-button-looks-visually-correct-when-using-story-components-buttons-closebutton-regular-1-snap.png +0 -0
  333. package/src/components/close-button/index.js.flow +2 -0
  334. package/src/components/close-button/index.ts +1 -0
  335. package/src/components/date-picker/AccessiblePikaday.ts +79 -0
  336. package/src/components/date-picker/DatePicker.scss +32 -22
  337. package/src/components/date-picker/DatePicker.stories.tsx +6 -0
  338. package/src/components/date-picker/DatePicker.tsx +350 -64
  339. package/src/components/date-picker/__tests__/DatePicker.test.tsx +44 -2
  340. package/src/components/date-picker/__tests__/__image_snapshots__/date-picker-stories-test-tsx-components-date-picker-date-picker-allows-editing-in-story-components-datepicker-manually-editable-1-snap.png +0 -0
  341. package/src/components/date-picker/__tests__/__image_snapshots__/date-picker-stories-test-tsx-components-date-picker-date-picker-allows-keyboard-selection-in-components-datepicker-always-visible-with-custom-input-field-1-snap.png +0 -0
  342. package/src/components/date-picker/__tests__/__image_snapshots__/date-picker-stories-test-tsx-components-date-picker-date-picker-closes-calendar-and-clears-date-for-components-datepicker-basic-1-snap.png +0 -0
  343. package/src/components/date-picker/__tests__/__image_snapshots__/date-picker-stories-test-tsx-components-date-picker-date-picker-looks-visually-correct-when-using-story-components-datepicker-always-visible-with-custom-input-field-1-snap.png +0 -0
  344. package/src/components/date-picker/__tests__/__image_snapshots__/date-picker-stories-test-tsx-components-date-picker-date-picker-looks-visually-correct-when-using-story-components-datepicker-basic-1-snap.png +0 -0
  345. package/src/components/date-picker/__tests__/__image_snapshots__/date-picker-stories-test-tsx-components-date-picker-date-picker-looks-visually-correct-when-using-story-components-datepicker-custom-error-tooltip-position-1-snap.png +0 -0
  346. package/src/components/date-picker/__tests__/__image_snapshots__/date-picker-stories-test-tsx-components-date-picker-date-picker-looks-visually-correct-when-using-story-components-datepicker-disabled-with-error-message-1-snap.png +0 -0
  347. package/src/components/date-picker/__tests__/__image_snapshots__/date-picker-stories-test-tsx-components-date-picker-date-picker-looks-visually-correct-when-using-story-components-datepicker-manually-editable-1-snap.png +0 -0
  348. package/src/components/date-picker/__tests__/__image_snapshots__/date-picker-stories-test-tsx-components-date-picker-date-picker-looks-visually-correct-when-using-story-components-datepicker-with-description-1-snap.png +0 -0
  349. package/src/components/date-picker/__tests__/__image_snapshots__/date-picker-stories-test-tsx-components-date-picker-date-picker-looks-visually-correct-when-using-story-components-datepicker-with-limited-date-range-1-snap.png +0 -0
  350. package/src/components/date-picker/__tests__/__image_snapshots__/date-picker-stories-test-tsx-components-date-picker-date-picker-looks-visually-correct-when-using-story-components-datepicker-with-range-1-snap.png +0 -0
  351. package/src/components/date-picker/__tests__/__image_snapshots__/date-picker-stories-test-tsx-components-date-picker-date-picker-reflects-changes-in-components-datepicker-always-visible-with-custom-input-field-1-snap.png +0 -0
  352. package/src/components/date-picker/__tests__/__image_snapshots__/date-picker-stories-test-tsx-components-date-picker-date-picker-shows-calendar-and-date-for-components-datepicker-basic-1-snap.png +0 -0
  353. package/src/components/date-picker/__tests__/__image_snapshots__/date-picker-stories-test-tsx-components-date-picker-date-picker-shows-limited-range-in-components-datepicker-with-limited-date-range-1-snap.png +0 -0
  354. package/src/components/date-picker/_pikaday.scss +8 -2
  355. package/src/components/flyout/Flyout.js +14 -3
  356. package/src/components/flyout/Flyout.scss +40 -0
  357. package/src/components/flyout/FlyoutContext.js +9 -0
  358. package/src/components/flyout/OverlayHeader.scss +9 -0
  359. package/src/components/flyout/OverlayHeader.tsx +38 -0
  360. package/src/components/flyout/__tests__/Flyout.test.js +15 -0
  361. package/src/components/flyout/__tests__/OverlayHeader.test.js +56 -0
  362. package/src/components/flyout/_variables.scss +1 -0
  363. package/src/components/flyout/index.js +2 -0
  364. package/src/components/image-tooltip/ImageTooltip.tsx +1 -2
  365. package/src/components/media-query/__tests__/useMediaQuery.test.js +48 -0
  366. package/src/components/media-query/__tests__/withMediaQuery.test.js +29 -0
  367. package/src/components/media-query/constants.js +32 -0
  368. package/src/components/media-query/index.js +4 -0
  369. package/src/components/media-query/stories/MediaQuery.stories.js +80 -0
  370. package/src/components/media-query/stories/MediaQuery.stories.md +29 -0
  371. package/src/components/media-query/types.js +29 -0
  372. package/src/components/media-query/useMediaQuery.js +97 -0
  373. package/src/components/media-query/withMediaQuery.js +23 -0
  374. package/src/components/modal/Modal.scss +27 -0
  375. package/src/components/modal/__tests__/Modal.stories.test.js +10 -0
  376. package/src/components/modal/__tests__/__image_snapshots__/modal-stories-test-js-components-modal-modal-looks-visually-correct-for-small-screens-when-button-is-clicked-in-story-components-modal-basic-1-snap.png +0 -0
  377. package/src/components/modal/__tests__/__image_snapshots__/modal-stories-test-js-components-modal-modal-looks-visually-correct-for-small-screens-when-button-is-clicked-in-story-components-modal-with-custom-backdrop-click-handler-1-snap.png +0 -0
  378. package/src/components/preview/previewIcons.ts +4 -0
  379. package/src/components/search-form/SearchForm.scss +0 -5
  380. package/src/components/selector-dropdown/SelectorDropdown.js +3 -3
  381. package/src/components/selector-dropdown/__tests__/SelectorDropdown.test.js +5 -1
  382. package/src/components/sidebar-toggle-button/__tests__/__snapshots__/SidebarToggleButton.test.js.snap +0 -8
  383. package/src/components/tab-view/Tabs.scss +0 -4
  384. package/src/components/tooltip/Tooltip.tsx +20 -5
  385. package/src/components/tooltip/__tests__/Tooltip.test.tsx +17 -4
  386. package/src/components/tooltip/__tests__/__snapshots__/Tooltip.test.tsx.snap +0 -2
  387. package/src/constants.js +1 -0
  388. package/src/elements/content-open-with/IconFileMap.js +0 -2
  389. package/src/elements/content-open-with/__tests__/ContentOpenWith.test.js +13 -13
  390. package/src/elements/content-open-with/__tests__/OpenWithButton.test.js +1 -1
  391. package/src/elements/content-open-with/__tests__/OpenWithDropdownMenu.test.js +1 -5
  392. package/src/elements/content-open-with/__tests__/OpenWithDropdownMenuItem.test.js +2 -2
  393. package/src/elements/content-open-with/__tests__/__snapshots__/ContentOpenWith.test.js.snap +5 -5
  394. package/src/elements/content-open-with/__tests__/__snapshots__/OpenWithButton.test.js.snap +1 -1
  395. package/src/elements/content-open-with/__tests__/__snapshots__/OpenWithDropdownMenu.test.js.snap +1 -11
  396. package/src/elements/content-open-with/__tests__/__snapshots__/OpenWithDropdownMenuItem.test.js.snap +4 -3
  397. package/src/elements/content-sidebar/Sidebar.js +1 -1
  398. package/src/elements/content-sidebar/__tests__/AddTaskButton.test.js +15 -0
  399. package/src/elements/content-sidebar/activity-feed/common/delete-confirmation/DeleteConfirmation.scss +3 -3
  400. package/src/elements/content-sidebar/activity-feed/task-form/TaskForm.js +18 -5
  401. package/src/elements/content-sidebar/versions/StaticVersionSidebar.js +97 -0
  402. package/src/elements/content-sidebar/versions/StaticVersionsSidebar.scss +67 -0
  403. package/src/elements/content-sidebar/versions/VersionsSidebar.js +16 -3
  404. package/src/elements/content-sidebar/versions/VersionsSidebar.scss +5 -0
  405. package/src/elements/content-sidebar/versions/VersionsSidebarContainer.js +42 -7
  406. package/src/elements/content-sidebar/versions/__tests__/VersionsSidebar.test.js +18 -1
  407. package/src/elements/content-sidebar/versions/__tests__/VersionsSidebarContainer.test.js +51 -2
  408. package/src/elements/content-sidebar/versions/__tests__/__snapshots__/VersionsSidebarContainer.test.js.snap +75 -0
  409. package/src/elements/content-sidebar/versions/flowTypes.js +1 -0
  410. package/src/elements/content-sidebar/versions/messages.js +28 -0
  411. package/src/features/classification/constants.js +2 -0
  412. package/src/features/classification/flowTypes.js +7 -1
  413. package/src/features/classification/security-controls/SecurityControls.js +3 -4
  414. package/src/features/classification/security-controls/SecurityControlsItem.js +20 -17
  415. package/src/features/classification/security-controls/SecurityControlsItem.scss +4 -0
  416. package/src/features/classification/security-controls/SecurityControlsModal.js +2 -2
  417. package/src/features/classification/security-controls/__tests__/SecurityControlsItem.test.js +10 -0
  418. package/src/features/classification/security-controls/__tests__/__snapshots__/SecurityControls.test.js.snap +6 -6
  419. package/src/features/classification/security-controls/__tests__/__snapshots__/SecurityControlsItem.test.js.snap +35 -0
  420. package/src/features/classification/security-controls/__tests__/__snapshots__/SecurityControlsModal.test.js.snap +2 -2
  421. package/src/features/classification/security-controls/__tests__/__snapshots__/utils.test.js.snap +20 -0
  422. package/src/features/classification/security-controls/__tests__/utils.test.js +38 -18
  423. package/src/features/classification/security-controls/messages.js +5 -0
  424. package/src/features/classification/security-controls/utils.js +51 -27
  425. package/src/features/collapsible-sidebar/CollapsibleSidebar.js +13 -5
  426. package/src/features/collapsible-sidebar/CollapsibleSidebar.scss +35 -3
  427. package/src/features/collapsible-sidebar/__tests__/CollapsibleSidebar.test.js +35 -0
  428. package/src/features/collapsible-sidebar/__tests__/__snapshots__/CollapsibleSidebar.test.js.snap +1 -0
  429. package/src/features/content-explorer/content-explorer/ContentExplorer.scss +1 -1
  430. package/src/features/content-explorer/item-list/ItemList.js +1 -0
  431. package/src/features/content-explorer/item-list/ItemListName.js +3 -2
  432. package/src/features/content-explorer/item-list/__tests__/ItemListName.test.js +16 -2
  433. package/src/features/header-flyout/HeaderFlyout.js +4 -8
  434. package/src/features/header-flyout/__tests__/__snapshots__/HeaderFlyout.test.js.snap +14 -11
  435. package/src/features/header-flyout/styles/HeaderFlyout.scss +54 -15
  436. package/src/features/header-flyout/styles/_variables.scss +4 -0
  437. package/src/features/message-center/components/message-center-modal/MessageCenterModal.js +1 -0
  438. package/src/features/metadata-instance-editor/__tests__/__snapshots__/TemplateDropdown.test.js.snap +7 -0
  439. package/src/features/pagination/__tests__/__snapshots__/MarkerBasedPagination.test.js.snap +0 -8
  440. package/src/features/pagination/__tests__/__snapshots__/OffsetBasedPagination.test.js.snap +0 -16
  441. package/src/features/presence/PresenceCollaborator.js +81 -0
  442. package/src/features/presence/PresenceCollaborator.scss +28 -0
  443. package/src/features/presence/PresenceCollaboratorsList.js +7 -58
  444. package/src/features/presence/PresenceCollaboratorsList.scss +8 -35
  445. package/src/features/presence/__tests__/PresenceCollaborator.test.js +36 -0
  446. package/src/features/presence/__tests__/PresenceCollaboratorsList.test.js +13 -57
  447. package/src/features/presence/__tests__/__snapshots__/Presence.test.js.snap +5 -0
  448. package/src/features/presence/__tests__/__snapshots__/PresenceLink.test.js.snap +3 -0
  449. package/src/features/query-bar/__tests__/__snapshots__/ColumnButton.test.js.snap +3 -0
  450. package/src/features/quick-search/QuickSearch.js +13 -1
  451. package/src/features/quick-search/__tests__/QuickSearch.test.js +17 -0
  452. package/src/features/unified-share-modal/SharedLinkSection.js +6 -27
  453. package/src/features/unified-share-modal/UnifiedShareForm.js +70 -14
  454. package/src/features/unified-share-modal/UnifiedShareModal.scss +3 -0
  455. package/src/features/unified-share-modal/__tests__/EmailForm.test.js +9 -0
  456. package/src/features/unified-share-modal/__tests__/SharedLinkSection.test.js +14 -4
  457. package/src/features/unified-share-modal/__tests__/UnifiedShareForm.test.js +53 -4
  458. package/src/features/unified-share-modal/__tests__/__snapshots__/SharedLinkSection.test.js.snap +9 -0
  459. package/src/features/unified-share-modal/__tests__/__snapshots__/UnifiedShareForm.test.js.snap +0 -159
  460. package/src/features/unified-share-modal/flowTypes.js +6 -0
  461. package/src/features/unified-share-modal/messages.js +10 -0
  462. package/src/features/unified-share-modal/utils/__tests__/mergeContacts.test.js +23 -0
  463. package/src/features/unified-share-modal/utils/mergeContacts.js +4 -2
  464. package/src/icon/content/FileXbd32.js.flow +38 -0
  465. package/src/icon/content/FileXbd32.stories.tsx +13 -0
  466. package/src/icon/content/FileXbd32.tsx +37 -0
  467. package/src/icon/content/FileXdw32.js.flow +38 -0
  468. package/src/icon/content/FileXdw32.stories.tsx +13 -0
  469. package/src/icon/content/FileXdw32.tsx +37 -0
  470. package/src/icon/content/RetentionPolicyModifiable32.js.flow +31 -0
  471. package/src/icon/content/RetentionPolicyModifiable32.stories.tsx +14 -0
  472. package/src/icon/content/RetentionPolicyModifiable32.tsx +29 -0
  473. package/src/icon/content/RetentionPolicyNonModifiable32.js.flow +31 -0
  474. package/src/icon/content/RetentionPolicyNonModifiable32.stories.tsx +14 -0
  475. package/src/icon/content/RetentionPolicyNonModifiable32.tsx +29 -0
  476. package/src/icons/adobe-sign/README.md +1 -1
  477. package/src/icons/avatars/UnknownUserAvatar.tsx +7 -15
  478. package/src/icons/file-icon/FileIcon.js.flow +2 -2
  479. package/src/icons/file-icon/FileIcon.tsx +8 -2
  480. package/src/icons/file-icon/__tests__/FileIcon.test.tsx +28 -69
  481. package/src/icons/file-icon/__tests__/__snapshots__/FileIcon.test.tsx.snap +48 -34
  482. package/src/icons/general/IconSearch.js.flow +1 -1
  483. package/src/icons/general/IconSearch.tsx +1 -1
  484. package/src/icons/general/IconSearchJuicy.js.flow +26 -0
  485. package/src/icons/general/IconSearchJuicy.tsx +25 -0
  486. package/src/icons/general/README.md +5 -0
  487. package/src/icons/general/__tests__/IconSearchJuicy.test.tsx +38 -0
  488. package/src/icons/google-docs/IconGoogle.js.flow +57 -0
  489. package/src/icons/google-docs/IconGoogle.tsx +50 -0
  490. package/src/icons/google-docs/__tests__/IconGoogle.test.tsx +44 -0
  491. package/src/icons/item-icon/ItemIcon.tsx +4 -0
  492. package/src/icons/item-icon/__tests__/ItemIcon.test.tsx +47 -115
  493. package/src/icons/item-icon/__tests__/__snapshots__/ItemIcon.test.tsx.snap +229 -229
  494. package/src/icons/microsoft-office/IconOffice.js.flow +45 -0
  495. package/src/icons/microsoft-office/IconOffice.tsx +38 -0
  496. package/src/icons/microsoft-office/__tests__/IconOffice.test.tsx +44 -0
  497. package/src/illustration/EmailVerification140.js.flow +102 -0
  498. package/src/illustration/EmailVerification140.stories.tsx +13 -0
  499. package/src/illustration/EmailVerification140.tsx +100 -0
  500. package/src/styles/_variables.scss +1 -0
  501. package/src/styles/common/_forms.scss +6 -0
  502. package/src/styles/constants/_layout.scss +3 -0
  503. package/src/styles/constants/_media-queries.scss +15 -0
  504. package/src/styles/variables.js +10 -1
  505. package/src/styles/variables.json +10 -1
  506. package/src/styles/variables.ts +9 -0
  507. package/src/utils/Browser.js +10 -0
  508. package/src/utils/validators.js +25 -3
@@ -7,7 +7,7 @@
7
7
  import axios from 'axios';
8
8
  import LocalStore from '../../utils/LocalStore';
9
9
  import { DEFAULT_HOSTNAME_UPLOAD, DEFAULT_HOSTNAME_UPLOAD_APP, HEADER_CONTENT_TYPE } from '../../constants';
10
- import type { StringAnyMap, StringMap } from '../../common/types/core';
10
+ import type { StringAnyMap, StringMixedMap } from '../../common/types/core';
11
11
 
12
12
  const CACHED_RESULTS_LOCAL_STORE_KEY = 'bcu-uploads-reachability-cached-results';
13
13
 
@@ -175,7 +175,7 @@ class UploadsReachability {
175
175
  */
176
176
  async makeReachabilityRequest(uploadHost: string) {
177
177
  const url = `${uploadHost}html5?reachability_test=run`;
178
- const headers: StringMap = {
178
+ const headers: StringMixedMap = {
179
179
  [HEADER_CONTENT_TYPE]: 'application/x-www-form-urlencoded; charset=UTF-8',
180
180
  'X-File-Name': 'reachability_pseudofile.txt',
181
181
  'X-File-Size': '1234',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/api/uploads/UploadsReachability.js"],"names":["axios","LocalStore","DEFAULT_HOSTNAME_UPLOAD","DEFAULT_HOSTNAME_UPLOAD_APP","HEADER_CONTENT_TYPE","CACHED_RESULTS_LOCAL_STORE_KEY","UploadsReachability","localStore","cachedResults","populateCachedResultsWithValidLocalStoreValues","saveCachedResultsToLocalStore","getItem","setItem","result","expirationTimestampMS","Date","now","uploadHost","isCachedHostValid","isHostReachable","isReachable","localStoreResults","getCachedResultsFromLocalStore","Object","keys","forEach","unreachableHosts","value","push","cachedResult","getCachedResult","makeReachabilityRequest","updateCachedResult","url","headers","data","post"],"mappings":"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","sourcesContent":["/**\n * @flow\n * @file Helper for Box uploads reachability test\n * @author Box\n */\n\nimport axios from 'axios';\nimport LocalStore from '../../utils/LocalStore';\nimport { DEFAULT_HOSTNAME_UPLOAD, DEFAULT_HOSTNAME_UPLOAD_APP, HEADER_CONTENT_TYPE } from '../../constants';\nimport type { StringAnyMap, StringMap } from '../../common/types/core';\n\nconst CACHED_RESULTS_LOCAL_STORE_KEY = 'bcu-uploads-reachability-cached-results';\n\ntype CachedResult = {\n expirationTimestampMS: number,\n isReachable: boolean,\n};\n\nclass UploadsReachability {\n localStore: LocalStore;\n\n cachedResults: { string: CachedResult };\n\n /**\n * [constructor]\n */\n constructor() {\n this.localStore = new LocalStore();\n this.cachedResults = {};\n\n // Populate cachedResults with valid values from the local store, and then save the new\n // cachedResults back to local store.\n // This cleanup of invalid entries is not strictly necessary to maintain correctness,\n // but if we don't do this cleanup results may accumulate in local storage forever.\n this.populateCachedResultsWithValidLocalStoreValues();\n this.saveCachedResultsToLocalStore();\n }\n\n /**\n * Returns existing reachability results from local store\n *\n * @private\n * @return {?Object} The results, or null if there was a problem reading the value from local store\n */\n getCachedResultsFromLocalStore() {\n return this.localStore.getItem(CACHED_RESULTS_LOCAL_STORE_KEY);\n }\n\n /**\n * Saves the cachedResults variable as a JSON string in local store.\n *\n * @private\n * @return {void}\n */\n saveCachedResultsToLocalStore() {\n this.localStore.setItem(CACHED_RESULTS_LOCAL_STORE_KEY, this.cachedResults);\n }\n\n /**\n * Returns true if the given cached result is still valid (i.e. it has not expired yet)\n *\n * @private\n * @param {StringAnyMap} result - A result object for one host\n * @return {boolean} Whether or not the result is valid\n */\n isCachedHostValid(result: StringAnyMap) {\n return result.expirationTimestampMS > Date.now();\n }\n\n /**\n * Returns the cached result for the given uploadHost\n *\n * @private\n * @param {string} uploadHost - The host URL\n * @return {null|StringAnyMap} The result object or null if there isn't one\n */\n getCachedResult(uploadHost: string) {\n if (uploadHost in this.cachedResults) {\n const result = this.cachedResults[uploadHost];\n if (this.isCachedHostValid(result)) {\n return result;\n }\n }\n\n return null;\n }\n\n /**\n * Updates a cached result. Changes both the in-memory cachedResult variable and what's stored in local store\n *\n * @private\n * @param {string} uploadHost - The host URL that was tested\n * @param {boolean} isHostReachable - Whether or not the host was reachable\n * @return {void}\n */\n updateCachedResult(uploadHost: string, isHostReachable: boolean) {\n this.cachedResults[uploadHost] = {\n isReachable: isHostReachable,\n expirationTimestampMS: Date.now() + 1000 * 86400,\n };\n this.saveCachedResultsToLocalStore();\n }\n\n /**\n * Adds to the cachedResults object with valid entries from local storage\n *\n * @private\n * @return {void}\n */\n populateCachedResultsWithValidLocalStoreValues() {\n const localStoreResults = this.getCachedResultsFromLocalStore();\n if (!localStoreResults) {\n return;\n }\n\n Object.keys(localStoreResults).forEach(uploadHost => {\n const result = localStoreResults[uploadHost];\n if (this.isCachedHostValid(result)) {\n this.cachedResults[uploadHost] = result;\n }\n });\n }\n\n /**\n * Returns the host URLs that, according to the cached reachability test results, are unreachable\n *\n * @return {Array} The unreachable host URLs\n */\n getUnreachableHostsUrls() {\n const unreachableHosts = [];\n if (!this.cachedResults) {\n return unreachableHosts;\n }\n\n Object.keys(this.cachedResults).forEach(uploadHost => {\n const value = this.cachedResults[uploadHost];\n if (this.isCachedHostValid(value) && !value.isReachable) {\n unreachableHosts.push(uploadHost);\n }\n });\n\n return unreachableHosts;\n }\n\n /**\n * Determines whether the given host is reachable by either making a test request to the uploadHost\n * or returning the result of the last reachability test it did\n *\n * @param {string} uploadHost - The upload host URL that will be stored in the cached test result and returned in\n * getUnreachableHostsUrls() if test fails (this is usually a prefix of the uploadUrl)\n * @return {Promise<boolean>} Promise that resolved to true if the host is reachable, false if it is not\n */\n async isReachable(uploadHost: string) {\n // The default upload host should always reachable\n if (uploadHost === `${DEFAULT_HOSTNAME_UPLOAD}/` || uploadHost === `${DEFAULT_HOSTNAME_UPLOAD_APP}/`) {\n return true;\n }\n\n const cachedResult = this.getCachedResult(uploadHost);\n if (cachedResult) {\n return cachedResult.isReachable;\n }\n\n const isHostReachable = await this.makeReachabilityRequest(uploadHost);\n this.updateCachedResult(uploadHost, isHostReachable);\n return isHostReachable;\n }\n\n /**\n * Determines if the given uploadHost is reachable by making a test upload request to it.\n * Does not read or modify any cached results.\n *\n * @param {string} uploadHost - The upload host url to make a test request against\n * @return {Promise<boolean>}\n */\n async makeReachabilityRequest(uploadHost: string) {\n const url = `${uploadHost}html5?reachability_test=run`;\n const headers: StringMap = {\n [HEADER_CONTENT_TYPE]: 'application/x-www-form-urlencoded; charset=UTF-8',\n 'X-File-Name': 'reachability_pseudofile.txt',\n 'X-File-Size': '1234',\n };\n const data = 'reachability_file=test_file_data';\n\n try {\n await axios.post(url, data, { headers });\n } catch (error) {\n return false;\n }\n\n return true;\n }\n}\n\nexport default UploadsReachability;\n"],"file":"UploadsReachability.js"}
1
+ {"version":3,"sources":["../../../src/api/uploads/UploadsReachability.js"],"names":["axios","LocalStore","DEFAULT_HOSTNAME_UPLOAD","DEFAULT_HOSTNAME_UPLOAD_APP","HEADER_CONTENT_TYPE","CACHED_RESULTS_LOCAL_STORE_KEY","UploadsReachability","localStore","cachedResults","populateCachedResultsWithValidLocalStoreValues","saveCachedResultsToLocalStore","getItem","setItem","result","expirationTimestampMS","Date","now","uploadHost","isCachedHostValid","isHostReachable","isReachable","localStoreResults","getCachedResultsFromLocalStore","Object","keys","forEach","unreachableHosts","value","push","cachedResult","getCachedResult","makeReachabilityRequest","updateCachedResult","url","headers","data","post"],"mappings":"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","sourcesContent":["/**\n * @flow\n * @file Helper for Box uploads reachability test\n * @author Box\n */\n\nimport axios from 'axios';\nimport LocalStore from '../../utils/LocalStore';\nimport { DEFAULT_HOSTNAME_UPLOAD, DEFAULT_HOSTNAME_UPLOAD_APP, HEADER_CONTENT_TYPE } from '../../constants';\nimport type { StringAnyMap, StringMixedMap } from '../../common/types/core';\n\nconst CACHED_RESULTS_LOCAL_STORE_KEY = 'bcu-uploads-reachability-cached-results';\n\ntype CachedResult = {\n expirationTimestampMS: number,\n isReachable: boolean,\n};\n\nclass UploadsReachability {\n localStore: LocalStore;\n\n cachedResults: { string: CachedResult };\n\n /**\n * [constructor]\n */\n constructor() {\n this.localStore = new LocalStore();\n this.cachedResults = {};\n\n // Populate cachedResults with valid values from the local store, and then save the new\n // cachedResults back to local store.\n // This cleanup of invalid entries is not strictly necessary to maintain correctness,\n // but if we don't do this cleanup results may accumulate in local storage forever.\n this.populateCachedResultsWithValidLocalStoreValues();\n this.saveCachedResultsToLocalStore();\n }\n\n /**\n * Returns existing reachability results from local store\n *\n * @private\n * @return {?Object} The results, or null if there was a problem reading the value from local store\n */\n getCachedResultsFromLocalStore() {\n return this.localStore.getItem(CACHED_RESULTS_LOCAL_STORE_KEY);\n }\n\n /**\n * Saves the cachedResults variable as a JSON string in local store.\n *\n * @private\n * @return {void}\n */\n saveCachedResultsToLocalStore() {\n this.localStore.setItem(CACHED_RESULTS_LOCAL_STORE_KEY, this.cachedResults);\n }\n\n /**\n * Returns true if the given cached result is still valid (i.e. it has not expired yet)\n *\n * @private\n * @param {StringAnyMap} result - A result object for one host\n * @return {boolean} Whether or not the result is valid\n */\n isCachedHostValid(result: StringAnyMap) {\n return result.expirationTimestampMS > Date.now();\n }\n\n /**\n * Returns the cached result for the given uploadHost\n *\n * @private\n * @param {string} uploadHost - The host URL\n * @return {null|StringAnyMap} The result object or null if there isn't one\n */\n getCachedResult(uploadHost: string) {\n if (uploadHost in this.cachedResults) {\n const result = this.cachedResults[uploadHost];\n if (this.isCachedHostValid(result)) {\n return result;\n }\n }\n\n return null;\n }\n\n /**\n * Updates a cached result. Changes both the in-memory cachedResult variable and what's stored in local store\n *\n * @private\n * @param {string} uploadHost - The host URL that was tested\n * @param {boolean} isHostReachable - Whether or not the host was reachable\n * @return {void}\n */\n updateCachedResult(uploadHost: string, isHostReachable: boolean) {\n this.cachedResults[uploadHost] = {\n isReachable: isHostReachable,\n expirationTimestampMS: Date.now() + 1000 * 86400,\n };\n this.saveCachedResultsToLocalStore();\n }\n\n /**\n * Adds to the cachedResults object with valid entries from local storage\n *\n * @private\n * @return {void}\n */\n populateCachedResultsWithValidLocalStoreValues() {\n const localStoreResults = this.getCachedResultsFromLocalStore();\n if (!localStoreResults) {\n return;\n }\n\n Object.keys(localStoreResults).forEach(uploadHost => {\n const result = localStoreResults[uploadHost];\n if (this.isCachedHostValid(result)) {\n this.cachedResults[uploadHost] = result;\n }\n });\n }\n\n /**\n * Returns the host URLs that, according to the cached reachability test results, are unreachable\n *\n * @return {Array} The unreachable host URLs\n */\n getUnreachableHostsUrls() {\n const unreachableHosts = [];\n if (!this.cachedResults) {\n return unreachableHosts;\n }\n\n Object.keys(this.cachedResults).forEach(uploadHost => {\n const value = this.cachedResults[uploadHost];\n if (this.isCachedHostValid(value) && !value.isReachable) {\n unreachableHosts.push(uploadHost);\n }\n });\n\n return unreachableHosts;\n }\n\n /**\n * Determines whether the given host is reachable by either making a test request to the uploadHost\n * or returning the result of the last reachability test it did\n *\n * @param {string} uploadHost - The upload host URL that will be stored in the cached test result and returned in\n * getUnreachableHostsUrls() if test fails (this is usually a prefix of the uploadUrl)\n * @return {Promise<boolean>} Promise that resolved to true if the host is reachable, false if it is not\n */\n async isReachable(uploadHost: string) {\n // The default upload host should always reachable\n if (uploadHost === `${DEFAULT_HOSTNAME_UPLOAD}/` || uploadHost === `${DEFAULT_HOSTNAME_UPLOAD_APP}/`) {\n return true;\n }\n\n const cachedResult = this.getCachedResult(uploadHost);\n if (cachedResult) {\n return cachedResult.isReachable;\n }\n\n const isHostReachable = await this.makeReachabilityRequest(uploadHost);\n this.updateCachedResult(uploadHost, isHostReachable);\n return isHostReachable;\n }\n\n /**\n * Determines if the given uploadHost is reachable by making a test upload request to it.\n * Does not read or modify any cached results.\n *\n * @param {string} uploadHost - The upload host url to make a test request against\n * @return {Promise<boolean>}\n */\n async makeReachabilityRequest(uploadHost: string) {\n const url = `${uploadHost}html5?reachability_test=run`;\n const headers: StringMixedMap = {\n [HEADER_CONTENT_TYPE]: 'application/x-www-form-urlencoded; charset=UTF-8',\n 'X-File-Name': 'reachability_pseudofile.txt',\n 'X-File-Size': '1234',\n };\n const data = 'reachability_file=test_file_data';\n\n try {\n await axios.post(url, data, { headers });\n } catch (error) {\n return false;\n }\n\n return true;\n }\n}\n\nexport default UploadsReachability;\n"],"file":"UploadsReachability.js"}
@@ -71,6 +71,10 @@ var messages = defineMessages({
71
71
  requiredFieldError: {
72
72
  "id": "boxui.validation.requiredError",
73
73
  "defaultMessage": "Required Field"
74
+ },
75
+ invalidDateError: {
76
+ "id": "boxui.validation.invalidDateError",
77
+ "defaultMessage": "Invalid Date"
74
78
  }
75
79
  });
76
80
  export default messages;
@@ -92,6 +92,11 @@ const messages = defineMessages({
92
92
  description: 'Error message for when a required field is missing',
93
93
  id: 'boxui.validation.requiredError',
94
94
  },
95
+ invalidDateError: {
96
+ defaultMessage: 'Invalid Date',
97
+ description: 'Error message for when an invalid Date is entered',
98
+ id: 'boxui.validation.invalidDateError',
99
+ },
95
100
  });
96
101
 
97
102
  export default messages;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/common/messages.js"],"names":["defineMessages","messages","cancel","close","copy","copied","done","okay","save","send","optional","pillSelectorPlaceholder","messageSelectorPlaceholder","invalidInputError","minLengthError","maxLengthError","invalidEmailError","invalidURLError","invalidUserError","requiredFieldError"],"mappings":"AACA,SAASA,cAAT,QAA+B,YAA/B;AAEA,IAAMC,QAAQ,GAAGD,cAAc,CAAC;AAC5BE,EAAAA,MAAM;AAAA;AAAA;AAAA,GADsB;AAM5BC,EAAAA,KAAK;AAAA;AAAA;AAAA,GANuB;AAW5BC,EAAAA,IAAI;AAAA;AAAA;AAAA,GAXwB;AAgB5BC,EAAAA,MAAM;AAAA;AAAA;AAAA,GAhBsB;AAqB5BC,EAAAA,IAAI;AAAA;AAAA;AAAA,GArBwB;AA0B5BC,EAAAA,IAAI;AAAA;AAAA;AAAA,GA1BwB;AA+B5BC,EAAAA,IAAI;AAAA;AAAA;AAAA,GA/BwB;AAoC5BC,EAAAA,IAAI;AAAA;AAAA;AAAA,GApCwB;AAyC5BC,EAAAA,QAAQ;AAAA;AAAA;AAAA,GAzCoB;AA8C5BC,EAAAA,uBAAuB;AAAA;AAAA;AAAA,GA9CK;AAmD5BC,EAAAA,0BAA0B;AAAA;AAAA;AAAA,GAnDE;AAwD5BC,EAAAA,iBAAiB;AAAA;AAAA;AAAA,GAxDW;AA6D5BC,EAAAA,cAAc;AAAA;AAAA;AAAA,GA7Dc;AAkE5BC,EAAAA,cAAc;AAAA;AAAA;AAAA,GAlEc;AAuE5BC,EAAAA,iBAAiB;AAAA;AAAA;AAAA,GAvEW;AA4E5BC,EAAAA,eAAe;AAAA;AAAA;AAAA,GA5Ea;AAiF5BC,EAAAA,gBAAgB;AAAA;AAAA;AAAA,GAjFY;AAsF5BC,EAAAA,kBAAkB;AAAA;AAAA;AAAA;AAtFU,CAAD,CAA/B;AA6FA,eAAelB,QAAf","sourcesContent":["// @flow\nimport { defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n cancel: {\n defaultMessage: 'Cancel',\n description: 'Cancel button text',\n id: 'boxui.core.cancel',\n },\n close: {\n defaultMessage: 'Close',\n description: 'Close button text',\n id: 'boxui.core.close',\n },\n copy: {\n defaultMessage: 'Copy',\n description: 'Copy button text',\n id: 'boxui.core.copy',\n },\n copied: {\n defaultMessage: 'Copied',\n description: 'Copy button text after user clicks on it',\n id: 'boxui.core.copied',\n },\n done: {\n defaultMessage: 'Done',\n description: 'Done button text',\n id: 'boxui.core.done',\n },\n okay: {\n defaultMessage: 'Okay',\n description: 'Okay button text',\n id: 'boxui.core.okay',\n },\n save: {\n defaultMessage: 'Save',\n description: 'Save button text',\n id: 'boxui.core.save',\n },\n send: {\n defaultMessage: 'Send',\n description: 'Send button text',\n id: 'boxui.core.send',\n },\n optional: {\n defaultMessage: 'optional',\n description: 'Optional text for labels',\n id: 'boxui.core.optional',\n },\n pillSelectorPlaceholder: {\n defaultMessage: 'Add names or email addresses',\n description: 'Placeholder text for the pill selector',\n id: 'boxui.share.pillSelectorPlaceholder',\n },\n messageSelectorPlaceholder: {\n defaultMessage: 'Add a message',\n description: 'Placeholder text for message section',\n id: 'boxui.share.messageSelectorPlaceholder',\n },\n invalidInputError: {\n defaultMessage: 'Invalid Input',\n description: 'Generic error message for a field is invalid',\n id: 'boxui.validation.genericError',\n },\n minLengthError: {\n defaultMessage: 'Input must be at least {min} characters',\n description: 'Error message for when an input value is too short. {min} is the minimum length',\n id: 'boxui.validation.tooShortError',\n },\n maxLengthError: {\n defaultMessage: 'Input cannot exceed {max} characters',\n description: 'Error message for when an input value is too long. {max} is the maximum length',\n id: 'boxui.validation.tooLongError',\n },\n invalidEmailError: {\n defaultMessage: 'Invalid Email Address',\n description: 'Error message for when an invalid email is entered',\n id: 'boxui.validation.emailError',\n },\n invalidURLError: {\n defaultMessage: 'Invalid URL',\n description: 'Error message for when an invalid URL is entered',\n id: 'boxui.validation.URLError',\n },\n invalidUserError: {\n defaultMessage: 'Invalid User',\n description: 'Error message for when an invalid user is entered',\n id: 'boxui.validation.invalidUserError',\n },\n requiredFieldError: {\n defaultMessage: 'Required Field',\n description: 'Error message for when a required field is missing',\n id: 'boxui.validation.requiredError',\n },\n});\n\nexport default messages;\n"],"file":"messages.js"}
1
+ {"version":3,"sources":["../../src/common/messages.js"],"names":["defineMessages","messages","cancel","close","copy","copied","done","okay","save","send","optional","pillSelectorPlaceholder","messageSelectorPlaceholder","invalidInputError","minLengthError","maxLengthError","invalidEmailError","invalidURLError","invalidUserError","requiredFieldError","invalidDateError"],"mappings":"AACA,SAASA,cAAT,QAA+B,YAA/B;AAEA,IAAMC,QAAQ,GAAGD,cAAc,CAAC;AAC5BE,EAAAA,MAAM;AAAA;AAAA;AAAA,GADsB;AAM5BC,EAAAA,KAAK;AAAA;AAAA;AAAA,GANuB;AAW5BC,EAAAA,IAAI;AAAA;AAAA;AAAA,GAXwB;AAgB5BC,EAAAA,MAAM;AAAA;AAAA;AAAA,GAhBsB;AAqB5BC,EAAAA,IAAI;AAAA;AAAA;AAAA,GArBwB;AA0B5BC,EAAAA,IAAI;AAAA;AAAA;AAAA,GA1BwB;AA+B5BC,EAAAA,IAAI;AAAA;AAAA;AAAA,GA/BwB;AAoC5BC,EAAAA,IAAI;AAAA;AAAA;AAAA,GApCwB;AAyC5BC,EAAAA,QAAQ;AAAA;AAAA;AAAA,GAzCoB;AA8C5BC,EAAAA,uBAAuB;AAAA;AAAA;AAAA,GA9CK;AAmD5BC,EAAAA,0BAA0B;AAAA;AAAA;AAAA,GAnDE;AAwD5BC,EAAAA,iBAAiB;AAAA;AAAA;AAAA,GAxDW;AA6D5BC,EAAAA,cAAc;AAAA;AAAA;AAAA,GA7Dc;AAkE5BC,EAAAA,cAAc;AAAA;AAAA;AAAA,GAlEc;AAuE5BC,EAAAA,iBAAiB;AAAA;AAAA;AAAA,GAvEW;AA4E5BC,EAAAA,eAAe;AAAA;AAAA;AAAA,GA5Ea;AAiF5BC,EAAAA,gBAAgB;AAAA;AAAA;AAAA,GAjFY;AAsF5BC,EAAAA,kBAAkB;AAAA;AAAA;AAAA,GAtFU;AA2F5BC,EAAAA,gBAAgB;AAAA;AAAA;AAAA;AA3FY,CAAD,CAA/B;AAkGA,eAAenB,QAAf","sourcesContent":["// @flow\nimport { defineMessages } from 'react-intl';\n\nconst messages = defineMessages({\n cancel: {\n defaultMessage: 'Cancel',\n description: 'Cancel button text',\n id: 'boxui.core.cancel',\n },\n close: {\n defaultMessage: 'Close',\n description: 'Close button text',\n id: 'boxui.core.close',\n },\n copy: {\n defaultMessage: 'Copy',\n description: 'Copy button text',\n id: 'boxui.core.copy',\n },\n copied: {\n defaultMessage: 'Copied',\n description: 'Copy button text after user clicks on it',\n id: 'boxui.core.copied',\n },\n done: {\n defaultMessage: 'Done',\n description: 'Done button text',\n id: 'boxui.core.done',\n },\n okay: {\n defaultMessage: 'Okay',\n description: 'Okay button text',\n id: 'boxui.core.okay',\n },\n save: {\n defaultMessage: 'Save',\n description: 'Save button text',\n id: 'boxui.core.save',\n },\n send: {\n defaultMessage: 'Send',\n description: 'Send button text',\n id: 'boxui.core.send',\n },\n optional: {\n defaultMessage: 'optional',\n description: 'Optional text for labels',\n id: 'boxui.core.optional',\n },\n pillSelectorPlaceholder: {\n defaultMessage: 'Add names or email addresses',\n description: 'Placeholder text for the pill selector',\n id: 'boxui.share.pillSelectorPlaceholder',\n },\n messageSelectorPlaceholder: {\n defaultMessage: 'Add a message',\n description: 'Placeholder text for message section',\n id: 'boxui.share.messageSelectorPlaceholder',\n },\n invalidInputError: {\n defaultMessage: 'Invalid Input',\n description: 'Generic error message for a field is invalid',\n id: 'boxui.validation.genericError',\n },\n minLengthError: {\n defaultMessage: 'Input must be at least {min} characters',\n description: 'Error message for when an input value is too short. {min} is the minimum length',\n id: 'boxui.validation.tooShortError',\n },\n maxLengthError: {\n defaultMessage: 'Input cannot exceed {max} characters',\n description: 'Error message for when an input value is too long. {max} is the maximum length',\n id: 'boxui.validation.tooLongError',\n },\n invalidEmailError: {\n defaultMessage: 'Invalid Email Address',\n description: 'Error message for when an invalid email is entered',\n id: 'boxui.validation.emailError',\n },\n invalidURLError: {\n defaultMessage: 'Invalid URL',\n description: 'Error message for when an invalid URL is entered',\n id: 'boxui.validation.URLError',\n },\n invalidUserError: {\n defaultMessage: 'Invalid User',\n description: 'Error message for when an invalid user is entered',\n id: 'boxui.validation.invalidUserError',\n },\n requiredFieldError: {\n defaultMessage: 'Required Field',\n description: 'Error message for when a required field is missing',\n id: 'boxui.validation.requiredError',\n },\n invalidDateError: {\n defaultMessage: 'Invalid Date',\n description: 'Error message for when an invalid Date is entered',\n id: 'boxui.validation.invalidDateError',\n },\n});\n\nexport default messages;\n"],"file":"messages.js"}
@@ -49,6 +49,7 @@ type ClassComponent<P, S> = Class<React$Component<P, S>>;
49
49
  // }
50
50
  type StringMap = { [string]: string };
51
51
  type StringAnyMap = { [string]: any };
52
+ type StringMixedMap = { [string]: mixed };
52
53
  type StringBooleanMap = { [string]: boolean };
53
54
  type NumberBooleanMap = { [number]: boolean };
54
55
 
@@ -470,6 +471,7 @@ export type {
470
471
  ClassComponent,
471
472
  StringMap,
472
473
  StringAnyMap,
474
+ StringMixedMap,
473
475
  StringBooleanMap,
474
476
  NumberBooleanMap,
475
477
  Access,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/common/types/core.js"],"names":["ITEM_TYPE_FOLDER","ITEM_TYPE_FILE","ITEM_TYPE_WEBLINK","ACCESS_OPEN","ACCESS_COLLAB","ACCESS_COMPANY","ACCESS_NONE","VIEW_SEARCH","VIEW_FOLDER","VIEW_ERROR","VIEW_SELECTED","VIEW_RECENTS","VIEW_UPLOAD_EMPTY","VIEW_UPLOAD_IN_PROGRESS","VIEW_UPLOAD_SUCCESS","VIEW_METADATA","SORT_ASC","SORT_DESC","DELIMITER_SLASH","DELIMITER_CARET","SIZE_SMALL","SIZE_MEDIUM","SIZE_LARGE","SIZE_VERY_LARGE","FIELD_DATE","FIELD_NAME","FIELD_SIZE","FIELD_RELEVANCE","DEFAULT_VIEW_RECENTS","DEFAULT_VIEW_FILES","VERSION_RETENTION_DELETE_ACTION","VERSION_RETENTION_REMOVE_ACTION","VERSION_RETENTION_INDEFINITE","PERMISSION_CAN_DOWNLOAD","PERMISSION_CAN_PREVIEW"],"mappings":"AACA,SAASA,gBAAT,EAA2BC,cAA3B,EAA2CC,iBAA3C,QAAoE,cAApE;AACA,SACIC,WADJ,EAEIC,aAFJ,EAGIC,cAHJ,EAIIC,WAJJ,EAKIC,WALJ,EAMIC,WANJ,EAOIC,UAPJ,EAQIC,aARJ,EASIC,YATJ,EAUIC,iBAVJ,EAWIC,uBAXJ,EAYIC,mBAZJ,EAaIC,aAbJ,EAcIC,QAdJ,EAeIC,SAfJ,EAgBIC,eAhBJ,EAiBIC,eAjBJ,EAkBIC,UAlBJ,EAmBIC,WAnBJ,EAoBIC,UApBJ,EAqBIC,eArBJ,EAsBIC,UAtBJ,EAuBIC,UAvBJ,EAwBIC,UAxBJ,EAyBIC,eAzBJ,EA0BIC,oBA1BJ,EA2BIC,kBA3BJ,EA4BIC,+BA5BJ,EA6BIC,+BA7BJ,EA8BIC,4BA9BJ,EA+BIC,uBA/BJ,EAgCIC,sBAhCJ,QAiCO,iBAjCP","sourcesContent":["// @flow\nimport { ITEM_TYPE_FOLDER, ITEM_TYPE_FILE, ITEM_TYPE_WEBLINK } from '../constants';\nimport {\n ACCESS_OPEN,\n ACCESS_COLLAB,\n ACCESS_COMPANY,\n ACCESS_NONE,\n VIEW_SEARCH,\n VIEW_FOLDER,\n VIEW_ERROR,\n VIEW_SELECTED,\n VIEW_RECENTS,\n VIEW_UPLOAD_EMPTY,\n VIEW_UPLOAD_IN_PROGRESS,\n VIEW_UPLOAD_SUCCESS,\n VIEW_METADATA,\n SORT_ASC,\n SORT_DESC,\n DELIMITER_SLASH,\n DELIMITER_CARET,\n SIZE_SMALL,\n SIZE_MEDIUM,\n SIZE_LARGE,\n SIZE_VERY_LARGE,\n FIELD_DATE,\n FIELD_NAME,\n FIELD_SIZE,\n FIELD_RELEVANCE,\n DEFAULT_VIEW_RECENTS,\n DEFAULT_VIEW_FILES,\n VERSION_RETENTION_DELETE_ACTION,\n VERSION_RETENTION_REMOVE_ACTION,\n VERSION_RETENTION_INDEFINITE,\n PERMISSION_CAN_DOWNLOAD,\n PERMISSION_CAN_PREVIEW,\n} from '../../constants';\nimport type { MetadataType } from './metadata';\n\ntype Token = null | typeof undefined | string | Function;\ntype TokenReadWrite = { read: string, write?: string };\ntype TokenLiteral = null | typeof undefined | string | TokenReadWrite;\n\ntype ClassComponent<P, S> = Class<React$Component<P, S>>;\n\n// TODO: Investigate some better types for these different maps, perhaps make use\n// of generic types like:\n// type GenericMap<K, V> = {\n// [K]: V,\n// }\ntype StringMap = { [string]: string };\ntype StringAnyMap = { [string]: any };\ntype StringBooleanMap = { [string]: boolean };\ntype NumberBooleanMap = { [number]: boolean };\n\ntype DefaultView = typeof DEFAULT_VIEW_RECENTS | typeof DEFAULT_VIEW_FILES;\ntype View =\n | typeof VIEW_ERROR\n | typeof VIEW_SELECTED\n | typeof VIEW_RECENTS\n | typeof VIEW_FOLDER\n | typeof VIEW_SEARCH\n | typeof VIEW_UPLOAD_EMPTY\n | typeof VIEW_UPLOAD_IN_PROGRESS\n | typeof VIEW_UPLOAD_SUCCESS\n | typeof VIEW_METADATA;\n\ntype SortBy = typeof FIELD_DATE | typeof FIELD_NAME | typeof FIELD_RELEVANCE | typeof FIELD_SIZE;\ntype SortDirection = typeof SORT_ASC | typeof SORT_DESC;\ntype Delimiter = typeof DELIMITER_SLASH | typeof DELIMITER_CARET;\ntype Size = typeof SIZE_SMALL | typeof SIZE_MEDIUM | typeof SIZE_LARGE | typeof SIZE_VERY_LARGE;\n\ntype Order = {\n by: SortBy,\n direction: SortDirection,\n};\n\ntype Access = typeof ACCESS_COLLAB | typeof ACCESS_COMPANY | typeof ACCESS_OPEN | typeof ACCESS_NONE;\n\ntype NoticeType = 'info' | 'error';\n\ntype InlineNoticeType = NoticeType | 'warning' | 'success' | 'generic';\n\ntype NotificationType = NoticeType | 'default' | 'warn';\n\ntype ItemType = typeof ITEM_TYPE_FOLDER | typeof ITEM_TYPE_FILE | typeof ITEM_TYPE_WEBLINK;\n\ntype FileMini = {\n id: string,\n name: string,\n type: typeof ITEM_TYPE_FILE,\n};\n\ntype FolderMini = {\n id: string,\n name: string,\n type: typeof ITEM_TYPE_FOLDER,\n};\n\ntype UserMini = {\n avatar_url?: string,\n email?: string,\n enterprise?: {\n id: string,\n name: string,\n type: 'enterprise',\n },\n hostname?: string,\n id: string,\n login?: string,\n name: string,\n status?: string,\n type: 'user',\n};\n\ntype ContactCollection = {\n isLoaded?: boolean,\n limit?: number,\n next_marker?: string,\n offset?: number,\n order?: Array<Order>,\n previous_marker?: string,\n total_count?: number,\n};\n\ntype User = UserMini;\n\ntype UserCollection = ContactCollection & {\n entries?: Array<User>,\n};\n\ntype GroupMini = {\n id: string,\n name: string,\n permissions?: {\n can_invite_as_collaborator: boolean,\n },\n type: 'group',\n};\n\ntype GroupCollection = ContactCollection & {\n entries?: Array<GroupMini>,\n};\n\ntype ISODate = string;\n\ntype MarkerPaginatedCollection<T> = {\n entries: T[],\n limit: number,\n next_marker: ?string,\n};\n\n// Used for things like collaborator search\n// NOTE: PillSelectorDropdown requires an additional \"text\" or \"displayText\" field\ntype SelectorItem<T: any = any> = {\n id: string,\n item?: T, // ie UserMini or GroupMini\n name: string,\n value?: any,\n};\n\ntype SelectorItems<T: any = any> = Array<SelectorItem<T>>;\n\ntype Crumb = {\n id?: string,\n name: string,\n};\n\ntype BoxItemClassification = {\n color: string,\n definition: string,\n name: string,\n};\n\ntype BoxItemPermission = {\n can_annotate?: boolean,\n can_comment?: boolean,\n can_create_annotations?: boolean,\n can_delete?: boolean,\n can_download?: boolean,\n can_edit?: boolean,\n can_invite_collaborator?: boolean,\n can_preview?: boolean,\n can_rename?: boolean,\n can_set_share_access?: boolean,\n can_share?: boolean,\n can_upload?: boolean,\n can_view_annotations?: boolean,\n can_view_annotations_all?: boolean,\n can_view_annotations_self?: boolean,\n};\n\ntype BoxItemVersionPermission = {\n can_delete?: boolean,\n can_download?: boolean,\n can_preview?: boolean,\n can_upload?: boolean,\n};\n\ntype BoxItemVersionRetentionPolicy = {\n disposition_action: typeof VERSION_RETENTION_DELETE_ACTION | typeof VERSION_RETENTION_REMOVE_ACTION,\n id: string,\n policy_name: string,\n retention_length: typeof VERSION_RETENTION_INDEFINITE | string, // length in days\n type: 'retention_policy',\n};\n\ntype BoxItemVersionRetention = {\n applied_at: string,\n disposition_at: string,\n id: string,\n type: 'file_version_retention',\n winning_retention_policy: BoxItemVersionRetentionPolicy,\n};\n\ntype BoxItemVersion = {\n authenticated_download_url?: string,\n collaborators?: Object,\n created_at: string,\n extension?: string,\n id: string,\n is_download_available?: boolean,\n modified_at?: string,\n modified_by: ?User,\n name?: string,\n permissions?: BoxItemVersionPermission,\n restored_at?: string,\n restored_by?: ?User,\n retention?: BoxItemVersionRetention,\n sha1?: string,\n size?: number,\n trashed_at: ?string,\n trashed_by?: ?User,\n type: 'file_version',\n uploader_display_name?: string,\n version_end?: number,\n version_number: string,\n version_promoted?: string,\n version_start?: number,\n versions?: Array<BoxItemVersion>,\n};\n\ntype BoxItemVersionMini = {\n id: string,\n type: 'version',\n version_number: string,\n};\n\ntype BoxPathCollection = {\n entries: Array<Crumb>,\n total_count: number,\n};\n\ntype FileRepresentation = {\n content?: {\n url_template: string,\n },\n info?: {\n url: string,\n },\n properties?: {\n dimensions: string,\n paged: string,\n thumb: string,\n },\n representation?: string,\n status: {\n state: ?string,\n },\n};\n\ntype FileRepresentationResponse = {\n entries: Array<FileRepresentation>,\n};\n\ntype SharedLink = {\n access: Access,\n download_count?: number,\n download_url?: string,\n effective_access?: Access,\n effective_permission?: typeof PERMISSION_CAN_DOWNLOAD | typeof PERMISSION_CAN_PREVIEW,\n is_password_enabled?: boolean,\n password?: string | null, // the API requires a null value to remove a password\n permissions?: BoxItemPermission,\n preview_count?: number,\n unshared_at?: string | null,\n url: string,\n vanity_name?: string,\n vanity_url?: string,\n};\n\ntype SharedLinkFeatures = {\n download_url: boolean,\n password: boolean,\n vanity_name: boolean,\n};\n\ntype BoxItem = {\n allowed_shared_link_access_levels?: Array<Access>,\n authenticated_download_url?: string,\n content_created_at?: string,\n content_modified_at?: string,\n created_at?: string,\n created_by?: User,\n description?: string,\n download_url?: string,\n extension?: string,\n file_version?: BoxItemVersion,\n has_collaborations?: boolean,\n id: string,\n interacted_at?: string,\n is_download_available?: boolean,\n is_externally_owned?: boolean,\n item_collection?: BoxItemCollection, // eslint-disable-line no-use-before-define\n metadata?: MetadataType,\n modified_at?: string,\n modified_by?: User,\n name?: string,\n owned_by?: User,\n parent?: BoxItem,\n path_collection?: BoxPathCollection,\n permissions?: BoxItemPermission,\n representations?: FileRepresentationResponse,\n restored_from?: BoxItemVersion,\n selected?: boolean,\n shared_link?: SharedLink,\n shared_link_features?: SharedLinkFeatures,\n size?: number,\n thumbnailUrl?: ?string,\n type?: ItemType,\n url?: string,\n version_limit?: ?number,\n version_number?: string,\n};\n\ntype BoxItemCollection = {\n entries?: Array<BoxItem>,\n isLoaded?: boolean,\n limit?: number,\n next_marker?: string,\n offset?: number,\n order?: Array<Order>,\n previous_marker?: string,\n total_count?: number,\n};\n\ntype FlattenedBoxItemCollection = {\n entries?: Array<string>,\n isLoaded?: boolean,\n limit?: number,\n next_marker?: string,\n offset?: number,\n order?: Array<Order>,\n previous_marker?: string,\n total_count?: number,\n};\n\ntype FlattenedBoxItem = {\n allowed_shared_link_access_levels?: Array<Access>,\n created_at?: string,\n created_by?: User,\n description?: string,\n download_url?: string,\n extension?: string,\n file_version?: BoxItemVersion,\n has_collaborations?: boolean,\n id?: string,\n interacted_at?: string,\n is_externally_owned?: boolean,\n item_collection?: FlattenedBoxItemCollection,\n metadata?: MetadataType,\n modified_at?: string,\n modified_by?: User,\n name?: string,\n owned_by?: User,\n parent?: BoxItem,\n path_collection?: BoxPathCollection,\n permissions?: BoxItemPermission,\n selected?: boolean,\n shared_link?: SharedLink,\n size?: number,\n type?: ItemType,\n url?: string,\n};\n\ntype Collection = {\n boxItem?: FlattenedBoxItem,\n breadcrumbs?: Array<Crumb>,\n id?: string,\n items?: Array<BoxItem>,\n name?: string,\n nextMarker?: ?string,\n offset?: number,\n percentLoaded?: number,\n permissions?: BoxItemPermission,\n sortBy?: SortBy,\n sortDirection?: SortDirection,\n totalCount?: number,\n};\n\ntype Recent = {\n interacted_at: string,\n item: BoxItem,\n};\n\ntype RecentCollection = {\n entries: Array<Recent>,\n order: Order,\n};\n\ntype FileVersions = {\n entries: Array<BoxItemVersion>,\n total_count: number,\n};\n\ntype Reply = {\n created_at: string,\n created_by: User,\n id: string,\n message: string,\n parent: {\n id: string,\n type: string,\n },\n type: 'reply',\n};\n\ntype Collaborators = {\n entries: Array<GroupMini | UserMini>,\n next_marker: ?string,\n};\n\ntype AccessibleByUserOrGroup = {\n id: number | string,\n login: string,\n name: string,\n type: 'user' | 'group',\n};\n\ntype CollaborationOptions = {\n expires_at: string | null,\n id: number | string,\n role: string,\n status?: string,\n};\n\ntype Collaboration = CollaborationOptions & {\n accessible_by: AccessibleByUserOrGroup,\n};\n\ntype NewCollaboration = CollaborationOptions & {\n accessible_by: $Shape<AccessibleByUserOrGroup>,\n};\n\ntype Collaborations = {\n entries: Array<Collaboration>,\n next_marker: ?string,\n};\n\n// reflects an IE11 specific object to support drag\n// and drop for file uploads\ntype DOMStringList = {\n contains: (strToSearch: string) => boolean,\n item: (index: number) => string | null,\n length: number,\n};\n\nexport type {\n Token,\n TokenLiteral,\n ClassComponent,\n StringMap,\n StringAnyMap,\n StringBooleanMap,\n NumberBooleanMap,\n Access,\n DefaultView,\n View,\n SortBy,\n SortDirection,\n Order,\n SharedLink,\n InlineNoticeType,\n ItemType,\n Delimiter,\n Size,\n FileMini,\n FolderMini,\n UserMini,\n User,\n UserCollection,\n GroupMini,\n GroupCollection,\n ISODate,\n MarkerPaginatedCollection,\n SelectorItem,\n SelectorItems,\n Crumb,\n BoxItemClassification,\n BoxItemPermission,\n BoxItemVersionPermission,\n BoxItemVersionRetention,\n BoxItemVersion,\n BoxItemVersionMini,\n BoxItem,\n BoxItemCollection,\n FlattenedBoxItemCollection,\n FlattenedBoxItem,\n Collection,\n Recent,\n RecentCollection,\n FileVersions,\n FileRepresentation,\n Reply,\n NotificationType,\n Collaborators,\n Collaboration,\n Collaborations,\n NewCollaboration,\n DOMStringList,\n};\n"],"file":"core.js"}
1
+ {"version":3,"sources":["../../../src/common/types/core.js"],"names":["ITEM_TYPE_FOLDER","ITEM_TYPE_FILE","ITEM_TYPE_WEBLINK","ACCESS_OPEN","ACCESS_COLLAB","ACCESS_COMPANY","ACCESS_NONE","VIEW_SEARCH","VIEW_FOLDER","VIEW_ERROR","VIEW_SELECTED","VIEW_RECENTS","VIEW_UPLOAD_EMPTY","VIEW_UPLOAD_IN_PROGRESS","VIEW_UPLOAD_SUCCESS","VIEW_METADATA","SORT_ASC","SORT_DESC","DELIMITER_SLASH","DELIMITER_CARET","SIZE_SMALL","SIZE_MEDIUM","SIZE_LARGE","SIZE_VERY_LARGE","FIELD_DATE","FIELD_NAME","FIELD_SIZE","FIELD_RELEVANCE","DEFAULT_VIEW_RECENTS","DEFAULT_VIEW_FILES","VERSION_RETENTION_DELETE_ACTION","VERSION_RETENTION_REMOVE_ACTION","VERSION_RETENTION_INDEFINITE","PERMISSION_CAN_DOWNLOAD","PERMISSION_CAN_PREVIEW"],"mappings":"AACA,SAASA,gBAAT,EAA2BC,cAA3B,EAA2CC,iBAA3C,QAAoE,cAApE;AACA,SACIC,WADJ,EAEIC,aAFJ,EAGIC,cAHJ,EAIIC,WAJJ,EAKIC,WALJ,EAMIC,WANJ,EAOIC,UAPJ,EAQIC,aARJ,EASIC,YATJ,EAUIC,iBAVJ,EAWIC,uBAXJ,EAYIC,mBAZJ,EAaIC,aAbJ,EAcIC,QAdJ,EAeIC,SAfJ,EAgBIC,eAhBJ,EAiBIC,eAjBJ,EAkBIC,UAlBJ,EAmBIC,WAnBJ,EAoBIC,UApBJ,EAqBIC,eArBJ,EAsBIC,UAtBJ,EAuBIC,UAvBJ,EAwBIC,UAxBJ,EAyBIC,eAzBJ,EA0BIC,oBA1BJ,EA2BIC,kBA3BJ,EA4BIC,+BA5BJ,EA6BIC,+BA7BJ,EA8BIC,4BA9BJ,EA+BIC,uBA/BJ,EAgCIC,sBAhCJ,QAiCO,iBAjCP","sourcesContent":["// @flow\nimport { ITEM_TYPE_FOLDER, ITEM_TYPE_FILE, ITEM_TYPE_WEBLINK } from '../constants';\nimport {\n ACCESS_OPEN,\n ACCESS_COLLAB,\n ACCESS_COMPANY,\n ACCESS_NONE,\n VIEW_SEARCH,\n VIEW_FOLDER,\n VIEW_ERROR,\n VIEW_SELECTED,\n VIEW_RECENTS,\n VIEW_UPLOAD_EMPTY,\n VIEW_UPLOAD_IN_PROGRESS,\n VIEW_UPLOAD_SUCCESS,\n VIEW_METADATA,\n SORT_ASC,\n SORT_DESC,\n DELIMITER_SLASH,\n DELIMITER_CARET,\n SIZE_SMALL,\n SIZE_MEDIUM,\n SIZE_LARGE,\n SIZE_VERY_LARGE,\n FIELD_DATE,\n FIELD_NAME,\n FIELD_SIZE,\n FIELD_RELEVANCE,\n DEFAULT_VIEW_RECENTS,\n DEFAULT_VIEW_FILES,\n VERSION_RETENTION_DELETE_ACTION,\n VERSION_RETENTION_REMOVE_ACTION,\n VERSION_RETENTION_INDEFINITE,\n PERMISSION_CAN_DOWNLOAD,\n PERMISSION_CAN_PREVIEW,\n} from '../../constants';\nimport type { MetadataType } from './metadata';\n\ntype Token = null | typeof undefined | string | Function;\ntype TokenReadWrite = { read: string, write?: string };\ntype TokenLiteral = null | typeof undefined | string | TokenReadWrite;\n\ntype ClassComponent<P, S> = Class<React$Component<P, S>>;\n\n// TODO: Investigate some better types for these different maps, perhaps make use\n// of generic types like:\n// type GenericMap<K, V> = {\n// [K]: V,\n// }\ntype StringMap = { [string]: string };\ntype StringAnyMap = { [string]: any };\ntype StringMixedMap = { [string]: mixed };\ntype StringBooleanMap = { [string]: boolean };\ntype NumberBooleanMap = { [number]: boolean };\n\ntype DefaultView = typeof DEFAULT_VIEW_RECENTS | typeof DEFAULT_VIEW_FILES;\ntype View =\n | typeof VIEW_ERROR\n | typeof VIEW_SELECTED\n | typeof VIEW_RECENTS\n | typeof VIEW_FOLDER\n | typeof VIEW_SEARCH\n | typeof VIEW_UPLOAD_EMPTY\n | typeof VIEW_UPLOAD_IN_PROGRESS\n | typeof VIEW_UPLOAD_SUCCESS\n | typeof VIEW_METADATA;\n\ntype SortBy = typeof FIELD_DATE | typeof FIELD_NAME | typeof FIELD_RELEVANCE | typeof FIELD_SIZE;\ntype SortDirection = typeof SORT_ASC | typeof SORT_DESC;\ntype Delimiter = typeof DELIMITER_SLASH | typeof DELIMITER_CARET;\ntype Size = typeof SIZE_SMALL | typeof SIZE_MEDIUM | typeof SIZE_LARGE | typeof SIZE_VERY_LARGE;\n\ntype Order = {\n by: SortBy,\n direction: SortDirection,\n};\n\ntype Access = typeof ACCESS_COLLAB | typeof ACCESS_COMPANY | typeof ACCESS_OPEN | typeof ACCESS_NONE;\n\ntype NoticeType = 'info' | 'error';\n\ntype InlineNoticeType = NoticeType | 'warning' | 'success' | 'generic';\n\ntype NotificationType = NoticeType | 'default' | 'warn';\n\ntype ItemType = typeof ITEM_TYPE_FOLDER | typeof ITEM_TYPE_FILE | typeof ITEM_TYPE_WEBLINK;\n\ntype FileMini = {\n id: string,\n name: string,\n type: typeof ITEM_TYPE_FILE,\n};\n\ntype FolderMini = {\n id: string,\n name: string,\n type: typeof ITEM_TYPE_FOLDER,\n};\n\ntype UserMini = {\n avatar_url?: string,\n email?: string,\n enterprise?: {\n id: string,\n name: string,\n type: 'enterprise',\n },\n hostname?: string,\n id: string,\n login?: string,\n name: string,\n status?: string,\n type: 'user',\n};\n\ntype ContactCollection = {\n isLoaded?: boolean,\n limit?: number,\n next_marker?: string,\n offset?: number,\n order?: Array<Order>,\n previous_marker?: string,\n total_count?: number,\n};\n\ntype User = UserMini;\n\ntype UserCollection = ContactCollection & {\n entries?: Array<User>,\n};\n\ntype GroupMini = {\n id: string,\n name: string,\n permissions?: {\n can_invite_as_collaborator: boolean,\n },\n type: 'group',\n};\n\ntype GroupCollection = ContactCollection & {\n entries?: Array<GroupMini>,\n};\n\ntype ISODate = string;\n\ntype MarkerPaginatedCollection<T> = {\n entries: T[],\n limit: number,\n next_marker: ?string,\n};\n\n// Used for things like collaborator search\n// NOTE: PillSelectorDropdown requires an additional \"text\" or \"displayText\" field\ntype SelectorItem<T: any = any> = {\n id: string,\n item?: T, // ie UserMini or GroupMini\n name: string,\n value?: any,\n};\n\ntype SelectorItems<T: any = any> = Array<SelectorItem<T>>;\n\ntype Crumb = {\n id?: string,\n name: string,\n};\n\ntype BoxItemClassification = {\n color: string,\n definition: string,\n name: string,\n};\n\ntype BoxItemPermission = {\n can_annotate?: boolean,\n can_comment?: boolean,\n can_create_annotations?: boolean,\n can_delete?: boolean,\n can_download?: boolean,\n can_edit?: boolean,\n can_invite_collaborator?: boolean,\n can_preview?: boolean,\n can_rename?: boolean,\n can_set_share_access?: boolean,\n can_share?: boolean,\n can_upload?: boolean,\n can_view_annotations?: boolean,\n can_view_annotations_all?: boolean,\n can_view_annotations_self?: boolean,\n};\n\ntype BoxItemVersionPermission = {\n can_delete?: boolean,\n can_download?: boolean,\n can_preview?: boolean,\n can_upload?: boolean,\n};\n\ntype BoxItemVersionRetentionPolicy = {\n disposition_action: typeof VERSION_RETENTION_DELETE_ACTION | typeof VERSION_RETENTION_REMOVE_ACTION,\n id: string,\n policy_name: string,\n retention_length: typeof VERSION_RETENTION_INDEFINITE | string, // length in days\n type: 'retention_policy',\n};\n\ntype BoxItemVersionRetention = {\n applied_at: string,\n disposition_at: string,\n id: string,\n type: 'file_version_retention',\n winning_retention_policy: BoxItemVersionRetentionPolicy,\n};\n\ntype BoxItemVersion = {\n authenticated_download_url?: string,\n collaborators?: Object,\n created_at: string,\n extension?: string,\n id: string,\n is_download_available?: boolean,\n modified_at?: string,\n modified_by: ?User,\n name?: string,\n permissions?: BoxItemVersionPermission,\n restored_at?: string,\n restored_by?: ?User,\n retention?: BoxItemVersionRetention,\n sha1?: string,\n size?: number,\n trashed_at: ?string,\n trashed_by?: ?User,\n type: 'file_version',\n uploader_display_name?: string,\n version_end?: number,\n version_number: string,\n version_promoted?: string,\n version_start?: number,\n versions?: Array<BoxItemVersion>,\n};\n\ntype BoxItemVersionMini = {\n id: string,\n type: 'version',\n version_number: string,\n};\n\ntype BoxPathCollection = {\n entries: Array<Crumb>,\n total_count: number,\n};\n\ntype FileRepresentation = {\n content?: {\n url_template: string,\n },\n info?: {\n url: string,\n },\n properties?: {\n dimensions: string,\n paged: string,\n thumb: string,\n },\n representation?: string,\n status: {\n state: ?string,\n },\n};\n\ntype FileRepresentationResponse = {\n entries: Array<FileRepresentation>,\n};\n\ntype SharedLink = {\n access: Access,\n download_count?: number,\n download_url?: string,\n effective_access?: Access,\n effective_permission?: typeof PERMISSION_CAN_DOWNLOAD | typeof PERMISSION_CAN_PREVIEW,\n is_password_enabled?: boolean,\n password?: string | null, // the API requires a null value to remove a password\n permissions?: BoxItemPermission,\n preview_count?: number,\n unshared_at?: string | null,\n url: string,\n vanity_name?: string,\n vanity_url?: string,\n};\n\ntype SharedLinkFeatures = {\n download_url: boolean,\n password: boolean,\n vanity_name: boolean,\n};\n\ntype BoxItem = {\n allowed_shared_link_access_levels?: Array<Access>,\n authenticated_download_url?: string,\n content_created_at?: string,\n content_modified_at?: string,\n created_at?: string,\n created_by?: User,\n description?: string,\n download_url?: string,\n extension?: string,\n file_version?: BoxItemVersion,\n has_collaborations?: boolean,\n id: string,\n interacted_at?: string,\n is_download_available?: boolean,\n is_externally_owned?: boolean,\n item_collection?: BoxItemCollection, // eslint-disable-line no-use-before-define\n metadata?: MetadataType,\n modified_at?: string,\n modified_by?: User,\n name?: string,\n owned_by?: User,\n parent?: BoxItem,\n path_collection?: BoxPathCollection,\n permissions?: BoxItemPermission,\n representations?: FileRepresentationResponse,\n restored_from?: BoxItemVersion,\n selected?: boolean,\n shared_link?: SharedLink,\n shared_link_features?: SharedLinkFeatures,\n size?: number,\n thumbnailUrl?: ?string,\n type?: ItemType,\n url?: string,\n version_limit?: ?number,\n version_number?: string,\n};\n\ntype BoxItemCollection = {\n entries?: Array<BoxItem>,\n isLoaded?: boolean,\n limit?: number,\n next_marker?: string,\n offset?: number,\n order?: Array<Order>,\n previous_marker?: string,\n total_count?: number,\n};\n\ntype FlattenedBoxItemCollection = {\n entries?: Array<string>,\n isLoaded?: boolean,\n limit?: number,\n next_marker?: string,\n offset?: number,\n order?: Array<Order>,\n previous_marker?: string,\n total_count?: number,\n};\n\ntype FlattenedBoxItem = {\n allowed_shared_link_access_levels?: Array<Access>,\n created_at?: string,\n created_by?: User,\n description?: string,\n download_url?: string,\n extension?: string,\n file_version?: BoxItemVersion,\n has_collaborations?: boolean,\n id?: string,\n interacted_at?: string,\n is_externally_owned?: boolean,\n item_collection?: FlattenedBoxItemCollection,\n metadata?: MetadataType,\n modified_at?: string,\n modified_by?: User,\n name?: string,\n owned_by?: User,\n parent?: BoxItem,\n path_collection?: BoxPathCollection,\n permissions?: BoxItemPermission,\n selected?: boolean,\n shared_link?: SharedLink,\n size?: number,\n type?: ItemType,\n url?: string,\n};\n\ntype Collection = {\n boxItem?: FlattenedBoxItem,\n breadcrumbs?: Array<Crumb>,\n id?: string,\n items?: Array<BoxItem>,\n name?: string,\n nextMarker?: ?string,\n offset?: number,\n percentLoaded?: number,\n permissions?: BoxItemPermission,\n sortBy?: SortBy,\n sortDirection?: SortDirection,\n totalCount?: number,\n};\n\ntype Recent = {\n interacted_at: string,\n item: BoxItem,\n};\n\ntype RecentCollection = {\n entries: Array<Recent>,\n order: Order,\n};\n\ntype FileVersions = {\n entries: Array<BoxItemVersion>,\n total_count: number,\n};\n\ntype Reply = {\n created_at: string,\n created_by: User,\n id: string,\n message: string,\n parent: {\n id: string,\n type: string,\n },\n type: 'reply',\n};\n\ntype Collaborators = {\n entries: Array<GroupMini | UserMini>,\n next_marker: ?string,\n};\n\ntype AccessibleByUserOrGroup = {\n id: number | string,\n login: string,\n name: string,\n type: 'user' | 'group',\n};\n\ntype CollaborationOptions = {\n expires_at: string | null,\n id: number | string,\n role: string,\n status?: string,\n};\n\ntype Collaboration = CollaborationOptions & {\n accessible_by: AccessibleByUserOrGroup,\n};\n\ntype NewCollaboration = CollaborationOptions & {\n accessible_by: $Shape<AccessibleByUserOrGroup>,\n};\n\ntype Collaborations = {\n entries: Array<Collaboration>,\n next_marker: ?string,\n};\n\n// reflects an IE11 specific object to support drag\n// and drop for file uploads\ntype DOMStringList = {\n contains: (strToSearch: string) => boolean,\n item: (index: number) => string | null,\n length: number,\n};\n\nexport type {\n Token,\n TokenLiteral,\n ClassComponent,\n StringMap,\n StringAnyMap,\n StringMixedMap,\n StringBooleanMap,\n NumberBooleanMap,\n Access,\n DefaultView,\n View,\n SortBy,\n SortDirection,\n Order,\n SharedLink,\n InlineNoticeType,\n ItemType,\n Delimiter,\n Size,\n FileMini,\n FolderMini,\n UserMini,\n User,\n UserCollection,\n GroupMini,\n GroupCollection,\n ISODate,\n MarkerPaginatedCollection,\n SelectorItem,\n SelectorItems,\n Crumb,\n BoxItemClassification,\n BoxItemPermission,\n BoxItemVersionPermission,\n BoxItemVersionRetention,\n BoxItemVersion,\n BoxItemVersionMini,\n BoxItem,\n BoxItemCollection,\n FlattenedBoxItemCollection,\n FlattenedBoxItem,\n Collection,\n Recent,\n RecentCollection,\n FileVersions,\n FileRepresentation,\n Reply,\n NotificationType,\n Collaborators,\n Collaboration,\n Collaborations,\n NewCollaboration,\n DOMStringList,\n};\n"],"file":"core.js"}
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import AccessibleSVG from '../accessible-svg/AccessibleSVG';
3
+ import * as vars from '../../styles/variables';
3
4
 
4
5
  var UnknownUserAvatar = function UnknownUserAvatar(_ref) {
5
6
  var _ref$className = _ref.className,
@@ -13,16 +14,12 @@ var UnknownUserAvatar = function UnknownUserAvatar(_ref) {
13
14
  className: "unknown-user-avatar ".concat(className),
14
15
  height: height,
15
16
  title: title,
16
- viewBox: "0 0 28 28",
17
+ viewBox: "0 0 16 16",
17
18
  width: width
18
- }, React.createElement("circle", {
19
- cx: "14",
20
- cy: "14",
21
- fill: "#ededed",
22
- r: "14"
23
- }), React.createElement("path", {
24
- d: "M5.5 25.1C6.7 21 10 18 14 18s7.3 3 8.5 7.1a14 14 0 0 1-17 0zM14 16a5 5 0 1 1 0-10 5 5 0 0 1 0 10z",
25
- fill: "#c3c3c3"
19
+ }, React.createElement("path", {
20
+ fill: vars.bdlGray50,
21
+ fillRule: "evenodd",
22
+ d: "M8 0a8 8 0 110 16A8 8 0 018 0zm0 9.5c-1.21 0-2.293.413-3.232 1.096-.56.407-.953.817-1.168 1.104a.5.5 0 00.8.6c.035-.047.114-.141.234-.267.205-.214.447-.428.722-.629.78-.567 1.665-.904 2.644-.904.979 0 1.865.337 2.644.904.275.2.517.415.722.63.12.125.199.219.234.266a.5.5 0 00.8-.6c-.215-.287-.607-.697-1.168-1.104C10.293 9.913 9.21 9.5 8 9.5zm0-6a2.5 2.5 0 000 5 2.5 2.5 0 000-5zm0 1a1.5 1.5 0 11-.001 3.001A1.5 1.5 0 018 4.5z"
26
23
  }));
27
24
  };
28
25
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/avatar/UnknownUserAvatar.tsx"],"names":["React","AccessibleSVG","UnknownUserAvatar","className","height","title","width"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,aAAP,MAAwC,iCAAxC;;AAEA,IAAMC,iBAAiB,GAAG,SAApBA,iBAAoB;AAAA,4BAAGC,SAAH;AAAA,MAAGA,SAAH,+BAAe,EAAf;AAAA,yBAAmBC,MAAnB;AAAA,MAAmBA,MAAnB,4BAA4B,EAA5B;AAAA,MAAgCC,KAAhC,QAAgCA,KAAhC;AAAA,wBAAuCC,KAAvC;AAAA,MAAuCA,KAAvC,2BAA+C,EAA/C;AAAA,SACtB,oBAAC,aAAD;AACI,IAAA,SAAS,gCAAyBH,SAAzB,CADb;AAEI,IAAA,MAAM,EAAEC,MAFZ;AAGI,IAAA,KAAK,EAAEC,KAHX;AAII,IAAA,OAAO,EAAC,WAJZ;AAKI,IAAA,KAAK,EAAEC;AALX,KAOI;AAAQ,IAAA,EAAE,EAAC,IAAX;AAAgB,IAAA,EAAE,EAAC,IAAnB;AAAwB,IAAA,IAAI,EAAC,SAA7B;AAAuC,IAAA,CAAC,EAAC;AAAzC,IAPJ,EAQI;AACI,IAAA,CAAC,EAAC,mGADN;AAEI,IAAA,IAAI,EAAC;AAFT,IARJ,CADsB;AAAA,CAA1B;;AAgBA,eAAeJ,iBAAf","sourcesContent":["import * as React from 'react';\nimport AccessibleSVG, { SVGProps } from '../accessible-svg/AccessibleSVG';\n\nconst UnknownUserAvatar = ({ className = '', height = 28, title, width = 28 }: SVGProps) => (\n <AccessibleSVG\n className={`unknown-user-avatar ${className}`}\n height={height}\n title={title}\n viewBox=\"0 0 28 28\"\n width={width}\n >\n <circle cx=\"14\" cy=\"14\" fill=\"#ededed\" r=\"14\" />\n <path\n d=\"M5.5 25.1C6.7 21 10 18 14 18s7.3 3 8.5 7.1a14 14 0 0 1-17 0zM14 16a5 5 0 1 1 0-10 5 5 0 0 1 0 10z\"\n fill=\"#c3c3c3\"\n />\n </AccessibleSVG>\n);\n\nexport default UnknownUserAvatar;\n"],"file":"UnknownUserAvatar.js"}
1
+ {"version":3,"sources":["../../../src/components/avatar/UnknownUserAvatar.tsx"],"names":["React","AccessibleSVG","vars","UnknownUserAvatar","className","height","title","width","bdlGray50"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,aAAP,MAAwC,iCAAxC;AACA,OAAO,KAAKC,IAAZ,MAAsB,wBAAtB;;AAEA,IAAMC,iBAAiB,GAAG,SAApBA,iBAAoB;AAAA,4BAAGC,SAAH;AAAA,MAAGA,SAAH,+BAAe,EAAf;AAAA,yBAAmBC,MAAnB;AAAA,MAAmBA,MAAnB,4BAA4B,EAA5B;AAAA,MAAgCC,KAAhC,QAAgCA,KAAhC;AAAA,wBAAuCC,KAAvC;AAAA,MAAuCA,KAAvC,2BAA+C,EAA/C;AAAA,SACtB,oBAAC,aAAD;AACI,IAAA,SAAS,gCAAyBH,SAAzB,CADb;AAEI,IAAA,MAAM,EAAEC,MAFZ;AAGI,IAAA,KAAK,EAAEC,KAHX;AAII,IAAA,OAAO,EAAC,WAJZ;AAKI,IAAA,KAAK,EAAEC;AALX,KAOI;AACI,IAAA,IAAI,EAAEL,IAAI,CAACM,SADf;AAEI,IAAA,QAAQ,EAAC,SAFb;AAGI,IAAA,CAAC,EAAC;AAHN,IAPJ,CADsB;AAAA,CAA1B;;AAgBA,eAAeL,iBAAf","sourcesContent":["import * as React from 'react';\nimport AccessibleSVG, { SVGProps } from '../accessible-svg/AccessibleSVG';\nimport * as vars from '../../styles/variables';\n\nconst UnknownUserAvatar = ({ className = '', height = 28, title, width = 28 }: SVGProps) => (\n <AccessibleSVG\n className={`unknown-user-avatar ${className}`}\n height={height}\n title={title}\n viewBox=\"0 0 16 16\"\n width={width}\n >\n <path\n fill={vars.bdlGray50}\n fillRule=\"evenodd\"\n d=\"M8 0a8 8 0 110 16A8 8 0 018 0zm0 9.5c-1.21 0-2.293.413-3.232 1.096-.56.407-.953.817-1.168 1.104a.5.5 0 00.8.6c.035-.047.114-.141.234-.267.205-.214.447-.428.722-.629.78-.567 1.665-.904 2.644-.904.979 0 1.865.337 2.644.904.275.2.517.415.722.63.12.125.199.219.234.266a.5.5 0 00.8-.6c-.215-.287-.607-.697-1.168-1.104C10.293 9.913 9.21 9.5 8 9.5zm0-6a2.5 2.5 0 000 5 2.5 2.5 0 000-5zm0 1a1.5 1.5 0 11-.001 3.001A1.5 1.5 0 018 4.5z\"\n />\n </AccessibleSVG>\n);\n\nexport default UnknownUserAvatar;\n"],"file":"UnknownUserAvatar.js"}
@@ -0,0 +1,24 @@
1
+ import * as React from 'react';
2
+ import classNames from 'classnames';
3
+ import Button, { ButtonType } from '../button';
4
+ import IconClose from '../../icons/general/IconClose';
5
+ import { bdlGray62 } from '../../styles/variables';
6
+ import './CloseButton.scss';
7
+
8
+ var CloseButton = function CloseButton(_ref) {
9
+ var className = _ref.className,
10
+ onClick = _ref.onClick;
11
+ return React.createElement(Button, {
12
+ className: classNames('bdl-CloseButton', className),
13
+ "data-testid": "bdl-CloseButton",
14
+ onClick: onClick,
15
+ type: ButtonType.BUTTON
16
+ }, React.createElement(IconClose, {
17
+ color: bdlGray62,
18
+ height: 18,
19
+ width: 18
20
+ }));
21
+ };
22
+
23
+ export default CloseButton;
24
+ //# sourceMappingURL=CloseButton.js.map
@@ -0,0 +1,26 @@
1
+ // @flow
2
+ import * as React from 'react';
3
+ import classNames from 'classnames';
4
+
5
+ import Button from '../button';
6
+ import IconClose from '../../icons/general/IconClose';
7
+ import { bdlGray62 } from '../../styles/variables';
8
+
9
+ import './CloseButton.scss';
10
+
11
+ type Props = {
12
+ /** Custom class for the close button */
13
+ className?: string,
14
+ /** onClick handler for the close button */
15
+ onClick?: Function,
16
+ }
17
+
18
+ const CloseButton = ({ className, onClick }: Props) => {
19
+ return (
20
+ <Button className={classNames('bdl-CloseButton', className)} onClick={onClick} type="button">
21
+ <IconClose color={bdlGray62} height={18} width={18} />
22
+ </Button>
23
+ );
24
+ };
25
+
26
+ export default CloseButton;
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/close-button/CloseButton.tsx"],"names":["React","classNames","Button","ButtonType","IconClose","bdlGray62","CloseButton","className","onClick","BUTTON"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,MAAP,IAAiBC,UAAjB,QAAmC,WAAnC;AACA,OAAOC,SAAP,MAAsB,+BAAtB;AACA,SAASC,SAAT,QAA0B,wBAA1B;AAEA,OAAO,oBAAP;;AASA,IAAMC,WAAW,GAAG,SAAdA,WAAc,OAA8C;AAAA,MAA3CC,SAA2C,QAA3CA,SAA2C;AAAA,MAAhCC,OAAgC,QAAhCA,OAAgC;AAC9D,SACI,oBAAC,MAAD;AACI,IAAA,SAAS,EAAEP,UAAU,CAAC,iBAAD,EAAoBM,SAApB,CADzB;AAEI,mBAAY,iBAFhB;AAGI,IAAA,OAAO,EAAEC,OAHb;AAII,IAAA,IAAI,EAAEL,UAAU,CAACM;AAJrB,KAMI,oBAAC,SAAD;AAAW,IAAA,KAAK,EAAEJ,SAAlB;AAA6B,IAAA,MAAM,EAAE,EAArC;AAAyC,IAAA,KAAK,EAAE;AAAhD,IANJ,CADJ;AAUH,CAXD;;AAaA,eAAeC,WAAf","sourcesContent":["import * as React from 'react';\nimport classNames from 'classnames';\n\nimport Button, { ButtonType } from '../button';\nimport IconClose from '../../icons/general/IconClose';\nimport { bdlGray62 } from '../../styles/variables';\n\nimport './CloseButton.scss';\n\nexport interface CloseButtonProps {\n /** Custom class for the close button */\n className?: string;\n /** onClick handler for the close button */\n onClick?: Function;\n}\n\nconst CloseButton = ({ className, onClick }: CloseButtonProps) => {\n return (\n <Button\n className={classNames('bdl-CloseButton', className)}\n data-testid=\"bdl-CloseButton\"\n onClick={onClick}\n type={ButtonType.BUTTON}\n >\n <IconClose color={bdlGray62} height={18} width={18} />\n </Button>\n );\n};\n\nexport default CloseButton;\n"],"file":"CloseButton.js"}
@@ -0,0 +1,10 @@
1
+ @import '../../styles/variables';
2
+
3
+ .btn.bdl-CloseButton {
4
+ width: $bdl-btn-height;
5
+ height: $bdl-btn-height;
6
+ padding: 0;
7
+ background-color: $bdl-gray-10;
8
+ border: none;
9
+ border-radius: $bdl-border-radius-size-med;
10
+ }
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+ import CloseButton from './CloseButton';
3
+ import notes from './CloseButton.stories.md';
4
+ export var regular = function regular() {
5
+ return React.createElement(CloseButton, null);
6
+ };
7
+ export default {
8
+ title: 'Components|Buttons/CloseButton',
9
+ component: CloseButton,
10
+ parameters: {
11
+ notes: notes
12
+ }
13
+ };
14
+ //# sourceMappingURL=CloseButton.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/close-button/CloseButton.stories.tsx"],"names":["React","CloseButton","notes","regular","title","component","parameters"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AAEA,OAAOC,WAAP,MAAwB,eAAxB;AACA,OAAOC,KAAP,MAAkB,0BAAlB;AAEA,OAAO,IAAMC,OAAO,GAAG,SAAVA,OAAU;AAAA,SAAM,oBAAC,WAAD,OAAN;AAAA,CAAhB;AAEP,eAAe;AACXC,EAAAA,KAAK,EAAE,gCADI;AAEXC,EAAAA,SAAS,EAAEJ,WAFA;AAGXK,EAAAA,UAAU,EAAE;AACRJ,IAAAA,KAAK,EAALA;AADQ;AAHD,CAAf","sourcesContent":["import * as React from 'react';\n\nimport CloseButton from './CloseButton';\nimport notes from './CloseButton.stories.md';\n\nexport const regular = () => <CloseButton />;\n\nexport default {\n title: 'Components|Buttons/CloseButton',\n component: CloseButton,\n parameters: {\n notes,\n },\n};\n"],"file":"CloseButton.stories.js"}
@@ -0,0 +1,2 @@
1
+ export { default } from './CloseButton';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,2 @@
1
+ // @flow
2
+ export { default } from './CloseButton';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/close-button/index.ts"],"names":["default"],"mappings":"AAAA,SAASA,OAAT,QAAwB,eAAxB","sourcesContent":["export { default } from './CloseButton';\n"],"file":"index.js"}
@@ -0,0 +1,113 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
2
+
3
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4
+
5
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
6
+
7
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
8
+
9
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
10
+
11
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
12
+
13
+ function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
14
+
15
+ function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
16
+
17
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
18
+
19
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
20
+
21
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
22
+
23
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
24
+
25
+ import Pikaday from 'pikaday';
26
+
27
+ // An extended version of Pikaday to work when `isAccessible` prop is `true`
28
+ var AccessiblePikaday =
29
+ /*#__PURE__*/
30
+ function (_Pikaday) {
31
+ _inherits(AccessiblePikaday, _Pikaday);
32
+
33
+ function AccessiblePikaday(options) {
34
+ var _this;
35
+
36
+ _classCallCheck(this, AccessiblePikaday);
37
+
38
+ _this = _possibleConstructorReturn(this, _getPrototypeOf(AccessiblePikaday).call(this, options));
39
+
40
+ _defineProperty(_assertThisInitialized(_this), "handleBlur", function () {
41
+ _this.hide();
42
+ });
43
+
44
+ _defineProperty(_assertThisInitialized(_this), "handleClickOutside", function (event) {
45
+ if (_this.isVisible() && _this.datePickerButtonEl && _this.datePickerButtonEl.contains(event.target)) {
46
+ return;
47
+ }
48
+
49
+ if (_this.isVisible() && !_this.el.contains(event.target)) {
50
+ _this.hide();
51
+
52
+ var currentFocusEl = document.activeElement;
53
+
54
+ if (_this.accessibleFieldEl && currentFocusEl && currentFocusEl.tabIndex < 0) {
55
+ _this.accessibleFieldEl.focus();
56
+ }
57
+ }
58
+ });
59
+
60
+ _this.accessibleFieldEl = options.accessibleFieldEl;
61
+ _this.datePickerButtonEl = options.datePickerButtonEl; // Override behavior as if `options.field` and `options.bound` were set.
62
+ // See https://github.com/Pikaday/Pikaday/blob/master/pikaday.js#L671
63
+ // https://github.com/Pikaday/Pikaday/blob/master/pikaday.js#L695-L703
64
+
65
+ if (_this.accessibleFieldEl) {
66
+ _this.el.classList.add('is-bound');
67
+
68
+ document.body.appendChild(_this.el);
69
+
70
+ _this.accessibleFieldEl.addEventListener('blur', _this.handleBlur);
71
+
72
+ _this.hide();
73
+ }
74
+
75
+ return _this;
76
+ }
77
+
78
+ _createClass(AccessiblePikaday, [{
79
+ key: "show",
80
+ value: function show() {
81
+ _get(_getPrototypeOf(AccessiblePikaday.prototype), "show", this).call(this);
82
+
83
+ if (this.accessibleFieldEl) {
84
+ document.addEventListener('click', this.handleClickOutside, true);
85
+ this.adjustPosition();
86
+ }
87
+ }
88
+ }, {
89
+ key: "hide",
90
+ value: function hide() {
91
+ _get(_getPrototypeOf(AccessiblePikaday.prototype), "hide", this).call(this);
92
+
93
+ if (this.accessibleFieldEl) {
94
+ document.removeEventListener('click', this.handleClickOutside);
95
+ }
96
+ }
97
+ }, {
98
+ key: "destroy",
99
+ value: function destroy() {
100
+ _get(_getPrototypeOf(AccessiblePikaday.prototype), "destroy", this).call(this);
101
+
102
+ if (this.accessibleFieldEl) {
103
+ this.accessibleFieldEl.removeEventListener('blur', this.handleBlur);
104
+ document.removeEventListener('click', this.handleClickOutside);
105
+ }
106
+ }
107
+ }]);
108
+
109
+ return AccessiblePikaday;
110
+ }(Pikaday);
111
+
112
+ export default AccessiblePikaday;
113
+ //# sourceMappingURL=AccessiblePikaday.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/date-picker/AccessiblePikaday.ts"],"names":["Pikaday","AccessiblePikaday","options","hide","event","isVisible","datePickerButtonEl","contains","target","el","currentFocusEl","document","activeElement","accessibleFieldEl","tabIndex","focus","classList","add","body","appendChild","addEventListener","handleBlur","handleClickOutside","adjustPosition","removeEventListener"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAOA,OAAP,MAAwC,SAAxC;;AAOA;IACMC,iB;;;;;AAKF,6BAAYC,OAAZ,EAA+C;AAAA;;AAAA;;AAC3C,2FAAMA,OAAN;;AAD2C,iEAkBlC,YAAM;AACf,YAAKC,IAAL;AACH,KApB8C;;AAAA,yEAsB1B,UAACC,KAAD,EAAuB;AACxC,UACI,MAAKC,SAAL,MACA,MAAKC,kBADL,IAEA,MAAKA,kBAAL,CAAwBC,QAAxB,CAAiCH,KAAK,CAACI,MAAvC,CAHJ,EAIE;AACE;AACH;;AAED,UAAI,MAAKH,SAAL,MAAoB,CAAC,MAAKI,EAAL,CAAQF,QAAR,CAAiBH,KAAK,CAACI,MAAvB,CAAzB,EAAwE;AACpE,cAAKL,IAAL;;AAEA,YAAMO,cAAc,GAAGC,QAAQ,CAACC,aAAhC;;AACA,YAAI,MAAKC,iBAAL,IAA0BH,cAA1B,IAA4CA,cAAc,CAACI,QAAf,GAA0B,CAA1E,EAA6E;AACzE,gBAAKD,iBAAL,CAAuBE,KAAvB;AACH;AACJ;AACJ,KAvC8C;;AAE3C,UAAKF,iBAAL,GAAyBX,OAAO,CAACW,iBAAjC;AACA,UAAKP,kBAAL,GAA0BJ,OAAO,CAACI,kBAAlC,CAH2C,CAK3C;AACA;AACA;;AACA,QAAI,MAAKO,iBAAT,EAA4B;AACxB,YAAKJ,EAAL,CAAQO,SAAR,CAAkBC,GAAlB,CAAsB,UAAtB;;AACAN,MAAAA,QAAQ,CAACO,IAAT,CAAcC,WAAd,CAA0B,MAAKV,EAA/B;;AAEA,YAAKI,iBAAL,CAAuBO,gBAAvB,CAAwC,MAAxC,EAAgD,MAAKC,UAArD;;AAEA,YAAKlB,IAAL;AACH;;AAf0C;AAgB9C;;;;2BAyBM;AACH;;AACA,UAAI,KAAKU,iBAAT,EAA4B;AACxBF,QAAAA,QAAQ,CAACS,gBAAT,CAA0B,OAA1B,EAAmC,KAAKE,kBAAxC,EAA4D,IAA5D;AACA,aAAKC,cAAL;AACH;AACJ;;;2BAEM;AACH;;AACA,UAAI,KAAKV,iBAAT,EAA4B;AACxBF,QAAAA,QAAQ,CAACa,mBAAT,CAA6B,OAA7B,EAAsC,KAAKF,kBAA3C;AACH;AACJ;;;8BAES;AACN;;AACA,UAAI,KAAKT,iBAAT,EAA4B;AACxB,aAAKA,iBAAL,CAAuBW,mBAAvB,CAA2C,MAA3C,EAAmD,KAAKH,UAAxD;AACAV,QAAAA,QAAQ,CAACa,mBAAT,CAA6B,OAA7B,EAAsC,KAAKF,kBAA3C;AACH;AACJ;;;;EAnE2BtB,O;;AAsEhC,eAAeC,iBAAf","sourcesContent":["import Pikaday, { PikadayOptions } from 'pikaday';\n\nexport interface AccessiblePikadayOptions extends PikadayOptions {\n accessibleFieldEl?: HTMLElement | null | undefined;\n datePickerButtonEl?: HTMLElement | null | undefined;\n}\n\n// An extended version of Pikaday to work when `isAccessible` prop is `true`\nclass AccessiblePikaday extends Pikaday {\n accessibleFieldEl: HTMLElement | null | undefined;\n\n datePickerButtonEl: HTMLElement | null | undefined;\n\n constructor(options: AccessiblePikadayOptions) {\n super(options);\n this.accessibleFieldEl = options.accessibleFieldEl;\n this.datePickerButtonEl = options.datePickerButtonEl;\n\n // Override behavior as if `options.field` and `options.bound` were set.\n // See https://github.com/Pikaday/Pikaday/blob/master/pikaday.js#L671\n // https://github.com/Pikaday/Pikaday/blob/master/pikaday.js#L695-L703\n if (this.accessibleFieldEl) {\n this.el.classList.add('is-bound');\n document.body.appendChild(this.el);\n\n this.accessibleFieldEl.addEventListener('blur', this.handleBlur);\n\n this.hide();\n }\n }\n\n handleBlur = () => {\n this.hide();\n };\n\n handleClickOutside = (event: MouseEvent) => {\n if (\n this.isVisible() &&\n this.datePickerButtonEl &&\n this.datePickerButtonEl.contains(event.target as HTMLElement)\n ) {\n return;\n }\n\n if (this.isVisible() && !this.el.contains(event.target as HTMLElement)) {\n this.hide();\n\n const currentFocusEl = document.activeElement as HTMLElement;\n if (this.accessibleFieldEl && currentFocusEl && currentFocusEl.tabIndex < 0) {\n this.accessibleFieldEl.focus();\n }\n }\n };\n\n show() {\n super.show();\n if (this.accessibleFieldEl) {\n document.addEventListener('click', this.handleClickOutside, true);\n this.adjustPosition();\n }\n }\n\n hide() {\n super.hide();\n if (this.accessibleFieldEl) {\n document.removeEventListener('click', this.handleClickOutside);\n }\n }\n\n destroy() {\n super.destroy();\n if (this.accessibleFieldEl) {\n this.accessibleFieldEl.removeEventListener('blur', this.handleBlur);\n document.removeEventListener('click', this.handleClickOutside);\n }\n }\n}\n\nexport default AccessiblePikaday;\n"],"file":"AccessiblePikaday.js"}