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
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
|
-
import isEmpty from 'lodash/isEmpty';
|
|
4
3
|
import PropTypes from 'prop-types';
|
|
5
4
|
import throttle from 'lodash/throttle';
|
|
6
5
|
import { FormattedMessage, injectIntl } from 'react-intl';
|
|
6
|
+
|
|
7
7
|
import Button from '../../components/button';
|
|
8
|
-
import
|
|
8
|
+
import PresenceCollaborator from './PresenceCollaborator';
|
|
9
9
|
import messages from './messages';
|
|
10
|
-
|
|
11
|
-
import { determineInteractionMessage } from './utils/presenceUtils';
|
|
10
|
+
|
|
12
11
|
import './PresenceCollaboratorsList.scss';
|
|
13
12
|
|
|
14
13
|
class PresenceCollaboratorsList extends React.Component<Props> {
|
|
@@ -96,57 +95,6 @@ class PresenceCollaboratorsList extends React.Component<Props> {
|
|
|
96
95
|
</div>
|
|
97
96
|
);
|
|
98
97
|
|
|
99
|
-
renderTimestampMessage = (interactedAt, interactionType) => {
|
|
100
|
-
const lastActionMessage = determineInteractionMessage(interactionType, interactedAt);
|
|
101
|
-
const { intl } = this.props;
|
|
102
|
-
const timeAgo = intl.formatRelativeTime
|
|
103
|
-
? intl.formatRelativeTime(interactedAt - Date.now())
|
|
104
|
-
: intl.formatRelative(interactedAt);
|
|
105
|
-
|
|
106
|
-
if (lastActionMessage) {
|
|
107
|
-
return (
|
|
108
|
-
<FormattedMessage
|
|
109
|
-
{...lastActionMessage}
|
|
110
|
-
values={{
|
|
111
|
-
timeAgo,
|
|
112
|
-
}}
|
|
113
|
-
/>
|
|
114
|
-
);
|
|
115
|
-
}
|
|
116
|
-
return null;
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
renderCollabList = () => {
|
|
120
|
-
const { collaborators } = this.props;
|
|
121
|
-
return collaborators.map(collaborator => {
|
|
122
|
-
const { avatarUrl, id, isActive, interactedAt, interactionType, name, profileUrl } = collaborator;
|
|
123
|
-
|
|
124
|
-
return (
|
|
125
|
-
<div key={id} className="bdl-PresenceCollaboratorsList-item" role="listitem">
|
|
126
|
-
<PresenceAvatar avatarUrl={avatarUrl} id={id} isActive={isActive} isDropDownAvatar name={name} />
|
|
127
|
-
<div className="bdl-PresenceCollaboratorsList-item-info-container">
|
|
128
|
-
<div className="bdl-PresenceCollaboratorsList-item-info-name">
|
|
129
|
-
{isEmpty(profileUrl) ? (
|
|
130
|
-
<span>{name}</span>
|
|
131
|
-
) : (
|
|
132
|
-
<Link href={profileUrl} target="_blank">
|
|
133
|
-
{name}
|
|
134
|
-
</Link>
|
|
135
|
-
)}
|
|
136
|
-
</div>
|
|
137
|
-
<div className="bdl-PresenceCollaboratorsList-item-info-time">
|
|
138
|
-
{isActive ? (
|
|
139
|
-
<FormattedMessage {...messages.activeNowText} />
|
|
140
|
-
) : (
|
|
141
|
-
this.renderTimestampMessage(interactedAt, interactionType)
|
|
142
|
-
)}
|
|
143
|
-
</div>
|
|
144
|
-
</div>
|
|
145
|
-
</div>
|
|
146
|
-
);
|
|
147
|
-
});
|
|
148
|
-
};
|
|
149
|
-
|
|
150
98
|
renderActions = () => {
|
|
151
99
|
const { getLinkCallback, inviteCallback } = this.props;
|
|
152
100
|
|
|
@@ -172,7 +120,7 @@ class PresenceCollaboratorsList extends React.Component<Props> {
|
|
|
172
120
|
|
|
173
121
|
render() {
|
|
174
122
|
const { isScrollableAbove, isScrollableBelow } = this.state;
|
|
175
|
-
const { getLinkCallback, inviteCallback } = this.props;
|
|
123
|
+
const { collaborators, getLinkCallback, inviteCallback } = this.props;
|
|
176
124
|
const buttonsPresent = getLinkCallback || inviteCallback;
|
|
177
125
|
|
|
178
126
|
const dropdownListClasses = classnames('bdl-PresenceCollaboratorsList-list', {
|
|
@@ -183,7 +131,6 @@ class PresenceCollaboratorsList extends React.Component<Props> {
|
|
|
183
131
|
});
|
|
184
132
|
|
|
185
133
|
const title = this.renderTitle();
|
|
186
|
-
const collabList = this.renderCollabList();
|
|
187
134
|
const actions = this.renderActions();
|
|
188
135
|
|
|
189
136
|
return (
|
|
@@ -197,7 +144,9 @@ class PresenceCollaboratorsList extends React.Component<Props> {
|
|
|
197
144
|
onScroll={this.throttledHandleScroll}
|
|
198
145
|
role="list"
|
|
199
146
|
>
|
|
200
|
-
{
|
|
147
|
+
{collaborators.map(collaborator => (
|
|
148
|
+
<PresenceCollaborator collaborator={collaborator} key={collaborator.id} role="listitem" />
|
|
149
|
+
))}
|
|
201
150
|
</div>
|
|
202
151
|
{actions}
|
|
203
152
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/features/presence/PresenceCollaboratorsList.js"],"names":["React","classnames","isEmpty","PropTypes","throttle","FormattedMessage","injectIntl","Button","Link","messages","PresenceAvatar","determineInteractionMessage","PresenceCollaboratorsList","isScrollableAbove","isScrollableBelow","elem","scrollTop","scrollHeight","clientHeight","event","onScroll","props","elDropdownList","setState","calculateOverflow","handleScroll","leading","trailing","recentActivity","interactedAt","interactionType","lastActionMessage","intl","timeAgo","formatRelativeTime","Date","now","formatRelative","collaborators","map","collaborator","avatarUrl","id","isActive","name","profileUrl","activeNowText","renderTimestampMessage","getLinkCallback","inviteCallback","getLinkButtonText","inviteButtonText","overflow","state","buttonsPresent","dropdownListClasses","title","renderTitle","collabList","renderCollabList","actions","renderActions","list","throttledHandleScroll","Component","arrayOf","shape","string","oneOfType","number","bool","isRequired","func","any","PresenceCollaboratorsListComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,QAAP,MAAqB,iBAArB;AACA,SAASC,gBAAT,EAA2BC,UAA3B,QAA6C,YAA7C;AACA,OAAOC,MAAP,MAAmB,yBAAnB;AACA,OAAOC,IAAP,MAAiB,gCAAjB;AACA,OAAOC,QAAP,MAAqB,YAArB;AACA,OAAOC,cAAP,MAA2B,kBAA3B;AACA,SAASC,2BAAT,QAA4C,uBAA5C;AACA,OAAO,kCAAP;;IAEMC,yB;;;;;;;;;;;;;;;;;;4DA6BM;AACJC,MAAAA,iBAAiB,EAAE,KADf;AAEJC,MAAAA,iBAAiB,EAAE;AAFf,K;;wEA0BY,UAAAC,IAAI,EAAI;AACxB,UAAMF,iBAAiB,GAAGE,IAAI,CAACC,SAAL,GAAiB,CAA3C;AACA,UAAMF,iBAAiB,GAAGC,IAAI,CAACC,SAAL,GAAiBD,IAAI,CAACE,YAAL,GAAoBF,IAAI,CAACG,YAApE;AACA,aAAO;AACHL,QAAAA,iBAAiB,EAAjBA,iBADG;AAEHC,QAAAA,iBAAiB,EAAjBA;AAFG,OAAP;AAIH,K;;mEAEc,UAAAK,KAAK,EAAI;AAAA,UACZC,QADY,GACC,MAAKC,KADN,CACZD,QADY;;AAEpB,UAAI,MAAKE,cAAT,EAAyB;AACrB,cAAKC,QAAL,CAAc,MAAKC,iBAAL,CAAuB,MAAKF,cAA5B,CAAd;;AACA,YAAIF,QAAJ,EAAc;AACVA,U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QAAA,IAAI,EAAC;AANT,SAQKL,UARL,CAFJ,EAYKE,OAZL,CADJ;AAgBH;;;;EA/LmC5D,KAAK,CAACgE,S;;gBAAxCpD,yB,eACiB;AACf0B,EAAAA,aAAa,EAAEnC,SAAS,CAAC8D,OAAV,CACX9D,SAAS,CAAC+D,KAAV,CAAgB;AACZ;AACAzB,IAAAA,SAAS,EAAEtC,SAAS,CAACgE,MAFT;;AAGZ;AACAzB,IAAAA,EAAE,EAAEvC,SAAS,CAACiE,SAAV,CAAoB,CAACjE,SAAS,CAACgE,MAAX,EAAmBhE,SAAS,CAACkE,MAA7B,CAApB,CAJQ;AAKZ1B,IAAAA,QAAQ,EAAExC,SAAS,CAACmE,IALR;;AAMZ;AACAzC,IAAAA,YAAY,EAAE1B,SAAS,CAACkE,MAPZ;;AAQZ;AACAvC,IAAAA,eAAe,EAAE3B,SAAS,CAACgE,MATf;;AAUZ;AACAvB,IAAAA,IAAI,EAAEzC,SAAS,CAACgE,MAAV,CAAiBI,UAXX;;AAYZ;AACA1B,IAAAA,UAAU,EAAE1C,SAAS,CAACgE;AAbV,GAAhB,CADW,EAgBbI,UAjBa;;AAkBf;AACAvB,EAAAA,eAAe,EAAE7C,SAAS,CAACqE,IAnBZ;;AAoBf;AACAvB,EAAAA,cAAc,EAAE9C,SAAS,CAACqE,IArBX;;AAsBf;AACApD,EAAAA,QAAQ,EAAEjB,SAAS,CAACqE,IAvBL;;AAwBf;AACAxC,EAAAA,IAAI,EAAE7B,SAAS,CAACsE;AAzBD,C;;AAiMvB,SAAS7D,yBAAyB,IAAI8D,kCAAtC;AACA,eAAepE,UAAU,CAACM,yBAAD,CAAzB","sourcesContent":["import * as React from 'react';\nimport classnames from 'classnames';\nimport isEmpty from 'lodash/isEmpty';\nimport PropTypes from 'prop-types';\nimport throttle from 'lodash/throttle';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport Button from '../../components/button';\nimport Link from '../../components/link/LinkBase';\nimport messages from './messages';\nimport PresenceAvatar from './PresenceAvatar';\nimport { determineInteractionMessage } from './utils/presenceUtils';\nimport './PresenceCollaboratorsList.scss';\n\nclass PresenceCollaboratorsList extends React.Component<Props> {\n static propTypes = {\n collaborators: PropTypes.arrayOf(\n PropTypes.shape({\n /** Url to avatar image. If passed in, component will render the avatar image instead of the initials */\n avatarUrl: PropTypes.string,\n /** Users id */\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n isActive: PropTypes.bool,\n /** Unix timestamp of when the user last interacted with the document */\n interactedAt: PropTypes.number,\n /** The type of interaction by the user */\n interactionType: PropTypes.string,\n /** User's full name */\n name: PropTypes.string.isRequired,\n /** Custom Profile URL */\n profileUrl: PropTypes.string,\n }),\n ).isRequired,\n /* Get Link button callback. also controls visibility of button */\n getLinkCallback: PropTypes.func,\n /* Show Invite button callback. also controls visibility of button */\n inviteCallback: PropTypes.func,\n /* Callback for Dropdown onScroll event */\n onScroll: PropTypes.func,\n /* Intl object */\n intl: PropTypes.any,\n };\n\n state = {\n isScrollableAbove: false,\n isScrollableBelow: false,\n };\n\n componentDidMount() {\n const overflow = this.calculateOverflow(this.elDropdownList);\n // eslint-disable-next-line react/no-did-mount-set-state\n this.setState(overflow);\n }\n\n componentDidUpdate() {\n const overflow = this.calculateOverflow(this.elDropdownList);\n /**\n * recalculate overflow when dropdown is visible and new collabs are added\n * This will not go into an infinite loop because we check for changes in local component state\n */\n if (\n overflow.isScrollableAbove !== this.state.isScrollableAbove ||\n overflow.isScrollableBelow !== this.state.isScrollableBelow\n ) {\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState(overflow);\n }\n }\n\n calculateOverflow = elem => {\n const isScrollableAbove = elem.scrollTop > 0;\n const isScrollableBelow = elem.scrollTop < elem.scrollHeight - elem.clientHeight;\n return {\n isScrollableAbove,\n isScrollableBelow,\n };\n };\n\n handleScroll = event => {\n const { onScroll } = this.props;\n if (this.elDropdownList) {\n this.setState(this.calculateOverflow(this.elDropdownList));\n if (onScroll) {\n onScroll(event);\n }\n }\n };\n\n throttledHandleScroll = throttle(this.handleScroll, 50, {\n leading: true,\n trailing: true,\n });\n\n renderTitle = () => (\n <div className=\"bdl-PresenceCollaboratorsList-title\">\n <FormattedMessage {...messages.recentActivity} />\n </div>\n );\n\n renderTimestampMessage = (interactedAt, interactionType) => {\n const lastActionMessage = determineInteractionMessage(interactionType, interactedAt);\n const { intl } = this.props;\n const timeAgo = intl.formatRelativeTime\n ? intl.formatRelativeTime(interactedAt - Date.now())\n : intl.formatRelative(interactedAt);\n\n if (lastActionMessage) {\n return (\n <FormattedMessage\n {...lastActionMessage}\n values={{\n timeAgo,\n }}\n />\n );\n }\n return null;\n };\n\n renderCollabList = () => {\n const { collaborators } = this.props;\n return collaborators.map(collaborator => {\n const { avatarUrl, id, isActive, interactedAt, interactionType, name, profileUrl } = collaborator;\n\n return (\n <div key={id} className=\"bdl-PresenceCollaboratorsList-item\" role=\"listitem\">\n <PresenceAvatar avatarUrl={avatarUrl} id={id} isActive={isActive} isDropDownAvatar name={name} />\n <div className=\"bdl-PresenceCollaboratorsList-item-info-container\">\n <div className=\"bdl-PresenceCollaboratorsList-item-info-name\">\n {isEmpty(profileUrl) ? (\n <span>{name}</span>\n ) : (\n <Link href={profileUrl} target=\"_blank\">\n {name}\n </Link>\n )}\n </div>\n <div className=\"bdl-PresenceCollaboratorsList-item-info-time\">\n {isActive ? (\n <FormattedMessage {...messages.activeNowText} />\n ) : (\n this.renderTimestampMessage(interactedAt, interactionType)\n )}\n </div>\n </div>\n </div>\n );\n });\n };\n\n renderActions = () => {\n const { getLinkCallback, inviteCallback } = this.props;\n\n return (\n (getLinkCallback || inviteCallback) && (\n <div className=\"bdl-PresenceCollaboratorsList-actions\">\n <div>\n {getLinkCallback && (\n <Button onClick={getLinkCallback}>\n <FormattedMessage {...messages.getLinkButtonText} />\n </Button>\n )}\n {inviteCallback && (\n <Button onClick={inviteCallback}>\n <FormattedMessage {...messages.inviteButtonText} />\n </Button>\n )}\n </div>\n </div>\n )\n );\n };\n\n render() {\n const { isScrollableAbove, isScrollableBelow } = this.state;\n const { getLinkCallback, inviteCallback } = this.props;\n const buttonsPresent = getLinkCallback || inviteCallback;\n\n const dropdownListClasses = classnames('bdl-PresenceCollaboratorsList-list', {\n 'dropshadow-list': !buttonsPresent,\n 'dropshadow-list-with-buttons': buttonsPresent,\n 'is-scrollable-above': isScrollableAbove,\n 'is-scrollable-below': isScrollableBelow,\n });\n\n const title = this.renderTitle();\n const collabList = this.renderCollabList();\n const actions = this.renderActions();\n\n return (\n <div className=\"bdl-PresenceCollaboratorsList\">\n {title}\n <div\n ref={list => {\n this.elDropdownList = list;\n }}\n className={dropdownListClasses}\n onScroll={this.throttledHandleScroll}\n role=\"list\"\n >\n {collabList}\n </div>\n {actions}\n </div>\n );\n }\n}\n\nexport { PresenceCollaboratorsList as PresenceCollaboratorsListComponent };\nexport default injectIntl(PresenceCollaboratorsList);\n"],"file":"PresenceCollaboratorsList.js"}
|
|
1
|
+
{"version":3,"sources":["../../../src/features/presence/PresenceCollaboratorsList.js"],"names":["React","classnames","PropTypes","throttle","FormattedMessage","injectIntl","Button","PresenceCollaborator","messages","PresenceCollaboratorsList","isScrollableAbove","isScrollableBelow","elem","scrollTop","scrollHeight","clientHeight","event","onScroll","props","elDropdownList","setState","calculateOverflow","handleScroll","leading","trailing","recentActivity","getLinkCallback","inviteCallback","getLinkButtonText","inviteButtonText","overflow","state","collaborators","buttonsPresent","dropdownListClasses","title","renderTitle","actions","renderActions","list","throttledHandleScroll","map","collaborator","id","Component","arrayOf","shape","avatarUrl","string","oneOfType","number","isActive","bool","interactedAt","interactionType","name","isRequired","profileUrl","func","intl","any","PresenceCollaboratorsListComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,QAAP,MAAqB,iBAArB;AACA,SAASC,gBAAT,EAA2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BZ;;AAoBf;AACA/B,EAAAA,cAAc,EAAEzB,SAAS,CAACwD,IArBX;;AAsBf;AACAzC,EAAAA,QAAQ,EAAEf,SAAS,CAACwD,IAvBL;;AAwBf;AACAC,EAAAA,IAAI,EAAEzD,SAAS,CAAC0D;AAzBD,C;;AA+IvB,SAASnD,yBAAyB,IAAIoD,kCAAtC;AACA,eAAexD,UAAU,CAACI,yBAAD,CAAzB","sourcesContent":["import * as React from 'react';\nimport classnames from 'classnames';\nimport PropTypes from 'prop-types';\nimport throttle from 'lodash/throttle';\nimport { FormattedMessage, injectIntl } from 'react-intl';\n\nimport Button from '../../components/button';\nimport PresenceCollaborator from './PresenceCollaborator';\nimport messages from './messages';\n\nimport './PresenceCollaboratorsList.scss';\n\nclass PresenceCollaboratorsList extends React.Component<Props> {\n static propTypes = {\n collaborators: PropTypes.arrayOf(\n PropTypes.shape({\n /** Url to avatar image. If passed in, component will render the avatar image instead of the initials */\n avatarUrl: PropTypes.string,\n /** Users id */\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n isActive: PropTypes.bool,\n /** Unix timestamp of when the user last interacted with the document */\n interactedAt: PropTypes.number,\n /** The type of interaction by the user */\n interactionType: PropTypes.string,\n /** User's full name */\n name: PropTypes.string.isRequired,\n /** Custom Profile URL */\n profileUrl: PropTypes.string,\n }),\n ).isRequired,\n /* Get Link button callback. also controls visibility of button */\n getLinkCallback: PropTypes.func,\n /* Show Invite button callback. also controls visibility of button */\n inviteCallback: PropTypes.func,\n /* Callback for Dropdown onScroll event */\n onScroll: PropTypes.func,\n /* Intl object */\n intl: PropTypes.any,\n };\n\n state = {\n isScrollableAbove: false,\n isScrollableBelow: false,\n };\n\n componentDidMount() {\n const overflow = this.calculateOverflow(this.elDropdownList);\n // eslint-disable-next-line react/no-did-mount-set-state\n this.setState(overflow);\n }\n\n componentDidUpdate() {\n const overflow = this.calculateOverflow(this.elDropdownList);\n /**\n * recalculate overflow when dropdown is visible and new collabs are added\n * This will not go into an infinite loop because we check for changes in local component state\n */\n if (\n overflow.isScrollableAbove !== this.state.isScrollableAbove ||\n overflow.isScrollableBelow !== this.state.isScrollableBelow\n ) {\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState(overflow);\n }\n }\n\n calculateOverflow = elem => {\n const isScrollableAbove = elem.scrollTop > 0;\n const isScrollableBelow = elem.scrollTop < elem.scrollHeight - elem.clientHeight;\n return {\n isScrollableAbove,\n isScrollableBelow,\n };\n };\n\n handleScroll = event => {\n const { onScroll } = this.props;\n if (this.elDropdownList) {\n this.setState(this.calculateOverflow(this.elDropdownList));\n if (onScroll) {\n onScroll(event);\n }\n }\n };\n\n throttledHandleScroll = throttle(this.handleScroll, 50, {\n leading: true,\n trailing: true,\n });\n\n renderTitle = () => (\n <div className=\"bdl-PresenceCollaboratorsList-title\">\n <FormattedMessage {...messages.recentActivity} />\n </div>\n );\n\n renderActions = () => {\n const { getLinkCallback, inviteCallback } = this.props;\n\n return (\n (getLinkCallback || inviteCallback) && (\n <div className=\"bdl-PresenceCollaboratorsList-actions\">\n <div>\n {getLinkCallback && (\n <Button onClick={getLinkCallback}>\n <FormattedMessage {...messages.getLinkButtonText} />\n </Button>\n )}\n {inviteCallback && (\n <Button onClick={inviteCallback}>\n <FormattedMessage {...messages.inviteButtonText} />\n </Button>\n )}\n </div>\n </div>\n )\n );\n };\n\n render() {\n const { isScrollableAbove, isScrollableBelow } = this.state;\n const { collaborators, getLinkCallback, inviteCallback } = this.props;\n const buttonsPresent = getLinkCallback || inviteCallback;\n\n const dropdownListClasses = classnames('bdl-PresenceCollaboratorsList-list', {\n 'dropshadow-list': !buttonsPresent,\n 'dropshadow-list-with-buttons': buttonsPresent,\n 'is-scrollable-above': isScrollableAbove,\n 'is-scrollable-below': isScrollableBelow,\n });\n\n const title = this.renderTitle();\n const actions = this.renderActions();\n\n return (\n <div className=\"bdl-PresenceCollaboratorsList\">\n {title}\n <div\n ref={list => {\n this.elDropdownList = list;\n }}\n className={dropdownListClasses}\n onScroll={this.throttledHandleScroll}\n role=\"list\"\n >\n {collaborators.map(collaborator => (\n <PresenceCollaborator collaborator={collaborator} key={collaborator.id} role=\"listitem\" />\n ))}\n </div>\n {actions}\n </div>\n );\n }\n}\n\nexport { PresenceCollaboratorsList as PresenceCollaboratorsListComponent };\nexport default injectIntl(PresenceCollaboratorsList);\n"],"file":"PresenceCollaboratorsList.js"}
|
|
@@ -77,52 +77,25 @@
|
|
|
77
77
|
/* end GROWTH-382 */
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
.bdl-
|
|
81
|
-
margin-top: 0;
|
|
82
|
-
margin-bottom: 10px;
|
|
83
|
-
color: $bdl-gray;
|
|
84
|
-
font-size: 15px;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.bdl-PresenceCollaboratorsList-item {
|
|
80
|
+
.bdl-PresenceCollaborator {
|
|
88
81
|
display: flex;
|
|
89
82
|
align-items: center;
|
|
90
83
|
margin-top: 10px;
|
|
91
84
|
}
|
|
92
85
|
|
|
93
|
-
.bdl-PresenceCollaboratorsList-item-info-container {
|
|
94
|
-
display: inline-block;
|
|
95
|
-
margin-left: 10px;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.bdl-PresenceCollaboratorsList-item-info-name {
|
|
99
|
-
width: 180px;
|
|
100
|
-
overflow: hidden;
|
|
101
|
-
color: $bdl-gray;
|
|
102
|
-
font-size: 13px;
|
|
103
|
-
white-space: nowrap;
|
|
104
|
-
text-overflow: ellipsis;
|
|
105
|
-
|
|
106
|
-
a {
|
|
107
|
-
color: $bdl-gray;
|
|
108
|
-
|
|
109
|
-
&:hover {
|
|
110
|
-
text-decoration: underline;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.bdl-PresenceCollaboratorsList-item-info-time {
|
|
116
|
-
color: $bdl-gray-62;
|
|
117
|
-
font-size: 12px;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
86
|
.bdl-PresenceCollaboratorsList-list {
|
|
121
87
|
max-height: 200px;
|
|
122
88
|
overflow-x: hidden;
|
|
123
89
|
overflow-y: auto;
|
|
124
90
|
}
|
|
125
91
|
|
|
92
|
+
.bdl-PresenceCollaboratorsList-title {
|
|
93
|
+
margin-top: 0;
|
|
94
|
+
margin-bottom: 10px;
|
|
95
|
+
color: $bdl-gray;
|
|
96
|
+
font-size: 15px;
|
|
97
|
+
}
|
|
98
|
+
|
|
126
99
|
.bdl-PresenceCollaboratorsList-actions {
|
|
127
100
|
display: flex;
|
|
128
101
|
justify-content: flex-end;
|
|
@@ -65,7 +65,8 @@ function (_React$Component) {
|
|
|
65
65
|
errorMessage = _this$props.errorMessage,
|
|
66
66
|
inputProps = _this$props.inputProps,
|
|
67
67
|
noItemsMessage = _this$props.noItemsMessage,
|
|
68
|
-
onSelect = _this$props.onSelect
|
|
68
|
+
onSelect = _this$props.onSelect,
|
|
69
|
+
title = _this$props.title;
|
|
69
70
|
var showMessage = this.state.showMessage;
|
|
70
71
|
return React.createElement("div", {
|
|
71
72
|
className: classNames('quick-search', className),
|
|
@@ -74,7 +75,8 @@ function (_React$Component) {
|
|
|
74
75
|
}, React.createElement(SelectorDropdown, {
|
|
75
76
|
dividerIndex: dividerIndex,
|
|
76
77
|
onSelect: onSelect,
|
|
77
|
-
selector: React.createElement(QuickSearchSelector, inputProps)
|
|
78
|
+
selector: React.createElement(QuickSearchSelector, inputProps),
|
|
79
|
+
title: title
|
|
78
80
|
}, children), !!errorMessage && React.createElement(QuickSearchMessage, {
|
|
79
81
|
isShown: showMessage
|
|
80
82
|
}, errorMessage), !!noItemsMessage && React.createElement(QuickSearchMessage, {
|
|
@@ -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>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/features/quick-search/QuickSearch.js"],"names":["React","classNames","SelectorDropdown","QuickSearchMessage","QuickSearchSelector","QuickSearch","props","setState","showMessage","state","children","className","dividerIndex","errorMessage","inputProps","noItemsMessage","onSelect","handleBlur","handleFocus","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;AACA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,gBAAP,MAA6B,oCAA7B;AAEA,OAAOC,kBAAP,MAA+B,sBAA/B;AACA,OAAOC,mBAAP,MAAgC,uBAAhC;AAEA,OAAO,oBAAP;;
|
|
1
|
+
{"version":3,"sources":["../../../src/features/quick-search/QuickSearch.js"],"names":["React","classNames","SelectorDropdown","QuickSearchMessage","QuickSearchSelector","QuickSearch","props","setState","showMessage","state","children","className","dividerIndex","errorMessage","inputProps","noItemsMessage","onSelect","title","handleBlur","handleFocus","Component"],"mappings":";;;;;;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X,SAMKP,QANL,CADJ,EASK,CAAC,CAACG,YAAF,IAAkB,oBAAC,kBAAD;AAAoB,QAAA,OAAO,EAAEL;AAA7B,SAA2CK,YAA3C,CATvB,EAUK,CAAC,CAACE,cAAF,IAAoB,oBAAC,kBAAD;AAAoB,QAAA,OAAO,EAAEP;AAA7B,SAA2CO,cAA3C,CAVzB,CADJ;AAcH;;;;EA5CqBf,KAAK,CAACoB,S;;AA+ChC,eAAef,WAAf","sourcesContent":["// @flow\nimport * as React from 'react';\nimport classNames from 'classnames';\n\nimport SelectorDropdown from '../../components/selector-dropdown';\n\nimport QuickSearchMessage from './QuickSearchMessage';\nimport QuickSearchSelector from './QuickSearchSelector';\n\nimport './QuickSearch.scss';\n\ntype Props = {\n /** Options to render in the quick search dropdown */\n children?: React.Node,\n /** CSS class for the wrapper div */\n className?: string,\n /** Index at which to insert the divider */\n dividerIndex?: number,\n /** Message to display for the error state */\n errorMessage?: React.Node,\n /** Props for the input element (search bar) */\n inputProps: Object,\n /** Message to display when no results are found */\n noItemsMessage?: React.Node,\n /** Function called with the index of the selected option and the event (selected by keyboard or click) */\n onSelect?: Function,\n /** Optional title text that will be rendered above the list */\n title?: React.Node,\n};\n\ntype State = {\n showMessage: boolean,\n};\n\nclass QuickSearch extends React.Component<Props, State> {\n constructor(props: Props) {\n super(props);\n\n this.state = {\n showMessage: false,\n };\n }\n\n handleFocus = () => {\n this.setState({ showMessage: true });\n };\n\n handleBlur = () => {\n this.setState({ showMessage: false });\n };\n\n render() {\n const {\n children,\n className,\n dividerIndex,\n errorMessage,\n inputProps,\n noItemsMessage,\n onSelect,\n title,\n } = this.props;\n const { showMessage } = this.state;\n\n return (\n <div className={classNames('quick-search', className)} onBlur={this.handleBlur} onFocus={this.handleFocus}>\n <SelectorDropdown\n dividerIndex={dividerIndex}\n onSelect={onSelect}\n selector={<QuickSearchSelector {...inputProps} />}\n title={title}\n >\n {children}\n </SelectorDropdown>\n {!!errorMessage && <QuickSearchMessage isShown={showMessage}>{errorMessage}</QuickSearchMessage>}\n {!!noItemsMessage && <QuickSearchMessage isShown={showMessage}>{noItemsMessage}</QuickSearchMessage>}\n </div>\n );\n }\n}\n\nexport default QuickSearch;\n"],"file":"QuickSearch.js"}
|
|
@@ -21,6 +21,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
|
|
|
21
21
|
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; }
|
|
22
22
|
|
|
23
23
|
import * as React from 'react';
|
|
24
|
+
import noop from 'lodash/noop';
|
|
24
25
|
import { FormattedMessage } from 'react-intl';
|
|
25
26
|
import PlainButton from '../../components/plain-button';
|
|
26
27
|
import Button from '../../components/button';
|
|
@@ -98,8 +99,7 @@ function (_React$Component) {
|
|
|
98
99
|
_this.state = {
|
|
99
100
|
isAutoCreatingSharedLink: false,
|
|
100
101
|
isCopySuccessful: null,
|
|
101
|
-
isSharedLinkEditTooltipShown: false
|
|
102
|
-
isPermissionElevatedToEdit: false
|
|
102
|
+
isSharedLinkEditTooltipShown: false
|
|
103
103
|
};
|
|
104
104
|
return _this;
|
|
105
105
|
}
|
|
@@ -149,8 +149,7 @@ function (_React$Component) {
|
|
|
149
149
|
var _this$state = this.state,
|
|
150
150
|
isAutoCreatingSharedLink = _this$state.isAutoCreatingSharedLink,
|
|
151
151
|
isCopySuccessful = _this$state.isCopySuccessful,
|
|
152
|
-
isSharedLinkEditTooltipShown = _this$state.isSharedLinkEditTooltipShown
|
|
153
|
-
isPermissionElevatedToEdit = _this$state.isPermissionElevatedToEdit;
|
|
152
|
+
isSharedLinkEditTooltipShown = _this$state.isSharedLinkEditTooltipShown;
|
|
154
153
|
|
|
155
154
|
if (autoCreateSharedLink && !isAutoCreatingSharedLink && !sharedLink.url && !submitting && !sharedLink.isNewSharedLink) {
|
|
156
155
|
this.setState({
|
|
@@ -169,18 +168,6 @@ function (_React$Component) {
|
|
|
169
168
|
}
|
|
170
169
|
}
|
|
171
170
|
|
|
172
|
-
if (prevProps.sharedLink.permissionLevel !== '' && prevProps.sharedLink.permissionLevel !== CAN_EDIT && sharedLink.permissionLevel === CAN_EDIT) {
|
|
173
|
-
this.setState({
|
|
174
|
-
isPermissionElevatedToEdit: true
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
if (isPermissionElevatedToEdit && (sharedLink.permissionLevel !== CAN_EDIT || sharedLink.accessLevel !== ANYONE_IN_COMPANY)) {
|
|
179
|
-
this.setState({
|
|
180
|
-
isPermissionElevatedToEdit: false
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
|
|
184
171
|
if (Browser.canWriteToClipboard() && triggerCopyOnLoad && !isAutoCreatingSharedLink && sharedLink.url && isCopySuccessful === null) {
|
|
185
172
|
onCopyInit();
|
|
186
173
|
navigator.clipboard.writeText(sharedLink.url).then(function () {
|
|
@@ -231,7 +218,6 @@ function (_React$Component) {
|
|
|
231
218
|
tooltips = _this$props4.tooltips;
|
|
232
219
|
var _this$state2 = this.state,
|
|
233
220
|
isCopySuccessful = _this$state2.isCopySuccessful,
|
|
234
|
-
isPermissionElevatedToEdit = _this$state2.isPermissionElevatedToEdit,
|
|
235
221
|
isSharedLinkEditTooltipShown = _this$state2.isSharedLinkEditTooltipShown;
|
|
236
222
|
var accessLevel = sharedLink.accessLevel,
|
|
237
223
|
accessLevelsDisabledReason = sharedLink.accessLevelsDisabledReason,
|
|
@@ -245,7 +231,8 @@ function (_React$Component) {
|
|
|
245
231
|
onChangeSharedLinkAccessLevel = trackingProps.onChangeSharedLinkAccessLevel,
|
|
246
232
|
onChangeSharedLinkPermissionLevel = trackingProps.onChangeSharedLinkPermissionLevel,
|
|
247
233
|
onSharedLinkAccessMenuOpen = trackingProps.onSharedLinkAccessMenuOpen,
|
|
248
|
-
|
|
234
|
+
_trackingProps$onShar = trackingProps.onSharedLinkCopy,
|
|
235
|
+
onSharedLinkCopy = _trackingProps$onShar === void 0 ? noop : _trackingProps$onShar,
|
|
249
236
|
sendSharedLinkButtonProps = trackingProps.sendSharedLinkButtonProps,
|
|
250
237
|
sharedLinkAccessMenuButtonProps = trackingProps.sharedLinkAccessMenuButtonProps,
|
|
251
238
|
sharedLinkPermissionsMenuButtonProps = trackingProps.sharedLinkPermissionsMenuButtonProps;
|
|
@@ -277,7 +264,9 @@ function (_React$Component) {
|
|
|
277
264
|
className: "shared-link-field-container",
|
|
278
265
|
disabled: submitting,
|
|
279
266
|
label: "",
|
|
280
|
-
onCopySuccess:
|
|
267
|
+
onCopySuccess: function onCopySuccess() {
|
|
268
|
+
return onSharedLinkCopy(permissionLevel);
|
|
269
|
+
},
|
|
281
270
|
triggerCopyOnLoad: shouldTriggerCopyOnLoad,
|
|
282
271
|
type: "url",
|
|
283
272
|
value: url
|
|
@@ -349,7 +338,7 @@ function (_React$Component) {
|
|
|
349
338
|
"data-testid": "shared-link-editable-publicly-available-message"
|
|
350
339
|
}, messages.sharedLinkEditablePubliclyAvailable)) : React.createElement(FormattedMessage, _extends({
|
|
351
340
|
"data-testid": "shared-link-publicly-available-message"
|
|
352
|
-
}, messages.sharedLinkPubliclyAvailable))), accessLevel === ANYONE_IN_COMPANY &&
|
|
341
|
+
}, messages.sharedLinkPubliclyAvailable))), accessLevel === ANYONE_IN_COMPANY && permissionLevel === CAN_EDIT && React.createElement("div", {
|
|
353
342
|
className: "security-indicator-note"
|
|
354
343
|
}, React.createElement("span", {
|
|
355
344
|
className: "security-indicator-icon-globe"
|
|
@@ -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} />
|