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.
- package/CONTRIBUTING.md +3 -1
- package/dist/explorer.css +1 -1
- package/dist/explorer.js +58 -26
- package/dist/openwith.css +1 -1
- package/dist/openwith.js +10 -17
- package/dist/picker.css +1 -1
- package/dist/picker.js +12 -19
- package/dist/preview.css +1 -1
- package/dist/preview.js +56 -24
- package/dist/sharing.css +1 -1
- package/dist/sharing.js +54 -22
- package/dist/sidebar.css +1 -1
- package/dist/sidebar.js +56 -24
- package/dist/uploader.css +1 -1
- package/dist/uploader.js +12 -19
- package/es/api/uploads/UploadsReachability.js.flow +2 -2
- package/es/api/uploads/UploadsReachability.js.map +1 -1
- package/es/common/messages.js +4 -0
- package/es/common/messages.js.flow +5 -0
- package/es/common/messages.js.map +1 -1
- package/es/common/types/core.js.flow +2 -0
- package/es/common/types/core.js.map +1 -1
- package/es/components/avatar/UnknownUserAvatar.js +6 -9
- package/es/components/avatar/UnknownUserAvatar.js.map +1 -1
- package/es/components/close-button/CloseButton.js +24 -0
- package/es/components/close-button/CloseButton.js.flow +26 -0
- package/es/components/close-button/CloseButton.js.map +1 -0
- package/es/components/close-button/CloseButton.scss +10 -0
- package/es/components/close-button/CloseButton.stories.js +14 -0
- package/es/components/close-button/CloseButton.stories.js.map +1 -0
- package/es/components/close-button/index.js +2 -0
- package/es/components/close-button/index.js.flow +2 -0
- package/es/components/close-button/index.js.map +1 -0
- package/es/components/date-picker/AccessiblePikaday.js +113 -0
- package/es/components/date-picker/AccessiblePikaday.js.map +1 -0
- package/es/components/date-picker/DatePicker.js +426 -106
- package/es/components/date-picker/DatePicker.js.map +1 -1
- package/es/components/date-picker/DatePicker.scss +32 -22
- package/es/components/date-picker/DatePicker.stories.js +10 -0
- package/es/components/date-picker/DatePicker.stories.js.map +1 -1
- package/es/components/date-picker/_pikaday.scss +8 -2
- package/es/components/flyout/Flyout.js +13 -3
- package/es/components/flyout/Flyout.js.flow +14 -3
- package/es/components/flyout/Flyout.js.map +1 -1
- package/es/components/flyout/Flyout.scss +40 -0
- package/es/components/flyout/FlyoutContext.js +6 -0
- package/es/components/flyout/FlyoutContext.js.flow +9 -0
- package/es/components/flyout/FlyoutContext.js.map +1 -0
- package/es/components/flyout/OverlayHeader.js +33 -0
- package/es/components/flyout/OverlayHeader.js.map +1 -0
- package/es/components/flyout/OverlayHeader.scss +9 -0
- package/es/components/flyout/_variables.scss +1 -0
- package/es/components/flyout/index.js +2 -0
- package/es/components/flyout/index.js.flow +2 -0
- package/es/components/flyout/index.js.map +1 -1
- package/es/components/image-tooltip/ImageTooltip.js +1 -2
- package/es/components/image-tooltip/ImageTooltip.js.map +1 -1
- package/es/components/media-query/constants.js +26 -0
- package/es/components/media-query/constants.js.flow +32 -0
- package/es/components/media-query/constants.js.map +1 -0
- package/es/components/media-query/index.js +3 -0
- package/es/components/media-query/index.js.flow +4 -0
- package/es/components/media-query/index.js.map +1 -0
- package/es/components/media-query/stories/MediaQuery.stories.js +37 -0
- package/es/components/media-query/stories/MediaQuery.stories.js.flow +80 -0
- package/es/components/media-query/stories/MediaQuery.stories.js.map +1 -0
- package/es/components/media-query/types.js +2 -0
- package/es/components/media-query/types.js.flow +29 -0
- package/es/components/media-query/types.js.map +1 -0
- package/es/components/media-query/useMediaQuery.js +91 -0
- package/es/components/media-query/useMediaQuery.js.flow +97 -0
- package/es/components/media-query/useMediaQuery.js.map +1 -0
- package/es/components/media-query/withMediaQuery.js +21 -0
- package/es/components/media-query/withMediaQuery.js.flow +23 -0
- package/es/components/media-query/withMediaQuery.js.map +1 -0
- package/es/components/modal/Modal.scss +27 -0
- package/es/components/preview/previewIcons.js +4 -0
- package/es/components/preview/previewIcons.js.map +1 -1
- package/es/components/search-form/SearchForm.scss +0 -5
- package/es/components/selector-dropdown/SelectorDropdown.js +5 -3
- package/es/components/selector-dropdown/SelectorDropdown.js.flow +3 -3
- package/es/components/selector-dropdown/SelectorDropdown.js.map +1 -1
- package/es/components/tab-view/Tabs.scss +0 -4
- package/es/components/tooltip/Tooltip.js +21 -4
- package/es/components/tooltip/Tooltip.js.map +1 -1
- package/es/constants.js +1 -0
- package/es/constants.js.flow +1 -0
- package/es/constants.js.map +1 -1
- package/es/elements/content-open-with/IconFileMap.js +0 -2
- package/es/elements/content-open-with/IconFileMap.js.flow +0 -2
- package/es/elements/content-open-with/IconFileMap.js.map +1 -1
- package/es/elements/content-sidebar/Sidebar.js +2 -1
- package/es/elements/content-sidebar/Sidebar.js.flow +1 -1
- package/es/elements/content-sidebar/Sidebar.js.map +1 -1
- package/es/elements/content-sidebar/activity-feed/common/delete-confirmation/DeleteConfirmation.scss +3 -3
- package/es/elements/content-sidebar/activity-feed/task-form/TaskForm.js +14 -4
- package/es/elements/content-sidebar/activity-feed/task-form/TaskForm.js.flow +18 -5
- package/es/elements/content-sidebar/activity-feed/task-form/TaskForm.js.map +1 -1
- package/es/elements/content-sidebar/versions/StaticVersionSidebar.js +78 -0
- package/es/elements/content-sidebar/versions/StaticVersionSidebar.js.flow +97 -0
- package/es/elements/content-sidebar/versions/StaticVersionSidebar.js.map +1 -0
- package/es/elements/content-sidebar/versions/StaticVersionsSidebar.scss +67 -0
- package/es/elements/content-sidebar/versions/VersionsSidebar.js +12 -4
- package/es/elements/content-sidebar/versions/VersionsSidebar.js.flow +16 -3
- package/es/elements/content-sidebar/versions/VersionsSidebar.js.map +1 -1
- package/es/elements/content-sidebar/versions/VersionsSidebar.scss +5 -0
- package/es/elements/content-sidebar/versions/VersionsSidebarContainer.js +42 -10
- package/es/elements/content-sidebar/versions/VersionsSidebarContainer.js.flow +42 -7
- package/es/elements/content-sidebar/versions/VersionsSidebarContainer.js.map +1 -1
- package/es/elements/content-sidebar/versions/flowTypes.js.flow +1 -0
- package/es/elements/content-sidebar/versions/messages.js +20 -0
- package/es/elements/content-sidebar/versions/messages.js.flow +28 -0
- package/es/elements/content-sidebar/versions/messages.js.map +1 -1
- package/es/features/classification/constants.js +2 -1
- package/es/features/classification/constants.js.flow +2 -0
- package/es/features/classification/constants.js.map +1 -1
- package/es/features/classification/flowTypes.js +1 -0
- package/es/features/classification/flowTypes.js.flow +7 -1
- package/es/features/classification/flowTypes.js.map +1 -1
- package/es/features/classification/security-controls/SecurityControls.js +3 -4
- package/es/features/classification/security-controls/SecurityControls.js.flow +3 -4
- package/es/features/classification/security-controls/SecurityControls.js.map +1 -1
- package/es/features/classification/security-controls/SecurityControlsItem.js +1 -1
- package/es/features/classification/security-controls/SecurityControlsItem.js.flow +20 -17
- package/es/features/classification/security-controls/SecurityControlsItem.js.map +1 -1
- package/es/features/classification/security-controls/SecurityControlsItem.scss +4 -0
- package/es/features/classification/security-controls/SecurityControlsModal.js +2 -2
- package/es/features/classification/security-controls/SecurityControlsModal.js.flow +2 -2
- package/es/features/classification/security-controls/SecurityControlsModal.js.map +1 -1
- package/es/features/classification/security-controls/messages.js +4 -0
- package/es/features/classification/security-controls/messages.js.flow +5 -0
- package/es/features/classification/security-controls/messages.js.map +1 -1
- package/es/features/classification/security-controls/utils.js +56 -35
- package/es/features/classification/security-controls/utils.js.flow +51 -27
- package/es/features/classification/security-controls/utils.js.map +1 -1
- package/es/features/collapsible-sidebar/CollapsibleSidebar.js +9 -3
- package/es/features/collapsible-sidebar/CollapsibleSidebar.js.flow +13 -5
- package/es/features/collapsible-sidebar/CollapsibleSidebar.js.map +1 -1
- package/es/features/collapsible-sidebar/CollapsibleSidebar.scss +35 -3
- package/es/features/content-explorer/content-explorer/ContentExplorer.scss +1 -1
- package/es/features/content-explorer/item-list/ItemList.js +1 -0
- package/es/features/content-explorer/item-list/ItemList.js.flow +1 -0
- package/es/features/content-explorer/item-list/ItemList.js.map +1 -1
- package/es/features/content-explorer/item-list/ItemListName.js +13 -2
- package/es/features/content-explorer/item-list/ItemListName.js.flow +3 -2
- package/es/features/content-explorer/item-list/ItemListName.js.map +1 -1
- package/es/features/header-flyout/HeaderFlyout.js +8 -10
- package/es/features/header-flyout/HeaderFlyout.js.flow +4 -8
- package/es/features/header-flyout/HeaderFlyout.js.map +1 -1
- package/es/features/header-flyout/styles/HeaderFlyout.scss +54 -15
- package/es/features/header-flyout/styles/_variables.scss +4 -0
- package/es/features/message-center/components/message-center-modal/MessageCenterModal.js +1 -0
- package/es/features/message-center/components/message-center-modal/MessageCenterModal.js.flow +1 -0
- package/es/features/message-center/components/message-center-modal/MessageCenterModal.js.map +1 -1
- package/es/features/presence/PresenceCollaborator.js +90 -0
- package/es/features/presence/PresenceCollaborator.js.flow +81 -0
- package/es/features/presence/PresenceCollaborator.js.map +1 -0
- package/es/features/presence/PresenceCollaborator.scss +28 -0
- package/es/features/presence/PresenceCollaboratorsList.js +9 -57
- package/es/features/presence/PresenceCollaboratorsList.js.flow +7 -58
- package/es/features/presence/PresenceCollaboratorsList.js.map +1 -1
- package/es/features/presence/PresenceCollaboratorsList.scss +8 -35
- package/es/features/quick-search/QuickSearch.js +4 -2
- package/es/features/quick-search/QuickSearch.js.flow +13 -1
- package/es/features/quick-search/QuickSearch.js.map +1 -1
- package/es/features/unified-share-modal/SharedLinkSection.js +9 -20
- package/es/features/unified-share-modal/SharedLinkSection.js.flow +6 -27
- package/es/features/unified-share-modal/SharedLinkSection.js.map +1 -1
- package/es/features/unified-share-modal/UnifiedShareForm.js +95 -53
- package/es/features/unified-share-modal/UnifiedShareForm.js.flow +70 -14
- package/es/features/unified-share-modal/UnifiedShareForm.js.map +1 -1
- package/es/features/unified-share-modal/UnifiedShareModal.scss +3 -0
- package/es/features/unified-share-modal/flowTypes.js.flow +6 -0
- package/es/features/unified-share-modal/flowTypes.js.map +1 -1
- package/es/features/unified-share-modal/messages.js +8 -0
- package/es/features/unified-share-modal/messages.js.flow +10 -0
- package/es/features/unified-share-modal/messages.js.map +1 -1
- package/es/features/unified-share-modal/utils/mergeContacts.js +13 -10
- package/es/features/unified-share-modal/utils/mergeContacts.js.flow +4 -2
- package/es/features/unified-share-modal/utils/mergeContacts.js.map +1 -1
- package/es/icon/content/FileXbd32.js +39 -0
- package/es/icon/content/FileXbd32.js.flow +38 -0
- package/es/icon/content/FileXbd32.js.map +1 -0
- package/es/icon/content/FileXbd32.stories.js +13 -0
- package/es/icon/content/FileXbd32.stories.js.map +1 -0
- package/es/icon/content/FileXdw32.js +39 -0
- package/es/icon/content/FileXdw32.js.flow +38 -0
- package/es/icon/content/FileXdw32.js.map +1 -0
- package/es/icon/content/FileXdw32.stories.js +13 -0
- package/es/icon/content/FileXdw32.stories.js.map +1 -0
- package/es/icon/content/RetentionPolicyModifiable32.js +36 -0
- package/es/icon/content/RetentionPolicyModifiable32.js.flow +31 -0
- package/es/icon/content/RetentionPolicyModifiable32.js.map +1 -0
- package/es/icon/content/RetentionPolicyModifiable32.stories.js +13 -0
- package/es/icon/content/RetentionPolicyModifiable32.stories.js.map +1 -0
- package/es/icon/content/RetentionPolicyNonModifiable32.js +36 -0
- package/es/icon/content/RetentionPolicyNonModifiable32.js.flow +31 -0
- package/es/icon/content/RetentionPolicyNonModifiable32.js.map +1 -0
- package/es/icon/content/RetentionPolicyNonModifiable32.stories.js +13 -0
- package/es/icon/content/RetentionPolicyNonModifiable32.stories.js.map +1 -0
- package/es/icons/avatars/UnknownUserAvatar.js +10 -34
- package/es/icons/avatars/UnknownUserAvatar.js.map +1 -1
- package/es/icons/file-icon/FileIcon.js +8 -2
- package/es/icons/file-icon/FileIcon.js.flow +2 -2
- package/es/icons/file-icon/FileIcon.js.map +1 -1
- package/es/icons/general/IconSearch.js +1 -1
- package/es/icons/general/IconSearch.js.flow +1 -1
- package/es/icons/general/IconSearch.js.map +1 -1
- package/es/icons/general/IconSearchJuicy.js +30 -0
- package/es/icons/general/IconSearchJuicy.js.flow +26 -0
- package/es/icons/general/IconSearchJuicy.js.map +1 -0
- package/es/icons/google-docs/IconGoogle.js +89 -0
- package/es/icons/google-docs/IconGoogle.js.flow +57 -0
- package/es/icons/google-docs/IconGoogle.js.map +1 -0
- package/es/icons/item-icon/ItemIcon.js +4 -0
- package/es/icons/item-icon/ItemIcon.js.map +1 -1
- package/es/icons/microsoft-office/IconOffice.js +80 -0
- package/es/icons/microsoft-office/IconOffice.js.flow +45 -0
- package/es/icons/microsoft-office/IconOffice.js.map +1 -0
- package/es/illustration/EmailVerification140.js +111 -0
- package/es/illustration/EmailVerification140.js.flow +102 -0
- package/es/illustration/EmailVerification140.js.map +1 -0
- package/es/illustration/EmailVerification140.stories.js +13 -0
- package/es/illustration/EmailVerification140.stories.js.map +1 -0
- package/es/src/components/close-button/CloseButton.d.ts +9 -0
- package/es/src/components/close-button/CloseButton.stories.d.ts +9 -0
- package/es/src/components/close-button/__tests__/CloseButton.stories.test.d.ts +0 -0
- package/es/src/components/close-button/__tests__/CloseButton.test.d.ts +1 -0
- package/es/src/components/close-button/index.d.ts +1 -0
- package/es/src/components/date-picker/AccessiblePikaday.d.ts +16 -0
- package/es/src/components/date-picker/DatePicker.d.ts +33 -6
- package/es/src/components/date-picker/DatePicker.stories.d.ts +2 -1
- package/es/src/components/flyout/OverlayHeader.d.ts +10 -0
- package/es/src/components/tooltip/Tooltip.d.ts +4 -3
- package/es/src/icon/content/FileXbd32.d.ts +13 -0
- package/es/src/icon/content/FileXbd32.stories.d.ts +9 -0
- package/es/src/icon/content/FileXdw32.d.ts +13 -0
- package/es/src/icon/content/FileXdw32.stories.d.ts +9 -0
- package/es/src/icon/content/RetentionPolicyModifiable32.d.ts +13 -0
- package/es/src/icon/content/RetentionPolicyModifiable32.stories.d.ts +9 -0
- package/es/src/icon/content/RetentionPolicyNonModifiable32.d.ts +13 -0
- package/es/src/icon/content/RetentionPolicyNonModifiable32.stories.d.ts +9 -0
- package/es/src/icons/avatars/UnknownUserAvatar.d.ts +0 -1
- package/es/src/icons/general/IconSearchJuicy.d.ts +3 -0
- package/es/src/icons/general/__tests__/IconSearchJuicy.test.d.ts +1 -0
- package/es/src/icons/google-docs/IconGoogle.d.ts +12 -0
- package/es/src/icons/google-docs/__tests__/IconGoogle.test.d.ts +1 -0
- package/es/src/icons/item-icon/ItemIcon.d.ts +2 -0
- package/es/src/icons/microsoft-office/IconOffice.d.ts +12 -0
- package/es/src/icons/microsoft-office/__tests__/IconOffice.test.d.ts +1 -0
- package/es/src/illustration/EmailVerification140.d.ts +13 -0
- package/es/src/illustration/EmailVerification140.stories.d.ts +9 -0
- package/es/src/styles/variables.d.ts +9 -0
- package/es/styles/_variables.scss +1 -0
- package/es/styles/common/_forms.scss +6 -0
- package/es/styles/constants/_layout.scss +3 -0
- package/es/styles/constants/_media-queries.scss +15 -0
- package/es/styles/variables.js +18 -0
- package/es/styles/variables.js.flow +10 -1
- package/es/styles/variables.js.map +1 -1
- package/es/utils/Browser.js +12 -0
- package/es/utils/Browser.js.flow +10 -0
- package/es/utils/Browser.js.map +1 -1
- package/es/utils/validators.js +26 -4
- package/es/utils/validators.js.flow +25 -3
- package/es/utils/validators.js.map +1 -1
- package/i18n/bn-IN.js +12 -0
- package/i18n/bn-IN.properties +24 -0
- package/i18n/da-DK.js +12 -0
- package/i18n/da-DK.properties +24 -0
- package/i18n/de-DE.js +12 -0
- package/i18n/de-DE.properties +24 -0
- package/i18n/en-AU.js +12 -0
- package/i18n/en-AU.properties +24 -0
- package/i18n/en-CA.js +12 -0
- package/i18n/en-CA.properties +24 -0
- package/i18n/en-GB.js +12 -0
- package/i18n/en-GB.properties +24 -0
- package/i18n/en-US.js +12 -0
- package/i18n/en-US.properties +24 -0
- package/i18n/en-x-pseudo.js +12 -0
- package/i18n/es-419.js +12 -0
- package/i18n/es-419.properties +24 -0
- package/i18n/es-ES.js +12 -0
- package/i18n/es-ES.properties +24 -0
- package/i18n/fi-FI.js +12 -0
- package/i18n/fi-FI.properties +24 -0
- package/i18n/fr-CA.js +12 -0
- package/i18n/fr-CA.properties +24 -0
- package/i18n/fr-FR.js +12 -0
- package/i18n/fr-FR.properties +24 -0
- package/i18n/hi-IN.js +12 -0
- package/i18n/hi-IN.properties +24 -0
- package/i18n/it-IT.js +12 -0
- package/i18n/it-IT.properties +24 -0
- package/i18n/ja-JP.js +25 -13
- package/i18n/ja-JP.properties +37 -13
- package/i18n/ko-KR.js +12 -0
- package/i18n/ko-KR.properties +24 -0
- package/i18n/nb-NO.js +12 -0
- package/i18n/nb-NO.properties +24 -0
- package/i18n/nl-NL.js +12 -0
- package/i18n/nl-NL.properties +24 -0
- package/i18n/pl-PL.js +12 -0
- package/i18n/pl-PL.properties +24 -0
- package/i18n/pt-BR.js +12 -0
- package/i18n/pt-BR.properties +24 -0
- package/i18n/ru-RU.js +12 -0
- package/i18n/ru-RU.properties +24 -0
- package/i18n/sv-SE.js +12 -0
- package/i18n/sv-SE.properties +24 -0
- package/i18n/tr-TR.js +12 -0
- package/i18n/tr-TR.properties +24 -0
- package/i18n/zh-CN.js +12 -0
- package/i18n/zh-CN.properties +24 -0
- package/i18n/zh-TW.js +12 -0
- package/i18n/zh-TW.properties +24 -0
- package/package.json +8 -5
- package/src/__mocks__/pikaday.js +1 -0
- package/src/api/__tests__/MockOpenWithData.json +2 -25
- package/src/api/uploads/UploadsReachability.js +2 -2
- package/src/common/messages.js +5 -0
- package/src/common/types/core.js +2 -0
- package/src/components/avatar/UnknownUserAvatar.tsx +5 -4
- package/src/components/close-button/CloseButton.js.flow +26 -0
- package/src/components/close-button/CloseButton.scss +10 -0
- package/src/components/close-button/CloseButton.stories.md +1 -0
- package/src/components/close-button/CloseButton.stories.tsx +14 -0
- package/src/components/close-button/CloseButton.tsx +30 -0
- package/src/components/close-button/__tests__/CloseButton.stories.test.tsx +6 -0
- package/src/components/close-button/__tests__/CloseButton.test.tsx +40 -0
- 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
- package/src/components/close-button/index.js.flow +2 -0
- package/src/components/close-button/index.ts +1 -0
- package/src/components/date-picker/AccessiblePikaday.ts +79 -0
- package/src/components/date-picker/DatePicker.scss +32 -22
- package/src/components/date-picker/DatePicker.stories.tsx +6 -0
- package/src/components/date-picker/DatePicker.tsx +350 -64
- package/src/components/date-picker/__tests__/DatePicker.test.tsx +44 -2
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/src/components/date-picker/_pikaday.scss +8 -2
- package/src/components/flyout/Flyout.js +14 -3
- package/src/components/flyout/Flyout.scss +40 -0
- package/src/components/flyout/FlyoutContext.js +9 -0
- package/src/components/flyout/OverlayHeader.scss +9 -0
- package/src/components/flyout/OverlayHeader.tsx +38 -0
- package/src/components/flyout/__tests__/Flyout.test.js +15 -0
- package/src/components/flyout/__tests__/OverlayHeader.test.js +56 -0
- package/src/components/flyout/_variables.scss +1 -0
- package/src/components/flyout/index.js +2 -0
- package/src/components/image-tooltip/ImageTooltip.tsx +1 -2
- package/src/components/media-query/__tests__/useMediaQuery.test.js +48 -0
- package/src/components/media-query/__tests__/withMediaQuery.test.js +29 -0
- package/src/components/media-query/constants.js +32 -0
- package/src/components/media-query/index.js +4 -0
- package/src/components/media-query/stories/MediaQuery.stories.js +80 -0
- package/src/components/media-query/stories/MediaQuery.stories.md +29 -0
- package/src/components/media-query/types.js +29 -0
- package/src/components/media-query/useMediaQuery.js +97 -0
- package/src/components/media-query/withMediaQuery.js +23 -0
- package/src/components/modal/Modal.scss +27 -0
- package/src/components/modal/__tests__/Modal.stories.test.js +10 -0
- 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
- 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
- package/src/components/preview/previewIcons.ts +4 -0
- package/src/components/search-form/SearchForm.scss +0 -5
- package/src/components/selector-dropdown/SelectorDropdown.js +3 -3
- package/src/components/selector-dropdown/__tests__/SelectorDropdown.test.js +5 -1
- package/src/components/sidebar-toggle-button/__tests__/__snapshots__/SidebarToggleButton.test.js.snap +0 -8
- package/src/components/tab-view/Tabs.scss +0 -4
- package/src/components/tooltip/Tooltip.tsx +20 -5
- package/src/components/tooltip/__tests__/Tooltip.test.tsx +17 -4
- package/src/components/tooltip/__tests__/__snapshots__/Tooltip.test.tsx.snap +0 -2
- package/src/constants.js +1 -0
- package/src/elements/content-open-with/IconFileMap.js +0 -2
- package/src/elements/content-open-with/__tests__/ContentOpenWith.test.js +13 -13
- package/src/elements/content-open-with/__tests__/OpenWithButton.test.js +1 -1
- package/src/elements/content-open-with/__tests__/OpenWithDropdownMenu.test.js +1 -5
- package/src/elements/content-open-with/__tests__/OpenWithDropdownMenuItem.test.js +2 -2
- package/src/elements/content-open-with/__tests__/__snapshots__/ContentOpenWith.test.js.snap +5 -5
- package/src/elements/content-open-with/__tests__/__snapshots__/OpenWithButton.test.js.snap +1 -1
- package/src/elements/content-open-with/__tests__/__snapshots__/OpenWithDropdownMenu.test.js.snap +1 -11
- package/src/elements/content-open-with/__tests__/__snapshots__/OpenWithDropdownMenuItem.test.js.snap +4 -3
- package/src/elements/content-sidebar/Sidebar.js +1 -1
- package/src/elements/content-sidebar/__tests__/AddTaskButton.test.js +15 -0
- package/src/elements/content-sidebar/activity-feed/common/delete-confirmation/DeleteConfirmation.scss +3 -3
- package/src/elements/content-sidebar/activity-feed/task-form/TaskForm.js +18 -5
- package/src/elements/content-sidebar/versions/StaticVersionSidebar.js +97 -0
- package/src/elements/content-sidebar/versions/StaticVersionsSidebar.scss +67 -0
- package/src/elements/content-sidebar/versions/VersionsSidebar.js +16 -3
- package/src/elements/content-sidebar/versions/VersionsSidebar.scss +5 -0
- package/src/elements/content-sidebar/versions/VersionsSidebarContainer.js +42 -7
- package/src/elements/content-sidebar/versions/__tests__/VersionsSidebar.test.js +18 -1
- package/src/elements/content-sidebar/versions/__tests__/VersionsSidebarContainer.test.js +51 -2
- package/src/elements/content-sidebar/versions/__tests__/__snapshots__/VersionsSidebarContainer.test.js.snap +75 -0
- package/src/elements/content-sidebar/versions/flowTypes.js +1 -0
- package/src/elements/content-sidebar/versions/messages.js +28 -0
- package/src/features/classification/constants.js +2 -0
- package/src/features/classification/flowTypes.js +7 -1
- package/src/features/classification/security-controls/SecurityControls.js +3 -4
- package/src/features/classification/security-controls/SecurityControlsItem.js +20 -17
- package/src/features/classification/security-controls/SecurityControlsItem.scss +4 -0
- package/src/features/classification/security-controls/SecurityControlsModal.js +2 -2
- package/src/features/classification/security-controls/__tests__/SecurityControlsItem.test.js +10 -0
- package/src/features/classification/security-controls/__tests__/__snapshots__/SecurityControls.test.js.snap +6 -6
- package/src/features/classification/security-controls/__tests__/__snapshots__/SecurityControlsItem.test.js.snap +35 -0
- package/src/features/classification/security-controls/__tests__/__snapshots__/SecurityControlsModal.test.js.snap +2 -2
- package/src/features/classification/security-controls/__tests__/__snapshots__/utils.test.js.snap +20 -0
- package/src/features/classification/security-controls/__tests__/utils.test.js +38 -18
- package/src/features/classification/security-controls/messages.js +5 -0
- package/src/features/classification/security-controls/utils.js +51 -27
- package/src/features/collapsible-sidebar/CollapsibleSidebar.js +13 -5
- package/src/features/collapsible-sidebar/CollapsibleSidebar.scss +35 -3
- package/src/features/collapsible-sidebar/__tests__/CollapsibleSidebar.test.js +35 -0
- package/src/features/collapsible-sidebar/__tests__/__snapshots__/CollapsibleSidebar.test.js.snap +1 -0
- package/src/features/content-explorer/content-explorer/ContentExplorer.scss +1 -1
- package/src/features/content-explorer/item-list/ItemList.js +1 -0
- package/src/features/content-explorer/item-list/ItemListName.js +3 -2
- package/src/features/content-explorer/item-list/__tests__/ItemListName.test.js +16 -2
- package/src/features/header-flyout/HeaderFlyout.js +4 -8
- package/src/features/header-flyout/__tests__/__snapshots__/HeaderFlyout.test.js.snap +14 -11
- package/src/features/header-flyout/styles/HeaderFlyout.scss +54 -15
- package/src/features/header-flyout/styles/_variables.scss +4 -0
- package/src/features/message-center/components/message-center-modal/MessageCenterModal.js +1 -0
- package/src/features/metadata-instance-editor/__tests__/__snapshots__/TemplateDropdown.test.js.snap +7 -0
- package/src/features/pagination/__tests__/__snapshots__/MarkerBasedPagination.test.js.snap +0 -8
- package/src/features/pagination/__tests__/__snapshots__/OffsetBasedPagination.test.js.snap +0 -16
- package/src/features/presence/PresenceCollaborator.js +81 -0
- package/src/features/presence/PresenceCollaborator.scss +28 -0
- package/src/features/presence/PresenceCollaboratorsList.js +7 -58
- package/src/features/presence/PresenceCollaboratorsList.scss +8 -35
- package/src/features/presence/__tests__/PresenceCollaborator.test.js +36 -0
- package/src/features/presence/__tests__/PresenceCollaboratorsList.test.js +13 -57
- package/src/features/presence/__tests__/__snapshots__/Presence.test.js.snap +5 -0
- package/src/features/presence/__tests__/__snapshots__/PresenceLink.test.js.snap +3 -0
- package/src/features/query-bar/__tests__/__snapshots__/ColumnButton.test.js.snap +3 -0
- package/src/features/quick-search/QuickSearch.js +13 -1
- package/src/features/quick-search/__tests__/QuickSearch.test.js +17 -0
- package/src/features/unified-share-modal/SharedLinkSection.js +6 -27
- package/src/features/unified-share-modal/UnifiedShareForm.js +70 -14
- package/src/features/unified-share-modal/UnifiedShareModal.scss +3 -0
- package/src/features/unified-share-modal/__tests__/EmailForm.test.js +9 -0
- package/src/features/unified-share-modal/__tests__/SharedLinkSection.test.js +14 -4
- package/src/features/unified-share-modal/__tests__/UnifiedShareForm.test.js +53 -4
- package/src/features/unified-share-modal/__tests__/__snapshots__/SharedLinkSection.test.js.snap +9 -0
- package/src/features/unified-share-modal/__tests__/__snapshots__/UnifiedShareForm.test.js.snap +0 -159
- package/src/features/unified-share-modal/flowTypes.js +6 -0
- package/src/features/unified-share-modal/messages.js +10 -0
- package/src/features/unified-share-modal/utils/__tests__/mergeContacts.test.js +23 -0
- package/src/features/unified-share-modal/utils/mergeContacts.js +4 -2
- package/src/icon/content/FileXbd32.js.flow +38 -0
- package/src/icon/content/FileXbd32.stories.tsx +13 -0
- package/src/icon/content/FileXbd32.tsx +37 -0
- package/src/icon/content/FileXdw32.js.flow +38 -0
- package/src/icon/content/FileXdw32.stories.tsx +13 -0
- package/src/icon/content/FileXdw32.tsx +37 -0
- package/src/icon/content/RetentionPolicyModifiable32.js.flow +31 -0
- package/src/icon/content/RetentionPolicyModifiable32.stories.tsx +14 -0
- package/src/icon/content/RetentionPolicyModifiable32.tsx +29 -0
- package/src/icon/content/RetentionPolicyNonModifiable32.js.flow +31 -0
- package/src/icon/content/RetentionPolicyNonModifiable32.stories.tsx +14 -0
- package/src/icon/content/RetentionPolicyNonModifiable32.tsx +29 -0
- package/src/icons/adobe-sign/README.md +1 -1
- package/src/icons/avatars/UnknownUserAvatar.tsx +7 -15
- package/src/icons/file-icon/FileIcon.js.flow +2 -2
- package/src/icons/file-icon/FileIcon.tsx +8 -2
- package/src/icons/file-icon/__tests__/FileIcon.test.tsx +28 -69
- package/src/icons/file-icon/__tests__/__snapshots__/FileIcon.test.tsx.snap +48 -34
- package/src/icons/general/IconSearch.js.flow +1 -1
- package/src/icons/general/IconSearch.tsx +1 -1
- package/src/icons/general/IconSearchJuicy.js.flow +26 -0
- package/src/icons/general/IconSearchJuicy.tsx +25 -0
- package/src/icons/general/README.md +5 -0
- package/src/icons/general/__tests__/IconSearchJuicy.test.tsx +38 -0
- package/src/icons/google-docs/IconGoogle.js.flow +57 -0
- package/src/icons/google-docs/IconGoogle.tsx +50 -0
- package/src/icons/google-docs/__tests__/IconGoogle.test.tsx +44 -0
- package/src/icons/item-icon/ItemIcon.tsx +4 -0
- package/src/icons/item-icon/__tests__/ItemIcon.test.tsx +47 -115
- package/src/icons/item-icon/__tests__/__snapshots__/ItemIcon.test.tsx.snap +229 -229
- package/src/icons/microsoft-office/IconOffice.js.flow +45 -0
- package/src/icons/microsoft-office/IconOffice.tsx +38 -0
- package/src/icons/microsoft-office/__tests__/IconOffice.test.tsx +44 -0
- package/src/illustration/EmailVerification140.js.flow +102 -0
- package/src/illustration/EmailVerification140.stories.tsx +13 -0
- package/src/illustration/EmailVerification140.tsx +100 -0
- package/src/styles/_variables.scss +1 -0
- package/src/styles/common/_forms.scss +6 -0
- package/src/styles/constants/_layout.scss +3 -0
- package/src/styles/constants/_media-queries.scss +15 -0
- package/src/styles/variables.js +10 -1
- package/src/styles/variables.json +10 -1
- package/src/styles/variables.ts +9 -0
- package/src/utils/Browser.js +10 -0
- package/src/utils/validators.js +25 -3
|
@@ -24,6 +24,8 @@ type Props = {
|
|
|
24
24
|
noItemsMessage?: React.Node,
|
|
25
25
|
/** Function called with the index of the selected option and the event (selected by keyboard or click) */
|
|
26
26
|
onSelect?: Function,
|
|
27
|
+
/** Optional title text that will be rendered above the list */
|
|
28
|
+
title?: React.Node,
|
|
27
29
|
};
|
|
28
30
|
|
|
29
31
|
type State = {
|
|
@@ -48,7 +50,16 @@ class QuickSearch extends React.Component<Props, State> {
|
|
|
48
50
|
};
|
|
49
51
|
|
|
50
52
|
render() {
|
|
51
|
-
const {
|
|
53
|
+
const {
|
|
54
|
+
children,
|
|
55
|
+
className,
|
|
56
|
+
dividerIndex,
|
|
57
|
+
errorMessage,
|
|
58
|
+
inputProps,
|
|
59
|
+
noItemsMessage,
|
|
60
|
+
onSelect,
|
|
61
|
+
title,
|
|
62
|
+
} = this.props;
|
|
52
63
|
const { showMessage } = this.state;
|
|
53
64
|
|
|
54
65
|
return (
|
|
@@ -57,6 +68,7 @@ class QuickSearch extends React.Component<Props, State> {
|
|
|
57
68
|
dividerIndex={dividerIndex}
|
|
58
69
|
onSelect={onSelect}
|
|
59
70
|
selector={<QuickSearchSelector {...inputProps} />}
|
|
71
|
+
title={title}
|
|
60
72
|
>
|
|
61
73
|
{children}
|
|
62
74
|
</SelectorDropdown>
|
|
@@ -105,6 +105,23 @@ describe('features/quick-search/QuickSearch', () => {
|
|
|
105
105
|
|
|
106
106
|
expect(selectorDropdown.prop('dividerIndex')).toEqual(1);
|
|
107
107
|
});
|
|
108
|
+
|
|
109
|
+
test('should render title when specified', () => {
|
|
110
|
+
const children = (
|
|
111
|
+
<>
|
|
112
|
+
<li key="1" />
|
|
113
|
+
<li key="2" />
|
|
114
|
+
</>
|
|
115
|
+
);
|
|
116
|
+
const title = <div>title</div>;
|
|
117
|
+
const wrapper = shallow(
|
|
118
|
+
<QuickSearch title={title} inputProps={inputProps}>
|
|
119
|
+
{children}
|
|
120
|
+
</QuickSearch>,
|
|
121
|
+
);
|
|
122
|
+
const selectorDropdown = wrapper.find('SelectorDropdown');
|
|
123
|
+
expect(selectorDropdown.prop('title')).toEqual(title);
|
|
124
|
+
});
|
|
108
125
|
});
|
|
109
126
|
|
|
110
127
|
describe('onFocus', () => {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// @flow
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
|
+
import noop from 'lodash/noop';
|
|
4
5
|
import { FormattedMessage } from 'react-intl';
|
|
5
6
|
|
|
6
7
|
import PlainButton from '../../components/plain-button';
|
|
@@ -74,7 +75,6 @@ type Props = {
|
|
|
74
75
|
type State = {
|
|
75
76
|
isAutoCreatingSharedLink: boolean,
|
|
76
77
|
isCopySuccessful: ?boolean,
|
|
77
|
-
isPermissionElevatedToEdit: boolean,
|
|
78
78
|
isSharedLinkEditTooltipShown: boolean,
|
|
79
79
|
};
|
|
80
80
|
|
|
@@ -93,7 +93,6 @@ class SharedLinkSection extends React.Component<Props, State> {
|
|
|
93
93
|
isAutoCreatingSharedLink: false,
|
|
94
94
|
isCopySuccessful: null,
|
|
95
95
|
isSharedLinkEditTooltipShown: false,
|
|
96
|
-
isPermissionElevatedToEdit: false,
|
|
97
96
|
};
|
|
98
97
|
}
|
|
99
98
|
|
|
@@ -134,12 +133,7 @@ class SharedLinkSection extends React.Component<Props, State> {
|
|
|
134
133
|
onCopyInit = () => {},
|
|
135
134
|
} = this.props;
|
|
136
135
|
|
|
137
|
-
const {
|
|
138
|
-
isAutoCreatingSharedLink,
|
|
139
|
-
isCopySuccessful,
|
|
140
|
-
isSharedLinkEditTooltipShown,
|
|
141
|
-
isPermissionElevatedToEdit,
|
|
142
|
-
} = this.state;
|
|
136
|
+
const { isAutoCreatingSharedLink, isCopySuccessful, isSharedLinkEditTooltipShown } = this.state;
|
|
143
137
|
|
|
144
138
|
if (
|
|
145
139
|
autoCreateSharedLink &&
|
|
@@ -159,21 +153,6 @@ class SharedLinkSection extends React.Component<Props, State> {
|
|
|
159
153
|
}
|
|
160
154
|
}
|
|
161
155
|
|
|
162
|
-
if (
|
|
163
|
-
prevProps.sharedLink.permissionLevel !== '' &&
|
|
164
|
-
prevProps.sharedLink.permissionLevel !== CAN_EDIT &&
|
|
165
|
-
sharedLink.permissionLevel === CAN_EDIT
|
|
166
|
-
) {
|
|
167
|
-
this.setState({ isPermissionElevatedToEdit: true });
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
if (
|
|
171
|
-
isPermissionElevatedToEdit &&
|
|
172
|
-
(sharedLink.permissionLevel !== CAN_EDIT || sharedLink.accessLevel !== ANYONE_IN_COMPANY)
|
|
173
|
-
) {
|
|
174
|
-
this.setState({ isPermissionElevatedToEdit: false });
|
|
175
|
-
}
|
|
176
|
-
|
|
177
156
|
if (
|
|
178
157
|
Browser.canWriteToClipboard() &&
|
|
179
158
|
triggerCopyOnLoad &&
|
|
@@ -267,7 +246,7 @@ class SharedLinkSection extends React.Component<Props, State> {
|
|
|
267
246
|
tooltips,
|
|
268
247
|
} = this.props;
|
|
269
248
|
|
|
270
|
-
const { isCopySuccessful,
|
|
249
|
+
const { isCopySuccessful, isSharedLinkEditTooltipShown } = this.state;
|
|
271
250
|
|
|
272
251
|
const {
|
|
273
252
|
accessLevel,
|
|
@@ -285,7 +264,7 @@ class SharedLinkSection extends React.Component<Props, State> {
|
|
|
285
264
|
onChangeSharedLinkAccessLevel,
|
|
286
265
|
onChangeSharedLinkPermissionLevel,
|
|
287
266
|
onSharedLinkAccessMenuOpen,
|
|
288
|
-
onSharedLinkCopy,
|
|
267
|
+
onSharedLinkCopy = noop,
|
|
289
268
|
sendSharedLinkButtonProps,
|
|
290
269
|
sharedLinkAccessMenuButtonProps,
|
|
291
270
|
sharedLinkPermissionsMenuButtonProps,
|
|
@@ -321,7 +300,7 @@ class SharedLinkSection extends React.Component<Props, State> {
|
|
|
321
300
|
className="shared-link-field-container"
|
|
322
301
|
disabled={submitting}
|
|
323
302
|
label=""
|
|
324
|
-
onCopySuccess={onSharedLinkCopy}
|
|
303
|
+
onCopySuccess={() => onSharedLinkCopy(permissionLevel)}
|
|
325
304
|
triggerCopyOnLoad={shouldTriggerCopyOnLoad}
|
|
326
305
|
type="url"
|
|
327
306
|
value={url}
|
|
@@ -417,7 +396,7 @@ class SharedLinkSection extends React.Component<Props, State> {
|
|
|
417
396
|
)}
|
|
418
397
|
</div>
|
|
419
398
|
)}
|
|
420
|
-
{accessLevel === ANYONE_IN_COMPANY &&
|
|
399
|
+
{accessLevel === ANYONE_IN_COMPANY && permissionLevel === CAN_EDIT && (
|
|
421
400
|
<div className="security-indicator-note">
|
|
422
401
|
<span className="security-indicator-icon-globe">
|
|
423
402
|
<IconGlobe height={12} width={12} />
|
|
@@ -5,10 +5,13 @@ import isEmpty from 'lodash/isEmpty';
|
|
|
5
5
|
import isEqual from 'lodash/isEqual';
|
|
6
6
|
import { FormattedMessage, injectIntl } from 'react-intl';
|
|
7
7
|
|
|
8
|
+
import FormattedCompMessage from '../../components/i18n/FormattedCompMessage';
|
|
8
9
|
import LoadingIndicatorWrapper from '../../components/loading-indicator/LoadingIndicatorWrapper';
|
|
9
10
|
import { Link } from '../../components/link';
|
|
10
11
|
import Button from '../../components/button';
|
|
11
12
|
import { UpgradeBadge } from '../../components/badge';
|
|
13
|
+
import InlineNotice from '../../components/inline-notice';
|
|
14
|
+
import PlainButton from '../../components/plain-button';
|
|
12
15
|
import { ITEM_TYPE_WEBLINK } from '../../common/constants';
|
|
13
16
|
import Tooltip from '../../components/tooltip';
|
|
14
17
|
import { CollaboratorAvatars, CollaboratorList } from '../collaborator-avatars';
|
|
@@ -220,8 +223,9 @@ class UnifiedShareForm extends React.Component<USFProps, State> {
|
|
|
220
223
|
};
|
|
221
224
|
|
|
222
225
|
handleSendSharedLink = (data: Object) => {
|
|
223
|
-
const { sendSharedLink, trackingProps } = this.props;
|
|
226
|
+
const { sendSharedLink, sharedLink, trackingProps } = this.props;
|
|
224
227
|
const { sharedLinkEmailTracking } = trackingProps;
|
|
228
|
+
const { permissionLevel } = sharedLink;
|
|
225
229
|
const { onSendClick } = sharedLinkEmailTracking;
|
|
226
230
|
|
|
227
231
|
const { emails, groupIDs } = data;
|
|
@@ -231,6 +235,7 @@ class UnifiedShareForm extends React.Component<USFProps, State> {
|
|
|
231
235
|
...data,
|
|
232
236
|
numsOfRecipients: emails.length,
|
|
233
237
|
numOfRecipientGroups: groupIDs.length,
|
|
238
|
+
permissionLevel,
|
|
234
239
|
};
|
|
235
240
|
onSendClick(params);
|
|
236
241
|
}
|
|
@@ -420,6 +425,7 @@ class UnifiedShareForm extends React.Component<USFProps, State> {
|
|
|
420
425
|
shouldRenderFTUXTooltip,
|
|
421
426
|
showEnterEmailsCallout = false,
|
|
422
427
|
showCalloutForUser = false,
|
|
428
|
+
showUpgradeInlineNotice = false,
|
|
423
429
|
showUpgradeOptions,
|
|
424
430
|
submitting,
|
|
425
431
|
suggestedCollaborators,
|
|
@@ -507,7 +513,7 @@ class UnifiedShareForm extends React.Component<USFProps, State> {
|
|
|
507
513
|
{...inviteCollabsEmailTracking}
|
|
508
514
|
>
|
|
509
515
|
{this.renderInviteePermissionsDropdown()}
|
|
510
|
-
{
|
|
516
|
+
{showUpgradeOptions && !showUpgradeInlineNotice && this.renderUpgradeLinkDescription()}
|
|
511
517
|
</EmailForm>
|
|
512
518
|
</div>
|
|
513
519
|
</Tooltip>
|
|
@@ -538,28 +544,75 @@ class UnifiedShareForm extends React.Component<USFProps, State> {
|
|
|
538
544
|
return avatarsContent;
|
|
539
545
|
}
|
|
540
546
|
|
|
547
|
+
renderCollaboratorMessage(resinTarget: string) {
|
|
548
|
+
const { openUpgradePlanModal = () => {} } = this.props;
|
|
549
|
+
return (
|
|
550
|
+
<>
|
|
551
|
+
<FormattedCompMessage
|
|
552
|
+
id="boxui.unifiedShare.upgradeCollaboratorAccessDescription"
|
|
553
|
+
description="Description for cta to upgrade to get collaborator access controls"
|
|
554
|
+
>
|
|
555
|
+
Set the level of{' '}
|
|
556
|
+
<Link
|
|
557
|
+
className="upgrade-link"
|
|
558
|
+
href="https://support.box.com/hc/en-us/articles/360044196413-Understanding-Collaborator-Permission-Levels"
|
|
559
|
+
target="_blank"
|
|
560
|
+
>
|
|
561
|
+
collaborator access
|
|
562
|
+
</Link>{' '}
|
|
563
|
+
and increase security through one of our paid plans.{' '}
|
|
564
|
+
</FormattedCompMessage>
|
|
565
|
+
<PlainButton
|
|
566
|
+
className="upgrade-link"
|
|
567
|
+
data-resin-target={resinTarget}
|
|
568
|
+
onClick={openUpgradePlanModal}
|
|
569
|
+
type="button"
|
|
570
|
+
>
|
|
571
|
+
<FormattedMessage {...messages.upgradeLink} />
|
|
572
|
+
</PlainButton>
|
|
573
|
+
</>
|
|
574
|
+
);
|
|
575
|
+
}
|
|
576
|
+
|
|
541
577
|
renderUpgradeLinkDescription() {
|
|
542
|
-
const { trackingProps = {} } = this.props;
|
|
578
|
+
const { openUpgradePlanModal = () => {}, showNewUpgradeText = false, trackingProps = {} } = this.props;
|
|
543
579
|
const { inviteCollabsEmailTracking = {} } = trackingProps;
|
|
544
580
|
const { upgradeLinkProps = {} } = inviteCollabsEmailTracking;
|
|
545
581
|
|
|
546
582
|
return (
|
|
547
583
|
<div className="upgrade-description">
|
|
548
|
-
<UpgradeBadge
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
584
|
+
<UpgradeBadge />
|
|
585
|
+
{showNewUpgradeText ? (
|
|
586
|
+
this.renderCollaboratorMessage('external_collab_newcopy_upgrade_cta')
|
|
587
|
+
) : (
|
|
588
|
+
<FormattedMessage
|
|
589
|
+
values={{
|
|
590
|
+
upgradeGetMoreAccessControlsLink: (
|
|
591
|
+
<PlainButton
|
|
592
|
+
className="upgrade-link"
|
|
593
|
+
onClick={openUpgradePlanModal}
|
|
594
|
+
type="button"
|
|
595
|
+
{...upgradeLinkProps}
|
|
596
|
+
>
|
|
597
|
+
<FormattedMessage {...messages.upgradeGetMoreAccessControlsLink} />
|
|
598
|
+
</PlainButton>
|
|
599
|
+
),
|
|
600
|
+
}}
|
|
601
|
+
{...messages.upgradeGetMoreAccessControlsDescription}
|
|
602
|
+
/>
|
|
603
|
+
)}
|
|
559
604
|
</div>
|
|
560
605
|
);
|
|
561
606
|
}
|
|
562
607
|
|
|
608
|
+
renderUpgradeInlineNotice() {
|
|
609
|
+
return (
|
|
610
|
+
<InlineNotice title={<FormattedMessage {...messages.upgradeInlineNoticeTitle} />} type="info">
|
|
611
|
+
{this.renderCollaboratorMessage('external_collab_top_message_upgrade_cta')}
|
|
612
|
+
</InlineNotice>
|
|
613
|
+
);
|
|
614
|
+
}
|
|
615
|
+
|
|
563
616
|
renderInviteePermissionsDropdown() {
|
|
564
617
|
const { inviteePermissions, item, submitting, canInvite, trackingProps } = this.props;
|
|
565
618
|
const { type } = item;
|
|
@@ -631,6 +684,8 @@ class UnifiedShareForm extends React.Component<USFProps, State> {
|
|
|
631
684
|
sharedLinkEditTooltipTargetingApi,
|
|
632
685
|
showEnterEmailsCallout = false,
|
|
633
686
|
showSharedLinkSettingsCallout = false,
|
|
687
|
+
showUpgradeInlineNotice = false,
|
|
688
|
+
showUpgradeOptions,
|
|
634
689
|
submitting,
|
|
635
690
|
tooltips = {},
|
|
636
691
|
trackingProps,
|
|
@@ -649,6 +704,7 @@ class UnifiedShareForm extends React.Component<USFProps, State> {
|
|
|
649
704
|
<div className={displayInModal ? '' : 'be bdl-UnifiedShareForm'}>
|
|
650
705
|
<LoadingIndicatorWrapper isLoading={isFetching} hideContent>
|
|
651
706
|
{showShareRestrictionWarning && allShareRestrictionWarning}
|
|
707
|
+
{showUpgradeOptions && showUpgradeInlineNotice && this.renderUpgradeInlineNotice()}
|
|
652
708
|
|
|
653
709
|
{!isEmailLinkSectionExpanded && !showCollaboratorList && this.renderInviteSection()}
|
|
654
710
|
|
|
@@ -403,6 +403,15 @@ describe('features/unified-share-modal/EmailForm', () => {
|
|
|
403
403
|
email: 'test@@example.com',
|
|
404
404
|
expectedValue: false,
|
|
405
405
|
},
|
|
406
|
+
// manually supplemented TLD:
|
|
407
|
+
{
|
|
408
|
+
email: 'test@@example.cpa',
|
|
409
|
+
expectedValue: true,
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
email: 'test@@example.badTLD',
|
|
413
|
+
expectedValue: true,
|
|
414
|
+
},
|
|
406
415
|
].forEach(({ email, expectedValue }) => {
|
|
407
416
|
test('should show an error if it detects an invalid email address', () => {
|
|
408
417
|
const wrapper = getWrapper();
|
|
@@ -357,8 +357,6 @@ describe('features/unified-share-modal/SharedLinkSection', () => {
|
|
|
357
357
|
|
|
358
358
|
const wrapper = getWrapper({ sharedLink });
|
|
359
359
|
|
|
360
|
-
expect(wrapper.state().isPermissionElevatedToEdit).toBe(false);
|
|
361
|
-
|
|
362
360
|
wrapper.setProps({
|
|
363
361
|
sharedLink: {
|
|
364
362
|
accessLevel: ANYONE_IN_COMPANY,
|
|
@@ -368,8 +366,6 @@ describe('features/unified-share-modal/SharedLinkSection', () => {
|
|
|
368
366
|
},
|
|
369
367
|
});
|
|
370
368
|
|
|
371
|
-
expect(wrapper.state().isPermissionElevatedToEdit).toBe(true);
|
|
372
|
-
|
|
373
369
|
expect(
|
|
374
370
|
wrapper.find(`[data-testid="shared-link-elevated-editable-company-available-message"]`).length,
|
|
375
371
|
).toEqual(1);
|
|
@@ -497,6 +493,20 @@ describe('features/unified-share-modal/SharedLinkSection', () => {
|
|
|
497
493
|
expect(onCopyErrorMock).toBeCalledTimes(0);
|
|
498
494
|
});
|
|
499
495
|
|
|
496
|
+
test('should call onSharedLinkCopy with current permission level when copy button is clicked', () => {
|
|
497
|
+
const onSharedLinkCopy = jest.fn();
|
|
498
|
+
const sharedLink = { url: 'http://example.com/', isNewSharedLink: false, permissionLevel: CAN_EDIT };
|
|
499
|
+
|
|
500
|
+
const wrapper = getWrapper({
|
|
501
|
+
sharedLink,
|
|
502
|
+
trackingProps: { onSharedLinkCopy },
|
|
503
|
+
});
|
|
504
|
+
|
|
505
|
+
wrapper.find('TextInputWithCopyButton').prop('onCopySuccess')();
|
|
506
|
+
|
|
507
|
+
expect(onSharedLinkCopy).toBeCalledWith(CAN_EDIT);
|
|
508
|
+
});
|
|
509
|
+
|
|
500
510
|
test('should only initiate copy when we specifically request a copy to be triggered', () => {
|
|
501
511
|
const sharedLink = { url: '', isNewSharedLink: false };
|
|
502
512
|
const addSharedLink = jest.fn();
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
3
|
import { ITEM_TYPE_WEBLINK, ITEM_TYPE_FOLDER } from '../../../common/constants';
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
import { CAN_EDIT, JUSTIFICATION_CHECKPOINT_EXTERNAL_COLLAB } from '../constants';
|
|
5
6
|
|
|
6
7
|
import { UnifiedShareFormBase as UnifiedShareForm } from '../UnifiedShareForm';
|
|
7
8
|
|
|
@@ -211,10 +212,30 @@ describe('features/unified-share-modal/UnifiedShareForm', () => {
|
|
|
211
212
|
isFetching: false,
|
|
212
213
|
showUpgradeOptions: true,
|
|
213
214
|
});
|
|
214
|
-
wrapper.
|
|
215
|
-
|
|
215
|
+
expect(wrapper.exists('UpgradeBadge')).toBe(true);
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
test('should render correct copy of upgrade CTA when showUpgradeOptions and showNewUpgradeText is enabled', () => {
|
|
219
|
+
const wrapper = getWrapper({
|
|
220
|
+
canInvite: true,
|
|
221
|
+
isFetching: false,
|
|
222
|
+
showNewUpgradeText: true,
|
|
223
|
+
showUpgradeOptions: true,
|
|
216
224
|
});
|
|
217
|
-
expect(wrapper).
|
|
225
|
+
expect(wrapper.exists('UpgradeBadge')).toBe(true);
|
|
226
|
+
const msg = wrapper.find('FormattedCompMessage');
|
|
227
|
+
expect(msg.prop('id')).toEqual('boxui.unifiedShare.upgradeCollaboratorAccessDescription');
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
test('should render correct upgrade inline notice when showUpgradeInlineNotice and showUpgradeOptions is enabled', () => {
|
|
231
|
+
const wrapper = getWrapper({
|
|
232
|
+
canInvite: true,
|
|
233
|
+
isFetching: false,
|
|
234
|
+
showUpgradeInlineNotice: true,
|
|
235
|
+
showUpgradeOptions: true,
|
|
236
|
+
});
|
|
237
|
+
expect(wrapper.exists('UpgradeBadge')).toBe(false);
|
|
238
|
+
expect(wrapper.exists('InlineNotice')).toBe(true);
|
|
218
239
|
});
|
|
219
240
|
|
|
220
241
|
test('should render a default component with correct Focus element and props when focusSharedLinkOnLoad is enabled', () => {
|
|
@@ -416,6 +437,34 @@ describe('features/unified-share-modal/UnifiedShareForm', () => {
|
|
|
416
437
|
});
|
|
417
438
|
});
|
|
418
439
|
|
|
440
|
+
describe('handleSendSharedLink()', () => {
|
|
441
|
+
test('should call onSendClick and sendSharedLink with the correct params', async () => {
|
|
442
|
+
const data = {
|
|
443
|
+
emails: ['dvader@example.com', 'fbar@example.com'],
|
|
444
|
+
groupIDs: ['eng@example.com', 'product@example.com'],
|
|
445
|
+
};
|
|
446
|
+
const onSendClick = jest.fn();
|
|
447
|
+
const sendSharedLink = jest.fn();
|
|
448
|
+
const sharedLink = { permissionLevel: CAN_EDIT };
|
|
449
|
+
const trackingProps = {
|
|
450
|
+
...defaultTrackingProps,
|
|
451
|
+
sharedLinkEmailTracking: { onSendClick },
|
|
452
|
+
};
|
|
453
|
+
const expectedParams = {
|
|
454
|
+
...data,
|
|
455
|
+
numsOfRecipients: 2,
|
|
456
|
+
numOfRecipientGroups: 2,
|
|
457
|
+
permissionLevel: CAN_EDIT,
|
|
458
|
+
};
|
|
459
|
+
const wrapper = getWrapper({ sendSharedLink, sharedLink, trackingProps });
|
|
460
|
+
|
|
461
|
+
await wrapper.instance().handleSendSharedLink(data);
|
|
462
|
+
|
|
463
|
+
expect(onSendClick).toBeCalledWith(expectedParams);
|
|
464
|
+
expect(sendSharedLink).toBeCalledWith(data);
|
|
465
|
+
});
|
|
466
|
+
});
|
|
467
|
+
|
|
419
468
|
describe('handleInviteePermissionChange()', () => {
|
|
420
469
|
test('should set the permission in the state', () => {
|
|
421
470
|
const onInviteePermissionChange = jest.fn();
|
package/src/features/unified-share-modal/__tests__/__snapshots__/SharedLinkSection.test.js.snap
CHANGED
|
@@ -96,6 +96,7 @@ exports[`features/unified-share-modal/SharedLinkSection should account for share
|
|
|
96
96
|
className="shared-link-field-container"
|
|
97
97
|
hideOptionalLabel={true}
|
|
98
98
|
label=""
|
|
99
|
+
onCopySuccess={[Function]}
|
|
99
100
|
readOnly={true}
|
|
100
101
|
successStateDuration={3000}
|
|
101
102
|
triggerCopyOnLoad={false}
|
|
@@ -255,6 +256,7 @@ exports[`features/unified-share-modal/SharedLinkSection should render a default
|
|
|
255
256
|
className="shared-link-field-container"
|
|
256
257
|
hideOptionalLabel={true}
|
|
257
258
|
label=""
|
|
259
|
+
onCopySuccess={[Function]}
|
|
258
260
|
readOnly={true}
|
|
259
261
|
successStateDuration={3000}
|
|
260
262
|
triggerCopyOnLoad={false}
|
|
@@ -448,6 +450,7 @@ exports[`features/unified-share-modal/SharedLinkSection should render default co
|
|
|
448
450
|
className="shared-link-field-container"
|
|
449
451
|
hideOptionalLabel={true}
|
|
450
452
|
label=""
|
|
453
|
+
onCopySuccess={[Function]}
|
|
451
454
|
readOnly={true}
|
|
452
455
|
successStateDuration={3000}
|
|
453
456
|
triggerCopyOnLoad={false}
|
|
@@ -712,6 +715,7 @@ exports[`features/unified-share-modal/SharedLinkSection should render proper dro
|
|
|
712
715
|
className="shared-link-field-container"
|
|
713
716
|
hideOptionalLabel={true}
|
|
714
717
|
label=""
|
|
718
|
+
onCopySuccess={[Function]}
|
|
715
719
|
readOnly={true}
|
|
716
720
|
successStateDuration={3000}
|
|
717
721
|
triggerCopyOnLoad={false}
|
|
@@ -855,6 +859,7 @@ exports[`features/unified-share-modal/SharedLinkSection should render proper lis
|
|
|
855
859
|
className="shared-link-field-container"
|
|
856
860
|
hideOptionalLabel={true}
|
|
857
861
|
label=""
|
|
862
|
+
onCopySuccess={[Function]}
|
|
858
863
|
readOnly={true}
|
|
859
864
|
successStateDuration={3000}
|
|
860
865
|
triggerCopyOnLoad={false}
|
|
@@ -1000,6 +1005,7 @@ exports[`features/unified-share-modal/SharedLinkSection should render proper lis
|
|
|
1000
1005
|
className="shared-link-field-container"
|
|
1001
1006
|
hideOptionalLabel={true}
|
|
1002
1007
|
label=""
|
|
1008
|
+
onCopySuccess={[Function]}
|
|
1003
1009
|
readOnly={true}
|
|
1004
1010
|
successStateDuration={3000}
|
|
1005
1011
|
triggerCopyOnLoad={false}
|
|
@@ -1144,6 +1150,7 @@ exports[`features/unified-share-modal/SharedLinkSection should render proper lis
|
|
|
1144
1150
|
className="shared-link-field-container"
|
|
1145
1151
|
hideOptionalLabel={true}
|
|
1146
1152
|
label=""
|
|
1153
|
+
onCopySuccess={[Function]}
|
|
1147
1154
|
readOnly={true}
|
|
1148
1155
|
successStateDuration={3000}
|
|
1149
1156
|
triggerCopyOnLoad={false}
|
|
@@ -1288,6 +1295,7 @@ exports[`features/unified-share-modal/SharedLinkSection should render proper lis
|
|
|
1288
1295
|
className="shared-link-field-container"
|
|
1289
1296
|
hideOptionalLabel={true}
|
|
1290
1297
|
label=""
|
|
1298
|
+
onCopySuccess={[Function]}
|
|
1291
1299
|
readOnly={true}
|
|
1292
1300
|
successStateDuration={3000}
|
|
1293
1301
|
triggerCopyOnLoad={false}
|
|
@@ -1458,6 +1466,7 @@ exports[`features/unified-share-modal/SharedLinkSection should render without Sh
|
|
|
1458
1466
|
className="shared-link-field-container"
|
|
1459
1467
|
hideOptionalLabel={true}
|
|
1460
1468
|
label=""
|
|
1469
|
+
onCopySuccess={[Function]}
|
|
1461
1470
|
readOnly={true}
|
|
1462
1471
|
successStateDuration={3000}
|
|
1463
1472
|
triggerCopyOnLoad={false}
|